Skip to content

Instantly share code, notes, and snippets.

View LandonTClipp's full-sized avatar

Landon Clipp LandonTClipp

View GitHub Profile
@LandonTClipp
LandonTClipp / in_memory.go
Created September 7, 2020 20:50
github.com/chigopher/pathlib in-memory example
package main
import (
"fmt"
"os"
"github.com/chigopher/pathlib"
"github.com/spf13/afero"
)
@LandonTClipp
LandonTClipp / os.go
Created September 7, 2020 20:45
github.com/chigopher/pathlib os example
package main
import (
"fmt"
"os"
"github.com/chigopher/pathlib"
)
func main() {
// Homework 2
// Image Blurring
//
// In this homework we are blurring an image. To do this, imagine that we have
// a square array of weight values. For each pixel in the image, imagine that we
// overlay this square array of weights on top of the image such that the center
// of the weight array is aligned with the current pixel. To compute a blurred
// pixel value, we multiply each pair of numbers that line up. In other words, we
// multiply each weight with the pixel underneath it. Finally, we add up all of the
// multiplied numbers and assign that value to our output for the current pixel.