Skip to content

Instantly share code, notes, and snippets.

View a4vg's full-sized avatar
🦆

Andrea Velásquez a4vg

🦆
View GitHub Profile
@a4vg
a4vg / hangman.py
Last active April 18, 2020 23:01
Simple hangman game
import random
words = ["apple", "bun", "disgusting", "reflect", "whisper", "dinosaurs", "unknown", "knowledgeable", "energetic"]
max_errors = 5
word = random.choice(words)
cur_word = ["_"]*len(word)
errors = 0
attempts = 0
@a4vg
a4vg / template.yaml
Created August 6, 2020 01:19
SAM template for quarkus-amazon-lambda-archetype
---
AWSTemplateFormatVersion: "2010-09-09"
Transform: "AWS::Serverless-2016-10-31"
Globals:
Function:
Timeout: 5
Resources:
QuarkusSam:
Type: "AWS::Serverless::Function"
Properties:
@a4vg
a4vg / mapper2.py
Last active October 1, 2020 01:49
Mapper and reducer
import sys
for line in sys.stdin:
data = line.strip().split("\t")
date, time, store, category, cost, payment = data
print store,"\t",cost