Skip to content

Instantly share code, notes, and snippets.

View Keinta15's full-sized avatar

Keinta15

  • Puerto Rico
View GitHub Profile
@Keinta15
Keinta15 / clear_text_lines.py
Created September 19, 2019 23:33
Remove blank lines from a .txt file
# Before checking we strip leading and trailing characters
# Check if the line is not empty
with open("empty.txt", 'r') as inp, open('out.txt', 'w') as out:
for line in inp:
if line.strip():
out.write(line)
# Before checking we strip only trailing characters
# Check if the line is not empty
with open("empty.txt", 'r') as inp, open('out.txt', 'w') as out:
@Keinta15
Keinta15 / tweet_dumper.py
Last active September 19, 2019 23:34 — forked from yanofsky/LICENSE
A script to download all of a user's tweets into a csv updated to Python 3.+
#Edited for python 3
import tweepy #https://github.com/tweepy/tweepy
import csv
#Twitter API credentials
consumer_key = ""
consumer_secret = ""
access_key = ""
access_secret = ""