Some codes used in my research projects