{ "cells": [ { "cell_type": "markdown", "id": "245a954a", "metadata": {}, "source": [ "# Arxiv API\n", "\n", "This notebook goes over how to use the `arxiv` component. \n", "\n", "First, you need to install `arxiv` python package." ] }, { "cell_type": "code", "execution_count": null, "id": "d5a7209e", "metadata": { "tags": [], "vscode": { "languageId": "shellscript" } }, "outputs": [], "source": [ "!pip install arxiv" ] }, { "cell_type": "code", "execution_count": 2, "id": "8d32b39a", "metadata": { "tags": [] }, "outputs": [], "source": [ "from langchain.utilities import ArxivAPIWrapper" ] }, { "cell_type": "code", "execution_count": 3, "id": "2a50dd27", "metadata": { "tags": [] }, "outputs": [], "source": [ "arxiv = ArxivAPIWrapper()" ] }, { "cell_type": "code", "execution_count": 4, "id": "34bb5968", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "'Published: 2016-05-26\\nTitle: Heat-bath random walks with Markov bases\\nAuthors: Caprice Stanley, Tobias Windisch\\nSummary: Graphs on lattice points are studied whose edges come from a finite set of\\nallowed moves of arbitrary length. We show that the diameter of these graphs on\\nfibers of a fixed integer matrix can be bounded from above by a constant. We\\nthen study the mixing behaviour of heat-bath random walks on these graphs. We\\nalso state explicit conditions on the set of moves so that the heat-bath random\\nwalk, a generalization of the Glauber dynamics, is an expander in fixed\\ndimension.'" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "docs = arxiv.run(\"1605.08386\")\n", "docs" ] }, { "cell_type": "code", "execution_count": 5, "id": "b0867fda-e119-4b19-9ec6-e354fa821db3", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "'Published: 2017-10-10\\nTitle: On Mixing Behavior of a Family of Random Walks Determined by a Linear Recurrence\\nAuthors: Caprice Stanley, Seth Sullivant\\nSummary: We study random walks on the integers mod $G_n$ that are determined by an\\ninteger sequence $\\\\{ G_n \\\\}_{n \\\\geq 1}$ generated by a linear recurrence\\nrelation. Fourier analysis provides explicit formulas to compute the\\neigenvalues of the transition matrices and we use this to bound the mixing time\\nof the random walks.\\n\\nPublished: 2016-05-26\\nTitle: Heat-bath random walks with Markov bases\\nAuthors: Caprice Stanley, Tobias Windisch\\nSummary: Graphs on lattice points are studied whose edges come from a finite set of\\nallowed moves of arbitrary length. We show that the diameter of these graphs on\\nfibers of a fixed integer matrix can be bounded from above by a constant. We\\nthen study the mixing behaviour of heat-bath random walks on these graphs. We\\nalso state explicit conditions on the set of moves so that the heat-bath random\\nwalk, a generalization of the Glauber dynamics, is an expander in fixed\\ndimension.\\n\\nPublished: 2003-03-18\\nTitle: Calculation of fluxes of charged particles and neutrinos from atmospheric showers\\nAuthors: V. Plyaskin\\nSummary: The results on the fluxes of charged particles and neutrinos from a\\n3-dimensional (3D) simulation of atmospheric showers are presented. An\\nagreement of calculated fluxes with data on charged particles from the AMS and\\nCAPRICE detectors is demonstrated. Predictions on neutrino fluxes at different\\nexperimental sites are compared with results from other calculations.'" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "docs = arxiv.run(\"Caprice Stanley\")\n", "docs" ] }, { "cell_type": "code", "execution_count": 6, "id": "3580aeeb-086f-45ba-bcdc-b46f5134b3dd", "metadata": { "tags": [] }, "outputs": [ { "data": { "text/plain": [ "'No good Arxiv Result was found'" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "docs = arxiv.run(\"1605.08386WWW\")\n", "docs" ] }, { "cell_type": "code", "execution_count": null, "id": "4f4e9602", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.9.1" } }, "nbformat": 4, "nbformat_minor": 5 }