Skip to content

Instantly share code, notes, and snippets.

View rocarvaj's full-sized avatar
🐀

Rodolfo Carvajal rocarvaj

🐀
View GitHub Profile

Why do we keep on having babies?

Date: 2013-05-26

This post is also at Medium.

Our baby boy was born a few days ago. We’re very happy. Friends came to the hospital, the computer was full of congratulations and then, the first night with our brand new baby came.

I stayed with my wife at the hospital and I had forgotten the first nights and what the lack of sleep does to your head, and especially to your wive’s head. Although, to be fair, my son is very regular and wakes up around two specific times during the night. And suddenly, the question popped up in my head:

Why do we do this? Why do we have babies?

Text-to-columns in Google Drive

Date: 2013-07-30

This is something that should be a standard feature in Google Drive: When pasting data formatted as rows separated by a new line and columns separated by spaces (or commas), get the data in the expected format (rows as spreadsheet rows and columns as spreadsheet columns). Right now, Google Drive does not do this, it just preserves the rows.

So we need the text-to-columns feature available in LibreOffice or Office. The feature in GDrive can be used as a script:

  • Go to "Tools" > "Script Gallery".
  • Search for "Text to columns".
  • Install script (have to give persmission to the script here).
@rocarvaj
rocarvaj / 2013-08-20_latex-tables-gdrive.md
Last active August 29, 2015 14:06
LaTeX tables in Google Drive

LaTeX tables in Google Drive

Date: 2013-08-20

Here are two nice ways of generating LaTeX code for tables in Google Drive. I haven't tested them very much, but they seem to do a great job:

  1. Using http://www.tablesgenerator.com/. You just copy-and-paste your table from GDrive to the grid shown in the website, you can easily change the style of the table.

  2. Using the following GDrive script created by Dave Rim.

@rocarvaj
rocarvaj / 2013-11-30_crosh-as-window.md
Last active August 29, 2015 14:06
A patch for the "crosh as window" app in ChromeOS. Deprecated.

Open crosh as a window in ChromeOS

I've spent a lot of time using my Samsung Chromebook as my main machine and I'm pretty much conviced that it is all I need. I usually use a browser and a terminal, that's it. The great thing is that ChromeOS can satisfy both needs, by using the great Secure Shell extension, that allows you to connect via SSH to remote machines.

But there are times (very few now, for me at least) when you want to have a fully operational Linux installation. That's when you can use Crouton (through the Chrome Shell, called crosh), which allows you to run a standard Linux distribution (Ubuntu, for example) as an additional process within ChromeOS.

The only problem: If you want to use shortcuts like Ctrl+w (in Vim, for example), Chrome will take the default action associated to that shortcut, which is not what we want. One solution is to open crosh as a wind

@rocarvaj
rocarvaj / 2014-02-01_cplex-out-of-memory.md
Created September 4, 2014 14:04
CPLEX running out of memory #blog

"CPLEX Error 1001: Out of memory", a tip that might help you too

`CPLEX Error 1001: Out of memory`

Now that's something I hate to see. Especially if you are just trying to solve the "small" problems in you target instance set.

Of course there are many reasons for this to happen. You can try to get some help/inspiration from:

  • Asking or searching (for lost souls with similar problem) in the CPLEX forum.
  • Following the advice of this technote from the IBM Support site.
@rocarvaj
rocarvaj / algorithm.tex
Created February 18, 2014 21:12
Example of algorithm/algorithmic packages
\usepackage{algorithm}
\usepackage{algorithmic}
\renewcommand{\algorithmicensure}{\textbf{Output:}}
\begin{algorithm}[!ht]
\caption{Solving the Lagrangian dual for (CF)}
\label{alg:lower_bound}
\begin{algorithmic}[1]
\ENSURE Lower bound $\underbar z$ and upper bound $\bar z$.
@rocarvaj
rocarvaj / git-branching.md
Last active December 9, 2017 18:53
Git branching
@rocarvaj
rocarvaj / homework_guidelines.md
Last active December 11, 2015 02:48
Homework guidelines

ISyE 6662 - Spring 2013: Homework guidelines

The solutions to the homework are required to be typesetted in LaTeX. Please find a LaTeX template and more information in the LaTeX folder in the Resources section of the course's T-square site.

Please follow the following guidelines regarding your homework solutions:

Homeworks are meant as individual assignments. Although you are encouraged to discuss them with your classmates, each student should complete and submit his/her own work, unless specifically instructed to work in groups. Cite all reference sources used in your assignments. Late homework submissions will not be accepted, except for serious unavoidable circumstances.

Write your name and class clearly at the top of at least the first page, along with the assignment number and the page number(s). If you are not stapling or paper-clipping the pages together, then put your name or initials on all the pages.

@rocarvaj
rocarvaj / csvToLP.py
Created October 11, 2012 15:40
Convert .dow and .csv files to .lp
#!/usr/bin/python
"""
Convert an instance from the multicommodity fixed charge
network flow problem in .csv format to .lp file (arc formulation)
Usage: ./csvToLP.py path/to/my/csv/file.csv
Rodolfo Carvajal <[email protected]>
@rocarvaj
rocarvaj / README.md
Created October 4, 2012 16:05
Read file and parse strings

Read file and parse

Las funciones importantes est'an en parse.c. Adjunto tambi'en el archivo macros.h, que tiene algunas funciones macro que se llaman en parse.c, pero se llaman s'olo para cosas como testear para ver si hay alguna condici'on de lleve a error.