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
| { | |
| "metadata": { | |
| "name": "", | |
| "signature": "sha256:71de6f77b06d248aca60a5b61bbff3f9715f168edb8f07fc124ce7fd39612271" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ |
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 util.Random | |
| // not necessary, but my original idea | |
| // class Field(val width: Int, val height: Int, factory: (Int, Int) => Boolean) { | |
| // val grid = tabulate(width, height)(factory) | |
| // more reasonable thing (like what you did) | |
| class Field(val height : Int, val width : Int) { | |
| // kinda funky to read, but its a 2d vector of random booleans |
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 util.Random | |
| class Field(val height : Int, val width : Int, theDecider : (Int, Int) => Boolean) { | |
| val grid = for ( i <- 0 until height ) | |
| yield (for ( j <- 0 until width ) yield theDecider(i,j)) | |
| def isInBounds(row : Int, col : Int) : Boolean = | |
| (0 <= row && row < height) && (0 <= col && col < width) | |
| def isOccupied(row : Int, col : Int) : Boolean = |
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
| ".source.python": | |
| "Function Design Recipe": | |
| "prefix":"recipe" | |
| "body":""" | |
| def ${1:function_name}(${2:parameters}): | |
| \"\"\" ${3:type signature} | |
| ${4:description} | |
| ${5:examples} |
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
| # Chapter 3 Homework assignment | |
| # | |
| # These problems are modified versions of the programming exercises | |
| # in Starting out with Python (2nd edition) by Tony Gaddis. | |
| # | |
| # You should complete the provided functions so that they pass all the | |
| # provided tests. To complete a function, remove the "pass" (which | |
| # is a statement to do nothing) and implement the function. | |
| # | |
| # To test your code, simply run this module. If your module runs |
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 os import system | |
| system("ln -s /Applications/Atom.app/Contents/Resources/app/atom.sh /usr/local/bin/atom") |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>About – Base Camp Coding Academy</title> | |
| </head> | |
| <body> | |
| <a href="https://basecampcodingacademy.org/"> | |
| <img width="300" height="82" src="https://basecampcodingacademy.files.wordpress.com/2015/12/basecamp_weblogo_2.png?w=300&h=82&crop=1" /> |
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
| module Scratch exposing (..) | |
| import Json.Decode exposing (..) | |
| type alias Item a = | |
| { a | |
| | field1 : String | |
| , field2 : String | |
| , field3 : String |
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
| #! /bin/bash | |
| set -e | |
| echo "Downloading libicu55" | |
| curl http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu55_55.1-7ubuntu0.1_amd64.deb > libicu55_55.1-7ubuntu0.1_amd64.deb | |
| echo "Installing libicu55" | |
| sudo dpkg -i libicu55_55.1-7ubuntu0.1_amd64.deb |
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
| if [[ $UID != 0 ]]; then | |
| echo "Please run this script with sudo:" | |
| echo "sudo bash $0" | |
| exit 1 | |
| fi | |
| CODE_URL=https://az764295.vo.msecnd.net/stable/19222cdc84ce72202478ba1cec5cb557b71163de/code_1.12.2-1494422229_amd64.deb | |
| CHROME_URL=https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
| GITKRAKEN_URL=https://release.gitkraken.com/linux/gitkraken-amd64.deb |
OlderNewer