Energy Data!

by Alex

Today, I've added a bunch of new features and updates to my site. I've successfully converted my old PHP service which queried my database for the current energy usage to the new python script below. Currently, I'm using a backend curl script because my SQL server isn't hosted locally. I do plan on updating this at a later date, but for now, the snippet below works well! You can also see the code live at: http://ajkelly.net/energy

def energy():
    import urllib2
    url = "http://microsoftguild.com/getEnergyData.php"
    data = "data=currentEnergy"
    req = urllib2.Request(url, data)
    f = urllib2.urlopen(req)
    str1 = f.read()
    return str1

In addition to my awesome code printer (as you can see above), I've also added IP tracking for comments, Google Analytics, and all of my old chart data. (if you remember my old site with a bunch of charts, this is what I mean by chart data). While I haven't activated the charts quiet yet, I'll be posting them in my "Projects" section when I do.

In a few days, I plan to go to a startup convention within Atlanta! I'm very excited to meet the local startups in the area.

Comments

login to comment Your IP is: 18.191.189.85