in tensorflow_federated/python/simulation/datasets/stackoverflow.py [0:0]
def create_synthetic_data_dictionary():
return {
'synthetic_1':
collections.OrderedDict(
creation_date=[
b'2010-01-08 09:34:05 UTC',
b'2008-08-10 08:28:52.1 UTC',
b'2008-08-10 08:28:52.1 UTC',
],
score=tf.constant([172, 80, 80], dtype=tf.int64),
tags=[
b'sql|sql-server|aggregate-functions|median',
b'css|cross-browser|rounded-corners|css3',
b'css|cross-browser|rounded-corners|css3',
],
title=[
b'function to calculate median in sql server',
b'creating rounded corners using css',
b'creating rounded corners using css',
],
tokens=[
b"if you're using sql 2005 or better this is a nice , simple-ish median calculation for a single column in a table :",
b'css3 does finally define the',
b"which is exactly how you'd want it to work .",
],
type=[
b'answer',
b'question',
b'answer',
]),
'synthetic_2':
collections.OrderedDict(
creation_date=[
b'2008-08-05 19:01:55.2 UTC',
b'2010-07-15 18:15:58.5 UTC',
b'2010-07-15 18:15:58.5 UTC',
],
score=tf.constant([3, 12, -1], dtype=tf.int64),
tags=[
b'git|svn|version-control|language-agnostic|dvcs',
b'android|android-emulator|monkey',
b'android|android-emulator|monkey',
],
title=[
b'getting started with version control',
b'writing to / system / framework in emulator',
b'writing to / system / framework in emulator',
],
tokens=[
b'if you are on mac osx , i found <URL> " > versions to be an incredible ( free ) gui front-end to svn .',
b'edit :',
b'thanks .',
],
type=[
b'answer',
b'question',
b'question',
],
),
'synthetic_3':
collections.OrderedDict(
creation_date=[
b'2008-10-30 16:49:26.9 UTC',
b'2008-10-30 16:49:26.9 UTC',
],
score=tf.constant([1, 1], dtype=tf.int64),
tags=[
b'vb . net|design-patterns|iterator|yield',
b'vb . net|design-patterns|iterator|yield',
],
title=[
b'iterator pattern in vb . net ( c # would use yield ! )',
b'iterator pattern in vb . net ( c # would use yield ! )',
],
tokens=[
b'edit :',
b'the spec is available here .',
],
type=[
b'answer',
b'answer',
],
)
}