This file contains hidden or 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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <time.h> | |
| #include "sudoku_solver.h" | |
| int fill(sudokuGrid grid, int row, int column, int entry) | |
| { | |
| for (int i = 0; i < DIMENSIONS; i++) { |
This file contains hidden or 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
| import sys | |
| class PegSolitaireBoard: | |
| """Represents a peg solitaire board | |
| """ | |
| def __init__(self): | |
| """Constructor | |
| Returns: |
This file contains hidden or 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
| from fractions import Fraction | |
| from multiprocessing import Process, Pipe | |
| from itertools import izip | |
| class Operations: | |
| # Generalized version that allows for any intermediate values | |
| generalized_preconditions = [ | |
| lambda target, num: True, # num + (target - num) | |
| lambda target, num: num != 0, # num * (target / num) |
This file contains hidden or 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
| import requests | |
| import multiprocessing as mp | |
| url = 'http://earthview.withgoogle.com/download/' | |
| def download_image(n): | |
| try: | |
| f = '%0.4d' % n + '.jpg' | |
| r = requests.get(url+f) |
This file contains hidden or 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
| import numpy | |
| import scipy | |
| import matplotlib | |
| import platform | |
| import sklearn | |
| import sys | |
| print 'python:', sys.version | |
| print 'numpy:', numpy.__version__ | |
| print 'scipy:', scipy.version.full_version |