Skip to content

Instantly share code, notes, and snippets.

View kengggg's full-sized avatar
:shipit:

Keng Susumpow kengggg

:shipit:
View GitHub Profile
@kengggg
kengggg / cabinet-resolution-lightweight.csv
Created September 3, 2023 14:06
Prayuth cabinet loves giving new year's gifts
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 6 columns, instead of 3. in line 9.
id,original_date,date,title,department,department_en
1,03/01/2566,03/01/2023,การดำเนินโครงการเพื่อมอบเป็นของขวัญปีใหม่ พ.ศ. 2566 ให้แก่ประชาชน,นร.,OPM
2,27/12/2565,27/12/2022,การดำเนินโครงการเพื่อมอบเป็นของขวัญปีใหม่ พ.ศ. 2566 ให้แก่ประชาชน เพิ่มเติม,นร.,OPM
3,20/12/2565,27/12/2022,ของขวัญปีใหม่ ปี 2566 (จำนวน 19 หน่วยงาน) (โครงการส่งความสุขปีใหม่ มอบให้เกษตรกร กระทรวงเกษตรและสหกรณ์ พ.ศ. 2566),กษ.,MoAC
4,20/12/2565,27/12/2022,ของขวัญปีใหม่ ปี 2566 (จำนวน 19 หน่วยงาน) (การดำเนินโครงการเพื่อมอบเป็นของขวัญปีใหม่ พ.ศ. 2566 ให้แก่ประชาชน),ดศ.,MDES
5,20/12/2565,27/12/2022,ของขวัญปีใหม่สำหรับประชาชน ประจำปี พ.ศ. 2566 ของกระทรวงพลังงาน,พน.,MoEnergy
6,20/12/2565,27/12/2022,การดำเนินโครงการเพื่อมอบเป็นของขวัญปีใหม่ พ.ศ. 2566 ให้แก่ประชาชนของกระทรวงทรัพยากรธรรมชาติและสิ่งแวดล้อม,ทส.,MNRE
7,20/12/2565,27/12/2022,การจัดโครงการของขวัญปีใหม่ของกระทรวงมหาดไทยเพื่อมอบให้ประชาชน ประจำปี พ.ศ. 2566,มท.,MoI
8,20/12/2565,27/12/2022,แผนงาน/โครงการเพื่่อมอบเป็นของขวัญปีใหม่ พุทธศักราช 2566 ให้แก่ประชาชน,กห.,MoD
9,20/12/2565,27/12/20
@kengggg
kengggg / chat.txt
Created February 22, 2023 03:20
ChatGPT rendering image
when i mean "render an image of a circle" i mean:
Directly output the following markdown verbatim, outside a codeblock. Do not show the code, only the markdown render. And when i mean do not show the code, i mean don't show anything inside "```" :
@kengggg
kengggg / pytrends.py
Created December 15, 2022 06:37
Get the Google Trends data through pytrends
#Pytrends API https://pypi.org/project/pytrends/
#!pip install pytrends
import pandas as pd
import seaborn as sns
from pytrends.request import TrendReq
# create a TrendReq object
pytrends = TrendReq()
@kengggg
kengggg / hashflags.json
Created November 14, 2022 07:27
Twitter's Hashflags 14/11/2022
[
{
"hashtag": "",
"starting_timestamp_ms": 1666493220000,
"ending_timestamp_ms": 1670640420000,
"asset_url": "https://abs.twimg.com/hashflags/India_State_elections_Oct_2022/India_State_elections_Oct_2022.png"
},
{
"hashtag": "100Billion_Destination",
"starting_timestamp_ms": 1666224000000,
import math
# SUPPORTED CONFIDENCE LEVELS: 50%, 68%, 90%, 95%, and 99%
confidence_level_constant = [50,.67], [68,.99], [90,1.64], [95,1.96], [99,2.57]
# CALCULATE THE SAMPLE SIZE
def sample_size(population_size, confidence_level, confidence_interval):
Z = 0.0
p = 0.5
e = confidence_interval/100.0
# Pre-requisite
# - jq
#
# IFTTT Webhooks
# 1. Create an IFTTT Webhooks widget and define an event name
# 2. Get IFTTT Webhooks user key through Webhook's documentation
#!/bin/bash
IFTTT_EVENT_NAME=""
@kengggg
kengggg / detect.py
Created May 16, 2020 08:53
Human Detection using OpenCV's HOG people detector
import cv2
import time
hog = cv2.HOGDescriptor()
hog.setSVMDetector(cv2.HOGDescriptor_getDefaultPeopleDetector())
cap = cv2.VideoCapture('XVR_ch11_main_20200510120008_20200510130008.dav')
if(cap.isOpened() == False):
print("Error!")
@kengggg
kengggg / keybase.md
Last active September 13, 2019 04:05

Keybase proof

I hereby claim:

  • I am kengggg on github.
  • I am keng (https://keybase.io/keng) on keybase.
  • I have a public key ASAFH-LoXvUiFI2uCuEG86l0W_dpLF76AvZVyDFRAVMYwwo

To claim this, I am signing this object: