提交 74f1f0f1 编写于 作者: M MaoXianxin

repo analysis

上级 1492c1f8
......@@ -10,3 +10,5 @@
*.vocab
aclImdb/README
*.csv
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 2,
"outputs": [],
"source": [
"csv = pd.read_csv('111111.csv', usecols=['project full path', 'project url', 'notification count', 'star count'])"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 3,
"outputs": [
{
"data": {
"text/plain": " project full path \\\n0 .net/AspNetCore.Docs \n1 .net/aspnetcore \n2 .net/docfx \n3 .net/docs \n4 .net/fsharp \n... ... \n42352 zzy1355179/Kotlin-for-Android-Developers \n42353 zzy1355179/PickTime \n42354 zzz127333092/test \n42355 zzz_kkk_nnn/blog \n42356 zzzbh/pybind11 \n\n project url notification count \\\n0 https://codechina.csdn.net/.net/AspNetCore.Docs 0 \n1 https://codechina.csdn.net/.net/aspnetcore 0 \n2 https://codechina.csdn.net/.net/docfx 0 \n3 https://codechina.csdn.net/.net/docs 0 \n4 https://codechina.csdn.net/.net/fsharp 0 \n... ... ... \n42352 https://codechina.csdn.net/zzy1355179/Kotlin-f... 0 \n42353 https://codechina.csdn.net/zzy1355179/PickTime 0 \n42354 https://codechina.csdn.net/zzz127333092/test 0 \n42355 https://codechina.csdn.net/zzz_kkk_nnn/blog 0 \n42356 https://codechina.csdn.net/zzzbh/pybind11 0 \n\n star count \n0 0 \n1 0 \n2 0 \n3 0 \n4 0 \n... ... \n42352 0 \n42353 0 \n42354 0 \n42355 0 \n42356 0 \n\n[42357 rows x 4 columns]",
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>project full path</th>\n <th>project url</th>\n <th>notification count</th>\n <th>star count</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>.net/AspNetCore.Docs</td>\n <td>https://codechina.csdn.net/.net/AspNetCore.Docs</td>\n <td>0</td>\n <td>0</td>\n </tr>\n <tr>\n <th>1</th>\n <td>.net/aspnetcore</td>\n <td>https://codechina.csdn.net/.net/aspnetcore</td>\n <td>0</td>\n <td>0</td>\n </tr>\n <tr>\n <th>2</th>\n <td>.net/docfx</td>\n <td>https://codechina.csdn.net/.net/docfx</td>\n <td>0</td>\n <td>0</td>\n </tr>\n <tr>\n <th>3</th>\n <td>.net/docs</td>\n <td>https://codechina.csdn.net/.net/docs</td>\n <td>0</td>\n <td>0</td>\n </tr>\n <tr>\n <th>4</th>\n <td>.net/fsharp</td>\n <td>https://codechina.csdn.net/.net/fsharp</td>\n <td>0</td>\n <td>0</td>\n </tr>\n <tr>\n <th>...</th>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n <td>...</td>\n </tr>\n <tr>\n <th>42352</th>\n <td>zzy1355179/Kotlin-for-Android-Developers</td>\n <td>https://codechina.csdn.net/zzy1355179/Kotlin-f...</td>\n <td>0</td>\n <td>0</td>\n </tr>\n <tr>\n <th>42353</th>\n <td>zzy1355179/PickTime</td>\n <td>https://codechina.csdn.net/zzy1355179/PickTime</td>\n <td>0</td>\n <td>0</td>\n </tr>\n <tr>\n <th>42354</th>\n <td>zzz127333092/test</td>\n <td>https://codechina.csdn.net/zzz127333092/test</td>\n <td>0</td>\n <td>0</td>\n </tr>\n <tr>\n <th>42355</th>\n <td>zzz_kkk_nnn/blog</td>\n <td>https://codechina.csdn.net/zzz_kkk_nnn/blog</td>\n <td>0</td>\n <td>0</td>\n </tr>\n <tr>\n <th>42356</th>\n <td>zzzbh/pybind11</td>\n <td>https://codechina.csdn.net/zzzbh/pybind11</td>\n <td>0</td>\n <td>0</td>\n </tr>\n </tbody>\n</table>\n<p>42357 rows × 4 columns</p>\n</div>"
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"csv"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 4,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Int64Index([ 0, 1, 2, 3, 4, 5, 6, 7, 8,\n",
" 9,\n",
" ...\n",
" 42347, 42348, 42349, 42350, 42351, 42352, 42353, 42354, 42355,\n",
" 42356],\n",
" dtype='int64', length=34799)\n"
]
}
],
"source": [
"print(csv[csv['notification count'] == 0].index)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 5,
"outputs": [
{
"data": {
"text/plain": "34799"
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"len(csv[csv['notification count'] == 0].index)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 6,
"outputs": [
{
"data": {
"text/plain": "array([ 0, 1, 7, 26, 2, 3, 11, 49, 4, 18, 28, 5, 23,\n 6, 38, 46, 51, 32, 16, 29, 36, 160, 13, 10, 14, 12,\n 9, 35, 15, 8, 24, 17, 22, 31, 19, 69, 37, 53])"
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"csv['notification count'].unique()"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 7,
"outputs": [],
"source": [
"dict_notification = {}\n",
"for count in csv['notification count'].unique():\n",
" num = len(csv[csv['notification count'] == count].index)\n",
" dict_notification[str(count)] = num"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 8,
"outputs": [
{
"data": {
"text/plain": "{'0': 34799,\n '1': 5169,\n '7': 46,\n '26': 5,\n '2': 1295,\n '3': 481,\n '11': 11,\n '49': 1,\n '4': 221,\n '18': 3,\n '28': 3,\n '5': 110,\n '23': 4,\n '6': 78,\n '38': 2,\n '46': 1,\n '51': 1,\n '32': 1,\n '16': 7,\n '29': 1,\n '36': 1,\n '160': 1,\n '13': 8,\n '10': 21,\n '14': 13,\n '12': 6,\n '9': 23,\n '35': 3,\n '15': 5,\n '8': 19,\n '24': 1,\n '17': 8,\n '22': 3,\n '31': 1,\n '19': 2,\n '69': 1,\n '37': 1,\n '53': 1}"
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dict_notification"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 9,
"outputs": [],
"source": [
"dict_notification = dict(sorted(dict_notification.items(), key=lambda item: int(item[0])))"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 10,
"outputs": [
{
"data": {
"text/plain": "{'0': 34799,\n '1': 5169,\n '2': 1295,\n '3': 481,\n '4': 221,\n '5': 110,\n '6': 78,\n '7': 46,\n '8': 19,\n '9': 23,\n '10': 21,\n '11': 11,\n '12': 6,\n '13': 8,\n '14': 13,\n '15': 5,\n '16': 7,\n '17': 8,\n '18': 3,\n '19': 2,\n '22': 3,\n '23': 4,\n '24': 1,\n '26': 5,\n '28': 3,\n '29': 1,\n '31': 1,\n '32': 1,\n '35': 3,\n '36': 1,\n '37': 1,\n '38': 2,\n '46': 1,\n '49': 1,\n '51': 1,\n '53': 1,\n '69': 1,\n '160': 1}"
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dict_notification"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 10,
"outputs": [],
"source": [],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
\ No newline at end of file
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 2,
"outputs": [],
"source": [
"csv1 = pd.read_csv('0611-projects-star-and-notification.csv')\n",
"csv2 = pd.read_csv('0618-projects-star-and-notification.csv')"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 3,
"outputs": [],
"source": [
"csv1 = csv1.sort_values('project full path')\n",
"csv2 = csv2.sort_values('project full path')"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 4,
"outputs": [],
"source": [
"projectNames1 = []\n",
"for i in range(len(csv1)):\n",
" projectNames1.append(csv1.iloc[i, 0])\n",
"\n",
"projectNames2 = []\n",
"for i in range(len(csv2)):\n",
" projectNames2.append(csv2.iloc[i, 0])"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 5,
"outputs": [],
"source": [
"in2notin1 = []\n",
"for i in range(len(csv2)):\n",
" if not csv2.iloc[i, 0] in projectNames1:\n",
" in2notin1.append(csv2.iloc[i, 0])"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 6,
"outputs": [
{
"data": {
"text/plain": "['test', 'yixiaotao1/lstm-master']"
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"in2notin1"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 7,
"outputs": [],
"source": [
"for name in in2notin1:\n",
" csv2.drop(csv2[csv2['project full path'] == name].index, inplace=True)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 8,
"outputs": [],
"source": [
"for i in range(len(csv1)):\n",
" if csv1.iloc[i, 0] == csv2.iloc[i, 0]:\n",
" continue\n",
" print(i, csv1.iloc[i, 0], csv2.iloc[i, 0])"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 9,
"outputs": [],
"source": [
"csv1.index = np.asarray(list(range(0, len(csv1))))\n",
"csv2.index = np.asarray(list(range(0, len(csv1))))\n",
"\n",
"notification_sub = csv2['notification count'] - csv1['notification count']\n",
"csv1['notification count'] = notification_sub\n",
"\n",
"star_sub = csv2['star count'] - csv1['star count']\n",
"csv1['star count'] = star_sub"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 10,
"outputs": [],
"source": [
"csv1.to_csv('111111.csv', index=False)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 10,
"outputs": [],
"source": [],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
\ No newline at end of file
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import yaml\n",
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 2,
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'banner': [{'link': 'https://codechina.csdn.net/courses/detail/2/l?utm_source=explore', 'url': 'https://codechina.csdn.net/codechina/operation-work/uploads/6a42cb09830df2ead3d3d62cde6bc1b5/markdown-banner.jpg'}], 'groups': ['codechina', 'csdn', 'taosdata', 'apache', 'openharmony', 'milvus-io', 'dcloud', 'megvii', 'mindspore', 'openeuler', 'jenkins-zh', 'rt-thread', 'openanolis', 'paddlepaddle', 'chatopera'], 'learning_banner': [{'link': 'https://codechina.csdn.net/courses', 'url': 'https://codechina.csdn.net/codechina/operation-work/uploads/38be577289ba8800a9caa233416cd4b6/1920x480_1_.png'}], 'projects': ['hihell/python120', 'mirrors/ultralytics/yolov5', 'mirrors/vuejs/vue-devtools', 'csdn_codechina/enterprise_technology', 'EricLee/handpose_x', 'csdn_codechina/deep_learning', 'mirrors/mobz/elasticsearch-head', 'csdn_codechina/dataset', 'mirrors/vuejs-templates/webpack', 'geeknews/CSDN-Developer-Weekly', 'mirrors/PanJiaChen/vue-element-admin', 'mirrors/LiuKay/WareHouseManagSys', 'mirrors/alibaba/easyexcel', 'csdn_codechina/frequency_command', 'mirrors/lutzroeder/netron', 'dcloud/uni-starter', 'mirrors/shaochen2015821426/music-player', 'MiddlewareDesign/doc', 'mirrors/apache/incubator-echarts', 'mirrors/tensorflow/tensorflow', 'mirrors/bubbliiiing/yolo3-pytorch', 'COPU/OCOW-2021', 'mirrors/qwerty472123/wxappUnpacker', 'EricLee/dpcas', 'mirrors/antabot/white-jotter'], 'trending_words': None}\n"
]
}
],
"source": [
"with open('/home/mao/Downloads/operation-work/explore/index.yml','r', encoding='utf-8') as stream:\n",
" try:\n",
" parse_yml = yaml.safe_load(stream)\n",
" print(parse_yml)\n",
" except yaml.YAMLError as exec:\n",
" print(exec)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 3,
"outputs": [
{
"data": {
"text/plain": "['hihell/python120',\n 'mirrors/ultralytics/yolov5',\n 'mirrors/vuejs/vue-devtools',\n 'csdn_codechina/enterprise_technology',\n 'EricLee/handpose_x',\n 'csdn_codechina/deep_learning',\n 'mirrors/mobz/elasticsearch-head',\n 'csdn_codechina/dataset',\n 'mirrors/vuejs-templates/webpack',\n 'geeknews/CSDN-Developer-Weekly',\n 'mirrors/PanJiaChen/vue-element-admin',\n 'mirrors/LiuKay/WareHouseManagSys',\n 'mirrors/alibaba/easyexcel',\n 'csdn_codechina/frequency_command',\n 'mirrors/lutzroeder/netron',\n 'dcloud/uni-starter',\n 'mirrors/shaochen2015821426/music-player',\n 'MiddlewareDesign/doc',\n 'mirrors/apache/incubator-echarts',\n 'mirrors/tensorflow/tensorflow',\n 'mirrors/bubbliiiing/yolo3-pytorch',\n 'COPU/OCOW-2021',\n 'mirrors/qwerty472123/wxappUnpacker',\n 'EricLee/dpcas',\n 'mirrors/antabot/white-jotter']"
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"parse_yml['projects']"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 4,
"outputs": [],
"source": [
"csv = pd.read_csv('111111.csv', usecols=['project full path', 'project url', 'notification count', 'star count'])"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 5,
"outputs": [
{
"data": {
"text/plain": " project full path project url \\\n0 .net/AspNetCore.Docs https://codechina.csdn.net/.net/AspNetCore.Docs \n1 .net/aspnetcore https://codechina.csdn.net/.net/aspnetcore \n2 .net/docfx https://codechina.csdn.net/.net/docfx \n3 .net/docs https://codechina.csdn.net/.net/docs \n4 .net/fsharp https://codechina.csdn.net/.net/fsharp \n\n notification count star count \n0 0 0 \n1 0 0 \n2 0 0 \n3 0 0 \n4 0 0 ",
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>project full path</th>\n <th>project url</th>\n <th>notification count</th>\n <th>star count</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>0</th>\n <td>.net/AspNetCore.Docs</td>\n <td>https://codechina.csdn.net/.net/AspNetCore.Docs</td>\n <td>0</td>\n <td>0</td>\n </tr>\n <tr>\n <th>1</th>\n <td>.net/aspnetcore</td>\n <td>https://codechina.csdn.net/.net/aspnetcore</td>\n <td>0</td>\n <td>0</td>\n </tr>\n <tr>\n <th>2</th>\n <td>.net/docfx</td>\n <td>https://codechina.csdn.net/.net/docfx</td>\n <td>0</td>\n <td>0</td>\n </tr>\n <tr>\n <th>3</th>\n <td>.net/docs</td>\n <td>https://codechina.csdn.net/.net/docs</td>\n <td>0</td>\n <td>0</td>\n </tr>\n <tr>\n <th>4</th>\n <td>.net/fsharp</td>\n <td>https://codechina.csdn.net/.net/fsharp</td>\n <td>0</td>\n <td>0</td>\n </tr>\n </tbody>\n</table>\n</div>"
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"csv.head()"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 6,
"outputs": [],
"source": [
"csv = csv.sort_values('notification count', ascending=False)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 7,
"outputs": [
{
"data": {
"text/plain": " project full path \\\n4968 hihell/python120 \n28907 mirrors/ultralytics/yolov5 \n29226 mirrors/vuejs/vue-devtools \n3691 csdn_codechina/enterprise_technology \n510 EricLee/handpose_x \n\n project url notification count \\\n4968 https://codechina.csdn.net/hihell/python120 160 \n28907 https://codechina.csdn.net/mirrors/ultralytics... 69 \n29226 https://codechina.csdn.net/mirrors/vuejs/vue-d... 53 \n3691 https://codechina.csdn.net/csdn_codechina/ente... 51 \n510 https://codechina.csdn.net/EricLee/handpose_x 49 \n\n star count \n4968 4 \n28907 1 \n29226 1 \n3691 15 \n510 3 ",
"text/html": "<div>\n<style scoped>\n .dataframe tbody tr th:only-of-type {\n vertical-align: middle;\n }\n\n .dataframe tbody tr th {\n vertical-align: top;\n }\n\n .dataframe thead th {\n text-align: right;\n }\n</style>\n<table border=\"1\" class=\"dataframe\">\n <thead>\n <tr style=\"text-align: right;\">\n <th></th>\n <th>project full path</th>\n <th>project url</th>\n <th>notification count</th>\n <th>star count</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th>4968</th>\n <td>hihell/python120</td>\n <td>https://codechina.csdn.net/hihell/python120</td>\n <td>160</td>\n <td>4</td>\n </tr>\n <tr>\n <th>28907</th>\n <td>mirrors/ultralytics/yolov5</td>\n <td>https://codechina.csdn.net/mirrors/ultralytics...</td>\n <td>69</td>\n <td>1</td>\n </tr>\n <tr>\n <th>29226</th>\n <td>mirrors/vuejs/vue-devtools</td>\n <td>https://codechina.csdn.net/mirrors/vuejs/vue-d...</td>\n <td>53</td>\n <td>1</td>\n </tr>\n <tr>\n <th>3691</th>\n <td>csdn_codechina/enterprise_technology</td>\n <td>https://codechina.csdn.net/csdn_codechina/ente...</td>\n <td>51</td>\n <td>15</td>\n </tr>\n <tr>\n <th>510</th>\n <td>EricLee/handpose_x</td>\n <td>https://codechina.csdn.net/EricLee/handpose_x</td>\n <td>49</td>\n <td>3</td>\n </tr>\n </tbody>\n</table>\n</div>"
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"csv.head()"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 8,
"outputs": [
{
"data": {
"text/plain": "'hihell/python120'"
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"csv.iloc[0,0]"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 9,
"outputs": [],
"source": [
"for i in range(len(parse_yml['projects'])):\n",
" parse_yml['projects'][i] = csv.iloc[i, 0]"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 10,
"outputs": [
{
"data": {
"text/plain": "['hihell/python120',\n 'mirrors/ultralytics/yolov5',\n 'mirrors/vuejs/vue-devtools',\n 'csdn_codechina/enterprise_technology',\n 'EricLee/handpose_x',\n 'csdn_codechina/deep_learning',\n 'mirrors/mobz/elasticsearch-head',\n 'csdn_codechina/dataset',\n 'mirrors/vuejs-templates/webpack',\n 'geeknews/CSDN-Developer-Weekly',\n 'mirrors/PanJiaChen/vue-element-admin',\n 'mirrors/LiuKay/WareHouseManagSys',\n 'mirrors/alibaba/easyexcel',\n 'csdn_codechina/frequency_command',\n 'mirrors/lutzroeder/netron',\n 'dcloud/uni-starter',\n 'mirrors/shaochen2015821426/music-player',\n 'MiddlewareDesign/doc',\n 'mirrors/apache/incubator-echarts',\n 'mirrors/tensorflow/tensorflow',\n 'mirrors/bubbliiiing/yolo3-pytorch',\n 'COPU/OCOW-2021',\n 'mirrors/qwerty472123/wxappUnpacker',\n 'EricLee/dpcas',\n 'mirrors/antabot/white-jotter']"
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"parse_yml['projects']"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 11,
"outputs": [],
"source": [
"with open('/home/mao/Downloads/operation-work/explore/index.yml','w', encoding='utf-8') as stream:\n",
" try:\n",
" yaml.safe_dump(parse_yml, stream)\n",
" except yaml.YAMLError as exec:\n",
" print(exec)"
],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
},
{
"cell_type": "code",
"execution_count": 11,
"outputs": [],
"source": [],
"metadata": {
"collapsed": false,
"pycharm": {
"name": "#%%\n"
}
}
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册