This file contains 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
import os | |
import glob | |
from obspy import read | |
from pisces.tables.css3 import Wfdisc | |
with open('wfdiscfile.wfdisc', 'w') as wfdiscfile: | |
for ifile in glob.glob('*.mseed'): | |
pathname, ext = os.path.splitext(ifile) | |
newname = pathname + '.w' |
This file contains 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
import json | |
from parsimonious import Grammar, NodeVisitor | |
class JSONVisitor(NodeVisitor): | |
""" | |
A simple JSON serializer for Parsimonious parse trees. | |
""" | |
def generic_visit(self, node, children): |