From cd05d4ee209c3e3ba286fe6e9b5e57ac18a4636f Mon Sep 17 00:00:00 2001 From: Roman Solomatin <36135455+Samoed@users.noreply.github.com> Date: Fri, 19 Apr 2024 23:00:14 +0300 Subject: [PATCH] json to csv --- notebooks/combine_repos_jsons.ipynb | 139 ++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 notebooks/combine_repos_jsons.ipynb diff --git a/notebooks/combine_repos_jsons.ipynb b/notebooks/combine_repos_jsons.ipynb new file mode 100644 index 0000000..eba0787 --- /dev/null +++ b/notebooks/combine_repos_jsons.ipynb @@ -0,0 +1,139 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/tmp/ipykernel_88815/3029550948.py:4: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)\n", + " from tqdm.autonotebook import tqdm\n" + ] + } + ], + "source": [ + "import json\n", + "import os\n", + "\n", + "import pandas as pd\n", + "from tqdm.autonotebook import tqdm" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "repos_path = \"../src/parser/data\"\n", + "out_dir = \"data\"\n", + "closed_prs_dir = os.path.join(out_dir, \"closed_prs\")\n", + "merged_prs_dir = os.path.join(out_dir, \"merged_prs\")" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [], + "source": [ + "if not os.path.exists(out_dir):\n", + " os.makedirs(out_dir)\n", + " os.makedirs(closed_prs_dir)\n", + " os.makedirs(merged_prs_dir)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "application/vnd.jupyter.widget-view+json": { + "model_id": "5e56a473b5f84ca19bbaedc0246f26c6", + "version_major": 2, + "version_minor": 0 + }, + "text/plain": [ + " 0%| | 0/86 [00:00