Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
deepaksood619 committed Feb 7, 2025
1 parent 70f2c27 commit 4a8acdf
Show file tree
Hide file tree
Showing 14 changed files with 268 additions and 217 deletions.
54 changes: 18 additions & 36 deletions docs/ai/libraries/aws-sagemaker.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,70 +142,52 @@ Preprocess datasets, run inference when you don't need a persistent endpoint, an

## Instances

t - tiny

m - memory optimized

c - compute optimized

p - gpu
- t - tiny
- m - memory optimized
- c - compute optimized
- p - gpu

## Best practices

1. Pick the right size - 5GB default

2. Think: store on EBS /home/ec2-user/SageMaker

3. Add or create git repository

4. Configure security settings
- Encryption
- Root volume access
- Internet access
- VPC Connection

5. Use a lifecycle config
- Create, start notebook
- Install packages, copy data
- Run in background with '&'

6. Attach a portion of a GPU for local inference
- Size, version, bandwidth

## Sagemaker SDK and examples

https://pypi.org/project/sagemaker

[**https://sagemaker.readthedocs.io/en/stable/**](https://sagemaker.readthedocs.io/en/stable/)

https://github.com/aws/sagemaker-python-sdk

https://github.com/aws/amazon-sagemaker-examples

https://github.com/aruncs2005/fraud-detection-workshop.git
- https://pypi.org/project/sagemaker
- [**https://sagemaker.readthedocs.io/en/stable/**](https://sagemaker.readthedocs.io/en/stable/)
- https://github.com/aws/sagemaker-python-sdk
- https://github.com/aws/amazon-sagemaker-examples
- https://github.com/aruncs2005/fraud-detection-workshop.git

## Sagemaker Lifecycle configurations (Auto shutdown)

https://aws.amazon.com/blogs/machine-learning/save-costs-by-automatically-shutting-down-idle-resources-within-amazon-sagemaker-studio

[**https://github.com/aws-samples/sagemaker-studio-auto-shutdown-extension**](https://github.com/aws-samples/sagemaker-studio-auto-shutdown-extension)

https://github.com/aws-samples/amazon-sagemaker-notebook-instance-lifecycle-config-samples

https://github.com/aws-samples/sagemaker-studio-auto-shutdown-extension/tree/main/auto-installer
- https://aws.amazon.com/blogs/machine-learning/save-costs-by-automatically-shutting-down-idle-resources-within-amazon-sagemaker-studio
- [**https://github.com/aws-samples/sagemaker-studio-auto-shutdown-extension**](https://github.com/aws-samples/sagemaker-studio-auto-shutdown-extension)
- https://github.com/aws-samples/amazon-sagemaker-notebook-instance-lifecycle-config-samples
- https://github.com/aws-samples/sagemaker-studio-auto-shutdown-extension/tree/main/auto-installer

## Managed Spot Training

https://towardsdatascience.com/a-quick-guide-to-using-spot-instances-with-amazon-sagemaker-b9cfb3a44a68

https://aws.amazon.com/blogs/aws/managed-spot-training-save-up-to-90-on-your-amazon-sagemaker-training-jobs
- https://towardsdatascience.com/a-quick-guide-to-using-spot-instances-with-amazon-sagemaker-b9cfb3a44a68
- https://aws.amazon.com/blogs/aws/managed-spot-training-save-up-to-90-on-your-amazon-sagemaker-training-jobs

## Others

![image](../../media/AWS-Sagemaker-image7.jpg)

https://aws.amazon.com/blogs/machine-learning/understanding-amazon-sagemaker-notebook-instance-networking-configurations-and-advanced-routing-options

[AWS Innovate | Intro to Deep Learning: Building an Image Classifier on Amazon SageMaker - YouTube](https://www.youtube.com/watch?v=KCzgR7eQ3PY&ab_channel=AmazonWebServices)

[Introducing the next generation of Amazon SageMaker: The center for all your data, analytics, and AI | AWS News Blog](https://aws.amazon.com/blogs/aws/introducing-the-next-generation-of-amazon-sagemaker-the-center-for-all-your-data-analytics-and-ai/)
- https://aws.amazon.com/blogs/machine-learning/understanding-amazon-sagemaker-notebook-instance-networking-configurations-and-advanced-routing-options
- [AWS Innovate | Intro to Deep Learning: Building an Image Classifier on Amazon SageMaker - YouTube](https://www.youtube.com/watch?v=KCzgR7eQ3PY&ab_channel=AmazonWebServices)
- [Introducing the next generation of Amazon SageMaker: The center for all your data, analytics, and AI | AWS News Blog](https://aws.amazon.com/blogs/aws/introducing-the-next-generation-of-amazon-sagemaker-the-center-for-all-your-data-analytics-and-ai/)
2 changes: 2 additions & 0 deletions docs/cloud/others/firebase/firebase-google-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ https://www.freecodecamp.org/news/how-to-use-google-tag-manager-to-maintain-goog

[GitHub - PostHog/posthog: 🦔 PostHog provides open-source web & product analytics, session recording, feature flagging and A/B testing that you can self-host. Get started - free.](https://github.com/PostHog/posthog)

[Sunsetting Kubernetes support for PostHog - PostHog](https://posthog.com/blog/sunsetting-helm-support-posthog)

### MixPanel

Mixpanel helps you learn how people use your app with mobile & web analytics. Instead of tracking page views, you can measure and see how people are actually using your app by tracking actions.
Expand Down
2 changes: 2 additions & 0 deletions docs/cloud/others/low-code-no-code-lcnc.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
- [Dora AI - Generating powerful websites, one prompt at a time](https://www.dora.run/ai)
- [Framer - Start your dream site with AI. Zero code, maximum speed.](https://www.framer.com/)
- [Athos2 Template](https://athos2.framer.website/)
- [Framer Tutorial: Components with Interactions, Variants and Variables - YouTube](https://www.youtube.com/watch?v=2jJkUuWhv70&ab_channel=Framer)
- [Berkeley Square Finance Group (BSFG)](https://bsfg.finance/)

### Others

Expand Down
24 changes: 24 additions & 0 deletions docs/databases/data-warehouses/bigquery/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,30 @@ BigQuery is a serverless data analytics platform. You don't need to provision in
- [Pricing  \|  BigQuery: Cloud Data Warehouse  \|  Google Cloud](https://cloud.google.com/bigquery/pricing)
- [Estimate and control costs  \|  BigQuery  \|  Google Cloud](https://cloud.google.com/bigquery/docs/best-practices-costs)

### Storage pricing

Storage pricing is the cost to store data that you load into BigQuery. You pay for _active storage_ and _long-term_ storage.

- **Active storage** includes any table or table partition that has been modified in the last 90 days.
- **Long-term storage** includes any table or table partition that has not been modified for 90 consecutive days. The price of storage for that table automatically drops by approximately 50%. There is no difference in performance, durability, or availability between active and long-term storage.
- **Metadata storage** includes storage for logical and physical metadata for datasets, tables, partitions, models and functions stored in the BigQuery metastore.

The first 10 GiB of storage per month is free.

**Mumbai (asia-south1)**

| Operation | Pricing |
| -------------------------- | ------------------------ |
| Active logical storage | $0.023 per GiB per month |
| Long-term logical storage | $0.016 per GiB per month |
| Active physical storage | $0.052 per GiB per month |
| Long-term physical storage | $0.026 per GiB per month |
| Metadata storage | $0.052 per GiB per month |

**S3 Standard** - General purpose storage for any type of data, typically used for frequently accessed data - First 50 TB / Month - $0.023 per GB

Pricing is same as AWS S3 Standard storage

## Others

- `BigQuery` should not be used if you expect OLTP behavior or performance.
Expand Down
25 changes: 21 additions & 4 deletions docs/databases/data-warehouses/bigquery/storage-optimizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

Recommendation: Move from Logical to Physical Storage

## Physical vs Logical Storage

In BigQuery, =="logical storage" refers to the uncompressed size of your data, including any data retained for time travel and fail-safe storage, while "physical storage" represents the actual compressed size of the data stored on disk==, meaning it's the amount of space the data physically occupies on Google's servers; essentially, logical storage is the "apparent" size of your data, while physical storage is the "real" size after compression, with logical storage usually being cheaper per gigabyte than physical storage.

### Key differences

- **Size Calculation:** Logical storage is the uncompressed data size, whereas physical storage reflects the compressed size after data optimization.
- **Billing:** By default, BigQuery charges based on logical storage, which means you are not billed for the compression savings. However, you can choose to switch to physical storage billing if you want to pay based on the actual disk space used.
- **Time Travel and Fail-Safe Storage:** When using logical storage, time travel and fail-safe storage are included in the price, but when using physical storage, these features are billed separately at the "active storage" rate.

### When to use which

- **Logical Storage (default):** Use this if you want the simplest billing model and are not overly concerned about optimizing for storage costs, especially if you utilize features like time travel frequently.
- **Physical Storage:** If you have very large datasets with high compression potential and want to minimize storage costs, consider switching to physical storage billing.

## Charges

BigQuery charges based on active logical storage, which is often higher compared to physical storage due to the compression factor. Here’s how you can optimize this:

- **Understand Compression Benefits:** BigQuery's physical storage cost is based on compressed storage. Depending on the compression ratio of your data, you can potentially reduce storage costs significantly. For example, if your data compresses well (as per Bigquery Tables scan), you may only pay a fraction of the logical storage cost.
Expand Down Expand Up @@ -32,7 +49,7 @@ Snapshot Data(us-multi region dataset)

### Cost Comparison

Without Compression (Logical Storage)
#### Without Compression (Logical Storage)

Active logical storage cost:

Expand All @@ -42,7 +59,7 @@ Long-term logical storage cost:

- 287.77 GiB * $0.01/GiB = $2.88 per month

With Compression (Physical Storage)
#### With Compression (Physical Storage)

Active physical storage cost:

Expand All @@ -53,13 +70,13 @@ Long-term physical storage cost:
- 78.74 GiB * $0.02/GiB = $1.57 per month
Savings Analysis

Logical vs. Physical Storage (Active)
#### Logical vs. Physical Storage (Active)

- Logical: $5.75 per month
- Physical: $3.15 per month
- Savings: $5.75 - $3.15 = $2.60 per month

Logical vs. Physical Storage (Long-term)
#### Logical vs. Physical Storage (Long-term)

- Logical: $2.88 per month
- Physical: $1.57 per month
Expand Down
1 change: 1 addition & 0 deletions docs/databases/data-warehouses/clickhouse.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,4 @@ ORDER BY passenger_count;
- [Didi Migrates from Elasticsearch to ClickHouse for a new Generation Log Storage System](https://clickhouse.com/blog/didi-migrates-from-elasticsearch-to-clickHouse-for-a-new-generation-log-storage-system)
- [Building a Robust Data Pipeline with Kafka and ClickHouse | The Write Ahead Log](https://platformatory.io/blog/Building-a-Robust-Data-Pipeline-with-Kafka-and-ClickHouse/)
- [First ClickHouse research paper: How do you make a modern data analytics database lightning-fast?](https://clickhouse.com/blog/first-clickhouse-research-paper-vldb-lightning-fast-analytics-for-everyone)
- [Effortlessly Deploying ClickHouse on Kubernetes: A Comprehensive Guide \| by Utkarsh Umang \| Medium](https://medium.com/@luciferutkarsh/effortlessly-deploying-clickhouse-on-kubernetes-a-comprehensive-guide-b54dbd6cdf22)
1 change: 1 addition & 0 deletions docs/economics/course-investing-zerodha-varsity.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,6 @@ https://risk.learnapp.co/quiz
[Introducing Margin Trading Facility (MTF) on Kite – Z-Connect by Zerodha](https://zerodha.com/z-connect/featured/introducing-margin-trade-funding-mtf-on-kite)

- [Understanding Margin Trading Facility (MTF) at Zerodha: A Complete Guide - YouTube](https://www.youtube.com/watch?v=AYDD5b14IUY)
- You can sell shares on Zerodha and then immediately buy the same amount using margin (through the Margin Trading Facility - MTF) before the shares from your initial sale are delivered to your demat account, essentially allowing you to "re-buy" with borrowed funds while the proceeds of your initial sale are still pending; this is often referred to as a "BTST" (Buy Today, Sell Tomorrow) trade.

LAMF - [The Ultimate Guide to Loans Against Mutual Funds 🦁 Best, Quickest & Cheapest Loan - YouTube](https://www.youtube.com/watch?v=yPXAhAdf1-E)
1 change: 1 addition & 0 deletions docs/economics/finance-investing/tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ https://www.tikr.com

### Interactive Brokers (IBKR)

- IBKR strongly discourages third-party deposits
- [Why Interactive Brokers India \| Interactive Brokers India Pvt. Ltd.](https://www.interactivebrokers.co.in/en/whyib/overview-why-ibkr-india.php)
- [Commission Free ETFs \| Interactive Brokers India Pvt. Ltd.](https://www.interactivebrokers.co.in/en/trading/commission-free-etfs-mkt.php)
- [Mutual Funds Outside the US \| Interactive Brokers India Pvt. Ltd.](https://www.interactivebrokers.co.in/en/pricing/commissions-mutual-funds-non-us.php?re=europe)
Expand Down
8 changes: 8 additions & 0 deletions docs/economics/market-terms/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,14 @@ stop loss order

### SL Market

### Advanced

#### What is the disclosed quantity feature and how to use it?

Disclosed quantity feature while placing equity orders allows only a part of the total order quantity to be disclosed to the market as shown in the market depth. Once a part of the order is executed, the next part is disclosed to the market. This feature can be used while placing large orders to reduce impact cost and to get a better execution by disclosing only a portion of the large order in the best bids and offers in the market depth.

[What is the disclosed quantity feature and how to use it?](https://support.zerodha.com/category/trading-and-markets/kite-web-and-mobile/others/articles/what-is-disclosed-quantity-feature-and-how-to-use-it)

## Position

- Intraday - Don't send to demat account
Expand Down
Loading

0 comments on commit 4a8acdf

Please sign in to comment.