Wednesday, May 25, 2011

26 x 26 x 2 - #!/bin/bashing Your Way to a Good Domain

The state of the domain world is pretty grim.  There's some helpful sites such as impossibility.org (props to chaosmachine of HN), bustaname.com and namestation.com but the real problem is not search methods but the search space itself.

Here's a quick little bash script I threw together to search through
permuatations of [a-z][a-z]name.com and name[a-z][a-z].com.  Feel free to adapt this script for your own needs. Happy Hacking.


#!/bin/bash

# All-permissive Copying License
#
# Copyright 2011 Babo Labs, LLC - http://babolabs.com/
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice and
# this notice are preserved.

verbose=0;
word=$1;

while getopts v: OPT; do
    case "$OPT" in
        v)
            echo "VERBOSE MODE"
            verbose=1;
            word=$2;
            ;;
    esac
done
echo "Finding all permutations of [a-z][a-z]$word.com"

for fl in `echo {a..z}`;
do
    for sl in `echo {a..z}`; 
    do
        whois $fl$sl$word'.com' | grep "No match" > /dev/null;
        if [ "$?" -eq "0" ]; then
            echo $fl$sl$word'.com': **AVAILABLE**;
        else
            if [ $verbose -eq 1 ]; then
                echo $fl$sl$word'.com': NO;
            fi
        fi
    done
    for sl in `echo {a..z}`; 
    do
        whois $word$fl$sl'.com' | grep "No match" > /dev/null;
        if [ "$?" -eq "0" ]; then
            echo $word$fl$sl'.com': **AVAILABLE**;
        else
            if [ $verbose -eq 1 ]; then
                echo $fl$sl$word'.com': NO;
            fi
        fi
    done
done

Best of luck in your own domain search.

sabalaba & mek

Friday, May 6, 2011

Python to get Media Metadata

At Babo Labs, we're interested in eliminating work for our digital merchants by providing them enabling technologies. An enabling technology is one that assists a user in completing a task more productively and efficiently, while minimizing intrusiveness or inconvenience. One example of an enabling technology is Google's instant search bar which shows search engine results as you type your query, in real time (statistics show this service saves 2-5 seconds per query on average).

One way our social e-commerce platform, Babolog, accomplish this is by passively-dynamically collecting meta information about the digital media files our merchants upload, and then displaying these meaningful specifications to their customers.

Over the past month, Stephen and I have tested a variety of Python modules for extracting metadata from media files. Here''s a few good ones:

1. kaa.metadata (freevo multimedia kaa metadata package)
    • Documentation
    • Installation: Ubuntu apt install
      • sudo apt-get install python-kaa-metadata 
#example: 
import kaa.metadata

def getKaaMetadata(filepath):
    meta = kaa.metadata.parse(filepath)
    print meta
    return meta 

 2. pyPdf (for pdf files)
    • Documentation
    • Installation: ez_install.py installation
      • sudo python -m easy_install pypdf
#example: 
from pyPdf import PdfFileReader

def getPdfMetadata(filename):
    pdf = PdfFileReader(file(filename, "rb"))
    basic_info = pdf.getDocumentInfo()
    preview = []

    try:
        for outline in pdf.outlines:
            preview.append(outline['/Title'])
    except:
        preview = []

    return basic_info, preview
 
3. ID3 (for mp3 ID3 metadata)
    • Documentation
    • Installation: Ubuntu apt install 
      • sudo apt-get install python-id3 
#example: 
from ID3 import *
try:
    id3info = ID3('/some/file/moxy.mp3')
    print id3info
    id3info['TITLE'] = "Green Eggs and Ham"
    id3info['ARTIST'] = "Moxy Früvous"
    for k, v in id3info.items():
        print k, ":", v
except InvalidTagError, message:
    print "Invalid ID3 tag:", message

4. Magic (MIME inference)
#example: 
def getMimeType(filename):
    """
    Notes that the magic package has been marked as deprecated.
    We still find it useful for our needs. 
    """ 
    m = magic.open(magic.MAGIC_MIME)
    m.load()
    return m.file(filename) 

Conclusion
We've found the kaa.metadata module to be pretty __awesome__. It provides valuable metadata for a variety of different file formats and media types including: jpg, avi, mp3 (including id3 and exif). It's a great tool if you are looking for an easy all-in-one solution. For our purposes, parse the results of several services in order to obtain a tailored solution for our platform.

If you'd like to learn more about getting metadata for a specific media type, or more about what metadata these modules can fetch, just leave a comment!

Sincerely,
- Michael E. Karpeles
- Stepehen A. Balaban

Sunday, May 1, 2011

Why the world needs a digital e-commerce platform

Let the numbers speak
Before we started working on Babolog 6 months ago, we did research to see where the digital e-commerce industry was headed. For a start-up focusing specifically on social, digital e-commerce, the results looked appealing from all ends of the spectrum: sales, content production, and social tendencies.

1. Digital Sales - There's a rapidly growing market
From a sales perspective, a Pew study in Dec 2010 shows nearly two-thirds of Internet users -- 65% -- having paid to download or access some kind of online content from the Internet, ranging from movies to games to news articles [1]. The worldwide market for digital content creation products has grown from $3.04 billion from 2008 to $6.5 billion, exceeding estimates for 2012 by over 2 billion dollars [2,3].

2. Content Production - Aggregating content producers
In terms of digital content production, eMarketer predicts the number of user-generated content creators in the US will rise 9% (to 114.5 million creators) by 2013, from the 82.5 million (42.8%) recorded in 2008. This translates to over half (51.8%) of all US Internet users [2].

3. Leveraging social networking
A survey of 2,221 consumers, conducted by VG Market and Playspan in July 2010, indicates 75% of customers have spent money on virtual goods, and 32% have made purchases within social networks [4].
                  
[1] Pew Research Center's Internet & American Life Project
[2] (eMarketer, 2009)
3] (Computerworld - April 11, 2007)
[4] Women Spend More on Digital Goods ...

Sincerely,
Michael E. Karpeles
Stephen A. Balaban

http://babolog.com