This tutorial goes through how to install openssl 1.1.1 on CentOS 7, since the yum repo only installs up to openssl 1.0.
Upgrade the system
yum -y update
| import { Queue } from "@aws-cdk/aws-sqs"; | |
| import { App, Duration, Stack, StackProps } from "@aws-cdk/core"; | |
| import { Runtime, Code, Function } from "@aws-cdk/aws-lambda"; | |
| import { SqsEventSource } from "@aws-cdk/aws-lambda-event-sources"; | |
| class DeadLetterQueue extends Stack { | |
| constructor(parent: App, name: string, props?: StackProps) { | |
| super(parent, name, props); |
| import importlib | |
| from mock import MagicMock, patch | |
| def example(): | |
| with patch_modules(): | |
| import something.not.importable | |
| print("yay! it worked!") | |
| def patch_modules(): | |
| sm = mock_import('not.importable', 'something') |
function retry_backoff {local m=${ATTEMPTS:-5};local t=${TIMEOUT:-1};local a=0;local e=1;while (($a < $m));do "$@";e=$?;if (($e == 0)); then break;fi;echo "Failure! Retrying in $t.." 1>&2;sleep $t;((a++));t=$((t*2));done;if (($e != 0));then echo "Max attempts reached!" 1>&2;fi;return $e; }retry_backoff $YOUR_COMMAND # default of 5 retries, starting with 1 second timeout| import sys | |
| from awsglue.transforms import * | |
| from awsglue.utils import getResolvedOptions | |
| from pyspark.context import SparkContext | |
| from awsglue.context import GlueContext | |
| from awsglue.job import Job | |
| from pyspark.sql.functions import * | |
| from awsglue.dynamicframe import DynamicFrame |
| import ec2 = require('@aws-cdk/aws-ec2'); | |
| import ecs = require('@aws-cdk/aws-ecs'); | |
| import ecs_patterns = require('@aws-cdk/aws-ecs-patterns'); | |
| import cdk = require('@aws-cdk/core'); | |
| import route53 = require('@aws-cdk/aws-route53'); | |
| import acm = require('@aws-cdk/aws-certificatemanager'); | |
| import targets = require('@aws-cdk/aws-route53-targets/lib'); | |
| import path = require('path'); | |
| import { config } from 'dotenv'; | |
| import { ApplicationProtocol, SslPolicy } from '@aws-cdk/aws-elasticloadbalancingv2'; |
| package com.blogspot.lifeinide.postgres.locks; | |
| import org.aspectj.lang.ProceedingJoinPoint; | |
| import org.aspectj.lang.annotation.Around; | |
| import org.aspectj.lang.annotation.Aspect; | |
| import org.hibernate.exception.LockAcquisitionException; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.core.Ordered; | |
| import org.springframework.stereotype.Component; |
| [flake8] | |
| max-line-length = 88 | |
| max-complexity = 12 | |
| select = C,E,F,W,B,B950 | |
| ignore = E203, E501, W503 |
| # Based on the following: | |
| # https://www.datainsightonline.com/post/how-to-generate-fake-dataset-with-python-faker-library | |
| # https://deparkes.co.uk/2020/12/28/python-fake-data-with-faker/ | |
| from faker.providers import BaseProvider | |
| from faker import Faker | |
| import pandas as pd | |
| from loguru import logger | |
| fake = Faker("en_GB") |