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
@Component | |
@Slf4j | |
@RequiredArgsConstructor | |
public class TweetsIngestHandler { | |
/** | |
* Text Analyzer Service | |
*/ | |
private final ITextAnalyzerService textAnalyzerService; |
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
@Slf4j | |
@RequiredArgsConstructor | |
public class TwitterMessageProducer extends MessageProducerSupport { | |
private final TwitterStream twitterStream; | |
private final MessageChannel outputChannel; | |
private final TweetEntityMapper tweetEntityMapper; | |
@Getter | |
@Setter |
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
@Slf4j | |
@RequiredArgsConstructor | |
@Component | |
public class TweetsProcessedHandler { | |
private final ITweetsService tweetService; | |
/** | |
* | |
* @param newProcessedTweet |
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
@Data | |
@EqualsAndHashCode(callSuper = false) | |
@AllArgsConstructor | |
@NoArgsConstructor | |
@Document(indexName = "tweets_processed") | |
public class TweetEntity { | |
@Id | |
@Field(type = FieldType.Long) | |
private Long id; |
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 com.dreamsoftware.model.OTPGenerated | |
import com.dreamsoftware.model.RedisStorageConfig | |
import com.dreamsoftware.model.exception.OTPDestinationIsBlockedException | |
import com.dreamsoftware.model.exception.OTPNotFoundException | |
import com.dreamsoftware.model.exception.OTPSaveDataException | |
import com.dreamsoftware.repository.OTPRepository | |
import com.dreamsoftware.utils.hashSha256andEncode | |
import redis.clients.jedis.JedisCluster | |
class OTPRepositoryImpl( |
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 com.dreamsoftware.model.OtpSenderConfig | |
import com.dreamsoftware.model.SmsSenderConfig | |
import com.dreamsoftware.model.exception.OTPSenderFailedException | |
import com.twilio.Twilio | |
import com.twilio.rest.api.v2010.account.Message | |
import com.twilio.type.PhoneNumber | |
class OTPSmsSenderServiceImpl: SupportOTPSender<SmsSenderConfig>() { | |
override suspend fun sendOTP( |
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 com.dreamsoftware.model.MailSenderConfig | |
import com.dreamsoftware.model.exception.OTPSenderFailedException | |
import com.sendgrid.Method | |
import com.sendgrid.Request | |
import com.sendgrid.SendGrid | |
import com.sendgrid.helpers.mail.Mail | |
import com.sendgrid.helpers.mail.objects.Content | |
import com.sendgrid.helpers.mail.objects.Email | |
class OTPMailSenderServiceImpl: SupportOTPSender<MailSenderConfig>() { |
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
from datetime import datetime | |
from airflow import DAG | |
import importlib | |
import os | |
# Define default arguments for the DAG | |
default_args = { | |
'owner': 'airflow', | |
'start_date': datetime(2023, 1, 1), | |
'retries': 1, |
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
from airflow.utils.decorators import apply_defaults | |
from operators.base_custom_operator import BaseCustomOperator | |
from bson import ObjectId | |
import importlib | |
import scipy | |
import tempfile | |
from datetime import datetime | |
class GenerateMelodyOperator(BaseCustomOperator): |
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
from airflow.utils.decorators import apply_defaults | |
from operators.base_custom_operator import BaseCustomOperator | |
from bson import ObjectId | |
import importlib | |
import scipy | |
import tempfile | |
from datetime import datetime | |
class GenerateVoiceOperator(BaseCustomOperator): |
OlderNewer