摘要: 视图是一种虚拟存在的表,数据是使用视图是动态生成的。MySQL和其他数据库的视图有啥区别?MySQL中from后面不能包含子查询和普通表对比:简单:使用视图的用户不用关心背后表的结构、关联条件和筛选条件,只关心视图结果集;安全:只能访问视图结果集数据,一般对表的权... 阅读全文
posted @ 2018-06-23 19:55 wjc920 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 阻塞和非阻塞,同步和异步[转载][经典] 阅读全文
posted @ 2018-03-28 16:09 wjc920 阅读(127) 评论(0) 推荐(0) 编辑
摘要: #matplotlibimport matplotlibimport numpy as npimport matplotlib.pyplot as pltdef simple_line(x,y,figure_no): plt.figure(figure_no) ... 阅读全文
posted @ 2018-03-23 15:19 wjc920 阅读(93) 评论(0) 推荐(0) 编辑
摘要: file_name = 'data_file_pointer.txt'def print_txt(file_name): try: with open(file_name) as f: for line in f.readli... 阅读全文
posted @ 2018-03-23 15:19 wjc920 阅读(87) 评论(0) 推荐(0) 编辑
摘要: #NumPy之 复制和视图(Copies and Views)import numpy as np# ===================================================#不拷贝的情况a=np.arange(12)b=aprint('... 阅读全文
posted @ 2018-03-23 15:18 wjc920 阅读(125) 评论(0) 推荐(0) 编辑
摘要: #NumPy之 数组合并和拆分import numpy as np#对数组进行变形a = np.arange(20).reshape((5, 4))print('(5,4):')print(a)a = np.arange(20).reshape((5, -1))pri... 阅读全文
posted @ 2018-03-23 15:18 wjc920 阅读(101) 评论(0) 推荐(0) 编辑
摘要: #NumPy之 函数运算import numpy as np#math calculationsprint('math calculations for array:')a=np.array([0,1,2,3])b=np.array([2,-1,2,3])print(... 阅读全文
posted @ 2018-03-23 15:18 wjc920 阅读(92) 评论(0) 推荐(0) 编辑
摘要: # Numpy之 点乘、算术运算、切片、遍历和下标取值import numpy as npa = np.arange(4)b = np.arange(4, 11, 2)print(a)print(b)a_plus_b = a + bprint(a_plus_b)a_m... 阅读全文
posted @ 2018-03-23 15:18 wjc920 阅读(205) 评论(0) 推荐(0) 编辑
摘要: # NumPy之 数组创建import numpy as npdef print_array(a): print(a) print('array dimensions is %d' % (a.ndim)) print('array shape is'... 阅读全文
posted @ 2018-03-23 15:17 wjc920 阅读(129) 评论(0) 推荐(0) 编辑
摘要: # 列表排序import operator as opt# ===================================================# 列表-包含基本类型元素a = [9, 5, 6, 7, 2, 6, 9, 1, 3, 4]a = so... 阅读全文
posted @ 2018-03-23 15:17 wjc920 阅读(80) 评论(0) 推荐(0) 编辑