Last active
October 12, 2016 14:39
-
-
Save wynemo/16b1426c4e19a6194033d2b7ffb0fbca to your computer and use it in GitHub Desktop.
conda
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wget -c https://repo.continuum.io/archive/Anaconda2-4.2.0-Linux-x86_64.sh | |
| sh Anaconda2-4.2.0-Linux-x86_64.sh | |
| ./conda --version | |
| export http_proxys=127.0.0.1:7000 | |
| ./conda create -vv -n mystock python=2.7 numpy pandas matplotlib ipython scipy | |
| source activate mystock | |
| (mystock) [nemo.zhang@cws71 bin]$ ipython --pylab | |
| Python 2.7.12 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:42:40) | |
| Type "copyright", "credits" or "license" for more information. | |
| IPython 5.1.0 -- An enhanced Interactive Python. | |
| ? -> Introduction and overview of IPython's features. | |
| %quickref -> Quick reference. | |
| help -> Python's own help system. | |
| object? -> Details about 'object', use 'object??' for extra details. | |
| /home/nemo.zhang/anaconda2/envs/mystock/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment. | |
| warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.') | |
| Using matplotlib backend: Qt5Agg | |
| In [1]: plot(arange(10) | |
| ...: ) | |
| Out[1]: [<matplotlib.lines.Line2D at 0x7efdb2fce250>] | |
| conda install -n mystock lxml requests | |
| pip install tushare | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tushare as ts | |
| frame = ts.get_growth_data(2016,2) | |
| frame1 = frame.set_index('name') | |
| frame1 = frame1[frame1.nav.gt(15)] | |
| frame1 = frame1[frame1.nav.lt(100)] | |
| frame1 = frame1[frame1.nprg.gt(50)] | |
| frame1 = frame1[frame1.nprg.lt(100)] | |
| frame1 = frame1[frame1.mbrg.gt(50)] | |
| frame1 = frame1[frame1.mbrg.lt(100)] | |
| q = frame1[['nprg', 'nav', 'mbrg']] | |
| q.plot() | |
| zhfont1 = fm.FontProperties(fname='cfc-list | grep -i cn') | |
| yticks(arange(len(q)) + 0.13, q.index, rotation=30, fontproperties=zhfont1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment