Knowledge7

The Linux and Mobile Solution Provider

  • About
  • Training
  • Services
  • Clients
  • In the news
  • Blog
  • Contact Us
You are here: Home / Archives for News

Our favourite Python libraries

At Knowledge7, we love Python.

We have been using Python for about one year now, in the process, have discovered quite a lot of Python libraries that we use on a daily basis. Here they are:

  • Flask is a web framework which we use to build most of our (new) backends.
  • SQLAlchemy is an Object-Relational Mapper.
  • Requests is used to issue HTTP requests and handle responses.
  • Rauth is OAuth for Python.
  • BeautifulSoup and pyquery for parsing XML and HTML documents.
  • Fabric for sending commands to distant servers using SSH.
  • Virtualenvwrapper to create multiple Python environments (useful for testing new libraries for example).

And this is just the beginning.

Our forthcoming training courses

  • No training courses are scheduled.

Les réseaux sociaux

Les Réseaux Sociaux par KnowledgeSeven

Avinash Meetoo, Directeur de Knowledge7, a fait cette présentation sur les réseaux sociaux le Samedi 10 November 2012 aux Présidents des divers chapitres du Rotary Club de Maurice.

Our forthcoming training courses

  • No training courses are scheduled.

Avinash Meetoo: entrepreneur, mobile and web developer, family man

This week, we start a new feature on the Knowledge7 blog inspired by The Setup. We’ll try to have people describing their computer setup and how they can be productive with it on a regular basis. Let’s start with my own setup:

Who are you, and what do you do?

I am the Founder and Managing-Director of Knowledge7, provider of quality consultancy and training services for open source software such as Linux, PHP/MySQL, Java and HTML5/Android. Previously, I was a lecturer in Computer Science at tertiary level and a consultant in one of the major consulting firms of the island. I studied in France and I have a Masters degree (Diplôme d’Ingénieur) and an MPhil (DEA) in Computer Science.

I am a well-known blogger and I participate extensively on social networks such as Twitter, LinkedIn, Google+ and Facebook as well as in workshops and conferences on topics such as the Internet, social networks, mobile and cloud technologies. I am regularly interviewed in the local press on these technology topics.

I am married to Christina and we have two children: Anya and Kyan.

What hardware do you use?

My work computer is an inexpensive Dell Inspiron 15″ with 4Gb of RAM. At home, I use an iMac with 8Gb of RAM.

I also use an Amazon Kindle for reading ebooks, a Google Nexus 7 tablet and a Google Nexus One smartphone (which I intend to replace very shortly with a Nexus 4). I am a big fan of Android because, well, I am a geek.

And what software?

My work laptop runs Fedora Linux 17. I spend a lot of my time in Google Chrome, Eclipse (for Android development) as well as the command line (for vi, git, etc). I use LibreOffice a lot as well as Gimp for all my graphical processing and Scribus for desktop publishing. I really believe that open source software is as good, if not better, than proprietary alternatives.

My iMac still runs Snow Leopard (because I am a bit pissed off with Apple and don’t want to install Lion just for the sake of it). I use the iMac mainly for browsing (Chrome), photo (Canon DPP) and video editing (iMovie which suits me perfectly), composing music (Logic Express which I love and have been using for ages now…) and flight simming (X-Plane 9 which is bloody gorgeous on the iMac).

My Android devices all run CyanogenMod nightlies (because I love living dangerously — nah, that’s not true: the nightlies are very stable and I love being able to have a new operating system mostly every night)

What would be your dream setup?

I would love to have a laptop with a much better resolution (mine runs at 1366 x 768). The size of the screen is perfect but the resolution is crap. I would prefer something like 1600 x 1200 but it seems laptop manufacturers are too lazy now…

And, naturally, I’m hoping Father Xmas will give me a Google Nexus 4 at the end of the year 🙂

Our forthcoming training courses

  • No training courses are scheduled.

Hacking at the Hackathon

Above, you can see Darshana, Trainer / Developer at Knowledge7, together with three fellow developers participating in one of the first (if not the first) Hackathon in Mauritius.

The idea is to develop a software application in less than 30 hours. The app they develop needs to be a mobile application solving a transport issue. Darshana and friends are developing an app to allow users to know if they have missed their bus or not. If not, the apps tells them when the bus will approximately arrive.

The second team is develop a mobile app which attempts to solve the issue of car pooling. As we all know, many people travel to work alone in their car and this causes a lot of traffic problems. The idea is to allow people to use one car and travel in group.

The third team is building an alarm which wakes you up when you get near your bus stop as we’ve all seen so many people sleeping on buses…

This first Hackathon is the child project of Jonathan Siao of Mokaza.

