In a new virtual environment:
pip install prefect requests sympy
| networks: | |
| redpanda_network: | |
| driver: bridge | |
| volumes: | |
| redpanda-0: null | |
| redpanda-1: null | |
| redpanda-2: null | |
| services: | |
| redpanda-0: | |
| command: |
To process multiple jobs at scale in an organized and manageable way, organizations might choose from a variety of tools.
One powerful tool to run and scheduled jobs is Kubernetes, an open source platform first created by Google. Kubernetes (or K8S) orchestrates dozens or even hundreds (or thousands) of containerized jobs using a "declared state" model - which is to say that developers describe the state of their application and the cluster makes it happen.
In this lab you will create and submit a CronJob to run in the UVA Kubernetes cluster.
https://s3.amazonaws.com/ds2002-resources/labs/lab3-bundle.tar.gz - tar-zipped TSVhttps://s3.amazonaws.com/ds2002-resources/labs/stock_data.tsv - TSVhttps://s3.amazonaws.com/ds2002-resources/labs/flights.csv - CSVDownload the files below. Then try running the textstats.sh script with each of them.
Play wordle using the script below. Can you figure out
Using the fileinfo.sh script below, complete the script to display basic information about any file passed as an argument to the script. You will have to complete line 8 to begin, as well as use echo to display values to the user. BONUS: add another variable that calculates how many lines the file contains. Display the 4 file attributes.
| from airflow import Dataset | |
| from airflow.decorators import ( | |
| dag, | |
| task, | |
| ) | |
| from airflow.models import Variable | |
| from pendulum import datetime, duration | |
| import requests | |
| from pymongo import MongoClient, errors | |
| from bson.json_util import dumps |
| import boto3 | |
| from botocore.exceptions import ClientError | |
| def get_secret(secret_name,region_name): | |
| # Create a Secrets Manager client | |
| session = boto3.session.Session() | |
| client = session.client( | |
| service_name='secretsmanager', | |
| region_name=region_name |
| #!/bin/bash | |
| mkfs -t xfs /dev/xvdh | |
| mkdir /mnt/volume2 | |
| mount -t xfs /dev/xvdh /mnt/volume2 | |
| echo "/dev/xvdh /mnt/volume2 xfs defaults 0 0" > /etc/fstab |
| AWSTemplateFormatVersion: 2010-09-09 | |
| Description: >- | |
| AWS CloudFormation Sample Template EIP_With_Association: This template | |
| creates an Amazon EC2 instance and an Elastic IP Address. You will be | |
| billed for the AWS resources used if you create a stack from this template. | |
| Parameters: | |
| InstanceType: | |
| Description: Web Server EC2 instance type | |
| Type: String | |
| Default: t2.small |