Tag Archives: python

Import sympy

I had just had a look at sympy’s documentation and it provides good support for solving differential equations. Sample this . Solving a differential equation would be as simple as this which gives   f(x) == C1*exp(x) as the ouput. I also tried an example given in my book. which again gives me  f(x) == C1*exp(-x) […]

Positioning of widgets in PyQt4

A short note on positioning of widgets in PyQt4 . Let say you have a layout , a button and few labels. If I press a button and a label should become invisible , your code should look something like this. The problem with this however is , it automatically repositions your labels such that […]

Threading in PyQt4

Hello Everyone , I will explain on how to create a rotating circle using the concept of multithreading , qraphicsscene aand qgraphicsview. I struggled a lot to get the syntax( noobish I know) , but this is just to ensure no-one suffers the same. We will be inheriting QtGui.QWidget , to create the basic user […]

PyQt4 Notes – 1

Here are a few code snippets I had to search for . This is for my future reference and for any one who might needing it. 1 . First of all , a simple concept that I did not understand before.   2 . And I had just started this thing called QtGraphicsView . It […]

Runge-kutta method using Python.

My exams finally got over . I got back home and slept for a week continuously . After that I realised I had to solve a differential equation for a project . Seniors told me the Runge-kutta method is numerically the best method to find function values at a particular point provided you are given […]

Play Hangman using python

Since I was bored , I wanted to write a script to build a simple version of Hangman using PyQt4. The logic (of course) wasn’t that difficult , however finding syntax for certain parts of the program was difficult , so I thought this post should save time , for those needing the syntax as […]

Cycle Simulation – Part Two

Continuing with my previous post about cycle simulation , I will focus on the three , important gas cycles , Otto , Diesel and Dual Cycle. I used PyQt4 for the graphical user interface ,  and matplotlib for the simulation . This was quite easy for the following reasons: 1 . Gas cycles are those […]

Simulation of Rankine Cycle

If you are a mechanical engineer continue reading. If you are not then please still continue reading because you have taken efforts to click on the link. So coming to the point , a Rankine cycle is a cycle that according to wiki , generates 90% of the electric power across the world. Before , […]

Installing Orange in Ubuntu – 12.04

When it comes to installing a python – package in linux , most of the times you just need to do this. or you could download an archive and go to the downloaded folder and do However I faced a lot of trouble while installing the python package Orange.I downloaded the nightly builds from this […]

Automated steam tables

Okay , the code that I wrote in the previous post , sucked and it sucked badly. There were many bugs while using it , i was iterating through lists multiple times , when I could have used a simple inbuilt python module. I have revised(rewritten) the code and can be found in this gist […]

Design a site like this with WordPress.com
Get started