Skip to content

Instantly share code, notes, and snippets.

View HrBDev's full-sized avatar

Hamidreza Bayat HrBDev

View GitHub Profile
@HrBDev
HrBDev / n_queens.py
Created August 6, 2018 12:16
A rather simple implementaion of local search algorithm for N queens problem.
from copy import copy
from random import randint
def main():
n = get_input()
if n > 3:
guard_num = -1
new_guard_num = -1
queen_coordinates = {}
@HrBDev
HrBDev / guet.py
Created June 6, 2018 17:38
A python script to run Google's jpeg compressor Guetzli on every jpeg file in a folder and its sub folders.
# -*- coding: utf-8 -*-
import datetime
import os
import sqlite3
import subprocess
DataBase = './Log.sqlite'
db = sqlite3.connect(DataBase)
cursor = db.cursor()