Skip to content

Instantly share code, notes, and snippets.

View mgill25's full-sized avatar
:electron:

Manish Gill mgill25

:electron:
View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
StaQueue! A Queue created by using 2 stacks!
'''
# the builtin `list` type in python has all the capabilities
# of a stack, so we use that instead of trying to re-created
# the stack itself as well.
@mgill25
mgill25 / MM_models.py
Created May 7, 2013 12:14
Mailman Model Prototype for Lists and Members
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.contrib.auth.models import User
from django.db import models
# Conceptual Model representation in the Mailman API
class Member(models.Model):
name = models.CharField(max_length=200)
;; Programming Languages, Homework 5
#lang racket
(provide (all-defined-out)) ;; so we can put tests in a second file
;; definition of structures for MUPL programs - Do NOT change
(struct var (string) #:transparent) ;; a variable, e.g., (var "foo")
(struct int (num) #:transparent) ;; a constant number, e.g., (int 17)
(struct add (e1 e2) #:transparent) ;; add two expressions
(struct ifgreater (e1 e2 e3 e4) #:transparent) ;; if e1 > e2 then e3 else e4