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
# https://classroom.udacity.com/courses/cs373/lessons/48646841/concepts/487263470923 | |
# ---------- | |
# User Instructions: | |
# | |
# Define a function, search() that returns a list | |
# in the form of [optimal path length, row, col]. For | |
# the grid shown below, your function should output | |
# [11, 4, 5]. | |
# | |
# If there is no valid path from the start point |
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
# https://classroom.udacity.com/courses/cs373/lessons/48532754/concepts/487174160923 | |
# -------------- | |
# USER INSTRUCTIONS | |
# | |
# Now you will put everything together. | |
# | |
# First make sure that your sense and move functions | |
# work as expected for the test cases provided at the | |
# bottom of the previous two programming assignments. | |
# Once you are satisfied, copy your sense and move |
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 wikitables import import_tables | |
import string | |
import json | |
import sys | |
title_fmt = "Comuni d'Italia (%s)" | |
alphabet=string.ascii_uppercase[:26] | |
titles = [] | |
for i in range(26): | |
ch = alphabet[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
# a copy from https://classroom.udacity.com/courses/cs373/lessons/48696618/concepts/487431440923 | |
# Fill in the matrices P, F, H, R and I at the bottom | |
# | |
# This question requires NO CODING, just fill in the | |
# matrices where indicated. Please do not delete or modify | |
# any provided code OR comments. Good luck! | |
from math import * | |
class matrix: |
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 cs373, my implementation based on | |
# https://classroom.udacity.com/courses/cs373/lessons/48684821/concepts/487362110923 | |
# | |
# The function localize takes the following arguments: | |
# | |
# colors: | |
# 2D list, each entry either 'R' (for red cell) or 'G' (for green cell) | |
# | |
# measurements: | |
# list of measurements taken by the robot, each entry either 'R' or 'G' |
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
# press any key like ESC to exit | |
import matplotlib.pyplot as plt | |
import matplotlib.patches as patches | |
import scipy.misc | |
import glob | |
import os | |
import sys |
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
// Author @patriciogv - 2015 | |
// http://patriciogonzalezvivo.com | |
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform vec2 u_resolution; | |
uniform vec2 u_mouse; | |
uniform float u_time; |
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
# Builds a Libjpeg framework for the OSX. | |
# This is a fork from: | |
# https://gist.github.com/dulaccc/25dbe620422c07e0253e | |
#=============================================================================== | |
export SDKROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.5.sdk" | |
: ${LIB_VERSION:=8d} | |
: ${XCODE_ROOT:=`xcode-select -print-path`} | |
: ${TARBALLDIR:=`pwd`} |
NewerOlder