Skip to content

Instantly share code, notes, and snippets.

Harlo Holmes/LvH harlo

  • NYC
Block or report user

Report or block harlo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@harlo
harlo / .gitignore
Last active Aug 29, 2015
conf tools i use a lot
@harlo
harlo / PixelKnotRandomPhraseGenerator.java
Last active Aug 29, 2015
Random Passphrase Generation in Android using the Spell Checker :)
View PixelKnotRandomPhraseGenerator.java
package info.guardianproject.pixelknot.utils;
import java.util.ArrayList;
import java.util.Random;
import android.content.Context;
import android.view.textservice.SentenceSuggestionsInfo;
import android.view.textservice.SpellCheckerSession;
import android.view.textservice.SpellCheckerSession.SpellCheckerSessionListener;
import android.view.textservice.SuggestionsInfo;
@harlo
harlo / get_image_info.py
Last active Aug 29, 2015
threading together some screenshot pngs to video
View get_image_info.py
def get_image_info(data):
"""
FROM http://markasread.net/post/17551554979/get-image-size-info-using-pure-python-code
Return (content_type, width, height) for a given img file content
no requirements
"""
import struct
data = str(data)
@harlo
harlo / Dockerfile
Created Jan 1, 2015
Globaleaks Dockerfile
View Dockerfile
FROM ubuntu:14.04
MAINTAINER harlo <harlo.holmes@gmail.com>
# UPDATE
RUN apt-get update
RUN apt-get -yq install openssl python-dev make curl openssh-server
RUN useradd -ms /bin/bash -p $(openssl passwd -1 'YOUR PASSWORD, DINGUS') globaleaks
RUN adduser globaleaks sudo
@harlo
harlo / page_map_to_csv.py
Created Dec 10, 2014
real quick word count json-to-csv for deeplab
View page_map_to_csv.py
from sys import argv, exit
def page_map_to_csv(file_in, file_out=None):
import os
if not os.path.exists(file_in):
print "NOPE: %s is not there" % file_in
return False
from json import loads
View createGensimObjects.py
def createGensimObjects(task):
task_tag = "GENSIM TOPIC EXTRACTION"
print "\n\n************** %s [START] ******************\n" % task_tag
print "USING TEXT DOCUMENT at %s" % task.doc_id
task.setStatus(302)
from lib.Worker.Models.uv_document import UnveillanceDocument
from conf import DEBUG
from vars import ASSET_TAGS
View generatePageMap.py
def generatePageMap(uv_task):
task_tag = "PAGE MAPPER"
print "\n\n************** %s [START] ******************\n" % task_tag
print "MAPPING PAGES FROM TEXT DOCUMENT at %s" % uv_task.doc_id
uv_task.setStatus(302)
from lib.Worker.Models.uv_document import UnveillanceDocument
from conf import DEBUG
from vars import ASSET_TAGS
@harlo
harlo / extractNEREntities.py
Last active Aug 29, 2015
extractNEREntities
View extractNEREntities.py
def extractNEREntities(task):
task_tag = "NER ENTITY EXTRACTION"
print "\n\n************** %s [START] ******************\n" % task_tag
print "TOKENIZING TEXT DOCUMENT at %s" % task.doc_id
task.setStatus(302)
from lib.Worker.Models.uv_document import UnveillanceDocument
from conf import DEBUG
from vars import ASSET_TAGS
View buildGensimDictionary.py
def buildGensimDictionary(uv_task):
task_tag = "BUILDING GENSIM DICTIONARY!!!"
print "\n\n************** %s [START] ******************\n" % task_tag
uv_task.setStatus(302)
import os
from conf import DEBUG, getConfig
dictionary_dir = getConfig('compass.gensim.training_data')
@harlo
harlo / keybase.md
Last active Jun 4, 2018
current keybase verrification
View keybase.md

Keybase proof

I hereby claim:

  • I am harlo on github.
  • I am harlo (https://keybase.io/harlo) on keybase.
  • I have a public key whose fingerprint is 4422 F773 B498 8C77 F99D 287E 655C 2E48 33B8 2A02

To claim this, I am signing this object:

You can’t perform that action at this time.