How do I enable FFMPEG logging and where can I find the FFMPEG log file?

FFmpeg does not write to a specific log file, but rather sends its output to standard error. To capture that, you need to either capture and parse it as it is generated redirect standard error to a file and read that afterward the process is finished Example for std error redirection: ffmpeg -i myinput.avi {a-bunch-of-important-params} … Read more

What is the normal chmod?

Here’s a summary that I have gathered: Usage: chmod <number> <filename> chmod all files to 644 chmod all .htaccess files to 644 chmod all robots.txt files to 644 chmod all directories to 711 chmod all directories with directory listing (.htaccess Options +Indexes) to 755 chmod all directories that users can upload files to, to 755 … Read more

Buffered files (for faster disk access)

Windows file caching is very effective, especially if you are using Vista or later. TFileStream is a loose wrapper around the Windows ReadFile() and WriteFile() API functions and for many use cases the only thing faster is a memory mapped file. However, there is one common scenario where TFileStream becomes a performance bottleneck. That is … Read more

Is it possible to read categorical columns with pandas’ read_csv?

In version 0.19.0 you can use parameter dtype=”category” in read_csv: data=”col1,col2,col3\na,b,1\na,b,2\nc,d,3″ df = pd.read_csv(pd.compat.StringIO(data), dtype=”category”) print (df) col1 col2 col3 0 a b 1 1 a b 2 2 c d 3 print (df.dtypes) col1 category col2 category col3 category dtype: object If want specify column for category use dtype with dictionary: df = pd.read_csv(pd.compat.StringIO(data), … Read more