直接上代码:models.pydjango.dbmodels
Asset(models.Model):
OS_CHOICE=[
(,),
(,),
(,),
(,),
(,),
]
hostname=models.CharField(=,=,=)
ip=models.GenericIPAddressField(=,=)
port=models.IntegerField(=,=)
username=models.CharField(=,=)
password=models.CharField(=..
分类:
其他好文 时间:
2017-07-24 16:17:15
阅读次数:
152
#!/usr/bin/env python# -*- coding:utf-8 -*-# Author:Andy Chendata = { '北京':{ '海淀':{ '五道口':{ 'soho':{}, '网易':{}, 'google':{} }, '中关村':{ '爱奇艺':{}, '汽车之家 ...
分类:
其他好文 时间:
2017-07-24 01:27:16
阅读次数:
167
一、关于numpy的random的使用: 1.rand随机值 2.randn返回样本具有标准正太分布 3.randint返回随机整数 4.random([size])返回随机浮点数位于半开区间[0.0,1.0) 5.choice从给定的数字中生成一个随机样本 6.shuffle(x)打乱x的顺序 更 ...
分类:
其他好文 时间:
2017-07-23 18:25:35
阅读次数:
278
<div> <div><span class="glyphicon glyphicon-search" aria-hidden="true"></span> 搜索条件</div> <div class="condition"> 大分类: {% if kwargs.article_type_id == ...
分类:
其他好文 时间:
2017-07-23 15:31:39
阅读次数:
245
点球小游戏: from random import choice score=[0,0]direction=['left','center','right'] def kick(): print ' You Kick! ' print 'Choose one side to shoot' print ...
分类:
编程语言 时间:
2017-07-23 11:20:33
阅读次数:
199
目标要求: 1、用户输入购物预算 2、打印商品清单,由用户选择,预算够则购买,不够则提示 3、输入q,退出程序 4、购物结束,显示购买的东西和余额 实现: 1、用列表存储商品及价格信息 2、建立空列表存放购买的商品,每次购买成功,就append 3、if判断是否数字、是否是q,是否输入正确的商品编号 ...
分类:
编程语言 时间:
2017-07-21 13:18:25
阅读次数:
197
哈哈。大家平时都在使用电话本。以下使用java来模拟而一个简单的电话本吧... 首先给出联系人的抽象类 package net.itaem.po; /** * * 电话人的信息 * */ public class User { private String name; private String ...
分类:
编程语言 时间:
2017-07-20 18:49:41
阅读次数:
151
You have no choice about the necessity to integrateyour observations, your experiences, your knowledge into abstractideas, i.e., into principles. ——Ay ...
分类:
编程语言 时间:
2017-07-20 10:14:00
阅读次数:
247
1、生成浮点随机数 生成的浮点数数值在(a,b)之 uniform(1,10.1) 8.10015246791915 2、生成整数随机数 3、生成随机偶数 4、生成随机字符(参数内的) choice([123,'abc','1a2b']) 'abc' choice([123,'abc','1a2b' ...
分类:
编程语言 时间:
2017-07-19 21:57:51
阅读次数:
280
# -*-coding:utf-8-*- ''' 题目描述: 使用 Python 生成类似于下图中的字母验证码图片 思路: 运用PIL库加random 随机字母进行生成 ''' import random import string from PIL import Image, ImageDraw,... ...
分类:
编程语言 时间:
2017-07-16 20:49:40
阅读次数:
199