πŸ’» Python Notes

  • Conda

    Conda update #update the conda package manager to the latest version conda update conda #use conda to install a specific version of Anaconda conda install anaconda=VERSION-NUMBER Create and delete Env conda create -n env_name python=3.

  • Python Code Examples

    Selenium import os import pandas as pd import time from selenium import webdriver from fake_useragent import UserAgent abspath = os.path.abspath( r"C:\Program Files\Google\Chrome\Application\chromedriver.exe" ) headers = {"User-Agent": UserAgent().random} browser = webdriver.Chrome(executable_path=abspath) url = "https://weather.

  • Mosquitto

    Install sudo apt update && sudo apt upgrade sudo apt install -y mosquitto mosquitto-clients sudo systemctl enable mosquitto.service sudo systemctl status mosquitto https://randomnerdtutorials.com/how-to-install-mosquitto-broker-on-raspberry-pi/ Set configuration sudo nano /etc/mosquitto/mosquitto.conf listener 1883 allow_anonymous false password_file /etc/mosquitto/pwfile Create user and password, such as jmli/123456789