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
//preserve originals | |
var ori = function() { | |
var self = this; | |
this.unescape = unescape; | |
this.alert = alert; | |
this.eval = eval; | |
this.fromCharCode = String.fromCharCode; | |
this.call_unescape = function(e) { | |
document.write("<br>original unescape was passed data"); |
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 | |
import smtplib | |
import socket | |
from email.mime.text import MIMEText | |
def sendmail(user): | |
sender = "admin@smscatfacts.com" | |
recv = user | |
subject = "Shave it up!" |
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 pycurl | |
import simplejson as json | |
import urllib | |
import time | |
import datetime | |
STREAM_URL = "https://stream.twitter.com/1/statuses/filter.json" | |
USER = "YOUR USERNAME" | |
PASS = "YOUR PASSWORD" |
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
var map = function () { | |
fhash = this.hash; | |
this.static.strings.forEach(function (z) {emit(z.name, {hash: fhash, count_sum: z.count, count: 1});}); | |
} | |
var reduce = function (key, values) { | |
var hashes = [];var total = 0;var count = 0;var stotal = 0; | |
for (var i = 0; i < values.length; i++) { | |
stotal += values[i].count; | |
total += values[i].count_sum; |
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
loggersS = set() | |
def logger(loggerName, level, logFile=None): | |
''' | |
Get a logging instance | |
@param loggerName name of the logging instance | |
@param level level in which to log | |
@param logFile the absolute path to the log file to use. you must have write perms for this! | |
@return logging object used for later on |
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/env python | |
"""PassiveTotal script to automate BePush processing based on monitors. | |
This script will query for the items in your account monitor list and use those | |
values in order to get all passive DNS notifications. Each notification will be | |
processed which includes tagging, classifying and sharing out to Facebook's | |
ThreatExchange. Running this script daily will essentially automate most of the | |
work required to keep up with BePush. | |
""" |
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/python | |
def poorMansConvert(di, inPath, outType, outPath): | |
from apiclient.http import MediaFileUpload | |
valid_output = [ | |
'text/html','text/plain','application/rtf','application/vnd.oasis.opendocument.text',\ | |
'application/pdf','application/vnd.openxmlformats-officedocument.wordprocessingml.document',\ | |
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','application/x-vnd.oasis.opendocument.spreadsheet',\ | |
'image/jpeg','image/png','image/svg+xml','application/vnd.openxmlformats-officedocument.presentationml.presentation' |
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
// ==UserScript== | |
// @name Auto-endorse LinkedIn Connections | |
// @require https://code.jquery.com/jquery-1.9.1.js | |
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js | |
// @version 0.6 | |
// @description Automatically endorse the user we are viewing for their top skills | |
// @author Brandon Dixon (@9bplus) | |
// @grant none | |
// @include https://www.linkedin.com/* | |
// ==/UserScript== |
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
"""Extract median, min and max pay data from Glassdoor for a given set of job titles.""" | |
from bs4 import BeautifulSoup | |
import requests | |
import sys | |
USER_AGENT = ("Mozilla/5.0 (Windows NT 6.1) " | |
"AppleWebKit/537.36 (KHTML, like Gecko) " | |
"Chrome/41.0.2228.0 Safari/537.36") |
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
"""Use image analysis to extract scores from coffee charts.""" | |
from PIL import Image, ImageFilter, ImageEnhance | |
from pytesseract import image_to_string | |
import cv2 | |
import os | |
import sys | |
import numpy as np | |