The Hackathon is taking place within the 10th Annual CTO Forum in Intercontinental Hotel. Interestingly, the conference is full of old people in suits while the Hackathon is full of young artists (except yours truly of course).

Our forthcoming training courses

  • No training courses are scheduled.

Download our Euro 2012 TV Guide Android application

We are proud to announce the launching of our Euro 2012 TV Guide Android application available for free in the Google Play Store.

Euro 2012 is starting in a few days in Ukraine and Poland. Use this application to know on which TV channels each match is being shown. Choose among the following countries:

  • Mauritius
  • France
  • United Kingdom
  • United States

You can browse day by day. Click on the flag of a country will open a browser with the latest information on each team participating in the World Cup (courtesy of Wikipedia.)

Changelog

Name    Date            Comment
======= =============== ====================
1.0     2012-06-06      First release
1.1     2012-06-08      Fixed some colours
                        and the Portugal flag
1.2     2012-06-15      Fixed some errors
                        concerning matches
1.3     2012-06-20      Added quarter finals
1.4     2012-06-25      Semi finals updates

Download Euro 2012 TV Guide and have fun!

Our forthcoming training courses

  • No training courses are scheduled.

Android Application Security

Android Applications Security

View more presentations from KnowledgeSeven

Today, I talked about Android Application Security during a workshop organised by the National Computer Board. I had the pleasure to explain to the audience how the permission model works in Android, how Android monitors all apps during runtime and how to use advanced tools such as LBE Privacy Guard on rooted Android devices to add an additional layer of security to Android.

I am happy to say that some people told me they liked my presentation a lot and that’s why I’m sharing it to all of you.

Feel free to ask me questions if you have any.

Our forthcoming training courses

  • No training courses are scheduled.

Using a Linux cluster to make an application 8 times quicker

Introduction

This post is about how we managed to solve the interesting problem of randomly generating more than 12 million unique codes of 8 non-ambiguous characters.  This is an interesting problem as the most obvious solutions would take days to generate the numbers. Our solution was to write a very efficient program in C and make it run on a cluster of 11 computers each having a dual-core processor and 2Gb of RAM. Even so, the application took 18 hours to run but, in the end, we got our 12 million unique codes.

This post was written by Avinash Meetoo, Managing-Director, and Noorani Bakerally, Research and Development Specialist of Knowledge7.

The problem

