Jan 27, 2012

Using wget to download a page and browse it locally


Run: [carpincho@bender]$ wget -r --convert-links url
What the arguments do:

  • -r (its the same using --recursive)   Turn on recursive retrieving.   The default maximum depth is 5.

  • -k (its the same using --convert-links) After the download is complete, convert the links in the document to make them suitable for local viewing. This affects not only the visible hyperlinks, but any part of the document that links to external content,such as embedded images, links to style sheets, hyperlinks to non-HTML content, etc.
  • url (obvious :P)
Note: You can run it under any Unix based Os or under Mac Os previouly installing it with macports

Miscellaneous Symbols


Character
(decimal)
DecimalCharacter
(hex)
HexEntityName
97282600 BLACK SUN WITH RAYS
97292601 CLOUD
97302602 UMBRELLA
97312603 SNOWMAN
97322604 COMET
97332605 BLACK STAR
97342606 WHITE STAR
97352607 LIGHTNING
97362608 THUNDERSTORM
97372609 SUN
9738260A ASCENDING NODE
9739260B DESCENDING NODE
9740260C CONJUNCTION
9741260D OPPOSITION
9742260E BLACK TELEPHONE
9743260F WHITE TELEPHONE
97442610 BALLOT BOX
97452611 BALLOT BOX WITH CHECK
97462612 BALLOT BOX WITH X
97472613 SALTIRE
97482614 UMBRELLA WITH RAIN DROPS
97492615 HOT BEVERAGE
97502616 WHITE SHOGI PIECE
97512617 BLACK SHOGI PIECE
97522618 SHAMROCK
97532619 REVERSED ROTATED FLORAL HEART BULLET
9754261A BLACK LEFT POINTING INDEX
9755261B BLACK RIGHT POINTING INDEX
9756261C WHITE LEFT POINTING INDEX
9757261D WHITE UP POINTING INDEX
9758261E WHITE RIGHT POINTING INDEX
9759261F WHITE DOWN POINTING INDEX
97602620 SKULL AND CROSSBONES
97612621 CAUTION SIGN
97622622 RADIOACTIVE SIGN
97632623 BIOHAZARD SIGN
97642624 CADUCEUS
97652625 ANKH
97662626 ORTHODOX CROSS
97672627 CHI RHO
97682628 CROSS OF LORRAINE
97692629 CROSS OF JERUSALEM
9770262A STAR AND CRESCENT
9771262B FARSI SYMBOL
9772262C ADI SHAKTI
9773262D HAMMER AND SICKLE
9774262E PEACE SYMBOL
9775262F YIN YANG
97762630 TRIGRAM FOR HEAVEN
97772631 TRIGRAM FOR LAKE
97782632 TRIGRAM FOR FIRE
97792633 TRIGRAM FOR THUNDER
97802634 TRIGRAM FOR WIND
97812635 TRIGRAM FOR WATER
97822636 TRIGRAM FOR MOUNTAIN
97832637 TRIGRAM FOR EARTH
97842638 WHEEL OF DHARMA
97852639 WHITE FROWNING FACE
9786263A WHITE SMILING FACE (present in WGL4)
9787263B BLACK SMILING FACE (present in WGL4)
9788263C WHITE SUN WITH RAYS (present in WGL4)
9789263D FIRST QUARTER MOON
9790263E LAST QUARTER MOON
9791263F MERCURY
97922640 FEMALE SIGN (present in WGL4)
97932641 EARTH
97942642 MALE SIGN (present in WGL4)
97952643 JUPITER
97962644 SATURN
97972645 URANUS
97982646 NEPTUNE
97992647 PLUTO
98002648 ARIES
98012649 TAURUS
9802264A GEMINI
9803264B CANCER
9804264C LEO
9805264D VIRGO
9806264E LIBRA
9807264F SCORPIUS
98082650 SAGITTARIUS
98092651 CAPRICORN
98102652 AQUARIUS
98112653 PISCES
98122654 WHITE CHESS KING
98132655 WHITE CHESS QUEEN
98142656 WHITE CHESS ROOK
98152657 WHITE CHESS BISHOP
98162658 WHITE CHESS KNIGHT
98172659 WHITE CHESS PAWN
9818265A BLACK CHESS KING
9819265B BLACK CHESS QUEEN
9820265C BLACK CHESS ROOK
9821265D BLACK CHESS BISHOP
9822265E BLACK CHESS KNIGHT
9823265F BLACK CHESS PAWN
98242660♠ (♠)BLACK SPADE SUIT (present in WGL4 and in Symbol font)
98252661 WHITE HEART SUIT
98262662 WHITE DIAMOND SUIT
98272663♣ (♣)BLACK CLUB SUIT (present in WGL4 and in Symbol font)
98282664 WHITE SPADE SUIT
98292665♥ (♥)BLACK HEART SUIT (present in WGL4 and in Symbol font)
98302666♦ (♦)BLACK DIAMOND SUIT (present in WGL4 and in Symbol font)
98312667 WHITE CLUB SUIT
98322668 HOT SPRINGS
98332669 QUARTER NOTE
9834266A EIGHTH NOTE (present in WGL4)
9835266B BEAMED EIGHTH NOTES (present in WGL4)
9836266C BEAMED SIXTEENTH NOTES
9837266D MUSIC FLAT SIGN
9838266E MUSIC NATURAL SIGN
9839266F MUSIC SHARP SIGN
98402670 WEST SYRIAC CROSS
98412671 EAST SYRIAC CROSS
98422672 UNIVERSAL RECYCLING SYMBOL
98432673 RECYCLING SYMBOL FOR TYPE-1 PLASTICS
98442674 RECYCLING SYMBOL FOR TYPE-2 PLASTICS
98452675 RECYCLING SYMBOL FOR TYPE-3 PLASTICS
98462676 RECYCLING SYMBOL FOR TYPE-4 PLASTICS
98472677 RECYCLING SYMBOL FOR TYPE-5 PLASTICS
98482678 RECYCLING SYMBOL FOR TYPE-6 PLASTICS
98492679 RECYCLING SYMBOL FOR TYPE-7 PLASTICS
9850267A RECYCLING SYMBOL FOR GENERIC MATERIALS
9851267B BLACK UNIVERSAL RECYCLING SYMBOL
9852267C RECYCLED PAPER SYMBOL
9853267D PARTIALLY-RECYCLED PAPER SYMBOL
9854267E PERMANENT PAPER SIGN
9855267F WHEELCHAIR SYMBOL
98562680 DIE FACE-1
98572681 DIE FACE-2
98582682 DIE FACE-3
98592683 DIE FACE-4
98602684 DIE FACE-5
98612685 DIE FACE-6
98622686 WHITE CIRCLE WITH DOT RIGHT
98632687 WHITE CIRCLE WITH TWO DOTS
98642688 BLACK CIRCLE WITH WHITE DOT RIGHT
98652689 BLACK CIRCLE WITH TWO WHITE DOTS
9866268A MONOGRAM FOR YANG
9867268B MONOGRAM FOR YIN
9868268C DIGRAM FOR GREATER YANG
9869268D DIGRAM FOR LESSER YIN
9870268E DIGRAM FOR LESSER YANG
9871268F DIGRAM FOR GREATER YIN
98722690 WHITE FLAG
98732691 BLACK FLAG
98742692 HAMMER AND PICK
98752693 ANCHOR
98762694 CROSSED SWORDS
98772695 STAFF OF AESCULAPIUS
98782696 SCALES
98792697 ALEMBIC
98802698 FLOWER
98812699 GEAR
9882269A STAFF OF HERMES
9883269B ATOM SYMBOL
9884269C FLEUR-DE-LIS
9885269D OUTLINED WHITE STAR
9886269E THREE LINES CONVERGING RIGHT
9887269F THREE LINES CONVERGING LEFT
988826A0 WARNING SIGN
988926A1 HIGH VOLTAGE SIGN
989026A2 DOUBLED FEMALE SIGN
989126A3 DOUBLED MALE SIGN
989226A4 INTERLOCKED FEMALE AND MALE SIGN
989326A5 MALE AND FEMALE SIGN
989426A6 MALE WITH STROKE SIGN
989526A7 MALE WITH STROKE AND MALE AND FEMALE SIGN
989626A8 VERTICAL MALE WITH STROKE SIGN
989726A9 HORIZONTAL MALE WITH STROKE SIGN
989826AA MEDIUM WHITE CIRCLE
989926AB MEDIUM BLACK CIRCLE
990026AC MEDIUM SMALL WHITE CIRCLE
990126AD MARRIAGE SYMBOL
990226AE DIVORCE SYMBOL
990326AF UNMARRIED PARTNERSHIP SYMBOL
990426B0 COFFIN
990526B1 FUNERAL URN
990626B2 NEUTER
Source!!!

