Tuuba Time: 2026-11-10 05:15:44 | Local Time: 2026-11-10 03:15:44

You are not logged in.

#77 Re: Off Topic » ITT: Pretend we are still writing in osu! OT » 2017-10-11 23:08:21

>nano
>hacker
:----------D

meanwhile:

def checkSudoku(fName):
	sudokuNumbers = []
	with open(fName, 'r', encoding="utf-8") as f:
		for line in f:
			for char in line:
				if char.isnumeric():
					sudokuNumbers.append(int(char))

	sudokuRows = [sudokuNumbers[i:i + 9] for i in range(0, len(sudokuNumbers), 9)]
	sudokuColumns = [[] for i in range(9)]
	for row in sudokuRows:
		for i,col in enumerate(row):
			sudokuColumns[i].append(col)

	sudokuSubgrids = [[] for i in range(9)]
	offset = 0
	for i,row in enumerate(sudokuRows):
		if i % 3 == 0 and i != 0:
			offset += 3
		subgridparts = [row[x:x + 3] for x in range(0, len(row), 3)]
		for j, subgridpart in enumerate(subgridparts):
			for number in subgridpart:
				sudokuSubgrids[j+offset].append(number)

	sudokuSubgridRows = [sudokuSubgrids[i:i + 3] for i in range(0, len(sudokuSubgrids), 3)]

	illegalRows = []
	illegalCols = []
	illegalSubgrids = []
	
	for i,row in enumerate(sudokuRows):
		if len(row) != len(set(row)):
			illegalRows.append(str(i+1))

	for i,col in enumerate(sudokuColumns):
		if len(col) != len(set(col)):
			illegalCols.append(str(i+1))

	for x,subgridRow in enumerate(sudokuSubgridRows):
		for y,subgrid in enumerate(subgridRow):
			if len(subgrid) != len(set(subgrid)):
				illegalSubgrids.append(str([x+1, y+1]))

	if not illegalRows and not illegalCols and not illegalSubgrids:
		print("The sudoku solution is legal")
	else:
		if illegalRows:
			print("Illegal rows: {0}".format(' '.join(illegalRows)))
		if illegalCols:
			print("Illegal columns: {0}".format(' '.join(illegalCols)))
		if illegalSubgrids:
			print("Illegal subgrids: {0}".format(' '.join(illegalSubgrids)))

(takes files with content like: https://u.nya.fi/Te0QMN.txt )

#82 Re: Whatever of importance » Slight downtime » 2017-09-25 23:01:24

Maybe yearly kernel upgrades would be wise.
psyduck

#83 Whatever of importance » Slight downtime » 2017-09-25 21:47:14

zertap
Replies: 2

If you noticed an ~hour long downtime just now it was me upgrading the kernel (with expected difficulties coming up, cursed be the technology of western lands)

Before:

3.14.32-xxxx-grs-ipv6-64

After:

4.12.0-2-amd64

RIP uptime:

22:30:49 up 572 days,  2:51,  2 users,  load average: 0.45, 0.70, 0.81

Also updated Teamspeak from version 3.0.6.x to 3.0.13.8

#84 Re: General Discussion » patch!tuuba [INTEREST CHECK PHASE] » 2017-09-25 10:04:35

Brian OA wrote:

< Would be open to making a new image if preferred

I also got the feeling that NEDM might be able to whip up something worth of making a patch. Maybe you should collaborate :D (if he is still around, can't say I've been actively following stuff happening here)

#86 Re: General Discussion » patch!tuuba [INTEREST CHECK PHASE] » 2017-09-20 09:56:03

I need more badges to sew onto my overalls anyways so yes please. Don't count on me contributing anything other than money tho.

Are you going to order from here? https://merkillinen.fi/?languageSelected=1

#88 Re: Off Topic » Animecons - Discussion & photography » 2017-09-14 15:43:29

Oh yeah forgot to post more stuff from cons I went here.
Here's most recent one, Tracon 2017: https://tengu.pw/zp/index.php?album=Con … apcon2017/
And here is more from other conventions: https://tengu.pw/zp/index.php?album=Conventions/

Board footer

Powered by Maki (r-e 139/git:b8267ee)

mascot