Skip to content

Instantly share code, notes, and snippets.

View sujay1844's full-sized avatar

Sujay R sujay1844

  • Bangalore, India
View GitHub Profile
@sujay1844
sujay1844 / solver.py
Created August 26, 2024 13:28
Sudoku Solver
def solve_sudoku(puzzle):
def find_empty(puzzle):
for i in range(9):
for j in range(9):
if puzzle[i][j] == 0:
return (i, j)
return None
def is_valid(puzzle, row, col, num):
# check row
chntpw version 1.00 140201, (c) Petter N Hagen
Hive <SYSTEM> name (from header): <SYSTEM>
ROOT KEY at offset: 0x001020 * Subkey indexing type is: 686c <lh>
File size 19660800 [12c0000] bytes, containing 4053 pages (+ 1 headerpage)
Used for data: 282938/18672216 blocks/bytes, unused: 564/494344 blocks/bytes.
Simple registry editor. ? for help.
>
\ControlSet001> Key ControlSet00 not found!
System: Kernel: 5.12.8-arch1-1 x86_64 bits: 64 compiler: gcc v: 11.1.0 Desktop: sway 1.6 Distro: Arch Linux
Machine: Type: Laptop System: Acer product: Swift SF314-42 v: V1.09 serial: <filter>
Mobo: RO model: Kona_RN v: V1.09 serial: <filter> UEFI: Insyde v: 1.09 date: 11/18/2020
Battery: ID-1: BAT1 charge: 35.6 Wh (100.0%) condition: 35.6/47.9 Wh (74.3%) volts: 12.4 min: 11.4 model: Murata AP18C4K
status: Full
CPU: Info: 6-Core model: AMD Ryzen 5 4500U with Radeon Graphics bits: 64 type: MCP arch: Zen 2 rev: 1 cache: L2: 3 MiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 28462
Speed: 1628 MHz min/max: 1400/2375 MHz boost: disabled Core speeds (MHz): 1: 1628 2: 1829 3: 1795 4: 1717 5: 1621
6: 1538
Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Renoir vendor: Acer Incorporated ALI driver: amdgpu v: kernel
[ 0.000000] Linux version 5.12.8-arch1-1 (linux@archlinux) (gcc (GCC) 11.1.0, GNU ld (GNU Binutils) 2.36.1) #1 SMP PREEMPT Fri, 28 May 2021 15:10:20 +0000
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-linux root=UUID=0308e1d7-0cac-4b3d-a651-3f601bb574c4 rw iommu=soft quiet acpi_backlight=vendor
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'compacted' format.
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009efff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009f000-0x00000000000bffff] reserved
-- Journal begins at Tue 2021-05-04 15:58:40 IST, ends at Thu 2021-06-03 11:48:59 IST. --
Jun 03 11:48:58 Stormbreaker kernel: amdgpu 0000:03:00.0: amdgpu: Failed to export SMU metrics table!
Jun 03 11:48:58 Stormbreaker kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jun 03 11:48:51 Stormbreaker kernel: amdgpu 0000:03:00.0: amdgpu: Failed to export SMU metrics table!
Jun 03 11:48:51 Stormbreaker kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jun 03 11:48:44 Stormbreaker kernel: amdgpu 0000:03:00.0: amdgpu: Failed to export SMU metrics table!
Jun 03 11:48:44 Stormbreaker kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the right state!
Jun 03 11:48:37 Stormbreaker kernel: amdgpu 0000:03:00.0: amdgpu: Failed to export SMU metrics table!
Jun 03 11:48:37 Stormbreaker kernel: amdgpu 0000:03:00.0: amdgpu: Msg issuing pre-check failed and SMU may be not in the rig