Jan 26, 2012

Alternative to istat menu

MenuMeters is  a set of CPU, memory, disk, and network monitoring tools for Mac OS X.

Although there are numerous other programs which do the same thing, none had quite the feature set I was looking for. Most were windows that sat in a corner or on the desktop, which are inevitably obscured by document windows on a laptop's small screen. 




MenuMeters at the topmenu


Requirements:
  • Mac OS X 10.4 or later (10.7 supported)
  • PowerPC or Intel based Macintosh (Universal Binary)
Website



Jan 25, 2012

How to Accomplish More by Doing Less

Two people of equal skill work in the same office. For the sake of comparison, let's say both arrive at work at 9 am each day, and leave at 7 pm.


Bill works essentially without stopping, juggling tasks at his desk and running between meetings all day long. He even eats lunch at his desk. Sound familiar?


Nick, by contrast, works intensely for approximately 90 minutes at a stretch, and then takes a 15 minute break before resuming work. At 12:15, he goes out for lunch for 45 minutes, or works out in a nearby gym. At 3 pm, he closes his eyes at his desk and takes a rest. Sometimes it turns into a 15 or 20 minute nap. Finally, between 4:30 and 5, Nick takes a 15 minute walk outside.


Bill spends 10 hours on the job. He begins work at about 80 percent of his capacity, instinctively pacing himself rather than pushing all out, because he knows he's got a long day ahead.


