This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
x=np.random.randn(10000) | |
## Eğer direk olarak xm = x olarak tanımlanırsa, xm sadece x'in pointer'ını alıyor | |
## Bu şekilde oluşturulduğunda xm değerleri değiştirildiğinde x değerleri de değişeceğinden yanlış sonuçlar alırız | |
xm=list(x); | |
xv=list(x); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
# deviance ve mean buradan giriliyor | |
dev = 10 | |
var = dev ** 2 | |
mean = 3 | |
# örnek kümesinin boyutu | |
size = 150 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate 2 - class problem, using parametric classification | |
import numpy as np | |
den1 = 1 | |
den2 = 0.3 | |
var1 = den1 ** 2 | |
var2 = den2 ** 2 | |
mean1 = 3 | |
mean2 = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
p = 0.2 | |
size = 1000 | |
bern = np.random.binominal(1,p, size) | |
zeros = 0 | |
ones = 0 | |
for item in bern: | |
if item == 0: | |
ones += 1 | |
else: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
# program counter | |
pc = 100 | |
# jump list | |
colonList = list() | |
# param list | |
param = list() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# instruction set for ARM V8 processor | |
instructionSet =[ | |
["B", "000001mmmmmmmmmmmmmmmmmmmmmmmmmm"], | |
["BR", "100001mmmmmmmmmmmmmmmmmmmmmmmmmm"], | |
["EQ", "01000100mmmmmmmmmmmmmmmmmmm00000"], | |
["NE", "01110100mmmmmmmmmmmmmmmmmmm00000"], | |
["GE", "01100100mmmmmmmmmmmmmmmmmmm00000"], | |
["GT", "01010100mmmmmmmmmmmmmmmmmmm00000"], | |
["LE", "01001100mmmmmmmmmmmmmmmmmmm00000"], | |
["LT", "11000100mmmmmmmmmmmmmmmmmmm00000"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Initially PC is set to 100 | |
; Data section is right after the code section | |
.text 100 | |
.global _main | |
_main: | |
ADD R1, R0, #10 ; init i | |
LDR R1, [R0, VAR_i] ; store i | |
ADDI R20, R0, #2 | |
FOR_0: | |
LDR R1, [R0, VAR_i] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from instructionSet import instructionSet | |
# program counter | |
pc = 100 | |
# jump list | |
colonList = list() | |
# var list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import os | |
from instructionSet import instructionSet | |
# program counter | |
pc = 100 | |
# jump list | |
colonList = list() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# instruction set for ARM V8 processor | |
instructionSet =[ | |
["B", "000001mmmmmmmmmmmmmmmmmmmmmmmmmm"], | |
["BR", "100001mmmmmmmmmmmmmmmmmmmmmmmmmm"], | |
["EQ", "01000100mmmmmmmmmmmmmmmmmmmnnnnn"], | |
["NE", "01110100mmmmmmmmmmmmmmmmmmmnnnnn"], | |
["GE", "01100100mmmmmmmmmmmmmmmmmmmnnnnn"], | |
["GT", "01010100mmmmmmmmmmmmmmmmmmmnnnnn"], | |
["LE", "01001100mmmmmmmmmmmmmmmmmmmnnnnn"], | |
["LT", "11000100mmmmmmmmmmmmmmmmmmmnnnnn"], |
OlderNewer