"""Sample data to test the pubsub internals""" from pubsub import set_user, post_message, follow from pprint import pprint from time import time set_user('oscar', displayname='Oscar Wilde', password='******', email='*****@*****.**', bio='Irish poet and playwright', photo='oscar.jpg') set_user('jrr', displayname='J.R.R. Tolkien', password='******', email='*****@*****.**', bio='English writer, poet, philologist, and university professor', photo='jrr.jpg') set_user('rene', displayname='René Descartes', password='******', email='*****@*****.**', bio='French philosopher, mathematician, and scientist', photo='rene.jpg') set_user('anais', displayname='Anaïs Nin', password='******', email='*****@*****.**', bio='American diarist, essayist, novelist, and writer of short stories and erotica', photo='anais.jpg') set_user('kongzi', displayname='Confucius', password='******', email='*****@*****.**', bio='Chinese teacher, editor, politician, and philosopher', photo='confucius.jpg') set_user('albert', displayname='Albert Einstein', password='******', email='*****@*****.**', bio='German-born theoretical physicist who developed the theory of relativity', photo='einstein.jpg') set_user('gsantayana', displayname='George Santayana', password='******', email='*****@*****.**', bio='Prolific 20th-century Spanish philosopher', photo='gsantayana.jpg') now = time() post_message('oscar', 'Work is the curse of the drinking classes') post_message('jrr', 'Not all those who wander are lost.') post_message('rene', 'There is nothing so strange and so unbelievable that it has been said by one philosopher or another.') post_message('anais', "We don't see things as they are, we see them as we are.") post_message('kongzi', 'To study and not think is a waste. To think and not study is dangerous.') post_message('kongzi', 'What you do not want done to yourself, do not do to others.') post_message('kongzi', 'Is it not a joy to have friends come from afar?')
from pubsub import set_user, post_message, follow from pprint import pprint from time import time set_user( 'felix', display_name='Felix the Cat', password='******', email='*****@*****.**', bio='Felix!', photo='felix.jpg', ) set_user( 'popeye', display_name='Popeye the Sailor', password='******', email='*****@*****.**', bio='Popeye!', photo='popeye.jpg', ) set_user( 'homer', display_name='Homer Simpson', password='******', email='*****@*****.**', bio='Husband of Marge Simpson.', photo='homer.jpg', ) now = time() post_message('felix', '#python tip: use named tuples', now - 3600 * 48)
'Sample data to test the pubsub pubsub' from pubsub import set_user, post_message, follow from pprint import pprint from time import time set_user('raymondh', displayname='Raymond Hettinger', password='******', email='*****@*****.**', bio='Former fashion photographer', photo='raymond.jpg') set_user('barry', displayname='Barry Warsaw', password='******', email='*****@*****.**', bio='Plays in a band', photo='barry_warsaw.jpg') set_user('davin', displayname='Davin Potts', password='******', email='*****@*****.**', bio='Chemist, Teacher, Father', photo='davin-potts-200.png') set_user('selik', displayname='Michael Selik', password='******', email='*****@*****.**', bio='All problems are data science problems', photo='selik.jpg') now = time() post_message('raymondh', '#python tip: use named tuples', now-3600*48) post_message('barry', 'join a band today', now-3600) post_message('selik', 'gradient descent save me money on travel', now-2500) post_message('raymondh', '#python tip: develop interactively', now-500) post_message('barry', 'learn emacs', now-80) post_message('davin', 'teaching #python today', now-50) post_message('selik', 'have you ever wanted to unpack mappings?', now-46) post_message('raymondh', '#python tip: have fun programming', now-40) post_message('davin', '#camping tip: always take water', now-30) post_message('barry', 'enums rock', now-20) post_message('raymondh', '#python tip: never mutate while iterating', now-10) post_message('davin', 'coriander and cilantro come from the same plant', now) follow('davin', followed_user='******') follow('davin', followed_user='******')
'Sample data for pubsub' from pprint import pprint from time import time from pubsub import set_user, post_message, follow set_user('raymondh', displayname='Raymond Hettinger', password='******', email='*****@*****.**', bio='Former fashion photographer', photo='raymond.jpg') set_user('barry', displayname='Barry Warsaw', password='******', email='*****@*****.**', bio='Plays in a band', photo='barry_warsaw.jpg') set_user('davin', displayname='Davin Potts', password='******', email='*****@*****.**', bio='Chemist, Teacher, Father', photo='davin-potts-200.png') set_user('selik', displayname='Michael Selik', password='******', email='*****@*****.**', bio='All problems are data science problems', photo='selik.jpg')
"""Sample data for pubsub""" from pprint import pprint from time import time from pubsub import set_user, post_message, follow set_user( "raymondh", displayname="Raymond Hettinger", password="******", email="*****@*****.**", bio="Former fashion photographer", photo="raymond.jpg", ) set_user( "barry", displayname="Barry Warsaw", password="******", email="*****@*****.**", bio="Plays in a band", photo="barry_warsaw.jpg", ) set_user( "davin", displayname="Davin Potts", password="******", email="*****@*****.**", bio="Chemist, Teacher, Father", photo="davin-potts-200.png", ) set_user(