Skip to content

Instantly share code, notes, and snippets.

@skilbjo
skilbjo / json-csv
Created August 4, 2013 19:30
Convert JSON to CSV using Python
http://garysieling.com/blog/converting-json-to-a-csv-file-with-python
Ideally we want selections from these as a CSV for manual review, and import into mapping software. First, we load a list of files:
import os
folder = 'G:\\maps\\churches\\db.tar\\db\\db'
files = []
for root, dirs, f in os.walk(folder):
# FizzBuzz is a classic programming exercise.
#
# The usual example asks the developer to write a program which prints out each number from 1 to 100. But for multiples of 3
# print 'Fizz' instead of the number and for multiples of 5 print 'Buzz'. For numbers which are multiples of both 3 and 5 print
# 'FizzBuzz'.
def fizzbuzz():
for n in range(1,101):
if n%3 == 0 and n%5 == 0: print "fizzbuzz"
else: