Skip to content

Instantly share code, notes, and snippets.

View tarunk04's full-sized avatar
:octocat:
Focusing

Tarun Kumar tarunk04

:octocat:
Focusing
View GitHub Profile
@tarunk04
tarunk04 / generate_solved_sudoku.py
Created May 7, 2020 11:12
generate_solved_sudoku
def __generator__(self, grid, i, j):
number = [1, 2, 3, 4, 5, 6, 7, 8, 9]
if j > 8:
j = 0
i += 1
# end condition
if i > 8:
return True
# skipping cell if the cell has already a number
@tarunk04
tarunk04 / solve_sudoku.py
Created May 7, 2020 10:27
recursive function
def __solve_backtrack__(self, i, j, visualize=False):
# Changing row if col index reaches end of the row
if j > 8:
j = 0
i += 1
# end condition
if i > 8:
if visualize == False:
eel.draw_sudoku(self.sudoku_solved)
return True
@tarunk04
tarunk04 / validate.py
Created May 7, 2020 10:23
check sudoku conditions
def validate_cell(self, sudoku_solved, val, i, j):
# getting index for block ( 9 blocks of 3x3 size)
block_i = i // 3
block_j = j // 3
# check block
for b_i in range(block_i * 3, block_i * 3 + 3):
for b_j in range(block_j * 3, block_j * 3 + 3):
if sudoku_solved[b_i][b_j] == val:
return False
@tarunk04
tarunk04 / digit-recognition-tutorial-cnn-99-67-accuracy.ipynb
Last active April 27, 2020 21:15
MNIST data set tutorial. In this notebook, I have covered the necessary steps to approach any Machine Learning Classification Problem. Included Image Visualization for better understanding. Quick Links to the functions I have used to explore it in depth. Basic techniques such as Confusion Matrix, Image Augmentation, etc.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.