Characteristics of social network

The main application tasks developed for the analysis of social networks. The analysis of approaches to software development. Selection of project management tools. Especially the use of the programming language and integrated extension environment.

Рубрика Иностранные языки и языкознание
Вид дипломная работа
Язык английский
Дата добавления 22.09.2016
Размер файла 1,1 M

Отправить свою хорошую работу в базу знаний просто. Используйте форму, расположенную ниже

Студенты, аспиранты, молодые ученые, использующие базу знаний в своей учебе и работе, будут вам очень благодарны.

6. PRACTICAL IMPLEMENTATION DESCRIPTION

6.1 Requirements formulation

Functional requirements

The following functional requirements have been formulated:

1. System must give a user and ability to input target's (a Vkontakte page of a person, in which social surrounding user is interested in) id for data retrieval.

2. System must be able to retrieve list of target's friends and common friends for each target's friend from Vkontakte Social Network

3. System must be able to build a social graph of target user.

4. System must count basic social graph characteristics.

5. System should count ranking for each friend of target and provide top 10 most ranked users.

Picture 8. UI Mockup

Thus, a web form should contain the following control elements (Table 3):

Table 3.

Element name

Type

Input/output?

Target User UI

Text

Input

Retrieve Information

Button

Input

PageRank

Button

Input

SimRank

Button

Input

Interest Similarity Rank

Button

Input

Local clustering Coefficient

Grid

Output

Centrality

Grid

Output

Social Graph

Image

Output (generating)

PageRank Results

Grid

Output

SimRank Results

Grid

Output

Interest Similarity Results

Grid

Output

6.2 UML

State diagram

Diagram 1 represents state diagram, which may be considered as the major algorithm

Diagram 1. State diagram

6.3 Programming an application

Since application implementation was conducted in Scrum methodology, the functional requirements were divided into several sprints.

Sprint 1 was a preparation included theoretical and methodological investigation. It included the next user stories and tasks:

1. Research graphs and networks

a. Social graphs

b. Interest graphs

c. Network measures

d. Applicability of achieved knowledge in the project

2. Investigate python libraries

a. igraph

b. networkx

c. flask

d. vk

3. Create a standalone application

Results of stories 1 and 2 are outlined in the previous chapters of thesis.

User story “Create a standalone application”

Current User Story is rather simple and required creation of Standalone application at https://vk.com/dev. (Picture 9 a-b)

Picture 9a. The first page

Sprint 2 included basic algorithms implementation. As algorithms were planned to be used in the web application, they were implemented separately as a scripts.

Stories:

1. Data retrieval and graph formation algorithm

a. Implement connection to Vkontakte

b. Implement friends.get request

c. Implement friends.getMutual request

d. Graph formation

2. Network measures calculations

a. Eigenvector centrality

b. Local clustering coefficient

3. SimRank calculation

4. PageRank calculation

5. Interest Similarity Rank calculation

a. Users' interests mining

b. Jaccard coefficient calculation

User story “Data retrieval

As a result of this story, a retrieve.py script was developed.

Element

retrieve.py

Libraries

import vk

import time

from vk.exceptions import VkAPIError

import re

def getFriends(uid):

ac=ACCESS_TOKEN

global session

session = vk.Session(access_token=ac)

global api

api = vk.API(session)

friends=api.friends.get(user_id=uid)

return friends

def getMutual(uid,friends):

mutual={}

c=1

for i in friends:

try:

mutual[i]=api.friends.getMutual(target_uid=i, source_uid=uid)

except:

mutual[i]=[]

c=c+1

if (c%9==0):

time.sleep(5)

return mutual

def getInterests(uid,friends):

c=0

sorted_jacc=[]

uinterest={}

try:

uinterest=api.users.get(user_ids=uid, fields='interests, music, movies, tv, books, games')

except VkAPIError:

uinterest={}

print((uinterest[0].values()))

if len(uinterest[0].keys())>0:

