Brz pristup Stack Overflowu iz terminala


#1

Svi znamo i volimo Stack Overflow! Kako pristupiti odgovorima direktno iz terminala? Do sad sam koristio prilično zgodan Python cli programčić howdoi.

$ pip install howdoi # instalacija
# ...
$ howdoi -a python function run for loop for a certain duration
stop = time.time()+10000
while time.time() < stop:
  do things
This requires that each run through the loop is sufficiently short so that you read the current time often enough (for the preciseness that you want to achieve).
---
Answer from http://stackoverflow.com/questions/4553269/python-running-a-loop-during-a-precise-duration

Danas je na Hacker Newsu, doduše, osvanula još jedna opcija koja se čini čak i nešto moćnija – how2. Instalira se kao node modul (npm install -g how2), a napravili su zgodan demo primjerak.