This file contains hidden or 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 | |
# Generate a summary of contributions to your repository for all users. | |
# The output looks like | |
# User Name: 98187 Added, 70678 Removed, 168865 Modified, 309 Commits | |
# Where Modified = Added + Removed. | |
git log --all --format="%aN" | sort -u | while read author; do | |
stats=$(git log --all --numstat --pretty="%H" --author="$author" --since=1.year | \ | |
awk 'NF==3 {plus+=$1; minus+=$2} NF==1 {total++} END {printf("%d %d %d", plus, minus, total)}') |
This file contains hidden or 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
class GridWorld(): | |
ACTIONS = ['U', 'D', 'L', 'R'] | |
def __init__(self): | |
self.obstacles = [[0, 0, 0, 0, 0, 0, 0, 0, 0], | |
[0, 0, 0, 0, 0, 0, 0, 0, 0], | |
[0, 0, 1, 1, 1, 1, 1, 0, 0], | |
[0, 0, 0, 0, 0, 0, 1, 0, 0], | |
[0, 0, 0, 0, 0, 0, 1, 0, 0], | |
[0, 0, 0, 0, 0, 0, 1, 0, 0], |