This file contains 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
// Yet another g()('al') solution | |
// https://github.com/eatnumber1/goal | |
var g = function (str, calls) { | |
calls = calls || 0; | |
if (str) { | |
return 'g' + Array(calls + 1).join('o') + str; | |
} |
This file contains 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
from __future__ import division | |
import random | |
import sys | |
import math | |
def main(): | |
# The first command line argument defines the number of iterations | |
# of the algorithm. The default value is 400. | |
if len(sys.argv) > 1: |