Beans recipe

Another recipe from Felipe.

  1. Select the beans, i.e., remove the bad ones and little stones
  2. Soak the beans for 20-30mins in luck-warm water
  3. Chop one sausage and one onion in very small parts.
  4. In a large pressure cooker, fry the chopped sausage and onion until they get really brown
  5. Remove all the onions (and some of the sausage if you want)
  6. Put the soaked beans in the pressure cooker and fill with hot water until you get about 0.5-1cm of water above the beans
  7. Seal the pressure cooker and put in the high temp setting of the stove
  8. Once you start hearing the pressure coming out of the valve, change the setting to medium-low and count 15 mins
  9. Do the procedures to open the pressure cooker and check if the beans are in the texture you want and you have the amount of sauce (liquid you want). If you want to cook it more, add more hot water and repeat 8 (using 5-10mins instead of 15mins)
  10. Fry more sausage in a frying pan
  11. Add the fried sausage and some of the onions to the beans and cook it without pressure, i.e., without the lid, for 5-10mins moving a lot the beans to propagate the flavor.
  12. Add salt and pepper.

It works best with spiced sausage. Also, make sure to check the bottom of the pot to make sure that the beans are not burning down there. Burnt beans are awful.

Posted in Uncategorized | Leave a comment

Viewing Latex on Google Sites

I am in the process of moving my personal website to Google Sites. The main reason being the ease of creation and access control. Unfortunately, Google Sites do not allow Javascript, which is a bit problematic as I would like to use MathJax to render \( \LaTeX \) equations. After searching for a while, I realized that many people are not happy for this design decision. There are some application specific workarounds that embed JavaScript in gadgets.

However, since I am mostly interested in displaying math equations on a subset of the site used for personal note taking, I found an interesting solution after some digging. The main idea was to be able to see math equations on websites that intentionally do not render them, like arxiv.org. There seem to be a couple of solutions and I will present the one that I found most appealing. Note: an access to a server installation of MathJax is required.

In order to be render \( \LaTeX \), the following code should be inserted into a bookmarklet. Note that the code should be preceded with javascript:.

(function () {
  var script = document.createElement("script");
  script.type = "text/javascript";
  script.src = "/MathJax/MathJax.js";   // use the location of your MathJax

  var config = 'MathJax.Hub.Config({' +
                 'extensions: ["tex2jax.js"],' +
                 'jax: ["input/TeX","output/HTML-CSS"]' +
               '});' +
               'MathJax.Hub.Startup.onload();';

  if (window.opera) {script.innerHTML = config}
               else {script.text = config}

  document.getElementsByTagName("head")[0].appendChild(script);
})();

Then whenever one wants to view the equations one only needs to press the bookmarked link.

More details on running MathJax dynamically can be found in the online documentation. Especially one should take a look at how to customize the display.

Posted in Uncategorized | Leave a comment

Colin’s Pizza

This recipe is from Collin and it describes how to make Pizza dough.

Mix together in a cup:

  • 1/3 cup hot water
  • 2 teaspoons yeast
  • 1 teaspoon sugar

Mix together in a big bowl:

  • 1 1/4 cup hot water
  • 2 tea spoons honey
  • 2 1/2 teaspoons salt
  • 2 tablespoons olive oil

Mix the stuff from the cup with the ingredients from the ball.

Slowly add 3 3/4 cups flour to the mixture.

When the flour is mixed into the dough add more olive oil to remove the lour stuck to the side of the bowl and also just to keep the dough from sticking to you while kneading it.

After you knead the dough for a while, place a moist cloth over the bowl and place it in a warm oven. The oven should be above room temperature, but not too hot so that you worry about burning yourself.

Let it sit in the oven for 1 – 2 hours. If you don’t plan to use the dough immediately, you can store it in the fridge and let it sit either in a plastic bag or just in the bowl, still covered with the cloth.

The pizza should be baked for 375F – 425F depending how thick the sauce is.

Posted in Recipes | Leave a comment

Bitter Cake

The following recipe is due to Felipe.

Ingredients (for the dough)

1 cup of milk 1 cup of oil 1.5 cup of flour 3 eggs 1 spoon of baking powder salt

Ingredients (for the filling)  — mix and match as you like

some meat (sausages or chicken) spinach tomatoes parsley garlic onions …

Prepare the filling of the cake. I use various things, like spinach, tomatoes, sausage, chicken, garlic, onions, parsley. Not necessarily all of the things at once. Mix and match whatever seems good. The only important things is to remove the water from ingredients. For example, remove seeds from tomatoes or bake spinach before putting into the cake. The ingredients should not be warm when putting onto the dough. I usually bake chicken or sausage and vegetables, then put them into a fridge to cool down while preparing the dough.

To make the dough, mix eggs, oil, milk, flour, baking powder and salt until the mass is consistent.

Put butter in a baking pan. This step is optional, but help when removing the cake from the pan.

Put half of the mass at the bottom of the pan.

Once the filling is sufficiently cold, put it onto the dough.

Cover the filling with the rest of the dough.

Bake for ~40min on 375F

Posted in Recipes | Leave a comment

XFig + Latex

It always takes me 2 hours to recall how to use Latex in XFig. To make the process faster, the following advice is copy-pasted from here, which was shamelessly copy-pasted from here.

Inside xfig, add the LaTeX expressions to the figure, using $…$ to switch to math-mode where necessary. Use the normal method in xfig for adding text, but set the “special text” mode using the “Text flags” menu at the bottom of the screen.

Export the figure from xfig twice: firstly using the format “Combined PS/LaTeX (PS part)” to a file such as fig1.pstex, secondly using “Combined PS/LaTeX (LaTeX part)” to a file such as fig1.pstex_t.

