-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4541042
commit a35670f
Showing
23 changed files
with
2,374 additions
and
696 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.pio/ | ||
.DS_Store | ||
.vscode/ | ||
..VSCodeCounter/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# 股票行情实时查看功能 | ||
|
||
> 作者:redwolf | ||
> 时间:2022-10-07 12:58 | ||
> 修改: | ||
> 功能描述:获取选择的股票的当前价格、最高价格、最低价格、今日开盘价、昨日收盘价、成交量、成交金额等 | ||
## 查看股票实时行情 | ||
http://hq.sinajs.cn/list= + uid; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
import re | ||
import sys | ||
|
||
re_obj = re.compile(r'/\*\(.+\)\*/') | ||
# re_obj = re.compile(r'[\u4e00-\u9fa5]') | ||
word_set = set() | ||
result = "" # 存放返回的结果 | ||
|
||
|
||
def searchWordByRe(file_name): | ||
global re_obj | ||
global word_set | ||
global result | ||
|
||
file_obj = open(file_name, 'r', encoding='utf-8') | ||
|
||
try: | ||
text_list = file_obj.readlines() | ||
|
||
for line in text_list: | ||
dict_list = re_obj.findall(line) | ||
|
||
for font in dict_list: | ||
word = font[3:-3] | ||
if word not in word_set: | ||
# 去重 | ||
word_set.add(word) | ||
result = result + word | ||
|
||
finally: | ||
file_obj.close() | ||
|
||
print(result) | ||
|
||
|
||
def searchWordByEocode(file_name): | ||
global re_obj | ||
global word_set | ||
global result | ||
|
||
file_obj = open(file_name, 'r', encoding='utf-8') | ||
|
||
try: | ||
text_list = file_obj.readlines() | ||
for line in text_list: | ||
for word in line: | ||
if u'\u4e00' <= word <= u'\u9fff': | ||
if word not in word_set: | ||
# 去重 | ||
word_set.add(word) | ||
result = result + word | ||
|
||
finally: | ||
file_obj.close() | ||
|
||
print(result) | ||
|
||
|
||
if __name__ == "__main__": | ||
""" | ||
用法:python get_font.py 字模.c文件的路径 | ||
""" | ||
|
||
file_name = sys.argv[1] | ||
print(file_name) | ||
|
||
searchWordByRe(file_name) | ||
# searchWordByEocode() |
Oops, something went wrong.