Skip to content

Instantly share code, notes, and snippets.

View diego898's full-sized avatar

Diego Mesa diego898

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@diego898
diego898 / batchConvertSMA.m
Created October 22, 2016 18:16
Some files to batch convert snap-master generated SMA files, using a slightly customized version of EEGLAB's snapread() function.
% batchConvertSMA() - Convert all SMA files in current directory and
% sub-directories to CSV files. Additionally extract the
% header and save as a txt file.
function [data,params,head,events] = batchConvertSMA()
% Grab all SMA files in current directory and sub-directories
files = dir('**/*.SMA');
% count number of SMA files
@diego898
diego898 / Preferences.sublime-settings
Last active October 10, 2016 16:10
My sublime settings file
{
"WrapPlus.break_on_hyphens": false,
"WrapPlus.break_on_long_words": false,
"added_words":
[
"discriminability",
"neuroscience",
"achievability",
"cyber",
"invertibility",
@diego898
diego898 / trash
Created September 22, 2016 17:44
trash osx command line application from: https://github.com/morgant/tools-osx
#!/bin/bash
#
# trash - Move files to the appropriate .Trash file on Mac OS X. (Intended
# as an alternative to 'rm' which immediately deletes the file.)
#
# v0.1 2007-05-21 - Morgan Aldridge <morgant@makkintosshu.com>
# Initial version.
# v0.2 2010-10-26 - Morgan Aldridge
# Use appropriate .Trashes folder when trashing files
@diego898
diego898 / .block
Created March 5, 2016 03:29 — forked from mbostock/.block
U.S. Counties TopoJSON
license: gpl-3.0
@diego898
diego898 / .block
Last active March 5, 2016 03:15
Bubble Map
license: gpl-3.0
@diego898
diego898 / movetochrome.scpt
Created September 4, 2015 17:51
AppleScript file to move tabs from safari to chrome
tell application "Safari"
if not (exists document 1) then return
set theURL to URL of current tab of window 1
close current tab of window 1
end tell
tell application "Google Chrome"
if not (exists window 1) then
reopen
else
@diego898
diego898 / hw7.ipynb
Created June 30, 2015 17:49
Homework 7 Solutions
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@diego898
diego898 / hw6.ipynb
Created June 30, 2015 17:48
Homework 6 Solutions
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@diego898
diego898 / parseBrainAmpFile.matlab
Created February 27, 2014 00:11
parseBrainAmpFile will read and parse the specified file which was exported from the brainamp
function output = parseBrainAmpFile(filename)
%parseBrainAmpFile Read in and parse a BrainAmp File
%
% parseBrainAmpFile(filename) will read in the specified file
% which was exported from the brainamp
%
% output is struct containing two members:
% names - a matrix where each row is the name of the data row
% values - a [#names * #samples] matrix containing the data