12 2018 档案

摘要:上面代码执行处做,Assertion Error 解决方案: This may help for someone who is looking for For Anaconda on Windows 10 64 Bit, Environment: Windows 10 64 Bit, Python 阅读全文
posted @ 2018-12-30 11:08 andy_0212 阅读(723) 评论(0) 推荐(0)
摘要:pip list pip freeze pip show <module_name> pip search <module_name> How to know if a python module is installed or not in the system: You can do a ver 阅读全文
posted @ 2018-12-29 22:03 andy_0212 阅读(857) 评论(0) 推荐(0)
摘要:文件名全小写,可使用下划线 包应该是简短的、小写的名字。如果下划线可以改善可读性可以加入。如mypackage。 模块与包的规范同。如mymodule。 类总是使用首字母大写单词串。如MyClass。内部类可以使用额外的前导下划线。 函数&方法函数名应该为小写,可以用下划线风格单词以增加可读性。如: 阅读全文
posted @ 2018-12-29 15:28 andy_0212 阅读(143) 评论(0) 推荐(0)
摘要:dataframe获取series是副本,改变series的值并不能改变dataframe中的值 >>> x_column0 11 22 4 >>> df x y0 1 4 阅读全文
posted @ 2018-12-28 16:55 andy_0212 阅读(288) 评论(0) 推荐(0)
摘要:https://www.tensorflow.org/install/pip 装了tensorflow-gpu后,运行程序会出现“Your CPU supports instructions that this TensorFlow binary was not compiled to use: A 阅读全文
posted @ 2018-12-28 09:11 andy_0212 阅读(416) 评论(0) 推荐(0)
摘要:0.反转 s[::-1] s.reverse() > will change s, return none reversed(s) > return iterator 1、去空格及特殊符号 s.strip() s.lstrip() s.rstrip(',') 2、复制字符串 复制代码代码如下: #s 阅读全文
posted @ 2018-12-26 16:50 andy_0212 阅读(179) 评论(0) 推荐(0)
摘要:LEGB Local>External>Global>Built-in https://www.datacamp.com/community/tutorials/scope-of-variables-python#diff n this tutorial, you will learn about 阅读全文
posted @ 2018-12-26 16:48 andy_0212 阅读(211) 评论(0) 推荐(0)
摘要:FFT前言快速傅里叶变换 (fast Fourier transform),即利用计算机计算离散傅里叶变换(DFT)的高效、快速计算方法的统称,简称FFT。快速傅里叶变换是1965年由J.W.库利和T.W.图基提出的。采用这种算法能使计算机计算离散傅里叶变换所需要的乘法次数大为减少,特别是被变换的抽 阅读全文
posted @ 2018-12-26 11:38 andy_0212 阅读(2402) 评论(0) 推荐(0)
摘要:pip install swifter import swifter df.swifter.apply() df.swifter.transform() Easily apply any function to a pandas dataframe in the fastest available 阅读全文
posted @ 2018-12-26 11:32 andy_0212 阅读(478) 评论(0) 推荐(0)
摘要:https://stackoverflow.com/questions/12735392/python-class-static-methods You're getting the error because you're taking a self argument in each of tho 阅读全文
posted @ 2018-12-20 14:50 andy_0212 阅读(172) 评论(0) 推荐(0)
摘要:A microservice is a software architecture, which can be implemented with webservices. A webservice is just a technology (one of many) for providing se 阅读全文
posted @ 2018-12-20 10:21 andy_0212 阅读(128) 评论(0) 推荐(0)
摘要:https://www.jianshu.com/p/7bfbaf893a34 虽然刷题一直饱受诟病,不过不可否认刷题确实能锻炼我们的编程能力,相信每个认真刷题的人都会有体会。现在提供在线编程评测的平台有很多,比较有名的有 hihocoder,LintCode,以及这里我们关注的 LeetCode。 阅读全文
posted @ 2018-12-20 09:45 andy_0212 阅读(960) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2018-12-14 16:23 andy_0212 阅读(273) 评论(0) 推荐(0)
摘要:内容导读 最近听机器学习课程时听到这三个概念一开始有点模糊。感觉没理解透,所以自己又查了点资料,消化了一下,然后做了个笔记。Bias反映的是模型在样本上的输出与真实值之间的误差,即模型本身的精准度,其实Bias在股票上也有应用,也可以反映股价在波动过程中与移动平均线偏离程度(乖离率),炒股的朋友应该 阅读全文
posted @ 2018-12-14 10:25 andy_0212 阅读(981) 评论(0) 推荐(0)
摘要:[1,2].append(3) # 返回值是None [[1],[2]]+[3] 是 [[1], [2], [3]] 但是 [1,2]+3 报错 因为+只能连接list [] 阅读全文
posted @ 2018-12-13 22:52 andy_0212 阅读(1947) 评论(0) 推荐(0)
摘要:1、大数据 (海量数据的存取,会设计到数据库技术) 大数据就是许多数据的聚合; 大数据的特征: 1、数据量大 2、结构复杂 3、数据更新速度快 2、机器学习 (理论和工具) 机器学习是人工智能的核心,要对大数据进行发掘,靠人工肯定是做不到的,要通过一个模型让计算机按照模型去执行,就是机器学习。 3、 阅读全文
posted @ 2018-12-13 14:52 andy_0212 阅读(1522) 评论(0) 推荐(0)
摘要:作者:猴子链接:https://www.zhihu.com/question/58033789/answer/254673663来源:知乎 事实上Anaconda 和 Jupyter notebook已成为数据分析的标准环境。 简单来说,Anaconda是包管理器和环境管理器,Jupyter not 阅读全文
posted @ 2018-12-12 17:03 andy_0212 阅读(366) 评论(0) 推荐(0)
摘要:anaconda官网下载安装:https://www.continuum.io/downloads/ anaconda用法:查看已经安装的包:pip list 或者 conda list 安装和更新:pip install requestspip install requests --upgrade 阅读全文
posted @ 2018-12-10 14:40 andy_0212 阅读(560) 评论(0) 推荐(0)
摘要:最近在使用anaconda 时,使用pip 更新了 PyQt5 到 5.8.2之后,发现 PyQt5 无法正常使用:动态链接库总是没法正常导入;另外,matplotlib.pyplot 也没法正常使用,提示: ModuleNotFoundError: No module named 'PyQt4' 阅读全文
posted @ 2018-12-10 13:59 andy_0212 阅读(242) 评论(0) 推荐(0)
摘要:https://zhuanlan.zhihu.com/p/30845941 总结: 1、体力活动极少时,建议蛋白质摄入量每千克体重0.8g~1.2g; 2、运动人群、体力劳动者,建议蛋白质摄入量每千克体重1.2g~1.8g; 3、适量增加蛋白质摄入能帮助减脂者维持肌肉,帮助增肌者增长肌肉; 4、运动 阅读全文
posted @ 2018-12-06 14:28 andy_0212 阅读(2071) 评论(0) 推荐(0)
摘要:同的平台上对不同的数据类型分配的字节数是不同的,一般的,数据类型的字节数是由编辑器决定的(编译期间决定数据类型长度)。 简单来说,平台就是CPU+OS+Compiler,cpu的位是指一次性可处理的数据量是多少,1字节=8位,32位处理器可以一次性处理4个字节的数据量,依次类推。32位操作系统针对的 阅读全文
posted @ 2018-12-06 14:25 andy_0212 阅读(1174) 评论(0) 推荐(0)
摘要:可以使用以下方式进入: 具体分析如下: 正的问题是,当你在任何Cytwin终端程序(如mintty)中运行命令时,它们不会充当Windows控制台。只有像CMD或Console2这样的基于Windows控制台的人才能做到这一点。所以,使用Cygwin终端时,Windows python.exe并不认 阅读全文
posted @ 2018-12-05 21:50 andy_0212 阅读(543) 评论(0) 推荐(0)
摘要:Cygwin我想不用多介绍了,我就想说下用Cygwin来编写*nix下的程序。由于Cygwin默认安装(就是推荐的安装)后,没有安装文本编辑器,我今天的主要目的就是先给它装上文本编辑器vim.由于已经装上了Cygwin,所以不必卸载(其实在windows下卸载Cygwin比较麻烦,没有研究过),将你 阅读全文
posted @ 2018-12-05 21:43 andy_0212 阅读(658) 评论(0) 推荐(0)
摘要:works fine whereas Logic operator for boolean indexing in Pandas Logic operator for boolean indexing in Pandas 阅读全文
posted @ 2018-12-05 10:49 andy_0212 阅读(120) 评论(0) 推荐(0)
摘要:一般来说用一下代码就可reload你的module 如果你开始写的是下面的,想重新加载, 需要用下面几句: 或者 具体解释可见: how to reload after “from <module> import *”? When you do from module import * everyt 阅读全文
posted @ 2018-12-05 09:18 andy_0212 阅读(476) 评论(0) 推荐(0)
摘要:https://stackoverflow.com/questions/6434482/python-function-overloading Why Not Overloading? First one needs to understand the concept of overloading 阅读全文
posted @ 2018-12-04 11:12 andy_0212 阅读(323) 评论(0) 推荐(0)
摘要:下面的代码,可以无阻碍地show 5个figure,相当于开启了ipython的interactive 模式 具体参见stackoverflow: in matplotlib, is there a way to pop up a figure asynchronously? 阅读全文
posted @ 2018-12-04 11:11 andy_0212 阅读(442) 评论(0) 推荐(0)
摘要:https://www.zhihu.com/question/19918532 作者:rainoftime链接:https://www.zhihu.com/question/19918532/answer/21647195来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 阅读全文
posted @ 2018-12-04 09:41 andy_0212 阅读(693) 评论(0) 推荐(0)
摘要:1 import matplotlib.pyplot as plt 2 import numpy as np 3 4 # Generate some data... 5 data = np.random.random((100, 1)) 6 # y = data.mean(axis=0) 7 # x = np.random.random(y.size) * 10 8 # x... 阅读全文
posted @ 2018-12-04 09:27 andy_0212 阅读(1993) 评论(0) 推荐(0)
摘要:设置数据库路径非常重要: 方法: 1 配置数据库 basedir= os.path.abspath(os.path.dirname(__file__)) #获取当前文件的绝对路径 app = Flask(__name__) # 拼接数据库的URL路径 # os.path.join 把basedir和 阅读全文
posted @ 2018-12-03 23:09 andy_0212 阅读(2028) 评论(0) 推荐(0)
摘要:isnull is an alias for isna. Literally in the code source of pandas: Indeed: So I would recommend using isna. 阅读全文
posted @ 2018-12-03 09:55 andy_0212 阅读(1360) 评论(0) 推荐(0)
摘要:OWIN是什么? OWIN的英文全称是Open Web Interface for .NET。 如果仅从名称上解析,可以得出这样的信息:OWIN是针对.NET平台的开放Web接口。 那Web接口是谁和谁之间的接口呢?是Web应用程序与Web服务器之间的接口,OWIN就是.NET Web应用程序与We 阅读全文
posted @ 2018-12-02 15:29 andy_0212 阅读(198) 评论(0) 推荐(0)