Skip to content

Instantly share code, notes, and snippets.

View mathieumandret's full-sized avatar

Mathieu Mandret mathieumandret

  • Toulouse, France
View GitHub Profile
# Splits
bind v split-window -v
bind s split-window -h
# Vi commands
setw -g mode-keys vi
set -sg escape-time 0
# Colors
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))
#!/bin/bash
wget -q --tries=10 --timeout=20 --spider http://google.com
if [[ $? -eq 0 ]]; then
echo "Online"
else
echo "Offline"
fi