Skip to content

Instantly share code, notes, and snippets.

View laploy's full-sized avatar
🏠
Working from home

Loy Vanich laploy

🏠
Working from home
View GitHub Profile
@laploy
laploy / diamonds endpoint test.py
Created April 11, 2025 01:27
Python script for diamonds endpoint testing
import urllib.request
import json
data = {
"Inputs": {
"WebServiceInput0":
[
{
"carat": -2.617849,
"cut": "Ideal",
@laploy
laploy / DiamondsTest1.json
Last active April 11, 2025 00:59
Jons data for Diamonds AMLS endpoint test
{
"Inputs": {
"WebServiceInput0":
[
{
"carat": -2.617849,
"cut": "Ideal",
"color": "E",
"clarity": "SI2",
"depth": -0.215863,
@laploy
laploy / GetSaveData-Program.cs
Last active March 18, 2025 21:23
GetSaveData
// laploy@gmail.com Mar 2025
using Azure;
using Azure.Data.Tables;
using Newtonsoft.Json;
using RestSharp;
using System.Net;
namespace testGetApi
{
@laploy
laploy / TestApi-Program.cs
Last active March 18, 2025 21:23
TestApi
// laploy@gmail.com Mar 2025
using RestSharp;
using System.Net;
namespace TestApi
{
internal class Program
{
static async Task Main(string[] args)
{
@laploy
laploy / MinimalAPI-Program.cs
Last active March 18, 2025 21:24
MinimalAPI
// laploy@gmail.com March 2025
namespace MininalApi
{
public class Program
{
public static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
@laploy
laploy / histogram.py
Created March 7, 2025 14:12
Create histogram from CSV in Python
# Loy 2025
# import all modules
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
# Read in the DataFrame
df = pd.read_csv('Titanic-Dataset.csv')
# creating a histogram
@laploy
laploy / loyamlbook.txt
Created February 27, 2025 04:08
เรียนรู้ด้วยตนเอง Azure AI Machine Learning studio
CSViewer https://csviewer.com/
import pandas as pd
def replace_gender(x):
gender = x['Gender']
if gender in ['Male', '0', 'M', 'm', 'A']:
return 'male'
if gender in ['Female', '1', 'F', 'f', 'B']:
return 'female'
def azureml_main(dataframe1 = None, dataframe2 = None):
@laploy
laploy / exc27.csv
Created February 25, 2025 12:24
แบบฝึกหัดที่ 2.7: ฝึกชำระข้อมูลที่ไม่คงเส้นคงวา
ID Name Age Gender
1 Lady 30 Male
2 Boy 20 Female
3 King 40 0
4 Lord 25 1
5 Gay 44 M
6 Queen 52 F
7 Trans 62 m
8 Les 80 f
9 Gaylord 69 A
@laploy
laploy / TestBotApi.cs
Last active February 12, 2025 17:03
วิธีดึงอัตราแลกเปลี่ยนเงินสกุลต่าง ๆ 48 สกุล ไปเป็นเงินบาทผ่าน API ของของธนาคารแห่งประเทศไทย (ธปท.) โดยการเขียนโค้ดภาษา C# แบบ .NET Core ที่สามารถนำไปใช้ในแอพได้ทุกแบบทุกแพลตฟอร์ม
// laploy@gmail.com Feb 2025
using RestSharp;
using System.Net;
namespace TestBot
{
internal class Program
{
static void Main(string[] args)
{