Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
Zanger67 committed Jul 26, 2024
1 parent 4a30bf2 commit e9d351b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
11 changes: 9 additions & 2 deletions main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -659,14 +659,18 @@
"metadata": {},
"outputs": [],
"source": [
"def getDailies(firstDate: datetime = _oldest_date) -> List[Tuple[datetime, int]] :\n",
"def getDailies(firstDate: datetime = None) -> List[Tuple[datetime, int]] :\n",
" '''\n",
" Retrieves the daily questions from the official LeetCode json data\n",
" and returns them as a set of strings\n",
"\n",
" ### Returns :\n",
" dailies : List[Tuple[date, questionNo]]\n",
" '''\n",
" if not firstDate :\n",
" global _oldest_date\n",
" firstDate = _oldest_date\n",
" \n",
" print('Oldest date found:', firstDate)\n",
" \n",
" with open(DAILIES_DATA_PATH, 'rb') as fp:\n",
Expand All @@ -692,14 +696,17 @@
"metadata": {},
"outputs": [],
"source": [
"def getWeeklies(firstDate: datetime = _oldest_date) -> List[Tuple[datetime, int]] :\n",
"def getWeeklies(firstDate: datetime = None) -> List[Tuple[datetime, int]] :\n",
" '''\n",
" Retrieves the weekly premium questions from the official LeetCode json data\n",
" and returns them as a set of strings\n",
"\n",
" ### Returns :\n",
" weeklies : List[Tuple[date, questionNo]]\n",
" '''\n",
" if not firstDate :\n",
" global _oldest_date\n",
" firstDate = _oldest_date\n",
" \n",
" print('Oldest date found:', firstDate)\n",
" \n",
Expand Down
11 changes: 9 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,14 +549,18 @@ def getRecentFileTimes() -> dict :
# In[ ]:


def getDailies(firstDate: datetime = _oldest_date) -> List[Tuple[datetime, int]] :
def getDailies(firstDate: datetime = None) -> List[Tuple[datetime, int]] :
'''
Retrieves the daily questions from the official LeetCode json data
and returns them as a set of strings
### Returns :
dailies : List[Tuple[date, questionNo]]
'''
if not firstDate :
global _oldest_date
firstDate = _oldest_date

print('Oldest date found:', firstDate)

with open(DAILIES_DATA_PATH, 'rb') as fp:
Expand All @@ -579,14 +583,17 @@ def getDailies(firstDate: datetime = _oldest_date) -> List[Tuple[datetime, int]]
# In[ ]:


def getWeeklies(firstDate: datetime = _oldest_date) -> List[Tuple[datetime, int]] :
def getWeeklies(firstDate: datetime = None) -> List[Tuple[datetime, int]] :
'''
Retrieves the weekly premium questions from the official LeetCode json data
and returns them as a set of strings
### Returns :
weeklies : List[Tuple[date, questionNo]]
'''
if not firstDate :
global _oldest_date
firstDate = _oldest_date

print('Oldest date found:', firstDate)

Expand Down

0 comments on commit e9d351b

Please sign in to comment.