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 random | |
import string | |
# To randomize encoded data to seem like different | |
NUMBER_OF_OUTPUT_FILES = 100 | |
LOOP_REAL_DATA = 94 | |
def work(read_filename, file_index): | |
try: | |
line_arr = [] |
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 socket | |
import base64 | |
import struct | |
import time | |
import binascii | |
""" Break a large file into small 96 byte chunks | |
Sequence the chunks, pack and b64 encode them | |
Then send DNS queries """ | |
# If you don't like non-valid characters in the hostname, |
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 pandas as pd | |
import numpy as np | |
from faker import Faker | |
# create some fake data | |
fake = Faker() | |
# function to create a dataframe with fake values for our workers | |
def make_workers(num): | |
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
Description: This stack includes resources needed to deploy AWS CDK apps into this | |
environment | |
Parameters: | |
. | |
. | |
. | |
. | |
. | |
PublicAccessBlockConfiguration: | |
Description: Whether or not to enable S3 Staging Bucket Public Access Block Configuration |
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
Description: This stack includes resources needed to deploy AWS CDK apps into this | |
environment | |
Parameters: | |
TrustedAccounts: | |
Description: List of AWS accounts that are trusted to publish assets and deploy | |
stacks to this environment | |
Default: '' | |
Type: CommaDelimitedList | |
TrustedAccountsForLookup: | |
Description: List of AWS accounts that are trusted to look up values in this |
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 socket | |
import base64 | |
import struct | |
import time | |
""" Break a large file into small 96 byte chunks | |
Sequence the chunks, pack and b64 encode them | |
Then send DNS queries """ | |
# If you don't like non-valid characters in the hostname, | |
# then use hex encoding rather than base64 |
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 * as cdk from 'aws-cdk-lib'; | |
import { Template } from 'aws-cdk-lib/assertions'; | |
import { LambdaStack } from '../src/lambda-stack'; | |
test('Lambda created', () => { | |
const app = new cdk.App(); | |
const stack = new LambdaStack(app, 'LambdaStack'); | |
const template = Template.fromStack(stack); | |
template.resourceCountIs('AWS::Lambda::Function', 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
import { App } from 'aws-cdk-lib'; | |
import { CdkPipelineStack } from './cdk-pipeline-stack'; | |
// for development, use account/region from cdk cli | |
const devEnv = { | |
account: process.env.CDK_DEFAULT_ACCOUNT, | |
region: process.env.CDK_DEFAULT_REGION, | |
}; | |
const app = new App(); |
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 { Stack, StackProps, Stage } from 'aws-cdk-lib'; | |
import { CodePipeline, CodePipelineSource, ShellStep } from 'aws-cdk-lib/pipelines'; | |
import { Construct } from 'constructs'; | |
import { LambdaStack } from './lambda-stack'; | |
// 3a. We define a Lambda Stage that deploys the Lambda Stack. | |
export class LambdaStage extends Stage { | |
constructor(scope: Construct, id: string) { | |
super(scope, id); | |
new LambdaStack(this, 'LambdaStack'); |
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 { Stack, StackProps } from 'aws-cdk-lib'; | |
import * as lambda from 'aws-cdk-lib/aws-lambda'; | |
import { Construct } from 'constructs'; | |
// example cdk app stack | |
export class LambdaStack extends Stack { | |
constructor(scope: Construct, id: string, props?: StackProps) { | |
super(scope, id, props); |
NewerOlder