07 2022 档案
摘要:curl 是常用的命令行工具,用来请求 Web 服务器。它的名字就是客户端(client)的 URL 工具的意思。 它的功能非常强大,命令行参数多达几十种。如果熟练的话,完全可以取代 Postman 这一类的图形界面工具。 附上 curl 手册 直译手册中描述:curl 提供了一大卡车的小技巧,像
阅读全文
摘要:pip 是 Python 包管理工具,该工具提供了对Python 包的查找、下载、安装、卸载的功能。 目前如果你在 python.org 下载最新版本的安装包,则是已经自带了该工具。 注意:Python 2.7.9 + 或 Python 3.4+ 以上版本都自带 pip 工具。 pip 官网:htt
阅读全文
摘要:window下安装django Python 下载地址:https://www.python.org/downloads/ Django 下载地址:https://www.djangoproject.com/download/ 安装完成后你需要设置 Python 环境变量。 右击计算机->属性->高
阅读全文
摘要:1 Debian系列 Debian系列主要包含Debian和Ubuntu等Debian最具特色的是apt-get/dpkg包管理方式,在二进制文件发行方式中,APT应该是最好的了。Debian的资料也很丰富,有很多支持的社区,比较方便找到解决问题的方法。Debian社区的网址:https://deb
阅读全文
摘要:虚拟环境: 安装虚拟环境 1.通过pip安装虚拟环境: -- pip install virtualenv 2.前往目标文件夹创建纯净虚拟环境: -- virtualenv 虚拟环境名 (py3-env1) 4.终端启动虚拟环境: -- cd py3-env1\Scripts -- activate
阅读全文
摘要:创建用户并设置密码 adduser username #添加用户 passwd username #为用户设置密码 添加文件权限 chmod 777 filename
阅读全文
摘要:ddl database define language # 新建数据库 create database if not exists database_name character set 'utf8' # 新建数据表 create table table_name ( id int (7) stu
阅读全文
摘要:python 3.x import pymysql conn=pymysql.connect(host,port,user,passwd,database,chartset)cursor=conn.cursor()row_count=cursor.execute('show databases;')
阅读全文
摘要:通过 dir 方法 可以查看 dir(obj) 如果是自定义类生成的对象,可以通过 __dict__ 属性来查看, class Test(): ''' this is document ''' x=1 def __init__(self,name,age): self.name=name self.
阅读全文
摘要:socket 实现 tcp server import socket soc=socket.socket() #默认 family=-1,type=-1, proto=-1, fileno=None ''' if fileno is None: if family == -1: family = A
阅读全文
摘要:import serial ser= serial.Serial('/dev/ttyAMA0',9600)ser.write('hello world'.encode('ascii'))data_len = ser.inWaiting()ser.read(data_len)
阅读全文
摘要:openpyxl 用法实例 import requests import openpyxl import json import time res = requests.request('GET', 'http://1.2.32.2:23/data/getsites') text = res.tex
阅读全文