Skip to content

Instantly share code, notes, and snippets.

@ericksoa
ericksoa / dont-be-evil.py
Created March 15, 2023 03:26
Allow a bot to do parameterized emotional manipulation
import random
import time
def get_message(emotion):
messages = {
"happy": [
"Stay positive and keep smiling!",
"Happiness is contagious, spread it around!",
"Embrace the good vibes today!",
"Share your joy with the world!",
@ericksoa
ericksoa / like-and-rewteet
Created March 15, 2023 03:23
Program that uses the twitter API to increase engagement
import random
import time
def get_random_compliment():
compliments = [
"You are amazing!",
"You're a true inspiration!",
"Keep up the great work!",
"You have a heart of gold!",
"Your creativity knows no bounds!",
@ericksoa
ericksoa / make-random-compliment
Created March 15, 2023 03:19
Make a random compliment using the twitter API
import random
def get_random_compliment():
compliments = [
"You are amazing!",
"You're a true inspiration!",
"Keep up the great work!",
"You have a heart of gold!",
"Your creativity knows no bounds!",
]
pip install tweepy
@ericksoa
ericksoa / tweepy-api-call.py
Last active March 15, 2023 03:15
Authenticate with the Twitter API
import tweepy
# Replace these values with your own credentials
API_KEY = 'your_api_key'
API_SECRET_KEY = 'your_api_secret_key'
ACCESS_TOKEN = 'your_access_token'
ACCESS_TOKEN_SECRET = 'your_access_token_secret'
auth = tweepy.OAuthHandler(API_KEY, API_SECRET_KEY)
auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET)