In [4]:
import praw
import redditDataset
r = praw.Reddit(user_agent='get_comments')
In [9]:
"""
Old version of createDataset which just prints output
"""

reload(redditDataset)
subreddits = redditDataset.getSubreddits(r, ['learnprogramming', 'datasets'])
redditDataset.createDataset(r, subreddits, dateRange='hour', nCommentsPerSubmission=20)
Current subreddit: learn programming
Current post: Want to learn basic unix cmds? Learn it interactively with 'interactive-shell' script
[u'ellisgeek', u'tempacct111', u'luikraken', u'ellisgeek', u'Johannes_Joestar', u'hdsdi', u'why_not_start_over', u'drifteresque', u'linuxlearningnewbie', u'Whoops-a-Daisy']
Current post: [help] webscraping/xpath
[u'michaelkepler', u'silvv', u'michaelkepler', u'silvv', u'michaelkepler', u'silvv', u'michaelkepler', u'silvv', u'michaelkepler', u'ReverseEngineerFox']
Current post: I want to try to change the cloud to butt chrome extension a little but I'm not even 100% sure what the language is.
[u'pacificmint', u'solid7', u'mr-fahrenheit_']
Current post: C: Elements in an array formula explanation please
[u'zifyoip', u'Deciama']
Current post: [Ruby] My code works well on Sublime but CodeWars keeps returning an error
[u'rcuhljr', u'1-800-XXX-XXXX', u'pmbotter', u'Egomaniacal_Pain']
Current post: [c#] why doesn't this exist in current context?
[u'deltageek', u'icebbyice', u'CNotSoSharp', u'icebbyice']
Current post: How should I learn MEAN?
[u'MadCapitalist', u'jhartikainen', u'Rodion91']
Current post: [Java] Is there a way to test if an index of an int array has only been initialized by Java?
[u'desrtfx', u'XunOnline', u'desrtfx', u'XunOnline', u'desrtfx', u'Windex007', u'XunOnline', u'wgormley', u'XunOnline', u'wgormley']
Current post: [Java] can I set an int variable to more than one value?
[u'zifyoip', u'nixon_richard_m', u'Magixxxx', u'cmekss', u'nixon_richard_m', u'Magixxxx', u'nixon_richard_m', u'desrtfx', u'rill2503456', u'mathen', u'eyePlus', u'rawrrang']
Current post: Consuming twitter's streaming API in real time?
[u'arbostek', u'sindbis', u'arbostek', u'sindbis', u'arbostek', u'ShadyCupcake']
Current post: C# vs Go
[u'lightcloud5', u'solid7', u'voidvector', u'butlerccreltub']
Current post: Whats a good simple programming language to make a text base adventure game? Where could i learn it?
[u'desrtfx', u'Splurge-Master', u'desrtfx']
Current post: Trying to make a home web server using Apache Tomcat. I also just bought a Domain Name now how do I connect my webapp so it may be accesible publicly on the internet? Please help :)
[u'corpsmoderne', u'RustyJar', u'heroOfTimeBitch', u'newaccount1236', u'heroOfTimeBitch', u'wolfcry0', u'BradChesney79', u'heroOfTimeBitch', u'BradChesney79']
Current post: [.VB] Problem with strings and arrays
[u'desrtfx', u'beestar95', u'desrtfx', u'beestar95']
Current post: One object, many matching patterns
[u'jrandm']
Current post: What's a *good* programming language?
[u'thoosequa', u'brainard52', u'ethergreen', u'the_omega99']
Current post: [Web Development] Ruby vs Python vs PHP
[u'RodionGork', u'mikeful92', u'fresh_prince_', u'vonnKlaus', u'jrandm', u'New_Document_37', u'farmerje', u'albertonreddit', u'dmazzoni', u'dmazzoni', u'Durzan666']
Current post: Help! I don't understand flow of program [Assembly]
[u'missblit']
Current post: Frustrated with my programming skills. I've been thinking about quitting.
[u'lightcloud5', u'projectpolak', u'ethergreen', u'rawrrang', u'darkraven418']
Current post: [C][Short]Get current terminal path
[u'zifyoip', u'kluuuuup', u'reddilada', u'kluuuuup']
Current post: C++ SDL2 Game Programming Tutorial!
[u'thoosequa', u'rekreantCS', u'thoosequa', u'rekreantCS', u'thoosequa', u'rekreantCS', u'thoosequa', u'rekreantCS']
Current post: [C] - Problem
[u'green_griffon', u'desintrinski', u'desintrinski', u'green_griffon', u'desintrinski', u'arbostek', u'desintrinski', u'arbostek', u'desintrinski', u'arbostek', u'desintrinski', u'enfrozt', u'desintrinski']
Current post: How big do my changes need to be to warrant a git commit?
[u'ponyoink', u'glemnar', u'jhartikainen', u'shloaner']
Current post: Object oriented PHP vs procedural PHP?
[u'yuogzer', u'ToBadForU', u'MrPopinjay', u'praesartus']
Current post: C# using bool IsPrime
[u'zifyoip', u'No_Smoking', u'langfod', u'ethergreen', u'lightcloud5']
Current post: First Open source contribution and licenses
[u'ianhedoesit', u'freezkyd']
Current post: [Oracle] One to One Relationship coding questions
[u'lightcloud5', u'IIoWoII', u'AgentCain']
Current post: What books would you recommend to learn c# or python?
[u'Noxia']
Current post: Can I remove # Options +FollowSymLinks from the htaccess if I do page by page 301 redirects?
[]
Current post: Should i learn anything else before Swift?
[u'YvesSoete']
Current post: Streaming C# coding tutorials and stuff
[]
Current post: [Google script] "Cannot convert Range to (class)" error when using .getRange(row, numRows, column, numColumns)
[]
Current post: Split a string by empty entries
[u'the_omega99']
Current post: [PHP, Ruby, or other] Parsing text of website and displaying it on on my local homepage - language and getting started question
[u'jrandm']
Current post: What factors do Python developers consider when choosing which implementation to use?
[u'ethergreen']
Current post: [Java] Pulling integers from a string
[u'G01denW01f11', u'ethergreen']
Current post: [Homework][VB.NET] Do..Loop to find the occurrence of the word.
[u'DarkWolfPtyLtd']
Current post: Topics for Semester Project
[]
Current post: [C#] Fast 'closest point to another point' search? I think this has something to do with Oct trees but struggling to figure it out.
[u'ethergreen']
Current subreddit: Datasets Archive
Current post: Open data about crime and policing in England, Wales and Northern Ireland
[u'MyKungFuIsCat', u'cavedave']
Current post: Every space launch (x-post from r/space)
[]
In [ ]:
"""
Testing out tables 
""" 
reload(redditDataset)
c = initializeDatabase()