{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.14","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":84795,"databundleVersionId":10462807,"sourceType":"competition"}],"dockerImageVersionId":30804,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"Published on December 13, 2024. By Prata, Marília (mpwolke)","metadata":{}},{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\n#Two lines Required to Plot Plotly\nimport plotly.io as pio\npio.renderers.default = 'iframe'\n\nimport plotly.graph_objs as go\nimport plotly.offline as py\nimport plotly.express as px\n\n#Ignore warnings\nimport warnings\nwarnings.filterwarnings('ignore')\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true,"execution":{"iopub.status.busy":"2024-12-13T16:40:52.369379Z","iopub.execute_input":"2024-12-13T16:40:52.369771Z","iopub.status.idle":"2024-12-13T16:40:56.042381Z","shell.execute_reply.started":"2024-12-13T16:40:52.369736Z","shell.execute_reply":"2024-12-13T16:40:56.041165Z"},"collapsed":true,"jupyter":{"outputs_hidden":true},"_kg_hide-output":true,"_kg_hide-input":true},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!unzip -n ../input/konwinski-prize/data.a_zip","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-13T16:42:41.49651Z","iopub.execute_input":"2024-12-13T16:42:41.497245Z","iopub.status.idle":"2024-12-13T16:42:46.768635Z","shell.execute_reply.started":"2024-12-13T16:42:41.497206Z","shell.execute_reply":"2024-12-13T16:42:46.767185Z"},"collapsed":true,"jupyter":{"outputs_hidden":true},"_kg_hide-output":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"#Extract zip files","metadata":{}},{"cell_type":"code","source":"import zipfile\nkonwinski= zipfile.ZipFile('../input/konwinski-prize/data.a_zip')\nkonwinski.extractall()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-13T16:43:39.248023Z","iopub.execute_input":"2024-12-13T16:43:39.248444Z","iopub.status.idle":"2024-12-13T16:43:41.259445Z","shell.execute_reply.started":"2024-12-13T16:43:39.248411Z","shell.execute_reply":"2024-12-13T16:43:41.258218Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"#Sampled csv \n\ndata/repos/repo__astropy__astropy-17048/astropy/timeseries/tests/data/sampled.csv","metadata":{}},{"cell_type":"code","source":"#Load train file\n\n#data/repos/repo__astropy__astropy-17048/astropy/timeseries/tests/data/sampled.csv\n\nsampled = pd.read_csv('data/repos/repo__astropy__astropy-17048/astropy/timeseries/tests/data/sampled.csv')\nsampled.tail()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-13T17:01:23.37018Z","iopub.execute_input":"2024-12-13T17:01:23.371044Z","iopub.status.idle":"2024-12-13T17:01:23.410721Z","shell.execute_reply.started":"2024-12-13T17:01:23.371Z","shell.execute_reply":"2024-12-13T17:01:23.409647Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"#Bined csv","metadata":{}},{"cell_type":"code","source":"bined = pd.read_csv('data/repos/repo__astropy__astropy-17048/astropy/timeseries/tests/data/binned.csv')\nbined.tail()","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-13T17:03:06.890073Z","iopub.execute_input":"2024-12-13T17:03:06.890541Z","iopub.status.idle":"2024-12-13T17:03:06.910232Z","shell.execute_reply.started":"2024-12-13T17:03:06.890504Z","shell.execute_reply":"2024-12-13T17:03:06.90915Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"#Readlines() method to read py files\n\nastropy-17048 parquet file","metadata":{}},{"cell_type":"code","source":"#https://stackoverflow.com/questions/28977477/typeerror-io-textiowrapper-object-is-not-subscriptable\n\nastropy_17048 = open(r\"data/repos/repo__astropy__astropy-17048/astropy/io/misc/parquet.py\", \"r\")\n\n\nprint (astropy_17048.readlines())\n\n#print (astropy_17048.read())#If you write a number inside brackets it returns only that line","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-13T17:24:54.848113Z","iopub.execute_input":"2024-12-13T17:24:54.848493Z","iopub.status.idle":"2024-12-13T17:24:54.855909Z","shell.execute_reply.started":"2024-12-13T17:24:54.848463Z","shell.execute_reply":"2024-12-13T17:24:54.854838Z"},"_kg_hide-output":true,"collapsed":true,"jupyter":{"outputs_hidden":true}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"#Image","metadata":{}},{"cell_type":"code","source":"from PIL import Image\nImage.open( 'data/repos/repo__astropy__astropy-17048/docs/_static/astropy_banner_96_dark.png')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-13T17:28:57.757723Z","iopub.execute_input":"2024-12-13T17:28:57.758158Z","iopub.status.idle":"2024-12-13T17:28:57.784174Z","shell.execute_reply.started":"2024-12-13T17:28:57.758123Z","shell.execute_reply":"2024-12-13T17:28:57.78303Z"}},"outputs":[],"execution_count":null},{"cell_type":"code","source":"!pip install PyPDF2","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-13T17:33:32.245279Z","iopub.execute_input":"2024-12-13T17:33:32.246123Z","iopub.status.idle":"2024-12-13T17:33:44.592929Z","shell.execute_reply.started":"2024-12-13T17:33:32.246079Z","shell.execute_reply":"2024-12-13T17:33:44.591653Z"},"_kg_hide-output":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"## astropy-17048 scipy","metadata":{}},{"cell_type":"code","source":"Image.open( 'data/repos/repo__astropy__astropy-17048/docs/convolution/images/scipy.png')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-13T17:53:21.771372Z","iopub.execute_input":"2024-12-13T17:53:21.7718Z","iopub.status.idle":"2024-12-13T17:53:21.784012Z","shell.execute_reply.started":"2024-12-13T17:53:21.771764Z","shell.execute_reply":"2024-12-13T17:53:21.782899Z"},"_kg_hide-input":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"## astropy-17048 Original","metadata":{}},{"cell_type":"code","source":"Image.open( 'data/repos/repo__astropy__astropy-17048/docs/convolution/images/original.png')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-13T17:54:43.362674Z","iopub.execute_input":"2024-12-13T17:54:43.36318Z","iopub.status.idle":"2024-12-13T17:54:43.375585Z","shell.execute_reply.started":"2024-12-13T17:54:43.363143Z","shell.execute_reply":"2024-12-13T17:54:43.374545Z"},"_kg_hide-input":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"## astropy-17048 convolution astropy","metadata":{}},{"cell_type":"code","source":"Image.open( 'data/repos/repo__astropy__astropy-17048/docs/convolution/images/astropy.png')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-13T17:55:30.882861Z","iopub.execute_input":"2024-12-13T17:55:30.88332Z","iopub.status.idle":"2024-12-13T17:55:30.894892Z","shell.execute_reply.started":"2024-12-13T17:55:30.883285Z","shell.execute_reply":"2024-12-13T17:55:30.893657Z"}},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"## Table astropy-17048","metadata":{}},{"cell_type":"code","source":"Image.open( 'data/repos/repo__astropy__astropy-17048/docs/table/table_repr_html.png')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-13T17:56:27.704548Z","iopub.execute_input":"2024-12-13T17:56:27.704957Z","iopub.status.idle":"2024-12-13T17:56:27.738615Z","shell.execute_reply.started":"2024-12-13T17:56:27.704922Z","shell.execute_reply":"2024-12-13T17:56:27.736927Z"},"_kg_hide-input":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"## Table row astropy-17048","metadata":{}},{"cell_type":"code","source":"Image.open( 'data/repos/repo__astropy__astropy-17048/docs/table/table_row.png')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-13T17:57:00.168453Z","iopub.execute_input":"2024-12-13T17:57:00.168877Z","iopub.status.idle":"2024-12-13T17:57:00.197701Z","shell.execute_reply.started":"2024-12-13T17:57:00.168834Z","shell.execute_reply":"2024-12-13T17:57:00.196505Z"},"_kg_hide-input":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"## astropy-17048 pull button","metadata":{}},{"cell_type":"code","source":"Image.open( 'data/repos/repo__astropy__astropy-17048/docs/development/pull_button.png')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-13T17:57:27.175551Z","iopub.execute_input":"2024-12-13T17:57:27.176012Z","iopub.status.idle":"2024-12-13T17:57:27.190092Z","shell.execute_reply.started":"2024-12-13T17:57:27.175974Z","shell.execute_reply":"2024-12-13T17:57:27.188807Z"},"_kg_hide-input":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"## branch dropdown astropy-16812","metadata":{}},{"cell_type":"code","source":"Image.open( 'data/repos/repo__astropy__astropy-16812/docs/development/branch_dropdown.png')","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-13T18:12:08.99952Z","iopub.execute_input":"2024-12-13T18:12:08.999964Z","iopub.status.idle":"2024-12-13T18:12:09.020045Z","shell.execute_reply.started":"2024-12-13T18:12:08.999928Z","shell.execute_reply":"2024-12-13T18:12:09.018679Z"},"_kg_hide-input":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"#Jackknife\n\n\"The jackknife method is a popular resampling method that provides estimates of the bias and a standard error of an estimate by recomputing the estimate from subsamples of the available sample.\"\n\nhttps://www.sciencedirect.com/topics/mathematics/jackknife-resampling#:~:text=The%20jackknife%20method%20is%20a,subsamples%20of%20the%20available%20sample.","metadata":{}},{"cell_type":"markdown","source":"![](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fe8123518-500b-45d0-aaa1-35d0e9a1e2ba_3696x1777.jpeg)https://mindfulmodeler.substack.com/p/week-2-intuition-behind-conformal","metadata":{}},{"cell_type":"markdown","source":"### test_Jackknife astropy-16898","metadata":{}},{"cell_type":"code","source":"#https://stackoverflow.com/questions/28977477/typeerror-io-textiowrapper-object-is-not-subscriptable\n\njackknife = open(r\"data/repos/repo__astropy__astropy-16898/astropy/stats/tests/test_jackknife.py\", \"r\")\n\n\nprint (jackknife.readlines())","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2024-12-13T18:14:59.424338Z","iopub.execute_input":"2024-12-13T18:14:59.424791Z","iopub.status.idle":"2024-12-13T18:14:59.431783Z","shell.execute_reply.started":"2024-12-13T18:14:59.424754Z","shell.execute_reply":"2024-12-13T18:14:59.430444Z"},"_kg_hide-input":true},"outputs":[],"execution_count":null},{"cell_type":"markdown","source":"#Astropy\n\n\"The Astropy Project is a community effort to develop a single core package for astronomy in Python and foster interoperability between packages used in the field.\"\n\n**The Astropy Project**\n\r\"\nThe Astropy Project is a community effort to develop a core package for astronomy using the Python programming language and improve usability, interoperability, and collaboration between astronomy Python packages. The core astropy package contains functionality aimed at professional astronomers and astrophysicists, but may be useful to anyone developing astronomy software. The Astropy Project also includes \"affiliated packages,\" Python packages that are not necessarily developed by the core development team, but share the goals of Astropy, and often build from the core package's code and infrastructure\"\n\nhttps://www.astropy.org/about.html.\n\nhttps://github.com/astropy/astropy","metadata":{}}]}