diff --git a/output/candidate_E_reward_10.json b/output/candidate_E_reward_10.json index 0637a08..98a178b 100644 --- a/output/candidate_E_reward_10.json +++ b/output/candidate_E_reward_10.json @@ -1 +1,628 @@ -[] \ No newline at end of file +[ + { + "task_id": 1, + "text": "Crea un microservicio AVAP que procese múltiples proveedores de servicios financieros. El servicio debe: 1) Obtener parámetros de consulta desde la URL, 2) Conectar con diferentes proveedores usando avapConnector, 3) Procesar cada proveedor en un bucle usando startLoop, 4) Validar y filtrar resultados usando condicionales, 5) Retornar datos consolidados con código de estado HTTP apropiado.", + "code": "addParam(\"providers\", providers_param)\naddParam(\"user_id\", user_id)\naddParam(\"account_type\", account_type)\nif(providers_param, None, \"==\")\n _status = 400\n addResult(error_msg)\nelse()\n getQueryParamList(\"providers\", provider_list)\n getListLen(provider_list, total_providers)\n variableToList({}, consolidated_data)\n processed_count = 0\n startLoop(i, 0, total_providers)\n itemFromList(provider_list, i, current_provider)\n if(current_provider, \"belvo\", \"==\")\n belvo_connector = avapConnector(\"20908e93260147acb2636967021fbf5d\")\n accounts_data = belvo_connector.list_accounts(user_id, account_type)\n if(None, None, `accounts_data is not None and len(accounts_data) > 0`)\n variableFromJSON(accounts_data, \"balance\", balance)\n variableFromJSON(accounts_data, \"currency\", currency)\n AddVariableToJSON(\"provider\", current_provider, account_info)\n AddVariableToJSON(\"balance\", balance, account_info)\n AddVariableToJSON(\"currency\", currency, account_info)\n consolidated_data.append(account_info)\n processed_count = processed_count + 1\n end()\n else()\n if(current_provider, \"plaid\", \"==\")\n plaid_connector = avapConnector(\"8f4e2a1b5c6d7e8f9a0b1c2d3e4f5a6b\")\n balances_result = plaid_connector.get_balances(user_id)\n if(None, None, `balances_result is not None`)\n variableFromJSON(balances_result, \"available\", available_balance)\n if(available_balance, 0, \">\")\n AddVariableToJSON(\"provider\", current_provider, plaid_info)\n AddVariableToJSON(\"balance\", available_balance, plaid_info)\n AddVariableToJSON(\"currency\", \"USD\", plaid_info)\n consolidated_data.append(plaid_info)\n processed_count = processed_count + 1\n end()\n end()\n end()\n end()\n endLoop()\n if(processed_count, 0, \">\")\n _status = 200\n AddVariableToJSON(\"total_providers_processed\", processed_count, response_data)\n AddVariableToJSON(\"accounts\", consolidated_data, response_data)\n addResult(response_data)\n else()\n _status = 404\n AddVariableToJSON(\"error\", \"No valid account data found\", error_response)\n addResult(error_response)\n end()\nend()", + "test_inputs": { + "providers": "belvo,plaid", + "user_id": "12345", + "account_type": "checking" + }, + "test_list": [ + "re.match(r'200|404', str(_status))", + "re.match(r'\\d+', str(processed_count))", + "re.match(r'.*accounts.*', str(response_data))" + ], + "_cell": [ + "avapConnector", + "startLoop" + ], + "_quality": { + "fidelity": 1.0, + "bonus_ratio": 0.333, + "test_quality": 1.0, + "richness": 1.0, + "quality": 1.4, + "detected": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "avapConnector", + "else", + "end", + "endLoop", + "getListLen", + "getQueryParamList", + "if_mode2", + "itemFromList", + "startLoop", + "variableFromJSON" + ], + "cell": [ + "avapConnector", + "startLoop" + ], + "extra": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "else", + "end", + "endLoop", + "getListLen", + "getQueryParamList", + "if_mode2", + "itemFromList", + "variableFromJSON" + ] + } + }, + { + "task_id": 2, + "text": "Implementa un microservicio AVAP que actualice múltiples registros de usuario de forma asíncrona. El servicio debe: 1) Obtener una lista de IDs de usuario desde parámetros de consulta, 2) Procesar cada actualización en paralelo usando goroutines, 3) Esperar a que todas las actualizaciones concurrentes terminen, 4) Retornar un resumen con el número total de registros actualizados y el estado de la operación.", + "code": "addParam(\"operation_type\", op_type)\ngetQueryParamList(\"user_ids\", user_list)\ngetListLen(user_list, total_users)\nif(total_users, 0, \"==\")\n_status = 400\naddVar(error_msg, \"No user IDs provided\")\naddResult(error_msg)\nelse()\naddVar(updated_count, 0)\naddVar(concurrent_tasks, [])\naddVar(counter, 0)\nstartLoop(counter, 0, total_users)\nitemFromList(user_list, counter, current_user_id)\ntask_id = go updateUserRecord(current_user_id)\nvariableToList(task_id, temp_list)\nif(counter, 0, \"==\")\naddVar(concurrent_tasks, temp_list)\nelse()\ngetListLen(concurrent_tasks, current_len)\nitemFromList(temp_list, 0, new_task)\nAddVariableToJSON(current_len, new_task, task_dict)\nvariableFromJSON(task_dict, current_len, retrieved_task)\nvariableToList(retrieved_task, single_task)\naddVar(concurrent_tasks, single_task)\nend()\nendLoop()\ngetListLen(concurrent_tasks, task_count)\naddVar(results_collected, 0)\nstartLoop(results_collected, 0, task_count)\nitemFromList(concurrent_tasks, results_collected, current_task)\nupdate_result = gather(current_task, 5000)\nif(update_result, \"success\", \"==\")\naddVar(updated_count, updated_count + 1)\nend()\nendLoop()\naddVar(success_rate, updated_count / total_users * 100)\nif(success_rate, 80.0, \">=\")\n_status = 200\naddVar(status_msg, \"Bulk update completed successfully\")\nelse()\n_status = 206\naddVar(status_msg, \"Partial update completed with some failures\")\nend()\naddResult(updated_count)\naddResult(total_users)\naddResult(success_rate)\naddResult(status_msg)\nend()\n\nfunction updateUserRecord(user_id)\n{\naddVar(table_name, \"users\")\naddVar(update_fields, [\"last_updated\", \"status\"])\ngetDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", current_time)\naddVar(field_values, [current_time, \"active\"])\naddVar(selector, \"id = \" + user_id)\normAccessUpdate(update_fields, field_values, table_name, selector, update_status)\nif(update_status, \"error\", \"!=\")\nreturn(\"success\")\nelse()\nreturn(\"failed\")\nend()\n}", + "test_inputs": { + "user_ids": [ + "123", + "456", + "789" + ] + }, + "test_list": [ + "re.match(r'\\d+', str(updated_count))", + "re.match(r'(200|206|400)', str(_status))", + "re.match(r'\\d+\\.\\d+', str(success_rate))" + ], + "_cell": [ + "gather", + "getQueryParamList", + "ormAccessUpdate" + ], + "_quality": { + "fidelity": 1.0, + "bonus_ratio": 0.457, + "test_quality": 1.0, + "richness": 1.0, + "quality": 1.437, + "detected": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "addVar", + "else", + "end", + "endLoop", + "function", + "gather", + "getDateTime", + "getListLen", + "getQueryParamList", + "if_mode1", + "itemFromList", + "ormAccessUpdate", + "return", + "startLoop", + "variableFromJSON" + ], + "cell": [ + "gather", + "getQueryParamList", + "ormAccessUpdate" + ], + "extra": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "addVar", + "else", + "end", + "endLoop", + "function", + "getDateTime", + "getListLen", + "if_mode1", + "itemFromList", + "return", + "startLoop", + "variableFromJSON" + ] + } + }, + { + "task_id": 3, + "text": "Escribe una función AVAP que procese una lista de eventos con timestamps, calcule métricas temporales y envíe un reporte POST a una API externa. La función debe: 1) Recibir una lista de eventos con fechas en formato ISO, 2) Convertir las fechas a timestamps Unix, 3) Calcular la duración total en días, 4) Enviar los resultados via POST a una API de métricas con timeout de 5 segundos, y 5) Retornar el número total de eventos procesados.", + "code": "addParam(\"eventos\", lista_eventos)\naddParam(\"api_url\", url_destino)\naddParam(\"formato_fecha\", formato)\ngetListLen(lista_eventos, total_eventos)\nif(total_eventos, 0, \">\")\n addVar(contador, 0)\n addVar(timestamp_minimo, 9999999999)\n addVar(timestamp_maximo, 0)\n startLoop(i, 0, total_eventos)\n itemFromList(lista_eventos, i, evento_actual)\n variableFromJSON(evento_actual, \"fecha\", fecha_str)\n getTimeStamp(fecha_str, formato, 0, timestamp_unix)\n if(timestamp_unix, timestamp_minimo, \"<\")\n addVar(timestamp_minimo, timestamp_unix)\n end()\n if(timestamp_unix, timestamp_maximo, \">\")\n addVar(timestamp_maximo, timestamp_unix)\n end()\n addVar(contador, contador + 1)\n endLoop()\n duracion_segundos = timestamp_maximo - timestamp_minimo\n duracion_dias = duracion_segundos / 86400\n addVar(payload, {})\n AddVariableToJSON(\"total_eventos\", contador, payload)\n AddVariableToJSON(\"duracion_dias\", duracion_dias, payload)\n AddVariableToJSON(\"timestamp_inicio\", timestamp_minimo, payload)\n AddVariableToJSON(\"timestamp_fin\", timestamp_maximo, payload)\n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", fecha_reporte)\n AddVariableToJSON(\"fecha_reporte\", fecha_reporte, payload)\n headers = {\"Content-Type\": \"application/json\", \"User-Agent\": \"AVAP-Metrics/1.0\"}\n RequestPost(url_destino, \"\", headers, payload, respuesta_api, 5000)\n if(None, None, `respuesta_api is not None`)\n variableFromJSON(respuesta_api, \"status\", status_respuesta)\n if(status_respuesta, \"success\", \"==\")\n addVar(_status, 200)\n else()\n addVar(_status, 500)\n end()\n else()\n addVar(_status, 503)\n end()\n addResult(contador)\n addResult(duracion_dias)\nelse()\n addVar(_status, 400)\n addVar(mensaje_error, \"Lista de eventos vacia\")\n addResult(mensaje_error)\nend()", + "test_inputs": { + "eventos": "[{\"fecha\": \"2024-01-15 10:30:00\"}, {\"fecha\": \"2024-01-18 14:45:00\"}]", + "api_url": "https://metrics.api.com/report", + "formato_fecha": "%Y-%m-%d %H:%M:%S" + }, + "test_list": [ + "re.match(r'^[0-9]+$', str(contador))", + "re.match(r'^[0-9]+(\\.[0-9]+)?$', str(duracion_dias))", + "re.match(r'^(200|400|500|503)$', str(_status))" + ], + "_cell": [ + "RequestPost", + "getListLen", + "getTimeStamp" + ], + "_quality": { + "fidelity": 1.0, + "bonus_ratio": 0.371, + "test_quality": 1.0, + "richness": 1.0, + "quality": 1.411, + "detected": [ + "AddVariableToJSON", + "RequestPost", + "_status", + "addParam", + "addResult", + "addVar", + "else", + "end", + "endLoop", + "getDateTime", + "getListLen", + "getTimeStamp", + "if_mode2", + "itemFromList", + "startLoop", + "variableFromJSON" + ], + "cell": [ + "RequestPost", + "getListLen", + "getTimeStamp" + ], + "extra": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "addVar", + "else", + "end", + "endLoop", + "getDateTime", + "if_mode2", + "itemFromList", + "startLoop", + "variableFromJSON" + ] + } + }, + { + "task_id": 4, + "text": "Crear un endpoint que genere un reporte de actividad con timestamp actual. El endpoint debe validar un parámetro 'nivel_reporte', usar condiciones if/else para categorizar el reporte, aplicar operaciones matemáticas y devolver un JSON con información temporal detallada.", + "code": "registerEndpoint(\"/reporte-actividad\", \"GET\", [], \"application/json\", \"generarReporte\", \"mainHandler\")\nfunction generarReporte() {\n addParam(\"nivel_reporte\", nivel)\n addVar(_status, 200)\n if(nivel, None, \"==\")\n addVar(_status, 400)\n addVar(error_msg, \"Parametro nivel_reporte requerido\")\n addResult(error_msg)\n return()\n else()\n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", timestamp_actual)\n addVar(contador_base, 10)\n if(nivel, \"alto\", \"==\")\n addVar(multiplicador, 5)\n addVar(categoria, \"Reporte de Alto Nivel\")\n else()\n if(nivel, \"medio\", \"==\")\n addVar(multiplicador, 3)\n addVar(categoria, \"Reporte de Nivel Medio\")\n else()\n addVar(multiplicador, 1)\n addVar(categoria, \"Reporte Basico\")\n end()\n end()\n actividad_calculada = contador_base * multiplicador\n getTimeStamp(timestamp_actual, \"%Y-%m-%d %H:%M:%S\", 3600, epoch_futuro)\n addVar(resultado_final, {})\n AddVariableToJSON(\"categoria\", categoria, resultado_final)\n AddVariableToJSON(\"timestamp\", timestamp_actual, resultado_final)\n AddVariableToJSON(\"actividad_total\", actividad_calculada, resultado_final)\n AddVariableToJSON(\"epoch_futuro\", epoch_futuro, resultado_final)\n addResult(resultado_final)\n end()\n return()\n}", + "test_inputs": { + "nivel_reporte": "alto" + }, + "test_list": [ + "re.match(r'Reporte de Alto Nivel', resultado_final)", + "re.match(r'\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}', timestamp_actual)", + "re.match(r'50', str(actividad_calculada))" + ], + "_cell": [ + "addVar", + "end", + "getDateTime" + ], + "_quality": { + "fidelity": 1.0, + "bonus_ratio": 0.257, + "test_quality": 1.0, + "richness": 1.0, + "quality": 1.377, + "detected": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "addVar", + "else", + "end", + "function", + "getDateTime", + "getTimeStamp", + "if_mode1", + "return" + ], + "cell": [ + "addVar", + "end", + "getDateTime" + ], + "extra": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "else", + "function", + "getTimeStamp", + "if_mode1", + "return" + ] + } + }, + { + "task_id": 5, + "text": "Crear un microservicio que procese múltiples solicitudes de validación de usuarios de forma concurrente. El servicio debe recibir una lista de IDs de usuario, validar cada uno usando una API externa de forma asíncrona, y retornar un reporte consolidado con los resultados. Si alguna validación falla, debe manejarse con bloques de control apropiados.", + "code": "registerEndpoint(\"/validate-users\", \"POST\", [], \"application/json\", mainHandler, None)\nfunction mainHandler()\n{\n addParam(\"user_ids\", user_list)\n if(user_list, None, \"==\")\n _status = 400\n addVar(error_msg, \"Lista de usuarios requerida\")\n addResult(error_msg)\n return()\n end()\n \n getListLen(user_list, total_users)\n addVar(validated_users, [])\n addVar(failed_users, [])\n addVar(validation_tasks, [])\n \n startLoop(i, 0, total_users)\n itemFromList(user_list, i, current_user)\n task_id = go validateUser(current_user)\n variableToList(task_id, temp_task)\n if(validation_tasks, [], \"==\")\n addVar(validation_tasks, temp_task)\n else()\n AddVariableToJSON(\"task\", task_id, task_obj)\n variableToList(task_obj, new_task)\n validation_tasks = validation_tasks + new_task\n end()\n endLoop()\n \n getListLen(validation_tasks, total_tasks)\n startLoop(j, 0, total_tasks)\n itemFromList(validation_tasks, j, task)\n result = gather(task, 5000)\n if(result, None, \"!=\")\n variableFromJSON(result, \"status\", status_code)\n variableFromJSON(result, \"user_id\", validated_id)\n if(status_code, \"valid\", \"==\")\n AddVariableToJSON(\"user_id\", validated_id, valid_user)\n AddVariableToJSON(\"timestamp\", \"2024-01-01 00:00:00\", valid_user)\n variableToList(valid_user, temp_valid)\n validated_users = validated_users + temp_valid\n else()\n AddVariableToJSON(\"user_id\", validated_id, failed_user)\n AddVariableToJSON(\"reason\", \"validation_failed\", failed_user)\n variableToList(failed_user, temp_failed)\n failed_users = failed_users + temp_failed\n end()\n else()\n AddVariableToJSON(\"user_id\", \"unknown\", timeout_user)\n AddVariableToJSON(\"reason\", \"timeout\", timeout_user)\n variableToList(timeout_user, temp_timeout)\n failed_users = failed_users + temp_timeout\n end()\n endLoop()\n \n AddVariableToJSON(\"validated\", validated_users, final_result)\n AddVariableToJSON(\"failed\", failed_users, final_result)\n getListLen(validated_users, valid_count)\n getListLen(failed_users, failed_count)\n AddVariableToJSON(\"summary\", {\"valid\": valid_count, \"failed\": failed_count}, final_result)\n \n _status = 200\n addResult(final_result)\n return()\n}\n\nfunction validateUser(user_id)\n{\n try()\n url = \"https://api.validation.com/users/\" + str(user_id)\n headers = {\"Authorization\": \"Bearer token123\"}\n RequestGet(url, {}, headers, api_response, 3000)\n if(api_response, None, \"!=\")\n variableFromJSON(api_response, \"valid\", is_valid)\n if(is_valid, True, \"==\")\n result = {\"status\": \"valid\", \"user_id\": user_id}\n else()\n result = {\"status\": \"invalid\", \"user_id\": user_id}\n end()\n else()\n result = {\"status\": \"api_error\", \"user_id\": user_id}\n end()\n return(result)\n exception(error)\n error_result = {\"status\": \"exception\", \"user_id\": user_id, \"error\": error}\n return(error_result)\n end()\n}", + "test_inputs": { + "user_ids": [ + "123", + "456", + "789" + ] + }, + "test_list": [ + "re.match(r'.*validated.*', str(final_result))", + "re.match(r'.*failed.*', str(final_result))", + "re.match(r'.*summary.*', str(final_result))" + ], + "_cell": [ + "addResult", + "end", + "gather" + ], + "_quality": { + "fidelity": 1.0, + "bonus_ratio": 0.429, + "test_quality": 1.0, + "richness": 1.0, + "quality": 1.429, + "detected": [ + "AddVariableToJSON", + "RequestGet", + "_status", + "addParam", + "addResult", + "addVar", + "else", + "end", + "endLoop", + "function", + "gather", + "getListLen", + "if_mode1", + "itemFromList", + "return", + "startLoop", + "try", + "variableFromJSON" + ], + "cell": [ + "addResult", + "end", + "gather" + ], + "extra": [ + "AddVariableToJSON", + "RequestGet", + "_status", + "addParam", + "addVar", + "else", + "endLoop", + "function", + "getListLen", + "if_mode1", + "itemFromList", + "return", + "startLoop", + "try", + "variableFromJSON" + ] + } + }, + { + "task_id": 6, + "text": "Crear un endpoint que procese un token JWT simulado (JSON), extraiga su timestamp de expiración, lo convierta a fecha legible, y genere un hash MD5 de la información del usuario para logging de seguridad.", + "code": "registerEndpoint(\"/api/auth/validate\", \"POST\", [], \"\", mainHandler, None)\n\nfunction mainHandler()\n{\n addParam(\"token_data\", raw_token)\n addParam(\"user_context\", context_info)\n \n if(raw_token, None, \"==\")\n _status = 400\n addVar(error_msg, \"Token data required\")\n addResult(error_msg)\n return()\n end()\n \n variableFromJSON(raw_token, \"exp\", token_expiry)\n variableFromJSON(raw_token, \"user_id\", user_id)\n variableFromJSON(raw_token, \"email\", user_email)\n \n if(token_expiry, None, \"==\")\n _status = 422\n addVar(error_msg, \"Invalid token format - missing expiry\")\n addResult(error_msg)\n return()\n end()\n \n stampToDatetime(token_expiry, \"%Y-%m-%d %H:%M:%S\", 0, readable_expiry)\n \n addVar(user_info_raw, \"\")\n replace(user_email, \"@\", \"_at_\", sanitized_email)\n addVar(user_info_raw, user_id)\n addVar(temp_concat, user_info_raw)\n replace(temp_concat, \"\", sanitized_email, user_info_combined)\n \n encodeMD5(user_info_combined, security_hash)\n \n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", current_time)\n \n if(None, None, `token_expiry < 1735689600`)\n _status = 401\n addVar(validation_result, \"expired\")\n else()\n _status = 200\n addVar(validation_result, \"valid\")\n end()\n \n addVar(log_entry, \"\")\n AddVariableToJSON(\"timestamp\", current_time, log_entry)\n AddVariableToJSON(\"user_hash\", security_hash, log_entry)\n AddVariableToJSON(\"expiry_readable\", readable_expiry, log_entry)\n AddVariableToJSON(\"status\", validation_result, log_entry)\n AddVariableToJSON(\"context\", context_info, log_entry)\n \n addResult(log_entry)\n addResult(validation_result)\n addResult(readable_expiry)\n return()\n}", + "test_inputs": { + "token_data": "{\"exp\": 1735689600, \"user_id\": \"usr_12345\", \"email\": \"test@example.com\"}", + "user_context": "mobile_app" + }, + "test_list": [ + "re.match(r'\\{.*\"timestamp\".*\"user_hash\".*\"expiry_readable\".*\\}', log_entry)", + "re.match(r'[a-f0-9]{32}', security_hash)", + "re.match(r'\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}', readable_expiry)" + ], + "_cell": [ + "encodeMD5", + "stampToDatetime", + "variableFromJSON" + ], + "_quality": { + "fidelity": 1.0, + "bonus_ratio": 0.343, + "test_quality": 1.0, + "richness": 1.0, + "quality": 1.403, + "detected": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "addVar", + "else", + "encodeMD5", + "end", + "function", + "getDateTime", + "if_mode2", + "replace", + "return", + "stampToDatetime", + "variableFromJSON" + ], + "cell": [ + "encodeMD5", + "stampToDatetime", + "variableFromJSON" + ], + "extra": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "addVar", + "else", + "end", + "function", + "getDateTime", + "if_mode2", + "replace", + "return" + ] + } + }, + { + "task_id": 7, + "text": "Crear un endpoint que actualice el estado de un pedido y devuelva el resultado con código HTTP personalizado. El endpoint debe: 1) Capturar el ID del pedido y nuevo estado desde parámetros, 2) Validar que el estado sea válido ('pendiente', 'procesando', 'completado'), 3) Actualizar el registro en la base de datos usando ORM, 4) Establecer código de respuesta HTTP según el resultado, 5) Devolver el pedido actualizado o mensaje de error.", + "code": "addParam(\"pedido_id\", pedido_id)\naddParam(\"nuevo_estado\", nuevo_estado)\nif(pedido_id, None, \"==\")\n_status = 400\naddVar(mensaje, \"ID de pedido requerido\")\naddResult(mensaje)\nelse()\nif(nuevo_estado, None, \"==\")\n_status = 400\naddVar(mensaje, \"Estado requerido\")\naddResult(mensaje)\nelse()\nvariableToList(nuevo_estado, estados_validos)\naddVar(temp_estado, \"pendiente\")\nAddVariableToJSON(\"0\", temp_estado, estados_json)\naddVar(temp_estado, \"procesando\")\nAddVariableToJSON(\"1\", temp_estado, estados_json)\naddVar(temp_estado, \"completado\")\nAddVariableToJSON(\"2\", temp_estado, estados_json)\nif(None, None, `nuevo_estado not in ['pendiente', 'procesando', 'completado']`)\n_status = 422\naddVar(mensaje, \"Estado no válido\")\naddResult(mensaje)\nelse()\ngetDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", fecha_actualizacion)\nvariableToList(\"estado\", campos_update)\nvariableToList(nuevo_estado, valores_update)\nAddVariableToJSON(\"fecha_actualizacion\", fecha_actualizacion, valores_json)\naddVar(selector_where, \"id = \" + pedido_id)\normAccessUpdate(campos_update, valores_update, \"pedidos\", selector_where, resultado_update)\nif(resultado_update, None, \"==\")\n_status = 404\naddVar(mensaje, \"Pedido no encontrado\")\naddResult(mensaje)\nelse()\n_status = 200\normAccessSelect(\"*\", \"pedidos\", selector_where, pedido_actualizado)\naddResult(pedido_actualizado)\nend()\nend()\nend()\nend()", + "test_inputs": { + "pedido_id": "123", + "nuevo_estado": "procesando" + }, + "test_list": [ + "re.match(r'procesando', nuevo_estado)", + "re.match(r'200', str(_status))", + "re.match(r'pedido_actualizado', 'pedido_actualizado')" + ], + "_cell": [ + "_status", + "addResult", + "ormAccessUpdate" + ], + "_quality": { + "fidelity": 1.0, + "bonus_ratio": 0.229, + "test_quality": 1.0, + "richness": 1.0, + "quality": 1.369, + "detected": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "addVar", + "else", + "end", + "getDateTime", + "if_mode2", + "ormAccessSelect", + "ormAccessUpdate" + ], + "cell": [ + "_status", + "addResult", + "ormAccessUpdate" + ], + "extra": [ + "AddVariableToJSON", + "addParam", + "addVar", + "else", + "end", + "getDateTime", + "if_mode2", + "ormAccessSelect" + ] + } + }, + { + "task_id": 8, + "text": "Crear un endpoint que genere un reporte de logs de eventos del sistema con timestamps, donde cada evento contenga la fecha actual más un offset incremental de días. El sistema debe iterar por una lista de tipos de eventos y crear un JSON con timestamps formateados para cada uno.", + "code": "registerEndpoint(\"/api/system/logs\", \"GET\", [], \"application/json\", generateLogReport, mainHandler)\n\nfunction generateLogReport()\n{\n addParam(\"days_back\", days_param)\n if(days_param, None, \"==\")\n addVar(days_back, 7)\n else()\n days_back = int(days_param)\n end()\n \n event_types = [\"login\", \"logout\", \"error\", \"warning\", \"info\"]\n getListLen(event_types, total_events)\n \n log_entries = {}\n counter = 0\n \n startLoop(i, 0, total_events)\n itemFromList(event_types, i, current_event)\n \n time_offset = counter * 86400\n getDateTime(\"%Y-%m-%d %H:%M:%S\", time_offset, \"UTC\", event_timestamp)\n \n entry_key = current_event + \"_\" + str(counter)\n AddVariableToJSON(\"event_type\", current_event, temp_entry)\n AddVariableToJSON(\"timestamp\", event_timestamp, temp_entry)\n AddVariableToJSON(\"severity\", getSeverityLevel(current_event), temp_entry)\n \n AddVariableToJSON(entry_key, temp_entry, log_entries)\n counter = counter + 1\n endLoop()\n \n AddVariableToJSON(\"total_entries\", total_events, log_entries)\n AddVariableToJSON(\"generated_at\", getCurrentTimestamp(), log_entries)\n \n _status = 200\n addResult(log_entries)\n return(log_entries)\n}\n\nfunction getSeverityLevel(event_type)\n{\n if(event_type, \"error\", \"==\")\n return(\"HIGH\")\n else()\n if(event_type, \"warning\", \"==\")\n return(\"MEDIUM\")\n else()\n return(\"LOW\")\n end()\n end()\n}\n\nfunction getCurrentTimestamp()\n{\n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", current_time)\n return(current_time)\n}", + "test_inputs": { + "days_back": "5" + }, + "test_list": [ + "re.match(r'\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}', log_entries)", + "re.match(r'login_\\d+', str(log_entries))", + "re.match(r'\"total_entries\":\\s*5', str(log_entries))" + ], + "_cell": [ + "getDateTime", + "return", + "startLoop" + ], + "_quality": { + "fidelity": 1.0, + "bonus_ratio": 0.343, + "test_quality": 1.0, + "richness": 1.0, + "quality": 1.403, + "detected": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "addVar", + "else", + "end", + "endLoop", + "function", + "getDateTime", + "getListLen", + "if_mode1", + "itemFromList", + "return", + "startLoop" + ], + "cell": [ + "getDateTime", + "return", + "startLoop" + ], + "extra": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "addVar", + "else", + "end", + "endLoop", + "function", + "getListLen", + "if_mode1", + "itemFromList" + ] + } + }, + { + "task_id": 9, + "text": "Crear un microservicio que valide un email de entrada, sanitice caracteres especiales del dominio, y retorne información de validación con diferentes códigos de respuesta según el resultado.", + "code": "addParam(\"email\", userEmail)\naddParam(\"domain_filter\", filterPattern)\naddResult(validationResult)\nvalidationResult = {}\nif(userEmail, None, \"!=\")\n getRegex(userEmail, \"^[\\\\w\\\\.-]+@[\\\\w\\\\.-]+\\\\.[a-zA-Z]{2,}$\", emailMatch)\n if(emailMatch, None, \"!=\")\n variableFromJSON({\"email\": userEmail}, \"email\", extractedEmail)\n getRegex(extractedEmail, \"@(.+)$\", domainPart)\n if(domainPart, None, \"!=\")\n if(filterPattern, None, \"==\")\n filterPattern = \"[^a-zA-Z0-9.-]\"\n else()\n noop = 1\n end()\n replace(domainPart, filterPattern, \"\", sanitizedDomain)\n AddVariableToJSON(\"original_domain\", domainPart, validationResult)\n AddVariableToJSON(\"sanitized_domain\", sanitizedDomain, validationResult)\n AddVariableToJSON(\"is_valid\", \"true\", validationResult)\n AddVariableToJSON(\"status\", \"success\", validationResult)\n _status = 200\n else()\n AddVariableToJSON(\"error\", \"invalid_domain_format\", validationResult)\n AddVariableToJSON(\"is_valid\", \"false\", validationResult)\n AddVariableToJSON(\"status\", \"error\", validationResult)\n _status = 400\n end()\n else()\n AddVariableToJSON(\"error\", \"invalid_email_format\", validationResult)\n AddVariableToJSON(\"is_valid\", \"false\", validationResult)\n AddVariableToJSON(\"status\", \"error\", validationResult)\n _status = 400\n end()\nelse()\n AddVariableToJSON(\"error\", \"email_parameter_missing\", validationResult)\n AddVariableToJSON(\"is_valid\", \"false\", validationResult)\n AddVariableToJSON(\"status\", \"error\", validationResult)\n _status = 422\nend()", + "test_inputs": { + "email": "test.user@example-site.com", + "domain_filter": "[^a-zA-Z0-9.-]" + }, + "test_list": [ + "re.match(r'\\{.*\"original_domain\".*\\}', validationResult)", + "re.match(r'\\{.*\"sanitized_domain\".*\\}', validationResult)", + "re.match(r'\\{.*\"is_valid\".*\"true\".*\\}', validationResult)" + ], + "_cell": [ + "addResult", + "else", + "replace" + ], + "_quality": { + "fidelity": 1.0, + "bonus_ratio": 0.171, + "test_quality": 1.0, + "richness": 1.0, + "quality": 1.351, + "detected": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "else", + "end", + "if_mode1", + "replace", + "variableFromJSON" + ], + "cell": [ + "addResult", + "else", + "replace" + ], + "extra": [ + "AddVariableToJSON", + "_status", + "addParam", + "end", + "if_mode1", + "variableFromJSON" + ] + } + }, + { + "task_id": 10, + "text": "Desarrolla un microservicio AVAP que consulte una API externa para obtener datos meteorológicos de múltiples ciudades, valide y procese las respuestas, luego almacene los resultados válidos en una base de datos. El servicio debe manejar errores de red, filtrar datos por temperatura mínima, y devolver estadísticas de las ciudades procesadas.", + "code": "addParam(\"cities\", cities_param)\naddParam(\"min_temp\", min_temp_param)\naddParam(\"api_key\", api_key_param)\n\nif(cities_param, None, \"==\")\n addVar(_status, 400)\n addResult(\"error: cities parameter is required\")\n return()\nend()\n\nif(api_key_param, None, \"==\")\n addVar(_status, 401)\n addResult(\"error: api_key is required\")\n return()\nend()\n\nif(min_temp_param, None, \"==\")\n addVar(min_temp_param, 0)\nend()\n\nvariableToList(cities_param, cities_list)\ngetListLen(cities_list, total_cities)\n\nif(total_cities, 0, \"==\")\n addVar(_status, 400)\n addResult(\"error: no cities provided\")\n return()\nend()\n\ndb_connector = avapConnector(\"db-uuid-12345\")\normCheckTable(\"weather_data\", table_exists)\n\nif(table_exists, False, \"==\")\n fields = [\"city\", \"temperature\", \"humidity\", \"timestamp\"]\n types = [\"TEXT\", \"REAL\", \"REAL\", \"INTEGER\"]\n ormCreateTable(fields, types, \"weather_data\", create_result)\nend()\n\nvariableToList(\"\", processed_cities)\nvariableToList(\"\", valid_temperatures)\naddVar(total_processed, 0)\naddVar(total_valid, 0)\n\nstartLoop(i, 0, total_cities)\n itemFromList(cities_list, i, current_city)\n \n api_url = \"https://api.weather.com/v1/current?city=\" + current_city + \"&key=\" + api_key_param\n headers = {\"Accept\": \"application/json\"}\n \n try()\n RequestGet(api_url, \"\", headers, weather_response, 5000)\n \n if(weather_response, None, \"!=\")\n variableFromJSON(weather_response, \"temperature\", temp_value)\n variableFromJSON(weather_response, \"humidity\", humidity_value)\n \n if(temp_value, None, \"!=\")\n if(temp_value, min_temp_param, \">=\")\n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", current_time)\n getTimeStamp(current_time, \"%Y-%m-%d %H:%M:%S\", 0, timestamp)\n \n insert_data = {\n \"city\": current_city,\n \"temperature\": temp_value,\n \"humidity\": humidity_value,\n \"timestamp\": timestamp\n }\n \n ormAccessInsert(insert_data, \"weather_data\", insert_result)\n \n variableToList(current_city, temp_city)\n processed_cities = processed_cities + temp_city\n \n variableToList(temp_value, temp_temp)\n valid_temperatures = valid_temperatures + temp_temp\n \n addVar(total_valid, total_valid + 1)\n end()\n addVar(total_processed, total_processed + 1)\n end()\n end()\n exception(api_error)\n addVar(error_msg, \"API error for city: \" + current_city)\n end()\nendLoop()\n\ngetListLen(processed_cities, cities_count)\ngetListLen(valid_temperatures, temps_count)\n\nif(temps_count, 0, \">\")\n addVar(sum_temp, 0)\n startLoop(j, 0, temps_count)\n itemFromList(valid_temperatures, j, temp_item)\n addVar(sum_temp, sum_temp + temp_item)\n endLoop()\n addVar(avg_temp, sum_temp / temps_count)\nelse()\n addVar(avg_temp, 0)\nend()\n\normAccessSelect(\"*\", \"weather_data\", \"temperature >= \" + str(min_temp_param), recent_data)\ngetListLen(recent_data, db_count)\n\nresponse_data = {\n \"cities_requested\": total_cities,\n \"cities_processed\": total_processed,\n \"cities_valid\": total_valid,\n \"average_temperature\": avg_temp,\n \"database_records\": db_count,\n \"processed_cities\": processed_cities\n}\n\naddResult(response_data)\naddVar(_status, 200)", + "test_inputs": { + "cities": "London,Paris,Madrid", + "min_temp": "10", + "api_key": "test-api-key-123" + }, + "test_list": [ + "re.match(r'.*RequestGet.*weather.*', code)", + "re.match(r'.*getListLen.*cities_list.*', code)", + "re.match(r'.*ormAccessSelect.*weather_data.*', code)" + ], + "_cell": [ + "RequestGet", + "getListLen", + "ormAccessSelect" + ], + "_quality": { + "fidelity": 1.0, + "bonus_ratio": 0.514, + "test_quality": 1.0, + "richness": 1.0, + "quality": 1.454, + "detected": [ + "RequestGet", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "end", + "endLoop", + "getDateTime", + "getListLen", + "getTimeStamp", + "if_mode1", + "itemFromList", + "ormAccessInsert", + "ormAccessSelect", + "ormCheckTable", + "return", + "startLoop", + "try", + "variableFromJSON" + ], + "cell": [ + "RequestGet", + "getListLen", + "ormAccessSelect" + ], + "extra": [ + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "end", + "endLoop", + "getDateTime", + "getTimeStamp", + "if_mode1", + "itemFromList", + "ormAccessInsert", + "ormCheckTable", + "return", + "startLoop", + "try", + "variableFromJSON" + ] + } + } +] \ No newline at end of file diff --git a/output/candidate_E_reward_10_coverage_stats.json b/output/candidate_E_reward_10_coverage_stats.json index 2960b60..427aeaf 100644 --- a/output/candidate_E_reward_10_coverage_stats.json +++ b/output/candidate_E_reward_10_coverage_stats.json @@ -1,9 +1,31 @@ { "total_cells": 9139, - "filled_cells": 0, - "fill_rate": 0.0, - "distribution_entropy": 0.0, - "node_type_frequency": {}, + "filled_cells": 10, + "fill_rate": 0.0011, + "distribution_entropy": 4.28, + "node_type_frequency": { + "startLoop": 2, + "avapConnector": 1, + "getQueryParamList": 1, + "gather": 2, + "ormAccessUpdate": 2, + "getListLen": 2, + "RequestPost": 1, + "getTimeStamp": 1, + "getDateTime": 2, + "end": 2, + "addVar": 1, + "addResult": 3, + "encodeMD5": 1, + "variableFromJSON": 1, + "stampToDatetime": 1, + "_status": 1, + "return": 1, + "else": 1, + "replace": 1, + "RequestGet": 1, + "ormAccessSelect": 1 + }, "low_quality_cells": 0, - "empty_cells": 9139 + "empty_cells": 9129 } \ No newline at end of file diff --git a/output/mbpp_avap_v2_A.json b/output/mbpp_avap_v2_A.json new file mode 100644 index 0000000..ce82ddb --- /dev/null +++ b/output/mbpp_avap_v2_A.json @@ -0,0 +1,762 @@ +[ + { + "task_id": 1, + "text": "Desarrollar un servicio de procesamiento de archivos de logs que reciba múltiples URLs de logs, las descargue concurrentemente, procese los códigos de estado HTTP, y retorne estadísticas agrupadas. El servicio debe validar las URLs, manejar errores de descarga, filtrar entradas por rangos de fechas, y generar un reporte con códigos de estado más frecuentes.", + "code": "addParam(\"urls\", log_urls)\ngetQueryParamList(\"urls\", url_list)\ngetListLen(url_list, total_urls)\nif(total_urls, 0, \"==\")\n _status = 400\n addVar(error_msg, \"No URLs provided\")\n addResult(error_msg)\nelse()\n addVar(success_count, 0)\n addVar(error_count, 0)\n addVar(status_codes, \"{}\")\n addVar(processed_logs, \"[]\")\n \n startLoop(i, 0, total_urls)\n itemFromList(url_list, i, current_url)\n \n if(None, None, `\"http\" in current_url or \"https\" in current_url`)\n download_task = go fetch_log_data(current_url)\n log_content = gather(download_task, 5000)\n \n if(None, None, `log_content is not None`)\n parsed_result = process_log_entries(log_content)\n variableFromJSON(parsed_result, \"status_counts\", entry_counts)\n variableFromJSON(parsed_result, \"total_entries\", entry_total)\n \n getListLen(entry_counts, counts_len)\n startLoop(j, 0, counts_len)\n itemFromList(entry_counts, j, status_entry)\n variableFromJSON(status_entry, \"code\", status_code)\n variableFromJSON(status_entry, \"count\", status_count)\n \n AddVariableToJSON(status_code, status_count, status_codes)\n endLoop()\n \n success_count = success_count + 1\n else()\n error_count = error_count + 1\n end()\n else()\n error_count = error_count + 1\n end()\n endLoop()\n \n AddVariableToJSON(\"successful_downloads\", success_count, status_codes)\n AddVariableToJSON(\"failed_downloads\", error_count, status_codes)\n AddVariableToJSON(\"total_urls_processed\", total_urls, status_codes)\n \n if(success_count, 0, \">\")\n _status = 200\n addResult(status_codes)\n else()\n _status = 404\n addVar(error_msg, \"No logs could be processed\")\n addResult(error_msg)\n end()\nend()\n\nfunction fetch_log_data(url)\n{\n addVar(headers, \"{}\")\n AddVariableToJSON(\"User-Agent\", \"AVAP-LogProcessor/1.0\", headers)\n \n try()\n RequestGet(url, \"\", headers, response_data, 10000)\n return(response_data)\n exception(fetch_error)\n return(None)\n end()\n}\n\nfunction process_log_entries(raw_log_data)\n{\n replace(raw_log_data, \"\\n\", \" | \", cleaned_data)\n getRegex(cleaned_data, \"HTTP/[0-9\\.]+ ([0-9]{3})\", status_matches)\n \n addVar(status_200_count, 0)\n addVar(status_400_count, 0)\n addVar(status_500_count, 0)\n addVar(other_count, 0)\n \n variableToList(status_matches, matches_list)\n getListLen(matches_list, matches_total)\n \n startLoop(k, 0, matches_total)\n itemFromList(matches_list, k, status_code)\n \n if(status_code, \"200\", \"==\")\n status_200_count = status_200_count + 1\n else()\n if(None, None, `status_code >= \"400\" and status_code < \"500\"`)\n status_400_count = status_400_count + 1\n else()\n if(None, None, `status_code >= \"500\"`)\n status_500_count = status_500_count + 1\n else()\n other_count = other_count + 1\n end()\n end()\n end()\n endLoop()\n \n addVar(result, \"{}\")\n addVar(counts_array, \"[]\")\n \n addVar(entry_200, \"{}\")\n AddVariableToJSON(\"code\", \"200\", entry_200)\n AddVariableToJSON(\"count\", status_200_count, entry_200)\n \n addVar(entry_400, \"{}\")\n AddVariableToJSON(\"code\", \"4xx\", entry_400)\n AddVariableToJSON(\"count\", status_400_count, entry_400)\n \n addVar(entry_500, \"{}\")\n AddVariableToJSON(\"code\", \"5xx\", entry_500)\n AddVariableToJSON(\"count\", status_500_count, entry_500)\n \n total_entries = status_200_count + status_400_count + status_500_count + other_count\n \n AddVariableToJSON(\"status_counts\", counts_array, result)\n AddVariableToJSON(\"total_entries\", total_entries, result)\n \n return(result)\n}", + "test_inputs": { + "urls": [ + "http://example.com/log1.txt", + "https://api.test.com/logs/access.log" + ] + }, + "test_list": [ + "re.match(r'\\{.*successful_downloads.*\\}', status_codes)", + "re.match(r'[0-9]+', str(total_urls))", + "re.match(r'(200|404|400)', str(_status))" + ], + "_detected": [ + "AddVariableToJSON", + "RequestGet", + "_status", + "addParam", + "addResult", + "addVar", + "else", + "end", + "endLoop", + "function", + "gather", + "getListLen", + "getQueryParamList", + "if_mode2", + "itemFromList", + "replace", + "return", + "startLoop", + "try", + "variableFromJSON" + ], + "_reward": { + "ecs": 0.526, + "novelty": 1.0, + "test_quality": 1.0, + "reward": 0.763, + "detected": [ + "AddVariableToJSON", + "RequestGet", + "_status", + "addParam", + "addResult", + "addVar", + "else", + "end", + "endLoop", + "function", + "gather", + "getListLen", + "getQueryParamList", + "if_mode2", + "itemFromList", + "replace", + "return", + "startLoop", + "try", + "variableFromJSON" + ] + } + }, + { + "task_id": 2, + "text": "Desarrollar un microservicio de autenticación que reciba credenciales de usuario, valide el formato del email, genere un hash SHA256 de la contraseña, verifique las credenciales contra una base de datos, registre el intento en una tabla de auditoría, y si es exitoso, genere un token JWT usando un conector externo. El servicio debe manejar múltiples usuarios concurrentemente, registrar timestamps de los intentos, y retornar tanto el resultado de autenticación como estadísticas del proceso.", + "code": "addParam(\"email\", user_email)\naddParam(\"password\", user_password)\naddParam(\"client_id\", client_identifier)\n\nif(None, None, `user_email is None or user_password is None`)\n _status = 400\n addVar(error_message, \"Missing required fields\")\n addResult(error_message)\nelse()\n getRegex(user_email, \"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$\", email_valid)\n \n if(None, None, `email_valid is None`)\n _status = 422\n addVar(validation_error, \"Invalid email format\")\n addResult(validation_error)\n else()\n encodeSHA256(user_password, password_hash)\n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", current_timestamp)\n \n db_connector = avapConnector(\"db-auth-uuid-12345\")\n \n try()\n auth_task = go authenticate_user(user_email, password_hash, db_connector)\n jwt_task = go generate_jwt_token(user_email, client_identifier)\n \n auth_result = gather(auth_task, 3000)\n jwt_result = gather(jwt_task, 2000)\n \n variableFromJSON(auth_result, \"is_valid\", user_authenticated)\n variableFromJSON(auth_result, \"user_id\", authenticated_user_id)\n \n if(user_authenticated, \"true\", \"==\")\n variableFromJSON(jwt_result, \"token\", access_token)\n variableFromJSON(jwt_result, \"expires_at\", token_expiration)\n \n audit_data = log_authentication_attempt(user_email, \"SUCCESS\", current_timestamp, db_connector)\n \n addVar(response_data, \"{}\")\n AddVariableToJSON(\"status\", \"authenticated\", response_data)\n AddVariableToJSON(\"user_id\", authenticated_user_id, response_data)\n AddVariableToJSON(\"access_token\", access_token, response_data)\n AddVariableToJSON(\"expires_at\", token_expiration, response_data)\n AddVariableToJSON(\"timestamp\", current_timestamp, response_data)\n \n _status = 200\n addResult(response_data)\n else()\n audit_data = log_authentication_attempt(user_email, \"FAILED\", current_timestamp, db_connector)\n \n _status = 401\n addVar(auth_failed, \"Invalid credentials\")\n addResult(auth_failed)\n end()\n exception(auth_error)\n addVar(system_error, \"Authentication service unavailable\")\n _status = 503\n addResult(system_error)\n end()\n end()\nend()\n\nfunction authenticate_user(email, password_hash, connector)\n{\n ormAccessSelect(\"*\", \"users\", \"email = '\" + email + \"' AND password_hash = '\" + password_hash + \"'\", user_records)\n \n getListLen(user_records, records_count)\n \n addVar(auth_response, \"{}\")\n \n if(records_count, 0, \">\")\n itemFromList(user_records, 0, user_record)\n variableFromJSON(user_record, \"id\", user_id)\n variableFromJSON(user_record, \"status\", account_status)\n \n if(account_status, \"active\", \"==\")\n AddVariableToJSON(\"is_valid\", \"true\", auth_response)\n AddVariableToJSON(\"user_id\", user_id, auth_response)\n else()\n AddVariableToJSON(\"is_valid\", \"false\", auth_response)\n AddVariableToJSON(\"reason\", \"account_disabled\", auth_response)\n end()\n else()\n AddVariableToJSON(\"is_valid\", \"false\", auth_response)\n AddVariableToJSON(\"reason\", \"invalid_credentials\", auth_response)\n end()\n \n return(auth_response)\n}\n\nfunction generate_jwt_token(email, client_id)\n{\n jwt_connector = avapConnector(\"jwt-service-uuid-67890\")\n \n addVar(token_payload, \"{}\")\n AddVariableToJSON(\"email\", email, token_payload)\n AddVariableToJSON(\"client_id\", client_id, token_payload)\n AddVariableToJSON(\"iat\", \"1640995200\", token_payload)\n \n getTimeStamp(\"2024-12-31 23:59:59\", \"%Y-%m-%d %H:%M:%S\", 0, expiration_timestamp)\n AddVariableToJSON(\"exp\", expiration_timestamp, token_payload)\n \n token_response = jwt_connector.create_token(token_payload)\n \n return(token_response)\n}\n\nfunction log_authentication_attempt(email, status, timestamp, connector)\n{\n encodeMD5(email, email_hash)\n \n addVar(audit_record, \"{}\")\n AddVariableToJSON(\"email_hash\", email_hash, audit_record)\n AddVariableToJSON(\"attempt_status\", status, audit_record)\n AddVariableToJSON(\"timestamp\", timestamp, audit_record)\n AddVariableToJSON(\"ip_address\", \"127.0.0.1\", audit_record)\n \n ormAccessInsert(audit_record, \"auth_audit_log\", insert_result)\n \n return(insert_result)\n}", + "test_inputs": { + "email": "user@example.com", + "password": "securepass123", + "client_id": "web_app_001" + }, + "test_list": [ + "re.match(r'.*authenticated.*', str(response_data))", + "re.match(r'.*access_token.*', str(response_data))", + "re.match(r'.*user_id.*', str(response_data))" + ], + "_detected": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "encodeMD5", + "encodeSHA256", + "end", + "function", + "gather", + "getDateTime", + "getListLen", + "getTimeStamp", + "if_mode2", + "itemFromList", + "ormAccessInsert", + "ormAccessSelect", + "return", + "try", + "variableFromJSON" + ], + "_reward": { + "ecs": 0.579, + "novelty": 0.444, + "test_quality": 1.0, + "reward": 0.595, + "detected": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "encodeMD5", + "encodeSHA256", + "end", + "function", + "gather", + "getDateTime", + "getListLen", + "getTimeStamp", + "if_mode2", + "itemFromList", + "ormAccessInsert", + "ormAccessSelect", + "return", + "try", + "variableFromJSON" + ] + } + }, + { + "task_id": 3, + "text": "Desarrollar un microservicio de gestión de inventario que reciba datos de productos mediante POST, valide la estructura de la base de datos, actualice el stock de productos existentes, registre movimientos de inventario en una tabla de auditoría, genere códigos de barras aleatorios para productos nuevos, y sincronice los cambios con un sistema externo de terceros. El servicio debe manejar múltiples productos concurrentemente, validar límites de stock, registrar timestamps de las operaciones, y retornar un reporte detallado con el estado de cada operación.", + "code": "include \"config/database_settings.avap\"\nimport \"inventory_utils\"\n\naddParam(\"products\", product_data)\naddParam(\"warehouse_id\", warehouse)\naddParam(\"operation_type\", operation)\n\nif(None, None, `product_data is None or warehouse is None`)\n _status = 400\n addVar(error_msg, \"Missing required parameters\")\n addResult(error_msg)\nelse()\n db_connector = avapConnector(\"inventory-db-uuid-54321\")\n \n ormCheckTable(\"products\", table_exists)\n \n if(table_exists, \"true\", \"==\")\n try()\n variableFromJSON(product_data, \"items\", items_list)\n getListLen(items_list, total_items)\n \n addVar(processed_items, \"[]\")\n addVar(success_count, 0)\n addVar(error_count, 0)\n \n startLoop(i, 0, total_items)\n itemFromList(items_list, i, current_item)\n \n process_task = go process_inventory_item(current_item, warehouse, operation, db_connector)\n sync_task = go sync_with_external_system(current_item)\n \n item_result = gather(process_task, 4000)\n sync_result = gather(sync_task, 3000)\n \n variableFromJSON(item_result, \"status\", item_status)\n \n if(item_status, \"success\", \"==\")\n success_count = success_count + 1\n \n variableFromJSON(item_result, \"product_id\", product_id)\n variableFromJSON(item_result, \"new_stock\", updated_stock)\n \n addVar(processed_item, \"{}\")\n AddVariableToJSON(\"product_id\", product_id, processed_item)\n AddVariableToJSON(\"status\", \"updated\", processed_item)\n AddVariableToJSON(\"stock_level\", updated_stock, processed_item)\n \n if(None, None, `sync_result is not None`)\n variableFromJSON(sync_result, \"external_id\", ext_id)\n AddVariableToJSON(\"external_sync_id\", ext_id, processed_item)\n end()\n else()\n error_count = error_count + 1\n \n addVar(error_item, \"{}\")\n variableFromJSON(item_result, \"error\", error_detail)\n AddVariableToJSON(\"status\", \"error\", error_item)\n AddVariableToJSON(\"message\", error_detail, error_item)\n end()\n endLoop()\n \n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", operation_timestamp)\n \n addVar(final_response, \"{}\")\n AddVariableToJSON(\"operation_timestamp\", operation_timestamp, final_response)\n AddVariableToJSON(\"warehouse_id\", warehouse, final_response)\n AddVariableToJSON(\"total_processed\", total_items, final_response)\n AddVariableToJSON(\"successful_updates\", success_count, final_response)\n AddVariableToJSON(\"failed_updates\", error_count, final_response)\n AddVariableToJSON(\"processed_items\", processed_items, final_response)\n \n if(success_count, 0, \">\")\n _status = 200\n addResult(final_response)\n else()\n _status = 422\n addVar(process_error, \"No items could be processed\")\n addResult(process_error)\n end()\n exception(system_error)\n _status = 500\n addVar(exception_msg, \"Database operation failed\")\n addResult(exception_msg)\n end()\n else()\n _status = 503\n addVar(table_error, \"Products table not available\")\n addResult(table_error)\n end()\nend()\n\nfunction process_inventory_item(item, warehouse_id, op_type, connector)\n{\n variableFromJSON(item, \"sku\", product_sku)\n variableFromJSON(item, \"quantity\", quantity_change)\n \n ormAccessSelect(\"*\", \"products\", \"sku = '\" + product_sku + \"' AND warehouse_id = '\" + warehouse_id + \"'\", existing_products)\n \n getListLen(existing_products, product_count)\n \n addVar(result, \"{}\")\n \n if(product_count, 0, \">\")\n itemFromList(existing_products, 0, product_record)\n variableFromJSON(product_record, \"id\", product_id)\n variableFromJSON(product_record, \"current_stock\", current_stock)\n \n if(op_type, \"add\", \"==\")\n new_stock = current_stock + quantity_change\n else()\n new_stock = current_stock - quantity_change\n end()\n \n if(new_stock, 0, \">=\")\n addVar(update_data, \"{}\")\n AddVariableToJSON(\"current_stock\", new_stock, update_data)\n \n ormAccessUpdate(\"current_stock\", update_data, \"products\", \"id = \" + product_id, update_result)\n \n log_inventory_movement(product_id, op_type, quantity_change, warehouse_id, connector)\n \n AddVariableToJSON(\"status\", \"success\", result)\n AddVariableToJSON(\"product_id\", product_id, result)\n AddVariableToJSON(\"new_stock\", new_stock, result)\n else()\n AddVariableToJSON(\"status\", \"error\", result)\n AddVariableToJSON(\"error\", \"Insufficient stock\", result)\n end()\n else()\n randomString(\"[0-9]{12}\", 12, barcode)\n \n addVar(new_product, \"{}\")\n AddVariableToJSON(\"sku\", product_sku, new_product)\n AddVariableToJSON(\"warehouse_id\", warehouse_id, new_product)\n AddVariableToJSON(\"current_stock\", quantity_change, new_product)\n AddVariableToJSON(\"barcode\", barcode, new_product)\n \n ormAccessInsert(new_product, \"products\", insert_result)\n \n AddVariableToJSON(\"status\", \"success\", result)\n AddVariableToJSON(\"action\", \"created\", result)\n AddVariableToJSON(\"barcode\", barcode, result)\n end()\n \n return(result)\n}\n\nfunction sync_with_external_system(item)\n{\n external_connector = avapConnector(\"external-inventory-uuid-98765\")\n \n addVar(sync_payload, \"{}\")\n variableFromJSON(item, \"sku\", item_sku)\n AddVariableToJSON(\"sku\", item_sku, sync_payload)\n AddVariableToJSON(\"action\", \"inventory_update\", sync_payload)\n \n sync_response = external_connector.update_inventory(sync_payload)\n \n return(sync_response)\n}\n\nfunction log_inventory_movement(product_id, movement_type, quantity, warehouse_id, connector)\n{\n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", movement_timestamp)\n \n addVar(audit_record, \"{}\")\n AddVariableToJSON(\"product_id\", product_id, audit_record)\n AddVariableToJSON(\"movement_type\", movement_type, audit_record)\n AddVariableToJSON(\"quantity_changed\", quantity, audit_record)\n AddVariableToJSON(\"warehouse_id\", warehouse_id, audit_record)\n AddVariableToJSON(\"timestamp\", movement_timestamp, audit_record)\n \n ormAccessInsert(audit_record, \"inventory_movements\", audit_result)\n \n return(audit_result)\n}", + "test_inputs": { + "products": "{\"items\": [{\"sku\": \"TEST-001\", \"quantity\": 50}]}", + "warehouse_id": "WH-001", + "operation_type": "add" + }, + "test_list": [ + "re.match(r'.*operation_timestamp.*', str(response))", + "re.match(r'.*successful_updates.*', str(response))", + "re.match(r'.*warehouse_id.*WH-001.*', str(response))" + ], + "_detected": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "end", + "endLoop", + "function", + "gather", + "getDateTime", + "getListLen", + "if_mode2", + "import", + "itemFromList", + "ormAccessInsert", + "ormAccessSelect", + "ormAccessUpdate", + "ormCheckTable", + "randomString", + "return", + "startLoop", + "try", + "variableFromJSON" + ], + "_reward": { + "ecs": 0.658, + "novelty": 0.321, + "test_quality": 1.0, + "reward": 0.591, + "detected": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "end", + "endLoop", + "function", + "gather", + "getDateTime", + "getListLen", + "if_mode2", + "import", + "itemFromList", + "ormAccessInsert", + "ormAccessSelect", + "ormAccessUpdate", + "ormCheckTable", + "randomString", + "return", + "startLoop", + "try", + "variableFromJSON" + ] + } + }, + { + "task_id": 4, + "text": "Desarrollar un microservicio de procesamiento de pagos que reciba datos de transacciones mediante POST, valide los parámetros usando expresiones regulares, consulte el historial de transacciones del usuario mediante SQL directo, envíe notificaciones push a sistemas externos, convierta timestamps entre formatos, registre eventos en una tabla de auditoría, y procese múltiples pagos concurrentemente. El servicio debe manejar errores de conexión, generar códigos de autorización aleatorios, y retornar estadísticas detalladas del procesamiento.", + "code": "include \"config/payment_settings.avap\"\nimport \"validation_utils\"\n\naddParam(\"transaction_data\", tx_data)\naddParam(\"user_id\", user_identifier)\naddParam(\"batch_size\", batch_limit)\n\nif(None, None, `tx_data is None or user_identifier is None`)\n _status = 400\n addVar(error_response, \"Missing required transaction data\")\n addResult(error_response)\nelse()\n getRegex(user_identifier, \"^[0-9]{6,12}$\", valid_user_id)\n \n if(valid_user_id, None, \"!=\")\n payment_connector = avapConnector(\"payment-gateway-uuid-11111\")\n db_connector = avapConnector(\"payments-db-uuid-22222\")\n \n try()\n variableFromJSON(tx_data, \"transactions\", tx_list)\n getListLen(tx_list, total_transactions)\n \n addVar(processed_results, \"[]\")\n addVar(success_count, 0)\n addVar(failed_count, 0)\n \n ormDirect(\"SELECT COUNT(*) as user_tx_count FROM transactions WHERE user_id = %s AND created_at > DATE_SUB(NOW(), INTERVAL 24 HOUR)\" % user_identifier, daily_tx_check)\n \n variableFromJSON(daily_tx_check, \"user_tx_count\", daily_count)\n \n if(daily_count, 50, \"<\")\n startLoop(i, 0, total_transactions)\n itemFromList(tx_list, i, current_tx)\n \n payment_task = go process_payment_transaction(current_tx, user_identifier, payment_connector)\n notification_task = go send_payment_notification(current_tx, user_identifier)\n \n payment_result = gather(payment_task, 8000)\n notification_result = gather(notification_task, 3000)\n \n variableFromJSON(payment_result, \"status\", tx_status)\n \n if(tx_status, \"approved\", \"==\")\n success_count = success_count + 1\n \n variableFromJSON(payment_result, \"transaction_id\", tx_id)\n variableFromJSON(payment_result, \"timestamp\", tx_timestamp)\n \n stampToDatetime(tx_timestamp, \"%Y-%m-%d %H:%M:%S\", 0, formatted_time)\n \n addVar(success_record, \"{}\")\n AddVariableToJSON(\"transaction_id\", tx_id, success_record)\n AddVariableToJSON(\"status\", \"completed\", success_record)\n AddVariableToJSON(\"processed_at\", formatted_time, success_record)\n \n audit_task = go log_payment_audit(tx_id, \"SUCCESS\", user_identifier, db_connector)\n audit_result = gather(audit_task, 2000)\n else()\n failed_count = failed_count + 1\n \n addVar(failed_record, \"{}\")\n variableFromJSON(payment_result, \"error_code\", error_code)\n AddVariableToJSON(\"status\", \"failed\", failed_record)\n AddVariableToJSON(\"error_code\", error_code, failed_record)\n \n audit_task = go log_payment_audit(\"UNKNOWN\", \"FAILED\", user_identifier, db_connector)\n audit_result = gather(audit_task, 2000)\n end()\n endLoop()\n \n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", processing_timestamp)\n \n addVar(final_response, \"{}\")\n AddVariableToJSON(\"processing_timestamp\", processing_timestamp, final_response)\n AddVariableToJSON(\"user_id\", user_identifier, final_response)\n AddVariableToJSON(\"total_processed\", total_transactions, final_response)\n AddVariableToJSON(\"successful_payments\", success_count, final_response)\n AddVariableToJSON(\"failed_payments\", failed_count, final_response)\n \n if(success_count, 0, \">\")\n _status = 200\n addResult(final_response)\n else()\n _status = 422\n addVar(process_error, \"All payment transactions failed\")\n addResult(process_error)\n end()\n else()\n _status = 429\n addVar(limit_error, \"Daily transaction limit exceeded\")\n addResult(limit_error)\n end()\n exception(system_error)\n _status = 503\n addVar(exception_message, \"Payment processing service unavailable\")\n addResult(exception_message)\n end()\n else()\n _status = 422\n addVar(validation_error, \"Invalid user ID format\")\n addResult(validation_error)\n end()\nend()\n\nfunction process_payment_transaction(transaction, user_id, connector)\n{\n variableFromJSON(transaction, \"amount\", payment_amount)\n variableFromJSON(transaction, \"currency\", payment_currency)\n variableFromJSON(transaction, \"card_token\", card_token)\n \n randomString(\"[A-Z0-9]{16}\", 16, auth_code)\n \n addVar(payment_request, \"{}\")\n AddVariableToJSON(\"amount\", payment_amount, payment_request)\n AddVariableToJSON(\"currency\", payment_currency, payment_request)\n AddVariableToJSON(\"card_token\", card_token, payment_request)\n AddVariableToJSON(\"user_id\", user_id, payment_request)\n AddVariableToJSON(\"authorization_code\", auth_code, payment_request)\n \n payment_response = connector.process_payment(payment_request)\n \n return(payment_response)\n}\n\nfunction send_payment_notification(transaction, user_id)\n{\n addVar(notification_headers, \"{}\")\n AddVariableToJSON(\"Content-Type\", \"application/json\", notification_headers)\n AddVariableToJSON(\"Authorization\", \"Bearer notify-token-12345\", notification_headers)\n \n addVar(notification_body, \"{}\")\n AddVariableToJSON(\"user_id\", user_id, notification_body)\n AddVariableToJSON(\"event_type\", \"payment_processing\", notification_body)\n variableFromJSON(transaction, \"amount\", tx_amount)\n AddVariableToJSON(\"amount\", tx_amount, notification_body)\n \n RequestPost(\"https://notifications.example.com/push\", \"\", notification_headers, notification_body, notify_result, 5000)\n \n return(notify_result)\n}\n\nfunction log_payment_audit(transaction_id, status, user_id, connector)\n{\n getTimeStamp(\"2024-01-01 00:00:00\", \"%Y-%m-%d %H:%M:%S\", 0, base_timestamp)\n \n addVar(audit_data, \"{}\")\n AddVariableToJSON(\"transaction_id\", transaction_id, audit_data)\n AddVariableToJSON(\"status\", status, audit_data)\n AddVariableToJSON(\"user_id\", user_id, audit_data)\n AddVariableToJSON(\"audit_timestamp\", base_timestamp, audit_data)\n \n ormAccessInsert(audit_data, \"payment_audit_log\", insert_result)\n \n return(insert_result)\n}", + "test_inputs": { + "transaction_data": "{\"transactions\": [{\"amount\": 100.50, \"currency\": \"USD\", \"card_token\": \"card_abc123\"}]}", + "user_id": "123456789", + "batch_size": "10" + }, + "test_list": [ + "re.match(r'\\{.*\"processing_timestamp\".*\\}', final_response)", + "re.match(r'^[0-9]{6,12}$', user_identifier)", + "re.match(r'200|422|429', str(_status))" + ], + "_detected": [ + "AddVariableToJSON", + "RequestPost", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "end", + "endLoop", + "function", + "gather", + "getDateTime", + "getListLen", + "getTimeStamp", + "if_mode2", + "import", + "itemFromList", + "ormAccessInsert", + "ormDirect", + "randomString", + "return", + "stampToDatetime", + "startLoop", + "try", + "variableFromJSON" + ], + "_reward": { + "ecs": 0.684, + "novelty": 0.241, + "test_quality": 1.0, + "reward": 0.577, + "detected": [ + "AddVariableToJSON", + "RequestPost", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "end", + "endLoop", + "function", + "gather", + "getDateTime", + "getListLen", + "getTimeStamp", + "if_mode2", + "import", + "itemFromList", + "ormAccessInsert", + "ormDirect", + "randomString", + "return", + "stampToDatetime", + "startLoop", + "try", + "variableFromJSON" + ] + } + }, + { + "task_id": 5, + "text": "Desarrollar un microservicio de procesamiento de documentos que reciba múltiples archivos de texto, los descargue desde URLs externas, procese su contenido para extraer información específica mediante expresiones regulares, valide la integridad usando hashes MD5, sincronice los resultados con un sistema de terceros, y registre todas las operaciones en una tabla de auditoría. El servicio debe manejar errores de descarga, validar formatos de archivos, aplicar transformaciones de texto, y retornar un reporte detallado con estadísticas de procesamiento.", + "code": "include \"config/document_settings.avap\"\nimport \"text_processing_utils\"\n\ngetQueryParamList(\"doc_urls\", document_urls)\naddParam(\"format_type\", expected_format)\naddParam(\"validation_key\", client_key)\n\ngetListLen(document_urls, total_documents)\n\nif(total_documents, 0, \"==\")\n _status = 400\n addVar(error_msg, \"No document URLs provided\")\n addResult(error_msg)\nelse()\n db_connector = avapConnector(\"doc-processing-db-uuid-11223\")\n \n ormCheckTable(\"document_audit\", audit_table_exists)\n \n if(audit_table_exists, \"false\", \"==\")\n _status = 503\n addVar(table_error, \"Audit system unavailable\")\n addResult(table_error)\n else()\n try()\n addVar(processed_count, 0)\n addVar(failed_count, 0)\n addVar(processed_documents, \"[]\")\n addVar(validation_results, \"{}\")\n \n startLoop(i, 0, total_documents)\n itemFromList(document_urls, i, current_url)\n \n download_task = go download_document(current_url)\n validation_task = go validate_document_format(current_url, expected_format)\n \n document_content = gather(download_task, 8000)\n format_validation = gather(validation_task, 3000)\n \n variableFromJSON(format_validation, \"is_valid\", format_is_valid)\n \n if(format_is_valid, \"true\", \"==\")\n if(None, None, `document_content is not None`)\n processed_doc = process_document_content(document_content, i)\n variableFromJSON(processed_doc, \"status\", doc_status)\n \n if(doc_status, \"success\", \"==\")\n processed_count = processed_count + 1\n \n variableFromJSON(processed_doc, \"extracted_data\", extracted_info)\n variableFromJSON(processed_doc, \"md5_hash\", content_hash)\n \n sync_task = go sync_with_external_system(extracted_info, content_hash)\n sync_result = gather(sync_task, 4000)\n \n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", process_timestamp)\n \n audit_record = log_processing_attempt(current_url, \"PROCESSED\", process_timestamp, content_hash, db_connector)\n \n addVar(doc_result, \"{}\")\n AddVariableToJSON(\"url\", current_url, doc_result)\n AddVariableToJSON(\"status\", \"processed\", doc_result)\n AddVariableToJSON(\"hash\", content_hash, doc_result)\n AddVariableToJSON(\"timestamp\", process_timestamp, doc_result)\n \n if(None, None, `sync_result is not None`)\n variableFromJSON(sync_result, \"external_id\", ext_id)\n AddVariableToJSON(\"external_sync_id\", ext_id, doc_result)\n end()\n else()\n failed_count = failed_count + 1\n \n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", error_timestamp)\n audit_record = log_processing_attempt(current_url, \"FAILED\", error_timestamp, \"unknown\", db_connector)\n end()\n else()\n failed_count = failed_count + 1\n end()\n else()\n failed_count = failed_count + 1\n end()\n endLoop()\n \n total_processed = processed_count + failed_count\n success_rate = (processed_count * 100) / total_processed\n \n addVar(final_report, \"{}\")\n AddVariableToJSON(\"total_documents\", total_documents, final_report)\n AddVariableToJSON(\"successfully_processed\", processed_count, final_report)\n AddVariableToJSON(\"failed_processing\", failed_count, final_report)\n AddVariableToJSON(\"success_rate_percent\", success_rate, final_report)\n AddVariableToJSON(\"processed_documents\", processed_documents, final_report)\n AddVariableToJSON(\"validation_results\", validation_results, final_report)\n \n if(processed_count, 0, \">\")\n _status = 200\n addResult(final_report)\n else()\n _status = 422\n addVar(no_success_error, \"No documents could be processed\")\n addResult(no_success_error)\n end()\n exception(system_error)\n _status = 500\n addVar(exception_message, \"Document processing system failed\")\n addResult(exception_message)\n end()\n end()\nend()\n\nfunction download_document(url)\n{\n addVar(headers, \"{}\")\n AddVariableToJSON(\"Accept\", \"text/plain,application/pdf\", headers)\n AddVariableToJSON(\"User-Agent\", \"AVAP-DocumentProcessor/2.0\", headers)\n \n try()\n RequestGet(url, \"\", headers, response_content, 10000)\n return(response_content)\n exception(download_error)\n return(None)\n end()\n}\n\nfunction validate_document_format(url, expected_format)\n{\n addVar(validation_result, \"{}\")\n \n getRegex(url, \"\\\\.(txt|pdf|docx)$\", file_extension)\n \n if(None, None, `file_extension is not None`)\n if(file_extension, expected_format, \"==\")\n AddVariableToJSON(\"is_valid\", \"true\", validation_result)\n AddVariableToJSON(\"detected_format\", file_extension, validation_result)\n else()\n AddVariableToJSON(\"is_valid\", \"false\", validation_result)\n AddVariableToJSON(\"reason\", \"format_mismatch\", validation_result)\n end()\n else()\n AddVariableToJSON(\"is_valid\", \"false\", validation_result)\n AddVariableToJSON(\"reason\", \"unknown_format\", validation_result)\n end()\n \n return(validation_result)\n}\n\nfunction process_document_content(content, doc_index)\n{\n addVar(processing_result, \"{}\")\n \n encodeMD5(content, content_md5)\n \n replace(content, \"\\\\n\", \" \", normalized_content)\n replace(normalized_content, \"\\\\t\", \" \", clean_content)\n \n getRegex(clean_content, \"([A-Z][a-z]+ [A-Z][a-z]+)\", extracted_names)\n getRegex(clean_content, \"([0-9]{4}-[0-9]{2}-[0-9]{2})\", extracted_dates)\n getRegex(clean_content, \"([a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\\\.[a-zA-Z]{2,})\", extracted_emails)\n \n if(None, None, `extracted_names is not None or extracted_dates is not None`)\n addVar(extracted_data, \"{}\")\n AddVariableToJSON(\"names\", extracted_names, extracted_data)\n AddVariableToJSON(\"dates\", extracted_dates, extracted_data)\n AddVariableToJSON(\"emails\", extracted_emails, extracted_data)\n AddVariableToJSON(\"document_index\", doc_index, extracted_data)\n \n AddVariableToJSON(\"status\", \"success\", processing_result)\n AddVariableToJSON(\"extracted_data\", extracted_data, processing_result)\n AddVariableToJSON(\"md5_hash\", content_md5, processing_result)\n else()\n AddVariableToJSON(\"status\", \"failed\", processing_result)\n AddVariableToJSON(\"error\", \"no_extractable_data\", processing_result)\n end()\n \n return(processing_result)\n}\n\nfunction sync_with_external_system(data, hash)\n{\n external_connector = avapConnector(\"external-docs-uuid-99887\")\n \n addVar(sync_payload, \"{}\")\n AddVariableToJSON(\"document_data\", data, sync_payload)\n AddVariableToJSON(\"integrity_hash\", hash, sync_payload)\n AddVariableToJSON(\"action\", \"document_processed\", sync_payload)\n \n sync_response = external_connector.submit_document(sync_payload)\n \n return(sync_response)\n}\n\nfunction log_processing_attempt(url, status, timestamp, hash, connector)\n{\n randomString(\"[A-Z0-9]{8}\", 8, operation_id)\n \n addVar(audit_entry, \"{}\")\n AddVariableToJSON(\"operation_id\", operation_id, audit_entry)\n AddVariableToJSON(\"document_url\", url, audit_entry)\n AddVariableToJSON(\"processing_status\", status, audit_entry)\n AddVariableToJSON(\"timestamp\", timestamp, audit_entry)\n AddVariableToJSON(\"content_hash\", hash, audit_entry)\n \n ormAccessInsert(audit_entry, \"document_audit\", audit_result)\n \n return(audit_result)\n}", + "test_inputs": { + "doc_urls": [ + "https://example.com/doc1.txt", + "https://example.com/doc2.txt" + ], + "format_type": "txt", + "validation_key": "client123" + }, + "test_list": [ + "re.match(r'\\d+', str(final_report.get('total_documents', 0)))", + "re.match(r'\\d+', str(final_report.get('successfully_processed', 0)))", + "re.match(r'^(PROCESSED|FAILED)$', audit_entry.get('processing_status', ''))" + ], + "_detected": [ + "AddVariableToJSON", + "RequestGet", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "encodeMD5", + "end", + "endLoop", + "function", + "gather", + "getDateTime", + "getListLen", + "getQueryParamList", + "if_mode2", + "import", + "itemFromList", + "ormAccessInsert", + "ormCheckTable", + "randomString", + "replace", + "return", + "startLoop", + "try", + "variableFromJSON" + ], + "_reward": { + "ecs": 0.711, + "novelty": 0.207, + "test_quality": 1.0, + "reward": 0.578, + "detected": [ + "AddVariableToJSON", + "RequestGet", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "encodeMD5", + "end", + "endLoop", + "function", + "gather", + "getDateTime", + "getListLen", + "getQueryParamList", + "if_mode2", + "import", + "itemFromList", + "ormAccessInsert", + "ormCheckTable", + "randomString", + "replace", + "return", + "startLoop", + "try", + "variableFromJSON" + ] + } + }, + { + "task_id": 6, + "text": "Desarrollar un microservicio de auditoría financiera que procese transacciones bancarias desde múltiples fuentes, valide cada transacción contra patrones de fraude, actualice balances de cuentas en tiempo real, y genere reportes de compliance. El servicio debe manejar archivos CSV de transacciones, verificar integridad mediante hash SHA256, sincronizar con sistemas externos de validación KYC, registrar todas las operaciones en tablas de auditoría, y manejar errores de conectividad con reintentos automáticos.", + "code": "include \"config/fraud_detection_rules.avap\"\nimport \"compliance_utils\"\n\naddParam(\"transaction_file\", csv_data)\naddParam(\"batch_id\", batch_identifier)\naddParam(\"validation_level\", security_level)\n\nif(csv_data, None, \"!=\")\n encodeSHA256(csv_data, file_hash)\n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", process_start)\n \n db_connector = avapConnector(\"audit-db-uuid-11111\")\n \n try()\n ormDirect(\"CREATE TABLE IF NOT EXISTS transaction_audit (id SERIAL, batch_id VARCHAR(50), hash VARCHAR(64), status VARCHAR(20), timestamp TIMESTAMP)\", create_result)\n \n ormCheckTable(\"accounts\", accounts_exist)\n \n if(accounts_exist, \"true\", \"==\")\n variableToList(csv_data, transactions_raw)\n replace(csv_data, \"\\n\", \"|\", normalized_data)\n getRegex(normalized_data, \"([0-9]{10,16}),([0-9\\.]+),(DEBIT|CREDIT)\", transaction_pattern)\n \n variableToList(transaction_pattern, transactions_list)\n getListLen(transactions_list, total_transactions)\n \n addVar(processed_count, 0)\n addVar(fraud_detected, 0)\n addVar(validation_errors, 0)\n addVar(final_report, \"{}\")\n \n startLoop(i, 0, total_transactions)\n itemFromList(transactions_list, i, current_transaction)\n \n validation_task = go validate_transaction_integrity(current_transaction, security_level)\n kyc_task = go verify_kyc_compliance(current_transaction)\n \n validation_result = gather(validation_task, 3000)\n kyc_result = gather(kyc_task, 5000)\n \n variableFromJSON(validation_result, \"is_valid\", transaction_valid)\n variableFromJSON(validation_result, \"account_id\", account_number)\n variableFromJSON(validation_result, \"amount\", transaction_amount)\n variableFromJSON(validation_result, \"type\", operation_type)\n \n if(transaction_valid, \"true\", \"==\")\n variableFromJSON(kyc_result, \"compliance_status\", kyc_status)\n \n if(kyc_status, \"APPROVED\", \"==\")\n ormAccessSelect(\"balance\", \"accounts\", \"account_id = '\" + account_number + \"'\", account_data)\n getListLen(account_data, account_found)\n \n if(account_found, 0, \">\")\n itemFromList(account_data, 0, account_record)\n variableFromJSON(account_record, \"balance\", current_balance)\n \n if(operation_type, \"DEBIT\", \"==\")\n new_balance = current_balance - transaction_amount\n else()\n new_balance = current_balance + transaction_amount\n end()\n \n addVar(balance_update, \"{}\")\n AddVariableToJSON(\"balance\", new_balance, balance_update)\n \n ormAccessUpdate(\"balance\", balance_update, \"accounts\", \"account_id = '\" + account_number + \"'\", update_result)\n \n log_audit_entry(batch_identifier, account_number, transaction_amount, \"SUCCESS\", db_connector)\n processed_count = processed_count + 1\n else()\n log_audit_entry(batch_identifier, account_number, transaction_amount, \"ACCOUNT_NOT_FOUND\", db_connector)\n validation_errors = validation_errors + 1\n end()\n else()\n log_audit_entry(batch_identifier, account_number, transaction_amount, \"KYC_FAILED\", db_connector)\n fraud_detected = fraud_detected + 1\n end()\n else()\n validation_errors = validation_errors + 1\n end()\n endLoop()\n \n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", process_end)\n \n AddVariableToJSON(\"batch_id\", batch_identifier, final_report)\n AddVariableToJSON(\"file_hash\", file_hash, final_report)\n AddVariableToJSON(\"total_transactions\", total_transactions, final_report)\n AddVariableToJSON(\"processed_successfully\", processed_count, final_report)\n AddVariableToJSON(\"fraud_detected\", fraud_detected, final_report)\n AddVariableToJSON(\"validation_errors\", validation_errors, final_report)\n AddVariableToJSON(\"process_start_time\", process_start, final_report)\n AddVariableToJSON(\"process_end_time\", process_end, final_report)\n \n external_audit_task = go submit_compliance_report(final_report)\n compliance_response = gather(external_audit_task, 8000)\n \n if(None, None, `compliance_response is not None`)\n variableFromJSON(compliance_response, \"audit_id\", external_audit_id)\n AddVariableToJSON(\"external_audit_id\", external_audit_id, final_report)\n end()\n \n _status = 200\n addResult(final_report)\n else()\n _status = 503\n addVar(db_error, \"Accounts table not available\")\n addResult(db_error)\n end()\n exception(system_error)\n _status = 500\n addVar(exception_msg, \"Financial audit system failure\")\n AddVariableToJSON(\"error_details\", system_error, exception_msg)\n addResult(exception_msg)\n end()\nelse()\n _status = 400\n addVar(missing_data, \"Transaction file data required\")\n addResult(missing_data)\nend()\n\nfunction validate_transaction_integrity(transaction_data, level)\n{\n getRegex(transaction_data, \"([0-9]{10,16}),([0-9\\.]+),(DEBIT|CREDIT)\", parsed_fields)\n \n addVar(validation_response, \"{}\")\n \n if(None, None, `parsed_fields is not None`)\n variableFromJSON(parsed_fields, \"account\", account_id)\n variableFromJSON(parsed_fields, \"amount\", amount_value)\n variableFromJSON(parsed_fields, \"operation\", op_type)\n \n amount_float = float(amount_value)\n \n if(level, \"HIGH\", \"==\")\n max_limit = 100000.0\n else()\n max_limit = 50000.0\n end()\n \n if(None, None, `amount_float > 0 and amount_float <= max_limit`)\n AddVariableToJSON(\"is_valid\", \"true\", validation_response)\n AddVariableToJSON(\"account_id\", account_id, validation_response)\n AddVariableToJSON(\"amount\", amount_float, validation_response)\n AddVariableToJSON(\"type\", op_type, validation_response)\n else()\n AddVariableToJSON(\"is_valid\", \"false\", validation_response)\n AddVariableToJSON(\"reason\", \"amount_out_of_range\", validation_response)\n end()\n else()\n AddVariableToJSON(\"is_valid\", \"false\", validation_response)\n AddVariableToJSON(\"reason\", \"invalid_format\", validation_response)\n end()\n \n return(validation_response)\n}\n\nfunction verify_kyc_compliance(transaction_data)\n{\n kyc_connector = avapConnector(\"kyc-service-uuid-22222\")\n \n addVar(kyc_payload, \"{}\")\n variableFromJSON(transaction_data, \"account\", account_for_kyc)\n AddVariableToJSON(\"account_id\", account_for_kyc, kyc_payload)\n AddVariableToJSON(\"check_type\", \"TRANSACTION_VALIDATION\", kyc_payload)\n \n try()\n kyc_response = kyc_connector.validate_account(kyc_payload)\n return(kyc_response)\n exception(kyc_error)\n addVar(fallback_response, \"{}\")\n AddVariableToJSON(\"compliance_status\", \"ERROR\", fallback_response)\n AddVariableToJSON(\"error\", \"KYC service unavailable\", fallback_response)\n return(fallback_response)\n end()\n}\n\nfunction submit_compliance_report(report_data)\n{\n compliance_connector = avapConnector(\"compliance-api-uuid-33333\")\n \n addVar(headers, \"{}\")\n AddVariableToJSON(\"Content-Type\", \"application/json\", headers)\n AddVariableToJSON(\"Authorization\", \"Bearer compliance-token-xyz\", headers)\n \n RequestPost(\"https://compliance-api.bank.com/audit/submit\", \"\", headers, report_data, compliance_result, 10000)\n \n return(compliance_result)\n}\n\nfunction log_audit_entry(batch_id, account_id, amount, status, connector)\n{\n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", audit_timestamp)\n \n addVar(audit_record, \"{}\")\n AddVariableToJSON(\"batch_id\", batch_id, audit_record)\n AddVariableToJSON(\"account_id\", account_id, audit_record)\n AddVariableToJSON(\"amount\", amount, audit_record)\n AddVariableToJSON(\"status\", status, audit_record)\n AddVariableToJSON(\"timestamp\", audit_timestamp, audit_record)\n \n ormAccessInsert(audit_record, \"transaction_audit\", insert_result)\n \n return(insert_result)\n}", + "test_inputs": { + "transaction_file": "1234567890123456,1500.50,DEBIT\\n9876543210987654,2300.75,CREDIT\\n1111222233334444,850.25,DEBIT", + "batch_id": "BATCH_20241215_001", + "validation_level": "HIGH" + }, + "test_list": [ + "re.match(r'.*batch_id.*BATCH_20241215_001.*', final_report)", + "re.match(r'.*total_transactions.*[1-9].*', final_report)", + "re.match(r'.*file_hash.*[a-f0-9]{64}.*', final_report)" + ], + "_detected": [ + "AddVariableToJSON", + "RequestPost", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "encodeSHA256", + "end", + "endLoop", + "function", + "gather", + "getDateTime", + "getListLen", + "if_mode2", + "import", + "itemFromList", + "ormAccessInsert", + "ormAccessSelect", + "ormAccessUpdate", + "ormCheckTable", + "ormDirect", + "replace", + "return", + "startLoop", + "try", + "variableFromJSON" + ], + "_reward": { + "ecs": 0.737, + "novelty": 0.172, + "test_quality": 1.0, + "reward": 0.579, + "detected": [ + "AddVariableToJSON", + "RequestPost", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "encodeSHA256", + "end", + "endLoop", + "function", + "gather", + "getDateTime", + "getListLen", + "if_mode2", + "import", + "itemFromList", + "ormAccessInsert", + "ormAccessSelect", + "ormAccessUpdate", + "ormCheckTable", + "ormDirect", + "replace", + "return", + "startLoop", + "try", + "variableFromJSON" + ] + } + }, + { + "task_id": 7, + "text": "Desarrollar un servicio de monitoreo de salud de APIs que reciba una lista de endpoints desde parámetros de query, valide cada URL mediante expresiones regulares, ejecute comprobaciones de salud concurrentes con timeouts configurables, registre los resultados en una base de datos con timestamps convertidos, genere códigos MD5 de identificación únicos para cada comprobación, y sincronice los datos con un sistema externo de alertas. El servicio debe manejar errores de red mediante bloques try/exception, procesar respuestas JSON de los endpoints monitoreados, y retornar un reporte consolidado con estadísticas de disponibilidad y tiempos de respuesta.", + "code": "include \"monitoring/health_config.avap\"\nimport \"response_analyzer\"\n\ngetQueryParamList(\"endpoints\", endpoint_list)\naddParam(\"timeout_ms\", request_timeout)\naddParam(\"alert_threshold\", threshold_value)\n\ngetListLen(endpoint_list, total_endpoints)\n\nif(total_endpoints, 0, \"==\")\n _status = 400\n addVar(error_msg, \"No endpoints provided for monitoring\")\n addResult(error_msg)\nelse()\n db_connector = avapConnector(\"health-monitor-db-uuid-11111\")\n alert_connector = avapConnector(\"alert-system-uuid-22222\")\n \n addVar(monitoring_results, \"[]\")\n addVar(healthy_count, 0)\n addVar(unhealthy_count, 0)\n addVar(timeout_count, 0)\n \n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", scan_start_time)\n getTimeStamp(scan_start_time, \"%Y-%m-%d %H:%M:%S\", 0, scan_timestamp)\n \n try()\n startLoop(i, 0, total_endpoints)\n itemFromList(endpoint_list, i, current_endpoint)\n \n getRegex(current_endpoint, \"^https?://[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}(/.*)?$\", url_valid)\n \n if(None, None, `url_valid is not None`)\n health_task = go check_endpoint_health(current_endpoint, request_timeout)\n sync_task = go sync_health_data(current_endpoint, alert_connector)\n \n health_result = gather(health_task, 8000)\n sync_result = gather(sync_task, 3000)\n \n if(None, None, `health_result is not None`)\n variableFromJSON(health_result, \"status\", endpoint_status)\n variableFromJSON(health_result, \"response_time\", response_time)\n variableFromJSON(health_result, \"status_code\", http_code)\n \n encodeMD5(current_endpoint, endpoint_hash)\n stampToDatetime(scan_timestamp, \"%Y-%m-%d %H:%M:%S\", 0, formatted_timestamp)\n \n addVar(health_record, \"{}\")\n AddVariableToJSON(\"endpoint_url\", current_endpoint, health_record)\n AddVariableToJSON(\"endpoint_hash\", endpoint_hash, health_record)\n AddVariableToJSON(\"health_status\", endpoint_status, health_record)\n AddVariableToJSON(\"response_time_ms\", response_time, health_record)\n AddVariableToJSON(\"http_status_code\", http_code, health_record)\n AddVariableToJSON(\"checked_at\", formatted_timestamp, health_record)\n \n if(endpoint_status, \"healthy\", \"==\")\n healthy_count = healthy_count + 1\n else()\n if(endpoint_status, \"timeout\", \"==\")\n timeout_count = timeout_count + 1\n else()\n unhealthy_count = unhealthy_count + 1\n end()\n end()\n \n ormAccessInsert(health_record, \"health_checks\", insert_result)\n else()\n timeout_count = timeout_count + 1\n end()\n else()\n unhealthy_count = unhealthy_count + 1\n end()\n endLoop()\n \n addVar(summary_report, \"{}\")\n AddVariableToJSON(\"scan_timestamp\", scan_start_time, summary_report)\n AddVariableToJSON(\"total_endpoints\", total_endpoints, summary_report)\n AddVariableToJSON(\"healthy_endpoints\", healthy_count, summary_report)\n AddVariableToJSON(\"unhealthy_endpoints\", unhealthy_count, summary_report)\n AddVariableToJSON(\"timeout_endpoints\", timeout_count, summary_report)\n \n availability_percentage = (healthy_count * 100) / total_endpoints\n AddVariableToJSON(\"availability_percentage\", availability_percentage, summary_report)\n \n if(healthy_count, 0, \">\")\n _status = 200\n addResult(summary_report)\n else()\n _status = 503\n addVar(all_down_msg, \"All monitored endpoints are unavailable\")\n addResult(all_down_msg)\n end()\n exception(monitoring_error)\n _status = 500\n addVar(exception_msg, \"Health monitoring system failure\")\n addResult(exception_msg)\n end()\nend()\n\nfunction check_endpoint_health(endpoint_url, timeout_ms)\n{\n addVar(headers, \"{}\")\n AddVariableToJSON(\"User-Agent\", \"HealthMonitor/1.0\", headers)\n AddVariableToJSON(\"Accept\", \"application/json\", headers)\n \n getDateTime(\"%Y-%m-%d %H:%M:%S.%f\", 0, \"UTC\", start_time)\n \n try()\n RequestGet(endpoint_url, \"\", headers, response_data, timeout_ms)\n \n getDateTime(\"%Y-%m-%d %H:%M:%S.%f\", 0, \"UTC\", end_time)\n getTimeStamp(end_time, \"%Y-%m-%d %H:%M:%S.%f\", 0, end_timestamp)\n getTimeStamp(start_time, \"%Y-%m-%d %H:%M:%S.%f\", 0, start_timestamp)\n \n response_time = end_timestamp - start_timestamp\n \n addVar(health_response, \"{}\")\n \n if(None, None, `response_data is not None`)\n variableFromJSON(response_data, \"status\", api_status)\n \n if(None, None, `\"200\" in str(response_data)`)\n AddVariableToJSON(\"status\", \"healthy\", health_response)\n AddVariableToJSON(\"status_code\", 200, health_response)\n else()\n AddVariableToJSON(\"status\", \"unhealthy\", health_response)\n AddVariableToJSON(\"status_code\", 500, health_response)\n end()\n else()\n AddVariableToJSON(\"status\", \"timeout\", health_response)\n AddVariableToJSON(\"status_code\", 0, health_response)\n end()\n \n AddVariableToJSON(\"response_time\", response_time, health_response)\n return(health_response)\n exception(request_error)\n addVar(error_response, \"{}\")\n AddVariableToJSON(\"status\", \"error\", error_response)\n AddVariableToJSON(\"status_code\", 0, error_response)\n AddVariableToJSON(\"response_time\", 0, error_response)\n return(error_response)\n end()\n}\n\nfunction sync_health_data(endpoint_url, alert_connector)\n{\n addVar(alert_payload, \"{}\")\n AddVariableToJSON(\"endpoint\", endpoint_url, alert_payload)\n AddVariableToJSON(\"monitor_type\", \"health_check\", alert_payload)\n AddVariableToJSON(\"severity\", \"info\", alert_payload)\n \n alert_response = alert_connector.send_health_update(alert_payload)\n \n return(alert_response)\n}", + "test_inputs": { + "endpoints": [ + "https://api.github.com", + "https://httpbin.org/status/200" + ], + "timeout_ms": 5000, + "alert_threshold": 500 + }, + "test_list": [ + "re.match(r'.*healthy_endpoints.*', summary_report)", + "re.match(r'.*availability_percentage.*', summary_report)", + "re.match(r'.*scan_timestamp.*', summary_report)" + ], + "_detected": [ + "AddVariableToJSON", + "RequestGet", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "encodeMD5", + "end", + "endLoop", + "function", + "gather", + "getDateTime", + "getListLen", + "getQueryParamList", + "getTimeStamp", + "if_mode2", + "import", + "itemFromList", + "ormAccessInsert", + "return", + "stampToDatetime", + "startLoop", + "try", + "variableFromJSON" + ], + "_reward": { + "ecs": 0.684, + "novelty": 0.172, + "test_quality": 1.0, + "reward": 0.552, + "detected": [ + "AddVariableToJSON", + "RequestGet", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "encodeMD5", + "end", + "endLoop", + "function", + "gather", + "getDateTime", + "getListLen", + "getQueryParamList", + "getTimeStamp", + "if_mode2", + "import", + "itemFromList", + "ormAccessInsert", + "return", + "stampToDatetime", + "startLoop", + "try", + "variableFromJSON" + ] + } + }, + { + "task_id": 8, + "text": "Desarrollar un microservicio de procesamiento de transacciones financieras que reciba datos de múltiples transacciones mediante POST, valide los montos contra límites configurados en archivos incluidos, calcule hashes SHA256 para auditoría, registre las operaciones en base de datos usando SQL directo para consultas complejas, actualice saldos de cuentas mediante ORM, maneje excepciones de conectividad, procese notificaciones concurrentemente usando gorrutinas, y retorne un reporte detallado. El servicio debe validar formatos de números de cuenta, aplicar comisiones según el tipo de transacción, registrar timestamps de procesamiento, y sincronizar con sistemas bancarios externos.", + "code": "include \"config/transaction_limits.avap\"\nimport \"banking_utils\"\n\naddParam(\"transactions\", transaction_data)\naddParam(\"account_id\", source_account)\naddParam(\"transaction_type\", tx_type)\n\nif(transaction_data, None, \"!=\")\n db_connector = avapConnector(\"banking-db-uuid-98765\")\n \n try()\n variableFromJSON(transaction_data, \"items\", tx_list)\n getListLen(tx_list, total_transactions)\n \n addVar(processed_count, 0)\n addVar(failed_count, 0)\n addVar(total_amount, 0)\n addVar(processing_results, \"[]\")\n \n startLoop(i, 0, total_transactions)\n itemFromList(tx_list, i, current_tx)\n \n variableFromJSON(current_tx, \"amount\", tx_amount)\n variableFromJSON(current_tx, \"recipient_account\", recipient)\n variableFromJSON(current_tx, \"description\", tx_description)\n \n if(tx_amount, 10000, \">\")\n addVar(validation_error, \"Amount exceeds limit\")\n failed_count = failed_count + 1\n else()\n encodeSHA256(tx_description, description_hash)\n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", processing_timestamp)\n \n notification_task = go send_transaction_notification(recipient, tx_amount, processing_timestamp)\n validation_task = go validate_account_balance(source_account, tx_amount, db_connector)\n \n validation_result = gather(validation_task, 3000)\n notification_result = gather(notification_task, 2000)\n \n variableFromJSON(validation_result, \"is_valid\", balance_valid)\n \n if(balance_valid, \"true\", \"==\")\n commission_rate = calculate_commission(tx_type, tx_amount)\n final_amount = tx_amount + commission_rate\n \n ormDirect(\"UPDATE accounts SET balance = balance - %s WHERE account_id = '%s'\" % final_amount % source_account, update_result)\n ormAccessUpdate(\"balance\", \"balance + \" + tx_amount, \"accounts\", \"account_id = '\" + recipient + \"'\", recipient_update)\n \n addVar(tx_record, \"{}\")\n AddVariableToJSON(\"source_account\", source_account, tx_record)\n AddVariableToJSON(\"recipient_account\", recipient, tx_record)\n AddVariableToJSON(\"amount\", tx_amount, tx_record)\n AddVariableToJSON(\"commission\", commission_rate, tx_record)\n AddVariableToJSON(\"description_hash\", description_hash, tx_record)\n AddVariableToJSON(\"timestamp\", processing_timestamp, tx_record)\n AddVariableToJSON(\"status\", \"completed\", tx_record)\n \n ormAccessInsert(tx_record, \"transactions\", insert_result)\n \n processed_count = processed_count + 1\n total_amount = total_amount + tx_amount\n else()\n failed_count = failed_count + 1\n end()\n end()\n endLoop()\n \n addVar(final_report, \"{}\")\n AddVariableToJSON(\"total_processed\", processed_count, final_report)\n AddVariableToJSON(\"total_failed\", failed_count, final_report)\n AddVariableToJSON(\"total_amount\", total_amount, final_report)\n AddVariableToJSON(\"processing_results\", processing_results, final_report)\n \n if(processed_count, 0, \">\")\n _status = 200\n addResult(final_report)\n else()\n _status = 422\n addVar(process_error, \"No transactions could be processed\")\n addResult(process_error)\n end()\n exception(system_error)\n _status = 500\n addVar(exception_msg, \"Transaction processing system unavailable\")\n addResult(exception_msg)\n end()\nelse()\n _status = 400\n addVar(missing_data, \"Transaction data is required\")\n addResult(missing_data)\nend()\n\nfunction send_transaction_notification(recipient, amount, timestamp)\n{\n notification_service = avapConnector(\"notification-service-uuid-11111\")\n \n addVar(notification_payload, \"{}\")\n AddVariableToJSON(\"recipient\", recipient, notification_payload)\n AddVariableToJSON(\"amount\", amount, notification_payload)\n AddVariableToJSON(\"timestamp\", timestamp, notification_payload)\n AddVariableToJSON(\"type\", \"transaction_received\", notification_payload)\n \n notification_response = notification_service.send_notification(notification_payload)\n \n return(notification_response)\n}\n\nfunction validate_account_balance(account_id, required_amount, connector)\n{\n ormAccessSelect(\"balance\", \"accounts\", \"account_id = '\" + account_id + \"'\", balance_records)\n \n getListLen(balance_records, record_count)\n \n addVar(validation_response, \"{}\")\n \n if(record_count, 0, \">\")\n itemFromList(balance_records, 0, balance_record)\n variableFromJSON(balance_record, \"balance\", current_balance)\n \n if(None, None, `current_balance >= required_amount`)\n AddVariableToJSON(\"is_valid\", \"true\", validation_response)\n AddVariableToJSON(\"available_balance\", current_balance, validation_response)\n else()\n AddVariableToJSON(\"is_valid\", \"false\", validation_response)\n AddVariableToJSON(\"reason\", \"insufficient_funds\", validation_response)\n end()\n else()\n AddVariableToJSON(\"is_valid\", \"false\", validation_response)\n AddVariableToJSON(\"reason\", \"account_not_found\", validation_response)\n end()\n \n return(validation_response)\n}\n\nfunction calculate_commission(transaction_type, amount)\n{\n if(transaction_type, \"domestic\", \"==\")\n commission = amount * 0.01\n else()\n if(transaction_type, \"international\", \"==\")\n commission = amount * 0.03\n else()\n commission = amount * 0.02\n end()\n end()\n \n return(commission)\n}", + "test_inputs": { + "transactions": "{\"items\": [{\"amount\": 5000, \"recipient_account\": \"ACC789\", \"description\": \"Payment transfer\"}]}", + "account_id": "ACC123", + "transaction_type": "domestic" + }, + "test_list": [ + "re.match(r'.*total_processed.*', final_report)", + "re.match(r'.*completed.*', tx_record)", + "re.match(r'.*[0-9a-f]{64}.*', description_hash)" + ], + "_detected": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "encodeSHA256", + "end", + "endLoop", + "function", + "gather", + "getDateTime", + "getListLen", + "if_mode2", + "import", + "itemFromList", + "ormAccessInsert", + "ormAccessSelect", + "ormAccessUpdate", + "ormDirect", + "return", + "startLoop", + "try", + "variableFromJSON" + ], + "_reward": { + "ecs": 0.658, + "novelty": 0.107, + "test_quality": 1.0, + "reward": 0.516, + "detected": [ + "AddVariableToJSON", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "encodeSHA256", + "end", + "endLoop", + "function", + "gather", + "getDateTime", + "getListLen", + "if_mode2", + "import", + "itemFromList", + "ormAccessInsert", + "ormAccessSelect", + "ormAccessUpdate", + "ormDirect", + "return", + "startLoop", + "try", + "variableFromJSON" + ] + } + }, + { + "task_id": 9, + "text": "Desarrollar un microservicio de monitoreo de salud que reciba múltiples endpoints para verificar, realice peticiones HTTP concurrentes con timeout, procese las respuestas, calcule métricas de disponibilidad, convierta timestamps de las respuestas, registre los resultados en base de datos, maneje errores de conectividad, y genere un reporte consolidado con estadísticas de uptime y códigos de estado por servicio.", + "code": "include \"monitoring/health_config.avap\"\ngetQueryParamList(\"endpoints\", endpoint_list)\naddParam(\"alert_threshold\", threshold)\naddParam(\"check_interval\", interval)\n\ngetListLen(endpoint_list, total_endpoints)\n\nif(total_endpoints, 0, \"==\")\n _status = 400\n addVar(error_msg, \"No endpoints provided for monitoring\")\n addResult(error_msg)\nelse()\n db_connector = avapConnector(\"health-monitor-db-uuid-11111\")\n \n ormCheckTable(\"health_checks\", table_exists)\n \n if(table_exists, \"false\", \"==\")\n addVar(fields, \"[\\\"endpoint\\\", \\\"status_code\\\", \\\"response_time\\\", \\\"timestamp\\\", \\\"error_message\\\"]\")\n addVar(field_types, \"[\\\"TEXT\\\", \\\"INTEGER\\\", \\\"REAL\\\", \\\"TEXT\\\", \\\"TEXT\\\"]\")\n ormCreateTable(fields, field_types, \"health_checks\", create_result)\n end()\n \n addVar(successful_checks, 0)\n addVar(failed_checks, 0)\n addVar(total_response_time, 0)\n addVar(status_report, \"{}\")\n addVar(check_results, \"[]\")\n \n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", check_start_time)\n \n startLoop(i, 0, total_endpoints)\n itemFromList(endpoint_list, i, current_endpoint)\n \n if(None, None, `\"http\" in current_endpoint or \"https\" in current_endpoint`)\n health_task = go check_endpoint_health(current_endpoint, interval)\n check_result = gather(health_task, 8000)\n \n try()\n variableFromJSON(check_result, \"status\", endpoint_status)\n variableFromJSON(check_result, \"response_time\", response_time)\n variableFromJSON(check_result, \"status_code\", status_code)\n variableFromJSON(check_result, \"timestamp\", raw_timestamp)\n \n stampToDatetime(raw_timestamp, \"%Y-%m-%d %H:%M:%S\", 0, formatted_timestamp)\n \n addVar(health_record, \"{}\")\n AddVariableToJSON(\"endpoint\", current_endpoint, health_record)\n AddVariableToJSON(\"status_code\", status_code, health_record)\n AddVariableToJSON(\"response_time\", response_time, health_record)\n AddVariableToJSON(\"timestamp\", formatted_timestamp, health_record)\n \n if(endpoint_status, \"healthy\", \"==\")\n successful_checks = successful_checks + 1\n total_response_time = total_response_time + response_time\n AddVariableToJSON(\"error_message\", \"\", health_record)\n else()\n failed_checks = failed_checks + 1\n variableFromJSON(check_result, \"error\", error_detail)\n AddVariableToJSON(\"error_message\", error_detail, health_record)\n end()\n \n ormAccessInsert(health_record, \"health_checks\", insert_result)\n \n exception(processing_error)\n failed_checks = failed_checks + 1\n addVar(error_record, \"{}\")\n AddVariableToJSON(\"endpoint\", current_endpoint, error_record)\n AddVariableToJSON(\"status_code\", 0, error_record)\n AddVariableToJSON(\"response_time\", 0, error_record)\n AddVariableToJSON(\"timestamp\", check_start_time, error_record)\n AddVariableToJSON(\"error_message\", \"Processing failed\", error_record)\n ormAccessInsert(error_record, \"health_checks\", error_insert)\n end()\n else()\n failed_checks = failed_checks + 1\n end()\n endLoop()\n \n availability_percentage = (successful_checks * 100) / total_endpoints\n \n if(successful_checks, 0, \">\")\n average_response_time = total_response_time / successful_checks\n else()\n addVar(average_response_time, 0)\n end()\n \n AddVariableToJSON(\"check_timestamp\", check_start_time, status_report)\n AddVariableToJSON(\"total_endpoints\", total_endpoints, status_report)\n AddVariableToJSON(\"successful_checks\", successful_checks, status_report)\n AddVariableToJSON(\"failed_checks\", failed_checks, status_report)\n AddVariableToJSON(\"availability_percentage\", availability_percentage, status_report)\n AddVariableToJSON(\"average_response_time\", average_response_time, status_report)\n \n if(None, None, `threshold is not None and availability_percentage < int(threshold)`)\n AddVariableToJSON(\"alert_triggered\", \"true\", status_report)\n _status = 503\n else()\n AddVariableToJSON(\"alert_triggered\", \"false\", status_report)\n _status = 200\n end()\n \n addResult(status_report)\nend()\n\nfunction check_endpoint_health(endpoint_url, timeout_ms)\n{\n addVar(headers, \"{}\")\n AddVariableToJSON(\"User-Agent\", \"HealthMonitor/1.0\", headers)\n AddVariableToJSON(\"Accept\", \"application/json\", headers)\n \n getTimeStamp(\"now\", \"%Y-%m-%d %H:%M:%S\", 0, start_timestamp)\n \n try()\n RequestGet(endpoint_url, \"\", headers, response_data, timeout_ms)\n \n getTimeStamp(\"now\", \"%Y-%m-%d %H:%M:%S\", 0, end_timestamp)\n response_time = end_timestamp - start_timestamp\n \n addVar(health_result, \"{}\")\n \n if(None, None, `response_data is not None`)\n AddVariableToJSON(\"status\", \"healthy\", health_result)\n AddVariableToJSON(\"status_code\", 200, health_result)\n AddVariableToJSON(\"response_time\", response_time, health_result)\n AddVariableToJSON(\"timestamp\", end_timestamp, health_result)\n else()\n AddVariableToJSON(\"status\", \"unhealthy\", health_result)\n AddVariableToJSON(\"status_code\", 0, health_result)\n AddVariableToJSON(\"response_time\", response_time, health_result)\n AddVariableToJSON(\"timestamp\", end_timestamp, health_result)\n AddVariableToJSON(\"error\", \"No response received\", health_result)\n end()\n \n return(health_result)\n \n exception(request_error)\n getTimeStamp(\"now\", \"%Y-%m-%d %H:%M:%S\", 0, error_timestamp)\n \n addVar(error_result, \"{}\")\n AddVariableToJSON(\"status\", \"unhealthy\", error_result)\n AddVariableToJSON(\"status_code\", 0, error_result)\n AddVariableToJSON(\"response_time\", 0, error_result)\n AddVariableToJSON(\"timestamp\", error_timestamp, error_result)\n AddVariableToJSON(\"error\", \"Connection failed\", error_result)\n \n return(error_result)\n end()\n}", + "test_inputs": { + "endpoints": [ + "http://api1.example.com/health", + "https://api2.example.com/status" + ], + "alert_threshold": "80", + "check_interval": "5000" + }, + "test_list": [ + "re.match(r'\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}', check_timestamp)", + "re.match(r'^(100|[1-9]?\\d)$', str(availability_percentage))", + "re.match(r'^(true|false)$', alert_triggered)" + ], + "_detected": [ + "AddVariableToJSON", + "RequestGet", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "end", + "endLoop", + "function", + "gather", + "getDateTime", + "getListLen", + "getQueryParamList", + "getTimeStamp", + "if_mode2", + "itemFromList", + "ormAccessInsert", + "ormCheckTable", + "return", + "stampToDatetime", + "startLoop", + "try", + "variableFromJSON" + ], + "_reward": { + "ecs": 0.658, + "novelty": 0.207, + "test_quality": 1.0, + "reward": 0.551, + "detected": [ + "AddVariableToJSON", + "RequestGet", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "end", + "endLoop", + "function", + "gather", + "getDateTime", + "getListLen", + "getQueryParamList", + "getTimeStamp", + "if_mode2", + "itemFromList", + "ormAccessInsert", + "ormCheckTable", + "return", + "stampToDatetime", + "startLoop", + "try", + "variableFromJSON" + ] + } + }, + { + "task_id": 10, + "text": "Desarrollar un microservicio de procesamiento de documentos legales que reciba archivos mediante POST, valide su formato usando expresiones regulares, genere hashes MD5 para verificación de integridad, extraiga metadatos relevantes (fechas, números de caso, firmantes), almacene los datos en base de datos, sincronice con un sistema externo de archivado mediante POST concurrente, registre auditoría de cada operación, y retorne un reporte completo con estadísticas del procesamiento. El servicio debe manejar múltiples documentos simultáneamente, validar rangos de fechas, generar códigos de referencia aleatorios, y gestionar errores de red o base de datos.", + "code": "include \"config/document_processing_settings.avap\"\nimport \"legal_document_utils\"\n\naddParam(\"documents\", doc_data)\naddParam(\"department\", dept_id)\naddParam(\"priority_level\", priority)\n\nif(doc_data, None, \"==\")\n _status = 400\n addVar(error_msg, \"No documents provided\")\n addResult(error_msg)\nelse()\n db_connector = avapConnector(\"legal-db-uuid-98765\")\n \n try()\n variableFromJSON(doc_data, \"files\", files_list)\n getListLen(files_list, total_files)\n \n addVar(processed_docs, \"[]\")\n addVar(success_count, 0)\n addVar(error_count, 0)\n addVar(total_size, 0)\n \n startLoop(i, 0, total_files)\n itemFromList(files_list, i, current_file)\n \n process_task = go process_legal_document(current_file, dept_id, db_connector)\n archive_task = go archive_to_external_system(current_file)\n \n doc_result = gather(process_task, 8000)\n archive_result = gather(archive_task, 5000)\n \n if(None, None, `doc_result is not None`)\n variableFromJSON(doc_result, \"status\", process_status)\n variableFromJSON(doc_result, \"file_size\", file_size)\n \n total_size = total_size + file_size\n \n if(process_status, \"success\", \"==\")\n success_count = success_count + 1\n \n variableFromJSON(doc_result, \"document_id\", doc_id)\n variableFromJSON(doc_result, \"reference_code\", ref_code)\n variableFromJSON(doc_result, \"extracted_date\", doc_date)\n \n addVar(processed_item, \"{}\")\n AddVariableToJSON(\"document_id\", doc_id, processed_item)\n AddVariableToJSON(\"reference_code\", ref_code, processed_item)\n AddVariableToJSON(\"status\", \"processed\", processed_item)\n AddVariableToJSON(\"extracted_date\", doc_date, processed_item)\n \n if(None, None, `archive_result is not None`)\n variableFromJSON(archive_result, \"archive_id\", ext_archive_id)\n AddVariableToJSON(\"external_archive_id\", ext_archive_id, processed_item)\n end()\n else()\n error_count = error_count + 1\n variableFromJSON(doc_result, \"error_detail\", error_msg)\n \n addVar(error_item, \"{}\")\n AddVariableToJSON(\"status\", \"error\", error_item)\n AddVariableToJSON(\"error_message\", error_msg, error_item)\n end()\n else()\n error_count = error_count + 1\n end()\n endLoop()\n \n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", processing_timestamp)\n \n addVar(final_response, \"{}\")\n AddVariableToJSON(\"processing_timestamp\", processing_timestamp, final_response)\n AddVariableToJSON(\"department_id\", dept_id, final_response)\n AddVariableToJSON(\"total_documents\", total_files, final_response)\n AddVariableToJSON(\"successful_processed\", success_count, final_response)\n AddVariableToJSON(\"failed_processed\", error_count, final_response)\n AddVariableToJSON(\"total_size_mb\", total_size, final_response)\n AddVariableToJSON(\"processed_documents\", processed_docs, final_response)\n \n if(success_count, 0, \">\")\n _status = 200\n addResult(final_response)\n else()\n _status = 422\n addVar(process_error, \"No documents could be processed successfully\")\n addResult(process_error)\n end()\n exception(system_error)\n _status = 500\n addVar(exception_msg, \"Document processing system failure\")\n addResult(exception_msg)\n end()\nend()\n\nfunction process_legal_document(file_data, department, connector)\n{\n variableFromJSON(file_data, \"filename\", filename)\n variableFromJSON(file_data, \"content\", file_content)\n variableFromJSON(file_data, \"size\", file_size)\n \n getRegex(filename, \"\\.(pdf|docx|txt)$\", file_extension)\n \n addVar(result, \"{}\")\n \n if(None, None, `file_extension is not None`)\n encodeMD5(file_content, content_hash)\n \n replace(file_content, \"\\n\", \" \", cleaned_content)\n getRegex(cleaned_content, \"Case No[.:] ([A-Z0-9-]+)\", case_number)\n getRegex(cleaned_content, \"([0-9]{1,2}/[0-9]{1,2}/[0-9]{4})\", extracted_date)\n getRegex(cleaned_content, \"Signed by: ([A-Za-z ]+)\", signatory)\n \n randomString(\"[A-Z]{3}[0-9]{6}\", 9, reference_code)\n \n addVar(document_record, \"{}\")\n AddVariableToJSON(\"filename\", filename, document_record)\n AddVariableToJSON(\"content_hash\", content_hash, document_record)\n AddVariableToJSON(\"file_size\", file_size, document_record)\n AddVariableToJSON(\"department_id\", department, document_record)\n AddVariableToJSON(\"reference_code\", reference_code, document_record)\n \n if(None, None, `case_number is not None`)\n AddVariableToJSON(\"case_number\", case_number, document_record)\n end()\n \n if(None, None, `extracted_date is not None`)\n AddVariableToJSON(\"document_date\", extracted_date, document_record)\n end()\n \n if(None, None, `signatory is not None`)\n AddVariableToJSON(\"signatory\", signatory, document_record)\n end()\n \n ormAccessInsert(document_record, \"legal_documents\", insert_result)\n \n log_document_processing(filename, \"PROCESSED\", department, connector)\n \n AddVariableToJSON(\"status\", \"success\", result)\n AddVariableToJSON(\"document_id\", insert_result, result)\n AddVariableToJSON(\"reference_code\", reference_code, result)\n AddVariableToJSON(\"file_size\", file_size, result)\n \n if(None, None, `extracted_date is not None`)\n AddVariableToJSON(\"extracted_date\", extracted_date, result)\n end()\n else()\n AddVariableToJSON(\"status\", \"error\", result)\n AddVariableToJSON(\"error_detail\", \"Invalid file format\", result)\n AddVariableToJSON(\"file_size\", file_size, result)\n end()\n \n return(result)\n}\n\nfunction archive_to_external_system(file_data)\n{\n external_connector = avapConnector(\"archive-service-uuid-54321\")\n \n addVar(archive_payload, \"{}\")\n variableFromJSON(file_data, \"filename\", file_name)\n variableFromJSON(file_data, \"content\", file_content)\n \n encodeSHA256(file_content, content_signature)\n \n AddVariableToJSON(\"filename\", file_name, archive_payload)\n AddVariableToJSON(\"content_signature\", content_signature, archive_payload)\n AddVariableToJSON(\"archive_type\", \"legal_document\", archive_payload)\n \n addVar(headers, \"{}\")\n AddVariableToJSON(\"Content-Type\", \"application/json\", headers)\n AddVariableToJSON(\"Authorization\", \"Bearer archive-token-xyz\", headers)\n \n RequestPost(\"https://archive.legal-system.com/api/v1/store\", \"\", headers, archive_payload, response_data, 6000)\n \n if(None, None, `response_data is not None`)\n return(response_data)\n else()\n addVar(error_response, \"{}\")\n AddVariableToJSON(\"error\", \"External archive failed\", error_response)\n return(error_response)\n end()\n}\n\nfunction log_document_processing(filename, status, department, connector)\n{\n getDateTime(\"%Y-%m-%d %H:%M:%S\", 0, \"UTC\", log_timestamp)\n \n addVar(audit_record, \"{}\")\n AddVariableToJSON(\"filename\", filename, audit_record)\n AddVariableToJSON(\"processing_status\", status, audit_record)\n AddVariableToJSON(\"department_id\", department, audit_record)\n AddVariableToJSON(\"timestamp\", log_timestamp, audit_record)\n AddVariableToJSON(\"processor_id\", \"AVAP-LEGAL-001\", audit_record)\n \n ormAccessInsert(audit_record, \"document_processing_audit\", audit_result)\n \n return(audit_result)\n}", + "test_inputs": { + "documents": "{\"files\": [{\"filename\": \"case_123.pdf\", \"content\": \"Case No: ABC-2024-001\\nDate: 12/15/2023\\nSigned by: John Smith\\nLegal content here\", \"size\": 1024}]}", + "department": "LEGAL_DEPT_01", + "priority_level": "HIGH" + }, + "test_list": [ + "re.match(r'.*processing_timestamp.*', final_response)", + "re.match(r'.*successful_processed.*', final_response)", + "re.match(r'.*ABC[0-9]{6}.*', reference_code)" + ], + "_detected": [ + "AddVariableToJSON", + "RequestPost", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "encodeMD5", + "encodeSHA256", + "end", + "endLoop", + "function", + "gather", + "getDateTime", + "getListLen", + "if_mode2", + "import", + "itemFromList", + "ormAccessInsert", + "randomString", + "replace", + "return", + "startLoop", + "try", + "variableFromJSON" + ], + "_reward": { + "ecs": 0.684, + "novelty": 0.172, + "test_quality": 1.0, + "reward": 0.552, + "detected": [ + "AddVariableToJSON", + "RequestPost", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "encodeMD5", + "encodeSHA256", + "end", + "endLoop", + "function", + "gather", + "getDateTime", + "getListLen", + "if_mode2", + "import", + "itemFromList", + "ormAccessInsert", + "randomString", + "replace", + "return", + "startLoop", + "try", + "variableFromJSON" + ] + } + } +] \ No newline at end of file diff --git a/output/mbpp_avap_v2_reward_stats_A.json b/output/mbpp_avap_v2_reward_stats_A.json new file mode 100644 index 0000000..dd839d3 --- /dev/null +++ b/output/mbpp_avap_v2_reward_stats_A.json @@ -0,0 +1,51 @@ +{ + "mode": "reward", + "weights": { + "w_ecs": 0.5, + "w_novelty": 0.35, + "w_tests": 0.15 + }, + "dataset_size": 10, + "pool_size": 5, + "pool_summary": "GoldPool: 5/5 | reward: min=0.578 max=0.763 mean=0.621", + "distribution_entropy": 4.959, + "node_type_frequency": { + "AddVariableToJSON": 10, + "RequestGet": 4, + "_status": 10, + "addParam": 10, + "addResult": 10, + "addVar": 10, + "else": 10, + "end": 10, + "endLoop": 9, + "function": 10, + "gather": 10, + "getListLen": 10, + "getQueryParamList": 4, + "if_mode2": 10, + "itemFromList": 10, + "replace": 4, + "return": 10, + "startLoop": 9, + "try": 10, + "variableFromJSON": 10, + "avapConnector": 9, + "encodeMD5": 4, + "encodeSHA256": 4, + "getDateTime": 9, + "getTimeStamp": 4, + "ormAccessInsert": 9, + "ormAccessSelect": 4, + "import": 7, + "ormAccessUpdate": 3, + "ormCheckTable": 4, + "randomString": 4, + "RequestPost": 3, + "ormDirect": 3, + "stampToDatetime": 3 + }, + "covered_constructs": 34, + "total_constructs": 38, + "mean_reward": 0.5854 +} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 53dc2f5..aabbbc0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,7 @@ dev = [ "polars>=1.38.1", "ragas>=0.4.3", "ruff>=0.15.1", + "scipy>=1.17.1", "selenium>=4.41.0", "tree-sitter-language-pack>=0.13.0", ] diff --git a/scratches/pseco/synthetic_dataset/generate_synthethic_data.ipynb b/scratches/pseco/synthetic_dataset/RagasEvaluator_DatasetGeneration/generate_synthethic_data.ipynb similarity index 100% rename from scratches/pseco/synthetic_dataset/generate_synthethic_data.ipynb rename to scratches/pseco/synthetic_dataset/RagasEvaluator_DatasetGeneration/generate_synthethic_data.ipynb diff --git a/scratches/pseco/synthetic_dataset/mbap_tester.py b/scratches/pseco/synthetic_dataset/first_approach/mbap_tester.py similarity index 100% rename from scratches/pseco/synthetic_dataset/mbap_tester.py rename to scratches/pseco/synthetic_dataset/first_approach/mbap_tester.py diff --git a/scratches/pseco/synthetic_dataset/n00 Ragas TestSet Generation.ipynb b/scratches/pseco/synthetic_dataset/first_approach/n00 Ragas TestSet Generation.ipynb similarity index 100% rename from scratches/pseco/synthetic_dataset/n00 Ragas TestSet Generation.ipynb rename to scratches/pseco/synthetic_dataset/first_approach/n00 Ragas TestSet Generation.ipynb diff --git a/scratches/pseco/synthetic_dataset/n01 Human Eval.ipynb b/scratches/pseco/synthetic_dataset/first_approach/n01 Human Eval.ipynb similarity index 100% rename from scratches/pseco/synthetic_dataset/n01 Human Eval.ipynb rename to scratches/pseco/synthetic_dataset/first_approach/n01 Human Eval.ipynb diff --git a/scratches/pseco/synthetic_dataset/reward_algorithms/n00 Histogram.ipynb b/scratches/pseco/synthetic_dataset/reward_algorithms/n00 Histogram.ipynb new file mode 100644 index 0000000..5f6a98e --- /dev/null +++ b/scratches/pseco/synthetic_dataset/reward_algorithms/n00 Histogram.ipynb @@ -0,0 +1,4235 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "925b048c", + "metadata": {}, + "source": [ + "# Libraries" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "c3215835", + "metadata": {}, + "outputs": [], + "source": [ + "import json\n", + "import pandas as pd\n", + "import plotly.graph_objects as go\n", + "import plotly.subplots as sp\n", + "from pathlib import Path\n", + "import numpy as np\n", + "\n", + "\n", + "base_path = Path(\"/home/pseco/VsCodeProjects/assistance-engine/output\")" + ] + }, + { + "cell_type": "markdown", + "id": "c8024618", + "metadata": {}, + "source": [ + "# Functions" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7e4b843f", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "id": "d8b63d88", + "metadata": {}, + "source": [ + "# Read and Prepare Data" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "d052f1bc", + "metadata": {}, + "outputs": [], + "source": [ + "candidates = {}\n", + "\n", + "with open(base_path / \"candidate_E_reward_10_coverage_stats.json\") as f:\n", + " candidates[\"E\"] = json.load(f)\n", + "\n", + "with open(base_path / \"candidate_F_reward_10_coverage_stats.json\") as f:\n", + " candidates[\"F\"] = json.load(f)\n", + "\n", + "with open(base_path / \"mbpp_avap_v2_reward_stats_A.json\") as f:\n", + " candidates[\"A\"] = json.load(f)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "8d6a48f4", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Candidate E: 21 unique node types\n", + "Top 5 node types:\n", + " node_type frequency\n", + "11 addResult 3\n", + "4 ormAccessUpdate 2\n", + "3 gather 2\n", + "5 getListLen 2\n", + "0 startLoop 2\n", + "\n", + "\n", + "Candidate F: 18 unique node types\n", + "Top 5 node types:\n", + " node_type frequency\n", + "8 ormAccessSelect 3\n", + "0 startLoop 2\n", + "1 randomString 2\n", + "2 import 2\n", + "4 RequestGet 2\n", + "\n", + "\n", + "Candidate A: 34 unique node types\n", + "Top 5 node types:\n", + " node_type frequency\n", + "0 AddVariableToJSON 10\n", + "2 _status 10\n", + "16 return 10\n", + "3 addParam 10\n", + "4 addResult 10\n", + "\n" + ] + } + ], + "source": [ + "data_for_viz = {}\n", + "\n", + "for candidate_name, stats in candidates.items():\n", + " node_freq = stats.get(\"node_type_frequency\", {})\n", + " \n", + " if node_freq:\n", + " df = pd.DataFrame({\n", + " \"node_type\": list(node_freq.keys()),\n", + " \"frequency\": list(node_freq.values())\n", + " }).sort_values(\"frequency\", ascending=False)\n", + " else:\n", + " df = pd.DataFrame({\n", + " \"node_type\": [],\n", + " \"frequency\": []\n", + " })\n", + " \n", + " data_for_viz[candidate_name] = {\n", + " \"dataframe\": df,\n", + " \"entropy\": stats.get(\"distribution_entropy\", 0),\n", + " \"total_nodes\": len(node_freq)\n", + " }\n", + " \n", + " print(f\"\\nCandidate {candidate_name}: {len(df)} unique node types\")\n", + " if len(df) > 0:\n", + " print(f\"Top 5 node types:\\n{df.head()}\\n\")" + ] + }, + { + "cell_type": "markdown", + "id": "399a5931", + "metadata": {}, + "source": [ + "# Analysis" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "aa3a031e", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "==================================================\n", + "Candidate E\n", + "==================================================\n", + "Distribution Entropy: 4.2800\n", + "Total Node Types: 21\n", + "Total Cells: 9139\n", + "Filled Cells: 10\n", + "Fill Rate: 0.1100%\n", + "\n", + "==================================================\n", + "Candidate F\n", + "==================================================\n", + "Distribution Entropy: 4.0600\n", + "Total Node Types: 18\n", + "Total Cells: 9139\n", + "Filled Cells: 10\n", + "Fill Rate: 0.1100%\n", + "\n", + "==================================================\n", + "Candidate A\n", + "==================================================\n", + "Distribution Entropy: 4.9590\n", + "Total Node Types: 34\n", + "Total Cells: 0\n", + "Filled Cells: 0\n", + "Fill Rate: 0.0000%\n" + ] + } + ], + "source": [ + "for candidate_name, data in candidates.items():\n", + " entropy = data.get(\"distribution_entropy\", 0)\n", + " node_count = len(data.get(\"node_type_frequency\", {}))\n", + " total_cells = data.get(\"total_cells\", 0)\n", + " filled_cells = data.get(\"filled_cells\", 0)\n", + " fill_rate = data.get(\"fill_rate\", 0)\n", + " \n", + " print(f\"\\n{'='*50}\")\n", + " print(f\"Candidate {candidate_name}\")\n", + " print(f\"{'='*50}\")\n", + " print(f\"Distribution Entropy: {entropy:.4f}\")\n", + " print(f\"Total Node Types: {node_count}\")\n", + " print(f\"Total Cells: {total_cells}\")\n", + " print(f\"Filled Cells: {filled_cells}\")\n", + " print(f\"Fill Rate: {fill_rate:.4%}\")" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "725d9cd2", + "metadata": {}, + "outputs": [], + "source": [ + "colors = {\"A\": \"#1f77b4\", \"E\": \"#ff7f0e\", \"F\": \"#2ca02c\"}" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "fbdc11d2", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + " \n", + " " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "marker": { + "color": "#1f77b4" + }, + "text": [ + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 9, + 9, + 9, + 9, + 9, + 7, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 3, + 3, + 3, + 3 + ], + "textposition": "auto", + "type": "bar", + "x": [ + "AddVariableToJSON", + "_status", + "return", + "addParam", + "addResult", + "addVar", + "else", + "end", + "function", + "gather", + "variableFromJSON", + "getListLen", + "if_mode2", + "itemFromList", + "try", + "ormAccessInsert", + "endLoop", + "startLoop", + "avapConnector", + "getDateTime", + "import", + "RequestGet", + "replace", + "getQueryParamList", + "encodeSHA256", + "encodeMD5", + "getTimeStamp", + "ormAccessSelect", + "ormCheckTable", + "randomString", + "ormAccessUpdate", + "RequestPost", + "ormDirect", + "stampToDatetime" + ], + "y": [ + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 10, + 9, + 9, + 9, + 9, + 9, + 7, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 4, + 3, + 3, + 3, + 3 + ] + } + ], + "layout": { + "height": 400, + "hovermode": "x unified", + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Candidate A - Node Type Distribution
(Distribution Entropy: 4.9590, Total Node Types: 34)" + }, + "xaxis": { + "tickangle": 45, + "title": { + "text": "Node Types" + } + }, + "yaxis": { + "title": { + "text": "Frequency" + } + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "marker": { + "color": "#ff7f0e" + }, + "text": [ + 3, + 2, + 2, + 2, + 2, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "textposition": "auto", + "type": "bar", + "x": [ + "addResult", + "ormAccessUpdate", + "gather", + "getListLen", + "startLoop", + "end", + "getDateTime", + "avapConnector", + "getQueryParamList", + "getTimeStamp", + "RequestPost", + "addVar", + "encodeMD5", + "variableFromJSON", + "stampToDatetime", + "_status", + "return", + "else", + "replace", + "RequestGet", + "ormAccessSelect" + ], + "y": [ + 3, + 2, + 2, + 2, + 2, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ] + } + ], + "layout": { + "height": 400, + "hovermode": "x unified", + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Candidate E - Node Type Distribution
(Distribution Entropy: 4.2800, Total Node Types: 21)" + }, + "xaxis": { + "tickangle": 45, + "title": { + "text": "Node Types" + } + }, + "yaxis": { + "title": { + "text": "Frequency" + } + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "marker": { + "color": "#2ca02c" + }, + "text": [ + 3, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "textposition": "auto", + "type": "bar", + "x": [ + "ormAccessSelect", + "startLoop", + "randomString", + "import", + "RequestGet", + "_status", + "itemFromList", + "addParam", + "ormAccessUpdate", + "addVar", + "variableFromJSON", + "else", + "ormAccessInsert", + "try", + "if_mode1", + "RequestPost", + "ormCheckTable", + "function" + ], + "y": [ + 3, + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ] + } + ], + "layout": { + "height": 400, + "hovermode": "x unified", + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Candidate F - Node Type Distribution
(Distribution Entropy: 4.0600, Total Node Types: 18)" + }, + "xaxis": { + "tickangle": 45, + "title": { + "text": "Node Types" + } + }, + "yaxis": { + "title": { + "text": "Frequency" + } + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "for candidate_name in [\"A\", \"E\", \"F\"]:\n", + " viz_data = data_for_viz[candidate_name]\n", + " df = viz_data[\"dataframe\"]\n", + " entropy = viz_data[\"entropy\"]\n", + " \n", + " if len(df) == 0:\n", + " print(f\"\\nCandidate {candidate_name}: No node types found (Empty dataset)\")\n", + " fig = go.Figure()\n", + " fig.add_annotation(\n", + " text=f\"No node types found
Distribution Entropy: {entropy:.4f}\",\n", + " showarrow=False,\n", + " font=dict(size=16)\n", + " )\n", + " fig.update_layout(\n", + " title=f\"Candidate {candidate_name} - Node Type Distribution
(Distribution Entropy: {entropy:.4f})\",\n", + " height=300\n", + " )\n", + " fig.show()\n", + " else:\n", + " fig = go.Figure()\n", + " fig.add_trace(\n", + " go.Bar(\n", + " x=df[\"node_type\"],\n", + " y=df[\"frequency\"],\n", + " marker_color=colors[candidate_name],\n", + " text=df[\"frequency\"],\n", + " textposition=\"auto\"\n", + " )\n", + " )\n", + " \n", + " fig.update_layout(\n", + " title=f\"Candidate {candidate_name} - Node Type Distribution
(Distribution Entropy: {entropy:.4f}, Total Node Types: {len(df)})\",\n", + " xaxis_title=\"Node Types\",\n", + " yaxis_title=\"Frequency\",\n", + " height=400,\n", + " hovermode=\"x unified\"\n", + " )\n", + " fig.update_xaxes(tickangle=45)\n", + " fig.show()" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "9d82d59e", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "marker": { + "color": [ + "#1f77b4", + "#ff7f0e", + "#2ca02c" + ] + }, + "name": "Entropy", + "type": "bar", + "x": [ + "A", + "E", + "F" + ], + "xaxis": "x", + "y": [ + 4.959, + 4.28, + 4.06 + ], + "yaxis": "y" + }, + { + "marker": { + "color": [ + "#1f77b4", + "#ff7f0e", + "#2ca02c" + ] + }, + "name": "Node Types", + "type": "bar", + "x": [ + "A", + "E", + "F" + ], + "xaxis": "x2", + "y": [ + 34, + 21, + 18 + ], + "yaxis": "y2" + } + ], + "layout": { + "annotations": [ + { + "font": { + "size": 16 + }, + "showarrow": false, + "text": "Distribution Entropy Comparison", + "x": 0.225, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "bottom", + "yref": "paper" + }, + { + "font": { + "size": 16 + }, + "showarrow": false, + "text": "Node Type Count Comparison", + "x": 0.775, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "bottom", + "yref": "paper" + } + ], + "height": 400, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Comparative Analysis: Entropy and Node Type Distribution" + }, + "xaxis": { + "anchor": "y", + "domain": [ + 0, + 0.45 + ], + "title": { + "text": "Candidate" + } + }, + "xaxis2": { + "anchor": "y2", + "domain": [ + 0.55, + 1 + ], + "title": { + "text": "Candidate" + } + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0, + 1 + ], + "title": { + "text": "Entropy Value" + } + }, + "yaxis2": { + "anchor": "x2", + "domain": [ + 0, + 1 + ], + "title": { + "text": "Number of Node Types" + } + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "comparison_data = {\n", + " \"candidate\": [],\n", + " \"entropy\": [],\n", + " \"node_types\": [],\n", + " \"total_frequency\": []\n", + "}\n", + "\n", + "for candidate_name in [\"A\", \"E\", \"F\"]:\n", + " viz_data = data_for_viz[candidate_name]\n", + " df = viz_data[\"dataframe\"]\n", + " \n", + " comparison_data[\"candidate\"].append(candidate_name)\n", + " comparison_data[\"entropy\"].append(viz_data[\"entropy\"])\n", + " comparison_data[\"node_types\"].append(len(df))\n", + " comparison_data[\"total_frequency\"].append(df[\"frequency\"].sum() if len(df) > 0 else 0)\n", + "\n", + "comp_df = pd.DataFrame(comparison_data)\n", + "\n", + "fig = sp.make_subplots(\n", + " rows=1, cols=2,\n", + " subplot_titles=(\"Distribution Entropy Comparison\", \"Node Type Count Comparison\")\n", + ")\n", + "\n", + "fig.add_trace(\n", + " go.Bar(\n", + " x=comp_df[\"candidate\"],\n", + " y=comp_df[\"entropy\"],\n", + " name=\"Entropy\",\n", + " marker_color=[\"#1f77b4\", \"#ff7f0e\", \"#2ca02c\"]\n", + " ),\n", + " row=1, col=1\n", + ")\n", + "\n", + "fig.add_trace(\n", + " go.Bar(\n", + " x=comp_df[\"candidate\"],\n", + " y=comp_df[\"node_types\"],\n", + " name=\"Node Types\",\n", + " marker_color=[\"#1f77b4\", \"#ff7f0e\", \"#2ca02c\"]\n", + " ),\n", + " row=1, col=2\n", + ")\n", + "\n", + "fig.update_yaxes(title_text=\"Entropy Value\", row=1, col=1)\n", + "fig.update_yaxes(title_text=\"Number of Node Types\", row=1, col=2)\n", + "fig.update_xaxes(title_text=\"Candidate\", row=1, col=1)\n", + "fig.update_xaxes(title_text=\"Candidate\", row=1, col=2)\n", + "\n", + "fig.update_layout(title=\"Comparative Analysis: Entropy and Node Type Distribution\", height=400)\n", + "fig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": ".venv", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.11" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/scratches/pseco/synthetic_dataset/reward_algorithms/n01 KL Divergence.ipynb b/scratches/pseco/synthetic_dataset/reward_algorithms/n01 KL Divergence.ipynb new file mode 100644 index 0000000..65b044e --- /dev/null +++ b/scratches/pseco/synthetic_dataset/reward_algorithms/n01 KL Divergence.ipynb @@ -0,0 +1,1659 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "925b048c", + "metadata": {}, + "source": [ + "# Libraries" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "c3215835", + "metadata": {}, + "outputs": [], + "source": [ + "import json\n", + "import pandas as pd\n", + "import plotly.graph_objects as go\n", + "import plotly.subplots as sp\n", + "from pathlib import Path\n", + "import numpy as np\n", + "import yaml\n", + "from scipy.stats import entropy as scipy_stats_entropy\n", + "import yaml\n", + "from scipy.stats import entropy as scipy_stats_entropy, entropy\n", + "from src.config import settings\n", + "\n", + "base_path = Path(\"/home/pseco/VsCodeProjects/assistance-engine/output\")" + ] + }, + { + "cell_type": "markdown", + "id": "c8024618", + "metadata": {}, + "source": [ + "# Functions" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "7e4b843f", + "metadata": {}, + "outputs": [], + "source": [ + "def calculate_kl_divergence(dataset_dist, prior_dist):\n", + " \"\"\"\n", + " Calculate KL divergence between dataset distribution and prior distribution.\n", + " KL(P || Q) = sum(P(x) * log(P(x) / Q(x)))\n", + " Both distributions should be probability distributions (sum to 1).\n", + " \"\"\"\n", + " # Get all unique node types\n", + " all_nodes = set(dataset_dist.keys()) | set(prior_dist.keys())\n", + " \n", + " # Build aligned probability vectors with smoothing to avoid log(0)\n", + " p_vec = np.array([dataset_dist.get(node, 1e-10) for node in sorted(all_nodes)])\n", + " q_vec = np.array([prior_dist.get(node, 1e-10) for node in sorted(all_nodes)])\n", + " \n", + " # Normalize\n", + " p_vec = p_vec / p_vec.sum()\n", + " q_vec = q_vec / q_vec.sum()\n", + " \n", + " # Calculate KL divergence\n", + " kl_div = np.sum(p_vec * (np.log(p_vec + 1e-10) - np.log(q_vec + 1e-10)))\n", + " \n", + " return kl_div" + ] + }, + { + "cell_type": "markdown", + "id": "d8b63d88", + "metadata": {}, + "source": [ + "# Read and Prepare Data" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "d052f1bc", + "metadata": {}, + "outputs": [], + "source": [ + "candidates = {}\n", + "\n", + "with open(base_path / \"candidate_E_reward_10_coverage_stats.json\") as f:\n", + " candidates[\"E\"] = json.load(f)\n", + "\n", + "with open(base_path / \"candidate_F_reward_10_coverage_stats.json\") as f:\n", + " candidates[\"F\"] = json.load(f)\n", + "\n", + "with open(base_path / \"mbpp_avap_v2_reward_stats_A.json\") as f:\n", + " candidates[\"A\"] = json.load(f)\n", + "\n", + "\n", + "construct_map_path = settings.proj_root / \"construct_map.yaml\"\n", + "\n", + "with open(construct_map_path, 'r') as f:\n", + " construct_map = yaml.safe_load(f)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "87c6af5b", + "metadata": {}, + "outputs": [], + "source": [ + "data_for_viz = {}\n", + "\n", + "for candidate_name, stats in candidates.items():\n", + " node_freq = stats.get(\"node_type_frequency\", {})\n", + " \n", + " if node_freq:\n", + " df = pd.DataFrame({\n", + " \"node_type\": list(node_freq.keys()),\n", + " \"frequency\": list(node_freq.values())\n", + " }).sort_values(\"frequency\", ascending=False)\n", + " else:\n", + " df = pd.DataFrame({\n", + " \"node_type\": [],\n", + " \"frequency\": []\n", + " })\n", + " \n", + " data_for_viz[candidate_name] = {\n", + " \"dataframe\": df,\n", + " \"entropy\": stats.get(\"distribution_entropy\", 0),\n", + " \"total_nodes\": len(node_freq)\n", + " }" + ] + }, + { + "cell_type": "markdown", + "id": "399a5931", + "metadata": {}, + "source": [ + "# KL Divergence Analysis: Dataset vs ConstructPrior" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "725d9cd2", + "metadata": {}, + "outputs": [], + "source": [ + "colors = {\"A\": \"#1f77b4\", \"E\": \"#ff7f0e\", \"F\": \"#2ca02c\"}" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d98606a2", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ConstructPrior Metadata:\n", + " Description: Auto-generated by construct_prior.py. Weights derived from real GitHub codebases via Python AST anal...\n", + " Generated at: 2026-03-26T11:00:54.338542+00:00\n", + " Source stats: {'github_files_analyzed': 100, 'github_files_fetched': 100, 'total_pair_cooccurrences': 441, 'total_trio_cooccurrences': 3821}\n", + "\n", + " Total AVAP node types in schema: 38\n", + "\n", + "ConstructPrior Statistics:\n", + " Total node types (uniform prior): 38\n", + " Prior probability per node: 0.026316\n", + "\n", + "All AVAP Node Types in Prior:\n", + " node_type probability\n", + "AddVariableToJSON 0.026316\n", + " RequestGet 0.026316\n", + " RequestPost 0.026316\n", + " _status 0.026316\n", + " addParam 0.026316\n", + " addResult 0.026316\n", + " addVar 0.026316\n", + " avapConnector 0.026316\n", + " else 0.026316\n", + " encodeMD5 0.026316\n", + " encodeSHA256 0.026316\n", + " end 0.026316\n", + " endLoop 0.026316\n", + " exception 0.026316\n", + " function 0.026316\n", + " gather 0.026316\n", + " getDateTime 0.026316\n", + " getListLen 0.026316\n", + "getQueryParamList 0.026316\n", + " getTimeStamp 0.026316\n", + " go 0.026316\n", + " if_mode1 0.026316\n", + " if_mode2 0.026316\n", + " import 0.026316\n", + " include 0.026316\n", + " itemFromList 0.026316\n", + " ormAccessInsert 0.026316\n", + " ormAccessSelect 0.026316\n", + " ormAccessUpdate 0.026316\n", + " ormCheckTable 0.026316\n", + " ormDirect 0.026316\n", + " randomString 0.026316\n", + " replace 0.026316\n", + " return 0.026316\n", + " stampToDatetime 0.026316\n", + " startLoop 0.026316\n", + " try 0.026316\n", + " variableFromJSON 0.026316\n" + ] + } + ], + "source": [ + "prior_info = construct_map.get('meta', {})\n", + "print(\"ConstructPrior Metadata:\")\n", + "print(f\" Description: {prior_info.get('description', 'N/A')[:100]}...\")\n", + "print(f\" Generated at: {prior_info.get('generated_at', 'N/A')}\")\n", + "print(f\" Source stats: {prior_info.get('source_stats', {})}\")\n", + "\n", + "avap_node_names = prior_info.get('avap_node_names', [])\n", + "print(f\"\\n Total AVAP node types in schema: {len(avap_node_names)}\")\n", + "\n", + "prior_distribution = {node: 1.0 for node in avap_node_names}\n", + "prior_total = len(avap_node_names)\n", + "\n", + "prior_probabilities = {k: 1.0 / prior_total for k in avap_node_names}\n", + "\n", + "print(f\"\\nConstructPrior Statistics:\")\n", + "print(f\" Total node types (uniform prior): {len(prior_distribution)}\")\n", + "print(f\" Prior probability per node: {1.0/prior_total:.6f}\")\n", + "print(f\"\\nAll AVAP Node Types in Prior:\")\n", + "prior_df = pd.DataFrame({\n", + " \"node_type\": avap_node_names,\n", + " \"probability\": [1.0/prior_total] * len(avap_node_names)\n", + "}).sort_values(\"node_type\")\n", + "\n", + "print(prior_df.to_string(index=False))" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "b6aeb3cb", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Candidate A:\n", + " KL Divergence (Dataset || Prior): 0.200022\n", + " Dataset entropy: 4.9590\n", + "\n", + "Candidate E:\n", + " KL Divergence (Dataset || Prior): 0.670759\n", + " Dataset entropy: 4.2800\n", + "\n", + "Candidate F:\n", + " KL Divergence (Dataset || Prior): 0.823227\n", + " Dataset entropy: 4.0600\n", + "\n" + ] + } + ], + "source": [ + "kl_divergences = {}\n", + "\n", + "for candidate_name in [\"A\", \"E\", \"F\"]:\n", + " viz_data = data_for_viz[candidate_name]\n", + " df = viz_data[\"dataframe\"]\n", + " \n", + " if len(df) > 0:\n", + " dataset_total = df[\"frequency\"].sum()\n", + " dataset_dist = {row[\"node_type\"]: row[\"frequency\"] / dataset_total \n", + " for _, row in df.iterrows()}\n", + " else:\n", + " dataset_dist = {}\n", + " \n", + " kl_div = calculate_kl_divergence(dataset_dist, prior_probabilities)\n", + " kl_divergences[candidate_name] = kl_div\n", + " \n", + " print(f\"Candidate {candidate_name}:\")\n", + " print(f\" KL Divergence (Dataset || Prior): {kl_div:.6f}\")\n", + " print(f\" Dataset entropy: {viz_data['entropy']:.4f}\")\n", + " print()" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "62bde9ab", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "================================================================================\n", + "COMPREHENSIVE COMPARISON TABLE: Datasets vs ConstructPrior\n", + "================================================================================\n", + "Candidate KL Divergence Dataset Entropy Prior Entropy Node Types Total Frequency\n", + " A 0.200022 4.959 3.637586 34 250\n", + " E 0.670759 4.280 3.637586 21 29\n", + " F 0.823227 4.060 3.637586 18 27\n", + "================================================================================\n", + "\n", + "ConstructPrior Entropy: 3.6376\n", + "ConstructPrior Node Types: 38\n", + "ConstructPrior Total Frequency: 38\n" + ] + } + ], + "source": [ + "comparison_table = {\n", + " \"Candidate\": [],\n", + " \"KL Divergence\": [],\n", + " \"Dataset Entropy\": [],\n", + " \"Prior Entropy\": [],\n", + " \"Node Types\": [],\n", + " \"Total Frequency\": []\n", + "}\n", + "\n", + "prior_entropy = scipy_stats_entropy(list(prior_probabilities.values()))\n", + "\n", + "for candidate_name in [\"A\", \"E\", \"F\"]:\n", + " viz_data = data_for_viz[candidate_name]\n", + " df = viz_data[\"dataframe\"]\n", + " \n", + " comparison_table[\"Candidate\"].append(candidate_name)\n", + " comparison_table[\"KL Divergence\"].append(kl_divergences[candidate_name])\n", + " comparison_table[\"Dataset Entropy\"].append(viz_data[\"entropy\"])\n", + " comparison_table[\"Prior Entropy\"].append(prior_entropy)\n", + " comparison_table[\"Node Types\"].append(len(df))\n", + " comparison_table[\"Total Frequency\"].append(df[\"frequency\"].sum() if len(df) > 0 else 0)\n", + "\n", + "comp_table_df = pd.DataFrame(comparison_table)\n", + "\n", + "print(\"=\"*80)\n", + "print(\"COMPREHENSIVE COMPARISON TABLE: Datasets vs ConstructPrior\")\n", + "print(\"=\"*80)\n", + "print(comp_table_df.to_string(index=False))\n", + "print(\"=\"*80)\n", + "print(f\"\\nConstructPrior Entropy: {prior_entropy:.4f}\")\n", + "print(f\"ConstructPrior Node Types: {len(prior_probabilities)}\")\n", + "print(f\"ConstructPrior Total Frequency: {prior_total}\")" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "2eb4246b", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + " \n", + " " + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "marker": { + "color": [ + "#1f77b4", + "#ff7f0e", + "#2ca02c" + ] + }, + "name": "KL Divergence", + "text": [ + 0.200022, + 0.670759, + 0.823227 + ], + "textposition": "auto", + "type": "bar", + "x": [ + "A", + "E", + "F" + ], + "xaxis": "x", + "y": [ + 0.2000219752539122, + 0.6707593635118403, + 0.8232269319388326 + ], + "yaxis": "y" + }, + { + "marker": { + "color": "#1f77b4" + }, + "name": "Dataset Entropy", + "opacity": 0.7, + "type": "bar", + "x": [ + "A", + "E", + "F" + ], + "xaxis": "x2", + "y": [ + 4.959, + 4.28, + 4.06 + ], + "yaxis": "y2" + }, + { + "marker": { + "color": "#ff7f0e" + }, + "name": "Prior Entropy", + "opacity": 0.7, + "type": "bar", + "x": [ + "A", + "E", + "F" + ], + "xaxis": "x2", + "y": [ + 3.6375861597263865, + 3.6375861597263865, + 3.6375861597263865 + ], + "yaxis": "y2" + }, + { + "marker": { + "color": [ + "#1f77b4", + "#ff7f0e", + "#2ca02c" + ], + "line": { + "color": "white", + "width": 2 + }, + "size": 12 + }, + "mode": "markers+text", + "name": "Candidates", + "text": [ + "A", + "E", + "F" + ], + "textposition": "top center", + "type": "scatter", + "x": [ + 4.959, + 4.28, + 4.06 + ], + "xaxis": "x3", + "y": [ + 0.2000219752539122, + 0.6707593635118403, + 0.8232269319388326 + ], + "yaxis": "y3" + }, + { + "marker": { + "color": [ + "#1f77b4", + "#ff7f0e", + "#2ca02c" + ] + }, + "name": "Node Types", + "text": [ + 34, + 21, + 18 + ], + "textposition": "auto", + "type": "bar", + "x": [ + "A", + "E", + "F" + ], + "xaxis": "x4", + "y": [ + 34, + 21, + 18 + ], + "yaxis": "y4" + } + ], + "layout": { + "annotations": [ + { + "font": { + "size": 16 + }, + "showarrow": false, + "text": "KL Divergence vs ConstructPrior", + "x": 0.225, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "bottom", + "yref": "paper" + }, + { + "font": { + "size": 16 + }, + "showarrow": false, + "text": "Dataset vs Prior Entropy", + "x": 0.775, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "bottom", + "yref": "paper" + }, + { + "font": { + "size": 16 + }, + "showarrow": false, + "text": "KL Divergence vs Dataset Entropy", + "x": 0.225, + "xanchor": "center", + "xref": "paper", + "y": 0.375, + "yanchor": "bottom", + "yref": "paper" + }, + { + "font": { + "size": 16 + }, + "showarrow": false, + "text": "Node Type Coverage", + "x": 0.775, + "xanchor": "center", + "xref": "paper", + "y": 0.375, + "yanchor": "bottom", + "yref": "paper" + }, + { + "showarrow": false, + "text": "Prior: 38 types", + "x": 1, + "xanchor": "right", + "xref": "x4 domain", + "y": 38, + "yanchor": "bottom", + "yref": "y4" + } + ], + "height": 800, + "shapes": [ + { + "line": { + "color": "red", + "dash": "dash" + }, + "type": "line", + "x0": 0, + "x1": 1, + "xref": "x4 domain", + "y0": 38, + "y1": 38, + "yref": "y4" + } + ], + "showlegend": true, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Comprehensive KL Divergence Analysis: Datasets vs ConstructPrior" + }, + "xaxis": { + "anchor": "y", + "domain": [ + 0, + 0.45 + ] + }, + "xaxis2": { + "anchor": "y2", + "domain": [ + 0.55, + 1 + ] + }, + "xaxis3": { + "anchor": "y3", + "domain": [ + 0, + 0.45 + ], + "title": { + "text": "Dataset Entropy" + } + }, + "xaxis4": { + "anchor": "y4", + "domain": [ + 0.55, + 1 + ] + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0.625, + 1 + ], + "title": { + "text": "KL Divergence" + } + }, + "yaxis2": { + "anchor": "x2", + "domain": [ + 0.625, + 1 + ], + "title": { + "text": "Entropy" + } + }, + "yaxis3": { + "anchor": "x3", + "domain": [ + 0, + 0.375 + ], + "title": { + "text": "KL Divergence" + } + }, + "yaxis4": { + "anchor": "x4", + "domain": [ + 0, + 0.375 + ], + "title": { + "text": "# Node Types" + } + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "fig = sp.make_subplots(\n", + " rows=2, cols=2,\n", + " subplot_titles=(\n", + " \"KL Divergence vs ConstructPrior\",\n", + " \"Dataset vs Prior Entropy\",\n", + " \"KL Divergence vs Dataset Entropy\",\n", + " \"Node Type Coverage\"\n", + " ),\n", + " specs=[\n", + " [{\"type\": \"bar\"}, {\"type\": \"bar\"}],\n", + " [{\"type\": \"scatter\"}, {\"type\": \"bar\"}]\n", + " ]\n", + ")\n", + "\n", + "fig.add_trace(\n", + " go.Bar(\n", + " x=comp_table_df[\"Candidate\"],\n", + " y=comp_table_df[\"KL Divergence\"],\n", + " marker_color=[\"#1f77b4\", \"#ff7f0e\", \"#2ca02c\"],\n", + " name=\"KL Divergence\",\n", + " text=comp_table_df[\"KL Divergence\"].round(6),\n", + " textposition=\"auto\"\n", + " ),\n", + " row=1, col=1\n", + ")\n", + "\n", + "x_pos = np.arange(len(comp_table_df))\n", + "width = 0.35\n", + "\n", + "fig.add_trace(\n", + " go.Bar(\n", + " x=comp_table_df[\"Candidate\"],\n", + " y=comp_table_df[\"Dataset Entropy\"],\n", + " name=\"Dataset Entropy\",\n", + " marker_color=\"#1f77b4\",\n", + " opacity=0.7\n", + " ),\n", + " row=1, col=2\n", + ")\n", + "\n", + "fig.add_trace(\n", + " go.Bar(\n", + " x=comp_table_df[\"Candidate\"],\n", + " y=[prior_entropy] * len(comp_table_df),\n", + " name=\"Prior Entropy\",\n", + " marker_color=\"#ff7f0e\",\n", + " opacity=0.7\n", + " ),\n", + " row=1, col=2\n", + ")\n", + "\n", + "fig.add_trace(\n", + " go.Scatter(\n", + " x=comp_table_df[\"Dataset Entropy\"],\n", + " y=comp_table_df[\"KL Divergence\"],\n", + " mode='markers+text',\n", + " marker=dict(\n", + " size=12,\n", + " color=[\"#1f77b4\", \"#ff7f0e\", \"#2ca02c\"],\n", + " line=dict(width=2, color=\"white\")\n", + " ),\n", + " text=comp_table_df[\"Candidate\"],\n", + " textposition=\"top center\",\n", + " name=\"Candidates\"\n", + " ),\n", + " row=2, col=1\n", + ")\n", + "\n", + "fig.add_trace(\n", + " go.Bar(\n", + " x=comp_table_df[\"Candidate\"],\n", + " y=comp_table_df[\"Node Types\"],\n", + " marker_color=[\"#1f77b4\", \"#ff7f0e\", \"#2ca02c\"],\n", + " text=comp_table_df[\"Node Types\"],\n", + " textposition=\"auto\",\n", + " name=\"Node Types\"\n", + " ),\n", + " row=2, col=2\n", + ")\n", + "\n", + "fig.add_hline(\n", + " y=len(prior_probabilities),\n", + " line_dash=\"dash\",\n", + " line_color=\"red\",\n", + " annotation_text=f\"Prior: {len(prior_probabilities)} types\",\n", + " row=2, col=2\n", + ")\n", + "\n", + "fig.update_yaxes(title_text=\"KL Divergence\", row=1, col=1)\n", + "fig.update_yaxes(title_text=\"Entropy\", row=1, col=2)\n", + "fig.update_xaxes(title_text=\"Dataset Entropy\", row=2, col=1)\n", + "fig.update_yaxes(title_text=\"KL Divergence\", row=2, col=1)\n", + "fig.update_yaxes(title_text=\"# Node Types\", row=2, col=2)\n", + "\n", + "fig.update_layout(\n", + " title_text=\"Comprehensive KL Divergence Analysis: Datasets vs ConstructPrior\",\n", + " height=800,\n", + " showlegend=True\n", + ")\n", + "\n", + "fig.show()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": ".venv", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.11" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/scratches/pseco/synthetic_dataset/reward_algorithms/n03 HeatMap.ipynb b/scratches/pseco/synthetic_dataset/reward_algorithms/n03 HeatMap.ipynb new file mode 100644 index 0000000..807f3a9 --- /dev/null +++ b/scratches/pseco/synthetic_dataset/reward_algorithms/n03 HeatMap.ipynb @@ -0,0 +1,26511 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "925b048c", + "metadata": {}, + "source": [ + "# Libraries" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "c3215835", + "metadata": {}, + "outputs": [], + "source": [ + "import json\n", + "import pandas as pd\n", + "import plotly.graph_objects as go\n", + "import plotly.subplots as sp\n", + "from pathlib import Path\n", + "import numpy as np\n", + "import yaml\n", + "from scipy.stats import entropy as scipy_stats_entropy\n", + "import yaml\n", + "from scipy.stats import entropy as scipy_stats_entropy, entropy\n", + "from src.config import settings\n", + "\n", + "base_path = Path(\"/home/pseco/VsCodeProjects/assistance-engine/output\")" + ] + }, + { + "cell_type": "markdown", + "id": "d8b63d88", + "metadata": {}, + "source": [ + "# Read and Prepare Data" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "d052f1bc", + "metadata": {}, + "outputs": [], + "source": [ + "candidates = {}\n", + "\n", + "with open(base_path / \"candidate_E_reward_10_coverage_stats.json\") as f:\n", + " candidates[\"E\"] = json.load(f)\n", + "\n", + "with open(base_path / \"candidate_F_reward_10_coverage_stats.json\") as f:\n", + " candidates[\"F\"] = json.load(f)\n", + "\n", + "with open(base_path / \"mbpp_avap_v2_reward_stats_A.json\") as f:\n", + " candidates[\"A\"] = json.load(f)" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "725d9cd2", + "metadata": {}, + "outputs": [], + "source": [ + "colors = {\"A\": \"#1f77b4\", \"E\": \"#ff7f0e\", \"F\": \"#2ca02c\"}" + ] + }, + { + "cell_type": "markdown", + "id": "871a758b", + "metadata": {}, + "source": [ + "# Cell Fill Rate Heatmaps" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e674f19b", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fill Rate Summary for E and F:\n", + "Candidate Fill Rate (%) Filled Cells Empty Cells Total Cells Node Types\n", + " E 0.11 10 9129 9139 21\n", + " F 0.11 10 9129 9139 18\n", + "\n", + "Both candidates have identical dimensions: 9139 total cells\n" + ] + } + ], + "source": [ + "total_cells = 9139\n", + "candidates_E_F = [\"E\", \"F\"]\n", + "\n", + "fill_rate_data = []\n", + "for candidate in candidates_E_F:\n", + " stats = candidates[candidate]\n", + " fill_rate_data.append({\n", + " \"Candidate\": candidate,\n", + " \"Fill Rate (%)\": stats.get(\"fill_rate\", 0) * 100,\n", + " \"Filled Cells\": stats.get(\"filled_cells\", 0),\n", + " \"Empty Cells\": stats.get(\"empty_cells\", 0),\n", + " \"Total Cells\": stats.get(\"total_cells\", 0),\n", + " \"Node Types\": len(stats.get(\"node_type_frequency\", {}))\n", + " })\n", + "\n", + "fill_rate_df = pd.DataFrame(fill_rate_data)\n", + "\n", + "print(\"Fill Rate Summary for E and F:\")\n", + "print(fill_rate_df.to_string(index=False))\n", + "print(f\"\\nBoth candidates have identical dimensions: {total_cells} total cells\")\n" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "c1fa5024", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "colorscale": [ + [ + 0, + "#f0f0f0" + ], + [ + 1, + "#ff7f0e" + ] + ], + "hovertemplate": "Row: %{y}
Col: %{x}
Status: %{z|Filled|Empty}", + "name": "E", + "showscale": false, + "type": "heatmap", + "xaxis": "x", + "yaxis": "y", + "z": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + }, + { + "colorscale": [ + [ + 0, + "#f0f0f0" + ], + [ + 1, + "#2ca02c" + ] + ], + "hovertemplate": "Row: %{y}
Col: %{x}
Status: %{z|Filled|Empty}", + "name": "F", + "showscale": false, + "type": "heatmap", + "xaxis": "x2", + "yaxis": "y2", + "z": [ + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ] + ] + } + ], + "layout": { + "annotations": [ + { + "font": { + "size": 16 + }, + "showarrow": false, + "text": "Candidate E - Cell Fill Distribution
(10 filled, 9,129 empty)", + "x": 0.225, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "bottom", + "yref": "paper" + }, + { + "font": { + "size": 16 + }, + "showarrow": false, + "text": "Candidate F - Cell Fill Distribution
(10 filled, 9,129 empty)", + "x": 0.775, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "bottom", + "yref": "paper" + } + ], + "height": 500, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Cell Fill Rate Distribution: Candidates E vs F
" + }, + "width": 1200, + "xaxis": { + "anchor": "y", + "domain": [ + 0, + 0.45 + ], + "title": { + "text": "Cell Column Index" + } + }, + "xaxis2": { + "anchor": "y2", + "domain": [ + 0.55, + 1 + ], + "title": { + "text": "Cell Column Index" + } + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0, + 1 + ], + "title": { + "text": "Cell Row Index" + } + }, + "yaxis2": { + "anchor": "x2", + "domain": [ + 0, + 1 + ], + "title": { + "text": "Cell Row Index" + } + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "grid_cols = 100 \n", + "grid_rows = 92 \n", + "\n", + "fig = sp.make_subplots(\n", + " rows=1, cols=2,\n", + " subplot_titles=(\n", + " f\"Candidate E - Cell Fill Distribution
(10 filled, 9,129 empty)\",\n", + " f\"Candidate F - Cell Fill Distribution
(10 filled, 9,129 empty)\"\n", + " ),\n", + " specs=[[{\"type\": \"heatmap\"}, {\"type\": \"heatmap\"}]]\n", + ")\n", + "\n", + "for idx, candidate in enumerate(candidates_E_F, 1):\n", + " grid_matrix = np.zeros((grid_rows, grid_cols))\n", + " \n", + " stats = candidates[candidate]\n", + " filled_count = stats.get(\"filled_cells\", 0)\n", + "\n", + " if filled_count > 0:\n", + " interval = total_cells // filled_count\n", + " for i in range(filled_count):\n", + " cell_index = i * interval\n", + " row = (cell_index // grid_cols) % grid_rows\n", + " col = cell_index % grid_cols\n", + " if row < grid_rows and col < grid_cols:\n", + " grid_matrix[row, col] = 1\n", + " \n", + " fig.add_trace(\n", + " go.Heatmap(\n", + " z=grid_matrix,\n", + " colorscale=[[0, '#f0f0f0'], [1, colors[candidate]]],\n", + " showscale=False,\n", + " hovertemplate=\"Row: %{y}
Col: %{x}
Status: \" + \n", + " \"%{z|Filled|Empty}\",\n", + " name=candidate\n", + " ),\n", + " row=1, col=idx\n", + " )\n", + "\n", + "fig.update_xaxes(title_text=\"Cell Column Index\", row=1, col=1)\n", + "fig.update_yaxes(title_text=\"Cell Row Index\", row=1, col=1)\n", + "fig.update_xaxes(title_text=\"Cell Column Index\", row=1, col=2)\n", + "fig.update_yaxes(title_text=\"Cell Row Index\", row=1, col=2)\n", + "\n", + "fig.update_layout(\n", + " title_text=\"Cell Fill Rate Distribution: Candidates E vs F
\",\n", + " height=500,\n", + " width=1200\n", + ")\n", + "\n", + "fig.show()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "072dd9b9", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "colorscale": [ + [ + 0, + "rgb(255,255,204)" + ], + [ + 0.125, + "rgb(255,237,160)" + ], + [ + 0.25, + "rgb(254,217,118)" + ], + [ + 0.375, + "rgb(254,178,76)" + ], + [ + 0.5, + "rgb(253,141,60)" + ], + [ + 0.625, + "rgb(252,78,42)" + ], + [ + 0.75, + "rgb(227,26,28)" + ], + [ + 0.875, + "rgb(189,0,38)" + ], + [ + 1, + "rgb(128,0,38)" + ] + ], + "hovertemplate": "Node Type: %{y}
Candidate: %{x}
Frequency: %{z}", + "text": [ + [ + 1, + 2 + ], + [ + 1, + 1 + ], + [ + 1, + 2 + ], + [ + 0, + 2 + ], + [ + 3, + 0 + ], + [ + 1, + 1 + ], + [ + 1, + 0 + ], + [ + 1, + 1 + ], + [ + 1, + 0 + ], + [ + 2, + 0 + ], + [ + 0, + 1 + ], + [ + 2, + 0 + ], + [ + 2, + 0 + ], + [ + 2, + 0 + ], + [ + 1, + 0 + ], + [ + 1, + 0 + ], + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 0, + 2 + ], + [ + 0, + 1 + ], + [ + 1, + 3 + ], + [ + 2, + 1 + ], + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 1, + 0 + ], + [ + 1, + 0 + ], + [ + 1, + 0 + ], + [ + 2, + 2 + ], + [ + 0, + 1 + ], + [ + 1, + 1 + ] + ], + "textfont": { + "size": 10 + }, + "texttemplate": "%{z}", + "type": "heatmap", + "x": [ + "Candidate E", + "Candidate F" + ], + "y": [ + "RequestGet", + "RequestPost", + "_status", + "addParam", + "addResult", + "addVar", + "avapConnector", + "else", + "encodeMD5", + "end", + "function", + "gather", + "getDateTime", + "getListLen", + "getQueryParamList", + "getTimeStamp", + "if_mode1", + "import", + "itemFromList", + "ormAccessInsert", + "ormAccessSelect", + "ormAccessUpdate", + "ormCheckTable", + "randomString", + "replace", + "return", + "stampToDatetime", + "startLoop", + "try", + "variableFromJSON" + ], + "z": [ + [ + 1, + 2 + ], + [ + 1, + 1 + ], + [ + 1, + 2 + ], + [ + 0, + 2 + ], + [ + 3, + 0 + ], + [ + 1, + 1 + ], + [ + 1, + 0 + ], + [ + 1, + 1 + ], + [ + 1, + 0 + ], + [ + 2, + 0 + ], + [ + 0, + 1 + ], + [ + 2, + 0 + ], + [ + 2, + 0 + ], + [ + 2, + 0 + ], + [ + 1, + 0 + ], + [ + 1, + 0 + ], + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 0, + 2 + ], + [ + 0, + 1 + ], + [ + 1, + 3 + ], + [ + 2, + 1 + ], + [ + 0, + 1 + ], + [ + 0, + 2 + ], + [ + 1, + 0 + ], + [ + 1, + 0 + ], + [ + 1, + 0 + ], + [ + 2, + 2 + ], + [ + 0, + 1 + ], + [ + 1, + 1 + ] + ] + } + ], + "layout": { + "height": 800, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Node Type Frequency Heatmap: Candidates E vs F" + }, + "width": 600, + "xaxis": { + "title": { + "text": "Candidate" + } + }, + "yaxis": { + "autorange": "reversed", + "title": { + "text": "Node Type" + } + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "all_node_types_E = list(candidates[\"E\"].get(\"node_type_frequency\", {}).keys())\n", + "all_node_types_F = list(candidates[\"F\"].get(\"node_type_frequency\", {}).keys())\n", + "all_node_types = sorted(list(set(all_node_types_E + all_node_types_F)))\n", + "\n", + "node_freq_matrix = []\n", + "for node_type in all_node_types:\n", + " row = [\n", + " candidates[\"E\"].get(\"node_type_frequency\", {}).get(node_type, 0),\n", + " candidates[\"F\"].get(\"node_type_frequency\", {}).get(node_type, 0)\n", + " ]\n", + " node_freq_matrix.append(row)\n", + "\n", + "fig = go.Figure(\n", + " data=go.Heatmap(\n", + " z=node_freq_matrix,\n", + " x=[\"Candidate E\", \"Candidate F\"],\n", + " y=all_node_types,\n", + " colorscale=\"YlOrRd\",\n", + " hovertemplate=\"Node Type: %{y}
Candidate: %{x}
Frequency: %{z}\",\n", + " text=np.array(node_freq_matrix),\n", + " texttemplate=\"%{z}\",\n", + " textfont={\"size\": 10}\n", + " )\n", + ")\n", + "\n", + "fig.update_layout(\n", + " title=\"Node Type Frequency Heatmap: Candidates E vs F\",\n", + " xaxis_title=\"Candidate\",\n", + " yaxis_title=\"Node Type\",\n", + " height=800,\n", + " width=600,\n", + " yaxis=dict(autorange=\"reversed\")\n", + ")\n", + "\n", + "fig.show()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fdd542a4", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "colorscale": [ + [ + 0, + "rgb(247,251,255)" + ], + [ + 0.125, + "rgb(222,235,247)" + ], + [ + 0.25, + "rgb(198,219,239)" + ], + [ + 0.375, + "rgb(158,202,225)" + ], + [ + 0.5, + "rgb(107,174,214)" + ], + [ + 0.625, + "rgb(66,146,198)" + ], + [ + 0.75, + "rgb(33,113,181)" + ], + [ + 0.875, + "rgb(8,81,156)" + ], + [ + 1, + "rgb(8,48,107)" + ] + ], + "hovertemplate": "Metric: %{y}
Candidate: %{x}
Value: %{z:.2f}", + "text": [ + [ + "0.11", + "0.11" + ], + [ + "10.00", + "10.00" + ], + [ + "91.29", + "91.29" + ], + [ + "0.00", + "0.00" + ], + [ + "0.11", + "0.11" + ] + ], + "textfont": { + "size": 12 + }, + "texttemplate": "%{text}", + "type": "heatmap", + "x": [ + "Candidate E", + "Candidate F" + ], + "y": [ + "Fill Rate (%)", + "Filled Cells", + "Empty Cells", + "Low Quality", + "Coverage %" + ], + "z": [ + [ + 0.11, + 0.11 + ], + [ + 10, + 10 + ], + [ + 91.29, + 91.29 + ], + [ + 0, + 0 + ], + [ + 0.109421162052741, + 0.109421162052741 + ] + ] + } + ], + "layout": { + "height": 500, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Fill Rate Metrics Heatmap: Candidates E vs F
Showing fill rate percentages and cell counts" + }, + "width": 700, + "xaxis": { + "title": { + "text": "Candidate" + } + }, + "yaxis": { + "autorange": "reversed", + "title": { + "text": "Metric" + } + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "================================================================================\n", + "DETAILED FILL RATE STATISTICS: E vs F\n", + "================================================================================\n", + "\n", + "Candidate E:\n", + " Total Cells: 9,139\n", + " Filled Cells: 10\n", + " Empty Cells: 9,129\n", + " Low Quality: 0\n", + " Fill Rate (%): 0.1100%\n", + " Node Types: 21\n", + "\n", + "Candidate F:\n", + " Total Cells: 9,139\n", + " Filled Cells: 10\n", + " Empty Cells: 9,129\n", + " Low Quality: 0\n", + " Fill Rate (%): 0.1100%\n", + " Node Types: 18\n", + "================================================================================\n" + ] + } + ], + "source": [ + "metrics = {\n", + " \"Fill Rate (%)\": [],\n", + " \"Filled Cells\": [],\n", + " \"Empty Cells\": [],\n", + " \"Low Quality\": [],\n", + " \"Coverage %\": []\n", + "}\n", + "\n", + "for candidate in [\"E\", \"F\"]:\n", + " stats = candidates[candidate]\n", + " filled = stats.get(\"filled_cells\", 0)\n", + " empty = stats.get(\"empty_cells\", 0)\n", + " total = stats.get(\"total_cells\", 9139)\n", + " low_quality = stats.get(\"low_quality_cells\", 0)\n", + " \n", + " metrics[\"Fill Rate (%)\"].append(stats.get(\"fill_rate\", 0) * 100)\n", + " metrics[\"Filled Cells\"].append(filled)\n", + " metrics[\"Empty Cells\"].append(empty / 100) # Scale down for visualization\n", + " metrics[\"Low Quality\"].append(low_quality)\n", + " metrics[\"Coverage %\"].append((filled / total) * 100)\n", + "\n", + "\n", + "metric_names = list(metrics.keys())\n", + "metric_matrix = [metrics[m] for m in metric_names]\n", + "\n", + "fig = go.Figure(\n", + " data=go.Heatmap(\n", + " z=metric_matrix,\n", + " x=[\"Candidate E\", \"Candidate F\"],\n", + " y=metric_names,\n", + " colorscale=\"Blues\",\n", + " hovertemplate=\"Metric: %{y}
Candidate: %{x}
Value: %{z:.2f}\",\n", + " text=[[f\"{v:.2f}\" for v in row] for row in metric_matrix],\n", + " texttemplate=\"%{text}\",\n", + " textfont={\"size\": 12}\n", + " )\n", + ")\n", + "\n", + "fig.update_layout(\n", + " title=\"Fill Rate Metrics Heatmap: Candidates E vs F
Showing fill rate percentages and cell counts\",\n", + " xaxis_title=\"Candidate\",\n", + " yaxis_title=\"Metric\",\n", + " height=500,\n", + " width=700,\n", + " yaxis=dict(autorange=\"reversed\")\n", + ")\n", + "\n", + "fig.show()\n", + "\n", + "print(\"\\n\" + \"=\"*80)\n", + "print(\"DETAILED FILL RATE STATISTICS: E vs F\")\n", + "print(\"=\"*80)\n", + "for candidate in [\"E\", \"F\"]:\n", + " stats = candidates[candidate]\n", + " print(f\"\\nCandidate {candidate}:\")\n", + " print(f\" Total Cells: {stats.get('total_cells', 'N/A'):,}\")\n", + " print(f\" Filled Cells: {stats.get('filled_cells', 'N/A'):,}\")\n", + " print(f\" Empty Cells: {stats.get('empty_cells', 'N/A'):,}\")\n", + " print(f\" Low Quality: {stats.get('low_quality_cells', 'N/A'):,}\")\n", + " print(f\" Fill Rate (%): {stats.get('fill_rate', 0) * 100:.4f}%\")\n", + " print(f\" Node Types: {len(stats.get('node_type_frequency', {}))}\")\n", + "print(\"=\"*80)" + ] + }, + { + "cell_type": "markdown", + "id": "506dc5a8", + "metadata": {}, + "source": [ + "# Co-occurrence Analysis: Pairs and Trios of Node Types" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "9b9c5dc5", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Loaded candidate examples:\n", + " Candidate E: 10 examples\n", + " Candidate F: 10 examples\n" + ] + } + ], + "source": [ + "# Load the full candidate datasets to extract pairs and trios from examples\n", + "candidate_full_data = {}\n", + "\n", + "with open(base_path / \"candidate_E_reward_10.json\") as f:\n", + " candidate_full_data[\"E\"] = json.load(f)\n", + "\n", + "with open(base_path / \"candidate_F_reward_10.json\") as f:\n", + " candidate_full_data[\"F\"] = json.load(f)\n", + "\n", + "print(\"Loaded candidate examples:\")\n", + "print(f\" Candidate E: {len(candidate_full_data['E'])} examples\")\n", + "print(f\" Candidate F: {len(candidate_full_data['F'])} examples\")" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "aa86a24c", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Pairs of node types found:\n", + " Candidate E: 28 unique pairs\n", + " Candidate F: 24 unique pairs\n", + "\n", + "Trios of node types found:\n", + " Candidate E: 9 unique trios\n", + " Candidate F: 7 unique trios\n", + "\n", + "============================================================\n", + "TOP 10 PAIRS - Candidate E:\n", + "============================================================\n", + " avapConnector + startLoop: 1\n", + " gather + getQueryParamList: 1\n", + " gather + ormAccessUpdate: 1\n", + " getQueryParamList + ormAccessUpdate: 1\n", + " RequestPost + getListLen: 1\n", + " RequestPost + getTimeStamp: 1\n", + " getListLen + getTimeStamp: 1\n", + " addVar + end: 1\n", + " addVar + getDateTime: 1\n", + " end + getDateTime: 1\n", + "\n", + "============================================================\n", + "TOP 10 PAIRS - Candidate F:\n", + "============================================================\n", + " import + randomString: 1\n", + " import + startLoop: 1\n", + " randomString + startLoop: 1\n", + " RequestGet + _status: 1\n", + " addVar + itemFromList: 1\n", + " addVar + ormAccessUpdate: 1\n", + " itemFromList + ormAccessUpdate: 1\n", + " addParam + ormAccessSelect: 1\n", + " addParam + variableFromJSON: 1\n", + " ormAccessSelect + variableFromJSON: 1\n" + ] + } + ], + "source": [ + "from itertools import combinations\n", + "\n", + "def extract_pairs_and_trios(examples):\n", + " \"\"\"Extract pairs and trios of node types from examples.\"\"\"\n", + " pairs_count = {}\n", + " trios_count = {}\n", + " \n", + " for example in examples:\n", + " if isinstance(example, dict):\n", + " # Get the node types used in this example from the _cell field\n", + " nodes_in_example = example.get(\"_cell\", [])\n", + " \n", + " if isinstance(nodes_in_example, list) and len(nodes_in_example) > 0:\n", + " nodes = list(set(nodes_in_example)) # Remove duplicates\n", + " \n", + " # Extract pairs\n", + " if len(nodes) >= 2:\n", + " for pair in combinations(sorted(nodes), 2):\n", + " pair_key = f\"{pair[0]} + {pair[1]}\"\n", + " pairs_count[pair_key] = pairs_count.get(pair_key, 0) + 1\n", + " \n", + " # Extract trios\n", + " if len(nodes) >= 3:\n", + " for trio in combinations(sorted(nodes), 3):\n", + " trio_key = f\"{trio[0]} + {trio[1]} + {trio[2]}\"\n", + " trios_count[trio_key] = trios_count.get(trio_key, 0) + 1\n", + " \n", + " return pairs_count, trios_count\n", + "\n", + "# Extract pairs and trios for both candidates\n", + "pairs_E, trios_E = extract_pairs_and_trios(candidate_full_data[\"E\"])\n", + "pairs_F, trios_F = extract_pairs_and_trios(candidate_full_data[\"F\"])\n", + "\n", + "print(\"Pairs of node types found:\")\n", + "print(f\" Candidate E: {len(pairs_E)} unique pairs\")\n", + "print(f\" Candidate F: {len(pairs_F)} unique pairs\")\n", + "print(f\"\\nTrios of node types found:\")\n", + "print(f\" Candidate E: {len(trios_E)} unique trios\")\n", + "print(f\" Candidate F: {len(trios_F)} unique trios\")\n", + "\n", + "# Show top pairs\n", + "print(\"\\n\" + \"=\"*60)\n", + "print(\"TOP 10 PAIRS - Candidate E:\")\n", + "print(\"=\"*60)\n", + "for pair, count in sorted(pairs_E.items(), key=lambda x: x[1], reverse=True)[:10]:\n", + " print(f\" {pair}: {count}\")\n", + "\n", + "print(\"\\n\" + \"=\"*60)\n", + "print(\"TOP 10 PAIRS - Candidate F:\")\n", + "print(\"=\"*60)\n", + "for pair, count in sorted(pairs_F.items(), key=lambda x: x[1], reverse=True)[:10]:\n", + " print(f\" {pair}: {count}\")" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "fdade209", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "marker": { + "color": "#ff7f0e" + }, + "name": "Candidate E", + "orientation": "h", + "text": [ + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1" + ], + "textposition": "auto", + "type": "bar", + "x": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "xaxis": "x", + "y": [ + "avapConnector + startLoop", + "gather + getQueryParamList", + "gather + ormAccessUpdate", + "getQueryParamList + ormAccessUpdate", + "RequestPost + getListLen", + "RequestPost + getTimeStamp", + "getListLen + getTimeStamp", + "addVar + end", + "addVar + getDateTime", + "end + getDateTime", + "addResult + end", + "addResult + gather", + "end + gather", + "encodeMD5 + stampToDatetime", + "encodeMD5 + variableFromJSON" + ], + "yaxis": "y" + }, + { + "marker": { + "color": "#2ca02c" + }, + "name": "Candidate F", + "orientation": "h", + "text": [ + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1" + ], + "textposition": "auto", + "type": "bar", + "x": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "xaxis": "x2", + "y": [ + "import + randomString", + "import + startLoop", + "randomString + startLoop", + "RequestGet + _status", + "addVar + itemFromList", + "addVar + ormAccessUpdate", + "itemFromList + ormAccessUpdate", + "addParam + ormAccessSelect", + "addParam + variableFromJSON", + "ormAccessSelect + variableFromJSON", + "else + ormAccessSelect", + "else + startLoop", + "ormAccessSelect + startLoop", + "if_mode1 + ormAccessInsert", + "if_mode1 + try" + ], + "yaxis": "y2" + } + ], + "layout": { + "annotations": [ + { + "font": { + "size": 16 + }, + "showarrow": false, + "text": "Top Pairs - Candidate E (28 total pairs)", + "x": 0.225, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "bottom", + "yref": "paper" + }, + { + "font": { + "size": 16 + }, + "showarrow": false, + "text": "Top Pairs - Candidate F (24 total pairs)", + "x": 0.775, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "bottom", + "yref": "paper" + } + ], + "height": 600, + "showlegend": false, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Co-occurrence Heatmap: Top Node Type Pairs" + }, + "width": 1400, + "xaxis": { + "anchor": "y", + "domain": [ + 0, + 0.45 + ], + "title": { + "text": "Frequency" + } + }, + "xaxis2": { + "anchor": "y2", + "domain": [ + 0.55, + 1 + ], + "title": { + "text": "Frequency" + } + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0, + 1 + ] + }, + "yaxis2": { + "anchor": "x2", + "domain": [ + 0, + 1 + ] + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "# Create heatmap for top pairs for E and F\n", + "fig = sp.make_subplots(\n", + " rows=1, cols=2,\n", + " subplot_titles=(\n", + " f\"Top Pairs - Candidate E ({len(pairs_E)} total pairs)\",\n", + " f\"Top Pairs - Candidate F ({len(pairs_F)} total pairs)\"\n", + " ),\n", + " specs=[[{\"type\": \"bar\"}, {\"type\": \"bar\"}]]\n", + ")\n", + "\n", + "# Get top 15 pairs for each candidate\n", + "top_pairs_E = sorted(pairs_E.items(), key=lambda x: x[1], reverse=True)[:15]\n", + "top_pairs_F = sorted(pairs_F.items(), key=lambda x: x[1], reverse=True)[:15]\n", + "\n", + "# Create traces for E\n", + "fig.add_trace(\n", + " go.Bar(\n", + " y=[pair[0] for pair in top_pairs_E],\n", + " x=[pair[1] for pair in top_pairs_E],\n", + " orientation='h',\n", + " marker_color=colors[\"E\"],\n", + " text=[pair[1] for pair in top_pairs_E],\n", + " textposition=\"auto\",\n", + " name=\"Candidate E\"\n", + " ),\n", + " row=1, col=1\n", + ")\n", + "\n", + "# Create traces for F\n", + "fig.add_trace(\n", + " go.Bar(\n", + " y=[pair[0] for pair in top_pairs_F],\n", + " x=[pair[1] for pair in top_pairs_F],\n", + " orientation='h',\n", + " marker_color=colors[\"F\"],\n", + " text=[pair[1] for pair in top_pairs_F],\n", + " textposition=\"auto\",\n", + " name=\"Candidate F\"\n", + " ),\n", + " row=1, col=2\n", + ")\n", + "\n", + "fig.update_xaxes(title_text=\"Frequency\", row=1, col=1)\n", + "fig.update_xaxes(title_text=\"Frequency\", row=1, col=2)\n", + "\n", + "fig.update_layout(\n", + " title_text=\"Co-occurrence Heatmap: Top Node Type Pairs\",\n", + " height=600,\n", + " width=1400,\n", + " showlegend=False\n", + ")\n", + "\n", + "fig.show()" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "48231e70", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "marker": { + "color": "#ff7f0e" + }, + "name": "Candidate E", + "orientation": "h", + "text": [ + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1", + "1" + ], + "textposition": "auto", + "type": "bar", + "x": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "xaxis": "x", + "y": [ + "gather + getQueryParamList + ormAccessUpdate", + "RequestPost + getListLen + getTimeStamp", + "addVar + end + getDateTime", + "addResult + end + gather", + "encodeMD5 + stampToDatetime + variableFromJSON", + "_status + addResult + ormAccessUpdate", + "getDateTime + return + startLoop", + "addResult + else + replace", + "RequestGet + getListLen + ormAccessSelect" + ], + "yaxis": "y" + }, + { + "marker": { + "color": "#2ca02c" + }, + "name": "Candidate F", + "orientation": "h", + "text": [ + "1", + "1", + "1", + "1", + "1", + "1", + "1" + ], + "textposition": "auto", + "type": "bar", + "x": [ + 1, + 1, + 1, + 1, + 1, + 1, + 1 + ], + "xaxis": "x2", + "y": [ + "import + randomString + startLoop", + "addVar + itemFromList + ormAccessUpdate", + "addParam + ormAccessSelect + variableFromJSON", + "else + ormAccessSelect + startLoop", + "if_mode1 + ormAccessInsert + try", + "RequestPost + _status + ormAccessSelect", + "addParam + function + ormCheckTable" + ], + "yaxis": "y2" + } + ], + "layout": { + "annotations": [ + { + "font": { + "size": 16 + }, + "showarrow": false, + "text": "Top Trios - Candidate E (9 total trios)", + "x": 0.225, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "bottom", + "yref": "paper" + }, + { + "font": { + "size": 16 + }, + "showarrow": false, + "text": "Top Trios - Candidate F (7 total trios)", + "x": 0.775, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "bottom", + "yref": "paper" + } + ], + "height": 700, + "showlegend": false, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Co-occurrence Heatmap: Top Node Type Trios" + }, + "width": 1400, + "xaxis": { + "anchor": "y", + "domain": [ + 0, + 0.45 + ], + "title": { + "text": "Frequency" + } + }, + "xaxis2": { + "anchor": "y2", + "domain": [ + 0.55, + 1 + ], + "title": { + "text": "Frequency" + } + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0, + 1 + ] + }, + "yaxis2": { + "anchor": "x2", + "domain": [ + 0, + 1 + ] + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "================================================================================\n", + "CO-OCCURRENCE ANALYSIS SUMMARY\n", + "================================================================================\n", + "\n", + "Candidate E:\n", + " Total unique pairs: 28\n", + " Total unique trios: 9\n", + " Most common pair: avapConnector + startLoop (appears 1 time(s))\n", + " Most common trio: gather + getQueryParamList + ormAccessUpdate (appears 1 time(s))\n", + "\n", + "Candidate F:\n", + " Total unique pairs: 24\n", + " Total unique trios: 7\n", + " Most common pair: import + randomString (appears 1 time(s))\n", + " Most common trio: import + randomString + startLoop (appears 1 time(s))\n", + "================================================================================\n" + ] + } + ], + "source": [ + "# Create heatmap for top trios for E and F\n", + "fig = sp.make_subplots(\n", + " rows=1, cols=2,\n", + " subplot_titles=(\n", + " f\"Top Trios - Candidate E ({len(trios_E)} total trios)\",\n", + " f\"Top Trios - Candidate F ({len(trios_F)} total trios)\"\n", + " ),\n", + " specs=[[{\"type\": \"bar\"}, {\"type\": \"bar\"}]]\n", + ")\n", + "\n", + "# Get top 12 trios for each candidate\n", + "top_trios_E = sorted(trios_E.items(), key=lambda x: x[1], reverse=True)[:12]\n", + "top_trios_F = sorted(trios_F.items(), key=lambda x: x[1], reverse=True)[:12]\n", + "\n", + "# Create traces for E\n", + "fig.add_trace(\n", + " go.Bar(\n", + " y=[trio[0] for trio in top_trios_E],\n", + " x=[trio[1] for trio in top_trios_E],\n", + " orientation='h',\n", + " marker_color=colors[\"E\"],\n", + " text=[trio[1] for trio in top_trios_E],\n", + " textposition=\"auto\",\n", + " name=\"Candidate E\"\n", + " ),\n", + " row=1, col=1\n", + ")\n", + "\n", + "# Create traces for F\n", + "fig.add_trace(\n", + " go.Bar(\n", + " y=[trio[0] for trio in top_trios_F],\n", + " x=[trio[1] for trio in top_trios_F],\n", + " orientation='h',\n", + " marker_color=colors[\"F\"],\n", + " text=[trio[1] for trio in top_trios_F],\n", + " textposition=\"auto\",\n", + " name=\"Candidate F\"\n", + " ),\n", + " row=1, col=2\n", + ")\n", + "\n", + "fig.update_xaxes(title_text=\"Frequency\", row=1, col=1)\n", + "fig.update_xaxes(title_text=\"Frequency\", row=1, col=2)\n", + "\n", + "fig.update_layout(\n", + " title_text=\"Co-occurrence Heatmap: Top Node Type Trios\",\n", + " height=700,\n", + " width=1400,\n", + " showlegend=False\n", + ")\n", + "\n", + "fig.show()\n", + "\n", + "# Summary statistics\n", + "print(\"\\n\" + \"=\"*80)\n", + "print(\"CO-OCCURRENCE ANALYSIS SUMMARY\")\n", + "print(\"=\"*80)\n", + "print(f\"\\nCandidate E:\")\n", + "print(f\" Total unique pairs: {len(pairs_E)}\")\n", + "print(f\" Total unique trios: {len(trios_E)}\")\n", + "if top_pairs_E:\n", + " print(f\" Most common pair: {top_pairs_E[0][0]} (appears {top_pairs_E[0][1]} time(s))\")\n", + "if top_trios_E:\n", + " print(f\" Most common trio: {top_trios_E[0][0]} (appears {top_trios_E[0][1]} time(s))\")\n", + "\n", + "print(f\"\\nCandidate F:\")\n", + "print(f\" Total unique pairs: {len(pairs_F)}\")\n", + "print(f\" Total unique trios: {len(trios_F)}\")\n", + "if top_pairs_F:\n", + " print(f\" Most common pair: {top_pairs_F[0][0]} (appears {top_pairs_F[0][1]} time(s))\")\n", + "if top_trios_F:\n", + " print(f\" Most common trio: {top_trios_F[0][0]} (appears {top_trios_F[0][1]} time(s))\")\n", + "print(\"=\"*80)" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "169a847e", + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.plotly.v1+json": { + "config": { + "plotlyServerURL": "https://plot.ly" + }, + "data": [ + { + "colorbar": { + "title": { + "text": "Count" + }, + "x": 0.46 + }, + "colorscale": [ + [ + 0, + "rgb(255,255,204)" + ], + [ + 0.125, + "rgb(255,237,160)" + ], + [ + 0.25, + "rgb(254,217,118)" + ], + [ + 0.375, + "rgb(254,178,76)" + ], + [ + 0.5, + "rgb(253,141,60)" + ], + [ + 0.625, + "rgb(252,78,42)" + ], + [ + 0.75, + "rgb(227,26,28)" + ], + [ + 0.875, + "rgb(189,0,38)" + ], + [ + 1, + "rgb(128,0,38)" + ] + ], + "hovertemplate": "Node 1: %{y}
Node 2: %{x}
Co-occurrences: %{z}", + "text": [ + [ + 3, + 0, + 1, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 2, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0 + ], + [ + 1, + 0, + 2, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0 + ], + [ + 1, + 0, + 1, + 2, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 1, + 1, + 0 + ], + [ + 0, + 1, + 0, + 0, + 0, + 2, + 1, + 0, + 0, + 0, + 0, + 1 + ], + [ + 1, + 0, + 0, + 1, + 0, + 1, + 2, + 0, + 0, + 0, + 0, + 1 + ], + [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0 + ], + [ + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1 + ] + ], + "textfont": { + "size": 9 + }, + "texttemplate": "%{text}", + "type": "heatmap", + "x": [ + "addResult", + "startLoop", + "ormAccessUpdate", + "gather", + "getListLen", + "getDateTime", + "end", + "avapConnector", + "getQueryParamList", + "RequestPost", + "getTimeStamp", + "addVar" + ], + "xaxis": "x", + "y": [ + "addResult", + "startLoop", + "ormAccessUpdate", + "gather", + "getListLen", + "getDateTime", + "end", + "avapConnector", + "getQueryParamList", + "RequestPost", + "getTimeStamp", + "addVar" + ], + "yaxis": "y", + "z": [ + [ + 3, + 0, + 1, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 2, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0 + ], + [ + 1, + 0, + 2, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0 + ], + [ + 1, + 0, + 1, + 2, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 0, + 0, + 1, + 1, + 0 + ], + [ + 0, + 1, + 0, + 0, + 0, + 2, + 1, + 0, + 0, + 0, + 0, + 1 + ], + [ + 1, + 0, + 0, + 1, + 0, + 1, + 2, + 0, + 0, + 0, + 0, + 1 + ], + [ + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0 + ], + [ + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1 + ] + ] + }, + { + "colorbar": { + "title": { + "text": "Count" + }, + "x": 1.02 + }, + "colorscale": [ + [ + 0, + "rgb(255,255,229)" + ], + [ + 0.125, + "rgb(247,252,185)" + ], + [ + 0.25, + "rgb(217,240,163)" + ], + [ + 0.375, + "rgb(173,221,142)" + ], + [ + 0.5, + "rgb(120,198,121)" + ], + [ + 0.625, + "rgb(65,171,93)" + ], + [ + 0.75, + "rgb(35,132,67)" + ], + [ + 0.875, + "rgb(0,104,55)" + ], + [ + 1, + "rgb(0,69,41)" + ] + ], + "hovertemplate": "Node 1: %{y}
Node 2: %{x}
Co-occurrences: %{z}", + "text": [ + [ + 3, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 1 + ], + [ + 0, + 2, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 2, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 1, + 1, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + [ + 1, + 0, + 0, + 0, + 2, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 0, + 1, + 2, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 1, + 1, + 0, + 0 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 1, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 0, + 0 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0 + ], + [ + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ] + ], + "textfont": { + "size": 9 + }, + "texttemplate": "%{text}", + "type": "heatmap", + "x": [ + "ormAccessSelect", + "import", + "randomString", + "startLoop", + "_status", + "RequestGet", + "itemFromList", + "addParam", + "addVar", + "ormAccessUpdate", + "variableFromJSON", + "else" + ], + "xaxis": "x2", + "y": [ + "ormAccessSelect", + "import", + "randomString", + "startLoop", + "_status", + "RequestGet", + "itemFromList", + "addParam", + "addVar", + "ormAccessUpdate", + "variableFromJSON", + "else" + ], + "yaxis": "y2", + "z": [ + [ + 3, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 1 + ], + [ + 0, + 2, + 1, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 2, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0 + ], + [ + 1, + 1, + 1, + 2, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ], + [ + 1, + 0, + 0, + 0, + 2, + 1, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 1, + 0, + 0, + 1, + 2, + 0, + 0, + 0, + 0, + 0, + 0 + ], + [ + 0, + 0, + 1, + 0, + 0, + 0, + 2, + 0, + 1, + 1, + 0, + 0 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 2, + 0, + 0, + 1, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 0, + 0 + ], + [ + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 0, + 0 + ], + [ + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0 + ], + [ + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1 + ] + ] + } + ], + "layout": { + "annotations": [ + { + "font": { + "size": 16 + }, + "showarrow": false, + "text": "Co-occurrence Matrix - Candidate E", + "x": 0.225, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "bottom", + "yref": "paper" + }, + { + "font": { + "size": 16 + }, + "showarrow": false, + "text": "Co-occurrence Matrix - Candidate F", + "x": 0.775, + "xanchor": "center", + "xref": "paper", + "y": 1, + "yanchor": "bottom", + "yref": "paper" + } + ], + "height": 700, + "template": { + "data": { + "bar": [ + { + "error_x": { + "color": "#2a3f5f" + }, + "error_y": { + "color": "#2a3f5f" + }, + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "bar" + } + ], + "barpolar": [ + { + "marker": { + "line": { + "color": "#E5ECF6", + "width": 0.5 + }, + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "barpolar" + } + ], + "carpet": [ + { + "aaxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "baxis": { + "endlinecolor": "#2a3f5f", + "gridcolor": "white", + "linecolor": "white", + "minorgridcolor": "white", + "startlinecolor": "#2a3f5f" + }, + "type": "carpet" + } + ], + "choropleth": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "choropleth" + } + ], + "contour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "contour" + } + ], + "contourcarpet": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "contourcarpet" + } + ], + "heatmap": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmap" + } + ], + "heatmapgl": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "heatmapgl" + } + ], + "histogram": [ + { + "marker": { + "pattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + } + }, + "type": "histogram" + } + ], + "histogram2d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2d" + } + ], + "histogram2dcontour": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "histogram2dcontour" + } + ], + "mesh3d": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "type": "mesh3d" + } + ], + "parcoords": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "parcoords" + } + ], + "pie": [ + { + "automargin": true, + "type": "pie" + } + ], + "scatter": [ + { + "fillpattern": { + "fillmode": "overlay", + "size": 10, + "solidity": 0.2 + }, + "type": "scatter" + } + ], + "scatter3d": [ + { + "line": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatter3d" + } + ], + "scattercarpet": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattercarpet" + } + ], + "scattergeo": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergeo" + } + ], + "scattergl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattergl" + } + ], + "scattermapbox": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scattermapbox" + } + ], + "scatterpolar": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolar" + } + ], + "scatterpolargl": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterpolargl" + } + ], + "scatterternary": [ + { + "marker": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "type": "scatterternary" + } + ], + "surface": [ + { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + }, + "colorscale": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "type": "surface" + } + ], + "table": [ + { + "cells": { + "fill": { + "color": "#EBF0F8" + }, + "line": { + "color": "white" + } + }, + "header": { + "fill": { + "color": "#C8D4E3" + }, + "line": { + "color": "white" + } + }, + "type": "table" + } + ] + }, + "layout": { + "annotationdefaults": { + "arrowcolor": "#2a3f5f", + "arrowhead": 0, + "arrowwidth": 1 + }, + "autotypenumbers": "strict", + "coloraxis": { + "colorbar": { + "outlinewidth": 0, + "ticks": "" + } + }, + "colorscale": { + "diverging": [ + [ + 0, + "#8e0152" + ], + [ + 0.1, + "#c51b7d" + ], + [ + 0.2, + "#de77ae" + ], + [ + 0.3, + "#f1b6da" + ], + [ + 0.4, + "#fde0ef" + ], + [ + 0.5, + "#f7f7f7" + ], + [ + 0.6, + "#e6f5d0" + ], + [ + 0.7, + "#b8e186" + ], + [ + 0.8, + "#7fbc41" + ], + [ + 0.9, + "#4d9221" + ], + [ + 1, + "#276419" + ] + ], + "sequential": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ], + "sequentialminus": [ + [ + 0, + "#0d0887" + ], + [ + 0.1111111111111111, + "#46039f" + ], + [ + 0.2222222222222222, + "#7201a8" + ], + [ + 0.3333333333333333, + "#9c179e" + ], + [ + 0.4444444444444444, + "#bd3786" + ], + [ + 0.5555555555555556, + "#d8576b" + ], + [ + 0.6666666666666666, + "#ed7953" + ], + [ + 0.7777777777777778, + "#fb9f3a" + ], + [ + 0.8888888888888888, + "#fdca26" + ], + [ + 1, + "#f0f921" + ] + ] + }, + "colorway": [ + "#636efa", + "#EF553B", + "#00cc96", + "#ab63fa", + "#FFA15A", + "#19d3f3", + "#FF6692", + "#B6E880", + "#FF97FF", + "#FECB52" + ], + "font": { + "color": "#2a3f5f" + }, + "geo": { + "bgcolor": "white", + "lakecolor": "white", + "landcolor": "#E5ECF6", + "showlakes": true, + "showland": true, + "subunitcolor": "white" + }, + "hoverlabel": { + "align": "left" + }, + "hovermode": "closest", + "mapbox": { + "style": "light" + }, + "paper_bgcolor": "white", + "plot_bgcolor": "#E5ECF6", + "polar": { + "angularaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "radialaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "scene": { + "xaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "yaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + }, + "zaxis": { + "backgroundcolor": "#E5ECF6", + "gridcolor": "white", + "gridwidth": 2, + "linecolor": "white", + "showbackground": true, + "ticks": "", + "zerolinecolor": "white" + } + }, + "shapedefaults": { + "line": { + "color": "#2a3f5f" + } + }, + "ternary": { + "aaxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "baxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + }, + "bgcolor": "#E5ECF6", + "caxis": { + "gridcolor": "white", + "linecolor": "white", + "ticks": "" + } + }, + "title": { + "x": 0.05 + }, + "xaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + }, + "yaxis": { + "automargin": true, + "gridcolor": "white", + "linecolor": "white", + "ticks": "", + "title": { + "standoff": 15 + }, + "zerolinecolor": "white", + "zerolinewidth": 2 + } + } + }, + "title": { + "text": "Node Type Co-occurrence Matrix Heatmap
Shows how frequently node types appear together in examples" + }, + "width": 1400, + "xaxis": { + "anchor": "y", + "domain": [ + 0, + 0.45 + ], + "tickangle": 45 + }, + "xaxis2": { + "anchor": "y2", + "domain": [ + 0.55, + 1 + ], + "tickangle": 45 + }, + "yaxis": { + "anchor": "x", + "domain": [ + 0, + 1 + ] + }, + "yaxis2": { + "anchor": "x2", + "domain": [ + 0, + 1 + ] + } + } + }, + "text/html": [ + "
" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Node types included in co-occurrence matrices (top 12 by frequency):\n", + "\n", + "Candidate E: addResult, startLoop, ormAccessUpdate, gather, getListLen, getDateTime, end, avapConnector, getQueryParamList, RequestPost, getTimeStamp, addVar\n", + "\n", + "Candidate F: ormAccessSelect, import, randomString, startLoop, _status, RequestGet, itemFromList, addParam, addVar, ormAccessUpdate, variableFromJSON, else\n" + ] + } + ], + "source": [ + "# Create co-occurrence matrix heatmap showing node type relationships\n", + "def create_cooccurrence_matrix(examples, top_nodes=12):\n", + " \"\"\"Create a co-occurrence matrix for node types.\"\"\"\n", + " # Extract all nodes from examples\n", + " all_nodes_set = set()\n", + " examples_node_lists = []\n", + " \n", + " for example in examples:\n", + " if isinstance(example, dict):\n", + " nodes_in_example = example.get(\"_cell\", [])\n", + " if isinstance(nodes_in_example, list):\n", + " nodes = list(set(nodes_in_example))\n", + " examples_node_lists.append(nodes)\n", + " all_nodes_set.update(nodes)\n", + " \n", + " # Get top nodes by frequency\n", + " node_counts = {}\n", + " for nodes_list in examples_node_lists:\n", + " for node in nodes_list:\n", + " node_counts[node] = node_counts.get(node, 0) + 1\n", + " \n", + " top_nodes_list = sorted(node_counts.items(), key=lambda x: x[1], reverse=True)[:top_nodes]\n", + " top_node_names = [node[0] for node in top_nodes_list]\n", + " \n", + " # Create co-occurrence matrix\n", + " cooccurrence_matrix = np.zeros((len(top_node_names), len(top_node_names)))\n", + " \n", + " for nodes_list in examples_node_lists:\n", + " for i, node1 in enumerate(top_node_names):\n", + " for j, node2 in enumerate(top_node_names):\n", + " if node1 in nodes_list and node2 in nodes_list:\n", + " cooccurrence_matrix[i][j] += 1\n", + " \n", + " return cooccurrence_matrix, top_node_names\n", + "\n", + "# Create co-occurrence matrices for E and F\n", + "cooccur_matrix_E, nodes_E = create_cooccurrence_matrix(candidate_full_data[\"E\"], top_nodes=12)\n", + "cooccur_matrix_F, nodes_F = create_cooccurrence_matrix(candidate_full_data[\"F\"], top_nodes=12)\n", + "\n", + "# Create heatmap visualization\n", + "fig = sp.make_subplots(\n", + " rows=1, cols=2,\n", + " subplot_titles=(\n", + " \"Co-occurrence Matrix - Candidate E\",\n", + " \"Co-occurrence Matrix - Candidate F\"\n", + " ),\n", + " specs=[[{\"type\": \"heatmap\"}, {\"type\": \"heatmap\"}]]\n", + ")\n", + "\n", + "fig.add_trace(\n", + " go.Heatmap(\n", + " z=cooccur_matrix_E,\n", + " x=nodes_E,\n", + " y=nodes_E,\n", + " colorscale=\"YlOrRd\",\n", + " hovertemplate=\"Node 1: %{y}
Node 2: %{x}
Co-occurrences: %{z}\",\n", + " text=cooccur_matrix_E.astype(int),\n", + " texttemplate=\"%{text}\",\n", + " textfont={\"size\": 9},\n", + " colorbar=dict(title=\"Count\", x=0.46)\n", + " ),\n", + " row=1, col=1\n", + ")\n", + "\n", + "fig.add_trace(\n", + " go.Heatmap(\n", + " z=cooccur_matrix_F,\n", + " x=nodes_F,\n", + " y=nodes_F,\n", + " colorscale=\"YlGn\",\n", + " hovertemplate=\"Node 1: %{y}
Node 2: %{x}
Co-occurrences: %{z}\",\n", + " text=cooccur_matrix_F.astype(int),\n", + " texttemplate=\"%{text}\",\n", + " textfont={\"size\": 9},\n", + " colorbar=dict(title=\"Count\", x=1.02)\n", + " ),\n", + " row=1, col=2\n", + ")\n", + "\n", + "fig.update_xaxes(tickangle=45, row=1, col=1)\n", + "fig.update_xaxes(tickangle=45, row=1, col=2)\n", + "\n", + "fig.update_layout(\n", + " title_text=\"Node Type Co-occurrence Matrix Heatmap
Shows how frequently node types appear together in examples\",\n", + " height=700,\n", + " width=1400\n", + ")\n", + "\n", + "fig.show()\n", + "\n", + "print(\"\\nNode types included in co-occurrence matrices (top 12 by frequency):\")\n", + "print(f\"\\nCandidate E: {', '.join(nodes_E)}\")\n", + "print(f\"\\nCandidate F: {', '.join(nodes_F)}\")" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": ".venv", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.11" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/uv.lock b/uv.lock index b4c3325..f80fcaa 100644 --- a/uv.lock +++ b/uv.lock @@ -315,6 +315,7 @@ dev = [ { name = "polars" }, { name = "ragas" }, { name = "ruff" }, + { name = "scipy" }, { name = "selenium" }, { name = "tree-sitter-language-pack" }, ] @@ -358,6 +359,7 @@ dev = [ { name = "polars", specifier = ">=1.38.1" }, { name = "ragas", specifier = ">=0.4.3" }, { name = "ruff", specifier = ">=0.15.1" }, + { name = "scipy", specifier = ">=1.17.1" }, { name = "selenium", specifier = ">=4.41.0" }, { name = "tree-sitter-language-pack", specifier = ">=0.13.0" }, ]