Python – Sorting Lists inside of Lists

In some recent python code I was playing with I had the need to sort a bunch of lists based on elements within their elements. Thankfully python’s built in sort function is plenty powerful and allows us to do this in a fairly easy manner. So for example if we have a list all of whose elements are also lists:

mylist = [["derp", 1, 7], ["bleh", 2, 0], ["merp", 0, 3]]

By default when we call the sort function on this list it will sort the sublists based on their first element in lexicographic order. For example:

print mylist
[['bleh', 2, 0], ['derp', 1, 7], ['merp', 0, 3]]

What if we don’t want to sort these lists based on their first element though? By using the key argument we can sort our sublists based on any element we want. For example to sort the lists based on their second element we would use:

mylist.sort(key=lambda e: e[1])
print mylist
[['merp', 0, 3], ['derp', 1, 7], ['bleh', 2, 0]]

Or their third element:

mylist.sort(key=lambda e: e[2])
print mylist
[['bleh', 2, 0], ['merp', 0, 3], ['derp', 1, 7]]

Special thanks to the folks over at #python on freenode for helping me figure this little bit out. They are an extremely resourceful bunch. You can learn more about working with python lists here.

~Jeff Hoogland

Read More

Linux Mint 15 Cinnamon

(adsbygoogle = window.adsbygoogle || []).push({});

Linux Mint 15 “Olivia” has been released so it’s time for another review of one of the most popular distros of all time. Linux Mint has always been one of my favorite distros, it has so much to offer any desktop linux user. This release doesn’t disappoint either. There’s quite a bit here for fans of Linux Mint, and it’s almost certain that most of them will want to upgrade to Linux Mint 15.

Please note that this review covers the Cinnamon version of Linux Mint 15. I’ll probably take a separate look later on at Linux Mint 15 MATE.

Linux Mint 15 Welcome Screen

Linux Mint 15 Welcome Screen

Linux Mint 15 Preinstall Boot Menu

Linux Mint 15 Preinstall Boot Menu

What’s New in Linux Mint 15 Cinnamon

Here’s a sample of the new features in this release:

Ubuntu 13.05 Package Base
Linux 3.8 Kernel
MDM 1.2
Cinnamon 1.8
Software Sources
Driver Manager
MDM Greeters
Nemo Updates
Desklets for Cinnamon
Cinnamon Screensaver
Control Center Changes
Spices Management
Various System Improvements
Improved Hot-Corner Configuration
Coverflow Alt-Tab
Timeline Alt-Tab
Horizontal or Vertical Window Maximization
Software Manager Tweaks
Update Manager and Welcome Screen Tweaks

Linux Mint 15 Login Screen

Linux Mint 15 Login Screen

MDM now has three login screen applications (greeters).  There’s a GTK greeter, a themeable GDM greeter, and a new HTML greeter (also themeable).

These changes spice up (no pun intended) the login screen and should make things more interesting. It’s  now possible to create “animated and interactive” login menus.

Frankly, I’ve never been one to pay much attention to login screens. After all, you’re there to login not to savor the look and feel of the menu. But I don’t mind these changes at all. Why have a boring, drab login menu when you can jazz it up and give the user something different to see?

Linux Mint 15 Software Sources

Linux Mint 15 Software Sources

MintSources is the new Software Sources tool. It makes it easy to disable or enable optional components, and it lets you easily use back ports, source code, and unstable packages. Finding a faster mirror is also very easy, since you can do it with just one click by seeing a speed-test of available mirrors.

This is a great addition for power users of Linux Mint, who want a quick way to have more options in terms of software. The new tool looks great and performed well for me. Finding a faster mirror can be a huge timesaver, so I was very pleased to see that included.

Note that MintSources also contains PPA, authentication keys management and third party repository access.

Linux Mint 15 Mirror Speed

Linux Mint 15 Mirror Speed

Linux Mint 15 Driver Manager

Linux Mint 15 Driver Manager

Driver Manager (MintDrivers) is another great tool in Linux Mint 15. It uses an Ubuntu backend, and it makes it easy to deal with drivers in Linux Mint 15. You can see drivers by package name, along with their version. Known brands are clearly marked with icons.