Create a driver file (e.g., fig1.tex) containing something like:

\documentclass{article}
\usepackage{epsfig}
\usepackage{color}
\setlength{\textwidth}{100cm}
\setlength{\textheight}{100cm}
\begin{document}
\pagestyle{empty}
\input{fig1.pstex_t}
\end{document}

Run the commands:

latex fig1.tex
dvips -E fig1.dvi -o fig1.eps

You should now have a file named “fig1.eps” which can be included (with scaling and rotation if desired) in other LaTeX documents.

Posted in Uncategorized | 1 Comment

Wubi – Ubuntu 9.10

I’ve installed Wubi on a computer that needs to have Windows as well. It seems to work great, except that every now and then my system does not boot properly. The problem occurs when the kernel gets updated and grub gets messed up.

Here is what I have to go through in order to restore the system. Once in GNU GRUB prompt, type the following.

insmod ntfs
set root=(hd0,2)
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2xyz root=/dev/sda2 loop=/ubuntu/disks/root.disk ro quiet splash
initrd /boot/initrd.img-xyz
boot

Once the system is up, just update Grub.

UPDATE: It seems that the bug is well known. See the following link and comment #90 for the patch.

Posted in Uncategorized | Leave a comment

Challenges in Statistical Machine Learning

I recently read the commentary in Statistica Sinica on Challenges in Statistical Machine Learning by John Lafferty and Larry Wasserman. It is a quite old article from 2006, but somehow I am reading it only now.

The article addresses three challenges: sparsity, semi-supervised learning, trade of between computational complexity and risk, and structured prediction; each of which is discussed in a separate section. Since the article was written, there has been a lot of progress in theoretical understanding of methods that utilize sparsity, both in regression and classification setting. Here are some references to the work I am not too familiar with:

Maybe I will get around to reading those over the break. Maybe not. :)

Another area that has been developed intensively is semi-supervised learning, although I am not too familiar with the recent developments. In semi-supervised learning the main idea is that the unlabeled data is abundant, but labeling is expensive. Somehow, the learner (algorithm) should use the unlabeled data to improve predictive performance over a learner that does not utilize unlabeled data. Many methods are based on learning an unknown manifold structure from the unlabeled data. The manifold structure is utilized through the analysis of the eigenvectors of the graph Laplacian corresponding to the data. Very little is known about minimax theory of these problems, but see recent development in Unlabeled data: Now it helps, now it doesn’t.

A very interesting section is on trading off computational complexity and efficiency of the learning algorithm. Many of the current frameworks analyze only performance of a methods, without considering computational complexity of fitting the model. For example, traditional PAC model focuses on dividing algorithms between P and NP, but not on the trade-off between computation and risk. They encourage usage of computational minimax rates that incorporate computational cost.

As an example of the trade-off the point out to the paper

Posted in Random papers | Tagged , , | Leave a comment

Packings in Grassmann spaces

In one of my current projects, we were trying to find some papers that discuss how many hyperplanes are needed to cover a ball in Euclidean space. We wanted to find a cover, such that any point in the ball is at most \( \epsilon \) away from the closest hyperplane in the cover. The hyperplanes considered are supposed to be affine.

The following papers seemed interesting at the first sight, but the main concern there is packing of linear hyperplanes. For future reference, here they are:

Posted in Random papers | Leave a comment

Kibbe

I have been cooking for my self since I started my PhD two years ago. I started cooking even earlier, while doing an internship in Italy. However, that wasn’t really a necessity since we had a restaurant on campus. Working towards a PhD requires a lot of time and so does the cooking. In order to accommodate both, I usually cook meals that I can be done quickly over a weekend and be eaten throughout the week. The following recipe for Kibbe, which I obtained from Felipe, satisfy aforementioned requirements.

Ingredients:

  • ½ kg wheat
  • 1kg grounded meat
  • 1 big onion
  • 2 cloves of garlic
  • spices (mint, parsley, pepper, chilly, crushed pepper) (optional)
  • 1 spoon salt
  • cca 100g of butter

Procedure:

  1. Leave wheat in water, until there is no more water (cca 2-3 hours)
  2. Cut garlic and onion into very small pieces.
  3. Remove the remaining water from the wheat.
  4. Mix all ingredients, but the butter, together.
  5. Spread the butter at the bottom of a pan (cca 25cm x 20cm)
  6. Put the mix into the pan and cut the “dove” into pieces.
  7. Melt the remaining butter and pour between pieces.
  8. Bake for 45min on a medium heat.

*  If you are not doing step 7, then add some oil into the mix in step 4.

I like to eat this meal spicy, so I put a lot of stuff into the mixture. Kibbe can be served with rice. Enjoy.

Posted in Recipes | Leave a comment

Ultramarathon man

Last month I managed to finish ‘Ultramarathon Man: Confessions of an All-Night Runner‘ by Dean Karnazes. Although the book probably won’t win any literature awards anytime soon, it was an interesting read. It gave me a number of ideas and challenges to pursue. For example, train hard to finish Ultra-Trail du Mont-Blanc. The main point that is emphasized throughout the book is ‘no pain, no gain’ or ‘persistency pays off’. Apparently, with hard work everything is possible. I must admit, however, that by the time I nearing the end of the book, I got bored of Dean’s egocentric style of writing and how amazing, in his opinion, he is. Nevertheless, an interesting read.

On the forthcoming trip I plan to finish ‘Omnivore’s Dilemma‘ by Michael Pollan and maybe ‘Outliers: The story of success‘ by Malcolm Gladwell.

Posted in books | Tagged | Leave a comment