This file contains hidden or 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
| # Convert abcd into 0xab, 0xcd | |
| reduce(lambda x, y : x + y, map(lambda x : '0x' + x + ', ', map(''.join, zip(*[iter(str)] * 2)))) |
This file contains hidden or 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
| /* | |
| * starter_video.cpp | |
| * | |
| * Created on: Nov 23, 2010 | |
| * Author: Ethan Rublee | |
| * | |
| * Modified on: April 17, 2013 | |
| * Author: Kevin Hughes | |
| * | |
| * A starter sample for using OpenCV VideoCapture with capture devices, video files or image sequences |
This file contains hidden or 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
| ldd file | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' /destination |
This file contains hidden or 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
| rename 's/(.*\.wav)2016.*/$1/g' *.wav |
This file contains hidden or 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
| track2track --sample-rate 16000 --channels 1 --bits-per-sample 16 down_0.aac |
This file contains hidden or 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
| a = np.ndarray((4, 1)) | |
| b = np.ndarray((4, 2)) | |
| c = [np.array(list(itertools.chain.from_iterable(it))) for it in zip(a, b)] |
This file contains hidden or 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
| autoreconf -fvi | |
| ./configure --disable-shared --without-pthreads --disable-libtool-lock --prefix=/home/clark/googletest --exec-prefix=/home/clark/googletest --host=arm-none-eabi LDFLAGS="-mcpu=cortex-m4 -mthumb -mfloat-abi=soft -mthumb-interwork --specs=nosys.specs " CFLAGS="-mcpu=cortex-m4 -mthumb -mfloat-abi=soft -mthumb-interwork -Iinc -DGTEST_HAS_POSIX_RE=0 -DGTEST_HAS_PTHREAD=0 -DGTEST_HAS_DEATH_TEST=0 -DGTEST_HAS_STREAM_REDIRECTION=0 -DGTEST_OS_NONE -std=c99 -Os" CXXFLAGS="-mcpu=cortex-m4 -mthumb -mfloat-abi=soft -mthumb-interwork -Iinc -DGTEST_HAS_POSIX_RE=0 -DGTEST_HAS_PTHREAD=0 -DGTEST_HAS_DEATH_TEST=0 -DGTEST_HAS_STREAM_REDIRECTION=0 -DGTEST_OS_NONE -std=gnu++11 -Os -D_POSIX_PATH_MAX=255" | |
| make & make install-libLTLIBRARIES |
This file contains hidden or 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
| template<typename... Args> | |
| struct TypeList; | |
| /// partial specialisation | |
| template<typename FirstType, typename... Args> | |
| struct TypeList<FirstType, Args...> : private TypeList<Args...> { | |
| using type = FirstType; | |
| template<typename ClientType> | |
| struct InList { |
This file contains hidden or 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
| . to repeat last command | |
| gv to reselect the visual area | |
| >> to indent current line | |
| > to indent selected text | |
| >% to indent the block | |
| >} to indent from the cursor to the next blank line | |
| <aB to un-indent the current C-like {...} "block" structure | |
| >i{ increase indent for inner block | |
| >a{ increase the whole block |