Skip to content

Instantly share code, notes, and snippets.

View kumarsoumya's full-sized avatar
🌊

Soumya Kumar kumarsoumya

🌊
  • ThreatQuotient, Inc.
  • Washington, D.C.
View GitHub Profile
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)
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)
@kumarsoumya
kumarsoumya / gist:7510659
Created November 17, 2013 08:03
Please read the comments at the top.
#!/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
@kumarsoumya
kumarsoumya / gist:7510623
Created November 17, 2013 07:57
Read the comments section at top.
/*
* @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
*
* */