Giter Club home page Giter Club logo

u_bot's Introduction

My Friend's Twitter Bot (GCP based)

I developed a Twitter bot using the Markov chain model. The motivation behind this project was to put the skills I've been learning into practical use. This bot tweets in a manner reminiscent of my friend at specific intervals.

Background

To optimize costs and explore new learning opportunities, I migrated the infrastructure technology from AWS to Google Cloud Platform (GCP). The technologies I used include Docker, Google Kubernetes Engine (GKE), and Google Cloud Storage.

I implemented scheduled tasks for the Twitter bot using GKE's CronJobs:

  1. fetch_tweets_cronjob: Scheduled to run every Sunday night at midnight (Japan time).

    • Utilizes the Twitter API to fetch the latest tweets (up to 100) from my friend’s Twitter account.
    • Appends the newly fetched tweets to the existing tweet data obtained from Google Storage.
    • Performs text preprocessing, including tokenization, to prepare the data for the Markov chain model.
  2. generate_tweets_cronjob: Scheduled to run every morning at 7 AM (Japan time).

    • Uses the tweet data retrieved from Google Storage to automatically generate new tweets using the Markov chain model.
    • Tweets the generated content.

Skills Used

  • Language: Python (Markov chain)
  • Cloud Platform: Google Cloud Platform (GCP) (Compute Engine, Cloud Storage, Container Registry, Google Kubernetes Engine - GKE)
  • Containerization & Orchestration: Docker, Kubernetes

Bot's Twitter Handle

Check out the bot's tweets here: @UbotInSeattle

Bot's Screenshot

Feel free to explore the bot's tweets and its underlying technologies!

u_bot's People

Contributors

codekakitai51 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.