Skip to content

Instantly share code, notes, and snippets.

# Grabs the best comments and splits into parts
import praw, re
r = praw.Reddit()
thread = r.submission(url=URL)
thread.comment_sort = 'best' # get the best comments from the thread
for comment in thread.comments:
punctuation_reg = re.compile('(?<=[.!,?:;-]) +')
split_parts = punctuation_reg.split(comment.body)
@teamdandelion
teamdandelion / labels_1024.tsv
Last active February 6, 2024 08:33
TensorBoard: TF Dev Summit Tutorial
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
7
2
1
0
4
1
4
9
5
9
from __future__ import division
import pandas as pd
import numpy as np
# get churn.csv from here: https://raw.githubusercontent.com/EricChiang/churn/master/data/churn.csv
churn_df = pd.read_csv('churn.csv')
col_names = churn_df.columns.tolist()
print "Column names:"
print col_names