Skip to content

Instantly share code, notes, and snippets.

View seth's full-sized avatar

Seth Falcon seth

View GitHub Profile
rand_v <- function(n, pct.true, use.names = FALSE, use.na = FALSE)
{
vals <- c(TRUE, FALSE)
probs <- c(pct.true, (1 - pct.true))
if (use.na) {
vals <- c(vals, NA)
pct.o <- (1 - pct.true) / 2
probs <- c(pct.true, pct.o, pct.o)
}
v <- sample(vals, size = n, replace = TRUE, prob = probs)
SEXP which_core(SEXP v)
{
SEXP v, v_nms, ans, ans_nms = R_NilValue;
int i, j = 0, len, *buf;
if (!isLogical(v))
error(_("argument to 'which' is not logical"));
len = length(v);
buf = (int *) R_alloc(len, sizeof(int));
desc "deploy it call with [true/false] to actually deploy"
task :deploy, [:doit] do |t, args|
args.with_defaults(:doit => false)
site_config = YAML.load_file("./config.yaml")
output_dir = site_config["output_dir"].sub(/\/$/, "")
config = YAML.load_file("./deploy.yaml")
user = config["user"]
host = config["host"]
root = config["root"]
dry = args.doit ? "" : "--dry-run"
//
// NSString+URLParamEncode.m
// EvriApi
//
// Created by Seth Falcon on 7/2/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
#import "NSString+URLParamEncode.h"
-module(sherl_db_SUITE).
-compile(export_all).
-include("../include/url.hrl").
-include_lib("ct.hrl").
%%--------------------------------------------------------------------
%% Function: suite() -> DefaultData
%% DefaultData: [tuple()]
-module(sherl_db).
-export([get_code/1, get_url/1, start/1, stop/0]).
-include("../include/url.hrl").
-include("counter.hrl").
start([]) ->
start([node()]);
start(Nodes) ->
.SUFFIXES: .erl .beam .yrl
%.beam: %.erl
erlc -W -o ebin $<
%.erl : %.yrl
erlc -W $<
vpath %.erl src
vpath %.beam ebin
This file has been truncated, but you can view the full file.
2009-02-26 15:50:35.391::INFO: Started [email protected]:41111
2009-04-16 12:59:23
Full thread dump Java HotSpot(TM) 64-Bit Server VM (1.6.0_03-b05 mixed mode):
"btpool0-68851" prio=10 tid=0x00002aaabc11bc00 nid=0x6f95 waiting for monitor entry [0x000000005c288000..0x000000005c289b90]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.evri.radar.InMemoryServiceRegistry.updateListeners(InMemoryServiceRegistry.java:425)
- waiting to lock <0x00002aaab34c8d90> (a java.util.HashSet)
at com.evri.radar.InMemoryServiceRegistry.registerService(InMemoryServiceRegistry.java:333)
at com.evri.radar.rest.RadarResourceImpl.registerService(RadarResourceImpl.java:107)
This file has been truncated, but you can view the full file.
2009-02-26 15:50:35.391::INFO: Started [email protected]:41111
2009-04-16 12:59:23
Full thread dump Java HotSpot(TM) 64-Bit Server VM (1.6.0_03-b05 mixed mode):
"btpool0-68851" prio=10 tid=0x00002aaabc11bc00 nid=0x6f95 waiting for monitor entry [0x000000005c288000..0x000000005c289b90]
java.lang.Thread.State: BLOCKED (on object monitor)
at com.evri.radar.InMemoryServiceRegistry.updateListeners(InMemoryServiceRegistry.java:425)
- waiting to lock <0x00002aaab34c8d90> (a java.util.HashSet)
at com.evri.radar.InMemoryServiceRegistry.registerService(InMemoryServiceRegistry.java:333)
at com.evri.radar.rest.RadarResourceImpl.registerService(RadarResourceImpl.java:107)
#!/usr/bin/env ruby
require 'rubygems'
require 'httparty'
require 'radar_love'
require 'pp'
require 'yaml'
class TopEntities
include HTTParty