Pages: First | 1 | 2 | 3 | . . . | Next | Last | Single Page

Read More

Dated Hardware, Waiting for Hardware and the Nokia N900 in 2013

The Nokia N900 was released in November of 2009 – three and a half years ago. When I bought my first N900 in January of 2010 it was a huge upgrade for me in terms of both speed and software freedom (coming from a Blackberry). The idea of having a computer – a true computer – that was also a phone was amazing. The same device I used to send text messages, I also installed applications on using apt-get. True multitasking – my applications stayed open until I closed them, not until the operating system decided it wanted to kill them. I didn’t mind paying the 450 USD it cost to purchase the brand new N900 out of contract – this was an awesome piece of technology!

Fast forward to 2013. Three years later I have gone through 2.5 Nokia N900s (I say 2.5, because the first two each broke in different ways and I was able to build a working device from their left overs) and still have it sitting on my desk as I write this. Three years is a long time in the world of mobile hardware and the N900 easily shows plenty of signs of aging. Compared to my wife’s Nexus 4, it loads applications and web sites slowly.

So why is it I hold onto hardware/software that deserves an upgrade? Simple – no one has released a comparable replacement. At first I did not want to trade my true Linux operating system in for this dribble called Android everyone raves about. Upon giving Android a chance though – I could make do with it. The HTML5 supporting browsers on Andriod really provide a decent web experience (which beyond text messaging is what I mainly do on a mobile device).

The hold up then? The hardware. I’m not talking about the speed of the hardware though – I’m talking about the lack of design. Almost every modern mobile that is sold today is a pure touch device. Hardware keyboards are a thing of the past it seems.

Am I truly the last person left alive who doesn’t like a software keyboard taking up half of my sub-10 inch screen while I type something?

When I search for modern cell phone hardware I certainly feel that way.

I have hope though! Within the next year we are expecting at least three new mobile operating systems to enter the landscape:

  • Ubuntu Mobile
  • Tizen
  • Firefox Mobile
I hope against all open that one of the hardware makers supporting these operating system breaks the current tread of touch-only devices. Maybe then I and stop picking up old N900s on Ebay when my existing one breaks!
~Jeff Hoogland

Read More

CrunchBang 11 Waldorf

(adsbygoogle = window.adsbygoogle || []).push({});

CrunchBang 11 has been released so it’s time for a review. I last looked at CrunchBang back in 2009. Wow! Has it been that long? I’m pleased to report that CrunchBang 11 didn’t disappoint in any way.

If you aren’t familiar with it, Crunchbang 11 is a distro based on Debian. It uses the Openbox window manager. Openbox is very fast and minimalistic. You won’t find tons of useless eye candy or stupid interface glitz in CrunchBang 11. It’s not bloated and slow, nor does it try to “wow” you with things you don’t need or want.

Frankly, it’s one of the most functional and efficient distros available today. You can run it on top of the line hardware, or you can run it on older, slower machines. It’s a perfect choice for anyone who prefers functionality over form.

CrunchBang 11 Preinstall Boot Menu

CrunchBang 11 Preinstall Boot Menu

Here’s the official description of CrunchBang:

CrunchBang is a Debian GNU/Linux based distribution offering a great blend of speed, style and substance. Using the nimble Openbox window manager, it is highly customisable and provides a modern, full-featured GNU/Linux system without sacrificing performance.

The primary aim of the CrunchBang project is to produce a stable distribution offering the best possible out-of-the-box Openbox experience. To achieve this goal, CrunchBang pulls many base packages directly from Debian’s repositories, which are well-known for providing stable and secure software. Packages from CrunchBang’s own repositories are then customised and pinned to the system to produce what is known as the CrunchBang distro.

Put simply; CrunchBang could be thought of as a layer built on top of Debian, specifically to provide a great Openbox experience.

What’s New in CrunchBang 11

I was not able to find a list of changes or new features on the CrunchBang site. I encourage the CrunchBang developers to create a “What’s New” page for future releases. It makes the job of reviewers much easier. See how Linux Mint does it for their distro releases.

