This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
N = 8 # 8 queens on 8x8 board | |
import time | |
def verifyPos(newColPos, rowPos): | |
for colPos in range(newColPos): | |
if queens[colPos] == rowPos or abs(colPos - newColPos) == abs(queens[colPos] - rowPos): | |
return False | |
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Wa-Tor | |
https://en.wikipedia.org/wiki/Wa-Tor | |
This version utilizes 1 list and 2 deques to achieve O(n) complexity. | |
Install Pygame: | |
``` | |
pip install pygame | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Conway's Game of Life | |
Install Pygame: | |
``` | |
pip install pygame | |
``` | |
''' | |
# game configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using minikube: | |
# | |
# ------------------------------ | |
# minikube start | |
# minikube dashboard | |
# minikube addons enable ingress | |
# kubectl apply -f echo.yaml | |
# minikube tunnel --cleanup | |
# kubectl delete -f echo.yaml | |
# minikube stop |