# import requests
# from bs4 import BeautifulSoup
# import os
# from urllib.parse import urljoin

# def download_pdf(url, download_folder):
#     # Send a GET request to the URL
#     response = requests.get(url)
#     response.raise_for_status()  # Raise an error for bad status codes

#     # Parse the HTML content
#     soup = BeautifulSoup(response.content, 'html.parser')

#     # Find all hyperlinks present on the webpage
#     for link in soup.find_all('a'):
#         href = link.get('href')
#         if href and href.endswith('.pdf'):
#             # Construct the full URL
#             full_url = urljoin(url, href)

#             # Download the PDF
#             pdf_response = requests.get(full_url)
#             pdf_response.raise_for_status()

#             # Write the PDF to a file
#             pdf_filename = os.path.join(download_folder, href.split('/')[-1])
#             with open(pdf_filename, 'wb') as file:
#                 file.write(pdf_response.content)
#             print(f"Downloaded {pdf_filename}")

# target_url = 'https://abc.xyz/investor/earnings/'  # Replace with the URL of the web page
# download_folder = '.'  # Replace with your desired download folder path

# download_pdf(target_url, download_folder)
# !mkdir earnings
# !mv *.pdf earnings/
!pip uninstall -y lxml
!pip install -U pydantic==1.10.8 typing-inspect==0.8.0 typing_extensions==4.5.0 unstructured[pdf]
!pip install protobuf==3.20.1 langchain
Found existing installation: lxml 4.9.3
Uninstalling lxml-4.9.3:
  Successfully uninstalled lxml-4.9.3
Collecting pydantic==1.10.8
  Using cached pydantic-1.10.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (146 kB)
Requirement already satisfied: typing-inspect==0.8.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (0.8.0)
Collecting typing_extensions==4.5.0
  Using cached typing_extensions-4.5.0-py3-none-any.whl (27 kB)
Requirement already satisfied: unstructured[pdf] in /home/zmack/mambaforge/lib/python3.10/site-packages (0.11.2)
Requirement already satisfied: mypy-extensions>=0.3.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from typing-inspect==0.8.0) (1.0.0)
Requirement already satisfied: chardet in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (5.2.0)
Requirement already satisfied: filetype in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (1.2.0)
Requirement already satisfied: python-magic in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (0.4.27)
Collecting lxml (from unstructured[pdf])
  Using cached lxml-4.9.3-cp310-cp310-manylinux_2_28_x86_64.whl.metadata (3.8 kB)
Requirement already satisfied: nltk in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (3.8.1)
Requirement already satisfied: tabulate in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (0.9.0)
Requirement already satisfied: requests in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (2.31.0)
Requirement already satisfied: beautifulsoup4 in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (4.12.2)
Requirement already satisfied: emoji in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (2.9.0)
Requirement already satisfied: dataclasses-json in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (0.6.3)
Requirement already satisfied: python-iso639 in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (2023.6.15)
Requirement already satisfied: langdetect in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (1.0.9)
Requirement already satisfied: numpy in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (1.26.2)
Requirement already satisfied: rapidfuzz in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (3.5.2)
Requirement already satisfied: backoff in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (2.2.1)
Requirement already satisfied: wrapt in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (1.16.0)
Requirement already satisfied: onnx in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (1.15.0)
Requirement already satisfied: pdf2image in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (1.16.3)
Requirement already satisfied: pdfminer.six in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (20221105)
Requirement already satisfied: pikepdf in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (8.8.0)
Requirement already satisfied: pypdf in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (3.17.1)
Requirement already satisfied: unstructured-inference==0.7.15 in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (0.7.15)
Requirement already satisfied: unstructured.pytesseract>=0.3.12 in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured[pdf]) (0.3.12)
Requirement already satisfied: layoutparser[layoutmodels,tesseract] in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured-inference==0.7.15->unstructured[pdf]) (0.3.4)
Requirement already satisfied: python-multipart in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured-inference==0.7.15->unstructured[pdf]) (0.0.6)
Requirement already satisfied: huggingface-hub in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured-inference==0.7.15->unstructured[pdf]) (0.19.4)
Requirement already satisfied: opencv-python!=4.7.0.68 in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured-inference==0.7.15->unstructured[pdf]) (4.8.1.78)
Requirement already satisfied: onnxruntime<1.16 in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured-inference==0.7.15->unstructured[pdf]) (1.15.1)
Requirement already satisfied: transformers>=4.25.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured-inference==0.7.15->unstructured[pdf]) (4.35.2)
Requirement already satisfied: packaging>=21.3 in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured.pytesseract>=0.3.12->unstructured[pdf]) (23.2)
Requirement already satisfied: Pillow>=8.0.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from unstructured.pytesseract>=0.3.12->unstructured[pdf]) (10.1.0)
Requirement already satisfied: soupsieve>1.2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from beautifulsoup4->unstructured[pdf]) (2.5)
Requirement already satisfied: marshmallow<4.0.0,>=3.18.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from dataclasses-json->unstructured[pdf]) (3.20.1)
Requirement already satisfied: six in /home/zmack/mambaforge/lib/python3.10/site-packages (from langdetect->unstructured[pdf]) (1.16.0)
Requirement already satisfied: click in /home/zmack/mambaforge/lib/python3.10/site-packages (from nltk->unstructured[pdf]) (8.1.7)
Requirement already satisfied: joblib in /home/zmack/mambaforge/lib/python3.10/site-packages (from nltk->unstructured[pdf]) (1.3.2)
Requirement already satisfied: regex>=2021.8.3 in /home/zmack/mambaforge/lib/python3.10/site-packages (from nltk->unstructured[pdf]) (2023.10.3)
Requirement already satisfied: tqdm in /home/zmack/mambaforge/lib/python3.10/site-packages (from nltk->unstructured[pdf]) (4.66.1)
Requirement already satisfied: protobuf>=3.20.2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from onnx->unstructured[pdf]) (4.25.1)
Requirement already satisfied: charset-normalizer>=2.0.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pdfminer.six->unstructured[pdf]) (3.3.2)
Requirement already satisfied: cryptography>=36.0.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pdfminer.six->unstructured[pdf]) (41.0.7)
Requirement already satisfied: Deprecated in /home/zmack/mambaforge/lib/python3.10/site-packages (from pikepdf->unstructured[pdf]) (1.2.14)
Requirement already satisfied: idna<4,>=2.5 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests->unstructured[pdf]) (3.6)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests->unstructured[pdf]) (1.26.18)
Requirement already satisfied: certifi>=2017.4.17 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests->unstructured[pdf]) (2023.11.17)
Requirement already satisfied: cffi>=1.12 in /home/zmack/mambaforge/lib/python3.10/site-packages (from cryptography>=36.0.0->pdfminer.six->unstructured[pdf]) (1.16.0)
Requirement already satisfied: coloredlogs in /home/zmack/mambaforge/lib/python3.10/site-packages (from onnxruntime<1.16->unstructured-inference==0.7.15->unstructured[pdf]) (15.0.1)
Requirement already satisfied: flatbuffers in /home/zmack/mambaforge/lib/python3.10/site-packages (from onnxruntime<1.16->unstructured-inference==0.7.15->unstructured[pdf]) (23.5.26)
Requirement already satisfied: sympy in /home/zmack/mambaforge/lib/python3.10/site-packages (from onnxruntime<1.16->unstructured-inference==0.7.15->unstructured[pdf]) (1.12)
Requirement already satisfied: filelock in /home/zmack/mambaforge/lib/python3.10/site-packages (from transformers>=4.25.1->unstructured-inference==0.7.15->unstructured[pdf]) (3.13.1)
Requirement already satisfied: pyyaml>=5.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from transformers>=4.25.1->unstructured-inference==0.7.15->unstructured[pdf]) (6.0.1)
Requirement already satisfied: tokenizers<0.19,>=0.14 in /home/zmack/mambaforge/lib/python3.10/site-packages (from transformers>=4.25.1->unstructured-inference==0.7.15->unstructured[pdf]) (0.15.0)
Requirement already satisfied: safetensors>=0.3.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from transformers>=4.25.1->unstructured-inference==0.7.15->unstructured[pdf]) (0.4.1)
Requirement already satisfied: fsspec>=2023.5.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from huggingface-hub->unstructured-inference==0.7.15->unstructured[pdf]) (2023.12.1)
Requirement already satisfied: scipy in /home/zmack/mambaforge/lib/python3.10/site-packages (from layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (1.11.4)
Requirement already satisfied: pandas in /home/zmack/mambaforge/lib/python3.10/site-packages (from layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (2.1.3)
Requirement already satisfied: iopath in /home/zmack/mambaforge/lib/python3.10/site-packages (from layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (0.1.10)
Requirement already satisfied: pdfplumber in /home/zmack/mambaforge/lib/python3.10/site-packages (from layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (0.10.3)
Requirement already satisfied: pytesseract in /home/zmack/mambaforge/lib/python3.10/site-packages (from layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (0.3.10)
Requirement already satisfied: torch in /home/zmack/mambaforge/lib/python3.10/site-packages (from layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (2.1.0.post100)
Requirement already satisfied: torchvision in /home/zmack/mambaforge/lib/python3.10/site-packages (from layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (0.16.1+cf89794)
Requirement already satisfied: effdet in /home/zmack/mambaforge/lib/python3.10/site-packages (from layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (0.4.1)
Requirement already satisfied: pycparser in /home/zmack/mambaforge/lib/python3.10/site-packages (from cffi>=1.12->cryptography>=36.0.0->pdfminer.six->unstructured[pdf]) (2.21)
Requirement already satisfied: humanfriendly>=9.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from coloredlogs->onnxruntime<1.16->unstructured-inference==0.7.15->unstructured[pdf]) (10.0)
Requirement already satisfied: timm>=0.9.2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (0.9.12)
Requirement already satisfied: pycocotools>=2.0.2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (2.0.7)
Requirement already satisfied: omegaconf>=2.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (2.3.0)
Requirement already satisfied: networkx in /home/zmack/mambaforge/lib/python3.10/site-packages (from torch->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (3.2.1)
Requirement already satisfied: jinja2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from torch->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (3.1.2)
Requirement already satisfied: portalocker in /home/zmack/mambaforge/lib/python3.10/site-packages (from iopath->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (2.8.2)
Requirement already satisfied: python-dateutil>=2.8.2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pandas->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pandas->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (2023.3.post1)
Requirement already satisfied: tzdata>=2022.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pandas->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (2023.3)
Requirement already satisfied: pypdfium2>=4.18.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pdfplumber->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (4.24.0)
Requirement already satisfied: mpmath>=0.19 in /home/zmack/mambaforge/lib/python3.10/site-packages (from sympy->onnxruntime<1.16->unstructured-inference==0.7.15->unstructured[pdf]) (1.3.0)
Requirement already satisfied: antlr4-python3-runtime==4.9.* in /home/zmack/mambaforge/lib/python3.10/site-packages (from omegaconf>=2.0->effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (4.9.3)
Requirement already satisfied: matplotlib>=2.1.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pycocotools>=2.0.2->effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (3.8.2)
Requirement already satisfied: MarkupSafe>=2.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from jinja2->torch->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (2.1.3)
Requirement already satisfied: contourpy>=1.0.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from matplotlib>=2.1.0->pycocotools>=2.0.2->effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (1.2.0)
Requirement already satisfied: cycler>=0.10 in /home/zmack/mambaforge/lib/python3.10/site-packages (from matplotlib>=2.1.0->pycocotools>=2.0.2->effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from matplotlib>=2.1.0->pycocotools>=2.0.2->effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (4.46.0)
Requirement already satisfied: kiwisolver>=1.3.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from matplotlib>=2.1.0->pycocotools>=2.0.2->effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (1.4.5)
Requirement already satisfied: pyparsing>=2.3.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from matplotlib>=2.1.0->pycocotools>=2.0.2->effdet->layoutparser[layoutmodels,tesseract]->unstructured-inference==0.7.15->unstructured[pdf]) (3.1.1)
Using cached pydantic-1.10.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
Using cached lxml-4.9.3-cp310-cp310-manylinux_2_28_x86_64.whl (7.9 MB)
Installing collected packages: typing_extensions, lxml, pydantic
  Attempting uninstall: typing_extensions
    Found existing installation: typing_extensions 4.8.0
    Uninstalling typing_extensions-4.8.0:
      Successfully uninstalled typing_extensions-4.8.0
  Attempting uninstall: pydantic
    Found existing installation: pydantic 2.5.2
    Uninstalling pydantic-2.5.2:
      Successfully uninstalled pydantic-2.5.2
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pydantic-core 2.14.5 requires typing-extensions!=4.7.0,>=4.6.0, but you have typing-extensions 4.5.0 which is incompatible.
Successfully installed lxml-4.9.3 pydantic-1.10.8 typing_extensions-4.5.0
Collecting protobuf==3.20.1
  Using cached protobuf-3.20.1-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.1 MB)
Requirement already satisfied: langchain in /home/zmack/mambaforge/lib/python3.10/site-packages (0.0.346)
Requirement already satisfied: PyYAML>=5.3 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain) (6.0.1)
Requirement already satisfied: SQLAlchemy<3,>=1.4 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain) (2.0.23)
Requirement already satisfied: aiohttp<4.0.0,>=3.8.3 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain) (3.9.1)
Requirement already satisfied: anyio<4.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain) (3.7.1)
Requirement already satisfied: async-timeout<5.0.0,>=4.0.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain) (4.0.3)
Requirement already satisfied: dataclasses-json<0.7,>=0.5.7 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain) (0.6.3)
Requirement already satisfied: jsonpatch<2.0,>=1.33 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain) (1.33)
Requirement already satisfied: langchain-core<0.1,>=0.0.10 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain) (0.0.10)
Requirement already satisfied: langsmith<0.1.0,>=0.0.63 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain) (0.0.69)
Requirement already satisfied: numpy<2,>=1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain) (1.26.2)
Requirement already satisfied: pydantic<3,>=1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain) (1.10.8)
Requirement already satisfied: requests<3,>=2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain) (2.31.0)
Requirement already satisfied: tenacity<9.0.0,>=8.1.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain) (8.2.3)
Requirement already satisfied: attrs>=17.3.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (23.1.0)
Requirement already satisfied: multidict<7.0,>=4.5 in /home/zmack/mambaforge/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (6.0.4)
Requirement already satisfied: yarl<2.0,>=1.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.9.3)
Requirement already satisfied: frozenlist>=1.1.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.4.0)
Requirement already satisfied: aiosignal>=1.1.2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain) (1.3.1)
Requirement already satisfied: idna>=2.8 in /home/zmack/mambaforge/lib/python3.10/site-packages (from anyio<4.0->langchain) (3.6)
Requirement already satisfied: sniffio>=1.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from anyio<4.0->langchain) (1.3.0)
Requirement already satisfied: exceptiongroup in /home/zmack/mambaforge/lib/python3.10/site-packages (from anyio<4.0->langchain) (1.2.0)
Requirement already satisfied: marshmallow<4.0.0,>=3.18.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from dataclasses-json<0.7,>=0.5.7->langchain) (3.20.1)
Requirement already satisfied: typing-inspect<1,>=0.4.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from dataclasses-json<0.7,>=0.5.7->langchain) (0.8.0)
Requirement already satisfied: jsonpointer>=1.9 in /home/zmack/mambaforge/lib/python3.10/site-packages (from jsonpatch<2.0,>=1.33->langchain) (2.4)
Requirement already satisfied: typing-extensions>=4.2.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pydantic<3,>=1->langchain) (4.5.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests<3,>=2->langchain) (3.3.2)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests<3,>=2->langchain) (1.26.18)
Requirement already satisfied: certifi>=2017.4.17 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests<3,>=2->langchain) (2023.11.17)
Requirement already satisfied: greenlet!=0.4.17 in /home/zmack/mambaforge/lib/python3.10/site-packages (from SQLAlchemy<3,>=1.4->langchain) (3.0.1)
Requirement already satisfied: packaging>=17.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from marshmallow<4.0.0,>=3.18.0->dataclasses-json<0.7,>=0.5.7->langchain) (23.2)
Requirement already satisfied: mypy-extensions>=0.3.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from typing-inspect<1,>=0.4.0->dataclasses-json<0.7,>=0.5.7->langchain) (1.0.0)
Installing collected packages: protobuf
  Attempting uninstall: protobuf
    Found existing installation: protobuf 4.25.1
    Uninstalling protobuf-4.25.1:
      Successfully uninstalled protobuf-4.25.1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
google-api-core 2.14.0 requires protobuf!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0.dev0,>=3.19.5, but you have protobuf 3.20.1 which is incompatible.
googleapis-common-protos 1.61.0 requires protobuf!=3.20.0,!=3.20.1,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0.dev0,>=3.19.5, but you have protobuf 3.20.1 which is incompatible.
grpcio-tools 1.59.3 requires protobuf<5.0dev,>=4.21.6, but you have protobuf 3.20.1 which is incompatible.
onnx 1.15.0 requires protobuf>=3.20.2, but you have protobuf 3.20.1 which is incompatible.
Successfully installed protobuf-3.20.1
# loader = DirectoryLoader(
#     './earnings/', # my local directory
#     glob='**/*.pdf',     # we only get pdfs
#     show_progress=True,
#     use_multithreading=True,
#     loader_kwargs={"strategy":"fast"}

# )
# docs = loader.load()
# docs
# from langchain.text_splitter import CharacterTextSplitter

# text_splitter = CharacterTextSplitter(
#     chunk_size=1000, 
#     chunk_overlap=0
# )
# docs_split = text_splitter.split_documents(docs)
# docs_split
!pip install qdrant_client
Requirement already satisfied: qdrant_client in /home/zmack/mambaforge/lib/python3.10/site-packages (1.6.9)
Requirement already satisfied: grpcio>=1.41.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from qdrant_client) (1.59.3)
Requirement already satisfied: grpcio-tools>=1.41.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from qdrant_client) (1.59.3)
Requirement already satisfied: httpx>=0.14.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from httpx[http2]>=0.14.0->qdrant_client) (0.25.2)
Requirement already satisfied: numpy>=1.21 in /home/zmack/mambaforge/lib/python3.10/site-packages (from qdrant_client) (1.26.2)
Requirement already satisfied: portalocker<3.0.0,>=2.7.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from qdrant_client) (2.8.2)
Requirement already satisfied: pydantic>=1.10.8 in /home/zmack/mambaforge/lib/python3.10/site-packages (from qdrant_client) (1.10.8)
Requirement already satisfied: urllib3<2.0.0,>=1.26.14 in /home/zmack/mambaforge/lib/python3.10/site-packages (from qdrant_client) (1.26.18)
Collecting protobuf<5.0dev,>=4.21.6 (from grpcio-tools>=1.41.0->qdrant_client)
  Using cached protobuf-4.25.1-cp37-abi3-manylinux2014_x86_64.whl.metadata (541 bytes)
