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
# Generated by Topology Generator for Network Simulator (c) | |
set val(chan) Channel/WirelessChannel ;# channel type | |
set val(prop) Propagation/TwoRayGround ;# radio-propagation model | |
set val(netif) Phy/WirelessPhy/802_15_4 ;# network interface type | |
set val(mac) Mac/802_15_4 ;# MAC type | |
set val(ifq) Queue/DropTail/PriQueue ;# interface queue type | |
set val(ll) LL ;# link layer type | |
set val(ant) Antenna/OmniAntenna ;# antenna model | |
set val(ifqlen) 100 ;# max packet in ifq | |
set val(nn) 500 ;# number of mobilenodes |
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 numpy as np | |
from matplotlib import pyplot as plt | |
#### From XKCD plot generator | |
""" | |
XKCD plot generator | |
------------------- | |
Author: Jake Vanderplas | |
This is a script that will take any matplotlib line diagram, and convert it |
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 this paper: http://acl.ldc.upenn.edu/acl2004/emnlp/pdf/Mihalcea.pdf | |
I used python with nltk, and pygraph to do an implmentation of of textrank. | |
""" | |
import nltk | |
import itertools |
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 threading, urllib2 | |
import Queue | |
def read_url(url, queue): | |
try: | |
data = urllib2.urlopen(url).read() | |
except urllib2.HTTPError, e: | |
checksLogger.error('HTTPError = ' + str(e.code)) | |
except urllib2.URLError, e: | |
checksLogger.error('URLError = ' + str(e.reason)) |
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 networkx as nx | |
import numpy as np | |
from nltk.tokenize.punkt import PunktSentenceTokenizer | |
from sklearn.feature_extraction.text import TfidfTransformer, CountVectorizer | |
def textrank(document): | |
sentence_tokenizer = PunktSentenceTokenizer() | |
sentences = sentence_tokenizer.tokenize(document) | |
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
arch=$(uname -m) | |
if [ "$arch" == "i686" -o "$arch" == "i386" -o "$arch" == "i486" -o "$arch" == "i586" ]; then | |
flag=1 | |
else | |
flag=0 | |
fi | |
echo "Installing OpenCV 2.4.3" | |
mkdir OpenCV | |
cd OpenCV | |
echo "Removing any pre-installed ffmpeg and x264" |
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
arch=$(uname -m) | |
if [ "$arch" == "i686" -o "$arch" == "i386" -o "$arch" == "i486" -o "$arch" == "i586" ]; then | |
flag=1 | |
else | |
flag=0 | |
fi | |
echo "Installing OpenCV 2.4.3" | |
mkdir OpenCV | |
cd OpenCV | |
echo "Removing any pre-installed ffmpeg and x264" |
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
arch=$(uname -m) | |
if [ "$arch" == "i686" -o "$arch" == "i386" -o "$arch" == "i486" -o "$arch" == "i586" ]; then | |
flag=1 | |
else | |
flag=0 | |
fi | |
echo "Installing OpenCV 2.4.3" | |
mkdir OpenCV | |
cd OpenCV | |
echo "Removing any pre-installed ffmpeg and x264" |
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
arch=$(uname -m) | |
if [ "$arch" == "i686" -o "$arch" == "i386" -o "$arch" == "i486" -o "$arch" == "i586" ]; then | |
flag=1 | |
else | |
flag=0 | |
fi | |
echo "Installing OpenCV 2.4.3" | |
mkdir OpenCV | |
cd OpenCV | |
echo "Removing any pre-installed ffmpeg and x264" |
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
arch=$(uname -m) | |
if [ "$arch" == "i686" -o "$arch" == "i386" -o "$arch" == "i486" -o "$arch" == "i586" ]; then | |
flag=1 | |
else | |
flag=0 | |
fi | |
echo "Installing OpenCV 2.4.3" | |
mkdir OpenCV | |
cd OpenCV | |
echo "Removing any pre-installed ffmpeg and x264" |
OlderNewer