├── .gitignore ├── README.md ├── parse_paper.py └── demo.ipynb /.gitignore: -------------------------------------------------------------------------------- 1 | papers 2 | .ipynb_checkpoints/ 3 | __pycache__/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # talktopapers 2 | 3 | Parsing papers is the first step. It can be done in two ways. 4 | 5 | 1. Via commandline 6 | ``` 7 | # Example 8 | python parse_paper.py --pdf-url http://export.arxiv.org/pdf/1706.03762.pdf 9 | 10 | 11 | # Usage 12 | usage: parse_paper.py [-h] [--arxiv-id ARXIV_ID] [--pdf-url PDF_URL] 13 | 14 | optional arguments: 15 | -h, --help show this help message and exit 16 | --arxiv-id ARXIV_ID Use the arxiv id of the paper 17 | --pdf-url PDF_URL URL to the pdf of the paper 18 | ``` 19 | 2. Interactive, in the jupyter notebook. 20 | 21 | -------------------------------------------------------------------------------- /parse_paper.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | from pypdf import PdfReader 3 | from pathlib import Path 4 | import requests 5 | 6 | PAPER_LOC = "./papers" 7 | ARXIV_DOWNLOAD_URL = "http://export.arxiv.org/pdf" 8 | 9 | 10 | def download_paper(url): 11 | print("Downloading paper") 12 | filename = url.split("/")[-1] 13 | filepath = Path(f"{PAPER_LOC}/{filename}") 14 | if not filepath.is_file(): 15 | response = requests.get(url) 16 | filepath.write_bytes(response.content) 17 | print("Downloaded!") 18 | else: 19 | print("Paper already exists!") 20 | print("\n") 21 | return str(filepath) 22 | 23 | 24 | def parse_paper(path): 25 | print("Parsing paper") 26 | reader = PdfReader(path) 27 | number_of_pages = len(reader.pages) 28 | print(f"Total number of pages: {number_of_pages}") 29 | paper_text = [] 30 | for i in range(number_of_pages): 31 | page = reader.pages[i] 32 | page_text = [] 33 | 34 | def visitor_body(text, cm, tm, fontDict, fontSize): 35 | x = tm[4] 36 | y = tm[5] 37 | # ignore header/footer 38 | if (y > 50 and y < 720) and (len(text.strip()) > 1): 39 | page_text.append({ 40 | 'fontsize': fontSize, 41 | 'text': text.strip().replace('\x03', ''), 42 | 'x': x, 43 | 'y': y 44 | }) 45 | 46 | _ = page.extract_text(visitor_text=visitor_body) 47 | 48 | blob_font_size = None 49 | blob_text = '' 50 | processed_text = [] 51 | 52 | for t in page_text: 53 | if t['fontsize'] == blob_font_size: 54 | blob_text += f" {t['text']}" 55 | else: 56 | if blob_font_size is not None and len(blob_text) > 1: 57 | processed_text.append({ 58 | 'fontsize': blob_font_size, 59 | 'text': blob_text, 60 | 'page': i 61 | }) 62 | blob_font_size = t['fontsize'] 63 | blob_text = t['text'] 64 | paper_text += processed_text 65 | return paper_text 66 | 67 | 68 | if __name__ == "__main__": 69 | parser = argparse.ArgumentParser() 70 | parser.add_argument("--arxiv-id", help="Use the arxiv id of the paper") 71 | parser.add_argument("--pdf-url", help="URL to the pdf of the paper") 72 | args = parser.parse_args() 73 | 74 | url = None 75 | if args.arxiv_id: 76 | url = f"{ARXIV_DOWNLOAD_URL}/{args.arxiv_id}.pdf" 77 | else: 78 | url = args.pdf_url 79 | 80 | if url is None: 81 | raise Exception("Paper not specified!") 82 | else: 83 | print("\n") 84 | Path(PAPER_LOC).mkdir(parents=True, exist_ok=True) 85 | filepath = download_paper(url) 86 | paper_contents = parse_paper(filepath) 87 | 88 | print(paper_contents) 89 | -------------------------------------------------------------------------------- /demo.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "id": "e0d05c51", 7 | "metadata": {}, 8 | "outputs": [], 9 | "source": [ 10 | "import sys\n", 11 | "sys.path.append(\"../\")" 12 | ] 13 | }, 14 | { 15 | "cell_type": "code", 16 | "execution_count": 2, 17 | "id": "452a1f04", 18 | "metadata": {}, 19 | "outputs": [], 20 | "source": [ 21 | "from talktopapers.parse_paper import download_paper, parse_paper" 22 | ] 23 | }, 24 | { 25 | "cell_type": "code", 26 | "execution_count": 4, 27 | "id": "6cb04dd0", 28 | "metadata": {}, 29 | "outputs": [ 30 | { 31 | "name": "stdout", 32 | "output_type": "stream", 33 | "text": [ 34 | "1. Downloading paper\n", 35 | "Paper already exists!\n", 36 | "\n", 37 | "\n", 38 | "\n" 39 | ] 40 | } 41 | ], 42 | "source": [ 43 | "filepath = download_paper(\"http://export.arxiv.org/pdf/1706.03762.pdf\")" 44 | ] 45 | }, 46 | { 47 | "cell_type": "code", 48 | "execution_count": 6, 49 | "id": "bf091d43", 50 | "metadata": {}, 51 | "outputs": [ 52 | { 53 | "name": "stdout", 54 | "output_type": "stream", 55 | "text": [ 56 | "2. Parsing paper\n", 57 | "Total number of pages: 15\n" 58 | ] 59 | } 60 | ], 61 | "source": [ 62 | "paper_text = parse_paper(filepath)" 63 | ] 64 | }, 65 | { 66 | "cell_type": "code", 67 | "execution_count": 7, 68 | "id": "c8cdcdeb", 69 | "metadata": {}, 70 | "outputs": [ 71 | { 72 | "data": { 73 | "text/plain": [ 74 | "[{'fontsize': 17.2154, 'text': 'Attention Is All You Need', 'page': 0},\n", 75 | " {'fontsize': 9.9626,\n", 76 | " 'text': 'Ashish Vaswani Google Brain avaswani@google.com Noam Shazeer Google Brain noam@google.com Niki Parmar Google Research nikip@google.com Jakob Uszkoreit Google Research usz@google.com Llion Jones Google Research llion@google.com Aidan N. Gomez',\n", 77 | " 'page': 0},\n", 78 | " {'fontsize': 9.9626,\n", 79 | " 'text': 'University of Toronto aidan@cs.toronto.edu Łukasz Kaiser Google Brain lukaszkaiser@google.com Illia Polosukhin',\n", 80 | " 'page': 0},\n", 81 | " {'fontsize': 9.9626, 'text': 'illia.polosukhin@gmail.com', 'page': 0},\n", 82 | " {'fontsize': 11.9552, 'text': 'Abstract', 'page': 0},\n", 83 | " {'fontsize': 9.9626,\n", 84 | " 'text': 'The dominant sequence transduction models are based on complex recurrent or convolutional neural networks that include an encoder and a decoder. The best performing models also connect the encoder and decoder through an attention mechanism. We propose a new simple network architecture, the Transformer, based solely on attention mechanisms, dispensing with recurrence and convolutions entirely. Experiments on two machine translation tasks show these models to be superior in quality while being more parallelizable and requiring significantly less time to train. Our model achieves 28.4 BLEU on the WMT 2014 English- to-German translation task, improving over the existing best results, including ensembles, by over 2 BLEU. On the WMT 2014 English-to-French translation task, our model establishes a new single-model state-of-the-art BLEU score of 41.8 after training for 3.5 days on eight GPUs, a small fraction of the training costs of the best models from the literature. We show that the Transformer generalizes well to other tasks by applying it successfully to English constituency parsing both with large and limited training data.',\n", 85 | " 'page': 0},\n", 86 | " {'fontsize': 11.9552, 'text': '1 Introduction', 'page': 0},\n", 87 | " {'fontsize': 9.9626,\n", 88 | " 'text': 'Recurrent neural networks, long short-term memory [ 13] and gated recurrent [ 7] neural networks in particular, have been firmly established as state of the art approaches in sequence modeling and',\n", 89 | " 'page': 0},\n", 90 | " {'fontsize': 8.9664,\n", 91 | " 'text': 'Equal contribution. Listing order is random. Jakob proposed replacing RNNs with self-attention and started the effort to evaluate this idea. Ashish, with Illia, designed and implemented the first Transformer models and has been crucially involved in every aspect of this work. Noam proposed scaled dot-product attention, multi-head attention and the parameter-free position representation and became the other person involved in nearly every detail. Niki designed, implemented, tuned and evaluated countless model variants in our original codebase and tensor2tensor. Llion also experimented with novel model variants, was responsible for our initial codebase, and efficient inference and visualizations. Lukasz and Aidan spent countless long days designing various parts of and implementing tensor2tensor, replacing our earlier codebase, greatly improving results and massively accelerating our research. Work performed while at Google Brain. Work performed while at Google Research. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA.',\n", 92 | " 'page': 0},\n", 93 | " {'fontsize': 9.9626,\n", 94 | " 'text': 'transduction problems such as language modeling and machine translation [ 35,2,5]. Numerous efforts have since continued to push the boundaries of recurrent language models and encoder-decoder architectures [38, 24, 15]. Recurrent models typically factor computation along the symbol positions of the input and output sequences. Aligning the positions to steps in computation time, they generate a sequence of hidden states , as a function of the previous hidden state and the input for position . This inherently sequential nature precludes parallelization within training examples, which becomes critical at longer sequence lengths, as memory constraints limit batching across examples. Recent work has achieved significant improvements in computational efficiency through factorization tricks [ 21] and conditional computation [ 32], while also improving model performance in case of the latter. The fundamental constraint of sequential computation, however, remains. Attention mechanisms have become an integral part of compelling sequence modeling and transduc- tion models in various tasks, allowing modeling of dependencies without regard to their distance in the input or output sequences [ 2,19]. In all but a few cases [ 27], however, such attention mechanisms are used in conjunction with a recurrent network. In this work we propose the Transformer, a model architecture eschewing recurrence and instead relying entirely on an attention mechanism to draw global dependencies between input and output. The Transformer allows for significantly more parallelization and can reach a new state of the art in translation quality after being trained for as little as twelve hours on eight P100 GPUs.',\n", 95 | " 'page': 1},\n", 96 | " {'fontsize': 11.9552, 'text': '2 Background', 'page': 1},\n", 97 | " {'fontsize': 9.9626,\n", 98 | " 'text': 'The goal of reducing sequential computation also forms the foundation of the Extended Neural GPU [16], ByteNet [ 18] and ConvS2S [ 9], all of which use convolutional neural networks as basic building block, computing hidden representations in parallel for all input and output positions. In these models, the number of operations required to relate signals from two arbitrary input or output positions grows in the distance between positions, linearly for ConvS2S and logarithmically for ByteNet. This makes it more difficult to learn dependencies between distant positions [ 12]. In the Transformer this is reduced to a constant number of operations, albeit at the cost of reduced effective resolution due to averaging attention-weighted positions, an effect we counteract with Multi-Head Attention as described in section 3.2. Self-attention, sometimes called intra-attention is an attention mechanism relating different positions of a single sequence in order to compute a representation of the sequence. Self-attention has been used successfully in a variety of tasks including reading comprehension, abstractive summarization, textual entailment and learning task-independent sentence representations [4, 27, 28, 22]. End-to-end memory networks are based on a recurrent attention mechanism instead of sequence- aligned recurrence and have been shown to perform well on simple-language question answering and language modeling tasks [34]. To the best of our knowledge, however, the Transformer is the first transduction model relying entirely on self-attention to compute representations of its input and output without using sequence- aligned RNNs or convolution. In the following sections, we will describe the Transformer, motivate self-attention and discuss its advantages over models such as [17, 18] and [9].',\n", 99 | " 'page': 1},\n", 100 | " {'fontsize': 11.9552, 'text': '3 Model Architecture', 'page': 1},\n", 101 | " {'fontsize': 9.9626,\n", 102 | " 'text': 'Figure 1: The Transformer - model architecture. 3.1 Encoder and Decoder Stacks Encoder: The encoder is composed of a stack of = 6 identical layers. Each layer has two sub-layers. The first is a multi-head self-attention mechanism, and the second is a simple, position- wise fully connected feed-forward network. We employ a residual connection [ 11] around each of the two sub-layers, followed by layer normalization [ 1]. That is, the output of each sub-layer is LayerNorm( + Sublayer( )) , where Sublayer( is the function implemented by the sub-layer itself. To facilitate these residual connections, all sub-layers in the model, as well as the embedding layers, produce outputs of dimension',\n", 103 | " 'page': 2},\n", 104 | " {'fontsize': 6.9738, 'text': 'model', 'page': 2},\n", 105 | " {'fontsize': 9.9626,\n", 106 | " 'text': 'Scaled Dot-Product Attention Multi-Head Attention Figure 2: (left) Scaled Dot-Product Attention. (right) Multi-Head Attention consists of several attention layers running in parallel. 3.2.1 Scaled Dot-Product Attention We call our particular attention \"Scaled Dot-Product Attention\" (Figure 2). The input consists of queries and keys of dimension , and values of dimension . We compute the dot products of the query with all keys, divide each by , and apply a softmax function to obtain the weights on the values. In practice, we compute the attention function on a set of queries simultaneously, packed together into a matrix . The keys and values are also packed together into matrices and . We compute the matrix of outputs as: Attention( Q;K;V ) = softmax( QK (1) The two most commonly used attention functions are additive attention [ 2], and dot-product (multi- plicative) attention. Dot-product attention is identical to our algorithm, except for the scaling factor of . Additive attention computes the compatibility function using a feed-forward network with a single hidden layer. While the two are similar in theoretical complexity, dot-product attention is much faster and more space-efficient in practice, since it can be implemented using highly optimized matrix multiplication code. While for small values of the two mechanisms perform similarly, additive attention outperforms dot product attention without scaling for larger values of [3]. We suspect that for large values of , the dot products grow large in magnitude, pushing the softmax function into regions where it has extremely small gradients . To counteract this effect, we scale the dot products by 3.2.2 Multi-Head Attention Instead of performing a single attention function with',\n", 107 | " 'page': 3},\n", 108 | " {'fontsize': 6.9738, 'text': 'model', 'page': 3},\n", 109 | " {'fontsize': 9.9626,\n", 110 | " 'text': '-dimensional keys, values and queries, we found it beneficial to linearly project the queries, keys and values times with different, learned linear projections to and dimensions, respectively. On each of these projected versions of queries, keys and values we then perform the attention function in parallel, yielding -dimensional output values. These are concatenated and once again projected, resulting in the final values, as depicted in Figure 2.',\n", 111 | " 'page': 3},\n", 112 | " {'fontsize': 8.9664,\n", 113 | " 'text': 'To illustrate why the dot products get large, assume that the components of and are independent random variables with mean and variance . Then their dot product,',\n", 114 | " 'page': 3},\n", 115 | " {'fontsize': 5.9776, 'text': '=1', 'page': 3},\n", 116 | " {'fontsize': 9.9626,\n", 117 | " 'text': 'Multi-head attention allows the model to jointly attend to information from different representation subspaces at different positions. With a single attention head, averaging inhibits this. MultiHead( Q;K;V ) = Concat(head ;:::; head where head = Attention( QW ;KW ;VW Where the projections are parameter matrices',\n", 118 | " 'page': 4},\n", 119 | " {'fontsize': 4.9813, 'text': 'model model model', 'page': 4},\n", 120 | " {'fontsize': 9.9626, 'text': 'and', 'page': 4},\n", 121 | " {'fontsize': 6.9738, 'text': 'hd', 'page': 4},\n", 122 | " {'fontsize': 4.9813, 'text': 'model', 'page': 4},\n", 123 | " {'fontsize': 9.9626,\n", 124 | " 'text': 'In this work we employ = 8 parallel attention layers, or heads. For each of these we use',\n", 125 | " 'page': 4},\n", 126 | " {'fontsize': 6.9738, 'text': 'model', 'page': 4},\n", 127 | " {'fontsize': 9.9626,\n", 128 | " 'text': '=h = 64 . Due to the reduced dimension of each head, the total computational cost is similar to that of single-head attention with full dimensionality. 3.2.3 Applications of Attention in our Model The Transformer uses multi-head attention in three different ways: In \"encoder-decoder attention\" layers, the queries come from the previous decoder layer, and the memory keys and values come from the output of the encoder. This allows every position in the decoder to attend over all positions in the input sequence. This mimics the typical encoder-decoder attention mechanisms in sequence-to-sequence models such as [38, 2, 9]. The encoder contains self-attention layers. In a self-attention layer all of the keys, values and queries come from the same place, in this case, the output of the previous layer in the encoder. Each position in the encoder can attend to all positions in the previous layer of the encoder. Similarly, self-attention layers in the decoder allow each position in the decoder to attend to all positions in the decoder up to and including that position. We need to prevent leftward information flow in the decoder to preserve the auto-regressive property. We implement this inside of scaled dot-product attention by masking out (setting to \\x001 ) all values in the input of the softmax which correspond to illegal connections. See Figure 2. 3.3 Position-wise Feed-Forward Networks In addition to attention sub-layers, each of the layers in our encoder and decoder contains a fully connected feed-forward network, which is applied to each position separately and identically. This consists of two linear transformations with a ReLU activation in between. FFN( ) = max(0 ;xW (2) While the linear transformations are the same across different positions, they use different parameters from layer to layer. Another way of describing this is as two convolutions with kernel size 1. The dimensionality of input and output is',\n", 129 | " 'page': 4},\n", 130 | " {'fontsize': 6.9738, 'text': 'model', 'page': 4},\n", 131 | " {'fontsize': 9.9626,\n", 132 | " 'text': '= 512 , and the inner-layer has dimensionality',\n", 133 | " 'page': 4},\n", 134 | " {'fontsize': 6.9738, 'text': 'ff', 'page': 4},\n", 135 | " {'fontsize': 9.9626,\n", 136 | " 'text': '= 2048 3.4 Embeddings and Softmax Similarly to other sequence transduction models, we use learned embeddings to convert the input tokens and output tokens to vectors of dimension',\n", 137 | " 'page': 4},\n", 138 | " {'fontsize': 6.9738, 'text': 'model', 'page': 4},\n", 139 | " {'fontsize': 9.9626,\n", 140 | " 'text': '. We also use the usual learned linear transfor- mation and softmax function to convert the decoder output to predicted next-token probabilities. In our model, we share the same weight matrix between the two embedding layers and the pre-softmax linear transformation, similar to [ 30]. In the embedding layers, we multiply those weights by',\n", 141 | " 'page': 4},\n", 142 | " {'fontsize': 6.9738, 'text': 'model', 'page': 4},\n", 143 | " {'fontsize': 9.9626,\n", 144 | " 'text': 'Table 1: Maximum path lengths, per-layer complexity and minimum number of sequential operations for different layer types. is the sequence length, is the representation dimension, is the kernel size of convolutions and the size of the neighborhood in restricted self-attention. Layer Type Complexity per Layer Sequential Maximum Path Length Operations Self-Attention (1) (1) Recurrent Convolutional (1) log )) Self-Attention (restricted) (1) n=r tokens in the sequence. To this end, we add \"positional encodings\" to the input embeddings at the bottoms of the encoder and decoder stacks. The positional encodings have the same dimension',\n", 145 | " 'page': 5},\n", 146 | " {'fontsize': 6.9738, 'text': 'model', 'page': 5},\n", 147 | " {'fontsize': 9.9626,\n", 148 | " 'text': 'as the embeddings, so that the two can be summed. There are many choices of positional encodings, learned and fixed [9]. In this work, we use sine and cosine functions of different frequencies: PE',\n", 149 | " 'page': 5},\n", 150 | " {'fontsize': 6.9738, 'text': 'pos;', 'page': 5},\n", 151 | " {'fontsize': 9.9626, 'text': 'sin pos= 10000', 'page': 5},\n", 152 | " {'fontsize': 6.9738, 'text': 'i=d', 'page': 5},\n", 153 | " {'fontsize': 4.9813, 'text': 'model', 'page': 5},\n", 154 | " {'fontsize': 9.9626, 'text': 'PE', 'page': 5},\n", 155 | " {'fontsize': 6.9738, 'text': 'pos; +1)', 'page': 5},\n", 156 | " {'fontsize': 9.9626, 'text': 'cos pos= 10000', 'page': 5},\n", 157 | " {'fontsize': 6.9738, 'text': 'i=d', 'page': 5},\n", 158 | " {'fontsize': 4.9813, 'text': 'model', 'page': 5},\n", 159 | " {'fontsize': 9.9626,\n", 160 | " 'text': 'where pos is the position and is the dimension. That is, each dimension of the positional encoding corresponds to a sinusoid. The wavelengths form a geometric progression from to 10000 . We chose this function because we hypothesized it would allow the model to easily learn to attend by relative positions, since for any fixed offset PE',\n", 161 | " 'page': 5},\n", 162 | " {'fontsize': 6.9738, 'text': 'pos', 'page': 5},\n", 163 | " {'fontsize': 9.9626,\n", 164 | " 'text': 'can be represented as a linear function of PE',\n", 165 | " 'page': 5},\n", 166 | " {'fontsize': 6.9738, 'text': 'pos', 'page': 5},\n", 167 | " {'fontsize': 9.9626,\n", 168 | " 'text': 'We also experimented with using learned positional embeddings [ 9] instead, and found that the two versions produced nearly identical results (see Table 3 row (E)). We chose the sinusoidal version because it may allow the model to extrapolate to sequence lengths longer than the ones encountered during training.',\n", 169 | " 'page': 5},\n", 170 | " {'fontsize': 11.9552, 'text': '4 Why Self-Attention', 'page': 5},\n", 171 | " {'fontsize': 9.9626,\n", 172 | " 'text': 'the input sequence centered around the respective output position. This would increase the maximum path length to n=r . We plan to investigate this approach further in future work. A single convolutional layer with kernel width k It is in of or',\n", 257 | " 'page': 12},\n", 258 | " {'fontsize': 11.9552,\n", 259 | " 'text': 'Input-Input Layer5\\nIt\\nis\\nin\\nthis\\nspirit\\nthat\\na\\nmajority\\nof\\nAmerican\\ngovernments\\nhave\\npassed\\nnew\\nlaws\\nsince\\n2009\\nmaking\\nthe\\nregistration\\nor\\nvoting\\nprocess\\nmore\\ndifficult\\n.\\n\\n\\n\\n\\n\\n\\n\\nIt\\nis\\nin\\nthis\\nspirit\\nthat\\na\\nmajority\\nof\\nAmerican\\ngovernments\\nhave\\npassed\\nnew\\nlaws\\nsince\\n2009\\nmaking\\nthe\\nregistration\\nor\\nvoting\\nprocess\\nmore\\ndifficult\\n.\\n\\n\\n\\n\\n\\n\\n',\n", 260 | " 'page': 12},\n", 261 | " {'fontsize': 1.0,\n", 262 | " 'text': 'Input-Input Layer5 The Law will never be perfect but its application should be just this is what we are missing in my opinion Input-Input Layer5 The Law will never be perfect but its application should be just this is what we are missing in my opinion be its be is in',\n", 263 | " 'page': 13},\n", 264 | " {'fontsize': 1.0,\n", 265 | " 'text': 'Input-Input Layer5 The Law will never be perfect but its application should be just this is what we are missing in my opinion Input-Input Layer5 The Law will never be perfect but its application should be just this is what we are missing in my opinion ',\n", 266 | " 'page': 14}]" 267 | ] 268 | }, 269 | "execution_count": 7, 270 | "metadata": {}, 271 | "output_type": "execute_result" 272 | } 273 | ], 274 | "source": [ 275 | "paper_text" 276 | ] 277 | }, 278 | { 279 | "cell_type": "code", 280 | "execution_count": 8, 281 | "id": "e1c49d02", 282 | "metadata": {}, 283 | "outputs": [ 284 | { 285 | "data": { 286 | "text/plain": [ 287 | "109" 288 | ] 289 | }, 290 | "execution_count": 8, 291 | "metadata": {}, 292 | "output_type": "execute_result" 293 | } 294 | ], 295 | "source": [ 296 | "len(paper_text)" 297 | ] 298 | }, 299 | { 300 | "cell_type": "code", 301 | "execution_count": null, 302 | "id": "fc3a7843", 303 | "metadata": {}, 304 | "outputs": [], 305 | "source": [] 306 | } 307 | ], 308 | "metadata": { 309 | "kernelspec": { 310 | "display_name": "Python 3 (ipykernel)", 311 | "language": "python", 312 | "name": "python3" 313 | }, 314 | "language_info": { 315 | "codemirror_mode": { 316 | "name": "ipython", 317 | "version": 3 318 | }, 319 | "file_extension": ".py", 320 | "mimetype": "text/x-python", 321 | "name": "python", 322 | "nbconvert_exporter": "python", 323 | "pygments_lexer": "ipython3", 324 | "version": "3.8.13" 325 | } 326 | }, 327 | "nbformat": 4, 328 | "nbformat_minor": 5 329 | } 330 | --------------------------------------------------------------------------------