Skip to content

Instantly share code, notes, and snippets.

View rfolk's full-sized avatar

Russell Folk rfolk

View GitHub Profile
@rfolk
rfolk / BlackJackHelper.py
Last active July 22, 2016 20:19
Coder Radio Programming Challenge #001: A Black Jack helper based on http://www.blackjack-chart.com
"""
Russell Folk
Coder Radio, Programming Challenge #001
22 July 2016
"""
def get_recommendation(dealers_card, players_cards):
"""
Look up and return the appropriate recommendation for what move the player
should make according to the dealer's card on display and the player's own
@rfolk
rfolk / matrix.c
Last active December 29, 2015 12:29
Matrix multiplication
#include "matrix.h"
void
allocate_matrix ( Matrix * m , int rows , int cols )
{
int i ;
printf ( "allocating matrix m\n" ) ;
//m = ( Matrix * ) malloc ( sizeof ( Matrix ) ) ;
@rfolk
rfolk / fizzbuzz.py
Created August 13, 2013 01:34
Quick FizzBuzz implementation.
def FizzBuzz ( num ) :
if i % 5 == 0 :
print ( "Fizz" , end = "" )
if i % 3 == 0 :
print ( "Buzz" , end = "")
number = 1000
for i in range ( number ) :
print ( str ( i ) + ": " , end = "" )
FizzBuzz ( i )