Thursday, June 25, 2009

Quine-mcCluskey Logic Simplifier

in our fundamentals of logic design course we were required to implement the Quine-mcCluskey tabular method as (a summer project) to simplify boolean function and i was able to implement it using python  so i decided to share it hope it could be useful to some one ...

here is an executabe version for windows..(made using py2exe project)


and here is the python source code files...


it is worth mentioning that the source files consists of :
tabular.py : which the main program is found and u could also execute it from the command line using arguments
gui.py : which is a graphical user interface for the program using tkinter libs
   
features:
  • able to solve Boolean function upto 26 variable (theoretically it can do more but this just a limit that i enforced to be able to represent the variables using A,B,C....Z Notations , of course u can  remove this limit)
  • displaying the prime and essential implicants ( by default the program displays the implicants on letters but u can also change this to display them in numbers )
  • perform petric brute force algorithm to get the best (lowest cost) solution
  • draw the Prime Implicant chart before finding the essential prime implicants and after finding them...
to do :
those are some ideas that may/may not be done...
  • adding column and row dominance simplifying techniques.
  • adding a documentation for tabular.py and more comments to illustrate the algorithms used.
  • adding an interactive mode to solve the problems step by step.
  • adding a karno-map simulation.
  • improving the gui....
  • adding the project to source-forge ?...may be... :)
ScreenShots:
using gui mode



using the command line ( this picture is a part of the output not all of it)



finally... i will really appreciate any feedbacks , bug reports and/or opinions.
please send them to

or here in the comments...
thanks...
           

Sunday, June 14, 2009

Shutdown after Update in ubuntu

last two weeks i was busy in my exams and ubuntu wanted to download alot of updates..that is normal but for people with low connection speed having alot of updates is not that nice...as i will have to leave the computer open for a long time and offcourse i will not be able to use the Internet as the update-manager draws all the speed..so i decided to leave it open and go some where but i found no option in ubuntu update manager to close the computer after finishing updates so i created this small python script that will shutdown the computer after finishing all the updates and here it is...


import time
import os
import getpass
password = getpass.getpass('please enter your password : ')
x = os.popen('ps -ef | grep "/usr/bin/gksu --desktop /usr/share/applications/update-manager.desktop"')
s=x.readline()
x.close()
if s.find("grep") == -1 :
 running=True
 print "updating manager is working..."

 while(running):
   x = os.popen('ps -ef | grep "/usr/bin/gksu --desktop /usr/share/applications/update-manager.desktop"')
   s=x.readline()
   x.close()
   time.sleep(10)
   print "still working..."
   if s.find("grep") != -1 :
    running=False
  
  os.popen("sudo -S shutdown -h 5", 'w').write(password)



Script usage is very simple :
just lunch the update manager and start the update process as usual then open a terminal and lunch the script (python "scriptname.py")
you will have then to write your password it is only used to call the shutdown command (i promise :D ) then you can go to sleep :D and the script will do the rest...
after finishing updates the script will give you 5 min to cancel the shutdown proccess if you have changed your mind...
hope you found this script useful

Saturday, May 9, 2009

Google Chrome Ad


While I was browsing my Google reader today I found this interesting news…

Google will start promoting their browser "chrome" through a TV ad !!!
Although I still consider Firefox my main browser for many reasons I really liked the ad idea so have a look and tell me your opinions...

Friday, March 13, 2009

get your hotmail emails in gmail

Hotmail finally after a very long time have enabled pop3 for free so you can get your emails in any mail client that support pop3 protocol..
However , i wanted to forward my emails to my Gmail account so here is how u can do it ( don't worry you don't have to know what is pop3 to follow this tutorial :D )
  • open settings >> account tab
  • select "add email account you own"
  • enter ur hotmail accout email address and click next step
  • fill the data in the form that will appear as following
user name : yor complete email address
password : your password
pop server : pop3.live.com
port : 995

