Skip to content

Instantly share code, notes, and snippets.

View davidpelaez's full-sized avatar

David Pelaez davidpelaez

  • Vlipco
  • Bogota, Colombia
View GitHub Profile
{"studyName":"EMERGE","studyNCT":"NCT02484547","briefDescription":"221AD302 Phase 3 Study of Aducanumab (BIIB037) in Early Alzheimer's Disease (EMERGE)","longDescription":"§ A Phase 3 Multicenter, Randomized, Double-Blind, Placebo-Controlled, Parallel-Group Study to Evaluate the Efficacy and Safety of Aducanumab (BIIB037) in Subjects With Early Alzheimer's Disease\n\n§ The primary objective of the study is to evaluate the efficacy of monthly doses of aducanumab in slowing cognitive and functional impairment as measured by changes in the Clinical Dementia Rating-Sum of Boxes (CDR-SB) score as compared with placebo in participants with early AD. Secondary objectives are to assess the effect of monthly doses of aducanumab as compared with placebo on clinical progression as measured by Mini-Mental State Examination (MMSE), AD Assessment Scale-Cognitive Subscale (13 items) [ADAS-Cog 13], and AD Cooperative Study-Activities of Daily Living Inventory (Mild Cognitive Impairment version) [ADCS-ADL-MCI].\n\n§ Primar
<head>
<script id='capitalizer-template' type='text/x-template'>
<h1> {{msg | capitalizer}}
</script>
</head>
<body>
<div id='app'>
<capitalizer></capitalizer>
</div>
open Batteries
open Print
let _ =
(* Simple test *)
printf p"x = (%d, %s)\n" 1 "a";
(* With flags: *)
printf p"x = %04x\n" 42;
open Core.Std;
let rec read_and_accumulate accum => {
let line = In_channel.input_line In_channel.stdin;
switch line {
| None => accum
| Some x => read_and_accumulate (accum +. Float.of_string x)
}
};
@davidpelaez
davidpelaez / custom_processor.rb
Created March 3, 2016 16:10
How to add custom steps to rom-mapper default Transproc processor. Useful to enhance the mapper with custom functionality and data transformations, e.g: lazy evaluation as presented in http://solnic.eu/2015/07/15/importing-data-with-rom-and-transproc.html
module Dataops
module Processors
class EnhancedAttributes < TransprocWithHook
BlockWrapper = Struct.new(:block) do
def call(*args)
self.block.call *args
end
end

Keybase proof

I hereby claim:

  • I am davidpelaez on github.
  • I am davidpelaez (https://keybase.io/davidpelaez) on keybase.
  • I have a public key ASCHVM7Y_xgVIBh77hSTFmKBDXd3wHWzQIszOGOmNyaUGAo

To claim this, I am signing this object:

@davidpelaez
davidpelaez / Gemfile
Created December 9, 2015 17:19
Reference steps to use Trailblazer inside a Lotus app. Only includes important parts for Lotus 0.5, not full files.
# add this gems to your Gemfile
gem 'trailblazer', '~> 1.0.4'
gem 'lotus-validations', '~> 0.3.3'
gem 'hashie'
@davidpelaez
davidpelaez / tmux-20-rb
Created November 11, 2015 00:19
OSX formula for tmux 2.0
class Tmux < Formula
desc "Terminal multiplexer"
homepage "https://tmux.github.io/"
url "https://github.com/tmux/tmux/releases/download/2.0/tmux-2.0.tar.gz"
sha256 "795f4b4446b0ea968b9201c25e8c1ef8a6ade710ebca4657dd879c35916ad362"
bottle do
cellar :any
revision 1
sha256 "038a53142251f185976b78e70cb0b261f923c4db70ecd55e97b2fcdb6e78b90a" => :el_capitan
@davidpelaez
davidpelaez / minimal_lotus_json_application.rb
Created September 2, 2015 21:10
Minimal lotus app configuration for a JSON API
require 'lotus/helpers'
#require_relative 'controllers/preconditions'
module Aloha
class Application < Lotus::Application
configure do
root __dir__
load_paths << [ 'controllers' ]
@davidpelaez
davidpelaez / ipsec-consul-check.sh
Created September 17, 2014 03:44
Self restarting IPSEC check
#!/bin/bash
set -eo pipefail
date
url="https://le-service.something"
if curl -s --write-out "%{http_code}" "$url" --output /dev/null --max-time 10 | grep -G 200 &> /dev/null; then
echo "Succesfully reached leService endpoint"
exit 0