Python数据分析与挖掘(五)---matplotlib柱状图

Python教程网 >>:www.python88.cn 柱状图(bar) 1 柱状图绘制 需求1-对比每部电影的票房收入 电影数据如下图所示: 1 准备数据 ['雷神3:诸神黄昏','正义联盟','东方快车谋杀案','寻梦环游记','全球风暴', '降魔传','追捕','七十七天','密战','狂兽','其它'] [73853,57767,22354,15969,14839,8725,8716,8318,7916,6764,52222] 2 绘制 matplotlib.pyplot.ba
分类: 其他 发布时间: 01-27 22:50 阅读次数: 0

Go36-29,30-原子操作

原子操作:原子操作的特点;sync/atomic包;原子操作的减法;比较并交换CAS;适用场景。原子变量:原子值的复制;原子值储值的规则;使用建议和最佳实践;存储引用类型。总结:原子操作、互斥锁、原子值的选择。
分类: 编程语言 发布时间: 01-27 22:50 阅读次数: 0

最近几天的几个想法

这是最好的时代,这是最坏的时代;这是智慧的时代,这是愚蠢的时代;这是信仰的时期,这是怀疑的时期;这是光明的季节,这是黑暗的季节;这是希望之春,这是失望之冬;人们面前有着各样事物,人们面前一无所有;人们正在直登天堂,人们正在直下地狱。1>这是《双城记》中的语句,用来描述当今各行各业信息爆炸再合适不过。那么对于IT行业,技术总是处于无时无刻的推陈出新中,所谓沉舟侧畔千帆过,病树前头万木春,新事物必将代
分类: 企业开发 发布时间: 01-27 22:50 阅读次数: 0

python数据分析与挖掘(六)--- matplotlib直方图

Python教程网 >>:www.python88.cn 直方图(histogram) 1 直方图介绍 直方图,形状类似柱状图却有着与柱状图完全不同的含义。直方图牵涉统计学的概念,首先要对数据进行分组,然后统计每个分组内数据元的数量。 在坐标系中,横轴标出每个组的端点,纵轴表示频数,每个矩形的高代表对应的频数,称这样的统计图为频数分布直方图。 相关概念: 组数:在统计数据时,我们把数据按照不同的范围分成几个组,分成的组的个数称为组数 组距:每一组两个端点的差 2 直方图与柱状图的对比 柱状图是
分类: 其他 发布时间: 01-27 22:50 阅读次数: 0

python数据分析与挖掘(七)---matplotlib饼图

