Archives
Twitter
- Working on discharging my laptop battery. Planning to leave it on a 8 hours long charging session after total discharge. 11 hours ago
- Frequent power cuts! Need to charge lappy! 3 days ago
- @thehungrycoder Cool :) 3 days ago
- Simple HTML, Finally Something Like BeautifulSoup :- http://bit.ly/172Cp5 3 days ago
- @CrysisGod What is the strongest? Vim ? 3 days ago
- Short Ad can be used via SMS now. It will also let users block specific senders or totally opt out from the service. 4 days ago
- @junal thanks bro! 4 days ago
- 2nd power cut in the evening. Laptop running out of charge! 6 days ago
- Monitoring Laptop Charge with Python on Ubuntu / Linux-Mint :- http://bit.ly/bw0PeG #ubuntu #python 6 days ago
- Activated Gmail's priority inbox feature! 1 week ago
-
Tag Archives: python
Creating Dictonaries from Arrays / Lists
PHP: In PHP, we can create a new associative array or dictionary by using the array_combine() function. Just feed two arrays as the parameters to this function and you get back a dictionary. The first array elements are converted into … Continue reading
Creating Conditional Lists in Python
This post is meant to be short and self explanatory. We can easily create lists in python based on given conditions. Have a look: list = [x for x in range(1,100)] It would create a list containing 1 to 99. … Continue reading
Python port to the Alphabet Class
I have a pretty bad habit of porting codes from one language to another. PHP and Python both are my favorites. But sometimes I feel that I enjoy coding more in Python than PHP. It’s just because I am a … Continue reading
Using web.py with Google App Engine
I love coding in Python and have been exploring the excellent web.py framework lately. From what I’ve seen, web.py is a very simple yet powerful python based web framework. It’d take me a lot of time to learn django (if … Continue reading
Basic HTTP Server in Python
I just wrote a simple http server with Python. Here I share the code with you all View Source: http://dpaste.de/ASbi/ import BaseHTTPServer server_class=BaseHTTPServer.HTTPServer class masnun(BaseHTTPServer.BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) self.send_header("Content-Type","text/html") self.end_headers() self.wfile.write("You requested: <b>" + self.path + "</b> on localhost <br … Continue reading
Using Sub-applications on web.py
I have started learning the web.py framework for python. It’s simply a great framework. Here’s a code snippet I wrote a few minutes ago to try the sub-application feature of web.py. There is mainly two applications here à “app” and … Continue reading
ZIP, Python and TK
The title says it all. Here’s a very simple program written in Python and TK which can extract a ZIP file to the selected location. Python 3 – Source Codes: —————————————- import zipfile import tkinter, tkinter.filedialog root = tkinter.Tk() root.title(“ZIP … Continue reading
Building GUI with Python and Tk
I have been looking for a decent GUI toolkit to develop some desktop programs. I worked with Java. Didn’t like the idea of typing that much to develop a app. Used php with WinBinder and PHP-GTK. Liked the first one, … Continue reading
Simple Console Clock for Windows with Python
The code is self explanatory: Python 3 Source Code: ———————————————- from threading import Timer # import the Timer class import os # import os library import time # import time library def main(): # define the main function os.system(“cls”) # … Continue reading
Python tool to expand short URLs
In one of my last posts, I posted a code snippet which demonstrated how to use php to expand short URLs to their original long form. Here’s the Python version I coded a few minutes ago. Python 3: import http.client … Continue reading