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
sequencelengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
sequencelengths
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
milesrichardson/ParsePy
parse_rest/connection.py
ParseBase.execute
def execute(cls, uri, http_verb, extra_headers=None, batch=False, _body=None, **kw): """ if batch == False, execute a command with the given parameters and return the response JSON. If batch == True, return the dictionary that would be used in a batch command. """ if batch: urlsplitter = urlparse(API_ROOT).netloc ret = {"method": http_verb, "path": uri.split(urlsplitter, 1)[1]} if kw: ret["body"] = kw return ret if not ('app_id' in ACCESS_KEYS and 'rest_key' in ACCESS_KEYS): raise core.ParseError('Missing connection credentials') app_id = ACCESS_KEYS.get('app_id') rest_key = ACCESS_KEYS.get('rest_key') master_key = ACCESS_KEYS.get('master_key') url = uri if uri.startswith(API_ROOT) else cls.ENDPOINT_ROOT + uri if _body is None: data = kw and json.dumps(kw, default=date_handler) or "{}" else: data = _body if http_verb == 'GET' and data: url += '?%s' % urlencode(kw) data = None else: if cls.__name__ == 'File': data = data else: data = data.encode('utf-8') headers = { 'Content-type': 'application/json', 'X-Parse-Application-Id': app_id, 'X-Parse-REST-API-Key': rest_key } headers.update(extra_headers or {}) if cls.__name__ == 'File': request = Request(url.encode('utf-8'), data, headers) else: request = Request(url, data, headers) if ACCESS_KEYS.get('session_token'): request.add_header('X-Parse-Session-Token', ACCESS_KEYS.get('session_token')) elif master_key: request.add_header('X-Parse-Master-Key', master_key) request.get_method = lambda: http_verb try: response = urlopen(request, timeout=CONNECTION_TIMEOUT) except HTTPError as e: exc = { 400: core.ResourceRequestBadRequest, 401: core.ResourceRequestLoginRequired, 403: core.ResourceRequestForbidden, 404: core.ResourceRequestNotFound }.get(e.code, core.ParseError) raise exc(e.read()) return json.loads(response.read().decode('utf-8'))
python
def execute(cls, uri, http_verb, extra_headers=None, batch=False, _body=None, **kw): """ if batch == False, execute a command with the given parameters and return the response JSON. If batch == True, return the dictionary that would be used in a batch command. """ if batch: urlsplitter = urlparse(API_ROOT).netloc ret = {"method": http_verb, "path": uri.split(urlsplitter, 1)[1]} if kw: ret["body"] = kw return ret if not ('app_id' in ACCESS_KEYS and 'rest_key' in ACCESS_KEYS): raise core.ParseError('Missing connection credentials') app_id = ACCESS_KEYS.get('app_id') rest_key = ACCESS_KEYS.get('rest_key') master_key = ACCESS_KEYS.get('master_key') url = uri if uri.startswith(API_ROOT) else cls.ENDPOINT_ROOT + uri if _body is None: data = kw and json.dumps(kw, default=date_handler) or "{}" else: data = _body if http_verb == 'GET' and data: url += '?%s' % urlencode(kw) data = None else: if cls.__name__ == 'File': data = data else: data = data.encode('utf-8') headers = { 'Content-type': 'application/json', 'X-Parse-Application-Id': app_id, 'X-Parse-REST-API-Key': rest_key } headers.update(extra_headers or {}) if cls.__name__ == 'File': request = Request(url.encode('utf-8'), data, headers) else: request = Request(url, data, headers) if ACCESS_KEYS.get('session_token'): request.add_header('X-Parse-Session-Token', ACCESS_KEYS.get('session_token')) elif master_key: request.add_header('X-Parse-Master-Key', master_key) request.get_method = lambda: http_verb try: response = urlopen(request, timeout=CONNECTION_TIMEOUT) except HTTPError as e: exc = { 400: core.ResourceRequestBadRequest, 401: core.ResourceRequestLoginRequired, 403: core.ResourceRequestForbidden, 404: core.ResourceRequestNotFound }.get(e.code, core.ParseError) raise exc(e.read()) return json.loads(response.read().decode('utf-8'))
[ "def", "execute", "(", "cls", ",", "uri", ",", "http_verb", ",", "extra_headers", "=", "None", ",", "batch", "=", "False", ",", "_body", "=", "None", ",", "*", "*", "kw", ")", ":", "if", "batch", ":", "urlsplitter", "=", "urlparse", "(", "API_ROOT", ")", ".", "netloc", "ret", "=", "{", "\"method\"", ":", "http_verb", ",", "\"path\"", ":", "uri", ".", "split", "(", "urlsplitter", ",", "1", ")", "[", "1", "]", "}", "if", "kw", ":", "ret", "[", "\"body\"", "]", "=", "kw", "return", "ret", "if", "not", "(", "'app_id'", "in", "ACCESS_KEYS", "and", "'rest_key'", "in", "ACCESS_KEYS", ")", ":", "raise", "core", ".", "ParseError", "(", "'Missing connection credentials'", ")", "app_id", "=", "ACCESS_KEYS", ".", "get", "(", "'app_id'", ")", "rest_key", "=", "ACCESS_KEYS", ".", "get", "(", "'rest_key'", ")", "master_key", "=", "ACCESS_KEYS", ".", "get", "(", "'master_key'", ")", "url", "=", "uri", "if", "uri", ".", "startswith", "(", "API_ROOT", ")", "else", "cls", ".", "ENDPOINT_ROOT", "+", "uri", "if", "_body", "is", "None", ":", "data", "=", "kw", "and", "json", ".", "dumps", "(", "kw", ",", "default", "=", "date_handler", ")", "or", "\"{}\"", "else", ":", "data", "=", "_body", "if", "http_verb", "==", "'GET'", "and", "data", ":", "url", "+=", "'?%s'", "%", "urlencode", "(", "kw", ")", "data", "=", "None", "else", ":", "if", "cls", ".", "__name__", "==", "'File'", ":", "data", "=", "data", "else", ":", "data", "=", "data", ".", "encode", "(", "'utf-8'", ")", "headers", "=", "{", "'Content-type'", ":", "'application/json'", ",", "'X-Parse-Application-Id'", ":", "app_id", ",", "'X-Parse-REST-API-Key'", ":", "rest_key", "}", "headers", ".", "update", "(", "extra_headers", "or", "{", "}", ")", "if", "cls", ".", "__name__", "==", "'File'", ":", "request", "=", "Request", "(", "url", ".", "encode", "(", "'utf-8'", ")", ",", "data", ",", "headers", ")", "else", ":", "request", "=", "Request", "(", "url", ",", "data", ",", "headers", ")", "if", "ACCESS_KEYS", ".", "get", "(", "'session_token'", ")", ":", "request", ".", "add_header", "(", "'X-Parse-Session-Token'", ",", "ACCESS_KEYS", ".", "get", "(", "'session_token'", ")", ")", "elif", "master_key", ":", "request", ".", "add_header", "(", "'X-Parse-Master-Key'", ",", "master_key", ")", "request", ".", "get_method", "=", "lambda", ":", "http_verb", "try", ":", "response", "=", "urlopen", "(", "request", ",", "timeout", "=", "CONNECTION_TIMEOUT", ")", "except", "HTTPError", "as", "e", ":", "exc", "=", "{", "400", ":", "core", ".", "ResourceRequestBadRequest", ",", "401", ":", "core", ".", "ResourceRequestLoginRequired", ",", "403", ":", "core", ".", "ResourceRequestForbidden", ",", "404", ":", "core", ".", "ResourceRequestNotFound", "}", ".", "get", "(", "e", ".", "code", ",", "core", ".", "ParseError", ")", "raise", "exc", "(", "e", ".", "read", "(", ")", ")", "return", "json", ".", "loads", "(", "response", ".", "read", "(", ")", ".", "decode", "(", "'utf-8'", ")", ")" ]
if batch == False, execute a command with the given parameters and return the response JSON. If batch == True, return the dictionary that would be used in a batch command.
[ "if", "batch", "==", "False", "execute", "a", "command", "with", "the", "given", "parameters", "and", "return", "the", "response", "JSON", ".", "If", "batch", "==", "True", "return", "the", "dictionary", "that", "would", "be", "used", "in", "a", "batch", "command", "." ]
7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea
https://github.com/milesrichardson/ParsePy/blob/7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea/parse_rest/connection.py#L85-L150
train
Execute a command with the given parameters and return the response JSON.
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,KSw3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,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' + '\x31' + chr(52) + '\061', 14935 - 14927), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(0b110110) + chr(0b10 + 0o62), ord("\x08")), nzTpIcepk0o8('\x30' + chr(10293 - 10182) + chr(1661 - 1606) + chr(0b1110 + 0o47), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(1487 - 1437) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101010 + 0o7) + '\x31' + '\062', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10101 + 0o36) + chr(0b110011) + chr(0b1001 + 0o56), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + '\x33' + chr(1674 - 1625), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\066' + chr(804 - 755), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(0b11 + 0o64) + chr(1556 - 1501), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(0b110010) + '\x36', 57360 - 57352), nzTpIcepk0o8('\060' + chr(10493 - 10382) + '\x31' + chr(0b1010 + 0o54) + chr(50), 48071 - 48063), nzTpIcepk0o8(chr(356 - 308) + chr(4568 - 4457) + chr(51) + '\x30' + chr(1430 - 1376), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + chr(2323 - 2274) + chr(50), 53556 - 53548), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1101111) + chr(50) + chr(53) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + chr(0b101111 + 0o100) + chr(0b10110 + 0o41) + chr(0b11111 + 0o22), 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + chr(2583 - 2532) + '\x31' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(566 - 515) + chr(0b111 + 0o51), 19879 - 19871), nzTpIcepk0o8(chr(1120 - 1072) + chr(0b1101111) + chr(0b101111 + 0o4) + '\x35', 54584 - 54576), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + chr(0b110001) + chr(54) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + chr(4228 - 4117) + '\063' + chr(0b1010 + 0o50) + chr(0b0 + 0o65), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(52) + chr(0b10101 + 0o34), 8), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + chr(49) + chr(0b111 + 0o52) + chr(0b10110 + 0o36), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(51) + '\061' + chr(0b110110), 8), nzTpIcepk0o8(chr(261 - 213) + chr(0b1101111) + chr(49) + chr(997 - 949) + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(936 - 887) + chr(0b10 + 0o56) + chr(49), 16846 - 16838), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\157' + '\061' + chr(0b10110 + 0o37) + '\x31', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(814 - 765) + chr(0b0 + 0o61) + chr(2087 - 2032), 59350 - 59342), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\065' + chr(2547 - 2496), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + '\064' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(7554 - 7443) + '\062' + chr(0b110111) + '\061', ord("\x08")), nzTpIcepk0o8(chr(801 - 753) + chr(0b11110 + 0o121) + '\x32' + '\066' + '\066', 41333 - 41325), nzTpIcepk0o8('\060' + '\157' + chr(639 - 588) + '\x33' + chr(50), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(0b11100 + 0o33) + '\x35', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(2501 - 2447) + chr(49), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + '\x30' + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(10286 - 10175) + '\062' + chr(52) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(416 - 368) + chr(0b1001100 + 0o43) + chr(0b100111 + 0o16), 49186 - 49178), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\064' + chr(0b10001 + 0o44), ord("\x08")), nzTpIcepk0o8(chr(1699 - 1651) + chr(0b1101111) + '\063' + chr(2823 - 2769), 0b1000), nzTpIcepk0o8('\060' + chr(1739 - 1628) + chr(0b101101 + 0o5) + chr(298 - 249) + '\x33', 29754 - 29746)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(53) + chr(0b101111 + 0o1), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'O'), chr(0b1100100) + chr(101) + chr(1764 - 1665) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(9364 - 9262) + '\055' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def CS4S7RlNdTsy(_1vzISbJ_R2i, Sn_0RxvtUGVB, WpGneDvmRv2S, Yww2ZUZhqh2n=None, vccczMELzkdW=nzTpIcepk0o8(chr(2225 - 2177) + '\157' + chr(0b1011 + 0o45), 0b1000), IA6JDg1wDErg=None, **n_DqV9fOWrXc): if vccczMELzkdW: LyuuPlRROsDL = cBkYfihkXwhl(bHujHnZadqLZ).netloc PvvMx4JvMX6J = {roI3spqORKae(ES5oEprVxulp(b'\x0c\xd1I~%\xbb'), '\144' + '\x65' + '\x63' + chr(0b1101111) + chr(100) + chr(0b1100101))(chr(0b10010 + 0o143) + '\164' + '\146' + '\055' + '\x38'): WpGneDvmRv2S, roI3spqORKae(ES5oEprVxulp(b'\x11\xd5I~'), chr(3908 - 3808) + '\145' + chr(7124 - 7025) + chr(0b1101111) + chr(100) + '\x65')('\165' + '\x74' + chr(0b1100110) + '\055' + chr(2925 - 2869)): Sn_0RxvtUGVB.LfRrQOxuDvnC(LyuuPlRROsDL, nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061', 0b1000))[nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061', 8)]} if n_DqV9fOWrXc: PvvMx4JvMX6J[roI3spqORKae(ES5oEprVxulp(b'\x03\xdbYo'), chr(0b10110 + 0o116) + chr(3825 - 3724) + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b100001 + 0o124) + '\164' + chr(0b1100110) + chr(353 - 308) + chr(0b111000))] = n_DqV9fOWrXc return PvvMx4JvMX6J if not (roI3spqORKae(ES5oEprVxulp(b'\x00\xc4MI#\xbb'), '\x64' + '\x65' + '\x63' + chr(111) + '\x64' + '\x65')(chr(10476 - 10359) + chr(0b1110100) + '\146' + chr(0b101101) + chr(0b111000)) in K1wi_27h4IZT and roI3spqORKae(ES5oEprVxulp(b'\x13\xd1Nb\x15\xb4\xbcH'), chr(100) + chr(2324 - 2223) + chr(0b1100011) + '\157' + chr(0b1100100) + '\x65')(chr(117) + chr(0b110111 + 0o75) + chr(102) + '\055' + chr(2074 - 2018)) in K1wi_27h4IZT): raise roI3spqORKae(fJSwBORhebts, roI3spqORKae(ES5oEprVxulp(b'1\xd5Oe/\x9a\xabC\x10$'), chr(0b1100100) + '\145' + chr(99) + chr(0b1001 + 0o146) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1010100 + 0o22) + chr(1138 - 1093) + chr(2673 - 2617)))(roI3spqORKae(ES5oEprVxulp(b',\xddNe#\xb1\xbe\x11\x1c9\x1c\xa8\xef\xcdM\xa7wsU\xb6\x13)\xaa%/\x1d&J\xca\xca'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(111) + chr(0b110111 + 0o55) + '\145')(chr(0b1110101) + '\164' + '\x66' + chr(949 - 904) + '\070')) OWK82oF7YHxB = K1wi_27h4IZT.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'\x00\xc4MI#\xbb'), chr(100) + chr(7259 - 7158) + chr(0b110010 + 0o61) + chr(8828 - 8717) + chr(100) + '\x65')(chr(0b1001010 + 0o53) + '\164' + chr(3740 - 3638) + chr(45) + chr(0b100111 + 0o21))) NY9fSxSHswVx = K1wi_27h4IZT.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'\x13\xd1Nb\x15\xb4\xbcH'), '\144' + chr(0b1100101) + chr(0b100001 + 0o102) + chr(3749 - 3638) + chr(100) + '\145')(chr(8451 - 8334) + chr(4660 - 4544) + chr(1081 - 979) + chr(0b11010 + 0o23) + chr(0b110101 + 0o3))) Ps2WCB2Zivtk = K1wi_27h4IZT.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'\x0c\xd5Nb/\xad\x86Z\x1a/'), chr(0b1100100) + chr(101) + chr(5696 - 5597) + chr(11458 - 11347) + chr(0b1100100) + chr(0b100110 + 0o77))(chr(10826 - 10709) + chr(116) + chr(102) + '\x2d' + chr(0b10100 + 0o44))) XuBkOpBKZJ5Z = Sn_0RxvtUGVB if Sn_0RxvtUGVB.startswith(bHujHnZadqLZ) else _1vzISbJ_R2i.ENDPOINT_ROOT + Sn_0RxvtUGVB if IA6JDg1wDErg is None: FfKOThdpoDTb = n_DqV9fOWrXc and LNUKEwZDIbyb.Zjglmm8uenkC(n_DqV9fOWrXc, default=rnJ5A7gCyRTI) or roI3spqORKae(ES5oEprVxulp(b'\x1a\xc9'), chr(0b101101 + 0o67) + chr(101) + '\143' + chr(111) + chr(0b1100100) + chr(101))(chr(0b1110101) + '\164' + chr(5743 - 5641) + chr(45) + chr(0b111000)) else: FfKOThdpoDTb = IA6JDg1wDErg if WpGneDvmRv2S == roI3spqORKae(ES5oEprVxulp(b'&\xf1i'), chr(0b101000 + 0o74) + chr(6725 - 6624) + chr(6776 - 6677) + '\x6f' + '\144' + chr(0b1100101))(chr(117) + chr(0b1001110 + 0o46) + '\146' + chr(0b101101) + '\070') and FfKOThdpoDTb: XuBkOpBKZJ5Z += roI3spqORKae(ES5oEprVxulp(b'^\x91N'), chr(100) + '\x65' + chr(0b1100011) + chr(0b1011 + 0o144) + chr(7904 - 7804) + '\145')(chr(0b111 + 0o156) + '\x74' + '\x66' + chr(45) + chr(56)) % br3iGkc8U6sH(n_DqV9fOWrXc) FfKOThdpoDTb = None elif roI3spqORKae(_1vzISbJ_R2i, roI3spqORKae(ES5oEprVxulp(b' \xedIR\x18\xb3\xa8T/f\x06\xb7'), chr(0b10 + 0o142) + '\x65' + chr(3888 - 3789) + chr(0b111 + 0o150) + chr(100) + '\145')(chr(5572 - 5455) + '\164' + '\146' + '\055' + chr(1466 - 1410))) == roI3spqORKae(ES5oEprVxulp(b"'\xddQs"), chr(0b1100100) + chr(101) + chr(2337 - 2238) + chr(0b1101111) + chr(0b110 + 0o136) + chr(3080 - 2979))(chr(0b101110 + 0o107) + chr(7311 - 7195) + '\146' + '\x2d' + chr(0b11000 + 0o40)): FfKOThdpoDTb = FfKOThdpoDTb else: FfKOThdpoDTb = FfKOThdpoDTb.YqIaRFfeo4Ha(roI3spqORKae(ES5oEprVxulp(b'\x14\xc0[;r'), '\144' + '\x65' + chr(99) + chr(0b1101111) + chr(5072 - 4972) + '\145')(chr(7011 - 6894) + chr(5523 - 5407) + '\146' + chr(1837 - 1792) + '\x38')) UyworZfslHjc = {roI3spqORKae(ES5oEprVxulp(b'"\xdbSb/\xb1\xad\x1c\x0b/\x02\xa3'), chr(0b10111 + 0o115) + '\x65' + chr(99) + chr(0b100111 + 0o110) + chr(0b1100100) + chr(2135 - 2034))('\165' + chr(0b1110100) + '\146' + chr(45) + chr(0b110111 + 0o1)): roI3spqORKae(ES5oEprVxulp(b'\x00\xc4Mz#\xbc\xb8E\x169\x1c\xe9\xe0\xddV\xa0'), '\x64' + chr(101) + chr(99) + '\157' + chr(4631 - 4531) + '\x65')(chr(117) + chr(8270 - 8154) + '\146' + '\055' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'9\x99mw8\xac\xbc\x1c>&\x02\xaa\xe3\xcdX\xbaqr\x1b\xf8(('), '\144' + chr(0b1100101) + chr(8607 - 8508) + chr(0b1101111) + chr(0b111110 + 0o46) + chr(0b100101 + 0o100))('\165' + chr(0b1110100) + '\x66' + chr(0b10110 + 0o27) + chr(0b111000)): OWK82oF7YHxB, roI3spqORKae(ES5oEprVxulp(b'9\x99mw8\xac\xbc\x1c-\x13!\x92\xa7\xefi\x875V\x10\xac'), '\x64' + chr(0b1001100 + 0o31) + chr(0b111 + 0o134) + chr(111) + chr(0b1100100) + chr(101))('\x75' + chr(0b1110100) + chr(5985 - 5883) + '\055' + chr(0b100 + 0o64)): NY9fSxSHswVx} roI3spqORKae(UyworZfslHjc, roI3spqORKae(ES5oEprVxulp(b'+\xebV$\x03\x86\x9b\x00\x1c3\x03\xa8'), chr(100) + '\x65' + chr(0b1100011) + chr(0b1101111) + '\x64' + '\145')(chr(117) + '\x74' + chr(0b1100110) + '\055' + chr(0b111000)))(Yww2ZUZhqh2n or {}) if roI3spqORKae(_1vzISbJ_R2i, roI3spqORKae(ES5oEprVxulp(b' \xedIR\x18\xb3\xa8T/f\x06\xb7'), chr(740 - 640) + chr(4662 - 4561) + chr(0b1000010 + 0o41) + chr(0b1101111) + chr(0b10000 + 0o124) + chr(0b1010011 + 0o22))(chr(0b1110101) + chr(0b1110100) + '\146' + chr(628 - 583) + chr(56))) == roI3spqORKae(ES5oEprVxulp(b"'\xddQs"), '\144' + chr(101) + chr(0b1100011) + chr(111) + chr(0b1100100) + '\x65')('\165' + chr(1883 - 1767) + chr(0b1100110) + chr(45) + chr(56)): fXJOkxXvZqV_ = CV5mgJ4JLPZx(XuBkOpBKZJ5Z.YqIaRFfeo4Ha(roI3spqORKae(ES5oEprVxulp(b'\x14\xc0[;r'), chr(0b1000001 + 0o43) + '\145' + chr(99) + chr(0b1010000 + 0o37) + '\x64' + chr(101))(chr(7347 - 7230) + chr(0b0 + 0o164) + chr(0b1100110) + chr(45) + '\070')), FfKOThdpoDTb, UyworZfslHjc) else: fXJOkxXvZqV_ = CV5mgJ4JLPZx(XuBkOpBKZJ5Z, FfKOThdpoDTb, UyworZfslHjc) if roI3spqORKae(K1wi_27h4IZT, roI3spqORKae(ES5oEprVxulp(b'&\xe1vs>\xaa\xedI\x1e\x11\x01\x8c'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(8517 - 8417) + chr(7336 - 7235))('\165' + chr(0b1000 + 0o154) + chr(8123 - 8021) + '\055' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\x12\xd1Ne#\xb0\xb7n\x0b9\x19\xa3\xe4'), chr(4823 - 4723) + chr(8898 - 8797) + chr(99) + '\x6f' + '\144' + chr(101))('\x75' + '\164' + chr(8373 - 8271) + chr(0b11110 + 0o17) + '\070')): roI3spqORKae(fXJOkxXvZqV_, roI3spqORKae(ES5oEprVxulp(b'\x00\xd0YI"\xba\xb8U\x1a$'), chr(6090 - 5990) + '\x65' + chr(1693 - 1594) + chr(0b1101111) + '\x64' + chr(101))(chr(0b1110101) + '\164' + chr(102) + chr(0b101101) + chr(64 - 8)))(roI3spqORKae(ES5oEprVxulp(b'9\x99mw8\xac\xbc\x1c,3\x01\xb5\xe3\xc1W\xe3Lr\x1e\xb0\x0f'), chr(1437 - 1337) + chr(8477 - 8376) + chr(99) + chr(0b100001 + 0o116) + '\x64' + chr(0b1001010 + 0o33))(chr(117) + chr(0b11000 + 0o134) + '\146' + '\x2d' + '\070'), roI3spqORKae(K1wi_27h4IZT, roI3spqORKae(ES5oEprVxulp(b'&\xe1vs>\xaa\xedI\x1e\x11\x01\x8c'), chr(0b1000101 + 0o37) + '\x65' + chr(0b1001100 + 0o27) + '\157' + '\144' + chr(0b1100101))(chr(117) + chr(116) + chr(0b1010110 + 0o20) + chr(0b101101) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\x12\xd1Ne#\xb0\xb7n\x0b9\x19\xa3\xe4'), chr(6412 - 6312) + chr(101) + chr(99) + '\157' + chr(100) + chr(6747 - 6646))(chr(0b1110011 + 0o2) + chr(7564 - 7448) + chr(102) + chr(0b101101) + '\070'))) elif Ps2WCB2Zivtk: roI3spqORKae(fXJOkxXvZqV_, roI3spqORKae(ES5oEprVxulp(b'\x00\xd0YI"\xba\xb8U\x1a$'), chr(0b1100100) + chr(2355 - 2254) + chr(0b1100011) + chr(1553 - 1442) + chr(100) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1100110) + '\055' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'9\x99mw8\xac\xbc\x1c27\x01\xb2\xef\xdc\x14\x85}d'), chr(100) + chr(9457 - 9356) + chr(6296 - 6197) + chr(0b100100 + 0o113) + chr(0b1100100) + '\145')('\x75' + chr(0b1011111 + 0o25) + chr(102) + chr(174 - 129) + '\x38'), Ps2WCB2Zivtk) fXJOkxXvZqV_.kO4YAwwlf_zV = lambda : WpGneDvmRv2S try: k2zzaFDtbuhL = _txW603MYaaa(fXJOkxXvZqV_, timeout=x_cNkBvI363p) except ctvWmMCv5ZvA as wgf0sgcu_xPL: UmlM4OyLHmCY = {nzTpIcepk0o8(chr(0b110000) + chr(6169 - 6058) + chr(0b110110) + '\x32' + chr(0b110000), 37555 - 37547): fJSwBORhebts.ResourceRequestBadRequest, nzTpIcepk0o8(chr(2174 - 2126) + chr(0b1100101 + 0o12) + '\066' + chr(0b10111 + 0o33) + chr(49), 0o10): fJSwBORhebts.ResourceRequestLoginRequired, nzTpIcepk0o8(chr(1651 - 1603) + chr(0b1101111) + chr(54) + chr(898 - 848) + '\x33', 0b1000): fJSwBORhebts.ResourceRequestForbidden, nzTpIcepk0o8('\060' + chr(0b101011 + 0o104) + chr(54) + chr(50) + chr(52), 41347 - 41339): fJSwBORhebts.ResourceRequestNotFound}.GUKetu4xaGsJ(wgf0sgcu_xPL.MJEGgvK3nnE9, fJSwBORhebts.ParseError) raise UmlM4OyLHmCY(roI3spqORKae(wgf0sgcu_xPL, roI3spqORKae(ES5oEprVxulp(b'\x04\xdbe}$\x97\xeei*8E\xab'), '\144' + chr(0b1100101) + chr(0b1001111 + 0o24) + chr(0b1000111 + 0o50) + chr(6032 - 5932) + chr(101))('\x75' + chr(6564 - 6448) + '\146' + chr(0b11100 + 0o21) + chr(56)))()) return roI3spqORKae(LNUKEwZDIbyb, roI3spqORKae(ES5oEprVxulp(b'.\xdd\\f\x0b\x92\xedS2f7\xa7'), chr(9847 - 9747) + chr(101) + chr(0b101111 + 0o64) + chr(0b1101111) + chr(100) + '\145')('\x75' + chr(0b1110100 + 0o0) + chr(0b1100110) + '\x2d' + chr(0b111000)))(roI3spqORKae(k2zzaFDtbuhL.read(), roI3spqORKae(ES5oEprVxulp(b'\r\xd2_P9\xbb\x8e]+e?\x84'), chr(0b1100100) + chr(0b1100101) + '\143' + '\x6f' + '\144' + '\145')('\165' + chr(0b1110100 + 0o0) + chr(7810 - 7708) + '\x2d' + chr(154 - 98)))(roI3spqORKae(ES5oEprVxulp(b'\x14\xc0[;r'), '\144' + chr(0b1100101) + chr(3312 - 3213) + '\157' + chr(100) + chr(101))(chr(499 - 382) + '\164' + '\146' + '\055' + chr(0b111000))))
milesrichardson/ParsePy
parse_rest/connection.py
ParseBatcher.batch
def batch(self, methods): """ Given a list of create, update or delete methods to call, call all of them in a single batch operation. """ methods = list(methods) # methods can be iterator if not methods: #accepts also empty list (or generator) - it allows call batch directly with query result (eventually empty) return queries, callbacks = list(zip(*[m(batch=True) for m in methods])) # perform all the operations in one batch responses = self.execute("", "POST", requests=queries) # perform the callbacks with the response data (updating the existing # objets, etc) batched_errors = [] for callback, response in zip(callbacks, responses): if "success" in response: callback(response["success"]) else: batched_errors.append(response["error"]) if batched_errors: raise core.ParseBatchError(batched_errors)
python
def batch(self, methods): """ Given a list of create, update or delete methods to call, call all of them in a single batch operation. """ methods = list(methods) # methods can be iterator if not methods: #accepts also empty list (or generator) - it allows call batch directly with query result (eventually empty) return queries, callbacks = list(zip(*[m(batch=True) for m in methods])) # perform all the operations in one batch responses = self.execute("", "POST", requests=queries) # perform the callbacks with the response data (updating the existing # objets, etc) batched_errors = [] for callback, response in zip(callbacks, responses): if "success" in response: callback(response["success"]) else: batched_errors.append(response["error"]) if batched_errors: raise core.ParseBatchError(batched_errors)
[ "def", "batch", "(", "self", ",", "methods", ")", ":", "methods", "=", "list", "(", "methods", ")", "# methods can be iterator", "if", "not", "methods", ":", "#accepts also empty list (or generator) - it allows call batch directly with query result (eventually empty)", "return", "queries", ",", "callbacks", "=", "list", "(", "zip", "(", "*", "[", "m", "(", "batch", "=", "True", ")", "for", "m", "in", "methods", "]", ")", ")", "# perform all the operations in one batch", "responses", "=", "self", ".", "execute", "(", "\"\"", ",", "\"POST\"", ",", "requests", "=", "queries", ")", "# perform the callbacks with the response data (updating the existing", "# objets, etc)", "batched_errors", "=", "[", "]", "for", "callback", ",", "response", "in", "zip", "(", "callbacks", ",", "responses", ")", ":", "if", "\"success\"", "in", "response", ":", "callback", "(", "response", "[", "\"success\"", "]", ")", "else", ":", "batched_errors", ".", "append", "(", "response", "[", "\"error\"", "]", ")", "if", "batched_errors", ":", "raise", "core", ".", "ParseBatchError", "(", "batched_errors", ")" ]
Given a list of create, update or delete methods to call, call all of them in a single batch operation.
[ "Given", "a", "list", "of", "create", "update", "or", "delete", "methods", "to", "call", "call", "all", "of", "them", "in", "a", "single", "batch", "operation", "." ]
7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea
https://github.com/milesrichardson/ParsePy/blob/7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea/parse_rest/connection.py#L178-L201
train
Calls a list of create update or delete methods in a single batch operation.
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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Eg6op6Lr8F,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(111) + '\x31' + chr(49) + chr(48), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1010011 + 0o34) + chr(0b11 + 0o56) + chr(442 - 392) + '\066', 0o10), nzTpIcepk0o8(chr(518 - 470) + chr(8540 - 8429) + chr(2133 - 2080) + '\067', 54155 - 54147), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1011000 + 0o27) + chr(2417 - 2362) + chr(1934 - 1880), ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + chr(0b110011) + '\x33' + '\x37', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b101 + 0o54) + chr(2643 - 2588) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + chr(6009 - 5898) + chr(0b110001 + 0o1) + chr(0b110000) + chr(0b11101 + 0o25), 0o10), nzTpIcepk0o8('\060' + chr(0b1010000 + 0o37) + '\x32' + chr(0b101000 + 0o14) + '\061', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1176 - 1123), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(865 - 816) + chr(52) + chr(0b110011), 36573 - 36565), nzTpIcepk0o8(chr(1750 - 1702) + chr(111) + chr(2922 - 2867) + chr(52), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\066' + '\x34', 0o10), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\157' + chr(2009 - 1959) + '\x36' + chr(0b10110 + 0o34), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000111 + 0o50) + chr(55) + chr(1109 - 1055), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11101 + 0o24) + chr(49) + chr(1945 - 1895), 0b1000), nzTpIcepk0o8(chr(1004 - 956) + '\x6f' + chr(0b10011 + 0o36) + chr(0b11000 + 0o30) + '\066', ord("\x08")), nzTpIcepk0o8(chr(1605 - 1557) + chr(6141 - 6030) + chr(50) + chr(1099 - 1045) + chr(1400 - 1350), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10101 + 0o42), 0b1000), nzTpIcepk0o8('\x30' + chr(1447 - 1336) + chr(1689 - 1639) + chr(48) + chr(416 - 364), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b110111 + 0o70) + chr(49) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x32' + '\x30', ord("\x08")), nzTpIcepk0o8('\x30' + chr(4275 - 4164) + chr(0b101011 + 0o7) + chr(48) + chr(729 - 680), 25074 - 25066), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(111) + chr(49) + chr(0b110100) + chr(49), 0o10), nzTpIcepk0o8(chr(2105 - 2057) + chr(111) + chr(1237 - 1187) + '\x36' + chr(0b110010), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + '\x37' + chr(0b110011), 9784 - 9776), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1001100 + 0o43) + chr(50) + '\x32' + chr(0b1001 + 0o55), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(2567 - 2515) + chr(0b100101 + 0o20), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + '\067', 54595 - 54587), nzTpIcepk0o8(chr(1872 - 1824) + chr(0b110101 + 0o72) + chr(2280 - 2230) + chr(2006 - 1956) + chr(0b101000 + 0o16), 8), nzTpIcepk0o8('\060' + chr(0b101100 + 0o103) + chr(0b110101) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(0b101101 + 0o102) + '\x33' + chr(0b110010) + chr(0b10001 + 0o46), ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + '\x6f' + '\x33' + '\064' + '\x34', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b110001 + 0o5), 59301 - 59293), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1192 - 1142) + '\066' + '\x37', 18769 - 18761), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + '\064' + '\x31', 11006 - 10998), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1180 - 1131) + chr(1054 - 1005) + chr(1693 - 1639), 13403 - 13395), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\067' + chr(0b101101 + 0o7), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10100 + 0o37) + chr(2086 - 2034) + '\x35', 29615 - 29607), nzTpIcepk0o8(chr(0b11011 + 0o25) + '\157' + chr(50) + chr(48) + chr(0b10110 + 0o41), 34055 - 34047), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + '\063' + '\x34', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b110111 + 0o70) + '\x35' + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'f'), chr(5031 - 4931) + chr(0b1100101) + chr(0b1100011) + '\x6f' + '\144' + chr(101))(chr(0b1110101) + chr(116) + chr(102) + '\055' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def vccczMELzkdW(hXMPsSrOQzbh, lcKucyHTTXwM): lcKucyHTTXwM = H4NoA26ON7iG(lcKucyHTTXwM) if not lcKucyHTTXwM: return (wv6ZySc8Kitu, KEqfAnEnIXIO) = H4NoA26ON7iG(TxMFWa_Xzviv(*[tF75nqoNENFL(batch=nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1101111) + '\061', 0o10)) for tF75nqoNENFL in lcKucyHTTXwM])) T0DlMOJiDjjQ = hXMPsSrOQzbh.CS4S7RlNdTsy(roI3spqORKae(ES5oEprVxulp(b''), chr(0b1000 + 0o134) + '\145' + chr(0b1001 + 0o132) + '\157' + chr(100) + chr(2159 - 2058))('\x75' + '\164' + chr(102) + chr(0b11111 + 0o16) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\x18\x19|j'), '\144' + chr(0b11 + 0o142) + chr(99) + chr(8218 - 8107) + chr(100) + '\145')(chr(6582 - 6465) + chr(0b1011100 + 0o30) + '\x66' + chr(45) + '\x38'), requests=wv6ZySc8Kitu) EV1qxCTZK9Ve = [] for (jG5KU4UUGnk5, k2zzaFDtbuhL) in TxMFWa_Xzviv(KEqfAnEnIXIO, T0DlMOJiDjjQ): if roI3spqORKae(ES5oEprVxulp(b';#L]\xba\r\xf1'), chr(0b10 + 0o142) + chr(0b100111 + 0o76) + chr(5160 - 5061) + chr(0b1101111) + chr(497 - 397) + chr(101))(chr(5270 - 5153) + chr(0b110001 + 0o103) + '\x66' + '\055' + chr(0b110111 + 0o1)) in k2zzaFDtbuhL: jG5KU4UUGnk5(k2zzaFDtbuhL[roI3spqORKae(ES5oEprVxulp(b';#L]\xba\r\xf1'), chr(0b1100100) + chr(101) + chr(99) + '\x6f' + '\x64' + '\145')('\x75' + chr(116) + chr(0b1100110) + '\x2d' + chr(56))]) else: roI3spqORKae(EV1qxCTZK9Ve, roI3spqORKae(ES5oEprVxulp(b'\x00\x02|\n\xa7\x19\xc5\xceo\x0ci\x01'), '\144' + chr(0b1100101) + chr(0b1100011) + '\157' + chr(0b1100100) + '\x65')(chr(3748 - 3631) + chr(0b100011 + 0o121) + chr(0b1100110) + chr(0b101100 + 0o1) + '\070'))(k2zzaFDtbuhL[roI3spqORKae(ES5oEprVxulp(b'-$]Q\xad'), '\144' + chr(101) + chr(0b1100011) + chr(111) + chr(0b1000001 + 0o43) + chr(1700 - 1599))('\x75' + chr(116) + chr(0b1100110) + chr(45) + chr(56))]) if EV1qxCTZK9Ve: raise roI3spqORKae(fJSwBORhebts, roI3spqORKae(ES5oEprVxulp(b'\x187]M\xba<\xe3\xd5f\x0byF\xc0Q8'), chr(0b1100100) + '\145' + chr(99) + '\x6f' + chr(100) + '\145')(chr(0b1110101) + '\x74' + chr(9190 - 9088) + chr(54 - 9) + chr(0b110 + 0o62)))(EV1qxCTZK9Ve)
milesrichardson/ParsePy
parse_rest/installation.py
Installation.update_channels
def update_channels(cls, installation_id, channels_to_add=set(), channels_to_remove=set(), **kw): """ Allow an application to manually subscribe or unsubscribe an installation to a certain push channel in a unified operation. this is based on: https://www.parse.com/docs/rest#installations-updating installation_id: the installation id you'd like to add a channel to channels_to_add: the name of the channel you'd like to subscribe the user to channels_to_remove: the name of the channel you'd like to unsubscribe the user from """ installation_url = cls._get_installation_url(installation_id) current_config = cls.GET(installation_url) new_channels = list(set(current_config['channels']).union(channels_to_add).difference(channels_to_remove)) cls.PUT(installation_url, channels=new_channels)
python
def update_channels(cls, installation_id, channels_to_add=set(), channels_to_remove=set(), **kw): """ Allow an application to manually subscribe or unsubscribe an installation to a certain push channel in a unified operation. this is based on: https://www.parse.com/docs/rest#installations-updating installation_id: the installation id you'd like to add a channel to channels_to_add: the name of the channel you'd like to subscribe the user to channels_to_remove: the name of the channel you'd like to unsubscribe the user from """ installation_url = cls._get_installation_url(installation_id) current_config = cls.GET(installation_url) new_channels = list(set(current_config['channels']).union(channels_to_add).difference(channels_to_remove)) cls.PUT(installation_url, channels=new_channels)
[ "def", "update_channels", "(", "cls", ",", "installation_id", ",", "channels_to_add", "=", "set", "(", ")", ",", "channels_to_remove", "=", "set", "(", ")", ",", "*", "*", "kw", ")", ":", "installation_url", "=", "cls", ".", "_get_installation_url", "(", "installation_id", ")", "current_config", "=", "cls", ".", "GET", "(", "installation_url", ")", "new_channels", "=", "list", "(", "set", "(", "current_config", "[", "'channels'", "]", ")", ".", "union", "(", "channels_to_add", ")", ".", "difference", "(", "channels_to_remove", ")", ")", "cls", ".", "PUT", "(", "installation_url", ",", "channels", "=", "new_channels", ")" ]
Allow an application to manually subscribe or unsubscribe an installation to a certain push channel in a unified operation. this is based on: https://www.parse.com/docs/rest#installations-updating installation_id: the installation id you'd like to add a channel to channels_to_add: the name of the channel you'd like to subscribe the user to channels_to_remove: the name of the channel you'd like to unsubscribe the user from
[ "Allow", "an", "application", "to", "manually", "subscribe", "or", "unsubscribe", "an", "installation", "to", "a", "certain", "push", "channel", "in", "a", "unified", "operation", "." ]
7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea
https://github.com/milesrichardson/ParsePy/blob/7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea/parse_rest/installation.py#L30-L49
train
Update the push channels of an anonymization.
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,Y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r,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(1103 - 1055) + '\x6f' + chr(1134 - 1085) + chr(52) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + '\x33' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b11000 + 0o127) + '\x32' + '\066' + chr(1454 - 1404), 39122 - 39114), nzTpIcepk0o8(chr(500 - 452) + chr(0b101010 + 0o105) + chr(0b110011) + chr(0b110111) + chr(0b110 + 0o61), 42167 - 42159), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\x6f' + '\063' + chr(0b110001) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(1066 - 1018) + chr(0b1101111) + '\066' + chr(2304 - 2251), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(0b10001 + 0o44) + chr(51), 0o10), nzTpIcepk0o8('\x30' + chr(4806 - 4695) + '\x33' + chr(0b110101) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\157' + '\x33' + chr(0b110110) + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(0b11001 + 0o34) + '\x36', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + chr(1575 - 1522) + chr(55), 0b1000), nzTpIcepk0o8(chr(57 - 9) + chr(8397 - 8286) + chr(0b11010 + 0o27) + '\060' + chr(1066 - 1016), 37212 - 37204), nzTpIcepk0o8(chr(1899 - 1851) + chr(0b1101111) + '\063' + chr(0b100110 + 0o13), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + chr(0b101010 + 0o7) + chr(1875 - 1822) + chr(0b101 + 0o61), 8), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(111) + chr(0b101010 + 0o11) + chr(0b11101 + 0o25) + chr(52), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(2030 - 1980) + chr(55), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(2002 - 1951) + '\x33' + chr(1700 - 1651), 0o10), nzTpIcepk0o8(chr(0b100 + 0o54) + '\x6f' + '\x33' + '\060' + chr(0b101111 + 0o2), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b100100 + 0o15) + chr(0b101001 + 0o14) + '\x36', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110110) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + chr(0b110011) + chr(0b1100 + 0o44) + chr(2431 - 2381), 0b1000), nzTpIcepk0o8(chr(2043 - 1995) + '\x6f' + '\x31' + '\060' + chr(0b110101), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(0b110110) + chr(0b1100 + 0o50), ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(111) + '\064' + chr(233 - 185), 27728 - 27720), nzTpIcepk0o8(chr(48) + chr(111) + '\065' + chr(0b1 + 0o66), 0b1000), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\157' + '\063' + '\x37' + '\061', 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1011001 + 0o26) + '\x31' + '\060' + chr(0b110001), 61174 - 61166), nzTpIcepk0o8(chr(246 - 198) + chr(0b1101111) + chr(2360 - 2310) + '\060' + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\x6f' + chr(0b100101 + 0o21) + chr(1308 - 1254), ord("\x08")), nzTpIcepk0o8('\x30' + chr(3438 - 3327) + chr(0b110011) + chr(0b110110) + chr(54), 5392 - 5384), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(4085 - 3974) + '\061' + chr(1234 - 1180) + chr(49), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + chr(49) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(6570 - 6459) + chr(53) + chr(50), 40305 - 40297), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(48) + '\x37', 37602 - 37594), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1101111) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(834 - 786) + '\x6f' + '\x31' + chr(433 - 378) + chr(0b110101), 64993 - 64985), nzTpIcepk0o8(chr(1313 - 1265) + chr(111) + '\062' + '\060' + chr(48), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(2415 - 2365) + chr(0b101101 + 0o4) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(89 - 41) + chr(0b101101 + 0o102) + chr(0b110011) + chr(0b101001 + 0o13) + '\x32', 59604 - 59596), nzTpIcepk0o8(chr(48) + chr(0b100010 + 0o115) + '\062' + chr(475 - 422) + chr(2116 - 2068), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b11000 + 0o35) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'I'), chr(0b1100100) + chr(3504 - 3403) + chr(0b1100011) + chr(10706 - 10595) + chr(100) + chr(101))(chr(6624 - 6507) + '\x74' + '\x66' + chr(45) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def GvNBCISa6noc(_1vzISbJ_R2i, mRtOORcd47wV, HurJFwdFR8Pc=Bvi71nNyvlqO(), X5G1ANFLzOXp=Bvi71nNyvlqO(), **n_DqV9fOWrXc): EwZ_Ue1kLhmc = _1vzISbJ_R2i._get_installation_url(mRtOORcd47wV) SnYhWK26sJPw = _1vzISbJ_R2i.Lx8a0g4HgWlF(EwZ_Ue1kLhmc) lt7Nw3YPGHFt = H4NoA26ON7iG(Bvi71nNyvlqO(SnYhWK26sJPw[roI3spqORKae(ES5oEprVxulp(b'\x04\xb5\xd3\x91\xa4P\xc7\x9e'), chr(0b1000111 + 0o35) + chr(0b1100101) + '\143' + '\x6f' + chr(7458 - 7358) + chr(0b1100101))('\x75' + chr(0b111001 + 0o73) + chr(102) + chr(0b101101) + chr(56))]).union(HurJFwdFR8Pc)._61auecdOib2(X5G1ANFLzOXp)) roI3spqORKae(_1vzISbJ_R2i, roI3spqORKae(ES5oEprVxulp(b'7\x88\xe6'), chr(100) + '\145' + chr(9730 - 9631) + chr(0b1101111) + chr(7264 - 7164) + chr(0b1100101))(chr(0b1110101) + chr(0b1011011 + 0o31) + chr(0b1100110) + '\055' + chr(56)))(EwZ_Ue1kLhmc, channels=lt7Nw3YPGHFt)
milesrichardson/ParsePy
parse_rest/query.py
Queryset._fetch
def _fetch(self, count=False): if self._result_cache is not None: return len(self._result_cache) if count else self._result_cache """ Return a list of objects matching query, or if count == True return only the number of objects matching. """ options = dict(self._options) # make a local copy if self._where: # JSON encode WHERE values options['where'] = json.dumps(self._where) if self._select_related: options['include'] = ','.join(self._select_related) if count: return self._manager._count(**options) self._result_cache = self._manager._fetch(**options) return self._result_cache
python
def _fetch(self, count=False): if self._result_cache is not None: return len(self._result_cache) if count else self._result_cache """ Return a list of objects matching query, or if count == True return only the number of objects matching. """ options = dict(self._options) # make a local copy if self._where: # JSON encode WHERE values options['where'] = json.dumps(self._where) if self._select_related: options['include'] = ','.join(self._select_related) if count: return self._manager._count(**options) self._result_cache = self._manager._fetch(**options) return self._result_cache
[ "def", "_fetch", "(", "self", ",", "count", "=", "False", ")", ":", "if", "self", ".", "_result_cache", "is", "not", "None", ":", "return", "len", "(", "self", ".", "_result_cache", ")", "if", "count", "else", "self", ".", "_result_cache", "options", "=", "dict", "(", "self", ".", "_options", ")", "# make a local copy", "if", "self", ".", "_where", ":", "# JSON encode WHERE values", "options", "[", "'where'", "]", "=", "json", ".", "dumps", "(", "self", ".", "_where", ")", "if", "self", ".", "_select_related", ":", "options", "[", "'include'", "]", "=", "','", ".", "join", "(", "self", ".", "_select_related", ")", "if", "count", ":", "return", "self", ".", "_manager", ".", "_count", "(", "*", "*", "options", ")", "self", ".", "_result_cache", "=", "self", ".", "_manager", ".", "_fetch", "(", "*", "*", "options", ")", "return", "self", ".", "_result_cache" ]
Return a list of objects matching query, or if count == True return only the number of objects matching.
[ "Return", "a", "list", "of", "objects", "matching", "query", "or", "if", "count", "==", "True", "return", "only", "the", "number", "of", "objects", "matching", "." ]
7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea
https://github.com/milesrichardson/ParsePy/blob/7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea/parse_rest/query.py#L111-L128
train
Fetch the objects matching the query.
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,T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IptFuc,_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(0b1100101 + 0o12) + chr(467 - 412), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110100 + 0o73) + '\x36', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + '\063' + chr(496 - 441), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2155 - 2105) + chr(0b101100 + 0o11) + '\x30', 0b1000), nzTpIcepk0o8(chr(2039 - 1991) + '\157' + chr(49) + '\065' + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(49) + chr(0b110001 + 0o6) + chr(0b10110 + 0o33), 61437 - 61429), nzTpIcepk0o8(chr(789 - 741) + '\157' + '\062' + '\x33' + chr(0b100101 + 0o15), 0b1000), nzTpIcepk0o8(chr(874 - 826) + chr(0b1101111) + chr(0b110011) + '\066', 0o10), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\x6f' + chr(1872 - 1822) + chr(0b100111 + 0o15) + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + '\x35' + chr(767 - 713), 65026 - 65018), nzTpIcepk0o8('\x30' + chr(0b111001 + 0o66) + '\x32' + chr(0b110011) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b1101111) + '\061' + chr(0b10011 + 0o35) + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + '\060' + chr(51), 20689 - 20681), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(0b110111) + chr(0b100000 + 0o24), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(2365 - 2312) + chr(1380 - 1328), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + '\x37', 52266 - 52258), nzTpIcepk0o8('\x30' + chr(0b1100011 + 0o14) + chr(51) + chr(1476 - 1426) + chr(49), 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + chr(0b110010) + '\060' + chr(772 - 720), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1111 + 0o44) + chr(52) + chr(0b110011), 13928 - 13920), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(0b110000) + chr(2170 - 2118), 0o10), nzTpIcepk0o8(chr(1598 - 1550) + chr(6585 - 6474) + '\x32' + chr(51) + '\067', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + '\x37' + '\x33', 0b1000), nzTpIcepk0o8(chr(454 - 406) + '\x6f' + '\x32' + chr(54) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(2002 - 1954) + '\x6f' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(2013 - 1965) + chr(111) + chr(0b11111 + 0o30) + chr(48), 2815 - 2807), nzTpIcepk0o8('\060' + chr(111) + '\x33' + '\x34' + chr(0b11001 + 0o27), ord("\x08")), nzTpIcepk0o8('\x30' + chr(412 - 301) + chr(49) + chr(0b100 + 0o61), ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + '\061' + '\062' + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1111 + 0o42) + '\061' + chr(2372 - 2317), ord("\x08")), nzTpIcepk0o8(chr(1585 - 1537) + '\157' + '\061' + chr(54) + chr(111 - 58), 12276 - 12268), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + '\067' + '\066', 0b1000), nzTpIcepk0o8('\060' + chr(0b1000010 + 0o55) + chr(673 - 624) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b10011 + 0o134) + chr(0b110 + 0o53) + chr(0b110011 + 0o2), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\067' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b100001 + 0o116) + chr(0b110001) + chr(55) + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + chr(3803 - 3692) + chr(707 - 653), 8), nzTpIcepk0o8('\060' + chr(0b100001 + 0o116) + chr(0b110001) + chr(0b110011), 47932 - 47924), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + chr(2363 - 2311) + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + chr(1200 - 1151) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1100 + 0o45) + chr(0b110111) + chr(966 - 916), 58135 - 58127)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1000011 + 0o54) + chr(53) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b')'), chr(100) + chr(7083 - 6982) + chr(0b1101 + 0o126) + '\157' + '\x64' + chr(2092 - 1991))('\x75' + chr(0b1110100) + '\x66' + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def KdfNahq0vDp7(hXMPsSrOQzbh, sQSWKlURp7QK=nzTpIcepk0o8('\060' + chr(111) + chr(1987 - 1939), 0b1000)): if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'bU\xea\xe1;L\xcfl\x96\x86\xf8!'), '\144' + '\x65' + chr(0b1100011) + chr(0b1101111) + '\x64' + '\x65')(chr(0b1010001 + 0o44) + chr(8752 - 8636) + chr(102) + '\x2d' + chr(0b111000))) is not None: return ftfygxgFas5X(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'bU\xea\xe1;L\xcfl\x96\x86\xf8!'), chr(0b1000101 + 0o37) + chr(101) + chr(6235 - 6136) + chr(0b1101111) + '\144' + chr(101))(chr(8248 - 8131) + '\164' + '\146' + chr(0b100001 + 0o14) + chr(56)))) if sQSWKlURp7QK else roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'bU\xea\xe1;L\xcfl\x96\x86\xf8!'), chr(0b1100100) + chr(0b1100101) + '\x63' + '\x6f' + chr(0b1100100) + '\145')(chr(117) + chr(0b1011010 + 0o32) + '\x66' + '\055' + chr(1907 - 1851))) gpUDAok9rMxr = znjnJWK64FDT(hXMPsSrOQzbh.gvhDfxOuF6n9) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'jH\xcb\xfd;N\xce\\\xc1\x8a\xd5"'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + '\x6f' + '\144' + chr(0b1010101 + 0o20))('\165' + chr(116) + chr(9578 - 9476) + '\055' + '\070')): gpUDAok9rMxr[roI3spqORKae(ES5oEprVxulp(b'pn\xfa\xda\x0c'), '\144' + chr(4742 - 4641) + chr(99) + chr(11634 - 11523) + '\144' + chr(0b1100101))(chr(10623 - 10506) + chr(279 - 163) + '\x66' + '\055' + chr(0b111000))] = LNUKEwZDIbyb.Zjglmm8uenkC(hXMPsSrOQzbh.mNTUR7TBadLd) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"Xu\xfa\xc4\x0c\x1a\xeeA\xd2\x8b\xf5'\xb7\x99H"), chr(0b1100100) + '\145' + chr(0b1100011) + chr(1323 - 1212) + '\x64' + chr(0b1100101))('\x75' + '\x74' + chr(0b1010100 + 0o22) + chr(612 - 567) + chr(56))): gpUDAok9rMxr[roI3spqORKae(ES5oEprVxulp(b'nh\xfc\xc4\x1c\x1d\xff'), chr(3593 - 3493) + chr(101) + chr(0b1100011) + '\157' + chr(100) + chr(101))(chr(12411 - 12294) + chr(116) + '\146' + '\x2d' + '\070')] = roI3spqORKae(ES5oEprVxulp(b'+'), chr(3558 - 3458) + chr(0b11110 + 0o107) + chr(0b101101 + 0o66) + '\157' + chr(6655 - 6555) + '\145')('\165' + '\x74' + chr(102) + chr(533 - 488) + chr(0b110 + 0o62)).Y4yM9BcfTCNq(hXMPsSrOQzbh._select_related) if sQSWKlURp7QK: return roI3spqORKae(hXMPsSrOQzbh._manager, roI3spqORKae(ES5oEprVxulp(b'wl\xdc\x9f0\x0e\xf4*\xe1\x83\xf1\x04'), chr(7902 - 7802) + '\x65' + '\x63' + '\157' + chr(0b100001 + 0o103) + chr(0b1100101))(chr(117) + chr(116) + chr(102) + '\x2d' + chr(0b111000)))(**gpUDAok9rMxr) hXMPsSrOQzbh.eSuIR5Ur6hag = hXMPsSrOQzbh._manager._fetch(**gpUDAok9rMxr) return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'bU\xea\xe1;L\xcfl\x96\x86\xf8!'), chr(0b1100100) + '\x65' + chr(0b1100011) + '\x6f' + '\144' + chr(0b1100101))(chr(117) + chr(0b1100011 + 0o21) + chr(3688 - 3586) + '\055' + chr(2076 - 2020)))
milesrichardson/ParsePy
parse_rest/datatypes.py
complex_type
def complex_type(name=None): '''Decorator for registering complex types''' def wrapped(cls): ParseType.type_mapping[name or cls.__name__] = cls return cls return wrapped
python
def complex_type(name=None): '''Decorator for registering complex types''' def wrapped(cls): ParseType.type_mapping[name or cls.__name__] = cls return cls return wrapped
[ "def", "complex_type", "(", "name", "=", "None", ")", ":", "def", "wrapped", "(", "cls", ")", ":", "ParseType", ".", "type_mapping", "[", "name", "or", "cls", ".", "__name__", "]", "=", "cls", "return", "cls", "return", "wrapped" ]
Decorator for registering complex types
[ "Decorator", "for", "registering", "complex", "types" ]
7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea
https://github.com/milesrichardson/ParsePy/blob/7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea/parse_rest/datatypes.py#L25-L30
train
Decorator for registering complex types.
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,Y1otPTwL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xgFas5X,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' + chr(0b110001) + chr(271 - 219) + chr(52), 57554 - 57546), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + chr(0b10010 + 0o37) + chr(0b110111) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(111) + chr(0b10 + 0o61) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(1195 - 1147) + chr(0b1101111) + chr(596 - 545) + chr(55) + chr(0b10010 + 0o44), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + '\x36' + chr(53), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001 + 0o0) + '\x37' + chr(2527 - 2475), ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\157' + '\063' + '\062' + chr(0b110000), 47197 - 47189), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + chr(0b111 + 0o55) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1 + 0o156) + chr(207 - 157) + chr(1130 - 1082) + chr(48), 0o10), nzTpIcepk0o8(chr(847 - 799) + '\x6f' + chr(50) + chr(0b100100 + 0o23) + chr(48), 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(1645 - 1534) + chr(0b110010) + '\x33' + '\x31', 52696 - 52688), nzTpIcepk0o8(chr(1504 - 1456) + '\157' + chr(49) + '\x32' + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + '\064' + chr(0b110011), 39146 - 39138), nzTpIcepk0o8(chr(1208 - 1160) + chr(111) + '\x32' + chr(632 - 582) + chr(50), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10001 + 0o42) + '\x34' + chr(0b110011 + 0o3), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(0b111 + 0o53) + chr(0b101101 + 0o6), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2369 - 2319) + '\066' + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(718 - 666) + '\x37', 51741 - 51733), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101001 + 0o10) + chr(54) + chr(0b1010 + 0o50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(452 - 341) + chr(1565 - 1516) + chr(0b110111) + chr(0b110111), 8), nzTpIcepk0o8(chr(1670 - 1622) + chr(861 - 750) + chr(0b110010) + chr(0b10001 + 0o42) + chr(0b110001), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1587 - 1538) + chr(0b11010 + 0o27) + '\x37', 0o10), nzTpIcepk0o8(chr(48) + chr(2492 - 2381) + chr(0b100101 + 0o16) + chr(463 - 409), 8683 - 8675), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1084 - 1035) + chr(50), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x37' + '\064', 0o10), nzTpIcepk0o8('\060' + chr(0b110110 + 0o71) + chr(0b10001 + 0o40) + '\x32', 8), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b111011 + 0o64) + chr(0b100010 + 0o17) + chr(50) + chr(2111 - 2056), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\064' + chr(0b100111 + 0o11), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100011 + 0o16) + chr(2298 - 2243) + chr(0b110110), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101010 + 0o5) + chr(0b110010) + '\064' + '\067', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(0b110011 + 0o3) + '\067', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1110 + 0o141) + chr(724 - 674) + chr(0b11100 + 0o25) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(111) + chr(51) + chr(0b110000) + '\060', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(48) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\067' + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + '\x37' + chr(0b110100), 8), nzTpIcepk0o8(chr(427 - 379) + '\x6f' + chr(197 - 148) + '\064' + chr(438 - 388), 816 - 808), nzTpIcepk0o8('\060' + chr(10498 - 10387) + chr(55) + chr(1103 - 1055), 8), nzTpIcepk0o8(chr(1289 - 1241) + '\157' + chr(49) + '\063' + chr(0b1100 + 0o45), 0b1000), nzTpIcepk0o8(chr(544 - 496) + '\157' + chr(0b110010) + '\066' + chr(48), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\157' + '\x35' + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'J'), '\144' + chr(0b101001 + 0o74) + chr(0b111 + 0o134) + '\157' + chr(0b10100 + 0o120) + '\x65')(chr(11188 - 11071) + chr(0b1001000 + 0o54) + '\146' + chr(0b101101) + chr(0b110101 + 0o3)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def TjDcR9ypJWhW(SLVB2BPA_mIe=None): def juOrY2rJFvhy(_1vzISbJ_R2i): f24pAB4LKB4u.VaGHV3krbC5e[SLVB2BPA_mIe or _1vzISbJ_R2i.AYtDRlqeP0tq] = _1vzISbJ_R2i return _1vzISbJ_R2i return juOrY2rJFvhy
milesrichardson/ParsePy
parse_rest/datatypes.py
Object.factory
def factory(cls, class_name): """find proper Object subclass matching class_name system types like _User are mapped to types without underscore (parse_resr.user.User) If user don't declare matching type, class is created on the fly """ class_name = str(class_name.lstrip('_')) types = ParseResource.__subclasses__() while types: t = types.pop() if t.__name__ == class_name: return t types.extend(t.__subclasses__()) else: return type(class_name, (Object,), {})
python
def factory(cls, class_name): """find proper Object subclass matching class_name system types like _User are mapped to types without underscore (parse_resr.user.User) If user don't declare matching type, class is created on the fly """ class_name = str(class_name.lstrip('_')) types = ParseResource.__subclasses__() while types: t = types.pop() if t.__name__ == class_name: return t types.extend(t.__subclasses__()) else: return type(class_name, (Object,), {})
[ "def", "factory", "(", "cls", ",", "class_name", ")", ":", "class_name", "=", "str", "(", "class_name", ".", "lstrip", "(", "'_'", ")", ")", "types", "=", "ParseResource", ".", "__subclasses__", "(", ")", "while", "types", ":", "t", "=", "types", ".", "pop", "(", ")", "if", "t", ".", "__name__", "==", "class_name", ":", "return", "t", "types", ".", "extend", "(", "t", ".", "__subclasses__", "(", ")", ")", "else", ":", "return", "type", "(", "class_name", ",", "(", "Object", ",", ")", ",", "{", "}", ")" ]
find proper Object subclass matching class_name system types like _User are mapped to types without underscore (parse_resr.user.User) If user don't declare matching type, class is created on the fly
[ "find", "proper", "Object", "subclass", "matching", "class_name", "system", "types", "like", "_User", "are", "mapped", "to", "types", "without", "underscore", "(", "parse_resr", ".", "user", ".", "User", ")", "If", "user", "don", "t", "declare", "matching", "type", "class", "is", "created", "on", "the", "fly" ]
7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea
https://github.com/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viv,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' + '\x36' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2308 - 2256) + chr(48), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\066' + '\063', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(49) + chr(0b110010) + chr(0b100111 + 0o15), 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\x6f' + chr(49) + chr(51) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\x6f' + chr(737 - 688) + '\060' + chr(0b101000 + 0o15), 0o10), nzTpIcepk0o8(chr(0b111 + 0o51) + '\157' + chr(0b110100) + '\066', 28213 - 28205), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(521 - 472) + chr(0b110000), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(52) + chr(0b100100 + 0o17), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(1873 - 1825) + chr(52), 55087 - 55079), nzTpIcepk0o8(chr(684 - 636) + chr(8039 - 7928) + '\062' + '\x35' + chr(51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(2455 - 2344) + chr(50) + chr(932 - 880) + '\062', 0b1000), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b1101111) + chr(0b100110 + 0o13) + chr(2179 - 2125) + chr(0b10 + 0o62), 0b1000), nzTpIcepk0o8(chr(1905 - 1857) + '\157' + '\x33' + chr(0b10 + 0o60) + chr(2510 - 2455), ord("\x08")), nzTpIcepk0o8(chr(788 - 740) + chr(0b1110 + 0o141) + chr(49) + chr(0b110 + 0o57) + chr(53), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(1560 - 1509) + chr(0b110000) + chr(0b110000), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(1286 - 1237) + chr(53) + chr(0b10101 + 0o33), 0b1000), nzTpIcepk0o8(chr(1741 - 1693) + chr(111) + '\063' + '\061' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(793 - 745) + chr(111) + chr(54) + '\063', 8), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(52) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1100010 + 0o15) + chr(0b101111 + 0o4) + chr(50), 47986 - 47978), nzTpIcepk0o8(chr(96 - 48) + chr(0b110001 + 0o76) + chr(51) + chr(51) + '\x30', 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x32' + '\066' + '\x34', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(3499 - 3388) + chr(0b101011 + 0o10) + chr(0b11 + 0o56) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + chr(51) + '\065' + '\x35', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1001 + 0o52) + chr(0b101111 + 0o6), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1031 - 982) + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + chr(0b110100) + '\064', 41281 - 41273), nzTpIcepk0o8(chr(0b100 + 0o54) + '\x6f' + '\x32' + chr(0b11110 + 0o23) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(1123 - 1075) + chr(6837 - 6726) + chr(49) + chr(1818 - 1767) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(111) + chr(0b110011) + '\x34', 50108 - 50100), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(52) + chr(50), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(2590 - 2535) + '\x34', 3808 - 3800), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(0b11000 + 0o35) + '\065', 8), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(0b110111) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(678 - 630) + chr(111) + '\062' + '\062' + '\x34', 0o10), nzTpIcepk0o8(chr(137 - 89) + chr(2569 - 2458) + chr(0b11111 + 0o24) + chr(0b1000 + 0o55) + chr(52), 0b1000), nzTpIcepk0o8('\x30' + chr(2784 - 2673) + chr(1894 - 1843) + chr(0b110000) + chr(0b110111), 708 - 700), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(0b1101111) + chr(49) + '\060', 3712 - 3704), nzTpIcepk0o8(chr(2039 - 1991) + chr(0b1101111) + chr(0b110011) + '\x31' + '\x31', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b111101 + 0o62) + '\065' + chr(1267 - 1219), 32547 - 32539)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1f'), chr(7943 - 7843) + '\145' + chr(0b1100011) + chr(11741 - 11630) + '\144' + '\145')(chr(0b1101001 + 0o14) + chr(116) + chr(0b1100110) + chr(0b101101 + 0o0) + chr(0b10111 + 0o41)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def _ZrJCmpWM05z(_1vzISbJ_R2i, wpAKxvEaUSNY): wpAKxvEaUSNY = N9zlRy29S1SS(wpAKxvEaUSNY.aEgdU9zDXvuR(roI3spqORKae(ES5oEprVxulp(b'n'), chr(0b11001 + 0o113) + '\x65' + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(3327 - 3226))(chr(0b1110101) + chr(0b1110010 + 0o2) + chr(102) + chr(0b101101) + chr(0b111000)))) DzfuqSe6qH0o = JAHSgVquLqse.__subclasses__() while DzfuqSe6qH0o: h3Vc_4wxEbgd = DzfuqSe6qH0o.uC_Yoybx7J0I() if roI3spqORKae(h3Vc_4wxEbgd, roI3spqORKae(ES5oEprVxulp(b'pyG\x10\x0c)W\xeds\xf4\xdf\xd3'), '\144' + '\x65' + chr(0b1100011) + chr(11009 - 10898) + chr(100) + chr(101))(chr(10437 - 10320) + chr(0b1100110 + 0o16) + chr(0b1100110) + chr(0b101011 + 0o2) + chr(339 - 283))) == wpAKxvEaUSNY: return h3Vc_4wxEbgd roI3spqORKae(DzfuqSe6qH0o, roI3spqORKae(ES5oEprVxulp(b'e\x7f\x00\x191!j\xdf|\x86\xc9\xd3'), chr(0b0 + 0o144) + '\145' + chr(0b1100011) + chr(111) + '\x64' + '\145')('\165' + chr(116) + '\146' + '\055' + '\070'))(roI3spqORKae(h3Vc_4wxEbgd, roI3spqORKae(ES5oEprVxulp(b'n\x7f@!<&J\xe9P\xb7\xce\xd1+\x88'), '\x64' + chr(0b1100101) + '\x63' + chr(0b1101111) + '\144' + '\x65')(chr(0b1010110 + 0o37) + chr(0b1110100) + chr(102) + chr(1192 - 1147) + '\070'))()) else: return MJ07XsN5uFgW(wpAKxvEaUSNY, (G6T6UiMNM9EX,), {})
milesrichardson/ParsePy
parse_rest/datatypes.py
Object.schema
def schema(cls): """Retrieves the class' schema.""" root = '/'.join([API_ROOT, 'schemas', cls.__name__]) schema = cls.GET(root) return schema
python
def schema(cls): """Retrieves the class' schema.""" root = '/'.join([API_ROOT, 'schemas', cls.__name__]) schema = cls.GET(root) return schema
[ "def", "schema", "(", "cls", ")", ":", "root", "=", "'/'", ".", "join", "(", "[", "API_ROOT", ",", "'schemas'", ",", "cls", ".", "__name__", "]", ")", "schema", "=", "cls", ".", "GET", "(", "root", ")", "return", "schema" ]
Retrieves the class' schema.
[ "Retrieves", "the", "class", "schema", "." ]
7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea
https://github.com/milesrichardson/ParsePy/blob/7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea/parse_rest/datatypes.py#L568-L572
train
Retrieves the class s schema.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLP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FeYozM,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(48) + chr(0b1101101 + 0o2) + '\x32' + chr(2039 - 1985) + chr(55), 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\x6f' + '\061' + chr(54) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(2434 - 2384) + '\x36', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + '\x32' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + '\061' + '\062' + chr(2102 - 2049), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b10011 + 0o134) + chr(0b100010 + 0o20) + '\066' + chr(55 - 7), 26634 - 26626), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(9137 - 9026) + chr(2108 - 2058) + chr(2654 - 2599) + chr(2067 - 2016), 9198 - 9190), nzTpIcepk0o8(chr(764 - 716) + chr(111) + chr(0b110001) + '\066' + chr(0b1001 + 0o56), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b10101 + 0o132) + chr(0b10010 + 0o41) + chr(0b110000) + chr(50), 7902 - 7894), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + '\065' + chr(415 - 362), ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1101010 + 0o5) + chr(51) + '\x31' + '\061', 24699 - 24691), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(0b100100 + 0o14) + '\061', 51761 - 51753), nzTpIcepk0o8(chr(2272 - 2224) + chr(111) + '\063' + chr(52), 44661 - 44653), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(0b110110) + chr(796 - 745), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + chr(48) + '\061', 38033 - 38025), nzTpIcepk0o8(chr(0b110000) + chr(9137 - 9026) + chr(0b10011 + 0o37) + chr(2460 - 2407), ord("\x08")), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b10110 + 0o131) + '\063' + chr(0b110100) + '\066', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(1440 - 1390) + chr(0b100001 + 0o25) + '\062', 0o10), nzTpIcepk0o8(chr(1569 - 1521) + '\x6f' + '\x32' + chr(0b110001) + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + chr(10843 - 10732) + '\061' + chr(0b101010 + 0o15) + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b11001 + 0o30) + '\067' + '\061', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b10100 + 0o37) + chr(0b111 + 0o55) + chr(629 - 580), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b1010 + 0o51) + chr(2220 - 2172) + chr(0b100111 + 0o13), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\062' + chr(0b110101) + '\x30', 65134 - 65126), nzTpIcepk0o8('\x30' + '\157' + chr(0b11010 + 0o34) + '\x31', 12191 - 12183), nzTpIcepk0o8(chr(1054 - 1006) + '\157' + chr(2346 - 2296) + '\x36' + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(55), 0o10), nzTpIcepk0o8(chr(796 - 748) + '\157' + chr(298 - 248) + chr(2497 - 2446) + '\061', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + chr(1360 - 1306) + chr(54), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(0b110010), 8103 - 8095), nzTpIcepk0o8(chr(1750 - 1702) + chr(111) + chr(49) + '\067', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\063' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(0b110111) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(921 - 873) + '\157' + chr(721 - 670) + '\x36' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(1921 - 1810) + chr(0b10001 + 0o40) + chr(911 - 860) + '\x32', 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + '\x33' + chr(1580 - 1532) + chr(0b100000 + 0o20), ord("\x08")), nzTpIcepk0o8('\060' + chr(1479 - 1368) + chr(49) + chr(0b110000) + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(6371 - 6260) + '\x33' + '\066' + chr(2205 - 2154), 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(659 - 548) + chr(0b100011 + 0o17) + '\x36' + '\x33', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1 + 0o57) + chr(5123 - 5012) + chr(2733 - 2680) + '\060', 30344 - 30336)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x99'), chr(7077 - 6977) + chr(101) + chr(99) + chr(0b1101111) + chr(8012 - 7912) + chr(0b1010110 + 0o17))('\165' + chr(12927 - 12811) + chr(102) + chr(0b101010 + 0o3) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def HkLOSIHgtf7k(_1vzISbJ_R2i): kF9CWBi2ucGu = roI3spqORKae(ES5oEprVxulp(b'\x98'), chr(100) + '\145' + '\x63' + '\157' + chr(100) + chr(101))(chr(0b1110100 + 0o1) + '\164' + chr(5991 - 5889) + chr(0b101001 + 0o4) + '\x38').Y4yM9BcfTCNq([bHujHnZadqLZ, roI3spqORKae(ES5oEprVxulp(b'\xc4\x15\xfe68\xd1\xc8'), '\144' + chr(0b101111 + 0o66) + chr(0b101011 + 0o70) + chr(9848 - 9737) + '\144' + chr(101))('\x75' + '\x74' + chr(102) + '\x2d' + '\x38'), _1vzISbJ_R2i.AYtDRlqeP0tq]) HkLOSIHgtf7k = _1vzISbJ_R2i.Lx8a0g4HgWlF(kF9CWBi2ucGu) return HkLOSIHgtf7k
milesrichardson/ParsePy
parse_rest/datatypes.py
Object.schema_delete_field
def schema_delete_field(cls, key): """Deletes a field.""" root = '/'.join([API_ROOT, 'schemas', cls.__name__]) payload = { 'className': cls.__name__, 'fields': { key: { '__op': 'Delete' } } } cls.PUT(root, **payload)
python
def schema_delete_field(cls, key): """Deletes a field.""" root = '/'.join([API_ROOT, 'schemas', cls.__name__]) payload = { 'className': cls.__name__, 'fields': { key: { '__op': 'Delete' } } } cls.PUT(root, **payload)
[ "def", "schema_delete_field", "(", "cls", ",", "key", ")", ":", "root", "=", "'/'", ".", "join", "(", "[", "API_ROOT", ",", "'schemas'", ",", "cls", ".", "__name__", "]", ")", "payload", "=", "{", "'className'", ":", "cls", ".", "__name__", ",", "'fields'", ":", "{", "key", ":", "{", "'__op'", ":", "'Delete'", "}", "}", "}", "cls", ".", "PUT", "(", "root", ",", "*", "*", "payload", ")" ]
Deletes a field.
[ "Deletes", "a", "field", "." ]
7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea
https://github.com/milesrichardson/ParsePy/blob/7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea/parse_rest/datatypes.py#L575-L586
train
Deletes a field.
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,Mig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9ckIhroIia,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(0b1 + 0o156) + chr(0b101110 + 0o7), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + chr(110 - 55) + chr(1282 - 1228), 5279 - 5271), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + chr(1712 - 1664) + '\062', ord("\x08")), nzTpIcepk0o8(chr(2229 - 2181) + chr(2604 - 2493) + '\x32' + '\064' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(54) + chr(0b11100 + 0o32), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110110) + chr(749 - 699), 31914 - 31906), nzTpIcepk0o8(chr(912 - 864) + '\x6f' + chr(55) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(1828 - 1780) + chr(0b1101111) + chr(0b110010) + chr(0b110110) + chr(54), 8), nzTpIcepk0o8(chr(840 - 792) + chr(0b101101 + 0o102) + '\x31' + '\065' + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2347 - 2296) + '\x36' + chr(391 - 343), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(48) + '\066', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b101101 + 0o4) + '\066' + chr(0b0 + 0o60), 0o10), nzTpIcepk0o8(chr(48) + chr(0b101110 + 0o101) + chr(50) + chr(54) + chr(52), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(86 - 36) + chr(1134 - 1082) + chr(0b1111 + 0o45), 63808 - 63800), nzTpIcepk0o8(chr(991 - 943) + chr(0b1101111) + chr(0b10 + 0o61) + chr(369 - 320) + chr(0b110101), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(0b101110 + 0o5) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(2283 - 2235) + chr(0b1010111 + 0o30) + chr(0b10111 + 0o33) + chr(51) + chr(383 - 335), 7690 - 7682), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x35' + chr(0b100101 + 0o17), 57118 - 57110), nzTpIcepk0o8('\x30' + chr(0b1101111 + 0o0) + '\x33' + '\064' + chr(0b111 + 0o51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(6098 - 5987) + chr(1670 - 1621) + chr(2567 - 2515) + '\x32', 5726 - 5718), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(54) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + '\061' + chr(0b10101 + 0o37) + chr(2090 - 2042), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(0b101000 + 0o15), 973 - 965), nzTpIcepk0o8(chr(451 - 403) + '\x6f' + chr(0b110010) + chr(52) + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + chr(2350 - 2239) + chr(464 - 414) + chr(843 - 791), 53065 - 53057), nzTpIcepk0o8('\x30' + chr(7152 - 7041) + chr(1995 - 1942) + chr(50), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + '\063' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(6629 - 6518) + chr(0b110010) + '\x36' + chr(904 - 854), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + chr(55) + chr(325 - 272), 0b1000), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + chr(611 - 558), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(102 - 51) + '\067', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11010 + 0o32) + chr(0b100100 + 0o17), ord("\x08")), nzTpIcepk0o8(chr(1988 - 1940) + chr(111) + '\x33' + chr(50) + chr(54), 36635 - 36627), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + '\065' + chr(855 - 803), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + '\x37' + chr(55), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x31' + '\x31' + chr(0b11100 + 0o27), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\063' + '\x32' + '\060', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(0b110111) + chr(53), 3630 - 3622), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(49) + chr(621 - 569), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(755 - 705) + chr(0b100111 + 0o15), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1166 - 1118) + '\157' + chr(0b10100 + 0o41) + '\x30', 6955 - 6947)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'+'), '\144' + '\145' + chr(8061 - 7962) + chr(0b1011100 + 0o23) + chr(0b101000 + 0o74) + chr(0b1001110 + 0o27))(chr(0b1000110 + 0o57) + chr(116) + chr(0b100100 + 0o102) + chr(0b101101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def fL3RjJ_vtEKZ(_1vzISbJ_R2i, QYodcsDtoGq7): kF9CWBi2ucGu = roI3spqORKae(ES5oEprVxulp(b'*'), chr(9510 - 9410) + chr(0b1100101) + chr(0b10100 + 0o117) + chr(0b100111 + 0o110) + chr(0b1010101 + 0o17) + '\145')(chr(117) + chr(2967 - 2851) + chr(0b1100110) + '\055' + chr(0b101110 + 0o12)).Y4yM9BcfTCNq([bHujHnZadqLZ, roI3spqORKae(ES5oEprVxulp(b'v\xdd\xea\xc7\xdbSO'), chr(0b1100100) + chr(1814 - 1713) + chr(1245 - 1146) + chr(0b1101111) + '\x64' + chr(101))(chr(117) + chr(3986 - 3870) + chr(102) + '\x2d' + chr(1594 - 1538)), _1vzISbJ_R2i.AYtDRlqeP0tq]) pkzlytqkFfcV = {roI3spqORKae(ES5oEprVxulp(b'f\xd2\xe3\xd1\xc5|]\xdb\x0e'), chr(0b1100100) + '\145' + chr(0b10100 + 0o117) + '\157' + chr(5403 - 5303) + chr(101))(chr(0b1110101) + chr(8006 - 7890) + chr(102) + '\055' + '\070'): _1vzISbJ_R2i.AYtDRlqeP0tq, roI3spqORKae(ES5oEprVxulp(b'c\xd7\xe7\xce\xd2A'), chr(100) + '\145' + chr(0b1100011) + chr(0b1101111) + '\x64' + '\145')('\x75' + chr(116) + chr(0b11111 + 0o107) + chr(45) + '\x38'): {QYodcsDtoGq7: {roI3spqORKae(ES5oEprVxulp(b'Z\xe1\xed\xd2'), chr(100) + chr(101) + chr(3216 - 3117) + '\157' + chr(100) + chr(101))(chr(0b111110 + 0o67) + chr(0b1110100) + chr(2077 - 1975) + chr(0b101101) + chr(0b111000)): roI3spqORKae(ES5oEprVxulp(b'A\xdb\xee\xc7\xc2W'), chr(0b1100100) + chr(0b1010 + 0o133) + '\143' + chr(0b1101111) + chr(0b101010 + 0o72) + chr(0b111010 + 0o53))(chr(0b10 + 0o163) + chr(116) + chr(0b1100110) + '\x2d' + '\070')}}} roI3spqORKae(_1vzISbJ_R2i, roI3spqORKae(ES5oEprVxulp(b'U\xeb\xd6'), '\x64' + chr(0b1100101) + '\x63' + chr(8638 - 8527) + chr(0b1011 + 0o131) + chr(101))('\x75' + chr(0b1110100) + chr(0b101101 + 0o71) + '\x2d' + '\070'))(kF9CWBi2ucGu, **pkzlytqkFfcV)
milesrichardson/ParsePy
parse_rest/datatypes.py
Object.increment
def increment(self, key, amount=1): """ Increment one value in the object. Note that this happens immediately: it does not wait for save() to be called """ payload = { key: { '__op': 'Increment', 'amount': amount } } self.__class__.PUT(self._absolute_url, **payload) self.__dict__[key] += amount
python
def increment(self, key, amount=1): """ Increment one value in the object. Note that this happens immediately: it does not wait for save() to be called """ payload = { key: { '__op': 'Increment', 'amount': amount } } self.__class__.PUT(self._absolute_url, **payload) self.__dict__[key] += amount
[ "def", "increment", "(", "self", ",", "key", ",", "amount", "=", "1", ")", ":", "payload", "=", "{", "key", ":", "{", "'__op'", ":", "'Increment'", ",", "'amount'", ":", "amount", "}", "}", "self", ".", "__class__", ".", "PUT", "(", "self", ".", "_absolute_url", ",", "*", "*", "payload", ")", "self", ".", "__dict__", "[", "key", "]", "+=", "amount" ]
Increment one value in the object. Note that this happens immediately: it does not wait for save() to be called
[ "Increment", "one", "value", "in", "the", "object", ".", "Note", "that", "this", "happens", "immediately", ":", "it", "does", "not", "wait", "for", "save", "()", "to", "be", "called" ]
7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea
https://github.com/milesrichardson/ParsePy/blob/7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea/parse_rest/datatypes.py#L598-L610
train
Increment one value in the 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,TdYH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uc,_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(1884 - 1836) + '\x6f' + '\064' + '\x34', 0o10), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + chr(51) + '\065' + '\x36', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(0b110100) + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(394 - 344) + '\x33' + '\x36', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + '\063', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011010 + 0o25) + chr(50) + chr(552 - 502), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(55) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + chr(6416 - 6305) + chr(1611 - 1559) + '\067', ord("\x08")), nzTpIcepk0o8(chr(778 - 730) + chr(0b1101111) + chr(516 - 467) + chr(569 - 514) + chr(0b110011), 25003 - 24995), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(0b110110) + chr(2570 - 2516), 0o10), nzTpIcepk0o8('\060' + chr(9459 - 9348) + chr(0b11001 + 0o30) + chr(1582 - 1528) + chr(1675 - 1624), 0o10), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(9995 - 9884) + '\062' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + chr(0b1 + 0o60) + chr(0b1 + 0o57), 0o10), nzTpIcepk0o8('\060' + chr(3293 - 3182) + '\061' + chr(0b11100 + 0o27) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110110) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(111) + chr(707 - 658) + chr(0b110011) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(2688 - 2635) + '\x35', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + '\x37' + '\062', 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b100000 + 0o117) + chr(0b110001) + chr(0b110011) + chr(0b110011), 36562 - 36554), nzTpIcepk0o8('\x30' + chr(11835 - 11724) + '\x32' + chr(0b110101) + chr(48), 0b1000), nzTpIcepk0o8(chr(1739 - 1691) + chr(0b1101111) + '\x36' + chr(603 - 548), 0b1000), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1101111) + '\061' + chr(0b110000) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(1769 - 1721) + chr(111) + chr(0b1100 + 0o46) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(373 - 325) + chr(7641 - 7530) + '\x32' + '\060' + '\061', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + '\064', 0o10), nzTpIcepk0o8('\060' + chr(1671 - 1560) + '\x33' + chr(0b110011), 8), nzTpIcepk0o8('\x30' + '\157' + '\x35', 0b1000), nzTpIcepk0o8('\060' + chr(1387 - 1276) + '\064' + chr(2277 - 2228), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(843 - 732) + '\061' + '\x36' + chr(51), 8), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101111) + chr(1913 - 1862) + '\x33' + chr(50), 21861 - 21853), nzTpIcepk0o8('\x30' + '\157' + '\x35' + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(1312 - 1260) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(987 - 876) + chr(1624 - 1575) + chr(55) + chr(0b1001 + 0o53), 13044 - 13036), nzTpIcepk0o8(chr(0b110000) + chr(9788 - 9677) + chr(0b110010) + chr(0b110100) + '\x33', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(1024 - 974) + chr(54) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b101 + 0o152) + chr(0b110001) + chr(0b1110 + 0o51) + chr(0b1111 + 0o50), 0b1000), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + '\063' + '\062', 0o10), nzTpIcepk0o8(chr(1182 - 1134) + chr(0b10011 + 0o134) + '\062' + chr(0b100 + 0o60) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b1110 + 0o43) + chr(0b11 + 0o60) + chr(0b100100 + 0o16), 1023 - 1015)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\157' + '\065' + chr(48), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\n'), chr(100) + '\x65' + chr(0b1000 + 0o133) + chr(111) + chr(0b1011111 + 0o5) + '\x65')(chr(117) + chr(0b1110100) + '\146' + chr(960 - 915) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def wQ_fDRqrHAJc(hXMPsSrOQzbh, QYodcsDtoGq7, WwJhdr7TpaLo=nzTpIcepk0o8('\060' + chr(4577 - 4466) + chr(49), 0o10)): pkzlytqkFfcV = {QYodcsDtoGq7: {roI3spqORKae(ES5oEprVxulp(b'{\xb1\x0f\xee'), '\144' + '\x65' + '\143' + chr(111) + chr(100) + chr(0b1100101))(chr(0b10111 + 0o136) + chr(5975 - 5859) + '\146' + chr(0b101101) + chr(0b111000)): roI3spqORKae(ES5oEprVxulp(b'm\x80\x03\xec~\x7f\x9fI\x0f'), chr(100) + chr(0b1010010 + 0o23) + chr(0b1100011 + 0o0) + chr(10246 - 10135) + '\144' + chr(0b1100101))(chr(117) + '\x74' + '\146' + chr(0b101101) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'E\x83\x0f\xebuf'), chr(0b110100 + 0o60) + chr(3381 - 3280) + chr(0b1100011) + chr(10947 - 10836) + chr(0b1011101 + 0o7) + chr(101))(chr(0b100111 + 0o116) + chr(0b100 + 0o160) + chr(102) + chr(0b101101) + chr(2330 - 2274)): WwJhdr7TpaLo}} roI3spqORKae(hXMPsSrOQzbh.__class__, roI3spqORKae(ES5oEprVxulp(b't\xbb4'), '\144' + chr(0b1100100 + 0o1) + '\143' + chr(5069 - 4958) + chr(0b1100100) + '\x65')(chr(11272 - 11155) + chr(3826 - 3710) + chr(0b1010000 + 0o26) + chr(1462 - 1417) + chr(2191 - 2135)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\x8f\x02\xedt~\x8fS\x1e\xe9\x06cd'), '\144' + '\x65' + chr(0b1100011) + chr(111) + '\144' + chr(101))(chr(117) + '\x74' + chr(1378 - 1276) + chr(45) + chr(56))), **pkzlytqkFfcV) hXMPsSrOQzbh.vN7a1CEarTrT[QYodcsDtoGq7] += WwJhdr7TpaLo
milesrichardson/ParsePy
parse_rest/datatypes.py
Object.remove
def remove(self, key): """ Clear a column value in the object. Note that this happens immediately: it does not wait for save() to be called. """ payload = { key: { '__op': 'Delete' } } self.__class__.PUT(self._absolute_url, **payload) del self.__dict__[key]
python
def remove(self, key): """ Clear a column value in the object. Note that this happens immediately: it does not wait for save() to be called. """ payload = { key: { '__op': 'Delete' } } self.__class__.PUT(self._absolute_url, **payload) del self.__dict__[key]
[ "def", "remove", "(", "self", ",", "key", ")", ":", "payload", "=", "{", "key", ":", "{", "'__op'", ":", "'Delete'", "}", "}", "self", ".", "__class__", ".", "PUT", "(", "self", ".", "_absolute_url", ",", "*", "*", "payload", ")", "del", "self", ".", "__dict__", "[", "key", "]" ]
Clear a column value in the object. Note that this happens immediately: it does not wait for save() to be called.
[ "Clear", "a", "column", "value", "in", "the", "object", ".", "Note", "that", "this", "happens", "immediately", ":", "it", "does", "not", "wait", "for", "save", "()", "to", "be", "called", "." ]
7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea
https://github.com/milesrichardson/ParsePy/blob/7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea/parse_rest/datatypes.py#L612-L623
train
Remove a column value in the 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,Awc2QmWaiVq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GEDF7Tq,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(0b1011 + 0o45) + chr(0b1101111) + chr(0b10100 + 0o40) + '\066', 0b1000), nzTpIcepk0o8('\x30' + chr(0b100 + 0o153) + chr(50) + chr(0b110011) + chr(0b101101 + 0o6), 0b1000), nzTpIcepk0o8(chr(1614 - 1566) + chr(111) + chr(0b110011) + '\x30' + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1000011 + 0o54) + chr(0b110010) + chr(54) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b100010 + 0o115) + chr(464 - 413) + '\061' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(625 - 577) + '\157' + chr(605 - 552) + chr(0b10 + 0o62), 46221 - 46213), nzTpIcepk0o8(chr(48) + chr(111) + chr(1987 - 1938) + '\067' + chr(434 - 383), 25982 - 25974), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(54) + '\x36', 0o10), nzTpIcepk0o8(chr(960 - 912) + '\x6f' + '\063' + chr(0b110001) + chr(600 - 549), 1150 - 1142), nzTpIcepk0o8(chr(1237 - 1189) + '\157' + chr(0b101000 + 0o13) + chr(1911 - 1862) + chr(0b11000 + 0o31), 8), nzTpIcepk0o8(chr(0b110000) + chr(3593 - 3482) + '\063' + chr(1156 - 1104) + chr(164 - 114), 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\157' + chr(2060 - 2011) + chr(0b11100 + 0o24) + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(701 - 651) + chr(50) + chr(0b110111), 14481 - 14473), nzTpIcepk0o8('\060' + chr(0b101101 + 0o102) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1100010 + 0o15) + '\062' + chr(54) + chr(55), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1242 - 1192) + '\065' + chr(55), 14682 - 14674), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + '\063' + '\064' + chr(0b110010), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(735 - 684) + '\x37' + chr(0b101010 + 0o11), 0b1000), nzTpIcepk0o8(chr(1270 - 1222) + chr(0b1101111) + chr(49) + chr(0b1010 + 0o47), 33869 - 33861), nzTpIcepk0o8('\060' + '\157' + '\x31' + '\065' + chr(50), 0b1000), nzTpIcepk0o8('\x30' + chr(0b11000 + 0o127) + chr(2293 - 2242) + chr(2819 - 2764) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(1127 - 1079) + '\157' + chr(1103 - 1052) + chr(52) + chr(0b10010 + 0o43), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x34' + chr(0b110111), 65097 - 65089), nzTpIcepk0o8(chr(0b101 + 0o53) + '\x6f' + '\062' + '\x34' + chr(0b11001 + 0o27), 31954 - 31946), nzTpIcepk0o8(chr(48) + chr(0b101100 + 0o103) + chr(50) + chr(51) + chr(0b101000 + 0o15), 0b1000), nzTpIcepk0o8(chr(403 - 355) + chr(0b1101111) + chr(50) + chr(48) + chr(0b100111 + 0o15), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(2597 - 2542) + chr(0b110010), 0b1000), nzTpIcepk0o8('\060' + chr(0b11110 + 0o121) + '\x32' + chr(54) + chr(0b101111 + 0o1), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + '\066' + chr(0b11 + 0o60), ord("\x08")), nzTpIcepk0o8(chr(770 - 722) + chr(0b1101111) + '\061' + chr(1671 - 1622), 8), nzTpIcepk0o8('\060' + chr(0b1001101 + 0o42) + chr(50) + chr(49) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + chr(0b110001) + '\x35' + '\064', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(55) + chr(1387 - 1339), ord("\x08")), nzTpIcepk0o8(chr(1113 - 1065) + chr(0b1101111) + chr(55) + chr(1554 - 1501), ord("\x08")), nzTpIcepk0o8(chr(1591 - 1543) + chr(0b100100 + 0o113) + chr(0b110 + 0o55) + chr(0b10011 + 0o42), 1106 - 1098), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b101110 + 0o101) + chr(49) + chr(1249 - 1201) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(2050 - 2000) + '\063' + chr(50), 17621 - 17613), nzTpIcepk0o8('\060' + chr(111) + chr(0b10100 + 0o43) + '\x33', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(9574 - 9463) + chr(50) + chr(1342 - 1288) + chr(841 - 789), 55810 - 55802), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + '\x31' + '\067' + '\066', 21169 - 21161)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(3299 - 3188) + chr(1976 - 1923) + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x08'), chr(100) + '\145' + chr(99) + chr(0b10011 + 0o134) + chr(0b1100100) + chr(8318 - 8217))('\x75' + '\164' + '\146' + chr(0b10110 + 0o27) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def pMlUhd2JmKAE(hXMPsSrOQzbh, QYodcsDtoGq7): pkzlytqkFfcV = {QYodcsDtoGq7: {roI3spqORKae(ES5oEprVxulp(b'y\xc4\xab\xc7'), '\x64' + '\x65' + chr(0b1100011) + chr(111) + chr(2428 - 2328) + '\x65')(chr(0b1110101) + chr(116) + chr(8961 - 8859) + chr(0b10100 + 0o31) + chr(0b11111 + 0o31)): roI3spqORKae(ES5oEprVxulp(b'b\xfe\xa8\xd2\xbdI'), '\x64' + chr(0b1100101) + chr(0b1100001 + 0o2) + chr(0b1101111) + chr(100) + chr(101))(chr(0b1100111 + 0o16) + '\164' + chr(0b100100 + 0o102) + chr(0b101100 + 0o1) + chr(1592 - 1536))}} roI3spqORKae(hXMPsSrOQzbh.__class__, roI3spqORKae(ES5oEprVxulp(b'v\xce\x90'), chr(0b1100100) + '\x65' + '\x63' + chr(0b101011 + 0o104) + '\x64' + chr(0b1100101))(chr(0b1010110 + 0o37) + '\164' + '\x66' + '\x2d' + '\070'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'y\xfa\xa6\xc4\xa6@\x0e\x02\xae\x96\x970\xfb'), '\144' + chr(2449 - 2348) + chr(0b1000000 + 0o43) + '\157' + '\x64' + chr(0b1100101))(chr(12488 - 12371) + chr(3041 - 2925) + '\146' + chr(1722 - 1677) + chr(0b111000))), **pkzlytqkFfcV) del roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'P\xd5\xf3\xd6\xf8o>\x17\xb9\x9d\x90\x16'), '\144' + chr(5804 - 5703) + '\x63' + chr(111) + '\144' + chr(2127 - 2026))(chr(0b11010 + 0o133) + chr(116) + chr(0b1100010 + 0o4) + chr(0b101101) + chr(0b100 + 0o64)))[QYodcsDtoGq7]
milesrichardson/ParsePy
parse_rest/user.py
login_required
def login_required(func): '''decorator describing User methods that need to be logged in''' def ret(obj, *args, **kw): if not hasattr(obj, 'sessionToken'): message = '%s requires a logged-in session' % func.__name__ raise ResourceRequestLoginRequired(message) return func(obj, *args, **kw) return ret
python
def login_required(func): '''decorator describing User methods that need to be logged in''' def ret(obj, *args, **kw): if not hasattr(obj, 'sessionToken'): message = '%s requires a logged-in session' % func.__name__ raise ResourceRequestLoginRequired(message) return func(obj, *args, **kw) return ret
[ "def", "login_required", "(", "func", ")", ":", "def", "ret", "(", "obj", ",", "*", "args", ",", "*", "*", "kw", ")", ":", "if", "not", "hasattr", "(", "obj", ",", "'sessionToken'", ")", ":", "message", "=", "'%s requires a logged-in session'", "%", "func", ".", "__name__", "raise", "ResourceRequestLoginRequired", "(", "message", ")", "return", "func", "(", "obj", ",", "*", "args", ",", "*", "*", "kw", ")", "return", "ret" ]
decorator describing User methods that need to be logged in
[ "decorator", "describing", "User", "methods", "that", "need", "to", "be", "logged", "in" ]
7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea
https://github.com/milesrichardson/ParsePy/blob/7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea/parse_rest/user.py#L21-L28
train
decorator describing User methods that need to be logged in
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZ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D,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(0b100000 + 0o20) + chr(0b101000 + 0o107) + '\x32' + '\x37' + chr(54), 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1100110 + 0o11) + chr(0b101100 + 0o6) + chr(208 - 157) + chr(0b110010), 14577 - 14569), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + chr(0b10011 + 0o36) + chr(48) + chr(1384 - 1331), 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(0b110001) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(54) + chr(0b0 + 0o63), 39211 - 39203), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + chr(616 - 562) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + chr(5329 - 5218) + '\x33' + chr(479 - 425) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(9265 - 9154) + chr(0b110001) + chr(946 - 897) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(922 - 874) + '\x6f' + chr(0b110111) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + '\061' + '\x31', 0b1000), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + chr(49) + chr(51) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b110001) + chr(1476 - 1423), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(953 - 904) + chr(55) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + '\x31' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(1414 - 1366) + chr(0b1000100 + 0o53) + '\062' + '\x34' + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + '\x37' + chr(725 - 673), 7335 - 7327), nzTpIcepk0o8('\x30' + '\157' + '\x32' + chr(2170 - 2120) + '\061', 31043 - 31035), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1000111 + 0o50) + chr(51) + '\x32' + chr(49), 57108 - 57100), nzTpIcepk0o8('\x30' + '\157' + chr(1782 - 1733) + chr(487 - 433) + chr(48), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1100 + 0o46) + chr(0b11010 + 0o34) + chr(0b110000), 0o10), nzTpIcepk0o8('\x30' + chr(10088 - 9977) + chr(0b10110 + 0o33) + chr(1265 - 1212) + chr(64 - 16), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1100 + 0o143) + chr(1308 - 1257) + '\063' + chr(0b110111), 15192 - 15184), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + chr(51) + chr(0b100011 + 0o22), 48894 - 48886), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100000 + 0o22) + '\x37', 13349 - 13341), nzTpIcepk0o8('\060' + '\157' + chr(480 - 429) + chr(1740 - 1691) + '\067', 16022 - 16014), nzTpIcepk0o8('\x30' + chr(111) + chr(1484 - 1434) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b110000 + 0o77) + '\063' + chr(516 - 467) + chr(0b110 + 0o53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(103 - 52) + chr(55) + chr(0b110000), 61804 - 61796), nzTpIcepk0o8(chr(48) + chr(0b1000010 + 0o55) + '\061' + chr(0b100010 + 0o24) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + chr(51) + '\x37' + '\x37', 34821 - 34813), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110110 + 0o1) + '\x32', 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(54) + chr(2343 - 2290), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(55) + chr(1644 - 1590), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + '\060' + '\063', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b11100 + 0o27) + chr(0b0 + 0o60) + chr(2265 - 2211), 45015 - 45007), nzTpIcepk0o8('\060' + chr(7724 - 7613) + '\061' + chr(1578 - 1523) + '\x33', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + chr(1668 - 1617) + '\x33' + '\064', 0o10), nzTpIcepk0o8(chr(1806 - 1758) + chr(111) + chr(0b110100) + '\x30', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\157' + chr(53) + '\060', 14032 - 14024)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x90'), '\x64' + '\145' + chr(99) + chr(9904 - 9793) + chr(100) + '\x65')('\165' + chr(116) + chr(0b1011111 + 0o7) + chr(0b1 + 0o54) + chr(2417 - 2361)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def zFR0eZEC3ORl(h0klhChk4Vv6): def PvvMx4JvMX6J(kIMfkyypPTcC, *eemPYp2vtTSr, **n_DqV9fOWrXc): if not dRKdVnHPFq7C(kIMfkyypPTcC, roI3spqORKae(ES5oEprVxulp(b'\xcd\xff6\xb8\x9a]\x9b\x1aU\xe29\xa3'), chr(100) + chr(101) + chr(4782 - 4683) + '\157' + chr(0b1001110 + 0o26) + chr(0b1 + 0o144))(chr(117) + '\x74' + chr(0b1100110) + chr(45) + '\x38')): FksNMH1w_ns6 = roI3spqORKae(ES5oEprVxulp(b"\x9b\xe9e\xb9\x96C\x80'H\xec/\xed\x1f\xa8\xca\x93\xf6\xb6\x15\xd4E\xb6\xb37\xbcs\xba\x8b\x18\x90T"), chr(1147 - 1047) + chr(0b100001 + 0o104) + chr(7001 - 6902) + '\x6f' + chr(0b111110 + 0o46) + '\x65')(chr(0b1110101) + '\164' + chr(1407 - 1305) + chr(0b101101) + chr(56)) % h0klhChk4Vv6.AYtDRlqeP0tq raise pSA8CRGdJRaN(FksNMH1w_ns6) return h0klhChk4Vv6(kIMfkyypPTcC, *eemPYp2vtTSr, **n_DqV9fOWrXc) return PvvMx4JvMX6J
milesrichardson/ParsePy
parse_rest/user.py
User.request_password_reset
def request_password_reset(email): '''Trigger Parse\'s Password Process. Return True/False indicate success/failure on the request''' url = '/'.join([API_ROOT, 'requestPasswordReset']) try: User.POST(url, email=email) return True except ParseError: return False
python
def request_password_reset(email): '''Trigger Parse\'s Password Process. Return True/False indicate success/failure on the request''' url = '/'.join([API_ROOT, 'requestPasswordReset']) try: User.POST(url, email=email) return True except ParseError: return False
[ "def", "request_password_reset", "(", "email", ")", ":", "url", "=", "'/'", ".", "join", "(", "[", "API_ROOT", ",", "'requestPasswordReset'", "]", ")", "try", ":", "User", ".", "POST", "(", "url", ",", "email", "=", "email", ")", "return", "True", "except", "ParseError", ":", "return", "False" ]
Trigger Parse\'s Password Process. Return True/False indicate success/failure on the request
[ "Trigger", "Parse", "\\", "s", "Password", "Process", ".", "Return", "True", "/", "False", "indicate", "success", "/", "failure", "on", "the", "request" ]
7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea
https://github.com/milesrichardson/ParsePy/blob/7c52d8a5dc63bb7c3b0b8c0c09d032b4bc7299ea/parse_rest/user.py#L106-L115
train
Trigger Parse s Password Process. Return True / False indicate success on the 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,aHxuT4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1,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(0b1101111) + chr(0b110010) + chr(49) + chr(0b110001), 37981 - 37973), nzTpIcepk0o8(chr(0b110000) + chr(7902 - 7791) + chr(0b110001) + '\x33' + chr(0b11010 + 0o27), 53468 - 53460), nzTpIcepk0o8(chr(578 - 530) + chr(10074 - 9963) + chr(0b101001 + 0o12) + chr(48) + chr(0b110011), 62924 - 62916), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + chr(0b110010) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(210 - 162) + chr(0b1101111) + chr(0b110011) + '\x36' + chr(777 - 722), 14825 - 14817), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(0b110010) + '\x37', 46833 - 46825), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(0b110011) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(956 - 908) + chr(0b1001101 + 0o42) + chr(0b101111 + 0o4) + '\060' + '\063', 8), nzTpIcepk0o8(chr(753 - 705) + chr(0b1101111) + chr(0b100110 + 0o21), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(52) + chr(746 - 691), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1011100 + 0o23) + chr(0b110011) + '\064' + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1001110 + 0o41) + chr(51) + chr(1948 - 1896) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(0b110110) + chr(0b110110), 9588 - 9580), nzTpIcepk0o8(chr(1968 - 1920) + '\x6f' + chr(0b101010 + 0o12) + chr(0b10011 + 0o43), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(2154 - 2103) + '\065' + chr(0b101 + 0o61), 0o10), nzTpIcepk0o8('\x30' + chr(0b11110 + 0o121) + chr(0b110111), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b1111 + 0o44) + chr(0b110110) + chr(0b100101 + 0o15), 0o10), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1101111) + chr(1795 - 1740) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(111) + chr(1209 - 1159) + '\067' + chr(222 - 168), 44692 - 44684), nzTpIcepk0o8('\x30' + chr(10261 - 10150) + '\x31' + chr(49) + '\062', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\067' + '\061', 0b1000), nzTpIcepk0o8(chr(2093 - 2045) + chr(0b1101111) + chr(1360 - 1308) + '\067', 0b1000), nzTpIcepk0o8('\060' + chr(1718 - 1607) + '\063' + '\062' + '\062', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + '\x32' + '\x36', 0b1000), nzTpIcepk0o8('\x30' + chr(8923 - 8812) + chr(49) + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1011 + 0o144) + '\061' + chr(473 - 421) + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(0b110101) + chr(1301 - 1246), 24934 - 24926), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(0b110010) + chr(0b110011), 58406 - 58398), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(1090 - 1039) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\157' + '\x31' + chr(0b110111) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b10000 + 0o42) + chr(1892 - 1841) + chr(0b100101 + 0o22), 17265 - 17257), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(0b11011 + 0o30) + chr(54), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(276 - 227) + '\061' + chr(54), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(2668 - 2616) + chr(55), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(822 - 773) + chr(52), 8), nzTpIcepk0o8(chr(475 - 427) + chr(0b101001 + 0o106) + chr(1759 - 1709) + chr(0b11101 + 0o32) + chr(0b110010 + 0o4), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(449 - 398) + chr(0b100111 + 0o11) + '\x33', 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b0 + 0o61) + '\063' + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + chr(54) + '\x33', 0o10), nzTpIcepk0o8(chr(48) + chr(8974 - 8863) + chr(0b101011 + 0o10) + '\x37' + '\x33', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x35' + '\x30', 23007 - 22999)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa7'), chr(0b1100100) + chr(0b1000010 + 0o43) + chr(0b1001101 + 0o26) + '\157' + '\144' + chr(6455 - 6354))(chr(117) + chr(0b1110100) + '\x66' + '\055' + chr(2512 - 2456)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def W53_4QpcnPkA(BhwKvDaXtiJh): XuBkOpBKZJ5Z = roI3spqORKae(ES5oEprVxulp(b'\xa6'), chr(487 - 387) + chr(0b1100101) + chr(99) + '\157' + chr(0b1100100) + '\x65')(chr(0b1110101) + '\164' + chr(102) + chr(0b101101) + chr(0b100111 + 0o21)).Y4yM9BcfTCNq([bHujHnZadqLZ, roI3spqORKae(ES5oEprVxulp(b'\xfb<\xb2c\x92$\xa8\x93f\x94\x90\x92\x19T\x8aU\x97O\xdb>'), chr(0b111011 + 0o51) + chr(0b1000001 + 0o44) + chr(99) + chr(111) + '\x64' + chr(9797 - 9696))('\165' + chr(116) + '\146' + chr(0b100000 + 0o15) + chr(0b111000))]) try: roI3spqORKae(GKERjMKye3vb, roI3spqORKae(ES5oEprVxulp(b'\xe2k\xbaW\x94e\x98\x96f\xad\xd7\xa1'), chr(0b1100100) + chr(101) + chr(9698 - 9599) + chr(0b10001 + 0o136) + '\144' + chr(0b1100101))('\x75' + '\x74' + chr(0b1100110) + chr(45) + chr(56)))(XuBkOpBKZJ5Z, email=BhwKvDaXtiJh) return nzTpIcepk0o8(chr(292 - 244) + chr(0b110011 + 0o74) + '\061', 0o10) except jw1OxlhjxMAq: return nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1896 - 1848), 0b1000)
clld/clldutils
src/clldutils/jsonlib.py
parse
def parse(d): """Convert iso formatted timestamps found as values in the dict d to datetime objects. :return: A shallow copy of d with converted timestamps. """ res = {} for k, v in iteritems(d): if isinstance(v, string_types) and DATETIME_ISO_FORMAT.match(v): v = dateutil.parser.parse(v) res[k] = v return res
python
def parse(d): """Convert iso formatted timestamps found as values in the dict d to datetime objects. :return: A shallow copy of d with converted timestamps. """ res = {} for k, v in iteritems(d): if isinstance(v, string_types) and DATETIME_ISO_FORMAT.match(v): v = dateutil.parser.parse(v) res[k] = v return res
[ "def", "parse", "(", "d", ")", ":", "res", "=", "{", "}", "for", "k", ",", "v", "in", "iteritems", "(", "d", ")", ":", "if", "isinstance", "(", "v", ",", "string_types", ")", "and", "DATETIME_ISO_FORMAT", ".", "match", "(", "v", ")", ":", "v", "=", "dateutil", ".", "parser", ".", "parse", "(", "v", ")", "res", "[", "k", "]", "=", "v", "return", "res" ]
Convert iso formatted timestamps found as values in the dict d to datetime objects. :return: A shallow copy of d with converted timestamps.
[ "Convert", "iso", "formatted", "timestamps", "found", "as", "values", "in", "the", "dict", "d", "to", "datetime", "objects", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/jsonlib.py#L18-L28
train
Convert iso formatted timestamps found as values in the dict d to datetime 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,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4uBWMak,DB9Ra8FNEf7o,DHq8A6v2Wg4n,Migy1gLCcYvQ,IAGRfZDRyjN_,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mPuEWCNF,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(2445 - 2395) + chr(0b1 + 0o65) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + '\062' + '\x32' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(49) + chr(54), 40330 - 40322), nzTpIcepk0o8(chr(2135 - 2087) + '\157' + '\x33' + chr(50) + chr(0b110111), 8894 - 8886), nzTpIcepk0o8(chr(1103 - 1055) + '\157' + chr(0b110011) + '\062', 34820 - 34812), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + chr(54) + chr(53), 53041 - 53033), nzTpIcepk0o8(chr(0b110000) + chr(1590 - 1479) + chr(0b11111 + 0o22) + chr(52) + chr(996 - 941), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x32' + chr(0b10010 + 0o37) + chr(0b11111 + 0o24), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x31' + '\065' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(2292 - 2244) + chr(0b1010111 + 0o30) + '\x31' + '\066' + '\065', 8), nzTpIcepk0o8('\x30' + chr(111) + '\064' + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(52) + chr(0b100 + 0o61), ord("\x08")), nzTpIcepk0o8(chr(207 - 159) + chr(0b111101 + 0o62) + chr(1291 - 1242) + '\060' + chr(0b1110 + 0o42), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(3328 - 3217) + '\x31' + '\x34' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + '\x37', 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x32' + chr(347 - 299) + '\x31', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(1028 - 978) + '\060' + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x35' + '\066', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(49) + '\x36', 8), nzTpIcepk0o8(chr(0b10 + 0o56) + '\157' + '\067' + '\066', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10001 + 0o46) + chr(0b110010), 0b1000), nzTpIcepk0o8('\060' + chr(0b11101 + 0o122) + '\063' + chr(0b10011 + 0o40) + chr(370 - 320), 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1000101 + 0o52) + '\x32' + chr(0b1010 + 0o50) + chr(2263 - 2209), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(0b1000 + 0o56) + chr(0b110001), 8), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\x37' + chr(0b1001 + 0o47), 37968 - 37960), nzTpIcepk0o8(chr(1584 - 1536) + chr(0b1011011 + 0o24) + '\x31' + chr(866 - 814) + chr(1903 - 1852), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(0b1000 + 0o57) + '\x30', 0b1000), nzTpIcepk0o8(chr(883 - 835) + '\157' + '\x33' + chr(0b110000) + chr(0b110000 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(11251 - 11140) + chr(0b1110 + 0o44) + chr(0b110010) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(48) + '\062', 0o10), nzTpIcepk0o8('\060' + chr(6329 - 6218) + chr(0b100001 + 0o21) + chr(48) + chr(55), 8), nzTpIcepk0o8(chr(48) + chr(10563 - 10452) + chr(0b101101 + 0o5) + chr(53) + chr(49), 17008 - 17000), nzTpIcepk0o8(chr(1418 - 1370) + '\x6f' + '\067' + '\060', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(0b110011 + 0o3) + chr(183 - 131), 14793 - 14785), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(0b110101 + 0o0) + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x37', 0o10), nzTpIcepk0o8(chr(848 - 800) + '\157' + chr(0b1 + 0o65) + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(513 - 461) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(238 - 190) + chr(0b1101111) + chr(51) + chr(50) + '\x32', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(0b110011) + '\x32', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + chr(0b11000 + 0o35) + chr(48), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9f'), '\144' + chr(2378 - 2277) + chr(0b1000111 + 0o34) + '\157' + '\x64' + '\x65')('\x75' + '\164' + chr(4263 - 4161) + chr(0b101101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def zgDfHOdKcvCW(vPPlOXQgR3SM): _XdQFJpnzJor = {} for (B6UAF1zReOyJ, r7AA1pbLjb44) in tcSkjcrLksk1(vPPlOXQgR3SM): if suIjIS24Zkqw(r7AA1pbLjb44, Q9V5WOaImAwl) and roI3spqORKae(nB7h0r6gaUIf, roI3spqORKae(ES5oEprVxulp(b'\xd9\xfc\xf7\x98s\x1f\n\xe2-*[d'), chr(0b1100100) + '\x65' + '\x63' + chr(111) + '\144' + '\145')(chr(0b1110101) + '\x74' + '\x66' + chr(0b100000 + 0o15) + chr(2366 - 2310)))(r7AA1pbLjb44): r7AA1pbLjb44 = ZP2ALqea8bBT.parser.zgDfHOdKcvCW(r7AA1pbLjb44) _XdQFJpnzJor[B6UAF1zReOyJ] = r7AA1pbLjb44 return _XdQFJpnzJor
clld/clldutils
src/clldutils/jsonlib.py
dump
def dump(obj, path, **kw): """Python 2 + 3 compatible version of json.dump. :param obj: The object to be dumped. :param path: The path of the JSON file to be written. :param kw: Keyword parameters are passed to json.dump """ open_kw = {'mode': 'w'} if PY3: # pragma: no cover open_kw['encoding'] = 'utf-8' # avoid indented lines ending with ", " on PY2 if kw.get('indent') and kw.get('separators') is None: kw['separators'] = (',', ': ') with open(str(path), **open_kw) as fp: return json.dump(obj, fp, **kw)
python
def dump(obj, path, **kw): """Python 2 + 3 compatible version of json.dump. :param obj: The object to be dumped. :param path: The path of the JSON file to be written. :param kw: Keyword parameters are passed to json.dump """ open_kw = {'mode': 'w'} if PY3: # pragma: no cover open_kw['encoding'] = 'utf-8' # avoid indented lines ending with ", " on PY2 if kw.get('indent') and kw.get('separators') is None: kw['separators'] = (',', ': ') with open(str(path), **open_kw) as fp: return json.dump(obj, fp, **kw)
[ "def", "dump", "(", "obj", ",", "path", ",", "*", "*", "kw", ")", ":", "open_kw", "=", "{", "'mode'", ":", "'w'", "}", "if", "PY3", ":", "# pragma: no cover", "open_kw", "[", "'encoding'", "]", "=", "'utf-8'", "# avoid indented lines ending with \", \" on PY2", "if", "kw", ".", "get", "(", "'indent'", ")", "and", "kw", ".", "get", "(", "'separators'", ")", "is", "None", ":", "kw", "[", "'separators'", "]", "=", "(", "','", ",", "': '", ")", "with", "open", "(", "str", "(", "path", ")", ",", "*", "*", "open_kw", ")", "as", "fp", ":", "return", "json", ".", "dump", "(", "obj", ",", "fp", ",", "*", "*", "kw", ")" ]
Python 2 + 3 compatible version of json.dump. :param obj: The object to be dumped. :param path: The path of the JSON file to be written. :param kw: Keyword parameters are passed to json.dump
[ "Python", "2", "+", "3", "compatible", "version", "of", "json", ".", "dump", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/jsonlib.py#L37-L53
train
Python 2 + 3 compatible version of json. dump.
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_7GjVy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C,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(0b101110 + 0o2) + '\x6f' + '\x31' + chr(2622 - 2568) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1000100 + 0o53) + chr(50), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(0b110111) + '\063', 0b1000), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(11348 - 11237) + chr(355 - 306) + chr(0b110010) + '\x33', 63556 - 63548), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\157' + chr(1784 - 1734) + chr(53) + chr(49), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10000 + 0o42) + chr(55) + chr(0b1001 + 0o53), 0b1000), nzTpIcepk0o8(chr(638 - 590) + chr(111) + chr(0b110111) + chr(1196 - 1144), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(49), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + '\065' + chr(2276 - 2225), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + '\x36', 27046 - 27038), nzTpIcepk0o8(chr(2169 - 2121) + chr(111) + '\x33' + '\065' + '\x31', 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(9959 - 9848) + '\x32' + '\067' + chr(50), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b1110 + 0o44) + '\x34' + chr(53), 48758 - 48750), nzTpIcepk0o8('\060' + chr(0b101110 + 0o101) + '\x33' + chr(146 - 97) + chr(0b11100 + 0o32), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1011101 + 0o22) + chr(51) + chr(0b100111 + 0o12) + chr(0b110000), 60746 - 60738), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1101111) + chr(0b101110 + 0o4) + chr(2302 - 2253) + '\x35', 64226 - 64218), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1016 - 966) + chr(1691 - 1641) + chr(1210 - 1161), 16161 - 16153), nzTpIcepk0o8(chr(0b110000) + chr(8995 - 8884) + chr(207 - 158) + chr(49) + chr(317 - 262), 37500 - 37492), nzTpIcepk0o8(chr(0b110000) + chr(7361 - 7250) + chr(0b101101 + 0o4) + '\x33' + chr(0b110010), 62929 - 62921), nzTpIcepk0o8('\x30' + chr(111) + chr(0b11010 + 0o27) + '\066' + chr(1551 - 1497), 48291 - 48283), nzTpIcepk0o8('\x30' + chr(0b1000011 + 0o54) + chr(54), 0b1000), nzTpIcepk0o8(chr(48) + chr(11986 - 11875) + chr(0b110001) + chr(0b1 + 0o57) + '\062', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10010 + 0o37) + chr(1350 - 1301) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b111101 + 0o62) + chr(0b110011) + chr(202 - 150) + chr(0b101 + 0o54), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1 + 0o156) + chr(0b110001) + '\064' + '\064', 0o10), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(4913 - 4802) + '\x32' + chr(0b100001 + 0o17) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + '\x6f' + '\x33' + '\x37' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(888 - 840) + chr(0b10001 + 0o136) + chr(2242 - 2191) + chr(282 - 234) + chr(0b100 + 0o54), 19691 - 19683), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + chr(50) + '\064' + chr(0b1010 + 0o54), 61544 - 61536), nzTpIcepk0o8(chr(1502 - 1454) + chr(111) + chr(51) + '\067' + chr(52), 0b1000), nzTpIcepk0o8(chr(637 - 589) + '\x6f' + chr(51) + chr(943 - 892) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1101111) + chr(0b110010) + chr(0b1110 + 0o46) + '\065', 8), nzTpIcepk0o8(chr(239 - 191) + chr(0b1101111) + chr(0b1101 + 0o45) + '\x35' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b1101111) + '\x31' + chr(0b110111) + chr(139 - 87), 0o10), nzTpIcepk0o8(chr(1415 - 1367) + '\x6f' + chr(49) + chr(0b100001 + 0o25) + '\x32', 8), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b101000 + 0o107) + '\062' + chr(0b110001) + chr(52), 0o10), nzTpIcepk0o8(chr(0b11 + 0o55) + '\x6f' + chr(0b110101) + chr(0b100110 + 0o21), 44028 - 44020), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1100 + 0o45) + chr(0b110111) + chr(254 - 205), 0o10), nzTpIcepk0o8(chr(1150 - 1102) + chr(0b1011001 + 0o26) + chr(589 - 538) + chr(89 - 34) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(1319 - 1271) + chr(111) + '\x32' + chr(0b101011 + 0o6) + chr(0b0 + 0o62), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1618 - 1570) + chr(111) + chr(0b11100 + 0o31) + '\060', 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(99) + chr(4439 - 4328) + chr(0b100011 + 0o101) + chr(0b111001 + 0o54))('\165' + chr(0b1110100) + chr(0b1100100 + 0o2) + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def oClt1iVDbhHa(kIMfkyypPTcC, _pSYqrosNb95, **n_DqV9fOWrXc): LZIWTkCUj7XZ = {roI3spqORKae(ES5oEprVxulp(b'\x1fm\x1f6'), chr(0b11100 + 0o110) + '\x65' + chr(0b1100011) + '\x6f' + chr(100) + chr(101))(chr(0b100001 + 0o124) + chr(0b101110 + 0o106) + '\x66' + '\055' + chr(0b1111 + 0o51)): roI3spqORKae(ES5oEprVxulp(b'\x05'), chr(0b1100100) + '\x65' + chr(0b10111 + 0o114) + '\x6f' + chr(0b1100100) + '\x65')('\x75' + chr(0b11010 + 0o132) + chr(102) + chr(0b1101 + 0o40) + '\070')} if VaX0prbdxKHB: LZIWTkCUj7XZ[roI3spqORKae(ES5oEprVxulp(b'\x17l\x18<\xcd\xd5Rv'), chr(7478 - 7378) + chr(101) + chr(0b1100011) + chr(111) + chr(8521 - 8421) + '\x65')(chr(4851 - 4734) + '\164' + chr(102) + chr(0b101101) + '\070')] = roI3spqORKae(ES5oEprVxulp(b'\x07v\x1d~\x91'), chr(3213 - 3113) + chr(0b1100101) + chr(99) + '\157' + '\x64' + chr(0b1100101))(chr(3194 - 3077) + '\x74' + '\x66' + '\x2d' + '\070') if roI3spqORKae(n_DqV9fOWrXc, roI3spqORKae(ES5oEprVxulp(b'5W06\xdd\xc9\x08i\nI\x9a\xf0'), chr(6797 - 6697) + chr(101) + chr(0b1100011) + chr(197 - 86) + '\x64' + chr(0b1100 + 0o131))(chr(12870 - 12753) + chr(116) + chr(0b1100110) + '\x2d' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\x1bl\x1f6\xc7\xc8'), chr(1814 - 1714) + chr(101) + chr(1482 - 1383) + chr(5660 - 5549) + chr(0b1000 + 0o134) + '\145')(chr(0b110 + 0o157) + chr(116) + chr(0b111011 + 0o53) + chr(0b101101 + 0o0) + chr(56))) and roI3spqORKae(n_DqV9fOWrXc, roI3spqORKae(ES5oEprVxulp(b'5W06\xdd\xc9\x08i\nI\x9a\xf0'), chr(8071 - 7971) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(100) + '\x65')(chr(1866 - 1749) + '\164' + chr(3820 - 3718) + chr(45) + chr(669 - 613)))(roI3spqORKae(ES5oEprVxulp(b'\x01g\x0b2\xdb\xddH~\x19}'), chr(100) + '\145' + chr(0b101101 + 0o66) + chr(0b11111 + 0o120) + chr(0b1100100) + '\145')('\x75' + chr(0b100111 + 0o115) + chr(0b100101 + 0o101) + chr(0b10001 + 0o34) + chr(56))) is None: n_DqV9fOWrXc[roI3spqORKae(ES5oEprVxulp(b'\x01g\x0b2\xdb\xddH~\x19}'), chr(0b1100001 + 0o3) + chr(0b1100101) + '\x63' + chr(6658 - 6547) + chr(100) + chr(0b1100101))(chr(8836 - 8719) + '\164' + chr(0b1100110) + chr(45) + chr(0b111000))] = (roI3spqORKae(ES5oEprVxulp(b'^'), '\x64' + chr(0b11010 + 0o113) + chr(99) + '\157' + chr(0b1100100) + chr(0b1100101))(chr(11620 - 11503) + chr(5065 - 4949) + chr(0b1100110) + '\055' + chr(0b111 + 0o61)), roI3spqORKae(ES5oEprVxulp(b'H"'), '\x64' + chr(0b1100101) + chr(8803 - 8704) + chr(111) + '\x64' + chr(0b10010 + 0o123))(chr(0b1010000 + 0o45) + chr(116) + '\146' + chr(802 - 757) + '\070')) with DnU3Rq9N5ala(N9zlRy29S1SS(_pSYqrosNb95), **LZIWTkCUj7XZ) as KhXPEIWBXQzE: return roI3spqORKae(LNUKEwZDIbyb, roI3spqORKae(ES5oEprVxulp(b'\x16w\x16#'), chr(100) + chr(101) + chr(0b1100011) + chr(0b100010 + 0o115) + chr(4053 - 3953) + chr(0b1100101))(chr(0b1100100 + 0o21) + '\x74' + chr(0b1001101 + 0o31) + chr(123 - 78) + chr(2311 - 2255)))(kIMfkyypPTcC, KhXPEIWBXQzE, **n_DqV9fOWrXc)
clld/clldutils
src/clldutils/jsonlib.py
load
def load(path, **kw): """python 2 + 3 compatible version of json.load. :param kw: Keyword parameters are passed to json.load :return: The python object read from path. """ _kw = {} if PY3: # pragma: no cover _kw['encoding'] = 'utf-8' with open(str(path), **_kw) as fp: return json.load(fp, **kw)
python
def load(path, **kw): """python 2 + 3 compatible version of json.load. :param kw: Keyword parameters are passed to json.load :return: The python object read from path. """ _kw = {} if PY3: # pragma: no cover _kw['encoding'] = 'utf-8' with open(str(path), **_kw) as fp: return json.load(fp, **kw)
[ "def", "load", "(", "path", ",", "*", "*", "kw", ")", ":", "_kw", "=", "{", "}", "if", "PY3", ":", "# pragma: no cover", "_kw", "[", "'encoding'", "]", "=", "'utf-8'", "with", "open", "(", "str", "(", "path", ")", ",", "*", "*", "_kw", ")", "as", "fp", ":", "return", "json", ".", "load", "(", "fp", ",", "*", "*", "kw", ")" ]
python 2 + 3 compatible version of json.load. :param kw: Keyword parameters are passed to json.load :return: The python object read from path.
[ "python", "2", "+", "3", "compatible", "version", "of", "json", ".", "load", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/jsonlib.py#L56-L66
train
Python 2 + 3 compatible version of json. load.
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,JD7LadPikpP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Lg8O5zPT,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(928 - 817) + '\066' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(936 - 888) + chr(111) + chr(0b110011) + '\x35' + chr(0b11101 + 0o23), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(2280 - 2229) + chr(65 - 12) + chr(0b1011 + 0o45), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1760 - 1711) + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + chr(8421 - 8310) + '\061' + chr(2102 - 2054) + chr(0b10011 + 0o41), 15388 - 15380), nzTpIcepk0o8('\060' + chr(0b101010 + 0o105) + chr(0b11110 + 0o25) + chr(0b1101 + 0o50) + chr(2100 - 2048), ord("\x08")), nzTpIcepk0o8(chr(703 - 655) + chr(3438 - 3327) + chr(0b110011) + chr(2363 - 2311) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(53) + chr(51), 33468 - 33460), nzTpIcepk0o8(chr(48) + chr(2810 - 2699) + chr(0b110001) + chr(53), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(55) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + chr(0b100111 + 0o16) + chr(0b10111 + 0o33), 1103 - 1095), nzTpIcepk0o8(chr(48) + '\157' + chr(0b10101 + 0o35) + '\x37' + chr(1760 - 1712), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + '\064' + chr(242 - 192), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(1344 - 1233) + chr(49), 21715 - 21707), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + chr(691 - 641) + chr(0b101101 + 0o12) + '\062', 0b1000), nzTpIcepk0o8(chr(1932 - 1884) + chr(0b1101111) + chr(0b110001) + chr(1375 - 1323) + chr(0b101100 + 0o12), 0o10), nzTpIcepk0o8(chr(1209 - 1161) + chr(111) + '\x36' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\157' + chr(0b11011 + 0o30) + chr(50) + chr(55), 0b1000), nzTpIcepk0o8('\060' + chr(11503 - 11392) + chr(0b1101 + 0o44) + chr(55) + '\063', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(266 - 216) + '\065' + chr(53), 29243 - 29235), nzTpIcepk0o8(chr(2128 - 2080) + chr(1315 - 1204) + '\x32' + '\063', 57283 - 57275), nzTpIcepk0o8(chr(48) + '\157' + chr(795 - 746) + '\x35', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(917 - 868) + chr(0b11000 + 0o31), 0b1000), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b11111 + 0o120) + chr(0b110011) + chr(54) + chr(1423 - 1372), 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\x6f' + '\061' + '\x31' + chr(0b10111 + 0o31), 2918 - 2910), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + chr(736 - 685) + chr(0b110010) + '\064', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11101 + 0o24) + '\064', 0o10), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\157' + '\x32' + chr(0b110010) + '\065', 65216 - 65208), nzTpIcepk0o8(chr(0b10 + 0o56) + '\x6f' + chr(793 - 742) + '\061' + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(701 - 650) + chr(53) + chr(605 - 556), 0o10), nzTpIcepk0o8('\x30' + chr(0b110101 + 0o72) + '\061' + '\x33' + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011101 + 0o22) + chr(2290 - 2241) + '\x31' + '\064', 20753 - 20745), nzTpIcepk0o8(chr(48) + '\x6f' + '\x34' + chr(0b110011), 12214 - 12206), nzTpIcepk0o8('\x30' + chr(6986 - 6875) + chr(936 - 887) + '\062' + '\064', 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b11101 + 0o26) + '\x36' + '\x33', 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(54) + '\x37', 53891 - 53883), nzTpIcepk0o8('\x30' + chr(111) + '\061' + '\x36', 8), nzTpIcepk0o8(chr(1720 - 1672) + chr(0b1101100 + 0o3) + chr(0b110001) + chr(0b101 + 0o56) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + chr(0b10 + 0o57) + chr(48) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + chr(4280 - 4169) + chr(0b111 + 0o57) + chr(984 - 932), 65292 - 65284)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(6894 - 6783) + chr(433 - 380) + chr(0b110000), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x19'), chr(100) + chr(101) + '\x63' + chr(111) + chr(0b1100100) + chr(3167 - 3066))('\x75' + '\x74' + '\x66' + chr(0b11101 + 0o20) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ZERsdc7c1d8E(_pSYqrosNb95, **n_DqV9fOWrXc): x_6yiIrXefQd = {} if VaX0prbdxKHB: x_6yiIrXefQd[roI3spqORKae(ES5oEprVxulp(b'R\x86\x8ba \x85\x8aL'), chr(8069 - 7969) + chr(1339 - 1238) + chr(99) + chr(111) + chr(0b1010 + 0o132) + chr(8589 - 8488))('\165' + chr(0b110101 + 0o77) + chr(0b1100110) + chr(45) + '\x38')] = roI3spqORKae(ES5oEprVxulp(b'B\x9c\x8e#|'), chr(0b110001 + 0o63) + chr(5228 - 5127) + '\143' + '\x6f' + chr(0b1100100) + '\x65')(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(0b101101) + chr(0b11001 + 0o37)) with DnU3Rq9N5ala(N9zlRy29S1SS(_pSYqrosNb95), **x_6yiIrXefQd) as KhXPEIWBXQzE: return roI3spqORKae(LNUKEwZDIbyb, roI3spqORKae(ES5oEprVxulp(b'm\xad\xba} \x8f\xd3H<\x99\x92\xfd'), chr(0b1100100) + chr(0b10 + 0o143) + chr(0b1001011 + 0o30) + '\x6f' + chr(2168 - 2068) + chr(0b110 + 0o137))(chr(117) + chr(0b1110100 + 0o0) + '\x66' + chr(45) + chr(56)))(KhXPEIWBXQzE, **n_DqV9fOWrXc)
clld/clldutils
src/clldutils/text.py
strip_brackets
def strip_brackets(text, brackets=None): """Strip brackets and what is inside brackets from text. .. note:: If the text contains only one opening bracket, the rest of the text will be ignored. This is a feature, not a bug, as we want to avoid that this function raises errors too easily. """ res = [] for c, type_ in _tokens(text, brackets=brackets): if type_ == TextType.text: res.append(c) return ''.join(res).strip()
python
def strip_brackets(text, brackets=None): """Strip brackets and what is inside brackets from text. .. note:: If the text contains only one opening bracket, the rest of the text will be ignored. This is a feature, not a bug, as we want to avoid that this function raises errors too easily. """ res = [] for c, type_ in _tokens(text, brackets=brackets): if type_ == TextType.text: res.append(c) return ''.join(res).strip()
[ "def", "strip_brackets", "(", "text", ",", "brackets", "=", "None", ")", ":", "res", "=", "[", "]", "for", "c", ",", "type_", "in", "_tokens", "(", "text", ",", "brackets", "=", "brackets", ")", ":", "if", "type_", "==", "TextType", ".", "text", ":", "res", ".", "append", "(", "c", ")", "return", "''", ".", "join", "(", "res", ")", ".", "strip", "(", ")" ]
Strip brackets and what is inside brackets from text. .. note:: If the text contains only one opening bracket, the rest of the text will be ignored. This is a feature, not a bug, as we want to avoid that this function raises errors too easily.
[ "Strip", "brackets", "and", "what", "is", "inside", "brackets", "from", "text", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/text.py#L56-L68
train
Strip brackets and what is inside brackets from 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,DB9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cCpS6dh4OT,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(1016 - 968) + chr(111) + chr(0b110011) + chr(0b110100) + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100110 + 0o15) + chr(2059 - 2006) + chr(0b10010 + 0o43), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1339 - 1290) + chr(0b110011 + 0o4) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(1012 - 964) + chr(4537 - 4426) + chr(1422 - 1370) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(1240 - 1190) + chr(51), 62932 - 62924), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + chr(0b11110 + 0o25) + chr(0b101110 + 0o2) + chr(2232 - 2178), 0o10), nzTpIcepk0o8(chr(1331 - 1283) + chr(0b100 + 0o153) + chr(3014 - 2959) + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b111011 + 0o64) + chr(0b101011 + 0o7) + chr(1648 - 1599) + chr(0b110001), 60367 - 60359), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b100011 + 0o22), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b100 + 0o57) + chr(0b11000 + 0o37) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(49), 42789 - 42781), nzTpIcepk0o8('\x30' + chr(0b111111 + 0o60) + '\061' + chr(0b100110 + 0o13) + '\065', 15309 - 15301), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2111 - 2061) + chr(0b110000) + chr(54), 23271 - 23263), nzTpIcepk0o8(chr(1438 - 1390) + '\157' + chr(51) + chr(0b101010 + 0o13) + '\x31', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111 + 0o0) + chr(847 - 798) + '\066' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(1926 - 1876) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + chr(1264 - 1153) + chr(0b110010) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + chr(365 - 312) + chr(1618 - 1569), 0b1000), nzTpIcepk0o8(chr(260 - 212) + '\157' + chr(2201 - 2152) + chr(0b11 + 0o60) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + '\061', 0o10), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b1101111) + '\x32' + chr(48) + chr(0b110111), 46618 - 46610), nzTpIcepk0o8(chr(0b110000) + chr(2324 - 2213) + chr(0b100010 + 0o20) + chr(0b110011) + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10101 + 0o36) + '\x37' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1001111 + 0o40) + '\x33' + chr(0b11111 + 0o21) + chr(52), 0o10), nzTpIcepk0o8(chr(48) + chr(0b100110 + 0o111) + '\064' + '\065', ord("\x08")), nzTpIcepk0o8(chr(244 - 196) + '\157' + '\x33' + '\x34' + chr(0b10101 + 0o40), 0o10), nzTpIcepk0o8(chr(1894 - 1846) + chr(9838 - 9727) + '\x32' + '\061' + '\062', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(10800 - 10689) + chr(0b110011) + chr(55) + chr(403 - 353), 8), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(0b1111 + 0o44) + chr(0b110011), 56206 - 56198), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(1433 - 1382) + chr(0b1101 + 0o43), 57867 - 57859), nzTpIcepk0o8(chr(1880 - 1832) + chr(0b101110 + 0o101) + chr(1393 - 1343) + chr(0b110001) + chr(0b110000 + 0o2), 8), nzTpIcepk0o8(chr(48) + chr(0b101100 + 0o103) + chr(0b110111) + chr(2176 - 2125), 17463 - 17455), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(0b110001) + '\061', 8), nzTpIcepk0o8('\060' + '\x6f' + chr(2570 - 2519) + chr(1378 - 1327) + '\063', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + chr(2075 - 2027) + chr(0b101110 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(8168 - 8057) + '\062' + chr(49) + chr(0b110001), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + '\x30', 0b1000), nzTpIcepk0o8(chr(398 - 350) + '\x6f' + '\x37' + '\066', 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + '\x30' + chr(0b11011 + 0o31), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b10 + 0o155) + chr(49) + chr(1921 - 1869) + chr(0b110000 + 0o1), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b101 + 0o152) + 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'\xc9'), '\144' + '\x65' + chr(0b1000 + 0o133) + chr(3552 - 3441) + '\144' + chr(4948 - 4847))(chr(0b1110101) + chr(0b1010101 + 0o37) + '\x66' + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def cqJ1MDJpM12d(cpStk7cY1TJd, avZFNngE1HT4=None): _XdQFJpnzJor = [] for (teUmM7cKWZUa, aPbOqK56cePj) in Xf60sIBUksPN(cpStk7cY1TJd, brackets=avZFNngE1HT4): if aPbOqK56cePj == roI3spqORKae(Ut1SQaJ9L2gd, roI3spqORKae(ES5oEprVxulp(b'\x84\x9d.S\xf8\xf1]\xd0,\xaaS)'), '\x64' + '\x65' + chr(0b10111 + 0o114) + chr(0b100101 + 0o112) + chr(8046 - 7946) + chr(0b1100101))(chr(0b1110101) + chr(10152 - 10036) + '\146' + chr(0b11001 + 0o24) + chr(56))): roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b'\xaf\xb9.\x13\xeb\xa1y\xe6w\x91Lx'), chr(6806 - 6706) + chr(1582 - 1481) + '\143' + '\x6f' + chr(6140 - 6040) + chr(101))('\165' + chr(0b1110100) + '\146' + chr(45) + chr(0b111000)))(teUmM7cKWZUa) return roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b''), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(111) + '\x64' + chr(0b1100101))(chr(0b100100 + 0o121) + chr(0b1110100) + chr(2920 - 2818) + chr(1494 - 1449) + chr(56)).join(_XdQFJpnzJor), roI3spqORKae(ES5oEprVxulp(b'\x8c\x894c\xe1\xa5I\xd3I\xbdjx'), chr(2876 - 2776) + chr(0b1100101) + '\143' + chr(0b1101111) + chr(7239 - 7139) + '\x65')(chr(0b1101 + 0o150) + chr(4572 - 4456) + chr(0b1100110) + chr(0b101101) + chr(136 - 80)))()
clld/clldutils
src/clldutils/text.py
split_text_with_context
def split_text_with_context(text, separators=WHITESPACE, brackets=None): """Splits text at separators outside of brackets. :param text: :param separators: An iterable of single character tokens. :param brackets: :return: A `list` of non-empty chunks. .. note:: This function leaves content in brackets in the chunks. """ res, chunk = [], [] for c, type_ in _tokens(text, brackets=brackets): if type_ == TextType.text and c in separators: res.append(''.join(chunk).strip()) chunk = [] else: chunk.append(c) res.append(''.join(chunk).strip()) return nfilter(res)
python
def split_text_with_context(text, separators=WHITESPACE, brackets=None): """Splits text at separators outside of brackets. :param text: :param separators: An iterable of single character tokens. :param brackets: :return: A `list` of non-empty chunks. .. note:: This function leaves content in brackets in the chunks. """ res, chunk = [], [] for c, type_ in _tokens(text, brackets=brackets): if type_ == TextType.text and c in separators: res.append(''.join(chunk).strip()) chunk = [] else: chunk.append(c) res.append(''.join(chunk).strip()) return nfilter(res)
[ "def", "split_text_with_context", "(", "text", ",", "separators", "=", "WHITESPACE", ",", "brackets", "=", "None", ")", ":", "res", ",", "chunk", "=", "[", "]", ",", "[", "]", "for", "c", ",", "type_", "in", "_tokens", "(", "text", ",", "brackets", "=", "brackets", ")", ":", "if", "type_", "==", "TextType", ".", "text", "and", "c", "in", "separators", ":", "res", ".", "append", "(", "''", ".", "join", "(", "chunk", ")", ".", "strip", "(", ")", ")", "chunk", "=", "[", "]", "else", ":", "chunk", ".", "append", "(", "c", ")", "res", ".", "append", "(", "''", ".", "join", "(", "chunk", ")", ".", "strip", "(", ")", ")", "return", "nfilter", "(", "res", ")" ]
Splits text at separators outside of brackets. :param text: :param separators: An iterable of single character tokens. :param brackets: :return: A `list` of non-empty chunks. .. note:: This function leaves content in brackets in the chunks.
[ "Splits", "text", "at", "separators", "outside", "of", "brackets", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/text.py#L71-L89
train
Splits text at separators outside of brackets.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y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QS9e6tJqMV,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' + '\157' + chr(1974 - 1924) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + '\x6f' + chr(0b1000 + 0o53) + chr(48) + chr(0b10111 + 0o33), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(0b1101 + 0o43) + chr(0b11101 + 0o25), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\063' + '\x37', 0o10), nzTpIcepk0o8('\x30' + chr(0b11000 + 0o127) + chr(0b110011) + '\x30' + '\x36', 0b1000), nzTpIcepk0o8(chr(1372 - 1324) + '\157' + chr(51) + chr(217 - 168) + '\061', 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(48) + chr(0b1000 + 0o53), 0b1000), nzTpIcepk0o8(chr(2207 - 2159) + chr(0b1101111) + '\x32' + '\x35', 8), nzTpIcepk0o8(chr(48) + chr(2121 - 2010) + chr(0b100011 + 0o20) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(643 - 595) + '\x6f' + chr(1965 - 1915) + chr(0b11101 + 0o23) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b101001 + 0o106) + chr(0b101010 + 0o10) + chr(53) + chr(2903 - 2849), 0o10), nzTpIcepk0o8(chr(48) + chr(4774 - 4663) + chr(2276 - 2227) + chr(53) + chr(0b110101), 52773 - 52765), nzTpIcepk0o8(chr(48) + chr(0b1001010 + 0o45) + '\x32' + '\065' + chr(0b1001 + 0o56), 0o10), nzTpIcepk0o8(chr(48) + chr(2077 - 1966) + chr(50) + '\066' + '\062', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + '\x32' + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b110010) + '\x36', 34990 - 34982), nzTpIcepk0o8(chr(48) + chr(0b1001100 + 0o43) + chr(0b101110 + 0o3) + chr(2638 - 2583) + chr(52), 48240 - 48232), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(0b110110) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(1181 - 1127) + chr(0b110011), 4859 - 4851), nzTpIcepk0o8('\x30' + chr(0b111111 + 0o60) + chr(0b110011) + chr(0b11010 + 0o26) + chr(53), 0o10), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + '\x33' + chr(1374 - 1321) + chr(54), 15195 - 15187), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1101111) + chr(0b101001 + 0o10) + chr(0b1101 + 0o45) + '\065', 3280 - 3272), nzTpIcepk0o8(chr(48) + chr(111) + chr(555 - 505) + '\067' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(582 - 531) + chr(1193 - 1138) + chr(0b101010 + 0o10), ord("\x08")), nzTpIcepk0o8(chr(1831 - 1783) + chr(0b1010100 + 0o33) + chr(0b110010 + 0o2) + chr(0b101011 + 0o5), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(6511 - 6400) + chr(2425 - 2374) + '\x32' + chr(759 - 709), 0o10), nzTpIcepk0o8(chr(869 - 821) + chr(0b111001 + 0o66) + chr(0b110111) + chr(517 - 468), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b1101 + 0o50) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b101001 + 0o106) + chr(0b110011) + chr(201 - 150) + chr(2572 - 2519), 18389 - 18381), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + chr(0b1100 + 0o46) + chr(0b10011 + 0o35) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + chr(1620 - 1569) + '\x31' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(2062 - 2014) + chr(6375 - 6264) + chr(0b10000 + 0o41) + chr(1619 - 1571) + '\x31', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(342 - 289) + chr(0b110010), 10915 - 10907), nzTpIcepk0o8(chr(2126 - 2078) + '\157' + chr(0b1101 + 0o44) + chr(0b110100) + chr(0b10101 + 0o36), 0b1000), nzTpIcepk0o8('\x30' + chr(9533 - 9422) + chr(0b110010) + '\065' + '\x36', 8), nzTpIcepk0o8('\x30' + '\157' + chr(54) + chr(0b11111 + 0o30), 14515 - 14507), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + chr(0b11110 + 0o25) + chr(0b110100) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(111) + '\x33' + chr(0b1100 + 0o44) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101100 + 0o3) + chr(0b110011) + '\x31' + chr(50), 8), nzTpIcepk0o8(chr(848 - 800) + '\x6f' + chr(0b111 + 0o52) + '\x37', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1000101 + 0o52) + '\x35' + '\060', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b';'), chr(2551 - 2451) + chr(0b1100101) + chr(0b1100011) + chr(8117 - 8006) + '\x64' + '\x65')('\165' + '\x74' + chr(0b1101 + 0o131) + chr(0b101101) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def BYtslfb2KuqA(cpStk7cY1TJd, dP0ydIsnFIok=kXHrAH5iXKhc, avZFNngE1HT4=None): (_XdQFJpnzJor, WckxBx1Uqdpm) = ([], []) for (teUmM7cKWZUa, aPbOqK56cePj) in Xf60sIBUksPN(cpStk7cY1TJd, brackets=avZFNngE1HT4): if aPbOqK56cePj == roI3spqORKae(Ut1SQaJ9L2gd, roI3spqORKae(ES5oEprVxulp(b'v\xb2\x11k\xad\xfe\xa0L+\xd2\xe4\t'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(0b111111 + 0o60) + '\144' + chr(101))(chr(8135 - 8018) + '\x74' + chr(102) + chr(0b101101) + chr(56))) and teUmM7cKWZUa in dP0ydIsnFIok: roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b']\x96\x11+\xbe\xae\x84zp\xe9\xfbX'), chr(100) + '\145' + chr(0b100100 + 0o77) + chr(0b1101111) + '\x64' + '\x65')('\165' + chr(0b1110100) + chr(102) + chr(271 - 226) + '\070'))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b''), chr(0b101101 + 0o67) + chr(101) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(101))(chr(0b1101 + 0o150) + '\164' + '\x66' + '\x2d' + '\x38').join(WckxBx1Uqdpm), roI3spqORKae(ES5oEprVxulp(b'~\xa6\x0b[\xb4\xaa\xb4ON\xc5\xddX'), chr(0b1100100) + chr(3623 - 3522) + chr(99) + chr(0b1101111) + '\144' + chr(5543 - 5442))(chr(0b11100 + 0o131) + chr(116) + chr(0b1100110) + chr(0b101101) + chr(0b111000)))()) WckxBx1Uqdpm = [] else: roI3spqORKae(WckxBx1Uqdpm, roI3spqORKae(ES5oEprVxulp(b']\x96\x11+\xbe\xae\x84zp\xe9\xfbX'), chr(3394 - 3294) + chr(0b1010111 + 0o16) + chr(4865 - 4766) + chr(0b110 + 0o151) + chr(100) + chr(0b100000 + 0o105))(chr(7205 - 7088) + '\164' + chr(0b111 + 0o137) + chr(0b101101) + chr(56)))(teUmM7cKWZUa) roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b']\x96\x11+\xbe\xae\x84zp\xe9\xfbX'), chr(8383 - 8283) + chr(101) + chr(0b1100011) + chr(111) + '\144' + chr(0b1000010 + 0o43))(chr(0b1110101) + chr(116) + '\146' + chr(0b101101) + '\070'))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b''), chr(0b1011100 + 0o10) + chr(101) + chr(0b1100011) + chr(111) + chr(0b1100100) + '\145')(chr(117) + chr(12201 - 12085) + chr(0b1100001 + 0o5) + chr(45) + chr(0b1011 + 0o55)).join(WckxBx1Uqdpm), roI3spqORKae(ES5oEprVxulp(b'~\xa6\x0b[\xb4\xaa\xb4ON\xc5\xddX'), chr(1687 - 1587) + '\145' + '\143' + chr(111) + '\144' + chr(0b1011111 + 0o6))('\x75' + chr(12252 - 12136) + '\x66' + chr(142 - 97) + chr(0b111000)))()) return Shf9hBcsJHlB(_XdQFJpnzJor)
clld/clldutils
src/clldutils/text.py
split_text
def split_text(text, separators=re.compile('\s'), brackets=None, strip=False): """Split text along the separators unless they appear within brackets. :param separators: An iterable single characters or a compiled regex pattern. :param brackets: `dict` mapping start tokens to end tokens of what is to be \ recognized as brackets. .. note:: This function will also strip content within brackets. """ if not isinstance(separators, PATTERN_TYPE): separators = re.compile( '[{0}]'.format(''.join('\{0}'.format(c) for c in separators))) return nfilter( s.strip() if strip else s for s in separators.split(strip_brackets(text, brackets=brackets)))
python
def split_text(text, separators=re.compile('\s'), brackets=None, strip=False): """Split text along the separators unless they appear within brackets. :param separators: An iterable single characters or a compiled regex pattern. :param brackets: `dict` mapping start tokens to end tokens of what is to be \ recognized as brackets. .. note:: This function will also strip content within brackets. """ if not isinstance(separators, PATTERN_TYPE): separators = re.compile( '[{0}]'.format(''.join('\{0}'.format(c) for c in separators))) return nfilter( s.strip() if strip else s for s in separators.split(strip_brackets(text, brackets=brackets)))
[ "def", "split_text", "(", "text", ",", "separators", "=", "re", ".", "compile", "(", "'\\s'", ")", ",", "brackets", "=", "None", ",", "strip", "=", "False", ")", ":", "if", "not", "isinstance", "(", "separators", ",", "PATTERN_TYPE", ")", ":", "separators", "=", "re", ".", "compile", "(", "'[{0}]'", ".", "format", "(", "''", ".", "join", "(", "'\\{0}'", ".", "format", "(", "c", ")", "for", "c", "in", "separators", ")", ")", ")", "return", "nfilter", "(", "s", ".", "strip", "(", ")", "if", "strip", "else", "s", "for", "s", "in", "separators", ".", "split", "(", "strip_brackets", "(", "text", ",", "brackets", "=", "brackets", ")", ")", ")" ]
Split text along the separators unless they appear within brackets. :param separators: An iterable single characters or a compiled regex pattern. :param brackets: `dict` mapping start tokens to end tokens of what is to be \ recognized as brackets. .. note:: This function will also strip content within brackets.
[ "Split", "text", "along", "the", "separators", "unless", "they", "appear", "within", "brackets", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6c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eqQiUoqWT,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(0b101101 + 0o5) + '\065' + chr(0b100000 + 0o26), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(10533 - 10422) + chr(0b110100) + chr(1644 - 1590), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(0b101000 + 0o16) + chr(53), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(397 - 347) + chr(0b1111 + 0o47) + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(307 - 256) + chr(0b100110 + 0o12) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(9524 - 9413) + chr(51) + chr(1935 - 1887) + chr(738 - 686), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + chr(0b110010) + '\x30', 32288 - 32280), nzTpIcepk0o8(chr(1169 - 1121) + '\157' + chr(1890 - 1838) + chr(55), 41945 - 41937), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(111) + chr(0b110011) + chr(0b110100 + 0o1), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(0b100001 + 0o21) + '\x30', 8), nzTpIcepk0o8(chr(2117 - 2069) + chr(4158 - 4047) + chr(0b110001) + '\061' + '\x35', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(2879 - 2825) + chr(878 - 826), 44674 - 44666), nzTpIcepk0o8(chr(1716 - 1668) + '\x6f' + chr(0b110001) + chr(0b110011) + '\065', 51087 - 51079), nzTpIcepk0o8('\060' + chr(0b11100 + 0o123) + '\x36' + chr(0b110010), 28800 - 28792), nzTpIcepk0o8('\060' + chr(0b11011 + 0o124) + '\x33' + '\065' + chr(0b101110 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b10101 + 0o36) + '\x34' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(849 - 801) + chr(0b1101111) + chr(0b110011) + '\x34' + chr(54), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(48) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100000 + 0o22) + chr(976 - 925) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50), 0o10), nzTpIcepk0o8(chr(1219 - 1171) + chr(8906 - 8795) + chr(215 - 165) + '\064' + chr(0b101111 + 0o10), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2362 - 2312) + chr(2467 - 2417) + chr(52), 59113 - 59105), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(0b110011 + 0o3) + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + '\062' + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(0b11010 + 0o34) + '\065', 57084 - 57076), nzTpIcepk0o8('\060' + '\157' + chr(53) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(1627 - 1579) + chr(111) + chr(0b10100 + 0o35) + chr(1874 - 1825) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(55) + chr(0b101110 + 0o10), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1011111 + 0o20) + chr(0b110011) + chr(0b110011 + 0o0) + chr(2823 - 2769), 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\157' + '\x32' + '\066' + chr(0b110100), 8), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b1101111) + chr(1741 - 1688) + chr(98 - 50), 62581 - 62573), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + '\061' + chr(52), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(671 - 620) + chr(0b110011), 23733 - 23725), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1509 - 1454) + '\065', 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + '\061' + chr(52) + '\067', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(0b110110) + chr(1100 - 1051), 8), nzTpIcepk0o8(chr(0b1110 + 0o42) + '\x6f' + chr(0b110011) + '\x36' + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + '\x32' + chr(51), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1011 + 0o52) + chr(0b10010 + 0o36), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x80'), '\144' + chr(101) + '\143' + chr(1528 - 1417) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(0b1100101 + 0o17) + chr(9895 - 9793) + chr(45) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Uv6txmSGU5mj(cpStk7cY1TJd, dP0ydIsnFIok=roI3spqORKae(aoTc4YA2bs2R, roI3spqORKae(ES5oEprVxulp(b'\xcdI\x98\xc7\xaa|\xa1'), '\x64' + chr(4519 - 4418) + chr(0b1100011) + chr(111) + chr(0b1011110 + 0o6) + chr(101))(chr(2274 - 2157) + chr(2376 - 2260) + chr(102) + chr(1039 - 994) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xf2U'), chr(0b1100100) + '\x65' + chr(8097 - 7998) + '\157' + chr(0b1100100) + chr(0b111000 + 0o55))('\165' + chr(0b1110100) + chr(5330 - 5228) + '\055' + chr(56))), avZFNngE1HT4=None, kdIDrcwZTCs5=nzTpIcepk0o8('\x30' + chr(111) + chr(967 - 919), 40782 - 40774)): if not suIjIS24Zkqw(dP0ydIsnFIok, z13BRBem5ANn): dP0ydIsnFIok = aoTc4YA2bs2R.compile(roI3spqORKae(ES5oEprVxulp(b'\xf5]\xc5\xca\x9e'), chr(0b1001000 + 0o34) + chr(101) + chr(99) + chr(111) + chr(5224 - 5124) + chr(7292 - 7191))('\165' + '\x74' + chr(102) + chr(45) + '\070').q33KG3foQ_CJ(roI3spqORKae(ES5oEprVxulp(b''), chr(100) + '\x65' + '\143' + chr(0b1101111) + '\144' + '\145')(chr(117) + chr(1880 - 1764) + chr(102) + chr(45) + chr(0b111000)).Y4yM9BcfTCNq((roI3spqORKae(ES5oEprVxulp(b'\xf2]\xc5\xca'), chr(0b1000000 + 0o44) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + '\144' + chr(0b1011111 + 0o6))(chr(0b1110101) + '\x74' + chr(0b1011100 + 0o12) + chr(0b101000 + 0o5) + chr(468 - 412)).q33KG3foQ_CJ(teUmM7cKWZUa) for teUmM7cKWZUa in dP0ydIsnFIok)))) return Shf9hBcsJHlB((roI3spqORKae(PmE5_h409JAA, roI3spqORKae(ES5oEprVxulp(b'\xc5B\xbc\xf3\xb1s\xb3\ns^#x'), '\144' + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(8154 - 8054) + chr(0b1001000 + 0o35))(chr(0b1001 + 0o154) + '\x74' + '\x66' + '\x2d' + '\x38'))() if kdIDrcwZTCs5 else PmE5_h409JAA for PmE5_h409JAA in roI3spqORKae(dP0ydIsnFIok, roI3spqORKae(ES5oEprVxulp(b'\xe2@\xa7\xc5\x92_\xbc%ck>\x0e'), chr(1509 - 1409) + '\145' + chr(0b1100011) + chr(111) + chr(100) + '\x65')(chr(0b1110101) + chr(116) + chr(0b111 + 0o137) + chr(0b101000 + 0o5) + chr(0b111000)))(cqJ1MDJpM12d(cpStk7cY1TJd, brackets=avZFNngE1HT4))))
clld/clldutils
src/clldutils/sfm.py
marker_split
def marker_split(block): """Yield marker, value pairs from a text block (i.e. a list of lines). :param block: text block consisting of \n separated lines as it will be the case for \ files read using "rU" mode. :return: generator of (marker, value) pairs. """ marker = None value = [] for line in block.split('\n'): line = line.strip() if line.startswith('\\_'): continue # we simply ignore SFM header fields match = MARKER_PATTERN.match(line) if match: if marker: yield marker, '\n'.join(value) marker = match.group('marker') value = [line[match.end():]] else: value.append(line) if marker: yield marker, ('\n'.join(value)).strip()
python
def marker_split(block): """Yield marker, value pairs from a text block (i.e. a list of lines). :param block: text block consisting of \n separated lines as it will be the case for \ files read using "rU" mode. :return: generator of (marker, value) pairs. """ marker = None value = [] for line in block.split('\n'): line = line.strip() if line.startswith('\\_'): continue # we simply ignore SFM header fields match = MARKER_PATTERN.match(line) if match: if marker: yield marker, '\n'.join(value) marker = match.group('marker') value = [line[match.end():]] else: value.append(line) if marker: yield marker, ('\n'.join(value)).strip()
[ "def", "marker_split", "(", "block", ")", ":", "marker", "=", "None", "value", "=", "[", "]", "for", "line", "in", "block", ".", "split", "(", "'\\n'", ")", ":", "line", "=", "line", ".", "strip", "(", ")", "if", "line", ".", "startswith", "(", "'\\\\_'", ")", ":", "continue", "# we simply ignore SFM header fields", "match", "=", "MARKER_PATTERN", ".", "match", "(", "line", ")", "if", "match", ":", "if", "marker", ":", "yield", "marker", ",", "'\\n'", ".", "join", "(", "value", ")", "marker", "=", "match", ".", "group", "(", "'marker'", ")", "value", "=", "[", "line", "[", "match", ".", "end", "(", ")", ":", "]", "]", "else", ":", "value", ".", "append", "(", "line", ")", "if", "marker", ":", "yield", "marker", ",", "(", "'\\n'", ".", "join", "(", "value", ")", ")", ".", "strip", "(", ")" ]
Yield marker, value pairs from a text block (i.e. a list of lines). :param block: text block consisting of \n separated lines as it will be the case for \ files read using "rU" mode. :return: generator of (marker, value) pairs.
[ "Yield", "marker", "value", "pairs", "from", "a", "text", "block", "(", "i", ".", "e", ".", "a", "list", "of", "lines", ")", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/sfm.py#L30-L53
train
Yields marker value pairs from a text block.
GiP5xwVCF98Z,B3LV8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j2=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(0b100111 + 0o11) + '\x6f' + chr(462 - 408) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100110 + 0o20) + chr(0b11010 + 0o33), ord("\x08")), nzTpIcepk0o8(chr(668 - 620) + '\x6f' + chr(0b110111) + '\x32', 64903 - 64895), nzTpIcepk0o8('\060' + chr(0b100100 + 0o113) + chr(0b100110 + 0o13) + '\x36' + chr(50), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b100101 + 0o21) + chr(0b100101 + 0o22), 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(5453 - 5342) + '\063' + chr(0b11 + 0o62) + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b10010 + 0o135) + chr(0b110010) + '\067' + chr(0b110001), 29183 - 29175), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(4320 - 4209) + chr(2318 - 2264) + '\x37', 8), nzTpIcepk0o8(chr(2086 - 2038) + chr(10393 - 10282) + '\x31' + chr(0b101110 + 0o2) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(0b1010 + 0o47) + '\060', 17268 - 17260), nzTpIcepk0o8('\x30' + '\157' + chr(0b101101 + 0o6) + chr(0b111 + 0o54) + chr(0b1100 + 0o50), 37900 - 37892), nzTpIcepk0o8('\060' + '\x6f' + chr(239 - 189) + '\x30' + '\x34', 52553 - 52545), nzTpIcepk0o8('\060' + '\x6f' + '\x37' + chr(48), 0b1000), nzTpIcepk0o8('\060' + chr(12284 - 12173) + '\x31' + chr(0b1000 + 0o55) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(111) + '\063' + chr(0b11111 + 0o30) + chr(55), 4131 - 4123), nzTpIcepk0o8(chr(1699 - 1651) + chr(0b1000110 + 0o51) + chr(0b110001) + chr(0b110110) + chr(1597 - 1549), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(0b110100) + '\065', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100000 + 0o17) + chr(0b11001 + 0o30) + chr(0b11010 + 0o27) + chr(0b110101), 58981 - 58973), nzTpIcepk0o8(chr(1764 - 1716) + '\x6f' + chr(0b101110 + 0o5) + '\x35' + '\066', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\x33' + chr(50), 0o10), nzTpIcepk0o8('\x30' + chr(4085 - 3974) + '\062' + chr(48) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + '\063' + '\067', 41994 - 41986), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(0b100100 + 0o16) + chr(0b11110 + 0o30), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1001000 + 0o47) + chr(0b100110 + 0o17) + chr(48), 0b1000), nzTpIcepk0o8(chr(1593 - 1545) + '\157' + chr(49) + chr(0b110001) + '\063', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(51) + '\063', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b1101 + 0o46) + chr(0b110010) + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(776 - 727) + '\061' + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + '\066' + chr(0b10110 + 0o32), 8), nzTpIcepk0o8(chr(48) + chr(8241 - 8130) + chr(50) + '\062' + '\x36', 8), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101111) + chr(50), 64701 - 64693), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11 + 0o56) + chr(0b110110) + '\x32', 8), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\x6f' + chr(1614 - 1565) + chr(0b110001 + 0o6) + chr(0b110100), 63744 - 63736), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(52) + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b101011 + 0o7) + chr(0b110000 + 0o5) + chr(0b101101 + 0o10), ord("\x08")), nzTpIcepk0o8(chr(495 - 447) + chr(111) + '\x33' + chr(0b11001 + 0o30) + chr(0b110100), 13413 - 13405), nzTpIcepk0o8(chr(48) + '\157' + chr(1596 - 1547) + chr(0b110111) + chr(0b110111), 35672 - 35664), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(50) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x36' + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + chr(12070 - 11959) + chr(50) + '\x36' + '\x32', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100111 + 0o16) + chr(0b0 + 0o60), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1d'), chr(4965 - 4865) + '\145' + '\x63' + '\x6f' + chr(100) + chr(0b1100101))(chr(117) + '\164' + chr(9713 - 9611) + '\055' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def gHgB8_dJQKvB(TvT0D2rIGW5A): uic71ZuNaAED = None uV9iBiw0y_Mp = [] for ffiOpFBWGmZU in roI3spqORKae(TvT0D2rIGW5A, roI3spqORKae(ES5oEprVxulp(b'\x7fSh\x00f\xa7\xc1B\x05\xbe\xb2\xc7'), chr(1262 - 1162) + chr(0b1000101 + 0o40) + '\x63' + chr(5075 - 4964) + chr(5752 - 5652) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(0b1110 + 0o37) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'9'), '\x64' + chr(9820 - 9719) + chr(5417 - 5318) + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(0b1011010 + 0o33) + chr(0b1110100) + '\x66' + '\x2d' + '\x38')): ffiOpFBWGmZU = ffiOpFBWGmZU.kdIDrcwZTCs5() if roI3spqORKae(ffiOpFBWGmZU, roI3spqORKae(ES5oEprVxulp(b'@A[\x00C\x9b\xce^5\xa0'), chr(403 - 303) + chr(5276 - 5175) + '\143' + chr(111) + chr(0b11100 + 0o110) + chr(7992 - 7891))(chr(117) + chr(116) + chr(0b1011011 + 0o13) + chr(0b101101) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'oj'), chr(100) + chr(0b1100101) + chr(0b1100011) + chr(0b1000000 + 0o57) + '\144' + '\x65')('\x75' + chr(10766 - 10650) + chr(102) + chr(0b11 + 0o52) + chr(0b111000))): continue hk9OijmiC_zA = hmUkGtk4zG8z.hk9OijmiC_zA(ffiOpFBWGmZU) if hk9OijmiC_zA: if uic71ZuNaAED: yield (uic71ZuNaAED, roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'9'), chr(100) + chr(101) + '\x63' + chr(0b1011010 + 0o25) + chr(100) + chr(0b1100101 + 0o0))(chr(0b10101 + 0o140) + '\164' + chr(115 - 13) + chr(0b1011 + 0o42) + '\070'), roI3spqORKae(ES5oEprVxulp(b'j\x01C?\x0e\xaa\xdaQ\x15\x8b\x92\xf5'), chr(5893 - 5793) + chr(0b1100101) + '\143' + '\x6f' + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b1110100) + chr(10283 - 10181) + chr(45) + '\070'))(uV9iBiw0y_Mp)) uic71ZuNaAED = hk9OijmiC_zA.F9lJ8RbIonqb(roI3spqORKae(ES5oEprVxulp(b'^TH\x19R\x9a'), chr(0b1011010 + 0o12) + '\x65' + chr(99) + '\157' + '\x64' + '\x65')(chr(0b101101 + 0o110) + '\x74' + chr(6358 - 6256) + chr(1411 - 1366) + '\x38')) uV9iBiw0y_Mp = [ffiOpFBWGmZU[hk9OijmiC_zA.NiWVjAWn0l6T():]] else: roI3spqORKae(uV9iBiw0y_Mp, roI3spqORKae(ES5oEprVxulp(b'{aiFO\x8f\xfeX+\xa7\x89\xb1'), chr(0b1010111 + 0o15) + chr(0b111 + 0o136) + '\x63' + '\157' + '\144' + chr(3912 - 3811))(chr(117) + chr(116) + '\x66' + chr(45) + chr(0b111000)))(ffiOpFBWGmZU) if uic71ZuNaAED: yield (uic71ZuNaAED, roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'9'), chr(0b1100100) + chr(101) + '\x63' + '\x6f' + chr(3408 - 3308) + chr(8560 - 8459))('\x75' + chr(337 - 221) + chr(0b101001 + 0o75) + '\055' + chr(1239 - 1183)).join(uV9iBiw0y_Mp), roI3spqORKae(ES5oEprVxulp(b'XQs6E\x8b\xcem\x15\x8b\xaf\xb1'), chr(0b110111 + 0o55) + '\x65' + '\143' + chr(0b10 + 0o155) + '\x64' + '\x65')(chr(0b100001 + 0o124) + chr(116) + '\146' + chr(0b101 + 0o50) + chr(56)))())
clld/clldutils
src/clldutils/sfm.py
Entry.get
def get(self, key, default=None): """Retrieve the first value for a marker or None.""" for k, v in self: if k == key: return v return default
python
def get(self, key, default=None): """Retrieve the first value for a marker or None.""" for k, v in self: if k == key: return v return default
[ "def", "get", "(", "self", ",", "key", ",", "default", "=", "None", ")", ":", "for", "k", ",", "v", "in", "self", ":", "if", "k", "==", "key", ":", "return", "v", "return", "default" ]
Retrieve the first value for a marker or None.
[ "Retrieve", "the", "first", "value", "for", "a", "marker", "or", "None", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/sfm.py#L71-L76
train
Retrieve the first value for a marker or None.
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,TdYHRT1SB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cznYtBZk6k,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(0b101100 + 0o4) + chr(0b1100000 + 0o17) + chr(0b110010) + chr(0b11111 + 0o27) + chr(1762 - 1712), 21385 - 21377), nzTpIcepk0o8(chr(626 - 578) + chr(8934 - 8823) + chr(51) + chr(0b10101 + 0o42) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(1384 - 1336) + chr(545 - 434) + chr(50) + chr(2297 - 2249) + chr(1385 - 1336), 55195 - 55187), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(0b1 + 0o61) + chr(0b110011), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(54) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(55) + '\x31', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + '\062' + chr(1348 - 1298), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + chr(1278 - 1227) + '\064', ord("\x08")), nzTpIcepk0o8(chr(858 - 810) + chr(10614 - 10503) + '\x33' + chr(0b110100) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b110000 + 0o77) + '\x33' + '\061' + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\065' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1101111) + chr(49) + '\066', 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + chr(0b100001 + 0o20) + chr(1963 - 1913) + '\x31', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1001100 + 0o43) + '\x33' + chr(52) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + chr(0b100 + 0o153) + chr(51) + chr(0b110011), 46430 - 46422), nzTpIcepk0o8('\060' + chr(9698 - 9587) + '\066' + chr(0b101101 + 0o11), 0o10), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(361 - 307) + chr(0b101 + 0o60), 61632 - 61624), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10011 + 0o37) + chr(55) + '\061', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b100101 + 0o112) + '\063' + '\060' + chr(55), 50641 - 50633), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(111) + chr(0b10000 + 0o44) + chr(0b101101 + 0o4), 11381 - 11373), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110101) + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(54) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110100) + chr(50), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10010 + 0o37) + chr(54) + '\x34', 8049 - 8041), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + '\063' + '\x30', 14206 - 14198), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1000100 + 0o53) + '\x33' + '\063' + '\065', 38883 - 38875), nzTpIcepk0o8('\060' + chr(0b10111 + 0o130) + '\x32' + '\x35' + '\064', 39873 - 39865), nzTpIcepk0o8('\x30' + chr(0b1101101 + 0o2) + '\x33' + chr(0b11110 + 0o26) + chr(48), 0b1000), nzTpIcepk0o8(chr(1979 - 1931) + chr(111) + chr(51) + '\x33' + '\x37', 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(6968 - 6857) + '\062' + '\064', 62640 - 62632), nzTpIcepk0o8('\x30' + '\x6f' + chr(87 - 37) + chr(416 - 367) + chr(49), 31157 - 31149), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(111) + chr(49) + '\x30', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(2245 - 2197) + chr(1449 - 1395), 0o10), nzTpIcepk0o8(chr(813 - 765) + '\157' + chr(0b1110 + 0o45) + '\066' + chr(2093 - 2045), 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + chr(0b10111 + 0o33) + chr(53) + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(51) + '\x35' + '\061', 0b1000), nzTpIcepk0o8('\x30' + chr(9588 - 9477) + chr(0b110011) + '\065' + chr(0b11101 + 0o25), 0o10), nzTpIcepk0o8('\x30' + chr(0b1011 + 0o144) + chr(51) + chr(0b110010) + '\065', 30054 - 30046), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1101111) + chr(0b1001 + 0o50) + chr(0b110100) + '\x33', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(362 - 311) + '\x31', 55471 - 55463)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110101) + '\060', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9c'), '\144' + '\x65' + '\143' + '\157' + chr(0b1100100) + chr(4841 - 4740))(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(45) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def GUKetu4xaGsJ(hXMPsSrOQzbh, QYodcsDtoGq7, WmRBchRTeaDt=None): for (B6UAF1zReOyJ, r7AA1pbLjb44) in hXMPsSrOQzbh: if B6UAF1zReOyJ == QYodcsDtoGq7: return r7AA1pbLjb44 return WmRBchRTeaDt
clld/clldutils
src/clldutils/sfm.py
SFM.read
def read(self, filename, encoding='utf-8', marker_map=None, entry_impl=Entry, entry_sep='\n\n', entry_prefix=None, keep_empty=False): """Extend the list by parsing new entries from a file. :param filename: :param encoding: :param marker_map: A dict used to map marker names. :param entry_impl: Subclass of Entry or None :param entry_sep: :param entry_prefix: """ marker_map = marker_map or {} for entry in parse( filename, encoding, entry_sep, entry_prefix or entry_sep, keep_empty=keep_empty): if entry: self.append(entry_impl([(marker_map.get(k, k), v) for k, v in entry]))
python
def read(self, filename, encoding='utf-8', marker_map=None, entry_impl=Entry, entry_sep='\n\n', entry_prefix=None, keep_empty=False): """Extend the list by parsing new entries from a file. :param filename: :param encoding: :param marker_map: A dict used to map marker names. :param entry_impl: Subclass of Entry or None :param entry_sep: :param entry_prefix: """ marker_map = marker_map or {} for entry in parse( filename, encoding, entry_sep, entry_prefix or entry_sep, keep_empty=keep_empty): if entry: self.append(entry_impl([(marker_map.get(k, k), v) for k, v in entry]))
[ "def", "read", "(", "self", ",", "filename", ",", "encoding", "=", "'utf-8'", ",", "marker_map", "=", "None", ",", "entry_impl", "=", "Entry", ",", "entry_sep", "=", "'\\n\\n'", ",", "entry_prefix", "=", "None", ",", "keep_empty", "=", "False", ")", ":", "marker_map", "=", "marker_map", "or", "{", "}", "for", "entry", "in", "parse", "(", "filename", ",", "encoding", ",", "entry_sep", ",", "entry_prefix", "or", "entry_sep", ",", "keep_empty", "=", "keep_empty", ")", ":", "if", "entry", ":", "self", ".", "append", "(", "entry_impl", "(", "[", "(", "marker_map", ".", "get", "(", "k", ",", "k", ")", ",", "v", ")", "for", "k", ",", "v", "in", "entry", "]", ")", ")" ]
Extend the list by parsing new entries from a file. :param filename: :param encoding: :param marker_map: A dict used to map marker names. :param entry_impl: Subclass of Entry or None :param entry_sep: :param entry_prefix:
[ "Extend", "the", "list", "by", "parsing", "new", "entries", "from", "a", "file", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/sfm.py#L117-L142
train
Extend the list by parsing new entries from a 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,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(chr(0b110000) + chr(0b1101111) + '\066' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1417 - 1368), 13470 - 13462), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(111) + chr(0b10000 + 0o41) + '\x34' + '\065', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b10010 + 0o135) + chr(0b110011) + chr(0b110111), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b101001 + 0o11) + '\066' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + '\061' + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1952 - 1901) + '\063' + '\063', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111 + 0o0) + '\x32' + '\x31' + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\157' + chr(0b110010) + '\066' + '\064', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(0b101101 + 0o4) + chr(50), 26807 - 26799), nzTpIcepk0o8('\060' + '\157' + '\x33' + '\x37' + chr(1819 - 1765), 59607 - 59599), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b1101111) + '\062' + '\065', 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(48) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2201 - 2151) + chr(52) + chr(0b10111 + 0o31), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b1011 + 0o52) + '\x35', 37795 - 37787), nzTpIcepk0o8(chr(0b110000) + chr(4214 - 4103) + '\061' + '\060' + chr(556 - 505), 0o10), nzTpIcepk0o8('\060' + chr(0b1011110 + 0o21) + chr(0b101101 + 0o6) + '\062' + chr(0b110000), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x37' + chr(0b101001 + 0o14), 65255 - 65247), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1010011 + 0o34) + chr(2290 - 2238), 0o10), nzTpIcepk0o8(chr(1529 - 1481) + '\x6f' + chr(0b10110 + 0o34) + chr(49) + chr(50), 8), nzTpIcepk0o8(chr(1006 - 958) + chr(689 - 578) + chr(55), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(1528 - 1478) + chr(0b10001 + 0o44) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b100101 + 0o112) + '\x32' + '\x33' + chr(0b1000 + 0o57), 46295 - 46287), nzTpIcepk0o8(chr(1638 - 1590) + chr(0b1100011 + 0o14) + chr(51) + chr(55), 8), nzTpIcepk0o8('\060' + chr(0b110101 + 0o72) + '\x33' + chr(53) + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2035 - 1982) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(1809 - 1760) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b0 + 0o157) + chr(0b10001 + 0o41) + '\x31' + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b111001 + 0o66) + chr(50) + '\x33' + chr(54), 51621 - 51613), nzTpIcepk0o8('\060' + '\157' + chr(49) + chr(0b10010 + 0o44) + '\064', 0b1000), nzTpIcepk0o8(chr(746 - 698) + chr(111) + chr(51) + '\064' + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1283 - 1233) + chr(0b110100) + chr(0b110 + 0o57), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b1000 + 0o51), 8), nzTpIcepk0o8(chr(1365 - 1317) + '\157' + chr(50) + chr(648 - 597) + chr(0b110110), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + chr(0b10 + 0o63) + '\x33', 8), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b1000001 + 0o56) + chr(0b110 + 0o53) + '\x37' + chr(0b110000 + 0o0), 0b1000), nzTpIcepk0o8(chr(2014 - 1966) + '\x6f' + chr(0b110010) + chr(55), ord("\x08")), nzTpIcepk0o8('\060' + chr(6655 - 6544) + '\062' + '\063' + chr(848 - 794), 8), nzTpIcepk0o8('\x30' + chr(0b11010 + 0o125) + '\062' + '\064', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1110 + 0o141) + '\061' + '\x36', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b1011011 + 0o24) + chr(1965 - 1912) + chr(1486 - 1438), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1a'), chr(100) + chr(0b1100101) + '\143' + chr(0b111001 + 0o66) + '\x64' + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(6749 - 6647) + '\x2d' + chr(0b10010 + 0o46)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def eoXknH7XUn7m(hXMPsSrOQzbh, FxZHtXEolYsL, rt5yMsH2WFRk=roI3spqORKae(ES5oEprVxulp(b'Au\x032\x8d'), chr(0b10011 + 0o121) + chr(0b1100101) + chr(0b1001001 + 0o32) + '\x6f' + chr(0b1100100) + '\145')('\165' + chr(0b10 + 0o162) + '\146' + chr(0b101101) + '\x38'), QQiDvUTw2u4n=None, wzCsSpPXgvJT=bTq_DkWqT6gW, Uaz8rILFJtWg=roI3spqORKae(ES5oEprVxulp(b'>\x0b'), chr(0b1000111 + 0o35) + '\145' + chr(9622 - 9523) + chr(0b1101111) + chr(100) + chr(0b1100101))('\x75' + chr(116) + chr(0b100010 + 0o104) + '\055' + chr(0b111000)), rbx3ECGcs4OH=None, OcKvfRrCbwBl=nzTpIcepk0o8(chr(0b0 + 0o60) + chr(11116 - 11005) + chr(1695 - 1647), 0o10)): QQiDvUTw2u4n = QQiDvUTw2u4n or {} for eTfWnO_8KfiX in zgDfHOdKcvCW(FxZHtXEolYsL, rt5yMsH2WFRk, Uaz8rILFJtWg, rbx3ECGcs4OH or Uaz8rILFJtWg, keep_empty=OcKvfRrCbwBl): if eTfWnO_8KfiX: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'|U6+\xcd\xab\x9c\xe0\xde\xe5\xab '), chr(0b1100100) + chr(0b110010 + 0o63) + chr(2230 - 2131) + '\x6f' + chr(0b1011110 + 0o6) + chr(0b1010001 + 0o24))(chr(0b1110101) + chr(0b1010101 + 0o37) + chr(0b1100110) + chr(0b101101) + chr(2111 - 2055)))(wzCsSpPXgvJT([(roI3spqORKae(QQiDvUTw2u4n, roI3spqORKae(ES5oEprVxulp(b'sT.z\xc1\xb9\xef\xf7\xd5\xcd\x8d_'), '\144' + chr(101) + '\143' + '\157' + chr(0b1100100) + '\145')(chr(117) + chr(116) + '\146' + chr(0b10100 + 0o31) + '\x38'))(B6UAF1zReOyJ, B6UAF1zReOyJ), r7AA1pbLjb44) for (B6UAF1zReOyJ, r7AA1pbLjb44) in eTfWnO_8KfiX]))
clld/clldutils
src/clldutils/sfm.py
SFM.write
def write(self, filename, encoding='utf-8'): """Write the list of entries to a file. :param filename: :param encoding: :return: """ with io.open(str(filename), 'w', encoding=encoding) as fp: for entry in self: fp.write(entry.__unicode__()) fp.write('\n\n')
python
def write(self, filename, encoding='utf-8'): """Write the list of entries to a file. :param filename: :param encoding: :return: """ with io.open(str(filename), 'w', encoding=encoding) as fp: for entry in self: fp.write(entry.__unicode__()) fp.write('\n\n')
[ "def", "write", "(", "self", ",", "filename", ",", "encoding", "=", "'utf-8'", ")", ":", "with", "io", ".", "open", "(", "str", "(", "filename", ")", ",", "'w'", ",", "encoding", "=", "encoding", ")", "as", "fp", ":", "for", "entry", "in", "self", ":", "fp", ".", "write", "(", "entry", ".", "__unicode__", "(", ")", ")", "fp", ".", "write", "(", "'\\n\\n'", ")" ]
Write the list of entries to a file. :param filename: :param encoding: :return:
[ "Write", "the", "list", "of", "entries", "to", "a", "file", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/sfm.py#L148-L158
train
Write the list of entries to a 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,Awc2QmWaiVq8,fPFTJxVnGShv,Kqv3Zaj1M9P0,uKsHT175xV8E,ah0DLMBSEU5j,EsFcqWRT9elq,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpPw,VwkB9reRDydR,aHxuT4bIDdeg,Qn0k4xGfJpuL,NfwEQ1VKf5DV,WdoB9EK8ABTr,Y1otPTwLRJvi,zsedrPqY_EmW,CJFGX4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oA26ON7iG,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(405 - 357) + '\x6f' + chr(50) + chr(54) + chr(49), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\065' + chr(0b11100 + 0o32), 0b1000), nzTpIcepk0o8(chr(1594 - 1546) + '\x6f' + chr(1201 - 1151) + '\065', 4617 - 4609), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1010000 + 0o37) + chr(0b100011 + 0o20) + chr(49) + chr(0b100000 + 0o25), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + '\062' + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + chr(0b11000 + 0o35) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(2237 - 2189) + chr(0b1100111 + 0o10) + chr(0b11100 + 0o27) + '\x30' + chr(0b1 + 0o63), 60980 - 60972), nzTpIcepk0o8('\060' + '\157' + '\x31' + '\x32' + chr(0b100011 + 0o17), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + '\062' + '\060', 0o10), nzTpIcepk0o8('\x30' + chr(0b110010 + 0o75) + '\x32' + chr(0b11001 + 0o34) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\x30' + chr(1051 - 1002), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(1412 - 1360) + chr(0b110010), 0b1000), nzTpIcepk0o8('\x30' + chr(3105 - 2994) + chr(54) + chr(2607 - 2555), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + '\066' + chr(0b101000 + 0o16), 0b1000), nzTpIcepk0o8('\x30' + chr(5754 - 5643) + chr(628 - 579) + '\062' + '\x32', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(0b110111) + chr(0b1111 + 0o44), 59441 - 59433), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1101111) + '\x35' + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b100010 + 0o115) + '\x33' + chr(1662 - 1610) + chr(48), 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b1001100 + 0o43) + chr(1932 - 1881) + '\063' + '\064', 15889 - 15881), nzTpIcepk0o8(chr(48) + chr(0b1011 + 0o144) + chr(0b0 + 0o65) + '\063', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(613 - 563) + chr(48) + '\066', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10111 + 0o32) + '\067' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(10572 - 10461) + chr(0b110011) + chr(48) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(733 - 685) + chr(0b1101111) + '\x34' + '\065', 0b1000), nzTpIcepk0o8(chr(1611 - 1563) + '\157' + '\063' + chr(2213 - 2164) + chr(787 - 739), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101 + 0o55) + chr(0b1001 + 0o51) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b100100 + 0o113) + '\063' + chr(0b110111) + chr(0b1010 + 0o52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b11 + 0o154) + '\x32' + '\066' + '\062', 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(11106 - 10995) + '\063' + chr(52) + chr(0b110101), 59102 - 59094), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\067' + chr(0b11100 + 0o27), 8), nzTpIcepk0o8(chr(48) + chr(0b1011101 + 0o22) + '\061' + chr(53) + chr(0b100000 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(3754 - 3643) + chr(0b11011 + 0o30) + chr(0b110110), 0o10), nzTpIcepk0o8('\060' + chr(4723 - 4612) + chr(51) + '\x31' + '\060', 8), nzTpIcepk0o8(chr(1975 - 1927) + chr(0b1101111) + chr(0b10001 + 0o42) + chr(1916 - 1865), 47166 - 47158), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(7722 - 7611) + chr(275 - 222) + chr(54), 8), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b110 + 0o151) + chr(0b11011 + 0o30), 0o10), nzTpIcepk0o8(chr(1473 - 1425) + '\157' + '\x33' + chr(0b110011) + '\x36', 36972 - 36964), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + '\x34' + chr(50), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + '\062' + '\066', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b101111 + 0o100) + chr(0b110101) + chr(0b11100 + 0o24), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9f'), chr(100) + '\x65' + chr(0b1100011) + chr(8512 - 8401) + '\x64' + '\x65')(chr(117) + '\164' + chr(0b1100001 + 0o5) + '\055' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ml0hhpv1Lpq2(hXMPsSrOQzbh, FxZHtXEolYsL, rt5yMsH2WFRk=roI3spqORKae(ES5oEprVxulp(b'\xc4Zs\xe02'), '\144' + chr(101) + chr(99) + '\157' + chr(603 - 503) + chr(0b111100 + 0o51))(chr(6274 - 6157) + '\164' + chr(102) + chr(882 - 837) + chr(56))): with roI3spqORKae(tZd4qAJTuKKm, roI3spqORKae(ES5oEprVxulp(b'\xf5@@\xfeX \xd3\x8ag\xf1\xc4 '), '\x64' + chr(0b100 + 0o141) + chr(0b101100 + 0o67) + chr(0b1100110 + 0o11) + chr(2345 - 2245) + '\x65')(chr(0b1101 + 0o150) + '\x74' + chr(7279 - 7177) + chr(45) + '\070'))(N9zlRy29S1SS(FxZHtXEolYsL), roI3spqORKae(ES5oEprVxulp(b'\xc6'), chr(0b1111 + 0o125) + chr(101) + chr(0b1000010 + 0o41) + chr(5967 - 5856) + chr(2504 - 2404) + chr(1389 - 1288))(chr(2695 - 2578) + chr(116) + chr(880 - 778) + '\x2d' + chr(56)), encoding=rt5yMsH2WFRk) as KhXPEIWBXQzE: for eTfWnO_8KfiX in hXMPsSrOQzbh: roI3spqORKae(KhXPEIWBXQzE, roI3spqORKae(ES5oEprVxulp(b'\xdcB%\xa5b!\x9c\xf5\x1e\xe0\xd9s'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(9808 - 9707))('\x75' + '\164' + chr(0b1100110) + chr(902 - 857) + chr(0b111000)))(roI3spqORKae(eTfWnO_8KfiX, roI3spqORKae(ES5oEprVxulp(b'\xf4Ia\xf9z\x05\x93\xaf`\xda\x90 '), chr(6872 - 6772) + '\x65' + chr(8525 - 8426) + chr(0b1101111) + chr(677 - 577) + chr(1991 - 1890))(chr(3156 - 3039) + '\164' + chr(0b101101 + 0o71) + chr(602 - 557) + '\x38'))()) roI3spqORKae(KhXPEIWBXQzE, roI3spqORKae(ES5oEprVxulp(b'\xdcB%\xa5b!\x9c\xf5\x1e\xe0\xd9s'), chr(100) + '\x65' + chr(3813 - 3714) + chr(111) + chr(0b1001100 + 0o30) + chr(101))(chr(10971 - 10854) + chr(116) + '\x66' + chr(45) + chr(0b100101 + 0o23)))(roI3spqORKae(ES5oEprVxulp(b'\xbb$'), '\144' + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(0b101010 + 0o72) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(45) + chr(0b1011 + 0o55)))
clld/clldutils
src/clldutils/clilib.py
confirm
def confirm(question, default=True): """Ask a yes/no question interactively. :param question: The text of the question to ask. :returns: True if the answer was "yes", False otherwise. """ valid = {"": default, "yes": True, "y": True, "no": False, "n": False} while 1: choice = input(question + (" [Y/n] " if default else " [y/N] ")).lower() if choice in valid: return valid[choice] print("Please respond with 'y' or 'n' ")
python
def confirm(question, default=True): """Ask a yes/no question interactively. :param question: The text of the question to ask. :returns: True if the answer was "yes", False otherwise. """ valid = {"": default, "yes": True, "y": True, "no": False, "n": False} while 1: choice = input(question + (" [Y/n] " if default else " [y/N] ")).lower() if choice in valid: return valid[choice] print("Please respond with 'y' or 'n' ")
[ "def", "confirm", "(", "question", ",", "default", "=", "True", ")", ":", "valid", "=", "{", "\"\"", ":", "default", ",", "\"yes\"", ":", "True", ",", "\"y\"", ":", "True", ",", "\"no\"", ":", "False", ",", "\"n\"", ":", "False", "}", "while", "1", ":", "choice", "=", "input", "(", "question", "+", "(", "\" [Y/n] \"", "if", "default", "else", "\" [y/N] \"", ")", ")", ".", "lower", "(", ")", "if", "choice", "in", "valid", ":", "return", "valid", "[", "choice", "]", "print", "(", "\"Please respond with 'y' or 'n' \"", ")" ]
Ask a yes/no question interactively. :param question: The text of the question to ask. :returns: True if the answer was "yes", False otherwise.
[ "Ask", "a", "yes", "/", "no", "question", "interactively", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355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HWDi_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(637 - 588) + chr(199 - 144) + chr(1051 - 1000), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x34', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(0b110010) + chr(0b110010), 0b1000), nzTpIcepk0o8('\x30' + chr(920 - 809) + '\062', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + '\061' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101111) + chr(0b110010) + chr(0b110111) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\060' + chr(1167 - 1056) + chr(0b101100 + 0o7) + chr(0b10010 + 0o44), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x33' + '\x37' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(111) + chr(0b110010) + chr(1069 - 1021) + chr(48), 0o10), nzTpIcepk0o8(chr(1008 - 960) + '\157' + '\062' + chr(51) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b0 + 0o157) + '\063' + chr(0b10000 + 0o41) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(0b100000 + 0o24) + chr(1486 - 1434), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(0b110010) + chr(0b11110 + 0o26), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1011110 + 0o21) + chr(701 - 650) + chr(0b110100) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1101010 + 0o5) + chr(0b11 + 0o56) + chr(0b110000) + '\060', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b10001 + 0o42) + '\x30' + chr(493 - 440), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + chr(0b110000) + chr(994 - 943), 45988 - 45980), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\x36' + chr(2364 - 2312), 56206 - 56198), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + chr(0b110011) + chr(1468 - 1418), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(447 - 398) + chr(52) + chr(637 - 582), 0o10), nzTpIcepk0o8('\x30' + chr(5402 - 5291) + chr(51) + chr(54) + chr(0b101000 + 0o15), 17749 - 17741), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11100 + 0o25) + chr(0b110011 + 0o2) + chr(0b110111), 21926 - 21918), nzTpIcepk0o8('\060' + chr(111) + chr(1816 - 1761) + '\067', 835 - 827), nzTpIcepk0o8(chr(0b110000) + chr(0b110011 + 0o74) + chr(0b11 + 0o56) + chr(0b110 + 0o54) + chr(48), 48996 - 48988), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + '\066' + chr(0b100010 + 0o23), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + '\064' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(1094 - 1046) + chr(0b1101111) + chr(51) + chr(50) + chr(1740 - 1689), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(0b11001 + 0o31) + chr(0b11010 + 0o32), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(49) + '\x35' + chr(1115 - 1067), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + '\063' + '\060', ord("\x08")), nzTpIcepk0o8(chr(1151 - 1103) + '\157' + '\061' + '\x36' + chr(0b11 + 0o55), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(0b110010) + '\x37', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110111) + '\066', 42981 - 42973), nzTpIcepk0o8(chr(48) + chr(111) + '\064' + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + '\065' + chr(0b100001 + 0o25), ord("\x08")), nzTpIcepk0o8(chr(598 - 550) + chr(10727 - 10616) + chr(2468 - 2417) + '\x31' + chr(625 - 577), 8), nzTpIcepk0o8(chr(0b110000) + chr(11428 - 11317) + chr(51) + chr(0b110101) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(10608 - 10497) + chr(885 - 836) + '\067' + '\060', 60331 - 60323), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(0b110100) + chr(372 - 318), 8), nzTpIcepk0o8('\x30' + chr(0b101100 + 0o103) + chr(0b10010 + 0o37) + chr(51) + '\064', 35504 - 35496)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1001100 + 0o43) + chr(0b110101) + '\x30', 55493 - 55485)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'U'), '\x64' + chr(101) + chr(9468 - 9369) + '\157' + '\144' + chr(8797 - 8696))('\x75' + chr(0b111001 + 0o73) + chr(102) + '\055' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def tQUI5bSv9io4(MJ0GaMxGA4ja, WmRBchRTeaDt=nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(111) + '\061', 55503 - 55495)): aD8EaTuDAVYE = {roI3spqORKae(ES5oEprVxulp(b''), chr(0b1010101 + 0o17) + chr(0b1100101) + chr(0b1100011) + chr(0b1001011 + 0o44) + chr(3207 - 3107) + '\x65')('\x75' + chr(0b1 + 0o163) + '\146' + '\x2d' + '\x38'): WmRBchRTeaDt, roI3spqORKae(ES5oEprVxulp(b'\x02a!'), chr(0b1011111 + 0o5) + '\x65' + chr(0b110 + 0o135) + chr(7401 - 7290) + chr(0b1100100) + '\x65')(chr(117) + chr(0b1001101 + 0o47) + chr(0b1100110) + '\x2d' + chr(56)): nzTpIcepk0o8('\x30' + chr(111) + chr(49), 8), roI3spqORKae(ES5oEprVxulp(b'\x02'), chr(0b1001111 + 0o25) + '\x65' + chr(99) + chr(111) + chr(0b1010000 + 0o24) + '\x65')(chr(117) + chr(116) + chr(4188 - 4086) + '\055' + '\070'): nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(3702 - 3591) + chr(557 - 508), 8), roI3spqORKae(ES5oEprVxulp(b'\x15k'), chr(0b1100100) + chr(5975 - 5874) + '\143' + chr(11452 - 11341) + chr(100) + chr(101))(chr(3000 - 2883) + chr(116) + chr(0b1100110) + chr(1698 - 1653) + '\070'): nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(111) + chr(0b110000), 0b1000), roI3spqORKae(ES5oEprVxulp(b'\x15'), chr(0b1000010 + 0o42) + '\145' + '\x63' + '\157' + chr(100) + chr(3591 - 3490))(chr(117) + '\164' + chr(102) + chr(0b11100 + 0o21) + chr(0b111000)): nzTpIcepk0o8('\060' + '\x6f' + '\x30', 8)} while nzTpIcepk0o8('\060' + chr(6388 - 6277) + chr(0b101 + 0o54), 8): g95wMciHFFYR = QnTXOd5N96r1(MJ0GaMxGA4ja + (roI3spqORKae(ES5oEprVxulp(b'[_\x0b-$\xe6>'), chr(0b1100100) + chr(4365 - 4264) + '\x63' + chr(8479 - 8368) + chr(100) + chr(0b10001 + 0o124))(chr(5744 - 5627) + chr(0b11011 + 0o131) + chr(0b1100110) + '\x2d' + chr(2316 - 2260)) if WmRBchRTeaDt else roI3spqORKae(ES5oEprVxulp(b'[_+-\x04\xe6>'), chr(0b1100100) + chr(6401 - 6300) + chr(0b0 + 0o143) + chr(0b1101111) + chr(0b110 + 0o136) + chr(101))(chr(5516 - 5399) + '\x74' + chr(102) + chr(45) + chr(56)))).Xn8ENWMZdIRt() if g95wMciHFFYR in aD8EaTuDAVYE: return aD8EaTuDAVYE[g95wMciHFFYR] v8jsMqaYV6U2(roI3spqORKae(ES5oEprVxulp(b'+h7c9\xde>\x8a\xe5\xea\xb8\xcb:\x82`\xb2\xea\x002G\xd2\x16\x18p\x9a\x91\xf3\xb3\x06\xffP'), chr(100) + chr(0b1001010 + 0o33) + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(101))(chr(117) + chr(0b1011001 + 0o33) + chr(102) + chr(45) + chr(2633 - 2577)))
clld/clldutils
src/clldutils/inifile.py
INI.gettext
def gettext(self, section, option, whitespace_preserving_prefix='.'): """ While configparser supports multiline values, it does this at the expense of stripping leading whitespace for each line in such a value. Sometimes we want to preserve such whitespace, e.g. to be able to put markdown with nested lists into INI files. We support this be introducing a special prefix, which is prepended to lines starting with whitespace in `settext` and stripped in `gettext`. """ lines = [] for line in self.get(section, option, fallback='').splitlines(): if re.match(re.escape(whitespace_preserving_prefix) + '\s+', line): line = line[len(whitespace_preserving_prefix):] lines.append(line) return '\n'.join(lines)
python
def gettext(self, section, option, whitespace_preserving_prefix='.'): """ While configparser supports multiline values, it does this at the expense of stripping leading whitespace for each line in such a value. Sometimes we want to preserve such whitespace, e.g. to be able to put markdown with nested lists into INI files. We support this be introducing a special prefix, which is prepended to lines starting with whitespace in `settext` and stripped in `gettext`. """ lines = [] for line in self.get(section, option, fallback='').splitlines(): if re.match(re.escape(whitespace_preserving_prefix) + '\s+', line): line = line[len(whitespace_preserving_prefix):] lines.append(line) return '\n'.join(lines)
[ "def", "gettext", "(", "self", ",", "section", ",", "option", ",", "whitespace_preserving_prefix", "=", "'.'", ")", ":", "lines", "=", "[", "]", "for", "line", "in", "self", ".", "get", "(", "section", ",", "option", ",", "fallback", "=", "''", ")", ".", "splitlines", "(", ")", ":", "if", "re", ".", "match", "(", "re", ".", "escape", "(", "whitespace_preserving_prefix", ")", "+", "'\\s+'", ",", "line", ")", ":", "line", "=", "line", "[", "len", "(", "whitespace_preserving_prefix", ")", ":", "]", "lines", ".", "append", "(", "line", ")", "return", "'\\n'", ".", "join", "(", "lines", ")" ]
While configparser supports multiline values, it does this at the expense of stripping leading whitespace for each line in such a value. Sometimes we want to preserve such whitespace, e.g. to be able to put markdown with nested lists into INI files. We support this be introducing a special prefix, which is prepended to lines starting with whitespace in `settext` and stripped in `gettext`.
[ "While", "configparser", "supports", "multiline", "values", "it", "does", "this", "at", "the", "expense", "of", "stripping", "leading", "whitespace", "for", "each", "line", "in", "such", "a", "value", ".", "Sometimes", "we", "want", "to", "preserve", "such", "whitespace", "e", ".", "g", ".", "to", "be", "able", "to", "put", "markdown", "with", "nested", "lists", "into", "INI", "files", ".", "We", "support", "this", "be", "introducing", "a", "special", "prefix", "which", "is", "prepended", "to", "lines", "starting", "with", "whitespace", "in", "settext", "and", "stripped", "in", "gettext", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/inifile.py#L44-L58
train
Return the gettext string for the specified option in section.
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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mKXV0QRcrJP,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) + '\x31' + '\x33' + '\x36', 0b1000), nzTpIcepk0o8('\x30' + chr(8209 - 8098) + chr(0b11101 + 0o24) + '\x34' + chr(1258 - 1206), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1001101 + 0o42) + chr(0b110110) + chr(54), 62653 - 62645), nzTpIcepk0o8('\060' + chr(0b1011 + 0o144) + chr(49) + '\064' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2081 - 2030) + chr(2767 - 2712), 39654 - 39646), nzTpIcepk0o8(chr(1308 - 1260) + chr(0b1011011 + 0o24) + '\x33' + chr(55) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + '\062' + chr(0b110101 + 0o0) + chr(0b100111 + 0o11), 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + chr(51) + chr(914 - 864) + chr(0b100011 + 0o22), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11101 + 0o24) + chr(2313 - 2261) + chr(2645 - 2593), 8), nzTpIcepk0o8(chr(48) + chr(7524 - 7413) + chr(50) + chr(0b10100 + 0o35), 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b100000 + 0o117) + chr(0b10011 + 0o41) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(3035 - 2924) + '\061' + chr(48) + '\x34', 11631 - 11623), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101000 + 0o7) + chr(1691 - 1642) + chr(0b110000 + 0o5) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b111 + 0o51) + '\157' + chr(0b1010 + 0o51) + chr(0b1110 + 0o43) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(1162 - 1114) + '\x6f' + chr(0b110001) + chr(0b10000 + 0o47) + chr(55), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + '\065' + chr(53), 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(1804 - 1693) + '\x33' + chr(0b110100) + '\x37', 37384 - 37376), nzTpIcepk0o8('\060' + chr(111) + chr(201 - 152) + chr(48) + chr(0b10001 + 0o40), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1011010 + 0o25) + chr(0b110011) + '\060', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(0b110011) + '\x32', 4373 - 4365), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(0b1101 + 0o44) + '\x37', 55976 - 55968), nzTpIcepk0o8('\060' + chr(10038 - 9927) + chr(0b110101) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(11791 - 11680) + chr(0b110011) + chr(212 - 157) + chr(0b1001 + 0o51), 60431 - 60423), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b101000 + 0o10) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1101000 + 0o7) + '\063' + '\060' + '\x30', 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + chr(0b110010) + '\x31' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(324 - 276) + chr(111) + chr(51), 0o10), nzTpIcepk0o8('\060' + chr(0b11010 + 0o125) + chr(50) + chr(0b11100 + 0o30) + chr(2715 - 2661), 39388 - 39380), nzTpIcepk0o8('\060' + chr(111) + '\064' + chr(1487 - 1437), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110001 + 0o76) + '\063' + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + chr(842 - 787) + chr(48), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + chr(278 - 229) + chr(49), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b1101 + 0o46) + chr(50) + chr(0b101111 + 0o10), ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1101111) + chr(0b10000 + 0o40), 0o10), nzTpIcepk0o8(chr(48) + chr(1282 - 1171) + chr(296 - 246) + '\061' + '\x33', 45715 - 45707), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\x6f' + chr(0b110100) + chr(51), 5179 - 5171), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100000 + 0o21) + '\060' + '\x30', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + '\064' + '\061', 8), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(0b110100) + '\x30', 0o10), nzTpIcepk0o8(chr(1464 - 1416) + chr(111) + '\x31' + '\x35', 47356 - 47348)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + chr(53) + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'p'), chr(0b1000100 + 0o40) + chr(5335 - 5234) + chr(99) + chr(9678 - 9567) + '\x64' + '\145')(chr(117) + chr(4383 - 4267) + chr(0b1100110) + chr(0b101101) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def dprGdYDA7koY(hXMPsSrOQzbh, qpII1aNYuV7Z, hAhcvAlr6Tc_, IoWlQRMMyvAv=roI3spqORKae(ES5oEprVxulp(b'p'), chr(0b1011 + 0o131) + '\145' + chr(0b100110 + 0o75) + '\157' + chr(100) + chr(2976 - 2875))(chr(0b1100000 + 0o25) + chr(0b1010100 + 0o40) + chr(0b111011 + 0o53) + chr(45) + chr(56))): vniSnlI09HNg = [] for ffiOpFBWGmZU in roI3spqORKae(hXMPsSrOQzbh.get(qpII1aNYuV7Z, hAhcvAlr6Tc_, fallback=roI3spqORKae(ES5oEprVxulp(b''), chr(0b1100100) + '\145' + chr(0b11011 + 0o110) + chr(0b1101111) + chr(100) + '\x65')('\165' + chr(12126 - 12010) + chr(681 - 579) + chr(692 - 647) + chr(56))), roI3spqORKae(ES5oEprVxulp(b'-\x14Z\x08k\x92\xc1\xbb\x01b'), chr(0b101111 + 0o65) + '\145' + chr(99) + '\x6f' + '\144' + '\x65')('\165' + chr(0b1110100) + '\x66' + chr(0b101 + 0o50) + chr(0b1101 + 0o53)))(): if roI3spqORKae(aoTc4YA2bs2R, roI3spqORKae(ES5oEprVxulp(b"6\x0f\x0f.v\x94\xc5\xbc'N^\x05"), chr(0b1100100) + chr(101) + chr(4911 - 4812) + chr(6423 - 6312) + chr(0b1100100) + chr(0b1011110 + 0o7))(chr(3379 - 3262) + chr(0b1011101 + 0o27) + chr(0b1100110) + chr(0b101101) + '\x38'))(roI3spqORKae(aoTc4YA2bs2R, roI3spqORKae(ES5oEprVxulp(b'2\x02p\x07.\xb7\x9f\xe64U~2'), chr(3138 - 3038) + chr(101) + '\x63' + chr(0b1010110 + 0o31) + chr(0b1000001 + 0o43) + chr(0b101001 + 0o74))(chr(0b10010 + 0o143) + chr(0b1110100) + chr(2119 - 2017) + chr(1216 - 1171) + '\x38'))(IoWlQRMMyvAv) + roI3spqORKae(ES5oEprVxulp(b'\x02\x17\x1d'), chr(100) + chr(0b1100101) + chr(0b1100000 + 0o3) + chr(0b1000000 + 0o57) + '\144' + chr(0b111111 + 0o46))(chr(117) + '\x74' + chr(102) + '\055' + chr(2426 - 2370)), ffiOpFBWGmZU): ffiOpFBWGmZU = ffiOpFBWGmZU[ftfygxgFas5X(IoWlQRMMyvAv):] roI3spqORKae(vniSnlI09HNg, roI3spqORKae(ES5oEprVxulp(b'\x160eUg\x99\xef\xba\x0e~qq'), '\x64' + chr(0b1100101) + '\143' + '\x6f' + chr(0b1100100) + chr(6153 - 6052))('\165' + chr(116) + chr(0b1100110) + chr(0b101101) + chr(1474 - 1418)))(ffiOpFBWGmZU) return roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'T'), chr(0b1100100) + chr(0b1100101) + chr(5595 - 5496) + '\157' + chr(0b1100100) + chr(0b1100101))('\x75' + chr(0b1100100 + 0o20) + '\146' + chr(45) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\x07PO,&\xbc\xcb\xb30Rj5'), chr(100) + '\145' + chr(0b101100 + 0o67) + '\157' + '\x64' + chr(101))(chr(8839 - 8722) + chr(0b1110000 + 0o4) + '\146' + chr(45) + chr(0b111000)))(vniSnlI09HNg)
clld/clldutils
src/clldutils/misc.py
data_url
def data_url(content, mimetype=None): """ Returns content encoded as base64 Data URI. :param content: bytes or str or Path :param mimetype: mimetype for :return: str object (consisting only of ASCII, though) .. seealso:: https://en.wikipedia.org/wiki/Data_URI_scheme """ if isinstance(content, pathlib.Path): if not mimetype: mimetype = guess_type(content.name)[0] with content.open('rb') as fp: content = fp.read() else: if isinstance(content, text_type): content = content.encode('utf8') return "data:{0};base64,{1}".format( mimetype or 'application/octet-stream', b64encode(content).decode())
python
def data_url(content, mimetype=None): """ Returns content encoded as base64 Data URI. :param content: bytes or str or Path :param mimetype: mimetype for :return: str object (consisting only of ASCII, though) .. seealso:: https://en.wikipedia.org/wiki/Data_URI_scheme """ if isinstance(content, pathlib.Path): if not mimetype: mimetype = guess_type(content.name)[0] with content.open('rb') as fp: content = fp.read() else: if isinstance(content, text_type): content = content.encode('utf8') return "data:{0};base64,{1}".format( mimetype or 'application/octet-stream', b64encode(content).decode())
[ "def", "data_url", "(", "content", ",", "mimetype", "=", "None", ")", ":", "if", "isinstance", "(", "content", ",", "pathlib", ".", "Path", ")", ":", "if", "not", "mimetype", ":", "mimetype", "=", "guess_type", "(", "content", ".", "name", ")", "[", "0", "]", "with", "content", ".", "open", "(", "'rb'", ")", "as", "fp", ":", "content", "=", "fp", ".", "read", "(", ")", "else", ":", "if", "isinstance", "(", "content", ",", "text_type", ")", ":", "content", "=", "content", ".", "encode", "(", "'utf8'", ")", "return", "\"data:{0};base64,{1}\"", ".", "format", "(", "mimetype", "or", "'application/octet-stream'", ",", "b64encode", "(", "content", ")", ".", "decode", "(", ")", ")" ]
Returns content encoded as base64 Data URI. :param content: bytes or str or Path :param mimetype: mimetype for :return: str object (consisting only of ASCII, though) .. seealso:: https://en.wikipedia.org/wiki/Data_URI_scheme
[ "Returns", "content", "encoded", "as", "base64", "Data", "URI", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/misc.py#L24-L43
train
Returns content encoded as base64 Data URI.
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,N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kqw,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(771 - 723) + chr(0b1100010 + 0o15) + chr(49) + chr(0b100101 + 0o16) + chr(0b1000 + 0o50), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b10 + 0o57) + chr(48) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(1026 - 978) + chr(0b1101111) + chr(0b10111 + 0o32) + chr(0b110001) + chr(0b100011 + 0o20), 56269 - 56261), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101011 + 0o7) + '\065' + chr(2169 - 2120), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + '\x30', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1185 - 1136) + chr(0b110111) + '\062', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(1004 - 951), 51504 - 51496), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(0b1101111) + chr(0b110001) + chr(0b101010 + 0o11) + chr(0b110100), 0o10), nzTpIcepk0o8('\x30' + chr(11511 - 11400) + '\x31' + chr(0b110101) + chr(366 - 314), 37784 - 37776), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(365 - 315) + chr(0b11110 + 0o24) + chr(1364 - 1309), 0o10), nzTpIcepk0o8(chr(634 - 586) + chr(0b1101111) + chr(512 - 461) + chr(292 - 241), 58341 - 58333), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(2151 - 2103) + chr(2412 - 2301) + chr(0b100000 + 0o21) + '\060' + chr(2296 - 2244), 46817 - 46809), nzTpIcepk0o8(chr(0b110000) + chr(5647 - 5536) + chr(0b100 + 0o56) + chr(1597 - 1545) + '\x34', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010 + 0o145) + chr(0b110011) + '\063' + '\x31', 0b1000), nzTpIcepk0o8(chr(1337 - 1289) + chr(0b1101111) + chr(51) + chr(51) + chr(1782 - 1731), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(81 - 32), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101000 + 0o11) + chr(1732 - 1684) + chr(1875 - 1821), 0b1000), nzTpIcepk0o8('\x30' + chr(5827 - 5716) + chr(706 - 656) + chr(0b10100 + 0o36) + '\062', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b1010 + 0o50) + '\066' + '\063', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(0b110000) + chr(781 - 730), 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1101111) + '\x31', 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + '\x36' + chr(0b10101 + 0o36), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1834 - 1784) + chr(0b110110) + chr(2064 - 2010), 0b1000), nzTpIcepk0o8(chr(703 - 655) + chr(111) + chr(2371 - 2322) + '\x35' + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b11 + 0o64) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b101101 + 0o102) + '\x32' + '\x32' + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(252 - 203) + chr(0b0 + 0o67) + chr(764 - 715), 23082 - 23074), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + '\x31' + chr(723 - 671), 29282 - 29274), nzTpIcepk0o8('\060' + '\157' + chr(0b11100 + 0o26) + chr(54) + chr(365 - 310), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(53) + chr(0b100011 + 0o22), 8), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(928 - 817) + chr(0b101100 + 0o6) + chr(0b100000 + 0o27) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(1523 - 1475) + chr(9462 - 9351) + chr(50) + chr(2050 - 1999), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(55) + chr(53), 6187 - 6179), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(2570 - 2515) + '\x35', 0o10), nzTpIcepk0o8(chr(48) + chr(2397 - 2286) + '\062' + chr(961 - 909) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(11532 - 11421) + chr(49) + chr(0b110110) + '\x31', 31700 - 31692), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(4438 - 4327) + '\x33' + '\x35' + '\x30', 17025 - 17017), nzTpIcepk0o8('\060' + chr(111) + chr(1451 - 1402) + chr(0b110111) + chr(0b110000), 57347 - 57339), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(54) + chr(0b110110), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1000110 + 0o51) + '\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'v'), chr(100) + chr(101) + '\x63' + chr(3277 - 3166) + chr(828 - 728) + chr(101))(chr(117) + chr(0b1110100) + chr(925 - 823) + '\x2d' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def RUi2BlVf5Yte(M0YikwrsEpm5, bZ3GyCtldaFM=None): if suIjIS24Zkqw(M0YikwrsEpm5, roI3spqORKae(XnbiTvjEX35V, roI3spqORKae(ES5oEprVxulp(b'\x08!?\xc1'), '\x64' + chr(0b1100101) + chr(3900 - 3801) + chr(8948 - 8837) + chr(1381 - 1281) + '\x65')('\x75' + chr(0b1110100) + '\x66' + chr(0b101101) + '\070'))): if not bZ3GyCtldaFM: bZ3GyCtldaFM = PPiSEJl9jVT_(M0YikwrsEpm5.SLVB2BPA_mIe)[nzTpIcepk0o8('\x30' + '\157' + chr(0b110000), 26873 - 26865)] with roI3spqORKae(M0YikwrsEpm5, roI3spqORKae(ES5oEprVxulp(b'\x1c.\x1e\x9aB\x0b4\x12Y\xf6wu'), chr(100) + chr(0b1011010 + 0o13) + chr(0b1100001 + 0o2) + '\157' + '\x64' + chr(0b1011110 + 0o7))(chr(117) + chr(3572 - 3456) + chr(102) + chr(45) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'*"'), '\x64' + '\145' + '\x63' + chr(111) + chr(100) + chr(0b1001010 + 0o33))(chr(0b100001 + 0o124) + chr(7457 - 7341) + chr(102) + chr(0b101101) + chr(0b110110 + 0o2))) as KhXPEIWBXQzE: M0YikwrsEpm5 = KhXPEIWBXQzE.eoXknH7XUn7m() elif suIjIS24Zkqw(M0YikwrsEpm5, H8p5T_wwctMA): M0YikwrsEpm5 = M0YikwrsEpm5.YqIaRFfeo4Ha(roI3spqORKae(ES5oEprVxulp(b'-4-\x91'), '\144' + chr(4710 - 4609) + chr(99) + chr(0b1101111) + chr(0b111000 + 0o54) + chr(0b10 + 0o143))('\x75' + '\164' + chr(0b1100110) + chr(0b11111 + 0o16) + chr(0b111000))) return roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'<!?\xc8*\x01=!W\xf5zg!\x92\xed\xf7zw\xef'), chr(0b1100100) + chr(101) + chr(5176 - 5077) + chr(0b1101111) + chr(100) + '\x65')(chr(0b101010 + 0o113) + chr(5144 - 5028) + '\146' + chr(1935 - 1890) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b')sx\xe2WIk3=\xc8X^'), chr(9782 - 9682) + chr(0b1100101) + '\143' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(8919 - 8817) + chr(45) + chr(145 - 89)))(bZ3GyCtldaFM or roI3spqORKae(ES5oEprVxulp(b'90;\xc5y\x19l(\x05\xf8u;+\xc7\xad\xbeuk\xe1\xc7\xb1d\xd2\xdb'), '\x64' + chr(101) + '\143' + chr(5966 - 5855) + chr(0b1100100) + chr(0b1001011 + 0o32))('\x75' + '\164' + chr(0b111100 + 0o52) + chr(45) + '\x38'), roI3spqORKae(l3vu4SdDCQ1T(M0YikwrsEpm5), roI3spqORKae(ES5oEprVxulp(b'4&)\xefc\x1eZ08\xa4VV'), '\144' + chr(101) + '\x63' + '\157' + '\x64' + chr(101))('\165' + '\164' + '\x66' + chr(0b101101) + chr(1148 - 1092)))())
clld/clldutils
src/clldutils/misc.py
to_binary
def to_binary(s, encoding='utf8'): """Portable cast function. In python 2 the ``str`` function which is used to coerce objects to bytes does not accept an encoding argument, whereas python 3's ``bytes`` function requires one. :param s: object to be converted to binary_type :return: binary_type instance, representing s. """ if PY3: # pragma: no cover return s if isinstance(s, binary_type) else binary_type(s, encoding=encoding) return binary_type(s)
python
def to_binary(s, encoding='utf8'): """Portable cast function. In python 2 the ``str`` function which is used to coerce objects to bytes does not accept an encoding argument, whereas python 3's ``bytes`` function requires one. :param s: object to be converted to binary_type :return: binary_type instance, representing s. """ if PY3: # pragma: no cover return s if isinstance(s, binary_type) else binary_type(s, encoding=encoding) return binary_type(s)
[ "def", "to_binary", "(", "s", ",", "encoding", "=", "'utf8'", ")", ":", "if", "PY3", ":", "# pragma: no cover", "return", "s", "if", "isinstance", "(", "s", ",", "binary_type", ")", "else", "binary_type", "(", "s", ",", "encoding", "=", "encoding", ")", "return", "binary_type", "(", "s", ")" ]
Portable cast function. In python 2 the ``str`` function which is used to coerce objects to bytes does not accept an encoding argument, whereas python 3's ``bytes`` function requires one. :param s: object to be converted to binary_type :return: binary_type instance, representing s.
[ "Portable", "cast", "function", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/misc.py#L61-L72
train
Portable cast function.
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,L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RTriYU,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(1910 - 1862) + chr(0b1010100 + 0o33) + '\x31' + '\065' + chr(0b100011 + 0o20), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2320 - 2269) + '\067', 0b1000), nzTpIcepk0o8('\060' + chr(0b1000100 + 0o53) + '\x32' + chr(451 - 402) + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(6671 - 6560) + '\061' + '\x37' + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(2597 - 2546) + chr(0b110011) + chr(0b110101), 29862 - 29854), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(51) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(801 - 753) + '\157' + chr(1508 - 1458) + '\x30' + chr(0b110100), 31209 - 31201), nzTpIcepk0o8(chr(48) + chr(0b111010 + 0o65) + '\x33' + chr(1906 - 1857) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + chr(0b110001) + chr(0b1111 + 0o44), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1011111 + 0o20) + '\062' + chr(55) + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\064' + chr(0b101100 + 0o4), 62964 - 62956), nzTpIcepk0o8(chr(1288 - 1240) + chr(10837 - 10726) + chr(50) + chr(886 - 835) + chr(189 - 141), 34191 - 34183), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(2592 - 2541) + '\x31', 26511 - 26503), nzTpIcepk0o8('\060' + chr(111) + chr(1699 - 1644) + '\065', 0b1000), nzTpIcepk0o8(chr(2041 - 1993) + '\x6f' + chr(2221 - 2172) + chr(561 - 506), 0b1000), nzTpIcepk0o8(chr(1319 - 1271) + chr(111) + '\061' + chr(564 - 515) + chr(0b10111 + 0o32), 51753 - 51745), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(10077 - 9966) + chr(1395 - 1344) + '\x31', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1781 - 1732) + chr(0b110001) + chr(48), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101101 + 0o2) + chr(129 - 79) + '\066' + chr(53), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + '\067' + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(666 - 615) + chr(0b110000) + chr(0b101111 + 0o7), 0b1000), nzTpIcepk0o8(chr(2151 - 2103) + chr(11015 - 10904) + chr(0b110010) + '\x35', 48429 - 48421), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(0b11111 + 0o22) + '\060', 53806 - 53798), nzTpIcepk0o8(chr(1060 - 1012) + '\x6f' + chr(0b110101) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b1 + 0o156) + chr(0b110001) + chr(49) + chr(240 - 189), ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(5499 - 5388) + chr(1090 - 1039) + chr(49) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8628 - 8517) + chr(52) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(927 - 816) + '\x32' + chr(48), 0o10), nzTpIcepk0o8(chr(1178 - 1130) + '\x6f' + chr(0b101111 + 0o3) + chr(0b110010) + '\062', 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(2104 - 1993) + chr(0b11011 + 0o27) + '\x31' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(0b10100 + 0o40), 0o10), nzTpIcepk0o8('\060' + chr(0b10 + 0o155) + '\062' + chr(2820 - 2765) + '\x30', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(2246 - 2192) + '\066', 0o10), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + '\x33' + chr(0b11101 + 0o26) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1001101 + 0o42) + chr(0b100100 + 0o20) + chr(2261 - 2213), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(54) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(1064 - 1016) + '\157' + chr(0b110001) + '\067' + chr(54), 0o10), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(8024 - 7913) + '\061' + chr(55) + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1104 - 1055) + chr(0b110110) + chr(657 - 603), ord("\x08")), nzTpIcepk0o8('\060' + chr(2040 - 1929) + chr(0b1110 + 0o45) + chr(1931 - 1876) + '\x30', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\x6f' + chr(53) + chr(904 - 856), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'E'), chr(0b111011 + 0o51) + chr(101) + chr(0b1100011) + chr(0b1011 + 0o144) + chr(100) + chr(101))(chr(0b111 + 0o156) + '\x74' + chr(549 - 447) + chr(0b101101) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def bhEAsqXoUudo(PmE5_h409JAA, rt5yMsH2WFRk=roI3spqORKae(ES5oEprVxulp(b'\x1ek\xebE'), chr(100) + chr(0b110010 + 0o63) + '\x63' + '\157' + '\x64' + chr(0b10101 + 0o120))('\165' + chr(116) + chr(102) + '\x2d' + '\x38')): if VaX0prbdxKHB: return PmE5_h409JAA if suIjIS24Zkqw(PmE5_h409JAA, OLYjfcDup28L) else OLYjfcDup28L(PmE5_h409JAA, encoding=rt5yMsH2WFRk) return OLYjfcDup28L(PmE5_h409JAA)
clld/clldutils
src/clldutils/misc.py
dict_merged
def dict_merged(d, _filter=None, **kw): """Update dictionary d with the items passed as kw if the value passes _filter.""" def f(s): if _filter: return _filter(s) return s is not None d = d or {} for k, v in iteritems(kw): if f(v): d[k] = v return d
python
def dict_merged(d, _filter=None, **kw): """Update dictionary d with the items passed as kw if the value passes _filter.""" def f(s): if _filter: return _filter(s) return s is not None d = d or {} for k, v in iteritems(kw): if f(v): d[k] = v return d
[ "def", "dict_merged", "(", "d", ",", "_filter", "=", "None", ",", "*", "*", "kw", ")", ":", "def", "f", "(", "s", ")", ":", "if", "_filter", ":", "return", "_filter", "(", "s", ")", "return", "s", "is", "not", "None", "d", "=", "d", "or", "{", "}", "for", "k", ",", "v", "in", "iteritems", "(", "kw", ")", ":", "if", "f", "(", "v", ")", ":", "d", "[", "k", "]", "=", "v", "return", "d" ]
Update dictionary d with the items passed as kw if the value passes _filter.
[ "Update", "dictionary", "d", "with", "the", "items", "passed", "as", "kw", "if", "the", "value", "passes", "_filter", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/misc.py#L75-L85
train
Update dictionary d with the items passed as kw if the value passes _filter.
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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FDT,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' + '\x31' + chr(0b110111) + '\065', 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b110101 + 0o72) + chr(49) + chr(809 - 754) + chr(0b101010 + 0o13), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1011 + 0o46) + chr(0b1111 + 0o44) + chr(1588 - 1538), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(6638 - 6527) + chr(49) + '\063' + chr(0b110010), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2346 - 2296) + chr(0b110110) + chr(54), 44428 - 44420), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + '\061' + chr(983 - 932) + chr(0b110101), 3741 - 3733), nzTpIcepk0o8(chr(1878 - 1830) + chr(10944 - 10833) + '\061' + chr(211 - 160) + chr(0b1011 + 0o45), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b110001 + 0o76) + '\065' + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(0b1000011 + 0o54) + chr(0b110100) + '\x34', 0b1000), nzTpIcepk0o8('\060' + chr(0b1010011 + 0o34) + '\x33' + chr(1585 - 1533) + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(3962 - 3851) + chr(51) + '\066' + chr(815 - 767), ord("\x08")), nzTpIcepk0o8('\x30' + chr(3430 - 3319) + chr(1388 - 1337) + chr(0b110000) + chr(0b1100 + 0o51), ord("\x08")), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101111) + '\x36' + chr(0b10010 + 0o43), 34504 - 34496), nzTpIcepk0o8(chr(693 - 645) + '\x6f' + chr(658 - 605) + chr(0b110101 + 0o1), 59561 - 59553), nzTpIcepk0o8(chr(1218 - 1170) + '\x6f' + chr(957 - 906) + '\064' + chr(2147 - 2092), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b110000) + chr(55 - 5), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + '\064' + chr(0b110111 + 0o0), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100110 + 0o15) + chr(2310 - 2258) + chr(0b110000 + 0o4), 8), nzTpIcepk0o8(chr(2101 - 2053) + chr(0b1101111) + chr(0b11011 + 0o27) + chr(0b110111) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b101100 + 0o103) + chr(521 - 472) + chr(2147 - 2099) + chr(1468 - 1415), ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + chr(0b101000 + 0o13) + '\x35' + chr(0b10011 + 0o36), 0o10), nzTpIcepk0o8(chr(0b110 + 0o52) + '\x6f' + '\x33' + chr(1979 - 1924) + chr(0b10000 + 0o45), ord("\x08")), nzTpIcepk0o8('\x30' + chr(5136 - 5025) + '\061' + chr(980 - 925) + chr(52), 6913 - 6905), nzTpIcepk0o8(chr(0b110000) + chr(0b100110 + 0o111) + '\x32' + '\061' + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + '\062' + chr(0b1 + 0o66) + '\x37', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(423 - 373) + chr(0b110001) + chr(0b100110 + 0o14), 0b1000), nzTpIcepk0o8('\060' + chr(1845 - 1734) + chr(0b110001) + chr(961 - 909), 39024 - 39016), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + chr(0b101100 + 0o6) + chr(266 - 217), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b111 + 0o53) + chr(0b111 + 0o51) + chr(1557 - 1506), 0b1000), nzTpIcepk0o8('\x30' + chr(0b111000 + 0o67) + chr(0b10110 + 0o33) + '\x30' + chr(0b10101 + 0o34), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(0b110110) + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(2039 - 1989) + chr(1994 - 1943) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(10818 - 10707) + chr(0b10101 + 0o35) + '\060' + '\x30', ord("\x08")), nzTpIcepk0o8('\x30' + chr(9163 - 9052) + '\063' + chr(49) + '\x30', 2393 - 2385), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(1533 - 1478) + chr(49), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(0b111 + 0o52) + chr(0b110010), 3650 - 3642), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b110010) + chr(326 - 274), 0o10), nzTpIcepk0o8(chr(48) + chr(6492 - 6381) + chr(481 - 430) + '\067' + chr(0b100 + 0o61), 8), nzTpIcepk0o8('\060' + chr(0b1011111 + 0o20) + chr(63 - 14) + chr(0b11000 + 0o30), 44847 - 44839)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(1624 - 1513) + '\x35' + '\x30', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'S'), '\144' + chr(0b100101 + 0o100) + chr(0b1100011) + chr(0b1101111) + chr(7763 - 7663) + chr(0b101101 + 0o70))('\x75' + chr(116) + '\x66' + '\x2d' + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def g9dFu6jlWvQC(vPPlOXQgR3SM, _4f0PaFpThKG=None, **n_DqV9fOWrXc): def _R8IKF5IwAfX(PmE5_h409JAA): if _4f0PaFpThKG: return _4f0PaFpThKG(PmE5_h409JAA) return PmE5_h409JAA is not None vPPlOXQgR3SM = vPPlOXQgR3SM or {} for (B6UAF1zReOyJ, r7AA1pbLjb44) in tcSkjcrLksk1(n_DqV9fOWrXc): if _R8IKF5IwAfX(r7AA1pbLjb44): vPPlOXQgR3SM[B6UAF1zReOyJ] = r7AA1pbLjb44 return vPPlOXQgR3SM
clld/clldutils
src/clldutils/misc.py
xmlchars
def xmlchars(text): """Not all of UTF-8 is considered valid character data in XML ... Thus, this function can be used to remove illegal characters from ``text``. """ invalid = list(range(0x9)) invalid.extend([0xb, 0xc]) invalid.extend(range(0xe, 0x20)) return re.sub('|'.join('\\x%0.2X' % i for i in invalid), '', text)
python
def xmlchars(text): """Not all of UTF-8 is considered valid character data in XML ... Thus, this function can be used to remove illegal characters from ``text``. """ invalid = list(range(0x9)) invalid.extend([0xb, 0xc]) invalid.extend(range(0xe, 0x20)) return re.sub('|'.join('\\x%0.2X' % i for i in invalid), '', text)
[ "def", "xmlchars", "(", "text", ")", ":", "invalid", "=", "list", "(", "range", "(", "0x9", ")", ")", "invalid", ".", "extend", "(", "[", "0xb", ",", "0xc", "]", ")", "invalid", ".", "extend", "(", "range", "(", "0xe", ",", "0x20", ")", ")", "return", "re", ".", "sub", "(", "'|'", ".", "join", "(", "'\\\\x%0.2X'", "%", "i", "for", "i", "in", "invalid", ")", ",", "''", ",", "text", ")" ]
Not all of UTF-8 is considered valid character data in XML ... Thus, this function can be used to remove illegal characters from ``text``.
[ "Not", "all", "of", "UTF", "-", "8", "is", "considered", "valid", "character", "data", "in", "XML", "..." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/misc.py#L99-L107
train
Remove illegal characters from 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,DB9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cCpS6dh4OT,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(0b1101001 + 0o6) + '\063' + chr(48) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(0b10 + 0o57) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1001 + 0o146) + chr(0b110 + 0o54) + chr(0b10110 + 0o41) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110000 + 0o77) + '\066' + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(4105 - 3994) + chr(0b100111 + 0o13) + '\x32' + '\066', ord("\x08")), nzTpIcepk0o8(chr(62 - 14) + chr(0b1010100 + 0o33) + chr(51) + chr(0b110101) + '\x36', 0b1000), nzTpIcepk0o8('\x30' + chr(0b10000 + 0o137) + chr(0b110001) + '\x30' + '\065', 0o10), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(6025 - 5914) + '\x32' + chr(0b10010 + 0o40) + '\062', 0b1000), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + chr(49) + chr(49) + '\x35', 56771 - 56763), nzTpIcepk0o8('\x30' + chr(344 - 233) + '\063' + chr(1149 - 1097) + chr(0b110101), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(1595 - 1540) + chr(0b1111 + 0o43), 0o10), nzTpIcepk0o8(chr(425 - 377) + '\x6f' + chr(219 - 168) + chr(54), 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + '\062' + chr(0b0 + 0o66) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(10668 - 10557) + chr(0b110011) + chr(0b11100 + 0o24) + '\x36', 8), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\157' + chr(50) + '\x35' + '\064', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b11011 + 0o124) + '\061' + chr(2255 - 2207) + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + chr(4551 - 4440) + chr(2105 - 2053) + chr(0b110010), 25062 - 25054), nzTpIcepk0o8('\060' + chr(10887 - 10776) + chr(0b11010 + 0o27) + chr(1294 - 1240) + chr(0b11010 + 0o34), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(49) + '\061' + chr(0b1111 + 0o45), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8905 - 8794) + chr(51) + '\064' + chr(0b110101), 8), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(4276 - 4165) + chr(0b110001) + chr(52) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b10001 + 0o136) + '\061' + chr(0b110000) + chr(1734 - 1682), 0b1000), nzTpIcepk0o8(chr(2240 - 2192) + '\157' + chr(53) + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(2319 - 2208) + chr(2419 - 2365) + chr(902 - 850), 8), nzTpIcepk0o8(chr(1798 - 1750) + chr(0b1101111) + chr(50) + '\064' + chr(0b100000 + 0o23), 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + chr(0b110010) + chr(50) + '\062', 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b0 + 0o62) + chr(0b110110) + chr(1757 - 1706), 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + chr(484 - 430), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + chr(2149 - 2099) + chr(0b0 + 0o67), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(954 - 901) + chr(48), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\x6f' + chr(49) + '\067' + chr(1230 - 1180), 0o10), nzTpIcepk0o8(chr(1722 - 1674) + chr(10096 - 9985) + chr(0b110001) + chr(49) + '\066', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\066' + chr(0b110110), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b10111 + 0o34) + '\x35' + chr(1283 - 1230), 0b1000), nzTpIcepk0o8('\x30' + chr(4261 - 4150) + '\062' + chr(51) + '\063', 26858 - 26850), nzTpIcepk0o8(chr(1962 - 1914) + chr(0b1101111) + chr(130 - 78) + '\065', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(0b10 + 0o60) + chr(0b111 + 0o57), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(0b110000) + chr(0b1011 + 0o53), ord("\x08")), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b1101111) + chr(0b100000 + 0o23) + chr(1808 - 1755) + chr(54), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + chr(0b0 + 0o64) + chr(0b110000), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(111) + chr(0b11001 + 0o34) + chr(0b110000), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe8'), chr(100) + '\x65' + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b111100 + 0o71) + chr(11608 - 11492) + chr(0b1100110) + chr(45) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Q_RZXT01Dy99(cpStk7cY1TJd): o5KjPLA7GUe8 = H4NoA26ON7iG(bbT2xIe5pzk7(nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1011110 + 0o21) + chr(49) + '\x31', 0b1000))) roI3spqORKae(o5KjPLA7GUe8, roI3spqORKae(ES5oEprVxulp(b'\x92\x16\x8ay\xf9\x8a\t\xc5\x12\xa7\xd8o'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(0b100110 + 0o111) + '\x64' + chr(4313 - 4212))(chr(117) + '\x74' + chr(7164 - 7062) + chr(0b101101) + '\070'))([nzTpIcepk0o8('\x30' + chr(6498 - 6387) + chr(1167 - 1118) + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b11111 + 0o22) + chr(2111 - 2059), 0b1000)]) roI3spqORKae(o5KjPLA7GUe8, roI3spqORKae(ES5oEprVxulp(b'\x92\x16\x8ay\xf9\x8a\t\xc5\x12\xa7\xd8o'), chr(0b1100100) + '\x65' + chr(0b10101 + 0o116) + chr(111) + chr(0b1001010 + 0o32) + chr(3925 - 3824))('\165' + chr(6679 - 6563) + chr(4419 - 4317) + '\055' + '\070'))(bbT2xIe5pzk7(nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + chr(0b100100 + 0o15) + '\x36', 20178 - 20170), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + '\064' + '\x30', ord("\x08")))) return roI3spqORKae(aoTc4YA2bs2R, roI3spqORKae(ES5oEprVxulp(b'\x993\xe9Z\xf2\xa54\xa45\xa8\xddn'), chr(0b1011100 + 0o10) + '\x65' + '\x63' + chr(111) + chr(0b1010111 + 0o15) + chr(101))(chr(0b1110101) + chr(2554 - 2438) + chr(0b10010 + 0o124) + chr(0b10011 + 0o32) + chr(1391 - 1335)))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xba'), chr(0b101101 + 0o67) + '\145' + chr(6355 - 6256) + '\157' + chr(529 - 429) + '\x65')(chr(5547 - 5430) + chr(116) + chr(0b1100110) + '\055' + '\070'), roI3spqORKae(ES5oEprVxulp(b'\x9f}\xc0y\xaf\xac&\xf4\x19\xa6\xf4o'), '\144' + '\x65' + chr(99) + chr(0b1101111) + '\144' + chr(294 - 193))('\165' + chr(13445 - 13329) + chr(0b1110 + 0o130) + chr(45) + '\x38'))((roI3spqORKae(ES5oEprVxulp(b'\x9a1\x9c\x04\xb8\xdc\x1d'), chr(100) + chr(4652 - 4551) + chr(0b111011 + 0o50) + chr(0b1101111) + chr(0b1001101 + 0o27) + '\x65')(chr(0b11011 + 0o132) + '\x74' + chr(4121 - 4019) + chr(0b101101) + '\070') % ZlbFMSG8gCoF for ZlbFMSG8gCoF in o5KjPLA7GUe8)), roI3spqORKae(ES5oEprVxulp(b''), '\144' + chr(3471 - 3370) + '\143' + '\x6f' + chr(0b11001 + 0o113) + chr(0b1100101))(chr(0b11001 + 0o134) + '\x74' + chr(0b1100110) + chr(0b11100 + 0o21) + chr(2811 - 2755)), cpStk7cY1TJd)
clld/clldutils
src/clldutils/misc.py
slug
def slug(s, remove_whitespace=True, lowercase=True): """Condensed version of s, containing only lowercase alphanumeric characters.""" res = ''.join(c for c in unicodedata.normalize('NFD', s) if unicodedata.category(c) != 'Mn') if lowercase: res = res.lower() for c in string.punctuation: res = res.replace(c, '') res = re.sub('\s+', '' if remove_whitespace else ' ', res) res = res.encode('ascii', 'ignore').decode('ascii') assert re.match('[ A-Za-z0-9]*$', res) return res
python
def slug(s, remove_whitespace=True, lowercase=True): """Condensed version of s, containing only lowercase alphanumeric characters.""" res = ''.join(c for c in unicodedata.normalize('NFD', s) if unicodedata.category(c) != 'Mn') if lowercase: res = res.lower() for c in string.punctuation: res = res.replace(c, '') res = re.sub('\s+', '' if remove_whitespace else ' ', res) res = res.encode('ascii', 'ignore').decode('ascii') assert re.match('[ A-Za-z0-9]*$', res) return res
[ "def", "slug", "(", "s", ",", "remove_whitespace", "=", "True", ",", "lowercase", "=", "True", ")", ":", "res", "=", "''", ".", "join", "(", "c", "for", "c", "in", "unicodedata", ".", "normalize", "(", "'NFD'", ",", "s", ")", "if", "unicodedata", ".", "category", "(", "c", ")", "!=", "'Mn'", ")", "if", "lowercase", ":", "res", "=", "res", ".", "lower", "(", ")", "for", "c", "in", "string", ".", "punctuation", ":", "res", "=", "res", ".", "replace", "(", "c", ",", "''", ")", "res", "=", "re", ".", "sub", "(", "'\\s+'", ",", "''", "if", "remove_whitespace", "else", "' '", ",", "res", ")", "res", "=", "res", ".", "encode", "(", "'ascii'", ",", "'ignore'", ")", ".", "decode", "(", "'ascii'", ")", "assert", "re", ".", "match", "(", "'[ A-Za-z0-9]*$'", ",", "res", ")", "return", "res" ]
Condensed version of s, containing only lowercase alphanumeric characters.
[ "Condensed", "version", "of", "s", "containing", "only", "lowercase", "alphanumeric", "characters", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/misc.py#L139-L150
train
Condensed version of s containing only lowercase alphanumeric characters.
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,KSw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b,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(0b10100 + 0o34) + chr(0b1101111) + '\x31' + '\x32' + chr(0b110 + 0o60), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(0b101000 + 0o13) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(1892 - 1844) + chr(0b1101111) + chr(1616 - 1566) + chr(55) + '\062', 0b1000), nzTpIcepk0o8(chr(550 - 502) + chr(0b1101111) + '\x33' + chr(52) + chr(53), 47240 - 47232), nzTpIcepk0o8(chr(2137 - 2089) + chr(111) + chr(0b110010) + chr(53) + chr(48), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2078 - 2028) + chr(0b11000 + 0o31) + chr(0b1001 + 0o52), 30680 - 30672), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1001 + 0o146) + chr(0b110010) + chr(1778 - 1729) + chr(0b10000 + 0o40), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(696 - 585) + chr(49) + chr(1324 - 1274) + chr(48), 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1000001 + 0o56) + chr(0b1000 + 0o52) + chr(0b110111) + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + chr(5464 - 5353) + chr(0b110001) + '\x30' + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1000010 + 0o55) + chr(2464 - 2413) + chr(0b1010 + 0o50) + '\065', 3445 - 3437), nzTpIcepk0o8('\060' + chr(111) + chr(1293 - 1240) + chr(54), 49997 - 49989), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + '\x32' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + '\x31' + chr(681 - 631) + chr(0b100101 + 0o13), 8), nzTpIcepk0o8('\x30' + chr(9112 - 9001) + '\062' + chr(0b110110) + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + '\064' + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(9683 - 9572) + chr(0b100110 + 0o17) + chr(0b10011 + 0o37), 0o10), nzTpIcepk0o8(chr(48) + chr(357 - 246) + chr(0b110001) + chr(54) + chr(1905 - 1854), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(259 - 209) + chr(0b10 + 0o63), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(0b110100) + '\065', 8), nzTpIcepk0o8(chr(146 - 98) + '\x6f' + chr(587 - 539), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\061' + '\x37' + '\062', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b100011 + 0o17) + chr(0b110110) + chr(49), 61540 - 61532), nzTpIcepk0o8('\060' + '\157' + chr(0b111 + 0o52) + chr(1223 - 1170) + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b10000 + 0o43) + chr(55) + '\x34', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + '\067' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1100111 + 0o10) + chr(49) + chr(0b100010 + 0o22) + '\065', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(1498 - 1446) + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(193 - 138) + '\x37', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100101 + 0o20), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + '\x33' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110101) + '\067', 0o10), nzTpIcepk0o8('\060' + chr(1787 - 1676) + '\x32' + chr(0b10000 + 0o41), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1163 - 1112) + '\060' + chr(1766 - 1714), 22646 - 22638), nzTpIcepk0o8(chr(1754 - 1706) + chr(4623 - 4512) + chr(0b110010) + chr(48) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(1343 - 1295) + chr(0b1101111) + chr(0b10 + 0o62) + chr(1585 - 1533), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + '\060' + '\x36', 8), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1101111) + '\067' + chr(0b110101), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b100101 + 0o16) + chr(0b11111 + 0o23) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1100001 + 0o16) + chr(0b100001 + 0o20) + chr(0b10001 + 0o37) + chr(54), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101110 + 0o1) + chr(0b110101) + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'x'), chr(0b1100100) + '\145' + chr(7372 - 7273) + '\x6f' + chr(0b1011101 + 0o7) + chr(0b1100101))(chr(0b1011100 + 0o31) + chr(116) + '\x66' + '\055' + chr(1466 - 1410)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def kMwZMMRH4hj5(PmE5_h409JAA, JKuWPm40lE1v=nzTpIcepk0o8(chr(0b110000) + chr(8100 - 7989) + chr(2385 - 2336), 0o10), n80WZpa11FW0=nzTpIcepk0o8('\x30' + '\157' + chr(0b11100 + 0o25), 8)): _XdQFJpnzJor = roI3spqORKae(ES5oEprVxulp(b''), chr(0b1100100) + chr(0b1100101) + '\x63' + '\157' + chr(100) + chr(0b1100101))('\x75' + chr(11850 - 11734) + chr(4972 - 4870) + chr(45) + chr(573 - 517)).Y4yM9BcfTCNq((teUmM7cKWZUa for teUmM7cKWZUa in jeuASqjicNbT.euRgWTY4eBYM(roI3spqORKae(ES5oEprVxulp(b'\x18\x1f\xfe'), '\144' + chr(0b1001 + 0o134) + chr(0b1100011) + chr(0b1011100 + 0o23) + chr(100) + chr(0b110 + 0o137))(chr(117) + chr(0b101 + 0o157) + chr(102) + '\055' + '\x38'), PmE5_h409JAA) if jeuASqjicNbT.BSrC2NWCyUqG(teUmM7cKWZUa) != roI3spqORKae(ES5oEprVxulp(b'\x1b7'), chr(0b1100100) + '\145' + chr(0b1011101 + 0o6) + chr(0b1101111) + chr(0b1001001 + 0o33) + '\x65')('\x75' + chr(0b1110100) + chr(0b11101 + 0o111) + '\x2d' + chr(0b1110 + 0o52)))) if n80WZpa11FW0: _XdQFJpnzJor = _XdQFJpnzJor.Xn8ENWMZdIRt() for teUmM7cKWZUa in roI3spqORKae(aji3jF4_nqWL, roI3spqORKae(ES5oEprVxulp(b'&,\xd4\x86\xdc\xfe\xe9$\xd0)\xbb'), chr(0b1100100) + chr(0b0 + 0o145) + chr(99) + '\157' + chr(0b1100100) + chr(0b101111 + 0o66))('\165' + '\x74' + chr(102) + chr(45) + chr(56))): _XdQFJpnzJor = _XdQFJpnzJor.E91dbqOZXBpJ(teUmM7cKWZUa, roI3spqORKae(ES5oEprVxulp(b''), chr(8853 - 8753) + '\145' + '\143' + '\x6f' + '\144' + chr(0b1100101))(chr(0b100100 + 0o121) + '\x74' + chr(9043 - 8941) + chr(0b101101) + chr(771 - 715))) _XdQFJpnzJor = aoTc4YA2bs2R._zPndKq6xMgp(roI3spqORKae(ES5oEprVxulp(b'\n*\x91'), chr(435 - 335) + '\x65' + chr(1778 - 1679) + '\157' + chr(1988 - 1888) + '\145')(chr(117) + '\164' + chr(0b1000110 + 0o40) + '\x2d' + chr(0b100011 + 0o25)), roI3spqORKae(ES5oEprVxulp(b''), chr(0b1000110 + 0o36) + chr(9932 - 9831) + chr(0b1001101 + 0o26) + '\157' + chr(0b1 + 0o143) + chr(9627 - 9526))(chr(0b100011 + 0o122) + chr(4104 - 3988) + chr(0b1100110) + chr(0b101101) + '\x38') if JKuWPm40lE1v else roI3spqORKae(ES5oEprVxulp(b'v'), chr(0b1011010 + 0o12) + chr(3270 - 3169) + chr(0b100000 + 0o103) + chr(0b1101111) + chr(0b1100100) + chr(715 - 614))(chr(9865 - 9748) + chr(0b1110100) + '\146' + chr(0b101001 + 0o4) + chr(0b110111 + 0o1)), _XdQFJpnzJor) _XdQFJpnzJor = _XdQFJpnzJor.encode(roI3spqORKae(ES5oEprVxulp(b'7*\xd9\x8c\xc1'), chr(0b1100100) + chr(101) + chr(0b10011 + 0o120) + '\x6f' + '\x64' + '\x65')(chr(0b1110010 + 0o3) + '\164' + '\x66' + chr(0b1000 + 0o45) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'?>\xd4\x8a\xda\xee'), chr(100) + '\145' + '\143' + '\157' + '\144' + chr(317 - 216))(chr(0b1110101) + chr(0b1111 + 0o145) + chr(102) + '\x2d' + chr(56))).lfbFsdWlT3MB(roI3spqORKae(ES5oEprVxulp(b'7*\xd9\x8c\xc1'), '\x64' + chr(101) + chr(0b1100011) + '\x6f' + chr(6581 - 6481) + chr(0b1100101))('\165' + chr(4059 - 3943) + chr(8715 - 8613) + chr(0b100100 + 0o11) + chr(0b111000))) assert roI3spqORKae(aoTc4YA2bs2R, roI3spqORKae(ES5oEprVxulp(b'>2\x83\xaa\xc1\xe1\xe59\xfa\x19\xafo'), chr(100) + chr(0b1011110 + 0o7) + '\x63' + chr(111) + chr(2369 - 2269) + chr(4629 - 4528))(chr(117) + chr(116) + '\x66' + '\055' + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\ry\xfb\xc8\xf2\xea\xa5*\x89k\xecs\xbct'), chr(9053 - 8953) + chr(0b1000010 + 0o43) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(0b111100 + 0o51))(chr(10881 - 10764) + '\x74' + '\x66' + chr(797 - 752) + chr(1906 - 1850)), _XdQFJpnzJor) return _XdQFJpnzJor
clld/clldutils
src/clldutils/misc.py
encoded
def encoded(string, encoding='utf-8'): """Cast string to binary_type. :param string: six.binary_type or six.text_type :param encoding: encoding which the object is forced to :return: six.binary_type """ assert isinstance(string, string_types) or isinstance(string, binary_type) if isinstance(string, text_type): return string.encode(encoding) try: # make sure the string can be decoded in the specified encoding ... string.decode(encoding) return string except UnicodeDecodeError: # ... if not use latin1 as best guess to decode the string before encoding as # specified. return string.decode('latin1').encode(encoding)
python
def encoded(string, encoding='utf-8'): """Cast string to binary_type. :param string: six.binary_type or six.text_type :param encoding: encoding which the object is forced to :return: six.binary_type """ assert isinstance(string, string_types) or isinstance(string, binary_type) if isinstance(string, text_type): return string.encode(encoding) try: # make sure the string can be decoded in the specified encoding ... string.decode(encoding) return string except UnicodeDecodeError: # ... if not use latin1 as best guess to decode the string before encoding as # specified. return string.decode('latin1').encode(encoding)
[ "def", "encoded", "(", "string", ",", "encoding", "=", "'utf-8'", ")", ":", "assert", "isinstance", "(", "string", ",", "string_types", ")", "or", "isinstance", "(", "string", ",", "binary_type", ")", "if", "isinstance", "(", "string", ",", "text_type", ")", ":", "return", "string", ".", "encode", "(", "encoding", ")", "try", ":", "# make sure the string can be decoded in the specified encoding ...", "string", ".", "decode", "(", "encoding", ")", "return", "string", "except", "UnicodeDecodeError", ":", "# ... if not use latin1 as best guess to decode the string before encoding as", "# specified.", "return", "string", ".", "decode", "(", "'latin1'", ")", ".", "encode", "(", "encoding", ")" ]
Cast string to binary_type. :param string: six.binary_type or six.text_type :param encoding: encoding which the object is forced to :return: six.binary_type
[ "Cast", "string", "to", "binary_type", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/misc.py#L153-L170
train
Cast string to binary_type.
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,Wa8JM2k53w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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(0b1001001 + 0o46) + chr(49) + chr(0b110100) + chr(1370 - 1316), 0o10), nzTpIcepk0o8(chr(256 - 208) + chr(2353 - 2242) + '\x33' + chr(0b110100) + chr(1523 - 1473), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(0b1110 + 0o44), 7321 - 7313), nzTpIcepk0o8(chr(2206 - 2158) + chr(0b1101111) + '\063' + chr(0b11 + 0o63) + chr(0b100000 + 0o27), ord("\x08")), nzTpIcepk0o8(chr(911 - 863) + chr(0b1101111) + chr(0b110101) + chr(48), 35700 - 35692), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(0b110000) + '\x35', 13737 - 13729), nzTpIcepk0o8(chr(1293 - 1245) + chr(2453 - 2342) + '\x33' + '\x36' + chr(0b1 + 0o57), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(2338 - 2227) + '\x32' + '\064' + chr(55), 29843 - 29835), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b1000 + 0o52) + '\065' + chr(1699 - 1651), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1011 + 0o144) + '\063' + '\x32' + chr(1406 - 1356), 0b1000), nzTpIcepk0o8(chr(1813 - 1765) + '\157' + chr(49) + '\x34' + chr(49), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100001 + 0o22) + chr(52) + chr(0b11010 + 0o27), 0b1000), nzTpIcepk0o8('\x30' + chr(172 - 61) + chr(0b110010) + '\067' + chr(1416 - 1367), 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + chr(50) + chr(614 - 564) + chr(0b101111 + 0o3), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(54) + '\x30', 8), nzTpIcepk0o8(chr(0b110000) + chr(6984 - 6873) + '\x32' + chr(1260 - 1210) + chr(50), 8), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + '\062' + chr(0b11110 + 0o25), ord("\x08")), nzTpIcepk0o8('\060' + chr(3024 - 2913) + chr(50) + chr(0b110100) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + '\061' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(4900 - 4789) + chr(0b110111) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1100011 + 0o14) + '\062' + chr(50) + '\x35', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b10001 + 0o41) + '\064' + chr(97 - 45), 16571 - 16563), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(109 - 55) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(1739 - 1686) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + '\x35' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(54) + chr(2386 - 2334), 0b1000), nzTpIcepk0o8(chr(850 - 802) + chr(0b1101111) + '\x32' + '\x31' + '\062', 0o10), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(111) + '\x31' + chr(52) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(2109 - 2061) + chr(0b11110 + 0o121) + chr(50) + chr(0b1 + 0o57) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(8232 - 8121) + chr(754 - 704), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(877 - 824) + '\067', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + chr(0b110010) + chr(0b110111), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(1946 - 1894) + chr(0b11110 + 0o31), 8), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(2663 - 2552) + chr(0b110101) + chr(0b1010 + 0o51), 0o10), nzTpIcepk0o8(chr(57 - 9) + chr(0b1101111) + chr(282 - 232) + '\066', 0b1000), nzTpIcepk0o8('\x30' + chr(0b11100 + 0o123) + chr(0b110010) + '\x31' + '\062', 8), nzTpIcepk0o8(chr(1986 - 1938) + chr(111) + chr(0b110000 + 0o1) + '\061', 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\157' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(0b100 + 0o54) + '\x33', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100 + 0o56) + chr(0b110001) + chr(0b110000), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b101000 + 0o107) + chr(0b10101 + 0o40) + chr(0b100 + 0o54), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'H'), '\144' + chr(7682 - 7581) + '\x63' + chr(3727 - 3616) + chr(0b100111 + 0o75) + chr(0b100000 + 0o105))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(1479 - 1434) + chr(0b101010 + 0o16)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def PAcpM6QSP30M(aji3jF4_nqWL, rt5yMsH2WFRk=roI3spqORKae(ES5oEprVxulp(b'\x13\x96l\xda\x10'), chr(100) + '\x65' + chr(0b101000 + 0o73) + chr(111) + '\x64' + chr(0b1100001 + 0o4))('\x75' + '\164' + chr(8493 - 8391) + chr(0b101101) + '\x38')): assert suIjIS24Zkqw(aji3jF4_nqWL, Q9V5WOaImAwl) or suIjIS24Zkqw(aji3jF4_nqWL, OLYjfcDup28L) if suIjIS24Zkqw(aji3jF4_nqWL, H8p5T_wwctMA): return roI3spqORKae(aji3jF4_nqWL, roI3spqORKae(ES5oEprVxulp(b'?\x93C\x96z\x83\x96\xc2\xc7\xe6)\x80'), '\144' + '\145' + '\x63' + '\157' + chr(100) + '\145')('\165' + '\x74' + '\146' + chr(0b101101) + chr(0b111000)))(rt5yMsH2WFRk) try: roI3spqORKae(aji3jF4_nqWL, roI3spqORKae(ES5oEprVxulp(b'\n\x84h\xb1[\xa1\xa7\xcb\xfc\xe1,\xa3'), chr(100) + '\x65' + chr(8018 - 7919) + '\x6f' + '\x64' + chr(0b1100101))('\x75' + '\164' + chr(102) + '\055' + chr(1431 - 1375)))(rt5yMsH2WFRk) return aji3jF4_nqWL except pZy5DBJ8WJod: return roI3spqORKae(aji3jF4_nqWL.decode(roI3spqORKae(ES5oEprVxulp(b'\n\x83~\x9eF\xf4'), chr(9628 - 9528) + chr(0b1000000 + 0o45) + chr(2830 - 2731) + chr(111) + chr(0b111001 + 0o53) + chr(101))(chr(1605 - 1488) + chr(116) + '\x66' + '\055' + chr(0b1010 + 0o56))), roI3spqORKae(ES5oEprVxulp(b'?\x93C\x96z\x83\x96\xc2\xc7\xe6)\x80'), '\144' + chr(101) + chr(7706 - 7607) + chr(0b1011110 + 0o21) + '\x64' + '\145')(chr(0b1 + 0o164) + chr(0b1110100) + chr(5646 - 5544) + chr(1977 - 1932) + chr(0b1010 + 0o56)))(rt5yMsH2WFRk)
clld/clldutils
src/clldutils/path.py
readlines
def readlines(p, encoding=None, strip=False, comment=None, normalize=None, linenumbers=False): """ Read a `list` of lines from a text file. :param p: File path (or `list` or `tuple` of text) :param encoding: Registered codec. :param strip: If `True`, strip leading and trailing whitespace. :param comment: String used as syntax to mark comment lines. When not `None`, \ commented lines will be stripped. This implies `strip=True`. :param normalize: 'NFC', 'NFKC', 'NFD', 'NFKD' :param linenumbers: return also line numbers. :return: `list` of text lines or pairs (`int`, text or `None`). """ if comment: strip = True if isinstance(p, (list, tuple)): res = [l.decode(encoding) if encoding else l for l in p] else: with Path(p).open(encoding=encoding or 'utf-8') as fp: res = fp.readlines() if strip: res = [l.strip() or None for l in res] if comment: res = [None if l and l.startswith(comment) else l for l in res] if normalize: res = [unicodedata.normalize(normalize, l) if l else l for l in res] if linenumbers: return [(n, l) for n, l in enumerate(res, 1)] return [l for l in res if l is not None]
python
def readlines(p, encoding=None, strip=False, comment=None, normalize=None, linenumbers=False): """ Read a `list` of lines from a text file. :param p: File path (or `list` or `tuple` of text) :param encoding: Registered codec. :param strip: If `True`, strip leading and trailing whitespace. :param comment: String used as syntax to mark comment lines. When not `None`, \ commented lines will be stripped. This implies `strip=True`. :param normalize: 'NFC', 'NFKC', 'NFD', 'NFKD' :param linenumbers: return also line numbers. :return: `list` of text lines or pairs (`int`, text or `None`). """ if comment: strip = True if isinstance(p, (list, tuple)): res = [l.decode(encoding) if encoding else l for l in p] else: with Path(p).open(encoding=encoding or 'utf-8') as fp: res = fp.readlines() if strip: res = [l.strip() or None for l in res] if comment: res = [None if l and l.startswith(comment) else l for l in res] if normalize: res = [unicodedata.normalize(normalize, l) if l else l for l in res] if linenumbers: return [(n, l) for n, l in enumerate(res, 1)] return [l for l in res if l is not None]
[ "def", "readlines", "(", "p", ",", "encoding", "=", "None", ",", "strip", "=", "False", ",", "comment", "=", "None", ",", "normalize", "=", "None", ",", "linenumbers", "=", "False", ")", ":", "if", "comment", ":", "strip", "=", "True", "if", "isinstance", "(", "p", ",", "(", "list", ",", "tuple", ")", ")", ":", "res", "=", "[", "l", ".", "decode", "(", "encoding", ")", "if", "encoding", "else", "l", "for", "l", "in", "p", "]", "else", ":", "with", "Path", "(", "p", ")", ".", "open", "(", "encoding", "=", "encoding", "or", "'utf-8'", ")", "as", "fp", ":", "res", "=", "fp", ".", "readlines", "(", ")", "if", "strip", ":", "res", "=", "[", "l", ".", "strip", "(", ")", "or", "None", "for", "l", "in", "res", "]", "if", "comment", ":", "res", "=", "[", "None", "if", "l", "and", "l", ".", "startswith", "(", "comment", ")", "else", "l", "for", "l", "in", "res", "]", "if", "normalize", ":", "res", "=", "[", "unicodedata", ".", "normalize", "(", "normalize", ",", "l", ")", "if", "l", "else", "l", "for", "l", "in", "res", "]", "if", "linenumbers", ":", "return", "[", "(", "n", ",", "l", ")", "for", "n", ",", "l", "in", "enumerate", "(", "res", ",", "1", ")", "]", "return", "[", "l", "for", "l", "in", "res", "if", "l", "is", "not", "None", "]" ]
Read a `list` of lines from a text file. :param p: File path (or `list` or `tuple` of text) :param encoding: Registered codec. :param strip: If `True`, strip leading and trailing whitespace. :param comment: String used as syntax to mark comment lines. When not `None`, \ commented lines will be stripped. This implies `strip=True`. :param normalize: 'NFC', 'NFKC', 'NFD', 'NFKD' :param linenumbers: return also line numbers. :return: `list` of text lines or pairs (`int`, text or `None`).
[ "Read", "a", "list", "of", "lines", "from", "a", "text", "file", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/path.py#L96-L129
train
Read a list of lines from a text 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,mBmBr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k,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' + '\x34' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + '\061' + chr(50), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(52) + chr(0b101010 + 0o6), 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b111111 + 0o60) + chr(0b100000 + 0o21) + chr(0b100 + 0o61) + chr(0b0 + 0o66), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101000 + 0o11) + '\062' + chr(52), 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\x6f' + chr(49) + '\067' + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011100 + 0o23) + '\061' + chr(52) + chr(0b100 + 0o63), 0o10), nzTpIcepk0o8(chr(1879 - 1831) + chr(1074 - 963) + chr(2072 - 2021) + chr(52) + '\060', 0b1000), nzTpIcepk0o8(chr(483 - 435) + chr(2111 - 2000) + chr(49) + chr(0b1000 + 0o56) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10110 + 0o34) + chr(0b110111) + chr(1241 - 1192), 0o10), nzTpIcepk0o8(chr(1751 - 1703) + chr(111) + chr(0b1011 + 0o46) + '\066' + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + chr(222 - 111) + chr(0b11001 + 0o31) + chr(50) + chr(50), 0b1000), nzTpIcepk0o8('\060' + chr(3258 - 3147) + chr(0b110001) + chr(53) + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1327 - 1276) + chr(0b110101) + '\067', 39846 - 39838), nzTpIcepk0o8('\060' + chr(0b100011 + 0o114) + chr(415 - 365) + '\066' + chr(54), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + chr(1974 - 1925) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101 + 0o55) + chr(0b110011) + chr(2201 - 2150), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + '\x35' + chr(0b1000 + 0o55), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11001 + 0o32) + chr(0b1001 + 0o53) + chr(0b110111), 21385 - 21377), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101111) + chr(818 - 769) + chr(2392 - 2343) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + chr(50) + chr(49) + '\060', ord("\x08")), nzTpIcepk0o8('\060' + chr(5899 - 5788) + chr(50) + chr(335 - 287), 52904 - 52896), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + chr(50) + '\x33' + chr(0b10111 + 0o35), 0o10), nzTpIcepk0o8(chr(48) + chr(2718 - 2607) + '\x31' + '\064' + chr(50), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b101010 + 0o105) + '\x37' + chr(0b110001 + 0o2), 4711 - 4703), nzTpIcepk0o8(chr(1215 - 1167) + '\x6f' + '\061' + '\x35' + '\x34', 8), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\x6f' + chr(0b10110 + 0o35) + chr(188 - 133) + chr(1383 - 1329), 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(0b1101111) + chr(52) + chr(0b110010), 8), nzTpIcepk0o8('\x30' + chr(111) + '\063' + '\061' + chr(0b101100 + 0o10), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(1516 - 1467), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1010101 + 0o32) + chr(0b110100) + chr(0b100101 + 0o16), 37690 - 37682), nzTpIcepk0o8(chr(134 - 86) + '\x6f' + '\066' + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110011) + chr(677 - 629) + '\x36', 6858 - 6850), nzTpIcepk0o8(chr(202 - 154) + chr(111) + '\063' + chr(1819 - 1765) + '\060', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100011 + 0o16) + chr(53) + chr(829 - 778), 54533 - 54525), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + '\x34' + '\064', 0b1000), nzTpIcepk0o8(chr(2116 - 2068) + '\157' + chr(0b110010) + chr(52) + chr(0b110000 + 0o4), 21476 - 21468), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\157' + chr(0b110010) + chr(0b10111 + 0o33) + chr(0b110000), 5667 - 5659), nzTpIcepk0o8(chr(2070 - 2022) + chr(0b1101111) + '\061' + chr(1406 - 1358) + chr(1351 - 1300), 0o10), nzTpIcepk0o8(chr(0b11 + 0o55) + '\x6f' + chr(0b110111) + chr(0b110001), 18858 - 18850)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(675 - 627) + '\x6f' + chr(97 - 44) + chr(1560 - 1512), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x0c'), chr(0b1100100) + '\145' + chr(5114 - 5015) + '\x6f' + chr(0b1010101 + 0o17) + chr(0b1100101))(chr(117) + '\164' + '\146' + chr(45) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def TKmlmUjNQ4dY(fSdw5wwLo9MO, rt5yMsH2WFRk=None, kdIDrcwZTCs5=nzTpIcepk0o8('\060' + chr(0b1101111) + '\x30', ord("\x08")), pDgH24rPPCxe=None, euRgWTY4eBYM=None, xh1oV2f3XbSD=nzTpIcepk0o8(chr(0b11101 + 0o23) + '\x6f' + '\060', 8)): if pDgH24rPPCxe: kdIDrcwZTCs5 = nzTpIcepk0o8(chr(48) + '\157' + chr(1575 - 1526), 0o10) if suIjIS24Zkqw(fSdw5wwLo9MO, (H4NoA26ON7iG, nfNqtJL5aRaY)): _XdQFJpnzJor = [fPrVrKACaFCC.lfbFsdWlT3MB(rt5yMsH2WFRk) if rt5yMsH2WFRk else fPrVrKACaFCC for fPrVrKACaFCC in fSdw5wwLo9MO] else: with roI3spqORKae(lljuDAwk2N9X(fSdw5wwLo9MO), roI3spqORKae(ES5oEprVxulp(b'f\xa4u]\x06\n^\xaeG\xd8\x1f\xf3'), chr(0b1100100) + chr(101) + chr(5598 - 5499) + chr(334 - 223) + chr(0b110010 + 0o62) + chr(508 - 407))(chr(13344 - 13227) + chr(1792 - 1676) + chr(3539 - 3437) + '\055' + chr(483 - 427)))(encoding=rt5yMsH2WFRk or roI3spqORKae(ES5oEprVxulp(b'W\xbeFCl'), '\x64' + chr(236 - 135) + '\143' + '\157' + '\x64' + chr(101))(chr(12731 - 12614) + '\x74' + chr(0b1100110) + '\x2d' + chr(0b111000))) as KhXPEIWBXQzE: _XdQFJpnzJor = KhXPEIWBXQzE.TKmlmUjNQ4dY() if kdIDrcwZTCs5: _XdQFJpnzJor = [fPrVrKACaFCC.kdIDrcwZTCs5() or None for fPrVrKACaFCC in _XdQFJpnzJor] if pDgH24rPPCxe: _XdQFJpnzJor = [None if fPrVrKACaFCC and fPrVrKACaFCC.startswith(pDgH24rPPCxe) else fPrVrKACaFCC for fPrVrKACaFCC in _XdQFJpnzJor] if euRgWTY4eBYM: _XdQFJpnzJor = [jeuASqjicNbT.euRgWTY4eBYM(euRgWTY4eBYM, fPrVrKACaFCC) if fPrVrKACaFCC else fPrVrKACaFCC for fPrVrKACaFCC in _XdQFJpnzJor] if xh1oV2f3XbSD: return [(NoZxuO7wjArS, fPrVrKACaFCC) for (NoZxuO7wjArS, fPrVrKACaFCC) in _kV_Bomx8PZ4(_XdQFJpnzJor, nzTpIcepk0o8(chr(1704 - 1656) + '\x6f' + '\x31', 8))] return [fPrVrKACaFCC for fPrVrKACaFCC in _XdQFJpnzJor if fPrVrKACaFCC is not None]
clld/clldutils
src/clldutils/path.py
walk
def walk(p, mode='all', **kw): """Wrapper for `os.walk`, yielding `Path` objects. :param p: root of the directory tree to walk. :param mode: 'all|dirs|files', defaulting to 'all'. :param kw: Keyword arguments are passed to `os.walk`. :return: Generator for the requested Path objects. """ for dirpath, dirnames, filenames in os.walk(as_posix(p), **kw): if mode in ('all', 'dirs'): for dirname in dirnames: yield Path(dirpath).joinpath(dirname) if mode in ('all', 'files'): for fname in filenames: yield Path(dirpath).joinpath(fname)
python
def walk(p, mode='all', **kw): """Wrapper for `os.walk`, yielding `Path` objects. :param p: root of the directory tree to walk. :param mode: 'all|dirs|files', defaulting to 'all'. :param kw: Keyword arguments are passed to `os.walk`. :return: Generator for the requested Path objects. """ for dirpath, dirnames, filenames in os.walk(as_posix(p), **kw): if mode in ('all', 'dirs'): for dirname in dirnames: yield Path(dirpath).joinpath(dirname) if mode in ('all', 'files'): for fname in filenames: yield Path(dirpath).joinpath(fname)
[ "def", "walk", "(", "p", ",", "mode", "=", "'all'", ",", "*", "*", "kw", ")", ":", "for", "dirpath", ",", "dirnames", ",", "filenames", "in", "os", ".", "walk", "(", "as_posix", "(", "p", ")", ",", "*", "*", "kw", ")", ":", "if", "mode", "in", "(", "'all'", ",", "'dirs'", ")", ":", "for", "dirname", "in", "dirnames", ":", "yield", "Path", "(", "dirpath", ")", ".", "joinpath", "(", "dirname", ")", "if", "mode", "in", "(", "'all'", ",", "'files'", ")", ":", "for", "fname", "in", "filenames", ":", "yield", "Path", "(", "dirpath", ")", ".", "joinpath", "(", "fname", ")" ]
Wrapper for `os.walk`, yielding `Path` objects. :param p: root of the directory tree to walk. :param mode: 'all|dirs|files', defaulting to 'all'. :param kw: Keyword arguments are passed to `os.walk`. :return: Generator for the requested Path objects.
[ "Wrapper", "for", "os", ".", "walk", "yielding", "Path", "objects", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/path.py#L148-L162
train
Wrapper for os. walk yielding Path 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,d9st0HqZDng1,knUxyjfq07F9,Fc8q2OvvlH7d,KSw3AkHkJy1a,JD7LadPikpP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Lg8O5zPT,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(0b101001 + 0o106) + chr(50) + chr(53) + '\x37', 58498 - 58490), nzTpIcepk0o8(chr(0b110000) + chr(0b1101 + 0o142) + '\061' + chr(0b10110 + 0o37) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b101010 + 0o105) + chr(50) + '\063' + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(111) + chr(0b110001 + 0o2) + '\x34' + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b11000 + 0o35) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b101011 + 0o104) + chr(417 - 366) + '\067' + chr(0b100001 + 0o17), 0o10), nzTpIcepk0o8(chr(1761 - 1713) + '\157' + chr(517 - 462) + '\064', 28733 - 28725), nzTpIcepk0o8('\x30' + '\157' + chr(1520 - 1469) + chr(343 - 294) + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010) + '\x32' + chr(55), 32783 - 32775), nzTpIcepk0o8('\060' + chr(12258 - 12147) + chr(54) + '\067', 0o10), nzTpIcepk0o8(chr(48) + chr(0b101001 + 0o106) + chr(2245 - 2195) + '\065' + chr(0b101100 + 0o5), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(0b111 + 0o56) + '\x32', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1110 + 0o141) + chr(1660 - 1610) + chr(54) + chr(0b110100), 12926 - 12918), nzTpIcepk0o8(chr(48) + chr(8897 - 8786) + chr(50) + chr(0b110110) + chr(0b10001 + 0o37), 0o10), nzTpIcepk0o8(chr(1242 - 1194) + '\157' + chr(1445 - 1390) + '\x35', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101100 + 0o3) + chr(49) + chr(0b11000 + 0o33) + chr(0b110101), 0b1000), nzTpIcepk0o8('\060' + chr(0b1000111 + 0o50) + chr(1662 - 1611) + chr(2207 - 2157) + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1908 - 1856) + chr(0b101110 + 0o5), ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(874 - 763) + chr(0b11111 + 0o26) + chr(0b101001 + 0o12), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(0b110000) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1010101 + 0o32) + chr(930 - 881) + '\064' + chr(0b11110 + 0o31), ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + chr(49) + chr(0b110011) + chr(1153 - 1098), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\x36' + chr(1831 - 1777), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\061' + '\064', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(49) + chr(156 - 102), ord("\x08")), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + chr(0b110011) + '\x33' + chr(1786 - 1734), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101001 + 0o11) + '\x37' + chr(53), 0o10), nzTpIcepk0o8(chr(48) + chr(3576 - 3465) + chr(50) + chr(52) + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + chr(7968 - 7857) + chr(817 - 767) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + chr(9037 - 8926) + '\062' + chr(0b110010) + '\065', 0b1000), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(9848 - 9737) + chr(601 - 552) + chr(0b1101 + 0o52) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1000000 + 0o57) + chr(0b100110 + 0o13) + '\x36' + chr(1142 - 1093), 11412 - 11404), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1100011 + 0o14) + '\062' + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(8886 - 8775) + chr(1898 - 1848) + chr(53) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(1513 - 1461) + '\x30', 0b1000), nzTpIcepk0o8('\x30' + chr(10563 - 10452) + '\x33' + '\064' + chr(51), 43085 - 43077), nzTpIcepk0o8(chr(48) + chr(0b1111 + 0o140) + chr(49) + chr(2315 - 2262) + chr(0b110111), 8), nzTpIcepk0o8(chr(2108 - 2060) + chr(11330 - 11219) + '\x33' + '\064' + chr(683 - 631), 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + '\062' + chr(0b11111 + 0o27), 0o10), nzTpIcepk0o8(chr(48) + chr(2173 - 2062) + '\063' + chr(0b110110) + '\x35', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(840 - 792) + '\157' + chr(0b1010 + 0o53) + '\060', 17049 - 17041)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x81'), '\x64' + '\145' + chr(0b110100 + 0o57) + chr(111) + chr(0b1100100) + chr(6979 - 6878))(chr(10409 - 10292) + '\x74' + chr(0b1100110) + chr(582 - 537) + chr(0b11001 + 0o37)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def JMVsj1EQTuoZ(fSdw5wwLo9MO, bmJ7SvuZE3jD=roI3spqORKae(ES5oEprVxulp(b'\xce\x03\xf5'), '\144' + '\145' + chr(0b0 + 0o143) + chr(0b1101111) + '\x64' + '\145')('\165' + '\x74' + chr(9399 - 9297) + '\055' + chr(56)), **n_DqV9fOWrXc): for (I2SWgNJaMi9s, KIATV2KkQ1it, EXVYY4cgQiXQ) in roI3spqORKae(aHUqKstZLeS6, roI3spqORKae(ES5oEprVxulp(b'\xe5"\xcf\x97\x04\xc9y\x98\xc3B\xc6\xb0'), '\x64' + chr(0b111101 + 0o50) + '\143' + chr(1991 - 1880) + chr(0b110110 + 0o56) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b111011 + 0o53) + '\x2d' + '\070'))(pWV3rrbZKT_F(fSdw5wwLo9MO), **n_DqV9fOWrXc): if bmJ7SvuZE3jD in (roI3spqORKae(ES5oEprVxulp(b'\xce\x03\xf5'), chr(0b111111 + 0o45) + chr(3148 - 3047) + '\143' + '\x6f' + chr(100) + chr(0b1001101 + 0o30))('\165' + '\x74' + chr(0b1100110) + '\x2d' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xcb\x06\xeb\x97'), chr(0b1100100) + chr(0b1101 + 0o130) + chr(6232 - 6133) + chr(0b1010010 + 0o35) + '\x64' + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(1006 - 961) + chr(56))): for qu5fsQlGSLfc in KIATV2KkQ1it: yield roI3spqORKae(lljuDAwk2N9X(I2SWgNJaMi9s), roI3spqORKae(ES5oEprVxulp(b'\xc5\x00\xf0\x8a\x1e\x99H\xa1'), '\x64' + chr(6092 - 5991) + '\143' + '\157' + '\x64' + chr(0b110110 + 0o57))(chr(3575 - 3458) + chr(3194 - 3078) + '\x66' + '\x2d' + chr(56)))(qu5fsQlGSLfc) if bmJ7SvuZE3jD in (roI3spqORKae(ES5oEprVxulp(b'\xce\x03\xf5'), chr(4637 - 4537) + chr(0b1100101) + chr(0b11001 + 0o112) + '\157' + chr(9182 - 9082) + '\145')('\x75' + '\164' + chr(1221 - 1119) + chr(45) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\xc9\x06\xf5\x81\x1d'), chr(100) + '\x65' + '\x63' + '\x6f' + chr(7175 - 7075) + chr(7900 - 7799))('\165' + chr(4364 - 4248) + chr(0b1100110) + chr(0b101101) + '\x38')): for jXqxEQuu_5DD in EXVYY4cgQiXQ: yield roI3spqORKae(lljuDAwk2N9X(I2SWgNJaMi9s), roI3spqORKae(ES5oEprVxulp(b'\xc5\x00\xf0\x8a\x1e\x99H\xa1'), '\x64' + '\145' + '\x63' + '\x6f' + chr(100) + '\x65')(chr(117) + '\164' + chr(0b100100 + 0o102) + chr(0b101000 + 0o5) + '\x38'))(jXqxEQuu_5DD)
clld/clldutils
src/clldutils/source.py
Source.bibtex
def bibtex(self): """Represent the source in BibTeX format. :return: string encoding the source in BibTeX syntax. """ m = max(itertools.chain(map(len, self), [0])) fields = (" %s = {%s}" % (k.ljust(m), self[k]) for k in self) return "@%s{%s,\n%s\n}" % ( getattr(self.genre, 'value', self.genre), self.id, ",\n".join(fields))
python
def bibtex(self): """Represent the source in BibTeX format. :return: string encoding the source in BibTeX syntax. """ m = max(itertools.chain(map(len, self), [0])) fields = (" %s = {%s}" % (k.ljust(m), self[k]) for k in self) return "@%s{%s,\n%s\n}" % ( getattr(self.genre, 'value', self.genre), self.id, ",\n".join(fields))
[ "def", "bibtex", "(", "self", ")", ":", "m", "=", "max", "(", "itertools", ".", "chain", "(", "map", "(", "len", ",", "self", ")", ",", "[", "0", "]", ")", ")", "fields", "=", "(", "\" %s = {%s}\"", "%", "(", "k", ".", "ljust", "(", "m", ")", ",", "self", "[", "k", "]", ")", "for", "k", "in", "self", ")", "return", "\"@%s{%s,\\n%s\\n}\"", "%", "(", "getattr", "(", "self", ".", "genre", ",", "'value'", ",", "self", ".", "genre", ")", ",", "self", ".", "id", ",", "\",\\n\"", ".", "join", "(", "fields", ")", ")" ]
Represent the source in BibTeX format. :return: string encoding the source in BibTeX syntax.
[ "Represent", "the", "source", "in", "BibTeX", "format", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/source.py#L109-L117
train
Represent the source in BibTeX format.
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,a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Rq9N5ala,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) + '\x6f' + chr(2190 - 2140) + '\062' + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(0b111110 + 0o61) + chr(0b110010) + chr(0b110100) + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(70 - 20) + chr(124 - 72), ord("\x08")), nzTpIcepk0o8('\x30' + chr(7528 - 7417) + chr(0b100000 + 0o26) + chr(0b100001 + 0o25), 18321 - 18313), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1499 - 1448) + chr(55), 30009 - 30001), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + '\x33' + chr(0b110010 + 0o2), 0b1000), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\157' + chr(0b110011) + chr(1910 - 1861) + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + chr(4796 - 4685) + '\062' + chr(0b101110 + 0o5) + chr(1784 - 1734), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(0b10 + 0o65) + '\060', 10790 - 10782), nzTpIcepk0o8('\060' + chr(0b110110 + 0o71) + chr(50) + chr(1791 - 1743) + chr(909 - 860), 21163 - 21155), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(10377 - 10266) + '\063' + chr(2896 - 2842), 26516 - 26508), nzTpIcepk0o8(chr(1151 - 1103) + '\x6f' + '\x31' + chr(52) + chr(49), 46106 - 46098), nzTpIcepk0o8(chr(0b110000) + chr(10391 - 10280) + '\061' + '\063' + chr(0b100111 + 0o17), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4890 - 4779) + chr(0b110010) + chr(0b10001 + 0o43) + chr(1488 - 1440), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(1246 - 1197) + chr(52), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(145 - 94) + chr(0b110110 + 0o1), 46114 - 46106), nzTpIcepk0o8(chr(393 - 345) + '\157' + chr(0b10001 + 0o40) + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1100111 + 0o10) + chr(0b110001) + chr(54) + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(1126 - 1077) + '\065' + chr(0b101011 + 0o7), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(10603 - 10492) + chr(0b110001) + chr(51) + chr(0b110011 + 0o2), 0o10), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1101111) + chr(0b100000 + 0o21) + chr(0b110000 + 0o5) + chr(0b101111 + 0o4), 0b1000), nzTpIcepk0o8(chr(181 - 133) + chr(111) + chr(2405 - 2355) + chr(2990 - 2935) + '\062', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1011 + 0o144) + '\x32' + chr(0b110001) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(2232 - 2184) + chr(111) + '\x31' + chr(0b110111) + chr(0b11100 + 0o31), 2599 - 2591), nzTpIcepk0o8(chr(968 - 920) + chr(6434 - 6323) + chr(213 - 164) + chr(55) + chr(48), 8), nzTpIcepk0o8(chr(1930 - 1882) + '\x6f' + chr(49) + chr(50) + chr(0b10 + 0o61), 27754 - 27746), nzTpIcepk0o8(chr(1502 - 1454) + chr(0b1101111) + chr(0b100010 + 0o17) + '\067' + chr(0b11101 + 0o23), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b10 + 0o60) + chr(0b100 + 0o62) + chr(0b10101 + 0o42), 18042 - 18034), nzTpIcepk0o8('\x30' + chr(0b111010 + 0o65) + chr(51) + '\x31' + chr(442 - 393), 0b1000), nzTpIcepk0o8('\060' + chr(5432 - 5321) + '\x32' + '\060' + chr(0b1011 + 0o53), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(0b110110) + chr(55), 8), nzTpIcepk0o8(chr(1018 - 970) + chr(111) + '\x31' + '\x32' + chr(0b1011 + 0o47), ord("\x08")), nzTpIcepk0o8(chr(1259 - 1211) + chr(0b1100 + 0o143) + '\x34' + chr(591 - 537), 24958 - 24950), nzTpIcepk0o8(chr(1295 - 1247) + '\157' + chr(0b1110 + 0o43) + chr(0b110110) + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101011 + 0o4) + chr(0b110010) + '\063' + chr(516 - 462), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b110100), 16694 - 16686), nzTpIcepk0o8('\060' + chr(2011 - 1900) + chr(0b110001) + '\061' + chr(86 - 37), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101000 + 0o14) + '\x36', 8), nzTpIcepk0o8(chr(761 - 713) + chr(111) + '\061' + '\x33' + '\060', 51951 - 51943), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + '\066' + chr(0b110100), 61137 - 61129)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\157' + chr(0b110101) + chr(0b11000 + 0o30), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xb8'), chr(0b1110 + 0o126) + '\145' + chr(99) + chr(8943 - 8832) + chr(8503 - 8403) + chr(1402 - 1301))(chr(117) + '\x74' + '\x66' + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def CzgytuO5YBnb(hXMPsSrOQzbh): tF75nqoNENFL = KV9ckIhroIia(Tgki_5Gr1fIS.oi0Ceb85lQXd(VVP82lOIz6CD(ftfygxgFas5X, hXMPsSrOQzbh), [nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10001 + 0o37), 0o10)])) ZXDdzgbdtBfz = (roI3spqORKae(ES5oEprVxulp(b'\xb6\x83qE?a\xea\xe1]\xf2c'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(0b1010010 + 0o35) + chr(0b1100100) + chr(8850 - 8749))('\x75' + chr(116) + chr(4843 - 4741) + chr(0b1101 + 0o40) + chr(0b10001 + 0o47)) % (B6UAF1zReOyJ.ljust(tF75nqoNENFL), hXMPsSrOQzbh[B6UAF1zReOyJ]) for B6UAF1zReOyJ in hXMPsSrOQzbh) return roI3spqORKae(ES5oEprVxulp(b"\xd6\x86'M:/\xe6\x90]\xf2\x14\x1c"), '\144' + chr(6660 - 6559) + '\x63' + chr(0b1001000 + 0o47) + chr(0b1000101 + 0o37) + chr(101))(chr(117) + '\x74' + chr(0b1100110) + chr(0b101101) + chr(0b111000)) % (roI3spqORKae(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf1\xc6:Dz'), chr(709 - 609) + chr(101) + '\x63' + chr(0b1101111) + chr(100) + '\145')('\x75' + chr(0b1110100) + chr(8318 - 8216) + chr(1436 - 1391) + chr(56))), roI3spqORKae(ES5oEprVxulp(b'\xe0\xc28Cz'), '\144' + chr(101) + '\143' + chr(0b110000 + 0o77) + '\144' + chr(101))('\x75' + chr(0b1110100) + '\x66' + chr(45) + '\x38'), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf1\xc6:Dz'), chr(0b110000 + 0o64) + chr(3202 - 3101) + '\143' + chr(11165 - 11054) + '\x64' + chr(621 - 520))(chr(117) + chr(116) + '\x66' + '\055' + chr(0b100111 + 0o21)))), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xfb\xc2\x18XS;\xf2\xd5M\xfbN5'), chr(0b11011 + 0o111) + '\145' + chr(5013 - 4914) + chr(2217 - 2106) + chr(0b1100100) + chr(101))('\x75' + '\x74' + chr(0b1100000 + 0o6) + chr(1518 - 1473) + chr(329 - 273))), roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xba\xa9'), '\144' + '\x65' + '\143' + chr(111) + chr(100) + '\x65')(chr(117) + chr(0b1110100) + chr(6027 - 5925) + chr(747 - 702) + chr(2443 - 2387)), roI3spqORKae(ES5oEprVxulp(b'\xcf\x97-{&\x1e\xa9\xfc,\xc2P\x10'), chr(7067 - 6967) + chr(0b1010110 + 0o17) + chr(99) + chr(0b1101111) + chr(0b1101 + 0o127) + chr(0b10011 + 0o122))(chr(117) + chr(0b11101 + 0o127) + '\146' + chr(0b101101) + chr(0b110100 + 0o4)))(ZXDdzgbdtBfz))
clld/clldutils
src/clldutils/source.py
Source.text
def text(self): """Linearize the bib source according to the rules of the unified style. Book: author. year. booktitle. (series, volume.) address: publisher. Article: author. year. title. journal volume(issue). pages. Incollection: author. year. title. In editor (ed.), booktitle, pages. address: publisher. .. seealso:: http://celxj.org/downloads/UnifiedStyleSheet.pdf https://github.com/citation-style-language/styles/blob/master/\ unified-style-linguistics.csl """ genre = getattr(self.genre, 'value', self.genre) pages_at_end = genre in ( 'book', 'phdthesis', 'mastersthesis', 'misc', 'techreport') thesis = genre in ('phdthesis', 'mastersthesis') if self.get('editor'): editors = self['editor'] affix = 'eds' if ' and ' in editors or '&' in editors else 'ed' editors = " %s (%s.)" % (editors, affix) else: editors = None res = [self.get('author', editors), self.get('year', 'n.d')] if genre == 'book': res.append(self.get_with_translation('booktitle') or self.get_with_translation('title')) series = ', '.join(filter(None, [self.get('series'), self.get('volume')])) if series: res.append('(%s.)' % series) elif genre == 'misc': # in case of misc records, we use the note field in case a title is missing. res.append(self.get_with_translation('title') or self.get('note')) else: res.append(self.get_with_translation('title')) if genre == 'article': atom = ' '.join(filter(None, [self.get('journal'), self.get('volume')])) if self.get('issue'): atom += '(%s)' % self['issue'] res.append(atom) res.append(self.get('pages')) elif genre == 'incollection' or genre == 'inproceedings': prefix = 'In' atom = '' if editors: atom += editors if self.get('booktitle'): if atom: atom += ',' atom += " %s" % self.get_with_translation('booktitle') if self.get('pages'): atom += ", %s" % self['pages'] res.append(prefix + atom) else: # check for author to make sure we haven't included the editors yet. if editors and self.get('author'): res.append("In %s" % editors) for attr in [ 'journal', 'volume' if genre != 'book' else None, ]: if attr and self.get(attr): res.append(self.get(attr)) if self.get('issue'): res.append("(%s)" % self['issue']) if not pages_at_end and self.get('pages'): res.append(self['pages']) if self.get('publisher'): res.append(": ".join(filter(None, [self.get('address'), self['publisher']]))) else: if genre == 'misc' and self.get('howpublished'): res.append(self.get('howpublished')) if not thesis and pages_at_end and self.get('pages'): res.append(self['pages'] + 'pp') note = self.get('note') or self._genre_note.get(genre) if note and note not in res: if thesis: joiner = ',' if self.get('school'): note += '{0} {1}'.format(joiner, self.get('school')) joiner = ';' if self.get('pages'): note += '{0} {1}pp.'.format(joiner, self.get('pages')) res.append('(%s)' % note) return ' '.join( x if x.endswith(('.', '.)')) else '%s.' % x for x in res if x)
python
def text(self): """Linearize the bib source according to the rules of the unified style. Book: author. year. booktitle. (series, volume.) address: publisher. Article: author. year. title. journal volume(issue). pages. Incollection: author. year. title. In editor (ed.), booktitle, pages. address: publisher. .. seealso:: http://celxj.org/downloads/UnifiedStyleSheet.pdf https://github.com/citation-style-language/styles/blob/master/\ unified-style-linguistics.csl """ genre = getattr(self.genre, 'value', self.genre) pages_at_end = genre in ( 'book', 'phdthesis', 'mastersthesis', 'misc', 'techreport') thesis = genre in ('phdthesis', 'mastersthesis') if self.get('editor'): editors = self['editor'] affix = 'eds' if ' and ' in editors or '&' in editors else 'ed' editors = " %s (%s.)" % (editors, affix) else: editors = None res = [self.get('author', editors), self.get('year', 'n.d')] if genre == 'book': res.append(self.get_with_translation('booktitle') or self.get_with_translation('title')) series = ', '.join(filter(None, [self.get('series'), self.get('volume')])) if series: res.append('(%s.)' % series) elif genre == 'misc': # in case of misc records, we use the note field in case a title is missing. res.append(self.get_with_translation('title') or self.get('note')) else: res.append(self.get_with_translation('title')) if genre == 'article': atom = ' '.join(filter(None, [self.get('journal'), self.get('volume')])) if self.get('issue'): atom += '(%s)' % self['issue'] res.append(atom) res.append(self.get('pages')) elif genre == 'incollection' or genre == 'inproceedings': prefix = 'In' atom = '' if editors: atom += editors if self.get('booktitle'): if atom: atom += ',' atom += " %s" % self.get_with_translation('booktitle') if self.get('pages'): atom += ", %s" % self['pages'] res.append(prefix + atom) else: # check for author to make sure we haven't included the editors yet. if editors and self.get('author'): res.append("In %s" % editors) for attr in [ 'journal', 'volume' if genre != 'book' else None, ]: if attr and self.get(attr): res.append(self.get(attr)) if self.get('issue'): res.append("(%s)" % self['issue']) if not pages_at_end and self.get('pages'): res.append(self['pages']) if self.get('publisher'): res.append(": ".join(filter(None, [self.get('address'), self['publisher']]))) else: if genre == 'misc' and self.get('howpublished'): res.append(self.get('howpublished')) if not thesis and pages_at_end and self.get('pages'): res.append(self['pages'] + 'pp') note = self.get('note') or self._genre_note.get(genre) if note and note not in res: if thesis: joiner = ',' if self.get('school'): note += '{0} {1}'.format(joiner, self.get('school')) joiner = ';' if self.get('pages'): note += '{0} {1}pp.'.format(joiner, self.get('pages')) res.append('(%s)' % note) return ' '.join( x if x.endswith(('.', '.)')) else '%s.' % x for x in res if x)
[ "def", "text", "(", "self", ")", ":", "genre", "=", "getattr", "(", "self", ".", "genre", ",", "'value'", ",", "self", ".", "genre", ")", "pages_at_end", "=", "genre", "in", "(", "'book'", ",", "'phdthesis'", ",", "'mastersthesis'", ",", "'misc'", ",", "'techreport'", ")", "thesis", "=", "genre", "in", "(", "'phdthesis'", ",", "'mastersthesis'", ")", "if", "self", ".", "get", "(", "'editor'", ")", ":", "editors", "=", "self", "[", "'editor'", "]", "affix", "=", "'eds'", "if", "' and '", "in", "editors", "or", "'&'", "in", "editors", "else", "'ed'", "editors", "=", "\" %s (%s.)\"", "%", "(", "editors", ",", "affix", ")", "else", ":", "editors", "=", "None", "res", "=", "[", "self", ".", "get", "(", "'author'", ",", "editors", ")", ",", "self", ".", "get", "(", "'year'", ",", "'n.d'", ")", "]", "if", "genre", "==", "'book'", ":", "res", ".", "append", "(", "self", ".", "get_with_translation", "(", "'booktitle'", ")", "or", "self", ".", "get_with_translation", "(", "'title'", ")", ")", "series", "=", "', '", ".", "join", "(", "filter", "(", "None", ",", "[", "self", ".", "get", "(", "'series'", ")", ",", "self", ".", "get", "(", "'volume'", ")", "]", ")", ")", "if", "series", ":", "res", ".", "append", "(", "'(%s.)'", "%", "series", ")", "elif", "genre", "==", "'misc'", ":", "# in case of misc records, we use the note field in case a title is missing.", "res", ".", "append", "(", "self", ".", "get_with_translation", "(", "'title'", ")", "or", "self", ".", "get", "(", "'note'", ")", ")", "else", ":", "res", ".", "append", "(", "self", ".", "get_with_translation", "(", "'title'", ")", ")", "if", "genre", "==", "'article'", ":", "atom", "=", "' '", ".", "join", "(", "filter", "(", "None", ",", "[", "self", ".", "get", "(", "'journal'", ")", ",", "self", ".", "get", "(", "'volume'", ")", "]", ")", ")", "if", "self", ".", "get", "(", "'issue'", ")", ":", "atom", "+=", "'(%s)'", "%", "self", "[", "'issue'", "]", "res", ".", "append", "(", "atom", ")", "res", ".", "append", "(", "self", ".", "get", "(", "'pages'", ")", ")", "elif", "genre", "==", "'incollection'", "or", "genre", "==", "'inproceedings'", ":", "prefix", "=", "'In'", "atom", "=", "''", "if", "editors", ":", "atom", "+=", "editors", "if", "self", ".", "get", "(", "'booktitle'", ")", ":", "if", "atom", ":", "atom", "+=", "','", "atom", "+=", "\" %s\"", "%", "self", ".", "get_with_translation", "(", "'booktitle'", ")", "if", "self", ".", "get", "(", "'pages'", ")", ":", "atom", "+=", "\", %s\"", "%", "self", "[", "'pages'", "]", "res", ".", "append", "(", "prefix", "+", "atom", ")", "else", ":", "# check for author to make sure we haven't included the editors yet.", "if", "editors", "and", "self", ".", "get", "(", "'author'", ")", ":", "res", ".", "append", "(", "\"In %s\"", "%", "editors", ")", "for", "attr", "in", "[", "'journal'", ",", "'volume'", "if", "genre", "!=", "'book'", "else", "None", ",", "]", ":", "if", "attr", "and", "self", ".", "get", "(", "attr", ")", ":", "res", ".", "append", "(", "self", ".", "get", "(", "attr", ")", ")", "if", "self", ".", "get", "(", "'issue'", ")", ":", "res", ".", "append", "(", "\"(%s)\"", "%", "self", "[", "'issue'", "]", ")", "if", "not", "pages_at_end", "and", "self", ".", "get", "(", "'pages'", ")", ":", "res", ".", "append", "(", "self", "[", "'pages'", "]", ")", "if", "self", ".", "get", "(", "'publisher'", ")", ":", "res", ".", "append", "(", "\": \"", ".", "join", "(", "filter", "(", "None", ",", "[", "self", ".", "get", "(", "'address'", ")", ",", "self", "[", "'publisher'", "]", "]", ")", ")", ")", "else", ":", "if", "genre", "==", "'misc'", "and", "self", ".", "get", "(", "'howpublished'", ")", ":", "res", ".", "append", "(", "self", ".", "get", "(", "'howpublished'", ")", ")", "if", "not", "thesis", "and", "pages_at_end", "and", "self", ".", "get", "(", "'pages'", ")", ":", "res", ".", "append", "(", "self", "[", "'pages'", "]", "+", "'pp'", ")", "note", "=", "self", ".", "get", "(", "'note'", ")", "or", "self", ".", "_genre_note", ".", "get", "(", "genre", ")", "if", "note", "and", "note", "not", "in", "res", ":", "if", "thesis", ":", "joiner", "=", "','", "if", "self", ".", "get", "(", "'school'", ")", ":", "note", "+=", "'{0} {1}'", ".", "format", "(", "joiner", ",", "self", ".", "get", "(", "'school'", ")", ")", "joiner", "=", "';'", "if", "self", ".", "get", "(", "'pages'", ")", ":", "note", "+=", "'{0} {1}pp.'", ".", "format", "(", "joiner", ",", "self", ".", "get", "(", "'pages'", ")", ")", "res", ".", "append", "(", "'(%s)'", "%", "note", ")", "return", "' '", ".", "join", "(", "x", "if", "x", ".", "endswith", "(", "(", "'.'", ",", "'.)'", ")", ")", "else", "'%s.'", "%", "x", "for", "x", "in", "res", "if", "x", ")" ]
Linearize the bib source according to the rules of the unified style. Book: author. year. booktitle. (series, volume.) address: publisher. Article: author. year. title. journal volume(issue). pages. Incollection: author. year. title. In editor (ed.), booktitle, pages. address: publisher. .. seealso:: http://celxj.org/downloads/UnifiedStyleSheet.pdf https://github.com/citation-style-language/styles/blob/master/\ unified-style-linguistics.csl
[ "Linearize", "the", "bib", "source", "according", "to", "the", "rules", "of", "the", "unified", "style", "." ]
7b8587ef5b56a2fc6cafaff90bc5004355c2b13f
https://github.com/clld/clldutils/blob/7b8587ef5b56a2fc6cafaff90bc5004355c2b13f/src/clldutils/source.py#L131-L235
train
Linearize the bib source according to the rules of the unified style.
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,_1qUu0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3Xup,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(111) + chr(55) + '\064', 45403 - 45395), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1001 + 0o146) + chr(0b101010 + 0o10) + '\x30' + chr(51), 34216 - 34208), nzTpIcepk0o8(chr(877 - 829) + '\157' + '\062' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(51) + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + '\064' + chr(0b110111), 1821 - 1813), nzTpIcepk0o8('\060' + '\157' + chr(793 - 742) + chr(50) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110100) + chr(783 - 732), 6254 - 6246), nzTpIcepk0o8('\x30' + chr(0b11101 + 0o122) + chr(1058 - 1008) + chr(0b110000 + 0o1) + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + '\064' + chr(0b110100 + 0o2), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + '\x35' + chr(2244 - 2196), 0b1000), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + '\063' + '\x30', 35610 - 35602), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + '\067' + chr(0b110101), 33452 - 33444), nzTpIcepk0o8(chr(711 - 663) + '\157' + chr(1814 - 1764) + '\063' + chr(1264 - 1213), 65106 - 65098), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + chr(51) + chr(0b110100), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x32' + chr(53) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + '\064' + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(48) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(2020 - 1970) + chr(48) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1101111) + chr(0b110010) + chr(457 - 405) + chr(253 - 198), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b100111 + 0o16) + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101100 + 0o3) + chr(1619 - 1568) + chr(0b11001 + 0o35) + chr(0b110000 + 0o4), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(390 - 339) + chr(697 - 648) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + '\x34' + chr(1318 - 1266), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b111 + 0o53) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(1557 - 1509) + chr(0b1101111) + chr(1006 - 957) + '\065' + chr(1617 - 1567), 32800 - 32792), nzTpIcepk0o8(chr(0b110000) + chr(0b1100010 + 0o15) + chr(2402 - 2351) + '\061' + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\157' + chr(2160 - 2110) + chr(565 - 513), 45261 - 45253), nzTpIcepk0o8('\x30' + '\157' + '\062' + '\067' + chr(0b10011 + 0o43), ord("\x08")), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(5858 - 5747) + '\x33' + '\064' + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2609 - 2498) + chr(51) + '\064' + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2053 - 2002) + chr(0b110101) + chr(53), 0o10), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b1001011 + 0o44) + chr(0b110011) + '\064' + chr(1649 - 1595), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + '\063' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(9575 - 9464) + chr(1786 - 1737) + chr(55) + chr(54), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(1701 - 1653) + '\157' + chr(50) + chr(0b1100 + 0o46) + chr(0b10101 + 0o41), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2572 - 2521) + chr(49) + chr(0b10110 + 0o36), 53293 - 53285), nzTpIcepk0o8(chr(1943 - 1895) + chr(9103 - 8992) + '\x32' + '\062' + chr(781 - 732), 19562 - 19554), nzTpIcepk0o8('\060' + '\157' + '\061' + chr(52) + chr(54), 2405 - 2397), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(53), 25556 - 25548)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(111) + chr(0b110101) + chr(0b110000), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x12'), chr(6295 - 6195) + chr(0b1100101) + chr(0b1100010 + 0o1) + '\157' + chr(2545 - 2445) + chr(101))(chr(0b100101 + 0o120) + chr(9253 - 9137) + '\x66' + chr(0b101101) + chr(2405 - 2349)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def cpStk7cY1TJd(hXMPsSrOQzbh): R4YYk96umOsS = roI3spqORKae(hXMPsSrOQzbh.genre, roI3spqORKae(ES5oEprVxulp(b'J\xe2y\xab\x02'), chr(0b1100100) + '\145' + chr(0b1100011) + '\x6f' + chr(8039 - 7939) + chr(3682 - 3581))('\x75' + chr(116) + chr(102) + '\x2d' + '\x38'), hXMPsSrOQzbh.genre) MXhcfwOof4FS = R4YYk96umOsS in (roI3spqORKae(ES5oEprVxulp(b'^\xecz\xb5'), chr(0b1100100) + chr(0b1100101) + '\143' + '\x6f' + chr(0b1010100 + 0o20) + '\x65')('\x75' + chr(116) + chr(428 - 326) + chr(0b101101) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'L\xebq\xaa\x0f\xb4P\xe6\x95'), chr(100) + chr(9645 - 9544) + chr(8701 - 8602) + chr(8563 - 8452) + chr(5947 - 5847) + chr(101))(chr(797 - 680) + chr(116) + chr(0b1001000 + 0o36) + '\x2d' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'Q\xe2f\xaa\x02\xa3P\xfb\x8e\x8dk\x14\xe8'), chr(8324 - 8224) + chr(0b1100101) + chr(1459 - 1360) + chr(8313 - 8202) + '\x64' + chr(7517 - 7416))(chr(0b1101110 + 0o7) + '\x74' + chr(0b101000 + 0o76) + chr(1523 - 1478) + '\070'), roI3spqORKae(ES5oEprVxulp(b'Q\xeaf\xbd'), chr(5145 - 5045) + chr(0b1100101) + chr(0b1010000 + 0o23) + chr(2940 - 2829) + chr(100) + '\x65')('\165' + chr(0b1100111 + 0o15) + chr(102) + '\055' + '\070'), roI3spqORKae(ES5oEprVxulp(b'H\xe6v\xb6\x15\xb4S\xe0\x94\x9c'), chr(5271 - 5171) + chr(4097 - 3996) + chr(5071 - 4972) + '\157' + chr(0b1100100) + '\145')(chr(7705 - 7588) + chr(116) + chr(0b11101 + 0o111) + '\055' + chr(56))) FAVWVZB9U0Sr = R4YYk96umOsS in (roI3spqORKae(ES5oEprVxulp(b'L\xebq\xaa\x0f\xb4P\xe6\x95'), '\x64' + '\145' + chr(0b1100011) + '\x6f' + '\144' + chr(8494 - 8393))(chr(12609 - 12492) + chr(0b1011110 + 0o26) + chr(0b10001 + 0o125) + chr(0b101101) + chr(1742 - 1686)), roI3spqORKae(ES5oEprVxulp(b'Q\xe2f\xaa\x02\xa3P\xfb\x8e\x8dk\x14\xe8'), chr(0b1100100) + '\145' + '\143' + '\x6f' + '\x64' + chr(101))(chr(0b1110101) + '\164' + chr(3130 - 3028) + '\x2d' + chr(0b101 + 0o63))) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), chr(100) + chr(0b1100101) + chr(99) + '\x6f' + chr(0b1100100) + '\145')('\x75' + chr(116) + '\146' + chr(45) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'Y\xe7|\xaa\x08\xa3'), '\x64' + chr(8961 - 8860) + chr(0b1100011) + '\x6f' + chr(0b1011110 + 0o6) + '\145')('\165' + chr(0b1100010 + 0o22) + chr(0b1100110) + chr(0b1011 + 0o42) + chr(0b111000))): I9wTl8wySEN_ = hXMPsSrOQzbh[roI3spqORKae(ES5oEprVxulp(b'Y\xe7|\xaa\x08\xa3'), chr(0b1100100) + '\x65' + chr(5679 - 5580) + chr(9491 - 9380) + '\x64' + chr(101))('\x75' + chr(8941 - 8825) + chr(102) + '\x2d' + chr(3010 - 2954))] kb6wEwmw1zA5 = roI3spqORKae(ES5oEprVxulp(b'Y\xe7f'), '\144' + '\145' + '\x63' + chr(0b1101111) + '\x64' + chr(0b111110 + 0o47))(chr(0b1110101) + '\164' + chr(0b1100 + 0o132) + chr(0b101101) + '\x38') if roI3spqORKae(ES5oEprVxulp(b'\x1c\xe2{\xbaG'), chr(100) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(5362 - 5262) + chr(5006 - 4905))(chr(2018 - 1901) + chr(0b1110100) + '\146' + chr(1125 - 1080) + chr(0b11011 + 0o35)) in I9wTl8wySEN_ or roI3spqORKae(ES5oEprVxulp(b'\x1a'), chr(0b101101 + 0o67) + chr(0b10001 + 0o124) + '\143' + '\157' + chr(3141 - 3041) + chr(1756 - 1655))(chr(0b1110101) + chr(116) + chr(0b1100110) + '\x2d' + chr(2913 - 2857)) in I9wTl8wySEN_ else roI3spqORKae(ES5oEprVxulp(b'Y\xe7'), chr(100) + '\145' + '\x63' + chr(0b1101111) + '\x64' + '\145')('\x75' + chr(116) + chr(0b1100110) + chr(45) + chr(0b110110 + 0o2)) I9wTl8wySEN_ = roI3spqORKae(ES5oEprVxulp(b'\x1c\xa6f\xfeO\xf4P\xa1\xcf'), chr(100) + chr(0b1100101) + '\x63' + '\x6f' + chr(3068 - 2968) + chr(0b1100101))(chr(117) + chr(116) + '\146' + chr(45) + '\070') % (I9wTl8wySEN_, kb6wEwmw1zA5) else: I9wTl8wySEN_ = None _XdQFJpnzJor = [hXMPsSrOQzbh.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b']\xf6a\xb6\x08\xa3'), chr(0b1100100) + '\145' + chr(99) + chr(795 - 684) + chr(8969 - 8869) + chr(0b0 + 0o145))('\x75' + chr(116) + chr(6917 - 6815) + chr(45) + '\x38'), I9wTl8wySEN_), hXMPsSrOQzbh.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'E\xe6t\xac'), chr(9455 - 9355) + '\145' + '\143' + '\157' + '\144' + '\x65')(chr(6662 - 6545) + chr(1772 - 1656) + chr(102) + '\055' + chr(709 - 653)), roI3spqORKae(ES5oEprVxulp(b'R\xadq'), '\x64' + '\x65' + chr(8612 - 8513) + '\157' + chr(100) + chr(101))(chr(0b110101 + 0o100) + chr(11304 - 11188) + '\x66' + '\055' + chr(0b111000)))] if R4YYk96umOsS == roI3spqORKae(ES5oEprVxulp(b'^\xecz\xb5'), chr(843 - 743) + '\x65' + chr(2656 - 2557) + chr(111) + '\144' + chr(101))('\x75' + chr(116) + '\146' + '\x2d' + chr(0b11101 + 0o33)): roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b't\xd7F\xea\x1f\xb6d\xe0\x8c\x87MH'), '\x64' + '\145' + chr(99) + '\157' + chr(0b101000 + 0o74) + '\x65')(chr(0b1110101) + chr(5689 - 5573) + chr(8802 - 8700) + '\055' + chr(0b111000)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'[\xe6a\x81\x10\xb8W\xe7\xb9\x9cj\x1c\xf5\xaf\xc3\x82\xb0\xef\xc8B'), '\x64' + chr(0b110100 + 0o61) + chr(0b1100011) + '\157' + '\144' + chr(0b1100101))(chr(117) + chr(0b101101 + 0o107) + chr(0b111001 + 0o55) + chr(0b11101 + 0o20) + chr(0b10111 + 0o41)))(roI3spqORKae(ES5oEprVxulp(b'^\xecz\xb5\x13\xb8W\xe3\x83'), chr(0b1100100) + '\x65' + chr(7253 - 7154) + chr(4383 - 4272) + chr(0b11110 + 0o106) + chr(0b101101 + 0o70))(chr(117) + chr(1098 - 982) + '\146' + chr(0b101101 + 0o0) + chr(0b11011 + 0o35))) or roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'[\xe6a\x81\x10\xb8W\xe7\xb9\x9cj\x1c\xf5\xaf\xc3\x82\xb0\xef\xc8B'), '\144' + chr(0b1100101) + '\143' + chr(0b1101111) + chr(6599 - 6499) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(3717 - 3615) + chr(0b11100 + 0o21) + chr(2855 - 2799)))(roI3spqORKae(ES5oEprVxulp(b'H\xeaa\xb2\x02'), chr(0b1 + 0o143) + '\145' + '\143' + chr(0b1010011 + 0o34) + '\x64' + '\145')(chr(117) + '\164' + chr(0b1010 + 0o134) + '\055' + chr(0b111000)))) TwsKAaNb6gxd = roI3spqORKae(ES5oEprVxulp(b'\x10\xa3'), '\x64' + chr(3319 - 3218) + chr(3191 - 3092) + '\157' + chr(0b1001011 + 0o31) + chr(7121 - 7020))('\165' + chr(0b1110100) + '\x66' + chr(1069 - 1024) + chr(0b11110 + 0o32)).Y4yM9BcfTCNq(qEahrGEDF7Tq(None, [hXMPsSrOQzbh.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'O\xe6g\xb7\x02\xa2'), '\x64' + chr(101) + chr(0b1100011) + chr(111) + chr(100) + chr(101))(chr(117) + chr(5080 - 4964) + chr(0b1100110) + chr(0b101101) + '\070')), hXMPsSrOQzbh.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'J\xecy\xab\n\xb4'), '\x64' + '\145' + chr(0b1001100 + 0o27) + chr(0b1101111) + '\144' + '\145')(chr(0b1110101) + chr(0b1001010 + 0o52) + chr(0b1100110) + chr(0b101 + 0o50) + chr(56)))])) if TwsKAaNb6gxd: roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b't\xd7F\xea\x1f\xb6d\xe0\x8c\x87MH'), '\x64' + '\x65' + chr(99) + '\x6f' + '\144' + chr(1642 - 1541))(chr(0b1110101) + chr(9275 - 9159) + chr(0b1101 + 0o131) + chr(45) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\x14\xa6f\xf0N'), '\144' + '\145' + chr(99) + chr(0b1101111) + chr(0b1100100) + '\145')('\x75' + chr(0b1110100) + chr(0b111111 + 0o47) + chr(45) + chr(2427 - 2371)) % TwsKAaNb6gxd) elif R4YYk96umOsS == roI3spqORKae(ES5oEprVxulp(b'Q\xeaf\xbd'), chr(100) + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(100) + chr(9461 - 9360))(chr(0b111110 + 0o67) + chr(116) + '\146' + chr(0b11011 + 0o22) + chr(0b1111 + 0o51)): roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b't\xd7F\xea\x1f\xb6d\xe0\x8c\x87MH'), chr(0b111 + 0o135) + chr(3054 - 2953) + '\143' + chr(1326 - 1215) + '\x64' + '\x65')(chr(7353 - 7236) + '\x74' + chr(0b110 + 0o140) + chr(0b10 + 0o53) + '\x38'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'[\xe6a\x81\x10\xb8W\xe7\xb9\x9cj\x1c\xf5\xaf\xc3\x82\xb0\xef\xc8B'), chr(0b1100100) + chr(101) + chr(0b110101 + 0o56) + '\x6f' + chr(0b1100100) + chr(9826 - 9725))('\x75' + '\164' + '\x66' + chr(0b101101) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'H\xeaa\xb2\x02'), '\144' + chr(0b1100101) + chr(9161 - 9062) + '\157' + '\x64' + '\x65')(chr(0b1011110 + 0o27) + chr(116) + chr(0b10111 + 0o117) + '\x2d' + '\x38')) or roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), '\x64' + chr(0b1001010 + 0o33) + chr(9764 - 9665) + chr(0b1011011 + 0o24) + chr(0b1001111 + 0o25) + '\145')('\165' + '\164' + '\146' + '\x2d' + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'R\xeca\xbb'), chr(4404 - 4304) + '\x65' + chr(3685 - 3586) + '\157' + chr(0b1100100) + '\x65')(chr(117) + chr(116) + chr(102) + chr(0b101101) + chr(0b111000)))) else: roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b't\xd7F\xea\x1f\xb6d\xe0\x8c\x87MH'), '\144' + chr(0b1100101) + chr(99) + chr(0b1010 + 0o145) + chr(0b1010011 + 0o21) + '\145')(chr(8064 - 7947) + chr(0b110011 + 0o101) + chr(0b101011 + 0o73) + chr(685 - 640) + '\x38'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'[\xe6a\x81\x10\xb8W\xe7\xb9\x9cj\x1c\xf5\xaf\xc3\x82\xb0\xef\xc8B'), chr(0b0 + 0o144) + chr(6661 - 6560) + chr(7518 - 7419) + '\x6f' + chr(0b1100100) + '\x65')(chr(117) + chr(0b101010 + 0o112) + chr(0b1000 + 0o136) + chr(886 - 841) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'H\xeaa\xb2\x02'), chr(100) + chr(0b1100101) + chr(99) + chr(111) + '\144' + '\145')(chr(0b1110101) + '\164' + '\x66' + chr(45) + chr(0b111000)))) if R4YYk96umOsS == roI3spqORKae(ES5oEprVxulp(b']\xf1a\xb7\x04\xbdF'), '\x64' + chr(101) + '\x63' + chr(9463 - 9352) + chr(1097 - 997) + chr(10131 - 10030))('\165' + chr(116) + '\x66' + chr(45) + chr(342 - 286)): TxsSCA9JX5pb = roI3spqORKae(ES5oEprVxulp(b'\x1c'), chr(5044 - 4944) + chr(0b11111 + 0o106) + chr(0b101111 + 0o64) + '\157' + chr(0b1100100) + chr(3599 - 3498))('\x75' + chr(0b100110 + 0o116) + chr(0b1100110) + '\055' + chr(2086 - 2030)).Y4yM9BcfTCNq(qEahrGEDF7Tq(None, [hXMPsSrOQzbh.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'V\xec`\xac\t\xb0O'), chr(100) + chr(0b10111 + 0o116) + chr(99) + '\x6f' + '\144' + chr(0b1100101))(chr(13243 - 13126) + chr(0b1110100) + '\146' + chr(1242 - 1197) + chr(0b111000))), hXMPsSrOQzbh.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'J\xecy\xab\n\xb4'), chr(0b101101 + 0o67) + '\x65' + '\143' + '\157' + '\x64' + chr(0b1100101))('\165' + '\164' + chr(9552 - 9450) + chr(45) + chr(1979 - 1923)))])) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), '\144' + '\x65' + chr(0b1100011) + chr(0b1100000 + 0o17) + chr(0b1010110 + 0o16) + chr(0b10011 + 0o122))(chr(0b1110000 + 0o5) + chr(0b111000 + 0o74) + chr(3154 - 3052) + chr(45) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'U\xf0f\xab\x02'), chr(0b1010011 + 0o21) + chr(8983 - 8882) + '\x63' + chr(0b1101111) + '\x64' + chr(1607 - 1506))('\x75' + chr(0b1100 + 0o150) + chr(9468 - 9366) + chr(0b101 + 0o50) + '\070')): TxsSCA9JX5pb += roI3spqORKae(ES5oEprVxulp(b'\x14\xa6f\xf7'), chr(0b1100100) + chr(101) + chr(0b1001010 + 0o31) + chr(0b1000011 + 0o54) + chr(2343 - 2243) + chr(8293 - 8192))(chr(5920 - 5803) + '\x74' + chr(0b100110 + 0o100) + chr(0b1110 + 0o37) + '\x38') % hXMPsSrOQzbh[roI3spqORKae(ES5oEprVxulp(b'U\xf0f\xab\x02'), chr(0b1011110 + 0o6) + chr(101) + chr(0b1100011 + 0o0) + '\157' + chr(6376 - 6276) + chr(0b1001011 + 0o32))(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b11000 + 0o25) + '\070')] roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b't\xd7F\xea\x1f\xb6d\xe0\x8c\x87MH'), chr(100) + '\x65' + chr(0b100100 + 0o77) + chr(111) + chr(0b1000110 + 0o36) + chr(0b1100101))(chr(5922 - 5805) + chr(0b1110100) + '\x66' + chr(0b101101) + chr(56)))(TxsSCA9JX5pb) roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b't\xd7F\xea\x1f\xb6d\xe0\x8c\x87MH'), '\x64' + chr(101) + chr(0b111111 + 0o44) + chr(111) + chr(0b1100100) + chr(9618 - 9517))(chr(0b10 + 0o163) + '\x74' + chr(0b1100110) + chr(0b10001 + 0o34) + chr(0b111000)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), chr(0b1100100) + '\x65' + '\143' + chr(0b1101111) + chr(8306 - 8206) + chr(8413 - 8312))(chr(0b1110101) + chr(116) + chr(5187 - 5085) + chr(0b10111 + 0o26) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'L\xe2r\xbb\x14'), chr(0b110111 + 0o55) + chr(0b1100101) + '\x63' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1100110) + '\x2d' + chr(0b110011 + 0o5)))) elif R4YYk96umOsS == roI3spqORKae(ES5oEprVxulp(b'U\xedv\xb1\x0b\xbdF\xec\x92\x81w\x13'), chr(7716 - 7616) + '\145' + '\x63' + '\157' + chr(3158 - 3058) + '\145')(chr(2538 - 2421) + '\x74' + chr(102) + chr(0b111 + 0o46) + chr(56)) or R4YYk96umOsS == roI3spqORKae(ES5oEprVxulp(b'U\xede\xac\x08\xb2F\xea\x82\x81v\x1a\xe8'), '\x64' + chr(101) + chr(0b1100011) + chr(9717 - 9606) + chr(235 - 135) + '\145')(chr(7047 - 6930) + chr(5668 - 5552) + chr(0b101011 + 0o73) + chr(0b100010 + 0o13) + chr(0b1101 + 0o53)): ZJwZgaHE72Po = roI3spqORKae(ES5oEprVxulp(b'u\xed'), chr(0b1100100) + chr(0b1100101) + chr(0b1011110 + 0o5) + chr(0b1001001 + 0o46) + chr(0b1100100) + '\145')(chr(0b1001 + 0o154) + chr(2560 - 2444) + chr(556 - 454) + chr(0b101101) + chr(56)) TxsSCA9JX5pb = roI3spqORKae(ES5oEprVxulp(b''), chr(0b1100100) + chr(0b111101 + 0o50) + chr(0b1001010 + 0o31) + '\x6f' + chr(100) + chr(3588 - 3487))(chr(117) + chr(116) + '\146' + chr(0b100011 + 0o12) + chr(0b101110 + 0o12)) if I9wTl8wySEN_: TxsSCA9JX5pb += I9wTl8wySEN_ if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), chr(0b1001101 + 0o27) + chr(1689 - 1588) + chr(99) + chr(0b111000 + 0o67) + '\x64' + chr(101))(chr(0b1110101) + '\x74' + chr(102) + '\x2d' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'^\xecz\xb5\x13\xb8W\xe3\x83'), chr(921 - 821) + chr(0b11010 + 0o113) + chr(5919 - 5820) + chr(111) + chr(0b101100 + 0o70) + chr(101))('\165' + chr(0b1000110 + 0o56) + chr(0b1011110 + 0o10) + chr(45) + chr(2847 - 2791))): if TxsSCA9JX5pb: TxsSCA9JX5pb += roI3spqORKae(ES5oEprVxulp(b'\x10'), chr(100) + '\x65' + '\x63' + chr(111) + chr(9396 - 9296) + chr(0b101110 + 0o67))(chr(0b1100100 + 0o21) + '\164' + chr(0b1100110) + chr(45) + chr(2591 - 2535)) TxsSCA9JX5pb += roI3spqORKae(ES5oEprVxulp(b'\x1c\xa6f'), '\144' + chr(0b1010010 + 0o23) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(8552 - 8451))(chr(117) + chr(116) + chr(102) + chr(290 - 245) + chr(0b110001 + 0o7)) % hXMPsSrOQzbh.get_with_translation(roI3spqORKae(ES5oEprVxulp(b'^\xecz\xb5\x13\xb8W\xe3\x83'), chr(3006 - 2906) + chr(0b101000 + 0o75) + chr(493 - 394) + '\157' + chr(0b110011 + 0o61) + chr(0b111011 + 0o52))('\165' + chr(0b1110100) + '\x66' + chr(0b101101) + chr(0b111000))) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), '\144' + chr(0b1100101) + chr(0b1011110 + 0o5) + '\x6f' + '\x64' + chr(7500 - 7399))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(45) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'L\xe2r\xbb\x14'), chr(100) + chr(0b101111 + 0o66) + chr(6601 - 6502) + '\157' + '\x64' + '\145')(chr(0b1110101) + chr(116) + chr(102) + chr(318 - 273) + '\x38')): TxsSCA9JX5pb += roI3spqORKae(ES5oEprVxulp(b'\x10\xa30\xad'), '\144' + chr(0b11011 + 0o112) + '\x63' + '\157' + '\144' + chr(2539 - 2438))(chr(0b110100 + 0o101) + '\164' + chr(0b1100110) + chr(0b100100 + 0o11) + chr(1385 - 1329)) % hXMPsSrOQzbh[roI3spqORKae(ES5oEprVxulp(b'L\xe2r\xbb\x14'), chr(2189 - 2089) + '\145' + chr(0b10110 + 0o115) + chr(0b1000110 + 0o51) + '\144' + chr(0b1100101 + 0o0))('\x75' + chr(5271 - 5155) + chr(0b1011111 + 0o7) + chr(1100 - 1055) + '\x38')] roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b't\xd7F\xea\x1f\xb6d\xe0\x8c\x87MH'), chr(0b11101 + 0o107) + '\145' + chr(0b1000000 + 0o43) + chr(111) + chr(3309 - 3209) + chr(0b1000111 + 0o36))('\165' + chr(0b1001100 + 0o50) + '\x66' + chr(987 - 942) + chr(0b111000)))(ZJwZgaHE72Po + TxsSCA9JX5pb) else: if I9wTl8wySEN_ and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), '\x64' + chr(0b1 + 0o144) + '\143' + '\157' + '\144' + chr(101))('\165' + '\164' + chr(5612 - 5510) + '\x2d' + chr(252 - 196)))(roI3spqORKae(ES5oEprVxulp(b']\xf6a\xb6\x08\xa3'), '\144' + '\145' + chr(0b101001 + 0o72) + chr(0b1101111) + '\144' + chr(8480 - 8379))('\x75' + chr(0b1110100) + '\x66' + chr(0b1011 + 0o42) + chr(0b1001 + 0o57))): roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b't\xd7F\xea\x1f\xb6d\xe0\x8c\x87MH'), '\x64' + '\145' + '\143' + chr(111) + chr(0b110100 + 0o60) + '\145')('\165' + '\164' + chr(0b1100110) + chr(0b101010 + 0o3) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'u\xed5\xfb\x14'), '\x64' + '\145' + '\x63' + chr(0b1110 + 0o141) + chr(0b111101 + 0o47) + chr(2388 - 2287))('\165' + '\164' + chr(0b11110 + 0o110) + '\x2d' + chr(0b1000 + 0o60)) % I9wTl8wySEN_) for H7gzb3fKphmE in [roI3spqORKae(ES5oEprVxulp(b'V\xec`\xac\t\xb0O'), chr(0b1100100) + chr(101) + chr(8007 - 7908) + chr(111) + '\x64' + '\x65')(chr(0b1110101) + '\x74' + chr(0b101111 + 0o67) + '\x2d' + chr(56)), roI3spqORKae(ES5oEprVxulp(b'J\xecy\xab\n\xb4'), chr(7409 - 7309) + chr(3822 - 3721) + '\143' + chr(6701 - 6590) + chr(1287 - 1187) + chr(0b1100101))(chr(0b1000010 + 0o63) + chr(0b1110100) + '\x66' + '\055' + chr(0b111000)) if R4YYk96umOsS != roI3spqORKae(ES5oEprVxulp(b'^\xecz\xb5'), chr(0b1001001 + 0o33) + chr(0b100 + 0o141) + '\x63' + chr(1379 - 1268) + chr(0b1100100) + chr(0b1011100 + 0o11))('\165' + chr(0b1110100) + chr(4142 - 4040) + chr(0b101101) + '\070') else None]: if H7gzb3fKphmE and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), '\x64' + chr(0b1100101) + chr(99) + chr(111) + '\144' + '\145')(chr(4159 - 4042) + chr(116) + chr(0b1100110) + chr(45) + '\x38'))(H7gzb3fKphmE): roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b't\xd7F\xea\x1f\xb6d\xe0\x8c\x87MH'), chr(100) + chr(4853 - 4752) + chr(8626 - 8527) + '\157' + chr(100) + chr(3213 - 3112))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(2534 - 2478)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), '\144' + chr(0b1000010 + 0o43) + '\x63' + chr(11635 - 11524) + '\144' + chr(3366 - 3265))(chr(117) + chr(116) + chr(0b11111 + 0o107) + chr(527 - 482) + chr(0b101011 + 0o15)))(H7gzb3fKphmE)) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), '\144' + chr(0b1100101) + chr(0b1001000 + 0o33) + chr(8811 - 8700) + chr(0b1010010 + 0o22) + chr(0b111110 + 0o47))(chr(7984 - 7867) + chr(116) + chr(0b110101 + 0o61) + chr(45) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'U\xf0f\xab\x02'), chr(100) + '\145' + '\x63' + '\x6f' + chr(0b1010111 + 0o15) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\055' + chr(0b11101 + 0o33))): roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b't\xd7F\xea\x1f\xb6d\xe0\x8c\x87MH'), chr(6630 - 6530) + chr(4799 - 4698) + chr(1593 - 1494) + chr(1236 - 1125) + chr(6027 - 5927) + chr(0b1100101))('\165' + chr(116) + '\x66' + '\x2d' + chr(0b1110 + 0o52)))(roI3spqORKae(ES5oEprVxulp(b'\x14\xa6f\xf7'), '\x64' + '\x65' + chr(0b1011010 + 0o11) + chr(6948 - 6837) + '\x64' + chr(101))('\165' + chr(3466 - 3350) + '\x66' + chr(0b1111 + 0o36) + '\x38') % hXMPsSrOQzbh[roI3spqORKae(ES5oEprVxulp(b'U\xf0f\xab\x02'), chr(1653 - 1553) + '\145' + chr(0b1100011) + chr(9065 - 8954) + chr(2125 - 2025) + '\x65')('\165' + '\164' + '\x66' + '\055' + chr(742 - 686))]) if not MXhcfwOof4FS and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), chr(4231 - 4131) + chr(5651 - 5550) + chr(0b1100011) + chr(0b101011 + 0o104) + chr(0b1100100) + '\145')('\x75' + '\x74' + chr(0b1100110) + chr(1219 - 1174) + chr(3062 - 3006)))(roI3spqORKae(ES5oEprVxulp(b'L\xe2r\xbb\x14'), chr(0b1000 + 0o134) + chr(4308 - 4207) + '\x63' + '\x6f' + '\144' + '\x65')(chr(117) + chr(6794 - 6678) + chr(8967 - 8865) + chr(45) + chr(1222 - 1166))): roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b't\xd7F\xea\x1f\xb6d\xe0\x8c\x87MH'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(4326 - 4215) + chr(0b1100100) + chr(0b100011 + 0o102))(chr(117) + chr(9433 - 9317) + '\x66' + '\055' + chr(56)))(hXMPsSrOQzbh[roI3spqORKae(ES5oEprVxulp(b'L\xe2r\xbb\x14'), chr(8920 - 8820) + '\x65' + chr(99) + chr(0b1101111) + chr(0b10100 + 0o120) + '\145')(chr(117) + '\x74' + chr(0b100000 + 0o106) + '\x2d' + chr(0b111 + 0o61))]) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), chr(100) + chr(6315 - 6214) + '\143' + chr(7084 - 6973) + '\x64' + chr(101))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(1632 - 1587) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'L\xf6w\xb2\x0e\xa2K\xea\x94'), chr(0b1011011 + 0o11) + chr(8209 - 8108) + '\x63' + chr(0b1011 + 0o144) + '\x64' + '\x65')(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(45) + chr(56))): roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b't\xd7F\xea\x1f\xb6d\xe0\x8c\x87MH'), '\x64' + chr(101) + '\x63' + '\157' + chr(0b1100 + 0o130) + chr(0b1100101))('\x75' + chr(0b1001000 + 0o54) + '\146' + chr(0b101101) + chr(3086 - 3030)))(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\x06\xa3'), chr(0b1000100 + 0o40) + chr(0b1100101) + chr(0b1010 + 0o131) + '\x6f' + '\144' + '\145')(chr(3600 - 3483) + chr(116) + chr(102) + chr(0b100101 + 0o10) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'e\xb7l\x93^\x93@\xe9\xb2\xabV\x0c'), chr(1233 - 1133) + chr(1422 - 1321) + chr(0b111 + 0o134) + chr(0b1101111) + '\144' + chr(7913 - 7812))('\x75' + '\164' + chr(4929 - 4827) + chr(45) + '\x38'))(qEahrGEDF7Tq(None, [roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), chr(0b1100100) + chr(0b1 + 0o144) + chr(0b1000011 + 0o40) + chr(8427 - 8316) + '\144' + chr(101))(chr(117) + chr(116) + chr(0b11011 + 0o113) + '\055' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b']\xe7q\xac\x02\xa2P'), chr(0b1011110 + 0o6) + chr(6319 - 6218) + chr(9084 - 8985) + chr(0b100000 + 0o117) + chr(3064 - 2964) + chr(0b1100101))(chr(117) + '\164' + chr(102) + chr(45) + chr(0b111000))), hXMPsSrOQzbh[roI3spqORKae(ES5oEprVxulp(b'L\xf6w\xb2\x0e\xa2K\xea\x94'), chr(0b1100100) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(7201 - 7101) + chr(0b1100101))(chr(0b1110101) + '\x74' + '\x66' + chr(45) + '\x38')]]))) elif R4YYk96umOsS == roI3spqORKae(ES5oEprVxulp(b'Q\xeaf\xbd'), chr(0b1100100) + chr(0b110110 + 0o57) + chr(7669 - 7570) + chr(7908 - 7797) + chr(0b1101 + 0o127) + '\x65')(chr(12871 - 12754) + '\164' + chr(0b101000 + 0o76) + chr(0b101101) + chr(56)) and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), chr(100) + chr(101) + chr(0b1011001 + 0o12) + chr(111) + '\144' + '\145')(chr(0b10011 + 0o142) + '\164' + chr(0b1100110) + chr(45) + chr(0b11100 + 0o34)))(roI3spqORKae(ES5oEprVxulp(b'T\xecb\xae\x12\xb3O\xe6\x95\x80}\x19'), chr(0b1000111 + 0o35) + '\145' + '\143' + chr(0b10111 + 0o130) + chr(100) + chr(101))(chr(117) + '\164' + chr(102) + chr(0b101101) + chr(0b110010 + 0o6))): roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b't\xd7F\xea\x1f\xb6d\xe0\x8c\x87MH'), '\144' + '\145' + chr(0b100111 + 0o74) + chr(111) + chr(0b11000 + 0o114) + chr(101))(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(0b101101) + chr(0b110001 + 0o7)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), chr(0b1100100) + '\x65' + '\x63' + chr(111) + chr(0b1100010 + 0o2) + '\145')('\165' + chr(0b1110100) + chr(7481 - 7379) + chr(0b101101) + chr(1218 - 1162)))(roI3spqORKae(ES5oEprVxulp(b'T\xecb\xae\x12\xb3O\xe6\x95\x80}\x19'), chr(0b11 + 0o141) + chr(101) + chr(0b1100011) + chr(111) + '\x64' + chr(0b11111 + 0o106))(chr(0b1001000 + 0o55) + chr(116) + chr(0b1000111 + 0o37) + '\055' + chr(0b111000)))) if not FAVWVZB9U0Sr and MXhcfwOof4FS and roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), '\x64' + chr(101) + '\x63' + chr(0b101011 + 0o104) + '\x64' + '\x65')(chr(10734 - 10617) + chr(8874 - 8758) + chr(5616 - 5514) + chr(972 - 927) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'L\xe2r\xbb\x14'), chr(100) + '\x65' + '\x63' + chr(0b1100000 + 0o17) + chr(100) + chr(0b1100101))('\165' + chr(0b100110 + 0o116) + '\x66' + '\055' + chr(0b111000))): roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b't\xd7F\xea\x1f\xb6d\xe0\x8c\x87MH'), chr(0b1100100) + chr(0b1100101) + chr(1483 - 1384) + chr(111) + chr(8635 - 8535) + chr(0b1010110 + 0o17))(chr(0b11010 + 0o133) + chr(0b0 + 0o164) + chr(7766 - 7664) + '\x2d' + '\070'))(hXMPsSrOQzbh[roI3spqORKae(ES5oEprVxulp(b'L\xe2r\xbb\x14'), chr(0b101 + 0o137) + '\145' + chr(99) + '\157' + chr(0b1011001 + 0o13) + '\x65')('\165' + chr(0b111111 + 0o65) + chr(4858 - 4756) + '\055' + '\x38')] + roI3spqORKae(ES5oEprVxulp(b'L\xf3'), chr(100) + chr(0b10010 + 0o123) + chr(0b1100011) + chr(111) + chr(0b1100100) + '\x65')(chr(0b1011110 + 0o27) + '\164' + chr(102) + chr(1167 - 1122) + '\x38')) dVamRRpm0eOX = hXMPsSrOQzbh.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'R\xeca\xbb'), chr(100) + chr(0b1100101) + chr(0b111100 + 0o47) + chr(0b1101111) + '\x64' + chr(101))(chr(0b11 + 0o162) + chr(0b1110100) + chr(102) + chr(0b10001 + 0o34) + chr(1363 - 1307))) or hXMPsSrOQzbh._genre_note.GUKetu4xaGsJ(R4YYk96umOsS) if dVamRRpm0eOX and dVamRRpm0eOX not in _XdQFJpnzJor: if FAVWVZB9U0Sr: lbLqpgFiZlWe = roI3spqORKae(ES5oEprVxulp(b'\x10'), chr(9400 - 9300) + chr(0b101100 + 0o71) + '\x63' + chr(0b1111 + 0o140) + chr(0b1110 + 0o126) + chr(0b1100101))(chr(117) + '\x74' + '\x66' + chr(0b1110 + 0o37) + chr(0b111000)) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), chr(0b1100100) + chr(0b1100101) + chr(99) + chr(5696 - 5585) + '\x64' + '\x65')(chr(4909 - 4792) + chr(0b1101000 + 0o14) + '\146' + chr(0b101101) + chr(0b100100 + 0o24)))(roI3spqORKae(ES5oEprVxulp(b'O\xe0}\xb1\x08\xbd'), chr(100) + chr(9519 - 9418) + chr(0b1100011) + chr(0b1001001 + 0o46) + chr(4692 - 4592) + chr(101))(chr(903 - 786) + '\164' + chr(0b1011001 + 0o15) + chr(0b101101) + '\x38')): dVamRRpm0eOX += roI3spqORKae(ES5oEprVxulp(b'G\xb3h\xfe\x1c\xe0^'), chr(100) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(0b1001011 + 0o31) + chr(4898 - 4797))('\165' + '\x74' + chr(102) + '\055' + chr(0b10100 + 0o44)).q33KG3foQ_CJ(lbLqpgFiZlWe, hXMPsSrOQzbh.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'O\xe0}\xb1\x08\xbd'), chr(1465 - 1365) + '\x65' + '\x63' + chr(0b11110 + 0o121) + chr(0b10101 + 0o117) + chr(101))('\165' + chr(0b1110100) + chr(0b1100110) + '\055' + chr(56)))) lbLqpgFiZlWe = roI3spqORKae(ES5oEprVxulp(b'\x07'), chr(3885 - 3785) + '\145' + chr(99) + '\157' + chr(0b1100100) + '\x65')('\x75' + chr(116) + chr(0b1100110) + chr(410 - 365) + chr(1281 - 1225)) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'{\xd6^\xbb\x13\xa4\x17\xf7\x87\xafk7'), '\144' + chr(0b1011111 + 0o6) + chr(0b1010001 + 0o22) + chr(0b1101111) + chr(100) + chr(0b101000 + 0o75))(chr(5270 - 5153) + chr(0b1110100) + chr(102) + '\x2d' + chr(0b1 + 0o67)))(roI3spqORKae(ES5oEprVxulp(b'L\xe2r\xbb\x14'), chr(0b1001111 + 0o25) + '\145' + '\x63' + '\x6f' + chr(100) + chr(0b1100101))('\x75' + chr(0b1000011 + 0o61) + '\x66' + chr(862 - 817) + chr(2170 - 2114))): dVamRRpm0eOX += roI3spqORKae(ES5oEprVxulp(b'G\xb3h\xfe\x1c\xe0^\xff\x96\xc6'), '\x64' + chr(9812 - 9711) + chr(99) + '\157' + chr(1790 - 1690) + '\145')('\165' + chr(11310 - 11194) + chr(7057 - 6955) + chr(0b101000 + 0o5) + chr(0b111000)).q33KG3foQ_CJ(lbLqpgFiZlWe, hXMPsSrOQzbh.GUKetu4xaGsJ(roI3spqORKae(ES5oEprVxulp(b'L\xe2r\xbb\x14'), chr(0b1011001 + 0o13) + chr(7327 - 7226) + chr(0b1100011) + chr(0b1010010 + 0o35) + chr(0b110101 + 0o57) + chr(10116 - 10015))(chr(0b1101010 + 0o13) + '\x74' + '\x66' + '\x2d' + chr(2191 - 2135)))) roI3spqORKae(_XdQFJpnzJor, roI3spqORKae(ES5oEprVxulp(b't\xd7F\xea\x1f\xb6d\xe0\x8c\x87MH'), chr(0b10000 + 0o124) + chr(1391 - 1290) + chr(479 - 380) + '\x6f' + '\x64' + '\x65')('\x75' + chr(4142 - 4026) + '\x66' + chr(45) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\x14\xa6f\xf7'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(0b1011 + 0o144) + chr(0b1011101 + 0o7) + chr(101))(chr(117) + chr(116) + chr(0b1100110) + chr(0b1010 + 0o43) + chr(2652 - 2596)) % dVamRRpm0eOX) return roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\x1c'), '\144' + chr(101) + '\143' + chr(0b1111 + 0o140) + chr(100) + '\145')(chr(0b10101 + 0o140) + chr(2547 - 2431) + chr(102) + '\055' + chr(0b100 + 0o64)), roI3spqORKae(ES5oEprVxulp(b'e\xb7l\x93^\x93@\xe9\xb2\xabV\x0c'), chr(100) + chr(101) + '\143' + chr(0b1101111) + chr(6182 - 6082) + chr(0b1000100 + 0o41))(chr(7634 - 7517) + chr(0b1110100) + chr(7346 - 7244) + chr(0b10001 + 0o34) + chr(2191 - 2135)))((bI5jsQ9OkQtj if roI3spqORKae(bI5jsQ9OkQtj, roI3spqORKae(ES5oEprVxulp(b'u\xbas\x95.\x92b\xc3\x87\x9dR\x0f'), chr(0b10 + 0o142) + chr(0b11001 + 0o114) + chr(99) + chr(111) + chr(8831 - 8731) + '\x65')('\165' + chr(116) + chr(0b100111 + 0o77) + chr(76 - 31) + chr(0b110 + 0o62)))((roI3spqORKae(ES5oEprVxulp(b'\x12'), chr(100) + '\x65' + chr(2762 - 2663) + '\x6f' + '\x64' + chr(0b1100101))(chr(0b11000 + 0o135) + chr(0b111011 + 0o71) + chr(102) + chr(0b10010 + 0o33) + chr(2846 - 2790)), roI3spqORKae(ES5oEprVxulp(b'\x12\xaa'), '\144' + '\145' + chr(0b100101 + 0o76) + chr(111) + chr(3284 - 3184) + chr(1030 - 929))(chr(117) + chr(0b111011 + 0o71) + chr(0b1100110) + chr(0b100100 + 0o11) + '\070'))) else roI3spqORKae(ES5oEprVxulp(b'\x19\xf0;'), chr(0b1100100) + '\x65' + chr(99) + chr(111) + '\x64' + chr(101))(chr(0b1100000 + 0o25) + '\x74' + '\146' + chr(746 - 701) + '\070') % bI5jsQ9OkQtj for bI5jsQ9OkQtj in _XdQFJpnzJor if bI5jsQ9OkQtj))
messagebird/python-rest-api
messagebird/client.py
Client.request
def request(self, path, method='GET', params=None, type=REST_TYPE): """Builds a request, gets a response and decodes it.""" response_text = self._get_http_client(type).request(path, method, params) if not response_text: return response_text response_json = json.loads(response_text) if 'errors' in response_json: raise (ErrorException([Error().load(e) for e in response_json['errors']])) return response_json
python
def request(self, path, method='GET', params=None, type=REST_TYPE): """Builds a request, gets a response and decodes it.""" response_text = self._get_http_client(type).request(path, method, params) if not response_text: return response_text response_json = json.loads(response_text) if 'errors' in response_json: raise (ErrorException([Error().load(e) for e in response_json['errors']])) return response_json
[ "def", "request", "(", "self", ",", "path", ",", "method", "=", "'GET'", ",", "params", "=", "None", ",", "type", "=", "REST_TYPE", ")", ":", "response_text", "=", "self", ".", "_get_http_client", "(", "type", ")", ".", "request", "(", "path", ",", "method", ",", "params", ")", "if", "not", "response_text", ":", "return", "response_text", "response_json", "=", "json", ".", "loads", "(", "response_text", ")", "if", "'errors'", "in", "response_json", ":", "raise", "(", "ErrorException", "(", "[", "Error", "(", ")", ".", "load", "(", "e", ")", "for", "e", "in", "response_json", "[", "'errors'", "]", "]", ")", ")", "return", "response_json" ]
Builds a request, gets a response and decodes it.
[ "Builds", "a", "request", "gets", "a", "response", "and", "decodes", "it", "." ]
fb7864f178135f92d09af803bee93270e99f3963
https://github.com/messagebird/python-rest-api/blob/fb7864f178135f92d09af803bee93270e99f3963/messagebird/client.py#L52-L64
train
Builds a request gets a response and decodes it.
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,jZIjKu8IFAN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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(289 - 241) + '\157' + '\x32' + '\x37' + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b10100 + 0o133) + '\063' + chr(0b110100) + chr(54), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b11111 + 0o120) + chr(0b110001) + chr(50) + chr(0b1110 + 0o46), 2512 - 2504), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(0b110010) + chr(448 - 399), 0o10), nzTpIcepk0o8('\x30' + chr(0b10100 + 0o133) + chr(0b110011) + '\067' + chr(0b1101 + 0o43), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(0b100000 + 0o22), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + '\x37' + chr(0b110110), 41698 - 41690), nzTpIcepk0o8('\060' + chr(6793 - 6682) + chr(50) + '\x33' + chr(0b1011 + 0o53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1311 - 1262) + chr(0b10 + 0o60) + chr(1072 - 1022), ord("\x08")), nzTpIcepk0o8(chr(1732 - 1684) + chr(4706 - 4595) + chr(1492 - 1440) + chr(52), 0o10), nzTpIcepk0o8('\x30' + chr(1111 - 1000) + chr(51) + '\x32' + '\065', 53684 - 53676), nzTpIcepk0o8('\x30' + chr(8961 - 8850) + chr(50) + chr(1354 - 1303) + chr(326 - 272), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49) + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1011000 + 0o27) + '\x32' + chr(0b110011 + 0o3) + '\x37', 0o10), nzTpIcepk0o8(chr(1912 - 1864) + chr(0b1101100 + 0o3) + '\067' + chr(0b101001 + 0o7), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(480 - 431), 0b1000), nzTpIcepk0o8('\060' + chr(0b11001 + 0o126) + chr(0b110001) + '\067' + '\x36', 8), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(0b110001) + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\063' + '\062' + chr(2874 - 2820), ord("\x08")), nzTpIcepk0o8(chr(1905 - 1857) + chr(111) + chr(1798 - 1749) + chr(1315 - 1261) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(2119 - 2071) + chr(0b1101111) + chr(0b110001) + '\x37' + '\x31', 48971 - 48963), nzTpIcepk0o8(chr(0b110000) + chr(0b1000000 + 0o57) + '\063' + chr(0b0 + 0o65) + chr(559 - 508), ord("\x08")), nzTpIcepk0o8(chr(2261 - 2213) + '\157' + chr(50) + '\064' + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1001010 + 0o45) + chr(0b100 + 0o61) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(1620 - 1572) + '\x6f' + chr(0b111 + 0o54) + '\064' + chr(89 - 41), 0o10), nzTpIcepk0o8('\060' + chr(0b1001000 + 0o47) + '\x36' + chr(150 - 101), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(48) + '\067', 9247 - 9239), nzTpIcepk0o8(chr(0b110000) + chr(12191 - 12080) + chr(0b110001) + '\066' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(1862 - 1812) + '\060' + '\x34', 0o10), nzTpIcepk0o8('\060' + chr(0b1001 + 0o146) + '\x32' + chr(1632 - 1578) + '\067', 8), nzTpIcepk0o8(chr(0b110000) + chr(9004 - 8893) + chr(49) + chr(0b1010 + 0o55) + '\060', 7468 - 7460), nzTpIcepk0o8(chr(1986 - 1938) + chr(7541 - 7430) + chr(0b101101 + 0o5) + chr(1960 - 1910) + chr(52), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2008 - 1958) + chr(0b10110 + 0o37) + chr(1634 - 1584), ord("\x08")), nzTpIcepk0o8(chr(850 - 802) + chr(0b11010 + 0o125) + '\063' + '\063' + chr(48), 0b1000), nzTpIcepk0o8(chr(0b110 + 0o52) + '\x6f' + '\x33' + chr(0b10001 + 0o45) + '\x36', 0b1000), nzTpIcepk0o8('\060' + chr(7101 - 6990) + '\062' + chr(0b110111) + '\x36', 17397 - 17389), nzTpIcepk0o8(chr(0b110000) + chr(12316 - 12205) + chr(49) + chr(0b110001) + chr(0b100001 + 0o21), 6989 - 6981), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(111) + '\066' + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2083 - 2034) + chr(55) + chr(262 - 213), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(510 - 462) + '\x6f' + '\x35' + chr(0b110000), 28842 - 28834)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x93'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(5628 - 5517) + chr(0b1100100) + chr(7171 - 7070))(chr(0b1011010 + 0o33) + '\164' + chr(0b1010000 + 0o26) + '\x2d' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def fXJOkxXvZqV_(hXMPsSrOQzbh, _pSYqrosNb95, e5rcHW8hR5dL=roI3spqORKae(ES5oEprVxulp(b'\xfa\xa3F'), '\144' + chr(101) + chr(0b1011 + 0o130) + chr(9340 - 9229) + chr(0b10110 + 0o116) + chr(0b0 + 0o145))(chr(117) + '\x74' + '\x66' + chr(0b101101) + chr(0b111000)), GVgFAYMz7Sw8=None, MJ07XsN5uFgW=rQOrLxi7JTcS): UDdHGVThAG3H = hXMPsSrOQzbh._get_http_client(MJ07XsN5uFgW).fXJOkxXvZqV_(_pSYqrosNb95, e5rcHW8hR5dL, GVgFAYMz7Sw8) if not UDdHGVThAG3H: return UDdHGVThAG3H nKDGeUwNBNq3 = LNUKEwZDIbyb.OiapAM4bM0Ea(UDdHGVThAG3H) if roI3spqORKae(ES5oEprVxulp(b'\xd8\x94`;\xe3\x8b'), chr(0b1000010 + 0o42) + chr(0b1100101) + '\x63' + chr(0b1100001 + 0o16) + '\x64' + '\x65')(chr(0b1100110 + 0o17) + chr(116) + chr(0b1001010 + 0o34) + chr(0b101101) + '\070') in nKDGeUwNBNq3: raise bB19_y3IdIDr([roI3spqORKae(qzKJvU2YY6AI(), roI3spqORKae(ES5oEprVxulp(b"\xe7\xa3@'\xf5\x9b=\x1d\xaf6\x1c\x90"), chr(7050 - 6950) + chr(101) + chr(99) + '\157' + chr(513 - 413) + chr(1489 - 1388))(chr(0b1011100 + 0o31) + '\x74' + chr(102) + chr(45) + chr(56)))(wgf0sgcu_xPL) for wgf0sgcu_xPL in nKDGeUwNBNq3[roI3spqORKae(ES5oEprVxulp(b'\xd8\x94`;\xe3\x8b'), '\x64' + '\145' + chr(99) + chr(3798 - 3687) + chr(100) + '\x65')(chr(0b1110101 + 0o0) + chr(3178 - 3062) + chr(6963 - 6861) + chr(0b101101) + '\070')]]) return nKDGeUwNBNq3
messagebird/python-rest-api
messagebird/client.py
Client.hlr_create
def hlr_create(self, msisdn, reference): """Perform a new HLR lookup.""" return HLR().load(self.request('hlr', 'POST', {'msisdn': msisdn, 'reference': reference}))
python
def hlr_create(self, msisdn, reference): """Perform a new HLR lookup.""" return HLR().load(self.request('hlr', 'POST', {'msisdn': msisdn, 'reference': reference}))
[ "def", "hlr_create", "(", "self", ",", "msisdn", ",", "reference", ")", ":", "return", "HLR", "(", ")", ".", "load", "(", "self", ".", "request", "(", "'hlr'", ",", "'POST'", ",", "{", "'msisdn'", ":", "msisdn", ",", "'reference'", ":", "reference", "}", ")", ")" ]
Perform a new HLR lookup.
[ "Perform", "a", "new", "HLR", "lookup", "." ]
fb7864f178135f92d09af803bee93270e99f3963
https://github.com/messagebird/python-rest-api/blob/fb7864f178135f92d09af803bee93270e99f3963/messagebird/client.py#L92-L94
train
Perform a new HLR lookup.
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(0b110000) + '\157' + chr(1163 - 1113) + chr(0b101 + 0o53) + '\067', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(258 - 203) + '\060', 49809 - 49801), nzTpIcepk0o8(chr(48) + chr(0b100010 + 0o115) + chr(0b110011) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + '\x32' + '\x36', 6348 - 6340), nzTpIcepk0o8(chr(2278 - 2230) + chr(0b1011000 + 0o27) + chr(272 - 222) + chr(0b110010) + '\x33', 0o10), nzTpIcepk0o8(chr(762 - 714) + chr(6350 - 6239) + chr(0b110010) + chr(702 - 649) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(94 - 44) + '\063' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(1732 - 1684) + chr(11684 - 11573) + '\062' + '\x36' + chr(1958 - 1910), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(1783 - 1735) + chr(1745 - 1690), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b110000) + chr(53), 0b1000), nzTpIcepk0o8(chr(2213 - 2165) + chr(111) + '\x31' + '\x31' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(8363 - 8252) + chr(0b110110) + chr(244 - 193), 10989 - 10981), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001 + 0o6) + '\061', 0o10), nzTpIcepk0o8('\x30' + chr(0b1001 + 0o146) + chr(50) + chr(55) + chr(0b1000 + 0o56), 58881 - 58873), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b0 + 0o61) + chr(2327 - 2272) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(926 - 878) + chr(111) + chr(51) + chr(2220 - 2166), 43892 - 43884), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(0b110100) + chr(1427 - 1375), ord("\x08")), nzTpIcepk0o8('\x30' + chr(10371 - 10260) + chr(0b110010) + chr(0b110010) + chr(51), 8), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b110 + 0o151) + '\x32' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + '\060' + chr(0b1001 + 0o52), 56293 - 56285), nzTpIcepk0o8(chr(463 - 415) + '\x6f' + chr(0b11000 + 0o32) + '\066' + chr(52), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + '\067' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(275 - 226) + '\x37' + chr(55), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(2396 - 2342) + '\064', 8), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + '\066' + chr(49), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(985 - 933) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(111) + chr(49) + chr(0b1011 + 0o54) + chr(0b11011 + 0o33), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(49) + chr(568 - 520), ord("\x08")), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(6595 - 6484) + '\x32' + chr(0b100001 + 0o17), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1010000 + 0o37) + '\x33' + '\x32', 8), nzTpIcepk0o8(chr(240 - 192) + chr(0b1101111) + '\x32', 21232 - 21224), nzTpIcepk0o8('\x30' + '\x6f' + chr(803 - 753) + chr(0b10110 + 0o40) + chr(91 - 39), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + '\065' + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100111 + 0o13) + chr(0b110100) + '\x36', 0b1000), nzTpIcepk0o8(chr(48) + chr(2147 - 2036) + '\063' + chr(1692 - 1642) + chr(0b1110 + 0o51), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b101000 + 0o107) + '\x33' + '\067' + chr(0b10111 + 0o35), 0o10), nzTpIcepk0o8('\x30' + chr(8347 - 8236) + '\x31' + '\x32' + '\x36', 0b1000), nzTpIcepk0o8('\060' + chr(0b1011101 + 0o22) + chr(180 - 129) + '\065' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\066' + chr(0b110000), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(541 - 493) + chr(0b100011 + 0o114) + chr(53) + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa9'), '\144' + '\145' + chr(99) + chr(111) + chr(100) + chr(101))(chr(9621 - 9504) + chr(0b1110100) + chr(7499 - 7397) + chr(0b101101) + chr(2324 - 2268)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Gu2g32kgdBlC(hXMPsSrOQzbh, EslDOu0FjTfz, USoNBjlAQ1w9): return roI3spqORKae(UfDYq_OcmPKp(), roI3spqORKae(ES5oEprVxulp(b'\xdd\xfdH\xe5\xf7\xca\xac\xd3\xb6\xe1rv'), chr(0b1100100) + chr(0b1101 + 0o130) + chr(0b1011001 + 0o12) + chr(0b1101111) + '\x64' + chr(0b101110 + 0o67))(chr(0b1110101) + chr(1978 - 1862) + chr(0b110 + 0o140) + chr(0b101101) + chr(0b111000)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe1\xe0P\xd9\xf8\xd1\xc3\xc6\xdd\xf4\x1cl'), '\x64' + chr(7670 - 7569) + chr(6800 - 6701) + chr(8424 - 8313) + chr(0b10000 + 0o124) + chr(101))('\165' + chr(3615 - 3499) + chr(5713 - 5611) + '\055' + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xef\xd4h'), chr(8166 - 8066) + chr(0b11101 + 0o110) + chr(0b1001111 + 0o24) + '\x6f' + '\x64' + '\145')(chr(0b1110101) + chr(116) + chr(5534 - 5432) + chr(45) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'\xd7\xf7I\xc2'), chr(100) + '\145' + '\143' + '\x6f' + chr(0b10001 + 0o123) + chr(0b1100000 + 0o5))(chr(117) + '\164' + chr(0b1100110) + '\055' + '\070'), {roI3spqORKae(ES5oEprVxulp(b'\xea\xcbs\xe5\xf7\xc7'), chr(4162 - 4062) + chr(0b1100101) + '\x63' + chr(1156 - 1045) + chr(0b10111 + 0o115) + '\145')(chr(0b111101 + 0o70) + '\164' + chr(0b1001100 + 0o32) + chr(45) + '\070'): EslDOu0FjTfz, roI3spqORKae(ES5oEprVxulp(b'\xf5\xdd|\xf3\xe1\xcc\xf5\xd3\xe2'), chr(0b1100100) + chr(0b1100000 + 0o5) + chr(0b1000101 + 0o36) + '\x6f' + chr(8738 - 8638) + chr(0b1000 + 0o135))(chr(0b111101 + 0o70) + '\164' + '\x66' + chr(0b101101) + '\x38'): USoNBjlAQ1w9}))
messagebird/python-rest-api
messagebird/client.py
Client.message_create
def message_create(self, originator, recipients, body, params=None): """Create a new message.""" if params is None: params = {} if type(recipients) == list: recipients = ','.join(recipients) params.update({'originator': originator, 'body': body, 'recipients': recipients}) return Message().load(self.request('messages', 'POST', params))
python
def message_create(self, originator, recipients, body, params=None): """Create a new message.""" if params is None: params = {} if type(recipients) == list: recipients = ','.join(recipients) params.update({'originator': originator, 'body': body, 'recipients': recipients}) return Message().load(self.request('messages', 'POST', params))
[ "def", "message_create", "(", "self", ",", "originator", ",", "recipients", ",", "body", ",", "params", "=", "None", ")", ":", "if", "params", "is", "None", ":", "params", "=", "{", "}", "if", "type", "(", "recipients", ")", "==", "list", ":", "recipients", "=", "','", ".", "join", "(", "recipients", ")", "params", ".", "update", "(", "{", "'originator'", ":", "originator", ",", "'body'", ":", "body", ",", "'recipients'", ":", "recipients", "}", ")", "return", "Message", "(", ")", ".", "load", "(", "self", ".", "request", "(", "'messages'", ",", "'POST'", ",", "params", ")", ")" ]
Create a new message.
[ "Create", "a", "new", "message", "." ]
fb7864f178135f92d09af803bee93270e99f3963
https://github.com/messagebird/python-rest-api/blob/fb7864f178135f92d09af803bee93270e99f3963/messagebird/client.py#L100-L107
train
Create a new 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_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqet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U2,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(736 - 688) + chr(10737 - 10626) + chr(50) + chr(1577 - 1529) + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1110 + 0o45) + chr(0b11001 + 0o36) + chr(48), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(10036 - 9925) + '\062' + chr(0b110100) + '\064', 59455 - 59447), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\x6f' + chr(49) + chr(0b101111 + 0o3) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(996 - 941) + chr(55), ord("\x08")), nzTpIcepk0o8('\060' + chr(11840 - 11729) + chr(0b10011 + 0o40) + '\x34' + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + '\065' + '\061', ord("\x08")), nzTpIcepk0o8(chr(72 - 24) + chr(0b1101111) + '\061' + chr(0b110001) + '\062', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + '\x35' + chr(1041 - 993), 55352 - 55344), nzTpIcepk0o8('\x30' + chr(6207 - 6096) + chr(938 - 888) + '\063', ord("\x08")), nzTpIcepk0o8(chr(2245 - 2197) + chr(8019 - 7908) + '\061' + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1000010 + 0o55) + chr(0b100 + 0o57) + chr(0b100100 + 0o21) + chr(707 - 656), ord("\x08")), nzTpIcepk0o8(chr(1950 - 1902) + chr(8375 - 8264) + chr(1105 - 1054), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10111 + 0o33) + chr(617 - 569) + '\066', 22857 - 22849), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(4937 - 4826) + chr(2087 - 2038) + chr(51) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(174 - 126) + chr(0b1101111) + chr(53) + '\x34', 55882 - 55874), nzTpIcepk0o8(chr(723 - 675) + chr(111) + '\x32' + chr(0b101111 + 0o1) + chr(54), 8), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1101111) + chr(55) + chr(1329 - 1281), 22993 - 22985), nzTpIcepk0o8(chr(950 - 902) + chr(0b1101111) + chr(0b110011) + chr(0b101111 + 0o2) + chr(0b10011 + 0o35), 0b1000), nzTpIcepk0o8(chr(1166 - 1118) + '\x6f' + '\x33' + chr(53) + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(1456 - 1403) + chr(0b100011 + 0o15), 8), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + '\x35' + '\066', 44109 - 44101), nzTpIcepk0o8(chr(1453 - 1405) + chr(0b1111 + 0o140) + chr(426 - 375) + chr(0b110011) + chr(0b100000 + 0o20), 0b1000), nzTpIcepk0o8(chr(1463 - 1415) + '\x6f' + '\063' + '\063' + chr(738 - 688), 61010 - 61002), nzTpIcepk0o8(chr(1908 - 1860) + chr(10682 - 10571) + '\067' + chr(0b100110 + 0o15), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1000100 + 0o53) + chr(2349 - 2300) + chr(0b110111) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(0b110101) + chr(1461 - 1410), 8), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + '\061' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(48) + chr(1397 - 1342), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(1752 - 1702) + chr(50) + '\x33', 50118 - 50110), nzTpIcepk0o8(chr(690 - 642) + chr(0b1101111) + chr(50) + chr(55) + '\064', 64451 - 64443), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(349 - 299) + chr(0b11001 + 0o34) + chr(0b101010 + 0o10), 14685 - 14677), nzTpIcepk0o8(chr(375 - 327) + chr(111) + chr(2389 - 2338) + chr(49) + '\x33', 33758 - 33750), nzTpIcepk0o8(chr(0b110 + 0o52) + '\x6f' + chr(0b110011) + chr(55) + chr(48), 8), nzTpIcepk0o8(chr(1620 - 1572) + chr(7621 - 7510) + chr(2019 - 1970) + chr(54) + chr(0b100110 + 0o15), 57885 - 57877), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(51) + chr(2276 - 2223), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(2886 - 2832) + chr(0b100010 + 0o20), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1000 + 0o51) + chr(0b110111) + chr(51), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(1939 - 1888) + '\065', 43390 - 43382)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\157' + chr(53) + chr(2186 - 2138), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xab'), chr(100) + '\145' + '\x63' + chr(0b101101 + 0o102) + chr(0b1100100) + chr(0b1100101))(chr(982 - 865) + chr(0b1100000 + 0o24) + '\146' + chr(1347 - 1302) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Of5ZEF8LAlei(hXMPsSrOQzbh, cuBrYP6RoQJk, Ljm2D9K8RPXv, ryRPGaxqs24n, GVgFAYMz7Sw8=None): if GVgFAYMz7Sw8 is None: GVgFAYMz7Sw8 = {} if suIjIS24Zkqw(Ljm2D9K8RPXv, H4NoA26ON7iG): Ljm2D9K8RPXv = roI3spqORKae(ES5oEprVxulp(b'\xa9'), '\144' + chr(0b1100100 + 0o1) + chr(99) + '\x6f' + chr(0b110101 + 0o57) + chr(0b1100101))(chr(117) + '\164' + '\146' + chr(0b101101) + chr(0b111000)).Y4yM9BcfTCNq(Ljm2D9K8RPXv) roI3spqORKae(GVgFAYMz7Sw8, roI3spqORKae(ES5oEprVxulp(b'\xcf\xa7\xcfgv\xbc\xeb{\x8bvx\x85'), chr(0b1100100) + '\x65' + chr(99) + '\x6f' + chr(0b10010 + 0o122) + chr(0b1100101))(chr(471 - 354) + '\164' + chr(102) + chr(786 - 741) + chr(0b101 + 0o63)))({roI3spqORKae(ES5oEprVxulp(b'\xea\x8a\xcd2V\x8b\xc8>\x87a'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(6189 - 6078) + chr(0b1100100) + chr(8108 - 8007))(chr(117) + chr(116) + chr(8872 - 8770) + chr(1326 - 1281) + chr(56)): cuBrYP6RoQJk, roI3spqORKae(ES5oEprVxulp(b'\xe7\x97\xc0,'), chr(8453 - 8353) + chr(0b1000111 + 0o36) + '\143' + chr(0b10111 + 0o130) + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(45) + '\x38'): ryRPGaxqs24n, roI3spqORKae(ES5oEprVxulp(b'\xf7\x9d\xc7<O\x8c\xcc$\x9c`'), chr(9607 - 9507) + '\145' + '\143' + chr(0b101100 + 0o103) + chr(2251 - 2151) + chr(5608 - 5507))(chr(0b1110101) + chr(0b1101000 + 0o14) + '\x66' + chr(0b101101) + chr(359 - 303)): Ljm2D9K8RPXv}) return roI3spqORKae(jKfo5sq23P4w(), roI3spqORKae(ES5oEprVxulp(b'\xdf\xbd\xf6&[\x86\x9e)\xd9w1\xae'), chr(0b1100010 + 0o2) + chr(0b1100101) + chr(0b1100011) + chr(0b1010101 + 0o32) + chr(100) + chr(101))(chr(0b1110101) + '\x74' + chr(0b101001 + 0o75) + '\055' + chr(0b10111 + 0o41)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe3\xa0\xee\x1aT\x9d\xf1<\xb2b_\xb4'), chr(3130 - 3030) + chr(0b1000101 + 0o40) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(6622 - 6505) + '\x74' + '\x66' + chr(0b101101) + chr(0b101000 + 0o20)))(roI3spqORKae(ES5oEprVxulp(b'\xe8\x9d\xd7&^\x82\xcc9'), '\x64' + '\x65' + chr(0b1100011) + '\157' + chr(0b1000111 + 0o35) + '\145')(chr(968 - 851) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(0b100111 + 0o21)), roI3spqORKae(ES5oEprVxulp(b'\xd5\xb7\xf7\x01'), chr(3129 - 3029) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(100) + chr(101))('\165' + chr(6619 - 6503) + '\x66' + chr(789 - 744) + '\x38'), GVgFAYMz7Sw8))
messagebird/python-rest-api
messagebird/client.py
Client.voice_message_create
def voice_message_create(self, recipients, body, params=None): """Create a new voice message.""" if params is None: params = {} if type(recipients) == list: recipients = ','.join(recipients) params.update({'recipients': recipients, 'body': body}) return VoiceMessage().load(self.request('voicemessages', 'POST', params))
python
def voice_message_create(self, recipients, body, params=None): """Create a new voice message.""" if params is None: params = {} if type(recipients) == list: recipients = ','.join(recipients) params.update({'recipients': recipients, 'body': body}) return VoiceMessage().load(self.request('voicemessages', 'POST', params))
[ "def", "voice_message_create", "(", "self", ",", "recipients", ",", "body", ",", "params", "=", "None", ")", ":", "if", "params", "is", "None", ":", "params", "=", "{", "}", "if", "type", "(", "recipients", ")", "==", "list", ":", "recipients", "=", "','", ".", "join", "(", "recipients", ")", "params", ".", "update", "(", "{", "'recipients'", ":", "recipients", ",", "'body'", ":", "body", "}", ")", "return", "VoiceMessage", "(", ")", ".", "load", "(", "self", ".", "request", "(", "'voicemessages'", ",", "'POST'", ",", "params", ")", ")" ]
Create a new voice message.
[ "Create", "a", "new", "voice", "message", "." ]
fb7864f178135f92d09af803bee93270e99f3963
https://github.com/messagebird/python-rest-api/blob/fb7864f178135f92d09af803bee93270e99f3963/messagebird/client.py#L117-L124
train
Create a new voice 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_,ze1AhR_jfpze,ej204HIOxzoZ,_1qUu0gKi9gH,Wa8JM2k53wi5,aFaxROHyT7UJ,ZOdpVDJPWn4I,LqOf4dRsAg72,K3alqetBMgas,ZtIuyIq3ta7g,UIHY5MV5X5uS,C60ELahXqfKV,FB4_7GjVy3pW,wXIYU_4UfQFa,jZIjKu8IFANs,REazVyvp6OIp,pZy5DBJ8WJod,aP29ipGsOVzf,YikXQdxs3VoO,UBvEeZympYSz,mRTjF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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' + chr(1449 - 1398), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + '\x32' + '\x35', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(372 - 321) + chr(2293 - 2239) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(1448 - 1400) + chr(5587 - 5476) + '\063' + '\x36' + chr(49), 91 - 83), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100101 + 0o16) + chr(50) + chr(0b11101 + 0o27), 36118 - 36110), nzTpIcepk0o8(chr(0b110000) + chr(0b1011 + 0o144) + chr(0b110001) + '\x33' + '\064', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b11101 + 0o122) + '\x33' + '\x34' + chr(53), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(735 - 682), 0b1000), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b0 + 0o157) + '\063' + chr(0b1111 + 0o42) + chr(0b100001 + 0o25), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b110010) + chr(54), 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\157' + chr(0b110001) + '\x30' + chr(2140 - 2086), 0o10), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + chr(50) + '\x30' + chr(0b110110), 34236 - 34228), nzTpIcepk0o8(chr(1745 - 1697) + chr(0b11110 + 0o121) + chr(2053 - 2003) + chr(0b110000), 0o10), nzTpIcepk0o8('\x30' + chr(0b101 + 0o152) + chr(0b110001) + chr(0b110010), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(2116 - 2066) + chr(54), 8), nzTpIcepk0o8('\060' + chr(1134 - 1023) + chr(0b110011) + chr(0b110010) + chr(1192 - 1138), 0b1000), nzTpIcepk0o8(chr(182 - 134) + '\x6f' + chr(0b110001) + '\x33' + '\060', 40349 - 40341), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(53) + '\060', 51721 - 51713), nzTpIcepk0o8(chr(2136 - 2088) + chr(0b10011 + 0o134) + chr(364 - 314) + chr(0b110001) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + chr(0b11000 + 0o33) + '\060' + '\x34', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(2108 - 2057), 8), nzTpIcepk0o8('\060' + chr(9695 - 9584) + chr(723 - 673) + '\063' + '\x35', 52002 - 51994), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(0b110000) + '\062', 28621 - 28613), nzTpIcepk0o8(chr(1731 - 1683) + chr(0b101000 + 0o107) + chr(0b110010) + chr(0b110110) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(0b110111) + '\x37', 38761 - 38753), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(0b110000) + chr(465 - 412), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8333 - 8222) + chr(1955 - 1900) + '\062', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\061' + '\064' + chr(1706 - 1655), 4617 - 4609), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10000 + 0o42) + chr(0b11000 + 0o37) + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b1 + 0o62) + '\066' + chr(0b101101 + 0o10), 2855 - 2847), nzTpIcepk0o8('\x30' + chr(0b1011 + 0o144) + '\063' + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1000101 + 0o52) + chr(0b11110 + 0o23) + chr(0b10 + 0o63) + '\x31', 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x32' + chr(0b10100 + 0o37), 49717 - 49709), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(49) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1011000 + 0o27) + chr(0b1 + 0o60) + chr(0b110011) + chr(0b110000 + 0o7), 0b1000), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1101111) + chr(50) + '\067' + '\x35', 8), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(5256 - 5145) + chr(51) + chr(1887 - 1839), 0b1000), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1010011 + 0o34) + chr(0b11010 + 0o31) + chr(0b110 + 0o60) + chr(0b110110), 8), nzTpIcepk0o8(chr(2085 - 2037) + chr(0b1101111) + chr(1716 - 1667) + chr(0b0 + 0o66) + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + chr(0b11 + 0o154) + chr(371 - 318) + '\065', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\157' + chr(53) + '\x30', 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(0b1100011) + chr(0b1001001 + 0o46) + '\144' + '\x65')(chr(117) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(627 - 571)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ugaUEwjlE0Mx(hXMPsSrOQzbh, Ljm2D9K8RPXv, ryRPGaxqs24n, GVgFAYMz7Sw8=None): if GVgFAYMz7Sw8 is None: GVgFAYMz7Sw8 = {} if suIjIS24Zkqw(Ljm2D9K8RPXv, H4NoA26ON7iG): Ljm2D9K8RPXv = roI3spqORKae(ES5oEprVxulp(b"'"), '\x64' + '\145' + chr(7786 - 7687) + '\157' + '\x64' + chr(0b10001 + 0o124))(chr(0b111000 + 0o75) + chr(0b1110100) + chr(102) + chr(45) + chr(56)).Y4yM9BcfTCNq(Ljm2D9K8RPXv) roI3spqORKae(GVgFAYMz7Sw8, roI3spqORKae(ES5oEprVxulp(b'A\xca\x9d\xc3\x9d\x05\xa74\xad37\xe8'), chr(0b10001 + 0o123) + chr(582 - 481) + chr(6276 - 6177) + chr(10874 - 10763) + chr(2143 - 2043) + chr(6381 - 6280))('\x75' + '\x74' + chr(0b100010 + 0o104) + '\055' + '\070'))({roI3spqORKae(ES5oEprVxulp(b'y\xf0\x95\x98\xa45\x80k\xba%'), chr(3691 - 3591) + chr(0b1001100 + 0o31) + chr(214 - 115) + chr(0b1101111) + '\144' + chr(9225 - 9124))('\x75' + chr(0b100001 + 0o123) + '\x66' + chr(1372 - 1327) + chr(0b100111 + 0o21)): Ljm2D9K8RPXv, roI3spqORKae(ES5oEprVxulp(b'i\xfa\x92\x88'), '\x64' + '\145' + '\143' + '\x6f' + '\x64' + '\x65')(chr(0b11101 + 0o130) + chr(116) + chr(102) + chr(1443 - 1398) + chr(0b10010 + 0o46)): ryRPGaxqs24n}) return roI3spqORKae(uLa8jGzvzPZ6(), roI3spqORKae(ES5oEprVxulp(b'Q\xd0\xa4\x82\xb0?\xd2f\xff2~\xc3'), chr(0b1100100) + '\145' + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(11599 - 11483) + '\146' + '\055' + chr(0b11110 + 0o32)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"m\xcd\xbc\xbe\xbf$\xbds\x94'\x10\xd9"), chr(0b1100100) + chr(0b1 + 0o144) + chr(8048 - 7949) + chr(0b1000111 + 0o50) + '\144' + chr(10065 - 9964))(chr(10330 - 10213) + chr(116) + chr(4367 - 4265) + '\055' + chr(0b110111 + 0o1)))(roI3spqORKae(ES5oEprVxulp(b'}\xfa\x9f\x92\xb11\x80v\xbd7!\xe3c'), chr(0b1001100 + 0o30) + chr(5107 - 5006) + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(101))('\x75' + chr(116) + '\146' + '\055' + '\070'), roI3spqORKae(ES5oEprVxulp(b'[\xda\xa5\xa5'), chr(0b101000 + 0o74) + chr(0b101111 + 0o66) + '\143' + chr(111) + chr(3779 - 3679) + chr(0b1100101))(chr(0b1111 + 0o146) + '\164' + chr(102) + chr(45) + chr(0b110000 + 0o10)), GVgFAYMz7Sw8))
messagebird/python-rest-api
messagebird/client.py
Client.lookup
def lookup(self, phonenumber, params=None): """Do a new lookup.""" if params is None: params = {} return Lookup().load(self.request('lookup/' + str(phonenumber), 'GET', params))
python
def lookup(self, phonenumber, params=None): """Do a new lookup.""" if params is None: params = {} return Lookup().load(self.request('lookup/' + str(phonenumber), 'GET', params))
[ "def", "lookup", "(", "self", ",", "phonenumber", ",", "params", "=", "None", ")", ":", "if", "params", "is", "None", ":", "params", "=", "{", "}", "return", "Lookup", "(", ")", ".", "load", "(", "self", ".", "request", "(", "'lookup/'", "+", "str", "(", "phonenumber", ")", ",", "'GET'", ",", "params", ")", ")" ]
Do a new lookup.
[ "Do", "a", "new", "lookup", "." ]
fb7864f178135f92d09af803bee93270e99f3963
https://github.com/messagebird/python-rest-api/blob/fb7864f178135f92d09af803bee93270e99f3963/messagebird/client.py#L126-L129
train
Do a new lookup.
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,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8AjHWU,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' + '\x6f' + chr(0b100101 + 0o14) + chr(0b110010) + chr(0b1 + 0o63), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(7789 - 7678) + '\063' + '\x32' + chr(1523 - 1474), 50004 - 49996), nzTpIcepk0o8(chr(341 - 293) + chr(1597 - 1486) + chr(1558 - 1508) + chr(0b110001) + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b111001 + 0o66) + '\063' + chr(55) + '\x35', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(452 - 404) + chr(201 - 153), 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + '\062' + chr(0b10 + 0o57) + chr(0b100 + 0o60), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + chr(2397 - 2342) + chr(0b101111 + 0o1), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110100) + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + chr(12306 - 12195) + chr(49) + '\061' + '\060', 12350 - 12342), nzTpIcepk0o8(chr(1625 - 1577) + chr(1031 - 920) + chr(1576 - 1526) + '\062' + chr(0b11 + 0o64), 26789 - 26781), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010) + '\060' + chr(50), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b100101 + 0o112) + chr(421 - 371) + chr(48) + chr(0b110110), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + chr(811 - 761), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10001 + 0o43) + chr(48), 44250 - 44242), nzTpIcepk0o8(chr(0b110000) + chr(7605 - 7494) + chr(49) + '\x34' + chr(52), 9345 - 9337), nzTpIcepk0o8(chr(1423 - 1375) + chr(10057 - 9946) + chr(51) + '\061' + '\x30', 10080 - 10072), nzTpIcepk0o8('\060' + chr(403 - 292) + '\063' + chr(49) + chr(0b100101 + 0o13), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1010 + 0o50) + '\x31' + chr(0b110101), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\064' + '\x33', 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\157' + chr(0b110010) + '\x35' + chr(50), 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + '\x32' + '\x30' + chr(0b11010 + 0o33), 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(12000 - 11889) + chr(1380 - 1329) + '\x33' + chr(2201 - 2147), 60392 - 60384), nzTpIcepk0o8(chr(919 - 871) + chr(111) + '\x33' + chr(50) + chr(1905 - 1853), 25602 - 25594), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11011 + 0o30) + chr(0b110110) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(0b110110) + chr(0b101011 + 0o6), 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1101111) + chr(0b1010 + 0o50) + chr(0b110010) + '\067', 8), nzTpIcepk0o8(chr(1400 - 1352) + chr(111) + chr(49) + chr(0b110100) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(369 - 320) + chr(0b110001) + chr(0b110000), 8), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(190 - 142) + chr(53), 59914 - 59906), nzTpIcepk0o8(chr(402 - 354) + chr(0b11110 + 0o121) + '\061' + chr(0b110100) + '\x37', 0o10), nzTpIcepk0o8(chr(226 - 178) + '\157' + chr(0b110010) + '\x36' + '\063', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(0b11111 + 0o24) + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(9458 - 9347) + chr(53) + chr(52), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101 + 0o142) + chr(0b10111 + 0o33) + '\x31' + chr(54), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101000 + 0o17) + chr(0b101 + 0o56), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10101 + 0o34) + chr(0b10000 + 0o45) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x34' + chr(0b101011 + 0o11), 8), nzTpIcepk0o8(chr(48) + chr(0b1001011 + 0o44) + '\061' + '\064', ord("\x08")), nzTpIcepk0o8('\x30' + chr(6511 - 6400) + chr(0b11110 + 0o23) + chr(53), 0o10), nzTpIcepk0o8(chr(1427 - 1379) + '\x6f' + '\x35' + chr(0b110111), 14362 - 14354)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\157' + chr(0b110101) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'z'), '\144' + chr(0b1011100 + 0o11) + chr(2706 - 2607) + '\x6f' + chr(0b1100100) + chr(4108 - 4007))(chr(6903 - 6786) + '\x74' + chr(0b1100110) + chr(1597 - 1552) + chr(2147 - 2091)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def h51drLCtDGSb(hXMPsSrOQzbh, nkWbVhJ1su6j, GVgFAYMz7Sw8=None): if GVgFAYMz7Sw8 is None: GVgFAYMz7Sw8 = {} return roI3spqORKae(QlXka8r3X58o(), roI3spqORKae(ES5oEprVxulp(b'\x0e\x94\xdd\x8e\xe4\xef\x8fGy\xf3\xba\xc3'), '\x64' + chr(101) + '\143' + chr(3474 - 3363) + '\x64' + chr(7098 - 6997))('\165' + chr(9210 - 9094) + '\x66' + '\055' + chr(2369 - 2313)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'2\x89\xc5\xb2\xeb\xf4\xe0R\x12\xe6\xd4\xd9'), chr(100) + chr(0b1100101) + '\143' + chr(0b1011111 + 0o20) + chr(0b1100100) + chr(0b1001111 + 0o26))(chr(0b11011 + 0o132) + chr(0b1110100) + chr(0b1100110) + chr(614 - 569) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'8\xbe\xe0\x96\xf5\xfc\x97'), chr(382 - 282) + chr(101) + chr(0b110110 + 0o55) + chr(3939 - 3828) + chr(0b101100 + 0o70) + chr(101))(chr(117) + chr(116) + chr(2060 - 1958) + chr(0b100110 + 0o7) + '\070') + N9zlRy29S1SS(nkWbVhJ1su6j), roI3spqORKae(ES5oEprVxulp(b'\x13\x94\xdb'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(5873 - 5762) + '\144' + chr(0b1100101))('\x75' + '\164' + '\146' + chr(45) + chr(898 - 842)), GVgFAYMz7Sw8))
messagebird/python-rest-api
messagebird/client.py
Client.lookup_hlr
def lookup_hlr(self, phonenumber, params=None): """Retrieve the information of a specific HLR lookup.""" if params is None: params = {} return HLR().load(self.request('lookup/' + str(phonenumber) + '/hlr', 'GET', params))
python
def lookup_hlr(self, phonenumber, params=None): """Retrieve the information of a specific HLR lookup.""" if params is None: params = {} return HLR().load(self.request('lookup/' + str(phonenumber) + '/hlr', 'GET', params))
[ "def", "lookup_hlr", "(", "self", ",", "phonenumber", ",", "params", "=", "None", ")", ":", "if", "params", "is", "None", ":", "params", "=", "{", "}", "return", "HLR", "(", ")", ".", "load", "(", "self", ".", "request", "(", "'lookup/'", "+", "str", "(", "phonenumber", ")", "+", "'/hlr'", ",", "'GET'", ",", "params", ")", ")" ]
Retrieve the information of a specific HLR lookup.
[ "Retrieve", "the", "information", "of", "a", "specific", "HLR", "lookup", "." ]
fb7864f178135f92d09af803bee93270e99f3963
https://github.com/messagebird/python-rest-api/blob/fb7864f178135f92d09af803bee93270e99f3963/messagebird/client.py#L131-L134
train
Retrieve the information of a specific HLR lookup.
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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QBa,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(0b101111 + 0o1) + chr(111) + chr(50) + '\x32' + '\x37', 58278 - 58270), nzTpIcepk0o8('\x30' + chr(9994 - 9883) + chr(748 - 698) + chr(53) + '\x34', 0o10), nzTpIcepk0o8(chr(731 - 683) + chr(0b1101111) + chr(421 - 372) + chr(54) + chr(0b100100 + 0o23), 0b1000), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b11001 + 0o126) + '\x32' + '\066' + chr(0b11100 + 0o25), 10495 - 10487), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + '\x32' + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + chr(0b0 + 0o60) + chr(0b101110 + 0o10), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(9853 - 9742) + '\062' + chr(51) + '\x35', 0o10), nzTpIcepk0o8('\x30' + chr(0b1100001 + 0o16) + chr(51) + chr(428 - 380) + '\067', 0b1000), nzTpIcepk0o8(chr(1855 - 1807) + chr(11847 - 11736) + chr(49) + '\064' + chr(0b110011), 1852 - 1844), nzTpIcepk0o8(chr(48) + chr(111) + chr(2229 - 2178) + chr(52) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(1449 - 1401) + '\157' + '\x34' + chr(51), 0b1000), nzTpIcepk0o8(chr(676 - 628) + chr(0b1101111) + chr(0b0 + 0o63) + chr(48) + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(0b110111) + '\x32', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(1797 - 1743) + chr(0b11011 + 0o30), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(297 - 246) + '\x37' + chr(0b1110 + 0o44), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33' + chr(2695 - 2643) + chr(789 - 738), ord("\x08")), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + chr(0b110011) + chr(0b110100) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\062' + '\x37', 2602 - 2594), nzTpIcepk0o8(chr(48) + chr(0b1001100 + 0o43) + chr(0b100011 + 0o21) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b1101111) + chr(0b110011) + chr(65 - 17) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(912 - 864) + chr(3740 - 3629) + chr(50) + '\x32' + chr(0b101111 + 0o6), 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(8333 - 8222) + '\063' + '\x31' + '\x37', 17563 - 17555), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + chr(0b110010) + chr(2064 - 2010) + '\x37', 1057 - 1049), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(49) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2433 - 2383) + chr(2738 - 2685) + chr(49), 3627 - 3619), nzTpIcepk0o8('\060' + chr(5678 - 5567) + chr(51) + chr(0b110110) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + '\x35' + chr(0b11000 + 0o30), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2049 - 1998) + '\065' + '\064', 9397 - 9389), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(0b1011 + 0o50) + chr(0b110011), 37976 - 37968), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(9652 - 9541) + chr(0b110011) + '\060' + chr(752 - 702), ord("\x08")), nzTpIcepk0o8(chr(581 - 533) + '\157' + chr(51) + chr(2089 - 2037) + chr(1721 - 1669), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(48) + chr(0b110100), 0b1000), nzTpIcepk0o8('\060' + chr(0b110101 + 0o72) + '\x35' + '\060', 43843 - 43835), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11100 + 0o26) + chr(0b100110 + 0o13) + '\x36', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + '\063' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + chr(0b110010) + chr(0b10010 + 0o37) + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(2181 - 2130) + chr(1042 - 989) + chr(0b110100), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101001 + 0o6) + chr(0b100 + 0o55) + '\x32' + '\062', 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1000001 + 0o56) + chr(0b110 + 0o54) + '\x30', 44840 - 44832), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + chr(0b110010) + '\x34' + chr(0b110110), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(53) + chr(0b110000), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xb9'), '\x64' + chr(0b1100101) + chr(99) + chr(111) + chr(0b100110 + 0o76) + '\x65')(chr(117) + '\164' + chr(0b101011 + 0o73) + chr(45) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def NTBZ9IqnAwPR(hXMPsSrOQzbh, nkWbVhJ1su6j, GVgFAYMz7Sw8=None): if GVgFAYMz7Sw8 is None: GVgFAYMz7Sw8 = {} return roI3spqORKae(UfDYq_OcmPKp(), roI3spqORKae(ES5oEprVxulp(b'\xcd\xe9%\xc2\xf0\xa5\xaa\xa4R\x85\x1b\x85'), '\x64' + chr(0b1100101) + chr(0b10101 + 0o116) + '\157' + '\x64' + '\x65')('\165' + chr(116) + '\x66' + chr(45) + '\070'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf1\xf4=\xfe\xff\xbe\xc5\xb19\x90u\x9f'), chr(1114 - 1014) + chr(0b1101 + 0o130) + chr(99) + chr(111) + chr(100) + '\x65')(chr(12595 - 12478) + chr(4572 - 4456) + '\x66' + chr(0b11011 + 0o22) + chr(2462 - 2406)))(roI3spqORKae(ES5oEprVxulp(b'\xfb\xc3\x18\xda\xe1\xb6\xb2'), chr(0b1100100) + chr(7961 - 7860) + chr(99) + chr(0b100000 + 0o117) + chr(0b1 + 0o143) + chr(0b110011 + 0o62))('\x75' + chr(0b1110100) + chr(0b1001111 + 0o27) + chr(0b101011 + 0o2) + chr(0b111000)) + N9zlRy29S1SS(nkWbVhJ1su6j) + roI3spqORKae(ES5oEprVxulp(b'\xb8\xc4\x1b\xc3'), '\x64' + chr(0b110110 + 0o57) + chr(9328 - 9229) + '\x6f' + '\144' + chr(3741 - 3640))(chr(0b10000 + 0o145) + chr(116) + '\146' + chr(0b10100 + 0o31) + chr(0b11000 + 0o40)), roI3spqORKae(ES5oEprVxulp(b'\xd0\xe9#'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(0b101101 + 0o70))('\x75' + chr(0b1110100) + chr(102) + chr(624 - 579) + chr(1904 - 1848)), GVgFAYMz7Sw8))
messagebird/python-rest-api
messagebird/client.py
Client.lookup_hlr_create
def lookup_hlr_create(self, phonenumber, params=None): """Perform a new HLR lookup.""" if params is None: params = {} return HLR().load(self.request('lookup/' + str(phonenumber) + '/hlr', 'POST', params))
python
def lookup_hlr_create(self, phonenumber, params=None): """Perform a new HLR lookup.""" if params is None: params = {} return HLR().load(self.request('lookup/' + str(phonenumber) + '/hlr', 'POST', params))
[ "def", "lookup_hlr_create", "(", "self", ",", "phonenumber", ",", "params", "=", "None", ")", ":", "if", "params", "is", "None", ":", "params", "=", "{", "}", "return", "HLR", "(", ")", ".", "load", "(", "self", ".", "request", "(", "'lookup/'", "+", "str", "(", "phonenumber", ")", "+", "'/hlr'", ",", "'POST'", ",", "params", ")", ")" ]
Perform a new HLR lookup.
[ "Perform", "a", "new", "HLR", "lookup", "." ]
fb7864f178135f92d09af803bee93270e99f3963
https://github.com/messagebird/python-rest-api/blob/fb7864f178135f92d09af803bee93270e99f3963/messagebird/client.py#L136-L139
train
Perform a new HLR lookup.
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,WdoB9EK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MSkfijeeBr,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(1875 - 1827) + chr(0b1011101 + 0o22) + '\x32' + chr(1964 - 1912) + chr(1927 - 1875), 17819 - 17811), nzTpIcepk0o8(chr(1322 - 1274) + '\x6f' + chr(51) + '\062' + chr(0b0 + 0o60), 0b1000), nzTpIcepk0o8('\060' + chr(0b1010111 + 0o30) + chr(0b101100 + 0o6) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1101111) + chr(0b100001 + 0o20) + '\064' + chr(0b111 + 0o56), 0b1000), nzTpIcepk0o8(chr(48) + chr(6820 - 6709) + '\063' + chr(52) + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011111 + 0o20) + chr(2560 - 2509) + chr(108 - 57), 0b1000), nzTpIcepk0o8(chr(1079 - 1031) + chr(0b1100011 + 0o14) + chr(0b110011) + '\065' + chr(0b11011 + 0o27), 41390 - 41382), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101010 + 0o11) + '\063' + chr(2385 - 2336), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b10001 + 0o40) + chr(0b110000) + chr(0b1 + 0o63), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(1459 - 1348) + chr(51) + '\x35' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(7212 - 7101) + '\064' + chr(783 - 734), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\x33' + '\x35', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + '\x32' + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(218 - 170) + chr(111) + '\061' + '\067' + chr(0b110100), 21859 - 21851), nzTpIcepk0o8(chr(58 - 10) + chr(0b1101111) + chr(0b10100 + 0o35) + chr(0b101 + 0o53) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b100 + 0o153) + chr(55) + chr(724 - 672), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\063' + chr(296 - 247) + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(0b1100000 + 0o17) + '\061' + chr(49) + chr(611 - 558), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + '\x36', 8), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1000 + 0o147) + '\061' + chr(2602 - 2550) + chr(2284 - 2235), ord("\x08")), nzTpIcepk0o8('\060' + chr(11650 - 11539) + '\x31' + chr(0b101010 + 0o15) + '\x34', 8), nzTpIcepk0o8(chr(647 - 599) + chr(5157 - 5046) + '\x33' + chr(0b110000) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(672 - 617) + chr(49), 0o10), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b101010 + 0o105) + chr(0b10010 + 0o40) + chr(1064 - 1011) + chr(1651 - 1601), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(2156 - 2106) + chr(0b1110 + 0o44) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\157' + chr(0b101000 + 0o14) + '\060', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(0b1011 + 0o45) + '\064', 24767 - 24759), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(0b110110) + chr(0b101 + 0o55), ord("\x08")), nzTpIcepk0o8(chr(1721 - 1673) + chr(0b1101111) + chr(2124 - 2075) + chr(48) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10001 + 0o41) + chr(2284 - 2236) + chr(50), 43649 - 43641), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(9049 - 8938) + '\x33' + chr(0b100011 + 0o20) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b1101111) + chr(1902 - 1853) + chr(53) + '\062', 0o10), nzTpIcepk0o8('\060' + chr(5269 - 5158) + chr(0b110010) + '\061' + chr(55), 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\157' + '\x36' + chr(0b10010 + 0o36), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2132 - 2021) + chr(0b11110 + 0o27) + chr(52), 23413 - 23405), nzTpIcepk0o8('\060' + '\157' + chr(54) + chr(0b110110), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b101100 + 0o10), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(0b110100) + chr(0b1000 + 0o56), 56542 - 56534), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10100 + 0o36) + '\x35' + chr(0b101101 + 0o7), 0o10), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(111) + chr(1505 - 1453) + chr(0b110000), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1299 - 1246) + '\060', 57190 - 57182)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x8a'), chr(932 - 832) + '\145' + chr(9200 - 9101) + '\x6f' + chr(100) + '\145')(chr(9673 - 9556) + '\x74' + '\x66' + chr(698 - 653) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def r8Ff9LbHdAqz(hXMPsSrOQzbh, nkWbVhJ1su6j, GVgFAYMz7Sw8=None): if GVgFAYMz7Sw8 is None: GVgFAYMz7Sw8 = {} return roI3spqORKae(UfDYq_OcmPKp(), roI3spqORKae(ES5oEprVxulp(b'\xfe\x95D\x16\x80x\xdd\xbau\x8a\x19\x18'), '\x64' + chr(101) + '\x63' + '\157' + '\x64' + '\x65')(chr(117) + chr(0b1110100) + chr(0b1100110) + '\x2d' + '\x38'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc2\x88\\*\x8fc\xb2\xaf\x1e\x9fw\x02'), '\x64' + chr(0b1100101) + chr(0b101111 + 0o64) + chr(0b111110 + 0o61) + chr(100) + chr(4566 - 4465))(chr(0b1110101) + chr(116) + '\146' + chr(0b1001 + 0o44) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\xc8\xbfy\x0e\x91k\xc5'), chr(0b1001100 + 0o30) + '\x65' + chr(99) + chr(111) + '\x64' + chr(6998 - 6897))(chr(117) + chr(0b1001001 + 0o53) + chr(0b1100110) + '\x2d' + '\070') + N9zlRy29S1SS(nkWbVhJ1su6j) + roI3spqORKae(ES5oEprVxulp(b'\x8b\xb8z\x17'), chr(6330 - 6230) + chr(0b100111 + 0o76) + chr(0b1010010 + 0o21) + chr(0b1101111) + chr(100) + '\x65')('\x75' + chr(4533 - 4417) + '\146' + chr(0b101101) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xf4\x9fE1'), '\x64' + chr(0b1001101 + 0o30) + chr(0b1000010 + 0o41) + chr(0b111 + 0o150) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\164' + chr(0b1100010 + 0o4) + chr(0b101101) + chr(0b10001 + 0o47)), GVgFAYMz7Sw8))
messagebird/python-rest-api
messagebird/client.py
Client.verify_create
def verify_create(self, recipient, params=None): """Create a new verification.""" if params is None: params = {} params.update({'recipient': recipient}) return Verify().load(self.request('verify', 'POST', params))
python
def verify_create(self, recipient, params=None): """Create a new verification.""" if params is None: params = {} params.update({'recipient': recipient}) return Verify().load(self.request('verify', 'POST', params))
[ "def", "verify_create", "(", "self", ",", "recipient", ",", "params", "=", "None", ")", ":", "if", "params", "is", "None", ":", "params", "=", "{", "}", "params", ".", "update", "(", "{", "'recipient'", ":", "recipient", "}", ")", "return", "Verify", "(", ")", ".", "load", "(", "self", ".", "request", "(", "'verify'", ",", "'POST'", ",", "params", ")", ")" ]
Create a new verification.
[ "Create", "a", "new", "verification", "." ]
fb7864f178135f92d09af803bee93270e99f3963
https://github.com/messagebird/python-rest-api/blob/fb7864f178135f92d09af803bee93270e99f3963/messagebird/client.py#L145-L149
train
Create a new verification.
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,CJFG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4NoA26ON7iG,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(76 - 28) + '\x6f' + '\x33' + chr(2213 - 2165) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1010 + 0o145) + chr(0b11011 + 0o30) + chr(51) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b10110 + 0o131) + chr(1970 - 1921) + chr(55) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(2358 - 2305) + '\065', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + '\061' + chr(0b110101 + 0o0), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(1618 - 1569) + '\x34' + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(3352 - 3241) + chr(0b110010) + '\x32' + chr(0b110001 + 0o0), 0o10), nzTpIcepk0o8('\x30' + chr(0b1100 + 0o143) + chr(51) + chr(50) + '\063', 0o10), nzTpIcepk0o8(chr(228 - 180) + chr(111) + chr(50) + chr(926 - 874) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(93 - 45) + '\157' + '\x33' + chr(0b110011) + chr(51), 9353 - 9345), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11 + 0o61) + chr(0b110000), 45817 - 45809), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(3327 - 3216) + chr(0b11000 + 0o33) + chr(2032 - 1983) + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + chr(0b1001001 + 0o46) + '\063' + '\064' + '\x30', 59730 - 59722), nzTpIcepk0o8(chr(1527 - 1479) + chr(8432 - 8321) + chr(1428 - 1377) + '\x36' + chr(48), 0o10), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b11 + 0o154) + '\x31' + chr(53) + chr(0b101100 + 0o7), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(0b110100) + chr(50), 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(0b110010) + '\x34' + '\x32', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1010011 + 0o34) + chr(0b10101 + 0o35) + chr(54) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(111) + chr(0b10100 + 0o37) + chr(0b110111) + chr(54), 28863 - 28855), nzTpIcepk0o8(chr(145 - 97) + chr(111) + '\063' + chr(2587 - 2534) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + '\063', ord("\x08")), nzTpIcepk0o8(chr(718 - 670) + chr(4450 - 4339) + '\063' + chr(51) + chr(0b110110), 41498 - 41490), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(272 - 223) + '\x30' + '\x31', 0b1000), nzTpIcepk0o8(chr(450 - 402) + chr(0b1101011 + 0o4) + chr(2246 - 2196), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(0b110011) + '\067', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b111010 + 0o65) + chr(2214 - 2165) + chr(1174 - 1122) + chr(53), 8), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(0b101100 + 0o7) + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(2289 - 2238) + '\061' + chr(892 - 842), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b10010 + 0o135) + '\x34' + chr(0b110111), 35016 - 35008), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(0b110011 + 0o2) + '\065', 0o10), nzTpIcepk0o8(chr(1877 - 1829) + chr(3775 - 3664) + chr(0b110001) + '\064' + chr(0b110010), 14778 - 14770), nzTpIcepk0o8('\060' + '\x6f' + '\062' + '\067' + '\x32', 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b100100 + 0o113) + chr(51) + chr(1101 - 1053) + '\x36', 3691 - 3683), nzTpIcepk0o8(chr(1616 - 1568) + chr(1224 - 1113) + '\x31' + chr(0b111 + 0o56) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(1834 - 1786) + chr(48), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10101 + 0o35) + '\062' + '\066', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(2379 - 2330) + chr(1711 - 1658) + chr(1259 - 1211), 0o10), nzTpIcepk0o8(chr(449 - 401) + chr(4479 - 4368) + chr(51) + '\x36' + chr(0b11111 + 0o30), 55602 - 55594), nzTpIcepk0o8(chr(1050 - 1002) + chr(111) + '\x31' + chr(1444 - 1389), 18019 - 18011), nzTpIcepk0o8(chr(0b101010 + 0o6) + '\157' + chr(0b110001) + '\x34' + '\062', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110101) + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xec'), chr(0b1000101 + 0o37) + chr(0b1100101) + chr(9186 - 9087) + chr(0b100 + 0o153) + chr(0b1100100) + chr(9646 - 9545))(chr(117) + chr(7348 - 7232) + '\146' + '\055' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def FjwOksX4WKGy(hXMPsSrOQzbh, R4vH97uGvtBC, GVgFAYMz7Sw8=None): if GVgFAYMz7Sw8 is None: GVgFAYMz7Sw8 = {} roI3spqORKae(GVgFAYMz7Sw8, roI3spqORKae(ES5oEprVxulp(b'\x88\x85\x11\x1f\x04<\xd3\xe2\xc7\xbeQ\xa1'), '\x64' + chr(5652 - 5551) + '\143' + chr(4214 - 4103) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(12827 - 12711) + chr(102) + chr(0b101101) + chr(56)))({roI3spqORKae(ES5oEprVxulp(b'\xb0\xbf\x19D=\x0c\xf4\xbd\xd0'), '\144' + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(6652 - 6551))('\x75' + '\164' + chr(8627 - 8525) + chr(0b100110 + 0o7) + '\070'): R4vH97uGvtBC}) return roI3spqORKae(HmcuwQ5tRdoh(), roI3spqORKae(ES5oEprVxulp(b'\x98\x9f(^)\x06\xa6\xb0\x95\xbf\x18\x8a'), chr(100) + '\x65' + chr(99) + chr(111) + chr(100) + '\145')('\165' + chr(0b1110100) + chr(0b1011101 + 0o11) + chr(0b101101) + chr(56)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa4\x820b&\x1d\xc9\xa5\xfe\xaav\x90'), chr(0b1011101 + 0o7) + '\x65' + chr(0b1100011) + '\x6f' + '\144' + chr(0b1 + 0o144))(chr(0b101110 + 0o107) + '\x74' + '\x66' + chr(45) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xb4\xbf\x08D+\x1c'), chr(100) + chr(0b1100101) + chr(99) + '\157' + chr(0b1000000 + 0o44) + '\145')('\165' + chr(12923 - 12807) + chr(0b1100101 + 0o1) + chr(0b101101) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\x92\x95)y'), '\x64' + chr(101) + chr(99) + chr(6287 - 6176) + '\144' + chr(6914 - 6813))(chr(13271 - 13154) + chr(0b1110100) + chr(102) + chr(0b11 + 0o52) + chr(0b110000 + 0o10)), GVgFAYMz7Sw8))
messagebird/python-rest-api
messagebird/client.py
Client.verify_verify
def verify_verify(self, id, token): """Verify the token of a specific verification.""" return Verify().load(self.request('verify/' + str(id), params={'token': token}))
python
def verify_verify(self, id, token): """Verify the token of a specific verification.""" return Verify().load(self.request('verify/' + str(id), params={'token': token}))
[ "def", "verify_verify", "(", "self", ",", "id", ",", "token", ")", ":", "return", "Verify", "(", ")", ".", "load", "(", "self", ".", "request", "(", "'verify/'", "+", "str", "(", "id", ")", ",", "params", "=", "{", "'token'", ":", "token", "}", ")", ")" ]
Verify the token of a specific verification.
[ "Verify", "the", "token", "of", "a", "specific", "verification", "." ]
fb7864f178135f92d09af803bee93270e99f3963
https://github.com/messagebird/python-rest-api/blob/fb7864f178135f92d09af803bee93270e99f3963/messagebird/client.py#L151-L153
train
Verify the token of a specific verification.
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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QBa,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(0b10101 + 0o132) + chr(0b1111 + 0o45) + chr(53), 49412 - 49404), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(1441 - 1386) + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1722 - 1673) + chr(0b110111) + chr(1944 - 1890), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1011100 + 0o23) + '\x33' + chr(0b110 + 0o52) + '\063', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(0b110100) + chr(2834 - 2780), 0b1000), nzTpIcepk0o8(chr(1471 - 1423) + chr(1990 - 1879) + chr(0b110011) + '\061' + '\067', 0b1000), nzTpIcepk0o8(chr(84 - 36) + chr(0b1101111) + '\063' + chr(0b11011 + 0o34) + chr(49), 12675 - 12667), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(50) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(1419 - 1371) + chr(111) + chr(2022 - 1973) + '\067', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(0b110001) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(11017 - 10906) + chr(0b100000 + 0o22) + '\065' + chr(48), 35900 - 35892), nzTpIcepk0o8('\060' + chr(111) + chr(0b100101 + 0o15) + chr(0b110000) + '\067', 64263 - 64255), nzTpIcepk0o8(chr(185 - 137) + '\157' + '\061' + chr(0b110000) + chr(0b1 + 0o64), 0o10), nzTpIcepk0o8(chr(405 - 357) + '\x6f' + '\x31' + chr(0b110001) + chr(51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(2022 - 1911) + '\061' + chr(0b110000) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b111 + 0o51) + '\157' + chr(0b100010 + 0o21) + '\060' + '\061', 44312 - 44304), nzTpIcepk0o8('\x30' + '\157' + chr(0b100001 + 0o20) + '\x30', 0o10), nzTpIcepk0o8(chr(48) + chr(3343 - 3232) + chr(51) + chr(0b0 + 0o67) + chr(53), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110101) + chr(48), 31246 - 31238), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\x6f' + chr(0b10000 + 0o41) + chr(0b11 + 0o56), 50497 - 50489), nzTpIcepk0o8('\x30' + '\157' + '\062' + '\x31' + '\x35', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b11000 + 0o34), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + '\060' + chr(53), 8), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(111) + chr(0b110001) + '\x36' + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(0b1101 + 0o44) + chr(0b11010 + 0o33), 24375 - 24367), nzTpIcepk0o8('\x30' + '\x6f' + chr(248 - 195) + '\x32', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101100 + 0o11), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(0b110001) + chr(2569 - 2517), ord("\x08")), nzTpIcepk0o8(chr(539 - 491) + '\x6f' + chr(0b100011 + 0o16) + '\x34' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(127 - 79) + chr(0b1101111) + chr(0b10000 + 0o42) + '\x32' + chr(51), 5313 - 5305), nzTpIcepk0o8('\x30' + chr(0b1011101 + 0o22) + chr(755 - 705) + chr(1239 - 1188) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(50) + '\x31', 53200 - 53192), nzTpIcepk0o8(chr(494 - 446) + '\157' + chr(638 - 590), 0o10), nzTpIcepk0o8(chr(2080 - 2032) + chr(0b1101111) + chr(0b101011 + 0o6) + chr(0b1010 + 0o50) + '\x33', 6341 - 6333), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110100) + chr(53), 8), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(4878 - 4767) + chr(0b110010) + '\065' + chr(51), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(49) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + '\060' + chr(48), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\065' + '\065', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(637 - 589) + '\x6f' + chr(53) + chr(0b100000 + 0o20), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x0b'), '\144' + chr(0b1100101) + '\x63' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(0b0 + 0o55) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def LzFbFUqxrckO(hXMPsSrOQzbh, maLnLg8O5zPT, Hd4nWPplSa3h): return roI3spqORKae(HmcuwQ5tRdoh(), roI3spqORKae(ES5oEprVxulp(b'\x7f\xbd,p\xa7\xc5\xf8\x9a\xa1k\xf6\xed'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(11244 - 11133) + chr(0b1100100) + chr(0b1001010 + 0o33))(chr(0b1110101) + chr(0b1110100) + '\146' + chr(0b101101) + chr(56)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'C\xa04L\xa8\xde\x97\x8f\xca~\x98\xf7'), '\144' + chr(101) + chr(0b1000011 + 0o40) + chr(0b110 + 0o151) + chr(0b1100100) + chr(101))('\165' + chr(0b1110100) + '\x66' + '\x2d' + chr(1858 - 1802)))(roI3spqORKae(ES5oEprVxulp(b'S\x9d\x0cj\xa5\xdf\xe0'), chr(2846 - 2746) + chr(3867 - 3766) + chr(0b1100011) + chr(111) + chr(0b1100100) + '\x65')(chr(0b1110101) + '\x74' + chr(7200 - 7098) + '\x2d' + '\x38') + N9zlRy29S1SS(maLnLg8O5zPT), params={roI3spqORKae(ES5oEprVxulp(b'Q\x97\x15f\xad'), chr(100) + '\x65' + '\x63' + chr(0b100101 + 0o112) + chr(0b1100100) + chr(8188 - 8087))(chr(0b101110 + 0o107) + chr(0b110100 + 0o100) + chr(0b1100110) + chr(1491 - 1446) + chr(0b111000)): Hd4nWPplSa3h}))
messagebird/python-rest-api
messagebird/base_list.py
BaseList.items
def items(self, value): """Create typed objects from the dicts.""" items = [] for item in value: items.append(self.itemType().load(item)) self._items = items
python
def items(self, value): """Create typed objects from the dicts.""" items = [] for item in value: items.append(self.itemType().load(item)) self._items = items
[ "def", "items", "(", "self", ",", "value", ")", ":", "items", "=", "[", "]", "for", "item", "in", "value", ":", "items", ".", "append", "(", "self", ".", "itemType", "(", ")", ".", "load", "(", "item", ")", ")", "self", ".", "_items", "=", "items" ]
Create typed objects from the dicts.
[ "Create", "typed", "objects", "from", "the", "dicts", "." ]
fb7864f178135f92d09af803bee93270e99f3963
https://github.com/messagebird/python-rest-api/blob/fb7864f178135f92d09af803bee93270e99f3963/messagebird/base_list.py#L39-L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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 + 0o0) + chr(12299 - 12188) + chr(49) + '\x30' + chr(0b110100), 64128 - 64120), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(1610 - 1562) + '\062', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b111000 + 0o67) + chr(0b100110 + 0o14) + chr(1491 - 1442) + chr(1286 - 1231), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + chr(53) + chr(0b1101 + 0o50), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(2572 - 2461) + '\063' + '\x35' + chr(0b110110), 53692 - 53684), nzTpIcepk0o8(chr(1278 - 1230) + '\x6f' + '\063', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10010 + 0o37) + '\062', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110110) + chr(0b101111 + 0o4), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(1926 - 1877) + chr(2303 - 2252), 11845 - 11837), nzTpIcepk0o8(chr(48) + '\x6f' + chr(720 - 669) + chr(50) + chr(1655 - 1600), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010 + 0o0) + chr(0b10111 + 0o32) + '\x32', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(75 - 21) + chr(0b10 + 0o57), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b11000 + 0o127) + '\063' + '\x31' + chr(0b110100), 0o10), nzTpIcepk0o8('\060' + chr(0b110011 + 0o74) + '\066' + '\066', 22474 - 22466), nzTpIcepk0o8(chr(1649 - 1601) + '\x6f' + chr(0b110010) + chr(1500 - 1447) + '\x31', 0o10), nzTpIcepk0o8(chr(1131 - 1083) + chr(0b1011100 + 0o23) + '\062' + '\x37' + chr(55), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b101111 + 0o100) + '\x32' + chr(1380 - 1332) + '\061', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010 + 0o1) + chr(2267 - 2215) + chr(49), 49996 - 49988), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(1687 - 1637) + chr(0b10001 + 0o43) + chr(53), 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\x6f' + chr(61 - 12) + chr(52) + '\x36', 11450 - 11442), nzTpIcepk0o8(chr(0b110000) + chr(0b101101 + 0o102) + chr(49), 0o10), nzTpIcepk0o8(chr(0b10010 + 0o36) + chr(0b101100 + 0o103) + chr(55) + '\061', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b0 + 0o62) + '\067' + '\067', 8), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101010 + 0o7) + '\063' + '\x32', 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(11321 - 11210) + chr(653 - 604) + chr(0b1011 + 0o51) + chr(51), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100000 + 0o22) + '\x37' + chr(1138 - 1084), ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(111) + chr(50) + '\065' + chr(2799 - 2744), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + chr(0b110000) + '\x34', 3818 - 3810), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101111) + '\x32' + chr(0b110 + 0o53) + '\x32', 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + chr(0b110100) + '\x31', 43345 - 43337), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(0b11001 + 0o30) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010 + 0o3) + '\x31', 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\063' + '\061' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(54) + chr(0b110001 + 0o5), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100 + 0o57) + '\062' + '\x32', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b10010 + 0o41) + chr(0b100001 + 0o17) + '\066', 60861 - 60853), nzTpIcepk0o8('\060' + chr(11859 - 11748) + chr(780 - 730) + chr(1696 - 1642) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(1465 - 1417) + '\x6f' + chr(0b11101 + 0o24) + chr(0b110111) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\157' + chr(0b11101 + 0o25) + chr(54) + chr(52), 16160 - 16152), nzTpIcepk0o8(chr(0b110000) + chr(0b10001 + 0o136) + '\x31', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(6911 - 6800) + chr(0b101001 + 0o14) + '\x30', 59900 - 59892)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'j'), '\x64' + chr(0b1100101) + chr(99) + chr(0b1101111) + chr(100) + chr(3283 - 3182))('\165' + '\164' + chr(0b100000 + 0o106) + chr(534 - 489) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Y_nNEzH43vXi(hXMPsSrOQzbh, uV9iBiw0y_Mp): Y_nNEzH43vXi = [] for IZ1I2J8X1CQz in uV9iBiw0y_Mp: roI3spqORKae(Y_nNEzH43vXi, roI3spqORKae(ES5oEprVxulp(b'\x0c\x96\xdc\x99\x96dM\\!\xb8\xdf\x84'), '\144' + chr(769 - 668) + '\143' + '\x6f' + chr(100) + chr(0b1001101 + 0o30))(chr(0b1110101) + chr(0b100111 + 0o115) + chr(102) + '\055' + chr(0b111000)))(roI3spqORKae(hXMPsSrOQzbh.itemType(), roI3spqORKae(ES5oEprVxulp(b'\x1e\x87\xdd\xde\x8a`=Pz\xb3\xb2\xf4'), chr(1686 - 1586) + chr(768 - 667) + chr(0b1100011) + chr(10239 - 10128) + chr(3659 - 3559) + '\x65')(chr(6710 - 6593) + '\164' + '\x66' + chr(1788 - 1743) + chr(0b111000)))(IZ1I2J8X1CQz)) hXMPsSrOQzbh.HdjInV_E1qb3 = Y_nNEzH43vXi
messagebird/python-rest-api
messagebird/http_client.py
HttpClient.request
def request(self, path, method='GET', params=None): """Builds a request and gets a response.""" if params is None: params = {} url = urljoin(self.endpoint, path) headers = { 'Accept': 'application/json', 'Authorization': 'AccessKey ' + self.access_key, 'User-Agent': self.user_agent, 'Content-Type': 'application/json' } if method == 'DELETE': response = requests.delete(url, verify=True, headers=headers, data=json.dumps(params)) elif method == 'GET': response = requests.get(url, verify=True, headers=headers, params=params) elif method == 'PATCH': response = requests.patch(url, verify=True, headers=headers, data=json.dumps(params)) elif method == 'POST': response = requests.post(url, verify=True, headers=headers, data=json.dumps(params)) elif method == 'PUT': response = requests.put(url, verify=True, headers=headers, data=json.dumps(params)) else: raise ValueError(str(method) + ' is not a supported HTTP method') if response.status_code in self.__supported_status_codes: response_text = response.text else: response.raise_for_status() return response_text
python
def request(self, path, method='GET', params=None): """Builds a request and gets a response.""" if params is None: params = {} url = urljoin(self.endpoint, path) headers = { 'Accept': 'application/json', 'Authorization': 'AccessKey ' + self.access_key, 'User-Agent': self.user_agent, 'Content-Type': 'application/json' } if method == 'DELETE': response = requests.delete(url, verify=True, headers=headers, data=json.dumps(params)) elif method == 'GET': response = requests.get(url, verify=True, headers=headers, params=params) elif method == 'PATCH': response = requests.patch(url, verify=True, headers=headers, data=json.dumps(params)) elif method == 'POST': response = requests.post(url, verify=True, headers=headers, data=json.dumps(params)) elif method == 'PUT': response = requests.put(url, verify=True, headers=headers, data=json.dumps(params)) else: raise ValueError(str(method) + ' is not a supported HTTP method') if response.status_code in self.__supported_status_codes: response_text = response.text else: response.raise_for_status() return response_text
[ "def", "request", "(", "self", ",", "path", ",", "method", "=", "'GET'", ",", "params", "=", "None", ")", ":", "if", "params", "is", "None", ":", "params", "=", "{", "}", "url", "=", "urljoin", "(", "self", ".", "endpoint", ",", "path", ")", "headers", "=", "{", "'Accept'", ":", "'application/json'", ",", "'Authorization'", ":", "'AccessKey '", "+", "self", ".", "access_key", ",", "'User-Agent'", ":", "self", ".", "user_agent", ",", "'Content-Type'", ":", "'application/json'", "}", "if", "method", "==", "'DELETE'", ":", "response", "=", "requests", ".", "delete", "(", "url", ",", "verify", "=", "True", ",", "headers", "=", "headers", ",", "data", "=", "json", ".", "dumps", "(", "params", ")", ")", "elif", "method", "==", "'GET'", ":", "response", "=", "requests", ".", "get", "(", "url", ",", "verify", "=", "True", ",", "headers", "=", "headers", ",", "params", "=", "params", ")", "elif", "method", "==", "'PATCH'", ":", "response", "=", "requests", ".", "patch", "(", "url", ",", "verify", "=", "True", ",", "headers", "=", "headers", ",", "data", "=", "json", ".", "dumps", "(", "params", ")", ")", "elif", "method", "==", "'POST'", ":", "response", "=", "requests", ".", "post", "(", "url", ",", "verify", "=", "True", ",", "headers", "=", "headers", ",", "data", "=", "json", ".", "dumps", "(", "params", ")", ")", "elif", "method", "==", "'PUT'", ":", "response", "=", "requests", ".", "put", "(", "url", ",", "verify", "=", "True", ",", "headers", "=", "headers", ",", "data", "=", "json", ".", "dumps", "(", "params", ")", ")", "else", ":", "raise", "ValueError", "(", "str", "(", "method", ")", "+", "' is not a supported HTTP method'", ")", "if", "response", ".", "status_code", "in", "self", ".", "__supported_status_codes", ":", "response_text", "=", "response", ".", "text", "else", ":", "response", ".", "raise_for_status", "(", ")", "return", "response_text" ]
Builds a request and gets a response.
[ "Builds", "a", "request", "and", "gets", "a", "response", "." ]
fb7864f178135f92d09af803bee93270e99f3963
https://github.com/messagebird/python-rest-api/blob/fb7864f178135f92d09af803bee93270e99f3963/messagebird/http_client.py#L20-L50
train
Builds a request and gets a response.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5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MnI,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(0b1100111 + 0o10) + chr(0b11100 + 0o27) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011 + 0o0) + '\067' + chr(430 - 382), 63796 - 63788), nzTpIcepk0o8(chr(649 - 601) + '\157' + '\x32' + chr(0b110010) + chr(0b1000 + 0o56), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + '\060' + chr(52), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b1011 + 0o47) + chr(53) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b10111 + 0o31) + '\157' + chr(0b110001) + chr(122 - 70) + chr(0b11110 + 0o22), 61580 - 61572), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(1119 - 1070) + chr(737 - 688), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(0b101110 + 0o2) + chr(0b100 + 0o63), 0b1000), nzTpIcepk0o8('\x30' + chr(1939 - 1828) + chr(0b11111 + 0o23) + chr(0b100011 + 0o17) + chr(0b101101 + 0o7), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1347 - 1294) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + '\067' + chr(0b11011 + 0o25), 0o10), nzTpIcepk0o8(chr(2244 - 2196) + chr(0b1101111) + chr(49) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(9508 - 9397) + chr(0b1010 + 0o50) + chr(0b110000) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(111) + chr(0b110100) + chr(530 - 481), 0b1000), nzTpIcepk0o8(chr(2026 - 1978) + '\x6f' + '\061' + '\x31' + chr(49), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(54) + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(494 - 383) + chr(0b101010 + 0o7) + chr(0b0 + 0o61) + chr(51), 0o10), nzTpIcepk0o8(chr(1648 - 1600) + '\157' + chr(50) + chr(0b110011) + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10010 + 0o43) + chr(0b100111 + 0o12), ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b1010000 + 0o37) + '\064' + '\x31', 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(635 - 584) + chr(54) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(130 - 82) + chr(0b1101 + 0o142) + chr(0b110011) + chr(0b110001) + chr(51), 0o10), nzTpIcepk0o8('\060' + chr(11254 - 11143) + chr(51) + chr(48) + '\062', 0o10), nzTpIcepk0o8(chr(507 - 459) + chr(11064 - 10953) + '\065' + '\064', 50775 - 50767), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110111) + '\064', 56619 - 56611), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110100) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b110101 + 0o72) + '\x36' + chr(50), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b100111 + 0o14) + chr(182 - 133) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1001100 + 0o43) + chr(0b110010) + '\066', 0o10), nzTpIcepk0o8(chr(48) + chr(0b101 + 0o152) + chr(74 - 22), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10001 + 0o42) + chr(53) + chr(2111 - 2062), 31194 - 31186), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + '\066' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(1412 - 1364) + chr(0b1001110 + 0o41) + '\x31' + chr(50) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(926 - 878) + '\x6f' + chr(0b110011) + '\061' + chr(55), 45078 - 45070), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + '\061' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(111) + chr(0b11110 + 0o25) + chr(0b110000) + chr(53), 41982 - 41974), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(52) + '\x33', 36351 - 36343), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001) + chr(692 - 644) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(55) + chr(0b110100), 8), nzTpIcepk0o8('\060' + chr(111) + chr(0b110 + 0o55) + '\x36' + chr(0b110110), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(891 - 843) + chr(0b1101111) + chr(53) + chr(995 - 947), 9340 - 9332)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'4'), chr(100) + chr(101) + chr(99) + chr(111) + '\x64' + chr(101))(chr(0b1100100 + 0o21) + chr(0b101 + 0o157) + chr(0b1010100 + 0o22) + chr(45) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def fXJOkxXvZqV_(hXMPsSrOQzbh, _pSYqrosNb95, e5rcHW8hR5dL=roI3spqORKae(ES5oEprVxulp(b']\xbd\xc2'), chr(0b1100100) + chr(0b100001 + 0o104) + '\143' + '\157' + chr(2680 - 2580) + chr(3493 - 3392))('\x75' + chr(116) + chr(0b1100110 + 0o0) + chr(0b101101) + chr(0b11010 + 0o36)), GVgFAYMz7Sw8=None): if GVgFAYMz7Sw8 is None: GVgFAYMz7Sw8 = {} XuBkOpBKZJ5Z = bdEhu84j0skT(hXMPsSrOQzbh.IxaNW2_TJHzE, _pSYqrosNb95) UyworZfslHjc = {roI3spqORKae(ES5oEprVxulp(b'[\x9b\xf5\xe1\xdc\x14'), chr(0b11 + 0o141) + chr(101) + chr(99) + '\x6f' + '\144' + chr(0b1000011 + 0o42))('\x75' + chr(7483 - 7367) + chr(102) + '\055' + chr(0b111 + 0o61)): roI3spqORKae(ES5oEprVxulp(b'{\x88\xe6\xe8\xc5\x03(\xf3\xfd@\xd6&\xeaR&\\'), chr(9415 - 9315) + chr(0b1100010 + 0o3) + '\143' + chr(2380 - 2269) + '\144' + chr(101))('\165' + '\x74' + chr(102) + chr(0b11 + 0o52) + '\x38'), roI3spqORKae(ES5oEprVxulp(b'[\x8d\xe2\xec\xc3\x12 \xfd\xf5[\xd1f\xee'), chr(0b1100100) + '\145' + '\x63' + '\157' + chr(100) + chr(7262 - 7161))(chr(8504 - 8387) + '\x74' + chr(9709 - 9607) + '\x2d' + chr(0b111000)): roI3spqORKae(ES5oEprVxulp(b'[\x9b\xf5\xe1\xdf\x13\x02\xe2\xed\x0f'), chr(0b10110 + 0o116) + '\145' + chr(99) + chr(111) + '\x64' + chr(0b1100101))(chr(0b1110101) + chr(0b100000 + 0o124) + '\x66' + chr(0b101101) + chr(0b111000)) + hXMPsSrOQzbh.rUe6_KhiLJu7, roI3spqORKae(ES5oEprVxulp(b'O\x8b\xf3\xf6\x81!.\xe2\xfa['), '\144' + '\x65' + chr(9729 - 9630) + '\157' + chr(100) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(760 - 658) + '\055' + chr(56)): hXMPsSrOQzbh.bVTSsuwaJtlw, roI3spqORKae(ES5oEprVxulp(b'Y\x97\xf8\xf0\xc9\x0e=\xaa\xc0V\xc8l'), chr(0b111000 + 0o54) + chr(101) + chr(0b1101 + 0o126) + '\x6f' + chr(8992 - 8892) + '\x65')('\165' + chr(0b10011 + 0o141) + chr(9885 - 9783) + chr(45) + chr(56)): roI3spqORKae(ES5oEprVxulp(b'{\x88\xe6\xe8\xc5\x03(\xf3\xfd@\xd6&\xeaR&\\'), chr(100) + chr(101) + chr(4863 - 4764) + '\157' + chr(0b1100100) + '\x65')(chr(0b1101101 + 0o10) + chr(116) + chr(102) + chr(0b101101) + chr(0b10000 + 0o50))} if e5rcHW8hR5dL == roI3spqORKae(ES5oEprVxulp(b'^\xbd\xda\xc1\xf8%'), '\x64' + '\x65' + chr(2767 - 2668) + chr(111) + chr(5860 - 5760) + chr(0b1100101))(chr(1699 - 1582) + chr(0b1110100) + '\x66' + '\055' + chr(0b11110 + 0o32)): k2zzaFDtbuhL = dDl_g5qi6_rH.gNQxGQmbJXBt(XuBkOpBKZJ5Z, verify=nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(111) + chr(49), ord("\x08")), headers=UyworZfslHjc, data=LNUKEwZDIbyb.Zjglmm8uenkC(GVgFAYMz7Sw8)) elif e5rcHW8hR5dL == roI3spqORKae(ES5oEprVxulp(b']\xbd\xc2'), chr(100) + chr(101) + chr(0b100 + 0o137) + chr(0b11 + 0o154) + '\x64' + chr(0b110000 + 0o65))('\x75' + chr(0b100110 + 0o116) + chr(4077 - 3975) + chr(0b10111 + 0o26) + '\070'): k2zzaFDtbuhL = dDl_g5qi6_rH.GUKetu4xaGsJ(XuBkOpBKZJ5Z, verify=nzTpIcepk0o8('\060' + chr(10784 - 10673) + chr(0b0 + 0o61), 8), headers=UyworZfslHjc, params=GVgFAYMz7Sw8) elif e5rcHW8hR5dL == roI3spqORKae(ES5oEprVxulp(b'J\xb9\xc2\xc7\xe4'), chr(100) + '\145' + chr(7897 - 7798) + '\157' + chr(653 - 553) + '\145')(chr(117) + chr(116) + chr(102) + '\x2d' + chr(56)): k2zzaFDtbuhL = dDl_g5qi6_rH.TV2l9arqSc6E(XuBkOpBKZJ5Z, verify=nzTpIcepk0o8(chr(48) + chr(0b1010111 + 0o30) + '\061', 8), headers=UyworZfslHjc, data=LNUKEwZDIbyb.Zjglmm8uenkC(GVgFAYMz7Sw8)) elif e5rcHW8hR5dL == roI3spqORKae(ES5oEprVxulp(b'J\xb7\xc5\xd0'), chr(3457 - 3357) + chr(101) + '\143' + chr(0b1000010 + 0o55) + chr(100) + '\145')('\x75' + chr(116) + '\146' + '\055' + '\x38'): k2zzaFDtbuhL = dDl_g5qi6_rH.BDtAhDSNJsjg(XuBkOpBKZJ5Z, verify=nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061', 8), headers=UyworZfslHjc, data=LNUKEwZDIbyb.Zjglmm8uenkC(GVgFAYMz7Sw8)) elif e5rcHW8hR5dL == roI3spqORKae(ES5oEprVxulp(b'J\xad\xc2'), '\144' + chr(0b1100101) + chr(3024 - 2925) + '\157' + chr(0b1100100) + chr(6902 - 6801))('\165' + '\x74' + chr(0b1010000 + 0o26) + '\x2d' + chr(0b111000)): k2zzaFDtbuhL = dDl_g5qi6_rH.put(XuBkOpBKZJ5Z, verify=nzTpIcepk0o8(chr(0b110000) + chr(3325 - 3214) + chr(0b1101 + 0o44), 8), headers=UyworZfslHjc, data=LNUKEwZDIbyb.Zjglmm8uenkC(GVgFAYMz7Sw8)) else: raise WbNHlDKpyPtQ(N9zlRy29S1SS(e5rcHW8hR5dL) + roI3spqORKae(ES5oEprVxulp(b':\x91\xe5\xa4\xc2\x0f=\xa7\xf5\x0f\xcb|\xf0Q&@?\xfaM\x01\xbf\x9f\x96|\x1cOW\xb9~k\x8d'), '\144' + chr(0b1000100 + 0o41) + chr(9307 - 9208) + chr(2794 - 2683) + chr(991 - 891) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(102) + '\055' + chr(56))) if roI3spqORKae(k2zzaFDtbuhL, roI3spqORKae(ES5oEprVxulp(b'M\x8c\xe4\xc1\x95\n1\xee\xf0M\xc0X'), chr(0b11000 + 0o114) + chr(8776 - 8675) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b11100 + 0o111))('\165' + '\164' + '\x66' + chr(0b101101) + chr(1744 - 1688))) in roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'E\xa7\xe5\xf1\xdc\x10&\xf5\xe0J\xdcV\xf3U(F>\xecvB\x98\xaf\xa7_'), '\144' + chr(101) + chr(6757 - 6658) + chr(0b1101100 + 0o3) + chr(0b1100100) + chr(0b1100101))(chr(0b1110000 + 0o5) + chr(11807 - 11691) + chr(0b10111 + 0o117) + '\x2d' + chr(1554 - 1498))): UDdHGVThAG3H = k2zzaFDtbuhL.cpStk7cY1TJd else: roI3spqORKae(k2zzaFDtbuhL, roI3spqORKae(ES5oEprVxulp(b'h\x99\xff\xf7\xc9?/\xe8\xe6p\xcb}\xe1U<A'), chr(2767 - 2667) + '\145' + chr(0b1001101 + 0o26) + chr(0b110000 + 0o77) + chr(100) + chr(101))(chr(117) + '\164' + chr(102) + chr(0b10101 + 0o30) + chr(3047 - 2991)))() return UDdHGVThAG3H
sagemath/cysignals
setup.py
build.run
def run(self): """ Run ``./configure`` and Cython first. """ config_h = opj("src", "cysignals", "cysignals_config.h") if not os.path.isfile(config_h): import subprocess subprocess.check_call(["make", "configure"]) subprocess.check_call(["sh", "configure"]) dist = self.distribution ext_modules = dist.ext_modules if ext_modules: dist.ext_modules[:] = self.cythonize(ext_modules) _build.run(self)
python
def run(self): """ Run ``./configure`` and Cython first. """ config_h = opj("src", "cysignals", "cysignals_config.h") if not os.path.isfile(config_h): import subprocess subprocess.check_call(["make", "configure"]) subprocess.check_call(["sh", "configure"]) dist = self.distribution ext_modules = dist.ext_modules if ext_modules: dist.ext_modules[:] = self.cythonize(ext_modules) _build.run(self)
[ "def", "run", "(", "self", ")", ":", "config_h", "=", "opj", "(", "\"src\"", ",", "\"cysignals\"", ",", "\"cysignals_config.h\"", ")", "if", "not", "os", ".", "path", ".", "isfile", "(", "config_h", ")", ":", "import", "subprocess", "subprocess", ".", "check_call", "(", "[", "\"make\"", ",", "\"configure\"", "]", ")", "subprocess", ".", "check_call", "(", "[", "\"sh\"", ",", "\"configure\"", "]", ")", "dist", "=", "self", ".", "distribution", "ext_modules", "=", "dist", ".", "ext_modules", "if", "ext_modules", ":", "dist", ".", "ext_modules", "[", ":", "]", "=", "self", ".", "cythonize", "(", "ext_modules", ")", "_build", ".", "run", "(", "self", ")" ]
Run ``./configure`` and Cython first.
[ "Run", ".", "/", "configure", "and", "Cython", "first", "." ]
a8a8ad789332996e7e094188d65884982e899a65
https://github.com/sagemath/cysignals/blob/a8a8ad789332996e7e094188d65884982e899a65/setup.py#L88-L103
train
Run Cython first.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ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AcezIXzQNA,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(1084 - 1036) + chr(7695 - 7584) + chr(51) + chr(0b110110) + chr(2834 - 2780), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(50) + chr(0b110010) + chr(0b1100 + 0o51), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + '\065' + chr(0b11100 + 0o24), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b110010) + chr(2367 - 2315), 58668 - 58660), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + '\060' + chr(0b100 + 0o56), 16814 - 16806), nzTpIcepk0o8('\x30' + '\157' + chr(894 - 843) + chr(0b11011 + 0o34) + chr(0b100001 + 0o24), ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\157' + chr(49) + chr(0b110111) + '\066', 32166 - 32158), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + '\065' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(264 - 153) + chr(0b10001 + 0o42) + chr(582 - 533) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\x6f' + chr(0b110011) + '\060' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1101111) + chr(0b110011) + '\x37' + '\x35', 8), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(0b110001) + chr(52), 0b1000), nzTpIcepk0o8('\x30' + chr(6233 - 6122) + chr(51) + chr(54) + '\x31', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + '\x34' + '\060', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(0b110010) + chr(1753 - 1699), 50774 - 50766), nzTpIcepk0o8(chr(48) + chr(111) + chr(2270 - 2219) + '\x37' + '\x32', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1 + 0o61) + chr(0b110110) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + chr(2246 - 2195) + chr(50) + chr(415 - 363), 33301 - 33293), nzTpIcepk0o8('\060' + chr(111) + chr(1310 - 1260) + chr(51) + chr(157 - 103), 59000 - 58992), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(1711 - 1663) + chr(0b110110), 11282 - 11274), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001 + 0o1) + chr(0b11110 + 0o25) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101110 + 0o1) + chr(0b1000 + 0o51) + chr(1603 - 1550) + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(2166 - 2055) + '\x31' + '\064' + '\066', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + '\x35' + chr(0b110001), 29111 - 29103), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(49) + '\x35' + '\060', 8), nzTpIcepk0o8(chr(676 - 628) + '\x6f' + '\x36' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(111) + '\x33' + chr(48) + chr(49), 0o10), nzTpIcepk0o8(chr(1439 - 1391) + '\x6f' + chr(0b0 + 0o62) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + chr(8423 - 8312) + chr(0b1100 + 0o47) + chr(0b110010 + 0o0) + '\066', 50087 - 50079), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100101 + 0o14) + chr(1121 - 1072), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1150 - 1099) + chr(54) + chr(1950 - 1900), 59346 - 59338), nzTpIcepk0o8('\060' + chr(0b1 + 0o156) + chr(1865 - 1814) + chr(258 - 208) + '\064', 8), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1011 + 0o144) + '\062' + chr(1739 - 1691), 0b1000), nzTpIcepk0o8('\060' + chr(3786 - 3675) + '\062' + chr(0b110011) + '\066', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x34' + chr(1533 - 1483), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + '\065' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(1960 - 1907) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(54) + '\065', 8), nzTpIcepk0o8(chr(1138 - 1090) + '\157' + '\063' + '\066' + chr(52), 50156 - 50148)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(454 - 406) + '\157' + chr(1786 - 1733) + chr(48), 2879 - 2871)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd8'), chr(0b1000110 + 0o36) + '\145' + chr(99) + '\x6f' + chr(100) + chr(0b1100101))('\165' + '\164' + chr(0b110101 + 0o61) + chr(45) + chr(1647 - 1591)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def qnPOIdBQJdzY(hXMPsSrOQzbh): OrTsST2ZQOyj = z7_Ew9EuHbF4(roI3spqORKae(ES5oEprVxulp(b'\x85\xe7\x0b'), chr(0b111101 + 0o47) + chr(0b101 + 0o140) + chr(8751 - 8652) + chr(0b1101111) + '\x64' + '\145')('\165' + chr(0b1110100) + '\146' + chr(0b101101) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\x95\xec\x1b=\xa5\x93\x1f\x81\xbd'), chr(0b1100100) + chr(101) + chr(0b100010 + 0o101) + '\157' + '\144' + '\145')(chr(0b1110101) + chr(0b1 + 0o163) + chr(0b1100110) + chr(0b11110 + 0o17) + chr(1804 - 1748)), roI3spqORKae(ES5oEprVxulp(b'\x95\xec\x1b=\xa5\x93\x1f\x81\xbdC\xa3\x92\xa2\x97\x89\xf1\xd4\xda'), chr(0b1001101 + 0o27) + chr(7494 - 7393) + chr(0b1100011) + '\157' + chr(0b111011 + 0o51) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(727 - 682) + '\070')) if not roI3spqORKae(aHUqKstZLeS6.path, roI3spqORKae(ES5oEprVxulp(b'\x9f\xe6\x0e=\xae\x98'), chr(0b100011 + 0o101) + '\145' + chr(0b1100011) + chr(4229 - 4118) + chr(0b1000111 + 0o35) + chr(3537 - 3436))(chr(0b1110101) + '\164' + chr(0b101111 + 0o67) + chr(45) + '\070'))(OrTsST2ZQOyj): (eT8Y087E_kfd,) = (zGgTE_CdZfvi(roI3spqORKae(ES5oEprVxulp(b'\x85\xe0\n$\xb0\x92\x1d\x88\xbdo'), chr(0b1100100) + chr(7280 - 7179) + chr(99) + chr(8378 - 8267) + chr(100) + chr(0b1100101))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(0b101101) + chr(0b101000 + 0o20))),) roI3spqORKae(eT8Y087E_kfd, roI3spqORKae(ES5oEprVxulp(b'\x95\xfd\r7\xa9\xa2\x1d\x8c\xa2p'), chr(1425 - 1325) + '\x65' + '\x63' + chr(0b1101111) + '\x64' + '\145')(chr(8704 - 8587) + chr(11699 - 11583) + '\146' + '\055' + chr(56)))([roI3spqORKae(ES5oEprVxulp(b'\x9b\xf4\x031'), chr(0b1100100) + chr(101) + chr(0b111010 + 0o51) + chr(0b1001100 + 0o43) + chr(0b1100100) + chr(0b111101 + 0o50))(chr(0b101 + 0o160) + chr(9481 - 9365) + chr(7006 - 6904) + chr(45) + '\070'), roI3spqORKae(ES5oEprVxulp(b'\x95\xfa\x062\xab\x9a\x0b\x9f\xab'), chr(1510 - 1410) + '\145' + chr(4931 - 4832) + chr(7207 - 7096) + chr(100) + chr(9142 - 9041))('\165' + chr(0b1110100) + '\x66' + chr(0b101101) + chr(56))]) roI3spqORKae(eT8Y087E_kfd, roI3spqORKae(ES5oEprVxulp(b'\x95\xfd\r7\xa9\xa2\x1d\x8c\xa2p'), '\144' + chr(0b110110 + 0o57) + '\x63' + '\157' + chr(100) + chr(0b101000 + 0o75))(chr(0b10001 + 0o144) + chr(0b1110100) + chr(102) + chr(0b101101) + chr(654 - 598)))([roI3spqORKae(ES5oEprVxulp(b'\x85\xfd'), chr(5277 - 5177) + chr(101) + chr(2615 - 2516) + chr(0b101010 + 0o105) + chr(7332 - 7232) + '\145')('\165' + chr(3679 - 3563) + '\146' + '\x2d' + chr(3002 - 2946)), roI3spqORKae(ES5oEprVxulp(b'\x95\xfa\x062\xab\x9a\x0b\x9f\xab'), '\x64' + '\x65' + '\x63' + '\157' + '\144' + '\145')(chr(10848 - 10731) + chr(0b1110100) + chr(2081 - 1979) + chr(45) + '\x38')]) Kt39bH0WF46E = hXMPsSrOQzbh._xu78n_2vnOF IJrfaPzxlXjM = Kt39bH0WF46E.ext_modules if IJrfaPzxlXjM: Kt39bH0WF46E.IJrfaPzxlXjM[:] = hXMPsSrOQzbh.cythonize(IJrfaPzxlXjM) roI3spqORKae(Ne_ZGo28G2QC, roI3spqORKae(ES5oEprVxulp(b'\x87\xfb8\x1b\x8b\x99<\xbc\x84x\xba\xa4'), chr(0b1100100) + chr(819 - 718) + chr(99) + chr(9499 - 9388) + '\x64' + chr(0b1100101))('\165' + chr(0b1110000 + 0o4) + chr(102) + chr(45) + chr(0b111000)))(hXMPsSrOQzbh)
sagemath/cysignals
src/scripts/cysignals-CSI-helper.py
cython_debug_files
def cython_debug_files(): """ Cython extra debug information files """ # Search all subdirectories of sys.path directories for a # "cython_debug" directory. Note that sys_path is a variable set by # cysignals-CSI. It may differ from sys.path if GDB is run with a # different Python interpreter. files = [] for path in sys_path: # noqa pattern = os.path.join(path, '*', 'cython_debug', 'cython_debug_info_*') files.extend(glob.glob(pattern)) return files
python
def cython_debug_files(): """ Cython extra debug information files """ # Search all subdirectories of sys.path directories for a # "cython_debug" directory. Note that sys_path is a variable set by # cysignals-CSI. It may differ from sys.path if GDB is run with a # different Python interpreter. files = [] for path in sys_path: # noqa pattern = os.path.join(path, '*', 'cython_debug', 'cython_debug_info_*') files.extend(glob.glob(pattern)) return files
[ "def", "cython_debug_files", "(", ")", ":", "# Search all subdirectories of sys.path directories for a", "# \"cython_debug\" directory. Note that sys_path is a variable set by", "# cysignals-CSI. It may differ from sys.path if GDB is run with a", "# different Python interpreter.", "files", "=", "[", "]", "for", "path", "in", "sys_path", ":", "# noqa", "pattern", "=", "os", ".", "path", ".", "join", "(", "path", ",", "'*'", ",", "'cython_debug'", ",", "'cython_debug_info_*'", ")", "files", ".", "extend", "(", "glob", ".", "glob", "(", "pattern", ")", ")", "return", "files" ]
Cython extra debug information files
[ "Cython", "extra", "debug", "information", "files" ]
a8a8ad789332996e7e094188d65884982e899a65
https://github.com/sagemath/cysignals/blob/a8a8ad789332996e7e094188d65884982e899a65/src/scripts/cysignals-CSI-helper.py#L34-L46
train
Returns a list of all cython extra debug information files.
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,REazVyv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yvlqO,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(2682 - 2571) + chr(1873 - 1821) + chr(0b100111 + 0o14), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(0b110100) + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + '\067' + chr(0b1111 + 0o46), 0b1000), nzTpIcepk0o8(chr(369 - 321) + chr(111) + '\063' + '\x30' + chr(51), 0o10), nzTpIcepk0o8(chr(48) + chr(0b100110 + 0o111) + '\066' + chr(48), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + '\x33' + chr(54), 0o10), nzTpIcepk0o8(chr(77 - 29) + chr(0b1101111) + chr(1262 - 1212) + chr(54) + '\060', 0o10), nzTpIcepk0o8(chr(0b10001 + 0o37) + '\157' + chr(0b101111 + 0o4) + chr(0b110010), 11188 - 11180), nzTpIcepk0o8(chr(48) + '\157' + '\061' + '\060' + chr(0b110001), 5122 - 5114), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + chr(0b11001 + 0o32) + '\x37' + '\067', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x33' + chr(0b110001) + chr(1815 - 1762), 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\157' + chr(0b110110) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(111) + chr(0b10000 + 0o41) + '\x33' + chr(0b100101 + 0o21), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1000000 + 0o57) + '\063' + '\x35' + chr(1712 - 1658), 2961 - 2953), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(51), 43036 - 43028), nzTpIcepk0o8(chr(48) + '\157' + chr(54) + chr(0b101010 + 0o11), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(943 - 895), 0b1000), nzTpIcepk0o8(chr(48) + chr(6393 - 6282) + '\062' + chr(0b110000) + chr(48), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(0b11000 + 0o31) + '\x32', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(50) + '\064' + chr(955 - 906), ord("\x08")), nzTpIcepk0o8(chr(0b111 + 0o51) + '\157' + '\x35' + '\x36', 58700 - 58692), nzTpIcepk0o8(chr(841 - 793) + chr(111) + '\x32' + chr(0b10 + 0o63) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(111) + chr(50) + '\x34' + '\x35', 20261 - 20253), nzTpIcepk0o8(chr(939 - 891) + chr(0b1101111) + chr(672 - 621) + '\x34' + '\063', 0o10), nzTpIcepk0o8(chr(2023 - 1975) + chr(111) + chr(0b110011) + chr(0b110001) + '\065', 8), nzTpIcepk0o8(chr(1867 - 1819) + chr(0b1101111) + chr(0b10111 + 0o35) + chr(833 - 784), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11101 + 0o26) + '\x31' + '\x35', 8), nzTpIcepk0o8(chr(159 - 111) + '\x6f' + chr(0b110011) + '\061', 0b1000), nzTpIcepk0o8(chr(1561 - 1513) + '\157' + chr(0b110110) + chr(48), 8), nzTpIcepk0o8(chr(48) + chr(11160 - 11049) + chr(0b110001) + chr(0b1011 + 0o46) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110110) + chr(106 - 58), 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(2071 - 2018) + chr(50), 0o10), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\157' + chr(0b10110 + 0o37) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(482 - 431) + '\x37' + '\x33', 8175 - 8167), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + chr(51) + chr(48), 0o10), nzTpIcepk0o8(chr(1314 - 1266) + chr(111) + chr(823 - 773) + '\x32' + '\061', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(0b11011 + 0o31) + chr(2330 - 2279), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(0b110100) + chr(0b110101), 8), nzTpIcepk0o8('\x30' + chr(5877 - 5766) + '\061' + chr(0b110110) + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(48) + '\063', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(5770 - 5659) + chr(0b101011 + 0o12) + chr(0b10000 + 0o40), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\r'), chr(100) + '\x65' + '\143' + '\x6f' + '\144' + chr(0b10011 + 0o122))(chr(0b1110101) + chr(0b1110100) + chr(0b1011 + 0o133) + chr(564 - 519) + chr(1589 - 1533)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def v0NtZAeUBRDe(): wR5_YWECjaY7 = [] for _pSYqrosNb95 in rsGOf_nPV8bt: UYtHA0XyNB9C = aHUqKstZLeS6.path.Y4yM9BcfTCNq(_pSYqrosNb95, roI3spqORKae(ES5oEprVxulp(b'\t'), '\144' + chr(0b1100101) + chr(99) + chr(5582 - 5471) + chr(0b1100100) + '\145')('\165' + '\x74' + chr(4882 - 4780) + chr(45) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'@\xdb\xc9\xab_0\xef~$\x9d\xb8Q'), chr(0b1001100 + 0o30) + chr(5811 - 5710) + chr(480 - 381) + chr(0b1000011 + 0o54) + chr(4913 - 4813) + '\x65')(chr(10222 - 10105) + chr(5538 - 5422) + '\x66' + chr(45) + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'@\xdb\xc9\xab_0\xef~$\x9d\xb8Q\x01\x87eUo\xdf`'), chr(100) + '\x65' + chr(3971 - 3872) + chr(111) + chr(100) + chr(0b101010 + 0o73))(chr(2502 - 2385) + chr(116) + '\x66' + chr(1753 - 1708) + chr(0b111000))) roI3spqORKae(wR5_YWECjaY7, roI3spqORKae(ES5oEprVxulp(b'w\xfd\x8e\x8e_:\xfcM\x1e\xbd\xafG'), chr(0b1011010 + 0o12) + '\145' + chr(0b1100011) + chr(111) + chr(0b1100100) + chr(2413 - 2312))(chr(10438 - 10321) + chr(116) + '\146' + chr(0b101 + 0o50) + chr(0b111000)))(roI3spqORKae(mtVuHd9cGi1a, roI3spqORKae(ES5oEprVxulp(b'D\xce\xd2\xa1'), chr(100) + chr(0b1100101) + '\x63' + '\157' + '\144' + '\145')(chr(0b1 + 0o164) + chr(10228 - 10112) + '\146' + chr(0b11111 + 0o16) + chr(0b111000)))(UYtHA0XyNB9C)) return wR5_YWECjaY7
BerkeleyAutomation/perception
perception/colorized_phoxi_sensor.py
ColorizedPhoXiSensor.start
def start(self): """Start the sensor. """ running = self._webcam.start() if not running: return running running &= self._phoxi.start() if not running: self._webcam.stop() return running
python
def start(self): """Start the sensor. """ running = self._webcam.start() if not running: return running running &= self._phoxi.start() if not running: self._webcam.stop() return running
[ "def", "start", "(", "self", ")", ":", "running", "=", "self", ".", "_webcam", ".", "start", "(", ")", "if", "not", "running", ":", "return", "running", "running", "&=", "self", ".", "_phoxi", ".", "start", "(", ")", "if", "not", "running", ":", "self", ".", "_webcam", ".", "stop", "(", ")", "return", "running" ]
Start the sensor.
[ "Start", "the", "sensor", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/colorized_phoxi_sensor.py#L81-L91
train
Start the sensor.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJh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ssertionError,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' + '\x36' + '\x34', 27939 - 27931), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(442 - 392) + '\063', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1001 + 0o52) + chr(0b101000 + 0o11) + chr(53), 0o10), nzTpIcepk0o8('\060' + chr(0b1000111 + 0o50) + chr(0b110 + 0o53) + chr(404 - 349) + chr(1523 - 1475), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + chr(54) + chr(0b0 + 0o65), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11010 + 0o30) + chr(0b110001) + chr(0b110100), 6987 - 6979), nzTpIcepk0o8('\060' + '\x6f' + chr(2268 - 2218) + chr(55) + chr(0b100011 + 0o21), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110111) + '\x36', 0b1000), nzTpIcepk0o8(chr(1456 - 1408) + '\x6f' + '\061' + '\060', 16300 - 16292), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110110) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(1456 - 1408) + '\157' + '\x33', 0b1000), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(111) + '\062' + '\x34' + '\060', 0o10), nzTpIcepk0o8(chr(1573 - 1525) + '\x6f' + chr(0b110111) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b11011 + 0o124) + chr(0b100110 + 0o15) + chr(473 - 425) + chr(0b110011), 51530 - 51522), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(0b100111 + 0o11) + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110110 + 0o71) + chr(75 - 25) + '\x37' + '\061', 0o10), nzTpIcepk0o8(chr(704 - 656) + chr(111) + chr(0b110101) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1001010 + 0o45) + chr(2362 - 2311) + chr(0b110001) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(7769 - 7658) + '\062' + '\066' + '\x35', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(2185 - 2134) + chr(0b10110 + 0o37) + chr(2448 - 2398), 0b1000), nzTpIcepk0o8(chr(48) + chr(5533 - 5422) + chr(51) + chr(1872 - 1822) + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1000110 + 0o51) + chr(0b1000 + 0o53) + chr(0b11111 + 0o25) + chr(0b110101), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101110 + 0o1) + '\x32' + chr(0b110001) + '\062', 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + chr(0b101010 + 0o7) + chr(50) + '\x37', 17391 - 17383), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(50), 0o10), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(111) + chr(0b11101 + 0o25) + '\065' + '\063', 59041 - 59033), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001 + 0o0) + chr(48) + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(0b110101) + chr(391 - 343), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(0b110001 + 0o6) + chr(717 - 668), 8), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\157' + chr(0b10000 + 0o46) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + '\x33' + '\062' + chr(0b110001 + 0o2), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(2432 - 2382) + '\x31' + chr(0b100000 + 0o24), 8), nzTpIcepk0o8('\x30' + '\x6f' + '\066' + '\061', 0b1000), nzTpIcepk0o8(chr(48) + chr(2728 - 2617) + chr(0b101110 + 0o7) + '\x35', 0b1000), nzTpIcepk0o8('\060' + chr(0b1011101 + 0o22) + chr(0b110010) + chr(0b110000 + 0o5) + chr(0b100110 + 0o12), 1476 - 1468), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(50) + '\062', 42022 - 42014), nzTpIcepk0o8('\060' + chr(8765 - 8654) + '\x32' + chr(0b11 + 0o61) + '\064', 28749 - 28741), nzTpIcepk0o8(chr(1377 - 1329) + chr(111) + chr(455 - 406) + '\x32' + chr(0b110011), 1925 - 1917), nzTpIcepk0o8(chr(0b110000) + chr(1502 - 1391) + '\061' + '\x35' + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2460 - 2349) + '\x34' + chr(1751 - 1703), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1364 - 1311) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9a'), chr(0b1100100) + chr(0b110000 + 0o65) + '\143' + chr(0b1100110 + 0o11) + chr(100) + '\x65')(chr(12890 - 12773) + chr(0b1000010 + 0o62) + chr(785 - 683) + chr(0b101101 + 0o0) + chr(0b100110 + 0o22)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def KQbHFTcl_LKy(hXMPsSrOQzbh): MKz_GJJ9ts6l = hXMPsSrOQzbh._webcam.KQbHFTcl_LKy() if not MKz_GJJ9ts6l: return MKz_GJJ9ts6l MKz_GJJ9ts6l &= hXMPsSrOQzbh._phoxi.KQbHFTcl_LKy() if not MKz_GJJ9ts6l: roI3spqORKae(hXMPsSrOQzbh._webcam, roI3spqORKae(ES5oEprVxulp(b'\xd0\xca\x87\x1a\xb7\xe5\xe5qW[D\xe5'), chr(0b111100 + 0o50) + chr(101) + chr(99) + chr(0b1010011 + 0o34) + chr(6443 - 6343) + chr(0b111000 + 0o55))(chr(0b1110101) + chr(0b1100101 + 0o17) + '\x66' + chr(1306 - 1261) + chr(0b111000)))() return MKz_GJJ9ts6l
BerkeleyAutomation/perception
perception/colorized_phoxi_sensor.py
ColorizedPhoXiSensor.stop
def stop(self): """Stop the sensor. """ # Check that everything is running if not self._running: logging.warning('Colorized PhoXi not running. Aborting stop') return False self._webcam.stop() self._phoxi.stop() return True
python
def stop(self): """Stop the sensor. """ # Check that everything is running if not self._running: logging.warning('Colorized PhoXi not running. Aborting stop') return False self._webcam.stop() self._phoxi.stop() return True
[ "def", "stop", "(", "self", ")", ":", "# Check that everything is running", "if", "not", "self", ".", "_running", ":", "logging", ".", "warning", "(", "'Colorized PhoXi not running. Aborting stop'", ")", "return", "False", "self", ".", "_webcam", ".", "stop", "(", ")", "self", ".", "_phoxi", ".", "stop", "(", ")", "return", "True" ]
Stop the sensor.
[ "Stop", "the", "sensor", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/colorized_phoxi_sensor.py#L93-L104
train
Stop the sensor.
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(0b100011 + 0o15) + '\157' + '\x33' + chr(0b10010 + 0o36), 0o10), nzTpIcepk0o8('\060' + chr(0b1010101 + 0o32) + chr(50) + chr(285 - 234) + chr(0b110000), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(52) + chr(420 - 369), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(53) + chr(52), 47795 - 47787), nzTpIcepk0o8('\060' + chr(3871 - 3760) + chr(0b101010 + 0o7) + chr(52) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b101101 + 0o102) + chr(0b110011) + '\x34' + '\x33', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x37' + chr(0b110000), 56646 - 56638), nzTpIcepk0o8(chr(1748 - 1700) + chr(1129 - 1018) + chr(52) + chr(1576 - 1525), 0b1000), nzTpIcepk0o8(chr(528 - 480) + chr(370 - 259) + chr(51) + '\x34' + chr(0b110010 + 0o0), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + '\064' + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(9072 - 8961) + chr(0b0 + 0o61) + '\x32' + '\060', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(2315 - 2266) + chr(51), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(879 - 827) + chr(0b10001 + 0o44), 0o10), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b1101111) + '\062' + chr(0b10010 + 0o41) + '\x36', 19107 - 19099), nzTpIcepk0o8('\x30' + chr(0b1011 + 0o144) + '\061' + chr(52) + chr(54), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(0b110010) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1100111 + 0o10) + '\063' + '\x32' + '\065', 8), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(834 - 779) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(52) + chr(54), 8), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(0b100000 + 0o26) + '\x32', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(1581 - 1532) + '\065' + chr(50), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b100010 + 0o21) + '\060' + chr(196 - 141), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(9253 - 9142) + '\063' + chr(1624 - 1575) + '\066', 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b100100 + 0o113) + chr(1587 - 1538) + '\062' + chr(996 - 946), 0o10), nzTpIcepk0o8(chr(1211 - 1163) + chr(0b1101111) + chr(0b1100 + 0o46) + chr(0b110111) + chr(0b101000 + 0o11), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\061' + chr(0b110000) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(7806 - 7695) + chr(51) + '\065', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(0b11111 + 0o25) + chr(1957 - 1907), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(1108 - 1058) + '\x35', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1071 - 1020) + '\064' + chr(799 - 746), ord("\x08")), nzTpIcepk0o8(chr(1830 - 1782) + chr(7432 - 7321) + chr(50) + '\062' + '\066', 0b1000), nzTpIcepk0o8(chr(167 - 119) + chr(6022 - 5911) + chr(1142 - 1093) + chr(53) + chr(0b110010), 8), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(4908 - 4797) + chr(2838 - 2783) + '\x33', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + chr(1897 - 1847) + chr(0b11101 + 0o32), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + chr(52) + chr(2304 - 2256), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(1525 - 1414) + chr(650 - 601) + '\x33' + '\066', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\062' + chr(0b100011 + 0o17) + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101010 + 0o10) + chr(49) + chr(2221 - 2169), ord("\x08")), nzTpIcepk0o8(chr(0b10 + 0o56) + '\157' + chr(0b110001) + chr(313 - 265), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1011 + 0o45) + '\157' + chr(0b110101) + chr(813 - 765), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'6'), chr(100) + chr(0b1100010 + 0o3) + chr(99) + '\x6f' + chr(0b1100100) + '\145')('\165' + chr(7116 - 7000) + chr(0b11010 + 0o114) + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def dYJbBiYO_nGE(hXMPsSrOQzbh): if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'Q\xde\xd7+R\xa1\x0b\x14\x92\x0f\x02\xa8'), chr(0b1100100) + '\145' + '\x63' + '\157' + chr(0b1100100) + chr(0b1100101))(chr(2389 - 2272) + chr(116) + '\146' + chr(226 - 181) + '\070')): roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'o\xf9\x91\x02\x0b\x8d_'), '\144' + '\x65' + chr(0b10101 + 0o116) + chr(0b11000 + 0o127) + chr(0b110011 + 0o61) + chr(101))(chr(0b1100111 + 0o16) + '\164' + '\146' + chr(45) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'[\xf7\x8f\x03\x10\x8aBF\x86F\x00\xa3J\xc6\x0f\xf5\xbb\x12vF\x80\x1f\xa9\xa0;\xd7&3\x82\x14\x87\xf9\x18O\xfe\xce9\xb5\xff|w\xe8'), '\144' + '\145' + '\143' + chr(111) + chr(0b101111 + 0o65) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b100001 + 0o105) + chr(45) + chr(0b111000 + 0o0))) return nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x30', 6667 - 6659) roI3spqORKae(hXMPsSrOQzbh._webcam, roI3spqORKae(ES5oEprVxulp(b'|\xc1\xa9\x0e \x8aal\xbd\x08\x17\x8e'), chr(2540 - 2440) + chr(3832 - 3731) + chr(5741 - 5642) + '\x6f' + chr(0b1100100) + '\145')('\165' + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(2961 - 2905)))() roI3spqORKae(hXMPsSrOQzbh._phoxi, roI3spqORKae(ES5oEprVxulp(b'|\xc1\xa9\x0e \x8aal\xbd\x08\x17\x8e'), chr(0b1010111 + 0o15) + chr(0b11000 + 0o115) + chr(0b1100011) + '\x6f' + chr(100) + chr(0b110000 + 0o65))(chr(0b111001 + 0o74) + chr(2910 - 2794) + '\146' + '\055' + chr(56)))() return nzTpIcepk0o8(chr(0b110000) + chr(1914 - 1803) + '\061', 0o10)
BerkeleyAutomation/perception
perception/colorized_phoxi_sensor.py
ColorizedPhoXiSensor.frames
def frames(self): """Retrieve a new frame from the PhoXi and convert it to a ColorImage, a DepthImage, and an IrImage. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame. """ _, phoxi_depth_im, _ = self._phoxi.frames() webcam_color_im, _, _ = self._webcam.frames(most_recent=True) # Colorize PhoXi Image phoxi_color_im = self._colorize(phoxi_depth_im, webcam_color_im) return phoxi_color_im, phoxi_depth_im, None
python
def frames(self): """Retrieve a new frame from the PhoXi and convert it to a ColorImage, a DepthImage, and an IrImage. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame. """ _, phoxi_depth_im, _ = self._phoxi.frames() webcam_color_im, _, _ = self._webcam.frames(most_recent=True) # Colorize PhoXi Image phoxi_color_im = self._colorize(phoxi_depth_im, webcam_color_im) return phoxi_color_im, phoxi_depth_im, None
[ "def", "frames", "(", "self", ")", ":", "_", ",", "phoxi_depth_im", ",", "_", "=", "self", ".", "_phoxi", ".", "frames", "(", ")", "webcam_color_im", ",", "_", ",", "_", "=", "self", ".", "_webcam", ".", "frames", "(", "most_recent", "=", "True", ")", "# Colorize PhoXi Image", "phoxi_color_im", "=", "self", ".", "_colorize", "(", "phoxi_depth_im", ",", "webcam_color_im", ")", "return", "phoxi_color_im", ",", "phoxi_depth_im", ",", "None" ]
Retrieve a new frame from the PhoXi and convert it to a ColorImage, a DepthImage, and an IrImage. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame.
[ "Retrieve", "a", "new", "frame", "from", "the", "PhoXi", "and", "convert", "it", "to", "a", "ColorImage", "a", "DepthImage", "and", "an", "IrImage", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/colorized_phoxi_sensor.py#L106-L120
train
Retrieve a new frame from the PhoXi and convert it to a ColorImage DepthImage and IrImage.
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,LdFlJR2ssk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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(0b110000) + '\x6f' + '\063' + chr(0b10111 + 0o32) + chr(0b110110), 59638 - 59630), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(55) + chr(0b110111), 31246 - 31238), nzTpIcepk0o8('\060' + chr(0b1001100 + 0o43) + chr(1783 - 1730) + '\x31', 45785 - 45777), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(50) + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(0b100111 + 0o15) + '\067', 61472 - 61464), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\x6f' + chr(0b100001 + 0o22) + chr(0b10111 + 0o33) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110000 + 0o77) + chr(0b100100 + 0o15) + chr(0b110000) + '\060', 11873 - 11865), nzTpIcepk0o8('\x30' + chr(8315 - 8204) + chr(51) + chr(0b1110 + 0o46) + chr(1629 - 1576), ord("\x08")), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(111) + chr(1941 - 1890) + chr(0b10000 + 0o43) + chr(51), 7518 - 7510), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(765 - 712) + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(493 - 443) + '\x36', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11101 + 0o30) + chr(2364 - 2309), ord("\x08")), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(8301 - 8190) + chr(50) + chr(0b110000) + chr(0b11010 + 0o34), 0b1000), nzTpIcepk0o8('\060' + chr(845 - 734) + chr(0b110001 + 0o2) + '\067' + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + '\062' + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101000 + 0o7) + chr(681 - 632) + '\x35' + chr(1946 - 1898), 39508 - 39500), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + '\064' + chr(1776 - 1725), 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + '\x33' + chr(1161 - 1106) + '\x33', 8), nzTpIcepk0o8(chr(1565 - 1517) + chr(0b1011011 + 0o24) + chr(0b110010) + chr(49) + chr(55), 3640 - 3632), nzTpIcepk0o8('\x30' + chr(0b1000001 + 0o56) + chr(51) + '\063' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1101111) + chr(0b110010) + chr(0b110011) + chr(0b110101), 46247 - 46239), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(0b100011 + 0o21) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(2039 - 1991) + chr(111) + '\064' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(636 - 588) + '\157' + '\062' + chr(0b100 + 0o55) + '\x37', 8), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(0b1101111) + '\063' + '\x35' + chr(49), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(52) + chr(50), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + '\060' + '\x37', 504 - 496), nzTpIcepk0o8(chr(48) + chr(5030 - 4919) + '\x33' + '\065' + '\x35', 0o10), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(1444 - 1333) + chr(52), 17002 - 16994), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + '\x34' + chr(0b11 + 0o57), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + '\x36' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(2965 - 2854) + chr(0b110001) + '\x30' + chr(0b100111 + 0o11), 8), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1010110 + 0o31) + '\063' + '\060' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\157' + '\x31' + '\061' + chr(0b100010 + 0o16), ord("\x08")), nzTpIcepk0o8(chr(979 - 931) + chr(11543 - 11432) + chr(51) + chr(0b110011) + '\x34', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11001 + 0o35) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b110111 + 0o70) + chr(50) + '\x34' + '\x36', 8), nzTpIcepk0o8(chr(2243 - 2195) + chr(111) + '\063' + '\x30' + '\x35', 0o10), nzTpIcepk0o8('\060' + '\157' + '\061' + '\x34' + chr(1781 - 1733), ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101111) + chr(0b0 + 0o62) + '\x32' + '\063', 62055 - 62047)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\157' + chr(1912 - 1859) + chr(1972 - 1924), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe0'), chr(0b1010 + 0o132) + chr(4204 - 4103) + '\143' + chr(0b1101111) + chr(100) + chr(880 - 779))(chr(117) + chr(0b1110100) + '\146' + '\055' + chr(511 - 455)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def G4Lisexwxqjs(hXMPsSrOQzbh): (zIqcgNgQ9U6F, gmdA4K4geusR, zIqcgNgQ9U6F) = hXMPsSrOQzbh._phoxi.G4Lisexwxqjs() (sqILVOvKqLQN, zIqcgNgQ9U6F, zIqcgNgQ9U6F) = hXMPsSrOQzbh._webcam.G4Lisexwxqjs(most_recent=nzTpIcepk0o8(chr(212 - 164) + chr(111) + '\061', ord("\x08"))) eXw79dJzD1_9 = hXMPsSrOQzbh._colorize(gmdA4K4geusR, sqILVOvKqLQN) return (eXw79dJzD1_9, gmdA4K4geusR, None)
BerkeleyAutomation/perception
perception/colorized_phoxi_sensor.py
ColorizedPhoXiSensor.median_depth_img
def median_depth_img(self, num_img=1, fill_depth=0.0): """Collect a series of depth images and return the median of the set. Parameters ---------- num_img : int The number of consecutive frames to process. Returns ------- DepthImage The median DepthImage collected from the frames. """ depths = [] for _ in range(num_img): _, depth, _ = self.frames() depths.append(depth) median_depth = Image.median_images(depths) median_depth.data[median_depth.data == 0.0] = fill_depth return median_depth
python
def median_depth_img(self, num_img=1, fill_depth=0.0): """Collect a series of depth images and return the median of the set. Parameters ---------- num_img : int The number of consecutive frames to process. Returns ------- DepthImage The median DepthImage collected from the frames. """ depths = [] for _ in range(num_img): _, depth, _ = self.frames() depths.append(depth) median_depth = Image.median_images(depths) median_depth.data[median_depth.data == 0.0] = fill_depth return median_depth
[ "def", "median_depth_img", "(", "self", ",", "num_img", "=", "1", ",", "fill_depth", "=", "0.0", ")", ":", "depths", "=", "[", "]", "for", "_", "in", "range", "(", "num_img", ")", ":", "_", ",", "depth", ",", "_", "=", "self", ".", "frames", "(", ")", "depths", ".", "append", "(", "depth", ")", "median_depth", "=", "Image", ".", "median_images", "(", "depths", ")", "median_depth", ".", "data", "[", "median_depth", ".", "data", "==", "0.0", "]", "=", "fill_depth", "return", "median_depth" ]
Collect a series of depth images and return the median of the set. Parameters ---------- num_img : int The number of consecutive frames to process. Returns ------- DepthImage The median DepthImage collected from the frames.
[ "Collect", "a", "series", "of", "depth", "images", "and", "return", "the", "median", "of", "the", "set", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/colorized_phoxi_sensor.py#L122-L143
train
Collect a series of depth images and return the median of the set.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf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ZbhU,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 + 0o0) + chr(0b101001 + 0o106) + chr(0b110010) + '\x36' + '\067', 0o10), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + chr(443 - 391) + chr(2623 - 2570), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b101000 + 0o11) + '\x31' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + chr(6640 - 6529) + chr(208 - 155), ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\157' + chr(0b110011) + chr(610 - 562) + chr(53), 39901 - 39893), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + '\061' + chr(0b11010 + 0o26), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b110100) + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100011 + 0o114) + chr(0b100110 + 0o16) + '\061', 33418 - 33410), nzTpIcepk0o8('\060' + '\157' + chr(928 - 877) + chr(0b110001), 9641 - 9633), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\157' + chr(50) + '\065' + chr(0b1010 + 0o53), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(53) + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(9549 - 9438) + chr(0b110011) + chr(0b1101 + 0o46) + '\065', 0o10), nzTpIcepk0o8(chr(1377 - 1329) + chr(0b1101111) + '\063' + chr(0b110001 + 0o1) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + '\x30', 63865 - 63857), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1808 - 1759) + '\x34' + chr(52), 8), nzTpIcepk0o8('\060' + '\157' + chr(50) + chr(0b110001) + chr(0b11111 + 0o25), 31539 - 31531), nzTpIcepk0o8('\060' + chr(0b110010 + 0o75) + chr(698 - 647) + chr(55) + '\064', 0o10), nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(0b110110) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(0b110000) + chr(0b1101 + 0o44), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + chr(0b1001 + 0o54) + chr(55), 57826 - 57818), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1111 + 0o43) + chr(0b110000) + chr(0b100001 + 0o23), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100100 + 0o16) + '\061' + chr(0b10000 + 0o42), 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(0b111011 + 0o64) + '\x33' + chr(0b110010 + 0o5) + chr(0b110101 + 0o0), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(384 - 334) + chr(368 - 314) + '\066', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101 + 0o142) + chr(49) + '\066' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b11000 + 0o127) + chr(49) + '\x30' + chr(55), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x31', 0o10), nzTpIcepk0o8(chr(48) + chr(10582 - 10471) + chr(0b101011 + 0o10) + '\064' + '\x32', 18805 - 18797), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1947 - 1897) + '\062' + chr(48), 0o10), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(7306 - 7195) + '\063' + '\064' + chr(0b101 + 0o55), 8), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1101111) + chr(0b110010) + chr(0b1110 + 0o43) + chr(1600 - 1551), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(0b1111 + 0o50) + chr(51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + '\064' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b10100 + 0o133) + chr(51) + chr(0b110110) + chr(49), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10100 + 0o37) + chr(0b110101), 63148 - 63140), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(977 - 925) + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(0b110100) + chr(0b110011), 8), nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + chr(0b110001) + chr(49) + chr(0b110011), 8), nzTpIcepk0o8(chr(886 - 838) + '\157' + chr(1651 - 1598) + chr(0b10101 + 0o36), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b111000 + 0o67) + chr(0b1000 + 0o55) + chr(0b110000), 44857 - 44849)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x99'), chr(9970 - 9870) + '\x65' + '\x63' + '\x6f' + chr(0b1100100) + '\145')('\x75' + '\164' + '\146' + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def atJBEiOq_lLt(hXMPsSrOQzbh, eVRCGQa70gNM=nzTpIcepk0o8(chr(0b11100 + 0o24) + '\157' + chr(49), 8), OtBA5JjCoiah=0.0): UjxwtHwihe1B = [] for zIqcgNgQ9U6F in bbT2xIe5pzk7(eVRCGQa70gNM): (zIqcgNgQ9U6F, UH0YjwuI_XzX, zIqcgNgQ9U6F) = hXMPsSrOQzbh.G4Lisexwxqjs() roI3spqORKae(UjxwtHwihe1B, roI3spqORKae(ES5oEprVxulp(b'\xffq\x181\xbd/#Ns\xc2\xbc\xe8'), chr(0b1011100 + 0o10) + '\x65' + chr(5135 - 5036) + chr(0b111100 + 0o63) + '\144' + chr(3802 - 3701))(chr(666 - 549) + chr(116) + '\146' + chr(961 - 916) + chr(56)))(UH0YjwuI_XzX) FVLJ9hJlf8wB = RvV7ueTH51Uy.median_images(UjxwtHwihe1B) FVLJ9hJlf8wB.FfKOThdpoDTb[FVLJ9hJlf8wB.FfKOThdpoDTb == 0.0] = OtBA5JjCoiah return FVLJ9hJlf8wB
BerkeleyAutomation/perception
perception/colorized_phoxi_sensor.py
ColorizedPhoXiSensor._colorize
def _colorize(self, depth_im, color_im): """Colorize a depth image from the PhoXi using a color image from the webcam. Parameters ---------- depth_im : DepthImage The PhoXi depth image. color_im : ColorImage Corresponding color image. Returns ------- ColorImage A colorized image corresponding to the PhoXi depth image. """ # Project the point cloud into the webcam's frame target_shape = (depth_im.data.shape[0], depth_im.data.shape[1], 3) pc_depth = self._phoxi.ir_intrinsics.deproject(depth_im) pc_color = self._T_webcam_world.inverse().dot(self._T_phoxi_world).apply(pc_depth) # Sort the points by their distance from the webcam's apeture pc_data = pc_color.data.T dists = np.linalg.norm(pc_data, axis=1) order = np.argsort(dists) pc_data = pc_data[order] pc_color = PointCloud(pc_data.T, frame=self._webcam.color_intrinsics.frame) sorted_dists = dists[order] sorted_depths = depth_im.data.flatten()[order] # Generate image coordinates for each sorted point icds = self._webcam.color_intrinsics.project(pc_color).data.T # Create mask for points that are masked by others rounded_icds = np.array(icds / 3.0, dtype=np.uint32) unique_icds, unique_inds, unique_inv = np.unique(rounded_icds, axis=0, return_index=True, return_inverse=True) icd_depths = sorted_dists[unique_inds] min_depths_pp = icd_depths[unique_inv] depth_delta_mask = np.abs(min_depths_pp - sorted_dists) < 5e-3 # Create mask for points with missing depth or that lie outside the image valid_mask = np.logical_and(np.logical_and(icds[:,0] >= 0, icds[:,0] < self._webcam.color_intrinsics.width), np.logical_and(icds[:,1] >= 0, icds[:,1] < self._webcam.color_intrinsics.height)) valid_mask = np.logical_and(valid_mask, sorted_depths != 0.0) valid_mask = np.logical_and(valid_mask, depth_delta_mask) valid_icds = icds[valid_mask] colors = color_im.data[valid_icds[:,1],valid_icds[:,0],:] color_im_data = np.zeros((target_shape[0] * target_shape[1], target_shape[2]), dtype=np.uint8) color_im_data[valid_mask] = colors color_im_data[order] = color_im_data.copy() color_im_data = color_im_data.reshape(target_shape) return ColorImage(color_im_data, frame=self._frame)
python
def _colorize(self, depth_im, color_im): """Colorize a depth image from the PhoXi using a color image from the webcam. Parameters ---------- depth_im : DepthImage The PhoXi depth image. color_im : ColorImage Corresponding color image. Returns ------- ColorImage A colorized image corresponding to the PhoXi depth image. """ # Project the point cloud into the webcam's frame target_shape = (depth_im.data.shape[0], depth_im.data.shape[1], 3) pc_depth = self._phoxi.ir_intrinsics.deproject(depth_im) pc_color = self._T_webcam_world.inverse().dot(self._T_phoxi_world).apply(pc_depth) # Sort the points by their distance from the webcam's apeture pc_data = pc_color.data.T dists = np.linalg.norm(pc_data, axis=1) order = np.argsort(dists) pc_data = pc_data[order] pc_color = PointCloud(pc_data.T, frame=self._webcam.color_intrinsics.frame) sorted_dists = dists[order] sorted_depths = depth_im.data.flatten()[order] # Generate image coordinates for each sorted point icds = self._webcam.color_intrinsics.project(pc_color).data.T # Create mask for points that are masked by others rounded_icds = np.array(icds / 3.0, dtype=np.uint32) unique_icds, unique_inds, unique_inv = np.unique(rounded_icds, axis=0, return_index=True, return_inverse=True) icd_depths = sorted_dists[unique_inds] min_depths_pp = icd_depths[unique_inv] depth_delta_mask = np.abs(min_depths_pp - sorted_dists) < 5e-3 # Create mask for points with missing depth or that lie outside the image valid_mask = np.logical_and(np.logical_and(icds[:,0] >= 0, icds[:,0] < self._webcam.color_intrinsics.width), np.logical_and(icds[:,1] >= 0, icds[:,1] < self._webcam.color_intrinsics.height)) valid_mask = np.logical_and(valid_mask, sorted_depths != 0.0) valid_mask = np.logical_and(valid_mask, depth_delta_mask) valid_icds = icds[valid_mask] colors = color_im.data[valid_icds[:,1],valid_icds[:,0],:] color_im_data = np.zeros((target_shape[0] * target_shape[1], target_shape[2]), dtype=np.uint8) color_im_data[valid_mask] = colors color_im_data[order] = color_im_data.copy() color_im_data = color_im_data.reshape(target_shape) return ColorImage(color_im_data, frame=self._frame)
[ "def", "_colorize", "(", "self", ",", "depth_im", ",", "color_im", ")", ":", "# Project the point cloud into the webcam's frame", "target_shape", "=", "(", "depth_im", ".", "data", ".", "shape", "[", "0", "]", ",", "depth_im", ".", "data", ".", "shape", "[", "1", "]", ",", "3", ")", "pc_depth", "=", "self", ".", "_phoxi", ".", "ir_intrinsics", ".", "deproject", "(", "depth_im", ")", "pc_color", "=", "self", ".", "_T_webcam_world", ".", "inverse", "(", ")", ".", "dot", "(", "self", ".", "_T_phoxi_world", ")", ".", "apply", "(", "pc_depth", ")", "# Sort the points by their distance from the webcam's apeture", "pc_data", "=", "pc_color", ".", "data", ".", "T", "dists", "=", "np", ".", "linalg", ".", "norm", "(", "pc_data", ",", "axis", "=", "1", ")", "order", "=", "np", ".", "argsort", "(", "dists", ")", "pc_data", "=", "pc_data", "[", "order", "]", "pc_color", "=", "PointCloud", "(", "pc_data", ".", "T", ",", "frame", "=", "self", ".", "_webcam", ".", "color_intrinsics", ".", "frame", ")", "sorted_dists", "=", "dists", "[", "order", "]", "sorted_depths", "=", "depth_im", ".", "data", ".", "flatten", "(", ")", "[", "order", "]", "# Generate image coordinates for each sorted point", "icds", "=", "self", ".", "_webcam", ".", "color_intrinsics", ".", "project", "(", "pc_color", ")", ".", "data", ".", "T", "# Create mask for points that are masked by others", "rounded_icds", "=", "np", ".", "array", "(", "icds", "/", "3.0", ",", "dtype", "=", "np", ".", "uint32", ")", "unique_icds", ",", "unique_inds", ",", "unique_inv", "=", "np", ".", "unique", "(", "rounded_icds", ",", "axis", "=", "0", ",", "return_index", "=", "True", ",", "return_inverse", "=", "True", ")", "icd_depths", "=", "sorted_dists", "[", "unique_inds", "]", "min_depths_pp", "=", "icd_depths", "[", "unique_inv", "]", "depth_delta_mask", "=", "np", ".", "abs", "(", "min_depths_pp", "-", "sorted_dists", ")", "<", "5e-3", "# Create mask for points with missing depth or that lie outside the image", "valid_mask", "=", "np", ".", "logical_and", "(", "np", ".", "logical_and", "(", "icds", "[", ":", ",", "0", "]", ">=", "0", ",", "icds", "[", ":", ",", "0", "]", "<", "self", ".", "_webcam", ".", "color_intrinsics", ".", "width", ")", ",", "np", ".", "logical_and", "(", "icds", "[", ":", ",", "1", "]", ">=", "0", ",", "icds", "[", ":", ",", "1", "]", "<", "self", ".", "_webcam", ".", "color_intrinsics", ".", "height", ")", ")", "valid_mask", "=", "np", ".", "logical_and", "(", "valid_mask", ",", "sorted_depths", "!=", "0.0", ")", "valid_mask", "=", "np", ".", "logical_and", "(", "valid_mask", ",", "depth_delta_mask", ")", "valid_icds", "=", "icds", "[", "valid_mask", "]", "colors", "=", "color_im", ".", "data", "[", "valid_icds", "[", ":", ",", "1", "]", ",", "valid_icds", "[", ":", ",", "0", "]", ",", ":", "]", "color_im_data", "=", "np", ".", "zeros", "(", "(", "target_shape", "[", "0", "]", "*", "target_shape", "[", "1", "]", ",", "target_shape", "[", "2", "]", ")", ",", "dtype", "=", "np", ".", "uint8", ")", "color_im_data", "[", "valid_mask", "]", "=", "colors", "color_im_data", "[", "order", "]", "=", "color_im_data", ".", "copy", "(", ")", "color_im_data", "=", "color_im_data", ".", "reshape", "(", "target_shape", ")", "return", "ColorImage", "(", "color_im_data", ",", "frame", "=", "self", ".", "_frame", ")" ]
Colorize a depth image from the PhoXi using a color image from the webcam. Parameters ---------- depth_im : DepthImage The PhoXi depth image. color_im : ColorImage Corresponding color image. Returns ------- ColorImage A colorized image corresponding to the PhoXi depth image.
[ "Colorize", "a", "depth", "image", "from", "the", "PhoXi", "using", "a", "color", "image", "from", "the", "webcam", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/colorized_phoxi_sensor.py#L145-L196
train
Colorize a depth image from the PhoXi using a color image from the webcam.
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,EsFcqWR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os7dinCa7,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' + '\x6f' + chr(0b11110 + 0o24) + chr(1688 - 1640) + chr(0b110011), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110100) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(1500 - 1452) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(1949 - 1901) + chr(0b11000 + 0o127) + chr(840 - 792), 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b10010 + 0o135) + chr(50) + chr(0b110001) + chr(49), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\064' + '\x34', 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(0b11010 + 0o30) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(8285 - 8174) + chr(50) + chr(0b101000 + 0o17) + chr(0b11011 + 0o25), 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1001 + 0o146) + chr(49) + chr(1775 - 1722) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + '\x31' + chr(0b110 + 0o61), 0o10), nzTpIcepk0o8(chr(1486 - 1438) + '\157' + '\x31' + '\x34' + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + chr(0b10001 + 0o44) + chr(675 - 622), 0o10), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + '\063' + chr(53) + '\064', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + '\x34' + '\063', 23663 - 23655), nzTpIcepk0o8(chr(48) + '\157' + '\062' + chr(0b110101) + chr(1816 - 1764), 65422 - 65414), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(2578 - 2527) + chr(458 - 403) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(105 - 57) + chr(7605 - 7494) + chr(49) + chr(0b100101 + 0o16) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + chr(0b1100 + 0o45) + '\066' + '\065', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(0b110010) + chr(0b110000 + 0o7), ord("\x08")), nzTpIcepk0o8('\060' + chr(478 - 367) + chr(0b110001) + chr(878 - 828) + chr(50), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + '\x32' + chr(55), 8), nzTpIcepk0o8('\060' + chr(0b1101101 + 0o2) + '\062' + '\066' + chr(51), 50963 - 50955), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\157' + chr(0b0 + 0o61) + chr(0b101101 + 0o7), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(0b110110) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(6525 - 6414) + chr(0b101110 + 0o3) + chr(0b110000) + chr(48), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(0b110011) + chr(50), 32285 - 32277), nzTpIcepk0o8('\x30' + chr(111) + chr(2189 - 2140) + chr(0b0 + 0o61), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(51) + chr(55), 64005 - 63997), nzTpIcepk0o8(chr(2021 - 1973) + chr(0b1101111) + '\x31' + chr(0b111 + 0o60) + chr(0b10 + 0o63), 0o10), nzTpIcepk0o8('\060' + chr(0b1000011 + 0o54) + chr(1100 - 1051) + chr(49) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(340 - 292) + chr(111) + chr(644 - 594) + chr(49) + chr(0b110001), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x36' + '\060', 0b1000), nzTpIcepk0o8(chr(2115 - 2067) + chr(111) + '\x32' + '\064' + chr(1242 - 1194), ord("\x08")), nzTpIcepk0o8(chr(69 - 21) + chr(6919 - 6808) + '\x33' + '\x37' + chr(0b110001), 21213 - 21205), nzTpIcepk0o8(chr(48) + chr(11915 - 11804) + '\066' + chr(0b110111), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(2077 - 2028) + chr(0b110110) + '\x33', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x35' + chr(0b101001 + 0o12), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(1540 - 1489) + '\063' + chr(383 - 334), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110101), 1542 - 1534), nzTpIcepk0o8(chr(196 - 148) + chr(0b1101111) + chr(285 - 235) + chr(1085 - 1037) + '\x33', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1101111) + '\065' + '\x30', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xad'), chr(0b101011 + 0o71) + '\145' + chr(99) + chr(111) + chr(0b1100100) + chr(101))('\165' + chr(116) + chr(0b1100110) + chr(257 - 212) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ZYoF1iOTHBBT(hXMPsSrOQzbh, WZcCXRnThfxU, GFVgEmwvG0jZ): jboum8DqUOKb = (WZcCXRnThfxU.data.lhbM092AFW8f[nzTpIcepk0o8(chr(0b110000) + chr(0b100001 + 0o116) + chr(48), 8)], WZcCXRnThfxU.data.lhbM092AFW8f[nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101101 + 0o2) + chr(49), 0o10)], nzTpIcepk0o8(chr(48) + '\x6f' + '\x33', 0b1000)) bJSpSk3bYl63 = hXMPsSrOQzbh._phoxi.ir_intrinsics.deproject(WZcCXRnThfxU) Jk2S6yKbRdzD = hXMPsSrOQzbh._T_webcam_world.inverse().dot(hXMPsSrOQzbh._T_phoxi_world).apply(bJSpSk3bYl63) jBTekjgVVoik = Jk2S6yKbRdzD.data.hq6XE4_Nhd6R g30pVubIDFeG = nDF4gVNx0u9Q.linalg.xBFFJFaziFDU(jBTekjgVVoik, axis=nzTpIcepk0o8(chr(0b110000) + chr(10890 - 10779) + '\061', 8)) gwJk_IgdwKDy = nDF4gVNx0u9Q.argsort(g30pVubIDFeG) jBTekjgVVoik = jBTekjgVVoik[gwJk_IgdwKDy] Jk2S6yKbRdzD = CxSsxwk8McAE(jBTekjgVVoik.hq6XE4_Nhd6R, frame=hXMPsSrOQzbh._webcam.color_intrinsics.KZ4ew2qs1HTO) PPbg8jszwiHh = g30pVubIDFeG[gwJk_IgdwKDy] ZQrzq5DxTWzm = WZcCXRnThfxU.data.wozqDwllRa_T()[gwJk_IgdwKDy] SI3eRuMi9F5h = hXMPsSrOQzbh._webcam.color_intrinsics.project(Jk2S6yKbRdzD).data.hq6XE4_Nhd6R N90OX3XMyfwa = nDF4gVNx0u9Q.Tn6rGr7XTM7t(SI3eRuMi9F5h / 3.0, dtype=nDF4gVNx0u9Q.mmxcdOaynu5N) (UUK32GnPYaEw, Zvm1tLoQRgPD, TlOuKW76WtbV) = nDF4gVNx0u9Q.G3de2eWQaS0D(N90OX3XMyfwa, axis=nzTpIcepk0o8('\060' + '\x6f' + chr(417 - 369), 8), return_index=nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100 + 0o55), 8), return_inverse=nzTpIcepk0o8(chr(0b110000) + chr(10022 - 9911) + '\061', 8)) Y2WQvglkGQv5 = PPbg8jszwiHh[Zvm1tLoQRgPD] zQ_ViC5nWXZ2 = Y2WQvglkGQv5[TlOuKW76WtbV] iBCtFOmGklUX = nDF4gVNx0u9Q.zQBGwUT7UU8L(zQ_ViC5nWXZ2 - PPbg8jszwiHh) < 0.005 TdP_cCH9jI9Y = nDF4gVNx0u9Q.FInAiCRNfQlt(nDF4gVNx0u9Q.FInAiCRNfQlt(SI3eRuMi9F5h[:, nzTpIcepk0o8(chr(0b101 + 0o53) + chr(6896 - 6785) + chr(0b10110 + 0o32), 8)] >= nzTpIcepk0o8(chr(562 - 514) + '\157' + chr(1985 - 1937), 8), SI3eRuMi9F5h[:, nzTpIcepk0o8('\060' + '\157' + '\x30', 8)] < hXMPsSrOQzbh._webcam.color_intrinsics.dH3vcKdvgBu0), nDF4gVNx0u9Q.FInAiCRNfQlt(SI3eRuMi9F5h[:, nzTpIcepk0o8('\x30' + '\157' + chr(2392 - 2343), 8)] >= nzTpIcepk0o8(chr(1094 - 1046) + '\157' + chr(425 - 377), 8), SI3eRuMi9F5h[:, nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49), 8)] < hXMPsSrOQzbh._webcam.color_intrinsics.PaEBmun9J0YJ)) TdP_cCH9jI9Y = nDF4gVNx0u9Q.FInAiCRNfQlt(TdP_cCH9jI9Y, ZQrzq5DxTWzm != 0.0) TdP_cCH9jI9Y = nDF4gVNx0u9Q.FInAiCRNfQlt(TdP_cCH9jI9Y, iBCtFOmGklUX) ziVoJw16w4pv = SI3eRuMi9F5h[TdP_cCH9jI9Y] ykFgDM_9hKHU = GFVgEmwvG0jZ.FfKOThdpoDTb[ziVoJw16w4pv[:, nzTpIcepk0o8('\x30' + chr(0b101011 + 0o104) + chr(1126 - 1077), 8)], ziVoJw16w4pv[:, nzTpIcepk0o8('\x30' + '\x6f' + chr(267 - 219), 8)], :] Rdy0G8NVwNUF = nDF4gVNx0u9Q.UmwwEp7MzR6q((jboum8DqUOKb[nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(48), 8)] * jboum8DqUOKb[nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110001), 8)], jboum8DqUOKb[nzTpIcepk0o8(chr(241 - 193) + '\157' + chr(0b110010), ord("\x08"))]), dtype=nDF4gVNx0u9Q.uint8) Rdy0G8NVwNUF[TdP_cCH9jI9Y] = ykFgDM_9hKHU Rdy0G8NVwNUF[gwJk_IgdwKDy] = Rdy0G8NVwNUF.copy() Rdy0G8NVwNUF = Rdy0G8NVwNUF.reshape(jboum8DqUOKb) return lPn7XfHAFaXG(Rdy0G8NVwNUF, frame=roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe9\x10\xc32\xe7V#\xce\x18\x9fP\x99'), chr(100) + '\145' + '\143' + chr(9058 - 8947) + chr(0b1100001 + 0o3) + chr(0b1100000 + 0o5))(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + chr(0b101101) + chr(0b111000))))
BerkeleyAutomation/perception
perception/rgbd_sensors.py
RgbdSensorFactory.sensor
def sensor(sensor_type, cfg): """ Creates a camera sensor of the specified type. Parameters ---------- sensor_type : :obj:`str` the type of the sensor (real or virtual) cfg : :obj:`YamlConfig` dictionary of parameters for sensor initialization """ sensor_type = sensor_type.lower() if sensor_type == 'kinect2': s = Kinect2Sensor(packet_pipeline_mode=cfg['pipeline_mode'], device_num=cfg['device_num'], frame=cfg['frame']) elif sensor_type == 'bridged_kinect2': s = KinectSensorBridged(quality=cfg['quality'], frame=cfg['frame']) elif sensor_type == 'primesense': flip_images = True if 'flip_images' in cfg.keys(): flip_images = cfg['flip_images'] s = PrimesenseSensor(auto_white_balance=cfg['auto_white_balance'], flip_images=flip_images, frame=cfg['frame']) elif sensor_type == 'virtual': s = VirtualSensor(cfg['image_dir'], frame=cfg['frame']) elif sensor_type == 'tensor_dataset': s = TensorDatasetVirtualSensor(cfg['dataset_dir'], frame=cfg['frame']) elif sensor_type == 'primesense_ros': s = PrimesenseSensor_ROS(frame=cfg['frame']) elif sensor_type == 'ensenso': s = EnsensoSensor(frame=cfg['frame']) elif sensor_type == 'phoxi': s = PhoXiSensor(frame=cfg['frame'], device_name=cfg['device_name'], size=cfg['size']) elif sensor_type == 'webcam': s = WebcamSensor(frame=cfg['frame'], device_id=cfg['device_id']) elif sensor_type == 'colorized_phoxi': s = ColorizedPhoXiSensor(frame=cfg['frame'], phoxi_config=cfg['phoxi_config'], webcam_config=cfg['webcam_config'], calib_dir=cfg['calib_dir']) elif sensor_type == 'realsense': s = RealSenseSensor( cam_id=cfg['cam_id'], filter_depth=cfg['filter_depth'], frame=cfg['frame'], ) else: raise ValueError('RGBD sensor type %s not supported' %(sensor_type)) return s
python
def sensor(sensor_type, cfg): """ Creates a camera sensor of the specified type. Parameters ---------- sensor_type : :obj:`str` the type of the sensor (real or virtual) cfg : :obj:`YamlConfig` dictionary of parameters for sensor initialization """ sensor_type = sensor_type.lower() if sensor_type == 'kinect2': s = Kinect2Sensor(packet_pipeline_mode=cfg['pipeline_mode'], device_num=cfg['device_num'], frame=cfg['frame']) elif sensor_type == 'bridged_kinect2': s = KinectSensorBridged(quality=cfg['quality'], frame=cfg['frame']) elif sensor_type == 'primesense': flip_images = True if 'flip_images' in cfg.keys(): flip_images = cfg['flip_images'] s = PrimesenseSensor(auto_white_balance=cfg['auto_white_balance'], flip_images=flip_images, frame=cfg['frame']) elif sensor_type == 'virtual': s = VirtualSensor(cfg['image_dir'], frame=cfg['frame']) elif sensor_type == 'tensor_dataset': s = TensorDatasetVirtualSensor(cfg['dataset_dir'], frame=cfg['frame']) elif sensor_type == 'primesense_ros': s = PrimesenseSensor_ROS(frame=cfg['frame']) elif sensor_type == 'ensenso': s = EnsensoSensor(frame=cfg['frame']) elif sensor_type == 'phoxi': s = PhoXiSensor(frame=cfg['frame'], device_name=cfg['device_name'], size=cfg['size']) elif sensor_type == 'webcam': s = WebcamSensor(frame=cfg['frame'], device_id=cfg['device_id']) elif sensor_type == 'colorized_phoxi': s = ColorizedPhoXiSensor(frame=cfg['frame'], phoxi_config=cfg['phoxi_config'], webcam_config=cfg['webcam_config'], calib_dir=cfg['calib_dir']) elif sensor_type == 'realsense': s = RealSenseSensor( cam_id=cfg['cam_id'], filter_depth=cfg['filter_depth'], frame=cfg['frame'], ) else: raise ValueError('RGBD sensor type %s not supported' %(sensor_type)) return s
[ "def", "sensor", "(", "sensor_type", ",", "cfg", ")", ":", "sensor_type", "=", "sensor_type", ".", "lower", "(", ")", "if", "sensor_type", "==", "'kinect2'", ":", "s", "=", "Kinect2Sensor", "(", "packet_pipeline_mode", "=", "cfg", "[", "'pipeline_mode'", "]", ",", "device_num", "=", "cfg", "[", "'device_num'", "]", ",", "frame", "=", "cfg", "[", "'frame'", "]", ")", "elif", "sensor_type", "==", "'bridged_kinect2'", ":", "s", "=", "KinectSensorBridged", "(", "quality", "=", "cfg", "[", "'quality'", "]", ",", "frame", "=", "cfg", "[", "'frame'", "]", ")", "elif", "sensor_type", "==", "'primesense'", ":", "flip_images", "=", "True", "if", "'flip_images'", "in", "cfg", ".", "keys", "(", ")", ":", "flip_images", "=", "cfg", "[", "'flip_images'", "]", "s", "=", "PrimesenseSensor", "(", "auto_white_balance", "=", "cfg", "[", "'auto_white_balance'", "]", ",", "flip_images", "=", "flip_images", ",", "frame", "=", "cfg", "[", "'frame'", "]", ")", "elif", "sensor_type", "==", "'virtual'", ":", "s", "=", "VirtualSensor", "(", "cfg", "[", "'image_dir'", "]", ",", "frame", "=", "cfg", "[", "'frame'", "]", ")", "elif", "sensor_type", "==", "'tensor_dataset'", ":", "s", "=", "TensorDatasetVirtualSensor", "(", "cfg", "[", "'dataset_dir'", "]", ",", "frame", "=", "cfg", "[", "'frame'", "]", ")", "elif", "sensor_type", "==", "'primesense_ros'", ":", "s", "=", "PrimesenseSensor_ROS", "(", "frame", "=", "cfg", "[", "'frame'", "]", ")", "elif", "sensor_type", "==", "'ensenso'", ":", "s", "=", "EnsensoSensor", "(", "frame", "=", "cfg", "[", "'frame'", "]", ")", "elif", "sensor_type", "==", "'phoxi'", ":", "s", "=", "PhoXiSensor", "(", "frame", "=", "cfg", "[", "'frame'", "]", ",", "device_name", "=", "cfg", "[", "'device_name'", "]", ",", "size", "=", "cfg", "[", "'size'", "]", ")", "elif", "sensor_type", "==", "'webcam'", ":", "s", "=", "WebcamSensor", "(", "frame", "=", "cfg", "[", "'frame'", "]", ",", "device_id", "=", "cfg", "[", "'device_id'", "]", ")", "elif", "sensor_type", "==", "'colorized_phoxi'", ":", "s", "=", "ColorizedPhoXiSensor", "(", "frame", "=", "cfg", "[", "'frame'", "]", ",", "phoxi_config", "=", "cfg", "[", "'phoxi_config'", "]", ",", "webcam_config", "=", "cfg", "[", "'webcam_config'", "]", ",", "calib_dir", "=", "cfg", "[", "'calib_dir'", "]", ")", "elif", "sensor_type", "==", "'realsense'", ":", "s", "=", "RealSenseSensor", "(", "cam_id", "=", "cfg", "[", "'cam_id'", "]", ",", "filter_depth", "=", "cfg", "[", "'filter_depth'", "]", ",", "frame", "=", "cfg", "[", "'frame'", "]", ",", ")", "else", ":", "raise", "ValueError", "(", "'RGBD sensor type %s not supported'", "%", "(", "sensor_type", ")", ")", "return", "s" ]
Creates a camera sensor of the specified type. Parameters ---------- sensor_type : :obj:`str` the type of the sensor (real or virtual) cfg : :obj:`YamlConfig` dictionary of parameters for sensor initialization
[ "Creates", "a", "camera", "sensor", "of", "the", "specified", "type", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6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Di_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(390 - 342) + chr(0b1101111) + chr(294 - 244) + chr(53), 0o10), nzTpIcepk0o8(chr(195 - 147) + chr(0b111111 + 0o60) + chr(2203 - 2154) + chr(0b110111) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(1905 - 1857) + chr(0b1101111) + chr(53) + chr(0b110010 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(567 - 516) + chr(51) + chr(2210 - 2158), 13915 - 13907), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + '\x33' + '\x35', 35954 - 35946), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110111) + chr(237 - 187), 28286 - 28278), nzTpIcepk0o8(chr(48) + chr(6583 - 6472) + chr(50) + '\x35' + chr(52), 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(3286 - 3175) + chr(0b110010) + chr(0b110101) + chr(0b101010 + 0o15), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + '\065' + chr(0b110100), 29745 - 29737), nzTpIcepk0o8(chr(566 - 518) + chr(5963 - 5852) + chr(0b110010) + chr(55) + chr(695 - 642), 0o10), nzTpIcepk0o8(chr(1903 - 1855) + '\157' + chr(50) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(3834 - 3723) + chr(0b110001) + chr(0b10100 + 0o41) + '\x35', 0o10), nzTpIcepk0o8('\x30' + chr(0b1100101 + 0o12) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + chr(2128 - 2079), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(288 - 234) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(1686 - 1638) + chr(1612 - 1501) + chr(0b110001) + chr(55) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(9624 - 9513) + '\x35' + chr(0b110011), 24671 - 24663), nzTpIcepk0o8(chr(48) + chr(5928 - 5817) + '\x37' + '\066', 0o10), nzTpIcepk0o8('\060' + chr(4422 - 4311) + chr(2215 - 2166) + chr(1522 - 1469) + chr(2205 - 2152), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100111 + 0o14) + chr(1117 - 1066), 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + chr(50) + '\x33' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(792 - 744) + '\157' + chr(0b1001 + 0o51) + chr(53) + chr(0b11101 + 0o25), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\061' + '\067' + chr(233 - 184), 0o10), nzTpIcepk0o8(chr(365 - 317) + '\157' + chr(0b11001 + 0o34) + chr(0b11001 + 0o31), ord("\x08")), nzTpIcepk0o8(chr(1626 - 1578) + '\157' + chr(0b111 + 0o52) + '\x37' + chr(51), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\062' + chr(0b110011) + chr(0b1000 + 0o50), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(48) + chr(0b110100), 20413 - 20405), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + chr(48) + chr(2197 - 2148), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + '\x6f' + '\x32' + '\x35' + '\064', 8), nzTpIcepk0o8(chr(2237 - 2189) + '\157' + chr(0b110110) + '\x34', 51483 - 51475), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + '\x32' + chr(50) + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b1010 + 0o51) + '\063', ord("\x08")), nzTpIcepk0o8(chr(625 - 577) + chr(0b1101111) + chr(0b110011) + chr(0b100010 + 0o21) + chr(48), 0b1000), nzTpIcepk0o8(chr(733 - 685) + chr(0b1101111) + '\x31' + chr(52) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + chr(0b100 + 0o55) + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(4225 - 4114) + '\x33' + '\x35' + chr(0b101000 + 0o15), 0o10), nzTpIcepk0o8('\x30' + chr(2173 - 2062) + '\x32' + chr(88 - 36) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(111) + '\x31' + '\063' + '\x31', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + '\062', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b1100000 + 0o17) + chr(53) + chr(0b1011 + 0o45), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b';'), chr(3336 - 3236) + '\145' + '\x63' + chr(0b1101111) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(0b1101001 + 0o13) + chr(102) + '\x2d' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def yYDAzNg2GJoU(setp_qilmuZL, v3DD0K4I9igJ): setp_qilmuZL = setp_qilmuZL.Xn8ENWMZdIRt() if setp_qilmuZL == roI3spqORKae(ES5oEprVxulp(b'~\x16C\xb9~N\x9e'), '\144' + chr(0b1100101) + chr(99) + chr(1906 - 1795) + '\x64' + chr(904 - 803))(chr(117) + chr(0b111110 + 0o66) + '\146' + chr(458 - 413) + chr(0b111000)): PmE5_h409JAA = MktVPLLubpbU(packet_pipeline_mode=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b'e\x16]\xb9qS\xc2\xca\xb3\xd0~\tf'), chr(100) + '\145' + '\143' + chr(111) + chr(0b1100100) + chr(0b1001101 + 0o30))(chr(117) + '\x74' + '\146' + '\x2d' + chr(56))], device_num=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b'q\x1a[\xb5~_\xf3\xc1\x99\xd0'), chr(100) + '\145' + '\x63' + chr(0b1101111) + chr(7084 - 6984) + chr(0b1100101))('\x75' + chr(5814 - 5698) + chr(102) + chr(0b11100 + 0o21) + '\070')], frame=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b's\rL\xb1x'), chr(6846 - 6746) + chr(892 - 791) + chr(3521 - 3422) + chr(0b110011 + 0o74) + chr(100) + '\x65')(chr(8899 - 8782) + chr(0b1110100) + chr(9207 - 9105) + '\x2d' + chr(2073 - 2017))]) elif setp_qilmuZL == roI3spqORKae(ES5oEprVxulp(b'w\rD\xb8z_\xc8\xf0\x87\xd4\x7f\x08`u\x07'), chr(0b1100100) + chr(3145 - 3044) + chr(9323 - 9224) + '\157' + '\144' + '\145')(chr(4867 - 4750) + chr(116) + chr(0b1100110) + '\055' + chr(453 - 397)): PmE5_h409JAA = nOsgTEdv0keX(quality=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b'd\nL\xb0tN\xd5'), '\144' + '\145' + chr(0b1100011) + '\157' + chr(0b1100100) + '\145')('\x75' + chr(0b1 + 0o163) + chr(0b1110 + 0o130) + chr(514 - 469) + chr(56))], frame=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b's\rL\xb1x'), chr(0b1011100 + 0o10) + chr(0b1010001 + 0o24) + chr(0b110000 + 0o63) + chr(163 - 52) + chr(0b10111 + 0o115) + '\x65')('\165' + chr(116) + chr(0b1100011 + 0o3) + chr(45) + chr(0b111000))]) elif setp_qilmuZL == roI3spqORKae(ES5oEprVxulp(b'e\rD\xb1xI\xc9\xc1\x9f\xd8'), chr(1197 - 1097) + '\145' + '\x63' + '\157' + chr(0b101111 + 0o65) + chr(101))('\165' + chr(0b1001000 + 0o54) + chr(3730 - 3628) + chr(0b11000 + 0o25) + chr(2988 - 2932)): HHRZqTM9hTia = nzTpIcepk0o8('\060' + chr(111) + chr(0b110001), 8) if roI3spqORKae(ES5oEprVxulp(b's\x13D\xacBS\xc1\xce\x8b\xd8b'), chr(0b1100100) + '\x65' + chr(0b100000 + 0o103) + chr(111) + '\x64' + chr(0b1100101))(chr(117) + '\x74' + chr(6646 - 6544) + chr(0b101101) + '\x38') in roI3spqORKae(v3DD0K4I9igJ, roI3spqORKae(ES5oEprVxulp(b'~\x1aT\xaf'), chr(4538 - 4438) + '\145' + '\x63' + chr(3226 - 3115) + '\x64' + '\145')(chr(0b1110101) + '\164' + chr(0b11000 + 0o116) + '\055' + chr(2783 - 2727)))(): HHRZqTM9hTia = v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b's\x13D\xacBS\xc1\xce\x8b\xd8b'), '\x64' + chr(0b1001011 + 0o32) + chr(99) + '\x6f' + chr(100) + chr(0b100101 + 0o100))(chr(0b1110101) + chr(116) + '\146' + '\x2d' + '\x38')] PmE5_h409JAA = fVPOOz2lciut(auto_white_balance=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b't\nY\xb3BM\xc4\xc6\x98\xd8N\x0fbmT\x10H['), chr(0b1000011 + 0o41) + chr(0b11111 + 0o106) + '\143' + chr(0b1101111) + '\144' + chr(0b1100101))(chr(0b101000 + 0o115) + chr(0b111010 + 0o72) + chr(102) + chr(142 - 97) + '\x38')], flip_images=HHRZqTM9hTia, frame=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b's\rL\xb1x'), '\144' + chr(286 - 185) + chr(0b1010101 + 0o16) + chr(6306 - 6195) + chr(0b1100100) + '\145')(chr(0b1110011 + 0o2) + chr(0b1110100) + chr(102) + '\x2d' + '\x38')]) elif setp_qilmuZL == roI3spqORKae(ES5oEprVxulp(b'c\x16_\xa8h[\xc0'), chr(7659 - 7559) + '\145' + chr(0b1001011 + 0o30) + chr(111) + chr(0b1100 + 0o130) + '\145')(chr(0b1010101 + 0o40) + '\x74' + '\146' + '\x2d' + chr(0b111000)): PmE5_h409JAA = Vrnez4SHkCA0(v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b'|\x12L\xbbxe\xc8\xc6\x9e'), chr(9579 - 9479) + chr(101) + chr(0b1100011) + chr(111) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(1360 - 1258) + '\x2d' + chr(1428 - 1372))], frame=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b's\rL\xb1x'), chr(7029 - 6929) + chr(288 - 187) + '\143' + chr(0b1101111) + chr(0b1011111 + 0o5) + '\145')(chr(0b1110101) + '\164' + chr(102) + chr(45) + '\x38')]) elif setp_qilmuZL == roI3spqORKae(ES5oEprVxulp(b'a\x1aC\xafrH\xf3\xcb\x8d\xc9p\x1efu'), '\x64' + chr(7980 - 7879) + chr(9061 - 8962) + chr(0b1101111) + chr(5187 - 5087) + chr(7897 - 7796))(chr(117) + chr(3859 - 3743) + chr(0b1100110) + chr(45) + chr(0b111000)): PmE5_h409JAA = zg_Mia__pWCd(v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b'q\x1eY\xbdn_\xd8\xf0\x88\xd4c'), '\x64' + chr(0b1000111 + 0o36) + chr(6814 - 6715) + chr(0b1101111) + '\x64' + '\145')(chr(0b1110101) + chr(11318 - 11202) + '\x66' + chr(0b10100 + 0o31) + chr(56))], frame=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b's\rL\xb1x'), chr(0b111110 + 0o46) + chr(101) + '\143' + chr(10227 - 10116) + '\x64' + chr(2943 - 2842))(chr(117) + '\x74' + chr(0b1100110) + chr(0b101101) + chr(1226 - 1170))]) elif setp_qilmuZL == roI3spqORKae(ES5oEprVxulp(b'e\rD\xb1xI\xc9\xc1\x9f\xd8N\x1flr'), chr(0b1011111 + 0o5) + chr(0b1100101) + '\143' + '\x6f' + chr(0b10 + 0o142) + '\145')('\165' + '\x74' + chr(102) + chr(45) + '\070'): PmE5_h409JAA = M_kt1cJYJ94c(frame=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b's\rL\xb1x'), chr(0b1000000 + 0o44) + chr(101) + chr(0b1100011) + '\157' + '\144' + '\145')(chr(117) + '\164' + chr(0b1100110) + '\055' + chr(0b101010 + 0o16))]) elif setp_qilmuZL == roI3spqORKae(ES5oEprVxulp(b'p\x11^\xb9sI\xc3'), chr(100) + chr(3162 - 3061) + chr(99) + chr(0b1100010 + 0o15) + chr(0b1100100) + '\x65')('\x75' + '\164' + chr(102) + '\x2d' + chr(56)): PmE5_h409JAA = ELGlnyIaqh7b(frame=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b's\rL\xb1x'), '\144' + chr(0b1001100 + 0o31) + chr(99) + chr(6854 - 6743) + '\144' + '\145')(chr(4653 - 4536) + chr(0b1110100) + '\146' + '\x2d' + '\070')]) elif setp_qilmuZL == roI3spqORKae(ES5oEprVxulp(b'e\x17B\xa4t'), '\144' + '\145' + chr(8045 - 7946) + chr(5625 - 5514) + chr(0b1100100) + '\145')('\x75' + chr(0b110111 + 0o75) + '\x66' + chr(0b101101) + chr(1362 - 1306)): PmE5_h409JAA = LnVZRoArDSDn(frame=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b's\rL\xb1x'), chr(100) + chr(6650 - 6549) + '\x63' + chr(12261 - 12150) + chr(323 - 223) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(0b111000))], device_name=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b'q\x1a[\xb5~_\xf3\xc1\x8d\xd0t'), '\x64' + chr(0b110111 + 0o56) + '\143' + chr(10816 - 10705) + chr(100) + chr(0b1100101))('\165' + chr(0b1110100) + chr(102) + '\x2d' + chr(0b10010 + 0o46))], size=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b'f\x16W\xb9'), chr(100) + '\145' + '\x63' + chr(111) + chr(6310 - 6210) + chr(2448 - 2347))(chr(117) + '\164' + '\x66' + '\055' + chr(0b10110 + 0o42))]) elif setp_qilmuZL == roI3spqORKae(ES5oEprVxulp(b'b\x1aO\xbf|W'), chr(5292 - 5192) + chr(0b1100101) + '\x63' + '\157' + chr(0b1100100) + '\x65')(chr(0b10100 + 0o141) + chr(116) + chr(0b1100110) + '\055' + chr(0b111000)): PmE5_h409JAA = Cw_99j7RWxdT(frame=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b's\rL\xb1x'), chr(0b1100100) + chr(9892 - 9791) + chr(0b101001 + 0o72) + '\x6f' + chr(0b1011010 + 0o12) + chr(101))(chr(0b1000110 + 0o57) + '\164' + '\x66' + '\055' + '\070')], device_id=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b'q\x1a[\xb5~_\xf3\xc6\x88'), chr(0b1100100) + '\x65' + chr(99) + chr(0b1000000 + 0o57) + chr(6138 - 6038) + chr(101))('\165' + chr(0b1110100) + '\x66' + chr(667 - 622) + chr(0b10111 + 0o41))]) elif setp_qilmuZL == roI3spqORKae(ES5oEprVxulp(b'v\x10A\xb3oS\xd6\xca\x88\xe2a\x05ly\\'), '\x64' + '\145' + chr(2756 - 2657) + chr(0b1101111) + '\x64' + chr(0b1100101))('\x75' + chr(3319 - 3203) + '\146' + '\x2d' + '\070'): PmE5_h409JAA = _1Vq_lilRdWJ(frame=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b's\rL\xb1x'), '\x64' + chr(101) + chr(1323 - 1224) + '\157' + chr(0b101000 + 0o74) + chr(6469 - 6368))(chr(0b1110101) + chr(4168 - 4052) + chr(0b100110 + 0o100) + chr(0b101101) + chr(56))], phoxi_config=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b'e\x17B\xa4te\xcf\xc0\x82\xdbx\n'), chr(0b1100100) + '\145' + '\143' + chr(1829 - 1718) + chr(0b1011001 + 0o13) + chr(101))(chr(117) + chr(0b1110011 + 0o1) + '\146' + chr(45) + '\070')], webcam_config=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b'b\x1aO\xbf|W\xf3\xcc\x83\xd3w\x04d'), chr(0b1100100) + chr(0b111011 + 0o52) + chr(8566 - 8467) + chr(0b1101111) + '\x64' + chr(10200 - 10099))(chr(117) + chr(116) + chr(0b1100110) + chr(1694 - 1649) + chr(2876 - 2820))], calib_dir=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b'v\x1eA\xb5\x7fe\xc8\xc6\x9e'), '\x64' + chr(101) + '\143' + chr(5190 - 5079) + chr(1779 - 1679) + chr(0b100100 + 0o101))('\x75' + chr(3873 - 3757) + chr(0b1100110) + chr(1255 - 1210) + chr(56))]) elif setp_qilmuZL == roI3spqORKae(ES5oEprVxulp(b'g\x1aL\xb0n_\xc2\xdc\x89'), '\x64' + chr(0b10000 + 0o125) + chr(1052 - 953) + chr(0b1101111 + 0o0) + chr(0b1100100) + chr(101))('\x75' + '\164' + '\146' + chr(45) + chr(0b111000)): PmE5_h409JAA = nioKQzqMq3q3(cam_id=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b'v\x1e@\x83t^'), chr(0b1011010 + 0o12) + '\x65' + '\143' + '\157' + '\144' + '\x65')(chr(0b1100000 + 0o25) + '\x74' + chr(0b1000111 + 0o37) + chr(0b101101) + chr(0b1011 + 0o55))], filter_depth=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b's\x16A\xa8xH\xf3\xcb\x89\xcde\x05'), chr(0b100001 + 0o103) + '\x65' + '\143' + '\157' + chr(100) + chr(101))('\165' + chr(0b100111 + 0o115) + chr(0b10010 + 0o124) + chr(45) + '\x38')], frame=v3DD0K4I9igJ[roI3spqORKae(ES5oEprVxulp(b's\rL\xb1x'), '\x64' + chr(9750 - 9649) + chr(0b1100011) + '\157' + chr(9324 - 9224) + chr(0b1000101 + 0o40))(chr(0b1100001 + 0o24) + chr(116) + chr(0b110001 + 0o65) + chr(45) + '\x38')]) else: raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'G8o\x98=I\xc9\xc1\x9f\xd2cMwxE\x1b\x0b\x1b\x1e;\xf5\xc5\r\n\x08\xed\xf41h\xde@\xf0?'), '\144' + '\145' + chr(99) + chr(0b100000 + 0o117) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b10011 + 0o141) + chr(0b101000 + 0o76) + chr(0b101101) + '\070') % setp_qilmuZL) return PmE5_h409JAA
BerkeleyAutomation/perception
perception/feature_matcher.py
FeatureMatcher.get_point_index
def get_point_index(point, all_points, eps = 1e-4): """ Get the index of a point in an array """ inds = np.where(np.linalg.norm(point - all_points, axis=1) < eps) if inds[0].shape[0] == 0: return -1 return inds[0][0]
python
def get_point_index(point, all_points, eps = 1e-4): """ Get the index of a point in an array """ inds = np.where(np.linalg.norm(point - all_points, axis=1) < eps) if inds[0].shape[0] == 0: return -1 return inds[0][0]
[ "def", "get_point_index", "(", "point", ",", "all_points", ",", "eps", "=", "1e-4", ")", ":", "inds", "=", "np", ".", "where", "(", "np", ".", "linalg", ".", "norm", "(", "point", "-", "all_points", ",", "axis", "=", "1", ")", "<", "eps", ")", "if", "inds", "[", "0", "]", ".", "shape", "[", "0", "]", "==", "0", ":", "return", "-", "1", "return", "inds", "[", "0", "]", "[", "0", "]" ]
Get the index of a point in an array
[ "Get", "the", "index", "of", "a", "point", "in", "an", "array" ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/feature_matcher.py#L111-L116
train
Get the index of a point in an array
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,fPFTJxVn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LW6pRf2DSRk,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(4615 - 4504) + '\x33' + chr(0b110010) + chr(0b110110), 16777 - 16769), nzTpIcepk0o8('\x30' + '\157' + chr(0b100001 + 0o22) + chr(1388 - 1340) + chr(50), 0o10), nzTpIcepk0o8(chr(992 - 944) + chr(111) + chr(0b110010) + chr(0b101000 + 0o12) + '\064', 47583 - 47575), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + '\060' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5256 - 5145) + chr(0b110010) + '\x33' + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(0b110110) + '\065', 0o10), nzTpIcepk0o8(chr(0b1100 + 0o44) + '\157' + '\062' + chr(55) + chr(0b1011 + 0o52), 57159 - 57151), nzTpIcepk0o8(chr(89 - 41) + chr(5891 - 5780) + '\x32' + chr(427 - 377) + chr(1664 - 1609), 0b1000), nzTpIcepk0o8(chr(2176 - 2128) + chr(2192 - 2081) + chr(0b10001 + 0o40) + '\x31' + '\x35', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(2148 - 2098) + '\x30' + '\063', 7392 - 7384), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(0b110010) + '\060', 56863 - 56855), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + chr(50) + chr(0b101111 + 0o7), ord("\x08")), nzTpIcepk0o8(chr(196 - 148) + chr(111) + chr(49) + chr(2250 - 2202) + '\060', 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + '\x32' + '\060' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + '\x32' + chr(0b110111), 8), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x34', 19552 - 19544), nzTpIcepk0o8(chr(1437 - 1389) + chr(0b1101111) + chr(0b110 + 0o53) + '\x34' + chr(0b1 + 0o61), 0b1000), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + '\062' + chr(0b110010) + '\063', 3162 - 3154), nzTpIcepk0o8(chr(48) + chr(10074 - 9963) + chr(0b110000 + 0o2) + chr(0b1 + 0o61) + chr(52), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110111) + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + chr(9101 - 8990) + '\062' + chr(178 - 128) + chr(1005 - 953), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(877 - 823) + chr(0b100 + 0o57), 51177 - 51169), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + chr(2089 - 2038) + chr(0b110001 + 0o3) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b1101111) + '\x33' + chr(50) + chr(54), 8), nzTpIcepk0o8('\060' + chr(0b11 + 0o154) + chr(0b100001 + 0o25) + chr(0b101100 + 0o13), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(49) + chr(49), 0o10), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(0b110 + 0o55) + chr(178 - 130), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(0b11010 + 0o33), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(0b101 + 0o57) + chr(0b1 + 0o60), 8), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(0b110101) + '\x36', 0o10), nzTpIcepk0o8(chr(1743 - 1695) + '\x6f' + '\063' + chr(2568 - 2516) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + '\067' + chr(277 - 228), ord("\x08")), nzTpIcepk0o8(chr(106 - 58) + chr(0b1100001 + 0o16) + chr(50) + chr(0b110100), 0o10), nzTpIcepk0o8('\060' + chr(8857 - 8746) + chr(0b110011) + chr(0b110011) + '\x31', 63814 - 63806), nzTpIcepk0o8('\x30' + chr(7869 - 7758) + chr(0b100010 + 0o17) + '\063' + '\x34', 44912 - 44904), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\x34' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(0b101101 + 0o10) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(1081 - 1033) + chr(111) + '\x31' + chr(0b111 + 0o53) + '\x33', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + '\064', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b101110 + 0o4) + chr(0b110011) + chr(0b10001 + 0o46), 17650 - 17642)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(8552 - 8441) + chr(0b110101) + chr(48), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf8'), '\x64' + chr(0b1100101) + chr(99) + '\157' + '\144' + '\145')('\x75' + chr(13083 - 12967) + chr(102) + '\x2d' + chr(0b10 + 0o66)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def slveYvUV4dOp(l1u4whQWoPEl, mbzK84D1vDYG, IEvDzBqncWsk=0.0001): JXsHVQlcUm3B = nDF4gVNx0u9Q.xWH4M7K6Qbd3(nDF4gVNx0u9Q.linalg.xBFFJFaziFDU(l1u4whQWoPEl - mbzK84D1vDYG, axis=nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061', 45264 - 45256)) < IEvDzBqncWsk) if roI3spqORKae(JXsHVQlcUm3B[nzTpIcepk0o8(chr(48) + chr(0b1010001 + 0o36) + chr(48), 0o10)], roI3spqORKae(ES5oEprVxulp(b'\xba\xaa\xf6\xca\xab\x8c\x8f\xd6\x0b\xd4\xa8\xf0'), chr(100) + '\145' + chr(0b1100 + 0o127) + chr(0b1101111) + '\x64' + chr(9057 - 8956))(chr(5822 - 5705) + '\x74' + chr(0b1100110) + chr(1675 - 1630) + chr(2031 - 1975)))[nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(111) + '\x30', 8)] == nzTpIcepk0o8('\x30' + chr(0b11011 + 0o124) + chr(48), 8): return -nzTpIcepk0o8(chr(404 - 356) + chr(0b110101 + 0o72) + chr(0b110001), 8) return JXsHVQlcUm3B[nzTpIcepk0o8(chr(0b110000) + chr(0b101 + 0o152) + chr(0b10011 + 0o35), 8)][nzTpIcepk0o8('\060' + '\157' + '\x30', 8)]
BerkeleyAutomation/perception
perception/feature_matcher.py
RawDistanceFeatureMatcher.match
def match(self, source_obj_features, target_obj_features): """ Matches features between two graspable objects based on a full distance matrix. Parameters ---------- source_obj_features : :obj:`BagOfFeatures` bag of the source objects features target_obj_features : :obj:`BagOfFeatures` bag of the target objects features Returns ------- corrs : :obj:`Correspondences` the correspondences between source and target """ if not isinstance(source_obj_features, f.BagOfFeatures): raise ValueError('Must supply source bag of object features') if not isinstance(target_obj_features, f.BagOfFeatures): raise ValueError('Must supply target bag of object features') # source feature descriptors and keypoints source_descriptors = source_obj_features.descriptors target_descriptors = target_obj_features.descriptors source_keypoints = source_obj_features.keypoints target_keypoints = target_obj_features.keypoints #calculate distance between this model's descriptors and each of the other_model's descriptors dists = spatial.distance.cdist(source_descriptors, target_descriptors) #calculate the indices of the target_model that minimize the distance to the descriptors in this model source_closest_descriptors = dists.argmin(axis=1) target_closest_descriptors = dists.argmin(axis=0) match_indices = [] source_matched_points = np.zeros((0,3)) target_matched_points = np.zeros((0,3)) #calculate which points/indices the closest descriptors correspond to for i, j in enumerate(source_closest_descriptors): # for now, only keep correspondences that are a 2-way match if target_closest_descriptors[j] == i: match_indices.append(j) source_matched_points = np.r_[source_matched_points, source_keypoints[i:i+1, :]] target_matched_points = np.r_[target_matched_points, target_keypoints[j:j+1, :]] else: match_indices.append(-1) return Correspondences(match_indices, source_matched_points, target_matched_points)
python
def match(self, source_obj_features, target_obj_features): """ Matches features between two graspable objects based on a full distance matrix. Parameters ---------- source_obj_features : :obj:`BagOfFeatures` bag of the source objects features target_obj_features : :obj:`BagOfFeatures` bag of the target objects features Returns ------- corrs : :obj:`Correspondences` the correspondences between source and target """ if not isinstance(source_obj_features, f.BagOfFeatures): raise ValueError('Must supply source bag of object features') if not isinstance(target_obj_features, f.BagOfFeatures): raise ValueError('Must supply target bag of object features') # source feature descriptors and keypoints source_descriptors = source_obj_features.descriptors target_descriptors = target_obj_features.descriptors source_keypoints = source_obj_features.keypoints target_keypoints = target_obj_features.keypoints #calculate distance between this model's descriptors and each of the other_model's descriptors dists = spatial.distance.cdist(source_descriptors, target_descriptors) #calculate the indices of the target_model that minimize the distance to the descriptors in this model source_closest_descriptors = dists.argmin(axis=1) target_closest_descriptors = dists.argmin(axis=0) match_indices = [] source_matched_points = np.zeros((0,3)) target_matched_points = np.zeros((0,3)) #calculate which points/indices the closest descriptors correspond to for i, j in enumerate(source_closest_descriptors): # for now, only keep correspondences that are a 2-way match if target_closest_descriptors[j] == i: match_indices.append(j) source_matched_points = np.r_[source_matched_points, source_keypoints[i:i+1, :]] target_matched_points = np.r_[target_matched_points, target_keypoints[j:j+1, :]] else: match_indices.append(-1) return Correspondences(match_indices, source_matched_points, target_matched_points)
[ "def", "match", "(", "self", ",", "source_obj_features", ",", "target_obj_features", ")", ":", "if", "not", "isinstance", "(", "source_obj_features", ",", "f", ".", "BagOfFeatures", ")", ":", "raise", "ValueError", "(", "'Must supply source bag of object features'", ")", "if", "not", "isinstance", "(", "target_obj_features", ",", "f", ".", "BagOfFeatures", ")", ":", "raise", "ValueError", "(", "'Must supply target bag of object features'", ")", "# source feature descriptors and keypoints", "source_descriptors", "=", "source_obj_features", ".", "descriptors", "target_descriptors", "=", "target_obj_features", ".", "descriptors", "source_keypoints", "=", "source_obj_features", ".", "keypoints", "target_keypoints", "=", "target_obj_features", ".", "keypoints", "#calculate distance between this model's descriptors and each of the other_model's descriptors", "dists", "=", "spatial", ".", "distance", ".", "cdist", "(", "source_descriptors", ",", "target_descriptors", ")", "#calculate the indices of the target_model that minimize the distance to the descriptors in this model", "source_closest_descriptors", "=", "dists", ".", "argmin", "(", "axis", "=", "1", ")", "target_closest_descriptors", "=", "dists", ".", "argmin", "(", "axis", "=", "0", ")", "match_indices", "=", "[", "]", "source_matched_points", "=", "np", ".", "zeros", "(", "(", "0", ",", "3", ")", ")", "target_matched_points", "=", "np", ".", "zeros", "(", "(", "0", ",", "3", ")", ")", "#calculate which points/indices the closest descriptors correspond to", "for", "i", ",", "j", "in", "enumerate", "(", "source_closest_descriptors", ")", ":", "# for now, only keep correspondences that are a 2-way match", "if", "target_closest_descriptors", "[", "j", "]", "==", "i", ":", "match_indices", ".", "append", "(", "j", ")", "source_matched_points", "=", "np", ".", "r_", "[", "source_matched_points", ",", "source_keypoints", "[", "i", ":", "i", "+", "1", ",", ":", "]", "]", "target_matched_points", "=", "np", ".", "r_", "[", "target_matched_points", ",", "target_keypoints", "[", "j", ":", "j", "+", "1", ",", ":", "]", "]", "else", ":", "match_indices", ".", "append", "(", "-", "1", ")", "return", "Correspondences", "(", "match_indices", ",", "source_matched_points", ",", "target_matched_points", ")" ]
Matches features between two graspable objects based on a full distance matrix. Parameters ---------- source_obj_features : :obj:`BagOfFeatures` bag of the source objects features target_obj_features : :obj:`BagOfFeatures` bag of the target objects features Returns ------- corrs : :obj:`Correspondences` the correspondences between source and target
[ "Matches", "features", "between", "two", "graspable", "objects", "based", "on", "a", "full", "distance", "matrix", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/feature_matcher.py#L126-L173
train
Matches features between two graspable objects based on a full distance matrix.
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(1854 - 1806) + chr(0b1000001 + 0o56) + '\x31' + chr(0b10100 + 0o42) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101000 + 0o7) + chr(0b110011) + chr(0b110100) + chr(1801 - 1749), ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + chr(0b110001) + '\060' + chr(451 - 397), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100110 + 0o11) + '\x32' + chr(2131 - 2082) + chr(1309 - 1257), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(2079 - 2026) + chr(0b100000 + 0o20), 0b1000), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(4619 - 4508) + chr(50) + chr(0b0 + 0o60) + chr(1167 - 1118), 0o10), nzTpIcepk0o8(chr(1868 - 1820) + '\157' + chr(2353 - 2304) + chr(1571 - 1523) + chr(0b1000 + 0o56), 8), nzTpIcepk0o8('\x30' + '\157' + '\061' + '\x30' + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b1101111) + '\x32' + '\062' + '\062', 0o10), nzTpIcepk0o8('\060' + chr(11221 - 11110) + '\063' + '\062' + chr(520 - 470), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(222 - 172) + chr(55) + '\x34', 0o10), nzTpIcepk0o8(chr(0b11001 + 0o27) + '\x6f' + chr(2561 - 2510) + chr(0b1000 + 0o52) + chr(0b1100 + 0o53), 0o10), nzTpIcepk0o8(chr(343 - 295) + '\x6f' + chr(1114 - 1065) + chr(50) + chr(0b10011 + 0o36), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(53) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(7945 - 7834) + chr(1275 - 1224) + chr(53) + chr(650 - 602), 8), nzTpIcepk0o8(chr(0b100 + 0o54) + '\x6f' + '\x33' + '\x32' + '\060', 19186 - 19178), nzTpIcepk0o8(chr(48) + chr(0b110101 + 0o72) + '\x32' + '\x36' + chr(1035 - 984), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000 + 0o147) + chr(0b110100) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000000 + 0o57) + chr(50) + chr(247 - 198), ord("\x08")), nzTpIcepk0o8('\060' + chr(1931 - 1820) + '\x34' + '\x33', 0b1000), nzTpIcepk0o8(chr(1364 - 1316) + chr(0b1101111) + chr(2182 - 2131) + chr(838 - 784) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(5222 - 5111) + chr(0b11010 + 0o35) + chr(54), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + '\063' + chr(0b101001 + 0o12), 31952 - 31944), nzTpIcepk0o8('\060' + '\157' + chr(0b10100 + 0o36) + chr(0b1101 + 0o51) + '\x30', 44923 - 44915), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + '\064' + chr(0b101101 + 0o11), 58582 - 58574), nzTpIcepk0o8(chr(1884 - 1836) + '\x6f' + chr(1719 - 1669) + chr(1421 - 1367) + '\062', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(0b110000) + chr(51), 0o10), nzTpIcepk0o8(chr(957 - 909) + chr(0b1100001 + 0o16) + '\x37' + chr(0b101110 + 0o5), 0o10), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b11101 + 0o122) + chr(0b110001) + chr(0b11111 + 0o26) + chr(1589 - 1539), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x33' + chr(0b1100 + 0o50), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(0b101001 + 0o16) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(1456 - 1402) + chr(0b110100), 42484 - 42476), nzTpIcepk0o8('\x30' + '\x6f' + '\x33' + chr(746 - 694) + chr(2064 - 2012), 8), nzTpIcepk0o8('\x30' + '\x6f' + '\064' + chr(0b100001 + 0o25), 8), nzTpIcepk0o8('\x30' + chr(6635 - 6524) + '\062' + chr(1297 - 1249) + '\063', 25258 - 25250), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(53), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(813 - 763) + chr(0b110010) + chr(0b101110 + 0o6), 0o10), nzTpIcepk0o8(chr(2186 - 2138) + '\x6f' + '\x31' + chr(0b11011 + 0o25) + '\064', 8), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(0b100110 + 0o15) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + chr(12291 - 12180) + chr(0b110011) + '\067', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\157' + '\065' + chr(0b11000 + 0o30), 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(0b1100011) + '\x6f' + chr(6444 - 6344) + chr(101))('\165' + chr(0b101000 + 0o114) + chr(102) + chr(0b10111 + 0o26) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def hk9OijmiC_zA(hXMPsSrOQzbh, fQqowUO__gI_, sOIi_clNg5gy): if not suIjIS24Zkqw(fQqowUO__gI_, roI3spqORKae(_R8IKF5IwAfX, roI3spqORKae(ES5oEprVxulp(b'3\x85!\xc3\x8e\xc7#%\xe6\xa7\xce\xb2"'), chr(0b1100100) + chr(0b11000 + 0o115) + '\x63' + chr(4449 - 4338) + chr(0b1001 + 0o133) + chr(0b1100101))(chr(117) + chr(859 - 743) + chr(102) + chr(0b11000 + 0o25) + chr(857 - 801)))): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'<\x915\xf8\xc8\xf234\xe2\xbe\xc5\xf7"\x81\x9d\xa2\xd0C1A\x91Y\xfb\xdf\xc0\x92,Y\x00y\x98\x80\xc4@\xe6d\xe01\xafz\x02'), chr(6666 - 6566) + chr(101) + chr(99) + chr(0b1101111) + '\x64' + chr(101))(chr(117) + '\164' + chr(102) + chr(886 - 841) + chr(56))) if not suIjIS24Zkqw(sOIi_clNg5gy, roI3spqORKae(_R8IKF5IwAfX, roI3spqORKae(ES5oEprVxulp(b'3\x85!\xc3\x8e\xc7#%\xe6\xa7\xce\xb2"'), chr(0b110110 + 0o56) + '\145' + chr(0b1100011) + chr(111) + chr(0b100010 + 0o102) + '\x65')(chr(2523 - 2406) + chr(10323 - 10207) + chr(0b10110 + 0o120) + chr(1221 - 1176) + chr(56)))): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'<\x915\xf8\xc8\xf234\xe2\xbe\xc5\xf7%\x8f\x9a\xb7\xd6R1A\x91Y\xfb\xdf\xc0\x92,Y\x00y\x98\x80\xc4@\xe6d\xe01\xafz\x02'), '\x64' + '\x65' + chr(0b1100011) + chr(9129 - 9018) + chr(100) + chr(0b1001001 + 0o34))('\165' + chr(0b1110100) + chr(0b110001 + 0o65) + chr(0b11110 + 0o17) + chr(0b1110 + 0o52))) mtRVVANIa6XK = fQqowUO__gI_.descriptors fAHy9L3WNMfp = sOIi_clNg5gy.descriptors Tc3WMAo0GZpc = fQqowUO__gI_.keypoints MKS8K5ULhetX = sOIi_clNg5gy.keypoints g30pVubIDFeG = m2vjcKuvpSxn.distance.cdist(mtRVVANIa6XK, fAHy9L3WNMfp) kHJPpnuLR7PB = g30pVubIDFeG.argmin(axis=nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1515 - 1466), 0b1000)) DkWsesFaZj2Q = g30pVubIDFeG.argmin(axis=nzTpIcepk0o8(chr(48) + chr(8729 - 8618) + '\x30', ord("\x08"))) MmsoWcVUJDvD = [] jTeB0Lxs6riq = nDF4gVNx0u9Q.UmwwEp7MzR6q((nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1137 - 1089), 8), nzTpIcepk0o8('\060' + chr(0b101110 + 0o101) + chr(0b1011 + 0o50), ord("\x08")))) yzxLVGk7zEQ8 = nDF4gVNx0u9Q.UmwwEp7MzR6q((nzTpIcepk0o8(chr(141 - 93) + chr(7665 - 7554) + '\x30', 8), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\x6f' + chr(2169 - 2118), 8))) for (ZlbFMSG8gCoF, sChW4gUsXrIC) in _kV_Bomx8PZ4(kHJPpnuLR7PB): if DkWsesFaZj2Q[sChW4gUsXrIC] == ZlbFMSG8gCoF: roI3spqORKae(MmsoWcVUJDvD, roI3spqORKae(ES5oEprVxulp(b'9\xb0\x15\xb8\x90\xe6\x01+\xf8\xbd\xe9\xe2'), chr(0b1100100) + chr(0b10000 + 0o125) + '\x63' + '\157' + '\x64' + chr(0b1100101))('\165' + chr(0b1001001 + 0o53) + chr(0b1100110) + chr(45) + '\x38'))(sChW4gUsXrIC) jTeB0Lxs6riq = nDF4gVNx0u9Q.r_[jTeB0Lxs6riq, Tc3WMAo0GZpc[ZlbFMSG8gCoF:ZlbFMSG8gCoF + nzTpIcepk0o8(chr(48) + chr(3360 - 3249) + chr(1737 - 1688), 8), :]] yzxLVGk7zEQ8 = nDF4gVNx0u9Q.r_[yzxLVGk7zEQ8, MKS8K5ULhetX[sChW4gUsXrIC:sChW4gUsXrIC + nzTpIcepk0o8(chr(0b110000) + chr(1526 - 1415) + '\061', 8), :]] else: roI3spqORKae(MmsoWcVUJDvD, roI3spqORKae(ES5oEprVxulp(b'9\xb0\x15\xb8\x90\xe6\x01+\xf8\xbd\xe9\xe2'), chr(0b1100100) + chr(0b1 + 0o144) + chr(0b1100011) + chr(0b1011011 + 0o24) + '\144' + chr(0b110110 + 0o57))(chr(0b1001000 + 0o55) + '\164' + chr(2042 - 1940) + chr(0b100111 + 0o6) + chr(0b10011 + 0o45)))(-nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(111) + chr(49), 8)) return qJZwRu7e58NL(MmsoWcVUJDvD, jTeB0Lxs6riq, yzxLVGk7zEQ8)
BerkeleyAutomation/perception
perception/feature_matcher.py
PointToPlaneFeatureMatcher.match
def match(self, source_points, target_points, source_normals, target_normals): """ Matches points between two point-normal sets. Uses the closest ip to choose matches, with distance for thresholding only. Parameters ---------- source_point_cloud : Nx3 :obj:`numpy.ndarray` source object points target_point_cloud : Nx3 :obj:`numpy.ndarray` target object points source_normal_cloud : Nx3 :obj:`numpy.ndarray` source object outward-pointing normals target_normal_cloud : Nx3 :obj`numpy.ndarray` target object outward-pointing normals Returns ------- :obj`Correspondences` the correspondences between source and target """ # compute the distances and inner products between the point sets dists = ssd.cdist(source_points, target_points, 'euclidean') ip = source_normals.dot(target_normals.T) # abs because we don't have correct orientations source_ip = source_points.dot(target_normals.T) target_ip = target_points.dot(target_normals.T) target_ip = np.diag(target_ip) target_ip = np.tile(target_ip, [source_points.shape[0], 1]) abs_diff = np.abs(source_ip - target_ip) # difference in inner products # mark invalid correspondences invalid_dists = np.where(dists > self.dist_thresh_) abs_diff[invalid_dists[0], invalid_dists[1]] = np.inf invalid_norms = np.where(ip < self.norm_thresh_) abs_diff[invalid_norms[0], invalid_norms[1]] = np.inf # choose the closest matches match_indices = np.argmin(abs_diff, axis=1) match_vals = np.min(abs_diff, axis=1) invalid_matches = np.where(match_vals == np.inf) match_indices[invalid_matches[0]] = -1 return NormalCorrespondences(match_indices, source_points, target_points, source_normals, target_normals)
python
def match(self, source_points, target_points, source_normals, target_normals): """ Matches points between two point-normal sets. Uses the closest ip to choose matches, with distance for thresholding only. Parameters ---------- source_point_cloud : Nx3 :obj:`numpy.ndarray` source object points target_point_cloud : Nx3 :obj:`numpy.ndarray` target object points source_normal_cloud : Nx3 :obj:`numpy.ndarray` source object outward-pointing normals target_normal_cloud : Nx3 :obj`numpy.ndarray` target object outward-pointing normals Returns ------- :obj`Correspondences` the correspondences between source and target """ # compute the distances and inner products between the point sets dists = ssd.cdist(source_points, target_points, 'euclidean') ip = source_normals.dot(target_normals.T) # abs because we don't have correct orientations source_ip = source_points.dot(target_normals.T) target_ip = target_points.dot(target_normals.T) target_ip = np.diag(target_ip) target_ip = np.tile(target_ip, [source_points.shape[0], 1]) abs_diff = np.abs(source_ip - target_ip) # difference in inner products # mark invalid correspondences invalid_dists = np.where(dists > self.dist_thresh_) abs_diff[invalid_dists[0], invalid_dists[1]] = np.inf invalid_norms = np.where(ip < self.norm_thresh_) abs_diff[invalid_norms[0], invalid_norms[1]] = np.inf # choose the closest matches match_indices = np.argmin(abs_diff, axis=1) match_vals = np.min(abs_diff, axis=1) invalid_matches = np.where(match_vals == np.inf) match_indices[invalid_matches[0]] = -1 return NormalCorrespondences(match_indices, source_points, target_points, source_normals, target_normals)
[ "def", "match", "(", "self", ",", "source_points", ",", "target_points", ",", "source_normals", ",", "target_normals", ")", ":", "# compute the distances and inner products between the point sets", "dists", "=", "ssd", ".", "cdist", "(", "source_points", ",", "target_points", ",", "'euclidean'", ")", "ip", "=", "source_normals", ".", "dot", "(", "target_normals", ".", "T", ")", "# abs because we don't have correct orientations", "source_ip", "=", "source_points", ".", "dot", "(", "target_normals", ".", "T", ")", "target_ip", "=", "target_points", ".", "dot", "(", "target_normals", ".", "T", ")", "target_ip", "=", "np", ".", "diag", "(", "target_ip", ")", "target_ip", "=", "np", ".", "tile", "(", "target_ip", ",", "[", "source_points", ".", "shape", "[", "0", "]", ",", "1", "]", ")", "abs_diff", "=", "np", ".", "abs", "(", "source_ip", "-", "target_ip", ")", "# difference in inner products", "# mark invalid correspondences", "invalid_dists", "=", "np", ".", "where", "(", "dists", ">", "self", ".", "dist_thresh_", ")", "abs_diff", "[", "invalid_dists", "[", "0", "]", ",", "invalid_dists", "[", "1", "]", "]", "=", "np", ".", "inf", "invalid_norms", "=", "np", ".", "where", "(", "ip", "<", "self", ".", "norm_thresh_", ")", "abs_diff", "[", "invalid_norms", "[", "0", "]", ",", "invalid_norms", "[", "1", "]", "]", "=", "np", ".", "inf", "# choose the closest matches", "match_indices", "=", "np", ".", "argmin", "(", "abs_diff", ",", "axis", "=", "1", ")", "match_vals", "=", "np", ".", "min", "(", "abs_diff", ",", "axis", "=", "1", ")", "invalid_matches", "=", "np", ".", "where", "(", "match_vals", "==", "np", ".", "inf", ")", "match_indices", "[", "invalid_matches", "[", "0", "]", "]", "=", "-", "1", "return", "NormalCorrespondences", "(", "match_indices", ",", "source_points", ",", "target_points", ",", "source_normals", ",", "target_normals", ")" ]
Matches points between two point-normal sets. Uses the closest ip to choose matches, with distance for thresholding only. Parameters ---------- source_point_cloud : Nx3 :obj:`numpy.ndarray` source object points target_point_cloud : Nx3 :obj:`numpy.ndarray` target object points source_normal_cloud : Nx3 :obj:`numpy.ndarray` source object outward-pointing normals target_normal_cloud : Nx3 :obj`numpy.ndarray` target object outward-pointing normals Returns ------- :obj`Correspondences` the correspondences between source and target
[ "Matches", "points", "between", "two", "point", "-", "normal", "sets", ".", "Uses", "the", "closest", "ip", "to", "choose", "matches", "with", "distance", "for", "thresholding", "only", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/feature_matcher.py#L190-L231
train
Matches points between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KGkaWkPPkT2,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(0b101111 + 0o100) + chr(0b110010 + 0o0) + '\063' + chr(0b110001), 50083 - 50075), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + '\x31' + chr(528 - 479) + chr(0b11001 + 0o30), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(0b110010) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(111) + '\x31' + '\x34' + chr(246 - 191), 48617 - 48609), nzTpIcepk0o8(chr(48) + chr(0b1010000 + 0o37) + chr(2323 - 2268) + chr(55), 0b1000), nzTpIcepk0o8(chr(126 - 78) + '\x6f' + chr(0b110011) + chr(0b110101) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(111) + '\067' + chr(354 - 299), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + '\x33' + chr(52), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11001 + 0o30) + chr(2451 - 2398) + chr(0b110 + 0o55), 0b1000), nzTpIcepk0o8('\060' + chr(0b110100 + 0o73) + '\062' + chr(746 - 698) + '\067', 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(6165 - 6054) + chr(50) + chr(52) + '\063', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b110110) + '\x34', 7865 - 7857), nzTpIcepk0o8('\x30' + '\157' + chr(0b101000 + 0o11) + chr(1717 - 1668) + chr(280 - 226), 14152 - 14144), nzTpIcepk0o8('\060' + '\x6f' + chr(52) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101111 + 0o2) + '\061' + chr(2274 - 2219), 0o10), nzTpIcepk0o8(chr(408 - 360) + chr(0b1011 + 0o144) + '\x33' + '\x35' + '\x34', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(50) + chr(0b101000 + 0o10), 59353 - 59345), nzTpIcepk0o8(chr(48) + chr(0b101010 + 0o105) + chr(408 - 357) + '\067' + chr(51), 0b1000), nzTpIcepk0o8(chr(1169 - 1121) + '\x6f' + '\062' + chr(0b1011 + 0o51) + '\063', 8), nzTpIcepk0o8(chr(1082 - 1034) + chr(0b1101111) + chr(0b10100 + 0o36) + chr(0b100 + 0o54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1011 + 0o50) + chr(1830 - 1782) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(891 - 837), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + '\x33' + chr(50), 0b1000), nzTpIcepk0o8('\x30' + chr(1269 - 1158) + chr(0b110001) + '\x30' + chr(234 - 182), 25530 - 25522), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + '\063' + '\061' + chr(51), 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1010100 + 0o33) + chr(50) + chr(51) + chr(461 - 407), 28658 - 28650), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + '\x36' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(10056 - 9945) + chr(0b111 + 0o52) + '\061' + chr(52), 48153 - 48145), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b1101111) + chr(2443 - 2393) + chr(0b110101) + chr(0b11100 + 0o25), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8307 - 8196) + chr(0b110011), 45971 - 45963), nzTpIcepk0o8('\060' + chr(10981 - 10870) + '\064' + chr(701 - 652), 8), nzTpIcepk0o8(chr(1193 - 1145) + '\x6f' + '\x32' + chr(52) + chr(0b101000 + 0o10), 21875 - 21867), nzTpIcepk0o8(chr(0b110000) + chr(0b1110 + 0o141) + '\061' + '\066' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(1016 - 968) + '\x6f' + chr(0b110 + 0o61) + '\066', 0b1000), nzTpIcepk0o8(chr(1277 - 1229) + chr(0b1101111) + chr(50) + '\x36' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + chr(142 - 93) + '\060', 54638 - 54630), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(111) + chr(50) + '\x32' + '\x32', 2614 - 2606), nzTpIcepk0o8('\x30' + chr(0b1101 + 0o142) + '\061' + chr(55) + chr(143 - 90), 0o10), nzTpIcepk0o8(chr(150 - 102) + chr(0b1011110 + 0o21) + '\x31' + chr(0b1111 + 0o45) + '\x31', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(0b11000 + 0o34) + chr(0b10101 + 0o42), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(2250 - 2202) + chr(0b111111 + 0o60) + chr(0b110101) + '\060', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xb7'), '\144' + '\x65' + chr(99) + chr(0b1100100 + 0o13) + chr(2599 - 2499) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(102) + '\x2d' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def hk9OijmiC_zA(hXMPsSrOQzbh, Q5jUuaw7weI7, bOxibseUczsb, EfNZwIhYhxcv, HURThqrTG2OH): g30pVubIDFeG = DgD9v_r_4XIY.cdist(Q5jUuaw7weI7, bOxibseUczsb, roI3spqORKae(ES5oEprVxulp(b'\xfc<\xb3\x0bV\x8aZ\xbd\x05'), chr(100) + '\x65' + chr(0b1100011) + chr(0b1101111) + chr(0b1100100) + chr(8884 - 8783))('\165' + '\x74' + chr(0b100110 + 0o100) + chr(45) + '\x38')) bdyPZoloxrys = EfNZwIhYhxcv.dot(HURThqrTG2OH.hq6XE4_Nhd6R) nOOI9xvSOIdt = Q5jUuaw7weI7.dot(HURThqrTG2OH.hq6XE4_Nhd6R) cKhFkuc2x1IG = bOxibseUczsb.dot(HURThqrTG2OH.hq6XE4_Nhd6R) cKhFkuc2x1IG = nDF4gVNx0u9Q.diag(cKhFkuc2x1IG) cKhFkuc2x1IG = nDF4gVNx0u9Q.udtPco1xxZHr(cKhFkuc2x1IG, [Q5jUuaw7weI7.lhbM092AFW8f[nzTpIcepk0o8('\x30' + chr(0b1000001 + 0o56) + chr(0b110000), 0b1000)], nzTpIcepk0o8(chr(48) + chr(7645 - 7534) + chr(49), ord("\x08"))]) E7uIZJuZxBXg = nDF4gVNx0u9Q.zQBGwUT7UU8L(nOOI9xvSOIdt - cKhFkuc2x1IG) alYD7gu2S6iY = nDF4gVNx0u9Q.xWH4M7K6Qbd3(g30pVubIDFeG > hXMPsSrOQzbh.dist_thresh_) E7uIZJuZxBXg[alYD7gu2S6iY[nzTpIcepk0o8('\060' + '\x6f' + '\x30', 8)], alYD7gu2S6iY[nzTpIcepk0o8(chr(1051 - 1003) + '\157' + chr(0b100001 + 0o20), 8)]] = nDF4gVNx0u9Q.fMNxX9dGa5H9 EWDWEWeb02fR = nDF4gVNx0u9Q.xWH4M7K6Qbd3(bdyPZoloxrys < hXMPsSrOQzbh.norm_thresh_) E7uIZJuZxBXg[EWDWEWeb02fR[nzTpIcepk0o8(chr(0b110000) + chr(7437 - 7326) + chr(0b110000), 8)], EWDWEWeb02fR[nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49), 8)]] = nDF4gVNx0u9Q.fMNxX9dGa5H9 MmsoWcVUJDvD = nDF4gVNx0u9Q.argmin(E7uIZJuZxBXg, axis=nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001), 8)) A_eUcFYDXLmk = nDF4gVNx0u9Q.XURpmPuEWCNF(E7uIZJuZxBXg, axis=nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + chr(0b110001), 8)) EQZay52KNeXY = nDF4gVNx0u9Q.xWH4M7K6Qbd3(A_eUcFYDXLmk == nDF4gVNx0u9Q.fMNxX9dGa5H9) MmsoWcVUJDvD[EQZay52KNeXY[nzTpIcepk0o8(chr(1390 - 1342) + chr(0b1101111) + chr(2211 - 2163), 8)]] = -nzTpIcepk0o8(chr(0b1 + 0o57) + '\157' + chr(0b10011 + 0o36), 8) return UPcvVNpfaiZh(MmsoWcVUJDvD, Q5jUuaw7weI7, bOxibseUczsb, EfNZwIhYhxcv, HURThqrTG2OH)
BerkeleyAutomation/perception
perception/realsense_sensor.py
RealSenseSensor._config_pipe
def _config_pipe(self): """Configures the pipeline to stream color and depth. """ self._cfg.enable_device(self.id) # configure the color stream self._cfg.enable_stream( rs.stream.color, RealSenseSensor.COLOR_IM_WIDTH, RealSenseSensor.COLOR_IM_HEIGHT, rs.format.bgr8, RealSenseSensor.FPS ) # configure the depth stream self._cfg.enable_stream( rs.stream.depth, RealSenseSensor.DEPTH_IM_WIDTH, 360 if self._depth_align else RealSenseSensor.DEPTH_IM_HEIGHT, rs.format.z16, RealSenseSensor.FPS )
python
def _config_pipe(self): """Configures the pipeline to stream color and depth. """ self._cfg.enable_device(self.id) # configure the color stream self._cfg.enable_stream( rs.stream.color, RealSenseSensor.COLOR_IM_WIDTH, RealSenseSensor.COLOR_IM_HEIGHT, rs.format.bgr8, RealSenseSensor.FPS ) # configure the depth stream self._cfg.enable_stream( rs.stream.depth, RealSenseSensor.DEPTH_IM_WIDTH, 360 if self._depth_align else RealSenseSensor.DEPTH_IM_HEIGHT, rs.format.z16, RealSenseSensor.FPS )
[ "def", "_config_pipe", "(", "self", ")", ":", "self", ".", "_cfg", ".", "enable_device", "(", "self", ".", "id", ")", "# configure the color stream", "self", ".", "_cfg", ".", "enable_stream", "(", "rs", ".", "stream", ".", "color", ",", "RealSenseSensor", ".", "COLOR_IM_WIDTH", ",", "RealSenseSensor", ".", "COLOR_IM_HEIGHT", ",", "rs", ".", "format", ".", "bgr8", ",", "RealSenseSensor", ".", "FPS", ")", "# configure the depth stream", "self", ".", "_cfg", ".", "enable_stream", "(", "rs", ".", "stream", ".", "depth", ",", "RealSenseSensor", ".", "DEPTH_IM_WIDTH", ",", "360", "if", "self", ".", "_depth_align", "else", "RealSenseSensor", ".", "DEPTH_IM_HEIGHT", ",", "rs", ".", "format", ".", "z16", ",", "RealSenseSensor", ".", "FPS", ")" ]
Configures the pipeline to stream color and depth.
[ "Configures", "the", "pipeline", "to", "stream", "color", "and", "depth", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/realsense_sensor.py#L79-L100
train
Configures the pipeline to stream color and depth.
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,ZtIuyIq3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,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(0b1 + 0o57) + chr(0b1101111) + chr(0b110001) + chr(2530 - 2475) + chr(53), 63411 - 63403), nzTpIcepk0o8(chr(0b110000) + chr(7439 - 7328) + chr(50) + chr(0b110010) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(728 - 680) + '\157' + chr(2062 - 2007) + '\x33', 6207 - 6199), nzTpIcepk0o8('\x30' + chr(6401 - 6290) + '\063' + chr(0b110010) + '\061', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2479 - 2429) + '\065' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10011 + 0o44) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(1964 - 1853) + chr(0b101010 + 0o7) + chr(0b110011) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + '\061' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\157' + '\x33' + chr(0b100100 + 0o17) + chr(0b110011), 4628 - 4620), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b101111 + 0o100) + chr(54) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(0b101110 + 0o2) + chr(2430 - 2378), 0o10), nzTpIcepk0o8(chr(48) + chr(6258 - 6147) + chr(0b10010 + 0o40) + chr(55) + '\x37', 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(111) + chr(0b110011) + chr(0b101101 + 0o11) + chr(2677 - 2625), ord("\x08")), nzTpIcepk0o8(chr(648 - 600) + chr(0b111100 + 0o63) + chr(51) + '\x34' + '\065', 31165 - 31157), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(111) + chr(786 - 737) + chr(872 - 817) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(1582 - 1531) + chr(2291 - 2243), 46190 - 46182), nzTpIcepk0o8(chr(48) + '\x6f' + chr(434 - 383) + '\x34' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(842 - 790) + chr(0b10001 + 0o37), 20071 - 20063), nzTpIcepk0o8(chr(48) + chr(111) + '\061' + chr(50) + '\x36', 20485 - 20477), nzTpIcepk0o8(chr(2102 - 2054) + chr(111) + '\x32' + '\066' + chr(1991 - 1936), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1100 + 0o143) + chr(762 - 713) + '\063', 0b1000), nzTpIcepk0o8(chr(2238 - 2190) + chr(3557 - 3446) + '\063' + chr(617 - 568), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b111111 + 0o60) + '\x31' + chr(0b110001) + chr(0b11010 + 0o33), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(55) + '\064', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(2460 - 2407) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(78 - 27) + chr(49) + '\064', 0o10), nzTpIcepk0o8(chr(0b10 + 0o56) + '\x6f' + '\x31' + chr(942 - 888) + chr(0b101001 + 0o10), ord("\x08")), nzTpIcepk0o8(chr(1373 - 1325) + chr(0b1101111) + chr(0b110010) + chr(1266 - 1212) + chr(1955 - 1900), 8), nzTpIcepk0o8('\060' + '\157' + '\x36' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(51) + '\x30', 8), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b110001 + 0o76) + chr(0b11100 + 0o25) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b100111 + 0o110) + chr(0b111 + 0o54) + chr(1195 - 1143) + '\063', 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(626 - 577) + chr(0b110000) + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + chr(48) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(111) + chr(0b110010) + '\061' + chr(0b1101 + 0o44), 49810 - 49802), nzTpIcepk0o8('\060' + chr(111) + '\062' + '\061' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1100110 + 0o11) + chr(1488 - 1438) + chr(421 - 366) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(528 - 480) + chr(9192 - 9081) + chr(0b110110) + chr(0b1010 + 0o46), 57883 - 57875), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(111) + '\061' + chr(1554 - 1499) + '\x33', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101010 + 0o5) + chr(49) + chr(0b110010) + '\065', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b11100 + 0o31) + chr(0b110000), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'S'), '\144' + '\x65' + chr(0b1100011) + chr(0b1001110 + 0o41) + chr(1692 - 1592) + chr(101))(chr(0b111011 + 0o72) + '\164' + chr(0b1100110) + chr(45) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def w_Z4lEdLK5hO(hXMPsSrOQzbh): roI3spqORKae(hXMPsSrOQzbh._cfg, roI3spqORKae(ES5oEprVxulp(b'\x18\xfeZ\xb3\xc2Z\x06i\xbeG\xed\xdc\x91'), chr(8722 - 8622) + chr(8839 - 8738) + '\x63' + '\157' + chr(0b1100100) + chr(0b1100101))(chr(340 - 223) + chr(0b1110100) + chr(0b1100110) + chr(0b110 + 0o47) + chr(736 - 680)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x10\xf1w\xbf\xe2XaB\xeeK\xd4\xeb'), chr(0b1100100) + chr(0b1100101) + '\x63' + '\157' + chr(0b1000111 + 0o35) + chr(0b1100101))(chr(9035 - 8918) + chr(0b1001100 + 0o50) + chr(0b110111 + 0o57) + '\x2d' + '\070'))) roI3spqORKae(hXMPsSrOQzbh._cfg, roI3spqORKae(ES5oEprVxulp(b'\x18\xfeZ\xb3\xc2Z\x06~\xafC\xe1\xde\x99'), '\144' + chr(101) + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(0b1100001 + 0o4))(chr(0b1110101) + chr(0b1100101 + 0o17) + chr(102) + chr(45) + chr(56)))(roI3spqORKae(HI6BdQqJMt95.stream, roI3spqORKae(ES5oEprVxulp(b'\x0e\xa9\x08\xa0\xd7m\x11i\xec]\xb5\xc6'), chr(0b110010 + 0o62) + chr(3448 - 3347) + chr(0b1100011) + '\x6f' + chr(0b100001 + 0o103) + chr(101))(chr(0b1110101) + chr(0b111100 + 0o70) + chr(102) + chr(45) + '\070')), roI3spqORKae(nioKQzqMq3q3, roI3spqORKae(ES5oEprVxulp(b'>\xdfw\x9e\xfc`\x10@\x84f\xcd\xfb\xa0\xad'), chr(100) + chr(0b1100101) + '\x63' + '\157' + chr(0b1100 + 0o130) + '\145')('\165' + '\164' + chr(7073 - 6971) + chr(638 - 593) + '\x38')), roI3spqORKae(nioKQzqMq3q3, roI3spqORKae(ES5oEprVxulp(b'>\xdfw\x9e\xfc`\x10@\x84y\xc1\xf6\xb3\xad*'), chr(100) + chr(0b1100101) + '\143' + '\x6f' + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(45) + '\x38')), roI3spqORKae(HI6BdQqJMt95.format, roI3spqORKae(ES5oEprVxulp(b'\x1f\xf7I\xe9'), chr(6514 - 6414) + chr(10158 - 10057) + '\143' + chr(0b1101111) + '\x64' + chr(9087 - 8986))(chr(117) + chr(0b1110100) + chr(2662 - 2560) + chr(45) + chr(56))), roI3spqORKae(nioKQzqMq3q3, roI3spqORKae(ES5oEprVxulp(b';\xc0h'), '\x64' + chr(0b1100101) + '\143' + '\157' + '\144' + chr(7870 - 7769))('\165' + chr(740 - 624) + chr(0b1100110) + chr(45) + '\x38'))) roI3spqORKae(hXMPsSrOQzbh._cfg, roI3spqORKae(ES5oEprVxulp(b'\x18\xfeZ\xb3\xc2Z\x06~\xafC\xe1\xde\x99'), chr(0b1010010 + 0o22) + chr(0b111001 + 0o54) + chr(99) + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b1010000 + 0o45) + chr(0b1100010 + 0o22) + '\x66' + chr(45) + '\070'))(roI3spqORKae(HI6BdQqJMt95.stream, roI3spqORKae(ES5oEprVxulp(b'(\xd8\x0b\x88\xc4H,D\x84i\xfe\xe7'), chr(0b100111 + 0o75) + chr(4037 - 3936) + '\x63' + chr(111) + '\144' + chr(0b1100101))(chr(117) + chr(0b1101101 + 0o7) + chr(102) + '\055' + chr(56))), roI3spqORKae(nioKQzqMq3q3, roI3spqORKae(ES5oEprVxulp(b'9\xd5k\x85\xe6`\x10@\x84f\xcd\xfb\xa0\xad'), '\x64' + '\145' + chr(99) + chr(111) + chr(100) + '\145')(chr(0b100101 + 0o120) + chr(0b1110100) + chr(0b101011 + 0o73) + '\055' + '\070')), nzTpIcepk0o8(chr(446 - 398) + '\157' + chr(1068 - 1015) + chr(875 - 822) + chr(0b110000), ord("\x08")) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'"\xf4^\xa1\xdaW\x06l\xb7X\xe3\xd1'), chr(0b1001 + 0o133) + chr(101) + chr(99) + '\157' + chr(0b1100100) + '\x65')(chr(5337 - 5220) + chr(0b1010000 + 0o44) + chr(102) + chr(45) + chr(0b111000))) else roI3spqORKae(nioKQzqMq3q3, roI3spqORKae(ES5oEprVxulp(b'9\xd5k\x85\xe6`\x10@\x84y\xc1\xf6\xb3\xad*'), chr(9373 - 9273) + chr(0b1100101) + chr(0b110000 + 0o63) + chr(5240 - 5129) + '\144' + '\x65')('\x75' + chr(0b101000 + 0o114) + chr(0b1100110) + '\055' + '\x38')), roI3spqORKae(HI6BdQqJMt95.format, roI3spqORKae(ES5oEprVxulp(b'\x07\xa1\r'), chr(0b111001 + 0o53) + '\145' + chr(99) + chr(852 - 741) + chr(3832 - 3732) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b1100100 + 0o2) + chr(45) + '\070')), roI3spqORKae(nioKQzqMq3q3, roI3spqORKae(ES5oEprVxulp(b';\xc0h'), chr(9037 - 8937) + chr(101) + chr(8715 - 8616) + chr(0b101100 + 0o103) + chr(0b1100100) + chr(101))(chr(0b1110101) + chr(116) + chr(3581 - 3479) + chr(45) + '\070')))
BerkeleyAutomation/perception
perception/realsense_sensor.py
RealSenseSensor._set_depth_scale
def _set_depth_scale(self): """Retrieve the scale of the depth sensor. """ sensor = self._profile.get_device().first_depth_sensor() self._depth_scale = sensor.get_depth_scale()
python
def _set_depth_scale(self): """Retrieve the scale of the depth sensor. """ sensor = self._profile.get_device().first_depth_sensor() self._depth_scale = sensor.get_depth_scale()
[ "def", "_set_depth_scale", "(", "self", ")", ":", "sensor", "=", "self", ".", "_profile", ".", "get_device", "(", ")", ".", "first_depth_sensor", "(", ")", "self", ".", "_depth_scale", "=", "sensor", ".", "get_depth_scale", "(", ")" ]
Retrieve the scale of the depth sensor.
[ "Retrieve", "the", "scale", "of", "the", "depth", "sensor", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/realsense_sensor.py#L102-L106
train
Retrieve the scale of the depth sensor.
GiP5xwVCF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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' + '\x33' + '\060' + chr(2342 - 2292), 22320 - 22312), nzTpIcepk0o8('\x30' + chr(111) + chr(1220 - 1166), 0o10), nzTpIcepk0o8('\x30' + chr(1347 - 1236) + chr(2314 - 2264) + chr(0b11000 + 0o31) + chr(464 - 415), 0o10), nzTpIcepk0o8(chr(1268 - 1220) + chr(0b10110 + 0o131) + '\062' + '\x33' + chr(0b110010), 48525 - 48517), nzTpIcepk0o8(chr(48) + '\157' + '\x37' + chr(0b10110 + 0o41), 0o10), nzTpIcepk0o8(chr(895 - 847) + chr(0b1101111) + '\062' + chr(0b101010 + 0o7) + chr(49), 8), nzTpIcepk0o8('\x30' + '\157' + chr(0b110010 + 0o0) + '\067' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(651 - 603) + chr(0b111000 + 0o67) + '\063' + '\066' + chr(314 - 261), 0o10), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(111) + chr(0b110 + 0o53) + chr(0b110100) + chr(48), 0b1000), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + chr(0b110011) + '\x30' + chr(50), 8), nzTpIcepk0o8(chr(1640 - 1592) + chr(111) + chr(0b11111 + 0o24) + chr(48) + '\x32', 8), nzTpIcepk0o8('\060' + chr(11943 - 11832) + chr(0b110011) + chr(0b1 + 0o64) + '\064', 11034 - 11026), nzTpIcepk0o8('\x30' + '\157' + '\x31' + chr(2103 - 2054) + '\x36', 0o10), nzTpIcepk0o8(chr(1193 - 1145) + chr(0b1101111) + chr(2498 - 2446) + chr(2261 - 2211), 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(0b1101111) + chr(51) + chr(49) + chr(54), 0b1000), nzTpIcepk0o8('\060' + chr(1687 - 1576) + chr(1078 - 1027) + chr(0b1100 + 0o45) + chr(0b101000 + 0o11), 37963 - 37955), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\x6f' + '\x33' + chr(53) + chr(0b110001), 46225 - 46217), nzTpIcepk0o8(chr(48) + chr(0b11011 + 0o124) + chr(0b110010) + chr(934 - 881) + chr(816 - 766), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + chr(53) + chr(0b100111 + 0o17), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b11010 + 0o30) + chr(1649 - 1596) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110100) + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1446 - 1397) + '\x37' + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + chr(11937 - 11826) + '\063' + '\063' + chr(671 - 618), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1926 - 1877) + '\062' + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(1364 - 1314) + chr(0b110010), 61979 - 61971), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x37' + '\x34', ord("\x08")), nzTpIcepk0o8(chr(1902 - 1854) + chr(0b10011 + 0o134) + chr(361 - 311) + '\063' + chr(183 - 128), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(1081 - 1031) + '\065' + '\060', 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(49) + '\067' + chr(0b1110 + 0o44), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + chr(0b11011 + 0o27) + chr(53) + chr(0b10000 + 0o44), 0o10), nzTpIcepk0o8(chr(2084 - 2036) + chr(0b1000011 + 0o54) + chr(0b110011) + '\x32' + chr(52), 0b1000), nzTpIcepk0o8('\060' + chr(8867 - 8756) + chr(0b1011 + 0o50) + chr(0b110111) + '\064', 41166 - 41158), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(1440 - 1389), 0o10), nzTpIcepk0o8(chr(1081 - 1033) + '\x6f' + '\064' + '\062', 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(51) + chr(50), 47481 - 47473), nzTpIcepk0o8(chr(1946 - 1898) + chr(9102 - 8991) + chr(301 - 246) + chr(0b100000 + 0o24), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x31' + '\x36' + chr(0b101011 + 0o13), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + '\065' + chr(0b110100), 8), nzTpIcepk0o8(chr(48) + chr(2342 - 2231) + chr(51) + chr(51) + chr(2246 - 2193), 8), nzTpIcepk0o8(chr(48) + chr(0b1100101 + 0o12) + chr(0b110010) + '\x35' + '\062', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + '\157' + chr(852 - 799) + '\x30', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xec'), chr(100) + chr(2299 - 2198) + chr(5014 - 4915) + '\x6f' + '\x64' + chr(7418 - 7317))('\165' + chr(0b1110100) + chr(0b1011001 + 0o15) + chr(0b1101 + 0o40) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def l1tjb5sPi3qx(hXMPsSrOQzbh): yYDAzNg2GJoU = hXMPsSrOQzbh._profile.get_device().first_depth_sensor() hXMPsSrOQzbh.LTBLk2qHq2Zb = yYDAzNg2GJoU.get_depth_scale()
BerkeleyAutomation/perception
perception/realsense_sensor.py
RealSenseSensor._set_intrinsics
def _set_intrinsics(self): """Read the intrinsics matrix from the stream. """ strm = self._profile.get_stream(rs.stream.color) obj = strm.as_video_stream_profile().get_intrinsics() self._intrinsics[0, 0] = obj.fx self._intrinsics[1, 1] = obj.fy self._intrinsics[0, 2] = obj.ppx self._intrinsics[1, 2] = obj.ppy
python
def _set_intrinsics(self): """Read the intrinsics matrix from the stream. """ strm = self._profile.get_stream(rs.stream.color) obj = strm.as_video_stream_profile().get_intrinsics() self._intrinsics[0, 0] = obj.fx self._intrinsics[1, 1] = obj.fy self._intrinsics[0, 2] = obj.ppx self._intrinsics[1, 2] = obj.ppy
[ "def", "_set_intrinsics", "(", "self", ")", ":", "strm", "=", "self", ".", "_profile", ".", "get_stream", "(", "rs", ".", "stream", ".", "color", ")", "obj", "=", "strm", ".", "as_video_stream_profile", "(", ")", ".", "get_intrinsics", "(", ")", "self", ".", "_intrinsics", "[", "0", ",", "0", "]", "=", "obj", ".", "fx", "self", ".", "_intrinsics", "[", "1", ",", "1", "]", "=", "obj", ".", "fy", "self", ".", "_intrinsics", "[", "0", ",", "2", "]", "=", "obj", ".", "ppx", "self", ".", "_intrinsics", "[", "1", ",", "2", "]", "=", "obj", ".", "ppy" ]
Read the intrinsics matrix from the stream.
[ "Read", "the", "intrinsics", "matrix", "from", "the", "stream", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/realsense_sensor.py#L108-L116
train
Read the intrinsics matrix from the stream.
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(0b110000) + chr(0b1001101 + 0o42) + chr(0b110110) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10101 + 0o42), 0o10), nzTpIcepk0o8('\x30' + chr(7768 - 7657) + chr(0b11000 + 0o31) + '\x34' + chr(2368 - 2315), 280 - 272), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + '\064', 56209 - 56201), nzTpIcepk0o8('\x30' + chr(111) + chr(53) + '\061', ord("\x08")), nzTpIcepk0o8(chr(505 - 457) + chr(111) + chr(0b110001 + 0o0) + chr(0b11 + 0o64) + '\x33', 5581 - 5573), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + chr(2149 - 2098) + chr(54) + '\x31', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110011) + chr(791 - 739) + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(2436 - 2384) + chr(1022 - 974), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1005 - 955) + chr(0b110001), 53229 - 53221), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1766 - 1717) + chr(1571 - 1516) + '\064', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + '\x32' + chr(0b110010 + 0o5), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b110101 + 0o72) + chr(49), 7236 - 7228), nzTpIcepk0o8(chr(48) + chr(0b0 + 0o157) + chr(0b110010) + chr(0b100001 + 0o25) + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(54) + chr(53), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1011 + 0o144) + chr(49) + '\064' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(0b110100) + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + '\064' + chr(1206 - 1153), 8), nzTpIcepk0o8('\x30' + chr(0b1001101 + 0o42) + chr(0b100000 + 0o27) + '\x35', 0b1000), nzTpIcepk0o8(chr(773 - 725) + '\157' + '\062' + chr(50) + chr(0b11010 + 0o35), 46922 - 46914), nzTpIcepk0o8(chr(48) + chr(4012 - 3901) + chr(49) + '\061' + chr(2137 - 2082), ord("\x08")), nzTpIcepk0o8(chr(135 - 87) + '\x6f' + chr(0b110001 + 0o2) + chr(54) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(10797 - 10686) + chr(0b101100 + 0o5) + '\067' + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(51) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(2143 - 2095) + chr(111) + '\x32' + '\067' + '\x35', 29637 - 29629), nzTpIcepk0o8('\060' + chr(0b1001101 + 0o42) + chr(0b101 + 0o54) + chr(0b110111) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(947 - 897) + '\063' + chr(0b110110), 15148 - 15140), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + chr(51) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(2203 - 2155) + chr(7394 - 7283) + chr(0b110001) + chr(0b110011) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100001 + 0o116) + chr(0b110011) + '\060' + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + chr(3508 - 3397) + '\062' + chr(53) + chr(2098 - 2047), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b10100 + 0o133) + chr(0b11000 + 0o32) + chr(2833 - 2779) + chr(2198 - 2148), 8), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(0b1010111 + 0o30) + chr(0b110011) + chr(0b101101 + 0o10) + chr(50), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(11533 - 11422) + '\062' + '\065' + '\060', ord("\x08")), nzTpIcepk0o8('\060' + chr(8044 - 7933) + chr(49) + chr(0b110101) + chr(51), 49683 - 49675), nzTpIcepk0o8('\060' + chr(111) + chr(0b100111 + 0o13) + chr(1436 - 1385) + chr(2085 - 2031), 8), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(111) + '\x32' + chr(300 - 252) + chr(0b110 + 0o57), ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + '\063' + chr(875 - 824) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(9756 - 9645) + '\061' + chr(1138 - 1088) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + '\157' + chr(50) + chr(0b1000 + 0o51) + chr(0b110100 + 0o2), 36403 - 36395)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1000001 + 0o56) + chr(0b10100 + 0o41) + '\x30', 13428 - 13420)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1c'), '\144' + '\145' + chr(99) + '\157' + chr(100) + '\x65')(chr(117) + chr(0b1110100) + chr(2024 - 1922) + '\055' + chr(2940 - 2884)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def r3gX7ykVPTpP(hXMPsSrOQzbh): HXOxplSAdt1X = hXMPsSrOQzbh._profile.get_stream(HI6BdQqJMt95.stream.s93qyRHd7l1y) kIMfkyypPTcC = HXOxplSAdt1X.as_video_stream_profile().get_intrinsics() hXMPsSrOQzbh.NbPWJy7csTQS[nzTpIcepk0o8(chr(48) + '\x6f' + '\x30', 13584 - 13576), nzTpIcepk0o8('\x30' + chr(10918 - 10807) + '\x30', 8)] = kIMfkyypPTcC.fx hXMPsSrOQzbh.NbPWJy7csTQS[nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061', 8), nzTpIcepk0o8('\060' + '\157' + chr(49), 8)] = kIMfkyypPTcC.fy hXMPsSrOQzbh.NbPWJy7csTQS[nzTpIcepk0o8('\x30' + '\x6f' + '\060', 8), nzTpIcepk0o8('\x30' + chr(3340 - 3229) + chr(50), 0o10)] = kIMfkyypPTcC.ppx hXMPsSrOQzbh.NbPWJy7csTQS[nzTpIcepk0o8(chr(48) + '\157' + chr(49), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010), 8)] = kIMfkyypPTcC.ppy
BerkeleyAutomation/perception
perception/realsense_sensor.py
RealSenseSensor.color_intrinsics
def color_intrinsics(self): """:obj:`CameraIntrinsics` : The camera intrinsics for the RealSense color camera. """ return CameraIntrinsics( self._frame, self._intrinsics[0, 0], self._intrinsics[1, 1], self._intrinsics[0, 2], self._intrinsics[1, 2], height=RealSenseSensor.COLOR_IM_HEIGHT, width=RealSenseSensor.COLOR_IM_WIDTH, )
python
def color_intrinsics(self): """:obj:`CameraIntrinsics` : The camera intrinsics for the RealSense color camera. """ return CameraIntrinsics( self._frame, self._intrinsics[0, 0], self._intrinsics[1, 1], self._intrinsics[0, 2], self._intrinsics[1, 2], height=RealSenseSensor.COLOR_IM_HEIGHT, width=RealSenseSensor.COLOR_IM_WIDTH, )
[ "def", "color_intrinsics", "(", "self", ")", ":", "return", "CameraIntrinsics", "(", "self", ".", "_frame", ",", "self", ".", "_intrinsics", "[", "0", ",", "0", "]", ",", "self", ".", "_intrinsics", "[", "1", ",", "1", "]", ",", "self", ".", "_intrinsics", "[", "0", ",", "2", "]", ",", "self", ".", "_intrinsics", "[", "1", ",", "2", "]", ",", "height", "=", "RealSenseSensor", ".", "COLOR_IM_HEIGHT", ",", "width", "=", "RealSenseSensor", ".", "COLOR_IM_WIDTH", ",", ")" ]
:obj:`CameraIntrinsics` : The camera intrinsics for the RealSense color camera.
[ ":", "obj", ":", "CameraIntrinsics", ":", "The", "camera", "intrinsics", "for", "the", "RealSense", "color", "camera", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/realsense_sensor.py#L119-L130
train
Return a new CameraIntrinsics object for the RealSense color camera.
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,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V9ckIhroIia,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(2808 - 2753) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(1209 - 1161) + chr(5458 - 5347) + chr(0b1010 + 0o51) + chr(0b10101 + 0o40) + chr(55), 10284 - 10276), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(0b110110) + '\066', 2252 - 2244), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101111) + chr(0b1 + 0o63) + chr(1895 - 1845), 32150 - 32142), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b1101111) + chr(0b110110), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1001 + 0o146) + chr(0b11001 + 0o36) + chr(2613 - 2559), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1172 - 1121) + '\060' + chr(49), 0b1000), nzTpIcepk0o8('\060' + chr(0b110101 + 0o72) + chr(0b10101 + 0o37) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(891 - 843) + chr(0b1101111) + '\061' + chr(930 - 879) + chr(0b10011 + 0o40), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x31' + chr(0b101001 + 0o15) + chr(1363 - 1310), 0b1000), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(111) + chr(797 - 745) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\x6f' + chr(0b110110) + chr(0b110100 + 0o2), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(6525 - 6414) + '\x32' + chr(944 - 896) + chr(2297 - 2249), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(682 - 633) + chr(0b11101 + 0o23) + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + '\060' + chr(1330 - 1276), 21508 - 21500), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(111) + '\061' + chr(0b110100) + chr(0b101001 + 0o14), 0o10), nzTpIcepk0o8('\060' + '\157' + '\061' + '\064' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(111) + chr(2177 - 2128) + '\x32' + chr(1776 - 1727), 19895 - 19887), nzTpIcepk0o8(chr(1863 - 1815) + chr(0b1101111) + chr(0b110111) + '\066', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(50) + '\x36' + '\066', 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1000100 + 0o53) + chr(1286 - 1237) + '\x30' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(2643 - 2589) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(935 - 886) + chr(51) + '\064', 0o10), nzTpIcepk0o8(chr(1878 - 1830) + '\x6f' + chr(51) + '\x34' + chr(0b101110 + 0o5), 37304 - 37296), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + chr(51) + '\063' + chr(52), 0b1000), nzTpIcepk0o8(chr(772 - 724) + '\x6f' + chr(1460 - 1410) + '\064' + '\060', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\066' + chr(2461 - 2410), ord("\x08")), nzTpIcepk0o8(chr(996 - 948) + chr(0b1101111) + chr(49) + '\x32' + chr(50), ord("\x08")), nzTpIcepk0o8('\060' + chr(2849 - 2738) + '\x32' + chr(51) + '\066', 0o10), nzTpIcepk0o8('\060' + chr(7773 - 7662) + chr(50) + chr(493 - 443) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(1687 - 1637) + chr(49) + chr(49), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\064' + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + chr(0b11100 + 0o25) + '\062', 0b1000), nzTpIcepk0o8('\x30' + chr(3197 - 3086) + chr(0b110001) + chr(52) + chr(0b110100), 4811 - 4803), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + '\x31' + '\060' + chr(0b101001 + 0o12), 8), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1101111) + chr(53), 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + chr(657 - 607) + chr(50) + '\060', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2369 - 2315) + chr(1585 - 1533), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + chr(1884 - 1832) + chr(963 - 911), 53313 - 53305), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(48), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1655 - 1607) + chr(0b1101111) + '\x35' + chr(0b101011 + 0o5), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x12'), '\144' + chr(0b1100101) + chr(1895 - 1796) + chr(111) + '\144' + '\x65')(chr(6833 - 6716) + chr(0b1110100) + chr(0b1000000 + 0o46) + chr(0b101101) + chr(2020 - 1964)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def GYBk2HiLoT4c(hXMPsSrOQzbh): return LAdEbaMlWUjZ(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'V\xd9\xf5\x10hL\xb6P.%\x13\x02'), chr(0b1111 + 0o125) + chr(101) + '\x63' + chr(0b1101111) + '\x64' + '\145')('\x75' + chr(0b1110100) + chr(0b1100110) + chr(0b1111 + 0o36) + '\070')), roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'r\x8d\xe6uLG\xf6E(!re'), chr(0b101010 + 0o72) + chr(0b1100101) + '\x63' + chr(111) + chr(0b1001010 + 0o32) + chr(7810 - 7709))(chr(117) + chr(116) + '\146' + chr(0b101101) + chr(0b111000)))[nzTpIcepk0o8(chr(0b101000 + 0o10) + '\x6f' + chr(530 - 482), 0b1000), nzTpIcepk0o8(chr(2087 - 2039) + '\157' + chr(48), 8)], roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'r\x8d\xe6uLG\xf6E(!re'), '\x64' + chr(0b1100101) + chr(0b1100011) + chr(0b111101 + 0o62) + '\x64' + chr(0b101100 + 0o71))(chr(0b1110101) + '\x74' + chr(1581 - 1479) + '\x2d' + '\x38'))[nzTpIcepk0o8('\060' + chr(11227 - 11116) + '\061', 0o10), nzTpIcepk0o8('\060' + chr(5184 - 5073) + chr(562 - 513), 8)], roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'r\x8d\xe6uLG\xf6E(!re'), chr(0b1001111 + 0o25) + chr(9565 - 9464) + chr(0b1100011) + chr(0b10001 + 0o136) + '\x64' + chr(3716 - 3615))(chr(11042 - 10925) + '\164' + '\146' + chr(0b101000 + 0o5) + chr(56)))[nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110000), 8), nzTpIcepk0o8('\x30' + chr(0b1100001 + 0o16) + chr(0b110010), 0o10)], roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'r\x8d\xe6uLG\xf6E(!re'), '\144' + '\145' + chr(99) + '\x6f' + '\144' + chr(0b101010 + 0o73))(chr(0b1110101) + '\x74' + chr(0b1100001 + 0o5) + chr(45) + chr(0b111000)))[nzTpIcepk0o8('\x30' + chr(9139 - 9028) + chr(0b1110 + 0o43), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32', 8)], height=roI3spqORKae(nioKQzqMq3q3, roI3spqORKae(ES5oEprVxulp(b'\x7f\xa0\xfamTa\x88k\x04=f\x7f\xc7\x0b\x92'), chr(0b110001 + 0o63) + chr(0b111100 + 0o51) + chr(0b101111 + 0o64) + chr(111) + chr(100) + chr(10091 - 9990))('\165' + chr(0b10111 + 0o135) + chr(1832 - 1730) + chr(0b111 + 0o46) + chr(0b10110 + 0o42))), width=roI3spqORKae(nioKQzqMq3q3, roI3spqORKae(ES5oEprVxulp(b'\x7f\xa0\xfamTa\x88k\x04"jr\xd4\x0b'), chr(100) + chr(0b1010 + 0o133) + chr(0b1100011) + chr(0b1011110 + 0o21) + '\144' + '\x65')(chr(0b11101 + 0o130) + chr(116) + chr(0b1011001 + 0o15) + chr(45) + chr(56))))
BerkeleyAutomation/perception
perception/realsense_sensor.py
RealSenseSensor.start
def start(self): """Start the sensor. """ try: self._depth_align = False if self._registration_mode == RealSenseRegistrationMode.DEPTH_TO_COLOR: self._depth_align = True self._config_pipe() self._profile = self._pipe.start(self._cfg) # store intrinsics and depth scale self._set_depth_scale() self._set_intrinsics() # skip few frames to give auto-exposure a chance to settle for _ in range(5): self._pipe.wait_for_frames() self._running = True except RuntimeError as e: print(e)
python
def start(self): """Start the sensor. """ try: self._depth_align = False if self._registration_mode == RealSenseRegistrationMode.DEPTH_TO_COLOR: self._depth_align = True self._config_pipe() self._profile = self._pipe.start(self._cfg) # store intrinsics and depth scale self._set_depth_scale() self._set_intrinsics() # skip few frames to give auto-exposure a chance to settle for _ in range(5): self._pipe.wait_for_frames() self._running = True except RuntimeError as e: print(e)
[ "def", "start", "(", "self", ")", ":", "try", ":", "self", ".", "_depth_align", "=", "False", "if", "self", ".", "_registration_mode", "==", "RealSenseRegistrationMode", ".", "DEPTH_TO_COLOR", ":", "self", ".", "_depth_align", "=", "True", "self", ".", "_config_pipe", "(", ")", "self", ".", "_profile", "=", "self", ".", "_pipe", ".", "start", "(", "self", ".", "_cfg", ")", "# store intrinsics and depth scale", "self", ".", "_set_depth_scale", "(", ")", "self", ".", "_set_intrinsics", "(", ")", "# skip few frames to give auto-exposure a chance to settle", "for", "_", "in", "range", "(", "5", ")", ":", "self", ".", "_pipe", ".", "wait_for_frames", "(", ")", "self", ".", "_running", "=", "True", "except", "RuntimeError", "as", "e", ":", "print", "(", "e", ")" ]
Start the sensor.
[ "Start", "the", "sensor", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/realsense_sensor.py#L156-L177
train
Start the sensor.
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(487 - 439) + chr(2205 - 2094) + chr(0b11001 + 0o31) + '\062' + chr(240 - 188), 0o10), nzTpIcepk0o8('\060' + chr(2136 - 2025) + '\061' + chr(0b1011 + 0o51) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(1054 - 1003) + chr(0b110110) + chr(0b10110 + 0o37), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110100 + 0o1) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + chr(937 - 886) + '\x32' + chr(2270 - 2220), 0o10), nzTpIcepk0o8(chr(2022 - 1974) + chr(12269 - 12158) + chr(49) + chr(367 - 319) + chr(0b101 + 0o55), 0b1000), nzTpIcepk0o8(chr(719 - 671) + chr(0b1101111) + chr(49) + '\064' + '\064', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(50) + '\x34' + chr(53), 0b1000), nzTpIcepk0o8('\060' + chr(10392 - 10281) + chr(49) + chr(0b100010 + 0o23) + chr(419 - 364), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11010 + 0o31) + chr(53) + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(0b110001) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(54) + chr(1004 - 954), 19371 - 19363), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(51) + chr(0b111 + 0o57) + chr(0b111 + 0o51), 56934 - 56926), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(49) + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(0b1100111 + 0o10) + chr(1132 - 1081) + '\x30' + '\064', 62372 - 62364), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(0b110000) + chr(683 - 635), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(0b10101 + 0o40) + chr(0b110111), 20740 - 20732), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + chr(0b110011) + '\x30' + '\064', 8), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x37' + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1001110 + 0o41) + '\063' + chr(0b0 + 0o66) + chr(1271 - 1221), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + chr(49) + '\065', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(710 - 659) + chr(52) + chr(0b100111 + 0o13), 22722 - 22714), nzTpIcepk0o8(chr(1828 - 1780) + chr(111) + chr(0b101010 + 0o11) + chr(48) + chr(0b110011), 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b11010 + 0o33) + chr(0b11110 + 0o30), 8), nzTpIcepk0o8('\060' + chr(0b1101001 + 0o6) + chr(0b1101 + 0o44) + '\065' + chr(0b110111), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(52) + '\060', 55655 - 55647), nzTpIcepk0o8(chr(48) + chr(111) + chr(425 - 373) + chr(0b1 + 0o64), ord("\x08")), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(4266 - 4155) + chr(0b101010 + 0o7) + '\x32' + '\x35', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b1010 + 0o47) + chr(0b101100 + 0o10) + chr(0b11100 + 0o31), 0o10), nzTpIcepk0o8(chr(347 - 299) + chr(0b1101111) + '\063' + chr(0b11110 + 0o22) + chr(52), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x37' + chr(0b10010 + 0o43), ord("\x08")), nzTpIcepk0o8(chr(1130 - 1082) + chr(0b1101111) + '\x33' + '\x31' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(2235 - 2182) + chr(63 - 15), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(50) + chr(2131 - 2081), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b110100 + 0o73) + chr(49) + chr(0b11000 + 0o35) + '\060', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1010 + 0o47) + '\x33' + chr(0b110000), 0o10), nzTpIcepk0o8('\060' + '\157' + '\061' + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(51) + chr(0b101010 + 0o6) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1100 + 0o46) + '\060' + '\x37', 43755 - 43747), nzTpIcepk0o8('\060' + chr(11585 - 11474) + chr(51) + '\x34' + chr(0b10 + 0o61), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101111) + chr(0b110101) + chr(808 - 760), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xba'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(0b1100 + 0o130) + chr(101))('\x75' + '\164' + chr(0b1001111 + 0o27) + '\055' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def KQbHFTcl_LKy(hXMPsSrOQzbh): try: hXMPsSrOQzbh.htfjd3_xuWi1 = nzTpIcepk0o8('\x30' + chr(111) + '\060', 22838 - 22830) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"\xcb\x14\x90I\xbb1\x10\xd7\x0e\x99'\x1d\x9e\x10\xa9\xef\xcb\xa1"), '\x64' + '\145' + chr(0b1100011) + '\x6f' + chr(0b1100100) + chr(1017 - 916))(chr(6697 - 6580) + '\164' + '\146' + chr(0b101101) + '\070')) == roI3spqORKae(pZDSv7HmUJRw, roI3spqORKae(ES5oEprVxulp(b'\xd0#\xa5z\x9a\x1d0\xea0\xae\x01>\xbf\x1d'), '\144' + chr(9194 - 9093) + '\143' + '\157' + '\144' + chr(0b1100101))(chr(3659 - 3542) + chr(0b101 + 0o157) + '\146' + '\055' + chr(0b111000))): hXMPsSrOQzbh.htfjd3_xuWi1 = nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(111) + chr(0b110001), 53102 - 53094) roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xcb\x05\x9a@\xb4+\x03\xfa\x1f\x84>\x17'), '\144' + chr(0b1100101) + chr(2711 - 2612) + '\157' + chr(0b111110 + 0o46) + '\145')(chr(117) + chr(4411 - 4295) + '\146' + chr(0b101101) + chr(56)))() hXMPsSrOQzbh.uJrjep0Dwwjo = hXMPsSrOQzbh._pipe.KQbHFTcl_LKy(hXMPsSrOQzbh.X8rC6J8osBND) roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xcb\x15\x90Z\x8d&\x01\xd5\x1b\x85\x11\x01\x93.\xa8\xe5'), chr(100) + '\x65' + '\x63' + chr(111) + chr(100) + chr(0b1100101))(chr(0b100001 + 0o124) + '\164' + '\146' + chr(0b101101) + '\x38'))() roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xcb\x15\x90Z\x8d+\n\xd1\x1d\x84 \x01\x99,\xb7'), '\144' + '\145' + chr(99) + chr(0b1001010 + 0o45) + chr(379 - 279) + chr(101))(chr(5869 - 5752) + chr(116) + '\146' + '\055' + chr(0b111000)))() for zIqcgNgQ9U6F in bbT2xIe5pzk7(nzTpIcepk0o8(chr(48) + chr(288 - 177) + chr(0b10010 + 0o43), 0b1000)): roI3spqORKae(hXMPsSrOQzbh._pipe, roI3spqORKae(ES5oEprVxulp(b'\xe3\x07\x9cZ\x8d$\x0b\xd70\x8b<\x13\x9d*\xb7'), chr(0b1100100) + '\x65' + '\x63' + '\157' + chr(0b1100100) + chr(7502 - 7401))(chr(117) + chr(0b1100110 + 0o16) + chr(0b1100110) + chr(441 - 396) + '\070'))() hXMPsSrOQzbh.IF4G0B37piRc = nzTpIcepk0o8(chr(1108 - 1060) + '\x6f' + '\061', 8) except _1qUu0gKi9gH as wgf0sgcu_xPL: v8jsMqaYV6U2(wgf0sgcu_xPL)
BerkeleyAutomation/perception
perception/realsense_sensor.py
RealSenseSensor.stop
def stop(self): """Stop the sensor. """ # check that everything is running if not self._running: logging.warning('Realsense not running. Aborting stop.') return False self._pipe.stop() self._running = False return True
python
def stop(self): """Stop the sensor. """ # check that everything is running if not self._running: logging.warning('Realsense not running. Aborting stop.') return False self._pipe.stop() self._running = False return True
[ "def", "stop", "(", "self", ")", ":", "# check that everything is running", "if", "not", "self", ".", "_running", ":", "logging", ".", "warning", "(", "'Realsense not running. Aborting stop.'", ")", "return", "False", "self", ".", "_pipe", ".", "stop", "(", ")", "self", ".", "_running", "=", "False", "return", "True" ]
Stop the sensor.
[ "Stop", "the", "sensor", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/realsense_sensor.py#L179-L189
train
Stop the sensor.
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(0b110000) + '\x6f' + chr(1439 - 1385) + chr(0b10111 + 0o32), 43361 - 43353), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + chr(0b110 + 0o54) + '\064' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(54) + '\x31', 8), nzTpIcepk0o8('\060' + '\x6f' + chr(925 - 876) + chr(2199 - 2149) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(1159 - 1111) + chr(0b1101111) + chr(0b110011) + '\x37' + '\060', 30635 - 30627), nzTpIcepk0o8('\060' + chr(0b100101 + 0o112) + chr(0b110001) + chr(54) + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110110) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b111000 + 0o67) + '\061' + '\x34' + chr(1225 - 1172), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b10110 + 0o34) + chr(0b10001 + 0o42) + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(0b1010 + 0o52) + '\x36', 56382 - 56374), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(0b101111 + 0o100) + chr(51) + '\067' + chr(180 - 127), ord("\x08")), nzTpIcepk0o8(chr(757 - 709) + chr(111) + '\x33' + '\x34' + chr(0b11000 + 0o35), ord("\x08")), nzTpIcepk0o8(chr(1129 - 1081) + chr(9866 - 9755) + '\x31' + chr(2385 - 2331) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(1587 - 1539) + chr(0b1101111) + chr(52) + '\x36', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b11110 + 0o121) + chr(51) + '\067' + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + chr(5428 - 5317) + chr(2330 - 2280) + '\061' + chr(49), 0o10), nzTpIcepk0o8(chr(850 - 802) + '\157' + chr(0b110010) + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100100 + 0o15) + chr(0b110011 + 0o1) + chr(1286 - 1231), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(954 - 900) + '\x33', 29106 - 29098), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + '\x32' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + chr(55), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10110 + 0o37), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000111 + 0o50) + chr(92 - 41) + chr(52) + chr(0b10100 + 0o36), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(0b110 + 0o57) + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + chr(0b1011 + 0o52) + '\067', 27855 - 27847), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + chr(0b110000), 11490 - 11482), nzTpIcepk0o8(chr(48) + chr(11089 - 10978) + chr(50) + chr(780 - 726) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(59 - 11) + chr(111) + chr(0b1101 + 0o44) + chr(0b101000 + 0o13) + chr(931 - 876), 0b1000), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(174 - 63) + chr(0b110011) + chr(53) + chr(2682 - 2630), 0o10), nzTpIcepk0o8(chr(48) + chr(0b110100 + 0o73) + chr(0b110011) + chr(0b100000 + 0o24) + chr(50), 8), nzTpIcepk0o8(chr(1484 - 1436) + chr(10968 - 10857) + '\061' + '\x34', 0o10), nzTpIcepk0o8(chr(839 - 791) + chr(0b1010010 + 0o35) + chr(1798 - 1749) + chr(712 - 664) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(50) + '\067', 8), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b1101111) + chr(0b10101 + 0o36) + '\063' + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(4874 - 4763) + chr(1595 - 1547), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(0b110010), 0o10), nzTpIcepk0o8(chr(1274 - 1226) + chr(0b10000 + 0o137) + chr(0b10110 + 0o34) + chr(0b1010 + 0o46) + '\061', 0o10), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b1101111) + '\x35' + chr(1637 - 1586), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b10001 + 0o41) + chr(2301 - 2252) + '\061', 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10011 + 0o37) + '\x36' + chr(1839 - 1786), 9308 - 9300)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(1334 - 1286) + chr(0b1010000 + 0o37) + '\065' + '\x30', 9406 - 9398)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1f'), chr(4714 - 4614) + '\145' + chr(99) + chr(111) + chr(0b1010 + 0o132) + chr(0b101101 + 0o70))('\165' + '\x74' + '\x66' + chr(45) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def dYJbBiYO_nGE(hXMPsSrOQzbh): if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'x\xe3\x05\x15\xc86\x07R\xeb\x0f\xaf\x86'), chr(854 - 754) + chr(625 - 524) + chr(0b11000 + 0o113) + chr(111) + chr(100) + '\x65')('\x75' + '\x74' + chr(102) + chr(0b101101) + chr(533 - 477))): roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'F\xc4C<\x91\x1aS'), '\144' + chr(8047 - 7946) + chr(300 - 201) + '\157' + '\x64' + chr(5150 - 5049))(chr(5518 - 5401) + chr(0b1101110 + 0o6) + chr(0b10111 + 0o117) + chr(1969 - 1924) + chr(0b100001 + 0o27)))(roI3spqORKae(ES5oEprVxulp(b'c\xc0P>\x8b\x11Z\x16\xfeF\x93\x8a\x03\x06\x8c\xfc{\t\x1a\xbdp+\xc2(\xcd\x7f\xc5+\x85\x8ckad\xabob\xaf'), chr(0b11000 + 0o114) + '\x65' + '\x63' + chr(0b1101111) + chr(0b1100100) + '\145')(chr(117) + '\x74' + chr(6504 - 6402) + chr(0b1110 + 0o37) + '\x38')) return nzTpIcepk0o8(chr(0b110000) + chr(0b1100110 + 0o11) + chr(0b110000), 8) roI3spqORKae(hXMPsSrOQzbh._pipe, roI3spqORKae(ES5oEprVxulp(b'U\xfc{0\xba\x1dm*\xc4\x08\xba\xa0'), '\144' + chr(0b11101 + 0o110) + chr(0b101100 + 0o67) + chr(0b1100010 + 0o15) + chr(0b1100100) + '\x65')(chr(0b1110101) + chr(116) + '\x66' + '\055' + chr(56)))() hXMPsSrOQzbh.IF4G0B37piRc = nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(4677 - 4566) + '\x30', 8) return nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31', ord("\x08"))
BerkeleyAutomation/perception
perception/realsense_sensor.py
RealSenseSensor._read_color_and_depth_image
def _read_color_and_depth_image(self): """Read a color and depth image from the device. """ frames = self._pipe.wait_for_frames() if self._depth_align: frames = self._align.process(frames) depth_frame = frames.get_depth_frame() color_frame = frames.get_color_frame() if not depth_frame or not color_frame: logging.warning('Could not retrieve frames.') return None, None if self._filter_depth: depth_frame = self._filter_depth_frame(depth_frame) # convert to numpy arrays depth_image = self._to_numpy(depth_frame, np.float32) color_image = self._to_numpy(color_frame, np.uint8) # convert depth to meters depth_image *= self._depth_scale # bgr to rgb color_image = color_image[..., ::-1] depth = DepthImage(depth_image, frame=self._frame) color = ColorImage(color_image, frame=self._frame) return color, depth
python
def _read_color_and_depth_image(self): """Read a color and depth image from the device. """ frames = self._pipe.wait_for_frames() if self._depth_align: frames = self._align.process(frames) depth_frame = frames.get_depth_frame() color_frame = frames.get_color_frame() if not depth_frame or not color_frame: logging.warning('Could not retrieve frames.') return None, None if self._filter_depth: depth_frame = self._filter_depth_frame(depth_frame) # convert to numpy arrays depth_image = self._to_numpy(depth_frame, np.float32) color_image = self._to_numpy(color_frame, np.uint8) # convert depth to meters depth_image *= self._depth_scale # bgr to rgb color_image = color_image[..., ::-1] depth = DepthImage(depth_image, frame=self._frame) color = ColorImage(color_image, frame=self._frame) return color, depth
[ "def", "_read_color_and_depth_image", "(", "self", ")", ":", "frames", "=", "self", ".", "_pipe", ".", "wait_for_frames", "(", ")", "if", "self", ".", "_depth_align", ":", "frames", "=", "self", ".", "_align", ".", "process", "(", "frames", ")", "depth_frame", "=", "frames", ".", "get_depth_frame", "(", ")", "color_frame", "=", "frames", ".", "get_color_frame", "(", ")", "if", "not", "depth_frame", "or", "not", "color_frame", ":", "logging", ".", "warning", "(", "'Could not retrieve frames.'", ")", "return", "None", ",", "None", "if", "self", ".", "_filter_depth", ":", "depth_frame", "=", "self", ".", "_filter_depth_frame", "(", "depth_frame", ")", "# convert to numpy arrays", "depth_image", "=", "self", ".", "_to_numpy", "(", "depth_frame", ",", "np", ".", "float32", ")", "color_image", "=", "self", ".", "_to_numpy", "(", "color_frame", ",", "np", ".", "uint8", ")", "# convert depth to meters", "depth_image", "*=", "self", ".", "_depth_scale", "# bgr to rgb", "color_image", "=", "color_image", "[", "...", ",", ":", ":", "-", "1", "]", "depth", "=", "DepthImage", "(", "depth_image", ",", "frame", "=", "self", ".", "_frame", ")", "color", "=", "ColorImage", "(", "color_image", ",", "frame", "=", "self", ".", "_frame", ")", "return", "color", ",", "depth" ]
Read a color and depth image from the device.
[ "Read", "a", "color", "and", "depth", "image", "from", "the", "device", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/realsense_sensor.py#L200-L229
train
Read a color and depth image from the device.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07D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q9QOaZbhU,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) + chr(0b101000 + 0o11) + chr(0b101001 + 0o11) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(8966 - 8855) + '\x33' + chr(48) + chr(0b0 + 0o64), ord("\x08")), nzTpIcepk0o8(chr(1273 - 1225) + chr(0b1101111) + '\x31' + chr(0b100111 + 0o13) + '\064', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1101 + 0o44) + chr(55) + '\064', 5681 - 5673), nzTpIcepk0o8(chr(1173 - 1125) + chr(5148 - 5037) + '\x32' + chr(54) + chr(1054 - 1006), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(51) + chr(0b110101) + chr(0b110011), 965 - 957), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1304 - 1251) + chr(0b110010 + 0o1), 26697 - 26689), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + chr(0b110101) + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(2375 - 2326) + chr(0b11001 + 0o36) + chr(0b110101), 52298 - 52290), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1101011 + 0o4) + '\061' + chr(0b110011) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000100 + 0o53) + chr(0b110100) + chr(0b11011 + 0o26), 32091 - 32083), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + '\066' + '\x33', 58536 - 58528), nzTpIcepk0o8(chr(365 - 317) + '\157' + chr(956 - 905) + '\061' + chr(0b110111), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110001) + chr(0b110011) + chr(0b11010 + 0o26), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1572 - 1521) + '\x37' + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010 + 0o5) + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(0b100001 + 0o24) + '\061', 0o10), nzTpIcepk0o8(chr(945 - 897) + '\157' + chr(0b11101 + 0o24) + '\x34' + '\x32', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(0b110010), 7676 - 7668), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(111) + chr(2055 - 2006) + '\061' + chr(1028 - 973), 13848 - 13840), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(0b110000) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(111) + chr(0b110010) + '\064' + chr(2281 - 2226), 0o10), nzTpIcepk0o8('\060' + chr(1848 - 1737) + '\x31' + '\066' + chr(0b10011 + 0o40), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(54) + chr(307 - 257), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1713 - 1663), 36546 - 36538), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1394 - 1341) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(1430 - 1382) + chr(0b1100 + 0o143) + '\061' + chr(0b110101) + chr(0b110010), 35146 - 35138), nzTpIcepk0o8('\x30' + chr(7335 - 7224) + chr(0b110010) + chr(0b110010) + chr(0b11100 + 0o33), 27231 - 27223), nzTpIcepk0o8(chr(504 - 456) + chr(111) + chr(474 - 422) + '\061', 8), nzTpIcepk0o8(chr(48) + '\x6f' + '\064' + chr(0b10000 + 0o46), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + '\060' + '\x33', 8), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + '\x37' + '\067', 0o10), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + chr(0b110110) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + chr(53), 14509 - 14501), nzTpIcepk0o8('\060' + chr(0b1001111 + 0o40) + chr(50) + chr(478 - 430) + chr(54), 55107 - 55099), nzTpIcepk0o8('\x30' + '\x6f' + chr(50) + chr(50) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(7031 - 6920) + chr(0b110010) + '\065' + chr(0b100111 + 0o14), 63829 - 63821), nzTpIcepk0o8(chr(48) + chr(0b101110 + 0o101) + chr(0b11101 + 0o25) + '\x36' + '\065', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1199 - 1149) + chr(837 - 784) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + '\x37' + chr(998 - 944), 31062 - 31054)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b101100 + 0o4) + '\157' + '\x35' + '\060', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'~'), chr(5154 - 5054) + chr(0b101011 + 0o72) + chr(0b1000110 + 0o35) + '\157' + chr(100) + chr(0b1001000 + 0o35))(chr(117) + chr(4198 - 4082) + '\146' + chr(0b101101) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def VQ8RDuJtI36N(hXMPsSrOQzbh): G4Lisexwxqjs = hXMPsSrOQzbh._pipe.wait_for_frames() if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'8\xb02\x16\xd4\xd8t\xd4\x08\tH\x82'), chr(0b1100100) + chr(101) + chr(521 - 422) + chr(2579 - 2468) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(1167 - 1122) + chr(56))): G4Lisexwxqjs = hXMPsSrOQzbh._align.conU5pBPX9i7(G4Lisexwxqjs) txFmOz6OR7xu = G4Lisexwxqjs.get_depth_frame() lHC0OL5_NP7g = G4Lisexwxqjs.get_color_frame() if not txFmOz6OR7xu or not lHC0OL5_NP7g: roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b"'\xa5&\x12\xd9\x85L"), '\x64' + chr(3958 - 3857) + chr(99) + chr(0b11110 + 0o121) + '\x64' + chr(0b1100101))('\x75' + chr(116) + chr(102) + chr(1260 - 1215) + chr(3001 - 2945)))(roI3spqORKae(ES5oEprVxulp(b'\x13\xab!\x10\xd4\xcbE\xc3\t~S\xd6\xbb*\x93Z\x9f\x07*)\xf1\xc6\x1e\x97q\x06'), chr(100) + chr(0b1100101) + chr(0b1001000 + 0o33) + chr(0b110001 + 0o76) + '\x64' + '\x65')(chr(0b1101101 + 0o10) + chr(116) + chr(102) + '\055' + chr(730 - 674))) return (None, None) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x0f\xa2=\x10\xc4\x8eY\xf3\x19;Q\xc7\xa7'), '\x64' + chr(0b100110 + 0o77) + chr(2783 - 2684) + chr(0b111111 + 0o60) + chr(7548 - 7448) + chr(0b100101 + 0o100))(chr(0b111100 + 0o71) + '\164' + chr(1295 - 1193) + chr(45) + chr(0b111000 + 0o0))): txFmOz6OR7xu = hXMPsSrOQzbh._filter_depth_frame(txFmOz6OR7xu) eUW2JKqvx8Cg = hXMPsSrOQzbh._to_numpy(txFmOz6OR7xu, nDF4gVNx0u9Q.float32) ba9W_JH418Wl = hXMPsSrOQzbh._to_numpy(lHC0OL5_NP7g, nDF4gVNx0u9Q.uint8) eUW2JKqvx8Cg *= hXMPsSrOQzbh.LTBLk2qHq2Zb ba9W_JH418Wl = ba9W_JH418Wl[..., ::-nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + chr(0b11 + 0o56), 0b1000)] UH0YjwuI_XzX = Ctd7ihpXT1E5(eUW2JKqvx8Cg, frame=hXMPsSrOQzbh.j6C2nrwvuP04) s93qyRHd7l1y = lPn7XfHAFaXG(ba9W_JH418Wl, frame=hXMPsSrOQzbh.j6C2nrwvuP04) return (s93qyRHd7l1y, UH0YjwuI_XzX)
BerkeleyAutomation/perception
perception/webcam_sensor.py
WebcamSensor.start
def start(self): """Start the sensor. """ self._cap = cv2.VideoCapture(self._device_id + cv2.CAP_V4L2) if not self._cap.isOpened(): self._running = False self._cap.release() self._cap = None return False self._cap.set(cv2.CAP_PROP_FRAME_WIDTH, self._camera_intr.width) self._cap.set(cv2.CAP_PROP_FRAME_HEIGHT, self._camera_intr.height) self._running = True # Capture 5 frames to flush webcam sensor for _ in range(5): _ = self.frames() return True
python
def start(self): """Start the sensor. """ self._cap = cv2.VideoCapture(self._device_id + cv2.CAP_V4L2) if not self._cap.isOpened(): self._running = False self._cap.release() self._cap = None return False self._cap.set(cv2.CAP_PROP_FRAME_WIDTH, self._camera_intr.width) self._cap.set(cv2.CAP_PROP_FRAME_HEIGHT, self._camera_intr.height) self._running = True # Capture 5 frames to flush webcam sensor for _ in range(5): _ = self.frames() return True
[ "def", "start", "(", "self", ")", ":", "self", ".", "_cap", "=", "cv2", ".", "VideoCapture", "(", "self", ".", "_device_id", "+", "cv2", ".", "CAP_V4L2", ")", "if", "not", "self", ".", "_cap", ".", "isOpened", "(", ")", ":", "self", ".", "_running", "=", "False", "self", ".", "_cap", ".", "release", "(", ")", "self", ".", "_cap", "=", "None", "return", "False", "self", ".", "_cap", ".", "set", "(", "cv2", ".", "CAP_PROP_FRAME_WIDTH", ",", "self", ".", "_camera_intr", ".", "width", ")", "self", ".", "_cap", ".", "set", "(", "cv2", ".", "CAP_PROP_FRAME_HEIGHT", ",", "self", ".", "_camera_intr", ".", "height", ")", "self", ".", "_running", "=", "True", "# Capture 5 frames to flush webcam sensor", "for", "_", "in", "range", "(", "5", ")", ":", "_", "=", "self", ".", "frames", "(", ")", "return", "True" ]
Start the sensor.
[ "Start", "the", "sensor", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/webcam_sensor.py#L69-L87
train
Start the webcam sensor.
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,TdYHRT1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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(chr(0b110000) + chr(0b1001 + 0o146) + '\x32' + chr(545 - 497) + '\063', 0o10), nzTpIcepk0o8(chr(1006 - 958) + chr(0b1101111) + chr(0b101110 + 0o3) + chr(0b110011) + '\x32', 0o10), nzTpIcepk0o8(chr(48) + chr(0b101101 + 0o102) + chr(51) + '\x33' + chr(0b110011), 3742 - 3734), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(1334 - 1279) + '\066', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(997 - 947) + '\x35' + '\064', ord("\x08")), nzTpIcepk0o8(chr(2100 - 2052) + '\157' + '\x31' + chr(49) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2268 - 2217) + chr(1387 - 1338) + chr(0b100 + 0o60), 0b1000), nzTpIcepk0o8(chr(351 - 303) + chr(11350 - 11239) + chr(49) + chr(0b11011 + 0o31) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1011 + 0o47) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(6252 - 6141) + '\x31' + '\x32' + chr(54), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110010) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(946 - 898) + chr(0b100 + 0o153) + chr(51) + '\063' + chr(0b101 + 0o57), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31' + chr(48) + chr(0b101001 + 0o10), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(52) + chr(0b110000 + 0o6), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(4300 - 4189) + chr(0b110001) + chr(0b100010 + 0o23) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + chr(2251 - 2196) + chr(0b110000), 12435 - 12427), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + chr(54) + chr(0b11011 + 0o26), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b10111 + 0o32) + '\064' + chr(0b10111 + 0o32), ord("\x08")), nzTpIcepk0o8(chr(260 - 212) + '\157' + chr(0b110011) + '\065', 43737 - 43729), nzTpIcepk0o8('\060' + '\157' + chr(0b110100) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(2118 - 2070) + chr(2112 - 2001) + '\063' + chr(55) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1101111) + chr(0b110011) + chr(0b100000 + 0o26) + chr(98 - 46), 35277 - 35269), nzTpIcepk0o8('\060' + '\x6f' + chr(537 - 488) + chr(0b110000) + chr(53), 0b1000), nzTpIcepk0o8(chr(1745 - 1697) + chr(0b100101 + 0o112) + '\x36' + '\x32', 0b1000), nzTpIcepk0o8(chr(1604 - 1556) + chr(0b1101111) + chr(1361 - 1310) + chr(55) + '\067', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(1527 - 1476) + chr(2177 - 2128) + chr(0b11 + 0o64), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(0b110101) + chr(0b101011 + 0o11), 8), nzTpIcepk0o8('\x30' + chr(0b1001101 + 0o42) + chr(0b110001) + '\065' + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(54) + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + '\061' + '\x35', 25402 - 25394), nzTpIcepk0o8('\060' + chr(111) + chr(49) + chr(526 - 478) + chr(2318 - 2269), 8), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(50) + chr(0b10 + 0o60), 27673 - 27665), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b1101111) + '\x31' + chr(0b110010), 51989 - 51981), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + chr(2401 - 2352) + chr(0b1101 + 0o44), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(0b11111 + 0o26) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1001101 + 0o42) + chr(1329 - 1280) + chr(0b110010) + chr(49), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(514 - 464) + chr(49), 52434 - 52426), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(50) + '\063', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101100 + 0o3) + chr(0b110010) + '\065' + chr(0b100101 + 0o15), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(0b110101), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b1101111 + 0o0) + '\065' + chr(445 - 397), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xad'), '\x64' + chr(2007 - 1906) + chr(2745 - 2646) + chr(0b1101111) + '\x64' + chr(1136 - 1035))(chr(0b1001001 + 0o54) + chr(0b1110100) + chr(0b1010000 + 0o26) + '\055' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def KQbHFTcl_LKy(hXMPsSrOQzbh): hXMPsSrOQzbh.kUclQpA9C2Qq = EpB3PnRz6N5d.VideoCapture(hXMPsSrOQzbh._device_id + EpB3PnRz6N5d.CAP_V4L2) if not roI3spqORKae(hXMPsSrOQzbh._cap, roI3spqORKae(ES5oEprVxulp(b'\xea)\x94\x8e\xc9"\xa9\x07'), chr(0b1100100) + chr(7088 - 6987) + chr(0b1100011) + chr(11048 - 10937) + chr(100) + '\x65')(chr(0b101 + 0o160) + '\164' + '\146' + chr(0b101101) + chr(0b111000)))(): hXMPsSrOQzbh.IF4G0B37piRc = nzTpIcepk0o8(chr(48) + chr(111) + '\x30', 0o10) roI3spqORKae(hXMPsSrOQzbh._cap, roI3spqORKae(ES5oEprVxulp(b'\xe2\x0f\x93\x94\x99\x0e\xa7!qo[\x92'), chr(1981 - 1881) + '\145' + chr(3221 - 3122) + '\157' + chr(100) + chr(0b111010 + 0o53))(chr(0b11100 + 0o131) + '\164' + chr(102) + chr(861 - 816) + '\x38'))() hXMPsSrOQzbh.kUclQpA9C2Qq = None return nzTpIcepk0o8(chr(1632 - 1584) + chr(111) + chr(48), 8) roI3spqORKae(hXMPsSrOQzbh._cap, roI3spqORKae(ES5oEprVxulp(b'\xc1,\xb2\xc9\x9d"\x82\x1af:e\x93'), chr(100) + chr(0b110101 + 0o60) + '\x63' + chr(0b1011111 + 0o20) + chr(7236 - 7136) + '\145')(chr(7599 - 7482) + chr(11707 - 11591) + '\146' + chr(1665 - 1620) + '\070'))(roI3spqORKae(EpB3PnRz6N5d, roI3spqORKae(ES5oEprVxulp(b'\xc0\x1b\x8b\xa1\xfc\x1e\x833O\x10F\x9d\x0c#0o\xb8%Il'), chr(100) + '\145' + chr(99) + '\157' + chr(7096 - 6996) + chr(101))('\x75' + chr(0b1111 + 0o145) + chr(431 - 329) + chr(45) + chr(0b110110 + 0o2))), roI3spqORKae(hXMPsSrOQzbh._camera_intr, roI3spqORKae(ES5oEprVxulp(b'\xe7\x12\xe8\x88\xcf\x07\xa8\x15w\x14a\xec'), chr(1826 - 1726) + '\145' + chr(0b101 + 0o136) + '\x6f' + chr(3530 - 3430) + chr(0b111010 + 0o53))(chr(0b1110101) + chr(0b1011001 + 0o33) + chr(9356 - 9254) + '\055' + chr(2787 - 2731)))) roI3spqORKae(hXMPsSrOQzbh._cap, roI3spqORKae(ES5oEprVxulp(b'\xc1,\xb2\xc9\x9d"\x82\x1af:e\x93'), '\144' + chr(0b11111 + 0o106) + chr(9341 - 9242) + chr(0b101011 + 0o104) + '\x64' + chr(0b11101 + 0o110))(chr(117) + chr(116) + chr(5321 - 5219) + chr(0b100000 + 0o15) + chr(765 - 709)))(roI3spqORKae(EpB3PnRz6N5d, roI3spqORKae(ES5oEprVxulp(b'\xc0\x1b\x8b\xa1\xfc\x1e\x833O\x10F\x9d\x0c#0p\xb4(Zl\xac'), chr(0b100101 + 0o77) + '\x65' + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(0b11100 + 0o111))('\x75' + chr(116) + chr(102) + '\x2d' + chr(56))), roI3spqORKae(hXMPsSrOQzbh._camera_intr, roI3spqORKae(ES5oEprVxulp(b'\xd3;\x9e\xbc\xc19\xa2ZZfM\x96'), chr(0b111011 + 0o51) + chr(0b101101 + 0o70) + chr(99) + chr(8116 - 8005) + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b1110100) + '\x66' + chr(45) + chr(0b111000)))) hXMPsSrOQzbh.IF4G0B37piRc = nzTpIcepk0o8('\x30' + chr(111) + '\x31', 0o10) for zIqcgNgQ9U6F in bbT2xIe5pzk7(nzTpIcepk0o8('\x30' + '\157' + chr(0b110101), ord("\x08"))): zIqcgNgQ9U6F = hXMPsSrOQzbh.G4Lisexwxqjs() return nzTpIcepk0o8(chr(0b10 + 0o56) + '\x6f' + chr(0b11100 + 0o25), 8)
BerkeleyAutomation/perception
perception/webcam_sensor.py
WebcamSensor.stop
def stop(self): """Stop the sensor. """ # Check that everything is running if not self._running: logging.warning('Webcam not running. Aborting stop') return False if self._cap: self._cap.release() self._cap = None self._running = False return True
python
def stop(self): """Stop the sensor. """ # Check that everything is running if not self._running: logging.warning('Webcam not running. Aborting stop') return False if self._cap: self._cap.release() self._cap = None self._running = False return True
[ "def", "stop", "(", "self", ")", ":", "# Check that everything is running", "if", "not", "self", ".", "_running", ":", "logging", ".", "warning", "(", "'Webcam not running. Aborting stop'", ")", "return", "False", "if", "self", ".", "_cap", ":", "self", ".", "_cap", ".", "release", "(", ")", "self", ".", "_cap", "=", "None", "self", ".", "_running", "=", "False", "return", "True" ]
Stop the sensor.
[ "Stop", "the", "sensor", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/webcam_sensor.py#L89-L102
train
Stop the sensor.
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,Awc2QmWaiV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rGEDF7Tq,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(8669 - 8558) + '\062' + chr(1718 - 1669) + '\060', 20849 - 20841), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + '\063' + chr(0b10010 + 0o44), 17450 - 17442), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(5028 - 4917) + '\063' + chr(0b110011) + chr(53), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b100011 + 0o20) + chr(879 - 825) + chr(0b101011 + 0o14), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(0b101 + 0o61) + chr(0b11000 + 0o37), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + chr(0b110110) + chr(0b1001 + 0o55), 0b1000), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\x6f' + chr(51) + '\065' + '\x37', 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(10631 - 10520) + chr(0b110010) + chr(0b110001) + chr(0b101001 + 0o13), 0b1000), nzTpIcepk0o8('\060' + chr(8035 - 7924) + '\063' + chr(51) + chr(0b110101), 8), nzTpIcepk0o8(chr(178 - 130) + chr(5845 - 5734) + chr(50) + chr(1544 - 1490) + '\x35', ord("\x08")), nzTpIcepk0o8(chr(1504 - 1456) + chr(0b1101111) + '\063' + chr(972 - 922) + '\x36', 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\157' + chr(0b11 + 0o56) + chr(2657 - 2604) + '\065', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(54) + chr(0b1101 + 0o52), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(1609 - 1560), 0b1000), nzTpIcepk0o8(chr(395 - 347) + chr(111) + '\062' + chr(1660 - 1608) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(10398 - 10287) + chr(0b110011) + '\x36' + '\064', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010 + 0o145) + chr(0b101101 + 0o6) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + chr(11412 - 11301) + chr(50) + '\x35', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11100 + 0o27) + chr(53) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1001010 + 0o45) + chr(0b100000 + 0o22) + chr(49) + chr(2343 - 2290), 41751 - 41743), nzTpIcepk0o8(chr(990 - 942) + chr(0b1101111) + chr(0b1101 + 0o46) + chr(51) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(2299 - 2188) + chr(0b110011) + '\064' + '\067', 12242 - 12234), nzTpIcepk0o8('\x30' + chr(0b11 + 0o154) + chr(0b110001) + chr(0b110001) + chr(829 - 778), ord("\x08")), nzTpIcepk0o8(chr(1331 - 1283) + chr(0b1101111) + chr(1898 - 1847) + chr(1540 - 1486) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1000110 + 0o51) + chr(49) + chr(2086 - 2038) + chr(0b1111 + 0o50), 7435 - 7427), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110111) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(0b110101) + chr(0b11010 + 0o34), 8), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\x6f' + chr(0b100111 + 0o13) + '\060' + chr(0b1100 + 0o52), 0o10), nzTpIcepk0o8(chr(1411 - 1363) + chr(111) + chr(0b101101 + 0o6) + '\x32' + chr(630 - 582), 14592 - 14584), nzTpIcepk0o8('\x30' + '\157' + chr(0b10010 + 0o41) + chr(0b110111) + '\064', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101101 + 0o10), ord("\x08")), nzTpIcepk0o8(chr(1265 - 1217) + chr(111) + chr(2331 - 2281) + chr(0b110001) + chr(0b110111), 28752 - 28744), nzTpIcepk0o8('\x30' + '\157' + chr(0b110000 + 0o1) + chr(1254 - 1200) + '\x35', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + chr(1219 - 1164) + chr(925 - 871), 37003 - 36995), nzTpIcepk0o8('\060' + chr(111) + chr(0b101111 + 0o3) + chr(0b110011) + '\060', 0o10), nzTpIcepk0o8(chr(2228 - 2180) + chr(111) + chr(51) + '\x32' + chr(48), 8), nzTpIcepk0o8(chr(48) + chr(5765 - 5654) + chr(0b110001) + chr(52) + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b101 + 0o54) + chr(54) + '\x35', 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(2274 - 2222) + '\060', 0b1000), nzTpIcepk0o8('\x30' + chr(0b100100 + 0o113) + '\063' + chr(0b10110 + 0o41), 11446 - 11438)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1001011 + 0o44) + chr(2272 - 2219) + chr(0b110000), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa6'), chr(100) + chr(5394 - 5293) + chr(5054 - 4955) + chr(10424 - 10313) + chr(5716 - 5616) + chr(101))(chr(0b1000011 + 0o62) + chr(0b1010011 + 0o41) + chr(3216 - 3114) + '\055' + chr(1859 - 1803)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def dYJbBiYO_nGE(hXMPsSrOQzbh): if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xc1X\xe9\xb0G\xb4\xdc\xbb\xad\xdc\x84\x0e'), '\144' + chr(0b1100101) + chr(99) + chr(0b11011 + 0o124) + chr(3811 - 3711) + chr(101))('\165' + chr(8524 - 8408) + '\146' + chr(0b101101) + '\x38')): roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'\xff\x7f\xaf\x99\x1e\x98\x88'), '\x64' + chr(101) + chr(0b1100011) + chr(111) + chr(0b1011111 + 0o5) + chr(0b1001010 + 0o33))(chr(0b1110101) + chr(0b100 + 0o160) + chr(8634 - 8532) + '\x2d' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\xdf{\xbf\x94\x16\x9b\xcf\xe2\xb2\xc1\xf6\x1f\x82o\xc9\x9dtr\xc0\xad\x9f\x85$\x803Q\x80\xe1\xf0\x8fq\xe0\x05'), chr(5306 - 5206) + '\145' + chr(4713 - 4614) + chr(11390 - 11279) + '\x64' + '\145')(chr(9521 - 9404) + chr(0b1110100) + chr(102) + chr(162 - 117) + chr(0b10100 + 0o44))) return nzTpIcepk0o8(chr(1023 - 975) + '\x6f' + chr(934 - 886), 0b1000) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe3K\xbe\x9b&\x86\xae\xb5\x9e\x87\x87\x1c'), chr(8632 - 8532) + chr(2929 - 2828) + '\x63' + chr(0b1011010 + 0o25) + chr(100) + chr(0b111100 + 0o51))(chr(0b1110101) + chr(116) + '\x66' + chr(0b101101) + chr(2989 - 2933))): roI3spqORKae(hXMPsSrOQzbh._cap, roI3spqORKae(ES5oEprVxulp(b'\xe9K\x95\x9dB\xb4\x84\xce\xbc\x8c\x99#'), chr(100) + '\145' + chr(0b1100011) + chr(0b1101111) + chr(0b101 + 0o137) + '\x65')(chr(0b1000110 + 0o57) + chr(0b1010101 + 0o37) + chr(0b1010101 + 0o21) + '\x2d' + '\x38'))() hXMPsSrOQzbh.kUclQpA9C2Qq = None hXMPsSrOQzbh.IF4G0B37piRc = nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b10010 + 0o36), 8) return nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49), 8)
BerkeleyAutomation/perception
perception/webcam_sensor.py
WebcamSensor.frames
def frames(self, most_recent=False): """Retrieve a new frame from the PhoXi and convert it to a ColorImage, a DepthImage, and an IrImage. Parameters ---------- most_recent: bool If true, the OpenCV buffer is emptied for the webcam before reading the most recent frame. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame. """ if most_recent: for i in xrange(4): self._cap.grab() for i in range(1): if self._adjust_exposure: try: command = 'v4l2-ctl -d /dev/video{} -c exposure_auto=1 -c exposure_auto_priority=0 -c exposure_absolute=100 -c saturation=60 -c gain=140'.format(self._device_id) FNULL = open(os.devnull, 'w') subprocess.call(shlex.split(command), stdout=FNULL, stderr=subprocess.STDOUT) except: pass ret, frame = self._cap.read() rgb_data = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) return ColorImage(rgb_data, frame=self._frame), None, None
python
def frames(self, most_recent=False): """Retrieve a new frame from the PhoXi and convert it to a ColorImage, a DepthImage, and an IrImage. Parameters ---------- most_recent: bool If true, the OpenCV buffer is emptied for the webcam before reading the most recent frame. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame. """ if most_recent: for i in xrange(4): self._cap.grab() for i in range(1): if self._adjust_exposure: try: command = 'v4l2-ctl -d /dev/video{} -c exposure_auto=1 -c exposure_auto_priority=0 -c exposure_absolute=100 -c saturation=60 -c gain=140'.format(self._device_id) FNULL = open(os.devnull, 'w') subprocess.call(shlex.split(command), stdout=FNULL, stderr=subprocess.STDOUT) except: pass ret, frame = self._cap.read() rgb_data = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB) return ColorImage(rgb_data, frame=self._frame), None, None
[ "def", "frames", "(", "self", ",", "most_recent", "=", "False", ")", ":", "if", "most_recent", ":", "for", "i", "in", "xrange", "(", "4", ")", ":", "self", ".", "_cap", ".", "grab", "(", ")", "for", "i", "in", "range", "(", "1", ")", ":", "if", "self", ".", "_adjust_exposure", ":", "try", ":", "command", "=", "'v4l2-ctl -d /dev/video{} -c exposure_auto=1 -c exposure_auto_priority=0 -c exposure_absolute=100 -c saturation=60 -c gain=140'", ".", "format", "(", "self", ".", "_device_id", ")", "FNULL", "=", "open", "(", "os", ".", "devnull", ",", "'w'", ")", "subprocess", ".", "call", "(", "shlex", ".", "split", "(", "command", ")", ",", "stdout", "=", "FNULL", ",", "stderr", "=", "subprocess", ".", "STDOUT", ")", "except", ":", "pass", "ret", ",", "frame", "=", "self", ".", "_cap", ".", "read", "(", ")", "rgb_data", "=", "cv2", ".", "cvtColor", "(", "frame", ",", "cv2", ".", "COLOR_BGR2RGB", ")", "return", "ColorImage", "(", "rgb_data", ",", "frame", "=", "self", ".", "_frame", ")", ",", "None", ",", "None" ]
Retrieve a new frame from the PhoXi and convert it to a ColorImage, a DepthImage, and an IrImage. Parameters ---------- most_recent: bool If true, the OpenCV buffer is emptied for the webcam before reading the most recent frame. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame.
[ "Retrieve", "a", "new", "frame", "from", "the", "PhoXi", "and", "convert", "it", "to", "a", "ColorImage", "a", "DepthImage", "and", "an", "IrImage", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/webcam_sensor.py#L104-L132
train
Retrieve a new frame from the PhoXi and convert it to a ColorImage DepthImage and IrImage.
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,K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aYV6U2,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(0b110111) + '\063', 38520 - 38512), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\x6f' + chr(0b1000 + 0o51) + '\060' + chr(764 - 713), 19197 - 19189), nzTpIcepk0o8('\060' + chr(0b110100 + 0o73) + chr(50) + '\x32' + chr(55), 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1001010 + 0o45) + chr(0b1010 + 0o51) + chr(335 - 283) + '\x30', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(0b110101) + '\066', 40010 - 40002), nzTpIcepk0o8(chr(1635 - 1587) + '\x6f' + chr(0b101 + 0o54) + '\x34' + '\067', ord("\x08")), nzTpIcepk0o8('\060' + chr(9765 - 9654) + '\x32' + chr(0b110001) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\x33' + '\067' + chr(120 - 67), 0o10), nzTpIcepk0o8('\x30' + chr(7244 - 7133) + chr(0b110001) + chr(1837 - 1787) + chr(1350 - 1298), 5587 - 5579), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110010) + '\x34' + chr(0b1010 + 0o47), 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110011) + chr(0b110100 + 0o0), 0b1000), nzTpIcepk0o8(chr(48) + chr(4498 - 4387) + chr(0b110001) + chr(0b110111) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(6851 - 6740) + '\x36' + chr(1110 - 1061), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x33' + '\064' + chr(2247 - 2197), 0o10), nzTpIcepk0o8('\060' + chr(0b111011 + 0o64) + chr(0b100101 + 0o17) + chr(2337 - 2282), 58805 - 58797), nzTpIcepk0o8(chr(715 - 667) + chr(0b1101111) + chr(1982 - 1933) + chr(54) + chr(48), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(0b100001 + 0o17), 10090 - 10082), nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(135 - 24) + chr(0b100110 + 0o14) + chr(1307 - 1255) + chr(0b110000 + 0o7), 61768 - 61760), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(111) + '\x37' + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b101010 + 0o105) + '\061' + '\064' + '\x35', 45770 - 45762), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + chr(0b110011) + chr(0b10110 + 0o40) + '\061', 32072 - 32064), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + chr(2291 - 2239), 8), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\157' + chr(1870 - 1821) + '\x34' + chr(0b110100), 22914 - 22906), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101110 + 0o4) + '\063' + chr(0b110110), 35439 - 35431), nzTpIcepk0o8(chr(48) + chr(8211 - 8100) + chr(51) + chr(51) + chr(1994 - 1941), 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(10676 - 10565) + chr(0b1 + 0o65) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(1355 - 1307) + chr(111) + '\x31' + '\x37' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(2678 - 2567) + chr(49) + chr(53) + chr(0b110111), 1834 - 1826), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\157' + '\x32' + '\x36' + chr(53), 0o10), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(11067 - 10956) + '\x33' + chr(0b110111) + '\063', 13701 - 13693), nzTpIcepk0o8('\060' + chr(0b1100000 + 0o17) + chr(50) + '\063' + chr(0b110 + 0o57), 4970 - 4962), nzTpIcepk0o8('\060' + '\x6f' + '\062' + chr(606 - 558) + chr(0b1101 + 0o47), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(50) + chr(0b110010) + chr(1035 - 984), 24078 - 24070), nzTpIcepk0o8('\060' + chr(111) + chr(0b110101) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011 + 0o0) + chr(54) + '\061', 8), nzTpIcepk0o8('\060' + chr(727 - 616) + chr(0b10000 + 0o43) + chr(0b10110 + 0o34) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + chr(0b110011) + chr(0b11111 + 0o25), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1811 - 1762) + '\x32' + chr(0b1111 + 0o46), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(1752 - 1703) + '\060', 0o10), nzTpIcepk0o8(chr(209 - 161) + '\x6f' + chr(1918 - 1869) + chr(0b11101 + 0o32) + '\062', 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1023 - 970) + chr(48), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x15'), chr(2546 - 2446) + '\145' + chr(5173 - 5074) + '\x6f' + chr(0b1100100) + chr(101))(chr(0b0 + 0o165) + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(2461 - 2405)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def G4Lisexwxqjs(hXMPsSrOQzbh, vsRa3pZslVc6=nzTpIcepk0o8('\x30' + chr(1961 - 1850) + chr(48), ord("\x08"))): if vsRa3pZslVc6: for ZlbFMSG8gCoF in zBiXJ6gPq38D(nzTpIcepk0o8('\x30' + chr(4665 - 4554) + chr(52), 0b1000)): roI3spqORKae(hXMPsSrOQzbh._cap, roI3spqORKae(ES5oEprVxulp(b'\\1\xf6\x82'), chr(0b110 + 0o136) + chr(101) + '\x63' + '\x6f' + chr(0b100011 + 0o101) + chr(0b1100101))(chr(0b1000111 + 0o56) + chr(116) + '\146' + chr(0b100001 + 0o14) + chr(56)))() for ZlbFMSG8gCoF in bbT2xIe5pzk7(nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1011100 + 0o23) + '\x31', 0o10)): if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'd"\xf3\x8a\xdb\x14\xf9\xa21\xd9l\x13B\x97U\x15'), chr(0b1000000 + 0o44) + chr(101) + '\x63' + chr(8889 - 8778) + '\x64' + chr(0b1100000 + 0o5))(chr(0b1010001 + 0o44) + '\164' + chr(102) + '\055' + '\070')): try: rZO0j44B8n0L = roI3spqORKae(ES5oEprVxulp(b'Mw\xfb\xd2\x83\x04\xf9\x91t\x8cx\\\x1e\x86B\x06?\xd1Q\x01\x94s\x1f\xe3\xfd\x1e\x19O\xd0\x83\xed\xeb\xe0Y\x83\xb1C4\xbd\x0eT~\xa6\xc0\x83\x04\xad\x98,\xd1s\x0fD\x90B/q\xd2L\n\xael\x16\xf7\xb2A\x13\x1b\xcc\xc6\xad\xa4\xbeO\xd1\xb1d%\xa7\tN1\xf2\xbf\xcf\x05\xfe\x928\xd4h\x19\x0c\xd3\x17@0\x8a[E\x82}\x10\xeb\xafR\x0e\x06\xda\x95\xa0\xb2\xa3\x0c\xdc\xb7<2\xa9\x13U~\xa6\xd4\x9e'), chr(7873 - 7773) + chr(0b1100101) + chr(0b1100011) + chr(0b1101111) + '\x64' + chr(101))(chr(117) + chr(0b1000001 + 0o63) + '\146' + chr(0b101101) + chr(0b11000 + 0o40)).q33KG3foQ_CJ(hXMPsSrOQzbh._device_id) SFrvnzT57W_C = DnU3Rq9N5ala(aHUqKstZLeS6.devnull, roI3spqORKae(ES5oEprVxulp(b'L'), chr(0b1100100) + chr(0b1000 + 0o135) + '\x63' + chr(0b110110 + 0o71) + chr(5795 - 5695) + '\x65')('\165' + chr(0b1110100) + chr(102) + chr(0b101101) + chr(1494 - 1438))) roI3spqORKae(eT8Y087E_kfd, roI3spqORKae(ES5oEprVxulp(b'Xt\xa1\xb9\xc8S\xbd\xacb\xecy1'), '\144' + '\145' + chr(99) + chr(0b1101111) + chr(1505 - 1405) + chr(0b1100101))('\165' + '\x74' + chr(102) + chr(0b11000 + 0o25) + chr(410 - 354)))(roI3spqORKae(YmpY_6W7YsM_, roI3spqORKae(ES5oEprVxulp(b'w%\xc5\x92\xff(\xf5\x88\x10\xd7r?'), chr(0b1100100) + chr(0b1100101) + '\143' + chr(5118 - 5007) + '\x64' + chr(904 - 803))(chr(6857 - 6740) + chr(2922 - 2806) + '\x66' + chr(45) + chr(1307 - 1251)))(rZO0j44B8n0L), stdout=SFrvnzT57W_C, stderr=roI3spqORKae(eT8Y087E_kfd, roI3spqORKae(ES5oEprVxulp(b'rt\xd5\x81\xebV\xdf\xad$\xcbtK'), '\x64' + '\145' + chr(2963 - 2864) + '\157' + chr(100) + chr(0b1100101))(chr(0b1010000 + 0o45) + chr(0b1110100) + chr(3536 - 3434) + chr(0b11110 + 0o17) + '\070'))) except UtiWT6f6p9yZ: pass (PvvMx4JvMX6J, KZ4ew2qs1HTO) = hXMPsSrOQzbh._cap.eoXknH7XUn7m() rhL7rADO2Wlj = EpB3PnRz6N5d.cvtColor(KZ4ew2qs1HTO, EpB3PnRz6N5d.COLOR_BGR2RGB) return (lPn7XfHAFaXG(rhL7rADO2Wlj, frame=roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'Qu\xd4\xd2\xc0\x15\xfa\x8b!\xf1,H'), chr(0b1100100) + chr(0b101001 + 0o74) + chr(0b1100011) + chr(0b111000 + 0o67) + chr(0b101111 + 0o65) + '\x65')(chr(5839 - 5722) + chr(116) + chr(3973 - 3871) + chr(846 - 801) + chr(56)))), None, None)
BerkeleyAutomation/perception
perception/ensenso_sensor.py
EnsensoSensor._set_format
def _set_format(self, msg): """ Set the buffer formatting. """ num_points = msg.height * msg.width self._format = '<' + num_points * 'ffff'
python
def _set_format(self, msg): """ Set the buffer formatting. """ num_points = msg.height * msg.width self._format = '<' + num_points * 'ffff'
[ "def", "_set_format", "(", "self", ",", "msg", ")", ":", "num_points", "=", "msg", ".", "height", "*", "msg", ".", "width", "self", ".", "_format", "=", "'<'", "+", "num_points", "*", "'ffff'" ]
Set the buffer formatting.
[ "Set", "the", "buffer", "formatting", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/ensenso_sensor.py#L42-L45
train
Set the buffer formatting.
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,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Br,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(0b1000010 + 0o55) + chr(277 - 226) + chr(48), 50133 - 50125), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b101000 + 0o107) + chr(222 - 171) + chr(2505 - 2451) + chr(0b1011 + 0o50), 0o10), nzTpIcepk0o8(chr(1497 - 1449) + chr(12117 - 12006) + chr(2001 - 1950) + chr(0b111 + 0o53) + chr(51), 48362 - 48354), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(84 - 32) + chr(0b110110), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(699 - 650) + '\066' + chr(48), 51155 - 51147), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(925 - 871) + chr(0b110111), 62229 - 62221), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1001 + 0o55) + chr(0b110100), 378 - 370), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(3878 - 3767) + '\x31' + '\x34' + '\066', 0b1000), nzTpIcepk0o8('\x30' + chr(2759 - 2648) + chr(0b1010 + 0o47) + '\x36' + chr(0b100000 + 0o27), 33694 - 33686), nzTpIcepk0o8('\x30' + chr(0b10100 + 0o133) + '\067' + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + chr(0b110100) + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(495 - 446) + chr(0b101011 + 0o13) + '\061', 19273 - 19265), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + '\067' + chr(0b110001), 0o10), nzTpIcepk0o8('\060' + '\157' + '\064' + chr(348 - 300), 0b1000), nzTpIcepk0o8(chr(326 - 278) + '\157' + chr(0b100101 + 0o17) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(118 - 70) + '\157' + chr(0b10011 + 0o44) + '\x30', 10499 - 10491), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(4683 - 4572) + chr(0b110001) + chr(0b100011 + 0o20) + chr(50), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100011 + 0o16) + chr(2501 - 2449) + '\x31', 56093 - 56085), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101 + 0o61), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(0b100001 + 0o26) + '\x35', 49319 - 49311), nzTpIcepk0o8('\060' + chr(803 - 692) + chr(0b110111) + chr(0b110010), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(51) + chr(0b100001 + 0o21) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(1417 - 1369) + chr(3461 - 3350) + '\x33' + '\x37' + chr(0b101010 + 0o6), 26005 - 25997), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(1751 - 1640) + chr(0b11110 + 0o27) + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + chr(2008 - 1897) + chr(0b110 + 0o54) + chr(0b110010) + chr(0b1101 + 0o44), 0b1000), nzTpIcepk0o8(chr(77 - 29) + chr(0b1101111) + chr(0b100010 + 0o17) + chr(54) + chr(0b110001), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b110100 + 0o73) + chr(1150 - 1099) + '\x33', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(1369 - 1320) + '\061' + chr(0b11010 + 0o27), 40532 - 40524), nzTpIcepk0o8(chr(48) + chr(111) + chr(1047 - 996) + chr(0b11111 + 0o24) + '\067', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + '\065' + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\157' + chr(50) + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(4237 - 4126) + chr(1864 - 1812) + '\060', 8), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(2937 - 2826) + chr(50) + chr(2121 - 2068) + chr(55), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(729 - 680) + chr(51) + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(1098 - 1048) + chr(2458 - 2407) + chr(0b10100 + 0o37), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(49) + chr(55) + chr(0b1001 + 0o47), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(877 - 825) + chr(0b110000), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(0b110100) + '\067', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(1449 - 1398) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b11011 + 0o124) + chr(0b110001) + '\x30' + '\x37', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(53) + '\x30', 64323 - 64315)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'6'), chr(3183 - 3083) + chr(4056 - 3955) + '\x63' + chr(4272 - 4161) + chr(0b1010000 + 0o24) + chr(0b1100101))(chr(0b1000000 + 0o65) + chr(0b1110100) + chr(0b1100110) + '\055' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def kSRtF7BA3n6T(hXMPsSrOQzbh, sldzbHve8G1S): YK_NPawMwgsX = sldzbHve8G1S.PaEBmun9J0YJ * sldzbHve8G1S.dH3vcKdvgBu0 hXMPsSrOQzbh.aLbSMgDSyX91 = roI3spqORKae(ES5oEprVxulp(b'$'), '\144' + chr(0b1100101) + '\x63' + chr(111) + chr(0b1100100) + '\x65')('\x75' + chr(116) + chr(0b10011 + 0o123) + '\x2d' + chr(0b100000 + 0o30)) + YK_NPawMwgsX * roI3spqORKae(ES5oEprVxulp(b'~\x95\xb5@'), chr(0b100111 + 0o75) + '\x65' + chr(99) + chr(0b1101111) + '\x64' + chr(0b111010 + 0o53))('\x75' + chr(0b1000 + 0o154) + '\x66' + chr(1382 - 1337) + chr(0b111000))
BerkeleyAutomation/perception
perception/ensenso_sensor.py
EnsensoSensor._set_camera_properties
def _set_camera_properties(self, msg): """ Set the camera intrinsics from an info msg. """ focal_x = msg.K[0] focal_y = msg.K[4] center_x = msg.K[2] center_y = msg.K[5] im_height = msg.height im_width = msg.width self._camera_intr = CameraIntrinsics(self._frame, focal_x, focal_y, center_x, center_y, height=im_height, width=im_width)
python
def _set_camera_properties(self, msg): """ Set the camera intrinsics from an info msg. """ focal_x = msg.K[0] focal_y = msg.K[4] center_x = msg.K[2] center_y = msg.K[5] im_height = msg.height im_width = msg.width self._camera_intr = CameraIntrinsics(self._frame, focal_x, focal_y, center_x, center_y, height=im_height, width=im_width)
[ "def", "_set_camera_properties", "(", "self", ",", "msg", ")", ":", "focal_x", "=", "msg", ".", "K", "[", "0", "]", "focal_y", "=", "msg", ".", "K", "[", "4", "]", "center_x", "=", "msg", ".", "K", "[", "2", "]", "center_y", "=", "msg", ".", "K", "[", "5", "]", "im_height", "=", "msg", ".", "height", "im_width", "=", "msg", ".", "width", "self", ".", "_camera_intr", "=", "CameraIntrinsics", "(", "self", ".", "_frame", ",", "focal_x", ",", "focal_y", ",", "center_x", ",", "center_y", ",", "height", "=", "im_height", ",", "width", "=", "im_width", ")" ]
Set the camera intrinsics from an info msg.
[ "Set", "the", "camera", "intrinsics", "from", "an", "info", "msg", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/ensenso_sensor.py#L47-L58
train
Set the camera intrinsics from an info msg.
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,pZ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f1uzpaIUMv,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(0b1000 + 0o50) + '\157' + chr(51) + chr(0b110110) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + chr(1519 - 1471) + '\x32', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(1668 - 1619) + '\064' + chr(55), 15736 - 15728), nzTpIcepk0o8('\x30' + '\157' + chr(2757 - 2702), 0b1000), nzTpIcepk0o8(chr(2152 - 2104) + chr(10837 - 10726) + chr(0b10 + 0o57) + chr(51) + chr(0b110000), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\x33' + chr(0b100000 + 0o20) + chr(2514 - 2459), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(54) + chr(50), 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + '\x6f' + '\062' + '\x35' + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1011110 + 0o21) + '\x31' + chr(796 - 744) + '\067', 8), nzTpIcepk0o8(chr(48) + '\157' + chr(152 - 101) + '\x32' + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(0b110011) + chr(0b100110 + 0o14), 0b1000), nzTpIcepk0o8('\x30' + chr(9692 - 9581) + '\x33' + chr(0b1000 + 0o54), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + chr(51) + '\067' + chr(0b101100 + 0o5), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(0b110001) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x32' + '\x35' + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(49) + chr(450 - 399) + '\060', 8), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\157' + '\062' + '\x31' + '\067', 50788 - 50780), nzTpIcepk0o8(chr(0b110000) + chr(11309 - 11198) + chr(1962 - 1911) + '\x35' + '\x35', 27890 - 27882), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + '\x31' + '\064', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110011 + 0o74) + chr(0b110001) + chr(0b11010 + 0o27) + chr(1055 - 1001), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1001 + 0o146) + chr(0b110011) + chr(54) + '\x37', 8), nzTpIcepk0o8(chr(48) + chr(0b10101 + 0o132) + chr(1883 - 1833) + chr(54) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1111 + 0o140) + '\061' + '\065' + chr(0b10011 + 0o36), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1010001 + 0o36) + chr(0b10011 + 0o37) + chr(0b100101 + 0o21) + chr(420 - 371), 0b1000), nzTpIcepk0o8(chr(293 - 245) + chr(111) + chr(0b110001) + '\063' + '\065', 28388 - 28380), nzTpIcepk0o8(chr(0b110000) + chr(7514 - 7403) + '\061' + '\065' + chr(0b1001 + 0o47), 0o10), nzTpIcepk0o8(chr(625 - 577) + '\x6f' + chr(0b1101 + 0o46) + chr(722 - 667) + '\067', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111 + 0o0) + chr(55) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(0b1101111) + chr(0b11100 + 0o26) + chr(52) + chr(1215 - 1160), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1011111 + 0o20) + chr(1838 - 1787) + chr(50) + '\x32', 6835 - 6827), nzTpIcepk0o8('\x30' + chr(3811 - 3700) + chr(80 - 26) + chr(0b110010 + 0o0), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + '\061', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + '\066' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001) + chr(0b11011 + 0o34) + chr(0b110000), 6255 - 6247), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + chr(0b110100) + chr(53), 4558 - 4550), nzTpIcepk0o8('\060' + chr(1841 - 1730) + chr(0b110001 + 0o2) + '\x34' + chr(50), 0o10), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + '\x32' + chr(0b110110) + chr(0b10110 + 0o34), 8), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(0b101010 + 0o7) + '\x33', 34897 - 34889), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b11011 + 0o26) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1010110 + 0o31) + '\063' + '\x30' + '\x31', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\157' + chr(1650 - 1597) + chr(1477 - 1429), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd9'), chr(7652 - 7552) + chr(101) + chr(0b1100011 + 0o0) + chr(0b101101 + 0o102) + chr(100) + '\x65')(chr(0b1101111 + 0o6) + '\x74' + chr(0b1100110) + chr(0b101101) + chr(1462 - 1406)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def FgA5lv4fSE2Z(hXMPsSrOQzbh, sldzbHve8G1S): OdPUfbEvZWIe = sldzbHve8G1S.K[nzTpIcepk0o8(chr(88 - 40) + chr(111) + '\x30', 31321 - 31313)] I6L_WK0rq27Q = sldzbHve8G1S.K[nzTpIcepk0o8(chr(0b100011 + 0o15) + '\x6f' + chr(0b10011 + 0o41), 42055 - 42047)] pP81H4QihwYm = sldzbHve8G1S.K[nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b100000 + 0o117) + chr(50), 0o10)] dUHDmJ6Y5wqd = sldzbHve8G1S.K[nzTpIcepk0o8(chr(48) + chr(0b1010001 + 0o36) + '\065', 4534 - 4526)] yThR6__gV4Fw = sldzbHve8G1S.PaEBmun9J0YJ SIbWxUnmkU6E = sldzbHve8G1S.dH3vcKdvgBu0 hXMPsSrOQzbh.aAWe9lOFzYOI = LAdEbaMlWUjZ(hXMPsSrOQzbh.j6C2nrwvuP04, OdPUfbEvZWIe, I6L_WK0rq27Q, pP81H4QihwYm, dUHDmJ6Y5wqd, height=yThR6__gV4Fw, width=SIbWxUnmkU6E)
BerkeleyAutomation/perception
perception/ensenso_sensor.py
EnsensoSensor._depth_im_from_pointcloud
def _depth_im_from_pointcloud(self, msg): """ Convert a pointcloud2 message to a depth image. """ # set format if self._format is None: self._set_format(msg) # rescale camera intr in case binning is turned on if msg.height != self._camera_intr.height: rescale_factor = float(msg.height) / self._camera_intr.height self._camera_intr = self._camera_intr.resize(rescale_factor) # read num points num_points = msg.height * msg.width # read buffer raw_tup = struct.Struct(self._format).unpack_from(msg.data, 0) raw_arr = np.array(raw_tup) # subsample depth values and reshape depth_ind = 2 + 4 * np.arange(num_points) depth_buf = raw_arr[depth_ind] depth_arr = depth_buf.reshape(msg.height, msg.width) depth_im = DepthImage(depth_arr, frame=self._frame) return depth_im
python
def _depth_im_from_pointcloud(self, msg): """ Convert a pointcloud2 message to a depth image. """ # set format if self._format is None: self._set_format(msg) # rescale camera intr in case binning is turned on if msg.height != self._camera_intr.height: rescale_factor = float(msg.height) / self._camera_intr.height self._camera_intr = self._camera_intr.resize(rescale_factor) # read num points num_points = msg.height * msg.width # read buffer raw_tup = struct.Struct(self._format).unpack_from(msg.data, 0) raw_arr = np.array(raw_tup) # subsample depth values and reshape depth_ind = 2 + 4 * np.arange(num_points) depth_buf = raw_arr[depth_ind] depth_arr = depth_buf.reshape(msg.height, msg.width) depth_im = DepthImage(depth_arr, frame=self._frame) return depth_im
[ "def", "_depth_im_from_pointcloud", "(", "self", ",", "msg", ")", ":", "# set format", "if", "self", ".", "_format", "is", "None", ":", "self", ".", "_set_format", "(", "msg", ")", "# rescale camera intr in case binning is turned on", "if", "msg", ".", "height", "!=", "self", ".", "_camera_intr", ".", "height", ":", "rescale_factor", "=", "float", "(", "msg", ".", "height", ")", "/", "self", ".", "_camera_intr", ".", "height", "self", ".", "_camera_intr", "=", "self", ".", "_camera_intr", ".", "resize", "(", "rescale_factor", ")", "# read num points", "num_points", "=", "msg", ".", "height", "*", "msg", ".", "width", "# read buffer", "raw_tup", "=", "struct", ".", "Struct", "(", "self", ".", "_format", ")", ".", "unpack_from", "(", "msg", ".", "data", ",", "0", ")", "raw_arr", "=", "np", ".", "array", "(", "raw_tup", ")", "# subsample depth values and reshape", "depth_ind", "=", "2", "+", "4", "*", "np", ".", "arange", "(", "num_points", ")", "depth_buf", "=", "raw_arr", "[", "depth_ind", "]", "depth_arr", "=", "depth_buf", ".", "reshape", "(", "msg", ".", "height", ",", "msg", ".", "width", ")", "depth_im", "=", "DepthImage", "(", "depth_arr", ",", "frame", "=", "self", ".", "_frame", ")", "return", "depth_im" ]
Convert a pointcloud2 message to a depth image.
[ "Convert", "a", "pointcloud2", "message", "to", "a", "depth", "image", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/ensenso_sensor.py#L60-L84
train
Convert a pointcloud2 message to a depth image.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2Sgkz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nJWK64FDT,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' + chr(0b110011) + chr(49) + chr(1786 - 1733), 24151 - 24143), nzTpIcepk0o8('\060' + chr(111) + chr(2079 - 2030) + chr(0b100110 + 0o16) + '\065', 0o10), nzTpIcepk0o8(chr(0b11110 + 0o22) + chr(0b11010 + 0o125) + '\062' + '\062' + chr(0b110000), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\x33' + chr(55) + '\066', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(1385 - 1334) + '\064' + chr(0b10011 + 0o44), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b100001 + 0o24) + chr(2516 - 2464), 0b1000), nzTpIcepk0o8(chr(216 - 168) + '\x6f' + '\061' + '\x35' + chr(0b110110), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(48) + chr(10286 - 10175) + chr(54) + chr(0b110011), 2299 - 2291), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(52) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101100 + 0o3) + chr(55) + chr(0b110010), 4816 - 4808), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x32' + chr(49) + chr(0b100100 + 0o14), 20285 - 20277), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + chr(0b110011) + chr(0b101000 + 0o15), 50475 - 50467), nzTpIcepk0o8(chr(0b110000) + chr(1678 - 1567) + chr(50) + chr(0b110000) + '\x30', 59998 - 59990), nzTpIcepk0o8(chr(48) + chr(0b1001101 + 0o42) + chr(0b101100 + 0o5) + chr(51) + '\x31', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b101001 + 0o10) + '\x32' + chr(171 - 121), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x32' + chr(0b110011) + chr(0b111 + 0o52), 4564 - 4556), nzTpIcepk0o8('\x30' + chr(5150 - 5039) + chr(269 - 218) + chr(49), 16963 - 16955), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + chr(0b101 + 0o56) + chr(1281 - 1232), 13265 - 13257), nzTpIcepk0o8(chr(0b110000) + chr(11551 - 11440) + '\061' + chr(0b110001) + chr(772 - 720), 0o10), nzTpIcepk0o8(chr(48) + chr(6365 - 6254) + chr(0b10011 + 0o37) + '\x34' + '\061', 0b1000), nzTpIcepk0o8(chr(582 - 534) + chr(111) + chr(1598 - 1547) + chr(53) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(1478 - 1430) + chr(0b100000 + 0o117) + chr(0b110001) + '\x33' + chr(0b11011 + 0o26), 8), nzTpIcepk0o8(chr(1605 - 1557) + chr(111) + chr(0b110010) + '\067' + '\x32', 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + '\066', 0b1000), nzTpIcepk0o8(chr(844 - 796) + chr(4862 - 4751) + chr(0b110011) + chr(0b11010 + 0o31) + '\061', 8), nzTpIcepk0o8(chr(48) + chr(4116 - 4005) + chr(0b110001) + chr(914 - 859) + '\x35', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + '\060' + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(572 - 523) + '\x31' + '\064', 8), nzTpIcepk0o8('\x30' + chr(1480 - 1369) + chr(0b110011) + chr(0b110111) + chr(0b110100 + 0o2), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b11101 + 0o24) + chr(50) + '\062', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(0b101100 + 0o10) + chr(146 - 93), 8), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(9522 - 9411) + chr(2309 - 2258) + '\x30' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(54) + chr(0b110101), 42767 - 42759), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + chr(0b110011) + chr(0b1111 + 0o47), 24344 - 24336), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + chr(0b101011 + 0o11) + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + '\x31' + '\x30', 8), nzTpIcepk0o8(chr(0b110000) + chr(5811 - 5700) + '\x33' + chr(0b100000 + 0o24) + '\066', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b10001 + 0o136) + chr(0b110010) + chr(0b11001 + 0o30) + chr(1133 - 1081), 58784 - 58776), nzTpIcepk0o8(chr(1783 - 1735) + chr(111) + chr(0b111 + 0o54) + chr(0b0 + 0o65) + chr(2223 - 2173), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10 + 0o56) + chr(5135 - 5024) + '\065' + chr(1161 - 1113), 25814 - 25806)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe3'), chr(3495 - 3395) + chr(0b110000 + 0o65) + chr(0b1011 + 0o130) + '\157' + chr(0b111010 + 0o52) + '\x65')(chr(0b1101010 + 0o13) + '\164' + chr(102) + '\x2d' + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def muqYbtRPxnip(hXMPsSrOQzbh, sldzbHve8G1S): if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xac)\xf2\xad\xaaK*ZJ\xfd\x03\xb9'), '\144' + chr(101) + '\143' + chr(0b1101111) + '\x64' + chr(0b1100101))(chr(117) + '\x74' + '\146' + '\055' + chr(56))) is None: roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x92\x16\xf5\x8a\xb8J\x01{^\xc4N'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(451 - 340) + chr(100) + chr(4907 - 4806))('\165' + chr(11011 - 10895) + '\146' + '\x2d' + '\x38'))(sldzbHve8G1S) if roI3spqORKae(sldzbHve8G1S, roI3spqORKae(ES5oEprVxulp(b'\x9d\x04\xd5\xbc\x8aY\x000y\x95c\xc2'), '\x64' + '\x65' + chr(9269 - 9170) + '\157' + chr(0b1100100) + chr(101))(chr(0b1000001 + 0o64) + chr(0b1011001 + 0o33) + chr(102) + chr(45) + chr(381 - 325))) != roI3spqORKae(hXMPsSrOQzbh._camera_intr, roI3spqORKae(ES5oEprVxulp(b'\x9d\x04\xd5\xbc\x8aY\x000y\x95c\xc2'), chr(0b1001001 + 0o33) + chr(0b1100101) + '\x63' + chr(111) + chr(0b1100100) + '\145')(chr(0b1110101) + '\164' + chr(0b1100110) + chr(0b10110 + 0o27) + chr(0b111000))): X92wbDjUaF3k = jLW6pRf2DSRk(sldzbHve8G1S.PaEBmun9J0YJ) / hXMPsSrOQzbh._camera_intr.PaEBmun9J0YJ hXMPsSrOQzbh.aAWe9lOFzYOI = hXMPsSrOQzbh._camera_intr.resize(X92wbDjUaF3k) YK_NPawMwgsX = sldzbHve8G1S.PaEBmun9J0YJ * sldzbHve8G1S.dH3vcKdvgBu0 E6ihPhG4s1e_ = Mf7j_LCOrq1d.Struct(hXMPsSrOQzbh._format).unpack_from(sldzbHve8G1S.FfKOThdpoDTb, nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(6048 - 5937) + chr(1557 - 1509), 0b1000)) zHCX6npastse = nDF4gVNx0u9Q.Tn6rGr7XTM7t(E6ihPhG4s1e_) FLWt5saliOHI = nzTpIcepk0o8(chr(0b110000 + 0o0) + '\x6f' + chr(0b110010), 0o10) + nzTpIcepk0o8(chr(0b110000) + chr(544 - 433) + chr(0b1110 + 0o46), ord("\x08")) * nDF4gVNx0u9Q.chmI_GMU_sEi(YK_NPawMwgsX) bYwrQpmSAxuU = zHCX6npastse[FLWt5saliOHI] TVbBDDWO3SdS = bYwrQpmSAxuU.reshape(sldzbHve8G1S.PaEBmun9J0YJ, sldzbHve8G1S.dH3vcKdvgBu0) WZcCXRnThfxU = Ctd7ihpXT1E5(TVbBDDWO3SdS, frame=hXMPsSrOQzbh.j6C2nrwvuP04) return WZcCXRnThfxU
BerkeleyAutomation/perception
perception/ensenso_sensor.py
EnsensoSensor.start
def start(self): """ Start the sensor """ # initialize subscribers self._pointcloud_sub = rospy.Subscriber('/%s/depth/points' %(self.frame), PointCloud2, self._pointcloud_callback) self._camera_info_sub = rospy.Subscriber('/%s/left/camera_info' %(self.frame), CameraInfo, self._camera_info_callback) while self._camera_intr is None: time.sleep(0.1) self._running = True
python
def start(self): """ Start the sensor """ # initialize subscribers self._pointcloud_sub = rospy.Subscriber('/%s/depth/points' %(self.frame), PointCloud2, self._pointcloud_callback) self._camera_info_sub = rospy.Subscriber('/%s/left/camera_info' %(self.frame), CameraInfo, self._camera_info_callback) while self._camera_intr is None: time.sleep(0.1) self._running = True
[ "def", "start", "(", "self", ")", ":", "# initialize subscribers", "self", ".", "_pointcloud_sub", "=", "rospy", ".", "Subscriber", "(", "'/%s/depth/points'", "%", "(", "self", ".", "frame", ")", ",", "PointCloud2", ",", "self", ".", "_pointcloud_callback", ")", "self", ".", "_camera_info_sub", "=", "rospy", ".", "Subscriber", "(", "'/%s/left/camera_info'", "%", "(", "self", ".", "frame", ")", ",", "CameraInfo", ",", "self", ".", "_camera_info_callback", ")", "while", "self", ".", "_camera_intr", "is", "None", ":", "time", ".", "sleep", "(", "0.1", ")", "self", ".", "_running", "=", "True" ]
Start the sensor
[ "Start", "the", "sensor" ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/ensenso_sensor.py#L113-L122
train
Start the sensor
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,VwkB9reRDyd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TXOd5N96r1,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(11096 - 10985) + chr(0b110011) + '\x36' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + '\x35' + chr(1434 - 1386), 45836 - 45828), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2424 - 2370) + chr(53), 25991 - 25983), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(1246 - 1196) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(1410 - 1362) + chr(111) + chr(51) + '\x33' + '\x37', 40706 - 40698), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(11960 - 11849) + chr(1984 - 1934) + chr(0b100100 + 0o15), 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + '\x6f' + chr(51) + '\064' + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1010010 + 0o35) + '\061' + '\062' + '\062', ord("\x08")), nzTpIcepk0o8(chr(379 - 331) + '\157' + chr(0b10010 + 0o37) + '\x35' + chr(53), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + '\065' + chr(871 - 823), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(49) + '\061', 0b1000), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(111) + chr(0b1010 + 0o51) + '\066' + chr(0b11011 + 0o30), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(49) + chr(55), 45399 - 45391), nzTpIcepk0o8('\x30' + chr(0b1010001 + 0o36) + chr(0b110001) + chr(0b1001 + 0o51) + chr(2015 - 1966), 0o10), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b101011 + 0o104) + chr(51) + chr(0b110001) + chr(49), 8), nzTpIcepk0o8('\x30' + chr(0b111100 + 0o63) + chr(51) + chr(0b11000 + 0o30) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b10000 + 0o137) + '\061' + chr(2281 - 2229) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(874 - 826) + chr(2843 - 2732) + chr(50) + '\x34' + '\x34', 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(5776 - 5665) + '\x32' + chr(0b101011 + 0o10) + chr(1295 - 1245), 0b1000), nzTpIcepk0o8('\x30' + chr(5481 - 5370) + chr(0b110001 + 0o2) + '\x34' + chr(0b1101 + 0o45), 58706 - 58698), nzTpIcepk0o8(chr(748 - 700) + '\x6f' + '\063' + '\x36' + chr(0b10 + 0o61), 8), nzTpIcepk0o8('\x30' + chr(0b1101000 + 0o7) + chr(0b110001 + 0o2) + chr(1941 - 1892) + chr(0b110101), 53318 - 53310), nzTpIcepk0o8(chr(0b110000) + chr(0b101101 + 0o102) + chr(0b110001) + chr(340 - 290) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100111 + 0o110) + chr(111 - 60) + chr(2231 - 2182) + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + '\x32' + chr(55), 36558 - 36550), nzTpIcepk0o8(chr(2055 - 2007) + '\x6f' + chr(50) + '\063', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\063' + '\x33', 0o10), nzTpIcepk0o8('\060' + chr(0b111110 + 0o61) + chr(0b10100 + 0o35) + chr(55) + chr(0b10100 + 0o37), 0o10), nzTpIcepk0o8('\x30' + chr(0b1011010 + 0o25) + chr(1555 - 1504) + chr(309 - 260) + chr(0b110110 + 0o1), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1010 + 0o47) + chr(48) + chr(0b100 + 0o56), 0b1000), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + chr(0b110001) + '\064' + chr(0b110000), 8), nzTpIcepk0o8(chr(0b10010 + 0o36) + '\x6f' + chr(0b110001) + '\x35' + chr(1790 - 1741), ord("\x08")), nzTpIcepk0o8(chr(1164 - 1116) + '\157' + chr(0b110011) + chr(0b10000 + 0o43), 29228 - 29220), nzTpIcepk0o8(chr(48) + chr(111) + chr(2218 - 2168) + chr(814 - 764) + chr(50), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + '\x37' + chr(0b110100), 34439 - 34431), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(1099 - 1048) + chr(0b100100 + 0o22), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(3587 - 3476) + '\062' + '\x34' + chr(778 - 723), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\066' + '\x32', 3515 - 3507), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + '\062' + chr(54), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(53) + chr(48), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd8'), '\144' + chr(0b1100101) + chr(0b111000 + 0o53) + chr(0b1101111) + chr(0b100110 + 0o76) + chr(0b1010110 + 0o17))(chr(0b1110101) + '\x74' + '\146' + chr(0b101101) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def KQbHFTcl_LKy(hXMPsSrOQzbh): hXMPsSrOQzbh.WJdY44aIopnX = yFQYWmsCnVBN.Subscriber(roI3spqORKae(ES5oEprVxulp(b'\xd9\rF|\xbbt\x96&\x05\x87\xb9\x9c\xa6?\xbd\xb7'), chr(100) + chr(0b101100 + 0o71) + chr(0b1100011) + '\x6f' + chr(100) + chr(101))('\165' + '\164' + chr(0b100010 + 0o104) + '\055' + chr(443 - 387)) % hXMPsSrOQzbh.KZ4ew2qs1HTO, ob8EFhu6cI3r, hXMPsSrOQzbh._pointcloud_callback) hXMPsSrOQzbh.sfZe_PKlRqvj = yFQYWmsCnVBN.Subscriber(roI3spqORKae(ES5oEprVxulp(b'\xd9\rF|\xb3t\x80&B\xcb\xa8\x9e\xaa#\xa8\x9b\t\xca~\xf5'), chr(100) + '\x65' + chr(7057 - 6958) + chr(0b11010 + 0o125) + chr(0b1100100) + chr(0b1001111 + 0o26))('\165' + chr(12633 - 12517) + chr(0b1011000 + 0o16) + chr(1084 - 1039) + '\x38') % hXMPsSrOQzbh.KZ4ew2qs1HTO, d_hSu3G_35tp, hXMPsSrOQzbh._camera_info_callback) while roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x97ib6\xe6}\xa9\x14\x17\xf1\x86\xba'), chr(8681 - 8581) + chr(8215 - 8114) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b1100101))(chr(0b1000101 + 0o60) + '\164' + chr(0b1100110) + chr(45) + chr(0b1100 + 0o54))) is None: roI3spqORKae(oprIvDIRQyCb, roI3spqORKae(ES5oEprVxulp(b'\x85DP6\xaf'), chr(100) + '\145' + chr(0b1010001 + 0o22) + '\157' + '\x64' + chr(0b1100101))(chr(117) + chr(10896 - 10780) + chr(0b1100110) + '\055' + chr(56)))(0.1) hXMPsSrOQzbh.IF4G0B37piRc = nzTpIcepk0o8(chr(147 - 99) + chr(0b1101111) + chr(0b100110 + 0o13), 61396 - 61388)
BerkeleyAutomation/perception
perception/ensenso_sensor.py
EnsensoSensor.stop
def stop(self): """ Stop the sensor """ # check that everything is running if not self._running: logging.warning('Ensenso not running. Aborting stop') return False # stop subs self._pointcloud_sub.unregister() self._camera_info_sub.unregister() self._running = False return True
python
def stop(self): """ Stop the sensor """ # check that everything is running if not self._running: logging.warning('Ensenso not running. Aborting stop') return False # stop subs self._pointcloud_sub.unregister() self._camera_info_sub.unregister() self._running = False return True
[ "def", "stop", "(", "self", ")", ":", "# check that everything is running", "if", "not", "self", ".", "_running", ":", "logging", ".", "warning", "(", "'Ensenso not running. Aborting stop'", ")", "return", "False", "# stop subs", "self", ".", "_pointcloud_sub", ".", "unregister", "(", ")", "self", ".", "_camera_info_sub", ".", "unregister", "(", ")", "self", ".", "_running", "=", "False", "return", "True" ]
Stop the sensor
[ "Stop", "the", "sensor" ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/ensenso_sensor.py#L124-L135
train
Stop the sensor
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,fP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7Tq,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) + '\x6f' + '\063' + chr(0b110001) + chr(0b11010 + 0o26), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\065' + chr(2365 - 2311), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + chr(2798 - 2744) + chr(1433 - 1378), 7053 - 7045), nzTpIcepk0o8('\x30' + chr(111) + '\061' + '\x30' + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(51) + '\065' + chr(0b1100 + 0o53), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(2191 - 2141) + chr(48) + '\064', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(3508 - 3397) + chr(0b110100) + chr(2018 - 1966), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10111 + 0o33) + '\x33' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\065' + chr(51), 0o10), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + chr(50) + '\x35' + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x31' + chr(0b110000 + 0o0) + '\x30', 8), nzTpIcepk0o8(chr(0b110000) + chr(4168 - 4057) + chr(275 - 225) + chr(0b100001 + 0o25) + '\x33', ord("\x08")), nzTpIcepk0o8('\060' + chr(3402 - 3291) + '\x33' + chr(0b100011 + 0o23) + chr(1978 - 1928), ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + '\062' + chr(0b10011 + 0o44) + chr(1068 - 1016), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(942 - 892) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(2254 - 2206) + chr(111) + chr(812 - 761) + '\x34' + chr(0b11000 + 0o30), 0o10), nzTpIcepk0o8(chr(1722 - 1674) + chr(0b1101111) + chr(0b110001) + chr(0b11 + 0o55) + '\066', ord("\x08")), nzTpIcepk0o8(chr(601 - 553) + chr(111) + '\x32' + chr(767 - 715) + '\x30', 0o10), nzTpIcepk0o8(chr(1288 - 1240) + chr(5042 - 4931) + chr(0b101110 + 0o11) + chr(52), 0b1000), nzTpIcepk0o8(chr(1586 - 1538) + '\157' + chr(0b110011) + '\067' + chr(415 - 362), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(1919 - 1864) + '\067', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b10100 + 0o36) + '\x30' + '\062', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + '\x36' + chr(0b101 + 0o53), 47714 - 47706), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31' + chr(0b110011) + '\061', 0o10), nzTpIcepk0o8('\060' + chr(0b1101 + 0o142) + chr(0b0 + 0o65) + chr(0b110011), 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100100 + 0o17) + chr(0b11000 + 0o30) + '\061', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1128 - 1079) + chr(0b110111) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b10000 + 0o137) + chr(0b110110) + chr(0b110000), 54621 - 54613), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(826 - 775) + chr(0b1111 + 0o45) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\x30' + chr(49), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + chr(0b110000) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(54) + '\060', 0o10), nzTpIcepk0o8(chr(48) + chr(8754 - 8643) + '\062' + chr(55) + chr(54), 0b1000), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101111) + '\x33', 47391 - 47383), nzTpIcepk0o8(chr(269 - 221) + chr(9149 - 9038) + '\061' + chr(0b110001) + chr(0b11110 + 0o23), 0o10), nzTpIcepk0o8(chr(2289 - 2241) + '\x6f' + chr(0b1111 + 0o42) + chr(1140 - 1085) + chr(53), 0b1000), nzTpIcepk0o8(chr(1234 - 1186) + '\x6f' + chr(50) + chr(0b110100) + '\x36', 43737 - 43729), nzTpIcepk0o8(chr(0b110000) + chr(8514 - 8403) + chr(127 - 73) + chr(54), 0o10), nzTpIcepk0o8(chr(1747 - 1699) + chr(0b111 + 0o150) + chr(0b11111 + 0o22) + chr(0b110100) + chr(50), 0o10), nzTpIcepk0o8(chr(0b110 + 0o52) + '\157' + chr(1048 - 999) + '\x37' + '\060', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\065' + chr(0b11 + 0o55), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe6'), '\x64' + '\x65' + chr(0b1001011 + 0o30) + chr(0b100011 + 0o114) + '\144' + chr(10030 - 9929))('\165' + '\164' + chr(0b100000 + 0o106) + chr(1514 - 1469) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def dYJbBiYO_nGE(hXMPsSrOQzbh): if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x81h\xc3\x07\xdf\xc6\x17\xaa[\xc1\x12\xd0'), '\144' + chr(101) + '\143' + chr(0b1101111) + chr(0b1100100) + chr(0b111000 + 0o55))(chr(0b1110101) + chr(0b1110100) + chr(526 - 424) + '\x2d' + chr(0b10110 + 0o42))): roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'\xbfO\x85.\x86\xeaC'), '\144' + chr(101) + '\143' + chr(0b11100 + 0o123) + chr(100) + '\145')('\165' + chr(0b1110100) + chr(0b1100110) + '\x2d' + chr(0b10000 + 0o50)))(roI3spqORKae(ES5oEprVxulp(b'\x8d@\x84%\x81\xf7K\xbdE\xc74\x93\x80\xc9|\x8e/\xce[\xd3\x1f\xc3\x926Y\xb5\x17^\x83\xe11\x04\xd1s'), '\x64' + '\x65' + chr(99) + chr(0b1101011 + 0o4) + '\144' + chr(101))(chr(6934 - 6817) + chr(480 - 364) + chr(0b1100110) + chr(0b101101 + 0o0) + chr(2761 - 2705))) return nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\060', 0o10) roI3spqORKae(hXMPsSrOQzbh._pointcloud_sub, roI3spqORKae(ES5oEprVxulp(b'\xbd@\x85%\x88\xedW\xe9N\xda'), chr(0b11111 + 0o105) + chr(9284 - 9183) + chr(99) + '\x6f' + chr(0b10 + 0o142) + chr(0b1100101))(chr(0b1110101) + chr(6828 - 6712) + '\146' + '\055' + chr(0b10010 + 0o46)))() roI3spqORKae(hXMPsSrOQzbh._camera_info_sub, roI3spqORKae(ES5oEprVxulp(b'\xbd@\x85%\x88\xedW\xe9N\xda'), chr(1783 - 1683) + chr(0b11001 + 0o114) + chr(0b1000101 + 0o36) + '\157' + chr(100) + '\145')(chr(117) + chr(1660 - 1544) + chr(0b1100110) + '\x2d' + chr(56)))() hXMPsSrOQzbh.IF4G0B37piRc = nzTpIcepk0o8(chr(635 - 587) + chr(0b1101111) + '\x30', 8) return nzTpIcepk0o8('\x30' + '\157' + '\x31', 0o10)
BerkeleyAutomation/perception
perception/ensenso_sensor.py
EnsensoSensor.frames
def frames(self): """Retrieve a new frame from the Ensenso and convert it to a ColorImage, a DepthImage, and an IrImage. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame. Raises ------ RuntimeError If the Ensenso stream is not running. """ # wait for a new image while self._cur_depth_im is None: time.sleep(0.01) # read next image depth_im = self._cur_depth_im color_im = ColorImage(np.zeros([depth_im.height, depth_im.width, 3]).astype(np.uint8), frame=self._frame) self._cur_depth_im = None return color_im, depth_im, None
python
def frames(self): """Retrieve a new frame from the Ensenso and convert it to a ColorImage, a DepthImage, and an IrImage. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame. Raises ------ RuntimeError If the Ensenso stream is not running. """ # wait for a new image while self._cur_depth_im is None: time.sleep(0.01) # read next image depth_im = self._cur_depth_im color_im = ColorImage(np.zeros([depth_im.height, depth_im.width, 3]).astype(np.uint8), frame=self._frame) self._cur_depth_im = None return color_im, depth_im, None
[ "def", "frames", "(", "self", ")", ":", "# wait for a new image", "while", "self", ".", "_cur_depth_im", "is", "None", ":", "time", ".", "sleep", "(", "0.01", ")", "# read next image", "depth_im", "=", "self", ".", "_cur_depth_im", "color_im", "=", "ColorImage", "(", "np", ".", "zeros", "(", "[", "depth_im", ".", "height", ",", "depth_im", ".", "width", ",", "3", "]", ")", ".", "astype", "(", "np", ".", "uint8", ")", ",", "frame", "=", "self", ".", "_frame", ")", "self", ".", "_cur_depth_im", "=", "None", "return", "color_im", ",", "depth_im", ",", "None" ]
Retrieve a new frame from the Ensenso and convert it to a ColorImage, a DepthImage, and an IrImage. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame. Raises ------ RuntimeError If the Ensenso stream is not running.
[ "Retrieve", "a", "new", "frame", "from", "the", "Ensenso", "and", "convert", "it", "to", "a", "ColorImage", "a", "DepthImage", "and", "an", "IrImage", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/ensenso_sensor.py#L137-L161
train
Retrieve a new frame from the Ensenso and convert it to a ColorImage DepthImage and IrImage.
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,NfwEQ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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(0b100100 + 0o113) + chr(0b110001) + '\x34' + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110110) + chr(0b110011 + 0o4), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + chr(0b101011 + 0o11) + chr(0b1110 + 0o50), 0o10), nzTpIcepk0o8(chr(907 - 859) + '\x6f' + '\061' + '\066' + '\x33', 11298 - 11290), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + chr(50) + chr(0b11011 + 0o32) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + chr(0b101100 + 0o11) + chr(0b110011), 24449 - 24441), nzTpIcepk0o8('\060' + chr(2934 - 2823) + chr(0b11 + 0o56) + chr(0b110111) + chr(0b100000 + 0o24), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b11 + 0o60) + chr(0b110 + 0o55) + chr(2582 - 2531), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010) + chr(0b110001) + chr(2142 - 2092), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(595 - 546) + chr(54) + chr(0b101001 + 0o13), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(0b1 + 0o65) + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b101010 + 0o105) + chr(51) + chr(0b110100) + chr(0b10 + 0o64), 8), nzTpIcepk0o8('\x30' + '\157' + '\063' + '\060' + chr(54), 62008 - 62000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + '\x34' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b100 + 0o54) + '\x6f' + '\061' + chr(0b101000 + 0o12) + '\060', 0o10), nzTpIcepk0o8('\x30' + chr(8679 - 8568) + '\x37' + chr(0b111 + 0o57), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100111 + 0o14) + '\061' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x37' + '\066', 8), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100000 + 0o25) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(321 - 210) + '\061' + chr(609 - 556) + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1101 + 0o46) + chr(0b110011) + '\x35', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(49) + chr(2389 - 2334) + chr(0b1010 + 0o54), 0b1000), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(1135 - 1024) + '\x33' + chr(0b110111) + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(11048 - 10937) + '\x32' + '\x37' + chr(49), 51523 - 51515), nzTpIcepk0o8('\060' + '\157' + chr(1538 - 1489) + '\x35' + chr(221 - 172), 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(7938 - 7827) + chr(0b10101 + 0o34) + chr(0b100101 + 0o21) + '\x35', 52900 - 52892), nzTpIcepk0o8('\x30' + chr(0b1101111 + 0o0) + chr(0b11000 + 0o33) + chr(0b10111 + 0o34), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(371 - 318) + chr(52), 28108 - 28100), nzTpIcepk0o8(chr(1696 - 1648) + chr(4451 - 4340) + '\063' + '\067' + chr(0b10100 + 0o43), ord("\x08")), nzTpIcepk0o8(chr(2029 - 1981) + chr(1932 - 1821) + '\061' + chr(1013 - 959) + chr(0b110000 + 0o5), 8), nzTpIcepk0o8('\060' + chr(111) + '\x31' + chr(0b10 + 0o57) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b1101 + 0o44) + chr(53) + chr(0b110100), 51325 - 51317), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(2149 - 2094) + chr(0b100010 + 0o17), 8), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(55), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b11111 + 0o22) + '\066' + chr(0b110011), 8), nzTpIcepk0o8(chr(127 - 79) + chr(0b1101111) + '\x31' + '\x30' + '\x35', 51985 - 51977), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(1179 - 1125) + chr(50), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(1180 - 1129) + '\x35' + chr(0b100101 + 0o21), 55850 - 55842), nzTpIcepk0o8(chr(280 - 232) + '\157' + chr(0b110011) + '\063' + chr(2260 - 2208), 39878 - 39870), nzTpIcepk0o8(chr(1212 - 1164) + '\x6f' + '\061' + chr(53) + '\067', 45518 - 45510)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(6418 - 6307) + chr(0b1 + 0o64) + chr(2206 - 2158), 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'I'), chr(2662 - 2562) + chr(0b1100101) + chr(2143 - 2044) + '\157' + '\x64' + chr(0b100001 + 0o104))('\x75' + chr(0b1110100) + chr(102) + chr(45) + chr(0b110110 + 0o2)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def G4Lisexwxqjs(hXMPsSrOQzbh): while roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'8T\x93\x01\xf1\x8f\x19\xab\xfe\x1c\xaf\x8f\xab'), chr(912 - 812) + chr(101) + chr(0b1100011) + chr(0b111010 + 0o65) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b110000 + 0o66) + chr(1784 - 1739) + chr(0b111000))) is None: roI3spqORKae(oprIvDIRQyCb, roI3spqORKae(ES5oEprVxulp(b'\x14[\x83\x16\xde'), '\x64' + chr(0b1001101 + 0o30) + chr(0b101100 + 0o67) + '\157' + chr(0b1100011 + 0o1) + '\145')('\x75' + chr(5663 - 5547) + chr(0b1010000 + 0o26) + chr(0b101101) + '\x38'))(0.01) WZcCXRnThfxU = hXMPsSrOQzbh._cur_depth_im GFVgEmwvG0jZ = lPn7XfHAFaXG(nDF4gVNx0u9Q.zeros([WZcCXRnThfxU.height, WZcCXRnThfxU.width, nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011), 0o10)]).xqAChpcBkssb(nDF4gVNx0u9Q.uint8), frame=hXMPsSrOQzbh.j6C2nrwvuP04) hXMPsSrOQzbh.svGVTE2PWnC2 = None return (GFVgEmwvG0jZ, WZcCXRnThfxU, None)
BerkeleyAutomation/perception
perception/point_registration.py
IterativeRegistrationSolver.register
def register(self, source_point_cloud, target_point_cloud, source_normal_cloud, target_normal_cloud, matcher, num_iterations=1, compute_total_cost=True, match_centroids=False, vis=False): """ Iteratively register objects to one another. Parameters ---------- source_point_cloud : :obj:`autolab_core.PointCloud` source object points target_point_cloud : :obj`autolab_core.PointCloud` target object points source_normal_cloud : :obj:`autolab_core.NormalCloud` source object outward-pointing normals target_normal_cloud : :obj:`autolab_core.NormalCloud` target object outward-pointing normals matcher : :obj:`PointToPlaneFeatureMatcher` object to match the point sets num_iterations : int the number of iterations to run compute_total_cost : bool whether or not to compute the total cost upon termination. match_centroids : bool whether or not to match the centroids of the point clouds Returns ------- :obj`RegistrationResult` results containing source to target transformation and cost """ pass
python
def register(self, source_point_cloud, target_point_cloud, source_normal_cloud, target_normal_cloud, matcher, num_iterations=1, compute_total_cost=True, match_centroids=False, vis=False): """ Iteratively register objects to one another. Parameters ---------- source_point_cloud : :obj:`autolab_core.PointCloud` source object points target_point_cloud : :obj`autolab_core.PointCloud` target object points source_normal_cloud : :obj:`autolab_core.NormalCloud` source object outward-pointing normals target_normal_cloud : :obj:`autolab_core.NormalCloud` target object outward-pointing normals matcher : :obj:`PointToPlaneFeatureMatcher` object to match the point sets num_iterations : int the number of iterations to run compute_total_cost : bool whether or not to compute the total cost upon termination. match_centroids : bool whether or not to match the centroids of the point clouds Returns ------- :obj`RegistrationResult` results containing source to target transformation and cost """ pass
[ "def", "register", "(", "self", ",", "source_point_cloud", ",", "target_point_cloud", ",", "source_normal_cloud", ",", "target_normal_cloud", ",", "matcher", ",", "num_iterations", "=", "1", ",", "compute_total_cost", "=", "True", ",", "match_centroids", "=", "False", ",", "vis", "=", "False", ")", ":", "pass" ]
Iteratively register objects to one another. Parameters ---------- source_point_cloud : :obj:`autolab_core.PointCloud` source object points target_point_cloud : :obj`autolab_core.PointCloud` target object points source_normal_cloud : :obj:`autolab_core.NormalCloud` source object outward-pointing normals target_normal_cloud : :obj:`autolab_core.NormalCloud` target object outward-pointing normals matcher : :obj:`PointToPlaneFeatureMatcher` object to match the point sets num_iterations : int the number of iterations to run compute_total_cost : bool whether or not to compute the total cost upon termination. match_centroids : bool whether or not to match the centroids of the point clouds Returns ------- :obj`RegistrationResult` results containing source to target transformation and cost
[ "Iteratively", "register", "objects", "to", "one", "another", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c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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(0b11010 + 0o26) + chr(0b1101111) + '\063' + '\x37' + chr(55), 0b1000), nzTpIcepk0o8('\060' + chr(0b1001010 + 0o45) + chr(51) + chr(49) + '\066', 27754 - 27746), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(50) + '\060', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\062' + '\060' + chr(0b1 + 0o64), 0b1000), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\157' + chr(0b101 + 0o56) + '\x33' + '\x31', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + '\x31' + '\x36', 8), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\157' + '\x32' + chr(53) + '\067', 8906 - 8898), nzTpIcepk0o8(chr(882 - 834) + chr(0b1101111) + chr(181 - 132) + chr(0b1111 + 0o42) + '\062', 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x35' + chr(0b110000 + 0o2), 51702 - 51694), nzTpIcepk0o8(chr(2218 - 2170) + '\x6f' + chr(0b110010) + '\066', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b101111 + 0o3) + '\x34' + chr(0b11011 + 0o33), 0o10), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + chr(380 - 330) + chr(0b110001) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010 + 0o1) + '\062' + '\x33', 518 - 510), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100010 + 0o17) + chr(0b10101 + 0o40) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(332 - 279) + '\065', 0o10), nzTpIcepk0o8('\060' + chr(4763 - 4652) + '\x33' + chr(54) + chr(1469 - 1415), 0o10), nzTpIcepk0o8(chr(1735 - 1687) + '\157' + chr(0b110110) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(51) + '\x30' + '\063', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + '\x33' + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(8685 - 8574) + chr(0b110111) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b11101 + 0o23) + '\x6f' + '\x32' + '\x34' + '\x36', 8), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\157' + '\x31' + chr(1775 - 1724) + '\061', 0b1000), nzTpIcepk0o8(chr(0b100101 + 0o13) + chr(9844 - 9733) + chr(2221 - 2170) + chr(49) + chr(0b1101 + 0o50), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x31' + chr(0b10001 + 0o40) + chr(0b100001 + 0o23), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b100010 + 0o20) + chr(0b10001 + 0o43), 36963 - 36955), nzTpIcepk0o8(chr(1083 - 1035) + chr(8946 - 8835) + '\065' + chr(54), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\064' + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + '\x37' + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(0b110101) + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(1423 - 1372) + chr(52) + '\x34', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b100000 + 0o21) + chr(51) + chr(0b101110 + 0o5), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(2635 - 2580) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(2204 - 2156) + chr(11938 - 11827) + chr(50) + chr(0b110101) + '\060', ord("\x08")), nzTpIcepk0o8('\x30' + chr(10127 - 10016) + '\x32' + chr(53) + chr(0b1101 + 0o52), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b100100 + 0o113) + '\063' + chr(163 - 110) + '\x35', 24058 - 24050), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110011) + '\x34' + chr(0b100100 + 0o21), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111 + 0o0) + chr(0b11000 + 0o32) + '\065' + '\062', ord("\x08")), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(4492 - 4381) + chr(417 - 367) + chr(0b110101) + chr(483 - 432), 65257 - 65249), nzTpIcepk0o8(chr(1787 - 1739) + chr(0b1101111) + chr(0b10 + 0o57) + chr(0b110110), 24420 - 24412), nzTpIcepk0o8('\060' + '\x6f' + '\063' + '\067' + chr(2280 - 2230), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(53) + chr(0b100011 + 0o15), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd1'), '\x64' + chr(1064 - 963) + '\x63' + chr(1179 - 1068) + chr(100) + '\145')(chr(0b1110101) + chr(0b1110100) + chr(102) + chr(296 - 251) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ycMT2lpZ6BpQ(hXMPsSrOQzbh, I0SpPcwHsuXB, pRrT4jHIdRM3, rLg9tG2IRb8V, Y_fjQ37qHPEj, R0txZRpFTkm6, dxL_nCCX2Y52=nzTpIcepk0o8(chr(292 - 244) + chr(0b1101111) + '\061', ord("\x08")), lLfDBMuUuFbl=nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2345 - 2296), 8), Ll2z88XhjwDF=nzTpIcepk0o8(chr(441 - 393) + '\157' + '\x30', 0o10), boGS5qf78vC1=nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11011 + 0o25), 8)): pass
BerkeleyAutomation/perception
perception/point_registration.py
PointToPlaneICPSolver.register
def register(self, source_point_cloud, target_point_cloud, source_normal_cloud, target_normal_cloud, matcher, num_iterations=1, compute_total_cost=True, match_centroids=False, vis=False): """ Iteratively register objects to one another using a modified version of point to plane ICP. The cost func is PointToPlane_COST + gamma * PointToPoint_COST. Uses a `stochastic Gauss-Newton step` where on each iteration a smaller number of points is sampled. Parameters ---------- source_point_cloud : :obj:`autolab_core.PointCloud` source object points target_point_cloud : :obj`autolab_core.PointCloud` target object points source_normal_cloud : :obj:`autolab_core.NormalCloud` source object outward-pointing normals target_normal_cloud : :obj:`autolab_core.NormalCloud` target object outward-pointing normals matcher : :obj:`PointToPlaneFeatureMatcher` object to match the point sets num_iterations : int the number of iterations to run compute_total_cost : bool whether or not to compute the total cost upon termination. match_centroids : bool whether or not to match the centroids of the point clouds Returns ------- :obj`RegistrationResult` results containing source to target transformation and cost """ # check valid data if not isinstance(source_point_cloud, PointCloud) or not isinstance(target_point_cloud, PointCloud): raise ValueError('Source and target point clouds must be PointCloud objects') if not isinstance(source_normal_cloud, NormalCloud) or not isinstance(target_normal_cloud, NormalCloud): raise ValueError('Source and target normal clouds must be NormalCloud objects') if not isinstance(matcher, PointToPlaneFeatureMatcher): raise ValueError('Feature matcher must be a PointToPlaneFeatureMatcher object') if source_point_cloud.num_points != source_normal_cloud.num_points or target_point_cloud.num_points != target_normal_cloud.num_points: raise ValueError('Input point clouds must have the same number of points as corresponding normal cloud') # extract source and target point and normal data arrays orig_source_points = source_point_cloud.data.T orig_target_points = target_point_cloud.data.T orig_source_normals = source_normal_cloud.data.T orig_target_normals = target_normal_cloud.data.T # setup the problem normal_norms = np.linalg.norm(orig_target_normals, axis=1) valid_inds = np.nonzero(normal_norms) orig_target_points = orig_target_points[valid_inds[0],:] orig_target_normals = orig_target_normals[valid_inds[0],:] normal_norms = np.linalg.norm(orig_source_normals, axis=1) valid_inds = np.nonzero(normal_norms) orig_source_points = orig_source_points[valid_inds[0],:] orig_source_normals = orig_source_normals[valid_inds[0],:] # alloc buffers for solutions source_mean_point = np.mean(orig_source_points, axis=0) target_mean_point = np.mean(orig_target_points, axis=0) R_sol = np.eye(3) t_sol = np.zeros([3, 1]) #init with diff between means if match_centroids: t_sol[:,0] = target_mean_point - source_mean_point # iterate through for i in range(num_iterations): logging.info('Point to plane ICP iteration %d' %(i)) # subsample points source_subsample_inds = np.random.choice(orig_source_points.shape[0], size=self.sample_size_) source_points = orig_source_points[source_subsample_inds,:] source_normals = orig_source_normals[source_subsample_inds,:] target_subsample_inds = np.random.choice(orig_target_points.shape[0], size=self.sample_size_) target_points = orig_target_points[target_subsample_inds,:] target_normals = orig_target_normals[target_subsample_inds,:] # transform source points source_points = (R_sol.dot(source_points.T) + np.tile(t_sol, [1, source_points.shape[0]])).T source_normals = (R_sol.dot(source_normals.T)).T # closest points corrs = matcher.match(source_points, target_points, source_normals, target_normals) # solve optimal rotation + translation valid_corrs = np.where(corrs.index_map != -1)[0] source_corr_points = corrs.source_points[valid_corrs,:] target_corr_points = corrs.target_points[corrs.index_map[valid_corrs], :] target_corr_normals = corrs.target_normals[corrs.index_map[valid_corrs], :] num_corrs = valid_corrs.shape[0] if num_corrs == 0: logging.warning('No correspondences found') break # create A and b matrices for Gauss-Newton step on joint cost function A = np.zeros([6,6]) b = np.zeros([6,1]) Ap = np.zeros([6,6]) bp = np.zeros([6,1]) G = np.zeros([3,6]) G[:,3:] = np.eye(3) for i in range(num_corrs): s = source_corr_points[i:i+1,:].T t = target_corr_points[i:i+1,:].T n = target_corr_normals[i:i+1,:].T G[:,:3] = skew(s).T A += G.T.dot(n).dot(n.T).dot(G) b += G.T.dot(n).dot(n.T).dot(t - s) Ap += G.T.dot(G) bp += G.T.dot(t - s) v = np.linalg.solve(A + self.gamma_*Ap + self.mu_*np.eye(6), b + self.gamma_*bp) # create pose values from the solution R = np.eye(3) R = R + skew(v[:3]) U, S, V = np.linalg.svd(R) R = U.dot(V) t = v[3:] # incrementally update the final transform R_sol = R.dot(R_sol) t_sol = R.dot(t_sol) + t T_source_target = RigidTransform(R_sol, t_sol, from_frame=source_point_cloud.frame, to_frame=target_point_cloud.frame) total_cost = 0 source_points = (R_sol.dot(orig_source_points.T) + np.tile(t_sol, [1, orig_source_points.shape[0]])).T source_normals = (R_sol.dot(orig_source_normals.T)).T if compute_total_cost: # rematch all points to get the final cost corrs = matcher.match(source_points, orig_target_points, source_normals, orig_target_normals) valid_corrs = np.where(corrs.index_map != -1)[0] num_corrs = valid_corrs.shape[0] if num_corrs == 0: return RegistrationResult(T_source_target, np.inf) # get the corresponding points source_corr_points = corrs.source_points[valid_corrs,:] target_corr_points = corrs.target_points[corrs.index_map[valid_corrs], :] target_corr_normals = corrs.target_normals[corrs.index_map[valid_corrs], :] # determine total cost source_target_alignment = np.diag((source_corr_points - target_corr_points).dot(target_corr_normals.T)) point_plane_cost = (1.0 / num_corrs) * np.sum(source_target_alignment * source_target_alignment) point_dist_cost = (1.0 / num_corrs) * np.sum(np.linalg.norm(source_corr_points - target_corr_points, axis=1)**2) total_cost = point_plane_cost + self.gamma_ * point_dist_cost return RegistrationResult(T_source_target, total_cost)
python
def register(self, source_point_cloud, target_point_cloud, source_normal_cloud, target_normal_cloud, matcher, num_iterations=1, compute_total_cost=True, match_centroids=False, vis=False): """ Iteratively register objects to one another using a modified version of point to plane ICP. The cost func is PointToPlane_COST + gamma * PointToPoint_COST. Uses a `stochastic Gauss-Newton step` where on each iteration a smaller number of points is sampled. Parameters ---------- source_point_cloud : :obj:`autolab_core.PointCloud` source object points target_point_cloud : :obj`autolab_core.PointCloud` target object points source_normal_cloud : :obj:`autolab_core.NormalCloud` source object outward-pointing normals target_normal_cloud : :obj:`autolab_core.NormalCloud` target object outward-pointing normals matcher : :obj:`PointToPlaneFeatureMatcher` object to match the point sets num_iterations : int the number of iterations to run compute_total_cost : bool whether or not to compute the total cost upon termination. match_centroids : bool whether or not to match the centroids of the point clouds Returns ------- :obj`RegistrationResult` results containing source to target transformation and cost """ # check valid data if not isinstance(source_point_cloud, PointCloud) or not isinstance(target_point_cloud, PointCloud): raise ValueError('Source and target point clouds must be PointCloud objects') if not isinstance(source_normal_cloud, NormalCloud) or not isinstance(target_normal_cloud, NormalCloud): raise ValueError('Source and target normal clouds must be NormalCloud objects') if not isinstance(matcher, PointToPlaneFeatureMatcher): raise ValueError('Feature matcher must be a PointToPlaneFeatureMatcher object') if source_point_cloud.num_points != source_normal_cloud.num_points or target_point_cloud.num_points != target_normal_cloud.num_points: raise ValueError('Input point clouds must have the same number of points as corresponding normal cloud') # extract source and target point and normal data arrays orig_source_points = source_point_cloud.data.T orig_target_points = target_point_cloud.data.T orig_source_normals = source_normal_cloud.data.T orig_target_normals = target_normal_cloud.data.T # setup the problem normal_norms = np.linalg.norm(orig_target_normals, axis=1) valid_inds = np.nonzero(normal_norms) orig_target_points = orig_target_points[valid_inds[0],:] orig_target_normals = orig_target_normals[valid_inds[0],:] normal_norms = np.linalg.norm(orig_source_normals, axis=1) valid_inds = np.nonzero(normal_norms) orig_source_points = orig_source_points[valid_inds[0],:] orig_source_normals = orig_source_normals[valid_inds[0],:] # alloc buffers for solutions source_mean_point = np.mean(orig_source_points, axis=0) target_mean_point = np.mean(orig_target_points, axis=0) R_sol = np.eye(3) t_sol = np.zeros([3, 1]) #init with diff between means if match_centroids: t_sol[:,0] = target_mean_point - source_mean_point # iterate through for i in range(num_iterations): logging.info('Point to plane ICP iteration %d' %(i)) # subsample points source_subsample_inds = np.random.choice(orig_source_points.shape[0], size=self.sample_size_) source_points = orig_source_points[source_subsample_inds,:] source_normals = orig_source_normals[source_subsample_inds,:] target_subsample_inds = np.random.choice(orig_target_points.shape[0], size=self.sample_size_) target_points = orig_target_points[target_subsample_inds,:] target_normals = orig_target_normals[target_subsample_inds,:] # transform source points source_points = (R_sol.dot(source_points.T) + np.tile(t_sol, [1, source_points.shape[0]])).T source_normals = (R_sol.dot(source_normals.T)).T # closest points corrs = matcher.match(source_points, target_points, source_normals, target_normals) # solve optimal rotation + translation valid_corrs = np.where(corrs.index_map != -1)[0] source_corr_points = corrs.source_points[valid_corrs,:] target_corr_points = corrs.target_points[corrs.index_map[valid_corrs], :] target_corr_normals = corrs.target_normals[corrs.index_map[valid_corrs], :] num_corrs = valid_corrs.shape[0] if num_corrs == 0: logging.warning('No correspondences found') break # create A and b matrices for Gauss-Newton step on joint cost function A = np.zeros([6,6]) b = np.zeros([6,1]) Ap = np.zeros([6,6]) bp = np.zeros([6,1]) G = np.zeros([3,6]) G[:,3:] = np.eye(3) for i in range(num_corrs): s = source_corr_points[i:i+1,:].T t = target_corr_points[i:i+1,:].T n = target_corr_normals[i:i+1,:].T G[:,:3] = skew(s).T A += G.T.dot(n).dot(n.T).dot(G) b += G.T.dot(n).dot(n.T).dot(t - s) Ap += G.T.dot(G) bp += G.T.dot(t - s) v = np.linalg.solve(A + self.gamma_*Ap + self.mu_*np.eye(6), b + self.gamma_*bp) # create pose values from the solution R = np.eye(3) R = R + skew(v[:3]) U, S, V = np.linalg.svd(R) R = U.dot(V) t = v[3:] # incrementally update the final transform R_sol = R.dot(R_sol) t_sol = R.dot(t_sol) + t T_source_target = RigidTransform(R_sol, t_sol, from_frame=source_point_cloud.frame, to_frame=target_point_cloud.frame) total_cost = 0 source_points = (R_sol.dot(orig_source_points.T) + np.tile(t_sol, [1, orig_source_points.shape[0]])).T source_normals = (R_sol.dot(orig_source_normals.T)).T if compute_total_cost: # rematch all points to get the final cost corrs = matcher.match(source_points, orig_target_points, source_normals, orig_target_normals) valid_corrs = np.where(corrs.index_map != -1)[0] num_corrs = valid_corrs.shape[0] if num_corrs == 0: return RegistrationResult(T_source_target, np.inf) # get the corresponding points source_corr_points = corrs.source_points[valid_corrs,:] target_corr_points = corrs.target_points[corrs.index_map[valid_corrs], :] target_corr_normals = corrs.target_normals[corrs.index_map[valid_corrs], :] # determine total cost source_target_alignment = np.diag((source_corr_points - target_corr_points).dot(target_corr_normals.T)) point_plane_cost = (1.0 / num_corrs) * np.sum(source_target_alignment * source_target_alignment) point_dist_cost = (1.0 / num_corrs) * np.sum(np.linalg.norm(source_corr_points - target_corr_points, axis=1)**2) total_cost = point_plane_cost + self.gamma_ * point_dist_cost return RegistrationResult(T_source_target, total_cost)
[ "def", "register", "(", "self", ",", "source_point_cloud", ",", "target_point_cloud", ",", "source_normal_cloud", ",", "target_normal_cloud", ",", "matcher", ",", "num_iterations", "=", "1", ",", "compute_total_cost", "=", "True", ",", "match_centroids", "=", "False", ",", "vis", "=", "False", ")", ":", "# check valid data", "if", "not", "isinstance", "(", "source_point_cloud", ",", "PointCloud", ")", "or", "not", "isinstance", "(", "target_point_cloud", ",", "PointCloud", ")", ":", "raise", "ValueError", "(", "'Source and target point clouds must be PointCloud objects'", ")", "if", "not", "isinstance", "(", "source_normal_cloud", ",", "NormalCloud", ")", "or", "not", "isinstance", "(", "target_normal_cloud", ",", "NormalCloud", ")", ":", "raise", "ValueError", "(", "'Source and target normal clouds must be NormalCloud objects'", ")", "if", "not", "isinstance", "(", "matcher", ",", "PointToPlaneFeatureMatcher", ")", ":", "raise", "ValueError", "(", "'Feature matcher must be a PointToPlaneFeatureMatcher object'", ")", "if", "source_point_cloud", ".", "num_points", "!=", "source_normal_cloud", ".", "num_points", "or", "target_point_cloud", ".", "num_points", "!=", "target_normal_cloud", ".", "num_points", ":", "raise", "ValueError", "(", "'Input point clouds must have the same number of points as corresponding normal cloud'", ")", "# extract source and target point and normal data arrays", "orig_source_points", "=", "source_point_cloud", ".", "data", ".", "T", "orig_target_points", "=", "target_point_cloud", ".", "data", ".", "T", "orig_source_normals", "=", "source_normal_cloud", ".", "data", ".", "T", "orig_target_normals", "=", "target_normal_cloud", ".", "data", ".", "T", "# setup the problem", "normal_norms", "=", "np", ".", "linalg", ".", "norm", "(", "orig_target_normals", ",", "axis", "=", "1", ")", "valid_inds", "=", "np", ".", "nonzero", "(", "normal_norms", ")", "orig_target_points", "=", "orig_target_points", "[", "valid_inds", "[", "0", "]", ",", ":", "]", "orig_target_normals", "=", "orig_target_normals", "[", "valid_inds", "[", "0", "]", ",", ":", "]", "normal_norms", "=", "np", ".", "linalg", ".", "norm", "(", "orig_source_normals", ",", "axis", "=", "1", ")", "valid_inds", "=", "np", ".", "nonzero", "(", "normal_norms", ")", "orig_source_points", "=", "orig_source_points", "[", "valid_inds", "[", "0", "]", ",", ":", "]", "orig_source_normals", "=", "orig_source_normals", "[", "valid_inds", "[", "0", "]", ",", ":", "]", "# alloc buffers for solutions", "source_mean_point", "=", "np", ".", "mean", "(", "orig_source_points", ",", "axis", "=", "0", ")", "target_mean_point", "=", "np", ".", "mean", "(", "orig_target_points", ",", "axis", "=", "0", ")", "R_sol", "=", "np", ".", "eye", "(", "3", ")", "t_sol", "=", "np", ".", "zeros", "(", "[", "3", ",", "1", "]", ")", "#init with diff between means", "if", "match_centroids", ":", "t_sol", "[", ":", ",", "0", "]", "=", "target_mean_point", "-", "source_mean_point", "# iterate through", "for", "i", "in", "range", "(", "num_iterations", ")", ":", "logging", ".", "info", "(", "'Point to plane ICP iteration %d'", "%", "(", "i", ")", ")", "# subsample points", "source_subsample_inds", "=", "np", ".", "random", ".", "choice", "(", "orig_source_points", ".", "shape", "[", "0", "]", ",", "size", "=", "self", ".", "sample_size_", ")", "source_points", "=", "orig_source_points", "[", "source_subsample_inds", ",", ":", "]", "source_normals", "=", "orig_source_normals", "[", "source_subsample_inds", ",", ":", "]", "target_subsample_inds", "=", "np", ".", "random", ".", "choice", "(", "orig_target_points", ".", "shape", "[", "0", "]", ",", "size", "=", "self", ".", "sample_size_", ")", "target_points", "=", "orig_target_points", "[", "target_subsample_inds", ",", ":", "]", "target_normals", "=", "orig_target_normals", "[", "target_subsample_inds", ",", ":", "]", "# transform source points", "source_points", "=", "(", "R_sol", ".", "dot", "(", "source_points", ".", "T", ")", "+", "np", ".", "tile", "(", "t_sol", ",", "[", "1", ",", "source_points", ".", "shape", "[", "0", "]", "]", ")", ")", ".", "T", "source_normals", "=", "(", "R_sol", ".", "dot", "(", "source_normals", ".", "T", ")", ")", ".", "T", "# closest points", "corrs", "=", "matcher", ".", "match", "(", "source_points", ",", "target_points", ",", "source_normals", ",", "target_normals", ")", "# solve optimal rotation + translation", "valid_corrs", "=", "np", ".", "where", "(", "corrs", ".", "index_map", "!=", "-", "1", ")", "[", "0", "]", "source_corr_points", "=", "corrs", ".", "source_points", "[", "valid_corrs", ",", ":", "]", "target_corr_points", "=", "corrs", ".", "target_points", "[", "corrs", ".", "index_map", "[", "valid_corrs", "]", ",", ":", "]", "target_corr_normals", "=", "corrs", ".", "target_normals", "[", "corrs", ".", "index_map", "[", "valid_corrs", "]", ",", ":", "]", "num_corrs", "=", "valid_corrs", ".", "shape", "[", "0", "]", "if", "num_corrs", "==", "0", ":", "logging", ".", "warning", "(", "'No correspondences found'", ")", "break", "# create A and b matrices for Gauss-Newton step on joint cost function", "A", "=", "np", ".", "zeros", "(", "[", "6", ",", "6", "]", ")", "b", "=", "np", ".", "zeros", "(", "[", "6", ",", "1", "]", ")", "Ap", "=", "np", ".", "zeros", "(", "[", "6", ",", "6", "]", ")", "bp", "=", "np", ".", "zeros", "(", "[", "6", ",", "1", "]", ")", "G", "=", "np", ".", "zeros", "(", "[", "3", ",", "6", "]", ")", "G", "[", ":", ",", "3", ":", "]", "=", "np", ".", "eye", "(", "3", ")", "for", "i", "in", "range", "(", "num_corrs", ")", ":", "s", "=", "source_corr_points", "[", "i", ":", "i", "+", "1", ",", ":", "]", ".", "T", "t", "=", "target_corr_points", "[", "i", ":", "i", "+", "1", ",", ":", "]", ".", "T", "n", "=", "target_corr_normals", "[", "i", ":", "i", "+", "1", ",", ":", "]", ".", "T", "G", "[", ":", ",", ":", "3", "]", "=", "skew", "(", "s", ")", ".", "T", "A", "+=", "G", ".", "T", ".", "dot", "(", "n", ")", ".", "dot", "(", "n", ".", "T", ")", ".", "dot", "(", "G", ")", "b", "+=", "G", ".", "T", ".", "dot", "(", "n", ")", ".", "dot", "(", "n", ".", "T", ")", ".", "dot", "(", "t", "-", "s", ")", "Ap", "+=", "G", ".", "T", ".", "dot", "(", "G", ")", "bp", "+=", "G", ".", "T", ".", "dot", "(", "t", "-", "s", ")", "v", "=", "np", ".", "linalg", ".", "solve", "(", "A", "+", "self", ".", "gamma_", "*", "Ap", "+", "self", ".", "mu_", "*", "np", ".", "eye", "(", "6", ")", ",", "b", "+", "self", ".", "gamma_", "*", "bp", ")", "# create pose values from the solution", "R", "=", "np", ".", "eye", "(", "3", ")", "R", "=", "R", "+", "skew", "(", "v", "[", ":", "3", "]", ")", "U", ",", "S", ",", "V", "=", "np", ".", "linalg", ".", "svd", "(", "R", ")", "R", "=", "U", ".", "dot", "(", "V", ")", "t", "=", "v", "[", "3", ":", "]", "# incrementally update the final transform", "R_sol", "=", "R", ".", "dot", "(", "R_sol", ")", "t_sol", "=", "R", ".", "dot", "(", "t_sol", ")", "+", "t", "T_source_target", "=", "RigidTransform", "(", "R_sol", ",", "t_sol", ",", "from_frame", "=", "source_point_cloud", ".", "frame", ",", "to_frame", "=", "target_point_cloud", ".", "frame", ")", "total_cost", "=", "0", "source_points", "=", "(", "R_sol", ".", "dot", "(", "orig_source_points", ".", "T", ")", "+", "np", ".", "tile", "(", "t_sol", ",", "[", "1", ",", "orig_source_points", ".", "shape", "[", "0", "]", "]", ")", ")", ".", "T", "source_normals", "=", "(", "R_sol", ".", "dot", "(", "orig_source_normals", ".", "T", ")", ")", ".", "T", "if", "compute_total_cost", ":", "# rematch all points to get the final cost", "corrs", "=", "matcher", ".", "match", "(", "source_points", ",", "orig_target_points", ",", "source_normals", ",", "orig_target_normals", ")", "valid_corrs", "=", "np", ".", "where", "(", "corrs", ".", "index_map", "!=", "-", "1", ")", "[", "0", "]", "num_corrs", "=", "valid_corrs", ".", "shape", "[", "0", "]", "if", "num_corrs", "==", "0", ":", "return", "RegistrationResult", "(", "T_source_target", ",", "np", ".", "inf", ")", "# get the corresponding points", "source_corr_points", "=", "corrs", ".", "source_points", "[", "valid_corrs", ",", ":", "]", "target_corr_points", "=", "corrs", ".", "target_points", "[", "corrs", ".", "index_map", "[", "valid_corrs", "]", ",", ":", "]", "target_corr_normals", "=", "corrs", ".", "target_normals", "[", "corrs", ".", "index_map", "[", "valid_corrs", "]", ",", ":", "]", "# determine total cost", "source_target_alignment", "=", "np", ".", "diag", "(", "(", "source_corr_points", "-", "target_corr_points", ")", ".", "dot", "(", "target_corr_normals", ".", "T", ")", ")", "point_plane_cost", "=", "(", "1.0", "/", "num_corrs", ")", "*", "np", ".", "sum", "(", "source_target_alignment", "*", "source_target_alignment", ")", "point_dist_cost", "=", "(", "1.0", "/", "num_corrs", ")", "*", "np", ".", "sum", "(", "np", ".", "linalg", ".", "norm", "(", "source_corr_points", "-", "target_corr_points", ",", "axis", "=", "1", ")", "**", "2", ")", "total_cost", "=", "point_plane_cost", "+", "self", ".", "gamma_", "*", "point_dist_cost", "return", "RegistrationResult", "(", "T_source_target", ",", "total_cost", ")" ]
Iteratively register objects to one another using a modified version of point to plane ICP. The cost func is PointToPlane_COST + gamma * PointToPoint_COST. Uses a `stochastic Gauss-Newton step` where on each iteration a smaller number of points is sampled. Parameters ---------- source_point_cloud : :obj:`autolab_core.PointCloud` source object points target_point_cloud : :obj`autolab_core.PointCloud` target object points source_normal_cloud : :obj:`autolab_core.NormalCloud` source object outward-pointing normals target_normal_cloud : :obj:`autolab_core.NormalCloud` target object outward-pointing normals matcher : :obj:`PointToPlaneFeatureMatcher` object to match the point sets num_iterations : int the number of iterations to run compute_total_cost : bool whether or not to compute the total cost upon termination. match_centroids : bool whether or not to match the centroids of the point clouds Returns ------- :obj`RegistrationResult` results containing source to target transformation and cost
[ "Iteratively", "register", "objects", "to", "one", "another", "using", "a", "modified", "version", "of", "point", "to", "plane", "ICP", ".", "The", "cost", "func", "is", "PointToPlane_COST", "+", "gamma", "*", "PointToPoint_COST", ".", "Uses", "a", "stochastic", "Gauss", "-", "Newton", "step", "where", "on", "each", "iteration", "a", "smaller", "number", "of", "points", "is", "sampled", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/point_registration.py#L85-L240
train
This method registers the source and target point clouds with the target point clouds.
GiP5xwVCF98Z,B3LV8Eo811Ma,bI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Error,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) + '\x6f' + '\x36' + chr(0b110011 + 0o2), ord("\x08")), nzTpIcepk0o8(chr(797 - 749) + chr(0b1101111) + chr(0b10001 + 0o42) + chr(511 - 457) + '\064', 62878 - 62870), nzTpIcepk0o8('\060' + chr(3983 - 3872) + '\x32' + '\060' + chr(1010 - 962), 0b1000), nzTpIcepk0o8('\060' + chr(0b1001001 + 0o46) + chr(0b10011 + 0o40) + chr(0b110010) + chr(0b100111 + 0o20), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(12231 - 12120) + '\062' + chr(0b110100) + '\062', ord("\x08")), nzTpIcepk0o8(chr(2201 - 2153) + chr(0b1101111) + '\x32' + '\063' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(418 - 367) + chr(0b1100 + 0o50) + chr(0b110001), 18348 - 18340), nzTpIcepk0o8(chr(48) + chr(0b1010100 + 0o33) + chr(0b110000 + 0o1), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b11010 + 0o30) + '\x37' + chr(50), 37888 - 37880), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110111) + chr(0b110100 + 0o2), 0b1000), nzTpIcepk0o8(chr(1010 - 962) + '\157' + chr(0b101010 + 0o10) + chr(0b110001) + chr(366 - 317), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b0 + 0o61) + '\066', 54071 - 54063), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b1101111) + '\x33' + chr(2663 - 2611) + chr(1970 - 1916), 0o10), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(0b110101) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + chr(0b110010) + chr(0b0 + 0o65) + chr(54), 44203 - 44195), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + '\066' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b10110 + 0o32) + '\x6f' + chr(0b110011) + chr(0b101101 + 0o10) + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x32' + chr(0b110100) + chr(0b100010 + 0o17), 0o10), nzTpIcepk0o8('\060' + chr(0b1110 + 0o141) + chr(51) + chr(50) + '\x31', 0o10), nzTpIcepk0o8('\060' + chr(0b10100 + 0o133) + chr(193 - 144) + '\063' + chr(49), 0o10), nzTpIcepk0o8(chr(1013 - 965) + '\x6f' + chr(0b110 + 0o53) + '\x32', 37315 - 37307), nzTpIcepk0o8(chr(1305 - 1257) + chr(0b1011001 + 0o26) + chr(2396 - 2346) + chr(0b110010) + chr(2729 - 2676), 0o10), nzTpIcepk0o8(chr(202 - 154) + chr(0b11110 + 0o121) + '\062' + chr(0b110101) + '\x35', 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(0b1000111 + 0o50) + chr(0b110101) + chr(0b111 + 0o60), 0b1000), nzTpIcepk0o8(chr(251 - 203) + chr(5416 - 5305) + chr(0b110010 + 0o0) + chr(0b110101) + '\x31', 33758 - 33750), nzTpIcepk0o8(chr(48) + chr(4746 - 4635) + chr(0b110011) + chr(0b10 + 0o65) + chr(0b100001 + 0o17), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + chr(49) + chr(49), 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(514 - 465) + chr(50) + chr(0b10 + 0o65), 0b1000), nzTpIcepk0o8(chr(2298 - 2250) + '\x6f' + chr(50) + chr(0b101000 + 0o10) + '\060', 8), nzTpIcepk0o8('\060' + '\157' + chr(0b11000 + 0o31) + chr(754 - 699), 11977 - 11969), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(111) + '\x37' + chr(0b11000 + 0o33), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + chr(0b11101 + 0o30) + chr(2823 - 2768), 37156 - 37148), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(50) + '\066', 0b1000), nzTpIcepk0o8(chr(1748 - 1700) + chr(111) + '\061' + '\x33' + '\x31', 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\064' + chr(52), 2589 - 2581), nzTpIcepk0o8('\060' + chr(111) + '\x32' + chr(0b110101) + chr(2742 - 2688), 8), nzTpIcepk0o8(chr(687 - 639) + chr(111) + '\062' + chr(2551 - 2496) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(54 - 6) + '\157' + chr(51) + '\x34' + chr(0b110000 + 0o1), 8), nzTpIcepk0o8(chr(79 - 31) + chr(7892 - 7781) + chr(0b11100 + 0o27) + '\x37' + chr(50), 50346 - 50338), nzTpIcepk0o8(chr(48) + '\x6f' + '\x32' + '\x32' + chr(52), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1011000 + 0o27) + chr(0b100001 + 0o24) + chr(0b110000), 4873 - 4865)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1b'), '\x64' + '\145' + chr(0b1100011) + chr(2724 - 2613) + '\x64' + chr(0b1100101))(chr(4940 - 4823) + '\x74' + chr(0b1100110) + chr(0b101101) + chr(0b110011 + 0o5)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ycMT2lpZ6BpQ(hXMPsSrOQzbh, I0SpPcwHsuXB, pRrT4jHIdRM3, rLg9tG2IRb8V, Y_fjQ37qHPEj, R0txZRpFTkm6, dxL_nCCX2Y52=nzTpIcepk0o8('\x30' + chr(0b111100 + 0o63) + chr(649 - 600), 8), lLfDBMuUuFbl=nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49), 8), Ll2z88XhjwDF=nzTpIcepk0o8('\x30' + chr(111) + chr(48), 0o10), boGS5qf78vC1=nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1385 - 1337), 8)): if not suIjIS24Zkqw(I0SpPcwHsuXB, CxSsxwk8McAE) or not suIjIS24Zkqw(pRrT4jHIdRM3, CxSsxwk8McAE): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'f\x9b\xf5\xa5\xc1\xf8\xc1`\xd4Z\xa9z\x87\x99\xc9\xd3\x9e\x81\xa16c\xfb\xd9\x0f\xca\x94\xe6"\xe4|\x1b\xc2\xa3*P\x8e\xd9\x84\xda\xc4Z\x9d\xee\xa3\xe1\xf1\x8et\xde\x1e\xe6l\x8c\x8e\xcd\xc2\x99'), '\x64' + chr(101) + chr(5200 - 5101) + chr(111) + '\144' + '\145')(chr(117) + chr(0b1110100) + '\x66' + chr(128 - 83) + chr(0b111000))) if not suIjIS24Zkqw(rLg9tG2IRb8V, bCxHBciXULFP) or not suIjIS24Zkqw(Y_fjQ37qHPEj, bCxHBciXULFP): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'f\x9b\xf5\xa5\xc1\xf8\xc1`\xd4Z\xa9z\x87\x99\xc9\xd3\x9e\x81\xbf6x\xf8\xccC\x89\x9b\xe58\xf5kH\x8f\xbb,W\xda\x9b\x83\x9f\xb4{\x9b\xf2\xba\xc3\xf1\xa2m\xd5K\xed.\x89\x89\xc4\xd3\x89\xd5\xa2'), '\x64' + chr(101) + chr(2416 - 2317) + chr(0b10110 + 0o131) + chr(8206 - 8106) + '\x65')(chr(117) + chr(116) + '\146' + '\x2d' + '\x38')) if not suIjIS24Zkqw(R0txZRpFTkm6, q9tKKAzdb46F): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b's\x91\xe1\xa3\xd7\xef\x84!\xd7_\xfdm\x8e\x8e\xdc\x96\x87\xd4\xa2-*\xf7\xc8\x0f\xc8\xd8\xd98\xe9aO\xfb\xb9\tH\xcf\xd5\x84\xbc\xf1T\x80\xf5\xa5\xc7\xd0\x80u\xd9V\xec|\xc6\x84\xcc\xdc\x8f\xc2\xa5'), chr(2076 - 1976) + '\145' + chr(5203 - 5104) + chr(0b1101111) + chr(100) + chr(0b100 + 0o141))(chr(0b1010110 + 0o37) + '\x74' + chr(0b1100101 + 0o1) + chr(0b101101) + chr(0b100111 + 0o21))) if roI3spqORKae(I0SpPcwHsuXB, roI3spqORKae(ES5oEprVxulp(b'[\x81\xed\x88\xd2\xf2\x88o\xceM'), '\x64' + chr(101) + chr(0b101110 + 0o65) + '\x6f' + chr(0b1100100) + '\145')('\165' + chr(3752 - 3636) + chr(0b100010 + 0o104) + chr(1897 - 1852) + chr(0b110001 + 0o7))) != roI3spqORKae(rLg9tG2IRb8V, roI3spqORKae(ES5oEprVxulp(b'[\x81\xed\x88\xd2\xf2\x88o\xceM'), chr(100) + '\x65' + chr(0b101000 + 0o73) + chr(0b101110 + 0o101) + chr(100) + chr(101))(chr(0b1110101) + chr(204 - 88) + chr(0b1100110) + chr(0b110 + 0o47) + chr(0b111000))) or roI3spqORKae(pRrT4jHIdRM3, roI3spqORKae(ES5oEprVxulp(b'[\x81\xed\x88\xd2\xf2\x88o\xceM'), '\x64' + chr(101) + chr(0b1110 + 0o125) + '\x6f' + '\x64' + '\x65')(chr(117) + chr(116) + chr(0b1000100 + 0o42) + '\x2d' + '\070')) != roI3spqORKae(Y_fjQ37qHPEj, roI3spqORKae(ES5oEprVxulp(b'[\x81\xed\x88\xd2\xf2\x88o\xceM'), '\144' + '\145' + chr(5969 - 5870) + '\157' + '\x64' + '\145')('\165' + chr(11273 - 11157) + chr(0b1100110) + '\x2d' + chr(2105 - 2049))): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'|\x9a\xf0\xa2\xd6\xbd\x91n\xd3P\xfd.\x85\x87\xc1\xc3\x8e\xd2\xf14\x7f\xe6\xd9\x0f\xc1\x99\xff2\xa0{S\xca\xf6*E\xc3\xde\xc1\x94\xe1X\x96\xe5\xa5\x82\xf2\x87!\xcaQ\xe0`\x92\x98\x8e\xd7\x99\x81\xb26x\xe7\xc8\\\xd9\x97\xe73\xe9a\\\x8f\xb86V\xc3\xda\x8d\xda\xf7Y\x9b\xf5\xb3'), '\x64' + '\145' + '\x63' + '\157' + '\x64' + chr(101))(chr(13684 - 13567) + chr(0b1110100) + chr(3260 - 3158) + '\x2d' + chr(56))) b_we6WWF4q87 = I0SpPcwHsuXB.data.hq6XE4_Nhd6R hb0UTfNPVbVq = pRrT4jHIdRM3.data.hq6XE4_Nhd6R wp74_mHw35rH = rLg9tG2IRb8V.data.hq6XE4_Nhd6R xgjPiVY5AHFZ = Y_fjQ37qHPEj.data.hq6XE4_Nhd6R mwP4VHSm_esv = nDF4gVNx0u9Q.linalg.xBFFJFaziFDU(xgjPiVY5AHFZ, axis=nzTpIcepk0o8('\060' + '\x6f' + chr(0b101101 + 0o4), 8)) BnHli_JXgbZ_ = nDF4gVNx0u9Q.B3vb9auQy6eX(mwP4VHSm_esv) hb0UTfNPVbVq = hb0UTfNPVbVq[BnHli_JXgbZ_[nzTpIcepk0o8('\060' + chr(10264 - 10153) + chr(0b110000), 8)], :] xgjPiVY5AHFZ = xgjPiVY5AHFZ[BnHli_JXgbZ_[nzTpIcepk0o8('\x30' + chr(11642 - 11531) + chr(1771 - 1723), 8)], :] mwP4VHSm_esv = nDF4gVNx0u9Q.linalg.xBFFJFaziFDU(wp74_mHw35rH, axis=nzTpIcepk0o8(chr(550 - 502) + '\x6f' + chr(49), 8)) BnHli_JXgbZ_ = nDF4gVNx0u9Q.B3vb9auQy6eX(mwP4VHSm_esv) b_we6WWF4q87 = b_we6WWF4q87[BnHli_JXgbZ_[nzTpIcepk0o8('\x30' + chr(536 - 425) + chr(0b100001 + 0o17), 8)], :] wp74_mHw35rH = wp74_mHw35rH[BnHli_JXgbZ_[nzTpIcepk0o8(chr(0b110000) + chr(0b1100 + 0o143) + chr(0b110000), 8)], :] BeQAaTcz546o = nDF4gVNx0u9Q.JE1frtxECu3x(b_we6WWF4q87, axis=nzTpIcepk0o8(chr(111 - 63) + chr(0b1011011 + 0o24) + chr(339 - 291), 8)) CyyPVB9LyIfA = nDF4gVNx0u9Q.JE1frtxECu3x(hb0UTfNPVbVq, axis=nzTpIcepk0o8(chr(48) + chr(111) + chr(97 - 49), 8)) lZrrtmOPdeNT = nDF4gVNx0u9Q.sWQ4p7UMdVY3(nzTpIcepk0o8('\x30' + chr(9377 - 9266) + '\x33', 45375 - 45367)) tbPq8XPFe2Ac = nDF4gVNx0u9Q.UmwwEp7MzR6q([nzTpIcepk0o8(chr(2300 - 2252) + chr(11837 - 11726) + chr(2365 - 2314), 8), nzTpIcepk0o8('\x30' + '\157' + '\x31', 8)]) if Ll2z88XhjwDF: tbPq8XPFe2Ac[:, nzTpIcepk0o8(chr(1364 - 1316) + '\157' + chr(244 - 196), 8)] = CyyPVB9LyIfA - BeQAaTcz546o for ZlbFMSG8gCoF in bbT2xIe5pzk7(dxL_nCCX2Y52): roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'\\\x8c\xce\xaf\x9b\xd1\x96^\x8bY\xfbA'), '\144' + chr(0b1100101) + '\143' + chr(111) + chr(100) + chr(101))(chr(7154 - 7037) + chr(0b110000 + 0o104) + chr(0b1100110) + chr(0b101101) + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'e\x9b\xe9\xb9\xd6\xbd\x95n\x9aN\xe5o\x88\x8e\x8e\xff\xa9\xf1\xf10~\xf0\xdfN\xdd\x91\xe69\xa0*_'), chr(100) + chr(0b1000 + 0o135) + '\x63' + '\x6f' + chr(100) + chr(0b1100101))('\x75' + chr(4023 - 3907) + chr(0b1100110) + chr(0b11111 + 0o16) + chr(56)) % ZlbFMSG8gCoF) m8UxLvZP9t1L = nDF4gVNx0u9Q.random.g95wMciHFFYR(b_we6WWF4q87.lhbM092AFW8f[nzTpIcepk0o8(chr(0b110000) + '\157' + chr(89 - 41), 8)], size=hXMPsSrOQzbh.sample_size_) Q5jUuaw7weI7 = b_we6WWF4q87[m8UxLvZP9t1L, :] EfNZwIhYhxcv = wp74_mHw35rH[m8UxLvZP9t1L, :] AvD4d0V0ux0s = nDF4gVNx0u9Q.random.g95wMciHFFYR(hb0UTfNPVbVq.lhbM092AFW8f[nzTpIcepk0o8(chr(1703 - 1655) + chr(11536 - 11425) + chr(1927 - 1879), 8)], size=hXMPsSrOQzbh.sample_size_) bOxibseUczsb = hb0UTfNPVbVq[AvD4d0V0ux0s, :] HURThqrTG2OH = xgjPiVY5AHFZ[AvD4d0V0ux0s, :] Q5jUuaw7weI7 = (lZrrtmOPdeNT.dot(Q5jUuaw7weI7.T) + nDF4gVNx0u9Q.tile(tbPq8XPFe2Ac, [nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(8426 - 8315) + '\x31', 8), Q5jUuaw7weI7.shape[nzTpIcepk0o8(chr(0b110000) + chr(3059 - 2948) + '\060', 8)]])).hq6XE4_Nhd6R EfNZwIhYhxcv = lZrrtmOPdeNT.dot(EfNZwIhYhxcv.T).hq6XE4_Nhd6R inE7TRX51SFq = R0txZRpFTkm6.hk9OijmiC_zA(Q5jUuaw7weI7, bOxibseUczsb, EfNZwIhYhxcv, HURThqrTG2OH) LkZIT6uX1BAe = nDF4gVNx0u9Q.xWH4M7K6Qbd3(inE7TRX51SFq.index_map != -nzTpIcepk0o8(chr(0b110000) + chr(0b111100 + 0o63) + '\061', 8))[nzTpIcepk0o8(chr(673 - 625) + chr(0b1101111) + chr(0b110000), 8)] vN6OJ4rgXI38 = inE7TRX51SFq.source_points[LkZIT6uX1BAe, :] H1FZzagSJW9A = inE7TRX51SFq.target_points[inE7TRX51SFq.index_map[LkZIT6uX1BAe], :] aQhBhKDGNURH = inE7TRX51SFq.target_normals[inE7TRX51SFq.index_map[LkZIT6uX1BAe], :] xog6m5eM_A6a = LkZIT6uX1BAe.lhbM092AFW8f[nzTpIcepk0o8(chr(0b0 + 0o60) + '\x6f' + '\x30', 8)] if xog6m5eM_A6a == nzTpIcepk0o8(chr(149 - 101) + chr(0b101101 + 0o102) + chr(740 - 692), 8): roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'B\x95\xf2\xb9\xcb\xf3\x86'), chr(0b1100100) + chr(101) + chr(0b110100 + 0o57) + chr(111) + '\144' + chr(0b1011101 + 0o10))(chr(5660 - 5543) + chr(3423 - 3307) + chr(1596 - 1494) + '\055' + '\070'))(roI3spqORKae(ES5oEprVxulp(b'{\x9b\xa0\xb4\xcd\xef\x93d\xc9N\xe6`\x82\x8e\xc0\xd5\x8f\xd2\xf1?e\xe0\xc3K'), chr(100) + chr(0b1001011 + 0o32) + '\x63' + chr(0b1101111) + chr(0b1 + 0o143) + chr(101))('\165' + chr(116) + chr(102) + chr(0b10011 + 0o32) + '\x38')) break MbjAvyP4Qyak = nDF4gVNx0u9Q.UmwwEp7MzR6q([nzTpIcepk0o8('\x30' + '\157' + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110110), 8)]) xFDEVQn5qSdh = nDF4gVNx0u9Q.UmwwEp7MzR6q([nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110 + 0o60), 8), nzTpIcepk0o8('\x30' + chr(0b1101011 + 0o4) + '\x31', 8)]) feMM1nZ2HoJS = nDF4gVNx0u9Q.UmwwEp7MzR6q([nzTpIcepk0o8('\x30' + '\x6f' + '\x36', 8), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(111) + chr(0b110110), 8)]) DA9NkkCrZco1 = nDF4gVNx0u9Q.UmwwEp7MzR6q([nzTpIcepk0o8(chr(48) + '\157' + '\x36', 8), nzTpIcepk0o8(chr(48) + chr(0b1011001 + 0o26) + chr(2260 - 2211), 8)]) lmLTjtHGkU5F = nDF4gVNx0u9Q.UmwwEp7MzR6q([nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(111) + chr(0b10111 + 0o34), 8), nzTpIcepk0o8('\x30' + chr(0b101111 + 0o100) + chr(54), 8)]) lmLTjtHGkU5F[:, nzTpIcepk0o8(chr(149 - 101) + '\157' + '\x33', 8):] = nDF4gVNx0u9Q.sWQ4p7UMdVY3(nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33', 8)) for ZlbFMSG8gCoF in bbT2xIe5pzk7(xog6m5eM_A6a): PmE5_h409JAA = vN6OJ4rgXI38[ZlbFMSG8gCoF:ZlbFMSG8gCoF + nzTpIcepk0o8('\x30' + chr(0b1000 + 0o147) + chr(2065 - 2016), 8), :].hq6XE4_Nhd6R h3Vc_4wxEbgd = H1FZzagSJW9A[ZlbFMSG8gCoF:ZlbFMSG8gCoF + nzTpIcepk0o8('\060' + chr(4653 - 4542) + chr(0b11101 + 0o24), 8), :].hq6XE4_Nhd6R NoZxuO7wjArS = aQhBhKDGNURH[ZlbFMSG8gCoF:ZlbFMSG8gCoF + nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(7818 - 7707) + chr(49), 8), :].hq6XE4_Nhd6R lmLTjtHGkU5F[:, :nzTpIcepk0o8('\060' + chr(0b101 + 0o152) + chr(51), 8)] = h_VzK06Vhuuv(PmE5_h409JAA).hq6XE4_Nhd6R MbjAvyP4Qyak += lmLTjtHGkU5F.T.dot(NoZxuO7wjArS).dot(NoZxuO7wjArS.T).dot(lmLTjtHGkU5F) xFDEVQn5qSdh += lmLTjtHGkU5F.T.dot(NoZxuO7wjArS).dot(NoZxuO7wjArS.T).dot(h3Vc_4wxEbgd - PmE5_h409JAA) feMM1nZ2HoJS += lmLTjtHGkU5F.T.dot(lmLTjtHGkU5F) DA9NkkCrZco1 += lmLTjtHGkU5F.T.dot(h3Vc_4wxEbgd - PmE5_h409JAA) r7AA1pbLjb44 = nDF4gVNx0u9Q.linalg.solve(MbjAvyP4Qyak + hXMPsSrOQzbh.gamma_ * feMM1nZ2HoJS + hXMPsSrOQzbh.mu_ * nDF4gVNx0u9Q.sWQ4p7UMdVY3(nzTpIcepk0o8(chr(1126 - 1078) + chr(0b1101111) + '\x36', 8)), xFDEVQn5qSdh + hXMPsSrOQzbh.gamma_ * DA9NkkCrZco1) stVGsv3MKjDy = nDF4gVNx0u9Q.sWQ4p7UMdVY3(nzTpIcepk0o8('\x30' + chr(111) + chr(51), 8)) stVGsv3MKjDy = stVGsv3MKjDy + h_VzK06Vhuuv(r7AA1pbLjb44[:nzTpIcepk0o8(chr(0b101100 + 0o4) + '\x6f' + chr(576 - 525), 8)]) (gkx2kn9x1cnU, buieUxkpnZk3, C6LOzGNdNRfI) = nDF4gVNx0u9Q.linalg.svd(stVGsv3MKjDy) stVGsv3MKjDy = gkx2kn9x1cnU.dot(C6LOzGNdNRfI) h3Vc_4wxEbgd = r7AA1pbLjb44[nzTpIcepk0o8(chr(1015 - 967) + chr(10457 - 10346) + '\063', 8):] lZrrtmOPdeNT = stVGsv3MKjDy.dot(lZrrtmOPdeNT) tbPq8XPFe2Ac = stVGsv3MKjDy.dot(tbPq8XPFe2Ac) + h3Vc_4wxEbgd ProtbCLUaYsk = xrsN7tOaUcVT(lZrrtmOPdeNT, tbPq8XPFe2Ac, from_frame=I0SpPcwHsuXB.KZ4ew2qs1HTO, to_frame=pRrT4jHIdRM3.KZ4ew2qs1HTO) Qn3wsmLiKKhx = nzTpIcepk0o8(chr(0b110000) + chr(3209 - 3098) + chr(1992 - 1944), 8) Q5jUuaw7weI7 = (lZrrtmOPdeNT.dot(b_we6WWF4q87.T) + nDF4gVNx0u9Q.tile(tbPq8XPFe2Ac, [nzTpIcepk0o8(chr(1938 - 1890) + chr(10819 - 10708) + chr(49), 8), b_we6WWF4q87.shape[nzTpIcepk0o8(chr(1702 - 1654) + '\157' + '\x30', 8)]])).hq6XE4_Nhd6R EfNZwIhYhxcv = lZrrtmOPdeNT.dot(wp74_mHw35rH.T).hq6XE4_Nhd6R if lLfDBMuUuFbl: inE7TRX51SFq = R0txZRpFTkm6.hk9OijmiC_zA(Q5jUuaw7weI7, hb0UTfNPVbVq, EfNZwIhYhxcv, xgjPiVY5AHFZ) LkZIT6uX1BAe = nDF4gVNx0u9Q.xWH4M7K6Qbd3(inE7TRX51SFq.index_map != -nzTpIcepk0o8('\x30' + '\157' + '\x31', 8))[nzTpIcepk0o8(chr(912 - 864) + '\157' + '\060', 8)] xog6m5eM_A6a = LkZIT6uX1BAe.lhbM092AFW8f[nzTpIcepk0o8('\x30' + chr(8057 - 7946) + chr(48), 8)] if xog6m5eM_A6a == nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b100101 + 0o13), 8): return B1tUYfadoMDP(ProtbCLUaYsk, roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'S\xb9\xce\xaf\xfa\xa4\x85F\xdb\x0b\xc17'), chr(0b1100100) + '\x65' + chr(99) + chr(5030 - 4919) + chr(0b1111 + 0o125) + '\x65')('\x75' + chr(967 - 851) + chr(1751 - 1649) + '\055' + '\x38'))) vN6OJ4rgXI38 = inE7TRX51SFq.source_points[LkZIT6uX1BAe, :] H1FZzagSJW9A = inE7TRX51SFq.target_points[inE7TRX51SFq.index_map[LkZIT6uX1BAe], :] aQhBhKDGNURH = inE7TRX51SFq.target_normals[inE7TRX51SFq.index_map[LkZIT6uX1BAe], :] CvSaVy2dkuFV = nDF4gVNx0u9Q.diag((vN6OJ4rgXI38 - H1FZzagSJW9A).dot(aQhBhKDGNURH.hq6XE4_Nhd6R)) fACDSCNU_v9f = 1.0 / xog6m5eM_A6a * nDF4gVNx0u9Q.oclC8DLjA_lV(CvSaVy2dkuFV * CvSaVy2dkuFV) x9R3fj3mnbEB = 1.0 / xog6m5eM_A6a * nDF4gVNx0u9Q.oclC8DLjA_lV(nDF4gVNx0u9Q.linalg.xBFFJFaziFDU(vN6OJ4rgXI38 - H1FZzagSJW9A, axis=nzTpIcepk0o8('\060' + chr(111) + chr(0b110001), 8)) ** nzTpIcepk0o8(chr(610 - 562) + chr(0b1101111) + chr(187 - 137), 0b1000)) Qn3wsmLiKKhx = fACDSCNU_v9f + hXMPsSrOQzbh.gamma_ * x9R3fj3mnbEB return B1tUYfadoMDP(ProtbCLUaYsk, Qn3wsmLiKKhx)
BerkeleyAutomation/perception
perception/camera_sensor.py
VirtualSensor.frames
def frames(self): """Retrieve the next frame from the image directory and convert it to a ColorImage, a DepthImage, and an IrImage. Parameters ---------- skip_registration : bool If True, the registration step is skipped. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame. Raises ------ RuntimeError If the stream is not running or if all images in the directory have been used. """ if not self._running: raise RuntimeError('Device pointing to %s not runnning. Cannot read frames' %(self._path_to_images)) if self._im_index >= self._num_images: raise RuntimeError('Device is out of images') # read images color_filename = os.path.join(self._path_to_images, 'color_%d%s' %(self._im_index, self._color_ext)) color_im = ColorImage.open(color_filename, frame=self._frame) depth_filename = os.path.join(self._path_to_images, 'depth_%d.npy' %(self._im_index)) depth_im = DepthImage.open(depth_filename, frame=self._frame) self._im_index = (self._im_index + 1) % self._num_images return color_im, depth_im, None
python
def frames(self): """Retrieve the next frame from the image directory and convert it to a ColorImage, a DepthImage, and an IrImage. Parameters ---------- skip_registration : bool If True, the registration step is skipped. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame. Raises ------ RuntimeError If the stream is not running or if all images in the directory have been used. """ if not self._running: raise RuntimeError('Device pointing to %s not runnning. Cannot read frames' %(self._path_to_images)) if self._im_index >= self._num_images: raise RuntimeError('Device is out of images') # read images color_filename = os.path.join(self._path_to_images, 'color_%d%s' %(self._im_index, self._color_ext)) color_im = ColorImage.open(color_filename, frame=self._frame) depth_filename = os.path.join(self._path_to_images, 'depth_%d.npy' %(self._im_index)) depth_im = DepthImage.open(depth_filename, frame=self._frame) self._im_index = (self._im_index + 1) % self._num_images return color_im, depth_im, None
[ "def", "frames", "(", "self", ")", ":", "if", "not", "self", ".", "_running", ":", "raise", "RuntimeError", "(", "'Device pointing to %s not runnning. Cannot read frames'", "%", "(", "self", ".", "_path_to_images", ")", ")", "if", "self", ".", "_im_index", ">=", "self", ".", "_num_images", ":", "raise", "RuntimeError", "(", "'Device is out of images'", ")", "# read images", "color_filename", "=", "os", ".", "path", ".", "join", "(", "self", ".", "_path_to_images", ",", "'color_%d%s'", "%", "(", "self", ".", "_im_index", ",", "self", ".", "_color_ext", ")", ")", "color_im", "=", "ColorImage", ".", "open", "(", "color_filename", ",", "frame", "=", "self", ".", "_frame", ")", "depth_filename", "=", "os", ".", "path", ".", "join", "(", "self", ".", "_path_to_images", ",", "'depth_%d.npy'", "%", "(", "self", ".", "_im_index", ")", ")", "depth_im", "=", "DepthImage", ".", "open", "(", "depth_filename", ",", "frame", "=", "self", ".", "_frame", ")", "self", ".", "_im_index", "=", "(", "self", ".", "_im_index", "+", "1", ")", "%", "self", ".", "_num_images", "return", "color_im", ",", "depth_im", ",", "None" ]
Retrieve the next frame from the image directory and convert it to a ColorImage, a DepthImage, and an IrImage. Parameters ---------- skip_registration : bool If True, the registration step is skipped. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame. Raises ------ RuntimeError If the stream is not running or if all images in the directory have been used.
[ "Retrieve", "the", "next", "frame", "from", "the", "image", "directory", "and", "convert", "it", "to", "a", "ColorImage", "a", "DepthImage", "and", "an", "IrImage", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/camera_sensor.py#L190-L222
train
Retrieve the next frame from the image directory and convert it to a ColorImage DepthImage and IrImage.
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,TdYHR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c,_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' + '\x6f' + chr(0b10111 + 0o33) + '\065' + '\x37', 0b1000), nzTpIcepk0o8(chr(0b1 + 0o57) + '\x6f' + '\x33' + chr(53) + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + '\060' + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(0b1101111) + '\x31' + '\x35' + '\x35', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(0b1011 + 0o46) + '\x32' + chr(284 - 235), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1989 - 1940) + chr(48) + chr(378 - 327), 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + chr(0b110010) + '\063' + chr(0b110001), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10100 + 0o35) + '\064' + '\062', 0o10), nzTpIcepk0o8(chr(48) + chr(0b101000 + 0o107) + chr(0b1011 + 0o47) + '\x35' + '\x37', 8), nzTpIcepk0o8('\060' + chr(111) + chr(958 - 909) + chr(1247 - 1197) + chr(51), 20601 - 20593), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + '\061' + '\x35', 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(0b110010) + chr(0b110011), 8), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(111) + '\x32' + chr(0b110110) + '\x33', 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(10214 - 10103) + chr(0b110000 + 0o2) + chr(0b110001) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\157' + chr(0b110011) + chr(0b110101 + 0o0) + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + chr(1664 - 1614) + '\x36' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(0b110101) + chr(53), 8), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b1001100 + 0o43) + '\x33' + chr(0b110010) + '\064', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b1 + 0o60) + chr(0b110000) + chr(50), 0o10), nzTpIcepk0o8(chr(1660 - 1612) + chr(0b1101111) + '\062' + '\066', 56252 - 56244), nzTpIcepk0o8(chr(48) + chr(1791 - 1680) + chr(0b100111 + 0o12) + chr(0b110101), 9192 - 9184), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\157' + '\065' + '\x35', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(0b110101) + chr(2136 - 2081), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(534 - 484) + '\061' + chr(919 - 866), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b10100 + 0o36) + '\064' + '\x31', 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x36' + chr(48), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + '\063' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\157' + chr(0b110001) + '\x31' + chr(1183 - 1132), 1837 - 1829), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + chr(49) + '\x37', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(993 - 942) + '\064' + chr(0b101001 + 0o16), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1 + 0o63) + chr(0b11000 + 0o31), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(50) + chr(776 - 721) + '\x35', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b11001 + 0o30) + chr(53) + chr(0b100111 + 0o14), 9452 - 9444), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + '\061' + chr(0b110001 + 0o2), 0o10), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(0b101111 + 0o100) + chr(0b110001) + chr(0b10111 + 0o32) + chr(0b110110), 25290 - 25282), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b1101111) + '\x33' + chr(764 - 714) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(1170 - 1121) + chr(55) + '\061', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1000001 + 0o56) + chr(0b110110) + '\x30', 8), nzTpIcepk0o8(chr(237 - 189) + chr(111) + chr(0b10101 + 0o42) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(0b10111 + 0o36) + '\x31', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(111) + chr(847 - 794) + '\060', 62827 - 62819)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x81'), chr(0b1100100 + 0o0) + '\x65' + chr(99) + chr(5500 - 5389) + chr(0b1000011 + 0o41) + chr(2042 - 1941))(chr(0b1110101) + chr(116) + chr(102) + '\x2d' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def G4Lisexwxqjs(hXMPsSrOQzbh): if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xe6\xa9u*a\x01\xaaU\xdf:\xdf0'), '\x64' + '\145' + '\x63' + chr(0b1101111) + chr(3037 - 2937) + chr(0b1100101))(chr(0b1110101) + '\x74' + '\x66' + '\x2d' + chr(56))): raise _1qUu0gKi9gH(roI3spqORKae(ES5oEprVxulp(b'\xeb\x8a7\x042&\xb9\x12\xc0:\xe3\'\xda\xe6\x8b\x96\x19\xbbb3~\r\x01\xe2\xd5\x10\xae>\xe1\x89O\xd4\x05\xac`\xf6:QV\x87\xc0\x9ba\x1f4"\xfdB\xc9!\xec>\xd6\xfb'), chr(0b1100100) + chr(0b101010 + 0o73) + '\x63' + '\x6f' + chr(100) + chr(0b1100101))(chr(117) + chr(0b101000 + 0o114) + chr(102) + chr(0b101101) + chr(2844 - 2788)) % roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf0\x9f \x199\x1c\xed\r\xf0:\xe02\xd4\xed\x9f'), chr(0b10011 + 0o121) + chr(5935 - 5834) + '\x63' + '\x6f' + chr(0b110000 + 0o64) + '\x65')('\165' + '\x74' + chr(0b1100110) + chr(0b101101) + chr(2802 - 2746)))) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf0\x86,28-\xfd\x07\xd7'), '\144' + chr(0b10 + 0o143) + chr(99) + '\157' + chr(0b1010 + 0o132) + chr(1493 - 1392))(chr(117) + chr(0b100000 + 0o124) + '\146' + chr(45) + chr(0b111000))) >= roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xf0\x814\x00\x0e*\xf4\x03\xc86\xfe'), chr(5654 - 5554) + chr(101) + '\143' + '\x6f' + '\x64' + chr(101))(chr(0b1011101 + 0o30) + '\164' + '\146' + '\055' + chr(0b111000))): raise _1qUu0gKi9gH(roI3spqORKae(ES5oEprVxulp(b'\xeb\x8a7\x042&\xb9\x0b\xdcs\xe2&\xc7\xa8\x83\xd0M\xbd/wjH\x1c'), '\x64' + '\145' + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(4866 - 4765))('\165' + chr(0b1110100) + chr(7692 - 7590) + chr(180 - 135) + chr(0b100001 + 0o27))) FGcKYMgHFZRr = aHUqKstZLeS6.path.Y4yM9BcfTCNq(hXMPsSrOQzbh._path_to_images, roI3spqORKae(ES5oEprVxulp(b'\xcc\x80-\x02#\x1c\xbc\x06\x8a '), chr(100) + chr(0b1100101) + chr(0b100110 + 0o75) + chr(111) + '\x64' + chr(0b110100 + 0o61))(chr(0b1110101) + chr(116) + chr(0b100000 + 0o106) + chr(0b11000 + 0o25) + chr(0b100011 + 0o25)) % (hXMPsSrOQzbh._im_index, hXMPsSrOQzbh._color_ext)) GFVgEmwvG0jZ = lPn7XfHAFaXG.DnU3Rq9N5ala(FGcKYMgHFZRr, frame=hXMPsSrOQzbh.j6C2nrwvuP04) DwQZSsWL9MR2 = aHUqKstZLeS6.path.Y4yM9BcfTCNq(hXMPsSrOQzbh._path_to_images, roI3spqORKae(ES5oEprVxulp(b'\xcb\x8a1\x199\x1c\xbc\x06\x81=\xfd*'), chr(100) + '\145' + chr(0b1100011) + chr(111) + chr(100) + '\x65')(chr(0b1110101) + chr(0b1110100) + chr(0b10001 + 0o125) + chr(45) + chr(56)) % hXMPsSrOQzbh._im_index) WZcCXRnThfxU = Ctd7ihpXT1E5.DnU3Rq9N5ala(DwQZSsWL9MR2, frame=hXMPsSrOQzbh.j6C2nrwvuP04) hXMPsSrOQzbh.G8yNfNzOHXfZ = (hXMPsSrOQzbh.G8yNfNzOHXfZ + nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49), 21350 - 21342)) % hXMPsSrOQzbh._num_images return (GFVgEmwvG0jZ, WZcCXRnThfxU, None)
BerkeleyAutomation/perception
perception/camera_sensor.py
VirtualSensor.median_depth_img
def median_depth_img(self, num_img=1): """Collect a series of depth images and return the median of the set. Parameters ---------- num_img : int The number of consecutive frames to process. Returns ------- :obj:`DepthImage` The median DepthImage collected from the frames. """ depths = [] for _ in range(num_img): _, depth, _ = self.frames() depths.append(depth) return Image.median_images(depths)
python
def median_depth_img(self, num_img=1): """Collect a series of depth images and return the median of the set. Parameters ---------- num_img : int The number of consecutive frames to process. Returns ------- :obj:`DepthImage` The median DepthImage collected from the frames. """ depths = [] for _ in range(num_img): _, depth, _ = self.frames() depths.append(depth) return Image.median_images(depths)
[ "def", "median_depth_img", "(", "self", ",", "num_img", "=", "1", ")", ":", "depths", "=", "[", "]", "for", "_", "in", "range", "(", "num_img", ")", ":", "_", ",", "depth", ",", "_", "=", "self", ".", "frames", "(", ")", "depths", ".", "append", "(", "depth", ")", "return", "Image", ".", "median_images", "(", "depths", ")" ]
Collect a series of depth images and return the median of the set. Parameters ---------- num_img : int The number of consecutive frames to process. Returns ------- :obj:`DepthImage` The median DepthImage collected from the frames.
[ "Collect", "a", "series", "of", "depth", "images", "and", "return", "the", "median", "of", "the", "set", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/camera_sensor.py#L224-L243
train
Collect a series of depth images and return the median of the set.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lF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N5Phrq,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(0b110001 + 0o0) + chr(0b110110) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100000 + 0o22) + chr(0b101010 + 0o7) + '\x36', 19858 - 19850), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + chr(1648 - 1597) + chr(1382 - 1328) + chr(802 - 747), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b1001 + 0o52) + chr(0b11 + 0o55) + '\x37', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(1173 - 1119) + chr(52), 0o10), nzTpIcepk0o8('\x30' + chr(7624 - 7513) + chr(0b110000 + 0o1) + chr(777 - 723), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + chr(54) + chr(50), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(714 - 665) + chr(1282 - 1233) + chr(0b100011 + 0o24), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(11430 - 11319) + '\x32' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + chr(5171 - 5060) + '\x32' + '\061' + '\066', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(50) + chr(0b110000) + chr(2316 - 2264), 0b1000), nzTpIcepk0o8(chr(151 - 103) + chr(0b1101111) + '\x35' + chr(1050 - 1002), ord("\x08")), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\157' + chr(0b1110 + 0o44) + chr(66 - 13) + '\065', 0o10), nzTpIcepk0o8(chr(644 - 596) + '\157' + chr(0b110011) + '\066' + '\060', 0b1000), nzTpIcepk0o8('\060' + chr(1947 - 1836) + chr(49) + chr(0b101101 + 0o12) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b10000 + 0o41) + chr(0b110110) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b1010 + 0o47) + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + '\157' + '\x32' + chr(50) + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + chr(0b101001 + 0o106) + '\x37' + chr(0b11111 + 0o21), 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(111) + chr(54) + chr(0b110011), 43319 - 43311), nzTpIcepk0o8(chr(1485 - 1437) + chr(0b1101111) + '\x31' + '\x36' + '\063', 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b101101 + 0o5) + chr(0b10100 + 0o34) + '\x34', 8), nzTpIcepk0o8('\x30' + '\157' + chr(50) + chr(0b110111) + chr(52), 49280 - 49272), nzTpIcepk0o8('\x30' + chr(4666 - 4555) + chr(0b10 + 0o60) + chr(0b101001 + 0o14) + '\x36', 0o10), nzTpIcepk0o8(chr(124 - 76) + chr(0b111111 + 0o60) + '\x32' + chr(0b110101) + '\067', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1000 + 0o52) + chr(52) + '\065', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(10104 - 9993) + chr(51) + chr(0b110100) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(7687 - 7576) + chr(0b110011) + chr(53) + chr(1683 - 1628), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(51) + chr(0b11010 + 0o32) + chr(0b1 + 0o61), ord("\x08")), nzTpIcepk0o8('\060' + chr(6589 - 6478) + chr(0b110101) + '\067', 51738 - 51730), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(111) + chr(1894 - 1844), 0b1000), nzTpIcepk0o8(chr(48) + chr(1711 - 1600) + chr(51) + '\x31', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1258 - 1209) + chr(50), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33' + chr(2622 - 2567) + '\x37', 26075 - 26067), nzTpIcepk0o8(chr(0b110000) + chr(0b100000 + 0o117) + chr(50) + chr(2380 - 2331), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b10000 + 0o42) + chr(50) + chr(0b110001), 34023 - 34015), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + '\063' + chr(0b101101 + 0o12), ord("\x08")), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + chr(49) + chr(51) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + chr(0b101 + 0o54) + chr(0b1111 + 0o45) + chr(0b10110 + 0o41), 0b1000), nzTpIcepk0o8('\060' + '\157' + '\063' + '\065', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110101) + chr(48), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b']'), chr(9134 - 9034) + chr(101) + '\143' + '\157' + chr(0b1100100) + chr(4202 - 4101))('\165' + '\164' + chr(0b1100110) + '\055' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def atJBEiOq_lLt(hXMPsSrOQzbh, eVRCGQa70gNM=nzTpIcepk0o8(chr(48) + chr(0b1001001 + 0o46) + chr(49), 0b1000)): UjxwtHwihe1B = [] for zIqcgNgQ9U6F in bbT2xIe5pzk7(eVRCGQa70gNM): (zIqcgNgQ9U6F, UH0YjwuI_XzX, zIqcgNgQ9U6F) = hXMPsSrOQzbh.G4Lisexwxqjs() roI3spqORKae(UjxwtHwihe1B, roI3spqORKae(ES5oEprVxulp(b';\xda\xa4\xf3Li\xb5 z\xe1\xd1\x1d'), chr(4573 - 4473) + chr(101) + chr(8789 - 8690) + '\x6f' + '\x64' + chr(101))(chr(12819 - 12702) + '\164' + chr(102) + '\x2d' + '\x38'))(UH0YjwuI_XzX) return roI3spqORKae(RvV7ueTH51Uy, roI3spqORKae(ES5oEprVxulp(b'\x1e\xeb\x93\xaeU`\xad&}\xef\xe3M\xde'), '\x64' + '\x65' + chr(99) + chr(3349 - 3238) + chr(4120 - 4020) + chr(7928 - 7827))(chr(0b1110101) + '\x74' + '\146' + chr(1937 - 1892) + chr(1805 - 1749)))(UjxwtHwihe1B)
BerkeleyAutomation/perception
perception/camera_sensor.py
TensorDatasetVirtualSensor.frames
def frames(self): """Retrieve the next frame from the tensor dataset and convert it to a ColorImage, a DepthImage, and an IrImage. Parameters ---------- skip_registration : bool If True, the registration step is skipped. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame. Raises ------ RuntimeError If the stream is not running or if all images in the directory have been used. """ if not self._running: raise RuntimeError('Device pointing to %s not runnning. Cannot read frames' %(self._path_to_images)) if self._im_index >= self._num_images: raise RuntimeError('Device is out of images') # read images datapoint = self._dataset.datapoint(self._im_index, TensorDatasetVirtualSensor.IMAGE_FIELDS) color_im = ColorImage(datapoint[TensorDatasetVirtualSensor.COLOR_IM_FIELD], frame=self._frame) depth_im = DepthImage(datapoint[TensorDatasetVirtualSensor.DEPTH_IM_FIELD], frame=self._frame) if self._image_rescale_factor != 1.0: color_im = color_im.resize(self._image_rescale_factor) depth_im = depth_im.resize(self._image_rescale_factor, interp='nearest') self._im_index = (self._im_index + 1) % self._num_images return color_im, depth_im, None
python
def frames(self): """Retrieve the next frame from the tensor dataset and convert it to a ColorImage, a DepthImage, and an IrImage. Parameters ---------- skip_registration : bool If True, the registration step is skipped. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame. Raises ------ RuntimeError If the stream is not running or if all images in the directory have been used. """ if not self._running: raise RuntimeError('Device pointing to %s not runnning. Cannot read frames' %(self._path_to_images)) if self._im_index >= self._num_images: raise RuntimeError('Device is out of images') # read images datapoint = self._dataset.datapoint(self._im_index, TensorDatasetVirtualSensor.IMAGE_FIELDS) color_im = ColorImage(datapoint[TensorDatasetVirtualSensor.COLOR_IM_FIELD], frame=self._frame) depth_im = DepthImage(datapoint[TensorDatasetVirtualSensor.DEPTH_IM_FIELD], frame=self._frame) if self._image_rescale_factor != 1.0: color_im = color_im.resize(self._image_rescale_factor) depth_im = depth_im.resize(self._image_rescale_factor, interp='nearest') self._im_index = (self._im_index + 1) % self._num_images return color_im, depth_im, None
[ "def", "frames", "(", "self", ")", ":", "if", "not", "self", ".", "_running", ":", "raise", "RuntimeError", "(", "'Device pointing to %s not runnning. Cannot read frames'", "%", "(", "self", ".", "_path_to_images", ")", ")", "if", "self", ".", "_im_index", ">=", "self", ".", "_num_images", ":", "raise", "RuntimeError", "(", "'Device is out of images'", ")", "# read images", "datapoint", "=", "self", ".", "_dataset", ".", "datapoint", "(", "self", ".", "_im_index", ",", "TensorDatasetVirtualSensor", ".", "IMAGE_FIELDS", ")", "color_im", "=", "ColorImage", "(", "datapoint", "[", "TensorDatasetVirtualSensor", ".", "COLOR_IM_FIELD", "]", ",", "frame", "=", "self", ".", "_frame", ")", "depth_im", "=", "DepthImage", "(", "datapoint", "[", "TensorDatasetVirtualSensor", ".", "DEPTH_IM_FIELD", "]", ",", "frame", "=", "self", ".", "_frame", ")", "if", "self", ".", "_image_rescale_factor", "!=", "1.0", ":", "color_im", "=", "color_im", ".", "resize", "(", "self", ".", "_image_rescale_factor", ")", "depth_im", "=", "depth_im", ".", "resize", "(", "self", ".", "_image_rescale_factor", ",", "interp", "=", "'nearest'", ")", "self", ".", "_im_index", "=", "(", "self", ".", "_im_index", "+", "1", ")", "%", "self", ".", "_num_images", "return", "color_im", ",", "depth_im", ",", "None" ]
Retrieve the next frame from the tensor dataset and convert it to a ColorImage, a DepthImage, and an IrImage. Parameters ---------- skip_registration : bool If True, the registration step is skipped. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame. Raises ------ RuntimeError If the stream is not running or if all images in the directory have been used.
[ "Retrieve", "the", "next", "frame", "from", "the", "tensor", "dataset", "and", "convert", "it", "to", "a", "ColorImage", "a", "DepthImage", "and", "an", "IrImage", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/camera_sensor.py#L275-L312
train
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Di_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(7159 - 7048) + '\061' + '\x35' + chr(691 - 643), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\x35' + chr(48), 8), nzTpIcepk0o8(chr(1581 - 1533) + '\157' + '\062' + chr(49) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1001101 + 0o42) + chr(0b110010) + chr(48) + '\x30', 10258 - 10250), nzTpIcepk0o8(chr(1983 - 1935) + chr(7471 - 7360) + chr(51) + chr(0b10000 + 0o46) + chr(0b110101), 9290 - 9282), nzTpIcepk0o8(chr(48) + chr(0b1010010 + 0o35) + chr(49) + '\062' + '\060', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(878 - 828) + chr(54) + chr(699 - 644), 0b1000), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1001010 + 0o45) + '\x33' + chr(48) + chr(1089 - 1039), ord("\x08")), nzTpIcepk0o8(chr(328 - 280) + chr(0b1101111) + chr(2370 - 2319) + '\060' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(758 - 710) + '\157' + chr(0b100010 + 0o17) + '\x30' + chr(0b10100 + 0o36), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110010) + chr(48) + '\x31', 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\x37' + chr(1312 - 1257), ord("\x08")), nzTpIcepk0o8(chr(2016 - 1968) + chr(0b1101111) + chr(0b110010) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(0b110010) + chr(1129 - 1080), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\061' + chr(0b110100) + '\062', 0b1000), nzTpIcepk0o8('\060' + chr(0b111011 + 0o64) + chr(0b10110 + 0o34) + chr(0b110111) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(2111 - 2063) + chr(0b1101111) + '\x32' + chr(0b10011 + 0o40) + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(55) + '\066', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(0b110000) + chr(53), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + '\062' + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\x31' + chr(0b10101 + 0o41) + chr(345 - 292), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b10001 + 0o40) + chr(51) + chr(537 - 484), 0b1000), nzTpIcepk0o8('\060' + chr(11437 - 11326) + chr(0b110011) + chr(0b110000 + 0o0) + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110100) + '\065', 46923 - 46915), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(8931 - 8820) + chr(0b101001 + 0o11) + chr(0b10000 + 0o47) + chr(2590 - 2537), 0b1000), nzTpIcepk0o8(chr(48) + chr(7946 - 7835) + '\x32' + '\062' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(1177 - 1129) + chr(0b1101101 + 0o2) + chr(0b110011) + chr(0b110000) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101111) + '\x32' + chr(0b110001) + chr(1859 - 1806), 8255 - 8247), nzTpIcepk0o8(chr(48) + chr(8970 - 8859) + '\x31' + chr(0b100011 + 0o16) + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + chr(0b1001101 + 0o42) + chr(0b110011) + chr(0b1010 + 0o47), ord("\x08")), nzTpIcepk0o8(chr(591 - 543) + chr(0b1101111) + chr(0b100010 + 0o17) + '\064' + '\x31', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(3491 - 3380) + chr(0b110011) + chr(0b11111 + 0o27) + chr(0b110011), 32947 - 32939), nzTpIcepk0o8(chr(401 - 353) + chr(111) + chr(0b100111 + 0o13) + '\x35' + chr(0b110111), 42296 - 42288), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\157' + chr(0b100100 + 0o17) + '\060' + chr(0b101010 + 0o15), 0o10), nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(9506 - 9395) + chr(0b110010) + '\063' + chr(50), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(0b10110 + 0o35) + chr(48), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + '\061' + '\x36', 14858 - 14850), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(79 - 28) + chr(1583 - 1529), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + '\x30', 0b1000), nzTpIcepk0o8('\060' + chr(7405 - 7294) + chr(52) + chr(52), ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\065' + chr(48), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'F'), '\144' + chr(101) + chr(0b1100011) + chr(0b101101 + 0o102) + chr(0b110100 + 0o60) + '\145')(chr(5555 - 5438) + chr(13123 - 13007) + '\x66' + '\x2d' + chr(2724 - 2668)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def G4Lisexwxqjs(hXMPsSrOQzbh): if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'!.\xbc\xc7\xc5\x12\x84\xf5\xb5+\xd3\\'), chr(100) + '\145' + '\143' + '\x6f' + chr(100) + chr(3092 - 2991))('\165' + '\164' + '\x66' + '\055' + chr(0b111000))): raise _1qUu0gKi9gH(roI3spqORKae(ES5oEprVxulp(b',\r\xfe\xe9\x965\x97\xb2\xaa+\xefK~?\x05\x9e\xecQ\xe5\xf4\x06}\xaeJ\xc9\xb5\xb3\xf8\'w\x0f\x9a\xc1\xa0\xb4\xf8\r\xfffJ\x07\x1c\xa8\xf2\x901\xd3\xe2\xa30\xe0Rr"'), '\x64' + '\x65' + '\x63' + '\157' + '\144' + chr(0b1100101))(chr(0b1110101) + chr(12870 - 12754) + chr(0b1010110 + 0o20) + chr(0b100101 + 0o10) + chr(56)) % roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'7\x18\xe9\xf4\x9d\x0f\xc3\xad\x9a+\xec^p4\x11'), '\x64' + '\145' + '\143' + chr(111) + '\x64' + '\145')(chr(5284 - 5167) + chr(116) + chr(0b1100110) + chr(45) + '\x38'))) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'/P\xf1\xce\x93\x1e\xcd\x8d\x8d\x1a\xe7e'), chr(0b1001110 + 0o26) + '\x65' + chr(0b11001 + 0o112) + '\157' + chr(3582 - 3482) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(0b1100110) + '\x2d' + chr(491 - 435))) >= roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"7\x06\xfd\xed\xaa9\xda\xa3\xa2'\xf2"), chr(1670 - 1570) + chr(9732 - 9631) + chr(3740 - 3641) + chr(0b1100 + 0o143) + chr(0b101101 + 0o67) + chr(0b1100101))(chr(4152 - 4035) + chr(116) + chr(0b1100110) + chr(45) + chr(0b10111 + 0o41))): raise _1qUu0gKi9gH(roI3spqORKae(ES5oEprVxulp(b',\r\xfe\xe9\x965\x97\xab\xb6b\xeeJcq\r\xd8\xb8W\xa8\xb0\x128\xb3'), chr(0b1100100) + chr(6664 - 6563) + chr(0b1100011) + '\x6f' + chr(100) + chr(101))(chr(0b111010 + 0o73) + chr(6179 - 6063) + '\146' + '\x2d' + chr(0b1110 + 0o52))) APkKMtW30Yg_ = hXMPsSrOQzbh._dataset.datapoint(hXMPsSrOQzbh.G8yNfNzOHXfZ, zg_Mia__pWCd.IMAGE_FIELDS) GFVgEmwvG0jZ = lPn7XfHAFaXG(APkKMtW30Yg_[zg_Mia__pWCd.COLOR_IM_FIELD], frame=hXMPsSrOQzbh.j6C2nrwvuP04) WZcCXRnThfxU = Ctd7ihpXT1E5(APkKMtW30Yg_[zg_Mia__pWCd.DEPTH_IM_FIELD], frame=hXMPsSrOQzbh.j6C2nrwvuP04) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'7\x01\xe5\xe1\x925\xe8\xb0\xa01\xe2^{4=\xd8\xf9]\xb1\xbe\x07'), '\144' + chr(8782 - 8681) + chr(0b1101 + 0o126) + '\x6f' + chr(0b1100100) + chr(0b1100001 + 0o4))(chr(0b1110101) + chr(0b1110100) + chr(1255 - 1153) + '\055' + '\x38')) != 1.0: GFVgEmwvG0jZ = GFVgEmwvG0jZ.resize(hXMPsSrOQzbh._image_rescale_factor) WZcCXRnThfxU = WZcCXRnThfxU.resize(hXMPsSrOQzbh._image_rescale_factor, interp=roI3spqORKae(ES5oEprVxulp(b'\x06\r\xe9\xf2\x90#\xc3'), chr(300 - 200) + chr(0b1100101) + '\143' + '\x6f' + '\144' + chr(502 - 401))('\x75' + chr(11048 - 10932) + '\x66' + '\055' + chr(56))) hXMPsSrOQzbh.G8yNfNzOHXfZ = (hXMPsSrOQzbh.G8yNfNzOHXfZ + nzTpIcepk0o8(chr(48) + chr(11992 - 11881) + chr(49), 0o10)) % hXMPsSrOQzbh._num_images return (GFVgEmwvG0jZ, WZcCXRnThfxU, None)
BerkeleyAutomation/perception
perception/primesense_sensor.py
PrimesenseSensor.color_intrinsics
def color_intrinsics(self): """:obj:`CameraIntrinsics` : The camera intrinsics for the primesense color camera. """ return CameraIntrinsics(self._ir_frame, PrimesenseSensor.FOCAL_X, PrimesenseSensor.FOCAL_Y, PrimesenseSensor.CENTER_X, PrimesenseSensor.CENTER_Y, height=PrimesenseSensor.DEPTH_IM_HEIGHT, width=PrimesenseSensor.DEPTH_IM_WIDTH)
python
def color_intrinsics(self): """:obj:`CameraIntrinsics` : The camera intrinsics for the primesense color camera. """ return CameraIntrinsics(self._ir_frame, PrimesenseSensor.FOCAL_X, PrimesenseSensor.FOCAL_Y, PrimesenseSensor.CENTER_X, PrimesenseSensor.CENTER_Y, height=PrimesenseSensor.DEPTH_IM_HEIGHT, width=PrimesenseSensor.DEPTH_IM_WIDTH)
[ "def", "color_intrinsics", "(", "self", ")", ":", "return", "CameraIntrinsics", "(", "self", ".", "_ir_frame", ",", "PrimesenseSensor", ".", "FOCAL_X", ",", "PrimesenseSensor", ".", "FOCAL_Y", ",", "PrimesenseSensor", ".", "CENTER_X", ",", "PrimesenseSensor", ".", "CENTER_Y", ",", "height", "=", "PrimesenseSensor", ".", "DEPTH_IM_HEIGHT", ",", "width", "=", "PrimesenseSensor", ".", "DEPTH_IM_WIDTH", ")" ]
:obj:`CameraIntrinsics` : The camera intrinsics for the primesense color camera.
[ ":", "obj", ":", "CameraIntrinsics", ":", "The", "camera", "intrinsics", "for", "the", "primesense", "color", "camera", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/primesense_sensor.py#L67-L73
train
Returns a new CameraIntrinsics object for the primesense color camera.
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,VwkB9re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,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(0b111011 + 0o64) + '\x33' + chr(0b110111) + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + chr(7935 - 7824) + chr(0b11110 + 0o25) + chr(49) + chr(53), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(6422 - 6311) + chr(51) + '\060' + chr(0b110011), 21372 - 21364), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + '\061' + chr(2389 - 2339), 36847 - 36839), nzTpIcepk0o8(chr(0b110000) + chr(0b1010111 + 0o30) + chr(2409 - 2354), 33475 - 33467), nzTpIcepk0o8('\060' + '\157' + chr(53) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(0b1101111) + '\063' + '\060' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1244 - 1194) + chr(1387 - 1335) + chr(0b100000 + 0o21), 0b1000), nzTpIcepk0o8(chr(796 - 748) + chr(0b0 + 0o157) + chr(51) + chr(1115 - 1065) + chr(0b101110 + 0o6), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(54) + chr(0b100111 + 0o14), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b100110 + 0o111) + chr(156 - 107) + chr(386 - 336) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1000000 + 0o57) + '\063' + chr(50) + chr(48), 13574 - 13566), nzTpIcepk0o8('\060' + chr(111) + '\x34' + '\x33', ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110 + 0o61) + chr(0b110010), 40141 - 40133), nzTpIcepk0o8(chr(48) + chr(9157 - 9046) + chr(0b1001 + 0o52) + '\066' + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2515 - 2463) + chr(48), 25157 - 25149), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(0b110011) + '\065', 0o10), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + chr(0b1110 + 0o43) + '\061' + '\060', 6496 - 6488), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1011 + 0o50) + '\x37' + chr(606 - 552), 47409 - 47401), nzTpIcepk0o8(chr(747 - 699) + chr(0b1101111) + chr(50) + chr(0b110100) + chr(2413 - 2362), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2352 - 2302) + '\067' + chr(0b100100 + 0o17), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(0b10100 + 0o40) + chr(2040 - 1989), 51491 - 51483), nzTpIcepk0o8('\060' + '\157' + '\063' + '\061' + chr(48), 0b1000), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(6754 - 6643) + chr(0b110011) + '\063' + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(111) + chr(0b101101 + 0o5) + chr(0b110111) + '\x31', ord("\x08")), nzTpIcepk0o8(chr(1610 - 1562) + chr(11880 - 11769) + chr(51) + chr(0b110100) + chr(0b1001 + 0o51), 0o10), nzTpIcepk0o8('\x30' + chr(4604 - 4493) + chr(0b101001 + 0o10) + chr(0b101010 + 0o11) + chr(722 - 669), 8), nzTpIcepk0o8(chr(1163 - 1115) + chr(0b1101111) + chr(2435 - 2385) + '\x33' + '\x33', 0b1000), nzTpIcepk0o8(chr(1342 - 1294) + chr(0b1110 + 0o141) + chr(606 - 556) + '\064' + chr(0b110111), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\062' + chr(1977 - 1927) + chr(54), 0b1000), nzTpIcepk0o8('\x30' + chr(850 - 739) + chr(0b1001 + 0o50) + chr(50) + chr(0b110011), 31996 - 31988), nzTpIcepk0o8('\x30' + '\157' + '\063' + '\065' + chr(51), 38126 - 38118), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(50) + '\x36' + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(8966 - 8855) + chr(0b110001) + '\x37' + '\x35', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\065' + '\063', ord("\x08")), nzTpIcepk0o8(chr(529 - 481) + chr(0b1001011 + 0o44) + chr(2411 - 2360) + '\x31' + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1100111 + 0o10) + chr(0b100001 + 0o21) + chr(48) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(5516 - 5405) + chr(2211 - 2160) + '\065', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(51) + chr(0b110010) + chr(0b101111 + 0o5), 8), nzTpIcepk0o8(chr(0b11110 + 0o22) + '\157' + chr(0b110011) + chr(743 - 691) + chr(50), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(11780 - 11669) + '\065' + chr(48), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd7'), chr(100) + chr(0b1100101) + chr(0b111110 + 0o45) + chr(10015 - 9904) + '\144' + chr(101))(chr(9767 - 9650) + chr(3685 - 3569) + chr(0b1 + 0o145) + chr(45) + chr(2125 - 2069)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def GYBk2HiLoT4c(hXMPsSrOQzbh): return LAdEbaMlWUjZ(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa6\xa4\xb1\xd5aZ\xa6\xcc\xb1'), '\144' + chr(101) + chr(99) + chr(0b1000011 + 0o54) + '\x64' + chr(0b1100101))(chr(12962 - 12845) + chr(0b1010110 + 0o36) + chr(102) + '\x2d' + '\070')), roI3spqORKae(fVPOOz2lciut, roI3spqORKae(ES5oEprVxulp(b'\xbf\x82\x80\xcbKw\x9f'), chr(0b1100100) + '\x65' + '\143' + chr(0b1101111) + chr(100) + chr(0b1100101))('\165' + chr(0b1001101 + 0o47) + chr(102) + chr(0b1011 + 0o42) + chr(1445 - 1389))), roI3spqORKae(fVPOOz2lciut, roI3spqORKae(ES5oEprVxulp(b'\xbf\x82\x80\xcbKw\x9e'), '\144' + chr(0b1100101) + chr(0b1011111 + 0o4) + '\157' + chr(100) + '\145')(chr(527 - 410) + chr(0b1110100) + '\x66' + '\x2d' + '\070')), roI3spqORKae(fVPOOz2lciut, roI3spqORKae(ES5oEprVxulp(b'\xba\x88\x8d\xdeBz\x98\xf9'), '\144' + chr(8339 - 8238) + '\x63' + chr(0b1101111) + chr(100) + '\145')(chr(2055 - 1938) + '\x74' + '\146' + chr(45) + chr(1517 - 1461))), roI3spqORKae(fVPOOz2lciut, roI3spqORKae(ES5oEprVxulp(b'\xba\x88\x8d\xdeBz\x98\xf8'), chr(0b1100100) + chr(687 - 586) + '\x63' + '\157' + chr(0b101010 + 0o72) + '\x65')(chr(8009 - 7892) + '\x74' + '\x66' + '\055' + chr(1614 - 1558))), height=roI3spqORKae(fVPOOz2lciut, roI3spqORKae(ES5oEprVxulp(b'\xbd\x88\x93\xdeOw\x8e\xec\x8b{\x15\x99dr\xa4'), chr(0b1100100) + chr(0b1001111 + 0o26) + '\143' + '\x6f' + chr(0b100 + 0o140) + chr(101))(chr(0b1100110 + 0o17) + chr(0b11010 + 0o132) + chr(0b101110 + 0o70) + chr(1137 - 1092) + chr(56))), width=roI3spqORKae(fVPOOz2lciut, roI3spqORKae(ES5oEprVxulp(b'\xbd\x88\x93\xdeOw\x8e\xec\x8bd\x19\x94wr'), '\x64' + chr(101) + chr(0b1011110 + 0o5) + chr(111) + chr(100) + '\145')(chr(0b1100 + 0o151) + chr(11514 - 11398) + chr(0b1000111 + 0o37) + '\055' + chr(56))))
BerkeleyAutomation/perception
perception/primesense_sensor.py
PrimesenseSensor.start
def start(self): """ Start the sensor """ # open device openni2.initialize(PrimesenseSensor.OPENNI2_PATH) self._device = openni2.Device.open_any() # open depth stream self._depth_stream = self._device.create_depth_stream() self._depth_stream.configure_mode(PrimesenseSensor.DEPTH_IM_WIDTH, PrimesenseSensor.DEPTH_IM_HEIGHT, PrimesenseSensor.FPS, openni2.PIXEL_FORMAT_DEPTH_1_MM) self._depth_stream.start() # open color stream self._color_stream = self._device.create_color_stream() self._color_stream.configure_mode(PrimesenseSensor.COLOR_IM_WIDTH, PrimesenseSensor.COLOR_IM_HEIGHT, PrimesenseSensor.FPS, openni2.PIXEL_FORMAT_RGB888) self._color_stream.camera.set_auto_white_balance(self._auto_white_balance) self._color_stream.camera.set_auto_exposure(self._auto_exposure) self._color_stream.start() # configure device if self._registration_mode == PrimesenseRegistrationMode.DEPTH_TO_COLOR: self._device.set_image_registration_mode(openni2.IMAGE_REGISTRATION_DEPTH_TO_COLOR) else: self._device.set_image_registration_mode(openni2.IMAGE_REGISTRATION_OFF) self._device.set_depth_color_sync_enabled(self._enable_depth_color_sync) self._running = True
python
def start(self): """ Start the sensor """ # open device openni2.initialize(PrimesenseSensor.OPENNI2_PATH) self._device = openni2.Device.open_any() # open depth stream self._depth_stream = self._device.create_depth_stream() self._depth_stream.configure_mode(PrimesenseSensor.DEPTH_IM_WIDTH, PrimesenseSensor.DEPTH_IM_HEIGHT, PrimesenseSensor.FPS, openni2.PIXEL_FORMAT_DEPTH_1_MM) self._depth_stream.start() # open color stream self._color_stream = self._device.create_color_stream() self._color_stream.configure_mode(PrimesenseSensor.COLOR_IM_WIDTH, PrimesenseSensor.COLOR_IM_HEIGHT, PrimesenseSensor.FPS, openni2.PIXEL_FORMAT_RGB888) self._color_stream.camera.set_auto_white_balance(self._auto_white_balance) self._color_stream.camera.set_auto_exposure(self._auto_exposure) self._color_stream.start() # configure device if self._registration_mode == PrimesenseRegistrationMode.DEPTH_TO_COLOR: self._device.set_image_registration_mode(openni2.IMAGE_REGISTRATION_DEPTH_TO_COLOR) else: self._device.set_image_registration_mode(openni2.IMAGE_REGISTRATION_OFF) self._device.set_depth_color_sync_enabled(self._enable_depth_color_sync) self._running = True
[ "def", "start", "(", "self", ")", ":", "# open device", "openni2", ".", "initialize", "(", "PrimesenseSensor", ".", "OPENNI2_PATH", ")", "self", ".", "_device", "=", "openni2", ".", "Device", ".", "open_any", "(", ")", "# open depth stream", "self", ".", "_depth_stream", "=", "self", ".", "_device", ".", "create_depth_stream", "(", ")", "self", ".", "_depth_stream", ".", "configure_mode", "(", "PrimesenseSensor", ".", "DEPTH_IM_WIDTH", ",", "PrimesenseSensor", ".", "DEPTH_IM_HEIGHT", ",", "PrimesenseSensor", ".", "FPS", ",", "openni2", ".", "PIXEL_FORMAT_DEPTH_1_MM", ")", "self", ".", "_depth_stream", ".", "start", "(", ")", "# open color stream", "self", ".", "_color_stream", "=", "self", ".", "_device", ".", "create_color_stream", "(", ")", "self", ".", "_color_stream", ".", "configure_mode", "(", "PrimesenseSensor", ".", "COLOR_IM_WIDTH", ",", "PrimesenseSensor", ".", "COLOR_IM_HEIGHT", ",", "PrimesenseSensor", ".", "FPS", ",", "openni2", ".", "PIXEL_FORMAT_RGB888", ")", "self", ".", "_color_stream", ".", "camera", ".", "set_auto_white_balance", "(", "self", ".", "_auto_white_balance", ")", "self", ".", "_color_stream", ".", "camera", ".", "set_auto_exposure", "(", "self", ".", "_auto_exposure", ")", "self", ".", "_color_stream", ".", "start", "(", ")", "# configure device", "if", "self", ".", "_registration_mode", "==", "PrimesenseRegistrationMode", ".", "DEPTH_TO_COLOR", ":", "self", ".", "_device", ".", "set_image_registration_mode", "(", "openni2", ".", "IMAGE_REGISTRATION_DEPTH_TO_COLOR", ")", "else", ":", "self", ".", "_device", ".", "set_image_registration_mode", "(", "openni2", ".", "IMAGE_REGISTRATION_OFF", ")", "self", ".", "_device", ".", "set_depth_color_sync_enabled", "(", "self", ".", "_enable_depth_color_sync", ")", "self", ".", "_running", "=", "True" ]
Start the sensor
[ "Start", "the", "sensor" ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/primesense_sensor.py#L108-L140
train
Start the sensor.
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,NfwEQ1VKf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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(111) + chr(51) + chr(48) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1001 + 0o146) + chr(0b11110 + 0o23) + chr(0b101100 + 0o10), 37095 - 37087), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(0b1101000 + 0o7) + chr(2201 - 2151) + chr(1934 - 1886) + chr(48), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(0b110000 + 0o3) + '\067', 12182 - 12174), nzTpIcepk0o8('\060' + '\x6f' + '\x34' + '\065', 13179 - 13171), nzTpIcepk0o8(chr(0b110000) + chr(7145 - 7034) + chr(0b1000 + 0o51) + chr(50) + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\060' + chr(191 - 80) + chr(50) + chr(0b10000 + 0o46) + chr(2540 - 2487), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(0b11100 + 0o26) + chr(0b110110 + 0o1), 0o10), nzTpIcepk0o8(chr(0b101100 + 0o4) + '\157' + '\x31' + chr(802 - 754) + chr(52), 0o10), nzTpIcepk0o8(chr(310 - 262) + chr(1613 - 1502) + '\x33' + chr(53) + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + chr(4861 - 4750) + chr(1432 - 1381) + '\x30' + chr(51), 56834 - 56826), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110110) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(0b10000 + 0o137) + '\x33' + chr(1443 - 1395) + '\x32', 41257 - 41249), nzTpIcepk0o8(chr(48) + chr(9973 - 9862) + '\x32' + chr(2518 - 2465) + '\x32', 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\x6f' + chr(0b110011) + chr(0b110110) + chr(0b110001), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + chr(1860 - 1810) + chr(48), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(657 - 608) + '\x34' + chr(1127 - 1079), 0o10), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(10392 - 10281) + '\x33' + '\065' + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b10100 + 0o34) + chr(2728 - 2617) + chr(48), 0o10), nzTpIcepk0o8(chr(380 - 332) + chr(0b1101111) + '\063' + '\x31' + chr(0b100000 + 0o22), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b1001 + 0o50) + chr(0b110000) + '\064', 8), nzTpIcepk0o8('\060' + chr(111) + '\x33' + chr(50) + chr(54), 0b1000), nzTpIcepk0o8('\x30' + chr(3939 - 3828) + chr(0b110100) + chr(0b1001 + 0o53), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + chr(0b110111) + '\062', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(49) + chr(51) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b1 + 0o57) + '\157' + '\x33' + chr(51) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1010001 + 0o36) + chr(0b110011) + chr(0b110100) + chr(0b111 + 0o57), 44940 - 44932), nzTpIcepk0o8(chr(48) + chr(8889 - 8778) + '\063' + chr(48) + '\x37', 8), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\157' + chr(1395 - 1346) + chr(1029 - 978) + chr(49), 0o10), nzTpIcepk0o8('\x30' + chr(0b1000001 + 0o56) + '\x31' + chr(55) + '\064', 53303 - 53295), nzTpIcepk0o8('\060' + chr(0b101001 + 0o106) + '\063' + '\066' + chr(54), 0b1000), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b1101111) + '\x32' + '\060' + '\067', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1001010 + 0o45) + chr(0b110001) + chr(0b110100), 8), nzTpIcepk0o8('\x30' + chr(0b111111 + 0o60) + chr(0b110010) + '\x32' + chr(924 - 871), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(605 - 555) + '\x35' + '\067', 0o10), nzTpIcepk0o8('\x30' + chr(7842 - 7731) + chr(0b100111 + 0o15) + chr(50), 63896 - 63888), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b100010 + 0o23) + '\060', 0o10), nzTpIcepk0o8(chr(1513 - 1465) + chr(0b111101 + 0o62) + chr(0b110 + 0o53) + chr(1503 - 1455) + chr(0b110110), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + chr(49) + chr(2144 - 2090), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(792 - 743) + chr(1075 - 1026) + chr(1637 - 1588), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(0b11001 + 0o126) + chr(0b110100 + 0o1) + '\060', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xe9'), '\x64' + '\x65' + chr(4635 - 4536) + chr(11320 - 11209) + chr(896 - 796) + '\x65')(chr(9159 - 9042) + chr(807 - 691) + chr(0b1100110) + chr(45) + chr(0b110011 + 0o5)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def KQbHFTcl_LKy(hXMPsSrOQzbh): roI3spqORKae(nib6NXLtq9ca, roI3spqORKae(ES5oEprVxulp(b'\xaeb\xe9\xabL4\xd9>>\x8f'), chr(0b1100100) + '\x65' + '\x63' + chr(0b1101111) + chr(0b101111 + 0o65) + '\x65')(chr(0b1000010 + 0o63) + '\x74' + '\x66' + chr(45) + chr(56)))(roI3spqORKae(fVPOOz2lciut, roI3spqORKae(ES5oEprVxulp(b'\x88\\\xc5\x91k\x1c\x87\x08\x14\xab\x97}'), '\144' + chr(0b1100101) + chr(99) + chr(6785 - 6674) + chr(0b100111 + 0o75) + '\x65')(chr(117) + chr(0b111111 + 0o65) + chr(0b10101 + 0o121) + chr(0b101101) + chr(2552 - 2496)))) hXMPsSrOQzbh.VNOYbyqzV4j0 = nib6NXLtq9ca.Device.open_any() hXMPsSrOQzbh.BW9CIVjZaolz = hXMPsSrOQzbh._device.create_depth_stream() roI3spqORKae(hXMPsSrOQzbh._depth_stream, roI3spqORKae(ES5oEprVxulp(b'\xa4c\xee\xb9L2\xc0%!\xb5\xaeZ\xa6\xcf'), chr(0b1010 + 0o132) + chr(5507 - 5406) + '\143' + '\x6f' + '\144' + chr(8607 - 8506))(chr(0b10100 + 0o141) + chr(0b1110100) + '\x66' + '\055' + '\070'))(roI3spqORKae(fVPOOz2lciut, roI3spqORKae(ES5oEprVxulp(b'\x83I\xd0\x8bm\n\xfc\x1a\x1b\xbd\x8aq\x96\xe2'), chr(0b1100100) + chr(3740 - 3639) + chr(0b100010 + 0o101) + '\x6f' + '\144' + chr(2849 - 2748))(chr(0b100111 + 0o116) + '\x74' + '\146' + chr(0b101011 + 0o2) + chr(0b111000))), roI3spqORKae(fVPOOz2lciut, roI3spqORKae(ES5oEprVxulp(b'\x83I\xd0\x8bm\n\xfc\x1a\x1b\xa2\x86|\x85\xe2\xa5'), chr(100) + chr(5156 - 5055) + chr(99) + '\x6f' + chr(0b1010000 + 0o24) + chr(0b1100101))(chr(117) + chr(0b1100001 + 0o23) + '\146' + chr(0b100111 + 0o6) + chr(0b101111 + 0o11))), roI3spqORKae(fVPOOz2lciut, roI3spqORKae(ES5oEprVxulp(b'\x81\\\xd3'), chr(8090 - 7990) + chr(8054 - 7953) + chr(7917 - 7818) + chr(0b111010 + 0o65) + chr(0b1100100) + chr(0b10001 + 0o124))(chr(7946 - 7829) + chr(0b110110 + 0o76) + '\x66' + chr(0b101101) + chr(0b1100 + 0o54))), roI3spqORKae(nib6NXLtq9ca, roI3spqORKae(ES5oEprVxulp(b'\x97E\xd8\x9ai\n\xf3\x18\x16\xa7\x82a\x9d\xee\xb4\xc04\xa0_\xfb\x1b\x9bi'), chr(0b1100100) + chr(5474 - 5373) + chr(6468 - 6369) + '\x6f' + chr(8771 - 8671) + chr(3912 - 3811))(chr(0b1110101) + '\x74' + chr(0b1010100 + 0o22) + '\055' + '\070'))) roI3spqORKae(hXMPsSrOQzbh._depth_stream, roI3spqORKae(ES5oEprVxulp(b'\x8c]\xe2\x97c\x01\xd6;\x1b\xa6\x88L'), chr(0b1100100) + chr(0b1000110 + 0o37) + '\x63' + chr(0b11100 + 0o123) + chr(2472 - 2372) + '\x65')('\165' + '\x74' + chr(6300 - 6198) + chr(45) + chr(0b11100 + 0o34)))() hXMPsSrOQzbh.SCXoYghCKxr_ = hXMPsSrOQzbh._device.create_color_stream() roI3spqORKae(hXMPsSrOQzbh._color_stream, roI3spqORKae(ES5oEprVxulp(b'\xa4c\xee\xb9L2\xc0%!\xb5\xaeZ\xa6\xcf'), chr(0b1100100) + chr(439 - 338) + '\x63' + '\157' + chr(100) + chr(101))(chr(0b1110101) + '\x74' + chr(0b1100110) + chr(0b101101) + chr(0b111000)))(roI3spqORKae(fVPOOz2lciut, roI3spqORKae(ES5oEprVxulp(b'\x84C\xcc\x90w\n\xfc\x1a\x1b\xbd\x8aq\x96\xe2'), '\144' + '\x65' + chr(0b1100011) + '\x6f' + '\x64' + chr(0b1100101))(chr(9225 - 9108) + chr(0b1110100) + chr(102) + '\x2d' + chr(0b110101 + 0o3))), roI3spqORKae(fVPOOz2lciut, roI3spqORKae(ES5oEprVxulp(b'\x84C\xcc\x90w\n\xfc\x1a\x1b\xa2\x86|\x85\xe2\xa5'), chr(0b1100100) + chr(101) + '\x63' + chr(0b1101111) + '\144' + chr(9480 - 9379))('\x75' + chr(0b110011 + 0o101) + chr(0b1100110) + chr(45) + chr(1372 - 1316))), roI3spqORKae(fVPOOz2lciut, roI3spqORKae(ES5oEprVxulp(b'\x81\\\xd3'), chr(9489 - 9389) + chr(101) + '\x63' + chr(0b1100011 + 0o14) + '\144' + chr(101))('\165' + '\x74' + '\x66' + chr(45) + chr(0b111000))), roI3spqORKae(nib6NXLtq9ca, roI3spqORKae(ES5oEprVxulp(b'\x97E\xd8\x9ai\n\xf3\x18\x16\xa7\x82a\x9d\xf8\xb6\xd2X\xd08'), '\144' + chr(0b100000 + 0o105) + chr(99) + '\x6f' + chr(0b1100100) + chr(0b100010 + 0o103))('\x75' + chr(2263 - 2147) + chr(102) + chr(0b1 + 0o54) + '\x38'))) roI3spqORKae(hXMPsSrOQzbh._color_stream.camera, roI3spqORKae(ES5oEprVxulp(b"\xb4i\xf4\x80D \xc18\x1b\x9d\xab\\\xb6\xcf\xae\xf2\x01\x84a\xa4'\xb3"), chr(0b1100100) + chr(0b1100101) + chr(0b11010 + 0o111) + '\x6f' + chr(6527 - 6427) + '\x65')(chr(117) + '\164' + chr(102) + chr(831 - 786) + chr(0b11111 + 0o31)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x98m\xf5\xabJ\n\xc2?-\x9e\xa6j\xa0\xcb\x9d\xf1\x0e\x8be'), chr(100) + '\x65' + '\143' + '\x6f' + '\144' + '\x65')(chr(117) + chr(116) + chr(0b1100110) + chr(45) + chr(0b101011 + 0o15)))) roI3spqORKae(hXMPsSrOQzbh._color_stream.camera, roI3spqORKae(ES5oEprVxulp(b'\xb4i\xf4\x80D \xc18\x1b\x8f\xbbE\xad\xd9\x84\xe2\x05'), '\144' + chr(101) + chr(0b1100011) + '\157' + chr(100) + '\145')(chr(117) + chr(0b10001 + 0o143) + '\x66' + '\x2d' + chr(56)))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x98m\xf5\xabJ\n\xd0/4\x85\xb0@\xb0\xcf'), chr(100) + chr(0b1100101) + '\143' + '\x6f' + chr(0b1010 + 0o132) + '\145')(chr(0b111100 + 0o71) + chr(116) + chr(102) + chr(45) + chr(2050 - 1994)))) roI3spqORKae(hXMPsSrOQzbh._color_stream, roI3spqORKae(ES5oEprVxulp(b'\x8c]\xe2\x97c\x01\xd6;\x1b\xa6\x88L'), '\144' + chr(5353 - 5252) + chr(0b1100011) + chr(5014 - 4903) + chr(100) + chr(101))(chr(117) + chr(116) + chr(0b1100110) + chr(0b10001 + 0o34) + chr(56)))() if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x98~\xe5\xb8L&\xc1%%\x9e\xaaZ\xac\xf5\x9c\xff\x04\x8d'), '\144' + chr(0b1100101) + '\x63' + '\x6f' + '\x64' + chr(9812 - 9711))(chr(0b1110101) + chr(116) + chr(2309 - 2207) + chr(0b100110 + 0o7) + chr(0b111000))) == roI3spqORKae(hz92waHo9e2n, roI3spqORKae(ES5oEprVxulp(b'\x83I\xd0\x8bm\n\xe1\x18\x1b\xa9\x8cy\x8d\xf8'), '\x64' + chr(7262 - 7161) + chr(0b1011111 + 0o4) + chr(0b100001 + 0o116) + chr(0b1100100) + '\x65')(chr(6982 - 6865) + chr(9351 - 9235) + chr(928 - 826) + chr(45) + '\x38')): roI3spqORKae(hXMPsSrOQzbh._device, roI3spqORKae(ES5oEprVxulp(b'\xb4i\xf4\x80L8\xd40!\xb5\xb1P\xa5\xc3\x82\xe4\x12\x89t\xa3+\xb8{\x172\xbe\x83'), '\144' + '\x65' + chr(0b1100011) + '\x6f' + chr(0b111101 + 0o47) + chr(101))(chr(0b1110101) + chr(6713 - 6597) + chr(10256 - 10154) + chr(0b101101) + '\x38'))(roI3spqORKae(nib6NXLtq9ca, roI3spqORKae(ES5oEprVxulp(b'\x8eA\xc1\x98`\n\xe7\x12\x03\xa3\x90a\x90\xeb\xa5\xd9/\xa6_\x8e\x01\x86p2\x02\x8e\xa9\x98\x1a3\xba\xc8^'), chr(100) + chr(101) + chr(0b1100011) + chr(0b111010 + 0o65) + '\144' + '\145')(chr(117) + chr(0b1110100) + chr(0b1100110) + chr(45) + '\x38'))) else: roI3spqORKae(hXMPsSrOQzbh._device, roI3spqORKae(ES5oEprVxulp(b'\xb4i\xf4\x80L8\xd40!\xb5\xb1P\xa5\xc3\x82\xe4\x12\x89t\xa3+\xb8{\x172\xbe\x83'), '\x64' + '\145' + '\143' + chr(111) + chr(7126 - 7026) + '\145')(chr(8432 - 8315) + '\x74' + chr(102) + chr(0b1011 + 0o42) + chr(0b111000)))(roI3spqORKae(nib6NXLtq9ca, roI3spqORKae(ES5oEprVxulp(b'\x8eA\xc1\x98`\n\xe7\x12\x03\xa3\x90a\x90\xeb\xa5\xd9/\xa6_\x85\x02\x90'), chr(6193 - 6093) + '\x65' + '\x63' + '\157' + chr(4774 - 4674) + '\145')(chr(0b1110101) + chr(0b1110100) + '\146' + chr(0b101101) + chr(0b101011 + 0o15)))) roI3spqORKae(hXMPsSrOQzbh._device, roI3spqORKae(ES5oEprVxulp(b'\xb4i\xf4\x80A0\xc5#,\xb5\xa0Z\xae\xc5\x83\xcf\x13\x91n\xa9\x1b\xb3J\x1b?\xb6\x83\xa3'), chr(100) + chr(101) + chr(99) + chr(0b1010000 + 0o37) + '\x64' + '\x65')(chr(0b1110101) + '\x74' + chr(7862 - 7760) + chr(0b11101 + 0o20) + '\070'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x98i\xee\xbeG9\xd0\x08 \x8f\xb3A\xaa\xf5\x92\xff\x0c\x87r\x957\xafJ\x19'), chr(0b1000010 + 0o42) + chr(5656 - 5555) + '\x63' + '\157' + chr(0b110110 + 0o56) + chr(0b1001001 + 0o34))(chr(0b111100 + 0o71) + '\x74' + '\146' + chr(0b110 + 0o47) + chr(56)))) hXMPsSrOQzbh.IF4G0B37piRc = nzTpIcepk0o8(chr(48) + '\x6f' + '\x31', ord("\x08"))
BerkeleyAutomation/perception
perception/primesense_sensor.py
PrimesenseSensor.stop
def stop(self): """ Stop the sensor """ # check that everything is running if not self._running or self._device is None: logging.warning('Primesense not running. Aborting stop') return False # stop streams if self._depth_stream: self._depth_stream.stop() if self._color_stream: self._color_stream.stop() self._running = False # Unload openni2 openni2.unload() return True
python
def stop(self): """ Stop the sensor """ # check that everything is running if not self._running or self._device is None: logging.warning('Primesense not running. Aborting stop') return False # stop streams if self._depth_stream: self._depth_stream.stop() if self._color_stream: self._color_stream.stop() self._running = False # Unload openni2 openni2.unload() return True
[ "def", "stop", "(", "self", ")", ":", "# check that everything is running", "if", "not", "self", ".", "_running", "or", "self", ".", "_device", "is", "None", ":", "logging", ".", "warning", "(", "'Primesense not running. Aborting stop'", ")", "return", "False", "# stop streams", "if", "self", ".", "_depth_stream", ":", "self", ".", "_depth_stream", ".", "stop", "(", ")", "if", "self", ".", "_color_stream", ":", "self", ".", "_color_stream", ".", "stop", "(", ")", "self", ".", "_running", "=", "False", "# Unload openni2", "openni2", ".", "unload", "(", ")", "return", "True" ]
Stop the sensor
[ "Stop", "the", "sensor" ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/primesense_sensor.py#L142-L158
train
Stop the sensor
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPT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eYozM,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('\x30' + chr(111) + chr(0b10111 + 0o32) + chr(429 - 381) + chr(297 - 247), 26183 - 26175), nzTpIcepk0o8(chr(1978 - 1930) + '\x6f' + chr(0b110001) + chr(0b100111 + 0o14) + '\061', 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1101111) + chr(1154 - 1105) + chr(0b110101) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\063' + '\x33' + chr(0b110001 + 0o6), 33896 - 33888), nzTpIcepk0o8(chr(557 - 509) + chr(8616 - 8505) + chr(0b110001) + '\x37' + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b110000 + 0o77) + '\x31' + chr(0b110111) + chr(0b110001), 8), nzTpIcepk0o8('\x30' + chr(5910 - 5799) + chr(0b100010 + 0o20) + chr(469 - 421) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(1565 - 1517) + chr(0b101001 + 0o106) + '\x32' + chr(1165 - 1114) + chr(450 - 401), 0b1000), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(1543 - 1494) + chr(180 - 131) + chr(88 - 36), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(1053 - 1003) + chr(561 - 508), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1010110 + 0o31) + chr(0b100000 + 0o21) + chr(0b110100) + '\063', ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + '\061' + chr(0b110001) + chr(0b100101 + 0o20), ord("\x08")), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b1101111) + chr(0b110001) + chr(52) + '\x32', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b11000 + 0o127) + chr(49) + chr(53) + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\062' + '\062' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(2010 - 1962) + '\157' + chr(2162 - 2111) + chr(55) + chr(0b110010 + 0o1), 0b1000), nzTpIcepk0o8(chr(1208 - 1160) + '\x6f' + '\063' + chr(0b10001 + 0o44) + chr(0b10100 + 0o36), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + '\061' + chr(0b101110 + 0o7), ord("\x08")), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + '\063' + chr(0b110001), 8), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(111) + '\061' + chr(0b10101 + 0o36) + chr(0b110101), 62863 - 62855), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(0b110100) + chr(0b110000), 0o10), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b10001 + 0o136) + chr(1172 - 1123) + chr(0b110110) + '\060', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + '\x36' + chr(291 - 240), 0o10), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b10100 + 0o133) + chr(154 - 105) + chr(895 - 840) + chr(51), 0o10), nzTpIcepk0o8(chr(211 - 163) + chr(111) + chr(0b10111 + 0o33) + chr(0b110101), 44901 - 44893), nzTpIcepk0o8(chr(48) + chr(111) + chr(55) + chr(52), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110110) + '\x33', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(49) + chr(2239 - 2186) + chr(50), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(49) + chr(0b1011 + 0o45) + chr(808 - 757), 0o10), nzTpIcepk0o8(chr(670 - 622) + '\157' + chr(0b100111 + 0o13) + chr(0b110000) + chr(0b110101), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + '\066' + chr(0b0 + 0o60), 0b1000), nzTpIcepk0o8(chr(2300 - 2252) + chr(1721 - 1610) + '\x33' + chr(0b0 + 0o66) + chr(48), 0o10), nzTpIcepk0o8('\x30' + chr(1901 - 1790) + chr(0b110011) + chr(0b10100 + 0o42) + chr(1524 - 1476), 8), nzTpIcepk0o8('\060' + chr(0b100111 + 0o110) + chr(0b110001) + chr(54) + chr(811 - 756), ord("\x08")), nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1010011 + 0o34) + chr(0b110110) + '\x35', 19804 - 19796), nzTpIcepk0o8(chr(0b110000) + chr(0b1101010 + 0o5) + chr(50) + '\060' + chr(48), 51157 - 51149), nzTpIcepk0o8(chr(1608 - 1560) + '\157' + chr(50) + chr(0b101101 + 0o10) + chr(1109 - 1058), 0b1000), nzTpIcepk0o8(chr(0b11111 + 0o21) + '\x6f' + chr(1624 - 1573) + '\x34' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(652 - 604) + chr(0b1000001 + 0o56) + chr(51) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(2781 - 2726), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(970 - 917) + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'l'), '\144' + chr(101) + '\x63' + chr(0b1101111) + '\144' + chr(0b111111 + 0o46))(chr(0b1001010 + 0o53) + '\164' + '\146' + '\055' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def dYJbBiYO_nGE(hXMPsSrOQzbh): if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x0b\x1f[\x98I;\xb6\xae<\xbc1.'), chr(408 - 308) + chr(3000 - 2899) + chr(0b1100011) + chr(111) + chr(100) + '\145')(chr(117) + '\164' + chr(0b1100110) + chr(1892 - 1847) + chr(0b1010 + 0o56))) or roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x14\x17 \x86\x1b\x00\xf4\xe3\x1a\xe1\t}'), chr(100) + chr(0b11011 + 0o112) + '\143' + '\x6f' + chr(0b1100100) + chr(0b110101 + 0o60))(chr(117) + chr(0b1110100) + chr(768 - 666) + chr(45) + chr(2681 - 2625))) is None: roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'58\x1d\xb1\x10\x17\xe2'), '\144' + chr(0b1010011 + 0o22) + chr(0b101111 + 0o64) + chr(0b1101 + 0o142) + '\144' + chr(0b110100 + 0o61))(chr(0b1110101) + chr(0b1101111 + 0o5) + chr(0b1100110) + chr(0b101101) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\x12+\x06\xb2\x1c\n\xe0\xf7?\xb0C#\r\x1f\xb1\x89\x9fc\xf74\x8e\x17][T^\\\x187\xec^\x97\xd0\x04A\xef\xdb'), chr(3227 - 3127) + chr(0b1000111 + 0o36) + chr(99) + chr(9044 - 8933) + '\x64' + chr(101))(chr(253 - 136) + chr(0b1110100) + chr(0b1001110 + 0o30) + '\055' + chr(0b111000))) return nzTpIcepk0o8('\x30' + chr(111) + '\x30', 0o10) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x00\x0eV\x9c0/\xef\xc3-\xba\x0f7'), '\144' + chr(0b1100101) + '\x63' + chr(5682 - 5571) + '\x64' + '\x65')(chr(0b1110101) + '\164' + chr(102) + '\055' + chr(56))): roI3spqORKae(hXMPsSrOQzbh._depth_stream, roI3spqORKae(ES5oEprVxulp(b'&\x00%\xbd;\x10\xdc\xd6\x13\xbb$\x08'), chr(100) + chr(763 - 662) + chr(0b111001 + 0o52) + '\157' + chr(5953 - 5853) + '\x65')('\x75' + chr(116) + '\x66' + chr(1083 - 1038) + chr(1590 - 1534)))() if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x11\x1a7\xb0 \x1e\xed\xda\x07\xad\x11\x12'), '\144' + '\x65' + '\143' + chr(0b1101111) + '\x64' + '\x65')(chr(0b1110101) + chr(2107 - 1991) + '\x66' + chr(721 - 676) + '\x38')): roI3spqORKae(hXMPsSrOQzbh._color_stream, roI3spqORKae(ES5oEprVxulp(b'&\x00%\xbd;\x10\xdc\xd6\x13\xbb$\x08'), '\x64' + chr(0b1001101 + 0o30) + chr(416 - 317) + chr(111) + '\x64' + '\x65')('\x75' + '\164' + chr(0b1100110) + chr(0b101101) + chr(748 - 692)))() hXMPsSrOQzbh.IF4G0B37piRc = nzTpIcepk0o8('\060' + '\x6f' + chr(0b10111 + 0o31), 8) roI3spqORKae(nib6NXLtq9ca, roI3spqORKae(ES5oEprVxulp(b'77\x03\xb0\x18\x1d'), chr(0b1000010 + 0o42) + chr(0b111 + 0o136) + '\x63' + chr(111) + chr(9657 - 9557) + chr(101))(chr(0b1011111 + 0o26) + chr(6530 - 6414) + chr(0b1100110) + chr(45) + '\x38'))() return nzTpIcepk0o8('\x30' + '\x6f' + chr(379 - 330), ord("\x08"))
BerkeleyAutomation/perception
perception/primesense_sensor.py
PrimesenseSensor._read_depth_image
def _read_depth_image(self): """ Reads a depth image from the device """ # read raw uint16 buffer im_arr = self._depth_stream.read_frame() raw_buf = im_arr.get_buffer_as_uint16() buf_array = np.array([raw_buf[i] for i in range(PrimesenseSensor.DEPTH_IM_WIDTH * PrimesenseSensor.DEPTH_IM_HEIGHT)]) # convert to image in meters depth_image = buf_array.reshape(PrimesenseSensor.DEPTH_IM_HEIGHT, PrimesenseSensor.DEPTH_IM_WIDTH) depth_image = depth_image * MM_TO_METERS # convert to meters if self._flip_images: depth_image = np.flipud(depth_image) else: depth_image = np.fliplr(depth_image) return DepthImage(depth_image, frame=self._frame)
python
def _read_depth_image(self): """ Reads a depth image from the device """ # read raw uint16 buffer im_arr = self._depth_stream.read_frame() raw_buf = im_arr.get_buffer_as_uint16() buf_array = np.array([raw_buf[i] for i in range(PrimesenseSensor.DEPTH_IM_WIDTH * PrimesenseSensor.DEPTH_IM_HEIGHT)]) # convert to image in meters depth_image = buf_array.reshape(PrimesenseSensor.DEPTH_IM_HEIGHT, PrimesenseSensor.DEPTH_IM_WIDTH) depth_image = depth_image * MM_TO_METERS # convert to meters if self._flip_images: depth_image = np.flipud(depth_image) else: depth_image = np.fliplr(depth_image) return DepthImage(depth_image, frame=self._frame)
[ "def", "_read_depth_image", "(", "self", ")", ":", "# read raw uint16 buffer", "im_arr", "=", "self", ".", "_depth_stream", ".", "read_frame", "(", ")", "raw_buf", "=", "im_arr", ".", "get_buffer_as_uint16", "(", ")", "buf_array", "=", "np", ".", "array", "(", "[", "raw_buf", "[", "i", "]", "for", "i", "in", "range", "(", "PrimesenseSensor", ".", "DEPTH_IM_WIDTH", "*", "PrimesenseSensor", ".", "DEPTH_IM_HEIGHT", ")", "]", ")", "# convert to image in meters", "depth_image", "=", "buf_array", ".", "reshape", "(", "PrimesenseSensor", ".", "DEPTH_IM_HEIGHT", ",", "PrimesenseSensor", ".", "DEPTH_IM_WIDTH", ")", "depth_image", "=", "depth_image", "*", "MM_TO_METERS", "# convert to meters", "if", "self", ".", "_flip_images", ":", "depth_image", "=", "np", ".", "flipud", "(", "depth_image", ")", "else", ":", "depth_image", "=", "np", ".", "fliplr", "(", "depth_image", ")", "return", "DepthImage", "(", "depth_image", ",", "frame", "=", "self", ".", "_frame", ")" ]
Reads a depth image from the device
[ "Reads", "a", "depth", "image", "from", "the", "device" ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/primesense_sensor.py#L160-L175
train
Reads a depth image from the device
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,JD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kt9,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) + '\x32' + '\x36', 61701 - 61693), nzTpIcepk0o8(chr(2234 - 2186) + '\157' + chr(0b1110 + 0o43) + '\x32' + '\064', 0o10), nzTpIcepk0o8('\060' + chr(111) + '\063' + chr(1080 - 1025) + chr(869 - 818), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1764 - 1714) + '\x33' + chr(437 - 385), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1001111 + 0o40) + chr(0b110001) + chr(0b110110) + chr(52), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + '\063' + chr(49), 0o10), nzTpIcepk0o8(chr(776 - 728) + '\x6f' + '\x31' + chr(0b1001 + 0o54), 0b1000), nzTpIcepk0o8('\060' + chr(9461 - 9350) + chr(52) + chr(55), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(52) + '\063', 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(51) + chr(0b101000 + 0o14) + chr(53), 0b1000), nzTpIcepk0o8('\x30' + chr(9957 - 9846) + chr(0b10000 + 0o41) + chr(0b11010 + 0o35) + '\062', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2357 - 2308) + chr(0b1010 + 0o54), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(580 - 532) + chr(50), 36217 - 36209), nzTpIcepk0o8(chr(48) + chr(6183 - 6072) + chr(0b110010) + chr(0b110 + 0o56) + '\x31', 0o10), nzTpIcepk0o8(chr(937 - 889) + chr(0b1101111) + chr(1345 - 1296) + chr(973 - 921) + '\061', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + '\066' + chr(0b10101 + 0o42), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b100111 + 0o14) + chr(2820 - 2765), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b10001 + 0o41) + chr(54) + chr(50), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10011 + 0o40) + chr(0b110010) + '\x31', 0b1000), nzTpIcepk0o8('\x30' + chr(8426 - 8315) + chr(390 - 340) + '\060' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b101111 + 0o1) + chr(0b1101011 + 0o4) + chr(0b10101 + 0o41) + chr(371 - 323), 0o10), nzTpIcepk0o8('\060' + chr(111) + '\062' + chr(0b110000 + 0o4) + '\061', 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110011) + chr(51) + '\067', 0o10), nzTpIcepk0o8(chr(725 - 677) + '\x6f' + chr(0b100000 + 0o23) + chr(0b110010) + chr(1039 - 985), 8), nzTpIcepk0o8(chr(48) + chr(111) + '\x31' + chr(0b110000), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(1184 - 1133) + chr(0b110101) + chr(48), 23745 - 23737), nzTpIcepk0o8(chr(2207 - 2159) + '\157' + chr(1405 - 1355) + chr(2355 - 2306) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b10 + 0o56) + chr(11443 - 11332) + chr(49) + chr(1739 - 1687) + chr(0b10111 + 0o35), 52062 - 52054), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + '\062' + chr(1673 - 1623), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(9934 - 9823) + chr(0b110001) + '\062' + '\065', 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\061' + chr(0b110000), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(1439 - 1389) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + chr(50) + chr(0b110111), 16870 - 16862), nzTpIcepk0o8(chr(0b110000) + chr(2312 - 2201) + '\063' + chr(1682 - 1632) + '\067', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + chr(775 - 720) + chr(0b100100 + 0o23), 5635 - 5627), nzTpIcepk0o8(chr(48) + chr(0b1001000 + 0o47) + chr(0b110011) + '\061', 0b1000), nzTpIcepk0o8('\060' + chr(3967 - 3856) + chr(0b110010) + chr(0b110111) + '\060', 18005 - 17997), nzTpIcepk0o8(chr(590 - 542) + chr(2661 - 2550) + chr(51) + '\066' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\157' + chr(0b110010) + chr(2015 - 1962) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(50) + chr(0b110110) + '\x36', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + '\x35' + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf8'), '\144' + chr(3730 - 3629) + chr(0b10100 + 0o117) + chr(111) + chr(799 - 699) + '\145')(chr(0b1110101) + '\164' + '\x66' + chr(45) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Mwa29nNVUEac(hXMPsSrOQzbh): ttJEx6R4Ze_G = hXMPsSrOQzbh._depth_stream.read_frame() ntZ7J9epXgGb = ttJEx6R4Ze_G.get_buffer_as_uint16() _2LWJIGxnFWy = nDF4gVNx0u9Q.Tn6rGr7XTM7t([ntZ7J9epXgGb[ZlbFMSG8gCoF] for ZlbFMSG8gCoF in bbT2xIe5pzk7(fVPOOz2lciut.DEPTH_IM_WIDTH * fVPOOz2lciut.DEPTH_IM_HEIGHT)]) eUW2JKqvx8Cg = _2LWJIGxnFWy.reshape(fVPOOz2lciut.DEPTH_IM_HEIGHT, fVPOOz2lciut.DEPTH_IM_WIDTH) eUW2JKqvx8Cg = eUW2JKqvx8Cg * U3nkm7nMOfja if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x892\x97\xf5\x04\x06dJB\x82\x1f}'), chr(0b1100100) + chr(5418 - 5317) + chr(0b1100011) + chr(0b1001 + 0o146) + chr(100) + chr(0b110100 + 0o61))('\x75' + '\x74' + chr(0b1001001 + 0o35) + chr(45) + chr(757 - 701))): eUW2JKqvx8Cg = nDF4gVNx0u9Q.flipud(eUW2JKqvx8Cg) else: eUW2JKqvx8Cg = nDF4gVNx0u9Q.fliplr(eUW2JKqvx8Cg) return Ctd7ihpXT1E5(eUW2JKqvx8Cg, frame=roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xbcb\xb8\xae\x1a+zQV\xb5J:'), chr(0b1100100) + chr(0b1100101) + '\x63' + chr(0b1000011 + 0o54) + '\x64' + chr(101))('\x75' + chr(0b1110100) + chr(0b1100110) + '\055' + chr(56))))
BerkeleyAutomation/perception
perception/primesense_sensor.py
PrimesenseSensor._read_color_image
def _read_color_image(self): """ Reads a color image from the device """ # read raw buffer im_arr = self._color_stream.read_frame() raw_buf = im_arr.get_buffer_as_triplet() r_array = np.array([raw_buf[i][0] for i in range(PrimesenseSensor.COLOR_IM_WIDTH * PrimesenseSensor.COLOR_IM_HEIGHT)]) g_array = np.array([raw_buf[i][1] for i in range(PrimesenseSensor.COLOR_IM_WIDTH * PrimesenseSensor.COLOR_IM_HEIGHT)]) b_array = np.array([raw_buf[i][2] for i in range(PrimesenseSensor.COLOR_IM_WIDTH * PrimesenseSensor.COLOR_IM_HEIGHT)]) # convert to uint8 image color_image = np.zeros([PrimesenseSensor.COLOR_IM_HEIGHT, PrimesenseSensor.COLOR_IM_WIDTH, 3]) color_image[:,:,0] = r_array.reshape(PrimesenseSensor.COLOR_IM_HEIGHT, PrimesenseSensor.COLOR_IM_WIDTH) color_image[:,:,1] = g_array.reshape(PrimesenseSensor.COLOR_IM_HEIGHT, PrimesenseSensor.COLOR_IM_WIDTH) color_image[:,:,2] = b_array.reshape(PrimesenseSensor.COLOR_IM_HEIGHT, PrimesenseSensor.COLOR_IM_WIDTH) if self._flip_images: color_image = np.flipud(color_image.astype(np.uint8)) else: color_image = np.fliplr(color_image.astype(np.uint8)) return ColorImage(color_image, frame=self._frame)
python
def _read_color_image(self): """ Reads a color image from the device """ # read raw buffer im_arr = self._color_stream.read_frame() raw_buf = im_arr.get_buffer_as_triplet() r_array = np.array([raw_buf[i][0] for i in range(PrimesenseSensor.COLOR_IM_WIDTH * PrimesenseSensor.COLOR_IM_HEIGHT)]) g_array = np.array([raw_buf[i][1] for i in range(PrimesenseSensor.COLOR_IM_WIDTH * PrimesenseSensor.COLOR_IM_HEIGHT)]) b_array = np.array([raw_buf[i][2] for i in range(PrimesenseSensor.COLOR_IM_WIDTH * PrimesenseSensor.COLOR_IM_HEIGHT)]) # convert to uint8 image color_image = np.zeros([PrimesenseSensor.COLOR_IM_HEIGHT, PrimesenseSensor.COLOR_IM_WIDTH, 3]) color_image[:,:,0] = r_array.reshape(PrimesenseSensor.COLOR_IM_HEIGHT, PrimesenseSensor.COLOR_IM_WIDTH) color_image[:,:,1] = g_array.reshape(PrimesenseSensor.COLOR_IM_HEIGHT, PrimesenseSensor.COLOR_IM_WIDTH) color_image[:,:,2] = b_array.reshape(PrimesenseSensor.COLOR_IM_HEIGHT, PrimesenseSensor.COLOR_IM_WIDTH) if self._flip_images: color_image = np.flipud(color_image.astype(np.uint8)) else: color_image = np.fliplr(color_image.astype(np.uint8)) return ColorImage(color_image, frame=self._frame)
[ "def", "_read_color_image", "(", "self", ")", ":", "# read raw buffer", "im_arr", "=", "self", ".", "_color_stream", ".", "read_frame", "(", ")", "raw_buf", "=", "im_arr", ".", "get_buffer_as_triplet", "(", ")", "r_array", "=", "np", ".", "array", "(", "[", "raw_buf", "[", "i", "]", "[", "0", "]", "for", "i", "in", "range", "(", "PrimesenseSensor", ".", "COLOR_IM_WIDTH", "*", "PrimesenseSensor", ".", "COLOR_IM_HEIGHT", ")", "]", ")", "g_array", "=", "np", ".", "array", "(", "[", "raw_buf", "[", "i", "]", "[", "1", "]", "for", "i", "in", "range", "(", "PrimesenseSensor", ".", "COLOR_IM_WIDTH", "*", "PrimesenseSensor", ".", "COLOR_IM_HEIGHT", ")", "]", ")", "b_array", "=", "np", ".", "array", "(", "[", "raw_buf", "[", "i", "]", "[", "2", "]", "for", "i", "in", "range", "(", "PrimesenseSensor", ".", "COLOR_IM_WIDTH", "*", "PrimesenseSensor", ".", "COLOR_IM_HEIGHT", ")", "]", ")", "# convert to uint8 image", "color_image", "=", "np", ".", "zeros", "(", "[", "PrimesenseSensor", ".", "COLOR_IM_HEIGHT", ",", "PrimesenseSensor", ".", "COLOR_IM_WIDTH", ",", "3", "]", ")", "color_image", "[", ":", ",", ":", ",", "0", "]", "=", "r_array", ".", "reshape", "(", "PrimesenseSensor", ".", "COLOR_IM_HEIGHT", ",", "PrimesenseSensor", ".", "COLOR_IM_WIDTH", ")", "color_image", "[", ":", ",", ":", ",", "1", "]", "=", "g_array", ".", "reshape", "(", "PrimesenseSensor", ".", "COLOR_IM_HEIGHT", ",", "PrimesenseSensor", ".", "COLOR_IM_WIDTH", ")", "color_image", "[", ":", ",", ":", ",", "2", "]", "=", "b_array", ".", "reshape", "(", "PrimesenseSensor", ".", "COLOR_IM_HEIGHT", ",", "PrimesenseSensor", ".", "COLOR_IM_WIDTH", ")", "if", "self", ".", "_flip_images", ":", "color_image", "=", "np", ".", "flipud", "(", "color_image", ".", "astype", "(", "np", ".", "uint8", ")", ")", "else", ":", "color_image", "=", "np", ".", "fliplr", "(", "color_image", ".", "astype", "(", "np", ".", "uint8", ")", ")", "return", "ColorImage", "(", "color_image", ",", "frame", "=", "self", ".", "_frame", ")" ]
Reads a color image from the device
[ "Reads", "a", "color", "image", "from", "the", "device" ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/primesense_sensor.py#L177-L198
train
Reads a color image from the device
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,DHq8A6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lOIz6CD,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(12122 - 12011) + chr(51) + '\065' + chr(0b110111), 0b1000), nzTpIcepk0o8('\060' + chr(111) + '\062' + '\061' + '\x36', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x37' + chr(0b101100 + 0o10), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + '\067' + chr(48), 15890 - 15882), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(2068 - 2017) + chr(1573 - 1522) + '\061', 0o10), nzTpIcepk0o8('\x30' + chr(0b1000111 + 0o50) + chr(0b1110 + 0o43) + '\066' + chr(268 - 218), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\061' + chr(0b110100) + chr(0b10011 + 0o37), ord("\x08")), nzTpIcepk0o8(chr(0b100110 + 0o12) + '\157' + chr(0b110001 + 0o2) + chr(0b110111) + chr(0b110101), 4288 - 4280), nzTpIcepk0o8('\x30' + chr(0b110110 + 0o71) + '\062' + chr(0b110000 + 0o0), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b101000 + 0o11) + '\060' + chr(1059 - 1010), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001), 21530 - 21522), nzTpIcepk0o8(chr(0b110000) + chr(10069 - 9958) + '\063' + chr(52) + '\061', ord("\x08")), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b1101111) + chr(1187 - 1139), ord("\x08")), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\157' + chr(0b10101 + 0o36) + chr(0b110111) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(0b100 + 0o61) + chr(0b110101), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(891 - 838), 35998 - 35990), nzTpIcepk0o8(chr(922 - 874) + '\x6f' + chr(486 - 436) + '\067' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\062' + chr(0b110010) + '\x33', ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\x32' + '\064' + chr(53), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + '\x35' + chr(52), 47826 - 47818), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + chr(418 - 370) + chr(54), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(3348 - 3237) + '\062' + chr(0b110000) + chr(49), 0o10), nzTpIcepk0o8(chr(1112 - 1064) + '\157' + chr(50) + chr(50) + chr(53), 6673 - 6665), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b1110 + 0o45) + '\067' + '\x31', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110010) + chr(50) + chr(0b101010 + 0o12), 37260 - 37252), nzTpIcepk0o8(chr(0b110000) + chr(0b1000011 + 0o54) + chr(0b110011) + chr(49) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(111) + '\x32' + chr(0b110100 + 0o3), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + '\x33' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1100 + 0o143) + '\063' + chr(638 - 587) + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(2037 - 1984) + chr(52), 0b1000), nzTpIcepk0o8(chr(857 - 809) + chr(0b1010000 + 0o37) + chr(0b10000 + 0o43) + chr(0b1010 + 0o52) + '\062', 54648 - 54640), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + '\065' + chr(0b100110 + 0o14), 24655 - 24647), nzTpIcepk0o8(chr(0b101001 + 0o7) + '\x6f' + chr(719 - 670) + chr(48) + chr(0b11100 + 0o30), 58577 - 58569), nzTpIcepk0o8('\060' + '\157' + '\063' + chr(0b1010 + 0o53) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x33' + chr(0b1001 + 0o51) + '\067', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b10010 + 0o40) + '\x35', 5983 - 5975), nzTpIcepk0o8(chr(0b110000) + chr(0b11001 + 0o126) + chr(0b101100 + 0o6) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(1263 - 1215) + chr(0b1101111) + chr(0b110011) + chr(0b100111 + 0o11) + '\x34', 25104 - 25096)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b1101111) + '\065' + '\x30', 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc1'), chr(0b110111 + 0o55) + chr(101) + '\143' + chr(0b1000000 + 0o57) + chr(0b1100100) + '\x65')(chr(117) + '\x74' + chr(102) + chr(0b101101) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def BWeKaum1eLMD(hXMPsSrOQzbh): ttJEx6R4Ze_G = hXMPsSrOQzbh._color_stream.read_frame() ntZ7J9epXgGb = ttJEx6R4Ze_G.get_buffer_as_triplet() CxB5HCLHUFlE = nDF4gVNx0u9Q.Tn6rGr7XTM7t([ntZ7J9epXgGb[ZlbFMSG8gCoF][nzTpIcepk0o8(chr(48) + chr(6652 - 6541) + chr(48), 8)] for ZlbFMSG8gCoF in bbT2xIe5pzk7(fVPOOz2lciut.COLOR_IM_WIDTH * fVPOOz2lciut.COLOR_IM_HEIGHT)]) DnuQbtARaL6J = nDF4gVNx0u9Q.Tn6rGr7XTM7t([ntZ7J9epXgGb[ZlbFMSG8gCoF][nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110000 + 0o1), 8)] for ZlbFMSG8gCoF in bbT2xIe5pzk7(fVPOOz2lciut.COLOR_IM_WIDTH * fVPOOz2lciut.COLOR_IM_HEIGHT)]) sUu9HD6eVOEi = nDF4gVNx0u9Q.Tn6rGr7XTM7t([ntZ7J9epXgGb[ZlbFMSG8gCoF][nzTpIcepk0o8(chr(892 - 844) + chr(0b1101001 + 0o6) + chr(1308 - 1258), 52893 - 52885)] for ZlbFMSG8gCoF in bbT2xIe5pzk7(fVPOOz2lciut.COLOR_IM_WIDTH * fVPOOz2lciut.COLOR_IM_HEIGHT)]) ba9W_JH418Wl = nDF4gVNx0u9Q.UmwwEp7MzR6q([fVPOOz2lciut.COLOR_IM_HEIGHT, fVPOOz2lciut.COLOR_IM_WIDTH, nzTpIcepk0o8('\060' + '\157' + chr(0b110011), 8)]) ba9W_JH418Wl[:, :, nzTpIcepk0o8('\060' + chr(111) + '\x30', 8)] = CxB5HCLHUFlE.reshape(fVPOOz2lciut.COLOR_IM_HEIGHT, fVPOOz2lciut.COLOR_IM_WIDTH) ba9W_JH418Wl[:, :, nzTpIcepk0o8(chr(407 - 359) + chr(0b1101111) + '\061', 8)] = DnuQbtARaL6J.reshape(fVPOOz2lciut.COLOR_IM_HEIGHT, fVPOOz2lciut.COLOR_IM_WIDTH) ba9W_JH418Wl[:, :, nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b1101111) + '\x32', 8)] = sUu9HD6eVOEi.reshape(fVPOOz2lciut.COLOR_IM_HEIGHT, fVPOOz2lciut.COLOR_IM_WIDTH) if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb0\xe8PQ\xa9-g\x0f\x9cw$r'), chr(100) + '\145' + '\x63' + '\157' + chr(0b100010 + 0o102) + chr(8142 - 8041))(chr(117) + '\x74' + '\x66' + '\055' + '\070')): ba9W_JH418Wl = nDF4gVNx0u9Q.flipud(ba9W_JH418Wl.xqAChpcBkssb(nDF4gVNx0u9Q.uint8)) else: ba9W_JH418Wl = nDF4gVNx0u9Q.fliplr(ba9W_JH418Wl.xqAChpcBkssb(nDF4gVNx0u9Q.uint8)) return lPn7XfHAFaXG(ba9W_JH418Wl, frame=roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x85\xb8\x7f\n\xb7\x00y\x14\x88@q5'), chr(100) + chr(0b1110 + 0o127) + chr(99) + chr(111) + chr(0b1100100) + chr(0b110001 + 0o64))(chr(0b1100110 + 0o17) + chr(116) + '\x66' + '\055' + '\070')))
BerkeleyAutomation/perception
perception/primesense_sensor.py
PrimesenseSensor.frames
def frames(self): """Retrieve a new frame from the Kinect and convert it to a ColorImage, a DepthImage, and an IrImage. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame. Raises ------ RuntimeError If the Kinect stream is not running. """ color_im = self._read_color_image() depth_im = self._read_depth_image() return color_im, depth_im, None
python
def frames(self): """Retrieve a new frame from the Kinect and convert it to a ColorImage, a DepthImage, and an IrImage. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame. Raises ------ RuntimeError If the Kinect stream is not running. """ color_im = self._read_color_image() depth_im = self._read_depth_image() return color_im, depth_im, None
[ "def", "frames", "(", "self", ")", ":", "color_im", "=", "self", ".", "_read_color_image", "(", ")", "depth_im", "=", "self", ".", "_read_depth_image", "(", ")", "return", "color_im", ",", "depth_im", ",", "None" ]
Retrieve a new frame from the Kinect and convert it to a ColorImage, a DepthImage, and an IrImage. Returns ------- :obj:`tuple` of :obj:`ColorImage`, :obj:`DepthImage`, :obj:`IrImage`, :obj:`numpy.ndarray` The ColorImage, DepthImage, and IrImage of the current frame. Raises ------ RuntimeError If the Kinect stream is not running.
[ "Retrieve", "a", "new", "frame", "from", "the", "Kinect", "and", "convert", "it", "to", "a", "ColorImage", "a", "DepthImage", "and", "an", "IrImage", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/primesense_sensor.py#L200-L216
train
Retrieve a new frame from the Kinect and convert it to a ColorImage DepthImage and IrImage.
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,D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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(0b10110 + 0o32) + chr(0b1101111) + chr(1162 - 1113) + chr(1838 - 1788) + chr(53), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(50) + chr(213 - 161) + '\x36', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101 + 0o142) + chr(0b110101) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\157' + '\061' + '\x32' + chr(1704 - 1653), 9137 - 9129), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(51) + '\x30', 11602 - 11594), nzTpIcepk0o8(chr(1339 - 1291) + chr(111) + '\061' + chr(0b110010) + '\x34', 0b1000), nzTpIcepk0o8(chr(48) + chr(7945 - 7834) + chr(0b100111 + 0o16) + chr(0b101101 + 0o3), 0b1000), nzTpIcepk0o8('\x30' + chr(0b11101 + 0o122) + '\x31' + chr(48) + chr(49), 60972 - 60964), nzTpIcepk0o8(chr(1599 - 1551) + chr(0b1101111) + chr(0b110001) + chr(1247 - 1192) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b111100 + 0o63) + chr(0b101 + 0o55) + chr(0b1100 + 0o45) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1985 - 1936) + chr(0b0 + 0o66) + '\x32', 11804 - 11796), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(52) + chr(185 - 132), 51152 - 51144), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101100 + 0o7) + '\060' + '\062', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1825 - 1776) + chr(909 - 860) + chr(1145 - 1092), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5760 - 5649) + chr(0b1 + 0o61) + '\x32' + '\064', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(0b110001) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + chr(0b100001 + 0o22) + chr(50), 0b1000), nzTpIcepk0o8(chr(725 - 677) + chr(0b1101111) + chr(2371 - 2322) + '\x32' + chr(0b110100), 8), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1283 - 1232) + '\061' + chr(0b110000), 52717 - 52709), nzTpIcepk0o8(chr(1339 - 1291) + chr(0b1011000 + 0o27) + chr(0b110010) + chr(0b11 + 0o56) + chr(0b110101), 8), nzTpIcepk0o8(chr(2166 - 2118) + chr(111) + '\067' + chr(0b110000), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(55) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(1357 - 1309) + chr(0b1101111) + chr(1933 - 1884) + '\062' + chr(0b101001 + 0o13), 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(273 - 223) + chr(0b10100 + 0o40) + '\x34', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(733 - 683) + chr(53) + chr(51), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(2290 - 2239) + chr(1447 - 1394) + '\065', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(9236 - 9125) + chr(0b100011 + 0o24) + chr(50), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x32' + '\061' + '\065', 8), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(2889 - 2778) + '\x31' + chr(52) + '\x33', 43372 - 43364), nzTpIcepk0o8(chr(0b110000) + chr(8874 - 8763) + chr(54) + chr(0b110101), 59878 - 59870), nzTpIcepk0o8(chr(0b110000) + chr(0b1010110 + 0o31) + '\062' + '\060' + chr(48), 51174 - 51166), nzTpIcepk0o8(chr(869 - 821) + chr(0b10000 + 0o137) + '\x32' + '\067' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(292 - 244) + '\157' + chr(0b110001) + '\065' + chr(425 - 374), 0o10), nzTpIcepk0o8(chr(244 - 196) + chr(0b1101111) + chr(1214 - 1165) + chr(0b11100 + 0o32) + chr(0b110010), 8), nzTpIcepk0o8(chr(48) + '\157' + chr(749 - 698) + chr(298 - 247) + '\060', 8), nzTpIcepk0o8('\x30' + '\x6f' + chr(1564 - 1514), 40036 - 40028), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(0b110111) + chr(911 - 862), 0b1000), nzTpIcepk0o8(chr(443 - 395) + '\157' + '\x32' + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(2524 - 2469) + chr(0b101011 + 0o6), 27103 - 27095), nzTpIcepk0o8(chr(0b0 + 0o60) + chr(0b100110 + 0o111) + chr(0b110001) + chr(0b1101 + 0o52) + chr(1398 - 1344), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110101) + '\x30', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'{'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(6127 - 6016) + chr(0b111100 + 0o50) + chr(2236 - 2135))('\x75' + chr(11124 - 11008) + '\x66' + chr(0b100101 + 0o10) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def G4Lisexwxqjs(hXMPsSrOQzbh): GFVgEmwvG0jZ = hXMPsSrOQzbh._read_color_image() WZcCXRnThfxU = hXMPsSrOQzbh._read_depth_image() return (GFVgEmwvG0jZ, WZcCXRnThfxU, None)
BerkeleyAutomation/perception
perception/primesense_sensor.py
PrimesenseSensor.min_depth_img
def min_depth_img(self, num_img=1): """Collect a series of depth images and return the min of the set. Parameters ---------- num_img : int The number of consecutive frames to process. Returns ------- :obj:`DepthImage` The min DepthImage collected from the frames. """ depths = [] for _ in range(num_img): _, depth, _ = self.frames() depths.append(depth) return Image.min_images(depths)
python
def min_depth_img(self, num_img=1): """Collect a series of depth images and return the min of the set. Parameters ---------- num_img : int The number of consecutive frames to process. Returns ------- :obj:`DepthImage` The min DepthImage collected from the frames. """ depths = [] for _ in range(num_img): _, depth, _ = self.frames() depths.append(depth) return Image.min_images(depths)
[ "def", "min_depth_img", "(", "self", ",", "num_img", "=", "1", ")", ":", "depths", "=", "[", "]", "for", "_", "in", "range", "(", "num_img", ")", ":", "_", ",", "depth", ",", "_", "=", "self", ".", "frames", "(", ")", "depths", ".", "append", "(", "depth", ")", "return", "Image", ".", "min_images", "(", "depths", ")" ]
Collect a series of depth images and return the min of the set. Parameters ---------- num_img : int The number of consecutive frames to process. Returns ------- :obj:`DepthImage` The min DepthImage collected from the frames.
[ "Collect", "a", "series", "of", "depth", "images", "and", "return", "the", "min", "of", "the", "set", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/primesense_sensor.py#L241-L260
train
Collect a series of depth images and return the min of the set.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9N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myaCTbWD,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(616 - 568) + chr(0b1101111) + chr(978 - 929) + '\060' + chr(1386 - 1338), 2967 - 2959), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b1010 + 0o47) + chr(1402 - 1352) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + chr(299 - 251) + '\064', 0o10), nzTpIcepk0o8('\060' + chr(10089 - 9978) + chr(2044 - 1995) + chr(2128 - 2076) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(10995 - 10884) + chr(1945 - 1890), ord("\x08")), nzTpIcepk0o8(chr(69 - 21) + chr(111) + chr(50) + chr(1572 - 1523) + '\x31', 46775 - 46767), nzTpIcepk0o8(chr(0b10001 + 0o37) + chr(0b10010 + 0o135) + '\063' + chr(0b110011) + chr(365 - 314), 0b1000), nzTpIcepk0o8(chr(48) + chr(2177 - 2066) + '\x31' + '\x30' + chr(0b110000), 8), nzTpIcepk0o8('\060' + chr(0b1000011 + 0o54) + chr(0b110011) + '\065' + chr(0b100111 + 0o16), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x37' + '\063', 54176 - 54168), nzTpIcepk0o8(chr(0b110000) + chr(8047 - 7936) + '\062' + '\x30' + chr(860 - 806), 40491 - 40483), nzTpIcepk0o8('\x30' + chr(9936 - 9825) + chr(0b101101 + 0o12) + chr(0b101000 + 0o17), 49493 - 49485), nzTpIcepk0o8('\x30' + chr(0b100000 + 0o117) + chr(0b110001) + chr(2037 - 1989), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110010) + '\067' + chr(51), 0o10), nzTpIcepk0o8(chr(1261 - 1213) + chr(0b1101111) + '\x33' + chr(48) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + chr(8380 - 8269) + chr(0b110011) + chr(1367 - 1315) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(1644 - 1596) + chr(10195 - 10084) + '\061' + '\060' + chr(0b110111), 38761 - 38753), nzTpIcepk0o8(chr(48) + chr(0b101000 + 0o107) + chr(2144 - 2093) + chr(0b110010) + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061' + '\x37' + chr(0b10101 + 0o35), ord("\x08")), nzTpIcepk0o8(chr(2184 - 2136) + chr(111) + chr(1669 - 1619) + '\x37' + '\066', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\062' + chr(110 - 59) + '\065', 42287 - 42279), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(0b110110) + chr(0b110011), 21209 - 21201), nzTpIcepk0o8('\x30' + '\157' + chr(0b101011 + 0o10) + chr(821 - 769) + '\066', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + chr(0b10111 + 0o36) + chr(0b101011 + 0o5), 0b1000), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(0b1101111) + chr(50) + '\x34' + chr(0b11010 + 0o31), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + '\062' + chr(0b10111 + 0o32) + chr(51), 32763 - 32755), nzTpIcepk0o8('\x30' + chr(985 - 874) + chr(50) + chr(48) + chr(55), 52666 - 52658), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b1111 + 0o42) + '\x35', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(11624 - 11513) + chr(0b110001) + '\066' + '\x31', 28077 - 28069), nzTpIcepk0o8(chr(0b110000) + chr(0b1101101 + 0o2) + '\x32' + chr(1459 - 1410) + chr(2676 - 2621), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b10011 + 0o134) + '\065' + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(1532 - 1481) + chr(597 - 542) + chr(0b100100 + 0o14), 0b1000), nzTpIcepk0o8(chr(48) + chr(2496 - 2385) + chr(0b100110 + 0o14) + chr(50) + '\x36', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(2299 - 2247) + chr(54), 0o10), nzTpIcepk0o8(chr(0b10111 + 0o31) + '\157' + '\x32' + '\067' + '\062', 0b1000), nzTpIcepk0o8(chr(1197 - 1149) + chr(0b11 + 0o154) + '\x37' + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(1922 - 1874) + '\x6f' + '\060', ord("\x08")), nzTpIcepk0o8('\060' + chr(12124 - 12013) + chr(0b10111 + 0o33) + chr(0b110000) + chr(1656 - 1602), 8), nzTpIcepk0o8('\060' + chr(0b111111 + 0o60) + '\x32' + chr(0b110011) + chr(0b100000 + 0o26), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(580 - 527), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(95 - 42) + chr(0b110000), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'n'), chr(0b1100100) + '\x65' + chr(7579 - 7480) + chr(3970 - 3859) + chr(0b1100100) + chr(0b1100101))('\165' + chr(0b1000100 + 0o60) + chr(0b1100011 + 0o3) + '\x2d' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def RSb5oy2ZpBx0(hXMPsSrOQzbh, eVRCGQa70gNM=nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001), 56227 - 56219)): UjxwtHwihe1B = [] for zIqcgNgQ9U6F in bbT2xIe5pzk7(eVRCGQa70gNM): (zIqcgNgQ9U6F, UH0YjwuI_XzX, zIqcgNgQ9U6F) = hXMPsSrOQzbh.G4Lisexwxqjs() roI3spqORKae(UjxwtHwihe1B, roI3spqORKae(ES5oEprVxulp(b'\x08\x07\x17T\x7f\xee\x9c/\x87T\xd3\n'), chr(0b100001 + 0o103) + chr(0b1100101) + chr(0b1100011) + '\x6f' + chr(100) + chr(0b11 + 0o142))('\165' + chr(0b1110100) + chr(102) + chr(45) + chr(2599 - 2543)))(UH0YjwuI_XzX) return roI3spqORKae(RvV7ueTH51Uy, roI3spqORKae(ES5oEprVxulp(b"-:*?n\xe4\xba'\x88H"), chr(0b1010010 + 0o22) + chr(9415 - 9314) + chr(0b1100011) + chr(9385 - 9274) + '\144' + '\x65')(chr(117) + '\x74' + chr(0b1100110) + chr(0b101101) + chr(0b100110 + 0o22)))(UjxwtHwihe1B)
BerkeleyAutomation/perception
perception/primesense_sensor.py
PrimesenseSensor_ROS._ros_read_images
def _ros_read_images(self, stream_buffer, number, staleness_limit = 10.): """ Reads images from a stream buffer Parameters ---------- stream_buffer : string absolute path to the image buffer service number : int The number of frames to get. Must be less than the image buffer service's current buffer size staleness_limit : float, optional Max value of how many seconds old the oldest image is. If the oldest image grabbed is older than this value, a RuntimeError is thrown. If None, staleness is ignored. Returns ------- List of nump.ndarray objects, each one an image Images are in reverse chronological order (newest first) """ rospy.wait_for_service(stream_buffer, timeout = self.timeout) ros_image_buffer = rospy.ServiceProxy(stream_buffer, ImageBuffer) ret = ros_image_buffer(number, 1) if not staleness_limit == None: if ret.timestamps[-1] > staleness_limit: raise RuntimeError("Got data {0} seconds old, more than allowed {1} seconds" .format(ret.timestamps[-1], staleness_limit)) data = ret.data.reshape(ret.data_dim1, ret.data_dim2, ret.data_dim3).astype(ret.dtype) # Special handling for 1 element, since dstack's behavior is different if number == 1: return [data] return np.dsplit(data, number)
python
def _ros_read_images(self, stream_buffer, number, staleness_limit = 10.): """ Reads images from a stream buffer Parameters ---------- stream_buffer : string absolute path to the image buffer service number : int The number of frames to get. Must be less than the image buffer service's current buffer size staleness_limit : float, optional Max value of how many seconds old the oldest image is. If the oldest image grabbed is older than this value, a RuntimeError is thrown. If None, staleness is ignored. Returns ------- List of nump.ndarray objects, each one an image Images are in reverse chronological order (newest first) """ rospy.wait_for_service(stream_buffer, timeout = self.timeout) ros_image_buffer = rospy.ServiceProxy(stream_buffer, ImageBuffer) ret = ros_image_buffer(number, 1) if not staleness_limit == None: if ret.timestamps[-1] > staleness_limit: raise RuntimeError("Got data {0} seconds old, more than allowed {1} seconds" .format(ret.timestamps[-1], staleness_limit)) data = ret.data.reshape(ret.data_dim1, ret.data_dim2, ret.data_dim3).astype(ret.dtype) # Special handling for 1 element, since dstack's behavior is different if number == 1: return [data] return np.dsplit(data, number)
[ "def", "_ros_read_images", "(", "self", ",", "stream_buffer", ",", "number", ",", "staleness_limit", "=", "10.", ")", ":", "rospy", ".", "wait_for_service", "(", "stream_buffer", ",", "timeout", "=", "self", ".", "timeout", ")", "ros_image_buffer", "=", "rospy", ".", "ServiceProxy", "(", "stream_buffer", ",", "ImageBuffer", ")", "ret", "=", "ros_image_buffer", "(", "number", ",", "1", ")", "if", "not", "staleness_limit", "==", "None", ":", "if", "ret", ".", "timestamps", "[", "-", "1", "]", ">", "staleness_limit", ":", "raise", "RuntimeError", "(", "\"Got data {0} seconds old, more than allowed {1} seconds\"", ".", "format", "(", "ret", ".", "timestamps", "[", "-", "1", "]", ",", "staleness_limit", ")", ")", "data", "=", "ret", ".", "data", ".", "reshape", "(", "ret", ".", "data_dim1", ",", "ret", ".", "data_dim2", ",", "ret", ".", "data_dim3", ")", ".", "astype", "(", "ret", ".", "dtype", ")", "# Special handling for 1 element, since dstack's behavior is different", "if", "number", "==", "1", ":", "return", "[", "data", "]", "return", "np", ".", "dsplit", "(", "data", ",", "number", ")" ]
Reads images from a stream buffer Parameters ---------- stream_buffer : string absolute path to the image buffer service number : int The number of frames to get. Must be less than the image buffer service's current buffer size staleness_limit : float, optional Max value of how many seconds old the oldest image is. If the oldest image grabbed is older than this value, a RuntimeError is thrown. If None, staleness is ignored. Returns ------- List of nump.ndarray objects, each one an image Images are in reverse chronological order (newest first)
[ "Reads", "images", "from", "a", "stream", "buffer", "Parameters", "----------", "stream_buffer", ":", "string", "absolute", "path", "to", "the", "image", "buffer", "service", "number", ":", "int", "The", "number", "of", "frames", "to", "get", ".", "Must", "be", "less", "than", "the", "image", "buffer", "service", "s", "current", "buffer", "size", "staleness_limit", ":", "float", "optional", "Max", "value", "of", "how", "many", "seconds", "old", "the", "oldest", "image", "is", ".", "If", "the", "oldest", "image", "grabbed", "is", "older", "than", "this", "value", "a", "RuntimeError", "is", "thrown", ".", "If", "None", "staleness", "is", "ignored", ".", "Returns", "-------", "List", "of", "nump", ".", "ndarray", "objects", "each", "one", "an", "image", "Images", "are", "in", "reverse", "chronological", "order", "(", "newest", "first", ")" ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/primesense_sensor.py#L312-L346
train
Reads images from a stream buffer.
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,LdFlJR2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Wa_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(50) + '\x31' + chr(0b110101), 50280 - 50272), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + chr(51) + chr(53) + chr(53), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b100011 + 0o114) + '\x33' + chr(0b1000 + 0o51) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b101111 + 0o100) + '\061' + '\x34' + '\x34', 0b1000), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\x6f' + chr(379 - 329) + '\063' + chr(50), 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(49) + chr(1188 - 1135), 34766 - 34758), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + chr(53) + chr(0b110110 + 0o0), 31933 - 31925), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110100) + '\x34', 0o10), nzTpIcepk0o8(chr(992 - 944) + chr(111) + chr(55) + chr(50), 44191 - 44183), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + chr(967 - 917) + '\062', ord("\x08")), nzTpIcepk0o8('\060' + chr(141 - 30) + chr(0b101 + 0o54) + '\060' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b10000 + 0o40) + chr(111) + chr(215 - 164), ord("\x08")), nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + '\x31' + chr(0b101110 + 0o5) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + '\x34' + chr(0b1010 + 0o55), 23095 - 23087), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(567 - 519) + '\x33', 25956 - 25948), nzTpIcepk0o8('\060' + chr(9278 - 9167) + chr(0b100010 + 0o20) + chr(53) + '\065', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\063' + chr(0b1101 + 0o47) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b110 + 0o151) + chr(0b100110 + 0o15) + chr(0b110011) + chr(0b110010), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(0b101 + 0o55) + chr(1045 - 990) + '\061', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b1111 + 0o44) + chr(0b10001 + 0o45) + '\061', 0b1000), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\157' + chr(0b110010) + '\064' + '\x36', 0b1000), nzTpIcepk0o8('\x30' + chr(0b101101 + 0o102) + chr(0b100111 + 0o13) + chr(53) + '\x34', 15219 - 15211), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + '\x34' + chr(597 - 548), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(0b10101 + 0o33) + '\x35', 0b1000), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + chr(0b1011 + 0o47) + chr(0b110011) + '\x30', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110000 + 0o3) + chr(0b100100 + 0o20) + '\x35', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b101 + 0o152) + chr(0b110001) + chr(0b110100) + '\065', ord("\x08")), nzTpIcepk0o8(chr(301 - 253) + '\157' + '\x35' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + chr(10913 - 10802) + chr(0b110011) + chr(53) + chr(0b101 + 0o61), ord("\x08")), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(111) + '\x31' + chr(1674 - 1619) + '\063', ord("\x08")), nzTpIcepk0o8(chr(426 - 378) + chr(0b1101111) + chr(0b100101 + 0o15) + '\x35' + chr(1659 - 1604), 31820 - 31812), nzTpIcepk0o8(chr(0b11100 + 0o24) + '\x6f' + chr(643 - 593) + '\x34' + chr(55), 30414 - 30406), nzTpIcepk0o8(chr(0b111 + 0o51) + chr(0b1101111) + '\x31' + chr(1449 - 1397) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(111) + '\x33' + '\x33' + chr(0b11110 + 0o24), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + chr(1193 - 1145) + chr(0b100 + 0o57), 8), nzTpIcepk0o8('\060' + chr(0b1101101 + 0o2) + chr(0b110010) + chr(0b11 + 0o55) + chr(0b10100 + 0o34), 0b1000), nzTpIcepk0o8(chr(0b1000 + 0o50) + chr(443 - 332) + chr(49) + '\x34' + '\065', 8), nzTpIcepk0o8(chr(0b1111 + 0o41) + chr(111) + '\065' + chr(52), 39188 - 39180), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + '\061', ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + '\x35' + chr(49), 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\157' + '\x35' + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xa3'), '\144' + chr(0b1001010 + 0o33) + chr(3554 - 3455) + chr(0b1101111) + '\x64' + '\x65')(chr(10658 - 10541) + chr(11119 - 11003) + '\x66' + chr(0b100101 + 0o10) + chr(3009 - 2953)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def NasRIDGbjiCk(hXMPsSrOQzbh, VOvAXxR1Tl_6, cC8F_SjgQbba, AsftMf5ZSrS4=10.0): roI3spqORKae(yFQYWmsCnVBN, roI3spqORKae(ES5oEprVxulp(b'\xfa\x8c\xa0\x10\xc5+\xc1Ve\xa1%q/\x0e\xe0\xc8'), chr(100) + '\x65' + chr(99) + '\x6f' + '\144' + chr(2546 - 2445))(chr(4871 - 4754) + chr(6379 - 6263) + chr(0b1100110) + chr(1267 - 1222) + chr(0b111000)))(VOvAXxR1Tl_6, timeout=roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b"\xcc\xae\x88'\xcf\x18\xe8uI\x9f0q"), chr(7693 - 7593) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(100) + chr(8281 - 8180))(chr(9384 - 9267) + chr(0b1110100) + '\x66' + '\x2d' + chr(0b111000)))) wjOJbzeLPkR4 = yFQYWmsCnVBN.ServiceProxy(VOvAXxR1Tl_6, hA3PZoMGTD1W) PvvMx4JvMX6J = wjOJbzeLPkR4(cC8F_SjgQbba, nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49), ord("\x08"))) if AsftMf5ZSrS4 is not None: if roI3spqORKae(PvvMx4JvMX6J, roI3spqORKae(ES5oEprVxulp(b'\xdd\xb2\xb3\x00\xd0>\xc7C\x02\xa0\x0eE'), chr(0b1100100) + '\x65' + '\x63' + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(881 - 764) + chr(116) + '\x66' + chr(0b1001 + 0o44) + chr(0b111000)))[-nzTpIcepk0o8('\x30' + chr(111) + chr(612 - 563), 8)] > AsftMf5ZSrS4: raise _1qUu0gKi9gH(roI3spqORKae(roI3spqORKae(ES5oEprVxulp(b'\xca\x82\xbdD\xfe,\xdaE\x1a\xa9p~y\x14\xe6\xce\x88\xb4\xdd\x82\x86\xc3\xcd!\xb4\xc5\x08F\x9c\x1e\x8f\xd3\x08\xbb\xed\xa0\x04@e\x86\xfa\x88\xadD\xe1|\xd3\x04I\xb7#l7\x03\xf0'), chr(0b1100100) + chr(0b1000110 + 0o37) + '\143' + chr(1845 - 1734) + chr(0b1001111 + 0o25) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(0b1100110) + chr(1765 - 1720) + chr(56)), roI3spqORKae(ES5oEprVxulp(b'\xfc\xde\xfa/\xdd~\xc8Kk\x8d\x03I'), chr(8568 - 8468) + chr(0b101101 + 0o70) + chr(99) + chr(111) + '\144' + '\145')(chr(0b1110101) + chr(0b1110100) + chr(0b10100 + 0o122) + chr(0b101101) + chr(1221 - 1165)))(roI3spqORKae(PvvMx4JvMX6J, roI3spqORKae(ES5oEprVxulp(b'\xdd\xb2\xb3\x00\xd0>\xc7C\x02\xa0\x0eE'), '\x64' + chr(0b1100101) + chr(0b1100 + 0o127) + chr(7158 - 7047) + chr(3938 - 3838) + chr(0b1100101))('\x75' + chr(0b1110100) + chr(102) + chr(45) + '\070'))[-nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + '\061', 8)], AsftMf5ZSrS4)) FfKOThdpoDTb = PvvMx4JvMX6J.data.reshape(PvvMx4JvMX6J.data_dim1, PvvMx4JvMX6J.data_dim2, PvvMx4JvMX6J.data_dim3).xqAChpcBkssb(PvvMx4JvMX6J.RcX9bbuOzh5L) if cC8F_SjgQbba == nzTpIcepk0o8('\060' + chr(0b10000 + 0o137) + chr(0b110001), 8): return [FfKOThdpoDTb] return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xe9\x9e\xb9\x08\xf39'), chr(0b111101 + 0o47) + '\x65' + chr(0b1001101 + 0o26) + chr(111) + chr(0b1100100) + chr(0b1100101))(chr(117) + '\x74' + chr(8981 - 8879) + '\055' + chr(0b111000)))(FfKOThdpoDTb, cC8F_SjgQbba)
BerkeleyAutomation/perception
perception/primesense_sensor.py
PrimesenseSensor_ROS._read_depth_images
def _read_depth_images(self, num_images): """ Reads depth images from the device """ depth_images = self._ros_read_images(self._depth_image_buffer, num_images, self.staleness_limit) for i in range(0, num_images): depth_images[i] = depth_images[i] * MM_TO_METERS # convert to meters if self._flip_images: depth_images[i] = np.flipud(depth_images[i]) depth_images[i] = np.fliplr(depth_images[i]) depth_images[i] = DepthImage(depth_images[i], frame=self._frame) return depth_images
python
def _read_depth_images(self, num_images): """ Reads depth images from the device """ depth_images = self._ros_read_images(self._depth_image_buffer, num_images, self.staleness_limit) for i in range(0, num_images): depth_images[i] = depth_images[i] * MM_TO_METERS # convert to meters if self._flip_images: depth_images[i] = np.flipud(depth_images[i]) depth_images[i] = np.fliplr(depth_images[i]) depth_images[i] = DepthImage(depth_images[i], frame=self._frame) return depth_images
[ "def", "_read_depth_images", "(", "self", ",", "num_images", ")", ":", "depth_images", "=", "self", ".", "_ros_read_images", "(", "self", ".", "_depth_image_buffer", ",", "num_images", ",", "self", ".", "staleness_limit", ")", "for", "i", "in", "range", "(", "0", ",", "num_images", ")", ":", "depth_images", "[", "i", "]", "=", "depth_images", "[", "i", "]", "*", "MM_TO_METERS", "# convert to meters", "if", "self", ".", "_flip_images", ":", "depth_images", "[", "i", "]", "=", "np", ".", "flipud", "(", "depth_images", "[", "i", "]", ")", "depth_images", "[", "i", "]", "=", "np", ".", "fliplr", "(", "depth_images", "[", "i", "]", ")", "depth_images", "[", "i", "]", "=", "DepthImage", "(", "depth_images", "[", "i", "]", ",", "frame", "=", "self", ".", "_frame", ")", "return", "depth_images" ]
Reads depth images from the device
[ "Reads", "depth", "images", "from", "the", "device" ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/primesense_sensor.py#L360-L369
train
Reads the depth images from the device
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,Qn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0o8,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(2269 - 2219) + chr(2563 - 2508), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110011) + '\x31' + chr(2343 - 2294), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x32' + chr(0b100101 + 0o16) + chr(0b100111 + 0o12), 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(51) + chr(1909 - 1858) + '\067', 0o10), nzTpIcepk0o8('\060' + chr(0b1010100 + 0o33) + chr(51) + '\x35' + chr(2465 - 2414), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1139 - 1087) + '\x31', 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(51) + '\063', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b110001) + '\x34' + '\x31', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(1845 - 1794) + '\x36', 0b1000), nzTpIcepk0o8(chr(1509 - 1461) + chr(2299 - 2188) + '\x33' + chr(50) + chr(0b110010), 43123 - 43115), nzTpIcepk0o8('\x30' + '\157' + chr(0b110101) + chr(0b110100), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(457 - 406) + '\061' + '\061', 8), nzTpIcepk0o8('\x30' + chr(11271 - 11160) + chr(51) + chr(0b110011) + '\x30', ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(54) + chr(48), 0o10), nzTpIcepk0o8(chr(2231 - 2183) + chr(111) + '\x31' + chr(2374 - 2323) + chr(0b100110 + 0o13), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + chr(0b10 + 0o61), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(2124 - 2073) + chr(0b110001) + chr(48), 27157 - 27149), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110101) + '\064', 8), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110100) + chr(0b111 + 0o57), 0o10), nzTpIcepk0o8('\x30' + chr(0b101100 + 0o103) + chr(2010 - 1959) + '\x33' + '\061', 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b100110 + 0o14) + '\x35' + chr(0b11011 + 0o33), 0o10), nzTpIcepk0o8('\060' + chr(1573 - 1462) + chr(1879 - 1829) + chr(0b110010) + chr(0b10000 + 0o42), 15075 - 15067), nzTpIcepk0o8('\x30' + chr(111) + chr(53) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(1515 - 1464) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\064' + chr(0b100011 + 0o24), 0o10), nzTpIcepk0o8(chr(48) + chr(12280 - 12169) + chr(0b1001 + 0o51) + '\x33' + chr(0b10011 + 0o43), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + '\x36', 0o10), nzTpIcepk0o8(chr(1807 - 1759) + chr(0b101001 + 0o106) + chr(50) + chr(0b110110) + chr(274 - 224), 0b1000), nzTpIcepk0o8(chr(1813 - 1765) + chr(0b1010111 + 0o30) + chr(0b110100), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110011) + chr(758 - 710) + '\x36', 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + chr(52) + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + chr(5889 - 5778) + '\061' + chr(0b10110 + 0o33), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(0b11011 + 0o26) + chr(0b11111 + 0o25), 0b1000), nzTpIcepk0o8(chr(1603 - 1555) + '\x6f' + chr(0b110001) + '\063' + chr(1738 - 1687), 19525 - 19517), nzTpIcepk0o8('\x30' + chr(3390 - 3279) + chr(0b110010) + chr(51) + chr(2115 - 2062), 64292 - 64284), nzTpIcepk0o8('\x30' + chr(6611 - 6500) + chr(1353 - 1304) + chr(0b101100 + 0o11) + '\x35', 0b1000), nzTpIcepk0o8(chr(1325 - 1277) + chr(111) + chr(50) + chr(1148 - 1093) + chr(1891 - 1840), 0b1000), nzTpIcepk0o8(chr(622 - 574) + chr(111) + chr(49) + chr(0b101 + 0o57) + chr(348 - 294), 0o10), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\x6f' + '\x33' + chr(0b110001) + chr(1592 - 1540), 0b1000), nzTpIcepk0o8(chr(2296 - 2248) + chr(0b101 + 0o152) + '\x34' + '\063', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(364 - 316) + '\157' + chr(0b110101) + chr(48), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'9'), chr(100) + '\x65' + chr(0b1100001 + 0o2) + chr(0b10000 + 0o137) + chr(100) + chr(101))(chr(117) + chr(116) + chr(0b1001011 + 0o33) + chr(45) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def Lhe_Dyg7u4A8(hXMPsSrOQzbh, tV2Tkt07h3x3): xePlOIxDczIY = hXMPsSrOQzbh._ros_read_images(hXMPsSrOQzbh._depth_image_buffer, tV2Tkt07h3x3, hXMPsSrOQzbh.staleness_limit) for ZlbFMSG8gCoF in bbT2xIe5pzk7(nzTpIcepk0o8('\060' + '\157' + chr(0b1000 + 0o50), ord("\x08")), tV2Tkt07h3x3): xePlOIxDczIY[ZlbFMSG8gCoF] = xePlOIxDczIY[ZlbFMSG8gCoF] * U3nkm7nMOfja if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'H\xaf\xf5\xb6\x9b~\xb2\x0c?\xb5I\xba'), chr(100) + chr(0b1100101) + chr(0b1100011) + '\157' + chr(100) + '\145')(chr(117) + '\x74' + chr(0b1100110) + chr(0b11110 + 0o17) + chr(56))): xePlOIxDczIY[ZlbFMSG8gCoF] = nDF4gVNx0u9Q.flipud(xePlOIxDczIY[ZlbFMSG8gCoF]) xePlOIxDczIY[ZlbFMSG8gCoF] = nDF4gVNx0u9Q.fliplr(xePlOIxDczIY[ZlbFMSG8gCoF]) xePlOIxDczIY[ZlbFMSG8gCoF] = Ctd7ihpXT1E5(xePlOIxDczIY[ZlbFMSG8gCoF], frame=hXMPsSrOQzbh.j6C2nrwvuP04) return xePlOIxDczIY
BerkeleyAutomation/perception
perception/primesense_sensor.py
PrimesenseSensor_ROS._read_color_images
def _read_color_images(self, num_images): """ Reads color images from the device """ color_images = self._ros_read_images(self._color_image_buffer, num_images, self.staleness_limit) for i in range(0, num_images): if self._flip_images: color_images[i] = np.flipud(color_images[i].astype(np.uint8)) color_images[i] = np.fliplr(color_images[i].astype(np.uint8)) color_images[i] = ColorImage(color_images[i], frame=self._frame) return color_images
python
def _read_color_images(self, num_images): """ Reads color images from the device """ color_images = self._ros_read_images(self._color_image_buffer, num_images, self.staleness_limit) for i in range(0, num_images): if self._flip_images: color_images[i] = np.flipud(color_images[i].astype(np.uint8)) color_images[i] = np.fliplr(color_images[i].astype(np.uint8)) color_images[i] = ColorImage(color_images[i], frame=self._frame) return color_images
[ "def", "_read_color_images", "(", "self", ",", "num_images", ")", ":", "color_images", "=", "self", ".", "_ros_read_images", "(", "self", ".", "_color_image_buffer", ",", "num_images", ",", "self", ".", "staleness_limit", ")", "for", "i", "in", "range", "(", "0", ",", "num_images", ")", ":", "if", "self", ".", "_flip_images", ":", "color_images", "[", "i", "]", "=", "np", ".", "flipud", "(", "color_images", "[", "i", "]", ".", "astype", "(", "np", ".", "uint8", ")", ")", "color_images", "[", "i", "]", "=", "np", ".", "fliplr", "(", "color_images", "[", "i", "]", ".", "astype", "(", "np", ".", "uint8", ")", ")", "color_images", "[", "i", "]", "=", "ColorImage", "(", "color_images", "[", "i", "]", ",", "frame", "=", "self", ".", "_frame", ")", "return", "color_images" ]
Reads color images from the device
[ "Reads", "color", "images", "from", "the", "device" ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/primesense_sensor.py#L370-L378
train
Reads color images from the device
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,JD7LadPikp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nLg8O5zPT,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(361 - 313) + chr(111) + '\063' + chr(1224 - 1171) + chr(488 - 439), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(0b11100 + 0o32) + chr(0b11111 + 0o24), 32213 - 32205), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(0b110000) + chr(50), 7067 - 7059), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(1035 - 924) + chr(0b110001) + chr(860 - 807) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(1642 - 1592) + '\060', 0o10), nzTpIcepk0o8(chr(1009 - 961) + chr(0b1101111) + '\062' + chr(0b1010 + 0o46) + '\067', 0b1000), nzTpIcepk0o8(chr(1238 - 1190) + chr(0b1101 + 0o142) + chr(0b110011) + chr(0b101101 + 0o11) + '\060', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + chr(0b110011) + '\066', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110 + 0o55) + chr(275 - 224) + chr(1924 - 1875), 0b1000), nzTpIcepk0o8('\060' + chr(9121 - 9010) + chr(55) + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b101101 + 0o11) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110001) + chr(0b11110 + 0o30) + '\x37', 0o10), nzTpIcepk0o8(chr(0b101 + 0o53) + '\157' + chr(0b110010) + chr(51) + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + '\x35' + chr(52), 0b1000), nzTpIcepk0o8(chr(478 - 430) + chr(9006 - 8895) + '\x32' + chr(0b0 + 0o65) + '\061', 62806 - 62798), nzTpIcepk0o8('\x30' + chr(8878 - 8767) + '\062' + chr(0b110010), 33795 - 33787), nzTpIcepk0o8(chr(1973 - 1925) + chr(0b1101111) + '\061' + chr(0b110100) + '\x30', 34268 - 34260), nzTpIcepk0o8('\060' + chr(111) + chr(0b110100) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(50) + chr(687 - 632) + chr(0b10111 + 0o36), 58728 - 58720), nzTpIcepk0o8('\060' + chr(0b100110 + 0o111) + '\x32' + chr(48) + '\061', 40371 - 40363), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110011) + '\063' + chr(0b101011 + 0o13), 0b1000), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(111) + chr(129 - 80) + chr(2235 - 2180) + '\x32', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001 + 0o2) + '\060' + '\060', ord("\x08")), nzTpIcepk0o8(chr(1344 - 1296) + chr(111) + '\x35' + chr(50), 64543 - 64535), nzTpIcepk0o8('\x30' + chr(111) + chr(49) + chr(0b100001 + 0o22) + chr(1402 - 1350), 60202 - 60194), nzTpIcepk0o8(chr(232 - 184) + '\x6f' + chr(0b110010) + chr(50) + chr(0b1100 + 0o50), 46857 - 46849), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\063' + chr(0b110111) + chr(0b110101), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101010 + 0o5) + chr(1244 - 1194) + chr(1814 - 1765) + '\x32', 15001 - 14993), nzTpIcepk0o8('\060' + chr(790 - 679) + chr(51) + chr(49) + chr(2405 - 2350), ord("\x08")), nzTpIcepk0o8('\x30' + chr(7174 - 7063) + chr(0b100 + 0o57) + chr(0b110101) + '\065', 0o10), nzTpIcepk0o8('\060' + chr(0b1101001 + 0o6) + chr(0b1111 + 0o45) + chr(54), ord("\x08")), nzTpIcepk0o8(chr(1251 - 1203) + '\157' + chr(0b110010) + chr(0b110001 + 0o5) + chr(1123 - 1073), 0o10), nzTpIcepk0o8(chr(1023 - 975) + '\157' + '\x31' + '\063' + '\x37', 0o10), nzTpIcepk0o8(chr(48) + chr(0b10111 + 0o130) + chr(0b110110) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x33' + '\064' + '\x36', 35506 - 35498), nzTpIcepk0o8('\060' + '\x6f' + '\x31', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(0b110001) + chr(54), 37180 - 37172), nzTpIcepk0o8('\060' + '\157' + chr(0b1010 + 0o55) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(605 - 557) + chr(0b110010 + 0o75) + chr(0b101 + 0o57), 0o10), nzTpIcepk0o8('\060' + '\157' + chr(1576 - 1524) + '\x31', ord("\x08"))][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + '\x6f' + '\065' + chr(1250 - 1202), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xc7'), chr(0b1100100) + chr(0b1100101) + chr(0b1100011) + chr(111) + chr(100) + '\x65')(chr(8453 - 8336) + '\x74' + chr(8782 - 8680) + '\x2d' + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def RcSas6OkaTLy(hXMPsSrOQzbh, tV2Tkt07h3x3): Fr01R_vSqQnU = hXMPsSrOQzbh._ros_read_images(hXMPsSrOQzbh._color_image_buffer, tV2Tkt07h3x3, hXMPsSrOQzbh.staleness_limit) for ZlbFMSG8gCoF in bbT2xIe5pzk7(nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(48), 0b1000), tV2Tkt07h3x3): if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xb6\x15.\x05`\xd8\x99\xf3\xb8YW\x04'), chr(100) + chr(5910 - 5809) + chr(0b1100011) + chr(111) + '\144' + chr(0b1010 + 0o133))('\165' + '\x74' + chr(0b11110 + 0o110) + '\055' + chr(56))): Fr01R_vSqQnU[ZlbFMSG8gCoF] = nDF4gVNx0u9Q.flipud(Fr01R_vSqQnU[ZlbFMSG8gCoF].xqAChpcBkssb(nDF4gVNx0u9Q.uint8)) Fr01R_vSqQnU[ZlbFMSG8gCoF] = nDF4gVNx0u9Q.fliplr(Fr01R_vSqQnU[ZlbFMSG8gCoF].xqAChpcBkssb(nDF4gVNx0u9Q.uint8)) Fr01R_vSqQnU[ZlbFMSG8gCoF] = lPn7XfHAFaXG(Fr01R_vSqQnU[ZlbFMSG8gCoF], frame=hXMPsSrOQzbh.j6C2nrwvuP04) return Fr01R_vSqQnU
BerkeleyAutomation/perception
perception/primesense_sensor.py
PrimesenseSensor_ROS.median_depth_img
def median_depth_img(self, num_img=1, fill_depth=0.0): """Collect a series of depth images and return the median of the set. Parameters ---------- num_img : int The number of consecutive frames to process. Returns ------- :obj:`DepthImage` The median DepthImage collected from the frames. """ depths = self._read_depth_images(num_img) median_depth = Image.median_images(depths) median_depth.data[median_depth.data == 0.0] = fill_depth return median_depth
python
def median_depth_img(self, num_img=1, fill_depth=0.0): """Collect a series of depth images and return the median of the set. Parameters ---------- num_img : int The number of consecutive frames to process. Returns ------- :obj:`DepthImage` The median DepthImage collected from the frames. """ depths = self._read_depth_images(num_img) median_depth = Image.median_images(depths) median_depth.data[median_depth.data == 0.0] = fill_depth return median_depth
[ "def", "median_depth_img", "(", "self", ",", "num_img", "=", "1", ",", "fill_depth", "=", "0.0", ")", ":", "depths", "=", "self", ".", "_read_depth_images", "(", "num_img", ")", "median_depth", "=", "Image", ".", "median_images", "(", "depths", ")", "median_depth", ".", "data", "[", "median_depth", ".", "data", "==", "0.0", "]", "=", "fill_depth", "return", "median_depth" ]
Collect a series of depth images and return the median of the set. Parameters ---------- num_img : int The number of consecutive frames to process. Returns ------- :obj:`DepthImage` The median DepthImage collected from the frames.
[ "Collect", "a", "series", "of", "depth", "images", "and", "return", "the", "median", "of", "the", "set", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/primesense_sensor.py#L387-L404
train
Collect a series of depth images and return the median of the 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,W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iZ,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(1044 - 995) + chr(0b100011 + 0o23) + chr(0b110001), 678 - 670), nzTpIcepk0o8('\x30' + chr(10531 - 10420) + chr(0b110010) + chr(0b110 + 0o55) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b100111 + 0o11) + '\157' + '\061' + chr(0b100000 + 0o23) + '\062', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110011) + chr(52) + '\x30', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b101110 + 0o4) + chr(49) + chr(2085 - 2034), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\x32' + '\064' + chr(50), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + chr(0b10011 + 0o36) + chr(0b110111), 4111 - 4103), nzTpIcepk0o8(chr(898 - 850) + '\157' + '\x32' + chr(0b110100) + chr(2322 - 2268), 48926 - 48918), nzTpIcepk0o8('\x30' + chr(7259 - 7148) + chr(54) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + '\062' + '\x34' + '\062', 8), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + chr(0b100001 + 0o22) + chr(48) + chr(2322 - 2272), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(623 - 512) + chr(51) + '\067' + '\x32', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110010) + chr(0b11 + 0o55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b110010 + 0o75) + chr(50) + chr(396 - 346) + chr(52), 45190 - 45182), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2079 - 2028) + '\065' + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(4732 - 4621) + chr(50) + chr(0b110110) + chr(50), 0o10), nzTpIcepk0o8(chr(2271 - 2223) + '\x6f' + chr(0b110110) + '\067', 42379 - 42371), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\062' + chr(1538 - 1485) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(1931 - 1883) + chr(0b1101111) + '\x32' + chr(48) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1000111 + 0o50) + '\x32' + chr(0b110101) + chr(0b110011), 8), nzTpIcepk0o8(chr(48) + chr(0b1100110 + 0o11) + chr(0b110011) + chr(0b110000) + '\062', 8), nzTpIcepk0o8('\060' + '\x6f' + chr(443 - 394) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(1665 - 1617) + chr(111) + chr(0b110010) + chr(0b101101 + 0o3) + chr(0b110001), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + '\064' + chr(0b10011 + 0o37), 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\061' + chr(0b100011 + 0o16) + '\x36', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x31' + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(48) + chr(10669 - 10558) + chr(1944 - 1891) + '\066', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(0b111 + 0o54) + '\x35' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(8285 - 8174) + '\063' + '\x34' + chr(0b110011), 7166 - 7158), nzTpIcepk0o8(chr(513 - 465) + '\157' + '\x31' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(721 - 673) + '\157' + chr(0b101011 + 0o7) + chr(0b110110) + '\060', 0b1000), nzTpIcepk0o8(chr(222 - 174) + chr(111) + chr(717 - 666) + chr(0b110110) + '\x30', 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + '\063' + chr(1003 - 955), 0o10), nzTpIcepk0o8(chr(48) + chr(4861 - 4750) + chr(0b110001) + chr(0b11000 + 0o35) + chr(985 - 937), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\063' + '\065' + chr(50), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b111011 + 0o64) + '\062' + chr(0b100001 + 0o20) + chr(0b10000 + 0o45), 0o10), nzTpIcepk0o8(chr(48) + chr(7229 - 7118) + '\x33' + chr(48) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100110 + 0o15) + chr(0b100010 + 0o16), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(425 - 376) + chr(0b101010 + 0o11) + chr(49), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b10001 + 0o41) + chr(0b110001) + chr(0b11111 + 0o30), 3828 - 3820)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(111) + '\065' + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'_'), chr(0b11101 + 0o107) + chr(0b1100101) + chr(99) + chr(10809 - 10698) + chr(5460 - 5360) + '\145')('\165' + '\x74' + chr(0b110000 + 0o66) + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def atJBEiOq_lLt(hXMPsSrOQzbh, eVRCGQa70gNM=nzTpIcepk0o8(chr(0b11111 + 0o21) + chr(111) + '\x31', 0o10), OtBA5JjCoiah=0.0): UjxwtHwihe1B = hXMPsSrOQzbh._read_depth_images(eVRCGQa70gNM) FVLJ9hJlf8wB = RvV7ueTH51Uy.median_images(UjxwtHwihe1B) FVLJ9hJlf8wB.FfKOThdpoDTb[FVLJ9hJlf8wB.FfKOThdpoDTb == 0.0] = OtBA5JjCoiah return FVLJ9hJlf8wB
BerkeleyAutomation/perception
perception/primesense_sensor.py
PrimesenseSensor_ROS.min_depth_img
def min_depth_img(self, num_img=1): """Collect a series of depth images and return the min of the set. Parameters ---------- num_img : int The number of consecutive frames to process. Returns ------- :obj:`DepthImage` The min DepthImage collected from the frames. """ depths = self._read_depth_images(num_img) return Image.min_images(depths)
python
def min_depth_img(self, num_img=1): """Collect a series of depth images and return the min of the set. Parameters ---------- num_img : int The number of consecutive frames to process. Returns ------- :obj:`DepthImage` The min DepthImage collected from the frames. """ depths = self._read_depth_images(num_img) return Image.min_images(depths)
[ "def", "min_depth_img", "(", "self", ",", "num_img", "=", "1", ")", ":", "depths", "=", "self", ".", "_read_depth_images", "(", "num_img", ")", "return", "Image", ".", "min_images", "(", "depths", ")" ]
Collect a series of depth images and return the min of the set. Parameters ---------- num_img : int The number of consecutive frames to process. Returns ------- :obj:`DepthImage` The min DepthImage collected from the frames.
[ "Collect", "a", "series", "of", "depth", "images", "and", "return", "the", "min", "of", "the", "set", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/primesense_sensor.py#L406-L421
train
Collect a series of depth images and return the min of the set.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtq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Ot5_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('\060' + '\157' + chr(301 - 250) + chr(0b10110 + 0o35) + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x37' + chr(2894 - 2840), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(5926 - 5815) + '\062' + chr(521 - 466) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(207 - 96) + chr(0b110010) + chr(0b110000) + chr(1733 - 1683), 0b1000), nzTpIcepk0o8(chr(939 - 891) + '\x6f' + '\x32' + '\064' + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(55) + chr(0b110010), 44891 - 44883), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(53) + chr(0b101101 + 0o10), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + '\064' + chr(0b110111), 14793 - 14785), nzTpIcepk0o8(chr(48) + '\x6f' + '\063' + '\x31' + '\061', 2333 - 2325), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + '\x33' + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1011 + 0o46) + '\x33' + chr(0b110100), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(0b100110 + 0o15), 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + chr(2315 - 2204) + chr(0b110001) + chr(733 - 681) + '\061', 0o10), nzTpIcepk0o8('\x30' + '\157' + chr(242 - 191) + chr(0b110100) + '\064', 0o10), nzTpIcepk0o8(chr(388 - 340) + chr(0b1011010 + 0o25) + chr(0b110001) + chr(54) + chr(48), 52862 - 52854), nzTpIcepk0o8(chr(944 - 896) + chr(0b1101111) + chr(0b110001) + chr(0b10000 + 0o43) + chr(54), 0o10), nzTpIcepk0o8(chr(853 - 805) + chr(0b1101111) + '\x31', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(448 - 398) + chr(55) + '\062', 0o10), nzTpIcepk0o8(chr(0b1101 + 0o43) + '\x6f' + chr(0b110001) + '\060' + chr(1391 - 1338), 3901 - 3893), nzTpIcepk0o8(chr(0b11000 + 0o30) + '\157' + chr(948 - 898) + chr(0b110100) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110011) + chr(0b110100) + chr(0b110111), 8), nzTpIcepk0o8(chr(48) + chr(0b1001100 + 0o43) + chr(1135 - 1084) + '\066' + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b10000 + 0o137) + '\064' + '\060', 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b110011) + '\x33' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(1290 - 1242) + chr(111) + chr(49) + chr(50) + chr(355 - 302), ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(0b1101111) + chr(0b110110) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b110000 + 0o77) + '\062' + chr(48) + chr(0b101000 + 0o16), ord("\x08")), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(0b101001 + 0o106) + chr(638 - 589) + '\061' + '\061', 0o10), nzTpIcepk0o8(chr(567 - 519) + chr(0b1101111) + '\x32' + chr(2023 - 1971) + '\062', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + chr(49), 31044 - 31036), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + '\x34' + chr(0b110101), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001) + chr(395 - 342) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(947 - 897) + chr(0b11101 + 0o30) + chr(0b110000), 30138 - 30130), nzTpIcepk0o8(chr(0b110000) + chr(0b1101010 + 0o5) + chr(0b10100 + 0o37) + chr(0b110101) + '\061', 0b1000), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(424 - 313) + chr(0b110011) + '\x36', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b100 + 0o153) + '\064' + chr(0b10100 + 0o37), 0b1000), nzTpIcepk0o8(chr(1879 - 1831) + chr(0b100010 + 0o115) + '\064', ord("\x08")), nzTpIcepk0o8(chr(0b1001 + 0o47) + '\x6f' + chr(0b10101 + 0o36) + '\x33' + chr(893 - 845), 8), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b101100 + 0o103) + chr(0b110010) + '\060' + '\062', 8), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(0b110011) + '\x31', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\065' + chr(0b10000 + 0o40), 61607 - 61599)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xf2'), chr(0b100011 + 0o101) + chr(0b1100101) + '\x63' + chr(4252 - 4141) + '\144' + chr(101))('\x75' + '\164' + chr(102) + chr(0b101101) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def RSb5oy2ZpBx0(hXMPsSrOQzbh, eVRCGQa70gNM=nzTpIcepk0o8(chr(0b110000) + chr(5107 - 4996) + chr(642 - 593), 8)): UjxwtHwihe1B = hXMPsSrOQzbh._read_depth_images(eVRCGQa70gNM) return roI3spqORKae(RvV7ueTH51Uy, roI3spqORKae(ES5oEprVxulp(b'\xb1W\xd1\xdd\xceW\x8c\x80\xach'), chr(9559 - 9459) + '\x65' + chr(8585 - 8486) + '\x6f' + '\x64' + chr(0b1100101))(chr(3818 - 3701) + chr(0b1110100) + chr(0b111011 + 0o53) + '\x2d' + chr(56)))(UjxwtHwihe1B)
BerkeleyAutomation/perception
perception/object_render.py
ObjectRender.T_obj_camera
def T_obj_camera(self): """Returns the transformation from camera to object when the object is in the given stable pose. Returns ------- :obj:`autolab_core.RigidTransform` The desired transform. """ if self.stable_pose is None: T_obj_world = RigidTransform(from_frame='obj', to_frame='world') else: T_obj_world = self.stable_pose.T_obj_table.as_frames('obj', 'world') T_camera_obj = T_obj_world.inverse() * self.T_camera_world return T_camera_obj
python
def T_obj_camera(self): """Returns the transformation from camera to object when the object is in the given stable pose. Returns ------- :obj:`autolab_core.RigidTransform` The desired transform. """ if self.stable_pose is None: T_obj_world = RigidTransform(from_frame='obj', to_frame='world') else: T_obj_world = self.stable_pose.T_obj_table.as_frames('obj', 'world') T_camera_obj = T_obj_world.inverse() * self.T_camera_world return T_camera_obj
[ "def", "T_obj_camera", "(", "self", ")", ":", "if", "self", ".", "stable_pose", "is", "None", ":", "T_obj_world", "=", "RigidTransform", "(", "from_frame", "=", "'obj'", ",", "to_frame", "=", "'world'", ")", "else", ":", "T_obj_world", "=", "self", ".", "stable_pose", ".", "T_obj_table", ".", "as_frames", "(", "'obj'", ",", "'world'", ")", "T_camera_obj", "=", "T_obj_world", ".", "inverse", "(", ")", "*", "self", ".", "T_camera_world", "return", "T_camera_obj" ]
Returns the transformation from camera to object when the object is in the given stable pose. Returns ------- :obj:`autolab_core.RigidTransform` The desired transform.
[ "Returns", "the", "transformation", "from", "camera", "to", "object", "when", "the", "object", "is", "in", "the", "given", "stable", "pose", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/object_render.py#L56-L69
train
Returns the transformation from camera to object when the object is in the given stable pose.
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,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2mncQ,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(0b1101111) + chr(0b110001) + chr(0b1000 + 0o56) + chr(0b11100 + 0o33), ord("\x08")), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(10083 - 9972) + chr(0b11011 + 0o30) + '\x37' + chr(0b111 + 0o53), 0b1000), nzTpIcepk0o8('\060' + chr(0b11110 + 0o121) + chr(0b110011) + chr(55), 19578 - 19570), nzTpIcepk0o8('\060' + chr(111) + chr(212 - 163) + '\064' + chr(51), 1061 - 1053), nzTpIcepk0o8('\060' + chr(9906 - 9795) + chr(51) + '\064' + chr(1793 - 1744), 0b1000), nzTpIcepk0o8(chr(0b100010 + 0o16) + '\x6f' + chr(0b110101) + chr(0b110110), 9200 - 9192), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + chr(52) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + '\x35' + '\067', 54417 - 54409), nzTpIcepk0o8(chr(1044 - 996) + chr(0b1101111) + chr(0b110101) + chr(0b100101 + 0o20), 0o10), nzTpIcepk0o8('\x30' + chr(111) + '\065' + '\x33', 0o10), nzTpIcepk0o8(chr(573 - 525) + '\x6f' + chr(0b110010) + chr(0b110100) + chr(49), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b1000 + 0o52) + chr(51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b110110 + 0o71) + chr(55) + '\065', 0o10), nzTpIcepk0o8(chr(915 - 867) + '\157' + chr(51) + chr(0b110101) + chr(48), 47851 - 47843), nzTpIcepk0o8(chr(48) + '\157' + chr(49) + '\066' + chr(51), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\063' + chr(2580 - 2528) + chr(0b110010), 0o10), nzTpIcepk0o8('\x30' + chr(0b110110 + 0o71) + chr(0b110001 + 0o1) + '\x35' + chr(0b110001), 1862 - 1854), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110011) + chr(0b110010) + chr(0b1101 + 0o43), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b110001) + chr(48) + chr(0b100 + 0o62), ord("\x08")), nzTpIcepk0o8(chr(0b110 + 0o52) + '\x6f' + chr(2154 - 2103) + chr(0b101101 + 0o6) + chr(52), 38151 - 38143), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(2121 - 2068) + '\064', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\x33' + chr(2499 - 2444), 8), nzTpIcepk0o8(chr(1444 - 1396) + chr(0b1101001 + 0o6) + chr(51) + chr(0b110001) + '\x31', 0o10), nzTpIcepk0o8(chr(1029 - 981) + '\157' + chr(0b100001 + 0o22) + chr(0b10000 + 0o44) + '\x37', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110101) + chr(0b110110), 8), nzTpIcepk0o8(chr(651 - 603) + chr(111) + chr(0b101010 + 0o7) + '\x34' + chr(330 - 278), 0o10), nzTpIcepk0o8('\060' + chr(2815 - 2704) + chr(807 - 757) + '\x35' + '\x35', 31035 - 31027), nzTpIcepk0o8('\x30' + chr(0b11 + 0o154) + chr(0b110001) + chr(1383 - 1332) + '\065', 54685 - 54677), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(3554 - 3443) + '\062' + '\x35', 35431 - 35423), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110111) + '\x35', 8), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110001) + chr(54) + chr(0b110010), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b101 + 0o152) + chr(0b10001 + 0o41) + chr(1569 - 1519) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110001) + '\063' + chr(0b110011), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(2193 - 2140) + '\067', 8), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b11110 + 0o24) + '\066' + '\061', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + '\x33' + chr(1204 - 1151) + '\062', 0o10), nzTpIcepk0o8(chr(0b101110 + 0o2) + chr(111) + '\x31' + chr(283 - 234) + '\x33', 0b1000), nzTpIcepk0o8('\060' + chr(0b10000 + 0o137) + '\x31' + chr(0b110100) + chr(0b1001 + 0o55), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(617 - 569) + chr(50), ord("\x08")), nzTpIcepk0o8(chr(1448 - 1400) + chr(0b1101111) + '\x36' + chr(0b101100 + 0o13), 8160 - 8152)][ZlbFMSG8gCoF % nzTpIcepk0o8('\060' + chr(4236 - 4125) + '\x35' + chr(0b110000), 2713 - 2705)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'Y'), chr(0b100001 + 0o103) + chr(0b111110 + 0o47) + '\143' + chr(0b1101111) + chr(6193 - 6093) + chr(0b1100101))(chr(0b1110101) + '\164' + chr(0b1100 + 0o132) + chr(0b100110 + 0o7) + chr(0b10011 + 0o45)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def HpRUHk0TlHyl(hXMPsSrOQzbh): if roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x04\x8e~\x01\x8dK\xbf\x1fBX\xc4'), '\x64' + chr(0b1011011 + 0o12) + '\x63' + chr(111) + '\144' + chr(9917 - 9816))(chr(0b1110101) + chr(3648 - 3532) + chr(102) + '\055' + '\070')) is None: Tq1Z_0vk8Ler = xrsN7tOaUcVT(from_frame=roI3spqORKae(ES5oEprVxulp(b'\x18\x98u'), chr(0b1011101 + 0o7) + chr(0b1100101) + chr(7670 - 7571) + chr(111) + '\144' + '\x65')('\x75' + '\x74' + '\x66' + chr(1924 - 1879) + chr(0b111000)), to_frame=roI3spqORKae(ES5oEprVxulp(b'\x00\x95m\x0f\x85'), chr(3026 - 2926) + chr(101) + chr(1655 - 1556) + chr(111) + chr(5908 - 5808) + chr(101))(chr(0b1110101) + chr(116) + '\x66' + '\x2d' + chr(0b111000))) else: Tq1Z_0vk8Ler = hXMPsSrOQzbh.stable_pose.T_obj_table.as_frames(roI3spqORKae(ES5oEprVxulp(b'\x18\x98u'), chr(100) + chr(0b110111 + 0o56) + chr(0b1100011) + chr(111) + chr(735 - 635) + '\x65')('\x75' + '\164' + chr(798 - 696) + '\055' + chr(0b111000)), roI3spqORKae(ES5oEprVxulp(b'\x00\x95m\x0f\x85'), chr(0b1010000 + 0o24) + '\145' + chr(99) + chr(0b1001011 + 0o44) + '\144' + '\145')('\x75' + '\164' + chr(102) + chr(222 - 177) + chr(0b111000))) ATIkprSCUu1W = Tq1Z_0vk8Ler.inverse() * hXMPsSrOQzbh.T_camera_world return ATIkprSCUu1W
BerkeleyAutomation/perception
perception/object_render.py
QueryImageBundle.image
def image(self, render_mode): """Return an image generated with a particular render mode. Parameters ---------- render_mode : :obj:`RenderMode` The type of image we want. Returns ------- :obj:`Image` The color, depth, or binary image if render_mode is COLOR, DEPTH, or SEGMASK respectively. """ if render_mode == RenderMode.COLOR: return self.color_im elif render_mode == RenderMode.DEPTH: return self.depth_im elif render_mode == RenderMode.SEGMASK: return self.binary_im else: return None
python
def image(self, render_mode): """Return an image generated with a particular render mode. Parameters ---------- render_mode : :obj:`RenderMode` The type of image we want. Returns ------- :obj:`Image` The color, depth, or binary image if render_mode is COLOR, DEPTH, or SEGMASK respectively. """ if render_mode == RenderMode.COLOR: return self.color_im elif render_mode == RenderMode.DEPTH: return self.depth_im elif render_mode == RenderMode.SEGMASK: return self.binary_im else: return None
[ "def", "image", "(", "self", ",", "render_mode", ")", ":", "if", "render_mode", "==", "RenderMode", ".", "COLOR", ":", "return", "self", ".", "color_im", "elif", "render_mode", "==", "RenderMode", ".", "DEPTH", ":", "return", "self", ".", "depth_im", "elif", "render_mode", "==", "RenderMode", ".", "SEGMASK", ":", "return", "self", ".", "binary_im", "else", ":", "return", "None" ]
Return an image generated with a particular render mode. Parameters ---------- render_mode : :obj:`RenderMode` The type of image we want. Returns ------- :obj:`Image` The color, depth, or binary image if render_mode is COLOR, DEPTH, or SEGMASK respectively.
[ "Return", "an", "image", "generated", "with", "a", "particular", "render", "mode", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/object_render.py#L110-L131
train
Returns an image generated with a particular render mode.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5u3i1rn23,m64e4RQAlmFd,zfo2S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,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) + '\157' + chr(49) + chr(50) + chr(0b101 + 0o61), 0b1000), nzTpIcepk0o8('\060' + chr(3201 - 3090) + chr(0b110010) + chr(0b1111 + 0o50), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b101010 + 0o7) + chr(1789 - 1739) + '\066', 8), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(0b1000111 + 0o50) + chr(0b11101 + 0o24) + chr(0b101010 + 0o15) + chr(0b110111), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\x31' + chr(49) + '\064', 0b1000), nzTpIcepk0o8('\x30' + chr(0b110111 + 0o70) + '\x32' + chr(2260 - 2205), 8), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\157' + chr(0b0 + 0o62) + chr(0b101011 + 0o6) + '\061', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + chr(0b101011 + 0o6) + '\x31', ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(908 - 854) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(640 - 592) + chr(0b1101111) + '\x31' + '\061', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + '\x32' + chr(0b110001), 44700 - 44692), nzTpIcepk0o8('\x30' + '\157' + chr(1858 - 1809) + chr(0b11101 + 0o25) + chr(0b110000), 0b1000), nzTpIcepk0o8(chr(369 - 321) + '\x6f' + '\067' + '\x32', 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + '\067' + chr(48), 0b1000), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(2003 - 1892) + chr(0b110001) + chr(55) + '\x30', 0b1000), nzTpIcepk0o8('\060' + chr(0b100000 + 0o117) + '\x35' + chr(49), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b101110 + 0o4) + chr(2467 - 2415) + chr(0b110100), 61511 - 61503), nzTpIcepk0o8('\060' + chr(1176 - 1065) + chr(0b1000 + 0o52) + '\063' + chr(824 - 770), 27765 - 27757), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + chr(52) + chr(55), 35145 - 35137), nzTpIcepk0o8('\060' + chr(111) + chr(55) + '\065', 22123 - 22115), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(111) + '\x33' + '\x30' + chr(0b101010 + 0o15), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b101111 + 0o3) + chr(0b101110 + 0o5) + '\x33', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\062' + '\x36' + chr(49), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(49) + chr(0b110101) + chr(1884 - 1829), 11529 - 11521), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b11101 + 0o25) + chr(54) + chr(1194 - 1142), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\064', 26780 - 26772), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + '\065' + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + chr(0b110011) + chr(54) + chr(0b110010), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + '\x31' + chr(0b1010 + 0o55) + chr(0b110000), 8), nzTpIcepk0o8(chr(0b1111 + 0o41) + '\157' + chr(49) + '\066', 0b1000), nzTpIcepk0o8(chr(1333 - 1285) + chr(1182 - 1071) + '\x31' + chr(0b10000 + 0o46) + chr(0b110110), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1000011 + 0o54) + chr(0b110011) + '\x37' + chr(0b10110 + 0o34), 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b11000 + 0o33) + chr(0b110110) + chr(0b10111 + 0o33), 8), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\x6f' + chr(49) + chr(0b100011 + 0o16) + chr(0b11001 + 0o31), 26636 - 26628), nzTpIcepk0o8(chr(393 - 345) + chr(10223 - 10112) + chr(49) + '\061' + '\x30', 54185 - 54177), nzTpIcepk0o8(chr(48) + '\x6f' + '\061' + chr(0b110001 + 0o4), 0b1000), nzTpIcepk0o8(chr(0b101101 + 0o3) + '\157' + chr(0b1000 + 0o52) + chr(54 - 3) + chr(106 - 53), 14148 - 14140), nzTpIcepk0o8(chr(0b10000 + 0o40) + '\157' + chr(0b11101 + 0o30), 0b1000), nzTpIcepk0o8(chr(0b110 + 0o52) + chr(0b1101111) + chr(2381 - 2331) + chr(0b10101 + 0o35) + '\x37', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\062' + chr(0b110101) + chr(0b10010 + 0o45), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b10 + 0o56) + '\157' + chr(1637 - 1584) + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'x'), chr(3147 - 3047) + chr(1571 - 1470) + '\143' + '\x6f' + chr(0b100001 + 0o103) + '\x65')(chr(0b1110101) + chr(0b1110100) + '\x66' + chr(45) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def qqETtneJqWI2(hXMPsSrOQzbh, IF6XPl_JIrPU): if IF6XPl_JIrPU == roI3spqORKae(qcvjnKeI4Yc1, roI3spqORKae(ES5oEprVxulp(b'\x15X\x1a0\x1e'), chr(7785 - 7685) + chr(101) + '\143' + chr(0b1010111 + 0o30) + chr(5422 - 5322) + chr(101))(chr(0b1110101) + '\164' + chr(102) + '\055' + chr(56))): return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'5x:\x10>H\xe0\xa4'), chr(8704 - 8604) + chr(1710 - 1609) + '\x63' + chr(0b1101110 + 0o1) + chr(2649 - 2549) + '\x65')(chr(0b1011101 + 0o30) + '\x74' + '\146' + chr(263 - 218) + '\070')) elif IF6XPl_JIrPU == roI3spqORKae(qcvjnKeI4Yc1, roI3spqORKae(ES5oEprVxulp(b'\x12R\x06+\x04'), chr(0b111001 + 0o53) + chr(101) + chr(99) + chr(111) + chr(0b1100100) + '\x65')('\165' + '\x74' + chr(2729 - 2627) + '\055' + '\070')): return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'2r&\x0b$H\xe0\xa4'), chr(6723 - 6623) + '\145' + chr(6612 - 6513) + chr(111) + '\x64' + '\145')(chr(0b101000 + 0o115) + chr(7688 - 7572) + chr(0b1000010 + 0o44) + chr(0b100000 + 0o15) + chr(0b100010 + 0o26))) elif IF6XPl_JIrPU == roI3spqORKae(qcvjnKeI4Yc1, roI3spqORKae(ES5oEprVxulp(b'\x05R\x112\rD\xc2'), chr(0b110101 + 0o57) + '\145' + chr(7505 - 7406) + '\157' + chr(0b1110 + 0o126) + chr(0b1100101))('\x75' + chr(116) + chr(6341 - 6239) + '\x2d' + chr(1080 - 1024))): return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'4~8\x1e>n\xd6\xa0Z'), '\x64' + '\x65' + chr(0b0 + 0o143) + '\157' + '\x64' + '\x65')('\165' + chr(0b11001 + 0o133) + chr(102) + chr(0b100111 + 0o6) + chr(56))) else: return None
BerkeleyAutomation/perception
perception/chessboard_registration.py
CameraChessboardRegistration.register
def register(sensor, config): """ Registers a camera to a chessboard. Parameters ---------- sensor : :obj:`perception.RgbdSensor` the sensor to register config : :obj:`autolab_core.YamlConfig` or :obj:`dict` configuration file for registration Returns ------- :obj:`ChessboardRegistrationResult` the result of registration Notes ----- The config must have the parameters specified in the Other Parameters section. Other Parameters ---------------- num_transform_avg : int the number of independent registrations to average together num_images : int the number of images to read for each independent registration corners_x : int the number of chessboard corners in the x-direction corners_y : int the number of chessboard corners in the y-direction color_image_rescale_factor : float amount to rescale the color image for detection (numbers around 4-8 are useful) vis : bool whether or not to visualize the registration """ # read config num_transform_avg = config['num_transform_avg'] num_images = config['num_images'] sx = config['corners_x'] sy = config['corners_y'] point_order = config['point_order'] color_image_rescale_factor = config['color_image_rescale_factor'] flip_normal = config['flip_normal'] y_points_left = False if 'y_points_left' in config.keys() and sx == sy: y_points_left = config['y_points_left'] num_images = 1 vis = config['vis'] # read params from sensor logging.info('Registering camera %s' %(sensor.frame)) ir_intrinsics = sensor.ir_intrinsics # repeat registration multiple times and average results R = np.zeros([3,3]) t = np.zeros([3,1]) points_3d_plane = PointCloud(np.zeros([3, sx*sy]), frame=sensor.ir_frame) k = 0 while k < num_transform_avg: # average a bunch of depth images together depth_ims = None for i in range(num_images): start = time.time() small_color_im, new_depth_im, _ = sensor.frames() end = time.time() logging.info('Frames Runtime: %.3f' %(end-start)) if depth_ims is None: depth_ims = np.zeros([new_depth_im.height, new_depth_im.width, num_images]) depth_ims[:,:,i] = new_depth_im.data med_depth_im = np.median(depth_ims, axis=2) depth_im = DepthImage(med_depth_im, sensor.ir_frame) # find the corner pixels in an upsampled version of the color image big_color_im = small_color_im.resize(color_image_rescale_factor) corner_px = big_color_im.find_chessboard(sx=sx, sy=sy) if vis: plt.figure() plt.imshow(big_color_im.data) for i in range(sx): plt.scatter(corner_px[i,0], corner_px[i,1], s=25, c='b') plt.show() if corner_px is None: logging.error('No chessboard detected! Check camera exposure settings') continue # convert back to original image small_corner_px = corner_px / color_image_rescale_factor if vis: plt.figure() plt.imshow(small_color_im.data) for i in range(sx): plt.scatter(small_corner_px[i,0], small_corner_px[i,1], s=25, c='b') plt.axis('off') plt.show() # project points into 3D camera_intr = sensor.ir_intrinsics points_3d = camera_intr.deproject(depth_im) # get round chessboard ind corner_px_round = np.round(small_corner_px).astype(np.uint16) corner_ind = depth_im.ij_to_linear(corner_px_round[:,0], corner_px_round[:,1]) if corner_ind.shape[0] != sx*sy: logging.warning('Did not find all corners. Discarding...') continue # average 3d points points_3d_plane = (k * points_3d_plane + points_3d[corner_ind]) / (k + 1) logging.info('Registration iteration %d of %d' %(k+1, config['num_transform_avg'])) k += 1 # fit a plane to the chessboard corners X = np.c_[points_3d_plane.x_coords, points_3d_plane.y_coords, np.ones(points_3d_plane.num_points)] y = points_3d_plane.z_coords A = X.T.dot(X) b = X.T.dot(y) w = np.linalg.inv(A).dot(b) n = np.array([w[0], w[1], -1]) n = n / np.linalg.norm(n) if flip_normal: n = -n mean_point_plane = points_3d_plane.mean() # find x-axis of the chessboard coordinates on the fitted plane T_camera_table = RigidTransform(translation = -points_3d_plane.mean().data, from_frame=points_3d_plane.frame, to_frame='table') points_3d_centered = T_camera_table * points_3d_plane # get points along y if point_order == 'row_major': coord_pos_x = int(math.floor(sx*sy/2.0)) coord_neg_x = int(math.ceil(sx*sy/2.0)) points_pos_x = points_3d_centered[coord_pos_x:] points_neg_x = points_3d_centered[:coord_neg_x] x_axis = np.mean(points_pos_x.data, axis=1) - np.mean(points_neg_x.data, axis=1) x_axis = x_axis - np.vdot(x_axis, n)*n x_axis = x_axis / np.linalg.norm(x_axis) y_axis = np.cross(n, x_axis) else: coord_pos_y = int(math.floor(sx*(sy-1)/2.0)) coord_neg_y = int(math.ceil(sx*(sy+1)/2.0)) points_pos_y = points_3d_centered[:coord_pos_y] points_neg_y = points_3d_centered[coord_neg_y:] y_axis = np.mean(points_pos_y.data, axis=1) - np.mean(points_neg_y.data, axis=1) y_axis = y_axis - np.vdot(y_axis, n)*n y_axis = y_axis / np.linalg.norm(y_axis) x_axis = np.cross(-n, y_axis) # produce translation and rotation from plane center and chessboard basis rotation_cb_camera = RigidTransform.rotation_from_axes(x_axis, y_axis, n) translation_cb_camera = mean_point_plane.data T_cb_camera = RigidTransform(rotation=rotation_cb_camera, translation=translation_cb_camera, from_frame='cb', to_frame=sensor.frame) if y_points_left and np.abs(T_cb_camera.y_axis[1]) > 0.1: if T_cb_camera.x_axis[0] > 0: T_cb_camera.rotation = T_cb_camera.rotation.dot(RigidTransform.z_axis_rotation(-np.pi/2).T) else: T_cb_camera.rotation = T_cb_camera.rotation.dot(RigidTransform.z_axis_rotation(np.pi/2).T) T_camera_cb = T_cb_camera.inverse() # optionally display cb corners with detected pose in 3d space if config['debug']: # display image with axes overlayed cb_center_im = camera_intr.project(Point(T_cb_camera.translation, frame=sensor.ir_frame)) cb_x_im = camera_intr.project(Point(T_cb_camera.translation + T_cb_camera.x_axis * config['scale_amt'], frame=sensor.ir_frame)) cb_y_im = camera_intr.project(Point(T_cb_camera.translation + T_cb_camera.y_axis * config['scale_amt'], frame=sensor.ir_frame)) cb_z_im = camera_intr.project(Point(T_cb_camera.translation + T_cb_camera.z_axis * config['scale_amt'], frame=sensor.ir_frame)) x_line = np.array([cb_center_im.data, cb_x_im.data]) y_line = np.array([cb_center_im.data, cb_y_im.data]) z_line = np.array([cb_center_im.data, cb_z_im.data]) plt.figure() plt.imshow(small_color_im.data) plt.scatter(cb_center_im.data[0], cb_center_im.data[1]) plt.plot(x_line[:,0], x_line[:,1], c='r', linewidth=3) plt.plot(y_line[:,0], y_line[:,1], c='g', linewidth=3) plt.plot(z_line[:,0], z_line[:,1], c='b', linewidth=3) plt.axis('off') plt.title('Chessboard frame in camera %s' %(sensor.frame)) plt.show() return ChessboardRegistrationResult(T_camera_cb, points_3d_plane)
python
def register(sensor, config): """ Registers a camera to a chessboard. Parameters ---------- sensor : :obj:`perception.RgbdSensor` the sensor to register config : :obj:`autolab_core.YamlConfig` or :obj:`dict` configuration file for registration Returns ------- :obj:`ChessboardRegistrationResult` the result of registration Notes ----- The config must have the parameters specified in the Other Parameters section. Other Parameters ---------------- num_transform_avg : int the number of independent registrations to average together num_images : int the number of images to read for each independent registration corners_x : int the number of chessboard corners in the x-direction corners_y : int the number of chessboard corners in the y-direction color_image_rescale_factor : float amount to rescale the color image for detection (numbers around 4-8 are useful) vis : bool whether or not to visualize the registration """ # read config num_transform_avg = config['num_transform_avg'] num_images = config['num_images'] sx = config['corners_x'] sy = config['corners_y'] point_order = config['point_order'] color_image_rescale_factor = config['color_image_rescale_factor'] flip_normal = config['flip_normal'] y_points_left = False if 'y_points_left' in config.keys() and sx == sy: y_points_left = config['y_points_left'] num_images = 1 vis = config['vis'] # read params from sensor logging.info('Registering camera %s' %(sensor.frame)) ir_intrinsics = sensor.ir_intrinsics # repeat registration multiple times and average results R = np.zeros([3,3]) t = np.zeros([3,1]) points_3d_plane = PointCloud(np.zeros([3, sx*sy]), frame=sensor.ir_frame) k = 0 while k < num_transform_avg: # average a bunch of depth images together depth_ims = None for i in range(num_images): start = time.time() small_color_im, new_depth_im, _ = sensor.frames() end = time.time() logging.info('Frames Runtime: %.3f' %(end-start)) if depth_ims is None: depth_ims = np.zeros([new_depth_im.height, new_depth_im.width, num_images]) depth_ims[:,:,i] = new_depth_im.data med_depth_im = np.median(depth_ims, axis=2) depth_im = DepthImage(med_depth_im, sensor.ir_frame) # find the corner pixels in an upsampled version of the color image big_color_im = small_color_im.resize(color_image_rescale_factor) corner_px = big_color_im.find_chessboard(sx=sx, sy=sy) if vis: plt.figure() plt.imshow(big_color_im.data) for i in range(sx): plt.scatter(corner_px[i,0], corner_px[i,1], s=25, c='b') plt.show() if corner_px is None: logging.error('No chessboard detected! Check camera exposure settings') continue # convert back to original image small_corner_px = corner_px / color_image_rescale_factor if vis: plt.figure() plt.imshow(small_color_im.data) for i in range(sx): plt.scatter(small_corner_px[i,0], small_corner_px[i,1], s=25, c='b') plt.axis('off') plt.show() # project points into 3D camera_intr = sensor.ir_intrinsics points_3d = camera_intr.deproject(depth_im) # get round chessboard ind corner_px_round = np.round(small_corner_px).astype(np.uint16) corner_ind = depth_im.ij_to_linear(corner_px_round[:,0], corner_px_round[:,1]) if corner_ind.shape[0] != sx*sy: logging.warning('Did not find all corners. Discarding...') continue # average 3d points points_3d_plane = (k * points_3d_plane + points_3d[corner_ind]) / (k + 1) logging.info('Registration iteration %d of %d' %(k+1, config['num_transform_avg'])) k += 1 # fit a plane to the chessboard corners X = np.c_[points_3d_plane.x_coords, points_3d_plane.y_coords, np.ones(points_3d_plane.num_points)] y = points_3d_plane.z_coords A = X.T.dot(X) b = X.T.dot(y) w = np.linalg.inv(A).dot(b) n = np.array([w[0], w[1], -1]) n = n / np.linalg.norm(n) if flip_normal: n = -n mean_point_plane = points_3d_plane.mean() # find x-axis of the chessboard coordinates on the fitted plane T_camera_table = RigidTransform(translation = -points_3d_plane.mean().data, from_frame=points_3d_plane.frame, to_frame='table') points_3d_centered = T_camera_table * points_3d_plane # get points along y if point_order == 'row_major': coord_pos_x = int(math.floor(sx*sy/2.0)) coord_neg_x = int(math.ceil(sx*sy/2.0)) points_pos_x = points_3d_centered[coord_pos_x:] points_neg_x = points_3d_centered[:coord_neg_x] x_axis = np.mean(points_pos_x.data, axis=1) - np.mean(points_neg_x.data, axis=1) x_axis = x_axis - np.vdot(x_axis, n)*n x_axis = x_axis / np.linalg.norm(x_axis) y_axis = np.cross(n, x_axis) else: coord_pos_y = int(math.floor(sx*(sy-1)/2.0)) coord_neg_y = int(math.ceil(sx*(sy+1)/2.0)) points_pos_y = points_3d_centered[:coord_pos_y] points_neg_y = points_3d_centered[coord_neg_y:] y_axis = np.mean(points_pos_y.data, axis=1) - np.mean(points_neg_y.data, axis=1) y_axis = y_axis - np.vdot(y_axis, n)*n y_axis = y_axis / np.linalg.norm(y_axis) x_axis = np.cross(-n, y_axis) # produce translation and rotation from plane center and chessboard basis rotation_cb_camera = RigidTransform.rotation_from_axes(x_axis, y_axis, n) translation_cb_camera = mean_point_plane.data T_cb_camera = RigidTransform(rotation=rotation_cb_camera, translation=translation_cb_camera, from_frame='cb', to_frame=sensor.frame) if y_points_left and np.abs(T_cb_camera.y_axis[1]) > 0.1: if T_cb_camera.x_axis[0] > 0: T_cb_camera.rotation = T_cb_camera.rotation.dot(RigidTransform.z_axis_rotation(-np.pi/2).T) else: T_cb_camera.rotation = T_cb_camera.rotation.dot(RigidTransform.z_axis_rotation(np.pi/2).T) T_camera_cb = T_cb_camera.inverse() # optionally display cb corners with detected pose in 3d space if config['debug']: # display image with axes overlayed cb_center_im = camera_intr.project(Point(T_cb_camera.translation, frame=sensor.ir_frame)) cb_x_im = camera_intr.project(Point(T_cb_camera.translation + T_cb_camera.x_axis * config['scale_amt'], frame=sensor.ir_frame)) cb_y_im = camera_intr.project(Point(T_cb_camera.translation + T_cb_camera.y_axis * config['scale_amt'], frame=sensor.ir_frame)) cb_z_im = camera_intr.project(Point(T_cb_camera.translation + T_cb_camera.z_axis * config['scale_amt'], frame=sensor.ir_frame)) x_line = np.array([cb_center_im.data, cb_x_im.data]) y_line = np.array([cb_center_im.data, cb_y_im.data]) z_line = np.array([cb_center_im.data, cb_z_im.data]) plt.figure() plt.imshow(small_color_im.data) plt.scatter(cb_center_im.data[0], cb_center_im.data[1]) plt.plot(x_line[:,0], x_line[:,1], c='r', linewidth=3) plt.plot(y_line[:,0], y_line[:,1], c='g', linewidth=3) plt.plot(z_line[:,0], z_line[:,1], c='b', linewidth=3) plt.axis('off') plt.title('Chessboard frame in camera %s' %(sensor.frame)) plt.show() return ChessboardRegistrationResult(T_camera_cb, points_3d_plane)
[ "def", "register", "(", "sensor", ",", "config", ")", ":", "# read config", "num_transform_avg", "=", "config", "[", "'num_transform_avg'", "]", "num_images", "=", "config", "[", "'num_images'", "]", "sx", "=", "config", "[", "'corners_x'", "]", "sy", "=", "config", "[", "'corners_y'", "]", "point_order", "=", "config", "[", "'point_order'", "]", "color_image_rescale_factor", "=", "config", "[", "'color_image_rescale_factor'", "]", "flip_normal", "=", "config", "[", "'flip_normal'", "]", "y_points_left", "=", "False", "if", "'y_points_left'", "in", "config", ".", "keys", "(", ")", "and", "sx", "==", "sy", ":", "y_points_left", "=", "config", "[", "'y_points_left'", "]", "num_images", "=", "1", "vis", "=", "config", "[", "'vis'", "]", "# read params from sensor", "logging", ".", "info", "(", "'Registering camera %s'", "%", "(", "sensor", ".", "frame", ")", ")", "ir_intrinsics", "=", "sensor", ".", "ir_intrinsics", "# repeat registration multiple times and average results", "R", "=", "np", ".", "zeros", "(", "[", "3", ",", "3", "]", ")", "t", "=", "np", ".", "zeros", "(", "[", "3", ",", "1", "]", ")", "points_3d_plane", "=", "PointCloud", "(", "np", ".", "zeros", "(", "[", "3", ",", "sx", "*", "sy", "]", ")", ",", "frame", "=", "sensor", ".", "ir_frame", ")", "k", "=", "0", "while", "k", "<", "num_transform_avg", ":", "# average a bunch of depth images together", "depth_ims", "=", "None", "for", "i", "in", "range", "(", "num_images", ")", ":", "start", "=", "time", ".", "time", "(", ")", "small_color_im", ",", "new_depth_im", ",", "_", "=", "sensor", ".", "frames", "(", ")", "end", "=", "time", ".", "time", "(", ")", "logging", ".", "info", "(", "'Frames Runtime: %.3f'", "%", "(", "end", "-", "start", ")", ")", "if", "depth_ims", "is", "None", ":", "depth_ims", "=", "np", ".", "zeros", "(", "[", "new_depth_im", ".", "height", ",", "new_depth_im", ".", "width", ",", "num_images", "]", ")", "depth_ims", "[", ":", ",", ":", ",", "i", "]", "=", "new_depth_im", ".", "data", "med_depth_im", "=", "np", ".", "median", "(", "depth_ims", ",", "axis", "=", "2", ")", "depth_im", "=", "DepthImage", "(", "med_depth_im", ",", "sensor", ".", "ir_frame", ")", "# find the corner pixels in an upsampled version of the color image", "big_color_im", "=", "small_color_im", ".", "resize", "(", "color_image_rescale_factor", ")", "corner_px", "=", "big_color_im", ".", "find_chessboard", "(", "sx", "=", "sx", ",", "sy", "=", "sy", ")", "if", "vis", ":", "plt", ".", "figure", "(", ")", "plt", ".", "imshow", "(", "big_color_im", ".", "data", ")", "for", "i", "in", "range", "(", "sx", ")", ":", "plt", ".", "scatter", "(", "corner_px", "[", "i", ",", "0", "]", ",", "corner_px", "[", "i", ",", "1", "]", ",", "s", "=", "25", ",", "c", "=", "'b'", ")", "plt", ".", "show", "(", ")", "if", "corner_px", "is", "None", ":", "logging", ".", "error", "(", "'No chessboard detected! Check camera exposure settings'", ")", "continue", "# convert back to original image", "small_corner_px", "=", "corner_px", "/", "color_image_rescale_factor", "if", "vis", ":", "plt", ".", "figure", "(", ")", "plt", ".", "imshow", "(", "small_color_im", ".", "data", ")", "for", "i", "in", "range", "(", "sx", ")", ":", "plt", ".", "scatter", "(", "small_corner_px", "[", "i", ",", "0", "]", ",", "small_corner_px", "[", "i", ",", "1", "]", ",", "s", "=", "25", ",", "c", "=", "'b'", ")", "plt", ".", "axis", "(", "'off'", ")", "plt", ".", "show", "(", ")", "# project points into 3D", "camera_intr", "=", "sensor", ".", "ir_intrinsics", "points_3d", "=", "camera_intr", ".", "deproject", "(", "depth_im", ")", "# get round chessboard ind", "corner_px_round", "=", "np", ".", "round", "(", "small_corner_px", ")", ".", "astype", "(", "np", ".", "uint16", ")", "corner_ind", "=", "depth_im", ".", "ij_to_linear", "(", "corner_px_round", "[", ":", ",", "0", "]", ",", "corner_px_round", "[", ":", ",", "1", "]", ")", "if", "corner_ind", ".", "shape", "[", "0", "]", "!=", "sx", "*", "sy", ":", "logging", ".", "warning", "(", "'Did not find all corners. Discarding...'", ")", "continue", "# average 3d points", "points_3d_plane", "=", "(", "k", "*", "points_3d_plane", "+", "points_3d", "[", "corner_ind", "]", ")", "/", "(", "k", "+", "1", ")", "logging", ".", "info", "(", "'Registration iteration %d of %d'", "%", "(", "k", "+", "1", ",", "config", "[", "'num_transform_avg'", "]", ")", ")", "k", "+=", "1", "# fit a plane to the chessboard corners", "X", "=", "np", ".", "c_", "[", "points_3d_plane", ".", "x_coords", ",", "points_3d_plane", ".", "y_coords", ",", "np", ".", "ones", "(", "points_3d_plane", ".", "num_points", ")", "]", "y", "=", "points_3d_plane", ".", "z_coords", "A", "=", "X", ".", "T", ".", "dot", "(", "X", ")", "b", "=", "X", ".", "T", ".", "dot", "(", "y", ")", "w", "=", "np", ".", "linalg", ".", "inv", "(", "A", ")", ".", "dot", "(", "b", ")", "n", "=", "np", ".", "array", "(", "[", "w", "[", "0", "]", ",", "w", "[", "1", "]", ",", "-", "1", "]", ")", "n", "=", "n", "/", "np", ".", "linalg", ".", "norm", "(", "n", ")", "if", "flip_normal", ":", "n", "=", "-", "n", "mean_point_plane", "=", "points_3d_plane", ".", "mean", "(", ")", "# find x-axis of the chessboard coordinates on the fitted plane", "T_camera_table", "=", "RigidTransform", "(", "translation", "=", "-", "points_3d_plane", ".", "mean", "(", ")", ".", "data", ",", "from_frame", "=", "points_3d_plane", ".", "frame", ",", "to_frame", "=", "'table'", ")", "points_3d_centered", "=", "T_camera_table", "*", "points_3d_plane", "# get points along y", "if", "point_order", "==", "'row_major'", ":", "coord_pos_x", "=", "int", "(", "math", ".", "floor", "(", "sx", "*", "sy", "/", "2.0", ")", ")", "coord_neg_x", "=", "int", "(", "math", ".", "ceil", "(", "sx", "*", "sy", "/", "2.0", ")", ")", "points_pos_x", "=", "points_3d_centered", "[", "coord_pos_x", ":", "]", "points_neg_x", "=", "points_3d_centered", "[", ":", "coord_neg_x", "]", "x_axis", "=", "np", ".", "mean", "(", "points_pos_x", ".", "data", ",", "axis", "=", "1", ")", "-", "np", ".", "mean", "(", "points_neg_x", ".", "data", ",", "axis", "=", "1", ")", "x_axis", "=", "x_axis", "-", "np", ".", "vdot", "(", "x_axis", ",", "n", ")", "*", "n", "x_axis", "=", "x_axis", "/", "np", ".", "linalg", ".", "norm", "(", "x_axis", ")", "y_axis", "=", "np", ".", "cross", "(", "n", ",", "x_axis", ")", "else", ":", "coord_pos_y", "=", "int", "(", "math", ".", "floor", "(", "sx", "*", "(", "sy", "-", "1", ")", "/", "2.0", ")", ")", "coord_neg_y", "=", "int", "(", "math", ".", "ceil", "(", "sx", "*", "(", "sy", "+", "1", ")", "/", "2.0", ")", ")", "points_pos_y", "=", "points_3d_centered", "[", ":", "coord_pos_y", "]", "points_neg_y", "=", "points_3d_centered", "[", "coord_neg_y", ":", "]", "y_axis", "=", "np", ".", "mean", "(", "points_pos_y", ".", "data", ",", "axis", "=", "1", ")", "-", "np", ".", "mean", "(", "points_neg_y", ".", "data", ",", "axis", "=", "1", ")", "y_axis", "=", "y_axis", "-", "np", ".", "vdot", "(", "y_axis", ",", "n", ")", "*", "n", "y_axis", "=", "y_axis", "/", "np", ".", "linalg", ".", "norm", "(", "y_axis", ")", "x_axis", "=", "np", ".", "cross", "(", "-", "n", ",", "y_axis", ")", "# produce translation and rotation from plane center and chessboard basis", "rotation_cb_camera", "=", "RigidTransform", ".", "rotation_from_axes", "(", "x_axis", ",", "y_axis", ",", "n", ")", "translation_cb_camera", "=", "mean_point_plane", ".", "data", "T_cb_camera", "=", "RigidTransform", "(", "rotation", "=", "rotation_cb_camera", ",", "translation", "=", "translation_cb_camera", ",", "from_frame", "=", "'cb'", ",", "to_frame", "=", "sensor", ".", "frame", ")", "if", "y_points_left", "and", "np", ".", "abs", "(", "T_cb_camera", ".", "y_axis", "[", "1", "]", ")", ">", "0.1", ":", "if", "T_cb_camera", ".", "x_axis", "[", "0", "]", ">", "0", ":", "T_cb_camera", ".", "rotation", "=", "T_cb_camera", ".", "rotation", ".", "dot", "(", "RigidTransform", ".", "z_axis_rotation", "(", "-", "np", ".", "pi", "/", "2", ")", ".", "T", ")", "else", ":", "T_cb_camera", ".", "rotation", "=", "T_cb_camera", ".", "rotation", ".", "dot", "(", "RigidTransform", ".", "z_axis_rotation", "(", "np", ".", "pi", "/", "2", ")", ".", "T", ")", "T_camera_cb", "=", "T_cb_camera", ".", "inverse", "(", ")", "# optionally display cb corners with detected pose in 3d space", "if", "config", "[", "'debug'", "]", ":", "# display image with axes overlayed", "cb_center_im", "=", "camera_intr", ".", "project", "(", "Point", "(", "T_cb_camera", ".", "translation", ",", "frame", "=", "sensor", ".", "ir_frame", ")", ")", "cb_x_im", "=", "camera_intr", ".", "project", "(", "Point", "(", "T_cb_camera", ".", "translation", "+", "T_cb_camera", ".", "x_axis", "*", "config", "[", "'scale_amt'", "]", ",", "frame", "=", "sensor", ".", "ir_frame", ")", ")", "cb_y_im", "=", "camera_intr", ".", "project", "(", "Point", "(", "T_cb_camera", ".", "translation", "+", "T_cb_camera", ".", "y_axis", "*", "config", "[", "'scale_amt'", "]", ",", "frame", "=", "sensor", ".", "ir_frame", ")", ")", "cb_z_im", "=", "camera_intr", ".", "project", "(", "Point", "(", "T_cb_camera", ".", "translation", "+", "T_cb_camera", ".", "z_axis", "*", "config", "[", "'scale_amt'", "]", ",", "frame", "=", "sensor", ".", "ir_frame", ")", ")", "x_line", "=", "np", ".", "array", "(", "[", "cb_center_im", ".", "data", ",", "cb_x_im", ".", "data", "]", ")", "y_line", "=", "np", ".", "array", "(", "[", "cb_center_im", ".", "data", ",", "cb_y_im", ".", "data", "]", ")", "z_line", "=", "np", ".", "array", "(", "[", "cb_center_im", ".", "data", ",", "cb_z_im", ".", "data", "]", ")", "plt", ".", "figure", "(", ")", "plt", ".", "imshow", "(", "small_color_im", ".", "data", ")", "plt", ".", "scatter", "(", "cb_center_im", ".", "data", "[", "0", "]", ",", "cb_center_im", ".", "data", "[", "1", "]", ")", "plt", ".", "plot", "(", "x_line", "[", ":", ",", "0", "]", ",", "x_line", "[", ":", ",", "1", "]", ",", "c", "=", "'r'", ",", "linewidth", "=", "3", ")", "plt", ".", "plot", "(", "y_line", "[", ":", ",", "0", "]", ",", "y_line", "[", ":", ",", "1", "]", ",", "c", "=", "'g'", ",", "linewidth", "=", "3", ")", "plt", ".", "plot", "(", "z_line", "[", ":", ",", "0", "]", ",", "z_line", "[", ":", ",", "1", "]", ",", "c", "=", "'b'", ",", "linewidth", "=", "3", ")", "plt", ".", "axis", "(", "'off'", ")", "plt", ".", "title", "(", "'Chessboard frame in camera %s'", "%", "(", "sensor", ".", "frame", ")", ")", "plt", ".", "show", "(", ")", "return", "ChessboardRegistrationResult", "(", "T_camera_cb", ",", "points_3d_plane", ")" ]
Registers a camera to a chessboard. Parameters ---------- sensor : :obj:`perception.RgbdSensor` the sensor to register config : :obj:`autolab_core.YamlConfig` or :obj:`dict` configuration file for registration Returns ------- :obj:`ChessboardRegistrationResult` the result of registration Notes ----- The config must have the parameters specified in the Other Parameters section. Other Parameters ---------------- num_transform_avg : int the number of independent registrations to average together num_images : int the number of images to read for each independent registration corners_x : int the number of chessboard corners in the x-direction corners_y : int the number of chessboard corners in the y-direction color_image_rescale_factor : float amount to rescale the color image for detection (numbers around 4-8 are useful) vis : bool whether or not to visualize the registration
[ "Registers", "a", "camera", "to", "a", "chessboard", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/chessboard_registration.py#L35-L228
train
Registers a camera to a chessboard.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1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,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(0b1101111) + chr(0b110011) + '\x32' + chr(0b110000 + 0o4), 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10010 + 0o40) + chr(0b110001) + chr(52), ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1010000 + 0o37) + '\061' + chr(0b100001 + 0o26) + chr(0b110111), 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(0b1101111) + chr(0b101010 + 0o7) + chr(48) + '\060', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(341 - 292) + '\066', 0b1000), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + chr(0b110100), 39784 - 39776), nzTpIcepk0o8(chr(0b100111 + 0o11) + chr(0b1101111) + chr(0b110010) + chr(2544 - 2493) + chr(54), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110010) + '\x30' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + chr(0b10011 + 0o43), 0o10), nzTpIcepk0o8('\060' + chr(111) + chr(0b1010 + 0o50) + '\x35' + chr(0b110010), 37250 - 37242), nzTpIcepk0o8(chr(48) + chr(2006 - 1895) + chr(0b110100) + chr(383 - 334), 50559 - 50551), nzTpIcepk0o8(chr(1799 - 1751) + chr(0b1101111) + '\x31' + chr(1658 - 1610), 0o10), nzTpIcepk0o8(chr(748 - 700) + chr(0b100001 + 0o116) + '\x32' + chr(0b110100) + chr(0b110001), 30246 - 30238), nzTpIcepk0o8(chr(0b110000 + 0o0) + '\x6f' + chr(0b110101) + chr(1382 - 1334), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(11582 - 11471) + chr(50) + chr(51) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(52) + chr(922 - 869), 0b1000), nzTpIcepk0o8('\x30' + chr(3676 - 3565) + '\063' + '\067' + chr(0b100010 + 0o17), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b100111 + 0o16) + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + chr(488 - 377) + chr(0b101110 + 0o4) + chr(0b110000) + chr(0b101111 + 0o7), 53836 - 53828), nzTpIcepk0o8(chr(48) + chr(111) + '\x32' + '\064' + '\062', 0b1000), nzTpIcepk0o8('\060' + '\157' + '\063' + '\066' + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(1089 - 1041) + '\157' + chr(0b110001) + '\061' + '\060', 0b1000), nzTpIcepk0o8(chr(0b101111 + 0o1) + '\157' + chr(0b110001) + chr(0b110100 + 0o3), 12261 - 12253), nzTpIcepk0o8('\x30' + chr(3509 - 3398) + chr(0b10111 + 0o32) + chr(54) + '\063', 0b1000), nzTpIcepk0o8(chr(0b11 + 0o55) + '\157' + '\x33' + chr(1229 - 1174) + chr(0b100101 + 0o13), 53287 - 53279), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(0b1101111) + chr(50) + chr(0b101101 + 0o7) + '\066', 20908 - 20900), nzTpIcepk0o8('\060' + '\x6f' + chr(350 - 299) + chr(0b11011 + 0o34) + '\x34', 11382 - 11374), nzTpIcepk0o8('\060' + '\x6f' + '\x33' + chr(0b1100 + 0o47) + chr(0b100000 + 0o25), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(1034 - 984) + '\x31' + chr(0b101000 + 0o10), 40573 - 40565), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(0b1101111) + '\066' + chr(0b110110), 42249 - 42241), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110010) + '\x35' + chr(0b110110), 0o10), nzTpIcepk0o8(chr(484 - 436) + chr(0b1011100 + 0o23) + chr(51), 0o10), nzTpIcepk0o8('\060' + chr(9906 - 9795) + chr(1436 - 1386) + '\063' + '\067', 8), nzTpIcepk0o8(chr(1146 - 1098) + chr(0b101111 + 0o100) + '\062' + chr(0b101010 + 0o6) + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b101001 + 0o7) + chr(10557 - 10446) + chr(0b110011) + chr(1269 - 1214) + chr(0b110011), 0o10), nzTpIcepk0o8(chr(48) + '\x6f' + '\x33' + chr(0b111 + 0o51) + chr(0b1011 + 0o53), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(49) + '\x30' + chr(0b100101 + 0o14), 0o10), nzTpIcepk0o8(chr(99 - 51) + chr(0b1101111) + chr(860 - 809) + chr(0b110000) + chr(408 - 353), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(50) + '\x36' + '\061', 0o10), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b101010 + 0o105) + '\061' + chr(0b10011 + 0o42) + '\067', 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b11010 + 0o26) + chr(111) + chr(1274 - 1221) + chr(0b10100 + 0o34), 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xfa'), '\x64' + '\145' + chr(966 - 867) + chr(0b1001100 + 0o43) + chr(0b110 + 0o136) + '\x65')(chr(0b1110101) + chr(0b1110100) + '\146' + chr(0b10000 + 0o35) + '\070') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def ycMT2lpZ6BpQ(yYDAzNg2GJoU, kgkKUcD36lls): ixwvc1oQEe6K = kgkKUcD36lls[roI3spqORKae(ES5oEprVxulp(b'\xba\xf9\x12\x1fz~\xff\xedm\xccNz\xccw\xfeS\x9e'), chr(2501 - 2401) + '\x65' + '\143' + chr(3016 - 2905) + chr(0b1100100) + chr(0b1100101))(chr(0b111100 + 0o71) + chr(0b1011111 + 0o25) + chr(0b110011 + 0o63) + chr(1557 - 1512) + chr(0b111000))] tV2Tkt07h3x3 = kgkKUcD36lls[roI3spqORKae(ES5oEprVxulp(b'\xba\xf9\x12\x1fga\xff\xe4{\xd9'), '\x64' + '\x65' + chr(862 - 763) + '\x6f' + '\144' + chr(101))('\165' + chr(0b1110100) + chr(7280 - 7178) + chr(0b100011 + 0o12) + '\070')] JkrzfKC9ZyzA = kgkKUcD36lls[roI3spqORKae(ES5oEprVxulp(b'\xb7\xe3\r.k~\xed\xdcf'), chr(100) + '\145' + chr(0b1111 + 0o124) + '\157' + chr(100) + '\145')(chr(0b1110101) + chr(5072 - 4956) + chr(8545 - 8443) + chr(0b101101) + chr(0b10100 + 0o44))] vsx6iGXkzl5d = kgkKUcD36lls[roI3spqORKae(ES5oEprVxulp(b'\xb7\xe3\r.k~\xed\xdcg'), '\x64' + chr(0b1100101) + '\x63' + chr(111) + chr(0b1011 + 0o131) + chr(4971 - 4870))(chr(0b10110 + 0o137) + chr(8045 - 7929) + chr(3840 - 3738) + '\x2d' + '\070')] luBDKHx86DGY = kgkKUcD36lls[roI3spqORKae(ES5oEprVxulp(b'\xa4\xe3\x16.zS\xf1\xf1z\xcfS'), chr(2614 - 2514) + '\145' + chr(99) + chr(0b1100111 + 0o10) + chr(100) + chr(0b1100001 + 0o4))('\x75' + '\164' + '\146' + chr(45) + '\x38')] _1ZfIn0L4mnG = kgkKUcD36lls[roI3spqORKae(ES5oEprVxulp(b'\xb7\xe3\x13/|S\xf7\xee\x7f\xcdDW\xd3M\xecF\x98C\xe3\xfd\x91)l\x07\x97\xd4'), chr(100) + chr(2060 - 1959) + '\x63' + chr(0b1000101 + 0o52) + chr(100) + chr(0b10001 + 0o124))(chr(0b110100 + 0o101) + '\164' + chr(102) + chr(778 - 733) + chr(0b111000))] MnbQKzZjGv5R = kgkKUcD36lls[roI3spqORKae(ES5oEprVxulp(b'\xb2\xe0\x160Qb\xf1\xf1s\xcbM'), chr(0b1000010 + 0o42) + chr(0b1001110 + 0o27) + chr(4221 - 4122) + '\x6f' + '\x64' + '\145')(chr(0b1110101) + '\164' + '\x66' + chr(45) + '\070')] i6ZShSpA1caM = nzTpIcepk0o8('\x30' + chr(0b10110 + 0o131) + '\x30', 0b1000) if roI3spqORKae(ES5oEprVxulp(b'\xad\xd3\x0f/gb\xea\xf0A\xc6Dn\xd5'), chr(100) + '\145' + chr(99) + chr(0b1101111) + '\x64' + chr(101))('\x75' + chr(1404 - 1288) + '\146' + chr(540 - 495) + chr(0b11101 + 0o33)) in roI3spqORKae(kgkKUcD36lls, roI3spqORKae(ES5oEprVxulp(b'\xbf\xe9\x063'), '\144' + chr(0b1100101) + chr(99) + '\157' + chr(6749 - 6649) + '\145')(chr(117) + chr(116) + chr(0b10111 + 0o117) + '\x2d' + chr(0b110111 + 0o1)))() and JkrzfKC9ZyzA == vsx6iGXkzl5d: i6ZShSpA1caM = kgkKUcD36lls[roI3spqORKae(ES5oEprVxulp(b'\xad\xd3\x0f/gb\xea\xf0A\xc6Dn\xd5'), chr(0b1100100) + '\145' + chr(99) + chr(3158 - 3047) + chr(0b1100100) + chr(0b1100101))(chr(0b1110000 + 0o5) + '\x74' + '\146' + '\055' + chr(0b111000))] tV2Tkt07h3x3 = nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(111) + '\061', 0o10) boGS5qf78vC1 = kgkKUcD36lls[roI3spqORKae(ES5oEprVxulp(b'\xa2\xe5\x0c'), chr(5350 - 5250) + chr(101) + chr(0b1100000 + 0o3) + chr(111) + chr(100) + '\145')(chr(0b101001 + 0o114) + chr(0b1010111 + 0o35) + chr(0b1100110) + chr(0b10110 + 0o27) + chr(294 - 238))] roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'\xbd\xf4187@\xe9\xdc/\xcdSG'), '\144' + chr(0b1100101) + chr(0b1100011) + '\157' + '\x64' + chr(101))(chr(0b1110101) + chr(0b110000 + 0o104) + '\146' + chr(0b101101 + 0o0) + chr(0b100010 + 0o26)))(roI3spqORKae(ES5oEprVxulp(b'\x86\xe9\x18)}x\xfb\xf1w\xc4F(\xc2I\xf2@\x8bN\xa6\x87\x84'), chr(4633 - 4533) + chr(6271 - 6170) + chr(0b1010110 + 0o15) + chr(5861 - 5750) + chr(0b1100100) + chr(0b1100101))('\x75' + '\x74' + '\146' + chr(0b10100 + 0o31) + '\x38') % roI3spqORKae(yYDAzNg2GJoU, roI3spqORKae(ES5oEprVxulp(b'\x9f\xd6K%y>\xef\xf0/\xe2uG'), chr(0b1100100) + '\x65' + chr(0b1100011) + '\x6f' + '\x64' + chr(0b1100101))('\165' + chr(0b1110100) + chr(0b1010 + 0o134) + '\x2d' + chr(56)))) Ly1cW1ktR8Oy = yYDAzNg2GJoU.ir_intrinsics stVGsv3MKjDy = nDF4gVNx0u9Q.UmwwEp7MzR6q([nzTpIcepk0o8(chr(0b110000) + '\157' + '\x33', 8), nzTpIcepk0o8(chr(121 - 73) + chr(0b1101111) + chr(0b110011), 8)]) h3Vc_4wxEbgd = nDF4gVNx0u9Q.UmwwEp7MzR6q([nzTpIcepk0o8('\060' + chr(3143 - 3032) + '\x33', 8), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110001), 8)]) XcMRuYkgKHbI = CxSsxwk8McAE(nDF4gVNx0u9Q.UmwwEp7MzR6q([nzTpIcepk0o8(chr(0b101100 + 0o4) + chr(0b1101111) + chr(340 - 289), 8), JkrzfKC9ZyzA * vsx6iGXkzl5d]), frame=yYDAzNg2GJoU.ir_frame) B6UAF1zReOyJ = nzTpIcepk0o8(chr(1036 - 988) + chr(0b11001 + 0o126) + '\060', 8) while B6UAF1zReOyJ < ixwvc1oQEe6K: g2jjO9_g1nqJ = None for ZlbFMSG8gCoF in bbT2xIe5pzk7(tV2Tkt07h3x3): KQbHFTcl_LKy = oprIvDIRQyCb.oprIvDIRQyCb() (ZINTjR6kcTPj, gghVLTSUD9dC, zIqcgNgQ9U6F) = yYDAzNg2GJoU.G4Lisexwxqjs() NiWVjAWn0l6T = oprIvDIRQyCb.oprIvDIRQyCb() roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'\xbd\xf4187@\xe9\xdc/\xcdSG'), chr(8921 - 8821) + chr(0b101001 + 0o74) + chr(0b1011100 + 0o7) + chr(0b1101010 + 0o5) + chr(0b1100100) + chr(0b11111 + 0o106))(chr(0b1110101) + '\x74' + '\x66' + chr(1512 - 1467) + chr(56)))(roI3spqORKae(ES5oEprVxulp(b'\x92\xfe\x1e-k\x7f\xbe\xd1k\xc4Ua\xccM\xa5\x05\xdc\x01\xb5\xc4'), chr(8835 - 8735) + '\x65' + '\143' + chr(9627 - 9516) + '\144' + chr(6610 - 6509))('\x75' + chr(0b1110100) + '\x66' + '\x2d' + chr(0b100111 + 0o21)) % (NiWVjAWn0l6T - KQbHFTcl_LKy)) if g2jjO9_g1nqJ is None: g2jjO9_g1nqJ = nDF4gVNx0u9Q.UmwwEp7MzR6q([gghVLTSUD9dC.PaEBmun9J0YJ, gghVLTSUD9dC.dH3vcKdvgBu0, tV2Tkt07h3x3]) g2jjO9_g1nqJ[:, :, ZlbFMSG8gCoF] = gghVLTSUD9dC.FfKOThdpoDTb Jyg12lPElmbH = nDF4gVNx0u9Q.FvpUlOwKdj9t(g2jjO9_g1nqJ, axis=nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b110010), 0o10)) WZcCXRnThfxU = Ctd7ihpXT1E5(Jyg12lPElmbH, yYDAzNg2GJoU.ir_frame) quMbVkWLibnL = ZINTjR6kcTPj.resize(_1ZfIn0L4mnG) QVTO9NEuCWxW = quMbVkWLibnL.find_chessboard(sx=JkrzfKC9ZyzA, sy=vsx6iGXkzl5d) if boGS5qf78vC1: roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\xb1\xffO\x1a8h\xe4\xc0v\xf9m='), chr(9340 - 9240) + chr(0b1100101) + chr(2079 - 1980) + chr(0b1101111) + '\144' + chr(8487 - 8386))(chr(117) + chr(116) + chr(0b100100 + 0o102) + '\055' + '\070'))() roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\xbd\xe1\x0c(a{'), '\144' + '\x65' + chr(2105 - 2006) + chr(0b1100001 + 0o16) + chr(100) + '\145')(chr(7967 - 7850) + chr(3296 - 3180) + '\146' + '\x2d' + chr(0b111000)))(roI3spqORKae(quMbVkWLibnL, roI3spqORKae(ES5oEprVxulp(b'\x92\xea4\x0fZd\xfa\xf3q\xeeuj'), chr(0b1100100) + chr(0b1000101 + 0o40) + '\x63' + chr(0b1101111) + '\x64' + chr(101))('\165' + chr(0b1110100) + chr(7772 - 7670) + chr(0b101101) + chr(56)))) for ZlbFMSG8gCoF in bbT2xIe5pzk7(JkrzfKC9ZyzA): roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\x8e\xc4O)v>\xf8\xeeJ\xddIi'), '\144' + chr(0b11000 + 0o115) + chr(0b1011101 + 0o6) + '\x6f' + chr(100) + chr(0b1100010 + 0o3))(chr(0b110 + 0o157) + chr(116) + chr(0b1100110) + chr(0b11101 + 0o20) + chr(56)))(QVTO9NEuCWxW[ZlbFMSG8gCoF, nzTpIcepk0o8(chr(0b100110 + 0o12) + '\x6f' + '\060', 8)], QVTO9NEuCWxW[ZlbFMSG8gCoF, nzTpIcepk0o8(chr(805 - 757) + chr(0b1101111) + '\061', 8)], s=nzTpIcepk0o8('\x30' + chr(0b10011 + 0o134) + chr(51) + '\x31', 29164 - 29156), c=roI3spqORKae(ES5oEprVxulp(b'\xb6'), '\144' + '\145' + chr(0b1100011) + chr(0b11111 + 0o120) + chr(0b111001 + 0o53) + '\145')('\x75' + '\164' + chr(0b1100110) + chr(0b101101) + '\x38')) roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\xb2\xdb:-kD\xc9\xf7A\xf5mr'), '\144' + chr(6509 - 6408) + chr(6838 - 6739) + '\157' + chr(0b100010 + 0o102) + chr(0b10100 + 0o121))('\165' + chr(0b111000 + 0o74) + chr(0b1100110) + '\x2d' + chr(0b111000)))() if QVTO9NEuCWxW is None: roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'\xa5\xe5N7g|\xce\xd5h\xefjl'), chr(7849 - 7749) + '\x65' + chr(2305 - 2206) + chr(111) + chr(0b1100100) + chr(101))('\x75' + chr(0b1110100) + chr(102) + chr(45) + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\x9a\xe3_#fi\xed\xf0|\xc5@z\xc5\x08\xfb@\x8dJ\xe5\xd6\x92,.S\xbb\xce\x99\xbe\xe3\x16\xcdb\xf2\xe1\x89\xa7a\xa2\xc9\x1f\xbb\xff\n2k,\xed\xe6j\xdeHf\xc6['), chr(0b111010 + 0o52) + '\x65' + '\x63' + '\157' + chr(0b1100100) + chr(0b1001 + 0o134))(chr(0b11011 + 0o132) + chr(0b1110100) + chr(0b1100110) + chr(45) + chr(802 - 746))) continue G6qU8sBi53MJ = QVTO9NEuCWxW / _1ZfIn0L4mnG if boGS5qf78vC1: roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\xb1\xffO\x1a8h\xe4\xc0v\xf9m='), chr(0b1111 + 0o125) + chr(0b1100101) + chr(0b11 + 0o140) + '\x6f' + chr(100) + '\145')(chr(0b1110101) + '\x74' + chr(0b1011101 + 0o11) + '\055' + chr(56)))() roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\xbd\xe1\x0c(a{'), chr(0b1001101 + 0o27) + '\x65' + chr(110 - 11) + chr(4747 - 4636) + chr(0b1100100) + '\145')('\165' + '\x74' + chr(2831 - 2729) + chr(0b10000 + 0o35) + '\070'))(roI3spqORKae(ZINTjR6kcTPj, roI3spqORKae(ES5oEprVxulp(b'\x92\xea4\x0fZd\xfa\xf3q\xeeuj'), '\144' + chr(0b1001110 + 0o27) + '\x63' + '\x6f' + chr(0b1010111 + 0o15) + chr(0b1010001 + 0o24))('\165' + chr(0b110001 + 0o103) + '\146' + chr(1205 - 1160) + chr(343 - 287)))) for ZlbFMSG8gCoF in bbT2xIe5pzk7(JkrzfKC9ZyzA): roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\x8e\xc4O)v>\xf8\xeeJ\xddIi'), '\144' + '\x65' + '\143' + '\157' + chr(100) + chr(1678 - 1577))(chr(117) + chr(0b1110100) + '\146' + chr(345 - 300) + '\x38'))(G6qU8sBi53MJ[ZlbFMSG8gCoF, nzTpIcepk0o8(chr(1983 - 1935) + chr(0b1101111) + '\x30', 8)], G6qU8sBi53MJ[ZlbFMSG8gCoF, nzTpIcepk0o8(chr(0b110000) + chr(111) + '\061', 8)], s=nzTpIcepk0o8(chr(0b110000) + chr(780 - 669) + '\063' + chr(1242 - 1193), 8), c=roI3spqORKae(ES5oEprVxulp(b'\xb6'), chr(0b100000 + 0o104) + chr(0b100011 + 0o102) + '\x63' + chr(8408 - 8297) + chr(100) + '\x65')(chr(117) + '\x74' + chr(1952 - 1850) + chr(1540 - 1495) + chr(0b101001 + 0o17))) roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\x9e\xc8Fp<|\xe8\xfa]\xe6i9'), '\x64' + '\x65' + '\143' + '\x6f' + chr(8563 - 8463) + chr(0b1100101))(chr(0b1110101) + '\x74' + '\x66' + '\055' + '\070'))(roI3spqORKae(ES5oEprVxulp(b'\xbb\xea\x19'), chr(1162 - 1062) + chr(101) + chr(3886 - 3787) + chr(5622 - 5511) + chr(0b100001 + 0o103) + chr(101))('\165' + chr(7757 - 7641) + chr(102) + chr(0b101101) + chr(0b111000))) roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\xb2\xdb:-kD\xc9\xf7A\xf5mr'), '\x64' + chr(101) + '\x63' + '\157' + '\144' + chr(0b1000 + 0o135))('\x75' + chr(116) + chr(0b100 + 0o142) + chr(0b110 + 0o47) + '\070'))() wgYNRnQWtrEG = yYDAzNg2GJoU.ir_intrinsics fa7fk2hi9eEl = wgYNRnQWtrEG.deproject(WZcCXRnThfxU) WjRBVWuq_VwB = nDF4gVNx0u9Q.round(G6qU8sBi53MJ).xqAChpcBkssb(nDF4gVNx0u9Q.uint16) CyfKv__DYUB0 = WZcCXRnThfxU.ij_to_linear(WjRBVWuq_VwB[:, nzTpIcepk0o8(chr(48) + '\x6f' + chr(574 - 526), 8)], WjRBVWuq_VwB[:, nzTpIcepk0o8(chr(1822 - 1774) + chr(0b1000010 + 0o55) + chr(0b1001 + 0o50), 8)]) if roI3spqORKae(CyfKv__DYUB0, roI3spqORKae(ES5oEprVxulp(b'\xb8\xe4\x1d\r>5\xac\xc2X\xfd\x19n'), chr(0b1010111 + 0o15) + chr(101) + chr(5188 - 5089) + '\157' + chr(0b1100100) + chr(101))(chr(0b1000111 + 0o56) + chr(0b1110100) + chr(102) + '\055' + chr(0b111000)))[nzTpIcepk0o8('\x30' + chr(5629 - 5518) + chr(0b110000), 8)] != JkrzfKC9ZyzA * vsx6iGXkzl5d: roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'\xa3\xed\r.gb\xf9'), chr(0b111001 + 0o53) + chr(0b1100101) + chr(99) + '\x6f' + chr(0b1011001 + 0o13) + chr(101))('\165' + chr(0b1110100) + chr(102) + '\x2d' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\x90\xe5\x1b``c\xea\xa3x\xc3Ol\x81I\xf3I\xd9L\xe9\xd0\x99-}\x00\xd6\x86\xb8\xb4\xfbU\xcfq\xfb\xed\x95\xa1o\xe9\x9f'), chr(0b111010 + 0o52) + chr(101) + chr(0b1011100 + 0o7) + '\157' + chr(100) + chr(0b1011100 + 0o11))(chr(117) + chr(116) + '\x66' + '\055' + chr(524 - 468))) continue XcMRuYkgKHbI = (B6UAF1zReOyJ * XcMRuYkgKHbI + fa7fk2hi9eEl[CyfKv__DYUB0]) / (B6UAF1zReOyJ + nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001), 8)) roI3spqORKae(Lj4gcNafqrcl, roI3spqORKae(ES5oEprVxulp(b'\xbd\xf4187@\xe9\xdc/\xcdSG'), chr(4685 - 4585) + chr(521 - 420) + '\143' + chr(111) + chr(100) + chr(0b1100101))(chr(0b1110101) + chr(116) + chr(0b1100110) + chr(260 - 215) + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\x86\xe9\x18)}x\xec\xe2j\xc3Nf\x81A\xeb@\x8bN\xf2\xcb\x98&/V\x9c\x86\x93\xbb\xa8\x13\xca'), '\x64' + chr(0b1100101) + chr(99) + '\157' + chr(0b1010111 + 0o15) + chr(101))('\x75' + chr(0b1110100) + '\x66' + chr(45) + chr(0b111000)) % (B6UAF1zReOyJ + nzTpIcepk0o8(chr(277 - 229) + chr(0b111111 + 0o60) + chr(0b110001), 8), kgkKUcD36lls[roI3spqORKae(ES5oEprVxulp(b'\xba\xf9\x12\x1fz~\xff\xedm\xccNz\xccw\xfeS\x9e'), '\144' + chr(6047 - 5946) + chr(5939 - 5840) + '\157' + chr(100) + chr(101))('\x75' + chr(116) + chr(0b1100110) + chr(0b101101) + chr(0b100 + 0o64))])) B6UAF1zReOyJ += nzTpIcepk0o8(chr(0b11 + 0o55) + chr(9543 - 9432) + chr(0b110001), 8) mxhyDqTAMpMC = nDF4gVNx0u9Q.c_[XcMRuYkgKHbI.x_coords, XcMRuYkgKHbI.y_coords, nDF4gVNx0u9Q.rYPkZ8_2D0X1(XcMRuYkgKHbI.num_points)] Fi3yzxctM1zW = XcMRuYkgKHbI.z_coords MbjAvyP4Qyak = mxhyDqTAMpMC.T.dot(mxhyDqTAMpMC) xFDEVQn5qSdh = mxhyDqTAMpMC.T.dot(Fi3yzxctM1zW) sm7_CLmeWGR7 = nDF4gVNx0u9Q.linalg.inv(MbjAvyP4Qyak).dot(xFDEVQn5qSdh) NoZxuO7wjArS = nDF4gVNx0u9Q.Tn6rGr7XTM7t([sm7_CLmeWGR7[nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110000), 8)], sm7_CLmeWGR7[nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b1101111) + chr(0b110001), 8)], -nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110001), 8)]) NoZxuO7wjArS = NoZxuO7wjArS / nDF4gVNx0u9Q.linalg.xBFFJFaziFDU(NoZxuO7wjArS) if MnbQKzZjGv5R: NoZxuO7wjArS = -NoZxuO7wjArS C6z_5FPP_bXx = XcMRuYkgKHbI.JE1frtxECu3x() kctw49_KRW4Y = xrsN7tOaUcVT(translation=-XcMRuYkgKHbI.mean().FfKOThdpoDTb, from_frame=XcMRuYkgKHbI.KZ4ew2qs1HTO, to_frame=roI3spqORKae(ES5oEprVxulp(b'\xa0\xed\x1d,k'), chr(4210 - 4110) + chr(101) + chr(0b11011 + 0o110) + chr(111) + chr(100) + chr(3940 - 3839))(chr(0b110010 + 0o103) + '\x74' + '\146' + chr(45) + chr(56))) VuMG0n7BZHnp = kctw49_KRW4Y * XcMRuYkgKHbI if luBDKHx86DGY == roI3spqORKae(ES5oEprVxulp(b'\xa6\xe3\x08\x1fcm\xf4\xecl'), '\144' + chr(0b100110 + 0o77) + chr(6097 - 5998) + chr(0b1101111) + '\144' + chr(0b1000111 + 0o36))(chr(117) + chr(0b11111 + 0o125) + chr(3596 - 3494) + chr(0b11110 + 0o17) + chr(423 - 367)): JmSk2TwDSaBX = nzTpIcepk0o8(aQg01EfWg1cd.floor(JkrzfKC9ZyzA * vsx6iGXkzl5d / 2.0)) CG1DTVC2TwDD = nzTpIcepk0o8(aQg01EfWg1cd.ceil(JkrzfKC9ZyzA * vsx6iGXkzl5d / 2.0)) UXnjsBzU5B9U = VuMG0n7BZHnp[JmSk2TwDSaBX:] mphN0tCK0yAi = VuMG0n7BZHnp[:CG1DTVC2TwDD] ERwrThKqNYbO = nDF4gVNx0u9Q.JE1frtxECu3x(UXnjsBzU5B9U.FfKOThdpoDTb, axis=nzTpIcepk0o8('\060' + chr(0b1011010 + 0o25) + chr(2000 - 1951), 8)) - nDF4gVNx0u9Q.JE1frtxECu3x(mphN0tCK0yAi.FfKOThdpoDTb, axis=nzTpIcepk0o8(chr(48) + '\157' + chr(0b100101 + 0o14), 8)) ERwrThKqNYbO = ERwrThKqNYbO - nDF4gVNx0u9Q.vdot(ERwrThKqNYbO, NoZxuO7wjArS) * NoZxuO7wjArS ERwrThKqNYbO = ERwrThKqNYbO / nDF4gVNx0u9Q.linalg.xBFFJFaziFDU(ERwrThKqNYbO) cOIu_OsrsbjE = nDF4gVNx0u9Q.cross(NoZxuO7wjArS, ERwrThKqNYbO) else: cFuqXahEO4zF = nzTpIcepk0o8(aQg01EfWg1cd.floor(JkrzfKC9ZyzA * (vsx6iGXkzl5d - nzTpIcepk0o8(chr(289 - 241) + chr(6741 - 6630) + chr(0b110 + 0o53), 8)) / 2.0)) gmz9Rui1HVBj = nzTpIcepk0o8(aQg01EfWg1cd.ceil(JkrzfKC9ZyzA * (vsx6iGXkzl5d + nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001), 8)) / 2.0)) QW7z8gOoloWQ = VuMG0n7BZHnp[:cFuqXahEO4zF] N1LJ1wufpZFm = VuMG0n7BZHnp[gmz9Rui1HVBj:] cOIu_OsrsbjE = nDF4gVNx0u9Q.JE1frtxECu3x(QW7z8gOoloWQ.FfKOThdpoDTb, axis=nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b11 + 0o56), 8)) - nDF4gVNx0u9Q.JE1frtxECu3x(N1LJ1wufpZFm.FfKOThdpoDTb, axis=nzTpIcepk0o8('\x30' + chr(4219 - 4108) + '\061', 8)) cOIu_OsrsbjE = cOIu_OsrsbjE - nDF4gVNx0u9Q.vdot(cOIu_OsrsbjE, NoZxuO7wjArS) * NoZxuO7wjArS cOIu_OsrsbjE = cOIu_OsrsbjE / nDF4gVNx0u9Q.linalg.xBFFJFaziFDU(cOIu_OsrsbjE) ERwrThKqNYbO = nDF4gVNx0u9Q.cross(-NoZxuO7wjArS, cOIu_OsrsbjE) _UV2_Gmo1zJ6 = xrsN7tOaUcVT.rotation_from_axes(ERwrThKqNYbO, cOIu_OsrsbjE, NoZxuO7wjArS) V8bKrd0UBTPM = C6z_5FPP_bXx.FfKOThdpoDTb wiE2gEaFKIaf = xrsN7tOaUcVT(rotation=_UV2_Gmo1zJ6, translation=V8bKrd0UBTPM, from_frame=roI3spqORKae(ES5oEprVxulp(b'\xb7\xee'), '\144' + '\145' + chr(8983 - 8884) + '\x6f' + chr(0b1000011 + 0o41) + chr(0b111001 + 0o54))('\165' + chr(11628 - 11512) + '\x66' + '\055' + '\070'), to_frame=yYDAzNg2GJoU.KZ4ew2qs1HTO) if i6ZShSpA1caM and roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xae\xdd=\x07yY\xca\xb4K\xff\x19D'), chr(0b1011 + 0o131) + '\x65' + '\143' + chr(0b1101111) + chr(0b11111 + 0o105) + '\x65')('\x75' + chr(8602 - 8486) + '\x66' + chr(1274 - 1229) + chr(1527 - 1471)))(roI3spqORKae(wiE2gEaFKIaf, roI3spqORKae(ES5oEprVxulp(b'\xad\xd3\x1e8g\x7f'), chr(6449 - 6349) + chr(0b111 + 0o136) + chr(0b10001 + 0o122) + chr(0b111100 + 0o63) + chr(0b1100100) + '\145')(chr(0b1110101) + chr(1017 - 901) + chr(7724 - 7622) + chr(0b101101) + chr(0b111000)))[nzTpIcepk0o8('\x30' + chr(0b11000 + 0o127) + '\061', 8)]) > 0.1: if roI3spqORKae(wiE2gEaFKIaf, roI3spqORKae(ES5oEprVxulp(b'\xac\xd3\x1e8g\x7f'), '\144' + chr(101) + chr(0b100000 + 0o103) + '\x6f' + chr(0b1100100) + '\x65')('\165' + chr(10663 - 10547) + chr(102) + chr(360 - 315) + chr(56)))[nzTpIcepk0o8('\060' + chr(0b1101111) + '\x30', 8)] > nzTpIcepk0o8(chr(0b100001 + 0o17) + '\157' + chr(0b110000 + 0o0), 8): wiE2gEaFKIaf.Mtc_tua2dqNy = wiE2gEaFKIaf.rotation.dot(xrsN7tOaUcVT.z_axis_rotation(-nDF4gVNx0u9Q.pi / nzTpIcepk0o8(chr(48) + '\157' + chr(0b110010), 8)).hq6XE4_Nhd6R) else: wiE2gEaFKIaf.Mtc_tua2dqNy = wiE2gEaFKIaf.rotation.dot(xrsN7tOaUcVT.z_axis_rotation(nDF4gVNx0u9Q.pi / nzTpIcepk0o8(chr(1922 - 1874) + '\157' + chr(0b110010), 8)).hq6XE4_Nhd6R) sur04v1WyitW = wiE2gEaFKIaf.inverse() if kgkKUcD36lls[roI3spqORKae(ES5oEprVxulp(b'\xb0\xe9\x1d5i'), '\144' + chr(0b1100101) + '\x63' + chr(0b1101111) + chr(0b11010 + 0o112) + chr(101))(chr(1864 - 1747) + '\x74' + chr(0b101001 + 0o75) + chr(1623 - 1578) + '\070')]: DWQn4lVnc_mO = wgYNRnQWtrEG.mcjejRq_Q0_k(wO40m0aHUhAf(wiE2gEaFKIaf.cZKo5HdKdwkJ, frame=yYDAzNg2GJoU.ir_frame)) esAmHl9POUDp = wgYNRnQWtrEG.mcjejRq_Q0_k(wO40m0aHUhAf(wiE2gEaFKIaf.cZKo5HdKdwkJ + wiE2gEaFKIaf.x_axis * kgkKUcD36lls[roI3spqORKae(ES5oEprVxulp(b'\xa7\xef\x1e,kS\xff\xeej'), '\x64' + chr(0b1100101) + chr(0b1011101 + 0o6) + chr(4653 - 4542) + '\x64' + chr(101))('\x75' + chr(11904 - 11788) + chr(0b1100110) + '\x2d' + chr(56))], frame=yYDAzNg2GJoU.ir_frame)) _LDLeX6lbVbR = wgYNRnQWtrEG.mcjejRq_Q0_k(wO40m0aHUhAf(wiE2gEaFKIaf.cZKo5HdKdwkJ + wiE2gEaFKIaf.y_axis * kgkKUcD36lls[roI3spqORKae(ES5oEprVxulp(b'\xa7\xef\x1e,kS\xff\xeej'), chr(0b1100100) + '\x65' + chr(0b1100011) + chr(0b1101001 + 0o6) + '\144' + chr(6969 - 6868))(chr(117) + chr(9111 - 8995) + chr(102) + '\055' + chr(0b111000))], frame=yYDAzNg2GJoU.ir_frame)) GynRR4iqMF9U = wgYNRnQWtrEG.mcjejRq_Q0_k(wO40m0aHUhAf(wiE2gEaFKIaf.cZKo5HdKdwkJ + wiE2gEaFKIaf.z_axis * kgkKUcD36lls[roI3spqORKae(ES5oEprVxulp(b'\xa7\xef\x1e,kS\xff\xeej'), chr(9676 - 9576) + chr(4953 - 4852) + '\143' + '\157' + chr(100) + chr(5200 - 5099))('\165' + chr(0b10010 + 0o142) + chr(102) + '\055' + '\x38')], frame=yYDAzNg2GJoU.ir_frame)) LUTbqHKqfwSJ = nDF4gVNx0u9Q.Tn6rGr7XTM7t([DWQn4lVnc_mO.FfKOThdpoDTb, esAmHl9POUDp.FfKOThdpoDTb]) xnqgf9rnXzR2 = nDF4gVNx0u9Q.Tn6rGr7XTM7t([DWQn4lVnc_mO.FfKOThdpoDTb, _LDLeX6lbVbR.FfKOThdpoDTb]) BjmNkkF8S46U = nDF4gVNx0u9Q.Tn6rGr7XTM7t([DWQn4lVnc_mO.FfKOThdpoDTb, GynRR4iqMF9U.FfKOThdpoDTb]) roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\xb1\xffO\x1a8h\xe4\xc0v\xf9m='), '\x64' + chr(1484 - 1383) + '\x63' + chr(5978 - 5867) + '\x64' + chr(101))('\165' + '\164' + '\146' + '\x2d' + chr(56)))() roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\xbd\xe1\x0c(a{'), chr(1545 - 1445) + chr(1913 - 1812) + chr(0b1100011) + '\x6f' + chr(0b1010000 + 0o24) + '\145')(chr(0b1110000 + 0o5) + chr(0b11000 + 0o134) + chr(0b1011 + 0o133) + '\x2d' + '\070'))(roI3spqORKae(ZINTjR6kcTPj, roI3spqORKae(ES5oEprVxulp(b'\x92\xea4\x0fZd\xfa\xf3q\xeeuj'), chr(0b100001 + 0o103) + chr(0b1010000 + 0o25) + '\143' + '\x6f' + chr(7750 - 7650) + '\x65')(chr(4494 - 4377) + chr(0b1110100) + chr(102) + chr(0b101101) + '\x38'))) roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\x8e\xc4O)v>\xf8\xeeJ\xddIi'), '\x64' + chr(101) + chr(5414 - 5315) + '\x6f' + chr(100) + chr(101))(chr(10991 - 10874) + '\164' + chr(0b1100110) + chr(0b101101) + '\070'))(roI3spqORKae(DWQn4lVnc_mO, roI3spqORKae(ES5oEprVxulp(b'\x92\xea4\x0fZd\xfa\xf3q\xeeuj'), chr(100) + chr(0b1100101) + chr(4484 - 4385) + chr(111) + chr(100) + '\x65')(chr(0b1110101) + chr(5511 - 5395) + chr(0b1100110) + chr(45) + chr(0b10011 + 0o45)))[nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b11011 + 0o124) + chr(653 - 605), 8)], roI3spqORKae(DWQn4lVnc_mO, roI3spqORKae(ES5oEprVxulp(b'\x92\xea4\x0fZd\xfa\xf3q\xeeuj'), chr(0b1100100) + '\x65' + '\x63' + chr(111) + chr(0b1001110 + 0o26) + chr(101))(chr(0b1110101) + '\x74' + chr(0b101100 + 0o72) + chr(0b101101) + '\070'))[nzTpIcepk0o8(chr(72 - 24) + chr(0b1001000 + 0o47) + '\x31', 8)]) roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\xa4\xe0\x104'), chr(100) + chr(0b1100101) + '\143' + chr(5003 - 4892) + chr(0b10110 + 0o116) + '\x65')(chr(117) + '\x74' + chr(7999 - 7897) + chr(45) + chr(2521 - 2465)))(LUTbqHKqfwSJ[:, nzTpIcepk0o8(chr(48) + chr(0b100101 + 0o112) + chr(0b110000), 8)], LUTbqHKqfwSJ[:, nzTpIcepk0o8(chr(48) + '\x6f' + '\x31', 8)], c=roI3spqORKae(ES5oEprVxulp(b'\xa6'), '\x64' + chr(5519 - 5418) + chr(99) + '\x6f' + chr(0b1100100) + '\145')('\x75' + chr(3763 - 3647) + chr(0b1100110) + chr(45) + '\070'), linewidth=nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + '\x33', 8)) roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\xa4\xe0\x104'), '\144' + chr(4509 - 4408) + chr(0b1100011) + chr(0b110100 + 0o73) + chr(0b1000111 + 0o35) + chr(2030 - 1929))('\165' + chr(0b1101001 + 0o13) + chr(7498 - 7396) + chr(417 - 372) + chr(0b111000)))(xnqgf9rnXzR2[:, nzTpIcepk0o8(chr(0b110000) + chr(0b1101010 + 0o5) + chr(1525 - 1477), 8)], xnqgf9rnXzR2[:, nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(889 - 840), 8)], c=roI3spqORKae(ES5oEprVxulp(b'\xb3'), chr(0b1100100) + chr(0b1100101) + chr(99) + '\x6f' + chr(100) + chr(0b10000 + 0o125))('\165' + '\x74' + '\146' + '\x2d' + '\x38'), linewidth=nzTpIcepk0o8(chr(48) + '\157' + chr(0b101100 + 0o7), 8)) roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\xa4\xe0\x104'), '\x64' + '\145' + '\x63' + chr(0b1000001 + 0o56) + '\x64' + chr(0b1100101))(chr(13202 - 13085) + chr(0b1110010 + 0o2) + chr(0b1100110) + chr(45) + chr(614 - 558)))(BjmNkkF8S46U[:, nzTpIcepk0o8('\x30' + '\157' + chr(48), 8)], BjmNkkF8S46U[:, nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x31', 8)], c=roI3spqORKae(ES5oEprVxulp(b'\xb6'), chr(7093 - 6993) + chr(0b10 + 0o143) + chr(99) + '\x6f' + '\x64' + chr(0b1001111 + 0o26))(chr(0b1101001 + 0o14) + chr(11800 - 11684) + '\146' + '\055' + chr(0b11011 + 0o35)), linewidth=nzTpIcepk0o8(chr(0b11011 + 0o25) + chr(0b1101111) + chr(816 - 765), 8)) roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\x9e\xc8Fp<|\xe8\xfa]\xe6i9'), chr(2243 - 2143) + chr(7836 - 7735) + '\143' + '\x6f' + chr(6854 - 6754) + chr(0b1100101))('\x75' + chr(9728 - 9612) + chr(0b10011 + 0o123) + '\x2d' + chr(0b111000)))(roI3spqORKae(ES5oEprVxulp(b'\xbb\xea\x19'), chr(100) + chr(0b1100101) + chr(99) + chr(0b1100010 + 0o15) + chr(100) + '\145')(chr(117) + '\x74' + '\146' + chr(0b1111 + 0o36) + '\x38')) roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\x9b\xc3O4\\[\xa7\xe2t\xf5Y`'), '\144' + '\145' + '\x63' + chr(0b1101111) + '\144' + chr(0b1100000 + 0o5))('\165' + chr(0b1110100) + '\146' + '\x2d' + '\x38'))(roI3spqORKae(ES5oEprVxulp(b'\x97\xe4\x1a3}n\xf1\xe2l\xce\x01n\xd3I\xf2@\xd9F\xe8\x82\x94)b\x16\x8a\xc7\xdc\xf8\xfb'), chr(100) + chr(3738 - 3637) + chr(99) + chr(111) + '\144' + chr(3135 - 3034))(chr(0b1001000 + 0o55) + '\x74' + '\x66' + '\055' + chr(0b11000 + 0o40)) % roI3spqORKae(yYDAzNg2GJoU, roI3spqORKae(ES5oEprVxulp(b'\x9f\xd6K%y>\xef\xf0/\xe2uG'), '\x64' + '\145' + chr(5040 - 4941) + chr(6058 - 5947) + chr(0b11110 + 0o106) + '\x65')(chr(9846 - 9729) + '\164' + '\x66' + chr(1204 - 1159) + chr(118 - 62)))) roI3spqORKae(Z7HGgmIyegqz, roI3spqORKae(ES5oEprVxulp(b'\xb2\xdb:-kD\xc9\xf7A\xf5mr'), '\x64' + chr(0b101100 + 0o71) + chr(0b1001100 + 0o27) + '\157' + chr(0b1101 + 0o127) + '\145')(chr(3028 - 2911) + '\164' + '\146' + chr(0b101101 + 0o0) + chr(0b111000)))() return HnFdHOgqxr4A(sur04v1WyitW, XcMRuYkgKHbI)
BerkeleyAutomation/perception
perception/features.py
BagOfFeatures.add
def add(self, feature): """ Add a new feature to the bag. Parameters ---------- feature : :obj:`Feature` feature to add """ self.features_.append(feature) self.num_features_ = len(self.features_)
python
def add(self, feature): """ Add a new feature to the bag. Parameters ---------- feature : :obj:`Feature` feature to add """ self.features_.append(feature) self.num_features_ = len(self.features_)
[ "def", "add", "(", "self", ",", "feature", ")", ":", "self", ".", "features_", ".", "append", "(", "feature", ")", "self", ".", "num_features_", "=", "len", "(", "self", ".", "features_", ")" ]
Add a new feature to the bag. Parameters ---------- feature : :obj:`Feature` feature to add
[ "Add", "a", "new", "feature", "to", "the", "bag", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/features.py#L109-L118
train
Adds a new feature to the bag.
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,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Y,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(181 - 132) + '\065' + chr(0b101110 + 0o2), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + '\x34' + chr(49), 48173 - 48165), nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(6505 - 6394) + chr(0b110010) + chr(0b110101) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(1318 - 1270) + chr(111) + '\x31' + chr(975 - 927) + '\x31', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + '\061' + '\060', 0o10), nzTpIcepk0o8('\060' + '\157' + chr(944 - 894) + '\062' + '\063', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b101 + 0o54) + chr(2201 - 2152) + chr(0b110111), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + chr(303 - 192) + chr(0b10111 + 0o35) + '\x30', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1000010 + 0o55) + chr(50) + '\x30' + chr(543 - 495), 10130 - 10122), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\157' + chr(874 - 823) + chr(0b110100) + chr(54), 58577 - 58569), nzTpIcepk0o8(chr(0b100010 + 0o16) + chr(0b1101010 + 0o5) + chr(49), 2571 - 2563), nzTpIcepk0o8('\060' + '\157' + chr(589 - 539) + chr(0b110110) + '\x31', 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + '\060' + chr(55), 0b1000), nzTpIcepk0o8(chr(0b11001 + 0o27) + chr(0b1010101 + 0o32) + chr(559 - 510) + chr(0b110111) + chr(1141 - 1093), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\062' + chr(53), ord("\x08")), nzTpIcepk0o8('\x30' + '\157' + '\063' + '\x35' + chr(54), 25795 - 25787), nzTpIcepk0o8(chr(48) + chr(0b110111 + 0o70) + '\x31' + chr(53) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5837 - 5726) + chr(0b110011) + chr(0b101011 + 0o13) + '\067', 0b1000), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(111) + chr(0b101001 + 0o12) + chr(0b110010) + chr(777 - 728), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + '\064' + '\065', 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(118 - 69) + chr(303 - 252) + chr(53), 41237 - 41229), nzTpIcepk0o8(chr(48) + chr(2368 - 2257) + chr(885 - 835) + chr(0b11100 + 0o26) + '\066', ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(8661 - 8550) + chr(0b110001) + chr(53) + chr(54), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(0b1100 + 0o47) + chr(0b110000) + chr(1383 - 1328), 8), nzTpIcepk0o8('\x30' + chr(111) + chr(55) + '\063', 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(1475 - 1424) + chr(0b110110), 8091 - 8083), nzTpIcepk0o8(chr(48) + chr(0b110000 + 0o77) + chr(2286 - 2235) + chr(0b110010 + 0o1) + '\065', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + '\061' + '\061', ord("\x08")), nzTpIcepk0o8(chr(1556 - 1508) + chr(0b1101011 + 0o4) + chr(0b110110) + chr(49), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101100 + 0o10) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b100011 + 0o15) + chr(0b1101111) + chr(219 - 166) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b101000 + 0o13) + '\065' + chr(1533 - 1481), 56463 - 56455), nzTpIcepk0o8(chr(0b10100 + 0o34) + '\157' + chr(0b110011) + '\063' + '\x32', 330 - 322), nzTpIcepk0o8('\x30' + chr(11441 - 11330) + chr(0b110011 + 0o0) + chr(50) + chr(0b110110), 58409 - 58401), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b11000 + 0o31) + chr(51) + '\x30', 36566 - 36558), nzTpIcepk0o8(chr(0b11 + 0o55) + chr(0b101 + 0o152) + chr(53) + chr(54), 0b1000), nzTpIcepk0o8('\x30' + '\157' + chr(824 - 774) + chr(0b11100 + 0o32) + chr(0b101101 + 0o12), 0b1000), nzTpIcepk0o8('\x30' + '\157' + '\x33' + chr(0b100111 + 0o13) + '\x32', 26767 - 26759), nzTpIcepk0o8(chr(0b101 + 0o53) + '\x6f' + chr(1205 - 1154) + chr(54) + chr(53), 20923 - 20915), nzTpIcepk0o8(chr(48) + chr(0b1101111 + 0o0) + chr(0b110011) + '\063' + chr(50), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b1011 + 0o45) + chr(5844 - 5733) + chr(0b101110 + 0o7) + chr(0b110000), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'F'), chr(100) + chr(101) + chr(0b1100011) + chr(0b1101111) + chr(100) + '\x65')(chr(0b11101 + 0o130) + '\x74' + chr(0b1100110) + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def u3QdisIqDfCd(hXMPsSrOQzbh, gNPUvMsk9RKn): roI3spqORKae(hXMPsSrOQzbh.features_, roI3spqORKae(ES5oEprVxulp(b' 5\xfdu\xf0\xf4\x08O\xea\x89T\x84'), '\144' + chr(2759 - 2658) + chr(2795 - 2696) + chr(111) + chr(0b1100100) + chr(101))('\165' + chr(10638 - 10522) + '\x66' + chr(45) + chr(56)))(gNPUvMsk9RKn) hXMPsSrOQzbh.E8hpFy_WYebW = ftfygxgFas5X(hXMPsSrOQzbh.features_)
BerkeleyAutomation/perception
perception/features.py
BagOfFeatures.extend
def extend(self, features): """ Add a list of features to the bag. Parameters ---------- feature : :obj:`list` of :obj:`Feature` features to add """ self.features_.extend(features) self.num_features_ = len(self.features_)
python
def extend(self, features): """ Add a list of features to the bag. Parameters ---------- feature : :obj:`list` of :obj:`Feature` features to add """ self.features_.extend(features) self.num_features_ = len(self.features_)
[ "def", "extend", "(", "self", ",", "features", ")", ":", "self", ".", "features_", ".", "extend", "(", "features", ")", "self", ".", "num_features_", "=", "len", "(", "self", ".", "features_", ")" ]
Add a list of features to the bag. Parameters ---------- feature : :obj:`list` of :obj:`Feature` features to add
[ "Add", "a", "list", "of", "features", "to", "the", "bag", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/features.py#L120-L129
train
Adds a list of features to the bag.
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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M3XQk26HKr,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(1002 - 954) + '\x6f' + chr(1877 - 1828) + chr(0b110010) + '\064', 0b1000), nzTpIcepk0o8(chr(0b11100 + 0o24) + chr(1849 - 1738) + chr(0b100101 + 0o15) + '\065' + '\062', ord("\x08")), nzTpIcepk0o8('\060' + chr(6909 - 6798) + chr(0b11001 + 0o32) + '\x32' + '\064', ord("\x08")), nzTpIcepk0o8('\060' + chr(9198 - 9087) + chr(51) + chr(53) + '\063', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(52), ord("\x08")), nzTpIcepk0o8(chr(0b1110 + 0o42) + chr(0b1101111) + '\067', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(11070 - 10959) + chr(96 - 45) + '\066' + chr(2490 - 2437), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\062' + chr(0b110000) + chr(51), 19328 - 19320), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x33' + '\062' + '\064', 8), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b110001) + '\062' + '\x32', 2881 - 2873), nzTpIcepk0o8(chr(48) + chr(0b1001100 + 0o43) + chr(267 - 217) + '\062' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(1287 - 1239) + chr(111) + chr(1934 - 1881) + chr(48), 1088 - 1080), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + chr(0b110110) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\x6f' + chr(0b110111) + '\064', 28164 - 28156), nzTpIcepk0o8('\x30' + '\157' + '\063' + chr(2569 - 2515) + '\062', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101001 + 0o6) + chr(49) + '\066' + chr(55), 10227 - 10219), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(1306 - 1251) + chr(51), 9315 - 9307), nzTpIcepk0o8('\060' + '\157' + chr(0b110001) + '\062' + '\063', 0b1000), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(0b1101111) + chr(52) + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x34' + chr(0b110100), 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(111) + chr(1177 - 1128) + '\064' + chr(0b110010), 27029 - 27021), nzTpIcepk0o8('\x30' + '\157' + chr(50) + '\x35' + '\060', ord("\x08")), nzTpIcepk0o8(chr(0b110000 + 0o0) + chr(111) + chr(50) + '\x33' + '\x32', 0o10), nzTpIcepk0o8(chr(1338 - 1290) + '\x6f' + chr(0b11011 + 0o26) + chr(53) + chr(74 - 23), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(1380 - 1329) + chr(1364 - 1311) + '\061', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + chr(1430 - 1380) + chr(1996 - 1945), 35342 - 35334), nzTpIcepk0o8('\060' + '\x6f' + chr(1904 - 1853) + chr(0b110001) + chr(2673 - 2621), 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(0b101001 + 0o12) + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b100010 + 0o20) + chr(0b111 + 0o53) + '\065', 10492 - 10484), nzTpIcepk0o8('\x30' + chr(939 - 828) + chr(1332 - 1283) + chr(52) + '\x31', 25498 - 25490), nzTpIcepk0o8('\060' + chr(0b1001110 + 0o41) + chr(2462 - 2412) + chr(0b101111 + 0o7) + chr(0b1010 + 0o53), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\x32' + chr(0b110000) + chr(0b110011 + 0o4), ord("\x08")), nzTpIcepk0o8(chr(1301 - 1253) + chr(0b101101 + 0o102) + '\x32' + chr(0b110111), 59241 - 59233), nzTpIcepk0o8(chr(48) + chr(3432 - 3321) + '\x33' + '\x37' + chr(319 - 266), 69 - 61), nzTpIcepk0o8('\060' + '\157' + chr(49) + chr(1340 - 1292) + chr(0b100111 + 0o12), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b110010) + chr(0b110111) + chr(0b101111 + 0o7), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110010) + '\063' + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b1101 + 0o43) + chr(1362 - 1251) + '\x34' + chr(0b100000 + 0o22), ord("\x08")), nzTpIcepk0o8(chr(596 - 548) + chr(111) + chr(0b110010) + '\060' + chr(0b110000), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1111 + 0o140) + '\x32' + chr(0b110000) + chr(55), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(0b1011111 + 0o20) + chr(53) + '\x30', 8)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'z'), chr(0b100000 + 0o104) + chr(101) + chr(3052 - 2953) + chr(111) + chr(2248 - 2148) + chr(101))('\165' + '\x74' + '\146' + chr(0b10110 + 0o27) + '\x38') + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def T_3ModLW_Bbq(hXMPsSrOQzbh, azxuCKSXk6dv): roI3spqORKae(hXMPsSrOQzbh.features_, roI3spqORKae(ES5oEprVxulp(b'\x00\xf5\xe7\xa6kc\xb9\xd4\x8b\x10\xf4Y'), '\x64' + chr(101) + chr(0b1011011 + 0o10) + '\157' + chr(100) + chr(101))('\x75' + '\x74' + chr(0b1001110 + 0o30) + chr(0b10100 + 0o31) + '\x38'))(azxuCKSXk6dv) hXMPsSrOQzbh.E8hpFy_WYebW = ftfygxgFas5X(hXMPsSrOQzbh.features_)
BerkeleyAutomation/perception
perception/features.py
BagOfFeatures.feature
def feature(self, index): """ Returns a feature. Parameters ---------- index : int index of feature in list Returns ------- :obj:`Feature` """ if index < 0 or index >= self.num_features_: raise ValueError('Index %d out of range' %(index)) return self.features_[index]
python
def feature(self, index): """ Returns a feature. Parameters ---------- index : int index of feature in list Returns ------- :obj:`Feature` """ if index < 0 or index >= self.num_features_: raise ValueError('Index %d out of range' %(index)) return self.features_[index]
[ "def", "feature", "(", "self", ",", "index", ")", ":", "if", "index", "<", "0", "or", "index", ">=", "self", ".", "num_features_", ":", "raise", "ValueError", "(", "'Index %d out of range'", "%", "(", "index", ")", ")", "return", "self", ".", "features_", "[", "index", "]" ]
Returns a feature. Parameters ---------- index : int index of feature in list Returns ------- :obj:`Feature`
[ "Returns", "a", "feature", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/features.py#L131-L145
train
Returns a feature in the list at the specified index.
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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YtBZk6k,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(0b101110 + 0o5) + chr(0b110100) + chr(691 - 639), 0b1000), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(0b1101111) + chr(0b1001 + 0o52) + chr(0b1001 + 0o50) + chr(1863 - 1808), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(50) + '\062', 23945 - 23937), nzTpIcepk0o8(chr(558 - 510) + '\157' + chr(0b110001) + '\x33' + chr(53), 0o10), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(111) + chr(561 - 512) + '\x37' + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(0b110010) + chr(0b110101), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5294 - 5183) + chr(51) + chr(316 - 266) + chr(52), 5139 - 5131), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(0b10 + 0o155) + chr(0b110011) + '\064' + '\062', ord("\x08")), nzTpIcepk0o8(chr(361 - 313) + chr(111) + chr(0b110010) + chr(0b1001 + 0o52) + chr(194 - 146), 48601 - 48593), nzTpIcepk0o8(chr(48) + '\157' + '\061' + chr(145 - 96) + '\x34', 0o10), nzTpIcepk0o8(chr(1923 - 1875) + chr(0b1101111) + chr(0b110100) + chr(0b110010), 63476 - 63468), nzTpIcepk0o8(chr(0b110000) + chr(2874 - 2763) + chr(49) + chr(0b101101 + 0o12) + chr(0b111 + 0o52), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b110111 + 0o70) + chr(51) + '\061' + chr(53), 64191 - 64183), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b10000 + 0o42) + '\x33' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101110 + 0o1) + chr(49) + chr(0b11 + 0o64) + '\061', 8), nzTpIcepk0o8(chr(257 - 209) + chr(111) + chr(49) + chr(51) + chr(0b110101), 8), nzTpIcepk0o8(chr(1573 - 1525) + chr(111) + '\062' + chr(0b101100 + 0o10) + chr(2659 - 2605), 10073 - 10065), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + '\064' + '\x30', 28199 - 28191), nzTpIcepk0o8(chr(0b100101 + 0o13) + '\157' + chr(0b1 + 0o62) + '\067' + '\x34', ord("\x08")), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b10110 + 0o34) + '\x35' + '\x32', 0o10), nzTpIcepk0o8(chr(0b101000 + 0o10) + chr(111) + chr(1785 - 1735) + '\063' + chr(0b101001 + 0o7), 8), nzTpIcepk0o8(chr(48) + chr(4486 - 4375) + chr(50) + chr(0b110000) + '\061', 9703 - 9695), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b110001) + chr(54) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(2023 - 1975) + '\157' + chr(0b110 + 0o55) + chr(0b110010), 3409 - 3401), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + chr(50) + chr(0b10101 + 0o42), 58565 - 58557), nzTpIcepk0o8('\060' + '\157' + '\x33' + '\066' + '\060', 54754 - 54746), nzTpIcepk0o8('\x30' + chr(9593 - 9482) + '\x35' + chr(52), 65168 - 65160), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110001) + chr(871 - 820) + chr(0b110000), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(2024 - 1975) + '\x35' + '\x30', 0b1000), nzTpIcepk0o8(chr(0b100001 + 0o17) + '\157' + chr(1442 - 1391) + chr(0b100001 + 0o23) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b11101 + 0o122) + '\x31' + chr(0b1000 + 0o56) + chr(0b100000 + 0o21), 20353 - 20345), nzTpIcepk0o8(chr(381 - 333) + chr(111) + chr(51) + chr(52) + '\067', 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + chr(2300 - 2189) + '\x33' + chr(0b110101) + chr(2569 - 2517), ord("\x08")), nzTpIcepk0o8(chr(1476 - 1428) + chr(0b100001 + 0o116) + chr(1375 - 1324) + '\x30' + chr(0b10111 + 0o37), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(51) + chr(0b11101 + 0o26) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b100 + 0o56) + chr(51) + chr(440 - 391), 24396 - 24388), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b110011) + chr(0b100101 + 0o15) + '\060', 0o10), nzTpIcepk0o8('\060' + '\157' + '\x31' + '\x34' + chr(0b101011 + 0o12), 0b1000), nzTpIcepk0o8('\060' + chr(111) + chr(0b11101 + 0o24) + chr(51) + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b0 + 0o60) + '\157' + chr(0b101100 + 0o6) + chr(1915 - 1867) + chr(0b11101 + 0o25), 62810 - 62802)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110101) + '\x30', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xca'), chr(5784 - 5684) + chr(101) + chr(99) + chr(111) + chr(0b110001 + 0o63) + chr(0b1100101))(chr(0b1110101) + chr(10800 - 10684) + '\146' + chr(0b101101) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def gNPUvMsk9RKn(hXMPsSrOQzbh, ZpfN5tSLaZze): if ZpfN5tSLaZze < nzTpIcepk0o8('\060' + chr(9939 - 9828) + chr(1100 - 1052), 0o10) or ZpfN5tSLaZze >= roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xa1\xf7z-8\xec\x8b\xb5\xc1)@.'), chr(9314 - 9214) + chr(101) + '\143' + chr(0b100110 + 0o111) + chr(0b11101 + 0o107) + chr(4436 - 4335))(chr(1656 - 1539) + chr(0b1110100) + chr(0b1100110) + chr(0b11 + 0o52) + '\x38')): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xad\xa1v8\x06\xb5\xf1\x86\xb8#W\r\xed\xf0\x1f}\xd4\x01\x92\xcd\xfd'), '\144' + chr(5055 - 4954) + chr(0b101100 + 0o67) + '\157' + chr(0b1100100) + chr(10124 - 10023))(chr(117) + chr(116) + chr(102) + '\055' + '\070') % ZpfN5tSLaZze) return roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x82\xaas)\x0b\xe7\xb1\x91\xc7'), '\x64' + chr(101) + '\x63' + '\157' + chr(100) + chr(0b1100101))('\x75' + chr(0b111011 + 0o71) + '\x66' + chr(45) + '\070'))[ZpfN5tSLaZze]
BerkeleyAutomation/perception
perception/features.py
BagOfFeatures.feature_subset
def feature_subset(self, indices): """ Returns some subset of the features. Parameters ---------- indices : :obj:`list` of :obj:`int` indices of the features in the list Returns ------- :obj:`list` of :obj:`Feature` """ if isinstance(indices, np.ndarray): indices = indices.tolist() if not isinstance(indices, list): raise ValueError('Can only index with lists') return [self.features_[i] for i in indices]
python
def feature_subset(self, indices): """ Returns some subset of the features. Parameters ---------- indices : :obj:`list` of :obj:`int` indices of the features in the list Returns ------- :obj:`list` of :obj:`Feature` """ if isinstance(indices, np.ndarray): indices = indices.tolist() if not isinstance(indices, list): raise ValueError('Can only index with lists') return [self.features_[i] for i in indices]
[ "def", "feature_subset", "(", "self", ",", "indices", ")", ":", "if", "isinstance", "(", "indices", ",", "np", ".", "ndarray", ")", ":", "indices", "=", "indices", ".", "tolist", "(", ")", "if", "not", "isinstance", "(", "indices", ",", "list", ")", ":", "raise", "ValueError", "(", "'Can only index with lists'", ")", "return", "[", "self", ".", "features_", "[", "i", "]", "for", "i", "in", "indices", "]" ]
Returns some subset of the features. Parameters ---------- indices : :obj:`list` of :obj:`int` indices of the features in the list Returns ------- :obj:`list` of :obj:`Feature`
[ "Returns", "some", "subset", "of", "the", "features", ".", "Parameters", "----------", "indices", ":", ":", "obj", ":", "list", "of", ":", "obj", ":", "int", "indices", "of", "the", "features", "in", "the", "list" ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/features.py#L147-L163
train
Returns some subset of the features.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2,UtiWT6f6p9yZ,sY2ClS3bs_Vs,cXy7eDEmqBLX,WBIJpxagI_Bm,oiYQtqKByLVy,pKtZbyLPTF7M,N5KuUvtbiyqB,Y8CO_HpFZe1H,lFpHwHL3xiEO,QT_5wdIFQ3WX,gn988v5t9NEf,dVZxwLTOCtbO,RjQP07DYIdkf,Wun5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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) + '\063' + chr(0b0 + 0o66) + '\064', 48775 - 48767), nzTpIcepk0o8(chr(1038 - 990) + '\157' + '\x37' + chr(0b110001), 0o10), nzTpIcepk0o8(chr(48) + chr(6746 - 6635) + chr(0b101100 + 0o6) + '\064' + '\067', ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + '\x31' + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(356 - 307) + chr(54) + chr(1381 - 1333), ord("\x08")), nzTpIcepk0o8('\060' + chr(111) + chr(0b110010) + chr(2080 - 2028) + chr(0b110100), 54437 - 54429), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(111) + chr(1848 - 1798) + chr(0b110111) + chr(0b110010 + 0o0), 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(51) + chr(0b110110) + chr(0b1101 + 0o52), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1100110 + 0o11) + '\x34' + '\x30', 0o10), nzTpIcepk0o8('\x30' + chr(9427 - 9316) + chr(51) + '\064', 0o10), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(0b1101111) + '\x32' + chr(54) + '\061', 56898 - 56890), nzTpIcepk0o8('\060' + chr(111) + chr(0b100110 + 0o13) + '\x30' + chr(2664 - 2609), 28000 - 27992), nzTpIcepk0o8(chr(48) + chr(111) + '\066', ord("\x08")), nzTpIcepk0o8(chr(48) + '\157' + chr(0b100000 + 0o22) + '\064' + '\062', 0o10), nzTpIcepk0o8('\060' + '\x6f' + chr(49) + '\x30' + chr(0b100011 + 0o24), 8), nzTpIcepk0o8(chr(0b110000) + '\157' + chr(0b11100 + 0o27) + '\x32', ord("\x08")), nzTpIcepk0o8('\x30' + chr(3851 - 3740) + chr(1233 - 1184) + '\x36' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b101110 + 0o2) + '\157' + '\x37' + chr(1359 - 1308), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(2202 - 2153) + chr(0b110110), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x34', 0o10), nzTpIcepk0o8(chr(48) + '\157' + '\063' + chr(261 - 206) + chr(51), 0b1000), nzTpIcepk0o8(chr(1359 - 1311) + chr(111) + chr(1781 - 1732) + chr(0b110001) + '\066', 43375 - 43367), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + chr(0b101111 + 0o10) + chr(0b1011 + 0o46), 43637 - 43629), nzTpIcepk0o8(chr(48) + chr(0b1101111) + '\061' + '\060' + '\x32', 837 - 829), nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(111) + '\x32' + chr(50) + '\x36', 34824 - 34816), nzTpIcepk0o8(chr(0b110000) + chr(7624 - 7513) + chr(51) + chr(0b110001), ord("\x08")), nzTpIcepk0o8(chr(2143 - 2095) + '\x6f' + chr(369 - 320) + chr(2405 - 2355) + chr(0b110101), 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b100001 + 0o21) + chr(52) + '\067', 8), nzTpIcepk0o8(chr(0b11101 + 0o23) + chr(7065 - 6954) + '\063' + chr(0b100100 + 0o16) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b1101 + 0o52) + chr(49), 8), nzTpIcepk0o8(chr(0b10 + 0o56) + '\x6f' + '\061' + '\x33' + chr(1546 - 1494), 61696 - 61688), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(413 - 364) + chr(0b10010 + 0o41), 46381 - 46373), nzTpIcepk0o8(chr(725 - 677) + chr(9117 - 9006) + chr(1029 - 980) + chr(2551 - 2499), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\062' + chr(53) + chr(49), ord("\x08")), nzTpIcepk0o8('\060' + chr(6867 - 6756) + chr(1515 - 1466) + chr(0b110100) + chr(1886 - 1838), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(0b110101) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(111) + chr(0b110011) + '\067' + chr(149 - 101), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(1698 - 1647) + chr(50), 8), nzTpIcepk0o8(chr(1434 - 1386) + chr(0b1011000 + 0o27) + '\x33' + chr(0b101000 + 0o15) + '\x36', 0o10), nzTpIcepk0o8('\060' + chr(8515 - 8404) + '\x32', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + chr(0b110100 + 0o73) + chr(0b110101) + chr(48), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xda'), chr(0b1100100) + '\145' + chr(0b1100011) + chr(11816 - 11705) + chr(0b1000 + 0o134) + chr(0b1010101 + 0o20))(chr(0b1110101) + chr(116) + '\x66' + chr(0b101101 + 0o0) + chr(0b111000)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def fUr4FWAxRJim(hXMPsSrOQzbh, eQBPfEuGz7C1): if suIjIS24Zkqw(eQBPfEuGz7C1, roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\x9a]\xc6y\x02\xc5\xc3'), '\144' + chr(3544 - 3443) + chr(532 - 433) + '\x6f' + chr(0b1100100) + chr(0b1100101))('\x75' + chr(116) + chr(2801 - 2699) + chr(773 - 728) + chr(56)))): eQBPfEuGz7C1 = eQBPfEuGz7C1.tolist() if not suIjIS24Zkqw(eQBPfEuGz7C1, H4NoA26ON7iG): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b"\xb7X\xc9+\x1f\xca\xd6\x8e\x00u\xdf#c\xdagm\x1eOf$\x97'\x8a6\xe5"), '\144' + '\x65' + chr(99) + '\157' + chr(100) + chr(0b10001 + 0o124))(chr(117) + chr(116) + '\146' + '\x2d' + chr(2602 - 2546))) return [roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\x92\\\xc6\x7f\x05\xd6\xdf\x84\x7f'), '\144' + chr(0b1010101 + 0o20) + '\x63' + '\157' + '\144' + chr(5125 - 5024))('\165' + '\164' + chr(0b100101 + 0o101) + chr(0b1101 + 0o40) + '\070'))[ZlbFMSG8gCoF] for ZlbFMSG8gCoF in eQBPfEuGz7C1]
BerkeleyAutomation/perception
perception/weight_sensor.py
WeightSensor.start
def start(self): """Start the sensor. """ if rospy.get_name() == '/unnamed': raise ValueError('Weight sensor must be run inside a ros node!') self._weight_subscriber = rospy.Subscriber('weight_sensor/weights', Float32MultiArray, self._weights_callback) self._running = True
python
def start(self): """Start the sensor. """ if rospy.get_name() == '/unnamed': raise ValueError('Weight sensor must be run inside a ros node!') self._weight_subscriber = rospy.Subscriber('weight_sensor/weights', Float32MultiArray, self._weights_callback) self._running = True
[ "def", "start", "(", "self", ")", ":", "if", "rospy", ".", "get_name", "(", ")", "==", "'/unnamed'", ":", "raise", "ValueError", "(", "'Weight sensor must be run inside a ros node!'", ")", "self", ".", "_weight_subscriber", "=", "rospy", ".", "Subscriber", "(", "'weight_sensor/weights'", ",", "Float32MultiArray", ",", "self", ".", "_weights_callback", ")", "self", ".", "_running", "=", "True" ]
Start the sensor.
[ "Start", "the", "sensor", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/weight_sensor.py#L35-L41
train
Start the sensor.
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,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IiZ,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(0b110011) + chr(1108 - 1053) + chr(1964 - 1912), ord("\x08")), nzTpIcepk0o8('\x30' + chr(9535 - 9424) + '\x33' + chr(670 - 615) + chr(0b10101 + 0o37), 8), nzTpIcepk0o8(chr(225 - 177) + chr(10472 - 10361) + '\x31' + chr(1520 - 1466) + chr(48), ord("\x08")), nzTpIcepk0o8(chr(1973 - 1925) + chr(7436 - 7325) + chr(1095 - 1044) + chr(49) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\157' + '\062' + chr(2561 - 2509) + chr(53), ord("\x08")), nzTpIcepk0o8(chr(0b11010 + 0o26) + '\x6f' + chr(0b110010) + chr(53) + '\065', 59357 - 59349), nzTpIcepk0o8(chr(48) + chr(111) + chr(0b11100 + 0o27) + chr(54) + '\062', 55008 - 55000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + chr(0b11111 + 0o21) + '\062', 3611 - 3603), nzTpIcepk0o8('\060' + chr(0b100001 + 0o116) + chr(49) + '\066' + chr(54), 41420 - 41412), nzTpIcepk0o8('\x30' + '\x6f' + chr(48), 397 - 389), nzTpIcepk0o8(chr(360 - 312) + '\x6f' + '\062' + chr(847 - 794) + '\x30', 0o10), nzTpIcepk0o8(chr(48) + chr(0b1001011 + 0o44) + chr(1418 - 1368) + chr(1811 - 1757) + chr(0b100010 + 0o25), 44945 - 44937), nzTpIcepk0o8(chr(48) + '\157' + '\063' + '\067' + chr(0b10001 + 0o43), 8), nzTpIcepk0o8(chr(48) + chr(0b110101 + 0o72) + chr(0b1111 + 0o50) + '\x35', 0o10), nzTpIcepk0o8(chr(1922 - 1874) + chr(0b1101111) + chr(0b101 + 0o62) + chr(0b101100 + 0o11), 8), nzTpIcepk0o8(chr(48) + chr(2439 - 2328) + chr(0b110010) + chr(55), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b11101 + 0o32) + chr(0b110011), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110010) + chr(49) + '\061', 0b1000), nzTpIcepk0o8(chr(0b101000 + 0o10) + '\157' + chr(50) + chr(0b110101) + chr(103 - 48), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(528 - 417) + chr(495 - 445) + chr(442 - 392), 0o10), nzTpIcepk0o8(chr(48) + chr(5363 - 5252) + chr(805 - 754) + '\065' + chr(51), 0b1000), nzTpIcepk0o8(chr(1579 - 1531) + chr(111) + '\062' + chr(0b101011 + 0o5) + chr(49), 0o10), nzTpIcepk0o8(chr(2157 - 2109) + chr(0b1101111) + chr(733 - 682) + chr(55) + chr(53), 53211 - 53203), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110010) + chr(53), 0b1000), nzTpIcepk0o8(chr(829 - 781) + chr(6360 - 6249) + '\063', 0b1000), nzTpIcepk0o8(chr(48) + chr(0b1101111 + 0o0) + '\x32' + chr(0b110001) + chr(0b11101 + 0o26), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(9332 - 9221) + chr(51) + '\x33' + '\067', ord("\x08")), nzTpIcepk0o8(chr(0b1 + 0o57) + chr(11281 - 11170) + '\x34' + '\064', 0o10), nzTpIcepk0o8(chr(0b111 + 0o51) + '\157' + chr(0b110011) + chr(0b110101) + '\x36', 0b1000), nzTpIcepk0o8(chr(1699 - 1651) + chr(0b1101111) + chr(0b11101 + 0o24) + chr(1962 - 1909) + chr(51), 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\x37' + chr(0b100101 + 0o20), ord("\x08")), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b110011) + chr(0b10100 + 0o40) + chr(0b101101 + 0o7), 61106 - 61098), nzTpIcepk0o8(chr(1049 - 1001) + chr(0b1101111) + chr(1625 - 1574) + chr(50) + chr(0b110000), 36715 - 36707), nzTpIcepk0o8('\x30' + chr(1830 - 1719) + '\062' + '\x35' + chr(48), 8), nzTpIcepk0o8('\x30' + '\x6f' + '\061' + chr(838 - 789) + '\x31', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\061' + chr(1762 - 1711) + chr(1889 - 1837), 0b1000), nzTpIcepk0o8('\060' + chr(9699 - 9588) + chr(0b11101 + 0o26) + '\x34' + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b10011 + 0o35) + '\x6f' + '\062' + '\x32' + chr(0b110100), 0b1000), nzTpIcepk0o8('\060' + chr(3350 - 3239) + '\062' + chr(0b1110 + 0o42) + chr(0b110010), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + '\063' + chr(948 - 893), 0o10)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b101010 + 0o6) + chr(0b1101111) + chr(0b110101) + chr(0b100111 + 0o11), ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\xd2'), chr(0b1100100) + chr(0b10010 + 0o123) + '\x63' + chr(3970 - 3859) + chr(100) + chr(3652 - 3551))(chr(117) + chr(0b111001 + 0o73) + chr(102) + chr(0b101101) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def KQbHFTcl_LKy(hXMPsSrOQzbh): if roI3spqORKae(yFQYWmsCnVBN, roI3spqORKae(ES5oEprVxulp(b'\xbe\xb6\x1f\x82\xf4\xdc\xb6\xf3\x02_\xdf\xcf'), chr(0b1100100) + chr(0b110110 + 0o57) + chr(0b10111 + 0o114) + chr(0b100100 + 0o113) + chr(0b101100 + 0o70) + '\x65')(chr(0b1110101) + '\x74' + chr(102) + '\x2d' + '\x38'))() == roI3spqORKae(ES5oEprVxulp(b'\xd3\x89\x1e\xa6\xc4\xc0\x97\xa6'), chr(100) + chr(101) + chr(0b110000 + 0o63) + chr(111) + chr(0b1100100) + chr(7923 - 7822))('\x75' + chr(116) + chr(0b11001 + 0o115) + '\x2d' + chr(0b111000)): raise WbNHlDKpyPtQ(roI3spqORKae(ES5oEprVxulp(b'\xab\x99\x19\xaf\xcd\xd9\xd2\xb1\x13n\xdb\xd8\x8e\x1dPbH\xfd\x8fp\x8e\xa1\x8f`m\xab\xb6J\x9d\x02\x19\x81\xf0\xc9i.\x8d\xe7\xa2\xf1\x93\x98\x15\xe9'), chr(5120 - 5020) + '\x65' + chr(0b101110 + 0o65) + chr(111) + chr(0b1000001 + 0o43) + '\x65')('\x75' + '\164' + chr(0b1100110) + chr(1268 - 1223) + chr(0b100010 + 0o26))) hXMPsSrOQzbh._EKRibuFlQlv = yFQYWmsCnVBN.Subscriber(roI3spqORKae(ES5oEprVxulp(b'\x8b\x99\x19\xaf\xcd\xd9\xad\xb1\x13n\xdb\xd8\x8e\x12JrR\xee\xc7f\x98'), chr(0b1011010 + 0o12) + chr(0b1100101) + '\143' + chr(111) + '\144' + chr(0b1100101))('\165' + chr(4980 - 4864) + chr(0b1100110) + chr(2011 - 1966) + '\070'), LhcwkPFzEgb4, hXMPsSrOQzbh._weights_callback) hXMPsSrOQzbh.IF4G0B37piRc = nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(1248 - 1199), 0o10)
BerkeleyAutomation/perception
perception/weight_sensor.py
WeightSensor.stop
def stop(self): """Stop the sensor. """ if not self._running: return self._weight_subscriber.unregister() self._running = False
python
def stop(self): """Stop the sensor. """ if not self._running: return self._weight_subscriber.unregister() self._running = False
[ "def", "stop", "(", "self", ")", ":", "if", "not", "self", ".", "_running", ":", "return", "self", ".", "_weight_subscriber", ".", "unregister", "(", ")", "self", ".", "_running", "=", "False" ]
Stop the sensor.
[ "Stop", "the", "sensor", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/weight_sensor.py#L44-L50
train
Stop the sensor.
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_,ze1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EWCNF,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(0b1 + 0o57) + chr(0b1101111) + '\066' + chr(51), 0o10), nzTpIcepk0o8(chr(0b101011 + 0o5) + '\157' + '\066' + '\061', 0b1000), nzTpIcepk0o8('\x30' + '\x6f' + '\064' + '\066', 0b1000), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + chr(0b110 + 0o52) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(1366 - 1318) + chr(0b1101111) + chr(446 - 397) + chr(1084 - 1033) + '\x33', 0o10), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b1011 + 0o47) + chr(0b11000 + 0o37) + '\x32', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110001) + '\x32' + chr(51), 0o10), nzTpIcepk0o8(chr(983 - 935) + chr(111) + chr(1099 - 1044) + chr(0b10011 + 0o44), 16695 - 16687), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + chr(0b11001 + 0o32), 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(2278 - 2227) + chr(0b110011) + chr(0b110111), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(49) + '\063' + chr(0b10110 + 0o34), 0o10), nzTpIcepk0o8(chr(0b1100 + 0o44) + chr(11993 - 11882) + '\x31' + chr(0b110101) + chr(0b110110), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(50) + '\x35' + chr(48), ord("\x08")), nzTpIcepk0o8(chr(48) + '\x6f' + chr(2097 - 2042) + chr(0b110110), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\063' + '\060' + '\x37', ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b10010 + 0o43) + chr(266 - 212), 0o10), nzTpIcepk0o8(chr(48) + chr(0b11101 + 0o122) + chr(0b110011) + chr(0b10011 + 0o43) + chr(0b110100), 7205 - 7197), nzTpIcepk0o8(chr(0b10111 + 0o31) + chr(1136 - 1025) + '\064' + '\x37', 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(1399 - 1348) + chr(51), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(0b100110 + 0o14) + '\x30' + chr(0b110011), 56334 - 56326), nzTpIcepk0o8('\x30' + chr(0b1001101 + 0o42) + chr(51) + '\x37' + chr(0b110 + 0o56), 0o10), nzTpIcepk0o8('\x30' + chr(0b1101111) + '\x33' + chr(1155 - 1107) + chr(50), 0b1000), nzTpIcepk0o8(chr(1047 - 999) + '\x6f' + chr(49) + chr(0b101010 + 0o11) + chr(0b10000 + 0o47), 40248 - 40240), nzTpIcepk0o8(chr(362 - 314) + '\157' + chr(1487 - 1436) + chr(1710 - 1661) + chr(67 - 16), 0o10), nzTpIcepk0o8(chr(48) + chr(0b1111 + 0o140) + chr(2466 - 2416) + chr(0b110001), 58645 - 58637), nzTpIcepk0o8(chr(454 - 406) + '\x6f' + chr(0b100011 + 0o20) + '\x35' + '\061', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\063' + '\065' + '\064', 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(0b110111 + 0o70) + chr(0b10110 + 0o41) + chr(0b11000 + 0o36), 8), nzTpIcepk0o8('\060' + '\157' + chr(0b110111) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(1414 - 1303) + chr(49) + chr(215 - 163) + chr(0b110001), 0b1000), nzTpIcepk0o8(chr(0b110000) + '\157' + '\062' + '\066', 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + '\061' + chr(616 - 567), 0o10), nzTpIcepk0o8(chr(0b11000 + 0o30) + chr(0b1101111) + chr(0b110011) + chr(0b110011) + chr(1383 - 1330), 0o10), nzTpIcepk0o8(chr(0b100100 + 0o14) + '\x6f' + chr(51) + '\x37' + chr(51), 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(54) + chr(50), 46032 - 46024), nzTpIcepk0o8(chr(0b110000) + chr(0b1100101 + 0o12) + chr(2183 - 2134) + chr(0b110000) + '\x36', 33735 - 33727), nzTpIcepk0o8('\060' + chr(5852 - 5741) + chr(0b110001) + chr(1182 - 1134) + chr(0b110100), 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(51) + chr(55) + '\062', 0o10), nzTpIcepk0o8(chr(1069 - 1021) + chr(4023 - 3912) + '\x33' + chr(243 - 194) + chr(0b110011), 8), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(49) + chr(0b11010 + 0o26) + '\x32', 0b1000)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(48) + chr(111) + '\x35' + chr(0b101100 + 0o4), 0b1000)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x1d'), chr(0b1100100) + chr(101) + '\143' + '\157' + chr(100) + '\x65')('\x75' + '\164' + chr(0b1100110) + chr(0b1110 + 0o37) + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def dYJbBiYO_nGE(hXMPsSrOQzbh): if not roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'zw\x12\xc1k\xf8`\x08c\xb6\x08\r'), '\144' + chr(1303 - 1202) + '\x63' + chr(0b1101111) + chr(0b1100100) + chr(101))(chr(117) + chr(9189 - 9073) + '\x66' + chr(0b1101 + 0o40) + chr(2005 - 1949))): return roI3spqORKae(hXMPsSrOQzbh._weight_subscriber, roI3spqORKae(ES5oEprVxulp(b'F_T\xe3<\xd3 Kv\xad'), chr(100) + chr(9380 - 9279) + chr(99) + '\x6f' + chr(0b1 + 0o143) + chr(5775 - 5674))(chr(13337 - 13220) + '\164' + '\x66' + chr(0b100110 + 0o7) + chr(0b111000)))() hXMPsSrOQzbh.IF4G0B37piRc = nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(0b110000), 55061 - 55053)
BerkeleyAutomation/perception
perception/weight_sensor.py
WeightSensor.total_weight
def total_weight(self): """Read a weight from the sensor in grams. Returns ------- weight : float The sensor weight in grams. """ weights = self._raw_weights() if weights.shape[1] == 0: return 0.0 elif weights.shape[1] < self._ntaps: return np.sum(np.mean(weights, axis=1)) else: return self._filter_coeffs.dot(np.sum(weights, axis=0))
python
def total_weight(self): """Read a weight from the sensor in grams. Returns ------- weight : float The sensor weight in grams. """ weights = self._raw_weights() if weights.shape[1] == 0: return 0.0 elif weights.shape[1] < self._ntaps: return np.sum(np.mean(weights, axis=1)) else: return self._filter_coeffs.dot(np.sum(weights, axis=0))
[ "def", "total_weight", "(", "self", ")", ":", "weights", "=", "self", ".", "_raw_weights", "(", ")", "if", "weights", ".", "shape", "[", "1", "]", "==", "0", ":", "return", "0.0", "elif", "weights", ".", "shape", "[", "1", "]", "<", "self", ".", "_ntaps", ":", "return", "np", ".", "sum", "(", "np", ".", "mean", "(", "weights", ",", "axis", "=", "1", ")", ")", "else", ":", "return", "self", ".", "_filter_coeffs", ".", "dot", "(", "np", ".", "sum", "(", "weights", ",", "axis", "=", "0", ")", ")" ]
Read a weight from the sensor in grams. Returns ------- weight : float The sensor weight in grams.
[ "Read", "a", "weight", "from", "the", "sensor", "in", "grams", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03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xPEZPhm,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(111) + chr(0b100 + 0o60) + chr(0b110100 + 0o1), 16530 - 16522), nzTpIcepk0o8(chr(48) + chr(111) + '\063' + chr(143 - 90) + chr(592 - 539), 60038 - 60030), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + chr(1765 - 1715) + chr(0b101111 + 0o10) + '\x35', 0o10), nzTpIcepk0o8(chr(1360 - 1312) + chr(0b1101110 + 0o1) + chr(0b110001) + '\065' + '\x37', ord("\x08")), nzTpIcepk0o8(chr(0b1000 + 0o50) + '\x6f' + '\061' + chr(0b110100) + chr(0b1011 + 0o50), 6549 - 6541), nzTpIcepk0o8(chr(0b110000) + chr(1721 - 1610) + '\x31' + chr(0b110000) + chr(2097 - 2045), 37977 - 37969), nzTpIcepk0o8('\x30' + '\x6f' + chr(0b110001) + chr(0b10100 + 0o34) + chr(0b110100), 8), nzTpIcepk0o8(chr(2219 - 2171) + chr(0b1101111) + chr(978 - 928) + chr(48) + chr(0b110001), 0o10), nzTpIcepk0o8(chr(364 - 316) + chr(111) + chr(0b110 + 0o54) + chr(0b110110) + '\x37', 0b1000), nzTpIcepk0o8(chr(0b100 + 0o54) + chr(111) + '\x32' + chr(2582 - 2531) + '\x32', 34868 - 34860), nzTpIcepk0o8('\060' + chr(111) + chr(1671 - 1621) + chr(0b110111) + chr(0b11110 + 0o26), 0b1000), nzTpIcepk0o8(chr(1447 - 1399) + chr(111) + '\062' + chr(0b110010) + '\x37', ord("\x08")), nzTpIcepk0o8(chr(2070 - 2022) + '\157' + chr(49) + chr(0b110000) + '\066', 0b1000), nzTpIcepk0o8('\x30' + chr(111) + chr(0b101111 + 0o2) + chr(215 - 161) + '\x34', 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\061' + chr(65 - 14) + chr(0b100111 + 0o15), 0b1000), nzTpIcepk0o8(chr(0b110000) + chr(7666 - 7555) + '\x31' + '\x32' + chr(54), ord("\x08")), nzTpIcepk0o8(chr(0b101101 + 0o3) + chr(0b1100111 + 0o10) + '\x32' + chr(0b1000 + 0o50) + chr(52), 11386 - 11378), nzTpIcepk0o8('\x30' + chr(0b1101000 + 0o7) + chr(51) + chr(0b11101 + 0o32) + chr(53), 0o10), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x31' + chr(318 - 268) + chr(0b101010 + 0o11), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(5596 - 5485) + chr(51) + chr(2075 - 2023) + chr(0b11 + 0o61), 39829 - 39821), nzTpIcepk0o8(chr(0b10011 + 0o35) + chr(111) + chr(0b100011 + 0o20) + chr(52) + chr(0b1100 + 0o50), 8), nzTpIcepk0o8(chr(2250 - 2202) + chr(9357 - 9246) + '\063' + chr(1139 - 1085) + chr(54), 0b1000), nzTpIcepk0o8('\060' + '\x6f' + chr(0b110001) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\064' + chr(1680 - 1632), ord("\x08")), nzTpIcepk0o8(chr(0b100000 + 0o20) + chr(0b1101111) + chr(0b1000 + 0o57) + chr(48), 0b1000), nzTpIcepk0o8('\x30' + chr(0b1101111) + chr(0b101010 + 0o10) + '\x36' + '\x33', 0o10), nzTpIcepk0o8('\x30' + chr(860 - 749) + chr(52) + chr(1871 - 1819), 57624 - 57616), nzTpIcepk0o8(chr(0b1001 + 0o47) + chr(0b111 + 0o150) + chr(0b1010 + 0o50) + chr(51) + chr(0b110000), ord("\x08")), nzTpIcepk0o8(chr(0b101 + 0o53) + chr(12048 - 11937) + chr(1898 - 1849) + chr(51) + chr(0b1010 + 0o54), 0o10), nzTpIcepk0o8('\060' + chr(3596 - 3485) + chr(51) + chr(0b110001) + chr(0b110100), 56159 - 56151), nzTpIcepk0o8(chr(48) + '\157' + chr(1858 - 1808) + chr(2066 - 2014) + '\066', 39163 - 39155), nzTpIcepk0o8('\060' + chr(0b1101111) + '\x33' + '\x36' + chr(914 - 864), 52906 - 52898), nzTpIcepk0o8('\060' + '\157' + chr(0b110010 + 0o1) + chr(0b110100) + chr(0b110110), ord("\x08")), nzTpIcepk0o8('\x30' + '\x6f' + chr(1903 - 1853) + chr(0b101010 + 0o6) + chr(0b10 + 0o64), ord("\x08")), nzTpIcepk0o8('\060' + '\x6f' + '\063' + chr(0b110101) + chr(52), 30119 - 30111), nzTpIcepk0o8('\x30' + chr(111) + '\x33' + chr(0b110000) + chr(50), 0b1000), nzTpIcepk0o8('\060' + chr(11867 - 11756) + chr(0b110011) + chr(0b110011) + chr(54), 0o10), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + chr(50) + '\x36', 0o10), nzTpIcepk0o8(chr(0b110000) + chr(0b1100011 + 0o14) + chr(356 - 306) + '\061' + chr(1604 - 1556), 27374 - 27366), nzTpIcepk0o8(chr(0b110000) + chr(111) + chr(51) + '\060' + chr(0b100110 + 0o15), 48745 - 48737)][ZlbFMSG8gCoF % nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(0b110101) + '\060', ord("\x08"))] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x0b'), chr(100) + chr(0b1100101) + chr(2471 - 2372) + chr(0b101111 + 0o100) + chr(0b1100100) + chr(0b1100101))(chr(0b1110101) + chr(0b1110100) + chr(0b1100 + 0o132) + '\x2d' + chr(56)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def LlvZp04c0qqh(hXMPsSrOQzbh): TtzqJLqe_ecy = hXMPsSrOQzbh._raw_weights() if roI3spqORKae(TtzqJLqe_ecy, roI3spqORKae(ES5oEprVxulp(b'I\x85\xdf"S}v\xc0\xf1\xcd\x84\xf1'), chr(5892 - 5792) + '\x65' + chr(99) + '\x6f' + chr(0b1100100) + '\145')(chr(362 - 245) + '\164' + chr(8910 - 8808) + '\055' + '\070'))[nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31', 0b1000)] == nzTpIcepk0o8('\060' + '\157' + chr(0b110000), 0o10): return 0.0 elif roI3spqORKae(TtzqJLqe_ecy, roI3spqORKae(ES5oEprVxulp(b'I\x85\xdf"S}v\xc0\xf1\xcd\x84\xf1'), '\144' + chr(1440 - 1339) + chr(253 - 154) + '\157' + chr(0b101100 + 0o70) + chr(0b1100101))('\165' + chr(116) + chr(4438 - 4336) + chr(45) + '\070'))[nzTpIcepk0o8(chr(0b110000) + chr(111) + '\x31', 8)] < roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'z\x83\xc9\x0e\x137'), chr(0b1100100) + chr(0b110110 + 0o57) + chr(1361 - 1262) + chr(0b1101111) + chr(0b1100100) + chr(6513 - 6412))(chr(0b1110000 + 0o5) + chr(0b1110100) + '\146' + chr(0b11100 + 0o21) + '\070')): return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'J\x8e\xd1,[\x00\x08\xeb\xf6\xc5\xd0\xc1'), chr(100) + chr(5251 - 5150) + chr(0b1100011) + chr(5552 - 5441) + '\144' + '\x65')(chr(117) + chr(0b1110100) + chr(9335 - 9233) + '\055' + '\070'))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'o\xa8\x8c\t\x110<\xc4\xf4\xef\x8f\xef'), chr(0b1100100) + '\x65' + '\x63' + '\x6f' + chr(0b1100010 + 0o2) + '\x65')('\x75' + '\164' + '\x66' + chr(0b10111 + 0o26) + '\x38'))(TtzqJLqe_ecy, axis=nzTpIcepk0o8(chr(48) + '\x6f' + chr(1968 - 1919), 8))) else: return roI3spqORKae(hXMPsSrOQzbh._filter_coeffs, roI3spqORKae(ES5oEprVxulp(b'A\x82\xc9'), chr(100) + chr(0b0 + 0o145) + chr(1902 - 1803) + '\157' + chr(100) + chr(0b1001000 + 0o35))(chr(0b11011 + 0o132) + chr(0b111100 + 0o70) + chr(2296 - 2194) + '\x2d' + chr(56)))(roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'J\x8e\xd1,[\x00\x08\xeb\xf6\xc5\xd0\xc1'), chr(3387 - 3287) + chr(101) + chr(99) + chr(0b1011110 + 0o21) + chr(6166 - 6066) + '\145')(chr(0b11111 + 0o126) + chr(0b1110100) + '\x66' + chr(0b1000 + 0o45) + '\x38'))(TtzqJLqe_ecy, axis=nzTpIcepk0o8(chr(48) + '\157' + chr(2113 - 2065), 8)))
BerkeleyAutomation/perception
perception/weight_sensor.py
WeightSensor.individual_weights
def individual_weights(self): """Read individual weights from the load cells in grams. Returns ------- weight : float The sensor weight in grams. """ weights = self._raw_weights() if weights.shape[1] == 0: return np.zeros(weights.shape[0]) elif weights.shape[1] < self._ntaps: return np.mean(weights, axis=1) else: return weights.dot(self._filter_coeffs)
python
def individual_weights(self): """Read individual weights from the load cells in grams. Returns ------- weight : float The sensor weight in grams. """ weights = self._raw_weights() if weights.shape[1] == 0: return np.zeros(weights.shape[0]) elif weights.shape[1] < self._ntaps: return np.mean(weights, axis=1) else: return weights.dot(self._filter_coeffs)
[ "def", "individual_weights", "(", "self", ")", ":", "weights", "=", "self", ".", "_raw_weights", "(", ")", "if", "weights", ".", "shape", "[", "1", "]", "==", "0", ":", "return", "np", ".", "zeros", "(", "weights", ".", "shape", "[", "0", "]", ")", "elif", "weights", ".", "shape", "[", "1", "]", "<", "self", ".", "_ntaps", ":", "return", "np", ".", "mean", "(", "weights", ",", "axis", "=", "1", ")", "else", ":", "return", "weights", ".", "dot", "(", "self", ".", "_filter_coeffs", ")" ]
Read individual weights from the load cells in grams. Returns ------- weight : float The sensor weight in grams.
[ "Read", "individual", "weights", "from", "the", "load", "cells", "in", "grams", "." ]
03d9b37dd6b66896cdfe173905c9413c8c3c5df6
https://github.com/BerkeleyAutomation/perception/blob/03d9b37dd6b66896cdfe173905c9413c8c3c5df6/perception/weight_sensor.py#L69-L83
train
Read individual weights from the load cells in grams.
GiP5xwVCF98Z,B3LV8Eo811Ma,bIsJhlpYrrU2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ributeError,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(0b10111 + 0o130) + chr(2493 - 2443) + chr(0b100111 + 0o17) + chr(0b110011), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(111) + '\x33' + chr(0b110000) + chr(0b110111), 32973 - 32965), nzTpIcepk0o8(chr(48) + chr(0b101 + 0o152) + '\062' + chr(0b110100) + chr(49), 0b1000), nzTpIcepk0o8('\x30' + chr(11596 - 11485) + chr(0b110101) + chr(0b111 + 0o60), 0b1000), nzTpIcepk0o8(chr(48) + chr(111) + chr(51) + '\x36', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + '\x6f' + '\x31' + '\062' + '\063', ord("\x08")), nzTpIcepk0o8(chr(2263 - 2215) + chr(0b1101111) + chr(0b1101 + 0o46) + chr(0b1101 + 0o45) + '\060', 0o10), nzTpIcepk0o8(chr(48) + '\157' + chr(861 - 810) + '\065' + chr(0b11111 + 0o26), 0o10), nzTpIcepk0o8(chr(2106 - 2058) + '\x6f' + '\061' + chr(0b10101 + 0o35), 232 - 224), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(742 - 691) + chr(0b101100 + 0o7) + chr(1919 - 1868), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(0b1101111) + chr(0b10100 + 0o37) + chr(0b110001) + '\067', 56977 - 56969), nzTpIcepk0o8('\060' + chr(111) + '\061' + '\062' + chr(0b110101), 0o10), nzTpIcepk0o8(chr(0b110000) + '\x6f' + chr(2021 - 1972) + chr(411 - 363) + chr(0b110011), 0o10), nzTpIcepk0o8('\060' + chr(0b1100111 + 0o10) + chr(2348 - 2298) + '\063', 47075 - 47067), nzTpIcepk0o8(chr(2225 - 2177) + chr(0b1101111) + chr(0b1100 + 0o45) + chr(0b100101 + 0o16) + '\062', 0b1000), nzTpIcepk0o8(chr(48) + '\157' + chr(959 - 908) + chr(53) + '\061', 0o10), nzTpIcepk0o8(chr(52 - 4) + chr(0b1101111) + chr(633 - 583) + chr(912 - 864) + chr(2341 - 2290), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(1906 - 1855) + chr(52) + chr(55), 0o10), nzTpIcepk0o8(chr(0b110000) + '\157' + '\067' + chr(0b110001), 4613 - 4605), nzTpIcepk0o8(chr(48) + chr(7407 - 7296) + '\061' + chr(53) + chr(49), 0b1000), nzTpIcepk0o8('\060' + chr(0b1101111) + chr(0b110011) + chr(2174 - 2121) + '\x34', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(0b1101111) + '\x32' + chr(1089 - 1040) + chr(1698 - 1648), ord("\x08")), nzTpIcepk0o8('\060' + '\157' + chr(55), ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(12016 - 11905) + chr(0b100111 + 0o13) + chr(49) + '\067', 30485 - 30477), nzTpIcepk0o8('\060' + chr(111) + '\067' + '\x36', ord("\x08")), nzTpIcepk0o8(chr(48) + chr(12089 - 11978) + chr(0b110001) + chr(2134 - 2082) + chr(55), 0o10), nzTpIcepk0o8(chr(48) + chr(0b111010 + 0o65) + '\062' + '\060' + chr(0b110001), 0o10), nzTpIcepk0o8('\x30' + chr(804 - 693) + chr(924 - 873) + chr(386 - 338) + chr(52), 0o10), nzTpIcepk0o8('\x30' + '\157' + '\062' + '\060' + chr(0b110000), 53259 - 53251), nzTpIcepk0o8(chr(0b1010 + 0o46) + chr(0b1101111) + '\062' + chr(53) + '\064', ord("\x08")), nzTpIcepk0o8(chr(1723 - 1675) + chr(111) + chr(0b110001) + '\065' + '\x33', ord("\x08")), nzTpIcepk0o8(chr(0b110000) + chr(111) + '\065', ord("\x08")), nzTpIcepk0o8(chr(0b100110 + 0o12) + chr(0b1101111) + chr(51) + chr(0b11110 + 0o31) + chr(51), ord("\x08")), nzTpIcepk0o8(chr(48) + chr(7961 - 7850) + chr(0b111 + 0o54) + '\064' + '\066', 39062 - 39054), nzTpIcepk0o8('\060' + chr(111) + '\x33' + '\x31' + chr(0b111 + 0o56), 0o10), nzTpIcepk0o8(chr(58 - 10) + '\157' + '\x33' + chr(0b110000) + '\x30', ord("\x08")), nzTpIcepk0o8(chr(0b10101 + 0o33) + chr(111) + chr(0b10010 + 0o37) + chr(0b110100) + '\x32', 0o10), nzTpIcepk0o8('\x30' + chr(111) + chr(0b0 + 0o61) + chr(0b110101) + '\065', 0o10), nzTpIcepk0o8(chr(0b10110 + 0o32) + chr(0b111110 + 0o61) + chr(2510 - 2457) + chr(0b110010 + 0o4), 0o10), nzTpIcepk0o8(chr(156 - 108) + chr(0b10000 + 0o137) + chr(50) + chr(49) + chr(0b101001 + 0o11), 8)][ZlbFMSG8gCoF % nzTpIcepk0o8('\x30' + '\157' + '\x35' + '\060', 0o10)] for (ZlbFMSG8gCoF, bI5jsQ9OkQtj) in _kV_Bomx8PZ4(R7ltlgvcKSD4)]) def rFFUeiYWzOhx(pOp6HxxfV61L, pXRQUD7VR93J): try: return zGgTE_CdZfvi(pOp6HxxfV61L + roI3spqORKae(ES5oEprVxulp(b'\x9d'), chr(0b110111 + 0o55) + chr(0b1100101) + chr(9668 - 9569) + chr(581 - 470) + '\x64' + chr(203 - 102))('\x75' + chr(9110 - 8994) + chr(102) + '\055' + chr(0b101001 + 0o17)) + pXRQUD7VR93J) except fPFTJxVnGShv: return zGgTE_CdZfvi(pOp6HxxfV61L) def FeFd9Zc_M0gV(hXMPsSrOQzbh): TtzqJLqe_ecy = hXMPsSrOQzbh._raw_weights() if roI3spqORKae(TtzqJLqe_ecy, roI3spqORKae(ES5oEprVxulp(b'\xdf\xaf\xc3b.j\xe2\xacL\x8c\xf73'), chr(0b1100100) + '\145' + chr(4199 - 4100) + '\157' + chr(0b1100100) + '\x65')('\x75' + chr(5750 - 5634) + '\x66' + '\x2d' + '\x38'))[nzTpIcepk0o8(chr(833 - 785) + '\157' + '\061', 0b1000)] == nzTpIcepk0o8(chr(1838 - 1790) + '\x6f' + '\x30', 0o10): return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b'\xe6\xaa\xd6X[#\xe7\xa0p\x89\xf9$'), '\x64' + '\x65' + chr(99) + chr(8680 - 8569) + '\x64' + chr(0b110011 + 0o62))('\165' + chr(0b1110100) + chr(3776 - 3674) + chr(0b101101) + chr(674 - 618)))(roI3spqORKae(TtzqJLqe_ecy, roI3spqORKae(ES5oEprVxulp(b'\xdf\xaf\xc3b.j\xe2\xacL\x8c\xf73'), chr(4061 - 3961) + chr(0b111110 + 0o47) + '\x63' + chr(111) + chr(0b1100100) + '\x65')(chr(0b101101 + 0o110) + '\x74' + '\x66' + '\055' + chr(0b111000)))[nzTpIcepk0o8('\060' + '\x6f' + chr(48), 8)]) elif roI3spqORKae(TtzqJLqe_ecy, roI3spqORKae(ES5oEprVxulp(b'\xdf\xaf\xc3b.j\xe2\xacL\x8c\xf73'), '\144' + chr(0b100101 + 0o100) + chr(0b1100011) + chr(0b111111 + 0o60) + '\x64' + chr(4707 - 4606))(chr(117) + chr(116) + chr(0b1000001 + 0o45) + '\x2d' + chr(56)))[nzTpIcepk0o8('\060' + chr(0b1101111) + chr(49), 8)] < roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xec\xa9\xd5Nn '), chr(0b1000001 + 0o43) + chr(0b1001101 + 0o30) + chr(0b1100011) + '\x6f' + chr(0b10101 + 0o117) + chr(7601 - 7500))('\165' + '\x74' + chr(0b111011 + 0o53) + '\x2d' + chr(0b110100 + 0o4))): return roI3spqORKae(nDF4gVNx0u9Q, roI3spqORKae(ES5oEprVxulp(b"\xf9\x82\x90Il'\xa8\xa8I\xae\xfc-"), '\x64' + chr(101) + chr(0b11 + 0o140) + '\157' + chr(4816 - 4716) + chr(0b1100101))(chr(0b1110101) + chr(0b1010010 + 0o42) + '\x66' + '\x2d' + '\x38'))(TtzqJLqe_ecy, axis=nzTpIcepk0o8('\x30' + '\157' + chr(0b110001), 8)) else: return roI3spqORKae(TtzqJLqe_ecy, roI3spqORKae(ES5oEprVxulp(b'\xd7\xa8\xd5'), chr(2990 - 2890) + '\145' + '\143' + chr(0b1100100 + 0o13) + chr(100) + '\145')(chr(3247 - 3130) + chr(1647 - 1531) + chr(4566 - 4464) + chr(0b101101) + '\x38'))(roI3spqORKae(hXMPsSrOQzbh, roI3spqORKae(ES5oEprVxulp(b'\xec\xa1\xc8Cj6\xa2\xb2i\xb4\xaa3%`'), '\x64' + chr(0b100101 + 0o100) + chr(0b101110 + 0o65) + chr(9118 - 9007) + '\144' + chr(6388 - 6287))(chr(0b1011111 + 0o26) + chr(0b11001 + 0o133) + chr(0b10101 + 0o121) + '\x2d' + chr(0b1101 + 0o53))))