provide the list of stable species, and decay path feeding stables
495968
def stable_specie():
    '''  '''


    #import numpy as np


    stable_raw=[]
    stable_raw = ['H   1', 'H   2',\
    'HE  3', 'HE  4',\
    'LI  6', 'LI  7',\
    'BE  9',\
    'B  10', 'B  11',\
    'C  12', 'C  13',\
    'N  14', 'N  15',\
    'O  16', 'O  17', 'O  18',\
    'F  19',\
    'NE 20', 'NE 21', 'NE 22',\
    'NA 23',\
    'MG 24', 'MG 25', 'MG 26',\
    'AL 27',\
    'SI 28', 'SI 29', 'SI 30',\
    'P  31',\
    'S  32', 'S  33', 'S  34', 'S  36',\
    'CL 35', 'CL 37',\
    'AR 36', 'AR 38', 'AR 40',\
    'K  39', 'K  40', 'K  41',\
    'CA 40', 'CA 42', 'CA 43', 'CA 44', 'CA 46', 'CA 48',\
    'SC 45',\
    'TI 46', 'TI 47', 'TI 48', 'TI 49', 'TI 50',\
    'V  50', 'V  51',\
    'CR 50', 'CR 52', 'CR 53', 'CR 54',\
    'MN 55',\
    'FE 54', 'FE 56', 'FE 57', 'FE 58',\
    'CO 59',\
    'NI 58', 'NI 60', 'NI 61', 'NI 62', 'NI 64',\
    'CU 63', 'CU 65',\
    'ZN 64', 'ZN 66', 'ZN 67', 'ZN 68', 'ZN 70',\
    'GA 69', 'GA 71',\
    'GE 70', 'GE 72', 'GE 73', 'GE 74', 'GE 76',\
    'AS 75',\
    'SE 74', 'SE 76', 'SE 77', 'SE 78', 'SE 80', 'SE 82',\
    'BR 79', 'BR 81',\
    'KR 78', 'KR 80', 'KR 82', 'KR 83', 'KR 84', 'KR 86',\
    'RB 85', 'RB 87',\
    'SR 84', 'SR 86', 'SR 87', 'SR 88',\
    'Y  89',\
    'ZR 90', 'ZR 91', 'ZR 92', 'ZR 94', 'ZR 96',\
    'NB 93',\
    'MO 92', 'MO 94', 'MO 95', 'MO 96', 'MO 97', 'MO 98', 'MO100',\
    'RU 96', 'RU 98', 'RU 99', 'RU100', 'RU101', 'RU102', 'RU104',\
    'RH103',\
    'PD102', 'PD104', 'PD105', 'PD106', 'PD108', 'PD110',\
    'AG107', 'AG109',\
    'CD106', 'CD108', 'CD110', 'CD111', 'CD112', 'CD113', 'CD114', 'CD116',\
    'IN113',  'IN115',\
    'SN112', 'SN114', 'SN115', 'SN116', 'SN117', 'SN118', 'SN119', 'SN120', 'SN122', 'SN124',\
    'SB121', 'SB123',\
    'TE120', 'TE122', 'TE123', 'TE124', 'TE125', 'TE126', 'TE128', 'TE130',\
    'I 127',\
    'XE124', 'XE126', 'XE128', 'XE129', 'XE130', 'XE131', 'XE132', 'XE134', 'XE136',\
    'CS133',\
    'BA130', 'BA132', 'BA134', 'BA135', 'BA136', 'BA137', 'BA138',\
    'LA138', 'LA139',\
    'CE136', 'CE138', 'CE140', 'CE142',\
    'PR141',\
    'ND142', 'ND143', 'ND144', 'ND145', 'ND146', 'ND148', 'ND150',\
    'SM144', 'SM147', 'SM148', 'SM149', 'SM150', 'SM152', 'SM154',\
    'EU151', 'EU153',\
    'GD152', 'GD154', 'GD155', 'GD156', 'GD157', 'GD158', 'GD160',\
    'TB159',\
    'DY156', 'DY158', 'DY160', 'DY161', 'DY162', 'DY163', 'DY164',\
    'HO165',\
    'ER162', 'ER164', 'ER166', 'ER167', 'ER168', 'ER170',\
    'TM169',\
    'YB168', 'YB170', 'YB171', 'YB172', 'YB173', 'YB174', 'YB176',\
    'LU175', 'LU176',\
    'HF174', 'HF176', 'HF177', 'HF178', 'HF179', 'HF180',\
    'TA180', 'TA181',\
    'W 180', 'W 182', 'W 183', 'W 184', 'W 186',\
    'RE185', 'RE187',\
    'OS184', 'OS186', 'OS187', 'OS188', 'OS189', 'OS190', 'OS192',\
    'IR191', 'IR193',\
    'PT190', 'PT192', 'PT194', 'PT195', 'PT196', 'PT198',\
    'AU197',\
    'HG196', 'HG198', 'HG199', 'HG200', 'HG201', 'HG202', 'HG204',\
    'TL203', 'TL205',\
    'PB204', 'PB206', 'PB207', 'PB208',\
    'BI209',\
    'TH232',\
    'U 235','U 238']

    jj=-1
    global count_size_stable
    count_size_stable=[]
    global stable
    stable=[]
    global jdum
    jdum=np.zeros(len(stable_raw))
    global jjdum
    jjdum=np.zeros(len(spe))
    for i in range(len(stable_raw)):
        dum_str = stable_raw[i]
        for j in range(len(spe)):
            if stable_raw[i].capitalize() == spe[j]:
                stable.append(stable_raw[i])
                jdum[i]=1
                jjdum[j]=1
                jj=jj+1
                count_size_stable.append(int(jj))
    #print stable
    # back_ind is an index to go back, to use the order of stable
    # useful for example for decayed yields.
    global back_ind
    back_ind={}
    for a,b in zip(stable,count_size_stable):
        back_ind[a]=b
    #print 'in stable:',back_ind['SE 74']
    # definition of decay paths
    global decay_raw
    decay_raw=[]
    decay_raw=[['H   1'],\
    ['H   2'],\
    ['HE  3'],\
    ['HE  4','B   8'],\
    ['LI  6'],\
    ['LI  7','BE  7'],\
    ['BE  9'],\
    ['B  10','BE 10'],\
    ['B  11','C  11','BE 11'],\
    ['C  12'],\
    ['C  13','N  13','O  13'],\
    ['N  14','C  14','O  14'],\
    ['N  15','C  15','O  15','F  15'],\
    ['O  16'],\
    ['O  17','F  17'],\
    ['O  18','F  18','NE 18'],\
    ['F  19','O  19','NE 19'],\
    ['NE 20','F  20','NA 20'],\
    ['NE 21','F  21','NA 21'],\
    ['NE 22','NA 22','MG 22','F  22'],\
    ['NA 23','MG 23','NE 23'],\
    ['MG 24','AL 24','NA 24','NE 24',],\
    ['MG 25','NA 25','AL 25'],\
    ['MG 26','SI 26','AL 26','NA 26','AL*26'],\
    ['AL 27','SI 27','MG 27'],\
    ['SI 28','AL 28','MG 28'],\
    ['SI 29','P  29','AL 29','MG 29'],\
    ['SI 30','S  30','P  30','AL 30','MG 30'],\
    ['P  31','S  31','SI 31'],\
    ['S  32','P  32','SI 32'],\
    ['S  33','CL 33','P  33','SI 33'],\
    ['S  34','CL 34','P  34'],\
    ['S  36','P  36'],\
    ['CL 35','S  35','AR 35'],\
    ['CL 37','S  37','P  37','AR 37','K  37'],\
    ['AR 36','CL 36'],\
    ['AR 38','CL 38','S  38','P  38','K  38'],\
    ['AR 40','CL 40','S  40'],\
    ['K  39','AR 39','CL 39','S  39','CA 39'],\
    ['K  40'],\
    ['K  41','AR 41','CL 41','S  41','CA 41','SC 41'],\
    ['CA 40','SC 40'],\
    ['CA 42','K  42','AR 42','CL 42','S  42','SC 42','TI 42'],\
    ['CA 43','K  43','AR 43','CL 43','SC 43','TI 43','V  43'],\
    ['CA 44','K  44','AR 44','CL 44','SC 44','TI 44'],\
    ['CA 46','K  46','AR 46'],\
    ['CA 48','K  48','AR 48'],\
    ['SC 45','CA 45','K  45','AR 45','CL 45','TI 45','V  45'],\
    ['TI 46','SC 46','V  46','CR 46'],\
    ['TI 47','SC 47','CA 47','K  47','AR 47','V  47','CR 47'],\
    ['TI 48','SC 48','V  48','CR 48'],\
    ['TI 49','SC 49','CA 49','K  49','V  49','CR 49','MN 49'],\
    ['TI 50','SC 50','CA 50','K  50'],\
    ['V  50'],\
    ['V  51','CR 51','TI 51','SC 51','CA 51','MN 51'],\
    ['CR 50','MN 50'],\
    ['CR 52','MN 52','FE 52','V  52','TI 52','SC 52','CA 52'],\
    ['CR 53','MN 53','FE 53','V  53','TI 53','SC 53'],\
    ['CR 54','MN 54','V  54','TI 54','SC 54'],\
    ['MN 55','FE 55','CR 55','V  55','TI 55','CO 55'],\
    ['FE 54','CO 54'],\
    ['FE 56','NI 56','CO 56','MN 56','CR 56'],\
    ['FE 57','NI 57','CO 57','MN 57','CR 57'],\
    ['FE 58','CO 58','MN 58','CR 58'],\
    ['CO 59','FE 59','MN 59','CR 59','NI 59','CU 59'],\
    ['NI 58','CU 58'],\
    ['NI 60','CO 60','FE 60','MN 60','CR 60','CU 60','ZN 60'],\
    ['NI 61','CO 61','FE 61','MN 61','CU 61','ZN 61'],\
    ['NI 62','CO 62','FE 62','CU 62','ZN 62'],\
    ['NI 64','CO 64','FE 64','CU 64'],\
    ['CU 63','NI 63','CO 63','FE 63','MN 63','ZN 63','GA 63'],\
    ['CU 65','NI 65','CO 65','FE 65','ZN 65','GA 65','GE 65'],\
    ['ZN 64','CU 64','GA 64','GE 64'],\
    ['ZN 66','CU 66','NI 66','CO 66','FE 66','GA 66','GE 66'],\
    ['ZN 67','CU 67','NI 67','CO 67','FE 67','GA 67','GE 67','AS 77'],\
    ['ZN 68','NI 68','CO 68','GA 68','GE 68','CU 68','AS 68','SE 68'],\
    ['ZN 70','CU 70','NI 70','CO 70'],\
    ['GA 69','ZN 69','CU 69','NI 69','GE 69','AS 69','SE 69'],\
    ['GA 71','ZN 71','CU 71','NI 71','GE 71','AS 71','SE 71','BR 71'],\
    ['GE 70','GA 70','AS 70','SE 70','BR 70'],\
    ['GE 72','GA 72','ZN 72','CU 72','NI 72','AS 72','SE 72','BR 72','KR 72'],\
    ['GE 73','GA 73','ZN 73','CU 73','NI 73','AS 73','SE 73','BR 73','KR 73'],\
    ['GE 74','GA 74','ZN 74','CU 74','NI 74','AS 74'],\
    ['GE 76','GA 76','ZN 76','CU 76'],\
    ['AS 75','GE 75','GA 75','ZN 75','CU 75','SE 75','BR 75','KR 75','RB 75'],\
    ['SE 74','AS 74','BR 74','KR 74'],\
    ['SE 76','AS 76','BR 76','KR 76','RB 76','SR 76'],\
    ['SE 77','AS 77','GE 77','BR 77','GA 77','ZN 77','KR 77','RB 77','SR 77'],\
    ['SE 78','AS 78','GE 78','GA 78','ZN 78','BR 78'],\
    ['SE 80','AS 80','GE 80','GA 80','ZN 80'],\
    ['SE 82','AS 82','GE 82','GA 82'],\
    ['BR 79','SE 79','AS 79','GE 79','GA 79','ZN 79','KR 79','RB 79','SR 79','Y  79'],\
    ['BR 81','SE 81','KR 81','AS 81','GE 81','GA 81','RB 81','SR 81','Y  81','ZR 81'],\
    ['KR 78','RB 78','SR 78','Y  78'],\
    ['KR 80','BR 80','RB 80','SR 80','ZR 80'],\
    ['KR 82','BR 82','RB 82','SR 82','Y  82','ZR 82'],\
    ['KR 83','BR 83','SE 83','AS 83','GE 83','RB 83','SR 83','Y  83','ZR 83','NB 83'],\
    ['KR 84','BR 84','SE 84','AS 84','GE 84','RB 84'],\
    ['KR 86','BR 86','SE 86','AS 86'],\
    ['RB 85','KR 85','SR 85','KR*85','BR 85','SE 85','AS 85','Y  85','ZR 85','NB 85','MO 85'],\
    ['RB 87','KR 87','BR 87','SE 87','AS 87'],\
    ['SR 84','Y  84','ZR 84','NB 84','MO 84'],\
    ['SR 86','RB 86','Y  86','ZR 86','NB 86','MO 86'],\
    ['SR 87','Y  87','ZR 87','NB 87','MO 87','TC 87'],\
    ['SR 88','RB 88','KR 88','BR 88','SE 88','Y  88','ZR 88','NB 88','MO 88','TC 88'],\
    ['Y  89','SR 89','RB 89','KR 89','BR 89','ZR 89','NB 89','MO 89','TC 89','RU 89'],\
    ['ZR 90','Y  90','SR 90','RB 90','KR 90','BR 90','NB 90','MO 90','TC 90','RU 90'],\
    ['ZR 91','Y  91','SR 91','RB 91','KR 91','BR 91','SE 91','NB 91','MO 91','TC 91','RU 91','RH 91'],\
    ['ZR 92','Y  92','SR 92','RB 92','KR 92','BR 92','NB 92'],\
    ['ZR 94','Y  94','SR 94','RB 94','KR 94'],\
    ['ZR 96','Y  96','SR 96'],\
    ['NB 93','ZR 93','Y  93','SR 93','RB 93','KR 93','MO 93','TC 93','RU 93','RH 93','PD 93'],\
    ['MO 92','TC 92','RU 92','RH 92','PD 92'],\
    ['MO 94','NB 94','TC 94','RU 94','RH 94','PD 94'],\
    ['MO 95','NB 95','ZR 95','Y  95','SR 95','TC 95','RU 95','RH 95','PD 95','AG 95'],\
    ['MO 96','NB 96','TC 96'],\
    ['MO 97','NB 97','ZR 97','Y  97','SR 97','TC 97','RU 97','RH 97','PD 97','AG 97','CD 97'],\
    ['MO 98','NB 98','ZR 98','Y  98','SR 98'],\
    ['MO100','NB100','ZR100','Y 100'],\
    ['RU 96','RH 96','PD 96','AG 96'],\
    ['RU 98','TC 98','RH 98','PD 98','AG 98','CD 98'],\
    ['RU 99','TC 99','MO 99','NB 99','ZR 99','Y  99','RH 99','PD 99','AG 99','CD 99','IN 99'],\
    ['RU100','TC100','RH100','PD100','AG100','CD100','IN100','SN100'],\
    ['RU101','TC101','MO101','NB101','ZR101','Y 101','RH101','PD101','AG101','CD101','IN101','SN101'],\
    ['RU102','MO102','TC102','NB102','ZR102','Y 102','RH102'],\
    ['RU104','TC104','MO104','NB104'],\
    ['RH103','RU103','TC103','MO103','NB103','ZR103','Y 103','PD103','AG103','CD103','IN103','SN103'],\
    ['PD102','AG102','CD102','IN102','SN102'],\
    ['PD104','RH104','AG104','CD104','IN104','SN104','SB104'],\
    ['PD105','RH105','RU105','TC105','MO105','NB105','ZR105','AG105','CD105','IN105','SN105','SB105'],\
    ['PD106','RH106','RU106','TC106','MO106','NB106','AG106'],\
    ['PD108','RH108','RU108','TC108','MO108','NB108'],\
    ['PD110','RH110','RU110','TC110','MO110','NB110'],\
    ['AG107','PD107','RH107','RU107','TC107','MO107','CD107','IN107','SN107','SB107'],\
    ['AG109','PD109','RH109','RU109','TC109','MO109','NB109','CD109','IN109','SN109','SB109','TE109'],\
    ['CD106','IN106','SN106','SB106'],\
    ['CD108','AG108','IN108','SN108','SB108'],\
    ['CD110','AG110','IN110','SN110','SB110','TE110'],\
    ['CD111','AG111','PD111','RH111','RU111','TC111','IN111','SN111','SB111','TE111','I 111'],\
    ['CD112','AG112','PD112','RH112','RU112','TC112'],\
    ['CD113','AG113','PD113','RH113','RU113'],\
    ['CD114','AG114','PD114','RH114','RU114'],\
    ['CD116','AG116','PD116','RH116'],\
    ['IN113','SN113','SB113','TE113','I 113','XE113'],\
    ['IN115','CD115','AG115','PD115','RH115','RU115'],\
    ['SN112','IN112','SB112','TE112','I 112','XE112'],\
    ['SN114','IN114','SB114','TE114','I 114','XE114','CS114'],\
    ['SN115','SB115','TE115','I 115','XE115','CS115','BA115'],\
    ['SN116','IN116','SB116','TE116','I 116','XE116','CS116','BA116'],\
    ['SN117','IN117','AG117','PD117','RH117','SB117','CD117','TE117','I 117','XE117','CS117','BA117'],\
    ['SN118','IN118','CD118','AG118','PD118','SB118','TE118','XE118','CS118','BA118'],\
    ['SN119','IN119','CD119','AG119','PD119','SB119','TE119','XE119','CS119','BA119'],\
    ['SN120','SB120','IN120','CD120','AG120','PD120'],\
    ['SN122','IN122','CD122','AG122'],\
    ['SN124','IN124','CD124'],\
    ['SB121','SN121','IN121','CD121','AG121','TE121','I 121','XE121','CS121','XE121','CS121','BA121','LA121','CE121'],
    ['SB123','SN123','IN123','CD123','AG123'],\
    ['TE120','I 120','XE120','CS120','BA120','LA120'],\
    ['TE122','SB122','I 122','XE122','CS122','BA122','LA122'],\
    ['TE123','I 123','XE123','CS123','BA123','LA123','CE123'],\
    ['TE124','SB124','I 124'],\
    ['TE125','SB125','SN125','IN125','CD125','I 125','XE125','CS125','BA125','LA125','CE125','PR125'],\
    ['TE126','SB126','SN126','IN126','CD126'],\
    ['TE128','SB128','SN128','IN128','CD128'],\
    ['TE130','SB130','SN130','IN130'],\
    ['I 127','TE127','SB127','SN127','IN127','CD127','XE127','CS127','BA127','LA127','CE127','PR127','ND127'],\
    ['XE124','CS124','BA124','LA124','CE124','PR124'],\
    ['XE126','I 126','CS126','BA126','LA126','CE126','PR126'],\
    ['XE128','I 128','CS128','BA128','LA128','CE128','PR128'],\
    ['XE129','I 129','TE129','SB129','SN129','IN129','CD129','CS129','BA129','LA129','CE129','PR129','ND129'],\
    ['XE130','I 130','CS130'],\
    ['XE131','I 131','TE131','SB131','SN131','IN131','CS131','BA131','LA131','CE131','PR131','ND131','PM131','SM131'],\
    ['XE132','I 132','TE132','SB132','SN132','IN132','CS132'],
    ['XE134','I 134','TE134','SB134','SN134'],\
    ['XE136','I 136','TE136','SB136'],\
    ['CS133','XE133','I 133','TE133','SB133','SN133','BA133','LA133','CE133','PR133','ND133','PM133','SM133'],\
    ['BA130','LA130','CE130','PR130','ND130','PM130'],\
    ['BA132','LA132','CE132','PR132','ND132','PM132','SM132'],\
    ['BA134','CS134','LA134','CE134','PR134','ND134','PM134','SM134','EU134'],\
    ['BA135','CS135','XE135','I 135','TE135','SB135','SN135','LA135','CE135','PR135','ND135','PM135','SM135','EU135','GD135'],\
    ['BA136','CS136','LA136'],\
    ['BA137','CS137','XE137','I 137','TE137','SB137','LA137','CE137','PR137','ND137','PM137','SM137','EU137','GD137'],\
    ['BA138','CS138','XE138','I 138','TE138'],\
    ['LA138'],\
    ['LA139','BA139','CS139','XE139','I 139','CE139','PR139','ND139','PM139','SM139','EU139','GD139','TB139','DY139'],\
    ['CE136','PR136','ND136','PM136','SM136','EU136'],\
    ['CE138','PR138','ND138','PM138','SM138','EU138','GD138'],\
    ['CE140','LA140','BA140','CS140','XE140','I 140','PR140','ND140','PM140','SM140','EU140','GD140','TB140'],\
    ['CE142','LA142','BA142','CS142','XE142','I 142'],\
    ['PR141','CE141','LA141','BA141','CS141','XE141','I 141','ND141','PM141','SM141','EU141','GD141','TB141','DY141'],\
    ['ND142','PR142','PM142','SM142','EU142','GD142','TB142','DY142','HO142','SM146','EU146','GD146','TB146','DY146','HO146','ER146',\
'GD150','TB150','DY150','HO150','ER150','DY154','HO154','ER154'],\
    ['ND143','PR143','CE143','LA143','BA143','CS143','XE143','PM143','SM143','EU143','GD143','TB143','DY143'],\
    ['ND144','PR144','CE144','LA144','BA144','CS144','XE144','PM144'],\
    ['ND145','PR145','CE145','LA145','BA145','CS145','PM145','SM145','EU145','GD145','TB145','DY145','HO145','ER145'],\
    ['ND146','PR146','CE146','LA146','BA146','CS146','PM146'],\
    ['ND148','PR148','CE148','LA148','BA148'],\
    ['ND150','PR150','CE150','LA150','BA150'],\
    ['SM144','EU144','GD144','TB144','DY144','HO144','GD148','TB148','DY148','HO148','ER148','TM148'],\
    ['SM147','PM147','ND147','PR147','CE147','LA147','BA147','EU147','GD147','TB147','DY147','HO147','ER147'],\
    ['SM148','PM148','EU148'],\
    ['SM149','PM149','ND149','PR149','CE149','LA149','EU149','GD149','TB149','DY149','HO149','ER149','TM149','YB149'],\
    ['SM150','PM150','EU150'],\
    ['SM152','PM152','ND152','PR152','CE152','EU152'],\
    ['SM154','PM154','ND154','PR154'],\
    ['EU151','SM151','PM151','ND151','PR151','CE151','GD151','TB151'],\
    ['EU153','SM153','PM153','GD153','PR153','GD153','TB153','DY153','HO153'],\
    ['GD152','TB152','DY152','HO152'],\
    ['GD154','EU154','TB154'],\
    ['GD155','EU155','SM155','PM155','ND155','TB155','DY155','HO155','ER155','TM155'],\
    ['GD156','EU156','SM156','PM156','ND156','TB156'],\
    ['GD157','EU157','SM157','PM157','TB157','DY157','HO157','ER157','TM157','YB157'],\
    ['GD158','EU158','SM158','PM158','TB158'],\
    ['GD160','EU160','SM160'],\
    ['TB159','GD159','EU159','SM159','PM159','DY159','HO159','ER159','TM159','YB159','LU159'],\
    ['DY156','HO156','ER156','TM156','YB156','HO156','ER156','TM156','YB156'],\
    ['DY158','HO158','ER158','TM158','YB158','LU158'],\
    ['DY160','TB160','HO160','ER160','TM160','YB160','LU160','HF160'],\
    ['DY161','TB161','GD161','EU161','SM161','PM161','ND161','HO161','ER161','TM161','YB161','LU161','HF161','TA161'],\
    ['DY162','TB162','GD162','EU162','SM162','PM162','HO162'],\
    ['DY163','TB163','HO163','GD163','EU163','SM163','PM163','ND163','ER163','TM163','YB163','LU163','HF163','TA163'],\
    ['DY164','TB164','HO164','GD164','EU164','SM164','PM164','ND164','HO164'],\
    ['HO165','DY165','ER165','TB165','GD165','EU165','SM165','PM165','HO165','TM165','YB165','LU165','HF165','TA165','W 165'],\
    ['ER162','TM162','YB162','LU162','HF162','TA162'],\
    ['ER164','TM164','YB164','LU164','HF164','TA164','W 164'],\
    ['ER166','HO166','DY166','TB166','GD166','EU166','SM166','PM166','ND166','TM166','YB166','LU166','HF166','TA166','W 166','RE166'],\
    ['ER167','HO167','DY167','TB167','GD167','EU167','SM167','PM167','ND167','TM167','YB167','LU167','HF167','TA167','W 167','RE167'],\
    ['ER168','HO168','DY168','TB168','GD168','EU168','SM168','PM168','ND168','TM168'],\
    ['ER170','HO170','DY170','TB170','GD170','EU170','SM170','PM170','ND170'],\
    ['TM169','ER169','HO169','DY169','TB169','GD169','EU169','SM169','PM169','ND169','YB169','LU169','HF169','TA169','W 169','RE169'],\
    ['YB168','LU168','HF168','TA168','W 168','RE168'],\
    ['YB170','TM170','LU170','HF170','TA170','W 170','RE170','OS170'],\
    ['YB171','TM171','ER171','HO171','DY171','TB171','GD171','EU171','SM171','PM171','ND171','LU171','HF171','TA171','W 171','RE171','OS171'],\
    ['YB172','TM172','ER172','HO172','DY172','TB172','GD172','EU172','SM172','PM172','ND172','LU172','HF172','TA172','W 172','RE172','OS172','IR172'],\
    ['YB173','TM173','ER173','HO173','DY173','TB173','GD173','EU173','SM173','PM173','ND173','LU173','HF173','TA173','W 173','RE173','OS173','IR173'],\
    ['YB174','TM174','ER174','HO174','DY174','TB174','GD174','EU174','SM174','PM174','ND174','LU174'],\
    ['YB176','TM176','ER176','HO176','DY176','TB176','GD176','EU176','SM176','PM176','ND176'],\
    ['LU175','YB175','TM175','ER175','HO175','DY175','TB175','GD175','EU175','SM175','PM175','ND175','HF175','TA175','W 175','RE175','OS175','IR175'],\
    ['LU176','HF176','TA176','W 176','RE176','OS176','IR176'],\
    ['HF174','TA174','W 174','RE174','OS174','IR174'],\
    ['HF176','TA176','W 176','RE176','OS176','IR176'],\
    ['HF177','LU177','YB177','LU177','YB177','TM177','ER177','HO177','DY177','TB177','GD177','TA177','W 177','RE177','OS177','IR177'],\
    ['HF178','LU178','YB178','LU178','YB178','TM178','ER178','HO178','DY178','TB178','GD178','TA178','W 178','RE178','OS178','IR178'],\
    ['HF179','LU179','YB179','LU179','YB179','TM179','ER179','HO179','DY179','TB179','GD179','TA179','W 179','RE179','OS179','IR179','PT179'],\
    ['HF180','LU180','YB180','LU180','YB180','TM180','ER180','HO180','DY180','TB180','GD180','TA180','W 180','RE180','OS180','IR180','PT180','AU180'],\
    ['TA180'],\
    ['TA181','HF181','LU181','YB181','LU181','YB181','TM181','ER181','HO181','DY181','TB181','GD181','W 181','RE181','OS181','IR181','PT181','AU181'],\
    ['W 180','RE180','OS180','IR180','PT180','AU180'],\
    ['W 182','TA182','HF182','LU182','YB182','LU182','YB182','TM182','ER182','HO182','DY182','TB182','GD182','RE182','OS182','IR182','PT182','AU182'],\
    ['W 183','TA183','HF183','LU183','YB183','LU183','YB183','TM183','ER183','HO183','DY183','TB183','GD183','RE183','OS183','IR183','PT183','AU183'],\
    ['W 184','TA184','HF184','LU184','YB184','LU184','YB184','TM184','ER184','HO184','DY184','TB184','GD184','RE184'],\
    ['W 186','TA186','HF186','LU186','YB186','LU186','YB186','TM186','ER186','HO186','DY186','TB186','GD186'],\
    ['RE185','W 185','TA185','HF185','LU185','YB185','LU185','YB185','TM185','ER185','HO185','DY185','TB185','GD185','OS185','IR185','PT185','AU185','HG185','TL185'],\
    ['RE187','W 187','TA187','HF187','LU187','YB187','LU187','YB187','TM187','ER187','HO187','DY187','TB187','GD187'],\
    ['OS184','IR184','PT184','AU184','HG184','TL184'],\
    ['OS186','RE186','IR186','PT186','AU186','HG186','TL186'],\
    ['OS187','IR187','PT187','AU187','HG187','TL187','PB187'],\
    ['OS188','RE188','W 188','TA188','HF188','LU188','YB188','LU188','YB188','TM188','ER188','HO188','DY188','TB188','GD188','IR188','PT188','AU188','HG188','TL188','PB188'],\
    ['OS189','RE189','W 189','TA189','HF189','LU189','YB189','LU189','YB189','TM189','ER189','HO189','DY189','TB189','GD189','IR189','PT189','AU189','HG189','TL189','PB189'],\
    ['OS190','RE190','W 190','TA190','HF190','LU190','YB190','LU190','YB190','TM190','ER190','HO190','DY190','TB190','GD190','IR190'],\
    ['OS192','RE190','W 192','TA192','HF192','LU192','YB192','LU192','YB192','TM192','ER192','HO192','DY192','TB192','GD192'],\
    ['IR191','OS191','RE191','W 191','TA191','HF191','LU191','YB191','LU191','YB191','TM191','ER191','HO191','DY191','TB191','GD191','PT191','AU191','HG191','TL191','PB191'],\
    ['IR193','OS193','RE193','W 193','TA193','HF193','LU193','YB193','LU193','YB193','TM193','ER193','HO193','DY193','TB193','GD193','PT193','AU193','HG193','TL193','PB193'],\
    ['PT190','AU190','HG190','TL190','PB190'],\
    ['PT192','IR192','AU192','HG192','TL192','PB192'],\
    ['PT194','IR194','OS194','RE194','W 194','TA194','HF194','AU194','HG194','TL194','PB194','BI194'],
    ['PT195','IR195','OS195','RE195','W 195','TA195','HF195','AU195','HG195','TL195','PB195','BI195'],\
    ['PT196','IR196','OS196','RE196','W 196','TA196','HF196','AU196'],\
    ['PT198','IR198','OS198','RE198','W 198','TA198','HF198'],\
    ['AU197','PT197','IR197','OS197','RE197','W 197','TA197','HF197','HG197','TL197','PB197','BI197'],\
    ['HG196','TL196','PB196','BI196'],\
    ['HG198','AU198','TL198','PB198','BI198'],\
    ['HG199','AU199','PT199','IR199','OS199','RE199','W 199','TA199','HF199','TL199','PB199','BI199'],\
    ['HG200','AU200','PT200','IR200','OS200','RE200','W 200','TA200','HF200','TL200','PB200','BI200'],\
    ['HG201','AU201','PT201','IR201','OS201','RE201','W 201','TA201','HF201','TL201','PB201','BI201','PO201'],\
    ['HG202','AU202','PT202','IR202','OS202','RE202','W 202','TA202','HF202','TL202','PB202','BI202','PO202'],\
    ['HG204','AU204','PT204','IR204','OS204','RE204','W 204','TA204','HF204'],\
    ['TL203','HG203','AU203','PT203','IR203','OS203','RE203','W 203','TA203','HF203','PB203','BI203','PO203'],\
    ['TL205','HG205','AU205','PT205','IR205','OS205','RE205','W 205','TA205','HF205','PB205','BI205','PO205'],\
    ['PB204','TL204','BI204','PO204'],\
    ['PB206','TL206','HG206','AU206','PT206','IR206','OS206','RE206','W 206','TA206','HF206','BI206','PO210'],\
    ['PB207','TL207','HG207','AU207','PT207','IR207','OS207','RE207','W 207','TA207','HF207','BI207','PO211','BI211'],\
    ['PB208','TL208','HG208','AU208','PT208','IR208','OS208','RE208','W 208','TA208','HF208','BI208','PO212','BI212'],\
    ['BI209','PB209','TL209','HG209','AU209','PT209','IR209','OS209','RE209','W 209','TA209','HF209'],\
    ['TH232','AC232','RA232','FR232','RN232'],\
    ['U 235','PA235','TH235','AC235','RA235','FR235','RN235'],\
    ['U 238','PA238','TH238','AC238','RA238','FR238','RN238']]
