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
#!/usr/bin/env python2 | |
# encoding: utf-8 | |
# Decoding: https://twitter.com/diegoboot/status/510846108973953024 | |
bins = [ | |
'01001000', '01100001', '01110000', | |
'01110000', '01111001', '00100000', | |
'01010000', '01110010', '01101111', | |
'01100111', '01110010', '01100001', |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
import cairo | |
import rsvg | |
import math | |
WIDTH, HEIGHT = (500, 500) | |
HEX_W, HEX_H = (50, 50) |
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
{{extend 'layout.html'}} | |
<h1>Clientes</h1> | |
<div id='contents'> | |
<table class="table"> | |
<tr> | |
<th>ID</th> | |
<th>Cliente</th> |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
import sys | |
from random import random | |
def geraCPF(): | |
cpf = [] | |
for i in range(9): | |
cpf.append(int(random()*10)) |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
import cProfile | |
class singledispatch(object): | |
__slots__ = ( | |
'resolver', | |
'default', | |
'last', |
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
#!/usr/bin/env python2 | |
# encoding: utf-8 | |
class singledispatch(object): | |
__slots__ = ( | |
'resolver', | |
'default', | |
'last', | |
) | |
def __init__(self, func): |
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
#!/usr/bin/env python2 | |
# encoding: utf-8 | |
import subprocess | |
def __get_output(command): | |
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True) | |
output = process.communicate() | |
retcode = process.poll() | |
if retcode == 0: |
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
import javax.xml.parsers.DocumentBuilderFactory; | |
import javax.xml.parsers.DocumentBuilder; | |
import org.w3c.dom.Document; | |
import org.w3c.dom.NodeList; | |
import org.w3c.dom.Node; | |
import org.w3c.dom.Element; | |
import java.io.File; | |
import java.util.ArrayList; | |
import java.util.logging.Logger; |
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
echo "Cleaning build dir..." | |
rm build/* | |
echo | |
echo "Compiling files" | |
gcc -c lib/myprint.c -o build/myprint.o | |
echo | |
echo "Building lib archive" | |
ar rcs build/libmyprint.a build/myprint.o |
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
#!/usr/bin/env python | |
# encoding: utf-8 | |
# Python plotting "module" based in the graph found here: | |
# http://www.techdrivein.com/2012/09/chrome-overtakes-ie-to-become-worlds.html | |
# | |
# License: GPLv3 | |
# Credits: Magnun Leno (@mind_bend) | |
# Site: http://www.mindbending.org |