python编程
yuan.jin
这个作者很懒,什么都没留下…
展开
-
python 毫秒级时间,时间戳转换
python 毫秒级时间,时间戳转换import timefrom datetime import datetimetimestr = ‘2019-01-14 15:22:18.123’datetime_obj = datetime.strptime(timestr, "%Y-%m-%d %H:%M:%S.%f")time.mktime(datetime_obj.timetuple())...原创 2019-01-14 15:24:31 · 62963 阅读 · 3 评论 -
TypeError: can't pickle dict_keys objects解决办法
spark map(f)f函数包含dict.keys()或者dict.values()报错:TypeError: can’t pickle dict_keys objects解决办法:list(dict.keys())原创 2019-01-15 14:15:42 · 11003 阅读 · 3 评论 -
linux服务器安装python3
su(切到root)mkdir /usr/python3_enve(创建新目录)cd /usr/python3_envewget https://www.python.org/ftp/python/3.6.7/Python-3.6.7.tgz(下载)tar -zxvf Python-3.6.7.tgz(解压)yum install gcc patch libffi-devel pyt...原创 2019-01-25 16:34:33 · 300 阅读 · 0 评论 -
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at:
maxOs安装lightgbm:brew install cmakebrew install libompgit clone --recursive https://github.com/Microsoft/LightGBM ; cd LightGBMmkdir build ; cd buildcmake -DOpenMP_C_FLAGS="-Xpreprocessor -fopenm...原创 2019-01-28 19:13:56 · 314 阅读 · 0 评论