摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>我的博客</title> <link rel="stylesheet" href="css-f2.css"> </head> <body> <!--左边框 -- 阅读全文
摘要:
16位随机字,包括大写字母,小写字母, 数字 import string import random size = 16 ret = ''.join(random.sample(string.ascii_letters + string.digits + string.ascii_letters + 阅读全文
摘要:
链接redis #!/usr/bin/python # -*- coding: UTF-8 -*- import redis HOST = "172.16.10.15" PORT = "6379" PSWD = "1234qwer" pool = redis.ConnectionPool(host= 阅读全文
摘要:
import turtle from turtle import * import random import time #背景 turtle.speed("fastest") # 定义速度 turtle.screensize(bg="black") # 北京颜色 n = 80 # 画笔移动基数 t 阅读全文
摘要:
创建表,需要手动先创建数据库 from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column,Integer,String,ForeignKey #字段的类型 from sqlalchemy 阅读全文
摘要:
mysql数据库 一 MySQL基础 1 图形化的管理工具:pycharm工具里面有自带的dbsql的客户端连接数据库进行管理,phpmyadmin ,navicat 2 sql语句: show databases;create database mydatabase;create table st 阅读全文
摘要:
请创建如下表,并创建相关约束 create table class( cid int auto_increment primary Key, caption char(20) ) default charset=utf8; create table teacher( tid int auto_inc 阅读全文
摘要:
def load_file(self, filename): #读文件 data = {} if os.path.exists(filename) and os.path.getsize(filename) > 0: try: with open(filename, "rb") as r: tmp 阅读全文
摘要:
def log_info(self, filename): """ init logger """ log = logging.getLogger("Redis") log.setLevel(logging.WARNING) # 日志级别,这个级别之上的打印 fh = logging.handler 阅读全文
摘要:
import socket import commands def get_ip(): hostname = socket.gethostname() #print(hostname) hostip = "127.0.0.1" try: hostip = socket.gethostbyname(h 阅读全文