-
Notifications
You must be signed in to change notification settings - Fork 47
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
Showing
21 changed files
with
449 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
data | ||
__pycache__ | ||
dist |
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,10 @@ | ||
Monitor on desktop | ||
===== | ||
|
||
|
||
## Description | ||
|
||
Monitoring PC's CPU/GPU/Temperature and more info. | ||
And monitoring other info like your Bilibili.com account's follower number, or whether etc. | ||
|
||
|
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,13 @@ | ||
id: desktop_monitor | ||
name: Desktop Monitor | ||
name[zh]: 桌面监视器 | ||
version: 1.0.1 | ||
icon: assets/desktop_monitor.json | ||
author: neucrack@Sipeed Ltd | ||
desc: Monitoring PC info, or other info from internet or local. | ||
desc[zh]: 监控电脑性能参数,或者其它来自互联网或者本地的数据。 | ||
exclude: | ||
- data | ||
- dist | ||
- .gitignore | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
`1234567890-=~!@#$%^&*()_+qwertyuiop[]\asdfghjkl;'zxcvbnm,./QWERTYUIOP{}|ASDFGHJKL:"ZXCVBNM<>? | ||
℃!。,《》【】、 | ||
服务器扫描二维码以连接确保设备和电脑在同一个局域网内在电脑执行启动服务器 | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
echo "Extracting font characters from $1" | ||
|
||
fonttools subset --text-file=chars.txt --output-file=my_font.ttf $1 | ||
|
||
|
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from maix import i18n | ||
|
||
lang_dict = { | ||
"zh": { | ||
"Server": "服务器", | ||
"scan_qr_title": "扫描二维码以连接", | ||
"scan_qr_tip1": "1. 确保设备和电脑在同一个局域网内", | ||
"scan_qr_tip2": "2. 在电脑执行'pip install pc-monitor-server'", | ||
"scan_qr_tip3": "3. 在电脑执行'pc-monitor-server'启动服务器", | ||
}, | ||
"en": { | ||
"scan_qr_title": "Scan QR code to connect", | ||
"scan_qr_tip1": "1. Make sure device and PC in the same LAN", | ||
"scan_qr_tip2": "2. Execute 'pip install pc-monitor-server' on PC", | ||
"scan_qr_tip3": "3. Execute 'pc-monitor-server' on PC", | ||
} | ||
} | ||
|
||
trans = i18n.Trans(lang_dict) | ||
tr = trans.tr | ||
|
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,22 @@ | ||
from maix import camera, image | ||
|
||
class Scanner: | ||
def __init__(self, w, h): | ||
self.cam = camera.Camera(w, h) | ||
|
||
def scan(self): | ||
img = self.cam.read() | ||
if img is None: | ||
return None, None | ||
# scan qrcode | ||
qrs = img.find_qrcodes() | ||
for qr in qrs: | ||
addr = qr.payload() | ||
if addr.startswith("http"): | ||
return addr, img | ||
corners = qr.corners() | ||
for i in range(4): | ||
img.draw_line(corners[i][0], corners[i][1], corners[(i + 1) % 4][0], corners[(i + 1) % 4][1], image.COLOR_RED) | ||
return None, img | ||
# return "http://127.0.0.1:9999", img | ||
|
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,15 @@ | ||
import requests | ||
|
||
|
||
def get_pc_info(site_addr): | ||
url = site_addr + '/' | ||
try: | ||
res = requests.post(url) | ||
if res.status_code != 200: | ||
print("-- [Error] status code:", res.status_code) | ||
return None | ||
info = res.json() | ||
return info | ||
except Exception as e: | ||
print("-- [Error]", e) | ||
return None |
Oops, something went wrong.