Skip to content

Instantly share code, notes, and snippets.

View yashgyy's full-sized avatar
😀

Yash Singhal yashgyy

😀
View GitHub Profile
library(igraph)
library(ggplot2)
library(dplyr)
read.csv("socidataset.csv") -> a
ggplot(aes(Sign),data=a)+geom_bar(fill=c("Red","Green"))+labs(title="Trust and Distrust")
sort(table(a$X..FromNodeId),decreasing=T)[1:10] -> Top
barplot(Top,space = 0.5,main = "Nodes Having highest out Degree")
sort(table(a$ToNodeId),decreasing=T)[1:10] -> L2
from itertools import combinations
Mutate=[]
for Value1,Value2 in list(combinations(Listing),r=2):
nums=numpy.random.choice([0,1],size=34)
Tupple=[Value1[i] if nums[i]==0 else Value2[i] for i in range(len(nums))]
Mutate.append(Tupple)
Listing2=[]
for j in Mutate:
@yashgyy
yashgyy / Pattern.java
Created November 24, 2018 17:34
Pattern Java Inverted Py
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{