This file contains hidden or 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 argparse | |
import sys | |
from PIL import Image | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser( | |
sys.argv[0], description='Convert image to binary.') | |
parser.add_argument('file', type=argparse.FileType('rb')) |
This file contains hidden or 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 argparse | |
import os | |
import subprocess | |
# install deps: | |
# $ pip install requests mercurial | |
import requests | |
# Create an OAuth Consumer with Account and Repository Read permission: |
This file contains hidden or 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
In [1]: import xmltodict | |
In [14]: print(data) | |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<server> | |
<response> | |
<status>ok</status> | |
<actions> | |
<action> | |
<subsystem>hourChooser</subsystem> |
This file contains hidden or 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 | |
# Simple multi-processing web crawler, following all a.href's that end in a '/'. | |
import os | |
import traceback | |
from itertools import chain | |
from multiprocessing import Pool | |
from time import time | |
from urllib.parse import urljoin | |
from bs4 import BeautifulSoup |
OlderNewer