content stringlengths 7 1.05M |
|---|
occupation_names_test_data = [
{'old': 'Jx4V_6tm_fUH', 'replaced_by': 'YcvM_Gqk_6U7', 'label': 'Utvecklingsingenjör, elkraft',
'hits_old': ['24647561', '24645432', '24615762', '24504276'],
'replacing_old_concept_ids': ['Jx4V_6tm_fUH', 'YcvM_Gqk_6U7', 'Jx4V_6tm_fUH', 'Jx4V_6tm_fUH'],
'hits_replaced_by': ['24647561', '24645432', '24615762', '24504276']},
{'old': 'P2bU_f8o_Lkw', 'replaced_by': 'FuJx_cGT_5im', 'label': 'Civilingenjör, elkraft',
'hits_old': ['24632281', '24573532'],
'replacing_old_concept_ids': ['FuJx_cGT_5im', 'WhsT_BWb_dPy', 'FuJx_cGT_5im'],
'hits_replaced_by': ['24632281', '24622759', '24573532']},
{'old': 'v5nC_xX1_Y7U', 'replaced_by': 'FuJx_cGT_5im', 'label': 'Civilingenjör, elkraft',
'hits_old': ['24632281', '24573532'],
'replacing_old_concept_ids': ['FuJx_cGT_5im', 'WhsT_BWb_dPy', 'FuJx_cGT_5im'],
'hits_replaced_by': ['24632281', '24622759', '24573532']},
{'old': 'VCsj_Uve_6EJ', 'replaced_by': 'ATAp_LN5_BPU',
'label': 'Ekonomiföreståndare/Kursgårdsföreståndare/Storhushållsföreståndare', 'hits_old': ['24647491'],
'replacing_old_concept_ids': ['VCsj_Uve_6EJ'], 'hits_replaced_by': ['24647491']},
{'old': 'sqJi_voF_eaR', 'replaced_by': 'ATAp_LN5_BPU',
'label': 'Ekonomiföreståndare/Kursgårdsföreståndare/Storhushållsföreståndare', 'hits_old': [],
'replacing_old_concept_ids': ['VCsj_Uve_6EJ'], 'hits_replaced_by': ['24647491']},
{'old': 'aCbh_uAN_6th', 'replaced_by': 'ATAp_LN5_BPU',
'label': 'Ekonomiföreståndare/Kursgårdsföreståndare/Storhushållsföreståndare', 'hits_old': [],
'replacing_old_concept_ids': ['VCsj_Uve_6EJ'], 'hits_replaced_by': ['24647491']},
{'old': 'Yx7u_AbE_Jqk', 'replaced_by': 'cYP6_Tur_q6m', 'label': 'Arbetsledare, städ/Husfru/Städledare',
'hits_old': ['24648781', '24638880', '24633176'],
'replacing_old_concept_ids': ['Yx7u_AbE_Jqk', 'cYP6_Tur_q6m', 'Yx7u_AbE_Jqk'],
'hits_replaced_by': ['24648781', '24638880', '24633176']},
{'old': 'JKDm_nyA_8bK', 'replaced_by': 'efyx_6es_7jQ', 'label': 'Montör, gummi- och plastprodukter',
'hits_old': ['24648645', '24641319', '24638460', '24635077'],
'replacing_old_concept_ids': ['efyx_6es_7jQ', 'efyx_6es_7jQ', 'efyx_6es_7jQ', 'efyx_6es_7jQ'],
'hits_replaced_by': ['24648645', '24641319', '24638460', '24635077']},
{'old': 'D3M6_p8P_jdD', 'replaced_by': 'FuJx_cGT_5im', 'label': 'Civilingenjör, elkraft',
'hits_old': ['24632281', '24573532'],
'replacing_old_concept_ids': ['FuJx_cGT_5im', 'WhsT_BWb_dPy', 'FuJx_cGT_5im'],
'hits_replaced_by': ['24632281', '24622759', '24573532']},
{'old': 'gE2Y_BMR_Dpq', 'replaced_by': 'q6mQ_fnc_A9Y', 'label': 'Badföreståndare/Simhallsföreståndare',
'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'RhoN_Vdo_F5H', 'replaced_by': 'Bfn9_6FK_iaY', 'label': 'F&B Manager/Food and beverage manager',
'hits_old': ['24649158'], 'replacing_old_concept_ids': ['RhoN_Vdo_F5H'], 'hits_replaced_by': ['24649158']},
{'old': 'FoCc_qZ4_Yi8', 'replaced_by': '2AGe_heZ_E94', 'label': 'Försäkringshandläggare, försäkringskassa',
'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'fo9m_5cC_y8G', 'replaced_by': 'jwgi_jYc_iE9', 'label': 'Revisor',
'hits_old': ['24622718', '24613082', '24607178', '24594452', '24565317', '24530121'],
'replacing_old_concept_ids': ['jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'fo9m_5cC_y8G',
'jwgi_jYc_iE9'],
'hits_replaced_by': ['24622718', '24613082', '24607178', '24594452', '24565317', '24530121']},
{'old': 'D7tB_NxQ_ZWN', 'replaced_by': 'GX5o_8RD_rxJ', 'label': 'Demograf', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'KgMS_ENm_V7z', 'replaced_by': 'dBVw_5Cw_upG', 'label': 'Familjerättssekreterare', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'cUKA_xwQ_VWk', 'replaced_by': 's9UN_r5w_c5K',
'label': 'Aktuarie/Försäkringsaktuarie/Försäkringsmatematiker', 'hits_old': [], 'replacing_old_concept_ids': [],
'hits_replaced_by': []},
{'old': 'AJSy_PSb_tLY', 'replaced_by': 's9UN_r5w_c5K',
'label': 'Aktuarie/Försäkringsaktuarie/Försäkringsmatematiker', 'hits_old': [], 'replacing_old_concept_ids': [],
'hits_replaced_by': []},
{'old': 'e885_ehx_zxp', 'replaced_by': 'GgmE_SvH_mtm', 'label': 'Veterinär', 'hits_old': ['24622052', '24612672'],
'replacing_old_concept_ids': ['GgmE_SvH_mtm', 'GgmE_SvH_mtm'], 'hits_replaced_by': ['24622052', '24612672']},
{'old': 'Zkke_bJ1_Edq', 'replaced_by': 'C1FR_RzT_hzP', 'label': 'Dietist',
'hits_old': ['24641238', '24641268', '24626434', '24614914', '24581751'],
'replacing_old_concept_ids': ['C1FR_RzT_hzP', 'C1FR_RzT_hzP', 'C1FR_RzT_hzP', 'C1FR_RzT_hzP', 'C1FR_RzT_hzP'],
'hits_replaced_by': ['24641238', '24641268', '24626434', '24614914', '24581751']},
{'old': 'MLPW_mLu_d7K', 'replaced_by': 'vUZt_BHY_mk2', 'label': 'Miljöingenjör/Miljövårdsingenjör',
'hits_old': ['24643524'], 'replacing_old_concept_ids': ['vUZt_BHY_mk2'], 'hits_replaced_by': ['24643524']},
{'old': 'pp29_K2N_aDY', 'replaced_by': 'C1FR_RzT_hzP', 'label': 'Dietist',
'hits_old': ['24641238', '24641268', '24626434', '24614914', '24581751'],
'replacing_old_concept_ids': ['C1FR_RzT_hzP', 'C1FR_RzT_hzP', 'C1FR_RzT_hzP', 'C1FR_RzT_hzP', 'C1FR_RzT_hzP'],
'hits_replaced_by': ['24641238', '24641268', '24626434', '24614914', '24581751']},
{'old': 'Hv4J_UHc_s7M', 'replaced_by': 'sghA_68W_sYw', 'label': 'Laboratoriebiträde', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'Ttbo_P3H_C4V', 'replaced_by': 'sghA_68W_sYw', 'label': 'Laboratoriebiträde', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'AWpr_8U2_32J', 'replaced_by': 'sghA_68W_sYw', 'label': 'Laboratoriebiträde', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'L8Hw_5mJ_zic', 'replaced_by': 'YpRs_ybt_47a', 'label': 'Kurator',
'hits_old': ['24640701', '24626839', '24543668', '24437169'],
'replacing_old_concept_ids': ['YpRs_ybt_47a', 'Y86G_M6o_9R8', 'YpRs_ybt_47a', 'YpRs_ybt_47a', 'YpRs_ybt_47a'],
'hits_replaced_by': ['24640701', '24633665', '24626839', '24543668', '24437169']},
{'old': 'Y86G_M6o_9R8', 'replaced_by': 'YpRs_ybt_47a', 'label': 'Kurator',
'hits_old': ['24640701', '24633665', '24626839', '24543668', '24437169'],
'replacing_old_concept_ids': ['YpRs_ybt_47a', 'Y86G_M6o_9R8', 'YpRs_ybt_47a', 'YpRs_ybt_47a', 'YpRs_ybt_47a'],
'hits_replaced_by': ['24640701', '24633665', '24626839', '24543668', '24437169']},
{'old': 'T9MX_dmQ_t5n', 'replaced_by': 's5pR_WNm_R8W', 'label': 'Administratör/Administrativ assistent',
'hits_old': ['24650971', '24650060', '24647704', '24647256', '24645598', '24642483', '24641459', '24636981',
'24636522', '24633685', '24634361', '24632439', '24632028', '24631136', '24628830', '24628098',
'24624629', '24624189', '24623013', '24616519', '24615460', '24615219', '24612435', '24611779',
'24610623', '24606824', '24606427', '24603569', '24600385', '24590208', '24574442', '24537933',
'24508439', '24499204'],
'replacing_old_concept_ids': ['s5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'Dgx7_yw6_CaN',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
'Dgx7_yw6_CaN', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'T9MX_dmQ_t5n',
's5pR_WNm_R8W'],
'hits_replaced_by': ['24650971', '24650060', '24647704', '24647256', '24646256', '24645598', '24642483',
'24641459', '24636981', '24636522', '24633685', '24634361', '24632439', '24632028',
'24631136', '24628830', '24628098', '24624629', '24624189', '24623013', '24616519',
'24615460', '24615219', '24612435', '24611779', '24610623', '24606824', '24606427',
'24603569', '24600385', '24594088', '24590208', '24574442', '24537933', '24508439',
'24499204']},
{'old': 'TChs_6ci_gJQ', 'replaced_by': 'Fr7W_Yjv_3ik', 'label': 'Familjebehandlare/Familjepedagog',
'hits_old': ['24573516'], 'replacing_old_concept_ids': ['Fr7W_Yjv_3ik'], 'hits_replaced_by': ['24573516']},
{'old': '1oCZ_J6h_rGV', 'replaced_by': 'JZgY_jHa_Uwa', 'label': 'Förhandlingschef', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': '2DB2_o9K_sMy', 'replaced_by': 'V74g_m5Z_BtM', 'label': 'Kanslichef', 'hits_old': [],
'replacing_old_concept_ids': ['Uoeq_F5q_18w'], 'hits_replaced_by': ['24646965']},
{'old': 'X4vv_yJ8_Nx1', 'replaced_by': '7yB4_npo_55m', 'label': 'Invandrarkonsulent', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'memm_eLn_j1a', 'replaced_by': 'jQKk_Wzd_pvu', 'label': 'Komminister', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'Dgx7_yw6_CaN', 'replaced_by': 's5pR_WNm_R8W', 'label': 'Administratör/Administrativ assistent',
'hits_old': ['24650971', '24650060', '24647704', '24647256', '24646256', '24645598', '24642483', '24641459',
'24636981', '24636522', '24633685', '24634361', '24632439', '24632028', '24631136', '24628830',
'24628098', '24624629', '24624189', '24623013', '24616519', '24615460', '24615219', '24612435',
'24611779', '24610623', '24606824', '24606427', '24603569', '24600385', '24594088', '24590208',
'24574442', '24537933', '24499204'],
'replacing_old_concept_ids': ['s5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'Dgx7_yw6_CaN',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
'Dgx7_yw6_CaN', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'T9MX_dmQ_t5n',
's5pR_WNm_R8W'],
'hits_replaced_by': ['24650971', '24650060', '24647704', '24647256', '24646256', '24645598', '24642483',
'24641459', '24636981', '24636522', '24633685', '24634361', '24632439', '24632028',
'24631136', '24628830', '24628098', '24624629', '24624189', '24623013', '24616519',
'24615460', '24615219', '24612435', '24611779', '24610623', '24606824', '24606427',
'24603569', '24600385', '24594088', '24590208', '24574442', '24537933', '24508439',
'24499204']},
{'old': '1reZ_8Q1_nwY', 'replaced_by': 'ofiS_5F2_YmV', 'label': 'HR-assistent',
'hits_old': ['24646439', '24643526', '24617892'],
'replacing_old_concept_ids': ['ofiS_5F2_YmV', 'ofiS_5F2_YmV', 'ofiS_5F2_YmV'],
'hits_replaced_by': ['24646439', '24643526', '24617892']},
{'old': '1zns_dXR_NMQ', 'replaced_by': 'ofiS_5F2_YmV', 'label': 'HR-assistent',
'hits_old': ['24646439', '24643526', '24617892'],
'replacing_old_concept_ids': ['ofiS_5F2_YmV', 'ofiS_5F2_YmV', 'ofiS_5F2_YmV'],
'hits_replaced_by': ['24646439', '24643526', '24617892']},
{'old': 'geo3_qtw_3eP', 'replaced_by': 'MbHj_ZVr_WsC', 'label': 'Personaladministratör',
'hits_old': ['24649818', '24645687', '24629870', '24618830', '24574415', '24572733'],
'replacing_old_concept_ids': ['MbHj_ZVr_WsC', 'geo3_qtw_3eP', 'MbHj_ZVr_WsC', 'MbHj_ZVr_WsC', 'MbHj_ZVr_WsC',
'MbHj_ZVr_WsC'],
'hits_replaced_by': ['24649818', '24645687', '24629870', '24618830', '24574415', '24572733']},
{'old': 'tNy7_bJc_8FS', 'replaced_by': 's5pR_WNm_R8W', 'label': 'Administratör/Administrativ assistent',
'hits_old': ['24650971', '24650060', '24647704', '24647256', '24645598', '24642483', '24641459', '24636981',
'24636522', '24633685', '24634361', '24632439', '24632028', '24631136', '24628830', '24628098',
'24624629', '24624189', '24623013', '24616519', '24615460', '24615219', '24612435', '24611779',
'24610623', '24606824', '24606427', '24603569', '24600385', '24590208', '24574442', '24537933',
'24499204'],
'replacing_old_concept_ids': ['s5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'Dgx7_yw6_CaN',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
'Dgx7_yw6_CaN', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'T9MX_dmQ_t5n',
's5pR_WNm_R8W'],
'hits_replaced_by': ['24650971', '24650060', '24647704', '24647256', '24646256', '24645598', '24642483',
'24641459', '24636981', '24636522', '24633685', '24634361', '24632439', '24632028',
'24631136', '24628830', '24628098', '24624629', '24624189', '24623013', '24616519',
'24615460', '24615219', '24612435', '24611779', '24610623', '24606824', '24606427',
'24603569', '24600385', '24594088', '24590208', '24574442', '24537933', '24508439',
'24499204']},
{'old': 'GiV1_hMx_qUT', 'replaced_by': 's5pR_WNm_R8W', 'label': 'Administratör/Administrativ assistent',
'hits_old': ['24650971', '24650060', '24647704', '24647256', '24645598', '24642483', '24641459', '24636981',
'24636522', '24633685', '24634361', '24632439', '24632028', '24631136', '24628830', '24628098',
'24624629', '24624189', '24623013', '24616519', '24615460', '24615219', '24612435', '24611779',
'24610623', '24606824', '24606427', '24603569', '24600385', '24590208', '24574442', '24537933',
'24499204'],
'replacing_old_concept_ids': ['s5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'Dgx7_yw6_CaN',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W',
'Dgx7_yw6_CaN', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 's5pR_WNm_R8W', 'T9MX_dmQ_t5n',
's5pR_WNm_R8W'],
'hits_replaced_by': ['24650971', '24650060', '24647704', '24647256', '24646256', '24645598', '24642483',
'24641459', '24636981', '24636522', '24633685', '24634361', '24632439', '24632028',
'24631136', '24628830', '24628098', '24624629', '24624189', '24623013', '24616519',
'24615460', '24615219', '24612435', '24611779', '24610623', '24606824', '24606427',
'24603569', '24600385', '24594088', '24590208', '24574442', '24537933', '24508439',
'24499204']},
{'old': '4L63_HPx_7uh', 'replaced_by': 'y763_SQh_71J', 'label': 'Databasadministratör',
'hits_old': ['24635989', '24632433'], 'replacing_old_concept_ids': ['y763_SQh_71J', 'y763_SQh_71J'],
'hits_replaced_by': ['24635989', '24632433']},
{'old': '7oc6_8Rs_fAv', 'replaced_by': 'zthE_Zb1_tjb', 'label': 'Linjeagent/Rederiagent', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'sbKP_NHi_eiv', 'replaced_by': 'QUmN_cfC_zPn',
'label': 'Utbildningsadministratör/Utbildningssekreterare/Kursadministratör', 'hits_old': ['24649356', '24647010'],
'replacing_old_concept_ids': ['sbKP_NHi_eiv', 'QUmN_cfC_zPn'], 'hits_replaced_by': ['24649356', '24647010']},
{'old': 'JPtk_3q6_xBL', 'replaced_by': 'QUmN_cfC_zPn',
'label': 'Utbildningsadministratör/Utbildningssekreterare/Kursadministratör', 'hits_old': ['24647010'],
'replacing_old_concept_ids': ['sbKP_NHi_eiv', 'QUmN_cfC_zPn'], 'hits_replaced_by': ['24649356', '24647010']},
{'old': '1jLm_pkS_3BX', 'replaced_by': 'QUmN_cfC_zPn',
'label': 'Utbildningsadministratör/Utbildningssekreterare/Kursadministratör', 'hits_old': ['24647010'],
'replacing_old_concept_ids': ['sbKP_NHi_eiv', 'QUmN_cfC_zPn'], 'hits_replaced_by': ['24649356', '24647010']},
{'old': '7jaj_Pej_27m', 'replaced_by': 'XYoM_UCq_923', 'label': 'Reklamassistent/Reklamsekreterare', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': '7Zx9_BVE_Qna', 'replaced_by': 'p3m5_Ndd_6im', 'label': 'Annonsmottagare', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'ayC6_Lks_sFQ', 'replaced_by': 'CeoS_Wzo_uz5', 'label': 'Redovisningskonsult',
'hits_old': ['24640665', '24635281', '24619295', '24618922', '24596487', '24595573', '24578086', '24565035',
'24553781', '24541494', '24373453'],
'replacing_old_concept_ids': ['CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5',
'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5',
'CeoS_Wzo_uz5'],
'hits_replaced_by': ['24640665', '24635281', '24619295', '24618922', '24596487', '24595573', '24578086',
'24565035', '24553781', '24541494', '24373453']},
{'old': 'i5JT_We2_TpX', 'replaced_by': 'CeoS_Wzo_uz5', 'label': 'Redovisningskonsult',
'hits_old': ['24640665', '24635281', '24619295', '24618922', '24596487', '24595573', '24578086', '24565035',
'24553781', '24541494', '24373453'],
'replacing_old_concept_ids': ['CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5',
'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5',
'CeoS_Wzo_uz5'],
'hits_replaced_by': ['24640665', '24635281', '24619295', '24618922', '24596487', '24595573', '24578086',
'24565035', '24553781', '24541494', '24373453']},
{'old': '7rct_y2Q_NSe', 'replaced_by': 'Bbpr_AMz_nzt', 'label': 'Revisorsassistent',
'hits_old': ['24612654', '24591386', '24549608'],
'replacing_old_concept_ids': ['Bbpr_AMz_nzt', '7rct_y2Q_NSe', 'Bbpr_AMz_nzt'],
'hits_replaced_by': ['24612654', '24591386', '24549608']},
{'old': 'mNBw_Znj_4eJ', 'replaced_by': 'jwgi_jYc_iE9', 'label': 'Revisor',
'hits_old': ['24622718', '24607178', '24530121'],
'replacing_old_concept_ids': ['jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'fo9m_5cC_y8G',
'jwgi_jYc_iE9'],
'hits_replaced_by': ['24622718', '24613082', '24607178', '24594452', '24565317', '24530121']},
{'old': 'Ffsi_TDN_PDF', 'replaced_by': 'CeoS_Wzo_uz5', 'label': 'Redovisningskonsult',
'hits_old': ['24640665', '24635281', '24619295', '24618922', '24596487', '24595573', '24578086', '24565035',
'24553781', '24541494', '24373453'],
'replacing_old_concept_ids': ['CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5',
'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5',
'CeoS_Wzo_uz5'],
'hits_replaced_by': ['24640665', '24635281', '24619295', '24618922', '24596487', '24595573', '24578086',
'24565035', '24553781', '24541494', '24373453']},
{'old': 'HeRm_ChB_HVB', 'replaced_by': 'CeoS_Wzo_uz5', 'label': 'Redovisningskonsult',
'hits_old': ['24640665', '24635281', '24619295', '24618922', '24596487', '24595573', '24578086', '24565035',
'24553781', '24541494', '24373453'],
'replacing_old_concept_ids': ['CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5',
'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5', 'CeoS_Wzo_uz5',
'CeoS_Wzo_uz5'],
'hits_replaced_by': ['24640665', '24635281', '24619295', '24618922', '24596487', '24595573', '24578086',
'24565035', '24553781', '24541494', '24373453']},
{'old': 'kf7K_UAZ_ed8', 'replaced_by': 'BbNn_Gtf_rKp',
'label': 'Badmästare/Badbevakare/Badvakt/Simhallsvakt/Strandvakt', 'hits_old': ['24572488'],
'replacing_old_concept_ids': ['qtPc_BJB_SYL', 'kf7K_UAZ_ed8', 'qtPc_BJB_SYL'],
'hits_replaced_by': ['24645272', '24572488', '24552904']},
{'old': 'YXm8_rp9_1Sv', 'replaced_by': 'BbNn_Gtf_rKp',
'label': 'Badmästare/Badbevakare/Badvakt/Simhallsvakt/Strandvakt', 'hits_old': [],
'replacing_old_concept_ids': ['qtPc_BJB_SYL', 'kf7K_UAZ_ed8', 'qtPc_BJB_SYL'],
'hits_replaced_by': ['24645272', '24572488', '24552904']},
{'old': 'wFPP_zmg_PK4', 'replaced_by': 'BbNn_Gtf_rKp',
'label': 'Badmästare/Badbevakare/Badvakt/Simhallsvakt/Strandvakt', 'hits_old': [],
'replacing_old_concept_ids': ['qtPc_BJB_SYL', 'kf7K_UAZ_ed8', 'qtPc_BJB_SYL'],
'hits_replaced_by': ['24645272', '24572488', '24552904']},
{'old': 'dunj_FU3_Fx5', 'replaced_by': '2LBV_CoV_iEf', 'label': 'Artistagent/Artistbokare/Artistförmedlare',
'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'GGA1_QkE_XgN', 'replaced_by': 'nRLP_eqC_ow9', 'label': 'Löneadministratör/Lönekonsult',
'hits_old': ['24649915', '24624230', '24619974'],
'replacing_old_concept_ids': ['nRLP_eqC_ow9', 'nRLP_eqC_ow9', 'nRLP_eqC_ow9'],
'hits_replaced_by': ['24649915', '24624230', '24619974']},
{'old': 'R33K_7kd_PPT', 'replaced_by': 'nRLP_eqC_ow9', 'label': 'Löneadministratör/Lönekonsult',
'hits_old': ['24649915', '24624230', '24619974'],
'replacing_old_concept_ids': ['nRLP_eqC_ow9', 'nRLP_eqC_ow9', 'nRLP_eqC_ow9'],
'hits_replaced_by': ['24649915', '24624230', '24619974']},
{'old': 'DCMR_H5T_4Nk', 'replaced_by': 'WrM5_fTS_37j', 'label': 'Forskare, språk', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'Cq7H_YYS_aQH', 'replaced_by': 'ef1m_sEu_ok6', 'label': 'Nationalekonom', 'hits_old': ['24606305'],
'replacing_old_concept_ids': ['ef1m_sEu_ok6'], 'hits_replaced_by': ['24606305']},
{'old': 'LCCW_oaP_6kn', 'replaced_by': 'GFu2_s4q_9sr', 'label': 'Redaktör', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'VtTs_Y26_KMJ', 'replaced_by': 'k3ZW_16R_riY', 'label': 'Sångare', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'zHkF_Yg1_PTS', 'replaced_by': 'j6P1_gJq_a2Q', 'label': 'Skolchef/Skoldirektör/Skolledare',
'hits_old': ['24575721', '24569099'], 'replacing_old_concept_ids': ['j6P1_gJq_a2Q', 'j6P1_gJq_a2Q'],
'hits_replaced_by': ['24575721', '24569099']},
{'old': 'hJuL_n8p_UEM', 'replaced_by': 'M7TY_sct_XPk', 'label': 'Idrottskonsulent', 'hits_old': ['24641526'],
'replacing_old_concept_ids': ['hJuL_n8p_UEM'], 'hits_replaced_by': ['24641526']},
{'old': 'NNtF_PrM_erv', 'replaced_by': 'nGhq_Pjm_az5', 'label': 'Medicinteknisk ingenjör',
'hits_old': ['24615799', '24608421', '24591934', '24434389'],
'replacing_old_concept_ids': ['nGhq_Pjm_az5', 'nGhq_Pjm_az5', 'nGhq_Pjm_az5', 'nGhq_Pjm_az5'],
'hits_replaced_by': ['24615799', '24608421', '24591934', '24434389']},
{'old': 'UFCb_3sj_MET', 'replaced_by': 'nGhq_Pjm_az5', 'label': 'Medicinteknisk ingenjör',
'hits_old': ['24615799', '24608421', '24591934', '24434389'],
'replacing_old_concept_ids': ['nGhq_Pjm_az5', 'nGhq_Pjm_az5', 'nGhq_Pjm_az5', 'nGhq_Pjm_az5'],
'hits_replaced_by': ['24615799', '24608421', '24591934', '24434389']},
{'old': '4zNH_ukk_cEn', 'replaced_by': 'KQty_E1u_cia', 'label': 'Helpdesktekniker/Supporttekniker',
'hits_old': ['24647864', '24645367', '24642579', '24641101', '24639693', '24638483', '24636316', '24636297',
'24634219', '24632405', '24629335', '24629041', '24627643', '24625275', '24620387', '24620198',
'24618941', '24617235', '24616692', '24616638', '24614519', '24606872', '24606094', '24605242',
'24604823', '24603947', '24603021', '24598564', '24593650', '24590806', '24585051', '24569128',
'24538946', '24508353', '24499896'],
'replacing_old_concept_ids': ['KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia',
'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia',
'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia',
'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia',
'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia',
'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia',
'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia', 'KQty_E1u_cia'],
'hits_replaced_by': ['24647864', '24645367', '24642579', '24641101', '24639693', '24638483', '24636316',
'24636297', '24634219', '24632405', '24629335', '24629041', '24627643', '24625275',
'24620387', '24620198', '24618941', '24617235', '24616692', '24616638', '24614519',
'24606872', '24606094', '24605242', '24604823', '24603947', '24603021', '24598564',
'24593650', '24590806', '24585051', '24569128', '24538946', '24508353', '24499896']},
{'old': '3vQv_E4Q_wjK', 'replaced_by': 'hERw_LKk_uJK', 'label': 'Trafiklärare',
'hits_old': ['24648390', '24604479', '24618870', '24603183', '24596067', '24585890', '24534821', '24478339'],
'replacing_old_concept_ids': ['hERw_LKk_uJK', 'hERw_LKk_uJK', 'hERw_LKk_uJK', 'hERw_LKk_uJK', 'hERw_LKk_uJK',
'hERw_LKk_uJK', 'hERw_LKk_uJK', 'hERw_LKk_uJK'],
'hits_replaced_by': ['24648390', '24604479', '24618870', '24603183', '24596067', '24585890', '24534821',
'24478339']},
{'old': '46tq_qty_Lqm', 'replaced_by': 'RsYS_Mkj_kd1', 'label': 'Showartist', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'X4cv_VTi_Muz', 'replaced_by': 'UtA2_od9_3WT', 'label': 'Elektriker, film/Elektriker, TV', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'EEN6_NCm_XgJ', 'replaced_by': '9fEz_9ji_74Y', 'label': 'Tandtekniker', 'hits_old': ['24553091'],
'replacing_old_concept_ids': ['EEN6_NCm_XgJ'], 'hits_replaced_by': ['24553091']},
{'old': 'kZAz_CaQ_zhN', 'replaced_by': 'iRUx_bBB_Vmp', 'label': 'Stadsjurist/Kommunjurist/Stadsadvokat',
'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'Cbq1_SZq_WQJ', 'replaced_by': 'iRUx_bBB_Vmp', 'label': 'Stadsjurist/Kommunjurist/Stadsadvokat',
'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'etPa_VHn_mrt', 'replaced_by': '7YVF_kE4_aPm', 'label': 'Ombudsman', 'hits_old': [],
'replacing_old_concept_ids': ['YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt'],
'hits_replaced_by': ['24681267', '24681265', '24681247', '24676773', '24625395']},
{'old': '1hZc_5BC_K7q', 'replaced_by': '7Yn2_NLJ_oa2', 'label': 'Elkraftingenjör', 'hits_old': ['24602558'],
'replacing_old_concept_ids': ['Kh3N_Kg8_KK5', '1hZc_5BC_K7q', 'Kh3N_Kg8_KK5', 'aWNX_iEg_NhN', 'aWNX_iEg_NhN',
'Kh3N_Kg8_KK5'],
'hits_replaced_by': ['24645107', '24602558', '24572890', '24512446', '24507851', '24445999']},
{'old': 'g7UK_FUb_nxf', 'replaced_by': '7Yn2_NLJ_oa2', 'label': 'Elkraftingenjör', 'hits_old': [],
'replacing_old_concept_ids': ['Kh3N_Kg8_KK5', '1hZc_5BC_K7q', 'Kh3N_Kg8_KK5', 'aWNX_iEg_NhN', 'aWNX_iEg_NhN',
'Kh3N_Kg8_KK5'],
'hits_replaced_by': ['24645107', '24602558', '24572890', '24512446', '24507851', '24445999']},
{'old': 'PMx8_n1G_fPx', 'replaced_by': '7Yn2_NLJ_oa2', 'label': 'Elkraftingenjör', 'hits_old': [],
'replacing_old_concept_ids': ['Kh3N_Kg8_KK5', '1hZc_5BC_K7q', 'Kh3N_Kg8_KK5', 'aWNX_iEg_NhN', 'aWNX_iEg_NhN',
'Kh3N_Kg8_KK5'],
'hits_replaced_by': ['24645107', '24602558', '24572890', '24512446', '24507851', '24445999']},
{'old': 'TppD_R5Y_kiG', 'replaced_by': 'iXyv_E2W_cqc', 'label': 'Kontrollanläggningstekniker',
'hits_old': ['24641497'], 'replacing_old_concept_ids': ['TppD_R5Y_kiG', 'cJ62_FKk_ua6', 'cJ62_FKk_ua6'],
'hits_replaced_by': ['24641497', '24623380', '24623314']},
{'old': 'XN3S_vj8_8Wz', 'replaced_by': 'KiD2_B8H_U7U', 'label': 'Vapentekniker', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'YHB5_wmX_UCt', 'replaced_by': '7YVF_kE4_aPm', 'label': 'Ombudsman',
'hits_old': ['24681267', '24681265', '24681247', '24676773', '24625395'],
'replacing_old_concept_ids': ['YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt'],
'hits_replaced_by': ['24681267', '24681265', '24681247', '24676773', '24625395']},
{'old': 'Sdc8_zgb_WFe', 'replaced_by': 'Zjz2_R2c_ySs', 'label': 'Inspicient', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'NBpU_vTR_B6S', 'replaced_by': 'Zjz2_R2c_ySs', 'label': 'Inspicient', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'cCYi_JUn_K8P', 'replaced_by': 'oRBx_v9Q_vH2', 'label': 'Forskare, jordbruk', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': '5bp9_eBL_BPF', 'replaced_by': 'Co7T_yKa_Zb1', 'label': 'Forskare, trädgårdsvetenskap', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'CWK4_8NM_4YY', 'replaced_by': 'gUu8_FXb_qCv', 'label': 'Prepressoperatör', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'mL3G_SKE_mab', 'replaced_by': 'gUu8_FXb_qCv', 'label': 'Prepressoperatör', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'AfoB_XP5_5Ak', 'replaced_by': 'SxqC_BSK_D3u', 'label': 'Originalare/Final Art', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'd2gz_es2_pX5', 'replaced_by': 'hQtr_vwy_MGb', 'label': 'Kvalitetssamordnare/Kvalitetskoordinator',
'hits_old': ['24647020', '24646953', '24646081', '24643688', '24640405', '24634573', '24616132', '24610804',
'24576129', '24514986'],
'replacing_old_concept_ids': ['d2gz_es2_pX5', 'd2gz_es2_pX5', 'hQtr_vwy_MGb', 'hQtr_vwy_MGb', 'hQtr_vwy_MGb',
'd2gz_es2_pX5', 'hQtr_vwy_MGb', 'hQtr_vwy_MGb', 'd2gz_es2_pX5', 'hQtr_vwy_MGb'],
'hits_replaced_by': ['24647020', '24646953', '24646081', '24643688', '24640405', '24634573', '24616132',
'24610804', '24576129', '24514986']},
{'old': 'E9Fm_7C2_uYU', 'replaced_by': 'JfyC_gDr_U4e', 'label': 'TV-fotograf', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': '7pvW_ATp_bnx', 'replaced_by': 'K1k3_ZHN_PTh', 'label': 'Redigerare, rörlig bild', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'N9fQ_uJ4_1vB', 'replaced_by': 'K1k3_ZHN_PTh', 'label': 'Redigerare, rörlig bild', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'SR8Z_ESt_FfC', 'replaced_by': 'jwgi_jYc_iE9', 'label': 'Revisor',
'hits_old': ['24622718', '24607178', '24530121'],
'replacing_old_concept_ids': ['jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'fo9m_5cC_y8G',
'jwgi_jYc_iE9'],
'hits_replaced_by': ['24622718', '24613082', '24607178', '24594452', '24565317', '24530121']},
{'old': 'yjaM_pAe_u9m', 'replaced_by': 'WWVG_4sM_faC', 'label': 'Butikschef',
'hits_old': ['24644601', '24639242', '24636959', '24632618', '24627262', '24625609', '24611376', '24607526',
'24605640', '24594836', '24578489', '24554245', '24536706', '24514623'],
'replacing_old_concept_ids': ['WWVG_4sM_faC', 'WWVG_4sM_faC', 'WWVG_4sM_faC', 'WWVG_4sM_faC', 'WWVG_4sM_faC',
'WWVG_4sM_faC', 'WWVG_4sM_faC', 'WWVG_4sM_faC', 'WWVG_4sM_faC', 'WWVG_4sM_faC',
'WWVG_4sM_faC', 'WWVG_4sM_faC', 'yjaM_pAe_u9m', 'WWVG_4sM_faC'],
'hits_replaced_by': ['24644601', '24639242', '24636959', '24632618', '24627262', '24625609', '24611376',
'24607526', '24605640', '24594836', '24578489', '24554245', '24536706', '24514623']},
{'old': 'ssNi_aPV_7o3', 'replaced_by': 'WL4K_4RF_NEJ', 'label': 'Bostadsförmedlare', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': '79uB_oJR_dSQ', 'replaced_by': 'y22E_Nz6_5VU', 'label': 'HR-chef',
'hits_old': ['24647998', '24623695', '24566659', '24442113'],
'replacing_old_concept_ids': ['y22E_Nz6_5VU', 'y22E_Nz6_5VU', 'y22E_Nz6_5VU', 'y22E_Nz6_5VU'],
'hits_replaced_by': ['24647998', '24623695', '24566659', '24442113']},
{'old': 'nSdx_qDe_vCh', 'replaced_by': 'y22E_Nz6_5VU', 'label': 'HR-chef',
'hits_old': ['24647998', '24623695', '24566659', '24442113'],
'replacing_old_concept_ids': ['y22E_Nz6_5VU', 'y22E_Nz6_5VU', 'y22E_Nz6_5VU', 'y22E_Nz6_5VU'],
'hits_replaced_by': ['24647998', '24623695', '24566659', '24442113']},
{'old': '4xEL_DVf_rNV', 'replaced_by': 'aoUt_f9s_rAk', 'label': 'Abonnemangsförsäljare',
'hits_old': ['24648147', '24648032', '24647914', '24647866', '24645321', '24645317', '24643210', '24643150',
'24643147', '24639915', '24609749', '24623136', '24619244', '24615851', '24610069', '24571210'],
'replacing_old_concept_ids': ['aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk',
'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk',
'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk', 'aoUt_f9s_rAk',
'aoUt_f9s_rAk'],
'hits_replaced_by': ['24648147', '24648032', '24647914', '24647866', '24645321', '24645317', '24643210',
'24643150', '24643147', '24639915', '24609749', '24623136', '24619244', '24615851',
'24610069', '24571210']},
{'old': 'YrxV_b6A_Dav', 'replaced_by': 'MegR_77J_CGU', 'label': 'Annonsassistent/Annonssekreterare', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 't4QA_LXF_Z3T', 'replaced_by': 'W8Kb_rxf_uRQ', 'label': 'Inköpsassistent/Inköpskontorist/Inköpssekreterare',
'hits_old': [],
'replacing_old_concept_ids': ['2YDV_mGq_LpN', '2YDV_mGq_LpN', '2YDV_mGq_LpN', '2YDV_mGq_LpN', 'ZyDH_2Xe_bfK'],
'hits_replaced_by': ['24647760', '24647703', '24635648', '24620172', '24619248']},
{'old': 'mXSF_yMY_ppH', 'replaced_by': 'HFuj_YCt_Ymn', 'label': 'Försäljningsassistent/Försäljningssekreterare',
'hits_old': ['24643212'],
'replacing_old_concept_ids': ['NikA_KEh_Ky4', 'NikA_KEh_Ky4', 'HFuj_YCt_Ymn', 'NikA_KEh_Ky4'],
'hits_replaced_by': ['24649654', '24647299', '24643212', '24603457']},
{'old': '2YDV_mGq_LpN', 'replaced_by': 'W8Kb_rxf_uRQ', 'label': 'Inköpsassistent/Inköpskontorist/Inköpssekreterare',
'hits_old': ['24647760', '24647703', '24635648', '24620172'],
'replacing_old_concept_ids': ['2YDV_mGq_LpN', '2YDV_mGq_LpN', '2YDV_mGq_LpN', '2YDV_mGq_LpN', 'ZyDH_2Xe_bfK'],
'hits_replaced_by': ['24647760', '24647703', '24635648', '24620172', '24619248']},
{'old': 'ZyDH_2Xe_bfK', 'replaced_by': 'W8Kb_rxf_uRQ', 'label': 'Inköpsassistent/Inköpskontorist/Inköpssekreterare',
'hits_old': ['24619248'],
'replacing_old_concept_ids': ['2YDV_mGq_LpN', '2YDV_mGq_LpN', '2YDV_mGq_LpN', '2YDV_mGq_LpN', 'ZyDH_2Xe_bfK'],
'hits_replaced_by': ['24647760', '24647703', '24635648', '24620172', '24619248']},
{'old': 'NikA_KEh_Ky4', 'replaced_by': 'HFuj_YCt_Ymn', 'label': 'Försäljningsassistent/Försäljningssekreterare',
'hits_old': ['24649654', '24647299', '24643212', '24603457'],
'replacing_old_concept_ids': ['NikA_KEh_Ky4', 'NikA_KEh_Ky4', 'HFuj_YCt_Ymn', 'NikA_KEh_Ky4'],
'hits_replaced_by': ['24649654', '24647299', '24643212', '24603457']},
{'old': 'AfxM_9dB_xbC', 'replaced_by': 'HFuj_YCt_Ymn', 'label': 'Försäljningsassistent/Försäljningssekreterare',
'hits_old': ['24643212'],
'replacing_old_concept_ids': ['NikA_KEh_Ky4', 'NikA_KEh_Ky4', 'HFuj_YCt_Ymn', 'NikA_KEh_Ky4'],
'hits_replaced_by': ['24649654', '24647299', '24643212', '24603457']},
{'old': '33CY_8xp_U24', 'replaced_by': '7YVF_kE4_aPm', 'label': 'Ombudsman', 'hits_old': [],
'replacing_old_concept_ids': ['YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt'],
'hits_replaced_by': ['24681267', '24681265', '24681247', '24676773', '24625395']},
{'old': '4pdy_hXe_krp', 'replaced_by': '7YVF_kE4_aPm', 'label': 'Ombudsman', 'hits_old': [],
'replacing_old_concept_ids': ['YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt'],
'hits_replaced_by': ['24681267', '24681265', '24681247', '24676773', '24625395']},
{'old': 'Qf5a_Awb_Xr1', 'replaced_by': '7YVF_kE4_aPm', 'label': 'Ombudsman', 'hits_old': [],
'replacing_old_concept_ids': ['YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt'],
'hits_replaced_by': ['24681267', '24681265', '24681247', '24676773', '24625395']},
{'old': '6qFX_Cmu_o5U', 'replaced_by': '7YVF_kE4_aPm', 'label': 'Ombudsman', 'hits_old': [],
'replacing_old_concept_ids': ['YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt'],
'hits_replaced_by': ['24681267', '24681265', '24681247', '24676773', '24625395']},
{'old': '7J2i_94b_ow4', 'replaced_by': 'wUKi_LRW_Wxk', 'label': 'Fastighetschef/Fastighetsdirektör',
'hits_old': ['24643005', '24632701', '24596320'],
'replacing_old_concept_ids': ['wUKi_LRW_Wxk', 'wUKi_LRW_Wxk', 'wUKi_LRW_Wxk'],
'hits_replaced_by': ['24643005', '24632701', '24596320']},
{'old': 'nHFx_RFe_giS', 'replaced_by': 'iCy6_G72_abh', 'label': 'Ekonomichef',
'hits_old': ['24650582', '24625929', '24624351', '24616138', '24615771', '24610880'],
'replacing_old_concept_ids': ['iCy6_G72_abh', 'iCy6_G72_abh', 'iCy6_G72_abh', 'iCy6_G72_abh', 'iCy6_G72_abh',
'iCy6_G72_abh'],
'hits_replaced_by': ['24650582', '24625929', '24624351', '24616138', '24615771', '24610880']},
{'old': 'qic5_pQo_xhT', 'replaced_by': 'U9AU_Rre_pbM', 'label': 'Assessor', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'Qgmk_7Xb_z4q', 'replaced_by': 'jn3U_UTt_PUJ', 'label': 'Socialchef/Socialdirektör', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'noSX_WNd_Nxv', 'replaced_by': 'DWv2_Yu9_yo6', 'label': 'Stadsbyggnadschef/Stadsbyggnadsdirektör',
'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'SpMJ_sSm_Vjp', 'replaced_by': 'iJfW_Lt2_sQt', 'label': 'Teknisk chef, kommun', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'kNQH_LXD_eLe', 'replaced_by': 'jwgi_jYc_iE9', 'label': 'Revisor',
'hits_old': ['24622718', '24607178', '24530121'],
'replacing_old_concept_ids': ['jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'fo9m_5cC_y8G',
'jwgi_jYc_iE9'],
'hits_replaced_by': ['24622718', '24613082', '24607178', '24594452', '24565317', '24530121']},
{'old': 'jNaB_ozm_pm7', 'replaced_by': 'VKcv_Mbu_KJE', 'label': 'Internatföreståndare/Skolmåltidsföreståndare',
'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': '44uM_XPP_VdK', 'replaced_by': 'rfpp_bnQ_RoQ', 'label': 'Parkeringsvakt/Trafikövervakare', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'ybqj_FXq_K98', 'replaced_by': 'eXwZ_gVJ_39q', 'label': 'Fartygsagent/Fartygsklarerare', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'nrya_iNN_6BR', 'replaced_by': 'jqVE_Ux3_VMN', 'label': 'Dataregistrerare/Registrerare', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'zKqM_a5a_29j', 'replaced_by': 'p3m5_Ndd_6im', 'label': 'Annonsmottagare', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'qtPc_BJB_SYL', 'replaced_by': 'BbNn_Gtf_rKp',
'label': 'Badmästare/Badbevakare/Badvakt/Simhallsvakt/Strandvakt', 'hits_old': ['24645272', '24552904'],
'replacing_old_concept_ids': ['qtPc_BJB_SYL', 'kf7K_UAZ_ed8', 'qtPc_BJB_SYL'],
'hits_replaced_by': ['24645272', '24572488', '24552904']},
{'old': 'GUHc_KyJ_Dst', 'replaced_by': '2LBV_CoV_iEf', 'label': 'Artistagent/Artistbokare/Artistförmedlare',
'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'MopY_AvK_MmE', 'replaced_by': 'j6P1_gJq_a2Q', 'label': 'Skolchef/Skoldirektör/Skolledare',
'hits_old': ['24575721', '24569099'], 'replacing_old_concept_ids': ['j6P1_gJq_a2Q', 'j6P1_gJq_a2Q'],
'hits_replaced_by': ['24575721', '24569099']},
{'old': 'JGxJ_pEB_yre', 'replaced_by': 'GTFy_iPM_msj', 'label': 'Butikskommunikatör/Visual merchandiser',
'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'cJ62_FKk_ua6', 'replaced_by': 'iXyv_E2W_cqc', 'label': 'Kontrollanläggningstekniker',
'hits_old': ['24623380', '24623314'],
'replacing_old_concept_ids': ['TppD_R5Y_kiG', 'cJ62_FKk_ua6', 'cJ62_FKk_ua6'],
'hits_replaced_by': ['24641497', '24623380', '24623314']},
{'old': '4Ujg_KC9_cLT', 'replaced_by': 'KiD2_B8H_U7U', 'label': 'Vapentekniker', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 't2pX_4bB_xCG', 'replaced_by': 'm8ED_BbT_twk', 'label': 'Bildingenjör/BING, film/BING, TV', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'dh7h_HbH_Cus', 'replaced_by': 'nvUH_JLD_s4F', 'label': 'Verkställande direktör/VD',
'hits_old': ['24638242', '24516982'], 'replacing_old_concept_ids': ['nvUH_JLD_s4F', 'dh7h_HbH_Cus'],
'hits_replaced_by': ['24638242', '24516982']},
{'old': '5Nkq_7DE_hoo', 'replaced_by': 'NZcr_uB1_6rX', 'label': 'Platschef, bygg',
'hits_old': ['24638307', '24631557', '24608211', '24604812', '24471798'],
'replacing_old_concept_ids': ['NZcr_uB1_6rX', 'NZcr_uB1_6rX', '5Nkq_7DE_hoo', 'NZcr_uB1_6rX', 'NZcr_uB1_6rX'],
'hits_replaced_by': ['24638307', '24631557', '24608211', '24604812', '24471798']},
{'old': 'saUi_aP6_zhU', 'replaced_by': 'euJP_wxo_skF', 'label': 'Dansare', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': '4i7D_pQL_DNa', 'replaced_by': 'FuJx_cGT_5im', 'label': 'Civilingenjör, elkraft',
'hits_old': ['24632281', '24573532'],
'replacing_old_concept_ids': ['FuJx_cGT_5im', 'WhsT_BWb_dPy', 'FuJx_cGT_5im'],
'hits_replaced_by': ['24632281', '24622759', '24573532']},
{'old': 'XZrs_VW9_31C', 'replaced_by': 'p4vQ_Dpo_d6a', 'label': 'Elkvalitetsanalytiker, elkraft', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'Be1K_Dp4_DrD', 'replaced_by': 'fYBk_dfW_DJc', 'label': 'Kontrollanläggningsingenjör, elkraft',
'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'WhsT_BWb_dPy', 'replaced_by': 'FuJx_cGT_5im', 'label': 'Civilingenjör, elkraft',
'hits_old': ['24632281', '24622759', '24573532'],
'replacing_old_concept_ids': ['FuJx_cGT_5im', 'WhsT_BWb_dPy', 'FuJx_cGT_5im'],
'hits_replaced_by': ['24632281', '24622759', '24573532']},
{'old': '4QjK_RpG_h4w', 'replaced_by': 'Yyn9_wQV_Wb8', 'label': 'Underhållsanalytiker, elkraft',
'hits_old': ['24637940', '24509354'], 'replacing_old_concept_ids': ['4QjK_RpG_h4w', '4QjK_RpG_h4w'],
'hits_replaced_by': ['24637940', '24509354']},
{'old': 'GtGP_PiD_yRc', 'replaced_by': 'FuJx_cGT_5im', 'label': 'Civilingenjör, elkraft',
'hits_old': ['24632281', '24573532'],
'replacing_old_concept_ids': ['FuJx_cGT_5im', 'WhsT_BWb_dPy', 'FuJx_cGT_5im'],
'hits_replaced_by': ['24632281', '24622759', '24573532']},
{'old': 'nr69_xvF_c4f', 'replaced_by': '7YVF_kE4_aPm', 'label': 'Ombudsman', 'hits_old': [],
'replacing_old_concept_ids': ['YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt', 'YHB5_wmX_UCt'],
'hits_replaced_by': ['24681267', '24681265', '24681247', '24676773', '24625395']},
{'old': 'MGBV_LVk_AtK', 'replaced_by': 'QQjZ_NAN_bDR', 'label': 'Interaktionsdesigner',
'hits_old': ['24647065', '24646521', '24646322', '24632584', '24520622'],
'replacing_old_concept_ids': ['MGBV_LVk_AtK', 'MGBV_LVk_AtK', 'MGBV_LVk_AtK', 'QQjZ_NAN_bDR', 'MGBV_LVk_AtK',
'HciA_Cu7_FXt', 'HciA_Cu7_FXt'],
'hits_replaced_by': ['24647065', '24646521', '24646322', '24632584', '24520622', '24527159', '24527152']},
{'old': 'HciA_Cu7_FXt', 'replaced_by': 'QQjZ_NAN_bDR', 'label': 'Interaktionsdesigner',
'hits_old': ['24632584', '24527159', '24527152'],
'replacing_old_concept_ids': ['MGBV_LVk_AtK', 'MGBV_LVk_AtK', 'MGBV_LVk_AtK', 'QQjZ_NAN_bDR', 'MGBV_LVk_AtK',
'HciA_Cu7_FXt', 'HciA_Cu7_FXt'],
'hits_replaced_by': ['24647065', '24646521', '24646322', '24632584', '24520622', '24527159', '24527152']},
{'old': 'fdZE_y62_wdE', 'replaced_by': 'dRXp_E2C_Lq9', 'label': 'Kommunchef/Kommundirektör/Stadsdirektör',
'hits_old': [], 'replacing_old_concept_ids': ['7yzW_dCg_7s7'], 'hits_replaced_by': ['24648307']},
{'old': 'Eo4y_EGW_KVM', 'replaced_by': '7Yn2_NLJ_oa2', 'label': 'Elkraftingenjör', 'hits_old': [],
'replacing_old_concept_ids': ['Kh3N_Kg8_KK5', '1hZc_5BC_K7q', 'Kh3N_Kg8_KK5', 'aWNX_iEg_NhN', 'aWNX_iEg_NhN',
'Kh3N_Kg8_KK5'],
'hits_replaced_by': ['24645107', '24602558', '24572890', '24512446', '24507851', '24445999']},
{'old': 'twUU_T1n_hW5', 'replaced_by': 'jwgi_jYc_iE9', 'label': 'Revisor',
'hits_old': ['24622718', '24607178', '24530121'],
'replacing_old_concept_ids': ['jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'fo9m_5cC_y8G',
'jwgi_jYc_iE9'],
'hits_replaced_by': ['24622718', '24613082', '24607178', '24594452', '24565317', '24530121']},
{'old': 'aWNX_iEg_NhN', 'replaced_by': '7Yn2_NLJ_oa2', 'label': 'Elkraftingenjör',
'hits_old': ['24512446', '24507851'],
'replacing_old_concept_ids': ['Kh3N_Kg8_KK5', '1hZc_5BC_K7q', 'Kh3N_Kg8_KK5', 'aWNX_iEg_NhN', 'aWNX_iEg_NhN',
'Kh3N_Kg8_KK5'],
'hits_replaced_by': ['24645107', '24602558', '24572890', '24512446', '24507851', '24445999']},
{'old': '7ava_ohk_66H', 'replaced_by': 'jwgi_jYc_iE9', 'label': 'Revisor',
'hits_old': ['24622718', '24607178', '24530121'],
'replacing_old_concept_ids': ['jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'jwgi_jYc_iE9', 'fo9m_5cC_y8G', 'fo9m_5cC_y8G',
'jwgi_jYc_iE9'],
'hits_replaced_by': ['24622718', '24613082', '24607178', '24594452', '24565317', '24530121']},
{'old': 'KhbC_P4c_R82', 'replaced_by': 'V74g_m5Z_BtM', 'label': 'Kanslichef', 'hits_old': [],
'replacing_old_concept_ids': ['Uoeq_F5q_18w'], 'hits_replaced_by': ['24646965']},
{'old': 'ohrC_dLP_3ad', 'replaced_by': 'cB4Q_Cx9_2Lw', 'label': 'Beredskapsdirektör', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'tnaT_rPT_RXj', 'replaced_by': 'KMRG_Bda_5CV', 'label': 'Tågvärd/Tågvärdinna', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': '7yzW_dCg_7s7', 'replaced_by': 'dRXp_E2C_Lq9', 'label': 'Kommunchef/Kommundirektör/Stadsdirektör',
'hits_old': ['24648307'], 'replacing_old_concept_ids': ['7yzW_dCg_7s7'], 'hits_replaced_by': ['24648307']},
{'old': '9wyj_ibD_Yo1', 'replaced_by': 'ofiS_5F2_YmV', 'label': 'HR-assistent',
'hits_old': ['24646439', '24643526', '24617892'],
'replacing_old_concept_ids': ['ofiS_5F2_YmV', 'ofiS_5F2_YmV', 'ofiS_5F2_YmV'],
'hits_replaced_by': ['24646439', '24643526', '24617892']},
{'old': 'qV9q_oKv_QzL', 'replaced_by': 'FcaP_vhz_Cuy', 'label': 'Producent: kultur, media, film, dataspel',
'hits_old': ['24499240'], 'replacing_old_concept_ids': ['XSoL_LLU_PYV', 'FcaP_vhz_Cuy'],
'hits_replaced_by': ['24625448', '24499240']},
{'old': 'WAH4_sSf_GyE', 'replaced_by': 'SV22_7W1_pFT', 'label': 'Koordinator: kultur, media, film, dataspel',
'hits_old': [], 'replacing_old_concept_ids': ['YmFo_cvw_1Kv', 'YmFo_cvw_1Kv'],
'hits_replaced_by': ['24674944', '24641084']},
{'old': 'Jsct_XQW_U8u', 'replaced_by': 'FcaP_vhz_Cuy', 'label': 'Producent: kultur, media, film, dataspel',
'hits_old': ['24499240'], 'replacing_old_concept_ids': ['XSoL_LLU_PYV', 'FcaP_vhz_Cuy'],
'hits_replaced_by': ['24625448', '24499240']},
{'old': '5GaR_6HQ_8vY', 'replaced_by': 'FcaP_vhz_Cuy', 'label': 'Producent: kultur, media, film, dataspel',
'hits_old': ['24499240'], 'replacing_old_concept_ids': ['XSoL_LLU_PYV', 'FcaP_vhz_Cuy'],
'hits_replaced_by': ['24625448', '24499240']},
{'old': 'RSra_C73_mJe', 'replaced_by': 'S2QW_12u_Pj1', 'label': 'Mediatextare', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'HcpH_1h7_vkK', 'replaced_by': 'S2QW_12u_Pj1', 'label': 'Mediatextare', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'PM4A_xoG_hQD', 'replaced_by': 'S2QW_12u_Pj1', 'label': 'Mediatextare', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': '7fB3_Ckh_NuC', 'replaced_by': 'UCXb_LjK_pHv', 'label': 'Musiker', 'hits_old': [],
'replacing_old_concept_ids': ['aR3a_5Ly_TDw'], 'hits_replaced_by': ['24531845']},
{'old': 'XSoL_LLU_PYV', 'replaced_by': 'FcaP_vhz_Cuy', 'label': 'Producent: kultur, media, film, dataspel',
'hits_old': ['24625448', '24499240'], 'replacing_old_concept_ids': ['XSoL_LLU_PYV', 'FcaP_vhz_Cuy'],
'hits_replaced_by': ['24625448', '24499240']},
{'old': 'wniw_g2F_JNQ', 'replaced_by': 'SV22_7W1_pFT', 'label': 'Koordinator: kultur, media, film, dataspel',
'hits_old': [], 'replacing_old_concept_ids': ['YmFo_cvw_1Kv', 'YmFo_cvw_1Kv'],
'hits_replaced_by': ['24674944', '24641084']},
{'old': 'wiGD_eu2_UJV', 'replaced_by': 'FcaP_vhz_Cuy', 'label': 'Producent: kultur, media, film, dataspel',
'hits_old': ['24499240'], 'replacing_old_concept_ids': ['XSoL_LLU_PYV', 'FcaP_vhz_Cuy'],
'hits_replaced_by': ['24625448', '24499240']},
{'old': '7rkC_Rot_tat', 'replaced_by': 'k3ZW_16R_riY', 'label': 'Sångare', 'hits_old': [],
'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'aR3a_5Ly_TDw', 'replaced_by': 'UCXb_LjK_pHv', 'label': 'Musiker', 'hits_old': ['24531845'],
'replacing_old_concept_ids': ['aR3a_5Ly_TDw'], 'hits_replaced_by': ['24531845']},
{'old': 'YmFo_cvw_1Kv', 'replaced_by': 'SV22_7W1_pFT', 'label': 'Koordinator: kultur, media, film, dataspel',
'hits_old': ['24674944', '24641084'], 'replacing_old_concept_ids': ['YmFo_cvw_1Kv', 'YmFo_cvw_1Kv'],
'hits_replaced_by': ['24674944', '24641084']},
{'old': 'dnxZ_Bvb_S9C', 'replaced_by': 'SV22_7W1_pFT', 'label': 'Koordinator: kultur, media, film, dataspel',
'hits_old': [], 'replacing_old_concept_ids': ['YmFo_cvw_1Kv', 'YmFo_cvw_1Kv'],
'hits_replaced_by': ['24674944', '24641084']},
{'old': 'Kh3N_Kg8_KK5', 'replaced_by': '7Yn2_NLJ_oa2', 'label': 'Elkraftingenjör',
'hits_old': ['24645107', '24572890', '24445999'],
'replacing_old_concept_ids': ['Kh3N_Kg8_KK5', '1hZc_5BC_K7q', 'Kh3N_Kg8_KK5', 'aWNX_iEg_NhN', 'aWNX_iEg_NhN',
'Kh3N_Kg8_KK5'],
'hits_replaced_by': ['24645107', '24602558', '24572890', '24512446', '24507851', '24445999']},
{'old': 'kHno_7rL_Lcm', 'replaced_by': 'uaJs_9YA_Cnp',
'label': 'Sjuksköterska, geriatrik/Sjuksköterska, äldreomsorg och äldrevård',
'hits_old': ['24646122', '24646015', '24643631', '24641581', '24637517', '24633039', '24619737', '24610664',
'24607356', '24605037', '24602739', '24597392', '24584756', '24575788', '24573363', '24561183',
'24550606', '24509435', '24509198', '24504899', '24453787', '24433907'],
'replacing_old_concept_ids': ['kHno_7rL_Lcm', 'kHno_7rL_Lcm', 'uaJs_9YA_Cnp', 'kHno_7rL_Lcm', 'uaJs_9YA_Cnp',
'kHno_7rL_Lcm', 'uaJs_9YA_Cnp', 'uaJs_9YA_Cnp', 'uaJs_9YA_Cnp', 'uaJs_9YA_Cnp',
'uaJs_9YA_Cnp', 'uaJs_9YA_Cnp', 'uaJs_9YA_Cnp', 'uaJs_9YA_Cnp', 'kHno_7rL_Lcm',
'uaJs_9YA_Cnp', 'uaJs_9YA_Cnp', 'kHno_7rL_Lcm', 'kHno_7rL_Lcm', 'kHno_7rL_Lcm',
'uaJs_9YA_Cnp', 'uaJs_9YA_Cnp'],
'hits_replaced_by': ['24646122', '24646015', '24643631', '24641581', '24637517', '24633039', '24619737',
'24610664', '24607356', '24605037', '24602739', '24597392', '24584756', '24575788',
'24573363', '24561183', '24550606', '24509435', '24509198', '24504899', '24453787',
'24433907']},
{'old': 'UjqL_rhp_jC4', 'replaced_by': 'WUxP_1ih_6RG', 'label': 'Flight Data Operator/FDO/Flygledarassistent',
'hits_old': [], 'replacing_old_concept_ids': [], 'hits_replaced_by': []},
{'old': 'Uoeq_F5q_18w', 'replaced_by': 'V74g_m5Z_BtM', 'label': 'Kanslichef', 'hits_old': ['24646965'],
'replacing_old_concept_ids': ['Uoeq_F5q_18w'], 'hits_replaced_by': ['24646965']},
]
|
class Solution:
# @param {integer[][]} grid
# @return {integer}
def minPathSum(self, grid):
n = len(grid);
m = len(grid[0]);
p = [([0] * m) for i in range(n)]
p[0][0] = grid[0][0];
for k in range (1, n):
p[k][0] = p[k-1][0]+grid[k][0];
for k in range (1, m):
p[0][k] = p[0][k-1]+grid[0][k];
for i in range (1, n):
for j in range (1, m):
p[i][j] = min(p[i-1][j], p[i][j-1]) + grid[i][j];
return p[n-1][m-1];
|
# Cidades: Crie um dicionario chamado cities. Use os nomes de tres cidades como chaves em seu dicionario. Crie um dicionario com informacoes sobre cada cidade e inclua o pais em que a cidade esta localizada, a populacao aproximada e um fato sobre essa cidade. As chaves do dicionario de cada cidade devem ser algo como coutry, population e fact. Apresente o nome de cada cidade e todas as informacoes que voce armazenou sobre ela.
cities = {
'maputo': {
'coutry': 'mozambique',
'population': '12.488.246',
'fact': 'corupt coutry'
},
'sao paulo': {
'coutry': 'brazil',
'population': '145.264.218',
'fact': 'beautiful people'
},
'lisbon': {
'coutry': 'portugal',
'population': '10.264.254',
'fact': 'racist'
}
}
for key, value in cities.items():
print(f"{key} city:".title())
for k, v in value.items():
print(f"{k} => {v}".title())
print("=="*10)
|
""" Problem - 239. Sliding Window Maximum
Problem statement -
You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position.
Return the max sliding window.
Constraints -
1 <= nums.length <= 105
-104 <= nums[i] <= 104
1 <= k <= nums.length
Example 1:
Input: nums = [1,3,-1,-3,5,3,6,7], k = 3
Output: [3,3,5,5,6,7]
Explanation:
Window position Max
--------------- -----
[1 3 -1] -3 5 3 6 7 3
1 [3 -1 -3] 5 3 6 7 3
1 3 [-1 -3 5] 3 6 7 5
1 3 -1 [-3 5 3] 6 7 5
1 3 -1 -3 [5 3 6] 7 6
1 3 -1 -3 5 [3 6 7] 7
Example 2:
Input: nums = [1], k = 1
Output: [1]
Example 3:
Input: nums = [1,-1], k = 1
Output: [1,-1]
Example 4:
Input: nums = [9,11], k = 2
Output: [11]
Example 5:
Input: nums = [4,-2], k = 2
Output: [4]
//Solution
Idea -
Keep indexes of good candidates in deque d. The indexes in d are from the current window, they're increasing, and their corresponding nums are decreasing. Then the first deque element is the index of the largest window value.
For each index i:
1.Pop (from the end) indexes of smaller elements (they'll be useless).
2.Append the current index.
3.Pop (from the front) the index i - k, if it's still in the deque (it falls out of the window).
4.If our window has reached size k, append the current window maximum to the output.
"""
class Solution:
def maxSlidingWindow(self, nums: List[int], k: int) -> List[int]:
queue = deque()
for i in range(k):
while queue and nums[queue[-1]]<=nums[i]:
queue.pop()
queue.append(i)
ans = []
for i in range(k,len(nums)):
ans.append(nums[queue[0]])
while queue and queue[0]<=i-k:
queue.popleft()
while queue and nums[queue[-1]]<=nums[i]:
queue.pop()
queue.append(i)
ans.append(nums[queue[0]])
return ans
|
#!/usr/bin/env python
"""Pseudocode for the OPTICS algorithm."""
def optics(objects, epsilon, min_points):
"""
Clustering.
Parameters
----------
objects : set
epsilon : float
min_points : int
"""
assert min_points >= 1
# TODO
|
matriz = [[0, 0, 0], [0, 0, 0], [0, 0, 0]]
somaPar = 0
soma3c = 0
for l in range(0, 3):
for c in range(0, 3):
matriz[l][c] = int(input(f'Digite um valor para [{l}, {c}]: '))
print('-'*30)
for x, l in enumerate(matriz):
for y, c in enumerate(l):
print(f'[{c:^5}]', end=' ')
if c % 2 == 0:
somaPar += c
if y == 2:
soma3c += c
print('\n', end='')
print('-'*30)
print(f'A soma dos valores pares é {somaPar}')
print(f'A soma dos valores da terceira coluna é {soma3c}')
print(f'O maior valor da segunda linha é {max(matriz[1])}') |
# Construct a square matrix with a size N × N containing integers
# from 1 to N * N in a spiral order, starting from top-left and in
# clockwise direction.
#
# Example
#
# For n = 3, the output should be
#
# spiralNumbers(n) = [[1, 2, 3],
# [8, 9, 4],
# [7, 6, 5]]
def spiralNumbers(n):
m = [[0] * n for i in range(n)] # create matrix
dx, dy = [0, 1, 0, -1], [1, 0, -1, 0] # Starting increments in E, S, W, or N direction
x, y, c = 0, -1, 1 # Starting location (row, column) and number c (or count)
for i in range(n + n - 1): # iterate over all cells, but only looking at number of rows AND columns - 1
for j in range((n + n - i) // 2): # iterate over the remaining length (r + c - 1) // 2, eg 10 = 5 and 9 = 4...
x += dx[i % 4] # Get location, % 4 is based on the E, S, W and N direction
y += dy[i % 4] # and add the value back on x, y
m[x][y] = c # Set cell value
c += 1 # Increment value
return m
print(spiralNumbers(5))
print(spiralNumbers(3))
|
feedback_poly = {
2: [1],
3: [2],
4: [3],
5: [3],
6: [5],
7: [6],
8: [6, 5, 4],
9: [5],
10: [7],
11: [9],
12: [11, 10, 4],
13: [12, 11, 8],
14: [13, 12, 2],
15: [14],
16: [14, 13, 11],
17: [14],
18: [11],
19: [18, 17, 14],
20: [17],
21: [19],
22: [21],
23: [18],
24: [23, 22, 17]
}
def one_hot_encode(n):
coeffs = []
coeffs.append(1)
for i in range(1, n):
if i in feedback_poly[n]:
coeffs.append(1)
else:
coeffs.append(0)
return coeffs
|
# Definition for a binary tree node.
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def binaryTreePaths(self, root):
"""
:type root: TreeNode
:rtype: List[str]
"""
res = []
if root is None:
return res
if root.left is None and root.right is None:
res.append(str(root.val))
return res
left_s = self.binaryTreePaths(root.left)
for ele in left_s:
res.append(str(root.val) + '->' + ele)
right_s = self.binaryTreePaths(root.right)
for ele in right_s:
res.append(str(root.val) + '->' + ele)
return res
|
# Generated by h2py from /usr/include/sys/event.h
EVFILT_READ = (-1)
EVFILT_WRITE = (-2)
EVFILT_AIO = (-3)
EVFILT_VNODE = (-4)
EVFILT_PROC = (-5)
EVFILT_SIGNAL = (-6)
EVFILT_SYSCOUNT = 6
EV_ADD = 0x0001
EV_DELETE = 0x0002
EV_ENABLE = 0x0004
EV_DISABLE = 0x0008
EV_ONESHOT = 0x0010
EV_CLEAR = 0x0020
EV_SYSFLAGS = 0xF000
EV_FLAG1 = 0x2000
EV_EOF = 0x8000
EV_ERROR = 0x4000
NOTE_DELETE = 0x0001
NOTE_WRITE = 0x0002
NOTE_EXTEND = 0x0004
NOTE_ATTRIB = 0x0008
NOTE_LINK = 0x0010
NOTE_RENAME = 0x0020
NOTE_EXIT = 0x80000000
NOTE_FORK = 0x40000000
NOTE_EXEC = 0x20000000
NOTE_PCTRLMASK = 0xf0000000
NOTE_PDATAMASK = 0x000fffff
NOTE_TRACK = 0x00000001
NOTE_TRACKERR = 0x00000002
NOTE_CHILD = 0x00000004
|
a = 1
b = 2
c = 3
print(a)
print(b)
print(c)
|
"""
042
Set a variable called total to 0. Ask the user to enter
five numbers and after each input ask them if they
want that number included. If they do, then add the
number to the total. If they do not want it included,
don’t add it to the total. After they have entered all five
numbers, display the total.
"""
total = 0
i = 0
while i < 5 :
num = float(input(f"Enter number{i} : "))
with_or_not = input("Do you want this number included or not : ")
with_or_not = with_or_not.lower()
if with_or_not =="yes" :
total = total + num
elif with_or_not =="no":
total = total + 0
i +=1
print("The total is : ", total)
|
class script(object):
START_MSG = """ <b>Hi {}
I'm a Image Editor Bot which Supports various modes
For more click help....</b>"""
HELP_MSG = """Hai, Follow these Steps..
<code>🌀 Send me any Image to Edit..</code>
<code>🌀 Select the Corresponding mode that you need</code>
<code>🌀 Your Edited Image will be Uploaded </code>
© @NET_HACKER_BOTs"""
ABOUT_MSG = """❄<b>My Name : Image Editor</b>
❄<b>Language :</b> <code>Python3</code>
❄<b>Youtube :</b> <a href='https://www.youtube.com/channel/UCD-g7g3-tfvKECxXKqySq7g'>👉Click Here👈</a>
❄<b>Telegram group :</b> 👉 <a href='https://t.me/NET_HACKER_BOTs_chat'>Click Here👈</a>"""
|
default_prefix = "DWB"
known_chains = {
"BEX": {
"chain_id": "38f14b346eb697ba04ae0f5adcfaa0a437ed3711197704aa256a14cb9b4a8f26",
"prefix": "DWB",
"dpay_symbol": "BEX",
"bbd_symbol": "BBD",
"vests_symbol": "VESTS",
},
"BET": {
"chain_id":
"9afbce9f2416520733bacb370315d32b6b2c43d6097576df1c1222859d91eecc",
"prefix":
"DWT",
"dpay_symbol":
"BET",
"bbd_symbol":
"TBD",
"vests_symbol":
"VESTS",
},
}
|
# RemoveDuplicatesfromSortedArray.py
# weird accepted answer that doesn't actually remove anything.
class Solution:
def removeDuplicates(self, nums: List[int]) -> int:
if (len(nums)==0):
return 0
i=0
j=0
while j < len(nums):
# print(nums, i , j)
if (nums[j]!=nums[i]):
i+=1
nums[i]=nums[j]
j+=1
# print(nums, i+1)
return i+1 |
# Values obtained from running against the Fuss & Navarro 2009 reference implementation
vals = [(0.3325402105490861,
0.18224585277734096,
2.0210322268188046,
0.37178992456396914,
0.7513994191503139,
1.6883221884854474,
1.0,
0.082198565245068272),
(-0.13074510229340497,
0.44696631528174735,
2.4890334572448456,
0.3816245478330931,
0.9498762676625047,
1.0790903665954314,
0.1,
0.41591722288506577),
(0.6056010862462016,
0.16871208306308166,
1.5524386791394562,
0.1286318302691049,
0.19969302867825994,
0.3836652143729468,
1e-07,
0.62063048896871487),
(0.3895703269526853,
0.3435094918413777,
2.1750677359226023,
0.25344975464683345,
0.5512703840098271,
3.688305473258689,
0.01,
0.0090709779903460266),
(0.42003699302964476,
0.10014569263424461,
2.3012075231555444,
0.0019673685361806803,
0.004527323276278492,
3.009144940928847,
0.0001,
0.0001884560320134888),
(-0.5255928511420052,
0.41071488550017876,
2.2389065101119003,
0.2301372155046244,
0.515255710012329,
0.5621315133209579,
1e-05,
1.8640810217155657),
(0.008338807811151538,
0.30523807964872274,
2.4560203575759623,
0.032544407891560656,
0.07992972830692877,
3.802538736807515,
1e-05,
0.0030406047220150243),
(-0.709463423093855,
0.07788052784603428,
2.0241086070651075,
0.1491208977241244,
0.3018368925766758,
1.213966089059249,
1.0,
0.082017502354950353),
(0.460913299169564,
0.2168584116589385,
2.298380160881188,
0.4461371311255309,
1.0253927312113693,
0.25156507383357796,
0.0001,
1.0372891338943479e-05),
(-0.6117806447011472,
0.49463268264815274,
1.9686542627132415,
0.25832570907838626,
0.5085540083455858,
1.94831451612509,
0.001,
0.097069006460126561),
(0.32861624103817627,
0.12335537773273014,
2.002692863678406,
0.47249065415592595,
0.9462536612328146,
2.796439295540539,
0.001,
0.018459337529972406),
(0.021183546657572494,
0.47799029047254493,
2.3569808966748047,
0.4855005752397232,
1.1443155811646561,
2.610216277868382,
0.1,
0.082974887901830302),
(0.7175299762398688,
0.3566056886339434,
2.220795104898356,
0.45773365470000554,
1.0165326597050066,
2.1966769477884225,
1e-07,
0.030138660738276948),
(-0.7178918281791459,
0.057776773410309845,
1.9358335812071767,
0.10703342161705387,
0.20719889187779905,
1.9963028315012206,
0.01,
0.015193622821588188),
(0.38713456753496744,
0.07157449665799648,
2.2096131432869957,
0.017240717413939843,
0.038095315797538463,
3.426246718806154,
1e-07,
0.00089937286951603833),
(0.7331877690347837,
0.46552429958519015,
1.8562721149635684,
0.34330970798729826,
0.6372762377331072,
1.6101500341565407,
1.0,
0.071864719581762077),
(-0.006430595681853335,
0.1207541730285373,
1.6676102104060564,
0.2604537143639433,
0.4343352734114944,
0.7713437644783603,
1.0,
0.26065820692218827),
(-0.5187897244595112,
0.21532637320553233,
2.481938472673327,
0.18482168074390404,
0.4587160400224425,
1.0697490678038166,
1e-09,
0.23165988979463398),
(-0.24925121543920914,
0.05753410930092823,
2.1709492103847565,
0.477487812061141,
1.036601788562479,
2.211403925199262,
1e-08,
0.084455290527924637),
(-0.5719411096293123,
0.28837526790403306,
2.1929805341020145,
0.2243768947148022,
0.49205416241181843,
1.0791694385505024,
1e-10,
0.27868915917309367)]
|
"""
Given a sorted array arr, two integers k and x, find the k closest elements
to x in the array. The result should also be sorted in ascending order.
If there is a tie, the smaller elements are always preferred.
Example:
Input: arr = [1,2,3,4,5], k = 4, x = 3
Output: [1,2,3,4]
Constraints:
- 1 <= k <= arr.length
- 1 <= arr.length <= 10^4
- Absolute value of elements in the array and x will not exceed 104
"""
#Difficulty: Medium
#59 / 59 test cases passed.
#Runtime: 320 ms
#Memory Usage: 15.3 MB
#Runtime: 320 ms, faster than 70.14% of Python3 online submissions for Find K Closest Elements.
#Memory Usage: 15.3 MB, less than 41.69% of Python3 online submissions for Find K Closest Elements.
class Solution:
def findClosestElements(self, arr: List[int], k: int, x: int) -> List[int]:
length = len(arr)
l = 0
r = length - 1
while l + 1 < r:
m = (l + r) // 2
if arr[m-1] <= x <= arr[m]:
l, r = self.pickNumber(arr, m, k, x, length)
return arr[l: r+1]
if x < arr[m]:
r = m
else:
l = m
if l == 0:
return arr[:min(k, length)]
if r == length - 1:
return arr[-k:]
def pickNumber(self, arr, m, k, x, length):
result = []
i = 1
j = 0
while k > 0:
if m + j > length - 1:
result.sort()
return result[0] - k, result[-1]
if m-i >= 0 and x - arr[m-i] <= arr[m + j] - x:
result.append(m-i)
i += 1
else:
result.append(m + j)
j += 1
k -= 1
result.sort()
return result[0], result[-1]
|
# -*- coding: utf-8 -*-
project_list = {
"parameters": [{
"name": "project_id",
"description": "企业项目ID",
"type": "string",
"in": "path",
"required": "true"
}],
"response": {
"200": {
"description": "获取成功",
"examples": {
"data": [
{
"projectName": "金峰",
"projectId": "test",
"deviceNum": 2,
"online": 1,
"alarmNum": 5
}
],
"error_code": 0,
}
}
}
}
add_project = {
"parameters": [{
"name": "body",
"in": "body",
"description": "新增项目组",
"require": "true",
"schema": {
"id": "add_project",
"required": ["projectName", "device"],
"properties": {
"projectName": {
"type": "string",
"description": "项目名",
"enum": ["金峰"],
"default": "金峰"
},
"device": {
"type": "array",
"description": "设备列表",
"item": {
"type": "string",
"description": "设备ID",
"enum": ["123"],
"default": "123"
},
"enum": [["123", "321"]],
"default": ["123", "321"]
}
}
}
}],
"responses": {
"200": {
"description": "新增成功",
"examples": {}
}
}
}
edit_project = {
"parameters": [{
"name": "body",
"in": "body",
"description": "编辑项目组",
"require": "true",
"schema": {
"id": "edit_project",
"required": ["projectName", "device"],
"properties": {
"projectName": {
"type": "string",
"description": "项目名",
"enum": ["金峰"],
"default": "金峰"
},
"projectId": {
"type": "string",
"description": "项目ID",
"enum": ["123"],
"default": "123"
}
}
}
}],
"responses": {
"200": {
"description": "编辑成功",
"examples": {}
}
}
}
delete_project = {
"parameters": [{
"name": "body",
"in": "body",
"description": "删除项目组",
"require": "true",
"schema": {
"id": "delete_project",
"required": ["projectId"],
"properties": {
"projectId": {
"type": "string",
"description": "项目ID",
"enum": ["123"],
"default": "123"
}
}
}
}],
"responses": {
"200": {
"description": "删除成功",
"examples": {}
}
}
}
|
class HourRange():
def __init__(self, start: int, end: int):
if start == end:
raise ValueError("Start and end may not be equal.")
if start < 0 or 23 < start:
raise ValueError("Invalid start value: " + str(start))
if end < 0 or 23 < end:
raise ValueError("Invalid end value: " + str(end))
if start < end:
self._offset = 0
self._start = start
self._end = end
else:
self._offset = 24 - start
self._start = 0
self._end = end + self._offset
assert self._end < 24
def is_in(self, hour: int) -> bool:
if hour < 0 or 23 < hour:
raise ValueError("Invalid value for hour: " + str(hour))
h = (hour + self._offset) % 24
assert 0 <= h and h < 24
return self._start <= h and h <= self._end
|
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
def dfs(self, root:TreeNode, sum:int, cur_sum:int):
if not root.left and not root.right:
if cur_sum + root.val == sum:
return True
else:
return False
if root.left:
if self.dfs(root.left, sum, cur_sum + root.val):
return True
if root.right:
if self.dfs(root.right, sum, cur_sum + root.val):
return True
return False
def hasPathSum(self, root: TreeNode, sum: int) -> bool:
if not root:
return False
res = self.dfs(root, sum, 0)
return res
|
"""
Given integers x and n, find the largest integer k such that x0+x1+x2+...+xk ≤ n.
Example
For x = 2 and n = 5, the output should be
specialPolynomial(x, n) = 1.
We have 20 + 21 < 5 and 20 + 21 + 22 > 5.
"""
def specialPolynomial(x, n):
s = 0
for k in range(1000):
s += math.pow(x, k)
if s > n:
return k - 1
|
ENTRY_POINT = 'will_it_fly'
#[PROMPT]
def will_it_fly(q,w):
'''
Write a function that returns True if the object q will fly, and False otherwise.
The object q will fly if it's balanced (it is a palindromic list) and the sum of its elements is less than or equal the maximum possible weight w.
Example:
will_it_fly([1, 2], 5) ➞ False
# 1+2 is less than the maximum possible weight, but it's unbalanced.
will_it_fly([3, 2, 3], 1) ➞ False
# it's balanced, but 3+2+3 is more than the maximum possible weight.
will_it_fly([3, 2, 3], 9) ➞ True
# 3+2+3 is less than the maximum possible weight, and it's balanced.
will_it_fly([3], 5) ➞ True
# 3 is less than the maximum possible weight, and it's balanced.
'''
#[SOLUTION]
if sum(q) > w:
return False
i, j = 0, len(q)-1
while i<j:
if q[i] != q[j]:
return False
i+=1
j-=1
return True
#[CHECK]
def check(candidate):
# Check some simple cases
assert candidate([3, 2, 3], 9) is True
assert candidate([1, 2], 5) is False
assert candidate([3], 5) is True
assert candidate([3, 2, 3], 1) is False
# Check some edge cases that are easy to work out by hand.
assert candidate([1, 2, 3], 6) is False
assert candidate([5], 5) is True
|
def moeda(p = 0, moeda = 'R$'):
return (f'{moeda}{p:.2f}'.replace('.',','))
def metade(p = 0, formato=False):
res = p/2
return res if formato is False else moeda(res)
def dobro(p = 0, formato=False):
res = p*2
return res if formato is False else moeda(res)
def aumentar(p = 0, taxa = 0, formato=False):
res = p * (1+taxa/100)
return res if formato is False else moeda(res)
def diminuir(p = 0, taxa = 0, formato=False):
res = p - (p * taxa/100)
return res if formato is False else moeda(res) |
class BookReader:
country = 'South Korea'
print(BookReader.country )
BookReader.country = 'USA'
print(BookReader.country )
|
#Faça um programa que leia o peso de cinco pessoas. No final, mopstre qual foi o maior e o menor peso lidos
vMaior = 0
vMenor = 0
for i in range (1,6):
vPeso = float(input('Digite o peso da {} pessoa: '.format(i)))
if i== 1:
vMaior = vPeso
vMenor = vPeso
else:
if vPeso > vMaior:
vMaior = vPeso
elif vPeso < vMenor:
vMenor = vPeso
print('O Maior peso foi {}!'.format(vMaior))
print('O Menor peso foi {}!'.format(vMenor)) |
"""
File used to test the scraping ability of the regular
expressions.
"""
# Setting up our fake functions and objects.
_ = lambda x: x
f = lambda x: x
class C(object):
pass
obj = C()
obj.blah = lambda x: x
# A single letter function that we don't want
f("_key")
# Simple function call.
_("_key")
# The chained function call, in the simplest format (no args).
_("_key").f()
# The chained function call with simple arguments.
_("_key").f("hello", 1337)
# The chained function call with possible, more complex arguments
_("_key").f(obj.blah(), {"dog":"cat"})
# And then the possibility for long function calls to extend over one line
_("_key").f(
"dogs",
"cats",
{"living":"together"})
|
def patxi():
tip = raw_input("Don't forget to use your new company WC as soon as possible, It's important....")
kk = """ @@X
@@@@@'
+@'+@@;
@X''+@@
X@''''@@
@+'''''X@
@@'''''''X@
@@X'''''''''@@
`@@@''''''''''''@X
+@@@'''''''''''''''@
+@@@+''''''''''+''''''@@
`X@@@+'''''''''''''''''''''@
.@@@@+''''''''''''''''''''''''@@
X@@@''''''''''''''''''''''''''+''@
@@''''''''''''''''''''''''''''+++'@.
@@''''''''''''''''''''''''''''+++++@@
@X''''''''''''''''+'''''''''''+++++++@
'@'''''''''''''''''''''''''''++++++++'@
@+''+'''''''''''''''''''''''+++++++++'@
@+'''''''''''''''''''''''++++++++++++'@
@+'''''''''''''''''''''++++++++++++++'@
'@'''''''''''''''''++++++++++++X+++++'@
@+'''''''''''++++++++++++++++++++++'+@
:@''''''+++++++++++++++++++++++++++'@@
X@'''''+++++++++++++++++++++++++''+@@@@@`
`X@@@@@+'''''''''+++++++++++''''''''''+''''@@@
X@@@X''''''''''''''''''''''''''''''''''''''''''@@
;@@+''''''''''''''''''''''''''''''''''''''''''''''@X
@@+'''''''''''''''''''''''''''''''''''''''''''''''''@
@@'''''''''''''''''''''''''''''''''''''''''''''''''''@@
:@'''''''''''''''''''''''''''''''''''''''''''''''''''''@
@+'''''''''''''''''''''''''''''''''''''''''''''''''''''@
+@''''''''''''''''''''''''''''''''''''''''''''''''+++'''@,
@+'''''''''''''+''''''''''''''''''''''''+'''''''++++++''@'
@''''''''''''''''''''''''''''''''''''''''''''+++++++++''@X
;@'''''''''''''''''''''''''''''''''''''''''++++++++++++''@+
@@'''''''''''''''''''''''''''''''''''''++++++++++++++++''@;
@X'''''''''''''''''''''''''''''+'''++++++++++++++++++++''@.
@X''''''''''''''''''''''''''''+++++++++++++++++++++++++''@
@@''''''''''''''''''''''+++++++++++++++++++++++++++++++'+@
;@'''''''''''''''++++++++++++++++++++++++++++'++++++++''@'
@''''''''++++++++++++++++++++++++++++++++++++++++++++'+@
@+''''++++++++++++++++++++++++++++++++++++++++++++++''@'
;@'''''''''+++++++++++++++++++++++++++++++++++++'''''@@@@@+`
`'@@'''''''''''''''''''''''''''''''''''''''''''''''''++++'X@@@:
'@@@X''''''''''''''''''''''''''''''''''''''''''''''''''''''''''X@@
`@@+'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''@@
,@X'''''''''''+''''''''''''''''''''''''''''''''''''''''''''''''''''''@@
`@+''''''''''''''''''''''''''''''''''''''''+'''''''''''''''''''''''''''@X
@X'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''+++''@
,@''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''+++''@@
@X''''''''''''''''''''''''''''''''''''''''''''''''''''++'''''''''''+++++''@
@'''''''''''''''''''''''''''''''''''''''''''''''''''''+''''''''''''+++++''@+
@'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''++++++''+@
@'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''++++++++'''@
@'''''''''''''+''''''''''''''''++''''''''''''''''''''''''''''''++++++++++''@`
@''''''''''''''''''''''''''''''++''''''''''''''''''''''''''''++++++++++++''@'
@''''''''''''''''''''''''''''''''''''''''''''''''''''''''''++++++++++++++''@@
@''''''''''''''''''''''''''''''''''''''''''''''''''''''''++++++++++++++++''X@
@X''''''''''''''''''''''''''''''''''''''''''''''''''''++++++++++++++++++'''X@
;@'''''''''''''''''''''''''''''''''''''''++'''''''++++++++++++++++''++++'''X@
@'''''''''''''''''''''''''''''''''''''''''''+++++++++++++++++++++++++++'''@X
@X'''''''''''''''''''''''''''''''''''''+++++++++++++++++++++++++++++++''''@'
,@'''''''''''''''''''''''''''''+++++++++++++++++++++++++++++++++++++++''''@,,`
`,,@@'''''''''''''''''''++++++++++++++++++++++++++++++++++++++++++++++'''''+@,,,,
,,,,@X'''''''''''++++++++++++++++++++++++++++++++++++++++++++++++++++''''''@X,,,,`
,,,,,:@X''''''''''''++++++++++++++++++++++++++++++++++++++++++'''''''''''''@@,,,,,,
,,,,,,,@@@@+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''+@@@,,,,,,,
,,,,,,,,,'@@@@@X+''''''''''''''''''''''''''''''''''''''''''''''''''+@@@@@X:,,,,,,,,
`,,,,,,,,,,,,;X@@@@@@@X++''''''''''''''''''''''''''''''''''+X@@@@@@@@',,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,'@@@@@@@@@@@@@@@@@XXXXXXX@@@@@@@@@@@@@@@@@+:,,,,,,,,,,,,,,,,,,
.,,,,,,,,,,,,,,,,,,,,,,,,,,,:;''+XX@@@@@@@@@@@@X+':,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,`
`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,`
`,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,`
.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,.`
`..,,,,,,,,,,,,,,,,,,,,,,,,,,,,.` """
print('\033[0;33m{0}'.format(kk))
print('\033[0m')
patxi()
|
# DESCRIPTION
# Given a string containing only three types of characters: '(', ')' and '*',
# write a function to check whether this string is valid.
# We define the validity of a string by these rules:
# Any left parenthesis '(' must have a corresponding right parenthesis ')'.
# Any right parenthesis ')' must have a corresponding left parenthesis '('.
# Left parenthesis '(' must go before the corresponding right parenthesis ')'.
# '*' could be treated as a single right parenthesis ')'
# or a single left parenthesis '(' or an empty string.
# An empty string is also valid.
# EXAMPLE 1:
# Input: "()"
# Output: True
# EXAMPLE 2:
# Input: "(*))"
# Output: True
class Solution:
def checkValidString(self, s: str) -> bool:
'''
Time: O(N), where N is the length of the string
Space: O(1), constant space no aux space used
'''
# Greedy Algorithm
# increments at '(' dec for ')'
cmin = 0
# incs '(' and '*' decs for ')'
cmax = 0
for i in s:
if i == '(':
cmax += 1
cmin += 1
if i == ')':
cmax -= 1
# not including itself find the max between cmin-1 and 0
# this makes sure cmin is not negative
cmin = max(cmin - 1, 0)
if i == '*':
cmax += 1
cmin = max(cmin - 1, 0)
if cmax < 0:
return False
return cmin == 0
|
lines = open('dayfivedata.txt').read().split('\n')
ids = []
for line in lines:
top = 0; bottom = 127
for _ in range(7):
if 'F' in line[_]:
bottom = (top+bottom)//2
else:
top = (top+bottom)//2 + 1
left = 0; right = 7
for _ in range(7, 10):
if 'L' in line[_]:
right = (right+left)//2
else:
left = (right+left)//2 + 1
ids.append(top*8 + left)
ids.sort()
for _ in range(len(ids) - 1):
if ids[_] + 2 == ids[_+1]:
your_id = ids[_] + 1
break
print(your_id) |
"""feedshepherd
All your (fairly simple) feed needs
"""
|
def plot_confusion_matrix(cm, class_names):
"""
Returns a matplotlib figure containing the plotted confusion matrix.
Args:
cm (array, shape = [n, n]): a confusion matrix of integer classes
class_names (array, shape = [n]): String names of the integer classes
"""
figure = plt.figure(figsize=(8, 8))
plt.imshow(cm, interpolation='nearest', cmap=plt.cm.Blues)
plt.title("Confusion matrix")
plt.colorbar()
tick_marks = np.arange(len(class_names))
plt.xticks(tick_marks, class_names, rotation=45)
plt.yticks(tick_marks, class_names)
# Compute the labels from the normalized confusion matrix.
labels = np.around(cm.astype('float') / cm.sum(axis=1)[:, np.newaxis], decimals=2)
# Use white text if squares are dark; otherwise black.
threshold = cm.max() / 2.
for i, j in itertools.product(range(cm.shape[0]), range(cm.shape[1])):
color = "white" if cm[i, j] > threshold else "black"
plt.text(j, i, labels[i, j], horizontalalignment="center", color=color)
plt.tight_layout()
plt.ylabel('True label')
plt.xlabel('Predicted label')
return figure
|
n=int(input())
ans=[]
used=[False for i in range(n)]
d=[i+1 for i in range(n)]
a=list(map(int,input().split()))
p=0
f=False
while True:
for i in range(n-1):
if f:
i=n-2-i
if a[i]>i+1 and a[i+1]<i+2 and not used[i]:
ans.append(i+1)
used[i]=True
a[i],a[i+1]=a[i+1],a[i]
if len(ans)==p:
print(-1)
break
p=len(ans)
if len(ans)==n-1:
for i in range(n):
if a[i]!=d[i]:
print(-1)
break
else:
print(*ans,sep='\n')
break
f = not f
|
def main():
print('Olá') |
__all__ = ["Dog", "test1", "name"]
class Animal(object):
pass
class Dog(Animal):
pass
class Cat(Animal):
pass
def test1():
print("test1")
def test2():
print("test2")
def test3():
print("test3")
name = "小明"
age = "22"
|
#!/usr/bin/env python
# encoding: utf-8
'''
@author: Jason Lee
@license: (C) Copyright @ Jason Lee
@contact: jiansenll@163.com
@file: jianzhi_offer_60.py
@time: 2019/5/9 13:54
@desc:
'''
class TreeNode:
def __init__(self, x):
self.val = x
self.left = None
self.right = None
class Solution:
# 返回二维列表[[1,2],[4,5]]
def Print(self, pRoot):
if not pRoot:
return []
res = []
temp = [pRoot.val]
res.append(temp)
stack = []
stack.append(pRoot.left)
stack.append(pRoot.right)
layer = []
temp = []
while stack or layer:
node = stack.pop(0)
if node:
temp.append(node.val)
layer.append(node.left)
layer.append(node.right)
if not stack:
stack = layer
if temp:
res.append(temp)
temp = []
layer = []
return res
|
# Exercício Python 51: Desenvolva um programa que leia o primeiro termo e a razão de uma PA. No final, mostre os 10 primeiros termos dessa progressão.
x = int(input('Valor: '))
y = int(input('Primeiro termo: '))
z = int(input('Segundo termo: '))
r = z-y
for i in range(1,10):
a = x + (10 - 1)*r
print(a) |
'''EXCERCISSE 1: EMOJI CONVERTER'''
# def greet_me(name, message):
# words = message.split(" ") # Converts input message into list
# emojis = { # Dictionary
# ":)" : "😃",
# ":(" : "🙁",
# ":o" : "😮",
# ":|" : "😑"}
# output = "" # Can be appended
# for word in words:
# output += emojis.get(word, word) + " " # Appending using get() method
# return f"Dear {name}. Your message is : " + output
# welcome = '''!!! Welcome to the emoji converter !!! You can choose following symbols ->
# ":)"
# ":("
# ":o"
# ":|"
# '''
# print(welcome)
# first_name = input("Enter your first name: ")
# value = input(f"hey {first_name} what do you want to say: ")
# print(greet_me(first_name, value))
'''EXCERCISE 2: WEIGHT CONVERTER'''
# def weight_converter(weight, unit):
# if unit.lower() == 'l': # convert unit to lower case
# weight = current_weight * 0.45 # lbs to kg
# print(f"You are {weight} kilos")
# elif unit.lower() == 'k':
# weight = current_weight / 0.45 # kg to lbs
# print(f"You are {weight} pounds") # Print here
# current_weight = float(input("Weight: "))
# unit = input("(L)bs or (K)g: ")
# weight_converter(current_weight, unit) # Can not print just call as kilos and pounds differs depending on input. |
#Exercício Python 071: Crie um programa que simule o funcionamento de um caixa eletrônico. No início, pergunte
# ao usuário qual será o valor a ser sacado (número inteiro) e o programa vai informar quantas cédulas de cada valor serão entregues.
# OBS: considere que o caixa possui cédulas de R$50, R$20, R$10 e R$1.
valor = int(input('Valor a ser sacado: R$'))
notas_50 = valor // 50
resto_50 = valor % 50
notas_20 = resto_50 // 20
resto_20 = resto_50 % 20
notas_10 = resto_20 // 10
resto_10 = resto_20 % 10
notas_1 = resto_10
print(notas_50, notas_20, notas_10, notas_1)
|
# position, name, age, level, salary
se1 = ["Software Engineer", "Max", 20, "Junior", 5000]
se2 = ["Software Engineer", "Lisa", 25, "Senior", 7000]
# class
class SoftwareEngineer:
# class attributes
alias = "Keyboard Magician"
def __init__(self, name, age, level, salary):
# instance attributes
self.name = name
self.age = age
self.level = level
self.salary = salary
# instance
se1 = SoftwareEngineer("Max", 20, "Junior", 5000)
print(se1.name, se1.age)
se2 = SoftwareEngineer("Lisa", 25, "Senior", 7000)
print(se2.alias)
print(se1.alias)
print(SoftwareEngineer.alias)
SoftwareEngineer.alias = "Something Else"
print(se2.alias)
print(se1.alias)
print(SoftwareEngineer.alias)
# Recap
# create a class (blueprint)
# create a instance (object)
# instance attributes: defined in __init__(self) method
# class attribute
|
##
# \breif Copula function rotation helpers
#
# These helpers must be implemented outside of
# copula_base since we need access to them in all
# our child copula classes as decorators.
#
# Rotate the data before fitting copula
#
# Always rotate data to original orientation after
# evaluation of copula functions
def rotatePDF(input_pdf):
def rotatedFn(self, *args, **kwargs):
if args[2] == 0:
# 0 deg rotation (no action)
return input_pdf(self, *args, **kwargs)
if args[2] == 1:
# 90 deg rotation (flip U)
return input_pdf(self, *args, **kwargs)
if args[2] == 2:
# 180 deg rotation
# TODO: Implement
return input_pdf(self, *args, **kwargs)
if args[2] == 3:
# 180 deg rotation
# TODO: Implement
return input_pdf(self, *args, **kwargs)
return rotatedFn
def rotateCDF(input_cdf):
def rotatedFn(self, *args, **kwargs):
if args[2] == 0:
# 0 deg rotation (no action)
return input_cdf(self, *args, **kwargs)
if args[2] == 1:
# 90 deg rotation (flip U)
return input_cdf(self, *args, **kwargs)
return rotatedFn
def rotateHfun(input_h):
"""!
H fun provides U given v
"""
def rotatedFn(self, *args, **kwargs):
if args[2] == 0:
# 0 deg rotation (no action)
return input_h(self, *args, **kwargs)
if args[2] == 1:
# 90 deg rotation (flip U)
return input_h(self, *args, **kwargs)
return rotatedFn
def rotateVFun(input_v):
"""!
V fun provides V given u
"""
def rotatedFn(self, *args, **kwargs):
if args[2] == 0:
# 0 deg rotation (no action)
return input_v(self, *args, **kwargs)
if args[2] == 1:
# 90 deg rotation (no action)
return input_v(self, *args, **kwargs)
return rotatedFn
|
class Usuario:
def __init__(self):
self.usuario=""
self.ingresos=0
def intro(self):
self.usuario=input("Ingrese el nombre del usuario:")
self.ingresos=float(input("Cantidad ingresos anual:"))
def visualizar(self):
print("Nombre:",self.usuario)
print("Ingresos:",self.ingresos)
def fiscalidad(self):
if self.ingresos>3000:
print("Debe pagar impuestos")
else:
print("No paga impuestos")
# bloque principal
usuario=Usuario()
usuario.intro()
usuario.visualizar()
usuario.fiscalidad() |
a=3
b=6
a,b=b,a
print('After Swapping values of A and B are',a,b)
|
def pow(base,exponent):
"""
Given a base b and an exponent e, this function returns b^e
"""
return base**exponent |
def calculaData(horaInicial, minutoInicial, segundoInicial, horaFinal, minutoFinal, segundoFinal):
if segundoFinal < segundoInicial:
#entao a subtracao nao eh possivel, para contornar o problema pedimos emprestado para os minutos 60 segundos
minutoFinal -= 1
segundoFinal += 60
resultadoSS = segundoFinal - segundoInicial
else:
resultadoSS = segundoFinal - segundoInicial
if minutoFinal < minutoInicial:
#entao a subtracao nao eh possivel, para contornar o problema pedimos emprestado para as horas 60 minutos
horaFinal -= 1
minutoFinal += 60
resultadoMM = minutoFinal - minutoInicial
else:
resultadoMM = minutoFinal - minutoInicial
resultadoHH = horaFinal - horaInicial
return "{}:{}:{}".format(resultadoHH, resultadoMM, resultadoSS)
texto, diaInicial = map(str, input().split())
hhi, mmi, ssi = map(int, input().split(" : "))
texto, diaFinal = map(str, input().split())
hhf, mmf, ssf = map(int, input().split(" : "))
if diaInicial == diaFinal:
#entao o envento começa e termina no mesmo dia
x = calculaData(hhi, mmi, ssi, hhf, mmf, ssf)
fatiamentoHora = x[0:x.find(":")]
fatiamentoMinuto = x[x.find(":")+1 : x.find(":", x.find(":")+1)]
fatiamentoSegundo = x[x.find(":", x.find(":")+1)+1:]
print("0 dia(s)")
print("{} hora(s)".format(fatiamentoHora))
print("{} minuto(s)".format(fatiamentoMinuto))
print("{} segundo(s)".format(fatiamentoSegundo))
else:
diasCorridos = int(diaFinal) - int(diaInicial)
if hhf > hhi:
#entao ocorreu diasCorridos
#calculaData + diasCorridos * 24
x = calculaData(hhi, mmi, ssi, hhf, mmf, ssf)
fatiamentoHora = x[0:x.find(":")]
fatiamentoMinuto = x[x.find(":")+1 : x.find(":", x.find(":")+1)]
fatiamentoSegundo = x[x.find(":", x.find(":")+1)+1:]
print("{} dia(s)".format(diasCorridos-1))
print("{} hora(s)".format(fatiamentoHora))
print("{} minuto(s)".format(fatiamentoMinuto))
print("{} segundo(s)".format(fatiamentoSegundo))
else:
x = calculaData(hhi, mmi, ssi, hhf, mmf, ssf)
fatiamentoHora = x[0:x.find(":")]
fatiamentoMinuto = x[x.find(":")+1 : x.find(":", x.find(":")+1)]
fatiamentoSegundo = x[x.find(":", x.find(":")+1)+1:]
if(int(fatiamentoHora)+24 == 24):
fatiamentoHora = 0
diasCorridos = 1
print("{} dia(s)".format(diasCorridos))
print("{} hora(s)".format(int(fatiamentoHora)))
else:
print("{} dia(s)".format(diasCorridos-1))
print("{} hora(s)".format(int(fatiamentoHora)+24))
print("{} minuto(s)".format(fatiamentoMinuto))
print("{} segundo(s)".format(fatiamentoSegundo))
|
class LayerManager:
""" """
def __init__(self, canvas):
self.canvas = canvas
self.current_layer = 0
self.layers = []
def set_layer(self, cid):
self.current_layer = self.canvas.find_withtag('caption-'+str(cid))[0]
print(self.current_layer)
def raise_layer(self, object_id):
self.canvas.tag_raise(object_id)
def lower_layer(self, object_id):
self.canvas.tag_lower(object_id)
# -------------------------------------------------------------------------
# https://stackoverflow.com/a/9576938/503781
def add_to_layer(self, layer, command, coords, **kwargs):
"""
:param layer: int
:param command: Canvas.element
:param coords: (x0, y0, x1, y1)
:param kwargs:
:return: int
"""
layer_tag = "layer %s" % layer
if layer_tag not in self.layers:
self.layers.append(layer_tag)
tags = kwargs.setdefault("tags", [])
tags.append(layer_tag)
item_id = command(coords, **kwargs)
self._adjust_layers()
return item_id
def _adjust_layers(self):
for layer in sorted(self.layers):
self.canvas.lift(layer)
# -------------------------------------------------------------------------
|
#Exercício062
termo = int(input('\033[34mDigite o primeiro termo de uma PA: \033[m'))
razao = int(input('\033[34mDigite a razão dessa PA: \033[m'))
contador = 0
contador2 = 0
contador3 = 0
print('\033[34mOs 10 primeiros termos dessa PA são: ')
resultado = termo + razao #Soma o termo com a razão pela primeira vez e já mostra na tela
print('\033[32m{} \033[31m-> \033[32m{}'.format(termo, resultado), end=' \033[31m-> ')
while contador != 10 - 2: #Indica para realizar a repetição até '10', (-2 pq os primeiros 2 termos já apareceram antes)
contador += 1 #Realiza a contagem para determinar a hora de parar
resultado += razao #Realiza a soma de cada termo e já mostra na tela 1 por 1
print('\033[32m{}'.format(resultado), end=' \033[31m-> ')
mostramais = int(input('Quer ver mais quantos termos?: '))
while mostramais != 0: #Continua perguntando se quer mais termos até que seja digitado o '0'
contador2 = 0 #Determina a nova repetição de acordo com a escolha de quantos termos a mais
while contador2 != mostramais: #Repete a quantidade de termos a mais forem escolhidas
contador2 += 1 #Realiza a nova contagem de termos a mais
resultado += razao #Realiza a soma dos termos a mais e já mostra na tela 1 por 1
print('\033[32m{}'.format(resultado), end=' \033[31m-> ')
contador3 +=contador2 #Conta quantos termos foram mostrados na segunda onda
mostramais = int(input('Quer ver mais quantos termos?: '))
print('\033[32mPA finalizada com o total de {} termos'.format(contador + contador3 + 2))
print('\033[34mxD\033[m')
|
class Solution:
def maximalSquare(self, matrix: List[List[str]]) -> int:
if not matrix:
return 0
lines = len(matrix)
lists = len(matrix[0])
mat = [[0] * lists for _ in range(lines)]
for i in range(lists):
mat[0][i] = int(matrix[0][i])
for i in range(lines):
mat[i][0] = int(matrix[i][0])
for i in range(1, lines):
for j in range(1, lists):
mat[i][j] = int(matrix[i][j])
if mat[i][j] is not 0:
mat[i][j] = (min(mat[i - 1][j - 1], mat[i][j - 1], mat[i - 1][j]) + 1)
result = 0
for i in mat:
for j in i:
if result < j:
result = j
return result ** 2 |
class Solution:
def singleNumber(self, nums: List[int]) -> int:
d = {}
for num in nums:
if num not in d:
d[num] = 1
else:
d[num] = d[num] + 1
for k,v in d.items():
if v == 1:
return k
|
# https://leetcode.com/problems/find-the-difference/
class Solution:
def findTheDifference(self, s: str, t: str) -> str:
s = sorted(s)
t = sorted(t)
count = 0
for i in range(len(s)):
if s[i] != t[i] :
count = 1
print(t[i])
return t[i]
if count == 0:
return t[-1]
|
model_imports = {
"Linear Regression": "from sklearn.linear import LinearRegression",
"Decision Tree": "from sklearn.tree import DecisionTreeRegressor",
"Random Forest": "from sklearn.ensemble import RandomForestRegressor",
"Gradient Boosting": "from sklearn.ensemble import GradientBoostingRegressor",
"Neural Network": "from sklearn.neural_network import MLPRegressor",
"k-Nearest Neighbors": "from sklearn.neighbors import KNeighborsRegressor",
}
model_urls = {
"Linear Regression": "https://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html",
"Decision Tree": "https://scikit-learn.org/stable/modules/generated/sklearn.tree.DecisionTreeRegressor.html",
"Random Forest": "https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestRegressor.html",
"Gradient Boosting": "https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.GradientBoostingRegressor.html",
"Neural Network": "https://scikit-learn.org/stable/modules/generated/sklearn.neural_network.MLPRegressor.html",
"k-Nearest Neighbors": "https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KNeighborsRegressor.html",
}
model_infos = {
"Linear Regression": """
- Fits a linear model with coefficients w = (w1, …, wp) to minimize the residual sum of squares between the observed targets in the dataset, and the targets predicted by the linear approximation
- Computationally fast and interpretable by design
""",
"Decision Tree": """
- Simple to understand and intrepret
- Prone to overfitting when they are deep (high variance)
""",
"Random Forest": """
- Consists of multiple decision trees voting together
- Have a lower risk of overfitting compared to decision trees
- More robust to outliers
- Computationally intensive on large datasets
- Not as easily interpretable as decision trees
""",
"Gradient Boosting": """
- Combines decision trees in an additive fashion from the start
- Builds one tree at a time sequentially
- If carefully tuned, gradient boosting can result in better performance than random forests
""",
"Neural Network": """
- Have great representational power but may overfit on small datasets if not properly regularized
- Have many parameters that require fine-tuning
- Computationally intensive on large datasets
""",
"k-Nearest Neighbors": """
- Intuitive and simple
- Become very slow as the dataset size grows
""",
} |
for i in range(1,5):
for j in range(1,5):
print(j,end=" ")
print( )
|
def round_off(ls2): # Function for the algorithm to obtain the desired output
final_grade = []
for value in ls2: # iterating in the list to read every student's marks
reminder = value % 5 # calculating remainder
if value < 38:
final_grade.append(value)
elif reminder >= 3: # If remainder is greater than equal to 3 it will get round off
# like 73 has remainder 3 hence it will get rounded off to 75
value += 5-reminder # the desired value will be get Ex 73 remainder 3 value = 73+(5-3)=75
final_grade.append(value)
else:
final_grade.append(value) # Grade that are not likely to round off will be stored as it is
return final_grade # returns a list of the final upgrade grade
while True:
# A while loop to for a valid
# input from a user
number_students = int(input("Enter number of students(1 to 60): "))
if number_students > 60 or number_students < 1:
print("Please Enter number (1 to 60) ")
else:
break
ls = [] # empty list to store marks
while number_students > 0:
# Taking input n times form
# the user where n is number
# of students
number = int(input("Enter marks (0 to 100): "))
if number > 100 or number < 0: # if a number is out of range
print("Please enter marks (0 to 100)")
continue
ls.append(number) # storing the marks in empty list
number_students -= 1
grades = round_off(ls) # Calling the function
for mark in grades: # with for loop printing marks of each student
print(mark)
|
"""
Code used for the 'Singly linked list' class.
"""
class Node:
"Represents a single linked node."
def __init__(self, data, next = None):
self.data = data
self.next = None
def __str__(self):
"String representation of the node data."
return str(self.data)
def __repr__(self):
"Simple representation of the node."
return self.data
class SinglyLinkedList:
"Represents a singly linked list made of several Node instances."
def __init__(self):
self.tail = None
self.size = 0
def append(self, data):
"Encapsulates the data in a Node class."
node = Node(data)
if self.tail == None:
self.tail = node
else:
current = self.tail
while current.next:
current = current.next
current.next = node
self.size += 1
def size(self):
"Returns the number of nodes in the list."
return str(self.size)
def iter(self):
"Iters through the list."
current = self.tail
while current:
val = current.data
current = current.next
yield val
def delete(self, data):
"Removes an element in the singly linked list."
current = self.tail
previous = self.tail
while current:
if current.data == data:
if current == self.tail:
self.tail = current.next
else:
previous.next = current.next
self.size -= 1
return current.data
previous = current
current = current.next
def search(self, data):
"Looks for a specific element in the list."
for node in self.iter():
if data == node:
print(f"Data {data} found")
def clear(self):
"Clear the entire list."
self.tail = None
self.head = None
self.size = 0
"""
Ejemplo en shell de SinglyLinkedList con append
words = SinglyLinkedList()
words.append('egg')
words.append('ham')
words.append('spam')
current = words.tail
while current:
print(current.data)
current = current.next
for word in words.iter():
print(word)
words.search('eggs')
""" |
n,m = map(int,input().split())
rows = [input() for _ in range(n)]
k = int(input())
for row in sorted(rows, key=lambda row: int(row.split()[k])):
print(row)
|
def validacao(cpf):
original=cpf
verificacao=False
digito2=cpf%10
cpf=cpf//10
digito1=cpf%10
cpf=cpf//10
soma=0
for i in range (2,11):
cpfSeparado=cpf%10
soma=soma+(cpfSeparado*i)
cpf=cpf//10
verificador1=soma%11
if verificador1>2:
verificador1=11-verificador1
else:
verificador1=0
if verificador1==digito1:
soma=0
cpf=original
cpf=cpf//10
for j in range (2,12):
cpfSeparado=cpf%10
soma=soma+(cpfSeparado*i)
cpf=cpf//10
verificador2=soma%11
print(verificador2)
if verificador2>2:
verificador2=11-verificador2
else:
verificador2=0
if verificador2==digito2:
verificacao=True
return verificacao
#main
numero=int(input("Insira o número do CPF (apenas dígitos): "))
if validacao(numero)==True:
print("O cpf",numero,"é válido")
else:
print("O cpf",numero,"não é válido")
|
def func_header(funcname):
print('\t.global %s' % funcname)
print('\t.type %s, %%function' % funcname)
print('%s:' % funcname)
def push_stack(reg):
print('\tstr %s, [sp, -0x10]!' % reg)
def pop_stack(reg):
print('\tldr %s, [sp], 0x10' % reg)
def store_stack(value, offset):
print('\tmov x8, %d' % value)
print('\tstr x8, [fp, %s]' % str(hex(offset)))
def binary_oprand(oprand, offdst, offsrc1, offsrc2):
print('\tldr x8, [fp, %s]' % str(hex(offsrc1)))
print('\tldr x9, [fp, %s]' % str(hex(offsrc2)))
print('\t%s x8, x8, x9' % oprand)
print('\tstr x8, [fp, %s]' % str(hex(offdst)))
def copy_stack(offdst, offsrc):
print('\tldr x8, [fp, %s]' % str(hex(offsrc)))
print('\tstr x8, [fp, %s]' % str(hex(offdst)))
def comparison(oprand, offdst, offsrc1, offsrc2):
print('\tldr x8, [fp, %s]' % str(hex(offsrc1)))
print('\tldr x9, [fp, %s]' % str(hex(offsrc2)))
print('\tcmp x8, x9')
print('\tcset x8, %s' % oprand)
print('\tstr x8, [fp, %s]' % str(hex(offdst)))
def unary_oprand(oprand, offdst, offsrc):
print('\tldr x8, [fp, %s]' % str(hex(offsrc)))
print('\t%s x8, x8' % oprand)
print('\tstr x8, [fp, %s]' % str(hex(offdst)))
def jmp(label):
print('\tb %s' % label)
def ret(funcname):
print('\tb %s_ret' % funcname)
def br(offset, label1, label2):
print('\tldr x8, [fp, %s]' % str(hex(offset)))
print('\tcbnz x8, %s' % label1)
print('\tb %s' % label2)
def printint(offset):
print('\tadr x0, fmtld')
print('\tldr x1, [fp, %s]' % str(hex(offset)))
print('\tbl printf')
def printbool(offset):
print('\tldr x1, [fp, %s]' % str(hex(offset)))
print('\tbl printbool')
def printstr(label):
print('\tadr x0, %s' % label)
print('\tbl printf')
def printfooter():
print('''
.global printbool
printbool:
cbz x1, printboolfalse
adr x0, strtrue
b printboolendif
printboolfalse:
adr x0, strfalse
printboolendif:
bl printf
ret lr
.data
fmtld: .string "%ld"
strtrue: .string "true"
strfalse: .string "false"
strspace: .string " "
strnewline: .string "\\n"''')
|
(10 and 2)[::-5]
(10 and 2)[5]
(10 and 2)(5)
(10 and 2).foo
-(10 and 2)
+(10 and 2)
~(10 and 2)
5 ** (10 and 2)
(10 and 2) ** 5
5 * (10 and 2)
(10 and 2) * 5
5 / (10 and 2)
(10 and 2) / 5
5 // (10 and 2)
(10 and 2) // 5
5 + (10 and 2)
(10 and 2) + 5
(10 and 2) - 5
5 - (10 and 2)
5 >> (10 and 2)
(10 and 2) << 5
5 & (10 and 2)
(10 and 2) & 5
5 ^ (10 and 2)
(10 and 2) ^ 5
5 | (10 and 2)
(10 and 2) | 5
() in (10 and 2)
(10 and 2) in ()
5 is (10 and 2)
(10 and 2) is 5
5 < (10 and 2)
(10 and 2) < 5
not (10 and 2)
5 and 10 and 2
10 and 2 and 5
5 or 10 and 2
10 and 2 or 5
10 and 2 if 10 and 2 else 10 and 2
|
inputA = 277
inputB = 349
score = 0
queueA = []
queueB = []
i = 0
while len(queueA) < (5*(10**6)):
inputA = (inputA*16807)%2147483647
if inputA%4 == 0: queueA.append(inputA)
while len(queueB) < (5*(10**6)):
inputB = (inputB*48271)%2147483647
if inputB%8 == 0: queueB.append(inputB)
for i in range(0,(5*(10**6))):
if (queueA[i] & 0b1111111111111111) == (queueB[i] & 0b1111111111111111): score+=1
print(score) |
# Created by MechAviv
# [Magic Library Checker] | [1032220]
# Ellinia : Magic Library
if "1" not in sm.getQuestEx(25566, "c3"):
sm.setQuestEx(25566, "c3", "1")
sm.chatScript("You search the Magic Library.") |
"""
Write a Python program to find whether a given number (accept from the user) is even or odd, print out an appropriate message to the user.
"""
x = int(input("Enter a number : "))
if x%2==1:
print("The number is an even number")
else:
print("The number is an odd number")
|
class Comparable:
def __init__(self, value):
self.value = value
def __eq__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value == other_value
def __ne__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value != other_value
def __gt__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value > other_value
def __lt__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value < other_value
def __ge__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value >= other_value
def __le__(self, other):
other_value = other.value if isinstance(other, Comparable) else other
return self.value <= other_value
def read_file(s):
with open(s, "r") as f:
content = f.read()
return content
def write_file(s, name):
with open(name, "w") as f:
f.write(s)
|
def DecodeToFile(osufile, newfilename, SVLines: list):
with open(newfilename, "w+") as f:
old = open(osufile, "r")
old = old.readlines()
old_TotimingPoints = old[:old.index("[TimingPoints]\n") + 1]
old_afterTimingPoints = old[old.index("[TimingPoints]\n") + 1:]
all_file = old_TotimingPoints + [i.encode() for i in SVLines] + old_afterTimingPoints
for k in all_file:
f.write(k)
def Noteoffset(osufile, start, end, return_only_LN=False):
with open(osufile, 'r') as f:
f = f.readlines()
offseto = []
notecount = []
for i in range(f.index("[HitObjects]\n")+1, len(f) - 1):
if start < int(f[i].split(",")[2]) <= end:
if int(f[i].split(",")[2]) in offseto:
notecount[-1] += 1
continue
if return_only_LN:
splited = f[i].split(",")
release = int(splited[-1].split(":")[0])
if release == 0:
continue
else:
offseto.append([int(splited[2]), release])
else:
offseto.append(int(f[i].split(",")[2]))
notecount.append(1)
return offseto, notecount
|
#Program for a Function that takes a list of words and returns the length of the longest one.
def longest_word(list): #define a function which takes list as a parameter
longest=0
for words in list: #loop for each word in list
if len(words)>longest: #compare length iteratively
longest=len(words)
lword=words
return lword #return longest word
w=['Entertainment','entire','Elephant','inconsequential']
print("Longest word is",longest_word(w), "with", len(longest_word(w)), "letters.")
|
def print_a_string():
my_string = "hello world"
print(my_string)
def print_a_number():
my_number = 9
print(my_number)
# my logic starts here
if __name__ == "__main__":
print_a_string()
print_a_number()
print("all done...bye-bye") |
def hms2dec(h,m,s):
return 15*(h + (m/60) + (s/3600))
def dms2dec(d,m,s):
if d>=0:
return (d + (m/60) + (s/3600))
return (d - (m/60) - (s/3600))
if __name__ == '__main__':
print(hms2dec(23, 12, 6))
print(dms2dec(22, 57, 18))
print(dms2dec(-66, 5, 5.1)) |
#! /root/anaconda3/bin/python
"""
(base) [root@k8s-ansible file]# cat myfile.txt
1234567890
abcdefghijklmn
opqrstuvwxyz
"""
# readlines参数
file = open('myfile.txt')
print(file.readlines())
file.close()
# readlines 例子一
file = open('myfile.txt')
print(file.readlines(8))
file.close()
# readlines 例子二
file = open('myfile.txt')
print(file.readlines(15))
file.close()
# readlines 例子三
file = open('myfile.txt')
print(file.readlines(-5))
file.close()
# readlines 例子四
file = open('myfile.txt')
print(file.readlines(29))
file.close()
|
class PossumException(Exception):
"""Base Possum Exception"""
class PipenvPathNotFound(PossumException):
"""Pipenv could not be located"""
class SAMTemplateError(PossumException):
"""There was an error reading the template file"""
|
no_list = [22,68,90,78,90,88]
def average(x):
#complete the function's body to return the average
length=len(no_list)
return sum(no_list)/length
print(average(no_list))
|
__lname__ = "yass"
__uname__ = "YASS"
__acronym__ = "Yet Another Subdomainer Software"
__version__ = "0.8.0"
__author__ = "Francesco Marano (@mrnfrancesco)"
__author_email__ = "francesco.mrn24@gmail.com"
__source_url__ = "https://github.com/mrnfrancesco/yass"
|
end = 1000
total = 0
for x in range(1,end):
if x % 15 == 0:
total = total + x
print(x)
elif x % 5 == 0:
total = total + x
print(x)
elif x % 3 == 0:
total = total + x
print(x)
print(f"total = {total}") |
# Section 3-16
# Question: How do we find the sum of the digits of a positive integer using recursion?
# Step 1: The recursive case
# Add the current digit to a total
# Step 2: The Base Condition
# If there are no more digits, return the total
# Step 3: The unintended cases
# If the input is not a positive integer, throw an exception
# perform sum function recursively
test = 349587
expected = 3 + 4 + 9 + 5 + 8 + 7
def sum_digits(number):
assert number >= 0 and int(number) == number, 'Input must be a nonnegative integer.' # Step 3: the unintended cases
return 0 if number == 0 else (number % 10) + sum_digits(int(number / 10)) # Step 1 and 2
# Show the output
outcome = sum_digits(test)
print('Expected: ', expected)
print('Outcome: ', outcome)
assert outcome == expected, 'outcome does not match expected value. Check logic and try again.'
|
template = '''
<head>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.21/css/jquery.dataTables.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.21/css/jquery.dataTables.min.css" />
<script src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script src="https://cdn.datatables.net/1.10.21/js/jquery.dataTables.min.js"></script>
<style>
#title {{
font-size: 2em;
font-family: sans-serif;
text-align: center;
}}
#subtitle {{
font-size: 1em;
font-family: sans-serif;
text-align: center;
}}
.parameters {{
font-size: 1em;
font-family: sans-serif;
width: 80%;
margin-left: auto;
margin-right: auto;
}}
.styled-table{{
width: 95%;
margin-left: auto;
margin-right: auto;
font-size: 0.9em;
font-family: sans-serif;
white-space: pre-line;
}}
.dataTable {{
border-collapse: collapse;
font-size: 0.9em;
font-family: sans-serif;
width: 80%;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}}
.dataTable thead tr {{
background-color: #156094;
color: #ffffff;
text-align: left;
padding-top: 5%;
}}
table.dataTable td {{
min-width: 50px;
box-sizing: border-box;
}}
table.dataTable thead tr th input{{
min-width: 50px;
max-width: 200px;
width:100%;
box-sizing: border-box;
}}
.dataTable tbody tr {{
border-bottom: thin solid #dddddd;
}}
.dataTable tbody tr:nth-of-type(even) {{
background-color: #f3f3f3;
}}
.dataTables_filter{{
margin-top: 1%;
margin-bottom: 1%;
}}
.dataTables_length{{
margin-top: 1%;
margin-bottom: 1%;
}}
.short{{
max-height: 150px;
overflow: hidden;
}}
.link{{
max-width: 200px;
font-size: 0.9em;
padding-left: 2%;
padding-top: 2%;
word-wrap: break-word;
}}
.citations{{
max-width: 50px;
text-align: center;
}}
.name {{
min-width: 120px;
}}
.desc {{
text-align: left;
padding-left: 1.2%;
padding-top: 1.2%;
padding-right:1.2%;
padding-bottom: 1.2%;
font-size: 0.9em;
min-width: 200px;
}}
.type {{
min-width: 180px;
vertical-align: text-top;
}}
.topic {{
min-width: 200px;
vertical-align: text-top;
}}
.operation {{
min-width: 200px;
vertical-align: text-top;
}}
.formats {{
min-width: 200px;
vertical-align: text-top;
}}
</style>
</style>
</head>
<body>
<h1 id=title>Tools discovery results</h1>
<h2 id=subtitle>{name}</h2>
<div class=parameters>
<h3> Search parameters: </h3>
<ul>
<li><span style="font-weight: bold">Name</span>: {name}</li>
<li><span style="font-weight: bold">Keywords</span>: {keywords}</li>
</ul>
</div>
<div class=parameters>
<h3> Results: </h3>
<div class="styled-table">
{content}
</div>
</div>
</body>
<script>
$('#my-table').dataTable( {{
"order": [],
}} );
var userSelection = document.getElementsByClassName('click_expand');
for(var i = 0; i < userSelection.length; i++) {{
(function(index) {{
userSelection[index].addEventListener("click", function() {{
console.log("Clicked index: ");
$(this).closest("tr").find('div').toggleClass("short");
}})
}})(i);
}}
$('#my-table thead th').each(function() {{
var title = $('#my-table thead th').eq($(this).index()).text();
$(this).html(title+'</br><input type="text" placeholder="Search"' + title + '/>');
$(this).css('text-align', 'left');
}});
var r = $('#my-table thead th');
r.find('input').each(function(){{
$(this).css('margin', 4);
$(this).css('padding', 4);
}});
// DataTable
var table = $('#my-table').DataTable();
// Apply the search
table.columns().eq(0).each(function(colIdx) {{
$('input', table.column(colIdx).header()).on('keyup change', function() {{
table
.column(colIdx)
.search(this.value)
.draw();
}});
$('input', table.column(colIdx).header()).on('click', function(e) {{
e.stopPropagation();
}});
}});
</script>
''' |
# -*- coding: utf-8 -*-
"""This module contains two variables which will store all defined nodes models and instances
"""
model_store = {}
node_store = {}
|
'''desafio40: faça um programa de um programa ue determine o MAIOR dentre 400 números inseridos.
OBS: só é possivel mostrar o maior dos números no FINAL de todas as inserções'''
#
x = 1
z = 1
while (x<=400):
y = int(input('Insira o número {}: '.format(x)))
if (y>z):
z=y
x = x+1
print('O maior número inserido foi {}'.format(z))
|
def binarySearch(arr, l, r, x):
while l <= r:
mid = l + (r - l) / 2;
# Check if x is present at mid
if arr[mid] == x:
return mid
# If x is greater, ignore left half
elif arr[mid] < x:
l = mid + 1
# If x is smaller, ignore right half
else:
r = mid - 1
# If we reach here, then the element
# was not present
return -1
|
# Segment tree
class SegmentTree:
def __init__(self, data):
size = len(data)
t = 1
while t < size:
t <<= 1
offset = t - 1
index = [0] * (t * 2 - 1)
index[offset:offset + size] = range(size)
for i in range(offset - 1, -1, -1):
x = index[i * 2 + 1]
y = index[i * 2 + 2]
if data[x] <= data[y]:
index[i] = x
else:
index[i] = y
self._data = data
self._index = index
self._offset = offset
def query(self, start, stop):
data = self._data
index = self._index
result = start
l = start + self._offset
r = stop + self._offset
while l < r:
if l & 1 == 0:
i = index[l]
x = data[i]
y = data[result]
if x < y or (x == y and i < result):
result = i
if r & 1 == 0:
i = index[r - 1]
x = data[i]
y = data[result]
if x < y or (x == y and i < result):
result = i
l = l // 2
r = (r - 1) // 2
return result
N, K, D = map(int, input().split())
A = list(map(int, input().split()))
if 1 + (K - 1) * D > N:
print(-1)
exit()
st = SegmentTree(A)
result = []
i = 0
for k in range(K - 1, -1, -1):
i = st.query(i, N - k * D)
result.append(A[i])
i += D
print(*result)
|
'''import math #as m also can be written
a=math.pi #a=m.pi
print(a)
'''
'''
from math import pi #import only pi from math
b=2*pi
print(b)
'''
'''
from math import * #import everything from math
b=2*pi
print(b)
'''
'''
food = 'spam'
if food == 'spam':
print('Ummmm, my favourite!')
print('I feel like saying it 100 times...')
print(100*(food+'!'))
'''
'''
food = 'spam'
if food == 'spam':
print('Ummmm, my favourite!')
else:
print('No!')
'''
'''
import random
a=random.randint(0,45)
str=''
if(a>43):
str='larger'
elif(a>35 and a<=43):
str = 'medium'
elif(a>25 and a<=35):
str='small'
else:
str='not eligible'
print('the value is {} and is {}'.format(a,str))
'''
'''
#for loop
for friend in ['Margot','Kathryn','Prisila']:
invitation = "Hi " + friend + ". Please come to my party on Saturday!"
print(invitation)
'''
'''
name = 'harrison'
guess = input("So I'm thinking of person's name. Try to guess it: ")
pos = 0
while guess!=name and pos<len(name):
print("Nope, that's not it! Hint: letter ",end='')
print(pos+1,'is',name[pos]+".",end='')
guess = input("Guess again: ")
pos = pos + 1
if pos==len(name) and name!=guess:
print("Too bad, you couldn't get it. The name was", name + ".")
else:
print("\nGreat, you got it in ",pos + 1,"guesses!")
'''
'''
for i in [12,16,17,24,29,30]:
if i%2 ==1: #if number is odd
pass #will do nothing
print('this is pass block')
print(i)
print('done')
'''
|
def test_post_order(client, order_payload):
res = client.post("/order", json = order_payload)
assert res.status_code == 200
def test_post_game(client, game_payload):
res = client.post("/order", json = game_payload)
assert res.status_code == 200
def test_get_order(client):
res1 = client.get("/order")
assert res1.json()["mode"] == 0
assert res1.json()["toppings"] == ["onions", "spice"]
res2 = client.get("/order")
assert res2.json()["mode"] == 1
res3 = client.get("/order")
assert res3.json() == {}
|
class Solution:
def angleClock(self, hour: int, minutes: int) -> float:
hour_deg = (hour*30)%360 + (0.5)*minutes
minute_deg = ((minutes/5)*30)%360
if(abs(hour_deg-minute_deg)>180):
return 360 - abs(hour_deg-minute_deg)
else:
return abs(hour_deg-minute_deg)
|
class Solution:
def findDuplicate(self, nums: list[int]) -> int:
nums.sort()
for i in range(1, len(nums)):
if nums[i] == nums[i - 1]:
return nums[i]
class Solution:
def findDuplicate(self, nums: list[int]) -> int:
# 'low' and 'high' represent the range of values of the target
low = 1
high = len(nums) - 1
while low <= high:
cur = (low + high) // 2
count = 0
# Count how many numbers are less than or equal to 'cur'
count = sum(num <= cur for num in nums)
if count > cur:
duplicate = cur
high = cur - 1
else:
low = cur + 1
return duplicate
|
num = int(input(''))
hours = int(input(''))
value = float(input(''))
print('NUMBER = {:0}\nSALARY = U$ {:.2f}'.format(num, (hours * value))) |
"""
Unit tests for pyDEX project should all go in this module
author: officialcryptomaster@gmail.com
"""
|
class Solution(object):
def combinationSum2(self, candidates, target):
ret = []
self.dfs(sorted(candidates), target, 0, [], ret)
return ret
def dfs(self, nums, target, idx, path, ret):
if target <= 0:
if target == 0:
ret.append(path)
return
for i in range(idx, len(nums)):
if i > idx and nums[i] == nums[i-1]:
continue
self.dfs(nums, target-nums[i], i+1, path+[nums[i]], ret) |
#!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Jiao Lin
# California Institute of Technology
# (C) 2007 All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
class DispersionOnGrid:
def __init__(
self, axes,
polarization_npyarr, energy_npyarr):
self.axes = axes
self.polarization_npyarr = polarization_npyarr
self.energy_npyarr = energy_npyarr
return
pass # end of AbstractDispersion
# version
__id__ = "$Id$"
# End of file
|
str1 = "Udacity"
# LENGTH
print(len(str1)) # 7
# CHANGE CASE
# The `lower()` and `upper` method returns the string in lower case and upper case respectively
print(str1.lower()) # udacity
print(str1.upper()) # UDACITY
# SLICING
# string_var[lower_index : upper_index]
# Note that the upper_index is not inclusive.
print(str1[1:6]) # dacit
print(str1[:6]) # Udacit. A blank index means "all from that end"
print(str1[1:]) # dacity
# A negative index means start slicing from the end-of-string
print(str1[-6:-1]) # dacit
# STRIP
# `strip()` removes any whitespace from the beginning or the end
str2 = " Udacity "
print(str2.strip()) # Udacity
# REPLACE/SUBSTITUTE A CHARACTER IN THE STRING
# The replace() method replaces all occurances a character in a string with another character. The input arguments are case-sensitive
print(str1.replace('y', "B")) #UdacitB
# SPLIT INTO SUB-STRINGS
# The split() method splits a string into substrings based on the separator that we specify as argument
str3 = "Welcome, Constance!"
print(str3.split(",")) # ['Welcome', ' Constance!']
# CONCATENATION
print(str3 + " " + str1) # Welcome, Constance! Udacity
marks = 100
# print(str3 + " You have scored a perfect " + marks) # TypeError: can only concatenate str (not "int") to str
print(str3 + " You have scored a perfect " + format(marks)) # format() method converts the argument as a formatted string
# SORT A STRING
# We can use sorted() method that sort any instance of *iterable*. The characters are compared based on their ascii value
print(sorted(str3)) # [' ', '!', ',', 'C', 'W', 'a', 'c', 'c', 'e', 'e', 'e', 'l', 'm', 'n', 'n', 'o', 'o', 's', 't']
|
class Line:
def __init__(self,p1,p2):
if (p1[0] > p2[0]):
self.p1 = p2
self.p2 = p1
elif (p1[0] == p2[0] and p1[1] > p2[1]):
self.p1 = p2
self.p2 = p1
else:
self.p1 = p1
self.p2 = p2
print(self.p1)
print(self.p2)
print(self.p2[0]-self.p1[0] )
self.m = None
if (self.p1[0] == self.p2[0]):
self.m = None
else:
self.m = (self.p2[1]-self.p1[1])/(self.p2[0]-self.p1[0])
if (self.m == 1):
self.incremento = 1
if (self.m == -1):
self.incremento = -1
if(self.m == 0):
self.incremento = 0
if (self.m is None):
self.incremento = 1
#print("Pendiente: " + str(self.m) + " Incremento: " + str(self.incremento))
# y = mx - b
#ps = self.calc_points_i()
#print(ps)
#print("-----------------------------------------------------------------------")
def calc_points_i(self):
points = []
points.append(self.p1)
if (self.m is not None):
y = self.p1[1]
for i in range(self.p1[0]+1,self.p2[0]):
y += self.incremento
points.append((i,y))
else:
y = self.p1[1]
for i in range(self.p1[1]+1,self.p2[1]):
y += self.incremento
points.append((self.p1[0],y))
points.append(self.p2)
return (points)
def calc_points(self):
points = []
points.append(self.p1)
points.append(self.p2)
if (self.p1[0] == self.p2[0]):
if (self.p1[1] > self.p2[1]):
begin = self.p2[1]+1
end = self.p1[1]
else:
begin = self.p1[1]+1
end = self.p2[1]
for i in range(begin,end):
points.append((self.p1[0],i))
elif (self.p1[1] == self.p2[1]):
if (self.p1[0] > self.p2[0]):
begin = self.p2[0]+1
end = self.p1[0]
else:
begin = self.p1[0]+1
end = self.p2[0]
for i in range(begin,end):
points.append((i,self.p1[1]))
else:
return []
return (points)
|
class Node:
pass
class SystemNode(Node):
def __init__(self, equations):
self.equations = equations
class EquationNode(Node):
def __init__(self, differential, expression):
self.differential = differential
self.expression = expression
class DifferentialNode(Node):
def __init__(self, function, parameter):
self.function = function
self.parameter = parameter
class ExpressionNode(Node):
pass
class ParenthesisNode(ExpressionNode):
def __init__(self, expression):
self.expression = expression
class BinaryNode(ExpressionNode):
def __init__(self, left_expression, right_expression):
self.left_expression = left_expression
self.right_expression = right_expression
class PlusNode(BinaryNode):
pass
class MinusNode(BinaryNode):
pass
class FractionNode(BinaryNode):
pass
class StarNode(BinaryNode):
pass
class AtomicNode(ExpressionNode):
def __init__(self, value):
self.value = value
class SymbolNode(AtomicNode):
def __init__(self, value, isGlobal=False):
self.value = value
self.isGlobal = isGlobal
class NumberNode(AtomicNode):
pass
class IdentifierNode(ExpressionNode):
def __init__(self, symbol, subgroup=None, isGlobal=False):
self.symbol = symbol
self.subgroup = subgroup
self.isGlobal = isGlobal
class UnaryNode(ExpressionNode):
pass
class NegNode(UnaryNode):
def __init__(self, expression):
self.expression = expression
class GlobalNode(ExpressionNode):
def __init__(self, value):
self.value = value |
"""Assignment operators
@see: https://www.w3schools.com/python/python_operators.asp
Assignment operators are used to assign values to variables
"""
def test_assignment_operator():
"""Assignment operator """
assert True
# Multiple assignment.
# The variables first_variable and second_variable simultaneously get the new values 0 and 1.
first_variable, second_variable = 0, 1
assert first_variable == 0
assert second_variable == 1
# You may even switch variable values using multiple assignment.
first_variable, second_variable = second_variable, first_variable
assert first_variable == 1
assert second_variable == 0
def test_augmented_assignment_operators():
"""Assignment operator combined with arithmetic and bitwise operators"""
number = 5 + 3
assert number == 8
number = 5 - 3
assert number == 2
number = 5 * 3
assert number == 15
number = 8 / 4
assert number == 2
# Assignment: %=
number = 8
number %= 3
assert number == 2
# Assignment: %=
number = 5
number %= 3
assert number == 2
# Assignment: //=
number = 5
number //= 3
assert number == 1
# Assignment: **=
number = 5
number **= 3
assert number == 125
# Assignment: &=
number = 5 # 0b0101
number &= 3 # 0b0011
assert number == 1 # 0b0001
# Assignment: |=
number = 5 # 0b0101
number |= 3 # 0b0011
assert number == 7 # 0b0111
# Assignment: ^=
number = 5 # 0b0101
number ^= 3 # 0b0011
assert number == 6 # 0b0110
# Assignment: >>=
number = 5
number >>= 3
assert number == 0 # (((5 // 2) // 2) // 2)
# Assignment: <<=
number = 5
number <<= 3
assert number == 40 # 5 * 2 * 2 * 2
|
#!/usr/bin/env python
"""Tests for `tools_1c` package."""
|
"""Generate warnings for Machine statistics"""
def cpu_warning_generator(cpu_tuple):
# Returns boolean value false if used cycles is greater than idle cycles
used_time = cpu_tuple.user + cpu_tuple.nice + cpu_tuple.system
if used_time > cpu_tuple.idle:
return True
else:
return False
def memory_warning_generator(memory_tuple, threshold=524288000):
# Returns boolean value false if memory is less than 500 MB
if memory_tuple.available <= threshold:
return True
return False
def disk_warning_generator(disk_tuple, threshold = 80):
# Returns boolean value false if disk space is less than 1 GB
if disk_tuple.percent > threshold:
return True
else:
return False
|
frase = str(input('Digite uma frase: '))
cont = 1
for c in frase:
if cont % 2 == 0:
print(c.upper(), end='')
else:
print(c.lower(), end='')
cont += 1
|
# https://stackoverflow.com/questions/13979714/heap-sort-how-to-sort
swaps = 0
def heapify(arr, n, i):
global swaps
count = 0
largest = i
l = 2 * i + 1
r = 2 * i + 2
if l < n and arr[i] < arr[l]:
largest = l
if r < n and arr[largest] < arr[r]:
largest = r
if largest != i:
count += 1
arr[i],arr[largest] = arr[largest],arr[i]
swaps += 1
count += heapify(arr, n, largest)
return count
def heapSort(arr):
global swaps
n = len(arr)
count = 0
for i in range(n, -1, -1):
heapify(arr, n, i)
count += heapify(arr, i, 0)
for i in range(n-1, 0, -1):
arr[i], arr[0] = arr[0], arr[i]
swaps += 1
count += heapify(arr, i, 0)
return "HEAP SORT:\nComparisons: " + str(count) + "\nSwaps: " + str(swaps) |
temp = {
"email": "email@email.com",
"name": "Sample Data",
"penalties": "3",
"responses": {
"101": "[1, 2, ‘hello’]",
"201": "34.000000",
"301": "27.2",
"401": "Class",
"501": "^"
},
"timestamp": "2021-01-31 13:22:26.432631",
"uid": "601661ba22d40e8cc43159c0"
}
ans = {
"101": '[1, 2, ‘hello’]',
'201': '34.000000',
'301': '27.2',
'401': 'Class',
'501': '^'
}
sc=0
pen= int(temp['penalties'])
for i in temp['responses']:
if temp['responses'][i] == ans[i]:
print(temp['responses'][i] + " correct")
sc = sc + 4
elif temp['responses'][i] == '':
pass
else:
print(temp['responses'][i] + " wrong")
sc = sc -1
score={
"name":"Sample data",
"score":str(sc),
"penalties": str(pen),
"total":str( sc - int(pen / 3) )
}
print(score) |
class Solution:
def solve(self, words):
groups = defaultdict(list)
for word in words:
for key in groups:
if len(word)==len(key) and any(all(word[j]==key[j-i] for j in range(i,len(word))) and all(word[j]==key[len(word)-i+j] for j in range(i)) for i in range(len(word))):
groups[key].append(word)
break
else:
groups[word].append(word)
return len(groups)
|
# -*- coding: utf-8 -*-
streams = (
("Hitradio Ö3", "http://mp3stream7.apasf.apa.at:8000/;stream.nsv"),
("FM4", "http://mp3stream1.apasf.apa.at:8000/;stream.nsv"),
("Radio Arabella", "http://stream10.arabella-at.vss.kapper.net:8000/listen.pls"),
("Radio Wien", "http://mp3stream2.apasf.apa.at:8000/;stream.nsv"),
("Radio Niederösterreich", "http://mp3stream8.apasf.apa.at:8000/;stream.nsv"),
("Radio Oberösterreich", "http://orfradio.liwest.at/liveHQ.m3u"),
("Radio Salzburg", "http://194.232.200.147:8000/listen.pls"),
("Radio Tirol", "http://mp3stream10.apasf.apa.at:8000/;stream.nsv"),
("Radio Vorarlberg", "http://194.232.200.149:8000/listen.pls"),
("Radio Kärnten", "http://194.232.200.145:8000/listen.pls"),
("Radio Steiermark", "http://mp3stream9.apasf.apa.at:8000/;stream.nsv"),
("Radio Burgenland", "http://194.232.200.146:8000/listen.pls"),
("Radio Ö1", "http://mp3stream3.apasf.apa.at:8000/;stream.nsv"),
("Radio 88.6", "http://ber.radiostream.de:36889/listen.pls"),
("Kronehit", "http://onair-ha1.krone.at/kronehit-hd.mp3.m3u"),
("Antenne Bayern", "http://www.antenne.de/webradio/antenne-aac.pls"),
("Rockantenne Bayern", "http://www.rockantenne.de/webradio/rockantenne.m3u"),
("Antenne Bayern Oldies but Goldies", "http://www.antenne.de/webradio/channels/oldies-but-goldies.aac.pls"),
("Antenne Bayern Schlager", "http://www.antenne.de/webradio/channels/das-schlager-karussell.aac.pls"),
("Antenne Bayern 80er Kult Hits", "http://www.antenne.de/webradio/channels/80er-kulthits.aac.pls")
)
def GetStreamNames():
names = []
for stream in streams:
names.append(stream[0].decode('utf-8'))
return names
def GetStreamAddresses():
addr = []
for stream in streams:
addr.append(stream[1])
return addr
def GetAddrForStream(index):
return streams[index][1]
def GetNameForAddr(addr):
for stream in streams:
if stream[1] == addr:
return stream[0].decode('utf-8')
return ""
|
def findDecision(obj): #obj[0]: Passanger, obj[1]: Weather, obj[2]: Time, obj[3]: Coupon, obj[4]: Coupon_validity, obj[5]: Gender, obj[6]: Age, obj[7]: Maritalstatus, obj[8]: Children, obj[9]: Education, obj[10]: Occupation, obj[11]: Income, obj[12]: Bar, obj[13]: Coffeehouse, obj[14]: Restaurantlessthan20, obj[15]: Restaurant20to50, obj[16]: Direction_same, obj[17]: Distance
# {"feature": "Coupon", "instances": 85, "metric_value": 0.874, "depth": 1}
if obj[3]<=3:
# {"feature": "Occupation", "instances": 58, "metric_value": 0.7355, "depth": 2}
if obj[10]<=20:
# {"feature": "Coffeehouse", "instances": 56, "metric_value": 0.6769, "depth": 3}
if obj[13]>0.0:
# {"feature": "Time", "instances": 45, "metric_value": 0.7642, "depth": 4}
if obj[2]<=3:
# {"feature": "Bar", "instances": 39, "metric_value": 0.8213, "depth": 5}
if obj[12]<=3.0:
# {"feature": "Distance", "instances": 38, "metric_value": 0.7897, "depth": 6}
if obj[17]>1:
# {"feature": "Restaurantlessthan20", "instances": 24, "metric_value": 0.9183, "depth": 7}
if obj[14]<=2.0:
# {"feature": "Age", "instances": 15, "metric_value": 0.9968, "depth": 8}
if obj[6]<=4:
# {"feature": "Restaurant20to50", "instances": 13, "metric_value": 0.9612, "depth": 9}
if obj[15]>-1.0:
# {"feature": "Weather", "instances": 11, "metric_value": 0.994, "depth": 10}
if obj[1]<=1:
# {"feature": "Passanger", "instances": 10, "metric_value": 1.0, "depth": 11}
if obj[0]<=1:
# {"feature": "Maritalstatus", "instances": 6, "metric_value": 0.9183, "depth": 12}
if obj[7]>0:
# {"feature": "Direction_same", "instances": 5, "metric_value": 0.7219, "depth": 13}
if obj[16]<=0:
return 'False'
elif obj[16]>0:
return 'True'
else: return 'True'
elif obj[7]<=0:
return 'True'
else: return 'True'
elif obj[0]>1:
# {"feature": "Coupon_validity", "instances": 4, "metric_value": 0.8113, "depth": 12}
if obj[4]>0:
return 'True'
elif obj[4]<=0:
return 'False'
else: return 'False'
else: return 'True'
elif obj[1]>1:
return 'True'
else: return 'True'
elif obj[15]<=-1.0:
return 'True'
else: return 'True'
elif obj[6]>4:
return 'False'
else: return 'False'
elif obj[14]>2.0:
# {"feature": "Income", "instances": 9, "metric_value": 0.5033, "depth": 8}
if obj[11]<=6:
return 'True'
elif obj[11]>6:
# {"feature": "Passanger", "instances": 3, "metric_value": 0.9183, "depth": 9}
if obj[0]<=1:
return 'True'
elif obj[0]>1:
return 'False'
else: return 'False'
else: return 'True'
else: return 'True'
elif obj[17]<=1:
# {"feature": "Education", "instances": 14, "metric_value": 0.3712, "depth": 7}
if obj[9]<=2:
return 'True'
elif obj[9]>2:
# {"feature": "Age", "instances": 4, "metric_value": 0.8113, "depth": 8}
if obj[6]>1:
return 'True'
elif obj[6]<=1:
return 'False'
else: return 'False'
else: return 'True'
else: return 'True'
elif obj[12]>3.0:
return 'False'
else: return 'False'
elif obj[2]>3:
return 'True'
else: return 'True'
elif obj[13]<=0.0:
return 'True'
else: return 'True'
elif obj[10]>20:
return 'False'
else: return 'False'
elif obj[3]>3:
# {"feature": "Coffeehouse", "instances": 27, "metric_value": 0.999, "depth": 2}
if obj[13]>0.0:
# {"feature": "Bar", "instances": 19, "metric_value": 0.9495, "depth": 3}
if obj[12]>0.0:
# {"feature": "Income", "instances": 14, "metric_value": 1.0, "depth": 4}
if obj[11]<=4:
# {"feature": "Education", "instances": 11, "metric_value": 0.9457, "depth": 5}
if obj[9]<=2:
# {"feature": "Distance", "instances": 7, "metric_value": 0.9852, "depth": 6}
if obj[17]<=1:
return 'True'
elif obj[17]>1:
return 'False'
else: return 'False'
elif obj[9]>2:
return 'False'
else: return 'False'
elif obj[11]>4:
return 'True'
else: return 'True'
elif obj[12]<=0.0:
return 'True'
else: return 'True'
elif obj[13]<=0.0:
# {"feature": "Passanger", "instances": 8, "metric_value": 0.8113, "depth": 3}
if obj[0]>1:
# {"feature": "Education", "instances": 4, "metric_value": 1.0, "depth": 4}
if obj[9]>0:
return 'True'
elif obj[9]<=0:
return 'False'
else: return 'False'
elif obj[0]<=1:
return 'False'
else: return 'False'
else: return 'False'
else: return 'True'
|
pt = int(input('Digite o 1° termo da PA: '))
r = int(input('Digite a razão: '))
c = 0
v = 0
while c != 10:
c += 1
v = pt + ((c - 1) * r)
print('A{} = {}'.format(c, v)) |
#-- gestures supported by Otto
#-- OttDIY Python Project, 2020
OTTOHAPPY = const(0)
OTTOSUPERHAPPY = const(1)
OTTOSAD = const(2)
OTTOSLEEPING = const(3)
OTTOFART = const(4)
OTTOCONFUSED = const(5)
OTTOLOVE = const(6)
OTTOANGRY = const(7)
OTTOFRETFUL = const(8)
OTTOMAGIC = const(9)
OTTOWAVE = const(10)
OTTOVICTORY = const(11)
OTTOFAIL = const(12)
|
products = {}
command = input()
while command != "statistics":
command = command.split(": ")
key = command[0]
value = int(command[1])
if key not in products:
products[key] = 0
products[key] += value
command = input()
print("Products in stock:")
for k, v in products.items():
print(f"- {k}: {v}")
print(f"Total Products: {len(products)}")
print(f"Total Quantity: {sum(products.values())}") |
# Simple function to add values
def aFunction():
a = 1
b = 2
c = a + b
print(c)
return c
# simple loop to count up in a range
def aLoop():
count = 0
# for each item in the range
for item in range(0, 100):
print(count)
count = count + 1
return count
# pass in a value below to aFunc, will fail if not an integer
def aFunc_1(my_num):
result = aFunc_2(my_num)
print(result)
return result
# aFunc_2 will add 1 to var and then return the value of var to aFunc_1
def aFunc_2(var):
var += 1
return var
# If statement in a function. If a_lang is (==) a specific value then it prints a statement
def anIf(a_lang):
if a_lang == "Python":
result = 'cool'
print(result)
elif a_lang == "JAVA":
result = 'not as cool as Python'
print(result)
else:
result = 'You should have picked Python'
print(result)
return result
my_num: int = 10
language = "Python"
if __name__ == "__main__":
# aFunction()
aLoop()
# aFunc_1(my_num)
# anIf(language)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.