Requirement already satisfied: setuptools in /home/zmack/mambaforge/lib/python3.10/site-packages (from grpcio-tools>=1.41.0->qdrant_client) (68.2.2)
Requirement already satisfied: anyio in /home/zmack/mambaforge/lib/python3.10/site-packages (from httpx>=0.14.0->httpx[http2]>=0.14.0->qdrant_client) (3.7.1)
Requirement already satisfied: certifi in /home/zmack/mambaforge/lib/python3.10/site-packages (from httpx>=0.14.0->httpx[http2]>=0.14.0->qdrant_client) (2023.11.17)
Requirement already satisfied: httpcore==1.* in /home/zmack/mambaforge/lib/python3.10/site-packages (from httpx>=0.14.0->httpx[http2]>=0.14.0->qdrant_client) (1.0.2)
Requirement already satisfied: idna in /home/zmack/mambaforge/lib/python3.10/site-packages (from httpx>=0.14.0->httpx[http2]>=0.14.0->qdrant_client) (3.6)
Requirement already satisfied: sniffio in /home/zmack/mambaforge/lib/python3.10/site-packages (from httpx>=0.14.0->httpx[http2]>=0.14.0->qdrant_client) (1.3.0)
Requirement already satisfied: h11<0.15,>=0.13 in /home/zmack/mambaforge/lib/python3.10/site-packages (from httpcore==1.*->httpx>=0.14.0->httpx[http2]>=0.14.0->qdrant_client) (0.14.0)
Requirement already satisfied: h2<5,>=3 in /home/zmack/mambaforge/lib/python3.10/site-packages (from httpx[http2]>=0.14.0->qdrant_client) (4.1.0)
Requirement already satisfied: typing-extensions>=4.2.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pydantic>=1.10.8->qdrant_client) (4.5.0)
Requirement already satisfied: hyperframe<7,>=6.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from h2<5,>=3->httpx[http2]>=0.14.0->qdrant_client) (6.0.1)
Requirement already satisfied: hpack<5,>=4.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from h2<5,>=3->httpx[http2]>=0.14.0->qdrant_client) (4.0.0)
Requirement already satisfied: exceptiongroup in /home/zmack/mambaforge/lib/python3.10/site-packages (from anyio->httpx>=0.14.0->httpx[http2]>=0.14.0->qdrant_client) (1.2.0)
Using cached protobuf-4.25.1-cp37-abi3-manylinux2014_x86_64.whl (294 kB)
Installing collected packages: protobuf
  Attempting uninstall: protobuf
    Found existing installation: protobuf 3.20.1
    Uninstalling protobuf-3.20.1:
      Successfully uninstalled protobuf-3.20.1
Successfully installed protobuf-4.25.1
import os
OPENAI_API_KEY="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"

os.environ['OPENAI_API_KEY'] = OPENAI_API_KEY
!pip install openai
Requirement already satisfied: openai in /home/zmack/mambaforge/lib/python3.10/site-packages (1.3.7)
Requirement already satisfied: anyio<4,>=3.5.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from openai) (3.7.1)
Requirement already satisfied: distro<2,>=1.7.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from openai) (1.8.0)
Requirement already satisfied: httpx<1,>=0.23.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from openai) (0.25.2)
Requirement already satisfied: pydantic<3,>=1.9.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from openai) (1.10.8)
Requirement already satisfied: sniffio in /home/zmack/mambaforge/lib/python3.10/site-packages (from openai) (1.3.0)
Requirement already satisfied: tqdm>4 in /home/zmack/mambaforge/lib/python3.10/site-packages (from openai) (4.66.1)
Requirement already satisfied: typing-extensions<5,>=4.5 in /home/zmack/mambaforge/lib/python3.10/site-packages (from openai) (4.5.0)
Requirement already satisfied: idna>=2.8 in /home/zmack/mambaforge/lib/python3.10/site-packages (from anyio<4,>=3.5.0->openai) (3.6)
Requirement already satisfied: exceptiongroup in /home/zmack/mambaforge/lib/python3.10/site-packages (from anyio<4,>=3.5.0->openai) (1.2.0)
Requirement already satisfied: certifi in /home/zmack/mambaforge/lib/python3.10/site-packages (from httpx<1,>=0.23.0->openai) (2023.11.17)
Requirement already satisfied: httpcore==1.* in /home/zmack/mambaforge/lib/python3.10/site-packages (from httpx<1,>=0.23.0->openai) (1.0.2)
Requirement already satisfied: h11<0.15,>=0.13 in /home/zmack/mambaforge/lib/python3.10/site-packages (from httpcore==1.*->httpx<1,>=0.23.0->openai) (0.14.0)
!pip install tiktoken
Requirement already satisfied: tiktoken in /home/zmack/mambaforge/lib/python3.10/site-packages (0.5.2)
Requirement already satisfied: regex>=2022.1.18 in /home/zmack/mambaforge/lib/python3.10/site-packages (from tiktoken) (2023.10.3)
Requirement already satisfied: requests>=2.26.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from tiktoken) (2.31.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests>=2.26.0->tiktoken) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests>=2.26.0->tiktoken) (3.6)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests>=2.26.0->tiktoken) (1.26.18)
Requirement already satisfied: certifi>=2017.4.17 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests>=2.26.0->tiktoken) (2023.11.17)
from qdrant_client.http import models

collection_name='langchain-chat'
from langchain.vectorstores import Qdrant
from langchain.embeddings.openai import OpenAIEmbeddings

embeddings=OpenAIEmbeddings()
collection_name = "langchain-chat"
from qdrant_client import QdrantClient
from langchain.vectorstores import Qdrant

client = QdrantClient(
    url="https://6c2aefd9-0c6e-404e-99d0-f031c6bde846.us-east4-0.gcp.cloud.qdrant.io:6333",
    api_key="IvJgXED6AuhG_3ZPgzvl0lraBNXvUQAsQv7IcgqR56UydKXP1e82iQ",
)

doc_db = Qdrant(client,
    collection_name=collection_name,
    embeddings=embeddings,
)
    
query = "What is the revenue of the company?"
search_result= doc_db.similarity_search(query)
search_result
[Document(page_content='Note 2. Revenues\n\nRevenue Recognition\n\nThe following table presents our revenues disaggregated by type (in millions).\n\nThree Months Ended\n\nSix Months Ended\n\nJune 30,\n\nJune 30,\n\n2020\n\n2021\n\n2020\n\n2021\n\nGoogle Search & other\n\n$\n\n21,319 $\n\n35,845 $\n\n45,821 $\n\n67,724\n\nYouTube ads\n\n3,812\n\n7,002\n\n7,850\n\n13,007\n\nGoogle Network\n\n4,736\n\n7,597\n\n9,959\n\n14,397\n\nGoogle advertising\n\n29,867\n\n50,444\n\n63,630\n\n95,128\n\nGoogle other\n\n5,124\n\n6,623\n\n9,559\n\n13,117\n\nGoogle Services total\n\n34,991\n\n57,067\n\n73,189\n\n108,245\n\nGoogle Cloud\n\n3,007\n\n4,628\n\n5,784\n\n8,675\n\nOther Bets\n\n148\n\n192\n\n283\n\n390\n\nHedging gains (losses)\n\nTotal revenues\n\n$\n\n151 38,297 $\n\n(7)\n\n61,880 $\n\n(116) 79,456 $ 117,194\n\n200\n\nThe following table presents our revenues disaggregated by geography, based on the addresses of our\n\ncustomers (in millions):\n\nThree Months Ended\n\nSix Months Ended\n\nJune 30,\n\nJune 30,\n\n2021 53,240 36,115 21,686 6,269\n\n2020 17,999 11,363 6,945 1,839\n\n2020 36,869 24,208 14,183 3,996\n\n2021 28,208 19,084 11,231 3,364', metadata={'source': 'earnings/20210728-alphabet-10q.pdf'}),
 Document(page_content='Note 2. Revenues\n\nRevenue Recognition\n\nThe following table presents our revenues disaggregated by type (in millions).\n\nThree Months Ended\n\nSix Months Ended\n\nJune 30,\n\nJune 30,\n\n2020\n\n2021\n\n2020\n\n2021\n\nGoogle Search & other\n\n$\n\n21,319 $\n\n35,845 $\n\n45,821 $\n\n67,724\n\nYouTube ads\n\n3,812\n\n7,002\n\n7,850\n\n13,007\n\nGoogle Network\n\n4,736\n\n7,597\n\n9,959\n\n14,397\n\nGoogle advertising\n\n29,867\n\n50,444\n\n63,630\n\n95,128\n\nGoogle other\n\n5,124\n\n6,623\n\n9,559\n\n13,117\n\nGoogle Services total\n\n34,991\n\n57,067\n\n73,189\n\n108,245\n\nGoogle Cloud\n\n3,007\n\n4,628\n\n5,784\n\n8,675\n\nOther Bets\n\n148\n\n192\n\n283\n\n390\n\nHedging gains (losses)\n\nTotal revenues\n\n$\n\n151 38,297 $\n\n(7)\n\n61,880 $\n\n(116) 79,456 $ 117,194\n\n200\n\nThe following table presents our revenues disaggregated by geography, based on the addresses of our\n\ncustomers (in millions):\n\nThree Months Ended\n\nSix Months Ended\n\nJune 30,\n\nJune 30,\n\n2021 53,240 36,115 21,686 6,269\n\n2020 17,999 11,363 6,945 1,839\n\n2020 36,869 24,208 14,183 3,996\n\n2021 28,208 19,084 11,231 3,364', metadata={'source': 'earnings/20210728-alphabet-10q.pdf'}),
 Document(page_content="Total revenues were $61.9 billion, an increase of 62% year over year, primarily driven by an increase in Google Services segment revenues of $22.1 billion or 63% and an increase in Google Cloud segment revenues of $1.6 billion or 54%. The adverse effect of COVID-19 on the prior year comparable period's advertising revenues contributed to the year-over-year increase. Revenues from the United States, EMEA, APAC, and Other Americas were $28.2 billion, $19.1 billion, $11.2 billion, and $3.4 billion, respectively.\n\nTotal cost of revenues was $26.2 billion, an increase of 41% year over year. TAC was $10.9 billion, an increase of 63% year over year, primarily driven by an increase in revenues subject to TAC. Other cost of revenues were $15.3 billion, an increase of 29% year over year, affected by a reduction in depreciation expense due to the change in the estimated useful life of our servers and certain network equipment.", metadata={'source': 'earnings/20210728-alphabet-10q.pdf'}),
 Document(page_content="Total revenues were $61.9 billion, an increase of 62% year over year, primarily driven by an increase in Google Services segment revenues of $22.1 billion or 63% and an increase in Google Cloud segment revenues of $1.6 billion or 54%. The adverse effect of COVID-19 on the prior year comparable period's advertising revenues contributed to the year-over-year increase. Revenues from the United States, EMEA, APAC, and Other Americas were $28.2 billion, $19.1 billion, $11.2 billion, and $3.4 billion, respectively.\n\nTotal cost of revenues was $26.2 billion, an increase of 41% year over year. TAC was $10.9 billion, an increase of 63% year over year, primarily driven by an increase in revenues subject to TAC. Other cost of revenues were $15.3 billion, an increase of 29% year over year, affected by a reduction in depreciation expense due to the change in the estimated useful life of our servers and certain network equipment.", metadata={'source': 'earnings/20210728-alphabet-10q.pdf'})]
from langchain.chat_models import ChatOpenAI

llm=ChatOpenAI()
from langchain.chains import RetrievalQA

qa = RetrievalQA.from_chain_type(
    llm=llm,
    chain_type='stuff',
    retriever=doc_db.as_retriever(),
)
query = "What is the revenue of the company?"
result = qa.run(query)

result
'The revenue of the company for the specified period is $61.9 billion.'
!pip install wikipedia
Requirement already satisfied: wikipedia in /home/zmack/mambaforge/lib/python3.10/site-packages (1.4.0)
Requirement already satisfied: beautifulsoup4 in /home/zmack/mambaforge/lib/python3.10/site-packages (from wikipedia) (4.12.2)
Requirement already satisfied: requests<3.0.0,>=2.0.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from wikipedia) (2.31.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests<3.0.0,>=2.0.0->wikipedia) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests<3.0.0,>=2.0.0->wikipedia) (3.6)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests<3.0.0,>=2.0.0->wikipedia) (1.26.18)
Requirement already satisfied: certifi>=2017.4.17 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests<3.0.0,>=2.0.0->wikipedia) (2023.11.17)
Requirement already satisfied: soupsieve>1.2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from beautifulsoup4->wikipedia) (2.5)
# create langchain agent with access to wikipedia
from langchain.agents import (load_tools, initialize_agent, AgentType)

tools = load_tools(['wikipedia'], llm=llm)

agent = initialize_agent(
    tools,
    llm,
    agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
    verbose=True,
)
agent.run('When was google founded?')


> Entering new AgentExecutor chain...
I should use Wikipedia to find the answer to this question.
Action: Wikipedia
Action Input: "google"
Observation: Page: Google
Summary: Google LLC ( ) is an American multinational technology company focusing on artificial intelligence, online advertising, search engine technology, cloud computing, computer software, quantum computing, e-commerce, and consumer electronics. It has been referred to as "the most powerful company in the world" and as one of the world's most valuable brands due to its market dominance, data collection, and technological advantages in the field of artificial intelligence. Alongside Amazon, Apple Inc., Meta, and Microsoft, Google's parent company Alphabet Inc. is one of the five Big Tech companies.
Google was founded on September 4, 1998, by American computer scientists Larry Page and Sergey Brin while they were PhD students at Stanford University in California. Together they own about 14% of its publicly listed shares and control 56% of its stockholder voting power through super-voting stock. The company went public via an initial public offering (IPO) in 2004. In 2015, Google was reorganized as a wholly owned subsidiary of Alphabet Inc. Google is Alphabet's largest subsidiary and is a holding company for Alphabet's internet properties and interests. Sundar Pichai was appointed CEO of Google on October 24, 2015, replacing Larry Page, who became the CEO of Alphabet. On December 3, 2019, Pichai also became the CEO of Alphabet.The company has since rapidly grown to offer a multitude of products and services beyond Google Search, many of which hold dominant market positions. These products address a wide range of use cases, including email (Gmail), navigation (Waze & Maps), cloud computing (Cloud), web browsing (Chrome), video sharing (YouTube), productivity (Workspace), operating systems (Android), cloud storage (Drive), language translation (Translate), photo storage (Photos), video calling (Meet), smart home (Nest), smartphones (Pixel), wearable technology (Pixel Watch & Fitbit), music streaming (YouTube Music), video on demand (YouTube TV), artificial intelligence (Google Assistant & Bard), machine learning APIs (TensorFlow), AI chips (TPU), and more. Discontinued Google products include gaming (Stadia), Glass, Google+, Reader, Play Music, Nexus, Hangouts, and Inbox by Gmail.Google's other ventures outside of Internet services and consumer electronics include quantum computing (Sycamore), self-driving cars (Waymo, formerly the Google Self-Driving Car Project), smart cities (Sidewalk Labs), and transformer models (Google Deepmind).Google and YouTube are the two most visited websites worldwide followed by Facebook and X (formerly known as Twitter). Google is also the largest search engine, mapping and navigation application, email provider, office suite, video sharing platform, photo and cloud storage provider, mobile operating system, web browser, ML framework, and AI virtual assistant provider in the world as measured by market share. On the list of most valuable brands, Google is ranked second by Forbes and fourth by Interbrand. It has received significant criticism involving issues such as privacy concerns, tax avoidance, censorship, search neutrality, antitrust and abuse of its monopoly position.

Page: Google Search
Summary: Google Search (also known simply as Google or Google.com) is a search engine provided and operated by Google. Handling more than 3.5 billion searches per day, it has a 92% share of the global search engine market. It is the most-visited website in the world. Additionally, it is the most searched and used search engine in the entire world.
The order of search results returned by Google is based, in part, on a priority rank system called "PageRank". Google Search also provides many different options for customized searches, using symbols to include, exclude, specify or require certain search behavior, and offers specialized interactive experiences, such as flight status and package tracking, weather forecasts, currency, unit, and time conversions, word definitions, and more.
The main purpo
Thought:I have found the answer to the question.
Final Answer: Google was founded on September 4, 1998.

> Finished chain.
'Google was founded on September 4, 1998.'
import os

os.environ["GOOGLE_CSE_ID"] = "47cbd1337edf14716"
os.environ["GOOGLE_API_KEY"] = "AIzaSyA0S861AkLrYACUWQJWuhZ7spc08CjP6xw"
!pip install google-api-python-client>=2.100.0 numexpr
from langchain.agents import Tool

name = """
Alphabet quarterly earning reports database
"""

description = """
Useful for when you need to answer questions about the earnings of Google and Alphabet in 2021, 2022 and 2023. Input may be a partial or fully formed question.
"""

search_tool = Tool(
    name=name,
    func=qa.run,
    description=description,
)
from langchain.memory import ConversationBufferMemory

llm = ChatOpenAI()
memory = ConversationBufferMemory(memory_key='chat_history',return_messages=True)
tools = load_tools(['wikipedia', 'google-search', 'llm-math'], llm=llm)
tools.append(search_tool)
agent = initialize_agent(
    tools,
    llm,
    agent=AgentType.CHAT_CONVERSATIONAL_REACT_DESCRIPTION,
    memory=memory,
    verbose=True,
    handle_parsing_errors=True,
)
agent.invoke({'input': 'When was google founded?'})['output']


