到目前为止,我已经在堆栈上覆盖了大量的内容,试图让ffmpeg继续下去,这样我就可以制作一个间隔拍摄视频.
我在CentOS 7机器上运行python3.7.0a0.
python3
>>> import numpy as np
>>> np.__version__
'1.12.0'
>>> import matplotlib as mpl
>>> mpl.__version__
'2.0.0'
>>> import mpl_toolkits.basemap as base
>>> base.__version__
'1.0.7'
Run Code Online (Sandbox Code Playgroud)
我在安装ffmpeg时找到了这个github要点.我使用了铬源,并且没有prefix选项安装(使用默认值).
我已经确认安装了ffmpeg,虽然我不知道测试它是否有效.
which ffmpeg
/usr/local/bin/ffmpeg
ffmpeg -version
ffmpeg version N-83533-gada281d Copyright (c) 2000-2017 the FFmpeg dev elopers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-11
configuration:
libavutil 55. 47.100 / 55. 47.100
libavcodec 57. 80.100 / 57. 80.100
libavformat 57. 66.102 / 57. 66.102
libavdevice …Run Code Online (Sandbox Code Playgroud) 我正在使用seaborn.distplot(python3) 并希望每个系列有 2 个标签。
我尝试了一个像这样的hacky字符串格式方法:
# bigkey and bigcount are longest string lengths of my keys and counts
label = '{{:{}s}} - {{:{}d}}'.format(bigkey, bigcount).format(key, counts['sat'][key])
Run Code Online (Sandbox Code Playgroud)
在文本固定宽度的控制台中,我得到:
(-inf, 1) - 2538
[1, 3) - 7215
[3, 8) - 40334
[8, 12) - 20833
[12, 17) - 6098
[17, 20) - 499
[20, inf) - 87
Run Code Online (Sandbox Code Playgroud)
我假设图中使用的字体不是固定宽度,所以我想知道是否有一种方法可以指定我的图例具有 2 个对齐列的标签,并且可能为kwarg(或任何有效)调用seaborn.distplota .tuplelabel
我的情节供参考:
看起来不错,但我真的希望每个系列的 2 个标签以某种方式对齐。
(define (BOR x y)
(cond
((equal? x #t) #t)
((equal? y #t) #t)
(else #f))
)
(define (reduce op list)
(cond
((null? list)
(cond
((BOR (equal? op +) (equal? op -)) 0)
((BOR (equal? op *) (equal? op /)) 1)
((equal? op BOR) #f)
((equal? op BAND) #t)
(else #f)))
(else (op (car list) (reduce op (cdr list)))))
)
(display (reduce + '(1 2 3 4 5)))
(newline)
(display (reduce - '(100 20 30)))
(newline)
Run Code Online (Sandbox Code Playgroud)
我包括“BOR”以提高可见性。这是我的输出:
120
110
Run Code Online (Sandbox Code Playgroud)
看来我的定义是有效的,但没有按照我的意愿评估减法和除法。我尝试删除 BOR,在检查空列表后留下 …