Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
deepaksood619 committed Feb 3, 2024
1 parent 32fc2bc commit 35736e1
Show file tree
Hide file tree
Showing 19 changed files with 325 additions and 220 deletions.
12 changes: 6 additions & 6 deletions docs/ai/hackathons.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,29 +85,29 @@ Problem Statement: Develop an automated root cause analysis system using machine

Good to have - Give the steps to perform to fix the problem based on last problem fix, in next step run the scripts or call the api to fix

### Optimizing Deployment Strategies with ML:
### Optimizing Deployment Strategies with ML

Problem Statement: Implement a machine learning model to optimize deployment strategies. Analyze past deployment data, including time, day, and code changes, to predict the optimal time for deploying updates with minimal impact. Use open-source tools for deployment orchestration and ML frameworks for model development.

## General Problem Statements

### Sentiment Analysis for Social Media Posts:
### Sentiment Analysis for Social Media Posts

Problem Statement: Develop a sentiment analysis model to classify social media posts into positive, negative, or neutral sentiments. Use open-source tools like Python, scikit-learn, or TensorFlow. The dataset can be obtained from platforms like Twitter or Reddit.

### Medical Image Classification:
### Medical Image Classification

Problem Statement: Build a machine learning model to classify medical images (X-rays, MRIs, CT scans) into different categories such as normal, benign, or malignant. Utilize open-source frameworks like TensorFlow or PyTorch and consider datasets available on platforms like Kaggle or NIH.

### Predictive Maintenance for Equipment:
### Predictive Maintenance for Equipment

Problem Statement: Create a predictive maintenance model that forecasts equipment failures based on historical data. Use open-source tools such as Python, scikit-learn, or Apache Spark. You can find relevant datasets on platforms like NASA Prognostics Center or UCI Machine Learning Repository.

### Fraud Detection in Financial Transactions:
### Fraud Detection in Financial Transactions

Problem Statement: Develop a machine learning model to detect fraudulent activities in financial transactions. Utilize open-source tools like Python, scikit-learn, or Apache Flink. Consider datasets from platforms like Kaggle or the IEEE-CIS Fraud Detection dataset.

### Natural Language Processing (NLP) for Customer Support:
### Natural Language Processing (NLP) for Customer Support

Problem Statement: Build an NLP model to automate customer support ticket categorization and routing. Use open-source NLP libraries like spaCy or NLTK and consider datasets from platforms like Zendesk or Kaggle.

Expand Down
22 changes: 11 additions & 11 deletions docs/ai/move-37/3-monte-carlo-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
- Exploration vs Exploitation tradeoff
- Epsilon Greedy

epsilonis the fraction of times we sample a lever randomly and1- epsilonis the fraction of times we choose optimally.
epsilon is the fraction of times we sample a lever randomly and1- epsilonis the fraction of times we choose optimally.

- Thompson Sampling
### Thompson Sampling

The basic idea is toassume a simple prior distributionon the underlying parameters of the reward distribution of every lever, and at every time step, play a lever according to itsposterior probabilityof being the best arm.

- **Multi-armed bandit problem**
### Multi-armed bandit problem

