Skip to content

Commit

Permalink
clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
MuslemRahimi committed Jun 9, 2024
1 parent 457db2a commit 5ec1a4a
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 17 deletions.
4 changes: 1 addition & 3 deletions app/create_crypto_db.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import aiohttp
import asyncio
import sqlite3
import certifi
import json
import ujson
import pandas as pd
Expand All @@ -10,8 +9,7 @@
import re
import pandas as pd
from datetime import datetime
import subprocess
import time

import warnings
import requests

Expand Down
4 changes: 1 addition & 3 deletions app/create_etf_db.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import aiohttp
import asyncio
import sqlite3
import certifi
import json
import ujson
import pandas as pd
Expand All @@ -10,8 +9,7 @@
import re
import pandas as pd
from datetime import datetime
import subprocess
import time

import warnings

from dotenv import load_dotenv
Expand Down
3 changes: 1 addition & 2 deletions app/cron_analyst_db.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from benzinga import financial_data
import requests
from datetime import datetime, timedelta, date
from collections import defaultdict
from datetime import datetime
import numpy as np
from scipy.stats import norm
import time
Expand Down
1 change: 0 additions & 1 deletion app/cron_bull_bear_say.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import aiohttp
import aiofiles
import ujson
import sqlite3
import asyncio
Expand Down
1 change: 0 additions & 1 deletion app/cron_insider_trading.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import aiohttp
import sqlite3
from datetime import datetime
import pytz
from aiofiles import open as async_open

from dotenv import load_dotenv
Expand Down
2 changes: 0 additions & 2 deletions app/cron_market_movers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import ujson
import sqlite3
import pandas as pd
import numpy as np
from collections import defaultdict
import asyncio
import aiohttp
import pytz
Expand Down
6 changes: 2 additions & 4 deletions app/cron_shareholders.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import aiohttp
import ujson
import sqlite3
import asyncio
import pandas as pd
from tqdm import tqdm
from collections import defaultdict


query_template = """
Expand All @@ -21,7 +19,7 @@ async def save_as_json(symbol, data):
ujson.dump(data, file)


async def get_data(ticker, stock_symbols, etf_symbols, con, etf_con):
async def get_data(ticker, etf_symbols, con, etf_con):
if ticker in etf_symbols:
table_name = 'etfs'
else:
Expand Down Expand Up @@ -71,7 +69,7 @@ async def run():
total_symbols = stock_symbols + etf_symbols

for ticker in tqdm(total_symbols):
shareholders_list = await get_data(ticker, stock_symbols, etf_symbols, con, etf_con)
shareholders_list = await get_data(ticker, etf_symbols, con, etf_con)
if len(shareholders_list) > 0:
await save_as_json(ticker, shareholders_list)

Expand Down
1 change: 0 additions & 1 deletion app/cron_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import numpy as np
import ujson
import asyncio
import aiohttp
import sqlite3
from tqdm import tqdm

Expand Down

0 comments on commit 5ec1a4a

Please sign in to comment.