第三方的论坛程序安全隐患太多, 为了用户安全着想, 还是自己写了
Tôi đã dùng nó.
Hỗ trợ ngữ pháp Markdown đơn giản và phổ biến
Ví dụ:
Trích dẫn từ:
Một đoạn trích dẫn ở dưới đây:
Lưu ý: Các liên kết được trích dẫn có chứa ký tự bảo lưu URL sẽ bị xóa không gian-
Thay thế
Danh sách sử dụng*Bắt đầu bằng một dấu trống, như:
Hỗ trợ danh sách theo thứ tự, với số cộng thêm “” với khoảng trống bắt đầu như:
1. 111
1. 222
1. 333
Hỗ trợ bằng ba”`“có chứa hoặc chèn bốn khoảng trống như:
Log("OK");
Hiển thị tài liệu tham khảo hỗ trợ: Bắt đầu với> thêm khoảng trống, như
Đây là một trích dẫn.
Hỗ trợKhô hơn, Hình cong, 代码
Hỗ trợ tự động chuyển đổi URL liên kết thành liên kết như: http://www.fmz.com/
Khả năng hỗ trợ biểu đồ luồng
st=>start: Start
e=>end
op1=>operation: My Operation
sub1=>subroutine: My Subroutine
cond=>condition: Yes
or No?:>
io=>inputoutput: catch something...
st->op1->cond
cond(yes)->io->e
cond(no)->sub1(right)->op1
Hỗ trợ hiển thị URL trực tiếp với hình ảnh hoặc mp3 hoặc video (không cần biểu thị hình ảnh theo ngữ pháp markdown, không cần hiển thị thay đổi hai dòng) như:
Hình ảnh:
mp3: /upload/asset/8a34400e447ba4e094ee0ef7c936f9ca0f800bfb.mp3
福利在此
(Phần lớn hơn một chút):
/upload/asset/510a58f206fcdeb9d9751e11177a0e245b6238aa.mp4
Tiếp theo, bạn có thể sử dụng các từ khóa khác nhau.
Nhúng một tài liệu nghiên cứu
import pandas as pd import seaborn as sns import fmz df = fmz.get_bars('MA001', start='2018-01-01 08:00:00', end='2019-10-31') returns = df.pct_change().dropna() sns.distplot(returns.iloc[:,0:1])
<matplotlib.axes._subplots.AxesSubplot at 0x7fd1b8018278> <Figure size 432x288 with 1 Axes>
df1 = fmz.get_bars('btc_usd_bitfinex', start='2017-01-01', end='2018-01-31') df2 = fmz.get_bars('eth_usd_bitfinex', start='2017-01-01', end='2018-01-31') returns_a = df1.pct_change().dropna() returns_b = df2.pct_change().dropna() sns.jointplot(df1['open'], df2['open'], kind='reg', height=12)
<seaborn.axisgrid.JointGrid at 0x7f9fda15b198> <Figure size 864x864 with 3 Axes>
returns = df1.pct_change().dropna() sns.distplot(returns.iloc[:,0:1])
<matplotlib.axes._subplots.AxesSubplot at 0x7f5250283208> <Figure size 432x288 with 1 Axes>
sns.violinplot(returns,size=24)
<matplotlib.axes._subplots.AxesSubplot at 0x7f524dc3a320> <Figure size 432x288 with 1 Axes>
sns.pairplot(returns, diag_kind='kde', size=2.4)
<seaborn.axisgrid.PairGrid at 0x7f51d6bd6be0> <Figure size 864x864 with 30 Axes>
sns.heatmap(returns.corr())
<matplotlib.axes._subplots.AxesSubplot at 0x7f51d5d98470> <Figure size 432x288 with 2 Axes>
sns.clustermap(returns.corr())
<seaborn.matrix.ClusterGrid at 0x7f51d5cd6978> <Figure size 720x720 with 4 Axes>
import fmz bars = fmz.get_bars("MA888") bars
open high low close volume 2019-03-03 2638 2694 2608 2662 3044544 2019-03-04 2668 2671 2627 2654 2070936 2019-03-05 2656 2677 2623 2658 2340822 2019-03-06 2654 2671 2575 2584 2700718 2019-03-07 2591 2596 2552 2578 2342280 ... ... ... ... ... ... 2019-09-22 2320 2382 2320 2377 1976592 2019-09-23 2374 2391 2343 2379 1994652 2019-09-24 2376 2415 2354 2404 2295352 2019-09-25 2404 2422 2345 2377 2693284 2019-09-26 2365 2378 2323 2341 2004090 [143 rows x 5 columns]
import talib talib.EMA(bars['close'])
2019-03-03 NaN 2019-03-04 NaN 2019-03-05 NaN 2019-03-06 NaN 2019-03-07 NaN ... 2019-09-22 2239.369039 2019-09-23 2248.377488 2019-09-24 2258.417650 2019-09-25 2266.068124 2019-09-26 2270.902439 Length: 143, dtype: float64