maartensmeets / pythonscripts Goto Github PK
View Code? Open in Web Editor NEWSome useful Python scripts
License: MIT License
Some useful Python scripts
License: MIT License
Hi Maarten, I work for the Linux Foundation, and we would like to adapt your nexus2/cleanup.py script to be part of our lftools (https://gerrit.linuxfoundation.org/infra/#/admin/projects/releng/lftools). In order to do this, I was hoping you might be able to add an EPL-compatible license to this repo, or at least that file (Eclipse has a list of acceptable licenses here: http://www.eclipse.org/legal/licenses.php). Alternatively, if you would be interested, we'd also be happy to have your code contributed directly to lftools! Thanks for your time.
Trying to use the SOAP example with a different site and only returning the xml from the site and not the response.
import concurrent.futures
import requests
from string import Template
import time
import xml.etree.ElementTree as ET
max_workers=20
inputfile='input.txt'
outputokfile='outputok.txt'
outputerrorfile='outputerror.txt'
url = 'http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl'
messagetemplate=Template(r"""<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns="urn:ec.europa.eu:taxud:vies:services:checkVat:types">
<soapenv:Header/>
<soapenv:Body>
<urn:checkVat>
<urn:countryCode>$countryCode</urn:countryCode>
<urn:vatNumber>$vatNumber</urn:vatNumber>
</urn:checkVat>
</soapenv:Body>
</soapenv:Envelope>""")
headers = {'SOAPAction': 'checkVat','Content-Type':'text/xml;charset=UTF-8'}
# Retrieve a single page and report the URL and contents
def fire_post_request(url, data,timeout):
start_time = time.time()
response=requests.post(url, data=data,timeout=timeout,headers=headers)
end_time=time.time() - start_time
return response
def write(text,filename):
file = open(filename, 'a')
file.write(text)
file.close()
data = messagetemplate.substitute(countryCode='AT',vatNumber='U123456789')
x = fire_post_request(url, data,60)
print(x.text)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.