use

```python
cpu_freq = f.read()/1000.0
```

instead?