Skip to content

Instantly share code, notes, and snippets.

View titipata's full-sized avatar
:octocat:

Titipat Achakulvisut titipata

:octocat:
View GitHub Profile
Theme1 Topic1 SubTopic1 n_submission
Theme A: Development A.01. Neurogenesis and Gliogenesis A.01.a. Nervous system patterning and developmental cell death 13
Theme A: Development A.01. Neurogenesis and Gliogenesis A.01.b. Proliferation: Self-renewal and cell cycle 10
Theme A: Development A.01. Neurogenesis and Gliogenesis A.01.c. Proliferation: Molecular mechanisms 10
Theme A: Development A.01. Neurogenesis and Gliogenesis A.01.d. Cell lineage 17
Theme A: Development A.01. Neurogenesis and Gliogenesis A.01.e. Mechanisms of cell fate 31
Theme A: Development A.01. Neurogenesis and Gliogenesis A.01.f. Cell migration 18
Theme A: Development A.01. Neurogenesis and Gliogenesis A.01.g. Neuronal differentiation 31
Theme A: Development A.01. Neurogenesis and Gliogenesis A.01.h. Glial differentiation and interaction with neurons 21
Theme A: Development A.02. Postnatal Neurogenesis A.02 b. Postnatal neurogenesis: Molecular mechanisms 23
[{'description': 'บริษัทไปรษณีย์ไทย',
'vertices': [(528, 202), (741, 202), (741, 222), (528, 222)]},
{'description': 'จํากัด',
'vertices': [(754, 204), (809, 204), (809, 222), (754, 222)]},
{'description': 'พุทธมณฑล',
'vertices': [(562, 240), (686, 237), (686, 254), (562, 257)]},
{'description': '73170',
'vertices': [(707, 234), (777, 232), (777, 253), (707, 255)]},
{'description': 'สาขาที่',
'vertices': [(494, 261), (578, 261), (578, 291), (494, 291)]},
person_id person_id_to_meet
4 9;27;131;202;284;332;383;442;456;487
5 24;99;129;155;268;278;319;505;516;554
7 49;198;226;272;288;341;588;593;595;614
9 4;27;98;177;233;268;309;487;520;551
10 137;143;176;212;460;472;515;598;606;618
12 121;151;156;312;315;316;362;511;543;554
15 97;98;217;225;231;288;438;477;520;542
17 49;105;337;340;375;412;525;548;579;586
18 23;112;314;526;572;578;596;611;625;626
import os
import json
import torch
import deepcut
import numpy as np

# load model and corpus
device = torch.device("cpu")
with open('./thai-song-model.pt', 'rb') as f:
# -*- coding: utf-8 -*-
"""
A backend service for Penn event calendar
Run the app:
$ python api.py
This will serve on localhost:5000.
"""
import os

Thai songs similarity (experiment)

Create affinity matrix from Thai songs' spectogram

import os
import cv2
from skimage.measure import compare_ssim

dir_name = '/path/to/thaisongs/'
@titipata
titipata / convert_spectogram.md
Last active May 4, 2018 09:02
Convert MP4 to Spectogram

Convert files in MP4 folder to FLAC

Scipt to convert

import os
from glob import glob
import subprocess

MP4_PATH = '~/Desktop/notebooks/mp4/*.m4a' # path to all mp4 files

Pretrain bin to txt

Function to turn word vector from http://bio.nlplab.org/#word-vectors into text file format so that easily read.

def w2v_binary_to_text(file_path):
    """
    Function to transform binary file of word vector file
    to text file format
    Ref: http://bio.nlplab.org/#word-vectors

Script for scraping train arrival time

Get list of date from today until 250 days before.

import requests
import time
import datetime

numdays = 250
best deepcut
วิทยาลัย| |มหาวิทยาลัยเชียงใหม่|ความ|นำ|การ|รั วิทยาลัย| |มหาวิทยาลัย|เชียงใหม่|ความ|นำ|การ|รั
ย่าง|ไม่|ตั้งใจ| |เนื่อง|ด้วย|ยัง|ไม่|สามารถ|ควบค ย่าง|ไม่|ตั้งใจ| |เนื่องด้วย|ยัง|ไม่|สามารถ|ควบค
resence|)| |และ|การ|เลือน|หาย| |(|absence|)| |ของ|วัต resence|)| |และ|การ|เลือนหาย| |(|absence|)| |ของ|วัต
ช่น| |มือ| |เท้า| |ที่|กวัดแกว่ง|เข้า|มา| |ทำ|ให้|ทาร ช่น| |มือ| |เท้า| |ที่|กวัด|แกว่ง|เข้า|มา| |ทำ|ให้|ทาร
่|ความ|สมบูรณ์|พร้อม|แม้|กระทั่ง|ตัวตน|ของ|เขา|เอ ่|ความ|สมบูรณ์|พร้อม|แม้กระทั่ง|ตัวตน|ของ|เขา|เอ
|14|-|16|)| |การ|มอง|แบบ|ขาดๆ หายๆ| |ไม่|ครบถ้วน|ใน|ต |14|-|16|)| |การ|มอง|แบบ|ขาด|ๆ| |หาย|ๆ| |ไม่|ครบถ้วน|ใน|ต
14|-|16|)| |การ|มอง|แบบ|ขาดๆ หายๆ| |ไม่|ครบถ้วน|ใน|ตอ 14|-|16|)| |การ|มอง|แบบ|ขาด|ๆ| |หาย|ๆ| |ไม่|ครบถ้วน|ใน|ตอ
4|-|16|)| |การ|มอง|แบบ|ขาดๆ หายๆ| |ไม่|ครบถ้วน|ใน|ตอน 4|-|16|)| |การ|มอง|แบบ|ขาด|ๆ| |หาย|ๆ| |ไม่|ครบถ้วน|ใน|ตอน
6|)| |การ|มอง|แบบ|ขาดๆ หายๆ| |ไม่|ครบถ้วน|ใน|ตอน|เด็ 6|)| |การ|มอง|แบบ|ขาด|ๆ| |หาย|ๆ| |ไม่|ครบถ้วน|ใน|ตอน|เด็