Skip to content

Instantly share code, notes, and snippets.

View ubiquitousthey's full-sized avatar

Heath Robinson ubiquitousthey

View GitHub Profile
@ubiquitousthey
ubiquitousthey / reflect.py
Last active August 2, 2018 19:38 — forked from huyng/reflect.py
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
# Added to by Heath Robinson (2018)
from http.server import HTTPServer, SimpleHTTPRequestHandler, HTTPStatus
import argparse
import os
import hashlib

Problem

You have two files - names.txt and characters.txt.

The characters.txt file contains all the characters needed to spell two names from the names.txt file.

When the correct names are found:

  • Every character from characters.txt will be used exactly once
  • There will be no unused characters
#
# Author:: Joshua Timberman (<joshua@opscode.com>)
# Copyright:: Copyright (c) 2011 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0