Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CSDN 技术社区
skill_tree_dailycode
提交
95a55df3
S
skill_tree_dailycode
项目概览
CSDN 技术社区
/
skill_tree_dailycode
通知
11
Star
4
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
2
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
skill_tree_dailycode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
2
Issue
2
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
95a55df3
编写于
12月 10, 2021
作者:
每日一练社区
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化it冷知识处理
上级
31246570
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
204 addition
and
9 deletion
+204
-9
data/1.dailycode初阶/4.it_knowledge/48.exercises/solution.md
data/1.dailycode初阶/4.it_knowledge/48.exercises/solution.md
+1
-1
data/1.dailycode初阶/4.it_knowledge/50.exercises/solution.md
data/1.dailycode初阶/4.it_knowledge/50.exercises/solution.md
+1
-1
data/1.dailycode初阶/4.it_knowledge/68.exercises/solution.md
data/1.dailycode初阶/4.it_knowledge/68.exercises/solution.md
+1
-1
data/1.dailycode初阶/4.it_knowledge/71.exercises/solution.md
data/1.dailycode初阶/4.it_knowledge/71.exercises/solution.md
+1
-1
data_backup/it_knowledge/45.md
data_backup/it_knowledge/45.md
+1
-1
data_backup/it_knowledge/46.md
data_backup/it_knowledge/46.md
+1
-1
data_backup/it_knowledge/81.md
data_backup/it_knowledge/81.md
+1
-1
data_backup/it_knowledge/82.md
data_backup/it_knowledge/82.md
+1
-1
data_backup/it_mapping.json
data_backup/it_mapping.json
+105
-0
it_knowledge_helper.py
it_knowledge_helper.py
+91
-1
未找到文件。
data/1.dailycode初阶/4.it_knowledge/48.exercises/solution.md
浏览文件 @
95a55df3
# 不那么正经的图片工厂
# 不那么正经的图片工厂
(二)
世界上第一枚微处理器 Intel 4004 在 1971 年正式推出,英特尔反复重启这项芯片的生产计划,以至于它其实一共拥有四个设计者。
...
...
data/1.dailycode初阶/4.it_knowledge/50.exercises/solution.md
浏览文件 @
95a55df3
# 微软的灾难
# 微软的灾难
(一)
微软反垄断案又称微软反托拉斯案,是指 1997 年 10 月开始微软涉及的一系列反垄断案件;这起案件导致了微软和 Intel 公开分裂,还使得微软开源了自己的部分技术,让美国司法部打出了“推动创新”的旗号,掀起了第一波 PC 软件产业发展高潮。
...
...
data/1.dailycode初阶/4.it_knowledge/68.exercises/solution.md
浏览文件 @
95a55df3
# 不那么正经的图片工厂
# 不那么正经的图片工厂
(一)
免费的图片分享网站 Imgur 创办于2009年,提供了简单直接、带编辑功能的图片在线分享服务,如果 说 Facebook 或者 Flickr 是正规相册、照片的聚集地的话,Imgur 就是类似截图、PS 图以及各种搞笑图的归属之地。
...
...
data/1.dailycode初阶/4.it_knowledge/71.exercises/solution.md
浏览文件 @
95a55df3
# 微软的灾难
# 微软的灾难
(二)
TensorFlow 是一个开源软件库,用于各种感知和语言理解任务的机器学习,在 2015 年 11 月 9 日正式发布;TensorFlow 目前被 50 个团队用于研究和生产许多 Google 商业产品,是数学、机器学习和深度学习领域应用最广泛的开源工具之一。
...
...
data_backup/it_knowledge/45.md
浏览文件 @
95a55df3
## 标题
不那么正经的图片工厂
不那么正经的图片工厂
(一)
## 描述
...
...
data_backup/it_knowledge/46.md
浏览文件 @
95a55df3
## 标题
不那么正经的图片工厂
不那么正经的图片工厂
(二)
## 描述
...
...
data_backup/it_knowledge/81.md
浏览文件 @
95a55df3
## 标题
微软的灾难
微软的灾难
(一)
## 描述
...
...
data_backup/it_knowledge/82.md
浏览文件 @
95a55df3
## 标题
微软的灾难
微软的灾难
(二)
## 描述
...
...
data_backup/it_mapping.json
0 → 100644
浏览文件 @
95a55df3
{
"data_backup/it_knowledge/28.md"
:
"data/1.dailycode初阶/4.it_knowledge/1.exercises/solution.md"
,
"data_backup/it_knowledge/79.md"
:
"data/1.dailycode初阶/4.it_knowledge/2.exercises/solution.md"
,
"data_backup/it_knowledge/100.md"
:
"data/1.dailycode初阶/4.it_knowledge/3.exercises/solution.md"
,
"data_backup/it_knowledge/5.md"
:
"data/1.dailycode初阶/4.it_knowledge/4.exercises/solution.md"
,
"data_backup/it_knowledge/69.md"
:
"data/1.dailycode初阶/4.it_knowledge/5.exercises/solution.md"
,
"data_backup/it_knowledge/38.md"
:
"data/1.dailycode初阶/4.it_knowledge/6.exercises/solution.md"
,
"data_backup/it_knowledge/18.md"
:
"data/1.dailycode初阶/4.it_knowledge/7.exercises/solution.md"
,
"data_backup/it_knowledge/49.md"
:
"data/1.dailycode初阶/4.it_knowledge/8.exercises/solution.md"
,
"data_backup/it_knowledge/59.md"
:
"data/1.dailycode初阶/4.it_knowledge/9.exercises/solution.md"
,
"data_backup/it_knowledge/1.md"
:
"data/1.dailycode初阶/4.it_knowledge/10.exercises/solution.md"
,
"data_backup/it_knowledge/19.md"
:
"data/1.dailycode初阶/4.it_knowledge/11.exercises/solution.md"
,
"data_backup/it_knowledge/48.md"
:
"data/1.dailycode初阶/4.it_knowledge/12.exercises/solution.md"
,
"data_backup/it_knowledge/58.md"
:
"data/1.dailycode初阶/4.it_knowledge/13.exercises/solution.md"
,
"data_backup/it_knowledge/0.md"
:
"data/1.dailycode初阶/4.it_knowledge/14.exercises/solution.md"
,
"data_backup/it_knowledge/29.md"
:
"data/1.dailycode初阶/4.it_knowledge/15.exercises/solution.md"
,
"data_backup/it_knowledge/78.md"
:
"data/1.dailycode初阶/4.it_knowledge/16.exercises/solution.md"
,
"data_backup/it_knowledge/101.md"
:
"data/1.dailycode初阶/4.it_knowledge/17.exercises/solution.md"
,
"data_backup/it_knowledge/4.md"
:
"data/1.dailycode初阶/4.it_knowledge/18.exercises/solution.md"
,
"data_backup/it_knowledge/68.md"
:
"data/1.dailycode初阶/4.it_knowledge/19.exercises/solution.md"
,
"data_backup/it_knowledge/39.md"
:
"data/1.dailycode初阶/4.it_knowledge/20.exercises/solution.md"
,
"data_backup/it_knowledge/47.md"
:
"data/1.dailycode初阶/4.it_knowledge/21.exercises/solution.md"
,
"data_backup/it_knowledge/16.md"
:
"data/1.dailycode初阶/4.it_knowledge/22.exercises/solution.md"
,
"data_backup/it_knowledge/80.md"
:
"data/1.dailycode初阶/4.it_knowledge/23.exercises/solution.md"
,
"data_backup/it_knowledge/22.md"
:
"data/1.dailycode初阶/4.it_knowledge/24.exercises/solution.md"
,
"data_backup/it_knowledge/73.md"
:
"data/1.dailycode初阶/4.it_knowledge/25.exercises/solution.md"
,
"data_backup/it_knowledge/63.md"
:
"data/1.dailycode初阶/4.it_knowledge/26.exercises/solution.md"
,
"data_backup/it_knowledge/32.md"
:
"data/1.dailycode初阶/4.it_knowledge/27.exercises/solution.md"
,
"data_backup/it_knowledge/90.md"
:
"data/1.dailycode初阶/4.it_knowledge/28.exercises/solution.md"
,
"data_backup/it_knowledge/57.md"
:
"data/1.dailycode初阶/4.it_knowledge/29.exercises/solution.md"
,
"data_backup/it_knowledge/84.md"
:
"data/1.dailycode初阶/4.it_knowledge/30.exercises/solution.md"
,
"data_backup/it_knowledge/77.md"
:
"data/1.dailycode初阶/4.it_knowledge/31.exercises/solution.md"
,
"data_backup/it_knowledge/26.md"
:
"data/1.dailycode初阶/4.it_knowledge/32.exercises/solution.md"
,
"data_backup/it_knowledge/12.md"
:
"data/1.dailycode初阶/4.it_knowledge/33.exercises/solution.md"
,
"data_backup/it_knowledge/43.md"
:
"data/1.dailycode初阶/4.it_knowledge/34.exercises/solution.md"
,
"data_backup/it_knowledge/53.md"
:
"data/1.dailycode初阶/4.it_knowledge/35.exercises/solution.md"
,
"data_backup/it_knowledge/36.md"
:
"data/1.dailycode初阶/4.it_knowledge/36.exercises/solution.md"
,
"data_backup/it_knowledge/67.md"
:
"data/1.dailycode初阶/4.it_knowledge/37.exercises/solution.md"
,
"data_backup/it_knowledge/94.md"
:
"data/1.dailycode初阶/4.it_knowledge/38.exercises/solution.md"
,
"data_backup/it_knowledge/85.md"
:
"data/1.dailycode初阶/4.it_knowledge/39.exercises/solution.md"
,
"data_backup/it_knowledge/76.md"
:
"data/1.dailycode初阶/4.it_knowledge/40.exercises/solution.md"
,
"data_backup/it_knowledge/27.md"
:
"data/1.dailycode初阶/4.it_knowledge/41.exercises/solution.md"
,
"data_backup/it_knowledge/13.md"
:
"data/1.dailycode初阶/4.it_knowledge/42.exercises/solution.md"
,
"data_backup/it_knowledge/42.md"
:
"data/1.dailycode初阶/4.it_knowledge/43.exercises/solution.md"
,
"data_backup/it_knowledge/52.md"
:
"data/1.dailycode初阶/4.it_knowledge/44.exercises/solution.md"
,
"data_backup/it_knowledge/37.md"
:
"data/1.dailycode初阶/4.it_knowledge/45.exercises/solution.md"
,
"data_backup/it_knowledge/66.md"
:
"data/1.dailycode初阶/4.it_knowledge/46.exercises/solution.md"
,
"data_backup/it_knowledge/95.md"
:
"data/1.dailycode初阶/4.it_knowledge/47.exercises/solution.md"
,
"data_backup/it_knowledge/46.md"
:
"data/1.dailycode初阶/4.it_knowledge/48.exercises/solution.md"
,
"data_backup/it_knowledge/17.md"
:
"data/1.dailycode初阶/4.it_knowledge/49.exercises/solution.md"
,
"data_backup/it_knowledge/81.md"
:
"data/1.dailycode初阶/4.it_knowledge/50.exercises/solution.md"
,
"data_backup/it_knowledge/23.md"
:
"data/1.dailycode初阶/4.it_knowledge/51.exercises/solution.md"
,
"data_backup/it_knowledge/72.md"
:
"data/1.dailycode初阶/4.it_knowledge/52.exercises/solution.md"
,
"data_backup/it_knowledge/62.md"
:
"data/1.dailycode初阶/4.it_knowledge/53.exercises/solution.md"
,
"data_backup/it_knowledge/33.md"
:
"data/1.dailycode初阶/4.it_knowledge/54.exercises/solution.md"
,
"data_backup/it_knowledge/91.md"
:
"data/1.dailycode初阶/4.it_knowledge/55.exercises/solution.md"
,
"data_backup/it_knowledge/56.md"
:
"data/1.dailycode初阶/4.it_knowledge/56.exercises/solution.md"
,
"data_backup/it_knowledge/24.md"
:
"data/1.dailycode初阶/4.it_knowledge/57.exercises/solution.md"
,
"data_backup/it_knowledge/75.md"
:
"data/1.dailycode初阶/4.it_knowledge/58.exercises/solution.md"
,
"data_backup/it_knowledge/86.md"
:
"data/1.dailycode初阶/4.it_knowledge/59.exercises/solution.md"
,
"data_backup/it_knowledge/41.md"
:
"data/1.dailycode初阶/4.it_knowledge/60.exercises/solution.md"
,
"data_backup/it_knowledge/10.md"
:
"data/1.dailycode初阶/4.it_knowledge/61.exercises/solution.md"
,
"data_backup/it_knowledge/51.md"
:
"data/1.dailycode初阶/4.it_knowledge/62.exercises/solution.md"
,
"data_backup/it_knowledge/9.md"
:
"data/1.dailycode初阶/4.it_knowledge/63.exercises/solution.md"
,
"data_backup/it_knowledge/96.md"
:
"data/1.dailycode初阶/4.it_knowledge/64.exercises/solution.md"
,
"data_backup/it_knowledge/65.md"
:
"data/1.dailycode初阶/4.it_knowledge/65.exercises/solution.md"
,
"data_backup/it_knowledge/34.md"
:
"data/1.dailycode初阶/4.it_knowledge/66.exercises/solution.md"
,
"data_backup/it_knowledge/14.md"
:
"data/1.dailycode初阶/4.it_knowledge/67.exercises/solution.md"
,
"data_backup/it_knowledge/45.md"
:
"data/1.dailycode初阶/4.it_knowledge/68.exercises/solution.md"
,
"data_backup/it_knowledge/71.md"
:
"data/1.dailycode初阶/4.it_knowledge/69.exercises/solution.md"
,
"data_backup/it_knowledge/20.md"
:
"data/1.dailycode初阶/4.it_knowledge/70.exercises/solution.md"
,
"data_backup/it_knowledge/82.md"
:
"data/1.dailycode初阶/4.it_knowledge/71.exercises/solution.md"
,
"data_backup/it_knowledge/92.md"
:
"data/1.dailycode初阶/4.it_knowledge/72.exercises/solution.md"
,
"data_backup/it_knowledge/30.md"
:
"data/1.dailycode初阶/4.it_knowledge/73.exercises/solution.md"
,
"data_backup/it_knowledge/61.md"
:
"data/1.dailycode初阶/4.it_knowledge/74.exercises/solution.md"
,
"data_backup/it_knowledge/55.md"
:
"data/1.dailycode初阶/4.it_knowledge/75.exercises/solution.md"
,
"data_backup/it_knowledge/15.md"
:
"data/1.dailycode初阶/4.it_knowledge/76.exercises/solution.md"
,
"data_backup/it_knowledge/44.md"
:
"data/1.dailycode初阶/4.it_knowledge/77.exercises/solution.md"
,
"data_backup/it_knowledge/70.md"
:
"data/1.dailycode初阶/4.it_knowledge/78.exercises/solution.md"
,
"data_backup/it_knowledge/21.md"
:
"data/1.dailycode初阶/4.it_knowledge/79.exercises/solution.md"
,
"data_backup/it_knowledge/83.md"
:
"data/1.dailycode初阶/4.it_knowledge/80.exercises/solution.md"
,
"data_backup/it_knowledge/93.md"
:
"data/1.dailycode初阶/4.it_knowledge/81.exercises/solution.md"
,
"data_backup/it_knowledge/31.md"
:
"data/1.dailycode初阶/4.it_knowledge/82.exercises/solution.md"
,
"data_backup/it_knowledge/60.md"
:
"data/1.dailycode初阶/4.it_knowledge/83.exercises/solution.md"
,
"data_backup/it_knowledge/54.md"
:
"data/1.dailycode初阶/4.it_knowledge/84.exercises/solution.md"
,
"data_backup/it_knowledge/25.md"
:
"data/1.dailycode初阶/4.it_knowledge/85.exercises/solution.md"
,
"data_backup/it_knowledge/74.md"
:
"data/1.dailycode初阶/4.it_knowledge/86.exercises/solution.md"
,
"data_backup/it_knowledge/87.md"
:
"data/1.dailycode初阶/4.it_knowledge/87.exercises/solution.md"
,
"data_backup/it_knowledge/40.md"
:
"data/1.dailycode初阶/4.it_knowledge/88.exercises/solution.md"
,
"data_backup/it_knowledge/11.md"
:
"data/1.dailycode初阶/4.it_knowledge/89.exercises/solution.md"
,
"data_backup/it_knowledge/50.md"
:
"data/1.dailycode初阶/4.it_knowledge/90.exercises/solution.md"
,
"data_backup/it_knowledge/8.md"
:
"data/1.dailycode初阶/4.it_knowledge/91.exercises/solution.md"
,
"data_backup/it_knowledge/97.md"
:
"data/1.dailycode初阶/4.it_knowledge/92.exercises/solution.md"
,
"data_backup/it_knowledge/64.md"
:
"data/1.dailycode初阶/4.it_knowledge/93.exercises/solution.md"
,
"data_backup/it_knowledge/35.md"
:
"data/1.dailycode初阶/4.it_knowledge/94.exercises/solution.md"
,
"data_backup/it_knowledge/3.md"
:
"data/1.dailycode初阶/4.it_knowledge/95.exercises/solution.md"
,
"data_backup/it_knowledge/88.md"
:
"data/1.dailycode初阶/4.it_knowledge/96.exercises/solution.md"
,
"data_backup/it_knowledge/102.md"
:
"data/1.dailycode初阶/4.it_knowledge/97.exercises/solution.md"
,
"data_backup/it_knowledge/98.md"
:
"data/1.dailycode初阶/4.it_knowledge/98.exercises/solution.md"
,
"data_backup/it_knowledge/7.md"
:
"data/1.dailycode初阶/4.it_knowledge/99.exercises/solution.md"
,
"data_backup/it_knowledge/89.md"
:
"data/1.dailycode初阶/4.it_knowledge/100.exercises/solution.md"
,
"data_backup/it_knowledge/99.md"
:
"data/1.dailycode初阶/4.it_knowledge/101.exercises/solution.md"
,
"data_backup/it_knowledge/6.md"
:
"data/1.dailycode初阶/4.it_knowledge/102.exercises/solution.md"
,
"data_backup/it_knowledge/2.md"
:
"data/1.dailycode初阶/4.it_knowledge/103.exercises/solution.md"
}
\ No newline at end of file
it_knowledge_helper.py
浏览文件 @
95a55df3
...
...
@@ -4,6 +4,7 @@ import sys
import
uuid
import
json
import
shutil
from
collections
import
Counter
def
get_files_path
(
file_dir
,
filetype
=
'.txt'
):
...
...
@@ -146,4 +147,93 @@ def extract_it_knowledge():
with
open
(
solution_md_path
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
f
.
write
(
solution_md_data
)
extract_it_knowledge
()
\ No newline at end of file
def
get_source_data_mapping
():
file_mapping
=
{}
sourcde_dir
=
'data_backup/it_knowledge'
files
=
get_files_path
(
sourcde_dir
,
'.md'
)
count
=
0
title_list
=
[]
data_dir
=
'data/1.dailycode初阶/4.it_knowledge'
for
i
in
range
(
1
,
104
):
exercises_dir
=
os
.
path
.
join
(
data_dir
,
'{}.exercises'
.
format
(
i
))
solution_md_path
=
os
.
path
.
join
(
exercises_dir
,
'solution.md'
)
with
open
(
solution_md_path
,
'r'
)
as
f
:
solution_md_data
=
f
.
read
()
title
=
re
.
findall
(
r
'^# (.*)\n'
,
solution_md_data
)[
0
]
title
=
title
.
strip
()
for
file
in
files
:
print
(
file
)
with
open
(
file
,
'r'
)
as
f
:
source_file_data
=
f
.
read
()
source_title
=
re
.
findall
(
r
'## 标题\n(.*?)\n##'
,
source_file_data
,
re
.
S
)[
0
]
source_title
=
source_title
.
strip
()
if
title
==
source_title
:
count
+=
1
title_list
.
append
(
title
)
print
(
title
)
print
(
source_title
)
print
(
solution_md_path
)
file_mapping
[
file
]
=
solution_md_path
file_mapping_json
=
json
.
dumps
(
file_mapping
,
indent
=
2
,
ensure_ascii
=
False
)
with
open
(
'data_backup/it_mapping.json'
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
f
.
write
(
file_mapping_json
)
def
update_it_konwledge
():
data_dir
=
'data_backup/it_knowledge'
it_mapping_path
=
'data_backup/it_mapping.json'
it_mapping
=
load_json
(
it_mapping_path
)
exist_files
=
it_mapping
.
keys
()
files
=
get_files_path
(
data_dir
,
'.md'
)
language
=
'json'
for
file
in
files
:
with
open
(
file
,
'r'
,
encoding
=
'utf-8'
)
as
f
:
data
=
f
.
read
()
file_name
=
file
.
split
(
'/'
)[
-
1
].
split
(
'.'
)[
0
]
question_title
=
re
.
findall
(
r
'## 标题\n(.*?)\n##'
,
data
,
re
.
S
)[
0
]
question_title
=
question_title
.
strip
()
question_content
=
re
.
findall
(
r
'## 描述\n(.*?)\n##'
,
data
,
re
.
S
)[
0
]
question_content
=
question_content
.
strip
()
keywords
=
re
.
findall
(
r
'## 关键词\n(.*?)\n##'
,
data
,
re
.
S
)[
0
]
keywords
=
keywords
.
strip
()
keywords_list
=
keywords
.
split
(
';'
)
keywords
=
','
.
join
(
keywords_list
)
topic_link
=
re
.
findall
(
r
'## 链接\n(.*?)\n##'
,
data
,
re
.
S
)[
0
]
topic_link
=
topic_link
.
strip
()
difficulty
=
'简单'
choice
=
re
.
findall
(
r
'## 选项\n(.*?)\n##'
,
data
,
re
.
S
)[
0
]
choice_list
=
choice
.
split
(
'
\n
'
)
choice_list_res
=
[]
for
tem
in
choice_list
:
if
tem
==
''
:
continue
else
:
tem
=
tem
.
strip
()
choice_list_res
.
append
(
tem
)
answer
=
re
.
findall
(
r
'## 答案\n(.*)'
,
data
,
re
.
S
)[
0
]
answer
=
answer
.
strip
()
assert
answer
in
choice_list_res
question_id
=
file_name
choice_list_remove
=
[]
for
idx
,
val
in
enumerate
(
choice_list_res
):
if
val
==
answer
:
answer_idx
=
idx
continue
else
:
choice_list_remove
.
append
(
val
)
if
file
in
exist_files
:
save_path
=
it_mapping
[
file
]
solution_md_data
=
f
"#
{
question_title
}
\n\n
{
question_content
}
\n\n
## 答案
\n\n
```
{
language
}
\n
{
answer
}
\n
```
\n\n
## 选项
\n\n
### A
\n\n
```
{
language
}
\n
{
choice_list_remove
[
0
]
}
\n
```
\n\n
### B
\n\n
```
{
language
}
\n
{
choice_list_remove
[
1
]
}
\n
```
\n\n
### C
\n\n
```
{
language
}
\n
{
choice_list_remove
[
2
]
}
\n
```"
with
open
(
save_path
,
'w'
,
encoding
=
'utf-8'
)
as
f
:
f
.
write
(
solution_md_data
)
update_it_konwledge
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录