Archive for the ‘Projects’ Category

Pearls Chrome Extension – Highlights stored sets of words.

Monday, April 12th, 2010

There are many web pages that contains big lists of information constantly updated. As someone would repeatedly search for a set of interesting words that also could be a large set, it would be interesting to save those words and automatically search for them when the web page is updated or visited. Back when IRC was used as an keep-updated-tool, this feature was called THE NoTifY LiST. Here I’m calling it Pearls, for some reason (I’ll find out which someday). The current features are:

  1. Set of Words saved for each site
  2. One set of words saved for all sites
  3. Auto-highlights matching words on every visit and page update
  4. Shows hits counter on extension icon

It can be installed directly through Google chrome’s extension gallery here.

Currently, it is not working in sites with frames. So Gmail and Google Reader, unfortunately, won’t be correctly highlighted. Also, you should reload your pages after installing the extension. (Nothing better than a restart here and there…).

The following features are planned for version 2:

  1. Keyboard shortcut to call the popup
  2. Separated counters for each word
  3. Separated keyboard navigation for each word
  4. Different colors

A Wordpress Plugin to Exclude Categories from the Frontpage

Monday, July 27th, 2009

Some categories just don’t deserve the frontpage! So… Exclud’em All :D

Sean O’Steen developed a plugin for this and I have added a configuration page for it under the “Options” menu.

You can download this new version here.

Planning and Scheduling the Operation of a Very Large Oil Pipeline Network

Wednesday, November 26th, 2008

Brazilian petrobras is one of the world largest oil companies. Recurrently, it faces a very difficult over-constrained planning challenge: how to operate a large pipeline network in order to adequately transport oil derivatives and biofuels from refineries to local markets. In spite of being more economical and environmentally safer, the use of a complex pipeline network poses serious operational difficulties. The network has a complex topology, with around 30 interconnecting pipelines, over 30 different products in circulation, and about 14 distribution depots which harbor more than 200 tanks, with a combined capacity for storing up to 65 million barrels. The problem is how to schedule individual pumping operations, given the daily production and demand of each product, at each location in the network, over a given time horizon. We describe a solution based on a two-phase problem decomposition strategy. A novel Constraint Programming (CP) model plays a key role in modeling operational constraints that are usually overlooked in literature, but that are essential in order to guarantee viable solutions. The use of CP was crucial, since it allowed the modeling of complex constraints, including nonlinearities. The full strategy was implemented and produced very adequate results when tested over large real instances. In contrast, other approaches known from the literature failed, even when applied to much less complex networks.

 Read the article

mimeTeX: LaTeX Math for Wordpress

Sunday, November 11th, 2007

This Wordpress plugin allows you to embed \LaTeX math formulas into your posts without having LaTeX installed at your server. Just like this:

\normalsize     f(x)=\int\limits_{-\infty}^x~e^{-t^2}dt

It was originally developed by Anlak.

The plugin just downloads the image from the public cgi script in Forkosh and copies it to your wp-content/cache.

I modified the plugin to correct two problems: the cgi script url has changed and there were some problems with tags and characters encoding. For the first issue I placed a script in my page that will keep the url updated without changes in the plugin code.

You can download this new version here.

Installation procedure:

  1. Copy both file to your “/wp-content/plugins”-folder.
  2. Create the folder “/wp-content/cache” and chmod it to 777.
  3. Go to the administration interface. In Plugins, activate it.


Some other examples:

\normalsize     f(x)=\int\limits_{-\infty}^x~e^{-t^2}dt

 \Large\hspace{5}\unitlength{1}    \picture(175,100){~(50,50){\circle(100)}    (1,50){\overbrace{\line(46)}^{4$\;\;a}}    (52,50){\line(125)}~(50,52;115;2){\mid}~(52,55){\longleftar[60]}    (130,56){\longrightar[35]}~(116,58){r}~(c85,50;80;2){\bullet}    (c85,36){3$-q}~(c165,36){3$q}    (42,29){\underbrace{\line(32)}_{1$a^2/r\;\;\;}}~}


Qual Horário Posso Jogar Tênis?

Sunday, October 21st, 2007

Atualização: O site da câmera já deve ter saído do ar. Coloquei o link para download do código.

A Faculdade de Educação Física (FEF) da Unicamp dispõe de três quadras de tênis para uso dos alunos e, até onde eu sei, para o público em geral. Por isso, há grande demanda e é difícil saber em quais horários as quadras estão disponíveis. A FEF instalou uma webcam para ajudar nessa questão, mas o máximo que você consegue com ela é saber se a quadra está vazia naquele exato momento. E você ainda corre o risco de, no intervalo entre a sua visita a webcam e a chegada na quadra, todas elas estejam ocupadas por alguma aula ou outras pessoas na mesma situação.

Webcam da FEF

É claro que, se você estiver com muito tempo livre, você pode visitar a galeria de fotos anteriores da webcam e tentar estimar qual o horário menos ocupado. Essa galeria tem fotos de meia em meia hora e isso torna difícil a estimativa. O ideal para estimar melhor seria assistir durante alguns dias a utilização das quadras, uma alternativa menos viável ainda. Mas não existiria uma forma automática para obter essas estatísticas?

Gerador Markoviano de Letras de Música

Tuesday, September 4th, 2007

Usando cadeias de Markov, as letras ficam mais realistas. Quanto maior a ordem da cadeia, mais ela vai ficar parecida com as letras originais. Teste!

Quer gerar uma letra de música? Clique na ordem ao lado do nome da banda (A cada clique uma música inédita!!!)

Código-fonte do gerador

Urban Transport Timetabling and Scheduling

Tuesday, September 4th, 2007


The Urban Transportation Problem (UTP) consists of timetabling, bus scheduling and drivers assignment for urban collective transport lines. It has clear social and financial importance. In this work, we consider a new hybrid approach to solve the UTP in which we generate a set of feasible driver’s journeys using Constraint Logic Programming, and then use two parallel metaheuristics, Tabu Search and Genetic Algorithm, to find good schedulings. This hybrid algorithm is tested against real instances steming the metropolitan region of São Paulo, and the solutions are compared with the manual ones, and also with those obtained from others techniques. Our solutions proved to be distinctively superior.


The Project was mainly developed by me and André Ciré and was advisored by Phd. Arnaldo Moura.

News Clip

Some Documents