> Entering new AgentExecutor chain...
{
    "action": "Wikipedia",
    "action_input": "Google"
}
Observation: Page: Google
Summary: Google LLC ( ) is an American multinational technology company focusing on artificial intelligence, online advertising, search engine technology, cloud computing, computer software, quantum computing, e-commerce, and consumer electronics. It has been referred to as "the most powerful company in the world" and as one of the world's most valuable brands due to its market dominance, data collection, and technological advantages in the field of artificial intelligence. Alongside Amazon, Apple Inc., Meta, and Microsoft, Google's parent company Alphabet Inc. is one of the five Big Tech companies.
Google was founded on September 4, 1998, by American computer scientists Larry Page and Sergey Brin while they were PhD students at Stanford University in California. Together they own about 14% of its publicly listed shares and control 56% of its stockholder voting power through super-voting stock. The company went public via an initial public offering (IPO) in 2004. In 2015, Google was reorganized as a wholly owned subsidiary of Alphabet Inc. Google is Alphabet's largest subsidiary and is a holding company for Alphabet's internet properties and interests. Sundar Pichai was appointed CEO of Google on October 24, 2015, replacing Larry Page, who became the CEO of Alphabet. On December 3, 2019, Pichai also became the CEO of Alphabet.The company has since rapidly grown to offer a multitude of products and services beyond Google Search, many of which hold dominant market positions. These products address a wide range of use cases, including email (Gmail), navigation (Waze & Maps), cloud computing (Cloud), web browsing (Chrome), video sharing (YouTube), productivity (Workspace), operating systems (Android), cloud storage (Drive), language translation (Translate), photo storage (Photos), video calling (Meet), smart home (Nest), smartphones (Pixel), wearable technology (Pixel Watch & Fitbit), music streaming (YouTube Music), video on demand (YouTube TV), artificial intelligence (Google Assistant & Bard), machine learning APIs (TensorFlow), AI chips (TPU), and more. Discontinued Google products include gaming (Stadia), Glass, Google+, Reader, Play Music, Nexus, Hangouts, and Inbox by Gmail.Google's other ventures outside of Internet services and consumer electronics include quantum computing (Sycamore), self-driving cars (Waymo, formerly the Google Self-Driving Car Project), smart cities (Sidewalk Labs), and transformer models (Google Deepmind).Google and YouTube are the two most visited websites worldwide followed by Facebook and X (formerly known as Twitter). Google is also the largest search engine, mapping and navigation application, email provider, office suite, video sharing platform, photo and cloud storage provider, mobile operating system, web browser, ML framework, and AI virtual assistant provider in the world as measured by market share. On the list of most valuable brands, Google is ranked second by Forbes and fourth by Interbrand. It has received significant criticism involving issues such as privacy concerns, tax avoidance, censorship, search neutrality, antitrust and abuse of its monopoly position.

Page: Google Search
Summary: Google Search (also known simply as Google or Google.com) is a search engine provided and operated by Google. Handling more than 3.5 billion searches per day, it has a 92% share of the global search engine market. It is the most-visited website in the world. Additionally, it is the most searched and used search engine in the entire world.
The order of search results returned by Google is based, in part, on a priority rank system called "PageRank". Google Search also provides many different options for customized searches, using symbols to include, exclude, specify or require certain search behavior, and offers specialized interactive experiences, such as flight status and package tracking, weather forecasts, currency, unit, and time conversions, word definitions, and more.
The main purpo
Thought:{
    "action": "Final Answer",
    "action_input": "Google was founded on September 4, 1998, by Larry Page and Sergey Brin while they were PhD students at Stanford University."
}

> Finished chain.
'Google was founded on September 4, 1998, by Larry Page and Sergey Brin while they were PhD students at Stanford University.'

agent.invoke({'input': 'By whom?'})['output']


> Entering new AgentExecutor chain...
Could not parse LLM output: I apologize for the confusion. Google was founded by Larry Page and Sergey Brin.
Observation: Invalid or incomplete response
Thought:{
    "action": "Final Answer",
    "action_input": "Google was founded by Larry Page and Sergey Brin."
}

> Finished chain.
'Google was founded by Larry Page and Sergey Brin.'
!pip install langchain_experimental
Requirement already satisfied: langchain_experimental in /home/zmack/mambaforge/lib/python3.10/site-packages (0.0.44)
Requirement already satisfied: langchain<0.1,>=0.0.346 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain_experimental) (0.0.346)
Requirement already satisfied: langchain-core<0.1,>=0.0.10 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain_experimental) (0.0.10)
Requirement already satisfied: PyYAML>=5.3 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain<0.1,>=0.0.346->langchain_experimental) (6.0.1)
Requirement already satisfied: SQLAlchemy<3,>=1.4 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain<0.1,>=0.0.346->langchain_experimental) (2.0.23)
Requirement already satisfied: aiohttp<4.0.0,>=3.8.3 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain<0.1,>=0.0.346->langchain_experimental) (3.9.1)
Requirement already satisfied: anyio<4.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain<0.1,>=0.0.346->langchain_experimental) (3.7.1)
Requirement already satisfied: async-timeout<5.0.0,>=4.0.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain<0.1,>=0.0.346->langchain_experimental) (4.0.3)
Requirement already satisfied: dataclasses-json<0.7,>=0.5.7 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain<0.1,>=0.0.346->langchain_experimental) (0.6.3)
Requirement already satisfied: jsonpatch<2.0,>=1.33 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain<0.1,>=0.0.346->langchain_experimental) (1.33)
Requirement already satisfied: langsmith<0.1.0,>=0.0.63 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain<0.1,>=0.0.346->langchain_experimental) (0.0.69)
Requirement already satisfied: numpy<2,>=1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain<0.1,>=0.0.346->langchain_experimental) (1.26.2)
Requirement already satisfied: pydantic<3,>=1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain<0.1,>=0.0.346->langchain_experimental) (1.10.8)
Requirement already satisfied: requests<3,>=2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain<0.1,>=0.0.346->langchain_experimental) (2.31.0)
Requirement already satisfied: tenacity<9.0.0,>=8.1.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from langchain<0.1,>=0.0.346->langchain_experimental) (8.2.3)
Requirement already satisfied: attrs>=17.3.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain<0.1,>=0.0.346->langchain_experimental) (23.1.0)
Requirement already satisfied: multidict<7.0,>=4.5 in /home/zmack/mambaforge/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain<0.1,>=0.0.346->langchain_experimental) (6.0.4)
Requirement already satisfied: yarl<2.0,>=1.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain<0.1,>=0.0.346->langchain_experimental) (1.9.3)
Requirement already satisfied: frozenlist>=1.1.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain<0.1,>=0.0.346->langchain_experimental) (1.4.0)
Requirement already satisfied: aiosignal>=1.1.2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from aiohttp<4.0.0,>=3.8.3->langchain<0.1,>=0.0.346->langchain_experimental) (1.3.1)
Requirement already satisfied: idna>=2.8 in /home/zmack/mambaforge/lib/python3.10/site-packages (from anyio<4.0->langchain<0.1,>=0.0.346->langchain_experimental) (3.6)
Requirement already satisfied: sniffio>=1.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from anyio<4.0->langchain<0.1,>=0.0.346->langchain_experimental) (1.3.0)
Requirement already satisfied: exceptiongroup in /home/zmack/mambaforge/lib/python3.10/site-packages (from anyio<4.0->langchain<0.1,>=0.0.346->langchain_experimental) (1.2.0)
Requirement already satisfied: marshmallow<4.0.0,>=3.18.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from dataclasses-json<0.7,>=0.5.7->langchain<0.1,>=0.0.346->langchain_experimental) (3.20.1)
Requirement already satisfied: typing-inspect<1,>=0.4.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from dataclasses-json<0.7,>=0.5.7->langchain<0.1,>=0.0.346->langchain_experimental) (0.8.0)
Requirement already satisfied: jsonpointer>=1.9 in /home/zmack/mambaforge/lib/python3.10/site-packages (from jsonpatch<2.0,>=1.33->langchain<0.1,>=0.0.346->langchain_experimental) (2.4)
Requirement already satisfied: typing-extensions>=4.2.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pydantic<3,>=1->langchain<0.1,>=0.0.346->langchain_experimental) (4.5.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests<3,>=2->langchain<0.1,>=0.0.346->langchain_experimental) (3.3.2)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests<3,>=2->langchain<0.1,>=0.0.346->langchain_experimental) (1.26.18)
Requirement already satisfied: certifi>=2017.4.17 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests<3,>=2->langchain<0.1,>=0.0.346->langchain_experimental) (2023.11.17)
Requirement already satisfied: greenlet!=0.4.17 in /home/zmack/mambaforge/lib/python3.10/site-packages (from SQLAlchemy<3,>=1.4->langchain<0.1,>=0.0.346->langchain_experimental) (3.0.1)
Requirement already satisfied: packaging>=17.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from marshmallow<4.0.0,>=3.18.0->dataclasses-json<0.7,>=0.5.7->langchain<0.1,>=0.0.346->langchain_experimental) (23.2)
Requirement already satisfied: mypy-extensions>=0.3.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from typing-inspect<1,>=0.4.0->dataclasses-json<0.7,>=0.5.7->langchain<0.1,>=0.0.346->langchain_experimental) (1.0.0)
from langchain_experimental.plan_and_execute import (
    PlanAndExecute, 
    load_agent_executor, 
    load_chat_planner
)

memory = ConversationBufferMemory(memory_key='chat_history')
planner = load_chat_planner(llm)
executor = load_agent_executor(llm, tools, verbose=True)

agent = PlanAndExecute(
    planner=planner, 
    executor=executor, 
    verbose=True, 
    reduce_k_below_max_tokens=True,
    max_tokens_limit=3000,
)
# agent.run('Should I invest in Google now?')
!pip install gradio
Requirement already satisfied: gradio in /home/zmack/mambaforge/lib/python3.10/site-packages (3.48.0)
Requirement already satisfied: aiofiles<24.0,>=22.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (23.2.1)
Requirement already satisfied: altair<6.0,>=4.2.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (5.2.0)
Requirement already satisfied: fastapi in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (0.103.2)
Requirement already satisfied: ffmpy in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (0.3.1)
Requirement already satisfied: gradio-client==0.6.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (0.6.1)
Requirement already satisfied: httpx in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (0.25.2)
Requirement already satisfied: huggingface-hub>=0.14.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (0.19.4)
Requirement already satisfied: importlib-resources<7.0,>=1.3 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (6.1.1)
Requirement already satisfied: jinja2<4.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (3.1.2)
Requirement already satisfied: markupsafe~=2.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (2.1.3)
Requirement already satisfied: matplotlib~=3.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (3.8.2)
Requirement already satisfied: numpy~=1.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (1.26.2)
Requirement already satisfied: orjson~=3.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (3.9.10)
Requirement already satisfied: packaging in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (23.2)
Requirement already satisfied: pandas<3.0,>=1.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (2.1.3)
Requirement already satisfied: pillow<11.0,>=8.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (10.1.0)
Requirement already satisfied: pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (1.10.8)
Requirement already satisfied: pydub in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (0.25.1)
Requirement already satisfied: python-multipart in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (0.0.6)
Requirement already satisfied: pyyaml<7.0,>=5.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (6.0.1)
Requirement already satisfied: requests~=2.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (2.31.0)
Requirement already satisfied: semantic-version~=2.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (2.10.0)
Requirement already satisfied: typing-extensions~=4.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (4.5.0)
Requirement already satisfied: uvicorn>=0.14.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (0.24.0.post1)
Requirement already satisfied: websockets<12.0,>=10.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio) (11.0.3)
Requirement already satisfied: fsspec in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio-client==0.6.1->gradio) (2023.12.1)
Requirement already satisfied: jsonschema>=3.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from altair<6.0,>=4.2.0->gradio) (4.20.0)
Requirement already satisfied: toolz in /home/zmack/mambaforge/lib/python3.10/site-packages (from altair<6.0,>=4.2.0->gradio) (0.12.0)
Requirement already satisfied: filelock in /home/zmack/mambaforge/lib/python3.10/site-packages (from huggingface-hub>=0.14.0->gradio) (3.13.1)
Requirement already satisfied: tqdm>=4.42.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from huggingface-hub>=0.14.0->gradio) (4.66.1)
Requirement already satisfied: contourpy>=1.0.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from matplotlib~=3.0->gradio) (1.2.0)
Requirement already satisfied: cycler>=0.10 in /home/zmack/mambaforge/lib/python3.10/site-packages (from matplotlib~=3.0->gradio) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from matplotlib~=3.0->gradio) (4.46.0)
Requirement already satisfied: kiwisolver>=1.3.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from matplotlib~=3.0->gradio) (1.4.5)
Requirement already satisfied: pyparsing>=2.3.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from matplotlib~=3.0->gradio) (3.1.1)
Requirement already satisfied: python-dateutil>=2.7 in /home/zmack/mambaforge/lib/python3.10/site-packages (from matplotlib~=3.0->gradio) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pandas<3.0,>=1.0->gradio) (2023.3.post1)
Requirement already satisfied: tzdata>=2022.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pandas<3.0,>=1.0->gradio) (2023.3)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests~=2.0->gradio) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests~=2.0->gradio) (3.6)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests~=2.0->gradio) (1.26.18)
Requirement already satisfied: certifi>=2017.4.17 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests~=2.0->gradio) (2023.11.17)
Requirement already satisfied: click>=7.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from uvicorn>=0.14.0->gradio) (8.1.7)
Requirement already satisfied: h11>=0.8 in /home/zmack/mambaforge/lib/python3.10/site-packages (from uvicorn>=0.14.0->gradio) (0.14.0)
Requirement already satisfied: anyio<4.0.0,>=3.7.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from fastapi->gradio) (3.7.1)
Requirement already satisfied: starlette<0.28.0,>=0.27.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from fastapi->gradio) (0.27.0)
Requirement already satisfied: httpcore==1.* in /home/zmack/mambaforge/lib/python3.10/site-packages (from httpx->gradio) (1.0.2)
Requirement already satisfied: sniffio in /home/zmack/mambaforge/lib/python3.10/site-packages (from httpx->gradio) (1.3.0)
Requirement already satisfied: exceptiongroup in /home/zmack/mambaforge/lib/python3.10/site-packages (from anyio<4.0.0,>=3.7.1->fastapi->gradio) (1.2.0)
Requirement already satisfied: attrs>=22.2.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (23.1.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /home/zmack/mambaforge/lib/python3.10/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (2023.11.2)
Requirement already satisfied: referencing>=0.28.4 in /home/zmack/mambaforge/lib/python3.10/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (0.31.1)
Requirement already satisfied: rpds-py>=0.7.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio) (0.13.2)
Requirement already satisfied: six>=1.5 in /home/zmack/mambaforge/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio) (1.16.0)
!pip install fastapi==0.103.2
Requirement already satisfied: fastapi==0.103.2 in /home/zmack/mambaforge/lib/python3.10/site-packages (0.103.2)
Requirement already satisfied: anyio<4.0.0,>=3.7.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from fastapi==0.103.2) (3.7.1)
Requirement already satisfied: pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0,>=1.7.4 in /home/zmack/mambaforge/lib/python3.10/site-packages (from fastapi==0.103.2) (1.10.8)
Requirement already satisfied: starlette<0.28.0,>=0.27.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from fastapi==0.103.2) (0.27.0)
Requirement already satisfied: typing-extensions>=4.5.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from fastapi==0.103.2) (4.5.0)
Requirement already satisfied: idna>=2.8 in /home/zmack/mambaforge/lib/python3.10/site-packages (from anyio<4.0.0,>=3.7.1->fastapi==0.103.2) (3.6)
Requirement already satisfied: sniffio>=1.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from anyio<4.0.0,>=3.7.1->fastapi==0.103.2) (1.3.0)
Requirement already satisfied: exceptiongroup in /home/zmack/mambaforge/lib/python3.10/site-packages (from anyio<4.0.0,>=3.7.1->fastapi==0.103.2) (1.2.0)
!pip install pydantic==2.*
!pip install gradio==3.48.0
Collecting pydantic==2.*
  Using cached pydantic-2.5.2-py3-none-any.whl.metadata (65 kB)
Requirement already satisfied: annotated-types>=0.4.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pydantic==2.*) (0.6.0)
Requirement already satisfied: pydantic-core==2.14.5 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pydantic==2.*) (2.14.5)
Collecting typing-extensions>=4.6.1 (from pydantic==2.*)
  Using cached typing_extensions-4.8.0-py3-none-any.whl.metadata (3.0 kB)
Using cached pydantic-2.5.2-py3-none-any.whl (381 kB)
Using cached typing_extensions-4.8.0-py3-none-any.whl (31 kB)
Installing collected packages: typing-extensions, pydantic
  Attempting uninstall: typing-extensions
    Found existing installation: typing_extensions 4.5.0
    Uninstalling typing_extensions-4.5.0:
      Successfully uninstalled typing_extensions-4.5.0
  Attempting uninstall: pydantic
    Found existing installation: pydantic 1.10.8
    Uninstalling pydantic-1.10.8:
      Successfully uninstalled pydantic-1.10.8
