This file contains 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
test("Should aggregate call events") { | |
implicit val sqlContext: SQLContext = spark.sqlContext | |
import spark.implicits._ | |
val scenario = TestHelper.loadScenario[CallEvent](s"$pathToTestScenarios/pdd_events.json") | |
val scenarioIter = scenario.toIterator | |
scenario.nonEmpty shouldBe true | |
val kafkaData = MemoryStream[MockKafkaDataFrame] | |
val processingStream = EventAggregation(appConfig).process(kafkaData.toDF())(session) |
This file contains 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
class EventMemoryStreamSpec extends FunSuite with Matchers with SparkSqlTest { | |
val log: Logger = LoggerFactory.getLogger(classOf[EventAggregation]) | |
private val pathToTestScenarios = "src/test/resources/scenarios" | |
lazy val session: SparkSession = sparkSql | |
override def conf: SparkConf = { | |
new SparkConf() | |
.setMaster("local[*]") |
This file contains 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
public class SecretSantaSelection { | |
private final long phoneNumber; | |
private final String message; | |
public SecretSantaSelection(final long phoneNumber, final String message) { | |
this.phoneNumber = phoneNumber; | |
this.message = message; | |
} |
This file contains 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
#!/usr/bin/env ruby | |
$: << File.join(File.dirname(__FILE__), "") | |
$: << $APP_ROOT = File.expand_path(File.dirname(__FILE__)) | |
require $APP_ROOT+"/helper/directory" | |
@path = File.join($APP_ROOT, '/libs/modules/protected') | |
Helper::Directory.write(@path) do |result| | |
unless !result do | |
# be creative, now that you have written your directory, write some files to it |
This file contains 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
#!/usr/bin/ruby | |
#5109926224 | |
#4226299015 | |
#4.2.2.6.2.9.9.0.1.5.1.e164.convorelay.com | |
#100 10 "u" "E2U+sip" "!^.*$!sip:[email protected]!". | |
raise "You need to add a 10D number to reverse and dottify as ARGV[0]" unless !ARGV.empty? | |
$num = ARGV[0] | |
def enum_reverse_dottify(num) |
This file contains 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
#Ruby Meetup Group | |
Ezra | |
Limitations of SQL | |
(horizontal databases) - not covered in mysql | |
- Limitations | |
- don't scale past a single master | |
#lesssql |
This file contains 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
Global setup: | |
Download and install Git | |
git config --global user.name "<name>" | |
git config --global user.email <email> | |
Next steps: | |
mkdir dailyhacking | |
cd dailyhacking | |
git init | |
touch README |
This file contains 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
Frame-type options: | |
• --keyint <integer> (x264) | |
• -g <integer> (FFmpeg) | |
• Keyframe interval, also known as GOP length. This determines the maximum distance between I-frames. Very high GOP lengths will result in slightly more efficient compression, but will make seeking in the video somewhat more difficult. Recommended default: 250 | |
• --min-keyint <integer> (x264) | |
• -keyint_min <integer> (FFmpeg) | |
• Minimum GOP length, the minimum distance between I-frames. Recommended default: 25 | |
• --scenecut <integer> (x264) |
This file contains 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
Syntax: x264 [options] -o outfile infile [widthxheight] | |
Infile can be raw YUV 4:2:0 (in which case resolution is required), | |
or YUV4MPEG 4:2:0 (*.y4m), | |
or Avisynth if compiled with support (no). | |
or libav* formats if compiled with lavf support (no) or ffms support (no). | |
Outfile type is selected by filename: | |
.264 -> Raw bytestream | |
.mkv -> Matroska | |
.flv -> Flash Video |
This file contains 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
Symptoms | |
-------- | |
Undefined symbols for architecture x86_64: | |
"_x264_encoder_open_114", referenced from: | |
_gst_x264_enc_sink_set_caps in libgstx264_la-gstx264enc.o | |
ld: symbol(s) not found for architecture x86_64 | |
collect2: ld returned 1 exit status | |
Fix | |
------ |
NewerOlder