Python Advanced (13) – Get special attributes of object information

Original link: https://chegva.com/5288.html ◎Knowledge points Special properties and special methods Special attribute __dict__ Special attribute __doc__ Special attribute __slots__ ◎Script practice ▽ Special properties and special methods “””One, special properties and special methods””” “”” In the return value after calling the built-in function dir(), many attributes and methods start and end with double underscores __,

Python Advanced (13) – Get special attributes of object information Read More »

Linux common commands-50: crontab

The crontab command is used to submit and manage user tasks that need to be executed periodically, similar to the scheduled tasks under windows . Syntax format: crontab [parameter] Common parameters: Example # 显示计划任务crontab -l # 编辑计划任务crontab -e The format of the scheduled task is minute hour day month week command Respectively: time-sharing sun-month-week commands

Linux common commands-50: crontab Read More »

Linux common commands-49: clear

clear command is used to clear the screen. Essentially, the terminal display page is turned back one page, and if you scroll up the screen, you can still see the previous operation. Syntax format: clear [parameter] Example # 清屏clear This article is reprinted from https://xugaoxiang.com/2022/06/14/linux-cmds-49-clear/ This site is for inclusion only, and the copyright belongs

Linux common commands-49: clear Read More »

Linux common commands-48: ufw

ufw program is used to manage firewalls. Compared with iptables , it is easier to use. By default, sudo apt install ufw needs to be manually installed. Syntax format: ufw [parameter] Common parameters: Example # 启动ufw enable # 关闭ufw disable # 重启ufw reload # 显示防火墙状态及规则ufw status # 重置配置ufw reset # 允许外部访问80端口ufw allow 80 # 禁止访问80端口ufw

Linux common commands-48: ufw Read More »

Linux common commands-47: source

The source command is usually used to execute the initialization file that has just been modified to take effect immediately, such as environment variables. Syntax format: source [file] Example # 很多时候,我们安装过一些基础软件,会设置一些环境变量,像PATH,通常是编辑~/.bashrc,想让变量即刻生效,就可以使用source source ~/.bashrc This article is reprinted from https://xugaoxiang.com/2022/06/14/linux-cmds-47-source/ This site is for inclusion only, and the copyright belongs to the original author.

Linux common commands-47: source Read More »

Linux common commands-46: chown

The chown command is used to change the user and user group to which a file or folder belongs. Only super administrators have permission to execute it. Syntax format: chown [parameter] Common parameters: Example # 将test.py文件的用户组和用户都改为xugaoxiang,冒号前的是用户,冒号后的是用户组,很多时候它们的名称是一样的chown xugaoxiang:xugaoxiang test.py # 递归修改文件夹chown -R root:root test This article is reprinted from https://xugaoxiang.com/2022/06/14/linux-cmds-46-chown/ This site is for inclusion only,

Linux common commands-46: chown Read More »

Replacing vagueness with four likenesses

Original link: https://blog.yitianshijie.net/2022/06/14/be-exotic/ Foreword of Yang Ruichun’s “Southern Weekend Special Manuscript”: In my opinion, the choice of words and sentences looks like a writing technique, but it is actually a kind of collective unconscious. The efforts of news writing to get rid of the stereotyped tone for more than 30 years, and to delve deeper,

Replacing vagueness with four likenesses Read More »