674761
def RDirs(self, pathlist):
        """"""
        cwd = self.cwd or self.fs._cwd
        return cwd.Rfindalldirs(pathlist)
1366928
def repo_status(path)
      messages = []
      messages << EMPTY_MESSAGE if repo_empty?(path)
      messages << UNCOMMITTED_MESSAGE if commit_pending?(path)
      messages << UNTRACKED_MESSAGE if untracked_files?(path)
      messages << UNPUSHED_MESSAGE if repo_unpushed?(path)
      messages.join(JOIN_STRING)
    end
545841
function ensure (env, options, names) {
  for (let k of Object.keys(names)) {
    let v = names[k]

    if (options[v]) {
      env[k] = options[v]
      env[k + 'Cwd'] = true
    }
  }
}
123692
def run(self, path, pretend=False):
        
        self._notes = []

        files = self._get_migration_files(path)

        ran = self._repository.get_ran()

        migrations = [f for f in files if f not in ran]

        self.run_migration_list(path, migrations, pretend)
594896
def cli(env, identifier, ack):
    """"""

    # Print a list of all on going maintenance
    manager = AccountManager(env.client)
    event = manager.get_event(identifier)

    if ack:
        manager.ack_event(identifier)

    env.fout(basic_event_table(event))
    env.fout(impacted_table(event))
    env.fout(update_table(event))
