This file contains hidden or 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
# Encrypted Message Decoder | |
# Arda Mavi | |
def decode(encrypted_binary_message, key): | |
# Key to binary: | |
binary_key = " ".join('{0:08b}'.format(ord(one_char), 'b') for one_char in key) + " " | |
# Decode encrypted message with using key and XOR gate: |
This file contains hidden or 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
def get_3d_u_net(data_shape): | |
inputs = Input(shape=(data_shape)) | |
conv_block_1 = Conv3D(32, (3, 3, 3), strides=(1, 1, 1), padding='same')(inputs) | |
conv_block_1 = Activation('relu')(conv_block_1) | |
conv_block_1 = Conv3D(32, (3, 3, 3), strides=(1, 1, 1), padding='same')(conv_block_1) | |
conv_block_1 = Activation('relu')(conv_block_1) | |
pool_block_1 = MaxPooling3D(pool_size=(2, 2, 2), strides=(2, 2, 2))(conv_block_1) |
This file contains hidden or 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
# Arda Mavi | |
import os | |
from keras.models import Model | |
from keras.optimizers import Adam | |
from keras.models import model_from_json | |
from keras.layers import Input, Conv2D, UpSampling2D, Activation, MaxPooling2D, Flatten, Dense, concatenate, Dropout | |
def save_model(model, path='Data/Model/', model_name = 'model', weights_name = 'weights.h5'): | |
if not os.path.exists(path): |
This file contains hidden or 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
<html> | |
<head> | |
<title>Arda Mavi - App</title> | |
</head> | |
<body> | |
<center> | |
<a style="text-decoration: none; font-size: 6em;" href="/"> | |
<span style="color:#fc4f3f;">Arda Mavi</span> <span style="color:#808080"></span> <span style="color:#3377CC;">App</span> | |
</a> | |
<br/><br/><br/> |
This file contains hidden or 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
# Arda Mavi | |
# For https://github.com/ardamavi/Sign-Language-Digits-Dataset | |
import os | |
import cv2 | |
import platform | |
import numpy as np | |
from scipy.misc import imresize, imsave | |
img_size = 100 |
This file contains hidden or 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
# Arda Mavi | |
import mvnc.mvncapi as mvnc | |
# Devices List: | |
def get_devices_list(): | |
devices = mvnc.EnumerateDevices() | |
if len(devices) == 0: | |
print('Not found any Intel Movidius NCS device!') | |
return None |
This file contains hidden or 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
# Arda Mavi | |
import os | |
import numpy as np | |
from os import listdir | |
from scipy.misc import imread, imresize | |
from keras.utils import to_categorical | |
from sklearn.model_selection import train_test_split | |
# Settings: | |
img_size = 64 |
This file contains hidden or 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
# Arda Mavi | |
import os | |
import sys | |
from keras.models import Model | |
from keras.layers import Input, Conv2D, MaxPooling2D, Activation, Flatten, Dense, Dropout | |
from keras.models import model_from_json | |
def save_model(model, path='Data/Model'): | |
if not os.path.exists(path): | |
os.makedirs(path) |
This file contains hidden or 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
# Arda Mavi | |
import string | |
import numpy as np | |
characters = string.printable # All printable characters. | |
token_index = dict(zip(range(0, len(characters)), characters)) | |
max_word = 140 | |
max_length = 80 | |
char_len = 100 #len(token_index) |
This file contains hidden or 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
""" | |
By Arda Mavi | |
github.com/ardamavi | |
Using: | |
# Encoder: | |
If you want to encode your sentence, use this command: encode(<your_sentence>) | |
Example: | |
Your Sentence: "ar ma" | |
Return: [[0.0, 0.6538461538461539], [0.46153846153846156, 0.0]] |
NewerOlder