uinterest[0].pop('first_name')

uinterest[0].pop('last_name')

uinterest[0].pop('uid')

s=[]

for ukey in uinterest[0].keys():

a=re.findall(r"[\w']+", uinterest[0].get(ukey).lower())

for h in a:

if h!='' and h!='и' and h!='с' and h!='у'and h!='в'and h!='от'and h!='над'and h!='под'and h!='по' and h!='все' and not bool(re.search("^[0-9]$", h)):

s.append(h)

uinter=s

if len(uinter)>0:

interests={}

time.sleep(5)

for i in friends:

try:

interests[i]=api.users.get(user_ids=i, fields='interests, music, movies, tv, books, games')

except VkAPIError:

interests[i]=[]

if len(interests[i])==0 or interests[i][0].get('deactivated'):

interests.pop(i)

else:

interests[i][0].pop('first_name')

interests[i][0].pop('last_name')

interests[i][0].pop('uid')

c=c+1

if (c%9==0):

time.sleep(5)

inter={}

jacc={}

for i in interests:

s=[]

for ukey in interests[i][0].keys():

a=re.findall(r"[\w']+", interests[i][0].get(ukey).lower())

for h in a:

if h!='' and h!='и' and h!='с' and h!='у'and h!='в'and h!='от'and h!='над'and h!='под'and h!='по' and h!='все' and not bool(re.search("^[0-9]$", h)):

s.append(h)

inter[i]=s

print(str(i)+" Interests: "+str(inter[i]))

jacc[i]=Jacc(uinter,inter[i])

print(jacc)

sorted_jacc=sorted(jacc.items(), key=operator.itemgetter(1),reverse=True)[0:10]

print (sorted_jacc)

else:

sorted_jacc=[("error","No interests pointed")]

else:

sorted_jacc=[("error","No interests pointed")]

return sorted_jacc

def Jacc(ui,ui2):

set1=ui

set2=ui2

intersection=len(set(set1).intersection(set2))

jacc=intersection/(len(set1)+len(set2)-intersection)

return jacc

User Story `Graph and measures'

The output of this story was graph.py script

Element

graph.py

Libraries

import networkx as nx

import operator

import networkx_addon

import json

from networkx.readwrite import json_graph

def SocialGraph(uid,friends,mutual):

G=nx.Graph()

G.add_node(uid)

G.add_nodes_from(friends)

for k in friends:

G.add_edge(uid,k)

for i in mutual[k]:

G.add_edge(k,i)

def EigenCentr(G):

ec=nx.eigenvector_centrality(G)

sorted_EC = sorted(ec.items(), key=operator.itemgetter(1),reverse=True)[1:11]

return sorted_EC

def PageRank(G):

pr=nx.pagerank(G)

sorted_PR = sorted(pr.items(), key=operator.itemgetter(1),reverse=True)[1:11]

return sorted_PR

def SimRank(uid,G):

sr = networkx_addon.similarity.simrank(G)

suid=(sr[uid])

sorted_suid=sorted(suid.items(), key=operator.itemgetter(1),reverse=True)[1:11]

return sorted_suid

def LocalCluster(G):

lc=nx.clustering(G)

sorted_LC = sorted(lc.items(), key=operator.itemgetter(1),reverse=True)[1:11]

return sorted_LC

def D3Data(uid,G):

Graphdata = json_graph.node_link_data(G)

JGraphData = json.dumps(Graphdata)

Return JGraphData

User Story `SimRank calculation'

Result - SimRankMeasure.py

Step

SimRankMeasure.py

SimRank calculation

import networkx_addon

SRank = networkx_addon.similarity.simrank(G)

