At the heart of every meme generation lies the concept of what it means to be human. While we do so by providing us with powerful examples and narratives, today's consumers need to understand the nature of their behavior, how they behave, and what happens when these people are harmed. Our goal in creating mesmerizing and exciting stories for our audiences is to share our stories without distractions, and with no limits on how much effort may go into making them. To achieve this goal, we aim to build an interactive narrative of our experience. In addition, we encourage visitors to use their stories to explore ways that the future might look like and apply the lessons learned. With the introduction of Android, there has been significant growth in mobile apps with unprecedented popularity and success. For example, Apple has created a series of popular smartphones with impressive user interface features. These include the Google Play Store, Facebook Live, Twitter, YouTube, and Spotify. From browsin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Set environment variables | |
export WANDB_PROJECT="text2text-flan" | |
export WANDB_WATCH="gradients" | |
export WANDB_ENTITY="pszemraj" | |
export TOKENIZERS_PARALLELISM=true | |
NUM_WORKERS=$(lscpu -p | egrep -v '^#' | sort -u -t, -k 2,4 | wc -l) | |
echo "Number of CPU cores: $NUM_WORKERS" |
Can you give me an up to date overview of Atlanta and the different areas of the city
Sure, I can provide you with an overview of Atlanta and its different areas. Atlanta is the capital and most populous city in the state of Georgia, with a diverse population and a thriving economy. Here's a breakdown of some of the main areas:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Creates an archive of a directory | |
pip install fire | |
""" | |
import os | |
import shutil | |
from pathlib import Path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pkg_resources | |
def list_dependencies(package_name, level=0, explored=set()): | |
# Define indent outside of try-except to ensure it's always assigned | |
indent = " " * level | |
if package_name in explored: | |
return | |
explored.add(package_name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datasets import Dataset | |
# Your initial list of dictionaries | |
data = [ | |
{"id": 1, "text": "Hello world!", "label": 0}, | |
{"id": 2, "text": "How are you?", "label": 1}, | |
# Add more dictionaries as needed | |
] | |
# Convert list of dictionaries to a dictionary of lists |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
anthropic_run_summarization.py - Generate summaries using langchain + LLMs | |
For usage details, run `python anthropic_run_summarization.py --help` and fire will print the usage details. | |
Notes: | |
- you need to have ANTHROPIC_API_KEY set as an environment variable (easiest way is export ANTHROPIC_API_KEY=memes123) | |
- install the dependencies using the requirements.txt file or below | |
pip install fire langchain langchain-community langchain-anthropic clean-text tqdm tiktoken |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rapidfuzz import process, fuzz | |
def fuzzy_align(masterlist, list2, cutoff=70): | |
# Dictionary to hold matches | |
matches = {} | |
# Track used indices to avoid duplicate matches in the masterlist | |
used_indices = set() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from email.parser import BytesParser | |
from pathlib import Path | |
import fire | |
import html2text | |
import pandas as pd | |
from tqdm import tqdm | |
# Setup logging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import numpy as np | |
from datasets import ClassLabel, Dataset, DatasetDict | |
def split_dataset( | |
dataset: Dataset, | |
test_size=0.025, |