Skip to content

Instantly share code, notes, and snippets.

@dylana37
dylana37 / cite.py
Created March 4, 2016 22:18
This module provides an easy way to aggregate citations.
#!/usr/bin/env python3 -O
"""
This module provides an easy way to aggregate citations.
A citation is considered to be a single line comment of two or three values
seperated by semicolons. If only two values appear it is interpreted as a URL
followed by a date. If three values appear it is interpreted as a name
followed by a URL and then a date.
@dylana37
dylana37 / cryptography.py
Last active January 12, 2016 22:03
This is a simple cryptography library that has some basic encryption decryption functionality.
#!/usr/bin/env python
"""
This is a simple cryptography library that has some basic encryption
decryption functionality.
"""
# The MIT License (MIT)
#
# Copyright (c) 2016 Dylan Robert Ashley
@dylana37
dylana37 / log.py
Last active March 4, 2016 02:21
This module provides a simple logging system.
"""
This module provides a simple logging system.
"""
# The MIT License (MIT)
#
# Copyright (c) 2016 Dylan Robert Ashley
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
@dylana37
dylana37 / monty_hall.py
Last active March 4, 2016 02:22
This program attempts to determine the optimal choice when faced with the Monty Hall problem.
#!/usr/bin/env python3
'''
This program attempts to determine the optimal choice when faced with
the Monty Hall problem. It does this by simulating the player making
the decision to change the door they selected and the player making the
decision not to change the door they selected. It does this one hundred
thousand times for each choice. It then returns the estimated
probability of winning given their decision.
'''