Skip to content

Instantly share code, notes, and snippets.

View wasit7's full-sized avatar

Wasit Limprasert wasit7

View GitHub Profile
@wasit7
wasit7 / Data Ingress and Quality.ipynb
Last active July 29, 2025 17:19
ingress and quality.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

To add a new Django app called auth_app to your existing project running in a Docker Compose setup, follow these steps. Your project already includes a web service for the Django application, a db service for PostgreSQL, and a jupyter service, with the code mounted via volumes. Here's how to integrate the new app seamlessly:


Step-by-Step Guide

1. Create the auth_app Directory

Since your project directory on the host machine is mounted to /usr/src/app inside the web container via the volume .:/usr/src/app:rw, you can create the app on the host machine, and it will automatically appear in the container.

Run the following command in your project directory on the host machine:

Table of Herbs with Thai Names, English Names, Scientific Names, and USPs

Thai Name (ชื่อไทย) English Name Scientific Name Unique Selling Point (USP)
กวาวเครือขาว Pueraria mirifica Pueraria mirifica Rare phytoestrogenic properties targeting women’s libido
ไพล Plai Zingiber cassumunar Lesser-known Thai massage herb for pain and stress relief
โหระพา Holy Basil Ocimum sanctum Adaptogenic power with Thai medicinal heritage
ขมิ้นชัน Turmeric Curcuma longa Curcumin’s proven anti-inflammatory edge
ตะไคร้
@wasit7
wasit7 / draft_research.md
Last active April 6, 2025 13:05
draft_research.md

Summary of Research Plan

Systematic Literature Review for Growth Mindset Development Using Large Language Models to Improve Suicide Attempt Situations Among Females in Thailand

Introduction

  • Objective: Leverage large language models (LLMs) to develop growth mindset interventions, affirmation techniques, and self-compassion training to reduce suicide attempts among young (5-14), teen (15-19), and adult (20-59) females in Thailand, focusing on psychological factors like self-criticism (superego), fixed mindsets, and lack of self-compassion.
  • Data Context: Dashboard shows 6,949 suicide attempts (5-14), 9,510 (15-19), and 15,699 (20-59) in 2567 (2024), with regional variations indicating need for localized strategies.
  • Research Question: How can LLMs facilitate mindset interventions to reduce suicide attempts in these groups?
  • Significance: Bridges Freud/Jung theories with modern AI-driven interventions, offering academic insights and practical public health solutions.

Litera

Below is a comprehensive list of important tables in a Manufacturing Execution System (MES), categorized into dimension tables and fact tables. These tables are essential for managing and tracking manufacturing processes, ensuring quality, monitoring equipment, and handling production data effectively.

Dimension Tables

Dimension tables contain descriptive attributes that provide context to the data in an MES. They typically store static or slowly changing information used to analyze and categorize the measurable data in fact tables.

  1. Product Dimension

    • Stores details about the products being manufactured, such as product ID, name, description, and specifications.

Hands-On Data Lake Versioning with lakeFS: A Comprehensive Tutorial

1.1 Objectives

  • By the end of this lesson, students will be able to set up and run a fully functional lakeFS environment using Docker Compose in local mode.
  • They will understand how lakeFS manages data versioning and integrates with existing data workflows to enhance reliability and reproducibility.
  • Learners will explore essential DevOps practices behind containerized deployments, building confidence in reproducible, self-contained data lake experiments.
  • Students will develop hands-on proficiency in creating repositories, commits, branches, and tags within lakeFS, ensuring a strong foundation for more advanced data engineering topics.

Simple Tutorial: Insert Records into Elasticsearch and Create a Grafana Dashboard

This tutorial will walk you through two key tasks: inserting records into an Elasticsearch index using curl and creating a dashboard in Grafana to visualize that data. This is a beginner-friendly guide, perfect for getting started with these powerful tools for data storage and visualization.


Prerequisites

Before you begin, ensure you have the following:

Title

"Leveraging Data Science to Explore Affirmation Techniques for Mindset Shifts and Health Behavior Improvement"

  • A concise, descriptive title that reflects the study’s focus and approach.

Below is an example of a docker-compose.yml file that sets up an environment for Tutorial 3. In this setup:

  • A PostgreSQL container is provided as the source SQL database.
  • An Nginx container is included to simulate real web-server logs.
  • An Ingestion container runs your Python ingestion script (which uses Ibis with PyArrow to pull SQL data, parses Nginx logs, and fetches weather/air pollution data via the OpenWeatherMap API).
  • A shared volume (named landing_data) is used as the landing zone for all partitioned Parquet outputs.

You can adjust host ports, environment variables, and volume mappings as needed.


Tutorial 3: Data Ingestion Using Ibis with PyArrow, Nginx Logs, and OpenWeatherMap API

Objective

By the end of this tutorial you will be able to:

  • Query and transform SQL data using Ibis and retrieve the results as a PyArrow Table, then write the data to a Hive-partitioned Parquet dataset.
  • Parse Nginx logs (in a common log format) into structured data and persist them in a partitioned Parquet format.
  • Fetch current weather and air pollution data for 77 Thai provinces from the OpenWeatherMap API, while respecting rate limits, and write the results as time-partitioned Parquet files.