Skip to content

Instantly share code, notes, and snippets.

View jspaezp's full-sized avatar

J. Sebastian Paez jspaezp

View GitHub Profile
@jspaezp
jspaezp / installed packages
Created May 22, 2015 10:39
installed packages, includes AUR
accountsservice
acpid
audacity
autoconf
automake
b43-fwcutter
baobab
bash
binutils
bison
/*
* script to export data in all sheets in the current spreadsheet as individual csv files
* files will be named according to the name of the sheet
* author: Michael Derazon
*/
function onOpen() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}];
ss.addMenu("csv", csvMenuEntries);
@jspaezp
jspaezp / Makefile
Created June 22, 2016 16:18 — forked from lmullen/Makefile
PDF slides and handouts using Pandoc and Beamer
SLIDES := $(patsubst %.md,%.md.slides.pdf,$(wildcard *.md))
HANDOUTS := $(patsubst %.md,%.md.handout.pdf,$(wildcard *.md))
all : $(SLIDES) $(HANDOUTS)
%.md.slides.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -o $@
%.md.handout.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -V handout -o $@
@jspaezp
jspaezp / ejemplo.html
Last active July 29, 2016 04:50
Mi enfoque a la union de las columnas con datos de mismo tipo
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="pandoc" />
#!/bin/sh
# adding timestamp
TS=$(date +"%F")
# Name specification
BKPNAME="bkpSebastian-$TS"
# Tar
---
title: "Colormerge"
output:
html_document:
keep_md: yes
---
```{r}
require(dplyr)
require(tidyr)
@jspaezp
jspaezp / removedor_de_lineas_indeseadas.R
Last active December 1, 2016 19:08
Remover_lineas_indeseadas
# La solucion tiene que ser solo desde R ??
# en caso de que no, puedes remover dichas lineas con grep y cat en unix
# en el caso de que si ..... yo primero leeria todos los datos por linea (sep = "\m")
# despues usaria una expresion regular para sacar los que no quiero (dplyr::filter(grepl()))
# y despues los separaria para que quedaran como los quiero. (tidyr::separate)
# Primero leemos los datos usando de separador la linea (no se separan las columnas)
# Generacion de los datos
x <- runif(20) + 1
y <- rep(c('a','b', 'c', 'd'), 5)
z <- rep(c('FACTOR 1','FACTOR 2'), 5)
# hacer el DF
my_data <- data.frame(x1 = sample(x), y1 = y, z1 = z)
# Cargar los paquetes
require(ggplot2)
@jspaezp
jspaezp / find_lj_maximum.R
Last active February 17, 2017 06:38
MCstuff
require(tidyverse)
energies <- (function(){
tempdata <- data.table::fread('./energy.dat')
colnames(tempdata) <- c('Step', 'Energy')
return(tempdata)
})()
max_step <- max(
run_gromacs_standard ()
{
# run_gromacs_standard {current run} {last run}
if [ -f $1.gro ] ; then
echo 'found $1.gro'
else
gmx grompp -f $1.mdp \
-c $2 \
-t $2 \