Today we have launched our New Zealand Info Directory under new-zealand-info.co.nz domain name. Users of Google.co.nz will benefit most as our directory covers New Zealand domain names only. Directory will grow as we discover more .nz web sites
Google App Engine has free quota limit of 1.00 GBytes for Total Stored Data. My current application has exceeded that limit causing system to generate 500 Internal Error messages. There is no easy way to remove data from DataStore.
My trick is to delete records in batch and using loop until you get DeadlineExceededError Exception. Typically I can remove 1000 rows per call
You can schedule cron job to execute this code every hour so old records are deleted automatically
start=time.time()
date_keep=(datetime.date.today()-datetime.timedelta(days=30)).isoformat()
sql="SELECT __key__ FROM TBL_TOP_URL WHERE UPDATED < DATE('"+date_keep+"') LIMIT 100"
print sql
rows=[None]
while len(rows) <> 0:
query = db.GqlQuery(sql)
rows = query.fetch(100)
print 'len(rows):',len(rows)
db.delete(rows)
print time.time() - start
if len(rows) > 0:
print rows[-1].id()
Python is open source software and mature language. You can create commercial software using free tools with Python.
I have developed GPS tracks plotting software with elevation information in 3D space. Mapsource gives you only 2 dimensional view so gradient is not visible and you loose a lot of information
I have used wxPython for the GUI and py2exe to create software distribution package
GPS tracks data is read from .GPX file which needs to be exported from Mapsource
Have a look if you own GPS device such as Garmin or others
February is launch of our Canada Info Directory. Currently there is over 100,000 domains in the database but it will grow slowly as we discover more .ca sites
Linux server is better than Swiss army knife. Using pipes you can join commands together to process and transform data.
Task:
Automatically backup entire folder to encrypted file and upload in secure manner to backup server using minimum of disk space.
Code:
#
# install as cronjob, must escape any % as \% otherwise it becomes newline
#
tar cvf - /home/tom | gpg --no-tty --passphrase-file pass.txt -c - | ssh user@backup.com "cat > tom.tar.gpg"
Explanation:
--no-tty is required for cronjob as there is no tty attached during execution
pass.txt will contain your symmetrical password
#
# create tarball containing entire folder and send output to stdout
#
tar cvf - /home/tom#
# read from stdin and encrypt data stream using pass phrase in file pass.txt
#
| gpg --no-tty --passphrase-file pass.txt -c -#
# read from stdin data stream and send via secure shell to backup server as tom.tar.gpg
#
| ssh user@backup.com "cat > tom.tar.gpg"
for more info try
man tar
man gpg
man ssh
:: Next Page >>
This blog is actually a very special blog! It automatically aggregates all posts from all other blogs. This allows you to easily track everything that is posted on this system.
| Next >
| Mon | Tue | Wed | Thu | Fri | Sat | Sun |
|---|---|---|---|---|---|---|
| << < | > >> | |||||
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 | |||||