Skip to content

Instantly share code, notes, and snippets.

@dangayle
dangayle / twitterbot.py
Last active September 9, 2021 03:06
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').
"""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
@rudolfbyker
rudolfbyker / split_wav.py
Created April 25, 2017 10:35
Split WAV files at silence
#!/usr/bin/env python
from scipy.io import wavfile
import os
import numpy as np
import argparse
from tqdm import tqdm
# Utility functions