- Sample data -
https://s3.amazonaws.com/ds2002-resources/labs/lab3-bundle.tar.gz
- tar-zipped TSV - Stock Data -
https://s3.amazonaws.com/ds2002-resources/labs/stock_data.tsv
- TSV - Flight Log -
https://s3.amazonaws.com/ds2002-resources/labs/flights.csv
- CSV
-
Download the files below. Then try running the
textstats.sh
script with each of them. -
Play wordle using the script below. Can you figure out
- How to print the secret word before you start guessing? and
- Where bash is getting the list of 5-letter words?
-
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 useecho
to display values to the user. BONUS: add another variable that calculates how many lines the file contains. Display the 4 file attributes.
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 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 |
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 | |
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 |
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
#!/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 |
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
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 |
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
#cloud-config | |
repo_update: true | |
repo_upgrade: all | |
packages: | |
- docker | |
- jq | |
- htop | |
runcmd: |
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
name: Remote Dispatch Action | |
on: [ repository_dispatch, workflow_dispatch ] | |
jobs: | |
update-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Event Information |
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
name: Container Build CICD | |
on: | |
push: | |
branches: | |
- 'main' | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: org/container-name |
NewerOlder