def get_gists(uname, ask = False, basedir = ''):
    print
    print "Cloning gists from %s..." % uname
    print
    gists = urllib.urlopen(uname % "https://api.github.com/users/%s/gists")
    wingfn = 'gists.wpr'
    if basedir:
        prep_directory(basedir)
    for item in json.loads(gists.readlines()[0]):
        name= '-'.join(item['files'].keys()[-1].split('.'))
        if basedir:
            fpath = '/'.join([basedir, name])
        else:
            fpath = name
        if os.path.exists(fpath): #already cloned
            continue
        desc = item['description']
        idn = item['id']
        url = item['html_url']
        cmd = "git clone git@gist.github.com:%s.git %s" % (idn, fpath)
        process(cmd, name, fpath, ask, desc, url,typ="gist")
        print
dataset/ETHPy150Open thearn/github-auto-tools/github_clonetools/clonetools.py/get_gists/swapped operands of `%`