Python Decorator for Simplifying Delegate Pattern

Need to study more on patterns as an implementation examples.

Programming Ideas With Jake

Recently, I posted about how you can use composition instead of inheritance, and in that article, I mentioned the Delegate Pattern. As a quick description, the pattern has you inherit from the parent interface (or, in Python, you can just implement the protocol), but all the methods either redirect to calling the method on an injected implementation of interface/protocol, possibly surrounding the call in its own code, or it completely fills the method with its own implementation.

For the most part, it is like manually implementing inheritance, except that the superclass in injectable.

Anyway, one of the more annoying parts of implementing the Delegate Pattern is having to write all of the delegated calls. So I decided to look into the possibility of of making a decorator that will do that for you for all the methods you don’t explicitly implement.

Standard Attribute Delegation

First, we need a standard…

View original post 1,683 more words


Joey Crawford conspiracy

Don’t you love when a conspiracy is debunked, many of the LeBron haters been constantly hinting that LeBron fixes the games and that the NBA is behind it. All thanks to the referees, since most fans only know one name, they all try to use him for their memes. And that’s the birth of the Joey Crawford Conspiracy. Let’s face it, when LeBron loses, the haters are waaay to busy to remember who was the referee. But when he wins, oh boy, every single piece of the game is used to disqualify LeBron’s legacy.

However don’t you love when someone actually go into the numbers and tries to pull out the true stats? Well someone did in this case and the results couldn’t be more opposite to the myth.

Contrary to popular belief, James was winning percentage dropped by a pretty solid margin (from .669 to .521) in games in which Crawford was an official. Though it’s an admittedly small sample size, I would have to say that any notion of Crawford being biased towards James would have to be thrown out the window.

Stats of LBJ winning percentage on games where Joey Crawford officiate. Complete Opposite.
Stats of LBJ winning percentage on games where Joey Crawford officiate. Complete Opposite.

So in the end, memes such as Joey using LBJ team jersey as the 6th player on the floor. Or LeBron kneeling before Joey should be shoved with this stat.

In the end is no surprise that haters gonna hate. But at least we could make their hate more legitimate.

Source: Truschoolsports

FLISOL 2015, review of the event

This year we accomplished another milestone, by we I mean the Tequila Valley Cancun group. We finalize a new FLISOL event. This one with way more support than the previous one. Although there are still a laundry list of things to improve, this definitely was a great effort, and an opportunity to evaluate how well we can play together.

The Free software installfest in Latin America got a great amount of attendance, mainly because this time we implement a press release which helped us gain an exposure we haven’t got before.

This time we had a platform to coordinate the tasks that were needed for the event. A type of canvas digital board called Trello. This gave us the chance to be able to delegate responsibility and improve our continuation.

Another big lift was the sponsorship from a major company that allowed us to not worry about space, and infrastructure (Desk, chairs, tables, etc). Which by the way, were top notch, although it’s a bit odd that in the end we couldn’t really used it as intended and end up handling the same projection presentation.

On the other hand we had a lot of things we really missed specially on promotion:

  • Visit universities and high schools, we missed many of them.
  • Academic ambassadors, people that help us from these schools.
  • Visit companies and provide a good outline of what the event is about for them to get there.
  • Promote it on more radio stations, TV shows and newspapers.

We also could have work out better on scientific software as well as games. The demos were something that we could have organize better not to say we missed showing off the VoIP, Media Center (to a degree) and the overall Linux Desktops.

Swag was something that we rushed in the end, but with better support this could have been much better. It was great we got T-shirts but with better swag we would have got USB with free software in it, as well as other things.

In the end what we need to do is also reflected on how this can benefit TQVCancun and I think that invitations were not offered as open as I would have wished for. To invite people to the group and make them members is something that could have helped the survival of the group and that is something we would need to pay more attention to in the future.

Installing Phoenix tv through the Fusion app on Kodi

So during the @FLISOL event which by the way we had a great attendance. We were able to give a small talk about Kodi.  Kodi is well known on the open source community but maybe people from other communities or none communities might not know about it.

So the big promise is to convert your TV, any TV into a smart TV.

With the power of GNU/Linux, Kodi is a great embeded device capable of having the world of communication and information to any TV, digital or analog. Yes, the use of some addons you might be able to get channels from Japan to Jamaica or from Brazil to Botswana.

All these for the price tag of 50 dls (Raspberry + Hdmi cable). But in reality, the software is really where is at, since you might want to have a cheap hardware but without the software, it wont really work as good as it deserve to work.

Here is where the real power of open source software shines. Get all your channels in an open source fashion. No need of hacking pirate streams, or subject yourself to heavy advertising and viruses. Not only that but you can also bring digital content which has a higher quality of content to your TV. This is a true device for Internet TV. The biggest podcasts and shows from youtube are on your TV with one click. All your Youtube history subscriptions to favorite channels can be watch from your couch.

Kids can get their favorite cartoons, and their favorite shows pre-recorded and 24/7 available. Same as even the maids can watch their novelas. 

So enough sales pitch, what is Kodi?

Kodi is an open source software, that can be installed on any OS and has been ported to all architectures like Intel, Power and Arm.  OpenElec is a distribution that is specially tailored for Kodi. You can install it on your apple tv, your roku box, or your android device.

Installing openelec you will need an SD card, is as easy as using dd openelec.iso /dev/sdX (where /dev/sdX is the location of your SD card).

After installing you only need to boot from it to see the xbmc default interface. Go to System -> OpenElec and Connections will show you the hotspots around the location, choose your home wifi and insert the password and you are on.

You could load your media to the SD card, or over the network and that would be enough, however Kodi have a huge list of plugins and addons. With those addons you are able to find streams and pre-recorded shows from popular internet shows, such as TWiT.TV and Jupiter Broadcasting. Other big content websites like YoutubeUstreamDailyMotion will also be available and easy to reach.

There is also a bunch of independent media that you can have access to including classic creative common material like from Archive.orgWikimedia, Jamendo, Magnatune etc. Finally yes, Live TV is possible and PVR addons are also available. The IP-tv features the addon regarding addons including Addon Installer -> Phoenix.