Guest User

Untitled

a guest
Nov 22nd, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. import networkx as nx
  2. from networkx.algorithms.approximation import clique
  3.  
  4. G = nx.read_adjlist("newman_one_mode.adj")
  5. print "the number of nodes in the graph is: " + str(G.number_of_nodes())
  6. max_clique_nodes = clique.max_clique(G)
  7. print "the clique nodes are: " + str(max_clique_nodes)
  8.  
  9. cpulimit -p 29780 -l 60
  10.  
  11. [lily@geland academic]$ python run.py
  12. the number of nodes in the graph is: 16264
  13.  
  14. [1]+ Stopped python run.py
  15.  
  16. [lily@geland academic]$ python run.py
  17. the number of nodes in the graph is: 16264
  18. [1]+ Terminated python run.py
  19. Killed
  20.  
  21. $ cat waster
  22. #!/bin/sh
  23. dd if=/dev/zero of=/dev/null count=${1}000000
  24.  
  25. $ time ./waster 5 # takes about 3.7 seconds on my machine
  26. $ time ./waster 10 # takes about 7.4 seconds, no surprise
  27.  
  28. $ time ./waster 5 & time ./waster 10 &
  29.  
  30. $ time ./waster 5 & time nice -n 19 ./waster 10 &
Add Comment
Please, Sign In to add comment