# hundsun **Repository Path**: juicehe/hundsun ## Basic Information - **Project Name**: hundsun - **Description**: No description available - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2016-05-10 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #Hundsun ``何卓论 1300012885`` Email: [Fork on OSChina](http://git.oschina.net/juicehe/hundsun) ##Introcution Hundsun is a project to display high-end and low-end data of stocks. ![index](snapshot/index.png) Two queries are contained in the demo. - beta_value ![beat_calue](snapshot/beta.png) - gain ![gain](snapshot/gain.png) This README file is organized as follows. >- Introduction >- Tools >- Run >- Design >- Database >- File ##Tools - Front-end - [bootstrap](http://getbootstrap.com) > The most popular HTML, CSS, and JavaScript framework for developing responsive, mobile first projects on the web. - [Backbone.js](http://backbonejs.org/) > Give your JS App some Backbone with Models, Views, Collections, and Events - [D3.js](https://d3js.org/) > Bring data to life with SVG, Canvas and HTML. - Back-end - [CherryPy](http://docs.cherrypy.org/) > A Minimalist Python Web Framework - [MySQLWorkbench](http://dev.mysql.com/downloads/workbench/) > Provides DBAs and developers an integrated tools environment. - Data source - [tushare](http://tushare.org/index.html) > 一个免费、开源的python财经数据接口包。 ##Run - Run server ``$ python server.py`` - Visit the website ``127.0.0.1:8080`` ##Design ![hundsun](design/Hundsun.png) ##Database ### Norm BCNF ### Tabel ![database](design/HundsunModel.png) |Tabel|PK|FK| |---|---|---|---| |index_basics|code| |index_hist_data|code, date|code -> index_basics.code| |stock_basics|code| |stock_hist_data|code, date|code -> stock_basics.code| |stock_beta_cache|code, month|code -> stock_basics.code| ###Procedure - ``get_stk_hist(i_code)`` Return all history data of i_code. - ``get_idx_rtn(i_code, i_start, i_end)`` Return index return of i_code from i_start to i_end. - ``get_stk_rtn(i_code, i_start, i_end)`` Return stock return of i_code from i_start to i_end. - ``get_stk_beta(i_code, i_start, i_end)`` Return beta value of i_code from i_start to i_end. - ``get_stk_beta_a(i_code)`` Return all monthly beta value of i_code. ###User - root - admin(EXECUTE, SELECT, INSERT, UPDATE) - user(EXECUTE) ##Files ###design - hundsun.scap: design of this project - Hundsun.png: snapshot of the design - HundsunModel.mwb: model of database - HundsunModel.png: snapshot of the model - Hundsundb_generate.sql: script to generate database tables - stored_procedure.sql: script to generate database stored proceudres ###web - index.html: index page of Hundsun - mystocks.html: user page of Hundsun - admin.html: admin page of Hundsun - server.py: procedure to setup server - data.py: procedure of model - public: static resources of web - js: folder to store javascript files - css: folder to store css files - img: folder to store images - bootstrap: folder of bootstrap framework