jamesgarfield / mongobot Goto Github PK
View Code? Open in Web Editor NEWThis project forked from huntwelch/mongobot
IRC bot for screwing around. Named not for MongoDB, but after Mongo from Blazing Saddles.
This project forked from huntwelch/mongobot
IRC bot for screwing around. Named not for MongoDB, but after Mongo from Blazing Saddles.
Getting Started =============== mkvirtualenv MongoBot pip install -r requirements.txt To run bot: python medulla.py To run bot persistently so it will recover from crashes: python doctor.py You'll need to install MongoDB to use most of the features relating to people Dafuq is going on? ================== For best results in answering this question, check out settings.py, followed by medulla.py and cortex.py. Also, learn python. Advanced Usage ============== MongoBot is capable of running a number of web services and apis. For best results, run an nginx server and uwsgi server/deploy.ini. And by best results, I mean any. More documentation on this once I figure out how I did it the first time. Also, the markov functionality is based on redis, so you'll have to get a redis server up and running. Secret settings =============== You will need to create a file in the root folder called secrets.py. example.secrets.py has descriptions of each setting, just copy it to secrets.py and set away. New features ============ To create a new command in an existing brainmeat category, add the function to the class and add the decorator @axon. To add a help entry for the function, add @help("Help message.") To create a new command category, run this from the root directory: python newbrains.py category_name This will create a file called category_name.py in brainmeats, with a class Category_name. Loading of this class will be automated, no other files need to be altered. Philosophies =========== Don't nest logic when you can short circuit. BAD: if blah: for x in stuff: do stuff GOOD: if not blah: return for x in stuff: do stuff Try to stick to single quotes wherever possible. String interpolation is better than adding up strings. I'm totally not great at remembering this, but I'm trying. When using in the chat room, you can pipe commands, i.e.: -babble Zaphod | -tweet ... will tweet whatever babble spits out. If you want a function to be pipeable to other functions, return the output instead of just chatting from the function. Why would anyone add piping to a chat bot? I dunno. Things got out of hand. To Do ===== + Probably make this readme better + add tweet at in twitting + phase out pageopen for Browse (possibly phaseout requests module) + reddit command breaks without specified subreddit + Clean up broca, decide what to do with it + link holdem to db, make persistant, open up sit/in/out functionality + finish holdem, needs testing and split pots probably don't work + stock game: account for splits and reverse splits + add @requires decorator, check for server, redis, mongo, have -features command to check. Function by function level?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.