def create_hash_map():
 hashmap = {}
 from base64 import encodestring as base64
 import pwd
 login_name = pwd.getpwuid(os.geteuid())[0]
 conn = http.client.HTTPSConnection(u'api.github.com')
 conn.request(u'GET', u'/repos/nipy/nipype', headers={u'Authorization': (u'Basic %s' % base64(login_name))})
 try:
  conn.request(u'GET', u'/repos/nipy/nipype/git/trees/master?recursive=1')
 except:
  pass
 else:
  r1 = conn.getresponse()
  if (r1.reason != u'OK'):
   raise Exception((u'HTTP Response  %s:%s' % (r1.status, r1.reason)))
  payload = simplejson.loads(r1.read())
  for infodict in payload[u'tree']:
   if (infodict[u'type'] == u'blob'):
    hashmap[infodict[u'sha']] = infodict[u'path']
 return hashmap

def create_hash_map ( ) : hashmap = { } from base64 import encodestring as base64 import pwd login_name = pwd . getpwuid ( os . geteuid ( ) ) [ 0 ] conn = http . client . HTTPSConnection ( u'api.github.com' ) conn . request ( u'GET' , u'/repos/nipy/nipype' , headers = { u'Authorization' : ( u'Basic %s' % base64 ( login_name ) ) } ) try : conn . request ( u'GET' , u'/repos/nipy/nipype/git/trees/master?recursive=1' ) except : pass else : r1 = conn . getresponse ( ) if ( r1 . reason != u'OK' ) : raise Exception ( ( u'HTTP Response  %s:%s' % ( r1 . status , r1 . reason ) ) ) payload = simplejson . loads ( r1 . read ( ) ) for infodict in payload [ u'tree' ] : if ( infodict [ u'type' ] == u'blob' ) : hashmap [ infodict [ u'sha' ] ] = infodict [ u'path' ] return hashmap
create a hash map for all objects .