Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to import a popular library for accessing research papers.
Computer Vision
import [1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Importing general ML libraries like tensorflow instead of a research paper library.
Using visualization libraries which don't help access papers.
✗ Incorrect
The 'arxiv' library helps access research papers programmatically, which is useful to stay current with research.
2fill in blank
mediumComplete the code to search for recent papers on 'computer vision' using the arxiv API.
Computer Vision
search = arxiv.Search(query='computer vision', max_results=[1])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 0 which returns no results.
Using 500 which may be too large and slow.
✗ Incorrect
Setting max_results to 50 retrieves a reasonable number of recent papers to review.
3fill in blank
hardFix the error in the code to print the titles of the papers found.
Computer Vision
for result in search.[1](): print(result.title)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'get_results' instead of 'results'.
Using options with extra parentheses like 'results()' or 'get_results()'.
✗ Incorrect
The arxiv Search object uses the method results() to return an iterable of results.
4fill in blank
hardFill both blanks to filter papers published after 2022 and sort them by relevance.
Computer Vision
search = arxiv.Search(query='computer vision', max_results=100, sort_by=[1], sort_order=[2], date_from='2023-01-01')
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Sorting by date instead of relevance.
Using ascending order which shows least relevant first.
✗ Incorrect
Sorting by relevance descending shows the most relevant recent papers first.
5fill in blank
hardFill all three blanks to create a dictionary of paper titles and their authors for papers with more than 2 authors.
Computer Vision
papers = {result.[1]: result.[2] for result in search.results() if len(result.[3]) > 2} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'summary' instead of 'authors' for filtering.
Mixing up keys and values in the dictionary comprehension.
✗ Incorrect
We use 'title' as key, 'authors' as value, and check length of 'authors' list to filter papers.