I hereby claim:
- I am ramalho on github.
- I am ramalho (https://keybase.io/ramalho) on keybase.
- I have a public key whose fingerprint is CAF0 10C6 5EED B222 EB8B 044A D284 12E9 7687 D71E
To claim this, I am signing this object:
| """ | |
| ========================================================= | |
| Classe ObjetoJS: imitação simples de um objeto JavaScript | |
| ========================================================= | |
| Uma instância é construída passando argumentos nomeados: | |
| >>> o = ObjetoJS(z=33, x=11, y=22) | |
| A representação textual de uma instância parece a chamada do |
| def backtracking_sort(input_list, output_list, level): | |
| print(level * ' ', input_list, output_list); | |
| # Reject - this path doesn't lead to any solution | |
| if len(output_list) > 1 and output_list[-2] > output_list[-1]: | |
| return False | |
| # Accept - one solution |
| while True: | |
| response = input('Enter a number: ') | |
| try: | |
| n = float(response) | |
| except ValueError: | |
| print('%r is not a number' % response) | |
| else: | |
| break | |
| print('Nice number. Thanks!') |
| while True: | |
| filename = input('Enter the name of a file to open: ') | |
| try: | |
| # open for reading in binary mode, so any file will do | |
| fin = open(filename, 'rb') | |
| except OSError as exc: | |
| print('Something untoward happened [%r]' % exc) | |
| else: | |
| break |
| https://maps.googleapis.com/maps/api/staticmap?center=40.714728,-73.998672&zoom=16&size=600x300&maptype=hybrid&key=AIzaSyApIx-jA9MblvDcvwBB3VxzKhGEWwLsY1k |
| import time | |
| import random | |
| import pingo | |
| import itertools | |
| rpi = pingo.detect.get_board() | |
| class Buzzer(object): | |
I hereby claim:
To claim this, I am signing this object:
| layout | title |
|---|---|
post |
RethinkDB: why we failed |
Posted on Github by Slava Akhmechet
When we [announced][shutdown-announcement] that RethinkDB is shutting down, I promised to write a post-mortem. I took some time to process the experience, and I can now write about it clearly.
| #!/usr/bin/env python3 | |
| import xml.etree.ElementTree as ET | |
| tags = 'platform minor micro'.split() | |
| doc = ET.parse('/usr/share/gnome/gnome-version.xml') | |
| print('.'.join(doc.find(tag).text for tag in tags)) |
| <!DOCTYPE html> | |
| <html> | |
| <head><meta charset="utf-8" /> | |
| <title>Pense como uma pythonista</title><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | |
| <style type="text/css"> | |
| /*! | |
| * | |
| * Twitter Bootstrap |