By 1 pm, Bill is feeling some fatigue. He's dropped to 60 percent of his capacity and he's inexorably losing steam. Between 4 and 7 pm, he's averaging about 40 percent of his capacity.


It's called the law of diminishing returns. Bill's average over 10 hours is 60 percent of his capacity, which means he effectively delivers 6 hours of work.


Nick puts in the same 10 hours. He feels comfortable working at 90 percent of his capacity, because he knows he's going to have a break before too long. He slows a little as the day wears on, but after a midday lunch or workout, and a midafternoon rest, he's still at 70 percent during the last three hours of the day.


Nick takes off a total of two hours during his 10 at work, so he only puts in 8 hours. During that time, he's working at an average of 80 percent of his capacity, so he's delivering just under 6 ½ hours of work — a half hour more than Bill.


Because Nick is more focused and alert than Bill, he also makes fewer mistakes, and when he returns home at night, he has more energy left for his family.


It's not just the number of hours we sit at a desk in that determines the value we generate. It's the energy we bring to the hours we work. Human beings are designed to pulse rhythmically between spending and renewing energy. That's how we operate at our best. Maintaining a steady reservoir of energy — physically, mentally, emotionally and even spiritually — requires refueling it intermittently.


Work the way Nick does, and you'll get more done, in less time, at a higher level of quality, more sustainably.


Create a workplace that truly values a balanced relationship between intense work and real renewal, and you'll not only get greater productivity from employees, but also higher engagement and job satisfaction.


There's plenty of evidence that increased rest and renewal serve performance.


Consider a study conducted by NASA, in collaboration with the Federal Aviation Administration, of pilots on long haul flights. One group of pilots was given an opportunity to take 40 minute naps mid-flight, and ended up getting an average of 26 minutes of actual sleep. Their median reaction time improved by 16 percent following their naps.


Non-napping pilots, tested at a similar halfway point in the flight, experienced a 34 percent deterioration in reaction time. They also experienced 22 micro sleeps of 2-10 seconds during the last 30 minutes of the flight. The pilots who took naps experienced none.


Or consider the study that performance expert Anders Ericcson did of violinists at the Berlin Academy of Music. The best of the violinists practiced in sessions no longer than 90 minutes, and took a break in between each one. They almost never practiced more than 4 ½ hours over a day. What they instinctively understood was the law of diminishing returns.


The top violinists also got an average of more than 8 hours of sleep a night, and took a 20-30 minute nap every afternoon. Over a week, they slept 16 hours more than the average American does.


During my 30s and 40s, I wrote three books. I sat at my desk each day from 7 am to 7 pm, struggling to stay focused. Each book took me at least a year to write. For my most recent books, I wrote in a schedule that matched the great violinists — three 90 minute sessions with a renewal break in between each one.


I wrote both those books in six months — investing less than half the number of hours I had for each of my first three books. When I was working, I was truly working. When I was recharging — whether by getting something to eat, or meditating, or taking a run — I was truly refueling.


Stress isn't the enemy in the workplace. Indeed, stress is the only means by which we can expand capacity. Just think about weightlifting. By stressing your muscles, and then recovering, you gradually build strength. Our real enemy is the absence of intermittent renewal.

Jan 24, 2012

Show all values in Numpy array

If an array is too large to be printed, (Scipy)NumPy automatically skips the central part of the array and only prints the corners:

