This file contains hidden or 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
if (is_single () ) { | |
$category = get_the_category(); | |
echo "_gaq.push(['_setCustomVar', 2,'Category','". $category[0]->cat_name. "', 3]);"; | |
} else { | |
} |
This file contains hidden or 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
<script type="text/javascript"> | |
var _gaq =_gaq || []; | |
_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); | |
if (is_single () ) { | |
$category = get_the_category(); | |
echo "_gaq.push(['_setCustomVar', 2,'Category','". $category[0]->cat_name. "', 3]);"; |
This file contains hidden or 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
<div> | |
<?php do_action( 'scrappy_credits' ); ?> | |
<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'scrappy' ) ); ?>" title="<?php esc_attr_e( 'A Semantic Personal Publishing Platform', 'scrappy' ); ?>" rel="generator"><?php printf( __( 'Proudly powered by %s', 'scrappy' ), 'WordPress' ); ?></a> | |
<span> | </span> | |
<?php printf( __( 'Theme: %1$s by %2$s', 'scrappy' ), 'Scrappy', '<a href="http://carolinemoore.net/" rel="designer">Caroline Moore</a>' ); ?> | |
</div><!-- .site-info --> |
This file contains hidden or 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
<!-- <?php do_action( 'scrappy_credits' ); ?> | |
<a href="<?php echo esc_url( __( 'http://wordpress.org/', 'scrappy' ) ); ?>" title="<?php esc_attr_e( 'A Semantic Personal Publishing Platform', 'scrappy' ); ?>" rel="generator"><?php printf( __( 'Proudly powered by %s', 'scrappy' ), 'WordPress' ); ?></a> | |
<span> | </span> | |
<?php printf( __( 'Theme: %1$s by %2$s', 'scrappy' ), 'Scrappy', '<a href="http://carolinemoore.net/" rel="designer">Caroline Moore</a>' ); ?> --> |
This file contains hidden or 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
</head> | |
<body <?php body_class(); ?>> | |
<div id="page" class="hfeed site"> | |
<a name= "TopOfPage"/a> | |
<?php do_action( 'before' ); ?> | |
<div class="wrapper"> | |
<header id="masthead" class="site-header" role="banner"> |
This file contains hidden or 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
#Create a user, home directory and set password | |
sudo useradd rstudio | |
sudo mkdir /home/rstudio | |
sudo passwd rstudio | |
sudo chmod -R 0777 /home/rstudio | |
#Update all files from the default state | |
sudo apt-get update | |
sudo apt-get upgrade |
This file contains hidden or 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
#Install in order to use RCurl & XML | |
sudo aptitude install libcurl4-openssl-dev | |
sudo apt-get install libxml2-dev |
This file contains hidden or 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
#Install a few background files | |
sudo apt-get install gdebi-core | |
sudo apt-get install libapparmor1 | |
#Change to a writeable directory | |
#Download & Install RStudio Server | |
cd /tmp | |
wget http://download2.rstudio.org/rstudio-server-0.97.336-amd64.deb | |
sudo gdebi rstudio-server-0.97.336-amd64.deb |
This file contains hidden or 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
#R: Read in 1987.csv from airline dataset into a dataframe | |
#No import statement needed to create a dataframe in R | |
airline1987 <- read.csv("~/airline/1987.csv") | |
dim(airline1987) | |
[1] 1311826 29 | |
#Python: use pandas to create a dataframe | |
import pandas as pd | |
airline1987 = pd.read_csv("/Users/randyzwitch/airline/1987.csv") | |
airline1987.shape |
This file contains hidden or 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
#Python looping to create a term-frequency dictionary | |
from collections import Counter | |
term_freq = Counter() | |
for word in english_dictionary: | |
for url in url_list: | |
if word in url_list: | |
term_freq[word] += 1 |