Hola!

You've found my spot on the internet that's all about me. I put together this little site to show off my work and keep track of my various projects.

Author Archive for Leo

Threading in Python

Threading has been very helpful in some situations. Here’s how I implemented it in my recent project. I’m posting it here as a reference. import threading, Queue #Create the queue for threading queue1 = Queue.Queue() class thread_cmm_scan(threading.Thread): def __init__(self, queue1): threading.Thread.__init__(self) self.queue1 = queue1 def run(self): while True: try: item = self.queue1.get() #This is the function that I have firing…

Python and SSH

A majority of the python scripts and projects that I work on, there is a need for an ssh connection. Paramiko is my friend. import paramiko, os address = '127.0.0.1' ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) #Testing if we can ping then SSH to the endpoint try: print 'Pinging ' + address response = os.system("ping -c 1 " + address) if response…

My Intel Core i3 Home Theater PC

I’ve been talking about it all year and this summer I finally broke down and started purchasing the parts for a Home Theater PC. I’ve had the shopping list made for months and over the last two I have slowly acquired them to build the HTPC. I wanted to cover my experience putting the HTPC together in detail in this…