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
gem install bundler | |
git clone git://github.com/arlingtonruby/radbot.git | |
cd radbot | |
bundle |
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/python3 | |
#required libraries | |
import sys | |
import ssl | |
import paho.mqtt.client as mqtt | |
#called while client tries to establish connection with the server | |
def on_connect(mqttc, obj, flags, rc): | |
if rc==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
// Continuously higlights the custom elements on the page. This is useful | |
// if new custom elements are lazy loaded later on or you have a SPA | |
// that uses other elements. | |
// CE finding code from: https://gist.github.com/ebidel/4bdbe9db55d8a775d0a4 | |
(function() { | |
let cache = []; | |
function highlightCustomElements() { |
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
/* | |
Prints speaker notes for a reveal.js presentation. | |
To print the notes, run the js function PrintRevealNotes() | |
You need to disable the pop-up blocker | |
Copyright 2016 Patrick G | |
http://geek1011.github.io | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 io | |
import os | |
import pprint | |
import boto3 | |
import cv2 | |
import numpy as np | |
from PIL import Image, ImageOps | |
from skimage import img_as_float | |
from skimage.measure import compare_ssim as ssim |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 collections import defaultdict | |
import time | |
import irc.client | |
import pyaudio | |
from pymouse import PyMouse | |
from pykeyboard import PyKeyboard | |
import win32ui | |
import boto3 | |
polly = boto3.client('polly', region_name='us-east-1') |
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 pyaudio | |
import boto3 | |
polly = boto3.client('polly') | |
p = pyaudio.PyAudio() | |
resp = polly.synthesize_speech(Text="HELLO WORLD!", TextType="text", OutputFormat="pcm", VoiceId="Justin") | |
stream = p.open(format=p.get_format_from_width(width=2), channels=1, rate=16000, output=True) | |
stream.write(resp['AudioStream'].read()) | |
stream.stop_stream() | |
stream.close() |
OlderNewer