DIABLO III API

So I was doing a bit of research on a Diablo III API, and stumbled across this article: http://us.battle.net/d3/en/forum/topic/4877377752 It seems they are still in the early stages, but there is a Character Calculator API, and it is in JSON. First off we need to load in our Python libraries: >>> from urllib2 import urlopen >>> from json import loads We can make our request using common URL methods: >>> res = urlopen('http://us.

read more
BYTES, NIBBLES, AND BITS IN PYTHON

Binary Binary is nothing more than a base 2 numbering system using the numbers 0 and 1. Bit A Bit is merely a single number of either 1 and 0 within the binary. Byte A Byte consists of 8 bits. A byte containing all 0s will be the integer 0, while a byte containing all 1s will be the integer of 255. Nibble A Nibble consits of 4 bits. A nibble containing all 0s will be the iteger 0, while a nibble containing all 1s will be the integer 15 (very useful for hex numbers).

read more
WORKING WITH LIBVIRT USING PYTHON

Today I decide to toy around with a KVM server we have running in house for testing. I started by using the libvirt Documentation, but it was very limited and I had to do some trial and error. I will go over a few basic things I learned using the libvirt Python module: Normally we us virt-manager to connect to our KVM instances, and the authentication is tunnled over SSH (using SSH Keys) and QEMU .

read more
LINE EQUATIONS IN PYTHON

The other day I was playing with some Python challenges found on a popular sites, this challenge worked with xy coordinates on a 2D plane. I wanted to show some of the code I wrote and how they work. The Plane Being the data is a tuple of x, y coordinates we will use the Cartesian Coordinate System . I started my code off as a simple Python class: class Line(object): def init(self, data): self.

read more