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 python | |
| # from pprint import pprint | |
| try: | |
| import urllib2 as request | |
| from urllib import quote | |
| except: | |
| from urllib import request | |
| from urllib.parse import quote | |
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 re | |
| import os | |
| import hashlib | |
| import requests | |
| import xmlrpc.client | |
| from pprint import pprint | |
| # key & secret from 'you-get' | |
| key = '85eb6835b0a1034e' |
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 requests | |
| prefix = 'https://api.telegram.org/bot' | |
| key = '' | |
| geturl = prefix + key + '/getUpdates' | |
| sendurl = prefix + key + '/sendMessage' | |
| timeout = 60 | |
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 stack | |
| -- stack --resolver global runghc --package turtle | |
| {-# LANGUAGE OverloadedStrings #-} | |
| import Turtle | |
| import qualified Data.Text as T | |
| parser :: Parser Text | |
| parser = argText "pkg" "Package name" |
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 sys | |
| from flask import Flask, request, send_file, render_template_string | |
| from werkzeug.utils import secure_filename | |
| from pathlib import Path | |
| app = Flask(__name__) | |
| BASEPATH = Path(sys.argv[1] if len(sys.argv) > 1 else '.') | |
| TEMPLATE = '''\ | |
| <!doctype html> |
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.5 | |
| import socket | |
| import asyncio | |
| from struct import pack, unpack | |
| class Client(asyncio.Protocol): | |
| def connection_made(self, transport): | |
| self.transport = transport | |
| self.server_transport = None |
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 socket | |
| import select | |
| import json | |
| s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| s.connect(('localhost', 4458)) | |
| results = [] | |
| saw = set() | |
| offset = 0 |
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 stack | |
| -- stack --resolver global runghc --package turtle | |
| {-# LANGUAGE OverloadedStrings #-} | |
| import Turtle | |
| import Filesystem.Path.CurrentOS (replaceExtension) | |
| main :: IO () | |
| main = sh $ do | |
| xml <- find (suffix ".xml") "." |
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
| open Core.Std | |
| let test_list = | |
| [["language";"architect" ;"first release"]; | |
| ["Lisp" ;"John McCarthy" ;"1958"]; | |
| ["C" ;"Dennis Ritchie";"1969"]; | |
| ["ML" ;"Robin Milner" ;"1973"]; | |
| ["OCaml" ;"Xavier Leroy" ;"1996"]] | |
| let make_seperator (widths : int list) : string = |
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 re | |
| import sys | |
| from pathlib import Path | |
| import dropbox | |
| app_key = '' | |
| app_secret = '' | |
| access_token = '' |