Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
You can get the list of installed codecs with:
crypto = require('crypto'); | |
#Quick MD5 of text | |
text = "MD5 this text!" | |
md5hash1 = crypto.createHash('md5').update(text).digest("hex") | |
#MD5 of text with updates | |
m = crypto.createHash('md5') | |
m.update("MD5 ") | |
m.update("this ") |
@namespace("com.example") | |
/** | |
This is a comment for the whole protocol | |
*/ | |
protocol Example { | |
/** | |
The comment applies to the `NoSpaces` record, but is not indented to the |
""" | |
This script exercises the join as well as left, right and full outer join as implemented in | |
Apache Spark. Employee and Department tables were inspired by the examples in wiki's articles | |
on join operation: https://en.wikipedia.org/wiki/Join_(SQL) | |
Employee | |
(31, 'Rafferty') | |
(33, 'Jones') | |
(33, 'Heisenberg') |
/** | |
* Generate Case class from DataFrame.schema | |
* | |
* val df:DataFrame = ... | |
* | |
* val s2cc = new Schema2CaseClass | |
* import s2cc.implicit._ | |
* | |
* println(s2cc.schemaToCaseClass(df.schema, "MyClass")) | |
* |
Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups
command.
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describe
Note the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.
#!/usr/bin/env python3 | |
# coding: utf-8 | |
""" | |
Author : weaming | |
Created Time : 2018-05-26 21:32:59 | |
Prerequisite: | |
python3 -m pip install cson arrow | |
""" | |
import json | |
import os |
There are 4 possible serialization format when using avro:
--- | |
version: '2' | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:latest | |
environment: | |
ZOOKEEPER_CLIENT_PORT: 2181 | |
ZOOKEEPER_TICK_TIME: 2000 | |
kafka: |