This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import SimpleITK as sitk | |
import vtk | |
import numpy as np | |
import sys | |
from vtk.util.vtkConstants import * | |
filename = sys.argv[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// An OLN namespace | |
namespace = { | |
foo: function(){ alert('namespace.foo'); }, | |
bar: function(){ alert('namespace.bar'); }, | |
}; | |
// A namespace | |
(function(projecto){ | |
projecto.flag = true; | |
projecto.foo = function() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <python2.7/Python.h> | |
#include <iostream> | |
int main(int argc, char *argv[]) | |
{ | |
PyObject *pModule, *pModuleName, *pDict, *pFunc, *pValue, *pArgs; | |
Py_Initialize(); | |
pModuleName = PyString_FromString("pie"); | |
pModule = PyImport_Import(pModuleName); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((<file submit command> 1>&3) 2>&1 | awk '/Error/') 3>&1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim Layouts (pure Vim version) | |
argdelete * | |
bufdo argadd %:p | |
let args = split(expand("##")) | |
let counter = 0 | |
for i in args | |
if counter % 4 == 0 | |
if counter == 0 | |
silent exe "edit" i | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
change-commits = "!f() { VAR1=$1; VAR='$'$1; OLD=$2; NEW=$3; echo \"Are you sure for replace $VAR $OLD => $NEW ?(Y/N)\";read OK;if [ \"$OK\" = 'Y' ] ; then shift 3; git filter-branch --env-filter \"if [ \\\"${VAR}\\\" = '$OLD' ]; then export $VAR1='$NEW';echo 'to $NEW'; fi\" $@; fi;}; f " | |
# Usage: | |
# git change-commits GIT_AUTHOR_EMAIL "OLD EMAIL" "NEW EMAIL" | |
# git push --force --tags origin 'refs/heads/*' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Example of communication with a subprocess via stdin/stdout | |
// Author: Konstantin Tretyakov | |
// License: MIT | |
// | |
#include <ext/stdio_filebuf.h> // NB: Specific to libstdc++ | |
#include <sys/wait.h> | |
#include <unistd.h> | |
#include <iostream> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Better diff for directories | |
if [ "$#" -ne 2 ]; then | |
echo -e "Usage:\t./mdiff.sh <dir1> <dir2>"; | |
exit -1; | |
fi; | |
dir1=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import traceback | |
import code | |
import bpython | |
def print_banner(): | |
message = "Select a frame to view using the select(<frame #>) command" | |
print '\n\x1b[0;34;40m' + message + '\x1b[0m' | |
message = "Reload the script using the reload() command" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% | |
%% IEEEtran.cls 2015/08/26 version V1.8b | |
%% | |
%% This is the IEEEtran LaTeX class for authors of the Institute of | |
%% Electrical and Electronics Engineers (IEEE) Transactions journals and | |
%% conferences. | |
%% | |
%% Support sites: | |
%% http://www.michaelshell.org/tex/ieeetran/ | |
%% http://www.ctan.org/pkg/ieeetran |