- Switch back to SQL.
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 | |
# This is a really simple implementation of ELA as described in | |
# http://blackhat.com/presentations/bh-dc-08/Krawetz/Whitepaper/bh-dc-08-krawetz-WP.pdf | |
# You shouldn't actually use it, or at least read the paper carefully | |
# and implement more of the techniques before drawing any conclusions. | |
from PIL import Image, ImageChops, ImageEnhance | |
import sys, os.path |
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
(function() { | |
/* First try to handle pages which are actually raw text of the email. | |
Extract the HTML part and replace page with it */ | |
var orig_html = document.getElementsByTagName('html')[0].textContent; | |
var extracted_html = orig_html; | |
/* Try splitting it up if it's actually the multipart email. Otherwise, work | |
on the document itself, leaving the orig_html in place */ | |
var boundary_pattern = '--==============='; | |
while (extracted_html.indexOf(boundary_pattern) != -1) { | |
var next_boundary = extracted_html.indexOf(boundary_pattern); |
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
✘-1 ~/confluent/blueway.git [norwood-if-you-build-it|✔] | |
14:17 $ mvn clean package | |
[INFO] Scanning for projects... | |
[INFO] | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Building blueway 2.1.0-SNAPSHOT | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] | |
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ blueway --- | |
[INFO] |
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 mrjob.job import MRJob | |
class JoinExample(MRJob): | |
def mapper(self, id, record): | |
# Use both large files as input. If you have orders and | |
# customers, you'll have as input either | |
# order_id, order_data | |
# or | |
# customer_id, customer_data | |
# In this case, I assume both have a customerID field to join |
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
<html> | |
<head><title>x</title></head> | |
<body> | |
<p>Hello</p> | |
</body> | |
</html> |
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
#!/bin/bash | |
sudo apt-get install \ | |
git-core cmake sed unzip zip automake1.9 nvidia-cg-toolkit jam g++ \ | |
libzzip-dev libxt-dev libxaw7-dev libxxf86vm-dev libxrandr-dev libfreetype6-dev \ | |
libxext-dev autoconf libtool libpcre3-dev flex bison patch libbz2-dev gawk \ | |
libglu1-mesa-dev tofrodos freeglut3-dev scons libexpat1-dev \ | |
libgtk2.0-dev libnss3-dev libgconf2-dev gperf libasound2-dev subversion \ | |
libtool autoconf ruby flex libgsl0-dev libssl-dev libspeex-dev libxss-dev \ | |
libdbus-glib-1-dev libgnome-keyring-dev libxml2-dev libjpeg62-dev libcups2-dev \ |
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
Traceback (most recent call last): | |
File "/usr/local/lib/python2.6/dist-packages/django/core/servers/basehttp.py", line 283, in run | |
self.result = application(self.environ, self.start_response) | |
File "/usr/local/lib/python2.6/dist-packages/django/contrib/staticfiles/handlers.py", line 68, in __call__ | |
return self.application(environ, start_response) | |
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/wsgi.py", line 272, in __call__ | |
response = self.get_response(request) | |
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 169, in get_response | |
response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) | |
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py", line 111, in get_response |
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
[2012-02-14 12:06:43,033: ERROR/MainProcess] Task celery_tasks.import_upload.place_upload[f66700e8-34b5-4abc-ab6c-f5f0a30bb6a6] raised exception: TypeError("cannot concatenate 'str' and 'NoneType' objects",) | |
Traceback (most recent call last): | |
File "/usr/local/lib/python2.6/dist-packages/celery/execute/trace.py", line 150, in trace_task | |
R = retval = task(*args, **kwargs) | |
File "/home/ewencp/sirikata-cdn.git/sirikata-cdn/celery_tasks/import_upload.py", line 207, in place_upload | |
(collada_obj, subfile_data, image_objs) = get_collada_and_images(zip, dae_zip_name, dae_data, subfiles, subfile_getter=eph_subfile_getter) | |
File "/home/ewencp/sirikata-cdn.git/sirikata-cdn/celery_tasks/import_upload.py", line 108, in get_collada_and_images | |
col = coll.Collada(StringIO(dae_data)) | |
File "/usr/local/lib/python2.6/dist-packages/collada/__init__.py", line 204, in __init__ | |
self._loadEffects() |
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
REM This entire upper block is for determining where Visual Studio is. Search for TOPDIR for the real code (after a big empty block) | |
@SET VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0 | |
@SET VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC | |
@SET FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework | |
@SET FrameworkVersion=v2.0.50727 | |
@SET Framework35Version=v3.5 | |
@if "%VSINSTALLDIR%"=="" goto error_no_VSINSTALLDIR | |
@if "%VCINSTALLDIR%"=="" goto error_no_VCINSTALLDIR |
NewerOlder