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
def grouper(n, iterable): | |
''' | |
Given an iterable, it'll return size n chunks per iteration. | |
Handles the last chunk too. | |
''' | |
it = iter(iterable) | |
while True: | |
chunk = tuple(itertools.islice(it, n)) | |
if not chunk: | |
return |
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
''' | |
Pynger: | |
App that pings a given IP address and saves the pings in the file. | |
Usage: | |
pynger.py [ip] | |
ip: the IP address to be pinged. If this is left empty it will default to | |
the ADSL router I hit first. |
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
#!/bin/bash | |
f2py -c -m deeming periodogram.f90 -lgomp | |
f2py -c -m deemingomp periodogram.f90 --f90flags="-fopenmp " -lgomp |