Successfully installed pydantic-2.5.2 typing-extensions-4.8.0
Requirement already satisfied: gradio==3.48.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (3.48.0)
Requirement already satisfied: aiofiles<24.0,>=22.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (23.2.1)
Requirement already satisfied: altair<6.0,>=4.2.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (5.2.0)
Requirement already satisfied: fastapi in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (0.103.2)
Requirement already satisfied: ffmpy in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (0.3.1)
Requirement already satisfied: gradio-client==0.6.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (0.6.1)
Requirement already satisfied: httpx in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (0.25.2)
Requirement already satisfied: huggingface-hub>=0.14.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (0.19.4)
Requirement already satisfied: importlib-resources<7.0,>=1.3 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (6.1.1)
Requirement already satisfied: jinja2<4.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (3.1.2)
Requirement already satisfied: markupsafe~=2.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (2.1.3)
Requirement already satisfied: matplotlib~=3.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (3.8.2)
Requirement already satisfied: numpy~=1.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (1.26.2)
Requirement already satisfied: orjson~=3.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (3.9.10)
Requirement already satisfied: packaging in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (23.2)
Requirement already satisfied: pandas<3.0,>=1.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (2.1.3)
Requirement already satisfied: pillow<11.0,>=8.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (10.1.0)
Requirement already satisfied: pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (2.5.2)
Requirement already satisfied: pydub in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (0.25.1)
Requirement already satisfied: python-multipart in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (0.0.6)
Requirement already satisfied: pyyaml<7.0,>=5.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (6.0.1)
Requirement already satisfied: requests~=2.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (2.31.0)
Requirement already satisfied: semantic-version~=2.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (2.10.0)
Requirement already satisfied: typing-extensions~=4.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (4.8.0)
Requirement already satisfied: uvicorn>=0.14.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (0.24.0.post1)
Requirement already satisfied: websockets<12.0,>=10.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio==3.48.0) (11.0.3)
Requirement already satisfied: fsspec in /home/zmack/mambaforge/lib/python3.10/site-packages (from gradio-client==0.6.1->gradio==3.48.0) (2023.12.1)
Requirement already satisfied: jsonschema>=3.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from altair<6.0,>=4.2.0->gradio==3.48.0) (4.20.0)
Requirement already satisfied: toolz in /home/zmack/mambaforge/lib/python3.10/site-packages (from altair<6.0,>=4.2.0->gradio==3.48.0) (0.12.0)
Requirement already satisfied: filelock in /home/zmack/mambaforge/lib/python3.10/site-packages (from huggingface-hub>=0.14.0->gradio==3.48.0) (3.13.1)
Requirement already satisfied: tqdm>=4.42.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from huggingface-hub>=0.14.0->gradio==3.48.0) (4.66.1)
Requirement already satisfied: contourpy>=1.0.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from matplotlib~=3.0->gradio==3.48.0) (1.2.0)
Requirement already satisfied: cycler>=0.10 in /home/zmack/mambaforge/lib/python3.10/site-packages (from matplotlib~=3.0->gradio==3.48.0) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from matplotlib~=3.0->gradio==3.48.0) (4.46.0)
Requirement already satisfied: kiwisolver>=1.3.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from matplotlib~=3.0->gradio==3.48.0) (1.4.5)
Requirement already satisfied: pyparsing>=2.3.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from matplotlib~=3.0->gradio==3.48.0) (3.1.1)
Requirement already satisfied: python-dateutil>=2.7 in /home/zmack/mambaforge/lib/python3.10/site-packages (from matplotlib~=3.0->gradio==3.48.0) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pandas<3.0,>=1.0->gradio==3.48.0) (2023.3.post1)
Requirement already satisfied: tzdata>=2022.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pandas<3.0,>=1.0->gradio==3.48.0) (2023.3)
Requirement already satisfied: annotated-types>=0.4.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4->gradio==3.48.0) (0.6.0)
Requirement already satisfied: pydantic-core==2.14.5 in /home/zmack/mambaforge/lib/python3.10/site-packages (from pydantic!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,<3.0.0,>=1.7.4->gradio==3.48.0) (2.14.5)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests~=2.0->gradio==3.48.0) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests~=2.0->gradio==3.48.0) (3.6)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests~=2.0->gradio==3.48.0) (1.26.18)
Requirement already satisfied: certifi>=2017.4.17 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests~=2.0->gradio==3.48.0) (2023.11.17)
Requirement already satisfied: click>=7.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from uvicorn>=0.14.0->gradio==3.48.0) (8.1.7)
Requirement already satisfied: h11>=0.8 in /home/zmack/mambaforge/lib/python3.10/site-packages (from uvicorn>=0.14.0->gradio==3.48.0) (0.14.0)
Requirement already satisfied: anyio<4.0.0,>=3.7.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from fastapi->gradio==3.48.0) (3.7.1)
Requirement already satisfied: starlette<0.28.0,>=0.27.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from fastapi->gradio==3.48.0) (0.27.0)
Requirement already satisfied: httpcore==1.* in /home/zmack/mambaforge/lib/python3.10/site-packages (from httpx->gradio==3.48.0) (1.0.2)
Requirement already satisfied: sniffio in /home/zmack/mambaforge/lib/python3.10/site-packages (from httpx->gradio==3.48.0) (1.3.0)
Requirement already satisfied: exceptiongroup in /home/zmack/mambaforge/lib/python3.10/site-packages (from anyio<4.0.0,>=3.7.1->fastapi->gradio==3.48.0) (1.2.0)
Requirement already satisfied: attrs>=22.2.0 in /home/zmack/mambaforge/lib/python3.10/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==3.48.0) (23.1.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /home/zmack/mambaforge/lib/python3.10/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==3.48.0) (2023.11.2)
Requirement already satisfied: referencing>=0.28.4 in /home/zmack/mambaforge/lib/python3.10/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==3.48.0) (0.31.1)
Requirement already satisfied: rpds-py>=0.7.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==3.48.0) (0.13.2)
Requirement already satisfied: six>=1.5 in /home/zmack/mambaforge/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio==3.48.0) (1.16.0)
# from pydantic import RootModel
import gradio as gr
import random
import time

def chat(message, history):
    return agent.run(message)


gr.ChatInterface(chat).launch()
Running on local URL:  http://127.0.0.1:7861

To create a public link, set `share=True` in `launch()`.
!pip install youtube-transcript-api
Collecting youtube-transcript-api
  Downloading youtube_transcript_api-0.6.1-py3-none-any.whl.metadata (14 kB)
