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
name: main | |
on: | |
push: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: |
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 ParquetWriter<T : SpecificRecord>(private val outputFile: String, schema: Schema, conf: Configuration) { | |
private var closed = false | |
private val writer by lazy { | |
val timeSupport = GenericData().also { | |
it.addLogicalTypeConversion(TimeConversions.DateConversion()) | |
} | |
AvroParquetWriter.builder<T>(HadoopOutputFile.fromPath(Path(outputFile), conf)) | |
.withSchema(schema) |
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
.whatever { | |
animation-name: color-transition; | |
animation-duration: 25s; | |
animation-direction: alternate; | |
animation-iteration-count: infinite; | |
animation-timing-function: linear; | |
} | |
@keyframes color-transition { | |
0% { |
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
fun main() { | |
val config = mapOf( | |
"bootstrap.servers" to "localhost:9092", | |
"schema.registry.url" to "http://localhost:8081", | |
"key.serializer" to "org.apache.kafka.common.serialization.StringSerializer", | |
"value.serializer" to "io.confluent.kafka.serializers.KafkaAvroSerializer", | |
) | |
val consumer = KafkaConsumer<String, Cats>(config) | |
consumer.subscribe(listOf("cats")) |
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
{"lastUpload":"2021-10-26T13:10:18.801Z","extensionVersion":"v3.4.3"} |
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
/*.o | |
/example |
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
fun primes(): Sequence<Long> { | |
var i = 0L | |
return sequence { | |
generateSequence { i++ } | |
.filter { n -> n > 1 && ((2 until n).none { i -> n % i == 0L }) } | |
.forEach { yield(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
tasks.withType<Jar> { | |
manifest { | |
attributes["Main-Class"] = "com.example.MainKt" | |
} | |
} |
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
def aliases do | |
[ | |
"ensure_consistency": ["test", "dialyzer", "credo --strict", "inch", "coveralls"] | |
] | |
end | |
def project do | |
[ | |
app: :belief_structure, | |
aliases: aliases(), |
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
Process.flag(:trap_exit, true) | |
current = self() | |
spawn(fn -> send(current, {self(), 1 + 1}); exit(:no_normal_exit) end) | |
defmodule Foobar do | |
def foo(current) do | |
receive do | |
{current, n} -> IO.puts "Result: #{n}"; foo(current) | |
{:EXIT, pid, reason} -> IO.puts "EXIT with #{reason}" |
NewerOlder