Skip to content

Instantly share code, notes, and snippets.

@assafelovic
assafelovic / action_driven_chatbot.py
Created February 24, 2023 12:51
A Langchain Action driven agent demo of a weather conversational chatbot
from langchain.agents import Tool
from langchain.chains.conversation.memory import ConversationBufferMemory
from langchain import OpenAI
from langchain.utilities import SerpAPIWrapper
from langchain.agents import initialize_agent
import os
import config
# Step 1: Please add environment api keys for SerpAPI and OpenAI
@assafelovic
assafelovic / remove_all_bot_followers.py
Created November 5, 2022 13:21
Remove all bot followers from your twitter account
import tweepy
from googletrans import Translator
__author__ = 'assafelovic'
'''
Run this script carefully!
This script will remove all potential bot followers from your twitter account. The bot detection function
is very basic mainly for inspiration, but feel free to enhance it or use 3rd party tools.
@assafelovic
assafelovic / template.html
Created September 23, 2017 15:14
Dynamic email template in pure html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Automatic Email</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
</head>
<body style="margin:0; padding:10px 0 0 0;" bgcolor="#F8F8F8">
<table align="center" border="1" cellpadding="0" cellspacing="0" width="95%%">