559003
public void ensure(CuratorZookeeperClient client) throws Exception
    {
        Helper localHelper = helper.get();
        localHelper.ensure(client, path, makeLastNode);
    }
914536
def cli(ctx, common_name, directory, blatdb="", genus="", species="", public=False):
    
    return ctx.gi.organisms.add_organism(common_name, directory, blatdb=blatdb, genus=genus, species=species, public=public)
1144810
def envs(self, back=None, sources=False):
        '''
        
        '''
        back = self.backends(back)
        ret = set()
        if sources:
            ret = {}
        for fsb in back:
            fstr = '{0}.envs'.format(fsb)
            kwargs = {'ignore_cache': True} \
                if 'ignore_cache' in _argspec(self.servers[fstr]).args \
                and self.opts['__role'] == 'minion' \
                else {}
            if sources:
                ret[fsb] = self.servers[fstr](**kwargs)
            else:
                ret.update(self.servers[fstr](**kwargs))
        if sources:
            return ret
        return list(ret)
418274
def _species_subdir(
        ensembl_release,
        species="homo_sapiens",
        filetype="gtf",
        server=ENSEMBL_FTP_SERVER):
    
    return SPECIES_SUBDIR_TEMPLATE % {
        "release": ensembl_release,
        "filetype": filetype,
        "species": species,
    }
