Skip to content

Instantly share code, notes, and snippets.

@FatimaBaballa
FatimaBaballa / 1-sudoku-box.py
Created September 20, 2021 12:49 — forked from primaryobjects/1-sudoku-box.py
Sudoku puzzle convert string of values into a dictionary of key/value pairs. Udacity Artificial Intelligence nanodegree project 1, quiz 1: Encoding the Board.
from utils import *
# `grid` is defined in the test code scope as the following:
# (note: changing the value here will _not_ change the test code)
# grid = '..3.2.6..9..3.5..1..18.64....81.29..7.......8..67.82....26.95..8..2.3..9..5.1.3..'
def grid_values(grid):
"""Convert grid string into {<box>: <value>} dict with '.' value for empties.
Args:
@FatimaBaballa
FatimaBaballa / TextView.java
Created August 9, 2019 14:47 — forked from udacityandroid/TextView.java
Android for Beginners : Simplified TextView class
/**
* Displays text to the user.
*/
public class TextView extends View {
// String value
private String mText;
// Text color of the text
private int mTextColor;