social-networking

Notification and News Area by using Redis

纵然是瞬间 提交于 2021-02-11 18:16:17
问题 I have a photo album system which people can upload photos and interract with other users. I use mySql and Redis to handle traffic and store the data. In my system, users can follow other users, like photos, comment on them and upload new photos. In this scenario, I want to show all events from user's followings on their wall (like facebook timeline). For example, I follow users 30,40,50,60,70 and 80 ids. Whenever they add a new photo, I would like to see them on my wall. The problem is this

Create Edge List From Ragged Data Frame in R (for network analysis)

自古美人都是妖i 提交于 2021-01-28 19:45:08
问题 I have a ragged data frame with each row as an occurrence in time of one or more entities, like so: (time1) entitya entityf entityz (time2) entityg entityh (time3) entityo entityp entityk entityL (time4) entityM I want to create an edge list for network analysis from a subset of entities found in a second vector (nodelist). My problem is that I don't know: 1). How to subset only the entities in the nodelist. I was considering datanew<- subset(dataold, dataold %in% nodelist) but it doesn't

Twython with 140 character limitation of twitter

折月煮酒 提交于 2021-01-28 05:43:19
问题 I am trying to search in twitter using Tython, but it seems that the library has a limitation on 140 characters. With the new feature of python, i.e. 280 characters length, what can one do? 回答1: This is not a limitation of Twython. The Twitter API by default returns the old 140-character limited tweet. In order to see the newer extended tweet you just need to supply this parameter to your search query: tweet_mode=extended Then, you will find the 280-character extended tweet in the full_text

How to set the resolution parameter for Louvain modularity in igraph?

风格不统一 提交于 2021-01-21 09:26:17
问题 is there a way to set the resolution parameter when using the function cluster_louvain to detect communities in igraph for R? It makes a lot of difference for the result, as this parameter is related to the hierarchical dissimilarity between nodes. Thank you. 回答1: The easiest way to do it is through the resolution package, available in this link https://github.com/analyxcompany/resolution It is based on this paper http://arxiv.org/pdf/0812.1770.pdf It pretty much has 2 functions cluster