<commit_before>#!/usr/bin/env python
# coding=utf-8

import matplotlib.pyplot as plt
import networkx as nx
import numpy as np

node_num = 20
m = 15
# Scale free network, BA
G_scale = nx.barabasi_albert_graph(node_num, m)
G_scale_degree = np.array(G_scale.degree().values())
largenode = np.where(G_scale_degree>m)[0]
pos = nx.random_layout(G_scale)
nx.draw(G_scale, pos, node_color = 'r')
nx.draw_networkx_nodes(G_scale, pos, nodelist=largenode.tolist(), node_color='b')
plt.show()
plt.hist(G_scale_degree)
plt.show()<commit_msg>improve visualization of graph<commit_after>#!/usr/bin/env python
# coding=utf-8

import matplotlib.pyplot as plt
import networkx as nx
import numpy as np

node_num = 20
m = 6
# Scale free network, BA
G_scale = nx.barabasi_albert_graph(node_num, m)
G_scale_degree = np.array(G_scale.degree().values())
largenode = np.where(G_scale_degree>0.8*node_num)[0]
pos = nx.random_layout(G_scale)
plt.figure()
nx.draw(G_scale, pos, node_color = 'r')
nx.draw_networkx_nodes(G_scale, pos, nodelist=largenode.tolist(), node_color='b')
plt.show()
plt.figure()
nx.draw(G_scale, pos, node_color = 'r')
plt.show()
plt.figure()
plt.hist(G_scale_degree)
plt.show()
{'fraction_non_alphanumeric': 0.14151747655583974, 'fraction_numerical': 0.011082693947144074, 'mean_word_length': 6.383647798742138, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6782510', 'n_tokens_mistral': 494, 'n_tokens_neox': 469, 'n_words': 96}