>>> print arange(10000)
[   0    1    2 ..., 9997 9998 9999]
>>>
>>> print arange(10000).reshape(100,100)
[[   0    1    2 ...,   97   98   99]
 [ 100  101  102 ...,  197  198  199]
 [ 200  201  202 ...,  297  298  299]
 ...,
 [9700 9701 9702 ..., 9797 9798 9799]
 [9800 9801 9802 ..., 9897 9898 9899]
 [9900 9901 9902 ..., 9997 9998 9999]]
    


To disable this behaviour and force NumPy to print the entire array, you can change the printing options using

set_printoptions
.

>>> set_printoptions(threshold='nan')

Jan 19, 2012

Estadísticas Barcelona vs Real Madrid 18/1/12

  • El Barcelona suma 7 partidos de forma seguida sin perder en el Santiago Bernabéu, la mejor racha de su historia.
  • Segundo gol de Abidal con el Barcelona, ambos en la Copa del Rey, ambos en cuartos de final, el anterior fue la temporada pasada ante el Athletic.
  • Segundo clásico consecutivo en el que Messi no marca.
  • Los últimos 5 goles que ha recibido el Real Madrid han sido de cabeza, Mikel Rico con el Granada, Demichelis y Sergio Sánchez con el Málaga en Copa y Hemed la última jornada de Liga con el Mallorca.
  • Segundo gol que Puyol marca al Real Madrid en 28 partidos contra el equipo blanco. El anterior fue en el 2-6
  • El Real Madrid no se iba al descanso por delante en el marcador ante el Barcelona desde la temporada 2007-08 que vencía 2-0, terminó ganando el partido por 4-1.
  • Cuarto gol que marca Cristiano Ronaldo al Barcelona y el número 27 de esta temporada en 28 partidos. Desde que llegó al Real Madrid ha marcado 114 goles, 10 de ellos en Copa del Rey.
  • El Barcelona es el único equipo que le ha podido remontar un gol al Real Madrid esta temporada, en el resto de partidos siempre que se adelantó el Real Madrid el conjunto blanco terminó ganando el partido.
  • Ricardo Carvalho no jugaba un partido con el Real Madrid desde el 27 de septiembre, fue en Liga de Campeones ante el Ajax. Esta temporada ha jugado entre todas las competiciones 720 minutos repartidos en 8 partidos.
  • Mientras que Hamit Altintop ha jugado los mismos partidos que el portugués pero tan solo ha disputado 293 minutos. El turco se enfrentó como jugador del Bayern en dos ocasiones al Barcelona en Liga de Campeones la temporada 2008-09 consiguiendo una derrota y un empate.
  • Con la excepción de Pinto por Víctor Valdés, el Barcelona ha repetido esta alineación en dos ocasiones a lo largo de esta temporada.
  • En el cómputo global de la historia de los Real Madrid - Barcelona y viceversa, el balance es de 86 victorias madridistas, 85 azulgranas y 45 empates. En el capítulo de Copa del Rey, el Barcelona aventaja al Real Madrid en cuatro victorias, 14 por 10, y cinco empates
  • El Barcelona no gana el Santiago Bernabéu en Copa del Rey desde el año 1962, desde entonces el conjunto catalán ha visitado el feudo blanco en 4 ocasiones en las que ha sumado dos derrotas y dos empates.
  • Messi está a 1 gol de igualar a César como el jugador blaugrana con más goles en la historia de los Clásicos con 14 tantos. Di Stéfano tiene el récord de goles marcados en la historia de los Real Madrid - Barcelona y viceversa.
  • Xavi se coloca a una sola victoria de ser el jugador del Barcelona con más triunfos ante el Real Madrid. El récord lo tiene Migueli con 14 y Xavi cuenta con las mismas que Alexanco y César, 13.
  • El Real Madrid suma 97 goles en competición oficial esta temporada, está a 3 goles de alcanzar la centena.
  • Iker Casillas iguala a Gento con 599 partidos y se coloca como el 5º jugador blanco con más partidos oficiales por detrás de Hierro(601), Santillana (645), Sanchís (709) y Raúl (741).
  • Messi sumará su partido oficial 300 con el Barcelona. Hasta el momento ha marcado 213 goles en 299 partidos.
  • Muñiz Fernández ha arbitrado 2 Clásicos, ambos en el Santiago Bernabéu y los dos terminaron con el mismo resultado, 1-1. En el primero de ellos expulsó a Michel Salgado y en el segundo señaló un penalti para cada equipo y además mostró tarjeta roja a Raúl Albiol.
  • El Barcelona no deja su puerta a 0 contra el Real Madrid en Copa del Rey en ninguno de sus últimos 5 enfrentamientos.
  • El balance de Guardiola frente al Real Madrid en el Santiago Bernabéu es de 4 victorias y 2 empates.
  • Las 2 únicas victorias de Pinto sobre el Real Madrid tuvieron lugar en el Santiago Bernabé. Fueron como jugador del Celta de Vigo las temporadas 2006-07 y 2005-06, 2-3 y 1-2 fueron los resultados respectivamente.