96857
def _get_zk_path_children(self, zk_conn, zk_path, name_for_error):
        """"""
        children = []
        try:
            children = zk_conn.get_children(zk_path)
        except NoNodeError:
            self.log.info('No zookeeper node at %s', zk_path)
        except Exception:
            self.log.exception('Could not read %s from %s', name_for_error, zk_path)
        return children
894389
def setup(self):
        '''
        
        '''
        self.zoo_client.add_listener(self.state_listener)

        if self.ensure:
            self.zoo_client.ensure_path(self.my_file)
662232
def _list_existing(filesystem, glob, paths):
    
    globs = _constrain_glob(glob, paths)
    time_start = time.time()
    listing = []
    for g in sorted(globs):
        logger.debug('Listing %s', g)
        if filesystem.exists(g):
            listing.extend(filesystem.listdir(g))
    logger.debug('%d %s listings took %f s to return %d items',
                 len(globs), filesystem.__class__.__name__, time.time() - time_start, len(listing))
    return set(listing)
264202
def build_trees(self):
        ""

        # storage
        nodes = {}
        idxarr = np.arange(len(self.fclade_counts[0][0]))
        queue = []

        ## create dict of clade counts and set keys
        countdict = defaultdict(int)
        for clade, count in self.fclade_counts:
            mask = np.int_(list(clade)).astype(np.bool)
            ccx = idxarr[mask]
            queue.append((len(ccx), frozenset(ccx)))
            countdict[frozenset(ccx)] = count

        while queue:
            queue.sort()
            (clade_size, clade) = queue.pop(0)
            new_queue = []

            # search for ancestors of clade
            for (_, ancestor) in queue:
                if clade.issubset(ancestor):
                    # update ancestor such that, in the following example:
                    # ancestor == {1, 2, 3, 4}
                    # clade == {2, 3}
                    # new_ancestor == {1, {2, 3}, 4}
                    new_ancestor = (ancestor - clade) | frozenset([clade])
                    countdict[new_ancestor] = countdict.pop(ancestor)
                    ancestor = new_ancestor

                new_queue.append((len(ancestor), ancestor))

            # if the clade is a tip, then we have a name
            if clade_size == 1:
                name = list(clade)[0]
                name = self.namedict[name]
            else:
                name = None

            # the clade will not be in nodes if it is a tip
            children = [nodes.pop(c) for c in clade if c in nodes]
            node = TreeNode(name=name)
            for child in children:
                node.add_child(child)
            if not node.is_leaf():
                node.dist = int(round(100 * countdict[clade]))
                node.support = int(round(100 * countdict[clade]))
            else:
                node.dist = int(100)
                node.support = int(100)

            nodes[clade] = node
            queue = new_queue
        nodelist = list(nodes.values())
        tre = nodelist[0]

        #tre.unroot()
        ## return the tree and other trees if present
        self.ttree = ToyTree(tre.write(format=0))
        self.ttree._coords.update()
        self.nodelist = nodelist
