content stringlengths 7 1.05M | fixed_cases stringlengths 1 1.28M |
|---|---|
DOMAIN = {
'20191016_1571241600': {'datasource': {'source': '20191016_1571241600'}},
'20191210_1575997200': {'datasource': {'source': '20191210_1575997200'}},
'20190724_1563969600': {'datasource': {'source': '20190724_1563969600'}},
'20191128_1574982000': {'datasource': {'source': '20191128_1574982000'}},
'20191029_1572386400': {'datasource': {'source': '20191029_1572386400'}},
'20191202_1575291600': {'datasource': {'source': '20191202_1575291600'}},
'20191122_1574427600': {'datasource': {'source': '20191122_1574427600'}},
'20190729_1564437600': {'datasource': {'source': '20190729_1564437600'}},
'20191207_1575738000': {'datasource': {'source': '20191207_1575738000'}},
'20190709_1562688000': {'datasource': {'source': '20190709_1562688000'}},
'20191022_1571760000': {'datasource': {'source': '20191022_1571760000'}},
'20190723_1563919200': {'datasource': {'source': '20190723_1563919200'}},
'20190707_1562500800': {'datasource': {'source': '20190707_1562500800'}},
'20191120_1574290800': {'datasource': {'source': '20191120_1574290800'}},
'20190810_1565438400': {'datasource': {'source': '20190810_1565438400'}},
'20190807_1565193600': {'datasource': {'source': '20190807_1565193600'}},
'20191127_1574859600': {'datasource': {'source': '20191127_1574859600'}},
'20191127_1574895600': {'datasource': {'source': '20191127_1574895600'}},
'20191009_1570658400': {'datasource': {'source': '20191009_1570658400'}},
'20190712_1562947200': {'datasource': {'source': '20190712_1562947200'}},
'20190815_1565906400': {'datasource': {'source': '20190815_1565906400'}},
'20190727_1564243200': {'datasource': {'source': '20190727_1564243200'}},
'20190829_1567116000': {'datasource': {'source': '20190829_1567116000'}},
'20190919_1568930400': {'datasource': {'source': '20190919_1568930400'}},
'20191129_1575032400': {'datasource': {'source': '20191129_1575032400'}},
'20190905_1567684800': {'datasource': {'source': '20190905_1567684800'}},
'20191129_1575068400': {'datasource': {'source': '20191129_1575068400'}},
'20190913_1568412000': {'datasource': {'source': '20190913_1568412000'}},
'20191121_1574377200': {'datasource': {'source': '20191121_1574377200'}},
'20190803_1564869600': {'datasource': {'source': '20190803_1564869600'}},
'20191108_1573232400': {'datasource': {'source': '20191108_1573232400'}},
'20191113_1573664400': {'datasource': {'source': '20191113_1573664400'}},
'20191008_1570572000': {'datasource': {'source': '20191008_1570572000'}},
'20191027_1572177600': {'datasource': {'source': '20191027_1572177600'}},
'20190710_1562774400': {'datasource': {'source': '20190710_1562774400'}},
'20191122_1574442000': {'datasource': {'source': '20191122_1574442000'}},
'20191001_1569931200': {'datasource': {'source': '20191001_1569931200'}},
'20191015_1571176800': {'datasource': {'source': '20191015_1571176800'}},
'20190826_1566856800': {'datasource': {'source': '20190826_1566856800'}},
'20191005_1570276800': {'datasource': {'source': '20191005_1570276800'}},
'20191212_1576155600': {'datasource': {'source': '20191212_1576155600'}},
'20191201_1575241200': {'datasource': {'source': '20191201_1575241200'}},
'20190717_1563364800': {'datasource': {'source': '20190717_1563364800'}},
'20191211_1576105200': {'datasource': {'source': '20191211_1576105200'}},
'20190922_1569168000': {'datasource': {'source': '20190922_1569168000'}},
'20191011_1570809600': {'datasource': {'source': '20191011_1570809600'}},
'20191012_1570917600': {'datasource': {'source': '20191012_1570917600'}},
'20190914_1568498400': {'datasource': {'source': '20190914_1568498400'}},
'20190827_1566943200': {'datasource': {'source': '20190827_1566943200'}},
'20190703_1562169600': {'datasource': {'source': '20190703_1562169600'}},
'20190906_1567785600': {'datasource': {'source': '20190906_1567785600'}},
'20191111_1573477200': {'datasource': {'source': '20191111_1573477200'}},
'20190817_1566079200': {'datasource': {'source': '20190817_1566079200'}},
'20191117_1573995600': {'datasource': {'source': '20191117_1573995600'}},
'20190714_1563105600': {'datasource': {'source': '20190714_1563105600'}},
'20190711_1562860800': {'datasource': {'source': '20190711_1562860800'}},
'20191208_1575846000': {'datasource': {'source': '20191208_1575846000'}},
'20190922_1569153600': {'datasource': {'source': '20190922_1569153600'}},
'20190820_1566302400': {'datasource': {'source': '20190820_1566302400'}},
'20190826_1566835200': {'datasource': {'source': '20190826_1566835200'}},
'20190715_1563228000': {'datasource': {'source': '20190715_1563228000'}},
'20190902_1567461600': {'datasource': {'source': '20190902_1567461600'}},
'20190901_1567339200': {'datasource': {'source': '20190901_1567339200'}},
'20190804_1564956000': {'datasource': {'source': '20190804_1564956000'}},
'20191008_1570536000': {'datasource': {'source': '20191008_1570536000'}},
'20191126_1574773200': {'datasource': {'source': '20191126_1574773200'}},
'20190811_1565539200': {'datasource': {'source': '20190811_1565539200'}},
'20190904_1567598400': {'datasource': {'source': '20190904_1567598400'}},
'20191110_1573405200': {'datasource': {'source': '20191110_1573405200'}},
'20191201_1575219600': {'datasource': {'source': '20191201_1575219600'}},
'20190912_1568304000': {'datasource': {'source': '20190912_1568304000'}},
'20191204_1575464400': {'datasource': {'source': '20191204_1575464400'}},
'20190908_1567944000': {'datasource': {'source': '20190908_1567944000'}},
'20191101_1572624000': {'datasource': {'source': '20191101_1572624000'}},
'20191023_1571868000': {'datasource': {'source': '20191023_1571868000'}},
'20190717_1563400800': {'datasource': {'source': '20190717_1563400800'}},
'20190713_1563055200': {'datasource': {'source': '20190713_1563055200'}},
'20191102_1572696000': {'datasource': {'source': '20191102_1572696000'}},
'20191126_1574787600': {'datasource': {'source': '20191126_1574787600'}},
'20190812_1565611200': {'datasource': {'source': '20190812_1565611200'}},
'20191020_1571572800': {'datasource': {'source': '20191020_1571572800'}},
'20190918_1568822400': {'datasource': {'source': '20190918_1568822400'}},
'20191107_1573146000': {'datasource': {'source': '20191107_1573146000'}},
'20190721_1563746400': {'datasource': {'source': '20190721_1563746400'}},
'20190714_1563120000': {'datasource': {'source': '20190714_1563120000'}},
'20191116_1573945200': {'datasource': {'source': '20191116_1573945200'}},
'20190909_1568044800': {'datasource': {'source': '20190909_1568044800'}},
'20191011_1570795200': {'datasource': {'source': '20191011_1570795200'}},
'20190919_1568908800': {'datasource': {'source': '20190919_1568908800'}},
'20191204_1575500400': {'datasource': {'source': '20191204_1575500400'}},
'20190921_1569081600': {'datasource': {'source': '20190921_1569081600'}},
'20190911_1568239200': {'datasource': {'source': '20190911_1568239200'}},
'20191203_1575392400': {'datasource': {'source': '20191203_1575392400'}},
'20191006_1570399200': {'datasource': {'source': '20191006_1570399200'}},
'20190914_1568476800': {'datasource': {'source': '20190914_1568476800'}},
'20190923_1569240000': {'datasource': {'source': '20190923_1569240000'}},
'20191104_1572908400': {'datasource': {'source': '20191104_1572908400'}},
'20190806_1565092800': {'datasource': {'source': '20190806_1565092800'}},
'20191112_1573563600': {'datasource': {'source': '20191112_1573563600'}},
'20191030_1572436800': {'datasource': {'source': '20191030_1572436800'}},
'full_20190701_1561982400': {'datasource': {'source': 'full_20190701_1561982400'}},
'20190729_1564401600': {'datasource': {'source': '20190729_1564401600'}},
'20191013_1570968000': {'datasource': {'source': '20191013_1570968000'}},
'20191127_1574874000': {'datasource': {'source': '20191127_1574874000'}},
'20191123_1574550000': {'datasource': {'source': '20191123_1574550000'}},
'20191112_1573599600': {'datasource': {'source': '20191112_1573599600'}},
'20191211_1576069200': {'datasource': {'source': '20191211_1576069200'}},
'20190828_1566993600': {'datasource': {'source': '20190828_1566993600'}},
'20190922_1569189600': {'datasource': {'source': '20190922_1569189600'}},
'20190727_1564228800': {'datasource': {'source': '20190727_1564228800'}},
'20190809_1565388000': {'datasource': {'source': '20190809_1565388000'}},
'20191030_1572472800': {'datasource': {'source': '20191030_1572472800'}},
'20190828_1567029600': {'datasource': {'source': '20190828_1567029600'}},
'20190929_1569794400': {'datasource': {'source': '20190929_1569794400'}},
'20191119_1574204400': {'datasource': {'source': '20191119_1574204400'}},
'20190907_1567857600': {'datasource': {'source': '20190907_1567857600'}},
'20190921_1569103200': {'datasource': {'source': '20190921_1569103200'}},
'20191104_1572886800': {'datasource': {'source': '20191104_1572886800'}},
'20190815_1565884800': {'datasource': {'source': '20190815_1565884800'}},
'20190818_1566165600': {'datasource': {'source': '20190818_1566165600'}},
'20191106_1573059600': {'datasource': {'source': '20191106_1573059600'}},
'20190701_1562018400': {'datasource': {'source': '20190701_1562018400'}},
'20191022_1571745600': {'datasource': {'source': '20191022_1571745600'}},
'20191121_1574341200': {'datasource': {'source': '20191121_1574341200'}},
'20190802_1564747200': {'datasource': {'source': '20190802_1564747200'}},
'20190704_1562256000': {'datasource': {'source': '20190704_1562256000'}},
'20190920_1568995200': {'datasource': {'source': '20190920_1568995200'}},
'20191002_1570017600': {'datasource': {'source': '20191002_1570017600'}},
'20191120_1574269200': {'datasource': {'source': '20191120_1574269200'}},
'20190812_1565647200': {'datasource': {'source': '20190812_1565647200'}},
'20191203_1575414000': {'datasource': {'source': '20191203_1575414000'}},
'20190807_1565179200': {'datasource': {'source': '20190807_1565179200'}},
'20190817_1566043200': {'datasource': {'source': '20190817_1566043200'}},
'20190704_1562241600': {'datasource': {'source': '20190704_1562241600'}},
'20190929_1569758400': {'datasource': {'source': '20190929_1569758400'}},
'20191214_1576342800': {'datasource': {'source': '20191214_1576342800'}},
'20190904_1567634400': {'datasource': {'source': '20190904_1567634400'}},
'20191130_1575118800': {'datasource': {'source': '20191130_1575118800'}},
'20191013_1571004000': {'datasource': {'source': '20191013_1571004000'}},
'20191215_1576414800': {'datasource': {'source': '20191215_1576414800'}},
'20191120_1574254800': {'datasource': {'source': '20191120_1574254800'}},
'20191211_1576083600': {'datasource': {'source': '20191211_1576083600'}},
'20191106_1573045200': {'datasource': {'source': '20191106_1573045200'}},
'20191205_1575586800': {'datasource': {'source': '20191205_1575586800'}},
'20190928_1569686400': {'datasource': {'source': '20190928_1569686400'}},
'20190927_1569585600': {'datasource': {'source': '20190927_1569585600'}},
'20191014_1571054400': {'datasource': {'source': '20191014_1571054400'}},
'20190822_1566489600': {'datasource': {'source': '20190822_1566489600'}},
'20190827_1566921600': {'datasource': {'source': '20190827_1566921600'}},
'20190912_1568289600': {'datasource': {'source': '20190912_1568289600'}},
'20190720_1563624000': {'datasource': {'source': '20190720_1563624000'}},
'20191111_1573491600': {'datasource': {'source': '20191111_1573491600'}},
'20190723_1563897600': {'datasource': {'source': '20190723_1563897600'}},
'20190907_1567893600': {'datasource': {'source': '20190907_1567893600'}},
'20190819_1566252000': {'datasource': {'source': '20190819_1566252000'}},
'20190730_1564524000': {'datasource': {'source': '20190730_1564524000'}},
'20190913_1568376000': {'datasource': {'source': '20190913_1568376000'}},
'20190906_1567771200': {'datasource': {'source': '20190906_1567771200'}},
'20191119_1574182800': {'datasource': {'source': '20191119_1574182800'}},
'20190822_1566511200': {'datasource': {'source': '20190822_1566511200'}},
'20191113_1573686000': {'datasource': {'source': '20191113_1573686000'}},
'20190715_1563192000': {'datasource': {'source': '20190715_1563192000'}},
'20190925_1569427200': {'datasource': {'source': '20190925_1569427200'}},
'20190714_1563141600': {'datasource': {'source': '20190714_1563141600'}},
'20190907_1567872000': {'datasource': {'source': '20190907_1567872000'}},
'20191009_1570636800': {'datasource': {'source': '20191009_1570636800'}},
'20190817_1566057600': {'datasource': {'source': '20190817_1566057600'}},
'20191212_1576191600': {'datasource': {'source': '20191212_1576191600'}},
'20190911_1568203200': {'datasource': {'source': '20190911_1568203200'}},
'20190902_1567425600': {'datasource': {'source': '20190902_1567425600'}},
'20190706_1562428800': {'datasource': {'source': '20190706_1562428800'}},
'20190901_1567353600': {'datasource': {'source': '20190901_1567353600'}},
'20191119_1574168400': {'datasource': {'source': '20191119_1574168400'}},
'20190926_1569513600': {'datasource': {'source': '20190926_1569513600'}},
'20190810_1565474400': {'datasource': {'source': '20190810_1565474400'}},
'20191202_1575327600': {'datasource': {'source': '20191202_1575327600'}},
'20191205_1575550800': {'datasource': {'source': '20191205_1575550800'}},
'20190718_1563487200': {'datasource': {'source': '20190718_1563487200'}},
'20190904_1567612800': {'datasource': {'source': '20190904_1567612800'}},
'20190701_1561996800': {'datasource': {'source': '20190701_1561996800'}},
'20191105_1572973200': {'datasource': {'source': '20191105_1572973200'}},
'20191017_1571328000': {'datasource': {'source': '20191017_1571328000'}},
'20191020_1571608800': {'datasource': {'source': '20191020_1571608800'}},
'20191028_1572300000': {'datasource': {'source': '20191028_1572300000'}},
'20190806_1565107200': {'datasource': {'source': '20190806_1565107200'}},
'20191105_1572958800': {'datasource': {'source': '20191105_1572958800'}},
'20191207_1575723600': {'datasource': {'source': '20191207_1575723600'}},
'20190716_1563314400': {'datasource': {'source': '20190716_1563314400'}},
'20190912_1568325600': {'datasource': {'source': '20190912_1568325600'}},
'20191216_1576501200': {'datasource': {'source': '20191216_1576501200'}},
'20190908_1567958400': {'datasource': {'source': '20190908_1567958400'}},
'20191027_1572192000': {'datasource': {'source': '20191027_1572192000'}},
'20190925_1569448800': {'datasource': {'source': '20190925_1569448800'}},
'20191110_1573426800': {'datasource': {'source': '20191110_1573426800'}},
'20191026_1572105600': {'datasource': {'source': '20191026_1572105600'}},
'20190703_1562155200': {'datasource': {'source': '20190703_1562155200'}},
'20190916_1568635200': {'datasource': {'source': '20190916_1568635200'}},
'20190924_1569362400': {'datasource': {'source': '20190924_1569362400'}},
'20191114_1573772400': {'datasource': {'source': '20191114_1573772400'}},
'20191024_1571932800': {'datasource': {'source': '20191024_1571932800'}},
'20190725_1564070400': {'datasource': {'source': '20190725_1564070400'}},
'20191016_1571263200': {'datasource': {'source': '20191016_1571263200'}},
'20190731_1564574400': {'datasource': {'source': '20190731_1564574400'}},
'20191001_1569945600': {'datasource': {'source': '20191001_1569945600'}},
'20191209_1575910800': {'datasource': {'source': '20191209_1575910800'}},
'20190920_1569016800': {'datasource': {'source': '20190920_1569016800'}},
'20190702_1562068800': {'datasource': {'source': '20190702_1562068800'}},
'20191010_1570744800': {'datasource': {'source': '20191010_1570744800'}},
'20190813_1565697600': {'datasource': {'source': '20190813_1565697600'}},
'20190706_1562450400': {'datasource': {'source': '20190706_1562450400'}},
'20191029_1572364800': {'datasource': {'source': '20191029_1572364800'}},
'20190808_1565301600': {'datasource': {'source': '20190808_1565301600'}},
'20190726_1564178400': {'datasource': {'source': '20190726_1564178400'}},
'20191004_1570204800': {'datasource': {'source': '20191004_1570204800'}},
'20191214_1576364400': {'datasource': {'source': '20191214_1576364400'}},
'20191004_1570226400': {'datasource': {'source': '20191004_1570226400'}},
'20190715_1563206400': {'datasource': {'source': '20190715_1563206400'}},
'20191117_1574010000': {'datasource': {'source': '20191117_1574010000'}},
'20191126_1574809200': {'datasource': {'source': '20191126_1574809200'}},
'20191102_1572710400': {'datasource': {'source': '20191102_1572710400'}},
'20190814_1565820000': {'datasource': {'source': '20190814_1565820000'}},
'20190821_1566403200': {'datasource': {'source': '20190821_1566403200'}},
'20191012_1570881600': {'datasource': {'source': '20191012_1570881600'}},
'20190708_1562587200': {'datasource': {'source': '20190708_1562587200'}},
'20190909_1568066400': {'datasource': {'source': '20190909_1568066400'}},
'20191129_1575046800': {'datasource': {'source': '20191129_1575046800'}},
'20190919_1568894400': {'datasource': {'source': '20190919_1568894400'}},
'20190926_1569535200': {'datasource': {'source': '20190926_1569535200'}},
'20191216_1576515600': {'datasource': {'source': '20191216_1576515600'}},
'20190823_1566597600': {'datasource': {'source': '20190823_1566597600'}},
'20190804_1564934400': {'datasource': {'source': '20190804_1564934400'}},
'20191214_1576328400': {'datasource': {'source': '20191214_1576328400'}},
'20191008_1570550400': {'datasource': {'source': '20191008_1570550400'}},
'20191204_1575478800': {'datasource': {'source': '20191204_1575478800'}},
'20191117_1574031600': {'datasource': {'source': '20191117_1574031600'}},
'20190823_1566576000': {'datasource': {'source': '20190823_1566576000'}},
'20190908_1567980000': {'datasource': {'source': '20190908_1567980000'}},
'20190831_1567252800': {'datasource': {'source': '20190831_1567252800'}},
'20191026_1572127200': {'datasource': {'source': '20191026_1572127200'}},
'20190928_1569708000': {'datasource': {'source': '20190928_1569708000'}},
'20190812_1565625600': {'datasource': {'source': '20190812_1565625600'}},
'20190829_1567080000': {'datasource': {'source': '20190829_1567080000'}},
'20191021_1571695200': {'datasource': {'source': '20191021_1571695200'}},
'20190803_1564848000': {'datasource': {'source': '20190803_1564848000'}},
'20190719_1563552000': {'datasource': {'source': '20190719_1563552000'}},
'20190719_1563537600': {'datasource': {'source': '20190719_1563537600'}},
'20190930_1569844800': {'datasource': {'source': '20190930_1569844800'}},
'20191124_1574600400': {'datasource': {'source': '20191124_1574600400'}},
'20190914_1568462400': {'datasource': {'source': '20190914_1568462400'}},
'20191103_1572818400': {'datasource': {'source': '20191103_1572818400'}},
'20191022_1571781600': {'datasource': {'source': '20191022_1571781600'}},
'20191125_1574722800': {'datasource': {'source': '20191125_1574722800'}},
'20191206_1575637200': {'datasource': {'source': '20191206_1575637200'}},
'20191021_1571673600': {'datasource': {'source': '20191021_1571673600'}},
'20191128_1574946000': {'datasource': {'source': '20191128_1574946000'}},
'20191130_1575154800': {'datasource': {'source': '20191130_1575154800'}},
'20190806_1565128800': {'datasource': {'source': '20190806_1565128800'}},
'20191118_1574096400': {'datasource': {'source': '20191118_1574096400'}},
'20190906_1567807200': {'datasource': {'source': '20190906_1567807200'}},
'20191122_1574463600': {'datasource': {'source': '20191122_1574463600'}},
'20190701_1561982400': {'datasource': {'source': '20190701_1561982400'}},
'20191208_1575810000': {'datasource': {'source': '20191208_1575810000'}},
'20191003_1570118400': {'datasource': {'source': '20191003_1570118400'}},
'20190810_1565452800': {'datasource': {'source': '20190810_1565452800'}},
'20190728_1564315200': {'datasource': {'source': '20190728_1564315200'}},
'20190801_1564660800': {'datasource': {'source': '20190801_1564660800'}},
'20191024_1571954400': {'datasource': {'source': '20191024_1571954400'}},
'20191109_1573304400': {'datasource': {'source': '20191109_1573304400'}},
'20191028_1572278400': {'datasource': {'source': '20191028_1572278400'}},
'20191007_1570464000': {'datasource': {'source': '20191007_1570464000'}},
'20191027_1572213600': {'datasource': {'source': '20191027_1572213600'}},
'20191028_1572264000': {'datasource': {'source': '20191028_1572264000'}},
'20190920_1568980800': {'datasource': {'source': '20190920_1568980800'}},
'20190730_1564502400': {'datasource': {'source': '20190730_1564502400'}},
'20190731_1564588800': {'datasource': {'source': '20190731_1564588800'}},
'20190831_1567267200': {'datasource': {'source': '20190831_1567267200'}},
'20190723_1563883200': {'datasource': {'source': '20190723_1563883200'}},
'20191209_1575932400': {'datasource': {'source': '20191209_1575932400'}},
'20190707_1562515200': {'datasource': {'source': '20190707_1562515200'}},
'20191105_1572994800': {'datasource': {'source': '20191105_1572994800'}},
'20190725_1564092000': {'datasource': {'source': '20190725_1564092000'}},
'20190826_1566820800': {'datasource': {'source': '20190826_1566820800'}},
'20191029_1572350400': {'datasource': {'source': '20191029_1572350400'}},
'20191118_1574082000': {'datasource': {'source': '20191118_1574082000'}},
'20191206_1575673200': {'datasource': {'source': '20191206_1575673200'}},
'20191017_1571349600': {'datasource': {'source': '20191017_1571349600'}},
'20191215_1576450800': {'datasource': {'source': '20191215_1576450800'}},
'20191019_1571522400': {'datasource': {'source': '20191019_1571522400'}},
'20191015_1571155200': {'datasource': {'source': '20191015_1571155200'}},
'20190718_1563451200': {'datasource': {'source': '20190718_1563451200'}},
'20190728_1564351200': {'datasource': {'source': '20190728_1564351200'}},
'20190915_1568548800': {'datasource': {'source': '20190915_1568548800'}},
'20190804_1564920000': {'datasource': {'source': '20190804_1564920000'}},
'20190803_1564833600': {'datasource': {'source': '20190803_1564833600'}},
'20190911_1568217600': {'datasource': {'source': '20190911_1568217600'}},
'20190728_1564329600': {'datasource': {'source': '20190728_1564329600'}},
'20190821_1566424800': {'datasource': {'source': '20190821_1566424800'}},
'20190811_1565524800': {'datasource': {'source': '20190811_1565524800'}},
'20190702_1562083200': {'datasource': {'source': '20190702_1562083200'}},
'20190830_1567202400': {'datasource': {'source': '20190830_1567202400'}},
'20191210_1576018800': {'datasource': {'source': '20191210_1576018800'}},
'20190823_1566561600': {'datasource': {'source': '20190823_1566561600'}},
'20190801_1564675200': {'datasource': {'source': '20190801_1564675200'}},
'20190903_1567526400': {'datasource': {'source': '20190903_1567526400'}},
'20190831_1567288800': {'datasource': {'source': '20190831_1567288800'}},
'20191103_1572796800': {'datasource': {'source': '20191103_1572796800'}},
'20190709_1562673600': {'datasource': {'source': '20190709_1562673600'}},
'20191116_1573909200': {'datasource': {'source': '20191116_1573909200'}},
'20190824_1566648000': {'datasource': {'source': '20190824_1566648000'}},
'20191213_1576278000': {'datasource': {'source': '20191213_1576278000'}},
'20191109_1573340400': {'datasource': {'source': '20191109_1573340400'}},
'20191206_1575651600': {'datasource': {'source': '20191206_1575651600'}},
'20191005_1570291200': {'datasource': {'source': '20191005_1570291200'}},
'20190705_1562364000': {'datasource': {'source': '20190705_1562364000'}},
'20190824_1566684000': {'datasource': {'source': '20190824_1566684000'}},
'20191118_1574118000': {'datasource': {'source': '20191118_1574118000'}},
'20191123_1574528400': {'datasource': {'source': '20191123_1574528400'}},
'20190910_1568131200': {'datasource': {'source': '20190910_1568131200'}},
'20190929_1569772800': {'datasource': {'source': '20190929_1569772800'}},
'20190710_1562760000': {'datasource': {'source': '20190710_1562760000'}},
'20190721_1563710400': {'datasource': {'source': '20190721_1563710400'}},
'20190720_1563638400': {'datasource': {'source': '20190720_1563638400'}},
'20191106_1573081200': {'datasource': {'source': '20191106_1573081200'}},
'20191115_1573858800': {'datasource': {'source': '20191115_1573858800'}},
'20190722_1563832800': {'datasource': {'source': '20190722_1563832800'}},
'20190718_1563465600': {'datasource': {'source': '20190718_1563465600'}},
'20191114_1573736400': {'datasource': {'source': '20191114_1573736400'}},
'20190724_1563984000': {'datasource': {'source': '20190724_1563984000'}},
'20190717_1563379200': {'datasource': {'source': '20190717_1563379200'}},
'20190814_1565784000': {'datasource': {'source': '20190814_1565784000'}},
'20190809_1565366400': {'datasource': {'source': '20190809_1565366400'}},
'20190813_1565712000': {'datasource': {'source': '20190813_1565712000'}},
'20190727_1564264800': {'datasource': {'source': '20190727_1564264800'}},
'20191101_1572645600': {'datasource': {'source': '20191101_1572645600'}},
'20190713_1563033600': {'datasource': {'source': '20190713_1563033600'}},
'20191005_1570312800': {'datasource': {'source': '20191005_1570312800'}},
'20191003_1570140000': {'datasource': {'source': '20191003_1570140000'}},
'20190814_1565798400': {'datasource': {'source': '20190814_1565798400'}},
'20191213_1576256400': {'datasource': {'source': '20191213_1576256400'}},
'20191108_1573254000': {'datasource': {'source': '20191108_1573254000'}},
'20190705_1562328000': {'datasource': {'source': '20190705_1562328000'}},
'20190925_1569412800': {'datasource': {'source': '20190925_1569412800'}},
'20191209_1575896400': {'datasource': {'source': '20191209_1575896400'}},
'20191216_1576537200': {'datasource': {'source': '20191216_1576537200'}},
'20191130_1575133200': {'datasource': {'source': '20191130_1575133200'}},
'20190909_1568030400': {'datasource': {'source': '20190909_1568030400'}},
'20190927_1569600000': {'datasource': {'source': '20190927_1569600000'}},
'20191030_1572451200': {'datasource': {'source': '20191030_1572451200'}},
'20191016_1571227200': {'datasource': {'source': '20191016_1571227200'}},
'20190821_1566388800': {'datasource': {'source': '20190821_1566388800'}},
'20191112_1573578000': {'datasource': {'source': '20191112_1573578000'}},
'20190808_1565265600': {'datasource': {'source': '20190808_1565265600'}},
'20191113_1573650000': {'datasource': {'source': '20191113_1573650000'}},
'20190825_1566734400': {'datasource': {'source': '20190825_1566734400'}},
'20191208_1575824400': {'datasource': {'source': '20191208_1575824400'}},
'20191201_1575205200': {'datasource': {'source': '20191201_1575205200'}},
'20190807_1565215200': {'datasource': {'source': '20190807_1565215200'}},
'20191125_1574686800': {'datasource': {'source': '20191125_1574686800'}},
'20190712_1562932800': {'datasource': {'source': '20190712_1562932800'}},
'20190813_1565733600': {'datasource': {'source': '20190813_1565733600'}},
'20190713_1563019200': {'datasource': {'source': '20190713_1563019200'}},
'20191102_1572732000': {'datasource': {'source': '20191102_1572732000'}},
'20191019_1571500800': {'datasource': {'source': '20191019_1571500800'}},
'20190706_1562414400': {'datasource': {'source': '20190706_1562414400'}},
'20191217_1576587600': {'datasource': {'source': '20191217_1576587600'}},
'20191217_1576602000': {'datasource': {'source': '20191217_1576602000'}},
'20190710_1562796000': {'datasource': {'source': '20190710_1562796000'}},
'20190719_1563573600': {'datasource': {'source': '20190719_1563573600'}},
'20191115_1573822800': {'datasource': {'source': '20191115_1573822800'}},
'20191109_1573318800': {'datasource': {'source': '20191109_1573318800'}},
'20191018_1571400000': {'datasource': {'source': '20191018_1571400000'}},
'20191212_1576170000': {'datasource': {'source': '20191212_1576170000'}},
'20190724_1564005600': {'datasource': {'source': '20190724_1564005600'}},
'20190805_1565006400': {'datasource': {'source': '20190805_1565006400'}},
'20190811_1565560800': {'datasource': {'source': '20190811_1565560800'}},
'20190913_1568390400': {'datasource': {'source': '20190913_1568390400'}},
'20191103_1572782400': {'datasource': {'source': '20191103_1572782400'}},
'20191001_1569967200': {'datasource': {'source': '20191001_1569967200'}},
'20191123_1574514000': {'datasource': {'source': '20191123_1574514000'}},
'20190711_1562846400': {'datasource': {'source': '20190711_1562846400'}},
'20191014_1571068800': {'datasource': {'source': '20191014_1571068800'}},
'20190801_1564696800': {'datasource': {'source': '20190801_1564696800'}},
'20191203_1575378000': {'datasource': {'source': '20191203_1575378000'}},
'20191107_1573167600': {'datasource': {'source': '20191107_1573167600'}},
'20191205_1575565200': {'datasource': {'source': '20191205_1575565200'}},
'20191024_1571918400': {'datasource': {'source': '20191024_1571918400'}},
'20191003_1570104000': {'datasource': {'source': '20191003_1570104000'}},
'20190731_1564610400': {'datasource': {'source': '20190731_1564610400'}},
'20190809_1565352000': {'datasource': {'source': '20190809_1565352000'}},
'20191020_1571587200': {'datasource': {'source': '20191020_1571587200'}},
'20190930_1569880800': {'datasource': {'source': '20190930_1569880800'}},
'20191125_1574701200': {'datasource': {'source': '20191125_1574701200'}},
'20190705_1562342400': {'datasource': {'source': '20190705_1562342400'}},
'20190816_1565971200': {'datasource': {'source': '20190816_1565971200'}},
'20191004_1570190400': {'datasource': {'source': '20191004_1570190400'}},
'20190928_1569672000': {'datasource': {'source': '20190928_1569672000'}},
'20190825_1566770400': {'datasource': {'source': '20190825_1566770400'}},
'20191111_1573513200': {'datasource': {'source': '20191111_1573513200'}},
'20191101_1572609600': {'datasource': {'source': '20191101_1572609600'}},
'20190820_1566338400': {'datasource': {'source': '20190820_1566338400'}},
'20190902_1567440000': {'datasource': {'source': '20190902_1567440000'}},
'20191213_1576242000': {'datasource': {'source': '20191213_1576242000'}},
'20190901_1567375200': {'datasource': {'source': '20190901_1567375200'}},
'20191019_1571486400': {'datasource': {'source': '20191019_1571486400'}},
'20190830_1567180800': {'datasource': {'source': '20190830_1567180800'}},
'20191107_1573131600': {'datasource': {'source': '20191107_1573131600'}},
'20190824_1566662400': {'datasource': {'source': '20190824_1566662400'}},
'20191031_1572537600': {'datasource': {'source': '20191031_1572537600'}},
'20190827_1566907200': {'datasource': {'source': '20190827_1566907200'}},
'20190725_1564056000': {'datasource': {'source': '20190725_1564056000'}},
'20191202_1575306000': {'datasource': {'source': '20191202_1575306000'}},
'20191023_1571832000': {'datasource': {'source': '20191023_1571832000'}},
'20190924_1569340800': {'datasource': {'source': '20190924_1569340800'}},
'20190716_1563278400': {'datasource': {'source': '20190716_1563278400'}},
'20190915_1568584800': {'datasource': {'source': '20190915_1568584800'}},
'20190918_1568844000': {'datasource': {'source': '20190918_1568844000'}},
'20190917_1568721600': {'datasource': {'source': '20190917_1568721600'}},
'20190917_1568736000': {'datasource': {'source': '20190917_1568736000'}},
'20190927_1569621600': {'datasource': {'source': '20190927_1569621600'}},
'20191006_1570363200': {'datasource': {'source': '20191006_1570363200'}},
'20190805_1565020800': {'datasource': {'source': '20190805_1565020800'}},
'20190720_1563660000': {'datasource': {'source': '20190720_1563660000'}},
'20190916_1568649600': {'datasource': {'source': '20190916_1568649600'}},
'20190819_1566230400': {'datasource': {'source': '20190819_1566230400'}},
'20191124_1574614800': {'datasource': {'source': '20191124_1574614800'}},
'20190825_1566748800': {'datasource': {'source': '20190825_1566748800'}},
'20191031_1572523200': {'datasource': {'source': '20191031_1572523200'}},
'20190703_1562191200': {'datasource': {'source': '20190703_1562191200'}},
'20190808_1565280000': {'datasource': {'source': '20190808_1565280000'}},
'20190802_1564783200': {'datasource': {'source': '20190802_1564783200'}},
'20191115_1573837200': {'datasource': {'source': '20191115_1573837200'}},
'20191014_1571090400': {'datasource': {'source': '20191014_1571090400'}},
'20190702_1562104800': {'datasource': {'source': '20190702_1562104800'}},
'20190819_1566216000': {'datasource': {'source': '20190819_1566216000'}},
'20190820_1566316800': {'datasource': {'source': '20190820_1566316800'}},
'20190924_1569326400': {'datasource': {'source': '20190924_1569326400'}},
'20191207_1575759600': {'datasource': {'source': '20191207_1575759600'}},
'20190707_1562536800': {'datasource': {'source': '20190707_1562536800'}},
'20190802_1564761600': {'datasource': {'source': '20190802_1564761600'}},
'20191110_1573390800': {'datasource': {'source': '20191110_1573390800'}},
'20190910_1568152800': {'datasource': {'source': '20190910_1568152800'}},
'20191217_1576623600': {'datasource': {'source': '20191217_1576623600'}},
'20190708_1562601600': {'datasource': {'source': '20190708_1562601600'}},
'20190815_1565870400': {'datasource': {'source': '20190815_1565870400'}},
'20191011_1570831200': {'datasource': {'source': '20191011_1570831200'}},
'20191017_1571313600': {'datasource': {'source': '20191017_1571313600'}},
'20191124_1574636400': {'datasource': {'source': '20191124_1574636400'}},
'20190918_1568808000': {'datasource': {'source': '20190918_1568808000'}},
'20191018_1571414400': {'datasource': {'source': '20191018_1571414400'}},
'20190722_1563796800': {'datasource': {'source': '20190722_1563796800'}},
'20191002_1570053600': {'datasource': {'source': '20191002_1570053600'}},
'20190917_1568757600': {'datasource': {'source': '20190917_1568757600'}},
'20190816_1565992800': {'datasource': {'source': '20190816_1565992800'}},
'20191025_1572019200': {'datasource': {'source': '20191025_1572019200'}},
'20190915_1568563200': {'datasource': {'source': '20190915_1568563200'}},
'20191007_1570449600': {'datasource': {'source': '20191007_1570449600'}},
'20191010_1570723200': {'datasource': {'source': '20191010_1570723200'}},
'20190726_1564156800': {'datasource': {'source': '20190726_1564156800'}},
'20191025_1572040800': {'datasource': {'source': '20191025_1572040800'}},
'20190816_1565956800': {'datasource': {'source': '20190816_1565956800'}},
'20191012_1570896000': {'datasource': {'source': '20191012_1570896000'}},
'20190818_1566129600': {'datasource': {'source': '20190818_1566129600'}},
'20191025_1572004800': {'datasource': {'source': '20191025_1572004800'}},
'20191007_1570485600': {'datasource': {'source': '20191007_1570485600'}},
'20191114_1573750800': {'datasource': {'source': '20191114_1573750800'}},
'20191116_1573923600': {'datasource': {'source': '20191116_1573923600'}},
'20190829_1567094400': {'datasource': {'source': '20190829_1567094400'}},
'20190704_1562277600': {'datasource': {'source': '20190704_1562277600'}},
'20191010_1570708800': {'datasource': {'source': '20191010_1570708800'}},
'20191006_1570377600': {'datasource': {'source': '20191006_1570377600'}},
'20190923_1569254400': {'datasource': {'source': '20190923_1569254400'}},
'20190729_1564416000': {'datasource': {'source': '20190729_1564416000'}},
'20190930_1569859200': {'datasource': {'source': '20190930_1569859200'}},
'20190921_1569067200': {'datasource': {'source': '20190921_1569067200'}},
'20191121_1574355600': {'datasource': {'source': '20191121_1574355600'}},
'20190926_1569499200': {'datasource': {'source': '20190926_1569499200'}},
'20190726_1564142400': {'datasource': {'source': '20190726_1564142400'}},
'20190712_1562968800': {'datasource': {'source': '20190712_1562968800'}},
'20190903_1567548000': {'datasource': {'source': '20190903_1567548000'}},
'20191108_1573218000': {'datasource': {'source': '20191108_1573218000'}},
'20191013_1570982400': {'datasource': {'source': '20191013_1570982400'}},
'20191031_1572559200': {'datasource': {'source': '20191031_1572559200'}},
'20190828_1567008000': {'datasource': {'source': '20190828_1567008000'}},
'20191215_1576429200': {'datasource': {'source': '20191215_1576429200'}},
'20191009_1570622400': {'datasource': {'source': '20191009_1570622400'}},
'20191021_1571659200': {'datasource': {'source': '20191021_1571659200'}},
'20191015_1571140800': {'datasource': {'source': '20191015_1571140800'}},
'20190905_1567720800': {'datasource': {'source': '20190905_1567720800'}},
'20190910_1568116800': {'datasource': {'source': '20190910_1568116800'}},
'20190822_1566475200': {'datasource': {'source': '20190822_1566475200'}},
'20191128_1574960400': {'datasource': {'source': '20191128_1574960400'}},
'20190722_1563811200': {'datasource': {'source': '20190722_1563811200'}},
'20190903_1567512000': {'datasource': {'source': '20190903_1567512000'}},
'20190709_1562709600': {'datasource': {'source': '20190709_1562709600'}},
'20190721_1563724800': {'datasource': {'source': '20190721_1563724800'}},
'20190916_1568671200': {'datasource': {'source': '20190916_1568671200'}},
'20190730_1564488000': {'datasource': {'source': '20190730_1564488000'}},
'20190905_1567699200': {'datasource': {'source': '20190905_1567699200'}},
'20191026_1572091200': {'datasource': {'source': '20191026_1572091200'}},
'20190711_1562882400': {'datasource': {'source': '20190711_1562882400'}},
'20190708_1562623200': {'datasource': {'source': '20190708_1562623200'}},
'20191104_1572872400': {'datasource': {'source': '20191104_1572872400'}},
'20190805_1565042400': {'datasource': {'source': '20190805_1565042400'}},
'20190923_1569276000': {'datasource': {'source': '20190923_1569276000'}},
'20191210_1575982800': {'datasource': {'source': '20191210_1575982800'}},
'20191018_1571436000': {'datasource': {'source': '20191018_1571436000'}},
'20191023_1571846400': {'datasource': {'source': '20191023_1571846400'}},
'20191002_1570032000': {'datasource': {'source': '20191002_1570032000'}},
'20190818_1566144000': {'datasource': {'source': '20190818_1566144000'}},
'20190830_1567166400': {'datasource': {'source': '20190830_1567166400'}},
'20190716_1563292800': {'datasource': {'source': '20190716_1563292800'}},
}
MONGO_HOST = 'localhost'
MONGO_PORT = 27017
MONGO_DBNAME = "cota_access_agg"
ALLOW_UNKNOWN=True
X_DOMAINS='*'
PUBLIC_METHODS = ['GET']
PAGINATION_LIMIT = 10000
PAGINATION_DEFAULT = 10000 | domain = {'20191016_1571241600': {'datasource': {'source': '20191016_1571241600'}}, '20191210_1575997200': {'datasource': {'source': '20191210_1575997200'}}, '20190724_1563969600': {'datasource': {'source': '20190724_1563969600'}}, '20191128_1574982000': {'datasource': {'source': '20191128_1574982000'}}, '20191029_1572386400': {'datasource': {'source': '20191029_1572386400'}}, '20191202_1575291600': {'datasource': {'source': '20191202_1575291600'}}, '20191122_1574427600': {'datasource': {'source': '20191122_1574427600'}}, '20190729_1564437600': {'datasource': {'source': '20190729_1564437600'}}, '20191207_1575738000': {'datasource': {'source': '20191207_1575738000'}}, '20190709_1562688000': {'datasource': {'source': '20190709_1562688000'}}, '20191022_1571760000': {'datasource': {'source': '20191022_1571760000'}}, '20190723_1563919200': {'datasource': {'source': '20190723_1563919200'}}, '20190707_1562500800': {'datasource': {'source': '20190707_1562500800'}}, '20191120_1574290800': {'datasource': {'source': '20191120_1574290800'}}, '20190810_1565438400': {'datasource': {'source': '20190810_1565438400'}}, '20190807_1565193600': {'datasource': {'source': '20190807_1565193600'}}, '20191127_1574859600': {'datasource': {'source': '20191127_1574859600'}}, '20191127_1574895600': {'datasource': {'source': '20191127_1574895600'}}, '20191009_1570658400': {'datasource': {'source': '20191009_1570658400'}}, '20190712_1562947200': {'datasource': {'source': '20190712_1562947200'}}, '20190815_1565906400': {'datasource': {'source': '20190815_1565906400'}}, '20190727_1564243200': {'datasource': {'source': '20190727_1564243200'}}, '20190829_1567116000': {'datasource': {'source': '20190829_1567116000'}}, '20190919_1568930400': {'datasource': {'source': '20190919_1568930400'}}, '20191129_1575032400': {'datasource': {'source': '20191129_1575032400'}}, '20190905_1567684800': {'datasource': {'source': '20190905_1567684800'}}, '20191129_1575068400': {'datasource': {'source': '20191129_1575068400'}}, '20190913_1568412000': {'datasource': {'source': '20190913_1568412000'}}, '20191121_1574377200': {'datasource': {'source': '20191121_1574377200'}}, '20190803_1564869600': {'datasource': {'source': '20190803_1564869600'}}, '20191108_1573232400': {'datasource': {'source': '20191108_1573232400'}}, '20191113_1573664400': {'datasource': {'source': '20191113_1573664400'}}, '20191008_1570572000': {'datasource': {'source': '20191008_1570572000'}}, '20191027_1572177600': {'datasource': {'source': '20191027_1572177600'}}, '20190710_1562774400': {'datasource': {'source': '20190710_1562774400'}}, '20191122_1574442000': {'datasource': {'source': '20191122_1574442000'}}, '20191001_1569931200': {'datasource': {'source': '20191001_1569931200'}}, '20191015_1571176800': {'datasource': {'source': '20191015_1571176800'}}, '20190826_1566856800': {'datasource': {'source': '20190826_1566856800'}}, '20191005_1570276800': {'datasource': {'source': '20191005_1570276800'}}, '20191212_1576155600': {'datasource': {'source': '20191212_1576155600'}}, '20191201_1575241200': {'datasource': {'source': '20191201_1575241200'}}, '20190717_1563364800': {'datasource': {'source': '20190717_1563364800'}}, '20191211_1576105200': {'datasource': {'source': '20191211_1576105200'}}, '20190922_1569168000': {'datasource': {'source': '20190922_1569168000'}}, '20191011_1570809600': {'datasource': {'source': '20191011_1570809600'}}, '20191012_1570917600': {'datasource': {'source': '20191012_1570917600'}}, '20190914_1568498400': {'datasource': {'source': '20190914_1568498400'}}, '20190827_1566943200': {'datasource': {'source': '20190827_1566943200'}}, '20190703_1562169600': {'datasource': {'source': '20190703_1562169600'}}, '20190906_1567785600': {'datasource': {'source': '20190906_1567785600'}}, '20191111_1573477200': {'datasource': {'source': '20191111_1573477200'}}, '20190817_1566079200': {'datasource': {'source': '20190817_1566079200'}}, '20191117_1573995600': {'datasource': {'source': '20191117_1573995600'}}, '20190714_1563105600': {'datasource': {'source': '20190714_1563105600'}}, '20190711_1562860800': {'datasource': {'source': '20190711_1562860800'}}, '20191208_1575846000': {'datasource': {'source': '20191208_1575846000'}}, '20190922_1569153600': {'datasource': {'source': '20190922_1569153600'}}, '20190820_1566302400': {'datasource': {'source': '20190820_1566302400'}}, '20190826_1566835200': {'datasource': {'source': '20190826_1566835200'}}, '20190715_1563228000': {'datasource': {'source': '20190715_1563228000'}}, '20190902_1567461600': {'datasource': {'source': '20190902_1567461600'}}, '20190901_1567339200': {'datasource': {'source': '20190901_1567339200'}}, '20190804_1564956000': {'datasource': {'source': '20190804_1564956000'}}, '20191008_1570536000': {'datasource': {'source': '20191008_1570536000'}}, '20191126_1574773200': {'datasource': {'source': '20191126_1574773200'}}, '20190811_1565539200': {'datasource': {'source': '20190811_1565539200'}}, '20190904_1567598400': {'datasource': {'source': '20190904_1567598400'}}, '20191110_1573405200': {'datasource': {'source': '20191110_1573405200'}}, '20191201_1575219600': {'datasource': {'source': '20191201_1575219600'}}, '20190912_1568304000': {'datasource': {'source': '20190912_1568304000'}}, '20191204_1575464400': {'datasource': {'source': '20191204_1575464400'}}, '20190908_1567944000': {'datasource': {'source': '20190908_1567944000'}}, '20191101_1572624000': {'datasource': {'source': '20191101_1572624000'}}, '20191023_1571868000': {'datasource': {'source': '20191023_1571868000'}}, '20190717_1563400800': {'datasource': {'source': '20190717_1563400800'}}, '20190713_1563055200': {'datasource': {'source': '20190713_1563055200'}}, '20191102_1572696000': {'datasource': {'source': '20191102_1572696000'}}, '20191126_1574787600': {'datasource': {'source': '20191126_1574787600'}}, '20190812_1565611200': {'datasource': {'source': '20190812_1565611200'}}, '20191020_1571572800': {'datasource': {'source': '20191020_1571572800'}}, '20190918_1568822400': {'datasource': {'source': '20190918_1568822400'}}, '20191107_1573146000': {'datasource': {'source': '20191107_1573146000'}}, '20190721_1563746400': {'datasource': {'source': '20190721_1563746400'}}, '20190714_1563120000': {'datasource': {'source': '20190714_1563120000'}}, '20191116_1573945200': {'datasource': {'source': '20191116_1573945200'}}, '20190909_1568044800': {'datasource': {'source': '20190909_1568044800'}}, '20191011_1570795200': {'datasource': {'source': '20191011_1570795200'}}, '20190919_1568908800': {'datasource': {'source': '20190919_1568908800'}}, '20191204_1575500400': {'datasource': {'source': '20191204_1575500400'}}, '20190921_1569081600': {'datasource': {'source': '20190921_1569081600'}}, '20190911_1568239200': {'datasource': {'source': '20190911_1568239200'}}, '20191203_1575392400': {'datasource': {'source': '20191203_1575392400'}}, '20191006_1570399200': {'datasource': {'source': '20191006_1570399200'}}, '20190914_1568476800': {'datasource': {'source': '20190914_1568476800'}}, '20190923_1569240000': {'datasource': {'source': '20190923_1569240000'}}, '20191104_1572908400': {'datasource': {'source': '20191104_1572908400'}}, '20190806_1565092800': {'datasource': {'source': '20190806_1565092800'}}, '20191112_1573563600': {'datasource': {'source': '20191112_1573563600'}}, '20191030_1572436800': {'datasource': {'source': '20191030_1572436800'}}, 'full_20190701_1561982400': {'datasource': {'source': 'full_20190701_1561982400'}}, '20190729_1564401600': {'datasource': {'source': '20190729_1564401600'}}, '20191013_1570968000': {'datasource': {'source': '20191013_1570968000'}}, '20191127_1574874000': {'datasource': {'source': '20191127_1574874000'}}, '20191123_1574550000': {'datasource': {'source': '20191123_1574550000'}}, '20191112_1573599600': {'datasource': {'source': '20191112_1573599600'}}, '20191211_1576069200': {'datasource': {'source': '20191211_1576069200'}}, '20190828_1566993600': {'datasource': {'source': '20190828_1566993600'}}, '20190922_1569189600': {'datasource': {'source': '20190922_1569189600'}}, '20190727_1564228800': {'datasource': {'source': '20190727_1564228800'}}, '20190809_1565388000': {'datasource': {'source': '20190809_1565388000'}}, '20191030_1572472800': {'datasource': {'source': '20191030_1572472800'}}, '20190828_1567029600': {'datasource': {'source': '20190828_1567029600'}}, '20190929_1569794400': {'datasource': {'source': '20190929_1569794400'}}, '20191119_1574204400': {'datasource': {'source': '20191119_1574204400'}}, '20190907_1567857600': {'datasource': {'source': '20190907_1567857600'}}, '20190921_1569103200': {'datasource': {'source': '20190921_1569103200'}}, '20191104_1572886800': {'datasource': {'source': '20191104_1572886800'}}, '20190815_1565884800': {'datasource': {'source': '20190815_1565884800'}}, '20190818_1566165600': {'datasource': {'source': '20190818_1566165600'}}, '20191106_1573059600': {'datasource': {'source': '20191106_1573059600'}}, '20190701_1562018400': {'datasource': {'source': '20190701_1562018400'}}, '20191022_1571745600': {'datasource': {'source': '20191022_1571745600'}}, '20191121_1574341200': {'datasource': {'source': '20191121_1574341200'}}, '20190802_1564747200': {'datasource': {'source': '20190802_1564747200'}}, '20190704_1562256000': {'datasource': {'source': '20190704_1562256000'}}, '20190920_1568995200': {'datasource': {'source': '20190920_1568995200'}}, '20191002_1570017600': {'datasource': {'source': '20191002_1570017600'}}, '20191120_1574269200': {'datasource': {'source': '20191120_1574269200'}}, '20190812_1565647200': {'datasource': {'source': '20190812_1565647200'}}, '20191203_1575414000': {'datasource': {'source': '20191203_1575414000'}}, '20190807_1565179200': {'datasource': {'source': '20190807_1565179200'}}, '20190817_1566043200': {'datasource': {'source': '20190817_1566043200'}}, '20190704_1562241600': {'datasource': {'source': '20190704_1562241600'}}, '20190929_1569758400': {'datasource': {'source': '20190929_1569758400'}}, '20191214_1576342800': {'datasource': {'source': '20191214_1576342800'}}, '20190904_1567634400': {'datasource': {'source': '20190904_1567634400'}}, '20191130_1575118800': {'datasource': {'source': '20191130_1575118800'}}, '20191013_1571004000': {'datasource': {'source': '20191013_1571004000'}}, '20191215_1576414800': {'datasource': {'source': '20191215_1576414800'}}, '20191120_1574254800': {'datasource': {'source': '20191120_1574254800'}}, '20191211_1576083600': {'datasource': {'source': '20191211_1576083600'}}, '20191106_1573045200': {'datasource': {'source': '20191106_1573045200'}}, '20191205_1575586800': {'datasource': {'source': '20191205_1575586800'}}, '20190928_1569686400': {'datasource': {'source': '20190928_1569686400'}}, '20190927_1569585600': {'datasource': {'source': '20190927_1569585600'}}, '20191014_1571054400': {'datasource': {'source': '20191014_1571054400'}}, '20190822_1566489600': {'datasource': {'source': '20190822_1566489600'}}, '20190827_1566921600': {'datasource': {'source': '20190827_1566921600'}}, '20190912_1568289600': {'datasource': {'source': '20190912_1568289600'}}, '20190720_1563624000': {'datasource': {'source': '20190720_1563624000'}}, '20191111_1573491600': {'datasource': {'source': '20191111_1573491600'}}, '20190723_1563897600': {'datasource': {'source': '20190723_1563897600'}}, '20190907_1567893600': {'datasource': {'source': '20190907_1567893600'}}, '20190819_1566252000': {'datasource': {'source': '20190819_1566252000'}}, '20190730_1564524000': {'datasource': {'source': '20190730_1564524000'}}, '20190913_1568376000': {'datasource': {'source': '20190913_1568376000'}}, '20190906_1567771200': {'datasource': {'source': '20190906_1567771200'}}, '20191119_1574182800': {'datasource': {'source': '20191119_1574182800'}}, '20190822_1566511200': {'datasource': {'source': '20190822_1566511200'}}, '20191113_1573686000': {'datasource': {'source': '20191113_1573686000'}}, '20190715_1563192000': {'datasource': {'source': '20190715_1563192000'}}, '20190925_1569427200': {'datasource': {'source': '20190925_1569427200'}}, '20190714_1563141600': {'datasource': {'source': '20190714_1563141600'}}, '20190907_1567872000': {'datasource': {'source': '20190907_1567872000'}}, '20191009_1570636800': {'datasource': {'source': '20191009_1570636800'}}, '20190817_1566057600': {'datasource': {'source': '20190817_1566057600'}}, '20191212_1576191600': {'datasource': {'source': '20191212_1576191600'}}, '20190911_1568203200': {'datasource': {'source': '20190911_1568203200'}}, '20190902_1567425600': {'datasource': {'source': '20190902_1567425600'}}, '20190706_1562428800': {'datasource': {'source': '20190706_1562428800'}}, '20190901_1567353600': {'datasource': {'source': '20190901_1567353600'}}, '20191119_1574168400': {'datasource': {'source': '20191119_1574168400'}}, '20190926_1569513600': {'datasource': {'source': '20190926_1569513600'}}, '20190810_1565474400': {'datasource': {'source': '20190810_1565474400'}}, '20191202_1575327600': {'datasource': {'source': '20191202_1575327600'}}, '20191205_1575550800': {'datasource': {'source': '20191205_1575550800'}}, '20190718_1563487200': {'datasource': {'source': '20190718_1563487200'}}, '20190904_1567612800': {'datasource': {'source': '20190904_1567612800'}}, '20190701_1561996800': {'datasource': {'source': '20190701_1561996800'}}, '20191105_1572973200': {'datasource': {'source': '20191105_1572973200'}}, '20191017_1571328000': {'datasource': {'source': '20191017_1571328000'}}, '20191020_1571608800': {'datasource': {'source': '20191020_1571608800'}}, '20191028_1572300000': {'datasource': {'source': '20191028_1572300000'}}, '20190806_1565107200': {'datasource': {'source': '20190806_1565107200'}}, '20191105_1572958800': {'datasource': {'source': '20191105_1572958800'}}, '20191207_1575723600': {'datasource': {'source': '20191207_1575723600'}}, '20190716_1563314400': {'datasource': {'source': '20190716_1563314400'}}, '20190912_1568325600': {'datasource': {'source': '20190912_1568325600'}}, '20191216_1576501200': {'datasource': {'source': '20191216_1576501200'}}, '20190908_1567958400': {'datasource': {'source': '20190908_1567958400'}}, '20191027_1572192000': {'datasource': {'source': '20191027_1572192000'}}, '20190925_1569448800': {'datasource': {'source': '20190925_1569448800'}}, '20191110_1573426800': {'datasource': {'source': '20191110_1573426800'}}, '20191026_1572105600': {'datasource': {'source': '20191026_1572105600'}}, '20190703_1562155200': {'datasource': {'source': '20190703_1562155200'}}, '20190916_1568635200': {'datasource': {'source': '20190916_1568635200'}}, '20190924_1569362400': {'datasource': {'source': '20190924_1569362400'}}, '20191114_1573772400': {'datasource': {'source': '20191114_1573772400'}}, '20191024_1571932800': {'datasource': {'source': '20191024_1571932800'}}, '20190725_1564070400': {'datasource': {'source': '20190725_1564070400'}}, '20191016_1571263200': {'datasource': {'source': '20191016_1571263200'}}, '20190731_1564574400': {'datasource': {'source': '20190731_1564574400'}}, '20191001_1569945600': {'datasource': {'source': '20191001_1569945600'}}, '20191209_1575910800': {'datasource': {'source': '20191209_1575910800'}}, '20190920_1569016800': {'datasource': {'source': '20190920_1569016800'}}, '20190702_1562068800': {'datasource': {'source': '20190702_1562068800'}}, '20191010_1570744800': {'datasource': {'source': '20191010_1570744800'}}, '20190813_1565697600': {'datasource': {'source': '20190813_1565697600'}}, '20190706_1562450400': {'datasource': {'source': '20190706_1562450400'}}, '20191029_1572364800': {'datasource': {'source': '20191029_1572364800'}}, '20190808_1565301600': {'datasource': {'source': '20190808_1565301600'}}, '20190726_1564178400': {'datasource': {'source': '20190726_1564178400'}}, '20191004_1570204800': {'datasource': {'source': '20191004_1570204800'}}, '20191214_1576364400': {'datasource': {'source': '20191214_1576364400'}}, '20191004_1570226400': {'datasource': {'source': '20191004_1570226400'}}, '20190715_1563206400': {'datasource': {'source': '20190715_1563206400'}}, '20191117_1574010000': {'datasource': {'source': '20191117_1574010000'}}, '20191126_1574809200': {'datasource': {'source': '20191126_1574809200'}}, '20191102_1572710400': {'datasource': {'source': '20191102_1572710400'}}, '20190814_1565820000': {'datasource': {'source': '20190814_1565820000'}}, '20190821_1566403200': {'datasource': {'source': '20190821_1566403200'}}, '20191012_1570881600': {'datasource': {'source': '20191012_1570881600'}}, '20190708_1562587200': {'datasource': {'source': '20190708_1562587200'}}, '20190909_1568066400': {'datasource': {'source': '20190909_1568066400'}}, '20191129_1575046800': {'datasource': {'source': '20191129_1575046800'}}, '20190919_1568894400': {'datasource': {'source': '20190919_1568894400'}}, '20190926_1569535200': {'datasource': {'source': '20190926_1569535200'}}, '20191216_1576515600': {'datasource': {'source': '20191216_1576515600'}}, '20190823_1566597600': {'datasource': {'source': '20190823_1566597600'}}, '20190804_1564934400': {'datasource': {'source': '20190804_1564934400'}}, '20191214_1576328400': {'datasource': {'source': '20191214_1576328400'}}, '20191008_1570550400': {'datasource': {'source': '20191008_1570550400'}}, '20191204_1575478800': {'datasource': {'source': '20191204_1575478800'}}, '20191117_1574031600': {'datasource': {'source': '20191117_1574031600'}}, '20190823_1566576000': {'datasource': {'source': '20190823_1566576000'}}, '20190908_1567980000': {'datasource': {'source': '20190908_1567980000'}}, '20190831_1567252800': {'datasource': {'source': '20190831_1567252800'}}, '20191026_1572127200': {'datasource': {'source': '20191026_1572127200'}}, '20190928_1569708000': {'datasource': {'source': '20190928_1569708000'}}, '20190812_1565625600': {'datasource': {'source': '20190812_1565625600'}}, '20190829_1567080000': {'datasource': {'source': '20190829_1567080000'}}, '20191021_1571695200': {'datasource': {'source': '20191021_1571695200'}}, '20190803_1564848000': {'datasource': {'source': '20190803_1564848000'}}, '20190719_1563552000': {'datasource': {'source': '20190719_1563552000'}}, '20190719_1563537600': {'datasource': {'source': '20190719_1563537600'}}, '20190930_1569844800': {'datasource': {'source': '20190930_1569844800'}}, '20191124_1574600400': {'datasource': {'source': '20191124_1574600400'}}, '20190914_1568462400': {'datasource': {'source': '20190914_1568462400'}}, '20191103_1572818400': {'datasource': {'source': '20191103_1572818400'}}, '20191022_1571781600': {'datasource': {'source': '20191022_1571781600'}}, '20191125_1574722800': {'datasource': {'source': '20191125_1574722800'}}, '20191206_1575637200': {'datasource': {'source': '20191206_1575637200'}}, '20191021_1571673600': {'datasource': {'source': '20191021_1571673600'}}, '20191128_1574946000': {'datasource': {'source': '20191128_1574946000'}}, '20191130_1575154800': {'datasource': {'source': '20191130_1575154800'}}, '20190806_1565128800': {'datasource': {'source': '20190806_1565128800'}}, '20191118_1574096400': {'datasource': {'source': '20191118_1574096400'}}, '20190906_1567807200': {'datasource': {'source': '20190906_1567807200'}}, '20191122_1574463600': {'datasource': {'source': '20191122_1574463600'}}, '20190701_1561982400': {'datasource': {'source': '20190701_1561982400'}}, '20191208_1575810000': {'datasource': {'source': '20191208_1575810000'}}, '20191003_1570118400': {'datasource': {'source': '20191003_1570118400'}}, '20190810_1565452800': {'datasource': {'source': '20190810_1565452800'}}, '20190728_1564315200': {'datasource': {'source': '20190728_1564315200'}}, '20190801_1564660800': {'datasource': {'source': '20190801_1564660800'}}, '20191024_1571954400': {'datasource': {'source': '20191024_1571954400'}}, '20191109_1573304400': {'datasource': {'source': '20191109_1573304400'}}, '20191028_1572278400': {'datasource': {'source': '20191028_1572278400'}}, '20191007_1570464000': {'datasource': {'source': '20191007_1570464000'}}, '20191027_1572213600': {'datasource': {'source': '20191027_1572213600'}}, '20191028_1572264000': {'datasource': {'source': '20191028_1572264000'}}, '20190920_1568980800': {'datasource': {'source': '20190920_1568980800'}}, '20190730_1564502400': {'datasource': {'source': '20190730_1564502400'}}, '20190731_1564588800': {'datasource': {'source': '20190731_1564588800'}}, '20190831_1567267200': {'datasource': {'source': '20190831_1567267200'}}, '20190723_1563883200': {'datasource': {'source': '20190723_1563883200'}}, '20191209_1575932400': {'datasource': {'source': '20191209_1575932400'}}, '20190707_1562515200': {'datasource': {'source': '20190707_1562515200'}}, '20191105_1572994800': {'datasource': {'source': '20191105_1572994800'}}, '20190725_1564092000': {'datasource': {'source': '20190725_1564092000'}}, '20190826_1566820800': {'datasource': {'source': '20190826_1566820800'}}, '20191029_1572350400': {'datasource': {'source': '20191029_1572350400'}}, '20191118_1574082000': {'datasource': {'source': '20191118_1574082000'}}, '20191206_1575673200': {'datasource': {'source': '20191206_1575673200'}}, '20191017_1571349600': {'datasource': {'source': '20191017_1571349600'}}, '20191215_1576450800': {'datasource': {'source': '20191215_1576450800'}}, '20191019_1571522400': {'datasource': {'source': '20191019_1571522400'}}, '20191015_1571155200': {'datasource': {'source': '20191015_1571155200'}}, '20190718_1563451200': {'datasource': {'source': '20190718_1563451200'}}, '20190728_1564351200': {'datasource': {'source': '20190728_1564351200'}}, '20190915_1568548800': {'datasource': {'source': '20190915_1568548800'}}, '20190804_1564920000': {'datasource': {'source': '20190804_1564920000'}}, '20190803_1564833600': {'datasource': {'source': '20190803_1564833600'}}, '20190911_1568217600': {'datasource': {'source': '20190911_1568217600'}}, '20190728_1564329600': {'datasource': {'source': '20190728_1564329600'}}, '20190821_1566424800': {'datasource': {'source': '20190821_1566424800'}}, '20190811_1565524800': {'datasource': {'source': '20190811_1565524800'}}, '20190702_1562083200': {'datasource': {'source': '20190702_1562083200'}}, '20190830_1567202400': {'datasource': {'source': '20190830_1567202400'}}, '20191210_1576018800': {'datasource': {'source': '20191210_1576018800'}}, '20190823_1566561600': {'datasource': {'source': '20190823_1566561600'}}, '20190801_1564675200': {'datasource': {'source': '20190801_1564675200'}}, '20190903_1567526400': {'datasource': {'source': '20190903_1567526400'}}, '20190831_1567288800': {'datasource': {'source': '20190831_1567288800'}}, '20191103_1572796800': {'datasource': {'source': '20191103_1572796800'}}, '20190709_1562673600': {'datasource': {'source': '20190709_1562673600'}}, '20191116_1573909200': {'datasource': {'source': '20191116_1573909200'}}, '20190824_1566648000': {'datasource': {'source': '20190824_1566648000'}}, '20191213_1576278000': {'datasource': {'source': '20191213_1576278000'}}, '20191109_1573340400': {'datasource': {'source': '20191109_1573340400'}}, '20191206_1575651600': {'datasource': {'source': '20191206_1575651600'}}, '20191005_1570291200': {'datasource': {'source': '20191005_1570291200'}}, '20190705_1562364000': {'datasource': {'source': '20190705_1562364000'}}, '20190824_1566684000': {'datasource': {'source': '20190824_1566684000'}}, '20191118_1574118000': {'datasource': {'source': '20191118_1574118000'}}, '20191123_1574528400': {'datasource': {'source': '20191123_1574528400'}}, '20190910_1568131200': {'datasource': {'source': '20190910_1568131200'}}, '20190929_1569772800': {'datasource': {'source': '20190929_1569772800'}}, '20190710_1562760000': {'datasource': {'source': '20190710_1562760000'}}, '20190721_1563710400': {'datasource': {'source': '20190721_1563710400'}}, '20190720_1563638400': {'datasource': {'source': '20190720_1563638400'}}, '20191106_1573081200': {'datasource': {'source': '20191106_1573081200'}}, '20191115_1573858800': {'datasource': {'source': '20191115_1573858800'}}, '20190722_1563832800': {'datasource': {'source': '20190722_1563832800'}}, '20190718_1563465600': {'datasource': {'source': '20190718_1563465600'}}, '20191114_1573736400': {'datasource': {'source': '20191114_1573736400'}}, '20190724_1563984000': {'datasource': {'source': '20190724_1563984000'}}, '20190717_1563379200': {'datasource': {'source': '20190717_1563379200'}}, '20190814_1565784000': {'datasource': {'source': '20190814_1565784000'}}, '20190809_1565366400': {'datasource': {'source': '20190809_1565366400'}}, '20190813_1565712000': {'datasource': {'source': '20190813_1565712000'}}, '20190727_1564264800': {'datasource': {'source': '20190727_1564264800'}}, '20191101_1572645600': {'datasource': {'source': '20191101_1572645600'}}, '20190713_1563033600': {'datasource': {'source': '20190713_1563033600'}}, '20191005_1570312800': {'datasource': {'source': '20191005_1570312800'}}, '20191003_1570140000': {'datasource': {'source': '20191003_1570140000'}}, '20190814_1565798400': {'datasource': {'source': '20190814_1565798400'}}, '20191213_1576256400': {'datasource': {'source': '20191213_1576256400'}}, '20191108_1573254000': {'datasource': {'source': '20191108_1573254000'}}, '20190705_1562328000': {'datasource': {'source': '20190705_1562328000'}}, '20190925_1569412800': {'datasource': {'source': '20190925_1569412800'}}, '20191209_1575896400': {'datasource': {'source': '20191209_1575896400'}}, '20191216_1576537200': {'datasource': {'source': '20191216_1576537200'}}, '20191130_1575133200': {'datasource': {'source': '20191130_1575133200'}}, '20190909_1568030400': {'datasource': {'source': '20190909_1568030400'}}, '20190927_1569600000': {'datasource': {'source': '20190927_1569600000'}}, '20191030_1572451200': {'datasource': {'source': '20191030_1572451200'}}, '20191016_1571227200': {'datasource': {'source': '20191016_1571227200'}}, '20190821_1566388800': {'datasource': {'source': '20190821_1566388800'}}, '20191112_1573578000': {'datasource': {'source': '20191112_1573578000'}}, '20190808_1565265600': {'datasource': {'source': '20190808_1565265600'}}, '20191113_1573650000': {'datasource': {'source': '20191113_1573650000'}}, '20190825_1566734400': {'datasource': {'source': '20190825_1566734400'}}, '20191208_1575824400': {'datasource': {'source': '20191208_1575824400'}}, '20191201_1575205200': {'datasource': {'source': '20191201_1575205200'}}, '20190807_1565215200': {'datasource': {'source': '20190807_1565215200'}}, '20191125_1574686800': {'datasource': {'source': '20191125_1574686800'}}, '20190712_1562932800': {'datasource': {'source': '20190712_1562932800'}}, '20190813_1565733600': {'datasource': {'source': '20190813_1565733600'}}, '20190713_1563019200': {'datasource': {'source': '20190713_1563019200'}}, '20191102_1572732000': {'datasource': {'source': '20191102_1572732000'}}, '20191019_1571500800': {'datasource': {'source': '20191019_1571500800'}}, '20190706_1562414400': {'datasource': {'source': '20190706_1562414400'}}, '20191217_1576587600': {'datasource': {'source': '20191217_1576587600'}}, '20191217_1576602000': {'datasource': {'source': '20191217_1576602000'}}, '20190710_1562796000': {'datasource': {'source': '20190710_1562796000'}}, '20190719_1563573600': {'datasource': {'source': '20190719_1563573600'}}, '20191115_1573822800': {'datasource': {'source': '20191115_1573822800'}}, '20191109_1573318800': {'datasource': {'source': '20191109_1573318800'}}, '20191018_1571400000': {'datasource': {'source': '20191018_1571400000'}}, '20191212_1576170000': {'datasource': {'source': '20191212_1576170000'}}, '20190724_1564005600': {'datasource': {'source': '20190724_1564005600'}}, '20190805_1565006400': {'datasource': {'source': '20190805_1565006400'}}, '20190811_1565560800': {'datasource': {'source': '20190811_1565560800'}}, '20190913_1568390400': {'datasource': {'source': '20190913_1568390400'}}, '20191103_1572782400': {'datasource': {'source': '20191103_1572782400'}}, '20191001_1569967200': {'datasource': {'source': '20191001_1569967200'}}, '20191123_1574514000': {'datasource': {'source': '20191123_1574514000'}}, '20190711_1562846400': {'datasource': {'source': '20190711_1562846400'}}, '20191014_1571068800': {'datasource': {'source': '20191014_1571068800'}}, '20190801_1564696800': {'datasource': {'source': '20190801_1564696800'}}, '20191203_1575378000': {'datasource': {'source': '20191203_1575378000'}}, '20191107_1573167600': {'datasource': {'source': '20191107_1573167600'}}, '20191205_1575565200': {'datasource': {'source': '20191205_1575565200'}}, '20191024_1571918400': {'datasource': {'source': '20191024_1571918400'}}, '20191003_1570104000': {'datasource': {'source': '20191003_1570104000'}}, '20190731_1564610400': {'datasource': {'source': '20190731_1564610400'}}, '20190809_1565352000': {'datasource': {'source': '20190809_1565352000'}}, '20191020_1571587200': {'datasource': {'source': '20191020_1571587200'}}, '20190930_1569880800': {'datasource': {'source': '20190930_1569880800'}}, '20191125_1574701200': {'datasource': {'source': '20191125_1574701200'}}, '20190705_1562342400': {'datasource': {'source': '20190705_1562342400'}}, '20190816_1565971200': {'datasource': {'source': '20190816_1565971200'}}, '20191004_1570190400': {'datasource': {'source': '20191004_1570190400'}}, '20190928_1569672000': {'datasource': {'source': '20190928_1569672000'}}, '20190825_1566770400': {'datasource': {'source': '20190825_1566770400'}}, '20191111_1573513200': {'datasource': {'source': '20191111_1573513200'}}, '20191101_1572609600': {'datasource': {'source': '20191101_1572609600'}}, '20190820_1566338400': {'datasource': {'source': '20190820_1566338400'}}, '20190902_1567440000': {'datasource': {'source': '20190902_1567440000'}}, '20191213_1576242000': {'datasource': {'source': '20191213_1576242000'}}, '20190901_1567375200': {'datasource': {'source': '20190901_1567375200'}}, '20191019_1571486400': {'datasource': {'source': '20191019_1571486400'}}, '20190830_1567180800': {'datasource': {'source': '20190830_1567180800'}}, '20191107_1573131600': {'datasource': {'source': '20191107_1573131600'}}, '20190824_1566662400': {'datasource': {'source': '20190824_1566662400'}}, '20191031_1572537600': {'datasource': {'source': '20191031_1572537600'}}, '20190827_1566907200': {'datasource': {'source': '20190827_1566907200'}}, '20190725_1564056000': {'datasource': {'source': '20190725_1564056000'}}, '20191202_1575306000': {'datasource': {'source': '20191202_1575306000'}}, '20191023_1571832000': {'datasource': {'source': '20191023_1571832000'}}, '20190924_1569340800': {'datasource': {'source': '20190924_1569340800'}}, '20190716_1563278400': {'datasource': {'source': '20190716_1563278400'}}, '20190915_1568584800': {'datasource': {'source': '20190915_1568584800'}}, '20190918_1568844000': {'datasource': {'source': '20190918_1568844000'}}, '20190917_1568721600': {'datasource': {'source': '20190917_1568721600'}}, '20190917_1568736000': {'datasource': {'source': '20190917_1568736000'}}, '20190927_1569621600': {'datasource': {'source': '20190927_1569621600'}}, '20191006_1570363200': {'datasource': {'source': '20191006_1570363200'}}, '20190805_1565020800': {'datasource': {'source': '20190805_1565020800'}}, '20190720_1563660000': {'datasource': {'source': '20190720_1563660000'}}, '20190916_1568649600': {'datasource': {'source': '20190916_1568649600'}}, '20190819_1566230400': {'datasource': {'source': '20190819_1566230400'}}, '20191124_1574614800': {'datasource': {'source': '20191124_1574614800'}}, '20190825_1566748800': {'datasource': {'source': '20190825_1566748800'}}, '20191031_1572523200': {'datasource': {'source': '20191031_1572523200'}}, '20190703_1562191200': {'datasource': {'source': '20190703_1562191200'}}, '20190808_1565280000': {'datasource': {'source': '20190808_1565280000'}}, '20190802_1564783200': {'datasource': {'source': '20190802_1564783200'}}, '20191115_1573837200': {'datasource': {'source': '20191115_1573837200'}}, '20191014_1571090400': {'datasource': {'source': '20191014_1571090400'}}, '20190702_1562104800': {'datasource': {'source': '20190702_1562104800'}}, '20190819_1566216000': {'datasource': {'source': '20190819_1566216000'}}, '20190820_1566316800': {'datasource': {'source': '20190820_1566316800'}}, '20190924_1569326400': {'datasource': {'source': '20190924_1569326400'}}, '20191207_1575759600': {'datasource': {'source': '20191207_1575759600'}}, '20190707_1562536800': {'datasource': {'source': '20190707_1562536800'}}, '20190802_1564761600': {'datasource': {'source': '20190802_1564761600'}}, '20191110_1573390800': {'datasource': {'source': '20191110_1573390800'}}, '20190910_1568152800': {'datasource': {'source': '20190910_1568152800'}}, '20191217_1576623600': {'datasource': {'source': '20191217_1576623600'}}, '20190708_1562601600': {'datasource': {'source': '20190708_1562601600'}}, '20190815_1565870400': {'datasource': {'source': '20190815_1565870400'}}, '20191011_1570831200': {'datasource': {'source': '20191011_1570831200'}}, '20191017_1571313600': {'datasource': {'source': '20191017_1571313600'}}, '20191124_1574636400': {'datasource': {'source': '20191124_1574636400'}}, '20190918_1568808000': {'datasource': {'source': '20190918_1568808000'}}, '20191018_1571414400': {'datasource': {'source': '20191018_1571414400'}}, '20190722_1563796800': {'datasource': {'source': '20190722_1563796800'}}, '20191002_1570053600': {'datasource': {'source': '20191002_1570053600'}}, '20190917_1568757600': {'datasource': {'source': '20190917_1568757600'}}, '20190816_1565992800': {'datasource': {'source': '20190816_1565992800'}}, '20191025_1572019200': {'datasource': {'source': '20191025_1572019200'}}, '20190915_1568563200': {'datasource': {'source': '20190915_1568563200'}}, '20191007_1570449600': {'datasource': {'source': '20191007_1570449600'}}, '20191010_1570723200': {'datasource': {'source': '20191010_1570723200'}}, '20190726_1564156800': {'datasource': {'source': '20190726_1564156800'}}, '20191025_1572040800': {'datasource': {'source': '20191025_1572040800'}}, '20190816_1565956800': {'datasource': {'source': '20190816_1565956800'}}, '20191012_1570896000': {'datasource': {'source': '20191012_1570896000'}}, '20190818_1566129600': {'datasource': {'source': '20190818_1566129600'}}, '20191025_1572004800': {'datasource': {'source': '20191025_1572004800'}}, '20191007_1570485600': {'datasource': {'source': '20191007_1570485600'}}, '20191114_1573750800': {'datasource': {'source': '20191114_1573750800'}}, '20191116_1573923600': {'datasource': {'source': '20191116_1573923600'}}, '20190829_1567094400': {'datasource': {'source': '20190829_1567094400'}}, '20190704_1562277600': {'datasource': {'source': '20190704_1562277600'}}, '20191010_1570708800': {'datasource': {'source': '20191010_1570708800'}}, '20191006_1570377600': {'datasource': {'source': '20191006_1570377600'}}, '20190923_1569254400': {'datasource': {'source': '20190923_1569254400'}}, '20190729_1564416000': {'datasource': {'source': '20190729_1564416000'}}, '20190930_1569859200': {'datasource': {'source': '20190930_1569859200'}}, '20190921_1569067200': {'datasource': {'source': '20190921_1569067200'}}, '20191121_1574355600': {'datasource': {'source': '20191121_1574355600'}}, '20190926_1569499200': {'datasource': {'source': '20190926_1569499200'}}, '20190726_1564142400': {'datasource': {'source': '20190726_1564142400'}}, '20190712_1562968800': {'datasource': {'source': '20190712_1562968800'}}, '20190903_1567548000': {'datasource': {'source': '20190903_1567548000'}}, '20191108_1573218000': {'datasource': {'source': '20191108_1573218000'}}, '20191013_1570982400': {'datasource': {'source': '20191013_1570982400'}}, '20191031_1572559200': {'datasource': {'source': '20191031_1572559200'}}, '20190828_1567008000': {'datasource': {'source': '20190828_1567008000'}}, '20191215_1576429200': {'datasource': {'source': '20191215_1576429200'}}, '20191009_1570622400': {'datasource': {'source': '20191009_1570622400'}}, '20191021_1571659200': {'datasource': {'source': '20191021_1571659200'}}, '20191015_1571140800': {'datasource': {'source': '20191015_1571140800'}}, '20190905_1567720800': {'datasource': {'source': '20190905_1567720800'}}, '20190910_1568116800': {'datasource': {'source': '20190910_1568116800'}}, '20190822_1566475200': {'datasource': {'source': '20190822_1566475200'}}, '20191128_1574960400': {'datasource': {'source': '20191128_1574960400'}}, '20190722_1563811200': {'datasource': {'source': '20190722_1563811200'}}, '20190903_1567512000': {'datasource': {'source': '20190903_1567512000'}}, '20190709_1562709600': {'datasource': {'source': '20190709_1562709600'}}, '20190721_1563724800': {'datasource': {'source': '20190721_1563724800'}}, '20190916_1568671200': {'datasource': {'source': '20190916_1568671200'}}, '20190730_1564488000': {'datasource': {'source': '20190730_1564488000'}}, '20190905_1567699200': {'datasource': {'source': '20190905_1567699200'}}, '20191026_1572091200': {'datasource': {'source': '20191026_1572091200'}}, '20190711_1562882400': {'datasource': {'source': '20190711_1562882400'}}, '20190708_1562623200': {'datasource': {'source': '20190708_1562623200'}}, '20191104_1572872400': {'datasource': {'source': '20191104_1572872400'}}, '20190805_1565042400': {'datasource': {'source': '20190805_1565042400'}}, '20190923_1569276000': {'datasource': {'source': '20190923_1569276000'}}, '20191210_1575982800': {'datasource': {'source': '20191210_1575982800'}}, '20191018_1571436000': {'datasource': {'source': '20191018_1571436000'}}, '20191023_1571846400': {'datasource': {'source': '20191023_1571846400'}}, '20191002_1570032000': {'datasource': {'source': '20191002_1570032000'}}, '20190818_1566144000': {'datasource': {'source': '20190818_1566144000'}}, '20190830_1567166400': {'datasource': {'source': '20190830_1567166400'}}, '20190716_1563292800': {'datasource': {'source': '20190716_1563292800'}}}
mongo_host = 'localhost'
mongo_port = 27017
mongo_dbname = 'cota_access_agg'
allow_unknown = True
x_domains = '*'
public_methods = ['GET']
pagination_limit = 10000
pagination_default = 10000 |
# pylint: skip-file
class Hostgroup(object):
''' hostgroup methods'''
@staticmethod
def get_host_group_id_by_name(zapi, hg_name):
'''Get hostgroup id by name'''
content = zapi.get_content('hostgroup',
'get',
{'filter': {'name': hg_name}})
return content['result'][0]['groupid']
@staticmethod
def get_host_ids_by_group_name(zapi, hg_name):
'''Get hostgroup id by name'''
content = zapi.get_content('hostgroup',
'get',
{'filter': {'name': hg_name}})
results = [host['hostid'] for host in content['result']]
return results
@staticmethod
def get_hostgroup_id(zapi, hg_name):
'''get a hostgroup id from hg name'''
content = zapi.get_content('hostgroup',
'get',
{'search': {'name': hg_name}})
return content['result'][0]['groupid']
| class Hostgroup(object):
""" hostgroup methods"""
@staticmethod
def get_host_group_id_by_name(zapi, hg_name):
"""Get hostgroup id by name"""
content = zapi.get_content('hostgroup', 'get', {'filter': {'name': hg_name}})
return content['result'][0]['groupid']
@staticmethod
def get_host_ids_by_group_name(zapi, hg_name):
"""Get hostgroup id by name"""
content = zapi.get_content('hostgroup', 'get', {'filter': {'name': hg_name}})
results = [host['hostid'] for host in content['result']]
return results
@staticmethod
def get_hostgroup_id(zapi, hg_name):
"""get a hostgroup id from hg name"""
content = zapi.get_content('hostgroup', 'get', {'search': {'name': hg_name}})
return content['result'][0]['groupid'] |
# Python - Object Oriented Programming
# Raise can be different for different employees or instances.
# But total number of employees will not be different for any instance.
# so lets create a class variable names num_of employees.
class Employee:
num_of_emps = 0
raise_amt = 1.04
def __init__(self, firstName, lastName, pay):
self.firstName = firstName
self.lastName = lastName
self.pay = pay
self.email = f"{firstName}.{lastName}@Company.com"
Employee.num_of_emps += 1
def fullname(self):
return f"{self.firstName} {self.lastName}"
def apply_raise(self):
self.pay = int(self.pay * self.raise_amt)
employee_1 = Employee("Tom", "Hanks", 50000)
employee_2 = Employee("Ricky", "Martin", 60000)
print(Employee.num_of_emps)
| class Employee:
num_of_emps = 0
raise_amt = 1.04
def __init__(self, firstName, lastName, pay):
self.firstName = firstName
self.lastName = lastName
self.pay = pay
self.email = f'{firstName}.{lastName}@Company.com'
Employee.num_of_emps += 1
def fullname(self):
return f'{self.firstName} {self.lastName}'
def apply_raise(self):
self.pay = int(self.pay * self.raise_amt)
employee_1 = employee('Tom', 'Hanks', 50000)
employee_2 = employee('Ricky', 'Martin', 60000)
print(Employee.num_of_emps) |
# Split string at line boundaries
file_split = file.splitlines()
# Print file_split
print(file_split)
# Complete for-loop to split by commas
for substring in file_split:
substring_split = substring.split(",")
print(substring_split)
| file_split = file.splitlines()
print(file_split)
for substring in file_split:
substring_split = substring.split(',')
print(substring_split) |
#!/usr/bin/python
# coding=utf-8
class Project(object):
__allowed_properties = [
'name',
'git_url',
'absolute_path'
]
def __new__(cls, project_settings):
# Check if project settings are a go for setting attributes
if not sorted(project_settings.keys()) == sorted(cls.__allowed_properties):
return None
# Create attributes from provided dict
for allowed_property in cls.__allowed_properties:
setattr(cls, allowed_property, project_settings[allowed_property])
return cls | class Project(object):
__allowed_properties = ['name', 'git_url', 'absolute_path']
def __new__(cls, project_settings):
if not sorted(project_settings.keys()) == sorted(cls.__allowed_properties):
return None
for allowed_property in cls.__allowed_properties:
setattr(cls, allowed_property, project_settings[allowed_property])
return cls |
# -*- coding: utf-8 -*-
"""
Created on Mon Apr 23 20:07:08 2018
@author: Shen Zhen-Xiong
"""
BasisDict = {'LDAmin': {'H': 'H_lda_5.0au_50Ry_2s1p',
'Li': 'Li_lda_8.0au_50Ry_2s2p1d',
'Be': 'Be_lda_8.0au_50Ry_2s2p1d',
'B': 'B_lda_7.0au_50Ry_2s2p1d',
'C': 'C_pz-vbc_6.0au_50Ry_2s2d1p',
'N': 'N_lda_5.0au_50Ry_2s2p1d',
'O': 'O_lda_5.0au_50Ry_2s2p1d',
'F': 'F_lda_5.0au_50Ry_2s2p1d',
'Na': 'Na_lda_9.0au_50Ry_2s2p1d',
'Mg': 'Mg_lda_8.0au_50Ry_2s2p1d',
'Al': 'Al_pz-vbc_9.0au_50Ry_2s2d1p',
'Si': 'Si_lda_8.0au_50Ry_2s2p1d',
'P': 'P_lda_7.0au_50Ry_2s2p1d',
'S': 'S_lda_6.0au_50Ry_2s2p1d',
'Cl': 'Cl_pz-bhs_6.0au_50Ry_2s2d1p',
'K': 'K_lda_10.0au_50Ry_2s2p1d',
'Ca': 'Ca_pz-n-vbc_10.0au_50Ry_2s2p1d',
'Ti': 'Ti_lda_8.0au_100Ry_2s2p2d',
'Mn': 'Mn_lda_7.0au_100Ry_2s2p2d',
'Fe': 'Fe_lda_7.0au_100Ry_2s2p2d',
'Cu': 'Cu_lda_6.0au_100Ry_2s2p2d',
'Zn': 'Zn_lda_6.0au_120Ry_2s2p2d',
'Ga': 'Ga_lda_7.0au_100Ry_2s2p2d',
'Ge': 'Ge_pz-bhs_8.0au_50Ry_2s2d1p',
'As': 'As_pz-bhs_7.0au_50Ry_2s2p1d',
'Se': 'Se_pz-bhs_7.0au_50Ry_2s2p1d',
'Br': 'Br_lda_6.0au_50Ry_2s2p1d',
'In': 'In_pz-bhs_8.0au_50Ry_2s2p1d',
'Sn': 'Sn_pz-bhs_8.0au_16Ry_2s2p1d',
'I': 'I_lda_6.0au_50Ry_2s2p2d'},
'LDAmid': {'H': 'H_lda_6.0au_50Ry_2s1p',
'Li': 'Li_lda_10.0au_50Ry_2s2p1d',
'Be': 'Be_lda_9.0au_50Ry_2s2p1d',
'B': 'B_lda_8.0au_50Ry_2s2p1d',
'C': 'C_pz-vbc_7.0au_50Ry_2s2d1p',
'N': 'N_lda_6.0au_50Ry_2s2p1d',
'O': 'O_lda_6.0au_50Ry_2s2p1d',
'F': 'F_lda_6.0au_50Ry_2s2p1d',
'Na': 'Na_lda_10.0au_50Ry_2s2p1d',
'Mg': 'Mg_lda_10.0au_50Ry_2s2p1d',
'Al': 'Al_pz-vbc_10.0au_50Ry_2s2d1p',
'Si': 'Si_lda_9.0au_50Ry_2s2p1d',
'P': 'P_lda_8.0au_50Ry_2s2p1d',
'S': 'S_lda_7.0au_50Ry_2s2p1d',
'Cl': 'Cl_pz-bhs_7.0au_50Ry_2s2d1p',
'K': 'K_lda_11.0au_50Ry_2s2p1d',
'Ca': 'Ca_pz-n-vbc_11.0au_50Ry_2s2p1d',
'Ti': 'Ti_lda_10.0au_100Ry_2s2p2d',
'Mn': 'Mn_lda_9.0au_100Ry_2s2p2d',
'Fe': 'Fe_lda_8.0au_100Ry_2s2p2d',
'Cu': 'Cu_lda_7.0au_100Ry_2s2p2d',
'Zn': 'Zn_lda_8.0au_120Ry_2s2p2d',
'Ga': 'Ga_lda_8.0au_100Ry_2s2p2d',
'Ge': 'Ge_pz-bhs_9.0au_50Ry_2s2d1p',
'As': 'As_pz-bhs_8.0au_50Ry_2s2p1d',
'Se': 'Se_pz-bhs_8.0au_50Ry_2s2p1d',
'Br': 'Br_lda_7.0au_50Ry_2s2p1d',
'In': 'In_pz-bhs_10.0au_50Ry_2s2p1d',
'Sn': 'Sn_pz-bhs_9.0au_16Ry_2s2p1d',
'I': 'I_lda_7.0au_50Ry_2s2p2d'},
'LDAact': {'H': 'H_lda_8.0au_50Ry_2s1p',
'Li': 'Li_lda_12.0au_50Ry_2s2p1d',
'Be': 'Be_lda_10.0au_50Ry_2s2p1d',
'B': 'B_lda_9.0au_50Ry_2s2p1d',
'C': 'C_pz-vbc_8.0au_50Ry_2s2d1p',
'N': 'N_lda_7.0au_50Ry_2s2p1d',
'O': 'O_lda_7.0au_50Ry_2s2p1d',
'F': 'F_lda_7.0au_50Ry_2s2p1d',
'Na': 'Na_lda_12.0au_50Ry_2s2p1d',
'Mg': 'Mg_lda_12.0au_50Ry_2s2p1d',
'Al': 'Al_pz-vbc_11.0au_50Ry_2s2d1p',
'Si': 'Si_lda_10.0au_50Ry_2s2p1d',
'P': 'P_lda_9.0au_50Ry_2s2p1d',
'S': 'S_lda_8.0au_50Ry_2s2p1d',
'Cl': 'Cl_pz-bhs_8.0au_50Ry_2s2d1p',
'K': 'K_lda_12.0au_50Ry_2s2p1d',
'Ca': 'Ca_pz-n-vbc_12.0au_50Ry_2s2p1d',
'Ti': 'Ti_lda_11.0au_100Ry_2s2p2d',
'Mn': 'Mn_lda_10.0au_100Ry_2s2p2d',
'Fe': 'Fe_lda_9.0au_100Ry_2s2p2d',
'Cu': 'Cu_lda_8.0au_100Ry_2s2p2d',
'Zn': 'Zn_lda_9.0au_120Ry_2s2p2d',
'Ga': 'Ga_lda_9.0au_100Ry_2s2p2d',
'Ge': 'Ge_pz-bhs_10.0au_50Ry_2s2d1p',
'As': 'As_pz-bhs_9.0au_50Ry_2s2p1d',
'Se': 'Se_pz-bhs_9.0au_50Ry_2s2p1d',
'Br': 'Br_lda_8.0au_50Ry_2s2p1d',
'In': 'In_pz-bhs_11.0au_50Ry_2s2p1d',
'Sn': 'Sn_pz-bhs_10.0au_16Ry_2s2p1d',
'I': 'I_lda_8.0au_50Ry_2s2p2d'},
'PBEmin': {'H': 'H_pbe_5.0au_50Ry_2s1p',
'Li': 'Li_pbe_8.0au_50Ry_2s2p1d',
'Be': 'Be_pbe_8.0au_50Ry_2s2p1d',
'B': 'B_pbe_7.0au_50Ry_2s2p1d',
'C': 'C_pbe_6.0au_50Ry_2s2d1p',
'N': 'N_pbe_5.0au_50Ry_2s2p1d',
'O': 'O_pbe_5.0au_50Ry_2s2p1d',
'F': 'F_pbe_5.0au_50Ry_2s2p1d',
'Na': 'Na_pbe_9.0au_50Ry_2s2p1d',
'Mg': 'Mg_pbe_8.0au_50Ry_2s2p1d',
'Al': 'Al_pbe_9.0au_50Ry_2s2d1p',
'Si': 'Si_pbe_8.0au_50Ry_2s2p1d',
'P': 'P_pbe_7.0au_50Ry_2s2p1d',
'S': 'S_pbe_6.0au_50Ry_2s2p1d',
'Cl': 'Cl_pbe_6.0au_50Ry_2s2d1p',
'K': 'K_pbe_10.0au_50Ry_2s2p1d',
'Ti': 'Ti_pbe_8.0au_100Ry_2s2p2d',
'Mn': 'Mn_pbe_7.0au_100Ry_2s2p2d',
'Fe': 'Fe_pbe_7.0au_100Ry_2s2p2d',
'Cu': 'Cu_pbe_6.0au_100Ry_2s2p2d',
'Zn': 'Zn_pbe_6.0au_120Ry_2s2p2d',
'Ga': 'Ga_pbe_7.0au_100Ry_2s2p2d',
'Br': 'Br_pbe_6.0au_50Ry_2s2p1d',
'I': 'I_pbe_6.0au_50Ry_2s2p2d'},
'PBEmid': {'H': 'H_pbe_6.0au_50Ry_2s1p',
'Li': 'Li_pbe_10.0au_50Ry_2s2p1d',
'Be': 'Be_pbe_9.0au_50Ry_2s2p1d',
'B': 'B_pbe_8.0au_50Ry_2s2p1d',
'C': 'C_pbe_7.0au_50Ry_2s2d1p',
'N': 'N_pbe_6.0au_50Ry_2s2p1d',
'O': 'O_6.0au_50Ry_2s2p1d',
'F': 'F_pbe_6.0au_50Ry_2s2p1d',
'Na': 'Na_pbe_10.0au_50Ry_2s2p1d',
'Mg': 'Mg_pbe_10.0au_50Ry_2s2p1d',
'Al': 'Al_pbe_10.0au_50Ry_2s2d1p',
'Si': 'Si_pbe_9.0au_50Ry_2s2p1d',
'P': 'P_8.0au_50Ry_2s2p1d',
'S': 'S_pbe_7.0au_50Ry_2s2p1d',
'Cl': 'Cl_pbe_7.0au_50Ry_2s2d1p',
'K': 'K_pbe_11.0au_50Ry_2s2p1d',
'Ti': 'Ti_pbe_10.0au_100Ry_2s2p2d',
'Mn': 'Mn_pbe_9.0au_100Ry_2s2p2d',
'Fe': 'Fe_pbe_8.0au_100Ry_2s2p2d',
'Cu': 'Cu_pbe_7.0au_100Ry_2s2p2d',
'Zn': 'Zn_pbe_8.0au_120Ry_2s2p2d',
'Ga': 'Ga_pbe_8.0au_100Ry_2s2p2d',
'Br': 'Br_pbe_7.0au_50Ry_2s2p1d',
'I': 'I_pbe_7.0au_50Ry_2s2p2d'},
'PBEact': {'H': 'H_pbe_8.0au_50Ry_2s1p',
'Li': 'Li_pbe_12.0au_50Ry_2s2p1d',
'Be': 'Be_pbe_10.0au_50Ry_2s2p1d',
'B': 'B_pbe_9.0au_50Ry_2s2p1d',
'C': 'C_pbe_8.0au_50Ry_2s2d1p',
'N': 'N_pbe_7.0au_50Ry_2s2p1d',
'O': 'O_pbe_7.0au_50Ry_2s2p1d',
'F': 'F_pbe_7.0au_50Ry_2s2p1d',
'Na': 'Na_pbe_12.0au_50Ry_2s2p1d',
'Mg': 'Mg_pbe_12.0au_50Ry_2s2p1d',
'Al': 'Al_pbe_11.0au_50Ry_2s2d1p',
'Si': 'Si_pbe_10.0au_50Ry_2s2p1d',
'P': 'P_pbe_9.0au_50Ry_2s2p1d',
'S': 'S_pbe_8.0au_50Ry_2s2p1d',
'Cl': 'Cl_pbe_8.0au_50Ry_2s2d1p',
'K': 'K_pbe_12.0au_50Ry_2s2p1d',
'Ti': 'Ti_pbe_11.0au_100Ry_2s2p2d',
'Mn': 'Mn_pbe_10.0au_100Ry_2s2p2d',
'Fe': 'Fe_pbe_9.0au_100Ry_2s2p2d',
'Cu': 'Cu_pbe_8.0au_100Ry_2s2p2d',
'Zn': 'Zn_pbe_9.0au_120Ry_2s2p2d',
'Ga': 'Ga_pbe_9.0au_100Ry_2s2p2d',
'Br': 'Br_pbe_8.0au_50Ry_2s2p1d',
'I': 'I_pbe_8.0au_50Ry_2s2p2d'},
'SG15std': {'Ag': 'Ag_gga_9au_60Ry_4s2p2d1f.orb',
'Al': 'Al_gga_9au_60Ry_4s4p1d.orb',
'Ar': 'Ar_gga_7au_60Ry_2s2p1d.orb',
'As': 'As_gga_8au_60Ry_2s2p1d.orb',
'Au': 'Au_gga_9au_60Ry_4s2p2d1f.orb',
'Ba': 'Ba_gga_11au_60Ry_4s2p2d.orb',
'Be': 'Be_gga_8au_60Ry_4s1p.orb',
'Bi': 'Bi_gga_9au_60Ry_2s2p2d.orb',
'Br': 'Br_gga_8au_60Ry_2s2p1d.orb',
'B': 'B_gga_8au_60Ry_2s2p1d.orb',
'Ca': 'Ca_gga_9au_60Ry_4s2p1d.orb',
'Cd': 'Cd_gga_9au_60Ry_4s2p2d1f.orb',
'Cl': 'Cl_gga_8au_60Ry_2s2p1d.orb',
'Co': 'Co_gga_9au_60Ry_4s2p2d1f.orb',
'Cr': 'Cr_gga_9au_60Ry_4s2p2d1f.orb',
'Cs': 'Cs_gga_11au_60Ry_4s2p1d.orb',
'Cu': 'Cu_gga_9au_60Ry_4s2p2d1f.orb',
'C': 'C_gga_8au_60Ry_2s2p1d.orb',
'Fe': 'Fe_gga_9au_60Ry_4s2p2d1f.orb',
'F': 'F_gga_7au_60Ry_2s2p1d.orb',
'Ga': 'Ga_gga_9au_60Ry_2s2p2d.orb',
'Ge': 'Ge_gga_8au_60Ry_2s2p2d.orb',
'He': 'He_gga_6au_60Ry_2s1p.orb',
'Hf': 'Hf_gga_10au_60Ry_4s2p2d2f.orb',
'Hg': 'Hg_gga_9au_60Ry_4s2p2d1f.orb',
'H': 'H_gga_8au_60Ry_2s1p.orb',
'In': 'In_gga_9au_60Ry_2s2p2d.orb',
'Ir': 'Ir_gga_9au_60Ry_4s2p2d1f.orb',
'I': 'I_gga_8au_60Ry_2s2p2d.orb',
'Kr': 'Kr_gga_7au_60Ry_2s2p1d.orb',
'K': 'K_gga_9au_60Ry_4s2p1d.orb',
'Li': 'Li_gga_9au_60Ry_4s1p.orb',
'Mg': 'Mg_gga_9au_60Ry_4s2p1d.orb',
'Mn': 'Mn_gga_9au_60Ry_4s2p2d1f.orb',
'Mo': 'Mo_gga_9au_60Ry_4s2p2d1f.orb',
'Na': 'Na_gga_10au_60Ry_4s2p1d.orb',
'Nb': 'Nb_gga_9au_60Ry_4s2p2d1f.orb',
'Ne': 'Ne_gga_6au_60Ry_2s2p1d.orb',
'Ni': 'Ni_gga_9au_60Ry_4s2p2d1f.orb',
'N': 'N_gga_8au_60Ry_2s2p1d.orb',
'Os': 'Os_gga_9au_60Ry_4s2p2d1f.orb',
'O': 'O_gga_7au_60Ry_2s2p1d.orb',
'Pb': 'Pb_gga_9au_60Ry_2s2p2d.orb',
'Pd': 'Pd_gga_9au_60Ry_4s2p2d1f.orb',
'Pt': 'Pt_gga_9au_60Ry_4s2p2d1f.orb',
'P': 'P_gga_8au_60Ry_2s2p1d.orb',
'Rb': 'Rb_gga_10au_60Ry_4s2p1d.orb',
'Re': 'Re_gga_10au_60Ry_4s2p2d1f.orb',
'Rh': 'Rh_gga_9au_60Ry_4s2p2d1f.orb',
'Ru': 'Ru_gga_9au_60Ry_4s2p2d1f.orb',
'Sb': 'Sb_gga_9au_60Ry_2s2p2d.orb',
'Sc': 'Sc_gga_9au_60Ry_4s2p2d1f.orb',
'Se': 'Se_gga_8au_60Ry_2s2p1d.orb',
'Si': 'Si_gga_8au_60Ry_2s2p1d.orb',
'Sn': 'Sn_gga_9au_60Ry_2s2p2d.orb',
'Sr': 'Sr_gga_10au_60Ry_4s2p1d.orb',
'S': 'S_gga_8au_60Ry_2s2p1d.orb',
'Ta': 'Ta_gga_10au_60Ry_4s2p2d2f.orb',
'Tc': 'Tc_gga_9au_60Ry_4s2p2d1f.orb',
'Te': 'Te_gga_9au_60Ry_2s2p2d.orb',
'Ti': 'Ti_gga_9au_60Ry_4s2p2d1f.orb',
'Tl': 'Tl_gga_9au_60Ry_2s2p2d.orb',
'V': 'V_gga_9au_60Ry_4s2p2d1f.orb',
'W': 'W_gga_10au_60Ry_4s2p2d2f.orb',
'Xe': 'Xe_gga_8au_60Ry_2s2p2d.orb',
'Y': 'Y_gga_9au_60Ry_4s2p2d1f.orb',
'Zn': 'Zn_gga_9au_60Ry_4s2p2d1f.orb',
'Zr': 'Zr_gga_9au_60Ry_4s2p2d1f.orb'},
'SG15act': {'Ag': 'Ag_gga_9au_100Ry_4s2p2d1f.orb',
'Al': 'Al_gga_9au_100Ry_4s4p1d.orb',
'Ar': 'Ar_gga_7au_100Ry_2s2p1d.orb',
'As': 'As_gga_8au_100Ry_2s2p1d.orb',
'Au': 'Au_gga_9au_100Ry_4s2p2d1f.orb',
'B': 'B_gga_8au_100Ry_2s2p1d.orb',
'Ba': 'Ba_gga_11au_100Ry_4s2p2d.orb',
'Be': 'Be_gga_8au_100Ry_4s1p.orb',
'Bi': 'Bi_gga_9au_100Ry_2s2p2d.orb',
'Br': 'Br_gga_8au_100Ry_2s2p1d.orb',
'C': 'C_gga_8au_100Ry_2s2p1d.orb',
'Ca': 'Ca_gga_9au_100Ry_4s2p1d.orb',
'Cd': 'Cd_gga_9au_100Ry_4s2p2d1f.orb',
'Cl': 'Cl_gga_8au_100Ry_2s2p1d.orb',
'Co': 'Co_gga_9au_100Ry_4s2p2d1f.orb',
'Cr': 'Cr_gga_9au_100Ry_4s2p2d1f.orb',
'Cs': 'Cs_gga_11au_100Ry_4s2p1d.orb',
'Cu': 'Cu_gga_9au_100Ry_4s2p2d1f.orb',
'F': 'F_gga_7au_100Ry_2s2p1d.orb',
'Fe': 'Fe_gga_9au_100Ry_4s2p2d1f.orb',
'Ga': 'Ga_gga_9au_100Ry_2s2p2d.orb',
'Ge': 'Ge_gga_8au_100Ry_2s2p2d.orb',
'H': 'H_gga_8au_100Ry_2s1p.orb',
'He': 'He_gga_6au_100Ry_2s1p.orb',
'Hf': 'Hf_gga_10au_100Ry_4s2p2d2f.orb',
'Hg': 'Hg_gga_9au_100Ry_4s2p2d1f.orb',
'I': 'I_gga_8au_100Ry_2s2p2d.orb',
'In': 'In_gga_9au_100Ry_2s2p2d.orb',
'Ir': 'Ir_gga_9au_100Ry_4s2p2d1f.orb',
'K': 'K_gga_9au_100Ry_4s2p1d.orb',
'Kr': 'Kr_gga_7au_100Ry_2s2p1d.orb',
'Li': 'Li_gga_9au_100Ry_4s1p.orb',
'Mg': 'Mg_gga_9au_100Ry_4s2p1d.orb',
'Mn': 'Mn_gga_9au_100Ry_4s2p2d1f.orb',
'Mo': 'Mo_gga_9au_100Ry_4s2p2d1f.orb',
'N': 'N_gga_8au_100Ry_2s2p1d.orb',
'Na': 'Na_gga_9au_100Ry_4s2p1d.orb',
'Nb': 'Nb_gga_9au_100Ry_4s2p2d1f.orb',
'Ne': 'Ne_gga_6au_100Ry_2s2p1d.orb',
'Ni': 'Ni_gga_9au_100Ry_4s2p2d1f.orb',
'O': 'O_gga_7au_100Ry_2s2p1d.orb',
'Os': 'Os_gga_9au_100Ry_4s2p2d1f.orb',
'P': 'P_gga_8au_100Ry_2s2p1d.orb',
'Pb': 'Pb_gga_9au_100Ry_2s2p2d.orb',
'Pd': 'Pd_gga_9au_100Ry_4s2p2d1f.orb',
'Pt': 'Pt_gga_9au_100Ry_4s2p2d1f.orb',
'Rb': 'Rb_gga_10au_100Ry_4s2p1d.orb',
'Re': 'Re_gga_10au_100Ry_4s2p2d1f.orb',
'Rh': 'Rh_gga_9au_100Ry_4s2p2d1f.orb',
'Ru': 'Ru_gga_9au_100Ry_4s2p2d1f.orb',
'S': 'S_gga_8au_100Ry_2s2p1d.orb',
'Sb': 'Sb_gga_9au_100Ry_2s2p2d.orb',
'Sc': 'Sc_gga_9au_100Ry_4s2p2d1f.orb',
'Se': 'Se_gga_8au_100Ry_2s2p1d.orb',
'Si': 'Si_gga_8au_100Ry_2s2p1d.orb',
'Sn': 'Sn_gga_9au_100Ry_2s2p2d.orb',
'Sr': 'Sr_gga_10au_100Ry_4s2p1d.orb',
'Ta': 'Ta_gga_10au_100Ry_4s2p2d2f.orb',
'Tc': 'Tc_gga_9au_100Ry_4s2p2d1f.orb',
'Te': 'Te_gga_9au_100Ry_2s2p2d.orb',
'Ti': 'Ti_gga_9au_100Ry_4s2p2d1f.orb',
'Tl': 'Tl_gga_9au_100Ry_2s2p2d.orb',
'V': 'V_gga_9au_100Ry_4s2p2d1f.orb',
'W': 'W_gga_10au_100Ry_4s2p2d2f.orb',
'Xe': 'Xe_gga_7au_100Ry_2s2p2d.orb',
'Y': 'Y_gga_9au_100Ry_4s2p2d1f.orb',
'Zn': 'Zn_gga_9au_100Ry_4s2p2d1f.orb',
'Zr': 'Zr_gga_9au_100Ry_4s2p2d1f.orb'},
'SG15tzdp': {'Ag': 'Ag_gga_9au_100Ry_5s3p3d2f.orb',
'Al': 'Al_gga_9au_100Ry_5s5p2d.orb',
'Ar': 'Ar_gga_8au_100Ry_3s3p2d.orb',
'As': 'As_gga_8au_100Ry_3s3p2d.orb',
'Au': 'Au_gga_9au_100Ry_5s3p3d2f.orb',
'Ba': 'Ba_gga_11au_100Ry_5s3p3d1f.orb',
'Be': 'Be_gga_8au_100Ry_5s2p.orb',
'Bi': 'Bi_gga_9au_100Ry_3s3p3d1f.orb',
'Br': 'Br_gga_8au_100Ry_3s3p2d.orb',
'B': 'B_gga_8au_100Ry_3s3p2d.orb',
'Ca': 'Ca_gga_9au_100Ry_5s3p2d.orb',
'Cd': 'Cd_gga_9au_100Ry_5s3p3d2f.orb',
'Cl': 'Cl_gga_8au_100Ry_3s3p2d.orb',
'Co': 'Co_gga_9au_100Ry_5s3p3d2f.orb',
'Cr': 'Cr_gga_9au_100Ry_5s3p3d2f.orb',
'Cs': 'Cs_gga_11au_100Ry_5s3p2d.orb',
'Cu': 'Cu_gga_9au_100Ry_5s3p3d2f.orb',
'C': 'C_gga_8au_100Ry_3s3p2d.orb',
'Fe': 'Fe_gga_9au_100Ry_5s3p3d2f.orb',
'F': 'F_gga_8au_100Ry_3s3p2d.orb',
'Ga': 'Ga_gga_9au_100Ry_3s3p3d1f.orb',
'Ge': 'Ge_gga_8au_100Ry_3s3p3d1f.orb',
'He': 'He_gga_8au_100Ry_3s2p.orb',
'Hf': 'Hf_gga_10au_100Ry_5s3p3d3f1g.orb',
'Hg': 'Hg_gga_9au_100Ry_5s3p3d2f.orb',
'H': 'H_gga_8au_100Ry_3s2p.orb',
'In': 'In_gga_10au_100Ry_3s3p3d1f.orb',
'Ir': 'Ir_gga_9au_100Ry_5s3p3d2f.orb',
'I': 'I_gga_8au_100Ry_3s3p3d1f.orb',
'Kr': 'Kr_gga_8au_100Ry_3s3p2d.orb',
'K': 'K_gga_9au_100Ry_5s3p2d.orb',
'Li': 'Li_gga_9au_100Ry_5s2p.orb',
'Mg': 'Mg_gga_9au_100Ry_5s3p2d.orb',
'Mn': 'Mn_gga_9au_100Ry_5s3p3d2f.orb',
'Mo': 'Mo_gga_9au_100Ry_5s3p3d2f.orb',
'Na': 'Na_gga_9au_100Ry_5s3p2d.orb',
'Nb': 'Nb_gga_10au_100Ry_5s3p3d2f.orb',
'Ne': 'Ne_gga_8au_100Ry_3s3p2d.orb',
'Ni': 'Ni_gga_9au_100Ry_5s3p3d2f.orb',
'N': 'N_gga_8au_100Ry_3s3p2d.orb',
'Os': 'Os_gga_9au_100Ry_5s3p3d2f.orb',
'O': 'O_gga_8au_100Ry_3s3p2d.orb',
'Pb': 'Pb_gga_10au_100Ry_3s3p3d1f.orb',
'Pd': 'Pd_gga_9au_100Ry_5s3p3d2f.orb',
'Pt': 'Pt_gga_9au_100Ry_5s3p3d2f.orb',
'P': 'P_gga_8au_100Ry_3s3p2d.orb',
'Rb': 'Rb_gga_10au_100Ry_5s3p2d.orb',
'Re': 'Re_gga_10au_100Ry_5s3p3d2f.orb',
'Rh': 'Rh_gga_9au_100Ry_5s3p3d2f.orb',
'Ru': 'Ru_gga_9au_100Ry_5s3p3d2f.orb',
'Sb': 'Sb_gga_9au_100Ry_3s3p3d1f.orb',
'Sc': 'Sc_gga_10au_100Ry_5s3p3d2f.orb',
'Se': 'Se_gga_8au_100Ry_3s3p2d.orb',
'Si': 'Si_gga_8au_100Ry_3s3p2d.orb',
'Sn': 'Sn_gga_10au_100Ry_3s3p3d1f.orb',
'Sr': 'Sr_gga_10au_100Ry_5s3p2d.orb',
'S': 'S_gga_8au_100Ry_3s3p2d.orb',
'Ta': 'Ta_gga_10au_100Ry_5s3p3d3f1g.orb',
'Tc': 'Tc_gga_10au_100Ry_5s3p3d2f.orb',
'Te': 'Te_gga_9au_100Ry_3s3p3d1f.orb',
'Ti': 'Ti_gga_9au_100Ry_5s3p3d2f.orb',
'Tl': 'Tl_gga_10au_100Ry_3s3p3d1f.orb',
'V': 'V_gga_9au_100Ry_5s3p3d2f.orb',
'W': 'W_gga_10au_100Ry_5s3p3d3f1g.orb',
'Xe': 'Xe_gga_8au_100Ry_3s3p3d1f.orb',
'Y': 'Y_gga_10au_100Ry_5s3p3d2f.orb',
'Zn': 'Zn_gga_9au_100Ry_5s3p3d2f.orb',
'Zr': 'Zr_gga_9au_100Ry_5s3p3d2f.orb'}
}
| """
Created on Mon Apr 23 20:07:08 2018
@author: Shen Zhen-Xiong
"""
basis_dict = {'LDAmin': {'H': 'H_lda_5.0au_50Ry_2s1p', 'Li': 'Li_lda_8.0au_50Ry_2s2p1d', 'Be': 'Be_lda_8.0au_50Ry_2s2p1d', 'B': 'B_lda_7.0au_50Ry_2s2p1d', 'C': 'C_pz-vbc_6.0au_50Ry_2s2d1p', 'N': 'N_lda_5.0au_50Ry_2s2p1d', 'O': 'O_lda_5.0au_50Ry_2s2p1d', 'F': 'F_lda_5.0au_50Ry_2s2p1d', 'Na': 'Na_lda_9.0au_50Ry_2s2p1d', 'Mg': 'Mg_lda_8.0au_50Ry_2s2p1d', 'Al': 'Al_pz-vbc_9.0au_50Ry_2s2d1p', 'Si': 'Si_lda_8.0au_50Ry_2s2p1d', 'P': 'P_lda_7.0au_50Ry_2s2p1d', 'S': 'S_lda_6.0au_50Ry_2s2p1d', 'Cl': 'Cl_pz-bhs_6.0au_50Ry_2s2d1p', 'K': 'K_lda_10.0au_50Ry_2s2p1d', 'Ca': 'Ca_pz-n-vbc_10.0au_50Ry_2s2p1d', 'Ti': 'Ti_lda_8.0au_100Ry_2s2p2d', 'Mn': 'Mn_lda_7.0au_100Ry_2s2p2d', 'Fe': 'Fe_lda_7.0au_100Ry_2s2p2d', 'Cu': 'Cu_lda_6.0au_100Ry_2s2p2d', 'Zn': 'Zn_lda_6.0au_120Ry_2s2p2d', 'Ga': 'Ga_lda_7.0au_100Ry_2s2p2d', 'Ge': 'Ge_pz-bhs_8.0au_50Ry_2s2d1p', 'As': 'As_pz-bhs_7.0au_50Ry_2s2p1d', 'Se': 'Se_pz-bhs_7.0au_50Ry_2s2p1d', 'Br': 'Br_lda_6.0au_50Ry_2s2p1d', 'In': 'In_pz-bhs_8.0au_50Ry_2s2p1d', 'Sn': 'Sn_pz-bhs_8.0au_16Ry_2s2p1d', 'I': 'I_lda_6.0au_50Ry_2s2p2d'}, 'LDAmid': {'H': 'H_lda_6.0au_50Ry_2s1p', 'Li': 'Li_lda_10.0au_50Ry_2s2p1d', 'Be': 'Be_lda_9.0au_50Ry_2s2p1d', 'B': 'B_lda_8.0au_50Ry_2s2p1d', 'C': 'C_pz-vbc_7.0au_50Ry_2s2d1p', 'N': 'N_lda_6.0au_50Ry_2s2p1d', 'O': 'O_lda_6.0au_50Ry_2s2p1d', 'F': 'F_lda_6.0au_50Ry_2s2p1d', 'Na': 'Na_lda_10.0au_50Ry_2s2p1d', 'Mg': 'Mg_lda_10.0au_50Ry_2s2p1d', 'Al': 'Al_pz-vbc_10.0au_50Ry_2s2d1p', 'Si': 'Si_lda_9.0au_50Ry_2s2p1d', 'P': 'P_lda_8.0au_50Ry_2s2p1d', 'S': 'S_lda_7.0au_50Ry_2s2p1d', 'Cl': 'Cl_pz-bhs_7.0au_50Ry_2s2d1p', 'K': 'K_lda_11.0au_50Ry_2s2p1d', 'Ca': 'Ca_pz-n-vbc_11.0au_50Ry_2s2p1d', 'Ti': 'Ti_lda_10.0au_100Ry_2s2p2d', 'Mn': 'Mn_lda_9.0au_100Ry_2s2p2d', 'Fe': 'Fe_lda_8.0au_100Ry_2s2p2d', 'Cu': 'Cu_lda_7.0au_100Ry_2s2p2d', 'Zn': 'Zn_lda_8.0au_120Ry_2s2p2d', 'Ga': 'Ga_lda_8.0au_100Ry_2s2p2d', 'Ge': 'Ge_pz-bhs_9.0au_50Ry_2s2d1p', 'As': 'As_pz-bhs_8.0au_50Ry_2s2p1d', 'Se': 'Se_pz-bhs_8.0au_50Ry_2s2p1d', 'Br': 'Br_lda_7.0au_50Ry_2s2p1d', 'In': 'In_pz-bhs_10.0au_50Ry_2s2p1d', 'Sn': 'Sn_pz-bhs_9.0au_16Ry_2s2p1d', 'I': 'I_lda_7.0au_50Ry_2s2p2d'}, 'LDAact': {'H': 'H_lda_8.0au_50Ry_2s1p', 'Li': 'Li_lda_12.0au_50Ry_2s2p1d', 'Be': 'Be_lda_10.0au_50Ry_2s2p1d', 'B': 'B_lda_9.0au_50Ry_2s2p1d', 'C': 'C_pz-vbc_8.0au_50Ry_2s2d1p', 'N': 'N_lda_7.0au_50Ry_2s2p1d', 'O': 'O_lda_7.0au_50Ry_2s2p1d', 'F': 'F_lda_7.0au_50Ry_2s2p1d', 'Na': 'Na_lda_12.0au_50Ry_2s2p1d', 'Mg': 'Mg_lda_12.0au_50Ry_2s2p1d', 'Al': 'Al_pz-vbc_11.0au_50Ry_2s2d1p', 'Si': 'Si_lda_10.0au_50Ry_2s2p1d', 'P': 'P_lda_9.0au_50Ry_2s2p1d', 'S': 'S_lda_8.0au_50Ry_2s2p1d', 'Cl': 'Cl_pz-bhs_8.0au_50Ry_2s2d1p', 'K': 'K_lda_12.0au_50Ry_2s2p1d', 'Ca': 'Ca_pz-n-vbc_12.0au_50Ry_2s2p1d', 'Ti': 'Ti_lda_11.0au_100Ry_2s2p2d', 'Mn': 'Mn_lda_10.0au_100Ry_2s2p2d', 'Fe': 'Fe_lda_9.0au_100Ry_2s2p2d', 'Cu': 'Cu_lda_8.0au_100Ry_2s2p2d', 'Zn': 'Zn_lda_9.0au_120Ry_2s2p2d', 'Ga': 'Ga_lda_9.0au_100Ry_2s2p2d', 'Ge': 'Ge_pz-bhs_10.0au_50Ry_2s2d1p', 'As': 'As_pz-bhs_9.0au_50Ry_2s2p1d', 'Se': 'Se_pz-bhs_9.0au_50Ry_2s2p1d', 'Br': 'Br_lda_8.0au_50Ry_2s2p1d', 'In': 'In_pz-bhs_11.0au_50Ry_2s2p1d', 'Sn': 'Sn_pz-bhs_10.0au_16Ry_2s2p1d', 'I': 'I_lda_8.0au_50Ry_2s2p2d'}, 'PBEmin': {'H': 'H_pbe_5.0au_50Ry_2s1p', 'Li': 'Li_pbe_8.0au_50Ry_2s2p1d', 'Be': 'Be_pbe_8.0au_50Ry_2s2p1d', 'B': 'B_pbe_7.0au_50Ry_2s2p1d', 'C': 'C_pbe_6.0au_50Ry_2s2d1p', 'N': 'N_pbe_5.0au_50Ry_2s2p1d', 'O': 'O_pbe_5.0au_50Ry_2s2p1d', 'F': 'F_pbe_5.0au_50Ry_2s2p1d', 'Na': 'Na_pbe_9.0au_50Ry_2s2p1d', 'Mg': 'Mg_pbe_8.0au_50Ry_2s2p1d', 'Al': 'Al_pbe_9.0au_50Ry_2s2d1p', 'Si': 'Si_pbe_8.0au_50Ry_2s2p1d', 'P': 'P_pbe_7.0au_50Ry_2s2p1d', 'S': 'S_pbe_6.0au_50Ry_2s2p1d', 'Cl': 'Cl_pbe_6.0au_50Ry_2s2d1p', 'K': 'K_pbe_10.0au_50Ry_2s2p1d', 'Ti': 'Ti_pbe_8.0au_100Ry_2s2p2d', 'Mn': 'Mn_pbe_7.0au_100Ry_2s2p2d', 'Fe': 'Fe_pbe_7.0au_100Ry_2s2p2d', 'Cu': 'Cu_pbe_6.0au_100Ry_2s2p2d', 'Zn': 'Zn_pbe_6.0au_120Ry_2s2p2d', 'Ga': 'Ga_pbe_7.0au_100Ry_2s2p2d', 'Br': 'Br_pbe_6.0au_50Ry_2s2p1d', 'I': 'I_pbe_6.0au_50Ry_2s2p2d'}, 'PBEmid': {'H': 'H_pbe_6.0au_50Ry_2s1p', 'Li': 'Li_pbe_10.0au_50Ry_2s2p1d', 'Be': 'Be_pbe_9.0au_50Ry_2s2p1d', 'B': 'B_pbe_8.0au_50Ry_2s2p1d', 'C': 'C_pbe_7.0au_50Ry_2s2d1p', 'N': 'N_pbe_6.0au_50Ry_2s2p1d', 'O': 'O_6.0au_50Ry_2s2p1d', 'F': 'F_pbe_6.0au_50Ry_2s2p1d', 'Na': 'Na_pbe_10.0au_50Ry_2s2p1d', 'Mg': 'Mg_pbe_10.0au_50Ry_2s2p1d', 'Al': 'Al_pbe_10.0au_50Ry_2s2d1p', 'Si': 'Si_pbe_9.0au_50Ry_2s2p1d', 'P': 'P_8.0au_50Ry_2s2p1d', 'S': 'S_pbe_7.0au_50Ry_2s2p1d', 'Cl': 'Cl_pbe_7.0au_50Ry_2s2d1p', 'K': 'K_pbe_11.0au_50Ry_2s2p1d', 'Ti': 'Ti_pbe_10.0au_100Ry_2s2p2d', 'Mn': 'Mn_pbe_9.0au_100Ry_2s2p2d', 'Fe': 'Fe_pbe_8.0au_100Ry_2s2p2d', 'Cu': 'Cu_pbe_7.0au_100Ry_2s2p2d', 'Zn': 'Zn_pbe_8.0au_120Ry_2s2p2d', 'Ga': 'Ga_pbe_8.0au_100Ry_2s2p2d', 'Br': 'Br_pbe_7.0au_50Ry_2s2p1d', 'I': 'I_pbe_7.0au_50Ry_2s2p2d'}, 'PBEact': {'H': 'H_pbe_8.0au_50Ry_2s1p', 'Li': 'Li_pbe_12.0au_50Ry_2s2p1d', 'Be': 'Be_pbe_10.0au_50Ry_2s2p1d', 'B': 'B_pbe_9.0au_50Ry_2s2p1d', 'C': 'C_pbe_8.0au_50Ry_2s2d1p', 'N': 'N_pbe_7.0au_50Ry_2s2p1d', 'O': 'O_pbe_7.0au_50Ry_2s2p1d', 'F': 'F_pbe_7.0au_50Ry_2s2p1d', 'Na': 'Na_pbe_12.0au_50Ry_2s2p1d', 'Mg': 'Mg_pbe_12.0au_50Ry_2s2p1d', 'Al': 'Al_pbe_11.0au_50Ry_2s2d1p', 'Si': 'Si_pbe_10.0au_50Ry_2s2p1d', 'P': 'P_pbe_9.0au_50Ry_2s2p1d', 'S': 'S_pbe_8.0au_50Ry_2s2p1d', 'Cl': 'Cl_pbe_8.0au_50Ry_2s2d1p', 'K': 'K_pbe_12.0au_50Ry_2s2p1d', 'Ti': 'Ti_pbe_11.0au_100Ry_2s2p2d', 'Mn': 'Mn_pbe_10.0au_100Ry_2s2p2d', 'Fe': 'Fe_pbe_9.0au_100Ry_2s2p2d', 'Cu': 'Cu_pbe_8.0au_100Ry_2s2p2d', 'Zn': 'Zn_pbe_9.0au_120Ry_2s2p2d', 'Ga': 'Ga_pbe_9.0au_100Ry_2s2p2d', 'Br': 'Br_pbe_8.0au_50Ry_2s2p1d', 'I': 'I_pbe_8.0au_50Ry_2s2p2d'}, 'SG15std': {'Ag': 'Ag_gga_9au_60Ry_4s2p2d1f.orb', 'Al': 'Al_gga_9au_60Ry_4s4p1d.orb', 'Ar': 'Ar_gga_7au_60Ry_2s2p1d.orb', 'As': 'As_gga_8au_60Ry_2s2p1d.orb', 'Au': 'Au_gga_9au_60Ry_4s2p2d1f.orb', 'Ba': 'Ba_gga_11au_60Ry_4s2p2d.orb', 'Be': 'Be_gga_8au_60Ry_4s1p.orb', 'Bi': 'Bi_gga_9au_60Ry_2s2p2d.orb', 'Br': 'Br_gga_8au_60Ry_2s2p1d.orb', 'B': 'B_gga_8au_60Ry_2s2p1d.orb', 'Ca': 'Ca_gga_9au_60Ry_4s2p1d.orb', 'Cd': 'Cd_gga_9au_60Ry_4s2p2d1f.orb', 'Cl': 'Cl_gga_8au_60Ry_2s2p1d.orb', 'Co': 'Co_gga_9au_60Ry_4s2p2d1f.orb', 'Cr': 'Cr_gga_9au_60Ry_4s2p2d1f.orb', 'Cs': 'Cs_gga_11au_60Ry_4s2p1d.orb', 'Cu': 'Cu_gga_9au_60Ry_4s2p2d1f.orb', 'C': 'C_gga_8au_60Ry_2s2p1d.orb', 'Fe': 'Fe_gga_9au_60Ry_4s2p2d1f.orb', 'F': 'F_gga_7au_60Ry_2s2p1d.orb', 'Ga': 'Ga_gga_9au_60Ry_2s2p2d.orb', 'Ge': 'Ge_gga_8au_60Ry_2s2p2d.orb', 'He': 'He_gga_6au_60Ry_2s1p.orb', 'Hf': 'Hf_gga_10au_60Ry_4s2p2d2f.orb', 'Hg': 'Hg_gga_9au_60Ry_4s2p2d1f.orb', 'H': 'H_gga_8au_60Ry_2s1p.orb', 'In': 'In_gga_9au_60Ry_2s2p2d.orb', 'Ir': 'Ir_gga_9au_60Ry_4s2p2d1f.orb', 'I': 'I_gga_8au_60Ry_2s2p2d.orb', 'Kr': 'Kr_gga_7au_60Ry_2s2p1d.orb', 'K': 'K_gga_9au_60Ry_4s2p1d.orb', 'Li': 'Li_gga_9au_60Ry_4s1p.orb', 'Mg': 'Mg_gga_9au_60Ry_4s2p1d.orb', 'Mn': 'Mn_gga_9au_60Ry_4s2p2d1f.orb', 'Mo': 'Mo_gga_9au_60Ry_4s2p2d1f.orb', 'Na': 'Na_gga_10au_60Ry_4s2p1d.orb', 'Nb': 'Nb_gga_9au_60Ry_4s2p2d1f.orb', 'Ne': 'Ne_gga_6au_60Ry_2s2p1d.orb', 'Ni': 'Ni_gga_9au_60Ry_4s2p2d1f.orb', 'N': 'N_gga_8au_60Ry_2s2p1d.orb', 'Os': 'Os_gga_9au_60Ry_4s2p2d1f.orb', 'O': 'O_gga_7au_60Ry_2s2p1d.orb', 'Pb': 'Pb_gga_9au_60Ry_2s2p2d.orb', 'Pd': 'Pd_gga_9au_60Ry_4s2p2d1f.orb', 'Pt': 'Pt_gga_9au_60Ry_4s2p2d1f.orb', 'P': 'P_gga_8au_60Ry_2s2p1d.orb', 'Rb': 'Rb_gga_10au_60Ry_4s2p1d.orb', 'Re': 'Re_gga_10au_60Ry_4s2p2d1f.orb', 'Rh': 'Rh_gga_9au_60Ry_4s2p2d1f.orb', 'Ru': 'Ru_gga_9au_60Ry_4s2p2d1f.orb', 'Sb': 'Sb_gga_9au_60Ry_2s2p2d.orb', 'Sc': 'Sc_gga_9au_60Ry_4s2p2d1f.orb', 'Se': 'Se_gga_8au_60Ry_2s2p1d.orb', 'Si': 'Si_gga_8au_60Ry_2s2p1d.orb', 'Sn': 'Sn_gga_9au_60Ry_2s2p2d.orb', 'Sr': 'Sr_gga_10au_60Ry_4s2p1d.orb', 'S': 'S_gga_8au_60Ry_2s2p1d.orb', 'Ta': 'Ta_gga_10au_60Ry_4s2p2d2f.orb', 'Tc': 'Tc_gga_9au_60Ry_4s2p2d1f.orb', 'Te': 'Te_gga_9au_60Ry_2s2p2d.orb', 'Ti': 'Ti_gga_9au_60Ry_4s2p2d1f.orb', 'Tl': 'Tl_gga_9au_60Ry_2s2p2d.orb', 'V': 'V_gga_9au_60Ry_4s2p2d1f.orb', 'W': 'W_gga_10au_60Ry_4s2p2d2f.orb', 'Xe': 'Xe_gga_8au_60Ry_2s2p2d.orb', 'Y': 'Y_gga_9au_60Ry_4s2p2d1f.orb', 'Zn': 'Zn_gga_9au_60Ry_4s2p2d1f.orb', 'Zr': 'Zr_gga_9au_60Ry_4s2p2d1f.orb'}, 'SG15act': {'Ag': 'Ag_gga_9au_100Ry_4s2p2d1f.orb', 'Al': 'Al_gga_9au_100Ry_4s4p1d.orb', 'Ar': 'Ar_gga_7au_100Ry_2s2p1d.orb', 'As': 'As_gga_8au_100Ry_2s2p1d.orb', 'Au': 'Au_gga_9au_100Ry_4s2p2d1f.orb', 'B': 'B_gga_8au_100Ry_2s2p1d.orb', 'Ba': 'Ba_gga_11au_100Ry_4s2p2d.orb', 'Be': 'Be_gga_8au_100Ry_4s1p.orb', 'Bi': 'Bi_gga_9au_100Ry_2s2p2d.orb', 'Br': 'Br_gga_8au_100Ry_2s2p1d.orb', 'C': 'C_gga_8au_100Ry_2s2p1d.orb', 'Ca': 'Ca_gga_9au_100Ry_4s2p1d.orb', 'Cd': 'Cd_gga_9au_100Ry_4s2p2d1f.orb', 'Cl': 'Cl_gga_8au_100Ry_2s2p1d.orb', 'Co': 'Co_gga_9au_100Ry_4s2p2d1f.orb', 'Cr': 'Cr_gga_9au_100Ry_4s2p2d1f.orb', 'Cs': 'Cs_gga_11au_100Ry_4s2p1d.orb', 'Cu': 'Cu_gga_9au_100Ry_4s2p2d1f.orb', 'F': 'F_gga_7au_100Ry_2s2p1d.orb', 'Fe': 'Fe_gga_9au_100Ry_4s2p2d1f.orb', 'Ga': 'Ga_gga_9au_100Ry_2s2p2d.orb', 'Ge': 'Ge_gga_8au_100Ry_2s2p2d.orb', 'H': 'H_gga_8au_100Ry_2s1p.orb', 'He': 'He_gga_6au_100Ry_2s1p.orb', 'Hf': 'Hf_gga_10au_100Ry_4s2p2d2f.orb', 'Hg': 'Hg_gga_9au_100Ry_4s2p2d1f.orb', 'I': 'I_gga_8au_100Ry_2s2p2d.orb', 'In': 'In_gga_9au_100Ry_2s2p2d.orb', 'Ir': 'Ir_gga_9au_100Ry_4s2p2d1f.orb', 'K': 'K_gga_9au_100Ry_4s2p1d.orb', 'Kr': 'Kr_gga_7au_100Ry_2s2p1d.orb', 'Li': 'Li_gga_9au_100Ry_4s1p.orb', 'Mg': 'Mg_gga_9au_100Ry_4s2p1d.orb', 'Mn': 'Mn_gga_9au_100Ry_4s2p2d1f.orb', 'Mo': 'Mo_gga_9au_100Ry_4s2p2d1f.orb', 'N': 'N_gga_8au_100Ry_2s2p1d.orb', 'Na': 'Na_gga_9au_100Ry_4s2p1d.orb', 'Nb': 'Nb_gga_9au_100Ry_4s2p2d1f.orb', 'Ne': 'Ne_gga_6au_100Ry_2s2p1d.orb', 'Ni': 'Ni_gga_9au_100Ry_4s2p2d1f.orb', 'O': 'O_gga_7au_100Ry_2s2p1d.orb', 'Os': 'Os_gga_9au_100Ry_4s2p2d1f.orb', 'P': 'P_gga_8au_100Ry_2s2p1d.orb', 'Pb': 'Pb_gga_9au_100Ry_2s2p2d.orb', 'Pd': 'Pd_gga_9au_100Ry_4s2p2d1f.orb', 'Pt': 'Pt_gga_9au_100Ry_4s2p2d1f.orb', 'Rb': 'Rb_gga_10au_100Ry_4s2p1d.orb', 'Re': 'Re_gga_10au_100Ry_4s2p2d1f.orb', 'Rh': 'Rh_gga_9au_100Ry_4s2p2d1f.orb', 'Ru': 'Ru_gga_9au_100Ry_4s2p2d1f.orb', 'S': 'S_gga_8au_100Ry_2s2p1d.orb', 'Sb': 'Sb_gga_9au_100Ry_2s2p2d.orb', 'Sc': 'Sc_gga_9au_100Ry_4s2p2d1f.orb', 'Se': 'Se_gga_8au_100Ry_2s2p1d.orb', 'Si': 'Si_gga_8au_100Ry_2s2p1d.orb', 'Sn': 'Sn_gga_9au_100Ry_2s2p2d.orb', 'Sr': 'Sr_gga_10au_100Ry_4s2p1d.orb', 'Ta': 'Ta_gga_10au_100Ry_4s2p2d2f.orb', 'Tc': 'Tc_gga_9au_100Ry_4s2p2d1f.orb', 'Te': 'Te_gga_9au_100Ry_2s2p2d.orb', 'Ti': 'Ti_gga_9au_100Ry_4s2p2d1f.orb', 'Tl': 'Tl_gga_9au_100Ry_2s2p2d.orb', 'V': 'V_gga_9au_100Ry_4s2p2d1f.orb', 'W': 'W_gga_10au_100Ry_4s2p2d2f.orb', 'Xe': 'Xe_gga_7au_100Ry_2s2p2d.orb', 'Y': 'Y_gga_9au_100Ry_4s2p2d1f.orb', 'Zn': 'Zn_gga_9au_100Ry_4s2p2d1f.orb', 'Zr': 'Zr_gga_9au_100Ry_4s2p2d1f.orb'}, 'SG15tzdp': {'Ag': 'Ag_gga_9au_100Ry_5s3p3d2f.orb', 'Al': 'Al_gga_9au_100Ry_5s5p2d.orb', 'Ar': 'Ar_gga_8au_100Ry_3s3p2d.orb', 'As': 'As_gga_8au_100Ry_3s3p2d.orb', 'Au': 'Au_gga_9au_100Ry_5s3p3d2f.orb', 'Ba': 'Ba_gga_11au_100Ry_5s3p3d1f.orb', 'Be': 'Be_gga_8au_100Ry_5s2p.orb', 'Bi': 'Bi_gga_9au_100Ry_3s3p3d1f.orb', 'Br': 'Br_gga_8au_100Ry_3s3p2d.orb', 'B': 'B_gga_8au_100Ry_3s3p2d.orb', 'Ca': 'Ca_gga_9au_100Ry_5s3p2d.orb', 'Cd': 'Cd_gga_9au_100Ry_5s3p3d2f.orb', 'Cl': 'Cl_gga_8au_100Ry_3s3p2d.orb', 'Co': 'Co_gga_9au_100Ry_5s3p3d2f.orb', 'Cr': 'Cr_gga_9au_100Ry_5s3p3d2f.orb', 'Cs': 'Cs_gga_11au_100Ry_5s3p2d.orb', 'Cu': 'Cu_gga_9au_100Ry_5s3p3d2f.orb', 'C': 'C_gga_8au_100Ry_3s3p2d.orb', 'Fe': 'Fe_gga_9au_100Ry_5s3p3d2f.orb', 'F': 'F_gga_8au_100Ry_3s3p2d.orb', 'Ga': 'Ga_gga_9au_100Ry_3s3p3d1f.orb', 'Ge': 'Ge_gga_8au_100Ry_3s3p3d1f.orb', 'He': 'He_gga_8au_100Ry_3s2p.orb', 'Hf': 'Hf_gga_10au_100Ry_5s3p3d3f1g.orb', 'Hg': 'Hg_gga_9au_100Ry_5s3p3d2f.orb', 'H': 'H_gga_8au_100Ry_3s2p.orb', 'In': 'In_gga_10au_100Ry_3s3p3d1f.orb', 'Ir': 'Ir_gga_9au_100Ry_5s3p3d2f.orb', 'I': 'I_gga_8au_100Ry_3s3p3d1f.orb', 'Kr': 'Kr_gga_8au_100Ry_3s3p2d.orb', 'K': 'K_gga_9au_100Ry_5s3p2d.orb', 'Li': 'Li_gga_9au_100Ry_5s2p.orb', 'Mg': 'Mg_gga_9au_100Ry_5s3p2d.orb', 'Mn': 'Mn_gga_9au_100Ry_5s3p3d2f.orb', 'Mo': 'Mo_gga_9au_100Ry_5s3p3d2f.orb', 'Na': 'Na_gga_9au_100Ry_5s3p2d.orb', 'Nb': 'Nb_gga_10au_100Ry_5s3p3d2f.orb', 'Ne': 'Ne_gga_8au_100Ry_3s3p2d.orb', 'Ni': 'Ni_gga_9au_100Ry_5s3p3d2f.orb', 'N': 'N_gga_8au_100Ry_3s3p2d.orb', 'Os': 'Os_gga_9au_100Ry_5s3p3d2f.orb', 'O': 'O_gga_8au_100Ry_3s3p2d.orb', 'Pb': 'Pb_gga_10au_100Ry_3s3p3d1f.orb', 'Pd': 'Pd_gga_9au_100Ry_5s3p3d2f.orb', 'Pt': 'Pt_gga_9au_100Ry_5s3p3d2f.orb', 'P': 'P_gga_8au_100Ry_3s3p2d.orb', 'Rb': 'Rb_gga_10au_100Ry_5s3p2d.orb', 'Re': 'Re_gga_10au_100Ry_5s3p3d2f.orb', 'Rh': 'Rh_gga_9au_100Ry_5s3p3d2f.orb', 'Ru': 'Ru_gga_9au_100Ry_5s3p3d2f.orb', 'Sb': 'Sb_gga_9au_100Ry_3s3p3d1f.orb', 'Sc': 'Sc_gga_10au_100Ry_5s3p3d2f.orb', 'Se': 'Se_gga_8au_100Ry_3s3p2d.orb', 'Si': 'Si_gga_8au_100Ry_3s3p2d.orb', 'Sn': 'Sn_gga_10au_100Ry_3s3p3d1f.orb', 'Sr': 'Sr_gga_10au_100Ry_5s3p2d.orb', 'S': 'S_gga_8au_100Ry_3s3p2d.orb', 'Ta': 'Ta_gga_10au_100Ry_5s3p3d3f1g.orb', 'Tc': 'Tc_gga_10au_100Ry_5s3p3d2f.orb', 'Te': 'Te_gga_9au_100Ry_3s3p3d1f.orb', 'Ti': 'Ti_gga_9au_100Ry_5s3p3d2f.orb', 'Tl': 'Tl_gga_10au_100Ry_3s3p3d1f.orb', 'V': 'V_gga_9au_100Ry_5s3p3d2f.orb', 'W': 'W_gga_10au_100Ry_5s3p3d3f1g.orb', 'Xe': 'Xe_gga_8au_100Ry_3s3p3d1f.orb', 'Y': 'Y_gga_10au_100Ry_5s3p3d2f.orb', 'Zn': 'Zn_gga_9au_100Ry_5s3p3d2f.orb', 'Zr': 'Zr_gga_9au_100Ry_5s3p3d2f.orb'}} |
"""
Unit test module
How to debug test:
$ pytest -s # disable all capturing
"""
| """
Unit test module
How to debug test:
$ pytest -s # disable all capturing
""" |
class Building:
def __init__(s,x,y,a,b,h=10): s.x,s.y,s.a,s.b,s.h=x,y,a,b,h
__repr__ = lambda s: "Building({}, {}, {}, {}, {})".format(s.x,s.y,s.a,s.b,s.h)
area,volume = lambda s: s.a*s.b,lambda s: s.a*s.b*s.h
corners = lambda s: {"south-west":(s.x,s.y),"north-east":(s.x+s.b,s.y+s.a),
"south-east":(s.x,s.y+s.a),"north-west":(s.x+s.b,s.y)} | class Building:
def __init__(s, x, y, a, b, h=10):
(s.x, s.y, s.a, s.b, s.h) = (x, y, a, b, h)
__repr__ = lambda s: 'Building({}, {}, {}, {}, {})'.format(s.x, s.y, s.a, s.b, s.h)
(area, volume) = (lambda s: s.a * s.b, lambda s: s.a * s.b * s.h)
corners = lambda s: {'south-west': (s.x, s.y), 'north-east': (s.x + s.b, s.y + s.a), 'south-east': (s.x, s.y + s.a), 'north-west': (s.x + s.b, s.y)} |
##for i in range(0,5):
## for j in range(5,i,-1):
##
## print(j,end='')
##
##
## print()
for i in range(5,0,-1):
for j in range(1,i+1):
print(i,end='')
print()
| for i in range(5, 0, -1):
for j in range(1, i + 1):
print(i, end='')
print() |
class User:
def __init__(self, user_name, email=None):
self.name = user_name
self.email = email
self.expense_dict = {}
def add_entry(self, user, amount):
print(f"Now updating Entry {user.name} for {self.name}'s dict.")
if self.expense_dict.get(user, None) is not None:
print(f"Previous entry was {self.expense_dict[user]}")
self.expense_dict[user] += amount
print(f"New entry is {self.expense_dict[user]}")
else:
self.expense_dict[user] = amount
def get_report(self):
for user in self.expense_dict:
amount = self.expense_dict[user]
if amount < 0:
print(f"{self.name} owes {user.name} {-1*amount} $")
else:
print(f"{self.name} has loaned {user.name} {amount} $")
| class User:
def __init__(self, user_name, email=None):
self.name = user_name
self.email = email
self.expense_dict = {}
def add_entry(self, user, amount):
print(f"Now updating Entry {user.name} for {self.name}'s dict.")
if self.expense_dict.get(user, None) is not None:
print(f'Previous entry was {self.expense_dict[user]}')
self.expense_dict[user] += amount
print(f'New entry is {self.expense_dict[user]}')
else:
self.expense_dict[user] = amount
def get_report(self):
for user in self.expense_dict:
amount = self.expense_dict[user]
if amount < 0:
print(f'{self.name} owes {user.name} {-1 * amount} $')
else:
print(f'{self.name} has loaned {user.name} {amount} $') |
_base_ = [
'../_base_/models/oscar/oscar_nlvr2_config.py',
'../_base_/datasets/oscar/oscar_nlvr2_dataset.py',
'../_base_/default_runtime.py',
]
# cover the parrmeter in above files
model = dict(params=dict(model_name_or_path='/home/datasets/mix_data/model/vinvl/vqa/large/checkpoint-2000000', ))
lr_config = dict(
num_warmup_steps=5000, # warmup_proportion=0
num_training_steps=36000, # ceil(totoal 86373 / batch size 72 / GPUS 1) * epoch size 20
)
data_root = '/home/datasets/mix_data/vinvl/datasets/nlvr2'
nlvr_reader_train_cfg = dict(
model_name_or_path='/home/datasets/mix_data/model/vinvl/vqa/large/checkpoint-2000000',
data_dir=data_root,
)
nlvr_reader_test_cfg = dict(
model_name_or_path='/home/datasets/mix_data/model/vinvl/vqa/large/checkpoint-2000000',
data_dir=data_root,
)
train_data = dict(
samples_per_gpu=24,
data=dict(reader=nlvr_reader_train_cfg, ),
sampler='DistributedSampler',
)
test_data = dict(data=dict(reader=nlvr_reader_test_cfg, ), )
| _base_ = ['../_base_/models/oscar/oscar_nlvr2_config.py', '../_base_/datasets/oscar/oscar_nlvr2_dataset.py', '../_base_/default_runtime.py']
model = dict(params=dict(model_name_or_path='/home/datasets/mix_data/model/vinvl/vqa/large/checkpoint-2000000'))
lr_config = dict(num_warmup_steps=5000, num_training_steps=36000)
data_root = '/home/datasets/mix_data/vinvl/datasets/nlvr2'
nlvr_reader_train_cfg = dict(model_name_or_path='/home/datasets/mix_data/model/vinvl/vqa/large/checkpoint-2000000', data_dir=data_root)
nlvr_reader_test_cfg = dict(model_name_or_path='/home/datasets/mix_data/model/vinvl/vqa/large/checkpoint-2000000', data_dir=data_root)
train_data = dict(samples_per_gpu=24, data=dict(reader=nlvr_reader_train_cfg), sampler='DistributedSampler')
test_data = dict(data=dict(reader=nlvr_reader_test_cfg)) |
class Required(object):
"""
A class holding a dictionary of required fields
for variety of transaction supported by pypesa
"""
re_customer_to_bussiness = {
"input_Amount",
"input_Country",
"input_Currency",
"input_CustomerMSISDN",
"input_ServiceProviderCode",
"input_ThirdPartyConversationID",
"input_TransactionReference",
"input_PurchasedItemsDesc",
}
re_bussiness_to_customer = {
"input_Amount",
"input_Country",
"input_Currency",
"input_CustomerMSISDN",
"input_ServiceProviderCode",
"input_ThirdPartyConversationID",
"input_TransactionReference",
"input_PaymentItemsDesc",
}
re_bussiness_to_bussiness = {
"input_Amount",
"input_Country",
"input_Currency",
"input_PrimaryPartyCode",
"input_ReceiverPartyCode",
"input_ThirdPartyConversationID",
"input_TransactionReference",
"input_PurchasedItemsDesc",
}
re_payment_reversal = {
"input_Country",
"input_ReversalAmount",
"input_ServiceProviderCode",
"input_ThirdPartyConversationID",
"input_TransactionID",
}
re_transaction_status = {
"input_Country",
"input_QueryReference",
"input_ServiceProviderCode",
"input_ThirdPartyConversationID",
}
re_create_direct_debit = {
"input_AgreedTC",
"input_Country",
"input_CustomerMSISDN",
"input_EndRangeOfDays",
"input_ExpiryDate",
"input_FirstPaymentDate",
"input_Frequency",
"input_ServiceProviderCode",
"input_StartRangeOfDays",
"input_ThirdPartyConversationID",
"input_ThirdPartyReference",
}
re_direct_debit_payment = {
"input_Amount",
"input_Country",
"input_Currency",
"input_CustomerMSISDN",
"input_ServiceProviderCode",
"input_ThirdPartyConversationID",
"input_ThirdPartyReference",
}
class sandbox(Required):
"""
Service URL to be used during sandbox Development
"""
def __init__(self):
self.session_id = (
"https://openapi.m-pesa.com/sandbox/ipg/v2/vodacomTZN/getSession/"
)
self.single_stage_c2b = "https://openapi.m-pesa.com:443/sandbox/ipg/v2/vodacomTZN/c2bPayment/singleStage/"
self.single_stage_b2c = (
"https://openapi.m-pesa.com:443/sandbox/ipg/v2/vodacomTZN/b2cPayment/"
)
self.single_stage_b2b = (
"https://openapi.m-pesa.com:443/sandbox/ipg/v2/vodacomTZN/b2bPayment/"
)
self.payment_reversal = (
"https://openapi.m-pesa.com:433/sandbox/ipg/v2/vodacomTZN/reversal/"
)
self.transaction_status = "https://openapi.m-pesa.com:443/sandbox/ipg/v2/vodacomTZN/queryTransactionStatus/"
self.direct_debit = "https://openapi.m-pesa.com:443/sandbox/ipg/v2/vodacomTZN/directDebitCreation/"
self.direct_debit_payment = "https://openapi.m-pesa.com:443/sandbox/ipg/v2/vodacomTZN/directDebitPayment/"
def __str__(self) -> str:
return '<Using Sandbox Urls>'
def __str__(self) -> str:
return '<Using Sandbox Urls>'
class production(Required):
"""
Service URL to be used for Production Development
"""
def __init__(self):
self.session_id = (
"https://openapi.m-pesa.com/openapi/ipg/v2/vodacomTZN/getSession/"
)
self.single_stage_c2b = "https://openapi.m-pesa.com:443/openapi/ipg/v2/vodacomTZN/c2bPayment/singleStage/"
self.single_stage_b2c = (
"https://openapi.m-pesa.com:443//openapi/ipg/v2/vodacomTZN/b2cPayment/"
)
self.single_stage_b2b = (
"https://openapi.m-pesa.com:443/openapi/ipg/v2/vodacomTZN/b2bPayment/"
)
self.payment_reversal = (
"https://openapi.m-pesa.com:443/openapi/ipg/v2/vodacomTZN/reversal/"
)
self.transaction_status = "https://openapi.m-pesa.com:443/openapi/ipg/v2/vodacomTZN/queryTransactionStatus/"
self.direct_debit = "https://openapi.m-pesa.com:443/openapi/ipg/v2/vodacomTZN/directDebitCreation/"
self.direct_debit_payment = "https://openapi.m-pesa.com:443/openapi/ipg/v2/vodacomTZN/directDebitPayment/"
def __str__(self) -> str:
return '<Using Production Urls>'
def __repr__(self) -> str:
return '<Using Production Urls>'
| class Required(object):
"""
A class holding a dictionary of required fields
for variety of transaction supported by pypesa
"""
re_customer_to_bussiness = {'input_Amount', 'input_Country', 'input_Currency', 'input_CustomerMSISDN', 'input_ServiceProviderCode', 'input_ThirdPartyConversationID', 'input_TransactionReference', 'input_PurchasedItemsDesc'}
re_bussiness_to_customer = {'input_Amount', 'input_Country', 'input_Currency', 'input_CustomerMSISDN', 'input_ServiceProviderCode', 'input_ThirdPartyConversationID', 'input_TransactionReference', 'input_PaymentItemsDesc'}
re_bussiness_to_bussiness = {'input_Amount', 'input_Country', 'input_Currency', 'input_PrimaryPartyCode', 'input_ReceiverPartyCode', 'input_ThirdPartyConversationID', 'input_TransactionReference', 'input_PurchasedItemsDesc'}
re_payment_reversal = {'input_Country', 'input_ReversalAmount', 'input_ServiceProviderCode', 'input_ThirdPartyConversationID', 'input_TransactionID'}
re_transaction_status = {'input_Country', 'input_QueryReference', 'input_ServiceProviderCode', 'input_ThirdPartyConversationID'}
re_create_direct_debit = {'input_AgreedTC', 'input_Country', 'input_CustomerMSISDN', 'input_EndRangeOfDays', 'input_ExpiryDate', 'input_FirstPaymentDate', 'input_Frequency', 'input_ServiceProviderCode', 'input_StartRangeOfDays', 'input_ThirdPartyConversationID', 'input_ThirdPartyReference'}
re_direct_debit_payment = {'input_Amount', 'input_Country', 'input_Currency', 'input_CustomerMSISDN', 'input_ServiceProviderCode', 'input_ThirdPartyConversationID', 'input_ThirdPartyReference'}
class Sandbox(Required):
"""
Service URL to be used during sandbox Development
"""
def __init__(self):
self.session_id = 'https://openapi.m-pesa.com/sandbox/ipg/v2/vodacomTZN/getSession/'
self.single_stage_c2b = 'https://openapi.m-pesa.com:443/sandbox/ipg/v2/vodacomTZN/c2bPayment/singleStage/'
self.single_stage_b2c = 'https://openapi.m-pesa.com:443/sandbox/ipg/v2/vodacomTZN/b2cPayment/'
self.single_stage_b2b = 'https://openapi.m-pesa.com:443/sandbox/ipg/v2/vodacomTZN/b2bPayment/'
self.payment_reversal = 'https://openapi.m-pesa.com:433/sandbox/ipg/v2/vodacomTZN/reversal/'
self.transaction_status = 'https://openapi.m-pesa.com:443/sandbox/ipg/v2/vodacomTZN/queryTransactionStatus/'
self.direct_debit = 'https://openapi.m-pesa.com:443/sandbox/ipg/v2/vodacomTZN/directDebitCreation/'
self.direct_debit_payment = 'https://openapi.m-pesa.com:443/sandbox/ipg/v2/vodacomTZN/directDebitPayment/'
def __str__(self) -> str:
return '<Using Sandbox Urls>'
def __str__(self) -> str:
return '<Using Sandbox Urls>'
class Production(Required):
"""
Service URL to be used for Production Development
"""
def __init__(self):
self.session_id = 'https://openapi.m-pesa.com/openapi/ipg/v2/vodacomTZN/getSession/'
self.single_stage_c2b = 'https://openapi.m-pesa.com:443/openapi/ipg/v2/vodacomTZN/c2bPayment/singleStage/'
self.single_stage_b2c = 'https://openapi.m-pesa.com:443//openapi/ipg/v2/vodacomTZN/b2cPayment/'
self.single_stage_b2b = 'https://openapi.m-pesa.com:443/openapi/ipg/v2/vodacomTZN/b2bPayment/'
self.payment_reversal = 'https://openapi.m-pesa.com:443/openapi/ipg/v2/vodacomTZN/reversal/'
self.transaction_status = 'https://openapi.m-pesa.com:443/openapi/ipg/v2/vodacomTZN/queryTransactionStatus/'
self.direct_debit = 'https://openapi.m-pesa.com:443/openapi/ipg/v2/vodacomTZN/directDebitCreation/'
self.direct_debit_payment = 'https://openapi.m-pesa.com:443/openapi/ipg/v2/vodacomTZN/directDebitPayment/'
def __str__(self) -> str:
return '<Using Production Urls>'
def __repr__(self) -> str:
return '<Using Production Urls>' |
mcl = [[-5.592134638754766e-05, 1e6],
[-6.441295571105171e-05, 1e6],
[-2.7292256647813406e-05, 1e6],
[-5.738494934280777e-05, 1e6],
[-3.920474118683737e-05, 1e6]]
accval, accruns = 0, 0
for mcrun in mcl:
accval += mcrun[0]*mcrun[1]
accruns += mcrun[1]
print(accruns, ': ', accval/accruns)
| mcl = [[-5.592134638754766e-05, 1000000.0], [-6.441295571105171e-05, 1000000.0], [-2.7292256647813406e-05, 1000000.0], [-5.738494934280777e-05, 1000000.0], [-3.920474118683737e-05, 1000000.0]]
(accval, accruns) = (0, 0)
for mcrun in mcl:
accval += mcrun[0] * mcrun[1]
accruns += mcrun[1]
print(accruns, ': ', accval / accruns) |
greet=' hello bob '
greet.strip()
print(greet)
#right strip
greet=' hello bob '
greet.rstrip()
print(greet)
#left strip
greet=' hello bob '
greet.lstrip()
print(greet)
| greet = ' hello bob '
greet.strip()
print(greet)
greet = ' hello bob '
greet.rstrip()
print(greet)
greet = ' hello bob '
greet.lstrip()
print(greet) |
#
# PySNMP MIB module CPQSANAPP-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CPQSANAPP-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 18:12:09 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueRangeConstraint, ValueSizeConstraint, ConstraintsUnion, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsUnion", "ConstraintsIntersection", "SingleValueConstraint")
ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup")
TimeTicks, Counter32, NotificationType, ModuleIdentity, Bits, enterprises, NotificationType, Counter64, Unsigned32, IpAddress, iso, Gauge32, ObjectIdentity, Integer32, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn = mibBuilder.importSymbols("SNMPv2-SMI", "TimeTicks", "Counter32", "NotificationType", "ModuleIdentity", "Bits", "enterprises", "NotificationType", "Counter64", "Unsigned32", "IpAddress", "iso", "Gauge32", "ObjectIdentity", "Integer32", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
compaq = MibIdentifier((1, 3, 6, 1, 4, 1, 232))
cpqSanAppliance = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 151))
resourceMonitor = MibIdentifier((1, 3, 6, 1, 4, 1, 232, 151, 11))
swSystemName = MibScalar((1, 3, 6, 1, 4, 1, 232, 151, 11, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(255, 255)).setFixedLength(255)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swSystemName.setStatus('mandatory')
swSystemType = MibScalar((1, 3, 6, 1, 4, 1, 232, 151, 11, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("hsg80", 1), ("switch", 2), ("appliance", 3)))).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swSystemType.setStatus('mandatory')
swEventName = MibScalar((1, 3, 6, 1, 4, 1, 232, 151, 11, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(255, 255)).setFixedLength(255)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swEventName.setStatus('mandatory')
swFailure = MibScalar((1, 3, 6, 1, 4, 1, 232, 151, 11, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(255, 255)).setFixedLength(255)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swFailure.setStatus('mandatory')
swSequence = MibScalar((1, 3, 6, 1, 4, 1, 232, 151, 11, 5), Integer32()).setMaxAccess("readwrite")
if mibBuilder.loadTexts: swSequence.setStatus('mandatory')
swFailureTrap = NotificationType((1, 3, 6, 1, 4, 1, 232, 151, 11) + (0,1)).setObjects(("CPQSANAPP-MIB", "swSystemName"), ("CPQSANAPP-MIB", "swSystemType"), ("CPQSANAPP-MIB", "swEventName"), ("CPQSANAPP-MIB", "swFailure"), ("CPQSANAPP-MIB", "swSequence"))
swWarningTrap = NotificationType((1, 3, 6, 1, 4, 1, 232, 151, 11) + (0,2)).setObjects(("CPQSANAPP-MIB", "swSystemName"), ("CPQSANAPP-MIB", "swSystemType"), ("CPQSANAPP-MIB", "swEventName"), ("CPQSANAPP-MIB", "swFailure"), ("CPQSANAPP-MIB", "swSequence"))
swInformationTrap = NotificationType((1, 3, 6, 1, 4, 1, 232, 151, 11) + (0,4)).setObjects(("CPQSANAPP-MIB", "swSystemName"), ("CPQSANAPP-MIB", "swSystemType"), ("CPQSANAPP-MIB", "swEventName"), ("CPQSANAPP-MIB", "swFailure"), ("CPQSANAPP-MIB", "swSequence"))
mibBuilder.exportSymbols("CPQSANAPP-MIB", compaq=compaq, swWarningTrap=swWarningTrap, swInformationTrap=swInformationTrap, swSequence=swSequence, swEventName=swEventName, swSystemName=swSystemName, swSystemType=swSystemType, resourceMonitor=resourceMonitor, swFailure=swFailure, cpqSanAppliance=cpqSanAppliance, swFailureTrap=swFailureTrap)
| (object_identifier, integer, octet_string) = mibBuilder.importSymbols('ASN1', 'ObjectIdentifier', 'Integer', 'OctetString')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_range_constraint, value_size_constraint, constraints_union, constraints_intersection, single_value_constraint) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueRangeConstraint', 'ValueSizeConstraint', 'ConstraintsUnion', 'ConstraintsIntersection', 'SingleValueConstraint')
(module_compliance, notification_group) = mibBuilder.importSymbols('SNMPv2-CONF', 'ModuleCompliance', 'NotificationGroup')
(time_ticks, counter32, notification_type, module_identity, bits, enterprises, notification_type, counter64, unsigned32, ip_address, iso, gauge32, object_identity, integer32, mib_identifier, mib_scalar, mib_table, mib_table_row, mib_table_column) = mibBuilder.importSymbols('SNMPv2-SMI', 'TimeTicks', 'Counter32', 'NotificationType', 'ModuleIdentity', 'Bits', 'enterprises', 'NotificationType', 'Counter64', 'Unsigned32', 'IpAddress', 'iso', 'Gauge32', 'ObjectIdentity', 'Integer32', 'MibIdentifier', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
compaq = mib_identifier((1, 3, 6, 1, 4, 1, 232))
cpq_san_appliance = mib_identifier((1, 3, 6, 1, 4, 1, 232, 151))
resource_monitor = mib_identifier((1, 3, 6, 1, 4, 1, 232, 151, 11))
sw_system_name = mib_scalar((1, 3, 6, 1, 4, 1, 232, 151, 11, 1), display_string().subtype(subtypeSpec=value_size_constraint(255, 255)).setFixedLength(255)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
swSystemName.setStatus('mandatory')
sw_system_type = mib_scalar((1, 3, 6, 1, 4, 1, 232, 151, 11, 2), integer32().subtype(subtypeSpec=constraints_union(single_value_constraint(1, 2, 3))).clone(namedValues=named_values(('hsg80', 1), ('switch', 2), ('appliance', 3)))).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
swSystemType.setStatus('mandatory')
sw_event_name = mib_scalar((1, 3, 6, 1, 4, 1, 232, 151, 11, 3), display_string().subtype(subtypeSpec=value_size_constraint(255, 255)).setFixedLength(255)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
swEventName.setStatus('mandatory')
sw_failure = mib_scalar((1, 3, 6, 1, 4, 1, 232, 151, 11, 4), display_string().subtype(subtypeSpec=value_size_constraint(255, 255)).setFixedLength(255)).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
swFailure.setStatus('mandatory')
sw_sequence = mib_scalar((1, 3, 6, 1, 4, 1, 232, 151, 11, 5), integer32()).setMaxAccess('readwrite')
if mibBuilder.loadTexts:
swSequence.setStatus('mandatory')
sw_failure_trap = notification_type((1, 3, 6, 1, 4, 1, 232, 151, 11) + (0, 1)).setObjects(('CPQSANAPP-MIB', 'swSystemName'), ('CPQSANAPP-MIB', 'swSystemType'), ('CPQSANAPP-MIB', 'swEventName'), ('CPQSANAPP-MIB', 'swFailure'), ('CPQSANAPP-MIB', 'swSequence'))
sw_warning_trap = notification_type((1, 3, 6, 1, 4, 1, 232, 151, 11) + (0, 2)).setObjects(('CPQSANAPP-MIB', 'swSystemName'), ('CPQSANAPP-MIB', 'swSystemType'), ('CPQSANAPP-MIB', 'swEventName'), ('CPQSANAPP-MIB', 'swFailure'), ('CPQSANAPP-MIB', 'swSequence'))
sw_information_trap = notification_type((1, 3, 6, 1, 4, 1, 232, 151, 11) + (0, 4)).setObjects(('CPQSANAPP-MIB', 'swSystemName'), ('CPQSANAPP-MIB', 'swSystemType'), ('CPQSANAPP-MIB', 'swEventName'), ('CPQSANAPP-MIB', 'swFailure'), ('CPQSANAPP-MIB', 'swSequence'))
mibBuilder.exportSymbols('CPQSANAPP-MIB', compaq=compaq, swWarningTrap=swWarningTrap, swInformationTrap=swInformationTrap, swSequence=swSequence, swEventName=swEventName, swSystemName=swSystemName, swSystemType=swSystemType, resourceMonitor=resourceMonitor, swFailure=swFailure, cpqSanAppliance=cpqSanAppliance, swFailureTrap=swFailureTrap) |
class Factorial:
def __init__(self):
self.fact = [1]
def __call__(self,n):
if n < len(self.fact):
return 1
else:
fact_number = n * self(n-1)
self.fact.append(fact_number)
return self.fact[n]
factorial_of_n = Factorial()
n = int(input("n = "))
print(factorial_of_n(n))
| class Factorial:
def __init__(self):
self.fact = [1]
def __call__(self, n):
if n < len(self.fact):
return 1
else:
fact_number = n * self(n - 1)
self.fact.append(fact_number)
return self.fact[n]
factorial_of_n = factorial()
n = int(input('n = '))
print(factorial_of_n(n)) |
def permutation(text, anchor, p):
if anchor == len(text):
p.add("".join(text))
return
for i in range(anchor, len(text)):
text[anchor], text[i] = text[i], text[anchor]
permutation(text, anchor + 1, p)
text[anchor], text[i] = text[i], text[anchor]
if __name__ == "__main__":
text = "abc"
p = set()
permutation(list(text), 0, p)
print(p)
text = "abcd"
p = set()
permutation(list(text), 0, p)
print(p) | def permutation(text, anchor, p):
if anchor == len(text):
p.add(''.join(text))
return
for i in range(anchor, len(text)):
(text[anchor], text[i]) = (text[i], text[anchor])
permutation(text, anchor + 1, p)
(text[anchor], text[i]) = (text[i], text[anchor])
if __name__ == '__main__':
text = 'abc'
p = set()
permutation(list(text), 0, p)
print(p)
text = 'abcd'
p = set()
permutation(list(text), 0, p)
print(p) |
_config = {
"class": "class"
}
def config():
return _config
| _config = {'class': 'class'}
def config():
return _config |
fixthis = """
YOUR STORY GOES HERE
"""
| fixthis = '\nYOUR STORY GOES HERE\n\n' |
######################## GLOBAL VARIABLES #########################
BINANCE = True # Variable to indicate which exchange to use: True for BINANCE, False for FTX
SHITCOIN = 'ftm'
MULTI_TF = True
TF_LIST = ['4h','1h','15m','5m','1m']
TF = '1h'
LEVELS_PER_TF = 3 # Number of levels per Time Frame to include in the list of DCAs
DAYS_BACK = 90 # Number of days to look back in time for initial candles data
TRADE_ON = False
###################################################################
# Balance variables
MAX_BAL_PER_COIN = 10 # Maximum percentage of balance to use per asset/coin
LVRG = 20
# Take Profit variables
TPGRID_MIN_DIST = 0.2 # Percentage to use for the closest order in the TP grid
TPGRID_MAX_DIST = 0.8 # Percentage to use for the farthest order in the TP grid
TP_ORDERS = 6 # Number of orders for the TP grid
DCA_FACTOR_MULT = 1.75 # Factor to multiply each DCA entry in the grid (it will multiply the amount of previous DCA by this factor)
ASSYMMETRIC_TP = False # False for equal sized orders, False for descending size TP orders
MIN_LEVEL_DISTANCE = 0.8 # Variable to indicate what % will be the minimum valid distance between levels found
| binance = True
shitcoin = 'ftm'
multi_tf = True
tf_list = ['4h', '1h', '15m', '5m', '1m']
tf = '1h'
levels_per_tf = 3
days_back = 90
trade_on = False
max_bal_per_coin = 10
lvrg = 20
tpgrid_min_dist = 0.2
tpgrid_max_dist = 0.8
tp_orders = 6
dca_factor_mult = 1.75
assymmetric_tp = False
min_level_distance = 0.8 |
# https://codeforces.com/problemset/problem/266/A
n = int(input())
s = input()
ans = 0
for i in range(n - 1):
if s[i] == s[i + 1]:
ans += 1
print(ans) | n = int(input())
s = input()
ans = 0
for i in range(n - 1):
if s[i] == s[i + 1]:
ans += 1
print(ans) |
def generate_list():
output_list = [x ** 2 for x in list(range(1, 21))]
print(output_list)
generate_list()
| def generate_list():
output_list = [x ** 2 for x in list(range(1, 21))]
print(output_list)
generate_list() |
class DynamoDataAttribute(object):
def __init__(self, datatype, value=None, initialized=True):
"""initialize the DynamoDataAttribute
This class stores the current value of the attribute on
the model and some extra metadata about the attribute itself
datatype - the Datatype of the corresponding Model attribute
value - the current value
initialized - if this attribute was included when the Model
was instantiated
_changed - has the set() method be called
initialized / _changed help determine what attributes to include
in the model.put() and model.update()
value is built using datatype.build() to handle default values
"""
self.datatype = datatype
self.value = self.datatype.build(value)
self.initialized = initialized
self._changed = False
def get(self):
return self.value
def set(self, newvalue):
self._changed = True
self.value = newvalue
| class Dynamodataattribute(object):
def __init__(self, datatype, value=None, initialized=True):
"""initialize the DynamoDataAttribute
This class stores the current value of the attribute on
the model and some extra metadata about the attribute itself
datatype - the Datatype of the corresponding Model attribute
value - the current value
initialized - if this attribute was included when the Model
was instantiated
_changed - has the set() method be called
initialized / _changed help determine what attributes to include
in the model.put() and model.update()
value is built using datatype.build() to handle default values
"""
self.datatype = datatype
self.value = self.datatype.build(value)
self.initialized = initialized
self._changed = False
def get(self):
return self.value
def set(self, newvalue):
self._changed = True
self.value = newvalue |
def assert_modal_view_shown(running_app, klass=None):
assert running_app.root_window.children
if klass:
klass_found = False
children = running_app.root_window.children
for child in children:
klass_found |= isinstance(child, klass)
assert klass_found, "%s modal view not found in %s" % (klass, children)
def assert_modal_view_not_shown(running_app, klass=None):
if not klass:
assert not running_app.root_window.children
else:
klass_found = False
children = running_app.root_window.children
for child in children:
klass_found |= isinstance(child, klass)
assert not klass_found, "%s modal view found in %s" % (klass, children)
def assert_tracker_event_sent(tracker, category, action, *args, **kwargs):
tracker.send_event.assert_called_with(category, action, *args, **kwargs)
def assert_bought(billing, sku, *args, **kwargs):
billing.buy.assert_any_call(sku, *args, **kwargs)
def assert_achievement_incremented(google_client, name):
google_client.increment_achievement.assert_any_call(name)
def assert_achievement_unlocked(google_client, name):
google_client.unlock_achievement.assert_any_call(name)
def assert_leaderboard_score_submitted(google_client, name, score):
google_client.submit_score.assert_any_call(name, score)
def assert_vibrated(vibrator, length):
vibrator.vibrate.assert_any_call(length)
| def assert_modal_view_shown(running_app, klass=None):
assert running_app.root_window.children
if klass:
klass_found = False
children = running_app.root_window.children
for child in children:
klass_found |= isinstance(child, klass)
assert klass_found, '%s modal view not found in %s' % (klass, children)
def assert_modal_view_not_shown(running_app, klass=None):
if not klass:
assert not running_app.root_window.children
else:
klass_found = False
children = running_app.root_window.children
for child in children:
klass_found |= isinstance(child, klass)
assert not klass_found, '%s modal view found in %s' % (klass, children)
def assert_tracker_event_sent(tracker, category, action, *args, **kwargs):
tracker.send_event.assert_called_with(category, action, *args, **kwargs)
def assert_bought(billing, sku, *args, **kwargs):
billing.buy.assert_any_call(sku, *args, **kwargs)
def assert_achievement_incremented(google_client, name):
google_client.increment_achievement.assert_any_call(name)
def assert_achievement_unlocked(google_client, name):
google_client.unlock_achievement.assert_any_call(name)
def assert_leaderboard_score_submitted(google_client, name, score):
google_client.submit_score.assert_any_call(name, score)
def assert_vibrated(vibrator, length):
vibrator.vibrate.assert_any_call(length) |
#!/usr/bin/env python3
def check_kwarg(kwargs, name, default=None, arg_type=None, required=False, pop=False):
""" Simple function for checking a kwarg. Useful if you don't want to
create a new object to check a kwarg or two. Pop=True will remove the
kwarg entry from kwargs if found. """
if required:
assert name in kwargs, "\n".join([
"", 40*"#",
f"## {name} not in kwargs",
f"## kwargs has {kwargs.keys()}",
40*"#", ""])
out = default
if name in kwargs:
out = kwargs.pop(name) if pop else kwargs[name]
type_handle = _assert_types(out, name=name, arg_type=arg_type)
if type_handle is None:
# No type casting
return out
elif isinstance(type_handle, (list, tuple)):
# Type casting elements in a list
return [th(element) for th, element in zip(type_handle, out)]
else:
# Type casting a single output variable
return type_handle(out)
def get_check_kwarg_fu(function_kwargs, pop=False):
""" Create a simple function for checking kwargs. Useful if you don't
need long term storage of KwargChecker and find supplying kwargs to
check_kwarg as an argument annoying. Pop will pop entries out of the
kwargs list if found. """
def fu(name, default=None, arg_type=None, required=False):
return check_kwarg(function_kwargs, name,
default=default, arg_type=arg_type,
required=required, pop=pop)
return fu
def check_add_kwarg(kwargs, name, default=None, arg_type=None, force=False):
""" Simple function for checking if a name is in kwargs and adding a
default value if it isn't. If force is True, it will overwrite an
existing value with default. It will also return the existing or default
value.
"""
# Add or set the default if applicable
if name not in kwargs or force:
kwargs[name] = default
out = kwargs[name]
type_handle = _assert_types(out, name=name, arg_type=arg_type)
if type_handle is None:
# No type casting
return out
elif isinstance(type_handle, (list, tuple)):
# Type casting elements in a list
return [th(element) for th, element in zip(type_handle, out)]
else:
# Type casting a single output variable
return type_handle(out)
def get_check_add_kwarg_fu(function_kwargs):
""" Create a simple function for checking and adding kwargs. """
def fu(name, default=None, arg_type=None, force=False):
return check_add_kwarg(function_kwargs, name,
default=default, arg_type=arg_type, force=force)
return fu
def _generic_assert_type(arg, arg_name, type_handle, type_name, type_casting_ok):
"""Assert if the arg is of type(s) type_handle or, if type_casting_ok is
True, assert if the arg can be cast to any of type_handle.
Parameters
----------
arg :
The variable being checked.
arg_name : string
The name of the variable used for the error message.
type_handle :
The handle for the variable type desired. Can be a single handle (e.g.
type_handle=int) or a sequence of handles (e.g. type_handle=(int,
float)).
type_name :
The name of the type(s) for the error message. (e.g. 'int or float')
type_casting_ok:
Indicates whether type casting is allowed. However, the function only
checks that it is possible. **The function does not actually recast the
variable.**
Returns
-------
type_handle :
The returned type handle will be the same as the input type_handle
unless type_casting_ok is True and there are multiple accepted types.
If so, the return handle will be the first successful type to cast the
variable.
"""
error_message = f"{arg_name} ({type(arg)}) must be of type {type_name}"
output_type_handle = type_handle
try:
# See if arg is of type(s) type_handle
assert isinstance(arg, type_handle), error_message
except AssertionError as wrong_type_error:
# arg is not of type type_handle
# If type casting is not allowed, re-raise the failure
if not type_casting_ok:
raise wrong_type_error
# Type casting is allowed, see if arg can be casted to type(s)
# type_handle
if isinstance(type_handle, (tuple, list)):
# Multiple accepted types, see if arg can be cast to any
# RETURNS the first type handle that is successful
for th in type_handle:
try:
assert isinstance(th(arg), th)
output_type_handle = th
break
except:
pass
else:
# Failed to find a valid casting type
raise wrong_type_error
else:
# Single accepted type, see if arg can be cast to it
try:
assert isinstance(type_handle(arg), type_handle)
except (AssertionError, ValueError, TypeError):
raise wrong_type_error
# Assertions all passed
return output_type_handle
def _assert_types(arg, name='arg', arg_type=None):
"""Assert that arg is the correct type, if applicable.
Parameters
----------
arg :
The variable to be checked.
name :
The name of the arg to be used for error messages.
arg_type :
A string representing the accepted type or types for the variable.
Currently handles the basic types: 'list', 'tuple', 'int', 'float',
'str', and 'bool'). Can specify extra qualifiers too. Multiple
types and qualifiers can be present in the string. Order only matters
if checking casting between both int and float(e.g. 'int-float' vs.
'float-int'), where the first ones are given preference.
Extra qualifiers:
'none' = Allows the arg to be None even if something else was specified
'tcast' =
If the var does not match the provided type(s), allows the program
to check if the variable can be cast to the desired type(s). 'pos',
'whole', 'neg' = Asserts an 'int' or 'float' variable is >0, >=0,
or <0, respectively.
Examples:
'' or None = No type specifications, check will unconditionally pass.
'float-none' = Check if the variable is a float or None.
'float-int-pos' = Check if variable is a positive (>0) float or int.
'int-whole-tcast' =
Check if variable is or can be cast to a whole (>=0) int.
Returns
-------
If type casting is allowed, returns the successful casting type. (First one
if there are multiple accepted types) If type casting is not allowed, the
return variable is not useful.
"""
# No type requirements
if arg_type is None or arg_type == '':
return
# Check that None is allowed if the arg is still None
elif arg is None:
assert 'none' in arg_type, f"{name} cannot be None"
return # arg is okay, no further checking needed
type_casting_ok = 'tcast' in arg_type
output_type_handle = None
is_sequence = False
# Check list types
if 'list' in arg_type or 'tuple' in arg_type:
is_sequence = True
# For either lists or tuples, assert that all elements are a valid type
assert isinstance(arg, (list, tuple))
if isinstance(arg, list):
assert 'list' in arg_type
elif isinstance(arg, tuple):
assert 'tuple' in arg_type
output_type_handle = []
sequence_arg_type = \
arg_type.replace('list','').replace('tuple', '').strip('_- ')
for element in arg:
# Check each element
output_type_handle.append(
_assert_types(
element, name=name, arg_type=sequence_arg_type)
)
# Check numeric types
elif 'int' in arg_type and 'float' in arg_type:
# int or float allowed
# The order is set by which one comes first
int_idx = arg_type.index('int')
float_idx = arg_type.index('float')
handles = (int, float) if int_idx < float_idx else (float, int)
output_type_handle = _generic_assert_type(
arg, name, handles, 'float or int', type_casting_ok)
elif 'int' in arg_type:
output_type_handle = _generic_assert_type(
arg, name, int, 'int', type_casting_ok)
elif 'float' in arg_type:
output_type_handle = _generic_assert_type(
arg, name, float, 'float', type_casting_ok)
# Check other types
elif 'str' in arg_type:
output_type_handle = _generic_assert_type(
arg, name, str, 'string', type_casting_ok)
elif 'bool' in arg_type:
output_type_handle = _generic_assert_type(
arg, name, bool, 'boolean', type_casting_ok)
# Unknown type requirement
else:
print(f"Unknown arg type!")
print(f"arg={arg}, name={name}, arg_type={arg_type}")
raise NotImplementedError
# Check numeric sign
if 'int' in arg_type or 'float' in arg_type:
# Check sign
if 'pos' in arg_type or 'counting' in arg_type:
assert arg > 0, f"{name} must be greater than zero ({arg})"
elif 'whole' in arg_type:
assert arg >= 0, f"{name} must be greater or equal to zero ({arg})"
elif 'neg' in arg_type:
assert arg < 0, f"{name} must be less than zero ({arg})"
else:
pass # No sign requirements
# Assertions all passed. Return the output type handle.
# This will be useful only if type casting is allowed.
return output_type_handle if type_casting_ok else None
class KwargChecker:
""" Simple kwarg checking class. Better ones almost certainly exist
elsewhere, but this was easy to make and does exactly what I need."""
def __init__(self, kwargs):
self.kwargs = kwargs
def kwarg_check(self, name, default=None):
if name in self.kwargs:
return self.kwargs[name]
else:
return default
def check_add_kwarg(self, name, default=None, arg_type=None, force=False):
return check_add_kwarg(self.kwargs, name,
default=default, arg_type=arg_type, force=force)
def check_kwarg(self, name, default=None, arg_type=None, required=False, pop=False):
return check_kwarg(self.kwargs, name,
default=default, arg_type=arg_type,
required=required, pop=pop)
| def check_kwarg(kwargs, name, default=None, arg_type=None, required=False, pop=False):
""" Simple function for checking a kwarg. Useful if you don't want to
create a new object to check a kwarg or two. Pop=True will remove the
kwarg entry from kwargs if found. """
if required:
assert name in kwargs, '\n'.join(['', 40 * '#', f'## {name} not in kwargs', f'## kwargs has {kwargs.keys()}', 40 * '#', ''])
out = default
if name in kwargs:
out = kwargs.pop(name) if pop else kwargs[name]
type_handle = _assert_types(out, name=name, arg_type=arg_type)
if type_handle is None:
return out
elif isinstance(type_handle, (list, tuple)):
return [th(element) for (th, element) in zip(type_handle, out)]
else:
return type_handle(out)
def get_check_kwarg_fu(function_kwargs, pop=False):
""" Create a simple function for checking kwargs. Useful if you don't
need long term storage of KwargChecker and find supplying kwargs to
check_kwarg as an argument annoying. Pop will pop entries out of the
kwargs list if found. """
def fu(name, default=None, arg_type=None, required=False):
return check_kwarg(function_kwargs, name, default=default, arg_type=arg_type, required=required, pop=pop)
return fu
def check_add_kwarg(kwargs, name, default=None, arg_type=None, force=False):
""" Simple function for checking if a name is in kwargs and adding a
default value if it isn't. If force is True, it will overwrite an
existing value with default. It will also return the existing or default
value.
"""
if name not in kwargs or force:
kwargs[name] = default
out = kwargs[name]
type_handle = _assert_types(out, name=name, arg_type=arg_type)
if type_handle is None:
return out
elif isinstance(type_handle, (list, tuple)):
return [th(element) for (th, element) in zip(type_handle, out)]
else:
return type_handle(out)
def get_check_add_kwarg_fu(function_kwargs):
""" Create a simple function for checking and adding kwargs. """
def fu(name, default=None, arg_type=None, force=False):
return check_add_kwarg(function_kwargs, name, default=default, arg_type=arg_type, force=force)
return fu
def _generic_assert_type(arg, arg_name, type_handle, type_name, type_casting_ok):
"""Assert if the arg is of type(s) type_handle or, if type_casting_ok is
True, assert if the arg can be cast to any of type_handle.
Parameters
----------
arg :
The variable being checked.
arg_name : string
The name of the variable used for the error message.
type_handle :
The handle for the variable type desired. Can be a single handle (e.g.
type_handle=int) or a sequence of handles (e.g. type_handle=(int,
float)).
type_name :
The name of the type(s) for the error message. (e.g. 'int or float')
type_casting_ok:
Indicates whether type casting is allowed. However, the function only
checks that it is possible. **The function does not actually recast the
variable.**
Returns
-------
type_handle :
The returned type handle will be the same as the input type_handle
unless type_casting_ok is True and there are multiple accepted types.
If so, the return handle will be the first successful type to cast the
variable.
"""
error_message = f'{arg_name} ({type(arg)}) must be of type {type_name}'
output_type_handle = type_handle
try:
assert isinstance(arg, type_handle), error_message
except AssertionError as wrong_type_error:
if not type_casting_ok:
raise wrong_type_error
if isinstance(type_handle, (tuple, list)):
for th in type_handle:
try:
assert isinstance(th(arg), th)
output_type_handle = th
break
except:
pass
else:
raise wrong_type_error
else:
try:
assert isinstance(type_handle(arg), type_handle)
except (AssertionError, ValueError, TypeError):
raise wrong_type_error
return output_type_handle
def _assert_types(arg, name='arg', arg_type=None):
"""Assert that arg is the correct type, if applicable.
Parameters
----------
arg :
The variable to be checked.
name :
The name of the arg to be used for error messages.
arg_type :
A string representing the accepted type or types for the variable.
Currently handles the basic types: 'list', 'tuple', 'int', 'float',
'str', and 'bool'). Can specify extra qualifiers too. Multiple
types and qualifiers can be present in the string. Order only matters
if checking casting between both int and float(e.g. 'int-float' vs.
'float-int'), where the first ones are given preference.
Extra qualifiers:
'none' = Allows the arg to be None even if something else was specified
'tcast' =
If the var does not match the provided type(s), allows the program
to check if the variable can be cast to the desired type(s). 'pos',
'whole', 'neg' = Asserts an 'int' or 'float' variable is >0, >=0,
or <0, respectively.
Examples:
'' or None = No type specifications, check will unconditionally pass.
'float-none' = Check if the variable is a float or None.
'float-int-pos' = Check if variable is a positive (>0) float or int.
'int-whole-tcast' =
Check if variable is or can be cast to a whole (>=0) int.
Returns
-------
If type casting is allowed, returns the successful casting type. (First one
if there are multiple accepted types) If type casting is not allowed, the
return variable is not useful.
"""
if arg_type is None or arg_type == '':
return
elif arg is None:
assert 'none' in arg_type, f'{name} cannot be None'
return
type_casting_ok = 'tcast' in arg_type
output_type_handle = None
is_sequence = False
if 'list' in arg_type or 'tuple' in arg_type:
is_sequence = True
assert isinstance(arg, (list, tuple))
if isinstance(arg, list):
assert 'list' in arg_type
elif isinstance(arg, tuple):
assert 'tuple' in arg_type
output_type_handle = []
sequence_arg_type = arg_type.replace('list', '').replace('tuple', '').strip('_- ')
for element in arg:
output_type_handle.append(_assert_types(element, name=name, arg_type=sequence_arg_type))
elif 'int' in arg_type and 'float' in arg_type:
int_idx = arg_type.index('int')
float_idx = arg_type.index('float')
handles = (int, float) if int_idx < float_idx else (float, int)
output_type_handle = _generic_assert_type(arg, name, handles, 'float or int', type_casting_ok)
elif 'int' in arg_type:
output_type_handle = _generic_assert_type(arg, name, int, 'int', type_casting_ok)
elif 'float' in arg_type:
output_type_handle = _generic_assert_type(arg, name, float, 'float', type_casting_ok)
elif 'str' in arg_type:
output_type_handle = _generic_assert_type(arg, name, str, 'string', type_casting_ok)
elif 'bool' in arg_type:
output_type_handle = _generic_assert_type(arg, name, bool, 'boolean', type_casting_ok)
else:
print(f'Unknown arg type!')
print(f'arg={arg}, name={name}, arg_type={arg_type}')
raise NotImplementedError
if 'int' in arg_type or 'float' in arg_type:
if 'pos' in arg_type or 'counting' in arg_type:
assert arg > 0, f'{name} must be greater than zero ({arg})'
elif 'whole' in arg_type:
assert arg >= 0, f'{name} must be greater or equal to zero ({arg})'
elif 'neg' in arg_type:
assert arg < 0, f'{name} must be less than zero ({arg})'
else:
pass
return output_type_handle if type_casting_ok else None
class Kwargchecker:
""" Simple kwarg checking class. Better ones almost certainly exist
elsewhere, but this was easy to make and does exactly what I need."""
def __init__(self, kwargs):
self.kwargs = kwargs
def kwarg_check(self, name, default=None):
if name in self.kwargs:
return self.kwargs[name]
else:
return default
def check_add_kwarg(self, name, default=None, arg_type=None, force=False):
return check_add_kwarg(self.kwargs, name, default=default, arg_type=arg_type, force=force)
def check_kwarg(self, name, default=None, arg_type=None, required=False, pop=False):
return check_kwarg(self.kwargs, name, default=default, arg_type=arg_type, required=required, pop=pop) |
# Alexa skill
APPLICATION_ID: str = "amzn1.ask.skill.dd677950-cade-4805-b1f1-ce2e3a3569f0"
RESPONSE_VERSION: str = "1.0"
# Bible API
BIBLE_TRANSLATION = "GNBDC" # Can't use NIV - it's still in copyright
BIBLE_API_URL = f"https://bibles.org/v2/eng-{BIBLE_TRANSLATION}/passages.js"
# Bible Passages
BIBLE_PASSAGES_CSV_URL = ("https://docs.google.com/spreadsheets/d/e/2PACX-1vQqiE5BF"
"-VtKfaV9NtpwYqgT3Ijw5pRmfbg7mzIIMrV5huonrAYQPawIHzoqA-_fAsUgP4Bvcs6NgUk/pub?output=csv")
# Sermons
SERMONS_XML_URL = "http://www.christchurchmayfair.org/our-talks/podcast/"
SERMONS_XML_NAMESPACE = {
"ccm": "http://christchurchmayfair.org/",
"itunes": "http://www.itunes.com/dtds/podcast-1.0.dtd"
}
SERMONS_XML_SERVICE_NAMES = {"morning": "Morning Service", "evening": "Evening Service"}
# Alexa audio must be served from https endpoint
HTTP_MP3_TO_HTTPS_M3U_API_URL = ("https://0elu033c2a.execute-api.eu-west-1.amazonaws.com/prod/"
"m3uGenerator")
# Config for correction of AMAZON.Date defaulting to future date if year not given
FUTURE_DAYS_GO_BACK_YEAR_THRESHOLD_SERMONS = 30
FUTURE_DAYS_GO_BACK_YEAR_THRESHOLD_PASSAGES = 150
# See https://developer.amazon.com/docs/custom-skills/include-a-card-in-your-skills-response.html
MAX_CARD_CHARACTERS: int = 8000
# CCM Events
EVENTS_JSON_URL = "https://ccmayfair.churchsuite.co.uk/embed/calendar/json"
| application_id: str = 'amzn1.ask.skill.dd677950-cade-4805-b1f1-ce2e3a3569f0'
response_version: str = '1.0'
bible_translation = 'GNBDC'
bible_api_url = f'https://bibles.org/v2/eng-{BIBLE_TRANSLATION}/passages.js'
bible_passages_csv_url = 'https://docs.google.com/spreadsheets/d/e/2PACX-1vQqiE5BF-VtKfaV9NtpwYqgT3Ijw5pRmfbg7mzIIMrV5huonrAYQPawIHzoqA-_fAsUgP4Bvcs6NgUk/pub?output=csv'
sermons_xml_url = 'http://www.christchurchmayfair.org/our-talks/podcast/'
sermons_xml_namespace = {'ccm': 'http://christchurchmayfair.org/', 'itunes': 'http://www.itunes.com/dtds/podcast-1.0.dtd'}
sermons_xml_service_names = {'morning': 'Morning Service', 'evening': 'Evening Service'}
http_mp3_to_https_m3_u_api_url = 'https://0elu033c2a.execute-api.eu-west-1.amazonaws.com/prod/m3uGenerator'
future_days_go_back_year_threshold_sermons = 30
future_days_go_back_year_threshold_passages = 150
max_card_characters: int = 8000
events_json_url = 'https://ccmayfair.churchsuite.co.uk/embed/calendar/json' |
def sum_array(arr):
if arr == None:
return 0
if len(arr) == 0 or 1:
return 0
else:
x = max(arr)
y = min(arr)
arr.remove(x)
arr.remove(y)
return(sum(arr))
print(sum_array([1,2,3,4,4])) | def sum_array(arr):
if arr == None:
return 0
if len(arr) == 0 or 1:
return 0
else:
x = max(arr)
y = min(arr)
arr.remove(x)
arr.remove(y)
return sum(arr)
print(sum_array([1, 2, 3, 4, 4])) |
# ------------------------------------------------------------------------------
# Access to the CodeHawk Binary Analyzer Analysis Results
# Author: Henny Sipma
# ------------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2016-2020 Kestrel Technology LLC
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
# ------------------------------------------------------------------------------
class MIPSRegisterBase(object):
def __init__(self,bd,index,tags,args):
self.bd = bd
self.index = index
self.tags = tags
self.args = args
def is_mips_register(self): return False
def is_mips_stack_pointer(self): return False
def is_mips_argument_register(self): return False
def is_mips_special_register(self): return False
def is_mips_floating_point_register(self): return False
def get_key(self):
return (','.join(self.tags), ','.join([str(x) for x in self.args]))
# ------------------------------------------------------------------------------
# Regular MIPS Register
# ------------------------------------------------------------------------------
class MIPSRegister(MIPSRegisterBase):
def __init__(self,bd,index,tags,args):
MIPSRegisterBase.__init__(self,bd,index,tags,args)
def is_mips_register(self): return True
def is_mips_argument_register(self):
return self.tags[1] in [ 'a0', 'a1', 'a2', 'a3' ]
def is_mips_stack_pointer(self):
return self.tags[1] in [ 'sp' ]
def get_argument_index(self):
if self.is_mips_argument_register():
return int(self.tags[1][1:]) + 1
def __str__(self): return self.tags[1]
# ------------------------------------------------------------------------------
# Regular MIPS Special Register
# ------------------------------------------------------------------------------
class MIPSSpecialRegister(MIPSRegisterBase):
def __init__(self,bd,index,tags,args):
MIPSRegisterBase.__init__(self,bd,index,tags,args)
def is_mips_special_register(self): return True
def __str__(self): return self.tags[1]
# ------------------------------------------------------------------------------
# Regular MIPS Floating Point Register
# ------------------------------------------------------------------------------
class MIPSFloatingPointRegister(MIPSRegisterBase):
def __init__(self,bd,index,tags,args):
MIPSRegisterBase.__init__(self,bd,index,tags,args)
def is_mips_floating_point_register(self): return True
def get_register_index(self): return int(self.args[0])
def __str__(self): return '$f' + str(self.get_register_index())
| class Mipsregisterbase(object):
def __init__(self, bd, index, tags, args):
self.bd = bd
self.index = index
self.tags = tags
self.args = args
def is_mips_register(self):
return False
def is_mips_stack_pointer(self):
return False
def is_mips_argument_register(self):
return False
def is_mips_special_register(self):
return False
def is_mips_floating_point_register(self):
return False
def get_key(self):
return (','.join(self.tags), ','.join([str(x) for x in self.args]))
class Mipsregister(MIPSRegisterBase):
def __init__(self, bd, index, tags, args):
MIPSRegisterBase.__init__(self, bd, index, tags, args)
def is_mips_register(self):
return True
def is_mips_argument_register(self):
return self.tags[1] in ['a0', 'a1', 'a2', 'a3']
def is_mips_stack_pointer(self):
return self.tags[1] in ['sp']
def get_argument_index(self):
if self.is_mips_argument_register():
return int(self.tags[1][1:]) + 1
def __str__(self):
return self.tags[1]
class Mipsspecialregister(MIPSRegisterBase):
def __init__(self, bd, index, tags, args):
MIPSRegisterBase.__init__(self, bd, index, tags, args)
def is_mips_special_register(self):
return True
def __str__(self):
return self.tags[1]
class Mipsfloatingpointregister(MIPSRegisterBase):
def __init__(self, bd, index, tags, args):
MIPSRegisterBase.__init__(self, bd, index, tags, args)
def is_mips_floating_point_register(self):
return True
def get_register_index(self):
return int(self.args[0])
def __str__(self):
return '$f' + str(self.get_register_index()) |
class TemplateBindingExtension(MarkupExtension):
"""
Implements a markup extension that supports the binding between the value of a property in a template and the value of some other exposed property on the templated control.
TemplateBindingExtension()
TemplateBindingExtension(property: DependencyProperty)
"""
def ProvideValue(self,serviceProvider):
"""
ProvideValue(self: TemplateBindingExtension,serviceProvider: IServiceProvider) -> object
Returns an object that should be set as the value on the target object's
property for this markup extension. For
System.Windows.TemplateBindingExtension,this is an expression
(System.Windows.TemplateBindingExpression) that supports the binding.
serviceProvider: An object that can provide services for the markup extension. May be null in
this implementation.
Returns: The expression that supports the binding.
"""
pass
@staticmethod
def __new__(self,property=None):
"""
__new__(cls: type)
__new__(cls: type,property: DependencyProperty)
"""
pass
Converter=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets or sets the converter that interprets between source and target of a binding.
Get: Converter(self: TemplateBindingExtension) -> IValueConverter
Set: Converter(self: TemplateBindingExtension)=value
"""
ConverterParameter=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets or sets the parameter to pass to the converter.
Get: ConverterParameter(self: TemplateBindingExtension) -> object
Set: ConverterParameter(self: TemplateBindingExtension)=value
"""
Property=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Gets or sets the property being bound to.
Get: Property(self: TemplateBindingExtension) -> DependencyProperty
Set: Property(self: TemplateBindingExtension)=value
"""
| class Templatebindingextension(MarkupExtension):
"""
Implements a markup extension that supports the binding between the value of a property in a template and the value of some other exposed property on the templated control.
TemplateBindingExtension()
TemplateBindingExtension(property: DependencyProperty)
"""
def provide_value(self, serviceProvider):
"""
ProvideValue(self: TemplateBindingExtension,serviceProvider: IServiceProvider) -> object
Returns an object that should be set as the value on the target object's
property for this markup extension. For
System.Windows.TemplateBindingExtension,this is an expression
(System.Windows.TemplateBindingExpression) that supports the binding.
serviceProvider: An object that can provide services for the markup extension. May be null in
this implementation.
Returns: The expression that supports the binding.
"""
pass
@staticmethod
def __new__(self, property=None):
"""
__new__(cls: type)
__new__(cls: type,property: DependencyProperty)
"""
pass
converter = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Gets or sets the converter that interprets between source and target of a binding.\n\n\n\nGet: Converter(self: TemplateBindingExtension) -> IValueConverter\n\n\n\nSet: Converter(self: TemplateBindingExtension)=value\n\n'
converter_parameter = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Gets or sets the parameter to pass to the converter.\n\n\n\nGet: ConverterParameter(self: TemplateBindingExtension) -> object\n\n\n\nSet: ConverterParameter(self: TemplateBindingExtension)=value\n\n'
property = property(lambda self: object(), lambda self, v: None, lambda self: None)
'Gets or sets the property being bound to.\n\n\n\nGet: Property(self: TemplateBindingExtension) -> DependencyProperty\n\n\n\nSet: Property(self: TemplateBindingExtension)=value\n\n' |
def print_bigger_number(first, second):
if first > second:
print(first)
else:
print(second)
| def print_bigger_number(first, second):
if first > second:
print(first)
else:
print(second) |
def palindrome(number):
return number == number[::-1]
if __name__ == '__main__':
init = int(input())
number = init + 1
while not palindrome(str(number)):
number += 1
print(number - init) | def palindrome(number):
return number == number[::-1]
if __name__ == '__main__':
init = int(input())
number = init + 1
while not palindrome(str(number)):
number += 1
print(number - init) |
"""
Logforce request settings file
"""
USERNAME = ''
PASSWORD = ''
CLIENT_VERSION = '4.3.0.0'
URLS = {
'development':'',
'test':'',
'production':''
} | """
Logforce request settings file
"""
username = ''
password = ''
client_version = '4.3.0.0'
urls = {'development': '', 'test': '', 'production': ''} |
# bad practice: I/O inside the function
def say_hello():
name = input('enter a name: ')
print('hello ' + name)
# say_hello()
# best practice: No I/O in the function
def say_hello2(name):
msg = 'hello ' + name
msg += '\nPleased to meet you'
return msg
print(say_hello2('Ahmed'))
name1 = input('enter a name: ')
result = say_hello2(name1)
result += '\nWelcome to python II'
print(result)
| def say_hello():
name = input('enter a name: ')
print('hello ' + name)
def say_hello2(name):
msg = 'hello ' + name
msg += '\nPleased to meet you'
return msg
print(say_hello2('Ahmed'))
name1 = input('enter a name: ')
result = say_hello2(name1)
result += '\nWelcome to python II'
print(result) |
# All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: "ACGAATTCCG". When studying DNA, it is sometimes useful to identify repeated sequences within the DNA.
# Write a function to find all the 10-letter-long sequences (substrings) that occur more than once in a DNA molecule.
# Example:
# Input: s = "AAAAACCCCCAAAAACCCCCCAAAAAGGGTTT"
# Output: ["AAAAACCCCC", "CCCCCAAAAA"]
class Solution(object):
def findRepeatedDnaSequences(self, s):
"""
:type s: str
:rtype: List[str]
"""
if not s or len(s) == 1: return []
store = set()
res = set()
for i in range(len(s) - 9):
if s[i:i+10] in store:
res.add(s[i : i + 10])
store.add(s[i:i+10])
return list(res)
# Time: O(n)
# Space: O(n^2)
# Difficulty: medium | class Solution(object):
def find_repeated_dna_sequences(self, s):
"""
:type s: str
:rtype: List[str]
"""
if not s or len(s) == 1:
return []
store = set()
res = set()
for i in range(len(s) - 9):
if s[i:i + 10] in store:
res.add(s[i:i + 10])
store.add(s[i:i + 10])
return list(res) |
def main():
# Declare nucleotide variables [Adenine, Cytosine, Guanine, Thymine]
A = 0;
C = 0;
G = 0;
T = 0;
# Manage input file
input = open(r"C:\Users\lawht\Desktop\Github\ROSALIND\Bioinformatics Stronghold\(1) Counting DNA Nucleotides\Counting DNA Nucleotides\rosalind_dna.txt","r");
DNA_string = input.readline(); # take first line of input file for counting
# Take in input file of DNA string and count the number of each nucleotide
count_nucleotides(DNA_string, A, C, G, T);
input.close();
# INPUT:
# s = DNA string
# a,c,g,t = stored number of counted a,c,g,t
#
# OUTPUT:
# Four integers (separated by spaces) counting the respective number of times that the symbols 'A', 'C', 'G', and 'T' occur in s.
def count_nucleotides(s, a, c, g, t):
for n in s:
if n == 'A':
a+=1;
elif n == 'C':
c+=1;
elif n == 'G':
g+=1;
elif n == 'T':
t+=1;
else:
continue;
print(a,c,g,t);
return
# It is required in python to call manually main()
if __name__ == "__main__":
main(); | def main():
a = 0
c = 0
g = 0
t = 0
input = open('C:\\Users\\lawht\\Desktop\\Github\\ROSALIND\\Bioinformatics Stronghold\\(1) Counting DNA Nucleotides\\Counting DNA Nucleotides\\rosalind_dna.txt', 'r')
dna_string = input.readline()
count_nucleotides(DNA_string, A, C, G, T)
input.close()
def count_nucleotides(s, a, c, g, t):
for n in s:
if n == 'A':
a += 1
elif n == 'C':
c += 1
elif n == 'G':
g += 1
elif n == 'T':
t += 1
else:
continue
print(a, c, g, t)
return
if __name__ == '__main__':
main() |
def get_template_filter():
return example_filter2
def example_filter2(string):
return "Example2: " + string
| def get_template_filter():
return example_filter2
def example_filter2(string):
return 'Example2: ' + string |
### Migratory Birds - Solution
def migratoryBirds(type_nums):
count = [0] * len(type_nums)
for i in type_nums:
count[i] += 1
min_id = count.index(max(count))
print(min_id)
birds = int(input())
type_nums = tuple(map(int, input().split()[:birds]))
migratoryBirds(type_nums) | def migratory_birds(type_nums):
count = [0] * len(type_nums)
for i in type_nums:
count[i] += 1
min_id = count.index(max(count))
print(min_id)
birds = int(input())
type_nums = tuple(map(int, input().split()[:birds]))
migratory_birds(type_nums) |
def transpose(matrix):
return map(list, zip(*matrix))
M = [[1,2,3], [4,5,6]]
print(transpose(M))
| def transpose(matrix):
return map(list, zip(*matrix))
m = [[1, 2, 3], [4, 5, 6]]
print(transpose(M)) |
class Node:
def __init__(self, data, parent):
self.data = data
self.parent = parent
self.right_node = None
self.left_node = None
class BinarySearchTree:
def __init__(self):
self.root = None
def remove(self, data):
if self.root:
self.remove_node(data, self.root)
def insert(self, data):
if self.root is None:
self.root = Node(data, None)
else:
self.insert_node(data, self.root)
def insert_node(self, data, node):
# we have to go to the left subtree
if data < node.data:
if node.left_node:
self.insert_node(data, node.left_node)
else:
node.left_node = Node(data, node)
# we have to visit the right subtree
else:
if node.right_node:
self.insert_node(data, node.right_node)
else:
node.right_node = Node(data, node)
def remove_node(self, data, node):
if node is None:
return
if data < node.data:
self.remove_node(data, node.left_node)
elif data > node.data:
self.remove_node(data, node.right_node)
else:
if node.left_node is None and node.right_node is None:
print("Removing a leaf node...%d" % node.data)
parent = node.parent
if parent is not None and parent.left_node == node:
parent.left_node = None
if parent is not None and parent.right_node == node:
parent.right_node = None
if parent is None:
self.root = None
del node
elif node.left_node is None and node.right_node is not None: # node !!!
print("Removing a node with single right child...")
parent = node.parent
if parent is not None:
if parent.left_node == node:
parent.left_node = node.left_node
if parent.rightChild == node:
parent.right_node = node.right_node
else:
self.root = node.right_node
node.right_node.parent = parent
del node
elif node.right_node is None and node.left_node is not None:
print("Removing a node with single left child...")
parent = node.parent
if parent is not None:
if parent.left_node == node:
parent.left_node = node.left_node
if parent.right_node == node:
parent.right_node = node.left_node
else:
self.root = node.left_node
node.left_node.parent = parent
del node
else:
print('Removing node with two children....')
predecessor = self.get_predecessor(node.left_node)
temp = predecessor.data
predecessor.data = node.data
node.data = temp
self.remove_node(data, predecessor)
def get_predecessor(self, node):
if node.right_node:
return self.get_predecessor(node.right_node)
return node
def traverse(self):
if self.root is not None:
self.traverse_in_order(self.root)
def traverse_in_order(self, node):
if node.left_node:
self.traverse_in_order(node.left_node)
print(node.data)
if node.right_node:
self.traverse_in_order(node.right_node)
if __name__ == '__main__':
bst = BinarySearchTree()
bst.insert(5)
bst.insert(3)
bst.insert(6)
bst.insert(1)
bst.remove(3)
bst.traverse()
| class Node:
def __init__(self, data, parent):
self.data = data
self.parent = parent
self.right_node = None
self.left_node = None
class Binarysearchtree:
def __init__(self):
self.root = None
def remove(self, data):
if self.root:
self.remove_node(data, self.root)
def insert(self, data):
if self.root is None:
self.root = node(data, None)
else:
self.insert_node(data, self.root)
def insert_node(self, data, node):
if data < node.data:
if node.left_node:
self.insert_node(data, node.left_node)
else:
node.left_node = node(data, node)
elif node.right_node:
self.insert_node(data, node.right_node)
else:
node.right_node = node(data, node)
def remove_node(self, data, node):
if node is None:
return
if data < node.data:
self.remove_node(data, node.left_node)
elif data > node.data:
self.remove_node(data, node.right_node)
elif node.left_node is None and node.right_node is None:
print('Removing a leaf node...%d' % node.data)
parent = node.parent
if parent is not None and parent.left_node == node:
parent.left_node = None
if parent is not None and parent.right_node == node:
parent.right_node = None
if parent is None:
self.root = None
del node
elif node.left_node is None and node.right_node is not None:
print('Removing a node with single right child...')
parent = node.parent
if parent is not None:
if parent.left_node == node:
parent.left_node = node.left_node
if parent.rightChild == node:
parent.right_node = node.right_node
else:
self.root = node.right_node
node.right_node.parent = parent
del node
elif node.right_node is None and node.left_node is not None:
print('Removing a node with single left child...')
parent = node.parent
if parent is not None:
if parent.left_node == node:
parent.left_node = node.left_node
if parent.right_node == node:
parent.right_node = node.left_node
else:
self.root = node.left_node
node.left_node.parent = parent
del node
else:
print('Removing node with two children....')
predecessor = self.get_predecessor(node.left_node)
temp = predecessor.data
predecessor.data = node.data
node.data = temp
self.remove_node(data, predecessor)
def get_predecessor(self, node):
if node.right_node:
return self.get_predecessor(node.right_node)
return node
def traverse(self):
if self.root is not None:
self.traverse_in_order(self.root)
def traverse_in_order(self, node):
if node.left_node:
self.traverse_in_order(node.left_node)
print(node.data)
if node.right_node:
self.traverse_in_order(node.right_node)
if __name__ == '__main__':
bst = binary_search_tree()
bst.insert(5)
bst.insert(3)
bst.insert(6)
bst.insert(1)
bst.remove(3)
bst.traverse() |
"""
Functions for easily setting up Tkinter window settings
Author: Marco P. L. Ribeiro
Date: June 2019
MIT License
Copyright (c) 2019 Marco P. L. Ribeiro
"""
def configure_window(master, title="Python Application", width=600, height=600, resizable=True, centred=True, bg=None):
'''Configure Tkinter GUI window
Parameters
----------
master : Tk object
title : str
Application title
width : int
Application width
height : int
Application height
resizable : bool
Allow resizing of application
centred : bool
Centre application on screen
bg : tkinter color string
Application background colour
'''
master.title(title)
if centred:
s_width = master.winfo_screenwidth()
s_height = master.winfo_screenheight()
x = (s_width - width)//2
y = (s_height - height)//2
master.geometry('%dx%d+%d+%d' % (width, height, x, y))
else:
master.geometry('{}x{}'.format(width, height))
if not resizable:
master.resizable(width=False, height=False)
if bg is not None:
master.configure(bg=bg)
| """
Functions for easily setting up Tkinter window settings
Author: Marco P. L. Ribeiro
Date: June 2019
MIT License
Copyright (c) 2019 Marco P. L. Ribeiro
"""
def configure_window(master, title='Python Application', width=600, height=600, resizable=True, centred=True, bg=None):
"""Configure Tkinter GUI window
Parameters
----------
master : Tk object
title : str
Application title
width : int
Application width
height : int
Application height
resizable : bool
Allow resizing of application
centred : bool
Centre application on screen
bg : tkinter color string
Application background colour
"""
master.title(title)
if centred:
s_width = master.winfo_screenwidth()
s_height = master.winfo_screenheight()
x = (s_width - width) // 2
y = (s_height - height) // 2
master.geometry('%dx%d+%d+%d' % (width, height, x, y))
else:
master.geometry('{}x{}'.format(width, height))
if not resizable:
master.resizable(width=False, height=False)
if bg is not None:
master.configure(bg=bg) |
# Copyright (c) 2016 Google Inc. (under http://www.apache.org/licenses/LICENSE-2.0)
# Test trailing comma after last arg
def h1(a:a1,) -> r1:
pass
def h2(a:a2,b:b2,) -> r2:
pass
def h3(a:a3) -> r3:
pass
def h4(a:a4) -> r4:
pass
| def h1(a: a1) -> r1:
pass
def h2(a: a2, b: b2) -> r2:
pass
def h3(a: a3) -> r3:
pass
def h4(a: a4) -> r4:
pass |
"""Helper structure to set default config""" # pylint: disable=line-too-long
default_config = [
{
"arg": "--cooldown",
"type": int,
"default": 1440, # A day
"dest": "minutes_between_trades",
"help": "It determine the amount of minutes that the trader should wait between trades of the same symbol",
},
{
"arg": "--sleep",
"type": int,
"default": 35,
"dest": "sleep_between_calls",
"help": "Time in seconds to sleep between calls to the Binance API",
},
]
| """Helper structure to set default config"""
default_config = [{'arg': '--cooldown', 'type': int, 'default': 1440, 'dest': 'minutes_between_trades', 'help': 'It determine the amount of minutes that the trader should wait between trades of the same symbol'}, {'arg': '--sleep', 'type': int, 'default': 35, 'dest': 'sleep_between_calls', 'help': 'Time in seconds to sleep between calls to the Binance API'}] |
# Space: O(n)
# Time: O(n)
class Solution:
def coinChange(self, coins, amount):
dp = [amount + 1] * (amount + 1)
dp[0] = 0
for i in coins:
for j in range(len(dp)):
if j - i >= 0:
dp[j] = min(dp[j], dp[j - i] + 1)
return dp[amount] if dp[amount] != amount + 1 else -1
| class Solution:
def coin_change(self, coins, amount):
dp = [amount + 1] * (amount + 1)
dp[0] = 0
for i in coins:
for j in range(len(dp)):
if j - i >= 0:
dp[j] = min(dp[j], dp[j - i] + 1)
return dp[amount] if dp[amount] != amount + 1 else -1 |
class coordinate:
def __init__(self, x, y):
self.x = x
self.y = y
def distance(self, other_coordinate):
x_diff = (self.x - other_coordinate.x)**2
y_diff = (self.y - other_coordinate.y)**2
return (x_diff + y_diff)**0.5
if __name__ == "__main__":
Coord_1 = coordinate(3, 30)
Coord_2 = coordinate(4, 8)
# print(Coord_1.distance(Coord_2))
print(isinstance(Coord_2, coordinate)) | class Coordinate:
def __init__(self, x, y):
self.x = x
self.y = y
def distance(self, other_coordinate):
x_diff = (self.x - other_coordinate.x) ** 2
y_diff = (self.y - other_coordinate.y) ** 2
return (x_diff + y_diff) ** 0.5
if __name__ == '__main__':
coord_1 = coordinate(3, 30)
coord_2 = coordinate(4, 8)
print(isinstance(Coord_2, coordinate)) |
# Time: O(n); Space: O(n)
def fib(n):
memo = {}
if n == 0 or n == 1:
return n
if n not in memo:
memo[n] = fib(n - 1) + fib(n - 2)
return memo[n]
# Test cases:
print(fib(4))
| def fib(n):
memo = {}
if n == 0 or n == 1:
return n
if n not in memo:
memo[n] = fib(n - 1) + fib(n - 2)
return memo[n]
print(fib(4)) |
def get_size(nbytes, suffix="B"):
factor = 1024
for unit in ["", "K", "M", "G", "T", "P"]:
if nbytes < factor:
return f"{nbytes:.2f}{unit}{suffix}"
nbytes /= factor
# This shouldn't happen on real systems, but you can never be sure (2020, btw)
return f"{nbytes:.2f}{unit}{suffix}"
| def get_size(nbytes, suffix='B'):
factor = 1024
for unit in ['', 'K', 'M', 'G', 'T', 'P']:
if nbytes < factor:
return f'{nbytes:.2f}{unit}{suffix}'
nbytes /= factor
return f'{nbytes:.2f}{unit}{suffix}' |
class Enricher:
def __init__(self, connection=None):
self._connection = connection
async def enrich(self, post_ids):
return await self._connection.find_many(post_ids)
| class Enricher:
def __init__(self, connection=None):
self._connection = connection
async def enrich(self, post_ids):
return await self._connection.find_many(post_ids) |
def cycle(sequence):
dict={}
for i,j in enumerate(sequence):
if dict.get(j, -1)<0:
dict[j]=i
else:
return [dict[j], i] if not dict[j] else [dict[j], i-1]
return [] | def cycle(sequence):
dict = {}
for (i, j) in enumerate(sequence):
if dict.get(j, -1) < 0:
dict[j] = i
else:
return [dict[j], i] if not dict[j] else [dict[j], i - 1]
return [] |
A = int(input())
n = 1
while n ** 3 < A:
n += 1
print('YES' if n ** 3 == A else 'NO')
| a = int(input())
n = 1
while n ** 3 < A:
n += 1
print('YES' if n ** 3 == A else 'NO') |
"""
Push O(1) :Push Element To Top
Pop O(1) : POP Element From Top
get_max O(1) : Returns max Element from the stack
Peek O(1): Returns Top Element
Size O(1) : Returns Size of the stack
"""
class Stack:
def __init__(self):
self.items = []
self.itemmax=[]
self.top=0
def isEmpty(self):
return self.items == []
def push(self, item):
self.items.append(item)
if self.items[self.top-1] < item or self.top==0:
self.itemmax.append(item)
else:
self.itemmax.append(self.itemmax[self.top-1])
self.top=self.top+1
def pop(self):
self.top=self.top-1
self.itemmax.pop()
return self.items.pop()
def peek(self):
return self.items[self.top-1]
def size(self):
return len(self.items)
def get_max(self):
return self.itemmax[self.size()-1]
if __name__ == "__main__":
stack=Stack()
stack.push(10)
print("Pushed Element :",stack.peek())
print("Max Element :", stack.get_max())
stack.push(2)
print("Pushed Element :",stack.peek())
print("Max Element :", stack.get_max())
stack.push(50)
print("Pushed Element :",stack.peek())
print("Max Element :", stack.get_max())
stack.push(45)
print("Pushed Element :",stack.peek())
print("Max Element :", stack.get_max())
stack.push(30)
print("Pushed Element :",stack.peek())
print("Max Element :", stack.get_max())
#print(stack.itemmax)
#print(stack.items)
print("==========================")
while stack.size()!=0:
print("Max Element :", stack.get_max())
print("Poped Element :",stack.pop())
| """
Push O(1) :Push Element To Top
Pop O(1) : POP Element From Top
get_max O(1) : Returns max Element from the stack
Peek O(1): Returns Top Element
Size O(1) : Returns Size of the stack
"""
class Stack:
def __init__(self):
self.items = []
self.itemmax = []
self.top = 0
def is_empty(self):
return self.items == []
def push(self, item):
self.items.append(item)
if self.items[self.top - 1] < item or self.top == 0:
self.itemmax.append(item)
else:
self.itemmax.append(self.itemmax[self.top - 1])
self.top = self.top + 1
def pop(self):
self.top = self.top - 1
self.itemmax.pop()
return self.items.pop()
def peek(self):
return self.items[self.top - 1]
def size(self):
return len(self.items)
def get_max(self):
return self.itemmax[self.size() - 1]
if __name__ == '__main__':
stack = stack()
stack.push(10)
print('Pushed Element :', stack.peek())
print('Max Element :', stack.get_max())
stack.push(2)
print('Pushed Element :', stack.peek())
print('Max Element :', stack.get_max())
stack.push(50)
print('Pushed Element :', stack.peek())
print('Max Element :', stack.get_max())
stack.push(45)
print('Pushed Element :', stack.peek())
print('Max Element :', stack.get_max())
stack.push(30)
print('Pushed Element :', stack.peek())
print('Max Element :', stack.get_max())
print('==========================')
while stack.size() != 0:
print('Max Element :', stack.get_max())
print('Poped Element :', stack.pop()) |
tupla =(
'APRENDER', 'PROGRAMAR', 'LINGUAGEM', 'PYTHON', 'CURSO', 'GRATIS', 'ESTUDAR',
'PRATICAR', 'TRABALHAR', 'MERCADO', 'PROGRAMADOR', 'FUTURO'
)
for palavra in tupla:
print('Na palavra {} temos'.format(palavra), end=' ')
for letra in palavra:
if letra in 'AEIOU':
print('{}'.format(letra), end=' ')
print('')
| tupla = ('APRENDER', 'PROGRAMAR', 'LINGUAGEM', 'PYTHON', 'CURSO', 'GRATIS', 'ESTUDAR', 'PRATICAR', 'TRABALHAR', 'MERCADO', 'PROGRAMADOR', 'FUTURO')
for palavra in tupla:
print('Na palavra {} temos'.format(palavra), end=' ')
for letra in palavra:
if letra in 'AEIOU':
print('{}'.format(letra), end=' ')
print('') |
# Implement a macro folly_library() that the BUILD file can load.
load("@rules_cc//cc:defs.bzl", "cc_library")
# Ref: https://github.com/google/glog/blob/v0.5.0/bazel/glog.bzl
def expand_template_impl(ctx):
ctx.actions.expand_template(
template = ctx.file.template,
output = ctx.outputs.out,
substitutions = ctx.attr.substitutions,
)
expand_template = rule(
implementation = expand_template_impl,
attrs = {
"template": attr.label(mandatory = True, allow_single_file = True),
"substitutions": attr.string_dict(mandatory = True),
"out": attr.output(mandatory = True),
},
)
def dict_union(x, y):
z = {}
z.update(x)
z.update(y)
return z
def _val(predicate):
return "1" if predicate else "0"
def folly_library(
with_gflags = True,
with_jemalloc = False,
with_bz2 = False,
with_lzma = False,
with_lz4 = False,
with_zstd = False,
with_libiberty = False,
with_libunwind = False,
with_libdwarf = False,
with_libaio = False,
with_liburing = False):
# Exclude tests, benchmarks, and other standalone utility executables from the
# library sources. Test sources are listed separately below.
common_excludes = [
"folly/build/**",
"folly/experimental/exception_tracer/**",
"folly/experimental/pushmi/**",
"folly/futures/exercises/**",
"folly/logging/example/**",
"folly/test/**",
"folly/**/test/**",
"folly/tools/**",
]
hdrs = native.glob(["folly/**/*.h"], exclude = common_excludes + [
"folly/python/fibers.h",
"folly/python/GILAwareManualExecutor.h",
])
srcs = native.glob(["folly/**/*.cpp"], exclude = common_excludes + [
"folly/**/*Benchmark.cpp",
"folly/**/*Test.cpp",
"folly/experimental/JSONSchemaTester.cpp",
"folly/experimental/io/HugePageUtil.cpp",
"folly/python/fibers.cpp",
"folly/python/GILAwareManualExecutor.cpp",
"folly/cybld/folly/executor.cpp",
])
# Explicitly include utility library code from inside
# test subdirs
hdrs = hdrs + [
"folly/container/test/F14TestUtil.h",
"folly/container/test/TrackingTypes.h",
"folly/io/async/test/AsyncSSLSocketTest.h",
"folly/io/async/test/AsyncSocketTest.h",
"folly/io/async/test/AsyncSocketTest2.h",
"folly/io/async/test/BlockingSocket.h",
"folly/io/async/test/MockAsyncSocket.h",
"folly/io/async/test/MockAsyncServerSocket.h",
"folly/io/async/test/MockAsyncSSLSocket.h",
"folly/io/async/test/MockAsyncTransport.h",
"folly/io/async/test/MockAsyncUDPSocket.h",
"folly/io/async/test/MockTimeoutManager.h",
"folly/io/async/test/ScopedBoundPort.h",
"folly/io/async/test/SocketPair.h",
"folly/io/async/test/TestSSLServer.h",
"folly/io/async/test/TimeUtil.h",
"folly/io/async/test/UndelayedDestruction.h",
"folly/io/async/test/Util.h",
"folly/synchronization/test/Semaphore.h",
"folly/test/DeterministicSchedule.h",
"folly/test/JsonTestUtil.h",
"folly/test/TestUtils.h",
]
srcs = srcs + [
"folly/io/async/test/ScopedBoundPort.cpp",
"folly/io/async/test/SocketPair.cpp",
"folly/io/async/test/TimeUtil.cpp",
]
# Exclude specific sources if we do not have third-party libraries
# required to build them
common_excludes = []
# NOTE(storypku): hardcode with_libsodium to False for now
hdrs_excludes = [
"folly/experimental/crypto/Blake2xb.h",
"folly/experimental/crypto/detail/LtHashInternal.h",
"folly/experimental/crypto/LtHash-inl.h",
"folly/experimental/crypto/LtHash.h",
]
srcs_excludes = [
"folly/experimental/crypto/Blake2xb.cpp",
"folly/experimental/crypto/detail/MathOperation_AVX2.cpp",
"folly/experimental/crypto/detail/MathOperation_Simple.cpp",
"folly/experimental/crypto/detail/MathOperation_SSE2.cpp",
"folly/experimental/crypto/LtHash.cpp",
]
# Excerpt from <TOP-DIR>/CMake/folly-deps.cmake
# check_function_exists(backtrace FOLLY_HAVE_BACKTRACE)
# if (FOLLY_HAVE_ELF_H AND FOLLY_HAVE_BACKTRACE AND LIBDWARF_FOUND)
# set(FOLLY_USE_SYMBOLIZER ON)
# Question: with_libdwarf is equivalent to use_symbolizer ?
if with_libdwarf == False:
common_excludes = common_excludes + [
"folly/experimental/symbolizer/**",
]
srcs_excludes = srcs_excludes + [
"folly/SingletonStackTrace.cpp",
]
if with_libaio == False:
hdrs_excludes = hdrs_excludes + [
"folly/experimental/io/AsyncIO.h",
]
srcs_excludes = srcs_excludes + [
"folly/experimental/io/AsyncIO.cpp",
]
if with_liburing == False:
hdrs_excludes = hdrs_excludes + [
"folly/experimental/io/IoUring.h",
]
srcs_excludes = srcs_excludes + [
"folly/experimental/io/IoUring.cpp",
]
if with_libaio == False and with_liburing == False:
hdrs_excludes = hdrs_excludes + [
"folly/experimental/io/AsyncBase.h",
]
srcs_excludes = srcs_excludes + [
"folly/experimental/io/AsyncBase.cpp",
]
common_defs = {
"@FOLLY_HAVE_PTHREAD@": "1",
"@FOLLY_HAVE_PTHREAD_ATFORK@": "1",
"@FOLLY_HAVE_MEMRCHR@": "1",
"@FOLLY_HAVE_ACCEPT4@": "1",
"@FOLLY_HAVE_PREADV@": "1",
"@FOLLY_HAVE_PWRITEV@": "1",
"@FOLLY_HAVE_CLOCK_GETTIME@": "1",
"@FOLLY_HAVE_PIPE2@": "1",
"@FOLLY_HAVE_SENDMMSG@": "1",
"@FOLLY_HAVE_RECVMMSG@": "1",
"@FOLLY_HAVE_OPENSSL_ASN1_TIME_DIFF@": "1",
"@FOLLY_HAVE_IFUNC@": "1",
"@FOLLY_HAVE_STD__IS_TRIVIALLY_COPYABLE@": "1",
"@FOLLY_HAVE_UNALIGNED_ACCESS@": "1",
"@FOLLY_HAVE_VLA@": "1",
"@FOLLY_HAVE_WEAK_SYMBOLS@": "1",
"@FOLLY_HAVE_LINUX_VDSO@": "1",
"@FOLLY_HAVE_MALLOC_USABLE_SIZE@": "1",
"@FOLLY_HAVE_INT128_T@": "1",
"@FOLLY_SUPPLY_MISSING_INT128_TRAITS@": "0",
"@FOLLY_HAVE_WCHAR_SUPPORT@": "1",
"@HAVE_VSNPRINTF_ERRORS@": "1",
"@FOLLY_HAVE_SHADOW_LOCAL_WARNINGS@": "1",
"@FOLLY_SUPPORT_SHARED_LIBRARY@": "1",
}
# Note(storypku):
# FOLLY_HAVE_EXTRANDOM_SFMT19937 will make <ext/random> included, causing error:
# /usr/include/aarch64-linux-gnu/c++/7.5.0/ext/opt_random.h:81:13: error: unknown type name '__Uint32x4_t
total_defs = dict_union(common_defs, {
"@FOLLY_USE_LIBSTDCPP@": "1",
"@FOLLY_USE_LIBCPP@": "0",
"@FOLLY_HAVE_EXTRANDOM_SFMT19937@": "0",
"@FOLLY_LIBRARY_SANITIZE_ADDRESS@": "0",
"@FOLLY_HAVE_LIBSNAPPY@": "1",
"@FOLLY_HAVE_LIBZ@": "1",
"@FOLLY_GFLAGS_NAMESPACE@": "gflags",
"@FOLLY_HAVE_LIBGLOG@": "1",
"@FOLLY_UNUSUAL_GFLAGS_NAMESPACE@": "0",
"@FOLLY_HAVE_LIBGFLAGS@": _val(with_gflags),
"@FOLLY_USE_JEMALLOC@": _val(with_jemalloc),
"@FOLLY_USE_SYMBOLIZER@": _val(with_libdwarf),
"@FOLLY_HAVE_LIBLZ4@": _val(with_lz4),
"@FOLLY_HAVE_LIBLZMA@": _val(with_lzma),
"@FOLLY_HAVE_LIBZSTD@": _val(with_zstd),
"@FOLLY_HAVE_LIBBZ2@": _val(with_bz2),
})
native.genrule(
name = "folly_config_in_h",
srcs = [
"CMake/folly-config.h.cmake",
],
outs = [
"folly/folly-config.h.in",
],
cmd = "$(location @rules_folly//bazel:generate_config_in.sh) < $< > $@",
tools = ["@rules_folly//bazel:generate_config_in.sh"],
)
expand_template(
name = "folly_config_h_unstripped",
template = "folly/folly-config.h.in",
out = "folly/folly-config.h.unstripped",
substitutions = total_defs,
)
native.genrule(
name = "folly_config_h",
srcs = [
"folly/folly-config.h.unstripped",
],
outs = [
"folly/folly-config.h",
],
cmd = "$(location @rules_folly//bazel:strip_config_h.sh) < $< > $@",
tools = ["@rules_folly//bazel:strip_config_h.sh"],
)
# CHECK_CXX_COMPILER_FLAG(-mpclmul COMPILER_HAS_M_PCLMUL)
cc_library(
name = "folly",
hdrs = ["folly_config_h"] +
native.glob(hdrs, exclude = common_excludes + hdrs_excludes),
srcs = native.glob(srcs, exclude = common_excludes + srcs_excludes),
copts = [
"-fPIC",
"-faligned-new",
"-fopenmp",
"-Wall",
"-Wno-deprecated",
"-Wno-deprecated-declarations",
"-Wno-sign-compare",
"-Wno-unused",
"-Wunused-label",
"-Wunused-result",
"-Wshadow-compatible-local",
"-Wno-noexcept-type",
"-std=gnu++14",
] + select({
":linux_x86_64": ["-mpclmul"],
"//conditions:default": [],
}),
includes = ["."],
linkopts = [
"-pthread",
"-ldl",
],
# Ref: https://docs.bazel.build/versions/main/be/c-cpp.html#cc_library.linkstatic
linkstatic = True,
visibility = ["//visibility:public"],
deps = [
"@boost//:algorithm",
"@boost//:config",
"@boost//:container",
"@boost//:context",
"@boost//:conversion",
"@boost//:crc",
"@boost//:filesystem",
"@boost//:intrusive",
"@boost//:iterator",
"@boost//:multi_index",
"@boost//:operators",
"@boost//:program_options",
"@boost//:regex",
"@boost//:type_traits",
"@boost//:utility",
"@boost//:variant",
"@com_github_gflags_gflags//:gflags",
"@com_github_google_glog//:glog",
"@com_github_google_snappy//:snappy",
"@com_github_libevent_libevent//:libevent",
"@double-conversion//:double-conversion",
"@openssl//:ssl",
],
)
| load('@rules_cc//cc:defs.bzl', 'cc_library')
def expand_template_impl(ctx):
ctx.actions.expand_template(template=ctx.file.template, output=ctx.outputs.out, substitutions=ctx.attr.substitutions)
expand_template = rule(implementation=expand_template_impl, attrs={'template': attr.label(mandatory=True, allow_single_file=True), 'substitutions': attr.string_dict(mandatory=True), 'out': attr.output(mandatory=True)})
def dict_union(x, y):
z = {}
z.update(x)
z.update(y)
return z
def _val(predicate):
return '1' if predicate else '0'
def folly_library(with_gflags=True, with_jemalloc=False, with_bz2=False, with_lzma=False, with_lz4=False, with_zstd=False, with_libiberty=False, with_libunwind=False, with_libdwarf=False, with_libaio=False, with_liburing=False):
common_excludes = ['folly/build/**', 'folly/experimental/exception_tracer/**', 'folly/experimental/pushmi/**', 'folly/futures/exercises/**', 'folly/logging/example/**', 'folly/test/**', 'folly/**/test/**', 'folly/tools/**']
hdrs = native.glob(['folly/**/*.h'], exclude=common_excludes + ['folly/python/fibers.h', 'folly/python/GILAwareManualExecutor.h'])
srcs = native.glob(['folly/**/*.cpp'], exclude=common_excludes + ['folly/**/*Benchmark.cpp', 'folly/**/*Test.cpp', 'folly/experimental/JSONSchemaTester.cpp', 'folly/experimental/io/HugePageUtil.cpp', 'folly/python/fibers.cpp', 'folly/python/GILAwareManualExecutor.cpp', 'folly/cybld/folly/executor.cpp'])
hdrs = hdrs + ['folly/container/test/F14TestUtil.h', 'folly/container/test/TrackingTypes.h', 'folly/io/async/test/AsyncSSLSocketTest.h', 'folly/io/async/test/AsyncSocketTest.h', 'folly/io/async/test/AsyncSocketTest2.h', 'folly/io/async/test/BlockingSocket.h', 'folly/io/async/test/MockAsyncSocket.h', 'folly/io/async/test/MockAsyncServerSocket.h', 'folly/io/async/test/MockAsyncSSLSocket.h', 'folly/io/async/test/MockAsyncTransport.h', 'folly/io/async/test/MockAsyncUDPSocket.h', 'folly/io/async/test/MockTimeoutManager.h', 'folly/io/async/test/ScopedBoundPort.h', 'folly/io/async/test/SocketPair.h', 'folly/io/async/test/TestSSLServer.h', 'folly/io/async/test/TimeUtil.h', 'folly/io/async/test/UndelayedDestruction.h', 'folly/io/async/test/Util.h', 'folly/synchronization/test/Semaphore.h', 'folly/test/DeterministicSchedule.h', 'folly/test/JsonTestUtil.h', 'folly/test/TestUtils.h']
srcs = srcs + ['folly/io/async/test/ScopedBoundPort.cpp', 'folly/io/async/test/SocketPair.cpp', 'folly/io/async/test/TimeUtil.cpp']
common_excludes = []
hdrs_excludes = ['folly/experimental/crypto/Blake2xb.h', 'folly/experimental/crypto/detail/LtHashInternal.h', 'folly/experimental/crypto/LtHash-inl.h', 'folly/experimental/crypto/LtHash.h']
srcs_excludes = ['folly/experimental/crypto/Blake2xb.cpp', 'folly/experimental/crypto/detail/MathOperation_AVX2.cpp', 'folly/experimental/crypto/detail/MathOperation_Simple.cpp', 'folly/experimental/crypto/detail/MathOperation_SSE2.cpp', 'folly/experimental/crypto/LtHash.cpp']
if with_libdwarf == False:
common_excludes = common_excludes + ['folly/experimental/symbolizer/**']
srcs_excludes = srcs_excludes + ['folly/SingletonStackTrace.cpp']
if with_libaio == False:
hdrs_excludes = hdrs_excludes + ['folly/experimental/io/AsyncIO.h']
srcs_excludes = srcs_excludes + ['folly/experimental/io/AsyncIO.cpp']
if with_liburing == False:
hdrs_excludes = hdrs_excludes + ['folly/experimental/io/IoUring.h']
srcs_excludes = srcs_excludes + ['folly/experimental/io/IoUring.cpp']
if with_libaio == False and with_liburing == False:
hdrs_excludes = hdrs_excludes + ['folly/experimental/io/AsyncBase.h']
srcs_excludes = srcs_excludes + ['folly/experimental/io/AsyncBase.cpp']
common_defs = {'@FOLLY_HAVE_PTHREAD@': '1', '@FOLLY_HAVE_PTHREAD_ATFORK@': '1', '@FOLLY_HAVE_MEMRCHR@': '1', '@FOLLY_HAVE_ACCEPT4@': '1', '@FOLLY_HAVE_PREADV@': '1', '@FOLLY_HAVE_PWRITEV@': '1', '@FOLLY_HAVE_CLOCK_GETTIME@': '1', '@FOLLY_HAVE_PIPE2@': '1', '@FOLLY_HAVE_SENDMMSG@': '1', '@FOLLY_HAVE_RECVMMSG@': '1', '@FOLLY_HAVE_OPENSSL_ASN1_TIME_DIFF@': '1', '@FOLLY_HAVE_IFUNC@': '1', '@FOLLY_HAVE_STD__IS_TRIVIALLY_COPYABLE@': '1', '@FOLLY_HAVE_UNALIGNED_ACCESS@': '1', '@FOLLY_HAVE_VLA@': '1', '@FOLLY_HAVE_WEAK_SYMBOLS@': '1', '@FOLLY_HAVE_LINUX_VDSO@': '1', '@FOLLY_HAVE_MALLOC_USABLE_SIZE@': '1', '@FOLLY_HAVE_INT128_T@': '1', '@FOLLY_SUPPLY_MISSING_INT128_TRAITS@': '0', '@FOLLY_HAVE_WCHAR_SUPPORT@': '1', '@HAVE_VSNPRINTF_ERRORS@': '1', '@FOLLY_HAVE_SHADOW_LOCAL_WARNINGS@': '1', '@FOLLY_SUPPORT_SHARED_LIBRARY@': '1'}
total_defs = dict_union(common_defs, {'@FOLLY_USE_LIBSTDCPP@': '1', '@FOLLY_USE_LIBCPP@': '0', '@FOLLY_HAVE_EXTRANDOM_SFMT19937@': '0', '@FOLLY_LIBRARY_SANITIZE_ADDRESS@': '0', '@FOLLY_HAVE_LIBSNAPPY@': '1', '@FOLLY_HAVE_LIBZ@': '1', '@FOLLY_GFLAGS_NAMESPACE@': 'gflags', '@FOLLY_HAVE_LIBGLOG@': '1', '@FOLLY_UNUSUAL_GFLAGS_NAMESPACE@': '0', '@FOLLY_HAVE_LIBGFLAGS@': _val(with_gflags), '@FOLLY_USE_JEMALLOC@': _val(with_jemalloc), '@FOLLY_USE_SYMBOLIZER@': _val(with_libdwarf), '@FOLLY_HAVE_LIBLZ4@': _val(with_lz4), '@FOLLY_HAVE_LIBLZMA@': _val(with_lzma), '@FOLLY_HAVE_LIBZSTD@': _val(with_zstd), '@FOLLY_HAVE_LIBBZ2@': _val(with_bz2)})
native.genrule(name='folly_config_in_h', srcs=['CMake/folly-config.h.cmake'], outs=['folly/folly-config.h.in'], cmd='$(location @rules_folly//bazel:generate_config_in.sh) < $< > $@', tools=['@rules_folly//bazel:generate_config_in.sh'])
expand_template(name='folly_config_h_unstripped', template='folly/folly-config.h.in', out='folly/folly-config.h.unstripped', substitutions=total_defs)
native.genrule(name='folly_config_h', srcs=['folly/folly-config.h.unstripped'], outs=['folly/folly-config.h'], cmd='$(location @rules_folly//bazel:strip_config_h.sh) < $< > $@', tools=['@rules_folly//bazel:strip_config_h.sh'])
cc_library(name='folly', hdrs=['folly_config_h'] + native.glob(hdrs, exclude=common_excludes + hdrs_excludes), srcs=native.glob(srcs, exclude=common_excludes + srcs_excludes), copts=['-fPIC', '-faligned-new', '-fopenmp', '-Wall', '-Wno-deprecated', '-Wno-deprecated-declarations', '-Wno-sign-compare', '-Wno-unused', '-Wunused-label', '-Wunused-result', '-Wshadow-compatible-local', '-Wno-noexcept-type', '-std=gnu++14'] + select({':linux_x86_64': ['-mpclmul'], '//conditions:default': []}), includes=['.'], linkopts=['-pthread', '-ldl'], linkstatic=True, visibility=['//visibility:public'], deps=['@boost//:algorithm', '@boost//:config', '@boost//:container', '@boost//:context', '@boost//:conversion', '@boost//:crc', '@boost//:filesystem', '@boost//:intrusive', '@boost//:iterator', '@boost//:multi_index', '@boost//:operators', '@boost//:program_options', '@boost//:regex', '@boost//:type_traits', '@boost//:utility', '@boost//:variant', '@com_github_gflags_gflags//:gflags', '@com_github_google_glog//:glog', '@com_github_google_snappy//:snappy', '@com_github_libevent_libevent//:libevent', '@double-conversion//:double-conversion', '@openssl//:ssl']) |
# Created by MechAviv
# Chinese Text Damage Skin (30 Day) | (2436741)
if sm.addDamageSkin(2436741):
sm.chat("'Chinese Text Damage Skin (30 Day)' Damage Skin has been added to your account's damage skin collection.")
sm.consumeItem() | if sm.addDamageSkin(2436741):
sm.chat("'Chinese Text Damage Skin (30 Day)' Damage Skin has been added to your account's damage skin collection.")
sm.consumeItem() |
def rumble(rate, intensity, duration):
__end_regular_rumble()
_["viewport"].rumble(rate, intensity, duration)
def regular_rumble(rate, intensity, duration, interval):
__end_regular_rumble()
def _rumble():
_["viewport"].rumble(rate, intensity, duration)
_["regular_rumble"] = _rumble
Driftwood.tick.register(_rumble, delay=interval)
def __end_regular_rumble():
if "regular_rumble" in Driftwood.vars:
Driftwood.tick.unregister(Driftwood.vars["regular_rumble"])
del Driftwood.vars["regular_rumble"]
def constant_rumble(rate, intensity):
__end_regular_rumble()
_["viewport"].rumble(rate, intensity, None)
def end_rumble():
__end_regular_rumble()
_["viewport"].end_rumble()
| def rumble(rate, intensity, duration):
__end_regular_rumble()
_['viewport'].rumble(rate, intensity, duration)
def regular_rumble(rate, intensity, duration, interval):
__end_regular_rumble()
def _rumble():
_['viewport'].rumble(rate, intensity, duration)
_['regular_rumble'] = _rumble
Driftwood.tick.register(_rumble, delay=interval)
def __end_regular_rumble():
if 'regular_rumble' in Driftwood.vars:
Driftwood.tick.unregister(Driftwood.vars['regular_rumble'])
del Driftwood.vars['regular_rumble']
def constant_rumble(rate, intensity):
__end_regular_rumble()
_['viewport'].rumble(rate, intensity, None)
def end_rumble():
__end_regular_rumble()
_['viewport'].end_rumble() |
def fuc() -> None:
return None
def fua() -> bool:
return True
def fub() -> bool:
return False
def fud() -> int:
return -1
def fue() -> str:
return ""
| def fuc() -> None:
return None
def fua() -> bool:
return True
def fub() -> bool:
return False
def fud() -> int:
return -1
def fue() -> str:
return '' |
del_items(0x80121A34)
SetType(0x80121A34, "void PreGameOnlyTestRoutine__Fv()")
del_items(0x80123AF8)
SetType(0x80123AF8, "void DRLG_PlaceDoor__Fii(int x, int y)")
del_items(0x80123FCC)
SetType(0x80123FCC, "void DRLG_L1Shadows__Fv()")
del_items(0x801243E4)
SetType(0x801243E4, "int DRLG_PlaceMiniSet__FPCUciiiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int noquad, int ldir)")
del_items(0x80124850)
SetType(0x80124850, "void DRLG_L1Floor__Fv()")
del_items(0x8012493C)
SetType(0x8012493C, "void StoreBlock__FPiii(int *Bl, int xx, int yy)")
del_items(0x801249E8)
SetType(0x801249E8, "void DRLG_L1Pass3__Fv()")
del_items(0x80124B9C)
SetType(0x80124B9C, "void DRLG_LoadL1SP__Fv()")
del_items(0x80124C78)
SetType(0x80124C78, "void DRLG_FreeL1SP__Fv()")
del_items(0x80124CA8)
SetType(0x80124CA8, "void DRLG_Init_Globals__Fv()")
del_items(0x80124D4C)
SetType(0x80124D4C, "void set_restore_lighting__Fv()")
del_items(0x80124DDC)
SetType(0x80124DDC, "void DRLG_InitL1Vals__Fv()")
del_items(0x80124DE4)
SetType(0x80124DE4, "void LoadL1Dungeon__FPcii(char *sFileName, int vx, int vy)")
del_items(0x80124FB0)
SetType(0x80124FB0, "void LoadPreL1Dungeon__FPcii(char *sFileName, int vx, int vy)")
del_items(0x80125168)
SetType(0x80125168, "void InitL5Dungeon__Fv()")
del_items(0x801251C8)
SetType(0x801251C8, "void L5ClearFlags__Fv()")
del_items(0x80125214)
SetType(0x80125214, "void L5drawRoom__Fiiii(int x, int y, int w, int h)")
del_items(0x80125280)
SetType(0x80125280, "unsigned char L5checkRoom__Fiiii(int x, int y, int width, int height)")
del_items(0x80125314)
SetType(0x80125314, "void L5roomGen__Fiiiii(int x, int y, int w, int h, int dir)")
del_items(0x80125610)
SetType(0x80125610, "void L5firstRoom__Fv()")
del_items(0x801259CC)
SetType(0x801259CC, "long L5GetArea__Fv()")
del_items(0x80125A2C)
SetType(0x80125A2C, "void L5makeDungeon__Fv()")
del_items(0x80125AB8)
SetType(0x80125AB8, "void L5makeDmt__Fv()")
del_items(0x80125BA0)
SetType(0x80125BA0, "int L5HWallOk__Fii(int i, int j)")
del_items(0x80125CDC)
SetType(0x80125CDC, "int L5VWallOk__Fii(int i, int j)")
del_items(0x80125E28)
SetType(0x80125E28, "void L5HorizWall__Fiici(int i, int j, char p, int dx)")
del_items(0x80126068)
SetType(0x80126068, "void L5VertWall__Fiici(int i, int j, char p, int dy)")
del_items(0x8012629C)
SetType(0x8012629C, "void L5AddWall__Fv()")
del_items(0x8012650C)
SetType(0x8012650C, "void DRLG_L5GChamber__Fiiiiii(int sx, int sy, int topflag, int bottomflag, int leftflag, int rightflag)")
del_items(0x801267CC)
SetType(0x801267CC, "void DRLG_L5GHall__Fiiii(int x1, int y1, int x2, int y2)")
del_items(0x80126880)
SetType(0x80126880, "void L5tileFix__Fv()")
del_items(0x80127144)
SetType(0x80127144, "void DRLG_L5Subs__Fv()")
del_items(0x8012733C)
SetType(0x8012733C, "void DRLG_L5SetRoom__Fii(int rx1, int ry1)")
del_items(0x8012743C)
SetType(0x8012743C, "void L5FillChambers__Fv()")
del_items(0x80127B28)
SetType(0x80127B28, "void DRLG_L5FTVR__Fiiiii(int i, int j, int x, int y, int d)")
del_items(0x80128078)
SetType(0x80128078, "void DRLG_L5FloodTVal__Fv()")
del_items(0x8012817C)
SetType(0x8012817C, "void DRLG_L5TransFix__Fv()")
del_items(0x8012838C)
SetType(0x8012838C, "void DRLG_L5DirtFix__Fv()")
del_items(0x801284E8)
SetType(0x801284E8, "void DRLG_L5CornerFix__Fv()")
del_items(0x801285F8)
SetType(0x801285F8, "void DRLG_L5__Fi(int entry)")
del_items(0x80128B18)
SetType(0x80128B18, "void CreateL5Dungeon__FUii(unsigned int rseed, int entry)")
del_items(0x8012B0BC)
SetType(0x8012B0BC, "unsigned char DRLG_L2PlaceMiniSet__FPUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)")
del_items(0x8012B4B0)
SetType(0x8012B4B0, "void DRLG_L2PlaceRndSet__FPUci(unsigned char *miniset, int rndper)")
del_items(0x8012B7B0)
SetType(0x8012B7B0, "void DRLG_L2Subs__Fv()")
del_items(0x8012B9A4)
SetType(0x8012B9A4, "void DRLG_L2Shadows__Fv()")
del_items(0x8012BB68)
SetType(0x8012BB68, "void InitDungeon__Fv()")
del_items(0x8012BBC8)
SetType(0x8012BBC8, "void DRLG_LoadL2SP__Fv()")
del_items(0x8012BC68)
SetType(0x8012BC68, "void DRLG_FreeL2SP__Fv()")
del_items(0x8012BC98)
SetType(0x8012BC98, "void DRLG_L2SetRoom__Fii(int rx1, int ry1)")
del_items(0x8012BD98)
SetType(0x8012BD98, "void DefineRoom__Fiiiii(int nX1, int nY1, int nX2, int nY2, int ForceHW)")
del_items(0x8012BFA4)
SetType(0x8012BFA4, "void CreateDoorType__Fii(int nX, int nY)")
del_items(0x8012C088)
SetType(0x8012C088, "void PlaceHallExt__Fii(int nX, int nY)")
del_items(0x8012C0C0)
SetType(0x8012C0C0, "void AddHall__Fiiiii(int nX1, int nY1, int nX2, int nY2, int nHd)")
del_items(0x8012C198)
SetType(0x8012C198, "void CreateRoom__Fiiiiiiiii(int nX1, int nY1, int nX2, int nY2, int nRDest, int nHDir, int ForceHW, int nH, int nW)")
del_items(0x8012C820)
SetType(0x8012C820, "void GetHall__FPiN40(int *nX1, int *nY1, int *nX2, int *nY2, int *nHd)")
del_items(0x8012C8B8)
SetType(0x8012C8B8, "void ConnectHall__Fiiiii(int nX1, int nY1, int nX2, int nY2, int nHd)")
del_items(0x8012CF20)
SetType(0x8012CF20, "void DoPatternCheck__Fii(int i, int j)")
del_items(0x8012D1D4)
SetType(0x8012D1D4, "void L2TileFix__Fv()")
del_items(0x8012D2F8)
SetType(0x8012D2F8, "unsigned char DL2_Cont__FUcUcUcUc(unsigned char x1f, unsigned char y1f, unsigned char x2f, unsigned char y2f)")
del_items(0x8012D378)
SetType(0x8012D378, "int DL2_NumNoChar__Fv()")
del_items(0x8012D3D4)
SetType(0x8012D3D4, "void DL2_DrawRoom__Fiiii(int x1, int y1, int x2, int y2)")
del_items(0x8012D4D8)
SetType(0x8012D4D8, "void DL2_KnockWalls__Fiiii(int x1, int y1, int x2, int y2)")
del_items(0x8012D6A8)
SetType(0x8012D6A8, "unsigned char DL2_FillVoids__Fv()")
del_items(0x8012E02C)
SetType(0x8012E02C, "unsigned char CreateDungeon__Fv()")
del_items(0x8012E338)
SetType(0x8012E338, "void DRLG_L2Pass3__Fv()")
del_items(0x8012E4D0)
SetType(0x8012E4D0, "void DRLG_L2FTVR__Fiiiii(int i, int j, int x, int y, int d)")
del_items(0x8012EA18)
SetType(0x8012EA18, "void DRLG_L2FloodTVal__Fv()")
del_items(0x8012EB1C)
SetType(0x8012EB1C, "void DRLG_L2TransFix__Fv()")
del_items(0x8012ED2C)
SetType(0x8012ED2C, "void L2DirtFix__Fv()")
del_items(0x8012EE8C)
SetType(0x8012EE8C, "void L2LockoutFix__Fv()")
del_items(0x8012F218)
SetType(0x8012F218, "void L2DoorFix__Fv()")
del_items(0x8012F2C8)
SetType(0x8012F2C8, "void DRLG_L2__Fi(int entry)")
del_items(0x8012FD14)
SetType(0x8012FD14, "void DRLG_InitL2Vals__Fv()")
del_items(0x8012FD1C)
SetType(0x8012FD1C, "void LoadL2Dungeon__FPcii(char *sFileName, int vx, int vy)")
del_items(0x8012FF0C)
SetType(0x8012FF0C, "void LoadPreL2Dungeon__FPcii(char *sFileName, int vx, int vy)")
del_items(0x801300F8)
SetType(0x801300F8, "void CreateL2Dungeon__FUii(unsigned int rseed, int entry)")
del_items(0x80130AB0)
SetType(0x80130AB0, "void InitL3Dungeon__Fv()")
del_items(0x80130B38)
SetType(0x80130B38, "int DRLG_L3FillRoom__Fiiii(int x1, int y1, int x2, int y2)")
del_items(0x80130D94)
SetType(0x80130D94, "void DRLG_L3CreateBlock__Fiiii(int x, int y, int obs, int dir)")
del_items(0x80131030)
SetType(0x80131030, "void DRLG_L3FloorArea__Fiiii(int x1, int y1, int x2, int y2)")
del_items(0x80131098)
SetType(0x80131098, "void DRLG_L3FillDiags__Fv()")
del_items(0x801311C8)
SetType(0x801311C8, "void DRLG_L3FillSingles__Fv()")
del_items(0x80131294)
SetType(0x80131294, "void DRLG_L3FillStraights__Fv()")
del_items(0x80131658)
SetType(0x80131658, "void DRLG_L3Edges__Fv()")
del_items(0x80131698)
SetType(0x80131698, "int DRLG_L3GetFloorArea__Fv()")
del_items(0x801316E8)
SetType(0x801316E8, "void DRLG_L3MakeMegas__Fv()")
del_items(0x8013182C)
SetType(0x8013182C, "void DRLG_L3River__Fv()")
del_items(0x8013226C)
SetType(0x8013226C, "int DRLG_L3SpawnEdge__FiiPi(int x, int y, int *totarea)")
del_items(0x801324F8)
SetType(0x801324F8, "int DRLG_L3Spawn__FiiPi(int x, int y, int *totarea)")
del_items(0x8013270C)
SetType(0x8013270C, "void DRLG_L3Pool__Fv()")
del_items(0x80132960)
SetType(0x80132960, "void DRLG_L3PoolFix__Fv()")
del_items(0x80132A94)
SetType(0x80132A94, "int DRLG_L3PlaceMiniSet__FPCUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)")
del_items(0x80132E14)
SetType(0x80132E14, "void DRLG_L3PlaceRndSet__FPCUci(unsigned char *miniset, int rndper)")
del_items(0x8013315C)
SetType(0x8013315C, "unsigned char WoodVertU__Fii(int i, int y)")
del_items(0x80133208)
SetType(0x80133208, "unsigned char WoodVertD__Fii(int i, int y)")
del_items(0x801332A4)
SetType(0x801332A4, "unsigned char WoodHorizL__Fii(int x, int j)")
del_items(0x80133338)
SetType(0x80133338, "unsigned char WoodHorizR__Fii(int x, int j)")
del_items(0x801333BC)
SetType(0x801333BC, "void AddFenceDoors__Fv()")
del_items(0x801334A0)
SetType(0x801334A0, "void FenceDoorFix__Fv()")
del_items(0x80133694)
SetType(0x80133694, "void DRLG_L3Wood__Fv()")
del_items(0x80133E84)
SetType(0x80133E84, "int DRLG_L3Anvil__Fv()")
del_items(0x801340E0)
SetType(0x801340E0, "void FixL3Warp__Fv()")
del_items(0x801341C8)
SetType(0x801341C8, "void FixL3HallofHeroes__Fv()")
del_items(0x8013431C)
SetType(0x8013431C, "void DRLG_L3LockRec__Fii(int x, int y)")
del_items(0x801343B8)
SetType(0x801343B8, "unsigned char DRLG_L3Lockout__Fv()")
del_items(0x80134478)
SetType(0x80134478, "void DRLG_L3__Fi(int entry)")
del_items(0x80134B98)
SetType(0x80134B98, "void DRLG_L3Pass3__Fv()")
del_items(0x80134D3C)
SetType(0x80134D3C, "void CreateL3Dungeon__FUii(unsigned int rseed, int entry)")
del_items(0x80134E50)
SetType(0x80134E50, "void LoadL3Dungeon__FPcii(char *sFileName, int vx, int vy)")
del_items(0x80135074)
SetType(0x80135074, "void LoadPreL3Dungeon__FPcii(char *sFileName, int vx, int vy)")
del_items(0x80136EC0)
SetType(0x80136EC0, "void DRLG_L4Shadows__Fv()")
del_items(0x80136F84)
SetType(0x80136F84, "void InitL4Dungeon__Fv()")
del_items(0x80137020)
SetType(0x80137020, "void DRLG_LoadL4SP__Fv()")
del_items(0x801370C4)
SetType(0x801370C4, "void DRLG_FreeL4SP__Fv()")
del_items(0x801370EC)
SetType(0x801370EC, "void DRLG_L4SetSPRoom__Fii(int rx1, int ry1)")
del_items(0x801371EC)
SetType(0x801371EC, "void L4makeDmt__Fv()")
del_items(0x80137290)
SetType(0x80137290, "int L4HWallOk__Fii(int i, int j)")
del_items(0x801373E0)
SetType(0x801373E0, "int L4VWallOk__Fii(int i, int j)")
del_items(0x8013755C)
SetType(0x8013755C, "void L4HorizWall__Fiii(int i, int j, int dx)")
del_items(0x8013772C)
SetType(0x8013772C, "void L4VertWall__Fiii(int i, int j, int dy)")
del_items(0x801378F4)
SetType(0x801378F4, "void L4AddWall__Fv()")
del_items(0x80137DD4)
SetType(0x80137DD4, "void L4tileFix__Fv()")
del_items(0x80139FBC)
SetType(0x80139FBC, "void DRLG_L4Subs__Fv()")
del_items(0x8013A194)
SetType(0x8013A194, "void L4makeDungeon__Fv()")
del_items(0x8013A3CC)
SetType(0x8013A3CC, "void uShape__Fv()")
del_items(0x8013A670)
SetType(0x8013A670, "long GetArea__Fv()")
del_items(0x8013A6CC)
SetType(0x8013A6CC, "void L4drawRoom__Fiiii(int x, int y, int width, int height)")
del_items(0x8013A734)
SetType(0x8013A734, "unsigned char L4checkRoom__Fiiii(int x, int y, int width, int height)")
del_items(0x8013A7D0)
SetType(0x8013A7D0, "void L4roomGen__Fiiiii(int x, int y, int w, int h, int dir)")
del_items(0x8013AACC)
SetType(0x8013AACC, "void L4firstRoom__Fv()")
del_items(0x8013ACE8)
SetType(0x8013ACE8, "void L4SaveQuads__Fv()")
del_items(0x8013AD88)
SetType(0x8013AD88, "void DRLG_L4SetRoom__FPUcii(unsigned char *pSetPiece, int rx1, int ry1)")
del_items(0x8013AE5C)
SetType(0x8013AE5C, "void DRLG_LoadDiabQuads__FUc(unsigned char preflag)")
del_items(0x8013AFD4)
SetType(0x8013AFD4, "unsigned char DRLG_L4PlaceMiniSet__FPCUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)")
del_items(0x8013B3EC)
SetType(0x8013B3EC, "void DRLG_L4FTVR__Fiiiii(int i, int j, int x, int y, int d)")
del_items(0x8013B934)
SetType(0x8013B934, "void DRLG_L4FloodTVal__Fv()")
del_items(0x8013BA38)
SetType(0x8013BA38, "unsigned char IsDURWall__Fc(char d)")
del_items(0x8013BA68)
SetType(0x8013BA68, "unsigned char IsDLLWall__Fc(char dd)")
del_items(0x8013BA98)
SetType(0x8013BA98, "void DRLG_L4TransFix__Fv()")
del_items(0x8013BDF0)
SetType(0x8013BDF0, "void DRLG_L4Corners__Fv()")
del_items(0x8013BE84)
SetType(0x8013BE84, "void L4FixRim__Fv()")
del_items(0x8013BEC0)
SetType(0x8013BEC0, "void DRLG_L4GeneralFix__Fv()")
del_items(0x8013BF64)
SetType(0x8013BF64, "void DRLG_L4__Fi(int entry)")
del_items(0x8013C860)
SetType(0x8013C860, "void DRLG_L4Pass3__Fv()")
del_items(0x8013CA04)
SetType(0x8013CA04, "void CreateL4Dungeon__FUii(unsigned int rseed, int entry)")
del_items(0x8013CAE4)
SetType(0x8013CAE4, "int ObjIndex__Fii(int x, int y)")
del_items(0x8013CB98)
SetType(0x8013CB98, "void AddSKingObjs__Fv()")
del_items(0x8013CCC8)
SetType(0x8013CCC8, "void AddSChamObjs__Fv()")
del_items(0x8013CD44)
SetType(0x8013CD44, "void AddVileObjs__Fv()")
del_items(0x8013CDF0)
SetType(0x8013CDF0, "void DRLG_SetMapTrans__FPc(char *sFileName)")
del_items(0x8013CEB4)
SetType(0x8013CEB4, "void LoadSetMap__Fv()")
del_items(0x8013D1DC)
SetType(0x8013D1DC, "unsigned long CM_QuestToBitPattern__Fi(int QuestNum)")
del_items(0x8013D2B4)
SetType(0x8013D2B4, "void CM_ShowMonsterList__Fii(int Level, int List)")
del_items(0x8013D32C)
SetType(0x8013D32C, "int CM_ChooseMonsterList__FiUl(int Level, unsigned long QuestsNeededMask)")
del_items(0x8013D3CC)
SetType(0x8013D3CC, "int NoUiListChoose__FiUl(int Level, unsigned long QuestsNeededMask)")
del_items(0x8013D3D4)
SetType(0x8013D3D4, "void ChooseTask__FP4TASK(struct TASK *T)")
del_items(0x8013D4DC)
SetType(0x8013D4DC, "void ShowTask__FP4TASK(struct TASK *T)")
del_items(0x8013D70C)
SetType(0x8013D70C, "int GetListsAvailable__FiUlPUc(int Level, unsigned long QuestsNeededMask, unsigned char *ListofLists)")
del_items(0x8013D830)
SetType(0x8013D830, "unsigned short GetDown__C4CPad(struct CPad *this)")
del_items(0x8013D858)
SetType(0x8013D858, "void AddL1Door__Fiiii(int i, int x, int y, int ot)")
del_items(0x8013D990)
SetType(0x8013D990, "void AddSCambBook__Fi(int i)")
del_items(0x8013DA30)
SetType(0x8013DA30, "void AddChest__Fii(int i, int t)")
del_items(0x8013DC10)
SetType(0x8013DC10, "void AddL2Door__Fiiii(int i, int x, int y, int ot)")
del_items(0x8013DD5C)
SetType(0x8013DD5C, "void AddL3Door__Fiiii(int i, int x, int y, int ot)")
del_items(0x8013DDF0)
SetType(0x8013DDF0, "void AddSarc__Fi(int i)")
del_items(0x8013DECC)
SetType(0x8013DECC, "void AddFlameTrap__Fi(int i)")
del_items(0x8013DF28)
SetType(0x8013DF28, "void AddTrap__Fii(int i, int ot)")
del_items(0x8013E020)
SetType(0x8013E020, "void AddArmorStand__Fi(int i)")
del_items(0x8013E0A8)
SetType(0x8013E0A8, "void AddObjLight__Fii(int i, int r)")
del_items(0x8013E150)
SetType(0x8013E150, "void AddBarrel__Fii(int i, int ot)")
del_items(0x8013E200)
SetType(0x8013E200, "void AddShrine__Fi(int i)")
del_items(0x8013E350)
SetType(0x8013E350, "void AddBookcase__Fi(int i)")
del_items(0x8013E3A8)
SetType(0x8013E3A8, "void AddBookstand__Fi(int i)")
del_items(0x8013E3F0)
SetType(0x8013E3F0, "void AddBloodFtn__Fi(int i)")
del_items(0x8013E438)
SetType(0x8013E438, "void AddPurifyingFountain__Fi(int i)")
del_items(0x8013E514)
SetType(0x8013E514, "void AddGoatShrine__Fi(int i)")
del_items(0x8013E55C)
SetType(0x8013E55C, "void AddCauldron__Fi(int i)")
del_items(0x8013E5A4)
SetType(0x8013E5A4, "void AddMurkyFountain__Fi(int i)")
del_items(0x8013E680)
SetType(0x8013E680, "void AddTearFountain__Fi(int i)")
del_items(0x8013E6C8)
SetType(0x8013E6C8, "void AddDecap__Fi(int i)")
del_items(0x8013E744)
SetType(0x8013E744, "void AddVilebook__Fi(int i)")
del_items(0x8013E794)
SetType(0x8013E794, "void AddMagicCircle__Fi(int i)")
del_items(0x8013E808)
SetType(0x8013E808, "void AddBrnCross__Fi(int i)")
del_items(0x8013E850)
SetType(0x8013E850, "void AddPedistal__Fi(int i)")
del_items(0x8013E8C4)
SetType(0x8013E8C4, "void AddStoryBook__Fi(int i)")
del_items(0x8013EA94)
SetType(0x8013EA94, "void AddWeaponRack__Fi(int i)")
del_items(0x8013EB1C)
SetType(0x8013EB1C, "void AddTorturedBody__Fi(int i)")
del_items(0x8013EB98)
SetType(0x8013EB98, "void AddFlameLvr__Fi(int i)")
del_items(0x8013EBD8)
SetType(0x8013EBD8, "void GetRndObjLoc__FiRiT1(int randarea, int *xx, int *yy)")
del_items(0x8013ECE4)
SetType(0x8013ECE4, "void AddMushPatch__Fv()")
del_items(0x8013EE08)
SetType(0x8013EE08, "void AddSlainHero__Fv()")
del_items(0x8013EE48)
SetType(0x8013EE48, "unsigned char RndLocOk__Fii(int xp, int yp)")
del_items(0x8013EF2C)
SetType(0x8013EF2C, "unsigned char TrapLocOk__Fii(int xp, int yp)")
del_items(0x8013EF94)
SetType(0x8013EF94, "unsigned char RoomLocOk__Fii(int xp, int yp)")
del_items(0x8013F02C)
SetType(0x8013F02C, "void InitRndLocObj__Fiii(int min, int max, int objtype)")
del_items(0x8013F1D8)
SetType(0x8013F1D8, "void InitRndLocBigObj__Fiii(int min, int max, int objtype)")
del_items(0x8013F3D0)
SetType(0x8013F3D0, "void InitRndLocObj5x5__Fiii(int min, int max, int objtype)")
del_items(0x8013F4F8)
SetType(0x8013F4F8, "void SetMapObjects__FPUcii(unsigned char *pMap, int startx, int starty)")
del_items(0x8013F798)
SetType(0x8013F798, "void ClrAllObjects__Fv()")
del_items(0x8013F888)
SetType(0x8013F888, "void AddTortures__Fv()")
del_items(0x8013FA14)
SetType(0x8013FA14, "void AddCandles__Fv()")
del_items(0x8013FA9C)
SetType(0x8013FA9C, "void AddTrapLine__Fiiii(int min, int max, int tobjtype, int lobjtype)")
del_items(0x8013FE38)
SetType(0x8013FE38, "void AddLeverObj__Fiiiiiiii(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, int y2)")
del_items(0x8013FE40)
SetType(0x8013FE40, "void AddBookLever__Fiiiiiiiii(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, int y2, int msg)")
del_items(0x80140054)
SetType(0x80140054, "void InitRndBarrels__Fv()")
del_items(0x801401F0)
SetType(0x801401F0, "void AddL1Objs__Fiiii(int x1, int y1, int x2, int y2)")
del_items(0x80140328)
SetType(0x80140328, "void AddL2Objs__Fiiii(int x1, int y1, int x2, int y2)")
del_items(0x8014043C)
SetType(0x8014043C, "void AddL3Objs__Fiiii(int x1, int y1, int x2, int y2)")
del_items(0x8014053C)
SetType(0x8014053C, "unsigned char WallTrapLocOk__Fii(int xp, int yp)")
del_items(0x801405A4)
SetType(0x801405A4, "unsigned char TorchLocOK__Fii(int xp, int yp)")
del_items(0x801405E4)
SetType(0x801405E4, "void AddL2Torches__Fv()")
del_items(0x80140798)
SetType(0x80140798, "void AddObjTraps__Fv()")
del_items(0x80140B10)
SetType(0x80140B10, "void AddChestTraps__Fv()")
del_items(0x80140C60)
SetType(0x80140C60, "void LoadMapObjects__FPUciiiiiii(unsigned char *pMap, int startx, int starty, int x1, int y1, int w, int h, int leveridx)")
del_items(0x80140DCC)
SetType(0x80140DCC, "void AddDiabObjs__Fv()")
del_items(0x80140F20)
SetType(0x80140F20, "void AddStoryBooks__Fv()")
del_items(0x80141070)
SetType(0x80141070, "void AddHookedBodies__Fi(int freq)")
del_items(0x80141268)
SetType(0x80141268, "void AddL4Goodies__Fv()")
del_items(0x80141318)
SetType(0x80141318, "void AddLazStand__Fv()")
del_items(0x801414AC)
SetType(0x801414AC, "void InitObjects__Fv()")
del_items(0x80141AF8)
SetType(0x80141AF8, "void PreObjObjAddSwitch__Fiiii(int ot, int ox, int oy, int oi)")
del_items(0x80141E00)
SetType(0x80141E00, "void FillSolidBlockTbls__Fv()")
del_items(0x80141FAC)
SetType(0x80141FAC, "void SetDungeonMicros__Fv()")
del_items(0x80141FB4)
SetType(0x80141FB4, "void DRLG_InitTrans__Fv()")
del_items(0x80142028)
SetType(0x80142028, "void DRLG_RectTrans__Fiiii(int x1, int y1, int x2, int y2)")
del_items(0x801420A8)
SetType(0x801420A8, "void DRLG_CopyTrans__Fiiii(int sx, int sy, int dx, int dy)")
del_items(0x80142110)
SetType(0x80142110, "void DRLG_ListTrans__FiPUc(int num, unsigned char *List)")
del_items(0x80142184)
SetType(0x80142184, "void DRLG_AreaTrans__FiPUc(int num, unsigned char *List)")
del_items(0x80142214)
SetType(0x80142214, "void DRLG_InitSetPC__Fv()")
del_items(0x8014222C)
SetType(0x8014222C, "void DRLG_SetPC__Fv()")
del_items(0x801422DC)
SetType(0x801422DC, "void Make_SetPC__Fiiii(int x, int y, int w, int h)")
del_items(0x8014237C)
SetType(0x8014237C, "unsigned char DRLG_WillThemeRoomFit__FiiiiiPiT5(int floor, int x, int y, int minSize, int maxSize, int *width, int *height)")
del_items(0x80142644)
SetType(0x80142644, "void DRLG_CreateThemeRoom__Fi(int themeIndex)")
del_items(0x8014364C)
SetType(0x8014364C, "void DRLG_PlaceThemeRooms__FiiiiUc(int minSize, int maxSize, int floor, int freq, int rndSize)")
del_items(0x801438F4)
SetType(0x801438F4, "void DRLG_HoldThemeRooms__Fv()")
del_items(0x80143AA8)
SetType(0x80143AA8, "unsigned char SkipThemeRoom__Fii(int x, int y)")
del_items(0x80143B74)
SetType(0x80143B74, "void InitLevels__Fv()")
del_items(0x80143C78)
SetType(0x80143C78, "unsigned char TFit_Shrine__Fi(int i)")
del_items(0x80143EE8)
SetType(0x80143EE8, "unsigned char TFit_Obj5__Fi(int t)")
del_items(0x801440BC)
SetType(0x801440BC, "unsigned char TFit_SkelRoom__Fi(int t)")
del_items(0x8014416C)
SetType(0x8014416C, "unsigned char TFit_GoatShrine__Fi(int t)")
del_items(0x80144204)
SetType(0x80144204, "unsigned char CheckThemeObj3__Fiiii(int xp, int yp, int t, int f)")
del_items(0x80144354)
SetType(0x80144354, "unsigned char TFit_Obj3__Fi(int t)")
del_items(0x80144414)
SetType(0x80144414, "unsigned char CheckThemeReqs__Fi(int t)")
del_items(0x801444E0)
SetType(0x801444E0, "unsigned char SpecialThemeFit__Fii(int i, int t)")
del_items(0x801446BC)
SetType(0x801446BC, "unsigned char CheckThemeRoom__Fi(int tv)")
del_items(0x80144968)
SetType(0x80144968, "void InitThemes__Fv()")
del_items(0x80144CB4)
SetType(0x80144CB4, "void HoldThemeRooms__Fv()")
del_items(0x80144D9C)
SetType(0x80144D9C, "void PlaceThemeMonsts__Fii(int t, int f)")
del_items(0x80144F40)
SetType(0x80144F40, "void Theme_Barrel__Fi(int t)")
del_items(0x801450B8)
SetType(0x801450B8, "void Theme_Shrine__Fi(int t)")
del_items(0x801451A0)
SetType(0x801451A0, "void Theme_MonstPit__Fi(int t)")
del_items(0x801452CC)
SetType(0x801452CC, "void Theme_SkelRoom__Fi(int t)")
del_items(0x801455D0)
SetType(0x801455D0, "void Theme_Treasure__Fi(int t)")
del_items(0x80145834)
SetType(0x80145834, "void Theme_Library__Fi(int t)")
del_items(0x80145AA4)
SetType(0x80145AA4, "void Theme_Torture__Fi(int t)")
del_items(0x80145C14)
SetType(0x80145C14, "void Theme_BloodFountain__Fi(int t)")
del_items(0x80145C88)
SetType(0x80145C88, "void Theme_Decap__Fi(int t)")
del_items(0x80145DF8)
SetType(0x80145DF8, "void Theme_PurifyingFountain__Fi(int t)")
del_items(0x80145E6C)
SetType(0x80145E6C, "void Theme_ArmorStand__Fi(int t)")
del_items(0x80146004)
SetType(0x80146004, "void Theme_GoatShrine__Fi(int t)")
del_items(0x80146154)
SetType(0x80146154, "void Theme_Cauldron__Fi(int t)")
del_items(0x801461C8)
SetType(0x801461C8, "void Theme_MurkyFountain__Fi(int t)")
del_items(0x8014623C)
SetType(0x8014623C, "void Theme_TearFountain__Fi(int t)")
del_items(0x801462B0)
SetType(0x801462B0, "void Theme_BrnCross__Fi(int t)")
del_items(0x80146428)
SetType(0x80146428, "void Theme_WeaponRack__Fi(int t)")
del_items(0x801465C0)
SetType(0x801465C0, "void UpdateL4Trans__Fv()")
del_items(0x80146620)
SetType(0x80146620, "void CreateThemeRooms__Fv()")
del_items(0x80146804)
SetType(0x80146804, "void InitPortals__Fv()")
del_items(0x80146864)
SetType(0x80146864, "void InitQuests__Fv()")
del_items(0x80146C68)
SetType(0x80146C68, "void DrawButcher__Fv()")
del_items(0x80146CAC)
SetType(0x80146CAC, "void DrawSkelKing__Fiii(int q, int x, int y)")
del_items(0x80146CE8)
SetType(0x80146CE8, "void DrawWarLord__Fii(int x, int y)")
del_items(0x80146DE4)
SetType(0x80146DE4, "void DrawSChamber__Fiii(int q, int x, int y)")
del_items(0x80146F20)
SetType(0x80146F20, "void DrawLTBanner__Fii(int x, int y)")
del_items(0x80146FFC)
SetType(0x80146FFC, "void DrawBlind__Fii(int x, int y)")
del_items(0x801470D8)
SetType(0x801470D8, "void DrawBlood__Fii(int x, int y)")
del_items(0x801471B8)
SetType(0x801471B8, "void DRLG_CheckQuests__Fii(int x, int y)")
del_items(0x801472F4)
SetType(0x801472F4, "void InitInv__Fv()")
del_items(0x80147348)
SetType(0x80147348, "void InitAutomap__Fv()")
del_items(0x8014750C)
SetType(0x8014750C, "void InitAutomapOnce__Fv()")
del_items(0x8014751C)
SetType(0x8014751C, "unsigned char MonstPlace__Fii(int xp, int yp)")
del_items(0x801475D8)
SetType(0x801475D8, "void InitMonsterGFX__Fi(int monst)")
del_items(0x801476B0)
SetType(0x801476B0, "void PlaceMonster__Fiiii(int i, int mtype, int x, int y)")
del_items(0x80147750)
SetType(0x80147750, "int AddMonsterType__Fii(int type, int placeflag)")
del_items(0x8014784C)
SetType(0x8014784C, "void GetMonsterTypes__FUl(unsigned long QuestMask)")
del_items(0x801478FC)
SetType(0x801478FC, "void ClrAllMonsters__Fv()")
del_items(0x80147A2C)
SetType(0x80147A2C, "void InitLevelMonsters__Fv()")
del_items(0x80147AB0)
SetType(0x80147AB0, "void GetLevelMTypes__Fv()")
del_items(0x80147F18)
SetType(0x80147F18, "void PlaceQuestMonsters__Fv()")
del_items(0x801482DC)
SetType(0x801482DC, "void LoadDiabMonsts__Fv()")
del_items(0x801483EC)
SetType(0x801483EC, "void PlaceGroup__FiiUci(int mtype, int num, unsigned char leaderf, int leader)")
del_items(0x8014899C)
SetType(0x8014899C, "void SetMapMonsters__FPUcii(unsigned char *pMap, int startx, int starty)")
del_items(0x80148BC0)
SetType(0x80148BC0, "void InitMonsters__Fv()")
del_items(0x80148F70)
SetType(0x80148F70, "void PlaceUniqueMonst__Fiii(int uniqindex, int miniontype, int unpackfilesize)")
del_items(0x801496DC)
SetType(0x801496DC, "void PlaceUniques__Fv()")
del_items(0x8014986C)
SetType(0x8014986C, "int PreSpawnSkeleton__Fv()")
del_items(0x801499AC)
SetType(0x801499AC, "int encode_enemy__Fi(int m)")
del_items(0x80149A04)
SetType(0x80149A04, "void decode_enemy__Fii(int m, int enemy)")
del_items(0x80149B14)
SetType(0x80149B14, "unsigned char IsGoat__Fi(int mt)")
del_items(0x80149B40)
SetType(0x80149B40, "void InitMissiles__Fv()")
del_items(0x80149D08)
SetType(0x80149D08, "void InitNoTriggers__Fv()")
del_items(0x80149D2C)
SetType(0x80149D2C, "void InitTownTriggers__Fv()")
del_items(0x8014A074)
SetType(0x8014A074, "void InitL1Triggers__Fv()")
del_items(0x8014A188)
SetType(0x8014A188, "void InitL2Triggers__Fv()")
del_items(0x8014A318)
SetType(0x8014A318, "void InitL3Triggers__Fv()")
del_items(0x8014A474)
SetType(0x8014A474, "void InitL4Triggers__Fv()")
del_items(0x8014A688)
SetType(0x8014A688, "void InitSKingTriggers__Fv()")
del_items(0x8014A6D4)
SetType(0x8014A6D4, "void InitSChambTriggers__Fv()")
del_items(0x8014A720)
SetType(0x8014A720, "void InitPWaterTriggers__Fv()")
del_items(0x8014A76C)
SetType(0x8014A76C, "void InitVPTriggers__Fv()")
del_items(0x8014A7B8)
SetType(0x8014A7B8, "void InitStores__Fv()")
del_items(0x8014A838)
SetType(0x8014A838, "void SetupTownStores__Fv()")
del_items(0x8014A9C8)
SetType(0x8014A9C8, "void DeltaLoadLevel__Fv()")
del_items(0x8014B2A0)
SetType(0x8014B2A0, "unsigned char SmithItemOk__Fi(int i)")
del_items(0x8014B304)
SetType(0x8014B304, "int RndSmithItem__Fi(int lvl)")
del_items(0x8014B410)
SetType(0x8014B410, "unsigned char WitchItemOk__Fi(int i)")
del_items(0x8014B550)
SetType(0x8014B550, "int RndWitchItem__Fi(int lvl)")
del_items(0x8014B650)
SetType(0x8014B650, "void BubbleSwapItem__FP10ItemStructT0(struct ItemStruct *a, struct ItemStruct *b)")
del_items(0x8014B734)
SetType(0x8014B734, "void SortWitch__Fv()")
del_items(0x8014B854)
SetType(0x8014B854, "int RndBoyItem__Fi(int lvl)")
del_items(0x8014B978)
SetType(0x8014B978, "unsigned char HealerItemOk__Fi(int i)")
del_items(0x8014BB2C)
SetType(0x8014BB2C, "int RndHealerItem__Fi(int lvl)")
del_items(0x8014BC2C)
SetType(0x8014BC2C, "void RecreatePremiumItem__Fiiii(int ii, int idx, int plvl, int iseed)")
del_items(0x8014BCF4)
SetType(0x8014BCF4, "void RecreateWitchItem__Fiiii(int ii, int idx, int lvl, int iseed)")
del_items(0x8014BE4C)
SetType(0x8014BE4C, "void RecreateSmithItem__Fiiii(int ii, int idx, int lvl, int iseed)")
del_items(0x8014BEE8)
SetType(0x8014BEE8, "void RecreateHealerItem__Fiiii(int ii, int idx, int lvl, int iseed)")
del_items(0x8014BFA8)
SetType(0x8014BFA8, "void RecreateBoyItem__Fiiii(int ii, int idx, int lvl, int iseed)")
del_items(0x8014C06C)
SetType(0x8014C06C, "void RecreateTownItem__FiiUsii(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue)")
del_items(0x8014C0F8)
SetType(0x8014C0F8, "void SpawnSmith__Fi(int lvl)")
del_items(0x8014C294)
SetType(0x8014C294, "void SpawnWitch__Fi(int lvl)")
del_items(0x8014C600)
SetType(0x8014C600, "void SpawnHealer__Fi(int lvl)")
del_items(0x8014C91C)
SetType(0x8014C91C, "void SpawnBoy__Fi(int lvl)")
del_items(0x8014CA70)
SetType(0x8014CA70, "void SortSmith__Fv()")
del_items(0x8014CB84)
SetType(0x8014CB84, "void SortHealer__Fv()")
del_items(0x8014CCA4)
SetType(0x8014CCA4, "void RecreateItem__FiiUsii(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue)")
| del_items(2148670004)
set_type(2148670004, 'void PreGameOnlyTestRoutine__Fv()')
del_items(2148678392)
set_type(2148678392, 'void DRLG_PlaceDoor__Fii(int x, int y)')
del_items(2148679628)
set_type(2148679628, 'void DRLG_L1Shadows__Fv()')
del_items(2148680676)
set_type(2148680676, 'int DRLG_PlaceMiniSet__FPCUciiiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int noquad, int ldir)')
del_items(2148681808)
set_type(2148681808, 'void DRLG_L1Floor__Fv()')
del_items(2148682044)
set_type(2148682044, 'void StoreBlock__FPiii(int *Bl, int xx, int yy)')
del_items(2148682216)
set_type(2148682216, 'void DRLG_L1Pass3__Fv()')
del_items(2148682652)
set_type(2148682652, 'void DRLG_LoadL1SP__Fv()')
del_items(2148682872)
set_type(2148682872, 'void DRLG_FreeL1SP__Fv()')
del_items(2148682920)
set_type(2148682920, 'void DRLG_Init_Globals__Fv()')
del_items(2148683084)
set_type(2148683084, 'void set_restore_lighting__Fv()')
del_items(2148683228)
set_type(2148683228, 'void DRLG_InitL1Vals__Fv()')
del_items(2148683236)
set_type(2148683236, 'void LoadL1Dungeon__FPcii(char *sFileName, int vx, int vy)')
del_items(2148683696)
set_type(2148683696, 'void LoadPreL1Dungeon__FPcii(char *sFileName, int vx, int vy)')
del_items(2148684136)
set_type(2148684136, 'void InitL5Dungeon__Fv()')
del_items(2148684232)
set_type(2148684232, 'void L5ClearFlags__Fv()')
del_items(2148684308)
set_type(2148684308, 'void L5drawRoom__Fiiii(int x, int y, int w, int h)')
del_items(2148684416)
set_type(2148684416, 'unsigned char L5checkRoom__Fiiii(int x, int y, int width, int height)')
del_items(2148684564)
set_type(2148684564, 'void L5roomGen__Fiiiii(int x, int y, int w, int h, int dir)')
del_items(2148685328)
set_type(2148685328, 'void L5firstRoom__Fv()')
del_items(2148686284)
set_type(2148686284, 'long L5GetArea__Fv()')
del_items(2148686380)
set_type(2148686380, 'void L5makeDungeon__Fv()')
del_items(2148686520)
set_type(2148686520, 'void L5makeDmt__Fv()')
del_items(2148686752)
set_type(2148686752, 'int L5HWallOk__Fii(int i, int j)')
del_items(2148687068)
set_type(2148687068, 'int L5VWallOk__Fii(int i, int j)')
del_items(2148687400)
set_type(2148687400, 'void L5HorizWall__Fiici(int i, int j, char p, int dx)')
del_items(2148687976)
set_type(2148687976, 'void L5VertWall__Fiici(int i, int j, char p, int dy)')
del_items(2148688540)
set_type(2148688540, 'void L5AddWall__Fv()')
del_items(2148689164)
set_type(2148689164, 'void DRLG_L5GChamber__Fiiiiii(int sx, int sy, int topflag, int bottomflag, int leftflag, int rightflag)')
del_items(2148689868)
set_type(2148689868, 'void DRLG_L5GHall__Fiiii(int x1, int y1, int x2, int y2)')
del_items(2148690048)
set_type(2148690048, 'void L5tileFix__Fv()')
del_items(2148692292)
set_type(2148692292, 'void DRLG_L5Subs__Fv()')
del_items(2148692796)
set_type(2148692796, 'void DRLG_L5SetRoom__Fii(int rx1, int ry1)')
del_items(2148693052)
set_type(2148693052, 'void L5FillChambers__Fv()')
del_items(2148694824)
set_type(2148694824, 'void DRLG_L5FTVR__Fiiiii(int i, int j, int x, int y, int d)')
del_items(2148696184)
set_type(2148696184, 'void DRLG_L5FloodTVal__Fv()')
del_items(2148696444)
set_type(2148696444, 'void DRLG_L5TransFix__Fv()')
del_items(2148696972)
set_type(2148696972, 'void DRLG_L5DirtFix__Fv()')
del_items(2148697320)
set_type(2148697320, 'void DRLG_L5CornerFix__Fv()')
del_items(2148697592)
set_type(2148697592, 'void DRLG_L5__Fi(int entry)')
del_items(2148698904)
set_type(2148698904, 'void CreateL5Dungeon__FUii(unsigned int rseed, int entry)')
del_items(2148708540)
set_type(2148708540, 'unsigned char DRLG_L2PlaceMiniSet__FPUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)')
del_items(2148709552)
set_type(2148709552, 'void DRLG_L2PlaceRndSet__FPUci(unsigned char *miniset, int rndper)')
del_items(2148710320)
set_type(2148710320, 'void DRLG_L2Subs__Fv()')
del_items(2148710820)
set_type(2148710820, 'void DRLG_L2Shadows__Fv()')
del_items(2148711272)
set_type(2148711272, 'void InitDungeon__Fv()')
del_items(2148711368)
set_type(2148711368, 'void DRLG_LoadL2SP__Fv()')
del_items(2148711528)
set_type(2148711528, 'void DRLG_FreeL2SP__Fv()')
del_items(2148711576)
set_type(2148711576, 'void DRLG_L2SetRoom__Fii(int rx1, int ry1)')
del_items(2148711832)
set_type(2148711832, 'void DefineRoom__Fiiiii(int nX1, int nY1, int nX2, int nY2, int ForceHW)')
del_items(2148712356)
set_type(2148712356, 'void CreateDoorType__Fii(int nX, int nY)')
del_items(2148712584)
set_type(2148712584, 'void PlaceHallExt__Fii(int nX, int nY)')
del_items(2148712640)
set_type(2148712640, 'void AddHall__Fiiiii(int nX1, int nY1, int nX2, int nY2, int nHd)')
del_items(2148712856)
set_type(2148712856, 'void CreateRoom__Fiiiiiiiii(int nX1, int nY1, int nX2, int nY2, int nRDest, int nHDir, int ForceHW, int nH, int nW)')
del_items(2148714528)
set_type(2148714528, 'void GetHall__FPiN40(int *nX1, int *nY1, int *nX2, int *nY2, int *nHd)')
del_items(2148714680)
set_type(2148714680, 'void ConnectHall__Fiiiii(int nX1, int nY1, int nX2, int nY2, int nHd)')
del_items(2148716320)
set_type(2148716320, 'void DoPatternCheck__Fii(int i, int j)')
del_items(2148717012)
set_type(2148717012, 'void L2TileFix__Fv()')
del_items(2148717304)
set_type(2148717304, 'unsigned char DL2_Cont__FUcUcUcUc(unsigned char x1f, unsigned char y1f, unsigned char x2f, unsigned char y2f)')
del_items(2148717432)
set_type(2148717432, 'int DL2_NumNoChar__Fv()')
del_items(2148717524)
set_type(2148717524, 'void DL2_DrawRoom__Fiiii(int x1, int y1, int x2, int y2)')
del_items(2148717784)
set_type(2148717784, 'void DL2_KnockWalls__Fiiii(int x1, int y1, int x2, int y2)')
del_items(2148718248)
set_type(2148718248, 'unsigned char DL2_FillVoids__Fv()')
del_items(2148720684)
set_type(2148720684, 'unsigned char CreateDungeon__Fv()')
del_items(2148721464)
set_type(2148721464, 'void DRLG_L2Pass3__Fv()')
del_items(2148721872)
set_type(2148721872, 'void DRLG_L2FTVR__Fiiiii(int i, int j, int x, int y, int d)')
del_items(2148723224)
set_type(2148723224, 'void DRLG_L2FloodTVal__Fv()')
del_items(2148723484)
set_type(2148723484, 'void DRLG_L2TransFix__Fv()')
del_items(2148724012)
set_type(2148724012, 'void L2DirtFix__Fv()')
del_items(2148724364)
set_type(2148724364, 'void L2LockoutFix__Fv()')
del_items(2148725272)
set_type(2148725272, 'void L2DoorFix__Fv()')
del_items(2148725448)
set_type(2148725448, 'void DRLG_L2__Fi(int entry)')
del_items(2148728084)
set_type(2148728084, 'void DRLG_InitL2Vals__Fv()')
del_items(2148728092)
set_type(2148728092, 'void LoadL2Dungeon__FPcii(char *sFileName, int vx, int vy)')
del_items(2148728588)
set_type(2148728588, 'void LoadPreL2Dungeon__FPcii(char *sFileName, int vx, int vy)')
del_items(2148729080)
set_type(2148729080, 'void CreateL2Dungeon__FUii(unsigned int rseed, int entry)')
del_items(2148731568)
set_type(2148731568, 'void InitL3Dungeon__Fv()')
del_items(2148731704)
set_type(2148731704, 'int DRLG_L3FillRoom__Fiiii(int x1, int y1, int x2, int y2)')
del_items(2148732308)
set_type(2148732308, 'void DRLG_L3CreateBlock__Fiiii(int x, int y, int obs, int dir)')
del_items(2148732976)
set_type(2148732976, 'void DRLG_L3FloorArea__Fiiii(int x1, int y1, int x2, int y2)')
del_items(2148733080)
set_type(2148733080, 'void DRLG_L3FillDiags__Fv()')
del_items(2148733384)
set_type(2148733384, 'void DRLG_L3FillSingles__Fv()')
del_items(2148733588)
set_type(2148733588, 'void DRLG_L3FillStraights__Fv()')
del_items(2148734552)
set_type(2148734552, 'void DRLG_L3Edges__Fv()')
del_items(2148734616)
set_type(2148734616, 'int DRLG_L3GetFloorArea__Fv()')
del_items(2148734696)
set_type(2148734696, 'void DRLG_L3MakeMegas__Fv()')
del_items(2148735020)
set_type(2148735020, 'void DRLG_L3River__Fv()')
del_items(2148737644)
set_type(2148737644, 'int DRLG_L3SpawnEdge__FiiPi(int x, int y, int *totarea)')
del_items(2148738296)
set_type(2148738296, 'int DRLG_L3Spawn__FiiPi(int x, int y, int *totarea)')
del_items(2148738828)
set_type(2148738828, 'void DRLG_L3Pool__Fv()')
del_items(2148739424)
set_type(2148739424, 'void DRLG_L3PoolFix__Fv()')
del_items(2148739732)
set_type(2148739732, 'int DRLG_L3PlaceMiniSet__FPCUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)')
del_items(2148740628)
set_type(2148740628, 'void DRLG_L3PlaceRndSet__FPCUci(unsigned char *miniset, int rndper)')
del_items(2148741468)
set_type(2148741468, 'unsigned char WoodVertU__Fii(int i, int y)')
del_items(2148741640)
set_type(2148741640, 'unsigned char WoodVertD__Fii(int i, int y)')
del_items(2148741796)
set_type(2148741796, 'unsigned char WoodHorizL__Fii(int x, int j)')
del_items(2148741944)
set_type(2148741944, 'unsigned char WoodHorizR__Fii(int x, int j)')
del_items(2148742076)
set_type(2148742076, 'void AddFenceDoors__Fv()')
del_items(2148742304)
set_type(2148742304, 'void FenceDoorFix__Fv()')
del_items(2148742804)
set_type(2148742804, 'void DRLG_L3Wood__Fv()')
del_items(2148744836)
set_type(2148744836, 'int DRLG_L3Anvil__Fv()')
del_items(2148745440)
set_type(2148745440, 'void FixL3Warp__Fv()')
del_items(2148745672)
set_type(2148745672, 'void FixL3HallofHeroes__Fv()')
del_items(2148746012)
set_type(2148746012, 'void DRLG_L3LockRec__Fii(int x, int y)')
del_items(2148746168)
set_type(2148746168, 'unsigned char DRLG_L3Lockout__Fv()')
del_items(2148746360)
set_type(2148746360, 'void DRLG_L3__Fi(int entry)')
del_items(2148748184)
set_type(2148748184, 'void DRLG_L3Pass3__Fv()')
del_items(2148748604)
set_type(2148748604, 'void CreateL3Dungeon__FUii(unsigned int rseed, int entry)')
del_items(2148748880)
set_type(2148748880, 'void LoadL3Dungeon__FPcii(char *sFileName, int vx, int vy)')
del_items(2148749428)
set_type(2148749428, 'void LoadPreL3Dungeon__FPcii(char *sFileName, int vx, int vy)')
del_items(2148757184)
set_type(2148757184, 'void DRLG_L4Shadows__Fv()')
del_items(2148757380)
set_type(2148757380, 'void InitL4Dungeon__Fv()')
del_items(2148757536)
set_type(2148757536, 'void DRLG_LoadL4SP__Fv()')
del_items(2148757700)
set_type(2148757700, 'void DRLG_FreeL4SP__Fv()')
del_items(2148757740)
set_type(2148757740, 'void DRLG_L4SetSPRoom__Fii(int rx1, int ry1)')
del_items(2148757996)
set_type(2148757996, 'void L4makeDmt__Fv()')
del_items(2148758160)
set_type(2148758160, 'int L4HWallOk__Fii(int i, int j)')
del_items(2148758496)
set_type(2148758496, 'int L4VWallOk__Fii(int i, int j)')
del_items(2148758876)
set_type(2148758876, 'void L4HorizWall__Fiii(int i, int j, int dx)')
del_items(2148759340)
set_type(2148759340, 'void L4VertWall__Fiii(int i, int j, int dy)')
del_items(2148759796)
set_type(2148759796, 'void L4AddWall__Fv()')
del_items(2148761044)
set_type(2148761044, 'void L4tileFix__Fv()')
del_items(2148769724)
set_type(2148769724, 'void DRLG_L4Subs__Fv()')
del_items(2148770196)
set_type(2148770196, 'void L4makeDungeon__Fv()')
del_items(2148770764)
set_type(2148770764, 'void uShape__Fv()')
del_items(2148771440)
set_type(2148771440, 'long GetArea__Fv()')
del_items(2148771532)
set_type(2148771532, 'void L4drawRoom__Fiiii(int x, int y, int width, int height)')
del_items(2148771636)
set_type(2148771636, 'unsigned char L4checkRoom__Fiiii(int x, int y, int width, int height)')
del_items(2148771792)
set_type(2148771792, 'void L4roomGen__Fiiiii(int x, int y, int w, int h, int dir)')
del_items(2148772556)
set_type(2148772556, 'void L4firstRoom__Fv()')
del_items(2148773096)
set_type(2148773096, 'void L4SaveQuads__Fv()')
del_items(2148773256)
set_type(2148773256, 'void DRLG_L4SetRoom__FPUcii(unsigned char *pSetPiece, int rx1, int ry1)')
del_items(2148773468)
set_type(2148773468, 'void DRLG_LoadDiabQuads__FUc(unsigned char preflag)')
del_items(2148773844)
set_type(2148773844, 'unsigned char DRLG_L4PlaceMiniSet__FPCUciiiiii(unsigned char *miniset, int tmin, int tmax, int cx, int cy, int setview, int ldir)')
del_items(2148774892)
set_type(2148774892, 'void DRLG_L4FTVR__Fiiiii(int i, int j, int x, int y, int d)')
del_items(2148776244)
set_type(2148776244, 'void DRLG_L4FloodTVal__Fv()')
del_items(2148776504)
set_type(2148776504, 'unsigned char IsDURWall__Fc(char d)')
del_items(2148776552)
set_type(2148776552, 'unsigned char IsDLLWall__Fc(char dd)')
del_items(2148776600)
set_type(2148776600, 'void DRLG_L4TransFix__Fv()')
del_items(2148777456)
set_type(2148777456, 'void DRLG_L4Corners__Fv()')
del_items(2148777604)
set_type(2148777604, 'void L4FixRim__Fv()')
del_items(2148777664)
set_type(2148777664, 'void DRLG_L4GeneralFix__Fv()')
del_items(2148777828)
set_type(2148777828, 'void DRLG_L4__Fi(int entry)')
del_items(2148780128)
set_type(2148780128, 'void DRLG_L4Pass3__Fv()')
del_items(2148780548)
set_type(2148780548, 'void CreateL4Dungeon__FUii(unsigned int rseed, int entry)')
del_items(2148780772)
set_type(2148780772, 'int ObjIndex__Fii(int x, int y)')
del_items(2148780952)
set_type(2148780952, 'void AddSKingObjs__Fv()')
del_items(2148781256)
set_type(2148781256, 'void AddSChamObjs__Fv()')
del_items(2148781380)
set_type(2148781380, 'void AddVileObjs__Fv()')
del_items(2148781552)
set_type(2148781552, 'void DRLG_SetMapTrans__FPc(char *sFileName)')
del_items(2148781748)
set_type(2148781748, 'void LoadSetMap__Fv()')
del_items(2148782556)
set_type(2148782556, 'unsigned long CM_QuestToBitPattern__Fi(int QuestNum)')
del_items(2148782772)
set_type(2148782772, 'void CM_ShowMonsterList__Fii(int Level, int List)')
del_items(2148782892)
set_type(2148782892, 'int CM_ChooseMonsterList__FiUl(int Level, unsigned long QuestsNeededMask)')
del_items(2148783052)
set_type(2148783052, 'int NoUiListChoose__FiUl(int Level, unsigned long QuestsNeededMask)')
del_items(2148783060)
set_type(2148783060, 'void ChooseTask__FP4TASK(struct TASK *T)')
del_items(2148783324)
set_type(2148783324, 'void ShowTask__FP4TASK(struct TASK *T)')
del_items(2148783884)
set_type(2148783884, 'int GetListsAvailable__FiUlPUc(int Level, unsigned long QuestsNeededMask, unsigned char *ListofLists)')
del_items(2148784176)
set_type(2148784176, 'unsigned short GetDown__C4CPad(struct CPad *this)')
del_items(2148784216)
set_type(2148784216, 'void AddL1Door__Fiiii(int i, int x, int y, int ot)')
del_items(2148784528)
set_type(2148784528, 'void AddSCambBook__Fi(int i)')
del_items(2148784688)
set_type(2148784688, 'void AddChest__Fii(int i, int t)')
del_items(2148785168)
set_type(2148785168, 'void AddL2Door__Fiiii(int i, int x, int y, int ot)')
del_items(2148785500)
set_type(2148785500, 'void AddL3Door__Fiiii(int i, int x, int y, int ot)')
del_items(2148785648)
set_type(2148785648, 'void AddSarc__Fi(int i)')
del_items(2148785868)
set_type(2148785868, 'void AddFlameTrap__Fi(int i)')
del_items(2148785960)
set_type(2148785960, 'void AddTrap__Fii(int i, int ot)')
del_items(2148786208)
set_type(2148786208, 'void AddArmorStand__Fi(int i)')
del_items(2148786344)
set_type(2148786344, 'void AddObjLight__Fii(int i, int r)')
del_items(2148786512)
set_type(2148786512, 'void AddBarrel__Fii(int i, int ot)')
del_items(2148786688)
set_type(2148786688, 'void AddShrine__Fi(int i)')
del_items(2148787024)
set_type(2148787024, 'void AddBookcase__Fi(int i)')
del_items(2148787112)
set_type(2148787112, 'void AddBookstand__Fi(int i)')
del_items(2148787184)
set_type(2148787184, 'void AddBloodFtn__Fi(int i)')
del_items(2148787256)
set_type(2148787256, 'void AddPurifyingFountain__Fi(int i)')
del_items(2148787476)
set_type(2148787476, 'void AddGoatShrine__Fi(int i)')
del_items(2148787548)
set_type(2148787548, 'void AddCauldron__Fi(int i)')
del_items(2148787620)
set_type(2148787620, 'void AddMurkyFountain__Fi(int i)')
del_items(2148787840)
set_type(2148787840, 'void AddTearFountain__Fi(int i)')
del_items(2148787912)
set_type(2148787912, 'void AddDecap__Fi(int i)')
del_items(2148788036)
set_type(2148788036, 'void AddVilebook__Fi(int i)')
del_items(2148788116)
set_type(2148788116, 'void AddMagicCircle__Fi(int i)')
del_items(2148788232)
set_type(2148788232, 'void AddBrnCross__Fi(int i)')
del_items(2148788304)
set_type(2148788304, 'void AddPedistal__Fi(int i)')
del_items(2148788420)
set_type(2148788420, 'void AddStoryBook__Fi(int i)')
del_items(2148788884)
set_type(2148788884, 'void AddWeaponRack__Fi(int i)')
del_items(2148789020)
set_type(2148789020, 'void AddTorturedBody__Fi(int i)')
del_items(2148789144)
set_type(2148789144, 'void AddFlameLvr__Fi(int i)')
del_items(2148789208)
set_type(2148789208, 'void GetRndObjLoc__FiRiT1(int randarea, int *xx, int *yy)')
del_items(2148789476)
set_type(2148789476, 'void AddMushPatch__Fv()')
del_items(2148789768)
set_type(2148789768, 'void AddSlainHero__Fv()')
del_items(2148789832)
set_type(2148789832, 'unsigned char RndLocOk__Fii(int xp, int yp)')
del_items(2148790060)
set_type(2148790060, 'unsigned char TrapLocOk__Fii(int xp, int yp)')
del_items(2148790164)
set_type(2148790164, 'unsigned char RoomLocOk__Fii(int xp, int yp)')
del_items(2148790316)
set_type(2148790316, 'void InitRndLocObj__Fiii(int min, int max, int objtype)')
del_items(2148790744)
set_type(2148790744, 'void InitRndLocBigObj__Fiii(int min, int max, int objtype)')
del_items(2148791248)
set_type(2148791248, 'void InitRndLocObj5x5__Fiii(int min, int max, int objtype)')
del_items(2148791544)
set_type(2148791544, 'void SetMapObjects__FPUcii(unsigned char *pMap, int startx, int starty)')
del_items(2148792216)
set_type(2148792216, 'void ClrAllObjects__Fv()')
del_items(2148792456)
set_type(2148792456, 'void AddTortures__Fv()')
del_items(2148792852)
set_type(2148792852, 'void AddCandles__Fv()')
del_items(2148792988)
set_type(2148792988, 'void AddTrapLine__Fiiii(int min, int max, int tobjtype, int lobjtype)')
del_items(2148793912)
set_type(2148793912, 'void AddLeverObj__Fiiiiiiii(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, int y2)')
del_items(2148793920)
set_type(2148793920, 'void AddBookLever__Fiiiiiiiii(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, int y2, int msg)')
del_items(2148794452)
set_type(2148794452, 'void InitRndBarrels__Fv()')
del_items(2148794864)
set_type(2148794864, 'void AddL1Objs__Fiiii(int x1, int y1, int x2, int y2)')
del_items(2148795176)
set_type(2148795176, 'void AddL2Objs__Fiiii(int x1, int y1, int x2, int y2)')
del_items(2148795452)
set_type(2148795452, 'void AddL3Objs__Fiiii(int x1, int y1, int x2, int y2)')
del_items(2148795708)
set_type(2148795708, 'unsigned char WallTrapLocOk__Fii(int xp, int yp)')
del_items(2148795812)
set_type(2148795812, 'unsigned char TorchLocOK__Fii(int xp, int yp)')
del_items(2148795876)
set_type(2148795876, 'void AddL2Torches__Fv()')
del_items(2148796312)
set_type(2148796312, 'void AddObjTraps__Fv()')
del_items(2148797200)
set_type(2148797200, 'void AddChestTraps__Fv()')
del_items(2148797536)
set_type(2148797536, 'void LoadMapObjects__FPUciiiiiii(unsigned char *pMap, int startx, int starty, int x1, int y1, int w, int h, int leveridx)')
del_items(2148797900)
set_type(2148797900, 'void AddDiabObjs__Fv()')
del_items(2148798240)
set_type(2148798240, 'void AddStoryBooks__Fv()')
del_items(2148798576)
set_type(2148798576, 'void AddHookedBodies__Fi(int freq)')
del_items(2148799080)
set_type(2148799080, 'void AddL4Goodies__Fv()')
del_items(2148799256)
set_type(2148799256, 'void AddLazStand__Fv()')
del_items(2148799660)
set_type(2148799660, 'void InitObjects__Fv()')
del_items(2148801272)
set_type(2148801272, 'void PreObjObjAddSwitch__Fiiii(int ot, int ox, int oy, int oi)')
del_items(2148802048)
set_type(2148802048, 'void FillSolidBlockTbls__Fv()')
del_items(2148802476)
set_type(2148802476, 'void SetDungeonMicros__Fv()')
del_items(2148802484)
set_type(2148802484, 'void DRLG_InitTrans__Fv()')
del_items(2148802600)
set_type(2148802600, 'void DRLG_RectTrans__Fiiii(int x1, int y1, int x2, int y2)')
del_items(2148802728)
set_type(2148802728, 'void DRLG_CopyTrans__Fiiii(int sx, int sy, int dx, int dy)')
del_items(2148802832)
set_type(2148802832, 'void DRLG_ListTrans__FiPUc(int num, unsigned char *List)')
del_items(2148802948)
set_type(2148802948, 'void DRLG_AreaTrans__FiPUc(int num, unsigned char *List)')
del_items(2148803092)
set_type(2148803092, 'void DRLG_InitSetPC__Fv()')
del_items(2148803116)
set_type(2148803116, 'void DRLG_SetPC__Fv()')
del_items(2148803292)
set_type(2148803292, 'void Make_SetPC__Fiiii(int x, int y, int w, int h)')
del_items(2148803452)
set_type(2148803452, 'unsigned char DRLG_WillThemeRoomFit__FiiiiiPiT5(int floor, int x, int y, int minSize, int maxSize, int *width, int *height)')
del_items(2148804164)
set_type(2148804164, 'void DRLG_CreateThemeRoom__Fi(int themeIndex)')
del_items(2148808268)
set_type(2148808268, 'void DRLG_PlaceThemeRooms__FiiiiUc(int minSize, int maxSize, int floor, int freq, int rndSize)')
del_items(2148808948)
set_type(2148808948, 'void DRLG_HoldThemeRooms__Fv()')
del_items(2148809384)
set_type(2148809384, 'unsigned char SkipThemeRoom__Fii(int x, int y)')
del_items(2148809588)
set_type(2148809588, 'void InitLevels__Fv()')
del_items(2148809848)
set_type(2148809848, 'unsigned char TFit_Shrine__Fi(int i)')
del_items(2148810472)
set_type(2148810472, 'unsigned char TFit_Obj5__Fi(int t)')
del_items(2148810940)
set_type(2148810940, 'unsigned char TFit_SkelRoom__Fi(int t)')
del_items(2148811116)
set_type(2148811116, 'unsigned char TFit_GoatShrine__Fi(int t)')
del_items(2148811268)
set_type(2148811268, 'unsigned char CheckThemeObj3__Fiiii(int xp, int yp, int t, int f)')
del_items(2148811604)
set_type(2148811604, 'unsigned char TFit_Obj3__Fi(int t)')
del_items(2148811796)
set_type(2148811796, 'unsigned char CheckThemeReqs__Fi(int t)')
del_items(2148812000)
set_type(2148812000, 'unsigned char SpecialThemeFit__Fii(int i, int t)')
del_items(2148812476)
set_type(2148812476, 'unsigned char CheckThemeRoom__Fi(int tv)')
del_items(2148813160)
set_type(2148813160, 'void InitThemes__Fv()')
del_items(2148814004)
set_type(2148814004, 'void HoldThemeRooms__Fv()')
del_items(2148814236)
set_type(2148814236, 'void PlaceThemeMonsts__Fii(int t, int f)')
del_items(2148814656)
set_type(2148814656, 'void Theme_Barrel__Fi(int t)')
del_items(2148815032)
set_type(2148815032, 'void Theme_Shrine__Fi(int t)')
del_items(2148815264)
set_type(2148815264, 'void Theme_MonstPit__Fi(int t)')
del_items(2148815564)
set_type(2148815564, 'void Theme_SkelRoom__Fi(int t)')
del_items(2148816336)
set_type(2148816336, 'void Theme_Treasure__Fi(int t)')
del_items(2148816948)
set_type(2148816948, 'void Theme_Library__Fi(int t)')
del_items(2148817572)
set_type(2148817572, 'void Theme_Torture__Fi(int t)')
del_items(2148817940)
set_type(2148817940, 'void Theme_BloodFountain__Fi(int t)')
del_items(2148818056)
set_type(2148818056, 'void Theme_Decap__Fi(int t)')
del_items(2148818424)
set_type(2148818424, 'void Theme_PurifyingFountain__Fi(int t)')
del_items(2148818540)
set_type(2148818540, 'void Theme_ArmorStand__Fi(int t)')
del_items(2148818948)
set_type(2148818948, 'void Theme_GoatShrine__Fi(int t)')
del_items(2148819284)
set_type(2148819284, 'void Theme_Cauldron__Fi(int t)')
del_items(2148819400)
set_type(2148819400, 'void Theme_MurkyFountain__Fi(int t)')
del_items(2148819516)
set_type(2148819516, 'void Theme_TearFountain__Fi(int t)')
del_items(2148819632)
set_type(2148819632, 'void Theme_BrnCross__Fi(int t)')
del_items(2148820008)
set_type(2148820008, 'void Theme_WeaponRack__Fi(int t)')
del_items(2148820416)
set_type(2148820416, 'void UpdateL4Trans__Fv()')
del_items(2148820512)
set_type(2148820512, 'void CreateThemeRooms__Fv()')
del_items(2148820996)
set_type(2148820996, 'void InitPortals__Fv()')
del_items(2148821092)
set_type(2148821092, 'void InitQuests__Fv()')
del_items(2148822120)
set_type(2148822120, 'void DrawButcher__Fv()')
del_items(2148822188)
set_type(2148822188, 'void DrawSkelKing__Fiii(int q, int x, int y)')
del_items(2148822248)
set_type(2148822248, 'void DrawWarLord__Fii(int x, int y)')
del_items(2148822500)
set_type(2148822500, 'void DrawSChamber__Fiii(int q, int x, int y)')
del_items(2148822816)
set_type(2148822816, 'void DrawLTBanner__Fii(int x, int y)')
del_items(2148823036)
set_type(2148823036, 'void DrawBlind__Fii(int x, int y)')
del_items(2148823256)
set_type(2148823256, 'void DrawBlood__Fii(int x, int y)')
del_items(2148823480)
set_type(2148823480, 'void DRLG_CheckQuests__Fii(int x, int y)')
del_items(2148823796)
set_type(2148823796, 'void InitInv__Fv()')
del_items(2148823880)
set_type(2148823880, 'void InitAutomap__Fv()')
del_items(2148824332)
set_type(2148824332, 'void InitAutomapOnce__Fv()')
del_items(2148824348)
set_type(2148824348, 'unsigned char MonstPlace__Fii(int xp, int yp)')
del_items(2148824536)
set_type(2148824536, 'void InitMonsterGFX__Fi(int monst)')
del_items(2148824752)
set_type(2148824752, 'void PlaceMonster__Fiiii(int i, int mtype, int x, int y)')
del_items(2148824912)
set_type(2148824912, 'int AddMonsterType__Fii(int type, int placeflag)')
del_items(2148825164)
set_type(2148825164, 'void GetMonsterTypes__FUl(unsigned long QuestMask)')
del_items(2148825340)
set_type(2148825340, 'void ClrAllMonsters__Fv()')
del_items(2148825644)
set_type(2148825644, 'void InitLevelMonsters__Fv()')
del_items(2148825776)
set_type(2148825776, 'void GetLevelMTypes__Fv()')
del_items(2148826904)
set_type(2148826904, 'void PlaceQuestMonsters__Fv()')
del_items(2148827868)
set_type(2148827868, 'void LoadDiabMonsts__Fv()')
del_items(2148828140)
set_type(2148828140, 'void PlaceGroup__FiiUci(int mtype, int num, unsigned char leaderf, int leader)')
del_items(2148829596)
set_type(2148829596, 'void SetMapMonsters__FPUcii(unsigned char *pMap, int startx, int starty)')
del_items(2148830144)
set_type(2148830144, 'void InitMonsters__Fv()')
del_items(2148831088)
set_type(2148831088, 'void PlaceUniqueMonst__Fiii(int uniqindex, int miniontype, int unpackfilesize)')
del_items(2148832988)
set_type(2148832988, 'void PlaceUniques__Fv()')
del_items(2148833388)
set_type(2148833388, 'int PreSpawnSkeleton__Fv()')
del_items(2148833708)
set_type(2148833708, 'int encode_enemy__Fi(int m)')
del_items(2148833796)
set_type(2148833796, 'void decode_enemy__Fii(int m, int enemy)')
del_items(2148834068)
set_type(2148834068, 'unsigned char IsGoat__Fi(int mt)')
del_items(2148834112)
set_type(2148834112, 'void InitMissiles__Fv()')
del_items(2148834568)
set_type(2148834568, 'void InitNoTriggers__Fv()')
del_items(2148834604)
set_type(2148834604, 'void InitTownTriggers__Fv()')
del_items(2148835444)
set_type(2148835444, 'void InitL1Triggers__Fv()')
del_items(2148835720)
set_type(2148835720, 'void InitL2Triggers__Fv()')
del_items(2148836120)
set_type(2148836120, 'void InitL3Triggers__Fv()')
del_items(2148836468)
set_type(2148836468, 'void InitL4Triggers__Fv()')
del_items(2148837000)
set_type(2148837000, 'void InitSKingTriggers__Fv()')
del_items(2148837076)
set_type(2148837076, 'void InitSChambTriggers__Fv()')
del_items(2148837152)
set_type(2148837152, 'void InitPWaterTriggers__Fv()')
del_items(2148837228)
set_type(2148837228, 'void InitVPTriggers__Fv()')
del_items(2148837304)
set_type(2148837304, 'void InitStores__Fv()')
del_items(2148837432)
set_type(2148837432, 'void SetupTownStores__Fv()')
del_items(2148837832)
set_type(2148837832, 'void DeltaLoadLevel__Fv()')
del_items(2148840096)
set_type(2148840096, 'unsigned char SmithItemOk__Fi(int i)')
del_items(2148840196)
set_type(2148840196, 'int RndSmithItem__Fi(int lvl)')
del_items(2148840464)
set_type(2148840464, 'unsigned char WitchItemOk__Fi(int i)')
del_items(2148840784)
set_type(2148840784, 'int RndWitchItem__Fi(int lvl)')
del_items(2148841040)
set_type(2148841040, 'void BubbleSwapItem__FP10ItemStructT0(struct ItemStruct *a, struct ItemStruct *b)')
del_items(2148841268)
set_type(2148841268, 'void SortWitch__Fv()')
del_items(2148841556)
set_type(2148841556, 'int RndBoyItem__Fi(int lvl)')
del_items(2148841848)
set_type(2148841848, 'unsigned char HealerItemOk__Fi(int i)')
del_items(2148842284)
set_type(2148842284, 'int RndHealerItem__Fi(int lvl)')
del_items(2148842540)
set_type(2148842540, 'void RecreatePremiumItem__Fiiii(int ii, int idx, int plvl, int iseed)')
del_items(2148842740)
set_type(2148842740, 'void RecreateWitchItem__Fiiii(int ii, int idx, int lvl, int iseed)')
del_items(2148843084)
set_type(2148843084, 'void RecreateSmithItem__Fiiii(int ii, int idx, int lvl, int iseed)')
del_items(2148843240)
set_type(2148843240, 'void RecreateHealerItem__Fiiii(int ii, int idx, int lvl, int iseed)')
del_items(2148843432)
set_type(2148843432, 'void RecreateBoyItem__Fiiii(int ii, int idx, int lvl, int iseed)')
del_items(2148843628)
set_type(2148843628, 'void RecreateTownItem__FiiUsii(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue)')
del_items(2148843768)
set_type(2148843768, 'void SpawnSmith__Fi(int lvl)')
del_items(2148844180)
set_type(2148844180, 'void SpawnWitch__Fi(int lvl)')
del_items(2148845056)
set_type(2148845056, 'void SpawnHealer__Fi(int lvl)')
del_items(2148845852)
set_type(2148845852, 'void SpawnBoy__Fi(int lvl)')
del_items(2148846192)
set_type(2148846192, 'void SortSmith__Fv()')
del_items(2148846468)
set_type(2148846468, 'void SortHealer__Fv()')
del_items(2148846756)
set_type(2148846756, 'void RecreateItem__FiiUsii(int ii, int idx, unsigned short icreateinfo, int iseed, int ivalue)') |
# _*_ coding: utf-8 _*_
#
# Package: base
__all__ = ["firebase"]
| __all__ = ['firebase'] |
class Solution(object):
def mincostTickets(self, days, costs):
"""
:type days: List[int]
:type costs: List[int]
:rtype: int
"""
dp = []
dp.append((costs[0], days[0],))
dp.append((costs[1], days[0] + 6,))
dp.append((costs[2], days[0] + 29,))
for day in days[1:]:
mincost = None
remain = []
for pp in dp:
if pp[1] >= day:
remain.append(pp)
else:
mincost = min(mincost, pp[0]) if mincost else pp[0]
if mincost:
remain.append((mincost + costs[0], day,))
remain.append((mincost + costs[1], day + 6,))
remain.append((mincost + costs[2], day + 29,))
dp = remain
dp.sort()
return dp[0][0]
def test_mincost_tickets():
s = Solution()
assert 11 == s.mincostTickets([1, 4, 6, 7, 8, 20], [2, 7, 15])
assert 17 == s.mincostTickets(
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 30, 31], [2, 7, 15])
assert 50 == s.mincostTickets(
[1, 2, 3, 4, 6, 8, 9, 10, 13, 14, 16, 17, 19, 21, 24, 26, 27, 28, 29],
[3, 14, 50])
| class Solution(object):
def mincost_tickets(self, days, costs):
"""
:type days: List[int]
:type costs: List[int]
:rtype: int
"""
dp = []
dp.append((costs[0], days[0]))
dp.append((costs[1], days[0] + 6))
dp.append((costs[2], days[0] + 29))
for day in days[1:]:
mincost = None
remain = []
for pp in dp:
if pp[1] >= day:
remain.append(pp)
else:
mincost = min(mincost, pp[0]) if mincost else pp[0]
if mincost:
remain.append((mincost + costs[0], day))
remain.append((mincost + costs[1], day + 6))
remain.append((mincost + costs[2], day + 29))
dp = remain
dp.sort()
return dp[0][0]
def test_mincost_tickets():
s = solution()
assert 11 == s.mincostTickets([1, 4, 6, 7, 8, 20], [2, 7, 15])
assert 17 == s.mincostTickets([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 30, 31], [2, 7, 15])
assert 50 == s.mincostTickets([1, 2, 3, 4, 6, 8, 9, 10, 13, 14, 16, 17, 19, 21, 24, 26, 27, 28, 29], [3, 14, 50]) |
class SignalGenerator:
""" Signal generator class
It creates different signals depending on the events it's given.
Examplee of an events list:
[
{
"start": {
"value": 10
}
},
{
"step": {
"cycle": 100,
"value": 0
}
},
{
"ramp_up": {
"cycle": 200,
"value": 0.01 # increase in output per cycle
}
},
{
"ramp_down": {
"cycle": 300,
"value": 0.02 # increase in output per cycle
}
},
{
"pause": {
"cycle": 350
}
}
]
"""
def __init__(self, events, **kwargs):
self.events = events
self.current_value = [0]
self.cycles_with_events = self.get_cycles_with_events()
self.current_event = None
# set initial value if one is given
for el in events:
if "start" in el:
self.current_value[0] = el["start"]["value"]
def reset(self):
self.current_value = self.current_value[0:1]
self.current_event = None
def get_cycles_with_events(self):
""" Return a list with which cycles an event change will occur. """
cycles = []
for el in self.events:
for key in el:
if type(el[key]) == dict and "cycle" in el[key]:
cycles.append(el[key]["cycle"])
return cycles if len(cycles) > 0 else None
def calculate(self, cycle):
""" Calculates the next value and adds it to the memory """
# at first cycle just return the initial value
if cycle == 0:
self.current_value.append(self.current_value[0])
return self.current_value[0]
# update current event
if self.cycles_with_events:
if cycle in self.cycles_with_events:
self.current_event = self.get_event_by_cycle(cycle)
# run current event
if self.current_event:
key = list(self.current_event)[0]
updater = getattr(self, key, None)
if callable(updater):
updater()
else:
self.current_value.append(self.current_value[-1])
return self.current_value[-1]
def get_event_by_cycle(self, cycle):
""" Find the type of event based on a given cycle """
for el in self.events:
for key in el:
if type(el[key]) == dict and "cycle" in el[key]:
if el[key]["cycle"] == cycle:
return el
# event functions
def step(self):
""" Create a step as the next value and adds it to the memory """
value = self.current_event["step"]["value"]
self.current_value.append(value)
def ramp_up(self):
""" Ramps up the next value and adds it to the memory """
value = self.current_event["ramp_up"]["value"]
self.current_value.append(self.current_value[-1] + value)
def ramp_down(self):
""" Ramps down the next value and adds it to the memory """
value = self.current_event["ramp_down"]["value"]
self.current_value.append(self.current_value[-1] - value)
def pause(self):
""" Maintain the current value and adds it to the memory """
# no need to update the current value
self.current_value.append(self.current_value[-1])
pass
| class Signalgenerator:
""" Signal generator class
It creates different signals depending on the events it's given.
Examplee of an events list:
[
{
"start": {
"value": 10
}
},
{
"step": {
"cycle": 100,
"value": 0
}
},
{
"ramp_up": {
"cycle": 200,
"value": 0.01 # increase in output per cycle
}
},
{
"ramp_down": {
"cycle": 300,
"value": 0.02 # increase in output per cycle
}
},
{
"pause": {
"cycle": 350
}
}
]
"""
def __init__(self, events, **kwargs):
self.events = events
self.current_value = [0]
self.cycles_with_events = self.get_cycles_with_events()
self.current_event = None
for el in events:
if 'start' in el:
self.current_value[0] = el['start']['value']
def reset(self):
self.current_value = self.current_value[0:1]
self.current_event = None
def get_cycles_with_events(self):
""" Return a list with which cycles an event change will occur. """
cycles = []
for el in self.events:
for key in el:
if type(el[key]) == dict and 'cycle' in el[key]:
cycles.append(el[key]['cycle'])
return cycles if len(cycles) > 0 else None
def calculate(self, cycle):
""" Calculates the next value and adds it to the memory """
if cycle == 0:
self.current_value.append(self.current_value[0])
return self.current_value[0]
if self.cycles_with_events:
if cycle in self.cycles_with_events:
self.current_event = self.get_event_by_cycle(cycle)
if self.current_event:
key = list(self.current_event)[0]
updater = getattr(self, key, None)
if callable(updater):
updater()
else:
self.current_value.append(self.current_value[-1])
return self.current_value[-1]
def get_event_by_cycle(self, cycle):
""" Find the type of event based on a given cycle """
for el in self.events:
for key in el:
if type(el[key]) == dict and 'cycle' in el[key]:
if el[key]['cycle'] == cycle:
return el
def step(self):
""" Create a step as the next value and adds it to the memory """
value = self.current_event['step']['value']
self.current_value.append(value)
def ramp_up(self):
""" Ramps up the next value and adds it to the memory """
value = self.current_event['ramp_up']['value']
self.current_value.append(self.current_value[-1] + value)
def ramp_down(self):
""" Ramps down the next value and adds it to the memory """
value = self.current_event['ramp_down']['value']
self.current_value.append(self.current_value[-1] - value)
def pause(self):
""" Maintain the current value and adds it to the memory """
self.current_value.append(self.current_value[-1])
pass |
###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
# All rights reserved. This program and the accompanying materials #
# are made available under the terms of the Apache License, Version 2.0 #
# which accompanies this distribution, and is available at #
# http://www.apache.org/licenses/LICENSE-2.0 #
###############################################################################
HOST = {
"config" : {
"metadata_proxy_socket" : "/opt/stack/data/neutron/metadata_proxy",
"nova_metadata_ip" : "192.168.20.14",
"log_agent_heartbeats" : False
},
"environment" : "Devstack-VPP-2",
"host" : "ubuntu0",
"host_type" : [
"Controller",
"Compute",
"Network"
],
"id" : "ubuntu0",
"id_path" : "/Devstack-VPP-2/Devstack-VPP-2-regions/RegionOne/RegionOne-availability_zones/nova/ubuntu0",
"ip_address" : "192.168.20.14",
"name" : "ubuntu0",
"name_path" : "/Devstack-VPP-2/Regions/RegionOne/Availability Zones/nova/ubuntu0",
"object_name" : "ubuntu0",
"os_id" : "1",
"parent_id" : "nova",
"parent_type" : "availability_zone",
"services" : {
"nova-conductor" : {
"available" : True,
"active" : True,
"updated_at" : "2016-08-30T09:18:58.000000"
},
"nova-scheduler" : {
"available" : True,
"active" : True,
"updated_at" : "2016-08-30T09:18:54.000000"
},
"nova-consoleauth" : {
"available" : True,
"active" : True,
"updated_at" : "2016-08-30T09:18:54.000000"
}
},
"show_in_tree" : True,
"type" : "host",
"zone" : "nova"
}
WRONG_HOST = {
"show_in_tree" : True,
"type" : "host",
"zone" : "nova"
}
VCONNECTORS_FOLDER = {
"create_object" : True,
"environment" : "Mirantis-Liberty-Xiaocong",
"id" : "node-6.cisco.com-vconnectors",
"id_path" : "/Mirantis-Liberty-Xiaocong/Mirantis-Liberty-Xiaocong-regions/RegionOne/RegionOne-availability_zones/internal/node-6.cisco.com/node-6.cisco.com-vconnectors",
"name" : "vConnectors",
"name_path" : "/Mirantis-Liberty-Xiaocong/Regions/RegionOne/Availability Zones/internal/node-6.cisco.com/vConnectors",
"object_name" : "vConnectors",
"parent_id" : "node-6.cisco.com",
"parent_type" : "host",
"show_in_tree" : True,
"text" : "vConnectors",
"type" : "vconnectors_folder"
}
VCONNECTORS = [
{
"bd_id": "5678",
"host": "ubuntu0",
"id": "ubuntu0-vconnector-5678",
"interfaces": {
"name": {
"hardware": "VirtualEthernet0/0/8",
"id": "15",
"mac_address": "fa:16:3e:d1:98:73",
"name": "VirtualEthernet0/0/8",
"state": "up"
}
},
"interfaces_names": [
"TenGigabitEthernetc/0/0",
"VirtualEthernet0/0/0",
"VirtualEthernet0/0/1",
"VirtualEthernet0/0/2",
"VirtualEthernet0/0/3",
"VirtualEthernet0/0/4",
"VirtualEthernet0/0/5",
"VirtualEthernet0/0/6",
"VirtualEthernet0/0/7",
"VirtualEthernet0/0/8"
],
"name": "bridge-domain-5678"
}
] | host = {'config': {'metadata_proxy_socket': '/opt/stack/data/neutron/metadata_proxy', 'nova_metadata_ip': '192.168.20.14', 'log_agent_heartbeats': False}, 'environment': 'Devstack-VPP-2', 'host': 'ubuntu0', 'host_type': ['Controller', 'Compute', 'Network'], 'id': 'ubuntu0', 'id_path': '/Devstack-VPP-2/Devstack-VPP-2-regions/RegionOne/RegionOne-availability_zones/nova/ubuntu0', 'ip_address': '192.168.20.14', 'name': 'ubuntu0', 'name_path': '/Devstack-VPP-2/Regions/RegionOne/Availability Zones/nova/ubuntu0', 'object_name': 'ubuntu0', 'os_id': '1', 'parent_id': 'nova', 'parent_type': 'availability_zone', 'services': {'nova-conductor': {'available': True, 'active': True, 'updated_at': '2016-08-30T09:18:58.000000'}, 'nova-scheduler': {'available': True, 'active': True, 'updated_at': '2016-08-30T09:18:54.000000'}, 'nova-consoleauth': {'available': True, 'active': True, 'updated_at': '2016-08-30T09:18:54.000000'}}, 'show_in_tree': True, 'type': 'host', 'zone': 'nova'}
wrong_host = {'show_in_tree': True, 'type': 'host', 'zone': 'nova'}
vconnectors_folder = {'create_object': True, 'environment': 'Mirantis-Liberty-Xiaocong', 'id': 'node-6.cisco.com-vconnectors', 'id_path': '/Mirantis-Liberty-Xiaocong/Mirantis-Liberty-Xiaocong-regions/RegionOne/RegionOne-availability_zones/internal/node-6.cisco.com/node-6.cisco.com-vconnectors', 'name': 'vConnectors', 'name_path': '/Mirantis-Liberty-Xiaocong/Regions/RegionOne/Availability Zones/internal/node-6.cisco.com/vConnectors', 'object_name': 'vConnectors', 'parent_id': 'node-6.cisco.com', 'parent_type': 'host', 'show_in_tree': True, 'text': 'vConnectors', 'type': 'vconnectors_folder'}
vconnectors = [{'bd_id': '5678', 'host': 'ubuntu0', 'id': 'ubuntu0-vconnector-5678', 'interfaces': {'name': {'hardware': 'VirtualEthernet0/0/8', 'id': '15', 'mac_address': 'fa:16:3e:d1:98:73', 'name': 'VirtualEthernet0/0/8', 'state': 'up'}}, 'interfaces_names': ['TenGigabitEthernetc/0/0', 'VirtualEthernet0/0/0', 'VirtualEthernet0/0/1', 'VirtualEthernet0/0/2', 'VirtualEthernet0/0/3', 'VirtualEthernet0/0/4', 'VirtualEthernet0/0/5', 'VirtualEthernet0/0/6', 'VirtualEthernet0/0/7', 'VirtualEthernet0/0/8'], 'name': 'bridge-domain-5678'}] |
@fields({"dollars": Int, "cents": Int})
class Cash:
dollars = 0
cents = 0
def add_dollars(self, dollars):
self.dollars += dollars
def get_cash()->Cash:
c = Cash()
c.add_dollars(3.14159)
return c
get_cash()
| @fields({'dollars': Int, 'cents': Int})
class Cash:
dollars = 0
cents = 0
def add_dollars(self, dollars):
self.dollars += dollars
def get_cash() -> Cash:
c = cash()
c.add_dollars(3.14159)
return c
get_cash() |
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def reverseList(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
node_list = []
if head == None:
return None
while head:
node_list.append(head)
head = head.next
for i in range(len(node_list) - 1, -1, -1):
if i == 0:
node_list[i].next = None
else:
node_list[i].next = node_list[i - 1]
start = len(node_list) - 1
return node_list[start]
| class Solution(object):
def reverse_list(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
node_list = []
if head == None:
return None
while head:
node_list.append(head)
head = head.next
for i in range(len(node_list) - 1, -1, -1):
if i == 0:
node_list[i].next = None
else:
node_list[i].next = node_list[i - 1]
start = len(node_list) - 1
return node_list[start] |
"""
Given a string, find the longest palindromic contiguous substring.
If there are more than one with the maximum length, return any one.
For example,
the longest palindromic substring of "aabcdcb" is "bcdcb".
The longest palindromic substring of "bananas" is "anana".
"""
def longest_palindromic_substring(text: str) -> str:
"""
Dynamic Programming.
Time Complexity: O(n*n)
Space Complexity: O(n*n)
"""
length = len(text)
if length < 2:
return text
dp = [[1] * length for _ in range(length)]
max_start, max_end, max_len = 0, 0, 1
for str_len in range(1, length):
start = 0
for end in range(start + str_len, length):
if text[start] == text[end]:
if start == end - 1:
dp[start][end] = 2
else:
dp[start][end] = dp[start + 1][end - 1] + 2
if dp[start][end] > max_len:
max_len = end - start + 1
max_start = start
max_end = end
else:
dp[start][end] = max(dp[start + 1][end], dp[start][end - 1])
start += 1
return text[max_start: max_end + 1]
if __name__ == "__main__":
assert longest_palindromic_substring("aabcdcb") == "bcdcb"
assert longest_palindromic_substring("bananas") == "anana"
| """
Given a string, find the longest palindromic contiguous substring.
If there are more than one with the maximum length, return any one.
For example,
the longest palindromic substring of "aabcdcb" is "bcdcb".
The longest palindromic substring of "bananas" is "anana".
"""
def longest_palindromic_substring(text: str) -> str:
"""
Dynamic Programming.
Time Complexity: O(n*n)
Space Complexity: O(n*n)
"""
length = len(text)
if length < 2:
return text
dp = [[1] * length for _ in range(length)]
(max_start, max_end, max_len) = (0, 0, 1)
for str_len in range(1, length):
start = 0
for end in range(start + str_len, length):
if text[start] == text[end]:
if start == end - 1:
dp[start][end] = 2
else:
dp[start][end] = dp[start + 1][end - 1] + 2
if dp[start][end] > max_len:
max_len = end - start + 1
max_start = start
max_end = end
else:
dp[start][end] = max(dp[start + 1][end], dp[start][end - 1])
start += 1
return text[max_start:max_end + 1]
if __name__ == '__main__':
assert longest_palindromic_substring('aabcdcb') == 'bcdcb'
assert longest_palindromic_substring('bananas') == 'anana' |
n = int(input())
k = int(input())
x = int(input())
y = int(input())
if n > k:
print(x * k + (n - k) * y)
else:
print(x * n) | n = int(input())
k = int(input())
x = int(input())
y = int(input())
if n > k:
print(x * k + (n - k) * y)
else:
print(x * n) |
class BrawlerNotFound(Exception):
"""Exception raised when a Brawler can't be found from given
partial name.
"""
| class Brawlernotfound(Exception):
"""Exception raised when a Brawler can't be found from given
partial name.
""" |
class Player(object):
def __init__(self, player_id, region_id):
self.player_id = player_id
self.region_id = region_id
self.inventory = []
def tick(self):
for item in inventory:
item.tick()
| class Player(object):
def __init__(self, player_id, region_id):
self.player_id = player_id
self.region_id = region_id
self.inventory = []
def tick(self):
for item in inventory:
item.tick() |
motorcycles = ['honda', 'yamaha', 'suzuki']
print(motorcycles)
motorcycles[0] = 'ducati'
print(motorcycles) | motorcycles = ['honda', 'yamaha', 'suzuki']
print(motorcycles)
motorcycles[0] = 'ducati'
print(motorcycles) |
def headers(token):
return { 'Authorization': f'Bearer {token}', 'content-type': 'application/json'}
flight_data = { "name": "American airline"}
user_data = {
'email': 'myadminss@example.com',
'username': 'myadminss',
'is_staff': True,
"password":"education",
} | def headers(token):
return {'Authorization': f'Bearer {token}', 'content-type': 'application/json'}
flight_data = {'name': 'American airline'}
user_data = {'email': 'myadminss@example.com', 'username': 'myadminss', 'is_staff': True, 'password': 'education'} |
"""
sphinxcontrib.autohttp
~~~~~~~~~~~~~~~~~~~~~~
The sphinx.ext.autodoc-style HTTP API reference builder
for sphinxcontrib.httpdomain.
:copyright: Copyright 2011 by Hong Minhee
:license: BSD, see LICENSE for details.
"""
| """
sphinxcontrib.autohttp
~~~~~~~~~~~~~~~~~~~~~~
The sphinx.ext.autodoc-style HTTP API reference builder
for sphinxcontrib.httpdomain.
:copyright: Copyright 2011 by Hong Minhee
:license: BSD, see LICENSE for details.
""" |
# It's a BST!
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def lowestCommonAncestor(self, root, p, q):
s, b = sorted([p.val, q.val])
while not s <= root.val <= b:
root = root.left if s <= root.val else root.right
return root
if __name__ == "__main__":
l1 = TreeNode(6)
l2 = TreeNode(2)
l3 = TreeNode(8)
l4 = TreeNode(0)
l5 = TreeNode(4)
l6 = TreeNode(7)
l7 = TreeNode(9)
l8 = TreeNode(3)
l9 = TreeNode(5)
l1.left = l2
l1.right = l3
l2.left = l4
l2.right = l5
l3.left = l6
l3.right = l7
l5.left = l8
l5.right = l9
s = Solution()
print(s.lowestCommonAncestor(l1, l2, l5).val) | class Treenode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def lowest_common_ancestor(self, root, p, q):
(s, b) = sorted([p.val, q.val])
while not s <= root.val <= b:
root = root.left if s <= root.val else root.right
return root
if __name__ == '__main__':
l1 = tree_node(6)
l2 = tree_node(2)
l3 = tree_node(8)
l4 = tree_node(0)
l5 = tree_node(4)
l6 = tree_node(7)
l7 = tree_node(9)
l8 = tree_node(3)
l9 = tree_node(5)
l1.left = l2
l1.right = l3
l2.left = l4
l2.right = l5
l3.left = l6
l3.right = l7
l5.left = l8
l5.right = l9
s = solution()
print(s.lowestCommonAncestor(l1, l2, l5).val) |
'''
This problem was asked by Google.
Given k sorted singly linked lists, write a function to merge all the lists into one sorted singly linked list.
It has already been solved in:
https://github.com/loghmanb/daily-coding-problem/blob/master/google_merge_k_sorted_list.py
''' | """
This problem was asked by Google.
Given k sorted singly linked lists, write a function to merge all the lists into one sorted singly linked list.
It has already been solved in:
https://github.com/loghmanb/daily-coding-problem/blob/master/google_merge_k_sorted_list.py
""" |
# Your task is to add up letters to one letter.
# The function will be given a variable amount of arguments, each one being a letter to add.
# https://www.codewars.com/kata/5d50e3914861a500121e1958
# https://www.codewars.com/kata/5d50e3914861a500121e1958/solutions/python
def add_letters(*letters):
char_num = 0
for character in letters:
char_num = char_num + ord(character) - 96
if (char_num == 0 or char_num % 26 == 0):
return "z"
else:
return chr(char_num % 26 + 96)
print(add_letters('z'))
# Best clever
def add_letters_clever(*letters):
return chr( (sum(ord(c)-96 for c in letters)-1)%26 + 97)
# Nice
num = 'abcdefghijklmnopqrstuvwxyz'
def add_letters_nice(*letters):
x = 0
x = sum(num.index(i)+1 for i in letters)
while x-1 > 25:
x -= 26
return num[x-1] | def add_letters(*letters):
char_num = 0
for character in letters:
char_num = char_num + ord(character) - 96
if char_num == 0 or char_num % 26 == 0:
return 'z'
else:
return chr(char_num % 26 + 96)
print(add_letters('z'))
def add_letters_clever(*letters):
return chr((sum((ord(c) - 96 for c in letters)) - 1) % 26 + 97)
num = 'abcdefghijklmnopqrstuvwxyz'
def add_letters_nice(*letters):
x = 0
x = sum((num.index(i) + 1 for i in letters))
while x - 1 > 25:
x -= 26
return num[x - 1] |
class City:
def __init__(self, name):
self.name = name
self.routes = {}
def add_route(self, city, price_info):
self.routes[city] = price_info
atlanta = City("Atlanta")
boston = City("Boston")
chicago = City("Chicago")
denver = City("Denver")
el_paso = City("El Paso")
atlanta.add_route(boston, 100)
atlanta.add_route(denver, 160)
boston.add_route(chicago, 120)
boston.add_route(denver, 180)
chicago.add_route(el_paso, 80)
denver.add_route(chicago, 40)
denver.add_route(el_paso, 140)
def dijkstra(starting_city, other_cities):
routes_from_city = {starting_city: [0, starting_city]}
for city in other_cities:
routes_from_city[city] = [None, None]
visited_cities = []
current_city = starting_city
while current_city:
visited_cities.append(current_city)
for city, price_info in current_city.routes.items():
if routes_from_city[city][0] is None or \
routes_from_city[city][0] > price_info + routes_from_city[current_city][0]:
routes_from_city[city] = [price_info + routes_from_city[current_city][0], current_city]
current_city = None
cheapest_route_from_current_city = None
for city, routes_info in routes_from_city.items():
if city is starting_city or routes_info[0] is None or city in visited_cities:
pass
elif cheapest_route_from_current_city is None or routes_info[0] < cheapest_route_from_current_city:
cheapest_route_from_current_city = routes_info[0]
current_city = city
return routes_from_city
routes = dijkstra(atlanta, [boston, chicago, denver, el_paso])
for city_to_print, route_to_print in routes.items():
print("{0} : {1}".format(city_to_print.name, route_to_print[0]))
| class City:
def __init__(self, name):
self.name = name
self.routes = {}
def add_route(self, city, price_info):
self.routes[city] = price_info
atlanta = city('Atlanta')
boston = city('Boston')
chicago = city('Chicago')
denver = city('Denver')
el_paso = city('El Paso')
atlanta.add_route(boston, 100)
atlanta.add_route(denver, 160)
boston.add_route(chicago, 120)
boston.add_route(denver, 180)
chicago.add_route(el_paso, 80)
denver.add_route(chicago, 40)
denver.add_route(el_paso, 140)
def dijkstra(starting_city, other_cities):
routes_from_city = {starting_city: [0, starting_city]}
for city in other_cities:
routes_from_city[city] = [None, None]
visited_cities = []
current_city = starting_city
while current_city:
visited_cities.append(current_city)
for (city, price_info) in current_city.routes.items():
if routes_from_city[city][0] is None or routes_from_city[city][0] > price_info + routes_from_city[current_city][0]:
routes_from_city[city] = [price_info + routes_from_city[current_city][0], current_city]
current_city = None
cheapest_route_from_current_city = None
for (city, routes_info) in routes_from_city.items():
if city is starting_city or routes_info[0] is None or city in visited_cities:
pass
elif cheapest_route_from_current_city is None or routes_info[0] < cheapest_route_from_current_city:
cheapest_route_from_current_city = routes_info[0]
current_city = city
return routes_from_city
routes = dijkstra(atlanta, [boston, chicago, denver, el_paso])
for (city_to_print, route_to_print) in routes.items():
print('{0} : {1}'.format(city_to_print.name, route_to_print[0])) |
def replacePi(s):
if(len(s) <= 2):
return s
if(s[0] == "p" and s[1] == "i"):
print("3.14",end='')
replacePi(s[2:])
else :
print(s[0],end="")
replacePi(s[1:])
s = input()
replacePi(s) | def replace_pi(s):
if len(s) <= 2:
return s
if s[0] == 'p' and s[1] == 'i':
print('3.14', end='')
replace_pi(s[2:])
else:
print(s[0], end='')
replace_pi(s[1:])
s = input()
replace_pi(s) |
def format_sentence(sent):
sent_text = sent["sent_text"]
sent_start, _ = sent["sent_span"]
fmt_text = str(sent_text)
for mention_text, mention_start, mention_end in sorted(sent["mentions"], key=lambda x: x[1], reverse=True):
mention_start, mention_end = mention_start - sent_start, mention_end - sent_start
fmt_text = fmt_text[:mention_start] + f"<b>{mention_text}</b>" + fmt_text[mention_end:]
return f'<span class="selected_sentence">{fmt_text}</span>'
def format_text(text, sentences):
fmt_text = str(text)
for sent in sentences[::-1]:
sent_start, sent_end = sent["sent_span"]
fmt_text = fmt_text[:sent_start] + format_sentence(sent) + fmt_text[sent_end:]
return fmt_text.replace("\n", "<br>")
| def format_sentence(sent):
sent_text = sent['sent_text']
(sent_start, _) = sent['sent_span']
fmt_text = str(sent_text)
for (mention_text, mention_start, mention_end) in sorted(sent['mentions'], key=lambda x: x[1], reverse=True):
(mention_start, mention_end) = (mention_start - sent_start, mention_end - sent_start)
fmt_text = fmt_text[:mention_start] + f'<b>{mention_text}</b>' + fmt_text[mention_end:]
return f'<span class="selected_sentence">{fmt_text}</span>'
def format_text(text, sentences):
fmt_text = str(text)
for sent in sentences[::-1]:
(sent_start, sent_end) = sent['sent_span']
fmt_text = fmt_text[:sent_start] + format_sentence(sent) + fmt_text[sent_end:]
return fmt_text.replace('\n', '<br>') |
# assign table and gis_input file required column names
mid_col = 'model_id'
gid_col = 'gauge_id'
asgn_mid_col = 'assigned_model_id'
asgn_gid_col = 'assigned_gauge_id'
down_mid_col = 'downstream_model_id'
reason_col = 'reason'
area_col = 'drain_area'
order_col = 'stream_order'
# name of some of the files produced by the algorithm
cluster_count_file = 'best-fit-cluster-count.json'
cal_nc_name = 'calibrated_simulated_flow.nc'
sim_ts_pickle = 'sim_time_series.pickle'
# metrics computed on validation sets
metric_list = ["ME", 'MAE', "RMSE", "NRMSE (Mean)", "MAPE", "NSE", "KGE (2012)"]
metric_nc_name_list = ['ME', 'MAE', 'RMSE', 'NRMSE', 'MAPE', 'NSE', 'KGE2012']
| mid_col = 'model_id'
gid_col = 'gauge_id'
asgn_mid_col = 'assigned_model_id'
asgn_gid_col = 'assigned_gauge_id'
down_mid_col = 'downstream_model_id'
reason_col = 'reason'
area_col = 'drain_area'
order_col = 'stream_order'
cluster_count_file = 'best-fit-cluster-count.json'
cal_nc_name = 'calibrated_simulated_flow.nc'
sim_ts_pickle = 'sim_time_series.pickle'
metric_list = ['ME', 'MAE', 'RMSE', 'NRMSE (Mean)', 'MAPE', 'NSE', 'KGE (2012)']
metric_nc_name_list = ['ME', 'MAE', 'RMSE', 'NRMSE', 'MAPE', 'NSE', 'KGE2012'] |
__all__ = ["aobject"]
class aobject(object):
"""
Base class for objects with an async ``__init__`` method.
Creating an instance of ``aobject`` requires awaiting, e.g. ``await aobject()``.
"""
async def __new__(cls, *a, **kw):
instance = super().__new__(cls)
await instance.__init__(*a, **kw)
return instance
async def __init__(self):
pass
| __all__ = ['aobject']
class Aobject(object):
"""
Base class for objects with an async ``__init__`` method.
Creating an instance of ``aobject`` requires awaiting, e.g. ``await aobject()``.
"""
async def __new__(cls, *a, **kw):
instance = super().__new__(cls)
await instance.__init__(*a, **kw)
return instance
async def __init__(self):
pass |
#
# PySNMP MIB module SNMPv2-TC-v1 (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SNMPv2-TC-v1
# Produced by pysmi-0.3.4 at Wed May 1 11:31:22 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection, ValueRangeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ValueRangeConstraint", "ConstraintsUnion")
NotificationGroup, ModuleCompliance = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance")
Counter64, Bits, ObjectIdentity, Counter32, Integer32, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, IpAddress, Unsigned32, TimeTicks, NotificationType, MibIdentifier, Gauge32, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Counter64", "Bits", "ObjectIdentity", "Counter32", "Integer32", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "IpAddress", "Unsigned32", "TimeTicks", "NotificationType", "MibIdentifier", "Gauge32", "iso")
TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString")
class DisplayString(OctetString):
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(0, 255)
class PhysAddress(OctetString):
pass
class MacAddress(OctetString):
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(6, 6)
fixedLength = 6
class TruthValue(Integer32):
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2))
namedValues = NamedValues(("true", 1), ("false", 2))
class TestAndIncr(Integer32):
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 2147483647)
class AutonomousType(ObjectIdentifier):
pass
class InstancePointer(ObjectIdentifier):
pass
class VariablePointer(ObjectIdentifier):
pass
class RowPointer(ObjectIdentifier):
pass
class RowStatus(Integer32):
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))
namedValues = NamedValues(("active", 1), ("notInService", 2), ("notReady", 3), ("createAndGo", 4), ("createAndWait", 5), ("destroy", 6))
class TimeStamp(TimeTicks):
pass
class TimeInterval(Integer32):
subtypeSpec = Integer32.subtypeSpec + ValueRangeConstraint(0, 2147483647)
class DateAndTime(OctetString):
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(11, 11)
fixedLength = 11
class StorageType(Integer32):
subtypeSpec = Integer32.subtypeSpec + ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5))
namedValues = NamedValues(("other", 1), ("volatile", 2), ("nonVolatile", 3), ("permanent", 4), ("readOnly", 5))
class TDomain(ObjectIdentifier):
pass
class TAddress(OctetString):
subtypeSpec = OctetString.subtypeSpec + ValueSizeConstraint(1, 255)
mibBuilder.exportSymbols("SNMPv2-TC-v1", TestAndIncr=TestAndIncr, TimeInterval=TimeInterval, MacAddress=MacAddress, RowStatus=RowStatus, StorageType=StorageType, TDomain=TDomain, RowPointer=RowPointer, VariablePointer=VariablePointer, DateAndTime=DateAndTime, DisplayString=DisplayString, TruthValue=TruthValue, PhysAddress=PhysAddress, AutonomousType=AutonomousType, TimeStamp=TimeStamp, TAddress=TAddress, InstancePointer=InstancePointer)
| (octet_string, integer, object_identifier) = mibBuilder.importSymbols('ASN1', 'OctetString', 'Integer', 'ObjectIdentifier')
(named_values,) = mibBuilder.importSymbols('ASN1-ENUMERATION', 'NamedValues')
(value_size_constraint, single_value_constraint, constraints_intersection, value_range_constraint, constraints_union) = mibBuilder.importSymbols('ASN1-REFINEMENT', 'ValueSizeConstraint', 'SingleValueConstraint', 'ConstraintsIntersection', 'ValueRangeConstraint', 'ConstraintsUnion')
(notification_group, module_compliance) = mibBuilder.importSymbols('SNMPv2-CONF', 'NotificationGroup', 'ModuleCompliance')
(counter64, bits, object_identity, counter32, integer32, module_identity, mib_scalar, mib_table, mib_table_row, mib_table_column, ip_address, unsigned32, time_ticks, notification_type, mib_identifier, gauge32, iso) = mibBuilder.importSymbols('SNMPv2-SMI', 'Counter64', 'Bits', 'ObjectIdentity', 'Counter32', 'Integer32', 'ModuleIdentity', 'MibScalar', 'MibTable', 'MibTableRow', 'MibTableColumn', 'IpAddress', 'Unsigned32', 'TimeTicks', 'NotificationType', 'MibIdentifier', 'Gauge32', 'iso')
(textual_convention, display_string) = mibBuilder.importSymbols('SNMPv2-TC', 'TextualConvention', 'DisplayString')
class Displaystring(OctetString):
subtype_spec = OctetString.subtypeSpec + value_size_constraint(0, 255)
class Physaddress(OctetString):
pass
class Macaddress(OctetString):
subtype_spec = OctetString.subtypeSpec + value_size_constraint(6, 6)
fixed_length = 6
class Truthvalue(Integer32):
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2))
named_values = named_values(('true', 1), ('false', 2))
class Testandincr(Integer32):
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 2147483647)
class Autonomoustype(ObjectIdentifier):
pass
class Instancepointer(ObjectIdentifier):
pass
class Variablepointer(ObjectIdentifier):
pass
class Rowpointer(ObjectIdentifier):
pass
class Rowstatus(Integer32):
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5, 6))
named_values = named_values(('active', 1), ('notInService', 2), ('notReady', 3), ('createAndGo', 4), ('createAndWait', 5), ('destroy', 6))
class Timestamp(TimeTicks):
pass
class Timeinterval(Integer32):
subtype_spec = Integer32.subtypeSpec + value_range_constraint(0, 2147483647)
class Dateandtime(OctetString):
subtype_spec = OctetString.subtypeSpec + value_size_constraint(11, 11)
fixed_length = 11
class Storagetype(Integer32):
subtype_spec = Integer32.subtypeSpec + constraints_union(single_value_constraint(1, 2, 3, 4, 5))
named_values = named_values(('other', 1), ('volatile', 2), ('nonVolatile', 3), ('permanent', 4), ('readOnly', 5))
class Tdomain(ObjectIdentifier):
pass
class Taddress(OctetString):
subtype_spec = OctetString.subtypeSpec + value_size_constraint(1, 255)
mibBuilder.exportSymbols('SNMPv2-TC-v1', TestAndIncr=TestAndIncr, TimeInterval=TimeInterval, MacAddress=MacAddress, RowStatus=RowStatus, StorageType=StorageType, TDomain=TDomain, RowPointer=RowPointer, VariablePointer=VariablePointer, DateAndTime=DateAndTime, DisplayString=DisplayString, TruthValue=TruthValue, PhysAddress=PhysAddress, AutonomousType=AutonomousType, TimeStamp=TimeStamp, TAddress=TAddress, InstancePointer=InstancePointer) |
"""Constants used by pysysbot."""
VERSION = '0.3.0'
AUTHOR_EMAIL = "Fabian Affolter <fabian@affolter-engineering.ch>"
| """Constants used by pysysbot."""
version = '0.3.0'
author_email = 'Fabian Affolter <fabian@affolter-engineering.ch>' |
n = int(input())
people = []
for i in range(n):
a, b = input().split()
people.append((int(a), b, i))
people.sort(key=lambda x:(x[0], x[2]))
for p in people:
print(p[0], p[1]) | n = int(input())
people = []
for i in range(n):
(a, b) = input().split()
people.append((int(a), b, i))
people.sort(key=lambda x: (x[0], x[2]))
for p in people:
print(p[0], p[1]) |
#https://leetcode.com/problems/last-substring-in-lexicographical-order/discuss/369191/JavaScript-with-Explanation-no-substring-comparison-fast-O(n)-time-O(1)-space.-(Credit-to-nate17)
def lastSubstring(input):
start = end = 0
skip = 1
while (skip+end) < len(input):
if input[start+end] == input[skip+end]:
end += 1
elif input[start+end] < input[skip+end]:
start = max(start+end+1,skip)
skip = start+1
end= 0
elif input[start+end] > input[skip+end]:
skip = skip+end+1
end=0
return input[start:]
print(lastSubstring('zyxbzyxc')) | def last_substring(input):
start = end = 0
skip = 1
while skip + end < len(input):
if input[start + end] == input[skip + end]:
end += 1
elif input[start + end] < input[skip + end]:
start = max(start + end + 1, skip)
skip = start + 1
end = 0
elif input[start + end] > input[skip + end]:
skip = skip + end + 1
end = 0
return input[start:]
print(last_substring('zyxbzyxc')) |
# =============================================================================
# Python examples - if else
# =============================================================================
seq = [1,2,3]
if len(seq) == 0:
print("sequence is empty")
elif len(seq) == 1:
print("sequence contains one element")
else:
print("sequence contains several elements")
# -----------------------------------------------------------------------------
# If shorthand (Ternary operator)
# -----------------------------------------------------------------------------
a = 5
b = 3
x = 10 if a > b else 1 # better readable
y = a > b and 10 or 1 # style more like java or other languages
print(x)
print(y)
# =============================================================================
# The end. | seq = [1, 2, 3]
if len(seq) == 0:
print('sequence is empty')
elif len(seq) == 1:
print('sequence contains one element')
else:
print('sequence contains several elements')
a = 5
b = 3
x = 10 if a > b else 1
y = a > b and 10 or 1
print(x)
print(y) |
class StatcordException(Exception):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
class RequestFailure(StatcordException):
def __init__(self, status: int, response: str):
super().__init__("{}: {}".format(status, response))
| class Statcordexception(Exception):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
class Requestfailure(StatcordException):
def __init__(self, status: int, response: str):
super().__init__('{}: {}'.format(status, response)) |
def get_paths(root, format='jpg', paths_count=None):
path_i = 0
paths = []
for path in root.glob(f'**/*.{format}'):
if path_i == paths_count:
break
paths.append(path)
path_i += 1
return paths
def get_train_val_paths(root, format='jpg', val_size=0.2, paths_count=None):
paths = get_paths(root, format=format, paths_count=paths_count)
if paths_count is None:
paths_count = len(paths)
val_count = int(val_size * paths_count)
train_count = paths_count - val_count
return paths[:train_count], paths[train_count:]
| def get_paths(root, format='jpg', paths_count=None):
path_i = 0
paths = []
for path in root.glob(f'**/*.{format}'):
if path_i == paths_count:
break
paths.append(path)
path_i += 1
return paths
def get_train_val_paths(root, format='jpg', val_size=0.2, paths_count=None):
paths = get_paths(root, format=format, paths_count=paths_count)
if paths_count is None:
paths_count = len(paths)
val_count = int(val_size * paths_count)
train_count = paths_count - val_count
return (paths[:train_count], paths[train_count:]) |
def a64l(s):
"""
An implementation of a64l as from the c stdlib.
Convert between a radix-64 ASCII string and a 32-bit integer.
'.' (dot) for 0, '/' for 1, '0' through '9' for [2,11],
'A' through 'Z' for [12,37], and 'a' through 'z' for [38,63].
TODO:
do some implementations use '' instead of '.' for 0?
>>> a64l('.')
0
>>> a64l('ZZZZZZ')
40359057765L
#only the first 6 chars are significant
>>> a64l('ZZZZZZ.')
40359057765L
>>> a64l('A')
12
>>> a64l('Chris')
951810894
"""
MASK = 0xffffffff
BITSPERCHAR = 6
orda, ordZ, ordA, ord9, ord0 = ord('a'), ord('Z'), ord('A'), ord('9'), ord('0')
r = 0
for shift, c in enumerate(s[:6]):
c = ord(c)
if c > ordZ:
c -= orda - ordZ - 1
if c > ord9:
c -= ordA - ord9 - 1
r = (r | ((c - (ord0 - 2)) << (shift * BITSPERCHAR))) & MASK
return r
| def a64l(s):
"""
An implementation of a64l as from the c stdlib.
Convert between a radix-64 ASCII string and a 32-bit integer.
'.' (dot) for 0, '/' for 1, '0' through '9' for [2,11],
'A' through 'Z' for [12,37], and 'a' through 'z' for [38,63].
TODO:
do some implementations use '' instead of '.' for 0?
>>> a64l('.')
0
>>> a64l('ZZZZZZ')
40359057765L
#only the first 6 chars are significant
>>> a64l('ZZZZZZ.')
40359057765L
>>> a64l('A')
12
>>> a64l('Chris')
951810894
"""
mask = 4294967295
bitsperchar = 6
(orda, ord_z, ord_a, ord9, ord0) = (ord('a'), ord('Z'), ord('A'), ord('9'), ord('0'))
r = 0
for (shift, c) in enumerate(s[:6]):
c = ord(c)
if c > ordZ:
c -= orda - ordZ - 1
if c > ord9:
c -= ordA - ord9 - 1
r = (r | c - (ord0 - 2) << shift * BITSPERCHAR) & MASK
return r |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def flatten(self, root: TreeNode) -> None:
"""
Do not return anything, modify root in-place instead.
"""
cur = root
while cur:
if cur.left:
predecessor = cur.left
next = cur.left
while predecessor.right:
predecessor = predecessor.right
predecessor.right = cur.right
cur.left = None
cur.right = next
cur = cur.right
| class Solution:
def flatten(self, root: TreeNode) -> None:
"""
Do not return anything, modify root in-place instead.
"""
cur = root
while cur:
if cur.left:
predecessor = cur.left
next = cur.left
while predecessor.right:
predecessor = predecessor.right
predecessor.right = cur.right
cur.left = None
cur.right = next
cur = cur.right |
example_dict = {
65: "integer",
"1": "fake integer",
3.14: "float",
"3.14": "fake float",
0.345: "float 2",
".345": "fake float 2",
123.0: "float 3",
"123.": " fake float 3",
"false_": False,
"true_": True,
False: False,
True: True,
-3.0: "float negative",
"-3.1": "fake float negative",
"negative": -45,
"float_negative": -56.67,
"a": {
"a": [1, 3, 4, {"nullable": None, "nullable_2": None}],
"b": {
"f": 3,
"g": 4,
"x": {
"y": {
"z": [
{"w": 7, "foo": "bar"},
{"w": 9, "field": False},
{"w": 9.87, "g": [1, 4], "field": [1, 4], "3": [1, 4]},
]
}
},
"j": [{"t": None, "w": None}, [{}, {"w": "test"}, {"w": 90}]],
},
},
"c": 4,
"as-9": 2,
"tt": {"aa": [1, 4]},
}
| example_dict = {65: 'integer', '1': 'fake integer', 3.14: 'float', '3.14': 'fake float', 0.345: 'float 2', '.345': 'fake float 2', 123.0: 'float 3', '123.': ' fake float 3', 'false_': False, 'true_': True, False: False, True: True, -3.0: 'float negative', '-3.1': 'fake float negative', 'negative': -45, 'float_negative': -56.67, 'a': {'a': [1, 3, 4, {'nullable': None, 'nullable_2': None}], 'b': {'f': 3, 'g': 4, 'x': {'y': {'z': [{'w': 7, 'foo': 'bar'}, {'w': 9, 'field': False}, {'w': 9.87, 'g': [1, 4], 'field': [1, 4], '3': [1, 4]}]}}, 'j': [{'t': None, 'w': None}, [{}, {'w': 'test'}, {'w': 90}]]}}, 'c': 4, 'as-9': 2, 'tt': {'aa': [1, 4]}} |
# Things like files are called resources. They are gicen by the operating system and
# have to be disposed of after being done with.
# We have to close files for instance
fd = open("with.py", "r")
print(fd.readline())
fd.close()
# In order to do this a bit more automatic you can use with
with open("with.py", "r") as f:
# do stuff with f here
print(f.readline())
# f is closed automatically here
| fd = open('with.py', 'r')
print(fd.readline())
fd.close()
with open('with.py', 'r') as f:
print(f.readline()) |
_base_ = [
'../_base_/models/faster_rcnn_r50_fpn.py',
'../_base_/datasets/coco_detection.py',
'../_base_/schedules/schedule_180k.py', '../_base_/default_runtime.py'
]
evaluation = dict(interval=20000, metric='bbox')
checkpoint_config = dict(by_epoch=False, interval=20000)
work_dir = 'work_dirs/coco/faster_rcnn/faster_rcnn_r50_fpn_4x2_180k_coco' | _base_ = ['../_base_/models/faster_rcnn_r50_fpn.py', '../_base_/datasets/coco_detection.py', '../_base_/schedules/schedule_180k.py', '../_base_/default_runtime.py']
evaluation = dict(interval=20000, metric='bbox')
checkpoint_config = dict(by_epoch=False, interval=20000)
work_dir = 'work_dirs/coco/faster_rcnn/faster_rcnn_r50_fpn_4x2_180k_coco' |
class Interactions:
current_os = -1
logger = None
def __init__(self, current_os, logger, comfun):
self.current_os = current_os
self.logger = logger
self.comfun = comfun
def print_info(self):
self.logger.raw("This is interaction with 3dsmax")
# common interactions
def schema_item_double_click(self, param):
self.max_open_scene(param)
def task_item_double_click(self, param):
self.max_open_scene(param)
def open_setup(self, param):
self.max_open_scene(param)
def save_setup(self, param):
self.save_current_scene_as(param)
def save_setup_as_next_version(self, param):
self.save_current_scene_as(param)
# max interactions
def max_open_scene(self, file):
pass
def max_import_ani(self, objects, dir):
pass
def max_import_cam(self, objects, file_or_dir):
pass
def max_import_obj(self, objects, file_or_dir):
pass
def max_simulate(self, ts, te, objects_names, cache_dir):
pass
def max_render(self, ts, te, out_file=""):
pass
def max_save_scene(self, file):
pass
def save_current_scene_as(self, file):
pass
| class Interactions:
current_os = -1
logger = None
def __init__(self, current_os, logger, comfun):
self.current_os = current_os
self.logger = logger
self.comfun = comfun
def print_info(self):
self.logger.raw('This is interaction with 3dsmax')
def schema_item_double_click(self, param):
self.max_open_scene(param)
def task_item_double_click(self, param):
self.max_open_scene(param)
def open_setup(self, param):
self.max_open_scene(param)
def save_setup(self, param):
self.save_current_scene_as(param)
def save_setup_as_next_version(self, param):
self.save_current_scene_as(param)
def max_open_scene(self, file):
pass
def max_import_ani(self, objects, dir):
pass
def max_import_cam(self, objects, file_or_dir):
pass
def max_import_obj(self, objects, file_or_dir):
pass
def max_simulate(self, ts, te, objects_names, cache_dir):
pass
def max_render(self, ts, te, out_file=''):
pass
def max_save_scene(self, file):
pass
def save_current_scene_as(self, file):
pass |
string1 = "he's "
string2 = "probably "
string3 = "going to "
string4 = "get fired "
string5 = "today "
print(string1 + string2 + string3 + string4 + string5)
print("he's " "probably " "going to " "get fired " "today")
print (string1 * 5)
print ("he's " * 5)
print ("hello " * 5 + "4")
print("hello " * (5 + 4))
today = "wednesday"
print("day" in today) #true
print("wednes" in today) #true
print ("fri" in today) #False
print ("eagle" in today) #false | string1 = "he's "
string2 = 'probably '
string3 = 'going to '
string4 = 'get fired '
string5 = 'today '
print(string1 + string2 + string3 + string4 + string5)
print("he's probably going to get fired today")
print(string1 * 5)
print("he's " * 5)
print('hello ' * 5 + '4')
print('hello ' * (5 + 4))
today = 'wednesday'
print('day' in today)
print('wednes' in today)
print('fri' in today)
print('eagle' in today) |
def subarraySort(array):
min_ascending_anomaly_number = float('inf')
max_descending_anomaly_number = float('-inf')
i, j = 1, len(array) - 2
while i < len(array) and j > - 1:
if array[i] < array[i - 1]:
min_ascending_anomaly_number = min(array[i], min_ascending_anomaly_number)
if array[j] > array[j + 1]:
max_descending_anomaly_number = max(array[j], max_descending_anomaly_number)
i += 1
j -= 1
if min_ascending_anomaly_number == float('inf'):
return [-1, -1]
subarray_left_idx, subarray_right_idx = 0, len(array) - 1
while array[subarray_left_idx] <= min_ascending_anomaly_number:
subarray_left_idx += 1
while array[subarray_right_idx] >= max_descending_anomaly_number:
subarray_right_idx -= 1
return [subarray_left_idx, subarray_right_idx]
print(subarraySort([1, 2, 4, 7, 10, 11, 7, 12, 6, 7, 16, 18, 19])) | def subarray_sort(array):
min_ascending_anomaly_number = float('inf')
max_descending_anomaly_number = float('-inf')
(i, j) = (1, len(array) - 2)
while i < len(array) and j > -1:
if array[i] < array[i - 1]:
min_ascending_anomaly_number = min(array[i], min_ascending_anomaly_number)
if array[j] > array[j + 1]:
max_descending_anomaly_number = max(array[j], max_descending_anomaly_number)
i += 1
j -= 1
if min_ascending_anomaly_number == float('inf'):
return [-1, -1]
(subarray_left_idx, subarray_right_idx) = (0, len(array) - 1)
while array[subarray_left_idx] <= min_ascending_anomaly_number:
subarray_left_idx += 1
while array[subarray_right_idx] >= max_descending_anomaly_number:
subarray_right_idx -= 1
return [subarray_left_idx, subarray_right_idx]
print(subarray_sort([1, 2, 4, 7, 10, 11, 7, 12, 6, 7, 16, 18, 19])) |
# python3
def last_digit_of_the_sum_of_fibonacci_numbers_naive(n):
assert 0 <= n <= 10 ** 18
if n <= 1:
return n
fibonacci_numbers = [0] * (n + 1)
fibonacci_numbers[0] = 0
fibonacci_numbers[1] = 1
for i in range(2, n + 1):
fibonacci_numbers[i] = fibonacci_numbers[i - 2] + fibonacci_numbers[i - 1]
return sum(fibonacci_numbers) % 10
def last_digit_of_the_sum_of_fibonacci_numbers(n):
assert 0 <= n <= 10 ** 18
prev, curr = 0, 1
if 2 > n >= 0:
return n
s = 1
n_remainder = n % 60
if 2 > n_remainder >= 0:
return n_remainder
for _ in range(n_remainder - 1):
prev, curr = curr, (prev + curr) % 10
s += (curr % 10)
s = s % 10
return s
if __name__ == '__main__':
input_n = int(input())
print(last_digit_of_the_sum_of_fibonacci_numbers(input_n))
| def last_digit_of_the_sum_of_fibonacci_numbers_naive(n):
assert 0 <= n <= 10 ** 18
if n <= 1:
return n
fibonacci_numbers = [0] * (n + 1)
fibonacci_numbers[0] = 0
fibonacci_numbers[1] = 1
for i in range(2, n + 1):
fibonacci_numbers[i] = fibonacci_numbers[i - 2] + fibonacci_numbers[i - 1]
return sum(fibonacci_numbers) % 10
def last_digit_of_the_sum_of_fibonacci_numbers(n):
assert 0 <= n <= 10 ** 18
(prev, curr) = (0, 1)
if 2 > n >= 0:
return n
s = 1
n_remainder = n % 60
if 2 > n_remainder >= 0:
return n_remainder
for _ in range(n_remainder - 1):
(prev, curr) = (curr, (prev + curr) % 10)
s += curr % 10
s = s % 10
return s
if __name__ == '__main__':
input_n = int(input())
print(last_digit_of_the_sum_of_fibonacci_numbers(input_n)) |
# File: Bridge.py
# Description: Assignment 09 | Bridge
# Student Name: Matthew Maxwell
# Student UT EID: mrm5632
# Course Name: CS 313E
# Unique Number: 50205
# Date Created: 09-30-2019
# Date Last Modified: 10-01-2019
# read file in, return data set of test cases
def readFile():
myFile = open("bridge.txt", "r")
lines = [line.strip() for line in myFile]
numCases = int(lines[0])
lines = lines[2:]
dataSet = []
for i in range(numCases):
dataItem = []
for j in range(int(lines[0])):
dataItem.append(int(lines[j + 1]))
lines = lines[int(lines[0]) + 2:]
dataItem.sort()
dataSet.append(dataItem)
myFile.close()
return(dataSet)
# simple recursive function to find total lowest crossing time
def fastBridgeCross(people):
# if there is one or two people, return highest time
if(len(people) <= 2):
return(people[len(people) - 1])
# if there are three people, return the sum of all three
elif(len(people) == 3):
return(sum(people))
# if there are >3 people, then compute movements for the slowest two people to get to the other side, then call function again without two slowest people
else:
return(fastBridgeCross(people[:-2]) + people[0] + (people[1] * 2) + people[-1])
def main():
myDataSet = readFile()
[print(fastBridgeCross(item), "\n") for item in myDataSet]
main() | def read_file():
my_file = open('bridge.txt', 'r')
lines = [line.strip() for line in myFile]
num_cases = int(lines[0])
lines = lines[2:]
data_set = []
for i in range(numCases):
data_item = []
for j in range(int(lines[0])):
dataItem.append(int(lines[j + 1]))
lines = lines[int(lines[0]) + 2:]
dataItem.sort()
dataSet.append(dataItem)
myFile.close()
return dataSet
def fast_bridge_cross(people):
if len(people) <= 2:
return people[len(people) - 1]
elif len(people) == 3:
return sum(people)
else:
return fast_bridge_cross(people[:-2]) + people[0] + people[1] * 2 + people[-1]
def main():
my_data_set = read_file()
[print(fast_bridge_cross(item), '\n') for item in myDataSet]
main() |
# TYPE OF OPERATORS IN PYTHON
# Arithmetic
# Assignment
# Comparison
# Logical
# Membership
# Identity
# Bitwise
# Arithmetic operators: Used to perform arithmetic operations between variables
# +, -, *, /, %, **, //
x = 10
y = 20
# Arithmetic Operators
print('Arithmetic Operators')
print(x+y)
print(x-y)
print(x*y)
print(x**y)
print(x/y)
print(x//y) # Shows the int value, taking out the decimals
print(x%y)
# Assignment operators
# Are used to assign values
# Operator | Example
# = | x = 10
# += | x += 10
# -= | x -= 10
# *= | x *= 10
# %= | x %= 10
# **= | x **= 10
# //= | x //= 10
# |= | x |= 10
# ^= | x ^= 10
# &= | x &= 10
print()
print('Assignment operators')
x = 100
x += 10 # Is equal to x = x + 10
a = 5 # Assigning the value '5' to the variable
a += 5
print(a)
a **= 5
print(a)
print()
print('Comparison Operators')
# Comparison operators
# Used to compare two values
# == Equal
# != Not Equal
# > Greater than
# < Less than
# >= Greater than or equal
# <= Less than or equal
val = 10
num1 = 20
compare = val == num1
print(compare)
print()
print('Logical Operators')
# Logical Operators
# Used to combine conditional statements
# Conditional statements
print('Conditional statements')
if val == num1:
print('equal')
elif val > num1:
print('greater')
else:
print('smaller')
x = 10
print(x > 10 and x > 5)
print(x > 8 and x > 5)
not(x > 10 and x > 5) # Get the opposite value of the statement
print()
print('Identity Operators')
# Identity Operators
# Used to compare objects
# We have: IS and IS NOT
# IS: Returns true if both variables are same object
# IS NOT: Returns true if both variables are not same object
list1 = [10, 20, 30]
list2 = [10, 20, 30]
x = list1
print(x is list1)
print(list1 is list2) # False because they are not the same object, same type, but not same objects
print(list1 is not list2) # Even though they have the same values, they are not the same object
print()
print('Membership operators')
# Memebership operators
# Used to check if a sequence is present in an object
# We have: IN and NOT IN
# IN: Returns true if a sequence with the specified value is present in the object
# NOT IN: Returns true if a sequence with the specified value is not present in the object
print(x in list1)
print(list1 in list2)
print(10 in list1)
print([10, 20, 30] in list2) # Only recognizes one value in the list of values inside the variable
list1.append('banana')
print('banana' in list1)
list1 = [10, 20, 30]
list2 = [10, 20, 30]
print(list1 == list2)
print(list1 is list2) # False because they are two different objects
print()
print('Bitwise operators')
# Bitwise operators
# Used to compare binary numbers
# & Bitwise AND: Sets each bit to 1 if both bits are 1
# | Bitwise OR: Sets each bit to 1 if one of the bits is 1
# ^ Bitwise XOR: Sets each bit to 1 if only one of the bits is 1
# ~ Bitwise NOT: Inverts all bits
# << Left Shift: Shift left by pushing in zeroes from the right and let the leftmost bits fell off
# >> Right Shift: Shifgt right by pushing copies of the leftmost bit in from the left, and let the rightmost bit fall off
print(10 & 12) # 1010 1100: 1000
print(10 | 12) # 1010 1100: 1110
print("{0:b}".format(8)) # Print parameter as binary
print('right shift')
print(10 >> 2) # We are right shifting 2 bits, so instead of '1010' we have '10'
print('left shift')
print(10 << 2) # It adds two 00 to the right, so instead of '1010' now it is '101000'
| x = 10
y = 20
print('Arithmetic Operators')
print(x + y)
print(x - y)
print(x * y)
print(x ** y)
print(x / y)
print(x // y)
print(x % y)
print()
print('Assignment operators')
x = 100
x += 10
a = 5
a += 5
print(a)
a **= 5
print(a)
print()
print('Comparison Operators')
val = 10
num1 = 20
compare = val == num1
print(compare)
print()
print('Logical Operators')
print('Conditional statements')
if val == num1:
print('equal')
elif val > num1:
print('greater')
else:
print('smaller')
x = 10
print(x > 10 and x > 5)
print(x > 8 and x > 5)
not (x > 10 and x > 5)
print()
print('Identity Operators')
list1 = [10, 20, 30]
list2 = [10, 20, 30]
x = list1
print(x is list1)
print(list1 is list2)
print(list1 is not list2)
print()
print('Membership operators')
print(x in list1)
print(list1 in list2)
print(10 in list1)
print([10, 20, 30] in list2)
list1.append('banana')
print('banana' in list1)
list1 = [10, 20, 30]
list2 = [10, 20, 30]
print(list1 == list2)
print(list1 is list2)
print()
print('Bitwise operators')
print(10 & 12)
print(10 | 12)
print('{0:b}'.format(8))
print('right shift')
print(10 >> 2)
print('left shift')
print(10 << 2) |
# You are given a two-digit integer n. Return the sum of its digits.
# Example
# For n = 29, the output should be
# addTwoDigits(n) = 11.
def addTwoDigits(n):
sum1 = 0
for i in str(n):
sum1 += int(i)
return sum1
print(addTwoDigits(29))
| def add_two_digits(n):
sum1 = 0
for i in str(n):
sum1 += int(i)
return sum1
print(add_two_digits(29)) |
# $Id: md1.py,v 1.8 2020/04/22 21:39:41 baaden Exp baaden $
# Script (c) 2020 by Marc Baaden, <baaden@smplinux.de>
#
# UnityMol python script to visualize the Covid-19 spike protein
# activate specific commands to simplify interactive raytracing of the scene
doRT = False;
absolutePath = "C:/Users/ME/fair_covid_molvisexp/ex3_mdtraj/"
inVR = UnityMolMain.inVR()
#Useful when recording a long video
Application.runInBackground = True
UnityMolMain.allowIDLE = False
if(doRT):
bg_color("gray")
#Avoid pre-computing surfaces for memory and perf purpose
UnityMolMain.disableSurfaceThread = True
#Start raytracing mdoe
UnityMolMain.raytracingMode = True
#Set screen resolution, mandatory for recording in raytracing mode
Screen.SetResolution(1920, 1080, False)
# Color definitions
bleu1 = ColorUtility.TryParseHtmlString("#6baed6")[1]
bleu2 = ColorUtility.TryParseHtmlString("#3182bd")[1]
bleu3 = ColorUtility.TryParseHtmlString("#08519c")[1]
vert1 = ColorUtility.TryParseHtmlString("#74c476")[1]
vert2 = ColorUtility.TryParseHtmlString("#31a354")[1]
vert3 = ColorUtility.TryParseHtmlString("#006d2c")[1]
oran1 = ColorUtility.TryParseHtmlString("#fd8d3c")[1]
# Start clean
reset()
clearAnnotations()
annotationStatus = False
setMouseMoveSpeed(5)
s = load(absolutePath+"bp151.pdb")
loadTraj("bp151", absolutePath+"bp151.xtc")
s.trajPlayer.smoothing = True
if inVR:
centerOnStructure("bp151")
else:
#fetch(PDBId="6cs2", usemmCIF=True, readHetm=True, forceDSSP=False, showDefaultRep=True, modelsAsTraj=True, center=False)
#setStructurePositionRotation("bp151", Vector3(0.0000, 0.0000, 0.0000), Vector3(0.0000, 0.0000, 0.0000))
#Save parent position
setMolParentTransform( Vector3(0.1509, 0.0289, -2.3742), Vector3(0.0064, 0.0064, 0.0064), Vector3(11.1974, 316.3117, 184.7349), Vector3(0.1375, 0.0250, -2.3702) )
#setMolParentTransform( Vector3(0.1196, 0.1039, -2.1867), Vector3(0.0064, 0.0064, 0.0064), Vector3(11.1974, 316.3117, 184.7349), Vector3(0.1062, 0.1000, -2.1827) )
# draw an outline around the objects
enableOutline()
# add depth cueing
#setDepthCueingDensity(1.00)
#setDepthCueingStart(-1.94)
#enableDepthCueing()
# hide user interface
#GameObject.Find("CanvasMainUI/CloseUI").GetComponent("Button").onClick.Invoke();
# hide python console
#GameObject.Find("ConsolePython_Autocomplete/Canvas/CloseUI").GetComponent("Button").onClick.Invoke();
hideSelection("bp151_protein_or_nucleic", "c")
showHideHydrogensInSelection("bp151_not_protein_nucleic")
setHyperBallMetaphore("bp151_not_protein_nucleic", "Licorice", True)
# helper function to reset and reload after the script has been modified
def restart():
reset()
loadScript(absolutePath+"md1.py")
# helper function to toggle a selname/reptype from hidden to visible and vice versa
def toggleRep(repName,repType):
if(areRepresentationsOn(repName,repType)):
hideSelection(repName, repType)
else:
showSelection(repName, repType)
###
### Define first example view in terms of the representations, the viewpoint and the annotations
###
SRBD=select("resnum 597:900 and protein", "SRBD")
ACE=select("resnum 0:596 and protein", "ACE")
def rep1():
print("Representation of the overall ectodomain")
#showBoundingBox("6cs2")
showSelection("SRBD", "c")
colorSelection("SRBD", "c", bleu3)
showSelection("ACE", "c")
colorSelection("ACE", "c", oran1)
#select("(resnum 154 65 155 10 157 141 539 124 524 76 77 83 143 1 162 121 16 74 161 17 13 143 335 20 173 19 168 23 339 337 117 169 27 166 and protein) or resname UNK7", "ITF")
select("byres ((around 3.5 ACE) and protein and not ACE)","ITF1")
setUpdateSelectionTraj("ITF1", True)
showSelection("ITF1", "hb")
select("byres ((around 3.5 SRBD) and protein and not SRBD)","ITF2")
setUpdateSelectionTraj("ITF2", True)
showSelection("ITF2", "hb")
clearSelections()
rep1()
def rep1off():
hideSelection("SRBD")
hideSelection("ACE")
hideSelection("ITF1")
hideSelection("ITF2")
clearSelections()
# define a helper function to orient the system nicely
def view1():
#setStructurePositionRotation("6cs2", Vector3(0.0000, 0.0000, 0.0000), Vector3(0.0000, 0.0000, 0.0000))
setMolParentTransform( Vector3(-1.1592, 1.0424, -0.2460), Vector3(0.0064, 0.0064, 0.0064), Vector3(87.2821, 97.7300, 270.5491), Vector3(0.0000, 0.0000, -1.5500) )
return;
| do_rt = False
absolute_path = 'C:/Users/ME/fair_covid_molvisexp/ex3_mdtraj/'
in_vr = UnityMolMain.inVR()
Application.runInBackground = True
UnityMolMain.allowIDLE = False
if doRT:
bg_color('gray')
UnityMolMain.disableSurfaceThread = True
UnityMolMain.raytracingMode = True
Screen.SetResolution(1920, 1080, False)
bleu1 = ColorUtility.TryParseHtmlString('#6baed6')[1]
bleu2 = ColorUtility.TryParseHtmlString('#3182bd')[1]
bleu3 = ColorUtility.TryParseHtmlString('#08519c')[1]
vert1 = ColorUtility.TryParseHtmlString('#74c476')[1]
vert2 = ColorUtility.TryParseHtmlString('#31a354')[1]
vert3 = ColorUtility.TryParseHtmlString('#006d2c')[1]
oran1 = ColorUtility.TryParseHtmlString('#fd8d3c')[1]
reset()
clear_annotations()
annotation_status = False
set_mouse_move_speed(5)
s = load(absolutePath + 'bp151.pdb')
load_traj('bp151', absolutePath + 'bp151.xtc')
s.trajPlayer.smoothing = True
if inVR:
center_on_structure('bp151')
else:
set_mol_parent_transform(vector3(0.1509, 0.0289, -2.3742), vector3(0.0064, 0.0064, 0.0064), vector3(11.1974, 316.3117, 184.7349), vector3(0.1375, 0.025, -2.3702))
enable_outline()
hide_selection('bp151_protein_or_nucleic', 'c')
show_hide_hydrogens_in_selection('bp151_not_protein_nucleic')
set_hyper_ball_metaphore('bp151_not_protein_nucleic', 'Licorice', True)
def restart():
reset()
load_script(absolutePath + 'md1.py')
def toggle_rep(repName, repType):
if are_representations_on(repName, repType):
hide_selection(repName, repType)
else:
show_selection(repName, repType)
srbd = select('resnum 597:900 and protein', 'SRBD')
ace = select('resnum 0:596 and protein', 'ACE')
def rep1():
print('Representation of the overall ectodomain')
show_selection('SRBD', 'c')
color_selection('SRBD', 'c', bleu3)
show_selection('ACE', 'c')
color_selection('ACE', 'c', oran1)
select('byres ((around 3.5 ACE) and protein and not ACE)', 'ITF1')
set_update_selection_traj('ITF1', True)
show_selection('ITF1', 'hb')
select('byres ((around 3.5 SRBD) and protein and not SRBD)', 'ITF2')
set_update_selection_traj('ITF2', True)
show_selection('ITF2', 'hb')
clear_selections()
rep1()
def rep1off():
hide_selection('SRBD')
hide_selection('ACE')
hide_selection('ITF1')
hide_selection('ITF2')
clear_selections()
def view1():
set_mol_parent_transform(vector3(-1.1592, 1.0424, -0.246), vector3(0.0064, 0.0064, 0.0064), vector3(87.2821, 97.73, 270.5491), vector3(0.0, 0.0, -1.55))
return |
def a(x):
if x == 1:
print("x is 1")
else:
print("x is not 1")
| def a(x):
if x == 1:
print('x is 1')
else:
print('x is not 1') |
class Solution(object):
def guessNumber(self, n: int) -> int:
"""
# The guess API is already defined.
# @param num, your guess
# @return -1 if my number is lower, 1 if my number is higher, otherwise return 0
# def guess(num: int) -> int:
"""
low = 1
high = n + 1
mid = low + ((high - low)/2)
res = guess(mid)
while (res != 0):
if res == 1:
low = mid
elif res == -1:
high = mid
mid = low + ((high - low)/2)
res = guess(mid)
return int(mid)
| class Solution(object):
def guess_number(self, n: int) -> int:
"""
# The guess API is already defined.
# @param num, your guess
# @return -1 if my number is lower, 1 if my number is higher, otherwise return 0
# def guess(num: int) -> int:
"""
low = 1
high = n + 1
mid = low + (high - low) / 2
res = guess(mid)
while res != 0:
if res == 1:
low = mid
elif res == -1:
high = mid
mid = low + (high - low) / 2
res = guess(mid)
return int(mid) |
def mergeSort(lst, start, end):
if start < end:
mid = start + (end - start) // 2
mergeSort(lst, start, mid)
mergeSort(lst, mid + 1, end)
merge(lst, start, end, mid)
def merge(lst, start, end, mid):
temp = lst[start: end + 1]
left = 0
right = mid + 1 - start
index = start
while left <= mid - start and right <= end - start:
if temp[left] < temp[right]:
lst[index] = temp[left]
left += 1
else:
lst[index] = temp[right]
right += 1
index += 1
# no need to copy right half since right half is already in the correct place
while left <= mid - start:
lst[index] = temp[left]
index += 1
left += 1
if __name__ == '__main__':
l = [5, 4, 3, 2, 1]
mergeSort(l, 0, 4)
print(l)
''' dummy merge sort, copy at first
def mergeSortMain(lst):
temp = lst[:]
mergeSort(lst, 0, len(lst) - 1, temp)
def mergeSort(lst, left, right, temp):
if left < right:
mid = left + (right - left) // 2
mergeSort(lst, left, mid, temp)
mergeSort(lst, mid + 1, right, temp)
merge(lst, left, right, mid, temp)
def merge(lst, left, right, mid, temp):
for i in range(left, right + 1):
temp[i] = lst[i]
left_index = left
right_index = mid + 1
while left_index <= mid and right_index <= right:
if temp[left_index] < temp[right_index]:
lst[left] = temp[left_index]
left_index += 1
else:
lst[left] = temp[right_index]
right_index += 1
left += 1
while left_index <= mid:
lst[left] = temp[left_index]
left += 1
left_index += 1
l = [5,4,3,2,1]
mergeSortMain(l)
print(l)
'''
'''
Time O(n logn). logn levels, each level merge the n elements
Space O(n) extra Space
''' | def merge_sort(lst, start, end):
if start < end:
mid = start + (end - start) // 2
merge_sort(lst, start, mid)
merge_sort(lst, mid + 1, end)
merge(lst, start, end, mid)
def merge(lst, start, end, mid):
temp = lst[start:end + 1]
left = 0
right = mid + 1 - start
index = start
while left <= mid - start and right <= end - start:
if temp[left] < temp[right]:
lst[index] = temp[left]
left += 1
else:
lst[index] = temp[right]
right += 1
index += 1
while left <= mid - start:
lst[index] = temp[left]
index += 1
left += 1
if __name__ == '__main__':
l = [5, 4, 3, 2, 1]
merge_sort(l, 0, 4)
print(l)
' dummy merge sort, copy at first\ndef mergeSortMain(lst):\n temp = lst[:]\n mergeSort(lst, 0, len(lst) - 1, temp)\n\ndef mergeSort(lst, left, right, temp):\n if left < right:\n mid = left + (right - left) // 2\n\n mergeSort(lst, left, mid, temp)\n mergeSort(lst, mid + 1, right, temp)\n\n merge(lst, left, right, mid, temp)\n\ndef merge(lst, left, right, mid, temp):\n for i in range(left, right + 1):\n temp[i] = lst[i]\n left_index = left\n right_index = mid + 1\n while left_index <= mid and right_index <= right:\n if temp[left_index] < temp[right_index]:\n lst[left] = temp[left_index]\n left_index += 1\n else:\n lst[left] = temp[right_index]\n right_index += 1\n left += 1\n\n while left_index <= mid:\n lst[left] = temp[left_index]\n left += 1\n left_index += 1\n\nl = [5,4,3,2,1]\nmergeSortMain(l)\nprint(l)\n'
'\nTime O(n logn). logn levels, each level merge the n elements\nSpace O(n) extra Space\n' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.