Skip to content

Instantly share code, notes, and snippets.

View srakrn's full-sized avatar

Sirakorn Lamyai srakrn

View GitHub Profile
@srakrn
srakrn / boostcamp_day6_myCat.py
Created July 28, 2016 11:52
204111 Boost Camp Python Cat
#############################################
#NAME: Sirakorn Lamyai
#ID: 5910500023
#PROGRAM: myCat.py
#DATE: 28 Jul 2016
#############################################
import sys
f = open(sys.argv[1])
array = f.readlines()
@srakrn
srakrn / boostcamp_day6_fibonacci.py
Created July 28, 2016 11:48
204111 Boost Camp Fibonacci Function
#############################################
#NAME: Sirakorn Lamyai
#ID: 5910500023
#PROGRAM: fibonacci.py
#DATE: 28 Jul 2016
#############################################
def fibonacci(n):
if(n==0):
return 0
if(n==1):
@srakrn
srakrn / boostcamp_day6_factorial.py
Created July 28, 2016 11:47
204111 Boost Camp Factorial Function
#############################################
#NAME: Sirakorn Lamyai
#ID: 5910500023
#PROGRAM: factorial.py
#DATE: 28 Jul 2016
#############################################
def factorial(n):
if(n==0):
return 1
if(n==1):
@srakrn
srakrn / calendarPrint.py
Last active July 26, 2016 01:19
Python: Print calendar!
# We gonna use "Tha-yak" (the harder route, yet more simplicity), by loading EPOCH time, the time in seconds from 1 Jan 1970.
# Python's "import" is powerful. Try "import antigravity" for yourself.
import time
import math
# We got the list of months and days in months
# Warning! Python counts from 0, January will by MonthList[0]
nonleapList = [31,28,31,30,31,30,31,31,30,31,30,31]
leapList = [31,28,31,30,31,30,31,31,30,31,30,31]
MonthList = ['January', 'February', 'March', 'April', 'May', 'June', 'July','August', 'September', 'October', 'November', 'December']

Keybase proof

I hereby claim:

  • I am srakrn on github.
  • I am srakrn (https://keybase.io/srakrn) on keybase.
  • I have a public key ASDpetOOYbynriyCzcBUJAwCooJzKDQkGj2SjTVzdQEWgAo

To claim this, I am signing this object: