Skip to content

Instantly share code, notes, and snippets.

View martyworm's full-sized avatar

Matt Brucato martyworm

View GitHub Profile
/* I started this hangman game when I was about 3 weeks into Harvard's CS50 course
I just watched the "week 6" lecture. I'm very new to programming (about 1 month).
Anyway I'm really proud of this little command line hangman game. */
#define _XOPEN_SOURCE 500
#define MAXWORDLENGTH 12
#define MINWORDLENGTH 3
#define MAXARRAYLENGTH 12
#define MINTRIES 5
@martyworm
martyworm / NYTscrape.py
Last active July 25, 2017 18:16
Gets X amount of article snippets from the NYTimes website and writes all of the words to a CSV file, one word per line
from __future__ import division
from nytimesarticle import articleAPI
import csv
import sys
import re
import urllib.request
import time
import requests
import json
@martyworm
martyworm / Hangmanpy.py
Created July 20, 2017 16:59
Martyworm's hangman in python
import random
from hang_aesthetics import *
def main():
while True:
hangman_word = generate_random()
play_game(hangman_word)
if play_again() == 2:
break
@martyworm
martyworm / nodes2.c
Last active June 8, 2017 00:01
[c] Linked list working as intended now
#include <stdlib.h>
#include <stdio.h>
#define MAXNODES 3
typedef struct node
{
int val;
@martyworm
martyworm / gist:067ddb8c6822fe10be4cc2476a3ec330
Created June 7, 2017 01:55
[c] attempting to create a simple linked list but am getting an extra node with value 0
//cant get rid of the zero
#include <stdlib.h>
#include <stdio.h>
#define MAXNODES 3
typedef struct node
{
int val;
@martyworm
martyworm / hangman.c
Last active August 12, 2022 15:09
command line hangman game in C
/* I started this hangman game when I was about 3 weeks into Harvard's CS50 course
I just watched the "week 6" lecture. I'm very new to programming (about 1 month).
Anyway I'm really proud of this little command line hangman game. */
#define _XOPEN_SOURCE 500
#define MAXWORDLENGTH 12
#define MINWORDLENGTH 3
#define MAXARRAYLENGTH 12
#define MINTRIES 5