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
import requests | |
def auth(subscription_key): | |
url = 'https://api.cognitive.microsoft.com/sts/v1.0/issueToken?Subscription-Key=' + subscription_key | |
response = requests.post(url) | |
return response.text | |
def translate(text, token, from_language, to_language): |
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
#!/bin/bash | |
# | |
# Notify of Homebrew updates via Notification Center on Mac OS X | |
# | |
# Author: Chris Streeter http://www.chrisstreeter.com | |
# Requires: terminal-notifier. Install with: | |
# gem install terminal-notifier or brew install terminal-notifier | |
TERM_APP='/Applications/Terminal.app' | |
BREW_EXEC='/usr/local/bin/brew' |
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
__author__ = 'cdumitru' | |
from Crypto.PublicKey import RSA | |
from Crypto import Random | |
import gmpy | |
import base64 | |
#tup (tuple) - A tuple of long integers, with at least 2 and no more than 6 items. The items come in the following order: | |
#RSA modulus (n). |
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
__author__ = 'cdumitru' | |
import sys | |
from Crypto.Cipher import ARC4 | |
import numpy | |
import string | |
import itertools | |
from multiprocessing import Pool | |
from time import time | |
import cProfile |