fuente diario ole

Jan 6, 2012

The embarrassing way to code

Disclaimer: This post was written by Shane Legg, but in some way, represents exactly the same situation happened to me.
SciPy – the embarrassing way to code

I’ve programmed in many languages before, indeed I’ve spent at least a year working in Basic, C, C++, C#, java, assembler, modula-2, powerhouse and prolog. One thing I’ve never done before is Matlab, well except a few basic exercises for some course I did way back. A couple of years ago I started using python and more recently I’ve started to use the scipy libraries which essentially provide something similar to Matlab. The experience has been unlike anything I’ve coded in before. The development cycle has gone like this:

1) Write the code in python like I would write it in, say, java. I have data stored in some places, then I have algorithms that iterate over these data structures computing stuff, calling methods, changing values and doing various complex things in order to implement the desired algorithm. 10 pages of code, somewhat general.
2) Then I realise that in a few places I don’t need to iterate over something, I can just use some vectors and work with those directly. 7 pages of code, a little more general.

3) Then I realise that part of my code is really just running an optimisation algorithm, so I can replace it with a call to an optimiser in one of the scipy libraries. 5 pages of code, and a bit faster now.

4) Then I try to further generalise my system and in the process I realise that really what I’m doing is taking a Cartesian space, building a multi-dimensional matrix and then applying some kind of optimiser to the space. 3 pages of code, very general.

5) Finally I’m like, hey, how far can I push this? With some more thought and spending a few days trying to get my head around all the powerful scipy libraries, I finally figure out that the core of my entire algorithm can be implemented in an extremely general and yet fast way in just a few lines. It’s really just a matrix with some flexible number of dimensions to which I am applying some kind of n-dimensional filter, followed by an n-dimensional non-linear optimiser on top of an n-dimensional interpolation and finally coordinate mapping back out of the space to produce the end results. 2 pages of code, of which half is comments, over a quarter is trivial supporting stuff like creating the necessary matrices, and just a few lines make the necessary calls to implement the algorithm. And it’s all super general.

Now this is great in a sense. You end up throwing away most of your code now that all the real computation work is being done by sophisticated mathematical functions which are using optimised matrix computation libraries. The bottleneck in writing code isn’t in the writing of the code, it’s in understanding and conceptualising what needs to be done. Once you’ve done that, i.e. come up with mathematical objects and equations that describe your algorithm, you simply express these in a few lines of scipy and hit go.

It’s not just with my financial software either. I recently implemented a certain kind of neural network using nothing but scipy and found that the core of the algorithm was just one line of code — a few matrix transformations and calls to scipy functions. I hear that one of the IDSIA guys working on playing Go recently collapsed the code he’s been working on for six months down to two pages.

The downside to all this is that you spend months developing your complex algorithms and when you’re done you show somebody the result of all your efforts — a page or two of code. It looks like something that somebody could have written in an afternoon. Even worse, you start to suspect that if you had really known scipy and spent a few days carefully thinking about the problem to start with, then you probably could have coded it in an afternoon. It’s a little embarrassing.

Jan 5, 2012

Pear Os Linux



Pear OS is a new Linux desktop distribution based on Ubuntu Desktop with the graphical installer. Its development started in early August 2011 by David Tavares (from France), and on August 15 2011, Pear OS 1.0, the first version marked “stable,” was released. The latest edition, release on December 14 2011, is Pear OS Linux Panther 3.




A complete review of linuxbxdos

Jan 4, 2012

Html Table Tags

TagDescription
<table>Defines a table
<th>Defines a table header
<tr>Defines a table row
<td>Defines a table cell
<caption>Defines a table caption
<colgroup>Defines a group of columns in a table, for formatting
<col />Defines attribute values for one or more columns in a table
<thead>Groups the header content in a table
<tbody>Groups the body content in a table
<tfoot>Groups the footer content in a table

Temporary Spam Mailbox

Did you ever just need a quick email address to register with a site to gather information on someone or something? Maybe you were doing an assessment on a hate group but wanted to get to the Members Only section or found someone on LinkedIn but couldn’t view their full profile without registering.