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 python3 | |
# -*- coding: utf-8 -*- | |
import requests | |
from bs4 import BeautifulSoup | |
from pprint import pprint | |
r = \ | |
requests.get('http://www.vanityfair.com/society/2014/06/monica-lewinsky-humiliation-culture') | |
soup = BeautifulSoup(r.text, "lxml") |
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 python3 | |
#-*- coding: utf-8 -*- | |
""" | |
Make a password generator with options for weak to strong. | |
Weak should select a word or two from a list, strong should contain | |
uppercase, lowercase, symbols and numbers. | |
""" | |
from sys import exit |
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 python3 | |
#-*- coding: utf-8 -*- | |
""" | |
Ask user size of gameboard and print to screen | |
""" | |
while True: | |
try: | |
size = int(input("How many squares on a side? ")) |
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 python3 | |
#-*- coding: utf-8 -*- | |
""" | |
Check matrix list for win in Tic-tac-toe | |
""" | |
from itertools import chain | |
winner_is_1 = [[1, 2, 0], | |
[2, 1, 0], |
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
*.pyc | |
__pycache__/ | |
.DS_Store | |
__MACOSX__ | |
*.pyo | |
*.swp | |
adventbase.py | |
*input.txt |
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
def hang_graphics(): | |
"""graphs from https://gist.github.com/devdarren/4199441""" | |
yield """ | |
________ | |
| | | |
| | |
| | |
| | |
|""" | |
yield """ |
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 python3 | |
from base64 import b64decode | |
f = open('lol.txt', 'r') | |
string = str(f.read()) | |
f.close() | |
print("Decoding...") | |
while True: |
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 python3 | |
# This script requires the chardet library for python3 | |
# the RC4 implementation used in this script is attributed to Ryosuke Ito | |
# it (and installation instructions) can be found at https://github.com/manicmaniac/arc4.git | |
import sys | |
from arc4 import ARC4 | |
import chardet | |
from string import ascii_uppercase, ascii_lowercase, digits | |
from itertools import product |
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 python3 | |
import hashlib | |
import whirlpool | |
import sys | |
algo = sys.argv[1] | |
target = sys.argv[2] | |
def gen_hash(algo, target): |
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 python3 | |
"""Script to encode & decode strings to and from Base64""" | |
import sys | |
import argparse | |
CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" | |
PAD = "=" | |
LINE_WIDTH = 76 |
OlderNewer