you have the option to leave a copy in hotmail account or delete it.....it is better to use ssl when retrieving mail as it is more secure...
gmail also enables you to create a label for the incoming mail and you can also achieve it..
click on add account and you are done :) .
gmail will also give u the option to send mail from your account , you can follow the instructions to do such thing...

after that you might found a new 300 emails in ur inbox ...dont panic !!! gmail have just download your whole hotmail inbox..you can then delete or achieve this messages.

it is worth mentioning that the main drawback for using this way that u might not recieve your emails at the same instant they were sent to your hotmail inbox as Gmail checks new messages at different rates, depending on previous mail fetch attempts and you cant control this rates...

Wednesday, March 4, 2009

Nexus FaceBook Friend Grapher

Have you ever wondered how your facebook friends are related to each other ???
while i was browsing the web i found nexus , an amazing application that answers this question by Generating a graph of your facebook friends so you can visualise how they are connected together and also get alot of information that could take you alot of time if you tried to get it manually....
any way..here are few screenshots of nexus home page and my friends graph

the Home page

The friend graph in the light themethe friend graph in the Dark theme

note that each node in this graph represents a friend so you click any node to get alot of information about that friend.

Saturday, November 29, 2008

HP Magic Giveaway

image hp in its celebration of this holiday session and the thanksgiving will give 50 bloggers a six thousands dollars valued package to share with their visitors. !!!

so what does this package include ?

According to hp magic giveaway site , windows connected , Jake Ludington’s and GearLive Blogs

Hardware

Accessories

Software

Entertainment

hp

an interesting package isn't it ?? :)

for the complete list of blogs see this link.

it is worth mentioning that each blog will define its rules to win the package ...some will choose randomly others will require you to register in their site ..etc. but the what I have noticed is that the common rule in many blogs is that you will have share your prize with others..windows connected blog says "impacting a number of peoples lives with the hardware will get you the best chance to win" also bleeping computer blog require that you share at least one computer with some one who is in need of it...

Another thing to know is that not all of the blogs will start in the same time..each blog will start on a certain date and choose a winner after a week..I found an excellent article in istartedsomething blog which lists all the blogs and their starting dates in a fancy Google calendar :)...

and yes this giveaway is global and not restricted to USA citizens..so go ahead and don't forget your friend :)

Good Luck For Every One...

Sunday, November 23, 2008

Typealyzer

While I was searching for something I stumbled upon this interesting site ..Typealyzer which still in beta analysis your blog posts and determines what kind of person you are...i give it a try and here are the results.. :D

ISTP - The Mechanics

The independent and problem-solving type. They are especially attuned to the demands of the moment are masters of responding to challenges that arise spontaneously. They generally prefer to think things out for themselves and often avoid inter-personal conflicts.
The Mechanics enjoy working together with other independent and highly skilled people and often like seek fun and action both in their work and personal life. They enjoy adventure and risk such as in driving race cars or working as policemen and firefighters.

it also gives me an analysis of what part of my brain was dominant while writing !!!! really interesting.

it is worth mentioning that it still in beta..and the results might not be very accurate at least for me..as I am sure that I don't enjoy risks or driving race cars !! :D

Wednesday, October 22, 2008

Hot upcoming PC games

This article was written  By Mohamed Mostafa our guest for today , if you are crazy about games like him :D you might find this article interesting.

you can reach Mohamed at "shockoshocko@hotmail.com"

1. Grand Theft Auto 4, release date: Nov 18, 2008

I know that some people already have GTA 12, but let’s not talk about that, this is the long anticipated GTA 4 hitting PCs on Nov 18, you will play as “Niko Bellic” a recent immigrant to Liberty City who finds himself immersed in a world of crime and tries to make the best of it.

1

2. Need for Speed Undercover, release date: Nov 17, 2008

The next installment of the very popular street-racing series you will be playing as an undercover cop, offering some new interesting features, it will be great like “Most Wanted 2”.

