关于wget:115centos-支持命令-wget

yum -y install wget

November 18, 2022 · 1 min · jiezi

Linux升级wget/curl用于下载https文件的过程

因为需要提升服务器的性能以及支持mysql更新版本的某些特性,因此决定升级mysql版本从5.1.30到8.0,目标确定下来就开始干。Mysql安装方式选择在Linux上安装应用,一般有三种方式,优劣对比分别为:因此我们选择二进制安装,安装简单、方便,支持多个Mysql版本同时存在。在Linux上安装二进制版本的应用,统一为三步:// 通过配置自动生成文件./configure// 编译文件make// 检查自测单元,看编译是否通过,可以省略该步,不影响安装make check// 安装make install卸载通过二进制安装的程序:// 方式一: 在编译目录里执行卸载make uninstall// 方式二:找到安装目录,然后删除,如nettle程序$find / -name nettle/usr/include/nettlerm -rf /usr/include/nettlewget不支持https我们可以在mysql官网下载最新版本的mysql8.0.13二进制文件,注意官网提供的下载链接是https协议的,当我们在服务器执行下载命令:// 使用wget或者curl来下载文件wget https://dev.mysql.com/downloads/file/?id=480751curl -O https://dev.mysql.com/downloads/file/?id=480751会报错:// wget 加上–no-check-certificate 依然不可以$wget https://dev.mysql.com/downloads/file/?id=480751--2018-12-12 16:57:54– https://dev.mysql.com/downloads/file/?id=480751Resolving dev.mysql.com (dev.mysql.com)… 137.254.60.11Connecting to dev.mysql.com (dev.mysql.com)|137.254.60.11|:443… connected.GnuTLS: A TLS fatal alert has been received.GnuTLS: received alert [40]: Handshake failedUnable to establish SSL connection.// curl 加上–insecure依然不可以$curl https://dev.mysql.com/downloads/file/?id=480751curl: (35) SSL connect error根据网上查询到的答案,原因均为版本过低,当前的版本不支持https协议的下载:So the error actually happens with www.coursera.org and the reason is missing support for SNI. You need to upgrade your version of wget.当前的版本:$wget –versionGNU Wget 1.16.3 built on linux-gnu.+digest +https +ipv6 +iri +large-file +nls +ntlm +opie -psl +ssl/gnutls Wgetrc: /usr/local/etc/wgetrc (system)Locale: /usr/local/share/locale Compile: gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/usr/local/etc/wgetrc" -DLOCALEDIR="/usr/local/share/locale" -I. -I../lib -I../lib -DHAVE_LIBGNUTLS -DNDEBUG Link: gcc -DHAVE_LIBGNUTLS -DNDEBUG -lpcre -lnettle -lgnutls -lz -lidn -lrt ftp-opie.o gnutls.o http-ntlm.o ../lib/libgnu.a Copyright (C) 2014 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later<http://www.gnu.org/licenses/gpl.html>.This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law.Originally written by Hrvoje Niksic <hniksic@xemacs.org>.Please send bug reports and questions to <bug-wget@gnu.org>.——————$curl.7.19.7 –versioncurl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.13.1.0 zlib/1.2.3 libidn/1.18 libssh2/1.2.2Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz wget升级既然是版本过低,升级即可,直接安装新版本的wget,然后卸载掉原有的wget文件即可。下载完成1.20版本之后// 获得文件wget-1.20.tar.gzwget http://mirror.sergal.org/gnu/wget/wget-1.20.tar.gz// 解压缩tar -xzvf wget-1.20.tar.gz// 进入解压后的文件夹cd wget-1.20// 开始配置./configure// 然而报错了:…checking for GNUTLS… noconfigure: error: Package requirements (gnutls) were not met:No package ‘gnutls’ foundConsider adjusting the PKG_CONFIG_PATH environment variable if youinstalled software in a non-standard prefix.Alternatively, you may set the environment variables GNUTLS_CFLAGSand GNUTLS_LIBS to avoid the need to call pkg-config.See the pkg-config man page for more details.报错信息显示我们没有安装gnutls依赖,需要继续进行安装,更为详细的报错信息,可以查看config.log:// 查看详细报错信息vim config.log…PKG_CONFIG=’/usr/local/bin/pkg-config’…configure:44443: checking for GNUTLSconfigure:44450: $PKG_CONFIG –exists –print-errors “gnutls"Package gnutls was not found in the pkg-config search path.Perhaps you should add the directory containing gnutls.pc'to the PKG_CONFIG_PATH environment variableNo package 'gnutls' foundconfigure:44453: $? = 1configure:44467: $PKG_CONFIG --exists --print-errors "gnutls"Package gnutls was not found in the pkg-config search path.Perhaps you should add the directory containing gnutls.pc’to the PKG_CONFIG_PATH environment variableNo package ‘gnutls’ foundconfigure:44470: $? = 1configure:44484: result: noNo package ‘gnutls’ foundconfigure:44500: error: Package requirements (gnutls) were not met:No package ‘gnutls’ foundConsider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables GNUTLS_CFLAGS and GNUTLS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.这里可以看出配置脚本实际是执行了:$ /usr/local/bin/pkg-config –exists –print-errors “gnutls"Package gnutls was not found in the pkg-config search path.Perhaps you should add the directory containing gnutls.pc'to the PKG_CONFIG_PATH environment variableNo package 'gnutls' found安装gnutls库gnutls全称 GNU Transport Layer Security Library,即基于GNU版权协议的传输层安全协议,是wget支持https中的ssl协议的基础库。我们可以在官方提供的镜像库里快速下载并安装:// 下载gnutls二进制文件wget http://www.ring.gr.jp/pub/net/gnupg/gnutls/v3.6/gnutls-3.6.4.tar.xz// 解压xz文件xz -d gnutls-3.6.4.tar.xztar -xvf gnutls-3.6.4.tarcd gnutls-3.6.4./configure// 报错:...checking for NETTLE... noconfigure: error: *** *** Libnettle 3.4 was not found.// 如果觉得可能不安全,可以下载md5签名文件验证文件,但是这个文件验证后发现签名过期了,所以没办法验证了wget http://www.ring.gr.jp/pub/net...gpg --verify gnutls-3.6.4.tar.xz.sig gnutls-3.6.4.targpg --recv-key F1679A65gpg --verify --verbose gnutls-3.6.4.tar.xz.sig gnutls-3.6.4.tar查看详细报错信息:$ vim config.log...configure:10032: checking for NETTLEconfigure:10039: $PKG_CONFIG --exists --print-errors "nettle &gt;= 3.4"Package nettle was not found in the pkg-config search path.Perhaps you should add the directory containing nettle.pc’to the PKG_CONFIG_PATH environment variableNo package ’nettle’ foundconfigure:10042: $? = 1configure:10056: $PKG_CONFIG –exists –print-errors “nettle >= 3.4"Package nettle was not found in the pkg-config search path.Perhaps you should add the directory containing nettle.pc'to the PKG_CONFIG_PATH environment variableNo package 'nettle' foundconfigure:10059: $? = 1configure:10073: result: noNo package 'nettle' foundconfigure:10090: error: *** *** Libnettle 3.4 was not found.结果显示我们需要3.4版本以上的Libnettle库,继续安装。安装Libnettle库Nettle库是用于跨平台的底层密码库,包含加密和解密的不同算法。我们下载并安装nettle库:wget ftp://ftp.gnu.org/gnu/nettle/nettle-3.4.1.tar.gztar -xzvf nettle-3.4.1.tar.gzcd nettle-3.4.1./configure// 安装成功...configure: summary of build options: Version: nettle 3.4.1 Host type: x86_64-unknown-linux-gnu ABI: 64 Assembly files: x86_64 Install prefix: /usr/local Library directory: ${exec_prefix}/lib64 Compiler: gcc Static libraries: yes Shared libraries: yes Public key crypto: no Using mini-gmp: no Documentation: yesmakemake install根据官方文档,我们安装完成后应该会有两个文件lib{hogweed,nettle}.so,然而我们只能发现其中一个:make install &amp;&amp;chmod -v 755 /usr/lib/lib{hogweed,nettle}.so &amp;&amp;install -v -m755 -d /usr/share/doc/nettle-3.4.1 &amp;&amp;install -v -m644 nettle.html /usr/share/doc/nettle-3.4.1$ ll | grep '\.so'-rwxr-xr-x 1 root root 3675341 Dec 12 19:15 libnettle.so$ ll | grep weed-rw-rw-r-- 1 work work 529 Dec 10 15:30 hogweed.pc-rw-r--r-- 1 work work 590 Nov 19 2017 hogweed.pc.in-rw-rw-r-- 1 work work 298 Dec 10 15:30 libhogweed.map-rw-r--r-- 1 work work 338 Nov 19 2017 libhogweed.map.in少了一个libhogweed.so文件,稍后我们编译gnutls时会发现这个导致的问题。继续编译gnutls既然nettle安装完成了,我们可以继续安装gnutls:./configure...configure: error: *** *** Libnettle 3.4 was not found.依然报错缺失库,但我们明明已经安装了,为什么找不到呢?我们用包管理工具查找一下:$ pkg-config --modversion nettlePackage nettle was not found in the pkg-config search path.Perhaps you should add the directory containing nettle.pc’to the PKG_CONFIG_PATH environment variableNo package ’nettle’ found我们找下这个nettle.pc刚才安装到哪里去了:$ locate nettle.pc/home/work/lib/nettle-3.4.1/nettle.pc/home/work/lib/nettle-3.4.1/nettle.pc.in/usr/lib64/pkgconfig/nettle.pc/usr/local/lib64/pkgconfig/nettle.pc而我们pkg-config默认的管理包检索路径为/usr/lib/pkgconfig,所以无法正常找到,参考pkgconfig文档,有两种方案:// 方案一:链接该文件到默认目录中ln -s /usr/local/lib64/pkgconfig/nettle.pc /usr/lib/pkgconfig/nettle.pc // 方案二:全局变量中更改包的检索路径(只在本次终端窗口生效,退出后恢复,所以只能临时使用一下)$ echo $PKG_CONFIG_PATH$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib64/pkgconfig/$ echo $PKG_CONFIG_PATH:/usr/local/lib64/pkgconfig/// 任一方案执行后结果$ pkg-config –modversion nettle3.4.1此时,我们继续安装:$ ./configure…checking for NETTLE… yeschecking for HOGWEED… noconfigure: error: *** *** Libhogweed (nettle’s companion library) was not found. Note that you must compile nettle with gmp support.可以看到,我们的nettle库已经安装成功,但是hogweed却检查没有找到,提示中也写明了libhogweed需要字gmp库已经安装完成的情况下重新编译nettle才可以被安装。有人提出过相关的问题,我们也可以从官网文档上更详细的知道这个Nettle对于libhogweed的依赖:5 LinkingNettle actually consists of two libraries, libnettle and libhogweed. The libhogweed library contains those functions of Nettle that uses bignum operations, and depends on the GMP library. With this division, linking works the same for both static and dynamic libraries.If an application uses only the symmetric crypto algorithms of Nettle (i.e., block ciphers, hash functions, and the like), it’s sufficient to link with -lnettle. If an application also uses public-key algorithms, the recommended linker flags are -lhogweed -lnettle -lgmp. If the involved libraries are installed as dynamic libraries, it may be sufficient to link with just -lhogweed, and the loader will resolve the dependencies automatically.总而言之,就是没有libhogweed.so这个文件不行,而它只能由nettle进行安装。根据nettle库官方资料显示,libhogweed.so应该在nettle安装时被自动生成,然而我们在上面的安装过程中并没有生成。那是不是因为我没有安装gmp导致的呢?安装gmp库我们下载gmp库并安装,可以在编译Nettle的config.log中查看有一条warning,指明了版本需求:$ vim config.log…configure:6583: result: noconfigure:6594: WARNING: GNU MP not found, or too old. GMP-6.0 or later is needed, see https://gmplib.org/. Support for public key algorithms will be unavailable.所以我们需要下载6.0版本后的:// 这里我只找到了官网的https版本,没办法,只好本地下载,然后rz到服务器,因为是二进制文件,要带上-be参数rz -be// 然后正常编译$ ./configure & make & make install…Libraries have been installed in: /usr/local/libIf you ever happen to want to link against installed librariesin a given directory, LIBDIR, you must either use libtool, andspecify the full pathname of the library, or use the ‘-LLIBDIR’flag during linking and do at least one of the following: - add LIBDIR to the ‘LD_LIBRARY_PATH’ environment variable during execution - add LIBDIR to the ‘LD_RUN_PATH’ environment variable during linking - use the ‘-Wl,-rpath -Wl,LIBDIR’ linker flag - have your system administrator add LIBDIR to ‘/etc/ld.so.conf’这里提醒我们需要将动态库链接到缓存中,我们采用第四种方案,可以参考ldconfig命令:$ vim /etc/ld.so.conf// 添上安装的.so文件路径/usr/local/lib:wq$ ldconfig$ ldconfig -v | grep gmp libgmp.so.10 -> libgmp.so.10.3.2 libgmpxx.so.4 -> libgmpxx.so.4.1.0 libgmp.so.3 -> libgmp.so.3.5.0看到libgmp.so.10就是我们安装的最新版本,现在OK了。然后重新编译安装nettle,会生成libhogweed.so文件:$ ll | grep weed-rw-r–r– 1 root root 541 Dec 12 22:12 hogweed.pc-rw-r–r– 1 work work 590 Nov 19 2017 hogweed.pc.in-rw-r–r– 1 root root 6154192 Dec 12 22:13 libhogweed.a-rw-r–r– 1 root root 298 Dec 12 22:12 libhogweed.map-rw-r–r– 1 work work 338 Nov 19 2017 libhogweed.map.in-rwxr-xr-x 1 root root 5519996 Dec 12 22:13 libhogweed.so-rw-r–r– 1 root root 8 Dec 12 22:13 libhogweed.stamp请注意如果安装完成后,如果出现多个版本的gmp库,请删除老版本的。具体删除哪一项请自行斟酌,我删除了所有的,然后在编译的过程中,会报错:can’t find libgmp.so.3,说明libgmp.so.3这个是基础库,请不要动!等我删除了老版本的,重新编译nettle就OK。如果你安装成功了新版本,依然编译不成功,请参考这个。恐怖的依赖地狱用二进制来安装的时候,总是会出现各种各样的问题,缺少各种依赖的包,解决方法就是缺什么就去安什么,但是会非常恐怖。为了解决nettle安装的问题,除了上面的gmp,我还安装了最新版本的各种库:libunistring: https://www.gnu.org/software/...p11-kit:https://github.com/p11-glue/p…libffi:https://sourceware.org/libffi/pkg-config: https://pkg-config.freedeskto...libtasn1: https://ftp.gnu.org/gnu/libta…同时,由于gnutls编译不通过的问题,又升级了pkg-config,它依赖于Libtasn1。继续安装gnutls库(失败、暂时放弃更新)./configure// 此时没有错误信息了,但是还有很多WARNING信息*** autogen not found. Will not link against libopts.*** You will not be able to create source packages with ‘make dist’ because gtk-doc >= 1.14 is not found.*** LIBIDN2 was not found. You will not be able to use IDN2008 support*** libunbound was not found. Libdane will not be built.*** trousers was not found. TPM support will be disabled.*** `guile-snarf’ from Guile not found. Guile bindings not built.*** The DNSSEC root key file in /etc/unbound/root.key was not found.*** This file is needed for the verification of DNSSEC responses.*** Use the command: unbound-anchor -a “/etc/unbound/root.key”*** to generate or update it.// 继续编译,又报错了make…tlsproxy/buffer.c:40: error: redefinition of typedef ‘buffer_t’tlsproxy/buffer.h:31: note: previous declaration of ‘buffer_t’ was here暂时放弃更新wget,过几天继续尝试,解决各种问题太费时间了如果想要减少warning信息,可以更新autogen等库:autogen: https://ftp.gnu.org/gnu/autog...guile: http://alpha.gnu.org/gnu/guile/gcc: http://ftp.tsukuba.wide.ad.jp...mpc: https://ftp.gnu.org/gnu/mpc/安装autogen过程中需要依赖guile,然而安装guile时又报错:guile configure: error: Cannot find a type to use in place of socklen_t放弃更新autogen。尝试curl更新,层层依赖,放弃$ curl https://dev.mysql.com/downloads/file/?id=480751curl: (35) SSL connect error根据报错原因和网上资料是由于版本过老,需要更新curl版本。从官方地址下载curl后安装,再次用新版本的curl请求:$ curl https://dev.mysql.com/downloads/file/?id=480751curl: (35) error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure还是报错,根据上面的资料,如果依然不能解决问题,需要更新NSS,NSS和OpenSSl类似,都属于底层密码学,由Mozilla维护,MDN文档提供安装说明,它跟前面的二进制文件略有不同,不提供configure自动配置,详细的查看它的文档。安装NSS库比较麻烦,还需要再安装GYP库,想起来又是层层嵌套的依赖关系,放弃更新。解决方案:本地下载,rz上传在耗费两天的时间后,我及时的终止了无畏的尝试,转而使用本地下载mysql8.0文件,然后rz -be上传到服务器,搞定。结论:Linux上层层依赖的二进制文件安装简直是地狱版的体验,在给我们带来高自由度的同时也有无尽的烦恼,然而yum安装版本又过低,不能满足需求。虽然最终还是没有成功更新wget或者curl,但是在整个过程中,也学习到了很多的新东西,在这篇文章总结一下过程,希望也能帮助一些人在某一步骤遇到的问题。解决问题整体思路和过程参考资料mysql8.0官网下载地址:https://dev.mysql.com/downloa…Mysql三种安装方式详解:https://www.jianshu.com/p/a04…[StackOverFlow] wget ssl alert handshake failure:https://stackoverflow.com/que…卸载二进制程序:http://www.blogjava.net/zhyiw…wget下载地址:http://mirror.sergal.org/gnu/…gnutls下载地址:http://www.ring.gr.jp/pub/net…利用.sig文件验证数据的完整性:https://blog.csdn.net/xiazhiy…下载安装nettle http://www.linuxfromscratch.o...nettle官方文档:http://www.lysator.liu.se/~ni…gmp下载地址:https://gmplib.org/ldconfig命令:http://man.linuxde.net/ldconfigSecureCRT rz 上传文件失败问题:https://blog.csdn.net/heavend…初识NSS,一文了解全貌:https://cloud.tencent.com/dev…MDN文档 NSS:https://developer.mozilla.org…curl: (35) SSL connect error:https://stackoverflow.com/que…简述configure、pkg-config、pkg_config_path三者的关系:http://www.mike.org.cn/articl…How to compile GnuTLS: https://stackoverflow.com/que… ...

