Skip to content

Instantly share code, notes, and snippets.

Avatar

SalvaJ€ SalvaJ

View GitHub Profile
@SalvaJ
SalvaJ / Macro_Excel_To_Word_Fields
Created Apr 29, 2015
This macro VBA example creates a Word doc and fill Form Fiels
View Macro_Excel_To_Word_Fields
Sub OpenPINDoc()
'
' Open PIN Doc Macro for New TN Client
' This example creates a Word doc and fill Form Fiels
Dim xlApp As Object
Dim wdApp As Object
Dim xlString As String
Dim catString As String
Dim storString As String
Dim dotString As String
@SalvaJ
SalvaJ / pdf_to_text_converter.py
Last active Jan 21, 2018
To unlock a pdf file using 'gs' in linux shell and convert the content to text
View pdf_to_text_converter.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This code is for being used with pdfminer last version (Python 2.x)
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from pdfminer.pdfpage import PDFPage
from cStringIO import StringIO
@SalvaJ
SalvaJ / GoogleAPI.py
Last active Jun 7, 2016
Example making HTTP request to use Google API without api-client.It works in Python3 (tested ok in 3.3.5)
View GoogleAPI.py
#!usr/bin/python3
# -*- coding: UTF-8 -*-
"""This module is a sample of the OAuth2 authentication by Python3"""
__version__ = "0.1.0"
__author__ = "shin (shin.hateblo.jp)"
__copyright__ = "(C) 2012 shin"
__email__ = "s2pch.luck@gmail.com"
__license__ = "Apache License 2.0"
View oauth2.py
#!/usr/bin/env python3
"""This module is a sample of the OAuth2 authentication by Python3"""
__version__ = "0.1.0"
__author__ = "shin (shin.hateblo.jp)"
__copyright__ = "(C) 2012 shin"
__email__ = "s2pch.luck@gmail.com"
__license__ = "Apache License 2.0"
__status__ = "Prototype"
@SalvaJ
SalvaJ / PruebaHilos.py
Created Feb 4, 2014
Prueba de colisión en el uso de fichero por hilos concurrentes.
View PruebaHilos.py
#!/bin/env python3
# -*- coding: UTF-8 -*-
# Prueba de programacion con threads para evaluar los conflictos en acceso a ficheros.
import threading, time
# Se crea una subclase de Thread
class MiThread(threading.Thread):
def __init__(self, num):
threading.Thread.__init__(self)
@SalvaJ
SalvaJ / Classes training
Last active Jan 4, 2016
I don't understand this classes features in Python. >:(
View Classes training
>>> class IBAN:
ISOcode = ' '
checkDigits = '00'
class CCC:
bankCode = '0000'
branchCode = '0000'
checkBank = '0'
checkAccount = '0'
account = '0000000000'
View img_exif_date_fixer.py
#!/usr/bin/env python
#
# gexiv2 image Exif date fixer.
# Corey Goldberg, 2014
"""Recursively scan a directory tree, fixing dates
on all jpg/png image files.
Each file's Exif metadata and atime/mtime are all