Skip to content

Instantly share code, notes, and snippets.

View lawrencechen0921's full-sized avatar
🏠
Working from home

Lawrence Chen lawrencechen0921

🏠
Working from home
View GitHub Profile
@lawrencechen0921
lawrencechen0921 / random.radiant.py
Last active August 9, 2019 13:37
密碼隨機產生器- random pwd
import string #匯入模組string
import random #匯入模組random
chs = string.ascii_letters + string.digits #ascill編碼的英文字母大小寫letters 以及 加入ascill數字
pwd=""
for x in range(random.randint(8,12)): #會回傳8-12次的數字
pwd+=random.choice(chs) #隨機選一個
print(pwd) #列印出來
@lawrencechen0921
lawrencechen0921 / Beauty is better than ugly.py
Last active August 9, 2019 13:38
USE ASCII TO ENCRYPT 學會如何加密解密
def _move_leter(letter, n):
"""
把字母變為字母表後n位的字母,z后面接a
:param letter: 小写字母
:param n: 要移動的字母
:return: 移動的结果
"""
return chr((ord(letter) - ord('a') + n) % 26 + ord('a'))
@lawrencechen0921
lawrencechen0921 / try-except-as-else.py
Last active August 8, 2019 13:45
try-except-as-else pwd example-python 與自訂例外類別
Class PwdException(Exception):
def _init_(self,pwd,len):
super(). _init_(self) #呼叫基礎類別
self.pwd = pwd
self.len = len
try:
pwd = input('請輸入密碼,長度至少為8個字元')
if len(pwd) < 8:
raise PwdException(pwd,len(pwd))
@ascendbruce
ascendbruce / equipment.md
Last active June 7, 2023 01:28
軟體工程師裝備建議

最後編輯 2020-11-01

列舉的種類基本上是生產力、健康相關,或是好用的工程師潮流精品(?)

這些是我偏好或想要的裝備,歡迎留言提供其他推薦裝備、發問為何要用或不用某個裝備、品牌。

免費的工具軟體雖然也很重要,但不在這邊討論,有興趣請查看 我的 Mac 環境設定

電腦周邊設備