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 pandas_datareader.data as web | |
| from datetime import datetime | |
| import pandas as pd | |
| start = datetime(2015, 6, 1) | |
| end = datetime(2025, 5, 1) | |
| # Retrieve monthly data from FRED | |
| gold = web.DataReader("IR14270", "fred", start, end) | |
| oil = web.DataReader("DCOILWTICO", "fred", start, end) |
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 pandas_datareader.data as web | |
| from datetime import datetime | |
| import pandas as pd | |
| start = datetime(2015, 6, 1) | |
| end = datetime(2025, 5, 1) | |
| # 月次データをFREDから取得 | |
| gold = web.DataReader("IR14270", "fred", start, end) | |
| zinc = web.DataReader("PZINCUSDM", "fred", start, end) |
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 pandas as pd | |
| import yfinance as yf | |
| from datetime import datetime, timedelta | |
| import matplotlib.pyplot as plt | |
| # Date range | |
| end_date = datetime.today() | |
| start_date = end_date - timedelta(days=30 * 6) | |
| # Download data |
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
| #game-board { | |
| display: grid; | |
| grid-template-rows: repeat(13, 1fr); | |
| grid-template-columns: repeat(7, 1fr); | |
| gap: 1px; | |
| width: 200px; | |
| height: 400px; | |
| border: 1px solid black; | |
| } | |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Prime Number Tetris</title> | |
| <link rel="stylesheet" href="styles.css"> | |
| </head> | |
| <body> | |
| <div id="game-board"></div> |
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
| # データの取得ライブラリ | |
| from yahoo_fin import stock_info as si | |
| import pandas as pd | |
| # 日付の取得ライブラリ | |
| from datetime import datetime | |
| # 相関関係の高い数式を見つけるライブラリ | |
| from scipy.optimize import minimize | |
| from scipy.stats import pearsonr | |
| # モデルの訓練ライブラリ | |
| from sklearn.model_selection import train_test_split |
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
| # データの取得ライブラリ | |
| from yahoo_fin import stock_info as si | |
| import pandas as pd | |
| # 日付の取得ライブラリ | |
| from datetime import datetime | |
| # 相関関係の高い数式を見つけるライブラリ | |
| from scipy.optimize import minimize | |
| from scipy.stats import pearsonr | |
| # モデルの訓練ライブラリ | |
| from sklearn.model_selection import train_test_split |
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 yfinance as yf | |
| import pandas as pd | |
| class Data: | |
| def __init__(self, symbol, start_date, end_date): | |
| self.symbol = symbol | |
| self.start_date = start_date | |
| self.end_date = end_date | |
| def get_data(self): |
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 yfinance as yf | |
| import pandas as pd | |
| from scipy.optimize import minimize | |
| from scipy.stats import pearsonr | |
| class Data: | |
| def __init__(self, symbol, start_date, end_date): | |
| self.symbol = symbol | |
| self.start_date = start_date | |
| self.end_date = end_date |
NewerOlder