forked from dpwe/audfprint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
24 additions
and
14 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,25 +7,34 @@ | |
2014-05-26 Dan Ellis [email protected] | ||
""" | ||
from __future__ import division, print_function | ||
|
||
import resource # for checking phys mem size | ||
import os | ||
import time | ||
|
||
import librosa | ||
import psutil | ||
import matplotlib.pyplot as plt | ||
import librosa | ||
import numpy as np | ||
import scipy.signal | ||
|
||
import audfprint_analyze # for localtest and illustrate | ||
import audio_read | ||
|
||
|
||
def process_info(): | ||
rss = usrtime = 0 | ||
p = psutil.Process(os.getpid()) | ||
if os.name == 'nt': | ||
rss = p.memory_info()[0] | ||
usrtime = p.cpu_times()[0] | ||
else: | ||
rss = p.get_memory_info()[0] | ||
usrtime = p.get_cpu_times()[0] | ||
return rss, usrtime | ||
|
||
|
||
def log(message): | ||
""" log info with stats """ | ||
print(time.ctime(), | ||
"physmem=", resource.getrusage(resource.RUSAGE_SELF).ru_maxrss, | ||
"utime=", resource.getrusage(resource.RUSAGE_SELF).ru_utime, | ||
message) | ||
print('%s physmem=%s utime=%s %s' % (time.ctime(), process_info())) | ||
|
||
|
||
def encpowerof2(val): | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
librosa | ||
numpy | ||
scipy | ||
docopt | ||
joblib | ||
psutil |