GithubHelp home page GithubHelp logo

jotarios / flinchbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bnaul/flinchbot

0.0 2.0 0.0 700 KB

Python Twitter bot which attempts to replicate the madness of @johnflinchbaugh. Main components are a Markov random text generator and a Google App Engine cron script that responds to mentions and posts tweets.

License: GNU General Public License v3.0

Python 100.00%

flinchbot's Introduction

Synopsis

Python Twitter bot originally intended to replicate the in{,s}anity of @johnflinchbaugh. Primary components are:

  1. markovgen.py: class that reads in a plain text corpus and generates random sentences based on the input
  2. flinchbot.py: class that connects to a Twitter account, checks for and responds to mentions, and occasionally posts a random tweet
  3. messageparse.py: simple script for extracting messages from a Facebook data dump messages.htm file and outputting plain text

Examples

  1. python markovgen.py -n 12 -c 3 < input.txt: generates a random fragment of (at least) 12 words where each 3-token phrase appears somewhere in the input file
  2. python flinchbot.py: responds to any new mentions and posts a new tweet with some small probability
  3. python messageparse.py -n 'John Fontana Flinchbaugh' < messages.htm: processes Facebook messages and extracts plain text contents of messages from John Fontana Flinchbaugh

Possible Extensions

  1. Would be nice to have responses be vaguely context aware. One possible approach: identify most significant/unusual words, find a list of related words, and seed the sentence generator with one of them.
  2. Cache data structure somewhere so that it doesn't have to be constructed from text each time. More complicated logic like the above idea would likely require this to avoid excessive computational cost.

flinchbot's People

Contributors

bnaul avatar

Watchers

James Cloos avatar Jorge Rios 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.