nasyxx/auto_paper
#+options: ':nil *:t -:t ::t <:t H:3 \n:nil ^:{} arch:headline
#+options: author:t broken-links:mark c:nil creator:nil
#+options: d:(not "LOGBOOK") date:t e:t email:nil f:t inline:t num:t
#+options: p:nil pri:nil prop:nil stat:t tags:t tasks:t tex:t
#+options: timestamp:t title:t toc:t todo:t |:t
#+title: Auto Paper
#+date: <2023-04-03 Mon>
#+author: Nasy
#+email: nasyxx@gmail.com
#+language: en
#+select_tags: export
#+exclude_tags: noexport
#+creator: Emacs 30.0.50 (Org mode 9.7-pre)
#+cite_export:
[[https://doi.org/10.5281/zenodo.7796951][file:https://zenodo.org/badge/DOI/10.5281/zenodo.7796951.svg]]
- Introduction
Download and save daily papers.
- Install
#+begin_src sh
python -m pip install auto-paper -U
#+end_src
- Usage
#+begin_src sh
python -m auto_paper --help
usage: auto_paper.py [-h] [--conf.src {arxiv,biorxiv,medrxiv}] [--conf.max-paper INT] [--conf.paper-db PATH] [--conf.pdf-dir PATH]
[--conf.query STR] [--conf.filters {all,new,today}] [--conf.sortby {Relevance,LastUpdatedDate,SubmittedDate}]
[--conf.filterby {updated,published}] [--conf.no-save-pdf] [--conf.no-show] [--url {None}|STR]
Run main function.
╭─ arguments ─────────────────────────────────────────────╮
│ -h, --help show this help message and exit │
│ --url {None}|STR (default: None) │
╰─────────────────────────────────────────────────────────╯
╭─ conf arguments ────────────────────────────────────────╮
│ Configuration. │
│ ─────────────────────────────────────────────────────── │
│ --conf.src {arxiv,biorxiv,medrxiv} │
│ (default: arxiv) │
│ --conf.max-paper INT (default: 100) │
│ --conf.paper-db PATH (default: papers.db) │
│ --conf.pdf-dir PATH (default: pdfs) │
│ --conf.query STR (default: cat:cs.AI) │
│ --conf.filters {all,new,today} │
│ (default: new) │
│ --conf.sortby {Relevance,LastUpdatedDate,SubmittedDate} │
│ (default: LastUpdatedDate) │
│ --conf.filterby {updated,published} │
│ (default: updated) │
│ --conf.no-save-pdf (sets: save_pdf=False) │
│ --conf.no-show (sets: show=False) │
╰─────────────────────────────────────────────────────────╯
#+end_src
** Examples
*** Download the most recent 5 cat:cs.AI papers in arxiv.
#+begin_src sh
python -m auto_paper --conf.max-paper 5
#+end_src
#+begin_src sh
Fetching http://arxiv.org/pdf/2304.01196v1
Fetching http://arxiv.org/pdf/2202.01752v3
Fetching http://arxiv.org/pdf/2304.01179v1
Fetching http://arxiv.org/pdf/2304.01195v1
Fetching http://arxiv.org/pdf/2304.01201v1
#+end_src
#+begin_src sh
ls pdfs
2202.01752v3.pdf 2304.01179v1.pdf 2304.01195v1.pdf 2304.01196v1.pdf 2304.01201v1.pdf
#+end_src
*** Download the most recent 5 math Algebraic Geometry category papers in arxiv.
#+begin_src sh
python -m auto_paper --conf.max-paper 5 --conf.query cat:math.AG
#+end_src
#+begin_src sh
Fetching http://arxiv.org/pdf/2111.11216v3
Fetching http://arxiv.org/pdf/2304.01135v1
Fetching http://arxiv.org/pdf/2304.01149v1
Fetching http://arxiv.org/pdf/2101.12186v3
Fetching http://arxiv.org/pdf/2303.15776v2
#+end_src
#+begin_src sh
ls
2101.12186v3.pdf 2202.01752v3.pdf 2304.01135v1.pdf 2304.01179v1.pdf 2304.01196v1.pdf
2111.11216v3.pdf 2303.15776v2.pdf 2304.01149v1.pdf 2304.01195v1.pdf 2304.01201v1.pdf
#+end_src
*** Download the most recent 2 papers in biorxiv.
#+begin_src sh
python -m auto_paper --conf.max-paper 2 --conf.src biorxiv
#+end_src
#+begin_src sh
Fetching https://www.biorxiv.org/content/10.1101/2021.01.11.426044.full.pdf
Fetching https://www.biorxiv.org/content/10.1101/2020.12.16.423137.full.pdf
#+end_src
#+begin_src sh
ls
10.1101.2020.12.16.423137.full.pdf 2111.11216v3.pdf 2304.01135v1.pdf 2304.01195v1.pdf
10.1101.2021.01.11.426044.full.pdf 2202.01752v3.pdf 2304.01149v1.pdf 2304.01196v1.pdf
2101.12186v3.pdf 2303.15776v2.pdf 2304.01179v1.pdf 2304.01201v1.pdf
#+end_src
*** Read DB.
#+begin_src python
import shelev
with shelve.open("papers.db") as db:
keys = list(db.keys())
print(keys)
['http://arxiv.org/abs/2202.01752v3',
'http://arxiv.org/abs/2304.01195v1',
'http://arxiv.org/abs/2304.01201v1',
'https://www.biorxiv.org/content/10.1101/2020.12.16.423137',
'http://arxiv.org/abs/2304.01196v1',
'https://www.biorxiv.org/content/10.1101/2021.01.11.426044',
'http://arxiv.org/abs/2111.11216v3',
'http://arxiv.org/abs/2304.01179v1',
'http://arxiv.org/abs/2303.15776v2',
'http://arxiv.org/abs/2304.01135v1',
'http://arxiv.org/abs/2304.01149v1',
'http://arxiv.org/abs/2101.12186v3']
print(db["http://arxiv.org/abs/2202.01752v3"])
{
'pid': 'http://arxiv.org/abs/2202.01752v3',
'title': 'Near-Optimal Learning of Extensive-Form Games with Imperfect Information',
'abstract': 'This paper resolves the open question of designing near-optimal algorithms\nfor learning imperfect-information extensive-form games
from bandit feedback.\nWe present the first line of algorithms that require only\n$\widetilde{\mathcal{O}}((XA+YB)/\varepsilon^2)$ episodes of
play to find an\n$\varepsilon$-approximate Nash equilibrium in two-player zero-sum games, where\n$X,Y$ are the number of information sets and $A,B$
are the number of actions\nfor the two players. This improves upon the best known sample complexity
of\n$\widetilde{\mathcal{O}}((X^2A+Y^2B)/\varepsilon^2)$ by a factor of\n$\widetilde{\mathcal{O}}(\max\{X, Y\})$, and matches the
information-theoretic\nlower bound up to logarithmic factors. We achieve this sample complexity by two\nnew algorithms: Balanced Online Mirror
Descent, and Balanced Counterfactual\nRegret Minimization. Both algorithms rely on novel approaches of integrating\n\emph{balanced exploration
policies} into their classical counterparts. We also\nextend our results to learning Coarse Correlated Equilibria in multi-player\ngeneral-sum
games.',
'published': '2022-02-03',
'updated': '2023-04-03',
'categorie': ('cs.LG', 'cs.AI', 'cs.GT', 'stat.ML')
}
#+end_src
- Next
You could use [[https://github.com/kaixindelele/ChatPaper][ChatPaper]] to summay all the papers you have downloaded.
#+begin_src sh
python chat_paper.py --pdf_path pdfs
#+end_src
- Ref
If you use this package, please cite it as:
#+begin_src bibtex
@software{na_saiyang_2023_7796951,
author = {Na, Saiyang},
title = {Auto Paper: Download and save daily papers},
month = apr,
year = 2023,
publisher = {Zenodo},
version = {v0.1.0},
doi = {10.5281/zenodo.7796951},
url = {https://doi.org/10.5281/zenodo.7796951}
}
#+end_src