摘要: https://blog.csdn.net/u013210620/article/details/79182038 阅读全文
posted @ 2018-04-20 11:18 ghgxm520 阅读(75) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/qq_18407565/article/details/73549713 阅读全文
posted @ 2018-04-20 10:21 ghgxm520 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 原帖: https://code.ziqiangxuetang.com/django/django-cms-develop2.html 第一步,安装 DjangoUeditor 包 Python 3 开发者:https://github.com/twz915/DjangoUeditor3 直接下载z 阅读全文
posted @ 2018-04-09 10:51 ghgxm520 阅读(148) 评论(0) 推荐(0) 编辑
摘要: import requests import pygal # 执行API调用并存储响应 url = 'https://api.github.com/search/repositories?q=language:python&sort=stars' # 获取响应对象 r = requests.get(url) # status_code属性,是否请求成功,200代表请求成功 print("Sta... 阅读全文
posted @ 2018-03-16 13:41 ghgxm520 阅读(203) 评论(0) 推荐(0) 编辑
摘要: import matplotlib.pyplot as plt from random import randint x_scatter=[] for num in range(1,1000): new= randint(1,100) x_scatter.append(new) y_scatter=[] for y in range(1,1000): yy=randint... 阅读全文
posted @ 2018-03-16 12:19 ghgxm520 阅读(301) 评论(0) 推荐(0) 编辑
摘要: from random import choice import matplotlib.pyplot as plt class RandomWalk(): """随机漫步的类,三个参数:1,移动的步数;2,x的坐标点;3,y的坐标""" def __init__(self,floots=5000): self.floots=floots self.... 阅读全文
posted @ 2018-03-16 12:17 ghgxm520 阅读(208) 评论(0) 推荐(0) 编辑
摘要: import csv from matplotlib import pyplot as plt from datetime import datetime with open("sitka_weather_2014.csv") as f: reader= csv.reader(f) #创建阅读对象 header_row= next(reader) #读取首行,接下来... 阅读全文
posted @ 2018-03-16 11:44 ghgxm520 阅读(589) 评论(0) 推荐(0) 编辑
摘要: from random import randint import pygal class Die(): def __init__(self,num_sides=6): self.num_sides=num_sides def roll(self): return randint(1,self.num_sides) def get_cou... 阅读全文
posted @ 2018-03-16 11:41 ghgxm520 阅读(433) 评论(0) 推荐(0) 编辑
摘要: import json import pygal.maps.world #引入世界地图 from pygal_maps_world.i18n import COUNTRIES #引入世界个国家 def get_country_code(country_name): """根据国家的名称,获取国家的二位简称""" for code,name in COUNTRIE... 阅读全文
posted @ 2018-03-16 11:36 ghgxm520 阅读(225) 评论(0) 推荐(0) 编辑
摘要: #CSV显示GDP import csv import json import pygal.maps.world from pygal_maps_world.i18n import COUNTRIES def get_country_code(country_name): """根据国家的名称,获取国家的二位简称""" for code,name in COUNTRIES.it... 阅读全文
posted @ 2018-03-16 11:34 ghgxm520 阅读(388) 评论(0) 推荐(0) 编辑