Stella981 Stella981
3年前
Python code question 8
Question8Level2Question:Writeaprogramthatacceptsacommaseparatedsequenceofwordsasinputandprintsthewordsinacommaseparatedsequenceaftersortingthema
Stella981 Stella981
3年前
Python code question 12
Level2Question:Writeaprogram,whichwillfindallsuchnumbersbetween1000and3000(bothincluded)suchthateachdigitofthenumberisanevennumber.Thenumbersobtaine
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
Wesley13 Wesley13
3年前
python的stat模块
!/usr/bin/envpythonencoding:UTF8importos,time,statfileStatsos.stat('test.txt')获取文件/目录的状态fileInfo
Stella981 Stella981
3年前
Python技巧之函数
函数是Python中的第一公民:函数可以作为参数传递给其他函数,可以作为其他函数的返回亦可以赋值给变量和保存在数据结构中。defmyfunc(a,b):...returnab...funcsmyfun
Stella981 Stella981
3年前
Python运算符
1.运算符1.1运算符的概念运算符⽤于执⾏程序代码运算,会针对⼀个以上操作数项⽬来进⾏运算。例如:23,其操作数是2和3,⽽运算符则是“”1.2运算符的分类算术运算符赋值运算符⽐较运算符(关系运算符)逻辑运算符条件运算符(三元运算符)2.算术运算符