Skip to content

Instantly share code, notes, and snippets.

@rdp
rdp / gist:0c1f1dd8cc8e416a9f73cd21c9d32730
Created December 20, 2018 02:25
output of ffmpeg fdk aac enabled
ffmpeg.fdk32.exe -codecs | grep aac
ffmpeg version N-92742-ga07470b-ffmpeg-windows-build-helpers Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8.2.0 (GCC)
configuration: --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=ffmpeg-windows-build-helpers --enable-version3 --disable-debug --disable-w32threads --arch=x86 --target-os=mingw32 --cross-prefix=/home/rdp/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32- --enable-libcaca --enable-gray --enable-libtesseract --enable-fontconfig --enable-gmp --enable-gnutls --enable-libass --enable-libbluray --enable-libbs2b --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-lib
@rdp
rdp / gist:0286d91624930bd11d0169d6a6337c33
Created December 3, 2018 17:22
grep multiline perl test
$ cat ~/example.html
not it
<title>
yess 1
2
</title>
$ grep -P '(?s)<title>.*</title>' ~/example.html
$
ffmpeg -re -f lavfi -i testsrc -c:v libx264 -x264opts nal-hrd=cbr -b:v 2200k -minrate 2200k -maxrate 2200k -bufsize 220k -muxrate 2600k -pcr_period 30 -c:a mp2 -b:a 192k -ac 2 -f mpegts "udp://239.1.1.1:10000?pkt_size=1316"
ffmpeg version N-89340-g5a366f9-Reino Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 7.1.0 (GCC)
configuration: --arch=x86 --target-os=mingw32 --cross-prefix=/home/rogerdpack/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/bin/i686-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static --extra-version=Reino --enable-gray --enable-version3 --disable-debug --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-w32threads --enable-fontconfig --enable-gmp --enable-gnutls --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libflite --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libmysof

NTFS-3G

NTFS-3G is an open source cross-platform implementation of the Microsoft Windows NTFS file system with read-write support.

Please note that NTFS-3G and FUSE for macOS are independent projects. Should you run into NTFS-3G related issues please post the issues on the NTFS-3G support forum at http://tuxera.com/forum/viewforum.php?f=7.

Installation

The following instructions assume that you know how to use Terminal. Doing this the wrong way could damage your operating system.

@rdp
rdp / profiles
Created September 27, 2018 22:49
Local file fastest…hmm…
Can read it “cat” at 3GB/s
if=/dev/zero 5.5 GB/s to 7 GB/s
Theoretically I am “dual” 10Gbe
1 GB/s
@rdp
rdp / # mysql - 2018-07-12_00-02-22.txt
Created July 12, 2018 07:03
mysql on macOS 10.13.6 - Homebrew build logs
Homebrew build logs for mysql on macOS 10.13.6
Build date: 2018-07-12 00:02:22
@rdp
rdp / # mysql - 2018-07-12_00-02-22.txt
Created July 12, 2018 07:02
mysql on macOS 10.13.6 - Homebrew build logs
Homebrew build logs for mysql on macOS 10.13.6
Build date: 2018-07-12 00:02:22
static WeakHashMap<Integer, Object> locks = new WeakHashMap<Integer, Object>();
static Object getSyncObjectForId(Integer id) {
synchronized (locks) {
Object lock = locks.get(id);
if (lock == null) {
lock = new Object();
locks.put(id, lock);
}
import torch
from torch.autograd import Variable
from warpctc_pytorch import CTCLoss
ctc_loss = CTCLoss()
# expected shape of seqLength x batchSize x alphabet_size
probs = torch.FloatTensor([[[0.1, 0.6, 0.1, 0.1, 0.1], [0.1, 0.1, 0.6, 0.1, 0.1]]]).transpose(0, 1).contiguous()
labels = Variable(torch.IntTensor([1, 2]))
label_sizes = Variable(torch.IntTensor([2]))
probs_sizes = Variable(torch.IntTensor([2]))
probs = Variable(probs, requires_grad=True) # tells autograd to compute gradients for probs
Comparator<String> byLength = Comparator.comparing(String::length);
Map<String, String> longestLastNameByCity
= Arrays.asList(new Person("pack", "provo"), new Person("pack2", "provo"), new Person("pack", "oreM")).stream().collect(groupingBy(Person::getCity,
reducing("", Person::getLastName, BinaryOperator.maxBy(byLength))));
System.out.println(longestLastNameByCity);
}
public static class Person {
String lastName;