1296285
def build_info(name, path=None, module=None):
    """"""
    verlist = get_version_list(path, module)
    verlist[0] = name
    return tuple(verlist)
469121
def as_list(self):
        """"""
        go_id = self.go_term.id
        
        qual_str = '|'.join(self.qualifier)
        db_ref_str = '|'.join(self.db_ref)
        taxon_str = '|'.join(self.taxon)

        # with_from is currently left as a string
        # with_from = '|'.join()
        with_from_str = self.with_from or ''
        db_name_str = self.db_name or ''
        db_syn_str = '|'.join(self.db_syn)
        ext_str = '|'.join(self.ext)
        product_id_str = self.product_id or ''

        l = [
            self.db,
            self.db_id,
            self.db_symbol,
            qual_str,
            go_id,
            db_ref_str,
            self.ev_code,
            with_from_str,
            self.aspect,
            db_name_str,
            db_syn_str,
            self.db_type,
            taxon_str,
            self.date,
            self.assigned_by,
            ext_str,
            product_id_str,
        ]
        return l
623335
def Parse(self, persistence, knowledge_base, download_pathtype):
    """"""
    pathspecs = []

    if isinstance(persistence, rdf_client.OSXServiceInformation):
      if persistence.program:
        pathspecs = rdf_paths.PathSpec(
            path=persistence.program, pathtype=download_pathtype)
      elif persistence.args:
        pathspecs = rdf_paths.PathSpec(
            path=persistence.args[0], pathtype=download_pathtype)

    for pathspec in pathspecs:
      yield rdf_standard.PersistenceFile(pathspec=pathspec)