![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
A package designed to be used to research the development of multilayer Reddit discussion networks
This package contains most of the key code that I used in the first half of 2023 for the Reddit Deliberation Project. The fucntions are explained here, guides for setting up variables to be compatible with these functions are explained, and an example is given at the bottom. Any code that I used that isn't here was already part of another package, like matplotlib or networkx.
In order to be compatible with the code as I have written it, I would recommend following this set up. Use the following code to initialise your actor and comments lists:
actorList = [i for i in range(noActors)]
commentsList = [i for i in range(noActors,(noActors+timeSteps))]
This ensures that each potential actor and potential comment are initialised in advance, which was one of the properties of the method I used, and it means each actor and comment's ID matches its row/column in the adjacency array. This code is captured in the function initialise_lists for convenience.
The commentOwnersList is a list that contains each actor who posted a comment in the order that they posted them. The index of each actor corresponds to the index of the comment in the commentList that they posted.
Functions for the actor layer measures are all contained in the Network X package, and are listed below:
cliques = len(list(nx.enumerate_all_cliques(A.to_undirected())))
transitivity = nx.transitivity(A)
reciprocity = nx.overall_reciprocity(A)
clustering = nx.average_clustering(A)
I used matplotlib and Gephi for all the graphing and visuals. A tutorial for the 95% confidence elipses is under this link https://matplotlib.org/stable/gallery/statistics/confidence_ellipse.html, since that took me longer to find on account of being in the examples section of the documentation, rather than the reference.
activation(binsList):
A fucntion that choses an actor for activation.
uniform_bins(n):
A fucntion that creates the binsList for uniform activation.
zipfs_bins(n, s):
A fucntion that creates the binsList for Zipf's Law activation.
uniform_selection(allCurrentComments):
A function for choosing a comment with uniform selection.
barabasi_albert_selection(commentNetwork, allCurrentComments):
A function for choosing a comment with Barabasi-Albert selection.
bianconi_barabasi_layer_selection(commentNetwork, allCurrentComments):
A function for choosing a comment with level selection.
bianconi_barabasi_recency_selection(commentNetwork, allCurrentComments):
A function for choosing a comment with recency selection.
generalised_harmonic_sum(N,s):
A function to find the generalised harmonic sum.
initialise_lists(nActors, tSteps):
A function to initialise the actor and comments lists for a predetermined number of actors and comments.
iterate_reddit_network(currentTimeStep, adjacencyMatrix, activatedActor, selectedCommentValue, commentOwnersList, commentsList):
A function that receives the activated actor and selected commennt and updates the adjacency matrix accordingly.
width_and_depth(rootNode, commentsGraph):
A function to find the mean and maximum width and depth measures from a discussion layer graph.
standard_actsecmodel(tSteps, nActors, aBinsList, selectionType):
The function I used in my model, that completely iterates through a set number of timesteps, for a set number of actors, for the activation and selection types available in this package.
# INITIALISING
timeSteps = 25
noActors = 20
actorList = [i for i in range(noActors)]
commentsList = [i for i in range(noActors,(noActors+timeSteps))]
adjacencyMatrix = np.zeros((noActors+timeSteps,noActors+timeSteps)) #adjacencyMatrix[pointing to][pointing away from]
adjacencyMatrix[noActors][0] += 1
G = nx.from_numpy_array(adjacencyMatrix, create_using=nx.DiGraph)
commentOwners = [0]
binsList = zipfs_bins(noActors, 1) #If activation depends on the state of the graph, move to within iterations
widthDepthArray = np.zeros((timeSteps, 4))
# ITERATIONS
for t in range(1, timeSteps):
# ACTIVATION
currentActor = activation(binsList)
# SELECTION
tempCommentsList = (commentsList[0:t]) #A temporary comment list is created so that it's only as long as the current number of comments
targetCommentValue = barabasi_albert_selection(G.subgraph(tempCommentsList), tempCommentsList)
# UPDATE MATRIX AND GRAPH
adjacencyMatrix = iterate_reddit_network(t, adjacencyMatrix, currentActor, targetCommentValue, commentOwners, commentsList)
G = nx.from_numpy_array(adjacencyMatrix, create_using=nx.DiGraph)
C = G.subgraph(commentsList)
# WIDTH, DEPTH, OR OTHER MEASURES
tempWidthDepth = width_and_depth(commentsList[0], C)
for j in range(4):
widthDepthArray[t][j] = tempWidthDepth[j]
# RESULTS
print(widthDepthArray)
FAQs
A package designed to be used to research the development of multilayer Reddit discussion networks
We found that actsecmodel demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.