Code Snippets Roff Manpage

Short texts Roff Manpage 🧑‍💻 Code snippets Roff Manpage ✍️ Reading lists Roff Manpage 👀

The mood checker

happy = True mood = “sad” if mood == “happy”: print(“It is great to see you happy!”) elif mood == “nervous”: print(“Take a deep breath 3 times.”) elif mood == “sad”: print(“Cheer up, life is too short”) elif mood == “excited”: print(“So excited for you!”) elif mood == “relaxed”: print(“Namaste!”) else: print(“I don’t recognize this […]

Apple M1 Python2 安装 Django 1.8

— 关闭 SIP (csrutil disable) 重启M1电脑,按住开机键不放直到进入系统恢复模式,打开终端,输入 csrutil disable 回车,然后根据引导操作,并重启电脑 如果不关闭,python 命令无法在虚拟环境运行,症状为 zsh killed ref: https://github.com/pypa/virtualenv/issues/2023 — 以x86_64方式运行终端 arch -x86_64 $SHELL ref: https://sspai.com/post/63935 — 卸载 brew (如需重新安装先卸载) ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)” — 安装x86_64 brew https://brew.sh/ /bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)” which brew /usr/local/bin/brew -> x86_64 /opt/homebrew/bin/brew -> arm — 卸载 x86_64 mysql (如需卸载) #Library not […]

homework3.4

if __name__ == ‘__main__’: a = int(input(“Введіть число 1”)) b = int(input(“Введіть число 2”)) while True: s = int(input(“Яке буде число, якщо додати ці числа?”)) if s == a + b: print(“Ви правильно порахували”) break else: print(“Ви допутили помилку при додаванні”) while True: r = int(input(“Яке буде число, якщо відняти ці числа”)) if r == […]