Skip to content

Instantly share code, notes, and snippets.

View alwindoss's full-sized avatar
🎯
Doing what I enjoy

Alwin Doss alwindoss

🎯
Doing what I enjoy
View GitHub Profile
@alwindoss
alwindoss / main.go
Created September 14, 2021 15:51
docker_image_save
package main
import (
"context"
"io"
"os"
"github.com/docker/docker/client"
)
@alwindoss
alwindoss / keybase.md
Last active October 28, 2019 01:11
keybase.md

Keybase proof

I hereby claim:

  • I am alwindoss on github.
  • I am alwindoss (https://keybase.io/alwindoss) on keybase.
  • I have a public key ASAr7cT_ZsN8DRreoHf42ti3sjZ2ViFOGDVMArag7BRKfwo

To claim this, I am signing this object:

This exercise is broken into two parts to help simplify the process of explaining it as well as to make it easier to solve. The second part is harder than the first, so if you get stuck feel free to move on to another problem then come back to part 2 later.
Note: I didn’t break this into multiple exercises like I do for some exercises because both of these combined should only take ~30m to cover in screencasts.
Part 1
Create a program that will read in a quiz provided via a CSV file (more details below) and will then give the quiz to a user keeping track of how many questions they get right and how many they get incorrect. Regardless of whether the answer is correct or wrong the next question should be asked immediately afterwards.
The CSV file should default to problems.csv (example shown below), but the user should be able to customize the filename via a flag.
The CSV file will be in a format like below, where the first column is a question and the second column in the same row is the answer to that que
AAAAAAA1 1.0.1
AAAAAAA2 1.0.1
AAAAAAA3 1.0.1
AAAAAAA4 1.0.3
AAAAAAA5 1.0.1
AAAAAAA6 1.0.1
AAAAAAA7 1.0.1
AAAAAAA8 2.0.1
AAAAAAA9 1.0.1
AAAAAA10 1.0.1
AAAAAAA1 1.0.1
AAAAAAA2 1.0.1
AAAAAAA3 1.0.1
AAAAAAA4 1.0.1
AAAAAAA5 1.0.1
AAAAAAA6 1.0.1
AAAAAAA7 1.0.1
AAAAAAA8 1.0.1
AAAAAAA9 1.0.1
AAAAAA10 1.0.1
@alwindoss
alwindoss / strmatcher.go
Created December 3, 2017 15:56
String Matcher
package main
import "fmt"
func main() {
fmt.Println("Starting")
inp := []byte("alwindoss")
matcher := []byte("alin")
index := 0
matched := false
@alwindoss
alwindoss / understanding_bytes.go
Created January 28, 2017 07:20
understanding bytes
package main
import(
"fmt"
)
func main() {
b := make([]byte, 8)
b = make([]byte, 2)
fmt.Println(b)
@alwindoss
alwindoss / understanding_bytes.go
Created January 28, 2017 07:20
understanding bytes
package main
import(
"fmt"
)
func main() {
b := make([]byte, 8)
b = make([]byte, 2)
fmt.Println(b)