siat 3.7.21__py3-none-any.whl → 3.7.22__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- siat/common.py +10 -5
- siat/translate.py +2 -0
- siat/yf_name.py +2 -2
- {siat-3.7.21.dist-info → siat-3.7.22.dist-info}/METADATA +1 -1
- {siat-3.7.21.dist-info → siat-3.7.22.dist-info}/RECORD +8 -8
- {siat-3.7.21.dist-info → siat-3.7.22.dist-info}/LICENSE +0 -0
- {siat-3.7.21.dist-info → siat-3.7.22.dist-info}/WHEEL +0 -0
- {siat-3.7.21.dist-info → siat-3.7.22.dist-info}/top_level.txt +0 -0
siat/common.py
CHANGED
@@ -4786,12 +4786,13 @@ def ttest(sample1,sample2):
|
|
4786
4786
|
|
4787
4787
|
|
4788
4788
|
|
4789
|
-
async def
|
4789
|
+
async def jupyter2pdf(notebook_path, output_pdf_path, size="A3"):
|
4790
4790
|
"""
|
4791
4791
|
将 Jupyter Notebook 转换为 PDF 文件
|
4792
4792
|
参数:
|
4793
|
-
notebook_path (str): Jupyter Notebook
|
4794
|
-
output_pdf_path (str): 输出的
|
4793
|
+
notebook_path (str): Jupyter Notebook文件(.ipynb文件,含路径)
|
4794
|
+
output_pdf_path (str): 输出的PDF文件(含路径)
|
4795
|
+
size:PDF页面大小,默认"A3"幅面,支持"A4"幅面
|
4795
4796
|
|
4796
4797
|
返回:
|
4797
4798
|
None
|
@@ -4800,6 +4801,10 @@ async def convert_jupyter_to_pdf(notebook_path, output_pdf_path, size="A4"):
|
|
4800
4801
|
await convert_notebook_to_pdf(notebook_path, output_pdf_path)
|
4801
4802
|
注意3:notebook_path和output_pdf_path中可以带路径
|
4802
4803
|
"""
|
4804
|
+
size=size.upper()
|
4805
|
+
if not size in ['A4','A3','letter']:
|
4806
|
+
size='A3'
|
4807
|
+
|
4803
4808
|
import os
|
4804
4809
|
from nbconvert import HTMLExporter
|
4805
4810
|
from playwright.async_api import async_playwright
|
@@ -4811,7 +4816,7 @@ async def convert_jupyter_to_pdf(notebook_path, output_pdf_path, size="A4"):
|
|
4811
4816
|
html_exporter = HTMLExporter()
|
4812
4817
|
try:
|
4813
4818
|
html_content, _ = html_exporter.from_filename(notebook_path)
|
4814
|
-
print("Start to convert ipynb file to pdf in {}, ...".format(size))
|
4819
|
+
print("Start to convert ipynb file to pdf in {} size, ...".format(size))
|
4815
4820
|
|
4816
4821
|
except:
|
4817
4822
|
print("File not found for {}".format(notebook_path))
|
@@ -4830,7 +4835,7 @@ async def convert_jupyter_to_pdf(notebook_path, output_pdf_path, size="A4"):
|
|
4830
4835
|
await page.pdf(path=output_pdf_path, format=size)
|
4831
4836
|
await browser.close()
|
4832
4837
|
|
4833
|
-
print(f"PDF
|
4838
|
+
print(f"PDF created as {output_pdf_path}")
|
4834
4839
|
|
4835
4840
|
except Exception as e:
|
4836
4841
|
print(f"Conversion failed: {e}")
|
siat/translate.py
CHANGED
@@ -1270,6 +1270,7 @@ def codetranslate0(code):
|
|
1270
1270
|
["HG=F",'COMEX铜矿石期货'],["CL=F",'NYM原油期货'],
|
1271
1271
|
["NG=F",'NYM天然气期货'],["MTF=F",'NYM煤炭期货'],
|
1272
1272
|
["GC=F",'COMEX黄金期货'],["MGC=F",'COMEX微型黄金期货'],
|
1273
|
+
["SGC=F",'上海黄金期货'],
|
1273
1274
|
["6B=F",'CME英镑兑美元期货'],
|
1274
1275
|
["S=F",'CBT大豆期货'],["C=F",'CBT玉米期货'],
|
1275
1276
|
["ES=F",'CME标普500指数期货'],["YM=F",'CBT道指期货'],
|
@@ -2050,6 +2051,7 @@ def codetranslate1(code):
|
|
2050
2051
|
|
2051
2052
|
["SPY",'SPDR SP500 ETF'],['SPYD','SPDR SP500 Div ETF'],
|
2052
2053
|
["SPYG",'SPDR SP500 Growth ETF'],['SPYV','SPDR SP500 Value ETF'],
|
2054
|
+
["GLD",'SPDR黄金ETF'],
|
2053
2055
|
["VOO",'Vanguard SP500 ETF'],['VOOG','Vanguard SP500 Growth ETF'],
|
2054
2056
|
["VOOV",'Vanguard SP500 Value ETF'],['IVV','iShares SP500 ETF'],
|
2055
2057
|
["DGT",'SPDR Global Dow ETF'],['ICF','iShares C&S REIT ETF'],
|
siat/yf_name.py
CHANGED
@@ -508,8 +508,8 @@ def filter_stock_name(original_name):
|
|
508
508
|
' PL S A',' PL SA',' AG', \
|
509
509
|
' SCIENCE & TECHNOLOGY',' HIGH-TECH',' HIGH TECHNOLOGY', \
|
510
510
|
|
511
|
-
' APR',
|
512
|
-
|
511
|
+
' APR',' MAY',' JUN',' JUL',' AUG',' SEP',' SEPT',' OCT',' NOV',' DEC',
|
512
|
+
' JAN',' FEB',' MAR',
|
513
513
|
|
514
514
|
]
|
515
515
|
|
@@ -19,7 +19,7 @@ siat/capm_beta.py,sha256=cxXdRVBQBllhbfz1LeTJAIWvyRYhW54nhtNUXv4HwS0,29063
|
|
19
19
|
siat/capm_beta2.py,sha256=-ZYYp1HK7SkfTR3vBKZ0QVC4Q_tbST2O4MGbX_V77J0,32031
|
20
20
|
siat/capm_beta_test.py,sha256=ImR0c5mc4hIl714XmHztdl7qg8v1E2lycKyiqnFj6qs,1745
|
21
21
|
siat/cmat_commons.py,sha256=Nj9Kf0alywaztVoMVeVVL_EZk5jRERJy8R8kBw88_Tg,38116
|
22
|
-
siat/common.py,sha256=
|
22
|
+
siat/common.py,sha256=u5Q24UXX6jstkemvo-owK5v3akNNHyrRuwXjjQwJsjk,175935
|
23
23
|
siat/compare_cross.py,sha256=3iP9TH2h3w27F2ARZc7FjKcErYCzWRc-TPiymOyoVtw,24171
|
24
24
|
siat/compare_cross_test.py,sha256=xra5XYmQGEtfIZL2h-GssdH2hLdFIhG3eoCrkDrL3gY,3473
|
25
25
|
siat/concepts_iwencai.py,sha256=m1YEDtECRT6FqtzlKm91pt2I9d3Z_XoP59BtWdRdu8I,3061
|
@@ -134,7 +134,7 @@ siat/transaction_test.py,sha256=Z8g1LJCN4-mnUByXMUMoFmN0t105cbmsz2QmvSuIkbU,1858
|
|
134
134
|
siat/translate-20230125.py,sha256=NPPSXhT38s5t9fzMvl_fvi4ckSB73ThLmZetVI-xGdU,117953
|
135
135
|
siat/translate-20230206.py,sha256=-vtI125WyaJhmPotOpDAmclt_XnYVaWU9ByLWZ6FyYE,118133
|
136
136
|
siat/translate-20230215.py,sha256=TJgtPE3n8IjljmZ4Pefy8dmHoNdFF-1zpML6BhA9FKE,121657
|
137
|
-
siat/translate.py,sha256=
|
137
|
+
siat/translate.py,sha256=YXHl0NBnfW9mIcir-B0HKusE-tUY39J_xZP8pObpCc0,251612
|
138
138
|
siat/translate_20240606.py,sha256=63IyHWEU3Uz9mjwyuAX3fqY4nUMdwh0ICQAgmgPXP7Y,215121
|
139
139
|
siat/translate_241003_keep.py,sha256=un7Fqe1v35MXsja5exZgjmLzrZtt66NARZIGlyFuGGU,218747
|
140
140
|
siat/universal_test.py,sha256=CDAOffW1Rvs-TcNN5giWVvHMlch1w4dp-w5SIV9jXL0,3936
|
@@ -142,9 +142,9 @@ siat/valuation.py,sha256=tSW5jyda3lChqBkdsbBGfdUeh9bCfjo6P93CjLif9eM,50825
|
|
142
142
|
siat/valuation_china.py,sha256=CVp1IwIsF3Om0J29RGkyxZLt4n9Ug-ua_RKhLwL9fUQ,69624
|
143
143
|
siat/valuation_market_china_test.py,sha256=gbJ0ioauuo4koTPH6WKUkqcXiQPafnbhU5eKJ6lpdLA,1571
|
144
144
|
siat/var_model_validation.py,sha256=R0caWnuZarrRg9939hxh3vJIIpIyPfvelYmzFNZtPbo,14910
|
145
|
-
siat/yf_name.py,sha256=
|
146
|
-
siat-3.7.
|
147
|
-
siat-3.7.
|
148
|
-
siat-3.7.
|
149
|
-
siat-3.7.
|
150
|
-
siat-3.7.
|
145
|
+
siat/yf_name.py,sha256=yHUKjnflqI0RKVKOKlxR3o_ecQrSC8U5waLrOCgFN7I,21250
|
146
|
+
siat-3.7.22.dist-info/LICENSE,sha256=NTEMMROY9_4U1szoKC3N2BLHcDd_o5uTgqdVH8tbApw,1071
|
147
|
+
siat-3.7.22.dist-info/METADATA,sha256=aRDquaNWM6rLqZ_Nsj26vRnCoNf6qmtfn84Qppb4VaY,8117
|
148
|
+
siat-3.7.22.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
149
|
+
siat-3.7.22.dist-info/top_level.txt,sha256=r1cVyL7AIKqeAmEJjNR8FMT20OmEzufDstC2gv3NvEY,5
|
150
|
+
siat-3.7.22.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|