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
package com.test; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Scanner; |
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
#include <stdio.h> // Include a library that provides input/output functions | |
// By default C runs main function from compiler | |
int main() { | |
char name[100]; // Declare a variable named 'name' that can hold up to 99 characters plus a null terminator | |
printf("Enter your name: "); // Print a message asking for input | |
scanf("%s", name); // Read a string of characters (input) and store it in the 'name' variable |
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
1) Get lambda initialization time - | |
fields @timestamp, @message, @initDuration | |
| filter @initDuration > 5 | |
| sort @timestamp desc | |
| limit 20 | |
2) Search request by uuid(After searching by uuid, copy lambda requestId from one of logs and use same query with that id) - | |
filter @message like /a348b4c3-7915-4f5f-942b-b79f3589757f/ | |
| fields @timestamp, @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
import unittest | |
import boto3 | |
import os | |
from moto import mock_dynamodb | |
from unittest.mock import patch | |
@mock_dynamodb # Decorator applied to whole class for providing mock for each dynamodb calls | |
@patch.dict(os.environ, { |
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 unittest | |
class LambdaFunctionTest(unittest.TestCase): | |
def setUp(self) -> None: | |
pass | |
def tearDown(self) -> None: | |
pass |
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 unittest | |
import boto3 | |
import os | |
from moto import mock_dynamodb | |
from unittest.mock import patch | |
@mock_dynamodb # Decorator applied to whole class. This will provides mock for each dynamodb calls which creates inside this class. | |
@patch.dict(os.environ, { |
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 boto3 | |
dynamo_db_connection = boto3.resource('dynamodb', region_name='us-east-1') | |
anime_table_name = os.environ['anime_table_name'] | |
def lambda_handler(event, context): | |
print("Incoming event ", event) | |
anime_name = str(event["anime_name"]) | |
response = dynamodb_connection.query( |
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
version: '3.8' | |
services: | |
localstack: | |
container_name: "localstack-container" | |
image: localstack/localstack:latest | |
ports: | |
- "4566:4566" | |
- "9200:4571" | |
environment: | |
- SERVICES=es, s3, ec2, dynamodb, sqs |
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
=========================================================================================================================== | |
=========================================================================================================================== | |
=========================================================================================================================== | |
All about core java | |
=========================================================================================================================== | |
=========================================================================================================================== | |
=========================================================================================================================== |
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
======================================================================================================= | |
======================================================================================================= | |
All-about-reactive-programming-java | |
======================================================================================================= | |
======================================================================================================= |
NewerOlder