{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"import random\nimport pandas as pd \n\nfrom PIL import Image","metadata":{"execution":{"iopub.status.busy":"2022-04-29T14:35:56.073784Z","iopub.execute_input":"2022-04-29T14:35:56.074533Z","iopub.status.idle":"2022-04-29T14:35:56.079334Z","shell.execute_reply.started":"2022-04-29T14:35:56.074484Z","shell.execute_reply":"2022-04-29T14:35:56.078422Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"dfp_test = pd.read_csv(\"../input/be-honest-what-do-you-think-of-this-image/test.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-04-29T14:35:56.812095Z","iopub.execute_input":"2022-04-29T14:35:56.813029Z","iopub.status.idle":"2022-04-29T14:35:56.820011Z","shell.execute_reply.started":"2022-04-29T14:35:56.812982Z","shell.execute_reply":"2022-04-29T14:35:56.819408Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"%%time\n# Build a dummy function to create submission\ndef compute_interest(id_, folder = \"../input/be-honest-what-do-you-think-of-this-image/images/test/\"):\n    # Get the image ...\n    img = Image.open(folder + f\"{id_}.jpg\")\n    \n    # ... and don't use it for your prediction\n    return 100 * random.random()\n    \ndfp_test[\"Interest\"] = dfp_test[\"Id\"].apply(lambda id_: compute_interest(id_))","metadata":{"execution":{"iopub.status.busy":"2022-04-29T14:36:49.244657Z","iopub.execute_input":"2022-04-29T14:36:49.245075Z","iopub.status.idle":"2022-04-29T14:36:49.347792Z","shell.execute_reply.started":"2022-04-29T14:36:49.245044Z","shell.execute_reply":"2022-04-29T14:36:49.346889Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"dfp_test.sample(frac=1).head()","metadata":{"execution":{"iopub.status.busy":"2022-04-29T14:36:52.227559Z","iopub.execute_input":"2022-04-29T14:36:52.22803Z","iopub.status.idle":"2022-04-29T14:36:52.238911Z","shell.execute_reply.started":"2022-04-29T14:36:52.227988Z","shell.execute_reply":"2022-04-29T14:36:52.238073Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"dfp_test.to_csv(\"submission.csv\", index=None)","metadata":{"execution":{"iopub.status.busy":"2022-04-29T14:14:26.616387Z","iopub.execute_input":"2022-04-29T14:14:26.616663Z","iopub.status.idle":"2022-04-29T14:14:26.625419Z","shell.execute_reply.started":"2022-04-29T14:14:26.616635Z","shell.execute_reply":"2022-04-29T14:14:26.624367Z"},"trusted":true},"execution_count":null,"outputs":[]}]}