Skip to content

Instantly share code, notes, and snippets.

@dfbarrero
dfbarrero / matrix.tex
Created March 23, 2017 09:49
Matrix figure with LaTeX/Tikz
\begin{tikzpicture}[draw, minimum width=1cm, minimum height=0.5cm]
\node[draw] (in) at (-1,2) {};
\node[draw] (out) at (1,2) {};
\matrix (queue)[matrix of nodes, nodes={draw, nodes={draw}}, nodes in empty cells]
{
\\ \\ \\ \\
};
\draw[-latex] (0.25,1) .. controls (0.25,1.5) and (1,1.5) .. (out.south);
\draw[-latex] (in.south) .. controls (-1, 1.5) and (-0.25,1.5) .. (-0.25,1);
@dfbarrero
dfbarrero / vector.tex
Last active May 25, 2019 05:11
Vector figure in LaTeX/Tikz
\begin{tikzpicture} [nodes in empty cells,
nodes={minimum width=0.5cm, minimum height=0.5cm},
row sep=-\pgflinewidth, column sep=-\pgflinewidth]
border/.style={draw}
\matrix(vector)[matrix of nodes,
row 1/.style={nodes={draw=none, minimum width=0.3cm}},
nodes={draw}]
{
\tiny{0} & \tiny{1} & \tiny{2} & \tiny{3}\\
@dfbarrero
dfbarrero / .vimrc
Created March 16, 2017 11:07
My .vimrc file
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
@dfbarrero
dfbarrero / jekyll-tikz.rb
Created March 15, 2017 15:24
Jekyll-tikz is a Jekyll plugin which helps you use Tikz in you Jekyll site.
# Authored my Maxfan http://github.com/Maxfan-zone http://maxfan.org
# This is used to convert tikz code into svg file and load in you jekyll site
#
# Install:
#
# 1. Copy this file in your _plugins/ directory. You can customize it, of course.
# 2. Make sure texlive and pdf2svg are installed on your computer.
#
# Input:
#
@dfbarrero
dfbarrero / Practical03
Created March 15, 2017 11:42
Support files for the practical "Programming Evolutionary Algorithms with inspyred". This code is based on examples taken from inpyred source code.
Support files for the practical "Programming Evolutionary Algorithms with inspyred". This code is based on examples taken from inpyred source code.
@dfbarrero
dfbarrero / Practical02
Last active March 15, 2017 11:49
Support files for the practical "Understanding parameters settings in Evolutionary Algorithms". This code is based on examples taken from inpyred source code.
Support files for the practical "Understanding parameters settings in Evolutionary Algorithms". This code is based on examples taken from inpyred source code.