Skip to content

Instantly share code, notes, and snippets.

View puffin's full-sized avatar

David Michon puffin

  • Salvador - Bahia / Brazil
View GitHub Profile
@puffin
puffin / 01-easy-big-digits.md
Last active February 15, 2017 14:09
Big digits

CHALLENGE DESCRIPTION:

In this challenge you're presented with a situation in which you need to output big symbols on devices which only support ASCII characters and single, fixed-width fonts. To do this you're going to use pseudo-graphics to ‘draw’ these big symbols.

Here is an example of the font with digits from 0 to 9:

-**----*--***--***---*---****--**--****--**---**--

Keybase proof

I hereby claim:

  • I am puffin on github.
  • I am davidmichon (https://keybase.io/davidmichon) on keybase.
  • I have a public key whose fingerprint is 6893 25C8 126B B78D B95A 9A93 3ACF 64D4 5641 D24E

To claim this, I am signing this object:

@puffin
puffin / MockResponse.py
Created May 11, 2011 18:18
Mock urllib2.open for UnitTest
class MockResponse(object):
def __init__(self, resp_data, code=200, msg='OK'):
self.resp_data = resp_data
self.code = code
self.msg = msg
self.headers = {'content-type': 'text/plain; charset=utf-8'}
def read(self):
return self.resp_data