This file contains hidden or 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/perl -w # camel code | |
| use strict; | |
| $_='ev | |
| al("seek\040D | |
| ATA,0, 0;");foreach(1..3) | |
| {<DATA>;}my @camel1hump;my$camel; | |
| my$Camel ;while( <DATA>){$_=sprintf("%-6 | |
| 9s",$_);my@dromedary 1=split(//);if(defined($ | |
| _=<DATA>)){@camel1hum p=split(//);}while(@dromeda |
This file contains hidden or 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
| SHELL = /bin/sh | |
| CC = gcc | |
| FLAGS = -I /usr/local/include/modbus | |
| LDIR = /usr/local/lib | |
| LIBS = -lmodbus | |
| %: %.c | |
| $(CC) $(FLAGS) $^ -o $@ -L$(LDIR) $(LIBS) |
This file contains hidden or 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
| apt-get install -y build-essential \ | |
| # development \ | |
| git mercurial roxterm curl gawk \ | |
| libpcre3-dev libssl-dev \ | |
| qt4-dev-tools libqt4-dev libqt4-core libqt4-gui libqt4-opengl libqt4-network \ | |
| libssl-dev libdb5.1++-dev libboost-all-dev libqrencode-dev libminiupnpc-dev \ | |
| python-all-dev python-lxml python-magic python-imaging python-pip python-pandas \ | |
| erlang \ | |
| # word processing \ | |
| texlive-latex-base latex2rtf texlive-full \ |
This file contains hidden or 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/sh | |
| # since mac osx does not have the sha1sum tool installed | |
| # this script gets openssl to produce the same output | |
| if [ $# -ne 1 ] | |
| then | |
| echo "Usage:\n\n$0 [file to check]" | |
| else | |
| openssl sha1 $1 | sed 's/.*(\(.*\))= \(.*\)$/\2 \1/' |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <sys/time.h> | |
| #include <pthread.h> | |
| void *listen(void *timestamp) { | |
| int c; | |
| while((c = getc(stdin)) != EOF) { | |
| if( c == '\n' ) { |
This file contains hidden or 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
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "math/rand" | |
| "os" | |
| "time" | |
| ) |
This file contains hidden or 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
| # | |
| # mouseTrackPlot.R | |
| # | |
| # Functions to plot the data logged by the buckabuckaboo plugin (https://github.com/dpapathanasiou/buckabuckaboo) | |
| # as an animated sequence of lines per distinct IP address (visitor) against a grayed-out background image | |
| # which represents the page on the site being monitored using R (http://www.r-project.org/). | |
| # | |
| # To run this inside an R repl, use these commands: | |
| # | |
| # > source("mouseTrackPlot.R") |
This file contains hidden or 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 | |
| from lxml import etree | |
| def get_text_from_msmt_xml (xml): | |
| """Parse the xml string returned by the MS machine translation API, and return just the text""" | |
| text = [] | |
| doc = etree.fromstring(xml) | |
| for elem in doc.xpath('/foo:string', namespaces={'foo': 'http://schemas.microsoft.com/2003/10/Serialization/'}): |
This file contains hidden or 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 | |
| """ | |
| msmt.py | |
| Functions to access the Microsoft Translator API HTTP Interface, using python's urllib/urllib2 libraries | |
| """ | |
| import urllib, urllib2 |
This file contains hidden or 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
| """ | |
| A series of functions to extract just the text from html page articles | |
| """ | |
| from lxml import etree | |
| default_encoding = "utf-8" | |
| def newyorker_fp (html_text, page_encoding=default_encoding): | |
| """For the articles found on the 'Financial Page' section of the New Yorker's website |
OlderNewer