Skip to content

Instantly share code, notes, and snippets.

View fdovila's full-sized avatar

Fdo. Avila fdovila

View GitHub Profile
@fdovila
fdovila / ghetto_blaster.rb
Created November 2, 2011 23:48 — forked from audy/ghetto_blaster.rb
ghetto_blaster
LEVEL = 9
database = ARGV[0]
query = ARGV[1]
require 'zlib'
# Compression function.
def deflate(string)
z = Zlib::Deflate.new(LEVEL)
@fdovila
fdovila / illuminaobscura.py
Created November 2, 2011 23:52 — forked from audy/illuminaobscura.py
illuminaobscura.py
#!/usr/bin/env python
from glob import glob
from PIL import Image, ImageDraw
from itertools import defaultdict
# Create matrix
matrix = defaultdict(dict)
lanes = [1, 2, 3, 4, 5, 6, 7]
@fdovila
fdovila / getGitInfo.m
Created March 8, 2012 03:00 — forked from aleifer/getGitInfo.m
MATLAB getGitInfo: Get git repository hash, branch, and remote url in MATLAB
function gitInfo=getGitInfo()
% Matlab script to get information about the Git repository in the current directory, including:
% - branch name of the current Git Repo
% -Git SHA1 HASH of the most recent commit
% -url of corresponding remote repository, if one exists
%
% The function first checks to see if a .git/ directory is present. If so it
% reads the .git/HEAD file to identify the branch name and then it looks up
% the corresponding commit.
%
@fdovila
fdovila / sort_int_desc.c
Created March 28, 2012 22:09
Order an array of integers in descending order (c)
// For an array 'a, b, c', with at least 3 elements:
int array[5];
int a, b, c = 0;
for(a = 0; a < 5; a++) {
for(b = a; b < 5; b++) {
if(array[a] > array[b]) {
@fdovila
fdovila / desdezero.sh
Created September 26, 2016 20:37
Save your favourite podcast to mp3
# name this shell script 'desdezero.sh'
#!/bin/zsh
now=`date +"%m_%d_%Y"`
streamripper http://tunein.digitalproserver.com/zero_player.mp3 -d /Users/Myusername/MyFolder/Subfolder/desdezero/ -a desdezero-$now.mp3 -s -l 3600
@fdovila
fdovila / paisgeneroso.sh
Last active September 18, 2021 13:33
Save your favourite podcast to mp3
# name this shell script 'paisgeneroso.sh'
#!/bin/zsh
now=`date +"%m_%d_%Y"`
streamripper http://tunein.digitalproserver.com/zero_player.mp3 -d /Users/Myusername/Myfolder/Subfolder/paisgeneroso/ -a paisgeneroso-$now.mp3 -s -l 5400
@fdovila
fdovila / BiomedOpticsEqs.tex
Last active March 4, 2019 23:05
#LaTeX #Biophotonics #Equations
\begin{equation}\label{Eq-red_scat_coef}
$\mu _{s}^{'}=\mu _{s}(1-g)$
\end{equation}
\begin{equation}\label{Eq-tot_attnt_coef}
$\mu _{t}=\mu_{a}+\mu_{s}$
\end{equation}
\begin{equation}\label{Eq-mod_lambert_beer}
I={{I}_{0}}{{e}^{-{{\mu }_{eff}}z}}
@fdovila
fdovila / FDA information on computer assisted (CAD) technologies
Last active June 15, 2019 01:39
FDA information on computer assisted (CAD) technologies
*****NOT-ACTIVE (dead links) FDA's guidances on CAD systems*****
These guidances were deleted from FDA somewhere in 2017.
1) Guidance for Industry and FDA Staff - Clinical Performance Assessment: Considerations for Computer-Assisted Detection Devices Applied to Radiology Images and Radiology Device Data - Premarket Approval (PMA) and Premarket Notification [510(k)] Submissions
URL: https://web.archive.org/web/20161028224500/http://www.fda.gov/RegulatoryInformation/Guidances/ucm187277.htm
PDF: https://web.archive.org/web/20161022010001/http://www.fda.gov/downloads/MedicalDevices/DeviceRegulationandGuidance/GuidanceDocuments/ucm187315.pdf
2) Guidance for Industry and Food and Drug Administration Staff - Computer-Assisted Detection Devices Applied to Radiology Images and Radiology Device Data - Premarket Notification [510(k)] Submissions
URL: https://web.archive.org/web/20170118091545/http://www.fda.gov/RegulatoryInformation/Guidances/ucm187249.htm
PDF: https://web.archive.org/web/20170111012408/http://www.fda.
%By user https://tex.stackexchange.com/users/27866/mlc at https://tex.stackexchange.com/questions/9796/how-to-add-todo-notes
\documentclass{article}
\usepackage{lipsum} % Dummytext
\usepackage{xargs} % Use more than one optional parameter in a new commands
\usepackage[pdftex,dvipsnames]{xcolor} % Coloured text etc.
%
\usepackage[colorinlistoftodos,prependcaption,textsize=tiny]{todonotes}
\newcommandx{\unsure}[2][1=]{\todo[linecolor=red,backgroundcolor=red!25,bordercolor=red,#1]{#2}}
\newcommandx{\change}[2][1=]{\todo[linecolor=blue,backgroundcolor=blue!25,bordercolor=blue,#1]{#2}}
\newcommandx{\info}[2][1=]{\todo[linecolor=OliveGreen,backgroundcolor=OliveGreen!25,bordercolor=OliveGreen,#1]{#2}}
#Reflow of any PDF to improve readability on most eBook-readers, using K2pdfopt (www.willus.com/k2pdfopt/) in MAC terminal/commandline/bash, especially useful for multi-column documents (e.g. scientific articles)
#COPY AND PASTE FOR TERMINAL, fill in the paths, filenames on the script:
myuser$ /path...to.../k2pdfopt '/path...to...PDFtoreflow/myPDF.pdf' -x -ui- -dev
# parameters: "-dev" : will fit for average device
# "-ui-" : run programatically (without opening the menu for drag & drop)
# "-x" : exit when done (usually asks for user to press ENTER to close)
#If you want to hear when is done, add: