I hereby claim:
- I am DomWilliams0 on github.
- I am domwilliams0 (https://keybase.io/domwilliams0) on keybase.
- I have a public key whose fingerprint is 36B5 EB10 9835 6E7B A795 8AC1 1E6D A1A8 6369 CBC8
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| import random | |
| import string | |
| from time import sleep | |
| POSSIBLE_CHARS = string.ascii_letters + string.punctuation + " " | |
| def evolve(population, pop_count, crossover_mutation_ratio): | |
| def swap(src, dst, i, j=None): |
| import random | |
| from time import sleep | |
| moves = ["rock", "paper", "scissors"] | |
| choices = [x[0] for x in moves] | |
| WIN, LOSS, DRAW = "WIN", "LOSS", "DRAW" | |
| player_score = 0 | |
| computer_score = 0 |
| import urllib.request | |
| import re | |
| import os | |
| import glob | |
| def fetch_repos(outputpath): | |
| print("fetching repo names from github") | |
| pages = list(range(1, 10)) | |
| pat = re.compile("/tenjava/(.+\-t[1-3])\"") |
| /** | |
| * @param str The string to wrap | |
| * @param colourCode The colour code character to use, such as '&' or '§' | |
| * @param lineLength The line length to base around - not all lines will be this length exactly | |
| * @param wrapLongWords Whether long words should be cut up to fit the lines | |
| * @return The wrapped string, divided by new line characters | |
| */ | |
| public static String wrapString(String str, char colourCode, int lineLength, boolean wrapLongWords) | |
| { | |
| // split up into words |
| /* | |
| Example: | |
| new BukkitRunnable() | |
| { | |
| Scroller scroller = new Scroller("&aThis is an &2important &amessage!", 16, 5, '&'); | |
| Sign sign = a-sign-from-somewhere; | |
| public void run() | |
| { |
| /* | |
| Example: | |
| --- | |
| List<String> scrolling = scroll("This is a scrolling string!", 10, 5); | |
| int i = 0; | |
| while (true) | |
| { | |
| System.out.println(scrolling.get(i++ % scrolling.size())); | |
| // some delay |