Here is some text before the React component.
<div id="my-react-component"></div>
Here is some text after the React component.
function addpythonpath { | |
PYTHONPATH=$PYTHONPATH:`pwd` | |
sed -i '' '/^PYTHONPATH/d' ~/.bashrc | |
sleep .5 | |
echo PYTHONPATH=$PYTHONPATH >> ~/.bashrc | |
} | |
# install yt-dlp first for this to work. | |
# streams youtube videos via VLC. | |
function ytvlc { |
import time | |
import pandas as pd | |
from googleapiclient.discovery import build | |
# Enter your API key here | |
api_key = "API KEY HERE" | |
# Create a service object for the YouTube API | |
youtube = build('youtube', 'v3', developerKey=api_key) |
First Citizen: | |
Before we proceed any further, hear me speak. | |
All: | |
Speak, speak. | |
First Citizen: | |
You are all resolved rather to die than to famish? | |
All: |
Rank Country Name PageRank | |
------------------------------------------------------------------------ | |
1. Namibia 0.1569 | |
2. China 0.0147 | |
3. Russian Federation 0.0119 | |
4. Brazil 0.0099 | |
5. Germany 0.0085 | |
6. France 0.0084 | |
7. Zambia 0.0083 | |
8. Saudi Arabia 0.0078 |
""" | |
Monitor a Dropbox folder daily at 5 PM. For each PDF file, send its contents to OpenAI GPT-3.5 | |
to generate a two-sentence summary/action. Collect all summaries and send them via WhatsApp. | |
NOTE: This example code is written in a functional style with separate functions for each step. | |
Fill in the auth tokens and any additional settings in the commented sections. | |
Dependencies you might need to install: | |
pip install dropbox openai PyPDF2 requests schedule |
import boto3 | |
import requests | |
import psutil | |
import subprocess | |
from tabulate import tabulate | |
from colorama import Fore, Style, init | |
# Initialize colorama for colored headers | |
init(autoreset=True) |