<commit_before># -*- coding: utf-8 -*-

"""
    abouttag.examples

    abouttag: Example usage.

    Copyright 2010 AUTHORS (see AUTHORS file)
    License: MIT, see LICENSE for more information
"""

from abouttag.fluiddb import FluidDB
from abouttag.uri import URI
from abouttag.database import Database
from abouttag.objects import planet, element
from abouttag.location import GEOnet
from abouttag.books import book, ubook, author


db = FluidDB()
print '\nFluidDB OBJECTS:'
print db.user(u'njr')
print db.namespace(u'njr/misc')
print db.tag(u'terrycojones/private/rating')

print '\nURIs:'
print URI(u'FluidDB.fluidinfo.com')
print URI(u'FluidDB.fluidinfo.com/one/two/')
print URI(u'https://FluidDB.fluidinfo.com/one/two/')
print URI(u'http://fluiddb.fluidinfo.com/one/two/')
print URI(u'http://test.com/one/two/?referrer=http://a.b/c')

db = Database()
print '\nDATABASE ITEMS:'
print db.table(u'elements')
print db.field(u'Name', u'elements')

print '\nPLANETS, ELEMENTS:'
print planet(u'Mars')
print element(u'Helium')

print'\nLOCATIONS:'
print GEOnet(-2601490, -3577649)

print '\nBOOKS (book-1 and book-u conventions):\n'

print book(u"Gödel, Escher, Bach: An Eternal Golden Braid",
           u'Douglas R. Hofstader')
print ubook(u"Gödel, Escher, Bach: An Eternal Golden Braid",
            u'Douglas R. Hofstader')
print
print book(u"One Hundred Years of Solitude", u'<NAME>')
print ubook(u"One Hundred Years of Solitude", u'<NAME>')
print
print book(u'The Feynman Lectures on Physics',
           u'<NAME>', u'<NAME>',
           u'<NAME>')
print ubook(u'The Feynman Lectures on Physics',
            u'<NAME>', u'<NAME>',
            u'<NAME>')
print
print book(u'The Oxford English Dictionary: second edition, volume 3',
           u'<NAME>', u'<NAME>')
print ubook(u'The Oxford English Dictionary: second edition, volume 3',
            u'<NAME>', u'<NAME>')
print

print '\nAUTHORS:'

print author(u'<NAME>', 1927, 3, 6)
print author(u"<NAME>", 1945, 2, 15)<commit_msg>Added music examples.<commit_after># -*- coding: utf-8 -*-

"""
    abouttag.examples

    abouttag: Example usage.

    Copyright 2010 AUTHORS (see AUTHORS file)
    License: MIT, see LICENSE for more information
"""

from abouttag.fluiddb import FluidDB
from abouttag.uri import URI
from abouttag.database import Database
from abouttag.objects import planet, element
from abouttag.location import GEOnet
from abouttag.books import book, ubook, author
from abouttag.music import album, track, artist, isrc_recording


db = FluidDB()
print '\nFluidDB OBJECTS:'
print db.user(u'njr')
print db.namespace(u'njr/misc')
print db.tag(u'terrycojones/private/rating')

print '\nURIs:'
print URI(u'FluidDB.fluidinfo.com')
print URI(u'FluidDB.fluidinfo.com/one/two/')
print URI(u'https://FluidDB.fluidinfo.com/one/two/')
print URI(u'http://fluiddb.fluidinfo.com/one/two/')
print URI(u'http://test.com/one/two/?referrer=http://a.b/c')

db = Database()
print '\nDATABASE ITEMS:'
print db.table(u'elements')
print db.field(u'Name', u'elements')

print '\nPLANETS, ELEMENTS:'
print planet(u'Mars')
print element(u'Helium')

print'\nLOCATIONS:'
print GEOnet(-2601490, -3577649)

print '\nBOOKS (book-1 and book-u conventions):\n'

print book(u"Gödel, Escher, Bach: An Eternal Golden Braid",
           u'<NAME>')
print ubook(u"Gödel, Escher, Bach: An Eternal Golden Braid",
            u'<NAME>')
print
print book(u"One Hundred Years of Solitude", u'<NAME>')
print ubook(u"One Hundred Years of Solitude", u'<NAME>')
print
print book(u'The Feynman Lectures on Physics',
           u'<NAME>', u'<NAME>',
           u'<NAME>')
print ubook(u'The Feynman Lectures on Physics',
            u'<NAME>', u'<NAME>',
            u'<NAME>')
print
print book(u'The Oxford English Dictionary: second edition, volume 3',
           u'<NAME>', u'<NAME>')
print ubook(u'The Oxford English Dictionary: second edition, volume 3',
            u'<NAME>', u'<NAME>')
print

print '\nAUTHORS:'

print author(u'<NAME>', 1927, 3, 6)
print author(u"<NAME>", 1945, 2, 15)

print '\nMUSIC (album-u, track-u, artist-u and isrc-1 conventions):\n'
print track(u'Bamboulé', u'Bensusan and Malherbe')
print album(u"Solilaï", u'<NAME>')
print artist(u"Crosby, Stills, Nash & Young")
print isrc_recording(u'US-PR3-73-00012')

print
{'fraction_non_alphanumeric': 0.1537740271917487, 'fraction_numerical': 0.018518518518518517, 'mean_word_length': 4.294044665012407, 'pattern_counts': {'":': 0, '<': 34, '<?xml version=': 0, '>': 34, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3701028', 'n_tokens_mistral': 1627, 'n_tokens_neox': 1525, 'n_words': 406}