Python教程网 >>:www.python88.cn 饼图(pie) 1 饼图介绍 饼图广泛得应用在各个领域,用于表示不同分类的占比情况,通过弧度大小来对比各种分类。饼图通过将一个圆饼按照分类的占比划分成多个区块,整个圆饼代表数据的总量,每个区块(圆弧)表示该分类占总体的比例大小,所有区块(圆弧)的加和等于 100%。 2 饼图绘制 需求:显示不同的电影的排片占比 电影排片: 效果: 数据: movie_name = ['雷神3:诸神黄昏','正义联盟','东方快车谋杀案','寻梦环游记
分类: 其他 发布时间: 01-27 22:50 阅读次数: 0

python数据分析与挖掘(八)---Numpy基础

Python教程网 >>:www.python88.cn 1 Numpy介绍 Numpy(Numerical Python)是一个开源的Python科学计算库,用于快速处理任意维度的数组。 Numpy支持常见的数组和矩阵操作。对于同样的数值计算任务,使用Numpy比直接使用Python要简洁的多。 Numpy使用ndarray对象来处理多维数组,该对象是一个快速而灵活的大数据容器。 2 ndarray介绍 NumPy provides an N-dimensional array type,
分类: 其他 发布时间: 01-27 22:50 阅读次数: 0

python数据分析与挖掘(九)--- numpy 数组

Python教程网 >>:www.python88.cn 1 ndarray的属性 数组属性反映了数组本身固有的信息。 属性名字 属性解释 ndarray.shape 数组维度的元组 ndarray.ndim 数组维数 ndarray.size 数组中的元素数量 ndarray.itemsize 一个数组元素的长度(字节) ndarray.dtype 数组元素的类型 2 ndarray的形状 首先创建一些数组。 # 创建不同形状的数组 >>> a = np.array([[1,2,3],[4
分类: 其他 发布时间: 01-27 22:49 阅读次数: 0

python数据分析与挖掘(十)--- numpy 基本操作

Python教程网 >>:www.python88.cn 1 生成0和1的数组 empty(shape[, dtype, order]) empty_like(a[, dtype, order, subok]) eye(N[, M, k, dtype, order]) identity(n[, dtype]) ones(shape[, dtype, order]) ones_like(a[, dtype, order, subok]) zeros(shape[, dtype, order])
分类: 其他 发布时间: 01-27 22:49 阅读次数: 0

给想转行学习Python的朋友提些建议及学习路线望少走点弯路

阶段一:基础阶段 Python语言基础 · 环境搭建与配置· 变量和数据类型· 编程基础· 装饰器· gui介绍 简易爬虫实战 · http和urllib2· 正则表达式和re· 编写爬虫代码· 多线程 工具阶段 · Pip安装方法以及环境· Pip基础使用和指定源· Virtualenv安装· Pycharm&pdb调试技巧 Python面向对象 · 面向对象入门及特征· 类方法使用及特征· 访问限制· super和self对象· 嵌套类和嵌套函数 web前端基础 · HTML+CSS· J
分类: 其他 发布时间: 01-27 22:48 阅读次数: 0

1015 Reversible Primes (20 point(s))

版权声明:听说这里让写版权声明~~~ https://blog.csdn.net/m0_37691414/article/details/86600971 题解 素数判断。 #include<cstdio> #include<cmath> #include<iostream> #include<string> using namespace std; bool isPrime(int n) { if(n <= 1) return false; for(int i = 2; i <= sq
分类: 其他 发布时间: 01-27 22:47 阅读次数: 0

1016 Phone Bills (25 point(s))

版权声明:听说这里让写版权声明~~~ https://blog.csdn.net/m0_37691414/article/details/86631712 题解 STL的简单应用。水题一只。 #include<iostream> #include<map> #include<vector> #include<cstdio> #include<algorithm> using namespace std; const int MAXN = 25; const int MAXM = 1010;
分类: 其他 发布时间: 01-27 22:47 阅读次数: 0

1017 Queueing at Bank (25 point(s))

版权声明:听说这里让写版权声明~~~ https://blog.csdn.net/m0_37691414/article/details/86631742 题解 与1014类似。不过更加简单。 #include<iostream> #include<algorithm> #include<cstdio> #include<vector> using namespace std; struct node { int ct, t; // come time and spent all time
分类: 其他 发布时间: 01-27 22:46 阅读次数: 0

1018 Public Bike Management (30 point(s))

版权声明:听说这里让写版权声明~~~ https://blog.csdn.net/m0_37691414/article/details/86631806 题解 dijkstra + dfs。 题目本身不难,难在于读懂题意。这好像是pat甲级的一个通病。 #include<iostream> #include<algorithm> #include<vector> using namespace std; const int INF = 0x3f3f3f3f; const int MAXN
分类: 其他 发布时间: 01-27 22:46 阅读次数: 0

1020 Tree Traversals (25 point(s))

版权声明:听说这里让写版权声明~~~ https://blog.csdn.net/m0_37691414/article/details/86645600 题解 树的遍历,见博文树的遍历 #include<iostream> #include<vector> #include<algorithm> using namespace std; vector<int> post, in; vector<vector<int> > level; int depth; void getLevel(in
分类: 其他 发布时间: 01-27 22:45 阅读次数: 0

1021 Deepest Root (25 point(s))

版权声明:听说这里让写版权声明~~~ https://blog.csdn.net/m0_37691414/article/details/86646842 题解 两遍dfs #include<iostream> #include<vector> #include<cstdio> #include<set> #include<cstring> using namespace std; const int MAXN = 1e4 + 10; vector<int> t; bool vis[MA
分类: 其他 发布时间: 01-27 22:45 阅读次数: 0

1022 Digital Library (30 point(s))

版权声明:听说这里让写版权声明~~~ https://blog.csdn.net/m0_37691414/article/details/86650112 1022 Digital Library (30 point(s)) A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and p
分类: 其他 发布时间: 01-27 22:45 阅读次数: 0

1023 Have Fun with Numbers (20 point(s))

版权声明:听说这里让写版权声明~~~ https://blog.csdn.net/m0_37691414/article/details/86659805 #include<iostream> #include<cstdio> #include<string> using namespace std; const int MAXN = 22; string s; int a[MAXN]; int carry, bit, flag; int main() { cin >> s; for(i
分类: 其他 发布时间: 01-27 22:45 阅读次数: 0

1024 Palindromic Number (25 point(s))

版权声明:听说这里让写版权声明~~~ https://blog.csdn.net/m0_37691414/article/details/86659816 题解 字符串的简单应用。 #include<iostream> #include<string> #include<cstdio> #include<algorithm> using namespace std; string add(string a, string b) { string ret = ""; int carry =
分类: 其他 发布时间: 01-27 22:44 阅读次数: 0

前端小白页面开发注意事项及小工具

垂直水平居中,在支持 CSS3 属性的现代浏览器当中,有一个利用 CSS3 属性的垂直水平居中方法: ` .center { position: absolute; top: 50%; left: 50%; -ms-transform: translate(-50%,-50%); -moz-transform: translate(-50%,-50%); -o-transform: translate(-50%,-50%); transform: translate(-50%,-50%); }
分类: 其他 发布时间: 01-27 22:44 阅读次数: 0

设计模式---六大原则

背景:听说设计模式是进入BAT的必经之路。 First、何谓设计模式: 设计模式(Design Pattern)是一套被反复使用、多数人知晓的、经过分类的、代码设计经验的总结。 设计模式的好处&学习目的: 1、为了代码可重用行、让代码更易被他人理解、保证代码的可靠性、使代码编写真正实现工程化; 2、设计模式便于我们维护项目,增强系统的健壮性和可扩展性; 3、设计模式还可以锻炼码农的设计思维、升华代码质量等。 六大指导原则: 程序设计模式有六大基本指导原则,但规则毕竟都是人定的,So我们要灵活遵
分类: 其他 发布时间: 01-27 22:44 阅读次数: 0