Skip to content

Commit

Permalink
update dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
MuslemRahimi committed Dec 9, 2024
1 parent b361315 commit 02f836f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/cron_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ async def get_analyst_report():
with sqlite3.connect('stocks.db') as con:
cursor = con.cursor()
cursor.execute("PRAGMA journal_mode = wal")
cursor.execute("SELECT DISTINCT symbol FROM stocks WHERE symbol NOT LIKE '%.%' AND symbol NOT LIKE '%-%' AND marketCap > 50E9")
cursor.execute("SELECT DISTINCT symbol FROM stocks WHERE symbol NOT LIKE '%.%' AND symbol NOT LIKE '%-%' AND marketCap > 10E9")
symbols = {row[0] for row in cursor.fetchall()} # Use a set for fast lookups

# Define the directory path
Expand Down
1 change: 1 addition & 0 deletions app/restart_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ def process_financial_data(file_path, key_list):
value = float(res[key])
if 'growth' in file_path or key in ['grossProfitMargin','netProfitMargin','pretaxProfitMargin','operatingProfitMargin','longTermDebtToCapitalization','totalDebtToCapitalization']:
value *= 100 # Multiply by 100 for percentage

data[key] = round(value, 2) if value is not None else None
except (ValueError, TypeError):
# If there's an issue converting the value, leave it as None
Expand Down

0 comments on commit 02f836f

Please sign in to comment.