Ejemplo n.º 1
0
def compareInstagram():
    tic = time.clock()
    for f in files:
        print 'currently in file ', f
        print 'time so far: ', (time.clock() - tic)
        getUsernames.getUsernamesFromList(f)
        getUsernames.doEverything()
        userList = getUsernames.getLists()
        createHistograms.createHistsAndNorms(userList)

        #instagram, already normalizes
        instaUserList = instaInfo.doEverything(f)
        #print 'user list is',instaUserList

        #returns: {'instaSummedCosines':instaSummedCosines,'cosines':cosines}
        compare.compareFreqs(userList, instaUserList)

        dictionary = compare.gatherinstaCosines(userList)
        cosinesTemp = dictionary.get('instaCosines')
        for cos in cosinesTemp:
            instaCosines.append(cos)
        instaSummedCosinesTemp = dictionary.get('instaSummedCosines')
        for item in instaSummedCosinesTemp:
            instaSummedCosines[item] = instaSummedCosinesTemp.get(item)
        compare.meanInstaCosines()
        compare.stdDevInstaCosines()
    toc = time.clock()
    print 'time is ', toc - tic
Ejemplo n.º 2
0
def compareInstagram():
	tic = time.clock()
	for f in files:
		print 'currently in file ',f
		print 'time so far: ',(time.clock()-tic) 
		getUsernames.getUsernamesFromList(f)
		getUsernames.doEverything()
		userList = getUsernames.getLists()
		createHistograms.createHistsAndNorms(userList)

		#instagram, already normalizes
		instaUserList = instaInfo.doEverything(f)
		#print 'user list is',instaUserList

		#returns: {'instaSummedCosines':instaSummedCosines,'cosines':cosines}
		compare.compareFreqs(userList,instaUserList)

		dictionary = compare.gatherinstaCosines(userList)
		cosinesTemp = dictionary.get('instaCosines')
		for cos in cosinesTemp:
			instaCosines.append(cos)
		instaSummedCosinesTemp = dictionary.get('instaSummedCosines')
		for item in instaSummedCosinesTemp:
			instaSummedCosines[item] = instaSummedCosinesTemp.get(item)
		compare.meanInstaCosines()
		compare.stdDevInstaCosines()
	toc = time.clock()
	print 'time is ',toc-tic
Ejemplo n.º 3
0
def compareTwitter():
    tic = time.clock()
    for f in files:
        print 'currently in file ', f
        print 'time so far: ', (time.clock() - tic)
        getUsernames.getUsernamesFromList(f)
        getUsernames.doEverything()
        userList = getUsernames.getLists()
        print userList
        createHistograms.createHistsAndNorms(userList)

        twitterUserList = twitter_info.doAllTheThings(f)

        compare.compareTwitterFreqs(userList, twitterUserList)
        dictionary = compare.gatherTwitterCosines(userList)
        print dictionary.get('twitterCosines')
        print dictionary.get('twitterSummedCosines')
Ejemplo n.º 4
0
def compareTwitter():
	tic = time.clock()
	for f in files:
		print 'currently in file ',f
		print 'time so far: ',(time.clock()-tic)
		getUsernames.getUsernamesFromList(f)
		getUsernames.doEverything()
		userList = getUsernames.getLists()
		print userList
		createHistograms.createHistsAndNorms(userList)

		twitterUserList = twitter_info.doAllTheThings(f)


		compare.compareTwitterFreqs(userList,twitterUserList)
		dictionary = compare.gatherTwitterCosines(userList)
		print dictionary.get('twitterCosines')
		print dictionary.get('twitterSummedCosines')