Skip to content

Commit

Permalink
adsf
Browse files Browse the repository at this point in the history
  • Loading branch information
Zanger67 committed Jul 26, 2024
1 parent b51dcf0 commit c50c01f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 44 deletions.
44 changes: 22 additions & 22 deletions main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -285,35 +285,35 @@
" \n",
" oldest_date = datetime.now()\n",
"\n",
" if getenv(\"GITHUB_ACTIONS\") == 'true' :\n",
" print('\\n')\n",
" print('/' + '=' * 15 + '\\\\')\n",
" print(' ', end='')\n",
" pqBarsPrinted = 0\n",
" # if getenv(\"GITHUB_ACTIONS\") == 'true' :\n",
" # print('\\n')\n",
" # print('/' + '=' * 15 + '\\\\')\n",
" # print(' ', end='')\n",
" # pqBarsPrinted = 0\n",
" # for i, path in enumerate(paths) :\n",
" # path = join(LEETCODE_PATH_FROM_README, path)\n",
" # output[path] = individualCTimeViaGit(cmd + [path])\n",
" \n",
" # if output[path][0] < oldest_date :\n",
" # oldest_date = output[path][0]\n",
" \n",
" # curChunk = int((i / len(paths)) * 15)\n",
" # if curChunk > pqBarsPrinted :\n",
" # print('=' * (curChunk - pqBarsPrinted), end='')\n",
" # pqBarsPrinted = curChunk\n",
" \n",
" # print((15 - pqBarsPrinted) * '=', '\\n\\n')\n",
" # else :\n",
" with tqdm(total=len(paths)) as pbar :\n",
" # with tqdm(total=len(paths), position=0, leave=True) as pbar :\n",
" for i, path in enumerate(paths) :\n",
" path = join(LEETCODE_PATH_FROM_README, path)\n",
" output[path] = individualCTimeViaGit(cmd + [path])\n",
" \n",
" if output[path][0] < oldest_date :\n",
" oldest_date = output[path][0]\n",
" \n",
" curChunk = int((i / len(paths)) * 15)\n",
" if curChunk > pqBarsPrinted :\n",
" print('=' * (curChunk - pqBarsPrinted), end='')\n",
" pqBarsPrinted = curChunk\n",
" \n",
" print((15 - pqBarsPrinted) * '=', '\\n\\n')\n",
" else :\n",
" with tqdm(total=len(paths)) as pbar :\n",
" # with tqdm(total=len(paths), position=0, leave=True) as pbar :\n",
" for i, path in enumerate(paths) :\n",
" path = join(LEETCODE_PATH_FROM_README, path)\n",
" output[path] = individualCTimeViaGit(cmd + [path])\n",
" \n",
" if output[path][0] < oldest_date :\n",
" oldest_date = output[path][0]\n",
" \n",
" pbar.update(1)\n",
" pbar.update(1)\n",
"\n",
" global _oldest_date\n",
" _oldest_date = oldest_date.replace(hour=0, minute=0, second=0, microsecond=0)\n",
Expand Down
44 changes: 22 additions & 22 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,35 +217,35 @@ def getAllCTimesViaGit(paths: List[str]) -> Dict[str, Tuple[datetime, datetime]]

oldest_date = datetime.now()

if getenv("GITHUB_ACTIONS") == 'true' :
print('\n')
print('/' + '=' * 15 + '\\')
print(' ', end='')
pqBarsPrinted = 0
# if getenv("GITHUB_ACTIONS") == 'true' :
# print('\n')
# print('/' + '=' * 15 + '\\')
# print(' ', end='')
# pqBarsPrinted = 0
# for i, path in enumerate(paths) :
# path = join(LEETCODE_PATH_FROM_README, path)
# output[path] = individualCTimeViaGit(cmd + [path])

# if output[path][0] < oldest_date :
# oldest_date = output[path][0]

# curChunk = int((i / len(paths)) * 15)
# if curChunk > pqBarsPrinted :
# print('=' * (curChunk - pqBarsPrinted), end='')
# pqBarsPrinted = curChunk

# print((15 - pqBarsPrinted) * '=', '\n\n')
# else :
with tqdm(total=len(paths)) as pbar :
# with tqdm(total=len(paths), position=0, leave=True) as pbar :
for i, path in enumerate(paths) :
path = join(LEETCODE_PATH_FROM_README, path)
output[path] = individualCTimeViaGit(cmd + [path])

if output[path][0] < oldest_date :
oldest_date = output[path][0]

curChunk = int((i / len(paths)) * 15)
if curChunk > pqBarsPrinted :
print('=' * (curChunk - pqBarsPrinted), end='')
pqBarsPrinted = curChunk

print((15 - pqBarsPrinted) * '=', '\n\n')
else :
with tqdm(total=len(paths)) as pbar :
# with tqdm(total=len(paths), position=0, leave=True) as pbar :
for i, path in enumerate(paths) :
path = join(LEETCODE_PATH_FROM_README, path)
output[path] = individualCTimeViaGit(cmd + [path])

if output[path][0] < oldest_date :
oldest_date = output[path][0]

pbar.update(1)
pbar.update(1)

global _oldest_date
_oldest_date = oldest_date.replace(hour=0, minute=0, second=0, microsecond=0)
Expand Down

0 comments on commit c50c01f

Please sign in to comment.