Skip to content

Instantly share code, notes, and snippets.

Maclaurin:guide pat$ find /usr/local -name libyaml*
/usr/local/Cellar/libyaml
/usr/local/Cellar/libyaml/0.1.4/lib/libyaml-0.2.dylib
/usr/local/Cellar/libyaml/0.1.4/lib/libyaml.a
/usr/local/Cellar/libyaml/0.1.4/lib/libyaml.dylib
/usr/local/Cellar/ruby/1.9.3-p0.old/share/ri/1.9.1/system/Psych/libyaml_version-c.ri
/usr/local/Cellar/ruby/1.9.3-p194/share/ri/1.9.1/system/Psych/libyaml_version-c.ri
/usr/local/Library/Formula/libyaml.rb
/usr/local/opt/libyaml
Maclaurin:guide pat$
package finderbots.recommenders.hadoop.mongo;
import com.google.code.morphia.Datastore;
import com.google.code.morphia.DatastoreImpl;
import com.google.code.morphia.Key;
import com.google.code.morphia.Morphia;
import com.google.code.morphia.dao.DAO;
import com.google.code.morphia.query.Query;
import com.google.code.morphia.query.QueryResults;
@pferrel
pferrel / gist:7073819
Created October 20, 2013 19:05
This the "view->developer->source" content before everything is fetched and execution of javascript starts.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Guide</title>
<meta name="description" content="Guide">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Guide</title>
@pferrel
pferrel / gist:7073845
Created October 20, 2013 19:07
after javascript is fetched and executed.
<html><head><style type="text/css">@charset "UTF-8";[ng\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\:form{display:block;}</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Guide</title>
<meta name="description" content="Guide">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Guide</title>
<meta content="authenticity_token" name="csrf-param">
<meta content="oFQzN0TsXsHQLgSmJA4awjfcgp2RKSyxvsJEV9Un0gA=" name="csrf-token">
@pferrel
pferrel / gist:7304968
Last active December 27, 2015 09:39
After the template is filled in. This has an infinite scroll but has only one search result so never triggers a reload.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Guide</title>
<meta name="description" content="Guide">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Guide</title>
<meta content="authenticity_token" name="csrf-param" />
@pferrel
pferrel / gist:7305338
Created November 4, 2013 16:37
Controller that fills in the template. It does an infinite scroll and so inserts data into the collection this.videos with successive VideoSearch.query() calls for new pages of data. The view data https://gist.github.com/pferrel/7304968 looks correct.
GuideControllers.controller('VideoSearchCtrl', function($scope, VideoSearchPager) {
$scope.videoSearchPager = new VideoSearchPager();
});
// constructor function to encapsulate HTTP and pagination logic
GuideControllers.factory('VideoSearchPager', function($location, VideoSearch) {
var VideoSearchPager = function() {
this.videos = [];
this.busy = false;
package org.apache.mahout.examples
import org.apache.mahout.drivers._
import org.apache.mahout.math.cf.SimilarityAnalysis
object RecommenderDriver extends MahoutDriver {
/**
* @param args Command line args, if empty a help message is printed.
*/
override def main(args: Array[String]): Unit = {
/**
* Created by rawkintrevo on 4/5/17.
*/
// Only need these so intelliJ doesn't complain
import org.apache.mahout.math._
import org.apache.mahout.math.scalabindings._
import org.apache.mahout.math.drm._
import org.apache.mahout.math.scalabindings.RLikeOps._
import org.apache.mahout.math.drm.RLikeDrmOps._
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000000012578bb1e, pid=96762, tid=0x0000000000001b03
#
# JRE version: Java(TM) SE Runtime Environment (8.0_102-b14) (build 1.8.0_102-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.102-b14 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [vw_jni8760491718649151294.Darwin.x86_64.lib+0x84b1e] _ZNK5boost15program_options11typed_valueImcE6notifyERKNS_3anyE+0x4e
#
@pferrel
pferrel / gist:d1ba38520fc9d516574d2eee9f49d53a
Created August 4, 2017 21:15
VW 8.4.1-SNAPSHOT build log macOS 10.12.6 Sierra
Maclaurin:vw pat$ make all
Making all in vowpalwabbit
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
depbase=`echo allreduce_sockets.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I/usr/local/include -I/include -D_THREAD_SAFE -Wall -Wno-unused-local-typedefs -pedantic -stdlib=libc++ -I ../rapidjson/include -O3 -fomit-frame-pointer -DNDEBUG -std=gnu++11 -MT allreduce_sockets.lo -MD -MP -MF $depbase.Tpo -c -o allreduce_sockets.lo allreduce_sockets.cc &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/local/include -I/include -D_THREAD_SAFE -Wall -Wno-unused-local-typedefs -pedantic -stdlib=libc++ -I ../rapidjson/include -O3 -fomit-frame-pointer -DNDEBUG -std=gnu++11 -MT allreduce_sockets.lo -MD -MP -MF .deps/allreduce_sockets.Tpo -c allreduce_sockets.cc -fno-common -DPIC -o .libs/allreduce_sockets.o
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/local/include -I/include -D_THREAD