Skip to content

Instantly share code, notes, and snippets.

View dekoza's full-sized avatar
🏠
Working from home

Dominik Kozaczko dekoza

🏠
Working from home
View GitHub Profile
def find_path(graph, start, end, path=None):
if path is None:
path = []
path = path + [start]
if start == end:
return path
if start not in graph:
return None
for node in graph[start]:
if node not in path:

Keybase proof

I hereby claim:

  • I am dekoza on github.
  • I am minder (https://keybase.io/minder) on keybase.
  • I have a public key whose fingerprint is B728 5613 6039 4683 5B9F 7241 599F D881 A588 E191

To claim this, I am signing this object:

@dekoza
dekoza / Dc4c-0.py
Created September 19, 2016 07:18
https://repl.it/Dc4c/0 created by dekoza
from random import randint
liczba = randint(1,100)
zgad = int(input("zgadnij liczbe: "))
while zgad != liczba:
if zgad > liczba:
print("za duzo")
else:
print("za malo")
zgad = int(input("zgadnij liczbe: "))
@dekoza
dekoza / dane.txt
Created November 30, 2016 06:50
null created by dekoza - https://repl.it/E9Dj/7
10 20 30
7 2 1
5 11 8
@dekoza
dekoza / Klasy i karty.py
Created December 19, 2016 08:11
Klasy i karty created by dekoza - https://repl.it/EpjA/21
class Karta(object):
nazwy = ["nic", "As", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Walet", "Dama", "Król"]
kolory = ["Kier", "Karo", "Pik", "Trefl"]
def __init__(self, wartosc, kolor):
self.wartosc = wartosc
self.kolor = kolor
def wypisz(self):
print(self) # tutaj już skorzystamy z __str__
@dekoza
dekoza / Klasy i karty.py
Created December 19, 2016 08:12
Klasy i karty created by dekoza - https://repl.it/EpjA/21
class Karta(object):
nazwy = ["nic", "As", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Walet", "Dama", "Król"]
kolory = ["Kier", "Karo", "Pik", "Trefl"]
def __init__(self, wartosc, kolor):
self.wartosc = wartosc
self.kolor = kolor
def wypisz(self):
print(self) # tutaj już skorzystamy z __str__
@dekoza
dekoza / usbloadergx_hdd.md
Created January 15, 2017 21:04 — forked from joshenders/usbloadergx_hdd.md
How to format a USB drive for storing GameCube games

Why do we change the cluster size when formatting USB drives for storing GameCube games?

For loading GC Games with USBLoaderGX via DiosMios/Nintendont, format your usb drive's primary partition as FAT32 with 32KB clusters (also known as blocks). This increases performance by reducing the NUMBER of transactions required to perform a read/write operation at the expense of the (very negligible) LENGTH of time to complete a transaction; since it's reading more data per transaction.

I'm not certain, since I can't find a GameCube disk specification, but I don't think the 32KB cluster size is an attempt to imitate the on-disk storage format of retail GameCube discs; which may or may not be 32KB. Retail Wii discs however, actually DO use 32KB clusters. As far as I can tell, 32KB is simply the highest density of bytes per cluster that is supported by FAT32 and of course, by extension, Wii homebrew storage libraries.

If you're concerned about storage efficiency

WSP_A = WSP_B = R = 200
plik = open("punkty.txt")
punkty = []
for para in plik:
x, y = para.split()
x, y = int(x), int(y)
punkty.append([x, y])
def brzegowe():
from random import choice # zwraca losowy element z listy
from numpy import array # macierz (typ danych)
from numpy import dot # iloczyn skalarny
from numpy import random # losowanie macierzy (niestety konflikt nazw)
dane_treningowe = [ # modelujemy AND
[array([1, 0, 0]), 0], # pierwszy element to wzbudzenie, zawsze równy 1
(array([1, 1, 1]), 1),
(array([1, 1, 0]), 1),
(array([1, 0, 1]), 1),
@dekoza
dekoza / ahes
Created September 1, 2017 10:37
minder@mindstorm ~/projekty/own/ahes
$ tree
.
├── mojaapka
│   ├── __init__.py
│   └── moj_modul.py
└── skrypt.py
1 directory, 3 files
minder@mindstorm ~/projekty/own/ahes