Today this post is about Bobby McFerrin, a vocalist specialized in singing a capella (creating polyphonic effects) and also an orchestra conductor. Some of you might know him from the song "Don't worry be happy" but there's more, much more!
First video "Bobby McFerrin hacks your brain with music". It's a revealing video about how neuroscience works in terms of music and the pentatonic scale.
If that wasn't enough to convice you, he also sings Bach pieces..
Or two tones at the same time..
And improvises spectacular songs a capella
Saturday, December 3, 2011
Saturday, September 3, 2011
Life!
While watching the Life BBC Documentary (which I couldn't recommend more) I got totally awesome-ed by the hunting technique of the Bottlenose Dolphins. So, here's the video but please, please PLEASE if you have the opportunity, watch the whole series!
Other dolphin strategies are "fish whacking" which consists on hitting a fish with its fluke and knocking it out of the water and "Strand feeding" where dolphins kick the fish out of the water and into the shore where they retrieve them, which can be easily understood in the video below:
Other dolphin strategies are "fish whacking" which consists on hitting a fish with its fluke and knocking it out of the water and "Strand feeding" where dolphins kick the fish out of the water and into the shore where they retrieve them, which can be easily understood in the video below:
Labels:
Animals,
Hoy recomendamos..,
Videos
Tuesday, August 30, 2011
Resum de vacances a La Isla Bonita
Recent tornats del festival de senderisme de la palma i després de fer un parell d'excursions més, la nostra estada a La Palma queda plasmada totalment en el següent vídeo:
Com al vídeo, nosaltres també vam sortir del Refugio del Pilar i vam seguir per La Ruta de Los Volcanes fent parada, obviament, al "Bar Parada", excursió que penjaré amb fotos i més info més endavant, però que va resultar ser espectacular. Quina gran illa La Palma i quines ganes de tornar al festival l'any que ve!
Com al vídeo, nosaltres també vam sortir del Refugio del Pilar i vam seguir per La Ruta de Los Volcanes fent parada, obviament, al "Bar Parada", excursió que penjaré amb fotos i més info més endavant, però que va resultar ser espectacular. Quina gran illa La Palma i quines ganes de tornar al festival l'any que ve!
Labels:
Videos Senderismo
Wednesday, August 17, 2011
Easy solution to Satchmo Discounts malfunction.
Problem:
When applying a discount only to a number of products in the store, the message advertising the discount is shown in all the products (not only the ones which the discount is applicable to).
Solution: (as seen here)
1. Go to the product view: product/views/__init__.py
2. After
So your function to get the template context from the Product is like:
3. Done.
When applying a discount only to a number of products in the store, the message advertising the discount is shown in all the products (not only the ones which the discount is applicable to).
Solution: (as seen here)
1. Go to the product view: product/views/__init__.py
2. After
context = RequestContext(request,extra_context) add this line:context['sale']=best_discountSo your function to get the template context from the Product is like:
# Get the template context from the Product.
extra_context = product.add_template_context(context=extra_context,
request=request, selected_options=selected_options,
default_view_tax=default_view_tax)
template = find_product_template(product, producttypes=subtype_names)
context = RequestContext(request, extra_context)context['sale']=best_discount #line added3. Done.
Labels:
Programming
Tuesday, August 16, 2011
Perque també existeix l'animació artística i no només la comercial..
Cal veure l'animació, que és espectacular, però també el making of.
Thought of You from Ryan J Woodward on Vimeo.
Labels:
Art,
coses que t'alegren el dia,
Videos
Saturday, August 13, 2011
Animals have a shut down/freeze button
After minimal research, I arrived to the concussion conclusion that most of the animals have a shut down (or freeze) button. And here, some examples:
A cat..
A dog..
And finally, a sloth! Okay, I know there is a much more serious video proof of this, but this video made me laugh ;)
A cat..
A dog..
And finally, a sloth! Okay, I know there is a much more serious video proof of this, but this video made me laugh ;)
Tuesday, May 3, 2011
Solution for @googlenexus puzzle number 5 in Python, in less than a tweet.
b='tcag'
s=''
for c in i.lower():
if c in b:s+=c
if len(s)>2:print dict(zip([x+y for x in b for y in b],'***WL*HRIT*SVAE'))[s[:2]];s=''
That's it! Now the explanation:
It's assumed that the variable i contains the INPUT of the puzzle: a string with all the cities, with one modification: the letter 'ã' of São Paulo has been replaced by 'a'.
- But why? Isn't that cheating? The character 'ã' is not the character 'a'!
- Well, I justify that change in that the letter 'ã' does not represent Adenine, so if we take this solution down for that, the problem has to go down too... :o)
First: the chunk in red is a python dictionary mapping the two first letters of a codon (three bases) with its one code letter (see the second table here: http://www.hgvs.org/mutnomen/codon.html ).
>>> b='tcag' ; dict(zip([x+y for x in b for y in b],'***WL*HRIT*SVAE'))
{'aa': '*', 'ac': 'T', 'gt': 'V', 'ag': 'S', 'cc': '*', 'tt': '*', 'cg': 'R', 'gc': 'A', 'at': 'I', 'ga': 'E', 'tg': 'W', 'ca': 'H', 'ta': '*', 'tc': '*', 'ct': 'L'}
Line 1: These are the bases.
Line 3: I iterate over the lowered input string...
Line 4: ...looking for interesting characters ('t', 'c', 'a', 'g') and storing them in s
Line 5: when I've got three interesting characters, I take the first two (ignoring the third one), look them up in the dictionary and print the associated one code letter.
Running it this happens:
$ python nexus.py
T
R
A
V
E
L
T
H
E
E
A
R
T
H
W
I
T
H
S
T
S <-- This is the ugly expected consequence of the untreated ambiguity.
E
E
T
V
I
E
W
The challenge was solving the puzzle in less than a tweet. Finally I got it in 137 characters (tabs, \n and spaces included!).
EDIT: Thanks to this guy http://www.petercollingridge.co.uk/python-bioinformatics-tools/codon-table . I took from him the idea for a short mapping!
s=''
for c in i.lower():
if c in b:s+=c
if len(s)>2:print dict(zip([x+y for x in b for y in b],'***WL*HRIT*SVAE'))[s[:2]];s=''
That's it! Now the explanation:
It's assumed that the variable i contains the INPUT of the puzzle: a string with all the cities, with one modification: the letter 'ã' of São Paulo has been replaced by 'a'.
- But why? Isn't that cheating? The character 'ã' is not the character 'a'!
- Well, I justify that change in that the letter 'ã' does not represent Adenine, so if we take this solution down for that, the problem has to go down too... :o)
First: the chunk in red is a python dictionary mapping the two first letters of a codon (three bases) with its one code letter (see the second table here: http://www.hgvs.org/mutnomen/codon.html ).
>>> b='tcag' ; dict(zip([x+y for x in b for y in b],'***WL*HRIT*SVAE'))
{'aa': '*', 'ac': 'T', 'gt': 'V', 'ag': 'S', 'cc': '*', 'tt': '*', 'cg': 'R', 'gc': 'A', 'at': 'I', 'ga': 'E', 'tg': 'W', 'ca': 'H', 'ta': '*', 'tc': '*', 'ct': 'L'}
From that can be seen that every relevant couple of characters has a one code letter associated. Irrelevant couples have asterisks. For example (in green), when I find a codon of this shape gtX, being X any of {A, T, C, G}, I know that the one code letter will be 'V'. A while ago I mapped all three letters of a codon, but I realized that I didn't need that much precision, since with only the first two letters I could get a pretty decent mapping, not biunivocal but with only one ambiguity (that's nothing for an average human like me). The third letter was almos superflous. Almost.
Now line by line:
Line 1: These are the bases.
Line 3: I iterate over the lowered input string...
Line 4: ...looking for interesting characters ('t', 'c', 'a', 'g') and storing them in s
Line 5: when I've got three interesting characters, I take the first two (ignoring the third one), look them up in the dictionary and print the associated one code letter.
Running it this happens:
$ python nexus.py
T
R
A
V
E
L
T
H
E
E
A
R
T
H
W
I
T
H
S
T
S <-- This is the ugly expected consequence of the untreated ambiguity.
E
E
T
V
I
E
W
The challenge was solving the puzzle in less than a tweet. Finally I got it in 137 characters (tabs, \n and spaces included!).
EDIT: Thanks to this guy http://www.petercollingridge.co.uk/python-bioinformatics-tools/codon-table . I took from him the idea for a short mapping!
Monday, February 28, 2011
All work and no play makes eli have a twitter account
Senyors i senyores... com que amb la feina vaig totalment sense temps, he decidit disminuir els posts per aquí i augmentar el ritme de missatges curts. Així que:
Ara també em podreu trobar a www.twitter.com/elisenda_bou !!
Us espero allí!
Ara també em podreu trobar a www.twitter.com/elisenda_bou !!
Us espero allí!
Saturday, January 22, 2011
Tim Minchin
There's nothing left to add :)
Labels:
coses que t'alegren el dia,
Music
Saturday, January 8, 2011
Dil·lema de pingüins!
Perquè tot i que els pingüins siguin aus marines, a vegades també els hi fa mandra mullarse els peus...
Quin fart de riure!
Quin fart de riure!
The difference between knowing the name and knowing
Vist a meneame aquest matí.. i no m'he pogut aguantar de posar-ho aqui.
Que tingueu un bon dia!
Que tingueu un bon dia!
Thursday, December 2, 2010
WhereAmI Available for Free in Android market!
Finally WhereAmI App, the application that lets you view your location (GPS or network based) and post a wall message in your facebook account with your location and a link to google maps is available for free in Android market!!
Tell your friends where they can find you or update a meeting point on the go!
No more need to wait for all your friends standing in a place, just move to another one and tell them your new location!
If you're interested, you can download it using this QR Code:
And if you're in the mood, please reccomend it on facebook (which will be very appreciated)!
Thanks!
Friday, October 22, 2010
Using Facebook SDK in Android Applications
Howto publish images and links with Android in your Facebook Wall using stream.publish method from Facebook SDK:
1st: Download Facebook SDK using git. http://github.com/facebook/facebook-android-sdk
(highly recommended to play a little with Example.java and other methods)
2nd: create a new project from Example.java
3rd: create a Bundle with all the parameters to post and publish it using SampleDialogListener
Bundle parameters = new Bundle();
parameters.putString("method","stream.publish");
String mylink="http://kinesina.blogspot.com";
String myimagelink="http://kinesina.blogspot.com";
String attachments = "{
\"name\":\"Location Here\",
\"href\":\""+mylink + "\",
\"caption\":\"Click to view in Google Maps\",
\"media\":[{
\"type\":\"image\",
\"src\": \"http://myimgurl\",
\"href\": \""+myimagelink+"\"}]}";
parameters.putString("attachment", attachments);
mFacebook.dialog(Example.this, "stream.publish", parameters, new SampleDialogListener()) ;
If you liked this app (WhereAmI) you can download it from Android Market for free, or mark/like it on facebook (available soon).
Hope you like it, 'cause it is gonna be my first app published in Android Market!
1st: Download Facebook SDK using git. http://github.com/facebook/facebook-android-sdk
(highly recommended to play a little with Example.java and other methods)
2nd: create a new project from Example.java
3rd: create a Bundle with all the parameters to post and publish it using SampleDialogListener
Bundle parameters = new Bundle();
parameters.putString("method","stream.publish");
String mylink="http://kinesina.blogspot.com";
String myimagelink="http://kinesina.blogspot.com";
String attachments = "{
\"name\":\"Location Here\",
\"href\":\""+mylink + "\",
\"caption\":\"Click to view in Google Maps\",
\"media\":[{
\"type\":\"image\",
\"src\": \"http://myimgurl\",
\"href\": \""+myimagelink+"\"}]}";
parameters.putString("attachment", attachments);
mFacebook.dialog(Example.this, "stream.publish", parameters, new SampleDialogListener()) ;
4th: Using LocationManager and Google Maps API (which I will explain soon), you can post your location and a link to google maps in your facebook wall!
If you liked this app (WhereAmI) you can download it from Android Market for free, or mark/like it on facebook (available soon).
Hope you like it, 'cause it is gonna be my first app published in Android Market!
Tuesday, October 19, 2010
Android SDK for Eclipse running in Ubuntu 10.10
After upgrading my Ubuntu to 10.10, I got the same error as explained in http://sonalsantan.blogspot.com/2010/10/eclipse-adt-plugin-on-ubuntu-1010-after.html
"I found that my Eclipse Android Development Toolkit plugin stopped working. The Eclipse Help>Installation Details Menu would list ADT under Installed Software Tab. However, neither the Features Tab nor the Plug-ins Tab would list ADT."
Also, the installation of gef would fail due to the lack of some packages, solution found here http://ubuntuforums.org/showthread.php?t=1305691
Finally, in order to get Eclipse working with ADT plugin in Ubuntu 10.10, I did the following steps:
1. Exit eclipse if running
2. Delete ~/.eclipse/org.eclipse.platform_(your platform)
3. Start eclipse
4. Open Help > Install New Software
5. Add this sites:
5.1 http://download.eclipse.org/datatools/updates
5.2 http://download.eclipse.org/webtools/updates
5.3 http://download.eclipse.org/modeling/emf/updates
6. Install GEF Plugin (previously add the site http://download.eclipse.org/tools/gef/updates/releases)
7. Install ADT Plugin (previously add the site https://dl-ssl.google.com/android.eclipse
"I found that my Eclipse Android Development Toolkit plugin stopped working. The Eclipse Help>Installation Details Menu would list ADT under Installed Software Tab. However, neither the Features Tab nor the Plug-ins Tab would list ADT."
Also, the installation of gef would fail due to the lack of some packages, solution found here http://ubuntuforums.org/showthread.php?t=1305691
Finally, in order to get Eclipse working with ADT plugin in Ubuntu 10.10, I did the following steps:
1. Exit eclipse if running
2. Delete ~/.eclipse/org.eclipse.platform_(your platform)
3. Start eclipse
4. Open Help > Install New Software
5. Add this sites:
5.1 http://download.eclipse.org/datatools/updates
5.2 http://download.eclipse.org/webtools/updates
5.3 http://download.eclipse.org/modeling/emf/updates
6. Install GEF Plugin (previously add the site http://download.eclipse.org/tools/gef/updates/releases)
7. Install ADT Plugin (previously add the site https://dl-ssl.google.com/android.eclipse
Monday, September 27, 2010
Seth Goding on Standing Out
Here you have both a serious (actually, not that much) and a funny talk from Seth Goding.
First: the funny one (things that are just broken)
Seth Godin at Gel 2006 from Gel Conference on Vimeo.
Second one: how to stand out and do remarkable things.
First: the funny one (things that are just broken)
Seth Godin at Gel 2006 from Gel Conference on Vimeo.
Second one: how to stand out and do remarkable things.
Sunday, August 15, 2010
Working with Android. Chapter 2: Intent Class
In android, it is possible to open a webpage (or another application) from your application, which can be accomplished using the class Intent. Intent is a very useful class, which will allow you to perform a lot of different operations such as dial a phone, install new packages, view your contacts list, pick data from other applications and so on. An intent is an abstract description of an operation to be performed. Used with startActivity launches an application, used with startService makes it possible to communicate with a background service.
In this post, three examples of Intent class are given for different operations.
1. Opening a Webpage with ACTION_VIEW:
int ACTIVITY_INVOKE = 0;
Intent i = new Intent(); //creates a new intent
i.setClassName("com.android.app2","com.android.app2.Application2"); //specify app2
startActivityForResult(i, ACTIVITY_INVOKE);
setClassName(String packageName, String className) allows you to specify the application package name and class name of the application you want to call (which has to be already installed in your phone). The Package name corresponds to the directory list in /src/ and your class name is. (without the .java extension!).
startActivityForResult(Intent intent, int RequestCode) will call the application specified with i.setClassName and call the method onActivityResult() with the given requestCode when it finished.
Finally, it is possible to override the onActivityResult method to fit your needs:
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) //when the activity is finished
{
if(resultCode==0) { //ok
Toast toast = Toast.makeText(this, "All ok", Toast.LENGTH_SHORT);
toast.show();
} else { //something went wrong
Toast toast = Toast.makeText(this, "Firma no aceptada", Toast.LENGTH_SHORT);
toast.show();
}
}
In this post, three examples of Intent class are given for different operations.
1. Opening a Webpage with ACTION_VIEW:
The ACTION_VIEW intent displays data to the user. For example, when used on a contacts entry it will view the entry; when used on a mailto: URI it will bring up a compose window filled with the information supplied by the URI; when used with a tel: URI will invoke the dialer (more information on URI here http://developer.android.com/reference/android/net/Uri.html)
String url = "http://www.google.com"; //define url to load
Intent i = new Intent(Intent.ACTION_VIEW); //create an Intent.ACTION_VIEW
Uri u = Uri.parse(url); //creates the Uri object
i.setData(u); //Set the data this intent is operating on.
try {
startActivity(i); //Launch a new activity
} catch (ActivityNotFoundException e){ //in case something did not work
Toast toast = Toast.makeText(context, "Browser not found.", Toast.LENGTH_SHORT);
}
Intent i = new Intent(Intent.ACTION_VIEW); //create an Intent.ACTION_VIEW
Uri u = Uri.parse(url); //creates the Uri object
i.setData(u); //Set the data this intent is operating on.
try {
startActivity(i); //Launch a new activity
} catch (ActivityNotFoundException e){ //in case something did not work
Toast toast = Toast.makeText(context, "Browser not found.", Toast.LENGTH_SHORT);
}
As usual, you will have to add internet permission to your manifest.xml:
2. Calling another Application from your main application with startActivityForResult:
The function startActivityForResult will launch an activity for which you would like a result when it finished. When this activity exits, your onActivityResult() method will be called with the given requestCode.int ACTIVITY_INVOKE = 0;
Intent i = new Intent(); //creates a new intent
i.setClassName("com.android.app2","com.android.app2.Application2"); //specify app2
startActivityForResult(i, ACTIVITY_INVOKE);
setClassName(String packageName, String className) allows you to specify the application package name and class name of the application you want to call (which has to be already installed in your phone). The Package name corresponds to the directory list in /src/ and your class name is
startActivityForResult(Intent intent, int RequestCode) will call the application specified with i.setClassName and call the method onActivityResult() with the given requestCode when it finished.
Finally, it is possible to override the onActivityResult method to fit your needs:
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) //when the activity is finished
{
if(resultCode==0) { //ok
Toast toast = Toast.makeText(this, "All ok", Toast.LENGTH_SHORT);
toast.show();
} else { //something went wrong
Toast toast = Toast.makeText(this, "Firma no aceptada", Toast.LENGTH_SHORT);
toast.show();
}
}
3. Dialing a phone with ACTION_DIAL Using startActivity and setAction, it is possible to dial a phone (ACTION_DIAL) or to make a call (ACTION_CALL): Intent i = new Intent(); i.setAction(Intent.ACTION_DIAL); //set action to be performed i.setData(Uri.parse("tel:+34000000000")); //specify the phone number startActivity(i); //starts activity |
Saturday, July 31, 2010
Saturday, July 17, 2010
homeopathy: how to dilute critical thinking until there's no thinking at all
Homeopathy is a pseudoscience which operates on the principle that by diluting a remedy in water, you can make it more effective. Therefore, if smaller concentrations of the "remedy" are achieved, then it just gets more "effective", fact that is called the Law of Infinitesimals.
There is a very common remedy in homeopathy called Oscillococcinum, which my mother has always wanted me to try but never succeeded. This remedy is prepared by diluting freeze duck heart and liver in a concentration 1 part in 100200 (which is a 1 followed by 400 zeros). It may be known that the laws of chemistry state that there is a limit to how far one can dilute a solution (about 1 part in 10012 ) which is far greater than oscillococcinum, but this is not considered a problem in homeopathy because of this belief:
"By vigorously shaking the solution, the water will retain a kind of memory or essence of the active ingredient. Thus, even if none of the active ingredient remains in the water, the water will remember it was there and give the same effect".
¡What the hell?!
I would like to show you two visions of homeopathy that I recently found and which I totally agree with.
There is a very common remedy in homeopathy called Oscillococcinum, which my mother has always wanted me to try but never succeeded. This remedy is prepared by diluting freeze duck heart and liver in a concentration 1 part in 100200 (which is a 1 followed by 400 zeros). It may be known that the laws of chemistry state that there is a limit to how far one can dilute a solution (about 1 part in 10012 ) which is far greater than oscillococcinum, but this is not considered a problem in homeopathy because of this belief:
"By vigorously shaking the solution, the water will retain a kind of memory or essence of the active ingredient. Thus, even if none of the active ingredient remains in the water, the water will remember it was there and give the same effect".
¡What the hell?!
I would like to show you two visions of homeopathy that I recently found and which I totally agree with.
And finally, another James Randi's talk, that I am sure you will enjoy.
have fun!
Wednesday, June 9, 2010
Subscribe to:
Posts (Atom)






