Have you ever worked with data extracted from a random source? Like an unknown website? This can sometimes become a nightmare for developpers as it is impossible to determine the encoding. Further text processing without using the correct encoding can become error prone. Lets see how to handle the different situations where encoding is known or unknown.
Creating Universally Unique ID in Python

Unique as a Snowflake
GUID is a term that was bandied about in my office to signify any unique id that we used to identify our database records. But I never gave it a second thought for a long time, that is until I heard UUID mentioned in the context of couchdb, as enabling distributed data storage. This piqued my interest and I started reading on UUID. (By the way, our Guids were just sequential numbers generated by our db). So I started digging more info on UUID in general and python’s uuid module in particular.
Read More…
How to ssh in python using Paramiko?

If only decoding was so Easy!
If you have ever agonized over connecting and communicating with a remote machine in python, give Paramiko a go. Paramiko is most helpful for cases where one needs to securely communicate and exchange data, execute commands on remote machines, handle connect requests from remove machines or access ssh services like sftp. As described in the paramiko’s homepage
“Paramiko is a module for python 2.2 (or higher) that implements the SSH2 protocol for secure (encrypted and authenticated) connections to remote machines.”

Recent Comments