2

3. Prince of Persia (2008), release date: Dec 2, 2008

The prince is back, in a new storyline, art style and gameplay, the events in Prince of Persia occur in a completely separate timeline from the Sands of Time trilogy.

3

4. Call of Duty: World at War, release date: Nov 11, 2008

After “Call of Duty 4” whose scenario was about modern warfare, “Infinity Ward” decided going back to World War II, this new entry will be using Call of Duty 4 engine, it should be great.

4

I think we will not have time to study after all this games :D if you have another game or opinion you want to share , don't hesitate to post it in the comments.

Tuesday, October 21, 2008

Me , My Friends and a Hard Disk Drive :)

we ( me and 5 more friends )  had to prepare a presentation for our college about How Hard Disks work ,  the subject it self isn't that hard but the problem was in TeamWork , how can all of the team members cooperate  in the same project effectively without wasting time in non-useful arguments.

At the beginning we have faced a lot of problems but finally we managed to get over it by avoiding -as much as we can- to be like one of those people.

  • people who don't do any thing.
  • people who want to do every thing using their own method or style.
  • people who like to manage the team but they actually work less than they talk. :D
  • people who are used to be followers, waiting for orders to start doing something

however we managed to make something that is not bad for students in the first year.

you can Download the report from here and the presentation from here

by the way ... we also had a lot of fun :)

Me , My Friends And a Hard Disk Drive :D

Sunday, October 12, 2008

Project Touchless

Touchless is a free open source application hosted by CodePlex and built using .Net technologies , it enables you to do some touch tricks by using a webcam that tracks color based markers.

According to the project main page it is divided into two parts:

-Touchless Demo is an open source application that anyone with a webcam can use to experience multi-touch, no geekiness required. There are 4 fun demos: Snake - where you control a snake with a marker, Defender - up to 4 player version of a pong-like game, Map - where you can rotate, zoom, and move a map using 2 markers, and Draw - the marker is used to guess what....  draw!

-Touchless SDK is an open source SDK that enables developers to create multi-touch based applications using a webcam for input, geekiness recommended.

they provide a nice video which demonstrate all the features off the project.

Touchless

the first thing you might need after launching the demo is to set webcam and ensure that it is working then you will need to create markers, you should use a distinguished one so the camera can easily recognize and you can create more than marker , actually you will need more than one to play the demo's included.

the demo that I liked most is called the image demo were you can rotate , move and resize a photo with two markers like pictures in iphone or Microsoft surface.

and here is a screenshot where I was able to control a picture with two screwdrivers :D.

123

the second demo is a small snake game.

there is also another game that you can play with three other players

3

the last one is a paint demo where you can draw with markers.nice drawing,isn't it ? :).

4

Finally I hope you enjoy Multi touch with Touchless :D.

Wednesday, October 8, 2008

Analogy Screensaver

Screensavers were made originally to protect old CRT monitors from a problem called Phosphor burn-in which occurs when static image or text is displayed for long periods of time however they were used later on for other purposes like entertainment and security.

Modern CRT's are less vulnerable to burn-in problems and LCD screens doesn't face this problems at all so screensavers have lost their main goal that they were designed for , another thing is that screensavers consume power as when running computer normally and it causes screen aging.

According to wikipedia :

A typical LCD screen loses about 50% of its brightness during a normal product lifetime, if left on continuously

So the best thing to protect your screen is simply to turn it off when not used or configuring your computer to set the screen into a lower power mode and that could be done from power management in most modern operating systems.

However , sometimes you need a good or useful screen savers to be displayed if you are going to be idle for few minutes...

and here comes Analogy (the reason this article was written) a useful screensaver that displays a nice hybrid format clock into your screen.

11

Analogy is available for windows and OSX and can be downloaded from here.

5 years of kotbcorp

Two days ago this blog completed its 5th year  :). So congratulations to my self and Thanks for the few followers that have been here for ...