partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
valid
insert_some
from elist.elist import * ol = [1,2,3,4] id(ol) insert_some(ol,5,6,7,8,index=2,mode="original") ol id(ol) #### ol = [1,2,3,4] id(ol) new = insert_some(ol,5,6,7,8,index=2) new id(new)
elist/elist.py
def insert_some(ol,*eles,**kwargs): ''' from elist.elist import * ol = [1,2,3,4] id(ol) insert_some(ol,5,6,7,8,index=2,mode="original") ol id(ol) #### ol = [1,2,3,4] id(ol) new = insert_some(ol,5,6,7,8,index=2) new id(ne...
def insert_some(ol,*eles,**kwargs): ''' from elist.elist import * ol = [1,2,3,4] id(ol) insert_some(ol,5,6,7,8,index=2,mode="original") ol id(ol) #### ol = [1,2,3,4] id(ol) new = insert_some(ol,5,6,7,8,index=2) new id(ne...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "2", "3", "4", "]", "id", "(", "ol", ")", "insert_some", "(", "ol", "5", "6", "7", "8", "index", "=", "2", "mode", "=", "original", ")", "ol", "id", "(", "ol", ")", "####", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L1402-L1438
[ "def", "insert_some", "(", "ol", ",", "*", "eles", ",", "*", "*", "kwargs", ")", ":", "start_index", "=", "kwargs", "[", "'index'", "]", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode"...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
insert_many
from elist.elist import * ol = [1,2,3,4,5] eles = [7,77,777] locs = [0,2,4] id(ol) new = insert_many(ol,eles,locs) ol new id(new) #### ol = [1,2,3,4,5] eles = [7,77,777] locs = [0,2,4] id(ol) rslt = insert_ma...
elist/elist.py
def insert_many(ol,eles,locs,**kwargs): ''' from elist.elist import * ol = [1,2,3,4,5] eles = [7,77,777] locs = [0,2,4] id(ol) new = insert_many(ol,eles,locs) ol new id(new) #### ol = [1,2,3,4,5] eles = [7,77,777] ...
def insert_many(ol,eles,locs,**kwargs): ''' from elist.elist import * ol = [1,2,3,4,5] eles = [7,77,777] locs = [0,2,4] id(ol) new = insert_many(ol,eles,locs) ol new id(new) #### ol = [1,2,3,4,5] eles = [7,77,777] ...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "2", "3", "4", "5", "]", "eles", "=", "[", "7", "77", "777", "]", "locs", "=", "[", "0", "2", "4", "]", "id", "(", "ol", ")", "new", "=", "insert_many", "(", "ol", "eles", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L1440-L1498
[ "def", "insert_many", "(", "ol", ",", "eles", ",", "locs", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "\"new\"", "eles", "=", "copy", "....
8c07b5029bda34ead60ce10335ceb145f209263c
valid
insert_sections_some
ol = initRange(0,20,1) ol loc = 6 rslt = insert_sections_some(ol,['a','a','a'],['c','c','c','c'],index=loc) rslt ####
elist/elist.py
def insert_sections_some(ol,*secs,**kwargs): ''' ol = initRange(0,20,1) ol loc = 6 rslt = insert_sections_some(ol,['a','a','a'],['c','c','c','c'],index=loc) rslt #### ''' if('mode' in kwargs): mode = kwargs["mode"] else: mode = "new" lo...
def insert_sections_some(ol,*secs,**kwargs): ''' ol = initRange(0,20,1) ol loc = 6 rslt = insert_sections_some(ol,['a','a','a'],['c','c','c','c'],index=loc) rslt #### ''' if('mode' in kwargs): mode = kwargs["mode"] else: mode = "new" lo...
[ "ol", "=", "initRange", "(", "0", "20", "1", ")", "ol", "loc", "=", "6", "rslt", "=", "insert_sections_some", "(", "ol", "[", "a", "a", "a", "]", "[", "c", "c", "c", "c", "]", "index", "=", "loc", ")", "rslt", "####" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L1500-L1517
[ "def", "insert_sections_some", "(", "ol", ",", "*", "secs", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "\"new\"", "loc", "=", "kwargs", "[...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
insert_section
ol = initRange(0,20,1) ol loc = 6 sec = ['a','b','c','d'] rslt = insert_section(ol,sec,loc) rslt ####
elist/elist.py
def insert_section(ol,sec,loc,**kwargs): ''' ol = initRange(0,20,1) ol loc = 6 sec = ['a','b','c','d'] rslt = insert_section(ol,sec,loc) rslt #### ''' if('mode' in kwargs): mode = kwargs["mode"] else: mode = "new" secs = [sec] ...
def insert_section(ol,sec,loc,**kwargs): ''' ol = initRange(0,20,1) ol loc = 6 sec = ['a','b','c','d'] rslt = insert_section(ol,sec,loc) rslt #### ''' if('mode' in kwargs): mode = kwargs["mode"] else: mode = "new" secs = [sec] ...
[ "ol", "=", "initRange", "(", "0", "20", "1", ")", "ol", "loc", "=", "6", "sec", "=", "[", "a", "b", "c", "d", "]", "rslt", "=", "insert_section", "(", "ol", "sec", "loc", ")", "rslt", "####" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L1520-L1536
[ "def", "insert_section", "(", "ol", ",", "sec", ",", "loc", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "\"new\"", "secs", "=", "[", "sec...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
insert_sections_many
ol = initRange(0,20,1) ol locs = [1,6,14,9] secs = [ ['a','a','a'], ['b','b'], ['c','c','c','c'], ['d','d'] ] rslt = insert_sections_many(ol,secs,locs) rslt #### ol locs = [0,3,6,9,12,15,16] s...
elist/elist.py
def insert_sections_many(ol,secs,locs,**kwargs): ''' ol = initRange(0,20,1) ol locs = [1,6,14,9] secs = [ ['a','a','a'], ['b','b'], ['c','c','c','c'], ['d','d'] ] rslt = insert_sections_many(ol,secs,locs) rslt ...
def insert_sections_many(ol,secs,locs,**kwargs): ''' ol = initRange(0,20,1) ol locs = [1,6,14,9] secs = [ ['a','a','a'], ['b','b'], ['c','c','c','c'], ['d','d'] ] rslt = insert_sections_many(ol,secs,locs) rslt ...
[ "ol", "=", "initRange", "(", "0", "20", "1", ")", "ol", "locs", "=", "[", "1", "6", "14", "9", "]", "secs", "=", "[", "[", "a", "a", "a", "]", "[", "b", "b", "]", "[", "c", "c", "c", "c", "]", "[", "d", "d", "]", "]", "rslt", "=", "...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L1538-L1629
[ "def", "insert_sections_many", "(", "ol", ",", "secs", ",", "locs", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "\"new\"", "secs", "=", "co...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
reorder_sub
sub = ['query', 'params', 'fragment', 'path'] ol = ['scheme', 'username', 'password', 'hostname', 'port', 'path', 'params', 'query', 'fragment'] reorder_sub(ol,sub)
elist/elist.py
def reorder_sub(ol,sub): ''' sub = ['query', 'params', 'fragment', 'path'] ol = ['scheme', 'username', 'password', 'hostname', 'port', 'path', 'params', 'query', 'fragment'] reorder_sub(ol,sub) ''' def cond_func(ele,ol): index = ol.index(ele) return(index) indexes...
def reorder_sub(ol,sub): ''' sub = ['query', 'params', 'fragment', 'path'] ol = ['scheme', 'username', 'password', 'hostname', 'port', 'path', 'params', 'query', 'fragment'] reorder_sub(ol,sub) ''' def cond_func(ele,ol): index = ol.index(ele) return(index) indexes...
[ "sub", "=", "[", "query", "params", "fragment", "path", "]", "ol", "=", "[", "scheme", "username", "password", "hostname", "port", "path", "params", "query", "fragment", "]", "reorder_sub", "(", "ol", "sub", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L1633-L1644
[ "def", "reorder_sub", "(", "ol", ",", "sub", ")", ":", "def", "cond_func", "(", "ele", ",", "ol", ")", ":", "index", "=", "ol", ".", "index", "(", "ele", ")", "return", "(", "index", ")", "indexes", "=", "array_map", "(", "sub", ",", "cond_func", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
sort
from elist.elist import * ol = [1,3,4,2] id(ol) new = sort(ol) ol new id(ol) id(new) #### ol = [1,3,4,2] id(ol) rslt = sort(ol,mode="original") ol rslt id(ol) id(rslt)
elist/elist.py
def sort(ol,**kwargs): ''' from elist.elist import * ol = [1,3,4,2] id(ol) new = sort(ol) ol new id(ol) id(new) #### ol = [1,3,4,2] id(ol) rslt = sort(ol,mode="original") ol rslt id(ol) id...
def sort(ol,**kwargs): ''' from elist.elist import * ol = [1,3,4,2] id(ol) new = sort(ol) ol new id(ol) id(new) #### ol = [1,3,4,2] id(ol) rslt = sort(ol,mode="original") ol rslt id(ol) id...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "3", "4", "2", "]", "id", "(", "ol", ")", "new", "=", "sort", "(", "ol", ")", "ol", "new", "id", "(", "ol", ")", "id", "(", "new", ")", "####", "ol", "=", "[", "1", "3", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L1648-L1677
[ "def", "sort", "(", "ol", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "\"new\"", "if", "(", "mode", "==", "\"new\"", ")", ":", "new", "...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
sorted_refer_to
from elist.elist import * l = ["a","b","c"] referer = [7,8,6] sorted_refer_to(l,referer) {'list': ['c', 'a', 'b'], 'referer': [6, 7, 8]} l referer >>>
elist/elist.py
def sorted_refer_to(l,referer,reverse=False,**kwargs): ''' from elist.elist import * l = ["a","b","c"] referer = [7,8,6] sorted_refer_to(l,referer) {'list': ['c', 'a', 'b'], 'referer': [6, 7, 8]} l referer >>> ''' if("mode" in kwargs): ...
def sorted_refer_to(l,referer,reverse=False,**kwargs): ''' from elist.elist import * l = ["a","b","c"] referer = [7,8,6] sorted_refer_to(l,referer) {'list': ['c', 'a', 'b'], 'referer': [6, 7, 8]} l referer >>> ''' if("mode" in kwargs): ...
[ "from", "elist", ".", "elist", "import", "*", "l", "=", "[", "a", "b", "c", "]", "referer", "=", "[", "7", "8", "6", "]", "sorted_refer_to", "(", "l", "referer", ")", "{", "list", ":", "[", "c", "a", "b", "]", "referer", ":", "[", "6", "7", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L1679-L1710
[ "def", "sorted_refer_to", "(", "l", ",", "referer", ",", "reverse", "=", "False", ",", "*", "*", "kwargs", ")", ":", "if", "(", "\"mode\"", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "\"both\"", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
batsorted
from elist.elist import * referer = [4,2,3,1] l1 = ['a','b','c','d'] l2 = [100,200,300,400] l3 = ['A','B','A','B'] nl1,nl2,nl3 = batsorted(referer,l1,l2,l3) nl1 nl2 nl3 nl1,nl2,nl3 = batsorted(referer,l1,l2,l3,reverse=True) nl1 nl2 ...
elist/elist.py
def batsorted(referer,*lists,**kwargs): ''' from elist.elist import * referer = [4,2,3,1] l1 = ['a','b','c','d'] l2 = [100,200,300,400] l3 = ['A','B','A','B'] nl1,nl2,nl3 = batsorted(referer,l1,l2,l3) nl1 nl2 nl3 nl1,nl2,nl3 = batsorted...
def batsorted(referer,*lists,**kwargs): ''' from elist.elist import * referer = [4,2,3,1] l1 = ['a','b','c','d'] l2 = [100,200,300,400] l3 = ['A','B','A','B'] nl1,nl2,nl3 = batsorted(referer,l1,l2,l3) nl1 nl2 nl3 nl1,nl2,nl3 = batsorted...
[ "from", "elist", ".", "elist", "import", "*", "referer", "=", "[", "4", "2", "3", "1", "]", "l1", "=", "[", "a", "b", "c", "d", "]", "l2", "=", "[", "100", "200", "300", "400", "]", "l3", "=", "[", "A", "B", "A", "B", "]", "nl1", "nl2", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L1712-L1750
[ "def", "batsorted", "(", "referer", ",", "*", "lists", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'reverse'", "in", "kwargs", ")", ":", "reverse", "=", "kwargs", "[", "'reverse'", "]", "else", ":", "reverse", "=", "False", "length", "=", "referer...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
sortDictList
students = [ {'name':'john','class':'A', 'year':15}, {'name':'jane','class':'B', 'year':12}, {'name':'dave','class':'B', 'year':10} ] rslt = sortDictList(students,cond_keys=['name','class','year']) pobj(rslt) rslt = sortDictList(students,cond_...
elist/elist.py
def sortDictList(dictList,**kwargs): ''' students = [ {'name':'john','class':'A', 'year':15}, {'name':'jane','class':'B', 'year':12}, {'name':'dave','class':'B', 'year':10} ] rslt = sortDictList(students,cond_keys=['name','class','year']) ...
def sortDictList(dictList,**kwargs): ''' students = [ {'name':'john','class':'A', 'year':15}, {'name':'jane','class':'B', 'year':12}, {'name':'dave','class':'B', 'year':10} ] rslt = sortDictList(students,cond_keys=['name','class','year']) ...
[ "students", "=", "[", "{", "name", ":", "john", "class", ":", "A", "year", ":", "15", "}", "{", "name", ":", "jane", "class", ":", "B", "year", ":", "12", "}", "{", "name", ":", "dave", "class", ":", "B", "year", ":", "10", "}", "]", "rslt", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L1777-L1842
[ "def", "sortDictList", "(", "dictList", ",", "*", "*", "kwargs", ")", ":", "def", "default_eq_func", "(", "value1", ",", "value2", ")", ":", "cond", "=", "(", "value1", "==", "value2", ")", "return", "(", "cond", ")", "def", "default_gt_func", "(", "va...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
index_firstnot
from elist.elist import * ol = [1,'a',3,'a',4,'a',5] index_firstnot(ol,'a') ####index_firstnot, array_indexnot, indexOfnot are the same array_indexnot(ol,'a') indexOfnot(ol,'a')
elist/elist.py
def index_firstnot(ol,value): ''' from elist.elist import * ol = [1,'a',3,'a',4,'a',5] index_firstnot(ol,'a') ####index_firstnot, array_indexnot, indexOfnot are the same array_indexnot(ol,'a') indexOfnot(ol,'a') ''' length = ol.__len__() for i in range(0,...
def index_firstnot(ol,value): ''' from elist.elist import * ol = [1,'a',3,'a',4,'a',5] index_firstnot(ol,'a') ####index_firstnot, array_indexnot, indexOfnot are the same array_indexnot(ol,'a') indexOfnot(ol,'a') ''' length = ol.__len__() for i in range(0,...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "a", "3", "a", "4", "a", "5", "]", "index_firstnot", "(", "ol", "a", ")", "####index_firstnot", "array_indexnot", "indexOfnot", "are", "the", "same", "array_indexnot", "(", "ol", "a", "...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L1909-L1924
[ "def", "index_firstnot", "(", "ol", ",", "value", ")", ":", "length", "=", "ol", ".", "__len__", "(", ")", "for", "i", "in", "range", "(", "0", ",", "length", ")", ":", "if", "(", "value", "==", "ol", "[", "i", "]", ")", ":", "pass", "else", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
index_last
from elist.elist import * ol = [1,'a',3,'a',4,'a',5] index_last(ol,'a') ####lastIndexOf is the same as index_last lastIndexOf(ol,'a')
elist/elist.py
def index_last(ol,value): ''' from elist.elist import * ol = [1,'a',3,'a',4,'a',5] index_last(ol,'a') ####lastIndexOf is the same as index_last lastIndexOf(ol,'a') ''' length = ol.__len__() for i in range(length-1,-1,-1): if(value == ol[i]): re...
def index_last(ol,value): ''' from elist.elist import * ol = [1,'a',3,'a',4,'a',5] index_last(ol,'a') ####lastIndexOf is the same as index_last lastIndexOf(ol,'a') ''' length = ol.__len__() for i in range(length-1,-1,-1): if(value == ol[i]): re...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "a", "3", "a", "4", "a", "5", "]", "index_last", "(", "ol", "a", ")", "####lastIndexOf", "is", "the", "same", "as", "index_last", "lastIndexOf", "(", "ol", "a", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L1929-L1943
[ "def", "index_last", "(", "ol", ",", "value", ")", ":", "length", "=", "ol", ".", "__len__", "(", ")", "for", "i", "in", "range", "(", "length", "-", "1", ",", "-", "1", ",", "-", "1", ")", ":", "if", "(", "value", "==", "ol", "[", "i", "]"...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
index_lastnot
from elist.elist import * ol = [1,'a',3,'a',4,'a',5] index_lastnot(ol,'a') ####lastIndexOfnot is the same as index_lastnot lastIndexOfnot(ol,'a')
elist/elist.py
def index_lastnot(ol,value): ''' from elist.elist import * ol = [1,'a',3,'a',4,'a',5] index_lastnot(ol,'a') ####lastIndexOfnot is the same as index_lastnot lastIndexOfnot(ol,'a') ''' length = ol.__len__() for i in range(length-1,-1,-1): if(value == ol[i]):...
def index_lastnot(ol,value): ''' from elist.elist import * ol = [1,'a',3,'a',4,'a',5] index_lastnot(ol,'a') ####lastIndexOfnot is the same as index_lastnot lastIndexOfnot(ol,'a') ''' length = ol.__len__() for i in range(length-1,-1,-1): if(value == ol[i]):...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "a", "3", "a", "4", "a", "5", "]", "index_lastnot", "(", "ol", "a", ")", "####lastIndexOfnot", "is", "the", "same", "as", "index_lastnot", "lastIndexOfnot", "(", "ol", "a", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L1947-L1961
[ "def", "index_lastnot", "(", "ol", ",", "value", ")", ":", "length", "=", "ol", ".", "__len__", "(", ")", "for", "i", "in", "range", "(", "length", "-", "1", ",", "-", "1", ",", "-", "1", ")", ":", "if", "(", "value", "==", "ol", "[", "i", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
index_whichnot
from elist.elist import * ol = [1,'a',3,'a',4,'a',5] index_whichnot(ol,'a',0) index_whichnot(ol,'a',1) index_whichnot(ol,'a',2)
elist/elist.py
def index_whichnot(ol,value,which): ''' from elist.elist import * ol = [1,'a',3,'a',4,'a',5] index_whichnot(ol,'a',0) index_whichnot(ol,'a',1) index_whichnot(ol,'a',2) ''' length = ol.__len__() seq = -1 for i in range(0,length): if(value == ol[i]): ...
def index_whichnot(ol,value,which): ''' from elist.elist import * ol = [1,'a',3,'a',4,'a',5] index_whichnot(ol,'a',0) index_whichnot(ol,'a',1) index_whichnot(ol,'a',2) ''' length = ol.__len__() seq = -1 for i in range(0,length): if(value == ol[i]): ...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "a", "3", "a", "4", "a", "5", "]", "index_whichnot", "(", "ol", "a", "0", ")", "index_whichnot", "(", "ol", "a", "1", ")", "index_whichnot", "(", "ol", "a", "2", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L1987-L2006
[ "def", "index_whichnot", "(", "ol", ",", "value", ",", "which", ")", ":", "length", "=", "ol", ".", "__len__", "(", ")", "seq", "=", "-", "1", "for", "i", "in", "range", "(", "0", ",", "length", ")", ":", "if", "(", "value", "==", "ol", "[", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
indexes_all
from elist.elist import * ol = [1,'a',3,'a',4,'a',5] indexes_all(ol,'a')
elist/elist.py
def indexes_all(ol,value): ''' from elist.elist import * ol = [1,'a',3,'a',4,'a',5] indexes_all(ol,'a') ''' length = ol.__len__() indexes =[] for i in range(0,length): if(value == ol[i]): indexes.append(i) else: pass return(indexes)
def indexes_all(ol,value): ''' from elist.elist import * ol = [1,'a',3,'a',4,'a',5] indexes_all(ol,'a') ''' length = ol.__len__() indexes =[] for i in range(0,length): if(value == ol[i]): indexes.append(i) else: pass return(indexes)
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "a", "3", "a", "4", "a", "5", "]", "indexes_all", "(", "ol", "a", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L2008-L2021
[ "def", "indexes_all", "(", "ol", ",", "value", ")", ":", "length", "=", "ol", ".", "__len__", "(", ")", "indexes", "=", "[", "]", "for", "i", "in", "range", "(", "0", ",", "length", ")", ":", "if", "(", "value", "==", "ol", "[", "i", "]", ")"...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
indexes_some
from elist.elist import * ol = [1,'a',3,'a',4,'a',5] indexes_some(ol,'a',0,2) indexes_some(ol,'a',0,1) indexes_some(ol,'a',1,2) indexes_some(ol,'a',3,4)
elist/elist.py
def indexes_some(ol,value,*seqs): ''' from elist.elist import * ol = [1,'a',3,'a',4,'a',5] indexes_some(ol,'a',0,2) indexes_some(ol,'a',0,1) indexes_some(ol,'a',1,2) indexes_some(ol,'a',3,4) ''' seqs = list(seqs) length = ol.__len__() indexes =[] s...
def indexes_some(ol,value,*seqs): ''' from elist.elist import * ol = [1,'a',3,'a',4,'a',5] indexes_some(ol,'a',0,2) indexes_some(ol,'a',0,1) indexes_some(ol,'a',1,2) indexes_some(ol,'a',3,4) ''' seqs = list(seqs) length = ol.__len__() indexes =[] s...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "a", "3", "a", "4", "a", "5", "]", "indexes_some", "(", "ol", "a", "0", "2", ")", "indexes_some", "(", "ol", "a", "0", "1", ")", "indexes_some", "(", "ol", "a", "1", "2", ")",...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L2038-L2060
[ "def", "indexes_some", "(", "ol", ",", "value", ",", "*", "seqs", ")", ":", "seqs", "=", "list", "(", "seqs", ")", "length", "=", "ol", ".", "__len__", "(", ")", "indexes", "=", "[", "]", "seq", "=", "-", "1", "for", "i", "in", "range", "(", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
first_continuous_indexesnot_slice
from elist.elist import * ol = ["a",0,1,"a","a",2,3,"a",4,"a","a","a",5] first_continuous_indexesnot_slice(ol,"a")
elist/elist.py
def first_continuous_indexesnot_slice(ol,value): ''' from elist.elist import * ol = ["a",0,1,"a","a",2,3,"a",4,"a","a","a",5] first_continuous_indexesnot_slice(ol,"a") ''' length = ol.__len__() begin = None slice = [] for i in range(0,length): if(not(ol[i]==value)...
def first_continuous_indexesnot_slice(ol,value): ''' from elist.elist import * ol = ["a",0,1,"a","a",2,3,"a",4,"a","a","a",5] first_continuous_indexesnot_slice(ol,"a") ''' length = ol.__len__() begin = None slice = [] for i in range(0,length): if(not(ol[i]==value)...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "a", "0", "1", "a", "a", "2", "3", "a", "4", "a", "a", "a", "5", "]", "first_continuous_indexesnot_slice", "(", "ol", "a", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L2172-L2196
[ "def", "first_continuous_indexesnot_slice", "(", "ol", ",", "value", ")", ":", "length", "=", "ol", ".", "__len__", "(", ")", "begin", "=", "None", "slice", "=", "[", "]", "for", "i", "in", "range", "(", "0", ",", "length", ")", ":", "if", "(", "no...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
last_continuous_indexes_slice
from elist.elist import * ol = [1,"a","a",2,3,"a",4,"a","a","a",5] last_continuous_indexes_slice(ol,"a")
elist/elist.py
def last_continuous_indexes_slice(ol,value): ''' from elist.elist import * ol = [1,"a","a",2,3,"a",4,"a","a","a",5] last_continuous_indexes_slice(ol,"a") ''' length = ol.__len__() end = None slice = [] for i in range(length-1,-1,-1): if(ol[i]==value): ...
def last_continuous_indexes_slice(ol,value): ''' from elist.elist import * ol = [1,"a","a",2,3,"a",4,"a","a","a",5] last_continuous_indexes_slice(ol,"a") ''' length = ol.__len__() end = None slice = [] for i in range(length-1,-1,-1): if(ol[i]==value): ...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "a", "a", "2", "3", "a", "4", "a", "a", "a", "5", "]", "last_continuous_indexes_slice", "(", "ol", "a", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L2198-L2223
[ "def", "last_continuous_indexes_slice", "(", "ol", ",", "value", ")", ":", "length", "=", "ol", ".", "__len__", "(", ")", "end", "=", "None", "slice", "=", "[", "]", "for", "i", "in", "range", "(", "length", "-", "1", ",", "-", "1", ",", "-", "1"...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
which_continuous_indexes_slice
from elist.elist import * ol = [1,"a","a",2,3,"a",4,"a","a","a",5] which_continuous_indexes_slice(ol,"a",0) which_continuous_indexes_slice(ol,"a",1) which_continuous_indexes_slice(ol,"a",2) which_continuous_indexes_slice(ol,"a",3) which_continuous_indexes_slice(ol,"b",0)
elist/elist.py
def which_continuous_indexes_slice(ol,value,which): ''' from elist.elist import * ol = [1,"a","a",2,3,"a",4,"a","a","a",5] which_continuous_indexes_slice(ol,"a",0) which_continuous_indexes_slice(ol,"a",1) which_continuous_indexes_slice(ol,"a",2) which_continuous_index...
def which_continuous_indexes_slice(ol,value,which): ''' from elist.elist import * ol = [1,"a","a",2,3,"a",4,"a","a","a",5] which_continuous_indexes_slice(ol,"a",0) which_continuous_indexes_slice(ol,"a",1) which_continuous_indexes_slice(ol,"a",2) which_continuous_index...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "a", "a", "2", "3", "a", "4", "a", "a", "a", "5", "]", "which_continuous_indexes_slice", "(", "ol", "a", "0", ")", "which_continuous_indexes_slice", "(", "ol", "a", "1", ")", "which_c...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L2252-L2294
[ "def", "which_continuous_indexes_slice", "(", "ol", ",", "value", ",", "which", ")", ":", "length", "=", "ol", ".", "__len__", "(", ")", "seq", "=", "-", "1", "cursor", "=", "0", "begin", "=", "None", "slice", "=", "[", "]", "while", "(", "cursor", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
seqs_continuous_indexesnot_slices
from elist.elist import * ol = [1,"a","a",2,3,"a",4,"a","a","a",5] seqs_continuous_indexesnot_slices(ol,"a",{0,2})
elist/elist.py
def seqs_continuous_indexesnot_slices(ol,value,seqs): ''' from elist.elist import * ol = [1,"a","a",2,3,"a",4,"a","a","a",5] seqs_continuous_indexesnot_slices(ol,"a",{0,2}) ''' rslt = [] length = ol.__len__() seq = -1 cursor = 0 begin = None slice = [] while(c...
def seqs_continuous_indexesnot_slices(ol,value,seqs): ''' from elist.elist import * ol = [1,"a","a",2,3,"a",4,"a","a","a",5] seqs_continuous_indexesnot_slices(ol,"a",{0,2}) ''' rslt = [] length = ol.__len__() seq = -1 cursor = 0 begin = None slice = [] while(c...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "a", "a", "2", "3", "a", "4", "a", "a", "a", "5", "]", "seqs_continuous_indexesnot_slices", "(", "ol", "a", "{", "0", "2", "}", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L2465-L2504
[ "def", "seqs_continuous_indexesnot_slices", "(", "ol", ",", "value", ",", "seqs", ")", ":", "rslt", "=", "[", "]", "length", "=", "ol", ".", "__len__", "(", ")", "seq", "=", "-", "1", "cursor", "=", "0", "begin", "=", "None", "slice", "=", "[", "]"...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
all_continuous_indexes_slices
from elist.elist import * ol = [1,"a","a",2,3,"a",4,"a","a","a",5] all_continuous_indexes_slices(ol,"a")
elist/elist.py
def all_continuous_indexes_slices(ol,value): ''' from elist.elist import * ol = [1,"a","a",2,3,"a",4,"a","a","a",5] all_continuous_indexes_slices(ol,"a") ''' rslt = [] length = ol.__len__() cursor = 0 begin = None slice = [] while(cursor < length): cond1 =...
def all_continuous_indexes_slices(ol,value): ''' from elist.elist import * ol = [1,"a","a",2,3,"a",4,"a","a","a",5] all_continuous_indexes_slices(ol,"a") ''' rslt = [] length = ol.__len__() cursor = 0 begin = None slice = [] while(cursor < length): cond1 =...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "a", "a", "2", "3", "a", "4", "a", "a", "a", "5", "]", "all_continuous_indexes_slices", "(", "ol", "a", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L2506-L2536
[ "def", "all_continuous_indexes_slices", "(", "ol", ",", "value", ")", ":", "rslt", "=", "[", "]", "length", "=", "ol", ".", "__len__", "(", ")", "cursor", "=", "0", "begin", "=", "None", "slice", "=", "[", "]", "while", "(", "cursor", "<", "length", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
shift
from elist.jprint import pobj from elist.elist import * ol = [1,2,3,4] id(ol) rslt = shift(ol) pobj(rslt) ol id(ol) id(rslt['list']) #### ol = [1,2,3,4] id(ol) rslt = shift(ol,mode="original") rslt ol ...
elist/elist.py
def shift(ol,**kwargs): ''' from elist.jprint import pobj from elist.elist import * ol = [1,2,3,4] id(ol) rslt = shift(ol) pobj(rslt) ol id(ol) id(rslt['list']) #### ol = [1,2,3,4] id(ol) rslt = shift(ol,mode="or...
def shift(ol,**kwargs): ''' from elist.jprint import pobj from elist.elist import * ol = [1,2,3,4] id(ol) rslt = shift(ol) pobj(rslt) ol id(ol) id(rslt['list']) #### ol = [1,2,3,4] id(ol) rslt = shift(ol,mode="or...
[ "from", "elist", ".", "jprint", "import", "pobj", "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "2", "3", "4", "]", "id", "(", "ol", ")", "rslt", "=", "shift", "(", "ol", ")", "pobj", "(", "rslt", ")", "ol", "id", "(", "o...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L2570-L2595
[ "def", "shift", "(", "ol", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "'mode'", "]", "else", ":", "mode", "=", "\"new\"", "length", "=", "ol", ".", "__len__", "(", ")", "rslt", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
pop
from elist.jprint import pobj from elist.elist import * ol = [1,2,3,4] id(ol) rslt = pop(ol,2) pobj(rslt) ol id(ol) id(rslt['list']) #### ol = [1,2,3,4] id(ol) rslt = pop(ol,2,mode="original") rslt ol ...
elist/elist.py
def pop(ol,index,**kwargs): ''' from elist.jprint import pobj from elist.elist import * ol = [1,2,3,4] id(ol) rslt = pop(ol,2) pobj(rslt) ol id(ol) id(rslt['list']) #### ol = [1,2,3,4] id(ol) rslt = pop(ol,2,mode...
def pop(ol,index,**kwargs): ''' from elist.jprint import pobj from elist.elist import * ol = [1,2,3,4] id(ol) rslt = pop(ol,2) pobj(rslt) ol id(ol) id(rslt['list']) #### ol = [1,2,3,4] id(ol) rslt = pop(ol,2,mode...
[ "from", "elist", ".", "jprint", "import", "pobj", "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "2", "3", "4", "]", "id", "(", "ol", ")", "rslt", "=", "pop", "(", "ol", "2", ")", "pobj", "(", "rslt", ")", "ol", "id", "(",...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L2597-L2627
[ "def", "pop", "(", "ol", ",", "index", ",", "*", "*", "kwargs", ")", ":", "index", "=", "uniform_index", "(", "index", ",", "ol", ".", "__len__", "(", ")", ")", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\""...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
cond_pop
from elist.jprint import pobj from elist.elist import * ol = [{'data':0;'type':'number'},{'data':'x';'type':'str'},{'data':'y';'type':'str'},4] #cond_func_args is a array def cond_func(index,value,cond_func_args):
elist/elist.py
def cond_pop(ol,index,**kwargs): ''' from elist.jprint import pobj from elist.elist import * ol = [{'data':0;'type':'number'},{'data':'x';'type':'str'},{'data':'y';'type':'str'},4] #cond_func_args is a array def cond_func(index,value,cond_func_args): ''' ...
def cond_pop(ol,index,**kwargs): ''' from elist.jprint import pobj from elist.elist import * ol = [{'data':0;'type':'number'},{'data':'x';'type':'str'},{'data':'y';'type':'str'},4] #cond_func_args is a array def cond_func(index,value,cond_func_args): ''' ...
[ "from", "elist", ".", "jprint", "import", "pobj", "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "{", "data", ":", "0", ";", "type", ":", "number", "}", "{", "data", ":", "x", ";", "type", ":", "str", "}", "{", "data", ":", "y", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L2632-L2662
[ "def", "cond_pop", "(", "ol", ",", "index", ",", "*", "*", "kwargs", ")", ":", "cond_func", "=", "kwargs", "[", "'cond_func'", "]", "cond_func_args", "=", "kwargs", "[", "'cond_func_args'", "]", "index", "=", "uniform_index", "(", "index", ",", "ol", "."...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
pop_range
from elist.jprint import pobj from elist.elist import * ol = [1,2,3,4,5,6] id(ol) rslt = pop_range(ol,2,4) ol id(ol) id(rslt['list']) #### ol = [1,2,3,4,5,6] id(ol) rslt = pop_range(ol,2,4,mode="original") rslt ol ...
elist/elist.py
def pop_range(ol,start_index,end_index,**kwargs): ''' from elist.jprint import pobj from elist.elist import * ol = [1,2,3,4,5,6] id(ol) rslt = pop_range(ol,2,4) ol id(ol) id(rslt['list']) #### ol = [1,2,3,4,5,6] id(ol) r...
def pop_range(ol,start_index,end_index,**kwargs): ''' from elist.jprint import pobj from elist.elist import * ol = [1,2,3,4,5,6] id(ol) rslt = pop_range(ol,2,4) ol id(ol) id(rslt['list']) #### ol = [1,2,3,4,5,6] id(ol) r...
[ "from", "elist", ".", "jprint", "import", "pobj", "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "2", "3", "4", "5", "6", "]", "id", "(", "ol", ")", "rslt", "=", "pop_range", "(", "ol", "2", "4", ")", "ol", "id", "(", "ol"...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L2666-L2714
[ "def", "pop_range", "(", "ol", ",", "start_index", ",", "end_index", ",", "*", "*", "kwargs", ")", ":", "length", "=", "ol", ".", "__len__", "(", ")", "start_index", "=", "uniform_index", "(", "start_index", ",", "length", ")", "end_index", "=", "uniform...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
pop_indexes
from elist.jprint import pobj from elist.elist import * ol = [1,2,3,4,5,6] id(ol) rslt = pop_indexes(ol,{0,-3,5}) ol id(ol) id(rslt['list']) #### ol = [1,2,3,4,5,6] id(ol) rslt = pop_indexes(ol,{0,-3,5},mode="original") rslt...
elist/elist.py
def pop_indexes(ol,indexes,**kwargs): ''' from elist.jprint import pobj from elist.elist import * ol = [1,2,3,4,5,6] id(ol) rslt = pop_indexes(ol,{0,-3,5}) ol id(ol) id(rslt['list']) #### ol = [1,2,3,4,5,6] id(ol) rslt =...
def pop_indexes(ol,indexes,**kwargs): ''' from elist.jprint import pobj from elist.elist import * ol = [1,2,3,4,5,6] id(ol) rslt = pop_indexes(ol,{0,-3,5}) ol id(ol) id(rslt['list']) #### ol = [1,2,3,4,5,6] id(ol) rslt =...
[ "from", "elist", ".", "jprint", "import", "pobj", "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "2", "3", "4", "5", "6", "]", "id", "(", "ol", ")", "rslt", "=", "pop_indexes", "(", "ol", "{", "0", "-", "3", "5", "}", ")",...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L2763-L2808
[ "def", "pop_indexes", "(", "ol", ",", "indexes", ",", "*", "*", "kwargs", ")", ":", "length", "=", "ol", ".", "__len__", "(", ")", "indexes", "=", "list", "(", "map", "(", "lambda", "index", ":", "uniform_index", "(", "index", ",", "length", ")", "...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
remove_first
from elist.jprint import pobj from elist.elist import * ol = [1,'a',3,'a',5,'a'] id(ol) new = remove_first(ol,'a') ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a'] id(ol) rslt = remove_first(ol,'a',mode="original") ...
elist/elist.py
def remove_first(ol,value,**kwargs): ''' from elist.jprint import pobj from elist.elist import * ol = [1,'a',3,'a',5,'a'] id(ol) new = remove_first(ol,'a') ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a'] id(ol) ...
def remove_first(ol,value,**kwargs): ''' from elist.jprint import pobj from elist.elist import * ol = [1,'a',3,'a',5,'a'] id(ol) new = remove_first(ol,'a') ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a'] id(ol) ...
[ "from", "elist", ".", "jprint", "import", "pobj", "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "a", "3", "a", "5", "a", "]", "id", "(", "ol", ")", "new", "=", "remove_first", "(", "ol", "a", ")", "ol", "new", "id", "(", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L2824-L2855
[ "def", "remove_first", "(", "ol", ",", "value", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "\"new\"", "if", "(", "mode", "==", "\"new\"", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
remove_firstnot
from elist.jprint import pobj from elist.elist import * ol = [1,'a',3,'a',5,'a'] id(ol) new = remove_firstnot(ol,'a') ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a'] id(ol) rslt = remove_firstnot(ol,'a',mode="original") ...
elist/elist.py
def remove_firstnot(ol,value,**kwargs): ''' from elist.jprint import pobj from elist.elist import * ol = [1,'a',3,'a',5,'a'] id(ol) new = remove_firstnot(ol,'a') ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a'] id(ol)...
def remove_firstnot(ol,value,**kwargs): ''' from elist.jprint import pobj from elist.elist import * ol = [1,'a',3,'a',5,'a'] id(ol) new = remove_firstnot(ol,'a') ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a'] id(ol)...
[ "from", "elist", ".", "jprint", "import", "pobj", "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "a", "3", "a", "5", "a", "]", "id", "(", "ol", ")", "new", "=", "remove_firstnot", "(", "ol", "a", ")", "ol", "new", "id", "(",...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L2859-L2901
[ "def", "remove_firstnot", "(", "ol", ",", "value", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "\"new\"", "length", "=", "ol", ".", "__len_...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
remove_last
from elist.elist import * ol = [1,'a',3,'a',5,'a'] id(ol) new = remove_last(ol,'a') ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a'] id(ol) rslt = remove_last(ol,'a',mode="original") ol rslt id(ol) ...
elist/elist.py
def remove_last(ol,value,**kwargs): ''' from elist.elist import * ol = [1,'a',3,'a',5,'a'] id(ol) new = remove_last(ol,'a') ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a'] id(ol) rslt = remove_last(ol,'a',mode="origi...
def remove_last(ol,value,**kwargs): ''' from elist.elist import * ol = [1,'a',3,'a',5,'a'] id(ol) new = remove_last(ol,'a') ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a'] id(ol) rslt = remove_last(ol,'a',mode="origi...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "a", "3", "a", "5", "a", "]", "id", "(", "ol", ")", "new", "=", "remove_last", "(", "ol", "a", ")", "ol", "new", "id", "(", "ol", ")", "id", "(", "new", ")", "####", "ol", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L2905-L2937
[ "def", "remove_last", "(", "ol", ",", "value", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "\"new\"", "new", "=", "copy", ".", "deepcopy", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
remove_which
from elist.elist import * ol = [1,'a',3,'a',5,'a'] id(ol) new = remove_which(ol,'a',1) ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a'] id(ol) rslt = remove_which(ol,'a',1,mode="original") ol rslt id(ol) ...
elist/elist.py
def remove_which(ol,value,which,**kwargs): ''' from elist.elist import * ol = [1,'a',3,'a',5,'a'] id(ol) new = remove_which(ol,'a',1) ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a'] id(ol) rslt = remove_which(ol,'a',...
def remove_which(ol,value,which,**kwargs): ''' from elist.elist import * ol = [1,'a',3,'a',5,'a'] id(ol) new = remove_which(ol,'a',1) ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a'] id(ol) rslt = remove_which(ol,'a',...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "a", "3", "a", "5", "a", "]", "id", "(", "ol", ")", "new", "=", "remove_which", "(", "ol", "a", "1", ")", "ol", "new", "id", "(", "ol", ")", "id", "(", "new", ")", "####", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L2982-L3022
[ "def", "remove_which", "(", "ol", ",", "value", ",", "which", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "\"new\"", "new", "=", "copy", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
remove_some
from elist.elist import * ol = [1,'a',3,'a',5,'a',6,'a'] id(ol) new = remove_some(ol,'a',1,3) ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a',6,'a'] id(ol) rslt = remove_some(ol,'a',1,3,mode="original") ol rslt ...
elist/elist.py
def remove_some(ol,value,*seqs,**kwargs): ''' from elist.elist import * ol = [1,'a',3,'a',5,'a',6,'a'] id(ol) new = remove_some(ol,'a',1,3) ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a',6,'a'] id(ol) rslt = remove_s...
def remove_some(ol,value,*seqs,**kwargs): ''' from elist.elist import * ol = [1,'a',3,'a',5,'a',6,'a'] id(ol) new = remove_some(ol,'a',1,3) ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a',6,'a'] id(ol) rslt = remove_s...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "a", "3", "a", "5", "a", "6", "a", "]", "id", "(", "ol", ")", "new", "=", "remove_some", "(", "ol", "a", "1", "3", ")", "ol", "new", "id", "(", "ol", ")", "id", "(", "new"...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3066-L3108
[ "def", "remove_some", "(", "ol", ",", "value", ",", "*", "seqs", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "\"new\"", "seqs", "=", "lis...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
remove_all
from elist.elist import * ol = [1,'a',3,'a',5,'a',6,'a'] id(ol) new = remove_all(ol,'a') ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a',6,'a'] id(ol) rslt = remove_all(ol,'a',mode="original") ol rslt id(o...
elist/elist.py
def remove_all(ol,value,**kwargs): ''' from elist.elist import * ol = [1,'a',3,'a',5,'a',6,'a'] id(ol) new = remove_all(ol,'a') ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a',6,'a'] id(ol) rslt = remove_all(ol,'a',mo...
def remove_all(ol,value,**kwargs): ''' from elist.elist import * ol = [1,'a',3,'a',5,'a',6,'a'] id(ol) new = remove_all(ol,'a') ol new id(ol) id(new) #### ol = [1,'a',3,'a',5,'a',6,'a'] id(ol) rslt = remove_all(ol,'a',mo...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "a", "3", "a", "5", "a", "6", "a", "]", "id", "(", "ol", ")", "new", "=", "remove_all", "(", "ol", "a", ")", "ol", "new", "id", "(", "ol", ")", "id", "(", "new", ")", "###...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3242-L3278
[ "def", "remove_all", "(", "ol", ",", "value", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "\"new\"", "new", "=", "[", "]", "length", "=",...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
remove_many
from elist.elist import * ol = [1,'a',3,'b',5,'a',6,'a',7,'b',8,'b',9] id(ol) new = remove_many(ol,['a','b'],[1,2]) ol new id(ol) id(new) #### ol = [1,'a',3,'b',5,'a',6,'a',7,'b',8,'b',9] id(ol) rslt = remove_many(ol,['a','b'],[1,2]...
elist/elist.py
def remove_many(ol,values,seqs,**kwargs): ''' from elist.elist import * ol = [1,'a',3,'b',5,'a',6,'a',7,'b',8,'b',9] id(ol) new = remove_many(ol,['a','b'],[1,2]) ol new id(ol) id(new) #### ol = [1,'a',3,'b',5,'a',6,'a',7,'b',8,'b',9] ...
def remove_many(ol,values,seqs,**kwargs): ''' from elist.elist import * ol = [1,'a',3,'b',5,'a',6,'a',7,'b',8,'b',9] id(ol) new = remove_many(ol,['a','b'],[1,2]) ol new id(ol) id(new) #### ol = [1,'a',3,'b',5,'a',6,'a',7,'b',8,'b',9] ...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "a", "3", "b", "5", "a", "6", "a", "7", "b", "8", "b", "9", "]", "id", "(", "ol", ")", "new", "=", "remove_many", "(", "ol", "[", "a", "b", "]", "[", "1", "2", "]", ")",...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3318-L3370
[ "def", "remove_many", "(", "ol", ",", "values", ",", "seqs", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "\"new\"", "values", "=", "copy", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
cond_remove_all
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_remove_all(ol,cond_func=afterCH,cond_func_args=['B']) ol new id(ol) id(new)...
elist/elist.py
def cond_remove_all(ol,**kwargs): ''' 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_remove_all(ol,cond_func=afterCH,cond_func_args=['B']) ...
def cond_remove_all(ol,**kwargs): ''' 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_remove_all(ol,cond_func=afterCH,cond_func_args=['B']) ...
[ "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", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3429-L3471
[ "def", "cond_remove_all", "(", "ol", ",", "*", "*", "kwargs", ")", ":", "cond_func", "=", "kwargs", "[", "'cond_func'", "]", "if", "(", "'cond_func_args'", "in", "kwargs", ")", ":", "cond_func_args", "=", "kwargs", "[", "'cond_func_args'", "]", "else", ":"...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
cond_remove_some
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_remove_some(ol,0,2,cond_func=afterCH,cond_func_args=['B']) ol new ...
elist/elist.py
def cond_remove_some(ol,*some,**kwargs): ''' 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_remove_some(ol,0,2,cond_func=afte...
def cond_remove_some(ol,*some,**kwargs): ''' 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_remove_some(ol,0,2,cond_func=afte...
[ "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", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3519-L3554
[ "def", "cond_remove_some", "(", "ol", ",", "*", "some", ",", "*", "*", "kwargs", ")", ":", "cond_func", "=", "kwargs", "[", "'cond_func'", "]", "if", "(", "'cond_func_args'", "in", "kwargs", ")", ":", "cond_func_args", "=", "kwargs", "[", "'cond_func_args'...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
init
from elist.elist import * init(5) init(5,"x")
elist/elist.py
def init(len,default_element=None): ''' from elist.elist import * init(5) init(5,"x") ''' rslt = [] for i in range(0,len): rslt.append(copy.deepcopy(default_element)) return(rslt)
def init(len,default_element=None): ''' from elist.elist import * init(5) init(5,"x") ''' rslt = [] for i in range(0,len): rslt.append(copy.deepcopy(default_element)) return(rslt)
[ "from", "elist", ".", "elist", "import", "*", "init", "(", "5", ")", "init", "(", "5", "x", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3568-L3577
[ "def", "init", "(", "len", ",", "default_element", "=", "None", ")", ":", "rslt", "=", "[", "]", "for", "i", "in", "range", "(", "0", ",", "len", ")", ":", "rslt", ".", "append", "(", "copy", ".", "deepcopy", "(", "default_element", ")", ")", "re...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
array_from
from elist.elist import * array_from("abcd",None) ##### def map_func(ele,x,y): return(int(ele)+x+y) array_from("1234",map_func,1000,100) def map_func(ele): return(int(ele)*2) array_from("1234",map_func) a...
elist/elist.py
def array_from(obj,func,*args): ''' from elist.elist import * array_from("abcd",None) ##### def map_func(ele,x,y): return(int(ele)+x+y) array_from("1234",map_func,1000,100) def map_func(ele): return(int(ele)*2) ...
def array_from(obj,func,*args): ''' from elist.elist import * array_from("abcd",None) ##### def map_func(ele,x,y): return(int(ele)+x+y) array_from("1234",map_func,1000,100) def map_func(ele): return(int(ele)*2) ...
[ "from", "elist", ".", "elist", "import", "*", "array_from", "(", "abcd", "None", ")", "#####", "def", "map_func", "(", "ele", "x", "y", ")", ":", "return", "(", "int", "(", "ele", ")", "+", "x", "+", "y", ")", "array_from", "(", "1234", "map_func",...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3605-L3627
[ "def", "array_from", "(", "obj", ",", "func", ",", "*", "args", ")", ":", "if", "(", "func", ")", ":", "l", "=", "list", "(", "obj", ")", "rslt", "=", "list", "(", "map", "(", "lambda", "ele", ":", "func", "(", "ele", ",", "*", "args", ")", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
copy_within
from elist.elist import * ol = [1, 2, 3, 4, 5] id(ol) rslt = copyWithin(ol,0,3,4) rslt id(rslt) #### ol = [1, 2, 3, 4, 5] id(ol) rslt = copyWithin(ol,0,3) rslt id(rslt) #### ol = [1, 2, 3, 4, 5] id(ol) ...
elist/elist.py
def copy_within(ol,target, start=None, end=None): ''' from elist.elist import * ol = [1, 2, 3, 4, 5] id(ol) rslt = copyWithin(ol,0,3,4) rslt id(rslt) #### ol = [1, 2, 3, 4, 5] id(ol) rslt = copyWithin(ol,0,3) rslt id(rsl...
def copy_within(ol,target, start=None, end=None): ''' from elist.elist import * ol = [1, 2, 3, 4, 5] id(ol) rslt = copyWithin(ol,0,3,4) rslt id(rslt) #### ol = [1, 2, 3, 4, 5] id(ol) rslt = copyWithin(ol,0,3) rslt id(rsl...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "2", "3", "4", "5", "]", "id", "(", "ol", ")", "rslt", "=", "copyWithin", "(", "ol", "0", "3", "4", ")", "rslt", "id", "(", "rslt", ")", "####", "ol", "=", "[", "1", "2", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3647-L3694
[ "def", "copy_within", "(", "ol", ",", "target", ",", "start", "=", "None", ",", "end", "=", "None", ")", ":", "length", "=", "ol", ".", "__len__", "(", ")", "if", "(", "start", "==", "None", ")", ":", "start", "=", "0", "else", ":", "pass", "if...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
reverse
from elist.elist import * ol = [1,2,3,4] id(ol) new = reverse(ol) ol new id(ol) id(new) #### ol = [1,2,3,4] id(ol) rslt = reverse(ol,mode="original") ol rslt id(ol) id(rslt)
elist/elist.py
def reverse(ol,**kwargs): ''' from elist.elist import * ol = [1,2,3,4] id(ol) new = reverse(ol) ol new id(ol) id(new) #### ol = [1,2,3,4] id(ol) rslt = reverse(ol,mode="original") ol rslt id(ol) ...
def reverse(ol,**kwargs): ''' from elist.elist import * ol = [1,2,3,4] id(ol) new = reverse(ol) ol new id(ol) id(new) #### ol = [1,2,3,4] id(ol) rslt = reverse(ol,mode="original") ol rslt id(ol) ...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "2", "3", "4", "]", "id", "(", "ol", ")", "new", "=", "reverse", "(", "ol", ")", "ol", "new", "id", "(", "ol", ")", "id", "(", "new", ")", "####", "ol", "=", "[", "1", "2"...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3698-L3731
[ "def", "reverse", "(", "ol", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "\"new\"", "if", "(", "mode", "==", "\"new\"", ")", ":", "new", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
comprise
from elist.elist import * comprise([1,2,3,4,5],[2,3,4],mode="loose") comprise([1,2,3,4,5],[2,3,4]) comprise([1,2,3,4,5],[2,3,4],mode="strict") comprise([1,2,3,4,5],[1,2,3,4],mode="strict") #not recursive ,only one level #please refer to ListTree.search for recursive suppo...
elist/elist.py
def comprise(list1,list2,**kwargs): ''' from elist.elist import * comprise([1,2,3,4,5],[2,3,4],mode="loose") comprise([1,2,3,4,5],[2,3,4]) comprise([1,2,3,4,5],[2,3,4],mode="strict") comprise([1,2,3,4,5],[1,2,3,4],mode="strict") #not recursive ,only one level ...
def comprise(list1,list2,**kwargs): ''' from elist.elist import * comprise([1,2,3,4,5],[2,3,4],mode="loose") comprise([1,2,3,4,5],[2,3,4]) comprise([1,2,3,4,5],[2,3,4],mode="strict") comprise([1,2,3,4,5],[1,2,3,4],mode="strict") #not recursive ,only one level ...
[ "from", "elist", ".", "elist", "import", "*", "comprise", "(", "[", "1", "2", "3", "4", "5", "]", "[", "2", "3", "4", "]", "mode", "=", "loose", ")", "comprise", "(", "[", "1", "2", "3", "4", "5", "]", "[", "2", "3", "4", "]", ")", "compr...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3733-L3764
[ "def", "comprise", "(", "list1", ",", "list2", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "'mode'", "]", "else", ":", "mode", "=", "\"loose\"", "len_1", "=", "list1", ".", "__len__"...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
entries
from elist.elist import * ol = ['a','b','c'] rslt = entries(ol) rslt
elist/elist.py
def entries(ol): ''' from elist.elist import * ol = ['a','b','c'] rslt = entries(ol) rslt ''' rslt = [] length = ol.__len__() for i in range(0,length): entry = [i,ol[i]] rslt.append(entry) return(rslt)
def entries(ol): ''' from elist.elist import * ol = ['a','b','c'] rslt = entries(ol) rslt ''' rslt = [] length = ol.__len__() for i in range(0,length): entry = [i,ol[i]] rslt.append(entry) return(rslt)
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "a", "b", "c", "]", "rslt", "=", "entries", "(", "ol", ")", "rslt" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3766-L3778
[ "def", "entries", "(", "ol", ")", ":", "rslt", "=", "[", "]", "length", "=", "ol", ".", "__len__", "(", ")", "for", "i", "in", "range", "(", "0", ",", "length", ")", ":", "entry", "=", "[", "i", ",", "ol", "[", "i", "]", "]", "rslt", ".", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
splice
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(ne...
elist/elist.py
def splice(ol,start,deleteCount,*eles,**kwargs): ''' 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 ...
def splice(ol,start,deleteCount,*eles,**kwargs): ''' 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 ...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "angel", "clown", "mandarin", "surgeon", "]", "id", "(", "ol", ")", "new", "=", "splice", "(", "ol", "2", "0", "drum", ")", "new", "id", "(", "new", ")", "####", "ol", "=", "[", "ang...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3805-L3845
[ "def", "splice", "(", "ol", ",", "start", ",", "deleteCount", ",", "*", "eles", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "'mode'", "]", "else", ":", "mode", "=", "\"new\"", "len...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
slice
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
def slice(ol,start,end=None,**kwargs): ''' 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) ''' if('mode' in kwargs): ...
def slice(ol,start,end=None,**kwargs): ''' 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) ''' if('mode' in kwargs): ...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "2", "3", "4", "5", "]", "id", "(", "ol", ")", "new", "=", "slice", "(", "ol", "2", "4", ")", "new", "id", "(", "new", ")", "####", "id", "(", "ol", ")", "rslt", "=", "sli...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3847-L3877
[ "def", "slice", "(", "ol", ",", "start", ",", "end", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "'mode'", "]", "else", ":", "mode", "=", "\"new\"", "length", "=", "...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
join
from elist.elist import * ol = [1,2,3,4] join(ol,separator="-")
elist/elist.py
def join(ol,separator=","): ''' from elist.elist import * ol = [1,2,3,4] join(ol,separator="-") ''' 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=","): ''' from elist.elist import * ol = [1,2,3,4] join(ol,separator="-") ''' if(ol.__len__() == 0): return("") else: pass cond = (type(ol[0])==type(b'')) if(cond): rslt = b'' else: rslt ="" length = ol.__len__...
[ "from", "elist", ".", "elist", "import", "*", "ol", "=", "[", "1", "2", "3", "4", "]", "join", "(", "ol", "separator", "=", "-", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3879-L3906
[ "def", "join", "(", "ol", ",", "separator", "=", "\",\"", ")", ":", "if", "(", "ol", ".", "__len__", "(", ")", "==", "0", ")", ":", "return", "(", "\"\"", ")", "else", ":", "pass", "cond", "=", "(", "type", "(", "ol", "[", "0", "]", ")", "=...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
join2
from elist.elist import * ol = [1,2,3,4] join2(ol,"-","+","*")
elist/elist.py
def join2(ol,*sps): ''' from elist.elist import * ol = [1,2,3,4] join2(ol,"-","+","*") ''' 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): ''' from elist.elist import * ol = [1,2,3,4] join2(ol,"-","+","*") ''' 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", "-", "+", "*", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3908-L3919
[ "def", "join2", "(", "ol", ",", "*", "sps", ")", ":", "rslt", "=", "\"\"", "length", "=", "ol", ".", "__len__", "(", ")", "for", "i", "in", "range", "(", "0", ",", "length", "-", "1", ")", ":", "rslt", "=", "rslt", "+", "str", "(", "ol", "[...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
htmljoin
ol = [1,2,3,4] htmljoin(ol,"option",outer="select")
elist/elist.py
def htmljoin(ol,sp,**kwargs): ''' ol = [1,2,3,4] htmljoin(ol,"option",outer="select") ''' if('outer' in kwargs): outer = kwargs['outer'] else: outer = "" if(outer): head = "<" + outer + ">" tail = "</" + outer + ">" else: head = ""...
def htmljoin(ol,sp,**kwargs): ''' ol = [1,2,3,4] htmljoin(ol,"option",outer="select") ''' if('outer' in kwargs): outer = kwargs['outer'] else: outer = "" if(outer): head = "<" + outer + ">" tail = "</" + outer + ">" else: head = ""...
[ "ol", "=", "[", "1", "2", "3", "4", "]", "htmljoin", "(", "ol", "option", "outer", "=", "select", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3921-L3944
[ "def", "htmljoin", "(", "ol", ",", "sp", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'outer'", "in", "kwargs", ")", ":", "outer", "=", "kwargs", "[", "'outer'", "]", "else", ":", "outer", "=", "\"\"", "if", "(", "outer", ")", ":", "head", "=...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
uniqualize
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
def uniqualize(l,**kwargs): ''' 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) ''' if('mode' in kwargs): ...
def uniqualize(l,**kwargs): ''' 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) ''' if('mode' in kwargs): ...
[ "from", "elist", ".", "elist", "import", "*", "l", "=", "[", "1", "2", "2", "]", "new", "=", "uniqualize", "(", "l", ")", "new", "id", "(", "l", ")", "id", "(", "new", ")", "####", "l", "=", "[", "1", "2", "2", "]", "rslt", "=", "uniqualize...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3946-L3984
[ "def", "uniqualize", "(", "l", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "'mode'", "]", "else", ":", "mode", "=", "'new'", "pt", "=", "copy", ".", "deepcopy", "(", "l", ")", "s...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
cond_uniqualize
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=...
elist/elist.py
def cond_uniqualize(l,**kwargs): ''' 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) ...
def cond_uniqualize(l,**kwargs): ''' 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) ...
[ "from", "elist", ".", "elist", "import", "*", "l", "=", "[", "(", "BIGipServer", "rd100", ")", "(", "TS013d8ed5", "00A0", ")", "(", "BIGipServer", "rd200", ")", "(", "TS013d8ed5", "00B0", ")", "(", "SID", "1", ")", "(", "SID", "2", ")", "]", "def",...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L3988-L4053
[ "def", "cond_uniqualize", "(", "l", ",", "*", "*", "kwargs", ")", ":", "cond_func", "=", "kwargs", "[", "'cond_func'", "]", "if", "(", "'cond_func_args'", "in", "kwargs", ")", ":", "cond_func_args", "=", "kwargs", "[", "'cond_func_args'", "]", "else", ":",...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
interleave
arr1 = [1,2,3,4] arr2 = ['a','b','c','d'] arr3 = ['@','#','%','*'] interleave(arr1,arr2,arr3)
elist/elist.py
def interleave(*arrays,**kwargs): ''' arr1 = [1,2,3,4] arr2 = ['a','b','c','d'] arr3 = ['@','#','%','*'] interleave(arr1,arr2,arr3) ''' anum = arrays.__len__() rslt = [] length = arrays[0].__len__() for j in range(0,length): for i in range(0,anum): ...
def interleave(*arrays,**kwargs): ''' arr1 = [1,2,3,4] arr2 = ['a','b','c','d'] arr3 = ['@','#','%','*'] interleave(arr1,arr2,arr3) ''' 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", "=", "[" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4061-L4075
[ "def", "interleave", "(", "*", "arrays", ",", "*", "*", "kwargs", ")", ":", "anum", "=", "arrays", ".", "__len__", "(", ")", "rslt", "=", "[", "]", "length", "=", "arrays", "[", "0", "]", ".", "__len__", "(", ")", "for", "j", "in", "range", "("...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
deinterleave
ol = [1, 2, 3, 4, 5, 6, 7, 8, 9] deinterleave(ol,3)
elist/elist.py
def deinterleave(ol,gnum): ''' ol = [1, 2, 3, 4, 5, 6, 7, 8, 9] deinterleave(ol,3) ''' 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_func = test...
def deinterleave(ol,gnum): ''' ol = [1, 2, 3, 4, 5, 6, 7, 8, 9] deinterleave(ol,3) ''' 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_func = test...
[ "ol", "=", "[", "1", "2", "3", "4", "5", "6", "7", "8", "9", "]", "deinterleave", "(", "ol", "3", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4078-L4091
[ "def", "deinterleave", "(", "ol", ",", "gnum", ")", ":", "def", "test_func", "(", "ele", ",", "index", ",", "interval", ",", "which", ")", ":", "cond", "=", "(", "index", "%", "interval", "==", "which", ")", "return", "(", "cond", ")", "rslt", "=",...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
for_each
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
def for_each(ol,test_func,*args): ''' 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 ''' rslt = (...
def for_each(ol,test_func,*args): ''' 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 ''' rslt = (...
[ "from", "elist", ".", "elist", "import", "*", "def", "show_func", "(", "ele", ")", ":", "print", "(", "<", "{", "0", "}", ">", ".", "format", "(", "ele", "))", "ol", "=", "[", "1", "2", "3", "4", "]", "for_each", "(", "ol", "show_func", ")", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4096-L4111
[ "def", "for_each", "(", "ol", ",", "test_func", ",", "*", "args", ")", ":", "rslt", "=", "(", "True", ",", "None", ")", "length", "=", "ol", ".", "__len__", "(", ")", "for", "i", "in", "range", "(", "0", ",", "length", ")", ":", "test_func", "(...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
loose_in
pl = ['bcd','xabcxx','x','y'] loose_in(pl,'abc')
elist/elist.py
def loose_in(pl,k): ''' pl = ['bcd','xabcxx','x','y'] loose_in(pl,'abc') ''' cond = some(pl,lambda ele:(k in ele))['cond'] return(cond)
def loose_in(pl,k): ''' pl = ['bcd','xabcxx','x','y'] loose_in(pl,'abc') ''' cond = some(pl,lambda ele:(k in ele))['cond'] return(cond)
[ "pl", "=", "[", "bcd", "xabcxx", "x", "y", "]", "loose_in", "(", "pl", "abc", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4169-L4176
[ "def", "loose_in", "(", "pl", ",", "k", ")", ":", "cond", "=", "some", "(", "pl", ",", "lambda", "ele", ":", "(", "k", "in", "ele", ")", ")", "[", "'cond'", "]", "return", "(", "cond", ")" ]
8c07b5029bda34ead60ce10335ceb145f209263c
valid
select_loose_in
pl = ['bcd','xabcxx','x','y'] select_loose_in(pl,'abc')
elist/elist.py
def select_loose_in(pl,k): ''' pl = ['bcd','xabcxx','x','y'] select_loose_in(pl,'abc') ''' 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,c...
def select_loose_in(pl,k): ''' pl = ['bcd','xabcxx','x','y'] select_loose_in(pl,'abc') ''' 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,c...
[ "pl", "=", "[", "bcd", "xabcxx", "x", "y", "]", "select_loose_in", "(", "pl", "abc", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4179-L4191
[ "def", "select_loose_in", "(", "pl", ",", "k", ")", ":", "def", "cond_func", "(", "ele", ",", "index", ",", "k", ")", ":", "if", "(", "type", "(", "ele", ")", "==", "type", "(", "[", "]", ")", ")", ":", "cond", "=", "loose_in", "(", "ele", ",...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
select_strict_in
pl = ['bcd','xabcxx','x','y'] select_strict_in(pl,'abc')
elist/elist.py
def select_strict_in(pl,k): ''' pl = ['bcd','xabcxx','x','y'] select_strict_in(pl,'abc') ''' 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,cond...
def select_strict_in(pl,k): ''' pl = ['bcd','xabcxx','x','y'] select_strict_in(pl,'abc') ''' 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,cond...
[ "pl", "=", "[", "bcd", "xabcxx", "x", "y", "]", "select_strict_in", "(", "pl", "abc", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4194-L4206
[ "def", "select_strict_in", "(", "pl", ",", "k", ")", ":", "def", "cond_func", "(", "ele", ",", "index", ",", "k", ")", ":", "if", "(", "type", "(", "ele", ")", "==", "type", "(", "[", "]", ")", ")", ":", "cond", "=", "(", "k", "in", "ele", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
regex_in
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
def regex_in(pl,regex): ''' 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) ''' def cond_func(ele,regex): m...
def regex_in(pl,regex): ''' 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) ''' def cond_func(ele,regex): m...
[ "regex", "=", "re", ".", "compile", "(", "^", "[", "a", "-", "z", "]", "+", "$", ")", "pl", "=", "[", "b1c3d", "xab15cxx", "1x", "y2", "]", "regex_in", "(", "pl", "regex", ")", "regex", "=", "re", ".", "compile", "(", "^", "[", "0", "-", "9...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4210-L4228
[ "def", "regex_in", "(", "pl", ",", "regex", ")", ":", "def", "cond_func", "(", "ele", ",", "regex", ")", ":", "m", "=", "regex", ".", "search", "(", "ele", ")", "if", "(", "m", "==", "None", ")", ":", "return", "(", "False", ")", "else", ":", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
select_regex_in
regex = re.compile("^x.*x$") pl = ['bcd','xabcxx','xx','y'] select_regex_in(pl,'abc')
elist/elist.py
def select_regex_in(pl,regex): ''' regex = re.compile("^x.*x$") pl = ['bcd','xabcxx','xx','y'] select_regex_in(pl,'abc') ''' def cond_func(ele,index,regex): if(type(ele)==type([])): cond = regex_in(ele,regex) else: m = regex.search(ele) ...
def select_regex_in(pl,regex): ''' regex = re.compile("^x.*x$") pl = ['bcd','xabcxx','xx','y'] select_regex_in(pl,'abc') ''' def cond_func(ele,index,regex): if(type(ele)==type([])): cond = regex_in(ele,regex) else: m = regex.search(ele) ...
[ "regex", "=", "re", ".", "compile", "(", "^x", ".", "*", "x$", ")", "pl", "=", "[", "bcd", "xabcxx", "xx", "y", "]", "select_regex_in", "(", "pl", "abc", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4231-L4248
[ "def", "select_regex_in", "(", "pl", ",", "regex", ")", ":", "def", "cond_func", "(", "ele", ",", "index", ",", "regex", ")", ":", "if", "(", "type", "(", "ele", ")", "==", "type", "(", "[", "]", ")", ")", ":", "cond", "=", "regex_in", "(", "el...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
some
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
def some(ol,test_func,*args): ''' 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) ''' rslt = {'cond':False,'index':N...
def some(ol,test_func,*args): ''' 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) ''' rslt = {'cond':False,'index':N...
[ "from", "elist", ".", "elist", "import", "*", "def", "test_func", "(", "ele", "x", ")", ":", "cond", "=", "(", "ele", ">", "x", ")", "return", "(", "cond", ")", "ol", "=", "[", "1", "2", "3", "4", "]", "some", "(", "ol", "test_func", "3", ")"...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4259-L4280
[ "def", "some", "(", "ol", ",", "test_func", ",", "*", "args", ")", ":", "rslt", "=", "{", "'cond'", ":", "False", ",", "'index'", ":", "None", "}", "length", "=", "ol", ".", "__len__", "(", ")", "for", "i", "in", "range", "(", "0", ",", "length...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
fill
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...
elist/elist.py
def fill(ol,value,start=None, end=None,**kwargs): ''' 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) #### ...
def fill(ol,value,start=None, end=None,**kwargs): ''' 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) #### ...
[ "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", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4282-L4326
[ "def", "fill", "(", "ol", ",", "value", ",", "start", "=", "None", ",", "end", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "'mode'", "]", "else", ":", "mode", "=", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
filter
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=...
elist/elist.py
def filter(ol,test_func,*args,**kwargs): ''' 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] ...
def filter(ol,test_func,*args,**kwargs): ''' 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] ...
[ "from", "elist", ".", "elist", "import", "*", "def", "test_func", "(", "ele", "x", ")", ":", "cond", "=", "(", "ele", ">", "x", ")", "return", "(", "cond", ")", "ol", "=", "[", "1", "2", "3", "4", "]", "id", "(", "ol", ")", "new", "=", "fil...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4328-L4365
[ "def", "filter", "(", "ol", ",", "test_func", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "'mode'", "]", "else", ":", "mode", "=", "\"new\"", "length", "=", "ol",...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
find_last
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
def find_last(ol,test_func,*args): ''' 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...
def find_last(ol,test_func,*args): ''' 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...
[ "from", "elist", ".", "elist", "import", "*", "def", "test_func", "(", "ele", "x", ")", ":", "cond", "=", "(", "ele", ">", "x", ")", "return", "(", "cond", ")", "ol", "=", "[", "1", "2", "3", "4", "]", "last", "=", "find_last", "(", "ol", "te...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4465-L4487
[ "def", "find_last", "(", "ol", ",", "test_func", ",", "*", "args", ")", ":", "length", "=", "ol", ".", "__len__", "(", ")", "for", "i", "in", "range", "(", "length", "-", "1", ",", "-", "1", ",", "-", "1", ")", ":", "cond", "=", "test_func", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
find_which
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
def find_which(ol,which,test_func,*args): ''' 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 ...
def find_which(ol,which,test_func,*args): ''' 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 ...
[ "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"...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4513-L4538
[ "def", "find_which", "(", "ol", ",", "which", ",", "test_func", ",", "*", "args", ")", ":", "length", "=", "ol", ".", "__len__", "(", ")", "seq", "=", "-", "1", "for", "i", "in", "range", "(", "0", ",", "length", ")", ":", "cond", "=", "test_fu...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
find_seqs
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
def find_seqs(ol,seqs,test_func,*args): ''' 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) ...
def find_seqs(ol,seqs,test_func,*args): ''' 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) ...
[ "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",...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4567-L4595
[ "def", "find_seqs", "(", "ol", ",", "seqs", ",", "test_func", ",", "*", "args", ")", ":", "rslt", "=", "[", "]", "seqs", "=", "list", "(", "seqs", ")", "length", "=", "ol", ".", "__len__", "(", ")", "seq", "=", "-", "1", "for", "i", "in", "ra...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
find_allnot
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
def find_allnot(ol,test_func,*args): ''' 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) ''' rslt =[...
def find_allnot(ol,test_func,*args): ''' 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) ''' 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...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4684-L4704
[ "def", "find_allnot", "(", "ol", ",", "test_func", ",", "*", "args", ")", ":", "rslt", "=", "[", "]", "length", "=", "ol", ".", "__len__", "(", ")", "for", "i", "in", "range", "(", "0", ",", "length", ")", ":", "cond", "=", "test_func", "(", "o...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
reduce_left
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, reduceLef...
elist/elist.py
def reduce_left(ol,callback,initialValue): ''' 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")] r...
def reduce_left(ol,callback,initialValue): ''' 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")] r...
[ "from", "elist", ".", "elist", "import", "*", "def", "callback", "(", "accumulator", "currentValue", ")", ":", "accumulator", ".", "append", "(", "currentValue", "[", "0", "]", ")", "accumulator", ".", "append", "(", "currentValue", "[", "1", "]", ")", "...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4720-L4736
[ "def", "reduce_left", "(", "ol", ",", "callback", ",", "initialValue", ")", ":", "length", "=", "ol", ".", "__len__", "(", ")", "accumulator", "=", "initialValue", "for", "i", "in", "range", "(", "0", ",", "length", ")", ":", "accumulator", "=", "callb...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
diff_indexes
from elist.elist import * l1 = [1,2,3,5] l2 = [0,2,3,4] diff_indexes(l1,l2)
elist/elist.py
def diff_indexes(l1,l2): ''' from elist.elist import * l1 = [1,2,3,5] l2 = [0,2,3,4] diff_indexes(l1,l2) ''' rslt = [] for i in range(0,l1.__len__()): if(l1[i]!=l2[i]): rslt.append(i) return(rslt)
def diff_indexes(l1,l2): ''' from elist.elist import * l1 = [1,2,3,5] l2 = [0,2,3,4] diff_indexes(l1,l2) ''' 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", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4768-L4779
[ "def", "diff_indexes", "(", "l1", ",", "l2", ")", ":", "rslt", "=", "[", "]", "for", "i", "in", "range", "(", "0", ",", "l1", ".", "__len__", "(", ")", ")", ":", "if", "(", "l1", "[", "i", "]", "!=", "l2", "[", "i", "]", ")", ":", "rslt",...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
diff_values
from elist.elist import * l1 = [1,2,3,5] l2 = [0,2,3,4] diff_values(l1,l2)
elist/elist.py
def diff_values(l1,l2): ''' from elist.elist import * l1 = [1,2,3,5] l2 = [0,2,3,4] diff_values(l1,l2) ''' rslt = [] for i in range(0,l1.__len__()): if(l1[i]!=l2[i]): rslt.append(l1[i]) return(rslt)
def diff_values(l1,l2): ''' from elist.elist import * l1 = [1,2,3,5] l2 = [0,2,3,4] diff_values(l1,l2) ''' 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", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4781-L4792
[ "def", "diff_values", "(", "l1", ",", "l2", ")", ":", "rslt", "=", "[", "]", "for", "i", "in", "range", "(", "0", ",", "l1", ".", "__len__", "(", ")", ")", ":", "if", "(", "l1", "[", "i", "]", "!=", "l2", "[", "i", "]", ")", ":", "rslt", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
same_indexes
from elist.elist import * l1 = [1,2,3,5] l2 = [0,2,3,4] same_indexes(l1,l2)
elist/elist.py
def same_indexes(l1,l2): ''' from elist.elist import * l1 = [1,2,3,5] l2 = [0,2,3,4] same_indexes(l1,l2) ''' rslt = [] for i in range(0,l1.__len__()): if(l1[i]==l2[i]): rslt.append(i) return(rslt)
def same_indexes(l1,l2): ''' from elist.elist import * l1 = [1,2,3,5] l2 = [0,2,3,4] same_indexes(l1,l2) ''' 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", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4794-L4805
[ "def", "same_indexes", "(", "l1", ",", "l2", ")", ":", "rslt", "=", "[", "]", "for", "i", "in", "range", "(", "0", ",", "l1", ".", "__len__", "(", ")", ")", ":", "if", "(", "l1", "[", "i", "]", "==", "l2", "[", "i", "]", ")", ":", "rslt",...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
same_values
from elist.elist import * l1 = [1,2,3,5] l2 = [0,2,3,4] same_values(l1,l2)
elist/elist.py
def same_values(l1,l2): ''' from elist.elist import * l1 = [1,2,3,5] l2 = [0,2,3,4] same_values(l1,l2) ''' rslt = [] for i in range(0,l1.__len__()): if(l1[i]==l2[i]): rslt.append(l1[i]) return(rslt)
def same_values(l1,l2): ''' from elist.elist import * l1 = [1,2,3,5] l2 = [0,2,3,4] same_values(l1,l2) ''' 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", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4807-L4818
[ "def", "same_values", "(", "l1", ",", "l2", ")", ":", "rslt", "=", "[", "]", "for", "i", "in", "range", "(", "0", ",", "l1", ".", "__len__", "(", ")", ")", ":", "if", "(", "l1", "[", "i", "]", "==", "l2", "[", "i", "]", ")", ":", "rslt", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
value_indexes_mapping
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
def value_indexes_mapping(l): ''' from elist.elist import * from elist.jprint import pobj l = ['a','b','b','a','c','b'] desc = value_indexes_mapping(l) pobj(desc) ''' pt = copy.deepcopy(l) desc = {} vset = set({}) for v in pt: vset.add(v) for v...
def value_indexes_mapping(l): ''' from elist.elist import * from elist.jprint import pobj l = ['a','b','b','a','c','b'] desc = value_indexes_mapping(l) pobj(desc) ''' pt = copy.deepcopy(l) desc = {} vset = set({}) for v in pt: vset.add(v) for v...
[ "from", "elist", ".", "elist", "import", "*", "from", "elist", ".", "jprint", "import", "pobj", "l", "=", "[", "a", "b", "b", "a", "c", "b", "]", "desc", "=", "value_indexes_mapping", "(", "l", ")", "pobj", "(", "desc", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4820-L4837
[ "def", "value_indexes_mapping", "(", "l", ")", ":", "pt", "=", "copy", ".", "deepcopy", "(", "l", ")", "desc", "=", "{", "}", "vset", "=", "set", "(", "{", "}", ")", "for", "v", "in", "pt", ":", "vset", ".", "add", "(", "v", ")", "for", "v", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
cond_value_indexes_mapping
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,...
elist/elist.py
def cond_value_indexes_mapping(l,**kwargs): ''' 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...
def cond_value_indexes_mapping(l,**kwargs): ''' 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...
[ "from", "elist", ".", "elist", "import", "*", "l", "=", "[", "(", "BIGipServer", "rd19", ")", "(", "TS013d8ed5", "0105b6b0", ")", "(", "BIGipServer", "rd19", ")", "(", "TS013d8ed5", "0105b6b0", ")", "(", "SID", "1", ")", "(", "SID", "2", ")", "]", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4840-L4873
[ "def", "cond_value_indexes_mapping", "(", "l", ",", "*", "*", "kwargs", ")", ":", "cond_func", "=", "kwargs", "[", "'cond_func'", "]", "if", "(", "'cond_func_args'", "in", "kwargs", ")", ":", "cond_func_args", "=", "kwargs", "[", "'cond_func_args'", "]", "el...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
getitem_via_pathlist
from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] getitem_via_pathlist(y,[1,1])
elist/elist.py
def getitem_via_pathlist(ol,pathlist): ''' from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] getitem_via_pathlist(y,[1,1]) ''' this = ol for i in range(0,pathlist.__len__()): key = pathlist[i] this = this.__getitem__(key) return(this)
def getitem_via_pathlist(ol,pathlist): ''' from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] getitem_via_pathlist(y,[1,1]) ''' this = ol for i in range(0,pathlist.__len__()): key = pathlist[i] this = this.__getitem__(key) return(this)
[ "from", "elist", ".", "elist", "import", "*", "y", "=", "[", "a", "[", "b", "[", "bb", "]]", "c", "]", "y", "[", "1", "]", "[", "1", "]", "getitem_via_pathlist", "(", "y", "[", "1", "1", "]", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4878-L4889
[ "def", "getitem_via_pathlist", "(", "ol", ",", "pathlist", ")", ":", "this", "=", "ol", "for", "i", "in", "range", "(", "0", ",", "pathlist", ".", "__len__", "(", ")", ")", ":", "key", "=", "pathlist", "[", "i", "]", "this", "=", "this", ".", "__...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
getitem_via_sibseqs
from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] getitem_via_sibseqs(y,1,1)
elist/elist.py
def getitem_via_sibseqs(ol,*sibseqs): ''' from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] getitem_via_sibseqs(y,1,1) ''' pathlist = list(sibseqs) this = ol for i in range(0,pathlist.__len__()): key = pathlist[i] this = this.__getitem__(key...
def getitem_via_sibseqs(ol,*sibseqs): ''' from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] getitem_via_sibseqs(y,1,1) ''' pathlist = list(sibseqs) this = ol for i in range(0,pathlist.__len__()): key = pathlist[i] this = this.__getitem__(key...
[ "from", "elist", ".", "elist", "import", "*", "y", "=", "[", "a", "[", "b", "[", "bb", "]]", "c", "]", "y", "[", "1", "]", "[", "1", "]", "getitem_via_sibseqs", "(", "y", "1", "1", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4904-L4916
[ "def", "getitem_via_sibseqs", "(", "ol", ",", "*", "sibseqs", ")", ":", "pathlist", "=", "list", "(", "sibseqs", ")", "this", "=", "ol", "for", "i", "in", "range", "(", "0", ",", "pathlist", ".", "__len__", "(", ")", ")", ":", "key", "=", "pathlist...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
setitem_via_pathlist
from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] setitem_via_pathlist(y,"500",[1,1]) y
elist/elist.py
def setitem_via_pathlist(ol,value,pathlist): ''' from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] setitem_via_pathlist(y,"500",[1,1]) y ''' this = ol for i in range(0,pathlist.__len__()-1): key = pathlist[i] this = this.__getitem__(key)...
def setitem_via_pathlist(ol,value,pathlist): ''' from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] setitem_via_pathlist(y,"500",[1,1]) y ''' this = ol for i in range(0,pathlist.__len__()-1): key = pathlist[i] this = this.__getitem__(key)...
[ "from", "elist", ".", "elist", "import", "*", "y", "=", "[", "a", "[", "b", "[", "bb", "]]", "c", "]", "y", "[", "1", "]", "[", "1", "]", "setitem_via_pathlist", "(", "y", "500", "[", "1", "1", "]", ")", "y" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4940-L4953
[ "def", "setitem_via_pathlist", "(", "ol", ",", "value", ",", "pathlist", ")", ":", "this", "=", "ol", "for", "i", "in", "range", "(", "0", ",", "pathlist", ".", "__len__", "(", ")", "-", "1", ")", ":", "key", "=", "pathlist", "[", "i", "]", "this...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
setitem_via_sibseqs
from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] setitem_via_sibseqs(y,"500",1,1) y
elist/elist.py
def setitem_via_sibseqs(ol,value,*sibseqs): ''' from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] setitem_via_sibseqs(y,"500",1,1) y ''' this = ol pathlist = list(sibseqs) for i in range(0,pathlist.__len__()-1): key = pathlist[i] thi...
def setitem_via_sibseqs(ol,value,*sibseqs): ''' from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] setitem_via_sibseqs(y,"500",1,1) y ''' this = ol pathlist = list(sibseqs) for i in range(0,pathlist.__len__()-1): key = pathlist[i] thi...
[ "from", "elist", ".", "elist", "import", "*", "y", "=", "[", "a", "[", "b", "[", "bb", "]]", "c", "]", "y", "[", "1", "]", "[", "1", "]", "setitem_via_sibseqs", "(", "y", "500", "1", "1", ")", "y" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4955-L4969
[ "def", "setitem_via_sibseqs", "(", "ol", ",", "value", ",", "*", "sibseqs", ")", ":", "this", "=", "ol", "pathlist", "=", "list", "(", "sibseqs", ")", "for", "i", "in", "range", "(", "0", ",", "pathlist", ".", "__len__", "(", ")", "-", "1", ")", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
delitem_via_pathlist
from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] delitem_via_pathlist(y,[1,1]) y
elist/elist.py
def delitem_via_pathlist(ol,pathlist): ''' from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] delitem_via_pathlist(y,[1,1]) y ''' this = ol for i in range(0,pathlist.__len__()-1): key = pathlist[i] this = this.__getitem__(key) this.__...
def delitem_via_pathlist(ol,pathlist): ''' from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] delitem_via_pathlist(y,[1,1]) y ''' this = ol for i in range(0,pathlist.__len__()-1): key = pathlist[i] this = this.__getitem__(key) this.__...
[ "from", "elist", ".", "elist", "import", "*", "y", "=", "[", "a", "[", "b", "[", "bb", "]]", "c", "]", "y", "[", "1", "]", "[", "1", "]", "delitem_via_pathlist", "(", "y", "[", "1", "1", "]", ")", "y" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4971-L4984
[ "def", "delitem_via_pathlist", "(", "ol", ",", "pathlist", ")", ":", "this", "=", "ol", "for", "i", "in", "range", "(", "0", ",", "pathlist", ".", "__len__", "(", ")", "-", "1", ")", ":", "key", "=", "pathlist", "[", "i", "]", "this", "=", "this"...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
delitem_via_sibseqs
from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] delitem_via_sibseqs(y,1,1) y
elist/elist.py
def delitem_via_sibseqs(ol,*sibseqs): ''' from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] delitem_via_sibseqs(y,1,1) y ''' pathlist = list(sibseqs) this = ol for i in range(0,pathlist.__len__()-1): key = pathlist[i] this = this.__g...
def delitem_via_sibseqs(ol,*sibseqs): ''' from elist.elist import * y = ['a',['b',["bb"]],'c'] y[1][1] delitem_via_sibseqs(y,1,1) y ''' pathlist = list(sibseqs) this = ol for i in range(0,pathlist.__len__()-1): key = pathlist[i] this = this.__g...
[ "from", "elist", ".", "elist", "import", "*", "y", "=", "[", "a", "[", "b", "[", "bb", "]]", "c", "]", "y", "[", "1", "]", "[", "1", "]", "delitem_via_sibseqs", "(", "y", "1", "1", ")", "y" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L4986-L5000
[ "def", "delitem_via_sibseqs", "(", "ol", ",", "*", "sibseqs", ")", ":", "pathlist", "=", "list", "(", "sibseqs", ")", "this", "=", "ol", "for", "i", "in", "range", "(", "0", ",", "pathlist", ".", "__len__", "(", ")", "-", "1", ")", ":", "key", "=...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
replace_seqs
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 ...
elist/elist.py
def replace_seqs(ol,value,indexes,**kwargs): ''' 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 ...
def replace_seqs(ol,value,indexes,**kwargs): ''' 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 ...
[ "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", ")"...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L5013-L5051
[ "def", "replace_seqs", "(", "ol", ",", "value", ",", "indexes", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "\"new\"", "indexes", "=", "lis...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
replace_some
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 ...
elist/elist.py
def replace_some(ol,value,*indexes,**kwargs): ''' 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 =...
def replace_some(ol,value,*indexes,**kwargs): ''' 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 =...
[ "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", "(...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L5055-L5079
[ "def", "replace_some", "(", "ol", ",", "value", ",", "*", "indexes", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "\"new\"", "indexes", "=",...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
replace_value_seqs
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="origina...
elist/elist.py
def replace_value_seqs(ol,src_value,dst_value,seqs,**kwargs): ''' 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'] ...
def replace_value_seqs(ol,src_value,dst_value,seqs,**kwargs): ''' 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'] ...
[ "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",...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L5089-L5113
[ "def", "replace_value_seqs", "(", "ol", ",", "src_value", ",", "dst_value", ",", "seqs", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "\"new\"...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
replace_value_some
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") ...
elist/elist.py
def replace_value_some(ol,src_value,dst_value,*seqs,**kwargs): ''' 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'] ...
def replace_value_some(ol,src_value,dst_value,*seqs,**kwargs): ''' 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'] ...
[ "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"...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L5115-L5138
[ "def", "replace_value_some", "(", "ol", ",", "src_value", ",", "dst_value", ",", "*", "seqs", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'mode'", "in", "kwargs", ")", ":", "mode", "=", "kwargs", "[", "\"mode\"", "]", "else", ":", "mode", "=", "...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
cond_replace_value_some
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...
elist/elist.py
def cond_replace_value_some(ol,dst_value,*some,**kwargs): ''' 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,"RE...
def cond_replace_value_some(ol,dst_value,*some,**kwargs): ''' 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,"RE...
[ "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", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L5231-L5274
[ "def", "cond_replace_value_some", "(", "ol", ",", "dst_value", ",", "*", "some", ",", "*", "*", "kwargs", ")", ":", "cond_func", "=", "kwargs", "[", "'cond_func'", "]", "if", "(", "'cond_func_args'", "in", "kwargs", ")", ":", "cond_func_args", "=", "kwargs...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
rangize
break_points = [1,3,9,12,-2] length = 15 secs = rangize(break_points,length) forEach(secs,print)
elist/elist.py
def rangize(break_points,length): ''' break_points = [1,3,9,12,-2] length = 15 secs = rangize(break_points,length) forEach(secs,print) ''' bps = array_map(break_points,uniform_index,length) bps.sort() bps = prepend(bps,0) bps = append(bps,length) bps = uniqual...
def rangize(break_points,length): ''' break_points = [1,3,9,12,-2] length = 15 secs = rangize(break_points,length) forEach(secs,print) ''' bps = array_map(break_points,uniform_index,length) bps.sort() bps = prepend(bps,0) bps = append(bps,length) bps = uniqual...
[ "break_points", "=", "[", "1", "3", "9", "12", "-", "2", "]", "length", "=", "15", "secs", "=", "rangize", "(", "break_points", "length", ")", "forEach", "(", "secs", "print", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L5288-L5314
[ "def", "rangize", "(", "break_points", ",", "length", ")", ":", "bps", "=", "array_map", "(", "break_points", ",", "uniform_index", ",", "length", ")", "bps", ".", "sort", "(", ")", "bps", "=", "prepend", "(", "bps", ",", "0", ")", "bps", "=", "appen...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
rangize_supplement
spans = [(0, 3), (4, 7), (8, 10), (11, 12), (13, 16), (17, 20)] rangize_supplement(spans,24)
elist/elist.py
def rangize_supplement(spans,lngth): ''' spans = [(0, 3), (4, 7), (8, 10), (11, 12), (13, 16), (17, 20)] rangize_supplement(spans,24) ''' rslt = [] si = 0 ei = spans[0][0] if(si == ei): pass else: rslt.append((si,ei)) prev_ei = spans[0][1] for...
def rangize_supplement(spans,lngth): ''' spans = [(0, 3), (4, 7), (8, 10), (11, 12), (13, 16), (17, 20)] rangize_supplement(spans,24) ''' rslt = [] si = 0 ei = spans[0][0] if(si == ei): pass else: rslt.append((si,ei)) prev_ei = spans[0][1] for...
[ "spans", "=", "[", "(", "0", "3", ")", "(", "4", "7", ")", "(", "8", "10", ")", "(", "11", "12", ")", "(", "13", "16", ")", "(", "17", "20", ")", "]", "rangize_supplement", "(", "spans", "24", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L5326-L5349
[ "def", "rangize_supplement", "(", "spans", ",", "lngth", ")", ":", "rslt", "=", "[", "]", "si", "=", "0", "ei", "=", "spans", "[", "0", "]", "[", "0", "]", "if", "(", "si", "==", "ei", ")", ":", "pass", "else", ":", "rslt", ".", "append", "("...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
range_compress
#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
def range_compress(ol): ''' #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)...
def range_compress(ol): ''' #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)...
[ "#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", "...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L5378-L5426
[ "def", "range_compress", "(", "ol", ")", ":", "T", "=", "(", "type", "(", "ol", "[", "0", "]", ")", "==", "type", "(", "0", ")", ")", "if", "(", "T", ")", ":", "l", "=", "ol", "else", ":", "l", "=", "array_map", "(", "ol", ",", "ord", ")"...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
range_decompress
#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
def range_decompress(cl): ''' #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_decompr...
def range_decompress(cl): ''' #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_decompr...
[ "#only", "support", "sorted", "-", "ints", "or", "sorted", "-", "ascii", "cl", "=", "[", "1", "(", "5", "8", ")", "(", "13", "14", ")", "18", "(", "30", "34", ")", "]", "range_decompress", "(", "cl", ")", "cl", "=", "[", "1", "(", "5", "8", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L5428-L5473
[ "def", "range_decompress", "(", "cl", ")", ":", "def", "cond_func", "(", "ele", ")", ":", "length", "=", "ele", ".", "__len__", "(", ")", "cond", "=", "(", "length", "==", "1", ")", "if", "(", "cond", ")", ":", "return", "(", "ord", "(", "ele", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
broken_seqs
ol = initRange(0,20,1) ol break_points = [1,6,14,9] secs = broken_seqs(ol,break_points) forEach(secs,print)
elist/elist.py
def broken_seqs(ol,break_points): ''' ol = initRange(0,20,1) ol break_points = [1,6,14,9] secs = broken_seqs(ol,break_points) forEach(secs,print) ''' bps = list(break_points) length = ol.__len__() rgs = rangize(bps,length) rslt = [] for i in range(0,rg...
def broken_seqs(ol,break_points): ''' ol = initRange(0,20,1) ol break_points = [1,6,14,9] secs = broken_seqs(ol,break_points) forEach(secs,print) ''' bps = list(break_points) length = ol.__len__() rgs = rangize(bps,length) rslt = [] for i in range(0,rg...
[ "ol", "=", "initRange", "(", "0", "20", "1", ")", "ol", "break_points", "=", "[", "1", "6", "14", "9", "]", "secs", "=", "broken_seqs", "(", "ol", "break_points", ")", "forEach", "(", "secs", "print", ")" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L5492-L5508
[ "def", "broken_seqs", "(", "ol", ",", "break_points", ")", ":", "bps", "=", "list", "(", "break_points", ")", "length", "=", "ol", ".", "__len__", "(", ")", "rgs", "=", "rangize", "(", "bps", ",", "length", ")", "rslt", "=", "[", "]", "for", "i", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
brkl2kvlist
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
def brkl2kvlist(arr,interval,sub_pos=1,**kwargs): ''' 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']], ...
def brkl2kvlist(arr,interval,sub_pos=1,**kwargs): ''' 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']], ...
[ "arr", "=", "[", "color1", "r1", "g1", "b1", "a1", "color2", "r2", "g2", "b2", "a2", "]", "brkl2kvlist", "(", "arr", "5", ")", "(", "[", "color1", "color2", "]", "[[", "r1", "g1", "b1", "a1", "]", "[", "r2", "g2", "b2", "a2", "]]", ")", "brkl...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L5523-L5549
[ "def", "brkl2kvlist", "(", "arr", ",", "interval", ",", "sub_pos", "=", "1", ",", "*", "*", "kwargs", ")", ":", "lngth", "=", "arr", ".", "__len__", "(", ")", "brkseqs1", "=", "init_range", "(", "0", ",", "lngth", ",", "interval", ")", "brkseqs2", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
divide
ol = elel.initRange(0,20,1) interval = 3 rslt = elel.divide(ol,interval) rslt rslt = elel.divide(ol,4) rslt
elist/elist.py
def divide(ol,interval): ''' ol = elel.initRange(0,20,1) interval = 3 rslt = elel.divide(ol,interval) rslt rslt = elel.divide(ol,4) rslt ''' length = ol.__len__() seqs = initRange(0,length,interval) rslt = broken_seqs(ol,seqs) return(rslt)
def divide(ol,interval): ''' ol = elel.initRange(0,20,1) interval = 3 rslt = elel.divide(ol,interval) rslt rslt = elel.divide(ol,4) rslt ''' length = ol.__len__() seqs = initRange(0,length,interval) rslt = broken_seqs(ol,seqs) return(rslt)
[ "ol", "=", "elel", ".", "initRange", "(", "0", "20", "1", ")", "interval", "=", "3", "rslt", "=", "elel", ".", "divide", "(", "ol", "interval", ")", "rslt", "rslt", "=", "elel", ".", "divide", "(", "ol", "4", ")", "rslt" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L5557-L5569
[ "def", "divide", "(", "ol", ",", "interval", ")", ":", "length", "=", "ol", ".", "__len__", "(", ")", "seqs", "=", "initRange", "(", "0", ",", "length", ",", "interval", ")", "rslt", "=", "broken_seqs", "(", "ol", ",", "seqs", ")", "return", "(", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
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
def split(ol,value,**kwargs): ''' 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=bcdse...
def split(ol,value,**kwargs): ''' 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=bcdse...
[ "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"...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L5640-L5672
[ "def", "split", "(", "ol", ",", "value", ",", "*", "*", "kwargs", ")", ":", "if", "(", "'whiches'", "in", "kwargs", ")", ":", "whiches", "=", "kwargs", "[", "'whiches'", "]", "else", ":", "whiches", "=", "None", "indexes", "=", "indexes_all", "(", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
where
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
def where(ol,value): ''' 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) ''' si = None ei = None for i in range(0,ol.__len__()): ele = ol[i] ...
def where(ol,value): ''' 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) ''' si = None ei = None for i in range(0,ol.__len__()): ele = ol[i] ...
[ "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", ")"...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L5687-L5710
[ "def", "where", "(", "ol", ",", "value", ")", ":", "si", "=", "None", "ei", "=", "None", "for", "i", "in", "range", "(", "0", ",", "ol", ".", "__len__", "(", ")", ")", ":", "ele", "=", "ol", "[", "i", "]", "if", "(", "value", ">", "ele", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
value_interval
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
def value_interval(ol,value): ''' 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) ''' s...
def value_interval(ol,value): ''' 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) ''' s...
[ "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", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L5715-L5736
[ "def", "value_interval", "(", "ol", ",", "value", ")", ":", "si", ",", "ei", "=", "where", "(", "ol", ",", "value", ")", "if", "(", "si", "==", "None", ")", ":", "sv", "=", "None", "else", ":", "sv", "=", "ol", "[", "si", "]", "if", "(", "e...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
rand_sub
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
def rand_sub(arr,*args,**kwargs): ''' 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) ''' arr = copy.deepcopy(...
def rand_sub(arr,*args,**kwargs): ''' 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) ''' arr = copy.deepcopy(...
[ "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_...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L5790-L5813
[ "def", "rand_sub", "(", "arr", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "arr", "=", "copy", ".", "deepcopy", "(", "arr", ")", "lngth", "=", "arr", ".", "__len__", "(", ")", "args", "=", "list", "(", "args", ")", "if", "(", "args", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
is_leaf
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
def is_leaf(obj): ''' 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([]) ''' if(is_list(obj)): length = obj.__len__(...
def is_leaf(obj): ''' 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([]) ''' 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", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L5866-L5883
[ "def", "is_leaf", "(", "obj", ")", ":", "if", "(", "is_list", "(", "obj", ")", ")", ":", "length", "=", "obj", ".", "__len__", "(", ")", "if", "(", "length", "==", "0", ")", ":", "return", "(", "True", ")", "else", ":", "return", "(", "False", ...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
new_ele_description
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
def new_ele_description(**kwargs): ''' 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 ''' desc = { ...
def new_ele_description(**kwargs): ''' 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 ''' desc = { ...
[ "from", "elist", ".", "elist", "import", "*", "from", "elist", ".", "jprint", "import", "pobj", "root_desc", "=", "new_ele_description", "(", "leaf", "=", "False", "depth", "=", "0", "breadth_path", "=", "[]", "path", "=", "[]", "parent_path", "=", "[]", ...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L6173-L6204
[ "def", "new_ele_description", "(", "*", "*", "kwargs", ")", ":", "desc", "=", "{", "'leaf'", ":", "None", ",", "'depth'", ":", "None", ",", "'breadth'", ":", "None", ",", "'breadth_path'", ":", "None", ",", "'sib_seq'", ":", "None", ",", "'path'", ":",...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
init_desc_matrix
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
def init_desc_matrix(l): ''' 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) ''' leaf = is_leaf(l) root_desc = new_ele_description(leaf=leaf,depth=0,breadth_path=[],path=[],parent_...
def init_desc_matrix(l): ''' 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) ''' leaf = is_leaf(l) root_desc = new_ele_description(leaf=leaf,depth=0,breadth_path=[],path=[],parent_...
[ "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...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L6214-L6231
[ "def", "init_desc_matrix", "(", "l", ")", ":", "leaf", "=", "is_leaf", "(", "l", ")", "root_desc", "=", "new_ele_description", "(", "leaf", "=", "leaf", ",", "depth", "=", "0", ",", "breadth_path", "=", "[", "]", ",", "path", "=", "[", "]", ",", "p...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
_init_unhandled
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_d...
elist/elist.py
def _init_unhandled(l,inited_matrix): ''' 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...
def _init_unhandled(l,inited_matrix): ''' 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...
[ "from", "elist", ".", "elist", "import", "*", "from", "elist", ".", "jprint", "import", "pobj", "l", "=", "[", "1", "[", "4", "]", "2", "[", "3", "[", "5", "6", "]]]", "desc_matrix", "=", "init_desc_matrix", "(", "l", ")", "unhandled", "=", "_init_...
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L6247-L6301
[ "def", "_init_unhandled", "(", "l", ",", "inited_matrix", ")", ":", "root_desc", "=", "inited_matrix", "[", "0", "]", "[", "0", "]", "unhandled", "=", "{", "'data'", ":", "[", "]", ",", "'desc'", ":", "[", "]", "}", "length", "=", "l", ".", "__len_...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
update_desc_lsib_path
leftSibling previousSibling leftSib prevSib lsib psib have the same parent,and on the left
elist/elist.py
def update_desc_lsib_path(desc): ''' leftSibling previousSibling leftSib prevSib lsib psib have the same parent,and on the left ''' if(desc['sib_seq']>0): lsib_path = copy.deepcopy(desc['path']) lsib_path[-1] = desc['sib_seq']-...
def update_desc_lsib_path(desc): ''' leftSibling previousSibling leftSib prevSib lsib psib have the same parent,and on the left ''' if(desc['sib_seq']>0): lsib_path = copy.deepcopy(desc['path']) lsib_path[-1] = desc['sib_seq']-...
[ "leftSibling", "previousSibling", "leftSib", "prevSib", "lsib", "psib", "have", "the", "same", "parent", "and", "on", "the", "left" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L6303-L6320
[ "def", "update_desc_lsib_path", "(", "desc", ")", ":", "if", "(", "desc", "[", "'sib_seq'", "]", ">", "0", ")", ":", "lsib_path", "=", "copy", ".", "deepcopy", "(", "desc", "[", "'path'", "]", ")", "lsib_path", "[", "-", "1", "]", "=", "desc", "[",...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
update_desc_rsib_path
rightSibling nextSibling rightSib nextSib rsib nsib have the same parent,and on the right
elist/elist.py
def update_desc_rsib_path(desc,sibs_len): ''' rightSibling nextSibling rightSib nextSib rsib nsib have the same parent,and on the right ''' if(desc['sib_seq']<(sibs_len-1)): rsib_path = copy.deepcopy(desc['path']) rsib_path[-1]...
def update_desc_rsib_path(desc,sibs_len): ''' rightSibling nextSibling rightSib nextSib rsib nsib have the same parent,and on the right ''' if(desc['sib_seq']<(sibs_len-1)): rsib_path = copy.deepcopy(desc['path']) rsib_path[-1]...
[ "rightSibling", "nextSibling", "rightSib", "nextSib", "rsib", "nsib", "have", "the", "same", "parent", "and", "on", "the", "right" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L6322-L6339
[ "def", "update_desc_rsib_path", "(", "desc", ",", "sibs_len", ")", ":", "if", "(", "desc", "[", "'sib_seq'", "]", "<", "(", "sibs_len", "-", "1", ")", ")", ":", "rsib_path", "=", "copy", ".", "deepcopy", "(", "desc", "[", "'path'", "]", ")", "rsib_pa...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
update_desc_lcin_path
leftCousin previousCousin leftCin prevCin lcin pcin parents are neighbors,and on the left
elist/elist.py
def update_desc_lcin_path(desc,pdesc_level): ''' leftCousin previousCousin leftCin prevCin lcin pcin parents are neighbors,and on the left ''' parent_breadth = desc['parent_breadth_path'][-1] if(desc['sib_seq']==0): if(parent_bread...
def update_desc_lcin_path(desc,pdesc_level): ''' leftCousin previousCousin leftCin prevCin lcin pcin parents are neighbors,and on the left ''' parent_breadth = desc['parent_breadth_path'][-1] if(desc['sib_seq']==0): if(parent_bread...
[ "leftCousin", "previousCousin", "leftCin", "prevCin", "lcin", "pcin", "parents", "are", "neighbors", "and", "on", "the", "left" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L6341-L6367
[ "def", "update_desc_lcin_path", "(", "desc", ",", "pdesc_level", ")", ":", "parent_breadth", "=", "desc", "[", "'parent_breadth_path'", "]", "[", "-", "1", "]", "if", "(", "desc", "[", "'sib_seq'", "]", "==", "0", ")", ":", "if", "(", "parent_breadth", "...
8c07b5029bda34ead60ce10335ceb145f209263c
valid
update_desc_rcin_path
rightCousin nextCousin rightCin nextCin rcin ncin parents are neighbors,and on the right
elist/elist.py
def update_desc_rcin_path(desc,sibs_len,pdesc_level): ''' rightCousin nextCousin rightCin nextCin rcin ncin parents are neighbors,and on the right ''' psibs_len = pdesc_level.__len__() parent_breadth = desc['parent_breadth_path'][-1] i...
def update_desc_rcin_path(desc,sibs_len,pdesc_level): ''' rightCousin nextCousin rightCin nextCin rcin ncin parents are neighbors,and on the right ''' psibs_len = pdesc_level.__len__() parent_breadth = desc['parent_breadth_path'][-1] i...
[ "rightCousin", "nextCousin", "rightCin", "nextCin", "rcin", "ncin", "parents", "are", "neighbors", "and", "on", "the", "right" ]
ihgazni2/elist
python
https://github.com/ihgazni2/elist/blob/8c07b5029bda34ead60ce10335ceb145f209263c/elist/elist.py#L6369-L6398
[ "def", "update_desc_rcin_path", "(", "desc", ",", "sibs_len", ",", "pdesc_level", ")", ":", "psibs_len", "=", "pdesc_level", ".", "__len__", "(", ")", "parent_breadth", "=", "desc", "[", "'parent_breadth_path'", "]", "[", "-", "1", "]", "if", "(", "desc", ...
8c07b5029bda34ead60ce10335ceb145f209263c