Skip to content

Instantly share code, notes, and snippets.

@shreeshga
shreeshga / example1.py
Created November 16, 2011 23:16 — forked from onyxfish/example1.py
Basic example of using NLTK for name entity extraction.
import nltk
with open('sample.txt', 'r') as f:
sample = f.read()
sentences = nltk.sent_tokenize(sample)
tokenized_sentences = [nltk.word_tokenize(sentence) for sentence in sentences]
tagged_sentences = [nltk.pos_tag(sentence) for sentence in tokenized_sentences]
chunked_sentences = nltk.batch_ne_chunk(tagged_sentences, binary=True)
@shreeshga
shreeshga / make-eclipse-projects.bash
Created March 28, 2012 04:03 — forked from ibrahima/make-eclipse-projects.bash
Bash script to generate eclipse projects for all ROS projects in the current directory
#!/usr/bin/env bash
echo "Generating eclipse projects for all ROS projects in this directory"
for MKFILE in `find $PWD -name Makefile`; do
DIR=`dirname $MKFILE`
echo $DIR
cd $DIR
make eclipse-project
done
/**
* CSS theme for the Clearly browser extension by Evernote.
* See: www.evernote.com/clearly/
*
* Options used alongside this CSS:
*
* Fonts:
* Body font: Ubuntu
* Header font: Verdana, Helvetica
* Monospace font: Droid Sans Mono
// THIS IS A BETA! I DON'T RECOMMEND USING IT IN PRODUCTION CODE JUST YET
/*
* Copyright 2012 Roman Nurik
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail
# Make sure you have IMAP enabled in your gmail settings.
# Right now it won't download same file name twice even if their contents are different.
import email
import getpass, imaplib
import os
import sys
detach_dir = '.'