We had been asked by a very well-known Mauritian company to generate 12,050,000 unique codes. The codes had to be unique (in the sense that it is impossible for a code to appear twice (or more) in the list and each code had to be 8 non-ambiguous characters long (no 0 or o for example).

This is an interesting problem from a technical point of view as the possible solutions all need a lot of processing power. It is also an interesting problem from a business point of view because, well, many draws and games require a lot of unique codes with only a few considered as being winning codes. Of course, it is essential that the codes be non-ambiguous (so that people can read them, write them and/or transmit them without mistakes). It is also essential that the codes be random and be selected from a very large set of possible codes (in order to decrease frauds).

Possible slow solutions

The most obvious solution is to generate a random code and, before adding it to a list, check whether the code does not already exist in the list. The complexity of this algorithm is clearly O(N2) and, even on a quick computer, would have taken years to run.

A variation is to use an algorithm which generates a random code and systematically adds it to a list. After some time, the list will have quite a lot of codes but with possible repetitions. The idea is to generate more than 12,050,000 (to account) for the repetitions and eliminate them in order to only keep the 12,050,000 unique codes needed. This algorithm is better as it runs in O(N) but, still, it would have taken more than one week to run according to our calculations.

Our quicker solution

We decided to implement a concurrent program using the MPI (Message Passing Interface) library and written in C (for maximum speed). The concurrent program was made to run in parallel on a cluster of 11 Linux computers:

  • The first node (rank = 0) is a master node which has as responsibility to save the list of all generated codes on disk.
  • Each remaining node (rank = 1 to 10) would then generate unique codes using an algorithm devised by Jon Bentley in the classic book, Programming Pearls. The ten nodes were programmed to start generating codes from different initial points so as not to bias the results.

Strictly speaking (and this had an important impact on the speed of the algorithm), we decided to make the nodes generate long integers. The encoding was code à posteriori using a set of 32 non-ambiguous characters. The 12,050,000 codes were then statistically analysed and we found out that they were entirely random and without any repetitions.

Because of the Linux cluster, we manage to bring the run time to 18 hours instead of more than the seven days the previous version required. This allowed us to run the parallel program more than once at Knowledge7 and, each time, we got 12,050,000 entirely random codes hence validating our algorithms and architecture used.

Followups

As we are very satisfied with the performance of the program, we intend to use it again if ever we get similar demands. We also were very happy with the fact that the Linux cluster worked perfectly from day 1. It is even possible that we run a Linux Cluster Installation and Programming training in the future.

Would you be interested?

Our forthcoming training courses

  • No training courses are scheduled.

Looking for a half-length half-height PCIe network card in Mauritius

Please help us find a PCI-Express (PCIe) Gigabit network card in half-length half-height form factor in Mauritius. Pictured above is such a network card, a HP NC112T, and it would be great for us to be able to buy something similar quickly.

Thanks for helping us.

Our forthcoming training courses

  • No training courses are scheduled.

Top 7 reasons to learn Computer Programming

Our next Mastering Computer Programming (C++) training will run during two weeks from Monday to Friday from 9:00 to 12:00 (2-13 December) in our premises in Quatre-Bornes. Students will be offered a 20% discount upon presentation of their student card.

Get Free Information

Corporate clients: We can arrange for dedicated sessions for your batch of employees. For your specific needs, please call us on 5834-9001 or email us at .

Individual clients: Leave your contact details and we will let you know when the course is scheduled.

First reason: Work in an IT company

Computer programmers are in high demand in all tech companies all over the world. Tech companies include Google, Apple, Microsoft, Facebook, etc. but also the myriad of smaller startups. In Mauritius, since the creation of the Cybercity, the Government wants that IT become one of the pillars of our economy and this explains why so many IT companies like Accenture, Ceridian, TNT Express, etc. are present in Mauritius. All of them are recruiting right now, looking for the best computer programmers and are ready to give very interesting salaries to them.

Second reason: Work in any company where IT is essential

Most people use computers when they work. And those who possess computer programming skills have an added advantage over those who don’t. For example, a financial analyst who knows how to program Excel can go much further in his understanding of financial data and, hence, produce more accurate reports. Another example is a biologist who uses her knowledge of programming to better develop new molecules and medicines. This allows people who understand programming to rapidly advance in their company’s hierarchy.

Third reason: Become an IT entrepreneur and change the world

What do Bill Gates (Microsoft), Steve Jobs (Apple), Linus Torvalds (Linux), Sergei Brin and Larry Page (Google) & Mark Zuckerberg (Facebook) have in common? They all have a deep understanding of computer hardware and computer programming. They also all created their own small companies which became massive after some time and changed our world. In the Silicon Valley, entrepreneurs are creating new IT companies everyday and, in Mauritius, this is also happening. Why not be like them and create your own IT company?

Fourth reason: Understand our digital world

Our world is now 100% digital. We are surrounded by computers, smartphones and tablets. All those devices run software applications created by computer programmers and, in order to use them productively, whether at home or at work, one has to understand the logic of computers. Computer Programming teaches how computers work and how to better leverage the power of modern computers, for example, to manage your finance, run your own company or plan your various activities.

Fifth reason: Computer programming is interesting

Building software allow you to model anything that crosses your mind! You can build your own digital world with complex multimedia effects, build your own financial simulation system, build complex websites with large communities of enthusiastic people, create your own entertainment software, etc. In other words, computer programming allow you to express what you really want and the only limit is your own imagination.

Sixth reason: Computer programming is fun

Modern computer games are programmable. People can create their own characters and weapons and animate them. This allows gamers to go much further when they are competent computer programmers. It is also true that programmable electronic devices like the Arduino and the Raspberry Pi are creating a lot of buzz right now. With those devices and with a bit of imagination and skills, anyone can create his own electronic masterpieces be it a novel alarm, an intelligent robot or a home automation system.

Seventh reason: Because it’s possible in Mauritius right now!

Knowledge7 offers a quality Mastering Computer Programming training course to all those beginners and students who want to learn and master computer programming. Our training will run during two weeks from Monday to Friday from 9.00 to 12.00 (2-13 December) in our premises in Quatre-Bornes. Students will be offered a 20% discount upon presentation of their student card.

We provide participants with all required training material as well as all the software which are going to be used free of charge.

Contact Liliane on 5834-9001 now for expert advice! Places are limited! Feel free to share.

Our forthcoming training courses

  • No training courses are scheduled.

Android Apps Security

The National Computer Board is organising a workshop on Mobile Hacking & Application Security on Monday 30 April at Ébène and Avinash Meetoo, Managing-Director of Knowledge7, has been invited to be one of the panelists.

Avinash’s presentation is going to be on Android Apps Security and will cover topics such as Android app signing, the permission model, how the Android runtime enforces security and how to monitor security on actual smartphones and devices.

Anything important you believe he has missed and should be included in the talk?

Our forthcoming training courses

  • No training courses are scheduled.
« Previous Page
Next Page »

Looking for something?

Want to know more?

Get our newsletter

Discover the latest news, tips and tricks on Linux, the Web and Mobile technologies every week for FREE

This work is licensed by Knowledge7 under an Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license.