一直都没找到完整的Fck编辑器的完整详解,今天无意中发现了,所以就复制下来了;javascript调用方式:------------------------------------
系统 2019-08-12 09:26:47 2181
该代码主要是基于python实现判断指定文件夹下是否存在指定后缀的文件。代码如下:importosYour_Dir='你的文件夹/'Files=os.listdir(Your_Dir)forkinrange(len(Files)):#提取文件夹内所有文件的后缀Files[k]=os.path.splitext(Files[k])[1]Str2=['.wav','.mp3','.mp4']iflen(list(set(Str2).intersection(s
系统 2019-09-27 17:54:47 2180
#-*-coding:utf-8-*-importdatetime#给定日期向后N天的日期defdateadd_day(days):d1=datetime.datetime.now()d3=d1+datetime.timedelta(days)returnd3#昨天defgetYesterday():today=datetime.date.today()oneday=datetime.timedelta(days=1)yesterday=today-one
系统 2019-09-27 17:52:22 2180
klearnpythonAPILinearRegressionfromsklearn.linear_modelimportLinearRegression#线性回归#module=LinearRegression()module.fit(x,y)module.score(x,y)module.predict(test)LogisticRegressionfromsklearn.linear_modelimportLogisticRegression#逻辑回
系统 2019-09-27 17:51:04 2180
转:https://www.jianshu.com/p/4be85de84d2a本机环境:Windows1064位Anacondapython3.7报错信息:pipisconfiguredwithlocationsthatrequireTLS/SSL,howeverthesslmoduleinPythonisnotavailable.解决方法:原因:Anaconda环境变量未配置完全需要配置的环境变量:D:\ProgramData\Anaconda3D:\
系统 2019-09-27 17:50:37 2180
平时做数据处理基本离不了日志记录功能。每次都配置一堆挺烦人,索性封装个模块,这里记录一下,与大家共享。说明本日志模块目前只有一个方法getLogger,其他配置项通过参数传递,包括日志文件名,等级,日志文件划分方式,日志清除配置,日志格式等。logger.pyimportloggingfromloggingimporthandlers#日志级别字典__level_dict={'critical':logging.CRITICAL,'fatal':loggi
系统 2019-09-27 17:50:32 2180
Python3快速入门(三)——Python3标准数据类型一、Python3标准数据类型Python3中有六种标准数据类型:A、Number(数字)B、String(字符串)C、List(列表)D、Tuple(元组)E、Set(集合)F、Dictionary(字典)Python3的六种标准数据类型中,Number(数字)、String(字符串)、Tuple(元组)是不可变的,List(列表)、Dictionary(字典)、Set(集合)是可变的。二、数字类
系统 2019-09-27 17:50:27 2180
pipinstalltusharestock_price.py#coding:utf-8importos,sysimportdatetimeimportmatplotlib.pyplotaspltimportpandasaspdimporttushareastsiflen(sys.argv)==2:code=sys.argv[1]else:print('usage:pythonstock_price.pystockcode')sys.exit(1)ifle
系统 2019-09-27 17:50:25 2180
1.python中创建进程的两种方式:frommultiprocessingimportProcessimporttimedeftest_():print'-----test-----'if__name__=='__main__':p=Process(target=test_)p.start()whileTrue:print'--main--''''1.通过process类创建一个进程对象,然后start即可开启进程,testtest_函数是进程实现的功能
系统 2019-09-27 17:49:44 2180
缘起:[root@CentOS7code]#pythonmulti_thread_mfw.pyFile"multi_thread_mfw.py",line138SyntaxError:Non-ASCIIcharacter'\xe5'infilemulti_thread_mfw.pyonline138,butnoencodingdeclared;seehttp://www.python.org/peps/pep-0263.htmlfordetails写完py
系统 2019-09-27 17:48:24 2180