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
package main | |
import ( | |
"golang.org/x/tour/wc" | |
"strings" | |
) | |
func WordCount(s string) map[string]int { | |
words := strings.Fields(s) | |
wordCount := make(map[string]int) |
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
package main | |
import "golang.org/x/tour/pic" | |
func Pic(dx, dy int) [][]uint8 { | |
board := make([][]uint8, dy); | |
for i := range board { | |
board[i] = make([]uint8, dx) | |
for j := range board[i] { | |
board[i][j] = uint8((i * j) / 2) |
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
#!/bin/bash | |
# | |
# This script prints the current temperature of a city(by zip code) by going to | |
# the weather channel homesite and filtering the div container called "current temp:" | |
# This is a modified script file from a course website. | |
# | |
ZIP=$1 | |
URL_WEATHER="http://www.weather.com/weather/today/"$ZIP | |
#echo $URL_WEATHER |
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
/* | |
* @author: Soumya Kumar | |
* | |
* The following program scrapes the webpage "https://lslab.ics.purdue.edu/icsWeb/AvailableStations" | |
* and parses it get the current lab availability information. | |
* | |
* Dependency: Jsoup Parser | |
* | |
* */ |