Tom Casavant

The purpose of this program is to read messages from Slack (https://slack.com/) and store them in a database using Mongo. We are also going to build all of this within a Docker, so that we can easily recreate the environment this program needs to run properly on other systems. Requirements:

Sep 02, 2017
3 minutes

On Reddit, there is a bot named autotldr (https://www.reddit.com/user/autotldr) who uses one of the various text summarizer websites (i.e. http://textsummarization.net/text-summarizer) to simplify different news articles posted on Reddit in a few sentences. This intrigued me, so I looked into it and there is, in fact, a Python library that allows you to summarize articles very easily called sumy (https://pypi.python.org/pypi/sumy). Install with “pip install sumy” The Twython Library (pip install Twython) also interfaces with the Streaming API from Twitter, and API which lets me read tweets in real time. This is what we’ll be using to create our AutoTLDR twitter account. Obviously, first you have to get your Twitter app credentials from https://dev.twitter.com/ and then create your config.ini file:

Apr 05, 2017
5 minutes

On my Spotify account, there is a single playlist, a playlist with 14 hours worth of music that has been accumulating for months upon months. One obvious problem with this is that I don’t want to listen to all this music all the time, I should have separate playlists depending on whether I am going for a run or trying to get to sleep. That’s where my python programming came in handy. A simple google search for “Spotify api” brought me to this page, https://developer.spotify.com/web-api/, which led me to the python wrapper Spotipy (https://spotipy.readthedocs.io/en/latest/). Once again you have to get all your prerequisites complete before you move onto the actual programming. So head over to https://developer.spotify.com/my-applications/#!/applications to get your Spotify API keys and then install via PIP the spotipy library. After those prerequisites go ahead and create your config.ini file as such:

Mar 30, 2017
8 minutes

Cleverbot recently released an official API (that allows for 5,000 free requests every month) and with that, I wanted to experiment with this chat AI. I started using a website called Slack (https://slack.com/) which is basically an easy way to communicate in large groups. So, I decided to combine the two and create a bot that would talk to people in this group chat. Prior to programming, you have to create an API key for both Slack and Cleverbot which is quite easy. You can follow the tutorial for creating a bot user in Slack here: https://api.slack.com/bot-users. The Cleverbot API is located here: https://www.cleverbot.com/api/ and all you need to do there is purchase the free API package. You will also need to install several libraries. Install slackclient and cleverwrap using pip. After generating all your API keys you can start with a config file. This, I learned, is necessary when loading sensitive information online as it keeps that data private. Python has a handy built-in library called ConfigParser that easily imports this data. Name your config file config.ini and add your API keys in there as such:

Mar 29, 2017
4 minutes

I was looking into different python libraries that might be interesting to use, when I encountered the markovify library (https://github.com/jsvine/markovify). This library allows the programmer to simply create Markov chains from pieces of text.

Feb 22, 2017
3 minutes