Bill78 Bill78
4年前
python进程间通信
1python提供了多种进程通信的方式,主要Queue和Pipe这两种方式,Queue用于多个进程间实现通信,Pipe是两个进程的通信1.1Queue有两个方法:Put方法:以插入数据到队列中,他还有两
Stella981 Stella981
3年前
Python code question 8
Question8Level2Question:Writeaprogramthatacceptsacommaseparatedsequenceofwordsasinputandprintsthewordsinacommaseparatedsequenceaftersortingthema
Stella981 Stella981
3年前
Python生成词云
1概述利用Python生成简单的词云,需要的工具是cython,wordcloud与anaconda.2准备工作包括安装cython,wordcloud与anaconda.2.1安装anaconda下载官网(https://www.oschina.net/action/GoT
Stella981 Stella981
3年前
Python code question 10
Question10Level2Question:Writeaprogramthatacceptsasequenceofwhitespaceseparatedwordsasinputandprintsthewordsafterremovingallduplicatewordsandsortingth
Stella981 Stella981
3年前
Python开发【模块】:Weakref
Weakreferences前言:_weakref_模块允许python开发者创建弱引用对象。再接下来中,术语referent代表被弱引用所引用的对象。一个弱引用对于对象是不能够保持对象存活的:当仅剩下_referent_的引用都是弱引用时,垃圾回收机制是可以自由销毁_referent_然后重新使用内存的
Stella981 Stella981
3年前
Spark Python 快速体验
Spark是2015年最受热捧大数据开源平台,我们花一点时间来快速体验一下Spark。Spark技术栈!(http://static.oschina.net/uploads/space/2016/0331/103717_d6qN_1450051.png)如上图所示,Spark的技术栈包括了这些模块:核心模块:Spark
Stella981 Stella981
3年前
Python计算IV值
_更多大数据分析、_建模_等内容请关注公众号《_bigdata__modeling___》_在对变量分箱后,需要计算变量的重要性,IV是评估变量区分度或重要性的统计量之一,python计算IV值的代码如下:defCalcIV(Xvar,Yvar):N_0np.sum(Yva
Stella981 Stella981
3年前
Python异步Web编程
!(https://oscimg.oschina.net/oscnet/c170345b07b2bf0b8c076ee4350fe145ad0.jpg)异步编程适用于那些频繁读写文件和频繁与服务器交互数据的任务,异步程序以非阻塞的方式执行I/O操作。这样意味着程序可以在等待客户机返回数据的同时执行其他任务,而不是无所事事的等待,浪费资源和时间。
Stella981 Stella981
3年前
Python技巧之函数
函数是Python中的第一公民:函数可以作为参数传递给其他函数,可以作为其他函数的返回亦可以赋值给变量和保存在数据结构中。defmyfunc(a,b):...returnab...funcsmyfun
Stella981 Stella981
3年前
Python运算符
1.运算符1.1运算符的概念运算符⽤于执⾏程序代码运算,会针对⼀个以上操作数项⽬来进⾏运算。例如:23,其操作数是2和3,⽽运算符则是“”1.2运算符的分类算术运算符赋值运算符⽐较运算符(关系运算符)逻辑运算符条件运算符(三元运算符)2.算术运算符