Skip to content

Instantly share code, notes, and snippets.

View kunato's full-sized avatar

Kunat Pipatanakul kunato

  • Bangkok, Thailand
View GitHub Profile
@JoshuaPurtell
JoshuaPurtell / odd_one_out_benchmark.py
Created May 13, 2024 19:42
How does GPT-4O's internal state tracking stack up?
import asyncio
import os
import random
import hashlib
from datetime import datetime
from typing import Dict, List, Type
from dotenv import load_dotenv
from loguru import logger
from pydantic import BaseModel
@zippy731
zippy731 / gist:fe62c6f2ca568c95cc9e5e5ddba1fd8e
Created August 26, 2022 04:58
settings for stablediffusion sidescroll demo
{
"batch_name": "StableFun",
"outdir": "/content/drive/MyDrive/AI/StableDiffusion/2022-08/StableFun/",
"save_grid": false,
"save_settings": true,
"save_samples": true,
"display_samples": true,
"n_samples": 1,
"W": 768,
"H": 512,
@jin-zhe
jin-zhe / actionrecognitiondatasets.md
Last active January 20, 2026 11:38
An overview of action recognition datasets and their detection classes

Activity Recognition Datasets

An overview of recent action recognition datasets and their detection classes

Concepts & terminologies:

  • Action: Atomic low-level movement such as standing up, sitting down, walking, talking etc.
  • Activity/event: Higher level occurence then actions such as dining, playing, dancing
  • Trimmed video: A short video clip containing event/action/activity of interest
  • Untrimmed video: A video clip of arbitrary length potentially containing durations without activities of interest
  • Localization: locating an instance of event/action/activity within a video at a spatial or temporal scale
  • Spatial localization: Locating the region/area of an instance of action/activity within a video
@simonw
simonw / how-to-upgrade-heroku-postgresql.md
Last active May 30, 2025 04:49
How to upgrade a Heroku PostgreSQL database to a new plan

How to upgrade a Heroku PostgreSQL database to a new plan

I started a project on a Hobby Dev plan (free, limit 10,000 rows), and then later needed to upgrade it to Hobby Basic ($9/month, limit 10,000,000 rows).

After assigning the new database, I had two databases attached to the application. They looked something like this:

  • HEROKU_POSTGRESQL_OLIVE (postgresql-dimensional-3321) Old, free-tier (Hobby Dev) database
@zshell31
zshell31 / react-native-pinch-zoom.js
Created September 19, 2016 13:32
React Native: how to implement pinch to zoom gesture
/** Links:
* - http://stackoverflow.com/questions/36368919/scrollable-image-with-pinch-to-zoom
* - http://blog.lum.pe/gesture-detection-in-react-native-fixing-unexpected-panning/
*
*/
import React, {Component, PropTypes} from 'react';
import { Text, View, PanResponder, Image } from 'react-native';
function calcDistance(x1, y1, x2, y2) {