User Story `PageRank calculation'

Result - PageRankMeasure.py

Step

PageRankMeasure.py

PageRank calculation

PRank=pagerank(G, alpha=0.85, personalization=None, max_iter=100, tol=1e-06, nstart=None, weight='weight', dangling=None)

Sprint 3 is mostly devoted to UI development. It has one labor-intensive story:

UI design and development

The design and development of UI was held in flask microframework, which allows to build web-applications in python language.

For Web application operation script server.py and template index.html were implemented.

The extra stories in Backlog are the stories which may be taken in Sprint if UI design and development will be done before sprint end.

They include adding different parameters, which may also influence potential customers preferences.

1. Adding a parameter personal.religion;

2. Adding a parameter personal.smoking;

3. Adding a parameter personal.alcohol.

7. PRACTICAL RESULTS DESCRIPTION

7.1 Application demonstration

Application interface is presented on Picture 10. As the flask framework has some issues with placing several buttons on the form, connected with submit form type, it was decided to implement user interface with one button “Retrieve information”, which makes a POST request to the server, passing target user ID.

Picture 10. VkApp interface

After server gets ID, it sequentially executes methods stated in 7.3 Programming an application. When all methods are executed, server re-renders template index.html

As a result, all measures are stated in tabular view and graph is built in div container.

7.2 Restrictions

Vkontakte API allows external applications a limited number of requests per second, which greatly increases a calculation time because of required timeouts. After conducting a number of tests, it was found, that the optimal number of requests for iteration r=9. The minimum timeout, which allows stable work of application is t=5 sec. Thereby, the total calculation time increasing, connected with timeouts, may be calculated with the next formula:

, (11)

Where k is a number of needed cycles of API requests and N is a number of friends+1 (including target used). Taking into consideration experimentally found r and t and exploring code allows converting formula (11) in the next form:

(12)

For instance, for user with 20 friends

=3*3*5=45 seconds.

Interest Rating

Current application proposes a new similarity measure approach. This approach is similar with interest graph theory. The idea is that the more people interest have in common, the more alike they are.

Jaccard index was used to implement interest rating. First, all available interests are retrieved from target user page and his friends' pages. After that all the patterns like one-digit numbers and prepositions were removed and text was transformed to lowercase. Interests, which are usually stated through commas, were divided into separate words - elements of a list, which presented the key words of each user. After that a list of interest of target user was compared to the lists of interests of his friends:

· The intersections were counted

· The Jaccard coefficient was calculated using formula (8).

· Jaccard coefficients were ordered by descending with the users

7.3 Measures comparison

A user with ID 44687877 was taken as experimental user. After analyzing this user author got the next conclusions:

1. It can be stated, that eigenvector centrality, pageRank and SimRank give similar ratings for target user friends. There were usually fluctuations of ids on 1-2 and 3-4 places.

2. Unlike the measures, stated in point 1, Interest Rank provides different rating of similar users

Such results may be explained by the difference in the nature of calculations: while first coefficients take into account only links between users, the Interest Rank uses user's interest.

8. TASK COMPLETION PROOF

During the completion of the present thesis the next goals were reached

1. The existing methods of problem solution are outlined in Theoretical background and Methodological variety

2. Work's Scientific Value tries to prove scientific value of work based on current state of business in this area.

3. Software tools selection resulted in a set of tools for development and development support.

4. The first part of Practical Implementation Description contains the development of general algorithms, prototyping etc.

5. The second part of Practical Implementation Description reveals algorithm and UI codes.

6. Solution testing and practical applicability demonstration in Practical Results Description proves the operability of application.

As a result, it can be concluded that the major task defined in Task Definition section was completed.

CONCLUSION

Inspired by researches involving Facebook Social Graph analysis, recommendation systems and objects similarity, the author has created a web application, which provides user with basic and visual, but transparent information. This system presents a recommendation system based on links analysis and interest analysis. The idea was to create a system, which would take a user profile as an input parameter and provide links analysis and interest analysis of the input user and his/her friends, presenting a rank of interest similarities among user's friends and other useful information about social graph.

During this research a number of connected scientific works were overviewed and some operating applications were stated. Using Python and Flask proved to be a good experience, as at the beginning of the research author had no skills in these programming tools. A novel proposed approach of using interests' similarity may be successful in targeted advertising and may be further developed for more complex interest analysis.

Among further development gender, belief, attitude to politics, alcohol, cigarettes and many other parameters may be added to increase the productivity of analysis. Moreover, analysis time may be decreased with involvement of more complex algorithms for searching and ranking as well as parallel computing involving message queues.

BIBLIOGRAPHY

1 C. Kadushin. Social Network Analysis. -- Headquarters, Department of the Army, Washington, DC, 2006. -- ISBN 978-1-84787-395-8

2 My T. Thai, Panos M. Pardalos. Handbook of Optimization in Complex Networks: Communication and Social Networks. -- Springer, 2011. -- С. 541. -- ISBN 978-1-4614-0856-7

3 P. J. Carrington, J. Scott. The Sage Handbook of Social Network Analysis. -- SAGE, 2011. -- С. 640. -- ISBN 978-1-84787-395-8.

4 Сутурин Г.С. Формирование сообществ на основе граф-интересов (рус.) // Современные исследования социальных проблем : журнал. -- Красноярск, 2013. -- № 1(13). -- С. 215. -- ISSN 2077-1770

5 Hossain N. Why the Interest Graph Is a Marketer's Best Friend. Mashable (19.06.2012)

6 Spertus, E., Sahami, M., & Buyukkokten, O. (2005). Evaluating similarity measures: a large-scale study in the orkut social network. In Proceedings of ACM SIGKDD (pp. 678-684). Chicago, Illinois, USA: ACM

7 Min-Sung Hong. MyMovieHistory: Social Recommender System by Discovering Social Affinities Among Users. Article in Cybernetics and Systems · January 2016

8 Md. Saiful Islam. Know Your Customer: Computing k-Most Promising Products for Targeted Marketing. Article in The VLDB Journal · January 2016

9 Mashhadi A., Mokhtar S., Habit C.: Leveraging Human Mobility and Social Network for Efficient Content Dissemination in MANETs (англ.) // In 10th IEEE International Symposium on a World of Wireless, Mobile and Multimedia Networks (WoWMoM09). --Greece, 2009. -- P. 4.

10 Ricci, F., Rokach, L., & Shapira, B. (2011). Introduction to recommender systems handbook. In Recommender Systems Handbook (pp. 1-35). Springer US.

11 Purushotham, S., Liu, Y., & Kuo, C. (2012). Collaborative topic regression with social matrix factorization for recommendation systems. In Proceedings of ICML (pp. 759-766). Edinburgh, Scotland: Omnipress.

12 Yang, X., Steck, H., & Liu, Y. (2012). Circle-based recommendation in online social networks. In Proceedings of ACM SIGKDD (pp. 1267{1275). Beijing, China: ACM.

13 Dong, H., Hussain, F. K., & Chang, E. (2011). A service concept recommendation system for enhancing the dependability of semantic service matchmakers in the service ecosystem environment. Journal of Network and Computer Applications, 34 , 619-631.

14 Adomavicius, G., & Tuzhilin, A. (2005). Toward the next generation of recommender systems: A survey of the state-of-the-art and possible extensions. IEEE Transactions on Knowledge and Data Engineering, 17 , 734-749.

15 Deng, S., Huang, L., & Xu, G. (2014). Social network-based service recommendation with trust enhancement. Expert Systems with Applications, 41 , 8075-8084.

16 Schwering, A. (2008). Approaches to semantic similarity measurement for geo-spatial data: A survey. Transactionsin GIS, 12 , 5-29.

17 Lei, J.-B., Yin, J.-B., & Shen, H.-B. (2013). Gfo: a data driven approach for optimizing the gaussian function based similarity metric in computational biology. Neurocomputing, 99 , 307-315.

18 Tsebelis, G. (1995). Decision making in political systems: Veto players in presidentialism, parliamentarism, multicameralism and multipartyism. British journal of political science, 25 , 289-325.

19 Han, X., Cuevas, A., Crespi, N., Cuevas, R., & Huang, X. (2014). On exploiting social relationship and personalbackground for content discovery in p2p networks. Future Generation Computer Systems, 40 , 17-29.

20 Quercia, D., Lathia, N., Calabrese, F., Di Lorenzo, G., & Crowcroft, J. (2010). Recommending social events from mobile phone location data. In 2010 ICDM (pp. 971-976). IEEE Computer Society.

21 Sarwar, B., Karypis, G., Konstan, J., & Riedl, J. (2001). Item-based collaborative filltering recommendation algorithms. In 10th WWW (pp. 285-295). ACM.

22 Markines, B., & Menczer, F. (2009). A scalable, collaborative similarity measure for social annotation systems. In 20th HyperText HT '09 (pp. 347-348). ACM.

23 Hindle, D. (1990). Noun classification from predicate-argument structures. In 28th Annual Meeting on Associationfor Computational Linguistics (pp. 268-275). Association for Computational Linguistics.

24 Lin, D. (1998). An information-theoretic definition of similarity. In 15th ICML (pp. 296-304). Morgan Kaufmann Publishers Inc.

25 Backstrom, L., & Leskovec, J. (2011). Supervised random walks: predicting and recommending links in social networks. In WSDM (pp. 635{644). ACM.

26 Kusumoto, M., Maehara, T., & Kawarabayashi, K.-i. (2014). Scalable similarity search for simrank. In Proceedingsof the 2014 ACM SIGMOD international conference on Management of data (pp. 325{336). ACM.

27 Tao, W., Yu, M., & Li, G. (2014). Ecient top-k simrank-based similarity join. Proceedings of the VLDB Endowment, 8 , 317-328.

28 Zhang, J., Tang, J., Ma, C., Tong, H., Jing, Y., & Li, J. (2015). Panther: Fast top-k similarity search on large networks. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (pp. 1445-1454). ACM.

29 Zafarani R., Abbasi M., Liu H.. Social Media Mining.

30 The Scrum Guide. The definitive Guide to Scrum: The Rules of the Game. (Ken Schwaber, Jeff Sutherland). Available at:

ABSTRACT

Computer social networks gave businesses an opportunity to conduct marketing research effectively, as social networks contain various important information like users' age, gender, interests etc. Availability of this data allows avoiding different questionings and other labor-intensive marketing researches because business now is able to promote products, based on the interests pointed in user profile. Moreover, social and interest graphs help to find potential customers among friends and users over the social network. This master's thesis is devoted to the development of marketing analysis solution based on social and interest graphs. Author has set the goal to create a web-application, which will be able to find and rank potential customers by using the information of existing one in Russian social network Vkontakte. Some steps in this work correlate with Systems development lifecycle. With the help of UML software modelling language conceptual diagrams were built. Using Python 3.x, algorithms were developed and user interface was rendered. Application development was carried under Scrum framework. An output of research is an application similar to recommendation system, which suggests potential customers most likely to make a purchase. The output application could be found useful by marketing agencies, which are interested in social graph analysis of Vkontakte. The future development of this research may include involvement of more complex algorithms for searching and ranking as well as parallel computing involving message queues.

APPENDIX

index.html

<!DOCTYPE html>

<html>

<head>

<title>VK Analysis</title>

<meta name="viewport" content="width=device-width, initial-scale=1.0" charset="utf-8">

<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet" media="screen">

<script src="https://d3js.org/d3.v3.min.js" charset="utf-8"></script>

<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>

<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>

<style>

.node {

stroke: #fff;

stroke-width: 1.5px;

}

.link {

fill: none;

stroke: #bbb;

}

</style>

</head>

<body>

<h1>Welcome to VK Analysis</h1>

<div class="container_fluid">

<div class="row">

<div class="col-lg-4">

<br>

<form role="form" method="POST" action="/">

<tr>

<td>Tagret user ID</td>

<td><input type="text" name="uid" class="form-control" id="url-box" placeholder="Enter user ID..." style="max-width: 300px;"></td>

<td><button type="submit" class="btn btn-default" name="Requ" value="Info"><img src="Static/images/vklogo.png" alt="Vk" style="vertical-align:middle">Retrieve information</button></td>

</form>

<br>

{% for error in errors %}

<h4>{{ error }}</h4>

{% endfor %}

<br>

{% if status=="Data is loaded" %}

<h2><img src="Static/images/ok.png" alt="Ok" style="vertical-align:middle">{{ status }}</h2>

<progress id="progressbar" value="100" max="100"></progress>

<h4>Processing time = {{ timepassed }}</h4>

<h4>Number of friends = {{ nfriends }}</h4>

<h4>Number of people = {{ tpeople }}</h4>

<h4>Number of edges = {{ nlinks }}</h4>

<br>

</div>

<div class="col-lg-4">

<h2>Local Clustering Coefficient</h2>

<table border="1" cellspacing="5">

<tr>

<th><b>User ID</b></th>

<th><b>LCC</b></th>

</tr>

{% for ulc in lc %}

<tr>

<td>{{ ulc[0] }}</td>

<td width="30">{{ ulc[1] }}</td>

</tr>

{% endfor %}

</table>

</div>

<div class="col-lg-4">

<h2>Eigenvector Centrality</h2>

<table border="1" cellspacing="5">

<tr>

<th><b>User ID</b></th>

<th><b>E-C</b></th>

</tr>

{% for uec in eic %}

<tr>

<td>{{ uec[0] }}</td>

<td>{{ uec[1] }}</td>

</tr>

{% endfor %}

</table>

</div>

</div>

<div class="row">

<div class="col-lg-6" id="graph" style="border: solid 1px black;height: 1000px;">

<h2>Graph</h2>

</div>

<div class="col-lg-3">

<h2>PageRank</h2>

{% if pr %}

<table border="1" cellspacing="5">

<tr>

<th><b>User ID</b></th>

<th><b>PageRank</b></th>

</tr>

{% for upr in pr %}

<tr>

<td>{{ upr[0] }}</td>

<td>{{ upr[1] }}</td>

</tr>

{% endfor %}

</table>

{% endif %}

<br>

<h2>SimRank</h2>

{% if pr %}

<table border="1" cellspacing="5">

<tr>

<th><b>User ID</b></th>

<th><b>SimRank</b></th>

</tr>

{% for usr in sr %}

<tr>

<td>{{ usr[0] }}</td>

<td>{{ usr[1] }}</td>

</tr>

{% endfor %}

</table>

{% endif %}

</div>

<div class="col-lg-3">

<h2>InterestRank</h2>

{% if ijac %}

<table border="1" cellspacing="5">

<tr>

<th><b>User ID</b></th>

<th><b>InterestRank</b></th>

</tr>

{% for uj in ijac %}

<tr>

<td>{{ uj[0] }}</td>

<td>{{ uj[1] }}</td>

</tr>

{% endfor %}

</table>

{% endif %}

</div>

{% endif %}

</div>

{% if status=="Data is loaded" %}

<script>

var width = 960,

height = 500;

var color = d3.scale.category20();

var force = d3.layout.force()

.linkDistance(10)

.linkStrength(2)

.size([width, height]);

var svg = d3.select("#graph").append("svg")

.attr("width", width)

.attr("height", height);

//d3.json("Static/44687877.json", function(error, graph) {

var d3Data1 = {{ d3Data }}.toString().replace(/&#39;/g,"'");

root = JSON.parse(d3Data1);

if (error) throw error;

force

.nodes(graph.nodes)

.links(graph.links)

.start();

var link = svg.selectAll(".link")

.data(bilinks)

.enter().append("path")

.attr("class", "link");

var node = svg.selectAll(".node")

.data(graph.nodes)

.enter().append("circle")

.attr("class", "node")

.attr("r", 5)

.style("fill", function(d) { return color(d.group); })

.call(force.drag);

node.append("title")

.text(function(d) { return d.name; });

force.on("tick", function() {

link.attr("d", function(d) {

return "M" + d[0].x + "," + d[0].y

+ "S" + d[1].x + "," + d[1].y

+ " " + d[2].x + "," + d[2].y;

});

node.attr("transform", function(d) {

return "translate(" + d.x + "," + d.y + ")";

});

});

//});

</script>

{% endif %}

</body>

</html>

server.py

# -*- coding: utf-8 -*-

import sys, traceback

import re

import os

from flask import Flask, render_template, request, redirect

import networkx as nx

import time

import retrieve

import graph

app = Flask(__name__, static_url_path = "/Static", static_folder = "Static")

@app.route('/', methods=['GET', 'POST'])

@app.route('/index', methods=['GET', 'POST'])

def index():

errors = []

results = []

mutual={}

nfriends=0

tpeople=0

nlinks=0

VkG=nx.Graph()

status=""

pr=[]

lc=[]

eic=[]

sr=[]

ijac=[]

d3Data={}

timepassed=0

if request.method == "POST":

errors=[]

if request.form['Requ']=="Info":

status="Data is loading, please wait"

time1=time.time()

try:

uid = int(request.form['uid'])

if uid < 1 or uid > 1000000000:

raise Exception()

friends=retrieve.getFriends(uid)

nfriends=len(friends)

time.sleep(5)

mutual=retrieve.getMutual(uid,friends)

VkG=graph.SocialGraph(uid,friends,mutual)

eic=graph.EigenCentr(VkG)

lc=graph.LocalCluster(VkG)

pr=graph.PageRank(VkG)

sr=graph.SimRank(uid,VkG)

tpeople=VkG.number_of_nodes()

nlinks=VkG.number_of_edges()

timepassed=time.time()-time1

d3Data=str(graph.D3Data(uid,VkG))

ijac=retrieve.getInterests(uid,friends)

status="Data is loaded"

except:

errors.append(sys.exc_info()[0])

return render_template('index.html', errors=errors)

if request.form['Requ']=="PR":

pr=graph.PageRank(VkG)

return render_template('index.html', errors=errors, results=results, nfriends=nfriends, lc=lc, pr=pr, status=status, timepassed=timepassed, tpeople=tpeople, nlinks=nlinks, mutual=mutual, eic=eic, sr=sr, d3Data=d3Data, ijac=ijac)

if __name__ == "__main__":

app.run(debug=False)

Размещено на Allbest.ru

...

Подобные документы

  • The history of the English language. Three main types of difference in any language: geographical, social and temporal. Comprehensive analysis of the current state of the lexical system. Etymological layers of English: Latin, Scandinavian and French.

    реферат [18,7 K], добавлен 09.02.2014

  • What is social structure of the society? The concept of social structure was pioneered by G. Simmel. The main attributes of social structure. Social groupings and communities. Social status. Structural elements of the society’s fundamental institutions.

    реферат [25,4 K], добавлен 05.01.2009

  • Defining cognitive linguistics. The main descriptive devices of frame analysis are the notions of frame and perspective. Frame is an assemblage of the knowledge we have about a certain situation, e.g., buying and selling. Application of frame analysis.

    реферат [324,4 K], добавлен 07.04.2012

  • Methodological characteristics of the adaptation process nowadays. Analysis of the industrial-economic activity, the system of management and the condition of adaptation process. Elaboration of the improving project of adaptation in the Publishing House.

    курсовая работа [36,1 K], добавлен 02.04.2008

  • The process of scientific investigation. Contrastive Analysis. Statistical Methods of Analysis. Immediate Constituents Analysis. Distributional Analysis and Co-occurrence. Transformational Analysis. Method of Semantic Differential. Contextual Analysis.

    реферат [26,5 K], добавлен 31.07.2008

  • The analysis of four functions of management: planning, organizing, directing, controlling; and the main ways of improving functions of management. Problems with any one of the components of the communication model. The control strategies in management.

    контрольная работа [30,1 K], добавлен 07.05.2010

  • Social interaction and social relation are identified as different concepts. There are three components so that social interaction is realized. Levels of social interactions. Theories of social interaction. There are three levels of social interactions.

    реферат [16,8 K], добавлен 18.01.2009

  • Some important theories of globalization, when and as this process has begun, also its influence on our society. The research is built around Urlich Beck's book there "Was ist Globalisierung". The container theory of a society. Transnational social space.

    курсовая работа [24,5 K], добавлен 28.12.2011

  • Understanding of the organization and its structure. Any organization has its structure. Organizational structure is the way in which the interrelated groups of the organization are constructed. Development of management on the post-Soviet area.

    реферат [24,7 K], добавлен 18.01.2009

  • American Culture is a massive, variegated topic. The land, people and language. Regional linguistic and cultural diversity. Social Relationships, the Communicative Style and the Language, Social Relationships. Rules for Behavior in Public Places.

    реферат [35,1 K], добавлен 03.04.2011

  • The subjective aspects of social life. Social process – those activities, actions, operations that involve the interaction between people. Societal interaction – indirect interaction bearing on the level of community and society. Modern conflict theory.

    реферат [18,5 K], добавлен 18.01.2009

  • Characteristics of Project Work. Determining the final outcome. Structuring the project. Identifying language skills and strategies. Compiling and analysing information. Presenting final product. Project Work Activities for the Elementary Level.

    курсовая работа [314,5 K], добавлен 21.01.2011

  • The corporate development history and current situation strategy of the Computacenter. Opportunities and threats for Computacenter on the analysis of IT-industry and macro-environmental analysis. The recommendations for the future strategic direction.

    контрольная работа [27,5 K], добавлен 17.02.2011

  • Political power as one of the most important of its kind. The main types of political power. The functional analysis in the context of the theory of social action community. Means of political activity related to the significant material cost-us.

    реферат [11,8 K], добавлен 10.05.2011

  • The place and role of contrastive analysis in linguistics. Analysis and lexicology, translation studies. Word formation, compounding in Ukrainian and English language. Noun plus adjective, adjective plus adjective, preposition and past participle.

    курсовая работа [34,5 K], добавлен 13.05.2013

  • Origin of the comparative analysis, its role and place in linguistics. Contrastive analysis and contrastive lexicology. Compounding in Ukrainian and English language. Features of the comparative analysis of compound adjectives in English and Ukrainian.

    курсовая работа [39,5 K], добавлен 20.04.2013

  • The study of the functional style of language as a means of coordination and stylistic tools, devices, forming the features of style. Mass Media Language: broadcasting, weather reporting, commentary, commercial advertising, analysis of brief news items.

    курсовая работа [44,8 K], добавлен 15.04.2012

  • Development of harmonious and competent personality - one of main tasks in the process of teaching of future teachers. Theoretical aspects of education and competence of teacher of foreign language are in the context of General European Structure.

    контрольная работа [12,2 K], добавлен 16.05.2009

  • Systematic framework for external analysis. Audience, medium and place of communication. The relevance of the dimension of time and text function. General considerations on the concept of style. Intratextual factors in translation text analysis.

    курс лекций [71,2 K], добавлен 23.07.2009

  • Contradiction between price and cost of labor between the interests of employees and employers. Party actors and levels of social and labor relations. Basic blocks problem: employment, work organization and efficiency, the need for economic growth.

    реферат [19,7 K], добавлен 10.05.2011

Работы в архивах красиво оформлены согласно требованиям ВУЗов и содержат рисунки, диаграммы, формулы и т.д.
PPT, PPTX и PDF-файлы представлены только в архивах.
Рекомендуем скачать работу.