I hereby claim:
- I am srakrn on github.
- I am srakrn (https://keybase.io/srakrn) on keybase.
- I have a public key whose fingerprint is 5E3A 7301 F865 7A6A D9DA 3D14 B2D0 EC5D B743 C223
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
def to_signed_bit(x): | |
return format(x & 0xff, '08b') | |
f = open('all_inputs_sra_test.txt', 'w') | |
f.write('A[8] shft[3] out[8]\n') | |
a_values = range(-128, 128) | |
shft_values = range(0, 8) | |
for a in a_values: |
class GCDCalculator: | |
def __init__(self, x, y): | |
self.x = x | |
self.y = y | |
self.gcd = self.gcd_function(x, y) | |
def gcd_function(self, x, y): | |
while y: | |
x, y = y, x%y | |
return x |
def selection_sort(l): | |
for i in range(len(l)-1): | |
minimum = l[i] | |
minimum_pos = i | |
for j in range(i+1, len(l)): | |
if l[j] < minimum: | |
minimum = l[j] | |
minimum_pos = j | |
l[i], l[minimum_pos] = l[minimum_pos], l[i] | |
return l |
def bubble_sort(l): | |
for i in range(len(l)): | |
border = len(l)-i-1 | |
for j in range(border): | |
if l[j] > l[j+1]: | |
l[j], l[j+1] = l[j+1], l[j] | |
return l | |
import random | |
l = [random.randint(1, 20) for _ in range(20)] |
using System; | |
class IntToChar{ | |
public static void Main(string[] args){ | |
int a = 65; | |
char c = (char)a; | |
Console.WriteLine(c); | |
} | |
} |
############################################# | |
#NAME: Sirakorn Lamyai | |
#ID: 5910500023 | |
#PROGRAM: myWc.py | |
#DATE: 28 Jul 2016 | |
############################################# | |
import sys | |
f = open(sys.argv[1]) | |
plain = f.read() |
############################################# | |
#NAME: Sirakorn Lamyai | |
#ID: 5910500023 | |
#PROGRAM: myGrep.py | |
#DATE: 28 Jul 2016 | |
############################################# | |
import sys | |
f = open(sys.argv[1]) | |
keyword = sys.argv[2] |
############################################# | |
#NAME: Sirakorn Lamyai | |
#ID: 5910500023 | |
#PROGRAM: myGrader.py | |
#DATE: 28 Jul 2016 | |
############################################# | |
import sys | |
def grade(score): |
############################################# | |
#NAME: Sirakorn Lamyai | |
#ID: 5910500023 | |
#PROGRAM: myCopy.py | |
#DATE: 28 Jul 2016 | |
############################################# | |
import sys | |
src = sys.argv[1] | |
des = sys.argv[2] |