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
import org.apache.kafka.clients.consumer.KafkaConsumer | |
import org.apache.kafka.clients.CommonClientConfigs | |
import org.apache.kafka.common.serialization.StringDeserializer | |
import scala.jdk.CollectionConverters._ | |
import java.util.Properties | |
object KafkaReader extends App { | |
def getProperties: Properties = { |
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
%%%------------------------------------------------------------------- | |
%%% @author romulo.jales | |
%%% @copyright (C) 2014, <COMPANY> | |
%%% Exercise 2 chapter 4 "programming erlang: Software for a concurrent world" | |
%%% The BIF tuple_to_list( T) converts the elements of the tuple T to a list. | |
%%% Write a function called my_tuple_to_list( T) that does the same thing only not using the BIF that does this. | |
%%% @end | |
%%% Created : 23. Apr 2014 1:42 AM | |
%%%------------------------------------------------------------------- | |
-module(e2c4). |
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
import calendar | |
from datetime import datetime | |
import pytz | |
def month_range(year, month): | |
init = datetime(year, month, 1, 0, 0, 0, 0, tzinfo=pytz.UTC) | |
max_day_month = calendar.monthrange(year, month)[1] | |
final = datetime(year, month, max_day_month, datetime.max.hour, datetime.max.minute, | |
datetime.max.second, datetime.max.microsecond, tzinfo=pytz.UTC) | |
return init, final |
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 NegocioAbstrato(object): | |
def funcao_abs(self, arg): | |
return arg | |
def funcao_repassada_ao_bridge(self, arg): | |
ponte = self.__get_ponte(arg) | |
return ponte.funcao_assumida(arg) | |
def __get_ponte(self, arg): |