def hebrew_number(num, hebrew=True, short=False):
if not hebrew:<EOL><INDENT>return str(num)<EOL><DEDENT>if not <NUM_LIT:0> <= num < <NUM_LIT>:<EOL><INDENT>raise ValueError('<STR_LIT>'.format(num))<EOL><DEDENT>hstring = u"<STR_LIT>"<EOL>if num >= <NUM_LIT:1000>:<EOL><INDENT>hstring += htables.DIGITS[<NUM_LIT:0>][num // <NUM_LIT:1000>]<EOL>hstring += u"<STR_LIT>"<EOL>num = num % <NUM_LIT:1000><EOL><DEDENT>while num >= <NUM_LIT>:<EOL><INDENT>hstring += htables.DIGITS[<NUM_LIT:2>][<NUM_LIT:4>]<EOL>num = num - <NUM_LIT><EOL><DEDENT>if num >= <NUM_LIT:100>:<EOL><INDENT>hstring += htables.DIGITS[<NUM_LIT:2>][num // <NUM_LIT:100>]<EOL>num = num % <NUM_LIT:100><EOL><DEDENT>if num >= <NUM_LIT:10>:<EOL><INDENT>if num in [<NUM_LIT:15>, <NUM_LIT:16>]:<EOL><INDENT>num = num - <NUM_LIT:9><EOL><DEDENT>hstring += htables.DIGITS[<NUM_LIT:1>][num // <NUM_LIT:10>]<EOL>num = num % <NUM_LIT:10><EOL><DEDENT>if num > <NUM_LIT:0>:<EOL><INDENT>hstring += htables.DIGITS[<NUM_LIT:0>][num]<EOL><DEDENT>if not short:<EOL><INDENT>if len(hstring) < <NUM_LIT:2>:<EOL><INDENT>hstring += u"<STR_LIT:'>"<EOL><DEDENT>else:<EOL><INDENT>hstring = hstring[:-<NUM_LIT:1>] + u'<STR_LIT:">' + hstring[-<NUM_LIT:1>]<EOL><DEDENT><DEDENT>return hstring<EOL>
Return "Gimatria" number.