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 'anemone' | |
class Desmgidf | |
puts 'Starting crawl..' | |
file = File.open('desmgidf.html', 'w') | |
file.write %Q{ | |
<html> | |
<head> | |
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> |
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 'anemone' | |
class Fhf | |
puts 'Starting crawl..' | |
file = File.open('fhf.html', 'w') | |
file.write %Q{ | |
<html> | |
<head> | |
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> |
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
/** | |
* @author yawo | |
* | |
*/ | |
package com.yawozone | |
import org.apache.hadoop.hbase.CellUtil | |
import org.apache.hadoop.hbase.HBaseConfiguration | |
import org.apache.hadoop.hbase.client.Result |
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
bestLength = Integer.MAX_VALUE | |
bestVertex = null | |
magicPhrase = new Scanner(System.in).nextLine() | |
start = System.currentTimeMillis() | |
magicPhraseLength = magicPhrase.length() | |
voidState = [' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ' | |
,' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '] | |
stopTime = 1800 | |
chars = [' ':0,'A':1,'B':2,'C':3,'D':4,'E':5,'F':6,'G':7,'H':8,'I':9,'J':10,'K':11,'L':12, |
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
#!/bin/sh | |
#Split | |
grep AddToCartEvent events.tsv | sed -e "s/\([^,]*,\)\{2\}\([^,]*\),[^,]*,\([^,]*\),\([^,]*,\)\{3\}\([^,]*\),\([^,]*,\)\{5\}\([^,]*\).*/\2_\3_\5_\7,\3,\5,\7/g" >> addtocart.tsv | |
grep ProductDetailPageViewEvent events.tsv | sed -e "s/\([^,]*,\)\{2\}\([^,]*\),[^,]*,\([^,]*\),\([^,]*,\)\{3\}\([^,]*\),\([^,]*,\)\{5\}\([^,]*\).*/\2_\3_\5_\7,\3,\5,\7/g" >> view.tsv | |
#grep ProductDetailPageViewEvent events.tsv | sed -e 's/\([^,]*,\)\{2\}\([^,]*\),[^,]*,\([^,]*\),\([^,]*,\)\{3\}\([^,]*\),\([^,]*,\)\{5\}\([^,]*\).*/\2,\3,\5,\7/g' >> view.tsv | |
#Load in Hbase | |
$HBASE_HOME/bin/hbase org.apache.hadoop.hbase.mapreduce.ImportTsv -Dimporttsv.separator=, -Dimporttsv.columns=HBASE_ROW_KEY,u:id,p:id,c:id addtocart addtocart.tsv | |
$HBASE_HOME/bin/hbase org.apache.hadoop.hbase.mapreduce.ImportTsv -Dimporttsv.separator=, -Dimporttsv.columns=HBASE_ROW_KEY,u:id,p:id,c:id view view.tsv |
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 (drop-ext str) | |
(unbreakupstr (butlast (strbreakup str ".")) ".") | |
) | |
; extract basename without ext | |
;=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | |
( define ( script-fu-whitenbackground | |
sourceDirectory targetDirectory ) | |
( let* | |
( |
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
; extract basename without ext | |
(define (drop-ext str) | |
(unbreakupstr (butlast (strbreakup str ".")) ".") | |
) | |
(define (maxsize img) | |
(max (car (gimp-image-width img)) (car (gimp-image-height img))) | |
) | |
(define (offsets img) |
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
(function(){function r(e){return Function("data,subst",n(t(e)))}var e={PATH:1,SELECTOR:2,OBJ_PRED:3,POS_PRED:4,LOGICAL_EXPR:5,COMPARISON_EXPR:6,MATH_EXPR:7,CONCAT_EXPR:8,UNARY_EXPR:9,POS_EXPR:10,LITERAL:11},t=function(){function u(e){r=e.split(""),i=0,s=null,o=r.length;var n=a(),u=P();return u.type!==t.EOP&&z(u),n}function a(){var t=f(),n;while(k("|"))P(),(n||(n=[t])).push(f());return n?{type:e.CONCAT_EXPR,args:n}:t}function f(){return k("(")?l():h()}function l(){M("(");var t=a();M(")");var n=[],r;while(r=c())n.push(r);return n.length?t.type===e.PATH?(t.parts=t.parts.concat(n),t):(n.unshift(t),{type:e.PATH,parts:n}):t}function c(){if(k("["))return v();if(k("{"))return m();if(k("("))return l()}function h(){L()||z(P());var t=!1,n;k("^")?(P(),t=!0):O()&&(n=P().val.substr(1));var r=[],i;while(i=p())r.push(i);return{type:e.PATH,fromRoot:t,subst:n,parts:r}}function p(){return A()?d():c()}function d(){var n=P().val,r=_(),i;if(k("*")||r.type===t.ID||r.type===t.STR)i=P().val;return{type:e.SELECTOR,selector:n,prop:i}}f |
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
$(document).ready(function() { | |
$.ajaxSetup({ | |
cache: true | |
}); | |
$.getScript('//connect.facebook.net/en_US/sdk.js', function() { | |
FB.init({ | |
appId: 'YOUR APPID', //281707958585235 | |
version: 'v2.8' // or v2.1, v2.2, v2.3, ... | |
}); | |
updateFeeds({privacy:{value:'SELF'}}); |
OlderNewer