This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Twitter bot that tweets a random line from a file. | |
Uses Twisted to periodically select a random line from an input file, | |
and Twython to post it to Twitter using your credentials. | |
Usage: python twitterbot.py file.txt, where each line in file.txt is | |
a single sentence terminated by a newline ('\n'). | |
""" | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from scipy.io import wavfile | |
import os | |
import numpy as np | |
import argparse | |
from tqdm import tqdm | |
# Utility functions |