System Requirements for CrunchBang 11

I was not able to find a list of system requirements either. Since CrunchBang 11 is based on Debian, you can use that as a reference point for system requirements.

CrunchBang 11 Download

You can download CrunchBang 11 from this page. The file I downloaded weighed in at 775 MB.

If you’re a distrohopper then you might want to try it in a virtual machine via VirtualBox before running it on real hardware.

You can get CrunchBang 11 in 32-bit or 64-bit versions. I opted for the 64-bit release.

CrunchBang 11 Installation

The CrunchBang 11 installer is quite good. It offers a guided partitioning option, and it’s very fast. Even total newbies shouldn’t have a problem installing CrunchBang 11. You have the option of jumping into the install or running a live session.

After the install is complete, and you boot into the desktop, a script will run in a terminal window. The script gives you the option of updating your system, installing Java as well as LibreOffice. You can also install development packages.

I like LibreOffice, so I used the script to add it to my system so I wouldn’t have to bother later.

CrunchBang 11 Install Guided Disk Partitioning

CrunchBang 11 Install Guided Disk Partitioning

CrunchBang 11 Install Disk Scheme

CrunchBang 11 Install Disk Scheme

CrunchBang 11 Install GRUB

CrunchBang 11 Install GRUB

CrunchBang 11 Post Install Script

CrunchBang 11 Post Install Script

The CrunchBang 11 Desktop

If you’re used to other distros, you might be slightly freaked out by CrunchBang 11 when you boot into the desktop. You won’t find garish wallpaper or 3D doodads. Instead, you’ll see a dark grey background.

Pages: First | 1 | 2 | 3 | Next | Last | Single Page

Read More

Samsung ARM Chromebook Review

The Samsung ARM Chromebook is one of a few ARM devices that I prepare Bodhi Linux images for. As such I’ve owned the hardware for almost six months now and during this time I’ve used it a fair amount. The goal of this post is to provide a comprehensive review of the product to see if it is something that could be useful to you.

Cost – 
Lets start with one of the first draws – the price point. The Chromebook comes in at under 300 USD. 250 USD plus shipping and handling to be exact.

Performance –
In terms of speed the Chromebook processor is snappy compared to other netbook offerings and ARM chipsets in general. The Chromebook sports the Samsung Exynos 5 1.7ghz dual core processor and 2gigs of DDR3 RAM. This coupled with the 16GB solid state hard drive allow the Chromebook to boot fully from a cold start in just a few seconds.

Under Chrome OS the Chromebook happily plays a variety of multimedia formats. Including 720p video files, 1080 flash streams, and Netflix.

Connections – 
In terms of “ports” the Chromebook sports two USB (one 3.0 and one 2.0), an SDHC card slot, HDMI video output, and a combination audio input/output jack. While all these ports are plenty functional I do have a few comments about them.

First – both USB ports, the HDMI and the power plug are all right next to each other on the back of the netbook. This means if you have all these ports in use at the same time space gets kind of tight (it also means if you have a clunky USB device it is going to block other ports).

Second – because the Chromebook has such little storage by default, it can be nice to use a SD card as extra space. Sadly, unlike most netbooks – when you insert a SD card into the Chromebook it does not go completely inside of the netbook. Meaning if you leave an SD card in the slot while transporting the netbook it is likely to get damaged.

Finally – maybe this one is just me, but I dislike not having traditional two ports for audio input/output. My traditional headsets do not work when using a Google hangout with this netbook.

Size & Feel – 
The Chromebook has an awesome form factor. Weighing in at just under 2.5 pound (about 1.1 KG) and having dimensions of 289.6 x 208.5 x 16.8 – 17.5 mm it is a sleek little device.

Personally I like Chicklet keyboards on laptops and the Chromebook keyboard is no exception for me. The keyboard layout on the Chromebook is one that is best described with an image though:

As you can see there is no super (or “Windows”) modifier key, Capslock has been left off in favor of a “search” button, and while the top row of buttons may not read F1-F10 – under non-ChromeOS operating systems they return these values.

