Linux monitoring commands

Posted in linux | Leave a comment

Google assistant sdk on raspberry pi

If you get this nasty exception, follow this link.

Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/pi/env/lib/python3.4/site-packages/googlesamples/assistant/__main__.py", line 320, in <module>
    main()
  File "/home/pi/env/lib/python3.4/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/pi/env/lib/python3.4/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/pi/env/lib/python3.4/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/pi/env/lib/python3.4/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/pi/env/lib/python3.4/site-packages/googlesamples/assistant/__main__.py", line 272, in main
    flush_size=audio_flush_size
  File "/home/pi/env/lib/python3.4/site-packages/googlesamples/assistant/audio_helpers/__init__.py", line 179, in __init__
    blocksize=int(block_size/2),  # blocksize is in number of frames.
  File "/home/pi/env/lib/python3.4/site-packages/sounddevice.py", line 1491, in __init__
    **_remove_self(locals()))
  File "/home/pi/env/lib/python3.4/site-packages/sounddevice.py", line 1017, in __init__
    'Error opening {0}'.format(self.__class__.__name__))
  File "/home/pi/env/lib/python3.4/site-packages/sounddevice.py", line 2671, in _check
    raise PortAudioError(msg)
sounddevice.PortAudioError: Error opening RawStream: Invalid sample rate
Posted in linux, rpi | Tagged , | Leave a comment

fix matplotlib problem on mac

  • Create a file ~/.matplotlib/matplotlibrc there and add the following code: backend: TkAgg
Posted in Uncategorized | Tagged , , | Leave a comment

the world of emoji

http://unicode.org/emoji/charts/full-emoji-list.html

Posted in Uncategorized | Leave a comment

GeForce GTX specs

Model Cores Memory, GB Bandwidth, GB/s Price (used), $ Price/core, cents Price/GB, $
660 960 2 144 60 6 30
770 1536 4 224 150 10 38
780 ti 2880 3 336 160 6 53
680 1536 4 192 210 13 53
980 ti 2816 6 336 300 11 50
1070 1920 8 256 315 16 40
Titan 2688 6 288 400 15 67
1080 2560 8 320 440 17 55
Titan X 3072 12 336 435 14 36
1080 ti 3584 11 484 700 (new) 20 64

Compute capabilities: Titan X (5.2), 1080 (6.1), 780ti (3.5)

Posted in Uncategorized | Leave a comment

GPU price performance comparison

recently upgrade my gpu, and made some simple benchmarking for three cards: GTX 660, 1070, 1080
Benchmarking with training models: https://github.com/OpenNMT/OpenNMT-py.
Dataset used was 3Gb, 660 has 2G internal memory, 1080/1070 have 8G. Pricing is for used cards on ebay.


gpu time price cores
660 1978s $70 960
1070 807s $315 1920
1080 636s $440 2560

Here is ratio of the pairwise comparisons:

cards     performance cores price
1070/660  2.5         2     4.5
1080/660  3.1         2.6   6.2
1080/1070 1.3         1.3   1.4

Among newly released cards performance and pricing seem to be in accordance, but compared to old cards, new ones are much more expensive than the gain you get in performance. Maybe using larger datasets will make the differences more dramatic.

Posted in linux, Uncategorized | Tagged | Leave a comment

home temperature monitoring

Esp8266

Posted in Uncategorized | Leave a comment