Mercurial > hg > python
changeset 53:91d71e9760e8
forgot what this is about
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Mon, 29 May 2023 22:02:52 +0100 |
parents | 10f17205908f |
children | dd63412fc882 |
files | unicode-histogram.py |
diffstat | 1 files changed, 15 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/unicode-histogram.py Mon May 29 21:57:13 2023 +0100 +++ b/unicode-histogram.py Mon May 29 22:02:52 2023 +0100 @@ -398,26 +398,26 @@ return part -Test data -HEART = u'\u2665' -SMILY = u'\u263a' -TSU = u'\u30C4' -LEFT = u'\u27E8' -RIGHT = u'\u27E9' -EURO = u'\u20AC' +#Test data +# HEART = u'\u2665' +# SMILY = u'\u263a' +# TSU = u'\u30C4' +# LEFT = u'\u27E8' +# RIGHT = u'\u27E9' +# EURO = u'\u20AC' -if True: +# if True: - TESTUNICODE = LEFT + "h" + EURO + "llo " + HEART + HEART + SMILY + TSU + " goodby" + EURO + " " + SMILY + TSU + HEART + HEART + HEART + HEART + RIGHT +# TESTUNICODE = LEFT + "h" + EURO + "llo " + HEART + HEART + SMILY + TSU + " goodby" + EURO + " " + SMILY + TSU + HEART + HEART + HEART + HEART + RIGHT - print len(TESTUNICODE) - print json.dumps(TESTUNICODE) +# print len(TESTUNICODE) +# print json.dumps(TESTUNICODE) - TESTDOC = {"@context": "http://localhost:8080/publish/JSON/WSP1WS6-select unix_timestamp(a_importtime)*1000 as timestamp, a_* from ads a join sample s on a_id=s_id limit 50-context.json","schema:provider": {"a": "Organization", "uri": "http://memex.zapto.org/data/organization/1"}, "snapshotUri": "http://memex.zapto.org/data/page/850753E7323B188B93E6E28F730F2BFBFB1CE00B/1396493689000/raw","a": "WebPage","dateCreated": "2013-09-24T18:28:00","hasBodyPart": {"text": TESTUNICODE, "a": "WebPageElement"}, "hasTitlePart": {"text": "\u270b\u270b\u270bOnly Best \u270c\u270c\u270c Forget The Rest \u270b\u270b\u270b Outcall Specials TONIGHT \u270c\ud83d\udc8b\ud83d\udc45 Sexy Blonde is UP LATE \ud83d\udc9c\ud83d\udc9b\u270b\u270c - 25", "a": "WebPageElement"}, "uri": "http://memex.zapto.org/data/page/850753E7323B188B93E6E28F730F2BFBFB1CE00B/1396493689000/processed"} +# TESTDOC = {"@context": "http://localhost:8080/publish/JSON/WSP1WS6-select unix_timestamp(a_importtime)*1000 as timestamp, a_* from ads a join sample s on a_id=s_id limit 50-context.json","schema:provider": {"a": "Organization", "uri": "http://memex.zapto.org/data/organization/1"}, "snapshotUri": "http://memex.zapto.org/data/page/850753E7323B188B93E6E28F730F2BFBFB1CE00B/1396493689000/raw","a": "WebPage","dateCreated": "2013-09-24T18:28:00","hasBodyPart": {"text": TESTUNICODE, "a": "WebPageElement"}, "hasTitlePart": {"text": "\u270b\u270b\u270bOnly Best \u270c\u270c\u270c Forget The Rest \u270b\u270b\u270b Outcall Specials TONIGHT \u270c\ud83d\udc8b\ud83d\udc45 Sexy Blonde is UP LATE \ud83d\udc9c\ud83d\udc9b\u270b\u270c - 25", "a": "WebPageElement"}, "uri": "http://memex.zapto.org/data/page/850753E7323B188B93E6E28F730F2BFBFB1CE00B/1396493689000/processed"} - analyze(TESTDOC["hasBodyPart"]) - json.dump(TESTDOC, sys.stdout, indent=4); - exit(0) +# analyze(TESTDOC["hasBodyPart"]) +# json.dump(TESTDOC, sys.stdout, indent=4); +# exit(0) for line in sys.stdin: try: