repo stringlengths 7 54 | path stringlengths 4 223 | func_name stringlengths 1 134 | original_string stringlengths 75 104k | language stringclasses 1 value | code stringlengths 75 104k | code_tokens listlengths 20 28.4k | docstring stringlengths 1 46.3k | docstring_tokens listlengths 1 1.66k | sha stringlengths 40 40 | url stringlengths 87 315 | partition stringclasses 1 value | summary stringlengths 4 350 | obf_code stringlengths 7.85k 764k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
remix/partridge | partridge/gtfs.py | Feed._filter | def _filter(self, filename: str, df: pd.DataFrame) -> pd.DataFrame:
"""Apply view filters"""
view = self._view.get(filename)
if view is None:
return df
for col, values in view.items():
# If applicable, filter this dataframe by the given set of values
if col in df.columns:
df = df[df[col].isin(setwrap(values))]
return df | python | def _filter(self, filename: str, df: pd.DataFrame) -> pd.DataFrame:
"""Apply view filters"""
view = self._view.get(filename)
if view is None:
return df
for col, values in view.items():
# If applicable, filter this dataframe by the given set of values
if col in df.columns:
df = df[df[col].isin(setwrap(values))]
return df | [
"def",
"_filter",
"(",
"self",
",",
"filename",
":",
"str",
",",
"df",
":",
"pd",
".",
"DataFrame",
")",
"->",
"pd",
".",
"DataFrame",
":",
"view",
"=",
"self",
".",
"_view",
".",
"get",
"(",
"filename",
")",
"if",
"view",
"is",
"None",
":",
"return",
"df",
"for",
"col",
",",
"values",
"in",
"view",
".",
"items",
"(",
")",
":",
"# If applicable, filter this dataframe by the given set of values",
"if",
"col",
"in",
"df",
".",
"columns",
":",
"df",
"=",
"df",
"[",
"df",
"[",
"col",
"]",
".",
"isin",
"(",
"setwrap",
"(",
"values",
")",
")",
"]",
"return",
"df"
] | Apply view filters | [
"Apply",
"view",
"filters"
] | 0ba80fa30035e5e09fd8d7a7bdf1f28b93d53d03 | https://github.com/remix/partridge/blob/0ba80fa30035e5e09fd8d7a7bdf1f28b93d53d03/partridge/gtfs.py#L114-L125 | train | Apply view filters to the given dataframe | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9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ockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(0b1001111 + 0o40) + chr(2443 - 2392) + '\x30' + '\061', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(0b1000 + 0o53), 0b1000), nzTpIcepk0o8(chr(312 - 264) + chr(0b1001111 + 0o40) + chr(0b110111) + '\063', 0b1000), nzTpIcepk0o8(chr(1505 - 1457) + chr(0b1011011 + 0o24) + chr(1510 - 1461) + chr(989 - 937) + chr(0b11 + 0o56), 0o10), nzTpIcepk0o8('\x30' + chr(0b1011110 + 0o21) + chr(0b1101 + 0o44) + chr(0b101001 + 0o11), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b110001) + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(54) + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\062' + '\x33' + '\065', 14483 - 14475), nzTpIcepk0o8('\060' + chr(5074 - 4963) + chr(49) + chr(0b110000) + '\066', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(1730 - 1680) + '\x32' + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + '\065' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(1083 - 1035) + '\157' + chr(231 - 180) + chr(52) + chr(0b110101), 444 - 436), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(0b110111) + '\066', 47112 - 47104), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(53) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + chr(650 - 597) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(5319 - 5208) + '\x32' + chr(0b10000 + 0o47) + chr(0b100 + 0o62), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110111) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(863 - 815) + chr(0b1011111 + 0o20) + '\062' + chr(0b101101 + 0o10) + chr(0b110100), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + '\064' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(55) + chr(290 - 241), 25629 - 25621), nzTpIcepk0o8('\060' + chr(0b1100010 + 0o15) + chr(0b100101 + 0o14) + chr(0b110001) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10100 + 0o37) + '\063' + chr(51), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x33' + '\x35' + chr(0b101111 + 0o7), 0o10), nzTpIcepk0o8(chr(1521 - 1473) + chr(0b110110 + 0o71) + chr(49) + chr(2077 - 2024) + '\x34', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1011111 + 0o20) + chr(0b110010), 11718 - 11710), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(93 - 43) + chr(323 - 273) + '\x34', 64770 - 64762), nzTpIcepk0o8('\060' + chr(111) + chr(0b101000 + 0o13) + chr(0b110010) + chr(0b110100), 7672 - 7664), nzTpIcepk0o8('\060' + '\157' + '\064', 41967 - 41959), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(496 - 447) + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100111 + 0o14) + '\063' + '\x31', 21176 - 21168), nzTpIcepk0o8(chr(48) + chr(0b101001 + 0o106) + '\062' + chr(0b110000 + 0o2) + chr(0b110111), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1001 + 0o52) + '\x36' + chr(1062 - 1013), 0o10), nzTpIcepk0o8('\060' + chr(0b1010 + 0o145) + chr(569 - 519) + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(0b1100 + 0o50) + chr(2372 - 2318), 0b1000), nzTpIcepk0o8('\060' + chr(6734 - 6623) + '\x32' + chr(0b110111) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(51), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(1168 - 1119) + chr(0b11111 + 0o26) + '\x34', 8), nzTpIcepk0o8(chr(1277 - 1229) + chr(0b1101111) + '\063' + chr(0b11110 + 0o27), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + chr(0b110000) + '\x37', 31724 - 31716), nzTpIcepk0o8(chr(0b110000) + chr(0b1001100 + 0o43) + chr(49) + chr(2999 - 2944) + chr(2397 - 2344), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b110100 + 0o73) + '\x35' + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xef'), '\x64' + '\145' + chr(0b1100011) + chr(10296 - 10185) + '\x64' + '\x65')('\x75' + '\x74' + chr(102) + '\x2d' + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def _4f0PaFpThKG(hXMPsSrOQzbh, FxZHtXEolYsL, jpOn8DNZxbbx) -> roI3spqORKae(HLKt4sa1j9hm, roI3spqORKae(ES5oEprVxulp(b'\x85rO\x00L\xfe\x97\xf0#'), '\144' + chr(101) + chr(0b1100011) + '\157' + chr(0b1001010 + 0o32) + chr(0b1100101))('\x75' + chr(116) + chr(0b10010 + 0o124) + chr(0b101101) + chr(0b100010 + 0o26))):
mJI8h1w8YmYz = hXMPsSrOQzbh._view.GUKetu4xaGsJ(FxZHtXEolYsL)
if mJI8h1w8YmYz is None:
return jpOn8DNZxbbx
for (hRTUxJgvuslu, CsodZJH6x9Tx) in roI3spqORKae(mJI8h1w8YmYz, roI3spqORKae(ES5oEprVxulp(b'\x98LU/O\xf6\xbe\xa9u\xe1\xb0\x8c'), '\x64' + '\x65' + chr(99) + chr(0b1101111) + '\x64' + chr(939 - 838))('\165' + chr(116) + chr(0b101101 + 0o71) + '\x2d' + '\x38'))():
if hRTUxJgvuslu in roI3spqORKae(jpOn8DNZxbbx, roI3spqORKae(ES5oEprVxulp(b'\x94 \x02\x0bY\xe5\xbf\xa8r\xda\x84\x95'), chr(0b11010 + 0o112) + '\x65' + chr(5360 - 5261) + '\x6f' + chr(0b1100100) + chr(3287 - 3186))(chr(0b1110101) + '\x74' + chr(102) + chr(0b1000 + 0o45) + chr(56))):
jpOn8DNZxbbx = jpOn8DNZxbbx[jpOn8DNZxbbx[hRTUxJgvuslu].isin(HZWJSKpSR9Qz(CsodZJH6x9Tx))]
return jpOn8DNZxbbx |
remix/partridge | partridge/gtfs.py | Feed._prune | def _prune(self, filename: str, df: pd.DataFrame) -> pd.DataFrame:
"""Depth-first search through the dependency graph
and prune dependent DataFrames along the way.
"""
dependencies = []
for _, depf, data in self._config.out_edges(filename, data=True):
deps = data.get("dependencies")
if deps is None:
msg = f"Edge missing `dependencies` attribute: {filename}->{depf}"
raise ValueError(msg)
dependencies.append((depf, deps))
if not dependencies:
return df
for depfile, column_pairs in dependencies:
# Read the filtered, cached file dependency
depdf = self.get(depfile)
for deps in column_pairs:
col = deps[filename]
depcol = deps[depfile]
# If applicable, prune this dataframe by the other
if col in df.columns and depcol in depdf.columns:
df = df[df[col].isin(depdf[depcol])]
return df | python | def _prune(self, filename: str, df: pd.DataFrame) -> pd.DataFrame:
"""Depth-first search through the dependency graph
and prune dependent DataFrames along the way.
"""
dependencies = []
for _, depf, data in self._config.out_edges(filename, data=True):
deps = data.get("dependencies")
if deps is None:
msg = f"Edge missing `dependencies` attribute: {filename}->{depf}"
raise ValueError(msg)
dependencies.append((depf, deps))
if not dependencies:
return df
for depfile, column_pairs in dependencies:
# Read the filtered, cached file dependency
depdf = self.get(depfile)
for deps in column_pairs:
col = deps[filename]
depcol = deps[depfile]
# If applicable, prune this dataframe by the other
if col in df.columns and depcol in depdf.columns:
df = df[df[col].isin(depdf[depcol])]
return df | [
"def",
"_prune",
"(",
"self",
",",
"filename",
":",
"str",
",",
"df",
":",
"pd",
".",
"DataFrame",
")",
"->",
"pd",
".",
"DataFrame",
":",
"dependencies",
"=",
"[",
"]",
"for",
"_",
",",
"depf",
",",
"data",
"in",
"self",
".",
"_config",
".",
"out_edges",
"(",
"filename",
",",
"data",
"=",
"True",
")",
":",
"deps",
"=",
"data",
".",
"get",
"(",
"\"dependencies\"",
")",
"if",
"deps",
"is",
"None",
":",
"msg",
"=",
"f\"Edge missing `dependencies` attribute: {filename}->{depf}\"",
"raise",
"ValueError",
"(",
"msg",
")",
"dependencies",
".",
"append",
"(",
"(",
"depf",
",",
"deps",
")",
")",
"if",
"not",
"dependencies",
":",
"return",
"df",
"for",
"depfile",
",",
"column_pairs",
"in",
"dependencies",
":",
"# Read the filtered, cached file dependency",
"depdf",
"=",
"self",
".",
"get",
"(",
"depfile",
")",
"for",
"deps",
"in",
"column_pairs",
":",
"col",
"=",
"deps",
"[",
"filename",
"]",
"depcol",
"=",
"deps",
"[",
"depfile",
"]",
"# If applicable, prune this dataframe by the other",
"if",
"col",
"in",
"df",
".",
"columns",
"and",
"depcol",
"in",
"depdf",
".",
"columns",
":",
"df",
"=",
"df",
"[",
"df",
"[",
"col",
"]",
".",
"isin",
"(",
"depdf",
"[",
"depcol",
"]",
")",
"]",
"return",
"df"
] | Depth-first search through the dependency graph
and prune dependent DataFrames along the way. | [
"Depth",
"-",
"first",
"search",
"through",
"the",
"dependency",
"graph",
"and",
"prune",
"dependent",
"DataFrames",
"along",
"the",
"way",
"."
] | 0ba80fa30035e5e09fd8d7a7bdf1f28b93d53d03 | https://github.com/remix/partridge/blob/0ba80fa30035e5e09fd8d7a7bdf1f28b93d53d03/partridge/gtfs.py#L127-L152 | train | Depth - first search through the dependency graph
and prune dependent DataFrames along the way. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgk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jnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\157' + chr(51) + '\x34' + '\061', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + '\061' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(506 - 458) + chr(0b1101111) + chr(173 - 124) + chr(54) + '\x34', 42167 - 42159), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + chr(0b110111) + '\067', 8206 - 8198), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(11819 - 11708) + '\x31' + chr(648 - 600) + chr(0b110110), 42868 - 42860), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(1595 - 1540) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(2302 - 2191) + '\x31' + chr(0b110100) + chr(53), 0o10), nzTpIcepk0o8('\060' + chr(8795 - 8684) + '\x33' + chr(0b110100) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(0b101 + 0o54) + '\067', 0o10), nzTpIcepk0o8('\x30' + chr(10151 - 10040) + chr(0b110011) + chr(955 - 900) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(7860 - 7749) + chr(0b110001) + '\065' + chr(53), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x36' + chr(508 - 460), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + '\060' + chr(0b110001 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(682 - 631) + chr(0b110100), 622 - 614), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101110 + 0o4) + '\x33' + chr(2058 - 2007), 32059 - 32051), nzTpIcepk0o8(chr(0b110000) + chr(0b110101 + 0o72) + chr(0b110001) + chr(50) + '\062', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(1584 - 1535) + '\x33' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1011 + 0o144) + chr(0b11001 + 0o31) + '\x36' + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + chr(9994 - 9883) + '\x32' + chr(1894 - 1844) + chr(0b1000 + 0o51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110 + 0o151) + chr(1918 - 1867) + chr(52) + '\064', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(0b110100) + chr(0b11100 + 0o26), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + '\060' + chr(51), 61227 - 61219), nzTpIcepk0o8('\060' + chr(3092 - 2981) + '\x31' + '\067', 0o10), nzTpIcepk0o8('\060' + '\157' + '\x37' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(450 - 402) + chr(0b1101111) + chr(0b10001 + 0o40) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1000000 + 0o57) + chr(49) + '\x37' + chr(0b110010 + 0o5), 8), nzTpIcepk0o8(chr(1262 - 1214) + '\x6f' + chr(51) + chr(2439 - 2386) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\067' + '\x32', 0b1000), nzTpIcepk0o8(chr(2271 - 2223) + chr(6166 - 6055) + chr(0b101001 + 0o11) + chr(927 - 874) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(5561 - 5450) + '\063' + '\062' + '\062', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\063' + '\060' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(251 - 203) + '\157' + chr(0b110011) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1011000 + 0o27) + chr(0b110001) + chr(0b101111 + 0o2) + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101001 + 0o10) + chr(517 - 467) + '\062', 8), nzTpIcepk0o8(chr(2255 - 2207) + chr(0b1101111) + chr(49) + '\062', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b111000 + 0o67) + '\x32' + '\063' + '\x34', 15246 - 15238), nzTpIcepk0o8('\060' + chr(111) + chr(1404 - 1353) + '\061', 48639 - 48631), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(5216 - 5105) + '\065' + chr(0b101100 + 0o10), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(111) + chr(0b110101) + chr(48), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xcf'), chr(9939 - 9839) + '\145' + chr(8393 - 8294) + '\x6f' + '\144' + '\145')(chr(0b1110101) + chr(0b110010 + 0o102) + chr(0b1001011 + 0o33) + chr(1704 - 1659) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def a3bKLxDweMov(hXMPsSrOQzbh, FxZHtXEolYsL, jpOn8DNZxbbx) -> roI3spqORKae(HLKt4sa1j9hm, roI3spqORKae(ES5oEprVxulp(b'\xa5\xaa\x00\x1e\x00\xcf\x04\x8e}'), chr(6591 - 6491) + chr(1835 - 1734) + chr(99) + chr(0b1101111) + chr(100) + chr(0b1010000 + 0o25))(chr(13140 - 13023) + '\x74' + '\x66' + chr(555 - 510) + chr(0b110000 + 0o10))):
TLXpkPYvRSxc = []
for (zIqcgNgQ9U6F, ZNjfG6vg8ayB, FfKOThdpoDTb) in roI3spqORKae(hXMPsSrOQzbh._config, roI3spqORKae(ES5oEprVxulp(b'\x8e\xbe\x00 #\xd9\x02\x86k'), chr(0b11 + 0o141) + chr(0b1100101) + chr(1643 - 1544) + chr(5119 - 5008) + chr(0b1011 + 0o131) + chr(3280 - 3179))(chr(0b1110101) + '\x74' + '\x66' + chr(45) + chr(1889 - 1833)))(FxZHtXEolYsL, data=nzTpIcepk0o8(chr(48) + chr(4979 - 4868) + '\x31', 36868 - 36860)):
WSXcLu3cX9iq = FfKOThdpoDTb.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'\x85\xae\x04\x1a(\xd9\x00\x8d{&\x9f\x1e'), '\x64' + chr(101) + chr(3486 - 3387) + chr(0b100000 + 0o117) + chr(0b1001001 + 0o33) + chr(0b101010 + 0o73))(chr(10973 - 10856) + chr(1327 - 1211) + chr(102) + '\x2d' + chr(0b111000)))
if WSXcLu3cX9iq is None:
sldzbHve8G1S = f'Edge missing `dependencies` attribute: {FxZHtXEolYsL}->{ZNjfG6vg8ayB}'
raise WbNHlDKpyPtQ(sldzbHve8G1S)
roI3spqORKae(TLXpkPYvRSxc, roI3spqORKae(ES5oEprVxulp(b'\xa9\x9f\'K>\xda"\x8cr \xafX'), chr(0b1100100) + '\x65' + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b1010100 + 0o41) + chr(9312 - 9196) + '\x66' + chr(992 - 947) + '\x38'))((ZNjfG6vg8ayB, WSXcLu3cX9iq))
if not TLXpkPYvRSxc:
return jpOn8DNZxbbx
for (Sdr9ajnD0Ou8, BoUFDziUtiv7) in TLXpkPYvRSxc:
RHc7_oft4PBn = hXMPsSrOQzbh.GUKetu4xaGsJ(Sdr9ajnD0Ou8)
for WSXcLu3cX9iq in BoUFDziUtiv7:
hRTUxJgvuslu = WSXcLu3cX9iq[FxZHtXEolYsL]
z8025cCq9q2A = WSXcLu3cX9iq[Sdr9ajnD0Ou8]
if hRTUxJgvuslu in roI3spqORKae(jpOn8DNZxbbx, roI3spqORKae(ES5oEprVxulp(b'\xb4\xf8M\x15\x15\xd4,\xd6,\x02\x96\x1d'), '\144' + chr(3024 - 2923) + chr(0b1000111 + 0o34) + '\x6f' + chr(100) + '\x65')(chr(0b11010 + 0o133) + chr(3420 - 3304) + chr(0b1100110) + '\055' + '\070')) and z8025cCq9q2A in roI3spqORKae(RHc7_oft4PBn, roI3spqORKae(ES5oEprVxulp(b'\xb4\xf8M\x15\x15\xd4,\xd6,\x02\x96\x1d'), chr(0b101100 + 0o70) + '\x65' + '\x63' + chr(0b1101111) + chr(0b111011 + 0o51) + '\x65')(chr(0b1110101) + chr(0b1110100) + '\146' + chr(0b101 + 0o50) + '\070')):
jpOn8DNZxbbx = jpOn8DNZxbbx[jpOn8DNZxbbx[hRTUxJgvuslu].isin(RHc7_oft4PBn[z8025cCq9q2A])]
return jpOn8DNZxbbx |
remix/partridge | partridge/gtfs.py | Feed._convert_types | def _convert_types(self, filename: str, df: pd.DataFrame) -> None:
"""
Apply type conversions
"""
if df.empty:
return
converters = self._config.nodes.get(filename, {}).get("converters", {})
for col, converter in converters.items():
if col in df.columns:
df[col] = converter(df[col]) | python | def _convert_types(self, filename: str, df: pd.DataFrame) -> None:
"""
Apply type conversions
"""
if df.empty:
return
converters = self._config.nodes.get(filename, {}).get("converters", {})
for col, converter in converters.items():
if col in df.columns:
df[col] = converter(df[col]) | [
"def",
"_convert_types",
"(",
"self",
",",
"filename",
":",
"str",
",",
"df",
":",
"pd",
".",
"DataFrame",
")",
"->",
"None",
":",
"if",
"df",
".",
"empty",
":",
"return",
"converters",
"=",
"self",
".",
"_config",
".",
"nodes",
".",
"get",
"(",
"filename",
",",
"{",
"}",
")",
".",
"get",
"(",
"\"converters\"",
",",
"{",
"}",
")",
"for",
"col",
",",
"converter",
"in",
"converters",
".",
"items",
"(",
")",
":",
"if",
"col",
"in",
"df",
".",
"columns",
":",
"df",
"[",
"col",
"]",
"=",
"converter",
"(",
"df",
"[",
"col",
"]",
")"
] | Apply type conversions | [
"Apply",
"type",
"conversions"
] | 0ba80fa30035e5e09fd8d7a7bdf1f28b93d53d03 | https://github.com/remix/partridge/blob/0ba80fa30035e5e09fd8d7a7bdf1f28b93d53d03/partridge/gtfs.py#L154-L164 | train | Apply type conversions to the given file. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWai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ahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(0b1101 + 0o52) + chr(956 - 905), 0o10), nzTpIcepk0o8('\x30' + chr(6289 - 6178) + chr(0b100110 + 0o15) + chr(54) + '\066', 8428 - 8420), nzTpIcepk0o8('\x30' + chr(0b1101 + 0o142) + '\x33' + chr(0b110110) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + '\x32' + chr(154 - 106) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2320 - 2271) + chr(855 - 802) + chr(2425 - 2374), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b101011 + 0o14) + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(1421 - 1370) + chr(1687 - 1639), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(2289 - 2237) + chr(139 - 89), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(0b110011) + chr(2867 - 2813), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x36' + chr(0b10110 + 0o32), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1 + 0o63) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b101100 + 0o103) + chr(49) + '\060' + chr(0b101110 + 0o2), 0o10), nzTpIcepk0o8('\x30' + chr(3943 - 3832) + chr(1764 - 1714) + chr(0b110111) + chr(2015 - 1960), 0o10), nzTpIcepk0o8('\060' + chr(11973 - 11862) + chr(106 - 57) + '\062' + '\064', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b101100 + 0o103) + '\061' + chr(0b110110) + chr(0b100000 + 0o21), 0b1000), nzTpIcepk0o8(chr(410 - 362) + chr(1203 - 1092) + chr(0b101100 + 0o5) + '\061' + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + '\063' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2767 - 2656) + chr(50) + chr(0b110010) + '\x32', 37727 - 37719), nzTpIcepk0o8('\060' + chr(6031 - 5920) + '\x31' + chr(2542 - 2491) + chr(55), 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(0b110010) + chr(55) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2311 - 2261) + chr(2579 - 2524) + chr(589 - 539), 8), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(1656 - 1605) + '\x32', 14369 - 14361), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b11101 + 0o122) + chr(166 - 117) + chr(50) + chr(383 - 332), ord("\x08")), nzTpIcepk0o8(chr(467 - 419) + chr(111) + chr(55) + chr(0b0 + 0o67), ord("\x08")), nzTpIcepk0o8('\060' + chr(8311 - 8200) + chr(0b110001) + '\061' + chr(1896 - 1842), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b11110 + 0o121) + chr(50) + chr(1120 - 1070) + chr(0b1001 + 0o53), 0b1000), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b1001 + 0o146) + chr(50) + chr(0b110000) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1011001 + 0o26) + '\063' + chr(49) + '\x31', 52749 - 52741), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(10474 - 10363) + '\065' + chr(48), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b110011) + chr(0b101110 + 0o11), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(493 - 444) + '\x37' + '\064', ord("\x08")), nzTpIcepk0o8(chr(1872 - 1824) + '\157' + '\x31' + '\063' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\x6f' + '\062' + chr(0b100111 + 0o15), 0b1000), nzTpIcepk0o8(chr(264 - 216) + '\x6f' + chr(448 - 395) + chr(2460 - 2406), 29215 - 29207), nzTpIcepk0o8('\060' + '\x6f' + '\x35' + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + '\067' + '\067', 8), nzTpIcepk0o8(chr(51 - 3) + chr(9152 - 9041) + '\062' + chr(1848 - 1798) + chr(2283 - 2235), 0o10), nzTpIcepk0o8(chr(2140 - 2092) + '\157' + chr(49) + '\x31' + chr(0b11000 + 0o33), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b111000 + 0o67) + chr(0b110111) + '\x36', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(0b1011 + 0o50), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(9054 - 8943) + chr(0b110101) + chr(0b110000), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd5'), chr(0b1001010 + 0o32) + chr(0b101011 + 0o72) + chr(6742 - 6643) + '\157' + chr(4600 - 4500) + chr(0b1011 + 0o132))(chr(0b1110101) + chr(0b1100001 + 0o23) + chr(0b1100110) + '\x2d' + chr(2696 - 2640)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def s2efiwIbRRZy(hXMPsSrOQzbh, FxZHtXEolYsL, jpOn8DNZxbbx) -> None:
if roI3spqORKae(jpOn8DNZxbbx, roI3spqORKae(ES5oEprVxulp(b'\xbe\xb3\x9b\xb6;N\xe1\x1a\xe8Js0'), '\x64' + chr(0b100000 + 0o105) + chr(0b1100011) + '\157' + '\144' + chr(9238 - 9137))(chr(0b1110101) + chr(0b1110100) + chr(4201 - 4099) + '\x2d' + '\070')):
return
v8kObWKu7iXG = hXMPsSrOQzbh._config.nodes.get(FxZHtXEolYsL, {}).GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'\x98\x99\x99\xf0\x0eN\xecG\xecC'), chr(0b1000000 + 0o44) + chr(0b1000110 + 0o37) + chr(0b1100011) + '\157' + chr(100) + chr(1503 - 1402))(chr(117) + chr(116) + chr(0b111101 + 0o51) + chr(1384 - 1339) + chr(0b111000)), {})
for (hRTUxJgvuslu, XN3nyasRXexS) in roI3spqORKae(v8kObWKu7iXG, roI3spqORKae(ES5oEprVxulp(b'\xa2\xa9\x99\xc8.F\xd0\x16\xadF\x7f)'), chr(100) + '\x65' + chr(0b1100011) + '\x6f' + chr(0b1100100) + '\145')('\165' + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(0b111000)))():
if hRTUxJgvuslu in roI3spqORKae(jpOn8DNZxbbx, roI3spqORKae(ES5oEprVxulp(b'\xae\xc5\xce\xec8U\xd1\x17\xaa}K0'), chr(100) + chr(1934 - 1833) + chr(0b1100011) + chr(12008 - 11897) + chr(0b1100011 + 0o1) + chr(0b111100 + 0o51))(chr(117) + chr(116) + chr(0b1100 + 0o132) + chr(589 - 544) + chr(81 - 25))):
jpOn8DNZxbbx[hRTUxJgvuslu] = XN3nyasRXexS(jpOn8DNZxbbx[hRTUxJgvuslu]) |
remix/partridge | partridge/config.py | reroot_graph | def reroot_graph(G: nx.DiGraph, node: str) -> nx.DiGraph:
"""Return a copy of the graph rooted at the given node"""
G = G.copy()
for n, successors in list(nx.bfs_successors(G, source=node)):
for s in successors:
G.add_edge(s, n, **G.edges[n, s])
G.remove_edge(n, s)
return G | python | def reroot_graph(G: nx.DiGraph, node: str) -> nx.DiGraph:
"""Return a copy of the graph rooted at the given node"""
G = G.copy()
for n, successors in list(nx.bfs_successors(G, source=node)):
for s in successors:
G.add_edge(s, n, **G.edges[n, s])
G.remove_edge(n, s)
return G | [
"def",
"reroot_graph",
"(",
"G",
":",
"nx",
".",
"DiGraph",
",",
"node",
":",
"str",
")",
"->",
"nx",
".",
"DiGraph",
":",
"G",
"=",
"G",
".",
"copy",
"(",
")",
"for",
"n",
",",
"successors",
"in",
"list",
"(",
"nx",
".",
"bfs_successors",
"(",
"G",
",",
"source",
"=",
"node",
")",
")",
":",
"for",
"s",
"in",
"successors",
":",
"G",
".",
"add_edge",
"(",
"s",
",",
"n",
",",
"*",
"*",
"G",
".",
"edges",
"[",
"n",
",",
"s",
"]",
")",
"G",
".",
"remove_edge",
"(",
"n",
",",
"s",
")",
"return",
"G"
] | Return a copy of the graph rooted at the given node | [
"Return",
"a",
"copy",
"of",
"the",
"graph",
"rooted",
"at",
"the",
"given",
"node"
] | 0ba80fa30035e5e09fd8d7a7bdf1f28b93d53d03 | https://github.com/remix/partridge/blob/0ba80fa30035e5e09fd8d7a7bdf1f28b93d53d03/partridge/config.py#L339-L346 | train | Return a copy of the graph rooted at the given node | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,s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,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(11531 - 11420) + '\061' + chr(0b10110 + 0o33) + chr(0b101 + 0o57), 0b1000), nzTpIcepk0o8('\060' + chr(0b110100 + 0o73) + chr(0b110010) + '\x31' + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(2105 - 2054) + chr(55) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(2709 - 2598) + '\x33' + chr(55) + chr(1660 - 1611), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(50) + '\x37' + chr(1595 - 1546), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + '\065', 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\x6f' + '\063' + '\x36' + '\x33', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(0b110010) + chr(1833 - 1781), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(55) + chr(55), 0o10), nzTpIcepk0o8(chr(1218 - 1170) + chr(0b1101111) + chr(2022 - 1971) + chr(49) + chr(53), 0b1000), nzTpIcepk0o8(chr(924 - 876) + chr(10387 - 10276) + '\062' + chr(0b110011) + chr(0b10110 + 0o32), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + '\062' + chr(588 - 535), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(10090 - 9979) + '\x32' + chr(0b101000 + 0o14) + chr(0b11010 + 0o31), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + '\x37' + chr(53), 8), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + '\067' + chr(0b11100 + 0o33), 8), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(111) + chr(0b1111 + 0o43) + '\x37' + '\061', 8), nzTpIcepk0o8('\060' + chr(11056 - 10945) + '\x32' + chr(0b101110 + 0o7) + chr(0b111 + 0o56), 56728 - 56720), nzTpIcepk0o8('\x30' + '\x6f' + chr(699 - 648) + chr(50) + chr(2220 - 2172), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1001100 + 0o43) + chr(51) + '\x33' + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1000001 + 0o56) + chr(2646 - 2593) + chr(2380 - 2331), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1001011 + 0o44) + '\x33' + chr(0b100001 + 0o17) + '\060', 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(509 - 398) + chr(0b110011) + '\063' + chr(53), 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(111) + '\x32' + chr(1480 - 1425) + chr(679 - 630), 8), nzTpIcepk0o8(chr(0b110000) + chr(6951 - 6840) + chr(0b10 + 0o61) + '\067' + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(1214 - 1103) + chr(0b110011) + chr(0b110000) + chr(0b100000 + 0o23), 0b1000), nzTpIcepk0o8(chr(1551 - 1503) + chr(0b1010100 + 0o33) + chr(0b10100 + 0o36) + chr(0b110111) + '\064', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110000 + 0o3) + chr(50) + chr(2054 - 2001), 8), nzTpIcepk0o8('\x30' + chr(0b1101010 + 0o5) + '\063' + chr(0b101011 + 0o7) + '\067', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b10100 + 0o35) + chr(0b110101), 8), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110111) + chr(0b110111), 8), nzTpIcepk0o8(chr(48) + chr(0b1011101 + 0o22) + chr(108 - 58) + '\x33' + chr(0b101000 + 0o12), 11365 - 11357), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + chr(0b11110 + 0o23) + chr(0b101100 + 0o5) + '\065', 0o10), nzTpIcepk0o8('\060' + chr(0b11 + 0o154) + '\x32' + chr(0b100101 + 0o21) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\061' + '\062' + chr(49), 49113 - 49105), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(53) + chr(0b11101 + 0o26), 0o10), nzTpIcepk0o8(chr(127 - 79) + chr(0b1101 + 0o142) + chr(826 - 776) + chr(0b110000) + chr(1358 - 1309), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1101 + 0o45) + chr(0b110110) + chr(0b1 + 0o65), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + '\x32' + '\067', 53496 - 53488)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\x6f' + chr(0b110101) + chr(238 - 190), 48178 - 48170)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'b'), '\144' + chr(0b11110 + 0o107) + '\x63' + chr(5172 - 5061) + '\144' + chr(7364 - 7263))(chr(117) + chr(0b1001 + 0o153) + '\x66' + chr(0b1011 + 0o42) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def MJ91JFAbKwJ0(lmLTjtHGkU5F, E9rx2AZiWGOm) -> roI3spqORKae(zKtrBMPw45Ns, roI3spqORKae(ES5oEprVxulp(b'\x08\xe3V\x8f\x98\xc9e'), chr(6108 - 6008) + chr(101) + '\143' + chr(111) + chr(1263 - 1163) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(45) + chr(0b111000))):
lmLTjtHGkU5F = lmLTjtHGkU5F.copy()
for (NoZxuO7wjArS, ybMOYlW6P0Ku) in H4NoA26ON7iG(roI3spqORKae(zKtrBMPw45Ns, roI3spqORKae(ES5oEprVxulp(b'.\xecb\xa2\x8a\xccn\x90\xb1L\xbe\xf7\xa7\xd0'), chr(100) + chr(101) + chr(0b1010100 + 0o17) + chr(9911 - 9800) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(3978 - 3862) + chr(0b1100110) + '\x2d' + chr(0b0 + 0o70)))(lmLTjtHGkU5F, source=E9rx2AZiWGOm)):
for PmE5_h409JAA in ybMOYlW6P0Ku:
roI3spqORKae(lmLTjtHGkU5F, roI3spqORKae(ES5oEprVxulp(b'-\xeeu\xa2\x9c\xddj\x96'), chr(0b1001010 + 0o32) + '\145' + chr(99) + '\x6f' + chr(0b1100100) + chr(0b1100101))('\x75' + '\164' + chr(102) + chr(594 - 549) + chr(0b111000)))(PmE5_h409JAA, NoZxuO7wjArS, **roI3spqORKae(lmLTjtHGkU5F, roI3spqORKae(ES5oEprVxulp(b'\x07\xdbA\x84\x8c\xfcz\x8a\xbar\xa1\xf2'), '\x64' + '\145' + chr(99) + '\x6f' + '\x64' + chr(101))('\165' + '\x74' + chr(0b1100110) + chr(1052 - 1007) + chr(937 - 881)))[NoZxuO7wjArS, PmE5_h409JAA])
roI3spqORKae(lmLTjtHGkU5F, roI3spqORKae(ES5oEprVxulp(b'>\xef|\x92\x8f\xdcR\x96\xb0X\xa8'), '\x64' + chr(0b1011011 + 0o12) + chr(99) + chr(0b1101111 + 0o0) + '\144' + chr(0b1100101))('\x75' + chr(0b1101010 + 0o12) + '\x66' + chr(1814 - 1769) + chr(0b111000)))(NoZxuO7wjArS, PmE5_h409JAA)
return lmLTjtHGkU5F |
remix/partridge | partridge/utilities.py | setwrap | def setwrap(value: Any) -> Set[str]:
"""
Returns a flattened and stringified set from the given object or iterable.
For use in public functions which accept argmuents or kwargs that can be
one object or a list of objects.
"""
return set(map(str, set(flatten([value])))) | python | def setwrap(value: Any) -> Set[str]:
"""
Returns a flattened and stringified set from the given object or iterable.
For use in public functions which accept argmuents or kwargs that can be
one object or a list of objects.
"""
return set(map(str, set(flatten([value])))) | [
"def",
"setwrap",
"(",
"value",
":",
"Any",
")",
"->",
"Set",
"[",
"str",
"]",
":",
"return",
"set",
"(",
"map",
"(",
"str",
",",
"set",
"(",
"flatten",
"(",
"[",
"value",
"]",
")",
")",
")",
")"
] | Returns a flattened and stringified set from the given object or iterable.
For use in public functions which accept argmuents or kwargs that can be
one object or a list of objects. | [
"Returns",
"a",
"flattened",
"and",
"stringified",
"set",
"from",
"the",
"given",
"object",
"or",
"iterable",
"."
] | 0ba80fa30035e5e09fd8d7a7bdf1f28b93d53d03 | https://github.com/remix/partridge/blob/0ba80fa30035e5e09fd8d7a7bdf1f28b93d53d03/partridge/utilities.py#L10-L17 | train | Returns a flattened and stringified set from the given object or iterable. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUm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lRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(0b100011 + 0o15) + '\061', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b1010 + 0o47) + '\065', 0o10), nzTpIcepk0o8(chr(679 - 631) + '\x6f' + chr(0b110001) + chr(55) + chr(0b1000 + 0o52), ord("\x08")), nzTpIcepk0o8(chr(1522 - 1474) + chr(0b1011000 + 0o27) + chr(0b110001 + 0o3) + chr(416 - 368), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(7274 - 7163) + chr(50) + chr(0b110011) + chr(2205 - 2155), 36524 - 36516), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(5902 - 5791) + chr(0b110011) + chr(51) + '\x35', 0b1000), nzTpIcepk0o8(chr(635 - 587) + chr(111) + chr(1860 - 1811) + chr(0b110000) + chr(1310 - 1260), 22614 - 22606), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(52) + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + chr(0b1100111 + 0o10) + chr(0b110001) + '\067' + chr(0b110 + 0o57), 0o10), nzTpIcepk0o8(chr(1089 - 1041) + chr(111) + chr(1073 - 1023) + chr(1431 - 1382) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110111) + '\x32', 62475 - 62467), nzTpIcepk0o8('\x30' + chr(0b1001010 + 0o45) + '\x33' + '\061' + chr(0b101001 + 0o7), 2501 - 2493), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b110111) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b11000 + 0o127) + chr(0b11 + 0o56) + chr(1803 - 1751) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(1532 - 1478), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1010111 + 0o30) + '\x32' + '\064' + chr(0b110101), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b10110 + 0o41) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\063' + '\x36' + chr(0b100101 + 0o17), 53756 - 53748), nzTpIcepk0o8(chr(1567 - 1519) + chr(0b1101111) + chr(51) + chr(0b110110) + '\060', 0b1000), nzTpIcepk0o8('\x30' + chr(515 - 404) + chr(0b11010 + 0o31) + chr(49) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1101111) + chr(0b110010) + chr(893 - 844) + chr(772 - 718), 8), nzTpIcepk0o8('\x30' + chr(0b11011 + 0o124) + chr(0b110010) + chr(1776 - 1727) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\157' + chr(0b110011) + '\x33' + '\060', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2181 - 2132) + chr(55) + '\060', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1100 + 0o143) + chr(50) + chr(1434 - 1380) + chr(55), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(582 - 529) + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101001 + 0o11) + '\x30' + chr(0b101011 + 0o7), 49164 - 49156), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b110101) + chr(1526 - 1476), 19404 - 19396), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(675 - 626) + '\061' + '\066', 0b1000), nzTpIcepk0o8('\x30' + chr(5532 - 5421) + chr(0b110010) + chr(1900 - 1848) + chr(1268 - 1216), 0b1000), nzTpIcepk0o8(chr(2108 - 2060) + chr(0b1011000 + 0o27) + '\x33' + chr(0b1001 + 0o54) + '\065', 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + chr(0b110111) + chr(0b110100), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(0b11110 + 0o31) + chr(0b110000), 8), nzTpIcepk0o8('\x30' + chr(0b1101001 + 0o6) + chr(2337 - 2286) + chr(48) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(3846 - 3735) + chr(54) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b110110) + chr(2383 - 2332), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2077 - 1966) + chr(50) + chr(1524 - 1469) + chr(0b11100 + 0o26), 0b1000), nzTpIcepk0o8('\060' + chr(0b111 + 0o150) + chr(0b110010) + chr(52) + '\x30', 0b1000), nzTpIcepk0o8('\x30' + chr(9880 - 9769) + '\062' + '\060' + chr(158 - 104), 0b1000), nzTpIcepk0o8(chr(2007 - 1959) + chr(0b101110 + 0o101) + chr(49) + chr(50) + chr(0b10001 + 0o40), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\x6f' + '\065' + chr(0b100000 + 0o20), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'o'), '\x64' + chr(0b1100101) + chr(2853 - 2754) + '\157' + chr(8181 - 8081) + '\145')(chr(0b1001110 + 0o47) + chr(116) + chr(0b1100110) + '\x2d' + chr(0b100001 + 0o27)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def HZWJSKpSR9Qz(uV9iBiw0y_Mp) -> T_8B2ThmwkA1[N9zlRy29S1SS]:
return Bvi71nNyvlqO(VVP82lOIz6CD(N9zlRy29S1SS, Bvi71nNyvlqO(wozqDwllRa_T([uV9iBiw0y_Mp])))) |
remix/partridge | partridge/utilities.py | remove_node_attributes | def remove_node_attributes(G: nx.DiGraph, attributes: Union[str, Iterable[str]]):
"""
Return a copy of the graph with the given attributes
deleted from all nodes.
"""
G = G.copy()
for _, data in G.nodes(data=True):
for attribute in setwrap(attributes):
if attribute in data:
del data[attribute]
return G | python | def remove_node_attributes(G: nx.DiGraph, attributes: Union[str, Iterable[str]]):
"""
Return a copy of the graph with the given attributes
deleted from all nodes.
"""
G = G.copy()
for _, data in G.nodes(data=True):
for attribute in setwrap(attributes):
if attribute in data:
del data[attribute]
return G | [
"def",
"remove_node_attributes",
"(",
"G",
":",
"nx",
".",
"DiGraph",
",",
"attributes",
":",
"Union",
"[",
"str",
",",
"Iterable",
"[",
"str",
"]",
"]",
")",
":",
"G",
"=",
"G",
".",
"copy",
"(",
")",
"for",
"_",
",",
"data",
"in",
"G",
".",
"nodes",
"(",
"data",
"=",
"True",
")",
":",
"for",
"attribute",
"in",
"setwrap",
"(",
"attributes",
")",
":",
"if",
"attribute",
"in",
"data",
":",
"del",
"data",
"[",
"attribute",
"]",
"return",
"G"
] | Return a copy of the graph with the given attributes
deleted from all nodes. | [
"Return",
"a",
"copy",
"of",
"the",
"graph",
"with",
"the",
"given",
"attributes",
"deleted",
"from",
"all",
"nodes",
"."
] | 0ba80fa30035e5e09fd8d7a7bdf1f28b93d53d03 | https://github.com/remix/partridge/blob/0ba80fa30035e5e09fd8d7a7bdf1f28b93d53d03/partridge/utilities.py#L20-L30 | train | Returns a copy of the graph with the given attributes deleted from all nodes. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT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,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(3715 - 3604) + chr(0b100111 + 0o14) + chr(53) + '\x32', 2517 - 2509), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1328 - 1277) + '\063' + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11100 + 0o25) + chr(1403 - 1352), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b110010) + '\064', ord("\x08")), nzTpIcepk0o8(chr(798 - 750) + chr(0b1101111) + '\063' + chr(0b1110 + 0o47) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(0b110010) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1001110 + 0o41) + '\x31' + chr(344 - 295) + chr(52), 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + chr(0b110110) + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(9422 - 9311) + '\062' + chr(0b100011 + 0o15) + chr(1324 - 1274), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b11100 + 0o123) + chr(428 - 379) + chr(51) + chr(1253 - 1203), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1010000 + 0o37) + chr(49) + chr(0b110000) + chr(978 - 928), 0o10), nzTpIcepk0o8(chr(48) + chr(4978 - 4867) + chr(0b110101) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\157' + chr(0b110011) + chr(2247 - 2197) + chr(1303 - 1250), ord("\x08")), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + chr(0b110011) + '\x33' + '\065', 35473 - 35465), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(48), 12456 - 12448), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(457 - 408) + chr(54) + chr(0b10011 + 0o42), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(51) + '\x34' + chr(1880 - 1829), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101111 + 0o4) + chr(49) + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(3812 - 3701) + chr(0b10011 + 0o37) + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b101001 + 0o12) + chr(0b110110) + chr(0b1111 + 0o42), 0o10), nzTpIcepk0o8(chr(663 - 615) + '\x6f' + chr(0b110011) + chr(0b110010) + '\066', 0o10), nzTpIcepk0o8(chr(590 - 542) + chr(0b1101111) + '\061' + chr(0b110110) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(110 - 61) + '\065' + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + chr(6974 - 6863) + '\x36' + chr(50), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\065' + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\x6f' + '\x33' + '\x37' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062', 56555 - 56547), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + chr(0b10100 + 0o43) + '\x31', 43720 - 43712), nzTpIcepk0o8(chr(1520 - 1472) + '\157' + '\x33' + '\065' + chr(547 - 499), 8), nzTpIcepk0o8('\x30' + chr(2681 - 2570) + chr(2828 - 2773) + chr(924 - 876), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(552 - 497) + chr(50), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + '\063' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101010 + 0o5) + '\x32' + chr(51) + '\x34', 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(9583 - 9472) + '\x32' + chr(0b111 + 0o51) + chr(53), 0b1000), nzTpIcepk0o8('\060' + chr(9316 - 9205) + chr(0b11010 + 0o30) + '\x33' + chr(74 - 26), 59031 - 59023), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(812 - 763) + chr(48) + chr(48), 0b1000), nzTpIcepk0o8('\x30' + chr(6782 - 6671) + chr(50) + '\x36' + chr(0b11001 + 0o31), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(54) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(0b110111) + '\x34', 0o10), nzTpIcepk0o8('\060' + chr(0b10100 + 0o133) + chr(1916 - 1866) + chr(0b100111 + 0o20) + chr(1856 - 1804), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b10011 + 0o134) + '\x35' + chr(0b1111 + 0o41), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc4'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(7926 - 7826) + chr(0b1100101))('\165' + '\164' + chr(0b1100110) + chr(609 - 564) + chr(0b11111 + 0o31)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def LgBxdsommAZE(lmLTjtHGkU5F, L1bW0NdD70xD):
lmLTjtHGkU5F = lmLTjtHGkU5F.copy()
for (zIqcgNgQ9U6F, FfKOThdpoDTb) in roI3spqORKae(lmLTjtHGkU5F, roI3spqORKae(ES5oEprVxulp(b"\xa8\xecZ\xad\xa1\x9e\x00v\xe8\x14'G"), '\144' + chr(0b1100000 + 0o5) + chr(0b1001100 + 0o27) + '\157' + chr(0b110111 + 0o55) + '\145')(chr(0b1110101) + chr(0b1100010 + 0o22) + '\146' + chr(0b100000 + 0o15) + chr(2254 - 2198)))(data=nzTpIcepk0o8(chr(48) + chr(9400 - 9289) + '\x31', 0o10)):
for UE73UGWutV62 in HZWJSKpSR9Qz(L1bW0NdD70xD):
if UE73UGWutV62 in FfKOThdpoDTb:
del FfKOThdpoDTb[UE73UGWutV62]
return lmLTjtHGkU5F |
ciena/afkak | afkak/_util.py | _coerce_topic | def _coerce_topic(topic):
"""
Ensure that the topic name is text string of a valid length.
:param topic: Kafka topic name. Valid characters are in the set ``[a-zA-Z0-9._-]``.
:raises ValueError: when the topic name exceeds 249 bytes
:raises TypeError: when the topic is not :class:`unicode` or :class:`str`
"""
if not isinstance(topic, string_types):
raise TypeError('topic={!r} must be text'.format(topic))
if not isinstance(topic, text_type):
topic = topic.decode('ascii')
if len(topic) < 1:
raise ValueError('invalid empty topic name')
if len(topic) > 249:
raise ValueError('topic={!r} name is too long: {} > 249'.format(
topic, len(topic)))
return topic | python | def _coerce_topic(topic):
"""
Ensure that the topic name is text string of a valid length.
:param topic: Kafka topic name. Valid characters are in the set ``[a-zA-Z0-9._-]``.
:raises ValueError: when the topic name exceeds 249 bytes
:raises TypeError: when the topic is not :class:`unicode` or :class:`str`
"""
if not isinstance(topic, string_types):
raise TypeError('topic={!r} must be text'.format(topic))
if not isinstance(topic, text_type):
topic = topic.decode('ascii')
if len(topic) < 1:
raise ValueError('invalid empty topic name')
if len(topic) > 249:
raise ValueError('topic={!r} name is too long: {} > 249'.format(
topic, len(topic)))
return topic | [
"def",
"_coerce_topic",
"(",
"topic",
")",
":",
"if",
"not",
"isinstance",
"(",
"topic",
",",
"string_types",
")",
":",
"raise",
"TypeError",
"(",
"'topic={!r} must be text'",
".",
"format",
"(",
"topic",
")",
")",
"if",
"not",
"isinstance",
"(",
"topic",
",",
"text_type",
")",
":",
"topic",
"=",
"topic",
".",
"decode",
"(",
"'ascii'",
")",
"if",
"len",
"(",
"topic",
")",
"<",
"1",
":",
"raise",
"ValueError",
"(",
"'invalid empty topic name'",
")",
"if",
"len",
"(",
"topic",
")",
">",
"249",
":",
"raise",
"ValueError",
"(",
"'topic={!r} name is too long: {} > 249'",
".",
"format",
"(",
"topic",
",",
"len",
"(",
"topic",
")",
")",
")",
"return",
"topic"
] | Ensure that the topic name is text string of a valid length.
:param topic: Kafka topic name. Valid characters are in the set ``[a-zA-Z0-9._-]``.
:raises ValueError: when the topic name exceeds 249 bytes
:raises TypeError: when the topic is not :class:`unicode` or :class:`str` | [
"Ensure",
"that",
"the",
"topic",
"name",
"is",
"text",
"string",
"of",
"a",
"valid",
"length",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/_util.py#L27-L44 | train | Coerce a topic name into a sequence of bytes. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZby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IpFeYozM,MdkNqd1bagO6,QNQS9e6tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1372 - 1324) + chr(12225 - 12114) + '\062' + '\064' + chr(1358 - 1303), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(0b110101) + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(1271 - 1221) + chr(0b110001) + chr(0b101010 + 0o11), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(1565 - 1515) + chr(1914 - 1860) + chr(1169 - 1116), ord("\x08")), nzTpIcepk0o8(chr(2111 - 2063) + '\x6f' + '\062' + '\x32' + chr(0b110010), 43394 - 43386), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(8255 - 8144) + '\x33' + '\x36' + chr(1393 - 1343), 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + chr(0b110100) + chr(83 - 28), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011 + 0o0) + chr(0b101011 + 0o10) + '\067', 39207 - 39199), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(0b110001) + chr(0b11001 + 0o35), 39173 - 39165), nzTpIcepk0o8(chr(1195 - 1147) + chr(111) + chr(629 - 580) + chr(0b110000) + chr(2342 - 2291), 5692 - 5684), nzTpIcepk0o8(chr(48) + chr(0b1000101 + 0o52) + '\x31' + chr(0b110011) + chr(0b110010), 25487 - 25479), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2152 - 2102) + '\x32', 39247 - 39239), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + '\x35' + chr(54), 39708 - 39700), nzTpIcepk0o8('\x30' + chr(1454 - 1343) + chr(51) + chr(48) + chr(940 - 886), ord("\x08")), nzTpIcepk0o8('\x30' + chr(7576 - 7465) + chr(2049 - 1999) + chr(55), 0b1000), nzTpIcepk0o8(chr(2156 - 2108) + '\157' + chr(0b110010) + chr(53) + '\061', 0o10), nzTpIcepk0o8('\x30' + chr(0b110000 + 0o77) + '\066' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + '\063' + chr(48) + chr(55), 52482 - 52474), nzTpIcepk0o8(chr(811 - 763) + chr(7603 - 7492) + '\061' + '\065' + '\061', 0o10), nzTpIcepk0o8(chr(2271 - 2223) + chr(0b1101111) + chr(0b10010 + 0o37) + chr(0b110011) + chr(1675 - 1621), 0o10), nzTpIcepk0o8(chr(1084 - 1036) + chr(111) + '\x32' + '\064' + '\067', 8), nzTpIcepk0o8(chr(48) + chr(5784 - 5673) + '\062' + '\060' + chr(221 - 167), 28507 - 28499), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(0b110111) + chr(49), 0o10), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\157' + chr(0b1111 + 0o42) + chr(1556 - 1508) + chr(218 - 167), 8), nzTpIcepk0o8('\x30' + chr(0b100101 + 0o112) + '\065', 31841 - 31833), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100001 + 0o20) + chr(51), 0o10), nzTpIcepk0o8(chr(664 - 616) + chr(0b111110 + 0o61) + chr(0b10 + 0o61) + chr(52) + chr(52), 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + '\061' + chr(2000 - 1945) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1144 - 1095) + '\063' + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(54) + chr(0b10001 + 0o43), 26880 - 26872), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b110100) + chr(0b110111), 8), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + chr(51) + chr(55), 8), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(0b110111) + '\x36', 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(9609 - 9498) + chr(0b110010 + 0o1) + chr(0b101000 + 0o10), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(0b101001 + 0o7) + '\062', 0b1000), nzTpIcepk0o8(chr(48) + chr(7495 - 7384) + '\x34' + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1100100 + 0o13) + chr(0b11100 + 0o27) + chr(0b110000) + '\066', 8), nzTpIcepk0o8(chr(641 - 593) + '\157' + '\x32' + '\064' + chr(0b1100 + 0o46), 42526 - 42518), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1001 + 0o50) + chr(0b100001 + 0o20) + '\060', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(55) + '\x31', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(11235 - 11124) + chr(0b110101) + '\x30', 31958 - 31950)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x89'), chr(0b1100100) + chr(1050 - 949) + chr(1483 - 1384) + chr(111) + '\x64' + '\145')(chr(0b1110101) + '\164' + chr(7571 - 7469) + chr(0b100 + 0o51) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def xp7x5NJ9xoUC(eddDFOEFy2dH):
if not suIjIS24Zkqw(eddDFOEFy2dH, Q9V5WOaImAwl):
raise jZIjKu8IFANs(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xd3\x81\xfb\xdc\xf1\xcf\\\xfe\xbc>z\x7f\xdb\xb5c\x89S\xa2I*\xc2\xfe\r'), chr(0b1110 + 0o126) + '\145' + '\143' + '\x6f' + chr(100) + chr(0b1100101))(chr(0b1011100 + 0o31) + chr(9354 - 9238) + chr(5675 - 5573) + '\055' + chr(2915 - 2859)), roI3spqORKae(ES5oEprVxulp(b'\xd6\xdd\xb8\xfe\xd5\xc1A\xb0\x9f\x1c\x19X'), chr(100) + '\145' + chr(0b1100011) + '\157' + chr(0b1100100) + chr(0b101110 + 0o67))('\x75' + chr(0b1100111 + 0o15) + chr(0b1100110) + chr(0b110 + 0o47) + chr(56)))(eddDFOEFy2dH))
if not suIjIS24Zkqw(eddDFOEFy2dH, H8p5T_wwctMA):
eddDFOEFy2dH = eddDFOEFy2dH.lfbFsdWlT3MB(roI3spqORKae(ES5oEprVxulp(b'\xc6\x9d\xe8\xdc\xfb'), chr(7160 - 7060) + '\145' + '\143' + chr(0b11110 + 0o121) + '\144' + '\145')(chr(0b1101 + 0o150) + '\164' + chr(102) + chr(62 - 17) + '\070'))
if ftfygxgFas5X(eddDFOEFy2dH) < nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 28279 - 28271):
raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xce\x80\xfd\xd4\xfe\x9bC\xff\xab.*f\xd7\xe6c\xc6A\xae\n~\xc9\xe7\x14&'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(100) + chr(7189 - 7088))('\x75' + chr(116) + '\x66' + '\055' + '\x38'))
if ftfygxgFas5X(eddDFOEFy2dH) > nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(55) + chr(0b110001), 8):
raise WbNHlDKpyPtQ(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xd3\x81\xfb\xdc\xf1\xcf\\\xfe\xbc>z|\xcf\xabr\x89X\xb4I*\xc8\xe9Y/je\x83@\x7f\x0f\xda\xff@8\xf0\x12\xff'), chr(100) + chr(0b1100101) + '\x63' + '\x6f' + chr(4488 - 4388) + '\145')(chr(117) + '\x74' + '\146' + chr(0b101101) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xd6\xdd\xb8\xfe\xd5\xc1A\xb0\x9f\x1c\x19X'), chr(100) + chr(101) + chr(0b111011 + 0o50) + chr(0b1101111) + '\144' + '\x65')('\165' + '\x74' + chr(0b1011011 + 0o13) + chr(1104 - 1059) + chr(2393 - 2337)))(eddDFOEFy2dH, ftfygxgFas5X(eddDFOEFy2dH)))
return eddDFOEFy2dH |
ciena/afkak | afkak/_util.py | _coerce_consumer_group | def _coerce_consumer_group(consumer_group):
"""
Ensure that the consumer group is a text string.
:param consumer_group: :class:`bytes` or :class:`str` instance
:raises TypeError: when `consumer_group` is not :class:`bytes`
or :class:`str`
"""
if not isinstance(consumer_group, string_types):
raise TypeError('consumer_group={!r} must be text'.format(consumer_group))
if not isinstance(consumer_group, text_type):
consumer_group = consumer_group.decode('utf-8')
return consumer_group | python | def _coerce_consumer_group(consumer_group):
"""
Ensure that the consumer group is a text string.
:param consumer_group: :class:`bytes` or :class:`str` instance
:raises TypeError: when `consumer_group` is not :class:`bytes`
or :class:`str`
"""
if not isinstance(consumer_group, string_types):
raise TypeError('consumer_group={!r} must be text'.format(consumer_group))
if not isinstance(consumer_group, text_type):
consumer_group = consumer_group.decode('utf-8')
return consumer_group | [
"def",
"_coerce_consumer_group",
"(",
"consumer_group",
")",
":",
"if",
"not",
"isinstance",
"(",
"consumer_group",
",",
"string_types",
")",
":",
"raise",
"TypeError",
"(",
"'consumer_group={!r} must be text'",
".",
"format",
"(",
"consumer_group",
")",
")",
"if",
"not",
"isinstance",
"(",
"consumer_group",
",",
"text_type",
")",
":",
"consumer_group",
"=",
"consumer_group",
".",
"decode",
"(",
"'utf-8'",
")",
"return",
"consumer_group"
] | Ensure that the consumer group is a text string.
:param consumer_group: :class:`bytes` or :class:`str` instance
:raises TypeError: when `consumer_group` is not :class:`bytes`
or :class:`str` | [
"Ensure",
"that",
"the",
"consumer",
"group",
"is",
"a",
"text",
"string",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/_util.py#L47-L59 | train | Ensures that the consumer group is a text string. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx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V_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\157' + chr(186 - 136) + '\062' + chr(0b0 + 0o60), 62608 - 62600), nzTpIcepk0o8(chr(48) + '\157' + chr(1232 - 1178) + chr(0b100001 + 0o17), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(2391 - 2342) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(8289 - 8178) + chr(50) + '\x32' + chr(0b10000 + 0o47), ord("\x08")), nzTpIcepk0o8(chr(142 - 94) + '\157' + '\063' + '\x34', 0o10), nzTpIcepk0o8('\060' + chr(9019 - 8908) + chr(49) + chr(55) + chr(309 - 261), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\063' + '\066' + chr(53), 0b1000), nzTpIcepk0o8('\060' + chr(0b111011 + 0o64) + '\063' + chr(0b11010 + 0o33) + chr(48), 0b1000), nzTpIcepk0o8('\060' + chr(0b1100100 + 0o13) + '\061' + chr(2017 - 1965) + '\x37', 21400 - 21392), nzTpIcepk0o8('\x30' + chr(4664 - 4553) + chr(51) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(1291 - 1243) + chr(0b111000 + 0o67) + chr(0b110011) + chr(0b101011 + 0o10) + '\x34', 56337 - 56329), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + '\063' + chr(0b110000) + chr(0b110000), 0b1000), nzTpIcepk0o8('\060' + chr(2904 - 2793) + chr(0b110010) + chr(0b110001) + chr(210 - 158), 8), nzTpIcepk0o8('\x30' + chr(0b1101 + 0o142) + chr(51) + chr(50) + chr(52), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b1010 + 0o47) + chr(1384 - 1336) + '\x37', 1159 - 1151), nzTpIcepk0o8(chr(0b110000) + chr(9481 - 9370) + '\062' + chr(0b110011) + '\x35', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b11101 + 0o26) + chr(0b110100) + chr(0b110100), 65262 - 65254), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1011 + 0o47) + chr(0b11 + 0o60), 1130 - 1122), nzTpIcepk0o8('\x30' + chr(9282 - 9171) + '\x34' + chr(0b111 + 0o60), 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + chr(50) + chr(55) + chr(0b1000 + 0o52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(0b110011 + 0o0) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1100001 + 0o16) + chr(0b110100) + chr(52), 0o10), nzTpIcepk0o8(chr(1185 - 1137) + '\x6f' + chr(0b110010) + '\061' + '\066', 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b101000 + 0o107) + chr(50) + chr(0b100001 + 0o26) + chr(0b110 + 0o53), 24618 - 24610), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + '\x33' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(70 - 22) + '\x6f' + chr(543 - 494) + chr(0b110011) + chr(0b100001 + 0o24), 34062 - 34054), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(0b10100 + 0o41) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x30', 0b1000), nzTpIcepk0o8(chr(614 - 566) + chr(0b1011111 + 0o20) + '\062' + chr(55) + chr(52), 48672 - 48664), nzTpIcepk0o8(chr(48) + '\157' + chr(1556 - 1505) + chr(1295 - 1246) + '\064', 0b1000), nzTpIcepk0o8('\060' + chr(0b110010 + 0o75) + chr(50) + chr(0b1000 + 0o56) + chr(55), 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b110010 + 0o75) + chr(0b110 + 0o53) + '\x30' + '\064', 47476 - 47468), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1001 + 0o50) + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(643 - 532) + chr(0b110010 + 0o0) + chr(0b110000 + 0o6) + chr(48), 46326 - 46318), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1553 - 1503) + '\063' + chr(0b110101), 8), nzTpIcepk0o8(chr(48) + chr(0b111 + 0o150) + chr(1758 - 1709) + '\067' + chr(2098 - 2048), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(49) + chr(2181 - 2127) + chr(0b11001 + 0o31), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101000 + 0o7) + chr(0b110011) + chr(50) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(1200 - 1152) + chr(8263 - 8152) + chr(0b110001) + chr(0b1010 + 0o47) + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b111110 + 0o61) + chr(49) + chr(50) + '\063', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101001 + 0o14) + chr(0b11110 + 0o22), 44552 - 44544)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbe'), chr(0b111110 + 0o46) + chr(0b1010100 + 0o21) + '\143' + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(8801 - 8684) + chr(4337 - 4221) + chr(102) + chr(0b100101 + 0o10) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def LEwRoK6l6REM(ZkSgBEVcLeGM):
if not suIjIS24Zkqw(ZkSgBEVcLeGM, Q9V5WOaImAwl):
raise jZIjKu8IFANs(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xf3_\xe2\xe4i\x15\x90\x9a8x\xae\xaf\xf9\xa4z\xe6\xc5aZ\x9a\xb0Q\xfd\xcd{?\x0f \xc8\xa9\xcf0'), '\144' + chr(0b1000111 + 0o36) + chr(99) + chr(111) + chr(0b1100100) + chr(0b11000 + 0o115))(chr(0b10 + 0o163) + chr(0b1110100) + chr(0b1100110) + chr(1303 - 1258) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xe1\x03\xbf\xdc[K\x93\x876@\x9f\x8a'), '\144' + chr(7456 - 7355) + '\x63' + chr(0b1101111) + chr(0b1100100) + '\145')('\x75' + chr(116) + '\x66' + chr(0b100101 + 0o10) + chr(532 - 476)))(ZkSgBEVcLeGM))
if not suIjIS24Zkqw(ZkSgBEVcLeGM, H8p5T_wwctMA):
ZkSgBEVcLeGM = ZkSgBEVcLeGM.lfbFsdWlT3MB(roI3spqORKae(ES5oEprVxulp(b'\xe5D\xea\xba$'), '\x64' + chr(0b10111 + 0o116) + '\x63' + '\x6f' + chr(0b1100100) + chr(3374 - 3273))(chr(0b1110101) + '\164' + chr(7773 - 7671) + '\x2d' + chr(0b111000)))
return ZkSgBEVcLeGM |
ciena/afkak | afkak/_util.py | _coerce_client_id | def _coerce_client_id(client_id):
"""
Ensure the provided client ID is a byte string. If a text string is
provided, it is encoded as UTF-8 bytes.
:param client_id: :class:`bytes` or :class:`str` instance
"""
if isinstance(client_id, type(u'')):
client_id = client_id.encode('utf-8')
if not isinstance(client_id, bytes):
raise TypeError('{!r} is not a valid consumer group (must be'
' str or bytes)'.format(client_id))
return client_id | python | def _coerce_client_id(client_id):
"""
Ensure the provided client ID is a byte string. If a text string is
provided, it is encoded as UTF-8 bytes.
:param client_id: :class:`bytes` or :class:`str` instance
"""
if isinstance(client_id, type(u'')):
client_id = client_id.encode('utf-8')
if not isinstance(client_id, bytes):
raise TypeError('{!r} is not a valid consumer group (must be'
' str or bytes)'.format(client_id))
return client_id | [
"def",
"_coerce_client_id",
"(",
"client_id",
")",
":",
"if",
"isinstance",
"(",
"client_id",
",",
"type",
"(",
"u''",
")",
")",
":",
"client_id",
"=",
"client_id",
".",
"encode",
"(",
"'utf-8'",
")",
"if",
"not",
"isinstance",
"(",
"client_id",
",",
"bytes",
")",
":",
"raise",
"TypeError",
"(",
"'{!r} is not a valid consumer group (must be'",
"' str or bytes)'",
".",
"format",
"(",
"client_id",
")",
")",
"return",
"client_id"
] | Ensure the provided client ID is a byte string. If a text string is
provided, it is encoded as UTF-8 bytes.
:param client_id: :class:`bytes` or :class:`str` instance | [
"Ensure",
"the",
"provided",
"client",
"ID",
"is",
"a",
"byte",
"string",
".",
"If",
"a",
"text",
"string",
"is",
"provided",
"it",
"is",
"encoded",
"as",
"UTF",
"-",
"8",
"bytes",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/_util.py#L62-L74 | train | Coerce the provided client ID to a byte string. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9y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ingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(2945 - 2834) + chr(0b110011) + chr(2124 - 2072) + chr(2530 - 2476), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\x34' + chr(2284 - 2236), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100 + 0o153) + chr(0b110011) + chr(2091 - 2036) + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b11101 + 0o122) + chr(51) + chr(0b10 + 0o57) + chr(585 - 536), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + chr(0b110101) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(1611 - 1563) + chr(0b1101111) + chr(0b100 + 0o55) + chr(859 - 809) + chr(1315 - 1263), 38875 - 38867), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + '\x35' + '\065', 0b1000), nzTpIcepk0o8(chr(244 - 196) + '\x6f' + chr(0b110011) + chr(0b110110) + chr(2057 - 2005), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062', ord("\x08")), nzTpIcepk0o8(chr(471 - 423) + '\x6f' + chr(0b11101 + 0o30) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + chr(1467 - 1414) + chr(0b10101 + 0o42), 59550 - 59542), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(1666 - 1618) + '\x36', 0b1000), nzTpIcepk0o8(chr(445 - 397) + chr(111) + '\061' + chr(0b110101) + chr(51), 10887 - 10879), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(9894 - 9783) + '\065' + '\x34', 57176 - 57168), nzTpIcepk0o8('\060' + chr(0b1000 + 0o147) + '\x31' + chr(0b11100 + 0o26) + chr(0b10011 + 0o36), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(0b110011) + '\x35', 23223 - 23215), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(0b110000) + chr(49), 32297 - 32289), nzTpIcepk0o8('\060' + chr(0b10010 + 0o135) + '\063' + '\064' + '\x31', 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(111) + '\061' + chr(0b110011) + '\064', ord("\x08")), nzTpIcepk0o8(chr(1694 - 1646) + chr(111) + chr(51) + chr(0b10111 + 0o35), 63295 - 63287), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + '\x31' + '\x33', 20839 - 20831), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(0b11 + 0o61) + chr(0b1101 + 0o47), 0b1000), nzTpIcepk0o8('\x30' + chr(3875 - 3764) + chr(0b100100 + 0o17) + chr(694 - 643) + chr(0b100100 + 0o17), 29437 - 29429), nzTpIcepk0o8('\x30' + chr(1961 - 1850) + chr(0b101000 + 0o16) + chr(0b101011 + 0o6), 19469 - 19461), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + '\x36' + '\x37', 11403 - 11395), nzTpIcepk0o8(chr(1273 - 1225) + chr(111) + chr(50) + '\x37' + '\x37', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(0b1000 + 0o50) + chr(1451 - 1402), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101101 + 0o5) + chr(54) + chr(0b110101), 50694 - 50686), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + chr(48) + chr(0b101000 + 0o12), 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(111) + chr(1877 - 1827) + chr(0b1110 + 0o44) + chr(55), 16957 - 16949), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(1028 - 976) + chr(2334 - 2281), 65304 - 65296), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\x6f' + chr(50) + chr(0b110110 + 0o0) + chr(0b1100 + 0o51), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(1338 - 1286) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(10789 - 10678) + chr(49) + chr(0b110110) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b110001 + 0o76) + '\063' + chr(55) + '\064', 10268 - 10260), nzTpIcepk0o8('\x30' + '\157' + chr(51) + chr(0b1100 + 0o47) + '\062', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(7331 - 7220) + '\063' + chr(50) + chr(0b100101 + 0o15), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b10001 + 0o136) + chr(49) + chr(50) + chr(53), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(2503 - 2452) + '\065' + '\x37', 0b1000), nzTpIcepk0o8('\x30' + chr(4539 - 4428) + '\x33' + chr(0b110111) + chr(0b101111 + 0o3), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1000010 + 0o55) + chr(0b10110 + 0o37) + chr(1971 - 1923), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc8'), '\144' + chr(2528 - 2427) + chr(0b1100011) + '\x6f' + chr(0b10111 + 0o115) + chr(5047 - 4946))('\165' + chr(0b10110 + 0o136) + '\146' + chr(0b101101) + chr(0b110011 + 0o5)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def zlu0zmhNK7Ic(r_cosW25WDG1):
if suIjIS24Zkqw(r_cosW25WDG1, MJ07XsN5uFgW(roI3spqORKae(ES5oEprVxulp(b''), chr(0b1100010 + 0o2) + '\145' + chr(0b10101 + 0o116) + chr(111) + '\144' + '\x65')(chr(6695 - 6578) + '\164' + '\x66' + chr(0b101101) + chr(485 - 429)))):
r_cosW25WDG1 = r_cosW25WDG1.YqIaRFfeo4Ha(roI3spqORKae(ES5oEprVxulp(b'\x93\x94\x9b\xe4\x93'), chr(7497 - 7397) + chr(5016 - 4915) + chr(99) + '\157' + chr(1759 - 1659) + chr(4695 - 4594))('\165' + chr(0b1001100 + 0o50) + chr(0b1100110) + chr(0b101101) + chr(0b101110 + 0o12)))
if not suIjIS24Zkqw(r_cosW25WDG1, QNQS9e6tJqMV):
raise jZIjKu8IFANs(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b"\x9d\xc1\x8f\xb4\x8b=\x9e\xd4lG\x1b\xa6\n\x0c'<-\x888<\xa8\x8b\xb5B\x82\xd2\xa4\xc7b\xf0\x97\xda\xd0\x00\xdc\xf2\xbf \x9c\x8e\xc6\x82\x98\xe9\xd8 \x9f\xd4mZO\xe4\x12X4.h"), chr(0b1100100) + '\145' + chr(0b111010 + 0o51) + chr(111) + chr(0b1100100) + chr(101))(chr(11081 - 10964) + chr(0b1110100) + '\x66' + chr(1826 - 1781) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\x97\xd3\xce\x82\xecg\x8b\x9bSw,\xcc'), chr(7198 - 7098) + '\145' + chr(0b1100011) + chr(4857 - 4746) + chr(1183 - 1083) + chr(7601 - 7500))(chr(0b1110101) + chr(1483 - 1367) + chr(6906 - 6804) + '\x2d' + chr(1548 - 1492)))(r_cosW25WDG1))
return r_cosW25WDG1 |
ciena/afkak | afkak/_util.py | write_short_ascii | def write_short_ascii(s):
"""
Encode a Kafka short string which represents text.
:param str s:
Text string (`str` on Python 3, `str` or `unicode` on Python 2) or
``None``. The string will be ASCII-encoded.
:returns: length-prefixed `bytes`
:raises:
`struct.error` for strings longer than 32767 characters
"""
if s is None:
return _NULL_SHORT_STRING
if not isinstance(s, string_types):
raise TypeError('{!r} is not text'.format(s))
return write_short_bytes(s.encode('ascii')) | python | def write_short_ascii(s):
"""
Encode a Kafka short string which represents text.
:param str s:
Text string (`str` on Python 3, `str` or `unicode` on Python 2) or
``None``. The string will be ASCII-encoded.
:returns: length-prefixed `bytes`
:raises:
`struct.error` for strings longer than 32767 characters
"""
if s is None:
return _NULL_SHORT_STRING
if not isinstance(s, string_types):
raise TypeError('{!r} is not text'.format(s))
return write_short_bytes(s.encode('ascii')) | [
"def",
"write_short_ascii",
"(",
"s",
")",
":",
"if",
"s",
"is",
"None",
":",
"return",
"_NULL_SHORT_STRING",
"if",
"not",
"isinstance",
"(",
"s",
",",
"string_types",
")",
":",
"raise",
"TypeError",
"(",
"'{!r} is not text'",
".",
"format",
"(",
"s",
")",
")",
"return",
"write_short_bytes",
"(",
"s",
".",
"encode",
"(",
"'ascii'",
")",
")"
] | Encode a Kafka short string which represents text.
:param str s:
Text string (`str` on Python 3, `str` or `unicode` on Python 2) or
``None``. The string will be ASCII-encoded.
:returns: length-prefixed `bytes`
:raises:
`struct.error` for strings longer than 32767 characters | [
"Encode",
"a",
"Kafka",
"short",
"string",
"which",
"represents",
"text",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/_util.py#L83-L99 | train | Encode a Kafka short string which represents text. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxz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f,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(222 - 169), 0o10), nzTpIcepk0o8('\060' + chr(11317 - 11206) + chr(0b110011) + '\060' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1001111 + 0o40) + chr(49) + chr(0b110010) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b11001 + 0o126) + chr(51) + '\x33', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(53) + chr(0b100110 + 0o15), 2358 - 2350), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + '\062' + '\x34', 0b1000), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b10 + 0o155) + chr(0b101110 + 0o11) + '\062', 0b1000), nzTpIcepk0o8(chr(1573 - 1525) + chr(0b1011010 + 0o25) + '\x32' + '\067' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110101) + chr(2728 - 2673), 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(595 - 484) + chr(1310 - 1255) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + chr(0b110000), 31501 - 31493), nzTpIcepk0o8(chr(1854 - 1806) + '\x6f' + '\065' + '\x33', 8), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + chr(677 - 626) + chr(671 - 622), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2677 - 2566) + chr(0b111 + 0o54) + chr(1168 - 1116) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(877 - 829) + chr(111) + chr(0b1100 + 0o45) + '\066' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b101 + 0o152) + chr(50) + chr(0b110011) + chr(698 - 649), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + chr(54) + '\x30', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(1825 - 1770) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(7214 - 7103) + chr(548 - 497) + '\x32' + chr(0b110011), 49286 - 49278), nzTpIcepk0o8('\x30' + '\157' + chr(49) + chr(0b110110) + chr(575 - 520), 60605 - 60597), nzTpIcepk0o8('\x30' + chr(0b111100 + 0o63) + chr(0b110111) + chr(0b100010 + 0o16), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(12132 - 12021) + chr(49) + '\060' + '\x33', 33310 - 33302), nzTpIcepk0o8(chr(48) + chr(0b1011000 + 0o27) + chr(0b0 + 0o62) + chr(0b101001 + 0o11) + chr(2064 - 2013), 0o10), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b10011 + 0o134) + '\x31' + chr(53) + '\066', 0o10), nzTpIcepk0o8(chr(1841 - 1793) + chr(111) + '\x32' + chr(0b110110) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(0b110110) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + '\x35' + chr(1870 - 1815), 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101011 + 0o4) + chr(413 - 362) + chr(51), 8), nzTpIcepk0o8('\060' + chr(4555 - 4444) + '\062' + '\065', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + '\065' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(1844 - 1796) + '\x6f' + '\x36' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b111100 + 0o63) + chr(50) + chr(1308 - 1260) + chr(1562 - 1508), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1000 + 0o53) + '\060', 37270 - 37262), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(2403 - 2349) + '\x31', 40581 - 40573), nzTpIcepk0o8('\x30' + chr(8629 - 8518) + chr(50) + '\064' + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(1301 - 1252) + '\x32', 60565 - 60557), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(52) + chr(2473 - 2422), 8), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(9845 - 9734) + chr(2018 - 1968) + '\x31', 15009 - 15001), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + '\x31' + chr(539 - 487) + chr(0b10111 + 0o34), 0o10), nzTpIcepk0o8(chr(322 - 274) + '\157' + '\063' + '\x32' + chr(48), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101010 + 0o13) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'3'), chr(100) + '\x65' + '\143' + chr(8062 - 7951) + chr(0b0 + 0o144) + chr(0b101001 + 0o74))(chr(0b1110101) + chr(0b1110100) + '\146' + chr(1473 - 1428) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def j_Fubkt6y7zt(PmE5_h409JAA):
if PmE5_h409JAA is None:
return G3HN834nrah_
if not suIjIS24Zkqw(PmE5_h409JAA, Q9V5WOaImAwl):
raise jZIjKu8IFANs(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'f\xe2!f\x0b\xbdI\x9aAR|\x0bm\x85\x08\xed'), chr(3680 - 3580) + chr(0b1000011 + 0o42) + chr(99) + '\x6f' + chr(0b1100100) + '\x65')('\165' + chr(0b1010110 + 0o36) + chr(6586 - 6484) + chr(45) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'l\xf0`Pl\xe7\\\xd5~bKa'), '\x64' + '\145' + chr(0b100110 + 0o75) + chr(0b1101111) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b1001 + 0o153) + '\146' + '\055' + chr(0b111000)))(PmE5_h409JAA))
return gEdBqgi_TfkS(roI3spqORKae(PmE5_h409JAA, roI3spqORKae(ES5oEprVxulp(b'D\xb2\x1azy\x92\\\xdf@\t@J'), chr(0b1100100) + chr(6014 - 5913) + '\143' + chr(0b1101111) + chr(100) + chr(101))(chr(0b1110101) + '\164' + chr(6489 - 6387) + chr(0b101101) + chr(0b110010 + 0o6)))(roI3spqORKae(ES5oEprVxulp(b'|\xb00rB'), chr(0b1010000 + 0o24) + '\145' + '\143' + '\157' + '\144' + chr(310 - 209))(chr(7500 - 7383) + chr(0b1110100) + chr(102) + '\x2d' + chr(0b10 + 0o66)))) |
ciena/afkak | afkak/_util.py | write_short_bytes | def write_short_bytes(b):
"""
Encode a Kafka short string which contains arbitrary bytes. A short string
is limited to 32767 bytes in length by the signed 16-bit length prefix.
A length prefix of -1 indicates ``null``, represented as ``None`` in
Python.
:param bytes b:
No more than 32767 bytes, or ``None`` for the null encoding.
:return: length-prefixed `bytes`
:raises:
`struct.error` for strings longer than 32767 characters
"""
if b is None:
return _NULL_SHORT_STRING
if not isinstance(b, bytes):
raise TypeError('{!r} is not bytes'.format(b))
elif len(b) > 32767:
raise struct.error(len(b))
else:
return struct.pack('>h', len(b)) + b | python | def write_short_bytes(b):
"""
Encode a Kafka short string which contains arbitrary bytes. A short string
is limited to 32767 bytes in length by the signed 16-bit length prefix.
A length prefix of -1 indicates ``null``, represented as ``None`` in
Python.
:param bytes b:
No more than 32767 bytes, or ``None`` for the null encoding.
:return: length-prefixed `bytes`
:raises:
`struct.error` for strings longer than 32767 characters
"""
if b is None:
return _NULL_SHORT_STRING
if not isinstance(b, bytes):
raise TypeError('{!r} is not bytes'.format(b))
elif len(b) > 32767:
raise struct.error(len(b))
else:
return struct.pack('>h', len(b)) + b | [
"def",
"write_short_bytes",
"(",
"b",
")",
":",
"if",
"b",
"is",
"None",
":",
"return",
"_NULL_SHORT_STRING",
"if",
"not",
"isinstance",
"(",
"b",
",",
"bytes",
")",
":",
"raise",
"TypeError",
"(",
"'{!r} is not bytes'",
".",
"format",
"(",
"b",
")",
")",
"elif",
"len",
"(",
"b",
")",
">",
"32767",
":",
"raise",
"struct",
".",
"error",
"(",
"len",
"(",
"b",
")",
")",
"else",
":",
"return",
"struct",
".",
"pack",
"(",
"'>h'",
",",
"len",
"(",
"b",
")",
")",
"+",
"b"
] | Encode a Kafka short string which contains arbitrary bytes. A short string
is limited to 32767 bytes in length by the signed 16-bit length prefix.
A length prefix of -1 indicates ``null``, represented as ``None`` in
Python.
:param bytes b:
No more than 32767 bytes, or ``None`` for the null encoding.
:return: length-prefixed `bytes`
:raises:
`struct.error` for strings longer than 32767 characters | [
"Encode",
"a",
"Kafka",
"short",
"string",
"which",
"contains",
"arbitrary",
"bytes",
".",
"A",
"short",
"string",
"is",
"limited",
"to",
"32767",
"bytes",
"in",
"length",
"by",
"the",
"signed",
"16",
"-",
"bit",
"length",
"prefix",
".",
"A",
"length",
"prefix",
"of",
"-",
"1",
"indicates",
"null",
"represented",
"as",
"None",
"in",
"Python",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/_util.py#L102-L122 | train | Encode a Kafka short string which contains arbitrary bytes. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJp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Yi7uj_uC,TVUhqOt5_BbS,WtdkIpFeYozM,MdkNqd1bagO6,QNQS9e6tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + '\062' + chr(2670 - 2618) + chr(1796 - 1742), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(0b100100 + 0o16) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101011 + 0o6) + '\x31' + chr(0b11000 + 0o32), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(1560 - 1510), 0b1000), nzTpIcepk0o8(chr(48) + chr(3426 - 3315) + chr(49) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(0b10001 + 0o136) + chr(0b110010) + chr(0b110110) + chr(1194 - 1144), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1154 - 1104) + chr(0b10101 + 0o37), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + '\064' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + chr(0b110001) + chr(0b110101) + chr(0b111 + 0o52), 64304 - 64296), nzTpIcepk0o8(chr(1293 - 1245) + chr(7272 - 7161) + chr(0b10001 + 0o43) + chr(0b110000), 50043 - 50035), nzTpIcepk0o8('\060' + chr(0b1011010 + 0o25) + chr(2453 - 2402) + chr(0b11001 + 0o34) + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(50) + '\x35' + chr(0b100100 + 0o23), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1 + 0o156) + chr(1913 - 1863) + chr(0b100110 + 0o14) + '\063', 0o10), nzTpIcepk0o8(chr(1532 - 1484) + chr(0b101111 + 0o100) + chr(50) + chr(524 - 472) + '\067', ord("\x08")), nzTpIcepk0o8(chr(413 - 365) + chr(0b1101111) + '\x32' + chr(1467 - 1415) + chr(1904 - 1850), 8), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\x34' + '\066', 0o10), nzTpIcepk0o8('\x30' + chr(0b101010 + 0o105) + '\x35' + chr(2334 - 2280), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\062' + '\067', 22901 - 22893), nzTpIcepk0o8(chr(1322 - 1274) + chr(111) + '\x34' + chr(2273 - 2220), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\065' + chr(51), 33865 - 33857), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(2537 - 2486) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(2056 - 2004) + chr(864 - 812), ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + chr(2132 - 2083) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b100100 + 0o113) + chr(0b110011) + '\066' + chr(1229 - 1179), 48462 - 48454), nzTpIcepk0o8(chr(0b110000) + '\157' + '\065' + chr(1392 - 1343), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + chr(0b110100) + chr(0b110001), 53958 - 53950), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b111010 + 0o65) + chr(0b110010) + chr(49) + '\x34', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(53) + chr(0b110111), 31782 - 31774), nzTpIcepk0o8(chr(48) + chr(4625 - 4514) + '\x33' + chr(0b11101 + 0o31) + chr(0b11 + 0o61), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\063' + '\x31' + chr(0b11001 + 0o34), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b100 + 0o153) + chr(0b110010) + chr(1186 - 1136) + chr(0b10110 + 0o33), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1001111 + 0o40) + chr(2118 - 2069) + '\x33' + '\x32', 0b1000), nzTpIcepk0o8(chr(952 - 904) + '\x6f' + '\x32' + chr(0b110010) + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b101 + 0o57) + chr(0b11001 + 0o32), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + chr(0b101100 + 0o10) + chr(52), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(1992 - 1941) + chr(0b11110 + 0o30), 31746 - 31738), nzTpIcepk0o8(chr(840 - 792) + chr(111) + chr(2278 - 2223) + chr(52), 0o10), nzTpIcepk0o8('\x30' + chr(6457 - 6346) + chr(49) + chr(1468 - 1415) + chr(1539 - 1485), 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\x6f' + chr(51) + chr(0b11101 + 0o31) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11110 + 0o24) + chr(1187 - 1136) + chr(0b11000 + 0o36), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(111) + chr(53) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x88'), '\x64' + '\145' + chr(2961 - 2862) + chr(0b1101111) + chr(100) + '\x65')(chr(13684 - 13567) + chr(1958 - 1842) + chr(0b1100110) + chr(0b101101) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def gEdBqgi_TfkS(xFDEVQn5qSdh):
if xFDEVQn5qSdh is None:
return G3HN834nrah_
if not suIjIS24Zkqw(xFDEVQn5qSdh, QNQS9e6tJqMV):
raise jZIjKu8IFANs(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xdd\xf18o,\xdbgB\x07O\x9f\x8f\xf1\xde\xd2\x83]'), chr(0b100111 + 0o75) + '\x65' + chr(9647 - 9548) + chr(1054 - 943) + chr(0b10101 + 0o117) + chr(101))('\165' + '\x74' + '\x66' + chr(1488 - 1443) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xd7\xe3yYK\x81r\r8\x7f\xa8\xe5'), chr(100) + chr(101) + chr(2736 - 2637) + '\x6f' + chr(8378 - 8278) + chr(101))('\165' + chr(0b101000 + 0o114) + chr(102) + chr(1764 - 1719) + chr(0b1011 + 0o55)))(xFDEVQn5qSdh))
elif ftfygxgFas5X(xFDEVQn5qSdh) > nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110111) + chr(0b110111) + chr(437 - 382) + chr(0b110111) + '\067', 0b1000):
raise roI3spqORKae(Mf7j_LCOrq1d, roI3spqORKae(ES5oEprVxulp(b'\xd7\xb9{ee\xc2D4\x1fe\xa0\xcb'), chr(100) + chr(0b1010110 + 0o17) + chr(99) + chr(0b1101111) + chr(0b101110 + 0o66) + chr(0b1100101))('\x75' + chr(116) + '\x66' + '\055' + chr(0b110000 + 0o10)))(ftfygxgFas5X(xFDEVQn5qSdh))
else:
return roI3spqORKae(Mf7j_LCOrq1d, roI3spqORKae(ES5oEprVxulp(b'\xd6\xb1)y'), '\x64' + chr(0b1011001 + 0o14) + '\143' + '\x6f' + chr(0b10011 + 0o121) + '\x65')('\165' + '\x74' + chr(2596 - 2494) + chr(45) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\x98\xb8'), '\x64' + '\145' + chr(0b1100011) + chr(111) + '\x64' + '\145')('\165' + chr(0b1010 + 0o152) + chr(0b1100110) + chr(0b101101) + chr(460 - 404)), ftfygxgFas5X(xFDEVQn5qSdh)) + xFDEVQn5qSdh |
Salamek/cron-descriptor | examples/crontabReader.py | CrontabReader.parse_cron_line | def parse_cron_line(self, line):
"""Parses crontab line and returns only starting time string
Args:
line: crontab line
Returns:
Time part of cron line
"""
stripped = line.strip()
if stripped and stripped.startswith('#') is False:
rexres = self.rex.search(stripped)
if rexres:
return ' '.join(rexres.group(1).split())
return None | python | def parse_cron_line(self, line):
"""Parses crontab line and returns only starting time string
Args:
line: crontab line
Returns:
Time part of cron line
"""
stripped = line.strip()
if stripped and stripped.startswith('#') is False:
rexres = self.rex.search(stripped)
if rexres:
return ' '.join(rexres.group(1).split())
return None | [
"def",
"parse_cron_line",
"(",
"self",
",",
"line",
")",
":",
"stripped",
"=",
"line",
".",
"strip",
"(",
")",
"if",
"stripped",
"and",
"stripped",
".",
"startswith",
"(",
"'#'",
")",
"is",
"False",
":",
"rexres",
"=",
"self",
".",
"rex",
".",
"search",
"(",
"stripped",
")",
"if",
"rexres",
":",
"return",
"' '",
".",
"join",
"(",
"rexres",
".",
"group",
"(",
"1",
")",
".",
"split",
"(",
")",
")",
"return",
"None"
] | Parses crontab line and returns only starting time string
Args:
line: crontab line
Returns:
Time part of cron line | [
"Parses",
"crontab",
"line",
"and",
"returns",
"only",
"starting",
"time",
"string"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/examples/crontabReader.py#L58-L73 | train | Parses a crontab line and returns only starting time string | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3p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DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(111) + chr(902 - 851) + '\067' + '\064', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(0b10011 + 0o35) + chr(0b110011), 38750 - 38742), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + '\x34' + chr(270 - 218), ord("\x08")), nzTpIcepk0o8('\x30' + chr(6315 - 6204) + '\x33' + chr(49) + chr(0b11111 + 0o24), 42215 - 42207), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + '\062' + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\064' + '\x36', 16705 - 16697), nzTpIcepk0o8('\060' + chr(0b111000 + 0o67) + chr(1862 - 1812) + chr(53) + chr(0b100011 + 0o22), 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + '\062' + '\062' + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x37' + chr(892 - 838), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(1923 - 1872) + chr(2054 - 2005), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(0b0 + 0o60) + chr(53), 61797 - 61789), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + '\x34' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(2692 - 2581) + chr(752 - 701) + chr(53) + chr(1269 - 1221), 0o10), nzTpIcepk0o8(chr(296 - 248) + chr(3897 - 3786) + chr(50) + chr(0b110001) + chr(0b100000 + 0o23), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(591 - 480) + '\x34' + chr(2511 - 2456), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b110010) + chr(51), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b100001 + 0o116) + chr(0b101100 + 0o5) + chr(55) + chr(0b111 + 0o51), 0b1000), nzTpIcepk0o8(chr(48) + chr(7617 - 7506) + '\061' + chr(55), 37248 - 37240), nzTpIcepk0o8(chr(2015 - 1967) + '\x6f' + '\062' + '\x32' + chr(0b101010 + 0o7), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b1100 + 0o47) + chr(50) + chr(48), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + chr(50) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(53) + chr(2601 - 2549), 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(11007 - 10896) + chr(0b10111 + 0o32) + chr(0b1011 + 0o46) + '\064', 0b1000), nzTpIcepk0o8(chr(1755 - 1707) + chr(0b1101111) + chr(0b11001 + 0o36) + '\x31', 33709 - 33701), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b110001), 8), nzTpIcepk0o8('\060' + chr(0b1000001 + 0o56) + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(542 - 494) + chr(1838 - 1790), 42865 - 42857), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + chr(0b1 + 0o60) + chr(49) + chr(0b100100 + 0o15), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(0b110001) + '\x30', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110100 + 0o0) + '\063', 0o10), nzTpIcepk0o8('\060' + chr(8209 - 8098) + chr(0b110010) + chr(2057 - 2005) + chr(1373 - 1318), 0b1000), nzTpIcepk0o8(chr(48) + chr(8488 - 8377) + chr(50) + chr(55) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + chr(2556 - 2445) + '\063' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(1449 - 1401) + chr(0b1000101 + 0o52) + chr(0b110001) + chr(2657 - 2602) + '\x31', 0o10), nzTpIcepk0o8('\060' + chr(0b11 + 0o154) + chr(0b110 + 0o53) + chr(0b10100 + 0o42) + '\061', 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(10074 - 9963) + '\x33' + '\065' + chr(2608 - 2556), 0o10), nzTpIcepk0o8(chr(75 - 27) + chr(0b1001100 + 0o43) + '\x32' + chr(55) + chr(48), 0b1000), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1101111) + chr(50) + chr(53) + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(7770 - 7659) + chr(2485 - 2434) + chr(52) + chr(0b110010), 8), nzTpIcepk0o8(chr(989 - 941) + chr(692 - 581) + '\065' + '\x35', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\065' + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd2'), '\144' + chr(101) + chr(0b1010010 + 0o21) + chr(9581 - 9470) + '\144' + '\x65')('\165' + chr(0b1000001 + 0o63) + chr(9227 - 9125) + '\055' + chr(670 - 614)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def mcDMMTRAtLI9(hXMPsSrOQzbh, ffiOpFBWGmZU):
KOKqOkV3l9Mx = ffiOpFBWGmZU.kdIDrcwZTCs5()
if KOKqOkV3l9Mx and roI3spqORKae(KOKqOkV3l9Mx, roI3spqORKae(ES5oEprVxulp(b'\x8f7\x05\xb9\xe7U\xda\xfdJq'), chr(0b1001 + 0o133) + chr(101) + chr(0b110 + 0o135) + chr(0b10001 + 0o136) + chr(100) + chr(101))('\x75' + chr(12977 - 12861) + '\146' + '\055' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\xdf'), chr(9813 - 9713) + chr(101) + '\143' + '\157' + chr(1192 - 1092) + '\145')(chr(0b1001000 + 0o55) + '\x74' + '\x66' + chr(0b11111 + 0o16) + chr(0b10000 + 0o50))) is nzTpIcepk0o8(chr(0b100 + 0o54) + '\157' + chr(272 - 224), 314 - 306):
nykXcVuKrUwe = hXMPsSrOQzbh.rex.DaZ8InzQgFJv(KOKqOkV3l9Mx)
if nykXcVuKrUwe:
return roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xdc'), chr(1837 - 1737) + '\x65' + '\x63' + chr(111) + '\144' + chr(1004 - 903))(chr(10959 - 10842) + chr(0b100001 + 0o123) + chr(3533 - 3431) + '\055' + chr(0b100110 + 0o22)), roI3spqORKae(ES5oEprVxulp(b'\xa5w\x1d\x86\xaad\xce\xf2jZ\xcb\x93'), chr(100) + chr(0b1100101) + chr(99) + '\x6f' + chr(100) + chr(0b100111 + 0o76))(chr(0b1110101) + '\x74' + '\x66' + chr(45) + chr(0b100100 + 0o24)))(roI3spqORKae(nykXcVuKrUwe.group(nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + '\061', 0b1000)), roI3spqORKae(ES5oEprVxulp(b'\xb0%6\xb9\xc2i\xd5\xe1zo\xeb\xa1'), chr(100) + chr(101) + chr(99) + '\x6f' + chr(962 - 862) + chr(0b110000 + 0o65))('\x75' + chr(4331 - 4215) + chr(102) + chr(0b101101) + chr(56)))())
return None |
ciena/afkak | afkak/brokerclient.py | _KafkaBrokerClient.updateMetadata | def updateMetadata(self, new):
"""
Update the metadata stored for this broker.
Future connections made to the broker will use the host and port
defined in the new metadata. Any existing connection is not dropped,
however.
:param new:
:clas:`afkak.common.BrokerMetadata` with the same node ID as the
current metadata.
"""
if self.node_id != new.node_id:
raise ValueError("Broker metadata {!r} doesn't match node_id={}".format(new, self.node_id))
self.node_id = new.node_id
self.host = new.host
self.port = new.port | python | def updateMetadata(self, new):
"""
Update the metadata stored for this broker.
Future connections made to the broker will use the host and port
defined in the new metadata. Any existing connection is not dropped,
however.
:param new:
:clas:`afkak.common.BrokerMetadata` with the same node ID as the
current metadata.
"""
if self.node_id != new.node_id:
raise ValueError("Broker metadata {!r} doesn't match node_id={}".format(new, self.node_id))
self.node_id = new.node_id
self.host = new.host
self.port = new.port | [
"def",
"updateMetadata",
"(",
"self",
",",
"new",
")",
":",
"if",
"self",
".",
"node_id",
"!=",
"new",
".",
"node_id",
":",
"raise",
"ValueError",
"(",
"\"Broker metadata {!r} doesn't match node_id={}\"",
".",
"format",
"(",
"new",
",",
"self",
".",
"node_id",
")",
")",
"self",
".",
"node_id",
"=",
"new",
".",
"node_id",
"self",
".",
"host",
"=",
"new",
".",
"host",
"self",
".",
"port",
"=",
"new",
".",
"port"
] | Update the metadata stored for this broker.
Future connections made to the broker will use the host and port
defined in the new metadata. Any existing connection is not dropped,
however.
:param new:
:clas:`afkak.common.BrokerMetadata` with the same node ID as the
current metadata. | [
"Update",
"the",
"metadata",
"stored",
"for",
"this",
"broker",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/brokerclient.py#L130-L147 | train | Update the broker metadata with the new metadata. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3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k,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(7373 - 7262) + chr(0b11010 + 0o31) + chr(135 - 82) + chr(52), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b11110 + 0o25) + chr(1513 - 1460) + chr(638 - 589), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(53) + '\061', 0o10), nzTpIcepk0o8(chr(1486 - 1438) + '\157' + chr(49) + chr(52) + chr(712 - 662), ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(6862 - 6751) + chr(0b1 + 0o61) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b100010 + 0o21) + chr(53) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(1758 - 1647) + '\062' + chr(1173 - 1123) + '\062', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\064' + '\x33', 0b1000), nzTpIcepk0o8('\x30' + chr(0b100000 + 0o117) + chr(2170 - 2121) + '\x31' + '\065', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + '\061' + chr(0b1001 + 0o54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10000 + 0o43) + chr(970 - 919), 0o10), nzTpIcepk0o8('\060' + chr(0b10000 + 0o137) + '\x31' + chr(1238 - 1186) + chr(1495 - 1442), 7221 - 7213), nzTpIcepk0o8('\060' + '\x6f' + chr(2240 - 2191) + '\x34' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(276 - 165) + chr(49) + chr(51) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(653 - 605) + '\157' + chr(0b110010) + chr(55) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x36' + chr(0b100100 + 0o16), 59112 - 59104), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33' + '\x32' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(2361 - 2312) + '\065', 8), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(0b110110) + '\060', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100111 + 0o13) + chr(0b11010 + 0o35) + chr(2335 - 2282), 0o10), nzTpIcepk0o8(chr(131 - 83) + chr(0b1000111 + 0o50) + chr(49) + '\x30' + '\066', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2311 - 2260) + '\x30' + '\x36', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + chr(52) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2274 - 2163) + '\x31' + chr(0b1111 + 0o47) + chr(50), 56615 - 56607), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + '\x32' + chr(839 - 784), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(9160 - 9049) + chr(0b11111 + 0o23) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(895 - 845) + chr(1636 - 1587), 0b1000), nzTpIcepk0o8(chr(1571 - 1523) + '\x6f' + '\x32' + chr(48) + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + '\063' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b10001 + 0o40) + chr(49) + '\067', 0o10), nzTpIcepk0o8(chr(227 - 179) + '\x6f' + chr(0b110010) + '\060', 8), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b100100 + 0o113) + '\063' + '\x30', 26065 - 26057), nzTpIcepk0o8(chr(389 - 341) + chr(3103 - 2992) + chr(0b110010 + 0o0) + chr(50) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(7654 - 7543) + chr(0b10010 + 0o41) + chr(0b110110) + '\x33', 0b1000), nzTpIcepk0o8(chr(364 - 316) + chr(0b1101111) + chr(0b110001 + 0o1) + '\065' + chr(0b11 + 0o64), 0o10), nzTpIcepk0o8('\x30' + chr(0b111001 + 0o66) + chr(0b110010) + '\066' + chr(1210 - 1161), 0o10), nzTpIcepk0o8(chr(1598 - 1550) + chr(4566 - 4455) + chr(0b110011) + chr(53) + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101010 + 0o5) + chr(2141 - 2090) + chr(0b110110) + chr(2442 - 2392), ord("\x08")), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101101 + 0o2) + chr(0b110001) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + chr(0b10100 + 0o37) + chr(756 - 708) + chr(0b100 + 0o56), 24227 - 24219)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(111) + chr(0b110101) + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc2'), '\144' + chr(0b1100101) + '\143' + chr(111) + '\144' + '\x65')('\x75' + chr(1565 - 1449) + '\x66' + chr(1362 - 1317) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def EOZvghcOXDHM(hXMPsSrOQzbh, bZWmgf4GjgvH):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x82\x86M\x07H\x86\xf6'), chr(1178 - 1078) + chr(101) + '\143' + '\157' + chr(0b101 + 0o137) + chr(0b1100101))(chr(117) + chr(12868 - 12752) + chr(102) + '\055' + chr(0b111000))) != roI3spqORKae(bZWmgf4GjgvH, roI3spqORKae(ES5oEprVxulp(b'\x82\x86M\x07H\x86\xf6'), '\144' + chr(101) + chr(6067 - 5968) + chr(111) + '\144' + chr(0b1100101))(chr(11104 - 10987) + chr(4300 - 4184) + chr(102) + chr(0b11010 + 0o23) + chr(249 - 193))):
raise WbNHlDKpyPtQ(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xae\x9bF\tr\x9d\xb2N(\xb9z\x01\x02,\xdf\x12\xabl\x02\xc0f\xa2\x8e\x17\xe4~6\xf1\xb8"ql\xf7\x9b\x8f\xdf\x82\x96l\x9d\x85\x8d\x14\x19j'), '\144' + '\x65' + chr(0b111111 + 0o44) + chr(111) + chr(0b10 + 0o142) + chr(0b11101 + 0o110))(chr(0b1100011 + 0o22) + chr(116) + chr(102) + '\055' + '\070'), roI3spqORKae(ES5oEprVxulp(b'\x9d\xda\x1a)P\xdc\xf4L\x1c\x92X/'), chr(0b1100100) + '\145' + '\143' + '\x6f' + '\x64' + chr(101))(chr(117) + chr(0b1110100) + '\146' + '\055' + chr(1951 - 1895)))(bZWmgf4GjgvH, roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x82\x86M\x07H\x86\xf6'), '\144' + chr(2554 - 2453) + chr(0b1000111 + 0o34) + chr(1911 - 1800) + chr(9914 - 9814) + chr(10119 - 10018))('\x75' + chr(0b1110100) + '\x66' + '\055' + '\070'))))
hXMPsSrOQzbh.l4ejMdXa7Niq = bZWmgf4GjgvH.l4ejMdXa7Niq
hXMPsSrOQzbh.UcZofMadI5hD = bZWmgf4GjgvH.UcZofMadI5hD
hXMPsSrOQzbh.FKWBoSDY8Qs2 = bZWmgf4GjgvH.FKWBoSDY8Qs2 |
ciena/afkak | afkak/brokerclient.py | _KafkaBrokerClient.makeRequest | def makeRequest(self, requestId, request, expectResponse=True):
"""
Send a request to our broker via our self.proto KafkaProtocol object.
Return a deferred which will fire when the reply matching the requestId
comes back from the server, or, if expectResponse is False, then
return None instead.
If we are not currently connected, then we buffer the request to send
when the connection comes back up.
"""
if requestId in self.requests:
# Id is duplicate to 'in-flight' request. Reject it, as we
# won't be able to properly deliver the response(s)
# Note that this won't protect against a client calling us
# twice with the same ID, but first with expectResponse=False
# But that's pathological, and the only defense is to track
# all requestIds sent regardless of whether we expect to see
# a response, which is effectively a memory leak...
raise DuplicateRequestError(
'Reuse of requestId:{}'.format(requestId))
# If we've been told to shutdown (close() called) then fail request
if self._dDown:
return fail(ClientError('makeRequest() called after close()'))
# Ok, we are going to save/send it, create a _Request object to track
canceller = partial(
self.cancelRequest, requestId,
CancelledError(message="Request correlationId={} was cancelled".format(requestId)))
tReq = _Request(requestId, request, expectResponse, canceller)
# add it to our requests dict
self.requests[requestId] = tReq
# Add an errback to the tReq.d to remove it from our requests dict
# if something goes wrong...
tReq.d.addErrback(self._handleRequestFailure, requestId)
# Do we have a connection over which to send the request?
if self.proto:
# Send the request
self._sendRequest(tReq)
# Have we not even started trying to connect yet? Do so now
elif not self.connector:
self._connect()
return tReq.d | python | def makeRequest(self, requestId, request, expectResponse=True):
"""
Send a request to our broker via our self.proto KafkaProtocol object.
Return a deferred which will fire when the reply matching the requestId
comes back from the server, or, if expectResponse is False, then
return None instead.
If we are not currently connected, then we buffer the request to send
when the connection comes back up.
"""
if requestId in self.requests:
# Id is duplicate to 'in-flight' request. Reject it, as we
# won't be able to properly deliver the response(s)
# Note that this won't protect against a client calling us
# twice with the same ID, but first with expectResponse=False
# But that's pathological, and the only defense is to track
# all requestIds sent regardless of whether we expect to see
# a response, which is effectively a memory leak...
raise DuplicateRequestError(
'Reuse of requestId:{}'.format(requestId))
# If we've been told to shutdown (close() called) then fail request
if self._dDown:
return fail(ClientError('makeRequest() called after close()'))
# Ok, we are going to save/send it, create a _Request object to track
canceller = partial(
self.cancelRequest, requestId,
CancelledError(message="Request correlationId={} was cancelled".format(requestId)))
tReq = _Request(requestId, request, expectResponse, canceller)
# add it to our requests dict
self.requests[requestId] = tReq
# Add an errback to the tReq.d to remove it from our requests dict
# if something goes wrong...
tReq.d.addErrback(self._handleRequestFailure, requestId)
# Do we have a connection over which to send the request?
if self.proto:
# Send the request
self._sendRequest(tReq)
# Have we not even started trying to connect yet? Do so now
elif not self.connector:
self._connect()
return tReq.d | [
"def",
"makeRequest",
"(",
"self",
",",
"requestId",
",",
"request",
",",
"expectResponse",
"=",
"True",
")",
":",
"if",
"requestId",
"in",
"self",
".",
"requests",
":",
"# Id is duplicate to 'in-flight' request. Reject it, as we",
"# won't be able to properly deliver the response(s)",
"# Note that this won't protect against a client calling us",
"# twice with the same ID, but first with expectResponse=False",
"# But that's pathological, and the only defense is to track",
"# all requestIds sent regardless of whether we expect to see",
"# a response, which is effectively a memory leak...",
"raise",
"DuplicateRequestError",
"(",
"'Reuse of requestId:{}'",
".",
"format",
"(",
"requestId",
")",
")",
"# If we've been told to shutdown (close() called) then fail request",
"if",
"self",
".",
"_dDown",
":",
"return",
"fail",
"(",
"ClientError",
"(",
"'makeRequest() called after close()'",
")",
")",
"# Ok, we are going to save/send it, create a _Request object to track",
"canceller",
"=",
"partial",
"(",
"self",
".",
"cancelRequest",
",",
"requestId",
",",
"CancelledError",
"(",
"message",
"=",
"\"Request correlationId={} was cancelled\"",
".",
"format",
"(",
"requestId",
")",
")",
")",
"tReq",
"=",
"_Request",
"(",
"requestId",
",",
"request",
",",
"expectResponse",
",",
"canceller",
")",
"# add it to our requests dict",
"self",
".",
"requests",
"[",
"requestId",
"]",
"=",
"tReq",
"# Add an errback to the tReq.d to remove it from our requests dict",
"# if something goes wrong...",
"tReq",
".",
"d",
".",
"addErrback",
"(",
"self",
".",
"_handleRequestFailure",
",",
"requestId",
")",
"# Do we have a connection over which to send the request?",
"if",
"self",
".",
"proto",
":",
"# Send the request",
"self",
".",
"_sendRequest",
"(",
"tReq",
")",
"# Have we not even started trying to connect yet? Do so now",
"elif",
"not",
"self",
".",
"connector",
":",
"self",
".",
"_connect",
"(",
")",
"return",
"tReq",
".",
"d"
] | Send a request to our broker via our self.proto KafkaProtocol object.
Return a deferred which will fire when the reply matching the requestId
comes back from the server, or, if expectResponse is False, then
return None instead.
If we are not currently connected, then we buffer the request to send
when the connection comes back up. | [
"Send",
"a",
"request",
"to",
"our",
"broker",
"via",
"our",
"self",
".",
"proto",
"KafkaProtocol",
"object",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/brokerclient.py#L149-L194 | train | Send a request to the broker via our self. proto KafkaProtocol object. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmB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6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1101111) + '\063' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\157' + chr(51) + chr(0b110000) + '\x33', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(861 - 811) + chr(1942 - 1887) + '\x32', 53291 - 53283), nzTpIcepk0o8(chr(773 - 725) + chr(7163 - 7052) + '\062' + chr(48) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b11001 + 0o126) + chr(0b11001 + 0o32) + '\060' + chr(0b1100 + 0o47), 8), nzTpIcepk0o8('\060' + '\157' + '\x36' + chr(54), 21719 - 21711), nzTpIcepk0o8(chr(1372 - 1324) + chr(0b1101111) + chr(51) + chr(1097 - 1043), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b111 + 0o52) + chr(0b110010) + '\x30', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + '\063' + chr(0b10111 + 0o33), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + chr(49) + '\x35', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2267 - 2216) + chr(0b101 + 0o54) + chr(245 - 197), 0b1000), nzTpIcepk0o8('\x30' + chr(0b110001 + 0o76) + chr(782 - 733) + chr(0b110101) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(55), 34327 - 34319), nzTpIcepk0o8(chr(0b110000) + chr(7611 - 7500) + chr(0b110010) + chr(0b1111 + 0o46) + '\064', 15661 - 15653), nzTpIcepk0o8('\060' + chr(111) + chr(0b11101 + 0o24) + '\x37' + chr(50), 36658 - 36650), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\157' + chr(0b110010) + chr(0b110111) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1010111 + 0o30) + chr(0b1100 + 0o45) + chr(0b110100) + '\064', 5750 - 5742), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(0b110100), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\066' + chr(55), 14112 - 14104), nzTpIcepk0o8(chr(67 - 19) + chr(0b1101110 + 0o1) + chr(0b110111) + '\x30', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11 + 0o60) + chr(2105 - 2052), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + chr(0b110111) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + chr(1068 - 1019) + chr(582 - 528), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b100101 + 0o14) + chr(0b1011 + 0o50) + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b100100 + 0o16) + chr(0b110001) + '\064', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(50) + chr(1606 - 1554), ord("\x08")), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + chr(0b100111 + 0o12) + '\x34' + '\066', 0o10), nzTpIcepk0o8(chr(331 - 283) + '\157' + chr(2242 - 2191) + chr(0b110010 + 0o1) + chr(194 - 145), 0b1000), nzTpIcepk0o8('\060' + chr(0b1011111 + 0o20) + chr(49) + '\062' + chr(0b110101), 12315 - 12307), nzTpIcepk0o8(chr(48) + '\157' + chr(0b111 + 0o54) + chr(0b11010 + 0o27) + chr(0b110000 + 0o2), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\065' + chr(0b101111 + 0o1), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(620 - 570) + chr(0b110001) + chr(2093 - 2042), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + '\x30' + '\062', 0b1000), nzTpIcepk0o8(chr(847 - 799) + chr(111) + chr(1975 - 1925) + '\x32' + '\065', 0o10), nzTpIcepk0o8(chr(420 - 372) + chr(0b1101111) + chr(1732 - 1682) + chr(0b101100 + 0o11) + chr(0b1111 + 0o44), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1001011 + 0o44) + chr(49), 15560 - 15552), nzTpIcepk0o8(chr(0b110000) + chr(0b1011001 + 0o26) + '\061' + chr(49) + '\x36', 22127 - 22119), nzTpIcepk0o8('\x30' + '\157' + chr(0b100101 + 0o15) + chr(2347 - 2297) + chr(1675 - 1626), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(2255 - 2207) + '\x6f' + chr(2800 - 2747) + chr(137 - 89), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'1'), '\144' + chr(2448 - 2347) + '\143' + chr(9506 - 9395) + chr(0b110010 + 0o62) + chr(0b101100 + 0o71))(chr(0b1110101) + chr(0b1110100) + chr(0b1100011 + 0o3) + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def JJhwMnHxsb2c(hXMPsSrOQzbh, lV7fd2Cq53hp, fXJOkxXvZqV_, zjqsTLZbYv6f=nzTpIcepk0o8(chr(2127 - 2079) + '\157' + '\061', 8)):
if lV7fd2Cq53hp in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\x87\xd6\xd9\xa4\x03o9\xac\x12\xba%'), chr(7893 - 7793) + chr(0b1100101) + chr(0b1100011) + chr(3890 - 3779) + chr(100) + chr(101))(chr(117) + chr(116) + chr(3957 - 3855) + '\055' + '\x38')):
raise XMkVTjbRdGKs(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'M\xa6\xcf\xf5\xa6\x16q6\xba?\xad\x1cr\xc9\t\xca-h\rC`'), '\x64' + chr(5872 - 5771) + chr(0b1100011) + chr(2495 - 2384) + '\x64' + chr(0b1100101))(chr(0b10011 + 0o142) + chr(0b101110 + 0o106) + chr(783 - 681) + '\x2d' + '\070'), roI3spqORKae(ES5oEprVxulp(b"n\xf0\x89\xcd\x84\x05x?\xcb\x12\x8b'"), '\144' + chr(0b11110 + 0o107) + chr(9099 - 9000) + '\157' + chr(0b1100100) + chr(5919 - 5818))(chr(0b1110101) + chr(2270 - 2154) + chr(102) + chr(0b10 + 0o53) + '\070'))(lV7fd2Cq53hp))
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'@\xa7\xfe\xe9\xb4X'), chr(100) + '\145' + chr(0b1100011) + chr(8934 - 8823) + chr(100) + chr(0b10110 + 0o117))(chr(117) + chr(351 - 235) + '\146' + chr(0b100101 + 0o10) + '\x38')):
return qbbHsF4hIzMe(a4tUHdendmLw(roI3spqORKae(ES5oEprVxulp(b'r\xa2\xd1\xe3\x91So%\xff>\xbcE.\x8c\x19\xdf\x08`R\\=\x1am\xba<\xfe"7\n\xb6&\xaf\x00\xa2'), chr(100) + chr(3793 - 3692) + '\x63' + '\x6f' + '\x64' + '\x65')(chr(5474 - 5357) + chr(116) + chr(0b1100110) + '\x2d' + chr(0b111000))))
rTmIQRUqvAvx = v_5JLGL_2DSR(hXMPsSrOQzbh.cancelRequest, lV7fd2Cq53hp, rTQ_IW2VS3hY(message=roI3spqORKae(ES5oEprVxulp(b'M\xa6\xcb\xf3\xa6Ejp\xf9"\xba\x1fb\xc0\x1b\xca\rcYqyFp\xb3y\xfbc\'F\xba4\xa4K\xee\xae\xf9\xcee'), chr(0b1100100) + chr(0b1010 + 0o133) + chr(99) + '\x6f' + chr(100) + '\x65')(chr(13537 - 13420) + chr(0b1100011 + 0o21) + chr(0b110 + 0o140) + '\x2d' + chr(307 - 251)).q33KG3foQ_CJ(lV7fd2Cq53hp)))
xayVtHcr1F96 = ixAGPDUrRIj0(lV7fd2Cq53hp, fXJOkxXvZqV_, zjqsTLZbYv6f, rTmIQRUqvAvx)
hXMPsSrOQzbh.dDl_g5qi6_rH[lV7fd2Cq53hp] = xayVtHcr1F96
roI3spqORKae(xayVtHcr1F96.d, roI3spqORKae(ES5oEprVxulp(b'~\xa7\xde\xc3\xb1D|1\xf9&'), '\144' + chr(101) + chr(3312 - 3213) + chr(111) + '\x64' + chr(9114 - 9013))('\165' + chr(0b1110100) + '\x66' + chr(840 - 795) + chr(56)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'@\xab\xdb\xe8\xa7Z{\x02\xff<\xbd\x08t\xd8<\xdf\r`BJx'), chr(100) + chr(7995 - 7894) + '\143' + chr(0b1101111) + chr(100) + '\145')('\165' + '\x74' + '\146' + '\055' + chr(0b1000 + 0o60))), lV7fd2Cq53hp)
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'j\xab\xf2\xb4\xb2G*3\xa2}\xfc"'), '\144' + chr(2460 - 2359) + '\143' + chr(111) + chr(0b111 + 0o135) + '\145')(chr(2339 - 2222) + chr(8563 - 8447) + '\x66' + chr(45) + '\070')):
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'@\xb0\xdf\xe8\xa7d{!\xef(\xbb\x19'), chr(0b1001111 + 0o25) + chr(3236 - 3135) + chr(0b1001 + 0o132) + '\157' + '\144' + '\145')('\165' + '\x74' + chr(3714 - 3612) + chr(1314 - 1269) + chr(56)))(xayVtHcr1F96)
elif not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b']\xad\xce\xe8\xfal}\x14\xee|\xfc\x02'), '\144' + '\145' + '\x63' + '\x6f' + '\144' + chr(7215 - 7114))(chr(2196 - 2079) + chr(13455 - 13339) + '\x66' + chr(1975 - 1930) + '\x38')):
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'@\xa0\xd5\xe8\xadS}$'), '\144' + '\145' + '\x63' + '\x6f' + '\x64' + chr(0b101011 + 0o72))(chr(12109 - 11992) + chr(0b1110100) + '\x66' + '\x2d' + chr(1833 - 1777)))()
return roI3spqORKae(xayVtHcr1F96, roI3spqORKae(ES5oEprVxulp(b'i\x93\xea\xea\x8cnO7\xc8~\x9b '), '\144' + chr(101) + chr(99) + '\x6f' + '\x64' + '\145')(chr(5841 - 5724) + chr(0b1110100) + chr(0b1011100 + 0o12) + chr(45) + '\x38')) |
ciena/afkak | afkak/brokerclient.py | _KafkaBrokerClient.disconnect | def disconnect(self):
"""
Disconnect from the Kafka broker.
This is used to implement disconnection on timeout as a workaround for
Kafka connections occasionally getting stuck on the server side under
load. Requests are not cancelled, so they will be retried.
"""
if self.proto:
log.debug('%r Disconnecting from %r', self, self.proto.transport.getPeer())
self.proto.transport.loseConnection() | python | def disconnect(self):
"""
Disconnect from the Kafka broker.
This is used to implement disconnection on timeout as a workaround for
Kafka connections occasionally getting stuck on the server side under
load. Requests are not cancelled, so they will be retried.
"""
if self.proto:
log.debug('%r Disconnecting from %r', self, self.proto.transport.getPeer())
self.proto.transport.loseConnection() | [
"def",
"disconnect",
"(",
"self",
")",
":",
"if",
"self",
".",
"proto",
":",
"log",
".",
"debug",
"(",
"'%r Disconnecting from %r'",
",",
"self",
",",
"self",
".",
"proto",
".",
"transport",
".",
"getPeer",
"(",
")",
")",
"self",
".",
"proto",
".",
"transport",
".",
"loseConnection",
"(",
")"
] | Disconnect from the Kafka broker.
This is used to implement disconnection on timeout as a workaround for
Kafka connections occasionally getting stuck on the server side under
load. Requests are not cancelled, so they will be retried. | [
"Disconnect",
"from",
"the",
"Kafka",
"broker",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/brokerclient.py#L196-L206 | train | Disconnect from the Kafka broker. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHx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N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1334 - 1286) + chr(11000 - 10889) + '\x33' + chr(55) + '\x30', 0b1000), nzTpIcepk0o8(chr(2202 - 2154) + chr(111) + '\x37' + chr(0b110010), 45530 - 45522), nzTpIcepk0o8('\x30' + chr(9507 - 9396) + '\064' + '\x35', 0b1000), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\157' + chr(1296 - 1242), 18294 - 18286), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2540 - 2486) + '\065', 0b1000), nzTpIcepk0o8(chr(2050 - 2002) + chr(0b1101111) + chr(0b111 + 0o54) + chr(0b110110) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\157' + chr(50) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b101 + 0o56) + chr(2103 - 2054) + chr(49), 20819 - 20811), nzTpIcepk0o8(chr(831 - 783) + '\157' + chr(2401 - 2351) + '\x37', 0b1000), nzTpIcepk0o8('\060' + chr(1739 - 1628) + chr(0b10000 + 0o43) + chr(0b10010 + 0o44) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(8209 - 8098) + '\x32' + '\062' + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\157' + '\x32' + chr(49) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + '\065' + chr(1293 - 1242), 22661 - 22653), nzTpIcepk0o8('\x30' + chr(10716 - 10605) + '\063' + chr(1231 - 1179) + chr(1972 - 1924), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + '\x34' + '\065', 10844 - 10836), nzTpIcepk0o8('\060' + chr(8581 - 8470) + '\x31' + chr(54), 51760 - 51752), nzTpIcepk0o8(chr(2248 - 2200) + chr(4778 - 4667) + chr(1139 - 1088) + chr(0b110100) + chr(48), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2440 - 2387) + chr(0b110011), 47401 - 47393), nzTpIcepk0o8('\060' + chr(111) + chr(49) + '\x31' + chr(51), 0b1000), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + chr(0b11111 + 0o22), 54811 - 54803), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\157' + chr(1095 - 1046) + chr(0b11100 + 0o32) + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\062' + '\x33' + chr(0b110101 + 0o2), 38502 - 38494), nzTpIcepk0o8('\x30' + '\157' + chr(1761 - 1712) + '\060' + '\x31', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(0b1000 + 0o52) + chr(1220 - 1165), 14875 - 14867), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(111) + chr(49) + '\x35' + chr(49), 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + '\063' + '\060' + chr(0b11011 + 0o32), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(50) + '\x30', 19452 - 19444), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(0b100011 + 0o24) + chr(1611 - 1559), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b110000 + 0o77) + chr(0b101101 + 0o12) + chr(0b10101 + 0o33), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b110010) + chr(2359 - 2304), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + '\x30' + chr(0b1100 + 0o51), 0o10), nzTpIcepk0o8('\060' + chr(11476 - 11365) + chr(0b110 + 0o56), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2203 - 2153) + chr(1629 - 1575) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(1631 - 1583) + chr(0b1101111) + chr(2388 - 2338) + '\065' + chr(0b101111 + 0o10), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + '\066' + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b1010 + 0o54) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(0b110001) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + chr(49) + '\062' + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(0b110 + 0o53) + '\x31', 29396 - 29388), nzTpIcepk0o8(chr(48) + chr(5101 - 4990) + chr(1679 - 1629) + chr(53) + chr(54), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(190 - 142) + chr(1027 - 916) + '\x35' + chr(48), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd6'), chr(9130 - 9030) + '\145' + '\143' + chr(0b1101111) + '\x64' + '\x65')('\x75' + chr(116) + '\x66' + '\055' + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def m7kg3HT9xtZN(hXMPsSrOQzbh):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x8dRm4D\x84"\xaa/\xc3\xa0\xc3'), chr(100) + '\x65' + chr(0b1011111 + 0o4) + '\x6f' + '\x64' + chr(0b1100101))('\165' + chr(116) + chr(1947 - 1845) + '\055' + '\x38')):
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\x9f{\x1c\\\x0c\x91y\xffB\x9e\xd1\xd6'), '\144' + '\145' + '\x63' + chr(111) + chr(100) + chr(0b11001 + 0o114))(chr(10241 - 10124) + '\x74' + '\146' + '\x2d' + chr(1794 - 1738)))(roI3spqORKae(ES5oEprVxulp(b'\xddH\x05B\\\x86u\xa6y\x9d\xf1\xef\x1f\x89\x8bi\xc0M9n\x19\xbfd\xa5'), '\x64' + chr(0b1010110 + 0o17) + chr(0b1100011) + '\157' + chr(5551 - 5451) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(6139 - 6037) + chr(45) + chr(56)), hXMPsSrOQzbh, roI3spqORKae(hXMPsSrOQzbh.proto.transport, roI3spqORKae(ES5oEprVxulp(b'\x9f_QVP\x90d'), '\144' + chr(0b1011001 + 0o14) + chr(99) + '\157' + chr(100) + chr(0b1100100 + 0o1))(chr(0b1110101) + chr(0b100110 + 0o116) + '\x66' + chr(45) + chr(0b111000)))())
roI3spqORKae(hXMPsSrOQzbh.proto.transport, roI3spqORKae(ES5oEprVxulp(b'\x94UVcv\x9ax\xa7r\x90\xe0\xe5\x04\x8e'), chr(100) + chr(0b1100101) + '\143' + '\157' + chr(0b1100100) + '\145')(chr(117) + '\164' + chr(3839 - 3737) + chr(0b101101) + chr(0b111000)))() |
ciena/afkak | afkak/brokerclient.py | _KafkaBrokerClient.close | def close(self):
"""Permanently dispose of the broker client.
This terminates any outstanding connection and cancels any pending
requests.
"""
log.debug('%r: close() proto=%r connector=%r', self, self.proto, self.connector)
assert self._dDown is None
self._dDown = Deferred()
if self.proto is not None:
self.proto.transport.loseConnection()
elif self.connector is not None:
def connectingFailed(reason):
"""
Handle the failure resulting from cancellation.
:reason: a `Failure`, most likely a cancellation error (but
that's not guaranteed).
:returns: `None` to handle the failure
"""
log.debug('%r: connection attempt has been cancelled: %r', self, reason)
self._dDown.callback(None)
self.connector.addErrback(connectingFailed)
self.connector.cancel()
else:
# Fake a cleanly closing connection
self._dDown.callback(None)
try:
raise CancelledError(message="Broker client for node_id={} {}:{} was closed".format(
self.node_id, self.host, self.port))
except Exception:
reason = Failure()
# Cancel any requests
for correlation_id in list(self.requests.keys()): # must copy, may del
self.cancelRequest(correlation_id, reason)
return self._dDown | python | def close(self):
"""Permanently dispose of the broker client.
This terminates any outstanding connection and cancels any pending
requests.
"""
log.debug('%r: close() proto=%r connector=%r', self, self.proto, self.connector)
assert self._dDown is None
self._dDown = Deferred()
if self.proto is not None:
self.proto.transport.loseConnection()
elif self.connector is not None:
def connectingFailed(reason):
"""
Handle the failure resulting from cancellation.
:reason: a `Failure`, most likely a cancellation error (but
that's not guaranteed).
:returns: `None` to handle the failure
"""
log.debug('%r: connection attempt has been cancelled: %r', self, reason)
self._dDown.callback(None)
self.connector.addErrback(connectingFailed)
self.connector.cancel()
else:
# Fake a cleanly closing connection
self._dDown.callback(None)
try:
raise CancelledError(message="Broker client for node_id={} {}:{} was closed".format(
self.node_id, self.host, self.port))
except Exception:
reason = Failure()
# Cancel any requests
for correlation_id in list(self.requests.keys()): # must copy, may del
self.cancelRequest(correlation_id, reason)
return self._dDown | [
"def",
"close",
"(",
"self",
")",
":",
"log",
".",
"debug",
"(",
"'%r: close() proto=%r connector=%r'",
",",
"self",
",",
"self",
".",
"proto",
",",
"self",
".",
"connector",
")",
"assert",
"self",
".",
"_dDown",
"is",
"None",
"self",
".",
"_dDown",
"=",
"Deferred",
"(",
")",
"if",
"self",
".",
"proto",
"is",
"not",
"None",
":",
"self",
".",
"proto",
".",
"transport",
".",
"loseConnection",
"(",
")",
"elif",
"self",
".",
"connector",
"is",
"not",
"None",
":",
"def",
"connectingFailed",
"(",
"reason",
")",
":",
"\"\"\"\n Handle the failure resulting from cancellation.\n\n :reason: a `Failure`, most likely a cancellation error (but\n that's not guaranteed).\n :returns: `None` to handle the failure\n \"\"\"",
"log",
".",
"debug",
"(",
"'%r: connection attempt has been cancelled: %r'",
",",
"self",
",",
"reason",
")",
"self",
".",
"_dDown",
".",
"callback",
"(",
"None",
")",
"self",
".",
"connector",
".",
"addErrback",
"(",
"connectingFailed",
")",
"self",
".",
"connector",
".",
"cancel",
"(",
")",
"else",
":",
"# Fake a cleanly closing connection",
"self",
".",
"_dDown",
".",
"callback",
"(",
"None",
")",
"try",
":",
"raise",
"CancelledError",
"(",
"message",
"=",
"\"Broker client for node_id={} {}:{} was closed\"",
".",
"format",
"(",
"self",
".",
"node_id",
",",
"self",
".",
"host",
",",
"self",
".",
"port",
")",
")",
"except",
"Exception",
":",
"reason",
"=",
"Failure",
"(",
")",
"# Cancel any requests",
"for",
"correlation_id",
"in",
"list",
"(",
"self",
".",
"requests",
".",
"keys",
"(",
")",
")",
":",
"# must copy, may del",
"self",
".",
"cancelRequest",
"(",
"correlation_id",
",",
"reason",
")",
"return",
"self",
".",
"_dDown"
] | Permanently dispose of the broker client.
This terminates any outstanding connection and cancels any pending
requests. | [
"Permanently",
"dispose",
"of",
"the",
"broker",
"client",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/brokerclient.py#L208-L246 | train | Permanently close the broker client. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,d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bWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1654 - 1606) + chr(111) + chr(0b100100 + 0o15) + chr(0b110010 + 0o2) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b1011 + 0o47), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + '\x33' + chr(2480 - 2427), 0o10), nzTpIcepk0o8(chr(48) + chr(0b100100 + 0o113) + '\067' + chr(49), 46967 - 46959), nzTpIcepk0o8(chr(0b110000) + chr(8984 - 8873) + chr(0b10110 + 0o37) + chr(923 - 874), 28045 - 28037), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b100010 + 0o115) + chr(1730 - 1677) + '\063', 54552 - 54544), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(1837 - 1784) + chr(79 - 31), ord("\x08")), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(111) + chr(0b100100 + 0o15) + chr(1309 - 1261) + chr(0b100111 + 0o14), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110100 + 0o73) + '\062' + chr(166 - 118) + chr(48), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x35' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1011 + 0o144) + chr(49) + '\x31' + chr(49), 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1101111) + chr(1143 - 1093) + '\x33' + '\063', ord("\x08")), nzTpIcepk0o8(chr(1187 - 1139) + chr(12042 - 11931) + chr(50) + '\x31' + '\x34', 24468 - 24460), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11101 + 0o30) + chr(0b101100 + 0o6), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(50) + '\062' + chr(0b101000 + 0o10), 0b1000), nzTpIcepk0o8(chr(48) + chr(4161 - 4050) + '\x33' + '\067' + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(53) + '\066', 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + chr(1506 - 1456) + '\x33' + chr(0b1100 + 0o45), 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\x6f' + chr(0b10101 + 0o35) + chr(0b100010 + 0o24) + chr(1185 - 1130), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1000 + 0o53) + chr(1115 - 1067) + chr(50), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b1 + 0o62) + chr(0b110101) + chr(259 - 211), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(6341 - 6230) + '\063' + chr(0b110 + 0o54) + chr(0b11111 + 0o22), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(48) + '\066', 0b1000), nzTpIcepk0o8(chr(651 - 603) + chr(0b1101111) + '\x31' + '\x33' + chr(0b1010 + 0o47), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1000 + 0o52) + '\x33' + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + '\061' + chr(0b110000), 32088 - 32080), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(0b100100 + 0o22) + '\067', 8), nzTpIcepk0o8(chr(406 - 358) + '\x6f' + '\x31' + chr(50) + chr(52), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(0b10000 + 0o45) + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b100101 + 0o112) + chr(0b110010) + chr(0b100100 + 0o21), 9565 - 9557), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(111) + chr(78 - 28) + '\064', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10110 + 0o35) + chr(1449 - 1401) + chr(0b101111 + 0o5), ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + chr(0b0 + 0o62) + chr(55) + '\x30', 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + '\x31' + '\x32' + chr(543 - 490), 61934 - 61926), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(3467 - 3356) + chr(0b110010) + chr(0b11100 + 0o27) + '\067', 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x32' + '\x32' + chr(0b110101), 65420 - 65412), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(1534 - 1485) + '\x36', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1010111 + 0o30) + chr(1000 - 951) + chr(0b1 + 0o61), ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b1101111) + chr(326 - 276) + chr(0b1101 + 0o46) + '\x37', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + chr(0b110101) + chr(1702 - 1654), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'L'), '\x64' + chr(0b1011011 + 0o12) + '\143' + chr(0b1101111) + '\x64' + '\145')(chr(0b11101 + 0o130) + chr(0b1110100) + chr(0b1100110) + chr(1245 - 1200) + chr(976 - 920)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def Zeq7Ccf9Ud8j(hXMPsSrOQzbh):
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\x05[\xe4c\x10O\x07u\xd5E\x0c\xc1'), chr(100) + chr(0b1101 + 0o130) + '\143' + '\157' + chr(0b111100 + 0o50) + chr(4633 - 4532))(chr(5789 - 5672) + chr(0b1110100) + chr(0b1100110) + chr(1264 - 1219) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'Gh\xe7\x19JG\x070\xe5\x00`\xbb\xfcX\xff\x89A\xa4\x92r\xe2\x8b\xbe(7\xf8\xab\xc3;\x9e(1\xb6'), chr(0b1000110 + 0o36) + chr(0b1100101) + chr(8971 - 8872) + '\x6f' + chr(0b1100100) + chr(101))(chr(0b1110101) + '\164' + '\146' + chr(1065 - 1020) + chr(56)), hXMPsSrOQzbh, roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x17r\x95\x0bXZ\\ \xb8\x18}\xd4'), chr(0b100100 + 0o100) + chr(0b110111 + 0o56) + chr(8426 - 8327) + chr(111) + chr(3183 - 3083) + chr(101))(chr(0b1110101) + chr(0b1010111 + 0o35) + chr(0b10010 + 0o124) + chr(0b101101) + chr(0b111000))), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b' t\xa9W\x10q\x0b\x07\xf4\x19}\xf4'), '\144' + chr(6658 - 6557) + '\143' + chr(0b1101111) + '\x64' + chr(0b1000011 + 0o42))('\165' + chr(116) + chr(9356 - 9254) + '\055' + '\x38')))
assert roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'=~\x99V^E'), '\x64' + '\145' + chr(0b1100011) + chr(0b110011 + 0o74) + '\x64' + chr(0b1100101))('\165' + '\x74' + chr(0b1100110) + '\055' + chr(0b101111 + 0o11))) is None
hXMPsSrOQzbh.mzWIMViPyxJ0 = LbNAbjjo5q4l()
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x17r\x95\x0bXZ\\ \xb8\x18}\xd4'), '\144' + '\145' + '\143' + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(9924 - 9807) + '\x74' + '\x66' + '\055' + chr(56))) is not None:
roI3spqORKae(hXMPsSrOQzbh.proto.transport, roI3spqORKae(ES5oEprVxulp(b'\x0eu\xae\\jD\x06-\xe5K=\xf2\xe3D'), chr(2032 - 1932) + '\x65' + '\x63' + chr(111) + chr(0b1010 + 0o132) + chr(101))(chr(5767 - 5650) + '\164' + chr(0b1100011 + 0o3) + chr(0b1100 + 0o41) + '\x38'))()
elif roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b' t\xa9W\x10q\x0b\x07\xf4\x19}\xf4'), '\144' + chr(6419 - 6318) + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(0b1000001 + 0o44))('\165' + chr(10608 - 10492) + chr(336 - 234) + chr(1033 - 988) + chr(0b111000))) is not None:
def Fd8TXK9LFz_r(RhxFF63tBU4y):
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\x05[\xe4c\x10O\x07u\xd5E\x0c\xc1'), chr(0b1011011 + 0o11) + '\145' + '\143' + chr(0b100 + 0o153) + chr(100) + chr(0b10111 + 0o116))('\165' + chr(11313 - 11197) + '\146' + chr(0b10000 + 0o35) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'Gh\xe7\x19JD\x06-\xe5K=\xf2\xe3D\xb0\x9cZ\xed\xd2m\xb2\x9c\xf1.8\xee\xe8\xd51\x89{4\xa7\xd9;\xfc\xf0\xa2f\xfa\x06 \xfd\x1c['), chr(0b1001010 + 0o32) + chr(0b1001110 + 0o27) + '\143' + chr(10529 - 10418) + '\144' + chr(0b101 + 0o140))('\x75' + chr(12536 - 12420) + chr(0b1011100 + 0o12) + '\x2d' + chr(0b111000)), hXMPsSrOQzbh, RhxFF63tBU4y)
roI3spqORKae(hXMPsSrOQzbh._dDown, roI3spqORKae(ES5oEprVxulp(b'\x08]\xe8r|\x1f=\x16\xc7F"\xae'), '\144' + chr(101) + chr(0b1010 + 0o131) + chr(0b1101111) + '\144' + '\145')('\x75' + '\164' + chr(102) + chr(45) + chr(0b111000)))(None)
roI3spqORKae(hXMPsSrOQzbh.connector, roI3spqORKae(ES5oEprVxulp(b'\x03~\xb9|[Y\n"\xe3C'), '\x64' + chr(101) + chr(99) + chr(0b1100111 + 0o10) + '\144' + '\145')('\x75' + '\164' + chr(9636 - 9534) + chr(45) + '\070'))(Fd8TXK9LFz_r)
roI3spqORKae(hXMPsSrOQzbh.connector, roI3spqORKae(ES5oEprVxulp(b'\x01{\xb3ZLG'), '\x64' + '\145' + chr(0b1100011) + chr(0b1101111) + '\x64' + '\x65')('\x75' + '\x74' + chr(5303 - 5201) + chr(45) + chr(0b1111 + 0o51)))()
else:
roI3spqORKae(hXMPsSrOQzbh._dDown, roI3spqORKae(ES5oEprVxulp(b'\x08]\xe8r|\x1f=\x16\xc7F"\xae'), chr(0b1100100) + '\x65' + chr(5573 - 5474) + chr(111) + chr(0b111110 + 0o46) + chr(8325 - 8224))(chr(2459 - 2342) + '\164' + chr(0b101010 + 0o74) + chr(0b11010 + 0o23) + chr(56)))(None)
try:
raise rTQ_IW2VS3hY(message=roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b' h\xb2RLYH \xecA,\xf5\xf8\n\xf6\x92\\\xb9\xd9o\xa6\x8d\x8e/=\xa0\xb3\xcat\x97h.\xbf\xc5u\xe8\xf4\xbd*\xfc\x0eu\xae\\M'), chr(4805 - 4705) + chr(0b1100101) + '\143' + chr(111) + '\144' + chr(0b10111 + 0o116))(chr(0b11101 + 0o130) + chr(0b1110100) + chr(0b110000 + 0o66) + '\055' + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\x13)\xeern\x18\x0e,\xd1w\n\xd1'), chr(0b1010110 + 0o16) + chr(0b1000001 + 0o44) + chr(0b1100011) + chr(9786 - 9675) + '\144' + '\145')(chr(10082 - 9965) + chr(116) + '\x66' + '\055' + chr(2457 - 2401)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x0e.\xb8SdO0"\xb7f \xea'), chr(0b1010000 + 0o24) + chr(0b1100101) + chr(4473 - 4374) + chr(111) + chr(100) + chr(0b1010101 + 0o20))('\165' + chr(116) + '\x66' + chr(0b10101 + 0o30) + chr(56))), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"7y\x87VOf\t'\xc9\x1d!\xdf"), '\x64' + chr(9766 - 9665) + '\143' + chr(2436 - 2325) + chr(0b1100100) + chr(0b10010 + 0o123))(chr(117) + chr(0b1010000 + 0o44) + chr(0b1100110) + chr(579 - 534) + '\x38')), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'$Q\x8a{Fx,\x1a\xb8y:\xa9'), '\144' + chr(0b1100101) + chr(99) + chr(111) + chr(7782 - 7682) + chr(8343 - 8242))(chr(0b1010110 + 0o37) + chr(12721 - 12605) + chr(0b1100110) + '\055' + chr(0b110100 + 0o4)))))
except zfo2Sgkz3IVJ:
RhxFF63tBU4y = WqTcOGBMJIY7()
for tL7r6ZE6GOf3 in H4NoA26ON7iG(roI3spqORKae(hXMPsSrOQzbh.requests, roI3spqORKae(ES5oEprVxulp(b'\t\x7f\xa4J'), '\144' + chr(101) + chr(0b1100011) + chr(2725 - 2614) + '\x64' + '\145')(chr(10516 - 10399) + '\x74' + chr(0b1100110) + chr(0b100011 + 0o12) + '\070'))()):
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x01{\xb3ZLG:&\xf1],\xe8\xf8'), chr(2736 - 2636) + chr(2348 - 2247) + '\x63' + chr(111) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b101 + 0o157) + chr(0b1100110) + '\055' + chr(2224 - 2168)))(tL7r6ZE6GOf3, RhxFF63tBU4y)
return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x0f`\x8apd}\x01\x13\xf9P\x03\xab'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(111) + '\144' + chr(0b1100101))('\x75' + chr(12250 - 12134) + chr(8976 - 8874) + chr(45) + '\070')) |
ciena/afkak | afkak/brokerclient.py | _KafkaBrokerClient._connectionLost | def _connectionLost(self, reason):
"""Called when the protocol connection is lost
- Log the disconnection.
- Mark any outstanding requests as unsent so they will be sent when
a new connection is made.
- If closing the broker client, mark completion of that process.
:param reason:
Failure that indicates the reason for disconnection.
"""
log.info('%r: Connection closed: %r', self, reason)
# Reset our proto so we don't try to send to a down connection
self.proto = None
# Mark any in-flight requests as unsent.
for tReq in self.requests.values():
tReq.sent = False
if self._dDown:
self._dDown.callback(None)
elif self.requests:
self._connect() | python | def _connectionLost(self, reason):
"""Called when the protocol connection is lost
- Log the disconnection.
- Mark any outstanding requests as unsent so they will be sent when
a new connection is made.
- If closing the broker client, mark completion of that process.
:param reason:
Failure that indicates the reason for disconnection.
"""
log.info('%r: Connection closed: %r', self, reason)
# Reset our proto so we don't try to send to a down connection
self.proto = None
# Mark any in-flight requests as unsent.
for tReq in self.requests.values():
tReq.sent = False
if self._dDown:
self._dDown.callback(None)
elif self.requests:
self._connect() | [
"def",
"_connectionLost",
"(",
"self",
",",
"reason",
")",
":",
"log",
".",
"info",
"(",
"'%r: Connection closed: %r'",
",",
"self",
",",
"reason",
")",
"# Reset our proto so we don't try to send to a down connection",
"self",
".",
"proto",
"=",
"None",
"# Mark any in-flight requests as unsent.",
"for",
"tReq",
"in",
"self",
".",
"requests",
".",
"values",
"(",
")",
":",
"tReq",
".",
"sent",
"=",
"False",
"if",
"self",
".",
"_dDown",
":",
"self",
".",
"_dDown",
".",
"callback",
"(",
"None",
")",
"elif",
"self",
".",
"requests",
":",
"self",
".",
"_connect",
"(",
")"
] | Called when the protocol connection is lost
- Log the disconnection.
- Mark any outstanding requests as unsent so they will be sent when
a new connection is made.
- If closing the broker client, mark completion of that process.
:param reason:
Failure that indicates the reason for disconnection. | [
"Called",
"when",
"the",
"protocol",
"connection",
"is",
"lost"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/brokerclient.py#L252-L275 | train | Called when the protocol connection is lost. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,E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Kae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(0b101100 + 0o103) + '\x33' + chr(51), 41203 - 41195), nzTpIcepk0o8('\x30' + '\157' + chr(2192 - 2143) + chr(0b101011 + 0o13) + chr(482 - 430), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100 + 0o56) + '\061' + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1011001 + 0o26) + chr(2209 - 2159) + chr(0b10111 + 0o31) + chr(1047 - 998), 13941 - 13933), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + '\065' + chr(0b10000 + 0o43), 0b1000), nzTpIcepk0o8(chr(1476 - 1428) + '\157' + chr(0b10110 + 0o35) + chr(55) + chr(2437 - 2385), 15727 - 15719), nzTpIcepk0o8(chr(48) + chr(10791 - 10680) + '\063' + chr(1890 - 1839) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(53) + chr(1493 - 1438), 22864 - 22856), nzTpIcepk0o8('\x30' + chr(1547 - 1436) + chr(50) + chr(0b110010) + chr(54), 0o10), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1001111 + 0o40) + chr(2264 - 2214) + chr(142 - 87) + chr(0b110111), 17867 - 17859), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + chr(0b100111 + 0o12) + chr(0b110100), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x32' + '\x36', 0b1000), nzTpIcepk0o8(chr(2288 - 2240) + '\157' + chr(49) + chr(53) + chr(0b101 + 0o60), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x36' + chr(2391 - 2336), 0o10), nzTpIcepk0o8(chr(1801 - 1753) + '\157' + chr(50) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b101111 + 0o100) + chr(49) + chr(53) + chr(0b111 + 0o57), 0b1000), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + chr(51) + chr(1420 - 1372) + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(50) + '\x37' + chr(0b100010 + 0o25), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + chr(200 - 148) + '\x34', 56167 - 56159), nzTpIcepk0o8(chr(48) + chr(0b11 + 0o154) + chr(0b110011) + chr(0b110011) + chr(0b1011 + 0o50), 8), nzTpIcepk0o8(chr(108 - 60) + chr(10973 - 10862) + '\062' + chr(1649 - 1598) + '\x37', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2142 - 2092) + '\x33' + '\060', 15479 - 15471), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b110000 + 0o7) + chr(0b1011 + 0o51), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + '\x34' + '\061', 0o10), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + chr(55) + chr(0b110001 + 0o4), 55336 - 55328), nzTpIcepk0o8(chr(1120 - 1072) + chr(0b101100 + 0o103) + chr(0b110000 + 0o2) + chr(48) + chr(2365 - 2310), 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(6433 - 6322) + chr(0b10010 + 0o36), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(1871 - 1760) + chr(50) + '\x32', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(1619 - 1569) + chr(2157 - 2102), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1000111 + 0o50) + '\061' + chr(0b110100) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10100 + 0o42) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(0b10010 + 0o45) + chr(0b1000 + 0o52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1633 - 1582) + chr(58 - 10) + '\x32', 28784 - 28776), nzTpIcepk0o8(chr(1164 - 1116) + chr(0b1101111) + chr(0b100010 + 0o21) + chr(0b110010) + chr(0b110110), 2540 - 2532), nzTpIcepk0o8(chr(48) + chr(5327 - 5216) + chr(51) + '\067' + '\060', 34038 - 34030), nzTpIcepk0o8('\060' + '\157' + '\x33' + '\x32' + '\x31', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(0b11101 + 0o27) + '\062', 47151 - 47143), nzTpIcepk0o8(chr(765 - 717) + chr(0b1101111) + chr(2149 - 2100) + chr(0b110101) + chr(0b1110 + 0o47), 8), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(1031 - 977) + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(2696 - 2643) + '\063', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(2256 - 2208) + chr(0b1101111) + chr(1495 - 1442) + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'5'), '\144' + chr(0b100110 + 0o77) + '\x63' + chr(0b1101111) + chr(624 - 524) + chr(288 - 187))(chr(0b1110101) + '\x74' + '\146' + chr(45) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def JU83x3MEqu61(hXMPsSrOQzbh, RhxFF63tBU4y):
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'r\x0c\xc2\xf9\x92\xb0\xacp\xa7\xd8>Y'), '\144' + '\145' + '\x63' + chr(1466 - 1355) + chr(0b1100100) + chr(3072 - 2971))(chr(0b1110101) + chr(0b11100 + 0o130) + chr(0b1011111 + 0o7) + chr(696 - 651) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'>\x06\xb6\xa1\xe8\x93\xb5A\xf3\xdc8\x7f\x02Y2\r\xac\xd0\xd7\xbe\xfb\xa2\x9c\x84O'), chr(0b11110 + 0o106) + chr(0b100100 + 0o101) + chr(0b10011 + 0o120) + chr(111) + '\x64' + chr(101))('\x75' + chr(952 - 836) + '\x66' + chr(45) + chr(0b10001 + 0o47)), hXMPsSrOQzbh, RhxFF63tBU4y)
hXMPsSrOQzbh.uhH2qq4c804O = None
for xayVtHcr1F96 in roI3spqORKae(hXMPsSrOQzbh.requests, roI3spqORKae(ES5oEprVxulp(b'X\x07\xe3\xe5\xf1\xb6\x93\x19\xee\x86\x18n'), '\x64' + chr(0b1100101) + '\143' + chr(111) + chr(0b1100100) + '\x65')('\165' + '\x74' + '\146' + chr(0b101010 + 0o3) + chr(0b110 + 0o62)))():
xayVtHcr1F96.KCSwZZoid0kT = nzTpIcepk0o8(chr(48) + '\x6f' + '\x30', 8)
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'v\x0e\xdb\xc8\xe6\xaa\xb2\x7f\xef\xc7\x06&'), chr(7266 - 7166) + chr(101) + chr(99) + chr(0b11100 + 0o123) + '\144' + '\x65')(chr(13636 - 13519) + chr(2471 - 2355) + '\x66' + chr(0b11110 + 0o17) + '\070')):
roI3spqORKae(hXMPsSrOQzbh._dDown, roI3spqORKae(ES5oEprVxulp(b"q3\xb9\xca\xfe\xc8\x8ez\xd1\xd1'#"), '\144' + chr(0b1100101) + '\x63' + '\157' + chr(0b1000010 + 0o42) + chr(7220 - 7119))('\165' + chr(0b1110100) + chr(0b1100101 + 0o1) + '\055' + chr(56)))(None)
elif roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x7f0\xe0\xde\xcc\xc9\xaaF\xa0\xe0>^'), chr(0b1100100) + chr(0b1100101) + '\143' + '\157' + chr(0b1001 + 0o133) + chr(5957 - 5856))(chr(0b11011 + 0o132) + chr(0b10010 + 0o142) + chr(1408 - 1306) + chr(1291 - 1246) + chr(56))):
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'D\x17\xe3\xef\xc5\x99\xb8['), chr(0b101001 + 0o73) + '\145' + '\143' + '\157' + '\x64' + chr(101))(chr(117) + chr(0b1110100) + '\x66' + chr(45) + chr(0b110001 + 0o7)))() |
ciena/afkak | afkak/brokerclient.py | _KafkaBrokerClient.handleResponse | def handleResponse(self, response):
"""Handle the response string received by KafkaProtocol.
Ok, we've received the response from the broker. Find the requestId
in the message, lookup & fire the deferred with the response.
"""
requestId = KafkaCodec.get_response_correlation_id(response)
# Protect against responses coming back we didn't expect
tReq = self.requests.pop(requestId, None)
if tReq is None:
# This could happen if we've sent it, are waiting on the response
# when it's cancelled, causing us to remove it from self.requests
log.warning('Unexpected response with correlationId=%d: %r',
requestId, reprlib.repr(response))
else:
tReq.d.callback(response) | python | def handleResponse(self, response):
"""Handle the response string received by KafkaProtocol.
Ok, we've received the response from the broker. Find the requestId
in the message, lookup & fire the deferred with the response.
"""
requestId = KafkaCodec.get_response_correlation_id(response)
# Protect against responses coming back we didn't expect
tReq = self.requests.pop(requestId, None)
if tReq is None:
# This could happen if we've sent it, are waiting on the response
# when it's cancelled, causing us to remove it from self.requests
log.warning('Unexpected response with correlationId=%d: %r',
requestId, reprlib.repr(response))
else:
tReq.d.callback(response) | [
"def",
"handleResponse",
"(",
"self",
",",
"response",
")",
":",
"requestId",
"=",
"KafkaCodec",
".",
"get_response_correlation_id",
"(",
"response",
")",
"# Protect against responses coming back we didn't expect",
"tReq",
"=",
"self",
".",
"requests",
".",
"pop",
"(",
"requestId",
",",
"None",
")",
"if",
"tReq",
"is",
"None",
":",
"# This could happen if we've sent it, are waiting on the response",
"# when it's cancelled, causing us to remove it from self.requests",
"log",
".",
"warning",
"(",
"'Unexpected response with correlationId=%d: %r'",
",",
"requestId",
",",
"reprlib",
".",
"repr",
"(",
"response",
")",
")",
"else",
":",
"tReq",
".",
"d",
".",
"callback",
"(",
"response",
")"
] | Handle the response string received by KafkaProtocol.
Ok, we've received the response from the broker. Find the requestId
in the message, lookup & fire the deferred with the response. | [
"Handle",
"the",
"response",
"string",
"received",
"by",
"KafkaProtocol",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/brokerclient.py#L277-L292 | train | Handle the response received by KafkaProtocol. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmW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qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(0b111111 + 0o60) + chr(50) + '\060' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + '\067' + chr(0b1000 + 0o51), 0o10), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\157' + '\x32' + '\065' + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(111) + chr(1355 - 1304) + chr(2053 - 2003) + chr(964 - 914), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + '\x30' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(941 - 830) + chr(51) + '\x33' + '\065', 42280 - 42272), nzTpIcepk0o8(chr(493 - 445) + '\x6f' + chr(0b111 + 0o52) + '\x34' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\157' + '\x33' + '\066', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b101000 + 0o15), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(768 - 719) + chr(0b110100) + '\x31', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1058 - 1007) + chr(0b110111) + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(11830 - 11719) + chr(0b110010) + chr(48) + chr(0b100000 + 0o27), 4010 - 4002), nzTpIcepk0o8(chr(792 - 744) + '\x6f' + chr(119 - 68) + chr(49) + '\061', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b1 + 0o60) + chr(2413 - 2360) + chr(0b110000 + 0o6), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(55) + chr(0b10110 + 0o40), 10840 - 10832), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(111) + chr(50) + '\060' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(9194 - 9083) + chr(0b101101 + 0o6) + chr(2096 - 2047), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b10010 + 0o135) + chr(0b110100) + chr(0b100111 + 0o11), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + '\x32' + chr(845 - 795), 8), nzTpIcepk0o8(chr(214 - 166) + chr(0b1101111) + chr(49) + chr(2923 - 2868) + '\066', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(2849 - 2794) + chr(0b110000), 8), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(0b110 + 0o57) + '\064', 44269 - 44261), nzTpIcepk0o8(chr(783 - 735) + chr(4195 - 4084) + '\x32' + chr(55) + chr(2299 - 2246), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + '\064' + chr(0b1101 + 0o47), ord("\x08")), nzTpIcepk0o8(chr(112 - 64) + chr(0b1101111) + chr(0b110011) + chr(48) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1101111) + '\062' + chr(1975 - 1927) + '\061', 0o10), nzTpIcepk0o8(chr(796 - 748) + chr(111) + chr(51) + chr(0b101100 + 0o6) + '\x32', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1110 + 0o141) + chr(51) + chr(1613 - 1562) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(759 - 711) + chr(6838 - 6727) + '\x32' + chr(0b110010) + chr(550 - 502), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10110 + 0o35), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101001 + 0o11) + '\x32' + chr(0b110000), 8), nzTpIcepk0o8(chr(1566 - 1518) + chr(0b1011110 + 0o21) + '\x32' + chr(0b110101) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b101000 + 0o107) + '\063' + '\x34' + chr(55), 30479 - 30471), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(0b110100 + 0o0) + chr(0b110101 + 0o2), 15514 - 15506), nzTpIcepk0o8(chr(421 - 373) + chr(0b111010 + 0o65) + chr(0b1011 + 0o47) + chr(55) + chr(0b10001 + 0o42), 18581 - 18573), nzTpIcepk0o8('\x30' + chr(0b100011 + 0o114) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2641 - 2588) + chr(1768 - 1716), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b11001 + 0o32) + '\060' + '\065', 59725 - 59717), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + '\063' + chr(0b110101), 8), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + '\x33' + '\066', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100 + 0o61) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xab'), '\144' + chr(101) + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(10890 - 10774) + '\146' + chr(0b111 + 0o46) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def At2a36owNChs(hXMPsSrOQzbh, k2zzaFDtbuhL):
lV7fd2Cq53hp = xbGTsX4crO7w.get_response_correlation_id(k2zzaFDtbuhL)
xayVtHcr1F96 = hXMPsSrOQzbh.requests.uC_Yoybx7J0I(lV7fd2Cq53hp, None)
if xayVtHcr1F96 is None:
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\xf2\xd8\xdf\xbc\xa9\xb3\x06'), chr(1793 - 1693) + '\145' + chr(99) + '\157' + '\144' + chr(101))(chr(117) + chr(116) + chr(912 - 810) + chr(0b10111 + 0o26) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\xd0\xd7\xc8\xaa\xb0\xb8\x02j`\x05\xd8\xf5\xac\x1dN\xecwS\xb7^\x8f\x05\xc9\x8c\xe7\xe2\xbd\xab\xe2f\xfc\xca\x93\x0e\xd4he\xa1\xe0;\xe1\x83\x8d\xf7\xb2'), '\x64' + chr(101) + '\143' + '\x6f' + chr(0b1001110 + 0o26) + chr(101))(chr(0b101101 + 0o110) + '\x74' + chr(5760 - 5658) + chr(0b101101) + '\070'), lV7fd2Cq53hp, roI3spqORKae(XR1yTSPOgiCr, roI3spqORKae(ES5oEprVxulp(b'\xf7\xdc\xdd\xa0'), chr(100) + chr(101) + chr(4883 - 4784) + chr(9833 - 9722) + chr(100) + chr(101))(chr(117) + '\x74' + chr(102) + chr(0b1000 + 0o45) + chr(56)))(k2zzaFDtbuhL))
else:
roI3spqORKae(xayVtHcr1F96.d, roI3spqORKae(ES5oEprVxulp(b'\xef\xfe\x98\x99\x95\xe94KB\x0f\x93\xb2'), '\x64' + '\145' + '\x63' + chr(0b10100 + 0o133) + chr(0b1100100) + chr(0b101100 + 0o71))(chr(9989 - 9872) + chr(116) + chr(0b1100110) + '\055' + chr(56)))(k2zzaFDtbuhL) |
ciena/afkak | afkak/brokerclient.py | _KafkaBrokerClient._sendRequest | def _sendRequest(self, tReq):
"""Send a single request over our protocol to the Kafka broker."""
try:
tReq.sent = True
self.proto.sendString(tReq.data)
except Exception as e:
log.exception('%r: Failed to send request %r', self, tReq)
del self.requests[tReq.id]
tReq.d.errback(e)
else:
if not tReq.expect:
# Once we've sent a request for which we don't expect a reply,
# we're done, remove it from requests, and fire the deferred
# with 'None', since there is no reply to be expected
del self.requests[tReq.id]
tReq.d.callback(None) | python | def _sendRequest(self, tReq):
"""Send a single request over our protocol to the Kafka broker."""
try:
tReq.sent = True
self.proto.sendString(tReq.data)
except Exception as e:
log.exception('%r: Failed to send request %r', self, tReq)
del self.requests[tReq.id]
tReq.d.errback(e)
else:
if not tReq.expect:
# Once we've sent a request for which we don't expect a reply,
# we're done, remove it from requests, and fire the deferred
# with 'None', since there is no reply to be expected
del self.requests[tReq.id]
tReq.d.callback(None) | [
"def",
"_sendRequest",
"(",
"self",
",",
"tReq",
")",
":",
"try",
":",
"tReq",
".",
"sent",
"=",
"True",
"self",
".",
"proto",
".",
"sendString",
"(",
"tReq",
".",
"data",
")",
"except",
"Exception",
"as",
"e",
":",
"log",
".",
"exception",
"(",
"'%r: Failed to send request %r'",
",",
"self",
",",
"tReq",
")",
"del",
"self",
".",
"requests",
"[",
"tReq",
".",
"id",
"]",
"tReq",
".",
"d",
".",
"errback",
"(",
"e",
")",
"else",
":",
"if",
"not",
"tReq",
".",
"expect",
":",
"# Once we've sent a request for which we don't expect a reply,",
"# we're done, remove it from requests, and fire the deferred",
"# with 'None', since there is no reply to be expected",
"del",
"self",
".",
"requests",
"[",
"tReq",
".",
"id",
"]",
"tReq",
".",
"d",
".",
"callback",
"(",
"None",
")"
] | Send a single request over our protocol to the Kafka broker. | [
"Send",
"a",
"single",
"request",
"over",
"our",
"protocol",
"to",
"the",
"Kafka",
"broker",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/brokerclient.py#L296-L311 | train | Send a single request over our protocol to the Kafka broker. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGs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3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100 + 0o54) + '\157' + chr(0b110011) + chr(0b10110 + 0o32) + chr(258 - 208), 60596 - 60588), nzTpIcepk0o8('\060' + '\157' + chr(0b11011 + 0o27) + '\x32' + chr(0b10010 + 0o43), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(53) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(1651 - 1602) + chr(53) + chr(0b101101 + 0o3), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x31' + '\060' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + '\063' + chr(0b1101 + 0o50) + chr(51), 24828 - 24820), nzTpIcepk0o8(chr(1235 - 1187) + '\x6f' + chr(0b110011) + '\x32' + chr(50), 37552 - 37544), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11101 + 0o25) + chr(0b100000 + 0o20) + chr(0b110111), 0o10), nzTpIcepk0o8('\060' + chr(0b100001 + 0o116) + '\x33' + '\061', 670 - 662), nzTpIcepk0o8(chr(760 - 712) + '\157' + chr(0b110001) + chr(52) + chr(0b110011), 5755 - 5747), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(4554 - 4443) + chr(908 - 858) + '\x35' + chr(277 - 226), 23982 - 23974), nzTpIcepk0o8(chr(1192 - 1144) + '\157' + chr(932 - 881) + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b111101 + 0o62) + '\x33' + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + chr(6085 - 5974) + chr(0b100011 + 0o20) + '\061' + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(48) + chr(0b110111), 8), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + '\061' + chr(0b100111 + 0o13) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1100101 + 0o12) + '\064' + chr(0b110010), 5251 - 5243), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10001 + 0o40) + chr(0b101101 + 0o10) + '\066', 0b1000), nzTpIcepk0o8(chr(111 - 63) + chr(0b1101111) + '\061' + chr(0b101000 + 0o15) + chr(0b1111 + 0o41), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b1101111) + chr(1319 - 1270) + chr(1573 - 1521) + '\x31', 0o10), nzTpIcepk0o8(chr(1742 - 1694) + chr(0b1101111) + '\x33' + chr(0b110101) + chr(978 - 925), 30185 - 30177), nzTpIcepk0o8('\060' + '\157' + chr(1046 - 994), 0o10), nzTpIcepk0o8(chr(1865 - 1817) + chr(0b1101111) + chr(51) + chr(0b110110) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101001 + 0o11) + '\060' + '\064', 0o10), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(4998 - 4887) + '\063' + chr(0b110001) + '\062', 8), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b11 + 0o154) + '\x31' + chr(0b110101) + chr(0b1011 + 0o53), 8), nzTpIcepk0o8(chr(56 - 8) + '\x6f' + '\063' + chr(0b101010 + 0o11) + '\061', 0b1000), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\157' + chr(0b100001 + 0o21) + '\x33' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1011101 + 0o22) + chr(2464 - 2413) + chr(2105 - 2053) + '\x32', 17067 - 17059), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10010 + 0o43) + '\x34', 26689 - 26681), nzTpIcepk0o8('\x30' + chr(0b1010111 + 0o30) + '\x37' + chr(0b10000 + 0o43), 943 - 935), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b1000 + 0o53) + chr(2584 - 2530) + chr(0b110100), 8), nzTpIcepk0o8('\060' + '\157' + chr(0b1000 + 0o53) + chr(0b110100) + chr(49), 0b1000), nzTpIcepk0o8(chr(450 - 402) + chr(0b1101111) + chr(0b1110 + 0o44) + chr(0b110000) + '\063', 63836 - 63828), nzTpIcepk0o8(chr(2034 - 1986) + '\157' + '\x33' + chr(0b10000 + 0o46) + chr(821 - 768), 38503 - 38495), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(111) + chr(879 - 829) + '\066' + '\065', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + chr(1421 - 1369) + chr(0b101010 + 0o15), 60589 - 60581), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(1273 - 1222), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110101) + chr(0b10011 + 0o35), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b11101 + 0o122) + chr(0b101110 + 0o7) + '\060', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xec'), chr(0b1100100) + chr(8209 - 8108) + chr(7198 - 7099) + chr(0b111111 + 0o60) + '\x64' + '\145')(chr(0b1001000 + 0o55) + '\164' + '\146' + chr(0b100011 + 0o12) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def Rr0DH5kFWaBl(hXMPsSrOQzbh, xayVtHcr1F96):
try:
xayVtHcr1F96.KCSwZZoid0kT = nzTpIcepk0o8(chr(1056 - 1008) + chr(0b1000010 + 0o55) + '\061', 8174 - 8166)
roI3spqORKae(hXMPsSrOQzbh.proto, roI3spqORKae(ES5oEprVxulp(b'\xb1\xf0F\x0c\x16\x9f\xa0\xeew\x04'), chr(100) + chr(9018 - 8917) + chr(0b1001 + 0o132) + '\157' + '\144' + chr(101))(chr(2041 - 1924) + chr(0b1110100) + chr(102) + '\x2d' + chr(0b1101 + 0o53)))(roI3spqORKae(xayVtHcr1F96, roI3spqORKae(ES5oEprVxulp(b"\x84\xf3c'\x11\x83\xb6\xf7v'\xffy"), chr(100) + chr(2918 - 2817) + chr(0b101010 + 0o71) + '\157' + chr(1010 - 910) + '\x65')('\x75' + '\x74' + '\x66' + chr(45) + chr(0b111000))))
except zfo2Sgkz3IVJ as wgf0sgcu_xPL:
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\xb0\xf6d\t\x0f\x89\xb1\xcdT\x00\xe5m'), '\x64' + '\145' + chr(7425 - 7326) + chr(111) + '\x64' + '\x65')('\165' + chr(6085 - 5969) + chr(102) + chr(45) + chr(0b111 + 0o61)))(roI3spqORKae(ES5oEprVxulp(b'\xe7\xe7\x12H\x03\x8a\xbb\xeb|\x07\x8bos\xea\xf42L\nHh\x04\x9cq\x91\xf7\xbeN\xfc\xec'), chr(8100 - 8000) + '\145' + '\143' + '\157' + chr(9310 - 9210) + chr(0b1100101))(chr(117) + chr(116) + chr(102) + '\055' + chr(56)), hXMPsSrOQzbh, xayVtHcr1F96)
del roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa6\xd1D7"\xde\xa3\xee/<\xd9S'), chr(0b1100010 + 0o2) + chr(101) + '\143' + '\x6f' + '\144' + chr(0b110110 + 0o57))(chr(0b1110101) + chr(11783 - 11667) + chr(1459 - 1357) + '\055' + chr(0b101111 + 0o11)))[roI3spqORKae(xayVtHcr1F96, roI3spqORKae(ES5oEprVxulp(b'\xaf\xf4d\x06\t\x8c\xea\xc8,\x19\xfbO'), '\144' + chr(2791 - 2690) + chr(0b1100011) + chr(0b1101111) + chr(5433 - 5333) + '\145')(chr(117) + chr(0b110001 + 0o103) + '\146' + chr(45) + '\x38'))]
roI3spqORKae(xayVtHcr1F96.d, roI3spqORKae(ES5oEprVxulp(b'\x8a\xf6\x19P\x03\xdb\x97\xb7i$\xe4Z'), chr(4766 - 4666) + chr(1248 - 1147) + chr(0b1100011) + chr(399 - 288) + chr(0b1100100) + chr(6045 - 5944))(chr(6292 - 6175) + chr(0b101101 + 0o107) + '\x66' + '\x2d' + chr(0b111000)))(wgf0sgcu_xPL)
else:
if not roI3spqORKae(xayVtHcr1F96, roI3spqORKae(ES5oEprVxulp(b'\xbb\xd6]\x02\x0c\x9f\x86\xb1_.\xd8\\'), '\144' + '\x65' + chr(99) + chr(1125 - 1014) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(5429 - 5313) + chr(102) + chr(0b101101) + '\x38')):
del roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa6\xd1D7"\xde\xa3\xee/<\xd9S'), chr(100) + chr(7468 - 7367) + chr(99) + chr(1180 - 1069) + '\x64' + chr(101))(chr(0b1110101) + chr(0b1110011 + 0o1) + chr(0b1100110) + '\055' + '\x38'))[roI3spqORKae(xayVtHcr1F96, roI3spqORKae(ES5oEprVxulp(b'\xaf\xf4d\x06\t\x8c\xea\xc8,\x19\xfbO'), '\144' + chr(2521 - 2420) + chr(99) + '\157' + '\144' + chr(3761 - 3660))(chr(0b1101111 + 0o6) + chr(116) + chr(0b1100110) + chr(0b10011 + 0o32) + '\070'))]
roI3spqORKae(xayVtHcr1F96.d, roI3spqORKae(ES5oEprVxulp(b'\xa8\xd2\x1d#\x10\xdf\x87\xd2^\r\xc0.'), chr(0b10010 + 0o122) + chr(0b1100101) + '\x63' + chr(111) + '\144' + chr(0b1100101))('\x75' + chr(5367 - 5251) + '\x66' + '\x2d' + chr(0b111000)))(None) |
ciena/afkak | afkak/brokerclient.py | _KafkaBrokerClient._sendQueued | def _sendQueued(self):
"""Connection just came up, send the unsent requests."""
for tReq in list(self.requests.values()): # must copy, may del
if not tReq.sent:
self._sendRequest(tReq) | python | def _sendQueued(self):
"""Connection just came up, send the unsent requests."""
for tReq in list(self.requests.values()): # must copy, may del
if not tReq.sent:
self._sendRequest(tReq) | [
"def",
"_sendQueued",
"(",
"self",
")",
":",
"for",
"tReq",
"in",
"list",
"(",
"self",
".",
"requests",
".",
"values",
"(",
")",
")",
":",
"# must copy, may del",
"if",
"not",
"tReq",
".",
"sent",
":",
"self",
".",
"_sendRequest",
"(",
"tReq",
")"
] | Connection just came up, send the unsent requests. | [
"Connection",
"just",
"came",
"up",
"send",
"the",
"unsent",
"requests",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/brokerclient.py#L313-L317 | train | Send the unsent requests. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,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XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(49) + '\065', 11541 - 11533), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + '\063' + '\067' + chr(1483 - 1432), 49009 - 49001), nzTpIcepk0o8('\060' + chr(0b100101 + 0o112) + chr(740 - 690) + '\067' + chr(54), 57134 - 57126), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + chr(0b110001) + chr(0b100011 + 0o20) + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + chr(0b100100 + 0o113) + '\x32' + chr(0b110011) + chr(0b100101 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b110000 + 0o77) + chr(0b11110 + 0o23) + chr(53) + chr(0b10111 + 0o34), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1009 - 954), 62608 - 62600), nzTpIcepk0o8(chr(0b110000) + chr(0b101111 + 0o100) + chr(49) + chr(0b100101 + 0o16) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b100000 + 0o117) + '\061' + '\x37' + chr(52), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(51) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b11111 + 0o120) + chr(2118 - 2068) + chr(49) + '\x34', 53309 - 53301), nzTpIcepk0o8(chr(0b110000) + chr(11073 - 10962) + '\062' + chr(2609 - 2555) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b111010 + 0o65) + chr(0b110111) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(0b10111 + 0o31) + chr(1989 - 1934), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(232 - 183) + chr(0b110 + 0o53), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(0b110010), 4191 - 4183), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(1904 - 1854) + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b101101 + 0o102) + chr(0b110001) + '\066' + chr(1456 - 1404), 60079 - 60071), nzTpIcepk0o8(chr(48) + '\x6f' + chr(619 - 568) + chr(0b10000 + 0o43) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(1124 - 1076) + '\x6f' + chr(51) + chr(0b11001 + 0o30), 50545 - 50537), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + '\066' + chr(53), 0b1000), nzTpIcepk0o8(chr(2302 - 2254) + chr(0b101010 + 0o105) + chr(117 - 64) + chr(0b10111 + 0o35), 46973 - 46965), nzTpIcepk0o8(chr(48) + chr(0b1000011 + 0o54) + chr(49) + chr(0b101000 + 0o14) + chr(53), 21012 - 21004), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(4096 - 3985) + '\062' + '\063' + chr(0b10 + 0o57), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + '\x36' + chr(50), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x34' + chr(183 - 134), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\062' + '\x35' + chr(0b1100 + 0o50), 0b1000), nzTpIcepk0o8(chr(1200 - 1152) + '\157' + '\061' + '\061' + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + chr(6902 - 6791) + chr(1936 - 1886) + '\x37' + chr(54), 8), nzTpIcepk0o8(chr(0b110000) + chr(3571 - 3460) + chr(169 - 118) + '\x36' + chr(1187 - 1137), 0o10), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + chr(51) + chr(0b110010) + chr(2378 - 2326), 18338 - 18330), nzTpIcepk0o8(chr(1753 - 1705) + chr(0b1101111) + chr(1469 - 1419) + '\x36' + chr(0b110010), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + '\061' + '\064', 28763 - 28755), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1100 + 0o47) + '\067', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(515 - 465) + chr(0b10000 + 0o41), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(437 - 386) + '\x31' + chr(0b1110 + 0o51), 3294 - 3286), nzTpIcepk0o8(chr(48) + chr(0b110110 + 0o71) + chr(51) + chr(1173 - 1122) + chr(2106 - 2052), 3033 - 3025), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + '\061' + chr(744 - 693), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(0b10001 + 0o40) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(111) + '\061' + '\065' + chr(0b110010), 26687 - 26679)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(111) + chr(0b11101 + 0o30) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe3'), '\x64' + '\145' + chr(0b1010110 + 0o15) + chr(111) + '\144' + '\145')('\165' + chr(0b1110100) + chr(9148 - 9046) + '\x2d' + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def TUdK48SJ6u7Y(hXMPsSrOQzbh):
for xayVtHcr1F96 in H4NoA26ON7iG(roI3spqORKae(hXMPsSrOQzbh.requests, roI3spqORKae(ES5oEprVxulp(b'\x8e\x88\xd19\xc4!Oi\x04\xe1\xd8\xce'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(3271 - 3171) + chr(101))('\165' + '\164' + chr(102) + chr(0b101101) + chr(56)))()):
if not roI3spqORKae(xayVtHcr1F96, roI3spqORKae(ES5oEprVxulp(b'\x86\xb8\xed*\xc41h6\x18\xe8\xe7\xe2'), chr(100) + '\145' + chr(0b1010001 + 0o22) + '\x6f' + chr(100) + '\145')('\165' + chr(116) + '\146' + chr(0b10010 + 0o33) + chr(1111 - 1055))):
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x92\x88\xdb3\xfa9b.\t\xbd\xff\xc2'), chr(2907 - 2807) + chr(0b110110 + 0o57) + chr(0b1101 + 0o126) + chr(11865 - 11754) + chr(100) + '\x65')('\165' + chr(0b1101000 + 0o14) + chr(0b1011 + 0o133) + chr(1948 - 1903) + chr(0b1001 + 0o57)))(xayVtHcr1F96) |
ciena/afkak | afkak/brokerclient.py | _KafkaBrokerClient.cancelRequest | def cancelRequest(self, requestId, reason=None, _=None):
"""Cancel a request: remove it from requests, & errback the deferred.
NOTE: Attempts to cancel a request which is no longer tracked
(expectResponse == False and already sent, or response already
received) will raise KeyError
"""
if reason is None:
reason = CancelledError()
tReq = self.requests.pop(requestId)
tReq.d.errback(reason) | python | def cancelRequest(self, requestId, reason=None, _=None):
"""Cancel a request: remove it from requests, & errback the deferred.
NOTE: Attempts to cancel a request which is no longer tracked
(expectResponse == False and already sent, or response already
received) will raise KeyError
"""
if reason is None:
reason = CancelledError()
tReq = self.requests.pop(requestId)
tReq.d.errback(reason) | [
"def",
"cancelRequest",
"(",
"self",
",",
"requestId",
",",
"reason",
"=",
"None",
",",
"_",
"=",
"None",
")",
":",
"if",
"reason",
"is",
"None",
":",
"reason",
"=",
"CancelledError",
"(",
")",
"tReq",
"=",
"self",
".",
"requests",
".",
"pop",
"(",
"requestId",
")",
"tReq",
".",
"d",
".",
"errback",
"(",
"reason",
")"
] | Cancel a request: remove it from requests, & errback the deferred.
NOTE: Attempts to cancel a request which is no longer tracked
(expectResponse == False and already sent, or response already
received) will raise KeyError | [
"Cancel",
"a",
"request",
":",
"remove",
"it",
"from",
"requests",
"&",
"errback",
"the",
"deferred",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/brokerclient.py#L322-L332 | train | Cancel a request. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROH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5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(5266 - 5155) + chr(0b11101 + 0o26) + chr(0b110000) + chr(50), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\062' + '\064' + chr(0b10010 + 0o44), ord("\x08")), nzTpIcepk0o8(chr(1666 - 1618) + chr(111) + '\x33' + chr(52) + '\x36', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(811 - 761) + chr(0b110100) + chr(54), 8), nzTpIcepk0o8('\x30' + chr(111) + '\065' + chr(0b110110), 42820 - 42812), nzTpIcepk0o8(chr(422 - 374) + chr(0b1101111) + chr(0b110001 + 0o1) + '\x34' + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(1990 - 1939) + chr(1761 - 1708), 51064 - 51056), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110100) + chr(0b110010), 18002 - 17994), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(0b10001 + 0o41) + chr(50) + chr(0b101110 + 0o10), 0o10), nzTpIcepk0o8(chr(2221 - 2173) + chr(0b100101 + 0o112) + chr(0b10111 + 0o34) + chr(48) + chr(0b1100 + 0o45), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + chr(51) + chr(0b100000 + 0o25) + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(0b11100 + 0o30) + chr(0b110100), 0o10), nzTpIcepk0o8('\060' + chr(9568 - 9457) + chr(0b110110) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1001100 + 0o43) + chr(0b110001) + '\x35' + '\066', 64701 - 64693), nzTpIcepk0o8(chr(1098 - 1050) + chr(111) + chr(50) + chr(48), 0o10), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1011011 + 0o24) + chr(0b1010 + 0o50) + chr(997 - 949) + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\x36' + chr(2491 - 2439), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b101 + 0o152) + chr(0b110001) + '\063' + chr(457 - 405), ord("\x08")), nzTpIcepk0o8(chr(1190 - 1142) + chr(0b1101111) + '\x31' + '\064' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(0b11010 + 0o35) + chr(0b110001), 11236 - 11228), nzTpIcepk0o8(chr(48) + '\157' + chr(2302 - 2247) + chr(48), 43057 - 43049), nzTpIcepk0o8('\x30' + chr(0b1001010 + 0o45) + chr(50) + chr(783 - 730) + chr(2117 - 2065), 0b1000), nzTpIcepk0o8(chr(1578 - 1530) + '\157' + chr(2491 - 2437) + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(2198 - 2149) + chr(52), 2801 - 2793), nzTpIcepk0o8(chr(1140 - 1092) + chr(111) + chr(50) + chr(49) + chr(54), 58578 - 58570), nzTpIcepk0o8(chr(0b110000) + chr(0b1101100 + 0o3) + '\x33' + chr(691 - 642) + '\x35', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1011000 + 0o27) + chr(0b110101) + chr(52), 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\x6f' + chr(50) + chr(0b110000) + '\066', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101101 + 0o6) + chr(54) + chr(177 - 127), ord("\x08")), nzTpIcepk0o8('\x30' + chr(5313 - 5202) + chr(861 - 811) + chr(0b110001) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b111011 + 0o64) + '\x33' + chr(0b101 + 0o56) + chr(0b100010 + 0o20), 0b1000), nzTpIcepk0o8(chr(48) + chr(6666 - 6555) + chr(0b11000 + 0o33) + chr(0b110010) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + chr(0b110010 + 0o0) + chr(0b10110 + 0o37) + chr(2899 - 2844), 5219 - 5211), nzTpIcepk0o8(chr(1410 - 1362) + chr(4647 - 4536) + '\x34' + chr(0b11010 + 0o27), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + '\063' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + '\x32' + chr(0b10000 + 0o43), 0b1000), nzTpIcepk0o8(chr(232 - 184) + '\157' + chr(0b110011) + chr(1762 - 1710) + '\x36', 8), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(0b110010) + chr(0b110111) + chr(182 - 127), 0b1000), nzTpIcepk0o8('\060' + chr(0b110001 + 0o76) + '\x32' + '\061' + chr(49), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1170 - 1122) + chr(11914 - 11803) + '\x35' + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xec'), chr(3638 - 3538) + '\x65' + chr(99) + chr(0b1101111) + '\144' + chr(0b100100 + 0o101))(chr(0b1000110 + 0o57) + '\164' + '\x66' + chr(45) + chr(1121 - 1065)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def Sqm4YlzmAsN0(hXMPsSrOQzbh, lV7fd2Cq53hp, RhxFF63tBU4y=None, zIqcgNgQ9U6F=None):
if RhxFF63tBU4y is None:
RhxFF63tBU4y = rTQ_IW2VS3hY()
xayVtHcr1F96 = hXMPsSrOQzbh.requests.uC_Yoybx7J0I(lV7fd2Cq53hp)
roI3spqORKae(xayVtHcr1F96.d, roI3spqORKae(ES5oEprVxulp(b'\x8a\xc5\xd7\x9eh\x95X\x12\xe6\x86\xa4%'), '\x64' + chr(6530 - 6429) + '\x63' + chr(111) + chr(0b1010010 + 0o22) + chr(8505 - 8404))(chr(11802 - 11685) + '\x74' + chr(9032 - 8930) + '\055' + chr(56)))(RhxFF63tBU4y) |
ciena/afkak | afkak/brokerclient.py | _KafkaBrokerClient._connect | def _connect(self):
"""Connect to the Kafka Broker
This routine will repeatedly try to connect to the broker (with backoff
according to the retry policy) until it succeeds.
"""
def tryConnect():
self.connector = d = maybeDeferred(connect)
d.addCallback(cbConnect)
d.addErrback(ebConnect)
def connect():
endpoint = self._endpointFactory(self._reactor, self.host, self.port)
log.debug('%r: connecting with %s', self, endpoint)
return endpoint.connect(self)
def cbConnect(proto):
log.debug('%r: connected to %r', self, proto.transport.getPeer())
self._failures = 0
self.connector = None
self.proto = proto
if self._dDown:
proto.transport.loseConnection()
else:
self._sendQueued()
def ebConnect(fail):
if self._dDown:
log.debug('%r: breaking connect loop due to %r after close()', self, fail)
return fail
self._failures += 1
delay = self._retryPolicy(self._failures)
log.debug('%r: failure %d to connect -> %s; retry in %.2f seconds.',
self, self._failures, fail.value, delay)
self.connector = d = deferLater(self._reactor, delay, lambda: None)
d.addCallback(cbDelayed)
def cbDelayed(result):
tryConnect()
self._failures = 0
tryConnect() | python | def _connect(self):
"""Connect to the Kafka Broker
This routine will repeatedly try to connect to the broker (with backoff
according to the retry policy) until it succeeds.
"""
def tryConnect():
self.connector = d = maybeDeferred(connect)
d.addCallback(cbConnect)
d.addErrback(ebConnect)
def connect():
endpoint = self._endpointFactory(self._reactor, self.host, self.port)
log.debug('%r: connecting with %s', self, endpoint)
return endpoint.connect(self)
def cbConnect(proto):
log.debug('%r: connected to %r', self, proto.transport.getPeer())
self._failures = 0
self.connector = None
self.proto = proto
if self._dDown:
proto.transport.loseConnection()
else:
self._sendQueued()
def ebConnect(fail):
if self._dDown:
log.debug('%r: breaking connect loop due to %r after close()', self, fail)
return fail
self._failures += 1
delay = self._retryPolicy(self._failures)
log.debug('%r: failure %d to connect -> %s; retry in %.2f seconds.',
self, self._failures, fail.value, delay)
self.connector = d = deferLater(self._reactor, delay, lambda: None)
d.addCallback(cbDelayed)
def cbDelayed(result):
tryConnect()
self._failures = 0
tryConnect() | [
"def",
"_connect",
"(",
"self",
")",
":",
"def",
"tryConnect",
"(",
")",
":",
"self",
".",
"connector",
"=",
"d",
"=",
"maybeDeferred",
"(",
"connect",
")",
"d",
".",
"addCallback",
"(",
"cbConnect",
")",
"d",
".",
"addErrback",
"(",
"ebConnect",
")",
"def",
"connect",
"(",
")",
":",
"endpoint",
"=",
"self",
".",
"_endpointFactory",
"(",
"self",
".",
"_reactor",
",",
"self",
".",
"host",
",",
"self",
".",
"port",
")",
"log",
".",
"debug",
"(",
"'%r: connecting with %s'",
",",
"self",
",",
"endpoint",
")",
"return",
"endpoint",
".",
"connect",
"(",
"self",
")",
"def",
"cbConnect",
"(",
"proto",
")",
":",
"log",
".",
"debug",
"(",
"'%r: connected to %r'",
",",
"self",
",",
"proto",
".",
"transport",
".",
"getPeer",
"(",
")",
")",
"self",
".",
"_failures",
"=",
"0",
"self",
".",
"connector",
"=",
"None",
"self",
".",
"proto",
"=",
"proto",
"if",
"self",
".",
"_dDown",
":",
"proto",
".",
"transport",
".",
"loseConnection",
"(",
")",
"else",
":",
"self",
".",
"_sendQueued",
"(",
")",
"def",
"ebConnect",
"(",
"fail",
")",
":",
"if",
"self",
".",
"_dDown",
":",
"log",
".",
"debug",
"(",
"'%r: breaking connect loop due to %r after close()'",
",",
"self",
",",
"fail",
")",
"return",
"fail",
"self",
".",
"_failures",
"+=",
"1",
"delay",
"=",
"self",
".",
"_retryPolicy",
"(",
"self",
".",
"_failures",
")",
"log",
".",
"debug",
"(",
"'%r: failure %d to connect -> %s; retry in %.2f seconds.'",
",",
"self",
",",
"self",
".",
"_failures",
",",
"fail",
".",
"value",
",",
"delay",
")",
"self",
".",
"connector",
"=",
"d",
"=",
"deferLater",
"(",
"self",
".",
"_reactor",
",",
"delay",
",",
"lambda",
":",
"None",
")",
"d",
".",
"addCallback",
"(",
"cbDelayed",
")",
"def",
"cbDelayed",
"(",
"result",
")",
":",
"tryConnect",
"(",
")",
"self",
".",
"_failures",
"=",
"0",
"tryConnect",
"(",
")"
] | Connect to the Kafka Broker
This routine will repeatedly try to connect to the broker (with backoff
according to the retry policy) until it succeeds. | [
"Connect",
"to",
"the",
"Kafka",
"Broker"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/brokerclient.py#L342-L384 | train | Connect to the Kafka Broker returning a new broker entry. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,Nf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qw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + chr(4019 - 3908) + chr(1228 - 1179) + chr(1443 - 1391) + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(8515 - 8404) + chr(183 - 133) + chr(0b110011) + chr(50), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(497 - 446) + '\x34' + chr(52), 57374 - 57366), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + chr(0b110001) + '\067' + chr(1765 - 1717), 0o10), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(6586 - 6475) + chr(0b110010) + '\066' + '\x36', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(1174 - 1119), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b100101 + 0o22) + '\x36', 0o10), nzTpIcepk0o8('\x30' + chr(0b1000 + 0o147) + '\063' + chr(54) + '\066', 0b1000), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + chr(50) + '\067' + chr(0b10110 + 0o32), 7911 - 7903), nzTpIcepk0o8('\060' + chr(111) + chr(0b11001 + 0o31) + chr(1794 - 1743) + '\x32', 8), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + '\x32' + chr(50) + chr(613 - 561), 14521 - 14513), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(2529 - 2418) + chr(2167 - 2117), 37797 - 37789), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b0 + 0o67) + chr(0b110001), 37566 - 37558), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(0b110001) + chr(1239 - 1186), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(1643 - 1594) + '\061', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + '\060' + chr(54), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(686 - 637) + chr(1630 - 1580) + chr(0b10001 + 0o43), 0o10), nzTpIcepk0o8(chr(944 - 896) + chr(0b1101111) + chr(0b10110 + 0o33) + chr(364 - 314) + '\x33', 14555 - 14547), nzTpIcepk0o8(chr(2271 - 2223) + '\x6f' + '\063' + chr(0b110111 + 0o0) + '\062', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(1893 - 1842) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(359 - 311) + chr(111) + chr(1827 - 1776) + chr(55) + '\064', 20340 - 20332), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + chr(0b1010 + 0o51) + chr(1023 - 969) + chr(0b110111), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(0b110000) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1001101 + 0o42) + '\x33' + chr(810 - 756) + '\063', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(2520 - 2469), 0b1000), nzTpIcepk0o8('\060' + chr(0b101001 + 0o106) + chr(336 - 287) + '\x31' + chr(51), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(49) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(1183 - 1135) + chr(0b1101111) + '\x33' + chr(52) + chr(0b0 + 0o62), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(2074 - 2025) + chr(0b110101) + '\064', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(50) + chr(0b11010 + 0o33), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(1099 - 988) + chr(0b110101) + chr(0b1001 + 0o55), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(1651 - 1601) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + chr(54) + chr(894 - 844), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + '\x36' + '\066', 8), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + chr(0b101 + 0o61) + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + chr(0b111110 + 0o61) + chr(49) + chr(51) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b101 + 0o152) + chr(0b110001) + '\x34' + chr(0b100 + 0o62), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\067' + '\x34', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110101) + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'>'), chr(0b1100100) + chr(0b1100101) + chr(8304 - 8205) + chr(0b110101 + 0o72) + chr(0b110001 + 0o63) + chr(842 - 741))('\x75' + chr(3409 - 3293) + '\x66' + '\x2d' + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def S5dZnBdkj9hs(hXMPsSrOQzbh):
def znqHyBGwRM8F():
hXMPsSrOQzbh.Bntn9ZcDt14o = vPPlOXQgR3SM = _doBYLO27WCW(R4huMsfNyXUm)
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'q\x06\xfe\xa7\x19\xdasb_\x95\xd3'), '\x64' + '\145' + '\143' + chr(0b1001010 + 0o45) + chr(0b1001001 + 0o33) + '\145')(chr(0b1110101) + '\164' + chr(1165 - 1063) + '\x2d' + chr(510 - 454)))(W7eMwZhJ7aLy)
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'q\x06\xfe\xa1\n\xc4}a]\x9d'), chr(0b1100100) + '\145' + chr(0b110111 + 0o54) + chr(10568 - 10457) + chr(100) + chr(101))(chr(0b110111 + 0o76) + '\x74' + chr(102) + chr(0b11000 + 0o25) + chr(365 - 309)))(PO9ahI9r1Grs)
def R4huMsfNyXUm():
IxaNW2_TJHzE = hXMPsSrOQzbh._endpointFactory(hXMPsSrOQzbh._reactor, hXMPsSrOQzbh.UcZofMadI5hD, hXMPsSrOQzbh.FKWBoSDY8Qs2)
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'w#\xa3\xbeA\xd2p6k\x9b\xfd\xc0'), chr(4454 - 4354) + chr(0b100000 + 0o105) + chr(99) + '\157' + chr(150 - 50) + '\x65')(chr(0b1110101) + '\x74' + chr(0b10110 + 0o120) + '\x2d' + chr(0b110100 + 0o4)))(roI3spqORKae(ES5oEprVxulp(b'5\x10\xa0\xc4\x1b\xd9qn[\x95\xcc\xf3\xfae\x19\xfa\xa0\xb2<s\xdf\xaf'), chr(0b11110 + 0o106) + '\145' + chr(3336 - 3237) + '\157' + chr(0b1011000 + 0o14) + chr(2743 - 2642))(chr(0b1110100 + 0o1) + chr(116) + '\x66' + chr(45) + '\x38'), hXMPsSrOQzbh, IxaNW2_TJHzE)
return roI3spqORKae(IxaNW2_TJHzE, roI3spqORKae(ES5oEprVxulp(b'BV\xf2\x915\xc5yNG\xae\xed\xf7'), '\x64' + '\x65' + chr(99) + chr(6005 - 5894) + chr(0b1100100) + chr(0b101000 + 0o75))(chr(117) + chr(0b1110100) + chr(1802 - 1700) + chr(0b11111 + 0o16) + chr(0b111000)))(hXMPsSrOQzbh)
def W7eMwZhJ7aLy(uhH2qq4c804O):
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'w#\xa3\xbeA\xd2p6k\x9b\xfd\xc0'), chr(100) + chr(0b1100101) + '\143' + '\157' + chr(0b110110 + 0o56) + chr(1873 - 1772))('\165' + '\164' + chr(0b1100110) + '\x2d' + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'5\x10\xa0\xc4\x1b\xd9qn[\x95\xcc\xff\xf0"M\xe2\xe9\xe3&'), '\144' + chr(101) + chr(0b1010 + 0o131) + chr(11048 - 10937) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(2754 - 2638) + chr(102) + chr(886 - 841) + '\070'), hXMPsSrOQzbh, roI3spqORKae(uhH2qq4c804O.transport, roI3spqORKae(ES5oEprVxulp(b'w\x07\xee\xb4\x1d\xd3m'), chr(0b1100100) + chr(0b1100101) + chr(99) + '\157' + chr(6826 - 6726) + chr(0b1100101))(chr(0b1010011 + 0o42) + chr(1082 - 966) + chr(5149 - 5047) + '\055' + chr(156 - 100)))())
hXMPsSrOQzbh.EDl0BVMXdVhQ = nzTpIcepk0o8('\x30' + chr(111) + chr(48), 8)
hXMPsSrOQzbh.Bntn9ZcDt14o = None
hXMPsSrOQzbh.uhH2qq4c804O = uhH2qq4c804O
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'}\x18\xcd\xad5\xe0vPG\x8e\xf2\xaa'), chr(0b1001100 + 0o30) + chr(1258 - 1157) + chr(6552 - 6453) + chr(1356 - 1245) + chr(100) + '\x65')(chr(117) + chr(0b1110100) + chr(0b1100011 + 0o3) + chr(0b100100 + 0o11) + chr(0b111000))):
roI3spqORKae(uhH2qq4c804O.transport, roI3spqORKae(ES5oEprVxulp(b'|\r\xe9\x81;\xd9qn[\x95\xcc\xf3\xfbl'), chr(0b1100100) + '\x65' + chr(0b11 + 0o140) + '\157' + chr(3961 - 3861) + chr(0b1010011 + 0o22))('\x75' + chr(4859 - 4743) + '\146' + chr(0b101101 + 0o0) + '\070'))()
else:
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'O\x11\xff\x8a\x1c\xe7jeK\x93\xdc'), '\144' + chr(0b1100101) + '\x63' + '\157' + '\144' + chr(2444 - 2343))(chr(4417 - 4300) + chr(0b10010 + 0o142) + chr(102) + chr(45) + '\070'))()
def PO9ahI9r1Grs(qbbHsF4hIzMe):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'}\x18\xcd\xad5\xe0vPG\x8e\xf2\xaa'), '\x64' + '\145' + chr(0b111000 + 0o53) + chr(0b1010000 + 0o37) + chr(0b100111 + 0o75) + chr(6724 - 6623))(chr(0b1100010 + 0o23) + '\x74' + chr(0b1100001 + 0o5) + chr(0b101101) + chr(0b1011 + 0o55))):
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'w#\xa3\xbeA\xd2p6k\x9b\xfd\xc0'), chr(0b1100100) + chr(0b1001111 + 0o26) + '\x63' + chr(3440 - 3329) + '\x64' + '\145')(chr(3386 - 3269) + chr(0b111 + 0o155) + '\x66' + chr(45) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b"5\x10\xa0\xc4\x1a\xc4zaU\x9f\xd6\xfd\xb4aV\xe3\xa7\xa37'\xda\xb0\x93\x98\xb7\xd3o>\xaa\xc2\x18\xfa\x0e\xb5\xc0\xd6T>\x12YbB\xf9\x88\x17\xc5z(\x17"), chr(0b1100100) + '\x65' + '\x63' + chr(111) + chr(6408 - 6308) + chr(0b110100 + 0o61))(chr(0b110100 + 0o101) + '\x74' + chr(102) + chr(380 - 335) + '\x38'), hXMPsSrOQzbh, qbbHsF4hIzMe)
return qbbHsF4hIzMe
hXMPsSrOQzbh.EDl0BVMXdVhQ += nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101 + 0o54), ord("\x08"))
At656iyyS8xP = hXMPsSrOQzbh._retryPolicy(hXMPsSrOQzbh.EDl0BVMXdVhQ)
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'w#\xa3\xbeA\xd2p6k\x9b\xfd\xc0'), '\x64' + chr(101) + '\x63' + chr(0b1101111) + chr(7272 - 7172) + chr(0b100010 + 0o103))(chr(117) + chr(11463 - 11347) + '\x66' + chr(1168 - 1123) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'5\x10\xa0\xc4\x1e\xd7vlK\x84\xdd\xba\xb1f\x19\xf9\xa6\xe67<\x94\xb2\x99\x94\xb3\xd3&u\xef\xc7\x1f\xae\x0e\xe2\xd7\x82G!FU~B\xbf\xcaJ\xd0?s[\x95\xd7\xf4\xf0q\x17'), chr(100) + '\x65' + chr(99) + chr(111) + chr(0b1100100) + '\x65')('\x75' + '\x74' + '\x66' + '\055' + '\x38'), hXMPsSrOQzbh, roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'U&\xf6\xd4:\xe0RXZ\xa0\xd0\xcb'), '\x64' + '\145' + chr(3709 - 3610) + chr(12054 - 11943) + chr(0b110111 + 0o55) + chr(0b1100001 + 0o4))('\x75' + chr(11991 - 11875) + '\x66' + chr(0b101101) + chr(0b110 + 0o62))), roI3spqORKae(qbbHsF4hIzMe, roI3spqORKae(ES5oEprVxulp(b'e4\xa3\x8d:\xdfh0G\xa9\xf5\xea'), chr(3640 - 3540) + '\x65' + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(0b1101110 + 0o7) + chr(116) + chr(2977 - 2875) + chr(45) + '\x38')), At656iyyS8xP)
hXMPsSrOQzbh.Bntn9ZcDt14o = vPPlOXQgR3SM = S6E7lR63IkoW(hXMPsSrOQzbh._reactor, At656iyyS8xP, lambda : None)
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'q\x06\xfe\xa7\x19\xdasb_\x95\xd3'), chr(0b101111 + 0o65) + chr(0b1100101) + '\x63' + '\x6f' + chr(0b1011011 + 0o11) + chr(0b1010111 + 0o16))(chr(10907 - 10790) + chr(116) + chr(0b10010 + 0o124) + chr(0b101101) + chr(3117 - 3061)))(cLcge4sWM16h)
def cLcge4sWM16h(POx95m7SPOVy):
znqHyBGwRM8F()
hXMPsSrOQzbh.EDl0BVMXdVhQ = nzTpIcepk0o8('\x30' + chr(111) + '\x30', 8)
znqHyBGwRM8F() |
Salamek/cron-descriptor | cron_descriptor/ExpressionParser.py | ExpressionParser.parse | def parse(self):
"""Parses the cron expression string
Returns:
A 7 part string array, one part for each component of the cron expression (seconds, minutes, etc.)
Raises:
MissingFieldException: if _expression is empty or None
FormatException: if _expression has wrong format
"""
# Initialize all elements of parsed array to empty strings
parsed = ['', '', '', '', '', '', '']
if self._expression is None or len(self._expression) == 0:
raise MissingFieldException("ExpressionDescriptor.expression")
else:
expression_parts_temp = self._expression.split()
expression_parts_temp_length = len(expression_parts_temp)
if expression_parts_temp_length < 5:
raise FormatException(
"Error: Expression only has {0} parts. At least 5 part are required.".format(
expression_parts_temp_length))
elif expression_parts_temp_length == 5:
# 5 part cron so shift array past seconds element
for i, expression_part_temp in enumerate(expression_parts_temp):
parsed[i + 1] = expression_part_temp
elif expression_parts_temp_length == 6:
# If last element ends with 4 digits, a year element has been
# supplied and no seconds element
year_regex = re.compile(r"\d{4}$")
if year_regex.search(expression_parts_temp[5]) is not None:
for i, expression_part_temp in enumerate(expression_parts_temp):
parsed[i + 1] = expression_part_temp
else:
for i, expression_part_temp in enumerate(expression_parts_temp):
parsed[i] = expression_part_temp
elif expression_parts_temp_length == 7:
parsed = expression_parts_temp
else:
raise FormatException(
"Error: Expression has too many parts ({0}). Expression must not have more than 7 parts.".format(
expression_parts_temp_length))
self.normalize_expression(parsed)
return parsed | python | def parse(self):
"""Parses the cron expression string
Returns:
A 7 part string array, one part for each component of the cron expression (seconds, minutes, etc.)
Raises:
MissingFieldException: if _expression is empty or None
FormatException: if _expression has wrong format
"""
# Initialize all elements of parsed array to empty strings
parsed = ['', '', '', '', '', '', '']
if self._expression is None or len(self._expression) == 0:
raise MissingFieldException("ExpressionDescriptor.expression")
else:
expression_parts_temp = self._expression.split()
expression_parts_temp_length = len(expression_parts_temp)
if expression_parts_temp_length < 5:
raise FormatException(
"Error: Expression only has {0} parts. At least 5 part are required.".format(
expression_parts_temp_length))
elif expression_parts_temp_length == 5:
# 5 part cron so shift array past seconds element
for i, expression_part_temp in enumerate(expression_parts_temp):
parsed[i + 1] = expression_part_temp
elif expression_parts_temp_length == 6:
# If last element ends with 4 digits, a year element has been
# supplied and no seconds element
year_regex = re.compile(r"\d{4}$")
if year_regex.search(expression_parts_temp[5]) is not None:
for i, expression_part_temp in enumerate(expression_parts_temp):
parsed[i + 1] = expression_part_temp
else:
for i, expression_part_temp in enumerate(expression_parts_temp):
parsed[i] = expression_part_temp
elif expression_parts_temp_length == 7:
parsed = expression_parts_temp
else:
raise FormatException(
"Error: Expression has too many parts ({0}). Expression must not have more than 7 parts.".format(
expression_parts_temp_length))
self.normalize_expression(parsed)
return parsed | [
"def",
"parse",
"(",
"self",
")",
":",
"# Initialize all elements of parsed array to empty strings",
"parsed",
"=",
"[",
"''",
",",
"''",
",",
"''",
",",
"''",
",",
"''",
",",
"''",
",",
"''",
"]",
"if",
"self",
".",
"_expression",
"is",
"None",
"or",
"len",
"(",
"self",
".",
"_expression",
")",
"==",
"0",
":",
"raise",
"MissingFieldException",
"(",
"\"ExpressionDescriptor.expression\"",
")",
"else",
":",
"expression_parts_temp",
"=",
"self",
".",
"_expression",
".",
"split",
"(",
")",
"expression_parts_temp_length",
"=",
"len",
"(",
"expression_parts_temp",
")",
"if",
"expression_parts_temp_length",
"<",
"5",
":",
"raise",
"FormatException",
"(",
"\"Error: Expression only has {0} parts. At least 5 part are required.\"",
".",
"format",
"(",
"expression_parts_temp_length",
")",
")",
"elif",
"expression_parts_temp_length",
"==",
"5",
":",
"# 5 part cron so shift array past seconds element",
"for",
"i",
",",
"expression_part_temp",
"in",
"enumerate",
"(",
"expression_parts_temp",
")",
":",
"parsed",
"[",
"i",
"+",
"1",
"]",
"=",
"expression_part_temp",
"elif",
"expression_parts_temp_length",
"==",
"6",
":",
"# If last element ends with 4 digits, a year element has been",
"# supplied and no seconds element",
"year_regex",
"=",
"re",
".",
"compile",
"(",
"r\"\\d{4}$\"",
")",
"if",
"year_regex",
".",
"search",
"(",
"expression_parts_temp",
"[",
"5",
"]",
")",
"is",
"not",
"None",
":",
"for",
"i",
",",
"expression_part_temp",
"in",
"enumerate",
"(",
"expression_parts_temp",
")",
":",
"parsed",
"[",
"i",
"+",
"1",
"]",
"=",
"expression_part_temp",
"else",
":",
"for",
"i",
",",
"expression_part_temp",
"in",
"enumerate",
"(",
"expression_parts_temp",
")",
":",
"parsed",
"[",
"i",
"]",
"=",
"expression_part_temp",
"elif",
"expression_parts_temp_length",
"==",
"7",
":",
"parsed",
"=",
"expression_parts_temp",
"else",
":",
"raise",
"FormatException",
"(",
"\"Error: Expression has too many parts ({0}). Expression must not have more than 7 parts.\"",
".",
"format",
"(",
"expression_parts_temp_length",
")",
")",
"self",
".",
"normalize_expression",
"(",
"parsed",
")",
"return",
"parsed"
] | Parses the cron expression string
Returns:
A 7 part string array, one part for each component of the cron expression (seconds, minutes, etc.)
Raises:
MissingFieldException: if _expression is empty or None
FormatException: if _expression has wrong format | [
"Parses",
"the",
"cron",
"expression",
"string",
"Returns",
":",
"A",
"7",
"part",
"string",
"array",
"one",
"part",
"for",
"each",
"component",
"of",
"the",
"cron",
"expression",
"(",
"seconds",
"minutes",
"etc",
".",
")",
"Raises",
":",
"MissingFieldException",
":",
"if",
"_expression",
"is",
"empty",
"or",
"None",
"FormatException",
":",
"if",
"_expression",
"has",
"wrong",
"format"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionParser.py#L72-L114 | train | Parses the cron expression string and returns a 7 part string array one part for each component of the cron expression. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRi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clC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101110 + 0o4) + chr(0b110011) + chr(2215 - 2162), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b111101 + 0o62) + chr(0b110010) + '\060' + chr(2527 - 2475), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110 + 0o57) + chr(0b1 + 0o60), 0o10), nzTpIcepk0o8('\060' + chr(12174 - 12063) + '\x32' + chr(50) + chr(0b110 + 0o57), 3866 - 3858), nzTpIcepk0o8('\x30' + chr(0b0 + 0o157) + chr(0b110101) + chr(53), 44766 - 44758), nzTpIcepk0o8('\060' + chr(111) + '\x33' + chr(50) + '\063', ord("\x08")), nzTpIcepk0o8(chr(1651 - 1603) + chr(0b1101111) + '\061' + chr(0b110000) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1001000 + 0o47) + '\067' + '\064', 52229 - 52221), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + '\060' + chr(54), 0b1000), nzTpIcepk0o8('\x30' + chr(12018 - 11907) + '\x32' + chr(0b11110 + 0o31) + chr(0b1011 + 0o45), ord("\x08")), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(4522 - 4411) + chr(49) + chr(0b1010 + 0o52) + '\065', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + chr(54) + chr(0b11111 + 0o23), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b10101 + 0o34) + chr(0b1100 + 0o47) + chr(1573 - 1524), 51279 - 51271), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(55) + chr(2478 - 2427), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011111 + 0o20) + chr(908 - 855) + chr(0b11110 + 0o26), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(53) + '\x37', 17841 - 17833), nzTpIcepk0o8(chr(48) + '\157' + chr(260 - 210) + chr(0b1101 + 0o50) + chr(2640 - 2586), 0o10), nzTpIcepk0o8(chr(1940 - 1892) + chr(6792 - 6681) + chr(50) + '\063' + chr(129 - 80), 7216 - 7208), nzTpIcepk0o8(chr(1296 - 1248) + chr(111) + '\x33' + chr(0b110110) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b110101) + chr(0b11101 + 0o32), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100111 + 0o13) + chr(54) + chr(0b110010), 8), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + '\x33' + '\067', 0b1000), nzTpIcepk0o8(chr(1555 - 1507) + '\x6f' + chr(0b110010) + chr(49) + chr(0b10010 + 0o41), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(8937 - 8826) + chr(2197 - 2147) + '\x36' + chr(54), 0b1000), nzTpIcepk0o8(chr(917 - 869) + chr(0b1101 + 0o142) + chr(0b1100 + 0o47) + '\065' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(2142 - 2094) + chr(0b1101111) + chr(49) + chr(0b10000 + 0o43) + chr(50), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(51) + chr(0b101111 + 0o7), 33327 - 33319), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1248 - 1193) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1101111) + chr(609 - 558) + chr(55) + chr(844 - 795), 0b1000), nzTpIcepk0o8(chr(1000 - 952) + chr(0b1001100 + 0o43) + '\062' + chr(2457 - 2403) + '\x31', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b10101 + 0o132) + chr(0b100 + 0o55) + chr(0b110011) + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(2364 - 2313) + '\060', 0b1000), nzTpIcepk0o8('\x30' + chr(0b10101 + 0o132) + chr(0b110011) + chr(784 - 736) + '\x34', 0b1000), nzTpIcepk0o8('\x30' + chr(7126 - 7015) + chr(2387 - 2338) + chr(0b100110 + 0o13) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(609 - 558) + '\064' + chr(0b101001 + 0o11), 0o10), nzTpIcepk0o8('\060' + chr(8398 - 8287) + chr(0b110111) + chr(48), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b101011 + 0o104) + chr(0b101110 + 0o4) + '\x32' + chr(0b10111 + 0o37), 63945 - 63937), nzTpIcepk0o8(chr(813 - 765) + '\157' + '\062' + chr(49) + '\x34', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b11101 + 0o23), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b11011 + 0o124) + '\062' + chr(2743 - 2689) + chr(864 - 815), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b111 + 0o150) + chr(53) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xb3'), '\144' + '\x65' + '\x63' + chr(0b110011 + 0o74) + chr(6269 - 6169) + chr(0b1100101))('\x75' + '\x74' + chr(0b11111 + 0o107) + chr(0b101011 + 0o2) + chr(2880 - 2824)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def zgDfHOdKcvCW(hXMPsSrOQzbh):
dkmlAHNYRj0w = [roI3spqORKae(ES5oEprVxulp(b''), chr(0b11100 + 0o110) + '\x65' + '\x63' + '\157' + chr(0b101 + 0o137) + chr(0b1100101))(chr(117) + chr(7505 - 7389) + '\x66' + '\055' + '\x38'), roI3spqORKae(ES5oEprVxulp(b''), chr(6307 - 6207) + chr(101) + '\143' + chr(111) + '\x64' + chr(0b1100101))(chr(12404 - 12287) + chr(0b1110100) + chr(5189 - 5087) + '\055' + chr(0b101000 + 0o20)), roI3spqORKae(ES5oEprVxulp(b''), '\144' + chr(101) + chr(0b111011 + 0o50) + '\157' + '\x64' + chr(0b1100101))(chr(5265 - 5148) + chr(0b1110100) + chr(102) + chr(789 - 744) + chr(1950 - 1894)), roI3spqORKae(ES5oEprVxulp(b''), '\144' + '\x65' + chr(7536 - 7437) + '\x6f' + '\144' + chr(0b1000100 + 0o41))('\165' + '\164' + chr(0b110101 + 0o61) + chr(1135 - 1090) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b''), chr(0b1100100) + chr(7997 - 7896) + chr(3976 - 3877) + chr(0b110101 + 0o72) + chr(173 - 73) + chr(0b1100101))(chr(0b10101 + 0o140) + chr(0b10011 + 0o141) + '\x66' + '\055' + chr(56)), roI3spqORKae(ES5oEprVxulp(b''), chr(0b110101 + 0o57) + chr(0b1100101) + chr(8313 - 8214) + chr(0b11101 + 0o122) + chr(8126 - 8026) + chr(7395 - 7294))(chr(117) + '\x74' + '\x66' + chr(0b1011 + 0o42) + chr(2401 - 2345)), roI3spqORKae(ES5oEprVxulp(b''), '\144' + '\145' + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(101))('\165' + chr(0b1110100) + '\146' + chr(0b101101) + '\x38')]
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc2\xe1Q\xe5_\xb64O\xaf\xd7\x0b'), chr(100) + chr(101) + chr(99) + chr(0b1000111 + 0o50) + chr(0b10100 + 0o120) + chr(4099 - 3998))(chr(117) + chr(116) + chr(102) + chr(45) + chr(56))) is None or ftfygxgFas5X(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc2\xe1Q\xe5_\xb64O\xaf\xd7\x0b'), '\x64' + chr(7113 - 7012) + '\x63' + '\157' + chr(7206 - 7106) + chr(0b1100101))(chr(0b111 + 0o156) + '\x74' + '\x66' + chr(45) + chr(286 - 230)))) == nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(111) + '\x30', 8):
raise XSqV4yMYu5Iw(roI3spqORKae(ES5oEprVxulp(b'\xd8\xfcY\xe7H\xa04U\xa9\xd6!\xd7*\x98^\x86\xde\xed\x98\x1d\x9c\xba\xf3\xc6\x9a?\xadM\x90\xde0'), chr(0b1100100) + '\x65' + chr(6633 - 6534) + '\x6f' + '\x64' + chr(8876 - 8775))(chr(0b1100110 + 0o17) + chr(116) + chr(102) + '\x2d' + '\x38'))
else:
LKohkVszWwaO = hXMPsSrOQzbh._expression.LfRrQOxuDvnC()
Pqrm1VTdv99U = ftfygxgFas5X(LKohkVszWwaO)
if Pqrm1VTdv99U < nzTpIcepk0o8('\060' + chr(11773 - 11662) + chr(1414 - 1361), ord("\x08")):
raise mj30htt2jvhF(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xd8\xf6[\xfa_\xe9gy\xbe\xc8\x17\xd7*\x88E\x80\xc0\xb9\x98\x01\xde\xa6\xab\xde\x89)\xfeE\xc9\xcc~(\xa5:\x96K\xb8\xac \xf0\xe9\xa4E\xf0L\xa03\x1c\xf3\x98\x15\xd3+\x8f\x0c\x8e\xdc\xfc\xd7\x1d\xd7\xae\xfe\xdf\x9a?\xba\x10'), chr(0b1001100 + 0o30) + '\x65' + chr(1411 - 1312) + '\157' + chr(100) + chr(101))(chr(0b1110101) + chr(0b110100 + 0o100) + '\146' + '\055' + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xec\xb7\x1a\xdej\xe0!S\x97\xe7&\xf8'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(3145 - 3034) + chr(0b1100100) + chr(0b1100101))('\x75' + '\x74' + '\x66' + '\x2d' + '\x38'))(Pqrm1VTdv99U))
elif Pqrm1VTdv99U == nzTpIcepk0o8('\x30' + chr(111) + '\065', 8):
for (ZlbFMSG8gCoF, lYRO4iyI49s_) in _kV_Bomx8PZ4(LKohkVszWwaO):
dkmlAHNYRj0w[ZlbFMSG8gCoF + nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1886 - 1837), 0o10)] = lYRO4iyI49s_
elif Pqrm1VTdv99U == nzTpIcepk0o8('\060' + '\x6f' + '\x36', 59341 - 59333):
frxCKwutyDhv = aoTc4YA2bs2R.compile(roI3spqORKae(ES5oEprVxulp(b'\xc1\xe0R\xa1P\xf7'), chr(0b1100100) + chr(101) + chr(0b101110 + 0o65) + chr(1949 - 1838) + chr(0b1100100) + '\x65')('\x75' + chr(116) + chr(0b1100110) + chr(0b101101) + '\x38'))
if roI3spqORKae(frxCKwutyDhv, roI3spqORKae(ES5oEprVxulp(b'\xd9\xe5s\xadd\xbd=m\xa1\xfe/\xc4'), chr(8786 - 8686) + chr(0b1100101) + '\x63' + chr(5784 - 5673) + chr(0b101000 + 0o74) + chr(0b1100101))(chr(0b1110100 + 0o1) + '\x74' + chr(102) + chr(1109 - 1064) + chr(0b10110 + 0o42)))(LKohkVszWwaO[nzTpIcepk0o8(chr(2154 - 2106) + chr(111) + chr(53), 8)]) is not None:
for (ZlbFMSG8gCoF, lYRO4iyI49s_) in _kV_Bomx8PZ4(LKohkVszWwaO):
dkmlAHNYRj0w[ZlbFMSG8gCoF + nzTpIcepk0o8(chr(48) + chr(0b100010 + 0o115) + chr(49), 8)] = lYRO4iyI49s_
else:
for (ZlbFMSG8gCoF, lYRO4iyI49s_) in _kV_Bomx8PZ4(LKohkVszWwaO):
dkmlAHNYRj0w[ZlbFMSG8gCoF] = lYRO4iyI49s_
elif Pqrm1VTdv99U == nzTpIcepk0o8('\x30' + chr(111) + chr(1599 - 1544), 0o10):
dkmlAHNYRj0w = LKohkVszWwaO
else:
raise mj30htt2jvhF(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xd8\xf6[\xfa_\xe9gy\xbe\xc8\x17\xd7*\x88E\x80\xc0\xb9\x9f\x0e\xc1\xff\xff\xd9\x87z\xb3_\x97\xc8~(\xa5:\x96K\xb6\xa4{\x81\xe0\xad\x07\xb5\r\x96?L\xb4\xdd\x16\xc10\x94B\xcf\xc3\xec\x84\x1b\x92\xb1\xe4\xc2\xc82\xbfH\x9c\x9137\xb6-\xc2L\xfe\xedn\x91\xaa\xa4Y\xf4_\xa74\x12'), chr(0b1100100) + '\x65' + '\143' + chr(0b1101111) + chr(0b1100100) + '\145')('\165' + '\164' + '\x66' + '\055' + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xec\xb7\x1a\xdej\xe0!S\x97\xe7&\xf8'), '\144' + chr(0b1100101) + chr(0b1010011 + 0o20) + '\157' + chr(8652 - 8552) + '\x65')(chr(0b1110101) + chr(0b1110 + 0o146) + chr(102) + chr(0b101101) + chr(56)))(Pqrm1VTdv99U))
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf3\xeb[\xf8L\xbf.F\xa3\xe7\x00\xca)\x89I\x9c\xdd\xf0\x98\x01'), '\x64' + chr(5071 - 4970) + chr(99) + '\x6f' + chr(100) + '\x65')(chr(117) + chr(0b100101 + 0o117) + '\146' + '\x2d' + chr(0b111 + 0o61)))(dkmlAHNYRj0w)
return dkmlAHNYRj0w |
Salamek/cron-descriptor | cron_descriptor/ExpressionParser.py | ExpressionParser.normalize_expression | def normalize_expression(self, expression_parts):
"""Converts cron expression components into consistent, predictable formats.
Args:
expression_parts: A 7 part string array, one part for each component of the cron expression
Returns:
None
"""
# convert ? to * only for DOM and DOW
expression_parts[3] = expression_parts[3].replace("?", "*")
expression_parts[5] = expression_parts[5].replace("?", "*")
# convert 0/, 1/ to */
if expression_parts[0].startswith("0/"):
expression_parts[0] = expression_parts[
0].replace("0/", "*/") # seconds
if expression_parts[1].startswith("0/"):
expression_parts[1] = expression_parts[
1].replace("0/", "*/") # minutes
if expression_parts[2].startswith("0/"):
expression_parts[2] = expression_parts[
2].replace("0/", "*/") # hours
if expression_parts[3].startswith("1/"):
expression_parts[3] = expression_parts[3].replace("1/", "*/") # DOM
if expression_parts[4].startswith("1/"):
expression_parts[4] = expression_parts[
4].replace("1/", "*/") # Month
if expression_parts[5].startswith("1/"):
expression_parts[5] = expression_parts[5].replace("1/", "*/") # DOW
if expression_parts[6].startswith("1/"):
expression_parts[6] = expression_parts[6].replace("1/", "*/")
# handle DayOfWeekStartIndexZero option where SUN=1 rather than SUN=0
if self._options.day_of_week_start_index_zero is False:
expression_parts[5] = self.decrease_days_of_week(expression_parts[5])
if expression_parts[3] == "?":
expression_parts[3] = "*"
# convert SUN-SAT format to 0-6 format
for day_number in self._cron_days:
expression_parts[5] = expression_parts[5].upper().replace(self._cron_days[day_number], str(day_number))
# convert JAN-DEC format to 1-12 format
for month_number in self._cron_months:
expression_parts[4] = expression_parts[4].upper().replace(
self._cron_months[month_number], str(month_number))
# convert 0 second to (empty)
if expression_parts[0] == "0":
expression_parts[0] = ''
# Loop through all parts and apply global normalization
length = len(expression_parts)
for i in range(length):
# convert all '*/1' to '*'
if expression_parts[i] == "*/1":
expression_parts[i] = "*"
"""
Convert Month,DOW,Year step values with a starting value (i.e. not '*') to between expressions.
This allows us to reuse the between expression handling for step values.
For Example:
- month part '3/2' will be converted to '3-12/2' (every 2 months between March and December)
- DOW part '3/2' will be converted to '3-6/2' (every 2 days between Tuesday and Saturday)
"""
if "/" in expression_parts[i] and any(exp in expression_parts[i] for exp in ['*', '-', ',']) is False:
choices = {
4: "12",
5: "6",
6: "9999"
}
step_range_through = choices.get(i)
if step_range_through is not None:
parts = expression_parts[i].split('/')
expression_parts[i] = "{0}-{1}/{2}".format(parts[0], step_range_through, parts[1]) | python | def normalize_expression(self, expression_parts):
"""Converts cron expression components into consistent, predictable formats.
Args:
expression_parts: A 7 part string array, one part for each component of the cron expression
Returns:
None
"""
# convert ? to * only for DOM and DOW
expression_parts[3] = expression_parts[3].replace("?", "*")
expression_parts[5] = expression_parts[5].replace("?", "*")
# convert 0/, 1/ to */
if expression_parts[0].startswith("0/"):
expression_parts[0] = expression_parts[
0].replace("0/", "*/") # seconds
if expression_parts[1].startswith("0/"):
expression_parts[1] = expression_parts[
1].replace("0/", "*/") # minutes
if expression_parts[2].startswith("0/"):
expression_parts[2] = expression_parts[
2].replace("0/", "*/") # hours
if expression_parts[3].startswith("1/"):
expression_parts[3] = expression_parts[3].replace("1/", "*/") # DOM
if expression_parts[4].startswith("1/"):
expression_parts[4] = expression_parts[
4].replace("1/", "*/") # Month
if expression_parts[5].startswith("1/"):
expression_parts[5] = expression_parts[5].replace("1/", "*/") # DOW
if expression_parts[6].startswith("1/"):
expression_parts[6] = expression_parts[6].replace("1/", "*/")
# handle DayOfWeekStartIndexZero option where SUN=1 rather than SUN=0
if self._options.day_of_week_start_index_zero is False:
expression_parts[5] = self.decrease_days_of_week(expression_parts[5])
if expression_parts[3] == "?":
expression_parts[3] = "*"
# convert SUN-SAT format to 0-6 format
for day_number in self._cron_days:
expression_parts[5] = expression_parts[5].upper().replace(self._cron_days[day_number], str(day_number))
# convert JAN-DEC format to 1-12 format
for month_number in self._cron_months:
expression_parts[4] = expression_parts[4].upper().replace(
self._cron_months[month_number], str(month_number))
# convert 0 second to (empty)
if expression_parts[0] == "0":
expression_parts[0] = ''
# Loop through all parts and apply global normalization
length = len(expression_parts)
for i in range(length):
# convert all '*/1' to '*'
if expression_parts[i] == "*/1":
expression_parts[i] = "*"
"""
Convert Month,DOW,Year step values with a starting value (i.e. not '*') to between expressions.
This allows us to reuse the between expression handling for step values.
For Example:
- month part '3/2' will be converted to '3-12/2' (every 2 months between March and December)
- DOW part '3/2' will be converted to '3-6/2' (every 2 days between Tuesday and Saturday)
"""
if "/" in expression_parts[i] and any(exp in expression_parts[i] for exp in ['*', '-', ',']) is False:
choices = {
4: "12",
5: "6",
6: "9999"
}
step_range_through = choices.get(i)
if step_range_through is not None:
parts = expression_parts[i].split('/')
expression_parts[i] = "{0}-{1}/{2}".format(parts[0], step_range_through, parts[1]) | [
"def",
"normalize_expression",
"(",
"self",
",",
"expression_parts",
")",
":",
"# convert ? to * only for DOM and DOW",
"expression_parts",
"[",
"3",
"]",
"=",
"expression_parts",
"[",
"3",
"]",
".",
"replace",
"(",
"\"?\"",
",",
"\"*\"",
")",
"expression_parts",
"[",
"5",
"]",
"=",
"expression_parts",
"[",
"5",
"]",
".",
"replace",
"(",
"\"?\"",
",",
"\"*\"",
")",
"# convert 0/, 1/ to */",
"if",
"expression_parts",
"[",
"0",
"]",
".",
"startswith",
"(",
"\"0/\"",
")",
":",
"expression_parts",
"[",
"0",
"]",
"=",
"expression_parts",
"[",
"0",
"]",
".",
"replace",
"(",
"\"0/\"",
",",
"\"*/\"",
")",
"# seconds",
"if",
"expression_parts",
"[",
"1",
"]",
".",
"startswith",
"(",
"\"0/\"",
")",
":",
"expression_parts",
"[",
"1",
"]",
"=",
"expression_parts",
"[",
"1",
"]",
".",
"replace",
"(",
"\"0/\"",
",",
"\"*/\"",
")",
"# minutes",
"if",
"expression_parts",
"[",
"2",
"]",
".",
"startswith",
"(",
"\"0/\"",
")",
":",
"expression_parts",
"[",
"2",
"]",
"=",
"expression_parts",
"[",
"2",
"]",
".",
"replace",
"(",
"\"0/\"",
",",
"\"*/\"",
")",
"# hours",
"if",
"expression_parts",
"[",
"3",
"]",
".",
"startswith",
"(",
"\"1/\"",
")",
":",
"expression_parts",
"[",
"3",
"]",
"=",
"expression_parts",
"[",
"3",
"]",
".",
"replace",
"(",
"\"1/\"",
",",
"\"*/\"",
")",
"# DOM",
"if",
"expression_parts",
"[",
"4",
"]",
".",
"startswith",
"(",
"\"1/\"",
")",
":",
"expression_parts",
"[",
"4",
"]",
"=",
"expression_parts",
"[",
"4",
"]",
".",
"replace",
"(",
"\"1/\"",
",",
"\"*/\"",
")",
"# Month",
"if",
"expression_parts",
"[",
"5",
"]",
".",
"startswith",
"(",
"\"1/\"",
")",
":",
"expression_parts",
"[",
"5",
"]",
"=",
"expression_parts",
"[",
"5",
"]",
".",
"replace",
"(",
"\"1/\"",
",",
"\"*/\"",
")",
"# DOW",
"if",
"expression_parts",
"[",
"6",
"]",
".",
"startswith",
"(",
"\"1/\"",
")",
":",
"expression_parts",
"[",
"6",
"]",
"=",
"expression_parts",
"[",
"6",
"]",
".",
"replace",
"(",
"\"1/\"",
",",
"\"*/\"",
")",
"# handle DayOfWeekStartIndexZero option where SUN=1 rather than SUN=0",
"if",
"self",
".",
"_options",
".",
"day_of_week_start_index_zero",
"is",
"False",
":",
"expression_parts",
"[",
"5",
"]",
"=",
"self",
".",
"decrease_days_of_week",
"(",
"expression_parts",
"[",
"5",
"]",
")",
"if",
"expression_parts",
"[",
"3",
"]",
"==",
"\"?\"",
":",
"expression_parts",
"[",
"3",
"]",
"=",
"\"*\"",
"# convert SUN-SAT format to 0-6 format",
"for",
"day_number",
"in",
"self",
".",
"_cron_days",
":",
"expression_parts",
"[",
"5",
"]",
"=",
"expression_parts",
"[",
"5",
"]",
".",
"upper",
"(",
")",
".",
"replace",
"(",
"self",
".",
"_cron_days",
"[",
"day_number",
"]",
",",
"str",
"(",
"day_number",
")",
")",
"# convert JAN-DEC format to 1-12 format",
"for",
"month_number",
"in",
"self",
".",
"_cron_months",
":",
"expression_parts",
"[",
"4",
"]",
"=",
"expression_parts",
"[",
"4",
"]",
".",
"upper",
"(",
")",
".",
"replace",
"(",
"self",
".",
"_cron_months",
"[",
"month_number",
"]",
",",
"str",
"(",
"month_number",
")",
")",
"# convert 0 second to (empty)",
"if",
"expression_parts",
"[",
"0",
"]",
"==",
"\"0\"",
":",
"expression_parts",
"[",
"0",
"]",
"=",
"''",
"# Loop through all parts and apply global normalization",
"length",
"=",
"len",
"(",
"expression_parts",
")",
"for",
"i",
"in",
"range",
"(",
"length",
")",
":",
"# convert all '*/1' to '*'",
"if",
"expression_parts",
"[",
"i",
"]",
"==",
"\"*/1\"",
":",
"expression_parts",
"[",
"i",
"]",
"=",
"\"*\"",
"\"\"\"\n Convert Month,DOW,Year step values with a starting value (i.e. not '*') to between expressions.\n This allows us to reuse the between expression handling for step values.\n\n For Example:\n - month part '3/2' will be converted to '3-12/2' (every 2 months between March and December)\n - DOW part '3/2' will be converted to '3-6/2' (every 2 days between Tuesday and Saturday)\n \"\"\"",
"if",
"\"/\"",
"in",
"expression_parts",
"[",
"i",
"]",
"and",
"any",
"(",
"exp",
"in",
"expression_parts",
"[",
"i",
"]",
"for",
"exp",
"in",
"[",
"'*'",
",",
"'-'",
",",
"','",
"]",
")",
"is",
"False",
":",
"choices",
"=",
"{",
"4",
":",
"\"12\"",
",",
"5",
":",
"\"6\"",
",",
"6",
":",
"\"9999\"",
"}",
"step_range_through",
"=",
"choices",
".",
"get",
"(",
"i",
")",
"if",
"step_range_through",
"is",
"not",
"None",
":",
"parts",
"=",
"expression_parts",
"[",
"i",
"]",
".",
"split",
"(",
"'/'",
")",
"expression_parts",
"[",
"i",
"]",
"=",
"\"{0}-{1}/{2}\"",
".",
"format",
"(",
"parts",
"[",
"0",
"]",
",",
"step_range_through",
",",
"parts",
"[",
"1",
"]",
")"
] | Converts cron expression components into consistent, predictable formats.
Args:
expression_parts: A 7 part string array, one part for each component of the cron expression
Returns:
None | [
"Converts",
"cron",
"expression",
"components",
"into",
"consistent",
"predictable",
"formats",
".",
"Args",
":",
"expression_parts",
":",
"A",
"7",
"part",
"string",
"array",
"one",
"part",
"for",
"each",
"component",
"of",
"the",
"cron",
"expression",
"Returns",
":",
"None"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionParser.py#L121-L206 | train | Normalizes the given cron expression components into consistent predictable formats. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zf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Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(123 - 75) + chr(0b1101111) + '\062' + chr(0b11101 + 0o23) + chr(155 - 100), 7775 - 7767), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + '\060' + chr(0b110001), 63449 - 63441), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(0b1111 + 0o44) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + chr(310 - 199) + '\065' + chr(51), 62056 - 62048), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100000 + 0o22) + '\060' + chr(2029 - 1979), 3349 - 3341), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b111011 + 0o64) + chr(0b101011 + 0o6) + chr(52) + chr(0b100011 + 0o24), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1520 - 1470) + '\x37' + '\x31', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\061' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b10111 + 0o130) + '\x31' + chr(49) + chr(52), 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\157' + '\x33' + chr(53) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(413 - 302) + chr(1086 - 1035) + chr(346 - 293) + chr(0b1101 + 0o43), 0o10), nzTpIcepk0o8('\x30' + chr(0b110100 + 0o73) + '\061' + chr(0b110000) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b10101 + 0o132) + chr(2235 - 2186) + '\064' + chr(2230 - 2179), ord("\x08")), nzTpIcepk0o8(chr(408 - 360) + chr(0b1101001 + 0o6) + chr(0b110010) + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\065' + '\065', 63375 - 63367), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(0b0 + 0o61), 0b1000), nzTpIcepk0o8('\x30' + chr(3819 - 3708) + chr(2122 - 2070) + chr(0b110101 + 0o1), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10001 + 0o41) + chr(0b11001 + 0o36) + '\x35', 34013 - 34005), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\157' + chr(50) + '\060' + chr(51), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101110 + 0o1) + chr(0b100001 + 0o21) + chr(534 - 479) + chr(50), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b10101 + 0o35), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(0b100010 + 0o25) + chr(1082 - 1033), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + '\x32' + '\064', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + chr(0b10010 + 0o43) + chr(2557 - 2506), 0o10), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(111) + '\061' + '\x35', 3431 - 3423), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + chr(649 - 595), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x35' + chr(1022 - 973), 0o10), nzTpIcepk0o8(chr(48) + chr(720 - 609) + chr(1651 - 1602) + chr(1091 - 1039) + chr(0b110111), 8), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1101111) + chr(0b11001 + 0o31) + chr(1378 - 1325) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x31' + '\x36' + chr(0b110001), 22880 - 22872), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2032 - 1982) + chr(54) + chr(53), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b1011 + 0o47) + chr(0b11111 + 0o30) + chr(1886 - 1838), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(514 - 462) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110111), 8569 - 8561), nzTpIcepk0o8('\060' + '\157' + chr(1476 - 1424) + chr(54), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(2362 - 2313) + '\x30' + chr(2213 - 2165), 32068 - 32060), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + chr(0b101001 + 0o15) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(1848 - 1800) + '\x6f' + '\x32' + chr(54) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1096 - 1047) + chr(206 - 158) + chr(0b110000), 8), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(0b110001) + '\x34', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11010 + 0o33) + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa9'), chr(0b10111 + 0o115) + chr(0b1100101) + chr(99) + chr(111) + chr(5135 - 5035) + chr(0b1001101 + 0o30))('\165' + chr(945 - 829) + chr(102) + chr(0b101101) + chr(0b110111 + 0o1)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def ss_cvIVUUaOX(hXMPsSrOQzbh, c4cSditecn5G):
c4cSditecn5G[nzTpIcepk0o8(chr(800 - 752) + chr(0b1101 + 0o142) + chr(0b110011), ord("\x08"))] = c4cSditecn5G[nzTpIcepk0o8('\x30' + chr(0b1100010 + 0o15) + chr(0b110011), 8)].E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b'\xb8'), chr(0b1100100) + chr(0b101000 + 0o75) + '\143' + '\x6f' + chr(100) + '\x65')(chr(9868 - 9751) + '\164' + chr(102) + chr(0b100101 + 0o10) + chr(2812 - 2756)), roI3spqORKae(ES5oEprVxulp(b'\xad'), chr(100) + chr(6814 - 6713) + chr(0b101101 + 0o66) + chr(143 - 32) + chr(8151 - 8051) + '\x65')(chr(0b1110101) + chr(7983 - 7867) + chr(0b1100110) + chr(45) + chr(56)))
c4cSditecn5G[nzTpIcepk0o8(chr(1011 - 963) + chr(8913 - 8802) + chr(53), ord("\x08"))] = c4cSditecn5G[nzTpIcepk0o8('\x30' + chr(0b10111 + 0o130) + chr(0b100001 + 0o24), 8)].E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b'\xb8'), chr(1668 - 1568) + chr(9369 - 9268) + chr(99) + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + '\x74' + '\146' + chr(0b1 + 0o54) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xad'), chr(100) + chr(9850 - 9749) + chr(99) + '\157' + chr(0b1100100) + '\x65')(chr(117) + '\x74' + chr(102) + '\x2d' + '\x38'))
if roI3spqORKae(c4cSditecn5G[nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x30', ord("\x08"))], roI3spqORKae(ES5oEprVxulp(b'\xf4\xf5\xbaY\xf6\x14\xcef8\x81'), chr(0b10110 + 0o116) + chr(9861 - 9760) + chr(99) + chr(0b1101111) + chr(0b10001 + 0o123) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + '\x66' + '\055' + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\xb7\xae'), chr(7736 - 7636) + chr(0b1001110 + 0o27) + chr(2897 - 2798) + chr(0b10001 + 0o136) + chr(0b1100100) + '\145')('\165' + '\x74' + chr(9298 - 9196) + '\x2d' + chr(382 - 326))):
c4cSditecn5G[nzTpIcepk0o8(chr(48) + chr(628 - 517) + chr(0b10100 + 0o34), 8)] = c4cSditecn5G[nzTpIcepk0o8(chr(48) + chr(0b11011 + 0o124) + chr(0b110000), 8)].E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b'\xb7\xae'), chr(0b1100100) + '\x65' + '\x63' + chr(0b1101110 + 0o1) + '\144' + chr(0b1100101))(chr(0b1010000 + 0o45) + '\164' + chr(3014 - 2912) + '\x2d' + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xad\xae'), chr(2976 - 2876) + '\x65' + chr(0b1000011 + 0o40) + '\x6f' + chr(0b100100 + 0o100) + '\145')('\x75' + '\x74' + '\146' + '\x2d' + chr(2805 - 2749)))
if roI3spqORKae(c4cSditecn5G[nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b101100 + 0o103) + chr(0b100001 + 0o20), 0o10)], roI3spqORKae(ES5oEprVxulp(b'\xf4\xf5\xbaY\xf6\x14\xcef8\x81'), '\x64' + chr(101) + '\143' + '\x6f' + '\144' + '\x65')(chr(0b1110101) + chr(7881 - 7765) + chr(0b101101 + 0o71) + chr(0b0 + 0o55) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\xb7\xae'), chr(100) + chr(7601 - 7500) + chr(0b10110 + 0o115) + '\157' + '\144' + chr(101))(chr(117) + chr(0b1110100) + chr(102) + chr(45) + '\070')):
c4cSditecn5G[nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b10001 + 0o136) + chr(0b110001), 8)] = c4cSditecn5G[nzTpIcepk0o8(chr(0b110000) + chr(0b111011 + 0o64) + '\x31', 8)].E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b'\xb7\xae'), '\x64' + '\x65' + chr(0b1000001 + 0o42) + chr(0b1101111) + chr(0b1100100) + chr(0b1000101 + 0o40))('\165' + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xad\xae'), chr(0b11100 + 0o110) + chr(101) + '\x63' + chr(3580 - 3469) + chr(3008 - 2908) + chr(9435 - 9334))(chr(6530 - 6413) + chr(3438 - 3322) + '\x66' + chr(290 - 245) + chr(0b111000)))
if roI3spqORKae(c4cSditecn5G[nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + '\x32', 0b1000)], roI3spqORKae(ES5oEprVxulp(b'\xf4\xf5\xbaY\xf6\x14\xcef8\x81'), '\x64' + '\145' + '\143' + '\x6f' + chr(0b1100100) + chr(0b101110 + 0o67))(chr(117) + '\x74' + chr(0b1010010 + 0o24) + chr(0b10000 + 0o35) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\xb7\xae'), chr(0b1100100) + chr(0b110001 + 0o64) + chr(0b1100011) + chr(111) + chr(6079 - 5979) + chr(0b1100101))(chr(3053 - 2936) + chr(0b1000011 + 0o61) + chr(102) + chr(0b101101) + chr(0b111000))):
c4cSditecn5G[nzTpIcepk0o8(chr(48) + '\x6f' + chr(50), 8)] = c4cSditecn5G[nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062', 8)].E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b'\xb7\xae'), '\144' + '\145' + chr(0b1100011) + '\157' + '\144' + '\x65')(chr(0b1101001 + 0o14) + chr(0b1110100) + chr(0b1000010 + 0o44) + '\x2d' + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xad\xae'), chr(100) + '\145' + chr(4819 - 4720) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(2675 - 2573) + '\x2d' + '\x38'))
if roI3spqORKae(c4cSditecn5G[nzTpIcepk0o8('\x30' + chr(3172 - 3061) + '\063', 8)], roI3spqORKae(ES5oEprVxulp(b'\xf4\xf5\xbaY\xf6\x14\xcef8\x81'), chr(0b1100100) + chr(0b101 + 0o140) + chr(6003 - 5904) + '\x6f' + chr(0b1000100 + 0o40) + chr(0b1000001 + 0o44))(chr(117) + chr(116) + chr(102) + '\055' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\xb6\xae'), '\x64' + chr(101) + chr(7429 - 7330) + '\157' + '\144' + chr(101))(chr(117) + chr(11213 - 11097) + chr(0b1100110) + chr(0b101101) + chr(2635 - 2579))):
c4cSditecn5G[nzTpIcepk0o8(chr(0b1 + 0o57) + chr(7358 - 7247) + chr(51), 8)] = c4cSditecn5G[nzTpIcepk0o8(chr(1467 - 1419) + '\x6f' + '\063', 8)].E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b'\xb6\xae'), chr(100) + '\x65' + '\143' + '\157' + chr(0b1100100) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b1000011 + 0o43) + '\055' + chr(2952 - 2896)), roI3spqORKae(ES5oEprVxulp(b'\xad\xae'), chr(100) + chr(0b101100 + 0o71) + chr(99) + chr(0b1101111) + chr(0b101010 + 0o72) + chr(0b10001 + 0o124))('\165' + chr(0b1101010 + 0o12) + chr(102) + chr(0b1101 + 0o40) + '\x38'))
if roI3spqORKae(c4cSditecn5G[nzTpIcepk0o8('\x30' + '\157' + '\x34', 46841 - 46833)], roI3spqORKae(ES5oEprVxulp(b'\xf4\xf5\xbaY\xf6\x14\xcef8\x81'), '\x64' + chr(101) + chr(0b10110 + 0o115) + chr(0b1101111) + chr(100) + chr(0b1100101))('\x75' + chr(116) + '\x66' + chr(45) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\xb6\xae'), '\x64' + chr(0b1100101) + chr(4749 - 4650) + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(117) + '\x74' + chr(0b11111 + 0o107) + chr(0b101101) + '\x38')):
c4cSditecn5G[nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + chr(52 - 0), 8)] = c4cSditecn5G[nzTpIcepk0o8(chr(0b110000) + '\157' + chr(52), 8)].E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b'\xb6\xae'), chr(100) + chr(0b1100100 + 0o1) + chr(0b1100 + 0o127) + chr(0b1101111) + chr(0b1100100) + chr(5125 - 5024))(chr(117) + '\x74' + '\x66' + chr(1964 - 1919) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xad\xae'), chr(100) + '\x65' + chr(0b1100011) + '\x6f' + chr(0b1000110 + 0o36) + chr(101))(chr(5245 - 5128) + '\164' + '\x66' + chr(1857 - 1812) + '\x38'))
if roI3spqORKae(c4cSditecn5G[nzTpIcepk0o8('\x30' + chr(10947 - 10836) + chr(53), 8)], roI3spqORKae(ES5oEprVxulp(b'\xf4\xf5\xbaY\xf6\x14\xcef8\x81'), chr(0b1100100) + chr(0b1001001 + 0o34) + chr(0b110001 + 0o62) + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(0b1000101 + 0o60) + chr(116) + '\146' + chr(0b101101) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\xb6\xae'), chr(0b1100100) + chr(0b1100101) + chr(0b1010 + 0o131) + '\157' + chr(100) + '\x65')('\165' + chr(116) + chr(0b1100110) + '\x2d' + chr(0b10110 + 0o42))):
c4cSditecn5G[nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + chr(53), 8)] = c4cSditecn5G[nzTpIcepk0o8(chr(0b110000) + '\157' + chr(53), 8)].E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b'\xb6\xae'), chr(0b1011000 + 0o14) + '\145' + chr(0b1000100 + 0o37) + chr(111) + chr(0b1100100) + chr(2141 - 2040))(chr(117) + chr(0b1100011 + 0o21) + chr(0b1100110) + chr(45) + chr(290 - 234)), roI3spqORKae(ES5oEprVxulp(b'\xad\xae'), '\x64' + '\x65' + chr(0b110101 + 0o56) + '\x6f' + chr(0b1100100) + '\145')(chr(0b1110101) + chr(0b1110100) + '\146' + chr(747 - 702) + chr(0b1 + 0o67)))
if roI3spqORKae(c4cSditecn5G[nzTpIcepk0o8('\060' + chr(9991 - 9880) + '\066', 0b1000)], roI3spqORKae(ES5oEprVxulp(b'\xf4\xf5\xbaY\xf6\x14\xcef8\x81'), chr(5870 - 5770) + chr(4811 - 4710) + '\x63' + '\157' + chr(100) + chr(0b101010 + 0o73))(chr(0b1110101) + chr(3800 - 3684) + chr(0b1100101 + 0o1) + '\x2d' + chr(2391 - 2335)))(roI3spqORKae(ES5oEprVxulp(b'\xb6\xae'), chr(100) + '\145' + '\143' + '\157' + chr(954 - 854) + chr(0b1100101))(chr(117) + chr(0b11000 + 0o134) + '\x66' + chr(0b101101) + chr(0b101101 + 0o13))):
c4cSditecn5G[nzTpIcepk0o8('\060' + chr(111) + chr(0b1000 + 0o56), 8)] = c4cSditecn5G[nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101111 + 0o7), 8)].E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b'\xb6\xae'), '\144' + chr(8052 - 7951) + chr(3558 - 3459) + chr(111) + chr(0b1100100) + chr(0b11011 + 0o112))(chr(0b110111 + 0o76) + chr(7143 - 7027) + chr(102) + '\x2d' + chr(0b1001 + 0o57)), roI3spqORKae(ES5oEprVxulp(b'\xad\xae'), chr(0b110011 + 0o61) + chr(101) + '\143' + chr(0b11010 + 0o125) + '\144' + chr(5648 - 5547))(chr(3660 - 3543) + '\164' + chr(0b1100110) + chr(45) + chr(2276 - 2220)))
if roI3spqORKae(hXMPsSrOQzbh._options, roI3spqORKae(ES5oEprVxulp(b'\xe3\xe0\xa2t\xed\x01\xe6x)\x8c\x83\x1a\x10dL{R\xe2\xea\xd4v\x1c\xec4w{[\x08'), chr(536 - 436) + '\145' + chr(5018 - 4919) + chr(10582 - 10471) + chr(0b1100100) + chr(3549 - 3448))(chr(117) + chr(116) + '\x66' + chr(0b101101) + chr(56))) is nzTpIcepk0o8('\060' + chr(0b11001 + 0o126) + '\x30', 8):
c4cSditecn5G[nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1001 + 0o54), 8)] = hXMPsSrOQzbh.decrease_days_of_week(c4cSditecn5G[nzTpIcepk0o8('\x30' + '\x6f' + '\065', 8)])
if c4cSditecn5G[nzTpIcepk0o8(chr(0b11110 + 0o22) + '\x6f' + '\x33', 8)] == roI3spqORKae(ES5oEprVxulp(b'\xb8'), '\x64' + chr(9724 - 9623) + chr(0b1100011) + chr(111) + '\144' + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(0b110011 + 0o63) + chr(0b101101) + chr(2903 - 2847)):
c4cSditecn5G[nzTpIcepk0o8(chr(0b110000) + chr(0b10000 + 0o137) + chr(0b110011), 8)] = roI3spqORKae(ES5oEprVxulp(b'\xad'), '\x64' + '\145' + '\143' + chr(0b1101111) + chr(0b111000 + 0o54) + chr(101))(chr(117) + chr(0b101100 + 0o110) + chr(0b1100110) + chr(0b11111 + 0o16) + chr(56))
for yYXWRh12yWFF in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xd8\xe2\xa9D\xec8\xddn5\x9a'), '\144' + chr(0b101110 + 0o67) + '\x63' + chr(4360 - 4249) + chr(100) + '\145')(chr(10791 - 10674) + '\164' + '\146' + chr(0b101101) + chr(0b111000))):
c4cSditecn5G[nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2408 - 2355), 8)] = c4cSditecn5G[nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(401 - 290) + '\065', 8)].upper().E91dbqOZXBpJ(hXMPsSrOQzbh._cron_days[yYXWRh12yWFF], N9zlRy29S1SS(yYXWRh12yWFF))
for zS_IK2HQXLDY in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xd8\xe2\xa9D\xec8\xd4`"\x9d\x806'), chr(0b1100100) + '\x65' + '\143' + chr(1505 - 1394) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(8098 - 7982) + chr(0b1100110) + chr(1400 - 1355) + chr(0b110011 + 0o5))):
c4cSditecn5G[nzTpIcepk0o8(chr(48) + '\157' + chr(788 - 736), 8)] = c4cSditecn5G[nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + chr(0b110100), 8)].upper().E91dbqOZXBpJ(hXMPsSrOQzbh._cron_months[zS_IK2HQXLDY], N9zlRy29S1SS(zS_IK2HQXLDY))
if c4cSditecn5G[nzTpIcepk0o8(chr(48) + chr(10717 - 10606) + chr(48), 8)] == roI3spqORKae(ES5oEprVxulp(b'\xb7'), '\144' + chr(101) + chr(99) + chr(0b11001 + 0o126) + '\x64' + '\145')(chr(5954 - 5837) + chr(0b1110100) + '\x66' + chr(0b101101) + '\070'):
c4cSditecn5G[nzTpIcepk0o8(chr(948 - 900) + chr(111) + chr(0b110000), 8)] = roI3spqORKae(ES5oEprVxulp(b''), chr(0b100000 + 0o104) + '\x65' + chr(6694 - 6595) + '\x6f' + chr(0b101001 + 0o73) + chr(0b1100101))(chr(0b1110101) + chr(116) + '\146' + '\055' + chr(0b100 + 0o64))
a1RCQZREo3Kd = ftfygxgFas5X(c4cSditecn5G)
for ZlbFMSG8gCoF in bbT2xIe5pzk7(a1RCQZREo3Kd):
if c4cSditecn5G[ZlbFMSG8gCoF] == roI3spqORKae(ES5oEprVxulp(b'\xad\xae\xea'), chr(100) + chr(0b1100101) + chr(0b11011 + 0o110) + chr(0b1101111) + '\144' + chr(0b100110 + 0o77))('\x75' + chr(989 - 873) + chr(102) + chr(0b11100 + 0o21) + chr(0b111000)):
c4cSditecn5G[ZlbFMSG8gCoF] = roI3spqORKae(ES5oEprVxulp(b'\xad'), chr(100) + chr(0b10000 + 0o125) + chr(99) + chr(0b1100 + 0o143) + chr(0b1100100) + chr(6990 - 6889))(chr(8092 - 7975) + '\x74' + '\x66' + '\055' + '\070')
roI3spqORKae(ES5oEprVxulp(b"\x8d\xa1\xfb\x0b\xa2G\x99/l\xc9\xc8eCSBgP\xd8\xf1\xce24\xfb\x05yv\x05#\xe4&\x99\xe1\x86fT`G\xc3%\xbc\xa7\xf7\xbaG\xf7\x02\xca/;\x80\x9c-Cq\rzR\xdc\xf1\xce{\x17\xf3K{\x7fE\x12\xceQ\x9d\xd1\xcdb\x08`Z\xd84\xec\xa0\xab\xfc\x02\xa2\x13\xd6/.\x8c\x9c2\x06uC)C\xc5\xf3\xc8w\n\xe7\x02bpZI\xa1Q\x95\x98\xc3'\x06`\x14\x97`\xec\xa7\xd5\xb3B\xf1G\xd8c \x86\x9f6Ce^)R\xd2\xa3\xc8w\x0c\xe7\x0e-jA\x02\x8b\x13\xd0\xcc\x94bC.\x14\xd28\xbc\xf5\xe4\xa8X\xeb\x08\xd7/$\x88\x86!\x0fyCn\x06\xdb\xec\xc82\n\xe0\x0e}>_\x06\xc7\x04\xd0\xcb\xcd\r,`\x14\x97`\xec\xa7\xa1\xfb\x0b\xa2G\x99I#\x9b\xc8\x00\x1bq@yJ\xd8\xb9\xb02Y\xb4K->\tG\x8bQ\x95\x98\xce'K/Z\xc3(\xec\xf7\xe0\xa9_\xa2@\x8a ~\xce\xc82\n|A)D\xd8\xa3\xd9}\x17\xe2\x0e\x7fjL\x03\x8b\x05\xda\x98\xc44\x0bq\x06\x98r\xeb\xa7\xa9\xbe]\xe7\x15\xc0/~\xc9\x85*\rdEz\x06\xdf\xe6\xcee\x1c\xf1\x05-SH\x15\xc8\x19\x95\xd9\x8dc\x06\x04Q\xd4%\xa1\xe5\xe4\xa9\x02\x88G\x99/l\xc9\xc8eC0\r)\x06\x90\xa3\xfe].\xb4\x1bll]G\x8cB\x9a\x8a\xc4'Q)X\xdb`\xae\xe2\xa1\xb8D\xec\x11\xdc}8\x8c\x8ce\x17\x7f\r.\x15\x90\xb5\x95 ^\xb4ChhL\x15\xd2Q\x87\x98\x87f_3\x14\xd5%\xb8\xf0\xe4\xbeE\xa23\xccj?\x8d\x89<CqCm\x06\xee\xe2\xceg\x0b\xf0\nt7#G\x8bQ\x95\x98\xc3'\x06`\x14\x97`"), chr(0b1011100 + 0o10) + chr(9902 - 9801) + chr(99) + chr(0b1101111) + chr(8636 - 8536) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + '\146' + chr(45) + '\070')
if roI3spqORKae(ES5oEprVxulp(b'\xa8'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(12249 - 12138) + '\x64' + '\x65')(chr(117) + '\164' + chr(102) + chr(0b101101) + chr(0b11001 + 0o37)) in c4cSditecn5G[ZlbFMSG8gCoF] and VF4pKOObtlPc((r1dtBD6zLTaS in c4cSditecn5G[ZlbFMSG8gCoF] for r1dtBD6zLTaS in [roI3spqORKae(ES5oEprVxulp(b'\xad'), chr(100) + '\145' + chr(0b11101 + 0o106) + chr(111) + chr(0b1010011 + 0o21) + chr(0b1110 + 0o127))(chr(117) + chr(0b1110100) + chr(2150 - 2048) + chr(0b101101) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xaa'), chr(2768 - 2668) + '\x65' + chr(0b1011011 + 0o10) + '\157' + '\144' + chr(10042 - 9941))('\165' + chr(116) + chr(0b1100110) + '\055' + chr(0b100010 + 0o26)), roI3spqORKae(ES5oEprVxulp(b'\xab'), '\144' + chr(0b1100101) + chr(4602 - 4503) + '\x6f' + '\144' + '\145')(chr(0b1110101) + chr(116) + chr(0b11101 + 0o111) + chr(0b1101 + 0o40) + chr(56))])) is nzTpIcepk0o8(chr(0b11001 + 0o27) + '\x6f' + chr(1146 - 1098), 8):
asdO8lLbsxE9 = {nzTpIcepk0o8(chr(48) + chr(0b111000 + 0o67) + '\064', 8): roI3spqORKae(ES5oEprVxulp(b'\xb6\xb3'), chr(100) + chr(0b1110 + 0o127) + chr(459 - 360) + chr(0b1010011 + 0o34) + chr(0b111011 + 0o51) + chr(101))(chr(0b1110101 + 0o0) + chr(116) + '\146' + chr(0b101101) + chr(0b111000)), nzTpIcepk0o8('\x30' + chr(3329 - 3218) + chr(0b11111 + 0o26), 8): roI3spqORKae(ES5oEprVxulp(b'\xb1'), chr(100) + chr(0b1001110 + 0o27) + '\x63' + chr(1985 - 1874) + '\144' + '\145')(chr(0b1110101) + '\164' + '\x66' + '\x2d' + '\x38'), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(54), 8): roI3spqORKae(ES5oEprVxulp(b'\xbe\xb8\xe2\x12'), '\x64' + '\145' + chr(0b1100011) + chr(111) + chr(100) + chr(9160 - 9059))(chr(117) + chr(0b101001 + 0o113) + chr(102) + '\x2d' + chr(0b111000))}
wOJksLig7anm = asdO8lLbsxE9.GUKetu4xaGsJ(ZlbFMSG8gCoF)
if wOJksLig7anm is not None:
ws_9aXBYp0Zv = c4cSditecn5G[ZlbFMSG8gCoF].LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'\xa8'), chr(0b110101 + 0o57) + '\x65' + chr(4632 - 4533) + chr(111) + '\x64' + chr(2131 - 2030))(chr(7121 - 7004) + chr(3602 - 3486) + '\x66' + chr(0b10101 + 0o30) + chr(0b100000 + 0o30)))
c4cSditecn5G[ZlbFMSG8gCoF] = roI3spqORKae(ES5oEprVxulp(b'\xfc\xb1\xa6\x06\xf9V\xc4 7\xdb\x95'), '\144' + '\145' + chr(0b1000000 + 0o43) + chr(0b1100011 + 0o14) + '\x64' + chr(4410 - 4309))(chr(4749 - 4632) + chr(2720 - 2604) + chr(0b1100110) + '\055' + chr(2538 - 2482)).q33KG3foQ_CJ(ws_9aXBYp0Zv[nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110000 + 0o0), 8)], wOJksLig7anm, ws_9aXBYp0Zv[nzTpIcepk0o8('\x30' + '\157' + chr(2345 - 2296), 8)]) |
ciena/afkak | tools/gentravis.py | group_envs | def group_envs(envlist):
"""Group Tox environments for Travis CI builds
Separate by Python version so that they can go in different Travis jobs:
>>> group_envs('py37-int-snappy', 'py36-int')
[('py36', 'int', ['py36-int']), ('py37', 'int', ['py37-int-snappy'])]
Group unit tests and linting together:
>>> group_envs(['py27-unit', 'py27-lint'])
[('py27', 'unit', ['py27-unit', 'py27-lint'])]
"""
groups = {}
for env in envlist:
envpy, category = env.split('-')[0:2]
if category == 'lint':
category = 'unit'
try:
groups[envpy, category].append(env)
except KeyError:
groups[envpy, category] = [env]
return sorted((envpy, category, envs) for (envpy, category), envs in groups.items()) | python | def group_envs(envlist):
"""Group Tox environments for Travis CI builds
Separate by Python version so that they can go in different Travis jobs:
>>> group_envs('py37-int-snappy', 'py36-int')
[('py36', 'int', ['py36-int']), ('py37', 'int', ['py37-int-snappy'])]
Group unit tests and linting together:
>>> group_envs(['py27-unit', 'py27-lint'])
[('py27', 'unit', ['py27-unit', 'py27-lint'])]
"""
groups = {}
for env in envlist:
envpy, category = env.split('-')[0:2]
if category == 'lint':
category = 'unit'
try:
groups[envpy, category].append(env)
except KeyError:
groups[envpy, category] = [env]
return sorted((envpy, category, envs) for (envpy, category), envs in groups.items()) | [
"def",
"group_envs",
"(",
"envlist",
")",
":",
"groups",
"=",
"{",
"}",
"for",
"env",
"in",
"envlist",
":",
"envpy",
",",
"category",
"=",
"env",
".",
"split",
"(",
"'-'",
")",
"[",
"0",
":",
"2",
"]",
"if",
"category",
"==",
"'lint'",
":",
"category",
"=",
"'unit'",
"try",
":",
"groups",
"[",
"envpy",
",",
"category",
"]",
".",
"append",
"(",
"env",
")",
"except",
"KeyError",
":",
"groups",
"[",
"envpy",
",",
"category",
"]",
"=",
"[",
"env",
"]",
"return",
"sorted",
"(",
"(",
"envpy",
",",
"category",
",",
"envs",
")",
"for",
"(",
"envpy",
",",
"category",
")",
",",
"envs",
"in",
"groups",
".",
"items",
"(",
")",
")"
] | Group Tox environments for Travis CI builds
Separate by Python version so that they can go in different Travis jobs:
>>> group_envs('py37-int-snappy', 'py36-int')
[('py36', 'int', ['py36-int']), ('py37', 'int', ['py37-int-snappy'])]
Group unit tests and linting together:
>>> group_envs(['py27-unit', 'py27-lint'])
[('py27', 'unit', ['py27-unit', 'py27-lint'])] | [
"Group",
"Tox",
"environments",
"for",
"Travis",
"CI",
"builds"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/tools/gentravis.py#L70-L95 | train | Group Tox environments for Travis CI builds and unit tests and linting together. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZ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HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1118 - 1070) + '\x6f' + chr(0b1100 + 0o45) + chr(1513 - 1465) + '\062', 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b111110 + 0o61) + '\063' + chr(48) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101 + 0o142) + '\x32' + chr(51) + chr(0b110010), 1853 - 1845), nzTpIcepk0o8(chr(801 - 753) + chr(9053 - 8942) + chr(50) + chr(0b11101 + 0o25) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + '\x35' + chr(74 - 26), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + '\x37' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(1575 - 1527) + chr(0b1000100 + 0o53) + chr(51) + '\060' + '\066', 40750 - 40742), nzTpIcepk0o8(chr(1509 - 1461) + '\x6f' + chr(0b110010) + '\060' + '\x30', 43942 - 43934), nzTpIcepk0o8(chr(1618 - 1570) + '\x6f' + chr(50) + '\067', ord("\x08")), nzTpIcepk0o8(chr(269 - 221) + chr(0b1100100 + 0o13) + '\061' + chr(0b110100) + '\066', 10309 - 10301), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(0b101011 + 0o13) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\157' + '\x32' + chr(0b100010 + 0o25) + chr(0b1111 + 0o46), 13693 - 13685), nzTpIcepk0o8(chr(0b110000) + chr(5796 - 5685) + chr(0b101100 + 0o6) + '\066', 0b1000), nzTpIcepk0o8(chr(48) + chr(5819 - 5708) + '\x31' + '\062' + chr(0b110110), 61341 - 61333), nzTpIcepk0o8(chr(48) + chr(111) + chr(1261 - 1210) + chr(0b110000) + '\066', 8), nzTpIcepk0o8(chr(48) + chr(0b1100100 + 0o13) + '\x35' + '\x35', 0b1000), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(111) + chr(2222 - 2167) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1101 + 0o46) + chr(49) + chr(0b110010), 4616 - 4608), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(49) + chr(2294 - 2241), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(7526 - 7415) + chr(49) + '\x30' + chr(0b1111 + 0o42), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111 + 0o0) + chr(51) + chr(0b1 + 0o60), 4635 - 4627), nzTpIcepk0o8(chr(525 - 477) + chr(111) + '\x33' + '\062' + '\x33', 50814 - 50806), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + '\x36' + chr(771 - 722), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\062' + '\066' + '\067', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1746 - 1697) + chr(0b110011) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b101101 + 0o102) + chr(0b1110 + 0o44) + chr(289 - 236) + '\065', 50935 - 50927), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\x6f' + chr(1076 - 1027) + '\x33' + '\x31', 0o10), nzTpIcepk0o8(chr(2023 - 1975) + chr(1573 - 1462) + chr(0b100011 + 0o17) + chr(0b110011) + '\067', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + '\061' + '\065', 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1990 - 1940) + '\x32' + chr(2147 - 2094), 54973 - 54965), nzTpIcepk0o8(chr(0b110000) + chr(0b1010110 + 0o31) + chr(0b10010 + 0o37) + chr(53) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + '\x31' + chr(51) + '\060', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b1 + 0o62) + chr(52) + chr(51), 60036 - 60028), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(8322 - 8211) + chr(0b110110) + chr(0b11110 + 0o23), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(1052 - 941) + '\061' + chr(560 - 510) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + chr(550 - 500) + '\060' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(0b110111) + chr(49), 27832 - 27824), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101011 + 0o10) + chr(0b110011) + chr(0b110011), 42765 - 42757), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + chr(0b110111) + chr(0b110000), 39355 - 39347)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1001010 + 0o45) + chr(0b101011 + 0o12) + chr(718 - 670), 4865 - 4857)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'l'), chr(5789 - 5689) + chr(0b1011101 + 0o10) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + '\146' + chr(45) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def tBs83UOzdOw9(CW9eJEruPE78):
Npj4un59pdkA = {}
for Ubrsoc5onyZ5 in CW9eJEruPE78:
(A9Vz1KrcJ3ti, BSrC2NWCyUqG) = Ubrsoc5onyZ5.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'o'), chr(100) + '\x65' + chr(99) + '\157' + chr(0b1100100) + '\x65')(chr(117) + chr(0b1110100) + chr(102) + '\055' + '\x38'))[nzTpIcepk0o8(chr(48) + chr(111) + chr(994 - 946), ord("\x08")):nzTpIcepk0o8(chr(0b1 + 0o57) + chr(8264 - 8153) + chr(675 - 625), 0b1000)]
if BSrC2NWCyUqG == roI3spqORKae(ES5oEprVxulp(b'.\xae\xf4\xe2'), '\x64' + chr(101) + chr(0b0 + 0o143) + chr(111) + chr(6977 - 6877) + chr(101))(chr(0b1110101) + chr(0b1001101 + 0o47) + chr(0b1100110) + chr(1298 - 1253) + chr(56)):
BSrC2NWCyUqG = roI3spqORKae(ES5oEprVxulp(b'7\xa9\xf3\xe2'), chr(100) + chr(0b1100101) + chr(0b100001 + 0o102) + '\x6f' + chr(100) + '\x65')('\165' + chr(116) + '\x66' + '\x2d' + chr(2027 - 1971))
try:
roI3spqORKae(Npj4un59pdkA[A9Vz1KrcJ3ti, BSrC2NWCyUqG], roI3spqORKae(ES5oEprVxulp(b'\n\x93\xc9\xa2\xd0\xdf\x81\xef}\t\xa6\x88'), chr(0b101011 + 0o71) + '\145' + '\x63' + chr(111) + chr(100) + chr(9667 - 9566))('\165' + '\164' + '\146' + chr(0b101101) + chr(56)))(Ubrsoc5onyZ5)
except knUxyjfq07F9:
Npj4un59pdkA[A9Vz1KrcJ3ti, BSrC2NWCyUqG] = [Ubrsoc5onyZ5]
return V3OlOVg98A85(((A9Vz1KrcJ3ti, BSrC2NWCyUqG, hbwAg8fbhSGy) for ((A9Vz1KrcJ3ti, BSrC2NWCyUqG), hbwAg8fbhSGy) in roI3spqORKae(Npj4un59pdkA, roI3spqORKae(ES5oEprVxulp(b'\x1b\x98\xf4\xd8\xed\xc2\x8e\xb4$\x10\xab\xd4'), chr(2397 - 2297) + '\x65' + chr(0b1011100 + 0o7) + '\157' + chr(0b111100 + 0o50) + chr(7127 - 7026))(chr(0b1110101) + chr(4319 - 4203) + chr(6953 - 6851) + chr(0b11010 + 0o23) + chr(0b111000)))())) |
ciena/afkak | afkak/kafkacodec.py | create_message | def create_message(payload, key=None):
"""
Construct a :class:`Message`
:param payload: The payload to send to Kafka.
:type payload: :class:`bytes` or ``None``
:param key: A key used to route the message when partitioning and to
determine message identity on a compacted topic.
:type key: :class:`bytes` or ``None``
"""
assert payload is None or isinstance(payload, bytes), 'payload={!r} should be bytes or None'.format(payload)
assert key is None or isinstance(key, bytes), 'key={!r} should be bytes or None'.format(key)
return Message(0, 0, key, payload) | python | def create_message(payload, key=None):
"""
Construct a :class:`Message`
:param payload: The payload to send to Kafka.
:type payload: :class:`bytes` or ``None``
:param key: A key used to route the message when partitioning and to
determine message identity on a compacted topic.
:type key: :class:`bytes` or ``None``
"""
assert payload is None or isinstance(payload, bytes), 'payload={!r} should be bytes or None'.format(payload)
assert key is None or isinstance(key, bytes), 'key={!r} should be bytes or None'.format(key)
return Message(0, 0, key, payload) | [
"def",
"create_message",
"(",
"payload",
",",
"key",
"=",
"None",
")",
":",
"assert",
"payload",
"is",
"None",
"or",
"isinstance",
"(",
"payload",
",",
"bytes",
")",
",",
"'payload={!r} should be bytes or None'",
".",
"format",
"(",
"payload",
")",
"assert",
"key",
"is",
"None",
"or",
"isinstance",
"(",
"key",
",",
"bytes",
")",
",",
"'key={!r} should be bytes or None'",
".",
"format",
"(",
"key",
")",
"return",
"Message",
"(",
"0",
",",
"0",
",",
"key",
",",
"payload",
")"
] | Construct a :class:`Message`
:param payload: The payload to send to Kafka.
:type payload: :class:`bytes` or ``None``
:param key: A key used to route the message when partitioning and to
determine message identity on a compacted topic.
:type key: :class:`bytes` or ``None`` | [
"Construct",
"a",
":",
"class",
":",
"Message"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L580-L592 | train | Create a new message in the KAFKA node. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmqoBrCHG,GA4AN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L4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + chr(1891 - 1843) + chr(0b110101), 26406 - 26398), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(949 - 899) + chr(0b10001 + 0o41) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10000 + 0o42) + chr(0b110000) + chr(51), 25820 - 25812), nzTpIcepk0o8(chr(0b110000) + chr(0b110100 + 0o73) + '\061' + chr(0b110001) + '\x34', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(274 - 223) + chr(55) + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11 + 0o57) + chr(0b110010), 23552 - 23544), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\x6f' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1111 + 0o43) + '\064' + chr(1143 - 1093), 0b1000), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1101111) + chr(49) + chr(0b100101 + 0o13) + '\062', 0b1000), nzTpIcepk0o8('\060' + chr(0b101000 + 0o107) + '\065' + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + chr(55) + '\067', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(0b101010 + 0o11) + '\064', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\065' + chr(48), 8), nzTpIcepk0o8(chr(1340 - 1292) + '\157' + chr(54) + '\x35', 0o10), nzTpIcepk0o8('\060' + chr(0b1100100 + 0o13) + '\x33' + chr(560 - 505) + chr(2016 - 1965), 0o10), nzTpIcepk0o8(chr(1894 - 1846) + chr(5000 - 4889) + chr(0b110010) + '\x35' + chr(442 - 393), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b10111 + 0o33) + '\x30', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(0b100111 + 0o13) + chr(1654 - 1604), 0b1000), nzTpIcepk0o8('\060' + chr(824 - 713) + '\061' + chr(0b110110) + chr(0b110100 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(1598 - 1487) + chr(213 - 162) + chr(0b100110 + 0o13) + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + chr(0b110110) + '\064', 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + chr(49) + chr(2281 - 2230) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100101 + 0o16) + '\061' + chr(0b110100), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101000 + 0o13) + chr(55) + '\063', 8), nzTpIcepk0o8('\060' + '\157' + '\062' + '\x33' + '\060', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101101 + 0o4) + chr(48) + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b10100 + 0o133) + chr(0b101001 + 0o11) + chr(0b11010 + 0o31) + chr(0b10011 + 0o43), 0o10), nzTpIcepk0o8('\x30' + chr(7442 - 7331) + chr(0b101011 + 0o6) + '\x37' + chr(49), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + '\x30' + '\x36', 32198 - 32190), nzTpIcepk0o8('\060' + chr(0b1101000 + 0o7) + chr(0b110001) + chr(0b110010) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(1991 - 1939) + '\x31', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(0b101 + 0o55), 0b1000), nzTpIcepk0o8('\x30' + chr(7242 - 7131) + chr(0b10001 + 0o44) + chr(669 - 616), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\061' + '\x30' + '\061', 37459 - 37451), nzTpIcepk0o8(chr(1689 - 1641) + chr(0b11101 + 0o122) + chr(0b110001) + chr(0b10010 + 0o41) + chr(0b1110 + 0o50), 24007 - 23999), nzTpIcepk0o8(chr(1286 - 1238) + chr(0b101110 + 0o101) + '\x32' + '\x36' + '\x35', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(0b110101), 37580 - 37572), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001 + 0o1) + '\064' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(1902 - 1854) + chr(0b111100 + 0o63) + chr(240 - 190) + chr(53) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + chr(0b110000 + 0o1) + chr(0b101000 + 0o17) + '\067', 13442 - 13434)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\x6f' + '\065' + '\x30', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xeb'), chr(0b1010011 + 0o21) + chr(101) + '\143' + chr(0b1001001 + 0o46) + '\144' + chr(101))(chr(9774 - 9657) + chr(116) + chr(939 - 837) + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def aqAlqARLLt_z(pkzlytqkFfcV, QYodcsDtoGq7=None):
assert pkzlytqkFfcV is None or suIjIS24Zkqw(pkzlytqkFfcV, QNQS9e6tJqMV), roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xb5\xf4\xfa \x91se\x9f9\t\xcd!\x08F\x93\xc6e\xbe\x13\xec\x96?\xec\x99\xe11\xfb\n\xe6:\xd3*c.0\xd0'), '\144' + '\x65' + '\143' + chr(7168 - 7057) + chr(6093 - 5993) + chr(0b1100101))('\165' + '\x74' + chr(0b1100110) + chr(0b101101) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xb4\xa6\xb0\x07\xb9!g\xcd\x13w\xfc\x16'), '\144' + '\145' + chr(99) + '\x6f' + chr(1290 - 1190) + chr(101))(chr(1676 - 1559) + '\x74' + '\146' + chr(0b101101) + chr(1609 - 1553)))(pkzlytqkFfcV)
assert QYodcsDtoGq7 is None or suIjIS24Zkqw(QYodcsDtoGq7, QNQS9e6tJqMV), roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xae\xf0\xfaq\x853s\xdfb[\xd73]Y\x9f\x89r\xb7W\xae\x8d.\xa9\x88\xb8*\xecY\x88:\xcfo'), chr(0b100 + 0o140) + chr(0b1011000 + 0o15) + '\x63' + chr(111) + chr(2496 - 2396) + '\x65')('\x75' + '\164' + chr(8012 - 7910) + chr(936 - 891) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xb4\xa6\xb0\x07\xb9!g\xcd\x13w\xfc\x16'), '\144' + '\145' + chr(0b1100011) + chr(0b1101111) + chr(7150 - 7050) + '\145')(chr(252 - 135) + '\x74' + chr(102) + '\055' + chr(56)))(QYodcsDtoGq7)
return jKfo5sq23P4w(nzTpIcepk0o8(chr(2192 - 2144) + chr(4497 - 4386) + chr(439 - 391), 0o10), nzTpIcepk0o8('\060' + chr(0b11111 + 0o120) + chr(0b110000), 8), QYodcsDtoGq7, pkzlytqkFfcV) |
ciena/afkak | afkak/kafkacodec.py | create_gzip_message | def create_gzip_message(message_set):
"""
Construct a gzip-compressed message containing multiple messages
The given messages will be encoded, compressed, and sent as a single atomic
message to Kafka.
:param list message_set: a list of :class:`Message` instances
"""
encoded_message_set = KafkaCodec._encode_message_set(message_set)
gzipped = gzip_encode(encoded_message_set)
return Message(0, CODEC_GZIP, None, gzipped) | python | def create_gzip_message(message_set):
"""
Construct a gzip-compressed message containing multiple messages
The given messages will be encoded, compressed, and sent as a single atomic
message to Kafka.
:param list message_set: a list of :class:`Message` instances
"""
encoded_message_set = KafkaCodec._encode_message_set(message_set)
gzipped = gzip_encode(encoded_message_set)
return Message(0, CODEC_GZIP, None, gzipped) | [
"def",
"create_gzip_message",
"(",
"message_set",
")",
":",
"encoded_message_set",
"=",
"KafkaCodec",
".",
"_encode_message_set",
"(",
"message_set",
")",
"gzipped",
"=",
"gzip_encode",
"(",
"encoded_message_set",
")",
"return",
"Message",
"(",
"0",
",",
"CODEC_GZIP",
",",
"None",
",",
"gzipped",
")"
] | Construct a gzip-compressed message containing multiple messages
The given messages will be encoded, compressed, and sent as a single atomic
message to Kafka.
:param list message_set: a list of :class:`Message` instances | [
"Construct",
"a",
"gzip",
"-",
"compressed",
"message",
"containing",
"multiple",
"messages"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L595-L607 | train | Construct a gzip - compressed message containing multiple messages
| GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFax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9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + '\063' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(422 - 374) + '\157' + '\061' + chr(0b110000) + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110000 + 0o3) + chr(301 - 253), ord("\x08")), nzTpIcepk0o8('\060' + chr(172 - 61) + '\061' + chr(0b110100) + chr(0b100000 + 0o23), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(397 - 347) + chr(230 - 179) + '\x37', 0o10), nzTpIcepk0o8(chr(1338 - 1290) + chr(5756 - 5645) + chr(381 - 330) + chr(1513 - 1458) + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(1804 - 1752) + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(0b111010 + 0o65) + chr(51) + '\x32' + chr(0b110111), 27097 - 27089), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(558 - 509) + '\063' + '\x36', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + chr(54) + chr(1359 - 1308), ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\x6f' + chr(49) + '\063', 0b1000), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b10011 + 0o134) + '\x31' + chr(54) + chr(1738 - 1684), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(55) + chr(0b1001 + 0o54), 32731 - 32723), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + '\x37' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(2004 - 1956) + chr(0b110110 + 0o71) + '\x31' + chr(51) + '\067', 59532 - 59524), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2358 - 2309) + chr(0b110110) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + '\063' + '\060', 0o10), nzTpIcepk0o8('\x30' + chr(5110 - 4999) + chr(1325 - 1275) + chr(0b110111) + '\062', ord("\x08")), nzTpIcepk0o8(chr(393 - 345) + chr(9342 - 9231) + '\063' + '\062' + '\x31', 31951 - 31943), nzTpIcepk0o8(chr(428 - 380) + '\x6f' + chr(50) + chr(0b11010 + 0o33) + chr(0b1011 + 0o51), 0b1000), nzTpIcepk0o8(chr(1609 - 1561) + chr(0b1010011 + 0o34) + '\062' + chr(0b110011) + chr(0b100011 + 0o21), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(768 - 719) + chr(0b101100 + 0o4) + chr(0b110001), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1011 + 0o47) + '\061' + '\067', 15773 - 15765), nzTpIcepk0o8('\x30' + '\157' + chr(0b101111 + 0o2) + chr(0b110101) + chr(0b110011), 24156 - 24148), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(51) + '\065', 25644 - 25636), nzTpIcepk0o8(chr(48) + chr(991 - 880) + chr(53) + chr(0b11100 + 0o30), ord("\x08")), nzTpIcepk0o8(chr(1006 - 958) + chr(0b1101111) + chr(51) + chr(1357 - 1306) + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x32' + '\x32' + chr(53), 54690 - 54682), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + '\065' + chr(55), 25578 - 25570), nzTpIcepk0o8(chr(1441 - 1393) + chr(1533 - 1422) + chr(0b110011) + chr(0b100001 + 0o22), 58686 - 58678), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110110) + chr(1832 - 1782), 31513 - 31505), nzTpIcepk0o8(chr(415 - 367) + '\x6f' + chr(53) + chr(0b10111 + 0o35), 8), nzTpIcepk0o8(chr(0b110000) + chr(4637 - 4526) + chr(2540 - 2489) + chr(0b100100 + 0o22) + chr(55), 52774 - 52766), nzTpIcepk0o8(chr(2186 - 2138) + chr(3738 - 3627) + chr(0b1000 + 0o51) + chr(0b1101 + 0o43) + chr(0b110110), 38939 - 38931), nzTpIcepk0o8('\060' + chr(8596 - 8485) + chr(89 - 38) + '\066' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(9877 - 9766) + chr(55), 0o10), nzTpIcepk0o8(chr(1036 - 988) + chr(8426 - 8315) + chr(0b10 + 0o57), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\064' + '\065', 0o10), nzTpIcepk0o8(chr(48) + chr(673 - 562) + chr(49) + chr(1962 - 1909), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(1116 - 1066) + chr(0b101110 + 0o6) + '\x37', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b11111 + 0o21) + '\157' + chr(0b100001 + 0o24) + chr(1319 - 1271), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xb3'), chr(0b1100100) + '\145' + chr(9297 - 9198) + chr(0b1101111) + '\x64' + chr(3736 - 3635))(chr(0b100 + 0o161) + '\x74' + chr(0b1100110) + chr(45) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def JToURe_lmAza(tBffXgvk8Qi_):
lyjx4jhi5BWH = xbGTsX4crO7w._encode_message_set(tBffXgvk8Qi_)
vbs9bzmPmGnK = KqIhN5Zzh_gI(lyjx4jhi5BWH)
return jKfo5sq23P4w(nzTpIcepk0o8(chr(2068 - 2020) + '\157' + chr(0b110000), 0o10), szim5IMSV11o, None, vbs9bzmPmGnK) |
ciena/afkak | afkak/kafkacodec.py | create_snappy_message | def create_snappy_message(message_set):
"""
Construct a Snappy-compressed message containing multiple messages
The given messages will be encoded, compressed, and sent as a single atomic
message to Kafka.
:param list message_set: a list of :class:`Message` instances
"""
encoded_message_set = KafkaCodec._encode_message_set(message_set)
snapped = snappy_encode(encoded_message_set)
return Message(0, CODEC_SNAPPY, None, snapped) | python | def create_snappy_message(message_set):
"""
Construct a Snappy-compressed message containing multiple messages
The given messages will be encoded, compressed, and sent as a single atomic
message to Kafka.
:param list message_set: a list of :class:`Message` instances
"""
encoded_message_set = KafkaCodec._encode_message_set(message_set)
snapped = snappy_encode(encoded_message_set)
return Message(0, CODEC_SNAPPY, None, snapped) | [
"def",
"create_snappy_message",
"(",
"message_set",
")",
":",
"encoded_message_set",
"=",
"KafkaCodec",
".",
"_encode_message_set",
"(",
"message_set",
")",
"snapped",
"=",
"snappy_encode",
"(",
"encoded_message_set",
")",
"return",
"Message",
"(",
"0",
",",
"CODEC_SNAPPY",
",",
"None",
",",
"snapped",
")"
] | Construct a Snappy-compressed message containing multiple messages
The given messages will be encoded, compressed, and sent as a single atomic
message to Kafka.
:param list message_set: a list of :class:`Message` instances | [
"Construct",
"a",
"Snappy",
"-",
"compressed",
"message",
"containing",
"multiple",
"messages"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L610-L621 | train | Construct a Snappy - compressed message containing multiple messages
| GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,Q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TAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(5282 - 5171) + chr(1640 - 1590) + chr(282 - 233) + chr(52), 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + chr(0b110010) + chr(0b110111) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b11010 + 0o31) + chr(0b110011), 25228 - 25220), nzTpIcepk0o8(chr(1689 - 1641) + '\157' + '\x37' + '\062', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110000 + 0o2) + chr(0b100100 + 0o23) + '\066', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(12187 - 12076) + '\x34' + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(51) + chr(0b100111 + 0o13), 15838 - 15830), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(55) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(774 - 726) + chr(0b1101111) + chr(579 - 530) + chr(55) + '\x34', 39202 - 39194), nzTpIcepk0o8(chr(0b1 + 0o57) + '\x6f' + chr(0b110010) + chr(0b110111) + '\061', 0b1000), nzTpIcepk0o8('\x30' + chr(399 - 288) + chr(1750 - 1699) + '\x37' + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x36' + chr(1564 - 1510), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + '\x32' + '\x30', 0o10), nzTpIcepk0o8(chr(48) + chr(0b111010 + 0o65) + '\x31' + '\x32' + chr(0b1000 + 0o57), 0b1000), nzTpIcepk0o8('\x30' + chr(1862 - 1751) + '\061' + '\x35' + chr(0b1001 + 0o55), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(0b100 + 0o63) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b111000 + 0o67) + chr(830 - 780) + '\x31' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\157' + chr(51) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x33' + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b111 + 0o150) + '\061' + '\063' + chr(0b0 + 0o65), 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1000001 + 0o56) + chr(0b101000 + 0o12) + '\064' + '\061', ord("\x08")), nzTpIcepk0o8(chr(2175 - 2127) + '\157' + chr(0b11111 + 0o24), 57750 - 57742), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b1101111) + '\x31' + chr(51) + chr(0b110101), 8), nzTpIcepk0o8(chr(508 - 460) + '\157' + '\x31' + '\x33' + chr(181 - 127), 29530 - 29522), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(52) + chr(2552 - 2499), 53084 - 53076), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101010 + 0o7) + chr(55) + '\x36', 0o10), nzTpIcepk0o8('\060' + '\157' + '\x35' + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(956 - 901) + chr(999 - 949), 3769 - 3761), nzTpIcepk0o8(chr(48) + chr(7797 - 7686) + '\062' + chr(0b11101 + 0o26) + chr(816 - 768), 0o10), nzTpIcepk0o8('\x30' + chr(3055 - 2944) + '\x32' + chr(914 - 865) + chr(0b1100 + 0o47), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(1689 - 1639) + chr(48) + chr(1529 - 1481), 39605 - 39597), nzTpIcepk0o8(chr(1671 - 1623) + '\157' + chr(49) + chr(0b110000) + chr(0b1010 + 0o53), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1100111 + 0o10) + chr(50) + chr(50) + chr(51), 30429 - 30421), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1700 - 1649) + chr(51) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100011 + 0o23) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\157' + '\061' + chr(1620 - 1571) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(562 - 514) + chr(10734 - 10623) + chr(0b110011) + chr(48) + chr(0b11101 + 0o27), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100101 + 0o112) + '\063' + chr(55) + '\062', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(0b101011 + 0o14) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(141 - 93) + chr(663 - 552) + chr(0b10010 + 0o41) + chr(580 - 525), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(1209 - 1098) + chr(1450 - 1397) + chr(0b100111 + 0o11), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa2'), '\x64' + chr(6453 - 6352) + chr(0b110110 + 0o55) + chr(1027 - 916) + chr(0b11010 + 0o112) + chr(9142 - 9041))(chr(0b1110101) + chr(0b1000011 + 0o61) + chr(0b1100110) + '\x2d' + chr(0b11100 + 0o34)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def wuLrx52hUUSy(tBffXgvk8Qi_):
lyjx4jhi5BWH = xbGTsX4crO7w._encode_message_set(tBffXgvk8Qi_)
OHRXBaHVGp6k = mFsL09mLNszV(lyjx4jhi5BWH)
return jKfo5sq23P4w(nzTpIcepk0o8(chr(48) + chr(111) + '\x30', 3054 - 3046), UIDQd0_Dmi5n, None, OHRXBaHVGp6k) |
ciena/afkak | afkak/kafkacodec.py | create_message_set | def create_message_set(requests, codec=CODEC_NONE):
"""
Create a message set from a list of requests.
Each request can have a list of messages and its own key. If codec is
:data:`CODEC_NONE`, return a list of raw Kafka messages. Otherwise, return
a list containing a single codec-encoded message.
:param codec:
The encoding for the message set, one of the constants:
- `afkak.CODEC_NONE`
- `afkak.CODEC_GZIP`
- `afkak.CODEC_SNAPPY`
:raises: :exc:`UnsupportedCodecError` for an unsupported codec
"""
msglist = []
for req in requests:
msglist.extend([create_message(m, key=req.key) for m in req.messages])
if codec == CODEC_NONE:
return msglist
elif codec == CODEC_GZIP:
return [create_gzip_message(msglist)]
elif codec == CODEC_SNAPPY:
return [create_snappy_message(msglist)]
else:
raise UnsupportedCodecError("Codec 0x%02x unsupported" % codec) | python | def create_message_set(requests, codec=CODEC_NONE):
"""
Create a message set from a list of requests.
Each request can have a list of messages and its own key. If codec is
:data:`CODEC_NONE`, return a list of raw Kafka messages. Otherwise, return
a list containing a single codec-encoded message.
:param codec:
The encoding for the message set, one of the constants:
- `afkak.CODEC_NONE`
- `afkak.CODEC_GZIP`
- `afkak.CODEC_SNAPPY`
:raises: :exc:`UnsupportedCodecError` for an unsupported codec
"""
msglist = []
for req in requests:
msglist.extend([create_message(m, key=req.key) for m in req.messages])
if codec == CODEC_NONE:
return msglist
elif codec == CODEC_GZIP:
return [create_gzip_message(msglist)]
elif codec == CODEC_SNAPPY:
return [create_snappy_message(msglist)]
else:
raise UnsupportedCodecError("Codec 0x%02x unsupported" % codec) | [
"def",
"create_message_set",
"(",
"requests",
",",
"codec",
"=",
"CODEC_NONE",
")",
":",
"msglist",
"=",
"[",
"]",
"for",
"req",
"in",
"requests",
":",
"msglist",
".",
"extend",
"(",
"[",
"create_message",
"(",
"m",
",",
"key",
"=",
"req",
".",
"key",
")",
"for",
"m",
"in",
"req",
".",
"messages",
"]",
")",
"if",
"codec",
"==",
"CODEC_NONE",
":",
"return",
"msglist",
"elif",
"codec",
"==",
"CODEC_GZIP",
":",
"return",
"[",
"create_gzip_message",
"(",
"msglist",
")",
"]",
"elif",
"codec",
"==",
"CODEC_SNAPPY",
":",
"return",
"[",
"create_snappy_message",
"(",
"msglist",
")",
"]",
"else",
":",
"raise",
"UnsupportedCodecError",
"(",
"\"Codec 0x%02x unsupported\"",
"%",
"codec",
")"
] | Create a message set from a list of requests.
Each request can have a list of messages and its own key. If codec is
:data:`CODEC_NONE`, return a list of raw Kafka messages. Otherwise, return
a list containing a single codec-encoded message.
:param codec:
The encoding for the message set, one of the constants:
- `afkak.CODEC_NONE`
- `afkak.CODEC_GZIP`
- `afkak.CODEC_SNAPPY`
:raises: :exc:`UnsupportedCodecError` for an unsupported codec | [
"Create",
"a",
"message",
"set",
"from",
"a",
"list",
"of",
"requests",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L624-L652 | train | Create a message set from a list of requests. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,o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aY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(0b1111 + 0o140) + chr(55) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x36' + chr(0b110011), 30394 - 30386), nzTpIcepk0o8(chr(0b110000) + chr(0b1100101 + 0o12) + '\x33' + chr(49) + chr(589 - 540), 16034 - 16026), nzTpIcepk0o8('\060' + chr(0b111000 + 0o67) + chr(50) + chr(828 - 780) + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + '\x34' + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001 + 0o0) + chr(120 - 67), 0b1000), nzTpIcepk0o8(chr(1084 - 1036) + chr(0b1101111) + chr(1212 - 1159), ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + '\x35' + chr(2226 - 2178), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1813 - 1764) + '\x31' + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + chr(1142 - 1031) + '\062' + chr(51) + chr(0b10101 + 0o33), 21479 - 21471), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(0b110000) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + chr(1985 - 1934) + chr(0b110111) + '\x34', 0o10), nzTpIcepk0o8(chr(329 - 281) + chr(0b110110 + 0o71) + chr(0b110010) + chr(0b110111) + chr(2072 - 2021), 0b1000), nzTpIcepk0o8('\060' + chr(0b1111 + 0o140) + chr(0b110001 + 0o0) + chr(0b10001 + 0o41) + chr(0b110011), 25307 - 25299), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(51) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(636 - 588) + '\x6f' + '\x37' + chr(0b10 + 0o63), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(1197 - 1147) + '\x32' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1101111) + chr(51) + chr(713 - 662) + '\064', 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + '\x32' + chr(0b10101 + 0o41) + '\062', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(592 - 541) + chr(0b110110) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + chr(0b110111) + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(7820 - 7709) + chr(0b110011) + chr(0b100101 + 0o22) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1101 + 0o46) + chr(53) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + chr(0b111011 + 0o64) + chr(0b101011 + 0o6) + '\064' + chr(51), 0o10), nzTpIcepk0o8(chr(1522 - 1474) + chr(111) + chr(0b110011) + chr(49) + '\x34', 0o10), nzTpIcepk0o8(chr(1519 - 1471) + chr(1379 - 1268) + '\062' + chr(53) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(1097 - 1049) + chr(6893 - 6782) + chr(159 - 108) + chr(0b11 + 0o57) + '\066', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(469 - 418) + chr(48) + chr(0b1100 + 0o45), 59768 - 59760), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(142 - 87) + '\062', 8), nzTpIcepk0o8(chr(162 - 114) + chr(8082 - 7971) + '\x32' + '\061' + '\x30', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(2527 - 2472) + chr(2002 - 1954), 0o10), nzTpIcepk0o8(chr(2133 - 2085) + chr(0b1101111) + chr(0b110001) + '\061' + '\x35', 0o10), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(111) + '\x33' + chr(50) + '\065', 0b1000), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b111100 + 0o63) + '\x31' + chr(52) + chr(2093 - 2039), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(48) + '\x34', 54998 - 54990), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + chr(960 - 910) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1000100 + 0o53) + chr(0b100100 + 0o22) + chr(0b110100), 63097 - 63089), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\x6f' + chr(0b110001) + chr(747 - 698) + '\066', 8), nzTpIcepk0o8(chr(617 - 569) + '\x6f' + '\x33' + '\064', 0o10), nzTpIcepk0o8(chr(372 - 324) + chr(4908 - 4797) + '\062' + '\064', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(2196 - 2085) + chr(53) + chr(0b110000), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x15'), '\x64' + '\145' + chr(0b101110 + 0o65) + '\157' + chr(0b101101 + 0o67) + '\145')('\165' + '\164' + chr(0b1100110) + chr(0b100101 + 0o10) + chr(505 - 449)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def IX_KETJ2pDr5(dDl_g5qi6_rH, Grn6gfDLE5LL=YoXi1D1XVICk):
MUX5_a0peUYM = []
for EycgE8NTwf_z in dDl_g5qi6_rH:
roI3spqORKae(MUX5_a0peUYM, roI3spqORKae(ES5oEprVxulp(b'ol\xfa\xcb\xcdiI\x7f\x11\xda\xa5\x8d'), chr(0b1100100) + chr(101) + '\x63' + chr(111) + chr(0b10101 + 0o117) + chr(7593 - 7492))('\x75' + chr(0b1110100) + chr(7754 - 7652) + chr(45) + chr(0b10011 + 0o45)))([aqAlqARLLt_z(tF75nqoNENFL, key=roI3spqORKae(EycgE8NTwf_z, roI3spqORKae(ES5oEprVxulp(b'jj\xa6\xe2\xc1~A\\!\xdf\xb6\xcb'), chr(100) + '\x65' + '\143' + chr(5455 - 5344) + chr(0b1100100) + chr(0b1011110 + 0o7))(chr(7527 - 7410) + chr(3237 - 3121) + '\x66' + '\055' + chr(56)))) for tF75nqoNENFL in roI3spqORKae(EycgE8NTwf_z, roI3spqORKae(ES5oEprVxulp(b'HI\xa2\xb2\xe5{cR\x08\xaa\x97\xa8'), chr(3971 - 3871) + '\x65' + chr(5295 - 5196) + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(9811 - 9694) + chr(0b1100101 + 0o17) + chr(102) + '\x2d' + chr(3021 - 2965)))])
if Grn6gfDLE5LL == YoXi1D1XVICk:
return MUX5_a0peUYM
elif Grn6gfDLE5LL == szim5IMSV11o:
return [JToURe_lmAza(MUX5_a0peUYM)]
elif Grn6gfDLE5LL == UIDQd0_Dmi5n:
return [wuLrx52hUUSy(MUX5_a0peUYM)]
else:
raise uZCPhrGUwScI(roI3spqORKae(ES5oEprVxulp(b'x\\\xad\xe3\xc1-5Pk\xa8\xf5\x84\x9b&2N\xe5\xac\xc2\x9b\x8b\x8e\x88\x07'), chr(0b10001 + 0o123) + chr(0b110101 + 0o60) + '\143' + chr(11786 - 11675) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1001110 + 0o30) + chr(0b1101 + 0o40) + chr(0b10110 + 0o42)) % Grn6gfDLE5LL) |
ciena/afkak | afkak/kafkacodec.py | KafkaCodec._encode_message_header | def _encode_message_header(cls, client_id, correlation_id, request_key,
api_version=0):
"""
Encode the common request envelope
"""
return (struct.pack('>hhih',
request_key, # ApiKey
api_version, # ApiVersion
correlation_id, # CorrelationId
len(client_id)) + # ClientId size
client_id) | python | def _encode_message_header(cls, client_id, correlation_id, request_key,
api_version=0):
"""
Encode the common request envelope
"""
return (struct.pack('>hhih',
request_key, # ApiKey
api_version, # ApiVersion
correlation_id, # CorrelationId
len(client_id)) + # ClientId size
client_id) | [
"def",
"_encode_message_header",
"(",
"cls",
",",
"client_id",
",",
"correlation_id",
",",
"request_key",
",",
"api_version",
"=",
"0",
")",
":",
"return",
"(",
"struct",
".",
"pack",
"(",
"'>hhih'",
",",
"request_key",
",",
"# ApiKey",
"api_version",
",",
"# ApiVersion",
"correlation_id",
",",
"# CorrelationId",
"len",
"(",
"client_id",
")",
")",
"+",
"# ClientId size",
"client_id",
")"
] | Encode the common request envelope | [
"Encode",
"the",
"common",
"request",
"envelope"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L61-L71 | train | Encode the message header. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJ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P,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(2154 - 2106) + chr(0b1010111 + 0o30) + chr(0b110001) + '\x30' + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(50) + chr(0b100111 + 0o15), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(0b111 + 0o53) + chr(50), 34282 - 34274), nzTpIcepk0o8('\x30' + chr(111) + chr(172 - 123) + '\x35' + chr(0b11100 + 0o25), ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(111) + chr(0b101011 + 0o6) + chr(0b110101) + '\x36', 52785 - 52777), nzTpIcepk0o8(chr(2184 - 2136) + chr(1405 - 1294) + chr(0b110010) + chr(0b110011) + chr(0b1110 + 0o42), 42642 - 42634), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(0b101010 + 0o10), 0o10), nzTpIcepk0o8(chr(1989 - 1941) + chr(0b10011 + 0o134) + '\062' + '\x34' + '\x31', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1000000 + 0o57) + chr(0b101001 + 0o11) + chr(0b110011) + '\x31', 23034 - 23026), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2484 - 2433) + '\067', 8), nzTpIcepk0o8(chr(0b100 + 0o54) + '\x6f' + chr(2470 - 2416) + chr(0b11 + 0o55), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\066' + chr(1268 - 1220), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101000 + 0o12) + '\060', 0b1000), nzTpIcepk0o8(chr(614 - 566) + '\x6f' + '\x33' + chr(0b100101 + 0o17) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + chr(11741 - 11630) + chr(0b110010) + chr(0b1011 + 0o45), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + '\x37' + chr(1980 - 1930), 0b1000), nzTpIcepk0o8(chr(2220 - 2172) + chr(111) + '\061' + chr(0b110010) + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + '\061' + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(564 - 514) + '\066' + chr(0b110101), 3715 - 3707), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + '\060' + chr(515 - 460), ord("\x08")), nzTpIcepk0o8(chr(1114 - 1066) + chr(111) + chr(137 - 86) + '\x31' + '\063', 0o10), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(55), 8), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + '\x33' + chr(2305 - 2251), 56027 - 56019), nzTpIcepk0o8('\060' + '\x6f' + chr(1234 - 1184) + chr(574 - 526) + chr(1839 - 1785), 0o10), nzTpIcepk0o8('\060' + chr(843 - 732) + chr(2348 - 2299) + '\x30' + chr(0b10000 + 0o41), ord("\x08")), nzTpIcepk0o8(chr(2173 - 2125) + chr(0b1101111) + '\063' + chr(0b110011) + chr(1371 - 1320), 8015 - 8007), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1101111) + chr(49) + chr(0b110010) + chr(0b110110), 16759 - 16751), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(1290 - 1240) + chr(0b1101 + 0o52), 0o10), nzTpIcepk0o8(chr(210 - 162) + chr(111) + chr(0b10100 + 0o43) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + chr(9784 - 9673) + '\061' + chr(0b110110) + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(2148 - 2098) + chr(2361 - 2306), 39411 - 39403), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + chr(1863 - 1814) + '\x34' + '\062', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b1101 + 0o46) + chr(711 - 660) + '\x36', 52737 - 52729), nzTpIcepk0o8('\060' + '\x6f' + chr(474 - 422) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1842 - 1792) + chr(51) + chr(2228 - 2179), 8), nzTpIcepk0o8(chr(1323 - 1275) + chr(0b1101111) + '\x31' + chr(0b110101) + chr(0b1100 + 0o47), ord("\x08")), nzTpIcepk0o8(chr(1339 - 1291) + chr(0b1001100 + 0o43) + '\x31' + '\x30' + chr(51), 8), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\157' + chr(49) + '\064' + '\x30', 34944 - 34936), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(4031 - 3920) + chr(1267 - 1218) + '\062' + chr(49), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(7100 - 6989) + chr(53) + chr(2128 - 2080), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'm'), chr(0b1010000 + 0o24) + chr(2818 - 2717) + '\143' + '\x6f' + chr(0b101111 + 0o65) + chr(0b1100101))('\x75' + '\x74' + '\x66' + chr(45) + chr(0b101001 + 0o17)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def uUhuWRiYeNRA(_1vzISbJ_R2i, r_cosW25WDG1, tL7r6ZE6GOf3, C_VKi_AP9ER7, vNlf20HCYoYz=nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(111) + '\x30', 41250 - 41242)):
return roI3spqORKae(Mf7j_LCOrq1d, roI3spqORKae(ES5oEprVxulp(b'351\x02'), '\x64' + chr(0b1100101) + '\143' + chr(0b101010 + 0o105) + chr(0b0 + 0o144) + '\145')(chr(117) + chr(683 - 567) + '\146' + chr(0b101101) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'}<:\x00\x06'), '\144' + chr(0b1010001 + 0o24) + '\143' + chr(111) + chr(4241 - 4141) + chr(0b101011 + 0o72))(chr(9837 - 9720) + '\x74' + '\146' + '\055' + chr(0b10111 + 0o41)), C_VKi_AP9ER7, vNlf20HCYoYz, tL7r6ZE6GOf3, ftfygxgFas5X(r_cosW25WDG1)) + r_cosW25WDG1 |
ciena/afkak | afkak/kafkacodec.py | KafkaCodec._encode_message_set | def _encode_message_set(cls, messages, offset=None):
"""
Encode a MessageSet. Unlike other arrays in the protocol,
MessageSets are not length-prefixed. Format::
MessageSet => [Offset MessageSize Message]
Offset => int64
MessageSize => int32
"""
message_set = []
incr = 1
if offset is None:
incr = 0
offset = 0
for message in messages:
encoded_message = KafkaCodec._encode_message(message)
message_set.append(struct.pack('>qi', offset, len(encoded_message)))
message_set.append(encoded_message)
offset += incr
return b''.join(message_set) | python | def _encode_message_set(cls, messages, offset=None):
"""
Encode a MessageSet. Unlike other arrays in the protocol,
MessageSets are not length-prefixed. Format::
MessageSet => [Offset MessageSize Message]
Offset => int64
MessageSize => int32
"""
message_set = []
incr = 1
if offset is None:
incr = 0
offset = 0
for message in messages:
encoded_message = KafkaCodec._encode_message(message)
message_set.append(struct.pack('>qi', offset, len(encoded_message)))
message_set.append(encoded_message)
offset += incr
return b''.join(message_set) | [
"def",
"_encode_message_set",
"(",
"cls",
",",
"messages",
",",
"offset",
"=",
"None",
")",
":",
"message_set",
"=",
"[",
"]",
"incr",
"=",
"1",
"if",
"offset",
"is",
"None",
":",
"incr",
"=",
"0",
"offset",
"=",
"0",
"for",
"message",
"in",
"messages",
":",
"encoded_message",
"=",
"KafkaCodec",
".",
"_encode_message",
"(",
"message",
")",
"message_set",
".",
"append",
"(",
"struct",
".",
"pack",
"(",
"'>qi'",
",",
"offset",
",",
"len",
"(",
"encoded_message",
")",
")",
")",
"message_set",
".",
"append",
"(",
"encoded_message",
")",
"offset",
"+=",
"incr",
"return",
"b''",
".",
"join",
"(",
"message_set",
")"
] | Encode a MessageSet. Unlike other arrays in the protocol,
MessageSets are not length-prefixed. Format::
MessageSet => [Offset MessageSize Message]
Offset => int64
MessageSize => int32 | [
"Encode",
"a",
"MessageSet",
".",
"Unlike",
"other",
"arrays",
"in",
"the",
"protocol",
"MessageSets",
"are",
"not",
"length",
"-",
"prefixed",
".",
"Format",
"::"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L74-L93 | train | Encode a list of messages into a message set. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPT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fygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(683 - 635) + chr(0b1101111) + chr(0b101000 + 0o15) + chr(0b11100 + 0o27), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(927 - 879) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(558 - 508) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11000 + 0o35) + '\063', 8), nzTpIcepk0o8(chr(48) + chr(1133 - 1022) + chr(0b110011) + '\062' + '\060', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b11101 + 0o27) + chr(2331 - 2280), 61810 - 61802), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(291 - 180) + '\x31' + '\067' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b10001 + 0o136) + chr(0b110001) + chr(2418 - 2366) + '\062', 0b1000), nzTpIcepk0o8(chr(1435 - 1387) + chr(111) + chr(0b110011) + chr(0b110011) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b110111 + 0o70) + '\061' + chr(0b100011 + 0o17) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(1353 - 1303) + chr(0b11100 + 0o31), 54272 - 54264), nzTpIcepk0o8(chr(1223 - 1175) + chr(0b1101111) + chr(0b101010 + 0o11) + chr(513 - 464) + chr(0b100011 + 0o21), 18537 - 18529), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(2589 - 2536) + '\061', 0b1000), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(111) + '\x33' + chr(51), 19253 - 19245), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + '\x32', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100011 + 0o17) + '\x35' + chr(53), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b11010 + 0o27) + '\x32' + chr(0b110100), 56467 - 56459), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(1999 - 1945) + '\065', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001 + 0o5) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + '\x6f' + '\x33' + chr(2592 - 2540) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1605 - 1556) + chr(0b110111) + chr(2436 - 2383), 16692 - 16684), nzTpIcepk0o8(chr(0b110000) + chr(0b10111 + 0o130) + chr(0b110011) + '\x37', 46177 - 46169), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + '\063' + chr(1051 - 1000) + chr(0b110100), 8), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(111) + '\x31' + '\x37' + chr(55), 0b1000), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\157' + '\x32' + chr(0b101100 + 0o10) + '\064', 0b1000), nzTpIcepk0o8(chr(198 - 150) + chr(0b1101111) + chr(0b1111 + 0o43) + '\061' + chr(0b11101 + 0o30), 0o10), nzTpIcepk0o8('\060' + chr(10121 - 10010) + '\063' + chr(55) + chr(0b110111), 0b1000), nzTpIcepk0o8('\060' + chr(7370 - 7259) + '\x32' + chr(0b11110 + 0o23) + '\x32', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + '\x32' + '\060', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + chr(0b110011) + chr(2341 - 2286), 0b1000), nzTpIcepk0o8('\060' + chr(929 - 818) + chr(51) + '\x35' + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101110 + 0o1) + chr(0b100100 + 0o15) + chr(0b110000) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000110 + 0o51) + chr(0b110010) + chr(0b110101) + chr(0b101100 + 0o7), 0b1000), nzTpIcepk0o8(chr(822 - 774) + chr(0b111 + 0o150) + chr(1229 - 1178) + '\066' + chr(0b10 + 0o63), 8), nzTpIcepk0o8(chr(0b10111 + 0o31) + '\157' + chr(995 - 944) + chr(1530 - 1482) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(5853 - 5742) + chr(51) + '\062' + '\067', ord("\x08")), nzTpIcepk0o8(chr(125 - 77) + '\157' + chr(52) + chr(0b10100 + 0o36), 0b1000), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + '\x31' + chr(0b110100) + '\066', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(52) + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + chr(1131 - 1020) + '\061' + '\063' + '\063', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x35' + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x05'), chr(0b0 + 0o144) + chr(0b1001100 + 0o31) + chr(0b1100011) + chr(0b111011 + 0o64) + '\x64' + chr(0b1100101))('\165' + chr(3082 - 2966) + chr(102) + '\x2d' + chr(0b1101 + 0o53)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def kJzMDe4_P_ZT(_1vzISbJ_R2i, szk4GvfzF2PT, GuX46MBAOnaQ=None):
tBffXgvk8Qi_ = []
ARzh7EajokKk = nzTpIcepk0o8('\x30' + chr(111) + '\061', 0b1000)
if GuX46MBAOnaQ is None:
ARzh7EajokKk = nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1367 - 1319), 21100 - 21092)
GuX46MBAOnaQ = nzTpIcepk0o8('\060' + chr(0b1010000 + 0o37) + '\060', 8)
for FksNMH1w_ns6 in szk4GvfzF2PT:
NaUrNyqXS4Of = xbGTsX4crO7w._encode_message(FksNMH1w_ns6)
roI3spqORKae(tBffXgvk8Qi_, roI3spqORKae(ES5oEprVxulp(b'c\xd3\xc3\x1f\xa8D>\r\xb6<\x80\xf9'), chr(0b1100100) + chr(2917 - 2816) + '\x63' + chr(111) + '\x64' + '\x65')('\165' + chr(116) + chr(0b1100110) + chr(0b101101) + chr(0b111000)))(roI3spqORKae(Mf7j_LCOrq1d, roI3spqORKae(ES5oEprVxulp(b'[\xe6\xf3@'), '\144' + '\x65' + chr(99) + '\157' + chr(0b1011 + 0o131) + '\145')('\x75' + chr(116) + '\146' + chr(0b101101) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\x15\xf6\xf9'), '\144' + '\145' + chr(6421 - 6322) + '\x6f' + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(6949 - 6833) + chr(102) + chr(45) + chr(56)), GuX46MBAOnaQ, ftfygxgFas5X(NaUrNyqXS4Of)))
roI3spqORKae(tBffXgvk8Qi_, roI3spqORKae(ES5oEprVxulp(b'c\xd3\xc3\x1f\xa8D>\r\xb6<\x80\xf9'), chr(0b1100100) + chr(0b1100101) + chr(3201 - 3102) + chr(3263 - 3152) + '\144' + chr(101))('\165' + '\164' + chr(0b1100 + 0o132) + chr(45) + chr(0b1001 + 0o57)))(NaUrNyqXS4Of)
GuX46MBAOnaQ += ARzh7EajokKk
return roI3spqORKae(ES5oEprVxulp(b''), roI3spqORKae(ES5oEprVxulp(b'r\xb3\xe9f\xe9a\x1a\x04\x88\x10\x9b\xbd'), '\x64' + chr(0b100010 + 0o103) + chr(0b10 + 0o141) + chr(10888 - 10777) + chr(0b1100100) + chr(9477 - 9376))(chr(0b1110101) + chr(0b1010001 + 0o43) + '\x66' + '\x2d' + chr(0b111000)))(tBffXgvk8Qi_) |
ciena/afkak | afkak/kafkacodec.py | KafkaCodec._encode_message | def _encode_message(cls, message):
"""
Encode a single message.
The magic number of a message is a format version number. The only
supported magic number right now is zero. Format::
Message => Crc MagicByte Attributes Key Value
Crc => int32
MagicByte => int8
Attributes => int8
Key => bytes
Value => bytes
"""
if message.magic == 0:
msg = struct.pack('>BB', message.magic, message.attributes)
msg += write_int_string(message.key)
msg += write_int_string(message.value)
crc = zlib.crc32(msg) & 0xffffffff # Ensure unsigned
msg = struct.pack('>I', crc) + msg
else:
raise ProtocolError("Unexpected magic number: %d" % message.magic)
return msg | python | def _encode_message(cls, message):
"""
Encode a single message.
The magic number of a message is a format version number. The only
supported magic number right now is zero. Format::
Message => Crc MagicByte Attributes Key Value
Crc => int32
MagicByte => int8
Attributes => int8
Key => bytes
Value => bytes
"""
if message.magic == 0:
msg = struct.pack('>BB', message.magic, message.attributes)
msg += write_int_string(message.key)
msg += write_int_string(message.value)
crc = zlib.crc32(msg) & 0xffffffff # Ensure unsigned
msg = struct.pack('>I', crc) + msg
else:
raise ProtocolError("Unexpected magic number: %d" % message.magic)
return msg | [
"def",
"_encode_message",
"(",
"cls",
",",
"message",
")",
":",
"if",
"message",
".",
"magic",
"==",
"0",
":",
"msg",
"=",
"struct",
".",
"pack",
"(",
"'>BB'",
",",
"message",
".",
"magic",
",",
"message",
".",
"attributes",
")",
"msg",
"+=",
"write_int_string",
"(",
"message",
".",
"key",
")",
"msg",
"+=",
"write_int_string",
"(",
"message",
".",
"value",
")",
"crc",
"=",
"zlib",
".",
"crc32",
"(",
"msg",
")",
"&",
"0xffffffff",
"# Ensure unsigned",
"msg",
"=",
"struct",
".",
"pack",
"(",
"'>I'",
",",
"crc",
")",
"+",
"msg",
"else",
":",
"raise",
"ProtocolError",
"(",
"\"Unexpected magic number: %d\"",
"%",
"message",
".",
"magic",
")",
"return",
"msg"
] | Encode a single message.
The magic number of a message is a format version number. The only
supported magic number right now is zero. Format::
Message => Crc MagicByte Attributes Key Value
Crc => int32
MagicByte => int8
Attributes => int8
Key => bytes
Value => bytes | [
"Encode",
"a",
"single",
"message",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L96-L118 | train | Encode a single message. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN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URpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b11110 + 0o23) + chr(53) + chr(0b110100), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2316 - 2266) + chr(0b110110) + chr(896 - 841), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(562 - 513) + chr(50) + '\060', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + '\064' + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x32' + '\067' + chr(0b10000 + 0o47), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(6713 - 6602) + chr(50) + '\065' + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(0b110100) + chr(0b101101 + 0o10), 18726 - 18718), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1000000 + 0o57) + '\x33' + '\064' + chr(2572 - 2518), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + '\x31' + '\x36', 0b1000), nzTpIcepk0o8(chr(1787 - 1739) + chr(0b1101111) + '\x33' + '\063' + '\x33', 32109 - 32101), nzTpIcepk0o8('\060' + chr(2406 - 2295) + chr(0b110011) + chr(0b110010) + chr(0b101101 + 0o6), 0o10), nzTpIcepk0o8(chr(1029 - 981) + '\x6f' + '\061' + chr(0b1010 + 0o46) + chr(50), 0o10), nzTpIcepk0o8('\060' + chr(1503 - 1392) + '\063' + chr(1486 - 1431) + '\x34', 0o10), nzTpIcepk0o8(chr(1071 - 1023) + '\x6f' + chr(51) + chr(0b101100 + 0o13) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1 + 0o66) + chr(0b110010), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(7804 - 7693) + chr(50) + chr(0b110111) + chr(0b100010 + 0o25), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + '\157' + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(6301 - 6190) + '\x33' + chr(0b110001) + '\x37', 0o10), nzTpIcepk0o8('\x30' + chr(9316 - 9205) + chr(0b110111) + '\062', 8), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + '\061' + chr(2075 - 2020), 8), nzTpIcepk0o8(chr(48) + chr(4549 - 4438) + '\062' + '\061' + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1001011 + 0o44) + chr(407 - 358) + chr(0b110011) + '\064', 0b1000), nzTpIcepk0o8('\060' + chr(0b1100101 + 0o12) + '\x33' + chr(1348 - 1293) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(658 - 606) + chr(0b101101 + 0o3), 0o10), nzTpIcepk0o8(chr(1982 - 1934) + '\157' + chr(1754 - 1704) + chr(0b11010 + 0o27) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(959 - 911) + '\x6f' + '\061' + chr(52) + '\067', 0o10), nzTpIcepk0o8('\060' + chr(10068 - 9957) + '\063' + chr(0b101110 + 0o6) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101011 + 0o10) + '\x35' + '\x33', 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + chr(50) + '\x35' + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + chr(1584 - 1473) + chr(2447 - 2396) + chr(51) + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + chr(1127 - 1016) + chr(0b110000 + 0o3) + '\066' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + chr(52) + '\062', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(55) + chr(52), 22149 - 22141), nzTpIcepk0o8(chr(919 - 871) + chr(7335 - 7224) + chr(0b110011) + chr(51) + chr(774 - 724), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(51) + chr(51), 0o10), nzTpIcepk0o8('\x30' + chr(1367 - 1256) + '\065', 0o10), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(111) + chr(0b1110 + 0o45) + chr(1626 - 1578) + '\x31', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\065' + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'B'), chr(0b1100100) + chr(0b1100101) + chr(0b1010101 + 0o16) + chr(4875 - 4764) + chr(0b11000 + 0o114) + '\145')(chr(0b11100 + 0o131) + '\164' + chr(0b1001110 + 0o30) + chr(0b10011 + 0o32) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def BPpRAxaDTTAe(_1vzISbJ_R2i, FksNMH1w_ns6):
if roI3spqORKae(FksNMH1w_ns6, roI3spqORKae(ES5oEprVxulp(b'*\xe1d\xd4\xdd\xc1\x90\xa9\xfe\xb0\xb4\x15'), chr(0b1100100) + '\x65' + '\x63' + '\157' + '\144' + '\145')(chr(0b100110 + 0o117) + chr(0b100101 + 0o117) + '\x66' + '\055' + '\x38')) == nzTpIcepk0o8('\x30' + '\157' + '\x30', ord("\x08")):
sldzbHve8G1S = Mf7j_LCOrq1d.pack(roI3spqORKae(ES5oEprVxulp(b'R\xf5\x12'), chr(100) + chr(6003 - 5902) + chr(99) + '\157' + chr(0b11101 + 0o107) + chr(0b110001 + 0o64))(chr(3954 - 3837) + '\x74' + chr(0b1100110) + '\x2d' + chr(56)), FksNMH1w_ns6.FV45bnuO0kgW, FksNMH1w_ns6.L1bW0NdD70xD)
sldzbHve8G1S += oIAySep07olv(FksNMH1w_ns6.QYodcsDtoGq7)
sldzbHve8G1S += oIAySep07olv(FksNMH1w_ns6.uV9iBiw0y_Mp)
QGZztGgi8MjA = uh0lZwgdsVwB.crc32(sldzbHve8G1S) & nzTpIcepk0o8('\x30' + chr(0b101100 + 0o103) + chr(0b110011) + '\x37' + chr(0b110111) + '\x37' + '\067' + chr(0b110000 + 0o7) + chr(0b100 + 0o63) + '\067' + chr(0b11011 + 0o34) + chr(0b110001 + 0o6) + chr(0b11001 + 0o36), ord("\x08"))
sldzbHve8G1S = Mf7j_LCOrq1d.pack(roI3spqORKae(ES5oEprVxulp(b'R\xfe'), chr(0b1100100) + chr(101) + chr(99) + '\x6f' + '\x64' + chr(0b1010011 + 0o22))(chr(4054 - 3937) + chr(116) + '\x66' + chr(0b101101) + chr(1836 - 1780)), QGZztGgi8MjA) + sldzbHve8G1S
else:
raise OykxYFV6_PUg(roI3spqORKae(ES5oEprVxulp(b'9\xd95\x99\xcf\xca\x86\x92\xab\xbf\xf3/\x9d\x9eS}\x9fhr\xa2X\xaa\xfcf\xdb\xc5\xef'), chr(3877 - 3777) + '\x65' + '\143' + chr(0b10111 + 0o130) + chr(0b1100100) + '\x65')(chr(117) + '\x74' + '\x66' + chr(0b101101) + chr(0b1 + 0o67)) % roI3spqORKae(FksNMH1w_ns6, roI3spqORKae(ES5oEprVxulp(b'*\xe1d\xd4\xdd\xc1\x90\xa9\xfe\xb0\xb4\x15'), chr(0b1100100) + '\145' + chr(99) + chr(111) + chr(7984 - 7884) + chr(0b1100101))('\165' + chr(116) + chr(102) + '\x2d' + chr(0b111000))))
return sldzbHve8G1S |
ciena/afkak | afkak/kafkacodec.py | KafkaCodec.encode_produce_request | def encode_produce_request(cls, client_id, correlation_id,
payloads=None, acks=1,
timeout=DEFAULT_REPLICAS_ACK_TIMEOUT_MSECS):
"""
Encode some ProduceRequest structs
:param bytes client_id:
:param int correlation_id:
:param list payloads: list of ProduceRequest
:param int acks:
How "acky" you want the request to be:
0: immediate response
1: written to disk by the leader
2+: waits for this many number of replicas to sync
-1: waits for all replicas to be in sync
:param int timeout:
Maximum time the server will wait for acks from replicas. This is
_not_ a socket timeout.
"""
if not isinstance(client_id, bytes):
raise TypeError('client_id={!r} should be bytes'.format(client_id))
payloads = [] if payloads is None else payloads
grouped_payloads = group_by_topic_and_partition(payloads)
message = cls._encode_message_header(client_id, correlation_id,
KafkaCodec.PRODUCE_KEY)
message += struct.pack('>hii', acks, timeout, len(grouped_payloads))
for topic, topic_payloads in grouped_payloads.items():
message += write_short_ascii(topic)
message += struct.pack('>i', len(topic_payloads))
for partition, payload in topic_payloads.items():
msg_set = KafkaCodec._encode_message_set(payload.messages)
message += struct.pack('>ii', partition, len(msg_set))
message += msg_set
return message | python | def encode_produce_request(cls, client_id, correlation_id,
payloads=None, acks=1,
timeout=DEFAULT_REPLICAS_ACK_TIMEOUT_MSECS):
"""
Encode some ProduceRequest structs
:param bytes client_id:
:param int correlation_id:
:param list payloads: list of ProduceRequest
:param int acks:
How "acky" you want the request to be:
0: immediate response
1: written to disk by the leader
2+: waits for this many number of replicas to sync
-1: waits for all replicas to be in sync
:param int timeout:
Maximum time the server will wait for acks from replicas. This is
_not_ a socket timeout.
"""
if not isinstance(client_id, bytes):
raise TypeError('client_id={!r} should be bytes'.format(client_id))
payloads = [] if payloads is None else payloads
grouped_payloads = group_by_topic_and_partition(payloads)
message = cls._encode_message_header(client_id, correlation_id,
KafkaCodec.PRODUCE_KEY)
message += struct.pack('>hii', acks, timeout, len(grouped_payloads))
for topic, topic_payloads in grouped_payloads.items():
message += write_short_ascii(topic)
message += struct.pack('>i', len(topic_payloads))
for partition, payload in topic_payloads.items():
msg_set = KafkaCodec._encode_message_set(payload.messages)
message += struct.pack('>ii', partition, len(msg_set))
message += msg_set
return message | [
"def",
"encode_produce_request",
"(",
"cls",
",",
"client_id",
",",
"correlation_id",
",",
"payloads",
"=",
"None",
",",
"acks",
"=",
"1",
",",
"timeout",
"=",
"DEFAULT_REPLICAS_ACK_TIMEOUT_MSECS",
")",
":",
"if",
"not",
"isinstance",
"(",
"client_id",
",",
"bytes",
")",
":",
"raise",
"TypeError",
"(",
"'client_id={!r} should be bytes'",
".",
"format",
"(",
"client_id",
")",
")",
"payloads",
"=",
"[",
"]",
"if",
"payloads",
"is",
"None",
"else",
"payloads",
"grouped_payloads",
"=",
"group_by_topic_and_partition",
"(",
"payloads",
")",
"message",
"=",
"cls",
".",
"_encode_message_header",
"(",
"client_id",
",",
"correlation_id",
",",
"KafkaCodec",
".",
"PRODUCE_KEY",
")",
"message",
"+=",
"struct",
".",
"pack",
"(",
"'>hii'",
",",
"acks",
",",
"timeout",
",",
"len",
"(",
"grouped_payloads",
")",
")",
"for",
"topic",
",",
"topic_payloads",
"in",
"grouped_payloads",
".",
"items",
"(",
")",
":",
"message",
"+=",
"write_short_ascii",
"(",
"topic",
")",
"message",
"+=",
"struct",
".",
"pack",
"(",
"'>i'",
",",
"len",
"(",
"topic_payloads",
")",
")",
"for",
"partition",
",",
"payload",
"in",
"topic_payloads",
".",
"items",
"(",
")",
":",
"msg_set",
"=",
"KafkaCodec",
".",
"_encode_message_set",
"(",
"payload",
".",
"messages",
")",
"message",
"+=",
"struct",
".",
"pack",
"(",
"'>ii'",
",",
"partition",
",",
"len",
"(",
"msg_set",
")",
")",
"message",
"+=",
"msg_set",
"return",
"message"
] | Encode some ProduceRequest structs
:param bytes client_id:
:param int correlation_id:
:param list payloads: list of ProduceRequest
:param int acks:
How "acky" you want the request to be:
0: immediate response
1: written to disk by the leader
2+: waits for this many number of replicas to sync
-1: waits for all replicas to be in sync
:param int timeout:
Maximum time the server will wait for acks from replicas. This is
_not_ a socket timeout. | [
"Encode",
"some",
"ProduceRequest",
"structs"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L206-L247 | train | Encode ProduceRequest struct. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIu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SAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111 + 0o0) + chr(0b10001 + 0o41) + '\x36' + '\062', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(2369 - 2320) + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(0b110111) + chr(0b101 + 0o53), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b101 + 0o56) + chr(50), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(2133 - 2084) + '\062' + '\060', 0o10), nzTpIcepk0o8('\060' + chr(4593 - 4482) + '\062' + chr(53) + chr(51), 59778 - 59770), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + '\067' + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + '\064' + '\066', 0o10), nzTpIcepk0o8('\x30' + chr(11975 - 11864) + chr(2019 - 1968) + chr(570 - 518) + chr(90 - 35), 60224 - 60216), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(111) + chr(51) + chr(0b110101) + '\064', 10877 - 10869), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + chr(0b110011) + chr(0b110001) + chr(1828 - 1775), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100001 + 0o22) + '\x35' + chr(50), 0o10), nzTpIcepk0o8(chr(48) + chr(5998 - 5887) + chr(0b110011) + '\060' + chr(0b101110 + 0o5), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + '\064', 42459 - 42451), nzTpIcepk0o8(chr(320 - 272) + chr(6665 - 6554) + chr(406 - 355) + '\060' + chr(0b110000 + 0o4), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b100100 + 0o113) + chr(401 - 351) + chr(0b100000 + 0o21) + chr(0b11110 + 0o27), 42042 - 42034), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b11011 + 0o124) + '\x32' + chr(0b110010) + chr(0b110110), 31339 - 31331), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + '\x33' + '\x35' + chr(0b10100 + 0o43), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(49) + '\060' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(869 - 758) + '\x32' + chr(52) + chr(0b110101), 9270 - 9262), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(111) + chr(50) + '\064' + '\063', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100011 + 0o17) + chr(1125 - 1075) + '\066', 8), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1000000 + 0o57) + chr(54) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(0b110101) + chr(2382 - 2331), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(417 - 366) + chr(2052 - 1997) + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + '\x30' + chr(0b110110 + 0o1), 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(3889 - 3778) + chr(1773 - 1720) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(440 - 392) + chr(0b100111 + 0o110) + chr(1286 - 1237) + chr(200 - 148) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(1000 - 952) + chr(111) + chr(1504 - 1454) + '\x30' + chr(0b10101 + 0o34), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(0b110100) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101010 + 0o11) + '\067', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + '\060' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(916 - 868) + chr(111) + chr(55) + chr(1928 - 1876), 22278 - 22270), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + chr(0b110111) + chr(0b110010 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110100) + chr(0b110100), 16280 - 16272), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(1563 - 1515) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(0b10011 + 0o134) + chr(51) + chr(303 - 253), 8), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(48) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(704 - 656) + chr(0b11101 + 0o122) + '\x33' + chr(0b1 + 0o62), 48858 - 48850), nzTpIcepk0o8(chr(2087 - 2039) + chr(0b100010 + 0o115) + '\x32' + '\067' + chr(215 - 164), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(482 - 434) + chr(6347 - 6236) + '\065' + chr(448 - 400), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9c'), '\144' + chr(0b1100010 + 0o3) + '\143' + chr(111) + '\x64' + '\x65')('\165' + chr(13448 - 13332) + chr(0b110011 + 0o63) + chr(0b10010 + 0o33) + chr(0b10110 + 0o42)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def cmJPD_jLQZbG(_1vzISbJ_R2i, r_cosW25WDG1, tL7r6ZE6GOf3, hu1hynoeGawF=None, DrTNwh41cU_e=nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1010 + 0o145) + '\x31', 0b1000), ACACUUFQsMpr=wkpv_lnnZ0Nt):
if not suIjIS24Zkqw(r_cosW25WDG1, QNQS9e6tJqMV):
raise jZIjKu8IFANs(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xd1\xe3\xd1\x7f>\xdf\xe2\x8f\x83\xd1\xb6\xcb\xb1a\xe4\xfe\xfe\x804\xc9\xc7\xb6V\xce\xd9\xa5Q\x10\xe4\x10'), chr(100) + chr(0b1001000 + 0o35) + chr(99) + '\x6f' + chr(1617 - 1517) + chr(9814 - 9713))('\165' + '\x74' + chr(102) + chr(222 - 177) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xc3\xbc\x8bQ\x17\x98\xdb\x89\xb6\xb3\x8e\xa0'), chr(0b1001000 + 0o34) + '\x65' + chr(99) + chr(111) + '\x64' + chr(0b1100101))('\x75' + chr(0b101100 + 0o110) + chr(6872 - 6770) + '\055' + '\070'))(r_cosW25WDG1))
hu1hynoeGawF = [] if hu1hynoeGawF is None else hu1hynoeGawF
vOazzWCPnVGH = N25JPF58qdq7(hu1hynoeGawF)
FksNMH1w_ns6 = _1vzISbJ_R2i._encode_message_header(r_cosW25WDG1, tL7r6ZE6GOf3, xbGTsX4crO7w.PRODUCE_KEY)
FksNMH1w_ns6 += Mf7j_LCOrq1d.pack(roI3spqORKae(ES5oEprVxulp(b'\x8c\xe7\xd1s'), chr(0b111101 + 0o47) + '\145' + chr(0b1100011) + chr(111) + chr(100) + chr(0b1000001 + 0o44))('\165' + chr(0b110111 + 0o75) + chr(698 - 596) + chr(0b10010 + 0o33) + chr(0b111000)), DrTNwh41cU_e, ACACUUFQsMpr, ftfygxgFas5X(vOazzWCPnVGH))
for (eddDFOEFy2dH, _GjdKAULSeXZ) in roI3spqORKae(vOazzWCPnVGH, roI3spqORKae(ES5oEprVxulp(b'\xeb\xd0\xd6T\x15\xd1\xf5\xd2\xd4\x9a\x95\x83'), chr(100) + chr(190 - 89) + chr(99) + '\x6f' + chr(0b1100100) + chr(101))(chr(117) + chr(0b1100000 + 0o24) + chr(9824 - 9722) + '\055' + chr(0b111000)))():
FksNMH1w_ns6 += j_Fubkt6y7zt(eddDFOEFy2dH)
FksNMH1w_ns6 += Mf7j_LCOrq1d.pack(roI3spqORKae(ES5oEprVxulp(b'\x8c\xe6'), chr(524 - 424) + chr(101) + '\x63' + chr(111) + chr(9227 - 9127) + chr(0b1100101))(chr(5923 - 5806) + chr(0b1110100) + chr(1041 - 939) + '\055' + chr(1375 - 1319)), ftfygxgFas5X(_GjdKAULSeXZ))
for (y6tm5LzgZc_E, pkzlytqkFfcV) in roI3spqORKae(_GjdKAULSeXZ, roI3spqORKae(ES5oEprVxulp(b'\xeb\xd0\xd6T\x15\xd1\xf5\xd2\xd4\x9a\x95\x83'), '\144' + '\145' + chr(0b100000 + 0o103) + chr(0b1101111) + chr(100) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(535 - 433) + '\055' + '\x38'))():
lwSNbevjkINN = xbGTsX4crO7w._encode_message_set(pkzlytqkFfcV.szk4GvfzF2PT)
FksNMH1w_ns6 += Mf7j_LCOrq1d.pack(roI3spqORKae(ES5oEprVxulp(b'\x8c\xe6\xd1'), '\x64' + chr(0b1100101) + chr(5853 - 5754) + chr(111) + chr(302 - 202) + '\x65')(chr(0b1110101) + '\x74' + chr(102) + '\055' + '\x38'), y6tm5LzgZc_E, ftfygxgFas5X(lwSNbevjkINN))
FksNMH1w_ns6 += lwSNbevjkINN
return FksNMH1w_ns6 |
ciena/afkak | afkak/kafkacodec.py | KafkaCodec.decode_produce_response | def decode_produce_response(cls, data):
"""
Decode bytes to a ProduceResponse
:param bytes data: bytes to decode
:returns: iterable of `afkak.common.ProduceResponse`
"""
((correlation_id, num_topics), cur) = relative_unpack('>ii', data, 0)
for _i in range(num_topics):
topic, cur = read_short_ascii(data, cur)
((num_partitions,), cur) = relative_unpack('>i', data, cur)
for _i in range(num_partitions):
((partition, error, offset), cur) = relative_unpack('>ihq', data, cur)
yield ProduceResponse(topic, partition, error, offset) | python | def decode_produce_response(cls, data):
"""
Decode bytes to a ProduceResponse
:param bytes data: bytes to decode
:returns: iterable of `afkak.common.ProduceResponse`
"""
((correlation_id, num_topics), cur) = relative_unpack('>ii', data, 0)
for _i in range(num_topics):
topic, cur = read_short_ascii(data, cur)
((num_partitions,), cur) = relative_unpack('>i', data, cur)
for _i in range(num_partitions):
((partition, error, offset), cur) = relative_unpack('>ihq', data, cur)
yield ProduceResponse(topic, partition, error, offset) | [
"def",
"decode_produce_response",
"(",
"cls",
",",
"data",
")",
":",
"(",
"(",
"correlation_id",
",",
"num_topics",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>ii'",
",",
"data",
",",
"0",
")",
"for",
"_i",
"in",
"range",
"(",
"num_topics",
")",
":",
"topic",
",",
"cur",
"=",
"read_short_ascii",
"(",
"data",
",",
"cur",
")",
"(",
"(",
"num_partitions",
",",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>i'",
",",
"data",
",",
"cur",
")",
"for",
"_i",
"in",
"range",
"(",
"num_partitions",
")",
":",
"(",
"(",
"partition",
",",
"error",
",",
"offset",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>ihq'",
",",
"data",
",",
"cur",
")",
"yield",
"ProduceResponse",
"(",
"topic",
",",
"partition",
",",
"error",
",",
"offset",
")"
] | Decode bytes to a ProduceResponse
:param bytes data: bytes to decode
:returns: iterable of `afkak.common.ProduceResponse` | [
"Decode",
"bytes",
"to",
"a",
"ProduceResponse"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L250-L265 | train | Decodes the bytes to a ProduceResponse object. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF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YozM,MdkNqd1bagO6,QNQS9e6tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + '\x35' + chr(0b100011 + 0o17), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\065' + '\062', 8), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(6722 - 6611) + chr(0b110010) + chr(49) + '\x37', 48339 - 48331), nzTpIcepk0o8(chr(49 - 1) + '\x6f' + chr(0b101101 + 0o5) + chr(52) + chr(903 - 851), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + '\065' + chr(1110 - 1059), 0b1000), nzTpIcepk0o8('\060' + chr(5286 - 5175) + chr(184 - 135) + chr(0b110000) + '\066', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100001 + 0o22) + chr(0b110110) + chr(0b101110 + 0o2), 0b1000), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(111) + '\062' + chr(0b110100) + chr(2074 - 2020), 45483 - 45475), nzTpIcepk0o8(chr(87 - 39) + '\157' + chr(0b10010 + 0o40) + chr(52) + '\064', 8), nzTpIcepk0o8(chr(48) + chr(11700 - 11589) + chr(53) + chr(0b10100 + 0o43), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101111 + 0o4) + '\060' + chr(0b10111 + 0o35), 30500 - 30492), nzTpIcepk0o8('\x30' + chr(6429 - 6318) + chr(1899 - 1850) + '\061' + '\061', 0o10), nzTpIcepk0o8(chr(1027 - 979) + chr(0b11111 + 0o120) + chr(0b110001) + chr(0b110011) + '\x35', 18122 - 18114), nzTpIcepk0o8(chr(48) + chr(11795 - 11684) + chr(0b11110 + 0o31) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(4839 - 4728) + chr(782 - 731) + chr(96 - 47) + chr(50), 0o10), nzTpIcepk0o8(chr(1045 - 997) + chr(0b1101011 + 0o4) + chr(0b10000 + 0o42) + '\063' + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(90 - 40) + chr(0b110001) + '\x36', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101000 + 0o7) + chr(0b110010) + '\x32' + chr(1169 - 1116), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110111) + chr(0b110001), 21499 - 21491), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + '\x37' + chr(971 - 919), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + '\060' + chr(0b1111 + 0o44), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + '\x32' + chr(0b110100), 0b1000), nzTpIcepk0o8('\060' + chr(3740 - 3629) + chr(0b110010) + chr(2707 - 2652) + chr(0b1101 + 0o43), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011), 3280 - 3272), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(5711 - 5600) + '\061' + chr(1224 - 1170) + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10100 + 0o36) + '\060' + chr(0b110101), 52269 - 52261), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(0b110100) + chr(0b1110 + 0o42), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(2265 - 2215) + chr(474 - 421) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(2251 - 2202) + chr(48) + chr(1656 - 1602), 8), nzTpIcepk0o8(chr(1285 - 1237) + chr(0b1101111) + chr(2348 - 2298) + '\065' + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(113 - 64) + chr(52) + '\x30', 8), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + '\061' + '\x33', 8549 - 8541), nzTpIcepk0o8('\060' + chr(0b110111 + 0o70) + chr(2316 - 2267) + chr(55) + '\x32', 36739 - 36731), nzTpIcepk0o8('\060' + '\157' + chr(53) + chr(1512 - 1462), 8), nzTpIcepk0o8('\060' + chr(0b1011000 + 0o27) + chr(1925 - 1875) + '\065' + chr(0b110110 + 0o0), 8), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b1101111) + chr(49) + chr(0b11010 + 0o34) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(51) + '\x36' + chr(0b1110 + 0o51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(50) + '\x33', 0o10), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + chr(493 - 444) + '\067' + '\x34', 0b1000), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1111 + 0o140) + chr(0b110 + 0o54) + '\062' + chr(0b110010 + 0o5), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(111) + chr(53) + chr(0b10000 + 0o40), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x04'), chr(0b1000010 + 0o42) + '\x65' + '\143' + '\x6f' + chr(100) + chr(0b111 + 0o136))('\165' + chr(0b1110100) + chr(5422 - 5320) + chr(45) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def Mqnp_zfmlnp7(_1vzISbJ_R2i, FfKOThdpoDTb):
((tL7r6ZE6GOf3, Rk0MoZgJ_DYl), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\x14C\xe6'), '\144' + '\145' + '\x63' + '\157' + chr(262 - 162) + chr(0b1100101))(chr(12802 - 12685) + chr(116) + '\x66' + chr(0b100100 + 0o11) + '\x38'), FfKOThdpoDTb, nzTpIcepk0o8(chr(0b110000) + chr(8870 - 8759) + chr(0b101001 + 0o7), 0b1000))
for olsbu0l6pJGv in bbT2xIe5pzk7(Rk0MoZgJ_DYl):
(eddDFOEFy2dH, _1pmtMrnaouX) = wDnuLXiThcki(FfKOThdpoDTb, _1pmtMrnaouX)
((L8rCCx0X1Ub3,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\x14C'), chr(0b1100100) + chr(0b1100000 + 0o5) + chr(0b1100011) + '\x6f' + '\x64' + '\145')(chr(117) + chr(13194 - 13078) + '\146' + chr(0b101101) + '\070'), FfKOThdpoDTb, _1pmtMrnaouX)
for olsbu0l6pJGv in bbT2xIe5pzk7(L8rCCx0X1Ub3):
((y6tm5LzgZc_E, qi1wipPVvEKd, GuX46MBAOnaQ), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\x14C\xe7\xd5'), chr(100) + '\145' + '\x63' + '\157' + chr(0b1100010 + 0o2) + chr(0b111110 + 0o47))('\x75' + '\x74' + chr(0b1110 + 0o130) + chr(0b101101) + chr(56)), FfKOThdpoDTb, _1pmtMrnaouX)
yield QW9xo3_S5jT6(eddDFOEFy2dH, y6tm5LzgZc_E, qi1wipPVvEKd, GuX46MBAOnaQ) |
ciena/afkak | afkak/kafkacodec.py | KafkaCodec.encode_fetch_request | def encode_fetch_request(cls, client_id, correlation_id, payloads=None,
max_wait_time=100, min_bytes=4096):
"""
Encodes some FetchRequest structs
:param bytes client_id:
:param int correlation_id:
:param list payloads: list of :class:`FetchRequest`
:param int max_wait_time: how long to block waiting on min_bytes of data
:param int min_bytes:
the minimum number of bytes to accumulate before returning the
response
"""
payloads = [] if payloads is None else payloads
grouped_payloads = group_by_topic_and_partition(payloads)
message = cls._encode_message_header(client_id, correlation_id,
KafkaCodec.FETCH_KEY)
assert isinstance(max_wait_time, int)
# -1 is the replica id
message += struct.pack('>iiii', -1, max_wait_time, min_bytes,
len(grouped_payloads))
for topic, topic_payloads in grouped_payloads.items():
message += write_short_ascii(topic)
message += struct.pack('>i', len(topic_payloads))
for partition, payload in topic_payloads.items():
message += struct.pack('>iqi', partition, payload.offset,
payload.max_bytes)
return message | python | def encode_fetch_request(cls, client_id, correlation_id, payloads=None,
max_wait_time=100, min_bytes=4096):
"""
Encodes some FetchRequest structs
:param bytes client_id:
:param int correlation_id:
:param list payloads: list of :class:`FetchRequest`
:param int max_wait_time: how long to block waiting on min_bytes of data
:param int min_bytes:
the minimum number of bytes to accumulate before returning the
response
"""
payloads = [] if payloads is None else payloads
grouped_payloads = group_by_topic_and_partition(payloads)
message = cls._encode_message_header(client_id, correlation_id,
KafkaCodec.FETCH_KEY)
assert isinstance(max_wait_time, int)
# -1 is the replica id
message += struct.pack('>iiii', -1, max_wait_time, min_bytes,
len(grouped_payloads))
for topic, topic_payloads in grouped_payloads.items():
message += write_short_ascii(topic)
message += struct.pack('>i', len(topic_payloads))
for partition, payload in topic_payloads.items():
message += struct.pack('>iqi', partition, payload.offset,
payload.max_bytes)
return message | [
"def",
"encode_fetch_request",
"(",
"cls",
",",
"client_id",
",",
"correlation_id",
",",
"payloads",
"=",
"None",
",",
"max_wait_time",
"=",
"100",
",",
"min_bytes",
"=",
"4096",
")",
":",
"payloads",
"=",
"[",
"]",
"if",
"payloads",
"is",
"None",
"else",
"payloads",
"grouped_payloads",
"=",
"group_by_topic_and_partition",
"(",
"payloads",
")",
"message",
"=",
"cls",
".",
"_encode_message_header",
"(",
"client_id",
",",
"correlation_id",
",",
"KafkaCodec",
".",
"FETCH_KEY",
")",
"assert",
"isinstance",
"(",
"max_wait_time",
",",
"int",
")",
"# -1 is the replica id",
"message",
"+=",
"struct",
".",
"pack",
"(",
"'>iiii'",
",",
"-",
"1",
",",
"max_wait_time",
",",
"min_bytes",
",",
"len",
"(",
"grouped_payloads",
")",
")",
"for",
"topic",
",",
"topic_payloads",
"in",
"grouped_payloads",
".",
"items",
"(",
")",
":",
"message",
"+=",
"write_short_ascii",
"(",
"topic",
")",
"message",
"+=",
"struct",
".",
"pack",
"(",
"'>i'",
",",
"len",
"(",
"topic_payloads",
")",
")",
"for",
"partition",
",",
"payload",
"in",
"topic_payloads",
".",
"items",
"(",
")",
":",
"message",
"+=",
"struct",
".",
"pack",
"(",
"'>iqi'",
",",
"partition",
",",
"payload",
".",
"offset",
",",
"payload",
".",
"max_bytes",
")",
"return",
"message"
] | Encodes some FetchRequest structs
:param bytes client_id:
:param int correlation_id:
:param list payloads: list of :class:`FetchRequest`
:param int max_wait_time: how long to block waiting on min_bytes of data
:param int min_bytes:
the minimum number of bytes to accumulate before returning the
response | [
"Encodes",
"some",
"FetchRequest",
"structs"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L268-L300 | train | Encodes some FetchRequest structs into a byte string. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmqoBrC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N5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1410 - 1362) + chr(1634 - 1523) + '\061' + '\x31' + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1100 + 0o45) + '\060', 28891 - 28883), nzTpIcepk0o8(chr(1842 - 1794) + '\157' + chr(50) + chr(0b1001 + 0o52) + '\066', 15933 - 15925), nzTpIcepk0o8(chr(895 - 847) + chr(0b1100011 + 0o14) + '\062', 37827 - 37819), nzTpIcepk0o8(chr(48) + '\157' + chr(1051 - 1002) + chr(0b110000) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\157' + '\061' + '\061' + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(0b100101 + 0o16) + chr(0b1001 + 0o51), 57189 - 57181), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + '\x37' + chr(654 - 599), 39662 - 39654), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(2857 - 2746) + '\061' + '\067' + chr(55), 63539 - 63531), nzTpIcepk0o8('\x30' + '\157' + '\061' + '\063' + chr(52), 0o10), nzTpIcepk0o8(chr(358 - 310) + chr(0b1101011 + 0o4) + '\061' + chr(0b110111) + '\060', 0b1000), nzTpIcepk0o8('\x30' + chr(0b101110 + 0o101) + '\x31' + chr(0b100 + 0o54) + '\066', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(55) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\x6f' + '\x33' + chr(0b1011 + 0o47) + chr(48), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x32' + chr(0b110111) + chr(0b100101 + 0o14), ord("\x08")), nzTpIcepk0o8(chr(306 - 258) + chr(0b1101111) + '\063' + '\x33' + '\061', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(2995 - 2940) + '\x35', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10000 + 0o43) + '\061' + chr(114 - 60), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\x37' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1100011 + 0o14) + '\x32' + '\062' + chr(54), 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(7640 - 7529) + chr(704 - 655) + chr(0b110001 + 0o5) + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + chr(11637 - 11526) + '\061' + chr(0b110100) + '\x30', 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(0b101 + 0o60) + chr(0b110 + 0o52), ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1101111) + chr(0b100100 + 0o16) + chr(2128 - 2078) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + '\061' + '\065' + chr(0b1111 + 0o41), 8), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + '\062' + '\065' + chr(0b110010), 62451 - 62443), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\157' + chr(0b1101 + 0o47) + '\x34', 54811 - 54803), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110100) + chr(0b110100), 8), nzTpIcepk0o8(chr(48) + chr(0b1011001 + 0o26) + '\061' + chr(2058 - 2007) + chr(2151 - 2099), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(315 - 264) + chr(0b1111 + 0o45) + chr(0b110101), 61865 - 61857), nzTpIcepk0o8('\x30' + chr(111) + chr(1701 - 1651) + chr(1882 - 1834) + chr(0b10110 + 0o35), 45427 - 45419), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(429 - 378) + '\060' + chr(0b1111 + 0o42), 54324 - 54316), nzTpIcepk0o8(chr(881 - 833) + chr(0b1101111) + chr(614 - 559) + chr(0b0 + 0o65), 8), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1011101 + 0o22) + '\x33' + '\x31' + chr(0b10100 + 0o37), 6426 - 6418), nzTpIcepk0o8(chr(48) + chr(111) + chr(2452 - 2401) + '\063' + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + chr(1015 - 963), 14908 - 14900), nzTpIcepk0o8(chr(48) + chr(0b1001110 + 0o41) + chr(2568 - 2516) + '\x34', 8), nzTpIcepk0o8(chr(1969 - 1921) + '\157' + chr(1291 - 1241) + chr(0b110011) + chr(526 - 478), 0b1000), nzTpIcepk0o8('\060' + chr(0b1011 + 0o144) + chr(55) + '\064', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1011 + 0o144) + chr(58 - 5) + chr(48), 11348 - 11340)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'e'), chr(9667 - 9567) + chr(0b1100101) + chr(630 - 531) + chr(111) + chr(9414 - 9314) + '\x65')('\165' + chr(0b1110100) + chr(102) + chr(0b101101) + chr(668 - 612)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def dMobtwRE9Fb0(_1vzISbJ_R2i, r_cosW25WDG1, tL7r6ZE6GOf3, hu1hynoeGawF=None, DQ_HwlCYOJfB=nzTpIcepk0o8('\060' + chr(111) + chr(49) + '\x34' + chr(52), 0b1000), YBuHJAlFGwhJ=nzTpIcepk0o8('\060' + chr(2000 - 1889) + chr(0b11000 + 0o31) + chr(48) + chr(48) + chr(0b11000 + 0o30) + '\060', 54610 - 54602)):
hu1hynoeGawF = [] if hu1hynoeGawF is None else hu1hynoeGawF
vOazzWCPnVGH = N25JPF58qdq7(hu1hynoeGawF)
FksNMH1w_ns6 = _1vzISbJ_R2i._encode_message_header(r_cosW25WDG1, tL7r6ZE6GOf3, xbGTsX4crO7w.FETCH_KEY)
assert suIjIS24Zkqw(DQ_HwlCYOJfB, nzTpIcepk0o8)
FksNMH1w_ns6 += Mf7j_LCOrq1d.pack(roI3spqORKae(ES5oEprVxulp(b'ua\xf7k.'), chr(100) + chr(0b1010101 + 0o20) + chr(0b1100011) + chr(111) + chr(0b11100 + 0o110) + chr(6024 - 5923))('\x75' + chr(116) + chr(102) + chr(0b101101) + chr(56)), -nzTpIcepk0o8(chr(388 - 340) + chr(0b1101111) + chr(0b11010 + 0o27), 8), DQ_HwlCYOJfB, YBuHJAlFGwhJ, ftfygxgFas5X(vOazzWCPnVGH))
for (eddDFOEFy2dH, _GjdKAULSeXZ) in roI3spqORKae(vOazzWCPnVGH, roI3spqORKae(ES5oEprVxulp(b'\x12W\xf0L\x025\x12\x8bL* /'), '\144' + chr(0b11000 + 0o115) + '\x63' + '\157' + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b1110100) + '\146' + chr(45) + chr(0b111000)))():
FksNMH1w_ns6 += j_Fubkt6y7zt(eddDFOEFy2dH)
FksNMH1w_ns6 += Mf7j_LCOrq1d.pack(roI3spqORKae(ES5oEprVxulp(b'ua'), chr(100) + chr(101) + '\x63' + chr(1727 - 1616) + chr(0b11101 + 0o107) + chr(101))('\x75' + chr(13056 - 12940) + '\146' + chr(0b101101) + '\x38'), ftfygxgFas5X(_GjdKAULSeXZ))
for (y6tm5LzgZc_E, pkzlytqkFfcV) in roI3spqORKae(_GjdKAULSeXZ, roI3spqORKae(ES5oEprVxulp(b'\x12W\xf0L\x025\x12\x8bL* /'), '\144' + chr(0b1100101) + chr(0b110100 + 0o57) + chr(111) + chr(6723 - 6623) + chr(0b110 + 0o137))('\165' + '\x74' + chr(0b100 + 0o142) + chr(0b101101) + chr(0b110111 + 0o1)))():
FksNMH1w_ns6 += Mf7j_LCOrq1d.pack(roI3spqORKae(ES5oEprVxulp(b'ua\xefk'), chr(100) + chr(8102 - 8001) + chr(2931 - 2832) + chr(0b110011 + 0o74) + '\144' + '\145')(chr(0b1001000 + 0o55) + '\x74' + chr(0b1011111 + 0o7) + '\x2d' + '\x38'), y6tm5LzgZc_E, pkzlytqkFfcV.GuX46MBAOnaQ, pkzlytqkFfcV.max_bytes)
return FksNMH1w_ns6 |
ciena/afkak | afkak/kafkacodec.py | KafkaCodec.decode_fetch_response | def decode_fetch_response(cls, data):
"""
Decode bytes to a FetchResponse
:param bytes data: bytes to decode
"""
((correlation_id, num_topics), cur) = relative_unpack('>ii', data, 0)
for _i in range(num_topics):
(topic, cur) = read_short_ascii(data, cur)
((num_partitions,), cur) = relative_unpack('>i', data, cur)
for _i in range(num_partitions):
((partition, error, highwater_mark_offset), cur) = \
relative_unpack('>ihq', data, cur)
(message_set, cur) = read_int_string(data, cur)
yield FetchResponse(
topic, partition, error,
highwater_mark_offset,
KafkaCodec._decode_message_set_iter(message_set)) | python | def decode_fetch_response(cls, data):
"""
Decode bytes to a FetchResponse
:param bytes data: bytes to decode
"""
((correlation_id, num_topics), cur) = relative_unpack('>ii', data, 0)
for _i in range(num_topics):
(topic, cur) = read_short_ascii(data, cur)
((num_partitions,), cur) = relative_unpack('>i', data, cur)
for _i in range(num_partitions):
((partition, error, highwater_mark_offset), cur) = \
relative_unpack('>ihq', data, cur)
(message_set, cur) = read_int_string(data, cur)
yield FetchResponse(
topic, partition, error,
highwater_mark_offset,
KafkaCodec._decode_message_set_iter(message_set)) | [
"def",
"decode_fetch_response",
"(",
"cls",
",",
"data",
")",
":",
"(",
"(",
"correlation_id",
",",
"num_topics",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>ii'",
",",
"data",
",",
"0",
")",
"for",
"_i",
"in",
"range",
"(",
"num_topics",
")",
":",
"(",
"topic",
",",
"cur",
")",
"=",
"read_short_ascii",
"(",
"data",
",",
"cur",
")",
"(",
"(",
"num_partitions",
",",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>i'",
",",
"data",
",",
"cur",
")",
"for",
"_i",
"in",
"range",
"(",
"num_partitions",
")",
":",
"(",
"(",
"partition",
",",
"error",
",",
"highwater_mark_offset",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>ihq'",
",",
"data",
",",
"cur",
")",
"(",
"message_set",
",",
"cur",
")",
"=",
"read_int_string",
"(",
"data",
",",
"cur",
")",
"yield",
"FetchResponse",
"(",
"topic",
",",
"partition",
",",
"error",
",",
"highwater_mark_offset",
",",
"KafkaCodec",
".",
"_decode_message_set_iter",
"(",
"message_set",
")",
")"
] | Decode bytes to a FetchResponse
:param bytes data: bytes to decode | [
"Decode",
"bytes",
"to",
"a",
"FetchResponse"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L303-L324 | train | Decode bytes to a FetchResponse object. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DH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VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b10000 + 0o40) + '\157' + '\061' + '\x30' + chr(2648 - 2593), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + '\067' + chr(1581 - 1529), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101 + 0o142) + '\062' + chr(50) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(1043 - 995) + chr(4229 - 4118) + chr(50) + chr(0b110001) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b100011 + 0o114) + chr(0b1101 + 0o46) + '\060' + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011101 + 0o22) + chr(0b110011) + chr(0b110010 + 0o3) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(111) + '\062' + '\066' + '\062', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + '\066' + chr(0b110110), 59519 - 59511), nzTpIcepk0o8(chr(0b110000) + chr(0b1100011 + 0o14) + chr(0b10011 + 0o36) + chr(2367 - 2318) + chr(54), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(1651 - 1601) + chr(0b100001 + 0o25) + chr(0b110001), 3706 - 3698), nzTpIcepk0o8('\x30' + chr(11887 - 11776) + '\x32' + '\x37' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8336 - 8225) + chr(0b110001) + '\067' + chr(0b100 + 0o56), 55468 - 55460), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(11062 - 10951) + chr(855 - 806) + chr(0b110000) + chr(0b101000 + 0o10), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(0b100001 + 0o23) + chr(0b1110 + 0o44), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b101000 + 0o13) + chr(0b110111) + '\x31', 0b1000), nzTpIcepk0o8(chr(1494 - 1446) + '\x6f' + chr(0b110010) + chr(0b1001 + 0o56) + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33' + chr(85 - 35) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + chr(12200 - 12089) + '\063' + chr(420 - 371) + '\065', 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + chr(50) + '\061' + '\x37', 0b1000), nzTpIcepk0o8(chr(0b0 + 0o60) + '\x6f' + chr(51) + '\x31' + chr(1101 - 1048), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(1962 - 1911) + chr(0b110001 + 0o5) + chr(51), 0o10), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b111001 + 0o66) + chr(0b110 + 0o55) + chr(55) + '\061', 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b11111 + 0o23) + chr(0b100001 + 0o20) + chr(1281 - 1228), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(1283 - 1231) + chr(1518 - 1464), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100110 + 0o15) + '\x31' + chr(49), 13317 - 13309), nzTpIcepk0o8(chr(282 - 234) + '\x6f' + chr(0b100000 + 0o23) + '\x31' + chr(2286 - 2235), ord("\x08")), nzTpIcepk0o8(chr(472 - 424) + chr(0b1101111) + chr(1961 - 1911) + chr(876 - 827) + chr(0b110110), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1036 - 985) + '\067' + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1111 + 0o140) + chr(49) + '\x34' + chr(0b101111 + 0o1), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2035 - 1986) + chr(53) + chr(1716 - 1663), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(0b110000) + '\x33', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + '\066' + chr(0b110100), 0o10), nzTpIcepk0o8('\x30' + chr(190 - 79) + '\065' + chr(1642 - 1590), 38630 - 38622), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + chr(0b110001) + chr(0b110010) + chr(51), 62042 - 62034), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(10759 - 10648) + chr(491 - 441) + chr(0b101101 + 0o12) + chr(0b110100), 8), nzTpIcepk0o8(chr(0b10111 + 0o31) + '\x6f' + chr(1964 - 1915) + '\x32' + '\x31', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + '\x31', 57369 - 57361), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(864 - 816) + chr(0b110111), 8), nzTpIcepk0o8(chr(395 - 347) + chr(0b1101001 + 0o6) + chr(51) + chr(52) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + chr(55) + chr(0b110101), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\065' + chr(0b101001 + 0o7), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'i'), '\144' + chr(101) + '\143' + '\x6f' + '\144' + chr(0b1100101))(chr(0b10001 + 0o144) + chr(6134 - 6018) + chr(2979 - 2877) + chr(45) + chr(1001 - 945)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def EUOY40UZKU4_(_1vzISbJ_R2i, FfKOThdpoDTb):
((tL7r6ZE6GOf3, Rk0MoZgJ_DYl), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'y\x95\xfa'), chr(0b11101 + 0o107) + chr(0b101101 + 0o70) + chr(3284 - 3185) + chr(0b1011 + 0o144) + '\x64' + '\x65')(chr(0b1110101) + '\164' + chr(102) + chr(1008 - 963) + chr(56)), FfKOThdpoDTb, nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(48), 0b1000))
for olsbu0l6pJGv in bbT2xIe5pzk7(Rk0MoZgJ_DYl):
(eddDFOEFy2dH, _1pmtMrnaouX) = wDnuLXiThcki(FfKOThdpoDTb, _1pmtMrnaouX)
((L8rCCx0X1Ub3,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'y\x95'), chr(0b10011 + 0o121) + '\x65' + '\x63' + chr(111) + '\144' + '\145')(chr(6708 - 6591) + chr(0b1110100) + chr(7420 - 7318) + '\x2d' + chr(0b111000)), FfKOThdpoDTb, _1pmtMrnaouX)
for olsbu0l6pJGv in bbT2xIe5pzk7(L8rCCx0X1Ub3):
((y6tm5LzgZc_E, qi1wipPVvEKd, VfTn2NKwlSb7), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'y\x95\xfb\xff'), '\144' + chr(0b1100101) + chr(0b1100011) + '\157' + chr(100) + chr(0b1100101))('\165' + chr(116) + chr(6007 - 5905) + chr(45) + chr(0b111000)), FfKOThdpoDTb, _1pmtMrnaouX)
(tBffXgvk8Qi_, _1pmtMrnaouX) = ioywTrmWDEjH(FfKOThdpoDTb, _1pmtMrnaouX)
yield TtciVFGLTR9_(eddDFOEFy2dH, y6tm5LzgZc_E, qi1wipPVvEKd, VfTn2NKwlSb7, roI3spqORKae(xbGTsX4crO7w, roI3spqORKae(ES5oEprVxulp(b'\x18\x98\xf6\xed\xaa\x8d\xd7\xa9#\xd4\xcc\t!\xc5\x9c\xe3\xa2\xa8\xfb\x92\x9a\x8d\xe8T'), '\144' + chr(101) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(101))('\165' + chr(6601 - 6485) + '\146' + '\x2d' + chr(56)))(tBffXgvk8Qi_)) |
ciena/afkak | afkak/kafkacodec.py | KafkaCodec.decode_offset_response | def decode_offset_response(cls, data):
"""
Decode bytes to an :class:`OffsetResponse`
:param bytes data: bytes to decode
"""
((correlation_id, num_topics), cur) = relative_unpack('>ii', data, 0)
for _i in range(num_topics):
(topic, cur) = read_short_ascii(data, cur)
((num_partitions,), cur) = relative_unpack('>i', data, cur)
for _i in range(num_partitions):
((partition, error, num_offsets), cur) = \
relative_unpack('>ihi', data, cur)
offsets = []
for _i in range(num_offsets):
((offset,), cur) = relative_unpack('>q', data, cur)
offsets.append(offset)
yield OffsetResponse(topic, partition, error, tuple(offsets)) | python | def decode_offset_response(cls, data):
"""
Decode bytes to an :class:`OffsetResponse`
:param bytes data: bytes to decode
"""
((correlation_id, num_topics), cur) = relative_unpack('>ii', data, 0)
for _i in range(num_topics):
(topic, cur) = read_short_ascii(data, cur)
((num_partitions,), cur) = relative_unpack('>i', data, cur)
for _i in range(num_partitions):
((partition, error, num_offsets), cur) = \
relative_unpack('>ihi', data, cur)
offsets = []
for _i in range(num_offsets):
((offset,), cur) = relative_unpack('>q', data, cur)
offsets.append(offset)
yield OffsetResponse(topic, partition, error, tuple(offsets)) | [
"def",
"decode_offset_response",
"(",
"cls",
",",
"data",
")",
":",
"(",
"(",
"correlation_id",
",",
"num_topics",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>ii'",
",",
"data",
",",
"0",
")",
"for",
"_i",
"in",
"range",
"(",
"num_topics",
")",
":",
"(",
"topic",
",",
"cur",
")",
"=",
"read_short_ascii",
"(",
"data",
",",
"cur",
")",
"(",
"(",
"num_partitions",
",",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>i'",
",",
"data",
",",
"cur",
")",
"for",
"_i",
"in",
"range",
"(",
"num_partitions",
")",
":",
"(",
"(",
"partition",
",",
"error",
",",
"num_offsets",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>ihi'",
",",
"data",
",",
"cur",
")",
"offsets",
"=",
"[",
"]",
"for",
"_i",
"in",
"range",
"(",
"num_offsets",
")",
":",
"(",
"(",
"offset",
",",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>q'",
",",
"data",
",",
"cur",
")",
"offsets",
".",
"append",
"(",
"offset",
")",
"yield",
"OffsetResponse",
"(",
"topic",
",",
"partition",
",",
"error",
",",
"tuple",
"(",
"offsets",
")",
")"
] | Decode bytes to an :class:`OffsetResponse`
:param bytes data: bytes to decode | [
"Decode",
"bytes",
"to",
"an",
":",
"class",
":",
"OffsetResponse"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L348-L369 | train | Decodes a byte string to an iterable of OffsetResponse objects. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d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7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1593 - 1545) + '\157' + '\062' + '\x36' + chr(0b11010 + 0o26), ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + '\x31' + '\064' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(1152 - 1104) + chr(0b1101111) + '\x34' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(111) + chr(0b110010) + chr(1134 - 1079) + '\x31', 0b1000), nzTpIcepk0o8(chr(2114 - 2066) + '\157' + chr(0b1000 + 0o54) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(0b10010 + 0o43), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b1101 + 0o51) + chr(48), 0b1000), nzTpIcepk0o8(chr(1861 - 1813) + chr(0b1101111) + chr(0b100100 + 0o17) + '\063', 10523 - 10515), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(5433 - 5322) + '\x32' + chr(2305 - 2254) + chr(0b0 + 0o61), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(11709 - 11598) + '\061' + chr(94 - 44) + chr(0b110 + 0o57), 34340 - 34332), nzTpIcepk0o8(chr(795 - 747) + chr(0b1101111) + chr(2215 - 2166) + chr(53) + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + '\x36' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000101 + 0o52) + chr(1301 - 1249) + chr(0b101111 + 0o7), 0b1000), nzTpIcepk0o8(chr(48) + chr(7780 - 7669) + '\x33' + '\060' + '\061', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b111 + 0o54) + chr(275 - 222) + chr(52), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(2011 - 1963) + chr(51), 22653 - 22645), nzTpIcepk0o8('\060' + chr(2964 - 2853) + chr(1781 - 1732) + chr(0b110001) + chr(2051 - 2000), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1001 + 0o52) + '\067' + chr(0b1100 + 0o47), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(10310 - 10199) + chr(0b110010) + chr(1684 - 1635) + '\062', 51370 - 51362), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(111) + chr(0b10111 + 0o32) + chr(54) + '\x36', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(0b110100) + chr(50), 21182 - 21174), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(999 - 946) + '\063', 15685 - 15677), nzTpIcepk0o8('\x30' + chr(7671 - 7560) + chr(55) + chr(51), 34053 - 34045), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(1824 - 1773) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b1101111) + '\062' + '\x32' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b111 + 0o51) + '\x6f' + chr(760 - 710) + chr(2215 - 2166) + chr(51), ord("\x08")), nzTpIcepk0o8('\060' + chr(11585 - 11474) + '\061' + chr(54) + chr(0b100001 + 0o23), ord("\x08")), nzTpIcepk0o8('\x30' + chr(9475 - 9364) + chr(0b110011) + '\x30' + '\062', ord("\x08")), nzTpIcepk0o8(chr(1718 - 1670) + chr(0b111000 + 0o67) + '\x31' + '\x31' + chr(48), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(52) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\157' + chr(608 - 558) + chr(0b110111) + '\060', 0b1000), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(1732 - 1621) + chr(53) + '\062', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(323 - 273) + chr(0b11111 + 0o27) + chr(0b101001 + 0o16), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + '\061' + '\x31', 0b1000), nzTpIcepk0o8('\x30' + chr(11665 - 11554) + chr(0b110011) + chr(0b110010) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(54) + chr(0b11100 + 0o25), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b10010 + 0o135) + chr(0b110001) + chr(2594 - 2539) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(10485 - 10374) + chr(0b100000 + 0o25) + chr(507 - 454), 48508 - 48500), nzTpIcepk0o8(chr(1986 - 1938) + '\x6f' + chr(1018 - 966) + chr(1341 - 1288), 24560 - 24552), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + '\060' + chr(0b110000), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1000 + 0o147) + chr(0b110101) + chr(1046 - 998), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9e'), chr(0b1100100) + chr(101) + '\x63' + chr(0b111000 + 0o67) + chr(9543 - 9443) + '\x65')(chr(11197 - 11080) + '\x74' + '\x66' + chr(2002 - 1957) + chr(158 - 102)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def PC6czHMFTnG8(_1vzISbJ_R2i, FfKOThdpoDTb):
((tL7r6ZE6GOf3, Rk0MoZgJ_DYl), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\x8e\x0cN'), chr(0b1100100) + chr(6543 - 6442) + chr(0b11111 + 0o104) + '\157' + chr(0b1000011 + 0o41) + chr(0b10011 + 0o122))('\x75' + '\164' + chr(541 - 439) + '\055' + chr(2743 - 2687)), FfKOThdpoDTb, nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100 + 0o54), 64107 - 64099))
for olsbu0l6pJGv in bbT2xIe5pzk7(Rk0MoZgJ_DYl):
(eddDFOEFy2dH, _1pmtMrnaouX) = wDnuLXiThcki(FfKOThdpoDTb, _1pmtMrnaouX)
((L8rCCx0X1Ub3,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\x8e\x0c'), '\x64' + chr(101) + chr(0b111000 + 0o53) + chr(0b1100001 + 0o16) + chr(0b1101 + 0o127) + chr(101))('\165' + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(0b111000)), FfKOThdpoDTb, _1pmtMrnaouX)
for olsbu0l6pJGv in bbT2xIe5pzk7(L8rCCx0X1Ub3):
((y6tm5LzgZc_E, qi1wipPVvEKd, bnxDci8OLcfH), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\x8e\x0cO\xd0'), chr(0b1100100) + '\145' + chr(9689 - 9590) + chr(8920 - 8809) + chr(0b1001000 + 0o34) + chr(8855 - 8754))(chr(0b1101110 + 0o7) + '\x74' + chr(4628 - 4526) + chr(45) + chr(56)), FfKOThdpoDTb, _1pmtMrnaouX)
HQzjzS6A_S7y = []
for olsbu0l6pJGv in bbT2xIe5pzk7(bnxDci8OLcfH):
((GuX46MBAOnaQ,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\x8e\x14'), chr(0b1100011 + 0o1) + '\145' + chr(4538 - 4439) + '\x6f' + chr(100) + '\x65')('\x75' + chr(6827 - 6711) + chr(0b110001 + 0o65) + '\x2d' + '\x38'), FfKOThdpoDTb, _1pmtMrnaouX)
roI3spqORKae(HQzjzS6A_S7y, roI3spqORKae(ES5oEprVxulp(b'\xf81t\x8dZzwt\xf3:;\x80'), '\x64' + chr(101) + chr(0b1100011) + chr(0b110101 + 0o72) + chr(0b1100100) + '\145')(chr(0b101101 + 0o110) + chr(0b1100101 + 0o17) + '\146' + chr(0b10000 + 0o35) + '\070'))(GuX46MBAOnaQ)
yield asF_KOhxkjJr(eddDFOEFy2dH, y6tm5LzgZc_E, qi1wipPVvEKd, nfNqtJL5aRaY(HQzjzS6A_S7y)) |
ciena/afkak | afkak/kafkacodec.py | KafkaCodec.encode_metadata_request | def encode_metadata_request(cls, client_id, correlation_id, topics=None):
"""
Encode a MetadataRequest
:param bytes client_id: string
:param int correlation_id: int
:param list topics: list of text
"""
topics = [] if topics is None else topics
message = [
cls._encode_message_header(client_id, correlation_id,
KafkaCodec.METADATA_KEY),
struct.pack('>i', len(topics)),
]
for topic in topics:
message.append(write_short_ascii(topic))
return b''.join(message) | python | def encode_metadata_request(cls, client_id, correlation_id, topics=None):
"""
Encode a MetadataRequest
:param bytes client_id: string
:param int correlation_id: int
:param list topics: list of text
"""
topics = [] if topics is None else topics
message = [
cls._encode_message_header(client_id, correlation_id,
KafkaCodec.METADATA_KEY),
struct.pack('>i', len(topics)),
]
for topic in topics:
message.append(write_short_ascii(topic))
return b''.join(message) | [
"def",
"encode_metadata_request",
"(",
"cls",
",",
"client_id",
",",
"correlation_id",
",",
"topics",
"=",
"None",
")",
":",
"topics",
"=",
"[",
"]",
"if",
"topics",
"is",
"None",
"else",
"topics",
"message",
"=",
"[",
"cls",
".",
"_encode_message_header",
"(",
"client_id",
",",
"correlation_id",
",",
"KafkaCodec",
".",
"METADATA_KEY",
")",
",",
"struct",
".",
"pack",
"(",
"'>i'",
",",
"len",
"(",
"topics",
")",
")",
",",
"]",
"for",
"topic",
"in",
"topics",
":",
"message",
".",
"append",
"(",
"write_short_ascii",
"(",
"topic",
")",
")",
"return",
"b''",
".",
"join",
"(",
"message",
")"
] | Encode a MetadataRequest
:param bytes client_id: string
:param int correlation_id: int
:param list topics: list of text | [
"Encode",
"a",
"MetadataRequest"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L372-L388 | train | Encode a MetadataRequest object. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGf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jIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\157' + '\064' + '\061', 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101111) + chr(0b1 + 0o61) + chr(172 - 118) + chr(52), 10834 - 10826), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + '\063' + chr(1109 - 1054), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(1815 - 1760) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b110011 + 0o74) + '\x33' + chr(2328 - 2276) + '\x36', 51481 - 51473), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(55) + chr(270 - 218), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(48) + chr(0b11000 + 0o31), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(52) + chr(0b1010 + 0o54), 8), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + '\062' + chr(0b100011 + 0o24) + '\x32', 3299 - 3291), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(54) + chr(48), 44088 - 44080), nzTpIcepk0o8(chr(0b110000) + chr(9322 - 9211) + '\066' + chr(638 - 585), ord("\x08")), nzTpIcepk0o8(chr(1812 - 1764) + chr(3736 - 3625) + '\x33' + chr(0b110101) + chr(0b101000 + 0o14), ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + chr(49) + chr(1637 - 1584) + chr(806 - 751), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1011101 + 0o22) + chr(0b100000 + 0o21) + '\x34' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(1062 - 1012) + chr(0b110101) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(51) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(1766 - 1717) + '\067', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110111) + '\064', 14545 - 14537), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + '\061' + '\x35' + chr(0b110110), 48464 - 48456), nzTpIcepk0o8(chr(48) + chr(0b111101 + 0o62) + '\067' + chr(354 - 299), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(53) + chr(0b101101 + 0o11), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b111 + 0o150) + '\x31' + chr(54) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(1375 - 1327) + chr(0b1011000 + 0o27) + chr(0b110100) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\066' + '\x35', 8), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(111) + chr(51) + '\x33' + chr(1483 - 1435), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(51) + '\x33', 26349 - 26341), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(0b11101 + 0o30) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(0b10011 + 0o40) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b1100100 + 0o13) + chr(51) + chr(0b110001) + '\x35', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(0b110001) + chr(55), 30331 - 30323), nzTpIcepk0o8(chr(1498 - 1450) + chr(0b1101111) + '\061' + '\067' + '\062', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10 + 0o57) + chr(310 - 257) + chr(48), 0o10), nzTpIcepk0o8('\x30' + chr(0b1001111 + 0o40) + '\x32' + '\064' + '\064', 867 - 859), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b1101111) + '\061' + chr(55) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(860 - 812) + '\157' + chr(49) + chr(1037 - 988) + '\067', 8), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(111) + chr(0b110010) + chr(0b10011 + 0o42) + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110101) + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2391 - 2341) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10000 + 0o41) + chr(2785 - 2732) + chr(2264 - 2211), 0b1000), nzTpIcepk0o8(chr(48) + chr(10526 - 10415) + chr(51) + chr(0b110100) + chr(0b110001), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(2183 - 2135) + chr(0b1000011 + 0o54) + '\065' + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x0f'), chr(0b1100100) + chr(0b1100101) + chr(9033 - 8934) + chr(0b1101111) + '\x64' + '\x65')(chr(1503 - 1386) + chr(7531 - 7415) + '\x66' + chr(444 - 399) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def eOPm2KXDQ7q8(_1vzISbJ_R2i, r_cosW25WDG1, tL7r6ZE6GOf3, mk9HPFoKAKI2=None):
mk9HPFoKAKI2 = [] if mk9HPFoKAKI2 is None else mk9HPFoKAKI2
FksNMH1w_ns6 = [_1vzISbJ_R2i._encode_message_header(r_cosW25WDG1, tL7r6ZE6GOf3, xbGTsX4crO7w.METADATA_KEY), Mf7j_LCOrq1d.pack(roI3spqORKae(ES5oEprVxulp(b'\x1f\xdd'), chr(0b101101 + 0o67) + chr(9561 - 9460) + chr(511 - 412) + '\x6f' + chr(8136 - 8036) + '\145')(chr(0b1001010 + 0o53) + '\x74' + '\146' + '\055' + '\070'), ftfygxgFas5X(mk9HPFoKAKI2))]
for eddDFOEFy2dH in mk9HPFoKAKI2:
roI3spqORKae(FksNMH1w_ns6, roI3spqORKae(ES5oEprVxulp(b'i\xe0\x0c\x8a\x9e\x1b\x86\x89\xd0_`\xd9'), chr(3489 - 3389) + chr(5113 - 5012) + chr(0b1100011) + chr(8723 - 8612) + '\144' + chr(4559 - 4458))(chr(0b1100110 + 0o17) + chr(0b1110100) + chr(0b1100110) + chr(45) + '\070'))(j_Fubkt6y7zt(eddDFOEFy2dH))
return roI3spqORKae(ES5oEprVxulp(b''), roI3spqORKae(ES5oEprVxulp(b'x\x80&\xf3\xdf>\xa2\x80\xees{\x9d'), chr(100) + '\145' + chr(0b1100011) + '\157' + chr(0b10100 + 0o120) + chr(0b1101 + 0o130))(chr(0b1100011 + 0o22) + chr(0b1110100) + chr(5125 - 5023) + chr(0b100 + 0o51) + chr(1699 - 1643)))(FksNMH1w_ns6) |
ciena/afkak | afkak/kafkacodec.py | KafkaCodec.decode_metadata_response | def decode_metadata_response(cls, data):
"""
Decode bytes to a MetadataResponse
:param bytes data: bytes to decode
"""
((correlation_id, numbrokers), cur) = relative_unpack('>ii', data, 0)
# In testing, I saw this routine swap my machine to death when
# passed bad data. So, some checks are in order...
if numbrokers > MAX_BROKERS:
raise InvalidMessageError(
"Brokers:{} exceeds max:{}".format(numbrokers, MAX_BROKERS))
# Broker info
brokers = {}
for _i in range(numbrokers):
((nodeId, ), cur) = relative_unpack('>i', data, cur)
(host, cur) = read_short_ascii(data, cur)
((port,), cur) = relative_unpack('>i', data, cur)
brokers[nodeId] = BrokerMetadata(nodeId, nativeString(host), port)
# Topic info
((num_topics,), cur) = relative_unpack('>i', data, cur)
topic_metadata = {}
for _i in range(num_topics):
((topic_error,), cur) = relative_unpack('>h', data, cur)
(topic_name, cur) = read_short_ascii(data, cur)
((num_partitions,), cur) = relative_unpack('>i', data, cur)
partition_metadata = {}
for _j in range(num_partitions):
((partition_error_code, partition, leader, numReplicas),
cur) = relative_unpack('>hiii', data, cur)
(replicas, cur) = relative_unpack(
'>%di' % numReplicas, data, cur)
((num_isr,), cur) = relative_unpack('>i', data, cur)
(isr, cur) = relative_unpack('>%di' % num_isr, data, cur)
partition_metadata[partition] = \
PartitionMetadata(
topic_name, partition, partition_error_code, leader,
replicas, isr)
topic_metadata[topic_name] = TopicMetadata(
topic_name, topic_error, partition_metadata)
return brokers, topic_metadata | python | def decode_metadata_response(cls, data):
"""
Decode bytes to a MetadataResponse
:param bytes data: bytes to decode
"""
((correlation_id, numbrokers), cur) = relative_unpack('>ii', data, 0)
# In testing, I saw this routine swap my machine to death when
# passed bad data. So, some checks are in order...
if numbrokers > MAX_BROKERS:
raise InvalidMessageError(
"Brokers:{} exceeds max:{}".format(numbrokers, MAX_BROKERS))
# Broker info
brokers = {}
for _i in range(numbrokers):
((nodeId, ), cur) = relative_unpack('>i', data, cur)
(host, cur) = read_short_ascii(data, cur)
((port,), cur) = relative_unpack('>i', data, cur)
brokers[nodeId] = BrokerMetadata(nodeId, nativeString(host), port)
# Topic info
((num_topics,), cur) = relative_unpack('>i', data, cur)
topic_metadata = {}
for _i in range(num_topics):
((topic_error,), cur) = relative_unpack('>h', data, cur)
(topic_name, cur) = read_short_ascii(data, cur)
((num_partitions,), cur) = relative_unpack('>i', data, cur)
partition_metadata = {}
for _j in range(num_partitions):
((partition_error_code, partition, leader, numReplicas),
cur) = relative_unpack('>hiii', data, cur)
(replicas, cur) = relative_unpack(
'>%di' % numReplicas, data, cur)
((num_isr,), cur) = relative_unpack('>i', data, cur)
(isr, cur) = relative_unpack('>%di' % num_isr, data, cur)
partition_metadata[partition] = \
PartitionMetadata(
topic_name, partition, partition_error_code, leader,
replicas, isr)
topic_metadata[topic_name] = TopicMetadata(
topic_name, topic_error, partition_metadata)
return brokers, topic_metadata | [
"def",
"decode_metadata_response",
"(",
"cls",
",",
"data",
")",
":",
"(",
"(",
"correlation_id",
",",
"numbrokers",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>ii'",
",",
"data",
",",
"0",
")",
"# In testing, I saw this routine swap my machine to death when",
"# passed bad data. So, some checks are in order...",
"if",
"numbrokers",
">",
"MAX_BROKERS",
":",
"raise",
"InvalidMessageError",
"(",
"\"Brokers:{} exceeds max:{}\"",
".",
"format",
"(",
"numbrokers",
",",
"MAX_BROKERS",
")",
")",
"# Broker info",
"brokers",
"=",
"{",
"}",
"for",
"_i",
"in",
"range",
"(",
"numbrokers",
")",
":",
"(",
"(",
"nodeId",
",",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>i'",
",",
"data",
",",
"cur",
")",
"(",
"host",
",",
"cur",
")",
"=",
"read_short_ascii",
"(",
"data",
",",
"cur",
")",
"(",
"(",
"port",
",",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>i'",
",",
"data",
",",
"cur",
")",
"brokers",
"[",
"nodeId",
"]",
"=",
"BrokerMetadata",
"(",
"nodeId",
",",
"nativeString",
"(",
"host",
")",
",",
"port",
")",
"# Topic info",
"(",
"(",
"num_topics",
",",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>i'",
",",
"data",
",",
"cur",
")",
"topic_metadata",
"=",
"{",
"}",
"for",
"_i",
"in",
"range",
"(",
"num_topics",
")",
":",
"(",
"(",
"topic_error",
",",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>h'",
",",
"data",
",",
"cur",
")",
"(",
"topic_name",
",",
"cur",
")",
"=",
"read_short_ascii",
"(",
"data",
",",
"cur",
")",
"(",
"(",
"num_partitions",
",",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>i'",
",",
"data",
",",
"cur",
")",
"partition_metadata",
"=",
"{",
"}",
"for",
"_j",
"in",
"range",
"(",
"num_partitions",
")",
":",
"(",
"(",
"partition_error_code",
",",
"partition",
",",
"leader",
",",
"numReplicas",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>hiii'",
",",
"data",
",",
"cur",
")",
"(",
"replicas",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>%di'",
"%",
"numReplicas",
",",
"data",
",",
"cur",
")",
"(",
"(",
"num_isr",
",",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>i'",
",",
"data",
",",
"cur",
")",
"(",
"isr",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>%di'",
"%",
"num_isr",
",",
"data",
",",
"cur",
")",
"partition_metadata",
"[",
"partition",
"]",
"=",
"PartitionMetadata",
"(",
"topic_name",
",",
"partition",
",",
"partition_error_code",
",",
"leader",
",",
"replicas",
",",
"isr",
")",
"topic_metadata",
"[",
"topic_name",
"]",
"=",
"TopicMetadata",
"(",
"topic_name",
",",
"topic_error",
",",
"partition_metadata",
")",
"return",
"brokers",
",",
"topic_metadata"
] | Decode bytes to a MetadataResponse
:param bytes data: bytes to decode | [
"Decode",
"bytes",
"to",
"a",
"MetadataResponse"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L391-L441 | train | Decode the metadata response from the byte stream into a MetadataResponse object. | GiP5xwVCF98Z,B3LV8Eo811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ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(111) + chr(0b10001 + 0o42) + chr(52) + chr(776 - 727), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(5084 - 4973) + '\x33' + chr(55) + chr(2253 - 2202), 42345 - 42337), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + '\x31' + chr(1387 - 1333), 17672 - 17664), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + chr(0b110111) + '\x32', 0b1000), nzTpIcepk0o8(chr(828 - 780) + '\157' + chr(0b110011) + chr(0b100100 + 0o15) + '\x36', ord("\x08")), nzTpIcepk0o8('\060' + chr(2693 - 2582) + '\061' + '\062' + chr(2076 - 2028), 11548 - 11540), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + '\065' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(0b110001) + chr(0b101000 + 0o11), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10110 + 0o35) + '\x37' + chr(1221 - 1167), 42994 - 42986), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\064' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(7880 - 7769) + chr(0b11011 + 0o30) + chr(0b110000) + '\066', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110000 + 0o3) + chr(0b1 + 0o60) + '\x36', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + chr(53) + chr(94 - 40), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1799 - 1748) + chr(55) + '\065', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1001011 + 0o44) + '\065' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(2213 - 2165) + '\x6f' + chr(0b110010) + '\x32' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(1697 - 1649) + '\x6f' + '\x31' + chr(0b110000) + '\x33', 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(11488 - 11377) + chr(0b11010 + 0o30) + chr(0b110011 + 0o3), 0b1000), nzTpIcepk0o8(chr(827 - 779) + chr(0b1000100 + 0o53) + chr(0b110000 + 0o2) + chr(0b110111) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5966 - 5855) + chr(0b110001) + '\063' + chr(145 - 97), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b110001 + 0o76) + '\063' + chr(0b110100) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + '\x31' + chr(0b110101) + '\066', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1011111 + 0o20) + chr(1176 - 1127) + chr(141 - 90) + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + chr(7705 - 7594) + chr(0b100001 + 0o22) + '\x35' + '\x36', 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(1821 - 1772), 54307 - 54299), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(1632 - 1583) + '\062', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + '\x37' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + '\x31' + chr(53) + chr(2456 - 2406), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1010111 + 0o30) + '\x32' + chr(0b11111 + 0o24) + '\063', 0o10), nzTpIcepk0o8('\060' + chr(0b10011 + 0o134) + '\061' + '\x32' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b11000 + 0o32) + chr(0b100100 + 0o21) + chr(644 - 593), 0o10), nzTpIcepk0o8(chr(48) + chr(0b110111 + 0o70) + chr(0b11011 + 0o30) + chr(0b110101 + 0o0) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(497 - 447) + '\x34' + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1000011 + 0o54) + chr(0b100010 + 0o20) + chr(0b10000 + 0o41) + chr(52), 51713 - 51705), nzTpIcepk0o8('\060' + '\157' + '\x32' + '\060' + chr(0b11 + 0o63), 42806 - 42798), nzTpIcepk0o8(chr(48) + '\157' + chr(0b11 + 0o63) + '\062', 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + '\063' + chr(48) + chr(0b10011 + 0o35), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + chr(0b110101), 44653 - 44645), nzTpIcepk0o8(chr(1060 - 1012) + '\x6f' + '\x33' + chr(54) + chr(0b110000), 6640 - 6632), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + '\x36' + '\x36', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001 + 0o4) + chr(0b110000), 13728 - 13720)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xcf'), '\x64' + '\145' + chr(0b1100011) + '\157' + '\144' + chr(0b110110 + 0o57))('\x75' + '\x74' + chr(0b1011001 + 0o15) + chr(45) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def JA3koBOT41ZD(_1vzISbJ_R2i, FfKOThdpoDTb):
((tL7r6ZE6GOf3, nBQRhObOz1Lt), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\xdf\x92\xe7'), chr(1247 - 1147) + '\x65' + chr(0b1100011) + chr(111) + '\x64' + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(0b100011 + 0o12) + chr(0b111000)), FfKOThdpoDTb, nzTpIcepk0o8(chr(48) + chr(8470 - 8359) + chr(0b11101 + 0o23), 46533 - 46525))
if nBQRhObOz1Lt > XlW_I_LD2PV7:
raise XpfoAUocVVXZ(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xa3\x89\xe1Q\xab"\x99s\x85Z\xe6\xab\x96\x9eJ\xf6\'e\x9e5\x81\x16a\x95d'), chr(5320 - 5220) + chr(101) + '\143' + '\157' + chr(0b1100100) + chr(0b1100101))('\x75' + chr(116) + chr(0b1100110) + chr(0b11001 + 0o24) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\x90\xc8\xbdq\x89c\x8c&\xafx\x85\x84'), chr(0b1100100) + '\145' + chr(99) + '\157' + '\144' + '\145')('\165' + chr(0b1000110 + 0o56) + chr(5499 - 5397) + chr(0b10101 + 0o30) + chr(56)))(nBQRhObOz1Lt, XlW_I_LD2PV7))
gF1QUDIrFeFu = {}
for olsbu0l6pJGv in bbT2xIe5pzk7(nBQRhObOz1Lt):
((QRTrkgzKoAFR,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\xdf\x92'), '\144' + '\x65' + '\143' + '\x6f' + chr(100) + chr(1972 - 1871))('\x75' + chr(4104 - 3988) + chr(0b10011 + 0o123) + chr(1709 - 1664) + '\x38'), FfKOThdpoDTb, _1pmtMrnaouX)
(UcZofMadI5hD, _1pmtMrnaouX) = wDnuLXiThcki(FfKOThdpoDTb, _1pmtMrnaouX)
((FKWBoSDY8Qs2,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\xdf\x92'), chr(0b1100100) + chr(0b1100101) + chr(0b1011011 + 0o10) + '\157' + chr(1144 - 1044) + chr(0b1010000 + 0o25))('\x75' + '\164' + chr(8853 - 8751) + '\055' + chr(56)), FfKOThdpoDTb, _1pmtMrnaouX)
gF1QUDIrFeFu[QRTrkgzKoAFR] = cQ79uLcX1Ep9(QRTrkgzKoAFR, q3RB1z5nYjcr(UcZofMadI5hD), FKWBoSDY8Qs2)
((Rk0MoZgJ_DYl,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\xdf\x92'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(100) + chr(0b111101 + 0o50))(chr(11736 - 11619) + chr(0b1110100) + '\x66' + chr(254 - 209) + '\070'), FfKOThdpoDTb, _1pmtMrnaouX)
g3uQLK2hjAhg = {}
for olsbu0l6pJGv in bbT2xIe5pzk7(Rk0MoZgJ_DYl):
((giq83WV9kgfw,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\xdf\x93'), chr(0b1100100) + chr(0b100011 + 0o102) + '\x63' + '\157' + chr(0b10 + 0o142) + '\x65')(chr(11373 - 11256) + chr(0b110101 + 0o77) + chr(0b1100110) + chr(1621 - 1576) + '\070'), FfKOThdpoDTb, _1pmtMrnaouX)
(p1TNSgznD_qz, _1pmtMrnaouX) = wDnuLXiThcki(FfKOThdpoDTb, _1pmtMrnaouX)
((L8rCCx0X1Ub3,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\xdf\x92'), chr(0b1 + 0o143) + chr(101) + chr(99) + '\x6f' + '\x64' + chr(0b111110 + 0o47))('\165' + '\x74' + chr(10208 - 10106) + '\x2d' + '\070'), FfKOThdpoDTb, _1pmtMrnaouX)
ROrO3CzN_UJI = {}
for Rjygk4n7MKQp in bbT2xIe5pzk7(L8rCCx0X1Ub3):
((ifdkG1BMa6GC, y6tm5LzgZc_E, UmkVyH7qDkwz, F3I0vJQ97_r9), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\xdf\x93\xe7S\xa7'), '\x64' + '\x65' + chr(99) + chr(7776 - 7665) + chr(100) + '\145')(chr(117) + chr(0b1110100) + chr(102) + chr(0b110 + 0o47) + chr(0b111000)), FfKOThdpoDTb, _1pmtMrnaouX)
(oTM6CnZ7PoSa, _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\xdf\xde\xeaS'), '\x64' + chr(101) + chr(0b10010 + 0o121) + chr(0b101111 + 0o100) + chr(100) + chr(0b1100101))(chr(117) + chr(0b1011111 + 0o25) + chr(4515 - 4413) + chr(481 - 436) + chr(2404 - 2348)) % F3I0vJQ97_r9, FfKOThdpoDTb, _1pmtMrnaouX)
((wnwAakRLJih6,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\xdf\x92'), '\x64' + '\x65' + chr(7842 - 7743) + chr(657 - 546) + chr(3558 - 3458) + chr(101))('\165' + chr(116) + chr(102) + chr(0b1101 + 0o40) + chr(2111 - 2055)), FfKOThdpoDTb, _1pmtMrnaouX)
(S3N7igVPIbeE, _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\xdf\xde\xeaS'), chr(0b11001 + 0o113) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(1143 - 1043) + '\x65')(chr(117) + '\x74' + chr(102) + '\x2d' + '\070') % wnwAakRLJih6, FfKOThdpoDTb, _1pmtMrnaouX)
ROrO3CzN_UJI[y6tm5LzgZc_E] = l_itSLjzsJYq(p1TNSgznD_qz, y6tm5LzgZc_E, ifdkG1BMa6GC, UmkVyH7qDkwz, oTM6CnZ7PoSa, S3N7igVPIbeE)
g3uQLK2hjAhg[p1TNSgznD_qz] = _PukhUVgrzuz(p1TNSgznD_qz, giq83WV9kgfw, ROrO3CzN_UJI)
return (gF1QUDIrFeFu, g3uQLK2hjAhg) |
ciena/afkak | afkak/kafkacodec.py | KafkaCodec.encode_consumermetadata_request | def encode_consumermetadata_request(cls, client_id, correlation_id,
consumer_group):
"""
Encode a ConsumerMetadataRequest
:param bytes client_id: string
:param int correlation_id: int
:param str consumer_group: string
"""
message = cls._encode_message_header(client_id, correlation_id,
KafkaCodec.CONSUMER_METADATA_KEY)
message += write_short_ascii(consumer_group)
return message | python | def encode_consumermetadata_request(cls, client_id, correlation_id,
consumer_group):
"""
Encode a ConsumerMetadataRequest
:param bytes client_id: string
:param int correlation_id: int
:param str consumer_group: string
"""
message = cls._encode_message_header(client_id, correlation_id,
KafkaCodec.CONSUMER_METADATA_KEY)
message += write_short_ascii(consumer_group)
return message | [
"def",
"encode_consumermetadata_request",
"(",
"cls",
",",
"client_id",
",",
"correlation_id",
",",
"consumer_group",
")",
":",
"message",
"=",
"cls",
".",
"_encode_message_header",
"(",
"client_id",
",",
"correlation_id",
",",
"KafkaCodec",
".",
"CONSUMER_METADATA_KEY",
")",
"message",
"+=",
"write_short_ascii",
"(",
"consumer_group",
")",
"return",
"message"
] | Encode a ConsumerMetadataRequest
:param bytes client_id: string
:param int correlation_id: int
:param str consumer_group: string | [
"Encode",
"a",
"ConsumerMetadataRequest"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L444-L456 | train | Encode a ConsumerMetadataRequest object. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOd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RcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + chr(0b110010) + chr(48), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(0b10100 + 0o41) + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(485 - 436) + '\x31' + chr(0b10111 + 0o31), 48008 - 48000), nzTpIcepk0o8('\060' + chr(111) + chr(0b101101 + 0o5) + chr(0b110100) + chr(1789 - 1736), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(50), 17200 - 17192), nzTpIcepk0o8(chr(48) + chr(0b1 + 0o156) + '\x33' + chr(0b110110) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100110 + 0o14) + chr(0b100111 + 0o20) + chr(1971 - 1916), 20491 - 20483), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b0 + 0o61) + chr(0b110100) + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(5721 - 5610) + '\063' + '\x31', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(222 - 168) + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b10000 + 0o137) + chr(829 - 779) + '\067' + chr(0b10010 + 0o43), 31478 - 31470), nzTpIcepk0o8(chr(1769 - 1721) + chr(8067 - 7956) + chr(0b101101 + 0o12) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(1297 - 1249) + '\157' + chr(50) + chr(0b110111) + chr(341 - 293), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(337 - 286) + chr(55) + '\063', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + '\x32' + chr(314 - 262), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(2479 - 2425) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b11010 + 0o125) + '\063' + '\x35', 57781 - 57773), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + chr(49) + chr(0b110011) + chr(0b100010 + 0o20), 0o10), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1001101 + 0o42) + chr(0b110001) + chr(0b100000 + 0o24) + chr(1477 - 1428), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\064' + chr(0b10101 + 0o37), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101100 + 0o3) + chr(0b110010 + 0o1) + '\x34' + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(5861 - 5750) + '\x32' + chr(0b110011) + chr(0b10101 + 0o34), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11001 + 0o30) + '\x32' + '\061', 0o10), nzTpIcepk0o8('\060' + chr(4769 - 4658) + chr(52), 10761 - 10753), nzTpIcepk0o8('\060' + chr(111) + chr(0b100101 + 0o22) + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + '\067' + chr(51), 8), nzTpIcepk0o8(chr(1546 - 1498) + chr(111) + chr(920 - 870) + chr(0b0 + 0o65), 15592 - 15584), nzTpIcepk0o8(chr(0b110000) + chr(0b111010 + 0o65) + '\x31' + chr(49) + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(11009 - 10898) + chr(0b110011) + chr(2082 - 2031) + '\x31', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + chr(0b110000) + '\065', 46103 - 46095), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001 + 0o1) + chr(0b111 + 0o60) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(1230 - 1181) + '\060' + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + '\x34' + chr(53), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(1090 - 1036) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + chr(2607 - 2496) + chr(1565 - 1514) + '\065' + chr(0b110010), 8), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b101101 + 0o102) + chr(0b11 + 0o56) + '\x32' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1110 + 0o141) + '\x32' + '\x33' + chr(0b110010), 22387 - 22379), nzTpIcepk0o8('\x30' + '\157' + chr(0b101 + 0o56) + chr(0b110001) + chr(0b101000 + 0o16), 27805 - 27797), nzTpIcepk0o8(chr(48) + chr(1734 - 1623) + '\x32' + chr(0b110011) + chr(0b101110 + 0o4), 8), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + chr(50) + chr(2004 - 1951) + chr(66 - 16), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1685 - 1637) + '\x6f' + chr(0b110101) + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbe'), chr(100) + chr(0b100110 + 0o77) + '\x63' + chr(111) + chr(0b1000100 + 0o40) + chr(0b1100101))('\x75' + '\164' + chr(102) + chr(1827 - 1782) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def Ka2GKU9mpFS8(_1vzISbJ_R2i, r_cosW25WDG1, tL7r6ZE6GOf3, ZkSgBEVcLeGM):
FksNMH1w_ns6 = _1vzISbJ_R2i._encode_message_header(r_cosW25WDG1, tL7r6ZE6GOf3, xbGTsX4crO7w.CONSUMER_METADATA_KEY)
FksNMH1w_ns6 += j_Fubkt6y7zt(ZkSgBEVcLeGM)
return FksNMH1w_ns6 |
ciena/afkak | afkak/kafkacodec.py | KafkaCodec.decode_consumermetadata_response | def decode_consumermetadata_response(cls, data):
"""
Decode bytes to a ConsumerMetadataResponse
:param bytes data: bytes to decode
"""
(correlation_id, error_code, node_id), cur = \
relative_unpack('>ihi', data, 0)
host, cur = read_short_ascii(data, cur)
(port,), cur = relative_unpack('>i', data, cur)
return ConsumerMetadataResponse(
error_code, node_id, nativeString(host), port) | python | def decode_consumermetadata_response(cls, data):
"""
Decode bytes to a ConsumerMetadataResponse
:param bytes data: bytes to decode
"""
(correlation_id, error_code, node_id), cur = \
relative_unpack('>ihi', data, 0)
host, cur = read_short_ascii(data, cur)
(port,), cur = relative_unpack('>i', data, cur)
return ConsumerMetadataResponse(
error_code, node_id, nativeString(host), port) | [
"def",
"decode_consumermetadata_response",
"(",
"cls",
",",
"data",
")",
":",
"(",
"correlation_id",
",",
"error_code",
",",
"node_id",
")",
",",
"cur",
"=",
"relative_unpack",
"(",
"'>ihi'",
",",
"data",
",",
"0",
")",
"host",
",",
"cur",
"=",
"read_short_ascii",
"(",
"data",
",",
"cur",
")",
"(",
"port",
",",
")",
",",
"cur",
"=",
"relative_unpack",
"(",
"'>i'",
",",
"data",
",",
"cur",
")",
"return",
"ConsumerMetadataResponse",
"(",
"error_code",
",",
"node_id",
",",
"nativeString",
"(",
"host",
")",
",",
"port",
")"
] | Decode bytes to a ConsumerMetadataResponse
:param bytes data: bytes to decode | [
"Decode",
"bytes",
"to",
"a",
"ConsumerMetadataResponse"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L459-L471 | train | Decodes a byte array into a ConsumerMetadataResponse object. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJ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AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(2265 - 2217) + chr(0b1101111) + chr(0b11001 + 0o30) + chr(0b110110) + '\064', 62113 - 62105), nzTpIcepk0o8('\x30' + chr(0b11000 + 0o127) + chr(0b110010) + '\x32' + chr(0b110010), 51660 - 51652), nzTpIcepk0o8('\060' + chr(0b1010011 + 0o34) + chr(49) + chr(53) + '\x35', 29341 - 29333), nzTpIcepk0o8(chr(562 - 514) + chr(111) + chr(49) + chr(0b1111 + 0o46) + chr(52), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(0b101011 + 0o104) + '\062' + chr(0b100001 + 0o20) + '\x33', 43372 - 43364), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(970 - 921) + '\061' + chr(801 - 746), 20148 - 20140), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + '\067' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(1331 - 1283) + '\157' + chr(50) + '\x37' + '\066', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101101 + 0o2) + '\x32' + chr(0b110101) + '\x37', 21554 - 21546), nzTpIcepk0o8(chr(974 - 926) + '\157' + chr(0b110010) + chr(53) + '\x36', 30300 - 30292), nzTpIcepk0o8(chr(210 - 162) + '\157' + chr(50) + chr(0b1010 + 0o47) + chr(55), 34705 - 34697), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(49) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110 + 0o151) + '\x32' + chr(2248 - 2197) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(51) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(466 - 418) + chr(111) + '\x32' + chr(110 - 62) + chr(0b100000 + 0o27), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(2337 - 2288) + chr(0b11100 + 0o24), 21301 - 21293), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + '\x33' + '\067', 0o10), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1101111) + chr(50) + chr(48) + chr(650 - 599), 24000 - 23992), nzTpIcepk0o8(chr(48) + chr(111) + chr(53) + chr(0b110101), 40405 - 40397), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(50) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1000000 + 0o57) + chr(0b10010 + 0o40) + chr(0b10010 + 0o40) + '\063', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(2413 - 2362) + chr(0b11110 + 0o27) + chr(0b100111 + 0o20), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + '\063' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101011 + 0o4) + '\x33' + chr(0b110010) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(1697 - 1586) + '\x31' + chr(49) + chr(0b10100 + 0o40), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(2526 - 2474), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(869 - 820) + '\067' + '\060', 25229 - 25221), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(424 - 375) + chr(0b110001) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2335 - 2280) + chr(0b100 + 0o62), 52304 - 52296), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\x6f' + '\x32' + chr(0b11100 + 0o33) + '\062', 8), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\157' + chr(51) + chr(0b11001 + 0o36) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b111010 + 0o65) + chr(49) + chr(0b100010 + 0o23) + chr(0b110000), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x33' + '\x34' + chr(53), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b1 + 0o61) + chr(0b110111) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1000101 + 0o52) + chr(0b11000 + 0o32) + chr(966 - 917), 0o10), nzTpIcepk0o8('\x30' + chr(2502 - 2391) + chr(1491 - 1440) + '\x35' + '\x34', 0o10), nzTpIcepk0o8(chr(48) + chr(6548 - 6437) + chr(604 - 553) + chr(0b110011) + '\065', 61806 - 61798), nzTpIcepk0o8(chr(1526 - 1478) + '\157' + chr(55) + chr(445 - 396), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(10409 - 10298) + chr(894 - 841) + chr(1911 - 1863), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'Z'), '\144' + chr(7211 - 7110) + chr(0b11101 + 0o106) + chr(0b1101111) + '\x64' + chr(0b100 + 0o141))('\x75' + chr(0b1110100) + chr(102) + '\x2d' + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def cddphB2nyDCf(_1vzISbJ_R2i, FfKOThdpoDTb):
((tL7r6ZE6GOf3, DF48qJTBP5Fb, l4ejMdXa7Niq), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'J\xfb\x05\x05'), '\x64' + chr(4558 - 4457) + chr(0b1100011) + '\x6f' + chr(0b10110 + 0o116) + chr(9527 - 9426))('\x75' + '\164' + '\x66' + chr(0b100100 + 0o11) + chr(56)), FfKOThdpoDTb, nzTpIcepk0o8(chr(48) + chr(0b1100110 + 0o11) + chr(0b101001 + 0o7), ord("\x08")))
(UcZofMadI5hD, _1pmtMrnaouX) = wDnuLXiThcki(FfKOThdpoDTb, _1pmtMrnaouX)
((FKWBoSDY8Qs2,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'J\xfb'), chr(0b1010110 + 0o16) + chr(101) + '\x63' + chr(0b1101111) + '\144' + chr(9633 - 9532))(chr(0b1110011 + 0o2) + '\x74' + '\x66' + '\x2d' + '\070'), FfKOThdpoDTb, _1pmtMrnaouX)
return kXLgwEUhKDfb(DF48qJTBP5Fb, l4ejMdXa7Niq, q3RB1z5nYjcr(UcZofMadI5hD), FKWBoSDY8Qs2) |
ciena/afkak | afkak/kafkacodec.py | KafkaCodec.encode_offset_commit_request | def encode_offset_commit_request(cls, client_id, correlation_id,
group, group_generation_id, consumer_id,
payloads):
"""
Encode some OffsetCommitRequest structs (v1)
:param bytes client_id: string
:param int correlation_id: int
:param str group: the consumer group to which you are committing offsets
:param int group_generation_id: int32, generation ID of the group
:param str consumer_id: string, Identifier for the consumer
:param list payloads: list of :class:`OffsetCommitRequest`
"""
grouped_payloads = group_by_topic_and_partition(payloads)
message = cls._encode_message_header(
client_id, correlation_id, KafkaCodec.OFFSET_COMMIT_KEY,
api_version=1,
)
message += write_short_ascii(group)
message += struct.pack('>i', group_generation_id)
message += write_short_ascii(consumer_id)
message += struct.pack('>i', len(grouped_payloads))
for topic, topic_payloads in grouped_payloads.items():
message += write_short_ascii(topic)
message += struct.pack('>i', len(topic_payloads))
for partition, payload in topic_payloads.items():
message += struct.pack('>iqq', partition, payload.offset,
payload.timestamp)
message += write_short_bytes(payload.metadata)
return message | python | def encode_offset_commit_request(cls, client_id, correlation_id,
group, group_generation_id, consumer_id,
payloads):
"""
Encode some OffsetCommitRequest structs (v1)
:param bytes client_id: string
:param int correlation_id: int
:param str group: the consumer group to which you are committing offsets
:param int group_generation_id: int32, generation ID of the group
:param str consumer_id: string, Identifier for the consumer
:param list payloads: list of :class:`OffsetCommitRequest`
"""
grouped_payloads = group_by_topic_and_partition(payloads)
message = cls._encode_message_header(
client_id, correlation_id, KafkaCodec.OFFSET_COMMIT_KEY,
api_version=1,
)
message += write_short_ascii(group)
message += struct.pack('>i', group_generation_id)
message += write_short_ascii(consumer_id)
message += struct.pack('>i', len(grouped_payloads))
for topic, topic_payloads in grouped_payloads.items():
message += write_short_ascii(topic)
message += struct.pack('>i', len(topic_payloads))
for partition, payload in topic_payloads.items():
message += struct.pack('>iqq', partition, payload.offset,
payload.timestamp)
message += write_short_bytes(payload.metadata)
return message | [
"def",
"encode_offset_commit_request",
"(",
"cls",
",",
"client_id",
",",
"correlation_id",
",",
"group",
",",
"group_generation_id",
",",
"consumer_id",
",",
"payloads",
")",
":",
"grouped_payloads",
"=",
"group_by_topic_and_partition",
"(",
"payloads",
")",
"message",
"=",
"cls",
".",
"_encode_message_header",
"(",
"client_id",
",",
"correlation_id",
",",
"KafkaCodec",
".",
"OFFSET_COMMIT_KEY",
",",
"api_version",
"=",
"1",
",",
")",
"message",
"+=",
"write_short_ascii",
"(",
"group",
")",
"message",
"+=",
"struct",
".",
"pack",
"(",
"'>i'",
",",
"group_generation_id",
")",
"message",
"+=",
"write_short_ascii",
"(",
"consumer_id",
")",
"message",
"+=",
"struct",
".",
"pack",
"(",
"'>i'",
",",
"len",
"(",
"grouped_payloads",
")",
")",
"for",
"topic",
",",
"topic_payloads",
"in",
"grouped_payloads",
".",
"items",
"(",
")",
":",
"message",
"+=",
"write_short_ascii",
"(",
"topic",
")",
"message",
"+=",
"struct",
".",
"pack",
"(",
"'>i'",
",",
"len",
"(",
"topic_payloads",
")",
")",
"for",
"partition",
",",
"payload",
"in",
"topic_payloads",
".",
"items",
"(",
")",
":",
"message",
"+=",
"struct",
".",
"pack",
"(",
"'>iqq'",
",",
"partition",
",",
"payload",
".",
"offset",
",",
"payload",
".",
"timestamp",
")",
"message",
"+=",
"write_short_bytes",
"(",
"payload",
".",
"metadata",
")",
"return",
"message"
] | Encode some OffsetCommitRequest structs (v1)
:param bytes client_id: string
:param int correlation_id: int
:param str group: the consumer group to which you are committing offsets
:param int group_generation_id: int32, generation ID of the group
:param str consumer_id: string, Identifier for the consumer
:param list payloads: list of :class:`OffsetCommitRequest` | [
"Encode",
"some",
"OffsetCommitRequest",
"structs",
"(",
"v1",
")"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak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8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\157' + chr(50) + '\064' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(501 - 449) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101111) + chr(2282 - 2231) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(936 - 888) + chr(0b101110 + 0o101) + '\x34' + chr(50), ord("\x08")), nzTpIcepk0o8('\060' + chr(4402 - 4291) + chr(0b110010) + '\062' + '\x33', 50214 - 50206), nzTpIcepk0o8('\060' + chr(0b1100011 + 0o14) + '\062' + chr(0b110011) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b10 + 0o155) + chr(0b11011 + 0o34) + '\066', ord("\x08")), nzTpIcepk0o8(chr(580 - 532) + chr(111) + '\x33' + chr(54) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b1100 + 0o45) + chr(0b101001 + 0o12) + '\x31', 51694 - 51686), nzTpIcepk0o8('\x30' + chr(0b101000 + 0o107) + chr(54) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(323 - 273) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(52 - 4) + chr(0b100 + 0o153) + chr(0b1 + 0o62) + chr(1670 - 1618) + chr(2272 - 2219), 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\x6f' + chr(2427 - 2377) + '\065' + chr(0b110010), 55057 - 55049), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(845 - 794) + chr(951 - 902), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(0b110110) + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(48) + chr(0b110010), 58525 - 58517), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1 + 0o62) + '\060' + chr(432 - 379), 23621 - 23613), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110111) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(1473 - 1425) + '\x6f' + '\063' + '\063' + '\063', 0b1000), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + chr(1450 - 1399) + '\x35' + chr(49), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b101011 + 0o6) + chr(51) + chr(0b110001), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1119 - 1069) + chr(0b101100 + 0o6) + chr(0b110011), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + '\064' + chr(0b110000 + 0o3), 0b1000), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(6486 - 6375) + chr(1705 - 1650) + chr(48), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + '\060' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(0b101100 + 0o10) + '\067', ord("\x08")), nzTpIcepk0o8(chr(99 - 51) + chr(8516 - 8405) + '\062' + chr(0b100000 + 0o26) + chr(589 - 535), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1001101 + 0o42) + chr(0b110011) + '\063' + chr(0b110000), 0o10), nzTpIcepk0o8('\060' + chr(2332 - 2221) + chr(0b110111) + chr(2343 - 2292), 8), nzTpIcepk0o8(chr(80 - 32) + chr(693 - 582) + '\063' + chr(0b110001) + chr(0b110010 + 0o4), 0o10), nzTpIcepk0o8(chr(48) + chr(10307 - 10196) + chr(2692 - 2639) + '\060', 25827 - 25819), nzTpIcepk0o8(chr(0b110000) + chr(0b0 + 0o157) + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(52) + '\x30', 8), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\x6f' + '\x32' + '\x32' + '\065', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011110 + 0o21) + chr(50) + '\x36' + '\x37', 36037 - 36029), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(111) + chr(2099 - 2048) + chr(1650 - 1600) + chr(1729 - 1676), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2300 - 2249) + chr(0b110111) + '\066', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101001 + 0o6) + chr(435 - 385) + chr(0b110100) + chr(0b11110 + 0o25), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + chr(0b110 + 0o56) + chr(55), 35134 - 35126), nzTpIcepk0o8('\060' + '\157' + chr(0b110100) + chr(51), 17015 - 17007)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1965 - 1917) + '\157' + chr(0b110100 + 0o1) + chr(0b101001 + 0o7), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8e'), chr(0b1100100) + '\145' + chr(99) + chr(0b1101101 + 0o2) + chr(100) + chr(101))(chr(0b1100111 + 0o16) + '\164' + chr(102) + '\055' + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def hSPeW7z6VPgM(_1vzISbJ_R2i, r_cosW25WDG1, tL7r6ZE6GOf3, F9lJ8RbIonqb, SBN3RyFeWR5R, Ke55xrtZl4d_, hu1hynoeGawF):
vOazzWCPnVGH = N25JPF58qdq7(hu1hynoeGawF)
FksNMH1w_ns6 = _1vzISbJ_R2i._encode_message_header(r_cosW25WDG1, tL7r6ZE6GOf3, xbGTsX4crO7w.OFFSET_COMMIT_KEY, api_version=nzTpIcepk0o8('\x30' + chr(0b100010 + 0o115) + '\x31', ord("\x08")))
FksNMH1w_ns6 += j_Fubkt6y7zt(F9lJ8RbIonqb)
FksNMH1w_ns6 += Mf7j_LCOrq1d.pack(roI3spqORKae(ES5oEprVxulp(b'\x9eN'), '\x64' + chr(0b1010010 + 0o23) + chr(0b11010 + 0o111) + chr(0b1101111) + chr(100) + chr(0b101000 + 0o75))('\165' + '\164' + chr(0b1011101 + 0o11) + '\055' + '\x38'), SBN3RyFeWR5R)
FksNMH1w_ns6 += j_Fubkt6y7zt(Ke55xrtZl4d_)
FksNMH1w_ns6 += Mf7j_LCOrq1d.pack(roI3spqORKae(ES5oEprVxulp(b'\x9eN'), chr(7409 - 7309) + '\x65' + chr(0b11 + 0o140) + chr(5882 - 5771) + chr(9413 - 9313) + chr(101))('\165' + chr(116) + chr(102) + chr(466 - 421) + chr(0b111000 + 0o0)), ftfygxgFas5X(vOazzWCPnVGH))
for (eddDFOEFy2dH, _GjdKAULSeXZ) in roI3spqORKae(vOazzWCPnVGH, roI3spqORKae(ES5oEprVxulp(b'\xf9xsl\xd6\xe2v\xc6jA\xcf\x8c'), chr(0b1100100) + chr(101) + '\143' + '\157' + '\144' + '\x65')('\165' + chr(0b1001 + 0o153) + '\146' + chr(45) + '\x38'))():
FksNMH1w_ns6 += j_Fubkt6y7zt(eddDFOEFy2dH)
FksNMH1w_ns6 += Mf7j_LCOrq1d.pack(roI3spqORKae(ES5oEprVxulp(b'\x9eN'), chr(100) + '\145' + chr(0b1010011 + 0o20) + chr(0b1101111) + '\144' + '\145')(chr(0b100001 + 0o124) + '\164' + chr(102) + '\x2d' + chr(0b100010 + 0o26)), ftfygxgFas5X(_GjdKAULSeXZ))
for (y6tm5LzgZc_E, pkzlytqkFfcV) in roI3spqORKae(_GjdKAULSeXZ, roI3spqORKae(ES5oEprVxulp(b'\xf9xsl\xd6\xe2v\xc6jA\xcf\x8c'), chr(8563 - 8463) + '\x65' + '\143' + '\x6f' + '\144' + '\145')(chr(0b1110101) + chr(673 - 557) + chr(0b1100110) + '\055' + chr(0b100110 + 0o22)))():
FksNMH1w_ns6 += Mf7j_LCOrq1d.pack(roI3spqORKae(ES5oEprVxulp(b'\x9eNlS'), chr(100) + chr(0b1000110 + 0o37) + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(0b111110 + 0o47))(chr(117) + chr(0b1111 + 0o145) + '\146' + chr(45) + chr(0b11011 + 0o35)), y6tm5LzgZc_E, pkzlytqkFfcV.GuX46MBAOnaQ, pkzlytqkFfcV.rob7nZM55s6v)
FksNMH1w_ns6 += gEdBqgi_TfkS(pkzlytqkFfcV.nmf2TsIJJ3IK)
return FksNMH1w_ns6 |
ciena/afkak | afkak/kafkacodec.py | KafkaCodec.decode_offset_commit_response | def decode_offset_commit_response(cls, data):
"""
Decode bytes to an OffsetCommitResponse
:param bytes data: bytes to decode
"""
((correlation_id,), cur) = relative_unpack('>i', data, 0)
((num_topics,), cur) = relative_unpack('>i', data, cur)
for _i in range(num_topics):
(topic, cur) = read_short_ascii(data, cur)
((num_partitions,), cur) = relative_unpack('>i', data, cur)
for _i in range(num_partitions):
((partition, error), cur) = relative_unpack('>ih', data, cur)
yield OffsetCommitResponse(topic, partition, error) | python | def decode_offset_commit_response(cls, data):
"""
Decode bytes to an OffsetCommitResponse
:param bytes data: bytes to decode
"""
((correlation_id,), cur) = relative_unpack('>i', data, 0)
((num_topics,), cur) = relative_unpack('>i', data, cur)
for _i in range(num_topics):
(topic, cur) = read_short_ascii(data, cur)
((num_partitions,), cur) = relative_unpack('>i', data, cur)
for _i in range(num_partitions):
((partition, error), cur) = relative_unpack('>ih', data, cur)
yield OffsetCommitResponse(topic, partition, error) | [
"def",
"decode_offset_commit_response",
"(",
"cls",
",",
"data",
")",
":",
"(",
"(",
"correlation_id",
",",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>i'",
",",
"data",
",",
"0",
")",
"(",
"(",
"num_topics",
",",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>i'",
",",
"data",
",",
"cur",
")",
"for",
"_i",
"in",
"range",
"(",
"num_topics",
")",
":",
"(",
"topic",
",",
"cur",
")",
"=",
"read_short_ascii",
"(",
"data",
",",
"cur",
")",
"(",
"(",
"num_partitions",
",",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>i'",
",",
"data",
",",
"cur",
")",
"for",
"_i",
"in",
"range",
"(",
"num_partitions",
")",
":",
"(",
"(",
"partition",
",",
"error",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>ih'",
",",
"data",
",",
"cur",
")",
"yield",
"OffsetCommitResponse",
"(",
"topic",
",",
"partition",
",",
"error",
")"
] | Decode bytes to an OffsetCommitResponse
:param bytes data: bytes to decode | [
"Decode",
"bytes",
"to",
"an",
"OffsetCommitResponse"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L511-L526 | train | Decode bytes to an OffsetCommitResponse object. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpV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rJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(0b10100 + 0o43) + chr(0b11111 + 0o21), 30488 - 30480), nzTpIcepk0o8(chr(0b110000) + chr(0b1001 + 0o146) + '\063' + '\x34' + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(53) + chr(0b101 + 0o53), ord("\x08")), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(0b101011 + 0o6) + chr(51), 0b1000), nzTpIcepk0o8(chr(1245 - 1197) + '\x6f' + '\x37' + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + chr(0b110111) + '\x31', 3243 - 3235), nzTpIcepk0o8('\x30' + chr(0b110010 + 0o75) + chr(0b110011) + '\x32' + chr(2232 - 2178), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(1682 - 1631) + chr(0b10011 + 0o37) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1100 + 0o143) + chr(0b100101 + 0o15) + chr(0b110111) + chr(0b11100 + 0o25), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(0b110011), 41645 - 41637), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + chr(53) + '\x34', 51451 - 51443), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010), 27732 - 27724), nzTpIcepk0o8('\x30' + chr(0b1001100 + 0o43) + chr(0b11100 + 0o27) + '\062' + chr(0b110110), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110101) + chr(0b0 + 0o64), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + chr(52) + '\060', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101001 + 0o6) + '\x31' + '\064', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(2736 - 2682) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(1543 - 1495) + chr(0b1011000 + 0o27) + chr(0b110001 + 0o0) + chr(425 - 373) + chr(1241 - 1188), 37802 - 37794), nzTpIcepk0o8('\x30' + chr(111) + chr(0b11 + 0o60) + chr(0b110100) + chr(1374 - 1320), 37615 - 37607), nzTpIcepk0o8(chr(198 - 150) + chr(111) + chr(1374 - 1323) + '\061' + '\x35', 45705 - 45697), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + '\x31' + chr(0b110011), 45697 - 45689), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2064 - 2014) + chr(0b10 + 0o57) + chr(909 - 859), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b11010 + 0o125) + chr(0b110011) + '\067' + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(1209 - 1160), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(55) + '\065', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b100 + 0o60) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(2046 - 1998) + chr(111) + chr(0b11001 + 0o31) + chr(49) + chr(0b110010), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + '\x35' + chr(2911 - 2856), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b10101 + 0o35) + chr(0b111 + 0o54), 6572 - 6564), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101001 + 0o11) + '\065' + chr(49), 4153 - 4145), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + chr(0b110001) + chr(0b101110 + 0o4) + '\x34', 0o10), nzTpIcepk0o8(chr(1539 - 1491) + chr(0b1101111) + '\x33' + '\x32' + chr(49), 61842 - 61834), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + '\x32' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(452 - 404) + chr(3925 - 3814) + chr(0b101011 + 0o6) + '\x32' + '\x34', 8), nzTpIcepk0o8(chr(1409 - 1361) + chr(111) + '\x32' + chr(53) + chr(49), 8), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\066' + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100 + 0o57) + chr(0b110101) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + '\x35' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(886 - 832) + '\x36', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(50) + '\064', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(2187 - 2139) + chr(0b111 + 0o150) + chr(0b110101) + chr(0b1011 + 0o45), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'V'), chr(0b1100100) + '\x65' + '\143' + chr(111) + '\x64' + '\145')('\x75' + '\x74' + '\x66' + chr(0b10001 + 0o34) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def tvSPWCbzxoAy(_1vzISbJ_R2i, FfKOThdpoDTb):
((tL7r6ZE6GOf3,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'F\x88'), chr(0b111000 + 0o54) + chr(0b1100101) + '\143' + '\x6f' + chr(0b1100100) + chr(10176 - 10075))(chr(117) + '\164' + '\x66' + '\x2d' + chr(280 - 224)), FfKOThdpoDTb, nzTpIcepk0o8('\060' + '\157' + '\060', 11234 - 11226))
((Rk0MoZgJ_DYl,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'F\x88'), chr(100) + '\145' + chr(1024 - 925) + chr(0b1101111) + '\x64' + chr(0b1100101))('\165' + '\164' + chr(0b110001 + 0o65) + chr(0b100111 + 0o6) + chr(56)), FfKOThdpoDTb, _1pmtMrnaouX)
for olsbu0l6pJGv in bbT2xIe5pzk7(Rk0MoZgJ_DYl):
(eddDFOEFy2dH, _1pmtMrnaouX) = wDnuLXiThcki(FfKOThdpoDTb, _1pmtMrnaouX)
((L8rCCx0X1Ub3,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'F\x88'), '\144' + '\x65' + chr(0b1100011) + '\157' + chr(0b1100100) + chr(5830 - 5729))(chr(0b1110101) + chr(0b100101 + 0o117) + chr(0b1010000 + 0o26) + chr(641 - 596) + chr(1019 - 963)), FfKOThdpoDTb, _1pmtMrnaouX)
for olsbu0l6pJGv in bbT2xIe5pzk7(L8rCCx0X1Ub3):
((y6tm5LzgZc_E, qi1wipPVvEKd), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'F\x88@'), chr(0b1100100) + chr(6401 - 6300) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(3866 - 3765))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(1434 - 1389) + chr(56)), FfKOThdpoDTb, _1pmtMrnaouX)
yield ceex8N0D07vE(eddDFOEFy2dH, y6tm5LzgZc_E, qi1wipPVvEKd) |
ciena/afkak | afkak/kafkacodec.py | KafkaCodec.encode_offset_fetch_request | def encode_offset_fetch_request(cls, client_id, correlation_id,
group, payloads):
"""
Encode some OffsetFetchRequest structs
:param bytes client_id: string
:param int correlation_id: int
:param bytes group: string, the consumer group you are fetching offsets for
:param list payloads: list of :class:`OffsetFetchRequest`
"""
grouped_payloads = group_by_topic_and_partition(payloads)
message = cls._encode_message_header(
client_id, correlation_id, KafkaCodec.OFFSET_FETCH_KEY,
api_version=1)
message += write_short_ascii(group)
message += struct.pack('>i', len(grouped_payloads))
for topic, topic_payloads in grouped_payloads.items():
message += write_short_ascii(topic)
message += struct.pack('>i', len(topic_payloads))
for partition in topic_payloads:
message += struct.pack('>i', partition)
return message | python | def encode_offset_fetch_request(cls, client_id, correlation_id,
group, payloads):
"""
Encode some OffsetFetchRequest structs
:param bytes client_id: string
:param int correlation_id: int
:param bytes group: string, the consumer group you are fetching offsets for
:param list payloads: list of :class:`OffsetFetchRequest`
"""
grouped_payloads = group_by_topic_and_partition(payloads)
message = cls._encode_message_header(
client_id, correlation_id, KafkaCodec.OFFSET_FETCH_KEY,
api_version=1)
message += write_short_ascii(group)
message += struct.pack('>i', len(grouped_payloads))
for topic, topic_payloads in grouped_payloads.items():
message += write_short_ascii(topic)
message += struct.pack('>i', len(topic_payloads))
for partition in topic_payloads:
message += struct.pack('>i', partition)
return message | [
"def",
"encode_offset_fetch_request",
"(",
"cls",
",",
"client_id",
",",
"correlation_id",
",",
"group",
",",
"payloads",
")",
":",
"grouped_payloads",
"=",
"group_by_topic_and_partition",
"(",
"payloads",
")",
"message",
"=",
"cls",
".",
"_encode_message_header",
"(",
"client_id",
",",
"correlation_id",
",",
"KafkaCodec",
".",
"OFFSET_FETCH_KEY",
",",
"api_version",
"=",
"1",
")",
"message",
"+=",
"write_short_ascii",
"(",
"group",
")",
"message",
"+=",
"struct",
".",
"pack",
"(",
"'>i'",
",",
"len",
"(",
"grouped_payloads",
")",
")",
"for",
"topic",
",",
"topic_payloads",
"in",
"grouped_payloads",
".",
"items",
"(",
")",
":",
"message",
"+=",
"write_short_ascii",
"(",
"topic",
")",
"message",
"+=",
"struct",
".",
"pack",
"(",
"'>i'",
",",
"len",
"(",
"topic_payloads",
")",
")",
"for",
"partition",
"in",
"topic_payloads",
":",
"message",
"+=",
"struct",
".",
"pack",
"(",
"'>i'",
",",
"partition",
")",
"return",
"message"
] | Encode some OffsetFetchRequest structs
:param bytes client_id: string
:param int correlation_id: int
:param bytes group: string, the consumer group you are fetching offsets for
:param list payloads: list of :class:`OffsetFetchRequest` | [
"Encode",
"some",
"OffsetFetchRequest",
"structs"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L529-L554 | train | Encode some OffsetFetchRequest structs that are used to fetch the offsets for a specific consumer group. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5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bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2342 - 2293) + chr(52) + '\061', 0o10), nzTpIcepk0o8(chr(450 - 402) + chr(2589 - 2478) + '\x32' + chr(54) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2966 - 2855) + '\x32' + '\x35' + chr(1282 - 1227), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b101111 + 0o3) + chr(0b110001), 0o10), nzTpIcepk0o8('\060' + chr(11832 - 11721) + chr(54) + chr(0b101 + 0o62), 51191 - 51183), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(1400 - 1345) + chr(53), 47558 - 47550), nzTpIcepk0o8(chr(1029 - 981) + chr(111) + '\067' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + chr(1324 - 1274) + chr(0b110001), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + '\x36' + chr(0b100 + 0o62), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(9675 - 9564) + chr(49) + '\063' + '\x31', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(0b11111 + 0o25) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + '\061' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(1944 - 1896) + chr(0b101010 + 0o105) + chr(2391 - 2342) + '\x33' + chr(642 - 594), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + '\x30' + chr(0b1111 + 0o42), 23627 - 23619), nzTpIcepk0o8('\x30' + chr(0b11000 + 0o127) + '\x31' + '\064' + '\x33', 34978 - 34970), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(54) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + '\062' + chr(0b110011) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(4461 - 4350) + chr(0b101000 + 0o13) + chr(51) + chr(1485 - 1435), 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(111) + '\064' + chr(0b100110 + 0o16), 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1001000 + 0o47) + '\063' + chr(52) + '\x31', 15448 - 15440), nzTpIcepk0o8('\060' + chr(11630 - 11519) + '\062' + '\062' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(1298 - 1250) + '\157' + chr(975 - 925) + chr(1887 - 1832) + chr(2001 - 1950), 59742 - 59734), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(4110 - 3999) + '\061' + chr(1537 - 1485) + chr(1041 - 989), 0o10), nzTpIcepk0o8(chr(65 - 17) + '\x6f' + chr(0b110001) + '\062' + '\062', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10010 + 0o37) + chr(1319 - 1269) + chr(1701 - 1652), 0b1000), nzTpIcepk0o8(chr(0b110 + 0o52) + '\x6f' + chr(1434 - 1385) + '\060' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b10011 + 0o134) + chr(0b110001) + chr(0b10110 + 0o35) + '\064', 0o10), nzTpIcepk0o8('\060' + chr(0b110111 + 0o70) + '\x33' + chr(344 - 293) + chr(55), 55265 - 55257), nzTpIcepk0o8('\x30' + chr(111) + chr(2490 - 2440) + chr(2262 - 2214) + chr(48), 35970 - 35962), nzTpIcepk0o8('\x30' + '\157' + chr(0b100101 + 0o17) + chr(0b100100 + 0o23), ord("\x08")), nzTpIcepk0o8(chr(1461 - 1413) + chr(111) + '\x35' + chr(747 - 699), 4133 - 4125), nzTpIcepk0o8(chr(1345 - 1297) + '\157' + chr(1077 - 1028) + '\067' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + '\x31' + '\062', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(813 - 763) + chr(54) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1332 - 1278) + chr(2145 - 2091), ord("\x08")), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(5678 - 5567) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\x6f' + chr(1944 - 1893) + chr(0b100 + 0o63) + '\x30', 0b1000), nzTpIcepk0o8(chr(1149 - 1101) + '\x6f' + '\x31' + chr(645 - 594) + '\067', 0o10), nzTpIcepk0o8(chr(215 - 167) + chr(111) + chr(49) + chr(0b110001) + chr(51), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + chr(51) + chr(0b0 + 0o60), 34821 - 34813)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(111) + '\065' + chr(1744 - 1696), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'O'), chr(9974 - 9874) + chr(0b1100101) + chr(0b1100011) + chr(5540 - 5429) + chr(0b1011100 + 0o10) + '\145')(chr(6917 - 6800) + '\x74' + chr(0b1010001 + 0o25) + chr(0b101101) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def TrwxxhUH_sgz(_1vzISbJ_R2i, r_cosW25WDG1, tL7r6ZE6GOf3, F9lJ8RbIonqb, hu1hynoeGawF):
vOazzWCPnVGH = N25JPF58qdq7(hu1hynoeGawF)
FksNMH1w_ns6 = _1vzISbJ_R2i._encode_message_header(r_cosW25WDG1, tL7r6ZE6GOf3, xbGTsX4crO7w.OFFSET_FETCH_KEY, api_version=nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49), ord("\x08")))
FksNMH1w_ns6 += j_Fubkt6y7zt(F9lJ8RbIonqb)
FksNMH1w_ns6 += Mf7j_LCOrq1d.pack(roI3spqORKae(ES5oEprVxulp(b'_\xd9'), '\x64' + chr(2042 - 1941) + chr(0b101000 + 0o73) + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b11101 + 0o127) + chr(0b1100110) + '\055' + chr(56)), ftfygxgFas5X(vOazzWCPnVGH))
for (eddDFOEFy2dH, _GjdKAULSeXZ) in roI3spqORKae(vOazzWCPnVGH, roI3spqORKae(ES5oEprVxulp(b"8\xef\xc1_r\xc7v%\xc5/?'"), chr(100) + '\145' + chr(0b1100011) + '\x6f' + chr(0b1100100) + '\145')(chr(1228 - 1111) + chr(116) + chr(102) + chr(0b101101) + chr(1856 - 1800)))():
FksNMH1w_ns6 += j_Fubkt6y7zt(eddDFOEFy2dH)
FksNMH1w_ns6 += Mf7j_LCOrq1d.pack(roI3spqORKae(ES5oEprVxulp(b'_\xd9'), '\x64' + chr(7662 - 7561) + chr(0b1100011) + chr(333 - 222) + '\144' + chr(0b1100101))(chr(0b1110101 + 0o0) + '\164' + chr(102) + '\x2d' + chr(0b111000)), ftfygxgFas5X(_GjdKAULSeXZ))
for y6tm5LzgZc_E in _GjdKAULSeXZ:
FksNMH1w_ns6 += Mf7j_LCOrq1d.pack(roI3spqORKae(ES5oEprVxulp(b'_\xd9'), '\144' + chr(0b1100101) + chr(6069 - 5970) + chr(0b1101111) + '\144' + chr(1901 - 1800))(chr(117) + chr(0b1110100) + chr(0b1010000 + 0o26) + chr(487 - 442) + '\070'), y6tm5LzgZc_E)
return FksNMH1w_ns6 |
ciena/afkak | afkak/kafkacodec.py | KafkaCodec.decode_offset_fetch_response | def decode_offset_fetch_response(cls, data):
"""
Decode bytes to an OffsetFetchResponse
:param bytes data: bytes to decode
"""
((correlation_id,), cur) = relative_unpack('>i', data, 0)
((num_topics,), cur) = relative_unpack('>i', data, cur)
for _i in range(num_topics):
(topic, cur) = read_short_ascii(data, cur)
((num_partitions,), cur) = relative_unpack('>i', data, cur)
for _i in range(num_partitions):
((partition, offset), cur) = relative_unpack('>iq', data, cur)
(metadata, cur) = read_short_bytes(data, cur)
((error,), cur) = relative_unpack('>h', data, cur)
yield OffsetFetchResponse(topic, partition, offset,
metadata, error) | python | def decode_offset_fetch_response(cls, data):
"""
Decode bytes to an OffsetFetchResponse
:param bytes data: bytes to decode
"""
((correlation_id,), cur) = relative_unpack('>i', data, 0)
((num_topics,), cur) = relative_unpack('>i', data, cur)
for _i in range(num_topics):
(topic, cur) = read_short_ascii(data, cur)
((num_partitions,), cur) = relative_unpack('>i', data, cur)
for _i in range(num_partitions):
((partition, offset), cur) = relative_unpack('>iq', data, cur)
(metadata, cur) = read_short_bytes(data, cur)
((error,), cur) = relative_unpack('>h', data, cur)
yield OffsetFetchResponse(topic, partition, offset,
metadata, error) | [
"def",
"decode_offset_fetch_response",
"(",
"cls",
",",
"data",
")",
":",
"(",
"(",
"correlation_id",
",",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>i'",
",",
"data",
",",
"0",
")",
"(",
"(",
"num_topics",
",",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>i'",
",",
"data",
",",
"cur",
")",
"for",
"_i",
"in",
"range",
"(",
"num_topics",
")",
":",
"(",
"topic",
",",
"cur",
")",
"=",
"read_short_ascii",
"(",
"data",
",",
"cur",
")",
"(",
"(",
"num_partitions",
",",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>i'",
",",
"data",
",",
"cur",
")",
"for",
"_i",
"in",
"range",
"(",
"num_partitions",
")",
":",
"(",
"(",
"partition",
",",
"offset",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>iq'",
",",
"data",
",",
"cur",
")",
"(",
"metadata",
",",
"cur",
")",
"=",
"read_short_bytes",
"(",
"data",
",",
"cur",
")",
"(",
"(",
"error",
",",
")",
",",
"cur",
")",
"=",
"relative_unpack",
"(",
"'>h'",
",",
"data",
",",
"cur",
")",
"yield",
"OffsetFetchResponse",
"(",
"topic",
",",
"partition",
",",
"offset",
",",
"metadata",
",",
"error",
")"
] | Decode bytes to an OffsetFetchResponse
:param bytes data: bytes to decode | [
"Decode",
"bytes",
"to",
"an",
"OffsetFetchResponse"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/kafkacodec.py#L557-L577 | train | Decode bytes to an OffsetFetchResponse object. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROH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5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(1908 - 1858) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(214 - 166) + chr(0b1101111) + chr(600 - 549) + chr(0b110111) + '\x37', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + '\063' + chr(1558 - 1508), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(51) + '\060' + chr(0b100011 + 0o21), 0b1000), nzTpIcepk0o8('\x30' + chr(10949 - 10838) + chr(0b110010) + '\066' + chr(53), 0b1000), nzTpIcepk0o8('\x30' + chr(4118 - 4007) + chr(2360 - 2309) + chr(54), 25672 - 25664), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b100001 + 0o116) + '\062' + chr(0b110011) + '\x32', 0b1000), nzTpIcepk0o8(chr(1023 - 975) + chr(0b1101111) + chr(1607 - 1556) + '\067' + '\061', 8368 - 8360), nzTpIcepk0o8(chr(886 - 838) + chr(111) + chr(0b110011) + chr(54) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(0b110110) + chr(1520 - 1468), 37311 - 37303), nzTpIcepk0o8(chr(2239 - 2191) + '\x6f' + chr(66 - 11) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + chr(8299 - 8188) + chr(0b110 + 0o60) + chr(75 - 22), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(1880 - 1829) + chr(53) + chr(1140 - 1090), ord("\x08")), nzTpIcepk0o8(chr(1464 - 1416) + chr(0b1101111) + chr(0b1011 + 0o47) + chr(0b110010) + chr(0b10001 + 0o41), 0b1000), nzTpIcepk0o8('\x30' + chr(2339 - 2228) + '\062' + chr(1392 - 1343) + chr(0b10011 + 0o44), 0o10), nzTpIcepk0o8(chr(1180 - 1132) + chr(111) + '\x32' + '\061', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + '\x31', 8), nzTpIcepk0o8('\x30' + chr(11120 - 11009) + chr(0b110000 + 0o6) + chr(0b11110 + 0o25), 7038 - 7030), nzTpIcepk0o8('\060' + chr(0b1101011 + 0o4) + '\x32' + '\x35' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(714 - 666) + chr(7381 - 7270) + chr(0b110011 + 0o2) + chr(1042 - 989), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1101111) + chr(0b100011 + 0o20) + '\x36' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(999 - 951) + chr(111) + '\062' + '\063', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b11111 + 0o120) + chr(0b101100 + 0o12) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + chr(4719 - 4608) + chr(51) + chr(0b110010) + chr(55), 49863 - 49855), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(0b110110) + chr(1044 - 995), 23340 - 23332), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33' + chr(0b110111) + chr(381 - 327), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101101 + 0o2) + '\x31' + '\x34', 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\157' + '\067' + chr(0b110000), 28153 - 28145), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(50) + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b1100 + 0o45) + chr(0b110011) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(0b10100 + 0o36) + '\064', 49465 - 49457), nzTpIcepk0o8(chr(2271 - 2223) + '\x6f' + chr(0b110001) + '\060' + '\x35', 29458 - 29450), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b110100) + chr(48), 65386 - 65378), nzTpIcepk0o8('\060' + chr(10310 - 10199) + chr(51) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(1238 - 1190) + chr(11489 - 11378) + chr(0b110001) + chr(755 - 704) + chr(0b110001), 8), nzTpIcepk0o8(chr(48) + chr(0b1101000 + 0o7) + chr(0b110010) + chr(0b101010 + 0o12) + chr(319 - 267), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(2057 - 2008) + chr(0b110110) + chr(0b101110 + 0o10), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + chr(52) + chr(277 - 222), 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(4511 - 4400) + chr(0b100110 + 0o20) + chr(0b110110), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(53) + '\060', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x35' + chr(0b110000), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xff'), chr(0b1100011 + 0o1) + chr(0b1011110 + 0o7) + '\x63' + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b100100 + 0o102) + '\055' + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def GwtC5J_eDAbX(_1vzISbJ_R2i, FfKOThdpoDTb):
((tL7r6ZE6GOf3,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\xef\x96'), chr(436 - 336) + '\x65' + chr(0b1100011) + '\x6f' + '\x64' + chr(513 - 412))(chr(0b101 + 0o160) + '\164' + chr(0b111100 + 0o52) + '\x2d' + chr(408 - 352)), FfKOThdpoDTb, nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x30', 38130 - 38122))
((Rk0MoZgJ_DYl,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\xef\x96'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(9648 - 9537) + chr(0b1100100) + chr(0b1011011 + 0o12))('\165' + '\x74' + chr(0b110111 + 0o57) + chr(45) + '\070'), FfKOThdpoDTb, _1pmtMrnaouX)
for olsbu0l6pJGv in bbT2xIe5pzk7(Rk0MoZgJ_DYl):
(eddDFOEFy2dH, _1pmtMrnaouX) = wDnuLXiThcki(FfKOThdpoDTb, _1pmtMrnaouX)
((L8rCCx0X1Ub3,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\xef\x96'), chr(2571 - 2471) + chr(0b1001001 + 0o34) + chr(0b1100011) + '\x6f' + '\144' + chr(0b1100101))(chr(117) + chr(13398 - 13282) + chr(1064 - 962) + chr(0b101101) + chr(0b100101 + 0o23)), FfKOThdpoDTb, _1pmtMrnaouX)
for olsbu0l6pJGv in bbT2xIe5pzk7(L8rCCx0X1Ub3):
((y6tm5LzgZc_E, GuX46MBAOnaQ), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\xef\x96\xab'), chr(2858 - 2758) + '\145' + chr(2678 - 2579) + chr(0b1101111) + '\144' + '\145')(chr(9041 - 8924) + '\x74' + chr(0b110000 + 0o66) + chr(0b101101) + chr(0b110010 + 0o6)), FfKOThdpoDTb, _1pmtMrnaouX)
(nmf2TsIJJ3IK, _1pmtMrnaouX) = DqkT7kVfPlbh(FfKOThdpoDTb, _1pmtMrnaouX)
((qi1wipPVvEKd,), _1pmtMrnaouX) = wYEKyn12Xlhw(roI3spqORKae(ES5oEprVxulp(b'\xef\x97'), chr(0b11011 + 0o111) + chr(0b1100101) + chr(0b1100011) + chr(0b1100110 + 0o11) + chr(0b100100 + 0o100) + chr(0b1001110 + 0o27))(chr(117) + chr(116) + chr(102) + '\055' + chr(2608 - 2552)), FfKOThdpoDTb, _1pmtMrnaouX)
yield QmR0OC47a7cN(eddDFOEFy2dH, y6tm5LzgZc_E, GuX46MBAOnaQ, nmf2TsIJJ3IK, qi1wipPVvEKd) |
ciena/afkak | afkak/_protocol.py | KafkaBootstrapProtocol.stringReceived | def stringReceived(self, response):
"""
Handle a response from the broker.
"""
correlation_id = response[0:4]
try:
d = self._pending.pop(correlation_id)
except KeyError:
self._log.warn((
"Response has unknown correlation ID {correlation_id!r}."
" Dropping connection to {peer}."
), correlation_id=correlation_id, peer=self.transport.getPeer())
self.transport.loseConnection()
else:
d.callback(response) | python | def stringReceived(self, response):
"""
Handle a response from the broker.
"""
correlation_id = response[0:4]
try:
d = self._pending.pop(correlation_id)
except KeyError:
self._log.warn((
"Response has unknown correlation ID {correlation_id!r}."
" Dropping connection to {peer}."
), correlation_id=correlation_id, peer=self.transport.getPeer())
self.transport.loseConnection()
else:
d.callback(response) | [
"def",
"stringReceived",
"(",
"self",
",",
"response",
")",
":",
"correlation_id",
"=",
"response",
"[",
"0",
":",
"4",
"]",
"try",
":",
"d",
"=",
"self",
".",
"_pending",
".",
"pop",
"(",
"correlation_id",
")",
"except",
"KeyError",
":",
"self",
".",
"_log",
".",
"warn",
"(",
"(",
"\"Response has unknown correlation ID {correlation_id!r}.\"",
"\" Dropping connection to {peer}.\"",
")",
",",
"correlation_id",
"=",
"correlation_id",
",",
"peer",
"=",
"self",
".",
"transport",
".",
"getPeer",
"(",
")",
")",
"self",
".",
"transport",
".",
"loseConnection",
"(",
")",
"else",
":",
"d",
".",
"callback",
"(",
"response",
")"
] | Handle a response from the broker. | [
"Handle",
"a",
"response",
"from",
"the",
"broker",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/_protocol.py#L78-L92 | train | Handle a response from the broker. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmqoBrCHG,GA4ANb_Tki5v,LdFlJR2ssk3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Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(592 - 544) + '\157' + '\063' + '\x31' + chr(54), 34136 - 34128), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\157' + chr(0b101 + 0o54) + chr(1712 - 1664) + chr(50), 0b1000), nzTpIcepk0o8('\x30' + chr(0b110101 + 0o72) + '\x31' + chr(2097 - 2045) + chr(0b110 + 0o61), ord("\x08")), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\x6f' + '\064' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + chr(0b110000) + chr(0b110000), 14862 - 14854), nzTpIcepk0o8(chr(637 - 589) + chr(0b1101111) + '\x36' + chr(1233 - 1183), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(55) + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + '\067' + chr(0b11000 + 0o33), 0o10), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\x6f' + chr(0b100100 + 0o15) + chr(0b110001) + '\x35', 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(111) + '\062' + '\x37', 0b1000), nzTpIcepk0o8(chr(1837 - 1789) + chr(0b1011001 + 0o26) + chr(49) + chr(55) + chr(0b11110 + 0o26), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(55) + chr(186 - 135), 7733 - 7725), nzTpIcepk0o8(chr(911 - 863) + chr(0b101110 + 0o101) + '\067' + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + '\x33' + chr(0b10110 + 0o35), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(56 - 5) + chr(0b110001) + chr(0b10000 + 0o40), 0o10), nzTpIcepk0o8(chr(710 - 662) + chr(10308 - 10197) + chr(0b1000 + 0o54) + chr(2307 - 2258), 0o10), nzTpIcepk0o8('\x30' + chr(0b1011011 + 0o24) + chr(0b101111 + 0o2) + '\x35', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(0b110001) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(9862 - 9751) + chr(51) + chr(55) + chr(0b101011 + 0o11), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(54) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + chr(0b110110) + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(0b110010 + 0o75) + chr(851 - 801), 0o10), nzTpIcepk0o8('\060' + chr(0b1001111 + 0o40) + chr(0b101111 + 0o3) + chr(0b101011 + 0o12) + '\x34', 40913 - 40905), nzTpIcepk0o8(chr(606 - 558) + chr(0b1001101 + 0o42) + '\x31' + '\061' + '\067', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(0b101111 + 0o5) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2150 - 2100) + '\x34' + chr(0b110001 + 0o5), 47279 - 47271), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10100 + 0o36) + '\x33' + chr(0b11110 + 0o23), 0o10), nzTpIcepk0o8(chr(657 - 609) + '\157' + chr(49) + chr(49) + chr(2183 - 2133), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b110011) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + '\061' + chr(830 - 781), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + '\x37' + chr(0b110100), 8), nzTpIcepk0o8(chr(2095 - 2047) + chr(111) + chr(0b110010) + chr(48) + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(1847 - 1799) + chr(0b11100 + 0o123) + '\x37' + chr(0b100011 + 0o23), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(858 - 808) + chr(629 - 575) + chr(0b1010 + 0o51), 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + '\x31' + chr(48), 0o10), nzTpIcepk0o8(chr(1674 - 1626) + '\x6f' + chr(0b11100 + 0o26) + chr(0b100011 + 0o23) + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1111 + 0o50) + chr(0b100 + 0o61), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(0b1111 + 0o42) + chr(2271 - 2223), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\157' + chr(53) + chr(0b101001 + 0o7), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe0'), chr(3153 - 3053) + '\x65' + chr(0b1100011) + chr(0b111 + 0o150) + chr(9758 - 9658) + chr(0b1100101))('\x75' + chr(10003 - 9887) + '\x66' + chr(581 - 536) + chr(0b1101 + 0o53)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def O9JHTvkGLuLv(hXMPsSrOQzbh, k2zzaFDtbuhL):
tL7r6ZE6GOf3 = k2zzaFDtbuhL[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\060', 0b1000):nzTpIcepk0o8(chr(48) + chr(10173 - 10062) + chr(52), ord("\x08"))]
try:
vPPlOXQgR3SM = hXMPsSrOQzbh._pending.uC_Yoybx7J0I(tL7r6ZE6GOf3)
except knUxyjfq07F9:
roI3spqORKae(hXMPsSrOQzbh._log, roI3spqORKae(ES5oEprVxulp(b'\xbd\x086q\xdfz\x0f\xa8tq\x1bA'), chr(676 - 576) + '\145' + '\143' + '\157' + chr(100) + chr(0b1100101))(chr(4532 - 4415) + '\x74' + chr(0b1100110) + '\x2d' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b"\x9c'\x14W\xef\\\r\x9em\x7f\x1dH\x1e\xae\xa6Jc&\x8bXSa\xc3=\xd0\xc3\xf5+-cf\x92\xa3\\z\x93s\xd2R\xfa\xbc'\x0bF\xf4[\x11\x95\x12~\x18\x1aL\xa6\xe6\x01I;\x93F\x03k\xc2(\x82\xc5\xf6$7oj\x88\xeazP\x93|\xde\x1d\xf3\xbe'\x02U\xfd\x1c"), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(0b101000 + 0o74) + chr(101))(chr(0b100111 + 0o116) + '\x74' + chr(0b1100101 + 0o1) + '\055' + chr(0b111000)), correlation_id=tL7r6ZE6GOf3, peer=roI3spqORKae(hXMPsSrOQzbh.transport, roI3spqORKae(ES5oEprVxulp(b"\xa9'\x13w\xe5W\x0c"), '\x64' + chr(0b1100101) + chr(0b100011 + 0o100) + '\157' + '\x64' + chr(0b1100101))(chr(4318 - 4201) + '\x74' + chr(10175 - 10073) + '\055' + '\070'))())
roI3spqORKae(hXMPsSrOQzbh.transport, roI3spqORKae(ES5oEprVxulp(b'\xa2-\x14B\xc3]\x10\x95(t\x08RQ\xb5'), chr(7795 - 7695) + '\x65' + '\143' + chr(0b110101 + 0o72) + chr(0b1100100) + chr(0b111000 + 0o55))(chr(202 - 85) + chr(0b1110100) + chr(0b1000010 + 0o44) + chr(45) + '\070'))()
else:
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\xa4\x05Rl\xd5\x06+\xae\ny\x17\x0e'), chr(100) + chr(0b1100101) + '\143' + '\157' + chr(100) + '\145')(chr(0b1001000 + 0o55) + chr(2267 - 2151) + chr(0b101011 + 0o73) + chr(0b101101) + chr(0b111000)))(k2zzaFDtbuhL) |
ciena/afkak | afkak/_protocol.py | KafkaBootstrapProtocol.connectionLost | def connectionLost(self, reason=connectionDone):
"""
Mark the protocol as failed and fail all pending operations.
"""
self._failed = reason
pending, self._pending = self._pending, None
for d in pending.values():
d.errback(reason) | python | def connectionLost(self, reason=connectionDone):
"""
Mark the protocol as failed and fail all pending operations.
"""
self._failed = reason
pending, self._pending = self._pending, None
for d in pending.values():
d.errback(reason) | [
"def",
"connectionLost",
"(",
"self",
",",
"reason",
"=",
"connectionDone",
")",
":",
"self",
".",
"_failed",
"=",
"reason",
"pending",
",",
"self",
".",
"_pending",
"=",
"self",
".",
"_pending",
",",
"None",
"for",
"d",
"in",
"pending",
".",
"values",
"(",
")",
":",
"d",
".",
"errback",
"(",
"reason",
")"
] | Mark the protocol as failed and fail all pending operations. | [
"Mark",
"the",
"protocol",
"as",
"failed",
"and",
"fail",
"all",
"pending",
"operations",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/_protocol.py#L94-L101 | train | Mark the protocol as failed and fail all pending operations. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJ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Fas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\x6f' + chr(1975 - 1924) + '\060' + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + '\063', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1349 - 1299) + chr(48) + chr(0b110010), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1001001 + 0o46) + chr(589 - 540) + '\062' + chr(2645 - 2593), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(5909 - 5798) + chr(0b110010) + chr(402 - 354) + '\066', 0b1000), nzTpIcepk0o8('\x30' + chr(0b100010 + 0o115) + chr(0b110010) + '\064' + chr(52), 19489 - 19481), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(381 - 270) + chr(1533 - 1483) + chr(930 - 877) + chr(321 - 267), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1101111) + chr(49) + chr(2234 - 2182) + chr(2567 - 2513), 0b1000), nzTpIcepk0o8(chr(1873 - 1825) + chr(12037 - 11926) + chr(0b110011) + '\062' + chr(0b100000 + 0o26), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(833 - 778) + chr(0b101000 + 0o11), 0b1000), nzTpIcepk0o8('\x30' + chr(0b101111 + 0o100) + chr(0b11110 + 0o24) + chr(1515 - 1465) + chr(0b100101 + 0o13), 45301 - 45293), nzTpIcepk0o8(chr(48) + chr(0b100101 + 0o112) + chr(0b0 + 0o61) + chr(0b110111) + '\x31', 45759 - 45751), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(0b1010 + 0o47), 29586 - 29578), nzTpIcepk0o8(chr(0b110000) + chr(0b1010100 + 0o33) + chr(0b101111 + 0o3) + chr(0b110011) + chr(0b10111 + 0o33), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + chr(0b110100) + chr(52), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(0b1001 + 0o52) + '\x36' + chr(53), 37608 - 37600), nzTpIcepk0o8(chr(306 - 258) + '\157' + chr(0b110010) + '\x37' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(536 - 488) + '\157' + chr(54) + chr(51), 2802 - 2794), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + '\060' + '\x33', 10428 - 10420), nzTpIcepk0o8(chr(1901 - 1853) + '\x6f' + chr(582 - 531) + '\x33' + chr(54), 53468 - 53460), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1975 - 1923) + chr(89 - 36), 62840 - 62832), nzTpIcepk0o8(chr(864 - 816) + chr(0b1101111) + '\062' + '\065' + '\x31', 24256 - 24248), nzTpIcepk0o8(chr(0b110000) + chr(0b110110 + 0o71) + '\x32' + chr(0b10010 + 0o42) + chr(0b110110), 36956 - 36948), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(11010 - 10899) + chr(49) + chr(53) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(48) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1000001 + 0o56) + chr(49) + '\066' + chr(0b10110 + 0o34), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(1780 - 1729) + chr(48), 0b1000), nzTpIcepk0o8(chr(65 - 17) + '\157' + chr(0b110 + 0o54) + chr(617 - 566) + chr(0b1100 + 0o52), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1949 - 1899) + '\x31' + chr(53), 13706 - 13698), nzTpIcepk0o8('\060' + chr(1534 - 1423) + chr(49) + '\065' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(794 - 746) + '\157' + '\061' + chr(0b110000) + chr(2379 - 2327), 27665 - 27657), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(10658 - 10547) + chr(1658 - 1604) + chr(52), 61591 - 61583), nzTpIcepk0o8(chr(48) + chr(0b11011 + 0o124) + '\061' + '\062' + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(2436 - 2325) + chr(49) + chr(49) + chr(0b110000 + 0o2), 0b1000), nzTpIcepk0o8(chr(1513 - 1465) + '\157' + chr(0b10001 + 0o40) + chr(273 - 223), 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\157' + chr(0b101110 + 0o3) + chr(48) + chr(0b11001 + 0o32), 0o10), nzTpIcepk0o8(chr(1505 - 1457) + '\x6f' + chr(51) + '\060' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8466 - 8355) + '\x37' + chr(54), 49120 - 49112), nzTpIcepk0o8('\x30' + chr(11157 - 11046) + chr(0b110010) + '\060' + chr(48), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + chr(0b100 + 0o61) + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xef'), chr(0b111000 + 0o54) + chr(0b1100101) + chr(99) + chr(0b1101111) + '\144' + '\145')(chr(117) + chr(116) + chr(102) + chr(45) + chr(0b110000 + 0o10)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def origEX5kac_R(hXMPsSrOQzbh, RhxFF63tBU4y=GU9Plxy8qail):
hXMPsSrOQzbh.RZMb0jmUK9G1 = RhxFF63tBU4y
(JMYeJ43DEEmg, hXMPsSrOQzbh.oKLqxMOPKaHG) = (hXMPsSrOQzbh.oKLqxMOPKaHG, None)
for vPPlOXQgR3SM in roI3spqORKae(JMYeJ43DEEmg, roI3spqORKae(ES5oEprVxulp(b'\x82`\xed0\xdc\xee\xe6P\xae\x00\xc4\x01'), '\x64' + '\145' + chr(0b111110 + 0o45) + chr(7307 - 7196) + chr(100) + '\145')('\x75' + chr(0b110 + 0o156) + chr(0b111 + 0o137) + chr(0b11100 + 0o21) + chr(0b111000)))():
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\x89p\xb3l\xc0\x94\xebV\xa6~\xdf8'), chr(100) + chr(5663 - 5562) + '\x63' + chr(0b1101111) + chr(0b11001 + 0o113) + chr(0b10000 + 0o125))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b10000 + 0o35) + '\x38'))(RhxFF63tBU4y) |
ciena/afkak | afkak/_protocol.py | KafkaBootstrapProtocol.request | def request(self, request):
"""
Send a request to the Kafka broker.
:param bytes request:
The bytes of a Kafka `RequestMessage`_ structure. It must have
a unique (to this connection) correlation ID.
:returns:
`Deferred` which will:
- Succeed with the bytes of a Kafka `ResponseMessage`_
- Fail when the connection terminates
.. _RequestMessage:: https://kafka.apache.org/protocol.html#protocol_messages
"""
if self._failed is not None:
return fail(self._failed)
correlation_id = request[4:8]
assert correlation_id not in self._pending
d = Deferred()
self.sendString(request)
self._pending[correlation_id] = d
return d | python | def request(self, request):
"""
Send a request to the Kafka broker.
:param bytes request:
The bytes of a Kafka `RequestMessage`_ structure. It must have
a unique (to this connection) correlation ID.
:returns:
`Deferred` which will:
- Succeed with the bytes of a Kafka `ResponseMessage`_
- Fail when the connection terminates
.. _RequestMessage:: https://kafka.apache.org/protocol.html#protocol_messages
"""
if self._failed is not None:
return fail(self._failed)
correlation_id = request[4:8]
assert correlation_id not in self._pending
d = Deferred()
self.sendString(request)
self._pending[correlation_id] = d
return d | [
"def",
"request",
"(",
"self",
",",
"request",
")",
":",
"if",
"self",
".",
"_failed",
"is",
"not",
"None",
":",
"return",
"fail",
"(",
"self",
".",
"_failed",
")",
"correlation_id",
"=",
"request",
"[",
"4",
":",
"8",
"]",
"assert",
"correlation_id",
"not",
"in",
"self",
".",
"_pending",
"d",
"=",
"Deferred",
"(",
")",
"self",
".",
"sendString",
"(",
"request",
")",
"self",
".",
"_pending",
"[",
"correlation_id",
"]",
"=",
"d",
"return",
"d"
] | Send a request to the Kafka broker.
:param bytes request:
The bytes of a Kafka `RequestMessage`_ structure. It must have
a unique (to this connection) correlation ID.
:returns:
`Deferred` which will:
- Succeed with the bytes of a Kafka `ResponseMessage`_
- Fail when the connection terminates
.. _RequestMessage:: https://kafka.apache.org/protocol.html#protocol_messages | [
"Send",
"a",
"request",
"to",
"the",
"Kafka",
"broker",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/_protocol.py#L110-L134 | train | Send a request to the Kafka broker. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6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cUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(50) + '\067', 0o10), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + chr(50) + '\066' + chr(2274 - 2224), 10839 - 10831), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10 + 0o62) + chr(524 - 474), ord("\x08")), nzTpIcepk0o8(chr(400 - 352) + chr(111) + chr(0b110001) + '\x35' + '\062', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(53) + chr(1461 - 1406), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101110 + 0o3), 0b1000), nzTpIcepk0o8(chr(488 - 440) + chr(8117 - 8006) + chr(49) + chr(0b101101 + 0o4) + chr(55), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x31' + '\061' + chr(2317 - 2264), 62690 - 62682), nzTpIcepk0o8(chr(515 - 467) + '\157' + chr(0b110010) + chr(53) + chr(0b110110), 47888 - 47880), nzTpIcepk0o8('\060' + chr(0b110011 + 0o74) + chr(0b1 + 0o60) + chr(0b110100 + 0o0) + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b1110 + 0o44) + chr(1179 - 1131) + chr(1750 - 1697), 14478 - 14470), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + '\x34' + chr(0b110011 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(1086 - 1038) + chr(0b1101111) + '\067' + '\067', 30903 - 30895), nzTpIcepk0o8(chr(632 - 584) + chr(8964 - 8853) + chr(0b100 + 0o63) + '\060', 14890 - 14882), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(0b110100) + chr(0b110010), 17243 - 17235), nzTpIcepk0o8('\060' + chr(0b111111 + 0o60) + chr(0b110001) + chr(0b110110) + chr(1021 - 969), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + '\x32' + '\067', 8), nzTpIcepk0o8(chr(788 - 740) + chr(3481 - 3370) + chr(0b110001) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(0b110001) + chr(53) + chr(0b110 + 0o53), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + chr(0b110000) + chr(1623 - 1570), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1100011 + 0o14) + chr(1167 - 1116) + chr(53) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b111110 + 0o61) + chr(0b10100 + 0o40) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b1100 + 0o44) + chr(0b110010), 42437 - 42429), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + '\063' + chr(0b110 + 0o57), 21706 - 21698), nzTpIcepk0o8(chr(0b110 + 0o52) + '\157' + chr(0b110001) + chr(54) + chr(0b10100 + 0o41), 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + '\061' + chr(0b110000 + 0o3) + chr(0b110011), 30251 - 30243), nzTpIcepk0o8(chr(2252 - 2204) + chr(2629 - 2518) + chr(0b110111) + '\061', 6761 - 6753), nzTpIcepk0o8('\060' + chr(5065 - 4954) + '\062' + '\x31', 23665 - 23657), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11000 + 0o31) + '\x36' + chr(0b101101 + 0o4), 0o10), nzTpIcepk0o8(chr(939 - 891) + chr(0b1101111) + chr(0b101100 + 0o13) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(2215 - 2167) + '\157' + '\062' + '\064' + chr(0b110000 + 0o4), 0o10), nzTpIcepk0o8(chr(2248 - 2200) + chr(0b1101111) + chr(0b10011 + 0o36) + '\x37' + '\066', 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\157' + chr(51) + chr(55) + '\061', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x36' + chr(0b10001 + 0o43), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(54) + chr(551 - 502), 0o10), nzTpIcepk0o8('\060' + '\157' + '\067' + '\061', 8), nzTpIcepk0o8(chr(48) + chr(5400 - 5289) + '\x31' + '\x34' + '\x37', 28902 - 28894), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + chr(0b110010) + chr(0b1110 + 0o47) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + chr(474 - 420), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(0b11010 + 0o32) + '\x31', 31161 - 31153)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\065' + chr(1729 - 1681), 58296 - 58288)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf9'), chr(0b1010111 + 0o15) + chr(0b1010111 + 0o16) + chr(0b1000010 + 0o41) + chr(6270 - 6159) + chr(100) + chr(3127 - 3026))(chr(117) + '\x74' + chr(0b1100110) + chr(45) + chr(504 - 448)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def fXJOkxXvZqV_(hXMPsSrOQzbh, fXJOkxXvZqV_):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x85\xe8o\x08\x9fk"\x18\xe5\\\xc2W'), chr(0b1111 + 0o125) + chr(8543 - 8442) + chr(0b1100011) + '\x6f' + '\x64' + chr(101))(chr(117) + chr(0b101011 + 0o111) + '\x66' + chr(1249 - 1204) + chr(0b111000))) is not None:
return qbbHsF4hIzMe(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x85\xe8o\x08\x9fk"\x18\xe5\\\xc2W'), chr(5652 - 5552) + chr(101) + chr(0b1110 + 0o125) + chr(111) + chr(100) + chr(0b1000100 + 0o41))(chr(7899 - 7782) + chr(116) + '\x66' + chr(0b100001 + 0o14) + chr(0b111000))))
tL7r6ZE6GOf3 = fXJOkxXvZqV_[nzTpIcepk0o8('\x30' + chr(111) + chr(52), 36985 - 36977):nzTpIcepk0o8('\060' + chr(0b1011001 + 0o26) + '\x31' + '\x30', 8)]
assert tL7r6ZE6GOf3 not in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb8\xf9n\x1b\xd7L\x00\x1d\xe5\x04\xcd!'), '\x64' + chr(0b1100101) + chr(1688 - 1589) + chr(0b1101111) + '\x64' + '\145')(chr(0b11110 + 0o127) + '\x74' + chr(0b1100110) + '\x2d' + chr(0b1110 + 0o52)))
vPPlOXQgR3SM = LbNAbjjo5q4l()
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa4\xd7L\x0e\xfcu=$\xc0\x02'), chr(8717 - 8617) + '\145' + chr(99) + chr(111) + chr(0b1100001 + 0o3) + chr(0b100011 + 0o102))(chr(3521 - 3404) + '\x74' + chr(3212 - 3110) + chr(45) + chr(0b111000)))(fXJOkxXvZqV_)
hXMPsSrOQzbh.oKLqxMOPKaHG[tL7r6ZE6GOf3] = vPPlOXQgR3SM
return vPPlOXQgR3SM |
ciena/afkak | afkak/producer.py | Producer.send_messages | def send_messages(self, topic, key=None, msgs=()):
"""
Given a topic, and optional key (for partitioning) and a list of
messages, send them to Kafka, either immediately, or when a batch is
ready, depending on the Producer's batch settings.
:param str topic: Kafka topic to send the messages to
:param str key:
Message key used to determine the topic partition to which the
messages will be written. Either `bytes` or `None`.
`None` means that there is no key, but note that that:
- Kafka does not permit producing unkeyed messages to a compacted topic.
- The *partitioner_class* may require a non-`None` key
(`HashedPartitioner` does so).
:param list msgs:
A non-empty sequence of message bytestrings to send. `None`
indicates a ``null`` message (i.e. a tombstone on a compacted
topic).
:returns:
A :class:`~twisted.internet.defer.Deferred` that fires when the
messages have been received by the Kafka cluster.
It will fail with `TypeError` when:
- *topic* is not text (`str` on Python 3, `str` or `unicode` on Python 2)
- *key* is not `bytes` or `None`
- *msgs* is not a sequence of `bytes` or `None`
It will fail with `ValueError` when *msgs* is empty.
"""
try:
topic = _coerce_topic(topic)
if key is not None and not isinstance(key, bytes):
raise TypeError('key={!r} must be bytes or None'.format(key))
if not msgs:
raise ValueError("msgs must be a non-empty sequence")
msg_cnt = len(msgs)
byte_cnt = 0
for index, m in enumerate(msgs):
if m is None:
continue
if not isinstance(m, bytes):
raise TypeError('Message {} to topic {} ({!r:.100}) has type {}, but must have type {}'.format(
index, topic, m, type(m).__name__, type(bytes).__name__))
byte_cnt += len(m)
except Exception:
return fail()
d = Deferred(self._cancel_send_messages)
self._batch_reqs.append(SendRequest(topic, key, msgs, d))
self._waitingMsgCount += msg_cnt
self._waitingByteCount += byte_cnt
# Add request to list of outstanding reqs' callback to remove
self._outstanding.append(d)
d.addBoth(self._remove_from_outstanding, d)
# See if we have enough messages in the batch to do a send.
self._check_send_batch()
return d | python | def send_messages(self, topic, key=None, msgs=()):
"""
Given a topic, and optional key (for partitioning) and a list of
messages, send them to Kafka, either immediately, or when a batch is
ready, depending on the Producer's batch settings.
:param str topic: Kafka topic to send the messages to
:param str key:
Message key used to determine the topic partition to which the
messages will be written. Either `bytes` or `None`.
`None` means that there is no key, but note that that:
- Kafka does not permit producing unkeyed messages to a compacted topic.
- The *partitioner_class* may require a non-`None` key
(`HashedPartitioner` does so).
:param list msgs:
A non-empty sequence of message bytestrings to send. `None`
indicates a ``null`` message (i.e. a tombstone on a compacted
topic).
:returns:
A :class:`~twisted.internet.defer.Deferred` that fires when the
messages have been received by the Kafka cluster.
It will fail with `TypeError` when:
- *topic* is not text (`str` on Python 3, `str` or `unicode` on Python 2)
- *key* is not `bytes` or `None`
- *msgs* is not a sequence of `bytes` or `None`
It will fail with `ValueError` when *msgs* is empty.
"""
try:
topic = _coerce_topic(topic)
if key is not None and not isinstance(key, bytes):
raise TypeError('key={!r} must be bytes or None'.format(key))
if not msgs:
raise ValueError("msgs must be a non-empty sequence")
msg_cnt = len(msgs)
byte_cnt = 0
for index, m in enumerate(msgs):
if m is None:
continue
if not isinstance(m, bytes):
raise TypeError('Message {} to topic {} ({!r:.100}) has type {}, but must have type {}'.format(
index, topic, m, type(m).__name__, type(bytes).__name__))
byte_cnt += len(m)
except Exception:
return fail()
d = Deferred(self._cancel_send_messages)
self._batch_reqs.append(SendRequest(topic, key, msgs, d))
self._waitingMsgCount += msg_cnt
self._waitingByteCount += byte_cnt
# Add request to list of outstanding reqs' callback to remove
self._outstanding.append(d)
d.addBoth(self._remove_from_outstanding, d)
# See if we have enough messages in the batch to do a send.
self._check_send_batch()
return d | [
"def",
"send_messages",
"(",
"self",
",",
"topic",
",",
"key",
"=",
"None",
",",
"msgs",
"=",
"(",
")",
")",
":",
"try",
":",
"topic",
"=",
"_coerce_topic",
"(",
"topic",
")",
"if",
"key",
"is",
"not",
"None",
"and",
"not",
"isinstance",
"(",
"key",
",",
"bytes",
")",
":",
"raise",
"TypeError",
"(",
"'key={!r} must be bytes or None'",
".",
"format",
"(",
"key",
")",
")",
"if",
"not",
"msgs",
":",
"raise",
"ValueError",
"(",
"\"msgs must be a non-empty sequence\"",
")",
"msg_cnt",
"=",
"len",
"(",
"msgs",
")",
"byte_cnt",
"=",
"0",
"for",
"index",
",",
"m",
"in",
"enumerate",
"(",
"msgs",
")",
":",
"if",
"m",
"is",
"None",
":",
"continue",
"if",
"not",
"isinstance",
"(",
"m",
",",
"bytes",
")",
":",
"raise",
"TypeError",
"(",
"'Message {} to topic {} ({!r:.100}) has type {}, but must have type {}'",
".",
"format",
"(",
"index",
",",
"topic",
",",
"m",
",",
"type",
"(",
"m",
")",
".",
"__name__",
",",
"type",
"(",
"bytes",
")",
".",
"__name__",
")",
")",
"byte_cnt",
"+=",
"len",
"(",
"m",
")",
"except",
"Exception",
":",
"return",
"fail",
"(",
")",
"d",
"=",
"Deferred",
"(",
"self",
".",
"_cancel_send_messages",
")",
"self",
".",
"_batch_reqs",
".",
"append",
"(",
"SendRequest",
"(",
"topic",
",",
"key",
",",
"msgs",
",",
"d",
")",
")",
"self",
".",
"_waitingMsgCount",
"+=",
"msg_cnt",
"self",
".",
"_waitingByteCount",
"+=",
"byte_cnt",
"# Add request to list of outstanding reqs' callback to remove",
"self",
".",
"_outstanding",
".",
"append",
"(",
"d",
")",
"d",
".",
"addBoth",
"(",
"self",
".",
"_remove_from_outstanding",
",",
"d",
")",
"# See if we have enough messages in the batch to do a send.",
"self",
".",
"_check_send_batch",
"(",
")",
"return",
"d"
] | Given a topic, and optional key (for partitioning) and a list of
messages, send them to Kafka, either immediately, or when a batch is
ready, depending on the Producer's batch settings.
:param str topic: Kafka topic to send the messages to
:param str key:
Message key used to determine the topic partition to which the
messages will be written. Either `bytes` or `None`.
`None` means that there is no key, but note that that:
- Kafka does not permit producing unkeyed messages to a compacted topic.
- The *partitioner_class* may require a non-`None` key
(`HashedPartitioner` does so).
:param list msgs:
A non-empty sequence of message bytestrings to send. `None`
indicates a ``null`` message (i.e. a tombstone on a compacted
topic).
:returns:
A :class:`~twisted.internet.defer.Deferred` that fires when the
messages have been received by the Kafka cluster.
It will fail with `TypeError` when:
- *topic* is not text (`str` on Python 3, `str` or `unicode` on Python 2)
- *key* is not `bytes` or `None`
- *msgs* is not a sequence of `bytes` or `None`
It will fail with `ValueError` when *msgs* is empty. | [
"Given",
"a",
"topic",
"and",
"optional",
"key",
"(",
"for",
"partitioning",
")",
"and",
"a",
"list",
"of",
"messages",
"send",
"them",
"to",
"Kafka",
"either",
"immediately",
"or",
"when",
"a",
"batch",
"is",
"ready",
"depending",
"on",
"the",
"Producer",
"s",
"batch",
"settings",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/producer.py#L166-L233 | train | Sends a list of messages to Kafka. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,K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Rngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b0 + 0o157) + chr(0b110010) + chr(0b110110) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + '\064' + chr(50), 55023 - 55015), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(685 - 574) + '\x32' + chr(0b100100 + 0o14) + chr(0b11 + 0o61), 17802 - 17794), nzTpIcepk0o8(chr(1741 - 1693) + '\157' + chr(0b110011) + '\061' + chr(0b110001), 19605 - 19597), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(0b10101 + 0o33) + '\060', 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(3817 - 3706) + chr(50) + '\x37' + chr(1771 - 1716), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(4974 - 4863) + chr(1982 - 1931) + '\063' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(0b110001) + '\x33', 65393 - 65385), nzTpIcepk0o8(chr(48) + chr(10085 - 9974) + chr(455 - 405) + chr(50) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\157' + chr(0b110001) + '\x33' + chr(0b101011 + 0o7), 37636 - 37628), nzTpIcepk0o8(chr(0b110000) + chr(123 - 12) + chr(1672 - 1621) + chr(808 - 755) + chr(0b110011), 36059 - 36051), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110100) + chr(596 - 544), 43552 - 43544), nzTpIcepk0o8(chr(560 - 512) + '\x6f' + chr(0b110001) + '\x30' + chr(53), 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1000010 + 0o55) + '\062' + chr(0b101111 + 0o5) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(1424 - 1313) + '\x32' + chr(1630 - 1581) + '\x30', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b101111 + 0o4) + '\065' + chr(0b10111 + 0o37), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1746 - 1696) + chr(0b110101) + chr(0b11010 + 0o26), 52930 - 52922), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + chr(1950 - 1900) + chr(0b110110) + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(521 - 466) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(51) + '\066', 0o10), nzTpIcepk0o8(chr(1775 - 1727) + chr(0b111 + 0o150) + '\x31' + chr(201 - 146), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\063' + chr(0b10 + 0o63) + chr(0b100010 + 0o20), 52584 - 52576), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1100 + 0o51) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b0 + 0o62) + chr(0b1000 + 0o52) + chr(48), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(51) + '\067' + chr(1777 - 1722), 49202 - 49194), nzTpIcepk0o8(chr(0b110000) + chr(0b1010001 + 0o36) + chr(51) + '\060' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2389 - 2339) + '\066' + chr(2374 - 2325), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(1095 - 1046) + chr(0b100000 + 0o27), 0o10), nzTpIcepk0o8('\x30' + chr(0b1001011 + 0o44) + '\061' + chr(0b110001) + chr(0b11101 + 0o25), 50212 - 50204), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(0b101110 + 0o2) + '\x36', 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + chr(0b110011) + '\065' + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111 + 0o0) + chr(50) + chr(0b1011 + 0o46) + '\x34', 38858 - 38850), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(0b110000) + chr(0b1101 + 0o52), 28396 - 28388), nzTpIcepk0o8(chr(48) + '\x6f' + chr(570 - 519), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(10224 - 10113) + chr(0b110001) + '\x34' + chr(883 - 832), 53696 - 53688), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\157' + chr(0b101100 + 0o11) + chr(249 - 195), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + chr(49), 8), nzTpIcepk0o8(chr(0b110000) + chr(10404 - 10293) + chr(51) + chr(52) + '\062', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + '\x34' + '\064', 11390 - 11382)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(939 - 886) + chr(1879 - 1831), 58000 - 57992)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'?'), chr(0b1100100) + chr(10171 - 10070) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(0b1001000 + 0o35))(chr(13283 - 13166) + chr(116) + chr(0b1100110 + 0o0) + '\x2d' + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def _4D911uXOCmb(hXMPsSrOQzbh, eddDFOEFy2dH, QYodcsDtoGq7=None, JwoaGf5NPDhM=()):
try:
eddDFOEFy2dH = xp7x5NJ9xoUC(eddDFOEFy2dH)
if QYodcsDtoGq7 is not None and (not suIjIS24Zkqw(QYodcsDtoGq7, QNQS9e6tJqMV)):
raise jZIjKu8IFANs(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'z\xd2\xdb\xb9\xb2\xe1\xcd\xa7\xeb\xfa/\x98Pe\xc3\xed\xce\xca\xc9\x0f\xfb|\xcaF\xe2\xdf\x8f\xde!/'), chr(0b1100100 + 0o0) + chr(2313 - 2212) + chr(0b100101 + 0o76) + chr(111) + chr(100) + chr(0b1100101))(chr(117) + chr(0b111 + 0o155) + chr(5633 - 5531) + chr(599 - 554) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'`\x84\x91\xcf\x8e\xf3\xd9\xb5\x9a\xc8\x19\xa1'), chr(100) + '\145' + '\x63' + chr(0b1101111) + chr(4004 - 3904) + chr(0b11000 + 0o115))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(1995 - 1950) + chr(0b110100 + 0o4)))(QYodcsDtoGq7))
if not JwoaGf5NPDhM:
raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'|\xc4\xc5\xf7\xe9\xad\xca\xa9\xbf\xb78\x8e\x04$\x81\xe6\x81\xc6\x9d\x1e\xf3\x7f\x9eP\xb0\x8c\xa4\xc0:/\xe8\x8b\xe9'), chr(0b1100100) + chr(0b100010 + 0o103) + '\x63' + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(102) + chr(0b11010 + 0o23) + chr(56)))
f4S5lkbC3F5b = ftfygxgFas5X(JwoaGf5NPDhM)
a_yL22R0o3M6 = nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x30', 0b1000)
for (ZpfN5tSLaZze, tF75nqoNENFL) in _kV_Bomx8PZ4(JwoaGf5NPDhM):
if tF75nqoNENFL is None:
continue
if not suIjIS24Zkqw(tF75nqoNENFL, QNQS9e6tJqMV):
raise jZIjKu8IFANs(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\\\xd2\xd1\xf7\xa8\xa7\xda\xfa\xb0\xeaz\x9fKe\xd5\xe7\x9e\xc1\xd3[\xe5r\xca\x01\xeb\xde\xb3\x8ba{\xb6\xd8\xf1\xee#\x0bOb\xc2\x90h\xc7\xc7\xa4\xb2\xbd\x93\xfa\xa9\xe2.\xcbI0\xd2\xfc\xce\xc0\xd1\r\xfb/\x9eP\xe0\x9a\xe1\xca2'), chr(1912 - 1812) + chr(0b1100011 + 0o2) + chr(0b1100011) + chr(0b1001000 + 0o47) + chr(6236 - 6136) + chr(9102 - 9001))(chr(0b11111 + 0o126) + chr(2422 - 2306) + '\x66' + chr(273 - 228) + chr(1719 - 1663)), roI3spqORKae(ES5oEprVxulp(b'`\x84\x91\xcf\x8e\xf3\xd9\xb5\x9a\xc8\x19\xa1'), chr(0b1100100) + chr(0b1100101) + chr(3114 - 3015) + '\157' + chr(100) + chr(0b111001 + 0o54))('\165' + chr(0b1110100) + chr(0b1100110) + chr(1014 - 969) + chr(0b100011 + 0o25)))(ZpfN5tSLaZze, eddDFOEFy2dH, tF75nqoNENFL, roI3spqORKae(MJ07XsN5uFgW(tF75nqoNENFL), roI3spqORKae(ES5oEprVxulp(b'P\xee\xd6\xc0\x9b\xac\xce\xbf\x9b\xa7.\x9a'), chr(0b1101 + 0o127) + chr(0b111011 + 0o52) + chr(0b1100011) + '\157' + '\x64' + chr(0b1100101))(chr(117) + '\164' + chr(0b1100110) + chr(0b101101) + '\x38')), roI3spqORKae(MJ07XsN5uFgW(QNQS9e6tJqMV), roI3spqORKae(ES5oEprVxulp(b'P\xee\xd6\xc0\x9b\xac\xce\xbf\x9b\xa7.\x9a'), chr(100) + chr(0b1100101) + '\x63' + chr(10850 - 10739) + '\144' + '\145')('\165' + '\164' + chr(0b1100000 + 0o6) + chr(0b11010 + 0o23) + chr(0b111000)))))
a_yL22R0o3M6 += ftfygxgFas5X(tF75nqoNENFL)
except zfo2Sgkz3IVJ:
return qbbHsF4hIzMe()
vPPlOXQgR3SM = LbNAbjjo5q4l(hXMPsSrOQzbh._cancel_send_messages)
roI3spqORKae(hXMPsSrOQzbh._batch_reqs, roI3spqORKae(ES5oEprVxulp(b'Y\xe3\xf1\xb0\xb1\xa7\xf8\xb5\xa1\xf8\x0f\xde'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(100) + '\x65')(chr(117) + '\164' + '\x66' + chr(0b101000 + 0o5) + chr(0b110110 + 0o2)))(aexqMYfyFKs9(eddDFOEFy2dH, QYodcsDtoGq7, JwoaGf5NPDhM, vPPlOXQgR3SM))
hXMPsSrOQzbh.I1S60rCTS5AK += f4S5lkbC3F5b
hXMPsSrOQzbh.FBcPL8ci3jzC += a_yL22R0o3M6
roI3spqORKae(hXMPsSrOQzbh._outstanding, roI3spqORKae(ES5oEprVxulp(b'Y\xe3\xf1\xb0\xb1\xa7\xf8\xb5\xa1\xf8\x0f\xde'), '\x64' + chr(0b1100101) + '\x63' + chr(0b1010110 + 0o31) + chr(100) + chr(0b101101 + 0o70))(chr(0b1001100 + 0o51) + chr(0b1011111 + 0o25) + chr(0b1000000 + 0o46) + chr(45) + chr(0b111000)))(vPPlOXQgR3SM)
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'p\xd3\xc6\xc6\xa6\xb4\xd7'), chr(100) + '\145' + chr(0b1011100 + 0o7) + chr(9260 - 9149) + chr(1979 - 1879) + chr(101))('\x75' + '\164' + chr(0b1100110) + chr(0b101101) + chr(564 - 508)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'N\xc5\xc7\xe9\xa6\xb6\xda\x85\xad\xe55\x86{*\xd4\xfc\x9d\xdc\xd1\x15\xfaf\x84N'), '\x64' + '\145' + chr(99) + chr(0b1101111) + chr(6284 - 6184) + '\145')(chr(6927 - 6810) + '\x74' + chr(102) + chr(0b1010 + 0o43) + chr(56))), vPPlOXQgR3SM)
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'N\xd4\xca\xe1\xaa\xab\xe0\xa9\xae\xf9>\xb4F$\xd5\xeb\x86'), chr(0b1100100) + chr(0b101111 + 0o66) + chr(0b100111 + 0o74) + chr(0b1101111) + chr(0b111101 + 0o47) + chr(3177 - 3076))(chr(117) + chr(116) + chr(0b1100110) + chr(45) + '\070'))()
return vPPlOXQgR3SM |
ciena/afkak | afkak/producer.py | Producer.stop | def stop(self):
"""
Terminate any outstanding requests.
:returns: :class:``Deferred` which fires when fully stopped.
"""
self.stopping = True
# Cancel any outstanding request to our client
if self._batch_send_d:
self._batch_send_d.cancel()
# Do we have to worry about our looping call?
if self.batch_every_t is not None:
# Stop our looping call, and wait for the deferred to be called
if self._sendLooper is not None:
self._sendLooper.stop()
# Make sure requests that wasn't cancelled above are now
self._cancel_outstanding()
return self._sendLooperD or succeed(None) | python | def stop(self):
"""
Terminate any outstanding requests.
:returns: :class:``Deferred` which fires when fully stopped.
"""
self.stopping = True
# Cancel any outstanding request to our client
if self._batch_send_d:
self._batch_send_d.cancel()
# Do we have to worry about our looping call?
if self.batch_every_t is not None:
# Stop our looping call, and wait for the deferred to be called
if self._sendLooper is not None:
self._sendLooper.stop()
# Make sure requests that wasn't cancelled above are now
self._cancel_outstanding()
return self._sendLooperD or succeed(None) | [
"def",
"stop",
"(",
"self",
")",
":",
"self",
".",
"stopping",
"=",
"True",
"# Cancel any outstanding request to our client",
"if",
"self",
".",
"_batch_send_d",
":",
"self",
".",
"_batch_send_d",
".",
"cancel",
"(",
")",
"# Do we have to worry about our looping call?",
"if",
"self",
".",
"batch_every_t",
"is",
"not",
"None",
":",
"# Stop our looping call, and wait for the deferred to be called",
"if",
"self",
".",
"_sendLooper",
"is",
"not",
"None",
":",
"self",
".",
"_sendLooper",
".",
"stop",
"(",
")",
"# Make sure requests that wasn't cancelled above are now",
"self",
".",
"_cancel_outstanding",
"(",
")",
"return",
"self",
".",
"_sendLooperD",
"or",
"succeed",
"(",
"None",
")"
] | Terminate any outstanding requests.
:returns: :class:``Deferred` which fires when fully stopped. | [
"Terminate",
"any",
"outstanding",
"requests",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/producer.py#L235-L252 | train | Stops any outstanding requests and returns a Deferred which fires when fully stopped. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX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NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(5405 - 5294) + chr(0b11010 + 0o30) + chr(55) + chr(1969 - 1917), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101 + 0o54) + chr(0b110010) + chr(0b110110 + 0o0), 26841 - 26833), nzTpIcepk0o8('\060' + chr(0b1010 + 0o145) + chr(51) + '\062' + chr(0b110101), 43125 - 43117), nzTpIcepk0o8(chr(543 - 495) + '\157' + '\061' + chr(0b11010 + 0o35) + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + chr(4990 - 4879) + chr(49) + chr(0b110000) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(1065 - 1017) + chr(111) + '\061' + chr(0b101111 + 0o1) + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1001010 + 0o45) + '\x32' + '\x31' + chr(0b101011 + 0o5), 20685 - 20677), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(111) + '\065', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(960 - 909) + '\064' + chr(0b1001 + 0o52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2045 - 1994) + chr(0b110110) + '\063', 4713 - 4705), nzTpIcepk0o8(chr(48) + chr(3873 - 3762) + chr(53), 8), nzTpIcepk0o8('\060' + chr(0b1000010 + 0o55) + '\x31' + chr(49) + chr(0b100101 + 0o13), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(1844 - 1795) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + '\066' + chr(0b1011 + 0o47), 13325 - 13317), nzTpIcepk0o8(chr(48) + chr(0b10100 + 0o133) + chr(0b110100) + chr(49), 44899 - 44891), nzTpIcepk0o8(chr(0b10 + 0o56) + '\157' + chr(0b110010) + '\x31' + '\060', 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(50) + chr(2453 - 2398), 17627 - 17619), nzTpIcepk0o8(chr(48) + '\x6f' + '\067' + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + chr(2052 - 2002) + chr(0b110000 + 0o3), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(363 - 312) + chr(1890 - 1841) + '\x32', 8), nzTpIcepk0o8(chr(0b110000) + chr(3600 - 3489) + '\063' + chr(0b101001 + 0o7) + chr(0b101100 + 0o12), 0b1000), nzTpIcepk0o8('\x30' + chr(0b110000 + 0o77) + chr(0b110001) + chr(0b110010), 42022 - 42014), nzTpIcepk0o8(chr(1852 - 1804) + chr(5447 - 5336) + chr(0b110010) + chr(0b110000) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + chr(50) + '\066' + chr(0b11011 + 0o32), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101100 + 0o3) + '\x32' + chr(1963 - 1909) + chr(0b110100 + 0o3), 31193 - 31185), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(0b1111 + 0o44) + chr(0b1001 + 0o54), 41033 - 41025), nzTpIcepk0o8('\x30' + chr(0b11 + 0o154) + chr(2405 - 2350) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(668 - 620) + chr(0b1101111) + '\062' + chr(0b10101 + 0o40) + chr(0b10011 + 0o44), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x34' + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b100000 + 0o117) + '\x31' + '\066' + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(610 - 561) + '\060' + chr(0b110000), 8), nzTpIcepk0o8(chr(0b110000) + chr(10857 - 10746) + '\x31' + '\067', 27918 - 27910), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + '\x37' + chr(0b11100 + 0o31), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + '\x32', 49462 - 49454), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + '\x32' + chr(0b110011) + '\061', 5447 - 5439), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(49) + chr(0b101011 + 0o10), 36308 - 36300), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + '\060' + '\060', 8), nzTpIcepk0o8(chr(0b110000) + chr(11025 - 10914) + chr(50) + chr(0b10100 + 0o37) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + '\063' + '\063', 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1910 - 1860) + chr(0b110011), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2253 - 2200) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x92'), '\144' + chr(0b1000111 + 0o36) + '\x63' + '\157' + '\x64' + '\145')(chr(117) + '\164' + chr(0b1100110) + '\055' + chr(2211 - 2155)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def dYJbBiYO_nGE(hXMPsSrOQzbh):
hXMPsSrOQzbh.RqNlLjOAIA3S = nzTpIcepk0o8('\060' + '\157' + chr(648 - 599), ord("\x08"))
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe34\xb4\r&(\xd7v\x86\x9da\x17\xae'), chr(100) + chr(8803 - 8702) + chr(7834 - 7735) + chr(111) + chr(100) + chr(6053 - 5952))(chr(117) + chr(116) + chr(0b1100110) + chr(0b101101) + chr(426 - 370))):
roI3spqORKae(hXMPsSrOQzbh._batch_send_d, roI3spqORKae(ES5oEprVxulp(b'\xdf7\xbb\x1a ,'), '\x64' + chr(101) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b1010001 + 0o24))(chr(0b1110101) + chr(9859 - 9743) + chr(6321 - 6219) + chr(0b101101) + chr(0b1111 + 0o51)))()
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xde7\xa1\x1a-\x1f\xeds\x86\x81|\x17\xbe'), chr(100) + chr(0b110000 + 0o65) + chr(0b1000000 + 0o43) + '\x6f' + chr(0b110111 + 0o55) + chr(1779 - 1678))(chr(117) + '\x74' + chr(9773 - 9671) + chr(45) + chr(0b111000))) is not None:
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe3%\xb0\x17!\x0c\xe7j\x93\x96w'), '\144' + chr(0b111 + 0o136) + '\x63' + chr(111) + '\x64' + chr(7741 - 7640))(chr(0b1110101) + chr(116) + '\x66' + chr(0b101101) + chr(1599 - 1543))) is not None:
roI3spqORKae(hXMPsSrOQzbh._sendLooper, roI3spqORKae(ES5oEprVxulp(b'\xd8\x0f\x9f\x1b\x07)\xd1J\xbc\x9dB\r'), '\144' + chr(0b111110 + 0o47) + chr(7109 - 7010) + chr(0b111100 + 0o63) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(0b1110100) + '\146' + '\x2d' + '\x38'))()
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe35\xb4\x17&%\xe4Z\x8c\x86q;\xbe\x13O\xec>S\xf4'), '\144' + '\x65' + chr(3475 - 3376) + chr(0b1011 + 0o144) + '\144' + '\145')(chr(0b1100000 + 0o25) + '\164' + '\x66' + chr(888 - 843) + chr(0b111000)))()
return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe3%\xb0\x17!\x0c\xe7j\x93\x96w\x0c'), chr(0b1001100 + 0o30) + chr(0b1100101) + chr(7438 - 7339) + '\157' + chr(9339 - 9239) + '\x65')(chr(5249 - 5132) + chr(0b1110100) + chr(0b1000011 + 0o43) + chr(0b101101) + chr(0b11111 + 0o31))) or HA8eNGsqYF6H(None) |
ciena/afkak | afkak/producer.py | Producer._send_timer_failed | def _send_timer_failed(self, fail):
"""
Our _send_batch() function called by the LoopingCall failed. Some
error probably came back from Kafka and _check_error() raised the
exception
For now, just log the failure and restart the loop
"""
log.warning('_send_timer_failed:%r: %s', fail,
fail.getBriefTraceback())
self._sendLooperD = self._sendLooper.start(
self.batch_every_t, now=False) | python | def _send_timer_failed(self, fail):
"""
Our _send_batch() function called by the LoopingCall failed. Some
error probably came back from Kafka and _check_error() raised the
exception
For now, just log the failure and restart the loop
"""
log.warning('_send_timer_failed:%r: %s', fail,
fail.getBriefTraceback())
self._sendLooperD = self._sendLooper.start(
self.batch_every_t, now=False) | [
"def",
"_send_timer_failed",
"(",
"self",
",",
"fail",
")",
":",
"log",
".",
"warning",
"(",
"'_send_timer_failed:%r: %s'",
",",
"fail",
",",
"fail",
".",
"getBriefTraceback",
"(",
")",
")",
"self",
".",
"_sendLooperD",
"=",
"self",
".",
"_sendLooper",
".",
"start",
"(",
"self",
".",
"batch_every_t",
",",
"now",
"=",
"False",
")"
] | Our _send_batch() function called by the LoopingCall failed. Some
error probably came back from Kafka and _check_error() raised the
exception
For now, just log the failure and restart the loop | [
"Our",
"_send_batch",
"()",
"function",
"called",
"by",
"the",
"LoopingCall",
"failed",
".",
"Some",
"error",
"probably",
"came",
"back",
"from",
"Kafka",
"and",
"_check_error",
"()",
"raised",
"the",
"exception",
"For",
"now",
"just",
"log",
"the",
"failure",
"and",
"restart",
"the",
"loop"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/producer.py#L256-L266 | train | Called by the LoopingCall when the send_batch function failed. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod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,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(6304 - 6193) + '\x31' + chr(0b110011) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b1101 + 0o46) + chr(0b110001) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(2104 - 2056) + chr(0b1101111) + chr(0b110101) + '\x31', 47701 - 47693), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(1316 - 1268) + '\x31', 0b1000), nzTpIcepk0o8(chr(2286 - 2238) + '\157' + '\x32' + chr(0b110111) + chr(0b10101 + 0o35), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b10101 + 0o34) + chr(0b110000) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(8155 - 8044) + chr(51) + '\x35' + chr(0b10001 + 0o37), 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + '\x33' + '\067' + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(1121 - 1067) + '\062', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(54) + chr(50), 49881 - 49873), nzTpIcepk0o8(chr(675 - 627) + chr(0b1101111) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + chr(0b100010 + 0o20) + chr(143 - 93) + chr(0b110111), 53549 - 53541), nzTpIcepk0o8(chr(2083 - 2035) + chr(1324 - 1213) + '\x31' + '\063' + chr(0b110000), 10843 - 10835), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1101111) + '\063' + chr(0b1110 + 0o51) + chr(55), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + chr(393 - 342), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b100010 + 0o17) + '\x30' + chr(52), 63133 - 63125), nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + chr(0b10000 + 0o42) + chr(104 - 54) + chr(0b1010 + 0o50), 0o10), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(0b1101111) + chr(0b110011) + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(6587 - 6476) + chr(51) + chr(55) + '\x34', 17059 - 17051), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + chr(2371 - 2321) + chr(51) + '\x31', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(0b11110 + 0o22) + chr(0b11001 + 0o36), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1100111 + 0o10) + chr(0b110001) + chr(1507 - 1453) + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + chr(0b11000 + 0o127) + chr(0b110010) + chr(0b110100) + chr(48), 0b1000), nzTpIcepk0o8('\060' + chr(0b1011101 + 0o22) + '\x31' + '\066' + '\062', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(711 - 662) + '\063' + chr(51), 0b1000), nzTpIcepk0o8(chr(209 - 161) + chr(0b1001100 + 0o43) + '\x31' + chr(53) + chr(0b11010 + 0o34), 16090 - 16082), nzTpIcepk0o8(chr(2261 - 2213) + '\x6f' + chr(49) + chr(54) + chr(0b110000), 0b1000), nzTpIcepk0o8('\x30' + chr(10709 - 10598) + chr(0b100111 + 0o13) + chr(0b110001) + chr(0b110110), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101010 + 0o12) + '\061', 54514 - 54506), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b101110 + 0o101) + '\x31' + chr(48) + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(5535 - 5424) + chr(0b10101 + 0o35) + chr(0b110101) + chr(313 - 263), ord("\x08")), nzTpIcepk0o8('\x30' + chr(6826 - 6715) + chr(0b110001) + chr(53) + chr(0b110110), 8), nzTpIcepk0o8(chr(1277 - 1229) + '\157' + '\x32' + '\x34' + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b110100) + '\x37', 19939 - 19931), nzTpIcepk0o8(chr(0b110000) + chr(5517 - 5406) + '\061' + chr(0b110111) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(0b110100) + '\x30', 0b1000), nzTpIcepk0o8('\060' + chr(0b1100100 + 0o13) + '\063' + chr(0b11101 + 0o23) + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(49), 0b1000), nzTpIcepk0o8(chr(1117 - 1069) + chr(0b11 + 0o154) + '\062' + chr(54) + chr(0b1011 + 0o53), 0o10), nzTpIcepk0o8('\060' + chr(0b10110 + 0o131) + chr(50) + chr(51) + '\067', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\157' + chr(0b110101) + '\x30', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'w'), chr(0b1100100) + chr(0b100010 + 0o103) + chr(3223 - 3124) + chr(0b1101111) + chr(5027 - 4927) + chr(0b100111 + 0o76))(chr(117) + '\x74' + '\146' + '\055' + chr(1922 - 1866)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def yLQtETWads27(hXMPsSrOQzbh, qbbHsF4hIzMe):
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'.\xab[\xaf\xd3)\x8f'), chr(0b1100100) + chr(1799 - 1698) + chr(0b1100011) + '\x6f' + '\144' + chr(101))(chr(0b1110101) + chr(8094 - 7978) + chr(0b1010000 + 0o26) + '\055' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\x06\xb9L\xaf\xde\x18\x9c\x93\xdfWw\xc8>\x9ez(\xf7|\xc6\xbc\xf5K\x80W('), '\x64' + chr(101) + '\x63' + '\x6f' + '\144' + '\x65')('\165' + '\164' + chr(9532 - 9430) + '\055' + chr(244 - 188)), qbbHsF4hIzMe, roI3spqORKae(qbbHsF4hIzMe, roI3spqORKae(ES5oEprVxulp(b">\xaf]\x83\xc8.\x8d\x9c\xe6@d\xf4=\x9dr'\xf9"), chr(100) + chr(0b110001 + 0o64) + chr(0b1100011) + chr(0b10110 + 0o131) + '\x64' + chr(0b111000 + 0o55))(chr(0b11011 + 0o132) + '\164' + chr(7292 - 7190) + '\055' + chr(0b111000)))())
hXMPsSrOQzbh.S1fpgrMS7ZId = hXMPsSrOQzbh._sendLooper.KQbHFTcl_LKy(hXMPsSrOQzbh.batch_every_t, now=nzTpIcepk0o8(chr(0b110000) + chr(5905 - 5794) + chr(48), 0o10)) |
ciena/afkak | afkak/producer.py | Producer._send_timer_stopped | def _send_timer_stopped(self, lCall):
"""
We're shutting down, clean up our looping call...
"""
if self._sendLooper is not lCall:
log.warning('commitTimerStopped with wrong timer:%s not:%s',
lCall, self._sendLooper)
else:
self._sendLooper = None
self._sendLooperD = None | python | def _send_timer_stopped(self, lCall):
"""
We're shutting down, clean up our looping call...
"""
if self._sendLooper is not lCall:
log.warning('commitTimerStopped with wrong timer:%s not:%s',
lCall, self._sendLooper)
else:
self._sendLooper = None
self._sendLooperD = None | [
"def",
"_send_timer_stopped",
"(",
"self",
",",
"lCall",
")",
":",
"if",
"self",
".",
"_sendLooper",
"is",
"not",
"lCall",
":",
"log",
".",
"warning",
"(",
"'commitTimerStopped with wrong timer:%s not:%s'",
",",
"lCall",
",",
"self",
".",
"_sendLooper",
")",
"else",
":",
"self",
".",
"_sendLooper",
"=",
"None",
"self",
".",
"_sendLooperD",
"=",
"None"
] | We're shutting down, clean up our looping call... | [
"We",
"re",
"shutting",
"down",
"clean",
"up",
"our",
"looping",
"call",
"..."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/producer.py#L268-L277 | train | Called when a timer is stopped. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmqoBrCHG,GA4ANb_Tki5v,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VJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(379 - 331) + '\157' + '\062' + chr(0b11000 + 0o35) + chr(50), ord("\x08")), nzTpIcepk0o8('\060' + chr(8215 - 8104) + chr(1250 - 1196) + chr(2718 - 2664), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(0b11110 + 0o30) + chr(463 - 414), 0b1000), nzTpIcepk0o8('\x30' + chr(11505 - 11394) + chr(49) + chr(1814 - 1764) + chr(51), 0b1000), nzTpIcepk0o8('\x30' + chr(2910 - 2799) + '\x32' + '\064' + '\x32', 22149 - 22141), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(769 - 721) + '\x6f' + chr(50) + chr(0b110011) + '\063', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(2128 - 2079) + '\x30' + '\x31', 40087 - 40079), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + '\x32' + chr(0b101001 + 0o14), 1530 - 1522), nzTpIcepk0o8(chr(48) + chr(0b1000 + 0o147) + chr(0b101010 + 0o10) + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(8228 - 8117) + chr(50) + '\x32' + chr(51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1000010 + 0o55) + '\x33' + chr(50), 0b1000), nzTpIcepk0o8('\060' + chr(5352 - 5241) + chr(0b1001 + 0o52) + chr(53) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x35' + chr(2280 - 2232), 45042 - 45034), nzTpIcepk0o8(chr(0b110000) + chr(0b1101001 + 0o6) + chr(51) + '\066' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1238 - 1188) + chr(1713 - 1661) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\x6f' + chr(50) + chr(0b11001 + 0o33) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\157' + chr(0b100111 + 0o12) + '\060' + chr(2475 - 2421), 64434 - 64426), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(687 - 639), 0b1000), nzTpIcepk0o8('\060' + chr(10244 - 10133) + chr(51) + '\063' + '\062', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + '\064', 64812 - 64804), nzTpIcepk0o8(chr(994 - 946) + '\x6f' + '\063' + chr(0b110011) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b111 + 0o60) + '\066', 21495 - 21487), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(53) + chr(1540 - 1486), 0o10), nzTpIcepk0o8(chr(1285 - 1237) + chr(0b1101111) + chr(0b110110) + chr(50), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(11674 - 11563) + chr(2093 - 2042) + chr(49) + chr(0b11000 + 0o33), 53018 - 53010), nzTpIcepk0o8('\x30' + chr(9319 - 9208) + chr(0b101010 + 0o7) + chr(0b100101 + 0o17) + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(792 - 740) + '\064', 8), nzTpIcepk0o8(chr(48) + chr(6065 - 5954) + chr(0b110011) + chr(0b110100) + chr(74 - 26), 32396 - 32388), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(1215 - 1166) + chr(52), 15994 - 15986), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + '\067' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b101010 + 0o105) + chr(0b1110 + 0o44) + '\065' + '\067', ord("\x08")), nzTpIcepk0o8(chr(623 - 575) + '\x6f' + chr(0b110011) + '\x37' + '\060', 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + chr(53) + chr(1810 - 1761), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2496 - 2446) + '\x32' + chr(48), 0o10), nzTpIcepk0o8(chr(1619 - 1571) + '\157' + '\x31' + chr(2704 - 2649) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(1259 - 1211) + '\x6f' + chr(489 - 438) + chr(0b110001) + chr(1012 - 963), 0b1000), nzTpIcepk0o8(chr(384 - 336) + chr(111) + chr(0b0 + 0o61) + chr(0b10011 + 0o35) + '\x31', 8), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(9195 - 9084) + '\x31' + chr(0b110000 + 0o7) + chr(52), 0o10), nzTpIcepk0o8('\x30' + chr(12005 - 11894) + '\062' + '\x34' + '\062', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110101) + '\060', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x84'), chr(100) + chr(101) + chr(0b1100011) + chr(0b100101 + 0o112) + chr(9312 - 9212) + '\x65')(chr(117) + '\164' + chr(0b1011011 + 0o13) + chr(45) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def gZ7vGRRkTyDP(hXMPsSrOQzbh, JlD7YQSIOnJ7):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf5E\x14=\xc6Y\xf4.\xa5q\xe1'), chr(0b1100100) + chr(101) + chr(0b111111 + 0o44) + '\x6f' + '\144' + chr(101))('\165' + chr(0b1110100) + chr(8245 - 8143) + chr(1634 - 1589) + chr(0b11101 + 0o33))) is not JlD7YQSIOnJ7:
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\xddW\x03=\xcb{\xfc'), chr(0b110101 + 0o57) + '\x65' + '\x63' + chr(0b100111 + 0o110) + chr(0b1100100) + chr(0b1100101))(chr(0b1010000 + 0o45) + chr(0b1110100) + '\146' + '\x2d' + chr(1620 - 1564)))(roI3spqORKae(ES5oEprVxulp(b'\xc9Y\x1c>\xcba\xcf(\xb8q\xe1I\x9bG\x82\xd0\xc1"(\xade\xaaV\xceE\xb9\x0e\xca\x87\xec\r\xc6\x95L\xe2A\xec2\\\xcc\xc5BKv\xd1'), '\x64' + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(0b1100101))('\x75' + '\164' + chr(0b1100110) + chr(45) + chr(0b111000)), JlD7YQSIOnJ7, roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf5E\x14=\xc6Y\xf4.\xa5q\xe1'), '\x64' + '\145' + chr(565 - 466) + chr(0b1101111) + chr(100) + chr(101))('\165' + '\x74' + '\x66' + '\x2d' + chr(56))))
else:
hXMPsSrOQzbh.hS388ZoYfmFM = None
hXMPsSrOQzbh.S1fpgrMS7ZId = None |
ciena/afkak | afkak/producer.py | Producer._next_partition | def _next_partition(self, topic, key=None):
"""get the next partition to which to publish
Check with our client for the latest partitions for the topic, then
ask our partitioner for the next partition to which we should publish
for the give key. If needed, create a new partitioner for the topic.
"""
# check if the client has metadata for the topic
while self.client.metadata_error_for_topic(topic):
# client doesn't have good metadata for topic. ask to fetch...
# check if we have request attempts left
if self._req_attempts >= self._max_attempts:
# No, no attempts left, so raise the error
_check_error(self.client.metadata_error_for_topic(topic))
yield self.client.load_metadata_for_topics(topic)
if not self.client.metadata_error_for_topic(topic):
break
self._req_attempts += 1
d = Deferred()
self.client.reactor.callLater(
self._retry_interval, d.callback, True)
self._retry_interval *= self.RETRY_INTERVAL_FACTOR
yield d
# Ok, should be safe to get the partitions now...
partitions = self.client.topic_partitions[topic]
# Do we have a partitioner for this topic already?
if topic not in self.partitioners:
# No, create a new paritioner for topic, partitions
self.partitioners[topic] = \
self.partitioner_class(topic, partitions)
# Lookup the next partition
partition = self.partitioners[topic].partition(key, partitions)
returnValue(partition) | python | def _next_partition(self, topic, key=None):
"""get the next partition to which to publish
Check with our client for the latest partitions for the topic, then
ask our partitioner for the next partition to which we should publish
for the give key. If needed, create a new partitioner for the topic.
"""
# check if the client has metadata for the topic
while self.client.metadata_error_for_topic(topic):
# client doesn't have good metadata for topic. ask to fetch...
# check if we have request attempts left
if self._req_attempts >= self._max_attempts:
# No, no attempts left, so raise the error
_check_error(self.client.metadata_error_for_topic(topic))
yield self.client.load_metadata_for_topics(topic)
if not self.client.metadata_error_for_topic(topic):
break
self._req_attempts += 1
d = Deferred()
self.client.reactor.callLater(
self._retry_interval, d.callback, True)
self._retry_interval *= self.RETRY_INTERVAL_FACTOR
yield d
# Ok, should be safe to get the partitions now...
partitions = self.client.topic_partitions[topic]
# Do we have a partitioner for this topic already?
if topic not in self.partitioners:
# No, create a new paritioner for topic, partitions
self.partitioners[topic] = \
self.partitioner_class(topic, partitions)
# Lookup the next partition
partition = self.partitioners[topic].partition(key, partitions)
returnValue(partition) | [
"def",
"_next_partition",
"(",
"self",
",",
"topic",
",",
"key",
"=",
"None",
")",
":",
"# check if the client has metadata for the topic",
"while",
"self",
".",
"client",
".",
"metadata_error_for_topic",
"(",
"topic",
")",
":",
"# client doesn't have good metadata for topic. ask to fetch...",
"# check if we have request attempts left",
"if",
"self",
".",
"_req_attempts",
">=",
"self",
".",
"_max_attempts",
":",
"# No, no attempts left, so raise the error",
"_check_error",
"(",
"self",
".",
"client",
".",
"metadata_error_for_topic",
"(",
"topic",
")",
")",
"yield",
"self",
".",
"client",
".",
"load_metadata_for_topics",
"(",
"topic",
")",
"if",
"not",
"self",
".",
"client",
".",
"metadata_error_for_topic",
"(",
"topic",
")",
":",
"break",
"self",
".",
"_req_attempts",
"+=",
"1",
"d",
"=",
"Deferred",
"(",
")",
"self",
".",
"client",
".",
"reactor",
".",
"callLater",
"(",
"self",
".",
"_retry_interval",
",",
"d",
".",
"callback",
",",
"True",
")",
"self",
".",
"_retry_interval",
"*=",
"self",
".",
"RETRY_INTERVAL_FACTOR",
"yield",
"d",
"# Ok, should be safe to get the partitions now...",
"partitions",
"=",
"self",
".",
"client",
".",
"topic_partitions",
"[",
"topic",
"]",
"# Do we have a partitioner for this topic already?",
"if",
"topic",
"not",
"in",
"self",
".",
"partitioners",
":",
"# No, create a new paritioner for topic, partitions",
"self",
".",
"partitioners",
"[",
"topic",
"]",
"=",
"self",
".",
"partitioner_class",
"(",
"topic",
",",
"partitions",
")",
"# Lookup the next partition",
"partition",
"=",
"self",
".",
"partitioners",
"[",
"topic",
"]",
".",
"partition",
"(",
"key",
",",
"partitions",
")",
"returnValue",
"(",
"partition",
")"
] | get the next partition to which to publish
Check with our client for the latest partitions for the topic, then
ask our partitioner for the next partition to which we should publish
for the give key. If needed, create a new partitioner for the topic. | [
"get",
"the",
"next",
"partition",
"to",
"which",
"to",
"publish"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/producer.py#L280-L313 | train | Get the next partition to which to publish for the given topic. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJv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as5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b100111 + 0o13) + '\x37' + chr(2082 - 2032), 0b1000), nzTpIcepk0o8(chr(2283 - 2235) + chr(111) + chr(1558 - 1508) + chr(0b10110 + 0o33) + chr(2738 - 2683), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(0b101001 + 0o15) + chr(0b100 + 0o61), 42474 - 42466), nzTpIcepk0o8('\060' + '\x6f' + '\x31', 47930 - 47922), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\157' + '\062' + '\x34', 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + '\x6f' + '\x31' + '\060' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\067' + chr(0b101101 + 0o12), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(0b10101 + 0o42) + '\x33', 27661 - 27653), nzTpIcepk0o8(chr(0b110000) + chr(0b1010100 + 0o33) + chr(1980 - 1929) + chr(54) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b100001 + 0o116) + chr(49) + chr(329 - 275) + chr(340 - 287), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b111111 + 0o60) + chr(0b110001) + '\067', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b111101 + 0o62) + '\x32' + chr(48) + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(1386 - 1333) + chr(0b10 + 0o57), 31117 - 31109), nzTpIcepk0o8('\x30' + chr(456 - 345) + '\063' + chr(1192 - 1144) + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + chr(10149 - 10038) + chr(781 - 732) + '\x32' + chr(53), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(0b110010) + chr(1187 - 1133), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b11110 + 0o121) + chr(1514 - 1465) + '\067' + chr(654 - 601), 21871 - 21863), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + '\x37' + '\064', 0o10), nzTpIcepk0o8(chr(999 - 951) + chr(0b1000100 + 0o53) + chr(49) + chr(126 - 76) + chr(0b110110), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(828 - 780), 26931 - 26923), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(111) + '\063' + chr(0b10001 + 0o43) + chr(0b10100 + 0o43), 0o10), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1101111) + chr(0b101000 + 0o11) + '\x33' + chr(1861 - 1811), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(1100 - 1047), 22599 - 22591), nzTpIcepk0o8('\060' + '\157' + chr(2271 - 2221) + chr(0b1111 + 0o43) + chr(0b10 + 0o64), 6557 - 6549), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1101111) + chr(297 - 248) + chr(1667 - 1617) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + chr(1768 - 1657) + chr(2313 - 2263) + chr(925 - 870) + chr(2458 - 2408), 8), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(52) + chr(2334 - 2280), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b11011 + 0o124) + '\x32' + chr(0b110110) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1390 - 1340) + '\x34' + chr(48), 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + chr(49) + chr(0b1001 + 0o52) + chr(0b11111 + 0o30), 57421 - 57413), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\157' + '\063' + '\x34' + chr(53), 23365 - 23357), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1010001 + 0o36) + '\x31' + '\x35' + chr(0b110000), 65257 - 65249), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(55) + chr(0b11010 + 0o27), 36504 - 36496), nzTpIcepk0o8(chr(1812 - 1764) + chr(10647 - 10536) + chr(0b1011 + 0o47) + '\x33' + '\x35', 49784 - 49776), nzTpIcepk0o8(chr(0b110000) + chr(1466 - 1355) + chr(0b11 + 0o57) + chr(1785 - 1732) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(55) + '\066', 8206 - 8198), nzTpIcepk0o8('\x30' + chr(904 - 793) + '\063' + '\x32' + '\x34', 41693 - 41685), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\x6f' + chr(1719 - 1668) + chr(2317 - 2262) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10 + 0o60) + chr(0b110110) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(560 - 512) + chr(0b1101111) + chr(0b101010 + 0o7) + '\x37' + chr(0b10011 + 0o35), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\157' + '\065' + chr(0b100111 + 0o11), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x94'), chr(6625 - 6525) + chr(0b1100101) + '\143' + '\157' + '\x64' + chr(101))(chr(1843 - 1726) + chr(0b1110100) + chr(0b100010 + 0o104) + chr(0b101101) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def kRZA4TvKq00W(hXMPsSrOQzbh, eddDFOEFy2dH, QYodcsDtoGq7=None):
while roI3spqORKae(hXMPsSrOQzbh.client, roI3spqORKae(ES5oEprVxulp(b'\xd7\xea\x81`p"K\x9a\xab\x10}\xf1\xc6\xb4\n\xb0\x12\xce\tt\x88*d\xf5'), chr(3916 - 3816) + chr(0b100 + 0o141) + '\143' + '\x6f' + '\144' + chr(0b100100 + 0o101))(chr(4500 - 4383) + '\x74' + '\x66' + chr(45) + chr(0b111000)))(eddDFOEFy2dH):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe5\xfd\x90pK"K\x8f\x91\x18\x7f\xf7\xda'), chr(100) + chr(0b1100000 + 0o5) + chr(99) + chr(0b1010000 + 0o37) + chr(100) + chr(101))(chr(0b1110101) + chr(11837 - 11721) + '\146' + chr(1701 - 1656) + chr(0b100000 + 0o30))) >= roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe5\xe2\x94yK"K\x8f\x91\x18\x7f\xf7\xda'), '\144' + chr(7745 - 7644) + chr(9589 - 9490) + chr(111) + chr(100) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(102) + '\x2d' + chr(2495 - 2439))):
ObqVHUGBigC6(roI3spqORKae(hXMPsSrOQzbh.client, roI3spqORKae(ES5oEprVxulp(b'\xd7\xea\x81`p"K\x9a\xab\x10}\xf1\xc6\xb4\n\xb0\x12\xce\tt\x88*d\xf5'), chr(0b1100100) + chr(101) + chr(99) + chr(0b1101111) + '\144' + chr(4922 - 4821))(chr(0b1011001 + 0o34) + chr(0b10 + 0o162) + chr(102) + chr(45) + chr(702 - 646)))(eddDFOEFy2dH))
yield roI3spqORKae(hXMPsSrOQzbh.client, roI3spqORKae(ES5oEprVxulp(b'\xd6\xe0\x94eK.Z\x8f\x95\x11n\xf7\xc8\x993\xb9\x0f\xe3"o\x973n\xe5'), chr(0b1001011 + 0o31) + '\145' + chr(2922 - 2823) + chr(111) + '\x64' + chr(0b1100101))('\165' + chr(116) + '\x66' + chr(45) + chr(0b111000)))(eddDFOEFy2dH)
if not roI3spqORKae(hXMPsSrOQzbh.client, roI3spqORKae(ES5oEprVxulp(b'\xd7\xea\x81`p"K\x9a\xab\x10}\xf1\xc6\xb4\n\xb0\x12\xce\tt\x88*d\xf5'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(9052 - 8941) + chr(0b1010101 + 0o17) + chr(101))(chr(0b1110101) + chr(0b1100011 + 0o21) + '\146' + chr(45) + '\070'))(eddDFOEFy2dH):
break
hXMPsSrOQzbh.osReZaQvKRBg += nzTpIcepk0o8(chr(1713 - 1665) + chr(111) + chr(1732 - 1683), 8)
vPPlOXQgR3SM = LbNAbjjo5q4l()
roI3spqORKae(hXMPsSrOQzbh.client.reactor, roI3spqORKae(ES5oEprVxulp(b'\xd9\xee\x99mX"K\x9e\x86'), '\144' + '\x65' + chr(99) + '\157' + chr(0b100010 + 0o102) + chr(706 - 605))('\x75' + chr(0b1110100) + chr(102) + chr(45) + chr(0b111000)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe5\xfd\x90uf:`\x92\x9a\x01j\xf1\xdf\xa79'), chr(100) + '\145' + chr(0b1100011) + chr(0b10001 + 0o136) + chr(3900 - 3800) + chr(0b1001010 + 0o33))(chr(117) + '\x74' + chr(102) + chr(0b1100 + 0o41) + chr(0b111000))), roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\xd0\xc8\xc0JAwj\xae\xb3\x1bd\xb6'), chr(0b1100100) + chr(1696 - 1595) + chr(99) + chr(0b1001110 + 0o41) + chr(0b1010000 + 0o24) + chr(0b1100101))('\165' + chr(0b100100 + 0o120) + '\146' + chr(0b10101 + 0o30) + '\x38')), nzTpIcepk0o8('\x30' + chr(111) + '\061', 8))
hXMPsSrOQzbh._ItQq3GtMWVd *= hXMPsSrOQzbh.RETRY_INTERVAL_FACTOR
yield vPPlOXQgR3SM
OpOj_yrX6o48 = hXMPsSrOQzbh.client.topic_partitions[eddDFOEFy2dH]
if eddDFOEFy2dH not in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xca\xee\x87u}7V\x94\x9a\x10}\xf0'), chr(100) + chr(0b0 + 0o145) + chr(0b1100011) + chr(0b1100101 + 0o12) + '\144' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b111 + 0o137) + chr(0b101101) + chr(56))):
hXMPsSrOQzbh._gi116qayRIG[eddDFOEFy2dH] = hXMPsSrOQzbh.partitioner_class(eddDFOEFy2dH, OpOj_yrX6o48)
y6tm5LzgZc_E = hXMPsSrOQzbh.partitioners[eddDFOEFy2dH].y6tm5LzgZc_E(QYodcsDtoGq7, OpOj_yrX6o48)
wVKqxW5Umubk(y6tm5LzgZc_E) |
ciena/afkak | afkak/producer.py | Producer._send_requests | def _send_requests(self, parts_results, requests):
"""Send the requests
We've determined the partition for each message group in the batch, or
got errors for them.
"""
# We use these dictionaries to be able to combine all the messages
# destined to the same topic/partition into one request
# the messages & deferreds, both by topic+partition
reqsByTopicPart = defaultdict(list)
payloadsByTopicPart = defaultdict(list)
deferredsByTopicPart = defaultdict(list)
# We now have a list of (succeeded/failed, partition/None) tuples
# for the partition lookups we did on each message group, zipped with
# the requests
for (success, part_or_failure), req in zip(parts_results, requests):
if req.deferred.called:
# Submitter cancelled the request while we were waiting for
# the topic/partition, skip it
continue
if not success:
# We failed to get a partition for this request, errback to the
# caller with the failure. Maybe this should retry? However,
# since this failure is likely to affect an entire Topic, there
# should be no issues with ordering of messages within a
# partition of a topic getting out of order. Let the caller
# retry the particular request if they like, or they could
# cancel all their outstanding requests in
req.deferred.errback(part_or_failure)
continue
# Ok, we now have a partition for this request, we can add the
# request for this topic/partition to reqsByTopicPart, and the
# caller's deferred to deferredsByTopicPart
topicPart = TopicAndPartition(req.topic, part_or_failure)
reqsByTopicPart[topicPart].append(req)
deferredsByTopicPart[topicPart].append(req.deferred)
# Build list of payloads grouped by topic/partition
# That is, we bundle all the messages destined for a given
# topic/partition, even if they were submitted by different
# requests into a single 'payload', and then we submit all the
# payloads as a list to the client for sending to the various
# brokers. The finest granularity of success/failure is at the
# payload (topic/partition) level.
payloads = []
for (topic, partition), reqs in reqsByTopicPart.items():
msgSet = create_message_set(reqs, self.codec)
req = ProduceRequest(topic, partition, msgSet)
topicPart = TopicAndPartition(topic, partition)
payloads.append(req)
payloadsByTopicPart[topicPart] = req
# Make sure we have some payloads to send
if not payloads:
return
# send the request
d = self.client.send_produce_request(
payloads, acks=self.req_acks, timeout=self.ack_timeout,
fail_on_error=False)
self._req_attempts += 1
# add our handlers
d.addBoth(self._handle_send_response, payloadsByTopicPart,
deferredsByTopicPart)
return d | python | def _send_requests(self, parts_results, requests):
"""Send the requests
We've determined the partition for each message group in the batch, or
got errors for them.
"""
# We use these dictionaries to be able to combine all the messages
# destined to the same topic/partition into one request
# the messages & deferreds, both by topic+partition
reqsByTopicPart = defaultdict(list)
payloadsByTopicPart = defaultdict(list)
deferredsByTopicPart = defaultdict(list)
# We now have a list of (succeeded/failed, partition/None) tuples
# for the partition lookups we did on each message group, zipped with
# the requests
for (success, part_or_failure), req in zip(parts_results, requests):
if req.deferred.called:
# Submitter cancelled the request while we were waiting for
# the topic/partition, skip it
continue
if not success:
# We failed to get a partition for this request, errback to the
# caller with the failure. Maybe this should retry? However,
# since this failure is likely to affect an entire Topic, there
# should be no issues with ordering of messages within a
# partition of a topic getting out of order. Let the caller
# retry the particular request if they like, or they could
# cancel all their outstanding requests in
req.deferred.errback(part_or_failure)
continue
# Ok, we now have a partition for this request, we can add the
# request for this topic/partition to reqsByTopicPart, and the
# caller's deferred to deferredsByTopicPart
topicPart = TopicAndPartition(req.topic, part_or_failure)
reqsByTopicPart[topicPart].append(req)
deferredsByTopicPart[topicPart].append(req.deferred)
# Build list of payloads grouped by topic/partition
# That is, we bundle all the messages destined for a given
# topic/partition, even if they were submitted by different
# requests into a single 'payload', and then we submit all the
# payloads as a list to the client for sending to the various
# brokers. The finest granularity of success/failure is at the
# payload (topic/partition) level.
payloads = []
for (topic, partition), reqs in reqsByTopicPart.items():
msgSet = create_message_set(reqs, self.codec)
req = ProduceRequest(topic, partition, msgSet)
topicPart = TopicAndPartition(topic, partition)
payloads.append(req)
payloadsByTopicPart[topicPart] = req
# Make sure we have some payloads to send
if not payloads:
return
# send the request
d = self.client.send_produce_request(
payloads, acks=self.req_acks, timeout=self.ack_timeout,
fail_on_error=False)
self._req_attempts += 1
# add our handlers
d.addBoth(self._handle_send_response, payloadsByTopicPart,
deferredsByTopicPart)
return d | [
"def",
"_send_requests",
"(",
"self",
",",
"parts_results",
",",
"requests",
")",
":",
"# We use these dictionaries to be able to combine all the messages",
"# destined to the same topic/partition into one request",
"# the messages & deferreds, both by topic+partition",
"reqsByTopicPart",
"=",
"defaultdict",
"(",
"list",
")",
"payloadsByTopicPart",
"=",
"defaultdict",
"(",
"list",
")",
"deferredsByTopicPart",
"=",
"defaultdict",
"(",
"list",
")",
"# We now have a list of (succeeded/failed, partition/None) tuples",
"# for the partition lookups we did on each message group, zipped with",
"# the requests",
"for",
"(",
"success",
",",
"part_or_failure",
")",
",",
"req",
"in",
"zip",
"(",
"parts_results",
",",
"requests",
")",
":",
"if",
"req",
".",
"deferred",
".",
"called",
":",
"# Submitter cancelled the request while we were waiting for",
"# the topic/partition, skip it",
"continue",
"if",
"not",
"success",
":",
"# We failed to get a partition for this request, errback to the",
"# caller with the failure. Maybe this should retry? However,",
"# since this failure is likely to affect an entire Topic, there",
"# should be no issues with ordering of messages within a",
"# partition of a topic getting out of order. Let the caller",
"# retry the particular request if they like, or they could",
"# cancel all their outstanding requests in",
"req",
".",
"deferred",
".",
"errback",
"(",
"part_or_failure",
")",
"continue",
"# Ok, we now have a partition for this request, we can add the",
"# request for this topic/partition to reqsByTopicPart, and the",
"# caller's deferred to deferredsByTopicPart",
"topicPart",
"=",
"TopicAndPartition",
"(",
"req",
".",
"topic",
",",
"part_or_failure",
")",
"reqsByTopicPart",
"[",
"topicPart",
"]",
".",
"append",
"(",
"req",
")",
"deferredsByTopicPart",
"[",
"topicPart",
"]",
".",
"append",
"(",
"req",
".",
"deferred",
")",
"# Build list of payloads grouped by topic/partition",
"# That is, we bundle all the messages destined for a given",
"# topic/partition, even if they were submitted by different",
"# requests into a single 'payload', and then we submit all the",
"# payloads as a list to the client for sending to the various",
"# brokers. The finest granularity of success/failure is at the",
"# payload (topic/partition) level.",
"payloads",
"=",
"[",
"]",
"for",
"(",
"topic",
",",
"partition",
")",
",",
"reqs",
"in",
"reqsByTopicPart",
".",
"items",
"(",
")",
":",
"msgSet",
"=",
"create_message_set",
"(",
"reqs",
",",
"self",
".",
"codec",
")",
"req",
"=",
"ProduceRequest",
"(",
"topic",
",",
"partition",
",",
"msgSet",
")",
"topicPart",
"=",
"TopicAndPartition",
"(",
"topic",
",",
"partition",
")",
"payloads",
".",
"append",
"(",
"req",
")",
"payloadsByTopicPart",
"[",
"topicPart",
"]",
"=",
"req",
"# Make sure we have some payloads to send",
"if",
"not",
"payloads",
":",
"return",
"# send the request",
"d",
"=",
"self",
".",
"client",
".",
"send_produce_request",
"(",
"payloads",
",",
"acks",
"=",
"self",
".",
"req_acks",
",",
"timeout",
"=",
"self",
".",
"ack_timeout",
",",
"fail_on_error",
"=",
"False",
")",
"self",
".",
"_req_attempts",
"+=",
"1",
"# add our handlers",
"d",
".",
"addBoth",
"(",
"self",
".",
"_handle_send_response",
",",
"payloadsByTopicPart",
",",
"deferredsByTopicPart",
")",
"return",
"d"
] | Send the requests
We've determined the partition for each message group in the batch, or
got errors for them. | [
"Send",
"the",
"requests"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/producer.py#L315-L378 | train | Send the requests to the specified topic and partition. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmqoBrCHG,GA4ANb_Tki5v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hVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(2285 - 2237) + '\x6f' + chr(51) + chr(51) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + '\x6f' + chr(2110 - 2060) + chr(0b110001), 54610 - 54602), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(4320 - 4209) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1100111 + 0o10) + chr(0b10000 + 0o42) + '\064', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(4409 - 4298) + chr(50) + '\061' + chr(50), 0o10), nzTpIcepk0o8(chr(1334 - 1286) + '\x6f' + chr(0b101001 + 0o13) + chr(0b100010 + 0o20), 46263 - 46255), nzTpIcepk0o8('\060' + chr(11912 - 11801) + '\x36' + chr(0b101000 + 0o17), 0o10), nzTpIcepk0o8(chr(1855 - 1807) + chr(111) + chr(0b110010) + chr(50) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(0b101100 + 0o5) + '\060', 60216 - 60208), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110101) + chr(0b11010 + 0o32), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(182 - 133) + chr(1680 - 1628) + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(0b110000) + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(50) + chr(704 - 651), 0b1000), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(111) + chr(51) + chr(0b110110 + 0o0), 24517 - 24509), nzTpIcepk0o8(chr(48) + chr(2274 - 2163) + '\x35' + chr(0b10110 + 0o36), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1000010 + 0o55) + chr(51) + chr(0b110001) + chr(968 - 913), 40476 - 40468), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(1369 - 1319) + '\060', 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b101100 + 0o103) + chr(1900 - 1851) + chr(0b101111 + 0o2) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(12314 - 12203) + '\062' + '\064', 8), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(0b101001 + 0o16), 37516 - 37508), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + '\065' + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(542 - 494) + '\157' + chr(0b110111) + chr(0b100011 + 0o16), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b11 + 0o57) + chr(0b1011 + 0o52) + chr(0b0 + 0o65), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b10101 + 0o132) + chr(51) + chr(0b10010 + 0o44) + '\067', 0o10), nzTpIcepk0o8(chr(1134 - 1086) + '\157' + chr(0b110001) + chr(0b11100 + 0o33) + '\063', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b100 + 0o55) + '\067' + chr(0b110011), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b10011 + 0o134) + '\061' + chr(0b110010) + chr(49), 0o10), nzTpIcepk0o8(chr(1011 - 963) + '\157' + chr(0b110001) + chr(0b100111 + 0o14), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(0b110011) + '\x32', 22306 - 22298), nzTpIcepk0o8(chr(331 - 283) + chr(0b11000 + 0o127) + chr(0b10100 + 0o36) + '\x35' + '\066', 58273 - 58265), nzTpIcepk0o8(chr(48) + chr(2622 - 2511) + '\x33' + '\062', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(0b10 + 0o62) + '\064', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(52) + chr(48), 0o10), nzTpIcepk0o8(chr(2128 - 2080) + chr(111) + '\x33' + chr(1880 - 1827) + '\x33', 48635 - 48627), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(205 - 151) + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(0b110 + 0o60) + chr(0b11110 + 0o25), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(490 - 439) + chr(0b1 + 0o65) + '\x30', 8), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + chr(0b10001 + 0o40) + '\061' + chr(0b11110 + 0o25), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\157' + '\065' + '\060', 21991 - 21983)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf1'), chr(0b1100100) + chr(0b1010110 + 0o17) + '\x63' + '\157' + chr(0b1100100) + chr(0b1010100 + 0o21))('\x75' + chr(3985 - 3869) + chr(0b101101 + 0o71) + chr(0b10 + 0o53) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def pfdjGOlKd7e9(hXMPsSrOQzbh, rzYbHd96nNHb, dDl_g5qi6_rH):
brPKJhIa_8b5 = mM1QxhFYKsbc(H4NoA26ON7iG)
fJko8Z9lY37V = mM1QxhFYKsbc(H4NoA26ON7iG)
YsOoXlI8_mgs = mM1QxhFYKsbc(H4NoA26ON7iG)
for ((Eve7WKj3GZpi, aOOJmKfM02hZ), EycgE8NTwf_z) in TxMFWa_Xzviv(rzYbHd96nNHb, dDl_g5qi6_rH):
if roI3spqORKae(EycgE8NTwf_z.deferred, roI3spqORKae(ES5oEprVxulp(b'\xb8tw%\xbfvG\xc1\x9a|z)'), chr(0b1100100) + '\x65' + chr(3044 - 2945) + chr(0b1101111) + '\144' + chr(0b100101 + 0o100))('\x75' + '\164' + chr(0b1100110) + chr(45) + chr(0b111000))):
continue
if not Eve7WKj3GZpi:
roI3spqORKae(EycgE8NTwf_z.deferred, roI3spqORKae(ES5oEprVxulp(b'\x97r4,\xcc\x12r\xa6\xb8k\\%'), chr(100) + chr(9991 - 9890) + chr(0b11101 + 0o106) + '\x6f' + '\x64' + chr(7714 - 7613))(chr(12011 - 11894) + chr(0b1110100) + chr(0b1100110) + chr(1071 - 1026) + '\070'))(aOOJmKfM02hZ)
continue
xAWnW1OJsHGI = r_NgehA9zC0q(EycgE8NTwf_z.eddDFOEFy2dH, aOOJmKfM02hZ)
roI3spqORKae(brPKJhIa_8b5[xAWnW1OJsHGI], roI3spqORKae(ES5oEprVxulp(b'\x97EV \xf2Ep\xf9\xa2CFQ'), '\144' + chr(0b110111 + 0o56) + chr(0b1100011) + chr(6204 - 6093) + chr(100) + '\x65')(chr(12738 - 12621) + chr(0b100110 + 0o116) + chr(3691 - 3589) + chr(1229 - 1184) + chr(1128 - 1072)))(EycgE8NTwf_z)
roI3spqORKae(YsOoXlI8_mgs[xAWnW1OJsHGI], roI3spqORKae(ES5oEprVxulp(b'\x97EV \xf2Ep\xf9\xa2CFQ'), '\144' + '\x65' + '\143' + chr(0b1101111) + '\144' + chr(0b1000010 + 0o43))('\165' + '\164' + '\x66' + chr(0b100111 + 0o6) + chr(0b11010 + 0o36)))(roI3spqORKae(EycgE8NTwf_z, roI3spqORKae(ES5oEprVxulp(b'\x89Ev#\xc9vs\xfd\x8a_g\x1c'), '\144' + chr(125 - 24) + chr(0b1001000 + 0o33) + '\x6f' + chr(0b1100100) + chr(101))('\165' + chr(116) + chr(2614 - 2512) + chr(1609 - 1564) + '\x38')))
hu1hynoeGawF = []
for ((eddDFOEFy2dH, y6tm5LzgZc_E), CPIzP_gGziQz) in roI3spqORKae(brPKJhIa_8b5, roI3spqORKae(ES5oEprVxulp(b'\x86NkZ\xcfX\x7f\xa2\xfbZK\r'), chr(0b1011111 + 0o5) + chr(0b100010 + 0o103) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(5090 - 4989))(chr(0b110110 + 0o77) + chr(2656 - 2540) + chr(0b1100110) + '\055' + chr(0b10101 + 0o43)))():
zp8tFtC2E0vD = IX_KETJ2pDr5(CPIzP_gGziQz, hXMPsSrOQzbh.codec)
EycgE8NTwf_z = Ulsz5djnnpw5(eddDFOEFy2dH, y6tm5LzgZc_E, zp8tFtC2E0vD)
xAWnW1OJsHGI = r_NgehA9zC0q(eddDFOEFy2dH, y6tm5LzgZc_E)
roI3spqORKae(hu1hynoeGawF, roI3spqORKae(ES5oEprVxulp(b'\x97EV \xf2Ep\xf9\xa2CFQ'), chr(0b1100100) + chr(0b1000011 + 0o42) + chr(99) + '\x6f' + chr(0b1100100) + '\x65')(chr(0b1001000 + 0o55) + chr(116) + '\146' + '\x2d' + chr(56)))(EycgE8NTwf_z)
fJko8Z9lY37V[xAWnW1OJsHGI] = EycgE8NTwf_z
if not hu1hynoeGawF:
return
vPPlOXQgR3SM = hXMPsSrOQzbh.client.send_produce_request(hu1hynoeGawF, acks=hXMPsSrOQzbh.req_acks, timeout=hXMPsSrOQzbh.ack_timeout, fail_on_error=nzTpIcepk0o8(chr(48) + chr(5926 - 5815) + '\x30', 28232 - 28224))
hXMPsSrOQzbh.osReZaQvKRBg += nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 0o10)
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\xbeuaV\xe5V_'), chr(0b1100100) + chr(0b100111 + 0o76) + chr(0b111101 + 0o46) + '\157' + '\144' + '\x65')(chr(117) + chr(0b1110100) + '\146' + chr(0b1101 + 0o40) + '\070'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"\x80ydz\xeeNR\xc9\xbbI}\x00\x19\xe7{_\xbf?'gz"), chr(0b1010100 + 0o20) + '\x65' + chr(99) + chr(1026 - 915) + chr(8284 - 8184) + chr(0b1100101))(chr(117) + chr(0b1110100) + '\146' + chr(0b100001 + 0o14) + chr(0b10110 + 0o42))), fJko8Z9lY37V, YsOoXlI8_mgs)
return vPPlOXQgR3SM |
ciena/afkak | afkak/producer.py | Producer._complete_batch_send | def _complete_batch_send(self, resp):
"""Complete the processing of our batch send operation
Clear the deferred tracking our current batch processing
and reset our retry count and retry interval
Return none to eat any errors coming from up the deferred chain
"""
self._batch_send_d = None
self._req_attempts = 0
self._retry_interval = self._init_retry_interval
if isinstance(resp, Failure) and not resp.check(tid_CancelledError,
CancelledError):
log.error("Failure detected in _complete_batch_send: %r\n%r",
resp, resp.getTraceback())
return | python | def _complete_batch_send(self, resp):
"""Complete the processing of our batch send operation
Clear the deferred tracking our current batch processing
and reset our retry count and retry interval
Return none to eat any errors coming from up the deferred chain
"""
self._batch_send_d = None
self._req_attempts = 0
self._retry_interval = self._init_retry_interval
if isinstance(resp, Failure) and not resp.check(tid_CancelledError,
CancelledError):
log.error("Failure detected in _complete_batch_send: %r\n%r",
resp, resp.getTraceback())
return | [
"def",
"_complete_batch_send",
"(",
"self",
",",
"resp",
")",
":",
"self",
".",
"_batch_send_d",
"=",
"None",
"self",
".",
"_req_attempts",
"=",
"0",
"self",
".",
"_retry_interval",
"=",
"self",
".",
"_init_retry_interval",
"if",
"isinstance",
"(",
"resp",
",",
"Failure",
")",
"and",
"not",
"resp",
".",
"check",
"(",
"tid_CancelledError",
",",
"CancelledError",
")",
":",
"log",
".",
"error",
"(",
"\"Failure detected in _complete_batch_send: %r\\n%r\"",
",",
"resp",
",",
"resp",
".",
"getTraceback",
"(",
")",
")",
"return"
] | Complete the processing of our batch send operation
Clear the deferred tracking our current batch processing
and reset our retry count and retry interval
Return none to eat any errors coming from up the deferred chain | [
"Complete",
"the",
"processing",
"of",
"our",
"batch",
"send",
"operation"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/producer.py#L380-L394 | train | Complete the processing of our current batch send operation. | GiP5xwVCF98Z,B3LV8Eo811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ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(0b11010 + 0o30) + '\x36', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110010 + 0o75) + chr(0b110010) + '\x37' + chr(0b110100), 0b1000), nzTpIcepk0o8('\060' + chr(766 - 655) + chr(444 - 390) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(930 - 881) + chr(52) + chr(48), 0b1000), nzTpIcepk0o8(chr(72 - 24) + chr(0b1101010 + 0o5) + chr(0b110010) + '\x33' + chr(1487 - 1437), 0b1000), nzTpIcepk0o8(chr(488 - 440) + chr(111) + chr(0b11011 + 0o30) + '\063' + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1001 + 0o146) + chr(49) + chr(723 - 668) + '\x34', 55596 - 55588), nzTpIcepk0o8('\060' + chr(111) + chr(0b110111) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(51) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110100) + chr(0b100110 + 0o13), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + '\064' + '\x30', 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(54) + chr(98 - 46), 49428 - 49420), nzTpIcepk0o8('\060' + '\x6f' + '\064' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(0b110011) + chr(50), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(55) + chr(48), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + '\x31', 0b1000), nzTpIcepk0o8(chr(432 - 384) + chr(0b1101111) + chr(0b100100 + 0o22) + chr(0b10011 + 0o37), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b10101 + 0o41) + '\x34', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(196 - 147) + chr(0b1001 + 0o50) + '\065', 1086 - 1078), nzTpIcepk0o8(chr(825 - 777) + '\157' + chr(0b10011 + 0o40) + '\067' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(1885 - 1837) + '\157' + chr(345 - 294) + chr(52) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b11110 + 0o30) + chr(0b10 + 0o65), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(4096 - 3985) + chr(75 - 24) + '\x30' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(615 - 567) + chr(9797 - 9686) + '\062' + '\060' + '\x35', 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(48) + chr(0b110111), 8), nzTpIcepk0o8('\060' + chr(0b11111 + 0o120) + chr(1194 - 1143) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000101 + 0o52) + '\065' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(585 - 537) + chr(0b10011 + 0o134) + chr(55) + chr(663 - 615), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(0b11111 + 0o22) + '\067', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + chr(0b101100 + 0o11) + chr(0b110000), 44257 - 44249), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + '\x35', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + '\066' + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(111) + chr(0b101100 + 0o7) + '\x37' + chr(50), 0b1000), nzTpIcepk0o8(chr(1810 - 1762) + chr(111) + '\061' + '\065' + '\x35', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(0b110000) + chr(749 - 694), 8), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + chr(0b110001) + chr(0b110010) + '\064', 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1100010 + 0o15) + '\062' + chr(0b101000 + 0o10) + '\064', 40757 - 40749), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + chr(0b110100) + '\x35', 0b1000), nzTpIcepk0o8('\x30' + chr(4751 - 4640) + '\061' + '\067' + chr(1424 - 1370), 48205 - 48197)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1011011 + 0o24) + chr(518 - 465) + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'x'), chr(0b1100100) + chr(101) + chr(99) + '\x6f' + chr(100) + chr(101))(chr(1807 - 1690) + chr(116) + '\146' + chr(0b101101) + chr(0b10111 + 0o41)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def jY7fpXOQx3i7(hXMPsSrOQzbh, xxhWttsUDUCM):
hXMPsSrOQzbh.HLjsIaE8D81b = None
hXMPsSrOQzbh.osReZaQvKRBg = nzTpIcepk0o8(chr(48) + '\157' + chr(661 - 613), ord("\x08"))
hXMPsSrOQzbh._ItQq3GtMWVd = hXMPsSrOQzbh._init_retry_interval
if suIjIS24Zkqw(xxhWttsUDUCM, WqTcOGBMJIY7) and (not roI3spqORKae(xxhWttsUDUCM, roI3spqORKae(ES5oEprVxulp(b'\x02\xddX7\xeb\x90Ms.K\x12n'), chr(0b1100100) + '\x65' + '\143' + '\x6f' + chr(8981 - 8881) + chr(1018 - 917))(chr(117) + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\070'))(RWc1hmEI5UUT, rTQ_IW2VS3hY)):
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b"'\xd5\x01\x17\xf3\xa9,n+d+P"), chr(0b111 + 0o135) + chr(101) + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')('\x75' + chr(116) + chr(0b1100110) + '\x2d' + chr(2881 - 2825)))(roI3spqORKae(ES5oEprVxulp(b"\x10\xddY\x0c\xef\xab\x19\x189D\x14QCg\xff\\9[\x1am\xa4\x82X\xaa\xf5\xab}X]\x10\n|\x87\x99\x05\x98'\xe1\xcb\x1al\x9c\x15\x12\x90\xfc\x0e"), '\144' + chr(101) + chr(9608 - 9509) + chr(3169 - 3058) + chr(0b1010100 + 0o20) + chr(0b1010000 + 0o25))(chr(6305 - 6188) + '\164' + '\x66' + '\x2d' + chr(0b11000 + 0o40)), xxhWttsUDUCM, roI3spqORKae(xxhWttsUDUCM, roI3spqORKae(ES5oEprVxulp(b'1\xd9D4\xe8\xb8\x1f]?@\x03_'), chr(0b1010111 + 0o15) + '\145' + '\x63' + chr(111) + chr(0b1100100) + '\145')('\165' + chr(0b0 + 0o164) + chr(102) + chr(0b101101) + chr(2480 - 2424)))())
return |
ciena/afkak | afkak/producer.py | Producer._check_send_batch | def _check_send_batch(self, result=None):
"""Check if we have enough messages/bytes to send
Since this can be called from the callback chain, we
pass through our first (non-self) arg
"""
if (
(self.batch_every_n and self.batch_every_n <= self._waitingMsgCount) or
(self.batch_every_b and self.batch_every_b <= self._waitingByteCount)
):
self._send_batch()
return result | python | def _check_send_batch(self, result=None):
"""Check if we have enough messages/bytes to send
Since this can be called from the callback chain, we
pass through our first (non-self) arg
"""
if (
(self.batch_every_n and self.batch_every_n <= self._waitingMsgCount) or
(self.batch_every_b and self.batch_every_b <= self._waitingByteCount)
):
self._send_batch()
return result | [
"def",
"_check_send_batch",
"(",
"self",
",",
"result",
"=",
"None",
")",
":",
"if",
"(",
"(",
"self",
".",
"batch_every_n",
"and",
"self",
".",
"batch_every_n",
"<=",
"self",
".",
"_waitingMsgCount",
")",
"or",
"(",
"self",
".",
"batch_every_b",
"and",
"self",
".",
"batch_every_b",
"<=",
"self",
".",
"_waitingByteCount",
")",
")",
":",
"self",
".",
"_send_batch",
"(",
")",
"return",
"result"
] | Check if we have enough messages/bytes to send
Since this can be called from the callback chain, we
pass through our first (non-self) arg | [
"Check",
"if",
"we",
"have",
"enough",
"messages",
"/",
"bytes",
"to",
"send",
"Since",
"this",
"can",
"be",
"called",
"from",
"the",
"callback",
"chain",
"we",
"pass",
"through",
"our",
"first",
"(",
"non",
"-",
"self",
")",
"arg"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/producer.py#L396-L406 | train | Check if we have enough messages to send | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,m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e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1282 - 1234) + '\157' + chr(0b110010) + '\x35' + '\064', 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + '\066' + chr(1076 - 1022), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(51) + chr(0b110010) + '\066', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(666 - 616) + chr(0b110011) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(54) + chr(1165 - 1110), 12642 - 12634), nzTpIcepk0o8(chr(0b110000) + chr(0b1100100 + 0o13) + '\x32' + '\067' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(1785 - 1737) + chr(3766 - 3655) + chr(49) + '\x37' + '\060', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(54) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(0b10010 + 0o36) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b110001 + 0o76) + chr(0b1101 + 0o44) + chr(331 - 277) + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(315 - 204) + chr(0b0 + 0o62) + chr(2169 - 2121) + chr(0b110101), 0b1000), nzTpIcepk0o8('\060' + chr(0b1011101 + 0o22) + '\x36' + '\x31', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(8254 - 8143) + chr(0b10011 + 0o36) + chr(0b101111 + 0o2) + chr(0b1001 + 0o54), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(54) + chr(0b10110 + 0o34), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b110011) + chr(0b10011 + 0o43), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1318 - 1268) + '\x37' + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\x6f' + '\067' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1100 + 0o143) + chr(2391 - 2341) + chr(50) + chr(0b110111), 0o10), nzTpIcepk0o8('\060' + chr(0b111010 + 0o65) + chr(0b110100) + '\x35', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(55) + chr(0b110010), 48375 - 48367), nzTpIcepk0o8('\060' + chr(0b111110 + 0o61) + '\062' + chr(0b110011) + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110100) + '\x36', 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + chr(0b110011) + chr(0b110011), 13734 - 13726), nzTpIcepk0o8(chr(1215 - 1167) + '\157' + chr(0b110010) + '\063' + chr(0b101101 + 0o4), 8), nzTpIcepk0o8(chr(48) + chr(5236 - 5125) + chr(0b110011) + chr(1756 - 1703) + chr(839 - 789), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(0b1011 + 0o47) + chr(0b111 + 0o56), 54434 - 54426), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + '\x30' + chr(1143 - 1091), 0b1000), nzTpIcepk0o8(chr(499 - 451) + chr(111) + chr(0b10101 + 0o35) + chr(0b10101 + 0o37) + '\065', 18517 - 18509), nzTpIcepk0o8(chr(0b110000) + chr(0b1111 + 0o140) + chr(51) + chr(49) + '\066', 29865 - 29857), nzTpIcepk0o8(chr(48) + chr(111) + chr(52) + chr(440 - 387), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b101111 + 0o3) + '\x31' + chr(0b110001), 9215 - 9207), nzTpIcepk0o8(chr(0b110000) + '\157' + '\066' + chr(49), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(55) + '\062', 0b1000), nzTpIcepk0o8(chr(809 - 761) + '\x6f' + chr(0b10 + 0o57) + chr(0b110110) + chr(48), 0o10), nzTpIcepk0o8(chr(1160 - 1112) + chr(393 - 282) + chr(1097 - 1048) + chr(0b10101 + 0o40) + chr(1331 - 1283), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1087 - 1038) + chr(2092 - 2043) + '\060', 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + '\063' + chr(54) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(55) + chr(0b11001 + 0o33), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b10001 + 0o136) + chr(1053 - 1002) + chr(1825 - 1777), 33514 - 33506), nzTpIcepk0o8(chr(0b110000) + chr(0b1000010 + 0o55) + chr(0b101000 + 0o11) + chr(1587 - 1538), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(510 - 462) + '\157' + chr(53) + chr(110 - 62), 20218 - 20210)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x82'), '\144' + chr(101) + '\x63' + chr(2481 - 2370) + '\x64' + chr(4372 - 4271))('\165' + chr(0b1110100) + chr(102) + '\x2d' + chr(0b110 + 0o62)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def Xe3xvL_zrbuY(hXMPsSrOQzbh, POx95m7SPOVy=None):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xceW\xa2\xfa_\xe2\x1d\x00\xa7\x00\xfcn#'), chr(0b1100100) + chr(0b100 + 0o141) + chr(4100 - 4001) + chr(4783 - 4672) + '\144' + chr(101))(chr(0b1000010 + 0o63) + '\x74' + chr(102) + chr(0b1011 + 0o42) + '\070')) and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xceW\xa2\xfa_\xe2\x1d\x00\xa7\x00\xfcn#'), '\144' + chr(0b1001101 + 0o30) + chr(8676 - 8577) + chr(5402 - 5291) + chr(0b11100 + 0o110) + chr(0b1000 + 0o135))(chr(8778 - 8661) + '\x74' + '\146' + chr(448 - 403) + chr(2981 - 2925))) <= roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe5\x07\x85\xaf\x07\xcf;"\x91G\xc4z'), '\144' + '\145' + '\x63' + '\x6f' + '\144' + chr(1430 - 1329))('\165' + '\x74' + '\146' + chr(0b101101) + chr(336 - 280))) or (roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xceW\xa2\xfa_\xe2\x1d\x00\xa7\x00\xfcn/'), '\x64' + chr(101) + chr(4130 - 4031) + chr(0b1101111) + '\144' + '\145')(chr(0b101110 + 0o107) + chr(0b1110100) + chr(7258 - 7156) + chr(0b101101) + chr(0b10001 + 0o47))) and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xceW\xa2\xfa_\xe2\x1d\x00\xa7\x00\xfcn/'), '\144' + chr(1785 - 1684) + '\x63' + chr(111) + '\144' + chr(0b101111 + 0o66))(chr(117) + chr(6062 - 5946) + '\x66' + chr(0b101101) + chr(0b111000))) <= roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xeat\xb5\xc9{\x85\x1b\x1f\xf1\x18\xffr'), chr(5312 - 5212) + chr(0b1100101) + chr(0b110 + 0o135) + chr(0b1101111) + chr(0b1100100) + chr(0b100011 + 0o102))(chr(0b1011100 + 0o31) + '\x74' + '\146' + '\x2d' + chr(0b111000)))):
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf3E\xb3\xf7S\xe2\x1a\x17\xb6\x11\xed'), '\144' + chr(101) + '\143' + chr(2712 - 2601) + '\x64' + '\145')(chr(7205 - 7088) + chr(0b1110100) + chr(0b10111 + 0o117) + '\x2d' + '\070'))()
return POx95m7SPOVy |
ciena/afkak | afkak/producer.py | Producer._send_batch | def _send_batch(self):
"""
Send the waiting messages, if there are any, and we can...
This is called by our LoopingCall every send_every_t interval, and
from send_messages everytime we have enough messages to send.
This is also called from py:method:`send_messages` via
py:method:`_check_send_batch` if there are enough messages/bytes
to require a send.
Note, the send will be delayed (triggered by completion or failure of
previous) if we are currently trying to complete the last batch send.
"""
# We can be triggered by the LoopingCall, and have nothing to send...
# Or, we've got SendRequest(s) to send, but are still processing the
# previous batch...
if (not self._batch_reqs) or self._batch_send_d:
return
# Save a local copy, and clear the global list & metrics
requests, self._batch_reqs = self._batch_reqs, []
self._waitingByteCount = 0
self._waitingMsgCount = 0
# Iterate over them, fetching the partition for each message batch
d_list = []
for req in requests:
# For each request, we get the topic & key and use that to lookup
# the next partition on which we should produce
d_list.append(self._next_partition(req.topic, req.key))
d = self._batch_send_d = Deferred()
# Since DeferredList doesn't propagate cancel() calls to deferreds it
# might be waiting on for a result, we need to use this structure,
# rather than just using the DeferredList directly
d.addCallback(lambda r: DeferredList(d_list, consumeErrors=True))
d.addCallback(self._send_requests, requests)
# Once we finish fully processing the current batch, clear the
# _batch_send_d and check if any more requests piled up when we
# were busy.
d.addBoth(self._complete_batch_send)
d.addBoth(self._check_send_batch)
# Fire off the callback to start processing...
d.callback(None) | python | def _send_batch(self):
"""
Send the waiting messages, if there are any, and we can...
This is called by our LoopingCall every send_every_t interval, and
from send_messages everytime we have enough messages to send.
This is also called from py:method:`send_messages` via
py:method:`_check_send_batch` if there are enough messages/bytes
to require a send.
Note, the send will be delayed (triggered by completion or failure of
previous) if we are currently trying to complete the last batch send.
"""
# We can be triggered by the LoopingCall, and have nothing to send...
# Or, we've got SendRequest(s) to send, but are still processing the
# previous batch...
if (not self._batch_reqs) or self._batch_send_d:
return
# Save a local copy, and clear the global list & metrics
requests, self._batch_reqs = self._batch_reqs, []
self._waitingByteCount = 0
self._waitingMsgCount = 0
# Iterate over them, fetching the partition for each message batch
d_list = []
for req in requests:
# For each request, we get the topic & key and use that to lookup
# the next partition on which we should produce
d_list.append(self._next_partition(req.topic, req.key))
d = self._batch_send_d = Deferred()
# Since DeferredList doesn't propagate cancel() calls to deferreds it
# might be waiting on for a result, we need to use this structure,
# rather than just using the DeferredList directly
d.addCallback(lambda r: DeferredList(d_list, consumeErrors=True))
d.addCallback(self._send_requests, requests)
# Once we finish fully processing the current batch, clear the
# _batch_send_d and check if any more requests piled up when we
# were busy.
d.addBoth(self._complete_batch_send)
d.addBoth(self._check_send_batch)
# Fire off the callback to start processing...
d.callback(None) | [
"def",
"_send_batch",
"(",
"self",
")",
":",
"# We can be triggered by the LoopingCall, and have nothing to send...",
"# Or, we've got SendRequest(s) to send, but are still processing the",
"# previous batch...",
"if",
"(",
"not",
"self",
".",
"_batch_reqs",
")",
"or",
"self",
".",
"_batch_send_d",
":",
"return",
"# Save a local copy, and clear the global list & metrics",
"requests",
",",
"self",
".",
"_batch_reqs",
"=",
"self",
".",
"_batch_reqs",
",",
"[",
"]",
"self",
".",
"_waitingByteCount",
"=",
"0",
"self",
".",
"_waitingMsgCount",
"=",
"0",
"# Iterate over them, fetching the partition for each message batch",
"d_list",
"=",
"[",
"]",
"for",
"req",
"in",
"requests",
":",
"# For each request, we get the topic & key and use that to lookup",
"# the next partition on which we should produce",
"d_list",
".",
"append",
"(",
"self",
".",
"_next_partition",
"(",
"req",
".",
"topic",
",",
"req",
".",
"key",
")",
")",
"d",
"=",
"self",
".",
"_batch_send_d",
"=",
"Deferred",
"(",
")",
"# Since DeferredList doesn't propagate cancel() calls to deferreds it",
"# might be waiting on for a result, we need to use this structure,",
"# rather than just using the DeferredList directly",
"d",
".",
"addCallback",
"(",
"lambda",
"r",
":",
"DeferredList",
"(",
"d_list",
",",
"consumeErrors",
"=",
"True",
")",
")",
"d",
".",
"addCallback",
"(",
"self",
".",
"_send_requests",
",",
"requests",
")",
"# Once we finish fully processing the current batch, clear the",
"# _batch_send_d and check if any more requests piled up when we",
"# were busy.",
"d",
".",
"addBoth",
"(",
"self",
".",
"_complete_batch_send",
")",
"d",
".",
"addBoth",
"(",
"self",
".",
"_check_send_batch",
")",
"# Fire off the callback to start processing...",
"d",
".",
"callback",
"(",
"None",
")"
] | Send the waiting messages, if there are any, and we can...
This is called by our LoopingCall every send_every_t interval, and
from send_messages everytime we have enough messages to send.
This is also called from py:method:`send_messages` via
py:method:`_check_send_batch` if there are enough messages/bytes
to require a send.
Note, the send will be delayed (triggered by completion or failure of
previous) if we are currently trying to complete the last batch send. | [
"Send",
"the",
"waiting",
"messages",
"if",
"there",
"are",
"any",
"and",
"we",
"can",
"..."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/producer.py#L408-L449 | train | Send the messages in the current batch and return the result. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,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T,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(111) + '\063' + chr(0b1100 + 0o51) + chr(53), 9959 - 9951), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(11829 - 11718) + '\x31' + '\064' + chr(0b11100 + 0o32), 13207 - 13199), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b110110) + chr(0b110110 + 0o0), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x34' + '\x37', 730 - 722), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(48) + chr(0b1101 + 0o43), ord("\x08")), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b1101111) + '\062' + '\065' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\157' + chr(0b110010) + chr(2400 - 2349) + chr(0b11101 + 0o24), 7851 - 7843), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\x6f' + '\x32' + '\x33' + '\x30', 7189 - 7181), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1020 - 969) + chr(0b110111) + chr(0b11001 + 0o33), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + chr(0b101011 + 0o13), ord("\x08")), nzTpIcepk0o8('\060' + chr(8471 - 8360) + chr(416 - 367) + '\x37' + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110 + 0o52) + '\157' + chr(0b111 + 0o52) + chr(704 - 652), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + '\x36' + '\066', 0b1000), nzTpIcepk0o8(chr(1260 - 1212) + chr(0b1101111) + chr(49) + chr(50) + chr(649 - 599), ord("\x08")), nzTpIcepk0o8(chr(1234 - 1186) + '\157' + chr(0b10001 + 0o41) + chr(0b110000) + chr(0b101100 + 0o5), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b101000 + 0o107) + chr(0b110011) + chr(0b1111 + 0o43) + chr(0b101101 + 0o11), ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\x6f' + chr(51) + chr(52) + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101010 + 0o10) + chr(55) + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b110111) + chr(0b10110 + 0o33), 37829 - 37821), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\157' + chr(0b110001) + chr(0b110110) + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1011 + 0o144) + chr(49) + chr(1114 - 1065) + chr(1539 - 1491), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b110110 + 0o71) + chr(0b110100) + chr(55), 8), nzTpIcepk0o8(chr(1965 - 1917) + chr(0b1101111) + chr(0b110011) + chr(0b101110 + 0o2) + '\065', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(2375 - 2324) + chr(1620 - 1569), 41916 - 41908), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b100110 + 0o111) + chr(49) + '\064' + chr(0b100011 + 0o15), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1111 + 0o140) + chr(49) + chr(1726 - 1673) + chr(0b1111 + 0o46), 0b1000), nzTpIcepk0o8('\x30' + chr(4185 - 4074) + chr(51) + chr(0b110101) + chr(1372 - 1319), 8), nzTpIcepk0o8('\x30' + chr(7232 - 7121) + chr(0b1101 + 0o46) + chr(875 - 827) + '\x33', 30323 - 30315), nzTpIcepk0o8('\x30' + chr(111) + chr(1076 - 1027) + chr(55) + chr(1491 - 1438), 0o10), nzTpIcepk0o8(chr(2188 - 2140) + chr(11341 - 11230) + chr(55) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1000100 + 0o53) + '\061' + '\x36' + '\061', 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(473 - 362) + chr(51) + '\x35' + chr(0b110101), 8), nzTpIcepk0o8(chr(0b110000) + chr(2402 - 2291) + '\x31' + '\061' + chr(0b110000), 8), nzTpIcepk0o8(chr(0b111 + 0o51) + '\x6f' + chr(0b10011 + 0o40) + chr(822 - 768) + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11101 + 0o25) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(9710 - 9599) + chr(0b110001) + '\x31' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100110 + 0o13) + chr(51), 53955 - 53947), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110101 + 0o2) + '\067', 0b1000), nzTpIcepk0o8(chr(104 - 56) + '\157' + '\061' + chr(1589 - 1534) + chr(0b1100 + 0o51), 8), nzTpIcepk0o8(chr(118 - 70) + chr(111) + chr(49) + chr(0b10010 + 0o37) + chr(0b110101), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1001110 + 0o41) + '\x35' + '\060', 30027 - 30019)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc3'), chr(0b100001 + 0o103) + chr(7866 - 7765) + chr(4205 - 4106) + '\157' + chr(0b110000 + 0o64) + chr(0b111110 + 0o47))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(1658 - 1613) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def ZW7au0wfZvmQ(hXMPsSrOQzbh):
if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb2\x04\x97S\xa3\xc3\xc6\xea\x99\x7f\x08'), chr(0b1100100) + chr(0b1010101 + 0o20) + chr(99) + '\157' + '\x64' + chr(0b1100101))(chr(117) + '\164' + '\x66' + '\x2d' + chr(0b100100 + 0o24))) or roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa5*\x9cT\x89\xca\xdc\xa0\xb86Jn'), chr(7826 - 7726) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(6120 - 6020) + chr(0b1100101))('\165' + chr(9954 - 9838) + chr(102) + chr(1940 - 1895) + chr(0b111000))):
return
(dDl_g5qi6_rH, hXMPsSrOQzbh.qZGmJaab48hq) = (hXMPsSrOQzbh.qZGmJaab48hq, [])
hXMPsSrOQzbh.FBcPL8ci3jzC = nzTpIcepk0o8(chr(48) + chr(0b1101001 + 0o6) + chr(451 - 403), 35178 - 35170)
hXMPsSrOQzbh.I1S60rCTS5AK = nzTpIcepk0o8('\x30' + '\157' + '\060', 8)
PXwCMprDEmwl = []
for EycgE8NTwf_z in dDl_g5qi6_rH:
roI3spqORKae(PXwCMprDEmwl, roI3spqORKae(ES5oEprVxulp(b'\xa52\xa5\x13\xb8\xcc\xde\xf7\x96a.9'), chr(100) + chr(3255 - 3154) + chr(99) + chr(1270 - 1159) + chr(100) + '\x65')(chr(117) + '\164' + '\146' + chr(0b1 + 0o54) + chr(0b101001 + 0o17)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb2\x08\x93_\xb4\xf4\xe9\xf9\x8ez\x12x\xdf=\xef'), chr(0b1100100) + '\145' + chr(4863 - 4764) + '\x6f' + '\144' + '\x65')(chr(0b101000 + 0o115) + chr(7132 - 7016) + chr(0b1100110) + chr(45) + chr(56)))(roI3spqORKae(EycgE8NTwf_z, roI3spqORKae(ES5oEprVxulp(b'\x88\x02\x92c\x86\xe4\xdc\xde\x85<\x1fD'), chr(0b1101 + 0o127) + chr(9279 - 9178) + chr(0b1100011) + chr(0b100011 + 0o114) + '\x64' + chr(767 - 666))(chr(3415 - 3298) + chr(0b111 + 0o155) + '\x66' + chr(0b10010 + 0o33) + '\x38')), roI3spqORKae(EycgE8NTwf_z, roI3spqORKae(ES5oEprVxulp(b'\xbc?\x99C\xa3\xd8\xdd\xec\x93I\n;'), '\x64' + chr(5617 - 5516) + '\143' + chr(111) + chr(9141 - 9041) + chr(0b1001110 + 0o27))(chr(0b1110101) + chr(116) + chr(0b1100110) + '\055' + chr(0b111000)))))
vPPlOXQgR3SM = hXMPsSrOQzbh.HLjsIaE8D81b = LbNAbjjo5q4l()
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\x8c\x02\x92d\xa1\xc7\xf5\xfa\x9dm\x10'), chr(0b1100100) + chr(0b1100101) + chr(0b11001 + 0o112) + '\x6f' + chr(100) + chr(0b100100 + 0o101))(chr(3857 - 3740) + '\164' + chr(0b1100110) + chr(868 - 823) + chr(56)))(lambda LCrwg7lcbmU9: haqhkdLPHTak(PXwCMprDEmwl, consumeErrors=nzTpIcepk0o8(chr(48) + chr(0b111110 + 0o61) + chr(49), 54571 - 54563)))
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\x8c\x02\x92d\xa1\xc7\xf5\xfa\x9dm\x10'), chr(7997 - 7897) + '\145' + chr(0b1010 + 0o131) + '\x6f' + '\144' + '\x65')(chr(0b1110101) + '\x74' + chr(4834 - 4732) + chr(0b101101) + chr(0b101010 + 0o16)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb2\x15\x93I\xa4\xf4\xeb\xfd\x8d{\x1e\x7f\xc2!'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(111) + '\144' + '\145')('\x75' + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(1438 - 1382))), dDl_g5qi6_rH)
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\x8c\x02\x92e\xaf\xdf\xf1'), '\x64' + '\x65' + chr(0b110010 + 0o61) + '\x6f' + chr(122 - 22) + chr(4343 - 4242))(chr(0b10000 + 0o145) + chr(11634 - 11518) + chr(9608 - 9506) + '\055' + chr(0b11000 + 0o40)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb2\x05\x99J\xb0\xc7\xfc\xec\x99Q\x19m\xc21\xe9\x89\x96\xdb\x97\x12'), chr(0b100101 + 0o77) + chr(0b1100101) + chr(0b111010 + 0o51) + '\157' + '\144' + '\x65')('\x75' + chr(116) + chr(0b1000001 + 0o45) + chr(45) + '\070')))
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\x8c\x02\x92e\xaf\xdf\xf1'), '\x64' + chr(0b1011110 + 0o7) + chr(401 - 302) + chr(7497 - 7386) + chr(0b1011100 + 0o10) + chr(0b1100101))('\165' + '\164' + chr(0b1100110) + '\055' + chr(0b111000)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb2\x05\x9eB\xa3\xc0\xc6\xeb\x99`\x1fS\xd43\xf5\xb5\x8d'), chr(0b110000 + 0o64) + chr(5630 - 5529) + '\x63' + chr(3960 - 3849) + '\144' + chr(0b1100101))(chr(0b1000101 + 0o60) + chr(116) + '\146' + chr(0b101101) + chr(556 - 500))))
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\x87!\xc3l\x95\x9f\xcc\xcd\xbb`\x109'), chr(100) + chr(0b111111 + 0o46) + '\x63' + chr(0b1101111) + '\x64' + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(1667 - 1622) + '\x38'))(None) |
ciena/afkak | afkak/producer.py | Producer._cancel_send_messages | def _cancel_send_messages(self, d):
"""Cancel a `send_messages` request
First check if the request is in a waiting batch, of so, great, remove
it from the batch. If it's not found, we errback() the deferred and
the downstream processing steps take care of aborting further
processing.
We check if there's a current _batch_send_d to determine where in the
chain we were (getting partitions, or already sent request to Kafka)
and errback differently.
"""
# Is the request in question in an unsent batch?
for req in self._batch_reqs:
if req.deferred == d:
# Found the request, remove it and return.
msgs = req.messages
self._waitingMsgCount -= len(msgs)
for m in (_m for _m in msgs if _m is not None):
self._waitingByteCount -= len(m)
# This _should_ be safe as we abort the iteration upon removal
self._batch_reqs.remove(req)
d.errback(CancelledError(request_sent=False))
return
# If it wasn't found in the unsent batch. We just rely on the
# downstream processing of the request to check if the deferred
# has been called and skip further processing for this request
# Errback the deferred with whether or not we sent the request
# to Kafka already
d.errback(
CancelledError(request_sent=(self._batch_send_d is not None)))
return | python | def _cancel_send_messages(self, d):
"""Cancel a `send_messages` request
First check if the request is in a waiting batch, of so, great, remove
it from the batch. If it's not found, we errback() the deferred and
the downstream processing steps take care of aborting further
processing.
We check if there's a current _batch_send_d to determine where in the
chain we were (getting partitions, or already sent request to Kafka)
and errback differently.
"""
# Is the request in question in an unsent batch?
for req in self._batch_reqs:
if req.deferred == d:
# Found the request, remove it and return.
msgs = req.messages
self._waitingMsgCount -= len(msgs)
for m in (_m for _m in msgs if _m is not None):
self._waitingByteCount -= len(m)
# This _should_ be safe as we abort the iteration upon removal
self._batch_reqs.remove(req)
d.errback(CancelledError(request_sent=False))
return
# If it wasn't found in the unsent batch. We just rely on the
# downstream processing of the request to check if the deferred
# has been called and skip further processing for this request
# Errback the deferred with whether or not we sent the request
# to Kafka already
d.errback(
CancelledError(request_sent=(self._batch_send_d is not None)))
return | [
"def",
"_cancel_send_messages",
"(",
"self",
",",
"d",
")",
":",
"# Is the request in question in an unsent batch?",
"for",
"req",
"in",
"self",
".",
"_batch_reqs",
":",
"if",
"req",
".",
"deferred",
"==",
"d",
":",
"# Found the request, remove it and return.",
"msgs",
"=",
"req",
".",
"messages",
"self",
".",
"_waitingMsgCount",
"-=",
"len",
"(",
"msgs",
")",
"for",
"m",
"in",
"(",
"_m",
"for",
"_m",
"in",
"msgs",
"if",
"_m",
"is",
"not",
"None",
")",
":",
"self",
".",
"_waitingByteCount",
"-=",
"len",
"(",
"m",
")",
"# This _should_ be safe as we abort the iteration upon removal",
"self",
".",
"_batch_reqs",
".",
"remove",
"(",
"req",
")",
"d",
".",
"errback",
"(",
"CancelledError",
"(",
"request_sent",
"=",
"False",
")",
")",
"return",
"# If it wasn't found in the unsent batch. We just rely on the",
"# downstream processing of the request to check if the deferred",
"# has been called and skip further processing for this request",
"# Errback the deferred with whether or not we sent the request",
"# to Kafka already",
"d",
".",
"errback",
"(",
"CancelledError",
"(",
"request_sent",
"=",
"(",
"self",
".",
"_batch_send_d",
"is",
"not",
"None",
")",
")",
")",
"return"
] | Cancel a `send_messages` request
First check if the request is in a waiting batch, of so, great, remove
it from the batch. If it's not found, we errback() the deferred and
the downstream processing steps take care of aborting further
processing.
We check if there's a current _batch_send_d to determine where in the
chain we were (getting partitions, or already sent request to Kafka)
and errback differently. | [
"Cancel",
"a",
"send_messages",
"request",
"First",
"check",
"if",
"the",
"request",
"is",
"in",
"a",
"waiting",
"batch",
"of",
"so",
"great",
"remove",
"it",
"from",
"the",
"batch",
".",
"If",
"it",
"s",
"not",
"found",
"we",
"errback",
"()",
"the",
"deferred",
"and",
"the",
"downstream",
"processing",
"steps",
"take",
"care",
"of",
"aborting",
"further",
"processing",
".",
"We",
"check",
"if",
"there",
"s",
"a",
"current",
"_batch_send_d",
"to",
"determine",
"where",
"in",
"the",
"chain",
"we",
"were",
"(",
"getting",
"partitions",
"or",
"already",
"sent",
"request",
"to",
"Kafka",
")",
"and",
"errback",
"differently",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/producer.py#L451-L481 | train | Cancel a send_messages request. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlDKpyPtQ,z18h6aCn31dg,oxjHmqoBrCHG,G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gW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(7777 - 7666) + chr(0b11000 + 0o31) + '\x35' + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\064' + chr(0b110111), 22872 - 22864), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110 + 0o53) + chr(0b10101 + 0o41) + '\x35', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + '\065' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(466 - 418) + '\157' + '\x32' + '\061' + chr(0b11001 + 0o30), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(0b110010) + chr(55), 0b1000), nzTpIcepk0o8('\x30' + chr(2682 - 2571) + chr(0b101101 + 0o4) + chr(0b110001) + chr(53), 0o10), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1101111) + chr(708 - 658) + '\x33' + chr(0b110111), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(1261 - 1211) + chr(48) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000110 + 0o51) + chr(790 - 737) + chr(0b110100 + 0o1), 30165 - 30157), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + '\065', 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\x6f' + '\x33' + chr(49) + chr(49), 50705 - 50697), nzTpIcepk0o8(chr(732 - 684) + chr(0b1101111) + chr(1226 - 1177) + chr(0b101001 + 0o13) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b101 + 0o54) + '\064' + chr(49), 9521 - 9513), nzTpIcepk0o8(chr(1546 - 1498) + '\x6f' + chr(54) + chr(1690 - 1636), 47320 - 47312), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(0b100000 + 0o22) + chr(54), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + '\064' + '\x37', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(0b11101 + 0o25) + chr(0b110001 + 0o6), 8), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\157' + chr(0b10111 + 0o32) + chr(0b110001) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(3331 - 3220) + chr(0b0 + 0o62) + chr(50) + chr(49), 47605 - 47597), nzTpIcepk0o8(chr(0b110000) + chr(7823 - 7712) + chr(0b110010) + '\062' + chr(0b110001), 8), nzTpIcepk0o8(chr(239 - 191) + chr(5162 - 5051) + '\x32' + chr(0b110000) + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + chr(2852 - 2797) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\065' + chr(52), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x37' + chr(0b110000 + 0o2), 54582 - 54574), nzTpIcepk0o8(chr(2259 - 2211) + chr(0b1101111) + chr(0b100011 + 0o17) + chr(53), 8), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + chr(51) + chr(0b110011) + chr(0b11011 + 0o31), 24017 - 24009), nzTpIcepk0o8(chr(0b110000) + chr(0b1011111 + 0o20) + chr(0b110010) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1771 - 1722) + '\066' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10 + 0o61) + chr(53) + chr(0b100 + 0o61), 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(8046 - 7935) + '\062' + chr(0b100000 + 0o27) + '\x35', 33590 - 33582), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(111) + '\062' + chr(658 - 609) + chr(0b100110 + 0o20), 61592 - 61584), nzTpIcepk0o8(chr(0b110000) + chr(9815 - 9704) + '\x31' + chr(968 - 917) + chr(49), 54821 - 54813), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(0b10011 + 0o35) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(2073 - 2025) + chr(8546 - 8435) + '\064' + chr(49), 29781 - 29773), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(52) + chr(451 - 401), 0o10), nzTpIcepk0o8(chr(2212 - 2164) + '\x6f' + chr(51) + chr(48) + chr(0b100001 + 0o20), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(10700 - 10589) + '\x31' + chr(0b110011) + '\067', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x34', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(2007 - 1954) + chr(2436 - 2385), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2001 - 1948) + chr(0b110000), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'E'), '\144' + '\145' + chr(0b1001101 + 0o26) + chr(3421 - 3310) + chr(0b111 + 0o135) + chr(2698 - 2597))('\x75' + '\x74' + '\x66' + chr(0b1101 + 0o40) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def bC9uia6HcNf7(hXMPsSrOQzbh, vPPlOXQgR3SM):
for EycgE8NTwf_z in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x1a}2\x07\xc3\xb6,\xfd\xb2\x15}\xb8'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(111) + '\x64' + '\145')(chr(117) + chr(0b1110010 + 0o2) + chr(0b1100110) + '\055' + chr(56))):
if roI3spqORKae(EycgE8NTwf_z, roI3spqORKae(ES5oEprVxulp(b'=s\x06]\xca\x83\t\xf4\xc4^a\xb1'), chr(100) + chr(0b100001 + 0o104) + chr(0b1100011) + chr(0b1011001 + 0o26) + '\144' + '\145')('\165' + chr(0b1110100) + chr(102) + chr(0b100 + 0o51) + '\070')) == vPPlOXQgR3SM:
JwoaGf5NPDhM = EycgE8NTwf_z.szk4GvfzF2PT
hXMPsSrOQzbh.I1S60rCTS5AK -= ftfygxgFas5X(JwoaGf5NPDhM)
for tF75nqoNENFL in (aum4H97xcPTs for aum4H97xcPTs in JwoaGf5NPDhM if aum4H97xcPTs is not None):
hXMPsSrOQzbh.FBcPL8ci3jzC -= ftfygxgFas5X(tF75nqoNENFL)
roI3spqORKae(hXMPsSrOQzbh._batch_reqs, roI3spqORKae(ES5oEprVxulp(b'\x1bj\x19?\xe1\xb3\x7f\xd5\xebfT\x8c'), '\x64' + chr(1773 - 1672) + '\x63' + chr(0b111 + 0o150) + chr(100) + chr(0b1011011 + 0o12))('\x75' + chr(116) + chr(0b1100110) + '\x2d' + chr(56)))(EycgE8NTwf_z)
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'#DDR\xcf\xe7\x08\xaf\xf6jZ\x88'), chr(100) + '\x65' + '\143' + chr(0b101100 + 0o103) + chr(0b11111 + 0o105) + '\145')('\x75' + '\164' + chr(0b1100110) + chr(0b101101) + chr(56)))(rTQ_IW2VS3hY(request_sent=nzTpIcepk0o8(chr(48) + '\x6f' + chr(48), 0o10)))
return
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'#DDR\xcf\xe7\x08\xaf\xf6jZ\x88'), '\144' + '\x65' + chr(0b1100011) + chr(111) + chr(100) + '\145')('\x75' + chr(0b1110011 + 0o1) + chr(0b1100110) + chr(45) + chr(0b11111 + 0o31)))(rTQ_IW2VS3hY(request_sent=roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'#k\x1f\x19\xc0\xb6\x08\xa7\xc2\x15$\xab'), chr(0b100 + 0o140) + chr(9591 - 9490) + '\143' + chr(11500 - 11389) + chr(8735 - 8635) + chr(101))(chr(0b100111 + 0o116) + chr(0b101101 + 0o107) + '\x66' + chr(45) + chr(0b111000))) is not None))
return |
ciena/afkak | afkak/producer.py | Producer._handle_send_response | def _handle_send_response(self, result, payloadsByTopicPart,
deferredsByTopicPart):
"""Handle the response from our client to our send_produce_request
This is a bit complex. Failures can happen in a few ways:
1. The client sent an empty list, False, None or some similar thing
as the result, but we were expecting real responses.
2. The client had a failure before it even tried sending any requests
to any brokers.
a. Kafka error: See if we can retry the whole request
b. Non-kafka: Figure it's a programming error, fail all deferreds
3. The client sent all the requests (it's all or none) to the brokers
but one or more request failed (timed out before receiving a
response, or the brokerclient threw some sort of exception on send
In this case, the client throws FailedPayloadsError, and attaches
the responses (NOTE: some can have errors!), and the payloads
where the send itself failed to the exception.
4. The client sent all the requests, all responses were received, but
the Kafka broker indicated an error with servicing the request on
some of the responses.
"""
def _deliver_result(d_list, result=None):
"""Possibly callback each deferred in a list with single result"""
for d in d_list:
if not isinstance(d, Deferred):
# nested list...
_deliver_result(d, result)
else:
# We check d.called since the request could have been
# cancelled while we waited for the response
if not d.called:
d.callback(result)
def _do_retry(payloads):
# We use 'fail_on_error=False' because we want our client to
# process every response that comes back from the brokers so
# we can determine which requests were successful, and which
# failed for retry
d = self.client.send_produce_request(
payloads, acks=self.req_acks, timeout=self.ack_timeout,
fail_on_error=False)
self._req_attempts += 1
# add our handlers
d.addBoth(self._handle_send_response, payloadsByTopicPart,
deferredsByTopicPart)
return d
def _cancel_retry(failure, dc):
# Cancel the retry callLater and pass-thru the failure
dc.cancel()
# cancel all the top-level deferreds associated with the request
_deliver_result(deferredsByTopicPart.values(), failure)
return failure
def _check_retry_payloads(failed_payloads_with_errs):
"""Check our retry count and retry after a delay or errback
If we have more retries to try, create a deferred that will fire
with the result of delayed retry. If not, errback the remaining
deferreds with failure
Params:
failed_payloads - list of (payload, failure) tuples
"""
# Do we have retries left?
if self._req_attempts >= self._max_attempts:
# No, no retries left, fail each failed_payload with its
# associated failure
for p, f in failed_payloads_with_errs:
t_and_p = TopicAndPartition(p.topic, p.partition)
_deliver_result(deferredsByTopicPart[t_and_p], f)
return
# Retries remain! Schedule one...
d = Deferred()
dc = self.client.reactor.callLater(
self._retry_interval, d.callback, [p for p, f in
failed_payloads])
self._retry_interval *= self.RETRY_INTERVAL_FACTOR
# Cancel the callLater when request is cancelled before it fires
d.addErrback(_cancel_retry, dc)
# Reset the topic metadata for all topics which had failed_requests
# where the failures were of the kind UnknownTopicOrPartitionError
# or NotLeaderForPartitionError, since those indicate our client's
# metadata is out of date.
reset_topics = set()
for payload, e in failed_payloads:
if (isinstance(e, NotLeaderForPartitionError) or
isinstance(e, UnknownTopicOrPartitionError)):
reset_topics.add(payload.topic)
if reset_topics:
self.client.reset_topic_metadata(*reset_topics)
d.addCallback(_do_retry)
return d
# The payloads we need to retry, if we still can..
failed_payloads = []
# In the case we are sending requests without requiring acks, the
# brokerclient will immediately callback() the deferred upon send with
# None. In that case, we just iterate over all the deferreds in
# deferredsByTopicPart and callback them with None
# If we are expecting responses/acks, and we get an empty result, we
# callback with a Failure of NoResponseError
if not result:
# Success, but no results, is that what we're expecting?
if self.req_acks == PRODUCER_ACK_NOT_REQUIRED:
result = None
else:
# We got no result, but we were expecting one? Fail everything!
result = Failure(NoResponseError())
_deliver_result(deferredsByTopicPart.values(), result)
return
elif isinstance(result, Failure):
# Failure! Was it total, or partial?
if not result.check(FailedPayloadsError):
# Total failure of some sort!
# The client was unable to send the request at all. If it's
# a KafkaError (probably Leader/Partition unavailable), retry
if result.check(KafkaError):
# Yep, a kafak error. Set failed_payloads, and we'll retry
# them all below. Set failure for errback to callers if we
# are all out of retries
failure, result = result, [] # no succesful results, retry
failed_payloads = [(p, failure) for p in
payloadsByTopicPart.values()]
else:
# Was the request cancelled?
if not result.check(tid_CancelledError):
# Uh Oh, programming error? Log it!
log.error("Unexpected failure: %r in "
"_handle_send_response", result)
# Cancelled, or programming error, we fail the requests
_deliver_result(deferredsByTopicPart.values(), result)
return
else:
# FailedPayloadsError: This means that some/all of the
# requests to a/some brokerclients failed to send.
# Pull the successful responses and the failed_payloads off
# the exception and handle them below. Preserve the
# FailedPayloadsError as 'failure'
failure = result
result = failure.value.args[0]
failed_payloads = failure.value.args[1]
# Do we have results? Iterate over them and if the response indicates
# success, then callback the associated deferred. If the response
# indicates an error, then setup that request for retry.
# NOTE: In this case, each failed_payload get it's own error...
for res in result:
t_and_p = TopicAndPartition(res.topic, res.partition)
t_and_p_err = _check_error(res, raiseException=False)
if not t_and_p_err:
# Success for this topic/partition
d_list = deferredsByTopicPart[t_and_p]
_deliver_result(d_list, res)
else:
p = payloadsByTopicPart[t_and_p]
failed_payloads.append((p, t_and_p_err))
# Were there any failed requests to possibly retry?
if failed_payloads:
return _check_retry_payloads(failed_payloads)
return | python | def _handle_send_response(self, result, payloadsByTopicPart,
deferredsByTopicPart):
"""Handle the response from our client to our send_produce_request
This is a bit complex. Failures can happen in a few ways:
1. The client sent an empty list, False, None or some similar thing
as the result, but we were expecting real responses.
2. The client had a failure before it even tried sending any requests
to any brokers.
a. Kafka error: See if we can retry the whole request
b. Non-kafka: Figure it's a programming error, fail all deferreds
3. The client sent all the requests (it's all or none) to the brokers
but one or more request failed (timed out before receiving a
response, or the brokerclient threw some sort of exception on send
In this case, the client throws FailedPayloadsError, and attaches
the responses (NOTE: some can have errors!), and the payloads
where the send itself failed to the exception.
4. The client sent all the requests, all responses were received, but
the Kafka broker indicated an error with servicing the request on
some of the responses.
"""
def _deliver_result(d_list, result=None):
"""Possibly callback each deferred in a list with single result"""
for d in d_list:
if not isinstance(d, Deferred):
# nested list...
_deliver_result(d, result)
else:
# We check d.called since the request could have been
# cancelled while we waited for the response
if not d.called:
d.callback(result)
def _do_retry(payloads):
# We use 'fail_on_error=False' because we want our client to
# process every response that comes back from the brokers so
# we can determine which requests were successful, and which
# failed for retry
d = self.client.send_produce_request(
payloads, acks=self.req_acks, timeout=self.ack_timeout,
fail_on_error=False)
self._req_attempts += 1
# add our handlers
d.addBoth(self._handle_send_response, payloadsByTopicPart,
deferredsByTopicPart)
return d
def _cancel_retry(failure, dc):
# Cancel the retry callLater and pass-thru the failure
dc.cancel()
# cancel all the top-level deferreds associated with the request
_deliver_result(deferredsByTopicPart.values(), failure)
return failure
def _check_retry_payloads(failed_payloads_with_errs):
"""Check our retry count and retry after a delay or errback
If we have more retries to try, create a deferred that will fire
with the result of delayed retry. If not, errback the remaining
deferreds with failure
Params:
failed_payloads - list of (payload, failure) tuples
"""
# Do we have retries left?
if self._req_attempts >= self._max_attempts:
# No, no retries left, fail each failed_payload with its
# associated failure
for p, f in failed_payloads_with_errs:
t_and_p = TopicAndPartition(p.topic, p.partition)
_deliver_result(deferredsByTopicPart[t_and_p], f)
return
# Retries remain! Schedule one...
d = Deferred()
dc = self.client.reactor.callLater(
self._retry_interval, d.callback, [p for p, f in
failed_payloads])
self._retry_interval *= self.RETRY_INTERVAL_FACTOR
# Cancel the callLater when request is cancelled before it fires
d.addErrback(_cancel_retry, dc)
# Reset the topic metadata for all topics which had failed_requests
# where the failures were of the kind UnknownTopicOrPartitionError
# or NotLeaderForPartitionError, since those indicate our client's
# metadata is out of date.
reset_topics = set()
for payload, e in failed_payloads:
if (isinstance(e, NotLeaderForPartitionError) or
isinstance(e, UnknownTopicOrPartitionError)):
reset_topics.add(payload.topic)
if reset_topics:
self.client.reset_topic_metadata(*reset_topics)
d.addCallback(_do_retry)
return d
# The payloads we need to retry, if we still can..
failed_payloads = []
# In the case we are sending requests without requiring acks, the
# brokerclient will immediately callback() the deferred upon send with
# None. In that case, we just iterate over all the deferreds in
# deferredsByTopicPart and callback them with None
# If we are expecting responses/acks, and we get an empty result, we
# callback with a Failure of NoResponseError
if not result:
# Success, but no results, is that what we're expecting?
if self.req_acks == PRODUCER_ACK_NOT_REQUIRED:
result = None
else:
# We got no result, but we were expecting one? Fail everything!
result = Failure(NoResponseError())
_deliver_result(deferredsByTopicPart.values(), result)
return
elif isinstance(result, Failure):
# Failure! Was it total, or partial?
if not result.check(FailedPayloadsError):
# Total failure of some sort!
# The client was unable to send the request at all. If it's
# a KafkaError (probably Leader/Partition unavailable), retry
if result.check(KafkaError):
# Yep, a kafak error. Set failed_payloads, and we'll retry
# them all below. Set failure for errback to callers if we
# are all out of retries
failure, result = result, [] # no succesful results, retry
failed_payloads = [(p, failure) for p in
payloadsByTopicPart.values()]
else:
# Was the request cancelled?
if not result.check(tid_CancelledError):
# Uh Oh, programming error? Log it!
log.error("Unexpected failure: %r in "
"_handle_send_response", result)
# Cancelled, or programming error, we fail the requests
_deliver_result(deferredsByTopicPart.values(), result)
return
else:
# FailedPayloadsError: This means that some/all of the
# requests to a/some brokerclients failed to send.
# Pull the successful responses and the failed_payloads off
# the exception and handle them below. Preserve the
# FailedPayloadsError as 'failure'
failure = result
result = failure.value.args[0]
failed_payloads = failure.value.args[1]
# Do we have results? Iterate over them and if the response indicates
# success, then callback the associated deferred. If the response
# indicates an error, then setup that request for retry.
# NOTE: In this case, each failed_payload get it's own error...
for res in result:
t_and_p = TopicAndPartition(res.topic, res.partition)
t_and_p_err = _check_error(res, raiseException=False)
if not t_and_p_err:
# Success for this topic/partition
d_list = deferredsByTopicPart[t_and_p]
_deliver_result(d_list, res)
else:
p = payloadsByTopicPart[t_and_p]
failed_payloads.append((p, t_and_p_err))
# Were there any failed requests to possibly retry?
if failed_payloads:
return _check_retry_payloads(failed_payloads)
return | [
"def",
"_handle_send_response",
"(",
"self",
",",
"result",
",",
"payloadsByTopicPart",
",",
"deferredsByTopicPart",
")",
":",
"def",
"_deliver_result",
"(",
"d_list",
",",
"result",
"=",
"None",
")",
":",
"\"\"\"Possibly callback each deferred in a list with single result\"\"\"",
"for",
"d",
"in",
"d_list",
":",
"if",
"not",
"isinstance",
"(",
"d",
",",
"Deferred",
")",
":",
"# nested list...",
"_deliver_result",
"(",
"d",
",",
"result",
")",
"else",
":",
"# We check d.called since the request could have been",
"# cancelled while we waited for the response",
"if",
"not",
"d",
".",
"called",
":",
"d",
".",
"callback",
"(",
"result",
")",
"def",
"_do_retry",
"(",
"payloads",
")",
":",
"# We use 'fail_on_error=False' because we want our client to",
"# process every response that comes back from the brokers so",
"# we can determine which requests were successful, and which",
"# failed for retry",
"d",
"=",
"self",
".",
"client",
".",
"send_produce_request",
"(",
"payloads",
",",
"acks",
"=",
"self",
".",
"req_acks",
",",
"timeout",
"=",
"self",
".",
"ack_timeout",
",",
"fail_on_error",
"=",
"False",
")",
"self",
".",
"_req_attempts",
"+=",
"1",
"# add our handlers",
"d",
".",
"addBoth",
"(",
"self",
".",
"_handle_send_response",
",",
"payloadsByTopicPart",
",",
"deferredsByTopicPart",
")",
"return",
"d",
"def",
"_cancel_retry",
"(",
"failure",
",",
"dc",
")",
":",
"# Cancel the retry callLater and pass-thru the failure",
"dc",
".",
"cancel",
"(",
")",
"# cancel all the top-level deferreds associated with the request",
"_deliver_result",
"(",
"deferredsByTopicPart",
".",
"values",
"(",
")",
",",
"failure",
")",
"return",
"failure",
"def",
"_check_retry_payloads",
"(",
"failed_payloads_with_errs",
")",
":",
"\"\"\"Check our retry count and retry after a delay or errback\n\n If we have more retries to try, create a deferred that will fire\n with the result of delayed retry. If not, errback the remaining\n deferreds with failure\n\n Params:\n failed_payloads - list of (payload, failure) tuples\n \"\"\"",
"# Do we have retries left?",
"if",
"self",
".",
"_req_attempts",
">=",
"self",
".",
"_max_attempts",
":",
"# No, no retries left, fail each failed_payload with its",
"# associated failure",
"for",
"p",
",",
"f",
"in",
"failed_payloads_with_errs",
":",
"t_and_p",
"=",
"TopicAndPartition",
"(",
"p",
".",
"topic",
",",
"p",
".",
"partition",
")",
"_deliver_result",
"(",
"deferredsByTopicPart",
"[",
"t_and_p",
"]",
",",
"f",
")",
"return",
"# Retries remain! Schedule one...",
"d",
"=",
"Deferred",
"(",
")",
"dc",
"=",
"self",
".",
"client",
".",
"reactor",
".",
"callLater",
"(",
"self",
".",
"_retry_interval",
",",
"d",
".",
"callback",
",",
"[",
"p",
"for",
"p",
",",
"f",
"in",
"failed_payloads",
"]",
")",
"self",
".",
"_retry_interval",
"*=",
"self",
".",
"RETRY_INTERVAL_FACTOR",
"# Cancel the callLater when request is cancelled before it fires",
"d",
".",
"addErrback",
"(",
"_cancel_retry",
",",
"dc",
")",
"# Reset the topic metadata for all topics which had failed_requests",
"# where the failures were of the kind UnknownTopicOrPartitionError",
"# or NotLeaderForPartitionError, since those indicate our client's",
"# metadata is out of date.",
"reset_topics",
"=",
"set",
"(",
")",
"for",
"payload",
",",
"e",
"in",
"failed_payloads",
":",
"if",
"(",
"isinstance",
"(",
"e",
",",
"NotLeaderForPartitionError",
")",
"or",
"isinstance",
"(",
"e",
",",
"UnknownTopicOrPartitionError",
")",
")",
":",
"reset_topics",
".",
"add",
"(",
"payload",
".",
"topic",
")",
"if",
"reset_topics",
":",
"self",
".",
"client",
".",
"reset_topic_metadata",
"(",
"*",
"reset_topics",
")",
"d",
".",
"addCallback",
"(",
"_do_retry",
")",
"return",
"d",
"# The payloads we need to retry, if we still can..",
"failed_payloads",
"=",
"[",
"]",
"# In the case we are sending requests without requiring acks, the",
"# brokerclient will immediately callback() the deferred upon send with",
"# None. In that case, we just iterate over all the deferreds in",
"# deferredsByTopicPart and callback them with None",
"# If we are expecting responses/acks, and we get an empty result, we",
"# callback with a Failure of NoResponseError",
"if",
"not",
"result",
":",
"# Success, but no results, is that what we're expecting?",
"if",
"self",
".",
"req_acks",
"==",
"PRODUCER_ACK_NOT_REQUIRED",
":",
"result",
"=",
"None",
"else",
":",
"# We got no result, but we were expecting one? Fail everything!",
"result",
"=",
"Failure",
"(",
"NoResponseError",
"(",
")",
")",
"_deliver_result",
"(",
"deferredsByTopicPart",
".",
"values",
"(",
")",
",",
"result",
")",
"return",
"elif",
"isinstance",
"(",
"result",
",",
"Failure",
")",
":",
"# Failure! Was it total, or partial?",
"if",
"not",
"result",
".",
"check",
"(",
"FailedPayloadsError",
")",
":",
"# Total failure of some sort!",
"# The client was unable to send the request at all. If it's",
"# a KafkaError (probably Leader/Partition unavailable), retry",
"if",
"result",
".",
"check",
"(",
"KafkaError",
")",
":",
"# Yep, a kafak error. Set failed_payloads, and we'll retry",
"# them all below. Set failure for errback to callers if we",
"# are all out of retries",
"failure",
",",
"result",
"=",
"result",
",",
"[",
"]",
"# no succesful results, retry",
"failed_payloads",
"=",
"[",
"(",
"p",
",",
"failure",
")",
"for",
"p",
"in",
"payloadsByTopicPart",
".",
"values",
"(",
")",
"]",
"else",
":",
"# Was the request cancelled?",
"if",
"not",
"result",
".",
"check",
"(",
"tid_CancelledError",
")",
":",
"# Uh Oh, programming error? Log it!",
"log",
".",
"error",
"(",
"\"Unexpected failure: %r in \"",
"\"_handle_send_response\"",
",",
"result",
")",
"# Cancelled, or programming error, we fail the requests",
"_deliver_result",
"(",
"deferredsByTopicPart",
".",
"values",
"(",
")",
",",
"result",
")",
"return",
"else",
":",
"# FailedPayloadsError: This means that some/all of the",
"# requests to a/some brokerclients failed to send.",
"# Pull the successful responses and the failed_payloads off",
"# the exception and handle them below. Preserve the",
"# FailedPayloadsError as 'failure'",
"failure",
"=",
"result",
"result",
"=",
"failure",
".",
"value",
".",
"args",
"[",
"0",
"]",
"failed_payloads",
"=",
"failure",
".",
"value",
".",
"args",
"[",
"1",
"]",
"# Do we have results? Iterate over them and if the response indicates",
"# success, then callback the associated deferred. If the response",
"# indicates an error, then setup that request for retry.",
"# NOTE: In this case, each failed_payload get it's own error...",
"for",
"res",
"in",
"result",
":",
"t_and_p",
"=",
"TopicAndPartition",
"(",
"res",
".",
"topic",
",",
"res",
".",
"partition",
")",
"t_and_p_err",
"=",
"_check_error",
"(",
"res",
",",
"raiseException",
"=",
"False",
")",
"if",
"not",
"t_and_p_err",
":",
"# Success for this topic/partition",
"d_list",
"=",
"deferredsByTopicPart",
"[",
"t_and_p",
"]",
"_deliver_result",
"(",
"d_list",
",",
"res",
")",
"else",
":",
"p",
"=",
"payloadsByTopicPart",
"[",
"t_and_p",
"]",
"failed_payloads",
".",
"append",
"(",
"(",
"p",
",",
"t_and_p_err",
")",
")",
"# Were there any failed requests to possibly retry?",
"if",
"failed_payloads",
":",
"return",
"_check_retry_payloads",
"(",
"failed_payloads",
")",
"return"
] | Handle the response from our client to our send_produce_request
This is a bit complex. Failures can happen in a few ways:
1. The client sent an empty list, False, None or some similar thing
as the result, but we were expecting real responses.
2. The client had a failure before it even tried sending any requests
to any brokers.
a. Kafka error: See if we can retry the whole request
b. Non-kafka: Figure it's a programming error, fail all deferreds
3. The client sent all the requests (it's all or none) to the brokers
but one or more request failed (timed out before receiving a
response, or the brokerclient threw some sort of exception on send
In this case, the client throws FailedPayloadsError, and attaches
the responses (NOTE: some can have errors!), and the payloads
where the send itself failed to the exception.
4. The client sent all the requests, all responses were received, but
the Kafka broker indicated an error with servicing the request on
some of the responses. | [
"Handle",
"the",
"response",
"from",
"our",
"client",
"to",
"our",
"send_produce_request"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/producer.py#L483-L650 | train | Handle the response from our client to our send_produce_request
COOKIE | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1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sH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1911 - 1863) + chr(0b1101111) + chr(49) + '\060', 13706 - 13698), nzTpIcepk0o8(chr(992 - 944) + chr(10037 - 9926) + chr(49) + chr(51) + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\066' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + chr(0b110011) + chr(0b100101 + 0o13) + chr(0b100010 + 0o22), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(1359 - 1310) + '\x30' + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(174 - 120) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(1197 - 1149) + chr(111) + chr(2293 - 2244) + chr(1386 - 1336) + chr(53), 0o10), nzTpIcepk0o8(chr(48) + chr(4221 - 4110) + chr(0b110001) + chr(0b100101 + 0o13) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\067' + chr(55), 60026 - 60018), nzTpIcepk0o8(chr(746 - 698) + '\x6f' + '\063' + chr(0b11000 + 0o34) + '\x34', 36373 - 36365), nzTpIcepk0o8(chr(0b110000) + chr(0b1000000 + 0o57) + '\x31' + chr(0b110111) + chr(0b110011), 15587 - 15579), nzTpIcepk0o8('\x30' + chr(7937 - 7826) + chr(49) + chr(610 - 556) + chr(52), 28962 - 28954), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1101100 + 0o3) + '\063' + '\x30' + chr(400 - 352), 0o10), nzTpIcepk0o8('\x30' + chr(0b1010 + 0o145) + '\065' + chr(1069 - 1021), 33255 - 33247), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(0b10010 + 0o44), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(50) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(1430 - 1382) + chr(8477 - 8366) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(0b110110) + chr(1821 - 1770), 0o10), nzTpIcepk0o8(chr(1155 - 1107) + chr(11378 - 11267) + chr(0b10100 + 0o35) + chr(0b110000) + '\064', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b110001 + 0o76) + '\061' + chr(0b110111) + chr(0b110011), 8), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1100110 + 0o11) + chr(1975 - 1925) + '\x35', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(2071 - 2021) + chr(1991 - 1939) + chr(2773 - 2720), 25526 - 25518), nzTpIcepk0o8('\060' + '\157' + '\062' + '\060' + '\x35', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(0b101010 + 0o12), ord("\x08")), nzTpIcepk0o8('\060' + chr(8745 - 8634) + chr(0b110011) + chr(0b110011) + '\062', 64765 - 64757), nzTpIcepk0o8('\060' + '\157' + '\x33' + '\067' + chr(0b110001 + 0o0), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4460 - 4349) + chr(51) + chr(2686 - 2634) + chr(53), 54358 - 54350), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + '\067' + chr(52), 31941 - 31933), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(1051 - 997), 8), nzTpIcepk0o8('\060' + chr(111) + chr(1640 - 1590) + chr(0b10010 + 0o42) + '\x37', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\067' + chr(0b10111 + 0o40), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(54) + chr(50), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b10010 + 0o37) + chr(53) + chr(1861 - 1807), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000010 + 0o55) + chr(1812 - 1763) + chr(55) + chr(0b110001 + 0o2), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + chr(72 - 20) + chr(1923 - 1873), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x34' + '\x33', 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(3999 - 3888) + chr(0b110111) + chr(0b110010), 0b1000), nzTpIcepk0o8('\060' + chr(2019 - 1908) + chr(50) + chr(1787 - 1732) + chr(0b101111 + 0o6), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(1147 - 1098) + chr(0b110010) + chr(603 - 555), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(744 - 693) + chr(0b11101 + 0o26) + chr(0b110010), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1011010 + 0o25) + '\065' + chr(0b110000), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'&'), chr(0b1100100) + chr(101) + '\143' + chr(111) + chr(819 - 719) + chr(3823 - 3722))('\x75' + chr(0b10011 + 0o141) + chr(0b1000111 + 0o37) + chr(45) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def fCj53emH9t_s(hXMPsSrOQzbh, POx95m7SPOVy, fJko8Z9lY37V, YsOoXlI8_mgs):
def DqMPRuQWZKQP(PXwCMprDEmwl, POx95m7SPOVy=None):
for vPPlOXQgR3SM in PXwCMprDEmwl:
if not suIjIS24Zkqw(vPPlOXQgR3SM, LbNAbjjo5q4l):
DqMPRuQWZKQP(vPPlOXQgR3SM, POx95m7SPOVy)
elif not roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'o8C\xf5p\xa3%\x11m\xb4\x129'), chr(0b0 + 0o144) + chr(10006 - 9905) + chr(99) + '\x6f' + chr(0b101111 + 0o65) + '\145')(chr(0b1110101) + '\x74' + '\x66' + chr(0b101101) + chr(0b1011 + 0o55))):
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'b\x1a\x04\x8f\x10\xc3\x00\x13x\x8a\x10A'), chr(8273 - 8173) + chr(3573 - 3472) + chr(99) + chr(0b1101111) + chr(100) + chr(947 - 846))(chr(117) + chr(116) + '\146' + chr(0b101101 + 0o0) + '\070'))(POx95m7SPOVy)
def wiOAqNWG_cb9(hu1hynoeGawF):
vPPlOXQgR3SM = hXMPsSrOQzbh.client.send_produce_request(hu1hynoeGawF, acks=hXMPsSrOQzbh.req_acks, timeout=hXMPsSrOQzbh.ack_timeout, fail_on_error=nzTpIcepk0o8('\060' + chr(111) + chr(48), ord("\x08")))
hXMPsSrOQzbh.osReZaQvKRBg += nzTpIcepk0o8(chr(1466 - 1418) + '\x6f' + chr(0b110001), 0o10)
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'i9U\x86*\x83='), chr(100) + chr(8574 - 8473) + '\x63' + chr(10005 - 9894) + '\x64' + chr(101))('\165' + chr(5069 - 4953) + chr(0b10100 + 0o122) + chr(0b10001 + 0o34) + '\x38'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'W5P\xaa!\x9b0\x19L\x81\x15\x10\x9fZk%w\x1c*\x08p'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(1254 - 1153))(chr(117) + '\164' + chr(0b1 + 0o145) + chr(0b110 + 0o47) + chr(56))), fJko8Z9lY37V, YsOoXlI8_mgs)
return vPPlOXQgR3SM
def jYaMk4yzz_Oo(DUbr_vQkcSNT, Iq4fgxO0wlkK):
roI3spqORKae(Iq4fgxO0wlkK, roI3spqORKae(ES5oEprVxulp(b'k<_\xa7 \x9b'), '\x64' + '\x65' + chr(0b1100011) + chr(0b1011101 + 0o22) + chr(0b111101 + 0o47) + chr(101))('\165' + '\164' + chr(9058 - 8956) + chr(45) + '\x38'))()
DqMPRuQWZKQP(roI3spqORKae(YsOoXlI8_mgs, roI3spqORKae(ES5oEprVxulp(b'K.^\xa0\x1f\xbd\x1dpG\xdd/\x0c'), chr(100) + chr(101) + chr(99) + chr(111) + chr(3438 - 3338) + '\145')(chr(117) + chr(0b1001000 + 0o54) + chr(102) + '\055' + chr(995 - 939)))(), DUbr_vQkcSNT)
return DUbr_vQkcSNT
def DhW611C2E8bx(AFq6w51i0_QY):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'g.c\xa1\x1f\x96\x040t\xb69\x13'), chr(8877 - 8777) + '\x65' + chr(479 - 380) + chr(111) + '\144' + '\x65')('\x75' + '\164' + chr(0b1011 + 0o133) + '\x2d' + '\070')) >= roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'W0P\xbc\x1a\x96!2Z\x89\x0b\x00\xb3'), '\x64' + '\x65' + '\x63' + chr(0b111000 + 0o67) + '\144' + chr(0b1100101))('\165' + chr(8064 - 7948) + chr(102) + chr(1779 - 1734) + chr(56))):
for (fSdw5wwLo9MO, _R8IKF5IwAfX) in AFq6w51i0_QY:
AumueLKorXrS = r_NgehA9zC0q(fSdw5wwLo9MO.eddDFOEFy2dH, fSdw5wwLo9MO.y6tm5LzgZc_E)
DqMPRuQWZKQP(YsOoXlI8_mgs[AumueLKorXrS], _R8IKF5IwAfX)
return
vPPlOXQgR3SM = LbNAbjjo5q4l()
Iq4fgxO0wlkK = hXMPsSrOQzbh.client.reactor.callLater(hXMPsSrOQzbh._ItQq3GtMWVd, vPPlOXQgR3SM.jG5KU4UUGnk5, [fSdw5wwLo9MO for (fSdw5wwLo9MO, _R8IKF5IwAfX) in GFc3iRuZK5aF])
hXMPsSrOQzbh._ItQq3GtMWVd *= hXMPsSrOQzbh.RETRY_INTERVAL_FACTOR
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b"i9U\x817\x857'\\\x8f"), '\144' + '\145' + '\143' + '\157' + chr(100) + chr(101))('\165' + chr(0b1110100) + chr(8749 - 8647) + chr(45) + '\070'))(jYaMk4yzz_Oo, Iq4fgxO0wlkK)
r9nN59CdfShy = Bvi71nNyvlqO()
for (pkzlytqkFfcV, wgf0sgcu_xPL) in GFc3iRuZK5aF:
if suIjIS24Zkqw(wgf0sgcu_xPL, UmZNa3QdTqAQ) or suIjIS24Zkqw(wgf0sgcu_xPL, lV6c8vAEO7wM):
roI3spqORKae(r9nN59CdfShy, roI3spqORKae(ES5oEprVxulp(b'}n`\xa0,\x84\x1c7{\x828\x10'), '\x64' + chr(8549 - 8448) + '\x63' + '\x6f' + chr(0b1100100) + chr(101))(chr(0b111111 + 0o66) + chr(0b11001 + 0o133) + '\146' + '\x2d' + '\x38'))(roI3spqORKae(pkzlytqkFfcV, roI3spqORKae(ES5oEprVxulp(b'm9U\x80\x03\xb8\x10\x00F\xd6\x1f<'), chr(3721 - 3621) + '\145' + chr(0b1001 + 0o132) + '\157' + chr(4825 - 4725) + '\x65')(chr(6994 - 6877) + chr(0b1110100) + chr(0b100000 + 0o106) + '\055' + chr(2994 - 2938))))
if r9nN59CdfShy:
roI3spqORKae(hXMPsSrOQzbh.client, roI3spqORKae(ES5oEprVxulp(b'z8B\xa11\xa8!)O\x8d\x18+\xadMz7c\x120\x1a'), '\x64' + chr(7246 - 7145) + '\143' + chr(0b10010 + 0o135) + '\x64' + chr(2324 - 2223))('\165' + chr(6818 - 6702) + chr(102) + '\055' + chr(0b100110 + 0o22)))(*r9nN59CdfShy)
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'i9U\x87$\x9b9$^\x87\x10'), chr(9948 - 9848) + '\x65' + '\143' + chr(0b1010110 + 0o31) + chr(100) + '\x65')('\165' + '\x74' + chr(991 - 889) + chr(408 - 363) + '\x38'))(wiOAqNWG_cb9)
return vPPlOXQgR3SM
GFc3iRuZK5aF = []
if not POx95m7SPOVy:
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'z8@\x9b$\x94>5'), chr(100) + chr(101) + '\x63' + '\x6f' + chr(100) + chr(0b1100101))('\x75' + '\164' + chr(8970 - 8868) + chr(0b1101 + 0o40) + chr(56))) == GK1ncMfNZ2vZ:
POx95m7SPOVy = None
else:
POx95m7SPOVy = WqTcOGBMJIY7(OosGAIHYZHxA())
DqMPRuQWZKQP(roI3spqORKae(YsOoXlI8_mgs, roI3spqORKae(ES5oEprVxulp(b'K.^\xa0\x1f\xbd\x1dpG\xdd/\x0c'), '\144' + '\x65' + chr(7173 - 7074) + chr(0b1101111) + '\144' + chr(101))(chr(0b10010 + 0o143) + '\164' + '\x66' + '\055' + '\x38'))(), POx95m7SPOVy)
return
elif suIjIS24Zkqw(POx95m7SPOVy, WqTcOGBMJIY7):
if not roI3spqORKae(POx95m7SPOVy, roI3spqORKae(ES5oEprVxulp(b'\\<Y\x934\xbed\rL\x8e\t.'), '\x64' + '\145' + '\143' + chr(0b1000010 + 0o55) + '\144' + chr(101))('\x75' + chr(0b100001 + 0o123) + chr(0b1100110) + chr(45) + chr(56)))(kiUgICR4Z6gp):
if roI3spqORKae(POx95m7SPOVy, roI3spqORKae(ES5oEprVxulp(b'\\<Y\x934\xbed\rL\x8e\t.'), '\144' + '\145' + chr(0b1100011) + chr(0b1101111) + '\144' + chr(0b1100101))('\x75' + chr(116) + '\146' + chr(45) + chr(2769 - 2713)))(znEX5vRqGSjA):
(DUbr_vQkcSNT, POx95m7SPOVy) = (POx95m7SPOVy, [])
GFc3iRuZK5aF = [(fSdw5wwLo9MO, DUbr_vQkcSNT) for fSdw5wwLo9MO in fJko8Z9lY37V.CsodZJH6x9Tx()]
else:
if not roI3spqORKae(POx95m7SPOVy, roI3spqORKae(ES5oEprVxulp(b'\\<Y\x934\xbed\rL\x8e\t.'), chr(0b1100100) + chr(0b1100101) + chr(0b1100 + 0o127) + '\x6f' + chr(0b1100100) + chr(101))(chr(117) + chr(0b1110100) + chr(0b1010 + 0o134) + '\x2d' + '\x38'))(RWc1hmEI5UUT):
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'y4\x00\xb3,\x87\x05\x10I\xa10\x10'), '\144' + chr(101) + chr(0b1100011) + chr(0b1001100 + 0o43) + chr(0b1011101 + 0o7) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(0b11101 + 0o111) + chr(1410 - 1365) + chr(0b101000 + 0o20)))(roI3spqORKae(ES5oEprVxulp(b']3T\xbc5\x9262Z\x80[\x12\xa1Ab#u\x16~[0\xd7\xa5}\xb4\xd9\xba\x14o\xc9[\x1e\x0b$\x11FT\xd9\x0f\xa8m.A\xab+\x840'), chr(100) + chr(3658 - 3557) + chr(0b1100011) + chr(0b1100101 + 0o12) + chr(1941 - 1841) + '\x65')(chr(117) + '\x74' + '\x66' + '\055' + chr(0b100010 + 0o26)), POx95m7SPOVy)
DqMPRuQWZKQP(roI3spqORKae(YsOoXlI8_mgs, roI3spqORKae(ES5oEprVxulp(b'K.^\xa0\x1f\xbd\x1dpG\xdd/\x0c'), chr(0b1011101 + 0o7) + chr(0b11111 + 0o106) + chr(99) + chr(0b101101 + 0o102) + chr(0b1011111 + 0o5) + chr(0b1100101))(chr(117) + chr(0b1000010 + 0o62) + chr(0b1100110) + '\x2d' + chr(0b110000 + 0o10)))(), POx95m7SPOVy)
return
else:
DUbr_vQkcSNT = POx95m7SPOVy
POx95m7SPOVy = DUbr_vQkcSNT.value.eemPYp2vtTSr[nzTpIcepk0o8('\x30' + chr(0b1101111) + '\060', 8)]
GFc3iRuZK5aF = DUbr_vQkcSNT.value.eemPYp2vtTSr[nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1101111) + chr(0b11000 + 0o31), 8)]
for _XdQFJpnzJor in POx95m7SPOVy:
AumueLKorXrS = r_NgehA9zC0q(_XdQFJpnzJor.eddDFOEFy2dH, _XdQFJpnzJor.y6tm5LzgZc_E)
dD_e5caFrH2X = ObqVHUGBigC6(_XdQFJpnzJor, raiseException=nzTpIcepk0o8(chr(1228 - 1180) + '\x6f' + chr(2018 - 1970), 8))
if not dD_e5caFrH2X:
PXwCMprDEmwl = YsOoXlI8_mgs[AumueLKorXrS]
DqMPRuQWZKQP(PXwCMprDEmwl, _XdQFJpnzJor)
else:
fSdw5wwLo9MO = fJko8Z9lY37V[AumueLKorXrS]
roI3spqORKae(GFc3iRuZK5aF, roI3spqORKae(ES5oEprVxulp(b'@\tb\xf0=\x90\x12)U\x8b.A'), chr(0b1100100) + chr(0b100111 + 0o76) + '\143' + chr(0b1011011 + 0o24) + chr(100) + chr(0b110100 + 0o61))('\x75' + chr(116) + chr(0b1100110) + chr(1679 - 1634) + chr(56)))((fSdw5wwLo9MO, dD_e5caFrH2X))
if GFc3iRuZK5aF:
return DhW611C2E8bx(GFc3iRuZK5aF)
return |
ciena/afkak | afkak/producer.py | Producer._cancel_outstanding | def _cancel_outstanding(self):
"""Cancel all of our outstanding requests"""
for d in list(self._outstanding):
d.addErrback(lambda _: None) # Eat any uncaught errors
d.cancel() | python | def _cancel_outstanding(self):
"""Cancel all of our outstanding requests"""
for d in list(self._outstanding):
d.addErrback(lambda _: None) # Eat any uncaught errors
d.cancel() | [
"def",
"_cancel_outstanding",
"(",
"self",
")",
":",
"for",
"d",
"in",
"list",
"(",
"self",
".",
"_outstanding",
")",
":",
"d",
".",
"addErrback",
"(",
"lambda",
"_",
":",
"None",
")",
"# Eat any uncaught errors",
"d",
".",
"cancel",
"(",
")"
] | Cancel all of our outstanding requests | [
"Cancel",
"all",
"of",
"our",
"outstanding",
"requests"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/producer.py#L657-L661 | train | Cancel all of our outstanding requests | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW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oS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1222 - 1174) + chr(111) + '\062' + chr(2127 - 2072) + '\x34', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b110000 + 0o77) + '\x32' + chr(0b11100 + 0o24) + '\x30', 8991 - 8983), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10000 + 0o43) + chr(214 - 161) + '\062', 63770 - 63762), nzTpIcepk0o8(chr(1758 - 1710) + '\x6f' + chr(0b100110 + 0o14) + chr(0b100 + 0o55) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + chr(49) + '\x37', 40870 - 40862), nzTpIcepk0o8(chr(516 - 468) + chr(3254 - 3143) + '\066' + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(0b10011 + 0o40) + chr(0b10101 + 0o40), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4686 - 4575) + chr(0b110010 + 0o1) + chr(2695 - 2643) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + chr(0b10101 + 0o41) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(547 - 499) + chr(0b1010101 + 0o32) + chr(662 - 612), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101100 + 0o7) + '\066' + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(0b110100) + chr(54), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2586 - 2532) + chr(0b101010 + 0o14), 47563 - 47555), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(603 - 548) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + '\x32' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(1632 - 1521) + chr(793 - 744) + chr(0b110000) + '\x32', 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b1101111) + chr(0b110001) + '\x35' + '\067', 0b1000), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b1010101 + 0o32) + chr(0b11 + 0o60) + chr(53) + chr(0b101111 + 0o1), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b11001 + 0o126) + chr(1521 - 1471) + chr(52) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\157' + '\x32' + '\061' + chr(49), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(751 - 700) + '\x36' + '\062', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + '\063' + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(7639 - 7528) + chr(0b110110) + chr(0b100 + 0o57), ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\x6f' + '\061' + chr(761 - 711) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(0b0 + 0o63) + chr(504 - 449), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110100) + chr(1964 - 1914), 0o10), nzTpIcepk0o8(chr(852 - 804) + chr(111) + chr(1012 - 963) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + chr(55) + chr(790 - 737), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(11800 - 11689) + chr(0b100110 + 0o15) + '\x33' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\157' + chr(50) + '\x34' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x37' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(1635 - 1585) + '\060' + chr(437 - 386), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(1866 - 1816) + chr(0b100010 + 0o17), 0o10), nzTpIcepk0o8('\060' + chr(7386 - 7275) + chr(49) + '\062' + chr(0b1010 + 0o54), 9118 - 9110), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11010 + 0o31) + chr(50) + '\x37', 41305 - 41297), nzTpIcepk0o8('\x30' + '\x6f' + chr(74 - 25) + chr(1331 - 1283) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b101 + 0o53) + '\x6f' + chr(0b110001) + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + chr(1346 - 1295) + chr(0b1110 + 0o45), 22856 - 22848), nzTpIcepk0o8(chr(0b110000) + chr(0b1101011 + 0o4) + chr(0b110010) + chr(0b110100) + '\x31', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(2366 - 2316) + chr(165 - 110), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110101) + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x92'), chr(0b100011 + 0o101) + chr(0b111101 + 0o50) + '\x63' + chr(0b1001010 + 0o45) + chr(100) + '\145')('\165' + '\164' + '\146' + chr(0b101011 + 0o2) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def uH6zIdfiUoUI(hXMPsSrOQzbh):
for vPPlOXQgR3SM in H4NoA26ON7iG(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe3\xd4\xa7\xdaeY\x8b\x9dPV\xbbW'), chr(0b1100100) + '\x65' + chr(99) + chr(0b100011 + 0o114) + chr(2332 - 2232) + '\x65')(chr(0b1110101) + '\164' + '\146' + chr(1176 - 1131) + chr(56)))):
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\xdd\xe4\x8e\xce}G\xbf\x86Qi'), '\x64' + chr(101) + '\x63' + chr(8097 - 7986) + chr(0b1100100) + chr(5274 - 5173))('\x75' + '\x74' + chr(102) + chr(0b101101) + '\070'))(lambda zIqcgNgQ9U6F: None)
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\xdf\xe1\x84\xe8jY'), chr(100) + '\x65' + chr(1387 - 1288) + chr(4833 - 4722) + '\144' + chr(0b1101 + 0o130))(chr(13462 - 13345) + chr(8398 - 8282) + '\x66' + chr(0b101101) + '\070'))() |
ciena/afkak | afkak/client.py | _normalize_hosts | def _normalize_hosts(hosts):
"""
Canonicalize the *hosts* parameter.
>>> _normalize_hosts("host,127.0.0.2:2909")
[('127.0.0.2', 2909), ('host', 9092)]
:param hosts:
A list or comma-separated string of hostnames which may also include
port numbers. All of the following are valid::
b'host'
u'host'
b'host:1234'
u'host:1234,host:2345'
b'host:1234 , host:2345 '
[u'host1', b'host2']
[b'host:1234', b'host:2345']
Hostnames must be ASCII (IDN is not supported). The default Kafka port
of 9092 is implied when no port is given.
:returns: A list of unique (host, port) tuples.
:rtype: :class:`list` of (:class:`str`, :class:`int`) tuples
"""
if isinstance(hosts, bytes):
hosts = hosts.split(b',')
elif isinstance(hosts, _unicode):
hosts = hosts.split(u',')
result = set()
for host_port in hosts:
# FIXME This won't handle IPv6 addresses
res = nativeString(host_port).split(':')
host = res[0].strip()
port = int(res[1].strip()) if len(res) > 1 else DefaultKafkaPort
result.add((host, port))
return sorted(result) | python | def _normalize_hosts(hosts):
"""
Canonicalize the *hosts* parameter.
>>> _normalize_hosts("host,127.0.0.2:2909")
[('127.0.0.2', 2909), ('host', 9092)]
:param hosts:
A list or comma-separated string of hostnames which may also include
port numbers. All of the following are valid::
b'host'
u'host'
b'host:1234'
u'host:1234,host:2345'
b'host:1234 , host:2345 '
[u'host1', b'host2']
[b'host:1234', b'host:2345']
Hostnames must be ASCII (IDN is not supported). The default Kafka port
of 9092 is implied when no port is given.
:returns: A list of unique (host, port) tuples.
:rtype: :class:`list` of (:class:`str`, :class:`int`) tuples
"""
if isinstance(hosts, bytes):
hosts = hosts.split(b',')
elif isinstance(hosts, _unicode):
hosts = hosts.split(u',')
result = set()
for host_port in hosts:
# FIXME This won't handle IPv6 addresses
res = nativeString(host_port).split(':')
host = res[0].strip()
port = int(res[1].strip()) if len(res) > 1 else DefaultKafkaPort
result.add((host, port))
return sorted(result) | [
"def",
"_normalize_hosts",
"(",
"hosts",
")",
":",
"if",
"isinstance",
"(",
"hosts",
",",
"bytes",
")",
":",
"hosts",
"=",
"hosts",
".",
"split",
"(",
"b','",
")",
"elif",
"isinstance",
"(",
"hosts",
",",
"_unicode",
")",
":",
"hosts",
"=",
"hosts",
".",
"split",
"(",
"u','",
")",
"result",
"=",
"set",
"(",
")",
"for",
"host_port",
"in",
"hosts",
":",
"# FIXME This won't handle IPv6 addresses",
"res",
"=",
"nativeString",
"(",
"host_port",
")",
".",
"split",
"(",
"':'",
")",
"host",
"=",
"res",
"[",
"0",
"]",
".",
"strip",
"(",
")",
"port",
"=",
"int",
"(",
"res",
"[",
"1",
"]",
".",
"strip",
"(",
")",
")",
"if",
"len",
"(",
"res",
")",
">",
"1",
"else",
"DefaultKafkaPort",
"result",
".",
"add",
"(",
"(",
"host",
",",
"port",
")",
")",
"return",
"sorted",
"(",
"result",
")"
] | Canonicalize the *hosts* parameter.
>>> _normalize_hosts("host,127.0.0.2:2909")
[('127.0.0.2', 2909), ('host', 9092)]
:param hosts:
A list or comma-separated string of hostnames which may also include
port numbers. All of the following are valid::
b'host'
u'host'
b'host:1234'
u'host:1234,host:2345'
b'host:1234 , host:2345 '
[u'host1', b'host2']
[b'host:1234', b'host:2345']
Hostnames must be ASCII (IDN is not supported). The default Kafka port
of 9092 is implied when no port is given.
:returns: A list of unique (host, port) tuples.
:rtype: :class:`list` of (:class:`str`, :class:`int`) tuples | [
"Canonicalize",
"the",
"*",
"hosts",
"*",
"parameter",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L1083-L1120 | train | Canonicalize the hosts parameter. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29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DEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(2285 - 2237) + '\x6f' + chr(0b110001 + 0o0) + chr(0b110101) + chr(0b110011), 16163 - 16155), nzTpIcepk0o8('\x30' + chr(10824 - 10713) + chr(0b110011) + chr(2373 - 2322) + '\x36', 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(11330 - 11219) + chr(650 - 598) + '\060', 0o10), nzTpIcepk0o8(chr(543 - 495) + '\157' + chr(0b110010) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2654 - 2543) + chr(2103 - 2053) + '\x35' + chr(2423 - 2370), ord("\x08")), nzTpIcepk0o8(chr(734 - 686) + '\157' + chr(0b110001) + chr(0b110000) + chr(49), 0o10), nzTpIcepk0o8('\060' + chr(0b1101011 + 0o4) + chr(51) + '\x31' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(416 - 365) + chr(1436 - 1387) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + chr(0b110111) + chr(352 - 304), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1100 + 0o47) + chr(1323 - 1272) + '\x33', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1000100 + 0o53) + '\x33' + chr(0b110001) + chr(0b110101), 8), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1101111) + chr(49) + chr(0b110001) + '\061', ord("\x08")), nzTpIcepk0o8(chr(2025 - 1977) + '\157' + chr(50) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b100000 + 0o117) + chr(51) + '\x36' + '\x33', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(458 - 409) + '\x35' + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1000101 + 0o52) + chr(0b11011 + 0o32) + chr(50), 0o10), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(111) + chr(575 - 524) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(259 - 210) + chr(831 - 776) + chr(0b10110 + 0o33), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1263 - 1212) + chr(0b1010 + 0o47) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10 + 0o57) + '\060' + chr(0b111 + 0o53), 7984 - 7976), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(608 - 554) + chr(2298 - 2248), 0o10), nzTpIcepk0o8(chr(798 - 750) + '\157' + '\x31' + chr(970 - 920) + chr(0b100011 + 0o22), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(0b10101 + 0o41) + chr(0b10000 + 0o42), 8), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + '\063' + '\061', 55084 - 55076), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(55), 8), nzTpIcepk0o8(chr(0b100 + 0o54) + '\157' + chr(49) + '\061' + '\061', 8), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(53) + '\065', 8), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + chr(2287 - 2236) + chr(2511 - 2459) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(419 - 371) + chr(0b1010001 + 0o36) + chr(452 - 402) + chr(2404 - 2349) + chr(0b110010), 0b1000), nzTpIcepk0o8('\060' + chr(0b11111 + 0o120) + '\x33' + chr(393 - 345) + chr(2608 - 2553), 0b1000), nzTpIcepk0o8(chr(1887 - 1839) + '\157' + chr(0b100111 + 0o12) + chr(1433 - 1379) + '\067', 6454 - 6446), nzTpIcepk0o8('\060' + chr(0b100110 + 0o111) + chr(718 - 668) + '\x31' + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(436 - 386) + chr(0b100110 + 0o15), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110101) + chr(51), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(410 - 361) + '\064', 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101111) + chr(1621 - 1570) + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101101 + 0o2) + chr(50) + '\x36' + chr(0b101 + 0o62), 0b1000), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(6002 - 5891) + chr(0b101010 + 0o11) + chr(1706 - 1653), 0o10), nzTpIcepk0o8('\x30' + chr(0b1010001 + 0o36) + chr(49) + '\x36' + '\060', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(53) + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'E'), chr(100) + chr(0b100110 + 0o77) + '\x63' + chr(7438 - 7327) + '\x64' + '\x65')('\165' + chr(0b1110100) + chr(8723 - 8621) + chr(1233 - 1188) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def a2uunEUihx5V(_pTyEuzkkm3Y):
if suIjIS24Zkqw(_pTyEuzkkm3Y, QNQS9e6tJqMV):
_pTyEuzkkm3Y = _pTyEuzkkm3Y.LfRrQOxuDvnC(ES5oEprVxulp(b'G'))
elif suIjIS24Zkqw(_pTyEuzkkm3Y, EWPilrUeBqjK):
_pTyEuzkkm3Y = _pTyEuzkkm3Y.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'G'), '\x64' + chr(7991 - 7890) + '\x63' + chr(111) + chr(416 - 316) + chr(1075 - 974))(chr(117) + '\x74' + '\146' + '\055' + chr(56)))
POx95m7SPOVy = Bvi71nNyvlqO()
for lbq5Q5O5hQGc in _pTyEuzkkm3Y:
_XdQFJpnzJor = q3RB1z5nYjcr(lbq5Q5O5hQGc).LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'Q'), chr(100) + chr(6437 - 6336) + chr(2194 - 2095) + chr(6430 - 6319) + chr(9087 - 8987) + chr(321 - 220))(chr(117) + chr(0b1101110 + 0o6) + chr(0b11000 + 0o116) + chr(0b100100 + 0o11) + chr(0b100 + 0o64)))
UcZofMadI5hD = _XdQFJpnzJor[nzTpIcepk0o8('\060' + chr(0b10101 + 0o132) + chr(0b110000), 28875 - 28867)].kdIDrcwZTCs5()
FKWBoSDY8Qs2 = nzTpIcepk0o8(_XdQFJpnzJor[nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(3291 - 3180) + chr(1018 - 969), 0b1000)].kdIDrcwZTCs5()) if ftfygxgFas5X(_XdQFJpnzJor) > nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31', 8) else Znby_HlOkU1k
roI3spqORKae(POx95m7SPOVy, roI3spqORKae(ES5oEprVxulp(b'\x1e\xedqs\xc42\x84\xba|\xbd\x8e-'), chr(100) + '\x65' + chr(1305 - 1206) + chr(0b1101111) + chr(0b110110 + 0o56) + '\x65')(chr(5234 - 5117) + chr(0b1100001 + 0o23) + chr(102) + '\x2d' + chr(56)))((UcZofMadI5hD, FKWBoSDY8Qs2))
return V3OlOVg98A85(POx95m7SPOVy) |
ciena/afkak | afkak/client.py | KafkaClient.reset_consumer_group_metadata | def reset_consumer_group_metadata(self, *groups):
"""Reset cache of what broker manages the offset for specified groups
Remove the cache of what Kafka broker should be contacted when
fetching or updating the committed offsets for a given consumer
group or groups.
NOTE: Does not cancel any outstanding requests for updates to the
consumer group metadata for the specified groups.
"""
groups = tuple(_coerce_consumer_group(g) for g in groups)
for group in groups:
if group in self.consumer_group_to_brokers:
del self.consumer_group_to_brokers[group] | python | def reset_consumer_group_metadata(self, *groups):
"""Reset cache of what broker manages the offset for specified groups
Remove the cache of what Kafka broker should be contacted when
fetching or updating the committed offsets for a given consumer
group or groups.
NOTE: Does not cancel any outstanding requests for updates to the
consumer group metadata for the specified groups.
"""
groups = tuple(_coerce_consumer_group(g) for g in groups)
for group in groups:
if group in self.consumer_group_to_brokers:
del self.consumer_group_to_brokers[group] | [
"def",
"reset_consumer_group_metadata",
"(",
"self",
",",
"*",
"groups",
")",
":",
"groups",
"=",
"tuple",
"(",
"_coerce_consumer_group",
"(",
"g",
")",
"for",
"g",
"in",
"groups",
")",
"for",
"group",
"in",
"groups",
":",
"if",
"group",
"in",
"self",
".",
"consumer_group_to_brokers",
":",
"del",
"self",
".",
"consumer_group_to_brokers",
"[",
"group",
"]"
] | Reset cache of what broker manages the offset for specified groups
Remove the cache of what Kafka broker should be contacted when
fetching or updating the committed offsets for a given consumer
group or groups.
NOTE: Does not cancel any outstanding requests for updates to the
consumer group metadata for the specified groups. | [
"Reset",
"cache",
"of",
"what",
"broker",
"manages",
"the",
"offset",
"for",
"specified",
"groups"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L252-L265 | train | Reset the cache of what broker manages the offset for a given set of consumer groups. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,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tBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(378 - 267) + chr(50) + '\062' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\157' + chr(1300 - 1249) + '\062' + '\065', 0o10), nzTpIcepk0o8(chr(674 - 626) + chr(111) + '\064' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010 + 0o0) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\x6f' + chr(0b0 + 0o61) + '\x36' + chr(0b11001 + 0o30), ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + chr(1301 - 1251) + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10 + 0o57) + chr(49) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(691 - 643) + chr(5039 - 4928) + chr(1616 - 1566) + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(1578 - 1523) + chr(540 - 492), 2959 - 2951), nzTpIcepk0o8(chr(0b110000) + chr(4852 - 4741) + chr(0b110010) + chr(0b110111) + chr(51), 52881 - 52873), nzTpIcepk0o8(chr(48) + '\x6f' + '\065' + chr(0b110011), 31001 - 30993), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b1010 + 0o50) + chr(0b11 + 0o64) + chr(0b101100 + 0o12), 47847 - 47839), nzTpIcepk0o8(chr(0b110000) + chr(0b1001101 + 0o42) + chr(0b11011 + 0o30) + chr(121 - 73) + chr(931 - 878), 47434 - 47426), nzTpIcepk0o8('\x30' + chr(1797 - 1686) + '\066' + chr(0b100000 + 0o20), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(1329 - 1278) + chr(2413 - 2362), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + '\x37' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(1659 - 1611) + chr(0b1010110 + 0o31) + chr(656 - 605) + chr(50) + chr(0b110101), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\066' + chr(48), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(1991 - 1943) + chr(0b110001 + 0o6), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1010000 + 0o37) + '\x32' + chr(0b110011) + chr(0b110101 + 0o0), 0o10), nzTpIcepk0o8('\060' + chr(10679 - 10568) + chr(0b10110 + 0o33) + '\061' + chr(2552 - 2498), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(48) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001 + 0o1) + chr(55), 8), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(111) + chr(0b110001) + chr(0b101101 + 0o5) + chr(544 - 494), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1100 + 0o143) + '\x35' + chr(0b110011), 8), nzTpIcepk0o8(chr(1727 - 1679) + '\157' + chr(0b101110 + 0o3) + chr(0b1001 + 0o54) + chr(0b110 + 0o54), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100010 + 0o23) + chr(825 - 775), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(5336 - 5225) + chr(0b110001) + chr(636 - 588) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(51) + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(0b110000) + chr(0b101101 + 0o3), 48716 - 48708), nzTpIcepk0o8('\x30' + chr(111) + '\061' + '\066' + '\x33', 0o10), nzTpIcepk0o8(chr(1814 - 1766) + chr(11124 - 11013) + '\064' + chr(48), 8), nzTpIcepk0o8('\x30' + chr(0b1011110 + 0o21) + chr(0b100100 + 0o16) + '\067' + chr(50), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(54), 3712 - 3704), nzTpIcepk0o8(chr(1952 - 1904) + '\x6f' + chr(1001 - 950) + '\x31', 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1010011 + 0o34) + chr(0b110010) + '\062' + chr(0b110001), 8), nzTpIcepk0o8(chr(48) + chr(0b1010001 + 0o36) + '\x32', 39227 - 39219), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\157' + '\061' + chr(55) + '\065', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10000 + 0o41) + chr(0b100010 + 0o25) + '\060', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1507 - 1459) + '\x6f' + chr(809 - 756) + chr(0b110000), 4133 - 4125)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xbf'), chr(0b1100100) + '\x65' + chr(99) + chr(111) + '\x64' + chr(0b111110 + 0o47))(chr(117) + '\x74' + '\x66' + chr(45) + chr(2513 - 2457)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def mmO_gKDUlLvN(hXMPsSrOQzbh, *Npj4un59pdkA):
Npj4un59pdkA = nfNqtJL5aRaY((LEwRoK6l6REM(KQq7Z9J63zv1) for KQq7Z9J63zv1 in Npj4un59pdkA))
for F9lJ8RbIonqb in Npj4un59pdkA:
if F9lJ8RbIonqb in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"\xf2\xbaN`\x04}+e'\xdcY\xd1\xb0@D\x0f\xbao%\xef!\xaar X"), '\x64' + chr(101) + chr(0b1100011) + '\157' + '\144' + '\145')('\x75' + chr(7625 - 7509) + chr(0b10000 + 0o126) + chr(0b11 + 0o52) + chr(0b10001 + 0o47))):
del roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"\xf2\xbaN`\x04}+e'\xdcY\xd1\xb0@D\x0f\xbao%\xef!\xaar X"), chr(2400 - 2300) + chr(101) + '\143' + '\x6f' + chr(0b1100100) + '\x65')(chr(0b110011 + 0o102) + chr(718 - 602) + '\146' + chr(0b1010 + 0o43) + '\x38'))[F9lJ8RbIonqb] |
ciena/afkak | afkak/client.py | KafkaClient.reset_all_metadata | def reset_all_metadata(self):
"""Clear all cached metadata
Metadata will be re-fetched as required to satisfy requests.
"""
self.topics_to_brokers.clear()
self.topic_partitions.clear()
self.topic_errors.clear()
self.consumer_group_to_brokers.clear() | python | def reset_all_metadata(self):
"""Clear all cached metadata
Metadata will be re-fetched as required to satisfy requests.
"""
self.topics_to_brokers.clear()
self.topic_partitions.clear()
self.topic_errors.clear()
self.consumer_group_to_brokers.clear() | [
"def",
"reset_all_metadata",
"(",
"self",
")",
":",
"self",
".",
"topics_to_brokers",
".",
"clear",
"(",
")",
"self",
".",
"topic_partitions",
".",
"clear",
"(",
")",
"self",
".",
"topic_errors",
".",
"clear",
"(",
")",
"self",
".",
"consumer_group_to_brokers",
".",
"clear",
"(",
")"
] | Clear all cached metadata
Metadata will be re-fetched as required to satisfy requests. | [
"Clear",
"all",
"cached",
"metadata"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L267-L275 | train | Clear all cached metadata | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPW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JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(138 - 85) + chr(0b11011 + 0o30), 0o10), nzTpIcepk0o8('\060' + chr(0b1101100 + 0o3) + chr(0b11000 + 0o32) + chr(0b101100 + 0o10) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(9793 - 9682) + chr(51) + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + chr(4269 - 4158) + chr(50) + chr(844 - 795) + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b10100 + 0o133) + chr(0b100000 + 0o23) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(1563 - 1513) + chr(1233 - 1182) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + chr(113 - 62) + chr(913 - 864) + chr(1884 - 1830), 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + chr(50) + chr(51), 28565 - 28557), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + chr(49) + '\064' + chr(169 - 121), 0o10), nzTpIcepk0o8('\060' + chr(8877 - 8766) + chr(49) + '\x33' + chr(53), 0b1000), nzTpIcepk0o8(chr(2051 - 2003) + chr(6339 - 6228) + chr(50) + '\066' + chr(1159 - 1105), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + '\x35' + chr(54), 0o10), nzTpIcepk0o8(chr(1420 - 1372) + chr(4624 - 4513) + chr(51) + '\x32' + chr(0b10 + 0o63), ord("\x08")), nzTpIcepk0o8(chr(1479 - 1431) + '\157' + chr(49) + '\062' + chr(238 - 184), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1930 - 1881) + chr(50) + chr(706 - 654), 0b1000), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b1010011 + 0o34) + chr(0b110011) + chr(0b10101 + 0o35) + '\x35', 8), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + chr(0b110011) + '\x34', 8), nzTpIcepk0o8('\x30' + '\157' + chr(0b11101 + 0o25) + '\060' + chr(0b110 + 0o53), 0o10), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101100 + 0o3) + chr(0b100000 + 0o21) + chr(1844 - 1794), 0o10), nzTpIcepk0o8('\x30' + chr(0b10101 + 0o132) + '\063' + '\061' + '\x37', 16152 - 16144), nzTpIcepk0o8('\060' + chr(1139 - 1028) + chr(51) + chr(48) + chr(52), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + chr(10456 - 10345) + chr(0b11001 + 0o31) + chr(0b110001) + chr(0b11111 + 0o30), 0o10), nzTpIcepk0o8(chr(1691 - 1643) + chr(111) + chr(407 - 353) + '\063', 42222 - 42214), nzTpIcepk0o8('\060' + chr(3817 - 3706) + chr(2104 - 2054) + chr(49) + chr(48), 8), nzTpIcepk0o8('\060' + chr(10812 - 10701) + chr(0b110011) + '\063' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(270 - 218) + chr(1641 - 1593), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1011010 + 0o25) + '\x32' + '\060' + chr(88 - 36), 0o10), nzTpIcepk0o8(chr(1611 - 1563) + chr(4552 - 4441) + chr(50) + chr(49) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\x6f' + chr(0b110000 + 0o5) + '\061', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(0b110001) + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + chr(3433 - 3322) + chr(0b110001) + '\067' + '\x33', 46199 - 46191), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(53) + chr(0b1 + 0o60), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(51) + '\x34' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(1236 - 1188) + chr(5114 - 5003) + chr(0b11010 + 0o34) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(1320 - 1272) + chr(0b1101111) + '\x32' + chr(0b100101 + 0o13) + chr(0b101110 + 0o10), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + '\x30' + '\064', 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(52) + chr(0b110001 + 0o0), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + '\061' + '\x36' + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + '\067' + '\067', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b11101 + 0o122) + '\065' + '\x30', 43286 - 43278)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x85'), chr(0b1100100) + chr(0b1100101) + chr(9457 - 9358) + chr(0b1101000 + 0o7) + chr(0b1100100) + chr(0b1100101))(chr(0b1001000 + 0o55) + chr(0b1110100) + chr(8773 - 8671) + '\055' + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def irV1N7WML9NH(hXMPsSrOQzbh):
roI3spqORKae(hXMPsSrOQzbh.topics_to_brokers, roI3spqORKae(ES5oEprVxulp(b'\xc0\xc1Q\xbaw\xd6\x87!\x01h\xfe$'), chr(0b1110 + 0o126) + '\x65' + chr(99) + chr(680 - 569) + '\144' + '\x65')(chr(0b111111 + 0o66) + '\164' + chr(9772 - 9670) + chr(566 - 521) + '\x38'))()
roI3spqORKae(hXMPsSrOQzbh.topic_partitions, roI3spqORKae(ES5oEprVxulp(b'\xc0\xc1Q\xbaw\xd6\x87!\x01h\xfe$'), chr(0b1100100) + chr(9515 - 9414) + '\143' + '\157' + '\144' + '\x65')(chr(117) + chr(4810 - 4694) + chr(0b1100011 + 0o3) + '\055' + '\070'))()
roI3spqORKae(hXMPsSrOQzbh.topic_errors, roI3spqORKae(ES5oEprVxulp(b'\xc0\xc1Q\xbaw\xd6\x87!\x01h\xfe$'), chr(100) + '\145' + chr(99) + chr(3016 - 2905) + chr(0b1110 + 0o126) + '\145')(chr(117) + chr(116) + chr(102) + chr(0b101101) + chr(0b111000)))()
roI3spqORKae(hXMPsSrOQzbh.consumer_group_to_brokers, roI3spqORKae(ES5oEprVxulp(b'\xc0\xc1Q\xbaw\xd6\x87!\x01h\xfe$'), chr(0b0 + 0o144) + chr(0b1000100 + 0o41) + chr(9271 - 9172) + '\157' + chr(0b100 + 0o140) + chr(0b1100101))('\x75' + chr(3199 - 3083) + chr(0b10000 + 0o126) + chr(0b101101) + chr(0b111000)))() |
ciena/afkak | afkak/client.py | KafkaClient.topic_fully_replicated | def topic_fully_replicated(self, topic):
"""
Determine if the given topic is fully replicated according to the
currently known cluster metadata.
.. note::
This relies on cached cluster metadata. You may call
:meth:`load_metadata_for_topics()` first to refresh this cache.
:param str topic: Topic name
:returns:
A boolean indicating that:
1. The number of partitions in the topic is non-zero.
2. For each partition, all replicas are in the in-sync replica
(ISR) set.
:rtype: :class:`bool`
"""
topic = _coerce_topic(topic)
if topic not in self.topic_partitions:
return False
if not self.topic_partitions[topic]:
# Don't consider an empty partition list 'fully replicated'
return False
return all(
self.partition_fully_replicated(TopicAndPartition(topic, p))
for p in self.topic_partitions[topic]
) | python | def topic_fully_replicated(self, topic):
"""
Determine if the given topic is fully replicated according to the
currently known cluster metadata.
.. note::
This relies on cached cluster metadata. You may call
:meth:`load_metadata_for_topics()` first to refresh this cache.
:param str topic: Topic name
:returns:
A boolean indicating that:
1. The number of partitions in the topic is non-zero.
2. For each partition, all replicas are in the in-sync replica
(ISR) set.
:rtype: :class:`bool`
"""
topic = _coerce_topic(topic)
if topic not in self.topic_partitions:
return False
if not self.topic_partitions[topic]:
# Don't consider an empty partition list 'fully replicated'
return False
return all(
self.partition_fully_replicated(TopicAndPartition(topic, p))
for p in self.topic_partitions[topic]
) | [
"def",
"topic_fully_replicated",
"(",
"self",
",",
"topic",
")",
":",
"topic",
"=",
"_coerce_topic",
"(",
"topic",
")",
"if",
"topic",
"not",
"in",
"self",
".",
"topic_partitions",
":",
"return",
"False",
"if",
"not",
"self",
".",
"topic_partitions",
"[",
"topic",
"]",
":",
"# Don't consider an empty partition list 'fully replicated'",
"return",
"False",
"return",
"all",
"(",
"self",
".",
"partition_fully_replicated",
"(",
"TopicAndPartition",
"(",
"topic",
",",
"p",
")",
")",
"for",
"p",
"in",
"self",
".",
"topic_partitions",
"[",
"topic",
"]",
")"
] | Determine if the given topic is fully replicated according to the
currently known cluster metadata.
.. note::
This relies on cached cluster metadata. You may call
:meth:`load_metadata_for_topics()` first to refresh this cache.
:param str topic: Topic name
:returns:
A boolean indicating that:
1. The number of partitions in the topic is non-zero.
2. For each partition, all replicas are in the in-sync replica
(ISR) set.
:rtype: :class:`bool` | [
"Determine",
"if",
"the",
"given",
"topic",
"is",
"fully",
"replicated",
"according",
"to",
"the",
"currently",
"known",
"cluster",
"metadata",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L290-L319 | train | Determines if the given topic is fully replicated according to the currently known cluster metadata. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,p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,WtdkIpFeYozM,MdkNqd1bagO6,QNQS9e6tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(0b1100101 + 0o12) + chr(50) + chr(0b100101 + 0o14) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(864 - 816) + chr(443 - 393), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111 + 0o0) + '\064' + chr(0b100010 + 0o22), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(424 - 373) + chr(0b110001) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(0b100000 + 0o21) + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + chr(8659 - 8548) + chr(1144 - 1093) + '\063', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(427 - 376) + chr(0b1111 + 0o46) + '\061', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(246 - 196), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x33' + chr(0b110111) + chr(0b100110 + 0o14), 31820 - 31812), nzTpIcepk0o8('\x30' + chr(0b1011011 + 0o24) + '\x32' + '\x34' + chr(0b110011), 56103 - 56095), nzTpIcepk0o8(chr(48) + '\157' + '\062' + chr(656 - 605) + '\065', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1010111 + 0o30) + '\063' + '\x31' + chr(1661 - 1611), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063', ord("\x08")), nzTpIcepk0o8(chr(1374 - 1326) + '\157' + '\x33' + '\x31' + '\x36', 8), nzTpIcepk0o8(chr(413 - 365) + '\157' + '\x32' + chr(0b110001) + chr(0b100000 + 0o20), 33584 - 33576), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11111 + 0o22) + chr(811 - 760) + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + chr(11667 - 11556) + chr(51) + chr(0b100010 + 0o17) + chr(54), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + chr(55) + chr(0b10011 + 0o41), 0o10), nzTpIcepk0o8(chr(1120 - 1072) + chr(0b1011100 + 0o23) + chr(0b100100 + 0o16) + chr(2568 - 2516) + '\061', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011111 + 0o20) + chr(0b101111 + 0o2) + chr(2450 - 2395), ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1101111) + chr(49) + chr(54) + chr(48), 50414 - 50406), nzTpIcepk0o8(chr(48) + chr(3823 - 3712) + chr(51) + chr(833 - 780) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(1094 - 1046) + chr(0b1101111) + chr(0b11011 + 0o27) + '\061' + chr(0b110000), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101010 + 0o15) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(1075 - 1027) + '\x6f' + '\062' + chr(53) + chr(48), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1056 - 1006) + chr(51) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(1883 - 1835) + chr(0b1001110 + 0o41) + chr(0b110010) + chr(51) + chr(55), 868 - 860), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1100111 + 0o10) + '\x33' + '\063' + chr(0b101010 + 0o12), 54452 - 54444), nzTpIcepk0o8('\x30' + chr(111) + chr(542 - 491) + '\x34' + chr(0b110011), 57944 - 57936), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1111 + 0o140) + chr(0b1 + 0o60) + chr(0b110111) + chr(0b10111 + 0o37), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b101011 + 0o104) + chr(0b110000 + 0o3) + '\x30' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(2104 - 2053) + chr(0b110100), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + '\x30' + '\061', 0o10), nzTpIcepk0o8('\x30' + chr(0b1001000 + 0o47) + chr(626 - 577) + chr(1110 - 1055) + chr(54), 8), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1101111) + chr(50) + chr(2229 - 2180) + chr(2135 - 2080), 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b11110 + 0o121) + chr(0b110011 + 0o0) + '\061' + chr(497 - 445), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(2244 - 2193) + chr(52), 8), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1101111) + '\062' + '\066' + chr(0b101100 + 0o13), 58578 - 58570), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(0b110001) + chr(51), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2285 - 2231) + '\060', 5673 - 5665)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b111 + 0o150) + '\065' + chr(918 - 870), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa2'), chr(100) + chr(101) + chr(99) + chr(0b1101111) + chr(0b1100 + 0o130) + chr(0b1100101))(chr(0b101 + 0o160) + '\x74' + chr(7269 - 7167) + '\x2d' + chr(0b1101 + 0o53)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def ASQrzK3Epzlj(hXMPsSrOQzbh, eddDFOEFy2dH):
eddDFOEFy2dH = xp7x5NJ9xoUC(eddDFOEFy2dH)
if eddDFOEFy2dH not in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf8\xadT\xa2\xadD\x99k\x88\xd7\xf4\xbej\xa1\xe6.'), chr(0b110101 + 0o57) + chr(0b1100101 + 0o0) + '\x63' + chr(0b1110 + 0o141) + '\144' + chr(2605 - 2504))('\x75' + chr(0b1100110 + 0o16) + chr(102) + chr(45) + chr(2110 - 2054))):
return nzTpIcepk0o8('\060' + chr(0b1000100 + 0o53) + chr(1956 - 1908), 0b1000)
if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf8\xadT\xa2\xadD\x99k\x88\xd7\xf4\xbej\xa1\xe6.'), chr(9235 - 9135) + '\145' + '\x63' + chr(11293 - 11182) + chr(100) + chr(0b111001 + 0o54))('\x75' + chr(0b1110100) + chr(2906 - 2804) + '\x2d' + chr(958 - 902)))[eddDFOEFy2dH]:
return nzTpIcepk0o8('\060' + '\x6f' + '\060', 8)
return qX60lO1lgHA5((roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xfc\xa3V\xbf\xa7o\x80e\x94\xfc\xfb\xbfo\xa2\xf1\x02\xbc\x19\xd1c\x19\x88\xe9J\xcd\xfa'), chr(0b10001 + 0o123) + chr(0b10010 + 0o123) + chr(99) + chr(111) + '\x64' + chr(0b1100101))(chr(117) + chr(116) + chr(0b100011 + 0o103) + chr(45) + chr(0b1111 + 0o51)))(r_NgehA9zC0q(eddDFOEFy2dH, fSdw5wwLo9MO)) for fSdw5wwLo9MO in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf8\xadT\xa2\xadD\x99k\x88\xd7\xf4\xbej\xa1\xe6.'), chr(4916 - 4816) + chr(0b1100101) + '\x63' + chr(11945 - 11834) + '\144' + chr(0b110110 + 0o57))(chr(8661 - 8544) + chr(0b1110100) + '\x66' + chr(0b101101 + 0o0) + chr(0b101100 + 0o14)))[eddDFOEFy2dH])) |
ciena/afkak | afkak/client.py | KafkaClient.close | def close(self):
"""Permanently dispose of the client
- Immediately mark the client as closed, causing current operations to
fail with :exc:`~afkak.common.CancelledError` and future operations to
fail with :exc:`~afkak.common.ClientError`.
- Clear cached metadata.
- Close any connections to Kafka brokers.
:returns:
deferred that fires when all resources have been released
"""
# If we're already waiting on an/some outstanding disconnects
# make sure we continue to wait for them...
log.debug("%r: close", self)
self._closing = True
# Close down any clients we have
brokerclients, self.clients = self.clients, None
self._close_brokerclients(brokerclients.values())
# clean up other outstanding operations
self.reset_all_metadata()
return self.close_dlist or defer.succeed(None) | python | def close(self):
"""Permanently dispose of the client
- Immediately mark the client as closed, causing current operations to
fail with :exc:`~afkak.common.CancelledError` and future operations to
fail with :exc:`~afkak.common.ClientError`.
- Clear cached metadata.
- Close any connections to Kafka brokers.
:returns:
deferred that fires when all resources have been released
"""
# If we're already waiting on an/some outstanding disconnects
# make sure we continue to wait for them...
log.debug("%r: close", self)
self._closing = True
# Close down any clients we have
brokerclients, self.clients = self.clients, None
self._close_brokerclients(brokerclients.values())
# clean up other outstanding operations
self.reset_all_metadata()
return self.close_dlist or defer.succeed(None) | [
"def",
"close",
"(",
"self",
")",
":",
"# If we're already waiting on an/some outstanding disconnects",
"# make sure we continue to wait for them...",
"log",
".",
"debug",
"(",
"\"%r: close\"",
",",
"self",
")",
"self",
".",
"_closing",
"=",
"True",
"# Close down any clients we have",
"brokerclients",
",",
"self",
".",
"clients",
"=",
"self",
".",
"clients",
",",
"None",
"self",
".",
"_close_brokerclients",
"(",
"brokerclients",
".",
"values",
"(",
")",
")",
"# clean up other outstanding operations",
"self",
".",
"reset_all_metadata",
"(",
")",
"return",
"self",
".",
"close_dlist",
"or",
"defer",
".",
"succeed",
"(",
"None",
")"
] | Permanently dispose of the client
- Immediately mark the client as closed, causing current operations to
fail with :exc:`~afkak.common.CancelledError` and future operations to
fail with :exc:`~afkak.common.ClientError`.
- Clear cached metadata.
- Close any connections to Kafka brokers.
:returns:
deferred that fires when all resources have been released | [
"Permanently",
"dispose",
"of",
"the",
"client"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L321-L342 | train | Permanently dispose of the client and return a deferred that fires when all resources have been released. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nA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q33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(9770 - 9659) + '\066' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1853 - 1798) + chr(0b101010 + 0o10), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101110 + 0o1) + chr(2409 - 2359) + chr(0b110001) + chr(2601 - 2546), ord("\x08")), nzTpIcepk0o8(chr(1603 - 1555) + '\157' + chr(0b110010) + '\061' + chr(0b11110 + 0o23), 0b1000), nzTpIcepk0o8('\060' + chr(9706 - 9595) + '\x33' + '\x37' + chr(909 - 861), 49303 - 49295), nzTpIcepk0o8(chr(48) + '\x6f' + chr(656 - 605) + '\x33' + '\063', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(53) + chr(54), 54803 - 54795), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + '\063' + chr(0b110001) + '\067', 41774 - 41766), nzTpIcepk0o8('\060' + chr(0b1011100 + 0o23) + chr(312 - 263) + chr(53) + '\060', 38329 - 38321), nzTpIcepk0o8('\x30' + chr(0b101010 + 0o105) + '\x33' + chr(0b110110) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(180 - 132) + chr(6672 - 6561) + chr(50) + '\064' + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + chr(0b100100 + 0o113) + '\x31' + '\x31' + '\063', 54677 - 54669), nzTpIcepk0o8(chr(48) + chr(5798 - 5687) + '\061' + chr(51) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(6508 - 6397) + chr(120 - 70) + '\061' + '\064', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(1297 - 1245) + chr(0b110110), 19868 - 19860), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(0b11011 + 0o26) + chr(0b101100 + 0o11), ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1101111) + '\062' + chr(49) + chr(2085 - 2031), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b11010 + 0o27) + '\x31' + chr(1437 - 1384), ord("\x08")), nzTpIcepk0o8(chr(478 - 430) + '\157' + '\x33' + '\066' + chr(51), 0b1000), nzTpIcepk0o8(chr(251 - 203) + chr(111) + '\066' + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(2977 - 2922) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(11638 - 11527) + chr(0b110001) + chr(0b1100 + 0o50) + chr(0b1111 + 0o41), 0b1000), nzTpIcepk0o8(chr(536 - 488) + chr(0b1101111) + chr(0b100010 + 0o25) + chr(0b10011 + 0o36), 52844 - 52836), nzTpIcepk0o8('\x30' + chr(2406 - 2295) + '\x33' + '\x35' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + chr(0b110010) + chr(0b1000 + 0o53) + '\x36', 50690 - 50682), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33' + chr(0b110010) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111 + 0o0) + '\x33' + chr(48) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(760 - 649) + '\x33' + chr(1774 - 1720) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(48) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1000001 + 0o56) + chr(893 - 839) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b11111 + 0o120) + '\063' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + '\x30' + chr(0b101010 + 0o11), 0b1000), nzTpIcepk0o8(chr(1990 - 1942) + chr(2927 - 2816) + chr(49) + chr(2359 - 2307) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(1531 - 1482), 0o10), nzTpIcepk0o8('\x30' + chr(4129 - 4018) + chr(0b110110) + '\063', 33037 - 33029), nzTpIcepk0o8('\x30' + chr(111) + '\062' + '\x36', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(0b110101) + chr(1598 - 1544), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b11111 + 0o120) + chr(0b101100 + 0o7) + chr(1898 - 1849) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(51) + chr(0b110010), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + chr(0b10111 + 0o32) + chr(0b110001), 47512 - 47504)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1036 - 988) + chr(111) + '\x35' + '\x30', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x19'), '\x64' + chr(0b1100101) + chr(8641 - 8542) + chr(111) + chr(100) + chr(0b101011 + 0o72))(chr(0b1101001 + 0o14) + '\x74' + '\x66' + chr(0b101101) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def Zeq7Ccf9Ud8j(hXMPsSrOQzbh):
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'P{\xb6\xd3\xc1\xbf\xc1\xf9=\x9a\xe7\x11'), chr(0b1000001 + 0o43) + '\x65' + chr(0b1100011) + chr(0b100001 + 0o116) + chr(4576 - 4476) + '\x65')(chr(6790 - 6673) + chr(116) + chr(102) + chr(471 - 426) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\x12H\xb5\xa9\x9b\xb7\xc1\xbc\r'), '\144' + chr(0b10100 + 0o121) + chr(0b1000 + 0o133) + chr(0b1101111) + '\144' + chr(0b11100 + 0o111))('\x75' + chr(12742 - 12626) + chr(102) + '\x2d' + chr(56)), hXMPsSrOQzbh)
hXMPsSrOQzbh.eM75bn6IM9QT = nzTpIcepk0o8(chr(647 - 599) + chr(6437 - 6326) + chr(0b100100 + 0o15), 0o10)
(o1hms9D1_aTD, hXMPsSrOQzbh.pO9s7jaWEF8y) = (hXMPsSrOQzbh.pO9s7jaWEF8y, None)
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'hY\xe3\xe6\x8b\xbe\xf1\xad\x1a\x98\xc9.(\xef\n\xa4\xeb#\x87F'), chr(100) + '\x65' + chr(0b1100011) + chr(111) + chr(0b110001 + 0o63) + chr(101))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(0b100111 + 0o6) + chr(0b11100 + 0o34)))(roI3spqORKae(o1hms9D1_aTD, roI3spqORKae(ES5oEprVxulp(b'tI\xe0\xed\xa2\x91\xe6\xf9\x10\xce\xf63'), '\144' + chr(101) + chr(0b1011101 + 0o6) + chr(111) + '\144' + chr(0b111110 + 0o47))(chr(117) + '\x74' + chr(0b1100110) + chr(1052 - 1007) + chr(491 - 435)))())
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'E_\xfc\xec\x8c\x84\xcf\xa3\x04\xa8\xcf..\xed\x02\xac\xfa,'), chr(5883 - 5783) + chr(8563 - 8462) + '\143' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(1026 - 909) + chr(0b1110100) + '\x66' + '\055' + chr(56)))()
return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'TV\xe0\xfa\x9d\x84\xca\xa3\x01\x84\xd6'), '\x64' + chr(101) + chr(0b1100011) + chr(111) + chr(100) + chr(0b101000 + 0o75))(chr(12133 - 12016) + chr(0b1110100) + chr(3676 - 3574) + '\x2d' + chr(0b111000))) or roI3spqORKae(hKESOdYBX3yt, roI3spqORKae(ES5oEprVxulp(b'DO\xec\xea\x9d\xbe\xca'), chr(0b110000 + 0o64) + chr(0b10111 + 0o116) + chr(0b110011 + 0o60) + chr(10702 - 10591) + '\x64' + chr(101))(chr(117) + chr(12423 - 12307) + chr(0b1010100 + 0o22) + '\055' + '\070'))(None) |
ciena/afkak | afkak/client.py | KafkaClient.load_metadata_for_topics | def load_metadata_for_topics(self, *topics):
"""Discover topic metadata and brokers
Afkak internally calls this method whenever metadata is required.
:param str topics:
Topic names to look up. The resulting metadata includes the list of
topic partitions, brokers owning those partitions, and which
partitions are in sync.
Fetching metadata for a topic may trigger auto-creation if that is
enabled on the Kafka broker.
When no topic name is given metadata for *all* topics is fetched.
This is an expensive operation, but it does not trigger topic
creation.
:returns:
:class:`Deferred` for the completion of the metadata fetch.
This will fire with ``True`` on success, ``None`` on
cancellation, or fail with an exception on error.
On success, topic metadata is available from the attributes of
:class:`KafkaClient`: :data:`~KafkaClient.topic_partitions`,
:data:`~KafkaClient.topics_to_brokers`, etc.
"""
topics = tuple(_coerce_topic(t) for t in topics)
log.debug("%r: load_metadata_for_topics(%s)", self, ', '.join(repr(t) for t in topics))
fetch_all_metadata = not topics
# create the request
requestId = self._next_id()
request = KafkaCodec.encode_metadata_request(self._clientIdBytes,
requestId, topics)
# Callbacks for the request deferred...
def _handleMetadataResponse(response):
# Decode the response
brokers, topics = KafkaCodec.decode_metadata_response(response)
log.debug("%r: got metadata brokers=%r topics=%r", self, brokers, topics)
# If we fetched the metadata for all topics, then store away the
# received metadata for diagnostics.
if fetch_all_metadata:
self._brokers = brokers
self._topics = topics
# Iff we were fetching for all topics, and we got at least one
# broker back, then remove brokers when we update our brokers
ok_to_remove = (fetch_all_metadata and len(brokers))
# Take the metadata we got back, update our self.clients, and
# if needed disconnect or connect from/to old/new brokers
self._update_brokers(brokers.values(), remove=ok_to_remove)
# Now loop through all the topics/partitions in the response
# and setup our cache/data-structures
for topic, topic_metadata in topics.items():
_, topic_error, partitions = topic_metadata
self.reset_topic_metadata(topic)
self.topic_errors[topic] = topic_error
if not partitions:
log.warning('No partitions for %s, Err:%d',
topic, topic_error)
continue
self.topic_partitions[topic] = []
for partition, meta in partitions.items():
self.topic_partitions[topic].append(partition)
topic_part = TopicAndPartition(topic, partition)
self.partition_meta[topic_part] = meta
if meta.leader == -1:
log.warning('No leader for topic %s partition %s',
topic, partition)
self.topics_to_brokers[topic_part] = None
else:
self.topics_to_brokers[
topic_part] = brokers[meta.leader]
self.topic_partitions[topic] = sorted(
self.topic_partitions[topic])
return True
def _handleMetadataErr(err):
# This should maybe do more cleanup?
if err.check(t_CancelledError, CancelledError):
# Eat the error
# XXX Shouldn't this return False? The success branch
# returns True.
return None
log.error("Failed to retrieve metadata:%s", err)
raise KafkaUnavailableError(
"Unable to load metadata from configured "
"hosts: {!r}".format(err))
# Send the request, add the handlers
d = self._send_broker_unaware_request(requestId, request)
d.addCallbacks(_handleMetadataResponse, _handleMetadataErr)
return d | python | def load_metadata_for_topics(self, *topics):
"""Discover topic metadata and brokers
Afkak internally calls this method whenever metadata is required.
:param str topics:
Topic names to look up. The resulting metadata includes the list of
topic partitions, brokers owning those partitions, and which
partitions are in sync.
Fetching metadata for a topic may trigger auto-creation if that is
enabled on the Kafka broker.
When no topic name is given metadata for *all* topics is fetched.
This is an expensive operation, but it does not trigger topic
creation.
:returns:
:class:`Deferred` for the completion of the metadata fetch.
This will fire with ``True`` on success, ``None`` on
cancellation, or fail with an exception on error.
On success, topic metadata is available from the attributes of
:class:`KafkaClient`: :data:`~KafkaClient.topic_partitions`,
:data:`~KafkaClient.topics_to_brokers`, etc.
"""
topics = tuple(_coerce_topic(t) for t in topics)
log.debug("%r: load_metadata_for_topics(%s)", self, ', '.join(repr(t) for t in topics))
fetch_all_metadata = not topics
# create the request
requestId = self._next_id()
request = KafkaCodec.encode_metadata_request(self._clientIdBytes,
requestId, topics)
# Callbacks for the request deferred...
def _handleMetadataResponse(response):
# Decode the response
brokers, topics = KafkaCodec.decode_metadata_response(response)
log.debug("%r: got metadata brokers=%r topics=%r", self, brokers, topics)
# If we fetched the metadata for all topics, then store away the
# received metadata for diagnostics.
if fetch_all_metadata:
self._brokers = brokers
self._topics = topics
# Iff we were fetching for all topics, and we got at least one
# broker back, then remove brokers when we update our brokers
ok_to_remove = (fetch_all_metadata and len(brokers))
# Take the metadata we got back, update our self.clients, and
# if needed disconnect or connect from/to old/new brokers
self._update_brokers(brokers.values(), remove=ok_to_remove)
# Now loop through all the topics/partitions in the response
# and setup our cache/data-structures
for topic, topic_metadata in topics.items():
_, topic_error, partitions = topic_metadata
self.reset_topic_metadata(topic)
self.topic_errors[topic] = topic_error
if not partitions:
log.warning('No partitions for %s, Err:%d',
topic, topic_error)
continue
self.topic_partitions[topic] = []
for partition, meta in partitions.items():
self.topic_partitions[topic].append(partition)
topic_part = TopicAndPartition(topic, partition)
self.partition_meta[topic_part] = meta
if meta.leader == -1:
log.warning('No leader for topic %s partition %s',
topic, partition)
self.topics_to_brokers[topic_part] = None
else:
self.topics_to_brokers[
topic_part] = brokers[meta.leader]
self.topic_partitions[topic] = sorted(
self.topic_partitions[topic])
return True
def _handleMetadataErr(err):
# This should maybe do more cleanup?
if err.check(t_CancelledError, CancelledError):
# Eat the error
# XXX Shouldn't this return False? The success branch
# returns True.
return None
log.error("Failed to retrieve metadata:%s", err)
raise KafkaUnavailableError(
"Unable to load metadata from configured "
"hosts: {!r}".format(err))
# Send the request, add the handlers
d = self._send_broker_unaware_request(requestId, request)
d.addCallbacks(_handleMetadataResponse, _handleMetadataErr)
return d | [
"def",
"load_metadata_for_topics",
"(",
"self",
",",
"*",
"topics",
")",
":",
"topics",
"=",
"tuple",
"(",
"_coerce_topic",
"(",
"t",
")",
"for",
"t",
"in",
"topics",
")",
"log",
".",
"debug",
"(",
"\"%r: load_metadata_for_topics(%s)\"",
",",
"self",
",",
"', '",
".",
"join",
"(",
"repr",
"(",
"t",
")",
"for",
"t",
"in",
"topics",
")",
")",
"fetch_all_metadata",
"=",
"not",
"topics",
"# create the request",
"requestId",
"=",
"self",
".",
"_next_id",
"(",
")",
"request",
"=",
"KafkaCodec",
".",
"encode_metadata_request",
"(",
"self",
".",
"_clientIdBytes",
",",
"requestId",
",",
"topics",
")",
"# Callbacks for the request deferred...",
"def",
"_handleMetadataResponse",
"(",
"response",
")",
":",
"# Decode the response",
"brokers",
",",
"topics",
"=",
"KafkaCodec",
".",
"decode_metadata_response",
"(",
"response",
")",
"log",
".",
"debug",
"(",
"\"%r: got metadata brokers=%r topics=%r\"",
",",
"self",
",",
"brokers",
",",
"topics",
")",
"# If we fetched the metadata for all topics, then store away the",
"# received metadata for diagnostics.",
"if",
"fetch_all_metadata",
":",
"self",
".",
"_brokers",
"=",
"brokers",
"self",
".",
"_topics",
"=",
"topics",
"# Iff we were fetching for all topics, and we got at least one",
"# broker back, then remove brokers when we update our brokers",
"ok_to_remove",
"=",
"(",
"fetch_all_metadata",
"and",
"len",
"(",
"brokers",
")",
")",
"# Take the metadata we got back, update our self.clients, and",
"# if needed disconnect or connect from/to old/new brokers",
"self",
".",
"_update_brokers",
"(",
"brokers",
".",
"values",
"(",
")",
",",
"remove",
"=",
"ok_to_remove",
")",
"# Now loop through all the topics/partitions in the response",
"# and setup our cache/data-structures",
"for",
"topic",
",",
"topic_metadata",
"in",
"topics",
".",
"items",
"(",
")",
":",
"_",
",",
"topic_error",
",",
"partitions",
"=",
"topic_metadata",
"self",
".",
"reset_topic_metadata",
"(",
"topic",
")",
"self",
".",
"topic_errors",
"[",
"topic",
"]",
"=",
"topic_error",
"if",
"not",
"partitions",
":",
"log",
".",
"warning",
"(",
"'No partitions for %s, Err:%d'",
",",
"topic",
",",
"topic_error",
")",
"continue",
"self",
".",
"topic_partitions",
"[",
"topic",
"]",
"=",
"[",
"]",
"for",
"partition",
",",
"meta",
"in",
"partitions",
".",
"items",
"(",
")",
":",
"self",
".",
"topic_partitions",
"[",
"topic",
"]",
".",
"append",
"(",
"partition",
")",
"topic_part",
"=",
"TopicAndPartition",
"(",
"topic",
",",
"partition",
")",
"self",
".",
"partition_meta",
"[",
"topic_part",
"]",
"=",
"meta",
"if",
"meta",
".",
"leader",
"==",
"-",
"1",
":",
"log",
".",
"warning",
"(",
"'No leader for topic %s partition %s'",
",",
"topic",
",",
"partition",
")",
"self",
".",
"topics_to_brokers",
"[",
"topic_part",
"]",
"=",
"None",
"else",
":",
"self",
".",
"topics_to_brokers",
"[",
"topic_part",
"]",
"=",
"brokers",
"[",
"meta",
".",
"leader",
"]",
"self",
".",
"topic_partitions",
"[",
"topic",
"]",
"=",
"sorted",
"(",
"self",
".",
"topic_partitions",
"[",
"topic",
"]",
")",
"return",
"True",
"def",
"_handleMetadataErr",
"(",
"err",
")",
":",
"# This should maybe do more cleanup?",
"if",
"err",
".",
"check",
"(",
"t_CancelledError",
",",
"CancelledError",
")",
":",
"# Eat the error",
"# XXX Shouldn't this return False? The success branch",
"# returns True.",
"return",
"None",
"log",
".",
"error",
"(",
"\"Failed to retrieve metadata:%s\"",
",",
"err",
")",
"raise",
"KafkaUnavailableError",
"(",
"\"Unable to load metadata from configured \"",
"\"hosts: {!r}\"",
".",
"format",
"(",
"err",
")",
")",
"# Send the request, add the handlers",
"d",
"=",
"self",
".",
"_send_broker_unaware_request",
"(",
"requestId",
",",
"request",
")",
"d",
".",
"addCallbacks",
"(",
"_handleMetadataResponse",
",",
"_handleMetadataErr",
")",
"return",
"d"
] | Discover topic metadata and brokers
Afkak internally calls this method whenever metadata is required.
:param str topics:
Topic names to look up. The resulting metadata includes the list of
topic partitions, brokers owning those partitions, and which
partitions are in sync.
Fetching metadata for a topic may trigger auto-creation if that is
enabled on the Kafka broker.
When no topic name is given metadata for *all* topics is fetched.
This is an expensive operation, but it does not trigger topic
creation.
:returns:
:class:`Deferred` for the completion of the metadata fetch.
This will fire with ``True`` on success, ``None`` on
cancellation, or fail with an exception on error.
On success, topic metadata is available from the attributes of
:class:`KafkaClient`: :data:`~KafkaClient.topic_partitions`,
:data:`~KafkaClient.topics_to_brokers`, etc. | [
"Discover",
"topic",
"metadata",
"and",
"brokers"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L344-L440 | train | Discover topic metadata and brokers and topics and return the metadata for that topic. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,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qZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b110110) + '\061', 36141 - 36133), nzTpIcepk0o8('\060' + chr(10338 - 10227) + chr(53) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + chr(2234 - 2183) + chr(49) + chr(0b101010 + 0o15), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(0b0 + 0o63) + chr(755 - 701), 60878 - 60870), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10000 + 0o42) + chr(0b110011) + '\067', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\060', 0b1000), nzTpIcepk0o8(chr(2280 - 2232) + chr(0b100110 + 0o111) + '\x32' + chr(654 - 604), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b0 + 0o65) + '\x34', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100101 + 0o15) + chr(1553 - 1503) + chr(965 - 915), 32106 - 32098), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(1427 - 1379) + '\157' + chr(0b11000 + 0o34) + chr(170 - 117), 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + '\x6f' + chr(0b100110 + 0o14) + chr(0b10000 + 0o45) + chr(1196 - 1147), 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b1101111) + '\063' + chr(1719 - 1664) + '\064', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(52) + '\061', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(2615 - 2562) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(524 - 475) + chr(50) + '\062', 32214 - 32206), nzTpIcepk0o8(chr(48) + chr(9810 - 9699) + '\062' + chr(0b1111 + 0o43) + '\061', 33714 - 33706), nzTpIcepk0o8('\060' + '\157' + chr(0b100 + 0o57) + '\065' + chr(2769 - 2716), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(0b110111) + '\x31', 49935 - 49927), nzTpIcepk0o8(chr(0b110000) + chr(10042 - 9931) + '\x33' + chr(0b111 + 0o51) + '\x37', 0b1000), nzTpIcepk0o8('\x30' + chr(7769 - 7658) + chr(0b110010) + '\x35' + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b1010 + 0o47) + '\064', ord("\x08")), nzTpIcepk0o8(chr(1492 - 1444) + '\x6f' + chr(0b110001) + chr(0b110000) + chr(484 - 432), 40986 - 40978), nzTpIcepk0o8(chr(2268 - 2220) + chr(6881 - 6770) + chr(0b110001) + '\x30' + chr(0b110001), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(49) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(1211 - 1163) + chr(111) + chr(2694 - 2642) + '\064', 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b110110 + 0o71) + '\x32' + chr(51) + chr(0b10111 + 0o34), 61 - 53), nzTpIcepk0o8(chr(1521 - 1473) + chr(5665 - 5554) + chr(0b101111 + 0o3) + chr(48) + chr(0b10110 + 0o37), 0b1000), nzTpIcepk0o8(chr(1168 - 1120) + chr(2479 - 2368) + chr(0b1111 + 0o42) + chr(982 - 932) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(111) + chr(456 - 407) + '\066' + chr(2638 - 2583), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b110001) + '\x31', 50780 - 50772), nzTpIcepk0o8(chr(1364 - 1316) + chr(0b110011 + 0o74) + chr(0b11110 + 0o24) + chr(0b101010 + 0o11) + chr(52), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + '\x32' + '\061', ord("\x08")), nzTpIcepk0o8(chr(1434 - 1386) + chr(4460 - 4349) + chr(0b110010) + chr(406 - 351) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(10560 - 10449) + chr(2239 - 2188) + chr(53) + chr(0b11100 + 0o25), 37006 - 36998), nzTpIcepk0o8('\x30' + chr(0b1010100 + 0o33) + chr(0b110001) + chr(0b110100) + chr(0b10110 + 0o34), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b100111 + 0o110) + chr(50) + chr(0b110101) + chr(0b1100 + 0o51), 0b1000), nzTpIcepk0o8(chr(731 - 683) + chr(0b101111 + 0o100) + chr(0b10010 + 0o41) + chr(1033 - 978) + chr(423 - 373), 0o10), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(2654 - 2543) + '\062' + chr(0b10111 + 0o35) + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1011 + 0o47) + '\061', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(380 - 332) + chr(0b101100 + 0o103) + '\x35' + chr(1411 - 1363), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9f'), '\144' + chr(101) + '\143' + '\x6f' + chr(0b11000 + 0o114) + '\x65')(chr(117) + '\x74' + chr(102) + chr(0b10011 + 0o32) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def qVBhUYS90fqc(hXMPsSrOQzbh, *mk9HPFoKAKI2):
mk9HPFoKAKI2 = nfNqtJL5aRaY((xp7x5NJ9xoUC(h3Vc_4wxEbgd) for h3Vc_4wxEbgd in mk9HPFoKAKI2))
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\xd6h\xf6\x04\xa6d}\x1a\xc7v`\xf3'), chr(0b1000110 + 0o36) + chr(7215 - 7114) + chr(0b1100011) + chr(8696 - 8585) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(2209 - 2153)))(roI3spqORKae(ES5oEprVxulp(b'\x94[\xf5~\xf3osH\xcdv@\xdd\x9d\x05K&\xf0\xb2\x1f\xa8\xdc\x930.;M\xf8\xf6{R\xba\xb5'), '\x64' + chr(9171 - 9070) + chr(99) + chr(111) + chr(2028 - 1928) + chr(0b1100101))('\x75' + chr(116) + chr(0b1011 + 0o133) + '\x2d' + chr(56)), hXMPsSrOQzbh, roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\x9d\t'), chr(1863 - 1763) + '\145' + '\143' + '\x6f' + '\x64' + '\x65')(chr(0b1110101) + chr(12582 - 12466) + chr(0b1010111 + 0o17) + chr(45) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xe8\x1d\xb6\x13\xa6BqJ\xc6Xk\xd8'), '\144' + chr(101) + chr(99) + '\x6f' + chr(0b1010011 + 0o21) + chr(0b1010110 + 0o17))(chr(509 - 392) + chr(0b1110100) + chr(102) + '\x2d' + chr(0b1110 + 0o52)))((VWshwTzZfwvC(h3Vc_4wxEbgd) for h3Vc_4wxEbgd in mk9HPFoKAKI2)))
tXIhV36Dz9ac = not mk9HPFoKAKI2
lV7fd2Cq53hp = hXMPsSrOQzbh.beTrlthJqgCw()
fXJOkxXvZqV_ = xbGTsX4crO7w.encode_metadata_request(hXMPsSrOQzbh._clientIdBytes, lV7fd2Cq53hp, mk9HPFoKAKI2)
def D8_VZpf7cbpJ(k2zzaFDtbuhL):
(gF1QUDIrFeFu, mk9HPFoKAKI2) = xbGTsX4crO7w.decode_metadata_response(k2zzaFDtbuhL)
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\xd6h\xf6\x04\xa6d}\x1a\xc7v`\xf3'), chr(100) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(0b1011001 + 0o13) + chr(101))('\165' + chr(0b1110100) + '\x66' + chr(0b100110 + 0o7) + chr(0b11000 + 0o40)))(roI3spqORKae(ES5oEprVxulp(b"\x94[\xf5~\xf8of\x0c\xff~Q\xc8\x98\x00^3\xb1\x8f\x0b\xa8\xc5\xa962v\x01\xe9\xa5'\x18\xb9\xf5\xb2\xc8\xd4G\xdf"), chr(3396 - 3296) + chr(101) + chr(4221 - 4122) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(117) + chr(0b110111 + 0o75) + '\146' + '\055' + chr(56)), hXMPsSrOQzbh, gF1QUDIrFeFu, mk9HPFoKAKI2)
if tXIhV36Dz9ac:
hXMPsSrOQzbh.bqFzwbJtwpTY = gF1QUDIrFeFu
hXMPsSrOQzbh.meP9rqaheWmC = mk9HPFoKAKI2
b4H3tubCqx78 = tXIhV36Dz9ac and ftfygxgFas5X(gF1QUDIrFeFu)
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xee\\\xbf:\xfetws\xf0iJ\xc2\x99\x13Y'), chr(0b100 + 0o140) + '\x65' + chr(0b1111 + 0o124) + chr(0b1101111) + chr(100) + chr(6430 - 6329))('\x75' + '\x74' + chr(9855 - 9753) + chr(0b11101 + 0o20) + chr(0b111000)))(roI3spqORKae(gF1QUDIrFeFu, roI3spqORKae(ES5oEprVxulp(b'\xf2Z\xa0:\xc5JZ\x1a\xea"q\xd1'), chr(100) + '\x65' + chr(684 - 585) + chr(0b1101111) + chr(6282 - 6182) + chr(101))('\165' + chr(0b1110100) + chr(0b1100110) + chr(45) + '\070'))(), remove=b4H3tubCqx78)
for (eddDFOEFy2dH, g3uQLK2hjAhg) in roI3spqORKae(mk9HPFoKAKI2, roI3spqORKae(ES5oEprVxulp(b'\xe8v\xa1\x10\xdazZ\x18\xa1m}\xc0'), '\x64' + chr(0b110010 + 0o63) + chr(0b1100011) + chr(0b1001000 + 0o47) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(401 - 285) + chr(102) + chr(45) + '\x38'))():
(zIqcgNgQ9U6F, giq83WV9kgfw, OpOj_yrX6o48) = g3uQLK2hjAhg
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc3L\xbc;\xeb_fC\xe2rF\xf6\x91\x04^3\xf5\x8c\r\xa6'), chr(2429 - 2329) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b10110 + 0o116) + chr(101))(chr(0b1101110 + 0o7) + chr(0b1010101 + 0o37) + chr(102) + chr(0b101101) + chr(56)))(eddDFOEFy2dH)
hXMPsSrOQzbh.OhLYwEJDSNAn[eddDFOEFy2dH] = giq83WV9kgfw
if not OpOj_yrX6o48:
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\xc6H\xbd0\xf6nu'), chr(8934 - 8834) + chr(0b1010101 + 0o20) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(10106 - 10005))(chr(0b1110101) + '\x74' + chr(7350 - 7248) + chr(0b10111 + 0o26) + chr(648 - 592)))(roI3spqORKae(ES5oEprVxulp(b'\xffF\xef.\xferfE\xe6rJ\xc7\x8fAL=\xe3\xcd\\\xb4\x82\xec\x0139\x1e\xbe\xe1'), chr(100) + chr(3209 - 3108) + '\x63' + chr(0b1101111) + chr(100) + chr(101))('\x75' + '\x74' + chr(102) + chr(0b101101) + '\070'), eddDFOEFy2dH, giq83WV9kgfw)
continue
hXMPsSrOQzbh.ZTDsYH4CT90C[eddDFOEFy2dH] = []
for (y6tm5LzgZc_E, DCKHhI6xLX9g) in roI3spqORKae(OpOj_yrX6o48, roI3spqORKae(ES5oEprVxulp(b'\xe8v\xa1\x10\xdazZ\x18\xa1m}\xc0'), chr(0b1100100) + chr(0b1010111 + 0o16) + chr(2886 - 2787) + chr(111) + chr(100) + chr(0b1000000 + 0o45))(chr(117) + '\164' + chr(102) + chr(45) + chr(0b111000)))():
roI3spqORKae(hXMPsSrOQzbh.topic_partitions[eddDFOEFy2dH], roI3spqORKae(ES5oEprVxulp(b'\xf9}\x9cj\xe7gUC\xf8tp\x9c'), chr(0b110100 + 0o60) + chr(101) + '\143' + chr(1289 - 1178) + chr(0b1 + 0o143) + chr(101))(chr(0b1110101) + chr(13240 - 13124) + chr(4995 - 4893) + chr(333 - 288) + '\070'))(y6tm5LzgZc_E)
w6kZ2_1ppiB4 = r_NgehA9zC0q(eddDFOEFy2dH, y6tm5LzgZc_E)
hXMPsSrOQzbh.COWRKJ_7VEZM[w6kZ2_1ppiB4] = DCKHhI6xLX9g
if roI3spqORKae(DCKHhI6xLX9g, roI3spqORKae(ES5oEprVxulp(b'\xddL\xae:\xfar'), chr(6333 - 6233) + chr(0b1100101) + chr(0b1010010 + 0o21) + '\x6f' + chr(100) + '\145')(chr(5140 - 5023) + chr(0b1110100) + '\x66' + chr(0b1000 + 0o45) + '\070')) == -nzTpIcepk0o8('\060' + chr(0b1101111) + chr(447 - 398), 0b1000):
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\xc6H\xbd0\xf6nu'), chr(0b100100 + 0o100) + '\145' + chr(99) + chr(6610 - 6499) + chr(0b1010110 + 0o16) + chr(0b110011 + 0o62))(chr(0b1010010 + 0o43) + '\x74' + chr(0b111010 + 0o54) + chr(0b1101 + 0o40) + chr(0b1110 + 0o52)))(roI3spqORKae(ES5oEprVxulp(b"\xffF\xef2\xfaavI\xe0;C\xc6\x8eA^=\xe1\x84\x1a\xe7\x8b\xbfd1*V\xef\xec'\x1e\xa6\xf2\xf1\x9e\x9a"), chr(100) + chr(101) + '\x63' + '\x6f' + chr(100) + chr(0b1100101))(chr(807 - 690) + '\164' + chr(102) + chr(0b100011 + 0o12) + '\070'), eddDFOEFy2dH, y6tm5LzgZc_E)
hXMPsSrOQzbh.YBP57LpMYygB[w6kZ2_1ppiB4] = None
else:
hXMPsSrOQzbh.YBP57LpMYygB[w6kZ2_1ppiB4] = gF1QUDIrFeFu[DCKHhI6xLX9g.leader]
hXMPsSrOQzbh.ZTDsYH4CT90C[eddDFOEFy2dH] = V3OlOVg98A85(hXMPsSrOQzbh.ZTDsYH4CT90C[eddDFOEFy2dH])
return nzTpIcepk0o8('\060' + '\157' + chr(49), 8)
def FPwIgoRSsH3T(oNU3PevgmWAO):
if roI3spqORKae(oNU3PevgmWAO, roI3spqORKae(ES5oEprVxulp(b'\xe5H\xa7\t\xeeI#g\xe1qW\xf3'), chr(100) + '\145' + chr(6634 - 6535) + chr(111) + chr(0b1100100) + chr(0b1100001 + 0o4))('\x75' + chr(116) + chr(4887 - 4785) + chr(0b101101) + '\x38'))(T1Eswd4tYq_N, rTQ_IW2VS3hY):
return None
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\xc0@\xfe)\xf6pBz\xe4^n\xcd'), chr(0b1100100) + chr(0b1100101) + chr(1221 - 1122) + '\157' + '\144' + '\145')('\165' + chr(0b1110100) + '\x66' + chr(45) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\xf7H\xa62\xfad2X\xfd;W\xcc\x88\x13C7\xe7\x88Y\xaa\xcb\xb8%%*P\xfa\xbfv\x04'), '\x64' + chr(0b110011 + 0o62) + '\143' + chr(3502 - 3391) + '\144' + chr(0b1100101))(chr(0b110 + 0o157) + '\x74' + chr(9186 - 9084) + '\x2d' + chr(0b110001 + 0o7)), oNU3PevgmWAO)
raise wTFMJRWYZPF0(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xe4G\xae<\xf3e2X\xfd;I\xc6\x9d\x05\n?\xf4\x99\x18\xa3\xcf\xb8%a-V\xf4\xe8s\x14\xa6\xf2\xb7\xd2\x8e\x17\xdf\x9f\xc31\xd9F\xbc*\xec:2W\xb3iX'), '\x64' + chr(3608 - 3507) + chr(3863 - 3764) + chr(0b1100011 + 0o14) + chr(0b111 + 0o135) + chr(0b1100101))(chr(117) + chr(10245 - 10129) + chr(0b1100110) + chr(1923 - 1878) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\xc0\x1a\xfc\x15\xd83tC\xc3Df\xe3'), '\x64' + chr(466 - 365) + '\143' + chr(2417 - 2306) + chr(0b110111 + 0o55) + '\x65')('\x75' + chr(0b1110100) + chr(0b1001000 + 0o36) + '\055' + chr(0b111000)))(oNU3PevgmWAO))
vPPlOXQgR3SM = hXMPsSrOQzbh._send_broker_unaware_request(lV7fd2Cq53hp, fXJOkxXvZqV_)
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\xd0M\xab\x1d\xfel~N\xf3xN\xda'), chr(0b1100100) + chr(0b1000 + 0o135) + chr(2786 - 2687) + '\157' + chr(0b1100100) + chr(101))(chr(0b1010 + 0o153) + chr(0b1100000 + 0o24) + chr(0b1100110) + chr(0b101101) + chr(0b111000)))(D8_VZpf7cbpJ, FPwIgoRSsH3T)
return vPPlOXQgR3SM |
ciena/afkak | afkak/client.py | KafkaClient.load_consumer_metadata_for_group | def load_consumer_metadata_for_group(self, group):
"""
Determine broker for the consumer metadata for the specified group
Returns a deferred which callbacks with True if the group's coordinator
could be determined, or errbacks with
ConsumerCoordinatorNotAvailableError if not.
Parameters
----------
group:
group name as `str`
"""
group = _coerce_consumer_group(group)
log.debug("%r: load_consumer_metadata_for_group(%r)", self, group)
# If we are already loading the metadata for this group, then
# just return the outstanding deferred
if group in self.coordinator_fetches:
d = defer.Deferred()
self.coordinator_fetches[group][1].append(d)
return d
# No outstanding request, create a new one
requestId = self._next_id()
request = KafkaCodec.encode_consumermetadata_request(
self._clientIdBytes, requestId, group)
# Callbacks for the request deferred...
def _handleConsumerMetadataResponse(response_bytes):
# Decode the response (returns ConsumerMetadataResponse)
response = KafkaCodec.decode_consumermetadata_response(response_bytes)
log.debug("%r: load_consumer_metadata_for_group(%r) -> %r", self, group, response)
if response.error:
raise BrokerResponseError.errnos.get(response.error, UnknownError)(response)
bm = BrokerMetadata(response.node_id, response.host, response.port)
self.consumer_group_to_brokers[group] = bm
self._update_brokers([bm])
return True
def _handleConsumerMetadataErr(err):
log.error("Failed to retrieve consumer metadata for group %r", group,
exc_info=(err.type, err.value, err.getTracebackObject()))
# Clear any stored value for the group's coordinator
self.reset_consumer_group_metadata(group)
# FIXME: This exception should chain from err.
raise ConsumerCoordinatorNotAvailableError(
"Coordinator for group {!r} not available".format(group),
)
def _propagate(result):
[_, ds] = self.coordinator_fetches.pop(group, None)
for d in ds:
d.callback(result)
# Send the request, add the handlers
request_d = self._send_broker_unaware_request(requestId, request)
d = defer.Deferred()
# Save the deferred under the fetches for this group
self.coordinator_fetches[group] = (request_d, [d])
request_d.addCallback(_handleConsumerMetadataResponse)
request_d.addErrback(_handleConsumerMetadataErr)
request_d.addBoth(_propagate)
return d | python | def load_consumer_metadata_for_group(self, group):
"""
Determine broker for the consumer metadata for the specified group
Returns a deferred which callbacks with True if the group's coordinator
could be determined, or errbacks with
ConsumerCoordinatorNotAvailableError if not.
Parameters
----------
group:
group name as `str`
"""
group = _coerce_consumer_group(group)
log.debug("%r: load_consumer_metadata_for_group(%r)", self, group)
# If we are already loading the metadata for this group, then
# just return the outstanding deferred
if group in self.coordinator_fetches:
d = defer.Deferred()
self.coordinator_fetches[group][1].append(d)
return d
# No outstanding request, create a new one
requestId = self._next_id()
request = KafkaCodec.encode_consumermetadata_request(
self._clientIdBytes, requestId, group)
# Callbacks for the request deferred...
def _handleConsumerMetadataResponse(response_bytes):
# Decode the response (returns ConsumerMetadataResponse)
response = KafkaCodec.decode_consumermetadata_response(response_bytes)
log.debug("%r: load_consumer_metadata_for_group(%r) -> %r", self, group, response)
if response.error:
raise BrokerResponseError.errnos.get(response.error, UnknownError)(response)
bm = BrokerMetadata(response.node_id, response.host, response.port)
self.consumer_group_to_brokers[group] = bm
self._update_brokers([bm])
return True
def _handleConsumerMetadataErr(err):
log.error("Failed to retrieve consumer metadata for group %r", group,
exc_info=(err.type, err.value, err.getTracebackObject()))
# Clear any stored value for the group's coordinator
self.reset_consumer_group_metadata(group)
# FIXME: This exception should chain from err.
raise ConsumerCoordinatorNotAvailableError(
"Coordinator for group {!r} not available".format(group),
)
def _propagate(result):
[_, ds] = self.coordinator_fetches.pop(group, None)
for d in ds:
d.callback(result)
# Send the request, add the handlers
request_d = self._send_broker_unaware_request(requestId, request)
d = defer.Deferred()
# Save the deferred under the fetches for this group
self.coordinator_fetches[group] = (request_d, [d])
request_d.addCallback(_handleConsumerMetadataResponse)
request_d.addErrback(_handleConsumerMetadataErr)
request_d.addBoth(_propagate)
return d | [
"def",
"load_consumer_metadata_for_group",
"(",
"self",
",",
"group",
")",
":",
"group",
"=",
"_coerce_consumer_group",
"(",
"group",
")",
"log",
".",
"debug",
"(",
"\"%r: load_consumer_metadata_for_group(%r)\"",
",",
"self",
",",
"group",
")",
"# If we are already loading the metadata for this group, then",
"# just return the outstanding deferred",
"if",
"group",
"in",
"self",
".",
"coordinator_fetches",
":",
"d",
"=",
"defer",
".",
"Deferred",
"(",
")",
"self",
".",
"coordinator_fetches",
"[",
"group",
"]",
"[",
"1",
"]",
".",
"append",
"(",
"d",
")",
"return",
"d",
"# No outstanding request, create a new one",
"requestId",
"=",
"self",
".",
"_next_id",
"(",
")",
"request",
"=",
"KafkaCodec",
".",
"encode_consumermetadata_request",
"(",
"self",
".",
"_clientIdBytes",
",",
"requestId",
",",
"group",
")",
"# Callbacks for the request deferred...",
"def",
"_handleConsumerMetadataResponse",
"(",
"response_bytes",
")",
":",
"# Decode the response (returns ConsumerMetadataResponse)",
"response",
"=",
"KafkaCodec",
".",
"decode_consumermetadata_response",
"(",
"response_bytes",
")",
"log",
".",
"debug",
"(",
"\"%r: load_consumer_metadata_for_group(%r) -> %r\"",
",",
"self",
",",
"group",
",",
"response",
")",
"if",
"response",
".",
"error",
":",
"raise",
"BrokerResponseError",
".",
"errnos",
".",
"get",
"(",
"response",
".",
"error",
",",
"UnknownError",
")",
"(",
"response",
")",
"bm",
"=",
"BrokerMetadata",
"(",
"response",
".",
"node_id",
",",
"response",
".",
"host",
",",
"response",
".",
"port",
")",
"self",
".",
"consumer_group_to_brokers",
"[",
"group",
"]",
"=",
"bm",
"self",
".",
"_update_brokers",
"(",
"[",
"bm",
"]",
")",
"return",
"True",
"def",
"_handleConsumerMetadataErr",
"(",
"err",
")",
":",
"log",
".",
"error",
"(",
"\"Failed to retrieve consumer metadata for group %r\"",
",",
"group",
",",
"exc_info",
"=",
"(",
"err",
".",
"type",
",",
"err",
".",
"value",
",",
"err",
".",
"getTracebackObject",
"(",
")",
")",
")",
"# Clear any stored value for the group's coordinator",
"self",
".",
"reset_consumer_group_metadata",
"(",
"group",
")",
"# FIXME: This exception should chain from err.",
"raise",
"ConsumerCoordinatorNotAvailableError",
"(",
"\"Coordinator for group {!r} not available\"",
".",
"format",
"(",
"group",
")",
",",
")",
"def",
"_propagate",
"(",
"result",
")",
":",
"[",
"_",
",",
"ds",
"]",
"=",
"self",
".",
"coordinator_fetches",
".",
"pop",
"(",
"group",
",",
"None",
")",
"for",
"d",
"in",
"ds",
":",
"d",
".",
"callback",
"(",
"result",
")",
"# Send the request, add the handlers",
"request_d",
"=",
"self",
".",
"_send_broker_unaware_request",
"(",
"requestId",
",",
"request",
")",
"d",
"=",
"defer",
".",
"Deferred",
"(",
")",
"# Save the deferred under the fetches for this group",
"self",
".",
"coordinator_fetches",
"[",
"group",
"]",
"=",
"(",
"request_d",
",",
"[",
"d",
"]",
")",
"request_d",
".",
"addCallback",
"(",
"_handleConsumerMetadataResponse",
")",
"request_d",
".",
"addErrback",
"(",
"_handleConsumerMetadataErr",
")",
"request_d",
".",
"addBoth",
"(",
"_propagate",
")",
"return",
"d"
] | Determine broker for the consumer metadata for the specified group
Returns a deferred which callbacks with True if the group's coordinator
could be determined, or errbacks with
ConsumerCoordinatorNotAvailableError if not.
Parameters
----------
group:
group name as `str` | [
"Determine",
"broker",
"for",
"the",
"consumer",
"metadata",
"for",
"the",
"specified",
"group"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L442-L506 | train | Load the consumer metadata for the specified group. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DL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WU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + '\062' + chr(1740 - 1688), 43733 - 43725), nzTpIcepk0o8(chr(48) + chr(0b110111 + 0o70) + chr(54) + '\064', 0b1000), nzTpIcepk0o8('\060' + chr(6748 - 6637) + chr(49) + chr(0b110000) + '\x34', 33886 - 33878), nzTpIcepk0o8('\x30' + '\157' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + chr(49) + chr(0b110110) + chr(53), 46185 - 46177), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + chr(0b100011 + 0o16) + chr(0b110100) + chr(52), 40868 - 40860), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + '\x32' + chr(0b11111 + 0o24) + '\x34', 0b1000), nzTpIcepk0o8(chr(493 - 445) + chr(0b1100011 + 0o14) + chr(0b10110 + 0o33) + chr(1513 - 1462) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\067' + chr(1094 - 1039), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + '\x33' + '\063', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + chr(0b100001 + 0o23) + chr(0b101110 + 0o3), 0o10), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + chr(51) + '\067' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + '\062' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b101011 + 0o104) + chr(0b11101 + 0o27), ord("\x08")), nzTpIcepk0o8('\060' + chr(9961 - 9850) + chr(0b101111 + 0o3) + '\062' + '\061', 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(111) + '\x31' + '\x36' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b11010 + 0o125) + '\x32' + chr(0b101000 + 0o10) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(111) + chr(50) + chr(51) + chr(0b110001 + 0o3), 8), nzTpIcepk0o8('\060' + chr(5504 - 5393) + chr(54) + chr(448 - 396), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + '\064' + chr(0b100101 + 0o13), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + chr(0b1110 + 0o45) + chr(0b1000 + 0o52), ord("\x08")), nzTpIcepk0o8(chr(1287 - 1239) + chr(111) + '\065' + '\064', 49183 - 49175), nzTpIcepk0o8('\x30' + '\157' + chr(1007 - 956) + '\x32' + chr(1461 - 1412), 58779 - 58771), nzTpIcepk0o8('\x30' + '\157' + chr(0b10111 + 0o32) + '\x34' + chr(321 - 270), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + chr(0b110001) + chr(732 - 681) + chr(427 - 378), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1011 + 0o144) + chr(0b100010 + 0o23) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + '\x35' + chr(0b100011 + 0o22), ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b11100 + 0o123) + chr(50) + chr(609 - 554) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(49) + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110011 + 0o74) + chr(0b110010) + chr(0b10111 + 0o40) + chr(0b10000 + 0o41), 64396 - 64388), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100011 + 0o17) + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(4996 - 4885) + '\x32' + chr(50) + chr(0b110100), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1237 - 1187) + chr(52) + chr(925 - 877), 0o10), nzTpIcepk0o8('\x30' + chr(8261 - 8150) + chr(0b110011) + '\x37' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\065' + '\067', 0o10), nzTpIcepk0o8(chr(86 - 38) + chr(0b1101111) + chr(0b10000 + 0o43) + '\x30' + chr(0b101101 + 0o12), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(0b100101 + 0o17), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b101111 + 0o4) + chr(0b100 + 0o55), 0b1000), nzTpIcepk0o8(chr(576 - 528) + chr(111) + '\x32' + chr(0b110000 + 0o7) + chr(931 - 876), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(11786 - 11675) + chr(603 - 552) + '\066' + chr(744 - 694), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(2021 - 1973) + chr(5681 - 5570) + '\x35' + chr(0b10101 + 0o33), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xba'), '\144' + '\x65' + chr(99) + chr(111) + chr(100) + chr(6611 - 6510))(chr(0b1110101) + chr(0b1110000 + 0o4) + chr(102) + chr(1328 - 1283) + chr(0b11000 + 0o40)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def kd9_3KofWp1T(hXMPsSrOQzbh, F9lJ8RbIonqb):
F9lJ8RbIonqb = LEwRoK6l6REM(F9lJ8RbIonqb)
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\xf3u}YL\x00\xf3jj6\xe4\xa7'), chr(0b1100100) + chr(101) + chr(0b110000 + 0o63) + '\157' + chr(8693 - 8593) + chr(0b11111 + 0o106))(chr(0b1110101) + chr(0b1110100) + chr(0b1010110 + 0o20) + '\055' + chr(313 - 257)))(roI3spqORKae(ES5oEprVxulp(b'\xb1F~#\x19\x0b\xfd8`8\xce\x93&q\xfc\x17\xf3\xc3Y\x05\xeeM\xb5\x02-K\xb2\xda\xe2\xcbO\xf3\xd2\x90Z\xb74<\xcd\xdb'), chr(100) + chr(6302 - 6201) + '\143' + chr(5029 - 4918) + '\144' + '\145')(chr(0b101101 + 0o110) + chr(0b1010101 + 0o37) + '\x66' + chr(45) + chr(56)), hXMPsSrOQzbh, F9lJ8RbIonqb)
if F9lJ8RbIonqb in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf7[+q\x11\r\xf2=K4\xd3\xa23a\xe5\x11\xe9\xf9G'), '\x64' + '\145' + '\143' + '\x6f' + '\x64' + chr(101))(chr(117) + '\164' + chr(0b101000 + 0o76) + '\x2d' + '\070')):
vPPlOXQgR3SM = hKESOdYBX3yt.Deferred()
roI3spqORKae(hXMPsSrOQzbh.coordinator_fetches[F9lJ8RbIonqb][nzTpIcepk0o8(chr(856 - 808) + '\x6f' + chr(49), 0o10)], roI3spqORKae(ES5oEprVxulp(b'\xdc`\x177\r\x03\xdb3U4\xf4\xc8'), '\x64' + chr(686 - 585) + chr(7631 - 7532) + chr(111) + chr(0b110011 + 0o61) + chr(0b1100101))(chr(0b1001010 + 0o53) + '\x74' + chr(5809 - 5707) + chr(45) + chr(0b111000)))(vPPlOXQgR3SM)
return vPPlOXQgR3SM
lV7fd2Cq53hp = hXMPsSrOQzbh.beTrlthJqgCw()
fXJOkxXvZqV_ = xbGTsX4crO7w.encode_consumermetadata_request(hXMPsSrOQzbh._clientIdBytes, lV7fd2Cq53hp, F9lJ8RbIonqb)
def Gdso3MxRuvuI(UM_zMXtQ3slu):
k2zzaFDtbuhL = xbGTsX4crO7w.decode_consumermetadata_response(UM_zMXtQ3slu)
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\xf3u}YL\x00\xf3jj6\xe4\xa7'), '\x64' + chr(5074 - 4973) + chr(0b1100011) + chr(3211 - 3100) + chr(3340 - 3240) + '\x65')('\165' + chr(116) + chr(0b1011010 + 0o14) + chr(45) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\xb1F~#\x19\x0b\xfd8`8\xce\x93&q\xfc\x17\xf3\xc3Y\x05\xeeM\xb5\x02-K\xb2\xda\xe2\xcbO\xf3\xd2\x90Z\xb74<\xcd\xdb\xb4\x19z#P\x16'), chr(0b1011 + 0o131) + chr(0b1100101) + chr(0b1100011) + chr(9976 - 9865) + chr(8827 - 8727) + '\x65')('\165' + chr(0b1110100) + chr(102) + chr(0b101101) + chr(439 - 383)), hXMPsSrOQzbh, F9lJ8RbIonqb, k2zzaFDtbuhL)
if roI3spqORKae(k2zzaFDtbuhL, roI3spqORKae(ES5oEprVxulp(b'\xe5]ut\x1c\x14\xcc\nI\x1e\xea\x99'), chr(0b1100100) + chr(101) + chr(99) + chr(0b101011 + 0o104) + chr(100) + chr(1492 - 1391))('\x75' + '\x74' + chr(8594 - 8492) + chr(0b1110 + 0o37) + chr(0b111000))):
raise roI3spqORKae(UR28wbeXyFP6.errnos, roI3spqORKae(ES5oEprVxulp(b'\xd3a\x0ff\x01\x11\xa8$^\x1c\xd2\xb7'), chr(1761 - 1661) + chr(0b1001 + 0o134) + '\143' + chr(111) + '\144' + chr(0b1100101 + 0o0))(chr(6809 - 6692) + '\x74' + '\x66' + chr(0b110 + 0o47) + chr(1692 - 1636)))(roI3spqORKae(k2zzaFDtbuhL, roI3spqORKae(ES5oEprVxulp(b'\xe5]ut\x1c\x14\xcc\nI\x1e\xea\x99'), chr(0b1100100) + chr(0b110111 + 0o56) + '\143' + chr(0b1101111) + '\x64' + chr(101))(chr(10534 - 10417) + chr(116) + chr(1382 - 1280) + chr(0b10100 + 0o31) + '\x38')), e2E4javt0nWv)(k2zzaFDtbuhL)
ASceZlugNeMa = cQ79uLcX1Ep9(k2zzaFDtbuhL.l4ejMdXa7Niq, k2zzaFDtbuhL.UcZofMadI5hD, k2zzaFDtbuhL.FKWBoSDY8Qs2)
hXMPsSrOQzbh.g7Hh_MU3EEMc[F9lJ8RbIonqb] = ASceZlugNeMa
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xcbA4g\x14\x10\xf9\x03])\xce\x960v\xe2'), chr(2914 - 2814) + chr(0b100001 + 0o104) + chr(0b11100 + 0o107) + chr(10730 - 10619) + chr(5591 - 5491) + chr(101))(chr(4602 - 4485) + '\164' + chr(102) + chr(0b11011 + 0o22) + '\070'))([ASceZlugNeMa])
return nzTpIcepk0o8(chr(1120 - 1072) + chr(0b1010111 + 0o30) + chr(0b1110 + 0o43), 8)
def OEwopNmluyKr(oNU3PevgmWAO):
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\xe5]ut\x1c\x14\xcc\nI\x1e\xea\x99'), chr(0b1000010 + 0o42) + chr(101) + '\x63' + '\157' + chr(4009 - 3909) + chr(0b1100101))(chr(0b1110101) + chr(0b111010 + 0o72) + chr(0b1100110) + chr(1707 - 1662) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xd2U-o\x10\x00\xbc(P{\xd3\x98!v\xf8\x17\xf7\xf9\x14\x03\xf5B\xa2\x164O\x9f\x9c\xe0\xdcd\xf5\xc4\x9e[\xa6<\x7f\xd0\x80\xb4S6l\x00\x14\xbcyM'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(784 - 683))(chr(0b1110101) + chr(116) + chr(102) + chr(1221 - 1176) + chr(2768 - 2712)), F9lJ8RbIonqb, exc_info=(roI3spqORKae(oNU3PevgmWAO, roI3spqORKae(ES5oEprVxulp(b'\xd9~t4-\x17\xd2iJ\x1d\xc6\xaa'), '\x64' + '\x65' + chr(99) + chr(111) + chr(100) + chr(2359 - 2258))(chr(0b111101 + 0o70) + '\x74' + '\146' + chr(45) + '\x38')), roI3spqORKae(oNU3PevgmWAO, roI3spqORKae(ES5oEprVxulp(b'\xe1b}j7\r\xeblF\x04\xec\x8d'), chr(100) + chr(5411 - 5310) + chr(0b11111 + 0o104) + '\157' + '\x64' + chr(0b1100101))(chr(7047 - 6930) + chr(10936 - 10820) + '\146' + chr(45) + '\x38')), roI3spqORKae(oNU3PevgmWAO, roI3spqORKae(ES5oEprVxulp(b'\xf3Q0W\x07\x05\xff9]:\xc2\x96\x1af\xfb\x17\xe2\xe8'), '\x64' + chr(0b1010010 + 0o23) + chr(7115 - 7016) + chr(0b1101111) + chr(0b1100100) + '\x65')(chr(0b100101 + 0o120) + chr(0b1010100 + 0o40) + '\x66' + '\x2d' + '\070'))()))
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe6Q7f\x01;\xff3Q(\xd4\x900v\xce\x15\xf3\xf3A\x10\xc5A\xb4\x178N\x8c\xc8\xec'), chr(7283 - 7183) + chr(0b1000110 + 0o37) + chr(8408 - 8309) + chr(0b1100100 + 0o13) + '\144' + chr(0b1001110 + 0o27))('\165' + chr(11021 - 10905) + '\146' + chr(0b101101) + chr(56)))(F9lJ8RbIonqb)
raise c4UsF0BfB90y(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xd7[+q\x11\r\xf2=K4\xd3\xdd3k\xe3R\xe6\xee[\x15\xea\x0c\xaaB+W\xcd\xd2\xe2\xcd0\xf5\xd6\x9eF\xab}{\xd3\x97'), chr(7644 - 7544) + '\145' + chr(0b1111 + 0o124) + '\x6f' + chr(0b1100100) + chr(0b11011 + 0o112))(chr(4840 - 4723) + '\164' + '\x66' + chr(679 - 634) + chr(0b110101 + 0o3)), roI3spqORKae(ES5oEprVxulp(b'\xe5\x07wH2W\xfa3n\x04\xe2\xb7'), '\x64' + '\145' + chr(0b1100011) + chr(0b111001 + 0o66) + '\x64' + chr(1103 - 1002))(chr(10884 - 10767) + chr(10576 - 10460) + '\x66' + '\055' + '\x38'))(F9lJ8RbIonqb))
def ZzoDV4jZlBDy(POx95m7SPOVy):
[zIqcgNgQ9U6F, whH1_Jq0RGiI] = hXMPsSrOQzbh.coordinator_fetches.uC_Yoybx7J0I(F9lJ8RbIonqb, None)
for vPPlOXQgR3SM in whH1_Jq0RGiI:
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\xfesqH P\xc9\tx5\xca\xc8'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b111001 + 0o53) + '\145')(chr(117) + chr(4668 - 4552) + chr(0b1100110) + chr(1422 - 1377) + '\070'))(POx95m7SPOVy)
f2EP2ERVfRN7 = hXMPsSrOQzbh._send_broker_unaware_request(lV7fd2Cq53hp, fXJOkxXvZqV_)
vPPlOXQgR3SM = hKESOdYBX3yt.Deferred()
hXMPsSrOQzbh.w1J9OVzhLjVo[F9lJ8RbIonqb] = (f2EP2ERVfRN7, [vPPlOXQgR3SM])
roI3spqORKae(f2EP2ERVfRN7, roI3spqORKae(ES5oEprVxulp(b'\xf5P @\x14\x08\xf0>^8\xca'), '\x64' + chr(0b1000110 + 0o37) + chr(99) + chr(111) + chr(1705 - 1605) + chr(101))(chr(3192 - 3075) + chr(12453 - 12337) + '\x66' + chr(0b10011 + 0o32) + '\070'))(Gdso3MxRuvuI)
roI3spqORKae(f2EP2ERVfRN7, roI3spqORKae(ES5oEprVxulp(b'\xf5P F\x07\x16\xfe=\\0'), chr(8490 - 8390) + chr(5406 - 5305) + chr(0b1100011) + chr(7291 - 7180) + '\144' + chr(101))('\165' + chr(5204 - 5088) + '\x66' + chr(45) + chr(0b101111 + 0o11)))(OEwopNmluyKr)
roI3spqORKae(f2EP2ERVfRN7, roI3spqORKae(ES5oEprVxulp(b'\xf5P A\x1a\x10\xf4'), chr(0b11111 + 0o105) + chr(8275 - 8174) + '\x63' + chr(111) + '\144' + chr(0b1100101))(chr(117) + '\x74' + '\x66' + chr(0b101101) + chr(0b111000)))(ZzoDV4jZlBDy)
return vPPlOXQgR3SM |
ciena/afkak | afkak/client.py | KafkaClient.send_produce_request | def send_produce_request(self, payloads=None, acks=1,
timeout=DEFAULT_REPLICAS_ACK_MSECS,
fail_on_error=True, callback=None):
"""
Encode and send some ProduceRequests
ProduceRequests will be grouped by (topic, partition) and then
sent to a specific broker. Output is a list of responses in the
same order as the list of payloads specified
Parameters
----------
payloads:
list of ProduceRequest
acks:
How many Kafka broker replicas need to write before
the leader replies with a response
timeout:
How long the server has to receive the acks from the
replicas before returning an error.
fail_on_error:
boolean, should we raise an Exception if we encounter an API error?
callback:
function, instead of returning the ProduceResponse,
first pass it through this function
Return
------
a deferred which callbacks with a list of ProduceResponse
Raises
------
FailedPayloadsError, LeaderUnavailableError, PartitionUnavailableError
"""
encoder = partial(
KafkaCodec.encode_produce_request,
acks=acks,
timeout=timeout)
if acks == 0:
decoder = None
else:
decoder = KafkaCodec.decode_produce_response
resps = yield self._send_broker_aware_request(
payloads, encoder, decoder)
returnValue(self._handle_responses(resps, fail_on_error, callback)) | python | def send_produce_request(self, payloads=None, acks=1,
timeout=DEFAULT_REPLICAS_ACK_MSECS,
fail_on_error=True, callback=None):
"""
Encode and send some ProduceRequests
ProduceRequests will be grouped by (topic, partition) and then
sent to a specific broker. Output is a list of responses in the
same order as the list of payloads specified
Parameters
----------
payloads:
list of ProduceRequest
acks:
How many Kafka broker replicas need to write before
the leader replies with a response
timeout:
How long the server has to receive the acks from the
replicas before returning an error.
fail_on_error:
boolean, should we raise an Exception if we encounter an API error?
callback:
function, instead of returning the ProduceResponse,
first pass it through this function
Return
------
a deferred which callbacks with a list of ProduceResponse
Raises
------
FailedPayloadsError, LeaderUnavailableError, PartitionUnavailableError
"""
encoder = partial(
KafkaCodec.encode_produce_request,
acks=acks,
timeout=timeout)
if acks == 0:
decoder = None
else:
decoder = KafkaCodec.decode_produce_response
resps = yield self._send_broker_aware_request(
payloads, encoder, decoder)
returnValue(self._handle_responses(resps, fail_on_error, callback)) | [
"def",
"send_produce_request",
"(",
"self",
",",
"payloads",
"=",
"None",
",",
"acks",
"=",
"1",
",",
"timeout",
"=",
"DEFAULT_REPLICAS_ACK_MSECS",
",",
"fail_on_error",
"=",
"True",
",",
"callback",
"=",
"None",
")",
":",
"encoder",
"=",
"partial",
"(",
"KafkaCodec",
".",
"encode_produce_request",
",",
"acks",
"=",
"acks",
",",
"timeout",
"=",
"timeout",
")",
"if",
"acks",
"==",
"0",
":",
"decoder",
"=",
"None",
"else",
":",
"decoder",
"=",
"KafkaCodec",
".",
"decode_produce_response",
"resps",
"=",
"yield",
"self",
".",
"_send_broker_aware_request",
"(",
"payloads",
",",
"encoder",
",",
"decoder",
")",
"returnValue",
"(",
"self",
".",
"_handle_responses",
"(",
"resps",
",",
"fail_on_error",
",",
"callback",
")",
")"
] | Encode and send some ProduceRequests
ProduceRequests will be grouped by (topic, partition) and then
sent to a specific broker. Output is a list of responses in the
same order as the list of payloads specified
Parameters
----------
payloads:
list of ProduceRequest
acks:
How many Kafka broker replicas need to write before
the leader replies with a response
timeout:
How long the server has to receive the acks from the
replicas before returning an error.
fail_on_error:
boolean, should we raise an Exception if we encounter an API error?
callback:
function, instead of returning the ProduceResponse,
first pass it through this function
Return
------
a deferred which callbacks with a list of ProduceResponse
Raises
------
FailedPayloadsError, LeaderUnavailableError, PartitionUnavailableError | [
"Encode",
"and",
"send",
"some",
"ProduceRequests"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L509-L557 | train | Send a ProduceRequest to the broker. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6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lqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(2103 - 1992) + '\x31' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(972 - 922) + chr(0b110000) + '\x34', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(49) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + '\x32' + chr(1936 - 1886), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x36' + chr(1646 - 1598), 10239 - 10231), nzTpIcepk0o8(chr(48) + chr(0b10001 + 0o136) + chr(0b110010) + chr(0b110010) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + chr(51) + chr(895 - 844), 15655 - 15647), nzTpIcepk0o8('\x30' + chr(111) + chr(52) + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(55) + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(49) + '\x30' + chr(0b100000 + 0o26), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10 + 0o60) + chr(53) + chr(611 - 562), 37193 - 37185), nzTpIcepk0o8('\x30' + chr(0b100110 + 0o111) + chr(0b10100 + 0o37) + chr(2490 - 2440) + '\064', 44745 - 44737), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + '\x36' + chr(54), 0b1000), nzTpIcepk0o8(chr(2283 - 2235) + '\x6f' + chr(52) + chr(0b110111), 8), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b110000 + 0o77) + chr(0b10110 + 0o33) + '\x36' + '\064', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110100) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(5319 - 5208) + chr(51) + '\x37' + chr(0b10001 + 0o46), ord("\x08")), nzTpIcepk0o8('\060' + chr(6399 - 6288) + '\x33' + '\x36' + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + '\060' + '\066', 10507 - 10499), nzTpIcepk0o8('\060' + chr(111) + '\x36' + chr(0b110000), 8), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(0b110001) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(1450 - 1402) + '\157' + chr(49) + chr(52) + chr(1823 - 1771), 2278 - 2270), nzTpIcepk0o8(chr(0b110000) + chr(0b100011 + 0o114) + chr(0b101111 + 0o2) + '\067' + '\064', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(0b110001) + '\061', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + '\x35' + chr(1129 - 1074), 0o10), nzTpIcepk0o8(chr(48) + chr(2593 - 2482) + '\061' + '\x31' + '\060', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(0b1000 + 0o50) + chr(0b110001), 2611 - 2603), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(469 - 414) + '\063', 0o10), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(111) + '\063' + '\x34' + chr(0b110000 + 0o4), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + chr(55), 4182 - 4174), nzTpIcepk0o8('\x30' + chr(0b1101000 + 0o7) + chr(2157 - 2107) + '\064' + chr(49), 0o10), nzTpIcepk0o8(chr(585 - 537) + chr(111) + chr(51) + chr(1917 - 1867) + '\x31', 18612 - 18604), nzTpIcepk0o8('\x30' + chr(111) + chr(643 - 589) + chr(52), 0b1000), nzTpIcepk0o8(chr(950 - 902) + '\x6f' + chr(0b110011) + '\067' + '\x35', 25865 - 25857), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(743 - 695) + chr(0b101011 + 0o14), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4085 - 3974) + '\061' + '\060' + '\061', 0b1000), nzTpIcepk0o8(chr(1058 - 1010) + chr(0b10 + 0o155) + chr(0b11001 + 0o30) + chr(49) + chr(0b110100 + 0o0), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101000 + 0o12) + chr(0b101000 + 0o10) + chr(0b110100), 8), nzTpIcepk0o8(chr(589 - 541) + chr(0b110011 + 0o74) + chr(819 - 769) + '\x35', 35875 - 35867), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b1101111) + '\x30', 29412 - 29404)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110101) + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'$'), chr(100) + chr(0b1100101) + chr(0b1011010 + 0o11) + chr(4245 - 4134) + chr(327 - 227) + chr(7113 - 7012))('\165' + chr(116) + chr(1713 - 1611) + chr(45) + chr(1102 - 1046)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def hW76Zp1RYLk0(hXMPsSrOQzbh, hu1hynoeGawF=None, DrTNwh41cU_e=nzTpIcepk0o8('\x30' + chr(0b1011000 + 0o27) + '\061', 0b1000), ACACUUFQsMpr=N5xaMgJ7a3nm, KNOTLzs86rnO=nzTpIcepk0o8('\x30' + chr(272 - 161) + '\061', 8), jG5KU4UUGnk5=None):
iOLbMFzneHpo = v_5JLGL_2DSR(xbGTsX4crO7w.encode_produce_request, acks=DrTNwh41cU_e, timeout=ACACUUFQsMpr)
if DrTNwh41cU_e == nzTpIcepk0o8('\x30' + chr(0b100010 + 0o115) + chr(1910 - 1862), 8):
CPoSpgmLTbWt = None
else:
CPoSpgmLTbWt = xbGTsX4crO7w.decode_produce_response
zzI1IoTNDa4o = (yield hXMPsSrOQzbh._send_broker_aware_request(hu1hynoeGawF, iOLbMFzneHpo, CPoSpgmLTbWt))
wVKqxW5Umubk(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'U\xec\xef<T\xfc~x\xce#\xda\xa4\x99I\x07C\x8c'), chr(9342 - 9242) + chr(6558 - 6457) + '\x63' + chr(111) + chr(0b110101 + 0o57) + chr(0b101101 + 0o70))('\x75' + chr(0b1110100) + '\x66' + chr(0b101101) + '\x38'))(zzI1IoTNDa4o, KNOTLzs86rnO, jG5KU4UUGnk5)) |
ciena/afkak | afkak/client.py | KafkaClient.send_fetch_request | def send_fetch_request(self, payloads=None, fail_on_error=True,
callback=None,
max_wait_time=DEFAULT_FETCH_SERVER_WAIT_MSECS,
min_bytes=DEFAULT_FETCH_MIN_BYTES):
"""
Encode and send a FetchRequest
Payloads are grouped by topic and partition so they can be pipelined
to the same brokers.
Raises
======
FailedPayloadsError, LeaderUnavailableError, PartitionUnavailableError
"""
if (max_wait_time / 1000) > (self.timeout - 0.1):
raise ValueError(
"%r: max_wait_time: %d must be less than client.timeout by "
"at least 100 milliseconds.", self, max_wait_time)
encoder = partial(KafkaCodec.encode_fetch_request,
max_wait_time=max_wait_time,
min_bytes=min_bytes)
# resps is a list of FetchResponse() objects, each of which can hold
# 1-n messages.
resps = yield self._send_broker_aware_request(
payloads, encoder,
KafkaCodec.decode_fetch_response)
returnValue(self._handle_responses(resps, fail_on_error, callback)) | python | def send_fetch_request(self, payloads=None, fail_on_error=True,
callback=None,
max_wait_time=DEFAULT_FETCH_SERVER_WAIT_MSECS,
min_bytes=DEFAULT_FETCH_MIN_BYTES):
"""
Encode and send a FetchRequest
Payloads are grouped by topic and partition so they can be pipelined
to the same brokers.
Raises
======
FailedPayloadsError, LeaderUnavailableError, PartitionUnavailableError
"""
if (max_wait_time / 1000) > (self.timeout - 0.1):
raise ValueError(
"%r: max_wait_time: %d must be less than client.timeout by "
"at least 100 milliseconds.", self, max_wait_time)
encoder = partial(KafkaCodec.encode_fetch_request,
max_wait_time=max_wait_time,
min_bytes=min_bytes)
# resps is a list of FetchResponse() objects, each of which can hold
# 1-n messages.
resps = yield self._send_broker_aware_request(
payloads, encoder,
KafkaCodec.decode_fetch_response)
returnValue(self._handle_responses(resps, fail_on_error, callback)) | [
"def",
"send_fetch_request",
"(",
"self",
",",
"payloads",
"=",
"None",
",",
"fail_on_error",
"=",
"True",
",",
"callback",
"=",
"None",
",",
"max_wait_time",
"=",
"DEFAULT_FETCH_SERVER_WAIT_MSECS",
",",
"min_bytes",
"=",
"DEFAULT_FETCH_MIN_BYTES",
")",
":",
"if",
"(",
"max_wait_time",
"/",
"1000",
")",
">",
"(",
"self",
".",
"timeout",
"-",
"0.1",
")",
":",
"raise",
"ValueError",
"(",
"\"%r: max_wait_time: %d must be less than client.timeout by \"",
"\"at least 100 milliseconds.\"",
",",
"self",
",",
"max_wait_time",
")",
"encoder",
"=",
"partial",
"(",
"KafkaCodec",
".",
"encode_fetch_request",
",",
"max_wait_time",
"=",
"max_wait_time",
",",
"min_bytes",
"=",
"min_bytes",
")",
"# resps is a list of FetchResponse() objects, each of which can hold",
"# 1-n messages.",
"resps",
"=",
"yield",
"self",
".",
"_send_broker_aware_request",
"(",
"payloads",
",",
"encoder",
",",
"KafkaCodec",
".",
"decode_fetch_response",
")",
"returnValue",
"(",
"self",
".",
"_handle_responses",
"(",
"resps",
",",
"fail_on_error",
",",
"callback",
")",
")"
] | Encode and send a FetchRequest
Payloads are grouped by topic and partition so they can be pipelined
to the same brokers.
Raises
======
FailedPayloadsError, LeaderUnavailableError, PartitionUnavailableError | [
"Encode",
"and",
"send",
"a",
"FetchRequest"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L560-L589 | train | Send FetchRequest to all brokers. | GiP5xwVCF98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UdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + '\065', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100011 + 0o22) + chr(0b110010), 54342 - 54334), nzTpIcepk0o8(chr(1609 - 1561) + chr(111) + '\x36' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(50) + chr(0b10111 + 0o32), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(417 - 367) + chr(49) + chr(0b10010 + 0o37), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101111 + 0o2) + '\x33' + '\064', 0o10), nzTpIcepk0o8(chr(1052 - 1004) + chr(0b1101111) + chr(1758 - 1709) + '\062' + chr(52), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1510 - 1460) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(450 - 402) + chr(0b1101111) + '\x32', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1000011 + 0o54) + chr(273 - 223) + '\x30' + '\x34', 26359 - 26351), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b10000 + 0o137) + '\063' + chr(0b10111 + 0o32), 26663 - 26655), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1101111) + chr(0b110011) + chr(0b110100) + chr(0b1100 + 0o45), 62701 - 62693), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(0b110010) + chr(0b110 + 0o53), ord("\x08")), nzTpIcepk0o8(chr(1564 - 1516) + chr(1671 - 1560) + '\063' + '\060' + chr(0b100110 + 0o17), 0b1000), nzTpIcepk0o8(chr(153 - 105) + chr(0b110000 + 0o77) + chr(0b110001) + chr(0b11111 + 0o30) + chr(51), 0o10), nzTpIcepk0o8('\060' + chr(10883 - 10772) + '\x31' + chr(55) + chr(54), 0o10), nzTpIcepk0o8(chr(1608 - 1560) + '\x6f' + chr(0b110001) + chr(1354 - 1304) + chr(54), 21200 - 21192), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(53) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + chr(4160 - 4049) + chr(0b110001) + chr(0b110010) + chr(0b110100), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1010111 + 0o30) + chr(51) + '\x35' + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + '\x35' + '\x31', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + chr(51) + '\061', 34320 - 34312), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(650 - 601) + '\064' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(1776 - 1728) + chr(111) + '\x31' + '\x36' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1000110 + 0o51) + chr(1168 - 1119) + '\x32' + chr(55), 50691 - 50683), nzTpIcepk0o8('\060' + chr(0b100111 + 0o110) + chr(0b110001) + '\067' + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1100011 + 0o14) + chr(51) + chr(53) + '\x30', 287 - 279), nzTpIcepk0o8(chr(990 - 942) + chr(0b1101111) + chr(49) + chr(0b10101 + 0o41) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(48) + chr(481 - 433), 0b1000), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + '\x31' + chr(161 - 112) + '\066', 37473 - 37465), nzTpIcepk0o8(chr(48) + chr(111) + chr(1662 - 1613) + chr(0b101010 + 0o6) + chr(54), 0o10), nzTpIcepk0o8('\060' + '\157' + '\x36', 0b1000), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b110110 + 0o71) + chr(50) + chr(48) + chr(828 - 778), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(197 - 146) + chr(0b101100 + 0o7) + chr(1074 - 1022), 0o10), nzTpIcepk0o8('\x30' + chr(1292 - 1181) + chr(0b100110 + 0o17) + chr(0b1000 + 0o52), 8), nzTpIcepk0o8('\x30' + chr(0b1010000 + 0o37) + chr(0b10100 + 0o36) + chr(0b100101 + 0o20), 11469 - 11461), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(5020 - 4909) + chr(55) + chr(0b110100), 2969 - 2961), nzTpIcepk0o8('\x30' + '\157' + '\x32' + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(1857 - 1746) + chr(0b10010 + 0o41) + '\060' + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(10624 - 10513) + chr(0b1100 + 0o53) + '\061', 65031 - 65023)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b111011 + 0o64) + chr(53) + chr(0b110000), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'+'), chr(0b1100100) + '\145' + chr(0b1000011 + 0o40) + '\157' + chr(100) + chr(2923 - 2822))(chr(0b101010 + 0o113) + '\164' + '\x66' + chr(45) + chr(0b101101 + 0o13)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def ExNcI01k6p5q(hXMPsSrOQzbh, hu1hynoeGawF=None, KNOTLzs86rnO=nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100110 + 0o13), ord("\x08")), jG5KU4UUGnk5=None, DQ_HwlCYOJfB=c4XFh0vHCSyb, YBuHJAlFGwhJ=jya2n04zh9yw):
if DQ_HwlCYOJfB / nzTpIcepk0o8(chr(1597 - 1549) + chr(0b1000000 + 0o57) + chr(0b100110 + 0o13) + '\067' + chr(0b110101) + chr(0b110000), 0b1000) > roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'Dis\xd2\xdc\t\x12Bq\xc9i\x93'), '\x64' + chr(5450 - 5349) + chr(99) + chr(0b1101111) + chr(0b1010101 + 0o17) + '\x65')(chr(117) + chr(0b1110100) + chr(0b1010000 + 0o26) + '\x2d' + chr(56))) - 0.1:
raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b' X\x08\xb1\xe4=,Lu\xe5p\x95\x8e\xb1\x12\x133\xd3t\xcf\x8d\xb9\x0b\x03$\x0c\xc8\x13\xe5n*c\xf1\xaf\naTs\xaf\x19fF[\xf4\xe7(zgk\xe9|\x8e\xa4\xb1[\x1c/\xc95\x9e\xc9\xf5\x03\x17$\x0c\xc8@\xb0~fk\xeb\xb0F|Ow\xa2VkNA\xbf'), '\144' + chr(101) + chr(99) + '\157' + chr(0b1011100 + 0o10) + '\x65')('\165' + chr(116) + chr(7037 - 6935) + chr(0b100111 + 0o6) + chr(0b101011 + 0o15)), hXMPsSrOQzbh, DQ_HwlCYOJfB)
iOLbMFzneHpo = v_5JLGL_2DSR(xbGTsX4crO7w.encode_fetch_request, max_wait_time=DQ_HwlCYOJfB, min_bytes=YBuHJAlFGwhJ)
zzI1IoTNDa4o = (yield hXMPsSrOQzbh._send_broker_aware_request(hu1hynoeGawF, iOLbMFzneHpo, xbGTsX4crO7w.decode_fetch_response))
wVKqxW5Umubk(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'ZBS\xff\xed01Lp\xe1j\x91\xbe\xab\x08\x1b%'), chr(0b1100010 + 0o2) + chr(0b101010 + 0o73) + chr(1691 - 1592) + chr(111) + chr(0b11001 + 0o113) + chr(0b1001010 + 0o33))(chr(117) + '\164' + '\146' + chr(1796 - 1751) + chr(466 - 410)))(zzI1IoTNDa4o, KNOTLzs86rnO, jG5KU4UUGnk5)) |
ciena/afkak | afkak/client.py | KafkaClient.send_offset_fetch_request | def send_offset_fetch_request(self, group, payloads=None,
fail_on_error=True, callback=None):
"""
Takes a group (string) and list of OffsetFetchRequest and returns
a list of OffsetFetchResponse objects
"""
encoder = partial(KafkaCodec.encode_offset_fetch_request,
group=group)
decoder = KafkaCodec.decode_offset_fetch_response
resps = yield self._send_broker_aware_request(
payloads, encoder, decoder, consumer_group=group)
returnValue(self._handle_responses(
resps, fail_on_error, callback, group)) | python | def send_offset_fetch_request(self, group, payloads=None,
fail_on_error=True, callback=None):
"""
Takes a group (string) and list of OffsetFetchRequest and returns
a list of OffsetFetchResponse objects
"""
encoder = partial(KafkaCodec.encode_offset_fetch_request,
group=group)
decoder = KafkaCodec.decode_offset_fetch_response
resps = yield self._send_broker_aware_request(
payloads, encoder, decoder, consumer_group=group)
returnValue(self._handle_responses(
resps, fail_on_error, callback, group)) | [
"def",
"send_offset_fetch_request",
"(",
"self",
",",
"group",
",",
"payloads",
"=",
"None",
",",
"fail_on_error",
"=",
"True",
",",
"callback",
"=",
"None",
")",
":",
"encoder",
"=",
"partial",
"(",
"KafkaCodec",
".",
"encode_offset_fetch_request",
",",
"group",
"=",
"group",
")",
"decoder",
"=",
"KafkaCodec",
".",
"decode_offset_fetch_response",
"resps",
"=",
"yield",
"self",
".",
"_send_broker_aware_request",
"(",
"payloads",
",",
"encoder",
",",
"decoder",
",",
"consumer_group",
"=",
"group",
")",
"returnValue",
"(",
"self",
".",
"_handle_responses",
"(",
"resps",
",",
"fail_on_error",
",",
"callback",
",",
"group",
")",
")"
] | Takes a group (string) and list of OffsetFetchRequest and returns
a list of OffsetFetchResponse objects | [
"Takes",
"a",
"group",
"(",
"string",
")",
"and",
"list",
"of",
"OffsetFetchRequest",
"and",
"returns",
"a",
"list",
"of",
"OffsetFetchResponse",
"objects"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L602-L615 | train | Sends an OffsetFetchRequest to the broker. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2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aa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(111) + chr(0b110001) + chr(52) + chr(49), 30854 - 30846), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101100 + 0o6) + chr(0b110110) + chr(0b11000 + 0o35), ord("\x08")), nzTpIcepk0o8(chr(1364 - 1316) + '\157' + chr(693 - 642) + chr(0b110000) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(1472 - 1423) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10 + 0o61) + chr(0b101100 + 0o12) + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(0b110001 + 0o1) + '\x33', 36940 - 36932), nzTpIcepk0o8(chr(1021 - 973) + chr(0b11000 + 0o127) + chr(0b1000 + 0o53) + '\x36' + '\066', 37320 - 37312), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(6483 - 6372) + chr(50) + '\x30' + chr(1905 - 1850), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(48) + chr(48), 0o10), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + '\x33' + chr(0b110000) + chr(0b11 + 0o61), 0b1000), nzTpIcepk0o8(chr(2266 - 2218) + chr(0b1101111) + chr(452 - 403) + chr(0b110111) + chr(0b10111 + 0o37), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(0b110101) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001 + 0o6) + '\060', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100001 + 0o20) + chr(0b110100) + chr(52), 0o10), nzTpIcepk0o8(chr(1988 - 1940) + chr(2925 - 2814) + chr(0b110010) + chr(1188 - 1133) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + chr(2208 - 2158) + chr(0b110111) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(68 - 20) + chr(0b1101111) + chr(0b100 + 0o57) + '\062' + chr(49), 47234 - 47226), nzTpIcepk0o8('\060' + chr(111) + chr(383 - 333) + '\x36', 0o10), nzTpIcepk0o8(chr(1544 - 1496) + chr(8631 - 8520) + chr(49) + chr(0b101111 + 0o2) + chr(0b101 + 0o56), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2194 - 2140) + '\062', 35691 - 35683), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b1101111) + '\061' + chr(0b110111) + chr(0b110011), 64435 - 64427), nzTpIcepk0o8('\060' + '\157' + chr(2072 - 2021) + chr(1639 - 1588) + '\x32', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100010 + 0o24) + '\x34', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(2522 - 2469) + '\x32', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110010 + 0o1) + '\x35' + chr(0b110000 + 0o1), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(0b11100 + 0o33) + '\064', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(1617 - 1562) + chr(50), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(53), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b11100 + 0o26) + chr(1345 - 1296) + chr(0b110010), 48121 - 48113), nzTpIcepk0o8(chr(0b110000) + chr(0b1011000 + 0o27) + '\063' + '\x35' + chr(0b11000 + 0o30), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(0b11100 + 0o30) + '\061', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(0b101000 + 0o11), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10001 + 0o40) + chr(0b10 + 0o64) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1001000 + 0o47) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(3167 - 3056) + chr(0b100101 + 0o14) + chr(0b110110) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(5571 - 5460) + '\063' + '\x31' + chr(0b1011 + 0o45), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\062' + '\x33' + chr(0b100011 + 0o17), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + chr(683 - 630) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(111) + chr(0b101110 + 0o7) + chr(0b1011 + 0o46), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(6278 - 6167) + chr(0b10111 + 0o33) + '\065' + '\066', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(111) + '\065' + '\x30', 2825 - 2817)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'O'), chr(100) + chr(101) + chr(99) + '\x6f' + chr(0b111011 + 0o51) + chr(0b111100 + 0o51))('\165' + chr(116) + chr(9781 - 9679) + chr(1100 - 1055) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def DxjSkK8g62rg(hXMPsSrOQzbh, F9lJ8RbIonqb, hu1hynoeGawF=None, KNOTLzs86rnO=nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100010 + 0o17), 63705 - 63697), jG5KU4UUGnk5=None):
iOLbMFzneHpo = v_5JLGL_2DSR(xbGTsX4crO7w.encode_offset_fetch_request, group=F9lJ8RbIonqb)
CPoSpgmLTbWt = xbGTsX4crO7w.decode_offset_fetch_response
zzI1IoTNDa4o = (yield hXMPsSrOQzbh._send_broker_aware_request(hu1hynoeGawF, iOLbMFzneHpo, CPoSpgmLTbWt, consumer_group=F9lJ8RbIonqb))
wVKqxW5Umubk(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'>\xdd\xa0g\x93\xbf\x93\xd82\xa1\r\x1bW\n\xc8\xdf\xa2'), chr(5537 - 5437) + chr(0b1011101 + 0o10) + chr(0b1001110 + 0o25) + chr(111) + '\144' + '\145')(chr(0b1110101) + chr(0b11010 + 0o132) + '\146' + '\055' + chr(0b101 + 0o63)))(zzI1IoTNDa4o, KNOTLzs86rnO, jG5KU4UUGnk5, F9lJ8RbIonqb)) |
ciena/afkak | afkak/client.py | KafkaClient.send_offset_commit_request | def send_offset_commit_request(self, group, payloads=None,
fail_on_error=True, callback=None,
group_generation_id=-1,
consumer_id=''):
"""Send a list of OffsetCommitRequests to the Kafka broker for the
given consumer group.
Args:
group (str): The consumer group to which to commit the offsets
payloads ([OffsetCommitRequest]): List of topic, partition, offsets
to commit.
fail_on_error (bool): Whether to raise an exception if a response
from the Kafka broker indicates an error
callback (callable): a function to call with each of the responses
before returning the returned value to the caller.
group_generation_id (int): Must currently always be -1
consumer_id (str): Must currently always be empty string
Returns:
[OffsetCommitResponse]: List of OffsetCommitResponse objects.
Will raise KafkaError for failed requests if fail_on_error is True
"""
group = _coerce_consumer_group(group)
encoder = partial(KafkaCodec.encode_offset_commit_request,
group=group, group_generation_id=group_generation_id,
consumer_id=consumer_id)
decoder = KafkaCodec.decode_offset_commit_response
resps = yield self._send_broker_aware_request(
payloads, encoder, decoder, consumer_group=group)
returnValue(self._handle_responses(
resps, fail_on_error, callback, group)) | python | def send_offset_commit_request(self, group, payloads=None,
fail_on_error=True, callback=None,
group_generation_id=-1,
consumer_id=''):
"""Send a list of OffsetCommitRequests to the Kafka broker for the
given consumer group.
Args:
group (str): The consumer group to which to commit the offsets
payloads ([OffsetCommitRequest]): List of topic, partition, offsets
to commit.
fail_on_error (bool): Whether to raise an exception if a response
from the Kafka broker indicates an error
callback (callable): a function to call with each of the responses
before returning the returned value to the caller.
group_generation_id (int): Must currently always be -1
consumer_id (str): Must currently always be empty string
Returns:
[OffsetCommitResponse]: List of OffsetCommitResponse objects.
Will raise KafkaError for failed requests if fail_on_error is True
"""
group = _coerce_consumer_group(group)
encoder = partial(KafkaCodec.encode_offset_commit_request,
group=group, group_generation_id=group_generation_id,
consumer_id=consumer_id)
decoder = KafkaCodec.decode_offset_commit_response
resps = yield self._send_broker_aware_request(
payloads, encoder, decoder, consumer_group=group)
returnValue(self._handle_responses(
resps, fail_on_error, callback, group)) | [
"def",
"send_offset_commit_request",
"(",
"self",
",",
"group",
",",
"payloads",
"=",
"None",
",",
"fail_on_error",
"=",
"True",
",",
"callback",
"=",
"None",
",",
"group_generation_id",
"=",
"-",
"1",
",",
"consumer_id",
"=",
"''",
")",
":",
"group",
"=",
"_coerce_consumer_group",
"(",
"group",
")",
"encoder",
"=",
"partial",
"(",
"KafkaCodec",
".",
"encode_offset_commit_request",
",",
"group",
"=",
"group",
",",
"group_generation_id",
"=",
"group_generation_id",
",",
"consumer_id",
"=",
"consumer_id",
")",
"decoder",
"=",
"KafkaCodec",
".",
"decode_offset_commit_response",
"resps",
"=",
"yield",
"self",
".",
"_send_broker_aware_request",
"(",
"payloads",
",",
"encoder",
",",
"decoder",
",",
"consumer_group",
"=",
"group",
")",
"returnValue",
"(",
"self",
".",
"_handle_responses",
"(",
"resps",
",",
"fail_on_error",
",",
"callback",
",",
"group",
")",
")"
] | Send a list of OffsetCommitRequests to the Kafka broker for the
given consumer group.
Args:
group (str): The consumer group to which to commit the offsets
payloads ([OffsetCommitRequest]): List of topic, partition, offsets
to commit.
fail_on_error (bool): Whether to raise an exception if a response
from the Kafka broker indicates an error
callback (callable): a function to call with each of the responses
before returning the returned value to the caller.
group_generation_id (int): Must currently always be -1
consumer_id (str): Must currently always be empty string
Returns:
[OffsetCommitResponse]: List of OffsetCommitResponse objects.
Will raise KafkaError for failed requests if fail_on_error is True | [
"Send",
"a",
"list",
"of",
"OffsetCommitRequests",
"to",
"the",
"Kafka",
"broker",
"for",
"the",
"given",
"consumer",
"group",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L618-L648 | train | Send a list of OffsetCommitRequest objects to the Kafka broker for the given consumer group. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,Rj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,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(814 - 766) + '\x6f' + chr(0b11100 + 0o26) + '\x34' + chr(0b100001 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b101 + 0o57), 0o10), nzTpIcepk0o8(chr(2268 - 2220) + '\x6f' + '\063' + chr(0b110101) + chr(2291 - 2237), 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\157' + '\x35' + chr(0b110101), 16941 - 16933), nzTpIcepk0o8('\060' + chr(8743 - 8632) + chr(1870 - 1819) + chr(50) + chr(0b101100 + 0o13), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + '\060' + chr(328 - 276), ord("\x08")), nzTpIcepk0o8(chr(1985 - 1937) + chr(0b11 + 0o154) + '\061' + chr(0b1100 + 0o45) + '\x35', 0o10), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1100010 + 0o15) + chr(0b110011) + chr(0b111 + 0o52) + '\062', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(11476 - 11365) + chr(49) + chr(1065 - 1011) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(0b110100) + '\061', 0o10), nzTpIcepk0o8('\060' + chr(0b10110 + 0o131) + chr(50) + chr(0b100000 + 0o23) + chr(0b110010), 13571 - 13563), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(1482 - 1428), 0o10), nzTpIcepk0o8(chr(286 - 238) + chr(0b10110 + 0o131) + chr(51) + '\060' + chr(0b100110 + 0o20), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(48) + '\064', 8), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101111) + chr(0b110010) + chr(0b100100 + 0o17) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + '\063' + chr(0b110100) + '\060', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(54) + chr(0b100101 + 0o13), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(1414 - 1303) + '\062' + chr(0b1010 + 0o53) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10110 + 0o33) + chr(0b100 + 0o60) + '\066', 45242 - 45234), nzTpIcepk0o8(chr(48) + '\157' + chr(1244 - 1195) + chr(0b110001) + chr(0b100 + 0o60), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10111 + 0o32) + '\x36' + '\x36', 5647 - 5639), nzTpIcepk0o8(chr(203 - 155) + chr(0b100011 + 0o114) + chr(0b110001) + chr(0b1010 + 0o54) + '\060', 629 - 621), nzTpIcepk0o8(chr(0b110000) + chr(5520 - 5409) + chr(956 - 903) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(111) + '\063' + '\060' + '\061', 0o10), nzTpIcepk0o8(chr(422 - 374) + chr(0b1101111) + '\x31' + chr(49) + chr(1570 - 1522), 19549 - 19541), nzTpIcepk0o8(chr(0b110000) + chr(0b101 + 0o152) + '\x33' + '\x36', 8), nzTpIcepk0o8(chr(1881 - 1833) + '\157' + '\x35' + '\066', 14406 - 14398), nzTpIcepk0o8('\060' + '\157' + chr(1742 - 1691) + '\065', ord("\x08")), nzTpIcepk0o8(chr(2187 - 2139) + '\157' + '\x31' + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\062' + '\064' + chr(0b10001 + 0o44), 0b1000), nzTpIcepk0o8('\060' + chr(2784 - 2673) + chr(0b101011 + 0o6) + '\x31' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(1224 - 1176) + '\x6f' + '\x33' + '\x31' + '\061', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(0b110110) + chr(0b111 + 0o54), 8), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b1000110 + 0o51) + '\063' + '\x30' + '\061', 8), nzTpIcepk0o8(chr(1245 - 1197) + chr(0b1000110 + 0o51) + '\x32' + chr(0b100101 + 0o21) + chr(846 - 798), 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(111) + chr(612 - 561) + chr(48) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(49) + '\063', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(0b110011) + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + '\x37' + chr(0b1111 + 0o46), 37968 - 37960), nzTpIcepk0o8(chr(48) + chr(11235 - 11124) + '\x32' + chr(0b10100 + 0o43) + '\062', 46294 - 46286)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + '\x35' + chr(2165 - 2117), 24254 - 24246)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8c'), '\144' + chr(0b1100101) + chr(0b1010 + 0o131) + chr(111) + '\144' + '\x65')('\165' + '\x74' + chr(102) + '\055' + chr(0b11110 + 0o32)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def Z70AL7nkMeWl(hXMPsSrOQzbh, F9lJ8RbIonqb, hu1hynoeGawF=None, KNOTLzs86rnO=nzTpIcepk0o8('\x30' + '\x6f' + chr(49), 4809 - 4801), jG5KU4UUGnk5=None, SBN3RyFeWR5R=-nzTpIcepk0o8(chr(48) + chr(0b100010 + 0o115) + chr(49), 8), Ke55xrtZl4d_=roI3spqORKae(ES5oEprVxulp(b''), '\x64' + chr(5775 - 5674) + '\x63' + chr(0b1101111) + chr(100) + chr(101))(chr(12681 - 12564) + chr(0b1110100) + chr(0b110111 + 0o57) + '\x2d' + chr(0b101101 + 0o13))):
F9lJ8RbIonqb = LEwRoK6l6REM(F9lJ8RbIonqb)
iOLbMFzneHpo = v_5JLGL_2DSR(xbGTsX4crO7w.encode_offset_commit_request, group=F9lJ8RbIonqb, group_generation_id=SBN3RyFeWR5R, consumer_id=Ke55xrtZl4d_)
CPoSpgmLTbWt = xbGTsX4crO7w.decode_offset_commit_response
zzI1IoTNDa4o = (yield hXMPsSrOQzbh._send_broker_aware_request(hu1hynoeGawF, iOLbMFzneHpo, CPoSpgmLTbWt, consumer_group=F9lJ8RbIonqb))
wVKqxW5Umubk(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xfd|\x8fC\xb3\xa8(\x95\x01\x84\xe9n\xa9\xaa\xea\x85\x83'), '\144' + chr(101) + chr(0b1011100 + 0o7) + chr(10528 - 10417) + chr(100) + '\145')(chr(0b1110101) + chr(0b110000 + 0o104) + chr(9696 - 9594) + '\x2d' + '\x38'))(zzI1IoTNDa4o, KNOTLzs86rnO, jG5KU4UUGnk5, F9lJ8RbIonqb)) |
ciena/afkak | afkak/client.py | KafkaClient._get_brokerclient | def _get_brokerclient(self, node_id):
"""
Get a broker client.
:param int node_id: Broker node ID
:raises KeyError: for an unknown node ID
:returns: :class:`_KafkaBrokerClient`
"""
if self._closing:
raise ClientError("Cannot get broker client for node_id={}: {} has been closed".format(node_id, self))
if node_id not in self.clients:
broker_metadata = self._brokers[node_id]
log.debug("%r: creating client for %s", self, broker_metadata)
self.clients[node_id] = _KafkaBrokerClient(
self.reactor, self._endpoint_factory,
broker_metadata, self.clientId, self._retry_policy,
)
return self.clients[node_id] | python | def _get_brokerclient(self, node_id):
"""
Get a broker client.
:param int node_id: Broker node ID
:raises KeyError: for an unknown node ID
:returns: :class:`_KafkaBrokerClient`
"""
if self._closing:
raise ClientError("Cannot get broker client for node_id={}: {} has been closed".format(node_id, self))
if node_id not in self.clients:
broker_metadata = self._brokers[node_id]
log.debug("%r: creating client for %s", self, broker_metadata)
self.clients[node_id] = _KafkaBrokerClient(
self.reactor, self._endpoint_factory,
broker_metadata, self.clientId, self._retry_policy,
)
return self.clients[node_id] | [
"def",
"_get_brokerclient",
"(",
"self",
",",
"node_id",
")",
":",
"if",
"self",
".",
"_closing",
":",
"raise",
"ClientError",
"(",
"\"Cannot get broker client for node_id={}: {} has been closed\"",
".",
"format",
"(",
"node_id",
",",
"self",
")",
")",
"if",
"node_id",
"not",
"in",
"self",
".",
"clients",
":",
"broker_metadata",
"=",
"self",
".",
"_brokers",
"[",
"node_id",
"]",
"log",
".",
"debug",
"(",
"\"%r: creating client for %s\"",
",",
"self",
",",
"broker_metadata",
")",
"self",
".",
"clients",
"[",
"node_id",
"]",
"=",
"_KafkaBrokerClient",
"(",
"self",
".",
"reactor",
",",
"self",
".",
"_endpoint_factory",
",",
"broker_metadata",
",",
"self",
".",
"clientId",
",",
"self",
".",
"_retry_policy",
",",
")",
"return",
"self",
".",
"clients",
"[",
"node_id",
"]"
] | Get a broker client.
:param int node_id: Broker node ID
:raises KeyError: for an unknown node ID
:returns: :class:`_KafkaBrokerClient` | [
"Get",
"a",
"broker",
"client",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L678-L695 | train | Get a broker client. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,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6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\157' + chr(50) + chr(0b110010), 31828 - 31820), nzTpIcepk0o8(chr(901 - 853) + chr(7875 - 7764) + chr(0b110110) + chr(1736 - 1686), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(190 - 141) + chr(49) + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + chr(9943 - 9832) + chr(51) + '\x32' + '\060', 21045 - 21037), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(212 - 162) + chr(0b100 + 0o54) + chr(49), 0o10), nzTpIcepk0o8(chr(48) + chr(4357 - 4246) + chr(0b110001) + chr(53), 0o10), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(111) + chr(0b110010) + chr(52) + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100010 + 0o17) + '\x36' + '\x30', 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(111) + chr(0b110001) + '\063' + chr(0b101001 + 0o14), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + '\066' + '\063', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(0b110100) + chr(0b100001 + 0o25), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(8132 - 8021) + '\x34' + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b101 + 0o152) + chr(2093 - 2044) + chr(55) + chr(0b110010), 28287 - 28279), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1001110 + 0o41) + '\063' + chr(1794 - 1744) + '\x32', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(0b1111 + 0o42) + '\x30', 8), nzTpIcepk0o8(chr(589 - 541) + chr(2964 - 2853) + '\x32' + '\x35' + chr(0b110010), 53535 - 53527), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + '\x32' + chr(219 - 168), ord("\x08")), nzTpIcepk0o8(chr(2111 - 2063) + chr(0b1101100 + 0o3) + chr(51) + '\063' + chr(51), 40347 - 40339), nzTpIcepk0o8(chr(48) + chr(111) + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010001 + 0o36) + chr(50) + chr(1889 - 1835) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110 + 0o151) + '\061' + chr(0b110101) + chr(963 - 912), 56354 - 56346), nzTpIcepk0o8(chr(48) + chr(0b1101011 + 0o4) + '\061' + chr(51), 0o10), nzTpIcepk0o8(chr(1822 - 1774) + chr(0b1001110 + 0o41) + chr(0b111 + 0o54) + chr(0b110011) + '\x33', 8), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(111) + chr(0b110010) + chr(0b110011) + chr(1727 - 1672), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + '\063' + '\x34', 32590 - 32582), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(3434 - 3323) + chr(49) + chr(54) + chr(51), 0o10), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1011 + 0o144) + chr(49) + chr(0b100001 + 0o26), 11107 - 11099), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1334 - 1279) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(2488 - 2436) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + '\062' + chr(0b1 + 0o64), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + chr(0b101 + 0o57) + chr(311 - 263), ord("\x08")), nzTpIcepk0o8(chr(2240 - 2192) + '\x6f' + '\x33' + chr(0b110011) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\157' + '\063' + chr(1763 - 1708) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\157' + chr(50) + '\x32', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + '\061' + chr(579 - 530), 41208 - 41200), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(476 - 424) + chr(0b110100), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100011 + 0o17) + chr(1015 - 964) + chr(0b111 + 0o51), 48223 - 48215), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b101111 + 0o3) + '\x37', 52957 - 52949), nzTpIcepk0o8('\060' + chr(111) + chr(1462 - 1412) + chr(0b110010 + 0o2) + chr(0b11011 + 0o25), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b101 + 0o53) + chr(6664 - 6553) + chr(53) + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'<'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(0b1100100) + '\x65')('\165' + '\164' + '\x66' + chr(0b101101) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def AAScLfQCLsFf(hXMPsSrOQzbh, l4ejMdXa7Niq):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'w\x7f\x7f\xe5\xe3c\x929\x10\x8a\xf7V'), '\x64' + chr(0b1100100 + 0o1) + '\x63' + chr(1253 - 1142) + chr(4936 - 4836) + chr(0b1100101))(chr(117) + '\x74' + '\146' + chr(0b10010 + 0o33) + '\x38')):
raise a4tUHdendmLw(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b"QS&\xbe\xeey\x84\x178\xc7\x86`Q\x15\xb9-\xd8\xf3\xb8o\xdc\x0ee\xaf\xbf\xfa\x1c}\x18\x89\xfa\xc4\xb8\xa0{-\xd9\xe3*\x9a2I5\xf0\xe9l\xd7P?\xd6\xc3l\x03\x19\xbe'\xd9\xb6\xbf"), chr(100) + chr(323 - 222) + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(0b1000010 + 0o43))(chr(117) + chr(116) + '\146' + chr(0b10000 + 0o35) + chr(2652 - 2596)), roI3spqORKae(ES5oEprVxulp(b'c\x01{\x9b\xc6>\xc2\x1f\x0c\xec\xe5H'), chr(0b1100100) + chr(0b1001010 + 0o33) + chr(1367 - 1268) + '\157' + chr(0b1100100) + chr(691 - 590))('\x75' + '\164' + chr(102) + chr(0b10 + 0o53) + chr(0b111000)))(l4ejMdXa7Niq, hXMPsSrOQzbh))
if l4ejMdXa7Niq not in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"b}q\xa3\xb6g\xc5'\x18\xf5\x9e{"), '\x64' + chr(101) + chr(0b1100011) + '\157' + chr(100) + chr(101))('\x75' + '\x74' + '\146' + chr(0b11110 + 0o17) + chr(0b111000))):
qMmh6NWEI3EO = hXMPsSrOQzbh.bqFzwbJtwpTY[l4ejMdXa7Niq]
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'usq\x8a\xb8i\xcbF\x08\xde\xe3X'), chr(1575 - 1475) + chr(101) + chr(0b1101 + 0o126) + chr(3559 - 3448) + '\144' + '\x65')(chr(0b1011001 + 0o34) + '\164' + '\x66' + '\055' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'7@r\xf0\xe2\x7f\xc1\x11)\xda\xc8e\x03\x19\xbe!\xcf\xbd\xaf#\xd3\x04y\xfb\xba\xef'), chr(0b1100100) + chr(0b1000001 + 0o44) + chr(0b1100011) + chr(0b1101101 + 0o2) + chr(0b1000001 + 0o43) + chr(0b1100101))(chr(0b111111 + 0o66) + chr(5674 - 5558) + chr(0b1001001 + 0o35) + '\x2d' + '\x38'), hXMPsSrOQzbh, qMmh6NWEI3EO)
hXMPsSrOQzbh.pO9s7jaWEF8y[l4ejMdXa7Niq] = kuMPikQYamyC(hXMPsSrOQzbh.reactor, hXMPsSrOQzbh._endpoint_factory, qMmh6NWEI3EO, hXMPsSrOQzbh.clientId, hXMPsSrOQzbh._retry_policy)
return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"b}q\xa3\xb6g\xc5'\x18\xf5\x9e{"), chr(100) + chr(0b100100 + 0o101) + chr(0b1001100 + 0o27) + chr(0b1101111) + '\144' + chr(0b101110 + 0o67))('\x75' + chr(116) + '\146' + chr(0b1 + 0o54) + chr(56)))[l4ejMdXa7Niq] |
ciena/afkak | afkak/client.py | KafkaClient._close_brokerclients | def _close_brokerclients(self, clients):
"""
Close the given broker clients.
:param clients: Iterable of `_KafkaBrokerClient`
"""
def _log_close_failure(failure, brokerclient):
log.debug(
'BrokerClient: %s close result: %s: %s', brokerclient,
failure.type.__name__, failure.getErrorMessage())
def _clean_close_dlist(result, close_dlist):
# If there aren't any other outstanding closings going on, then
# close_dlist == self.close_dlist, and we can reset it.
if close_dlist == self.close_dlist:
self.close_dlist = None
if not self.close_dlist:
dList = []
else:
log.debug("%r: _close_brokerclients has nested deferredlist: %r",
self, self.close_dlist)
dList = [self.close_dlist]
for brokerClient in clients:
log.debug("Calling close on: %r", brokerClient)
d = brokerClient.close().addErrback(_log_close_failure, brokerClient)
dList.append(d)
self.close_dlist = DeferredList(dList)
self.close_dlist.addBoth(_clean_close_dlist, self.close_dlist) | python | def _close_brokerclients(self, clients):
"""
Close the given broker clients.
:param clients: Iterable of `_KafkaBrokerClient`
"""
def _log_close_failure(failure, brokerclient):
log.debug(
'BrokerClient: %s close result: %s: %s', brokerclient,
failure.type.__name__, failure.getErrorMessage())
def _clean_close_dlist(result, close_dlist):
# If there aren't any other outstanding closings going on, then
# close_dlist == self.close_dlist, and we can reset it.
if close_dlist == self.close_dlist:
self.close_dlist = None
if not self.close_dlist:
dList = []
else:
log.debug("%r: _close_brokerclients has nested deferredlist: %r",
self, self.close_dlist)
dList = [self.close_dlist]
for brokerClient in clients:
log.debug("Calling close on: %r", brokerClient)
d = brokerClient.close().addErrback(_log_close_failure, brokerClient)
dList.append(d)
self.close_dlist = DeferredList(dList)
self.close_dlist.addBoth(_clean_close_dlist, self.close_dlist) | [
"def",
"_close_brokerclients",
"(",
"self",
",",
"clients",
")",
":",
"def",
"_log_close_failure",
"(",
"failure",
",",
"brokerclient",
")",
":",
"log",
".",
"debug",
"(",
"'BrokerClient: %s close result: %s: %s'",
",",
"brokerclient",
",",
"failure",
".",
"type",
".",
"__name__",
",",
"failure",
".",
"getErrorMessage",
"(",
")",
")",
"def",
"_clean_close_dlist",
"(",
"result",
",",
"close_dlist",
")",
":",
"# If there aren't any other outstanding closings going on, then",
"# close_dlist == self.close_dlist, and we can reset it.",
"if",
"close_dlist",
"==",
"self",
".",
"close_dlist",
":",
"self",
".",
"close_dlist",
"=",
"None",
"if",
"not",
"self",
".",
"close_dlist",
":",
"dList",
"=",
"[",
"]",
"else",
":",
"log",
".",
"debug",
"(",
"\"%r: _close_brokerclients has nested deferredlist: %r\"",
",",
"self",
",",
"self",
".",
"close_dlist",
")",
"dList",
"=",
"[",
"self",
".",
"close_dlist",
"]",
"for",
"brokerClient",
"in",
"clients",
":",
"log",
".",
"debug",
"(",
"\"Calling close on: %r\"",
",",
"brokerClient",
")",
"d",
"=",
"brokerClient",
".",
"close",
"(",
")",
".",
"addErrback",
"(",
"_log_close_failure",
",",
"brokerClient",
")",
"dList",
".",
"append",
"(",
"d",
")",
"self",
".",
"close_dlist",
"=",
"DeferredList",
"(",
"dList",
")",
"self",
".",
"close_dlist",
".",
"addBoth",
"(",
"_clean_close_dlist",
",",
"self",
".",
"close_dlist",
")"
] | Close the given broker clients.
:param clients: Iterable of `_KafkaBrokerClient` | [
"Close",
"the",
"given",
"broker",
"clients",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L697-L725 | train | Close the given broker clients. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu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rbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b101 + 0o152) + chr(0b11010 + 0o30) + chr(0b100001 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1000000 + 0o57) + chr(55) + chr(0b110101), 13486 - 13478), nzTpIcepk0o8('\x30' + '\x6f' + chr(652 - 598) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(1925 - 1877) + '\x6f' + '\062' + '\x32' + chr(53), 64336 - 64328), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\x31' + chr(0b11110 + 0o27), 0b1000), nzTpIcepk0o8(chr(419 - 371) + chr(111) + chr(2194 - 2145) + chr(0b10010 + 0o44), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(111) + chr(0b1100 + 0o51) + '\x33', 6493 - 6485), nzTpIcepk0o8(chr(0b110000) + chr(0b1101 + 0o142) + '\x35', 8), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(111) + chr(50) + '\060' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(560 - 512) + '\157' + '\x32' + '\x33', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(2181 - 2133) + '\x33', 8809 - 8801), nzTpIcepk0o8(chr(895 - 847) + chr(0b1101111) + chr(598 - 547) + '\x31' + chr(572 - 522), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b1110 + 0o43) + '\064' + chr(0b1010 + 0o47), 0o10), nzTpIcepk0o8(chr(48) + chr(0b101000 + 0o107) + chr(51) + chr(0b1011 + 0o51) + chr(0b1001 + 0o47), 0b1000), nzTpIcepk0o8(chr(48) + chr(8436 - 8325) + chr(0b110111) + chr(0b110001), 37191 - 37183), nzTpIcepk0o8(chr(602 - 554) + chr(5697 - 5586) + chr(0b110 + 0o56) + chr(2821 - 2767), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b11 + 0o57) + chr(0b101100 + 0o4) + chr(0b1000 + 0o56), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101001 + 0o6) + chr(0b1110 + 0o44) + '\065' + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(0b11100 + 0o123) + chr(897 - 842), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(1280 - 1231) + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1110 + 0o50) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(111) + chr(0b110111) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(3985 - 3874) + '\x33' + chr(0b10001 + 0o42), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110101) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + chr(0b1000 + 0o51) + '\x35' + '\064', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(2251 - 2203) + chr(1044 - 990), 8), nzTpIcepk0o8(chr(1663 - 1615) + '\x6f' + chr(49) + chr(1883 - 1832) + chr(0b101010 + 0o14), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(1140 - 1029) + chr(0b10011 + 0o40), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(0b110000) + chr(0b1101 + 0o43), 15032 - 15024), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + chr(2019 - 1968) + '\x32' + chr(0b1010 + 0o54), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1000111 + 0o50) + chr(50) + '\063' + chr(0b11110 + 0o31), 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(9745 - 9634) + chr(50) + chr(49) + '\062', 63537 - 63529), nzTpIcepk0o8('\x30' + '\157' + chr(49) + chr(0b110000) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(1898 - 1850) + '\x6f' + '\061' + '\x35' + chr(52), 8), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1 + 0o156) + chr(0b100 + 0o56) + chr(0b100 + 0o61) + '\065', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(84 - 34) + '\x33' + chr(0b10001 + 0o42), 0b1000), nzTpIcepk0o8('\060' + chr(0b1010 + 0o145) + chr(53) + '\061', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2204 - 2153) + '\063' + '\062', 56653 - 56645), nzTpIcepk0o8(chr(2010 - 1962) + chr(0b1001101 + 0o42) + '\x33' + '\060' + chr(0b100111 + 0o16), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(2125 - 2077) + chr(0b11110 + 0o121) + chr(53) + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'<'), chr(100) + chr(101) + chr(4057 - 3958) + chr(10881 - 10770) + '\144' + chr(1482 - 1381))(chr(0b1110101) + chr(7159 - 7043) + '\x66' + '\x2d' + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def kHXlCb0kjIs2(hXMPsSrOQzbh, pO9s7jaWEF8y):
def GZ8Wxp1YxRpA(DUbr_vQkcSNT, LNOGeGkLjkM2):
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'u|\x0c\xcf\xf4jj\x1dP\xebV\x99'), '\x64' + '\145' + chr(0b10 + 0o141) + '\157' + '\144' + chr(601 - 500))('\x75' + '\164' + chr(0b1100101 + 0o1) + '\x2d' + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'POZ\xfe\xa8|FGl\xe3}\xb7\xf0A\xc5J\x06\xe5\xc1hzT\x1biL\x1f\xf32wz\xf6\xba\xf9~L\x88\xe8'), chr(2579 - 2479) + '\145' + '\143' + '\x6f' + '\144' + chr(0b11010 + 0o113))(chr(117) + '\x74' + '\x66' + '\x2d' + chr(1805 - 1749)), LNOGeGkLjkM2, roI3spqORKae(DUbr_vQkcSNT.type, roI3spqORKae(ES5oEprVxulp(b'SdA\xd1\x9fbtNU\xb6g\xb2'), '\144' + chr(101) + chr(99) + chr(0b110100 + 0o73) + chr(0b1100100) + '\x65')(chr(4938 - 4821) + chr(0b1110100) + '\x66' + chr(45) + chr(1796 - 1740))), roI3spqORKae(DUbr_vQkcSNT, roI3spqORKae(ES5oEprVxulp(b'uXA\xd0\xbf|jYH\xe3`\xb0\xab\x06\x85'), chr(0b1100100) + chr(0b1011011 + 0o12) + chr(0b1011 + 0o130) + '\x6f' + chr(100) + '\x65')(chr(0b1110000 + 0o5) + '\164' + chr(4156 - 4054) + chr(735 - 690) + chr(1063 - 1007)))())
def usvhfstKMp8T(POx95m7SPOVy, taqpDKgDWo1n):
if taqpDKgDWo1n == roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'qQZ\xe6\xa8QaGl\xf5g'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(3878 - 3778) + chr(101))('\x75' + '\x74' + chr(102) + chr(1870 - 1825) + chr(1199 - 1143))):
hXMPsSrOQzbh.taqpDKgDWo1n = None
if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'f\\D\xe5\x89EboR\xe9"\xad'), chr(100) + chr(0b10101 + 0o120) + '\143' + chr(0b1101111) + '\144' + chr(0b1100101))('\165' + '\164' + '\146' + '\055' + chr(1988 - 1932))):
yuVjTeWWzf0a = []
else:
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'u|\x0c\xcf\xf4jj\x1dP\xebV\x99'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(6725 - 6625) + chr(7030 - 6929))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(1889 - 1833)))(roI3spqORKae(ES5oEprVxulp(b'7O\x0f\xb5\x92miDv\xe3L\xa1\xb8\x0e\x8b\\T\xe5\xc1nl_Oh\t\x04\xe7-#.\xb3\xec\xfe!\x08\x8d\xffL\xbc\xa0`OP\xf1\xa1gv_?\xa66\xb1'), chr(2052 - 1952) + '\x65' + '\x63' + chr(0b1101111) + chr(4686 - 4586) + chr(0b101001 + 0o74))('\x75' + '\x74' + '\x66' + '\055' + '\070'), hXMPsSrOQzbh, roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'f\\D\xe5\x89EboR\xe9"\xad'), chr(100) + '\145' + '\x63' + chr(6707 - 6596) + chr(0b1101 + 0o127) + '\145')(chr(2638 - 2521) + '\164' + chr(2569 - 2467) + chr(45) + chr(0b10010 + 0o46))))
yuVjTeWWzf0a = [hXMPsSrOQzbh.taqpDKgDWo1n]
for D_qdRRgmMIkO in pO9s7jaWEF8y:
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'u|\x0c\xcf\xf4jj\x1dP\xebV\x99'), chr(100) + '\145' + chr(99) + chr(0b10111 + 0o130) + chr(0b1000100 + 0o40) + '\145')(chr(0b1110101) + chr(0b1001101 + 0o47) + chr(0b100010 + 0o104) + chr(0b101101) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'Q\\Y\xf9\xa4`b\x0bf\xea|\xb0\xafA\x8fW\x1c\xa6\x88u'), chr(9432 - 9332) + chr(0b101110 + 0o67) + chr(99) + chr(0b1101111 + 0o0) + chr(0b1010011 + 0o21) + '\x65')(chr(0b1011 + 0o152) + '\164' + chr(0b1000100 + 0o42) + '\055' + chr(56)), D_qdRRgmMIkO)
vPPlOXQgR3SM = D_qdRRgmMIkO.close().addErrback(GZ8Wxp1YxRpA, D_qdRRgmMIkO)
roI3spqORKae(yuVjTeWWzf0a, roI3spqORKae(ES5oEprVxulp(b'Zif\xa1\xb5iBDo\xe9F\xf6'), chr(7305 - 7205) + chr(3559 - 3458) + chr(9383 - 9284) + '\x6f' + chr(0b1100100) + '\145')('\x75' + chr(10174 - 10058) + '\x66' + '\055' + chr(2887 - 2831)))(vPPlOXQgR3SM)
hXMPsSrOQzbh.taqpDKgDWo1n = haqhkdLPHTak(yuVjTeWWzf0a)
roI3spqORKae(hXMPsSrOQzbh.close_dlist, roI3spqORKae(ES5oEprVxulp(b'sYQ\xd7\xa2zm'), chr(0b11000 + 0o114) + '\x65' + '\143' + '\x6f' + '\144' + chr(0b1100101))('\x75' + '\x74' + chr(102) + '\055' + chr(56)))(usvhfstKMp8T, roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'f\\D\xe5\x89EboR\xe9"\xad'), '\x64' + chr(718 - 617) + chr(0b1001001 + 0o32) + chr(0b1101111) + '\144' + chr(383 - 282))('\x75' + chr(116) + '\146' + chr(45) + chr(56)))) |
ciena/afkak | afkak/client.py | KafkaClient._update_brokers | def _update_brokers(self, brokers, remove=False):
"""
Update `self._brokers` and `self.clients`
Update our self.clients based on brokers in received metadata
Take the received dict of brokers and reconcile it with our current
list of brokers (self.clients). If there is a new one, bring up a new
connection to it, and if remove is True, and any in our current list
aren't in the metadata returned, disconnect from it.
:param brokers: Iterable of `BrokerMetadata`. A client will be created
for every broker given if it doesn't yet exist.
:param bool remove:
Is this metadata for *all* brokers? If so, clients for brokers
which are no longer found in the metadata will be closed.
"""
log.debug("%r: _update_brokers(%r, remove=%r)",
self, brokers, remove)
brokers_by_id = {bm.node_id: bm for bm in brokers}
self._brokers.update(brokers_by_id)
# Update the metadata of broker clients that already exist.
for node_id, broker_meta in brokers_by_id.items():
if node_id not in self.clients:
continue
self.clients[node_id].updateMetadata(broker_meta)
# Remove any clients for brokers which no longer exist.
if remove:
to_close = [
self.clients.pop(node_id)
for node_id in set(self.clients) - set(brokers_by_id)
]
if to_close:
self._close_brokerclients(to_close) | python | def _update_brokers(self, brokers, remove=False):
"""
Update `self._brokers` and `self.clients`
Update our self.clients based on brokers in received metadata
Take the received dict of brokers and reconcile it with our current
list of brokers (self.clients). If there is a new one, bring up a new
connection to it, and if remove is True, and any in our current list
aren't in the metadata returned, disconnect from it.
:param brokers: Iterable of `BrokerMetadata`. A client will be created
for every broker given if it doesn't yet exist.
:param bool remove:
Is this metadata for *all* brokers? If so, clients for brokers
which are no longer found in the metadata will be closed.
"""
log.debug("%r: _update_brokers(%r, remove=%r)",
self, brokers, remove)
brokers_by_id = {bm.node_id: bm for bm in brokers}
self._brokers.update(brokers_by_id)
# Update the metadata of broker clients that already exist.
for node_id, broker_meta in brokers_by_id.items():
if node_id not in self.clients:
continue
self.clients[node_id].updateMetadata(broker_meta)
# Remove any clients for brokers which no longer exist.
if remove:
to_close = [
self.clients.pop(node_id)
for node_id in set(self.clients) - set(brokers_by_id)
]
if to_close:
self._close_brokerclients(to_close) | [
"def",
"_update_brokers",
"(",
"self",
",",
"brokers",
",",
"remove",
"=",
"False",
")",
":",
"log",
".",
"debug",
"(",
"\"%r: _update_brokers(%r, remove=%r)\"",
",",
"self",
",",
"brokers",
",",
"remove",
")",
"brokers_by_id",
"=",
"{",
"bm",
".",
"node_id",
":",
"bm",
"for",
"bm",
"in",
"brokers",
"}",
"self",
".",
"_brokers",
".",
"update",
"(",
"brokers_by_id",
")",
"# Update the metadata of broker clients that already exist.",
"for",
"node_id",
",",
"broker_meta",
"in",
"brokers_by_id",
".",
"items",
"(",
")",
":",
"if",
"node_id",
"not",
"in",
"self",
".",
"clients",
":",
"continue",
"self",
".",
"clients",
"[",
"node_id",
"]",
".",
"updateMetadata",
"(",
"broker_meta",
")",
"# Remove any clients for brokers which no longer exist.",
"if",
"remove",
":",
"to_close",
"=",
"[",
"self",
".",
"clients",
".",
"pop",
"(",
"node_id",
")",
"for",
"node_id",
"in",
"set",
"(",
"self",
".",
"clients",
")",
"-",
"set",
"(",
"brokers_by_id",
")",
"]",
"if",
"to_close",
":",
"self",
".",
"_close_brokerclients",
"(",
"to_close",
")"
] | Update `self._brokers` and `self.clients`
Update our self.clients based on brokers in received metadata
Take the received dict of brokers and reconcile it with our current
list of brokers (self.clients). If there is a new one, bring up a new
connection to it, and if remove is True, and any in our current list
aren't in the metadata returned, disconnect from it.
:param brokers: Iterable of `BrokerMetadata`. A client will be created
for every broker given if it doesn't yet exist.
:param bool remove:
Is this metadata for *all* brokers? If so, clients for brokers
which are no longer found in the metadata will be closed. | [
"Update",
"self",
".",
"_brokers",
"and",
"self",
".",
"clients"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L727-L762 | train | Update our self. brokers and self. clients based on brokers in received metadata. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5D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VxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(0b101110 + 0o7) + '\064', 0b1000), nzTpIcepk0o8(chr(48) + chr(11276 - 11165) + '\062' + '\064' + chr(66 - 12), 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(49) + chr(0b110011 + 0o0) + chr(1084 - 1033), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(5906 - 5795) + chr(51) + '\062' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10000 + 0o42) + '\066' + chr(692 - 637), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(543 - 493) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\157' + chr(0b110100) + chr(0b10101 + 0o40), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(51) + '\060', 0o10), nzTpIcepk0o8('\060' + chr(10417 - 10306) + chr(50) + '\065' + '\065', 0o10), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b111 + 0o150) + chr(1772 - 1723) + '\x36' + chr(0b10111 + 0o32), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b100011 + 0o15) + chr(52), 3906 - 3898), nzTpIcepk0o8('\x30' + chr(0b1000101 + 0o52) + chr(2062 - 2012) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(1081 - 1033) + chr(0b100110 + 0o111) + '\061' + chr(48) + chr(1807 - 1757), 53355 - 53347), nzTpIcepk0o8('\x30' + chr(10851 - 10740) + '\063' + chr(48) + chr(1754 - 1704), 0o10), nzTpIcepk0o8(chr(804 - 756) + chr(111) + '\066', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(0b100001 + 0o23) + chr(0b0 + 0o63), 43025 - 43017), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1227 - 1178) + '\066' + '\x33', 0b1000), nzTpIcepk0o8(chr(637 - 589) + '\x6f' + chr(2366 - 2317) + chr(0b110001) + chr(0b110001 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(1912 - 1864) + '\x6f' + '\x36' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(2535 - 2424) + chr(0b110010) + chr(1469 - 1416) + chr(0b11100 + 0o33), 0b1000), nzTpIcepk0o8(chr(48) + chr(12095 - 11984) + '\x32', 0b1000), nzTpIcepk0o8('\060' + chr(713 - 602) + chr(0b110011) + chr(1727 - 1676) + '\x34', 51216 - 51208), nzTpIcepk0o8(chr(1073 - 1025) + chr(2610 - 2499) + chr(0b1100 + 0o45) + '\065' + chr(0b100011 + 0o20), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(54) + chr(0b11001 + 0o35), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(658 - 610) + chr(9658 - 9547) + chr(49) + '\063' + chr(0b110000), 19771 - 19763), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(111) + chr(2367 - 2315) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110101) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1010111 + 0o30) + chr(0b110011) + '\066' + chr(0b101000 + 0o12), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(1262 - 1207), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(1624 - 1571), 0b1000), nzTpIcepk0o8('\x30' + chr(812 - 701) + '\061' + '\x30', 19775 - 19767), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + '\066' + '\x33', 30160 - 30152), nzTpIcepk0o8(chr(48) + chr(0b1101101 + 0o2) + chr(51) + '\x35' + '\063', 0o10), nzTpIcepk0o8(chr(483 - 435) + chr(0b1101111) + chr(51) + '\065' + '\x33', 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(0b110000) + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b10010 + 0o37) + chr(0b110101) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1100100 + 0o13) + '\063' + chr(48) + chr(1120 - 1071), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(384 - 332), 0o10), nzTpIcepk0o8('\060' + '\157' + '\x33' + '\064' + chr(0b10000 + 0o45), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110101) + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x82'), chr(0b1010101 + 0o17) + chr(101) + chr(99) + chr(0b1101111) + '\144' + chr(101))('\x75' + '\164' + chr(0b1100110) + chr(45) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def QjCr648ZOJ58(hXMPsSrOQzbh, gF1QUDIrFeFu, pMlUhd2JmKAE=nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110000), 0o10)):
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\xcb\xe7b\x8c\x8e1J\xee\xf8\x1c\x81H'), '\x64' + '\x65' + '\143' + chr(111) + chr(9502 - 9402) + chr(0b1100000 + 0o5))('\x75' + chr(3351 - 3235) + '\x66' + chr(45) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b"\x89\xd4a\xf6\xe8 U\xbc\xcc\x05\xa1M \xb0i\xc8\x16>F\x87'\xaeG\x96{=K@\x84z(-A\xc2"), '\x64' + '\x65' + chr(0b1100011) + chr(0b1100110 + 0o11) + chr(0b1 + 0o143) + '\x65')(chr(13181 - 13064) + '\x74' + chr(0b1000101 + 0o41) + chr(0b10000 + 0o35) + chr(0b111 + 0o61)), hXMPsSrOQzbh, gF1QUDIrFeFu, pMlUhd2JmKAE)
ajf4iMj5UQcB = {ASceZlugNeMa.l4ejMdXa7Niq: ASceZlugNeMa for ASceZlugNeMa in gF1QUDIrFeFu}
roI3spqORKae(hXMPsSrOQzbh._brokers, roI3spqORKae(ES5oEprVxulp(b'\xe6\xf90\xe4\xfe\x0cg\xe9\xce\x14\xb5|'), chr(0b1100001 + 0o3) + chr(0b1100101) + chr(99) + chr(0b101000 + 0o107) + chr(7248 - 7148) + chr(0b1100100 + 0o1))(chr(0b1110101) + chr(116) + chr(102) + chr(0b101010 + 0o3) + chr(56)))(ajf4iMj5UQcB)
for (l4ejMdXa7Niq, DYRxi33ZH9pD) in roI3spqORKae(ajf4iMj5UQcB, roI3spqORKae(ES5oEprVxulp(b'\xf5\xf95\x98\xf2/m\xec\x9e\x07\x9c{'), '\144' + '\x65' + chr(0b1100011) + chr(111) + '\x64' + chr(1904 - 1803))(chr(0b1110101) + chr(2906 - 2790) + '\146' + chr(0b10001 + 0o34) + chr(56)))():
if l4ejMdXa7Niq not in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xdc\xe9b\xa5\x80?D\x8f\xe87\xfck'), chr(0b1100100) + '\x65' + '\143' + '\x6f' + chr(1328 - 1228) + chr(0b1010111 + 0o16))('\165' + chr(11092 - 10976) + chr(994 - 892) + chr(0b101000 + 0o5) + '\x38')):
continue
roI3spqORKae(hXMPsSrOQzbh.clients[l4ejMdXa7Niq], roI3spqORKae(ES5oEprVxulp(b'\xd9\xd6?\xb7\xc30h\xbd\xd9\x10\xa0s6\xa3'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(0b1100100 + 0o0) + chr(101))('\165' + chr(0b1001101 + 0o47) + '\x66' + chr(1578 - 1533) + chr(0b111000)))(DYRxi33ZH9pD)
if pMlUhd2JmKAE:
edzprD2R6OWx = [hXMPsSrOQzbh.clients.uC_Yoybx7J0I(l4ejMdXa7Niq) for l4ejMdXa7Niq in Bvi71nNyvlqO(hXMPsSrOQzbh.pO9s7jaWEF8y) - Bvi71nNyvlqO(ajf4iMj5UQcB)]
if edzprD2R6OWx:
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf3\xc57\xb9\xc40z\xba\xdf\x1e\xafw0\xa1j\xca\x16"A\xdc'), chr(5672 - 5572) + chr(6824 - 6723) + chr(0b101000 + 0o73) + '\157' + '\x64' + chr(0b1100101))(chr(4424 - 4307) + '\x74' + chr(6827 - 6725) + '\x2d' + chr(56)))(edzprD2R6OWx) |
ciena/afkak | afkak/client.py | KafkaClient._get_leader_for_partition | def _get_leader_for_partition(self, topic, partition):
"""
Returns the leader for a partition or None if the partition exists
but has no leader.
PartitionUnavailableError will be raised if the topic or partition
is not part of the metadata.
"""
key = TopicAndPartition(topic, partition)
# reload metadata whether the partition is not available
# or has no leader (broker is None)
if self.topics_to_brokers.get(key) is None:
yield self.load_metadata_for_topics(topic)
if key not in self.topics_to_brokers:
raise PartitionUnavailableError("%s not available" % str(key))
returnValue(self.topics_to_brokers[key]) | python | def _get_leader_for_partition(self, topic, partition):
"""
Returns the leader for a partition or None if the partition exists
but has no leader.
PartitionUnavailableError will be raised if the topic or partition
is not part of the metadata.
"""
key = TopicAndPartition(topic, partition)
# reload metadata whether the partition is not available
# or has no leader (broker is None)
if self.topics_to_brokers.get(key) is None:
yield self.load_metadata_for_topics(topic)
if key not in self.topics_to_brokers:
raise PartitionUnavailableError("%s not available" % str(key))
returnValue(self.topics_to_brokers[key]) | [
"def",
"_get_leader_for_partition",
"(",
"self",
",",
"topic",
",",
"partition",
")",
":",
"key",
"=",
"TopicAndPartition",
"(",
"topic",
",",
"partition",
")",
"# reload metadata whether the partition is not available",
"# or has no leader (broker is None)",
"if",
"self",
".",
"topics_to_brokers",
".",
"get",
"(",
"key",
")",
"is",
"None",
":",
"yield",
"self",
".",
"load_metadata_for_topics",
"(",
"topic",
")",
"if",
"key",
"not",
"in",
"self",
".",
"topics_to_brokers",
":",
"raise",
"PartitionUnavailableError",
"(",
"\"%s not available\"",
"%",
"str",
"(",
"key",
")",
")",
"returnValue",
"(",
"self",
".",
"topics_to_brokers",
"[",
"key",
"]",
")"
] | Returns the leader for a partition or None if the partition exists
but has no leader.
PartitionUnavailableError will be raised if the topic or partition
is not part of the metadata. | [
"Returns",
"the",
"leader",
"for",
"a",
"partition",
"or",
"None",
"if",
"the",
"partition",
"exists",
"but",
"has",
"no",
"leader",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L765-L783 | train | Get the leader for a topic and partition. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZx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,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(111) + chr(1912 - 1862) + chr(54) + '\x33', 0o10), nzTpIcepk0o8(chr(1617 - 1569) + chr(0b100101 + 0o112) + chr(0b110001) + '\x37' + chr(0b100110 + 0o14), 5104 - 5096), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(0b110110) + '\060', 42603 - 42595), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + chr(0b10000 + 0o41) + '\060' + chr(0b110110), 35240 - 35232), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b101100 + 0o5) + '\x32' + '\x37', 0o10), nzTpIcepk0o8(chr(843 - 795) + chr(111) + chr(0b110001) + chr(51) + chr(2098 - 2047), 49231 - 49223), nzTpIcepk0o8(chr(0b110000) + chr(0b110101 + 0o72) + chr(51) + chr(0b110001) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(11293 - 11182) + chr(778 - 727) + chr(0b110110) + '\062', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101111 + 0o4) + chr(0b10110 + 0o33) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b111111 + 0o60) + chr(50) + '\x31' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(53) + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + chr(6618 - 6507) + chr(53) + chr(0b11000 + 0o32), 32987 - 32979), nzTpIcepk0o8(chr(1868 - 1820) + chr(111) + chr(51) + '\x32' + chr(1897 - 1845), 0b1000), nzTpIcepk0o8(chr(790 - 742) + chr(0b10 + 0o155) + chr(0b110001) + '\x37' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(9079 - 8968) + chr(0b10001 + 0o44) + '\x32', 8), nzTpIcepk0o8('\060' + chr(5134 - 5023) + chr(0b1101 + 0o46) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010 + 0o1) + '\063' + '\x34', 50766 - 50758), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b1101010 + 0o5) + '\063' + '\x30' + chr(375 - 326), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(54) + chr(1777 - 1728), 64162 - 64154), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101000 + 0o7) + '\061' + chr(48), 39053 - 39045), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + '\060' + '\064', 64547 - 64539), nzTpIcepk0o8(chr(407 - 359) + '\x6f' + chr(0b100011 + 0o23) + chr(772 - 722), ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1000 + 0o147) + chr(0b110111) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(609 - 560) + chr(1424 - 1376) + chr(0b10001 + 0o40), 55555 - 55547), nzTpIcepk0o8(chr(1727 - 1679) + chr(0b1100100 + 0o13) + chr(0b1001 + 0o51) + chr(0b110011) + chr(358 - 310), 0b1000), nzTpIcepk0o8('\060' + chr(0b10010 + 0o135) + chr(49) + chr(0b110001) + chr(0b1110 + 0o47), ord("\x08")), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1010100 + 0o33) + '\x32' + '\x33' + chr(2490 - 2438), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + '\061' + chr(0b110011), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(2060 - 2007) + chr(0b0 + 0o61), 0o10), nzTpIcepk0o8(chr(1166 - 1118) + chr(0b1011111 + 0o20) + chr(589 - 538) + chr(0b1111 + 0o45) + chr(2281 - 2230), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(12029 - 11918) + chr(0b101101 + 0o6) + chr(48) + chr(0b11101 + 0o27), 48195 - 48187), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + '\x37' + '\063', 65329 - 65321), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(0b110101) + chr(185 - 133), 17465 - 17457), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + '\x31', 52558 - 52550), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1406 - 1352) + '\x35', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(1205 - 1155) + chr(53) + chr(0b101100 + 0o12), 5633 - 5625), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(111) + '\x35' + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100001 + 0o21) + chr(854 - 801) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(394 - 346) + '\157' + '\x32' + chr(49) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(55) + '\x31', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + chr(2669 - 2616) + chr(0b100101 + 0o13), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9d'), chr(100) + chr(0b1100101) + '\x63' + chr(0b1001 + 0o146) + '\144' + chr(101))(chr(8923 - 8806) + chr(0b11111 + 0o125) + chr(2027 - 1925) + '\x2d' + chr(0b100110 + 0o22)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def ZfO1R8ru2NF1(hXMPsSrOQzbh, eddDFOEFy2dH, y6tm5LzgZc_E):
QYodcsDtoGq7 = r_NgehA9zC0q(eddDFOEFy2dH, y6tm5LzgZc_E)
if roI3spqORKae(hXMPsSrOQzbh.topics_to_brokers, roI3spqORKae(ES5oEprVxulp(b'\xf4/\xbb##.\xfe\x8a\xac\xcb\x1f`'), chr(0b10101 + 0o117) + chr(267 - 166) + chr(99) + chr(10063 - 9952) + '\x64' + chr(6185 - 6084))(chr(11524 - 11407) + '\x74' + chr(102) + chr(0b11111 + 0o16) + '\x38'))(QYodcsDtoGq7) is None:
yield roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xdf\x15\x91"\x086\xaf\x86\xac\xe8\r^\xb5&Lr\xae\x9e\x85g\xf4[[2'), '\x64' + chr(101) + chr(1655 - 1556) + '\x6f' + chr(7485 - 7385) + chr(0b110000 + 0o65))('\165' + '\164' + chr(0b1010101 + 0o21) + '\055' + '\x38'))(eddDFOEFy2dH)
if QYodcsDtoGq7 not in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xea8\xa0s`\x17\xba\xbf\x94\xf5\x0bh'), chr(7751 - 7651) + chr(0b100101 + 0o100) + chr(2838 - 2739) + chr(0b1101111) + chr(5398 - 5298) + chr(0b1100101))(chr(8920 - 8803) + chr(116) + chr(102) + chr(0b101101) + '\x38')):
raise oL8aoz8NVF1L(roI3spqORKae(ES5oEprVxulp(b'\x96\t\xd0(8/\xea\x93\xbb\xed\x05F\xb5\x1bFx'), chr(4108 - 4008) + chr(101) + '\143' + '\x6f' + '\x64' + chr(101))(chr(6971 - 6854) + '\164' + '\x66' + '\x2d' + chr(0b111000)) % N9zlRy29S1SS(QYodcsDtoGq7))
wVKqxW5Umubk(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xea8\xa0s`\x17\xba\xbf\x94\xf5\x0bh'), '\144' + chr(101) + chr(9381 - 9282) + chr(0b1001 + 0o146) + '\x64' + chr(101))(chr(0b1101100 + 0o11) + '\x74' + '\x66' + '\x2d' + '\x38'))[QYodcsDtoGq7]) |
ciena/afkak | afkak/client.py | KafkaClient._get_coordinator_for_group | def _get_coordinator_for_group(self, consumer_group):
"""Returns the coordinator (broker) for a consumer group
Returns the broker for a given consumer group or
Raises ConsumerCoordinatorNotAvailableError
"""
if self.consumer_group_to_brokers.get(consumer_group) is None:
yield self.load_consumer_metadata_for_group(consumer_group)
returnValue(self.consumer_group_to_brokers.get(consumer_group)) | python | def _get_coordinator_for_group(self, consumer_group):
"""Returns the coordinator (broker) for a consumer group
Returns the broker for a given consumer group or
Raises ConsumerCoordinatorNotAvailableError
"""
if self.consumer_group_to_brokers.get(consumer_group) is None:
yield self.load_consumer_metadata_for_group(consumer_group)
returnValue(self.consumer_group_to_brokers.get(consumer_group)) | [
"def",
"_get_coordinator_for_group",
"(",
"self",
",",
"consumer_group",
")",
":",
"if",
"self",
".",
"consumer_group_to_brokers",
".",
"get",
"(",
"consumer_group",
")",
"is",
"None",
":",
"yield",
"self",
".",
"load_consumer_metadata_for_group",
"(",
"consumer_group",
")",
"returnValue",
"(",
"self",
".",
"consumer_group_to_brokers",
".",
"get",
"(",
"consumer_group",
")",
")"
] | Returns the coordinator (broker) for a consumer group
Returns the broker for a given consumer group or
Raises ConsumerCoordinatorNotAvailableError | [
"Returns",
"the",
"coordinator",
"(",
"broker",
")",
"for",
"a",
"consumer",
"group"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L786-L795 | train | Returns the broker for a given consumer group | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7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,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1101111) + chr(0b110010) + '\x30' + chr(48), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11010 + 0o31) + chr(0b110100 + 0o1) + '\065', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(0b11111 + 0o21) + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10110 + 0o34) + '\063' + chr(2249 - 2196), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(0b110010) + chr(0b11001 + 0o36), 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(9899 - 9788) + chr(55) + '\062', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110000 + 0o6) + chr(0b11000 + 0o34), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(697 - 647) + chr(0b110110) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(378 - 330) + '\x6f' + '\061' + '\x33' + chr(1890 - 1838), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(52) + chr(1777 - 1727), 49259 - 49251), nzTpIcepk0o8(chr(1482 - 1434) + chr(10643 - 10532) + '\x32' + '\066' + '\x35', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101110 + 0o1) + '\062' + chr(650 - 602) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(2731 - 2620) + chr(0b110010) + chr(0b110111) + chr(55), 0b1000), nzTpIcepk0o8(chr(1005 - 957) + '\157' + chr(891 - 841) + chr(49), 31173 - 31165), nzTpIcepk0o8('\060' + '\157' + '\061' + '\060' + chr(0b10001 + 0o46), 45808 - 45800), nzTpIcepk0o8('\x30' + chr(111) + '\065' + chr(53), 0o10), nzTpIcepk0o8(chr(48) + chr(3696 - 3585) + chr(0b110011) + chr(51) + chr(51), 29645 - 29637), nzTpIcepk0o8('\060' + chr(111) + chr(1961 - 1912) + chr(2191 - 2142) + chr(1178 - 1129), 0o10), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\x6f' + chr(1297 - 1247) + '\x35' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(243 - 195) + chr(0b1101111) + chr(51) + chr(48) + chr(161 - 111), ord("\x08")), nzTpIcepk0o8(chr(652 - 604) + '\157' + '\x33' + '\067', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(667 - 616) + chr(1232 - 1181), 8), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(184 - 129) + chr(0b11000 + 0o31), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(722 - 672) + chr(0b110101) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + '\x31' + chr(0b110110), 64584 - 64576), nzTpIcepk0o8('\060' + '\x6f' + chr(0b101111 + 0o3) + '\066' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(1784 - 1736) + chr(9268 - 9157) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b101011 + 0o6) + chr(1107 - 1055) + chr(0b1 + 0o61), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b11000 + 0o127) + '\x32' + chr(50) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1001000 + 0o47) + '\x36' + chr(1506 - 1456), ord("\x08")), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(111) + '\062' + chr(0b100001 + 0o26) + chr(1801 - 1751), 62027 - 62019), nzTpIcepk0o8(chr(1685 - 1637) + chr(0b1101111) + chr(88 - 39) + chr(0b101 + 0o56) + chr(0b11 + 0o61), 8), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b111111 + 0o60) + chr(0b101110 + 0o5) + chr(0b110001) + chr(1760 - 1705), ord("\x08")), nzTpIcepk0o8(chr(2291 - 2243) + '\x6f' + chr(611 - 562) + chr(1087 - 1036) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + chr(1774 - 1724) + chr(48), 0o10), nzTpIcepk0o8(chr(1118 - 1070) + chr(111) + '\x31' + chr(50) + '\064', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1010001 + 0o36) + '\x32' + chr(0b11100 + 0o33) + chr(164 - 115), 0o10), nzTpIcepk0o8(chr(1406 - 1358) + chr(111) + '\061' + '\061' + '\067', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110110) + '\061', 32784 - 32776), nzTpIcepk0o8(chr(0b110000) + chr(673 - 562) + '\x33' + chr(103 - 49) + chr(132 - 81), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\157' + chr(0b1001 + 0o54) + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xae'), chr(0b1110 + 0o126) + chr(9935 - 9834) + '\143' + chr(0b1101111) + chr(0b110001 + 0o63) + chr(0b1100100 + 0o1))('\x75' + chr(116) + chr(0b1100110) + '\x2d' + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def iNuZe4UFCDuv(hXMPsSrOQzbh, ZkSgBEVcLeGM):
if roI3spqORKae(hXMPsSrOQzbh.consumer_group_to_brokers, roI3spqORKae(ES5oEprVxulp(b'\xc7\xb8\x8f\xf8\xa3O\x00\xc8=%\xc6\xc8'), '\x64' + '\x65' + '\x63' + chr(8563 - 8452) + '\144' + '\145')('\x75' + '\164' + '\x66' + chr(973 - 928) + chr(0b111000)))(ZkSgBEVcLeGM) is None:
yield roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xec\x82\xa5\xf9\x88Y[\xde/\x17\xd8\xe7\xcdN*H\xaf(\xce\xa3k\xba\xa6\xc8!\xc1_\x05\xe6]\xcf,'), '\144' + '\x65' + '\143' + chr(0b110011 + 0o74) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b1010100 + 0o40) + chr(5002 - 4900) + chr(0b100111 + 0o6) + chr(0b110 + 0o62)))(ZkSgBEVcLeGM)
wVKqxW5Umubk(roI3spqORKae(hXMPsSrOQzbh.consumer_group_to_brokers, roI3spqORKae(ES5oEprVxulp(b'\xc7\xb8\x8f\xf8\xa3O\x00\xc8=%\xc6\xc8'), chr(0b110010 + 0o62) + '\x65' + chr(0b1010001 + 0o22) + '\x6f' + chr(100) + chr(8233 - 8132))('\165' + '\164' + chr(0b101010 + 0o74) + chr(0b101101) + chr(1122 - 1066)))(ZkSgBEVcLeGM)) |
ciena/afkak | afkak/client.py | KafkaClient._make_request_to_broker | def _make_request_to_broker(self, broker, requestId, request, **kwArgs):
"""Send a request to the specified broker."""
def _timeout_request(broker, requestId):
"""The time we allotted for the request expired, cancel it."""
try:
# FIXME: This should be done by calling .cancel() on the Deferred
# returned by the broker client.
broker.cancelRequest(requestId, reason=RequestTimedOutError(
'Request: {} cancelled due to timeout'.format(requestId)))
except KeyError: # pragma: no cover This should never happen...
log.exception('ERROR: Failed to find key for timed-out '
'request. Broker: %r Req: %d',
broker, requestId)
raise
if self._disconnect_on_timeout:
broker.disconnect()
def _alert_blocked_reactor(timeout, start):
"""Complain if this timer didn't fire before the timeout elapsed"""
now = self.reactor.seconds()
if now >= (start + timeout):
log.warning('Reactor was starved for %r seconds', now - start)
def _cancel_timeout(result, dc):
"""Request completed/cancelled, cancel the timeout delayedCall."""
if dc.active():
dc.cancel()
return result
# Make the request to the specified broker
log.debug('_mrtb: sending request: %d to broker: %r',
requestId, broker)
d = broker.makeRequest(requestId, request, **kwArgs)
# Set a delayedCall to fire if we don't get a reply in time
dc = self.reactor.callLater(
self.timeout, _timeout_request, broker, requestId)
# Set a delayedCall to complain if the reactor has been blocked
rc = self.reactor.callLater(
(self.timeout * 0.9), _alert_blocked_reactor, self.timeout,
self.reactor.seconds())
# Setup a callback on the request deferred to cancel both callLater
d.addBoth(_cancel_timeout, dc)
d.addBoth(_cancel_timeout, rc)
return d | python | def _make_request_to_broker(self, broker, requestId, request, **kwArgs):
"""Send a request to the specified broker."""
def _timeout_request(broker, requestId):
"""The time we allotted for the request expired, cancel it."""
try:
# FIXME: This should be done by calling .cancel() on the Deferred
# returned by the broker client.
broker.cancelRequest(requestId, reason=RequestTimedOutError(
'Request: {} cancelled due to timeout'.format(requestId)))
except KeyError: # pragma: no cover This should never happen...
log.exception('ERROR: Failed to find key for timed-out '
'request. Broker: %r Req: %d',
broker, requestId)
raise
if self._disconnect_on_timeout:
broker.disconnect()
def _alert_blocked_reactor(timeout, start):
"""Complain if this timer didn't fire before the timeout elapsed"""
now = self.reactor.seconds()
if now >= (start + timeout):
log.warning('Reactor was starved for %r seconds', now - start)
def _cancel_timeout(result, dc):
"""Request completed/cancelled, cancel the timeout delayedCall."""
if dc.active():
dc.cancel()
return result
# Make the request to the specified broker
log.debug('_mrtb: sending request: %d to broker: %r',
requestId, broker)
d = broker.makeRequest(requestId, request, **kwArgs)
# Set a delayedCall to fire if we don't get a reply in time
dc = self.reactor.callLater(
self.timeout, _timeout_request, broker, requestId)
# Set a delayedCall to complain if the reactor has been blocked
rc = self.reactor.callLater(
(self.timeout * 0.9), _alert_blocked_reactor, self.timeout,
self.reactor.seconds())
# Setup a callback on the request deferred to cancel both callLater
d.addBoth(_cancel_timeout, dc)
d.addBoth(_cancel_timeout, rc)
return d | [
"def",
"_make_request_to_broker",
"(",
"self",
",",
"broker",
",",
"requestId",
",",
"request",
",",
"*",
"*",
"kwArgs",
")",
":",
"def",
"_timeout_request",
"(",
"broker",
",",
"requestId",
")",
":",
"\"\"\"The time we allotted for the request expired, cancel it.\"\"\"",
"try",
":",
"# FIXME: This should be done by calling .cancel() on the Deferred",
"# returned by the broker client.",
"broker",
".",
"cancelRequest",
"(",
"requestId",
",",
"reason",
"=",
"RequestTimedOutError",
"(",
"'Request: {} cancelled due to timeout'",
".",
"format",
"(",
"requestId",
")",
")",
")",
"except",
"KeyError",
":",
"# pragma: no cover This should never happen...",
"log",
".",
"exception",
"(",
"'ERROR: Failed to find key for timed-out '",
"'request. Broker: %r Req: %d'",
",",
"broker",
",",
"requestId",
")",
"raise",
"if",
"self",
".",
"_disconnect_on_timeout",
":",
"broker",
".",
"disconnect",
"(",
")",
"def",
"_alert_blocked_reactor",
"(",
"timeout",
",",
"start",
")",
":",
"\"\"\"Complain if this timer didn't fire before the timeout elapsed\"\"\"",
"now",
"=",
"self",
".",
"reactor",
".",
"seconds",
"(",
")",
"if",
"now",
">=",
"(",
"start",
"+",
"timeout",
")",
":",
"log",
".",
"warning",
"(",
"'Reactor was starved for %r seconds'",
",",
"now",
"-",
"start",
")",
"def",
"_cancel_timeout",
"(",
"result",
",",
"dc",
")",
":",
"\"\"\"Request completed/cancelled, cancel the timeout delayedCall.\"\"\"",
"if",
"dc",
".",
"active",
"(",
")",
":",
"dc",
".",
"cancel",
"(",
")",
"return",
"result",
"# Make the request to the specified broker",
"log",
".",
"debug",
"(",
"'_mrtb: sending request: %d to broker: %r'",
",",
"requestId",
",",
"broker",
")",
"d",
"=",
"broker",
".",
"makeRequest",
"(",
"requestId",
",",
"request",
",",
"*",
"*",
"kwArgs",
")",
"# Set a delayedCall to fire if we don't get a reply in time",
"dc",
"=",
"self",
".",
"reactor",
".",
"callLater",
"(",
"self",
".",
"timeout",
",",
"_timeout_request",
",",
"broker",
",",
"requestId",
")",
"# Set a delayedCall to complain if the reactor has been blocked",
"rc",
"=",
"self",
".",
"reactor",
".",
"callLater",
"(",
"(",
"self",
".",
"timeout",
"*",
"0.9",
")",
",",
"_alert_blocked_reactor",
",",
"self",
".",
"timeout",
",",
"self",
".",
"reactor",
".",
"seconds",
"(",
")",
")",
"# Setup a callback on the request deferred to cancel both callLater",
"d",
".",
"addBoth",
"(",
"_cancel_timeout",
",",
"dc",
")",
"d",
".",
"addBoth",
"(",
"_cancel_timeout",
",",
"rc",
")",
"return",
"d"
] | Send a request to the specified broker. | [
"Send",
"a",
"request",
"to",
"the",
"specified",
"broker",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L803-L846 | train | Send a request to the specified broker. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ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2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + '\060' + chr(0b110000 + 0o0), 0o10), nzTpIcepk0o8('\060' + chr(6469 - 6358) + '\x31' + chr(0b110001), 8555 - 8547), nzTpIcepk0o8(chr(48) + chr(0b1010101 + 0o32) + '\062' + '\x36' + chr(607 - 552), 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + '\x6f' + chr(0b100111 + 0o13) + '\x34' + chr(1216 - 1168), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b110100) + chr(262 - 207), 8476 - 8468), nzTpIcepk0o8(chr(0b110000) + chr(0b101011 + 0o104) + '\063' + '\x34' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(660 - 612) + chr(3482 - 3371) + '\x33' + chr(2264 - 2211) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + chr(9545 - 9434) + chr(2142 - 2093) + chr(53), 0o10), nzTpIcepk0o8(chr(1525 - 1477) + chr(111) + '\x36' + chr(50), 58599 - 58591), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b1101110 + 0o1) + chr(0b110001) + '\x32' + chr(0b10110 + 0o36), 47839 - 47831), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(0b111 + 0o52) + chr(49), 0b1000), nzTpIcepk0o8(chr(2252 - 2204) + '\x6f' + '\x31' + chr(1062 - 1014) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(8707 - 8596) + '\064' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\067' + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(55) + '\067', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(1087 - 976) + '\062' + '\x37' + chr(0b11100 + 0o32), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(520 - 465), 44641 - 44633), nzTpIcepk0o8(chr(48) + chr(0b10010 + 0o135) + chr(0b10 + 0o60) + '\x33' + chr(48), 16647 - 16639), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(5513 - 5402) + chr(0b100011 + 0o16) + chr(1722 - 1674) + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + '\x35' + chr(1644 - 1591), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(384 - 331) + '\x30', 3174 - 3166), nzTpIcepk0o8(chr(48) + chr(0b1100101 + 0o12) + '\x31' + chr(0b110010) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(1173 - 1125) + chr(6562 - 6451) + '\x32' + chr(55) + chr(0b100101 + 0o22), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + '\066' + '\x36', 10779 - 10771), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + chr(2209 - 2160) + chr(1765 - 1714) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(1265 - 1217) + '\x6f' + chr(0b1000 + 0o57) + chr(1424 - 1373), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(663 - 552) + chr(49) + chr(0b1001 + 0o53) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(1035 - 987) + chr(111) + chr(0b110011) + '\x31' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(111) + chr(0b101111 + 0o3) + '\067' + '\x33', 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + chr(50) + chr(0b10100 + 0o34) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(500 - 445) + '\x31', 0o10), nzTpIcepk0o8('\060' + chr(11193 - 11082) + chr(0b1100 + 0o53) + chr(0b0 + 0o66), 8), nzTpIcepk0o8(chr(462 - 414) + chr(9207 - 9096) + '\x33' + chr(275 - 227), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(8618 - 8507) + '\062' + '\x32' + chr(52), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b100 + 0o55) + chr(50), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1010000 + 0o37) + '\x32' + chr(972 - 919) + chr(55), 0b1000), nzTpIcepk0o8(chr(92 - 44) + chr(111) + '\063' + chr(49) + chr(0b1100 + 0o52), 28951 - 28943), nzTpIcepk0o8('\x30' + '\x6f' + chr(1332 - 1278) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(2502 - 2447) + chr(0b10 + 0o61), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\x6f' + '\065' + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xee'), '\144' + chr(101) + chr(0b1100011) + chr(0b1100 + 0o143) + chr(0b101110 + 0o66) + chr(101))('\x75' + '\x74' + '\146' + chr(0b101101) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def kXWHNEZfmqE6(hXMPsSrOQzbh, MaZ29Q4rLmvP, lV7fd2Cq53hp, fXJOkxXvZqV_, **RNsoOAJ9jZTE):
def NugGmJX2teoo(MaZ29Q4rLmvP, lV7fd2Cq53hp):
try:
roI3spqORKae(MaZ29Q4rLmvP, roI3spqORKae(ES5oEprVxulp(b'\xa3h\xd9\xc3\xc2\x8b\xbbhCh1:1'), chr(6947 - 6847) + chr(0b0 + 0o145) + chr(0b1001000 + 0o33) + '\x6f' + chr(2690 - 2590) + chr(0b111011 + 0o52))(chr(117) + chr(116) + chr(0b1100110) + '\055' + '\x38'))(lV7fd2Cq53hp, reason=hwWIseHBQorx(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\x92l\xc6\xd5\xc2\x94\x9d7\x12f)i&BP\x9c\xdbk\xf4%\x89\xc87\xca\xd3zO\x0c\xe8\xcf\xe9\x94[w\xe1\xfe'), chr(3631 - 3531) + '\145' + chr(0b1011 + 0o130) + chr(6553 - 6442) + chr(0b1100100) + '\145')('\165' + chr(0b1001110 + 0o46) + chr(1147 - 1045) + chr(0b101101) + chr(0b111000 + 0o0)), roI3spqORKae(ES5oEprVxulp(b'\xb1:\x84\xeb\xe0\xd4\x8fbcB\x17\x03'), chr(1681 - 1581) + '\145' + chr(6940 - 6841) + '\x6f' + '\144' + chr(522 - 421))('\165' + '\x74' + chr(0b1100110) + chr(0b101101) + '\x38'))(lV7fd2Cq53hp)))
except knUxyjfq07F9:
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\xb2j\xfb\xc1\xed\x85\x8aG\x7f~\x1a?'), '\144' + '\x65' + chr(0b1100011) + chr(111) + chr(100) + '\145')('\165' + chr(116) + chr(9420 - 9318) + chr(0b100010 + 0o13) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\x85[\xe5\xef\xf5\xdd\xc9KSt8,!\x03J\x90\x9ea\xf1.\x89\xc88\xda\xcfz]\x0c\xba\x9b\xf4\x90S}\xf0\xa7\xc0\xbbE\x9b\xb2l\xc6\xd5\xc2\x94\x9d#\x12_&&.FL\xc5\x9e"\xea`\xbf\x8d"\x85\x96\x7f_'), chr(7587 - 7487) + chr(0b1100101) + '\x63' + chr(382 - 271) + chr(0b1010010 + 0o22) + chr(0b1100101))(chr(0b1110101) + chr(116) + '\x66' + chr(787 - 742) + '\x38'), MaZ29Q4rLmvP, lV7fd2Cq53hp)
raise
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x9fm\xde\xd3\xc4\x88\x87cW~ \x16*Ma\x8b\xd7j\xfd/\x98\x9c'), chr(2841 - 2741) + chr(0b1100101) + '\x63' + '\x6f' + '\144' + chr(0b1100101))(chr(3016 - 2899) + chr(0b1110100) + chr(102) + '\x2d' + chr(56))):
roI3spqORKae(MaZ29Q4rLmvP, roI3spqORKae(ES5oEprVxulp(b'\xa4`\xc4\xc3\xc8\x89\x87hQi'), chr(100) + chr(0b111100 + 0o51) + '\143' + chr(111) + chr(0b100111 + 0o75) + chr(2578 - 2477))(chr(3647 - 3530) + chr(9578 - 9462) + chr(0b100111 + 0o77) + chr(45) + chr(2421 - 2365)))()
def sTZ22xKn1Rv8(ACACUUFQsMpr, KQbHFTcl_LKy):
HofpCdf61ts4 = hXMPsSrOQzbh.reactor.seconds()
if HofpCdf61ts4 >= KQbHFTcl_LKy + ACACUUFQsMpr:
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\xb7h\xc5\xce\xce\x89\x8e'), chr(0b1100100) + '\145' + chr(295 - 196) + '\157' + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b1000001 + 0o63) + chr(2881 - 2779) + chr(0b101101) + chr(0b101001 + 0o17)))(roI3spqORKae(ES5oEprVxulp(b"\x92l\xd6\xc3\xd3\x88\x9b-E|'i6W_\x8d\xc8b\xfc`\x8b\x87!\x9f\x93(\x1b\x10\xad\xd8\xef\x97Zk"), chr(1170 - 1070) + chr(1436 - 1335) + chr(0b1010111 + 0o14) + chr(111) + chr(0b1001 + 0o133) + chr(0b10110 + 0o117))(chr(117) + chr(4392 - 4276) + '\146' + '\x2d' + chr(56)), HofpCdf61ts4 - KQbHFTcl_LKy)
def _K2GDJklS_A3(POx95m7SPOVy, Iq4fgxO0wlkK):
if roI3spqORKae(Iq4fgxO0wlkK, roI3spqORKae(ES5oEprVxulp(b'\x86[\xee\xe3\x95\xa5\xb95}d\x1f?'), chr(0b1100100) + '\145' + '\143' + '\x6f' + chr(9540 - 9440) + '\x65')(chr(0b1101011 + 0o12) + chr(0b1000 + 0o154) + chr(0b1100110) + '\x2d' + '\070'))():
roI3spqORKae(Iq4fgxO0wlkK, roI3spqORKae(ES5oEprVxulp(b'\xa3h\xd9\xc3\xc2\x8b'), '\144' + '\145' + '\143' + chr(5498 - 5387) + chr(100) + '\x65')('\165' + '\164' + chr(8081 - 7979) + chr(0b101101) + chr(1986 - 1930)))()
return POx95m7SPOVy
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'\xa7H\x8e\xfa\x9e\x83\x86;gp\x11\x13'), '\144' + '\x65' + chr(0b1100011) + '\x6f' + chr(100) + chr(0b1111 + 0o126))(chr(117) + chr(10123 - 10007) + chr(102) + chr(0b100101 + 0o10) + chr(0b110110 + 0o2)))(roI3spqORKae(ES5oEprVxulp(b'\x9fd\xc5\xd4\xc5\xdd\xc9~Ws0 +D\x1e\x8d\xdbv\xed%\x9e\x9ci\x9f\x93>\x1b\x17\xa7\x9b\xe2\x8bQs\xf1\xf8\x95\xee\x14\xc9'), chr(0b11010 + 0o112) + '\x65' + chr(0b1100011) + chr(111) + chr(6600 - 6500) + chr(7540 - 7439))(chr(0b1110101) + chr(0b1100010 + 0o22) + chr(1917 - 1815) + chr(0b100001 + 0o14) + chr(56)), lV7fd2Cq53hp, MaZ29Q4rLmvP)
vPPlOXQgR3SM = MaZ29Q4rLmvP.makeRequest(lV7fd2Cq53hp, fXJOkxXvZqV_, **RNsoOAJ9jZTE)
Iq4fgxO0wlkK = hXMPsSrOQzbh.reactor.callLater(hXMPsSrOQzbh.ACACUUFQsMpr, NugGmJX2teoo, MaZ29Q4rLmvP, lV7fd2Cq53hp)
zKZEjxH40Eor = hXMPsSrOQzbh.reactor.callLater(hXMPsSrOQzbh.ACACUUFQsMpr * 0.9, sTZ22xKn1Rv8, hXMPsSrOQzbh.ACACUUFQsMpr, hXMPsSrOQzbh.reactor.seconds())
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\xa1m\xd3\xe2\xc8\x93\x81'), chr(0b1100100) + '\145' + chr(7244 - 7145) + '\x6f' + '\144' + chr(0b1100101))('\x75' + chr(0b1011101 + 0o27) + '\146' + '\055' + '\070'))(_K2GDJklS_A3, Iq4fgxO0wlkK)
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\xa1m\xd3\xe2\xc8\x93\x81'), '\x64' + '\145' + '\143' + '\x6f' + '\144' + chr(0b1100101))(chr(0b1100001 + 0o24) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(0b111000)))(_K2GDJklS_A3, zKZEjxH40Eor)
return vPPlOXQgR3SM |
ciena/afkak | afkak/client.py | KafkaClient._send_broker_unaware_request | def _send_broker_unaware_request(self, requestId, request):
"""
Attempt to send a broker-agnostic request to one of the known brokers:
1. Try each connected broker (in random order)
2. Try each known but unconnected broker (in random order)
3. Try each of the bootstrap hosts (in random order)
:param bytes request:
The bytes of a Kafka `RequestMessage`_ structure. It must have
a unique (to this connection) correlation ID.
:returns: API response message for *request*
:rtype: Deferred[bytes]
:raises:
`KafkaUnavailableError` when making the request of all known hosts
has failed.
"""
node_ids = list(self._brokers.keys())
# Randomly shuffle the brokers to distribute the load
random.shuffle(node_ids)
# Prioritize connected brokers
def connected(node_id):
try:
return self.clients[node_id].connected()
except KeyError:
return False
node_ids.sort(reverse=True, key=connected)
for node_id in node_ids:
broker = self._get_brokerclient(node_id)
try:
log.debug('_sbur: sending request %d to broker %r', requestId, broker)
d = self._make_request_to_broker(broker, requestId, request)
resp = yield d
returnValue(resp)
except KafkaError as e:
log.warning((
"Will try next server after request with correlationId=%d"
" failed against server %s:%i. Error: %s"
), requestId, broker.host, broker.port, e)
# The request was not handled, likely because no broker metadata has
# loaded yet (or all broker connections have failed). Fall back to
# boostrapping.
returnValue((yield self._send_bootstrap_request(request))) | python | def _send_broker_unaware_request(self, requestId, request):
"""
Attempt to send a broker-agnostic request to one of the known brokers:
1. Try each connected broker (in random order)
2. Try each known but unconnected broker (in random order)
3. Try each of the bootstrap hosts (in random order)
:param bytes request:
The bytes of a Kafka `RequestMessage`_ structure. It must have
a unique (to this connection) correlation ID.
:returns: API response message for *request*
:rtype: Deferred[bytes]
:raises:
`KafkaUnavailableError` when making the request of all known hosts
has failed.
"""
node_ids = list(self._brokers.keys())
# Randomly shuffle the brokers to distribute the load
random.shuffle(node_ids)
# Prioritize connected brokers
def connected(node_id):
try:
return self.clients[node_id].connected()
except KeyError:
return False
node_ids.sort(reverse=True, key=connected)
for node_id in node_ids:
broker = self._get_brokerclient(node_id)
try:
log.debug('_sbur: sending request %d to broker %r', requestId, broker)
d = self._make_request_to_broker(broker, requestId, request)
resp = yield d
returnValue(resp)
except KafkaError as e:
log.warning((
"Will try next server after request with correlationId=%d"
" failed against server %s:%i. Error: %s"
), requestId, broker.host, broker.port, e)
# The request was not handled, likely because no broker metadata has
# loaded yet (or all broker connections have failed). Fall back to
# boostrapping.
returnValue((yield self._send_bootstrap_request(request))) | [
"def",
"_send_broker_unaware_request",
"(",
"self",
",",
"requestId",
",",
"request",
")",
":",
"node_ids",
"=",
"list",
"(",
"self",
".",
"_brokers",
".",
"keys",
"(",
")",
")",
"# Randomly shuffle the brokers to distribute the load",
"random",
".",
"shuffle",
"(",
"node_ids",
")",
"# Prioritize connected brokers",
"def",
"connected",
"(",
"node_id",
")",
":",
"try",
":",
"return",
"self",
".",
"clients",
"[",
"node_id",
"]",
".",
"connected",
"(",
")",
"except",
"KeyError",
":",
"return",
"False",
"node_ids",
".",
"sort",
"(",
"reverse",
"=",
"True",
",",
"key",
"=",
"connected",
")",
"for",
"node_id",
"in",
"node_ids",
":",
"broker",
"=",
"self",
".",
"_get_brokerclient",
"(",
"node_id",
")",
"try",
":",
"log",
".",
"debug",
"(",
"'_sbur: sending request %d to broker %r'",
",",
"requestId",
",",
"broker",
")",
"d",
"=",
"self",
".",
"_make_request_to_broker",
"(",
"broker",
",",
"requestId",
",",
"request",
")",
"resp",
"=",
"yield",
"d",
"returnValue",
"(",
"resp",
")",
"except",
"KafkaError",
"as",
"e",
":",
"log",
".",
"warning",
"(",
"(",
"\"Will try next server after request with correlationId=%d\"",
"\" failed against server %s:%i. Error: %s\"",
")",
",",
"requestId",
",",
"broker",
".",
"host",
",",
"broker",
".",
"port",
",",
"e",
")",
"# The request was not handled, likely because no broker metadata has",
"# loaded yet (or all broker connections have failed). Fall back to",
"# boostrapping.",
"returnValue",
"(",
"(",
"yield",
"self",
".",
"_send_bootstrap_request",
"(",
"request",
")",
")",
")"
] | Attempt to send a broker-agnostic request to one of the known brokers:
1. Try each connected broker (in random order)
2. Try each known but unconnected broker (in random order)
3. Try each of the bootstrap hosts (in random order)
:param bytes request:
The bytes of a Kafka `RequestMessage`_ structure. It must have
a unique (to this connection) correlation ID.
:returns: API response message for *request*
:rtype: Deferred[bytes]
:raises:
`KafkaUnavailableError` when making the request of all known hosts
has failed. | [
"Attempt",
"to",
"send",
"a",
"broker",
"-",
"agnostic",
"request",
"to",
"one",
"of",
"the",
"known",
"brokers",
":"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L849-L897 | train | Send a broker - agnostic request to all known brokers. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe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V,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x35' + '\067', 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\x6f' + chr(2244 - 2195) + chr(0b101100 + 0o13) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(498 - 450) + '\x6f' + chr(0b0 + 0o62) + chr(53) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(2216 - 2105) + chr(0b110010) + chr(0b100101 + 0o15) + chr(52), 46223 - 46215), nzTpIcepk0o8(chr(0b110000) + chr(0b10000 + 0o137) + chr(49) + chr(0b110101) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1101111) + '\062' + chr(146 - 98) + chr(0b110011), 45725 - 45717), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(1851 - 1803) + chr(0b10001 + 0o37), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b111 + 0o52) + chr(1660 - 1607) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + '\061' + chr(50) + chr(0b10111 + 0o31), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11 + 0o63), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b111 + 0o54) + chr(0b110101) + chr(54), 55717 - 55709), nzTpIcepk0o8(chr(48) + chr(0b101011 + 0o104) + chr(0b1111 + 0o44) + '\063' + chr(2319 - 2269), 23143 - 23135), nzTpIcepk0o8('\x30' + chr(4562 - 4451) + '\061' + chr(0b110100) + chr(2258 - 2210), ord("\x08")), nzTpIcepk0o8('\x30' + chr(8415 - 8304) + chr(0b1010 + 0o54), 8), nzTpIcepk0o8(chr(1885 - 1837) + '\x6f' + chr(0b110010) + chr(0b110110) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(4697 - 4586) + chr(1291 - 1241) + chr(0b110 + 0o57) + '\x33', 8), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + chr(0b1111 + 0o43) + chr(53) + '\062', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + '\x37' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(8152 - 8041) + chr(51) + '\x35', 0o10), nzTpIcepk0o8(chr(844 - 796) + chr(0b101011 + 0o104) + chr(49) + chr(2780 - 2726) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b10101 + 0o132) + '\063' + '\061' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(1370 - 1322) + '\x6f' + '\x33' + chr(48) + chr(2685 - 2630), ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + chr(0b110001) + chr(48) + '\064', 55516 - 55508), nzTpIcepk0o8('\x30' + '\157' + chr(1899 - 1848) + chr(50) + chr(0b11110 + 0o31), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + '\x32' + chr(53), 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + chr(0b110100) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b11101 + 0o122) + chr(0b1111 + 0o42) + chr(0b110011) + chr(266 - 216), 21890 - 21882), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + chr(0b1011 + 0o51) + chr(0b100100 + 0o15), ord("\x08")), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101111) + '\x33' + '\065' + '\x35', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1100001 + 0o16) + chr(49) + '\x31' + chr(2517 - 2464), 6959 - 6951), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(0b1000 + 0o54) + chr(50), 8726 - 8718), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(55), 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1101111) + chr(0b110001) + chr(789 - 737) + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(0b11100 + 0o32) + '\060', 65011 - 65003), nzTpIcepk0o8(chr(2107 - 2059) + '\157' + chr(0b101 + 0o55) + chr(2011 - 1961) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(0b11010 + 0o27) + chr(1428 - 1375), 8), nzTpIcepk0o8('\060' + '\157' + '\063' + '\x30', 53995 - 53987), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(324 - 274) + chr(880 - 831) + chr(55), 14120 - 14112), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(49) + chr(0b101010 + 0o11), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + '\x37' + chr(629 - 578), 34631 - 34623)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\157' + chr(0b110101) + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x01'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(6192 - 6081) + chr(8527 - 8427) + chr(101))(chr(117) + chr(4532 - 4416) + chr(2330 - 2228) + '\x2d' + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def YjO7KRgbcmyq(hXMPsSrOQzbh, lV7fd2Cq53hp, fXJOkxXvZqV_):
KUsBxM_u98v_ = H4NoA26ON7iG(hXMPsSrOQzbh._brokers.keys())
roI3spqORKae(PNI8nORkWcyJ, roI3spqORKae(ES5oEprVxulp(b'\\\x10\xde\xf2\n\xef\xa5'), chr(100) + '\x65' + '\143' + '\157' + chr(100) + chr(0b1111 + 0o126))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(1649 - 1604) + chr(0b100110 + 0o22)))(KUsBxM_u98v_)
def qkrpfbzHfLrO(l4ejMdXa7Niq):
try:
return roI3spqORKae(hXMPsSrOQzbh.clients[l4ejMdXa7Niq], roI3spqORKae(ES5oEprVxulp(b'^\x13\xd9\xe4\n\xe1\xba#6J\x9c\x95'), chr(100) + '\145' + chr(0b111111 + 0o44) + '\157' + chr(5870 - 5770) + chr(101))(chr(0b101011 + 0o112) + chr(0b111011 + 0o71) + chr(0b1000010 + 0o44) + chr(0b1 + 0o54) + chr(0b110001 + 0o7)))()
except knUxyjfq07F9:
return nzTpIcepk0o8('\060' + chr(111) + '\060', 10396 - 10388)
roI3spqORKae(KUsBxM_u98v_, roI3spqORKae(ES5oEprVxulp(b'\\\x17\xd9\xe0'), '\x64' + chr(0b1001001 + 0o34) + '\143' + chr(10482 - 10371) + chr(0b11101 + 0o107) + chr(101))(chr(13602 - 13485) + chr(0b110000 + 0o104) + chr(0b111001 + 0o55) + '\055' + chr(454 - 398)))(reverse=nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b11 + 0o154) + chr(49), 0o10), key=qkrpfbzHfLrO)
for l4ejMdXa7Niq in KUsBxM_u98v_:
MaZ29Q4rLmvP = hXMPsSrOQzbh._get_brokerclient(l4ejMdXa7Niq)
try:
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'H9\x92\xceU\xe7\xaf]\x05k\xab\x80'), chr(0b1100100) + chr(8741 - 8640) + chr(0b1100011) + '\157' + chr(100) + chr(0b1100101))(chr(5489 - 5372) + chr(116) + '\146' + chr(1200 - 1155) + chr(2482 - 2426)))(roI3spqORKae(ES5oEprVxulp(b'p\x0b\xc9\xe1\x1e\xb9\xe0\x185h\x8a\xb3\x0ea\x94\xd9\xcf\x8bh\x17\xb9\xb3d\xf2\xf1\x05.N\xcd/\xd0h\x08\xd5\xe0m=\xfd'), '\x64' + chr(9471 - 9370) + chr(0b1100011) + '\x6f' + chr(5951 - 5851) + '\145')('\x75' + chr(2081 - 1965) + chr(6573 - 6471) + '\055' + chr(295 - 239)), lV7fd2Cq53hp, MaZ29Q4rLmvP)
vPPlOXQgR3SM = hXMPsSrOQzbh._make_request_to_broker(MaZ29Q4rLmvP, lV7fd2Cq53hp, fXJOkxXvZqV_)
xxhWttsUDUCM = (yield vPPlOXQgR3SM)
wVKqxW5Umubk(xxhWttsUDUCM)
except znEX5vRqGSjA as wgf0sgcu_xPL:
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'X\x19\xd9\xfa\x05\xed\xa7'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(111) + '\144' + '\145')(chr(0b110 + 0o157) + chr(0b1110100) + chr(0b1100110) + chr(1716 - 1671) + chr(0b100011 + 0o25)))(roI3spqORKae(ES5oEprVxulp(b'x\x11\xc7\xf8L\xf7\xb2\x12ph\x8b\xa2\x14&\xc7\xce\xd8\x8cx\x00\xea\xa6"\xa3\xf0WzS\x88<\xd7b\x10\xc4\xb2:q\xfb\xe3[L\x17\xd9\xe6\t\xef\xa1\x1f9i\x80\x93\x04;\x91\xcf\x8a\x9c|\x1b\xa6\xa2 \xf7\xf4B;H\x83>\xd6\'\x10\xd5\xe0;}\xfd\xab^\\B\x8e\xfdB\xa3\x85\x19"i\x9c\xe0@#\xc7'), chr(2956 - 2856) + chr(101) + '\x63' + chr(111) + '\144' + chr(2222 - 2121))(chr(117) + '\x74' + chr(102) + chr(45) + '\x38'), lV7fd2Cq53hp, roI3spqORKae(MaZ29Q4rLmvP, roI3spqORKae(ES5oEprVxulp(b'z\x1b\xf1\xfb\n\xce\xa1\x0f\x193\x86\x9e'), chr(100) + chr(0b101001 + 0o74) + chr(0b1100011) + '\x6f' + chr(100) + chr(101))(chr(0b10011 + 0o142) + '\164' + chr(0b1100110) + chr(0b101101) + chr(0b10110 + 0o42))), roI3spqORKae(MaZ29Q4rLmvP, roI3spqORKae(ES5oEprVxulp(b'i3\xfc\xd6\x03\xd0\x842hW\x9d\xe8'), chr(0b1000 + 0o134) + '\145' + chr(7619 - 7520) + chr(111) + chr(100) + chr(0b100110 + 0o77))('\165' + chr(3333 - 3217) + '\146' + chr(0b1110 + 0o37) + chr(2210 - 2154))), wgf0sgcu_xPL)
wVKqxW5Umubk((yield roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'p\x0b\xce\xfa\x08\xdc\xa2\x04?r\x9d\xae\x12g\xc4\xf4\xd8\x9fl\x07\xaf\xb40'), '\x64' + chr(0b1100010 + 0o3) + chr(0b1100011) + chr(111) + chr(5441 - 5341) + '\145')(chr(0b11111 + 0o126) + '\164' + '\x66' + chr(0b100101 + 0o10) + '\070'))(fXJOkxXvZqV_))) |
ciena/afkak | afkak/client.py | KafkaClient._send_bootstrap_request | def _send_bootstrap_request(self, request):
"""Make a request using an ephemeral broker connection
This routine is used to make broker-unaware requests to get the initial
cluster metadata. It cycles through the configured hosts, trying to
connect and send the request to each in turn. This temporary connection
is closed once a response is received.
Note that most Kafka APIs require requests be sent to a specific
broker. This method will only function for broker-agnostic requests
like:
* `Metadata <https://kafka.apache.org/protocol.html#The_Messages_Metadata>`_
* `FindCoordinator <https://kafka.apache.org/protocol.html#The_Messages_FindCoordinator>`_
:param bytes request:
The bytes of a Kafka `RequestMessage`_ structure. It must have
a unique (to this connection) correlation ID.
:returns: API response message for *request*
:rtype: Deferred[bytes]
:raises:
- `KafkaUnavailableError` when making the request of all known hosts
has failed.
- `twisted.internet.defer.TimeoutError` when connecting or making
a request exceeds the timeout.
"""
hostports = list(self._bootstrap_hosts)
random.shuffle(hostports)
for host, port in hostports:
ep = self._endpoint_factory(self.reactor, host, port)
try:
protocol = yield ep.connect(_bootstrapFactory)
except Exception as e:
log.debug("%s: bootstrap connect to %s:%s -> %s", self, host, port, e)
continue
try:
response = yield protocol.request(request).addTimeout(self.timeout, self.reactor)
except Exception:
log.debug("%s: bootstrap request to %s:%s failed", self, host, port, exc_info=True)
else:
returnValue(response)
finally:
protocol.transport.loseConnection()
raise KafkaUnavailableError("Failed to bootstrap from hosts {}".format(hostports)) | python | def _send_bootstrap_request(self, request):
"""Make a request using an ephemeral broker connection
This routine is used to make broker-unaware requests to get the initial
cluster metadata. It cycles through the configured hosts, trying to
connect and send the request to each in turn. This temporary connection
is closed once a response is received.
Note that most Kafka APIs require requests be sent to a specific
broker. This method will only function for broker-agnostic requests
like:
* `Metadata <https://kafka.apache.org/protocol.html#The_Messages_Metadata>`_
* `FindCoordinator <https://kafka.apache.org/protocol.html#The_Messages_FindCoordinator>`_
:param bytes request:
The bytes of a Kafka `RequestMessage`_ structure. It must have
a unique (to this connection) correlation ID.
:returns: API response message for *request*
:rtype: Deferred[bytes]
:raises:
- `KafkaUnavailableError` when making the request of all known hosts
has failed.
- `twisted.internet.defer.TimeoutError` when connecting or making
a request exceeds the timeout.
"""
hostports = list(self._bootstrap_hosts)
random.shuffle(hostports)
for host, port in hostports:
ep = self._endpoint_factory(self.reactor, host, port)
try:
protocol = yield ep.connect(_bootstrapFactory)
except Exception as e:
log.debug("%s: bootstrap connect to %s:%s -> %s", self, host, port, e)
continue
try:
response = yield protocol.request(request).addTimeout(self.timeout, self.reactor)
except Exception:
log.debug("%s: bootstrap request to %s:%s failed", self, host, port, exc_info=True)
else:
returnValue(response)
finally:
protocol.transport.loseConnection()
raise KafkaUnavailableError("Failed to bootstrap from hosts {}".format(hostports)) | [
"def",
"_send_bootstrap_request",
"(",
"self",
",",
"request",
")",
":",
"hostports",
"=",
"list",
"(",
"self",
".",
"_bootstrap_hosts",
")",
"random",
".",
"shuffle",
"(",
"hostports",
")",
"for",
"host",
",",
"port",
"in",
"hostports",
":",
"ep",
"=",
"self",
".",
"_endpoint_factory",
"(",
"self",
".",
"reactor",
",",
"host",
",",
"port",
")",
"try",
":",
"protocol",
"=",
"yield",
"ep",
".",
"connect",
"(",
"_bootstrapFactory",
")",
"except",
"Exception",
"as",
"e",
":",
"log",
".",
"debug",
"(",
"\"%s: bootstrap connect to %s:%s -> %s\"",
",",
"self",
",",
"host",
",",
"port",
",",
"e",
")",
"continue",
"try",
":",
"response",
"=",
"yield",
"protocol",
".",
"request",
"(",
"request",
")",
".",
"addTimeout",
"(",
"self",
".",
"timeout",
",",
"self",
".",
"reactor",
")",
"except",
"Exception",
":",
"log",
".",
"debug",
"(",
"\"%s: bootstrap request to %s:%s failed\"",
",",
"self",
",",
"host",
",",
"port",
",",
"exc_info",
"=",
"True",
")",
"else",
":",
"returnValue",
"(",
"response",
")",
"finally",
":",
"protocol",
".",
"transport",
".",
"loseConnection",
"(",
")",
"raise",
"KafkaUnavailableError",
"(",
"\"Failed to bootstrap from hosts {}\"",
".",
"format",
"(",
"hostports",
")",
")"
] | Make a request using an ephemeral broker connection
This routine is used to make broker-unaware requests to get the initial
cluster metadata. It cycles through the configured hosts, trying to
connect and send the request to each in turn. This temporary connection
is closed once a response is received.
Note that most Kafka APIs require requests be sent to a specific
broker. This method will only function for broker-agnostic requests
like:
* `Metadata <https://kafka.apache.org/protocol.html#The_Messages_Metadata>`_
* `FindCoordinator <https://kafka.apache.org/protocol.html#The_Messages_FindCoordinator>`_
:param bytes request:
The bytes of a Kafka `RequestMessage`_ structure. It must have
a unique (to this connection) correlation ID.
:returns: API response message for *request*
:rtype: Deferred[bytes]
:raises:
- `KafkaUnavailableError` when making the request of all known hosts
has failed.
- `twisted.internet.defer.TimeoutError` when connecting or making
a request exceeds the timeout. | [
"Make",
"a",
"request",
"using",
"an",
"ephemeral",
"broker",
"connection"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L900-L947 | train | Send a request to all configured hosts and return the response. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2O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Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\157' + '\067' + chr(0b100010 + 0o16), 0b1000), nzTpIcepk0o8('\x30' + chr(8519 - 8408) + '\063' + chr(0b1011 + 0o46) + chr(1815 - 1766), 0b1000), nzTpIcepk0o8('\060' + chr(0b1000111 + 0o50) + '\062' + '\x31', 34446 - 34438), nzTpIcepk0o8(chr(131 - 83) + chr(0b1101111) + chr(55) + '\062', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010101 + 0o32) + '\061' + chr(53) + chr(749 - 697), ord("\x08")), nzTpIcepk0o8('\060' + chr(11229 - 11118) + chr(0b101110 + 0o3) + '\063' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(988 - 940) + chr(0b1111 + 0o140) + chr(0b110001) + '\x35' + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101001 + 0o11) + '\065' + chr(483 - 434), 5775 - 5767), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(339 - 288) + chr(52) + chr(0b101000 + 0o15), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b100111 + 0o14) + chr(0b10 + 0o61) + chr(1927 - 1878), ord("\x08")), nzTpIcepk0o8(chr(1231 - 1183) + '\x6f' + chr(622 - 571) + chr(52) + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(0b1111 + 0o42), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + chr(0b110010) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b1101111) + '\061' + chr(1263 - 1214), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2028 - 1977) + '\x35' + '\066', 800 - 792), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(51) + '\x34', 0o10), nzTpIcepk0o8(chr(1154 - 1106) + '\157' + chr(0b110001) + chr(143 - 92) + '\x33', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(50) + '\x31' + chr(0b1100 + 0o44), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1001 + 0o50) + chr(347 - 299) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + '\065', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(0b110111) + chr(0b1001 + 0o53), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(564 - 514) + '\x36' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(1246 - 1198) + chr(2914 - 2803) + '\x32' + chr(0b110110) + chr(50), 0o10), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + '\x31' + chr(1210 - 1161), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(50) + '\066', 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(8739 - 8628) + chr(2532 - 2479) + chr(2325 - 2275), 0o10), nzTpIcepk0o8('\060' + chr(2666 - 2555) + chr(0b1000 + 0o51) + chr(0b11100 + 0o30) + chr(938 - 887), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + chr(441 - 387), 0b1000), nzTpIcepk0o8(chr(1183 - 1135) + chr(0b110 + 0o151) + '\x33' + chr(1396 - 1346) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1184 - 1133) + chr(0b110011), 56757 - 56749), nzTpIcepk0o8(chr(48) + chr(0b110100 + 0o73) + chr(49) + chr(52) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b100 + 0o153) + chr(2173 - 2124) + chr(0b10100 + 0o41) + chr(48), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(0b10010 + 0o41) + chr(53), 63201 - 63193), nzTpIcepk0o8(chr(0b110000) + chr(435 - 324) + chr(50) + '\066' + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101010 + 0o5) + '\x32' + chr(0b110101) + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x33' + '\067' + chr(1931 - 1878), 0b1000), nzTpIcepk0o8(chr(596 - 548) + '\157' + '\061' + chr(1103 - 1053) + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(7706 - 7595) + chr(295 - 245) + chr(0b10110 + 0o37) + chr(0b110010), 7942 - 7934), nzTpIcepk0o8('\060' + '\x6f' + chr(279 - 229) + '\061' + chr(1562 - 1509), ord("\x08")), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\x6f' + chr(0b110001), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1548 - 1500) + chr(111) + '\065' + '\060', 38815 - 38807)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x16'), '\144' + chr(0b1100101) + chr(7727 - 7628) + '\157' + chr(0b10110 + 0o116) + chr(101))(chr(0b1000000 + 0o65) + chr(0b1000001 + 0o63) + '\x66' + '\x2d' + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def ah29bTocBelH(hXMPsSrOQzbh, fXJOkxXvZqV_):
o3CaATKww55H = H4NoA26ON7iG(hXMPsSrOQzbh._bootstrap_hosts)
roI3spqORKae(PNI8nORkWcyJ, roI3spqORKae(ES5oEprVxulp(b'K\xa1d\\\n3\x0b'), chr(100) + '\x65' + chr(0b11110 + 0o105) + '\x6f' + chr(6309 - 6209) + '\x65')('\165' + '\164' + chr(1659 - 1557) + chr(0b11 + 0o52) + chr(56)))(o3CaATKww55H)
for (UcZofMadI5hD, FKWBoSDY8Qs2) in o3CaATKww55H:
OZFngC1rcsTH = hXMPsSrOQzbh._endpoint_factory(hXMPsSrOQzbh.reactor, UcZofMadI5hD, FKWBoSDY8Qs2)
try:
Yk6NhCmIsc7f = (yield OZFngC1rcsTH.R4huMsfNyXUm(ohIc4X54g8zd))
except zfo2Sgkz3IVJ as wgf0sgcu_xPL:
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'_\x88(`U;\x01\x9f\xb0\xb4\xa1C'), chr(100) + chr(2922 - 2821) + chr(0b1100011) + chr(1917 - 1806) + chr(2139 - 2039) + chr(101))('\165' + '\x74' + chr(2319 - 2217) + chr(1899 - 1854) + chr(0b11100 + 0o34)))(roI3spqORKae(ES5oEprVxulp(b"\x1d\xba+\x1a\x0e0\x01\xdd\x96\xad\x96x$)\x8d\xb35\xe6'v\x88\x95\xc6fv\x0f\x104\xf2hAEc\x90\x8b\x8e"), chr(5165 - 5065) + chr(8810 - 8709) + chr(99) + '\157' + chr(0b11010 + 0o112) + chr(0b1100101))('\165' + chr(0b11011 + 0o131) + chr(102) + '\055' + '\x38'), hXMPsSrOQzbh, UcZofMadI5hD, FKWBoSDY8Qs2, wgf0sgcu_xPL)
continue
try:
k2zzaFDtbuhL = (yield Yk6NhCmIsc7f.request(fXJOkxXvZqV_).addTimeout(hXMPsSrOQzbh.ACACUUFQsMpr, hXMPsSrOQzbh.reactor))
except zfo2Sgkz3IVJ:
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'_\x88(`U;\x01\x9f\xb0\xb4\xa1C'), chr(2628 - 2528) + chr(101) + '\x63' + chr(2318 - 2207) + chr(100) + '\145')(chr(0b1110101) + '\x74' + '\146' + chr(0b10110 + 0o27) + chr(2490 - 2434)))(roI3spqORKae(ES5oEprVxulp(b"\x1d\xba+\x1a\x0e0\x01\xdd\x96\xad\x96x$)\x9c\xb9*\xfd'f\x88\x95\xc6fv\x0f\x104\xf2hA\x0e<\xd9\xc2\x986"), chr(0b1100100) + '\x65' + chr(99) + '\157' + chr(0b1100100) + chr(0b100111 + 0o76))(chr(0b101110 + 0o107) + '\164' + '\146' + '\055' + chr(0b111000)), hXMPsSrOQzbh, UcZofMadI5hD, FKWBoSDY8Qs2, exc_info=nzTpIcepk0o8(chr(0b110000) + chr(0b110111 + 0o70) + chr(0b101110 + 0o3), 8))
else:
wVKqxW5Umubk(k2zzaFDtbuhL)
finally:
roI3spqORKae(Yk6NhCmIsc7f.transport, roI3spqORKae(ES5oEprVxulp(b'T\xa6b_/0\x00\xc7\x80\xba\x90p;g'), chr(2824 - 2724) + chr(0b10011 + 0o122) + chr(2410 - 2311) + '\157' + chr(0b1010011 + 0o21) + chr(9411 - 9310))('\x75' + chr(12961 - 12845) + '\146' + chr(338 - 293) + chr(56)))()
raise wTFMJRWYZPF0(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'~\xa8xV\t;N\xdd\x8a\xf9\x86v;}\x9d\xa8)\xe925\x9a\xc7\xdddvB\x0c}\xa3hA\x13 '), '\x64' + chr(0b1001110 + 0o27) + chr(8169 - 8070) + chr(0b1011000 + 0o27) + chr(0b1011000 + 0o14) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(102) + chr(2007 - 1962) + '\070'), roI3spqORKae(ES5oEprVxulp(b'I\xfa"q+l\x08\xc6\xb4\x86\xa7S'), chr(0b10110 + 0o116) + chr(101) + chr(99) + chr(0b1000100 + 0o53) + chr(0b1100100) + '\145')(chr(0b1000110 + 0o57) + chr(7282 - 7166) + '\x66' + chr(0b100101 + 0o10) + chr(56)))(o3CaATKww55H)) |
ciena/afkak | afkak/client.py | KafkaClient._send_broker_aware_request | def _send_broker_aware_request(self, payloads, encoder_fn, decode_fn,
consumer_group=None):
"""
Group a list of request payloads by topic+partition and send them to
the leader broker for that partition using the supplied encode/decode
functions
Params
======
payloads: list of object-like entities with a topic and
partition attribute. payloads must be grouped by
(topic, partition) tuples.
encode_fn: a method to encode the list of payloads to a request body,
must accept client_id, correlation_id, and payloads as
keyword arguments
decode_fn: a method to decode a response body into response objects.
The response objects must be object-like and have topic
and partition attributes
consumer_group: [string], optional. Indicates the request should be
directed to the Offset Coordinator for the specified
consumer_group.
Return
======
deferred yielding a list of response objects in the same order
as the supplied payloads, or None if decode_fn is None.
Raises
======
FailedPayloadsError, LeaderUnavailableError, PartitionUnavailableError,
"""
# Calling this without payloads is nonsensical
if not payloads:
raise ValueError("Payloads parameter is empty")
# Group the requests by topic+partition
original_keys = []
payloads_by_broker = collections.defaultdict(list)
# Go through all the payloads, lookup the leader/coordinator for that
# payload's topic/partition or consumer group. If there's no
# leader/coordinator (broker), raise. For each broker, keep
# a list of the payloads to be sent to it. Also, for each payload in
# the list of payloads, make a corresponding list (original_keys) with
# the topic/partition in the same order, so we can lookup the returned
# result(s) by that topic/partition key in the set of returned results
# and return them in a list the same order the payloads were supplied
for payload in payloads:
# get leader/coordinator, depending on consumer_group
if consumer_group is None:
leader = yield self._get_leader_for_partition(
payload.topic, payload.partition)
if leader is None:
raise LeaderUnavailableError(
"Leader not available for topic %s partition %s" %
(payload.topic, payload.partition))
else:
leader = yield self._get_coordinator_for_group(consumer_group)
if leader is None:
raise ConsumerCoordinatorNotAvailableError(
"Coordinator not available for group: %s" %
(consumer_group))
payloads_by_broker[leader].append(payload)
original_keys.append((payload.topic, payload.partition))
# Accumulate the responses in a dictionary
acc = {}
# The kafka server doesn't send replies to produce requests
# with acks=0. In that case, our decode_fn will be
# None, and we need to let the brokerclient know not
# to expect a reply. makeRequest() returns a deferred
# regardless, but in the expectResponse=False case, it will
# fire as soon as the request is sent, and it can errBack()
# due to being cancelled prior to the broker being able to
# send the request.
expectResponse = decode_fn is not None
# keep a list of payloads that were failed to be sent to brokers
failed_payloads = []
# Keep track of outstanding requests in a list of deferreds
inFlight = []
# and the payloads that go along with them
payloadsList = []
# For each broker, send the list of request payloads,
for broker_meta, payloads in payloads_by_broker.items():
broker = self._get_brokerclient(broker_meta.node_id)
requestId = self._next_id()
request = encoder_fn(client_id=self._clientIdBytes,
correlation_id=requestId, payloads=payloads)
# Make the request
d = self._make_request_to_broker(broker, requestId, request,
expectResponse=expectResponse)
inFlight.append(d)
payloadsList.append(payloads)
# Wait for all the responses to come back, or the requests to fail
results = yield DeferredList(inFlight, consumeErrors=True)
# We now have a list of (succeeded, response/Failure) tuples. Check 'em
for (success, response), payloads in zip(results, payloadsList):
if not success:
# The brokerclient deferred was errback()'d:
# The send failed, or this request was cancelled (by timeout)
log.debug("%r: request:%r to broker failed: %r", self,
payloads, response)
failed_payloads.extend([(p, response) for p in payloads])
continue
if not expectResponse:
continue
# Successful request/response. Decode it and store by topic/part
for response in decode_fn(response):
acc[(response.topic, response.partition)] = response
# Order the accumulated responses by the original key order
# Note that this scheme will throw away responses which we did
# not request. See test_send_fetch_request, where the response
# includes an error, but for a topic/part we didn't request.
# Since that topic/partition isn't in original_keys, we don't pass
# it back from here and it doesn't error out.
# If any of the payloads failed, fail
responses = [acc[k] for k in original_keys if k in acc] if acc else []
if failed_payloads:
self.reset_all_metadata()
raise FailedPayloadsError(responses, failed_payloads)
returnValue(responses) | python | def _send_broker_aware_request(self, payloads, encoder_fn, decode_fn,
consumer_group=None):
"""
Group a list of request payloads by topic+partition and send them to
the leader broker for that partition using the supplied encode/decode
functions
Params
======
payloads: list of object-like entities with a topic and
partition attribute. payloads must be grouped by
(topic, partition) tuples.
encode_fn: a method to encode the list of payloads to a request body,
must accept client_id, correlation_id, and payloads as
keyword arguments
decode_fn: a method to decode a response body into response objects.
The response objects must be object-like and have topic
and partition attributes
consumer_group: [string], optional. Indicates the request should be
directed to the Offset Coordinator for the specified
consumer_group.
Return
======
deferred yielding a list of response objects in the same order
as the supplied payloads, or None if decode_fn is None.
Raises
======
FailedPayloadsError, LeaderUnavailableError, PartitionUnavailableError,
"""
# Calling this without payloads is nonsensical
if not payloads:
raise ValueError("Payloads parameter is empty")
# Group the requests by topic+partition
original_keys = []
payloads_by_broker = collections.defaultdict(list)
# Go through all the payloads, lookup the leader/coordinator for that
# payload's topic/partition or consumer group. If there's no
# leader/coordinator (broker), raise. For each broker, keep
# a list of the payloads to be sent to it. Also, for each payload in
# the list of payloads, make a corresponding list (original_keys) with
# the topic/partition in the same order, so we can lookup the returned
# result(s) by that topic/partition key in the set of returned results
# and return them in a list the same order the payloads were supplied
for payload in payloads:
# get leader/coordinator, depending on consumer_group
if consumer_group is None:
leader = yield self._get_leader_for_partition(
payload.topic, payload.partition)
if leader is None:
raise LeaderUnavailableError(
"Leader not available for topic %s partition %s" %
(payload.topic, payload.partition))
else:
leader = yield self._get_coordinator_for_group(consumer_group)
if leader is None:
raise ConsumerCoordinatorNotAvailableError(
"Coordinator not available for group: %s" %
(consumer_group))
payloads_by_broker[leader].append(payload)
original_keys.append((payload.topic, payload.partition))
# Accumulate the responses in a dictionary
acc = {}
# The kafka server doesn't send replies to produce requests
# with acks=0. In that case, our decode_fn will be
# None, and we need to let the brokerclient know not
# to expect a reply. makeRequest() returns a deferred
# regardless, but in the expectResponse=False case, it will
# fire as soon as the request is sent, and it can errBack()
# due to being cancelled prior to the broker being able to
# send the request.
expectResponse = decode_fn is not None
# keep a list of payloads that were failed to be sent to brokers
failed_payloads = []
# Keep track of outstanding requests in a list of deferreds
inFlight = []
# and the payloads that go along with them
payloadsList = []
# For each broker, send the list of request payloads,
for broker_meta, payloads in payloads_by_broker.items():
broker = self._get_brokerclient(broker_meta.node_id)
requestId = self._next_id()
request = encoder_fn(client_id=self._clientIdBytes,
correlation_id=requestId, payloads=payloads)
# Make the request
d = self._make_request_to_broker(broker, requestId, request,
expectResponse=expectResponse)
inFlight.append(d)
payloadsList.append(payloads)
# Wait for all the responses to come back, or the requests to fail
results = yield DeferredList(inFlight, consumeErrors=True)
# We now have a list of (succeeded, response/Failure) tuples. Check 'em
for (success, response), payloads in zip(results, payloadsList):
if not success:
# The brokerclient deferred was errback()'d:
# The send failed, or this request was cancelled (by timeout)
log.debug("%r: request:%r to broker failed: %r", self,
payloads, response)
failed_payloads.extend([(p, response) for p in payloads])
continue
if not expectResponse:
continue
# Successful request/response. Decode it and store by topic/part
for response in decode_fn(response):
acc[(response.topic, response.partition)] = response
# Order the accumulated responses by the original key order
# Note that this scheme will throw away responses which we did
# not request. See test_send_fetch_request, where the response
# includes an error, but for a topic/part we didn't request.
# Since that topic/partition isn't in original_keys, we don't pass
# it back from here and it doesn't error out.
# If any of the payloads failed, fail
responses = [acc[k] for k in original_keys if k in acc] if acc else []
if failed_payloads:
self.reset_all_metadata()
raise FailedPayloadsError(responses, failed_payloads)
returnValue(responses) | [
"def",
"_send_broker_aware_request",
"(",
"self",
",",
"payloads",
",",
"encoder_fn",
",",
"decode_fn",
",",
"consumer_group",
"=",
"None",
")",
":",
"# Calling this without payloads is nonsensical",
"if",
"not",
"payloads",
":",
"raise",
"ValueError",
"(",
"\"Payloads parameter is empty\"",
")",
"# Group the requests by topic+partition",
"original_keys",
"=",
"[",
"]",
"payloads_by_broker",
"=",
"collections",
".",
"defaultdict",
"(",
"list",
")",
"# Go through all the payloads, lookup the leader/coordinator for that",
"# payload's topic/partition or consumer group. If there's no",
"# leader/coordinator (broker), raise. For each broker, keep",
"# a list of the payloads to be sent to it. Also, for each payload in",
"# the list of payloads, make a corresponding list (original_keys) with",
"# the topic/partition in the same order, so we can lookup the returned",
"# result(s) by that topic/partition key in the set of returned results",
"# and return them in a list the same order the payloads were supplied",
"for",
"payload",
"in",
"payloads",
":",
"# get leader/coordinator, depending on consumer_group",
"if",
"consumer_group",
"is",
"None",
":",
"leader",
"=",
"yield",
"self",
".",
"_get_leader_for_partition",
"(",
"payload",
".",
"topic",
",",
"payload",
".",
"partition",
")",
"if",
"leader",
"is",
"None",
":",
"raise",
"LeaderUnavailableError",
"(",
"\"Leader not available for topic %s partition %s\"",
"%",
"(",
"payload",
".",
"topic",
",",
"payload",
".",
"partition",
")",
")",
"else",
":",
"leader",
"=",
"yield",
"self",
".",
"_get_coordinator_for_group",
"(",
"consumer_group",
")",
"if",
"leader",
"is",
"None",
":",
"raise",
"ConsumerCoordinatorNotAvailableError",
"(",
"\"Coordinator not available for group: %s\"",
"%",
"(",
"consumer_group",
")",
")",
"payloads_by_broker",
"[",
"leader",
"]",
".",
"append",
"(",
"payload",
")",
"original_keys",
".",
"append",
"(",
"(",
"payload",
".",
"topic",
",",
"payload",
".",
"partition",
")",
")",
"# Accumulate the responses in a dictionary",
"acc",
"=",
"{",
"}",
"# The kafka server doesn't send replies to produce requests",
"# with acks=0. In that case, our decode_fn will be",
"# None, and we need to let the brokerclient know not",
"# to expect a reply. makeRequest() returns a deferred",
"# regardless, but in the expectResponse=False case, it will",
"# fire as soon as the request is sent, and it can errBack()",
"# due to being cancelled prior to the broker being able to",
"# send the request.",
"expectResponse",
"=",
"decode_fn",
"is",
"not",
"None",
"# keep a list of payloads that were failed to be sent to brokers",
"failed_payloads",
"=",
"[",
"]",
"# Keep track of outstanding requests in a list of deferreds",
"inFlight",
"=",
"[",
"]",
"# and the payloads that go along with them",
"payloadsList",
"=",
"[",
"]",
"# For each broker, send the list of request payloads,",
"for",
"broker_meta",
",",
"payloads",
"in",
"payloads_by_broker",
".",
"items",
"(",
")",
":",
"broker",
"=",
"self",
".",
"_get_brokerclient",
"(",
"broker_meta",
".",
"node_id",
")",
"requestId",
"=",
"self",
".",
"_next_id",
"(",
")",
"request",
"=",
"encoder_fn",
"(",
"client_id",
"=",
"self",
".",
"_clientIdBytes",
",",
"correlation_id",
"=",
"requestId",
",",
"payloads",
"=",
"payloads",
")",
"# Make the request",
"d",
"=",
"self",
".",
"_make_request_to_broker",
"(",
"broker",
",",
"requestId",
",",
"request",
",",
"expectResponse",
"=",
"expectResponse",
")",
"inFlight",
".",
"append",
"(",
"d",
")",
"payloadsList",
".",
"append",
"(",
"payloads",
")",
"# Wait for all the responses to come back, or the requests to fail",
"results",
"=",
"yield",
"DeferredList",
"(",
"inFlight",
",",
"consumeErrors",
"=",
"True",
")",
"# We now have a list of (succeeded, response/Failure) tuples. Check 'em",
"for",
"(",
"success",
",",
"response",
")",
",",
"payloads",
"in",
"zip",
"(",
"results",
",",
"payloadsList",
")",
":",
"if",
"not",
"success",
":",
"# The brokerclient deferred was errback()'d:",
"# The send failed, or this request was cancelled (by timeout)",
"log",
".",
"debug",
"(",
"\"%r: request:%r to broker failed: %r\"",
",",
"self",
",",
"payloads",
",",
"response",
")",
"failed_payloads",
".",
"extend",
"(",
"[",
"(",
"p",
",",
"response",
")",
"for",
"p",
"in",
"payloads",
"]",
")",
"continue",
"if",
"not",
"expectResponse",
":",
"continue",
"# Successful request/response. Decode it and store by topic/part",
"for",
"response",
"in",
"decode_fn",
"(",
"response",
")",
":",
"acc",
"[",
"(",
"response",
".",
"topic",
",",
"response",
".",
"partition",
")",
"]",
"=",
"response",
"# Order the accumulated responses by the original key order",
"# Note that this scheme will throw away responses which we did",
"# not request. See test_send_fetch_request, where the response",
"# includes an error, but for a topic/part we didn't request.",
"# Since that topic/partition isn't in original_keys, we don't pass",
"# it back from here and it doesn't error out.",
"# If any of the payloads failed, fail",
"responses",
"=",
"[",
"acc",
"[",
"k",
"]",
"for",
"k",
"in",
"original_keys",
"if",
"k",
"in",
"acc",
"]",
"if",
"acc",
"else",
"[",
"]",
"if",
"failed_payloads",
":",
"self",
".",
"reset_all_metadata",
"(",
")",
"raise",
"FailedPayloadsError",
"(",
"responses",
",",
"failed_payloads",
")",
"returnValue",
"(",
"responses",
")"
] | Group a list of request payloads by topic+partition and send them to
the leader broker for that partition using the supplied encode/decode
functions
Params
======
payloads: list of object-like entities with a topic and
partition attribute. payloads must be grouped by
(topic, partition) tuples.
encode_fn: a method to encode the list of payloads to a request body,
must accept client_id, correlation_id, and payloads as
keyword arguments
decode_fn: a method to decode a response body into response objects.
The response objects must be object-like and have topic
and partition attributes
consumer_group: [string], optional. Indicates the request should be
directed to the Offset Coordinator for the specified
consumer_group.
Return
======
deferred yielding a list of response objects in the same order
as the supplied payloads, or None if decode_fn is None.
Raises
======
FailedPayloadsError, LeaderUnavailableError, PartitionUnavailableError, | [
"Group",
"a",
"list",
"of",
"request",
"payloads",
"by",
"topic",
"+",
"partition",
"and",
"send",
"them",
"to",
"the",
"leader",
"broker",
"for",
"that",
"partition",
"using",
"the",
"supplied",
"encode",
"/",
"decode",
"functions"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/client.py#L950-L1080 | train | Send a request to the broker for the specified topic + partition. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st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dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b11111 + 0o21) + '\157' + chr(0b110110) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + chr(1266 - 1215) + chr(0b11000 + 0o30) + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(0b110111) + '\x30', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b0 + 0o63) + chr(352 - 298) + chr(48), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + chr(0b100101 + 0o14) + chr(54), 0b1000), nzTpIcepk0o8(chr(478 - 430) + '\157' + '\062' + chr(0b101 + 0o60) + chr(0b110000), 22387 - 22379), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(374 - 326) + '\x6f' + chr(947 - 897) + chr(1476 - 1425) + '\061', 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\x6f' + chr(0b110001) + '\064' + chr(51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + '\062' + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + '\063' + chr(2002 - 1954), 0b1000), nzTpIcepk0o8('\060' + chr(0b1000111 + 0o50) + chr(0b110101) + chr(0b110101 + 0o0), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + chr(354 - 300), 17678 - 17670), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101 + 0o54) + '\x37' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + '\x33' + chr(0b110111) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(0b101011 + 0o6) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + '\x36' + chr(0b100000 + 0o25), 0o10), nzTpIcepk0o8(chr(1697 - 1649) + chr(1264 - 1153) + chr(0b110010) + '\x31' + chr(54), 8), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b1001111 + 0o40) + '\x36' + '\x37', 10981 - 10973), nzTpIcepk0o8(chr(1574 - 1526) + '\157' + chr(0b1001 + 0o50) + chr(0b110100) + '\066', 0o10), nzTpIcepk0o8('\x30' + chr(1951 - 1840) + '\x32' + '\063' + chr(1047 - 992), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + '\x30' + chr(1643 - 1594), 24117 - 24109), nzTpIcepk0o8(chr(0b110000) + chr(8982 - 8871) + chr(50) + chr(2256 - 2205) + '\065', 0b1000), nzTpIcepk0o8(chr(48) + chr(4750 - 4639) + '\063' + chr(48) + '\x33', 39950 - 39942), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101100 + 0o6) + '\x30' + chr(1372 - 1319), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b10010 + 0o41) + chr(0b110100) + chr(0b110001), 32617 - 32609), nzTpIcepk0o8('\x30' + '\157' + chr(0b110101 + 0o0) + '\061', 0o10), nzTpIcepk0o8('\x30' + chr(4838 - 4727) + '\x31' + chr(55) + chr(0b10000 + 0o40), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1173 - 1122) + '\061' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11000 + 0o32) + chr(0b11101 + 0o24) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11100 + 0o27) + chr(0b10 + 0o62), 42125 - 42117), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(0b110111) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + chr(48) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(0b110011) + '\x37', 8), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + '\x33' + chr(53) + chr(49), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100111 + 0o14) + chr(0b10101 + 0o35) + chr(48), 0o10), nzTpIcepk0o8(chr(48) + chr(9611 - 9500) + chr(0b1 + 0o60) + chr(50) + '\x37', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(179 - 128) + chr(0b11011 + 0o27) + '\x30', 8), nzTpIcepk0o8('\x30' + chr(5649 - 5538) + chr(0b110001) + chr(0b110011) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b111 + 0o53) + chr(55) + '\x33', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1000110 + 0o51) + chr(0b10 + 0o63) + chr(0b110000), 6667 - 6659)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1e'), '\144' + '\x65' + chr(99) + '\157' + chr(2404 - 2304) + chr(101))(chr(4339 - 4222) + chr(0b1010010 + 0o42) + '\146' + chr(0b101101) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def gH0lqhdYyldW(hXMPsSrOQzbh, hu1hynoeGawF, FBogZYxrWpIR, HLHobuo2bFRQ, ZkSgBEVcLeGM=None):
if not hu1hynoeGawF:
raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'`\xa5\x01\x9c\xe1\xc9j\xeaC 9_w\x16\x9d\xbfP\xfc\x17\x0f\xec\xa1\xf8\xae\xf5\x95P'), chr(100) + chr(7298 - 7197) + chr(99) + chr(0b1101111) + chr(100) + '\x65')('\x75' + chr(116) + chr(102) + '\x2d' + chr(323 - 267)))
uvJ4I38F9qqF = []
Qv0RoODjNpE6 = VmGquQq8pzNa.defaultdict(H4NoA26ON7iG)
for pkzlytqkFfcV in hu1hynoeGawF:
if ZkSgBEVcLeGM is None:
UmkVyH7qDkwz = (yield hXMPsSrOQzbh._get_leader_for_partition(pkzlytqkFfcV.eddDFOEFy2dH, pkzlytqkFfcV.y6tm5LzgZc_E))
if UmkVyH7qDkwz is None:
raise W6DPxIJk7XKa(roI3spqORKae(ES5oEprVxulp(b'|\xa1\x19\x94\xeb\xda.\xf7\x0c$xL`\x1a\x91\xa7T\xec[\x03\xbf\xe7\xf2\xb1\xa5\x95F\x08\xa1\xe8<X4\xbf\x99\xb1%\xa40\xcfY\xab\x16\xd0\xab\xdb'), '\144' + '\145' + chr(99) + chr(0b1101111) + '\x64' + '\x65')(chr(0b1 + 0o164) + chr(0b1010110 + 0o36) + chr(102) + chr(1864 - 1819) + '\070') % (roI3spqORKae(pkzlytqkFfcV, roI3spqORKae(ES5oEprVxulp(b'U\xa0\x1c\xb4\xc8\xe7K\xdf\x1ab<e'), chr(0b10100 + 0o120) + chr(101) + chr(0b101000 + 0o73) + '\x6f' + chr(3827 - 3727) + chr(101))(chr(117) + chr(116) + '\x66' + chr(0b101101) + '\x38')), roI3spqORKae(pkzlytqkFfcV, roI3spqORKae(ES5oEprVxulp(b'I\xf2\x0c\x9d\xbb\xe4t\xfe93\x07h'), chr(0b1000111 + 0o35) + chr(0b111000 + 0o55) + chr(2185 - 2086) + '\157' + chr(3409 - 3309) + chr(4013 - 3912))(chr(0b1110101) + chr(116) + '\x66' + chr(0b101101) + '\070'))))
else:
UmkVyH7qDkwz = (yield hXMPsSrOQzbh._get_coordinator_for_group(ZkSgBEVcLeGM))
if UmkVyH7qDkwz is None:
raise c4UsF0BfB90y(roI3spqORKae(ES5oEprVxulp(b's\xab\x17\x82\xea\xc1`\xf8\x17?*\rx\x14\x8c\xebT\xf8V\x0f\xf3\xe0\xff\xaf\xe0\xc1O\x17\xba\xab{\x0f(\xea\x99\xeaw\xf5*'), chr(0b1111 + 0o125) + chr(9422 - 9321) + '\x63' + '\x6f' + chr(100) + '\145')(chr(117) + chr(0b1110100) + '\146' + chr(0b101101) + chr(0b1000 + 0o60)) % ZkSgBEVcLeGM)
roI3spqORKae(Qv0RoODjNpE6[UmkVyH7qDkwz], roI3spqORKae(ES5oEprVxulp(b'x\x90+\xc4\xf6\xcfI\xf6\t?\r\x18'), '\144' + '\x65' + '\143' + '\157' + '\x64' + chr(0b10 + 0o143))('\165' + chr(0b100101 + 0o117) + '\x66' + chr(45) + chr(0b111000)))(pkzlytqkFfcV)
roI3spqORKae(uvJ4I38F9qqF, roI3spqORKae(ES5oEprVxulp(b'x\x90+\xc4\xf6\xcfI\xf6\t?\r\x18'), '\144' + chr(444 - 343) + '\143' + chr(9230 - 9119) + '\144' + chr(0b1100101))('\x75' + chr(116) + '\x66' + chr(0b11 + 0o52) + chr(0b1011 + 0o55)))((roI3spqORKae(pkzlytqkFfcV, roI3spqORKae(ES5oEprVxulp(b'U\xa0\x1c\xb4\xc8\xe7K\xdf\x1ab<e'), chr(0b1100100) + chr(6798 - 6697) + chr(99) + '\157' + chr(100) + chr(0b100100 + 0o101))('\x75' + chr(0b1101100 + 0o10) + chr(2882 - 2780) + chr(45) + chr(56))), roI3spqORKae(pkzlytqkFfcV, roI3spqORKae(ES5oEprVxulp(b'I\xf2\x0c\x9d\xbb\xe4t\xfe93\x07h'), chr(100) + '\145' + chr(0b1011110 + 0o5) + '\157' + chr(100) + chr(7462 - 7361))('\x75' + chr(10567 - 10451) + chr(102) + '\x2d' + chr(56)))))
y112rWHAKA4R = {}
zjqsTLZbYv6f = HLHobuo2bFRQ is not None
GFc3iRuZK5aF = []
jK8gQSiJAZ3M = []
Ni8LAV8XMk27 = []
for (DYRxi33ZH9pD, hu1hynoeGawF) in roI3spqORKae(Qv0RoODjNpE6, roI3spqORKae(ES5oEprVxulp(b'i\x9b\x16\xbe\xcb\xd2F\xadP&\x00D'), chr(4995 - 4895) + chr(7007 - 6906) + chr(0b111110 + 0o45) + '\157' + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(116) + '\x66' + chr(771 - 726) + chr(0b110001 + 0o7)))():
MaZ29Q4rLmvP = hXMPsSrOQzbh._get_brokerclient(DYRxi33ZH9pD.l4ejMdXa7Niq)
lV7fd2Cq53hp = hXMPsSrOQzbh.beTrlthJqgCw()
fXJOkxXvZqV_ = FBogZYxrWpIR(client_id=hXMPsSrOQzbh._clientIdBytes, correlation_id=lV7fd2Cq53hp, payloads=hu1hynoeGawF)
vPPlOXQgR3SM = hXMPsSrOQzbh._make_request_to_broker(MaZ29Q4rLmvP, lV7fd2Cq53hp, fXJOkxXvZqV_, expectResponse=zjqsTLZbYv6f)
roI3spqORKae(jK8gQSiJAZ3M, roI3spqORKae(ES5oEprVxulp(b'x\x90+\xc4\xf6\xcfI\xf6\t?\r\x18'), chr(0b1100100) + '\x65' + chr(4306 - 4207) + '\157' + chr(8822 - 8722) + chr(0b1010 + 0o133))('\165' + chr(0b101110 + 0o106) + chr(102) + '\x2d' + '\070'))(vPPlOXQgR3SM)
roI3spqORKae(Ni8LAV8XMk27, roI3spqORKae(ES5oEprVxulp(b'x\x90+\xc4\xf6\xcfI\xf6\t?\r\x18'), chr(0b1011001 + 0o13) + '\145' + chr(0b1110 + 0o125) + chr(10995 - 10884) + chr(0b1110 + 0o126) + chr(0b1100101))(chr(0b1110101) + chr(0b1001110 + 0o46) + chr(0b101001 + 0o75) + chr(45) + chr(0b110111 + 0o1)))(hu1hynoeGawF)
v3B6eeO_B_ws = (yield haqhkdLPHTak(jK8gQSiJAZ3M, consumeErrors=nzTpIcepk0o8(chr(963 - 915) + chr(0b101 + 0o152) + chr(49), 0b1000)))
for ((Eve7WKj3GZpi, k2zzaFDtbuhL), hu1hynoeGawF) in TxMFWa_Xzviv(v3B6eeO_B_ws, Ni8LAV8XMk27):
if not Eve7WKj3GZpi:
roI3spqORKae(lmiGj7TonZgV, roI3spqORKae(ES5oEprVxulp(b'W\x85A\xaa\xb7\xcca\xaf6=\x1dw'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b111011 + 0o64) + chr(0b1011000 + 0o14) + chr(1250 - 1149))(chr(0b1 + 0o164) + chr(116) + chr(0b1100110) + '\x2d' + chr(0b11010 + 0o36)))(roI3spqORKae(ES5oEprVxulp(b'\x15\xb6B\xd0\xfc\xcd\x7f\xec\x06#,\x173\t\xd8\xbfZ\xaeU\x14\xf0\xea\xf8\xb1\xa5\x87H\x11\xa4\xeexGg\xba\x9b'), chr(4929 - 4829) + '\x65' + chr(8240 - 8141) + chr(0b100 + 0o153) + chr(0b1010101 + 0o17) + chr(0b11010 + 0o113))('\165' + chr(0b1110100) + chr(102) + '\x2d' + chr(456 - 400)), hXMPsSrOQzbh, hu1hynoeGawF, k2zzaFDtbuhL)
roI3spqORKae(GFc3iRuZK5aF, roI3spqORKae(ES5oEprVxulp(b'd\x9bK\xbd\xe1\xccB\xce<\x12:\\'), '\144' + '\145' + chr(99) + chr(0b110001 + 0o76) + chr(0b1100100) + chr(0b1100101))(chr(0b1000001 + 0o64) + '\x74' + '\x66' + chr(0b11110 + 0o17) + chr(2903 - 2847)))([(fSdw5wwLo9MO, k2zzaFDtbuhL) for fSdw5wwLo9MO in hu1hynoeGawF])
continue
if not zjqsTLZbYv6f:
continue
for k2zzaFDtbuhL in HLHobuo2bFRQ(k2zzaFDtbuhL):
y112rWHAKA4R[k2zzaFDtbuhL.eddDFOEFy2dH, k2zzaFDtbuhL.y6tm5LzgZc_E] = k2zzaFDtbuhL
T0DlMOJiDjjQ = [y112rWHAKA4R[B6UAF1zReOyJ] for B6UAF1zReOyJ in uvJ4I38F9qqF if B6UAF1zReOyJ in y112rWHAKA4R] if y112rWHAKA4R else []
if GFc3iRuZK5aF:
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'B\xa1\x0b\x95\xfa\xf7o\xf5\x0f\x0f5Hb\x1a\x9c\xaaA\xef'), '\144' + chr(0b11101 + 0o110) + chr(0b110000 + 0o63) + chr(0b1011001 + 0o26) + chr(0b1100000 + 0o4) + '\145')(chr(0b111 + 0o156) + chr(0b1110100) + '\x66' + chr(1875 - 1830) + chr(56)))()
raise kiUgICR4Z6gp(T0DlMOJiDjjQ, GFc3iRuZK5aF)
wVKqxW5Umubk(T0DlMOJiDjjQ) |
Salamek/cron-descriptor | cron_descriptor/ExpressionDescriptor.py | get_description | def get_description(expression, options=None):
"""Generates a human readable string for the Cron Expression
Args:
expression: The cron expression string
options: Options to control the output description
Returns:
The cron expression description
"""
descripter = ExpressionDescriptor(expression, options)
return descripter.get_description(DescriptionTypeEnum.FULL) | python | def get_description(expression, options=None):
"""Generates a human readable string for the Cron Expression
Args:
expression: The cron expression string
options: Options to control the output description
Returns:
The cron expression description
"""
descripter = ExpressionDescriptor(expression, options)
return descripter.get_description(DescriptionTypeEnum.FULL) | [
"def",
"get_description",
"(",
"expression",
",",
"options",
"=",
"None",
")",
":",
"descripter",
"=",
"ExpressionDescriptor",
"(",
"expression",
",",
"options",
")",
"return",
"descripter",
".",
"get_description",
"(",
"DescriptionTypeEnum",
".",
"FULL",
")"
] | Generates a human readable string for the Cron Expression
Args:
expression: The cron expression string
options: Options to control the output description
Returns:
The cron expression description | [
"Generates",
"a",
"human",
"readable",
"string",
"for",
"the",
"Cron",
"Expression",
"Args",
":",
"expression",
":",
"The",
"cron",
"expression",
"string",
"options",
":",
"Options",
"to",
"control",
"the",
"output",
"description",
"Returns",
":",
"The",
"cron",
"expression",
"description"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionDescriptor.py#L605-L615 | train | Generates a human readable string for the Cron Expression
| GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg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sMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(7572 - 7461) + chr(1704 - 1649) + '\x31', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(0b110 + 0o60) + '\064', ord("\x08")), nzTpIcepk0o8(chr(321 - 273) + chr(0b1101111) + chr(432 - 382) + chr(0b1011 + 0o45) + '\x32', 0b1000), nzTpIcepk0o8(chr(614 - 566) + chr(0b110 + 0o151) + chr(51) + '\060' + chr(0b110010 + 0o0), 53274 - 53266), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(111) + '\062' + chr(0b11110 + 0o26) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(111) + '\062' + chr(638 - 587) + chr(0b11111 + 0o26), 0o10), nzTpIcepk0o8('\x30' + chr(0b11111 + 0o120) + '\x32' + '\x32' + '\x33', 6442 - 6434), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(0b110110) + chr(1280 - 1227), 30431 - 30423), nzTpIcepk0o8('\x30' + chr(10054 - 9943) + '\x31' + chr(0b110010) + chr(0b101000 + 0o12), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x35' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1001110 + 0o41) + chr(1562 - 1512) + chr(48) + chr(661 - 607), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10111 + 0o34) + '\x32' + chr(0b100101 + 0o22), 42934 - 42926), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110100) + '\060', ord("\x08")), nzTpIcepk0o8(chr(1434 - 1386) + chr(111) + chr(51) + chr(0b110001) + chr(0b10011 + 0o42), 0o10), nzTpIcepk0o8(chr(650 - 602) + '\157' + '\x32' + chr(0b1010 + 0o55) + chr(1459 - 1404), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(0b11100 + 0o24) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(3879 - 3768) + chr(0b110110) + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + '\157' + '\064' + chr(48), 8), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(0b110111) + chr(1337 - 1284), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1001010 + 0o45) + chr(0b100110 + 0o13) + chr(0b110011) + chr(51), 57027 - 57019), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101100 + 0o6) + chr(0b110100) + chr(0b11101 + 0o24), 0o10), nzTpIcepk0o8(chr(1231 - 1183) + chr(0b1101111) + '\x34' + chr(839 - 791), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + '\x34' + chr(0b11111 + 0o24), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + '\064' + '\060', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1821 - 1772) + '\063' + '\x36', 25646 - 25638), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + '\x31' + chr(0b110110), 30680 - 30672), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(0b110100) + chr(1231 - 1183), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + chr(0b110000) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(111) + chr(67 - 18) + chr(0b110101) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b110001) + '\064', ord("\x08")), nzTpIcepk0o8(chr(1722 - 1674) + chr(0b1101111) + chr(1722 - 1668), 0b1000), nzTpIcepk0o8(chr(1140 - 1092) + '\157' + chr(49) + chr(0b1111 + 0o43) + chr(1021 - 968), ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(9259 - 9148) + '\063' + chr(0b101001 + 0o15) + chr(53), 20340 - 20332), nzTpIcepk0o8(chr(48) + chr(0b11001 + 0o126) + '\x33' + chr(53) + chr(1874 - 1819), 0o10), nzTpIcepk0o8('\060' + chr(6666 - 6555) + chr(2284 - 2233) + chr(50) + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(2496 - 2445) + chr(0b100001 + 0o17), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(1243 - 1195) + '\x35', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x36' + chr(966 - 915), 0o10), nzTpIcepk0o8(chr(1516 - 1468) + chr(111) + chr(0b110 + 0o60) + '\065', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\157' + chr(53) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x17'), '\144' + chr(0b1010 + 0o133) + chr(0b110001 + 0o62) + chr(0b1001101 + 0o42) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(5329 - 5213) + chr(6465 - 6363) + chr(0b10001 + 0o34) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def ROd9B1K3KJ_g(Jni_E12Y8D3Y, gpUDAok9rMxr=None):
w6g4fs29npq3 = h0wv1tIFBF2v(Jni_E12Y8D3Y, gpUDAok9rMxr)
return roI3spqORKae(w6g4fs29npq3, roI3spqORKae(ES5oEprVxulp(b'^\x11\xf6\x9d\xc0\xf8\xe0\x16 C\xf6y\xbeO\xa3'), chr(0b1001 + 0o133) + '\145' + chr(0b100100 + 0o77) + chr(0b1101111) + chr(100) + '\145')(chr(0b100 + 0o161) + '\x74' + chr(0b1100110) + chr(0b11110 + 0o17) + '\x38'))(roI3spqORKae(A4cfUVIKLRNP, roI3spqORKae(ES5oEprVxulp(b'\x7f!\xce\x8e'), '\144' + chr(5182 - 5081) + '\x63' + '\x6f' + chr(6182 - 6082) + '\145')('\165' + '\164' + chr(0b1100110) + '\x2d' + chr(2300 - 2244)))) |
Salamek/cron-descriptor | cron_descriptor/ExpressionDescriptor.py | ExpressionDescriptor.get_description | def get_description(self, description_type=DescriptionTypeEnum.FULL):
"""Generates a human readable string for the Cron Expression
Args:
description_type: Which part(s) of the expression to describe
Returns:
The cron expression description
Raises:
Exception: if throw_exception_on_parse_error is True
"""
try:
if self._parsed is False:
parser = ExpressionParser(self._expression, self._options)
self._expression_parts = parser.parse()
self._parsed = True
choices = {
DescriptionTypeEnum.FULL: self.get_full_description,
DescriptionTypeEnum.TIMEOFDAY: self.get_time_of_day_description,
DescriptionTypeEnum.HOURS: self.get_hours_description,
DescriptionTypeEnum.MINUTES: self.get_minutes_description,
DescriptionTypeEnum.SECONDS: self.get_seconds_description,
DescriptionTypeEnum.DAYOFMONTH: self.get_day_of_month_description,
DescriptionTypeEnum.MONTH: self.get_month_description,
DescriptionTypeEnum.DAYOFWEEK: self.get_day_of_week_description,
DescriptionTypeEnum.YEAR: self.get_year_description,
}
description = choices.get(description_type, self.get_seconds_description)()
except Exception as ex:
if self._options.throw_exception_on_parse_error:
raise
else:
description = str(ex)
return description | python | def get_description(self, description_type=DescriptionTypeEnum.FULL):
"""Generates a human readable string for the Cron Expression
Args:
description_type: Which part(s) of the expression to describe
Returns:
The cron expression description
Raises:
Exception: if throw_exception_on_parse_error is True
"""
try:
if self._parsed is False:
parser = ExpressionParser(self._expression, self._options)
self._expression_parts = parser.parse()
self._parsed = True
choices = {
DescriptionTypeEnum.FULL: self.get_full_description,
DescriptionTypeEnum.TIMEOFDAY: self.get_time_of_day_description,
DescriptionTypeEnum.HOURS: self.get_hours_description,
DescriptionTypeEnum.MINUTES: self.get_minutes_description,
DescriptionTypeEnum.SECONDS: self.get_seconds_description,
DescriptionTypeEnum.DAYOFMONTH: self.get_day_of_month_description,
DescriptionTypeEnum.MONTH: self.get_month_description,
DescriptionTypeEnum.DAYOFWEEK: self.get_day_of_week_description,
DescriptionTypeEnum.YEAR: self.get_year_description,
}
description = choices.get(description_type, self.get_seconds_description)()
except Exception as ex:
if self._options.throw_exception_on_parse_error:
raise
else:
description = str(ex)
return description | [
"def",
"get_description",
"(",
"self",
",",
"description_type",
"=",
"DescriptionTypeEnum",
".",
"FULL",
")",
":",
"try",
":",
"if",
"self",
".",
"_parsed",
"is",
"False",
":",
"parser",
"=",
"ExpressionParser",
"(",
"self",
".",
"_expression",
",",
"self",
".",
"_options",
")",
"self",
".",
"_expression_parts",
"=",
"parser",
".",
"parse",
"(",
")",
"self",
".",
"_parsed",
"=",
"True",
"choices",
"=",
"{",
"DescriptionTypeEnum",
".",
"FULL",
":",
"self",
".",
"get_full_description",
",",
"DescriptionTypeEnum",
".",
"TIMEOFDAY",
":",
"self",
".",
"get_time_of_day_description",
",",
"DescriptionTypeEnum",
".",
"HOURS",
":",
"self",
".",
"get_hours_description",
",",
"DescriptionTypeEnum",
".",
"MINUTES",
":",
"self",
".",
"get_minutes_description",
",",
"DescriptionTypeEnum",
".",
"SECONDS",
":",
"self",
".",
"get_seconds_description",
",",
"DescriptionTypeEnum",
".",
"DAYOFMONTH",
":",
"self",
".",
"get_day_of_month_description",
",",
"DescriptionTypeEnum",
".",
"MONTH",
":",
"self",
".",
"get_month_description",
",",
"DescriptionTypeEnum",
".",
"DAYOFWEEK",
":",
"self",
".",
"get_day_of_week_description",
",",
"DescriptionTypeEnum",
".",
"YEAR",
":",
"self",
".",
"get_year_description",
",",
"}",
"description",
"=",
"choices",
".",
"get",
"(",
"description_type",
",",
"self",
".",
"get_seconds_description",
")",
"(",
")",
"except",
"Exception",
"as",
"ex",
":",
"if",
"self",
".",
"_options",
".",
"throw_exception_on_parse_error",
":",
"raise",
"else",
":",
"description",
"=",
"str",
"(",
"ex",
")",
"return",
"description"
] | Generates a human readable string for the Cron Expression
Args:
description_type: Which part(s) of the expression to describe
Returns:
The cron expression description
Raises:
Exception: if throw_exception_on_parse_error is True | [
"Generates",
"a",
"human",
"readable",
"string",
"for",
"the",
"Cron",
"Expression"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionDescriptor.py#L76-L112 | train | Generates a human readable string for the Cron Expression | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,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3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(111) + chr(474 - 425) + '\x37' + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\157' + chr(55 - 4) + chr(51) + chr(2252 - 2200), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + '\065' + '\x33', 0b1000), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(11762 - 11651) + chr(0b10110 + 0o34) + chr(2231 - 2181) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + '\x30' + '\064', 25986 - 25978), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1010110 + 0o31) + chr(49) + '\x31' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(0b110011) + '\x35' + chr(54), 52761 - 52753), nzTpIcepk0o8(chr(0b110000) + chr(3673 - 3562) + '\065' + chr(0b100001 + 0o24), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + '\x36' + chr(0b110001), 15711 - 15703), nzTpIcepk0o8(chr(48) + chr(3055 - 2944) + chr(52) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1101111) + chr(0b110011) + chr(545 - 492) + chr(0b10101 + 0o35), 0b1000), nzTpIcepk0o8('\x30' + chr(0b11001 + 0o126) + chr(1727 - 1677) + chr(0b110001) + chr(1226 - 1174), 10459 - 10451), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(0b110111) + chr(2310 - 2256), 17889 - 17881), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b100101 + 0o112) + chr(2408 - 2355) + chr(743 - 695), 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101111) + chr(49) + chr(48) + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100011 + 0o17) + chr(1479 - 1427) + chr(1897 - 1849), 42533 - 42525), nzTpIcepk0o8(chr(1349 - 1301) + chr(111) + chr(0b110 + 0o55) + chr(1230 - 1180) + chr(49), 26938 - 26930), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010 + 0o4) + '\066', 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(0b110010) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(960 - 912) + chr(0b100 + 0o153) + chr(0b1111 + 0o43) + '\067' + '\067', 0b1000), nzTpIcepk0o8(chr(1015 - 967) + chr(0b110110 + 0o71) + chr(1734 - 1683) + chr(0b110100) + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b11101 + 0o31) + '\x31', 8), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + chr(0b110110) + chr(0b100000 + 0o27), 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b110111 + 0o70) + chr(0b1110 + 0o43) + '\x35' + '\063', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1193 - 1143) + chr(50) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + chr(53) + chr(623 - 572), 42088 - 42080), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + '\060' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(241 - 193) + chr(111) + '\061' + chr(0b11 + 0o57) + chr(0b11111 + 0o22), 0o10), nzTpIcepk0o8('\060' + chr(0b1000100 + 0o53) + chr(50) + '\x35' + chr(1528 - 1479), 26261 - 26253), nzTpIcepk0o8(chr(843 - 795) + chr(0b1101111) + '\063' + '\067', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + '\063' + chr(510 - 457), ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + chr(0b110011) + chr(0b110100) + '\067', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + '\066' + '\x32', 0b1000), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1101111) + chr(776 - 727) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(0b110001) + '\x30', 17489 - 17481), nzTpIcepk0o8('\x30' + chr(8844 - 8733) + chr(0b100001 + 0o20) + '\x34' + chr(52), 0b1000), nzTpIcepk0o8(chr(823 - 775) + chr(0b1101111) + chr(0b110001) + chr(0b110011) + chr(722 - 673), 0o10), nzTpIcepk0o8(chr(2205 - 2157) + chr(0b1101111) + '\062' + chr(50) + chr(2035 - 1980), ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + '\x32' + chr(1960 - 1911) + '\061', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\157' + '\065' + chr(0b1011 + 0o45), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'R'), '\x64' + '\145' + chr(99) + chr(0b1101111) + '\144' + chr(101))(chr(0b1001100 + 0o51) + '\164' + chr(0b100 + 0o142) + chr(0b101101) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def ROd9B1K3KJ_g(hXMPsSrOQzbh, KX9z6xvfBGCD=roI3spqORKae(A4cfUVIKLRNP, roI3spqORKae(ES5oEprVxulp(b':\x89\xa7\xda'), chr(100) + chr(0b1100101 + 0o0) + chr(0b1100011) + '\x6f' + chr(6316 - 6216) + '\x65')(chr(0b1001100 + 0o51) + chr(0b1110100) + chr(0b110110 + 0o60) + chr(45) + chr(1624 - 1568)))):
try:
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x04\xe9\x81\xceA%\x07\x96`\xa4l\xad'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(0b0 + 0o157) + chr(0b1011011 + 0o11) + '\145')(chr(117) + chr(10335 - 10219) + chr(102) + chr(547 - 502) + '\x38')) is nzTpIcepk0o8(chr(1364 - 1316) + chr(0b1100000 + 0o17) + chr(48), 0o10):
ELQLGvoVr2Z_ = oJhZ3OV3BSs6(hXMPsSrOQzbh._expression, hXMPsSrOQzbh.gvhDfxOuF6n9)
hXMPsSrOQzbh.fKoKePOJExt6 = ELQLGvoVr2Z_.zgDfHOdKcvCW()
hXMPsSrOQzbh.x5jXPaNxMUMG = nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001), 0o10)
asdO8lLbsxE9 = {A4cfUVIKLRNP.FULL: hXMPsSrOQzbh.get_full_description, A4cfUVIKLRNP.TIMEOFDAY: hXMPsSrOQzbh.get_time_of_day_description, A4cfUVIKLRNP.HOURS: hXMPsSrOQzbh.get_hours_description, A4cfUVIKLRNP.MINUTES: hXMPsSrOQzbh.get_minutes_description, A4cfUVIKLRNP.SECONDS: hXMPsSrOQzbh.get_seconds_description, A4cfUVIKLRNP.DAYOFMONTH: hXMPsSrOQzbh.get_day_of_month_description, A4cfUVIKLRNP.MONTH: hXMPsSrOQzbh.get_month_description, A4cfUVIKLRNP.DAYOFWEEK: hXMPsSrOQzbh.get_day_of_week_description, A4cfUVIKLRNP.YEAR: hXMPsSrOQzbh.get_year_description}
HPRlMhFQZATD = asdO8lLbsxE9.GUKetu4xaGsJ(KX9z6xvfBGCD, hXMPsSrOQzbh.get_seconds_description)()
except zfo2Sgkz3IVJ as dclkBu6Bdnnh:
if roI3spqORKae(hXMPsSrOQzbh._options, roI3spqORKae(ES5oEprVxulp(b'\x08\xb4\x99\xf9f\x1b,\x96N\x94Q\x9e\xe5\x11F\x18\xcf\xbfi \xde\x91\x82\xd24\xf6\xd91>\xdb'), chr(9827 - 9727) + '\x65' + '\143' + chr(0b1101111) + '\x64' + chr(101))('\165' + chr(0b11101 + 0o127) + chr(102) + '\x2d' + chr(0b111000))):
raise
else:
HPRlMhFQZATD = N9zlRy29S1SS(dclkBu6Bdnnh)
return HPRlMhFQZATD |
Salamek/cron-descriptor | cron_descriptor/ExpressionDescriptor.py | ExpressionDescriptor.get_full_description | def get_full_description(self):
"""Generates the FULL description
Returns:
The FULL description
Raises:
FormatException: if formating fails and throw_exception_on_parse_error is True
"""
try:
time_segment = self.get_time_of_day_description()
day_of_month_desc = self.get_day_of_month_description()
month_desc = self.get_month_description()
day_of_week_desc = self.get_day_of_week_description()
year_desc = self.get_year_description()
description = "{0}{1}{2}{3}{4}".format(
time_segment,
day_of_month_desc,
day_of_week_desc,
month_desc,
year_desc)
description = self.transform_verbosity(
description, self._options.verbose)
description = self.transform_case(
description,
self._options.casing_type)
except Exception:
description = _(
"An error occured when generating the expression description. Check the cron expression syntax.")
if self._options.throw_exception_on_parse_error:
raise FormatException(description)
return description | python | def get_full_description(self):
"""Generates the FULL description
Returns:
The FULL description
Raises:
FormatException: if formating fails and throw_exception_on_parse_error is True
"""
try:
time_segment = self.get_time_of_day_description()
day_of_month_desc = self.get_day_of_month_description()
month_desc = self.get_month_description()
day_of_week_desc = self.get_day_of_week_description()
year_desc = self.get_year_description()
description = "{0}{1}{2}{3}{4}".format(
time_segment,
day_of_month_desc,
day_of_week_desc,
month_desc,
year_desc)
description = self.transform_verbosity(
description, self._options.verbose)
description = self.transform_case(
description,
self._options.casing_type)
except Exception:
description = _(
"An error occured when generating the expression description. Check the cron expression syntax.")
if self._options.throw_exception_on_parse_error:
raise FormatException(description)
return description | [
"def",
"get_full_description",
"(",
"self",
")",
":",
"try",
":",
"time_segment",
"=",
"self",
".",
"get_time_of_day_description",
"(",
")",
"day_of_month_desc",
"=",
"self",
".",
"get_day_of_month_description",
"(",
")",
"month_desc",
"=",
"self",
".",
"get_month_description",
"(",
")",
"day_of_week_desc",
"=",
"self",
".",
"get_day_of_week_description",
"(",
")",
"year_desc",
"=",
"self",
".",
"get_year_description",
"(",
")",
"description",
"=",
"\"{0}{1}{2}{3}{4}\"",
".",
"format",
"(",
"time_segment",
",",
"day_of_month_desc",
",",
"day_of_week_desc",
",",
"month_desc",
",",
"year_desc",
")",
"description",
"=",
"self",
".",
"transform_verbosity",
"(",
"description",
",",
"self",
".",
"_options",
".",
"verbose",
")",
"description",
"=",
"self",
".",
"transform_case",
"(",
"description",
",",
"self",
".",
"_options",
".",
"casing_type",
")",
"except",
"Exception",
":",
"description",
"=",
"_",
"(",
"\"An error occured when generating the expression description. Check the cron expression syntax.\"",
")",
"if",
"self",
".",
"_options",
".",
"throw_exception_on_parse_error",
":",
"raise",
"FormatException",
"(",
"description",
")",
"return",
"description"
] | Generates the FULL description
Returns:
The FULL description
Raises:
FormatException: if formating fails and throw_exception_on_parse_error is True | [
"Generates",
"the",
"FULL",
"description"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionDescriptor.py#L114-L149 | train | Generates the FULL description of the current entry in the cron expression | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAl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4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(681 - 628), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b1101 + 0o44) + chr(0b100 + 0o55) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b100101 + 0o112) + chr(2359 - 2309) + '\x35' + '\x34', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101101 + 0o2) + chr(49) + chr(2240 - 2191), 30925 - 30917), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(1823 - 1775) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + chr(0b111101 + 0o62) + chr(0b1101 + 0o46) + chr(0b110100) + '\x36', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + chr(0b110000) + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(51) + '\060', 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + chr(0b11001 + 0o31) + chr(48) + chr(0b10001 + 0o40), 53824 - 53816), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(0b11110 + 0o30) + '\x31', 63553 - 63545), nzTpIcepk0o8(chr(0b110000) + chr(7299 - 7188) + chr(0b110011) + chr(0b110001) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + '\065' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + chr(1067 - 1017) + chr(0b11000 + 0o34) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(1881 - 1833) + '\x6f' + chr(0b1101 + 0o46) + chr(0b110111) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b100110 + 0o111) + '\062' + chr(2150 - 2098) + chr(52), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101 + 0o142) + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(311 - 261) + '\x35' + '\064', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x34' + chr(1933 - 1885), 53657 - 53649), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(0b100011 + 0o17) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b110010) + '\066', 54079 - 54071), nzTpIcepk0o8(chr(1734 - 1686) + chr(111) + chr(0b110001) + chr(0b1000 + 0o50) + chr(0b101111 + 0o6), 0b1000), nzTpIcepk0o8(chr(218 - 170) + chr(0b1011111 + 0o20) + chr(1377 - 1327) + '\x37' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(539 - 491) + chr(0b1101111) + chr(371 - 321) + '\065' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b111100 + 0o63) + chr(0b100101 + 0o16) + '\065', 8), nzTpIcepk0o8(chr(1366 - 1318) + chr(0b1101111) + chr(0b0 + 0o61) + chr(0b110011) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\x30' + chr(988 - 877) + '\x32' + chr(0b1 + 0o64) + '\x34', 8), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101111) + '\x31' + chr(51) + chr(1661 - 1613), 8), nzTpIcepk0o8('\x30' + '\157' + chr(0b10010 + 0o40) + chr(0b100011 + 0o20) + '\062', 21140 - 21132), nzTpIcepk0o8('\x30' + chr(0b1000101 + 0o52) + chr(0b10101 + 0o34) + chr(2678 - 2625) + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(1696 - 1646) + '\065' + '\065', 8), nzTpIcepk0o8(chr(0b110000) + chr(4018 - 3907) + chr(0b110011) + chr(0b10011 + 0o44) + chr(1099 - 1050), 0o10), nzTpIcepk0o8('\x30' + chr(0b10111 + 0o130) + chr(49) + '\x35' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + '\063' + chr(0b110001) + '\064', 57191 - 57183), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + chr(0b110010) + chr(0b110001 + 0o2) + chr(0b110100), 51919 - 51911), nzTpIcepk0o8(chr(2242 - 2194) + chr(111) + '\x31' + '\065' + '\x35', 5232 - 5224), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101011 + 0o10) + chr(536 - 484) + chr(55), 8660 - 8652), nzTpIcepk0o8(chr(1583 - 1535) + chr(0b10100 + 0o133) + chr(0b110011) + '\x37', 18502 - 18494), nzTpIcepk0o8('\x30' + '\157' + chr(362 - 307) + '\061', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011011 + 0o24) + chr(50) + chr(0b110001) + '\061', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110100 + 0o1) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'3'), chr(0b1100100) + chr(0b1100101) + chr(0b110000 + 0o63) + chr(111) + chr(2011 - 1911) + chr(0b11111 + 0o106))('\165' + chr(0b110110 + 0o76) + chr(316 - 214) + '\x2d' + chr(2373 - 2317)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def iVJTy3WPCT5D(hXMPsSrOQzbh):
try:
Adozj9sUyotU = hXMPsSrOQzbh.get_time_of_day_description()
BezeHCxyIV3g = hXMPsSrOQzbh.get_day_of_month_description()
PHBYybr_K5xl = hXMPsSrOQzbh.get_month_description()
LzTXRpmLqMS0 = hXMPsSrOQzbh.get_day_of_week_description()
pEbFy27Lnq9A = hXMPsSrOQzbh.get_year_description()
HPRlMhFQZATD = roI3spqORKae(ES5oEprVxulp(b'fy\xd1rw\x9b\xbbj\xfc\n\xfe\xd5\xde\xc8\xd9'), chr(0b1100100) + '\145' + chr(0b111110 + 0o45) + '\157' + chr(0b1010100 + 0o20) + '\145')(chr(0b100000 + 0o125) + chr(6588 - 6472) + '\x66' + chr(45) + '\x38').q33KG3foQ_CJ(Adozj9sUyotU, BezeHCxyIV3g, LzTXRpmLqMS0, PHBYybr_K5xl, pEbFy27Lnq9A)
HPRlMhFQZATD = hXMPsSrOQzbh.transform_verbosity(HPRlMhFQZATD, hXMPsSrOQzbh._options.TseISVdPlfdM)
HPRlMhFQZATD = hXMPsSrOQzbh.transform_case(HPRlMhFQZATD, hXMPsSrOQzbh._options.casing_type)
except zfo2Sgkz3IVJ:
HPRlMhFQZATD = zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b"\\'\x8cl4\x94\xaf*\xa1\x1e\xae\xcb\xd0\x8e\xc1b\x8cWr\xf7\xb8e\xd9\xc8s:\xde9\xee\x03\xc3\x9eL\xb8\xf4\x08\xc7zA\xf9o,\xdfz/\x89\xaex\xe5\x14\xbe\xcb\xd7\x95\xd4r\xc5Ot\xbc\xf6e\xfd\xc5x<\xc7x\xee\x02\xc8\xd9\x0f\xbe\xf3\x03\xc7zA\xf9o,\xdfz/\x89\xaex\xf2\x08\xa3\xdc\xc4\x84\x8a"), chr(100) + chr(0b11011 + 0o112) + chr(99) + chr(0b111110 + 0o61) + chr(100) + chr(0b1010100 + 0o21))('\165' + chr(0b1010110 + 0o36) + chr(102) + '\055' + '\x38'))
if roI3spqORKae(hXMPsSrOQzbh._options, roI3spqORKae(ES5oEprVxulp(b'i!\xdef1\xb9\xa5 \xe2\x14\xbd\xdc\xcc\x93\xcaY\xc3NE\xe2\xb77\xcd\xc8B:\xde*\xf5\x18'), '\144' + '\145' + '\143' + '\x6f' + chr(100) + chr(0b1100101))('\165' + '\164' + chr(4031 - 3929) + chr(45) + chr(0b111000))):
raise mj30htt2jvhF(HPRlMhFQZATD)
return HPRlMhFQZATD |
Salamek/cron-descriptor | cron_descriptor/ExpressionDescriptor.py | ExpressionDescriptor.get_time_of_day_description | def get_time_of_day_description(self):
"""Generates a description for only the TIMEOFDAY portion of the expression
Returns:
The TIMEOFDAY description
"""
seconds_expression = self._expression_parts[0]
minute_expression = self._expression_parts[1]
hour_expression = self._expression_parts[2]
description = StringBuilder()
# handle special cases first
if any(exp in minute_expression for exp in self._special_characters) is False and \
any(exp in hour_expression for exp in self._special_characters) is False and \
any(exp in seconds_expression for exp in self._special_characters) is False:
# specific time of day (i.e. 10 14)
description.append(_("At "))
description.append(
self.format_time(
hour_expression,
minute_expression,
seconds_expression))
elif "-" in minute_expression and \
"," not in minute_expression and \
any(exp in hour_expression for exp in self._special_characters) is False:
# minute range in single hour (i.e. 0-10 11)
minute_parts = minute_expression.split('-')
description.append(_("Every minute between {0} and {1}").format(
self.format_time(hour_expression, minute_parts[0]), self.format_time(hour_expression, minute_parts[1])))
elif "," in hour_expression and "-" not in hour_expression and \
any(exp in minute_expression for exp in self._special_characters) is False:
# hours list with single minute (o.e. 30 6,14,16)
hour_parts = hour_expression.split(',')
description.append(_("At"))
for i, hour_part in enumerate(hour_parts):
description.append(" ")
description.append(
self.format_time(hour_part, minute_expression))
if i < (len(hour_parts) - 2):
description.append(",")
if i == len(hour_parts) - 2:
description.append(_(" and"))
else:
# default time description
seconds_description = self.get_seconds_description()
minutes_description = self.get_minutes_description()
hours_description = self.get_hours_description()
description.append(seconds_description)
if description:
description.append(", ")
description.append(minutes_description)
if description:
description.append(", ")
description.append(hours_description)
return str(description) | python | def get_time_of_day_description(self):
"""Generates a description for only the TIMEOFDAY portion of the expression
Returns:
The TIMEOFDAY description
"""
seconds_expression = self._expression_parts[0]
minute_expression = self._expression_parts[1]
hour_expression = self._expression_parts[2]
description = StringBuilder()
# handle special cases first
if any(exp in minute_expression for exp in self._special_characters) is False and \
any(exp in hour_expression for exp in self._special_characters) is False and \
any(exp in seconds_expression for exp in self._special_characters) is False:
# specific time of day (i.e. 10 14)
description.append(_("At "))
description.append(
self.format_time(
hour_expression,
minute_expression,
seconds_expression))
elif "-" in minute_expression and \
"," not in minute_expression and \
any(exp in hour_expression for exp in self._special_characters) is False:
# minute range in single hour (i.e. 0-10 11)
minute_parts = minute_expression.split('-')
description.append(_("Every minute between {0} and {1}").format(
self.format_time(hour_expression, minute_parts[0]), self.format_time(hour_expression, minute_parts[1])))
elif "," in hour_expression and "-" not in hour_expression and \
any(exp in minute_expression for exp in self._special_characters) is False:
# hours list with single minute (o.e. 30 6,14,16)
hour_parts = hour_expression.split(',')
description.append(_("At"))
for i, hour_part in enumerate(hour_parts):
description.append(" ")
description.append(
self.format_time(hour_part, minute_expression))
if i < (len(hour_parts) - 2):
description.append(",")
if i == len(hour_parts) - 2:
description.append(_(" and"))
else:
# default time description
seconds_description = self.get_seconds_description()
minutes_description = self.get_minutes_description()
hours_description = self.get_hours_description()
description.append(seconds_description)
if description:
description.append(", ")
description.append(minutes_description)
if description:
description.append(", ")
description.append(hours_description)
return str(description) | [
"def",
"get_time_of_day_description",
"(",
"self",
")",
":",
"seconds_expression",
"=",
"self",
".",
"_expression_parts",
"[",
"0",
"]",
"minute_expression",
"=",
"self",
".",
"_expression_parts",
"[",
"1",
"]",
"hour_expression",
"=",
"self",
".",
"_expression_parts",
"[",
"2",
"]",
"description",
"=",
"StringBuilder",
"(",
")",
"# handle special cases first",
"if",
"any",
"(",
"exp",
"in",
"minute_expression",
"for",
"exp",
"in",
"self",
".",
"_special_characters",
")",
"is",
"False",
"and",
"any",
"(",
"exp",
"in",
"hour_expression",
"for",
"exp",
"in",
"self",
".",
"_special_characters",
")",
"is",
"False",
"and",
"any",
"(",
"exp",
"in",
"seconds_expression",
"for",
"exp",
"in",
"self",
".",
"_special_characters",
")",
"is",
"False",
":",
"# specific time of day (i.e. 10 14)",
"description",
".",
"append",
"(",
"_",
"(",
"\"At \"",
")",
")",
"description",
".",
"append",
"(",
"self",
".",
"format_time",
"(",
"hour_expression",
",",
"minute_expression",
",",
"seconds_expression",
")",
")",
"elif",
"\"-\"",
"in",
"minute_expression",
"and",
"\",\"",
"not",
"in",
"minute_expression",
"and",
"any",
"(",
"exp",
"in",
"hour_expression",
"for",
"exp",
"in",
"self",
".",
"_special_characters",
")",
"is",
"False",
":",
"# minute range in single hour (i.e. 0-10 11)",
"minute_parts",
"=",
"minute_expression",
".",
"split",
"(",
"'-'",
")",
"description",
".",
"append",
"(",
"_",
"(",
"\"Every minute between {0} and {1}\"",
")",
".",
"format",
"(",
"self",
".",
"format_time",
"(",
"hour_expression",
",",
"minute_parts",
"[",
"0",
"]",
")",
",",
"self",
".",
"format_time",
"(",
"hour_expression",
",",
"minute_parts",
"[",
"1",
"]",
")",
")",
")",
"elif",
"\",\"",
"in",
"hour_expression",
"and",
"\"-\"",
"not",
"in",
"hour_expression",
"and",
"any",
"(",
"exp",
"in",
"minute_expression",
"for",
"exp",
"in",
"self",
".",
"_special_characters",
")",
"is",
"False",
":",
"# hours list with single minute (o.e. 30 6,14,16)",
"hour_parts",
"=",
"hour_expression",
".",
"split",
"(",
"','",
")",
"description",
".",
"append",
"(",
"_",
"(",
"\"At\"",
")",
")",
"for",
"i",
",",
"hour_part",
"in",
"enumerate",
"(",
"hour_parts",
")",
":",
"description",
".",
"append",
"(",
"\" \"",
")",
"description",
".",
"append",
"(",
"self",
".",
"format_time",
"(",
"hour_part",
",",
"minute_expression",
")",
")",
"if",
"i",
"<",
"(",
"len",
"(",
"hour_parts",
")",
"-",
"2",
")",
":",
"description",
".",
"append",
"(",
"\",\"",
")",
"if",
"i",
"==",
"len",
"(",
"hour_parts",
")",
"-",
"2",
":",
"description",
".",
"append",
"(",
"_",
"(",
"\" and\"",
")",
")",
"else",
":",
"# default time description",
"seconds_description",
"=",
"self",
".",
"get_seconds_description",
"(",
")",
"minutes_description",
"=",
"self",
".",
"get_minutes_description",
"(",
")",
"hours_description",
"=",
"self",
".",
"get_hours_description",
"(",
")",
"description",
".",
"append",
"(",
"seconds_description",
")",
"if",
"description",
":",
"description",
".",
"append",
"(",
"\", \"",
")",
"description",
".",
"append",
"(",
"minutes_description",
")",
"if",
"description",
":",
"description",
".",
"append",
"(",
"\", \"",
")",
"description",
".",
"append",
"(",
"hours_description",
")",
"return",
"str",
"(",
"description",
")"
] | Generates a description for only the TIMEOFDAY portion of the expression
Returns:
The TIMEOFDAY description | [
"Generates",
"a",
"description",
"for",
"only",
"the",
"TIMEOFDAY",
"portion",
"of",
"the",
"expression"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionDescriptor.py#L151-L214 | train | Generates a description for only the TIMEOFD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eP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(10005 - 9894) + chr(51) + chr(52) + '\061', 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(4089 - 3978) + chr(835 - 786) + chr(0b10110 + 0o40) + chr(1298 - 1247), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11101 + 0o25) + chr(0b110000) + '\x31', 46920 - 46912), nzTpIcepk0o8(chr(0b110000) + chr(5890 - 5779) + chr(1398 - 1349) + chr(0b101111 + 0o6) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b111 + 0o51), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + '\x31' + '\064' + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(357 - 308) + '\067', 0b1000), nzTpIcepk0o8(chr(48) + chr(1790 - 1679) + chr(0b1010 + 0o52) + chr(0b11010 + 0o33), 33757 - 33749), nzTpIcepk0o8(chr(1164 - 1116) + chr(5140 - 5029) + chr(0b10001 + 0o42) + chr(50) + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + chr(0b1100 + 0o143) + chr(0b110001) + '\x35' + chr(0b11 + 0o55), 0b1000), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(899 - 788) + chr(0b110010) + chr(0b110011) + chr(0b0 + 0o67), ord("\x08")), nzTpIcepk0o8(chr(1477 - 1429) + '\157' + chr(49) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(0b100011 + 0o21) + chr(48), 8), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(10382 - 10271) + '\x31' + chr(611 - 562) + '\061', 0b1000), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(111) + chr(0b110000 + 0o1) + '\067' + '\065', 42545 - 42537), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + '\x33' + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + '\065' + '\x37', 0b1000), nzTpIcepk0o8(chr(758 - 710) + '\x6f' + chr(0b110011) + chr(54) + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + chr(2189 - 2078) + '\x37' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101001 + 0o10) + '\067' + chr(0b110110), 57504 - 57496), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1101 + 0o46) + chr(0b110011) + chr(0b110110), 43278 - 43270), nzTpIcepk0o8(chr(0b110000) + chr(0b1011100 + 0o23) + chr(2073 - 2023) + chr(0b110000) + chr(1112 - 1063), 8), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + chr(2130 - 2081) + '\x34', 0b1000), nzTpIcepk0o8('\060' + chr(0b1010101 + 0o32) + chr(0b110010) + chr(54) + chr(1223 - 1170), ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1101111) + chr(1986 - 1937) + chr(0b10110 + 0o32) + chr(1983 - 1930), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110101) + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1000 + 0o52) + chr(0b110000) + '\x36', 13031 - 13023), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(0b101010 + 0o7), 8), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(1144 - 1091) + chr(55), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110111) + chr(0b11010 + 0o30), 2012 - 2004), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\157' + chr(0b110001) + chr(0b110100) + '\x33', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(468 - 418) + chr(1144 - 1089) + '\x33', 0o10), nzTpIcepk0o8(chr(2034 - 1986) + '\157' + chr(51) + chr(0b110010) + '\060', 0b1000), nzTpIcepk0o8('\x30' + chr(7979 - 7868) + chr(49) + '\x35' + chr(0b1111 + 0o46), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(1322 - 1274) + chr(0b110010), 497 - 489), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(53) + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + chr(11566 - 11455) + '\x32' + chr(0b1 + 0o63) + chr(0b110001), 4523 - 4515), nzTpIcepk0o8('\x30' + chr(10006 - 9895) + '\062' + chr(0b110011 + 0o2) + chr(1792 - 1738), 32664 - 32656), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(54) + chr(55), 7178 - 7170), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + '\x34' + '\063', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(548 - 500) + chr(0b101110 + 0o101) + chr(0b110101) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xcf'), chr(0b1100100) + '\x65' + chr(8019 - 7920) + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(117) + chr(0b1011001 + 0o33) + chr(0b110100 + 0o62) + chr(0b101101) + chr(1665 - 1609)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def MWvfzhu044tN(hXMPsSrOQzbh):
eemyhy_L8jxm = hXMPsSrOQzbh.fKoKePOJExt6[nzTpIcepk0o8('\060' + chr(0b110111 + 0o70) + chr(1280 - 1232), 8)]
NMFMvjEfnOj0 = hXMPsSrOQzbh.fKoKePOJExt6[nzTpIcepk0o8('\060' + chr(111) + chr(0b110001), 0o10)]
aGJchSoqkcbA = hXMPsSrOQzbh.fKoKePOJExt6[nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062', 0o10)]
HPRlMhFQZATD = FTx_aSPTJUmQ()
if VF4pKOObtlPc((r1dtBD6zLTaS in NMFMvjEfnOj0 for r1dtBD6zLTaS in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xbe\x00\xf1\x0fc\t\xaeI\x8c\x0b\xf7h\x12(\x1e\xec\n\x83K'), '\x64' + '\x65' + '\x63' + chr(111) + chr(9024 - 8924) + chr(4648 - 4547))(chr(4758 - 4641) + chr(0b1110100) + chr(9217 - 9115) + chr(91 - 46) + '\070')))) is nzTpIcepk0o8('\060' + '\157' + '\x30', 8) and VF4pKOObtlPc((r1dtBD6zLTaS in aGJchSoqkcbA for r1dtBD6zLTaS in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xbe\x00\xf1\x0fc\t\xaeI\x8c\x0b\xf7h\x12(\x1e\xec\n\x83K'), '\x64' + chr(9114 - 9013) + chr(0b1100011) + chr(111) + '\x64' + chr(2774 - 2673))('\165' + chr(0b10010 + 0o142) + chr(0b1100110) + chr(0b1001 + 0o44) + '\070')))) is nzTpIcepk0o8(chr(48) + chr(111) + '\060', 8) and (VF4pKOObtlPc((r1dtBD6zLTaS in eemyhy_L8jxm for r1dtBD6zLTaS in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xbe\x00\xf1\x0fc\t\xaeI\x8c\x0b\xf7h\x12(\x1e\xec\n\x83K'), chr(100) + chr(101) + '\143' + '\x6f' + chr(100) + chr(2457 - 2356))('\x75' + chr(0b1011 + 0o151) + chr(102) + chr(0b101101) + chr(0b100011 + 0o25))))) is nzTpIcepk0o8('\060' + '\157' + chr(1343 - 1295), 8)):
roI3spqORKae(HPRlMhFQZATD, roI3spqORKae(ES5oEprVxulp(b"\xa9'\xd2^x\x07\x88J\xb9\x07\xca<"), chr(100) + chr(0b1100101) + chr(1770 - 1671) + chr(0b1010111 + 0o30) + chr(0b1100100) + chr(0b1001010 + 0o33))(chr(10961 - 10844) + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\x38'))(zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\xa0\x07\xa1'), '\x64' + chr(0b111000 + 0o55) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101 + 0o0))('\165' + chr(0b101010 + 0o112) + chr(2914 - 2812) + chr(372 - 327) + chr(0b10110 + 0o42))))
roI3spqORKae(HPRlMhFQZATD, roI3spqORKae(ES5oEprVxulp(b"\xa9'\xd2^x\x07\x88J\xb9\x07\xca<"), '\x64' + chr(0b1010101 + 0o20) + chr(0b1100011) + '\157' + chr(3438 - 3338) + chr(0b1100101))(chr(117) + chr(116) + '\146' + chr(0b100 + 0o51) + '\x38'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x99\x06\xc2%S\x0f\xbfW\x85\r\xeen'), chr(100) + '\145' + '\143' + chr(0b110110 + 0o71) + '\x64' + chr(101))(chr(117) + chr(0b1 + 0o163) + '\x66' + '\055' + chr(2927 - 2871)))(aGJchSoqkcbA, NMFMvjEfnOj0, eemyhy_L8jxm))
elif roI3spqORKae(ES5oEprVxulp(b'\xcc'), '\x64' + chr(0b1100101) + '\143' + chr(0b1101111) + chr(5872 - 5772) + chr(0b101010 + 0o73))(chr(6732 - 6615) + chr(0b1110100) + chr(102) + chr(45) + chr(710 - 654)) in NMFMvjEfnOj0 and roI3spqORKae(ES5oEprVxulp(b'\xcd'), chr(100) + '\145' + '\143' + chr(488 - 377) + chr(0b1100100) + chr(0b100010 + 0o103))(chr(0b100001 + 0o124) + chr(0b1110100) + '\146' + chr(0b101101) + '\x38') not in NMFMvjEfnOj0 and (VF4pKOObtlPc((r1dtBD6zLTaS in aGJchSoqkcbA for r1dtBD6zLTaS in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xbe\x00\xf1\x0fc\t\xaeI\x8c\x0b\xf7h\x12(\x1e\xec\n\x83K'), '\144' + chr(0b1100101) + chr(0b1000 + 0o133) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\x74' + chr(102) + chr(0b101011 + 0o2) + '\070')))) is nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + chr(0b11010 + 0o26), 8)):
asZZgIqin4RP = NMFMvjEfnOj0.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'\xcc'), chr(0b111100 + 0o50) + '\145' + chr(0b101110 + 0o65) + chr(111) + '\144' + '\145')(chr(117) + chr(0b11100 + 0o130) + chr(10403 - 10301) + chr(523 - 478) + '\x38'))
roI3spqORKae(HPRlMhFQZATD, roI3spqORKae(ES5oEprVxulp(b"\xa9'\xd2^x\x07\x88J\xb9\x07\xca<"), '\144' + chr(0b1100101) + chr(0b1100011 + 0o0) + '\x6f' + chr(100) + '\145')(chr(0b110000 + 0o105) + '\x74' + '\146' + chr(45) + chr(56)))(roI3spqORKae(zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\xa4\x05\xe4\x18y@\xa2L\xbd\x1d\xebl@+\x18\xec\x18\x94]\x10\xfe\xfa<\xc8eJ\xe8mOAR\xc6'), '\x64' + chr(0b10100 + 0o121) + chr(4834 - 4735) + '\157' + chr(0b101001 + 0o73) + chr(9732 - 9631))(chr(0b10100 + 0o141) + '\164' + chr(102) + chr(0b11000 + 0o25) + chr(2339 - 2283))), roI3spqORKae(ES5oEprVxulp(b'\x90@\xb2!GS\xa9J\x827\xdcC'), '\x64' + chr(0b110101 + 0o60) + '\x63' + chr(0b101110 + 0o101) + chr(0b10100 + 0o120) + '\145')(chr(117) + chr(0b1011001 + 0o33) + chr(0b1100110) + '\x2d' + '\070'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x99\x06\xc2%S\x0f\xbfW\x85\r\xeen'), '\x64' + chr(0b11111 + 0o106) + chr(3304 - 3205) + '\x6f' + '\144' + chr(101))(chr(0b1001010 + 0o53) + chr(1460 - 1344) + '\146' + '\x2d' + '\x38'))(aGJchSoqkcbA, asZZgIqin4RP[nzTpIcepk0o8('\060' + chr(7205 - 7094) + chr(0b110000), 8)]), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x99\x06\xc2%S\x0f\xbfW\x85\r\xeen'), chr(100) + '\x65' + '\143' + chr(111) + chr(0b110001 + 0o63) + '\x65')('\165' + chr(7327 - 7211) + chr(0b1000 + 0o136) + chr(0b101101) + '\x38'))(aGJchSoqkcbA, asZZgIqin4RP[nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001), 8)])))
elif roI3spqORKae(ES5oEprVxulp(b'\xcd'), chr(8821 - 8721) + chr(0b1001101 + 0o30) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(116) + '\x66' + chr(45) + chr(0b1101 + 0o53)) in aGJchSoqkcbA and roI3spqORKae(ES5oEprVxulp(b'\xcc'), '\144' + chr(0b111101 + 0o50) + '\143' + '\x6f' + chr(0b1100100) + chr(1594 - 1493))(chr(0b1000100 + 0o61) + '\x74' + chr(102) + chr(45) + chr(1506 - 1450)) not in aGJchSoqkcbA and (VF4pKOObtlPc((r1dtBD6zLTaS in NMFMvjEfnOj0 for r1dtBD6zLTaS in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xbe\x00\xf1\x0fc\t\xaeI\x8c\x0b\xf7h\x12(\x1e\xec\n\x83K'), '\x64' + chr(101) + '\143' + chr(0b1101111) + chr(0b100100 + 0o100) + chr(101))('\x75' + chr(0b1011101 + 0o27) + chr(9880 - 9778) + chr(1045 - 1000) + chr(0b111000))))) is nzTpIcepk0o8(chr(48) + chr(111) + chr(1484 - 1436), 8)):
kcUPm3rq2LKm = aGJchSoqkcbA.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'\xcd'), chr(0b1100100) + chr(0b1100101) + '\143' + '\x6f' + chr(1136 - 1036) + chr(0b1100101))(chr(117) + chr(0b1010100 + 0o40) + chr(0b1100110) + chr(45) + chr(1922 - 1866)))
roI3spqORKae(HPRlMhFQZATD, roI3spqORKae(ES5oEprVxulp(b"\xa9'\xd2^x\x07\x88J\xb9\x07\xca<"), chr(7604 - 7504) + chr(101) + chr(9039 - 8940) + '\x6f' + chr(0b11 + 0o141) + '\x65')('\165' + chr(0b1110100) + chr(102) + '\055' + '\070'))(zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\xa0\x07'), chr(100) + '\x65' + chr(8116 - 8017) + chr(4338 - 4227) + '\144' + chr(0b1000 + 0o135))(chr(0b0 + 0o165) + chr(9408 - 9292) + chr(0b1100110) + chr(0b101101) + chr(0b111000))))
for (ZlbFMSG8gCoF, F8NVRt4iX7NY) in _kV_Bomx8PZ4(kcUPm3rq2LKm):
roI3spqORKae(HPRlMhFQZATD, roI3spqORKae(ES5oEprVxulp(b"\xa9'\xd2^x\x07\x88J\xb9\x07\xca<"), '\144' + '\145' + chr(0b10101 + 0o116) + '\x6f' + chr(0b1100100) + '\145')(chr(4330 - 4213) + '\164' + '\x66' + '\055' + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\xc1'), chr(1876 - 1776) + '\x65' + chr(9371 - 9272) + '\157' + chr(100) + chr(7598 - 7497))('\x75' + chr(116) + chr(8138 - 8036) + chr(0b101101) + chr(2837 - 2781)))
roI3spqORKae(HPRlMhFQZATD, roI3spqORKae(ES5oEprVxulp(b"\xa9'\xd2^x\x07\x88J\xb9\x07\xca<"), chr(343 - 243) + '\145' + chr(6873 - 6774) + chr(0b111101 + 0o62) + '\144' + chr(0b1100101))('\165' + chr(2756 - 2640) + chr(0b110001 + 0o65) + '\x2d' + chr(56)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x99\x06\xc2%S\x0f\xbfW\x85\r\xeen'), '\x64' + '\x65' + '\143' + chr(0b1101111) + chr(0b1100100) + '\x65')('\165' + chr(0b111101 + 0o67) + '\x66' + '\055' + chr(0b10001 + 0o47)))(F8NVRt4iX7NY, NMFMvjEfnOj0))
if ZlbFMSG8gCoF < ftfygxgFas5X(kcUPm3rq2LKm) - nzTpIcepk0o8('\x30' + chr(9542 - 9431) + chr(0b101010 + 0o10), 8):
roI3spqORKae(HPRlMhFQZATD, roI3spqORKae(ES5oEprVxulp(b"\xa9'\xd2^x\x07\x88J\xb9\x07\xca<"), chr(0b1100100) + chr(0b110011 + 0o62) + chr(0b100011 + 0o100) + chr(111) + chr(100) + chr(0b1100101))(chr(8423 - 8306) + '\x74' + '\x66' + '\x2d' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\xcd'), chr(6968 - 6868) + '\145' + '\143' + '\157' + chr(100) + '\145')('\x75' + chr(116) + chr(991 - 889) + '\055' + chr(0b111000)))
if ZlbFMSG8gCoF == ftfygxgFas5X(kcUPm3rq2LKm) - nzTpIcepk0o8(chr(48) + '\157' + chr(0b1101 + 0o45), 8):
roI3spqORKae(HPRlMhFQZATD, roI3spqORKae(ES5oEprVxulp(b"\xa9'\xd2^x\x07\x88J\xb9\x07\xca<"), chr(6588 - 6488) + chr(1542 - 1441) + '\143' + '\157' + '\x64' + chr(4767 - 4666))('\165' + chr(116) + chr(2740 - 2638) + '\x2d' + chr(0b11000 + 0o40)))(zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\xc1\x12\xef\x0e'), chr(7280 - 7180) + chr(101) + chr(7473 - 7374) + chr(111) + chr(0b110111 + 0o55) + '\x65')(chr(866 - 749) + chr(0b1110100) + chr(0b1100110) + '\055' + '\x38')))
else:
OeMYStoG74C6 = hXMPsSrOQzbh.get_seconds_description()
yViYF7ZVnsce = hXMPsSrOQzbh.get_minutes_description()
h0Aiy3br_XNY = hXMPsSrOQzbh.get_hours_description()
roI3spqORKae(HPRlMhFQZATD, roI3spqORKae(ES5oEprVxulp(b"\xa9'\xd2^x\x07\x88J\xb9\x07\xca<"), chr(0b1100 + 0o130) + chr(2956 - 2855) + chr(99) + '\157' + chr(100) + chr(8902 - 8801))('\x75' + chr(116) + '\x66' + '\x2d' + chr(0b111000)))(OeMYStoG74C6)
if HPRlMhFQZATD:
roI3spqORKae(HPRlMhFQZATD, roI3spqORKae(ES5oEprVxulp(b"\xa9'\xd2^x\x07\x88J\xb9\x07\xca<"), chr(0b101010 + 0o72) + chr(0b1100101) + '\x63' + chr(111) + '\x64' + chr(0b11101 + 0o110))('\x75' + '\x74' + '\146' + chr(0b10111 + 0o26) + chr(1423 - 1367)))(roI3spqORKae(ES5oEprVxulp(b'\xcdS'), chr(5256 - 5156) + '\145' + chr(0b1100011) + '\157' + chr(0b1100100) + chr(2289 - 2188))(chr(117) + chr(116) + chr(0b1100110) + chr(0b110 + 0o47) + chr(0b100111 + 0o21)))
roI3spqORKae(HPRlMhFQZATD, roI3spqORKae(ES5oEprVxulp(b"\xa9'\xd2^x\x07\x88J\xb9\x07\xca<"), chr(0b110000 + 0o64) + chr(0b110111 + 0o56) + chr(0b10110 + 0o115) + '\x6f' + chr(100) + chr(7664 - 7563))(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(0b101101) + chr(0b111000)))(yViYF7ZVnsce)
if HPRlMhFQZATD:
roI3spqORKae(HPRlMhFQZATD, roI3spqORKae(ES5oEprVxulp(b"\xa9'\xd2^x\x07\x88J\xb9\x07\xca<"), chr(100) + chr(101) + chr(0b1100011) + '\157' + chr(3219 - 3119) + chr(0b1000101 + 0o40))(chr(0b101101 + 0o110) + '\x74' + chr(102) + chr(1871 - 1826) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xcdS'), '\x64' + chr(101) + '\x63' + chr(0b1101111) + '\144' + chr(9428 - 9327))(chr(117) + '\164' + chr(0b1 + 0o145) + chr(0b101101) + chr(1945 - 1889)))
roI3spqORKae(HPRlMhFQZATD, roI3spqORKae(ES5oEprVxulp(b"\xa9'\xd2^x\x07\x88J\xb9\x07\xca<"), '\144' + '\x65' + chr(0b1100011) + chr(0b10010 + 0o135) + chr(100) + '\145')(chr(0b1110001 + 0o4) + '\164' + chr(102) + '\x2d' + '\x38'))(h0Aiy3br_XNY)
return N9zlRy29S1SS(HPRlMhFQZATD) |
Salamek/cron-descriptor | cron_descriptor/ExpressionDescriptor.py | ExpressionDescriptor.get_seconds_description | def get_seconds_description(self):
"""Generates a description for only the SECONDS portion of the expression
Returns:
The SECONDS description
"""
return self.get_segment_description(
self._expression_parts[0],
_("every second"),
lambda s: s,
lambda s: _("every {0} seconds").format(s),
lambda s: _("seconds {0} through {1} past the minute"),
lambda s: _("at {0} seconds past the minute")
) | python | def get_seconds_description(self):
"""Generates a description for only the SECONDS portion of the expression
Returns:
The SECONDS description
"""
return self.get_segment_description(
self._expression_parts[0],
_("every second"),
lambda s: s,
lambda s: _("every {0} seconds").format(s),
lambda s: _("seconds {0} through {1} past the minute"),
lambda s: _("at {0} seconds past the minute")
) | [
"def",
"get_seconds_description",
"(",
"self",
")",
":",
"return",
"self",
".",
"get_segment_description",
"(",
"self",
".",
"_expression_parts",
"[",
"0",
"]",
",",
"_",
"(",
"\"every second\"",
")",
",",
"lambda",
"s",
":",
"s",
",",
"lambda",
"s",
":",
"_",
"(",
"\"every {0} seconds\"",
")",
".",
"format",
"(",
"s",
")",
",",
"lambda",
"s",
":",
"_",
"(",
"\"seconds {0} through {1} past the minute\"",
")",
",",
"lambda",
"s",
":",
"_",
"(",
"\"at {0} seconds past the minute\"",
")",
")"
] | Generates a description for only the SECONDS portion of the expression
Returns:
The SECONDS description | [
"Generates",
"a",
"description",
"for",
"only",
"the",
"SECONDS",
"portion",
"of",
"the",
"expression"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionDescriptor.py#L216-L231 | train | Generates a description for only the SECONDS portion of the expression
| GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYI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QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + chr(0b110010) + chr(2408 - 2358), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + '\067' + chr(0b100 + 0o56), 27695 - 27687), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1101111) + '\063' + chr(0b110101) + chr(51), 23561 - 23553), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1101111) + chr(51) + chr(0b11001 + 0o34) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(1743 - 1688) + chr(790 - 739), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x33' + '\x31' + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1010000 + 0o37) + chr(0b110011) + '\062' + '\060', 62294 - 62286), nzTpIcepk0o8('\060' + '\157' + chr(49) + '\x32' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\x6f' + chr(0b110010) + chr(1508 - 1455) + chr(943 - 890), ord("\x08")), nzTpIcepk0o8(chr(2155 - 2107) + '\x6f' + chr(2032 - 1983) + chr(382 - 330) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(740 - 688) + chr(52), 14999 - 14991), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10101 + 0o42) + chr(0b110001), 49554 - 49546), nzTpIcepk0o8('\x30' + chr(0b1100110 + 0o11) + chr(0b110010 + 0o1) + chr(0b110000) + '\x32', 32011 - 32003), nzTpIcepk0o8(chr(349 - 301) + chr(0b1101111) + chr(0b10111 + 0o34) + chr(50) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + '\x32' + chr(0b10111 + 0o33), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(49) + '\066', 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\157' + chr(51) + chr(0b110010) + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b100101 + 0o14) + '\x34' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\067' + chr(53), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(2031 - 1981) + '\062' + chr(54), 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(3265 - 3154) + chr(0b110111) + chr(51), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10111 + 0o36), 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1010111 + 0o30) + '\066' + '\066', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + chr(0b110000) + chr(0b100110 + 0o13), 60146 - 60138), nzTpIcepk0o8('\060' + chr(111) + '\066' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(3530 - 3419) + chr(50) + '\063' + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(0b110011) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\064' + chr(504 - 451), ord("\x08")), nzTpIcepk0o8(chr(663 - 615) + '\x6f' + '\x33' + chr(1294 - 1241) + chr(48), 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b111100 + 0o63) + chr(1351 - 1300) + chr(51) + chr(50), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\066', ord("\x08")), nzTpIcepk0o8(chr(393 - 345) + '\157' + chr(2235 - 2186) + '\x36' + chr(1854 - 1804), 18230 - 18222), nzTpIcepk0o8('\x30' + '\157' + '\x32' + chr(0b110011 + 0o4) + chr(53), 27445 - 27437), nzTpIcepk0o8(chr(1384 - 1336) + chr(111) + chr(51) + '\x35' + '\066', 0b1000), nzTpIcepk0o8(chr(1297 - 1249) + chr(111) + chr(0b110001) + chr(0b100111 + 0o12) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2174 - 2123), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101010 + 0o10) + '\x35' + chr(52), 7214 - 7206), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(853 - 804) + chr(0b110100) + '\067', 8), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(0b110010) + chr(0b1111 + 0o42), 0o10), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(0b101011 + 0o104) + chr(0b100100 + 0o16) + chr(0b110111) + '\x31', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(5393 - 5282) + chr(53) + chr(1453 - 1405), 56049 - 56041)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xfc'), '\x64' + '\x65' + chr(0b1100011) + chr(0b1101111) + '\x64' + '\x65')(chr(117) + chr(0b1001101 + 0o47) + chr(102) + '\055' + chr(172 - 116)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def UC1bym5w2GXP(hXMPsSrOQzbh):
return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb5\xdf\x9f\xb6\x08\xaa\xb79\xc8\t\xd0f\xa6\xb6\xe1\xad\xa6\rM\xe2RjX'), chr(2802 - 2702) + chr(0b1100101) + '\x63' + '\x6f' + '\x64' + chr(0b1011 + 0o132))(chr(0b11111 + 0o126) + '\x74' + '\146' + chr(45) + '\070'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb4\xf1\x84\xa2\x1e\x9f\x9f\x1e\xe8\x1f\xd0\x0f'), '\x64' + chr(0b1100101) + '\143' + '\157' + chr(0b110 + 0o136) + chr(101))('\x75' + '\x74' + '\146' + chr(885 - 840) + '\x38'))[nzTpIcepk0o8('\x30' + chr(0b10110 + 0o131) + chr(0b110000), 37187 - 37179)], zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\xb7\xcc\x8e\x9b\x02\xef\xa31\xce\x08\xca]'), chr(100) + chr(9577 - 9476) + chr(0b1100011) + chr(111) + chr(0b1100100) + '\145')(chr(6860 - 6743) + chr(116) + chr(0b1100110) + '\x2d' + '\x38')), lambda PmE5_h409JAA: PmE5_h409JAA, lambda PmE5_h409JAA: roI3spqORKae(zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\xb7\xcc\x8e\x9b\x02\xef\xabd\xd0G\xd7\\\xa1\xbc\xfc\xaa\xa7'), chr(1404 - 1304) + chr(0b1100101) + chr(0b1100011) + '\x6f' + '\x64' + chr(3994 - 3893))('\165' + chr(0b1100111 + 0o15) + '\x66' + chr(0b10 + 0o53) + '\x38')), roI3spqORKae(ES5oEprVxulp(b'\xa3\x89\xd8\xa2<\xfc\xb6;\xfc8\xe7s'), chr(0b1100100) + chr(1536 - 1435) + chr(0b1100011) + '\157' + '\144' + chr(0b1100101))(chr(9728 - 9611) + '\x74' + chr(102) + '\x2d' + chr(0b11001 + 0o37)))(PmE5_h409JAA), lambda PmE5_h409JAA: zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\xa1\xdf\x88\x86\x15\xab\xa3t\xd6W\xd9\x19\xb6\xbb\xe0\xa1\xa1\x03U\xb6@4K\xa1A\xfb\xeaQ\xc8\xaen\x17\x9d\x83#m\xd9\x13\xf4'), '\144' + chr(0b1010000 + 0o25) + chr(578 - 479) + chr(0b110111 + 0o70) + chr(0b100111 + 0o75) + '\145')(chr(8093 - 7976) + '\164' + chr(1451 - 1349) + chr(0b101101) + chr(0b10 + 0o66))), lambda PmE5_h409JAA: zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b"\xb3\xce\xcb\x92K\xb2\xf0'\xc8\x04\xcbW\xa6\xa0\xb2\xbe\xb5\x17I\xb6OmS\xa1\\\xf3\xf7P\x9c\xbf"), chr(0b1100100) + chr(0b110001 + 0o64) + chr(0b100100 + 0o77) + '\x6f' + chr(0b11010 + 0o112) + chr(4629 - 4528))('\165' + chr(116) + chr(594 - 492) + '\x2d' + chr(56)))) |
Salamek/cron-descriptor | cron_descriptor/ExpressionDescriptor.py | ExpressionDescriptor.get_minutes_description | def get_minutes_description(self):
"""Generates a description for only the MINUTE portion of the expression
Returns:
The MINUTE description
"""
return self.get_segment_description(
self._expression_parts[1],
_("every minute"),
lambda s: s,
lambda s: _("every {0} minutes").format(s),
lambda s: _("minutes {0} through {1} past the hour"),
lambda s: '' if s == "0" else _("at {0} minutes past the hour")
) | python | def get_minutes_description(self):
"""Generates a description for only the MINUTE portion of the expression
Returns:
The MINUTE description
"""
return self.get_segment_description(
self._expression_parts[1],
_("every minute"),
lambda s: s,
lambda s: _("every {0} minutes").format(s),
lambda s: _("minutes {0} through {1} past the hour"),
lambda s: '' if s == "0" else _("at {0} minutes past the hour")
) | [
"def",
"get_minutes_description",
"(",
"self",
")",
":",
"return",
"self",
".",
"get_segment_description",
"(",
"self",
".",
"_expression_parts",
"[",
"1",
"]",
",",
"_",
"(",
"\"every minute\"",
")",
",",
"lambda",
"s",
":",
"s",
",",
"lambda",
"s",
":",
"_",
"(",
"\"every {0} minutes\"",
")",
".",
"format",
"(",
"s",
")",
",",
"lambda",
"s",
":",
"_",
"(",
"\"minutes {0} through {1} past the hour\"",
")",
",",
"lambda",
"s",
":",
"''",
"if",
"s",
"==",
"\"0\"",
"else",
"_",
"(",
"\"at {0} minutes past the hour\"",
")",
")"
] | Generates a description for only the MINUTE portion of the expression
Returns:
The MINUTE description | [
"Generates",
"a",
"description",
"for",
"only",
"the",
"MINUTE",
"portion",
"of",
"the",
"expression"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionDescriptor.py#L233-L248 | train | Generates a description for only the MINUTE portion of the expression
| GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb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iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + chr(10575 - 10464) + chr(1352 - 1303) + '\x33' + '\061', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + '\x31' + chr(982 - 933), 30280 - 30272), nzTpIcepk0o8(chr(1715 - 1667) + chr(0b10010 + 0o135) + chr(2030 - 1980) + '\x30' + chr(48), 0b1000), nzTpIcepk0o8(chr(778 - 730) + '\157' + '\063' + chr(0b110100) + '\x34', 18343 - 18335), nzTpIcepk0o8(chr(48) + chr(0b100001 + 0o116) + chr(0b100100 + 0o16) + chr(50) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(1929 - 1881) + '\157' + chr(0b10111 + 0o32) + chr(0b110010) + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + chr(0b100101 + 0o112) + '\x35' + chr(0b10 + 0o64), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1952 - 1898), ord("\x08")), nzTpIcepk0o8(chr(1085 - 1037) + '\157' + chr(0b1 + 0o62) + '\x35' + chr(0b1000 + 0o50), 0b1000), nzTpIcepk0o8(chr(1524 - 1476) + chr(1764 - 1653) + '\062' + chr(513 - 462) + chr(0b110100), 50187 - 50179), nzTpIcepk0o8('\060' + chr(5531 - 5420) + '\062' + chr(48), 0b1000), nzTpIcepk0o8('\060' + chr(12186 - 12075) + chr(51) + chr(53) + chr(2158 - 2103), 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + chr(2554 - 2503) + chr(0b101100 + 0o12) + chr(0b101101 + 0o10), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + chr(884 - 836) + chr(0b110010), 22509 - 22501), nzTpIcepk0o8(chr(0b110000) + chr(0b100010 + 0o115) + '\x34', 0o10), nzTpIcepk0o8(chr(429 - 381) + '\157' + chr(50) + chr(0b110011) + '\x32', 20591 - 20583), nzTpIcepk0o8(chr(48) + '\157' + '\066' + chr(310 - 258), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1011011 + 0o24) + chr(0b110101 + 0o2) + '\x34', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(0b110000) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(2067 - 2019) + chr(111) + chr(794 - 745) + chr(0b1010 + 0o46) + '\065', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(0b110000 + 0o3) + chr(0b1 + 0o63), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(842 - 792) + '\061' + chr(55), 0o10), nzTpIcepk0o8(chr(48) + chr(2921 - 2810) + chr(293 - 244) + '\x36' + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b11100 + 0o27) + '\060' + '\x37', 8), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\x6f' + '\061' + chr(0b110001) + '\x30', 0b1000), nzTpIcepk0o8(chr(1687 - 1639) + chr(0b101001 + 0o106) + chr(1821 - 1772) + '\060', 0o10), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\157' + chr(0b110011) + chr(2215 - 2161) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b11111 + 0o23), 0o10), nzTpIcepk0o8('\060' + '\157' + '\062' + '\067' + '\064', 39005 - 38997), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b1100 + 0o45) + '\x37' + chr(0b1101 + 0o50), 37890 - 37882), nzTpIcepk0o8('\060' + '\157' + '\063', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\062' + '\x33' + '\063', ord("\x08")), nzTpIcepk0o8(chr(1387 - 1339) + chr(0b1100000 + 0o17) + chr(51) + chr(0b100011 + 0o17) + '\x32', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(0b110001) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(1895 - 1847) + chr(2353 - 2242) + '\062' + '\061' + chr(55), 8), nzTpIcepk0o8(chr(48) + chr(0b111000 + 0o67) + '\x33' + chr(2043 - 1990) + chr(2479 - 2425), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010100 + 0o33) + chr(2421 - 2370) + chr(596 - 544) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(7480 - 7369) + '\062' + '\067' + '\066', 0b1000), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\x6f' + chr(0b101001 + 0o12) + '\x34' + chr(0b11101 + 0o23), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b101110 + 0o101) + '\064' + chr(1366 - 1316), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1101111) + '\x35' + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'w'), chr(0b1011010 + 0o12) + '\x65' + '\143' + chr(0b10101 + 0o132) + chr(0b11101 + 0o107) + chr(2221 - 2120))(chr(0b11 + 0o162) + chr(116) + chr(102) + '\x2d' + chr(1440 - 1384)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def DoltQ0L4E716(hXMPsSrOQzbh):
return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b">,\xf4\xbb\xe02Ik\x8d\xf2d\xb0\x91'w\xf9FU\xb715\xe0\x1c"), '\144' + chr(216 - 115) + chr(6019 - 5920) + chr(111) + '\144' + chr(101))(chr(0b1100101 + 0o20) + chr(538 - 422) + chr(0b111000 + 0o56) + chr(0b101101) + chr(56)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'?\x02\xef\xaf\xf6\x07aL\xad\xe4d\xd9'), '\x64' + '\x65' + chr(0b1000001 + 0o42) + '\157' + chr(5551 - 5451) + '\145')(chr(12906 - 12789) + chr(0b1010110 + 0o36) + chr(0b1100110) + '\x2d' + chr(0b110001 + 0o7)))[nzTpIcepk0o8(chr(709 - 661) + chr(111) + '\x31', 0b1000)], zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'<?\xe5\x96\xeawCo\x86\xe9d\x8a'), chr(0b110 + 0o136) + '\145' + chr(99) + '\157' + chr(0b101001 + 0o73) + chr(0b110010 + 0o63))('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + '\070')), lambda PmE5_h409JAA: PmE5_h409JAA, lambda PmE5_h409JAA: roI3spqORKae(zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'<?\xe5\x96\xeawU6\x95\xbc}\x86\x9b7p\xffG'), chr(100) + '\x65' + chr(99) + '\x6f' + chr(0b111001 + 0o53) + chr(0b10100 + 0o121))(chr(0b1110101) + '\164' + chr(102) + chr(0b101011 + 0o2) + '\x38')), roI3spqORKae(ES5oEprVxulp(b'(z\xb3\xaf\xd4dHi\xb9\xc3S\xa5'), chr(0b100100 + 0o100) + chr(0b1100101) + chr(99) + chr(6564 - 6453) + chr(100) + chr(101))(chr(0b1110101) + chr(0b110011 + 0o101) + chr(0b1100110) + '\055' + '\x38'))(PmE5_h409JAA), lambda PmE5_h409JAA: zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b"4 \xee\x91\xe72]&\x93\xacm\xcf\x81*v\xf5A[\xafe'\xbe\x0f\xe78i\x80v\x9c\tk\xfe\xf2$\xe0\x9b\x91"), chr(0b1100100) + '\x65' + '\x63' + chr(111) + '\x64' + '\145')(chr(117) + chr(116) + chr(0b1100110) + chr(821 - 776) + chr(0b101101 + 0o13))), lambda PmE5_h409JAA: roI3spqORKae(ES5oEprVxulp(b''), '\144' + chr(0b10010 + 0o123) + chr(2468 - 2369) + chr(1619 - 1508) + chr(0b1100100) + chr(101))(chr(0b101100 + 0o111) + chr(6295 - 6179) + chr(0b110010 + 0o64) + '\x2d' + chr(56)) if PmE5_h409JAA == roI3spqORKae(ES5oEprVxulp(b'i'), chr(4058 - 3958) + chr(0b1100101) + chr(914 - 815) + chr(111) + chr(100) + chr(101))(chr(0b1110101) + chr(6267 - 6151) + chr(7294 - 7192) + '\055' + '\x38') else zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'8=\xa0\x9f\xa3*\x0ek\x81\xf2e\x9b\x901$\xeaUO\xb3e(\xe7\x17\xe7 g\x86p'), '\144' + chr(101) + chr(99) + '\157' + '\144' + '\145')(chr(0b1011 + 0o152) + '\164' + chr(8662 - 8560) + chr(0b11101 + 0o20) + '\070'))) |
Salamek/cron-descriptor | cron_descriptor/ExpressionDescriptor.py | ExpressionDescriptor.get_hours_description | def get_hours_description(self):
"""Generates a description for only the HOUR portion of the expression
Returns:
The HOUR description
"""
expression = self._expression_parts[2]
return self.get_segment_description(
expression,
_("every hour"),
lambda s: self.format_time(s, "0"),
lambda s: _("every {0} hours").format(s),
lambda s: _("between {0} and {1}"),
lambda s: _("at {0}")
) | python | def get_hours_description(self):
"""Generates a description for only the HOUR portion of the expression
Returns:
The HOUR description
"""
expression = self._expression_parts[2]
return self.get_segment_description(
expression,
_("every hour"),
lambda s: self.format_time(s, "0"),
lambda s: _("every {0} hours").format(s),
lambda s: _("between {0} and {1}"),
lambda s: _("at {0}")
) | [
"def",
"get_hours_description",
"(",
"self",
")",
":",
"expression",
"=",
"self",
".",
"_expression_parts",
"[",
"2",
"]",
"return",
"self",
".",
"get_segment_description",
"(",
"expression",
",",
"_",
"(",
"\"every hour\"",
")",
",",
"lambda",
"s",
":",
"self",
".",
"format_time",
"(",
"s",
",",
"\"0\"",
")",
",",
"lambda",
"s",
":",
"_",
"(",
"\"every {0} hours\"",
")",
".",
"format",
"(",
"s",
")",
",",
"lambda",
"s",
":",
"_",
"(",
"\"between {0} and {1}\"",
")",
",",
"lambda",
"s",
":",
"_",
"(",
"\"at {0}\"",
")",
")"
] | Generates a description for only the HOUR portion of the expression
Returns:
The HOUR description | [
"Generates",
"a",
"description",
"for",
"only",
"the",
"HOUR",
"portion",
"of",
"the",
"expression"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionDescriptor.py#L250-L265 | train | Generates a description for only the HOUR portion of the expression
| GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQ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pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + '\x6f' + '\063' + '\x30' + chr(0b111 + 0o51), 0o10), nzTpIcepk0o8(chr(48) + chr(0b111 + 0o150) + chr(2127 - 2077) + chr(48) + '\x33', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(49) + chr(0b110101) + chr(1393 - 1340), 46392 - 46384), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(572 - 520) + chr(0b1011 + 0o53), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101010 + 0o11) + chr(2482 - 2428), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(0b101110 + 0o10) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110 + 0o53) + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(2113 - 2062) + '\062', 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b110011 + 0o74) + chr(0b100000 + 0o24) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b100101 + 0o112) + chr(0b11011 + 0o30) + chr(54) + chr(2688 - 2634), 3809 - 3801), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + '\x30' + chr(0b11100 + 0o27), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(55) + chr(1890 - 1839), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x36' + '\065', 0b1000), nzTpIcepk0o8(chr(681 - 633) + '\157' + chr(0b110011) + chr(2619 - 2566) + chr(0b110100), 11577 - 11569), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101000 + 0o7) + chr(1319 - 1270) + chr(2392 - 2341) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b1101 + 0o45) + chr(0b101011 + 0o10) + chr(0b0 + 0o63), 0o10), nzTpIcepk0o8(chr(1777 - 1729) + '\x6f' + chr(1734 - 1684) + chr(0b1101 + 0o50) + '\x33', 0b1000), nzTpIcepk0o8('\x30' + chr(0b11110 + 0o121) + chr(51) + chr(53) + '\x33', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(55) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(1928 - 1873) + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + '\x37' + '\063', 8), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(48) + chr(50), 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + '\x32' + chr(0b11111 + 0o21) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11001 + 0o31) + chr(0b111 + 0o53) + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1703 - 1652) + chr(0b110010) + '\065', ord("\x08")), nzTpIcepk0o8(chr(1192 - 1144) + chr(111) + '\061' + '\x34', 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(1006 - 957) + chr(48) + '\065', 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\157' + chr(0b110 + 0o53) + chr(49), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + chr(0b110100) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(51) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(54) + chr(395 - 343), 40643 - 40635), nzTpIcepk0o8(chr(0b110000) + chr(0b1010011 + 0o34) + chr(51) + '\063' + chr(0b110010), 0b1000), nzTpIcepk0o8('\060' + chr(3829 - 3718) + chr(2358 - 2309) + chr(0b110110) + chr(1538 - 1484), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110100) + '\x33', 44415 - 44407), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100000 + 0o21) + chr(0b11001 + 0o35) + chr(0b110001), 9441 - 9433), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\157' + '\x36' + '\065', 8), nzTpIcepk0o8(chr(48) + chr(0b10101 + 0o132) + chr(0b110011) + '\063' + chr(1196 - 1143), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + '\x33' + chr(2325 - 2271), 8), nzTpIcepk0o8(chr(915 - 867) + chr(111) + chr(0b110010) + '\062' + chr(0b100011 + 0o24), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(545 - 492) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xee'), '\x64' + '\145' + '\143' + chr(111) + chr(100) + chr(101))(chr(0b1101010 + 0o13) + '\x74' + chr(102) + chr(0b101101) + chr(0b11011 + 0o35)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def K9wvsnilr4g7(hXMPsSrOQzbh):
Jni_E12Y8D3Y = hXMPsSrOQzbh.fKoKePOJExt6[nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + '\x32', 0b1000)]
return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa7\xe6\x199m\xd2k7G\x98\xb7$gP\x9f=\xe9\xc2\x9bN\xd4\x14\xec'), '\x64' + chr(0b101001 + 0o74) + chr(0b1010110 + 0o15) + '\x6f' + '\144' + '\145')('\165' + '\164' + chr(102) + chr(0b101101) + chr(2887 - 2831)))(Jni_E12Y8D3Y, zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\xa5\xf5\x08\x14g\x97d5W\x84'), chr(0b1100100) + chr(101) + '\143' + chr(111) + chr(100) + '\x65')(chr(117) + chr(116) + chr(0b1011000 + 0o16) + chr(0b101101) + chr(0b111000))), lambda PmE5_h409JAA: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb8\xf6.)M\xd8|(t\x93\xb2\x1c'), '\x64' + chr(0b1100101) + '\x63' + chr(111) + chr(6069 - 5969) + chr(0b1000100 + 0o41))('\165' + '\x74' + '\x66' + chr(0b101101) + chr(0b100110 + 0o22)))(PmE5_h409JAA, roI3spqORKae(ES5oEprVxulp(b'\xf0'), '\x64' + chr(0b10 + 0o143) + '\143' + chr(0b1000100 + 0o53) + chr(100) + '\145')(chr(4376 - 4259) + chr(0b1110100) + chr(3428 - 3326) + chr(0b101101) + '\070')), lambda PmE5_h409JAA: roI3spqORKae(zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\xa5\xf5\x08\x14g\x97wj_\xd6\xab\x14vG\x9f'), chr(0b1100100) + chr(101) + chr(135 - 36) + chr(3368 - 3257) + '\x64' + chr(101))(chr(12175 - 12058) + '\164' + '\x66' + chr(1974 - 1929) + chr(0b111000))), roI3spqORKae(ES5oEprVxulp(b'\xb1\xb0^-Y\x84j5s\xa9\x801'), '\x64' + chr(101) + chr(0b1000110 + 0o35) + '\x6f' + '\x64' + chr(101))(chr(117) + chr(0b1001101 + 0o47) + '\146' + chr(906 - 861) + chr(1035 - 979)))(PmE5_h409JAA), lambda PmE5_h409JAA: zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\xa2\xe6\x19\x11{\xd2bzY\xc6\xbe[b[\x88~\xe0\x9a\x96'), chr(100) + chr(101) + chr(0b1001101 + 0o26) + chr(0b1101111) + chr(1661 - 1561) + chr(0b1100101))(chr(3218 - 3101) + chr(116) + '\146' + '\x2d' + chr(852 - 796))), lambda PmE5_h409JAA: zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\xa1\xf7M\x1d.\xca'), '\144' + chr(101) + chr(0b1010 + 0o131) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b0 + 0o165) + chr(0b1110100) + chr(8145 - 8043) + '\055' + '\070'))) |
Salamek/cron-descriptor | cron_descriptor/ExpressionDescriptor.py | ExpressionDescriptor.get_day_of_week_description | def get_day_of_week_description(self):
"""Generates a description for only the DAYOFWEEK portion of the expression
Returns:
The DAYOFWEEK description
"""
if self._expression_parts[5] == "*" and self._expression_parts[3] != "*":
# DOM is specified and DOW is * so to prevent contradiction like "on day 1 of the month, every day"
# we will not specified a DOW description.
return ""
def get_day_name(s):
exp = s
if "#" in s:
exp, useless = s.split("#", 2)
elif "L" in s:
exp = exp.replace("L", '')
return self.number_to_day(int(exp))
def get_format(s):
if "#" in s:
day_of_week_of_month = s[s.find("#") + 1:]
try:
day_of_week_of_month_number = int(day_of_week_of_month)
choices = {
1: _("first"),
2: _("second"),
3: _("third"),
4: _("forth"),
5: _("fifth"),
}
day_of_week_of_month_description = choices.get(day_of_week_of_month_number, '')
except ValueError:
day_of_week_of_month_description = ''
formated = "{}{}{}".format(_(", on the "),
day_of_week_of_month_description, _(" {0} of the month"))
elif "L" in s:
formated = _(", on the last {0} of the month")
else:
formated = _(", only on {0}")
return formated
return self.get_segment_description(
self._expression_parts[5],
_(", every day"),
lambda s: get_day_name(s),
lambda s: _(", every {0} days of the week").format(s),
lambda s: _(", {0} through {1}"),
lambda s: get_format(s)
) | python | def get_day_of_week_description(self):
"""Generates a description for only the DAYOFWEEK portion of the expression
Returns:
The DAYOFWEEK description
"""
if self._expression_parts[5] == "*" and self._expression_parts[3] != "*":
# DOM is specified and DOW is * so to prevent contradiction like "on day 1 of the month, every day"
# we will not specified a DOW description.
return ""
def get_day_name(s):
exp = s
if "#" in s:
exp, useless = s.split("#", 2)
elif "L" in s:
exp = exp.replace("L", '')
return self.number_to_day(int(exp))
def get_format(s):
if "#" in s:
day_of_week_of_month = s[s.find("#") + 1:]
try:
day_of_week_of_month_number = int(day_of_week_of_month)
choices = {
1: _("first"),
2: _("second"),
3: _("third"),
4: _("forth"),
5: _("fifth"),
}
day_of_week_of_month_description = choices.get(day_of_week_of_month_number, '')
except ValueError:
day_of_week_of_month_description = ''
formated = "{}{}{}".format(_(", on the "),
day_of_week_of_month_description, _(" {0} of the month"))
elif "L" in s:
formated = _(", on the last {0} of the month")
else:
formated = _(", only on {0}")
return formated
return self.get_segment_description(
self._expression_parts[5],
_(", every day"),
lambda s: get_day_name(s),
lambda s: _(", every {0} days of the week").format(s),
lambda s: _(", {0} through {1}"),
lambda s: get_format(s)
) | [
"def",
"get_day_of_week_description",
"(",
"self",
")",
":",
"if",
"self",
".",
"_expression_parts",
"[",
"5",
"]",
"==",
"\"*\"",
"and",
"self",
".",
"_expression_parts",
"[",
"3",
"]",
"!=",
"\"*\"",
":",
"# DOM is specified and DOW is * so to prevent contradiction like \"on day 1 of the month, every day\"",
"# we will not specified a DOW description.",
"return",
"\"\"",
"def",
"get_day_name",
"(",
"s",
")",
":",
"exp",
"=",
"s",
"if",
"\"#\"",
"in",
"s",
":",
"exp",
",",
"useless",
"=",
"s",
".",
"split",
"(",
"\"#\"",
",",
"2",
")",
"elif",
"\"L\"",
"in",
"s",
":",
"exp",
"=",
"exp",
".",
"replace",
"(",
"\"L\"",
",",
"''",
")",
"return",
"self",
".",
"number_to_day",
"(",
"int",
"(",
"exp",
")",
")",
"def",
"get_format",
"(",
"s",
")",
":",
"if",
"\"#\"",
"in",
"s",
":",
"day_of_week_of_month",
"=",
"s",
"[",
"s",
".",
"find",
"(",
"\"#\"",
")",
"+",
"1",
":",
"]",
"try",
":",
"day_of_week_of_month_number",
"=",
"int",
"(",
"day_of_week_of_month",
")",
"choices",
"=",
"{",
"1",
":",
"_",
"(",
"\"first\"",
")",
",",
"2",
":",
"_",
"(",
"\"second\"",
")",
",",
"3",
":",
"_",
"(",
"\"third\"",
")",
",",
"4",
":",
"_",
"(",
"\"forth\"",
")",
",",
"5",
":",
"_",
"(",
"\"fifth\"",
")",
",",
"}",
"day_of_week_of_month_description",
"=",
"choices",
".",
"get",
"(",
"day_of_week_of_month_number",
",",
"''",
")",
"except",
"ValueError",
":",
"day_of_week_of_month_description",
"=",
"''",
"formated",
"=",
"\"{}{}{}\"",
".",
"format",
"(",
"_",
"(",
"\", on the \"",
")",
",",
"day_of_week_of_month_description",
",",
"_",
"(",
"\" {0} of the month\"",
")",
")",
"elif",
"\"L\"",
"in",
"s",
":",
"formated",
"=",
"_",
"(",
"\", on the last {0} of the month\"",
")",
"else",
":",
"formated",
"=",
"_",
"(",
"\", only on {0}\"",
")",
"return",
"formated",
"return",
"self",
".",
"get_segment_description",
"(",
"self",
".",
"_expression_parts",
"[",
"5",
"]",
",",
"_",
"(",
"\", every day\"",
")",
",",
"lambda",
"s",
":",
"get_day_name",
"(",
"s",
")",
",",
"lambda",
"s",
":",
"_",
"(",
"\", every {0} days of the week\"",
")",
".",
"format",
"(",
"s",
")",
",",
"lambda",
"s",
":",
"_",
"(",
"\", {0} through {1}\"",
")",
",",
"lambda",
"s",
":",
"get_format",
"(",
"s",
")",
")"
] | Generates a description for only the DAYOFWEEK portion of the expression
Returns:
The DAYOFWEEK description | [
"Generates",
"a",
"description",
"for",
"only",
"the",
"DAYOFWEEK",
"portion",
"of",
"the",
"expression"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionDescriptor.py#L267-L321 | train | Generates a description for only the DAYOFWEEK portion of the expression. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7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4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(1549 - 1501) + '\x6f' + '\061' + chr(1307 - 1254) + chr(2580 - 2528), ord("\x08")), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + chr(49) + chr(0b110111) + chr(0b1011 + 0o45), 0o10), nzTpIcepk0o8(chr(1096 - 1048) + chr(0b1011010 + 0o25) + chr(435 - 384) + '\066' + '\064', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\062' + '\064' + chr(856 - 804), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1010001 + 0o36) + chr(0b110010) + chr(53) + chr(2187 - 2137), 0b1000), nzTpIcepk0o8('\060' + chr(11306 - 11195) + '\061' + '\064', 0b1000), nzTpIcepk0o8(chr(585 - 537) + chr(11339 - 11228) + chr(1844 - 1794) + '\x37' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1001000 + 0o47) + chr(51) + chr(577 - 524) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(9747 - 9636) + chr(49) + chr(0b11101 + 0o25) + chr(1004 - 952), 0b1000), nzTpIcepk0o8(chr(1467 - 1419) + '\157' + chr(0b11 + 0o60) + chr(0b101100 + 0o10) + chr(0b10011 + 0o37), 49886 - 49878), nzTpIcepk0o8(chr(534 - 486) + chr(0b1101111) + chr(1445 - 1396), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(55), ord("\x08")), nzTpIcepk0o8('\060' + chr(9933 - 9822) + '\x33' + chr(51) + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x35' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(753 - 705) + chr(0b1100001 + 0o16) + '\062' + chr(0b110 + 0o52) + '\x33', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b110110) + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(0b101110 + 0o7) + '\x30', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(1290 - 1241) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(0b110111) + chr(0b101000 + 0o11), 0b1000), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\x6f' + chr(0b110010) + chr(50), 47763 - 47755), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(1733 - 1679) + chr(1689 - 1640), 0o10), nzTpIcepk0o8('\x30' + chr(9431 - 9320) + chr(2051 - 2002) + chr(0b110001) + chr(1024 - 970), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + chr(0b110110) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b111001 + 0o66) + chr(0b11010 + 0o31) + chr(0b11 + 0o56) + chr(1907 - 1852), 8), nzTpIcepk0o8('\x30' + '\157' + '\x31' + '\x36' + '\062', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101000 + 0o12) + chr(0b110 + 0o52) + '\067', 45933 - 45925), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + '\061' + chr(0b110000) + chr(49), 29497 - 29489), nzTpIcepk0o8('\x30' + chr(111) + chr(1888 - 1838) + chr(2325 - 2272) + chr(55), 0b1000), nzTpIcepk0o8(chr(1860 - 1812) + chr(10530 - 10419) + '\x32', 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1857 - 1807) + '\060' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4110 - 3999) + '\062' + '\063' + chr(543 - 494), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(111) + chr(0b110011) + chr(48), 0o10), nzTpIcepk0o8(chr(1375 - 1327) + chr(1107 - 996) + '\x31' + chr(0b110010 + 0o2) + chr(51), 57262 - 57254), nzTpIcepk0o8('\x30' + chr(12163 - 12052) + chr(1131 - 1080) + chr(0b110011) + '\x36', 15184 - 15176), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1340 - 1290) + chr(50) + '\x32', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(0b10001 + 0o40), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110110) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110110) + '\x31', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10111 + 0o37) + chr(0b110111), 6073 - 6065)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + '\065' + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'B'), chr(1344 - 1244) + chr(0b1100101) + chr(99) + chr(1213 - 1102) + '\144' + chr(0b1000100 + 0o41))(chr(117) + chr(0b1110100) + '\146' + chr(45) + chr(906 - 850)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def xlAIB5iXWUKv(hXMPsSrOQzbh):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\n3\x9b\xef\xcf\\\xf2\xa3\x11\x9au9'), chr(0b1100100) + '\x65' + chr(0b10011 + 0o120) + chr(11990 - 11879) + chr(0b100111 + 0o75) + chr(9207 - 9106))('\x75' + chr(116) + '\146' + chr(0b10011 + 0o32) + chr(0b111000)))[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\065', 0b1000)] == roI3spqORKae(ES5oEprVxulp(b'F'), '\144' + chr(101) + chr(99) + chr(111) + '\x64' + chr(8426 - 8325))(chr(0b10111 + 0o136) + '\164' + chr(0b1011111 + 0o7) + chr(0b100111 + 0o6) + '\x38') and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\n3\x9b\xef\xcf\\\xf2\xa3\x11\x9au9'), chr(375 - 275) + chr(0b110001 + 0o64) + chr(99) + '\x6f' + chr(9797 - 9697) + '\145')(chr(117) + '\164' + chr(9538 - 9436) + chr(0b101101) + chr(56)))[nzTpIcepk0o8('\060' + chr(0b1100100 + 0o13) + '\063', 0b1000)] != roI3spqORKae(ES5oEprVxulp(b'F'), '\x64' + '\145' + chr(7202 - 7103) + '\x6f' + '\x64' + '\x65')(chr(0b1010101 + 0o40) + chr(116) + '\x66' + '\x2d' + '\x38'):
return roI3spqORKae(ES5oEprVxulp(b''), chr(970 - 870) + chr(101) + '\143' + chr(111) + chr(8825 - 8725) + chr(101))(chr(0b1110 + 0o147) + chr(0b1101001 + 0o13) + chr(0b1100110) + chr(1447 - 1402) + '\x38')
def nhSjvihzcEdZ(PmE5_h409JAA):
r1dtBD6zLTaS = PmE5_h409JAA
if roI3spqORKae(ES5oEprVxulp(b'O'), chr(100) + chr(4990 - 4889) + chr(0b1000001 + 0o42) + '\157' + chr(0b10 + 0o142) + chr(101))(chr(0b1011011 + 0o32) + '\x74' + '\x66' + chr(1811 - 1766) + chr(2665 - 2609)) in PmE5_h409JAA:
(r1dtBD6zLTaS, GY9JjAlbU6kC) = PmE5_h409JAA.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'O'), chr(8564 - 8464) + chr(0b1100101) + chr(5347 - 5248) + chr(0b1100000 + 0o17) + chr(100) + chr(8133 - 8032))(chr(4089 - 3972) + chr(6182 - 6066) + chr(8193 - 8091) + '\x2d' + chr(56)), nzTpIcepk0o8('\060' + chr(0b110101 + 0o72) + '\062', 8))
elif roI3spqORKae(ES5oEprVxulp(b' '), chr(8246 - 8146) + chr(101) + chr(99) + '\157' + '\x64' + '\x65')(chr(0b1101101 + 0o10) + chr(116) + '\146' + chr(45) + chr(2524 - 2468)) in PmE5_h409JAA:
r1dtBD6zLTaS = r1dtBD6zLTaS.E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b' '), chr(0b1100100) + chr(3442 - 3341) + chr(0b1010100 + 0o17) + chr(12233 - 12122) + chr(7571 - 7471) + '\145')('\165' + chr(0b1110100) + '\146' + chr(1936 - 1891) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b''), chr(0b1011001 + 0o13) + '\145' + chr(0b1100011) + chr(0b110100 + 0o73) + '\x64' + chr(0b1011001 + 0o14))('\x75' + chr(7532 - 7416) + chr(0b11111 + 0o107) + '\x2d' + '\x38'))
return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x02\r\x99\xc6\xcf~\xe2\x9d;\xbden\xa6'), chr(0b100000 + 0o104) + '\145' + chr(0b1100011) + '\157' + '\x64' + chr(5211 - 5110))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(56)))(nzTpIcepk0o8(r1dtBD6zLTaS))
def SPdV7Hr0AGxl(PmE5_h409JAA):
if roI3spqORKae(ES5oEprVxulp(b'O'), chr(0b1000101 + 0o37) + chr(0b11110 + 0o107) + chr(0b111101 + 0o46) + chr(0b1101111) + chr(9399 - 9299) + '\x65')(chr(0b1110000 + 0o5) + chr(0b1110100) + chr(3822 - 3720) + chr(0b101101) + chr(0b1100 + 0o54)) in PmE5_h409JAA:
vK90V0qLQHeX = PmE5_h409JAA[PmE5_h409JAA.mlLPzxww6J51(roI3spqORKae(ES5oEprVxulp(b'O'), '\144' + chr(101) + '\143' + '\x6f' + '\144' + '\145')(chr(0b100 + 0o161) + '\164' + '\146' + chr(0b101101) + chr(0b111000))) + nzTpIcepk0o8('\060' + '\157' + chr(0b101 + 0o54), 8):]
try:
nWqDLuhx_bja = nzTpIcepk0o8(vK90V0qLQHeX)
asdO8lLbsxE9 = {nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001), 8): zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\n\x11\x86\xd7\xde'), chr(0b10 + 0o142) + '\145' + chr(9689 - 9590) + '\x6f' + chr(0b1100100) + '\145')('\x75' + chr(0b1110100) + '\x66' + chr(1795 - 1750) + '\x38')), nzTpIcepk0o8(chr(48) + chr(0b1101101 + 0o2) + chr(50), 8): zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\x1f\x1d\x97\xcb\xc4h'), '\144' + '\x65' + '\143' + chr(10623 - 10512) + chr(100) + chr(1937 - 1836))('\165' + chr(116) + chr(0b110 + 0o140) + chr(958 - 913) + '\x38')), nzTpIcepk0o8(chr(1222 - 1174) + chr(111) + chr(0b110011), 8): zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\x18\x10\x9d\xd6\xce'), chr(0b1100100) + '\x65' + '\143' + '\157' + '\x64' + '\x65')(chr(10531 - 10414) + '\x74' + chr(4834 - 4732) + chr(196 - 151) + chr(56))), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110100), ord("\x08")): zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\n\x17\x86\xd0\xc2'), '\x64' + chr(2949 - 2848) + chr(99) + chr(111) + chr(100) + '\145')('\165' + '\x74' + '\x66' + '\055' + '\x38')), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1615 - 1562), 8): zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\n\x11\x92\xd0\xc2'), '\x64' + chr(0b10010 + 0o123) + chr(0b101010 + 0o71) + '\x6f' + '\x64' + chr(0b1100101 + 0o0))('\165' + '\x74' + '\146' + chr(0b100001 + 0o14) + '\x38'))}
S6A2Fr1Irx4d = asdO8lLbsxE9.GUKetu4xaGsJ(nWqDLuhx_bja, roI3spqORKae(ES5oEprVxulp(b''), chr(5687 - 5587) + chr(0b1100101) + chr(3748 - 3649) + chr(0b1101111) + chr(3565 - 3465) + chr(0b1100101))(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(1488 - 1443) + '\070'))
except WbNHlDKpyPtQ:
S6A2Fr1Irx4d = roI3spqORKae(ES5oEprVxulp(b''), chr(100) + chr(0b1100101) + chr(99) + chr(111) + chr(0b11011 + 0o111) + chr(0b100110 + 0o77))(chr(0b1110101) + chr(0b1110100) + chr(0b1100 + 0o132) + chr(0b101101) + chr(0b111000))
TGw6Lv6SAXwl = roI3spqORKae(ES5oEprVxulp(b'\x17\x05\x8f\xd9\xd1q'), chr(2658 - 2558) + '\145' + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(0b1011110 + 0o7))('\165' + '\x74' + chr(5384 - 5282) + '\x2d' + chr(0b11011 + 0o35)).q33KG3foQ_CJ(zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'@X\x9b\xca\x8ax\xd5\x8ct'), '\144' + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(5144 - 5044) + '\145')(chr(117) + chr(0b1110100) + chr(102) + chr(0b1111 + 0o36) + chr(2035 - 1979))), S6A2Fr1Irx4d, zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'L\x03\xc4\xd9\x8ac\xdb\xc9 \x8ad/\xb2D\xed\x04\xc0'), chr(0b1100100) + '\x65' + chr(3078 - 2979) + chr(111) + '\x64' + chr(0b1001101 + 0o30))(chr(117) + '\164' + chr(0b1100001 + 0o5) + '\055' + '\070')))
elif roI3spqORKae(ES5oEprVxulp(b' '), chr(100) + chr(0b1100000 + 0o5) + '\x63' + '\157' + chr(100) + '\145')(chr(117) + chr(116) + '\x66' + chr(357 - 312) + chr(0b111000)) in PmE5_h409JAA:
TGw6Lv6SAXwl = zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'@X\x9b\xca\x8ax\xd5\x8ct\x8e`|\xab\x0b\xf8@\xd5\xef\x16t"\x05&\xd2\xef\x1f\xe8/\xdbj'), chr(0b111001 + 0o53) + chr(0b1100101) + chr(99) + '\157' + '\x64' + '\x65')(chr(117) + '\164' + '\x66' + chr(0b11110 + 0o17) + chr(0b111000)))
else:
TGw6Lv6SAXwl = zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'@X\x9b\xca\xc6u\x9d\x86:\xc2z?\xa2'), '\x64' + chr(0b1000110 + 0o37) + '\x63' + chr(0b1101111) + '\144' + '\145')(chr(0b1110101) + '\164' + chr(0b10010 + 0o124) + chr(0b101101) + '\070'))
return TGw6Lv6SAXwl
return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x0b\x1d\x80\xfb\xd9i\xda\x841\x8cuP\xbbN\xf0\x13\xda\xa6\tfk\x1e '), '\144' + chr(0b1100101) + chr(703 - 604) + chr(0b1101111) + '\x64' + chr(7717 - 7616))(chr(117) + chr(0b1110100) + chr(0b100100 + 0o102) + chr(0b111 + 0o46) + chr(56)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\n3\x9b\xef\xcf\\\xf2\xa3\x11\x9au9'), '\144' + chr(101) + chr(9593 - 9494) + chr(0b100011 + 0o114) + '\x64' + '\x65')(chr(117) + chr(116) + chr(102) + '\x2d' + chr(0b101 + 0o63)))[nzTpIcepk0o8('\x30' + chr(7150 - 7039) + chr(0b110101), 8)], zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'@X\x91\xd2\xcf~\xc4\xc90\x83x'), '\x64' + chr(101) + chr(2854 - 2755) + chr(111) + '\x64' + chr(101))(chr(0b110010 + 0o103) + chr(116) + '\146' + '\x2d' + '\070')), lambda PmE5_h409JAA: nhSjvihzcEdZ(PmE5_h409JAA), lambda PmE5_h409JAA: roI3spqORKae(zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'@X\x91\xd2\xcf~\xc4\xc9/\xd2|/\xbbJ\xfa\x03\x88\xa0\x1f2v\x19+\x97\xb8\x17\xe2*'), chr(2767 - 2667) + chr(101) + '\x63' + chr(111) + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(7939 - 7823) + chr(102) + '\055' + chr(2215 - 2159))), roI3spqORKae(ES5oEprVxulp(b'\x1dK\xc7\xef\xed?\xdb\x86\x05\xbdBE'), chr(100) + chr(101) + '\x63' + chr(0b1101111) + '\144' + chr(0b1100101))(chr(0b10011 + 0o142) + chr(0b1110100) + '\146' + '\055' + chr(0b111000)))(PmE5_h409JAA), lambda PmE5_h409JAA: zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'@X\x8f\x94\xd7,\xc9\x81&\x8dth\xb7\x0b\xf8A\xd5'), chr(100) + '\145' + chr(99) + '\x6f' + '\144' + '\145')('\x75' + '\x74' + chr(102) + '\055' + chr(56))), lambda PmE5_h409JAA: SPdV7Hr0AGxl(PmE5_h409JAA)) |
Salamek/cron-descriptor | cron_descriptor/ExpressionDescriptor.py | ExpressionDescriptor.get_month_description | def get_month_description(self):
"""Generates a description for only the MONTH portion of the expression
Returns:
The MONTH description
"""
return self.get_segment_description(
self._expression_parts[4],
'',
lambda s: datetime.date(datetime.date.today().year, int(s), 1).strftime("%B"),
lambda s: _(", every {0} months").format(s),
lambda s: _(", {0} through {1}"),
lambda s: _(", only in {0}")
) | python | def get_month_description(self):
"""Generates a description for only the MONTH portion of the expression
Returns:
The MONTH description
"""
return self.get_segment_description(
self._expression_parts[4],
'',
lambda s: datetime.date(datetime.date.today().year, int(s), 1).strftime("%B"),
lambda s: _(", every {0} months").format(s),
lambda s: _(", {0} through {1}"),
lambda s: _(", only in {0}")
) | [
"def",
"get_month_description",
"(",
"self",
")",
":",
"return",
"self",
".",
"get_segment_description",
"(",
"self",
".",
"_expression_parts",
"[",
"4",
"]",
",",
"''",
",",
"lambda",
"s",
":",
"datetime",
".",
"date",
"(",
"datetime",
".",
"date",
".",
"today",
"(",
")",
".",
"year",
",",
"int",
"(",
"s",
")",
",",
"1",
")",
".",
"strftime",
"(",
"\"%B\"",
")",
",",
"lambda",
"s",
":",
"_",
"(",
"\", every {0} months\"",
")",
".",
"format",
"(",
"s",
")",
",",
"lambda",
"s",
":",
"_",
"(",
"\", {0} through {1}\"",
")",
",",
"lambda",
"s",
":",
"_",
"(",
"\", only in {0}\"",
")",
")"
] | Generates a description for only the MONTH portion of the expression
Returns:
The MONTH description | [
"Generates",
"a",
"description",
"for",
"only",
"the",
"MONTH",
"portion",
"of",
"the",
"expression"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionDescriptor.py#L323-L337 | train | Generates a description for only the MONTH portion of the expression
| GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2O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Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + chr(0b100101 + 0o112) + chr(49) + chr(0b101000 + 0o11) + '\x36', 50170 - 50162), nzTpIcepk0o8(chr(1965 - 1917) + chr(111) + chr(0b110010) + '\060' + chr(1446 - 1396), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(73 - 21) + chr(0b101 + 0o60), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + chr(152 - 103) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(0b100000 + 0o20), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(815 - 766) + '\064' + chr(54), 39011 - 39003), nzTpIcepk0o8(chr(48) + chr(10366 - 10255) + '\063' + chr(0b100 + 0o57) + chr(0b1110 + 0o47), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1010000 + 0o37) + chr(0b11 + 0o60) + chr(0b101010 + 0o12) + '\060', 29518 - 29510), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(0b100001 + 0o17) + chr(0b1 + 0o66), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + '\x36' + chr(49), 62932 - 62924), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101111) + chr(1485 - 1436) + '\062' + chr(703 - 650), 8276 - 8268), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(53) + '\066', 19441 - 19433), nzTpIcepk0o8('\060' + chr(111) + '\x33' + '\x35', 15975 - 15967), nzTpIcepk0o8(chr(1534 - 1486) + '\157' + chr(1969 - 1918) + '\x36' + '\x32', 17013 - 17005), nzTpIcepk0o8('\060' + chr(863 - 752) + chr(0b101111 + 0o2) + chr(54) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100001 + 0o23) + chr(0b10110 + 0o37), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2270 - 2219) + chr(0b100110 + 0o12) + chr(78 - 26), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(53) + chr(0b10111 + 0o37), 18441 - 18433), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(0b10110 + 0o34) + '\067', 0b1000), nzTpIcepk0o8('\060' + chr(0b101000 + 0o107) + chr(50) + chr(0b110010) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100110 + 0o111) + '\062' + chr(0b1010 + 0o46) + chr(0b101010 + 0o12), ord("\x08")), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(111) + chr(381 - 330) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b101000 + 0o13) + chr(0b110111) + '\x32', 0b1000), nzTpIcepk0o8(chr(947 - 899) + chr(0b1101111) + chr(2019 - 1970) + chr(0b101001 + 0o13) + chr(0b11011 + 0o33), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + chr(0b10000 + 0o43) + chr(1393 - 1341), 16200 - 16192), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(111) + chr(93 - 38), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + '\067' + chr(819 - 771), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(11379 - 11268) + chr(1149 - 1100) + '\066', 40313 - 40305), nzTpIcepk0o8(chr(61 - 13) + '\157' + '\062' + '\x30' + chr(0b110100), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10110 + 0o34) + chr(0b100011 + 0o21) + chr(50), 5762 - 5754), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(55) + '\066', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + '\060' + '\061', 0b1000), nzTpIcepk0o8(chr(446 - 398) + chr(5106 - 4995) + chr(50) + '\067', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + '\x37' + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(690 - 641) + chr(55) + '\060', 65456 - 65448), nzTpIcepk0o8(chr(250 - 202) + chr(111) + chr(1371 - 1321) + chr(1129 - 1076) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(111) + '\x33' + chr(54), 0b1000), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(2867 - 2756) + chr(1294 - 1245) + '\067' + '\x34', 0o10), nzTpIcepk0o8(chr(157 - 109) + chr(10700 - 10589) + '\065' + chr(562 - 510), 0o10), nzTpIcepk0o8('\x30' + chr(2253 - 2142) + chr(0b10101 + 0o41) + '\065', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(4190 - 4079) + '\x35' + '\x30', 27491 - 27483)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'`'), chr(2387 - 2287) + chr(4206 - 4105) + '\x63' + chr(0b1101111 + 0o0) + chr(5135 - 5035) + chr(0b1001000 + 0o35))(chr(0b1110101) + '\164' + chr(102) + chr(446 - 401) + chr(56)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def GjB7VGBM9g88(hXMPsSrOQzbh):
return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b')\xe7Q\xd1c\x03\xba\x8d"\xdf!\xb1y\x97\x03F\xb6\x07\'\xe5\xedw\x94'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b1001011 + 0o32))(chr(117) + '\x74' + chr(102) + '\055' + chr(2059 - 2003)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'(\xc9J\xc5u6\x92\xaa\x02\xc9!\xd8'), '\x64' + '\145' + '\x63' + chr(0b1101111) + '\x64' + '\145')(chr(6539 - 6422) + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(0b101 + 0o63)))[nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + chr(0b10010 + 0o42), 41345 - 41337)], roI3spqORKae(ES5oEprVxulp(b''), chr(100) + chr(1296 - 1195) + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(101))(chr(3802 - 3685) + chr(13434 - 13318) + '\x66' + chr(459 - 414) + chr(56)), lambda PmE5_h409JAA: roI3spqORKae(pGZg2NXRxBup.date(pGZg2NXRxBup.date.today().year, nzTpIcepk0o8(PmE5_h409JAA), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(849 - 800), 21963 - 21955)), roI3spqORKae(ES5oEprVxulp(b'=\xf6W\xe8d\x0f\xb0\x85'), chr(0b1000001 + 0o43) + '\145' + chr(0b1001100 + 0o27) + chr(111) + chr(0b1011111 + 0o5) + chr(1431 - 1330))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(0b101101) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'k\xc0'), chr(0b1100100) + '\x65' + '\x63' + chr(6821 - 6710) + '\144' + chr(0b111101 + 0o50))(chr(0b1110101) + '\x74' + chr(7609 - 7507) + '\x2d' + chr(0b111000))), lambda PmE5_h409JAA: roI3spqORKae(zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'b\xa2@\xf8u\x14\xa4\xc0<\x81(\xcep\x9d\x1eQ\xac\x1d'), '\144' + chr(0b1100101) + '\x63' + chr(111) + chr(5364 - 5264) + '\145')('\165' + chr(0b1110100) + '\146' + chr(511 - 466) + '\x38')), roI3spqORKae(ES5oEprVxulp(b'?\xb1\x16\xc5WU\xbb\x8f\x16\xee\x16\xa4'), '\x64' + '\145' + chr(99) + '\x6f' + '\x64' + chr(101))(chr(0b1110101) + '\x74' + '\146' + chr(0b101101) + chr(0b100000 + 0o30)))(PmE5_h409JAA), lambda PmE5_h409JAA: zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'b\xa2^\xbemF\xa9\x885\xde \x89u\xd2\x0b\x14\xb9'), chr(0b1100100) + chr(101) + chr(7228 - 7129) + '\x6f' + '\x64' + chr(3064 - 2963))('\165' + '\x74' + chr(0b1100110) + chr(0b101101) + chr(2183 - 2127))), lambda PmE5_h409JAA: zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'b\xa2J\xe0|\x1f\xfd\x89)\x91.\xde`'), '\144' + '\145' + chr(0b111000 + 0o53) + chr(1089 - 978) + chr(100) + '\x65')(chr(0b1100000 + 0o25) + chr(116) + chr(6486 - 6384) + chr(0b101101) + chr(0b110100 + 0o4)))) |
Salamek/cron-descriptor | cron_descriptor/ExpressionDescriptor.py | ExpressionDescriptor.get_day_of_month_description | def get_day_of_month_description(self):
"""Generates a description for only the DAYOFMONTH portion of the expression
Returns:
The DAYOFMONTH description
"""
expression = self._expression_parts[3]
expression = expression.replace("?", "*")
if expression == "L":
description = _(", on the last day of the month")
elif expression == "LW" or expression == "WL":
description = _(", on the last weekday of the month")
else:
regex = re.compile("(\\d{1,2}W)|(W\\d{1,2})")
if regex.match(expression):
m = regex.match(expression)
day_number = int(m.group().replace("W", ""))
day_string = _("first weekday") if day_number == 1 else _("weekday nearest day {0}").format(
day_number)
description = _(", on the {0} of the month").format(
day_string)
else:
description = self.get_segment_description(
expression,
_(", every day"),
lambda s: s,
lambda s: _(", every day") if s == "1" else _(", every {0} days"),
lambda s: _(", between day {0} and {1} of the month"),
lambda s: _(", on day {0} of the month")
)
return description | python | def get_day_of_month_description(self):
"""Generates a description for only the DAYOFMONTH portion of the expression
Returns:
The DAYOFMONTH description
"""
expression = self._expression_parts[3]
expression = expression.replace("?", "*")
if expression == "L":
description = _(", on the last day of the month")
elif expression == "LW" or expression == "WL":
description = _(", on the last weekday of the month")
else:
regex = re.compile("(\\d{1,2}W)|(W\\d{1,2})")
if regex.match(expression):
m = regex.match(expression)
day_number = int(m.group().replace("W", ""))
day_string = _("first weekday") if day_number == 1 else _("weekday nearest day {0}").format(
day_number)
description = _(", on the {0} of the month").format(
day_string)
else:
description = self.get_segment_description(
expression,
_(", every day"),
lambda s: s,
lambda s: _(", every day") if s == "1" else _(", every {0} days"),
lambda s: _(", between day {0} and {1} of the month"),
lambda s: _(", on day {0} of the month")
)
return description | [
"def",
"get_day_of_month_description",
"(",
"self",
")",
":",
"expression",
"=",
"self",
".",
"_expression_parts",
"[",
"3",
"]",
"expression",
"=",
"expression",
".",
"replace",
"(",
"\"?\"",
",",
"\"*\"",
")",
"if",
"expression",
"==",
"\"L\"",
":",
"description",
"=",
"_",
"(",
"\", on the last day of the month\"",
")",
"elif",
"expression",
"==",
"\"LW\"",
"or",
"expression",
"==",
"\"WL\"",
":",
"description",
"=",
"_",
"(",
"\", on the last weekday of the month\"",
")",
"else",
":",
"regex",
"=",
"re",
".",
"compile",
"(",
"\"(\\\\d{1,2}W)|(W\\\\d{1,2})\"",
")",
"if",
"regex",
".",
"match",
"(",
"expression",
")",
":",
"m",
"=",
"regex",
".",
"match",
"(",
"expression",
")",
"day_number",
"=",
"int",
"(",
"m",
".",
"group",
"(",
")",
".",
"replace",
"(",
"\"W\"",
",",
"\"\"",
")",
")",
"day_string",
"=",
"_",
"(",
"\"first weekday\"",
")",
"if",
"day_number",
"==",
"1",
"else",
"_",
"(",
"\"weekday nearest day {0}\"",
")",
".",
"format",
"(",
"day_number",
")",
"description",
"=",
"_",
"(",
"\", on the {0} of the month\"",
")",
".",
"format",
"(",
"day_string",
")",
"else",
":",
"description",
"=",
"self",
".",
"get_segment_description",
"(",
"expression",
",",
"_",
"(",
"\", every day\"",
")",
",",
"lambda",
"s",
":",
"s",
",",
"lambda",
"s",
":",
"_",
"(",
"\", every day\"",
")",
"if",
"s",
"==",
"\"1\"",
"else",
"_",
"(",
"\", every {0} days\"",
")",
",",
"lambda",
"s",
":",
"_",
"(",
"\", between day {0} and {1} of the month\"",
")",
",",
"lambda",
"s",
":",
"_",
"(",
"\", on day {0} of the month\"",
")",
")",
"return",
"description"
] | Generates a description for only the DAYOFMONTH portion of the expression
Returns:
The DAYOFMONTH description | [
"Generates",
"a",
"description",
"for",
"only",
"the",
"DAYOFMONTH",
"portion",
"of",
"the",
"expression"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionDescriptor.py#L339-L373 | train | Generates a description for only the DAYOFMONTH portion of the expression | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO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omx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(299 - 251) + chr(12097 - 11986) + chr(78 - 27) + chr(0b11100 + 0o31), ord("\x08")), nzTpIcepk0o8('\060' + chr(5778 - 5667) + '\062' + chr(838 - 787) + chr(373 - 325), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(0b110010) + chr(2340 - 2291), 26656 - 26648), nzTpIcepk0o8(chr(1595 - 1547) + '\x6f' + chr(1586 - 1536) + '\061' + '\061', ord("\x08")), nzTpIcepk0o8(chr(1124 - 1076) + chr(111) + '\062' + chr(0b11000 + 0o35) + chr(0b110001), 17874 - 17866), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + chr(1120 - 1067), 0b1000), nzTpIcepk0o8(chr(67 - 19) + chr(111) + '\063' + chr(2268 - 2219) + chr(55), 0o10), nzTpIcepk0o8(chr(48) + chr(3273 - 3162) + chr(1045 - 995) + '\x32' + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110101) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + chr(1821 - 1710) + chr(2240 - 2185) + chr(1820 - 1769), ord("\x08")), nzTpIcepk0o8('\x30' + chr(5597 - 5486) + chr(0b101010 + 0o7) + '\062' + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + chr(0b110011) + '\x35', 47582 - 47574), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(0b1110 + 0o45) + '\063', 43330 - 43322), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + '\060' + chr(0b101111 + 0o6), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(1035 - 986) + chr(0b100111 + 0o12) + '\066', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110111 + 0o0) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\157' + chr(2151 - 2101) + chr(0b110110) + chr(1286 - 1238), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(0b100 + 0o54) + '\060', 0b1000), nzTpIcepk0o8('\060' + chr(0b101001 + 0o106) + chr(0b110011) + '\x37' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(1204 - 1156) + chr(215 - 104) + '\063' + '\062' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(2548 - 2494) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(111) + chr(49) + chr(0b100001 + 0o25) + chr(0b100000 + 0o24), 21118 - 21110), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110110), 52059 - 52051), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10100 + 0o42), 8), nzTpIcepk0o8(chr(644 - 596) + '\157' + '\x32' + '\064' + chr(53), 63557 - 63549), nzTpIcepk0o8(chr(892 - 844) + chr(0b11000 + 0o127) + chr(382 - 328), 8), nzTpIcepk0o8('\x30' + chr(0b1010110 + 0o31) + chr(0b11110 + 0o24) + '\062' + chr(0b110011 + 0o0), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1010 + 0o145) + '\061' + '\x35' + chr(53), 18244 - 18236), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\x6f' + chr(0b11101 + 0o26) + chr(1719 - 1668) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110 + 0o55) + chr(1863 - 1813) + chr(0b10000 + 0o47), 8), nzTpIcepk0o8('\060' + chr(111) + chr(50), 31935 - 31927), nzTpIcepk0o8(chr(0b110000) + chr(9834 - 9723) + chr(0b11111 + 0o25) + '\062', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1000010 + 0o55) + chr(0b110010) + chr(48) + '\x31', 45360 - 45352), nzTpIcepk0o8('\060' + chr(111) + chr(2890 - 2835) + chr(0b110000), 8), nzTpIcepk0o8(chr(2089 - 2041) + '\x6f' + chr(1186 - 1134) + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50), 8), nzTpIcepk0o8('\060' + '\157' + chr(49) + chr(1676 - 1626) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(795 - 747) + '\x6f' + chr(1561 - 1511) + chr(0b11 + 0o62) + '\x37', 41719 - 41711), nzTpIcepk0o8('\x30' + chr(111) + chr(1937 - 1887) + chr(1073 - 1022) + '\x30', 8), nzTpIcepk0o8('\x30' + chr(0b11101 + 0o122) + chr(833 - 783) + chr(0b101101 + 0o11) + '\066', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(111) + '\x35' + chr(0b110000), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'3'), '\144' + chr(101) + chr(0b1100011) + chr(0b1101 + 0o142) + chr(0b111100 + 0o50) + chr(0b100011 + 0o102))('\165' + '\164' + chr(0b1100110) + '\x2d' + chr(0b100101 + 0o23)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def NPz6XHUnuExe(hXMPsSrOQzbh):
Jni_E12Y8D3Y = hXMPsSrOQzbh.fKoKePOJExt6[nzTpIcepk0o8('\060' + '\x6f' + chr(1847 - 1796), 0o10)]
Jni_E12Y8D3Y = Jni_E12Y8D3Y.E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b'"'), '\144' + chr(101) + chr(99) + '\x6f' + chr(100) + chr(101))('\165' + '\x74' + '\x66' + '\055' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'7'), '\x64' + chr(2012 - 1911) + chr(0b100100 + 0o77) + chr(0b1101111) + chr(0b1000110 + 0o36) + chr(0b1011 + 0o132))(chr(0b1011100 + 0o31) + chr(0b1001110 + 0o46) + chr(102) + chr(45) + chr(56)))
if Jni_E12Y8D3Y == roI3spqORKae(ES5oEprVxulp(b'Q'), '\144' + chr(4697 - 4596) + chr(0b1100011) + '\x6f' + chr(9883 - 9783) + chr(5735 - 5634))(chr(117) + chr(2561 - 2445) + '\146' + chr(1000 - 955) + '\070'):
HPRlMhFQZATD = zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'1\xb8>\xe7\x89a\xa7\xf6\x0eW5\xee\xafe*Y\xc9`\x90\xb1R\x00nc\x85k\xfc\x03\xad\xbf'), chr(7080 - 6980) + chr(8374 - 8273) + chr(99) + '\157' + chr(0b1100100) + chr(0b111101 + 0o50))(chr(8488 - 8371) + chr(0b1110100) + chr(0b1001000 + 0o36) + '\055' + chr(0b111000)))
elif Jni_E12Y8D3Y == roI3spqORKae(ES5oEprVxulp(b'Q\xcf'), '\x64' + '\x65' + chr(6229 - 6130) + '\x6f' + chr(2668 - 2568) + '\x65')(chr(4262 - 4145) + chr(8889 - 8773) + chr(102) + chr(45) + chr(1671 - 1615)) or Jni_E12Y8D3Y == roI3spqORKae(ES5oEprVxulp(b'J\xd4'), chr(1223 - 1123) + '\x65' + chr(0b1100011) + chr(1083 - 972) + chr(0b1100100) + chr(6704 - 6603))(chr(117) + chr(0b100000 + 0o124) + '\x66' + chr(0b100 + 0o51) + chr(0b111000)):
HPRlMhFQZATD = zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'1\xb8>\xe7\x89a\xa7\xf6\x0eW5\xee\xafe9]\xd5+\x9b\xb6\x0bTi`\x85r\xfb\x08\xf9\xbamL\xf5P'), chr(0b1100100) + chr(0b111111 + 0o46) + chr(0b1100011) + chr(0b1010110 + 0o31) + '\x64' + chr(101))(chr(117) + '\164' + chr(4705 - 4603) + chr(0b100 + 0o51) + '\070'))
else:
wjX8Ux7gSdNg = aoTc4YA2bs2R.compile(roI3spqORKae(ES5oEprVxulp(b'5\xc45\xf2\x989\xfd\xeey\x12(\xb5\x8c\x19*C\x81l\xcd\xaa['), chr(100) + '\145' + '\x63' + chr(0b1101111) + chr(0b100111 + 0o75) + chr(0b110101 + 0o60))(chr(0b10110 + 0o137) + chr(0b1110100) + '\146' + '\055' + chr(0b111000)))
if roI3spqORKae(wjX8Ux7gSdNg, roI3spqORKae(ES5oEprVxulp(b'u\xf3h\xc6\xc0\x7f\xa2\xfamd.\xdc'), chr(1917 - 1817) + '\145' + '\x63' + chr(0b1101111) + '\144' + chr(0b1100101))('\165' + chr(116) + chr(102) + chr(0b101101) + chr(2625 - 2569)))(Jni_E12Y8D3Y):
tF75nqoNENFL = wjX8Ux7gSdNg.hk9OijmiC_zA(Jni_E12Y8D3Y)
yYXWRh12yWFF = nzTpIcepk0o8(tF75nqoNENFL.group().E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b'J'), '\x64' + '\x65' + chr(0b110110 + 0o55) + '\x6f' + '\x64' + chr(7686 - 7585))(chr(13386 - 13269) + chr(116) + chr(0b1001101 + 0o31) + chr(0b101101) + chr(716 - 660)), roI3spqORKae(ES5oEprVxulp(b''), '\144' + chr(7143 - 7042) + chr(99) + chr(7443 - 7332) + '\x64' + chr(101))(chr(117) + chr(4478 - 4362) + chr(9963 - 9861) + '\055' + chr(0b101001 + 0o17))))
CzIgewFizCFK = zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'{\xf1#\xfa\xdd5\xb8\xf6KP0\xfc\xa2'), chr(0b1100100) + chr(3053 - 2952) + chr(0b1001011 + 0o30) + chr(0b111100 + 0o63) + '\144' + chr(0b1100101))(chr(10590 - 10473) + chr(997 - 881) + '\x66' + '\x2d' + chr(0b111000))) if yYXWRh12yWFF == nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1101000 + 0o7) + '\x31', ord("\x08")) else zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'j\xfd4\xe2\xcdt\xb6\xb3@^5\xef\xbe6:\x18\xd4!\x86\xf7\tD{'), chr(0b1001100 + 0o30) + chr(101) + '\x63' + '\x6f' + '\144' + '\145')('\x75' + chr(0b1110100) + '\146' + chr(0b10101 + 0o30) + '\x38')).q33KG3foQ_CJ(yYXWRh12yWFF)
HPRlMhFQZATD = zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'1\xb8>\xe7\x89a\xa7\xf6\x0e@d\xe0\xfb*(\x18\xc4(\x9a\xf7\x1f\x1bhr\xcd'), chr(0b111111 + 0o45) + '\145' + '\x63' + chr(0b10100 + 0o133) + chr(0b1100100) + chr(0b1011010 + 0o13))(chr(0b1100100 + 0o21) + '\164' + chr(1051 - 949) + chr(0b101101) + chr(0b10 + 0o66))).q33KG3foQ_CJ(CzIgewFizCFK)
else:
HPRlMhFQZATD = hXMPsSrOQzbh.get_segment_description(Jni_E12Y8D3Y, zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'1\xb84\xff\xccg\xb6\xb3JZ-'), chr(3546 - 3446) + chr(0b110001 + 0o64) + '\143' + chr(277 - 166) + chr(100) + '\145')(chr(3316 - 3199) + chr(8686 - 8570) + '\x66' + chr(918 - 873) + chr(3049 - 2993))), lambda PmE5_h409JAA: PmE5_h409JAA, lambda PmE5_h409JAA: zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'1\xb84\xff\xccg\xb6\xb3JZ-'), chr(100) + '\x65' + chr(99) + chr(0b1011001 + 0o26) + '\144' + chr(0b10110 + 0o117))('\x75' + chr(116) + chr(0b110100 + 0o62) + chr(0b101101) + chr(0b10010 + 0o46))) if PmE5_h409JAA == roI3spqORKae(ES5oEprVxulp(b','), chr(0b10100 + 0o120) + chr(0b1001111 + 0o26) + chr(4080 - 3981) + chr(0b1101111) + chr(3058 - 2958) + chr(0b1000100 + 0o41))(chr(2405 - 2288) + chr(2288 - 2172) + chr(0b1100001 + 0o5) + '\x2d' + chr(0b110100 + 0o4)) else zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'1\xb84\xff\xccg\xb6\xb3U\x0b)\xbd\xbf$7K'), chr(0b1100100) + chr(0b1011011 + 0o12) + chr(99) + '\157' + chr(0b1011101 + 0o7) + '\145')('\x75' + chr(0b1100100 + 0o20) + chr(193 - 91) + '\055' + '\070')), lambda PmE5_h409JAA: zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'1\xb83\xec\xddb\xaa\xf6@\x1b0\xfc\xa2e5\x08\xcd`\x9e\xb9\x16T}7\xd8&\xfc\x0b\xf9\xa3jG\xa1UKl$\xc7'), chr(3628 - 3528) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(8250 - 8133) + chr(3049 - 2933) + '\x66' + chr(1587 - 1542) + chr(101 - 45))), lambda PmE5_h409JAA: zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'1\xb8>\xe7\x89q\xae\xea\x0e@d\xe0\xfb*(\x18\xc4(\x9a\xf7\x1f\x1bhr\xcd'), chr(0b1100100) + chr(246 - 145) + chr(0b111001 + 0o52) + '\157' + chr(8091 - 7991) + chr(101))('\x75' + chr(116) + '\x66' + '\x2d' + chr(56))))
return HPRlMhFQZATD |
Salamek/cron-descriptor | cron_descriptor/ExpressionDescriptor.py | ExpressionDescriptor.get_year_description | def get_year_description(self):
"""Generates a description for only the YEAR portion of the expression
Returns:
The YEAR description
"""
def format_year(s):
regex = re.compile(r"^\d+$")
if regex.match(s):
year_int = int(s)
if year_int < 1900:
return year_int
return datetime.date(year_int, 1, 1).strftime("%Y")
else:
return s
return self.get_segment_description(
self._expression_parts[6],
'',
lambda s: format_year(s),
lambda s: _(", every {0} years").format(s),
lambda s: _(", {0} through {1}"),
lambda s: _(", only in {0}")
) | python | def get_year_description(self):
"""Generates a description for only the YEAR portion of the expression
Returns:
The YEAR description
"""
def format_year(s):
regex = re.compile(r"^\d+$")
if regex.match(s):
year_int = int(s)
if year_int < 1900:
return year_int
return datetime.date(year_int, 1, 1).strftime("%Y")
else:
return s
return self.get_segment_description(
self._expression_parts[6],
'',
lambda s: format_year(s),
lambda s: _(", every {0} years").format(s),
lambda s: _(", {0} through {1}"),
lambda s: _(", only in {0}")
) | [
"def",
"get_year_description",
"(",
"self",
")",
":",
"def",
"format_year",
"(",
"s",
")",
":",
"regex",
"=",
"re",
".",
"compile",
"(",
"r\"^\\d+$\"",
")",
"if",
"regex",
".",
"match",
"(",
"s",
")",
":",
"year_int",
"=",
"int",
"(",
"s",
")",
"if",
"year_int",
"<",
"1900",
":",
"return",
"year_int",
"return",
"datetime",
".",
"date",
"(",
"year_int",
",",
"1",
",",
"1",
")",
".",
"strftime",
"(",
"\"%Y\"",
")",
"else",
":",
"return",
"s",
"return",
"self",
".",
"get_segment_description",
"(",
"self",
".",
"_expression_parts",
"[",
"6",
"]",
",",
"''",
",",
"lambda",
"s",
":",
"format_year",
"(",
"s",
")",
",",
"lambda",
"s",
":",
"_",
"(",
"\", every {0} years\"",
")",
".",
"format",
"(",
"s",
")",
",",
"lambda",
"s",
":",
"_",
"(",
"\", {0} through {1}\"",
")",
",",
"lambda",
"s",
":",
"_",
"(",
"\", only in {0}\"",
")",
")"
] | Generates a description for only the YEAR portion of the expression
Returns:
The YEAR description | [
"Generates",
"a",
"description",
"for",
"only",
"the",
"YEAR",
"portion",
"of",
"the",
"expression"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionDescriptor.py#L375-L400 | train | Generates a description for only the YEAR portion of the expression
| GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi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nU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + '\x34' + '\x36', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(0b110110) + chr(0b1000 + 0o57), 50559 - 50551), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11111 + 0o25) + '\064', 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + chr(1453 - 1402) + chr(0b10101 + 0o36), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(51) + chr(228 - 179), 0b1000), nzTpIcepk0o8('\060' + chr(6259 - 6148) + '\x32' + chr(0b110110) + '\067', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b0 + 0o62) + '\x32' + chr(0b11110 + 0o25), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(0b110100) + chr(1547 - 1497), 0b1000), nzTpIcepk0o8('\x30' + chr(9225 - 9114) + chr(0b101110 + 0o5) + '\x33' + chr(55), 47406 - 47398), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + '\064', 7040 - 7032), nzTpIcepk0o8('\x30' + chr(0b111000 + 0o67) + chr(0b100101 + 0o14) + chr(0b110100) + '\x32', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b0 + 0o64) + chr(0b110001), 35360 - 35352), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(49) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(5428 - 5317) + chr(49) + chr(1707 - 1653) + chr(55), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100001 + 0o21) + chr(2277 - 2222) + chr(0b100111 + 0o17), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(52), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(1101 - 1050) + '\x36', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + chr(49) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(760 - 712) + '\x6f' + chr(0b110101) + '\066', 0b1000), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1011001 + 0o26) + chr(0b100001 + 0o21) + chr(0b110011 + 0o0) + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1000 + 0o147) + chr(0b11111 + 0o23) + '\x30' + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110110) + chr(0b100100 + 0o16), ord("\x08")), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + chr(54) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b10 + 0o56) + '\157' + chr(55) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1010111 + 0o30) + chr(51) + '\067', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(1506 - 1456) + chr(220 - 172) + chr(1809 - 1757), 8), nzTpIcepk0o8('\060' + '\157' + chr(0b10100 + 0o37) + chr(54) + '\x31', 61025 - 61017), nzTpIcepk0o8(chr(0b10 + 0o56) + '\x6f' + '\062' + chr(50) + '\x34', 0b1000), nzTpIcepk0o8('\060' + chr(0b111101 + 0o62) + '\x32' + chr(49) + chr(0b100000 + 0o25), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b1001 + 0o52) + chr(1423 - 1368) + chr(0b100100 + 0o23), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(49) + chr(1139 - 1085), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b11101 + 0o122) + '\061' + chr(0b10110 + 0o33) + chr(1962 - 1914), 27201 - 27193), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + chr(0b110011) + chr(0b110110), 8), nzTpIcepk0o8(chr(1181 - 1133) + chr(0b1011100 + 0o23) + chr(0b110011) + chr(0b10101 + 0o35) + chr(54), 60250 - 60242), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(0b110110 + 0o0), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(0b10000 + 0o47) + '\x37', 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101110 + 0o4) + chr(0b100 + 0o61) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(0b110011) + chr(0b100111 + 0o20), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1734 - 1681) + '\x35', 35828 - 35820), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + '\062' + chr(51), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\157' + chr(853 - 800) + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'H'), chr(6177 - 6077) + chr(101) + '\x63' + '\157' + chr(9903 - 9803) + '\x65')(chr(117) + chr(0b100011 + 0o121) + chr(0b1100110) + chr(45) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def c3DqajX7cPZ6(hXMPsSrOQzbh):
def No9Y2SKsOkwu(PmE5_h409JAA):
wjX8Ux7gSdNg = aoTc4YA2bs2R.compile(roI3spqORKae(ES5oEprVxulp(b'8+@\xb0\xfd'), '\x64' + chr(101) + '\143' + chr(111) + chr(0b1000001 + 0o43) + chr(4175 - 4074))('\x75' + chr(2379 - 2263) + chr(9257 - 9155) + chr(1425 - 1380) + chr(0b111000)))
if roI3spqORKae(wjX8Ux7gSdNg, roI3spqORKae(ES5oEprVxulp(b'\x0e\x1c\x1d\xd4\xb0\xdd\xfe\x8b\x9cK\x18`'), chr(0b1100100) + chr(7456 - 7355) + '\143' + chr(111) + chr(100) + chr(0b1100101))(chr(8205 - 8088) + chr(116) + chr(8336 - 8234) + chr(45) + chr(56)))(PmE5_h409JAA):
KkpkmnUVgbyn = nzTpIcepk0o8(PmE5_h409JAA)
if KkpkmnUVgbyn < nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(0b110101) + chr(0b110101) + chr(687 - 635), 418 - 410):
return KkpkmnUVgbyn
return roI3spqORKae(pGZg2NXRxBup.date(KkpkmnUVgbyn, nzTpIcepk0o8('\060' + '\x6f' + chr(546 - 497), 53236 - 53228), nzTpIcepk0o8(chr(1632 - 1584) + chr(111) + '\x31', 8)), roI3spqORKae(ES5oEprVxulp(b'\x15\x03V\xfd\xad\xde\xfe\x87'), chr(0b1100100) + '\145' + chr(9094 - 8995) + chr(111) + chr(0b1100100) + chr(7108 - 7007))(chr(0b1110101) + chr(116) + chr(102) + '\055' + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'C.'), chr(0b111110 + 0o46) + chr(0b1100101) + chr(0b1100001 + 0o2) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b1100010 + 0o23) + chr(0b1001101 + 0o47) + '\x66' + chr(0b11 + 0o52) + chr(0b100101 + 0o23)))
else:
return PmE5_h409JAA
return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x01\x12P\xc4\xaa\xd2\xf4\x8f\xbaz\x16~*\x12\xcdgl\xe2^\xe9\xed]Z'), chr(0b11011 + 0o111) + '\x65' + chr(99) + '\x6f' + chr(0b1100100) + '\x65')('\x75' + '\x74' + chr(0b1100110) + chr(45) + chr(0b1011 + 0o55)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x00<K\xd0\xbc\xe7\xdc\xa8\x9al\x16\x17'), '\144' + chr(101) + '\x63' + chr(111) + chr(777 - 677) + chr(101))(chr(117) + '\164' + '\x66' + chr(1425 - 1380) + chr(1069 - 1013)))[nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1101111) + chr(54), 0o10)], roI3spqORKae(ES5oEprVxulp(b''), chr(100) + chr(6714 - 6613) + '\x63' + '\x6f' + chr(5228 - 5128) + chr(0b1100101))('\x75' + '\164' + '\x66' + chr(0b100110 + 0o7) + chr(0b111000)), lambda PmE5_h409JAA: No9Y2SKsOkwu(PmE5_h409JAA), lambda PmE5_h409JAA: roI3spqORKae(zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'JWA\xed\xbc\xc5\xea\xc2\xa4$\x1f\x017\x12\xdfvm'), chr(0b110 + 0o136) + '\145' + '\x63' + '\157' + chr(100) + chr(101))(chr(117) + chr(0b10011 + 0o141) + '\146' + '\x2d' + '\x38')), roI3spqORKae(ES5oEprVxulp(b'\x17D\x17\xd0\x9e\x84\xf5\x8d\x8eK!k'), chr(100) + chr(5433 - 5332) + '\143' + chr(0b1101111) + '\144' + chr(101))(chr(0b1110101) + chr(0b1001001 + 0o53) + '\146' + chr(45) + chr(56)))(PmE5_h409JAA), lambda PmE5_h409JAA: zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'JW_\xab\xa4\x97\xe7\x8a\xad{\x17F&W\xc55c'), chr(0b1100100) + chr(0b1100101) + chr(99) + '\157' + chr(100) + '\145')('\x75' + chr(0b1110100) + chr(7582 - 7480) + chr(0b11111 + 0o16) + '\070')), lambda PmE5_h409JAA: zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'JWK\xf5\xb5\xce\xb3\x8b\xb14\x19\x113'), chr(100) + chr(0b110010 + 0o63) + chr(6751 - 6652) + '\x6f' + chr(0b101110 + 0o66) + '\145')('\165' + '\x74' + chr(102) + '\x2d' + '\x38'))) |
Salamek/cron-descriptor | cron_descriptor/ExpressionDescriptor.py | ExpressionDescriptor.get_segment_description | def get_segment_description(
self,
expression,
all_description,
get_single_item_description,
get_interval_description_format,
get_between_description_format,
get_description_format
):
"""Returns segment description
Args:
expression: Segment to descript
all_description: *
get_single_item_description: 1
get_interval_description_format: 1/2
get_between_description_format: 1-2
get_description_format: format get_single_item_description
Returns:
segment description
"""
description = None
if expression is None or expression == '':
description = ''
elif expression == "*":
description = all_description
elif any(ext in expression for ext in ['/', '-', ',']) is False:
description = get_description_format(expression).format(
get_single_item_description(expression))
elif "/" in expression:
segments = expression.split('/')
description = get_interval_description_format(
segments[1]).format(get_single_item_description(segments[1]))
# interval contains 'between' piece (i.e. 2-59/3 )
if "-" in segments[0]:
between_segment_description = self.generate_between_segment_description(
segments[0], get_between_description_format, get_single_item_description)
if not between_segment_description.startswith(", "):
description += ", "
description += between_segment_description
elif any(ext in segments[0] for ext in ['*', ',']) is False:
range_item_description = get_description_format(segments[0]).format(
get_single_item_description(segments[0])
)
range_item_description = range_item_description.replace(", ", "")
description += _(", starting {0}").format(range_item_description)
elif "," in expression:
segments = expression.split(',')
description_content = ''
for i, segment in enumerate(segments):
if i > 0 and len(segments) > 2:
description_content += ","
if i < len(segments) - 1:
description_content += " "
if i > 0 and len(segments) > 1 and (i == len(segments) - 1 or len(segments) == 2):
description_content += _(" and ")
if "-" in segment:
between_description = self.generate_between_segment_description(
segment,
lambda s: _(", {0} through {1}"),
get_single_item_description
)
between_description = between_description.replace(", ", "")
description_content += between_description
else:
description_content += get_single_item_description(segment)
description = get_description_format(
expression).format(
description_content)
elif "-" in expression:
description = self.generate_between_segment_description(
expression, get_between_description_format, get_single_item_description)
return description | python | def get_segment_description(
self,
expression,
all_description,
get_single_item_description,
get_interval_description_format,
get_between_description_format,
get_description_format
):
"""Returns segment description
Args:
expression: Segment to descript
all_description: *
get_single_item_description: 1
get_interval_description_format: 1/2
get_between_description_format: 1-2
get_description_format: format get_single_item_description
Returns:
segment description
"""
description = None
if expression is None or expression == '':
description = ''
elif expression == "*":
description = all_description
elif any(ext in expression for ext in ['/', '-', ',']) is False:
description = get_description_format(expression).format(
get_single_item_description(expression))
elif "/" in expression:
segments = expression.split('/')
description = get_interval_description_format(
segments[1]).format(get_single_item_description(segments[1]))
# interval contains 'between' piece (i.e. 2-59/3 )
if "-" in segments[0]:
between_segment_description = self.generate_between_segment_description(
segments[0], get_between_description_format, get_single_item_description)
if not between_segment_description.startswith(", "):
description += ", "
description += between_segment_description
elif any(ext in segments[0] for ext in ['*', ',']) is False:
range_item_description = get_description_format(segments[0]).format(
get_single_item_description(segments[0])
)
range_item_description = range_item_description.replace(", ", "")
description += _(", starting {0}").format(range_item_description)
elif "," in expression:
segments = expression.split(',')
description_content = ''
for i, segment in enumerate(segments):
if i > 0 and len(segments) > 2:
description_content += ","
if i < len(segments) - 1:
description_content += " "
if i > 0 and len(segments) > 1 and (i == len(segments) - 1 or len(segments) == 2):
description_content += _(" and ")
if "-" in segment:
between_description = self.generate_between_segment_description(
segment,
lambda s: _(", {0} through {1}"),
get_single_item_description
)
between_description = between_description.replace(", ", "")
description_content += between_description
else:
description_content += get_single_item_description(segment)
description = get_description_format(
expression).format(
description_content)
elif "-" in expression:
description = self.generate_between_segment_description(
expression, get_between_description_format, get_single_item_description)
return description | [
"def",
"get_segment_description",
"(",
"self",
",",
"expression",
",",
"all_description",
",",
"get_single_item_description",
",",
"get_interval_description_format",
",",
"get_between_description_format",
",",
"get_description_format",
")",
":",
"description",
"=",
"None",
"if",
"expression",
"is",
"None",
"or",
"expression",
"==",
"''",
":",
"description",
"=",
"''",
"elif",
"expression",
"==",
"\"*\"",
":",
"description",
"=",
"all_description",
"elif",
"any",
"(",
"ext",
"in",
"expression",
"for",
"ext",
"in",
"[",
"'/'",
",",
"'-'",
",",
"','",
"]",
")",
"is",
"False",
":",
"description",
"=",
"get_description_format",
"(",
"expression",
")",
".",
"format",
"(",
"get_single_item_description",
"(",
"expression",
")",
")",
"elif",
"\"/\"",
"in",
"expression",
":",
"segments",
"=",
"expression",
".",
"split",
"(",
"'/'",
")",
"description",
"=",
"get_interval_description_format",
"(",
"segments",
"[",
"1",
"]",
")",
".",
"format",
"(",
"get_single_item_description",
"(",
"segments",
"[",
"1",
"]",
")",
")",
"# interval contains 'between' piece (i.e. 2-59/3 )",
"if",
"\"-\"",
"in",
"segments",
"[",
"0",
"]",
":",
"between_segment_description",
"=",
"self",
".",
"generate_between_segment_description",
"(",
"segments",
"[",
"0",
"]",
",",
"get_between_description_format",
",",
"get_single_item_description",
")",
"if",
"not",
"between_segment_description",
".",
"startswith",
"(",
"\", \"",
")",
":",
"description",
"+=",
"\", \"",
"description",
"+=",
"between_segment_description",
"elif",
"any",
"(",
"ext",
"in",
"segments",
"[",
"0",
"]",
"for",
"ext",
"in",
"[",
"'*'",
",",
"','",
"]",
")",
"is",
"False",
":",
"range_item_description",
"=",
"get_description_format",
"(",
"segments",
"[",
"0",
"]",
")",
".",
"format",
"(",
"get_single_item_description",
"(",
"segments",
"[",
"0",
"]",
")",
")",
"range_item_description",
"=",
"range_item_description",
".",
"replace",
"(",
"\", \"",
",",
"\"\"",
")",
"description",
"+=",
"_",
"(",
"\", starting {0}\"",
")",
".",
"format",
"(",
"range_item_description",
")",
"elif",
"\",\"",
"in",
"expression",
":",
"segments",
"=",
"expression",
".",
"split",
"(",
"','",
")",
"description_content",
"=",
"''",
"for",
"i",
",",
"segment",
"in",
"enumerate",
"(",
"segments",
")",
":",
"if",
"i",
">",
"0",
"and",
"len",
"(",
"segments",
")",
">",
"2",
":",
"description_content",
"+=",
"\",\"",
"if",
"i",
"<",
"len",
"(",
"segments",
")",
"-",
"1",
":",
"description_content",
"+=",
"\" \"",
"if",
"i",
">",
"0",
"and",
"len",
"(",
"segments",
")",
">",
"1",
"and",
"(",
"i",
"==",
"len",
"(",
"segments",
")",
"-",
"1",
"or",
"len",
"(",
"segments",
")",
"==",
"2",
")",
":",
"description_content",
"+=",
"_",
"(",
"\" and \"",
")",
"if",
"\"-\"",
"in",
"segment",
":",
"between_description",
"=",
"self",
".",
"generate_between_segment_description",
"(",
"segment",
",",
"lambda",
"s",
":",
"_",
"(",
"\", {0} through {1}\"",
")",
",",
"get_single_item_description",
")",
"between_description",
"=",
"between_description",
".",
"replace",
"(",
"\", \"",
",",
"\"\"",
")",
"description_content",
"+=",
"between_description",
"else",
":",
"description_content",
"+=",
"get_single_item_description",
"(",
"segment",
")",
"description",
"=",
"get_description_format",
"(",
"expression",
")",
".",
"format",
"(",
"description_content",
")",
"elif",
"\"-\"",
"in",
"expression",
":",
"description",
"=",
"self",
".",
"generate_between_segment_description",
"(",
"expression",
",",
"get_between_description_format",
",",
"get_single_item_description",
")",
"return",
"description"
] | Returns segment description
Args:
expression: Segment to descript
all_description: *
get_single_item_description: 1
get_interval_description_format: 1/2
get_between_description_format: 1-2
get_description_format: format get_single_item_description
Returns:
segment description | [
"Returns",
"segment",
"description",
"Args",
":",
"expression",
":",
"Segment",
"to",
"descript",
"all_description",
":",
"*",
"get_single_item_description",
":",
"1",
"get_interval_description_format",
":",
"1",
"/",
"2",
"get_between_description_format",
":",
"1",
"-",
"2",
"get_description_format",
":",
"format",
"get_single_item_description",
"Returns",
":",
"segment",
"description"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionDescriptor.py#L402-L484 | train | Returns the string representation of the current entry in the language of the item in the archive. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlm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4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(4587 - 4476) + chr(50) + '\061' + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10101 + 0o35) + chr(55) + '\060', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + chr(0b110111) + chr(0b110001 + 0o5), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(1638 - 1588) + chr(0b101010 + 0o15), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(2499 - 2446) + chr(1232 - 1183), 0o10), nzTpIcepk0o8(chr(184 - 136) + '\157' + '\x32' + chr(2047 - 1997) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(586 - 537) + '\x35' + '\061', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(53) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + '\062' + chr(0b110011) + '\x36', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b10100 + 0o35) + chr(54), 34704 - 34696), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(0b110011) + '\x34', 0b1000), nzTpIcepk0o8(chr(2231 - 2183) + chr(9511 - 9400) + chr(0b110010) + '\x30' + chr(0b101100 + 0o7), 16310 - 16302), nzTpIcepk0o8(chr(48) + chr(0b101011 + 0o104) + '\x31' + chr(0b1 + 0o62) + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b10111 + 0o33) + chr(0b110001) + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + chr(1224 - 1113) + chr(0b110011) + chr(158 - 106) + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110000 + 0o1) + '\x34' + '\065', 0o10), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + '\061' + chr(1730 - 1679) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(10655 - 10544) + '\x31' + '\062' + '\066', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10000 + 0o43) + chr(2281 - 2227) + chr(215 - 162), 56079 - 56071), nzTpIcepk0o8(chr(0b110000) + chr(3682 - 3571) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(9972 - 9861) + chr(49) + chr(0b110110) + chr(955 - 900), 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\x6f' + '\x31' + '\x36' + chr(55), 8), nzTpIcepk0o8(chr(2054 - 2006) + chr(111) + chr(0b110011) + '\x37' + chr(0b1010 + 0o54), 29383 - 29375), nzTpIcepk0o8(chr(48) + chr(1344 - 1233) + chr(0b11111 + 0o23) + chr(1571 - 1520) + '\x32', 20149 - 20141), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(0b110110 + 0o1) + chr(0b1011 + 0o45), 8), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(0b110001 + 0o1) + chr(805 - 757), 51402 - 51394), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\157' + '\061' + chr(50), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + '\064' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1101111) + '\x33' + chr(0b110010) + '\062', 0o10), nzTpIcepk0o8('\x30' + chr(4641 - 4530) + '\063' + '\067' + chr(775 - 720), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + chr(0b110111) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b111 + 0o51) + '\157' + chr(0b11110 + 0o23) + '\x36' + chr(0b111 + 0o60), 8), nzTpIcepk0o8('\x30' + chr(2486 - 2375) + chr(1646 - 1596) + chr(1628 - 1575), ord("\x08")), nzTpIcepk0o8(chr(1917 - 1869) + chr(111) + chr(0b100000 + 0o26) + chr(0b110001), 2976 - 2968), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\x6f' + chr(51) + '\064' + chr(0b101101 + 0o3), 0b1000), nzTpIcepk0o8(chr(986 - 938) + chr(111) + chr(0b1110 + 0o43) + '\x31' + chr(2866 - 2812), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(10457 - 10346) + '\x33' + '\066' + chr(0b110101), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(0b110011) + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b110110) + '\060', 10633 - 10625), nzTpIcepk0o8(chr(1062 - 1014) + chr(6788 - 6677) + chr(49) + '\063' + chr(0b1001 + 0o51), 33368 - 33360)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000 + 0o0) + '\x6f' + chr(2593 - 2540) + '\060', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa1'), chr(5548 - 5448) + chr(0b1100101) + chr(8521 - 8422) + chr(0b10100 + 0o133) + chr(9874 - 9774) + '\x65')('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b111 + 0o46) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def _klLQyGItUUU(hXMPsSrOQzbh, Jni_E12Y8D3Y, Zhrlj3MAKgtQ, toD4YmsyEORn, z05df7i8Q2il, jn_JCF5sTPkA, hcX17CIR8Hy4):
HPRlMhFQZATD = None
if Jni_E12Y8D3Y is None or Jni_E12Y8D3Y == roI3spqORKae(ES5oEprVxulp(b''), chr(3999 - 3899) + '\x65' + chr(517 - 418) + '\157' + chr(3744 - 3644) + chr(4638 - 4537))(chr(4979 - 4862) + chr(6723 - 6607) + chr(0b1100110) + '\x2d' + chr(0b100011 + 0o25)):
HPRlMhFQZATD = roI3spqORKae(ES5oEprVxulp(b''), chr(0b1100100) + chr(0b1100101) + chr(5045 - 4946) + '\x6f' + '\x64' + '\145')(chr(117) + chr(5305 - 5189) + chr(0b1100110) + chr(0b101101) + chr(0b11010 + 0o36))
elif Jni_E12Y8D3Y == roI3spqORKae(ES5oEprVxulp(b'\xa5'), chr(6689 - 6589) + chr(0b1100010 + 0o3) + '\143' + chr(0b1101111) + chr(5281 - 5181) + chr(0b1100101))('\x75' + '\x74' + chr(102) + '\x2d' + chr(56)):
HPRlMhFQZATD = Zhrlj3MAKgtQ
elif VF4pKOObtlPc((MEyQziOWmxIx in Jni_E12Y8D3Y for MEyQziOWmxIx in [roI3spqORKae(ES5oEprVxulp(b'\xa0'), chr(0b1100100) + '\x65' + chr(0b1011011 + 0o10) + chr(8676 - 8565) + chr(0b10001 + 0o123) + '\145')('\165' + chr(116) + chr(8692 - 8590) + chr(520 - 475) + chr(2620 - 2564)), roI3spqORKae(ES5oEprVxulp(b'\xa2'), chr(100) + chr(0b1100101) + chr(0b1100011) + '\x6f' + '\x64' + '\x65')(chr(117) + chr(116) + '\146' + '\055' + chr(0b101110 + 0o12)), roI3spqORKae(ES5oEprVxulp(b'\xa3'), chr(0b1100100) + chr(101) + '\x63' + chr(3507 - 3396) + '\144' + chr(101))(chr(117) + chr(116) + chr(0b1100110) + '\055' + chr(56))])) is nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1111 + 0o41), 0b1000):
HPRlMhFQZATD = hcX17CIR8Hy4(Jni_E12Y8D3Y).q33KG3foQ_CJ(toD4YmsyEORn(Jni_E12Y8D3Y))
elif roI3spqORKae(ES5oEprVxulp(b'\xa0'), chr(3718 - 3618) + '\x65' + '\x63' + chr(0b11111 + 0o120) + chr(0b1100100) + chr(0b11011 + 0o112))(chr(117) + '\x74' + chr(0b1100110) + chr(1614 - 1569) + chr(0b111000)) in Jni_E12Y8D3Y:
k8uTCnFoeBsR = Jni_E12Y8D3Y.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'\xa0'), '\144' + '\x65' + chr(0b100000 + 0o103) + chr(111) + chr(0b10101 + 0o117) + chr(1606 - 1505))(chr(117) + '\x74' + '\x66' + '\055' + chr(0b111000)))
HPRlMhFQZATD = z05df7i8Q2il(k8uTCnFoeBsR[nzTpIcepk0o8('\x30' + chr(0b1011011 + 0o24) + chr(0b10 + 0o57), 0b1000)]).q33KG3foQ_CJ(toD4YmsyEORn(k8uTCnFoeBsR[nzTpIcepk0o8('\060' + '\x6f' + '\x31', 8)]))
if roI3spqORKae(ES5oEprVxulp(b'\xa2'), chr(100) + chr(0b1100101) + chr(99) + chr(0b1101111) + '\144' + '\x65')(chr(0b1110101) + '\x74' + chr(102) + chr(0b101101) + chr(1456 - 1400)) in k8uTCnFoeBsR[nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1579 - 1531), 8)]:
jMQOHN8ZFtyP = hXMPsSrOQzbh.generate_between_segment_description(k8uTCnFoeBsR[nzTpIcepk0o8('\060' + '\157' + chr(0b100010 + 0o16), 8)], jn_JCF5sTPkA, toD4YmsyEORn)
if not roI3spqORKae(jMQOHN8ZFtyP, roI3spqORKae(ES5oEprVxulp(b'\xfc\xcc\xdf\xe5\xdd\xe6\x1eA\xeaf'), chr(100) + chr(101) + chr(0b10010 + 0o121) + chr(111) + '\144' + '\145')(chr(117) + '\164' + chr(102) + chr(0b100111 + 0o6) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\xa3\x98'), chr(100) + chr(0b1001111 + 0o26) + chr(99) + chr(0b1001111 + 0o40) + '\x64' + '\x65')(chr(117) + chr(0b1001011 + 0o51) + chr(0b1000100 + 0o42) + chr(0b101101) + chr(56))):
HPRlMhFQZATD += roI3spqORKae(ES5oEprVxulp(b'\xa3\x98'), '\144' + '\145' + chr(0b11010 + 0o111) + '\157' + chr(664 - 564) + '\145')('\x75' + chr(13339 - 13223) + chr(794 - 692) + chr(0b11010 + 0o23) + chr(1620 - 1564))
HPRlMhFQZATD += jMQOHN8ZFtyP
elif VF4pKOObtlPc((MEyQziOWmxIx in k8uTCnFoeBsR[nzTpIcepk0o8(chr(0b1100 + 0o44) + '\157' + chr(0b101001 + 0o7), 8)] for MEyQziOWmxIx in [roI3spqORKae(ES5oEprVxulp(b'\xa5'), chr(0b1100100) + chr(9131 - 9030) + chr(1353 - 1254) + chr(111) + '\144' + chr(0b10 + 0o143))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b101100 + 0o1) + chr(0b1111 + 0o51)), roI3spqORKae(ES5oEprVxulp(b'\xa3'), chr(3192 - 3092) + '\x65' + '\x63' + chr(111) + '\x64' + '\x65')(chr(0b1110101) + chr(2269 - 2153) + chr(4084 - 3982) + '\055' + chr(0b111000))])) is nzTpIcepk0o8(chr(1731 - 1683) + '\x6f' + chr(48), 8):
VL0janStRkrx = hcX17CIR8Hy4(k8uTCnFoeBsR[nzTpIcepk0o8('\060' + '\x6f' + chr(48), 8)]).q33KG3foQ_CJ(toD4YmsyEORn(k8uTCnFoeBsR[nzTpIcepk0o8('\060' + '\x6f' + chr(0b110000), 8)]))
VL0janStRkrx = VL0janStRkrx.E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b'\xa3\x98'), chr(100) + chr(0b1100101) + chr(8037 - 7938) + '\157' + chr(0b1100100) + chr(3207 - 3106))('\165' + '\x74' + chr(0b1011101 + 0o11) + '\055' + chr(56)), roI3spqORKae(ES5oEprVxulp(b''), chr(7261 - 7161) + chr(840 - 739) + chr(0b1100011) + chr(0b110110 + 0o71) + '\x64' + chr(0b1100 + 0o131))(chr(2081 - 1964) + chr(3429 - 3313) + chr(5727 - 5625) + chr(45) + chr(2801 - 2745)))
HPRlMhFQZATD += zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\xa3\x98\xcd\xe3\xc8\xe7\x1dA\xf0i\xbc\xf8o\xf3'), chr(100) + chr(9688 - 9587) + chr(0b110000 + 0o63) + '\x6f' + '\144' + '\145')('\165' + chr(11633 - 11517) + chr(102) + '\055' + '\070')).q33KG3foQ_CJ(VL0janStRkrx)
elif roI3spqORKae(ES5oEprVxulp(b'\xa3'), '\144' + chr(0b100101 + 0o100) + chr(0b1010010 + 0o21) + '\157' + '\x64' + chr(0b1000001 + 0o44))(chr(117) + chr(116) + chr(0b1100110) + chr(45) + '\070') in Jni_E12Y8D3Y:
k8uTCnFoeBsR = Jni_E12Y8D3Y.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'\xa3'), chr(7969 - 7869) + chr(3328 - 3227) + chr(99) + '\157' + chr(5298 - 5198) + '\145')('\x75' + '\164' + '\x66' + '\055' + '\070'))
fMA9cpXpjh1b = roI3spqORKae(ES5oEprVxulp(b''), '\x64' + '\x65' + chr(0b1100011) + chr(0b1100011 + 0o14) + '\x64' + chr(0b1100101))(chr(10225 - 10108) + '\x74' + '\x66' + '\055' + chr(0b111000))
for (ZlbFMSG8gCoF, hoXiElelMh2H) in _kV_Bomx8PZ4(k8uTCnFoeBsR):
if ZlbFMSG8gCoF > nzTpIcepk0o8('\x30' + chr(0b1001100 + 0o43) + chr(0b110000), 8) and ftfygxgFas5X(k8uTCnFoeBsR) > nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(7533 - 7422) + chr(0b100011 + 0o17), 0o10):
fMA9cpXpjh1b += roI3spqORKae(ES5oEprVxulp(b'\xa3'), chr(100) + chr(101) + '\x63' + chr(0b1011011 + 0o24) + chr(1668 - 1568) + chr(0b1100101))(chr(0b1001001 + 0o54) + '\164' + chr(0b1100110) + chr(0b11110 + 0o17) + chr(0b10010 + 0o46))
if ZlbFMSG8gCoF < ftfygxgFas5X(k8uTCnFoeBsR) - nzTpIcepk0o8(chr(48) + chr(0b1001100 + 0o43) + '\061', 8):
fMA9cpXpjh1b += roI3spqORKae(ES5oEprVxulp(b'\xaf'), chr(9676 - 9576) + chr(2830 - 2729) + chr(99) + '\157' + chr(0b10111 + 0o115) + '\x65')('\165' + chr(116) + '\146' + chr(0b11101 + 0o20) + chr(1847 - 1791))
if ZlbFMSG8gCoF > nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1001100 + 0o43) + chr(0b111 + 0o51), 8) and ftfygxgFas5X(k8uTCnFoeBsR) > nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001), 8) and (ZlbFMSG8gCoF == ftfygxgFas5X(k8uTCnFoeBsR) - nzTpIcepk0o8('\060' + chr(989 - 878) + '\x31', 8) or ftfygxgFas5X(k8uTCnFoeBsR) == nzTpIcepk0o8('\060' + chr(6159 - 6048) + '\062', 8)):
fMA9cpXpjh1b += zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\xaf\xd9\xd0\xf3\x89'), chr(0b111110 + 0o46) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(100) + '\x65')(chr(0b111001 + 0o74) + chr(8646 - 8530) + '\146' + chr(45) + chr(56)))
if roI3spqORKae(ES5oEprVxulp(b'\xa2'), chr(100) + '\145' + chr(0b1000111 + 0o34) + chr(0b1101110 + 0o1) + chr(100) + '\x65')('\x75' + chr(0b1110100) + chr(3340 - 3238) + chr(0b101101) + chr(0b111000)) in hoXiElelMh2H:
NmlGOk5GOIQp = hXMPsSrOQzbh.generate_between_segment_description(hoXiElelMh2H, lambda PmE5_h409JAA: zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'\xa3\x98\xc5\xa7\xd4\xb5\x1d@\xeca\xe9\xe47\xae\x9eT#'), '\144' + '\145' + chr(99) + '\x6f' + chr(0b1000010 + 0o42) + '\145')(chr(117) + '\164' + chr(9100 - 8998) + '\055' + chr(1519 - 1463))), toD4YmsyEORn)
NmlGOk5GOIQp = NmlGOk5GOIQp.E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b'\xa3\x98'), chr(6199 - 6099) + chr(3496 - 3395) + chr(0b1100011) + chr(111) + chr(0b1000001 + 0o43) + chr(0b1000001 + 0o44))('\165' + chr(116) + chr(102) + '\x2d' + chr(56)), roI3spqORKae(ES5oEprVxulp(b''), chr(100) + '\145' + '\143' + '\x6f' + chr(0b10100 + 0o120) + chr(101))(chr(0b1110101) + chr(7159 - 7043) + '\146' + '\x2d' + chr(0b111000)))
fMA9cpXpjh1b += NmlGOk5GOIQp
else:
fMA9cpXpjh1b += toD4YmsyEORn(hoXiElelMh2H)
HPRlMhFQZATD = hcX17CIR8Hy4(Jni_E12Y8D3Y).q33KG3foQ_CJ(fMA9cpXpjh1b)
elif roI3spqORKae(ES5oEprVxulp(b'\xa2'), chr(0b1000011 + 0o41) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(0b1011111 + 0o6))(chr(0b1110101) + '\x74' + chr(7971 - 7869) + chr(0b101101) + chr(56)) in Jni_E12Y8D3Y:
HPRlMhFQZATD = hXMPsSrOQzbh.generate_between_segment_description(Jni_E12Y8D3Y, jn_JCF5sTPkA, toD4YmsyEORn)
return HPRlMhFQZATD |
Salamek/cron-descriptor | cron_descriptor/ExpressionDescriptor.py | ExpressionDescriptor.generate_between_segment_description | def generate_between_segment_description(
self,
between_expression,
get_between_description_format,
get_single_item_description
):
"""
Generates the between segment description
:param between_expression:
:param get_between_description_format:
:param get_single_item_description:
:return: The between segment description
"""
description = ""
between_segments = between_expression.split('-')
between_segment_1_description = get_single_item_description(between_segments[0])
between_segment_2_description = get_single_item_description(between_segments[1])
between_segment_2_description = between_segment_2_description.replace(
":00", ":59")
between_description_format = get_between_description_format(between_expression)
description += between_description_format.format(between_segment_1_description, between_segment_2_description)
return description | python | def generate_between_segment_description(
self,
between_expression,
get_between_description_format,
get_single_item_description
):
"""
Generates the between segment description
:param between_expression:
:param get_between_description_format:
:param get_single_item_description:
:return: The between segment description
"""
description = ""
between_segments = between_expression.split('-')
between_segment_1_description = get_single_item_description(between_segments[0])
between_segment_2_description = get_single_item_description(between_segments[1])
between_segment_2_description = between_segment_2_description.replace(
":00", ":59")
between_description_format = get_between_description_format(between_expression)
description += between_description_format.format(between_segment_1_description, between_segment_2_description)
return description | [
"def",
"generate_between_segment_description",
"(",
"self",
",",
"between_expression",
",",
"get_between_description_format",
",",
"get_single_item_description",
")",
":",
"description",
"=",
"\"\"",
"between_segments",
"=",
"between_expression",
".",
"split",
"(",
"'-'",
")",
"between_segment_1_description",
"=",
"get_single_item_description",
"(",
"between_segments",
"[",
"0",
"]",
")",
"between_segment_2_description",
"=",
"get_single_item_description",
"(",
"between_segments",
"[",
"1",
"]",
")",
"between_segment_2_description",
"=",
"between_segment_2_description",
".",
"replace",
"(",
"\":00\"",
",",
"\":59\"",
")",
"between_description_format",
"=",
"get_between_description_format",
"(",
"between_expression",
")",
"description",
"+=",
"between_description_format",
".",
"format",
"(",
"between_segment_1_description",
",",
"between_segment_2_description",
")",
"return",
"description"
] | Generates the between segment description
:param between_expression:
:param get_between_description_format:
:param get_single_item_description:
:return: The between segment description | [
"Generates",
"the",
"between",
"segment",
"description",
":",
"param",
"between_expression",
":",
":",
"param",
"get_between_description_format",
":",
":",
"param",
"get_single_item_description",
":",
":",
"return",
":",
"The",
"between",
"segment",
"description"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionDescriptor.py#L486-L509 | train | Generates the between segment description | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,Zt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vXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b1101111) + chr(2278 - 2227) + '\064' + '\x37', 36676 - 36668), nzTpIcepk0o8('\x30' + chr(4180 - 4069) + chr(283 - 233) + '\063', 0b1000), nzTpIcepk0o8(chr(375 - 327) + chr(111) + chr(0b110001 + 0o0) + chr(332 - 283), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1011111 + 0o20) + chr(0b110010) + '\x35' + '\064', 27071 - 27063), nzTpIcepk0o8(chr(0b110000) + chr(0b1010110 + 0o31) + '\x33' + chr(0b1111 + 0o44) + chr(0b100111 + 0o17), ord("\x08")), nzTpIcepk0o8(chr(2005 - 1957) + chr(111) + '\x32' + '\066', 7672 - 7664), nzTpIcepk0o8(chr(1761 - 1713) + chr(111) + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(49) + chr(1188 - 1135), 46739 - 46731), nzTpIcepk0o8('\x30' + chr(0b110010 + 0o75) + '\x32' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(0b110100 + 0o3) + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b101010 + 0o105) + chr(49) + '\060' + chr(0b10000 + 0o44), 0o10), nzTpIcepk0o8(chr(627 - 579) + chr(0b1101111) + chr(1904 - 1855) + '\x35' + '\x37', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100010 + 0o21) + chr(2711 - 2657) + '\x37', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(55) + '\x37', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110101) + '\066', 34954 - 34946), nzTpIcepk0o8('\060' + chr(7499 - 7388) + '\x32' + chr(50) + '\x34', 0o10), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + chr(872 - 823) + chr(0b110010) + '\x35', 0o10), nzTpIcepk0o8('\060' + chr(6257 - 6146) + chr(51) + chr(2443 - 2390) + '\x34', 0o10), nzTpIcepk0o8('\060' + chr(0b100100 + 0o113) + chr(49) + chr(0b1010 + 0o55) + '\061', 0b1000), nzTpIcepk0o8(chr(1482 - 1434) + '\x6f' + chr(0b110011) + '\064' + '\067', 8), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(111) + chr(1025 - 975) + chr(0b110001) + chr(2095 - 2042), 8), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + '\063' + chr(394 - 342) + chr(0b110000 + 0o1), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110110) + chr(51), 7697 - 7689), nzTpIcepk0o8(chr(1352 - 1304) + chr(111) + chr(0b11010 + 0o31) + '\065' + '\x31', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(0b101000 + 0o17) + chr(0b1001 + 0o52), ord("\x08")), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(9223 - 9112) + chr(695 - 644) + chr(1500 - 1445), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(6017 - 5906) + chr(659 - 610) + chr(0b100 + 0o63) + chr(0b11011 + 0o26), 8), nzTpIcepk0o8('\060' + chr(0b110001 + 0o76) + chr(51) + '\x32' + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b100100 + 0o113) + chr(0b100001 + 0o22) + chr(0b110110) + chr(0b110111), 8), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(10791 - 10680) + chr(0b100110 + 0o15) + chr(2200 - 2147) + '\066', 49411 - 49403), nzTpIcepk0o8('\x30' + chr(0b100000 + 0o117) + chr(0b110001) + chr(54) + chr(0b110000), 47804 - 47796), nzTpIcepk0o8(chr(48) + chr(111) + chr(982 - 932) + '\x36', 8), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1100101 + 0o12) + chr(49) + chr(0b110010) + '\060', 0b1000), nzTpIcepk0o8(chr(2037 - 1989) + chr(0b1101111) + '\063' + chr(0b100010 + 0o21) + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10101 + 0o36) + '\x31' + chr(0b101101 + 0o7), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(554 - 504) + chr(0b110010) + '\x30', 0b1000), nzTpIcepk0o8(chr(1331 - 1283) + chr(11637 - 11526) + '\x33' + chr(398 - 344) + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + '\x30' + chr(0b1101 + 0o50), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + chr(0b110100) + chr(1013 - 963), 0b1000), nzTpIcepk0o8(chr(48) + chr(3530 - 3419) + '\x32' + chr(0b110011) + '\062', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1512 - 1464) + '\x6f' + '\065' + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc9'), chr(100) + chr(0b1000000 + 0o45) + '\143' + '\x6f' + chr(0b1100011 + 0o1) + chr(5106 - 5005))(chr(117) + chr(0b1110100) + chr(3358 - 3256) + '\x2d' + chr(1675 - 1619)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def YanXZnCdIyU5(hXMPsSrOQzbh, Lg4qpTc3Uaao, jn_JCF5sTPkA, toD4YmsyEORn):
HPRlMhFQZATD = roI3spqORKae(ES5oEprVxulp(b''), '\144' + chr(7223 - 7122) + '\x63' + '\x6f' + '\x64' + chr(0b1100101))(chr(0b11011 + 0o132) + chr(0b110001 + 0o103) + '\x66' + '\x2d' + chr(863 - 807))
EDEmTgfJQJCM = Lg4qpTc3Uaao.LfRrQOxuDvnC(roI3spqORKae(ES5oEprVxulp(b'\xca'), chr(100) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(100) + '\x65')('\165' + chr(0b1110100) + '\146' + '\055' + chr(0b111000)))
PC9yGYCtym7o = toD4YmsyEORn(EDEmTgfJQJCM[nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + chr(48), 0b1000)])
CpbIbAr4KsU1 = toD4YmsyEORn(EDEmTgfJQJCM[nzTpIcepk0o8(chr(0b110000) + chr(0b1100011 + 0o14) + chr(137 - 88), 8)])
CpbIbAr4KsU1 = CpbIbAr4KsU1.E91dbqOZXBpJ(roI3spqORKae(ES5oEprVxulp(b'\xdd#9'), '\144' + chr(101) + '\143' + chr(4672 - 4561) + '\144' + chr(6879 - 6778))('\165' + chr(116) + chr(0b1100110) + chr(45) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xdd&0'), '\144' + chr(9717 - 9616) + chr(399 - 300) + chr(294 - 183) + '\144' + chr(0b1100101))(chr(0b100101 + 0o120) + '\x74' + '\x66' + '\x2d' + chr(407 - 351)))
H5vtahLiTxY9 = jn_JCF5sTPkA(Lg4qpTc3Uaao)
HPRlMhFQZATD += H5vtahLiTxY9.q33KG3foQ_CJ(PC9yGYCtym7o, CpbIbAr4KsU1)
return HPRlMhFQZATD |
Salamek/cron-descriptor | cron_descriptor/ExpressionDescriptor.py | ExpressionDescriptor.format_time | def format_time(
self,
hour_expression,
minute_expression,
second_expression=''
):
"""Given time parts, will contruct a formatted time description
Args:
hour_expression: Hours part
minute_expression: Minutes part
second_expression: Seconds part
Returns:
Formatted time description
"""
hour = int(hour_expression)
period = ''
if self._options.use_24hour_time_format is False:
period = " PM" if (hour >= 12) else " AM"
if hour > 12:
hour -= 12
minute = str(int(minute_expression)) # !FIXME WUT ???
second = ''
if second_expression is not None and second_expression:
second = "{}{}".format(":", str(int(second_expression)).zfill(2))
return "{0}:{1}{2}{3}".format(str(hour).zfill(2), minute.zfill(2), second, period) | python | def format_time(
self,
hour_expression,
minute_expression,
second_expression=''
):
"""Given time parts, will contruct a formatted time description
Args:
hour_expression: Hours part
minute_expression: Minutes part
second_expression: Seconds part
Returns:
Formatted time description
"""
hour = int(hour_expression)
period = ''
if self._options.use_24hour_time_format is False:
period = " PM" if (hour >= 12) else " AM"
if hour > 12:
hour -= 12
minute = str(int(minute_expression)) # !FIXME WUT ???
second = ''
if second_expression is not None and second_expression:
second = "{}{}".format(":", str(int(second_expression)).zfill(2))
return "{0}:{1}{2}{3}".format(str(hour).zfill(2), minute.zfill(2), second, period) | [
"def",
"format_time",
"(",
"self",
",",
"hour_expression",
",",
"minute_expression",
",",
"second_expression",
"=",
"''",
")",
":",
"hour",
"=",
"int",
"(",
"hour_expression",
")",
"period",
"=",
"''",
"if",
"self",
".",
"_options",
".",
"use_24hour_time_format",
"is",
"False",
":",
"period",
"=",
"\" PM\"",
"if",
"(",
"hour",
">=",
"12",
")",
"else",
"\" AM\"",
"if",
"hour",
">",
"12",
":",
"hour",
"-=",
"12",
"minute",
"=",
"str",
"(",
"int",
"(",
"minute_expression",
")",
")",
"# !FIXME WUT ???",
"second",
"=",
"''",
"if",
"second_expression",
"is",
"not",
"None",
"and",
"second_expression",
":",
"second",
"=",
"\"{}{}\"",
".",
"format",
"(",
"\":\"",
",",
"str",
"(",
"int",
"(",
"second_expression",
")",
")",
".",
"zfill",
"(",
"2",
")",
")",
"return",
"\"{0}:{1}{2}{3}\"",
".",
"format",
"(",
"str",
"(",
"hour",
")",
".",
"zfill",
"(",
"2",
")",
",",
"minute",
".",
"zfill",
"(",
"2",
")",
",",
"second",
",",
"period",
")"
] | Given time parts, will contruct a formatted time description
Args:
hour_expression: Hours part
minute_expression: Minutes part
second_expression: Seconds part
Returns:
Formatted time description | [
"Given",
"time",
"parts",
"will",
"contruct",
"a",
"formatted",
"time",
"description",
"Args",
":",
"hour_expression",
":",
"Hours",
"part",
"minute_expression",
":",
"Minutes",
"part",
"second_expression",
":",
"Seconds",
"part",
"Returns",
":",
"Formatted",
"time",
"description"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionDescriptor.py#L511-L539 | train | This function will contruct a formatted time description for the given time parts. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,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S4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(48) + '\157' + '\x35', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b101110 + 0o6) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(129 - 81) + '\157' + '\062' + '\066' + chr(0b101101 + 0o5), ord("\x08")), nzTpIcepk0o8('\060' + chr(3127 - 3016) + '\066' + chr(0b10 + 0o65), 40435 - 40427), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1100001 + 0o16) + '\x37' + '\x30', 0o10), nzTpIcepk0o8(chr(1500 - 1452) + '\x6f' + chr(0b110001) + '\x37' + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101111 + 0o2) + chr(0b11101 + 0o32), 21517 - 21509), nzTpIcepk0o8(chr(48) + chr(0b111101 + 0o62) + chr(0b110010) + chr(0b1 + 0o65) + '\064', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(1481 - 1433), 23305 - 23297), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(111) + chr(49) + chr(0b1111 + 0o46) + '\x30', 50174 - 50166), nzTpIcepk0o8(chr(0b110000) + chr(9211 - 9100) + '\062' + chr(49) + chr(0b101100 + 0o4), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1617 - 1568) + chr(54) + chr(0b1111 + 0o50), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\x35' + chr(2252 - 2198), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(2360 - 2310) + chr(0b1 + 0o64) + chr(0b11101 + 0o26), 11723 - 11715), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\x6f' + '\x31' + chr(0b110001) + chr(0b100001 + 0o17), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(2016 - 1963), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + '\063' + chr(1896 - 1847), 0b1000), nzTpIcepk0o8('\060' + chr(2857 - 2746) + '\062' + chr(2767 - 2712) + chr(278 - 229), 0b1000), nzTpIcepk0o8(chr(439 - 391) + chr(12002 - 11891) + chr(807 - 756) + chr(52) + chr(0b1111 + 0o43), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(53) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(49) + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + chr(9270 - 9159) + '\063' + chr(1143 - 1092) + chr(0b110011 + 0o0), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101110 + 0o5) + '\063' + chr(48), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(12072 - 11961) + chr(893 - 844) + '\x37' + chr(0b1110 + 0o47), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + '\061' + '\x36', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110111) + chr(1153 - 1102), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(53), 8), nzTpIcepk0o8(chr(184 - 136) + chr(0b1101111) + '\065' + chr(0b110010), 41969 - 41961), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + '\x33' + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1300 - 1250) + '\060' + chr(0b100001 + 0o25), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(0b100100 + 0o14) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\157' + chr(1049 - 999) + chr(0b110001) + chr(0b110110), 6810 - 6802), nzTpIcepk0o8(chr(0b110000) + chr(0b10100 + 0o133) + '\x35' + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x31' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b111 + 0o52) + chr(55) + chr(0b110101), 8), nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(0b100010 + 0o24), 0b1000), nzTpIcepk0o8(chr(2256 - 2208) + chr(111) + '\x31' + chr(55) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101101 + 0o2) + '\x34' + chr(2009 - 1957), 55478 - 55470), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1100110 + 0o11) + '\063' + '\063' + '\062', 26857 - 26849), nzTpIcepk0o8(chr(664 - 616) + chr(0b100000 + 0o117) + chr(0b110001) + chr(0b110111) + '\x30', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\157' + '\x35' + chr(862 - 814), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'+'), chr(0b11010 + 0o112) + '\x65' + chr(0b1000000 + 0o43) + '\x6f' + chr(3929 - 3829) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(0b1010 + 0o134) + chr(45) + chr(0b11001 + 0o37)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def xuCOSoprVeqg(hXMPsSrOQzbh, aGJchSoqkcbA, NMFMvjEfnOj0, smtMSNTbuijE=roI3spqORKae(ES5oEprVxulp(b''), chr(5803 - 5703) + '\x65' + '\143' + '\157' + chr(0b1010000 + 0o24) + chr(101))(chr(0b1001100 + 0o51) + '\x74' + '\x66' + '\x2d' + chr(0b101100 + 0o14))):
dWFmVKbyv5fo = nzTpIcepk0o8(aGJchSoqkcbA)
JXo2RotIM1Pg = roI3spqORKae(ES5oEprVxulp(b''), '\x64' + '\x65' + chr(0b1000101 + 0o36) + chr(111) + '\x64' + chr(6163 - 6062))(chr(0b1001010 + 0o53) + chr(0b1110100) + '\146' + chr(0b11000 + 0o25) + chr(56))
if roI3spqORKae(hXMPsSrOQzbh._options, roI3spqORKae(ES5oEprVxulp(b'p\x91\xd7h\nJg\xdbu\x1a\xd7\x03\x87\xc6-Z?\xd6\x90\xc3\xae\xaf'), '\144' + chr(101) + chr(99) + chr(0b1101111) + chr(472 - 372) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(102) + chr(0b101 + 0o50) + chr(0b111000))) is nzTpIcepk0o8(chr(0b11001 + 0o27) + '\x6f' + chr(0b110000), 8):
JXo2RotIM1Pg = roI3spqORKae(ES5oEprVxulp(b'%\xb2\xff'), chr(0b100100 + 0o100) + '\x65' + chr(0b101010 + 0o71) + '\157' + '\x64' + chr(101))(chr(117) + chr(0b1010001 + 0o43) + '\146' + chr(1175 - 1130) + chr(0b111000)) if dWFmVKbyv5fo >= nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101111) + chr(1136 - 1087) + chr(0b101011 + 0o11), 0o10) else roI3spqORKae(ES5oEprVxulp(b'%\xa3\xff'), '\144' + chr(101) + '\x63' + chr(0b1000001 + 0o56) + chr(0b1100100) + chr(2871 - 2770))('\x75' + chr(12001 - 11885) + chr(0b1100110) + '\055' + '\x38')
if dWFmVKbyv5fo > nzTpIcepk0o8('\x30' + chr(3380 - 3269) + chr(49) + chr(0b10110 + 0o36), 8):
dWFmVKbyv5fo -= nzTpIcepk0o8(chr(48) + chr(0b111000 + 0o67) + '\x31' + '\x34', 8)
MHYEodhUlXjl = N9zlRy29S1SS(nzTpIcepk0o8(NMFMvjEfnOj0))
ZUQ3HHnCqJA6 = roI3spqORKae(ES5oEprVxulp(b''), chr(0b1100100) + '\x65' + '\x63' + '\x6f' + '\x64' + '\x65')('\x75' + '\x74' + '\x66' + '\055' + chr(1706 - 1650))
if smtMSNTbuijE is not None and smtMSNTbuijE:
ZUQ3HHnCqJA6 = roI3spqORKae(ES5oEprVxulp(b'~\x9f\xc9J'), chr(1245 - 1145) + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(100) + chr(0b1010110 + 0o17))('\165' + chr(8837 - 8721) + chr(0b1100110) + '\x2d' + '\070').q33KG3foQ_CJ(roI3spqORKae(ES5oEprVxulp(b'?'), chr(7947 - 7847) + '\145' + '\143' + '\157' + '\144' + chr(101))('\x75' + chr(0b1110100) + chr(0b1000101 + 0o41) + '\055' + chr(56)), N9zlRy29S1SS(nzTpIcepk0o8(smtMSNTbuijE)).vzMz2r93s66Z(nzTpIcepk0o8(chr(0b10010 + 0o36) + '\157' + chr(0b110010), 46960 - 46952)))
return roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'~\xd2\xcf\rCOr\xcf2\x15\xf3D\x93'), chr(0b101111 + 0o65) + chr(101) + chr(99) + '\157' + '\144' + chr(668 - 567))(chr(0b1110101) + '\x74' + chr(102) + '\x2d' + chr(2160 - 2104)), roI3spqORKae(ES5oEprVxulp(b't\xd1\x81|\x7fMi\xdbQ7\xcb='), chr(0b11 + 0o141) + '\145' + chr(99) + '\157' + '\x64' + chr(101))(chr(0b1010111 + 0o36) + chr(9634 - 9518) + chr(0b10010 + 0o124) + chr(0b101101) + chr(1774 - 1718)))(roI3spqORKae(N9zlRy29S1SS(dWFmVKbyv5fo), roI3spqORKae(ES5oEprVxulp(b's\x98\xffM\n\x0c6\x87s^\xbe-'), chr(100) + chr(0b1011111 + 0o6) + '\x63' + '\157' + '\144' + '\145')(chr(5167 - 5050) + chr(116) + chr(0b1100110) + '\x2d' + chr(0b1 + 0o67)))(nzTpIcepk0o8('\060' + '\157' + '\x32', 8)), roI3spqORKae(MHYEodhUlXjl, roI3spqORKae(ES5oEprVxulp(b's\x98\xffM\n\x0c6\x87s^\xbe-'), chr(100) + chr(101) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))('\165' + chr(116) + chr(0b1100110) + '\055' + chr(0b101101 + 0o13)))(nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010), 8)), ZUQ3HHnCqJA6, JXo2RotIM1Pg) |
Salamek/cron-descriptor | cron_descriptor/ExpressionDescriptor.py | ExpressionDescriptor.transform_verbosity | def transform_verbosity(self, description, use_verbose_format):
"""Transforms the verbosity of the expression description by stripping verbosity from original description
Args:
description: The description to transform
use_verbose_format: If True, will leave description as it, if False, will strip verbose parts
second_expression: Seconds part
Returns:
The transformed description with proper verbosity
"""
if use_verbose_format is False:
description = description.replace(
_(", every minute"), '')
description = description.replace(_(", every hour"), '')
description = description.replace(_(", every day"), '')
return description | python | def transform_verbosity(self, description, use_verbose_format):
"""Transforms the verbosity of the expression description by stripping verbosity from original description
Args:
description: The description to transform
use_verbose_format: If True, will leave description as it, if False, will strip verbose parts
second_expression: Seconds part
Returns:
The transformed description with proper verbosity
"""
if use_verbose_format is False:
description = description.replace(
_(", every minute"), '')
description = description.replace(_(", every hour"), '')
description = description.replace(_(", every day"), '')
return description | [
"def",
"transform_verbosity",
"(",
"self",
",",
"description",
",",
"use_verbose_format",
")",
":",
"if",
"use_verbose_format",
"is",
"False",
":",
"description",
"=",
"description",
".",
"replace",
"(",
"_",
"(",
"\", every minute\"",
")",
",",
"''",
")",
"description",
"=",
"description",
".",
"replace",
"(",
"_",
"(",
"\", every hour\"",
")",
",",
"''",
")",
"description",
"=",
"description",
".",
"replace",
"(",
"_",
"(",
"\", every day\"",
")",
",",
"''",
")",
"return",
"description"
] | Transforms the verbosity of the expression description by stripping verbosity from original description
Args:
description: The description to transform
use_verbose_format: If True, will leave description as it, if False, will strip verbose parts
second_expression: Seconds part
Returns:
The transformed description with proper verbosity | [
"Transforms",
"the",
"verbosity",
"of",
"the",
"expression",
"description",
"by",
"stripping",
"verbosity",
"from",
"original",
"description",
"Args",
":",
"description",
":",
"The",
"description",
"to",
"transform",
"use_verbose_format",
":",
"If",
"True",
"will",
"leave",
"description",
"as",
"it",
"if",
"False",
"will",
"strip",
"verbose",
"parts",
"second_expression",
":",
"Seconds",
"part",
"Returns",
":",
"The",
"transformed",
"description",
"with",
"proper",
"verbosity"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionDescriptor.py#L541-L556 | train | Transforms the verbosity of the expression description by stripping the verbosity from original description | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsO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Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100010 + 0o16) + '\157' + chr(167 - 118) + '\062' + '\066', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(247 - 196) + chr(1070 - 1016) + chr(2136 - 2085), 0o10), nzTpIcepk0o8('\x30' + chr(0b110000 + 0o77) + chr(1051 - 1000) + chr(0b101000 + 0o10) + chr(100 - 51), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(1647 - 1596) + chr(0b1111 + 0o43) + chr(1690 - 1636), 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1101111) + chr(0b1111 + 0o43) + chr(0b100111 + 0o11) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + '\065' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(1442 - 1394) + chr(9401 - 9290) + chr(1759 - 1706) + chr(54), 0b1000), nzTpIcepk0o8(chr(76 - 28) + chr(0b1101111) + chr(49) + chr(49) + '\x32', 0o10), nzTpIcepk0o8('\x30' + chr(1570 - 1459) + chr(51) + chr(0b110011) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(2287 - 2239) + '\x6f' + '\x33' + '\x31' + '\x36', 55027 - 55019), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(0b110100) + chr(0b11100 + 0o24), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + '\063', 63898 - 63890), nzTpIcepk0o8(chr(1666 - 1618) + chr(0b1101111) + chr(608 - 558) + chr(54) + '\x34', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10110 + 0o34) + chr(0b110111) + chr(0b110110), 14953 - 14945), nzTpIcepk0o8(chr(48) + '\157' + '\061' + '\061' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(2365 - 2316) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + '\063' + '\060' + chr(53), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1143 - 1094) + '\060' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + '\066' + chr(51), 0b1000), nzTpIcepk0o8(chr(177 - 129) + '\x6f' + chr(0b101001 + 0o11) + chr(0b10101 + 0o35) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b110 + 0o151) + chr(49) + chr(0b11 + 0o61) + chr(53), 34670 - 34662), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + chr(0b110010) + chr(0b10 + 0o64), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11100 + 0o26) + chr(53) + chr(0b11 + 0o62), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b101100 + 0o11) + chr(0b11000 + 0o33), 0b1000), nzTpIcepk0o8(chr(457 - 409) + chr(0b111111 + 0o60) + chr(0b110010) + chr(0b110010) + '\064', ord("\x08")), nzTpIcepk0o8(chr(1378 - 1330) + chr(11124 - 11013) + chr(604 - 554) + chr(370 - 320) + chr(52), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(53) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + '\061' + chr(0b110110 + 0o1), 2673 - 2665), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(53) + chr(0b100010 + 0o21), 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\157' + chr(49) + '\x32', 0o10), nzTpIcepk0o8(chr(1051 - 1003) + '\x6f' + '\063' + '\065' + chr(1145 - 1094), 0o10), nzTpIcepk0o8(chr(61 - 13) + '\x6f' + chr(0b110001) + '\066' + chr(52), 0o10), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\x6f' + chr(0b110001) + chr(0b100101 + 0o20) + chr(0b100110 + 0o15), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b101 + 0o61) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110101), 43712 - 43704), nzTpIcepk0o8('\x30' + chr(0b1100100 + 0o13) + chr(0b110010) + chr(48), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x32' + chr(0b0 + 0o63) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + '\061' + chr(2357 - 2305), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(7479 - 7368) + '\062' + '\x37' + chr(0b11 + 0o62), 0b1000), nzTpIcepk0o8('\x30' + chr(9446 - 9335) + chr(2708 - 2654) + chr(52), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\157' + chr(0b110101) + chr(1636 - 1588), 30645 - 30637)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'x'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b0 + 0o157) + chr(0b1100010 + 0o2) + chr(2777 - 2676))(chr(117) + '\164' + '\146' + chr(0b1 + 0o54) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def q0K00RmlTZuU(hXMPsSrOQzbh, HPRlMhFQZATD, CKfMk5wcnKcx):
if CKfMk5wcnKcx is nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(3883 - 3772) + chr(0b110000), 0o10):
HPRlMhFQZATD = HPRlMhFQZATD.E91dbqOZXBpJ(zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'z\xd3\xa4\xa0\xe7\x9dWj\xb2\xa7\x8ef\xc0\xdb'), chr(7003 - 6903) + chr(0b1001001 + 0o34) + '\143' + '\157' + chr(0b101111 + 0o65) + chr(101))(chr(117) + chr(0b1110100) + '\146' + chr(275 - 230) + chr(0b1 + 0o67))), roI3spqORKae(ES5oEprVxulp(b''), '\144' + chr(8273 - 8172) + chr(0b1100011) + chr(0b1011100 + 0o23) + '\x64' + '\145')(chr(0b1110101) + chr(116) + chr(102) + chr(0b1010 + 0o43) + chr(1460 - 1404)))
HPRlMhFQZATD = HPRlMhFQZATD.E91dbqOZXBpJ(zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'z\xd3\xa4\xa0\xe7\x9dWj\xb7\xa1\x95a'), chr(6235 - 6135) + chr(101) + chr(0b1100011) + '\157' + chr(0b10111 + 0o115) + '\x65')('\x75' + chr(116) + chr(0b1100110) + chr(0b101101) + '\x38')), roI3spqORKae(ES5oEprVxulp(b''), chr(0b1011000 + 0o14) + chr(0b1100101) + chr(99) + chr(2183 - 2072) + '\x64' + chr(0b1100101))(chr(117) + chr(116) + '\x66' + chr(302 - 257) + chr(0b11011 + 0o35)))
HPRlMhFQZATD = HPRlMhFQZATD.E91dbqOZXBpJ(zIqcgNgQ9U6F(roI3spqORKae(ES5oEprVxulp(b'z\xd3\xa4\xa0\xe7\x9dWj\xbb\xaf\x99'), '\144' + chr(0b10110 + 0o117) + '\x63' + chr(111) + chr(4967 - 4867) + chr(101))('\x75' + chr(8191 - 8075) + '\x66' + chr(45) + chr(778 - 722))), roI3spqORKae(ES5oEprVxulp(b''), chr(5103 - 5003) + chr(0b111000 + 0o55) + chr(0b100 + 0o137) + chr(0b100000 + 0o117) + chr(6038 - 5938) + chr(101))('\165' + '\164' + chr(0b1100110) + '\055' + '\x38'))
return HPRlMhFQZATD |
Salamek/cron-descriptor | cron_descriptor/ExpressionDescriptor.py | ExpressionDescriptor.transform_case | def transform_case(self, description, case_type):
"""Transforms the case of the expression description, based on options
Args:
description: The description to transform
case_type: The casing type that controls the output casing
second_expression: Seconds part
Returns:
The transformed description with proper casing
"""
if case_type == CasingTypeEnum.Sentence:
description = "{}{}".format(
description[0].upper(),
description[1:])
elif case_type == CasingTypeEnum.Title:
description = description.title()
else:
description = description.lower()
return description | python | def transform_case(self, description, case_type):
"""Transforms the case of the expression description, based on options
Args:
description: The description to transform
case_type: The casing type that controls the output casing
second_expression: Seconds part
Returns:
The transformed description with proper casing
"""
if case_type == CasingTypeEnum.Sentence:
description = "{}{}".format(
description[0].upper(),
description[1:])
elif case_type == CasingTypeEnum.Title:
description = description.title()
else:
description = description.lower()
return description | [
"def",
"transform_case",
"(",
"self",
",",
"description",
",",
"case_type",
")",
":",
"if",
"case_type",
"==",
"CasingTypeEnum",
".",
"Sentence",
":",
"description",
"=",
"\"{}{}\"",
".",
"format",
"(",
"description",
"[",
"0",
"]",
".",
"upper",
"(",
")",
",",
"description",
"[",
"1",
":",
"]",
")",
"elif",
"case_type",
"==",
"CasingTypeEnum",
".",
"Title",
":",
"description",
"=",
"description",
".",
"title",
"(",
")",
"else",
":",
"description",
"=",
"description",
".",
"lower",
"(",
")",
"return",
"description"
] | Transforms the case of the expression description, based on options
Args:
description: The description to transform
case_type: The casing type that controls the output casing
second_expression: Seconds part
Returns:
The transformed description with proper casing | [
"Transforms",
"the",
"case",
"of",
"the",
"expression",
"description",
"based",
"on",
"options",
"Args",
":",
"description",
":",
"The",
"description",
"to",
"transform",
"case_type",
":",
"The",
"casing",
"type",
"that",
"controls",
"the",
"output",
"casing",
"second_expression",
":",
"Seconds",
"part",
"Returns",
":",
"The",
"transformed",
"description",
"with",
"proper",
"casing"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionDescriptor.py#L558-L576 | train | Transforms the case of the expression description based on options
| GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZb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kIpFeYozM,MdkNqd1bagO6,QNQS9e6tJqMV,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(111) + chr(0b100011 + 0o20) + chr(0b100000 + 0o24) + '\x31', 22194 - 22186), nzTpIcepk0o8(chr(870 - 822) + chr(111) + chr(0b110 + 0o54) + chr(53) + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + '\x30' + chr(0b110001 + 0o1), 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + chr(171 - 122) + chr(778 - 724) + '\x34', 15048 - 15040), nzTpIcepk0o8(chr(262 - 214) + chr(8526 - 8415) + '\061' + chr(0b110110) + '\067', 48711 - 48703), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(352 - 302) + '\063' + chr(55), 0o10), nzTpIcepk0o8(chr(48) + chr(0b110110 + 0o71) + chr(0b110001) + '\065' + chr(0b10010 + 0o41), ord("\x08")), nzTpIcepk0o8('\x30' + chr(5449 - 5338) + chr(0b110011) + chr(49) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(4168 - 4057) + '\x31' + chr(522 - 470), 10905 - 10897), nzTpIcepk0o8(chr(956 - 908) + '\157' + '\062' + chr(0b110101) + chr(390 - 336), ord("\x08")), nzTpIcepk0o8(chr(699 - 651) + chr(0b1100000 + 0o17) + chr(51) + '\062' + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(1319 - 1268) + chr(0b0 + 0o61), ord("\x08")), nzTpIcepk0o8('\x30' + chr(1508 - 1397) + chr(51) + chr(2887 - 2832) + '\x30', 8578 - 8570), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(581 - 529) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(2633 - 2522) + '\066' + '\x35', 13652 - 13644), nzTpIcepk0o8('\060' + '\157' + chr(0b10110 + 0o35) + chr(1476 - 1428) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(0b11000 + 0o36) + chr(0b1010 + 0o46), 36499 - 36491), nzTpIcepk0o8('\x30' + chr(111) + '\063' + chr(54) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101 + 0o142) + '\061' + chr(0b100101 + 0o16) + chr(55), 58033 - 58025), nzTpIcepk0o8(chr(65 - 17) + '\x6f' + '\x31' + chr(1142 - 1089) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x36' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(870 - 822) + chr(0b1101111) + '\x33' + chr(0b111 + 0o53) + chr(50), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(0b110000) + chr(423 - 371), 0o10), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b111101 + 0o62) + '\061' + chr(0b110101) + '\066', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(1155 - 1100) + chr(49), 60164 - 60156), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(182 - 132) + '\065' + '\063', 28720 - 28712), nzTpIcepk0o8(chr(77 - 29) + '\x6f' + chr(0b101100 + 0o5) + chr(2369 - 2319) + chr(0b110000), 0o10), nzTpIcepk0o8('\x30' + chr(0b110 + 0o151) + chr(0b110001) + chr(0b100101 + 0o21) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + chr(7864 - 7753) + chr(176 - 126) + chr(0b101010 + 0o11) + chr(50), 0o10), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + chr(0b101111 + 0o2) + chr(0b110100) + '\067', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101100 + 0o7) + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(0b1100001 + 0o16) + chr(0b100011 + 0o16) + chr(0b110 + 0o61) + chr(48), 49880 - 49872), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(0b110110) + chr(0b110111), 8), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(326 - 215) + chr(2492 - 2442) + '\062' + chr(335 - 282), ord("\x08")), nzTpIcepk0o8(chr(1189 - 1141) + chr(111) + '\061' + chr(0b11110 + 0o27) + chr(0b1100 + 0o45), 6816 - 6808), nzTpIcepk0o8(chr(48) + chr(111) + chr(1754 - 1705) + '\x32' + chr(1062 - 1014), 8), nzTpIcepk0o8(chr(0b110000) + chr(7752 - 7641) + chr(0b110010) + chr(48) + chr(48), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + chr(53) + '\067', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(0b110001) + chr(331 - 280), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2343 - 2294) + '\060' + chr(0b100101 + 0o16), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110101) + chr(1746 - 1698), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xcf'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b110001 + 0o76) + chr(0b1100100) + chr(9879 - 9778))('\165' + chr(0b10001 + 0o143) + chr(0b1100110) + chr(317 - 272) + chr(0b1101 + 0o53)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def LxlGooWlvyLp(hXMPsSrOQzbh, HPRlMhFQZATD, XqoE4GpKHq8n):
if XqoE4GpKHq8n == roI3spqORKae(BmiVJ7D6ciKh, roI3spqORKae(ES5oEprVxulp(b'\xb2\xc8,\x00\x12\xf1\x08\xa8'), chr(4002 - 3902) + chr(101) + chr(0b101110 + 0o65) + chr(111) + chr(0b1100100) + chr(101))(chr(117) + '\x74' + chr(566 - 464) + chr(0b1001 + 0o44) + '\070')):
HPRlMhFQZATD = roI3spqORKae(ES5oEprVxulp(b'\x9a\xd09\t'), '\x64' + '\145' + chr(0b1100011) + '\157' + chr(0b110111 + 0o55) + '\145')(chr(0b1110101) + chr(2684 - 2568) + chr(102) + '\x2d' + '\x38').q33KG3foQ_CJ(HPRlMhFQZATD[nzTpIcepk0o8(chr(0b110000) + chr(0b101011 + 0o104) + '\x30', 0o10)].iq1mNMefb1Zd(), HPRlMhFQZATD[nzTpIcepk0o8('\060' + '\157' + chr(848 - 799), 0b1000):])
elif XqoE4GpKHq8n == roI3spqORKae(BmiVJ7D6ciKh, roI3spqORKae(ES5oEprVxulp(b'\xb5\xc46\x18\x12'), '\144' + chr(0b1100101) + chr(0b1001 + 0o132) + '\x6f' + '\144' + chr(0b11010 + 0o113))('\x75' + chr(0b1011111 + 0o25) + chr(3432 - 3330) + chr(0b100111 + 0o6) + chr(56))):
HPRlMhFQZATD = HPRlMhFQZATD.OO0tRW9aj_xh()
else:
HPRlMhFQZATD = HPRlMhFQZATD.Xn8ENWMZdIRt()
return HPRlMhFQZATD |
Salamek/cron-descriptor | cron_descriptor/ExpressionDescriptor.py | ExpressionDescriptor.number_to_day | def number_to_day(self, day_number):
"""Returns localized day name by its CRON number
Args:
day_number: Number of a day
Returns:
Day corresponding to day_number
Raises:
IndexError: When day_number is not found
"""
return [
calendar.day_name[6],
calendar.day_name[0],
calendar.day_name[1],
calendar.day_name[2],
calendar.day_name[3],
calendar.day_name[4],
calendar.day_name[5]
][day_number] | python | def number_to_day(self, day_number):
"""Returns localized day name by its CRON number
Args:
day_number: Number of a day
Returns:
Day corresponding to day_number
Raises:
IndexError: When day_number is not found
"""
return [
calendar.day_name[6],
calendar.day_name[0],
calendar.day_name[1],
calendar.day_name[2],
calendar.day_name[3],
calendar.day_name[4],
calendar.day_name[5]
][day_number] | [
"def",
"number_to_day",
"(",
"self",
",",
"day_number",
")",
":",
"return",
"[",
"calendar",
".",
"day_name",
"[",
"6",
"]",
",",
"calendar",
".",
"day_name",
"[",
"0",
"]",
",",
"calendar",
".",
"day_name",
"[",
"1",
"]",
",",
"calendar",
".",
"day_name",
"[",
"2",
"]",
",",
"calendar",
".",
"day_name",
"[",
"3",
"]",
",",
"calendar",
".",
"day_name",
"[",
"4",
"]",
",",
"calendar",
".",
"day_name",
"[",
"5",
"]",
"]",
"[",
"day_number",
"]"
] | Returns localized day name by its CRON number
Args:
day_number: Number of a day
Returns:
Day corresponding to day_number
Raises:
IndexError: When day_number is not found | [
"Returns",
"localized",
"day",
"name",
"by",
"its",
"CRON",
"number"
] | fafe86b33e190caf205836fa1c719d27c7b408c7 | https://github.com/Salamek/cron-descriptor/blob/fafe86b33e190caf205836fa1c719d27c7b408c7/cron_descriptor/ExpressionDescriptor.py#L578-L596 | train | Returns localized day name by its CRON number | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,aWb0eXvJHTT7,s2y8nAB4S7UF,znAfcqx_89tO,ZnHlCcECsuOK,TdYHRT1SBW60,mBmBrDJUSN6g,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjFWUmjlQA,QhZRiM1qvaW7,WbNHlD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YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b1101111) + chr(0b110010) + '\x34' + chr(0b1001 + 0o50), 58948 - 58940), nzTpIcepk0o8(chr(0b110000) + chr(0b0 + 0o157) + chr(50) + '\x30' + chr(0b1011 + 0o45), 5754 - 5746), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(2389 - 2334), 41150 - 41142), nzTpIcepk0o8('\060' + '\157' + chr(1536 - 1486) + chr(1165 - 1113) + chr(0b10110 + 0o32), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(0b100010 + 0o22) + chr(1518 - 1463), 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\157' + '\063' + '\062' + chr(0b11111 + 0o23), 36903 - 36895), nzTpIcepk0o8(chr(0b110000) + chr(237 - 126) + chr(51) + chr(0b110001) + chr(0b10000 + 0o42), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10000 + 0o42) + chr(0b10001 + 0o45) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(1956 - 1908) + '\x6f' + '\062' + chr(0b110011) + chr(0b101111 + 0o7), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b101011 + 0o104) + '\061' + chr(53) + '\x36', ord("\x08")), nzTpIcepk0o8('\x30' + chr(4579 - 4468) + chr(0b1011 + 0o50) + '\x34' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2231 - 2177) + chr(0b100000 + 0o22), 38375 - 38367), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(51) + chr(0b101001 + 0o14), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b111010 + 0o65) + chr(49) + chr(0b110110) + '\x36', 0b1000), nzTpIcepk0o8(chr(1478 - 1430) + '\x6f' + chr(51) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + chr(744 - 633) + '\061' + chr(0b100000 + 0o25), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b100 + 0o55) + '\x35' + '\x30', 45029 - 45021), nzTpIcepk0o8('\060' + chr(6197 - 6086) + chr(0b101111 + 0o7), 0b1000), nzTpIcepk0o8(chr(567 - 519) + chr(0b1001111 + 0o40) + '\061' + chr(0b110000) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(0b110101) + chr(0b10000 + 0o43), 20487 - 20479), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(4581 - 4470) + chr(1180 - 1131) + '\063' + '\060', 0b1000), nzTpIcepk0o8(chr(2163 - 2115) + chr(0b1011110 + 0o21) + chr(49) + chr(87 - 35) + chr(1703 - 1651), 0o10), nzTpIcepk0o8(chr(408 - 360) + '\157' + chr(0b1000 + 0o53) + chr(1955 - 1906) + chr(0b101101 + 0o6), 0o10), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\x6f' + chr(50) + chr(52) + chr(719 - 670), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + '\062' + chr(0b110001 + 0o5), 6071 - 6063), nzTpIcepk0o8('\060' + chr(111) + chr(50) + '\x37' + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(1440 - 1385) + '\066', ord("\x08")), nzTpIcepk0o8(chr(1415 - 1367) + '\x6f' + chr(0b100111 + 0o14) + '\x34' + chr(2151 - 2102), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b11101 + 0o122) + chr(993 - 944) + chr(0b110101) + '\x32', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + '\061' + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(965 - 916) + chr(50), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + '\062' + '\065', ord("\x08")), nzTpIcepk0o8(chr(1412 - 1364) + '\x6f' + '\x33' + '\x37' + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1011010 + 0o25) + chr(1860 - 1811) + chr(0b110100) + '\065', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + '\061' + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(11902 - 11791) + '\063' + chr(53) + chr(939 - 886), ord("\x08")), nzTpIcepk0o8(chr(541 - 493) + chr(0b1101111) + chr(363 - 314) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b110100 + 0o73) + chr(0b110010) + '\060' + '\x33', 0b1000), nzTpIcepk0o8(chr(2153 - 2105) + chr(0b101001 + 0o106) + '\x31' + '\064' + '\065', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b111000 + 0o67) + '\065' + chr(0b101010 + 0o6), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8f'), chr(100) + chr(5547 - 5446) + chr(5784 - 5685) + chr(0b1101111) + chr(0b111010 + 0o52) + '\x65')(chr(0b1110101) + chr(0b1110100) + '\146' + chr(1370 - 1325) + '\x38') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def fVWsE4HC5KgW(hXMPsSrOQzbh, yYXWRh12yWFF):
return [roI3spqORKae(RT5jCF6xHS9L, roI3spqORKae(ES5oEprVxulp(b'\xc5\xe1f\xff\t\xb3\xa7\xd6'), chr(100) + chr(101) + '\143' + '\x6f' + '\x64' + chr(101))('\165' + chr(12020 - 11904) + '\146' + chr(0b100111 + 0o6) + '\070'))[nzTpIcepk0o8(chr(48) + chr(111) + chr(1589 - 1535), 8)], roI3spqORKae(RT5jCF6xHS9L, roI3spqORKae(ES5oEprVxulp(b'\xc5\xe1f\xff\t\xb3\xa7\xd6'), chr(0b110 + 0o136) + chr(0b111110 + 0o47) + chr(4562 - 4463) + chr(111) + chr(100) + chr(6929 - 6828))('\x75' + '\164' + '\146' + chr(453 - 408) + chr(56)))[nzTpIcepk0o8('\060' + chr(0b1101111) + chr(48), ord("\x08"))], roI3spqORKae(RT5jCF6xHS9L, roI3spqORKae(ES5oEprVxulp(b'\xc5\xe1f\xff\t\xb3\xa7\xd6'), '\144' + chr(101) + chr(99) + chr(111) + chr(0b1100100) + '\145')(chr(117) + chr(116) + chr(102) + chr(0b101000 + 0o5) + chr(0b10000 + 0o50)))[nzTpIcepk0o8(chr(2072 - 2024) + chr(111) + chr(49), ord("\x08"))], roI3spqORKae(RT5jCF6xHS9L, roI3spqORKae(ES5oEprVxulp(b'\xc5\xe1f\xff\t\xb3\xa7\xd6'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(0b10001 + 0o124))('\165' + '\164' + chr(0b1100000 + 0o6) + chr(0b101101) + '\070'))[nzTpIcepk0o8(chr(2074 - 2026) + chr(0b10000 + 0o137) + '\062', 0b1000)], roI3spqORKae(RT5jCF6xHS9L, roI3spqORKae(ES5oEprVxulp(b'\xc5\xe1f\xff\t\xb3\xa7\xd6'), chr(100) + chr(101) + chr(0b1100011) + chr(111) + '\x64' + '\145')(chr(0b111110 + 0o67) + chr(3527 - 3411) + chr(7890 - 7788) + chr(0b100001 + 0o14) + chr(0b110 + 0o62)))[nzTpIcepk0o8(chr(1557 - 1509) + chr(9207 - 9096) + '\x33', ord("\x08"))], roI3spqORKae(RT5jCF6xHS9L, roI3spqORKae(ES5oEprVxulp(b'\xc5\xe1f\xff\t\xb3\xa7\xd6'), '\144' + chr(0b11 + 0o142) + '\x63' + '\157' + chr(0b1100100) + '\x65')('\x75' + '\x74' + chr(3228 - 3126) + '\055' + '\x38'))[nzTpIcepk0o8('\060' + chr(111) + chr(0b110100), 0b1000)], roI3spqORKae(RT5jCF6xHS9L, roI3spqORKae(ES5oEprVxulp(b'\xc5\xe1f\xff\t\xb3\xa7\xd6'), chr(8245 - 8145) + chr(0b1100101) + chr(0b1100011) + chr(0b1000100 + 0o53) + '\144' + chr(9845 - 9744))(chr(117) + '\x74' + '\x66' + chr(796 - 751) + '\070'))[nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1101111) + '\x35', ord("\x08"))]][yYXWRh12yWFF] |
ciena/afkak | afkak/consumer.py | Consumer.start | def start(self, start_offset):
"""
Starts fetching messages from Kafka and delivering them to the
:attr:`.processor` function.
:param int start_offset:
The offset within the partition from which to start fetching.
Special values include: :const:`OFFSET_EARLIEST`,
:const:`OFFSET_LATEST`, and :const:`OFFSET_COMMITTED`. If the
supplied offset is :const:`OFFSET_EARLIEST` or
:const:`OFFSET_LATEST` the :class:`Consumer` will use the
OffsetRequest Kafka API to retrieve the actual offset used for
fetching. In the case :const:`OFFSET_COMMITTED` is used,
`commit_policy` MUST be set on the Consumer, and the Consumer
will use the OffsetFetchRequest Kafka API to retrieve the actual
offset used for fetching.
:returns:
A :class:`~twisted.internet.defer.Deferred` which will resolve
successfully when the consumer is cleanly stopped, or with
a failure if the :class:`Consumer` encounters an error from which
it is unable to recover.
:raises: :exc:`RestartError` if already running.
"""
# Have we been started already, and not stopped?
if self._start_d is not None:
raise RestartError("Start called on already-started consumer")
# Keep track of state for debugging
self._state = '[started]'
# Create and return a deferred for alerting on errors/stoppage
start_d = self._start_d = Deferred()
# Start a new fetch request, possibly just for the starting offset
self._fetch_offset = start_offset
self._do_fetch()
# Set up the auto-commit timer, if needed
if self.consumer_group and self.auto_commit_every_s:
self._commit_looper = LoopingCall(self._auto_commit)
self._commit_looper.clock = self.client.reactor
self._commit_looper_d = self._commit_looper.start(
self.auto_commit_every_s, now=False)
self._commit_looper_d.addCallbacks(self._commit_timer_stopped,
self._commit_timer_failed)
return start_d | python | def start(self, start_offset):
"""
Starts fetching messages from Kafka and delivering them to the
:attr:`.processor` function.
:param int start_offset:
The offset within the partition from which to start fetching.
Special values include: :const:`OFFSET_EARLIEST`,
:const:`OFFSET_LATEST`, and :const:`OFFSET_COMMITTED`. If the
supplied offset is :const:`OFFSET_EARLIEST` or
:const:`OFFSET_LATEST` the :class:`Consumer` will use the
OffsetRequest Kafka API to retrieve the actual offset used for
fetching. In the case :const:`OFFSET_COMMITTED` is used,
`commit_policy` MUST be set on the Consumer, and the Consumer
will use the OffsetFetchRequest Kafka API to retrieve the actual
offset used for fetching.
:returns:
A :class:`~twisted.internet.defer.Deferred` which will resolve
successfully when the consumer is cleanly stopped, or with
a failure if the :class:`Consumer` encounters an error from which
it is unable to recover.
:raises: :exc:`RestartError` if already running.
"""
# Have we been started already, and not stopped?
if self._start_d is not None:
raise RestartError("Start called on already-started consumer")
# Keep track of state for debugging
self._state = '[started]'
# Create and return a deferred for alerting on errors/stoppage
start_d = self._start_d = Deferred()
# Start a new fetch request, possibly just for the starting offset
self._fetch_offset = start_offset
self._do_fetch()
# Set up the auto-commit timer, if needed
if self.consumer_group and self.auto_commit_every_s:
self._commit_looper = LoopingCall(self._auto_commit)
self._commit_looper.clock = self.client.reactor
self._commit_looper_d = self._commit_looper.start(
self.auto_commit_every_s, now=False)
self._commit_looper_d.addCallbacks(self._commit_timer_stopped,
self._commit_timer_failed)
return start_d | [
"def",
"start",
"(",
"self",
",",
"start_offset",
")",
":",
"# Have we been started already, and not stopped?",
"if",
"self",
".",
"_start_d",
"is",
"not",
"None",
":",
"raise",
"RestartError",
"(",
"\"Start called on already-started consumer\"",
")",
"# Keep track of state for debugging",
"self",
".",
"_state",
"=",
"'[started]'",
"# Create and return a deferred for alerting on errors/stoppage",
"start_d",
"=",
"self",
".",
"_start_d",
"=",
"Deferred",
"(",
")",
"# Start a new fetch request, possibly just for the starting offset",
"self",
".",
"_fetch_offset",
"=",
"start_offset",
"self",
".",
"_do_fetch",
"(",
")",
"# Set up the auto-commit timer, if needed",
"if",
"self",
".",
"consumer_group",
"and",
"self",
".",
"auto_commit_every_s",
":",
"self",
".",
"_commit_looper",
"=",
"LoopingCall",
"(",
"self",
".",
"_auto_commit",
")",
"self",
".",
"_commit_looper",
".",
"clock",
"=",
"self",
".",
"client",
".",
"reactor",
"self",
".",
"_commit_looper_d",
"=",
"self",
".",
"_commit_looper",
".",
"start",
"(",
"self",
".",
"auto_commit_every_s",
",",
"now",
"=",
"False",
")",
"self",
".",
"_commit_looper_d",
".",
"addCallbacks",
"(",
"self",
".",
"_commit_timer_stopped",
",",
"self",
".",
"_commit_timer_failed",
")",
"return",
"start_d"
] | Starts fetching messages from Kafka and delivering them to the
:attr:`.processor` function.
:param int start_offset:
The offset within the partition from which to start fetching.
Special values include: :const:`OFFSET_EARLIEST`,
:const:`OFFSET_LATEST`, and :const:`OFFSET_COMMITTED`. If the
supplied offset is :const:`OFFSET_EARLIEST` or
:const:`OFFSET_LATEST` the :class:`Consumer` will use the
OffsetRequest Kafka API to retrieve the actual offset used for
fetching. In the case :const:`OFFSET_COMMITTED` is used,
`commit_policy` MUST be set on the Consumer, and the Consumer
will use the OffsetFetchRequest Kafka API to retrieve the actual
offset used for fetching.
:returns:
A :class:`~twisted.internet.defer.Deferred` which will resolve
successfully when the consumer is cleanly stopped, or with
a failure if the :class:`Consumer` encounters an error from which
it is unable to recover.
:raises: :exc:`RestartError` if already running. | [
"Starts",
"fetching",
"messages",
"from",
"Kafka",
"and",
"delivering",
"them",
"to",
"the",
":",
"attr",
":",
".",
"processor",
"function",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/consumer.py#L236-L283 | train | Starts fetching messages from Kafka and deliver them to Kafka. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe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V,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\x30' + chr(0b100 + 0o153) + '\061' + chr(1595 - 1544) + chr(0b101110 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(781 - 733) + '\x6f' + '\066' + chr(1861 - 1808), 21108 - 21100), nzTpIcepk0o8('\x30' + chr(10138 - 10027) + chr(0b110001) + chr(0b10101 + 0o36) + chr(49), 8), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + chr(2172 - 2121) + '\x31' + '\063', 0b1000), nzTpIcepk0o8(chr(48) + chr(182 - 71) + '\065' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(1676 - 1628) + '\157' + '\x33' + chr(0b11010 + 0o30) + '\x33', 6188 - 6180), nzTpIcepk0o8(chr(1262 - 1214) + chr(111) + '\x32' + chr(0b110000) + '\061', 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1000101 + 0o52) + chr(50) + '\062' + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b100011 + 0o114) + chr(0b101110 + 0o10), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(654 - 599) + chr(322 - 273), 8809 - 8801), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + '\x30' + chr(1701 - 1653), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(52) + chr(299 - 249), ord("\x08")), nzTpIcepk0o8('\060' + chr(1999 - 1888) + chr(0b10011 + 0o37) + '\x31' + chr(54), 35485 - 35477), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10010 + 0o37) + '\x32' + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10100 + 0o35) + chr(107 - 53) + '\062', 0o10), nzTpIcepk0o8(chr(48) + chr(0b0 + 0o157) + '\x33' + chr(0b110011) + chr(2404 - 2352), 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\157' + chr(0b110010) + chr(1856 - 1805) + '\x30', 62861 - 62853), nzTpIcepk0o8(chr(2027 - 1979) + chr(111) + '\063' + '\063' + chr(53), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(0b110001) + chr(54), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x33' + '\064', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + chr(0b110100) + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b110111 + 0o70) + '\x32' + chr(0b11101 + 0o31) + '\067', 0b1000), nzTpIcepk0o8(chr(607 - 559) + chr(0b1010011 + 0o34) + chr(0b110001) + chr(0b110000) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10101 + 0o35) + '\067' + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(6869 - 6758) + chr(1026 - 977) + '\064' + chr(0b11101 + 0o26), 20955 - 20947), nzTpIcepk0o8(chr(0b110000) + chr(8592 - 8481) + chr(0b110010) + chr(0b110000) + chr(0b110111), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110 + 0o57) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(950 - 899) + chr(0b110111), 44778 - 44770), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + '\065' + chr(322 - 274), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(0b110010) + '\067', 0o10), nzTpIcepk0o8(chr(1653 - 1605) + '\x6f' + '\062' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(2151 - 2103) + chr(0b1101111) + chr(49) + chr(0b110011 + 0o3) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(5185 - 5074) + '\x33' + chr(0b100101 + 0o22) + chr(0b10010 + 0o42), 48078 - 48070), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(1201 - 1090) + chr(50) + '\x32' + chr(1909 - 1861), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\062', 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\157' + '\x31' + chr(0b101110 + 0o11) + chr(2021 - 1970), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1 + 0o62) + chr(54) + '\x32', 29241 - 29233), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10001 + 0o42) + chr(0b110001) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + '\x34' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b1 + 0o57) + '\157' + chr(51) + chr(0b1001 + 0o51) + chr(2310 - 2255), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b11011 + 0o124) + chr(1060 - 1007) + chr(48), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'w'), chr(0b1001 + 0o133) + chr(0b1100101) + '\x63' + '\x6f' + chr(100) + '\145')(chr(13358 - 13241) + chr(116) + chr(0b1100110) + chr(1771 - 1726) + '\070') + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def KQbHFTcl_LKy(hXMPsSrOQzbh, SKfxLb5eYSei):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x06F-\xaa\\\xa7\xde\xf1'), '\x64' + chr(0b110101 + 0o60) + chr(0b110100 + 0o57) + '\157' + chr(0b1100100) + chr(5905 - 5804))(chr(12850 - 12733) + chr(9460 - 9344) + chr(102) + chr(0b101101) + chr(2556 - 2500))) is not None:
raise MNnkoBeN2wpg(roI3spqORKae(ES5oEprVxulp(b'\nA8\xb9Z\xf3\xe2\xf4j\xd5\xe5\x86\xae8\x1c\xfc\xf9\xb1<y\xc2\xd3;\x91\x10\xf3J\xed\x1c\xb2rS\x9f\xffl\x08\x87\xa7\x07\xa5'), chr(0b111011 + 0o51) + '\145' + chr(7260 - 7161) + '\157' + '\144' + '\x65')(chr(2670 - 2553) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(0b111000)))
hXMPsSrOQzbh.GbrWRCb88YE8 = roI3spqORKae(ES5oEprVxulp(b'\x02F-\xaa\\\xa7\xe4\xf1['), chr(0b111001 + 0o53) + '\145' + chr(99) + chr(0b1101111) + '\144' + '\145')(chr(0b110011 + 0o102) + '\164' + chr(0b1100110 + 0o0) + chr(0b101101) + chr(387 - 331))
swA9zTS9KaOy = hXMPsSrOQzbh.IJw6Mm5lf3sH = LbNAbjjo5q4l()
hXMPsSrOQzbh.ZAYs0SRJNM8W = SKfxLb5eYSei
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x06Q6\x94H\xb6\xf5\xf6n'), chr(100) + chr(101) + '\x63' + chr(0b1101111) + chr(7891 - 7791) + chr(101))(chr(0b100001 + 0o124) + '\164' + '\146' + '\x2d' + chr(56)))()
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b":Z7\xb8[\xbe\xe4\xe7Y\xde\xf2\x8d\xfb'"), chr(100) + '\145' + chr(99) + '\157' + '\x64' + chr(0b110011 + 0o62))(chr(0b1110101) + chr(5519 - 5403) + chr(3893 - 3791) + '\055' + chr(1236 - 1180))) and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'8@-\xa4q\xb0\xee\xf8k\xd0\xf4\xbd\xeb!\x17\xae\xe1\x82='), chr(100) + '\x65' + chr(3202 - 3103) + chr(0b1101111) + chr(6840 - 6740) + chr(0b11100 + 0o111))('\x75' + '\164' + chr(0b1011010 + 0o14) + chr(45) + '\x38')):
hXMPsSrOQzbh.WtnMUlqF8R9r = tdKj70HniD8g(hXMPsSrOQzbh._auto_commit)
hXMPsSrOQzbh._commit_looper.OYez06E6njMN = hXMPsSrOQzbh.client.reactor
hXMPsSrOQzbh.XA4Es15ppccM = hXMPsSrOQzbh._commit_looper.KQbHFTcl_LKy(hXMPsSrOQzbh.auto_commit_every_s, now=nzTpIcepk0o8(chr(48) + '\157' + '\060', 0o10))
roI3spqORKae(hXMPsSrOQzbh._commit_looper_d, roI3spqORKae(ES5oEprVxulp(b'8Q=\x88O\xbf\xed\xf7g\xda\xeb\x91'), chr(0b1100100) + chr(0b1100101) + chr(0b1001101 + 0o26) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(4516 - 4400) + chr(1655 - 1553) + '\055' + chr(0b110111 + 0o1)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x06V6\xa6C\xba\xf5\xcar\xd0\xed\x87\xfc\x08\x01\xa8\xf7\xad>y\xc7'), chr(100) + '\145' + '\x63' + '\157' + '\144' + chr(101))('\x75' + chr(0b1110100) + chr(102) + '\x2d' + chr(56))), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x06V6\xa6C\xba\xf5\xcar\xd0\xed\x87\xfc\x08\x14\xbd\xf1\xb1+x'), '\144' + chr(101) + chr(99) + chr(0b11010 + 0o125) + chr(0b1000000 + 0o44) + chr(0b110100 + 0o61))(chr(0b1110101) + chr(5813 - 5697) + chr(102) + '\055' + '\070')))
return swA9zTS9KaOy |
ciena/afkak | afkak/consumer.py | Consumer.shutdown | def shutdown(self):
"""Gracefully shutdown the consumer
Consumer will complete any outstanding processing, commit its current
offsets (if so configured) and stop.
Returns deferred which callbacks with a tuple of:
(last processed offset, last committed offset) if it was able to
successfully commit, or errbacks with the commit failure, if any,
or fail(RestopError) if consumer is not running.
"""
def _handle_shutdown_commit_success(result):
"""Handle the result of the commit attempted by shutdown"""
self._shutdown_d, d = None, self._shutdown_d
self.stop()
self._shuttingdown = False # Shutdown complete
d.callback((self._last_processed_offset,
self._last_committed_offset))
def _handle_shutdown_commit_failure(failure):
"""Handle failure of commit() attempted by shutdown"""
if failure.check(OperationInProgress):
failure.value.deferred.addCallback(_commit_and_stop)
return
self._shutdown_d, d = None, self._shutdown_d
self.stop()
self._shuttingdown = False # Shutdown complete
d.errback(failure)
def _commit_and_stop(result):
"""Commit the current offsets (if needed) and stop the consumer"""
if not self.consumer_group: # No consumer group, no committing
return _handle_shutdown_commit_success(None)
# Need to commit prior to stopping
self.commit().addCallbacks(_handle_shutdown_commit_success,
_handle_shutdown_commit_failure)
# If we're not running, return an failure
if self._start_d is None:
return fail(Failure(
RestopError("Shutdown called on non-running consumer")))
# If we're called multiple times, return a failure
if self._shutdown_d:
return fail(Failure(
RestopError("Shutdown called more than once.")))
# Set our _shuttingdown flag, so our _process_message routine will stop
# feeding new messages to the processor, and fetches won't be retried
self._shuttingdown = True
# Keep track of state for debugging
self._state = '[shutting down]'
# Create a deferred to track the shutdown
self._shutdown_d = d = Deferred()
# Are we waiting for the processor to complete? If so, when it's done,
# commit our offsets and stop.
if self._processor_d:
self._processor_d.addCallback(_commit_and_stop)
else:
# No need to wait for the processor, we can commit and stop now
_commit_and_stop(None)
# return the deferred
return d | python | def shutdown(self):
"""Gracefully shutdown the consumer
Consumer will complete any outstanding processing, commit its current
offsets (if so configured) and stop.
Returns deferred which callbacks with a tuple of:
(last processed offset, last committed offset) if it was able to
successfully commit, or errbacks with the commit failure, if any,
or fail(RestopError) if consumer is not running.
"""
def _handle_shutdown_commit_success(result):
"""Handle the result of the commit attempted by shutdown"""
self._shutdown_d, d = None, self._shutdown_d
self.stop()
self._shuttingdown = False # Shutdown complete
d.callback((self._last_processed_offset,
self._last_committed_offset))
def _handle_shutdown_commit_failure(failure):
"""Handle failure of commit() attempted by shutdown"""
if failure.check(OperationInProgress):
failure.value.deferred.addCallback(_commit_and_stop)
return
self._shutdown_d, d = None, self._shutdown_d
self.stop()
self._shuttingdown = False # Shutdown complete
d.errback(failure)
def _commit_and_stop(result):
"""Commit the current offsets (if needed) and stop the consumer"""
if not self.consumer_group: # No consumer group, no committing
return _handle_shutdown_commit_success(None)
# Need to commit prior to stopping
self.commit().addCallbacks(_handle_shutdown_commit_success,
_handle_shutdown_commit_failure)
# If we're not running, return an failure
if self._start_d is None:
return fail(Failure(
RestopError("Shutdown called on non-running consumer")))
# If we're called multiple times, return a failure
if self._shutdown_d:
return fail(Failure(
RestopError("Shutdown called more than once.")))
# Set our _shuttingdown flag, so our _process_message routine will stop
# feeding new messages to the processor, and fetches won't be retried
self._shuttingdown = True
# Keep track of state for debugging
self._state = '[shutting down]'
# Create a deferred to track the shutdown
self._shutdown_d = d = Deferred()
# Are we waiting for the processor to complete? If so, when it's done,
# commit our offsets and stop.
if self._processor_d:
self._processor_d.addCallback(_commit_and_stop)
else:
# No need to wait for the processor, we can commit and stop now
_commit_and_stop(None)
# return the deferred
return d | [
"def",
"shutdown",
"(",
"self",
")",
":",
"def",
"_handle_shutdown_commit_success",
"(",
"result",
")",
":",
"\"\"\"Handle the result of the commit attempted by shutdown\"\"\"",
"self",
".",
"_shutdown_d",
",",
"d",
"=",
"None",
",",
"self",
".",
"_shutdown_d",
"self",
".",
"stop",
"(",
")",
"self",
".",
"_shuttingdown",
"=",
"False",
"# Shutdown complete",
"d",
".",
"callback",
"(",
"(",
"self",
".",
"_last_processed_offset",
",",
"self",
".",
"_last_committed_offset",
")",
")",
"def",
"_handle_shutdown_commit_failure",
"(",
"failure",
")",
":",
"\"\"\"Handle failure of commit() attempted by shutdown\"\"\"",
"if",
"failure",
".",
"check",
"(",
"OperationInProgress",
")",
":",
"failure",
".",
"value",
".",
"deferred",
".",
"addCallback",
"(",
"_commit_and_stop",
")",
"return",
"self",
".",
"_shutdown_d",
",",
"d",
"=",
"None",
",",
"self",
".",
"_shutdown_d",
"self",
".",
"stop",
"(",
")",
"self",
".",
"_shuttingdown",
"=",
"False",
"# Shutdown complete",
"d",
".",
"errback",
"(",
"failure",
")",
"def",
"_commit_and_stop",
"(",
"result",
")",
":",
"\"\"\"Commit the current offsets (if needed) and stop the consumer\"\"\"",
"if",
"not",
"self",
".",
"consumer_group",
":",
"# No consumer group, no committing",
"return",
"_handle_shutdown_commit_success",
"(",
"None",
")",
"# Need to commit prior to stopping",
"self",
".",
"commit",
"(",
")",
".",
"addCallbacks",
"(",
"_handle_shutdown_commit_success",
",",
"_handle_shutdown_commit_failure",
")",
"# If we're not running, return an failure",
"if",
"self",
".",
"_start_d",
"is",
"None",
":",
"return",
"fail",
"(",
"Failure",
"(",
"RestopError",
"(",
"\"Shutdown called on non-running consumer\"",
")",
")",
")",
"# If we're called multiple times, return a failure",
"if",
"self",
".",
"_shutdown_d",
":",
"return",
"fail",
"(",
"Failure",
"(",
"RestopError",
"(",
"\"Shutdown called more than once.\"",
")",
")",
")",
"# Set our _shuttingdown flag, so our _process_message routine will stop",
"# feeding new messages to the processor, and fetches won't be retried",
"self",
".",
"_shuttingdown",
"=",
"True",
"# Keep track of state for debugging",
"self",
".",
"_state",
"=",
"'[shutting down]'",
"# Create a deferred to track the shutdown",
"self",
".",
"_shutdown_d",
"=",
"d",
"=",
"Deferred",
"(",
")",
"# Are we waiting for the processor to complete? If so, when it's done,",
"# commit our offsets and stop.",
"if",
"self",
".",
"_processor_d",
":",
"self",
".",
"_processor_d",
".",
"addCallback",
"(",
"_commit_and_stop",
")",
"else",
":",
"# No need to wait for the processor, we can commit and stop now",
"_commit_and_stop",
"(",
"None",
")",
"# return the deferred",
"return",
"d"
] | Gracefully shutdown the consumer
Consumer will complete any outstanding processing, commit its current
offsets (if so configured) and stop.
Returns deferred which callbacks with a tuple of:
(last processed offset, last committed offset) if it was able to
successfully commit, or errbacks with the commit failure, if any,
or fail(RestopError) if consumer is not running. | [
"Gracefully",
"shutdown",
"the",
"consumer"
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/consumer.py#L285-L350 | train | Gracefully shutdown the consumer and return a deferred which will be called with a tuple of the last processed offset last committed offset and the state of the current consumer. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz3IVJ,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DT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1101 + 0o47) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + '\064' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + chr(0b110010) + '\066' + '\066', 0o10), nzTpIcepk0o8(chr(1437 - 1389) + chr(111) + '\061' + '\060' + '\061', 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + chr(264 - 209) + chr(2157 - 2102), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(852 - 801) + chr(48) + chr(49), 46306 - 46298), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(53) + chr(51), 18391 - 18383), nzTpIcepk0o8(chr(693 - 645) + chr(111) + chr(0b11000 + 0o31) + chr(0b10 + 0o63) + '\062', 44055 - 44047), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(5326 - 5215) + chr(841 - 791) + chr(53) + chr(2461 - 2406), 0b1000), nzTpIcepk0o8('\060' + chr(11576 - 11465) + chr(0b110001) + chr(737 - 688) + chr(1964 - 1909), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1000011 + 0o54) + chr(1832 - 1777) + chr(1561 - 1506), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110100) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b100111 + 0o110) + '\x35' + chr(913 - 865), 30510 - 30502), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101011 + 0o10) + '\x35' + chr(107 - 58), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + '\062' + chr(50), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + '\066', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1000111 + 0o50) + chr(1747 - 1698), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(0b100111 + 0o17), 0o10), nzTpIcepk0o8('\x30' + chr(0b100001 + 0o116) + '\061' + '\x35' + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + chr(563 - 452) + '\x31' + '\x37' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(3872 - 3761) + chr(51) + chr(0b110010) + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b110011 + 0o74) + '\x31' + '\x31' + '\063', 50759 - 50751), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + chr(52) + chr(52), 18710 - 18702), nzTpIcepk0o8(chr(48) + '\x6f' + chr(53) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(1785 - 1735) + chr(0b11000 + 0o36), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(52) + chr(399 - 350), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(467 - 417) + chr(48) + chr(420 - 366), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110101) + '\x34', 0o10), nzTpIcepk0o8(chr(1164 - 1116) + chr(0b1101111) + chr(0b110001) + chr(48) + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b1000 + 0o51) + chr(50) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1563 - 1513) + '\x35' + chr(1959 - 1908), 8), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(48) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(111) + chr(0b10010 + 0o43) + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b100101 + 0o112) + chr(55) + chr(0b100011 + 0o21), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(54) + '\x33', 15055 - 15047), nzTpIcepk0o8(chr(48) + chr(111) + chr(797 - 748) + chr(0b10100 + 0o41) + '\064', 52647 - 52639), nzTpIcepk0o8(chr(0b110000) + chr(0b1000001 + 0o56) + '\x32' + chr(0b110100) + chr(166 - 117), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(0b10000 + 0o40) + chr(237 - 186), 0o10), nzTpIcepk0o8(chr(1552 - 1504) + '\x6f' + chr(0b110011) + chr(0b11 + 0o60) + chr(0b1011 + 0o50), 36375 - 36367), nzTpIcepk0o8('\x30' + chr(1306 - 1195) + chr(49) + chr(1679 - 1625) + chr(1840 - 1791), 29854 - 29846)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1100011 + 0o14) + chr(1513 - 1460) + chr(0b110000), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\r'), chr(4908 - 4808) + chr(0b1100 + 0o131) + '\143' + chr(111) + chr(0b1000011 + 0o41) + chr(0b1100101))(chr(117) + '\164' + chr(7580 - 7478) + chr(121 - 76) + chr(0b111000)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def VTMqoJtDTu1d(hXMPsSrOQzbh):
def Bqor3dRVZcsW(POx95m7SPOVy):
(hXMPsSrOQzbh.DbtWU0vrXXyT, vPPlOXQgR3SM) = (None, hXMPsSrOQzbh.DbtWU0vrXXyT)
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'G8\xfc#}\xa8\xf2%\xf0!xg'), chr(8148 - 8048) + '\145' + chr(6544 - 6445) + chr(111) + chr(0b1100100) + chr(0b11111 + 0o106))(chr(0b1010100 + 0o41) + chr(116) + chr(0b111 + 0o137) + chr(0b101101) + chr(1395 - 1339)))()
hXMPsSrOQzbh.qXLqo6nBBrNn = nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110000), ord("\x08"))
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'I&\x83\nj\xf5\xfe?\xe8!T\x17'), chr(100) + chr(0b1100101) + chr(6311 - 6212) + chr(0b1101111) + chr(0b10110 + 0o116) + chr(101))(chr(0b1110101) + '\164' + '\x66' + '\x2d' + chr(56)))((roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'|\r\xd72K\x9e\xdb\x18\xc0,ZQ[\x8c6Qnp\x0f\x0b\xb6?'), chr(5026 - 4926) + '\145' + '\143' + '\157' + '\x64' + chr(101))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(0b1011 + 0o42) + '\070')), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'|\r\xd72K\x9e\xc8\x05\xc2"VV\\\x8c6Qnp\x0f\x0b\xb6?'), chr(100) + chr(0b1100101) + chr(6107 - 6008) + chr(111) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b11 + 0o161) + chr(1602 - 1500) + chr(45) + chr(829 - 773)))))
def gMtUf3rXZE8W(DUbr_vQkcSNT):
if roI3spqORKae(DUbr_vQkcSNT, roI3spqORKae(ES5oEprVxulp(b'w\x00\xde\x16N\x88\x9a!\xdc%Mx'), '\144' + chr(9670 - 9569) + '\143' + chr(111) + '\144' + chr(0b1001000 + 0o35))(chr(117) + '\x74' + chr(4836 - 4734) + chr(45) + '\070'))(VNCvLllGceoZ):
roI3spqORKae(DUbr_vQkcSNT.value.deferred, roI3spqORKae(ES5oEprVxulp(b'B\x05\xd2\x02^\xad\xc7\x08\xce,T'), chr(0b1100000 + 0o4) + chr(0b1100101) + chr(99) + '\x6f' + chr(100) + chr(0b1100011 + 0o2))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(56)))(Z_zElImIKXRN)
return
(hXMPsSrOQzbh.DbtWU0vrXXyT, vPPlOXQgR3SM) = (None, hXMPsSrOQzbh.DbtWU0vrXXyT)
roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'G8\xfc#}\xa8\xf2%\xf0!xg'), chr(0b1100100) + '\x65' + '\x63' + '\x6f' + chr(0b1100100) + chr(101))(chr(3369 - 3252) + chr(0b100110 + 0o116) + chr(3962 - 3860) + '\x2d' + chr(0b1001 + 0o57)))()
hXMPsSrOQzbh.qXLqo6nBBrNn = nzTpIcepk0o8(chr(48) + chr(1311 - 1200) + chr(48), 8)
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'k\x02\x87yy\xf1\xeeZ\xdf\x08pc'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(111) + chr(0b1100100) + '\145')('\165' + chr(1385 - 1269) + chr(0b1100110) + chr(487 - 442) + chr(0b101101 + 0o13)))(DUbr_vQkcSNT)
def Z_zElImIKXRN(POx95m7SPOVy):
if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'@\x0e\xd82J\xac\xce\x18\xf0(MM]\x99'), chr(100) + chr(101) + '\143' + chr(111) + chr(0b100110 + 0o76) + chr(5937 - 5836))(chr(0b1110101) + '\164' + chr(0b1100110) + '\x2d' + chr(0b111000))):
return Bqor3dRVZcsW(None)
roI3spqORKae(hXMPsSrOQzbh.commit(), roI3spqORKae(ES5oEprVxulp(b'B\x05\xd2\x02^\xad\xc7\x08\xce,TQ'), '\x64' + chr(101) + chr(4625 - 4526) + chr(11836 - 11725) + '\x64' + chr(8152 - 8051))(chr(12794 - 12677) + chr(0b1110100) + chr(0b111110 + 0o50) + chr(45) + '\070'))(Bqor3dRVZcsW, gMtUf3rXZE8W)
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'j+\xc1wr\xac\x9e\x06\xc9|Lj'), '\144' + chr(4694 - 4593) + chr(99) + '\x6f' + chr(100) + '\x65')(chr(1525 - 1408) + chr(0b101001 + 0o113) + chr(0b1100110) + chr(45) + chr(2509 - 2453))) is None:
return qbbHsF4hIzMe(WqTcOGBMJIY7(SV0Ep1wRE00e(roI3spqORKae(ES5oEprVxulp(b'p\t\xc35[\xae\xdc\x04\x8f,^ND\x8c6.nxI\x16\xbc%\t\\\xa3O\xe8E)2\x8b\xa7@R@\x19\xcc\xa6\xa9'), chr(0b1100100) + chr(4627 - 4526) + '\x63' + chr(0b100111 + 0o110) + '\x64' + chr(101))(chr(0b110101 + 0o100) + chr(116) + '\146' + chr(0b100011 + 0o12) + '\x38'))))
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'g\x03\xc2\x16j\xf1\xdd\x18\xf7\x17Fv'), '\144' + chr(101) + chr(0b100001 + 0o102) + chr(111) + chr(0b1100100) + '\145')(chr(117) + chr(0b1110100) + chr(0b11 + 0o143) + '\055' + '\070')):
return qbbHsF4hIzMe(WqTcOGBMJIY7(SV0Ep1wRE00e(roI3spqORKae(ES5oEprVxulp(b'p\t\xc35[\xae\xdc\x04\x8f,^ND\x8c6.ly\x1b\x1d\xf3?LO\xb8\x01\xe9B$0\x85'), chr(0b1100100) + chr(0b0 + 0o145) + chr(0b11001 + 0o112) + chr(0b1011 + 0o144) + chr(0b1011101 + 0o7) + chr(8023 - 7922))(chr(0b1110101) + '\x74' + chr(102) + '\x2d' + '\x38'))))
hXMPsSrOQzbh.qXLqo6nBBrNn = nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49), 8)
hXMPsSrOQzbh.GbrWRCb88YE8 = roI3spqORKae(ES5oEprVxulp(b'x\x12\xde4K\xb5\xc2\x04\xc8o[M_\x87\x0f'), chr(0b101101 + 0o67) + '\x65' + chr(2066 - 1967) + chr(0b100111 + 0o110) + '\144' + chr(0b1100101))(chr(117) + '\164' + '\x66' + chr(45) + chr(0b1100 + 0o54))
hXMPsSrOQzbh.DbtWU0vrXXyT = vPPlOXQgR3SM = LbNAbjjo5q4l()
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'|\x11\xc4.\\\xa4\xd8\x19\xc0=`F'), chr(0b1100100) + '\145' + chr(0b100010 + 0o101) + '\x6f' + chr(0b1001000 + 0o34) + chr(0b1100101))(chr(0b111100 + 0o71) + chr(0b1110100) + chr(0b1100110) + chr(0b100 + 0o51) + '\x38')):
roI3spqORKae(hXMPsSrOQzbh._processor_d, roI3spqORKae(ES5oEprVxulp(b'B\x05\xd2\x02^\xad\xc7\x08\xce,T'), chr(0b1100100) + chr(101) + chr(4327 - 4228) + '\x6f' + '\x64' + chr(0b10111 + 0o116))('\x75' + '\164' + chr(0b10001 + 0o125) + chr(862 - 817) + '\x38'))(Z_zElImIKXRN)
else:
Z_zElImIKXRN(None)
return vPPlOXQgR3SM |
ciena/afkak | afkak/consumer.py | Consumer.stop | def stop(self):
"""
Stop the consumer and return offset of last processed message. This
cancels all outstanding operations. Also, if the deferred returned
by `start` hasn't been called, it is called with a tuple consisting
of the last processed offset and the last committed offset.
:raises: :exc:`RestopError` if the :class:`Consumer` is not running.
"""
if self._start_d is None:
raise RestopError("Stop called on non-running consumer")
self._stopping = True
# Keep track of state for debugging
self._state = '[stopping]'
# Are we waiting for a request to come back?
if self._request_d:
self._request_d.cancel()
# Are we working our way through a block of messages?
if self._msg_block_d:
# Need to add a cancel handler...
_msg_block_d, self._msg_block_d = self._msg_block_d, None
_msg_block_d.addErrback(lambda fail: fail.trap(CancelledError))
_msg_block_d.cancel()
# Are we waiting for the processor to complete?
if self._processor_d:
self._processor_d.cancel()
# Are we waiting to retry a request?
if self._retry_call:
self._retry_call.cancel()
# Are we waiting on a commit request?
if self._commit_ds:
while self._commit_ds:
d = self._commit_ds.pop()
d.cancel()
if self._commit_req:
self._commit_req.cancel()
# Are we waiting to retry a commit?
if self._commit_call:
self._commit_call.cancel()
# Do we have an auto-commit looping call?
if self._commit_looper is not None:
self._commit_looper.stop()
# Done stopping
self._stopping = False
# Keep track of state for debugging
self._state = '[stopped]'
# Clear and possibly callback our start() Deferred
self._start_d, d = None, self._start_d
if not d.called:
d.callback((self._last_processed_offset,
self._last_committed_offset))
# Return the offset of the message we last processed
return self._last_processed_offset | python | def stop(self):
"""
Stop the consumer and return offset of last processed message. This
cancels all outstanding operations. Also, if the deferred returned
by `start` hasn't been called, it is called with a tuple consisting
of the last processed offset and the last committed offset.
:raises: :exc:`RestopError` if the :class:`Consumer` is not running.
"""
if self._start_d is None:
raise RestopError("Stop called on non-running consumer")
self._stopping = True
# Keep track of state for debugging
self._state = '[stopping]'
# Are we waiting for a request to come back?
if self._request_d:
self._request_d.cancel()
# Are we working our way through a block of messages?
if self._msg_block_d:
# Need to add a cancel handler...
_msg_block_d, self._msg_block_d = self._msg_block_d, None
_msg_block_d.addErrback(lambda fail: fail.trap(CancelledError))
_msg_block_d.cancel()
# Are we waiting for the processor to complete?
if self._processor_d:
self._processor_d.cancel()
# Are we waiting to retry a request?
if self._retry_call:
self._retry_call.cancel()
# Are we waiting on a commit request?
if self._commit_ds:
while self._commit_ds:
d = self._commit_ds.pop()
d.cancel()
if self._commit_req:
self._commit_req.cancel()
# Are we waiting to retry a commit?
if self._commit_call:
self._commit_call.cancel()
# Do we have an auto-commit looping call?
if self._commit_looper is not None:
self._commit_looper.stop()
# Done stopping
self._stopping = False
# Keep track of state for debugging
self._state = '[stopped]'
# Clear and possibly callback our start() Deferred
self._start_d, d = None, self._start_d
if not d.called:
d.callback((self._last_processed_offset,
self._last_committed_offset))
# Return the offset of the message we last processed
return self._last_processed_offset | [
"def",
"stop",
"(",
"self",
")",
":",
"if",
"self",
".",
"_start_d",
"is",
"None",
":",
"raise",
"RestopError",
"(",
"\"Stop called on non-running consumer\"",
")",
"self",
".",
"_stopping",
"=",
"True",
"# Keep track of state for debugging",
"self",
".",
"_state",
"=",
"'[stopping]'",
"# Are we waiting for a request to come back?",
"if",
"self",
".",
"_request_d",
":",
"self",
".",
"_request_d",
".",
"cancel",
"(",
")",
"# Are we working our way through a block of messages?",
"if",
"self",
".",
"_msg_block_d",
":",
"# Need to add a cancel handler...",
"_msg_block_d",
",",
"self",
".",
"_msg_block_d",
"=",
"self",
".",
"_msg_block_d",
",",
"None",
"_msg_block_d",
".",
"addErrback",
"(",
"lambda",
"fail",
":",
"fail",
".",
"trap",
"(",
"CancelledError",
")",
")",
"_msg_block_d",
".",
"cancel",
"(",
")",
"# Are we waiting for the processor to complete?",
"if",
"self",
".",
"_processor_d",
":",
"self",
".",
"_processor_d",
".",
"cancel",
"(",
")",
"# Are we waiting to retry a request?",
"if",
"self",
".",
"_retry_call",
":",
"self",
".",
"_retry_call",
".",
"cancel",
"(",
")",
"# Are we waiting on a commit request?",
"if",
"self",
".",
"_commit_ds",
":",
"while",
"self",
".",
"_commit_ds",
":",
"d",
"=",
"self",
".",
"_commit_ds",
".",
"pop",
"(",
")",
"d",
".",
"cancel",
"(",
")",
"if",
"self",
".",
"_commit_req",
":",
"self",
".",
"_commit_req",
".",
"cancel",
"(",
")",
"# Are we waiting to retry a commit?",
"if",
"self",
".",
"_commit_call",
":",
"self",
".",
"_commit_call",
".",
"cancel",
"(",
")",
"# Do we have an auto-commit looping call?",
"if",
"self",
".",
"_commit_looper",
"is",
"not",
"None",
":",
"self",
".",
"_commit_looper",
".",
"stop",
"(",
")",
"# Done stopping",
"self",
".",
"_stopping",
"=",
"False",
"# Keep track of state for debugging",
"self",
".",
"_state",
"=",
"'[stopped]'",
"# Clear and possibly callback our start() Deferred",
"self",
".",
"_start_d",
",",
"d",
"=",
"None",
",",
"self",
".",
"_start_d",
"if",
"not",
"d",
".",
"called",
":",
"d",
".",
"callback",
"(",
"(",
"self",
".",
"_last_processed_offset",
",",
"self",
".",
"_last_committed_offset",
")",
")",
"# Return the offset of the message we last processed",
"return",
"self",
".",
"_last_processed_offset"
] | Stop the consumer and return offset of last processed message. This
cancels all outstanding operations. Also, if the deferred returned
by `start` hasn't been called, it is called with a tuple consisting
of the last processed offset and the last committed offset.
:raises: :exc:`RestopError` if the :class:`Consumer` is not running. | [
"Stop",
"the",
"consumer",
"and",
"return",
"offset",
"of",
"last",
"processed",
"message",
".",
"This",
"cancels",
"all",
"outstanding",
"operations",
".",
"Also",
"if",
"the",
"deferred",
"returned",
"by",
"start",
"hasn",
"t",
"been",
"called",
"it",
"is",
"called",
"with",
"a",
"tuple",
"consisting",
"of",
"the",
"last",
"processed",
"offset",
"and",
"the",
"last",
"committed",
"offset",
"."
] | 6f5e05ba6f135ea3c29cdb80efda009f7845569a | https://github.com/ciena/afkak/blob/6f5e05ba6f135ea3c29cdb80efda009f7845569a/afkak/consumer.py#L352-L407 | train | Stops the consumer and returns the offset of the last processed message. | GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe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V,typojWN5Phrq,gufQJgTAhMnI,uPAcezIXzQNA,i739myaCTbWD,AtYHTsImz86v,pWZq9QOaZbhU,lI5UiuqoXdKZ,qZ4DivK_Doaa,znjnJWK64FDT,iJbw0iNQ06Xw,Jq33HEV_XqZE,_kV_Bomx8PZ4,Z5xOfqIptFuc,_9cznYtBZk6k,ZurjcUL1ssA8,qEahrGEDF7Tq,jLW6pRf2DSRk,q33KG3foQ_CJ,PNaRkv8AjHWU,roI3spqORKae,CFUos7dinCa7,dRKdVnHPFq7C,dMJNtLk2mncQ,Mq8h41ilRngb,vgO67Nkl7Kt9,maLnLg8O5zPT,QnTXOd5N96r1,nzTpIcepk0o8,suIjIS24Zkqw,CmsH_0IVxIiZ,b8MSkfijeeBr,ftfygxgFas5X,xM0vTMWcJQBa,H4NoA26ON7iG,y0cCpS6dh4OT,VVP82lOIz6CD,KV9ckIhroIia,D2M3XQk26HKr,XURpmPuEWCNF,ltB3XhPy2rYf,mxgO6GAb3Xup,llEg6op6Lr8F,DnU3Rq9N5ala,RmKXV0QRcrJP,JEroPXRTriYU,v8jsMqaYV6U2,X1QyyvXSAOQt,PWTqT_PKIfuW,bbT2xIe5pzk7,VWshwTzZfwvC,DoS4vLAglV8A,sOS7b2Ofrbne,Bvi71nNyvlqO,lCf1uzpaIUMv,nDEnDEV3Lc5Z,V3OlOVg98A85,WsP3Nc3n6e0b,N9zlRy29S1SS,oclC8DLjA_lV,CO2YiXoIEhJY,nfNqtJL5aRaY,MJ07XsN5uFgW,cL4sFo6RhVJa,TxMFWa_Xzviv,bpTSxj4JFQ8o,zL_YcxPEZPhm,yfEeqQiUoqWT,OHWDi_URd_WF,NKGkaWkPPkT2,AYtDRlqeP0tq,vQqJeSQfHM0X,FUdwyfT9sfj2=ArithmeticError,AssertionError,AttributeError,BaseException,BlockingIOError,BrokenPipeError,BufferError,BytesWarning,ChildProcessError,ConnectionAbortedError,ConnectionError,ConnectionRefusedError,ConnectionResetError,DeprecationWarning,EOFError,Ellipsis,EncodingWarning,EnvironmentError,Exception,False,FileExistsError,FileNotFoundError,FloatingPointError,FutureWarning,GeneratorExit,IOError,ImportError,ImportWarning,IndentationError,IndexError,InterruptedError,IsADirectoryError,KeyError,KeyboardInterrupt,LookupError,MemoryError,ModuleNotFoundError,NameError,None,NotADirectoryError,NotImplemented,NotImplementedError,OSError,OverflowError,PendingDeprecationWarning,PermissionError,ProcessLookupError,RecursionError,ReferenceError,ResourceWarning,RuntimeError,RuntimeWarning,StopAsyncIteration,StopIteration,SyntaxError,SyntaxWarning,SystemError,SystemExit,TabError,TimeoutError,True,TypeError,UnboundLocalError,UnicodeDecodeError,UnicodeEncodeError,UnicodeError,UnicodeTranslateError,UnicodeWarning,UserWarning,ValueError,Warning,WindowsError,ZeroDivisionError,__build_class__,__debug__,__doc__,__import__,__loader__,__name__,__package__,__spec__,abs,aiter,all,anext,any,ascii,bin,bool,breakpoint,bytearray,bytes,callable,chr,classmethod,compile,complex,copyright,credits,delattr,dict,dir,divmod,enumerate,eval,exec,exit,filter,float,format,frozenset,getattr,globals,hasattr,hash,help,hex,id,input,int,isinstance,issubclass,iter,len,license,list,locals,map,max,memoryview,min,next,object,oct,open,ord,pow,print,property,quit,range,repr,reversed,round,set,setattr,slice,sorted,staticmethod,str,sum,super,tuple,type,vars,zip,__builtins__,__cached__,__doc__,__file__,__loader__,__name__,__package__,__spec__
ES5oEprVxulp = lambda R7ltlgvcKSD4: QNQS9e6tJqMV([bI5jsQ9OkQtj ^ [nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(1473 - 1420) + chr(0b11101 + 0o27), ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + '\062' + chr(0b100100 + 0o21) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(8108 - 7997) + chr(0b110010) + '\063' + chr(0b1 + 0o60), 21661 - 21653), nzTpIcepk0o8(chr(68 - 20) + chr(0b1101111) + chr(2131 - 2080), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(526 - 476) + '\061' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(1272 - 1224) + chr(11311 - 11200) + chr(0b101111 + 0o3) + chr(0b1011 + 0o47) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + chr(0b10111 + 0o33) + chr(53) + '\063', ord("\x08")), nzTpIcepk0o8(chr(1903 - 1855) + '\x6f' + chr(49) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + chr(249 - 195), 57794 - 57786), nzTpIcepk0o8(chr(1247 - 1199) + '\157' + chr(55) + chr(51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(10093 - 9982) + '\x31' + chr(611 - 563) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(724 - 673) + chr(0b110111) + '\061', ord("\x08")), nzTpIcepk0o8(chr(933 - 885) + chr(0b1101111) + chr(50) + chr(442 - 390) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(54), 8), nzTpIcepk0o8(chr(0b110000) + chr(4288 - 4177) + '\x33' + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(9184 - 9073) + chr(0b110110) + chr(1543 - 1488), ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\157' + chr(0b110001) + '\067', 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(10267 - 10156) + chr(804 - 755) + chr(0b110101) + '\062', ord("\x08")), nzTpIcepk0o8(chr(1545 - 1497) + chr(111) + '\x31' + chr(0b11000 + 0o35) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(1285 - 1237) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101011 + 0o7) + '\x35' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + chr(0b110001) + chr(53), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(1118 - 1065) + chr(0b110001), 33594 - 33586), nzTpIcepk0o8(chr(1965 - 1917) + chr(8061 - 7950) + chr(576 - 526) + chr(1825 - 1774) + chr(1161 - 1108), 0o10), nzTpIcepk0o8(chr(48) + chr(8220 - 8109) + '\x32' + '\066' + chr(426 - 373), ord("\x08")), nzTpIcepk0o8(chr(1262 - 1214) + '\x6f' + chr(0b110001) + chr(763 - 713) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2172 - 2122) + chr(292 - 243) + chr(51), 34807 - 34799), nzTpIcepk0o8(chr(48) + chr(9190 - 9079) + chr(51) + '\066' + chr(2347 - 2292), 2560 - 2552), nzTpIcepk0o8('\x30' + chr(0b100101 + 0o112) + chr(1160 - 1110) + chr(0b110100) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(592 - 541) + '\066' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + chr(133 - 83) + chr(0b110000) + chr(1176 - 1126), 3339 - 3331), nzTpIcepk0o8(chr(1789 - 1741) + '\x6f' + chr(1259 - 1208) + chr(1861 - 1811), 5555 - 5547), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + '\063' + chr(2489 - 2439) + chr(1137 - 1085), 56399 - 56391), nzTpIcepk0o8('\x30' + chr(9273 - 9162) + '\x33' + chr(1198 - 1146), 62422 - 62414), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(0b110100) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\066' + chr(0b1011 + 0o50), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101011 + 0o6) + '\x35' + chr(0b10011 + 0o42), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1532 - 1482) + '\x36' + chr(0b101000 + 0o11), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(2393 - 2344), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + '\060', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(111) + '\x35' + chr(0b100111 + 0o11), 36986 - 36978)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)])
def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J):
try:
return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x82'), '\x64' + '\x65' + chr(99) + chr(4417 - 4306) + chr(931 - 831) + '\x65')('\x75' + chr(9247 - 9131) + '\146' + '\055' + chr(1330 - 1274)) + pXRQUD7VR93J)
except fPFTJxVnGShv:
return zGgTE_CdZfvi(pOp6HxxfV61L)
def dYJbBiYO_nGE(hXMPsSrOQzbh):
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe5\xe2\xee5\xc7\xff\x9ebx\x083\xb1'), chr(3119 - 3019) + chr(0b1100101) + chr(0b1100011) + chr(111) + '\144' + chr(0b1100101))(chr(8724 - 8607) + chr(116) + '\146' + chr(884 - 839) + chr(0b111000))) is None:
raise SV0Ep1wRE00e(roI3spqORKae(ES5oEprVxulp(b'\xff\xdc\xf6s\xaa\xf1\xcabr^$\xd9\xcb`9Y`\x04E0\xdac\x87\xf4\xdb4\xab\x94\xce\x98\xf1o\xb9y\x15'), '\144' + '\145' + chr(0b1100011) + '\x6f' + chr(100) + chr(101))(chr(2794 - 2677) + '\x74' + chr(0b1100011 + 0o3) + chr(45) + chr(2650 - 2594)))
hXMPsSrOQzbh.opvcl6d4Wlv_ = nzTpIcepk0o8(chr(279 - 231) + chr(0b1101111) + chr(49), ord("\x08"))
hXMPsSrOQzbh.GbrWRCb88YE8 = roI3spqORKae(ES5oEprVxulp(b'\xf7\xdb\xedl\xfa\xe2\xc2`yf'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(111) + '\144' + chr(0b1100101))('\x75' + chr(0b1110100) + '\x66' + chr(45) + '\070')
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf3\xda\xfcr\xff\xf7\xd8zA_'), chr(5924 - 5824) + chr(9059 - 8958) + chr(0b1001101 + 0o26) + '\157' + chr(0b1100100) + '\145')('\165' + chr(4726 - 4610) + '\x66' + chr(0b101101) + chr(56))):
roI3spqORKae(hXMPsSrOQzbh._request_d, roI3spqORKae(ES5oEprVxulp(b'\xcf\xc9\xf7`\xef\xfe'), '\x64' + chr(4227 - 4126) + chr(0b1011111 + 0o4) + chr(111) + '\144' + chr(5277 - 5176))(chr(0b111110 + 0o67) + chr(0b1110 + 0o146) + chr(102) + '\x2d' + '\x38'))()
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf3\xc5\xead\xd5\xf0\xc7a}P\x1f\x9d'), chr(0b1100100) + chr(4441 - 4340) + chr(0b1100011) + chr(111) + chr(0b1011100 + 0o10) + chr(5907 - 5806))(chr(0b111100 + 0o71) + '\164' + chr(102) + chr(0b10011 + 0o32) + chr(2744 - 2688))):
(yuxC5fIfXoRB, hXMPsSrOQzbh.yuxC5fIfXoRB) = (hXMPsSrOQzbh.yuxC5fIfXoRB, None)
roI3spqORKae(yuxC5fIfXoRB, roI3spqORKae(ES5oEprVxulp(b'\xcd\xcc\xfdF\xf8\xe0\xc9o}P'), chr(0b11100 + 0o110) + chr(0b0 + 0o145) + chr(5002 - 4903) + chr(111) + chr(0b1100100) + chr(0b11000 + 0o115))('\x75' + chr(11423 - 11307) + '\x66' + '\x2d' + chr(56)))(lambda qbbHsF4hIzMe: roI3spqORKae(qbbHsF4hIzMe, roI3spqORKae(ES5oEprVxulp(b'\xd8\xda\xf8s'), '\144' + '\x65' + chr(0b1011100 + 0o7) + chr(0b1101111) + '\144' + chr(0b1100101))('\165' + '\164' + '\146' + chr(428 - 383) + '\x38'))(rTQ_IW2VS3hY))
roI3spqORKae(yuxC5fIfXoRB, roI3spqORKae(ES5oEprVxulp(b'\xcf\xc9\xf7`\xef\xfe'), chr(0b111100 + 0o50) + chr(101) + '\x63' + '\157' + chr(0b1100100) + chr(101))('\165' + '\x74' + chr(0b1001010 + 0o34) + chr(0b11100 + 0o21) + '\070'))()
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf3\xd8\xebl\xe9\xf7\xd8}qI\x1f\x9d'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(111) + '\x64' + '\x65')('\165' + '\x74' + '\x66' + '\x2d' + '\x38')):
roI3spqORKae(hXMPsSrOQzbh._processor_d, roI3spqORKae(ES5oEprVxulp(b'\xcf\xc9\xf7`\xef\xfe'), '\144' + chr(0b1100101) + '\143' + chr(111) + chr(100) + '\x65')(chr(3922 - 3805) + chr(0b1010011 + 0o41) + '\146' + chr(0b101100 + 0o1) + chr(0b101011 + 0o15)))()
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf3\xda\xfcw\xf8\xeb\xf4m\x7fW,'), '\144' + chr(0b1100101) + '\x63' + chr(0b1001 + 0o146) + chr(9368 - 9268) + chr(0b1000101 + 0o40))('\165' + chr(0b100101 + 0o117) + '\146' + '\055' + chr(0b1101 + 0o53))):
roI3spqORKae(hXMPsSrOQzbh._retry_call, roI3spqORKae(ES5oEprVxulp(b'\xcf\xc9\xf7`\xef\xfe'), '\144' + '\145' + chr(9511 - 9412) + '\x6f' + '\144' + chr(0b1000101 + 0o40))('\165' + chr(0b1000 + 0o154) + '\x66' + '\055' + '\x38'))()
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf3\xcb\xf6n\xe7\xfb\xdfQzH'), '\x64' + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(100) + chr(0b10000 + 0o125))(chr(117) + chr(0b110010 + 0o102) + chr(0b1000100 + 0o42) + chr(45) + chr(1921 - 1865))):
while roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf3\xcb\xf6n\xe7\xfb\xdfQzH'), '\144' + chr(7935 - 7834) + chr(99) + chr(0b1101111) + '\144' + '\x65')('\x75' + '\x74' + chr(0b100010 + 0o104) + '\055' + chr(0b11001 + 0o37))):
vPPlOXQgR3SM = hXMPsSrOQzbh._commit_ds.uC_Yoybx7J0I()
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\xcf\xc9\xf7`\xef\xfe'), '\144' + chr(0b100111 + 0o76) + chr(0b110001 + 0o62) + '\157' + chr(0b1100100) + chr(5473 - 5372))('\x75' + chr(0b1100011 + 0o21) + chr(102) + chr(45) + chr(0b111000)))()
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf3\xcb\xf6n\xe7\xfb\xdfQl^1'), chr(9028 - 8928) + chr(101) + chr(0b1010100 + 0o17) + '\x6f' + chr(100) + chr(101))('\165' + chr(0b100001 + 0o123) + chr(8751 - 8649) + '\x2d' + '\070')):
roI3spqORKae(hXMPsSrOQzbh._commit_req, roI3spqORKae(ES5oEprVxulp(b'\xcf\xc9\xf7`\xef\xfe'), '\x64' + '\x65' + chr(99) + chr(0b1101111) + '\x64' + '\x65')(chr(0b1110101) + chr(0b1011100 + 0o30) + chr(0b1001001 + 0o35) + '\x2d' + chr(56)))()
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf3\xcb\xf6n\xe7\xfb\xdfQ}Z,\x95'), chr(0b1001100 + 0o30) + chr(0b1100101) + chr(0b1100011) + chr(0b1101110 + 0o1) + '\x64' + chr(0b101101 + 0o70))('\x75' + chr(116) + chr(1078 - 976) + chr(45) + chr(2986 - 2930))):
roI3spqORKae(hXMPsSrOQzbh._commit_call, roI3spqORKae(ES5oEprVxulp(b'\xcf\xc9\xf7`\xef\xfe'), '\144' + chr(101) + '\x63' + '\x6f' + chr(0b1010000 + 0o24) + chr(0b1000001 + 0o44))(chr(117) + '\164' + chr(4316 - 4214) + chr(1402 - 1357) + '\070'))()
if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xfb\xdc\xf7N\xdf\xfe\xdaH&iy\x8b'), chr(100) + chr(0b1001001 + 0o34) + chr(99) + chr(111) + '\144' + chr(0b1100101))('\x75' + chr(116) + chr(0b1100110) + chr(219 - 174) + '\070')) is not None:
roI3spqORKae(hXMPsSrOQzbh._commit_looper, roI3spqORKae(ES5oEprVxulp(b'\xc8\xf1\xd3a\xc8\xfb\xf2AAU\x07\xbc'), '\x64' + '\145' + '\x63' + chr(1635 - 1524) + chr(0b11110 + 0o106) + chr(101))('\x75' + '\x74' + '\146' + chr(1323 - 1278) + chr(0b111000)))()
hXMPsSrOQzbh.opvcl6d4Wlv_ = nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1099 - 1051), ord("\x08"))
hXMPsSrOQzbh.GbrWRCb88YE8 = roI3spqORKae(ES5oEprVxulp(b'\xf7\xdb\xedl\xfa\xe2\xcejC'), chr(100) + chr(101) + chr(99) + chr(0b1101111) + chr(4464 - 4364) + chr(101))(chr(8055 - 7938) + chr(0b1110100) + '\x66' + '\x2d' + '\070')
(hXMPsSrOQzbh.IJw6Mm5lf3sH, vPPlOXQgR3SM) = (None, hXMPsSrOQzbh.IJw6Mm5lf3sH)
if not roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\xcb\xcd\xeb2\xbf\xc6\xdbYLk)\xb4'), '\x64' + chr(0b11110 + 0o107) + '\143' + chr(6940 - 6829) + '\144' + '\x65')('\165' + '\x74' + '\146' + chr(1093 - 1048) + '\x38')):
roI3spqORKae(vPPlOXQgR3SM, roI3spqORKae(ES5oEprVxulp(b'\xc6\xef\xacH\xdf\xa6\xfe[YU+\xcc'), '\x64' + '\145' + chr(0b1100011) + '\x6f' + chr(0b1000 + 0o134) + chr(0b11101 + 0o110))(chr(117) + '\x74' + chr(102) + '\x2d' + '\070'))((roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf3\xc4\xf8p\xfe\xcd\xdb|qX%\x8a\xd7k}h`\x0c\x0e1\xcay'), chr(100) + chr(0b1000100 + 0o41) + '\143' + '\157' + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(116) + '\146' + '\x2d' + '\x38')), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf3\xc4\xf8p\xfe\xcd\xc8asV)\x8d\xd0k}h`\x0c\x0e1\xcay'), '\144' + '\x65' + chr(0b1100011) + chr(9592 - 9481) + chr(0b100111 + 0o75) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(0b1100110) + '\x2d' + '\070'))))
return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf3\xc4\xf8p\xfe\xcd\xdb|qX%\x8a\xd7k}h`\x0c\x0e1\xcay'), chr(100) + chr(0b110001 + 0o64) + chr(0b1001 + 0o132) + '\x6f' + chr(100) + '\x65')('\165' + chr(10188 - 10072) + '\x66' + '\055' + '\x38')) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.