Notepad++ not showing python class or function in Function List

5 Jan

Quick note to self that hopefully will be useful to someone else over the inter-webs 🙂

  • When enabling the Function List pane in Notepad++ on a python file containing multiple functions and classes, the last item may not be displayed in the list
  • in my case it was a class which was completely absent along with all its methods

Solution: make sure that the last line of the python file is not indented!

The python file parser generates the Function List rightly using the file indents to identify functions and classes. Unfortunately, if the last line of the file is indented, the last object in the file will not be considered “closed” and therefore it will not show in the Function List.

Happy Coding! … Continue reading »

Esagoni e Correnti a Getto

17 Dec
Devo ammettere che quando ho ricevuto questa domanda la prima cosa che ho pensato è stata: "Ma l'esagono non era piuttosto su Saturno, e al polo nord?" Beh sì la più famosa struttura esagonale nell'atmosfera di un gigante gassoso è quella scoperta e studiata in dettaglio dalla sonda Cassini su Saturno; ma nel 2014, un appassionato di fotografia astronomica si è messo a spulciare tra le immagini grezze scattate dalla sonda Voyager 2 nel 1989 durante il suo passaggio vicino a Nettuno.

How to install the latest Intel Linux Graphics Drivers

20 Nov

It may happen that you become very annoyed by some behaviour of the version of Intel Linux Graphics Drivers currently shipped with your version of Ubuntu.

For me the last straw that broke the camel’s back was yet another startup crash due to poor support of the Dell Display Port in extended desktop mode.

Here you go how to install the Intel Linux Graphics Intaller on your system to make sure that you are always using the latest drivers available (which usually solves the most of the issues out there).

This is the page where you have to go to download the installer package.

You can install it simply by opening it with the Ubuntu Software Center or by manually using dpkg -i

$ sudo dpkg -i name-of-the-package.deb

Then open the program and say OK to some easy steps to get the latest drivers on your system (reboot required  … Continue reading »

Livestreamer: command-line streaming extractor

18 Nov

I have always preferred to watch internet streams in a video player rather than a browser. In the early days was only a way to avoid to have Flash in the loop, but even in the age of H264 and WebM it is always good to get rid of the browser and website layer and getting the machine to focus only on the bare streaming task.

Here it comes Livestreamer, a command-line utility available in the form of Python Package, that detects the streaming component from a given supported website and redirects it to the player of your choice (default is VLC).

Installation and operation in Linux is straightforward as they show on their main page.

At first we have to install the Python Package Index on our distribution, on Ubuntu is simply:

# sudo apt-get install python-pip

Then from pip we will install the livestreamer script:

# pip 
 … Continue reading »

Philae on the comet!

15 Nov

What_does_Philae_do_during_descentThere couldn’t be a better day to start the Nth version of my blog than the weekend after the awesome landing of Philae on Comet 67P.

Last Wednesday the whole European scientific and technological sector stopped for a few hours to follow the updates on the most daring space endeavour to date: the first comet landing.

After 7 hours of descent marked by various communication and data milestones, spacecraft controllers at ESOC could confirm the touchdown on the comet. Hours later it became clear that Philae performed two bounces on the comet surface before coming to a rest. Moreover it stopped in a peculiar position on the rim of a big crater and roughly at a distance of 1 km from the original landing site.

During the next two days, taking advantage of the two daily communication slots permitted by the orbit of the Rosetta spacecraft, the entire main scientific  … Continue reading »