One design choice I found slightly odd with the Chromebook is that even though the hardware supports a “right” click function, all context menus within Chrome OS are called up with a two finger touch (“right” clicking in Chrome OS is no different than any other single finger touch).

Battery & Screen – 
The battery life on the Chromebook is one of the largest draws I think. It is easily one of the lightest pieces of hardware with a lengthy battery life. Through average web use the Chromebook sees just shy of seven hours of usage before you need to find an outlet.

While the screen resolution could be better, the Chromebook’s 1366×768 screen resolution at least enables you to watch 720p video in their native quality.

Misc Thoughts –
I have had some trouble using the HDMI output on the Chromebook – the graphics drivers on Chrome OS seem to be fairly buggy. I’ve experience full system lock ups when attaching an external screen while the OS is running – but this does not happen every time and I cannot reproduce it consistently.

One that keeps me from using the Chromebook as my primary mobile computer over my old trusty Asus T101MT is that Dropbox does not create their software for ChromeOS or generic ARM Linux devices to date. I store a lot of data on this service and accessing it all via a web portal instead of having it sync to the system’s local drive is very annoying. If you are open to using Google drive this is a non-issue, but I haven’t had the time to make this jump as of yet.

Closing –
Who would I recommend the Chromebook to? Anyone who needs a device for accessing the web, but requires a keyboard to get their work done. If a large deal of your computing time is spent on Gmail, Facebook, Netflix, online shopping or Youtube then the Chromebook is the perfect device for you.

Who would I not recommend a Chromebook to? Someone that is looking to use it as their sole computer. While a lot of people use the web a lot – most people still have at least one or two desktop applications they need access to (such as my tie to drop box). Because of this Chrome OS’s “web based” application eco-system currently still leaves some to be desired.

Do you own a Samsung ARM Chromebook? If so what are you thoughts on the device?

~Jeff Hoogland

Read More

Debian 7.0 Wheezy

(adsbygoogle = window.adsbygoogle || []).push({});

Debian 7.0 (Wheezy) is out and it’s time for another review of this venerated linux project.

Debian is the granddaddy of Linux distros, it forms the basis for Ubuntu, Linux Mint and many other desktop linux distros. Yet many folks who are new to Linux might not even have heard of Debian. This is a shame because it has quite a lot to offer in its own right, aside from everything it provides to other desktop distros.

There are three main branches of Debian:


Debian 7 is the latest stable release.

Debian 7 Preinstall Boot Menu

Debian 7 Preinstall Boot Menu

Wikipedia has a very good background article on Debian that you should read if you’re new to it. It will give you much more information than I can provide in this review.

Here’s a sample:

“Debian is one of the most influential open source projects known as a Linux distribution, and maintains repositories with over 29,000 software packages ready for installation. Its repositories host large numbers of software packages for multiple architectures, more in number than any other Linux distribution project[citation needed]. Debian hosts software in additional repositories called “non-free” but offers its distribution setup without it. Debian is seen as a solid Linux and has been forked many times (Debian derivatives).

Debian hosts experimental kernel choices for its distribution while pushing the boundaries to support more hardware devices. There are development packages for architectures for the FreeBSD kernel (kfreebsd-i386 and kfreebsd-amd64) and Hurd kernel, making Debian the only operating system that offers three different kernels; Linux being the most adopted for stability. Supported architectures range from the Intel/AMD 32-bit/64-bit architectures commonly found in personal computers to theARM architecture commonly found in embedded systems and the z/Architecture found in mainframe computers.[12]

Debian includes popular programs such as LibreOffice,[13] Iceweasel (a rebranding of Firefox), Evolution mail, CD/DVD writing programs, music and video players, image viewers and editors, and PDF viewers. The cost of developing all the packages included in Debian 5.0 lenny (323 million lines of code), using the COCOMOmodel, has been estimated to be about US$ 8 billion.[14] Ohloh estimates that the codebase (54 million lines of code), using the COCOMO model, would cost aboutUS$ 1 billion to develop.[15]

Pages: First | 1 | 2 | 3 | . . . | Next | Last | Single Page

Read More

Linux Administration – News and Blog