- 博客(48)
- 资源 (13)
- 收藏
- 关注
原创 理解prod agg in Python
prodnumpy.prod(a, axis=None, dtype=None, out=None, keepdims=)Paramstypemeanaarray_likeinput dataaxisNone or int or tuple of ints, its optionalIt’s the Axis along which a product is performed.dtypedtypetype of the returned array..
2020-10-25 18:48:31 206
原创 理解@ in Python
@作用作为装饰器作为矩阵乘法ReferencePython numpy 矩阵乘法multiply()、dot()、 matmul()、’ * ‘、’@'辨析
2020-10-25 18:47:48 224
原创 (20201024Solved)vsCode debug出现no such file or directory:‘/home/user/.local/lib‘
问题描述python file.py可以正常运行,对其进行debug就出现如题问题:no such file or directory: '/home/user/.local/lib'看运行路径,应该是python在进行os路径检查.思路梳理关键字debug一个文件的实际内容之前,vscode会先进行检查,出问题的函数是:home/user/anaconda3/lib/python3.8/posixpath.py中# This will always return fals..
2020-10-25 18:46:23 1872 1
原创 理解什么是symbolic link in Python
symbolic link软连接,本质是Unix概念,不是Python概念。link in UnixA link in UNIX is a pointer to a file.Like pointers in any programming languages, links in UNIX are pointers pointing to a file or a directory.Creating links is a kind of shortcuts to access a file..
2020-10-25 18:45:10 882 6
原创 理解posixpath.py in Python
缘起《(20201024Solved)vsCode debug出现no such file or directory:’/home/user/.local/lib’》提到python在进行debug文件时会首先调用posixpath.py。posixpath.py路径为home/user/anaconda3/lib/python3.8/posixpath.pyposixpath.py代码一开始就说了,这是Common operations on Posix pathnames, Instea..
2020-10-25 18:43:22 4105
原创 什么是POSIX system
缘起《理解posixpath.py in Python》中提到,posixpath.py是针对POSIX系统的os.path源文件。From os.path, this is because different operating systems have different path name coventions.POSIX systemFrom wikipedia, POSIX(Portable Operating System Interface) is a family of st..
2020-10-25 18:42:13 1002
原创 Understand wquantiles module in Python
wquantiles(github)Weighted quantiles with Python, including weighted median.The main methods are quantile and median. The input of quantile is a numpy array (data), a numpy array of weights of one dimension and the value of the quantile (between 0 and ..
2020-10-25 18:38:23 294
原创 (20201015 Solved)docker-compose创建网络ERROR: Pool overlaps with other one on this address space
问题docker-compose创建集群网络过程中,需要创建网络,出现如题错误:ERROR: Pool overlaps with other one on this address space解决方案参见《(20200328已解决)ERROR: Pool overlaps with other one on this address space》...
2020-10-25 18:37:59 362 1
原创 (20201019Solved)容器已经删除,如何删除宿主机上挂载目录dolphindb
问题描述宿主机挂载目录到容器内,容器已经删除,却无法在宿主机上直接删掉挂载的目录,显示permission denied.解决方案无法删除的文件是容器内部创建的,从宿主机上查看发现是root用户创建的,所以出现Permission denied.需要进入到容器内,在内部删除....
2020-10-25 18:37:40 669
原创 理解np.ma模块
masked arraysMasked arrays are arrays that may have missing or invalid entries.The numpy.ma module provides a nearly work-alike replacement for numpy that supports data arrays with masks.A masked array is the combination of a standard numpy.ndarray an..
2020-10-22 20:58:13 476
原创 理解numpy.average
numpy.averagenumpy.average(a, axis=None, weights=None, returned=False)Compute the weighted average along the specified axis.ParametersParamTypeMeaningaarray_likeArray containing data to be averaged.axisNone or int or tuple of ints,..
2020-10-22 20:57:43 639
原创 理解numpy.power
numpy.powernumpy.power(x1, x2, /, out=None, *, where=True, casting='same_kind', order='K', dtype=None, subok=True[, signature, extobj])=<ufunc 'power'>First array elements raised to powers from second array, element-wise.Raise each base in x1 to..
2020-10-22 20:57:11 197
原创 (20200916 Solved)docker-compose up创建容器自动退出
问题描述如题,创建容器后自动退出了。并且docker start container无效解决方案原因是缺失了控制终端的配置,需要在docker-compose.yml中增加tty:true ,有时候这样也不行,需要再增加一个command:/bin/bash,命令不一定是这个,需要是一个不会退出的命令,然后用-d后台启动容器。Referencesdocker-compose启动容器后自动退出...
2020-10-22 20:56:24 1642
原创 docker内创建文件夹失败
问题描述mkdir: cannot create directory ‘test’: No such file or directory解决方案问题根源是创建test文件夹是在data文件夹下,data文件夹是docker内部,并且是挂载在容器外部的文件夹,因为容器外面用于挂载的文件夹被删掉了,所以在容器内部data里创建文件夹总是失败。...
2020-10-22 20:55:51 5003 2
原创 理解《企业会计准则第*号》
企业会计准则《企业会计准则》由财政部指定,于2006.2.15财政部令第33号发布,自2007.1.1起施行。我国企业会计准则体系包括基本准则、具体准则、应用指南。企业会计准则-基本准则基本准则为主导,对企业财务会计的一般要求和主要方面做出原则性的规定,为指定具体准则和会计制度提供依据。基本准则包括总则、会计信息质量要求、财务会计报表要素、会计计量、财务会计报告等十一章内容。企业会计准则-具体准则分为一般业务准则、特殊行业和特殊业务准则、财务报告准则三大类。共42号。具体各项准则参..
2020-10-22 20:27:45 131
原创 理解python3-dev
python3-devUbuntu下称为python3-dev或python-dev;CentOS下称为python3-devel或python-devel;
2020-10-22 20:26:45 2331
原创 上市公司关于年报、半年报、季报及其公布时间的一些知识
财务报表(财报)根据《上市公司信息披露管理办法》第一章第五条规定,信息披露文件主要包括招股说明书、募集说明书、上市公告书、定期报告和临时报告等。This post focus on 定期报告,from chapter Three, rule nineteen,上市公司应当披露的定期报告包括:年度报告From rule 20th, 年度报告应当在每个会计年度结束之日起四个月内,编制完成并披露中期报告中期报告应当在每个会计年度的上半年结束之日起两个月内,编制完成并披露季度报告季度..
2020-10-22 20:26:02 5620
原创 理解decile portfolio||summary statistics
DecileFrom wikipedia, in descriptive statistics, a decile is any of the nine values that divide the sorted data into ten equal parts, so that each part represents 1/10 of the sample or population.A decile is one possible form of a quantile, others incl..
2020-10-22 20:25:10 1017
原创 用线性回归计算缺失值
Missing dataMissing data can grocely be classified into three types:MCAR(Missing Completely At Random), which means that there is nothing systematic about why some date is missing. That is, there is no relationship between the fact that data is missin..
2020-10-22 20:24:16 1146
原创 理解t-statistics||q-statistics||bias statistics||R2
Statistical Hypothesis TestingA statistical hypothesis is a hypothesis that is testable on the basis of observed data modeled as the realised value taken by a collection of random variables.A statistical hypothesis test is a method of statistical infer..
2020-10-20 21:21:16 1718
原创 理解variability vs. volatility vs. variance
variabilityIn statistics, dispersion (also called variability, scatter, or spread) is the extent to which a distribution is stretched or squeezed.Common examples of measures of statistical dispersion are the variance, standard deviation, and interquart..
2020-10-20 21:20:44 3256
原创 去极值Detect Outliers的几种方案:MAD、3sigma
异常值检测Detect OutliersIn statistics, outliers are data points that don’t belong to a certain population. It is an abnormal observation that lies far away from other values. An outlier is an observation that diverges from othervise well-structured data.Th..
2020-10-20 21:20:29 3486
原创 理解numpy.where
numpy.where(condition[, x, y])Return elements chosen from x or y depending on condition.>>> a = np.arange(10)>>> np.where(a<5, a, 10*a)array([0,1,2,3,4,50,60,70,80,90])
2020-10-19 23:09:35 244
原创 理解normalization||Standardization||Feature scaling
Feature scalingFeature scaling is a method used to normalize the range of independent variables or features of data.In some machine learning algorithms, objective functions will not work without normalization.Gradient descent converges much faster wit..
2020-10-19 23:08:44 313
原创 (20200921Solved)UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xca in position 0: invalid cont
问题描述通过pandas.read_csv读取.csv.gz文件出现上述问题。解决方案encoding='ISO-8859-1' 但是这种编码会导致中文乱码,改用GB18030,顺利解决。ReferencesUnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xce in position 52: invalid continuation byte解决pandas读取csv文件出现乱码问题...
2020-10-19 23:06:49 313
原创 (20200921 Solved)ConnectionResetError: [Errno 104] Connection reset by peer
问题描述用Python连接docker容器中的Redis预备知识[Errno 104] Connection reset by peererrno 104表示对一个对端socket已经关闭的连接调用write或send方法。这种情况下,调用write或者send之后,对端socket便会向本端socket发送一个Reset信号,之后继续执行write/read,就会得到104.netstat -ntpl lsof -i:6379通过lsof -i:6379可以发现端口未开放..
2020-10-19 22:58:42 4409
原创 深入了解装饰器Decorators in python
DecoratorA decorator is a function that takees another function and extends the behavior of the latter function without explicitly modifying it.FunctionsA function returns a value based on the given arguments.First-Class ObjectsIn Python, functi..
2020-10-19 22:56:18 198 1
原创 如何查看pandas._libs下面的pyd文件
pyd文件pyd实际上就是dll文件,只是后缀名不同。可以采用od,ida之类的反编译。.pyd文件是由.c文件生成的;.c由.py或.pyx文件生成。因此只能反编译成.c文件。pyd是Python Dynamic Module为开发的基本来说,是很难查看的,目前尚未看到方法Referencespython,pyd文件如何实现反编译?[原创]python编译后的pyd爆破...
2020-10-19 22:55:10 1065
原创 理解dataframe.swaplevel(1,0).sort_index()
DataFrame.swaplevel(i=-2,j=-1,axis=0)Swap level i and j in a MultiIndex on a particular axis.i,j : int or str, Levels of the indices to be swapped.axis : {0 or ‘index’, 1 or ‘columns’}, default 0. The axis to swap levels on .DataFrame.sort_index(ax..
2020-10-19 22:53:59 1100
原创 初识redis
OverviewRedis不使用表。Redis可以存储键和5种不同数据结构类型之间的映射。5种数据结构类型:STRING命令意义适用GET获取值,成功返回值,失败返回nilSET设置值,成功返回OKDEL删除值所有类型LISTLPUSHRPUSHLPOPRPOPLINDEXLRANGESETSADDSREMSISMEMBERHASH类似一个微缩版的redis。HSETHGETHGETALLHDE..
2020-10-19 22:53:15 162
原创 初识MultiIndex in Python
MultiIndex.from_product(iterables, sortorder=None,names=<object,object>)Make a MultiIndex from de cartestian product of multiple iterables.iterables:list / sequence of iterablessortorder : int or None,level of sortednessnames: list/sequence of ..
2020-10-19 22:51:37 113
原创 初识collections module in Python
collectionsThis module implements specialized container datatypes providing alternatives to Python’s general purpose built-in containers, dict, list, set, and tuple.ObjectsDescribenamedtuple()factory function for creating tuple subclasses wi..
2020-10-19 22:50:56 101
原创 vscode 如何debug第三方模块源码
问题描述如题解决方案在launch.json中添加"justMyCode":falsedebug – create a launch.json fileReferencesVScode如何Debug(调试)进入标准库文件/第三方包源码
2020-10-18 21:56:52 1580
原创 (20200916 Solved)Docker||redis-cli Could not connect to Redis at 127.0.0.1:6379: Connection refused
问题描述redis-cli is the Redis command line interface, 用来与Redis服务进行交互,如题是因为Redis服务尚未启动。解决方案通过配置文件$ vi /etc/redis.conf# daemonize no 改为 yesredis-server /etc/redis.confdocker启动redis里面没有配置文件。需要自己建。直接启动redis-server &ReferencesCould ..
2020-10-18 21:55:38 1068
原创 (20200915Solved)Vscode出现Unable to open ‘hashtable_class_helper.pxi‘
问题描述Unable to open ‘hashtable_class_helper.pxi’: Unable to read file ‘vscode-remote://ssh-remote+data1/home/data/anaconda3/lib/python3.7/site-packages/pandas/_libs/hashtable_class_helper.pxi’ (Error: Unable to resolve non-existing file ‘vscode-remote:/..
2020-10-18 21:54:38 1110
原创 理解io/ioutil in go
package ioutilPackage ioutil implements some I/O utility functions.VariablesDiscard is an io.Writer on which all Write calls succeed without doing anything.var Discard io.Writer = devNull(0)FunctionsReadFilefunc ReadFile(filename string..
2020-10-18 21:34:38 235
原创 理解exposure风险暴露中的暴露 in Finance
Risk ExposureRisk Exposure is the measure of potential future loss resulting from a specific activity or event.Finiancial ExposureIn finance, exposure refers to the amount of money that an investor has invested in a particular asset.It represents t..
2020-10-18 21:31:25 943
原创 理解fmt||net/http in Go
fmtPackage fmt implements formatted I/O with functions analogous to C’s printf and scanf.The format ‘verbs’ are drived from C’s but are simpler.fmt.PrintlnPrintln formats using the default formats for its operands and writes to standard output.Spa..
2020-10-18 21:30:46 1626 6
原创 理解differences between docker vs. docker-compose
dockerThe docker cli is used when managing individual containers on a docker engine.It is the client command line to access the docker daemon api.docker-composeThe docker-compose cli can be used to manage a multi-container application.It also move..
2020-10-01 09:54:31 147
原创 理解:=||nil||defer in Go
:= vs. =They are both assignments in Go.// =var name type = expressionvar x int = 1// := short variable declarationname := expression // the type of name is determined by the type of expression:= is a declaration, whereas = is an assignment...
2020-10-01 09:53:32 133
20171122-招商证券-招商证券因子模型系列之一:基于增量信息逐层解释的因子模型框架搭建.pdf
2019-12-12
20180106-方正证券-方正证券“星火”多因子系列报告(一):Barra模型初探,A股市场风格解析.pdf
2019-08-29
20170501-光大证券-光大证券多因子系列报告之三:多因子组合光大Alpha1.0.pdf
2019-08-27
Volatility-based technical analysis strategies for trading the invisible
2019-04-07
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人