MrSlippery

Python Ill Iteration

Nov 16th, 2016
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.48 KB | None | 0 0
  1. #!/bin/bash
  2. OUTFILE=~/.illiteration.py
  3. (
  4. cat <<'EOF'
  5. from random import shuffle
  6.  
  7. try:
  8.     import __builtin__ as builtins
  9. except ImportError:
  10.     import builtins
  11.  
  12. _range = range
  13. def randomly(low, high=None):
  14.     if high is None:
  15.         high = low
  16.         low = 0
  17.     lst = _range(low, high)
  18.     shuffle(lst)
  19.     return lst
  20.  
  21. builtins.range = randomly
  22. EOF
  23. ) > $OUTFILE
  24. echo "export PYTHONSTARTUP=$OUTFILE" >> ~/.bashrc
  25. echo "export PYTHONSTARTUP=$OUTFILE" >> ~/.bash_profile
Advertisement
Add Comment
Please, Sign In to add comment