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 pyttsx | |
import speech_recognition as sr | |
from console_logging import console | |
import sys | |
import os | |
import requests | |
_this = sys.modules[__name__] | |
console.info("Initializing TTS engine...") |
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 selenium.webdriver.chrome.options import Options | |
opts = Options() | |
opts.add_argument("headless") | |
# opts.add_argument('no-sandbox') | |
opts.add_argument('window-size=1200x600') | |
opts.add_argument('disable-gpu') | |
opts.add_argument( | |
"user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36") | |
driver = webdriver.Chrome(chrome_options=opts) |
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 time import sleep | |
from math import log | |
from multiprocessing.dummy import Pool | |
nums = [float(x) for x in input('Positive numbers to sort, delimited by space: ').split(' ')] | |
def sleepsort(x): sleep(log(x)); print(x, end=' ') # O(log(n)) :) | |
pool=Pool(10) | |
pool.map(sleepsort, nums) |
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
wget https://www.imagemagick.org/download/ImageMagick.tar.gz | |
tar xvzf ImageMagick.tar.gz | |
cd ImageMagick-* | |
./configure | |
make | |
sudo make install | |
sudo ldconfig /usr/local/lib |
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 sys | |
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
from time import sleep | |
# import star_me_daddy.utils | |
from console_logging.console import Console | |
console = Console() | |
from multiprocessing.dummy import Pool |
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 sanic import Sanic | |
from sanic.response import stream | |
from sanic_cors import CORS, cross_origin | |
from time import sleep | |
app = Sanic() | |
CORS(app) | |
@app.route('/api', methods=['POST']) |
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 sumy.parsers.plaintext import PlaintextParser | |
from sumy.nlp.tokenizers import Tokenizer | |
from sumy.summarizers.lsa import LsaSummarizer as Summarizer | |
from sumy.nlp.stemmers import Stemmer | |
from sumy.utils import get_stop_words | |
LANG = "english" | |
tokenizer = Tokenizer(LANG) | |
stemmer = Stemmer(LANG) | |
summarizer = Summarizer(stemmer) |
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
# a million commits | |
for Y in {1999..2018} | |
do | |
mkdir $Y | |
cd $Y | |
for M in {01..12} | |
do | |
mkdir $M | |
cd $M | |
for D in {01..31} |
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 logging | |
import ldap, ldap.filter | |
def connect(): | |
conn = ldap.initialize('ldaps://unixldap.cc.ic.ac.uk') | |
conn.simple_bind_s() | |
return conn | |
def search(conn, user, return_list=True): | |
if not isinstance(user, list): |
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 my Blockstack ID is secured with the address 1BYhPgFNU3o7hrgNoVotnESwm6NkUw1KXP https://explorer.blockstack.org/address/1BYhPgFNU3o7hrgNoVotnESwm6NkUw1KXP |
OlderNewer