摘要: 注意windows 本地的数据库名称大小写对于本地django的数据库配置无影响,但是到了centos7中,django的settings.py中的数据库配置有影响,切记切记 本地和远程的数据库传输 传输失败,如果有时这里显示 unsuccess时,请注意,解决办法,左上角:工具 >服务器监控 >选 阅读全文
posted @ 2021-01-11 13:57 ty1539 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 参考这个 https://blog.csdn.net/stormkai/article/details/88600370 和 https://www.cnblogs.com/hahajayou/p/haha.html 以及这个 https://www.cnblogs.com/handsomeye/p 阅读全文
posted @ 2021-01-02 20:16 ty1539 阅读(94) 评论(0) 推荐(0) 编辑
摘要: class Player(object): def __init__(self, uid, name, status=0, level=1): self.uid = uid self.name = name self.stat = status self.level = level class Pl 阅读全文
posted @ 2020-12-19 19:15 ty1539 阅读(42) 评论(0) 推荐(0) 编辑
摘要: 方式一:一个个的用函数实现 #_*_ encoding: utf-8 _*_ @author: ty hery 2019/1/12 import requests def getWeather(city): r = requests.get(u'http://wthrcdn.etouch.cn/we 阅读全文
posted @ 2020-12-19 19:09 ty1539 阅读(65) 评论(0) 推荐(0) 编辑
摘要: from math import pi class Circle(object): def __init__(self, radius): self.radius = radius def getRadius(self): print('调用了getRadius方法') return self.ra 阅读全文
posted @ 2020-12-19 16:12 ty1539 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 最先版本的 from telnetlib import Telnet from sys import stdin, stdout from collections import deque class TelnetClient(object): def __init__(self, addr, po 阅读全文
posted @ 2020-12-19 16:03 ty1539 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 1、如果是python2.7输入以下指令 python -m pip install --upgrade pip pip2 install --upgrade pip 2、如果是python 3.+输入以下指令 python3 -m pip install --upgrade pip pip3 in 阅读全文
posted @ 2020-12-14 15:17 ty1539 阅读(450) 评论(0) 推荐(0) 编辑
摘要: 转自: https://www.cnblogs.com/chixinshuaishuai/p/11123304.html 我的最后设置; PS1="\[\e[1;5;41;33m\][\u@ \w]\$\[\e[0m\] " PS1="[\[\e[1;5;41;33m]\u@\h \t\w]$\e[ 阅读全文
posted @ 2020-12-12 10:15 ty1539 阅读(176) 评论(0) 推荐(0) 编辑
摘要: set(),list(),tuple() 方法只接受一个值,这个值可以是列表或者是元组, 否则报错 TypeError: set expected at most 1 arguments, got 3 dict() 方法接受相当于默认参数,key不用引号'',用=号相连 sys.getsizeof( 阅读全文
posted @ 2020-12-11 10:22 ty1539 阅读(533) 评论(0) 推荐(0) 编辑
摘要: # *_*coding:utf-8_*_ def range2(n): count = 0 while count < n: count = count + 1 sign = yield count # return if sign == 'stop': print(' stop ', sign) 阅读全文
posted @ 2020-12-01 15:46 ty1539 阅读(194) 评论(0) 推荐(0) 编辑