Script Python create xml file from csv file

It script create a custom xml file from a csv file. The format of the csv is like this file.

import csv
#import sys

from xml.etree import ElementTree
from xml.dom import minidom

csvFileName = "Distribuidoras.csv"
xmlFileName = "distribuidoras.xml"

def unicode_csv_reader(utf8_data, dialect=csv.excel, **kwargs):
    csv_reader = csv.reader(utf8_data, dialect=dialect, **kwargs)
    for row in csv_reader:
        yield [unicode(cell, 'utf-8') for cell in row]


with open(csvFileName, 'rU') as csvFile:
    #reader = csv.reader(csvFile, delimiter=';')
    reader = unicode_csv_reader(csvFile, delimiter=';')
    
    comercializadoras_tag = ElementTree.Element('distribuidoras')
    for row in reader:
		#print row
		
		if(row[0]!='' or row[1]!='' or row[2]!='' or row[3]!='' or row[4] or row[5]!='' or row[6]!=''):
			attrs = {'name': row[0],
					 'tel': row[1],
					 'cif': row[2],
					 'direccion': row[3],
					 'codigo': row[4],
					 'division': row[5],
					 'zona': row[6]
					}
			#print attrs
					
			ElementTree.SubElement(comercializadoras_tag, 'distribuidora', attrib=attrs)
        
    resultXML =  minidom.parseString(ElementTree.tostring(comercializadoras_tag)).toprettyxml()
    resultXML_utf8 = resultXML.encode('UTF-8')
    #print resultXML_utf8
	
    with open(xmlFileName, 'w+') as xmlFile:
	    xmlFile.write(resultXML_utf8)
	

I add a gist snippet link.

Script Python convert string in base64 to hex

import sys
import base64
#import binascii</code>

#Controlamos que tenga argumento
if(len(sys.argv)!=2):
print 'usage: convert_base64_to_hex.py &lt;DigestValue&gt;'
sys.exit(2)

base64string = sys.argv[1]

print base64.decodestring(base64string).encode('hex')
#print binascii.a2b_base64(base64string).encode('hex')

The commented is an alternative way for conversion. I add link to gist snippet

Decompiladores JAVA

Enlace original de dos decompiladores Java gratuitos(para Windows):

Cavaj: http://www.bysoft.se/sureshot/cavaj/

JD-GUI: http://java.decompiler.free.fr/

Debido a que recientemente me econtré con la tesitura de decompilar una clase Java, y buscar un decompilador no me resulto fácil, aún conociendo sus nombres. Google me reenviaba a páginas del tipo Softonico y Download.CNET con sus odiosos installers.

Saludos,