-
Notifications
You must be signed in to change notification settings - Fork 20
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
A Rabbit
committed
Jan 7, 2021
1 parent
c0baa1f
commit abb36b6
Showing
11 changed files
with
200 additions
and
83 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 +1,2 @@ | ||
debug | ||
debug | ||
README-EN.md |
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
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,16 @@ | ||
''' | ||
Description: Error Declare | ||
Author: Chandler Lu | ||
Date: 2021-01-07 17:14:36 | ||
LastEditTime: 2021-01-07 17:15:02 | ||
''' | ||
import sys | ||
|
||
|
||
def declare_network_error(): | ||
print('Network connection refused!', end='') | ||
sys.exit(0) | ||
|
||
|
||
def declare_file_error(): | ||
sys.exit(0) |
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,14 @@ | ||
''' | ||
Description: Convert IMG to BASE64 | ||
Author: Chandler Lu | ||
Date: 2021-01-07 16:57:01 | ||
LastEditTime: 2021-01-07 17:09:50 | ||
''' | ||
from base64 import b64encode | ||
|
||
|
||
def convert_image_base64(pic_path): | ||
with open(pic_path, 'rb') as pic_file: | ||
byte_content = pic_file.read() | ||
pic_base64 = b64encode(byte_content).decode('utf-8') | ||
return pic_base64 |
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
Oops, something went wrong.