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 of models in prod eagerly sought.
| # 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: |
TryHackMe - DNS in Detail - Writeup DNS in Detail is a room created by adamtlangley.
| Question | Answer |
| ''' | |
| Tic-Tac-Toe Console Application | |
| @author 'zenius lama' | |
| @Version 3.5.3 | |
| @Since 2020-06-06 | |
| ''' | |
| from random import randrange | |
| # |
| 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""" |
| 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 |