canvas简介 在学习一项新技术之前,先了解这项技术的历史发展及成因会帮助我们更深刻的理解这项技术。 历史上,canvas最早是由Apple Inc. 提出的,在Mac OS X webkit中创建控制板组件使用,而在canvas称为HTML草案及标准之前,我们是通过一些替代方式去绘图的,比如为人 ...
分类:
其他好文 时间:
2020-04-01 13:12:59
阅读次数:
74
需求场景: 在写django的时候,有时候会遇到我们需要使用django中的模型(Model),但是脚本代码是单独执行的,并不是和django服务一起执行的,这时候需要在文件的开始部分做如下设置: import os, sys sys.path.insert(0, "/data/source/") ...
分类:
其他好文 时间:
2020-04-01 11:12:34
阅读次数:
85
import os def print_directory_contents(sPath): for sChild in os.listdir(sPath): sChildPath = os.path.join(sPath, sChild) if os.path.isdir(sChildPath): ...
分类:
编程语言 时间:
2020-04-01 11:05:35
阅读次数:
81
import os print(os.path.dirname(os.path.dirname(__file__))) print(os.path.dirname(__file__)) print(os.path.dirname("D:/可以删的/untitled")) 结果 C:\Users\Ad ...
分类:
其他好文 时间:
2020-04-01 10:39:59
阅读次数:
110
1、setting.py 注意:创建log文件夹 # 存放Log的目录 LOGGING_DIR = os.path.join(BASE_DIR, 'log') LOGGING = { 'version': 1, 'disable_existing_loggers': True, 'formatter ...
分类:
其他好文 时间:
2020-04-01 10:39:45
阅读次数:
94
一、时间模块 1、time模块 在python中时间可分为三种格式: 1、时间戳:从1970年到现在经过的秒数 作用:用于计算时间 间隔 的计算 2、按照某种个格式显示的时间: 作用:用于比较清楚的展示时间( 以指定格式输入"年月日 时分秒") 3、格式化的时间(得到是一个关于时间的元组) 作用:用 ...
分类:
其他好文 时间:
2020-04-01 00:38:23
阅读次数:
83
rancher官方地址 https://www.rancher.com/ https://www.rancher.cn/ ###国内地址 https://github.com/rancher/rancher https://github.com/rancher/os ###ranchos地址http ...
分类:
其他好文 时间:
2020-04-01 00:34:08
阅读次数:
68
``` # coding=utf-8 from queue import Queue import nmap import threading import requests import chardet import re import json import os # 存储所有扫描的ip和端口服... ...
分类:
编程语言 时间:
2020-04-01 00:27:55
阅读次数:
87
今天部分的内容会写的比较随意,想到需要复习的知识我就会进行一下演示,这样便于尽快把欠下的课程选择部分和即将要开始的ftp实现任务尽快完成。 一、文件处理部分 打开文件的一个固定格式:文件句柄 = open('文件路径', '模式') 模式有以下: 1. 打开文件的模式有(默认为文本模式): r ,只 ...
分类:
编程语言 时间:
2020-03-31 22:54:01
阅读次数:
105
工作上零零散散惹人厌烦的事不提,总之不得不在自己电脑上安装虚拟机 guest机器可能连通host,但是host无论如何连不通guest。 搜索半天无果,晚上找到这么一篇: https://superuser.com/questions/521072/cant ping guest os in vir ...
分类:
其他好文 时间:
2020-03-31 20:45:24
阅读次数:
73