Skip to content

Instantly share code, notes, and snippets.

View rbonvall's full-sized avatar

Roberto Bonvallet rbonvall

View GitHub Profile
@rbonvall
rbonvall / gist:717519
Created November 27, 2010 03:01
archivo-ordenar.f95
program ordenar_archivo
implicit none
integer :: a, b, st
open (unit=10, file='a.txt', action='read')
do
read (10, *, iostat=st), a
if (st /= 0) exit
! lo que viene a continuacion es la manera que vimos para agregar un
\documentclass[10pt]{article}
\usepackage{beamerarticle}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fullpage}
\usepackage{xcolor}
\usepackage{listings}
\usepackage{textcomp}
\usepackage{mathpazo}
\usepackage{courier}
@rbonvall
rbonvall / Makefile
Created October 19, 2011 20:33
Simple Makefile for LaTeX documents. You have to install rubber beforehand.
TEXFILES = $(wildcard *.tex)
PDFFILES = $(TEXFILES:.tex=.pdf)
all: pdf
pdf: $(PDFFILES)
%.pdf: %.tex
@rubber --pdf $<
clean:
@rbonvall
rbonvall / fstab
Created November 11, 2011 01:33
fstab de loquito
#
# /etc/fstab
# Created by anaconda on Fri Apr 22 00:06:17 2011
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_loquito-lv_root / ext4 defaults 1 1
UUID=8a7cf1e0-b7b1-4e7e-bc94-87b80b32e2af /boot ext4 defaults 1 2
/dev/mapper/vg_loquito-lv_home /home ext4 defaults 1 2
@rbonvall
rbonvall / programas.py
Created November 16, 2011 23:20
Listings with named ranges using pgf's \foreach doesn't work
# P1
s = {78, 15, 91, 15}
print len(s)
# FIN P1
# P2
d = {78: 15, 91: 15}
print len(d)
# FIN P2
@rbonvall
rbonvall / sum.cu
Created February 3, 2012 17:53
c ← a + b in CUDA
__global__ void sum(float *a, float *b, float *c) {
int i = threadIdx.x + blockDim.x * blockIdx.x;
c[i] = a[i] + b[i];
}
@rbonvall
rbonvall / pot.py
Created February 21, 2012 19:32
Conjunto potencia en Python
def es_par(x):
return x % 2 == 0
def conjunto_potencia(s):
n = len(s)
# crear lista con 2^n conjuntos vacios
subconjuntos = []
for i in range(2 ** n):
subconjuntos.append(set())
@rbonvall
rbonvall / example.rst
Created June 30, 2012 01:22
Three examples of RestructuredText tables. The last one is not handled correctly by pandoc.

Example 1:

Header row, column 1 Header 2 Header 3
body row 1, column 1 column 2 column 3
body row 2 Cells may sp an
@rbonvall
rbonvall / test.tex
Created September 24, 2012 22:30
XeLaTeX test
\documentclass{article}
\usepackage{mathpazo}
\usepackage{xunicode}
\usepackage{fontspec}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{fancyvrb}
\usepackage{polyglossia}
\setromanfont{TeXGyrePagella}
@rbonvall
rbonvall / porbajar
Created December 30, 2012 17:38
van Gerwen v Lewis
http://www.youtube.com/watch?v=7YcPEKNDWng
http://www.youtube.com/watch?v=BKCz89o8cbs
http://www.youtube.com/watch?v=mmoZRzUVf_Y
http://www.youtube.com/watch?v=t1g9CiP2cc4
http://www.youtube.com/watch?v=fqWXVd5Vx-w
http://www.youtube.com/watch?v=17FZEJaApxE