Skip to content

Instantly share code, notes, and snippets.

Alejandro (Alex) Carrillo acarrillo

Block or report user

Report or block acarrillo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@acarrillo
acarrillo / gist:8687e9be0eef138ab09c
Created Jan 13, 2015
Code sample for an image rectification algorithm in C++
View gist:8687e9be0eef138ab09c
// MatrixImagingLibrary.cpp [fragment] Alejandro Carrillo (July 2013)
// At the Neuro-Electronic Research Foundation in Belgium, I wrote image
// rectification software for their custom multiphoton microscope.
// The microscope functions by emitting photons and measuring the fluorescence
// of neurons in mice that have genetically encoded calcium indicators.
// In order to sweep the laser across the microscope subject at a maximally high
// frequency, the laser mirror is driven via harmonic resonance.
// The consequence, however, is that the laser sweep is sinusoidal. The following
// functions concern rectifying the sine-warped image that is generated from the
@acarrillo
acarrillo / gist:5772508
Created Jun 13, 2013
On Google Spreadsheet form submission, push new entry to a MailChimp subscription list with an `onformsubmit` trigger. Uses the MailChimp API and Google Apps Script.
View gist:5772508
var API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
var mc_base_url = 'http://us7.api.mailchimp.com/1.3/?method=listSubscribe';
var mc_list_id = 'xxxxxxxxxx';
var mc_double_optin = false;
/**
* Uses the MailChimp API to add a subscriber to a list.
*/
function sendToMailChimp_(fn, ln, em, yr){
@acarrillo
acarrillo / datefiltr.rb
Created Aug 2, 2012
A filter for converting timestamps to a more readable date format
View datefiltr.rb
#!/usr/bin/env ruby
#
# Authors: Kevin Wang and Alex Carrillo
# Description: Replaces UNIX timestamps with more human-friendy strings
#
# Make this file executable with `chmod +x datefiltr.rb` and put it in your path.
#
# Example usage:
# $ datefiltr.rb < file-with-timestamps.txt > file-with-readable-dates.txt
#
@acarrillo
acarrillo / datefiltr.py
Created Jul 31, 2012
A simple filter for converting UNIX epoch timestamps to a more readable format -- works great with Vim!
View datefiltr.py
#!/usr/bin/env python
'''A filter that takes a UNIX epoch timestamp as input, and outputs the date in a more human-friendly format
Put this file somewhere in your PATH and 'chmod +x' it.
In your ~/.vimrc:
vnoremap <silent> <F6> :!datefiltr.py<CR>
You can’t perform that action at this time.