In [probability theory](https://en.wikipedia.org/wiki/Probability_theory), the**multi-armed bandit problem**(sometimes called the***K*-or*N*-armed bandit problem**) is a problem in which a fixed limited set of resources must be allocated between competing (alternative) choices in a way that maximizes their expected gain, when each choice's properties are only partially known at the time of allocation, and may become better understood as time passes or by allocating resources to the choice.
In [probability theory](https://en.wikipedia.org/wiki/Probability_theory), the **multi-armed bandit problem**(sometimes called the ***K*- or *N*-armed bandit problem**) is a problem in which a fixed limited set of resources must be allocated between competing (alternative) choices in a way that maximizes their expected gain, when each choice's properties are only partially known at the time of allocation, and may become better understood as time passes or by allocating resources to the choice.

The name comes from imagining a [gambler](https://en.wikipedia.org/wiki/Gambler) at a row of [slot machines](https://en.wikipedia.org/wiki/Slot_machines)(sometimes known as "one-armed bandits"), who has to decide which machines to play, how many times to play each machine and in which order to play them, and whether to continue with the current machine or try a different machine.The multi-armed bandit problem also falls into the broad category of [stochastic scheduling](https://en.wikipedia.org/wiki/Stochastic_scheduling).

Expand Down Expand Up @@ -84,26 +84,26 @@ Learn a problem when not all the components are available. In model free learnin

There are two different types of MC.

## First-visit MC:average returns only for first time s is visited in an episode
### First-visit MC: average returns only for first time s is visited in an episode

- Incremental Mean

## Every-Visit MC:average returns for every time s is visited in an episode
### Every-Visit MC: average returns for every time s is visited in an episode

Both converge asymptotically.

Monte Carlo methods for control task (Policy iteration is the base of control task)

Inmodel-free RL, we need to interact with the environment to find out the best strategy so we need to explore the entire the state space while figuring out best actions.
In model-free RL, we need to interact with the environment to find out the best strategy so we need to explore the entire the state space while figuring out best actions.

- Exploration:is about finding more information about the environment. In other words exploring a lot of states and actions in the environment.
- Exploitation:is about exploiting the known information to maximize the reward.

Example for exploration vs exploitation (in context of Roomba, floor cleaning robot) - When the state is in charged up mode It needs to cover maximum area in a grid world for cleaning which falls under exploration. When the state of the machine changes to low batteryitneeds to find the charging dock as soon as possible to avoid getting stuck here the robot needs to exploit rather than explore to maximize the reward.So due to the exploration problem, we cannot expect Roomba to act greedily in MC to improve policy instead we use the epsilon-greedy policy.
Example for exploration vs exploitation (in context of Roomba, floor cleaning robot) - When the state is in charged up mode It needs to cover maximum area in a grid world for cleaning which falls under exploration. When the state of the machine changes to low battery it needs to find the charging dock as soon as possible to avoid getting stuck here the robot needs to exploit rather than explore to maximize the reward.So due to the exploration problem, we cannot expect Roomba to act greedily in MC to improve policy instead we use the epsilon-greedy policy.

## Epsilon-greedy policy

Thebest-knownaction based on our experience is selected with (1-epsilon) probability and the rest of the time i.e. with epsilon probability any action is selected randomly. Initially, epsilon is 1 so we can explore more but as we do many iterations we slowly decrease the epsilon to 0( whichis exploitation → choosing the best-known action) this get us to have the value of epsilonbetween 0 and 1.
The best-known action based on our experience is selected with (1-epsilon) probability and the rest of the time i.e. with epsilon probability any action is selected randomly. Initially, epsilon is 1 so we can explore more but as we do many iterations we slowly decrease the epsilon to 0( which is exploitation → choosing the best-known action) this get us to have the value of epsilon between 0 and 1.

## GLIE Monte Carlo Method (Greedy in the Limit of Infinite Exploration)

Expand All @@ -115,9 +115,9 @@ For each episode, we can update our estimated value function using an incrementa

Q(St,At) ← Q(St,At) + (1 / N(St,At)) (Gt--Q(St,At))

Here,Gteither represents the return from timetwhen the agent first visited the state-action pair, or the sum of returns from each timetthat the agent visited the state-action pair, depending on whether you are using first-visit or every-visit Monte Carlo.
Here, Gt either represents the return from time t when the agent first visited the state-action pair, or the sum of returns from each time t that the agent visited the state-action pair, depending on whether you are using first-visit or every-visit Monte Carlo.

We'll adopt -greedy policy withϵ=1/kwherekrepresents the number of episodes our agent has learned from.
We'll adopt a ϵ-greedy policy with ϵ=1/k where k represents the number of episodes our agent has learned from.

![image](../../media/3.-Monte-Carlo-Methods-image2.jpg)

Expand Down
39 changes: 28 additions & 11 deletions docs/cloud/aws/aws-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,20 +93,37 @@ Highly accurate intelligent search service powered by machine learning

## Mobile Services

1. AWS Amplify
1. AWS Mobile Hub - Build, Test, and Monitor Apps
2. Amazon API Gateway - Build, Deploy, and Manage APIs
3. Amazon Pinpoint - Push Notifications for Mobile Apps
4. AWS AppSync - Real-time and Offline Mobile Data Apps
5. AWS Device Farm - Test Android, FireOS, and iOS Apps on Real Devices in the Cloud
6. AWS Mobile SDK - Mobile Software Development Kit
7. AWS Location Service
8. AR & VR - Amazon Sumerian - Build and Run VR and AR Applications

https://ui.docs.amplify.aws/?platform=react
### AWS Amplify

https://docs.amplify.aws
[Amplify UI - Build UI fast with Amplify on React](https://ui.docs.amplify.aws/?platform=react)

2. AWS Mobile Hub - Build, Test, and Monitor Apps
3. Amazon API Gateway - Build, Deploy, and Manage APIs
4. Amazon Pinpoint - Push Notifications for Mobile Apps
5. AWS AppSync - Real-time and Offline Mobile Data Apps
6. AWS Device Farm - Test Android, FireOS, and iOS Apps on Real Devices in the Cloud
7. AWS Mobile SDK - Mobile Software Development Kit
8. AWS Location Service
9. AR & VR - Amazon Sumerian - Build and Run VR and AR Applications
[Amplify Documentation - AWS Amplify Documentation](https://docs.amplify.aws)

To serve traffic, Amplify Hosting points to a CloudFront URL via a CNAME record. In the process of connecting an app to a custom domain, the Amplify console displays the CloudFront URL for the app. However, you cannot access your application directly using this CloudFront URL. It returns a 404 error. Your application resolves only using the Amplify app URL (for example, `https://main.d5udybEXAMPLE.amplifyapp.com`, or your custom domain (for example `www.example.com`).

[Troubleshooting custom domains - AWS Amplify Hosting](https://docs.aws.amazon.com/amplify/latest/userguide/custom-domain-troubleshoot-guide.html)

#### Build settings

```bash
frontend:
phases:
build:
commands:
- if [ "${AWS_BRANCH}" = "main" ]; then npm run build; fi
- if [ "${AWS_BRANCH}" = "dev" ]; then npm run dev; fi
```

[Configuring build settings - AWS Amplify Hosting](https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html)

## Application Integeration

Expand Down
1 change: 1 addition & 0 deletions docs/cloud/aws/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- [AWS SNS](cloud/aws/aws-sns.md)
- [Security, Identity and Compliance](security-identity-compliance/intro)
- [IAM](security-identity-compliance/iam)
- [Tools](cloud/aws/security-identity-compliance/tools.md)
- [Analytics](analytics/readme.md)
- [Amazon Athena](analytics/amazon-athena)
- [Developer Tools](developer-tools/intro)
Expand Down
81 changes: 0 additions & 81 deletions docs/cloud/aws/security-identity-compliance/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,87 +44,6 @@

![aws-shared-responsibility-model](../../../media/Screenshot%202023-12-08%20at%206.30.28PM.jpg)

## Tools

### AWS Audit Manager

![aws-audit-manager](../../../media/Screenshot%202023-12-08%20at%206.33.06PM.jpg)

[AWS Audit Manager Demo 2021 | Amazon Web Services - YouTube](https://www.youtube.com/watch?v=v2o1d76ZSf8&ab_channel=AmazonWebServices)

### AWS Security Hub

Automate AWS security checks and centralize security alerts

#### Features

1. Simple multi-account setup via AWS Organizations
2. Cross-region and cross-account aggregation of findings
3. Automated security checks (standards and controls)
4. Integrations with AWS services and partner products for finding aggregation
5. Automated response and remediation

#### Key use cases

- CSPM - Cloud Security Posture Management
- SIEM - Security Information and Event Management
- SOAR - Security Orchestration, Automation, and Response

[AWS Security Hub](https://aws.amazon.com/security-hub/)

[An Overview of AWS Security Hub | Amazon Web Services - YouTube](https://www.youtube.com/watch?v=oBac-GAoZJ8&ab_channel=AmazonWebServices)

### Security Hub vs Audit Manager

For small organizations with not a lot of assets and findings that Security Hub on its own is probably sufficient. For larger organizations or those that have lots of assets and finding, Audit Manager can be extremely helpful on cutting down the noise of everything else and helping your or your external auditors focus on their task at hand.

[AWS Audit Manager vs Security Hub : r/aws](https://www.reddit.com/r/aws/comments/w55i9m/aws_audit_manager_vs_security_hub/)

### ScoutSuite

Scout Suite is an open source multi-cloud security-auditing tool, which enables security posture assessment of cloud environments. Using the APIs exposed by cloud providers, Scout Suite gathers configuration data for manual inspection and highlights risk areas. Rather than going through dozens of pages on the web consoles, Scout Suite presents a clear view of the attack surface automatically.

The following cloud providers are currently supported/planned:

- Amazon Web Services
- Microsoft Azure
- Google Cloud Platform
- Alibaba Cloud (alpha)
- Oracle Cloud Infrastructure (alpha)

[GitHub - nccgroup/ScoutSuite: Multi-Cloud Security Auditing Tool](https://github.com/nccgroup/ScoutSuite)

[Docker Image · nccgroup/ScoutSuite Wiki · GitHub](https://github.com/nccgroup/ScoutSuite/wiki/Docker-Image)

#### Running scoutsuite (Download scoutsuite repo)

```bash
python scout.py aws --profile zen

# View a summary of image vulnerabilities and recommendations
docker scout quickview clickhouse/clickhouse-server

# View vulnerabilities
docker scout cves clickhouse/clickhouse-server

# View base image update recommendations
docker scout recommendations clickhouse/clickhouse-server
```

https://github.com/tensult/cloud-reports

[**https://www.verygoodsecurity.com/control**](https://www.verygoodsecurity.com/control)

https://github.com/toniblyx/my-arsenal-of-aws-security-tools

https://cloudcustodian.io

### OpenSCAP

Security Content Automation Protocol ([SCAP](https://www.open-scap.org/#)) is U.S. standard maintained by National Institute of Standards and Technology ([NIST](https://www.open-scap.org/#)).

[GitHub - OpenSCAP/openscap: NIST Certified SCAP 1.2 toolkit](https://github.com/OpenSCAP/openscap)

## Compliances

### PCI Compliance
Expand Down
105 changes: 105 additions & 0 deletions docs/cloud/aws/security-identity-compliance/tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Tools

## AWS Audit Manager

![aws-audit-manager](../../../media/Screenshot%202023-12-08%20at%206.33.06PM.jpg)

[AWS Audit Manager Demo 2021 | Amazon Web Services - YouTube](https://www.youtube.com/watch?v=v2o1d76ZSf8&ab_channel=AmazonWebServices)

## AWS Security Hub

Automate AWS security checks and centralize security alerts

#### Features

1. Simple multi-account setup via AWS Organizations
2. Cross-region and cross-account aggregation of findings
3. Automated security checks (standards and controls)
4. Integrations with AWS services and partner products for finding aggregation
5. Automated response and remediation

#### Key use cases

- CSPM - Cloud Security Posture Management
- SIEM - Security Information and Event Management
- SOAR - Security Orchestration, Automation, and Response

[AWS Security Hub](https://aws.amazon.com/security-hub/)

[An Overview of AWS Security Hub | Amazon Web Services - YouTube](https://www.youtube.com/watch?v=oBac-GAoZJ8&ab_channel=AmazonWebServices)

## Security Hub vs Audit Manager

For small organizations with not a lot of assets and findings that Security Hub on its own is probably sufficient. For larger organizations or those that have lots of assets and finding, Audit Manager can be extremely helpful on cutting down the noise of everything else and helping your or your external auditors focus on their task at hand.

[AWS Audit Manager vs Security Hub : r/aws](https://www.reddit.com/r/aws/comments/w55i9m/aws_audit_manager_vs_security_hub/)

## ScoutSuite

Scout Suite is an open source multi-cloud security-auditing tool, which enables security posture assessment of cloud environments. Using the APIs exposed by cloud providers, Scout Suite gathers configuration data for manual inspection and highlights risk areas. Rather than going through dozens of pages on the web consoles, Scout Suite presents a clear view of the attack surface automatically.

The following cloud providers are currently supported/planned:

- Amazon Web Services
- Microsoft Azure
- Google Cloud Platform
- Alibaba Cloud (alpha)
- Oracle Cloud Infrastructure (alpha)

[GitHub - nccgroup/ScoutSuite: Multi-Cloud Security Auditing Tool](https://github.com/nccgroup/ScoutSuite)

[Docker Image · nccgroup/ScoutSuite Wiki · GitHub](https://github.com/nccgroup/ScoutSuite/wiki/Docker-Image)

### Running scoutsuite (Download scoutsuite repo)

```bash
python scout.py aws --profile zen

# View a summary of image vulnerabilities and recommendations
docker scout quickview clickhouse/clickhouse-server

# View vulnerabilities
docker scout cves clickhouse/clickhouse-server

# View base image update recommendations
docker scout recommendations clickhouse/clickhouse-server
```

https://github.com/tensult/cloud-reports

[**https://www.verygoodsecurity.com/control**](https://www.verygoodsecurity.com/control)

https://github.com/toniblyx/my-arsenal-of-aws-security-tools

https://cloudcustodian.io

## OpenSCAP

Security Content Automation Protocol ([SCAP](https://www.open-scap.org/#)) is U.S. standard maintained by National Institute of Standards and Technology ([NIST](https://www.open-scap.org/#)).

[GitHub - OpenSCAP/openscap: NIST Certified SCAP 1.2 toolkit](https://github.com/OpenSCAP/openscap)

## Trivy

Trivy is a comprehensive and versatile security scanner. Trivy has _scanners_ that look for security issues, and _targets_ where it can find those issues.

Targets (what Trivy can scan):

- Container Image
- Filesystem
- Git Repository (remote)
- Virtual Machine Image
- Kubernetes
- AWS

Scanners (what Trivy can find there):

- OS packages and software dependencies in use (SBOM)
- Known vulnerabilities (CVEs)
- IaC issues and misconfigurations
- Sensitive information and secrets
- Software licenses

[GitHub - aquasecurity/trivy: Find vulnerabilities, misconfigurations, secrets, SBOM in containers, Kubernetes, code repositories, clouds and more](https://github.com/aquasecurity/trivy)

[Trivy Home - Trivy](https://trivy.dev/)
2 changes: 2 additions & 0 deletions docs/computer-science/security/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,5 @@ Mobile device management (MDM) is a proven methodology and toolset used to provi
## Others

[Security / Identity / Compliance](cloud/aws/security-identity-compliance/intro.md)

[Security Tools](cloud/aws/security-identity-compliance/tools.md)
6 changes: 6 additions & 0 deletions docs/courses/microsoft-excel-google-sheets.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ Rows - 1,048,576- Text to column

## Shortcuts

### gsheet

- `cmd + opt + =` - Insert 1 row above / Insert 1 column left based on selection (either row or column or cell)

### excel

- cmd + fn + up/down - move between sheets
- fn + f4 - locking the cell
- fn + f2 - edit the cell
Expand Down
Loading

0 comments on commit 35736e1

Please sign in to comment.