Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import networkx as nx
- from networkx.algorithms.approximation import clique
- G = nx.read_adjlist("newman_one_mode.adj")
- print "the number of nodes in the graph is: " + str(G.number_of_nodes())
- max_clique_nodes = clique.max_clique(G)
- print "the clique nodes are: " + str(max_clique_nodes)
- cpulimit -p 29780 -l 60
- [lily@geland academic]$ python run.py
- the number of nodes in the graph is: 16264
- [1]+ Stopped python run.py
- [lily@geland academic]$ python run.py
- the number of nodes in the graph is: 16264
- [1]+ Terminated python run.py
- Killed
- $ cat waster
- #!/bin/sh
- dd if=/dev/zero of=/dev/null count=${1}000000
- $ time ./waster 5 # takes about 3.7 seconds on my machine
- $ time ./waster 10 # takes about 7.4 seconds, no surprise
- $ time ./waster 5 & time ./waster 10 &
- $ time ./waster 5 & time nice -n 19 ./waster 10 &
Add Comment
Please, Sign In to add comment