body_hash stringlengths 64 64 | body stringlengths 23 109k | docstring stringlengths 1 57k | path stringlengths 4 198 | name stringlengths 1 115 | repository_name stringlengths 7 111 | repository_stars float64 0 191k | lang stringclasses 1
value | body_without_docstring stringlengths 14 108k | unified stringlengths 45 133k |
|---|---|---|---|---|---|---|---|---|---|
307b2cc5715f04456ac6142d10d449b5a5484ddd67a69ede6fc22c0eb8b9641f | def toString(ol):
'\n from elist.elist import *\n ol = [1,2,3,4]\n toString(ol)\n '
return ol.__str__() | from elist.elist import *
ol = [1,2,3,4]
toString(ol) | elist/elist.py | toString | ihgazni2/elist | 0 | python | def toString(ol):
'\n from elist.elist import *\n ol = [1,2,3,4]\n toString(ol)\n '
return ol.__str__() | def toString(ol):
'\n from elist.elist import *\n ol = [1,2,3,4]\n toString(ol)\n '
return ol.__str__()<|docstring|>from elist.elist import *
ol = [1,2,3,4]
toString(ol)<|endoftext|> |
b1f22251ded3b60cd6359614b90d8ba38a9f70b2ea1e2990a5baeea8929872bb | def toSource(ol):
'\n from elist.elist import *\n ol = [1,2,3,4]\n toSource(ol)\n '
return ol.__repr__() | from elist.elist import *
ol = [1,2,3,4]
toSource(ol) | elist/elist.py | toSource | ihgazni2/elist | 0 | python | def toSource(ol):
'\n from elist.elist import *\n ol = [1,2,3,4]\n toSource(ol)\n '
return ol.__repr__() | def toSource(ol):
'\n from elist.elist import *\n ol = [1,2,3,4]\n toSource(ol)\n '
return ol.__repr__()<|docstring|>from elist.elist import *
ol = [1,2,3,4]
toSource(ol)<|endoftext|> |
36af8ddd97e59ac5c4650cc82e7001e78db2d01f0dc11376dd2876a02a551c30 | def splice(ol, start, deleteCount, *eles, **kwargs):
'\n from elist.elist import *\n ol = ["angel", "clown", "mandarin", "surgeon"]\n id(ol)\n new = splice(ol,2,0,"drum")\n new\n id(new)\n ####\n ol = ["angel", "clown", "mandarin", "surgeon"]\n id(ol)\n... | from elist.elist import *
ol = ["angel", "clown", "mandarin", "surgeon"]
id(ol)
new = splice(ol,2,0,"drum")
new
id(new)
####
ol = ["angel", "clown", "mandarin", "surgeon"]
id(ol)
new = splice(ol,2,1,"drum",mode="original")
new
id(new)
####
ol = [1,2,3,4,5,6]
id(ol)
new = splice(ol,2,2,77,777)
new
id(new) | elist/elist.py | splice | ihgazni2/elist | 0 | python | def splice(ol, start, deleteCount, *eles, **kwargs):
'\n from elist.elist import *\n ol = ["angel", "clown", "mandarin", "surgeon"]\n id(ol)\n new = splice(ol,2,0,"drum")\n new\n id(new)\n ####\n ol = ["angel", "clown", "mandarin", "surgeon"]\n id(ol)\n... | def splice(ol, start, deleteCount, *eles, **kwargs):
'\n from elist.elist import *\n ol = ["angel", "clown", "mandarin", "surgeon"]\n id(ol)\n new = splice(ol,2,0,"drum")\n new\n id(new)\n ####\n ol = ["angel", "clown", "mandarin", "surgeon"]\n id(ol)\n... |
9d060cdf933024f80511e5e57266862e2b4588bd01f3dc90df37ff4b663afce3 | def slice(ol, start, end=None, **kwargs):
'\n from elist.elist import *\n ol = [1,2,3,4,5]\n id(ol)\n new = slice(ol,2,4)\n new\n id(new)\n ####\n id(ol)\n rslt = slice(ol,1,-2,mode="original")\n rslt\n id(rslt)\n '
if ('mode' in kw... | from elist.elist import *
ol = [1,2,3,4,5]
id(ol)
new = slice(ol,2,4)
new
id(new)
####
id(ol)
rslt = slice(ol,1,-2,mode="original")
rslt
id(rslt) | elist/elist.py | slice | ihgazni2/elist | 0 | python | def slice(ol, start, end=None, **kwargs):
'\n from elist.elist import *\n ol = [1,2,3,4,5]\n id(ol)\n new = slice(ol,2,4)\n new\n id(new)\n ####\n id(ol)\n rslt = slice(ol,1,-2,mode="original")\n rslt\n id(rslt)\n '
if ('mode' in kw... | def slice(ol, start, end=None, **kwargs):
'\n from elist.elist import *\n ol = [1,2,3,4,5]\n id(ol)\n new = slice(ol,2,4)\n new\n id(new)\n ####\n id(ol)\n rslt = slice(ol,1,-2,mode="original")\n rslt\n id(rslt)\n '
if ('mode' in kw... |
ea021983523802478010f66800d6c1e0d360cbef965e78379686ebbae15ce7c9 | def join(ol, separator=','):
'\n from elist.elist import *\n ol = [1,2,3,4]\n join(ol,separator="-")\n '
if (ol.__len__() == 0):
return ''
else:
pass
cond = (type(ol[0]) == type(b''))
if cond:
rslt = b''
else:
rslt = ''
length = ol.__le... | from elist.elist import *
ol = [1,2,3,4]
join(ol,separator="-") | elist/elist.py | join | ihgazni2/elist | 0 | python | def join(ol, separator=','):
'\n from elist.elist import *\n ol = [1,2,3,4]\n join(ol,separator="-")\n '
if (ol.__len__() == 0):
return
else:
pass
cond = (type(ol[0]) == type(b))
if cond:
rslt = b
else:
rslt =
length = ol.__len__()
... | def join(ol, separator=','):
'\n from elist.elist import *\n ol = [1,2,3,4]\n join(ol,separator="-")\n '
if (ol.__len__() == 0):
return
else:
pass
cond = (type(ol[0]) == type(b))
if cond:
rslt = b
else:
rslt =
length = ol.__len__()
... |
4d0496d161fc9a915cfe453043dd48591bc6493d0461ef1c3eeda3c658874973 | def join2(ol, *sps):
'\n from elist.elist import *\n ol = [1,2,3,4]\n join2(ol,"-","+","*")\n '
rslt = ''
length = ol.__len__()
for i in range(0, (length - 1)):
rslt = ((rslt + str(ol[i])) + sps[i])
rslt = (rslt + str(ol[(length - 1)]))
return rslt | from elist.elist import *
ol = [1,2,3,4]
join2(ol,"-","+","*") | elist/elist.py | join2 | ihgazni2/elist | 0 | python | def join2(ol, *sps):
'\n from elist.elist import *\n ol = [1,2,3,4]\n join2(ol,"-","+","*")\n '
rslt =
length = ol.__len__()
for i in range(0, (length - 1)):
rslt = ((rslt + str(ol[i])) + sps[i])
rslt = (rslt + str(ol[(length - 1)]))
return rslt | def join2(ol, *sps):
'\n from elist.elist import *\n ol = [1,2,3,4]\n join2(ol,"-","+","*")\n '
rslt =
length = ol.__len__()
for i in range(0, (length - 1)):
rslt = ((rslt + str(ol[i])) + sps[i])
rslt = (rslt + str(ol[(length - 1)]))
return rslt<|docstring|>from ... |
9948204c59409780c08f7a73a7feb8ec078584019aa52630831569729a385987 | def htmljoin(ol, sp, **kwargs):
'\n ol = [1,2,3,4]\n htmljoin(ol,"option",outer="select")\n \n '
if ('outer' in kwargs):
outer = kwargs['outer']
else:
outer = ''
if outer:
head = (('<' + outer) + '>')
tail = (('</' + outer) + '>')
else:
... | ol = [1,2,3,4]
htmljoin(ol,"option",outer="select") | elist/elist.py | htmljoin | ihgazni2/elist | 0 | python | def htmljoin(ol, sp, **kwargs):
'\n ol = [1,2,3,4]\n htmljoin(ol,"option",outer="select")\n \n '
if ('outer' in kwargs):
outer = kwargs['outer']
else:
outer =
if outer:
head = (('<' + outer) + '>')
tail = (('</' + outer) + '>')
else:
h... | def htmljoin(ol, sp, **kwargs):
'\n ol = [1,2,3,4]\n htmljoin(ol,"option",outer="select")\n \n '
if ('outer' in kwargs):
outer = kwargs['outer']
else:
outer =
if outer:
head = (('<' + outer) + '>')
tail = (('</' + outer) + '>')
else:
h... |
94a8243b407e7b40481687bfb1bbecae42191ec3f9bd9f4684caca6aa0a40db3 | def uniqualize(l, **kwargs):
'\n from elist.elist import *\n l = [1, 2, 2]\n new = uniqualize(l)\n new\n id(l)\n id(new)\n ####\n l = [1, 2, 2]\n rslt = uniqualize(l,mode="original")\n rslt\n id(l)\n id(rslt)\n '
if ('mode' i... | from elist.elist import *
l = [1, 2, 2]
new = uniqualize(l)
new
id(l)
id(new)
####
l = [1, 2, 2]
rslt = uniqualize(l,mode="original")
rslt
id(l)
id(rslt) | elist/elist.py | uniqualize | ihgazni2/elist | 0 | python | def uniqualize(l, **kwargs):
'\n from elist.elist import *\n l = [1, 2, 2]\n new = uniqualize(l)\n new\n id(l)\n id(new)\n ####\n l = [1, 2, 2]\n rslt = uniqualize(l,mode="original")\n rslt\n id(l)\n id(rslt)\n '
if ('mode' i... | def uniqualize(l, **kwargs):
'\n from elist.elist import *\n l = [1, 2, 2]\n new = uniqualize(l)\n new\n id(l)\n id(new)\n ####\n l = [1, 2, 2]\n rslt = uniqualize(l,mode="original")\n rslt\n id(l)\n id(rslt)\n '
if ('mode' i... |
f6843109cd2ef35460d9e14c23ec60eb0c847e4d0acc08c71ebf970ca1cd3e8a | def cond_uniqualize(l, **kwargs):
"\n from elist.elist import *\n l = [('BIGipServer', 'rd100'), ('TS013d8ed5', '00A0'), ('BIGipServer', 'rd200'), ('TS013d8ed5', '00B0'), ('SID', '1'), ('SID', '2')]\n \n def cond_func(ele,*args):\n cond = ele[0]\n return(cond)\n ... | from elist.elist import *
l = [('BIGipServer', 'rd100'), ('TS013d8ed5', '00A0'), ('BIGipServer', 'rd200'), ('TS013d8ed5', '00B0'), ('SID', '1'), ('SID', '2')]
def cond_func(ele,*args):
cond = ele[0]
return(cond)
uniqualized = cond_uniqualize(l,cond_func=cond_func)
pobj(uniqualized)
l = [('BIGipServer', 'rd10... | elist/elist.py | cond_uniqualize | ihgazni2/elist | 0 | python | def cond_uniqualize(l, **kwargs):
"\n from elist.elist import *\n l = [('BIGipServer', 'rd100'), ('TS013d8ed5', '00A0'), ('BIGipServer', 'rd200'), ('TS013d8ed5', '00B0'), ('SID', '1'), ('SID', '2')]\n \n def cond_func(ele,*args):\n cond = ele[0]\n return(cond)\n ... | def cond_uniqualize(l, **kwargs):
"\n from elist.elist import *\n l = [('BIGipServer', 'rd100'), ('TS013d8ed5', '00A0'), ('BIGipServer', 'rd200'), ('TS013d8ed5', '00B0'), ('SID', '1'), ('SID', '2')]\n \n def cond_func(ele,*args):\n cond = ele[0]\n return(cond)\n ... |
e553525ed92cdabb99b70510f80807210cfd8370382012c57061fe7f46194f8d | def interleave(*arrays, **kwargs):
"\n arr1 = [1,2,3,4]\n arr2 = ['a','b','c','d']\n arr3 = ['@','#','%','*']\n interleave(arr1,arr2,arr3)\n "
anum = arrays.__len__()
rslt = []
length = arrays[0].__len__()
for j in range(0, length):
for i in range(0, anum):
... | arr1 = [1,2,3,4]
arr2 = ['a','b','c','d']
arr3 = ['@','#','%','*']
interleave(arr1,arr2,arr3) | elist/elist.py | interleave | ihgazni2/elist | 0 | python | def interleave(*arrays, **kwargs):
"\n arr1 = [1,2,3,4]\n arr2 = ['a','b','c','d']\n arr3 = ['@','#','%','*']\n interleave(arr1,arr2,arr3)\n "
anum = arrays.__len__()
rslt = []
length = arrays[0].__len__()
for j in range(0, length):
for i in range(0, anum):
... | def interleave(*arrays, **kwargs):
"\n arr1 = [1,2,3,4]\n arr2 = ['a','b','c','d']\n arr3 = ['@','#','%','*']\n interleave(arr1,arr2,arr3)\n "
anum = arrays.__len__()
rslt = []
length = arrays[0].__len__()
for j in range(0, length):
for i in range(0, anum):
... |
2721bfe280898adf14f0e01b2b7c6c2818ca1ab4659a7b380d7c084c6a61e79c | def deinterleave(ol, gnum):
'\n ol = [1, 2, 3, 4, 5, 6, 7, 8, 9]\n deinterleave(ol,3)\n \n '
def test_func(ele, index, interval, which):
cond = ((index % interval) == which)
return cond
rslt = []
for i in range(0, gnum):
arr = cond_select_all2(ol, cond_fu... | ol = [1, 2, 3, 4, 5, 6, 7, 8, 9]
deinterleave(ol,3) | elist/elist.py | deinterleave | ihgazni2/elist | 0 | python | def deinterleave(ol, gnum):
'\n ol = [1, 2, 3, 4, 5, 6, 7, 8, 9]\n deinterleave(ol,3)\n \n '
def test_func(ele, index, interval, which):
cond = ((index % interval) == which)
return cond
rslt = []
for i in range(0, gnum):
arr = cond_select_all2(ol, cond_fu... | def deinterleave(ol, gnum):
'\n ol = [1, 2, 3, 4, 5, 6, 7, 8, 9]\n deinterleave(ol,3)\n \n '
def test_func(ele, index, interval, which):
cond = ((index % interval) == which)
return cond
rslt = []
for i in range(0, gnum):
arr = cond_select_all2(ol, cond_fu... |
294ed0ffa274b8e2977c50d0abc01487cfd65ac4e786b1f4bfd5d91a9070547b | def for_each(ol, test_func, *args):
'\n from elist.elist import *\n def show_func(ele):\n print("<{0}>".format(ele))\n \n ol = [1,2,3,4]\n for_each(ol,show_func)\n \n ####forEach is the same as for_each\n ####forEach have no return value\n '
... | from elist.elist import *
def show_func(ele):
print("<{0}>".format(ele))
ol = [1,2,3,4]
for_each(ol,show_func)
####forEach is the same as for_each
####forEach have no return value | elist/elist.py | for_each | ihgazni2/elist | 0 | python | def for_each(ol, test_func, *args):
'\n from elist.elist import *\n def show_func(ele):\n print("<{0}>".format(ele))\n \n ol = [1,2,3,4]\n for_each(ol,show_func)\n \n ####forEach is the same as for_each\n ####forEach have no return value\n '
... | def for_each(ol, test_func, *args):
'\n from elist.elist import *\n def show_func(ele):\n print("<{0}>".format(ele))\n \n ol = [1,2,3,4]\n for_each(ol,show_func)\n \n ####forEach is the same as for_each\n ####forEach have no return value\n '
... |
cc1abb88dca5fce201ad7f5be4b614d929f332d8d4c26d337c2a9992efcdb57b | def every(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n every(ol,test_func,3)\n \n ol = [10,20,30,40]\n every(ol,test_func,3)\n \n '
rslt... | from elist.elist import *
def test_func(ele,x):
cond = (ele > x)
return(cond)
ol = [1,2,3,4]
every(ol,test_func,3)
ol = [10,20,30,40]
every(ol,test_func,3) | elist/elist.py | every | ihgazni2/elist | 0 | python | def every(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n every(ol,test_func,3)\n \n ol = [10,20,30,40]\n every(ol,test_func,3)\n \n '
rslt... | def every(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n every(ol,test_func,3)\n \n ol = [10,20,30,40]\n every(ol,test_func,3)\n \n '
rslt... |
105dcd79dccea232906f65e105905bc7d1f61dcef09c08792f1605879f384942 | def every2(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,index,x):\n cond1 = (ele > x)\n cond2 = (index %2 ==0)\n cond = cond1 & cond2\n return(cond)\n\n ol = [1,2,3,4]\n every2(ol,test_func,3)\n\n ol = [10,20,... | from elist.elist import *
def test_func(ele,index,x):
cond1 = (ele > x)
cond2 = (index %2 ==0)
cond = cond1 & cond2
return(cond)
ol = [1,2,3,4]
every2(ol,test_func,3)
ol = [10,20,30,40]
every2(ol,test_func,3) | elist/elist.py | every2 | ihgazni2/elist | 0 | python | def every2(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,index,x):\n cond1 = (ele > x)\n cond2 = (index %2 ==0)\n cond = cond1 & cond2\n return(cond)\n\n ol = [1,2,3,4]\n every2(ol,test_func,3)\n\n ol = [10,20,... | def every2(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,index,x):\n cond1 = (ele > x)\n cond2 = (index %2 ==0)\n cond = cond1 & cond2\n return(cond)\n\n ol = [1,2,3,4]\n every2(ol,test_func,3)\n\n ol = [10,20,... |
2e410d5c889a43ce19ee4ae6453122710f1777cc9596aaf5bbccce22ef36e20f | def loose_in(pl, k):
"\n pl = ['bcd','xabcxx','x','y']\n loose_in(pl,'abc')\n \n "
cond = some(pl, (lambda ele: (k in ele)))['cond']
return cond | pl = ['bcd','xabcxx','x','y']
loose_in(pl,'abc') | elist/elist.py | loose_in | ihgazni2/elist | 0 | python | def loose_in(pl, k):
"\n pl = ['bcd','xabcxx','x','y']\n loose_in(pl,'abc')\n \n "
cond = some(pl, (lambda ele: (k in ele)))['cond']
return cond | def loose_in(pl, k):
"\n pl = ['bcd','xabcxx','x','y']\n loose_in(pl,'abc')\n \n "
cond = some(pl, (lambda ele: (k in ele)))['cond']
return cond<|docstring|>pl = ['bcd','xabcxx','x','y']
loose_in(pl,'abc')<|endoftext|> |
e9fbf833fa106c355b0f289e53e5b61cff2f6d0e0845565a62d4dac205ea99fb | def select_loose_in(pl, k):
"\n pl = ['bcd','xabcxx','x','y']\n select_loose_in(pl,'abc')\n "
def cond_func(ele, index, k):
if (type(ele) == type([])):
cond = loose_in(ele, k)
else:
cond = (k in ele)
return cond
arr = cond_select_values_all2(... | pl = ['bcd','xabcxx','x','y']
select_loose_in(pl,'abc') | elist/elist.py | select_loose_in | ihgazni2/elist | 0 | python | def select_loose_in(pl, k):
"\n pl = ['bcd','xabcxx','x','y']\n select_loose_in(pl,'abc')\n "
def cond_func(ele, index, k):
if (type(ele) == type([])):
cond = loose_in(ele, k)
else:
cond = (k in ele)
return cond
arr = cond_select_values_all2(... | def select_loose_in(pl, k):
"\n pl = ['bcd','xabcxx','x','y']\n select_loose_in(pl,'abc')\n "
def cond_func(ele, index, k):
if (type(ele) == type([])):
cond = loose_in(ele, k)
else:
cond = (k in ele)
return cond
arr = cond_select_values_all2(... |
1b489d83eaa14234a6fb361db5307bf5b1fa96b2f8087d930329275eebd16c43 | def select_strict_in(pl, k):
"\n pl = ['bcd','xabcxx','x','y']\n select_strict_in(pl,'abc')\n "
def cond_func(ele, index, k):
if (type(ele) == type([])):
cond = (k in ele)
else:
cond = (k == ele)
return cond
arr = cond_select_values_all2(pl, ... | pl = ['bcd','xabcxx','x','y']
select_strict_in(pl,'abc') | elist/elist.py | select_strict_in | ihgazni2/elist | 0 | python | def select_strict_in(pl, k):
"\n pl = ['bcd','xabcxx','x','y']\n select_strict_in(pl,'abc')\n "
def cond_func(ele, index, k):
if (type(ele) == type([])):
cond = (k in ele)
else:
cond = (k == ele)
return cond
arr = cond_select_values_all2(pl, ... | def select_strict_in(pl, k):
"\n pl = ['bcd','xabcxx','x','y']\n select_strict_in(pl,'abc')\n "
def cond_func(ele, index, k):
if (type(ele) == type([])):
cond = (k in ele)
else:
cond = (k == ele)
return cond
arr = cond_select_values_all2(pl, ... |
5cf76bea0988da65381ae5bdb72d65341f056d4159195b8814301178c7a38bf1 | def regex_in(pl, regex):
'\n regex = re.compile("^[a-z]+$")\n pl = [\'b1c3d\',\'xab15cxx\',\'1x\',\'y2\']\n regex_in(pl,regex)\n \n regex = re.compile("^[0-9a-z]+$")\n pl = [\'b1c3d\',\'xab15cxx\',\'1x\',\'y2\']\n regex_in(pl,regex)\n \n '
def cond_fun... | regex = re.compile("^[a-z]+$")
pl = ['b1c3d','xab15cxx','1x','y2']
regex_in(pl,regex)
regex = re.compile("^[0-9a-z]+$")
pl = ['b1c3d','xab15cxx','1x','y2']
regex_in(pl,regex) | elist/elist.py | regex_in | ihgazni2/elist | 0 | python | def regex_in(pl, regex):
'\n regex = re.compile("^[a-z]+$")\n pl = [\'b1c3d\',\'xab15cxx\',\'1x\',\'y2\']\n regex_in(pl,regex)\n \n regex = re.compile("^[0-9a-z]+$")\n pl = [\'b1c3d\',\'xab15cxx\',\'1x\',\'y2\']\n regex_in(pl,regex)\n \n '
def cond_fun... | def regex_in(pl, regex):
'\n regex = re.compile("^[a-z]+$")\n pl = [\'b1c3d\',\'xab15cxx\',\'1x\',\'y2\']\n regex_in(pl,regex)\n \n regex = re.compile("^[0-9a-z]+$")\n pl = [\'b1c3d\',\'xab15cxx\',\'1x\',\'y2\']\n regex_in(pl,regex)\n \n '
def cond_fun... |
fa7446e156bf332aade1a96c3c3c945c7540cb90b63e459aca344d131d06347a | def select_regex_in(pl, regex):
'\n regex = re.compile("^x.*x$")\n pl = [\'bcd\',\'xabcxx\',\'xx\',\'y\']\n select_regex_in(pl,\'abc\')\n '
def cond_func(ele, index, regex):
if (type(ele) == type([])):
cond = regex_in(ele, regex)
else:
m = regex.s... | regex = re.compile("^x.*x$")
pl = ['bcd','xabcxx','xx','y']
select_regex_in(pl,'abc') | elist/elist.py | select_regex_in | ihgazni2/elist | 0 | python | def select_regex_in(pl, regex):
'\n regex = re.compile("^x.*x$")\n pl = [\'bcd\',\'xabcxx\',\'xx\',\'y\']\n select_regex_in(pl,\'abc\')\n '
def cond_func(ele, index, regex):
if (type(ele) == type([])):
cond = regex_in(ele, regex)
else:
m = regex.s... | def select_regex_in(pl, regex):
'\n regex = re.compile("^x.*x$")\n pl = [\'bcd\',\'xabcxx\',\'xx\',\'y\']\n select_regex_in(pl,\'abc\')\n '
def cond_func(ele, index, regex):
if (type(ele) == type([])):
cond = regex_in(ele, regex)
else:
m = regex.s... |
213feb2cea379e21e6dd6d923561b0590656238376546b22349056d180b24862 | def some(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n some(ol,test_func,3)\n \n ol = [1,2,1,3]\n some(ol,test_func,3)\n '
rslt = {'cond': False... | from elist.elist import *
def test_func(ele,x):
cond = (ele > x)
return(cond)
ol = [1,2,3,4]
some(ol,test_func,3)
ol = [1,2,1,3]
some(ol,test_func,3) | elist/elist.py | some | ihgazni2/elist | 0 | python | def some(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n some(ol,test_func,3)\n \n ol = [1,2,1,3]\n some(ol,test_func,3)\n '
rslt = {'cond': False... | def some(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n some(ol,test_func,3)\n \n ol = [1,2,1,3]\n some(ol,test_func,3)\n '
rslt = {'cond': False... |
6c09963fac6dbcf21619bd10fc4088a27c52c85619521a633f070361af873b9e | def fill(ol, value, start=None, end=None, **kwargs):
'\n from elist.elist import *\n ol = [1, 2, 3,4,5]\n id(ol)\n rslt = fill(ol,4)\n rslt\n id(rslt)\n ####\n ol = [1, 2, 3,4,5]\n id(ol)\n rslt = fill(ol,4,1)\n rslt\n id(rslt)\n ... | from elist.elist import *
ol = [1, 2, 3,4,5]
id(ol)
rslt = fill(ol,4)
rslt
id(rslt)
####
ol = [1, 2, 3,4,5]
id(ol)
rslt = fill(ol,4,1)
rslt
id(rslt)
####
ol = [1, 2, 3,4,5]
id(ol)
rslt = fill(ol,6,1,3,mode="original")
rslt
id(rslt) | elist/elist.py | fill | ihgazni2/elist | 0 | python | def fill(ol, value, start=None, end=None, **kwargs):
'\n from elist.elist import *\n ol = [1, 2, 3,4,5]\n id(ol)\n rslt = fill(ol,4)\n rslt\n id(rslt)\n ####\n ol = [1, 2, 3,4,5]\n id(ol)\n rslt = fill(ol,4,1)\n rslt\n id(rslt)\n ... | def fill(ol, value, start=None, end=None, **kwargs):
'\n from elist.elist import *\n ol = [1, 2, 3,4,5]\n id(ol)\n rslt = fill(ol,4)\n rslt\n id(rslt)\n ####\n ol = [1, 2, 3,4,5]\n id(ol)\n rslt = fill(ol,4,1)\n rslt\n id(rslt)\n ... |
ed7feeef96e46dc216d8ab3978c7c618cfe367895adb33801d59a5be4f45624e | def filter(ol, test_func, *args, **kwargs):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n id(ol)\n new = filter(ol,test_func,3)\n new\n id(new)\n #####\n ol = [... | from elist.elist import *
def test_func(ele,x):
cond = (ele > x)
return(cond)
ol = [1,2,3,4]
id(ol)
new = filter(ol,test_func,3)
new
id(new)
#####
ol = [10,20,30,40]
id(ol)
rslt = filter(ol,test_func,3,mode="original")
rslt
id(rslt) | elist/elist.py | filter | ihgazni2/elist | 0 | python | def filter(ol, test_func, *args, **kwargs):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n id(ol)\n new = filter(ol,test_func,3)\n new\n id(new)\n #####\n ol = [... | def filter(ol, test_func, *args, **kwargs):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n id(ol)\n new = filter(ol,test_func,3)\n new\n id(new)\n #####\n ol = [... |
ad325fdf8ea02b9055c09750276334904f16ae198fb39703f06e9e51d7a17e83 | def filter2(ol, test_func, *args, **kwargs):
'\n from elist.elist import *\n def test_func(ele,index,x):\n cond1 = (ele > x)\n cond2 = (index % 2 = 1)\n cond = (cond1 & cond2)\n return(cond)\n ol = [1,2,3,4,5]\n id(ol)\n new = filter2(ol... | from elist.elist import *
def test_func(ele,index,x):
cond1 = (ele > x)
cond2 = (index % 2 = 1)
cond = (cond1 & cond2)
return(cond)
ol = [1,2,3,4,5]
id(ol)
new = filter2(ol,test_func,2)
new
id(new)
#####
ol = [10,20,30,40]
id(ol)
rslt = filter2(ol,test_func,3,mode="original")
rslt
id(rslt) | elist/elist.py | filter2 | ihgazni2/elist | 0 | python | def filter2(ol, test_func, *args, **kwargs):
'\n from elist.elist import *\n def test_func(ele,index,x):\n cond1 = (ele > x)\n cond2 = (index % 2 = 1)\n cond = (cond1 & cond2)\n return(cond)\n ol = [1,2,3,4,5]\n id(ol)\n new = filter2(ol... | def filter2(ol, test_func, *args, **kwargs):
'\n from elist.elist import *\n def test_func(ele,index,x):\n cond1 = (ele > x)\n cond2 = (index % 2 = 1)\n cond = (cond1 & cond2)\n return(cond)\n ol = [1,2,3,4,5]\n id(ol)\n new = filter2(ol... |
7d5d76fb669da4d0cf68590c72d83e05c2534b949b613edf117602e5dd760915 | def find_first(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n first = find_first(ol,test_func,3)\n first\n #####\n ol = [10,20,30,40]\n first = f... | from elist.elist import *
def test_func(ele,x):
cond = (ele > x)
return(cond)
ol = [1,2,3,4]
first = find_first(ol,test_func,3)
first
#####
ol = [10,20,30,40]
first = find_first(ol,test_func,3)
first
####find is the same as find_first | elist/elist.py | find_first | ihgazni2/elist | 0 | python | def find_first(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n first = find_first(ol,test_func,3)\n first\n #####\n ol = [10,20,30,40]\n first = f... | def find_first(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n first = find_first(ol,test_func,3)\n first\n #####\n ol = [10,20,30,40]\n first = f... |
c5e816d1feed503e1f5248a7ca1a7927dc7de239f42be996d9803196bbd4f508 | def find_firstnot(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n first = find_firstnot(ol,test_func,3)\n first\n #####\n ol = [10,20,30,40]\n fir... | from elist.elist import *
def test_func(ele,x):
cond = (ele > x)
return(cond)
ol = [1,2,3,4]
first = find_firstnot(ol,test_func,3)
first
#####
ol = [10,20,30,40]
first = find_firstnot(ol,test_func,3)
first
####findnot is the same as find_firstnot | elist/elist.py | find_firstnot | ihgazni2/elist | 0 | python | def find_firstnot(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n first = find_firstnot(ol,test_func,3)\n first\n #####\n ol = [10,20,30,40]\n fir... | def find_firstnot(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n first = find_firstnot(ol,test_func,3)\n first\n #####\n ol = [10,20,30,40]\n fir... |
1f2dc3bd2a478e8675c13c25dcb9c7c3b3aeebc96c4320d4966f9cde44c1b445 | def find_last(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n last = find_last(ol,test_func,3)\n last\n #####\n ol = [10,20,30,40]\n last = find_l... | from elist.elist import *
def test_func(ele,x):
cond = (ele > x)
return(cond)
ol = [1,2,3,4]
last = find_last(ol,test_func,3)
last
#####
ol = [10,20,30,40]
last = find_last(ol,test_func,3)
last | elist/elist.py | find_last | ihgazni2/elist | 0 | python | def find_last(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n last = find_last(ol,test_func,3)\n last\n #####\n ol = [10,20,30,40]\n last = find_l... | def find_last(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n last = find_last(ol,test_func,3)\n last\n #####\n ol = [10,20,30,40]\n last = find_l... |
3398c63bd30dd7cd75c423fa95d6361300d06e97b29f043f08891f71f1631a15 | def find_lastnot(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n last = find_lastnot(ol,test_func,3)\n last\n #####\n ol = [10,20,30,40]\n last = ... | from elist.elist import *
def test_func(ele,x):
cond = (ele > x)
return(cond)
ol = [1,2,3,4]
last = find_lastnot(ol,test_func,3)
last
#####
ol = [10,20,30,40]
last = find_lastnot(ol,test_func,3)
last | elist/elist.py | find_lastnot | ihgazni2/elist | 0 | python | def find_lastnot(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n last = find_lastnot(ol,test_func,3)\n last\n #####\n ol = [10,20,30,40]\n last = ... | def find_lastnot(ol, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4]\n last = find_lastnot(ol,test_func,3)\n last\n #####\n ol = [10,20,30,40]\n last = ... |
8e4d741a215f3f437c93ef607f294e59106ea4895c179900e29336d0a526e6e4 | def find_which(ol, which, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n last = find_which(ol,0,test_func,3)\n last\n last = find_which(ol,2,test_func,3)\n ... | from elist.elist import *
def test_func(ele,x):
cond = (ele > x)
return(cond)
ol = [1,2,3,4,5,6,7]
last = find_which(ol,0,test_func,3)
last
last = find_which(ol,2,test_func,3)
last | elist/elist.py | find_which | ihgazni2/elist | 0 | python | def find_which(ol, which, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n last = find_which(ol,0,test_func,3)\n last\n last = find_which(ol,2,test_func,3)\n ... | def find_which(ol, which, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n last = find_which(ol,0,test_func,3)\n last\n last = find_which(ol,2,test_func,3)\n ... |
d7c5964ee444a1e056873128aa315a27f2fafb6398cfa58a3410c271234c6f8d | def find_whichnot(ol, which, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n last = find_whichnot(ol,0,test_func,3)\n last\n last = find_whichnot(ol,2,test_fu... | from elist.elist import *
def test_func(ele,x):
cond = (ele > x)
return(cond)
ol = [1,2,3,4,5,6,7]
last = find_whichnot(ol,0,test_func,3)
last
last = find_whichnot(ol,2,test_func,3)
last | elist/elist.py | find_whichnot | ihgazni2/elist | 0 | python | def find_whichnot(ol, which, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n last = find_whichnot(ol,0,test_func,3)\n last\n last = find_whichnot(ol,2,test_fu... | def find_whichnot(ol, which, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n last = find_whichnot(ol,0,test_func,3)\n last\n last = find_whichnot(ol,2,test_fu... |
81882720b93bdcf178061ec845ee446277186a23c2de4f5dcc9bef7d021c8b7e | def find_seqs(ol, seqs, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n some = find_seqs(ol,[0,3],test_func,3)\n some\n some = find_some(ol,[0,1,2],test_func,... | from elist.elist import *
def test_func(ele,x):
cond = (ele > x)
return(cond)
ol = [1,2,3,4,5,6,7]
some = find_seqs(ol,[0,3],test_func,3)
some
some = find_some(ol,[0,1,2],test_func,3)
some
#find_some is the same as find_seqs | elist/elist.py | find_seqs | ihgazni2/elist | 0 | python | def find_seqs(ol, seqs, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n some = find_seqs(ol,[0,3],test_func,3)\n some\n some = find_some(ol,[0,1,2],test_func,... | def find_seqs(ol, seqs, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n some = find_seqs(ol,[0,3],test_func,3)\n some\n some = find_some(ol,[0,1,2],test_func,... |
f59e40cdb7ed51278306a2e9a5d1bb2b33a3707e103635fdfa2fa8476d63f852 | def find_seqsnot(ol, seqs, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n some = find_seqsnot(ol,[0,3],test_func,3)\n some\n some = find_somenot(ol,[0,1,2],t... | from elist.elist import *
def test_func(ele,x):
cond = (ele > x)
return(cond)
ol = [1,2,3,4,5,6,7]
some = find_seqsnot(ol,[0,3],test_func,3)
some
some = find_somenot(ol,[0,1,2],test_func,3)
some
#find_somenot is the same as find_seqsnot | elist/elist.py | find_seqsnot | ihgazni2/elist | 0 | python | def find_seqsnot(ol, seqs, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n some = find_seqsnot(ol,[0,3],test_func,3)\n some\n some = find_somenot(ol,[0,1,2],t... | def find_seqsnot(ol, seqs, test_func, *args):
'\n from elist.elist import *\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n some = find_seqsnot(ol,[0,3],test_func,3)\n some\n some = find_somenot(ol,[0,1,2],t... |
ef0d1a03d07cbbedb5d4cf641118b68c86ca60227bb2ff0dbddb87518d9023fa | def find_all(ol, test_func, *args):
'\n from elist.elist import *\n from elist.jprint import pobj\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n rslt = find_all(ol,test_func,3)\n pobj(rslt)\n '
rslt ... | from elist.elist import *
from elist.jprint import pobj
def test_func(ele,x):
cond = (ele > x)
return(cond)
ol = [1,2,3,4,5,6,7]
rslt = find_all(ol,test_func,3)
pobj(rslt) | elist/elist.py | find_all | ihgazni2/elist | 0 | python | def find_all(ol, test_func, *args):
'\n from elist.elist import *\n from elist.jprint import pobj\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n rslt = find_all(ol,test_func,3)\n pobj(rslt)\n '
rslt ... | def find_all(ol, test_func, *args):
'\n from elist.elist import *\n from elist.jprint import pobj\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n rslt = find_all(ol,test_func,3)\n pobj(rslt)\n '
rslt ... |
76f3930c8bf94b3ec28cce57bc3343beacacafeae93e17c7b39956c41b04624a | def find_all2(ol, test_func, *args):
'\n from elist.elist import *\n from elist.jprint import pobj\n def test_func(ele,index,x):\n cond1 = (ele > x)\n cond2 = (index %2 == 0)\n cond = (cond1 & cond2)\n return(cond)\n\n ol = [1,2,3,4,5,6,7]\n ... | from elist.elist import *
from elist.jprint import pobj
def test_func(ele,index,x):
cond1 = (ele > x)
cond2 = (index %2 == 0)
cond = (cond1 & cond2)
return(cond)
ol = [1,2,3,4,5,6,7]
rslt = find_all2(ol,test_func,3)
pobj(rslt) | elist/elist.py | find_all2 | ihgazni2/elist | 0 | python | def find_all2(ol, test_func, *args):
'\n from elist.elist import *\n from elist.jprint import pobj\n def test_func(ele,index,x):\n cond1 = (ele > x)\n cond2 = (index %2 == 0)\n cond = (cond1 & cond2)\n return(cond)\n\n ol = [1,2,3,4,5,6,7]\n ... | def find_all2(ol, test_func, *args):
'\n from elist.elist import *\n from elist.jprint import pobj\n def test_func(ele,index,x):\n cond1 = (ele > x)\n cond2 = (index %2 == 0)\n cond = (cond1 & cond2)\n return(cond)\n\n ol = [1,2,3,4,5,6,7]\n ... |
025e9cd8fedeeedad03b9052b27cdd6e3bff61b4ab9c9ddb291241161b5fed5f | def find_allnot(ol, test_func, *args):
'\n from elist.elist import *\n from elist.jprint import pobj\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n rslt = find_allnot(ol,test_func,3)\n pobj(rslt)\n '
... | from elist.elist import *
from elist.jprint import pobj
def test_func(ele,x):
cond = (ele > x)
return(cond)
ol = [1,2,3,4,5,6,7]
rslt = find_allnot(ol,test_func,3)
pobj(rslt) | elist/elist.py | find_allnot | ihgazni2/elist | 0 | python | def find_allnot(ol, test_func, *args):
'\n from elist.elist import *\n from elist.jprint import pobj\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n rslt = find_allnot(ol,test_func,3)\n pobj(rslt)\n '
... | def find_allnot(ol, test_func, *args):
'\n from elist.elist import *\n from elist.jprint import pobj\n def test_func(ele,x):\n cond = (ele > x)\n return(cond)\n \n ol = [1,2,3,4,5,6,7]\n rslt = find_allnot(ol,test_func,3)\n pobj(rslt)\n '
... |
01e6a2191ba30cb13b4d8b677370bd7c70a609b18efeba879fdb0a179d9d6ebd | def reduce_left(ol, callback, initialValue):
'\n from elist.elist import *\n def callback(accumulator,currentValue):\n accumulator.append(currentValue[0])\n accumulator.append(currentValue[1])\n return(accumulator)\n \n ol = [(1,2),("a","b"),("x","y")]\n ... | from elist.elist import *
def callback(accumulator,currentValue):
accumulator.append(currentValue[0])
accumulator.append(currentValue[1])
return(accumulator)
ol = [(1,2),("a","b"),("x","y")]
reduce_left(ol,callback,[])
#array_reduce, reduceLeft ,reduce_left are the same | elist/elist.py | reduce_left | ihgazni2/elist | 0 | python | def reduce_left(ol, callback, initialValue):
'\n from elist.elist import *\n def callback(accumulator,currentValue):\n accumulator.append(currentValue[0])\n accumulator.append(currentValue[1])\n return(accumulator)\n \n ol = [(1,2),("a","b"),("x","y")]\n ... | def reduce_left(ol, callback, initialValue):
'\n from elist.elist import *\n def callback(accumulator,currentValue):\n accumulator.append(currentValue[0])\n accumulator.append(currentValue[1])\n return(accumulator)\n \n ol = [(1,2),("a","b"),("x","y")]\n ... |
e78e1e9f9064ff04cfc92c9349c40d8027eec968aba32af4a93bf906381274bd | def reduce_right(ol, callback, initialValue):
'\n from elist.elist import *\n def callback(accumulator,currentValue):\n accumulator.append(currentValue[0])\n accumulator.append(currentValue[1])\n return(accumulator)\n \n ol = [(1,2),("a","b"),("x","y")]\n... | from elist.elist import *
def callback(accumulator,currentValue):
accumulator.append(currentValue[0])
accumulator.append(currentValue[1])
return(accumulator)
ol = [(1,2),("a","b"),("x","y")]
reduce_right(ol,callback,[])
#reduceRight,reduce_right are the same | elist/elist.py | reduce_right | ihgazni2/elist | 0 | python | def reduce_right(ol, callback, initialValue):
'\n from elist.elist import *\n def callback(accumulator,currentValue):\n accumulator.append(currentValue[0])\n accumulator.append(currentValue[1])\n return(accumulator)\n \n ol = [(1,2),("a","b"),("x","y")]\n... | def reduce_right(ol, callback, initialValue):
'\n from elist.elist import *\n def callback(accumulator,currentValue):\n accumulator.append(currentValue[0])\n accumulator.append(currentValue[1])\n return(accumulator)\n \n ol = [(1,2),("a","b"),("x","y")]\n... |
71f32d6008dfafd41334075bfd079b7ae5aef53c17cb1d55a6eccc839a507ff9 | def diff_indexes(l1, l2):
'\n from elist.elist import *\n l1 = [1,2,3,5]\n l2 = [0,2,3,4]\n diff_indexes(l1,l2)\n '
rslt = []
for i in range(0, l1.__len__()):
if (l1[i] != l2[i]):
rslt.append(i)
return rslt | from elist.elist import *
l1 = [1,2,3,5]
l2 = [0,2,3,4]
diff_indexes(l1,l2) | elist/elist.py | diff_indexes | ihgazni2/elist | 0 | python | def diff_indexes(l1, l2):
'\n from elist.elist import *\n l1 = [1,2,3,5]\n l2 = [0,2,3,4]\n diff_indexes(l1,l2)\n '
rslt = []
for i in range(0, l1.__len__()):
if (l1[i] != l2[i]):
rslt.append(i)
return rslt | def diff_indexes(l1, l2):
'\n from elist.elist import *\n l1 = [1,2,3,5]\n l2 = [0,2,3,4]\n diff_indexes(l1,l2)\n '
rslt = []
for i in range(0, l1.__len__()):
if (l1[i] != l2[i]):
rslt.append(i)
return rslt<|docstring|>from elist.elist import *
l1 = [1,... |
2e10fd3a73403fab91c3f7db310b3c93e1e63779637732512e0cc6c5111026d1 | def diff_values(l1, l2):
'\n from elist.elist import *\n l1 = [1,2,3,5]\n l2 = [0,2,3,4]\n diff_values(l1,l2)\n '
rslt = []
for i in range(0, l1.__len__()):
if (l1[i] != l2[i]):
rslt.append(l1[i])
return rslt | from elist.elist import *
l1 = [1,2,3,5]
l2 = [0,2,3,4]
diff_values(l1,l2) | elist/elist.py | diff_values | ihgazni2/elist | 0 | python | def diff_values(l1, l2):
'\n from elist.elist import *\n l1 = [1,2,3,5]\n l2 = [0,2,3,4]\n diff_values(l1,l2)\n '
rslt = []
for i in range(0, l1.__len__()):
if (l1[i] != l2[i]):
rslt.append(l1[i])
return rslt | def diff_values(l1, l2):
'\n from elist.elist import *\n l1 = [1,2,3,5]\n l2 = [0,2,3,4]\n diff_values(l1,l2)\n '
rslt = []
for i in range(0, l1.__len__()):
if (l1[i] != l2[i]):
rslt.append(l1[i])
return rslt<|docstring|>from elist.elist import *
l1 = [... |
dee49178b2a5d99bfebeb794f3788018ca5d4f332b7bc353a69a77e53588b917 | def same_indexes(l1, l2):
'\n from elist.elist import *\n l1 = [1,2,3,5]\n l2 = [0,2,3,4]\n same_indexes(l1,l2)\n '
rslt = []
for i in range(0, l1.__len__()):
if (l1[i] == l2[i]):
rslt.append(i)
return rslt | from elist.elist import *
l1 = [1,2,3,5]
l2 = [0,2,3,4]
same_indexes(l1,l2) | elist/elist.py | same_indexes | ihgazni2/elist | 0 | python | def same_indexes(l1, l2):
'\n from elist.elist import *\n l1 = [1,2,3,5]\n l2 = [0,2,3,4]\n same_indexes(l1,l2)\n '
rslt = []
for i in range(0, l1.__len__()):
if (l1[i] == l2[i]):
rslt.append(i)
return rslt | def same_indexes(l1, l2):
'\n from elist.elist import *\n l1 = [1,2,3,5]\n l2 = [0,2,3,4]\n same_indexes(l1,l2)\n '
rslt = []
for i in range(0, l1.__len__()):
if (l1[i] == l2[i]):
rslt.append(i)
return rslt<|docstring|>from elist.elist import *
l1 = [1,... |
d4d0b19efefff978e1ad40808ebb0bd246a5aeb8126f0c71a9d0d361db98e51e | def same_values(l1, l2):
'\n from elist.elist import *\n l1 = [1,2,3,5]\n l2 = [0,2,3,4]\n same_values(l1,l2)\n '
rslt = []
for i in range(0, l1.__len__()):
if (l1[i] == l2[i]):
rslt.append(l1[i])
return rslt | from elist.elist import *
l1 = [1,2,3,5]
l2 = [0,2,3,4]
same_values(l1,l2) | elist/elist.py | same_values | ihgazni2/elist | 0 | python | def same_values(l1, l2):
'\n from elist.elist import *\n l1 = [1,2,3,5]\n l2 = [0,2,3,4]\n same_values(l1,l2)\n '
rslt = []
for i in range(0, l1.__len__()):
if (l1[i] == l2[i]):
rslt.append(l1[i])
return rslt | def same_values(l1, l2):
'\n from elist.elist import *\n l1 = [1,2,3,5]\n l2 = [0,2,3,4]\n same_values(l1,l2)\n '
rslt = []
for i in range(0, l1.__len__()):
if (l1[i] == l2[i]):
rslt.append(l1[i])
return rslt<|docstring|>from elist.elist import *
l1 = [... |
1c7c67c56b6cfd03f69f982550d946b7657690cdfb2cb0ef31f4a5eb3b46bce9 | def value_indexes_mapping(l):
"\n from elist.elist import *\n from elist.jprint import pobj\n l = ['a','b','b','a','c','b']\n desc = value_indexes_mapping(l)\n pobj(desc)\n "
pt = copy.deepcopy(l)
desc = {}
vset = set({})
for v in pt:
vset.add(v)
for... | from elist.elist import *
from elist.jprint import pobj
l = ['a','b','b','a','c','b']
desc = value_indexes_mapping(l)
pobj(desc) | elist/elist.py | value_indexes_mapping | ihgazni2/elist | 0 | python | def value_indexes_mapping(l):
"\n from elist.elist import *\n from elist.jprint import pobj\n l = ['a','b','b','a','c','b']\n desc = value_indexes_mapping(l)\n pobj(desc)\n "
pt = copy.deepcopy(l)
desc = {}
vset = set({})
for v in pt:
vset.add(v)
for... | def value_indexes_mapping(l):
"\n from elist.elist import *\n from elist.jprint import pobj\n l = ['a','b','b','a','c','b']\n desc = value_indexes_mapping(l)\n pobj(desc)\n "
pt = copy.deepcopy(l)
desc = {}
vset = set({})
for v in pt:
vset.add(v)
for... |
2ab3fd71ceff620db865b8cba0572fa6b62102094f27d8e1ba7e82d5f3deab0b | def cond_value_indexes_mapping(l, **kwargs):
"\n from elist.elist import *\n l = [('BIGipServer', 'rd19'), ('TS013d8ed5', '0105b6b0'), ('BIGipServer', 'rd19'), ('TS013d8ed5', '0105b6b0'), ('SID', '1'), ('SID', '2')]\n \n def cond_func(ele,*args):\n cond = ele[0]\n r... | from elist.elist import *
l = [('BIGipServer', 'rd19'), ('TS013d8ed5', '0105b6b0'), ('BIGipServer', 'rd19'), ('TS013d8ed5', '0105b6b0'), ('SID', '1'), ('SID', '2')]
def cond_func(ele,*args):
cond = ele[0]
return(cond)
desc = cond_value_indexes_mapping(l,cond_func=cond_func)
pobj(desc) | elist/elist.py | cond_value_indexes_mapping | ihgazni2/elist | 0 | python | def cond_value_indexes_mapping(l, **kwargs):
"\n from elist.elist import *\n l = [('BIGipServer', 'rd19'), ('TS013d8ed5', '0105b6b0'), ('BIGipServer', 'rd19'), ('TS013d8ed5', '0105b6b0'), ('SID', '1'), ('SID', '2')]\n \n def cond_func(ele,*args):\n cond = ele[0]\n r... | def cond_value_indexes_mapping(l, **kwargs):
"\n from elist.elist import *\n l = [('BIGipServer', 'rd19'), ('TS013d8ed5', '0105b6b0'), ('BIGipServer', 'rd19'), ('TS013d8ed5', '0105b6b0'), ('SID', '1'), ('SID', '2')]\n \n def cond_func(ele,*args):\n cond = ele[0]\n r... |
9c4aa576b50b0476b3f4a74fa92ef68d9724156d96183301470ea2e9174b3a2c | def getitem_via_pathlist(ol, pathlist):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n getitem_via_pathlist(y,[1,1])\n '
this = ol
for i in range(0, pathlist.__len__()):
key = pathlist[i]
this = this.__getitem__(key)
return thi... | from elist.elist import *
y = ['a',['b',["bb"]],'c']
y[1][1]
getitem_via_pathlist(y,[1,1]) | elist/elist.py | getitem_via_pathlist | ihgazni2/elist | 0 | python | def getitem_via_pathlist(ol, pathlist):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n getitem_via_pathlist(y,[1,1])\n '
this = ol
for i in range(0, pathlist.__len__()):
key = pathlist[i]
this = this.__getitem__(key)
return thi... | def getitem_via_pathlist(ol, pathlist):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n getitem_via_pathlist(y,[1,1])\n '
this = ol
for i in range(0, pathlist.__len__()):
key = pathlist[i]
this = this.__getitem__(key)
return thi... |
bb33df260d9a28e7e6afcbd8c30b39276b8122f112e26ce989c5e06be1caeec5 | def getitem_via_pathlist2(pathlist, ol):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n getitem_via_pathlist2([1,1],y)\n '
this = ol
for i in range(0, pathlist.__len__()):
key = pathlist[i]
this = this.__getitem__(key)
return t... | from elist.elist import *
y = ['a',['b',["bb"]],'c']
y[1][1]
getitem_via_pathlist2([1,1],y) | elist/elist.py | getitem_via_pathlist2 | ihgazni2/elist | 0 | python | def getitem_via_pathlist2(pathlist, ol):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n getitem_via_pathlist2([1,1],y)\n '
this = ol
for i in range(0, pathlist.__len__()):
key = pathlist[i]
this = this.__getitem__(key)
return t... | def getitem_via_pathlist2(pathlist, ol):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n getitem_via_pathlist2([1,1],y)\n '
this = ol
for i in range(0, pathlist.__len__()):
key = pathlist[i]
this = this.__getitem__(key)
return t... |
6b748fecac35756c83af07fdefabdf497cf5c923dd882957071013a629f1dbaa | def getitem_via_sibseqs(ol, *sibseqs):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n getitem_via_sibseqs(y,1,1)\n '
pathlist = list(sibseqs)
this = ol
for i in range(0, pathlist.__len__()):
key = pathlist[i]
this = this.__geti... | from elist.elist import *
y = ['a',['b',["bb"]],'c']
y[1][1]
getitem_via_sibseqs(y,1,1) | elist/elist.py | getitem_via_sibseqs | ihgazni2/elist | 0 | python | def getitem_via_sibseqs(ol, *sibseqs):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n getitem_via_sibseqs(y,1,1)\n '
pathlist = list(sibseqs)
this = ol
for i in range(0, pathlist.__len__()):
key = pathlist[i]
this = this.__geti... | def getitem_via_sibseqs(ol, *sibseqs):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n getitem_via_sibseqs(y,1,1)\n '
pathlist = list(sibseqs)
this = ol
for i in range(0, pathlist.__len__()):
key = pathlist[i]
this = this.__geti... |
8fdc9c2254a9c9983ec3441bd5494bb7c890f8f6565b7ddeb22f68d4599a3530 | def setitem_via_pathlist(ol, value, pathlist):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n setitem_via_pathlist(y,"500",[1,1])\n y\n '
this = ol
for i in range(0, (pathlist.__len__() - 1)):
key = pathlist[i]
this = this._... | from elist.elist import *
y = ['a',['b',["bb"]],'c']
y[1][1]
setitem_via_pathlist(y,"500",[1,1])
y | elist/elist.py | setitem_via_pathlist | ihgazni2/elist | 0 | python | def setitem_via_pathlist(ol, value, pathlist):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n setitem_via_pathlist(y,"500",[1,1])\n y\n '
this = ol
for i in range(0, (pathlist.__len__() - 1)):
key = pathlist[i]
this = this._... | def setitem_via_pathlist(ol, value, pathlist):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n setitem_via_pathlist(y,"500",[1,1])\n y\n '
this = ol
for i in range(0, (pathlist.__len__() - 1)):
key = pathlist[i]
this = this._... |
273a773ffc6e76e5a7e5ea9e63d7afe1acfe654299399f4dcb8e201ef312d80b | def setitem_via_sibseqs(ol, value, *sibseqs):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n setitem_via_sibseqs(y,"500",1,1)\n y\n '
this = ol
pathlist = list(sibseqs)
for i in range(0, (pathlist.__len__() - 1)):
key = pathlist... | from elist.elist import *
y = ['a',['b',["bb"]],'c']
y[1][1]
setitem_via_sibseqs(y,"500",1,1)
y | elist/elist.py | setitem_via_sibseqs | ihgazni2/elist | 0 | python | def setitem_via_sibseqs(ol, value, *sibseqs):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n setitem_via_sibseqs(y,"500",1,1)\n y\n '
this = ol
pathlist = list(sibseqs)
for i in range(0, (pathlist.__len__() - 1)):
key = pathlist... | def setitem_via_sibseqs(ol, value, *sibseqs):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n setitem_via_sibseqs(y,"500",1,1)\n y\n '
this = ol
pathlist = list(sibseqs)
for i in range(0, (pathlist.__len__() - 1)):
key = pathlist... |
224fcf7e594e7bbb98bf8c3b22bff59fa47ee3e9942e96ff2bb5e9f7bab08526 | def delitem_via_pathlist(ol, pathlist):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n delitem_via_pathlist(y,[1,1])\n y\n '
this = ol
for i in range(0, (pathlist.__len__() - 1)):
key = pathlist[i]
this = this.__getitem__(ke... | from elist.elist import *
y = ['a',['b',["bb"]],'c']
y[1][1]
delitem_via_pathlist(y,[1,1])
y | elist/elist.py | delitem_via_pathlist | ihgazni2/elist | 0 | python | def delitem_via_pathlist(ol, pathlist):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n delitem_via_pathlist(y,[1,1])\n y\n '
this = ol
for i in range(0, (pathlist.__len__() - 1)):
key = pathlist[i]
this = this.__getitem__(ke... | def delitem_via_pathlist(ol, pathlist):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n delitem_via_pathlist(y,[1,1])\n y\n '
this = ol
for i in range(0, (pathlist.__len__() - 1)):
key = pathlist[i]
this = this.__getitem__(ke... |
2dc9136f43a0423915cd35a25effa2a4f63667666dd879227fda3c36e5afc2c2 | def delitem_via_sibseqs(ol, *sibseqs):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n delitem_via_sibseqs(y,1,1)\n y\n '
pathlist = list(sibseqs)
this = ol
for i in range(0, (pathlist.__len__() - 1)):
key = pathlist[i]
t... | from elist.elist import *
y = ['a',['b',["bb"]],'c']
y[1][1]
delitem_via_sibseqs(y,1,1)
y | elist/elist.py | delitem_via_sibseqs | ihgazni2/elist | 0 | python | def delitem_via_sibseqs(ol, *sibseqs):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n delitem_via_sibseqs(y,1,1)\n y\n '
pathlist = list(sibseqs)
this = ol
for i in range(0, (pathlist.__len__() - 1)):
key = pathlist[i]
t... | def delitem_via_sibseqs(ol, *sibseqs):
'\n from elist.elist import *\n y = [\'a\',[\'b\',["bb"]],\'c\']\n y[1][1]\n delitem_via_sibseqs(y,1,1)\n y\n '
pathlist = list(sibseqs)
this = ol
for i in range(0, (pathlist.__len__() - 1)):
key = pathlist[i]
t... |
1ed20d9a3e34797adc1c705bdac9dd1fbef12cc8f78a39cc110b199e3924335f | def replace_seqs(ol, value, indexes, **kwargs):
'\n from elist.elist import *\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']\n id(ol)\n new = replace_seqs(ol,\'AAA\',[1,3,7])\n ol\n new\n id(ol)\n id(new)\n ####\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']... | from elist.elist import *
ol = [1,'a',3,'a',5,'a',6,'a']
id(ol)
new = replace_seqs(ol,'AAA',[1,3,7])
ol
new
id(ol)
id(new)
####
ol = [1,'a',3,'a',5,'a',6,'a']
id(ol)
rslt = replace_seqs(ol,'AAA',[1,3,7],mode="original")
ol
rslt
id(ol)
id(rslt)
#replace_indexes = replace_seqs | elist/elist.py | replace_seqs | ihgazni2/elist | 0 | python | def replace_seqs(ol, value, indexes, **kwargs):
'\n from elist.elist import *\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']\n id(ol)\n new = replace_seqs(ol,\'AAA\',[1,3,7])\n ol\n new\n id(ol)\n id(new)\n ####\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']... | def replace_seqs(ol, value, indexes, **kwargs):
'\n from elist.elist import *\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']\n id(ol)\n new = replace_seqs(ol,\'AAA\',[1,3,7])\n ol\n new\n id(ol)\n id(new)\n ####\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']... |
fee6bd0e9d2599a54b9505f6b114b300ed00927f695c56769f401c485fc34334 | def replace_some(ol, value, *indexes, **kwargs):
'\n from elist.elist import *\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']\n id(ol)\n new = replace_some(ol,\'AAA\',1,3,7)\n ol\n new\n id(ol)\n id(new)\n ####\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']\... | from elist.elist import *
ol = [1,'a',3,'a',5,'a',6,'a']
id(ol)
new = replace_some(ol,'AAA',1,3,7)
ol
new
id(ol)
id(new)
####
ol = [1,'a',3,'a',5,'a',6,'a']
id(ol)
rslt = replace_some(ol,'AAA',1,3,7,mode="original")
ol
rslt
id(ol)
id(rslt) | elist/elist.py | replace_some | ihgazni2/elist | 0 | python | def replace_some(ol, value, *indexes, **kwargs):
'\n from elist.elist import *\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']\n id(ol)\n new = replace_some(ol,\'AAA\',1,3,7)\n ol\n new\n id(ol)\n id(new)\n ####\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']\... | def replace_some(ol, value, *indexes, **kwargs):
'\n from elist.elist import *\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']\n id(ol)\n new = replace_some(ol,\'AAA\',1,3,7)\n ol\n new\n id(ol)\n id(new)\n ####\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']\... |
3c781ed002be2c9db42399f1668756212fc2e6aa6286d4952e659e168ddb1968 | def replace_value_seqs(ol, src_value, dst_value, seqs, **kwargs):
'\n from elist.elist import *\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']\n id(ol)\n new = replace_value_seqs(ol,\'a\',\'AAA\',[0,1])\n ol\n new\n id(ol)\n id(new)\n ####\n ol = [1,\'... | from elist.elist import *
ol = [1,'a',3,'a',5,'a',6,'a']
id(ol)
new = replace_value_seqs(ol,'a','AAA',[0,1])
ol
new
id(ol)
id(new)
####
ol = [1,'a',3,'a',5,'a',6,'a']
id(ol)
rslt = replace_value_seqs(ol,'a','AAA',[0,1],mode="original")
ol
rslt
id(ol)
id(rslt) | elist/elist.py | replace_value_seqs | ihgazni2/elist | 0 | python | def replace_value_seqs(ol, src_value, dst_value, seqs, **kwargs):
'\n from elist.elist import *\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']\n id(ol)\n new = replace_value_seqs(ol,\'a\',\'AAA\',[0,1])\n ol\n new\n id(ol)\n id(new)\n ####\n ol = [1,\'... | def replace_value_seqs(ol, src_value, dst_value, seqs, **kwargs):
'\n from elist.elist import *\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']\n id(ol)\n new = replace_value_seqs(ol,\'a\',\'AAA\',[0,1])\n ol\n new\n id(ol)\n id(new)\n ####\n ol = [1,\'... |
0594ccef3665d9ac5df41bea5340e5b73f408e001af61fe531b0e6e0661c616b | def replace_value_some(ol, src_value, dst_value, *seqs, **kwargs):
'\n from elist.elist import *\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']\n id(ol)\n new = replace_value_some(ol,\'a\',\'AAA\',0,1)\n ol\n new\n id(ol)\n id(new)\n ####\n ol = [1,\'a... | from elist.elist import *
ol = [1,'a',3,'a',5,'a',6,'a']
id(ol)
new = replace_value_some(ol,'a','AAA',0,1)
ol
new
id(ol)
id(new)
####
ol = [1,'a',3,'a',5,'a',6,'a']
id(ol)
rslt = replace_value_some(ol,'a','AAA',0,1,mode="original")
ol
rslt
id(ol)
id(rslt) | elist/elist.py | replace_value_some | ihgazni2/elist | 0 | python | def replace_value_some(ol, src_value, dst_value, *seqs, **kwargs):
'\n from elist.elist import *\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']\n id(ol)\n new = replace_value_some(ol,\'a\',\'AAA\',0,1)\n ol\n new\n id(ol)\n id(new)\n ####\n ol = [1,\'a... | def replace_value_some(ol, src_value, dst_value, *seqs, **kwargs):
'\n from elist.elist import *\n ol = [1,\'a\',3,\'a\',5,\'a\',6,\'a\']\n id(ol)\n new = replace_value_some(ol,\'a\',\'AAA\',0,1)\n ol\n new\n id(ol)\n id(new)\n ####\n ol = [1,\'a... |
e555c2b637df799f11ef44292de5338bde184d9f04280550a8526674012d65d6 | def cond_replace_value_all(ol, dst_value, **kwargs):
'\n from elist.elist import *\n ol = [1,\'X\',3,\'b\',5,\'c\',6,\'A\',7,\'b\',8,\'B\',9]\n id(ol)\n def afterCH(ele,ch):\n cond = (ord(str(ele)) > ord(ch))\n return(cond)\n\n new = cond_replace_value_all(ol... | from elist.elist import *
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
def afterCH(ele,ch):
cond = (ord(str(ele)) > ord(ch))
return(cond)
new = cond_replace_value_all(ol,"REPLACED",cond_func=afterCH,cond_func_args=['B'])
ol
new
id(ol)
id(new)
####
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
rslt... | elist/elist.py | cond_replace_value_all | ihgazni2/elist | 0 | python | def cond_replace_value_all(ol, dst_value, **kwargs):
'\n from elist.elist import *\n ol = [1,\'X\',3,\'b\',5,\'c\',6,\'A\',7,\'b\',8,\'B\',9]\n id(ol)\n def afterCH(ele,ch):\n cond = (ord(str(ele)) > ord(ch))\n return(cond)\n\n new = cond_replace_value_all(ol... | def cond_replace_value_all(ol, dst_value, **kwargs):
'\n from elist.elist import *\n ol = [1,\'X\',3,\'b\',5,\'c\',6,\'A\',7,\'b\',8,\'B\',9]\n id(ol)\n def afterCH(ele,ch):\n cond = (ord(str(ele)) > ord(ch))\n return(cond)\n\n new = cond_replace_value_all(ol... |
3dd51aff3d7f2ff04fb35cba1e2439692e765fd8be4015849dee477a9305c258 | def cond_replace_value_seqs(ol, dst_value, seqs, **kwargs):
'\n from elist.elist import *\n ol = [1,\'X\',3,\'b\',5,\'c\',6,\'A\',7,\'b\',8,\'B\',9]\n id(ol)\n def afterCH(ele,ch):\n cond = (ord(str(ele)) > ord(ch))\n return(cond)\n \n new = cond_repla... | from elist.elist import *
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
def afterCH(ele,ch):
cond = (ord(str(ele)) > ord(ch))
return(cond)
new = cond_replace_value_seqs(ol,"REPLACED",[0,2],cond_func=afterCH,cond_func_args=['B'])
ol
new
id(ol)
id(new)
####
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(o... | elist/elist.py | cond_replace_value_seqs | ihgazni2/elist | 0 | python | def cond_replace_value_seqs(ol, dst_value, seqs, **kwargs):
'\n from elist.elist import *\n ol = [1,\'X\',3,\'b\',5,\'c\',6,\'A\',7,\'b\',8,\'B\',9]\n id(ol)\n def afterCH(ele,ch):\n cond = (ord(str(ele)) > ord(ch))\n return(cond)\n \n new = cond_repla... | def cond_replace_value_seqs(ol, dst_value, seqs, **kwargs):
'\n from elist.elist import *\n ol = [1,\'X\',3,\'b\',5,\'c\',6,\'A\',7,\'b\',8,\'B\',9]\n id(ol)\n def afterCH(ele,ch):\n cond = (ord(str(ele)) > ord(ch))\n return(cond)\n \n new = cond_repla... |
d626cfb9516d7928c11588455e8cfbcb65e9192e856c9ab0f2bd3b18b980595b | def cond_replace_value_some(ol, dst_value, *some, **kwargs):
'\n from elist.elist import *\n ol = [1,\'X\',3,\'b\',5,\'c\',6,\'A\',7,\'b\',8,\'B\',9]\n id(ol)\n def afterCH(ele,ch):\n cond = (ord(str(ele)) > ord(ch))\n return(cond)\n \n new = cond_repl... | from elist.elist import *
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)
def afterCH(ele,ch):
cond = (ord(str(ele)) > ord(ch))
return(cond)
new = cond_replace_value_some(ol,"REPLACED",0,2,cond_func=afterCH,cond_func_args=['B'])
ol
new
id(ol)
id(new)
####
ol = [1,'X',3,'b',5,'c',6,'A',7,'b',8,'B',9]
id(ol)... | elist/elist.py | cond_replace_value_some | ihgazni2/elist | 0 | python | def cond_replace_value_some(ol, dst_value, *some, **kwargs):
'\n from elist.elist import *\n ol = [1,\'X\',3,\'b\',5,\'c\',6,\'A\',7,\'b\',8,\'B\',9]\n id(ol)\n def afterCH(ele,ch):\n cond = (ord(str(ele)) > ord(ch))\n return(cond)\n \n new = cond_repl... | def cond_replace_value_some(ol, dst_value, *some, **kwargs):
'\n from elist.elist import *\n ol = [1,\'X\',3,\'b\',5,\'c\',6,\'A\',7,\'b\',8,\'B\',9]\n id(ol)\n def afterCH(ele,ch):\n cond = (ord(str(ele)) > ord(ch))\n return(cond)\n \n new = cond_repl... |
40d5e3707d52a81cb208ddf8c92ccd6b267cc29d6641461b8783eee80dbc81b3 | def rangize(break_points, length):
'\n break_points = [1,3,9,12,-2]\n length = 15\n secs = rangize(break_points,length)\n forEach(secs,print)\n '
bps = array_map(break_points, uniform_index, length)
bps.sort()
bps = prepend(bps, 0)
bps = append(bps, length)
bps = u... | break_points = [1,3,9,12,-2]
length = 15
secs = rangize(break_points,length)
forEach(secs,print) | elist/elist.py | rangize | ihgazni2/elist | 0 | python | def rangize(break_points, length):
'\n break_points = [1,3,9,12,-2]\n length = 15\n secs = rangize(break_points,length)\n forEach(secs,print)\n '
bps = array_map(break_points, uniform_index, length)
bps.sort()
bps = prepend(bps, 0)
bps = append(bps, length)
bps = u... | def rangize(break_points, length):
'\n break_points = [1,3,9,12,-2]\n length = 15\n secs = rangize(break_points,length)\n forEach(secs,print)\n '
bps = array_map(break_points, uniform_index, length)
bps.sort()
bps = prepend(bps, 0)
bps = append(bps, length)
bps = u... |
99b165a1b95d8fa6447a04cc617f4cb96207bddc6f0c7b5695ecb749247f8e53 | def rangize_supplement(spans, lngth):
'\n spans = [(0, 3), (4, 7), (8, 10), (11, 12), (13, 16), (17, 20)]\n rangize_supplement(spans,24)\n \n '
rslt = []
si = 0
ei = spans[0][0]
if (si == ei):
pass
else:
rslt.append((si, ei))
prev_ei = spans[0][1]
... | spans = [(0, 3), (4, 7), (8, 10), (11, 12), (13, 16), (17, 20)]
rangize_supplement(spans,24) | elist/elist.py | rangize_supplement | ihgazni2/elist | 0 | python | def rangize_supplement(spans, lngth):
'\n spans = [(0, 3), (4, 7), (8, 10), (11, 12), (13, 16), (17, 20)]\n rangize_supplement(spans,24)\n \n '
rslt = []
si = 0
ei = spans[0][0]
if (si == ei):
pass
else:
rslt.append((si, ei))
prev_ei = spans[0][1]
... | def rangize_supplement(spans, lngth):
'\n spans = [(0, 3), (4, 7), (8, 10), (11, 12), (13, 16), (17, 20)]\n rangize_supplement(spans,24)\n \n '
rslt = []
si = 0
ei = spans[0][0]
if (si == ei):
pass
else:
rslt.append((si, ei))
prev_ei = spans[0][1]
... |
4eda6a8c83b623e7ee84ee4ff0330c48f6754a5ad59972ae15f12a5e3384b553 | def rangize_supp(spans, lngth):
'\n spans = [(0, 3), (4, 7), (8, 10), (11, 12), (13, 16), (17, 20)]\n rangize_supplement(spans,24)\n\n '
rslt = []
si = 0
ei = spans[0][0]
if (si == ei):
pass
else:
rslt.append((si, ei))
prev_ei = spans[0][1]
for i in range... | spans = [(0, 3), (4, 7), (8, 10), (11, 12), (13, 16), (17, 20)]
rangize_supplement(spans,24) | elist/elist.py | rangize_supp | ihgazni2/elist | 0 | python | def rangize_supp(spans, lngth):
'\n spans = [(0, 3), (4, 7), (8, 10), (11, 12), (13, 16), (17, 20)]\n rangize_supplement(spans,24)\n\n '
rslt = []
si = 0
ei = spans[0][0]
if (si == ei):
pass
else:
rslt.append((si, ei))
prev_ei = spans[0][1]
for i in range... | def rangize_supp(spans, lngth):
'\n spans = [(0, 3), (4, 7), (8, 10), (11, 12), (13, 16), (17, 20)]\n rangize_supplement(spans,24)\n\n '
rslt = []
si = 0
ei = spans[0][0]
if (si == ei):
pass
else:
rslt.append((si, ei))
prev_ei = spans[0][1]
for i in range... |
e368a26dd95b994f4636ea8f82ea2857cb063dfe80a474d968dafb62286179f7 | def range_compress(ol):
"\n #only support sorted-ints or sorted-ascii\n l = [1,5,6,7,8,13,14,18,30,31,32,33,34]\n range_compress(l)\n l = [1,5,6,7,8,13,14,18,30,31,32,33,34,40]\n range_compress(l)\n l = ['a','b','c','d','j','k','l','m','n','u','y','z']\n range_compre... | #only support sorted-ints or sorted-ascii
l = [1,5,6,7,8,13,14,18,30,31,32,33,34]
range_compress(l)
l = [1,5,6,7,8,13,14,18,30,31,32,33,34,40]
range_compress(l)
l = ['a','b','c','d','j','k','l','m','n','u','y','z']
range_compress(l) | elist/elist.py | range_compress | ihgazni2/elist | 0 | python | def range_compress(ol):
"\n #only support sorted-ints or sorted-ascii\n l = [1,5,6,7,8,13,14,18,30,31,32,33,34]\n range_compress(l)\n l = [1,5,6,7,8,13,14,18,30,31,32,33,34,40]\n range_compress(l)\n l = ['a','b','c','d','j','k','l','m','n','u','y','z']\n range_compre... | def range_compress(ol):
"\n #only support sorted-ints or sorted-ascii\n l = [1,5,6,7,8,13,14,18,30,31,32,33,34]\n range_compress(l)\n l = [1,5,6,7,8,13,14,18,30,31,32,33,34,40]\n range_compress(l)\n l = ['a','b','c','d','j','k','l','m','n','u','y','z']\n range_compre... |
78feb9aadabe0928e2b8787ae812d4d4085994cb9889f572e0818052d3459cb9 | def range_decompress(cl):
"\n #only support sorted-ints or sorted-ascii\n cl = [1, (5, 8), (13, 14), 18, (30, 34)]\n range_decompress(cl)\n cl = [1, (5, 8), (13, 14), 18, (30, 34), 40]\n range_decompress(cl)\n cl = [('a', 'd'), ('j', 'n'), 'u', ('y', 'z')]\n range_de... | #only support sorted-ints or sorted-ascii
cl = [1, (5, 8), (13, 14), 18, (30, 34)]
range_decompress(cl)
cl = [1, (5, 8), (13, 14), 18, (30, 34), 40]
range_decompress(cl)
cl = [('a', 'd'), ('j', 'n'), 'u', ('y', 'z')]
range_decompress(cl) | elist/elist.py | range_decompress | ihgazni2/elist | 0 | python | def range_decompress(cl):
"\n #only support sorted-ints or sorted-ascii\n cl = [1, (5, 8), (13, 14), 18, (30, 34)]\n range_decompress(cl)\n cl = [1, (5, 8), (13, 14), 18, (30, 34), 40]\n range_decompress(cl)\n cl = [('a', 'd'), ('j', 'n'), 'u', ('y', 'z')]\n range_de... | def range_decompress(cl):
"\n #only support sorted-ints or sorted-ascii\n cl = [1, (5, 8), (13, 14), 18, (30, 34)]\n range_decompress(cl)\n cl = [1, (5, 8), (13, 14), 18, (30, 34), 40]\n range_decompress(cl)\n cl = [('a', 'd'), ('j', 'n'), 'u', ('y', 'z')]\n range_de... |
f4bff1cd9e484ef4988a8a9ed312931f12a7cbe0d42c5ebe07a1d0fd49441d4d | def interval_sizes2brks(sizes):
'\n >>> interval_sizes2brks([1,4,6,4])\n [1, 5, 11, 15]\n >>>\n '
rslt = []
acc = 0
for i in range(len(sizes)):
acc = (acc + sizes[i])
rslt.append(acc)
return rslt | >>> interval_sizes2brks([1,4,6,4])
[1, 5, 11, 15]
>>> | elist/elist.py | interval_sizes2brks | ihgazni2/elist | 0 | python | def interval_sizes2brks(sizes):
'\n >>> interval_sizes2brks([1,4,6,4])\n [1, 5, 11, 15]\n >>>\n '
rslt = []
acc = 0
for i in range(len(sizes)):
acc = (acc + sizes[i])
rslt.append(acc)
return rslt | def interval_sizes2brks(sizes):
'\n >>> interval_sizes2brks([1,4,6,4])\n [1, 5, 11, 15]\n >>>\n '
rslt = []
acc = 0
for i in range(len(sizes)):
acc = (acc + sizes[i])
rslt.append(acc)
return rslt<|docstring|>>>> interval_sizes2brks([1,4,6,4])
[1, 5, 11, 15]
>>... |
4a602b5469123bc6389e7a6dcd1cfcd644df03ea35644335a18cb0b12440e650 | def is_list(obj):
'\n from elist.elist import *\n is_list([1,2,3])\n is_list(200)\n '
if (type(obj) == type([])):
return True
else:
return False | from elist.elist import *
is_list([1,2,3])
is_list(200) | elist/elist.py | is_list | ihgazni2/elist | 0 | python | def is_list(obj):
'\n from elist.elist import *\n is_list([1,2,3])\n is_list(200)\n '
if (type(obj) == type([])):
return True
else:
return False | def is_list(obj):
'\n from elist.elist import *\n is_list([1,2,3])\n is_list(200)\n '
if (type(obj) == type([])):
return True
else:
return False<|docstring|>from elist.elist import *
is_list([1,2,3])
is_list(200)<|endoftext|> |
1e6744460fcf96f5995e26da6256ff3667eefc14e2c069ff8e583db1fc0a3f49 | def broken_seqs(ol, break_points):
'\n ol = initRange(0,20,1)\n ol\n break_points = [1,6,14,9]\n secs = broken_seqs(ol,break_points)\n forEach(secs,print)\n '
bps = list(break_points)
length = ol.__len__()
rgs = rangize(bps, length)
rslt = []
for i in range(... | ol = initRange(0,20,1)
ol
break_points = [1,6,14,9]
secs = broken_seqs(ol,break_points)
forEach(secs,print) | elist/elist.py | broken_seqs | ihgazni2/elist | 0 | python | def broken_seqs(ol, break_points):
'\n ol = initRange(0,20,1)\n ol\n break_points = [1,6,14,9]\n secs = broken_seqs(ol,break_points)\n forEach(secs,print)\n '
bps = list(break_points)
length = ol.__len__()
rgs = rangize(bps, length)
rslt = []
for i in range(... | def broken_seqs(ol, break_points):
'\n ol = initRange(0,20,1)\n ol\n break_points = [1,6,14,9]\n secs = broken_seqs(ol,break_points)\n forEach(secs,print)\n '
bps = list(break_points)
length = ol.__len__()
rgs = rangize(bps, length)
rslt = []
for i in range(... |
fa529e8664f0816ec2ea9c73d120e0a92c8361727361bf215dc3cb38a990158c | def broken_some(ol, *break_points):
'\n ol = initRange(0,20,1)\n ol\n secs = broken_some(ol,1,6,14,9)\n forEach(secs,print)\n '
bps = list(break_points)
return broken_seqs(ol, bps) | ol = initRange(0,20,1)
ol
secs = broken_some(ol,1,6,14,9)
forEach(secs,print) | elist/elist.py | broken_some | ihgazni2/elist | 0 | python | def broken_some(ol, *break_points):
'\n ol = initRange(0,20,1)\n ol\n secs = broken_some(ol,1,6,14,9)\n forEach(secs,print)\n '
bps = list(break_points)
return broken_seqs(ol, bps) | def broken_some(ol, *break_points):
'\n ol = initRange(0,20,1)\n ol\n secs = broken_some(ol,1,6,14,9)\n forEach(secs,print)\n '
bps = list(break_points)
return broken_seqs(ol, bps)<|docstring|>ol = initRange(0,20,1)
ol
secs = broken_some(ol,1,6,14,9)
forEach(secs,print)<|endof... |
ae4b194201400b72cf13d20c4fefb1cae879714866b7c6f3c811cf81964e1c37 | def brkl2kvlist(arr, interval, sub_pos=1, **kwargs):
'\n arr = ["color1","r1","g1","b1","a1","color2","r2","g2","b2","a2"]\n brkl2kvlist(arr,5)\n ([\'color1\', \'color2\'], [[\'r1\', \'g1\', \'b1\', \'a1\'], [\'r2\', \'g2\', \'b2\', \'a2\']])\n brkl2kvlist(arr,5,2)\n ([[\'color1\'... | arr = ["color1","r1","g1","b1","a1","color2","r2","g2","b2","a2"]
brkl2kvlist(arr,5)
(['color1', 'color2'], [['r1', 'g1', 'b1', 'a1'], ['r2', 'g2', 'b2', 'a2']])
brkl2kvlist(arr,5,2)
([['color1', 'r1'], ['color2', 'r2']], [['g1', 'b1', 'a1'], ['g2', 'b2', 'a2']]) | elist/elist.py | brkl2kvlist | ihgazni2/elist | 0 | python | def brkl2kvlist(arr, interval, sub_pos=1, **kwargs):
'\n arr = ["color1","r1","g1","b1","a1","color2","r2","g2","b2","a2"]\n brkl2kvlist(arr,5)\n ([\'color1\', \'color2\'], [[\'r1\', \'g1\', \'b1\', \'a1\'], [\'r2\', \'g2\', \'b2\', \'a2\']])\n brkl2kvlist(arr,5,2)\n ([[\'color1\'... | def brkl2kvlist(arr, interval, sub_pos=1, **kwargs):
'\n arr = ["color1","r1","g1","b1","a1","color2","r2","g2","b2","a2"]\n brkl2kvlist(arr,5)\n ([\'color1\', \'color2\'], [[\'r1\', \'g1\', \'b1\', \'a1\'], [\'r2\', \'g2\', \'b2\', \'a2\']])\n brkl2kvlist(arr,5,2)\n ([[\'color1\'... |
8cae4d03ef4f78ec77254580ec2fe4c97e88dcec522c39abd1953a0ac8d83e56 | def divide(ol, interval):
'\n #\n ol = elel.initRange(0,20,1)\n interval = 3\n rslt = elel.divide(ol,interval)\n rslt\n rslt = elel.divide(ol,4)\n rslt\n '
length = ol.__len__()
seqs = initRange(0, length, interval)
rslt = broken_seqs(ol, seqs)
ret... | #
ol = elel.initRange(0,20,1)
interval = 3
rslt = elel.divide(ol,interval)
rslt
rslt = elel.divide(ol,4)
rslt | elist/elist.py | divide | ihgazni2/elist | 0 | python | def divide(ol, interval):
'\n #\n ol = elel.initRange(0,20,1)\n interval = 3\n rslt = elel.divide(ol,interval)\n rslt\n rslt = elel.divide(ol,4)\n rslt\n '
length = ol.__len__()
seqs = initRange(0, length, interval)
rslt = broken_seqs(ol, seqs)
ret... | def divide(ol, interval):
'\n #\n ol = elel.initRange(0,20,1)\n interval = 3\n rslt = elel.divide(ol,interval)\n rslt\n rslt = elel.divide(ol,4)\n rslt\n '
length = ol.__len__()
seqs = initRange(0, length, interval)
rslt = broken_seqs(ol, seqs)
ret... |
663fe5a7598f4d5dc1e059bf3ba6e6cf4130edf201e08cd945a617e166de8eea | def padding(l, lngth, val):
'\n >>> padding([1,2,3],6,0)\n [1, 2, 3, 0, 0, 0]\n >>>\n '
llen = len(l)
if (llen >= lngth):
return l
else:
tail = init((lngth - llen), val)
return (l + tail) | >>> padding([1,2,3],6,0)
[1, 2, 3, 0, 0, 0]
>>> | elist/elist.py | padding | ihgazni2/elist | 0 | python | def padding(l, lngth, val):
'\n >>> padding([1,2,3],6,0)\n [1, 2, 3, 0, 0, 0]\n >>>\n '
llen = len(l)
if (llen >= lngth):
return l
else:
tail = init((lngth - llen), val)
return (l + tail) | def padding(l, lngth, val):
'\n >>> padding([1,2,3],6,0)\n [1, 2, 3, 0, 0, 0]\n >>>\n '
llen = len(l)
if (llen >= lngth):
return l
else:
tail = init((lngth - llen), val)
return (l + tail)<|docstring|>>>> padding([1,2,3],6,0)
[1, 2, 3, 0, 0, 0]
>>><|endofte... |
175c561a8950f07ef0f75c8d93182e58497b244e75b79c37fa25784b789364cd | def prepadding(l, lngth, val):
'\n >>> prepadding([1,2,3],6,0)\n [0, 0, 0, 1, 2, 3]\n >>>\n '
llen = len(l)
if (llen >= lngth):
return l
else:
hl = init((lngth - llen), val)
return (hl + l) | >>> prepadding([1,2,3],6,0)
[0, 0, 0, 1, 2, 3]
>>> | elist/elist.py | prepadding | ihgazni2/elist | 0 | python | def prepadding(l, lngth, val):
'\n >>> prepadding([1,2,3],6,0)\n [0, 0, 0, 1, 2, 3]\n >>>\n '
llen = len(l)
if (llen >= lngth):
return l
else:
hl = init((lngth - llen), val)
return (hl + l) | def prepadding(l, lngth, val):
'\n >>> prepadding([1,2,3],6,0)\n [0, 0, 0, 1, 2, 3]\n >>>\n '
llen = len(l)
if (llen >= lngth):
return l
else:
hl = init((lngth - llen), val)
return (hl + l)<|docstring|>>>> prepadding([1,2,3],6,0)
[0, 0, 0, 1, 2, 3]
>>><|en... |
dbae1d5ed04651385a571afb7b40797fd62cfafea450b6a386138e29bd9a8a68 | def split(ol, value, **kwargs):
"\n ol = ['a',1,'a',2,'a',3,'a',4,'a']\n split(ol,'a')\n split(ol,'a',whiches=[0])\n split(ol,'a',whiches=[1])\n split(ol,'a',whiches=[2])\n split(ol,'a',whiches=[0,2])\n ol = [1,'a',2,'a',3,'a',4]\n split(ol,'a')\n split... | ol = ['a',1,'a',2,'a',3,'a',4,'a']
split(ol,'a')
split(ol,'a',whiches=[0])
split(ol,'a',whiches=[1])
split(ol,'a',whiches=[2])
split(ol,'a',whiches=[0,2])
ol = [1,'a',2,'a',3,'a',4]
split(ol,'a')
split('x=bcdsef=g','=',whiches=[0]) | elist/elist.py | split | ihgazni2/elist | 0 | python | def split(ol, value, **kwargs):
"\n ol = ['a',1,'a',2,'a',3,'a',4,'a']\n split(ol,'a')\n split(ol,'a',whiches=[0])\n split(ol,'a',whiches=[1])\n split(ol,'a',whiches=[2])\n split(ol,'a',whiches=[0,2])\n ol = [1,'a',2,'a',3,'a',4]\n split(ol,'a')\n split... | def split(ol, value, **kwargs):
"\n ol = ['a',1,'a',2,'a',3,'a',4,'a']\n split(ol,'a')\n split(ol,'a',whiches=[0])\n split(ol,'a',whiches=[1])\n split(ol,'a',whiches=[2])\n split(ol,'a',whiches=[0,2])\n ol = [1,'a',2,'a',3,'a',4]\n split(ol,'a')\n split... |
0d484a9350869eff1c3e03f68ecbfdc337bbba418f2c1f4ce20054d948149fc4 | def where(ol, value):
'\n ol = [0, 4, 6, 8, 10, 14]\n where(ol,-1)\n where(ol,1)\n where(ol,2)\n where(ol,3)\n where(ol,4)\n where(ol,9)\n where(ol,14)\n where(ol,17)\n '
si = None
ei = None
for i in range(0, ol.__len__()):
ele = ... | ol = [0, 4, 6, 8, 10, 14]
where(ol,-1)
where(ol,1)
where(ol,2)
where(ol,3)
where(ol,4)
where(ol,9)
where(ol,14)
where(ol,17) | elist/elist.py | where | ihgazni2/elist | 0 | python | def where(ol, value):
'\n ol = [0, 4, 6, 8, 10, 14]\n where(ol,-1)\n where(ol,1)\n where(ol,2)\n where(ol,3)\n where(ol,4)\n where(ol,9)\n where(ol,14)\n where(ol,17)\n '
si = None
ei = None
for i in range(0, ol.__len__()):
ele = ... | def where(ol, value):
'\n ol = [0, 4, 6, 8, 10, 14]\n where(ol,-1)\n where(ol,1)\n where(ol,2)\n where(ol,3)\n where(ol,4)\n where(ol,9)\n where(ol,14)\n where(ol,17)\n '
si = None
ei = None
for i in range(0, ol.__len__()):
ele = ... |
cf3984b60359a902338d9aac083366549b165f85c8647d9cb2da4e8b8f8e25be | def value_interval(ol, value):
'\n ol = [0, 4, 6, 8, 10, 14]\n value_interval(ol,-1)\n value_interval(ol,1)\n value_interval(ol,2)\n value_interval(ol,3)\n value_interval(ol,4)\n value_interval(ol,9)\n value_interval(ol,14)\n value_interval(ol,17)\n ... | ol = [0, 4, 6, 8, 10, 14]
value_interval(ol,-1)
value_interval(ol,1)
value_interval(ol,2)
value_interval(ol,3)
value_interval(ol,4)
value_interval(ol,9)
value_interval(ol,14)
value_interval(ol,17) | elist/elist.py | value_interval | ihgazni2/elist | 0 | python | def value_interval(ol, value):
'\n ol = [0, 4, 6, 8, 10, 14]\n value_interval(ol,-1)\n value_interval(ol,1)\n value_interval(ol,2)\n value_interval(ol,3)\n value_interval(ol,4)\n value_interval(ol,9)\n value_interval(ol,14)\n value_interval(ol,17)\n ... | def value_interval(ol, value):
'\n ol = [0, 4, 6, 8, 10, 14]\n value_interval(ol,-1)\n value_interval(ol,1)\n value_interval(ol,2)\n value_interval(ol,3)\n value_interval(ol,4)\n value_interval(ol,9)\n value_interval(ol,14)\n value_interval(ol,17)\n ... |
e3c7df9958649ece210e0f42d6b7594929f00d7e23ac36399d52eeccf188e50a | def upper_bound(ol, value):
'\n ol = [0, 4, 6, 8, 10, 14]\n upper_bound(ol,-1)\n upper_bound(ol,1)\n upper_bound(ol,2)\n upper_bound(ol,3)\n upper_bound(ol,4)\n upper_bound(ol,9)\n upper_bound(ol,14)\n upper_bound(ol,17)\n '
return value_interval... | ol = [0, 4, 6, 8, 10, 14]
upper_bound(ol,-1)
upper_bound(ol,1)
upper_bound(ol,2)
upper_bound(ol,3)
upper_bound(ol,4)
upper_bound(ol,9)
upper_bound(ol,14)
upper_bound(ol,17) | elist/elist.py | upper_bound | ihgazni2/elist | 0 | python | def upper_bound(ol, value):
'\n ol = [0, 4, 6, 8, 10, 14]\n upper_bound(ol,-1)\n upper_bound(ol,1)\n upper_bound(ol,2)\n upper_bound(ol,3)\n upper_bound(ol,4)\n upper_bound(ol,9)\n upper_bound(ol,14)\n upper_bound(ol,17)\n '
return value_interval... | def upper_bound(ol, value):
'\n ol = [0, 4, 6, 8, 10, 14]\n upper_bound(ol,-1)\n upper_bound(ol,1)\n upper_bound(ol,2)\n upper_bound(ol,3)\n upper_bound(ol,4)\n upper_bound(ol,9)\n upper_bound(ol,14)\n upper_bound(ol,17)\n '
return value_interval... |
fe81c0ab89acf479bc5f166a61f776631926bc191707d7d220e05e3eafaf3484 | def lower_bound(ol, value):
'\n ol = [0, 4, 6, 8, 10, 14]\n lower_bound(ol,-1)\n lower_bound(ol,1)\n lower_bound(ol,2)\n lower_bound(ol,3)\n lower_bound(ol,4)\n lower_bound(ol,9)\n lower_bound(ol,14)\n lower_bound(ol,17)\n '
return value_interval... | ol = [0, 4, 6, 8, 10, 14]
lower_bound(ol,-1)
lower_bound(ol,1)
lower_bound(ol,2)
lower_bound(ol,3)
lower_bound(ol,4)
lower_bound(ol,9)
lower_bound(ol,14)
lower_bound(ol,17) | elist/elist.py | lower_bound | ihgazni2/elist | 0 | python | def lower_bound(ol, value):
'\n ol = [0, 4, 6, 8, 10, 14]\n lower_bound(ol,-1)\n lower_bound(ol,1)\n lower_bound(ol,2)\n lower_bound(ol,3)\n lower_bound(ol,4)\n lower_bound(ol,9)\n lower_bound(ol,14)\n lower_bound(ol,17)\n '
return value_interval... | def lower_bound(ol, value):
'\n ol = [0, 4, 6, 8, 10, 14]\n lower_bound(ol,-1)\n lower_bound(ol,1)\n lower_bound(ol,2)\n lower_bound(ol,3)\n lower_bound(ol,4)\n lower_bound(ol,9)\n lower_bound(ol,14)\n lower_bound(ol,17)\n '
return value_interval... |
623420f80081ee0da0076801cb43a8990ec8ff061d44435f99f1c87ebaf30b53 | def rand_sub(arr, *args, **kwargs):
"\n arr = ['scheme', 'username', 'password', 'hostname', 'port', 'path', 'params', 'query', 'fragment']\n rand_sub(arr,3)\n rand_sub(arr,3)\n rand_sub(arr,3)\n rand_sub(arr)\n rand_sub(arr)\n rand_sub(arr)\n "
arr = copy.dee... | arr = ['scheme', 'username', 'password', 'hostname', 'port', 'path', 'params', 'query', 'fragment']
rand_sub(arr,3)
rand_sub(arr,3)
rand_sub(arr,3)
rand_sub(arr)
rand_sub(arr)
rand_sub(arr) | elist/elist.py | rand_sub | ihgazni2/elist | 0 | python | def rand_sub(arr, *args, **kwargs):
"\n arr = ['scheme', 'username', 'password', 'hostname', 'port', 'path', 'params', 'query', 'fragment']\n rand_sub(arr,3)\n rand_sub(arr,3)\n rand_sub(arr,3)\n rand_sub(arr)\n rand_sub(arr)\n rand_sub(arr)\n "
arr = copy.dee... | def rand_sub(arr, *args, **kwargs):
"\n arr = ['scheme', 'username', 'password', 'hostname', 'port', 'path', 'params', 'query', 'fragment']\n rand_sub(arr,3)\n rand_sub(arr,3)\n rand_sub(arr,3)\n rand_sub(arr)\n rand_sub(arr)\n rand_sub(arr)\n "
arr = copy.dee... |
0e1a2f035150b764559aefad4d5fca76f96a8c36bd2e4e364a4e2485cfaa92d7 | def is_leaf(obj):
'\n the below is for nested-list\n any type is not list will be treated as a leaf\n empty list will be treated as a leaf\n from elist.elist import *\n is_leaf(1)\n is_leaf([1,2,3])\n is_leaf([])\n '
if is_list(obj):
length = obj.__len... | the below is for nested-list
any type is not list will be treated as a leaf
empty list will be treated as a leaf
from elist.elist import *
is_leaf(1)
is_leaf([1,2,3])
is_leaf([]) | elist/elist.py | is_leaf | ihgazni2/elist | 0 | python | def is_leaf(obj):
'\n the below is for nested-list\n any type is not list will be treated as a leaf\n empty list will be treated as a leaf\n from elist.elist import *\n is_leaf(1)\n is_leaf([1,2,3])\n is_leaf([])\n '
if is_list(obj):
length = obj.__len... | def is_leaf(obj):
'\n the below is for nested-list\n any type is not list will be treated as a leaf\n empty list will be treated as a leaf\n from elist.elist import *\n is_leaf(1)\n is_leaf([1,2,3])\n is_leaf([])\n '
if is_list(obj):
length = obj.__len... |
f03a2ef8f78109785520e5b7c17df5ce751c139ca6190024fa0432c66ea5cb98 | def new_ele_description(**kwargs):
'\n from elist.elist import *\n from elist.jprint import pobj\n root_desc = new_ele_description(leaf=False,depth=0,breadth_path=[],path=[],parent_path=[],parent_breadth_path=[])\n pobj(root_desc)\n #None means not handled\n '
desc = {'leaf... | from elist.elist import *
from elist.jprint import pobj
root_desc = new_ele_description(leaf=False,depth=0,breadth_path=[],path=[],parent_path=[],parent_breadth_path=[])
pobj(root_desc)
#None means not handled | elist/elist.py | new_ele_description | ihgazni2/elist | 0 | python | def new_ele_description(**kwargs):
'\n from elist.elist import *\n from elist.jprint import pobj\n root_desc = new_ele_description(leaf=False,depth=0,breadth_path=[],path=[],parent_path=[],parent_breadth_path=[])\n pobj(root_desc)\n #None means not handled\n '
desc = {'leaf... | def new_ele_description(**kwargs):
'\n from elist.elist import *\n from elist.jprint import pobj\n root_desc = new_ele_description(leaf=False,depth=0,breadth_path=[],path=[],parent_path=[],parent_breadth_path=[])\n pobj(root_desc)\n #None means not handled\n '
desc = {'leaf... |
105c19427693cd1fca398c1ba795af24df9d3bc54be5301df6b997bb233ff4b8 | def root_list(*args):
'\n from elist.elist import *\n from elist.jprint import pobj\n root_list([1],2,[1,2,3])\n '
return list(args) | from elist.elist import *
from elist.jprint import pobj
root_list([1],2,[1,2,3]) | elist/elist.py | root_list | ihgazni2/elist | 0 | python | def root_list(*args):
'\n from elist.elist import *\n from elist.jprint import pobj\n root_list([1],2,[1,2,3])\n '
return list(args) | def root_list(*args):
'\n from elist.elist import *\n from elist.jprint import pobj\n root_list([1],2,[1,2,3])\n '
return list(args)<|docstring|>from elist.elist import *
from elist.jprint import pobj
root_list([1],2,[1,2,3])<|endoftext|> |
57d0de13d098908e82654bbc97b7f6dde7ff933dc897bba83a8b0ff97dd482c9 | def init_desc_matrix(l):
'\n from elist.elist import *\n from elist.jprint import pobj\n l = [1,[4],2,[3,[5,6]]]\n desc_matrix = init_desc_matrix(l)\n pobj(desc_matrix)\n '
leaf = is_leaf(l)
root_desc = new_ele_description(leaf=leaf, depth=0, breadth_path=[], path=[], p... | from elist.elist import *
from elist.jprint import pobj
l = [1,[4],2,[3,[5,6]]]
desc_matrix = init_desc_matrix(l)
pobj(desc_matrix) | elist/elist.py | init_desc_matrix | ihgazni2/elist | 0 | python | def init_desc_matrix(l):
'\n from elist.elist import *\n from elist.jprint import pobj\n l = [1,[4],2,[3,[5,6]]]\n desc_matrix = init_desc_matrix(l)\n pobj(desc_matrix)\n '
leaf = is_leaf(l)
root_desc = new_ele_description(leaf=leaf, depth=0, breadth_path=[], path=[], p... | def init_desc_matrix(l):
'\n from elist.elist import *\n from elist.jprint import pobj\n l = [1,[4],2,[3,[5,6]]]\n desc_matrix = init_desc_matrix(l)\n pobj(desc_matrix)\n '
leaf = is_leaf(l)
root_desc = new_ele_description(leaf=leaf, depth=0, breadth_path=[], path=[], p... |
e1c23e73d15a684da3708240a999be2ba412fc9c0eae2d96673a5ab30b1549a8 | def reset_parent_desc_template(desc):
'\n from elist.elist import *\n from elist.jprint import pobj\n pobj(desc)\n tem = reset_parent_desc_template(desc)\n pobj(tem)\n #only inherit path and breadth_path\n '
tem = new_ele_description()
tem['path'] = desc['path']... | from elist.elist import *
from elist.jprint import pobj
pobj(desc)
tem = reset_parent_desc_template(desc)
pobj(tem)
#only inherit path and breadth_path | elist/elist.py | reset_parent_desc_template | ihgazni2/elist | 0 | python | def reset_parent_desc_template(desc):
'\n from elist.elist import *\n from elist.jprint import pobj\n pobj(desc)\n tem = reset_parent_desc_template(desc)\n pobj(tem)\n #only inherit path and breadth_path\n '
tem = new_ele_description()
tem['path'] = desc['path']... | def reset_parent_desc_template(desc):
'\n from elist.elist import *\n from elist.jprint import pobj\n pobj(desc)\n tem = reset_parent_desc_template(desc)\n pobj(tem)\n #only inherit path and breadth_path\n '
tem = new_ele_description()
tem['path'] = desc['path']... |
407d23d0cbf34acde40bcb040c41f8b41a94f0cf7bdc9e6e1e6d046bd1278983 | def _init_unhandled(l, inited_matrix):
"\n from elist.elist import *\n from elist.jprint import pobj\n l = [1,[4],2,[3,[5,6]]]\n desc_matrix = init_desc_matrix(l)\n unhandled = _init_unhandled(l,desc_matrix)\n unhandled_data = unhandled['data']\n unhandled_desc = unh... | from elist.elist import *
from elist.jprint import pobj
l = [1,[4],2,[3,[5,6]]]
desc_matrix = init_desc_matrix(l)
unhandled = _init_unhandled(l,desc_matrix)
unhandled_data = unhandled['data']
unhandled_desc = unhandled['desc']
unhandled_data[0]
unhandled_desc[0]
unhandled_data[1]
unhandled_desc[1] | elist/elist.py | _init_unhandled | ihgazni2/elist | 0 | python | def _init_unhandled(l, inited_matrix):
"\n from elist.elist import *\n from elist.jprint import pobj\n l = [1,[4],2,[3,[5,6]]]\n desc_matrix = init_desc_matrix(l)\n unhandled = _init_unhandled(l,desc_matrix)\n unhandled_data = unhandled['data']\n unhandled_desc = unh... | def _init_unhandled(l, inited_matrix):
"\n from elist.elist import *\n from elist.jprint import pobj\n l = [1,[4],2,[3,[5,6]]]\n desc_matrix = init_desc_matrix(l)\n unhandled = _init_unhandled(l,desc_matrix)\n unhandled_data = unhandled['data']\n unhandled_desc = unh... |
1ee8275e0c7643190ffd337a1fb47d223a9a1f346af58789b5929f8f84795cdb | def update_desc_lsib_path(desc):
'\n leftSibling\n previousSibling\n leftSib\n prevSib\n lsib\n psib\n \n have the same parent,and on the left\n '
if (desc['sib_seq'] > 0):
lsib_path = copy.deepcopy(desc['path'])
lsib_path[(- 1)] = (desc... | leftSibling
previousSibling
leftSib
prevSib
lsib
psib
have the same parent,and on the left | elist/elist.py | update_desc_lsib_path | ihgazni2/elist | 0 | python | def update_desc_lsib_path(desc):
'\n leftSibling\n previousSibling\n leftSib\n prevSib\n lsib\n psib\n \n have the same parent,and on the left\n '
if (desc['sib_seq'] > 0):
lsib_path = copy.deepcopy(desc['path'])
lsib_path[(- 1)] = (desc... | def update_desc_lsib_path(desc):
'\n leftSibling\n previousSibling\n leftSib\n prevSib\n lsib\n psib\n \n have the same parent,and on the left\n '
if (desc['sib_seq'] > 0):
lsib_path = copy.deepcopy(desc['path'])
lsib_path[(- 1)] = (desc... |
f09985f61378b420debd02e3b738ae6c1d15d59cf04a35b75ba282b3c4c160b8 | def update_desc_rsib_path(desc, sibs_len):
'\n rightSibling\n nextSibling\n rightSib\n nextSib\n rsib\n nsib\n \n have the same parent,and on the right\n '
if (desc['sib_seq'] < (sibs_len - 1)):
rsib_path = copy.deepcopy(desc['path'])
rs... | rightSibling
nextSibling
rightSib
nextSib
rsib
nsib
have the same parent,and on the right | elist/elist.py | update_desc_rsib_path | ihgazni2/elist | 0 | python | def update_desc_rsib_path(desc, sibs_len):
'\n rightSibling\n nextSibling\n rightSib\n nextSib\n rsib\n nsib\n \n have the same parent,and on the right\n '
if (desc['sib_seq'] < (sibs_len - 1)):
rsib_path = copy.deepcopy(desc['path'])
rs... | def update_desc_rsib_path(desc, sibs_len):
'\n rightSibling\n nextSibling\n rightSib\n nextSib\n rsib\n nsib\n \n have the same parent,and on the right\n '
if (desc['sib_seq'] < (sibs_len - 1)):
rsib_path = copy.deepcopy(desc['path'])
rs... |
c2f04c9a314c3fd45340aca2df8bb1d73e445798efddb61d9305306a89c4a78e | def update_desc_lcin_path(desc, pdesc_level):
'\n leftCousin\n previousCousin\n leftCin\n prevCin\n lcin\n pcin\n \n parents are neighbors,and on the left\n '
parent_breadth = desc['parent_breadth_path'][(- 1)]
if (desc['sib_seq'] == 0):
if ... | leftCousin
previousCousin
leftCin
prevCin
lcin
pcin
parents are neighbors,and on the left | elist/elist.py | update_desc_lcin_path | ihgazni2/elist | 0 | python | def update_desc_lcin_path(desc, pdesc_level):
'\n leftCousin\n previousCousin\n leftCin\n prevCin\n lcin\n pcin\n \n parents are neighbors,and on the left\n '
parent_breadth = desc['parent_breadth_path'][(- 1)]
if (desc['sib_seq'] == 0):
if ... | def update_desc_lcin_path(desc, pdesc_level):
'\n leftCousin\n previousCousin\n leftCin\n prevCin\n lcin\n pcin\n \n parents are neighbors,and on the left\n '
parent_breadth = desc['parent_breadth_path'][(- 1)]
if (desc['sib_seq'] == 0):
if ... |
8f01f4736ec39cac7fcecf1e2299de4fcba37483603d43e20f5c168030c68199 | def update_desc_rcin_path(desc, sibs_len, pdesc_level):
'\n rightCousin\n nextCousin\n rightCin\n nextCin\n rcin\n ncin\n \n parents are neighbors,and on the right\n '
psibs_len = pdesc_level.__len__()
parent_breadth = desc['parent_breadth_path'][(-... | rightCousin
nextCousin
rightCin
nextCin
rcin
ncin
parents are neighbors,and on the right | elist/elist.py | update_desc_rcin_path | ihgazni2/elist | 0 | python | def update_desc_rcin_path(desc, sibs_len, pdesc_level):
'\n rightCousin\n nextCousin\n rightCin\n nextCin\n rcin\n ncin\n \n parents are neighbors,and on the right\n '
psibs_len = pdesc_level.__len__()
parent_breadth = desc['parent_breadth_path'][(-... | def update_desc_rcin_path(desc, sibs_len, pdesc_level):
'\n rightCousin\n nextCousin\n rightCin\n nextCin\n rcin\n ncin\n \n parents are neighbors,and on the right\n '
psibs_len = pdesc_level.__len__()
parent_breadth = desc['parent_breadth_path'][(-... |
7d5eca489f3e841daeaff0987f4957e0ddd25dee0abccb848dfbb1ea66437215 | def scan(l, **kwargs):
'\n from elist.elist import *\n from elist.jprint import pobj\n l = [1,[4],2,[3,[5,6]]]\n desc = description(l)\n l = [1,2,[4],[3,[5,6]]]\n desc = description(l)\n '
if ('itermode' in kwargs):
itermode = True
else:
itermode ... | from elist.elist import *
from elist.jprint import pobj
l = [1,[4],2,[3,[5,6]]]
desc = description(l)
l = [1,2,[4],[3,[5,6]]]
desc = description(l) | elist/elist.py | scan | ihgazni2/elist | 0 | python | def scan(l, **kwargs):
'\n from elist.elist import *\n from elist.jprint import pobj\n l = [1,[4],2,[3,[5,6]]]\n desc = description(l)\n l = [1,2,[4],[3,[5,6]]]\n desc = description(l)\n '
if ('itermode' in kwargs):
itermode = True
else:
itermode ... | def scan(l, **kwargs):
'\n from elist.elist import *\n from elist.jprint import pobj\n l = [1,[4],2,[3,[5,6]]]\n desc = description(l)\n l = [1,2,[4],[3,[5,6]]]\n desc = description(l)\n '
if ('itermode' in kwargs):
itermode = True
else:
itermode ... |
3058aa9a3590df7f71c877eb1e0ddc2ea3da45951da741d41432145e9e563d4e | def fullfill_descendants_info(desc_matrix):
'\n flat_offset\n '
pathloc_mapping = {}
locpath_mapping = {}
def leaf_handler(desc, pdesc):
desc['non_leaf_son_paths'] = []
desc['leaf_son_paths'] = []
desc['non_leaf_descendant_paths'] = []
desc['leaf_descendant_path... | flat_offset | elist/elist.py | fullfill_descendants_info | ihgazni2/elist | 0 | python | def fullfill_descendants_info(desc_matrix):
'\n \n '
pathloc_mapping = {}
locpath_mapping = {}
def leaf_handler(desc, pdesc):
desc['non_leaf_son_paths'] = []
desc['leaf_son_paths'] = []
desc['non_leaf_descendant_paths'] = []
desc['leaf_descendant_paths'] = []
... | def fullfill_descendants_info(desc_matrix):
'\n \n '
pathloc_mapping = {}
locpath_mapping = {}
def leaf_handler(desc, pdesc):
desc['non_leaf_son_paths'] = []
desc['leaf_son_paths'] = []
desc['non_leaf_descendant_paths'] = []
desc['leaf_descendant_paths'] = []
... |
1b1f76b221ed9e6e271dc3de6c0fb9f64e60ce0f38be2f8d1eb2087dae8c9c93 | def pathlist_to_getStr(path_list):
'\n >>> pathlist_to_getStr([1, \'1\', 2])\n "[1][\'1\'][2]"\n >>>\n '
t1 = path_list.__repr__()
t1 = t1.lstrip('[')
t1 = t1.rstrip(']')
t2 = t1.split(', ')
s = ''
for i in range(0, t2.__len__()):
s = ''.join((s, '[', t2[i... | >>> pathlist_to_getStr([1, '1', 2])
"[1]['1'][2]"
>>> | elist/elist.py | pathlist_to_getStr | ihgazni2/elist | 0 | python | def pathlist_to_getStr(path_list):
'\n >>> pathlist_to_getStr([1, \'1\', 2])\n "[1][\'1\'][2]"\n >>>\n '
t1 = path_list.__repr__()
t1 = t1.lstrip('[')
t1 = t1.rstrip(']')
t2 = t1.split(', ')
s =
for i in range(0, t2.__len__()):
s = .join((s, '[', t2[i], '... | def pathlist_to_getStr(path_list):
'\n >>> pathlist_to_getStr([1, \'1\', 2])\n "[1][\'1\'][2]"\n >>>\n '
t1 = path_list.__repr__()
t1 = t1.lstrip('[')
t1 = t1.rstrip(']')
t2 = t1.split(', ')
s =
for i in range(0, t2.__len__()):
s = .join((s, '[', t2[i], '... |
86fa8e9f5f4d53d8b5218675d5e4e6211478f37945e54d5a6294b77a78e4f8fd | def getStr_to_pathlist(gs):
'\n gs = "[1][\'1\'][2]"\n getStr_to_pathlist(gs)\n gs = "[\'u\'][\'u1\']"\n getStr_to_pathlist(gs)\n '
def numize(w):
try:
int(w)
except:
try:
float(w)
except:
return ... | gs = "[1]['1'][2]"
getStr_to_pathlist(gs)
gs = "['u']['u1']"
getStr_to_pathlist(gs) | elist/elist.py | getStr_to_pathlist | ihgazni2/elist | 0 | python | def getStr_to_pathlist(gs):
'\n gs = "[1][\'1\'][2]"\n getStr_to_pathlist(gs)\n gs = "[\'u\'][\'u1\']"\n getStr_to_pathlist(gs)\n '
def numize(w):
try:
int(w)
except:
try:
float(w)
except:
return ... | def getStr_to_pathlist(gs):
'\n gs = "[1][\'1\'][2]"\n getStr_to_pathlist(gs)\n gs = "[\'u\'][\'u1\']"\n getStr_to_pathlist(gs)\n '
def numize(w):
try:
int(w)
except:
try:
float(w)
except:
return ... |
2dd5bb4d78488e163238cd593b169e22610a3b51e3e3b5eb64d684316f3c0e1b | def get_block_op_pairs(pairs_str):
'\n # >>> get_block_op_pairs("{}[]") \n # {1: (\'{\', \'}\'), 2: (\'[\', \']\')}\n # >>> get_block_op_pairs("{}[]()")\n # {1: (\'{\', \'}\'), 2: (\'[\', \']\'), 3: (\'(\', \')\')}\n # >>> get_block_op_pairs("{}[]()<>")\n # {1: (\'{\', \'}... | # >>> get_block_op_pairs("{}[]")
# {1: ('{', '}'), 2: ('[', ']')}
# >>> get_block_op_pairs("{}[]()")
# {1: ('{', '}'), 2: ('[', ']'), 3: ('(', ')')}
# >>> get_block_op_pairs("{}[]()<>")
# {1: ('{', '}'), 2: ('[', ']'), 3: ('(', ')'), 4: ('<', '>')} | elist/elist.py | get_block_op_pairs | ihgazni2/elist | 0 | python | def get_block_op_pairs(pairs_str):
'\n # >>> get_block_op_pairs("{}[]") \n # {1: (\'{\', \'}\'), 2: (\'[\', \']\')}\n # >>> get_block_op_pairs("{}[]()")\n # {1: (\'{\', \'}\'), 2: (\'[\', \']\'), 3: (\'(\', \')\')}\n # >>> get_block_op_pairs("{}[]()<>")\n # {1: (\'{\', \'}... | def get_block_op_pairs(pairs_str):
'\n # >>> get_block_op_pairs("{}[]") \n # {1: (\'{\', \'}\'), 2: (\'[\', \']\')}\n # >>> get_block_op_pairs("{}[]()")\n # {1: (\'{\', \'}\'), 2: (\'[\', \']\'), 3: (\'(\', \')\')}\n # >>> get_block_op_pairs("{}[]()<>")\n # {1: (\'{\', \'}... |
db204048d49b99ba34efddaf277ed82a2d5962b166cf99f95f362d0409062f1b | def is_lop(ch, block_op_pairs_dict=get_block_op_pairs('{}[]()')):
"\n # is_lop('{',block_op_pairs_dict)\n # is_lop('[',block_op_pairs_dict)\n # is_lop('}',block_op_pairs_dict)\n # is_lop(']',block_op_pairs_dict)\n # is_lop('a',block_op_pairs_dict)\n "
for i in range(1, (block_op_pairs_dict.__l... | # is_lop('{',block_op_pairs_dict)
# is_lop('[',block_op_pairs_dict)
# is_lop('}',block_op_pairs_dict)
# is_lop(']',block_op_pairs_dict)
# is_lop('a',block_op_pairs_dict) | elist/elist.py | is_lop | ihgazni2/elist | 0 | python | def is_lop(ch, block_op_pairs_dict=get_block_op_pairs('{}[]()')):
"\n # is_lop('{',block_op_pairs_dict)\n # is_lop('[',block_op_pairs_dict)\n # is_lop('}',block_op_pairs_dict)\n # is_lop(']',block_op_pairs_dict)\n # is_lop('a',block_op_pairs_dict)\n "
for i in range(1, (block_op_pairs_dict.__l... | def is_lop(ch, block_op_pairs_dict=get_block_op_pairs('{}[]()')):
"\n # is_lop('{',block_op_pairs_dict)\n # is_lop('[',block_op_pairs_dict)\n # is_lop('}',block_op_pairs_dict)\n # is_lop(']',block_op_pairs_dict)\n # is_lop('a',block_op_pairs_dict)\n "
for i in range(1, (block_op_pairs_dict.__l... |
49ed998af74a4580628df3293d48751d268a42d4dc92d2bf002d5e32aef5ce34 | def is_rop(ch, block_op_pairs_dict=get_block_op_pairs('{}[]()')):
"\n # is_rop('{',block_op_pairs_dict)\n # is_rop('[',block_op_pairs_dict)\n # is_rop('}',block_op_pairs_dict)\n # is_rop(']',block_op_pairs_dict)\n # is_rop('a',block_op_pairs_dict)\n "
for i in range(1, (blo... | # is_rop('{',block_op_pairs_dict)
# is_rop('[',block_op_pairs_dict)
# is_rop('}',block_op_pairs_dict)
# is_rop(']',block_op_pairs_dict)
# is_rop('a',block_op_pairs_dict) | elist/elist.py | is_rop | ihgazni2/elist | 0 | python | def is_rop(ch, block_op_pairs_dict=get_block_op_pairs('{}[]()')):
"\n # is_rop('{',block_op_pairs_dict)\n # is_rop('[',block_op_pairs_dict)\n # is_rop('}',block_op_pairs_dict)\n # is_rop(']',block_op_pairs_dict)\n # is_rop('a',block_op_pairs_dict)\n "
for i in range(1, (blo... | def is_rop(ch, block_op_pairs_dict=get_block_op_pairs('{}[]()')):
"\n # is_rop('{',block_op_pairs_dict)\n # is_rop('[',block_op_pairs_dict)\n # is_rop('}',block_op_pairs_dict)\n # is_rop(']',block_op_pairs_dict)\n # is_rop('a',block_op_pairs_dict)\n "
for i in range(1, (blo... |
ced4fe6ba98fd94b23eb87fec79c9b8ef13d6257bcb14af8aa2929fe022d4c76 | def get_next_char_level_in_j_str(curr_lv, curr_seq, j_str, block_op_pairs_dict=get_block_op_pairs('{}[]()')):
' the first-char is level-1\n when current is non-op, next-char-level = curr-level\n when current is lop, non-paired-rop-next-char-level = lop-level+1;\n when current is lop, paire... | the first-char is level-1
when current is non-op, next-char-level = curr-level
when current is lop, non-paired-rop-next-char-level = lop-level+1;
when current is lop, paired-rop-next-char-level = lop-level
when current is rop, next-char-level = rop-level - 1
# {"key_4_UF0a... | elist/elist.py | get_next_char_level_in_j_str | ihgazni2/elist | 0 | python | def get_next_char_level_in_j_str(curr_lv, curr_seq, j_str, block_op_pairs_dict=get_block_op_pairs('{}[]()')):
' the first-char is level-1\n when current is non-op, next-char-level = curr-level\n when current is lop, non-paired-rop-next-char-level = lop-level+1;\n when current is lop, paire... | def get_next_char_level_in_j_str(curr_lv, curr_seq, j_str, block_op_pairs_dict=get_block_op_pairs('{}[]()')):
' the first-char is level-1\n when current is non-op, next-char-level = curr-level\n when current is lop, non-paired-rop-next-char-level = lop-level+1;\n when current is lop, paire... |
d69b082c3e27dcf42a52752be9364c8b5a6c2d1b9818040e1473c0b787ee5dd1 | def str_display_width(s):
"\n from elist.utils import *\n str_display_width('a')\n str_display_width('去')\n "
s = str(s)
width = 0
len = s.__len__()
for i in range(0, len):
sublen = s[i].encode().__len__()
sublen = int(((sublen / 2) + (1 / 2)))
width =... | from elist.utils import *
str_display_width('a')
str_display_width('去') | elist/elist.py | str_display_width | ihgazni2/elist | 0 | python | def str_display_width(s):
"\n from elist.utils import *\n str_display_width('a')\n str_display_width('去')\n "
s = str(s)
width = 0
len = s.__len__()
for i in range(0, len):
sublen = s[i].encode().__len__()
sublen = int(((sublen / 2) + (1 / 2)))
width =... | def str_display_width(s):
"\n from elist.utils import *\n str_display_width('a')\n str_display_width('去')\n "
s = str(s)
width = 0
len = s.__len__()
for i in range(0, len):
sublen = s[i].encode().__len__()
sublen = int(((sublen / 2) + (1 / 2)))
width =... |
0b84411d26b5c5fdf8e27003b6bea59df173f6a6596bb512f5e2ac920e5955a7 | def matrix_map(mat, map_func, map_func_args=[]):
'\n mat = [\n [1,2,3],\n [4,5,6],\n [7,8,9]\n ]\n \n def map_func(value,indexr,indexc,prefix,suffix):\n msg = prefix + str((indexr,indexc)) + " : "+str(value) + suffix\n return(msg)\n ... | mat = [
[1,2,3],
[4,5,6],
[7,8,9]
]
def map_func(value,indexr,indexc,prefix,suffix):
msg = prefix + str((indexr,indexc)) + " : "+str(value) + suffix
return(msg)
mmat = matrix_map(mat,map_func,map_func_args=["<",">"])
mmat | elist/elist.py | matrix_map | ihgazni2/elist | 0 | python | def matrix_map(mat, map_func, map_func_args=[]):
'\n mat = [\n [1,2,3],\n [4,5,6],\n [7,8,9]\n ]\n \n def map_func(value,indexr,indexc,prefix,suffix):\n msg = prefix + str((indexr,indexc)) + " : "+str(value) + suffix\n return(msg)\n ... | def matrix_map(mat, map_func, map_func_args=[]):
'\n mat = [\n [1,2,3],\n [4,5,6],\n [7,8,9]\n ]\n \n def map_func(value,indexr,indexc,prefix,suffix):\n msg = prefix + str((indexr,indexc)) + " : "+str(value) + suffix\n return(msg)\n ... |
aff3d71374e63f8e53a9719493ba2803ca642004d8998e9bc37f7db54cdc91c5 | def get_dfs(l):
"\n l = ['v_7', 'v_3', 'v_1', 'v_4', ['v_4', 'v_2'], 'v_5', 'v_6', 'v_1', 'v_6', 'v_7', 'v_5', ['v_4', ['v_1', 'v_8', 'v_3', 'v_4', 'v_2', 'v_7', [['v_3', 'v_2'], 'v_4', 'v_5', 'v_1', 'v_3', 'v_1', 'v_2', 'v_5', 'v_8', 'v_8', 'v_7'], 'v_5', 'v_8', 'v_7', 'v_1', 'v_5'], 'v_6'], 'v_4', 'v_5', '... | l = ['v_7', 'v_3', 'v_1', 'v_4', ['v_4', 'v_2'], 'v_5', 'v_6', 'v_1', 'v_6', 'v_7', 'v_5', ['v_4', ['v_1', 'v_8', 'v_3', 'v_4', 'v_2', 'v_7', [['v_3', 'v_2'], 'v_4', 'v_5', 'v_1', 'v_3', 'v_1', 'v_2', 'v_5', 'v_8', 'v_8', 'v_7'], 'v_5', 'v_8', 'v_7', 'v_1', 'v_5'], 'v_6'], 'v_4', 'v_5', 'v_8', 'v_5']
dfs = get_dfs(l) | elist/elist.py | get_dfs | ihgazni2/elist | 0 | python | def get_dfs(l):
"\n l = ['v_7', 'v_3', 'v_1', 'v_4', ['v_4', 'v_2'], 'v_5', 'v_6', 'v_1', 'v_6', 'v_7', 'v_5', ['v_4', ['v_1', 'v_8', 'v_3', 'v_4', 'v_2', 'v_7', [['v_3', 'v_2'], 'v_4', 'v_5', 'v_1', 'v_3', 'v_1', 'v_2', 'v_5', 'v_8', 'v_8', 'v_7'], 'v_5', 'v_8', 'v_7', 'v_1', 'v_5'], 'v_6'], 'v_4', 'v_5', '... | def get_dfs(l):
"\n l = ['v_7', 'v_3', 'v_1', 'v_4', ['v_4', 'v_2'], 'v_5', 'v_6', 'v_1', 'v_6', 'v_7', 'v_5', ['v_4', ['v_1', 'v_8', 'v_3', 'v_4', 'v_2', 'v_7', [['v_3', 'v_2'], 'v_4', 'v_5', 'v_1', 'v_3', 'v_1', 'v_2', 'v_5', 'v_8', 'v_8', 'v_7'], 'v_5', 'v_8', 'v_7', 'v_1', 'v_5'], 'v_6'], 'v_4', 'v_5', '... |
a3bdd663f9f31c0247233327cf59ef71597b3cac935f80ec1a40cf089c7014f4 | def get_wfsmat(l):
"\n l = ['v_7', 'v_3', 'v_1', 'v_4', ['v_4', 'v_2'], 'v_5', 'v_6', 'v_1', 'v_6', 'v_7', 'v_5', ['v_4', ['v_1', 'v_8', 'v_3', 'v_4', 'v_2', 'v_7', [['v_3', 'v_2'], 'v_4', 'v_5', 'v_1', 'v_3', 'v_1', 'v_2', 'v_5', 'v_8', 'v_8', 'v_7'], 'v_5', 'v_8', 'v_7', 'v_1', 'v_5'], 'v_6'], 'v_4', 'v_5',... | l = ['v_7', 'v_3', 'v_1', 'v_4', ['v_4', 'v_2'], 'v_5', 'v_6', 'v_1', 'v_6', 'v_7', 'v_5', ['v_4', ['v_1', 'v_8', 'v_3', 'v_4', 'v_2', 'v_7', [['v_3', 'v_2'], 'v_4', 'v_5', 'v_1', 'v_3', 'v_1', 'v_2', 'v_5', 'v_8', 'v_8', 'v_7'], 'v_5', 'v_8', 'v_7', 'v_1', 'v_5'], 'v_6'], 'v_4', 'v_5', 'v_8', 'v_5']
get_wfs(l) | elist/elist.py | get_wfsmat | ihgazni2/elist | 0 | python | def get_wfsmat(l):
"\n l = ['v_7', 'v_3', 'v_1', 'v_4', ['v_4', 'v_2'], 'v_5', 'v_6', 'v_1', 'v_6', 'v_7', 'v_5', ['v_4', ['v_1', 'v_8', 'v_3', 'v_4', 'v_2', 'v_7', [['v_3', 'v_2'], 'v_4', 'v_5', 'v_1', 'v_3', 'v_1', 'v_2', 'v_5', 'v_8', 'v_8', 'v_7'], 'v_5', 'v_8', 'v_7', 'v_1', 'v_5'], 'v_6'], 'v_4', 'v_5',... | def get_wfsmat(l):
"\n l = ['v_7', 'v_3', 'v_1', 'v_4', ['v_4', 'v_2'], 'v_5', 'v_6', 'v_1', 'v_6', 'v_7', 'v_5', ['v_4', ['v_1', 'v_8', 'v_3', 'v_4', 'v_2', 'v_7', [['v_3', 'v_2'], 'v_4', 'v_5', 'v_1', 'v_3', 'v_1', 'v_2', 'v_5', 'v_8', 'v_8', 'v_7'], 'v_5', 'v_8', 'v_7', 'v_1', 'v_5'], 'v_6'], 'v_4', 'v_5',... |
5210f872d971ecdf1ab0c310893c6ac26fc817bea3330ac85500df3106c17510 | def wfs2mat(wfs):
'\n wfs = [[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [4, 0], [4, 1], [11, 0], [11, 1], [11, 2], [11, 1, 0], [11, 1, 1], [11, 1, 2], [11, 1, 3], [11, 1, 4], [11, 1, 5], [11, 1, 6], [11, 1, 7], [11, 1, 8], [11, 1, 9], [11, 1, 10], [11, 1, 11], [11, ... | wfs = [[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [4, 0], [4, 1], [11, 0], [11, 1], [11, 2], [11, 1, 0], [11, 1, 1], [11, 1, 2], [11, 1, 3], [11, 1, 4], [11, 1, 5], [11, 1, 6], [11, 1, 7], [11, 1, 8], [11, 1, 9], [11, 1, 10], [11, 1, 11], [11, 1, 6, 0], [11, 1, 6, 1], [11, 1, ... | elist/elist.py | wfs2mat | ihgazni2/elist | 0 | python | def wfs2mat(wfs):
'\n \n '
wfsmat = []
depth = 0
level = filter(wfs, (lambda ele: (ele.__len__() == 1)))
while (level.__len__() > 0):
wfsmat.append([])
wfsmat[depth] = level
depth = (depth + 1)
level = filter(wfs, (lambda ele: (ele.__len__() == (depth + 1)))... | def wfs2mat(wfs):
'\n \n '
wfsmat = []
depth = 0
level = filter(wfs, (lambda ele: (ele.__len__() == 1)))
while (level.__len__() > 0):
wfsmat.append([])
wfsmat[depth] = level
depth = (depth + 1)
level = filter(wfs, (lambda ele: (ele.__len__() == (depth + 1)))... |
3a548c02bdabe5cddf50273ef53c6a4c644e687cacefe5bdde39d688c8e8c7f7 | def dfs2wfsmat(dfs):
'\n dfs = [[0], [1], [2], [3], [4], [4, 0], [4, 1], [5], [6], [7], [8], [9], [10], [11], [11, 0], [11, 1], [11, 1, 0], [11, 1, 1], [11, 1, 2], [11, 1, 3], [11, 1, 4], [11, 1, 5], [11, 1, 6], [11, 1, 6, 0], [11, 1, 6, 0, 0], [11, 1, 6, 0, 1], [11, 1, 6, 1], [11, 1, 6, 2], [11, 1, 6, 3], [... | dfs = [[0], [1], [2], [3], [4], [4, 0], [4, 1], [5], [6], [7], [8], [9], [10], [11], [11, 0], [11, 1], [11, 1, 0], [11, 1, 1], [11, 1, 2], [11, 1, 3], [11, 1, 4], [11, 1, 5], [11, 1, 6], [11, 1, 6, 0], [11, 1, 6, 0, 0], [11, 1, 6, 0, 1], [11, 1, 6, 1], [11, 1, 6, 2], [11, 1, 6, 3], [11, 1, 6, 4], [11, 1, 6, 5], [11, 1,... | elist/elist.py | dfs2wfsmat | ihgazni2/elist | 0 | python | def dfs2wfsmat(dfs):
'\n dfs = [[0], [1], [2], [3], [4], [4, 0], [4, 1], [5], [6], [7], [8], [9], [10], [11], [11, 0], [11, 1], [11, 1, 0], [11, 1, 1], [11, 1, 2], [11, 1, 3], [11, 1, 4], [11, 1, 5], [11, 1, 6], [11, 1, 6, 0], [11, 1, 6, 0, 0], [11, 1, 6, 0, 1], [11, 1, 6, 1], [11, 1, 6, 2], [11, 1, 6, 3], [... | def dfs2wfsmat(dfs):
'\n dfs = [[0], [1], [2], [3], [4], [4, 0], [4, 1], [5], [6], [7], [8], [9], [10], [11], [11, 0], [11, 1], [11, 1, 0], [11, 1, 1], [11, 1, 2], [11, 1, 3], [11, 1, 4], [11, 1, 5], [11, 1, 6], [11, 1, 6, 0], [11, 1, 6, 0, 0], [11, 1, 6, 0, 1], [11, 1, 6, 1], [11, 1, 6, 2], [11, 1, 6, 3], [... |
b9841910fac71ae6733abdc409446dccf20a31d9250eda8299de9e7cbaae796c | def wfsmat2dfs(wfsmat):
'\n wfs = [[[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15]], [[4, 0], [4, 1], [11, 0], [11, 1], [11, 2]], [[11, 1, 0], [11, 1, 1], [11, 1, 2], [11, 1, 3], [11, 1, 4], [11, 1, 5], [11, 1, 6], [11, 1, 7], [11, 1, 8], [11, 1, 9], [11, 1, 10], [11, 1,... | wfs = [[[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15]], [[4, 0], [4, 1], [11, 0], [11, 1], [11, 2]], [[11, 1, 0], [11, 1, 1], [11, 1, 2], [11, 1, 3], [11, 1, 4], [11, 1, 5], [11, 1, 6], [11, 1, 7], [11, 1, 8], [11, 1, 9], [11, 1, 10], [11, 1, 11]], [[11, 1, 6, 0], [11, 1, 6, 1], [... | elist/elist.py | wfsmat2dfs | ihgazni2/elist | 0 | python | def wfsmat2dfs(wfsmat):
'\n wfs = [[[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15]], [[4, 0], [4, 1], [11, 0], [11, 1], [11, 2]], [[11, 1, 0], [11, 1, 1], [11, 1, 2], [11, 1, 3], [11, 1, 4], [11, 1, 5], [11, 1, 6], [11, 1, 7], [11, 1, 8], [11, 1, 9], [11, 1, 10], [11, 1,... | def wfsmat2dfs(wfsmat):
'\n wfs = [[[0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15]], [[4, 0], [4, 1], [11, 0], [11, 1], [11, 2]], [[11, 1, 0], [11, 1, 1], [11, 1, 2], [11, 1, 3], [11, 1, 4], [11, 1, 5], [11, 1, 6], [11, 1, 7], [11, 1, 8], [11, 1, 9], [11, 1, 10], [11, 1,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.