This file contains hidden or 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
| for incoice in ecommerce_invoices_created_in_the_last_48_hours: | |
| results = xero.search_by_invoice_number(incoice.number) | |
| if len(results) == 0: | |
| # There is a race condition between these two calls. | |
| xero.insert_new_invoice(incoice.number, incoice) |
This file contains hidden or 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
| def get_invoices(datum): | |
| """Returns a dict if invoices generated before `datum` and unpayed.""" | |
| # Create your consumer with the proper key/secret. | |
| consumer = oauth.Consumer(key=CONSUMER_KEY, secret=CONSUMER_SECRET) | |
| client = oauth.Client(consumer, token=oauth.Token(key=CONSUMER_KEY, secret=CONSUMER_SECRET)) | |
| client.set_signature_method(XeroOAuthSignatureMethod_RSA_SHA1()) | |
| urlbase = 'https://api.xero.com/api.xro/2.0/Invoices' | |
| datum = datum.strftime('%Y-%m-%dT00:00:00') | |
| query = 'Date<=DateTime.Parse("%s")&&Status=="AUTHORISED"&&AmountPaid==0' % datum |
This file contains hidden or 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 | |
| """ | |
| replication.py - extport data to external systems | |
| Created by Maximillian Dornseif on 2011-05-01. | |
| Copyright (c) 2011 HUDORA. All rights reserved. | |
| """ | |
| from __future__ import with_statement |
This file contains hidden or 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
| def store_pdfs_in_zip(): | |
| docs = Dokument.all().order('updated_at') | |
| file_name = files.blobstore.create(mime_type='application/zip', | |
| _blobinfo_uploaded_filename='test.zip') | |
| with files.open(file_name, 'w') as f: | |
| z = blobstoreZipFile(f) | |
| for doc in docs.fetch(75): | |
| pdf = doc.data | |
| fname = "%s-%s.pdf" % (doc.designator, doc.updated_at) | |
| fname = fname.encode('ascii', 'replace') |
This file contains hidden or 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
| #!/bin/sh | |
| RANGE="0df535ff5b8730a7241d3ff79e6957cfb12a12b3..HEAD" | |
| START=`echo $RANGE | cut -d '.' -f 1` | |
| PWD=`pwd` | |
| PROJECT=`basename $PWD` | |
| git --no-pager log --date=short "--pretty=tformat:%ad $PROJECT %h %d %s (%an)" $RANGE | |
| for SUBINFO in `git submodule summary $START | grep -E '^\* lib/' | cut -d ' ' -f 2-3 | perl -npe 's/ /:/'` | |
| do |
This file contains hidden or 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
| diff --git a/cs/kostenschaetzung.py b/cs/kostenschaetzung.py | |
| index e7c332d..e728eee 100644 | |
| --- a/cs/kostenschaetzung.py | |
| +++ b/cs/kostenschaetzung.py | |
| @@ -226,7 +226,20 @@ class AusgangskostenReport(object): | |
| ve1 = 0 | |
| rest = 0 | |
| - kalkulatorische_paletten = float(menge) / artikelpass.palettenfaktor | |
| + try: |
This file contains hidden or 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
| # Google latitude backup | |
| # | |
| # This is a little helper to backup your location from Google Latitude to local disk. | |
| # It saves data as JSON and as GPX. | |
| # Usage is somewhat annoying: | |
| # | |
| # 1. get OACurl http://code.google.com/p/oacurl/ | |
| # 2. follow the steps in http://code.google.com/apis/latitude/oacurl.html to get strarted | |
| # You will have to register a domain with Google Apps and jump through hoops | |
| # 3. Renerate a Key and a Secret for "installed applications" on the google API console, |
This file contains hidden or 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 | |
| """ | |
| bejeweled.py - simple bot to play Bejeweled 3 on a Mac for you | |
| Created by Maximillian Dornseif on 2011-08-09. | |
| """ | |
| import sys | |
| import os |
This file contains hidden or 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
| set -e | |
| set -x | |
| # damit dass alles klappt, muss man git, subversion, gnuplot und gource installiert haben | |
| # 1. Step Create a clean Git repository with all our git repositories in it | |
| function handle_repos { | |
| ssh-add -k | |
| git clone [email protected]:hudora/$1.git |
This file contains hidden or 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
| mooncrusher:EDIhub md$ git diff main.py | |
| diff --git a/main.py b/main.py | |
| index 2d7e3e7..86b870b 100755 | |
| --- a/main.py | |
| +++ b/main.py | |
| @@ -10,6 +10,7 @@ Copyright (c) 2010, 2011 HUDORA. All rights reserved. | |
| import config | |
| config.imported = True | |
| +import gaetk.handler |