Skip to content

Instantly share code, notes, and snippets.

:octocat:
ikigai

Sanzhar Askaruly tuttelikz

:octocat:
ikigai
Block or report user

Report or block tuttelikz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tuttelikz
tuttelikz / labels_multiple_if.py
Created Jan 20, 2018
Python line for creating list with multiple conditions
View labels_multiple_if.py
['yes' if v == 1 else 'no' if v == 2 else 'idle' for v in l]
@tuttelikz
tuttelikz / rename_folder.sh
Last active Jan 20, 2018
Bash command to rename folder
View rename_folder.sh
mv /home/user/oldname /home/user/newname
@tuttelikz
tuttelikz / sort_create_label_write_text.py
Created Jan 20, 2018
Simple gist for opening directory, sorting and writing text
View sort_create_label_write_text.py
import glob
from PIL import Image
img_dir_path = 'data_cheek/*.jpg'
train_test_filelist = sorted(glob.glob(img_dir_path))
cheek_label_list = [0 if "old" in files else 1 for files in train_test_filelist]
thefile = open('data_cheek.txt', 'w')
for item in cheek_label_list:
@tuttelikz
tuttelikz / copy_with_new_name.sh
Created Jan 21, 2018
Bash command to copy with new name
View copy_with_new_name.sh
cp program3.cpp homework6.cpp
@tuttelikz
tuttelikz / open_with_subl.sh
Created Jan 21, 2018
Bash command to open with sublime
View open_with_subl.sh
subl cnn_region_v2_batchnorm.py
View delete_all_files.sh
#Bash to delete with user confirmation
rm /path/to/directory/*
#Bash to delete without asking
rm -rf /path/to/directory/*
@tuttelikz
tuttelikz / tensorboard_simple.py
Created Jan 21, 2018
Gist for simple model visualization in TensorBoard
View tensorboard_simple.py
# View more python learning tutorial on my Youtube and Youku channel!!!
# Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg
# Youku video tutorial: http://i.youku.com/pythontutorial
"""
Please note, this code is only for python 3+. If you are using python 2+, please modify the code accordingly.
"""
from __future__ import print_function
import tensorflow as tf
@tuttelikz
tuttelikz / multiple_graphs_tensorboard.py
Created Jan 21, 2018
This is a snippet example how to create multiple accuracies on same plot in Tensorboard
View multiple_graphs_tensorboard.py
train_summary = tf.Summary()
train_summary.value.add(tag="%sAccuracy" % fold,simple_value=avg_train_acc)
train_summary.value.add(tag="%sLoss" % fold,simple_value=avg_train_loss)
train_writer.add_summary(train_summary,epoch)
test_summary = tf.Summary()
test_summary.value.add(tag="%sAccuracy" % fold,simple_value=avg_test_acc)
test_summary.value.add(tag="%sLoss" % fold,simple_value=avg_test_loss)
test_writer.add_summary(test_summary,epoch)
@tuttelikz
tuttelikz / conda_tensorflow_activate.sh
Created Jan 21, 2018
command to activate tensorflow environment
View conda_tensorflow_activate.sh
# Activation:
source activate tensorflow
# Deactivation:
source deactivate
@tuttelikz
tuttelikz / tensorboard_activate.sh
Created Jan 21, 2018
Activate tensorboard command
View tensorboard_activate.sh
#Navigate to the folder and define your logs folder
tensorboard --logdir="logs"
You can’t perform that action at this time.