Skip to content

Instantly share code, notes, and snippets.

View ovidiucp's full-sized avatar

Ovidiu Predescu ovidiucp

View GitHub Profile
@ovidiucp
ovidiucp / bashrc.sh
Last active May 21, 2018 07:27
Generate random password of specified length (default 12 characters)
# Put this file in your ~/.bashrc. To invoke type in the command line:
#
# genpasswd
#
# The default password length is 12 characters. If need it longer:
#
# genpasswd 24
function genpasswd() {
local numchars=$1
@ovidiucp
ovidiucp / u4q19.py
Created March 15, 2012 04:57
Answer to Udacity CS373 unit4-19 quiz
# ----------
# User Instructions:
#
# Implement the function optimum_policy2D() below.
#
# You are given a car in a grid with initial state
# init = [x-position, y-position, orientation]
# where x/y-position is its position in a given
# grid and orientation is 0-3 corresponding to 'up',
# 'left', 'down' or 'right'.