sudo pip install googletrans==3.1.0a0
sudo pip install gTTS
prepare mpg123
" pronunce the word on the cursor, type 'gsp'
#!/bin/python | |
###### 英文文本:source.txt , 中文文本:target.txt 逐行對照,放入translated.txt | |
def main(): | |
sFile = "./source.txt" | |
tFile = "./target.txt" | |
with open( sFile, 'r') as f: | |
source = list( f.readlines() ) | |
source = [ i for i in source if i.strip()] | |
with open( tFile, 'r') as f: | |
target = list( f.readlines() ) |
#!/bin/python | |
# show process start | |
import multiprocessing | |
from multiprocessing import Process | |
import time | |
### Test : join(), start(), is_alive, close() | |
p = Process( target=time.sleep , args=(10,)) | |
print( p ) # show <process name>, <pid> <parent> state=initial | |
print( p.is_alive() )# False, not start |
sudo pip install googletrans==3.1.0a0
sudo pip install gTTS
prepare mpg123
" pronunce the word on the cursor, type 'gsp'
command: explorer.exe music.mp3
上述缺點是不夠輕量,希望在cmd 一行命令撥放音樂。
若要在用linux程式撥放音樂,需要設定硬體驅動程式的讀取,會非常麻煩。 microsoft/WSL#5816 https://www.reddit.com/r/bashonubuntuonwindows/comments/hrn1lz/wsl_sound_through_pulseaudio_solved/
附註: windows11 WSL 好像已經解決此問題。 microsoft/WSL#5816 (comment)
here skip basic cmake usage.
ls
; reference | |
; auto hot key, refresh chrome, without leaving the focus of editor | |
; //www.autohotkey.com/board/topic/113163-refresh-google-chrome-with-a-button-will-pay/?p=661651 | |
; For wsl && vim editor | |
; how execute windows file on wsl | |
; https://docs.microsoft.com/en-us/windows/wsl/filesystems#run-windows-tools-from-wsl | |
; 1. using "convert .ahk to .exe" program, convert this ahk file. | |
; 2. copy the converted file "F5_chrome.exe" to <your_wsl_path> |
Todo: | |
1.what is gist | |
2.ceate a gist | |
3.fork a gist | |
4.copy a gist | |
5.edit a gist | |
6.delete a gist | |
Gist in command line: | |
1.download a gist from command line |