https://chatgpt.com/share/68e981d4-04dc-800f-ad17-a19096f3c038
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
| @app.post("/campaigns/import_csv") | |
| async def import_csv( | |
| file: UploadFile = File(..., description="CSV with headers; includes parameters + objectives"), | |
| meta_json: Optional[str] = Form(None, description='Tiny JSON, e.g. {"objectives":[{"name":"y","direction":"max"}],"batch_size":3}') | |
| ): | |
| # 1) Load CSV | |
| try: | |
| text = (await file.read()).decode("utf-8") | |
| df = pd.read_csv(StringIO(text)) |
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
| # app/main.py | |
| from io import StringIO, BytesIO | |
| from typing import Dict, List, Tuple, Optional | |
| from uuid import uuid4 | |
| import hashlib | |
| import pandas as pd | |
| from fastapi import FastAPI, UploadFile, File, Form, HTTPException | |
| from fastapi.responses import StreamingResponse, JSONResponse | |
| # ---- BayBE (verified API) |
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
| # Avoid reading formulas/macros; target a single sheet | |
| df = pd.read_excel("source.xlsx", sheet_name="data", engine="openpyxl") | |
| df.to_csv("export.csv", index=False) | |
| import pandas as pd | |
| import pyarrow as pa | |
| import pyarrow.parquet as pq | |
| # Read CSV with explicit dtypes when possible | |
| df = pd.read_csv( |
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 numpy as np | |
| from darts import TimeSeries | |
| from darts.models import NBEATSModel | |
| from darts.metrics import mape | |
| from darts.dataprocessing.transformers import Scaler | |
| # %% | |
| import numpy as np |
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 numpy as np | |
| import matplotlib.pyplot as plt | |
| from statsmodels.regression.linear_model import OLS | |
| from statsmodels.tools.tools import add_constant | |
| def plot_partial_cross_correlation(x, y, max_lag=20, title=None): | |
| """ | |
| Plot partial cross-correlation (PCC) between time series x and y. | |
| Parameters: |
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
| # %% [markdown] | |
| # A 4×4 grid of scatter plots | |
| # Each showing the relationship between lagged ts1 (predictor) and ts2 (target) | |
| # %% | |
| import pandas as pd | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import seaborn as sns | |
| from darts import TimeSeries |
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
| https://github.com/run-llama/sec-insights/issues/9 | |
| https://www.secinsights.ai/conversation/fa6614b9-ccac-4b01-a94b-779a404e6141 |
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
| Sure, here's the questionnaire in English: | |
| Do you encounter situations in your daily work that require handling a large amount of data? | |
| a. Yes, I frequently deal with large volumes of data. | |
| b. Sometimes, I handle some data. | |
| c. Rarely, I am not heavily involved in data processing. | |
| d. No, I don't work with data. | |
| How familiar are you with AI (Artificial Intelligence) and data science? | |
| a. Completely unfamiliar, I would like to start from the basics. |
NewerOlder