Skip to content

Instantly share code, notes, and snippets.

View thabresh-s's full-sized avatar

Thabresh Syed thabresh-s

View GitHub Profile
@thabresh-s
thabresh-s / API_chatgpt3.py
Last active April 30, 2024 07:45
ChatGPT3 API Key Access
import requests
import json
import os
api_key = os.environ["api_key"]
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
@thabresh-s
thabresh-s / Python_OOPS.md
Created March 27, 2024 07:01
In Python, Object-Oriented Programming (OOP) is a programming paradigm that allows you to structure your code around objects. Objects are instances of classes, which encapsulate data (attributes) and behavior (methods). Here's a brief overview of how OOP works in Python.
  1. Classes: Classes are blueprints for creating objects. They define the properties (attributes) and behaviors (methods) that objects of that class will have. You define a class using the class keyword.
class MyClass:
    # Constructor method
    def __init__(self, attribute1, attribute2):
        self.attribute1 = attribute1
        self.attribute2 = attribute2

S3 Bucket Setup, IAM Role Creation, and Lambda Function Development

1. S3 Bucket Setup:

  • Bucket Name: my-example-bucket
  • Logging Configuration: Enabled logging to track access requests. image

2. IAM Role Creation:

  • Role Name: LambdaS3Role
  • Permissions Attached:
    • AmazonS3FullAccess

Data Processsing Trechniques

ETL or Extract, Transform, and Load processes are used for cases where flexibility, speed, and scalability of data are important. You will explore some key differences been similar processes, ETL and ELT, which include the place of transformation, flexibility, Big Data support, and time-to-insight. You will learn that there is an increasing demand for access to raw data that drives the evolution from ETL to ELT. Data extraction involves advanced technologies including database querying, web scraping, and APIs. You will also learn that data transformation is about formatting data to suit the application and that data is loaded in batches or streamed continuously.

Learning Objectives

  • Describe what an ETL process is.
  • Explain what data loading means.
  • Describe the trending shift from ETL to ELT.
  • Summarize data extraction techniques.
  • Name data transformation techniques.
@thabresh-s
thabresh-s / probability.py
Created August 25, 2023 05:13
Probability Distribution | Bayesian Probability
import numpy as np
import scipy.stats as stats
import matplotlib.pyplot as plt
# Set a random seed for reproducibility
np.random.seed(42)
# Simulating a normal distribution
mu = 0 # Mean
sigma = 1 # Standard Deviation
@thabresh-s
thabresh-s / statistics_datascience.md
Created August 24, 2023 09:49
Statistics for DS

Statistics plays a crucial role in data science and machine learning. It provides the foundational concepts and techniques for analyzing data, making predictions, and evaluating the performance of machine learning models. Here are some key statistical concepts and techniques that are important for data science and machine learning:

  1. Descriptive Statistics:

    • Mean: The average of a set of data points.
    • Median: The middle value of a dataset when arranged in ascending order.
    • Mode: The most frequently occurring value in a dataset.
    • Variance: A measure of how data points deviate from the mean.
    • Standard Deviation: The square root of the variance, representing the spread of data.
  2. Probability:

@thabresh-s
thabresh-s / FeatureEngineering.py
Last active June 8, 2023 06:27
Feature engineering is a crucial step in the data preprocessing phase of machine learning projects. It involves transforming raw data into meaningful features that can enhance the performance of machine learning models. In this example, let's consider the Titanic dataset from Kaggle, which contains information about the passengers aboard the Tit…
import pandas as pd
import numpy as np
# Load the Titanic dataset
df = pd.read_csv('train.csv')
# Check for missing values
df.isnull().sum()
# Handle missing values in the 'Age' column
@thabresh-s
thabresh-s / exploring-and-modelling-obesity-dataset.ipynb
Created June 6, 2023 17:46
exploring-and-modelling-obesity-dataset.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@thabresh-s
thabresh-s / instagram-time-likes.ipynb
Created June 6, 2023 17:35
Instagram-time-likes.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.