This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Splits | |
| bind v split-window -v | |
| bind s split-window -h | |
| # Vi commands | |
| setw -g mode-keys vi | |
| set -sg escape-time 0 | |
| # Colors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def crossover(self, parent1, parent2): | |
| # new child Route() | |
| child_rt = Route() | |
| for x in range(0,len(child_rt.route)): | |
| child_rt.route[x] = None | |
| # Two random integer indices of the parent1: | |
| start_pos = random.randint(0,len(parent1.route)) | |
| end_pos = random.randint(0,len(parent1.route)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| wget -q --tries=10 --timeout=20 --spider http://google.com | |
| if [[ $? -eq 0 ]]; then | |
| echo "Online" | |
| else | |
| echo "Offline" | |
| fi |