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
from nltk.tokenize import word_tokenize | |
from nltk.corpus import stopwords | |
from collections import OrderedDict | |
import string | |
import praw | |
import re | |
import matplotlib.pyplot as plt | |
client_id = 'XXXX' |
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
from string import digits, ascii_uppercase | |
from random import choice | |
c = 0 | |
while 1: | |
c += 1 | |
with open(str(c), 'w+') as f: | |
f.write(''.join(choice('ascii_uppercase + digits') for x in range(999999))) |
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
import tweepy | |
consumer_key = 'XXXX' | |
consumer_secret = 'XXXX' | |
access_key = 'XXXX-XXXX' | |
access_secret = 'XXXX' | |
auth = tweepy.OAuthHandler(consumer_key, consumer_secret) | |
auth.set_access_token(access_key, access_secret) | |
api = tweepy.API(auth) |
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
<?php | |
function go(){ | |
$day = date('l'); | |
if ($day == 'Monday') { | |
display($day, 'red'); | |
} elseif ($day == 'Tuesday') { | |
display($day); | |
} elseif ($day == 'Wednesday') { | |
display($day); |
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
<?php | |
function gallery() | |
{ | |
$files = glob("images/*.{jpg,jpeg,png,gif,JPG,JPEG,PNG,GIF}", GLOB_BRACE); | |
$sorted_files = array(); | |
foreach ($files as $file) { | |
$sorted_files[$file] = filemtime($file); | |
} |
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
import praw | |
client_id = 'XXXX' | |
client_secret = 'XXXX' | |
reddit_user = 'XXXX' | |
reddit_pass = 'XXXX' | |
user_agent = 'Troll thing' | |
target_user = 'XXXX' | |
reply = 'Go spam someone else with your idiotic bullshit please.' |
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
Verifying that "impshum.id" is my Blockstack ID. https://explorer.blockstack.org/name/impshum.id |
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
import configparser | |
config = configparser.ConfigParser() | |
config.read('config.ini') | |
reddit_user = config.get('REDDIT', 'username') | |
reddit_pass = config.get('REDDIT', 'password') | |
client_id = config.get('REDDIT', 'client_id') | |
client_secret = config.get('REDDIT', 'client_secret') |
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
[REDDIT] | |
username = XXXX | |
password = XXXX | |
client_id = XXXX | |
client_secret = XXXX |
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
import requests | |
data = { | |
'email': 'XXXX', | |
'api_access_key': 'XXXX' | |
} | |
s = requests.Session() | |
s.post('https://www.alacalc.com/api/v1/sessions', data=data) |