Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.
Avoid being a link dump. Try to provide only valuable well tuned information.
Neural network links before starting with transformers.
Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts and experience preferred (super rare at this point).
| import re, string, unicodedata | |
| import nltk | |
| import contractions | |
| import inflect | |
| from nltk import word_tokenize, sent_tokenize | |
| from nltk.corpus import stopwords | |
| from nltk.stem import LancasterStemmer, WordNetLemmatizer | |
| def replace_contractions(text): | |
| """Replace contractions in string of text""" |
| # Credit 🙏: I just used the example from langchain docs and it works quite well: https://python.langchain.com/en/latest/use_cases/question_answering.html | |
| # Note 2: The Arxiv -> PDF logic is a bit messy, I'm sure it can be done better | |
| # Note 3: Please install the following: | |
| # To run: | |
| # Save this in a `app.py` | |
| # pip install arxiv PyPDF2 langchain chromadb | |
| # The chat feature was shipped in H2O nightly this week, we will need to install from nightly link: |
| import asyncio | |
| import json | |
| from time import time, sleep | |
| import aiohttp | |
| import pandas as pd | |
| from bs4 import BeautifulSoup | |
| from tqdm import tqdm | |
| # Ващет СИКРЕТНА!!!!! Но код хранится в private репозитории, так что пох |
| class MyStreamListener(tweepy.StreamListener): | |
| def __init__(self, api=None): | |
| super(MyStreamListener, self).__init__() | |
| self.num_tweets = 0 | |
| self.file = open("tweets.txt", "w") | |
| def on_status(self, status): | |
| tweet = status._json | |
| self.file.write( json.dumps(tweet) + '\n' ) | |
| self.num_tweets += 1 |
Cheatsheet for LaTex, using Markdown for markup. I use this with atom.io
and 📦markdown-preview-plus to write math stuff. 📦keyboard-localization
is necessary when using an international layout (like [swiss] german).
Further Reference and source: ftp://ftp.ams.org/pub/tex/doc/amsmath/short-math-guide.pdf