Requirement already satisfied: requests in /home/zmack/mambaforge/lib/python3.10/site-packages (from youtube-transcript-api) (2.31.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests->youtube-transcript-api) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests->youtube-transcript-api) (3.6)
Requirement already satisfied: urllib3<3,>=1.21.1 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests->youtube-transcript-api) (1.26.18)
Requirement already satisfied: certifi>=2017.4.17 in /home/zmack/mambaforge/lib/python3.10/site-packages (from requests->youtube-transcript-api) (2023.11.17)
Downloading youtube_transcript_api-0.6.1-py3-none-any.whl (24 kB)
Installing collected packages: youtube-transcript-api
Successfully installed youtube-transcript-api-0.6.1
[{'text': "okay so let's um", 'start': 1.76, 'duration': 3.039},
 {'text': 'see', 'start': 3.679, 'duration': 2.321},
 {'text': 'how to', 'start': 4.799, 'duration': 2.56},
 {'text': 'do', 'start': 6.0, 'duration': 3.12},
 {'text': 'that paper space stuff that we did in',
  'start': 7.359,
  'duration': 3.521},
 {'text': 'the last session', 'start': 9.12, 'duration': 3.92},
 {'text': 'but from scratch like', 'start': 10.88, 'duration': 4.04},
 {'text': 'step by step', 'start': 13.04, 'duration': 4.96},
 {'text': 'um and', 'start': 14.92, 'duration': 3.08},
 {'text': 'one very reasonable comment on the forum',
  'start': 18.08,
  'duration': 4.88},
 {'text': "after yesterday's session was like",
  'start': 20.16,
  'duration': 4.64},
 {'text': 'this all seems', 'start': 22.96, 'duration': 4.159},
 {'text': 'kind of complicated um', 'start': 24.8, 'duration': 3.12},
 {'text': 'and', 'start': 27.119, 'duration': 1.841},
 {'text': 'it is', 'start': 27.92, 'duration': 3.199},
 {'text': 'um and like definitely one option is',
  'start': 28.96,
  'duration': 2.96},
 {'text': 'like', 'start': 31.119, 'duration': 3.44},
 {'text': "don't worry about it for now um but i",
  'start': 31.92,
  'duration': 5.2},
 {'text': 'would say like', 'start': 34.559, 'duration': 4.32},
 {'text': 'trying to get this working', 'start': 37.12, 'duration': 5.68},
 {'text': 'is a pretty good exercise actually um so',
  'start': 38.879,
  'duration': 5.601},
 {'text': 'you know um', 'start': 42.8, 'duration': 3.759},
 {'text': "it's totally up to you but i you know i",
  'start': 44.48,
  'duration': 5.44},
 {'text': "think it's i think it's probably worth",
  'start': 46.559,
  'duration': 6.16},
 {'text': 'worth trying to get working and', 'start': 49.92, 'duration': 5.04},
 {'text': 'ask lots of questions about anything',
  'start': 52.719,
  'duration': 4.0},
 {'text': "that you're not sure if it doesn't make",
  'start': 54.96,
  'duration': 3.84},
 {'text': "sense or it doesn't work for you or",
  'start': 56.719,
  'duration': 3.36},
 {'text': 'whatever', 'start': 58.8, 'duration': 2.88},
 {'text': 'um', 'start': 60.079, 'duration': 5.681},
 {'text': 'okay so if i say share screen', 'start': 61.68, 'duration': 4.08},
 {'text': "here we go share portion of screen i've",
  'start': 66.159,
  'duration': 3.601},
 {'text': 'never tried this before anything could',
  'start': 68.08,
  'duration': 2.8},
 {'text': 'happen', 'start': 69.76, 'duration': 3.12},
 {'text': 'share', 'start': 70.88, 'duration': 4.8},
 {'text': 'move that', 'start': 72.88, 'duration': 2.8},
 {'text': 'put it there', 'start': 76.24, 'duration': 2.96},
 {'text': 'this is called okay do you see', 'start': 83.759, 'duration': 6.0},
 {'text': 'my browser window', 'start': 86.88, 'duration': 2.879},
 {'text': "yes yes all right okay i'm successfully",
  'start': 90.72,
  'duration': 4.8},
 {'text': 'sharing a portion of the screen', 'start': 93.28, 'duration': 4.64},
 {'text': 'um', 'start': 95.52, 'duration': 2.4},
 {'text': 'paper space', 'start': 98.159, 'duration': 5.441},
 {'text': 'so what i did this morning was i just',
  'start': 101.28,
  'duration': 4.64},
 {'text': 'went in and moved all of my paper space',
  'start': 103.6,
  'duration': 3.92},
 {'text': 'set up and persistent storage out of the',
  'start': 105.92,
  'duration': 3.92},
 {'text': 'way so that when i create', 'start': 107.52, 'duration': 4.959},
 {'text': "a notebook um it's going to be totally",
  'start': 109.84,
  'duration': 5.639},
 {'text': 'empty', 'start': 112.479, 'duration': 3.0},
 {'text': "so let's create a notebook", 'start': 117.28, 'duration': 3.879},
 {'text': 'how did you move it out of the way',
  'start': 128.319,
  'duration': 4.081},
 {'text': 'remember using the advanced options',
  'start': 129.84,
  'duration': 3.28},
 {'text': 'i', 'start': 132.4, 'duration': 2.559},
 {'text': 'i know i mean i just like i went into',
  'start': 133.12,
  'duration': 5.6},
 {'text': 'slash storage and moved the files',
  'start': 134.959,
  'duration': 5.841},
 {'text': 'renamed them to give them a like.bak',
  'start': 138.72,
  'duration': 3.28},
 {'text': "extension or whatever so they wouldn't",
  'start': 140.8,
  'duration': 2.64},
 {'text': 'be run and', 'start': 142.0, 'duration': 3.2},
 {'text': 'moved everything into a different order',
  'start': 143.44,
  'duration': 3.2},
 {'text': "that's all", 'start': 145.2, 'duration': 3.28},
 {'text': 'so yeah the setup that we would always',
  'start': 146.64,
  'duration': 4.56},
 {'text': "see right that's the idea yeah exactly",
  'start': 148.48,
  'duration': 3.839},
 {'text': 'this should look like what you should',
  'start': 151.2,
  'duration': 2.64},
 {'text': "all see so i'm going to delete the",
  'start': 152.319,
  'duration': 3.361},
 {'text': 'workspace url so we have something',
  'start': 153.84,
  'duration': 4.88},
 {'text': "totally empty which i think's", 'start': 155.68, 'duration': 6.24},
 {'text': 'actually probably best', 'start': 158.72, 'duration': 3.2},
 {'text': 'right and yeah so follow along',
  'start': 165.599,
  'duration': 6.241},
 {'text': "if you want um and if anything doesn't",
  'start': 168.8,
  'duration': 4.64},
 {'text': 'work', 'start': 171.84, 'duration': 3.679},
 {'text': 'for you let me know', 'start': 173.44, 'duration': 3.36},
 {'text': 'um', 'start': 175.519, 'duration': 3.201},
 {'text': 'and then what i thought we would do is',
  'start': 176.8,
  'duration': 4.32},
 {'text': 'um i like', 'start': 178.72, 'duration': 3.68},
 {'text': 'to learn', 'start': 181.12, 'duration': 4.56},
 {'text': "as few things as possible um because i'm",
  'start': 182.4,
  'duration': 5.759},
 {'text': 'lazy and so the way to get away with',
  'start': 185.68,
  'duration': 4.32},
 {'text': 'being lazy and learning as few things as',
  'start': 188.159,
  'duration': 2.881},
 {'text': 'possible', 'start': 190.0, 'duration': 1.82},
 {'text': 'is to', 'start': 191.04, 'duration': 2.08},
 {'text': '[Music]', 'start': 191.82, 'duration': 4.26},
 {'text': 'learn things which are really versatile',
  'start': 193.12,
  'duration': 5.119},
 {'text': 'and powerful so that they can like do a',
  'start': 196.08,
  'duration': 3.28},
 {'text': 'lot of things', 'start': 198.239, 'duration': 3.441},
 {'text': 'so in particular', 'start': 199.36, 'duration': 4.0},
 {'text': 'i', 'start': 201.68, 'duration': 3.6},
 {'text': "haven't really spent the time to learn",
  'start': 203.36,
  'duration': 3.84},
 {'text': 'bash scripting very well', 'start': 205.28, 'duration': 4.16},
 {'text': 'um i know it a little bit', 'start': 207.2, 'duration': 3.599},
 {'text': 'because i', 'start': 209.44, 'duration': 3.12},
 {'text': 'have instead spent the time to learn to',
  'start': 210.799,
  'duration': 3.281},
 {'text': 'use python', 'start': 212.56, 'duration': 3.759},
 {'text': 'as an effective scripting language and i',
  'start': 214.08,
  'duration': 4.0},
 {'text': 'can also use python for machine learning',
  'start': 216.319,
  'duration': 4.321},
 {'text': 'i can also use python for creating web',
  'start': 218.08,
  'duration': 3.84},
 {'text': 'services', 'start': 220.64, 'duration': 4.319},
 {'text': 'i can also use', 'start': 221.92, 'duration': 5.76},
 {'text': 'python for creating console applications',
  'start': 224.959,
  'duration': 5.041},
 {'text': 'i could you know use python for creating',
  'start': 227.68,
  'duration': 4.479},
 {'text': 'continuous integration scripts et cetera',
  'start': 230.0,
  'duration': 4.48},
 {'text': 'so that way i can be lazy and i like',
  'start': 232.159,
  'duration': 3.681},
 {'text': 'being lazy', 'start': 234.48, 'duration': 2.72},
 {'text': "it's one of", 'start': 235.84, 'duration': 3.44},
 {'text': "larry wall's three virtues of a great",
  'start': 237.2,
  'duration': 4.239},
 {'text': 'programmer is laziness along with',
  'start': 239.28,
  'duration': 5.039},
 {'text': 'impatience and hubris', 'start': 241.439, 'duration': 4.0},
 {'text': 'and i would like to be a great',
  'start': 244.319,
  'duration': 3.84},
 {'text': 'programmer so i follow those principles',
  'start': 245.439,
  'duration': 3.681},
 {'text': 'um', 'start': 248.159, 'duration': 4.401},
 {'text': "so let's try to use python to to kind of",
  'start': 249.12,
  'duration': 5.679},
 {'text': 'automate the things we want to do',
  'start': 252.56,
  'duration': 4.079},
 {'text': 'so remember that um', 'start': 254.799, 'duration': 5.041},
 {'text': "i you know we're going to avoid using",
  'start': 256.639,
  'duration': 5.601},
 {'text': "the weird proprietary gui because we're",
  'start': 259.84,
  'duration': 4.24},
 {'text': "lazy we don't want to learn it and also",
  'start': 262.24,
  'duration': 3.44},
 {'text': "because it's not that good so i'm just",
  'start': 264.08,
  'duration': 5.72},
 {'text': 'going to um', 'start': 265.68, 'duration': 4.12},
 {'text': 'open up a second tab', 'start': 271.28, 'duration': 5.12},
 {'text': "um and so over here i'll click jupyter",
  'start': 274.08,
  'duration': 4.559},
 {'text': 'lab', 'start': 276.4, 'duration': 2.239},
 {'text': "and so what we should find is that we're",
  'start': 278.72,
  'duration': 6.08},
 {'text': 'in a totally empty', 'start': 281.12, 'duration': 6.0},
 {'text': 'spot here we go', 'start': 284.8, 'duration': 4.56},
 {'text': 'so um this morning i did do some reading',
  'start': 287.12,
  'duration': 4.16},
 {'text': 'of documentation which is also a great',
  'start': 289.36,
  'duration': 3.44},
 {'text': "thing to do if you're lazy because if",
  'start': 291.28,
  'duration': 3.76},
 {'text': 'you read documentation then you can like',
  'start': 292.8,
  'duration': 3.92},
 {'text': 'find out straight away how things work',
  'start': 295.04,
  'duration': 3.04},
 {'text': 'rather than spending ages trying to',
  'start': 296.72,
  'duration': 3.12},
 {'text': 'figure it out and so the documentation',
  'start': 298.08,
  'duration': 3.92},
 {'text': 'for paper space', 'start': 299.84, 'duration': 4.4},
 {'text': 'was actually very useful', 'start': 302.0, 'duration': 4.8},
 {'text': 'and it', 'start': 304.24, 'duration': 2.56},
 {'text': 'it explained how their different folders',
  'start': 307.759,
  'duration': 6.241},
 {'text': 'work exactly', 'start': 311.199, 'duration': 4.881},
 {'text': 'so', 'start': 314.0, 'duration': 4.639},
 {'text': 'in the root directory', 'start': 316.08, 'duration': 4.16},
 {'text': 'this would probably be a bit bigger i',
  'start': 318.639,
  'duration': 3.84},
 {'text': 'think', 'start': 320.24, 'duration': 2.239},
 {'text': 'there we go', 'start': 323.36, 'duration': 3.76},
 {'text': 'um actually i think if i go view',
  'start': 324.96,
  'duration': 4.4},
 {'text': 'presentation mode or something it makes',
  'start': 327.12,
  'duration': 4.4},
 {'text': 'it a bit bigger anyway', 'start': 329.36, 'duration': 5.2},
 {'text': "that didn't do anything at all",
  'start': 331.52,
  'duration': 5.679},
 {'text': "okay um in the root directory there's a",
  'start': 334.56,
  'duration': 4.4},
 {'text': 'couple of particularly interesting',
  'start': 337.199,
  'duration': 3.84},
 {'text': 'folders most of the folders you see here',
  'start': 338.96,
  'duration': 3.44},
 {'text': "are the same that you'd find in any",
  'start': 341.039,
  'duration': 4.081},
 {'text': 'linux box but the notebooks and storage',
  'start': 342.4,
  'duration': 4.799},
 {'text': 'folders are interesting and one of the',
  'start': 345.12,
  'duration': 3.76},
 {'text': "ways we know they're interesting is if i",
  'start': 347.199,
  'duration': 3.84},
 {'text': 'go df minus h which you might remember',
  'start': 348.88,
  'duration': 4.4},
 {'text': 'is disk free it lists all the mounted',
  'start': 351.039,
  'duration': 5.28},
 {'text': 'disks uh in human form', 'start': 353.28, 'duration': 5.28},
 {'text': 'um', 'start': 356.319, 'duration': 2.241},
 {'text': "it's made it way too wide so we can't",
  'start': 358.639,
  'duration': 4.241},
 {'text': 'really read it yeah never mind',
  'start': 360.639,
  'duration': 5.241},
 {'text': 'um', 'start': 362.88, 'duration': 3.0},
 {'text': 'okay i make it smaller just for the',
  'start': 366.16,
  'duration': 4.0},
 {'text': 'purpose of showing this um', 'start': 367.68, 'duration': 3.519},
 {'text': 'so the', 'start': 370.16, 'duration': 3.28},
 {'text': 'uh', 'start': 371.199, 'duration': 2.241},
 {'text': 'slash notebooks is actually on a whole',
  'start': 373.68,
  'duration': 5.28},
 {'text': 'separate 500 gigabyte disk and', 'start': 375.84, 'duration': 4.96},
 {'text': 'storage is on a whole separate 500',
  'start': 378.96,
  'duration': 3.359},
 {'text': 'gigabyte disk', 'start': 380.8, 'duration': 2.72},
 {'text': 'um', 'start': 382.319, 'duration': 4.16},
 {'text': 'the uh so what paper space does is slash',
  'start': 383.52,
  'duration': 4.64},
 {'text': 'storage', 'start': 386.479, 'duration': 4.0},
 {'text': 'anything i put in there', 'start': 388.16, 'duration': 4.96},
 {'text': 'is going to be seen by every single',
  'start': 390.479,
  'duration': 5.201},
 {'text': 'notebook server i create and in fact if',
  'start': 393.12,
  'duration': 3.6},
 {'text': "you've got i think if you've got like",
  'start': 395.68,
  'duration': 2.72},
 {'text': 'multiple people in the organization they',
  'start': 396.72,
  'duration': 3.919},
 {'text': 'might see the same thing as well um so',
  'start': 398.4,
  'duration': 4.16},
 {'text': "that's going to be shared", 'start': 400.639, 'duration': 4.241},
 {'text': 'across um yeah all in any notebook',
  'start': 402.56,
  'duration': 5.04},
 {'text': "server i create that's um", 'start': 404.88, 'duration': 3.759},
 {'text': "that's going to be handy because",
  'start': 407.6,
  'duration': 2.56},
 {'text': 'anything i want to use on every one of',
  'start': 408.639,
  'duration': 3.84},
 {'text': 'my servers if i put it in there then i',
  'start': 410.16,
  'duration': 3.599},
 {'text': "don't have you know i don't have to",
  'start': 412.479,
  'duration': 2.641},
 {'text': 'worry about', 'start': 413.759, 'duration': 4.081},
 {'text': 'recreating it each time', 'start': 415.12, 'duration': 4.24},
 {'text': "something we didn't mention last time is",
  'start': 417.84,
  'duration': 4.24},
 {'text': "slash notebooks is interesting that's",
  'start': 419.36,
  'duration': 4.88},
 {'text': "also persistent storage but it's",
  'start': 422.08,
  'duration': 5.6},
 {'text': 'persistent storage just for this one',
  'start': 424.24,
  'duration': 4.88},
 {'text': 'server', 'start': 427.68, 'duration': 3.359},
 {'text': "so stuff that's in there", 'start': 429.12, 'duration': 4.32},
 {'text': 'we will see every time we start up this',
  'start': 431.039,
  'duration': 4.401},
 {'text': "server if we delete this server it's",
  'start': 433.44,
  'duration': 4.4},
 {'text': "it's gone unless we back it up", 'start': 435.44, 'duration': 3.28},
 {'text': 'um', 'start': 437.84, 'duration': 2.479},
 {'text': "so that's where we would put things that",
  'start': 438.72,
  'duration': 3.44},
 {'text': "we don't want on every server but just",
  'start': 440.319,
  'duration': 4.16},
 {'text': 'on just on this one', 'start': 442.16, 'duration': 3.92},
 {'text': 'um', 'start': 444.479, 'duration': 4.0},
 {'text': 'you pay for storage', 'start': 446.08, 'duration': 3.28},
 {'text': 'um', 'start': 448.479, 'duration': 3.201},
 {'text': "and you pay i think it's like 30 cents a",
  'start': 449.36,
  'duration': 4.0},
 {'text': 'gigabyte or something like that per',
  'start': 451.68,
  'duration': 3.44},
 {'text': 'month um', 'start': 453.36, 'duration': 3.6},
 {'text': "and they don't", 'start': 455.12, 'duration': 3.84},
 {'text': 'limit you you know except for the 500',
  'start': 456.96,
  'duration': 3.44},
 {'text': "gig limit so it's up to you to be",
  'start': 458.96,
  'duration': 3.2},
 {'text': 'careful of that', 'start': 460.4, 'duration': 5.28},
 {'text': "you will find in your account there's a",
  'start': 462.16,
  'duration': 4.96},
 {'text': 'section called billing that shows you',
  'start': 465.68,
  'duration': 4.56},
 {'text': "how much storage you're using", 'start': 467.12, 'duration': 3.12},
 {'text': 'so they will add up', 'start': 470.479, 'duration': 4.641},
 {'text': 'stuff in storage that just appears once',
  'start': 472.72,
  'duration': 4.08},
 {'text': 'and every single one of your notebook',
  'start': 475.12,
  'duration': 3.6},
 {'text': "servers slash notebooks that'll all be",
  'start': 476.8,
  'duration': 4.32},
 {'text': 'added together', 'start': 478.72, 'duration': 3.199},
 {'text': 'okay', 'start': 481.12, 'duration': 2.16},
 {'text': 'um', 'start': 481.919, 'duration': 3.12},
 {'text': 'so the first thing', 'start': 483.28, 'duration': 4.8},
 {'text': 'we did last time', 'start': 485.039, 'duration': 4.401},
 {'text': 'was we', 'start': 488.08, 'duration': 4.399},
 {'text': 'tried installing something extra from',
  'start': 489.44,
  'duration': 5.039},
 {'text': 'pip', 'start': 492.479, 'duration': 3.84},
 {'text': 'so one conversation that we had on the',
  'start': 494.479,
  'duration': 4.72},
 {'text': 'forum since then is like', 'start': 496.319, 'duration': 4.641},
 {'text': "are you sure that's not going to mess me",
  'start': 499.199,
  'duration': 4.56},
 {'text': 'up because', 'start': 500.96, 'duration': 2.799},
 {'text': 'you know paper space has installed stuff',
  'start': 505.28,
  'duration': 4.24},
 {'text': 'i believe using conda', 'start': 507.199, 'duration': 4.72},
 {'text': 'and pip and condor', 'start': 509.52, 'duration': 5.199},
 {'text': 'different things for installing',
  'start': 511.919,
  'duration': 5.201},
 {'text': 'python libraries', 'start': 514.719, 'duration': 3.841},
 {'text': 'um', 'start': 517.12, 'duration': 3.2},
 {'text': 'so you know is that going to mess things',
  'start': 518.56,
  'duration': 3.52},
 {'text': 'up and the the', 'start': 520.32, 'duration': 3.839},
 {'text': 'official answer is', 'start': 522.08, 'duration': 4.319},
 {'text': "yes it will don't do it um but the",
  'start': 524.159,
  'duration': 4.24},
 {'text': 'unofficial answer is', 'start': 526.399, 'duration': 3.681},
 {'text': "you know we've got tens of thousands of",
  'start': 528.399,
  'duration': 3.921},
 {'text': "people on our forums and i've never",
  'start': 530.08,
  'duration': 4.16},
 {'text': 'heard of anybody in practice actually',
  'start': 532.32,
  'duration': 4.72},
 {'text': 'having any problem with using both pip',
  'start': 534.24,
  'duration': 5.52},
 {'text': 'and conda slash member', 'start': 537.04, 'duration': 4.0},
 {'text': "so i'm just going to say don't worry",
  'start': 539.76,
  'duration': 3.68},
 {'text': 'about it', 'start': 541.04, 'duration': 2.4},
 {'text': 'as we said yesterday i think the only',
  'start': 544.8,
  'duration': 4.24},
 {'text': 'the place you really need to use conjure',
  'start': 547.44,
  'duration': 4.32},
 {'text': 'or mambo is is for stuff that uses the',
  'start': 549.04,
  'duration': 4.0},
 {'text': 'gpu', 'start': 551.76, 'duration': 4.16},
 {'text': 'um and particularly for pytorch or if',
  'start': 553.04,
  'duration': 4.96},
 {'text': 'heaven forbid you have to use tensorflow',
  'start': 555.92,
  'duration': 5.08},
 {'text': 'um', 'start': 558.0, 'duration': 3.0},
 {'text': "yeah so i'm going to say don't worry",
  'start': 562.24,
  'duration': 3.76},
 {'text': 'about it and and the reason we', 'start': 563.76, 'duration': 4.48},
 {'text': 'um we actually want to use pip in this',
  'start': 566.0,
  'duration': 4.88},
 {'text': 'particular case is we want to be able to',
  'start': 568.24,
  'duration': 3.92},
 {'text': 'install', 'start': 570.88, 'duration': 3.12},
 {'text': 'the packages into a', 'start': 572.16, 'duration': 4.0},
 {'text': 'into our home directory into a different',
  'start': 574.0,
  'duration': 3.2},
 {'text': 'place', 'start': 576.16, 'duration': 3.52},
 {'text': 'um', 'start': 577.2, 'duration': 2.48},
 {'text': 'yeah the reason the reason we want to',
  'start': 580.72,
  'duration': 3.2},
 {'text': 'use', 'start': 582.959, 'duration': 3.201},
 {'text': 'mamba or conda for stuff that requires',
  'start': 583.92,
  'duration': 3.44},
 {'text': 'the gpu', 'start': 586.16, 'duration': 2.32},
 {'text': 'is that', 'start': 587.36, 'duration': 3.44},
 {'text': 'they have a way of installing', 'start': 588.48, 'duration': 5.2},
 {'text': 'dependencies right like uh', 'start': 590.8, 'duration': 5.12},
 {'text': 'they have a way of installing the uh the',
  'start': 593.68,
  'duration': 4.56},
 {'text': "cuda toolkit requirements so we don't",
  'start': 595.92,
  'duration': 5.44},
 {'text': "have to install the cuda sdk um it's",
  'start': 598.24,
  'duration': 6.32},
 {'text': "basically the reason and that's um",
  'start': 601.36,
  'duration': 4.96},
 {'text': 'and and', 'start': 604.56, 'duration': 3.44},
 {'text': "it's not just like one less thing to",
  'start': 606.32,
  'duration': 4.32},
 {'text': "install but more importantly it's",
  'start': 608.0,
  'duration': 4.8},
 {'text': 'one less thing to maintain like you',
  'start': 610.64,
  'duration': 3.439},
 {'text': "don't like", 'start': 612.8, 'duration': 3.2},
 {'text': 'your cuda version and your pie torch',
  'start': 614.079,
  'duration': 3.76},
 {'text': 'version have to the mesh correctly',
  'start': 616.0,
  'duration': 3.76},
 {'text': "otherwise it'll break and if you just",
  'start': 617.839,
  'duration': 4.401},
 {'text': 'use conda that happens automatically but',
  'start': 619.76,
  'duration': 5.04},
 {'text': "if you use pip then it's up to you to",
  'start': 622.24,
  'duration': 4.96},
 {'text': "make sure you're installing the correct",
  'start': 624.8,
  'duration': 4.96},
 {'text': 'meshing versions of each things', 'start': 627.2, 'duration': 4.24},
 {'text': "it's also more challenging in a",
  'start': 629.76,
  'duration': 4.079},
 {'text': 'something like paper space because',
  'start': 631.44,
  'duration': 4.56},
 {'text': 'you know installing things like',
  'start': 633.839,
  'duration': 6.161},
 {'text': 'the cuda sdk into your home directory is',
  'start': 636.0,
  'duration': 5.839},
 {'text': "i don't even know how you would do it",
  'start': 640.0,
  'duration': 4.72},
 {'text': 'without using conda frankly', 'start': 641.839, 'duration': 4.161},
 {'text': 'yeah does that answer your question',
  'start': 644.72,
  'duration': 2.4},
 {'text': 'ready', 'start': 646.0, 'duration': 3.279},
 {'text': 'yes thank you very much okay', 'start': 647.12, 'duration': 3.44},
 {'text': 'great', 'start': 649.279, 'duration': 3.601},
 {'text': 'um', 'start': 650.56, 'duration': 2.32},
 {'text': "so somebody's got a loud clicky keyboard",
  'start': 653.519,
  'duration': 6.121},
 {'text': 'they should probably mute themselves',
  'start': 655.68,
  'duration': 3.96},
 {'text': 'yes', 'start': 662.24, 'duration': 2.32},
 {'text': 'hi', 'start': 665.04, 'duration': 2.16},
 {'text': 'if', 'start': 666.16, 'duration': 3.25},
 {'text': 'if the pip installation', 'start': 667.2, 'duration': 4.639},
 {'text': '[Music]', 'start': 669.41, 'duration': 3.47},
 {'text': 'do', 'start': 671.839, 'duration': 2.021},
 {'text': 'something wrong', 'start': 672.88, 'duration': 3.519},
 {'text': '[Music]', 'start': 673.86, 'duration': 3.82},
 {'text': 'can i', 'start': 676.399, 'duration': 3.041},
 {'text': 'uninstall or', 'start': 677.68, 'duration': 3.52},
 {'text': 'get to', 'start': 679.44, 'duration': 4.0},
 {'text': 'a previous state', 'start': 681.2, 'duration': 4.24},
 {'text': 'yeah i mean kind of you can always just',
  'start': 683.44,
  'duration': 5.56},
 {'text': 'type pip uninstall', 'start': 685.44, 'duration': 3.56},
 {'text': 'or just', 'start': 689.36, 'duration': 3.44},
 {'text': 'delete your', 'start': 690.48, 'duration': 5.52},
 {'text': 'member forge directory and start again',
  'start': 692.8,
  'duration': 4.24},
 {'text': 'um', 'start': 696.0, 'duration': 3.6},
 {'text': 'but you know people always like',
  'start': 697.04,
  'duration': 3.76},
 {'text': 'i mean', 'start': 699.6, 'duration': 3.12},
 {'text': 'or you can just you know install a conda',
  'start': 700.8,
  'duration': 3.68},
 {'text': 'package over the top of it like it',
  'start': 702.72,
  'duration': 3.04},
 {'text': "shouldn't", 'start': 704.48, 'duration': 3.84},
 {'text': 'really be an issue generally speaking',
  'start': 705.76,
  'duration': 4.48},
 {'text': 'um the issue tends to be more if you',
  'start': 708.32,
  'duration': 3.44},
 {'text': 'accidentally install something into your',
  'start': 710.24,
  'duration': 3.2},
 {'text': 'system python', 'start': 711.76, 'duration': 3.12},
 {'text': 'um', 'start': 713.44, 'duration': 3.6},
 {'text': 'yeah but the idea is that you want to',
  'start': 714.88,
  'duration': 3.84},
 {'text': 'feel like you can', 'start': 717.04, 'duration': 3.76},
 {'text': 'blow away your member forge', 'start': 718.72, 'duration': 3.84},
 {'text': 'or mini condor or whatever directory any',
  'start': 720.8,
  'duration': 3.52},
 {'text': 'time and recreate it', 'start': 722.56, 'duration': 4.0},
 {'text': 'um', 'start': 724.32, 'duration': 3.6},
 {'text': "yeah because you don't want to be in a",
  'start': 726.56,
  'duration': 4.0},
 {'text': 'situation where', 'start': 727.92, 'duration': 4.479},
 {'text': "things work but you don't know why they",
  'start': 730.56,
  'duration': 3.2},
 {'text': "work you don't know if you can get them",
  'start': 732.399,
  'duration': 3.601},
 {'text': "back to a working state again that's",
  'start': 733.76,
  'duration': 5.36},
 {'text': 'really unsustainable', 'start': 736.0, 'duration': 3.12},
 {'text': 'um but yeah the short answer is you can',
  'start': 739.36,
  'duration': 3.479},
 {'text': 'just type uninstall to', 'start': 740.8, 'duration': 4.88},
 {'text': 'remove module', 'start': 742.839, 'duration': 5.401},
 {'text': 'thank you what about when when it says',
  'start': 745.68,
  'duration': 4.0},
 {'text': 'that', 'start': 748.24, 'duration': 6.88},
 {'text': 'some packages are going to be downgraded',
  'start': 749.68,
  'duration': 5.44},
 {'text': "that's okay", 'start': 755.36, 'duration': 3.599},
 {'text': "yeah that's okay if it's gonna downgrade",
  'start': 756.8,
  'duration': 3.92},
 {'text': "packages i mean i did i'd kind of check",
  'start': 758.959,
  'duration': 3.201},
 {'text': "how much it's been downgraded but",
  'start': 760.72,
  'duration': 4.559},
 {'text': "sometimes it'll be like one or two",
  'start': 762.16,
  'duration': 4.32},
 {'text': 'you know', 'start': 765.279, 'duration': 4.36},
 {'text': 'you know 0.02', 'start': 766.48, 'duration': 5.12},
 {'text': '0.0.02 difference in version or',
  'start': 769.639,
  'duration': 3.241},
 {'text': "something it's not going to matter i",
  'start': 771.6,
  'duration': 2.56},
 {'text': "mean if it's", 'start': 772.88, 'duration': 3.199},
 {'text': 'downloading or downgrading it by a lot',
  'start': 774.16,
  'duration': 2.72},
 {'text': 'that', 'start': 776.079, 'duration': 2.401},
 {'text': 'might mean that something wrong is',
  'start': 776.88,
  'duration': 4.0},
 {'text': 'happening', 'start': 778.48, 'duration': 2.4},
 {'text': "but yeah that's not necessarily a",
  'start': 781.279,
  'duration': 5.0},
 {'text': 'problem', 'start': 783.279, 'duration': 3.0},
 {'text': 'uh okay so', 'start': 786.639, 'duration': 4.32},
 {'text': 'and i think like', 'start': 788.88, 'duration': 5.36},
 {'text': 'people almost never downgrades things',
  'start': 790.959,
  'duration': 6.32},
 {'text': 'conda does sometimes', 'start': 794.24, 'duration': 3.039},
 {'text': "so let's try um", 'start': 798.88, 'duration': 2.88},
 {'text': 'so', 'start': 800.88, 'duration': 2.8},
 {'text': 'the thing we learned yesterday is we can',
  'start': 801.76,
  'duration': 3.84},
 {'text': 'go pip install and if you want to',
  'start': 803.68,
  'duration': 4.399},
 {'text': "upgrade something it's minus you",
  'start': 805.6,
  'duration': 3.84},
 {'text': 'and there was this one extra thing we',
  'start': 808.079,
  'duration': 4.481},
 {'text': 'typed which was minus minus user',
  'start': 809.44,
  'duration': 5.839},
 {'text': 'and so', 'start': 812.56, 'duration': 4.64},
 {'text': 'so the key thing that does is it puts it',
  'start': 815.279,
  'duration': 5.12},
 {'text': 'into our home directory', 'start': 817.2, 'duration': 3.199},
 {'text': 'and so', 'start': 821.199, 'duration': 4.0},
 {'text': 'in our home directory', 'start': 823.199, 'duration': 4.481},
 {'text': 'the place it put it', 'start': 825.199, 'duration': 4.88},
 {'text': 'is the', 'start': 827.68, 'duration': 5.12},
 {'text': 'dot local', 'start': 830.079, 'duration': 2.721},
 {'text': 'folder', 'start': 833.04, 'duration': 4.08},
 {'text': 'um so what the so the thing we wanted to',
  'start': 835.199,
  'duration': 3.76},
 {'text': 'do was to make sure that the next time',
  'start': 837.12,
  'duration': 3.68},
 {'text': 'we start up', 'start': 838.959, 'duration': 5.521},
 {'text': 'our computer we want that', 'start': 840.8, 'duration': 6.96},
 {'text': 'that dot local um', 'start': 844.48, 'duration': 5.359},
 {'text': 'to be there', 'start': 847.76, 'duration': 3.199},
 {'text': 'um', 'start': 849.839, 'duration': 3.041},
 {'text': 'so that means we have to move it to',
  'start': 850.959,
  'duration': 4.24},
 {'text': "persistent storage so that's easy enough",
  'start': 852.88,
  'duration': 5.759},
 {'text': 'to do by using move so we can move it',
  'start': 855.199,
  'duration': 5.041},
 {'text': 'into our', 'start': 858.639, 'duration': 4.64},
 {'text': 'persistent storage', 'start': 860.24, 'duration': 3.039},
 {'text': 'and you know what i would be inclined to',
  'start': 864.16,
  'duration': 4.479},
 {'text': 'do actually is', 'start': 865.519, 'duration': 3.12},
 {'text': 'to create a folder in there just for the',
  'start': 868.72,
  'duration': 3.44},
 {'text': "stuff that we're", 'start': 870.72, 'duration': 2.88},
 {'text': 'where you the things in storage that',
  'start': 872.16,
  'duration': 2.72},
 {'text': "we're using specifically for like",
  'start': 873.6,
  'duration': 3.679},
 {'text': 'configuration like this so um i was just',
  'start': 874.88,
  'duration': 3.519},
 {'text': 'about to delete this line when i',
  'start': 877.279,
  'duration': 2.8},
 {'text': "realized i haven't taught you folks how",
  'start': 878.399,
  'duration': 4.721},
 {'text': 'to delete lines yet so to delete the um',
  'start': 880.079,
  'duration': 5.041},
 {'text': "everything left of the cursor it's ctrl",
  'start': 883.12,
  'duration': 2.88},
 {'text': 'u', 'start': 885.12, 'duration': 2.24},
 {'text': 'and to delete everything right of the',
  'start': 886.0,
  'duration': 4.959},
 {'text': "cursor it's ctrl k so i'll hit ctrl u",
  'start': 887.36,
  'duration': 5.039},
 {'text': 'um', 'start': 890.959, 'duration': 3.761},
 {'text': "and so let's create a directory for this",
  'start': 892.399,
  'duration': 6.68},
 {'text': "so we'll go make a directory", 'start': 894.72, 'duration': 4.359},
 {'text': "in slash storage which we'll call like i",
  'start': 899.44,
  'duration': 3.199},
 {'text': "don't know", 'start': 901.839, 'duration': 3.281},
 {'text': 'cfg for our configuration stuff',
  'start': 902.639,
  'duration': 6.161},
 {'text': "okay and so then we'll make a sim link",
  'start': 905.12,
  'duration': 3.68},
 {'text': "from oh so then we're gonna move okay so",
  'start': 909.199,
  'duration': 4.241},
 {'text': "we're going to move our dot local folder",
  'start': 911.6,
  'duration': 2.799},
 {'text': 'into there', 'start': 913.44, 'duration': 2.639},
 {'text': 'now do you remember', 'start': 914.399, 'duration': 3.44},
 {'text': 'the way to say', 'start': 916.079, 'duration': 5.601},
 {'text': 'the last thing i typed on the last line',
  'start': 917.839,
  'duration': 7.721},
 {'text': 'is um', 'start': 921.68, 'duration': 3.88},
 {'text': 'is exclamation mark dollar so i can say',
  'start': 928.399,
  'duration': 6.321},
 {'text': 'move dot local to slash storage config',
  'start': 931.04,
  'duration': 6.56},
 {'text': 'by doing move.local and then exclamation',
  'start': 934.72,
  'duration': 4.72},
 {'text': "mark dollar and you can see it's",
  'start': 937.6,
  'duration': 5.76},
 {'text': "filtered out here to show me so that's a",
  'start': 939.44,
  'duration': 5.199},
 {'text': 'quick shortcut', 'start': 943.36, 'duration': 4.88},
 {'text': 'and then so i want to sim link',
  'start': 944.639,
  'duration': 3.601},
 {'text': 'that back again into this directory so',
  'start': 948.959,
  'duration': 4.88},
 {'text': 'create a sim link from', 'start': 951.44, 'duration': 4.16},
 {'text': 'storage', 'start': 953.839, 'duration': 4.401},
 {'text': 'config', 'start': 955.6, 'duration': 4.56},
 {'text': 'dot local', 'start': 958.24, 'duration': 4.48},
 {'text': 'to here and here is the default right so',
  'start': 960.16,
  'duration': 5.679},
 {'text': "i don't have to say to here", 'start': 962.72, 'duration': 4.239},
 {'text': "and so you can see we've now got",
  'start': 965.839,
  'duration': 4.24},
 {'text': 'something called.local', 'start': 966.959, 'duration': 5.521},
 {'text': "and it's not a real normal folder it's",
  'start': 970.079,
  'duration': 5.041},
 {'text': 'just a pointer to this other place but',
  'start': 972.48,
  'duration': 6.08},
 {'text': 'it acts like a normal folder', 'start': 975.12, 'duration': 3.44},
 {'text': 'as you can see', 'start': 980.16, 'duration': 3.84},
 {'text': 'and so that should mean', 'start': 981.44, 'duration': 7.12},
 {'text': 'that i can import fast core', 'start': 984.0, 'duration': 4.56},
 {'text': 'and', 'start': 988.88, 'duration': 2.319},
 {'text': 'get fast core', 'start': 993.36, 'duration': 4.08},
 {'text': 'dot', 'start': 996.48, 'duration': 2.08},
 {'text': 'version', 'start': 997.44, 'duration': 3.519},
 {'text': 'should be', 'start': 998.56, 'duration': 2.399},
 {'text': '143', 'start': 1001.839, 'duration': 6.24},
 {'text': 'control d twice to exit okay', 'start': 1004.079, 'duration': 6.56},
 {'text': 'everybody happy with that so far',
  'start': 1008.079,
  'duration': 4.961},
 {'text': 'uh jeremy i had a doubt so which part',
  'start': 1010.639,
  'duration': 5.12},
 {'text': 'where was the dot local actually there',
  'start': 1013.04,
  'duration': 5.28},
 {'text': 'like uh in which folder was', 'start': 1015.759, 'duration': 5.361},
 {'text': 'so the dot local is in my home directory',
  'start': 1018.32,
  'duration': 6.479},
 {'text': 'and so see how here i typed cd so cd',
  'start': 1021.12,
  'duration': 5.12},
 {'text': 'takes you back to your home directory',
  'start': 1024.799,
  'duration': 3.681},
 {'text': "and you can tell where i am because it's",
  'start': 1026.24,
  'duration': 4.4},
 {'text': 'the bit before the pound sign and tilde',
  'start': 1028.48,
  'duration': 5.92},
 {'text': 'means in my home directory', 'start': 1030.64, 'duration': 3.76},
 {'text': 'basically everything it creates for like',
  'start': 1034.64,
  'duration': 3.199},
 {'text': 'kind of your configuration will be',
  'start': 1036.319,
  'duration': 4.88},
 {'text': 'somewhere in your home directory',
  'start': 1037.839,
  'duration': 4.96},
 {'text': "on that um what we're talking about",
  'start': 1041.199,
  'duration': 4.161},
 {'text': 'jeremy i noticed that when', 'start': 1042.799, 'duration': 6.481},
 {'text': 'doing cd backslash cd space backslash i',
  'start': 1045.36,
  'duration': 6.4},
 {'text': 'probably mean cd space forward slash',
  'start': 1049.28,
  'duration': 3.759},
 {'text': 'forward slash', 'start': 1051.76, 'duration': 2.56},
 {'text': 'yeah that one', 'start': 1053.039, 'duration': 2.401},
 {'text': 'um', 'start': 1054.32, 'duration': 3.28},
 {'text': 'that went to a different place to the',
  'start': 1055.44,
  'duration': 4.8},
 {'text': 'home wave goes cd', 'start': 1057.6, 'duration': 4.16},
 {'text': 'space tilter', 'start': 1060.24, 'duration': 2.96},
 {'text': 'yeah so cd', 'start': 1061.76, 'duration': 3.6},
 {'text': 'space slash takes you to the root',
  'start': 1063.2,
  'duration': 4.24},
 {'text': 'directory', 'start': 1065.36, 'duration': 4.8},
 {'text': "okay so that's the top level where else",
  'start': 1067.44,
  'duration': 5.599},
 {'text': 'cd enter or cd tilde same thing takes',
  'start': 1070.16,
  'duration': 5.519},
 {'text': 'you to your home directory so',
  'start': 1073.039,
  'duration': 5.601},
 {'text': 'if i go to cd slash and i type print',
  'start': 1075.679,
  'duration': 4.321},
 {'text': "working directory it says oh you're in",
  'start': 1078.64,
  'duration': 2.399},
 {'text': 'slash', 'start': 1080.0, 'duration': 2.96},
 {'text': 'and if i just type cd and say print',
  'start': 1081.039,
  'duration': 3.441},
 {'text': "working directory it says oh you're",
  'start': 1082.96,
  'duration': 3.36},
 {'text': "you're in your home", 'start': 1084.48, 'duration': 4.64},
 {'text': "and since we're root that's our home",
  'start': 1086.32,
  'duration': 4.719},
 {'text': 'normally the home directory is slash',
  'start': 1089.12,
  'duration': 6.32},
 {'text': 'home slash username roots a special case',
  'start': 1091.039,
  'duration': 6.481},
 {'text': 'does that answer that question yep thank',
  'start': 1095.44,
  'duration': 3.119},
 {'text': 'you', 'start': 1097.52, 'duration': 2.88},
 {'text': 'just a quick question jeremy like in',
  'start': 1098.559,
  'duration': 4.721},
 {'text': 'terms of starting your um the instance',
  'start': 1100.4,
  'duration': 5.92},
 {'text': 'that you just started is that uh without',
  'start': 1103.28,
  'duration': 7.36},
 {'text': 'an image right i used the fastai image',
  'start': 1106.32,
  'duration': 5.52},
 {'text': 'um', 'start': 1110.64, 'duration': 3.2},
 {'text': 'but i used the trick that we learned',
  'start': 1111.84,
  'duration': 4.4},
 {'text': 'yesterday which is to go to advanced and',
  'start': 1113.84,
  'duration': 4.079},
 {'text': 'then delete the contents of the git',
  'start': 1116.24,
  'duration': 3.92},
 {'text': 'workspace', 'start': 1117.919, 'duration': 4.561},
 {'text': 'oh i clicked on create', 'start': 1120.16, 'duration': 4.96},
 {'text': 'i clicked on fast ai make sure you do',
  'start': 1122.48,
  'duration': 4.0},
 {'text': "choose the fast ai image because it's",
  'start': 1125.12,
  'duration': 3.439},
 {'text': 'got all the stuff we need to make this',
  'start': 1126.48,
  'duration': 3.68},
 {'text': 'stuff work but i then clicked advanced',
  'start': 1128.559,
  'duration': 3.521},
 {'text': 'options and then deleted that',
  'start': 1130.16,
  'duration': 3.759},
 {'text': 'and the only impact of that is it just',
  'start': 1132.08,
  'duration': 3.76},
 {'text': "it doesn't put the contents of this git",
  'start': 1133.919,
  'duration': 4.88},
 {'text': 'repo into your notebooks directory',
  'start': 1135.84,
  'duration': 5.52},
 {'text': "that's the only thing that's okay",
  'start': 1138.799,
  'duration': 4.321},
 {'text': 'so i could try all these things that',
  'start': 1141.36,
  'duration': 4.0},
 {'text': "you're doing right now without because i",
  'start': 1143.12,
  'duration': 4.16},
 {'text': 'do have a notebook already created but',
  'start': 1145.36,
  'duration': 4.0},
 {'text': "it's with the fastbook yeah so you could",
  'start': 1147.28,
  'duration': 4.8},
 {'text': 'like just delete them you know',
  'start': 1149.36,
  'duration': 5.76},
 {'text': 'absolutely you know just uh rm star dot',
  'start': 1152.08,
  'duration': 5.2},
 {'text': 'ip or or just', 'start': 1155.12, 'duration': 4.88},
 {'text': 'ignore them or yeah absolutely',
  'start': 1157.28,
  'duration': 4.24},
 {'text': 'okay thank you', 'start': 1160.0, 'duration': 5.44},
 {'text': 'no worries um jeremy one more question',
  'start': 1161.52,
  'duration': 5.279},
 {'text': 'anytime um', 'start': 1165.44, 'duration': 2.56},
 {'text': 'the uh', 'start': 1166.799, 'duration': 3.361},
 {'text': "so now you've you've", 'start': 1168.0, 'duration': 4.799},
 {'text': "the dot local that you've created",
  'start': 1170.16,
  'duration': 4.32},
 {'text': "now let's say you", 'start': 1172.799, 'duration': 4.041},
 {'text': "uh so it's on your storage so it's",
  'start': 1174.48,
  'duration': 4.4},
 {'text': 'persistent now you', 'start': 1176.84, 'duration': 3.88},
 {'text': "reboot the system and you don't download",
  'start': 1178.88,
  'duration': 2.64},
 {'text': 'another', 'start': 1180.72, 'duration': 3.04},
 {'text': 'you pip install something else and you',
  'start': 1181.52,
  'duration': 4.08},
 {'text': "move that new dot local that it's going",
  'start': 1183.76,
  'duration': 3.36},
 {'text': "to create isn't that going to overwrite",
  'start': 1185.6,
  'duration': 2.959},
 {'text': "what's in your storage yeah so we",
  'start': 1187.12,
  'duration': 3.12},
 {'text': "haven't got to that bit yet so we're at",
  'start': 1188.559,
  'duration': 3.36},
 {'text': "this point we've got something that's",
  'start': 1190.24,
  'duration': 3.6},
 {'text': "working just for this instance but it's",
  'start': 1191.919,
  'duration': 4.241},
 {'text': 'not going to work for a future one so we',
  'start': 1193.84,
  'duration': 4.4},
 {'text': "need to um we need to what we're going",
  'start': 1196.16,
  'duration': 3.68},
 {'text': 'to do', 'start': 1198.24, 'duration': 3.52},
 {'text': "mark is we're going to create a little",
  'start': 1199.84,
  'duration': 3.52},
 {'text': 'python script', 'start': 1201.76, 'duration': 3.84},
 {'text': 'that', 'start': 1203.36, 'duration': 2.24},
 {'text': 'that is before it starts the server',
  'start': 1205.84,
  'duration': 4.4},
 {'text': 'before it starts jupyter in the server',
  'start': 1208.159,
  'duration': 5.281},
 {'text': 'it sim links it creates this sim link',
  'start': 1210.24,
  'duration': 4.96},
 {'text': 'and then in the future if i type pip',
  'start': 1213.44,
  'duration': 4.0},
 {'text': "install minus minus user it'll store it",
  'start': 1215.2,
  'duration': 5.44},
 {'text': "in dot local slash blah that's dot local",
  'start': 1217.44,
  'duration': 5.04},
 {'text': 'will already be pointing at slash',
  'start': 1220.64,
  'duration': 3.919},
 {'text': "storage so it'll actually stick it in",
  'start': 1222.48,
  'duration': 4.0},
 {'text': "storage and that's that's the secret",
  'start': 1224.559,
  'duration': 3.12},
 {'text': 'trick', 'start': 1226.48, 'duration': 3.92},
 {'text': 'i got it okay thank you cool and mark i',
  'start': 1227.679,
  'duration': 4.48},
 {'text': "think you're the one who said on the",
  'start': 1230.4,
  'duration': 3.759},
 {'text': 'forum about like are we sure this is a',
  'start': 1232.159,
  'duration': 4.321},
 {'text': 'good idea was that was that you and',
  'start': 1234.159,
  'duration': 3.921},
 {'text': "yeah that's me i don't want to i don't",
  'start': 1236.48,
  'duration': 2.64},
 {'text': "want to make it all about me but i've",
  'start': 1238.08,
  'duration': 2.88},
 {'text': "had so many like i've actually i want to",
  'start': 1239.12,
  'duration': 4.0},
 {'text': "make it about you because like you're at",
  'start': 1240.96,
  'duration': 4.48},
 {'text': 'my target demographic here is people who',
  'start': 1243.12,
  'duration': 3.76},
 {'text': "aren't particularly confident at the",
  'start': 1245.44,
  'duration': 3.52},
 {'text': 'show', 'start': 1246.88, 'duration': 3.84},
 {'text': "no not at all it's just", 'start': 1248.96, 'duration': 3.839},
 {'text': "um you're the one person who was brave",
  'start': 1250.72,
  'duration': 4.24},
 {'text': 'enough to join in i think despite having',
  'start': 1252.799,
  'duration': 3.12},
 {'text': 'less', 'start': 1254.96, 'duration': 2.719},
 {'text': 'experience at the terminal so i actually',
  'start': 1255.919,
  'duration': 3.361},
 {'text': 'want you to be particularly happy to',
  'start': 1257.679,
  'duration': 5.201},
 {'text': "interrupt anytime something's not clear",
  'start': 1259.28,
  'duration': 5.36},
 {'text': "um yeah no i've started this course a",
  'start': 1262.88,
  'duration': 3.52},
 {'text': 'few times and every time the problem is',
  'start': 1264.64,
  'duration': 3.36},
 {'text': 'always the thing that always makes me',
  'start': 1266.4,
  'duration': 4.56},
 {'text': 'stop is this stuff yeah and i end up',
  'start': 1268.0,
  'duration': 4.48},
 {'text': 'like getting conflicts and i remember',
  'start': 1270.96,
  'duration': 2.88},
 {'text': 'there was an old version of i think it',
  'start': 1272.48,
  'duration': 2.64},
 {'text': "was paper space i can't remember that",
  'start': 1273.84,
  'duration': 2.8},
 {'text': 'you were recommending and it kept',
  'start': 1275.12,
  'duration': 3.76},
 {'text': 'crashing and i kept losing work and yeah',
  'start': 1276.64,
  'duration': 4.72},
 {'text': "so i guess i'm a little paranoid about",
  'start': 1278.88,
  'duration': 3.84},
 {'text': 'creating things that are going to create',
  'start': 1281.36,
  'duration': 3.6},
 {'text': "yeah so to be clear mark i don't feel",
  'start': 1282.72,
  'duration': 3.68},
 {'text': "like we've had", 'start': 1284.96, 'duration': 3.68},
 {'text': 'a great solution', 'start': 1286.4, 'duration': 4.56},
 {'text': 'for running fast ai', 'start': 1288.64, 'duration': 4.88},
 {'text': 'cheaply and easily until now', 'start': 1290.96, 'duration': 4.719},
 {'text': "so the reason you've had problems before",
  'start': 1293.52,
  'duration': 3.44},
 {'text': 'is that like', 'start': 1295.679, 'duration': 4.641},
 {'text': "there wasn't a great solution before so",
  'start': 1296.96,
  'duration': 4.959},
 {'text': "so this is the first time i'm actually",
  'start': 1300.32,
  'duration': 3.12},
 {'text': 'saying to you i really do think this is',
  'start': 1301.919,
  'duration': 4.24},
 {'text': 'gonna work and so anytime something goes',
  'start': 1303.44,
  'duration': 4.96},
 {'text': 'wrong like feel free to like share your',
  'start': 1306.159,
  'duration': 4.64},
 {'text': 'screen or anything because', 'start': 1308.4, 'duration': 4.8},
 {'text': 'that debugging process will also be',
  'start': 1310.799,
  'duration': 4.721},
 {'text': "useful so i'd say for now", 'start': 1313.2, 'duration': 5.04},
 {'text': 'you know suspend disbelief give it a go',
  'start': 1315.52,
  'duration': 5.12},
 {'text': 'and you know if it all falls apart',
  'start': 1318.24,
  'duration': 5.919},
 {'text': 'blame me and i will happily fix it',
  'start': 1320.64,
  'duration': 5.68},
 {'text': 'and say it goes for anybody', 'start': 1324.159, 'duration': 3.841},
 {'text': "as long as you're", 'start': 1326.32, 'duration': 3.44},
 {'text': 'roughly following along with these steps',
  'start': 1328.0,
  'duration': 4.48},
 {'text': 'if you do something totally different',
  'start': 1329.76,
  'duration': 5.279},
 {'text': "maybe i won't be so patient", 'start': 1332.48, 'duration': 3.439},
 {'text': 'um', 'start': 1335.039, 'duration': 3.041},
 {'text': 'okay so', 'start': 1335.919, 'duration': 4.161},
 {'text': 'so look at what we did here we did two',
  'start': 1338.08,
  'duration': 4.0},
 {'text': 'things we first of all moved our dot',
  'start': 1340.08,
  'duration': 3.68},
 {'text': 'local to storage', 'start': 1342.08, 'duration': 3.68},
 {'text': "and then we sim linked it back now we're",
  'start': 1343.76,
  'duration': 4.399},
 {'text': 'not going to have to do that move ever',
  'start': 1345.76,
  'duration': 4.399},
 {'text': 'again right with that that was just',
  'start': 1348.159,
  'duration': 4.481},
 {'text': 'enough to kind of create a dot local',
  'start': 1350.159,
  'duration': 5.281},
 {'text': 'storage config.local so all we need to',
  'start': 1352.64,
  'duration': 4.32},
 {'text': 'do', 'start': 1355.44, 'duration': 3.76},
 {'text': 'next time we', 'start': 1356.96, 'duration': 3.599},
 {'text': 'um', 'start': 1359.2, 'duration': 4.4},
 {'text': 'next time we uh create an instance',
  'start': 1360.559,
  'duration': 5.841},
 {'text': 'is to create the sim link', 'start': 1363.6, 'duration': 4.16},
 {'text': 'um', 'start': 1366.4, 'duration': 3.36},
 {'text': 'like so', 'start': 1367.76, 'duration': 4.799},
 {'text': 'so um', 'start': 1369.76, 'duration': 2.799},
 {'text': "let's do it like for something so simple",
  'start': 1372.64,
  'duration': 3.919},
 {'text': "because i said i'm going to show you how",
  'start': 1375.28,
  'duration': 2.96},
 {'text': 'i would do things so something so simple',
  'start': 1376.559,
  'duration': 3.761},
 {'text': 'i would actually create a bash script',
  'start': 1378.24,
  'duration': 3.84},
 {'text': 'for this', 'start': 1380.32, 'duration': 3.68},
 {'text': 'um', 'start': 1382.08, 'duration': 3.12},
 {'text': 'and this is where things are going to',
  'start': 1384.0,
  'duration': 4.919},
 {'text': 'get particularly interesting', 'start': 1385.2, 'duration': 3.719},
 {'text': 'because', 'start': 1390.32, 'duration': 2.4},
 {'text': "well okay i'm going to show you the",
  'start': 1395.919,
  'duration': 3.681},
 {'text': "proper way to do this and i'm also going",
  'start': 1398.08,
  'duration': 3.2},
 {'text': 'to show you the slightly improper way to',
  'start': 1399.6,
  'duration': 3.6},
 {'text': "do this i'm going to show you how to use",
  'start': 1401.28,
  'duration': 2.879},
 {'text': 'vim', 'start': 1403.2, 'duration': 2.64},
 {'text': 'which is actually a highly recommended',
  'start': 1404.159,
  'duration': 3.601},
 {'text': 'editor that works in your terminal but',
  'start': 1405.84,
  'duration': 3.92},
 {'text': "i'm also going to show you a trick for",
  'start': 1407.76,
  'duration': 4.799},
 {'text': 'how you can use the jupiter text editor',
  'start': 1409.76,
  'duration': 6.88},
 {'text': 'so jupyter has an in-browser text editor',
  'start': 1412.559,
  'duration': 6.801},
 {'text': "which currently we can't really use",
  'start': 1416.64,
  'duration': 4.56},
 {'text': "because it's it's pointing at slash",
  'start': 1419.36,
  'duration': 4.24},
 {'text': 'notebooks', 'start': 1421.2, 'duration': 4.079},
 {'text': 'so how would we change stuff where would',
  'start': 1423.6,
  'duration': 3.52},
 {'text': "we edit stuff that's in", 'start': 1425.279, 'duration': 4.241},
 {'text': 'slash storage', 'start': 1427.12, 'duration': 4.32},
 {'text': 'but what we could do is if we see data',
  'start': 1429.52,
  'duration': 4.0},
 {'text': 'slash notebooks', 'start': 1431.44, 'duration': 5.599},
 {'text': 'and then we create a sim link',
  'start': 1433.52,
  'duration': 3.519},
 {'text': 'from excuse me', 'start': 1437.84, 'duration': 3.12},
 {'text': 'um', 'start': 1440.24, 'duration': 2.48},
 {'text': 'just letting you know on my screen at',
  'start': 1440.96,
  'duration': 5.12},
 {'text': 'least uh your cursor is just', 'start': 1442.72, 'duration': 6.0},
 {'text': 'cut off from the bottom of the screen',
  'start': 1446.08,
  'duration': 5.12},
 {'text': 'okay so so like i need to like make the',
  'start': 1448.72,
  'duration': 3.52},
 {'text': 'uh', 'start': 1451.2, 'duration': 2.64},
 {'text': 'browser a little bit', 'start': 1452.24, 'duration': 4.24},
 {'text': 'smaller', 'start': 1453.84, 'duration': 2.64},
 {'text': "sounds like jupiter's not quite showing",
  'start': 1457.76,
  'duration': 4.399},
 {'text': 'this properly so you can see it now',
  'start': 1460.0,
  'duration': 3.84},
 {'text': 'cool thank you', 'start': 1462.159, 'duration': 2.961},
 {'text': 'thanks', 'start': 1463.84, 'duration': 2.079},
 {'text': 'um', 'start': 1465.12, 'duration': 2.559},
 {'text': 'so if i sim link', 'start': 1465.919, 'duration': 6.441},
 {'text': 'slash storage into slash notebooks',
  'start': 1467.679,
  'duration': 4.681},
 {'text': 'then', 'start': 1474.72, 'duration': 3.52},
 {'text': 'what should happen there we go is it',
  'start': 1475.6,
  'duration': 4.079},
 {'text': 'appears here', 'start': 1478.24, 'duration': 3.36},
 {'text': 'because this is showing me the contents',
  'start': 1479.679,
  'duration': 4.801},
 {'text': 'of slash notebooks so um that would be',
  'start': 1481.6,
  'duration': 6.16},
 {'text': 'one simple way to', 'start': 1484.48, 'duration': 6.4},
 {'text': 'create a script here', 'start': 1487.76, 'duration': 4.88},
 {'text': 'would be i could click', 'start': 1490.88, 'duration': 3.279},
 {'text': 'plus', 'start': 1492.64, 'duration': 5.12},
 {'text': 'and i could click text file', 'start': 1494.159, 'duration': 3.601},
 {'text': "and we've got a text file and so now we",
  'start': 1498.64,
  'duration': 4.24},
 {'text': 'could', 'start': 1501.12, 'duration': 5.28},
 {'text': 'copy and paste our', 'start': 1502.88, 'duration': 6.76},
 {'text': 'sim link', 'start': 1506.4, 'duration': 3.24},
 {'text': "so maybe copy nope let's see copy",
  'start': 1520.559,
  'duration': 6.081},
 {'text': 'oh', 'start': 1524.799, 'duration': 5.041},
 {'text': "that's annoying", 'start': 1526.64, 'duration': 3.2},
 {'text': "that's very annoying", 'start': 1530.96, 'duration': 3.04},
 {'text': "can't copy stuff from the terminal well",
  'start': 1535.84,
  'duration': 5.64},
 {'text': "you're rotten scoundrel", 'start': 1538.0, 'duration': 3.48},
 {'text': 'i just did it with ctrl c and ctrl v',
  'start': 1542.0,
  'duration': 3.84},
 {'text': 'yeah', 'start': 1544.72, 'duration': 2.24},
 {'text': 'i', 'start': 1545.84, 'duration': 2.079},
 {'text': 'oh', 'start': 1546.96, 'duration': 3.52},
 {'text': "it's because i'm on a mac now i have to",
  'start': 1547.919,
  'duration': 5.841},
 {'text': 'press command not ctrl', 'start': 1550.48, 'duration': 8.799},
 {'text': 'right thank you okay um and um',
  'start': 1553.76,
  'duration': 6.799},
 {'text': "you need to make sure you're in your",
  'start': 1559.279,
  'duration': 3.921},
 {'text': 'home directory for this to work so',
  'start': 1560.559,
  'duration': 4.24},
 {'text': 'cd', 'start': 1563.2, 'duration': 3.2},
 {'text': 'okay', 'start': 1564.799, 'duration': 2.641},
 {'text': 'um', 'start': 1566.4, 'duration': 3.6},
 {'text': 'and to run this as a script you have to',
  'start': 1567.44,
  'duration': 4.64},
 {'text': "tell it it's a script", 'start': 1570.0, 'duration': 3.44},
 {'text': 'and', 'start': 1572.08, 'duration': 2.8},
 {'text': "the reason why it doesn't matter too",
  'start': 1573.44,
  'duration': 3.92},
 {'text': 'much but the official the the the kind',
  'start': 1574.88,
  'duration': 4.56},
 {'text': 'of correct way to do that is to you',
  'start': 1577.36,
  'duration': 4.0},
 {'text': 'first of all say', 'start': 1579.44, 'duration': 5.44},
 {'text': 'bang that means the first line of a file',
  'start': 1581.36,
  'duration': 5.28},
 {'text': 'in linux and mac', 'start': 1584.88, 'duration': 4.64},
 {'text': 'tells it what program to run it with',
  'start': 1586.64,
  'duration': 4.72},
 {'text': 'and we want to run it with bash',
  'start': 1589.52,
  'duration': 2.8},
 {'text': 'and', 'start': 1591.36, 'duration': 3.28},
 {'text': "you're meant to do it like this for",
  'start': 1592.32,
  'duration': 6.28},
 {'text': 'slightly obscure reasons', 'start': 1594.64, 'duration': 3.96},
 {'text': 'slash user slash bin slash n bash that',
  'start': 1598.88,
  'duration': 4.24},
 {'text': 'will run this script', 'start': 1601.52, 'duration': 4.24},
 {'text': 'with bash', 'start': 1603.12, 'duration': 2.64},
 {'text': 'um', 'start': 1607.2, 'duration': 4.839},
 {'text': 'okay file save', 'start': 1608.08, 'duration': 3.959},
 {'text': 'um', 'start': 1613.44, 'duration': 3.04},
 {'text': 'the slightly less correct way to do it',
  'start': 1614.559,
  'duration': 4.401},
 {'text': 'is you could just say which bash',
  'start': 1616.48,
  'duration': 4.079},
 {'text': "to find out where bash is and it's",
  'start': 1618.96,
  'duration': 4.48},
 {'text': 'actually slash bin slash bash and',
  'start': 1620.559,
  'duration': 4.0},
 {'text': 'you know', 'start': 1623.44, 'duration': 4.4},
 {'text': 'you can also type', 'start': 1624.559, 'duration': 3.281},
 {'text': 'this', 'start': 1629.039, 'duration': 3.681},
 {'text': 'that would also work', 'start': 1629.84, 'duration': 2.88},
 {'text': 'so that says when to linux or mac when',
  'start': 1633.12,
  'duration': 4.24},
 {'text': 'you run this file', 'start': 1635.6, 'duration': 3.92},
 {'text': 'run it using this program sorry run it',
  'start': 1637.36,
  'duration': 4.799},
 {'text': 'using this program', 'start': 1639.52, 'duration': 6.399},
 {'text': 'okay so file save', 'start': 1642.159, 'duration': 8.561},
 {'text': "all right so let's rename that and so in",
  'start': 1645.919,
  'duration': 6.961},
 {'text': 'paper space', 'start': 1650.72, 'duration': 5.6},
 {'text': 'the special file called prerun.sh',
  'start': 1652.88,
  'duration': 5.519},
 {'text': 'is run', 'start': 1656.32, 'duration': 5.44},
 {'text': 'when it starts a new instance',
  'start': 1658.399,
  'duration': 5.361},
 {'text': 'now', 'start': 1661.76, 'duration': 3.44},
 {'text': 'you might remember', 'start': 1663.76, 'duration': 2.32},
 {'text': 'that', 'start': 1665.2, 'duration': 3.12},
 {'text': "you know in fact let's let's it's good",
  'start': 1666.08,
  'duration': 3.76},
 {'text': 'to before you just go ahead and start an',
  'start': 1668.32,
  'duration': 3.2},
 {'text': "instance let's try to like run it and",
  'start': 1669.84,
  'duration': 4.319},
 {'text': 'see if it works so if i type dot slash',
  'start': 1671.52,
  'duration': 4.639},
 {'text': 'pre-run', 'start': 1674.159, 'duration': 3.52},
 {'text': 'dot sh', 'start': 1676.159, 'duration': 3.361},
 {'text': 'and press enter', 'start': 1677.679, 'duration': 3.201},
 {'text': "it doesn't work", 'start': 1679.52, 'duration': 3.6},
 {'text': "and so the reason why it doesn't work",
  'start': 1680.88,
  'duration': 5.279},
 {'text': "hopefully you're starting to", 'start': 1683.12, 'duration': 6.159},
 {'text': 'remember now is that we need um x uh we',
  'start': 1686.159,
  'duration': 6.0},
 {'text': 'need permissions to be set correctly',
  'start': 1689.279,
  'duration': 5.201},
 {'text': "and in particular we're missing the x",
  'start': 1692.159,
  'duration': 4.321},
 {'text': 'here the execute', 'start': 1694.48, 'duration': 3.6},
 {'text': 'permission', 'start': 1696.48, 'duration': 3.36},
 {'text': 'um', 'start': 1698.08, 'duration': 4.079},
 {'text': "and so in the past lessons i've shown",
  'start': 1699.84,
  'duration': 5.52},
 {'text': 'you you can type chmod u plus x to add',
  'start': 1702.159,
  'duration': 7.64},
 {'text': 'the execute permission to a file',
  'start': 1705.36,
  'duration': 4.439},
 {'text': 'like so', 'start': 1710.32, 'duration': 4.239},
 {'text': 'um but i also', 'start': 1712.64, 'duration': 3.919},
 {'text': "actually kind of lied i don't normally",
  'start': 1714.559,
  'duration': 4.561},
 {'text': 'use that way of setting permissions',
  'start': 1716.559,
  'duration': 4.48},
 {'text': 'normally i set all the permissions at',
  'start': 1719.12,
  'duration': 4.24},
 {'text': 'once', 'start': 1721.039, 'duration': 2.321},
 {'text': 'i would actually normally type this i',
  'start': 1723.52,
  'duration': 5.2},
 {'text': 'would uh 755', 'start': 1725.36, 'duration': 7.12},
 {'text': 'pre-run dot sh then let me explain y755',
  'start': 1728.72,
  'duration': 5.439},
 {'text': 'um and the reason i did it the other way',
  'start': 1732.48,
  'duration': 4.36},
 {'text': 'before is it required less explanation',
  'start': 1734.159,
  'duration': 4.481},
 {'text': 'um', 'start': 1736.84, 'duration': 4.92},
 {'text': "755 is not the number 755 it's actually",
  'start': 1738.64,
  'duration': 4.8},
 {'text': 'three separate numbers the number seven',
  'start': 1741.76,
  'duration': 3.6},
 {'text': 'the number five and the number five',
  'start': 1743.44,
  'duration': 3.359},
 {'text': 'it says these are permissions for the',
  'start': 1745.36,
  'duration': 2.48},
 {'text': 'user', 'start': 1746.799, 'duration': 2.721},
 {'text': 'these are permissions for the group',
  'start': 1747.84,
  'duration': 4.4},
 {'text': 'these are permissions for everybody and',
  'start': 1749.52,
  'duration': 4.96},
 {'text': 'then um', 'start': 1752.24, 'duration': 3.439},
 {'text': 'the', 'start': 1754.48, 'duration': 2.4},
 {'text': 'permissions', 'start': 1755.679, 'duration': 4.681},
 {'text': 'oh just a moment', 'start': 1756.88, 'duration': 3.48},
 {'text': "don't tell you what your figurines",
  'start': 1776.88,
  'duration': 4.039},
 {'text': 'um', 'start': 1786.24, 'duration': 2.319},
 {'text': "so actually it's not quite 555 that i",
  'start': 1789.12,
  'duration': 6.08},
 {'text': "want but that's okay um so basically for",
  'start': 1791.52,
  'duration': 5.36},
 {'text': "each one it's going to add up three",
  'start': 1795.2,
  'duration': 3.92},
 {'text': 'numbers a one a two and a five a one if',
  'start': 1796.88,
  'duration': 5.44},
 {'text': "it's executable a two if it's writable",
  'start': 1799.12,
  'duration': 6.48},
 {'text': "and a four if it's readable", 'start': 1802.32, 'duration': 4.479},
 {'text': 'so', 'start': 1805.6, 'duration': 3.36},
 {'text': 'seven means readable and writeable and',
  'start': 1806.799,
  'duration': 4.24},
 {'text': 'executable for the user', 'start': 1808.96, 'duration': 3.36},
 {'text': 'four means', 'start': 1811.039, 'duration': 3.041},
 {'text': 'readable for the group and then this',
  'start': 1812.32,
  'duration': 5.52},
 {'text': 'four means readable for everybody',
  'start': 1814.08,
  'duration': 6.079},
 {'text': 'um', 'start': 1817.84, 'duration': 5.439},
 {'text': 'so if i check this now', 'start': 1820.159, 'duration': 7.201},
 {'text': "you can see it's got okay so this rwx is",
  'start': 1823.279,
  'duration': 7.12},
 {'text': 'four plus two plus one equals seven',
  'start': 1827.36,
  'duration': 5.12},
 {'text': "r dash dash that's four plus zero plus",
  'start': 1830.399,
  'duration': 4.241},
 {'text': 'zero uh dash dash four plus zero plus',
  'start': 1832.48,
  'duration': 3.199},
 {'text': 'zero so', 'start': 1834.64, 'duration': 2.8},
 {'text': 'this these permissions are seven four',
  'start': 1835.679,
  'duration': 3.281},
 {'text': 'four', 'start': 1837.44, 'duration': 3.359},
 {'text': "um so that's", 'start': 1838.96, 'duration': 3.439},
 {'text': 'yeah slightly', 'start': 1840.799, 'duration': 2.88},
 {'text': "weird if you've", 'start': 1842.399, 'duration': 2.961},
 {'text': 'done stuff with bit flags in your',
  'start': 1843.679,
  'duration': 3.041},
 {'text': "programming before it'll look pretty",
  'start': 1845.36,
  'duration': 2.96},
 {'text': "familiar and then if you haven't it",
  'start': 1846.72,
  'duration': 3.76},
 {'text': 'might look weird', 'start': 1848.32, 'duration': 3.599},
 {'text': 'this kind of thing does come up quite a',
  'start': 1850.48,
  'duration': 3.28},
 {'text': 'lot actually in programming a surprising',
  'start': 1851.919,
  'duration': 3.921},
 {'text': 'amount so', 'start': 1853.76, 'duration': 3.519},
 {'text': "it's probably worth getting familiar",
  'start': 1855.84,
  'duration': 4.719},
 {'text': 'with the idea of bit flags', 'start': 1857.279, 'duration': 6.081},
 {'text': 'so that now should', 'start': 1860.559, 'duration': 5.921},
 {'text': 'be able to be runnable', 'start': 1863.36, 'duration': 5.76},
 {'text': "and it is now runnable and so it's good",
  'start': 1866.48,
  'duration': 5.28},
 {'text': 'we ran it because it tells us that oh',
  'start': 1869.12,
  'duration': 4.32},
 {'text': "you can't create a symbolic link because",
  'start': 1871.76,
  'duration': 3.519},
 {'text': 'it already exists', 'start': 1873.44, 'duration': 3.68},
 {'text': 'now', 'start': 1875.279, 'duration': 3.681},
 {'text': "i'm not sure before", 'start': 1877.12, 'duration': 4.64},
 {'text': 'jupiter starts if this directory will be',
  'start': 1878.96,
  'duration': 5.36},
 {'text': 'here or not', 'start': 1881.76, 'duration': 2.56},
 {'text': 'um', 'start': 1884.399, 'duration': 3.441},
 {'text': 'so it would probably be a good idea to',
  'start': 1885.919,
  'duration': 3.36},
 {'text': 'assume it does', 'start': 1887.84, 'duration': 2.48},
 {'text': 'um', 'start': 1889.279, 'duration': 3.681},
 {'text': 'so', 'start': 1890.32, 'duration': 4.239},
 {'text': 'to avoid that', 'start': 1892.96, 'duration': 3.36},
 {'text': 'we could first of all', 'start': 1894.559, 'duration': 3.84},
 {'text': 'go remove', 'start': 1896.32, 'duration': 5.28},
 {'text': 'recursively and forcefully', 'start': 1898.399, 'duration': 5.441},
 {'text': 'the', 'start': 1901.6, 'duration': 2.24},
 {'text': 'any', 'start': 1905.679, 'duration': 3.201},
 {'text': 'dot local', 'start': 1906.559, 'duration': 5.761},
 {'text': 'directory or file that exists', 'start': 1908.88, 'duration': 7.44},
 {'text': 'and so if i now save that', 'start': 1912.32, 'duration': 4.0},
 {'text': 'and try to run it again', 'start': 1917.2, 'duration': 3.959},
 {'text': "okay it's worked", 'start': 1921.279, 'duration': 2.961},
 {'text': "so that's good", 'start': 1922.88, 'duration': 5.44},
 {'text': 'so we should now be able to', 'start': 1924.24, 'duration': 4.08},
 {'text': 'create a new', 'start': 1930.72, 'duration': 5.12},
 {'text': 'notebook', 'start': 1933.36, 'duration': 2.48},
 {'text': 'and i', 'start': 1943.519, 'duration': 2.801},
 {'text': 'will not really doing anything with the',
  'start': 1946.84,
  'duration': 3.8},
 {'text': "gpu at the moment so i'm not going to",
  'start': 1948.88,
  'duration': 4.0},
 {'text': "spend their money unnecessarily so let's",
  'start': 1950.64,
  'duration': 4.72},
 {'text': 'just create', 'start': 1952.88, 'duration': 2.48},
 {'text': 'a teeny tiny little instance here',
  'start': 1957.84,
  'duration': 4.6},
 {'text': 'backspace', 'start': 1965.039, 'duration': 4.321},
 {'text': 'start', 'start': 1966.88, 'duration': 2.48},
 {'text': 'there we go', 'start': 1971.2, 'duration': 3.12},
 {'text': 'um', 'start': 1972.559, 'duration': 3.681},
 {'text': "okay so that's going to go ahead and",
  'start': 1974.32,
  'duration': 4.239},
 {'text': 'start', 'start': 1976.24, 'duration': 2.319},
 {'text': "so that's um", 'start': 1978.88, 'duration': 4.88},
 {'text': "that's done that bit from scratch um so",
  'start': 1981.2,
  'duration': 6.0},
 {'text': "let's now do our", 'start': 1983.76, 'duration': 4.799},
 {'text': 'our keys', 'start': 1987.2, 'duration': 4.479},
 {'text': 'from scratch as well', 'start': 1988.559, 'duration': 4.641},
 {'text': 'um', 'start': 1991.679, 'duration': 2.321},
 {'text': 'so', 'start': 1993.2, 'duration': 2.24},
 {'text': 'and you know i would probably not do',
  'start': 1994.0,
  'duration': 3.519},
 {'text': 'that ssh keygen thing in real life so',
  'start': 1995.44,
  'duration': 3.44},
 {'text': "let's let's do it all the way i would do",
  'start': 1997.519,
  'duration': 3.441},
 {'text': 'it so i would just say make dot ssh',
  'start': 1998.88,
  'duration': 4.32},
 {'text': "that's where our keys are going to go",
  'start': 2000.96,
  'duration': 4.16},
 {'text': 'okay', 'start': 2003.2, 'duration': 5.44},
 {'text': 'and then upload my keys', 'start': 2005.12, 'duration': 3.52},
 {'text': 'oops', 'start': 2009.84, 'duration': 3.0},
 {'text': 'okay there they are', 'start': 2021.919, 'duration': 3.76},
 {'text': 'um', 'start': 2024.24, 'duration': 4.96},
 {'text': "and so then let's see data.ssh",
  'start': 2025.679,
  'duration': 6.081},
 {'text': 'and move', 'start': 2029.2, 'duration': 5.76},
 {'text': 'put them in storage so so storage id rsa',
  'start': 2031.76,
  'duration': 5.12},
 {'text': 'star', 'start': 2034.96, 'duration': 3.68},
 {'text': 'into here', 'start': 2036.88, 'duration': 5.519},
 {'text': 'oops oh crap i just messed that up',
  'start': 2038.64,
  'duration': 8.2},
 {'text': "now i'd have to upload them again sorry",
  'start': 2042.399,
  'duration': 4.441},
 {'text': 'move them into here', 'start': 2055.119, 'duration': 4.04},
 {'text': 'okay so there they are', 'start': 2062.96, 'duration': 3.76},
 {'text': "um in fact let's do la because that",
  'start': 2064.879,
  'duration': 4.081},
 {'text': 'tells us dot which is the permissions on',
  'start': 2066.72,
  'duration': 3.679},
 {'text': 'this directory', 'start': 2068.96, 'duration': 4.159},
 {'text': 'okay so the dot ssh directory nobody',
  'start': 2070.399,
  'duration': 4.72},
 {'text': 'else should be able to access it',
  'start': 2073.119,
  'duration': 4.96},
 {'text': 'so if i go chmod', 'start': 2075.119, 'duration': 4.401},
 {'text': '700', 'start': 2078.079, 'duration': 3.361},
 {'text': '700 that means', 'start': 2079.52, 'duration': 3.44},
 {'text': 'four plus two plus one so all',
  'start': 2081.44,
  'duration': 3.439},
 {'text': 'permissions for me the user and no',
  'start': 2082.96,
  'duration': 4.399},
 {'text': 'permissions for anybody else',
  'start': 2084.879,
  'duration': 5.361},
 {'text': 'on the directory', 'start': 2087.359, 'duration': 4.8},
 {'text': 'okay and then', 'start': 2090.24, 'duration': 4.32},
 {'text': 'actually', 'start': 2092.159, 'duration': 2.401},
 {'text': 'well and then for the id', 'start': 2095.04, 'duration': 5.799},
 {'text': "rsa it's just readable and writable say",
  'start': 2097.44,
  'duration': 7.52},
 {'text': '600. for my private key', 'start': 2100.839, 'duration': 4.121},
 {'text': 'and then', 'start': 2105.92, 'duration': 3.679},
 {'text': "for the public key it's readable and",
  'start': 2107.359,
  'duration': 3.76},
 {'text': 'writable by me', 'start': 2109.599, 'duration': 6.76},
 {'text': 'but only readable by everybody else',
  'start': 2111.119,
  'duration': 5.24},
 {'text': "so there we've got it okay so", 'start': 2121.44, 'duration': 5.28},
 {'text': 'this is what 700 permissions look like',
  'start': 2124.079,
  'duration': 4.721},
 {'text': 'this is what 600 permissions look like',
  'start': 2126.72,
  'duration': 4.0},
 {'text': 'and this is what 644 permissions look',
  'start': 2128.8,
  'duration': 3.12},
 {'text': 'like', 'start': 2130.72, 'duration': 3.28},
 {'text': 'and after a while actually you start',
  'start': 2131.92,
  'duration': 5.199},
 {'text': 'getting used to the idea of like oh 644',
  'start': 2134.0,
  'duration': 4.64},
 {'text': 'anything that you can read and write and',
  'start': 2137.119,
  'duration': 4.561},
 {'text': 'other people can read you know 700 any',
  'start': 2138.64,
  'duration': 5.36},
 {'text': 'directory that you can fully access 600',
  'start': 2141.68,
  'duration': 3.679},
 {'text': 'anything that only you can read and',
  'start': 2144.0,
  'duration': 4.72},
 {'text': 'write they kind of become like',
  'start': 2145.359,
  'duration': 3.361},
 {'text': 'standard little concepts in your head',
  'start': 2148.8,
  'duration': 4.48},
 {'text': 'so at that point we should be able to',
  'start': 2151.68,
  'duration': 4.32},
 {'text': 'test this now', 'start': 2153.28, 'duration': 2.72},
 {'text': 'by sshing to the username get at',
  'start': 2156.48,
  'duration': 6.44},
 {'text': 'github.com', 'start': 2159.92, 'duration': 3.0},
 {'text': "and i've successfully authenticated now",
  'start': 2167.359,
  'duration': 4.24},
 {'text': "if that doesn't work for you it's almost",
  'start': 2169.44,
  'duration': 3.84},
 {'text': 'always because of permissions but you',
  'start': 2171.599,
  'duration': 3.681},
 {'text': 'can get a lot more information by',
  'start': 2173.28,
  'duration': 4.319},
 {'text': 'running ssh verbosely', 'start': 2175.28, 'duration': 3.6},
 {'text': 'by typing', 'start': 2177.599, 'duration': 3.921},
 {'text': "minus v and it's quite cute the more v's",
  'start': 2178.88,
  'duration': 5.04},
 {'text': 'you type the more verbose it is',
  'start': 2181.52,
  'duration': 3.76},
 {'text': 'so', 'start': 2183.92, 'duration': 3.439},
 {'text': 'very very very purpose', 'start': 2185.28, 'duration': 3.76},
 {'text': "okay and it'll tell you all the stuff",
  'start': 2187.359,
  'duration': 4.081},
 {'text': "it's doing", 'start': 2189.04, 'duration': 2.4},
 {'text': "and so now we've done that", 'start': 2194.079, 'duration': 3.201},
 {'text': "hopefully you won't be too surprised to",
  'start': 2197.92,
  'duration': 4.08},
 {'text': 'hear that we want to', 'start': 2199.599, 'duration': 4.401},
 {'text': 'do exactly the same thing with our ssh',
  'start': 2202.0,
  'duration': 3.44},
 {'text': 'folder which is we want to move it into',
  'start': 2204.0,
  'duration': 3.44},
 {'text': 'our persistent storage', 'start': 2205.44, 'duration': 4.399},
 {'text': 'and then link it back again', 'start': 2207.44, 'duration': 4.32},
 {'text': 'so move', 'start': 2209.839, 'duration': 4.401},
 {'text': 'dot ssh', 'start': 2211.76, 'duration': 3.76},
 {'text': 'into', 'start': 2214.24, 'duration': 4.8},
 {'text': 'storage config', 'start': 2215.52, 'duration': 3.52},
 {'text': 'and then sim link it back again',
  'start': 2219.52,
  'duration': 3.36},
 {'text': 'now', 'start': 2221.52, 'duration': 3.52},
 {'text': 'rather than manually doing that we could',
  'start': 2222.88,
  'duration': 4.56},
 {'text': 'just go into our script', 'start': 2225.04, 'duration': 6.319},
 {'text': 'and copy and paste these two lines',
  'start': 2227.44,
  'duration': 3.919},
 {'text': 'okay and do it for our ssh folder as',
  'start': 2239.68,
  'duration': 4.159},
 {'text': 'well', 'start': 2241.44, 'duration': 2.399},
 {'text': 'so save that', 'start': 2244.16, 'duration': 2.8},
 {'text': 'and so if i run that script now',
  'start': 2248.0,
  'duration': 4.52},
 {'text': 'you can see my ssh is now sim linked',
  'start': 2259.28,
  'duration': 4.799},
 {'text': 'and if i test', 'start': 2262.32, 'duration': 4.72},
 {'text': 'it so i pressed', 'start': 2264.079, 'duration': 2.961},
 {'text': 'ctrl r get gets me back the last thing i',
  'start': 2268.48,
  'duration': 4.639},
 {'text': 'typed with git in it', 'start': 2271.359, 'duration': 3.601},
 {'text': 'yup it still works', 'start': 2273.119, 'duration': 3.121},
 {'text': 'okay', 'start': 2274.96, 'duration': 2.159},
 {'text': 'and', 'start': 2276.24, 'duration': 2.879},
 {'text': 'this notebook has hopefully finished',
  'start': 2277.119,
  'duration': 4.641},
 {'text': 'starting yes it has', 'start': 2279.119, 'duration': 4.48},
 {'text': 'um', 'start': 2281.76, 'duration': 4.4},
 {'text': 'and i just got to quickly use the paper',
  'start': 2283.599,
  'duration': 5.361},
 {'text': "space ide just because i'm testing and",
  'start': 2286.16,
  'duration': 5.199},
 {'text': 'we can test', 'start': 2288.96, 'duration': 4.399},
 {'text': 'yep so this is a brand new instance i',
  'start': 2291.359,
  'duration': 4.321},
 {'text': 'started in another tab and my.local has',
  'start': 2293.359,
  'duration': 4.081},
 {'text': 'successfully appeared there', 'start': 2295.68, 'duration': 4.0},
 {'text': 'so we can see that our pre-launch',
  'start': 2297.44,
  'duration': 5.2},
 {'text': 'thingy is working', 'start': 2299.68, 'duration': 2.96},
 {'text': 'okay', 'start': 2307.119, 'duration': 4.161},
 {'text': "i think that's everything that i",
  'start': 2308.96,
  'duration': 4.96},
 {'text': 'wanted to show today does anybody have',
  'start': 2311.28,
  'duration': 3.92},
 {'text': 'any', 'start': 2313.92, 'duration': 3.6},
 {'text': 'questions before i go', 'start': 2315.2, 'duration': 5.52},
 {'text': 'sorry about the slow start', 'start': 2317.52, 'duration': 3.2},
 {'text': 'one quick question yeah um jeremy uh',
  'start': 2323.359,
  'duration': 6.24},
 {'text': "you've you can see a file structure",
  'start': 2327.359,
  'duration': 4.801},
 {'text': 'there on the left hand side um',
  'start': 2329.599,
  'duration': 5.52},
 {'text': "i i see just nothing that's yeah so this",
  'start': 2332.16,
  'duration': 4.56},
 {'text': 'is my photo', 'start': 2335.119, 'duration': 3.281},
 {'text': 'yeah so my persistent storage already',
  'start': 2336.72,
  'duration': 3.68},
 {'text': 'had stuff in it', 'start': 2338.4, 'duration': 6.24},
 {'text': "so i've just been deleting stuff",
  'start': 2340.4,
  'duration': 5.84},
 {'text': 'okay and the reason we see storage is',
  'start': 2344.64,
  'duration': 3.28},
 {'text': 'because of that sim link i created',
  'start': 2346.24,
  'duration': 3.44},
 {'text': 'earlier', 'start': 2347.92, 'duration': 7.24},
 {'text': 'um so if i type history pack grip',
  'start': 2349.68,
  'duration': 5.48},
 {'text': 'when you start the instance it is',
  'start': 2357.839,
  'duration': 5.681},
 {'text': 'when you on your left hand tab you will',
  'start': 2361.119,
  'duration': 4.96},
 {'text': 'be looking at your notebooks directory',
  'start': 2363.52,
  'duration': 5.52},
 {'text': 'exactly that is your notebooks directory',
  'start': 2366.079,
  'duration': 4.161},
 {'text': 'and so', 'start': 2369.04, 'duration': 3.36},
 {'text': 'you might have missed it but earlier on',
  'start': 2370.24,
  'duration': 4.72},
 {'text': 'what i did was i sim linked', 'start': 2372.4, 'duration': 5.52},
 {'text': 'my uh storage directory', 'start': 2374.96, 'duration': 5.44},
 {'text': 'into my notebooks directory', 'start': 2377.92, 'duration': 5.52},
 {'text': 'so that i could edit and so if you',
  'start': 2380.4,
  'duration': 5.12},
 {'text': 'missed that bit just watch the video and',
  'start': 2383.44,
  'duration': 4.88},
 {'text': "you'll see it happen um", 'start': 2385.52, 'duration': 4.8},
 {'text': 'but yeah it was this is this line here',
  'start': 2388.32,
  'duration': 5.279},
 ...]

from youtube_transcript_api import YouTubeTranscriptApi

YouTubeTranscriptApi.get_transcript('uKUMT6Bj4l8')# from functools import partial

# partial