Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
## 2025-02-28 - Structured CLI Reports
**Learning:** Dense numerical data in CLI output is hard to parse. Using ASCII box-drawing characters and alignment to create a "dashboard" or "invoice" style summary significantly improves readability and perceived quality.
**Action:** When summarizing simulation or batch job results, always format the final report as a structured table or box rather than a list of print statements.

## 2025-03-16 - Interactive CLI Progress Indicators
**Learning:** For long-running CLI processes that suppress verbose logging (e.g., `--quiet` mode), users can become anxious and terminate the script prematurely if there is no visual feedback.
**Action:** Implement a dynamic progress bar using `\r` and `flush=True` (conditional on `sys.stdout.isatty()`) to provide system status visibility without polluting standard output logs or breaking non-interactive environments.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM gcc:latest
WORKDIR /usr/src/app

# Copy your C++ file into the container
COPY NumberGuess.cpp .
COPY NumberGuess/NumberGuess.cpp .

# Compile the code
RUN g++ -o NumberGuess NumberGuess.cpp
Expand Down
12 changes: 11 additions & 1 deletion bitcoin_trading_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,17 @@ def simulate_trading(signals, initial_cash=10000, quiet=False):

if not quiet:
print(f"\n{Colors.HEADER}{Colors.BOLD}------ Daily Trading Ledger ------{Colors.ENDC}")
for i, row in signals.iterrows():

total_days = len(signals)
show_progress = quiet and sys.stdout.isatty()
for idx, (i, row) in enumerate(signals.iterrows()):
if show_progress:
progress = int(50 * (idx + 1) / total_days)
bar = 'β–ˆ' * progress + '-' * (50 - progress)
print(f"\r{Colors.CYAN}Simulating: [{bar}] {idx + 1}/{total_days} days{Colors.ENDC}", end="", flush=True)
if idx + 1 == total_days:
print()

if i > 0:
portfolio.loc[i, 'cash'] = portfolio.loc[i-1, 'cash']
portfolio.loc[i, 'btc'] = portfolio.loc[i-1, 'btc']
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform {}
Loading