Browsing articles tagged with " Twitter"
May
4

Python GeoIP (python-geoip) cities tutorial

Using geolocation is something that people are doing a lot lately.  You may have noticed twitter.com in FireFox showing a little bar at the top asking if it’s alright to share your location. This is so that when you tweet you can have your location show up there. That way you can keep track of where you tweet from.  There are many uses for this kind of information and these days there’s a lot of free things out there to help you get started with your geolocation project.

Installing GeoIP

Requirements/Dependancies:

  • Python 2.4+
  • python-geoip
  • libc6
  • libgeoip1

More on dependencies here http://ns2.canonical.com/es/karmic/python-geoip. But don’t worry about these since most of them get installed by the package anyway.

A couple of basic principles before we get started.

  1. Geolocation is gathered from an IP address.
  2. There has to be a database that connects the IP address to a geographical location

I’m going to be using Python here because frankly it’s powerful, easy and has awesome libraries for geolocation. Which brings me to the GeoIP library! I’m using Ubuntu 9.10 so most of these libraries will just take an apt-get to install.

Then you can install python-geoip with

sudo apt-get install python-geoip

Or you can get the source from http://geolite.maxmind.com/download/geoip/api/python/

Now that you have this installed you can  test it with the following code put in the python terminal.

>>> import GeoIP
>>> gi = GeoIP.new(GeoIP.GEOIP_MEMORY_CACHE)
>>> print gi.country_code_by_addr("203.195.93.0")

I got that from MaxMind’s tutorial http://www.maxmind.com/app/python. At this point you have the ability to track IPs down to the country level. What you probably really want is to go down to the city level.

Geolocation – Cities

If you call some of the other functions on the GeoIP class like record_by_addr() you’lld get an error like this

“Invalid database type GeoIP Country Edition, expected GeoIP City Edition, Rev 1″

read more

Dec
7

How many users on Twitter?

By Tom Schultz  //  Blog Post  //  1 Comment

Twitter has been pretty strict in making sure that the public is not aware of how many users they have and this is probably for good reason.  I really think the amount of hype that Twitter has had is not justified.  So then, the question I set out to answer is quite simple and that question is, how many twitter accounts are there?

So from that point there is another question that must be asked and that is, who would know the information I’m looking for, other than Twitter?

So first I google’d around a little and I found this article on TechCrunch which had some excellent information on the subject.  Information about how user ID numbers on Twitter do not reflect the number of users that are on Twitter.

read more

Sep
25

Balthasar Week 2 Report

By Eric Shull  //  Blog Post  //  1 Comment

In a post a couple of weeks ago, I mentioned setting up a new GoogleCode project. I’m happy to say that Balthasar is coming along nicely. For details on what Balthasar is and how to get involved, read on.

read more

Mar
22

Episode #5 – Tekken thumb to the French police

By Tom Schultz  //  Podcast  //  1 Comment

Sorry we’re so late in getting this out.  Hopefully, we can get on a regular schedule for putting these podcasts out and maybe some good posts too.

Keep watching and feel free to comment or give suggestions!

  1. Topics
    1. “Tekken Thumb”
    2. Quad-core vs. Dual-core
    3. Chainlove.com
    4. The french police adopt ubuntu arstechnica.com
    5. More talk of communications between linux distributions
    6. We got Linked!
    7. “fizzbin” hanselman.com
    8. deathswitch lifehacker.com
    9. spokenword.org
    10. Twitter uses amazon S3 to host it’s images
 
Feb
9

The Future of Google

By Eric Shull  //  Blog Post  //  2 Comments

For those of you who want to argue that Google is doing just fine (ahem), I refer you to some new articles on the subject. Google may not be in the trouble I originally blogged about, but this article generalizes the difficulties it faces in terms of past internet giants like AOL, and this article reiterates the Twitter Threat discussed in the first article. As I recall, somebody and somebody else have been writing Ubiquity scripts to let them search specific sites from any webpage. Dare I say it, but I think people are finding alternatives to searching with the Old Ways.

Tom’s remarks about One Login to Rule Them All, however, is still valid. I won’t take that away from him.