This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A solution to the problem stated in | |
# https://www.codeeval.com/browse/170/ | |
import math | |
def middleNumber(a, b): | |
""" Finds the middle integer between a and b. | |
If it is not a round number it rounds up to the | |
next integer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Implements linear search and binary search to analyse time complexity. | |
""" | |
import random | |
from matplotlib import pyplot as plt | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Implements linear search and probabilistic search to analyse time complexity. | |
""" | |
import random | |
from matplotlib import pyplot as plt | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Creates the Sierpinski triangle using the Chaos Game technique. | |
Starts from a vertex of a triangle, chooses randomly the next vertex and | |
draw a pixel in the middle. Then, iteratively selects a new vertex and | |
draws in the middle point. | |
""" | |
import random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Implements a simple HTTP/1.0 Server | |
""" | |
import socket | |
def handle_request(request): | |
"""Handles the HTTP request.""" |