This file contains 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/env ruby | |
#encoding: utf-8 | |
############ Interface code | |
class InterfaceClass < Module | |
private | |
def included(klass) | |
if klass != Object | |
@_implemented.each do |m| | |
if !klass.method_defined?(m) |
This file contains 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 | |
# David Charte, Ignacio Cordón y Mario Román | |
# Parámetros | |
# 1 - regla para encontrar los archivos a compilar | |
# 2 - argumento a pasar al programa | |
CFLAGS="-flto -fopenmp -fwhole-program -Wall -Wl,--no-as-needed" | |
CXXFLAGS="$CFLAGS -std=c++0x" | |
LDFLAGS="-lm -lrt" |
This file contains 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
# .bash_aliases | |
# Usage: | |
# todo - Shows tasks | |
# todo "New task" - Adds task to TODO list | |
# todo do 2 - Deletes 2nd task | |
function todo() { | |
[[ $# -ge 1 ]] && ( | |
[[ $# -ge 2 ]] && ( | |
cp ~/.TODO ~/.TODO.old |
This file contains 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
############################################################################### | |
# Makefile | |
# Compiles Lex programs in C++ | |
############################################################################### | |
SHELL = /bin/bash | |
BIN = . | |
SRC = $(wildcard *.l) | |
EXE = $(basename $(BIN)/$(SRC)) |
This file contains 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
# The hasselhoff attack taken to a new level | |
# curl -L http://git.io/pxu2 | bash | |
TARGET=`echo ~`/hasselhoff.jpg | |
wget http://www.ljpaez.es/imagen/hasselhoff.jpg $TARGET | |
gsettings set org.gnome.desktop.background picture-uri file:///$TARGET | |
xmessage -center "you have been hasselhoffinated" |
This file contains 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
void Environment::Show(int w,int h) const | |
{ | |
const static float trufa_level=50.0; | |
/* Formatting */ | |
const static string RED = "\e[31m"; | |
const static string GREEN = "\e[32m"; | |
const static string ORNG = "\e[33m"; | |
const static string BLUE = "\e[34m"; | |
const static string BOLD = "\e[1m"; |
This file contains 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
PDF=$(addsuffix .pdf, $(basename $(basename $(wildcard *.doc.md *.pres.md)))) | |
default: $(PDF) | |
%.pdf: %.doc.md | |
pandoc --to latex --latex-engine xelatex -N -o $@ $< --filter pandoc-citeproc | |
%.pdf: %.pres.md | |
pandoc --to beamer --latex-engine xelatex -N -o $@ $< |
This file contains 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
# Guion para comprobación del Teorema Central del Límite: | |
# | |
# The central limit theorem (CLT) states that, given certain conditions, | |
# the arithmetic mean of a sufficiently large number of iterates of | |
# independent random variables, each with a well-defined expected value | |
# and well-defined variance, will be approximately normally distributed, | |
# regardless of the underlying distribution -- Wikipedia (https://en.wikipedia.org/wiki/Central_limit_theorem) | |
# | |
simular <- function(dados = 20, caras = 6, muestras = 1000) { |
This file contains 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
emotions <- mldr_from_dataframe(mldr::emotions$dataset, mldr::emotions$labels$index, "emotions") | |
birds <- mldr_from_dataframe(mldr::birds$dataset, mldr::birds$labels$index, "birds") | |
genbase <- mldr_from_dataframe(mldr::genbase$dataset, mldr::genbase$labels$index, "genbase") | |
save(emotions, file = "emotions.rda", compress = "xz") | |
save(birds, file = "birds.rda", compress = "xz") | |
save(genbase, file = "genbase.rda", compress = "xz") |
This file contains 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
# ... | |
catkin-setup() { | |
source /opt/ros/jade/setup.bash &> /dev/null | |
} | |
catkin-setup | |
catkin-make() { | |
catkin_make -DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so $* | |
source devel/setup.bash |
OlderNewer