Skip to content

Instantly share code, notes, and snippets.

@sencagri
sencagri / .py
Created May 24, 2018 23:37
recons test
# -*- coding: utf-8 -*-
"""
Created on Fri May 25 00:18:04 2018
@author: Gurcan
"""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
@sencagri
sencagri / .py
Last active May 24, 2018 23:00
scene recons.
# -*- coding: utf-8 -*-
"""
Created on Fri May 25 00:18:04 2018
@author: Gurcan
"""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from numpy import genfromtxt
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn import datasets, svm
from sklearn.ensemble import GradientBoostingClassifier
from sklearn import tree
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import confusion_matrix
from sklearn.metrics import accuracy_score
@sencagri
sencagri / .py
Last active May 3, 2018 21:01
computer vision 4 5
#!/usr/bin/python
# -*- coding: utf-8 -*-
import cv2
import numpy as np
from sklearn.naive_bayes import GaussianNB
from sklearn.neighbors import KNeighborsClassifier
from sklearn.neural_network import MLPClassifier
shapeData = list()
label = [4,3,2,2,3,3,4,1,2,1,1,1,1,4,4,1,3,1,2,1,1,3,3,4]
# instruction set for ARM V8 processor
instructionSet =[
["B", "000001mmmmmmmmmmmmmmmmmmmmmmmmmm"],
["BR", "100001mmmmmmmmmmmmmmmmmmmmmmmmmm"],
["EQ", "01000100mmmmmmmmmmmmmmmmmmmnnnnn"],
["NE", "01110100mmmmmmmmmmmmmmmmmmmnnnnn"],
["GE", "01100100mmmmmmmmmmmmmmmmmmmnnnnn"],
["GT", "01010100mmmmmmmmmmmmmmmmmmmnnnnn"],
["LE", "01001100mmmmmmmmmmmmmmmmmmmnnnnn"],
["LT", "11000100mmmmmmmmmmmmmmmmmmmnnnnn"],
@sencagri
sencagri / .py
Last active May 1, 2018 18:16
assembler
import re
import os
from instructionSet import instructionSet
# program counter
pc = 100
# jump list
colonList = list()
@sencagri
sencagri / .cs
Created May 1, 2018 13:23
assembler
import re
from instructionSet import instructionSet
# program counter
pc = 100
# jump list
colonList = list()
# var list
; 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]
@sencagri
sencagri / py
Created May 1, 2018 12:20
test
# instruction set for ARM V8 processor
instructionSet =[
["B", "000001mmmmmmmmmmmmmmmmmmmmmmmmmm"],
["BR", "100001mmmmmmmmmmmmmmmmmmmmmmmmmm"],
["EQ", "01000100mmmmmmmmmmmmmmmmmmm00000"],
["NE", "01110100mmmmmmmmmmmmmmmmmmm00000"],
["GE", "01100100mmmmmmmmmmmmmmmmmmm00000"],
["GT", "01010100mmmmmmmmmmmmmmmmmmm00000"],
["LE", "01001100mmmmmmmmmmmmmmmmmmm00000"],
["LT", "11000100mmmmmmmmmmmmmmmmmmm00000"],
import re
# program counter
pc = 100
# jump list
colonList = list()
# param list
param = list()