December 13, 2018 · 6 min · jiezi

Python数据科学“冷门”库

摘要: 这些python库真“冷”,但真的很强大!Python是一种神奇的语言。事实上,它是近几年世界上发展最快的编程语言之一,它一次又一次证明了它在开发工作和数据科学立场各行业的实用性。整个Python系统和库是对于世界各地的用户(无论是初学者或者高级)都是一个恰当的选择。其成功和受欢迎的原因之一是它强大的库,这些库使其具有动态性和快速性。在本文中,我们将看到一些除了常用的像pandas、scikit-learn、 matplotlib之外的数据科学任务的Python库。虽然一看见像pandas,scikit-learn这些库就让人脑子浮现出机器学习任务,但了解并学习这个领域的其他python库总归是有益的。1、Wget从网页提取数据是数据科学家的重要任务之一。Wget是一个免费的非交互性的从网上下载文件的实用工具。它支持HTTP、HTTPS和FTP协议,以及通过HTTP代理检索。因为它是非交互性的,所以即使用户没有登录,也可以在后台工作。所以下次你想下载一个网站或页面的图片,wget可以帮助你。安装:$ pip install wget例子:import wget url = ‘http://www.futurecrew.com/skaven/song_files/mp3/razorback.mp3' filename = wget.download(url) 100% […………………………………………] 3841532 / 3841532 filename ‘razorback.mp3'2、Pendulum对于那些在python中使用日期时间感到沮丧的,可以使用Pendulum。它是一个python包,可以缓解日期时间操作,是一个python的原生类替代。如果想深入了解请参考该文档。安装:$ pip install pendulum例子:import pendulum dt_toronto = pendulum.datetime(2012, 1, 1, tz=‘America/Toronto’) dt_vancouver = pendulum.datetime(2012, 1, 1, tz=‘America/Vancouver’) print(dt_vancouver.diff(dt_toronto).in_hours()) 33、imbalanced-learn我看到过大多数分类算法效果,每个类的样本数量几乎是相同的,如balanced。但是现实生活情况下大部分是不平衡数据集,它会影响学习阶段和随后的机器学习算法的预测。幸运的是,创建了这个imbalanced库来解决这个问题。它兼容了scikit-learn并且是scikit-learn-contrib项目的一部分。当下次遇到不平衡数据集,可以尝试使用这个库。安装:pip install -U imbalanced-learn #or conda install -c conda-forge imbalanced-learn例子:用法和例子请参考文档。4、FlashTextNLP任务中清理文本数据常常需要在句子中换关键字或从句子中提取关键字。通常,这些操作可以用正则表达式来完成,但如果搜索方面遇到了数以千计的数量,可能会成为麻烦。Python的FlashText模块,该模块基于FlashText算法提供了恰当的替代等情况。FlashText最好的部分是运行时间与搜索词的数量无关,你可以在这里了解更多。安装:$ pip install flashtext例子:提取关键字from flashtext import KeywordProcessor keyword_processor = KeywordProcessor() # keyword_processor.add_keyword(<unclean name>, <standardised name>) keyword_processor.add_keyword(‘Big Apple’, ‘New York’) keyword_processor.add_keyword(‘Bay Area’) keywords_found = keyword_processor.extract_keywords(‘I love Big Apple and Bay Area.’) keywords_found [‘New York’, ‘Bay Area’]替代关键字keyword_processor.add_keyword(‘New Delhi’, ‘NCR region’) new_sentence = keyword_processor.replace_keywords(‘I love Big Apple and new delhi.’) new_sentence ‘I love New York and NCR region.‘5、Fuzzywuzzy这个名字听起来确实很奇怪,但在处理字符串匹配时,fuzzywuzzy是一个非常有用的库,可以轻松实现操作,比如字符串比较比率,令牌比率等。它也方便匹配保存在不同数据库的记录。安装:$ pip install fuzzywuzzy例子:from fuzzywuzzy import fuzz from fuzzywuzzy import process # Simple Ratio fuzz.ratio(“this is a test”, “this is a test!”) 97 # Partial Ratio fuzz.partial_ratio(“this is a test”, “this is a test!”) 100可以在GitHub repo找到更多有趣的例子。6、PyFlux时间序列分析是机器学习领域最常见的问题之一。PyFlux是一个在Python中为了时间序列问题而建立的开源库。该库有一个良好的现代时间序列模型包括但不限于ARIMA、GARCH和VAR模型。简而言之,PyFlux针对时间序列建模提供了一种概率方法,值得一试。安装:pip install pyflux例子:用法例子请参考相关文档。7、Ipyvolume结果可视化是数据科学的一个重要方面。能够可视化结果具有很大的优势。 IPyvolume是一个Python库,只需最少的配置和精力就可以在Jupyter notebook中可视化3d体积和字形(例如3d散点图)。但是,它目前处于1.0之前的阶段。一个很好的比喻是这样的:IPyvolume的volshow是3d数组而matplotlib的imshow是2d数组。你可以在这里读更多关于它的内容。安装:Using pip $ pip install ipyvolume Conda/Anaconda $ conda install -c conda-forge ipyvolume例子:动画立体渲染8、DashDash是一个用于构建Web应用程序的高效Python框架。它写在Flask,Plotly.js和React.js之上,并将现有的UI元素(如下拉列表,滑块和图形)与你的分析Python代码联系起来,而无需使用javascript。Dash非常适合构建数据可视化应用程序,然后可以在Web浏览器中呈现这些应用程序。用户指南可在此处访问。安装pip install dash==0.29.0 # The core dash backend pip install dash-html-components==0.13.2 # HTML components pip install dash-core-components==0.36.0 # Supercharged components pip install dash-table==3.1.3 # Interactive DataTable component (new!)例子下面的示例显示了下拉表的高度交互式图形。当用户在下拉列表中选择一个值时,应用程序代码会将Google财经中的数据动态导出到Pandas DataFram中。源代码9、GymOpenAI的Gym是一个用于开发和比较强化学习算法的工具包。它与任何数值计算库兼容,如TensorFlow或Theano。Gym库是测试问题的必要集合,也称为环境 – 你可以使用它来训练强化学习算法。这些环境具有共享接口,允许编写通用算法。安装pip install gym例子以下是运行环境CartPole-v0中1000个步骤的实例的例子,在每个步骤渲染环境。你可以在这里了解更多的环境。结论这些是我选的对于数据科学有用的python库,而不是常见的如numpy,pandas等。如果你知道可以添加到列表中的其他库,请在下面的评论中提及。别忘了尝试一下。本文作者:【方向】阅读原文本文为云栖社区原创内容,未经允许不得转载。 ...

November 16, 2018 · 1 min · jiezi