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
#define _POSIX_C_SOURCE 199309L | |
//#define DEBUG | |
#include <Imlib2.h> | |
#include <X11/Xatom.h> | |
#include <X11/Xlib.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <dirent.h> | |
#include <X11/Xlib.h> | |
#include <Imlib2.h> | |
#include <unistd.h> | |
int main(int argc, char *argv[]) { | |
if (argc < 4 || argc > 5) { | |
fprintf(stderr, "Usage: %s <image_folder> <frame_delay> <screen_number> [loop]\n", argv[0]); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>MiniCodepenClone</title> | |
<style> | |
body,textarea,iframe{ margin:0; box-sizing:border-box; } | |
textarea,iframe { width:100%; height:50vh; float:left; } | |
textarea { color:#eee; background:#111; font-family:monospace; font-size:11pt; line-height:1.4; width:33.33%; } | |
#shareBtn { position:absolute; bottom:0; left:0; } |
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
require './xmldsl' | |
Twitter = Struct.new :name, :avatar, :text | |
twitters = [] | |
5.times { twitters << Twitter.new("Jonas", "/profile.png", "Hello World!") } | |
xml = XML.generate do | |
html do | |
body do | |
twitters.each do |tw| |
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
# USAGE: Hash.from_xml(YOUR_XML_STRING)require 'rubygems' | |
require 'nokogiri' | |
# modified from http://stackoverflow.com/questions/1230741/convert-a-nokogiri-document-to-a-ruby-hash/1231297#123129 | |
7 | |
class Hash | |
class << self | |
def from_xml(xml_io) | |
begin | |
result = Nokogiri::XML(xml_io) |
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
# space150 vine-to-GIF | |
# given a vine.co uri, downloads the MP4 and creates an image sequence / GIF from it | |
# requires ruby, ffmpeg, and imagemagick | |
require 'open-uri' | |
require 'nokogiri' | |
id = ARGV[0] | |
# try to convert from URL to id. |
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
http://www.ling.upenn.edu/courses/Fall_2003/ling001/penn_treebank_pos.html | |
http://code.google.com/p/nltk/source/browse/trunk/nltk | |
http://wordnet.princeton.edu/wordnet/download/ | |
http://code.google.com/p/nltk/source/browse/trunk/nltk/nltk/chunk/named_entity.py | |
http://www.writingcentre.uottawa.ca/hypergrammar/subjpred.html | |
http://nlp.stanford.edu/software/crf-faq.shtml | |
http://sourceforge.net/apps/mediawiki/opennlp/index.php?title=Name_Finder | |
http://en.wikipedia.org/wiki/Sentiment_analysis | |
http://arxiv.org/pdf/cs.LG/0212032 | |
http://www.scribd.com/doc/7865458/the-learning-chatbot |
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
// Open form and submit enquire for `rego` | |
function getInfo(rego) { | |
horseman | |
.userAgent('Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0') | |
.open(url) | |
.type('#registration-number-ctrl input[type=text]', rego) | |
.click('.btn-holder input') | |
.waitForSelector('.ctrl-holder.ctrl-readonly') | |
.html() | |
.then(function(body) { |
NewerOlder