📜 ⬆️ ⬇️

Himself Santa Claus


Darius Kazemi ( Darius Kazemi ), a programmer from the United States decided to diversify his life with gifts ... to himself. But since in this case the zest is lost in the form of a surprise from an unknown gift, he decided to buy presents using a handwritten script, calling it Amazon Random Shopper .
As the name implies, after launch, the program takes a random word from the Wordnik API and searches Amazon for products for this keyword. If it is a book, CD or DVD and costs less than the budget it has laid, then the program buys this product. The program works in a cycle until it spends the entire budget or does not buy a certain number of gifts. The fact that he bought the script, he finds out only after receiving the goods by mail.

In the first two gifts that the script bought him, there was Noam Chomsky's Cartesian Linguistics book and a CD with songs by Swedish musician Ákos Rózmann (some kind of brain break and not music , he especially liked this track ).
Darius was satisfied with the experiment and plans to run his script every month.
An example of the script:


')

Source: https://habr.com/ru/post/159551/


All Articles