This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
]q (X external_idqX commandqX tsqe.M.}q (K }q(X __version__qK X commandqX f = open("/Users/han/Documents/workspace/WeiboDeleted/log_oldtreat.txt",encoding="utf-8") | |
w = open("/Users/han/Documents/workspace/WeiboDeleted/log_old_useful.txt",encoding="utf-8")qX __id__qK X external_idqX pythonqX tsqcdatetime | |
datetime | |
q C | |
zq | |
qRquK}q (hK hX l = [1047669615,1048296970,1067326000,1071750167,1081021387,1188868702,1197011891,1216026271,1226162531,1236709234,1269475093,1290153010,1299970031,1369633971,1395365674,1400272691,1411824754,1415859710,1449204363,1455131001,1460570074,1462311881,1565687157,1642991815,1647345487,1649196637,1650008680,1653744734,1654010852,1655668652,1680683820,1686443664,1687540800,1697227057,1705396685,1727747065,1733119815,1734612364,1735778800,1737943787,1741617712,1742483557,1742733704,1747171950,1749244184,1760344377,1766476347,1772689980,1780766333,1791072365,1792251887,1793087587,1799934707,1800392783,1827724077,1828351354,183167595 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from selenium import webdriver | |
import os | |
driver = '/Users/han/Dropbox/Codes/webdriver/chromedriver' | |
os.environ["webdriver.chrome.driver"] = driver | |
driver = webdriver.Chrome(driver) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(stm) | |
data <- read.csv("pol.csv") | |
processedtest <- textProcessor(data$documents, metadata = data) | |
outtest <- prepDocuments(processedtest$documents, processedtest$vocab, processedtest$meta) | |
poliblogPrevFit <- stm(documents = out$documents, vocab = out$vocab, K = 20, prevalence =~ rating + s(day), max.em.its = 10, data = out$meta, init.type = "Spectral") | |
prep <- estimateEffect(1:20 ~ rating + s(day), poliblogPrevFit, meta = out$meta, uncertainty = "Global") | |