Skip to content

Commit 9a6ff9b

Browse files
author
Manan Shah
committed
Initial site construction
1 parent bf0ecff commit 9a6ff9b

File tree

69 files changed

+3446
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+3446
-1
lines changed

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017 Manan Shah, SNAP Group
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
TEMPDIR := $(shell mktemp -d -t tmp.XXX)
2+
3+
publish:
4+
echo 'publishing site!'
5+
cp -r ./_site/* $(TEMPDIR)
6+
cd $(TEMPDIR) && \
7+
ls -a && \
8+
git init && \
9+
git add . && \
10+
git commit -m 'publish site' && \
11+
git remote add origin https://https://github.com/snap-stanford/cs224w-notes.git && \
12+
git push origin master:refs/heads/gh-pages --force

README.md

+20-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,21 @@
11
# cs224w-notes
2-
CS224W Course Notes
2+
3+
CS224W course notes.
4+
5+
## Contributing
6+
7+
The notes are written in Markdown and are compiled into HTML using Jekyll. Please add your changes directly to the Markdown source code. This repo is configured without any extra Jekyll plugins so it can be compiled directly by GitHub Pages. Thus, any changes to the Markdown files will be automatically reflected in the live website.
8+
9+
To make any changes to this repo, first fork this repo. Make the changes you want and push them to your own forked copy of this repo. Finally, go back to the GitHub website to create a pull request to bring your changes into the `snap-stanford/cs224w-notes` repo.
10+
11+
If you want to test your changes locally before pushing your changes to the `master` branch, you can run Jekyll locally on your own machine. In order to install Jekyll, you can follow the instructions posted on their website (https://jekyllrb.com/docs/installation/). Then, do the following from the root of your cloned version of this repo:
12+
1) Make whatever changes you want to the Markdown `.md` files.
13+
2) `rm -r _site/` # remove the existing compiled site
14+
3) `jekyll serve` # this creates a running server
15+
4) Open your web browser to where the server is running and check the changes you made.
16+
17+
### Notes about writing math equations
18+
19+
- Start and end math equations with `$$` **for both inline and display equations**! To make a display equation, put one newline before the starting `$$` a newline after the ending `$$`.
20+
21+
- Avoid vertical bars `|` in any inline math equations (ie. within a paragraph of text). Otherwise, the GitHub Markdown compiler interprets it as a table cell element (see GitHub Markdown spec [here](https://github.github.com/gfm/)). Instead, use one of `\mid`, `\vert`, `\lvert`, or `\rvert` instead. For double bar lines, write `\|` instead of `||`.

_config.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
baseurl: /cs228-notes
2+
title: Probabilistic graphical modeling course
3+
subtitle: Lecture notes for Stanford cs228.
4+
author: Volodymyr Kuleshov
5+
simple_search: http://google.com/search
6+
description: Lecture notes for Stanford cs228.
7+
name: cs228-notes
8+
markdown_ext: "markdown,mkdown,mkdn,mkd,md"
9+
permalink: /articles/:short_year/:title
10+
timezone: America/New_York
11+
excerpt_separator: <!--more--> # you can specify your own separator, of course.
12+
exclude: ['Gemfile', 'Gemfile.lock', 'Rakefile', 'README.md']
13+
post:
14+
template: _post.txt
15+
extension: md
16+
page:
17+
template: _page.txt
18+
extension: md
19+
editor: gvim
20+
git:
21+
branch: master
22+
transfer:
23+
command: rsync
24+
settings: -av
25+
source: _site/

_data/options.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mathjax: true
2+
lato_font_load: true

_includes/footer.html

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<footer>
2+
<hr class="slender">
3+
<div class="credits">
4+
Site created with <a href="//jekyllrb.com">Jekyll</a> using the <a href="//github.com/clayh53/tufte-jekyll">Tufte theme</a>. Inspired by <a href="//https://ermongroup.github.io/cs228-notes/">Stanford CS 228 Notes</a>. &copy; {{ site.time | date: '%Y' }}
5+
</div>
6+
</footer>

_includes/fullwidth.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<figure class="fullwidth">
2+
{%- assign prefix2 = include.url | slice: 0, 2 -%}
3+
{%- assign prefix7 = include.url | slice: 0, 7 -%}
4+
{%- assign prefix8 = include.url | slice: 0, 8 -%}
5+
{%- if prefix2 == '//' or prefix7 == 'http://' or prefix8 == 'https://' -%}
6+
<img src="{{ include.src }}" alt="{{ include.caption }}" />
7+
{%- else -%}
8+
<img src="{{ site.baseurl }}/{{ include.src }}" alt="{{ include.caption }}" />
9+
{%- endif -%}
10+
<figcaption>{{ include.caption }}</figcaption>
11+
</figure>

_includes/head.html

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<head>
2+
<meta charset="utf-8">
3+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
4+
<meta name="viewport" content="width=device-width, initial-scale=1">
5+
6+
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
7+
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
8+
9+
<link rel="stylesheet" href="{{ '/css/tufte.css' | prepend: site.baseurl }}">
10+
11+
<!-- Google Fonts loaded here depending on setting in _data/options.yml true loads font, blank does not-->
12+
{%- if site.data.options.lato_font_load -%}
13+
<link href='//fonts.googleapis.com/css?family=Lato:400,400italic' rel='stylesheet' type='text/css'>
14+
{%- endif -%}
15+
16+
<!-- Load up MathJax script if needed ... specify in /_data/options.yml file-->
17+
{%- if site.data.options.mathjax -%}
18+
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS_CHTML"></script>
19+
{%- endif -%}
20+
21+
<script>
22+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
23+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
24+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
25+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
26+
27+
ga('create', 'UA-75587219-1', 'auto');
28+
ga('send', 'pageview');
29+
</script>
30+
31+
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}">
32+
<link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ "/feed.xml" | prepend: site.baseurl | prepend: site.url }}" />
33+
</head>

_includes/header.html

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!--- Header and nav template site-wide -->
2+
<header>
3+
<nav class="group">
4+
<a href="{{ site.baseurl }}/">Contents</a>
5+
<a href="http://cs224w.stanford.edu/">Class</a>
6+
<a href="https://github.com/snap-stanford/cs224w-notes">GitHub</a>
7+
</nav>
8+
</header>

_includes/maincolumn_img.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<figure class="maincolumn">
2+
<figcaption class="marginnote">{{ include.caption }}</figcaption>
3+
{%- assign prefix2 = include.url | slice: 0, 2 -%}
4+
{%- assign prefix7 = include.url | slice: 0, 7 -%}
5+
{%- assign prefix8 = include.url | slice: 0, 8 -%}
6+
{%- if prefix2 == '//' or prefix7 == 'http://' or prefix8 == 'https://' -%}
7+
<img src="{{ include.src }}" alt="{{ include.caption }}" />
8+
{%- else -%}
9+
<img src="{{ site.baseurl }}/{{ include.src }}" alt="{{ include.caption }}" />
10+
{%- endif -%}
11+
</figure>

_includes/marginfigure.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<label for="{{ include.id }}" class="margin-toggle">&#8853;</label>
2+
<input type="checkbox" id="{{ include.id }}" class="margin-toggle">
3+
<span class="marginnote">
4+
{%- assign prefix2 = include.url | slice: 0, 2 -%}
5+
{%- assign prefix7 = include.url | slice: 0, 7 -%}
6+
{%- assign prefix8 = include.url | slice: 0, 8 -%}
7+
{%- if prefix2 == '//' or prefix7 == 'http://' or prefix8 == 'https://' -%}
8+
<img class="fullwidth" src="{{ include.url }}" alt="{{ include.description }}" />
9+
{%- else -%}
10+
<img class="fullwidth" src="{{ site.baseurl }}/{{ include.url }}" alt="{{ include.description }}" />
11+
{%- endif -%}
12+
<br>
13+
{{ include.description }}
14+
</span>

_includes/marginnote.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<label for="{{ include.id }}" class="margin-toggle">&#8853;</label><input type="checkbox" id="{{ include.id }}" class="margin-toggle"/><span class="marginnote">{{ include.note }}</span>

_includes/print-footer.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<span class="print-footer">{% if page.date %}{{ page.title }} - {{ page.date | date: "%B %-d, %Y" }} - {{site.author}}{% else %}{{ page.title }} - {{site.author}}{% endif %}</span>

_includes/sidenote.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<label for="{{ include.id }}" class="margin-toggle sidenote-number"></label><input type="checkbox" id="{{ include.id }}" class="margin-toggle"><span class="sidenote">{{ include.note }}</span>

_layouts/default.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
{% include head.html %}
4+
<body>
5+
{% include header.html %}
6+
<article class="group">
7+
{{ content }}
8+
</article>
9+
{% include footer.html %}
10+
</body>
11+
</html>

_layouts/full-width.html

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html>
3+
{% include head.html %}
4+
<body class="full-width">
5+
{% include header.html %}
6+
<article>
7+
{{ content }}
8+
</article>
9+
{% include print-footer.html %}
10+
{% include footer.html %}
11+
</body>
12+
</html>

_layouts/page.html

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
layout: default
3+
---
4+
<h1>{{ page.title | capitalize }}</h1>
5+
<p class="subtitle">{{ page.date | date: "%B %-d, %Y" }}</p>
6+
7+
8+
{{ content }}

_layouts/post.html

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
layout: default
3+
---
4+
<h1>{{ page.title | capitalize }}</h1>
5+
<p class="subtitle">{{ page.date | date: "%B %-d, %Y" }}</p>
6+
7+
8+
<script type="text/x-mathjax-config">
9+
MathJax.Hub.Config({
10+
TeX: {
11+
Macros: {
12+
e: "\\epsilon",
13+
xti: "x^{(i)}",
14+
yti: "y^{(i)}",
15+
bfy: "{\\bf y}",
16+
bfx: "{\\bf x}",
17+
bfg: "{\\bf g}",
18+
bfbeta: "{\\bf \\beta}",
19+
tp: "\\tilde p",
20+
pt: "p_\\theta",
21+
E: "{\\mathbb{E}}",
22+
Ind: "{\\mathbb{I}}",
23+
KL: "{\\mathbb{KL}}",
24+
Re: "{\\mathbb{R}}",
25+
Dc: "{\\mathcal{D}}",
26+
Tc: "{\\mathcal{T}}",
27+
Xc: "{\\mathcal{X}}",
28+
note: ["\\textcolor{blue}{[NOTE: #1]}",1]
29+
}
30+
}
31+
});
32+
</script>
33+
34+
35+
{{ content }}

_sass/_fonts.scss

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Font imports file. If you don't want these fonts, comment out these and add your own into the fonts directory
2+
// and point the src attribute to the file.
3+
4+
@charset "UTF-8";
5+
6+
@font-face {
7+
font-family: "et-book";
8+
src: url("../fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot");
9+
src: url("../fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot?#iefix") format("embedded-opentype"), url("../fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.woff") format("woff"), url("../fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.ttf") format("truetype"), url("../fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.svg#etbookromanosf") format("svg");
10+
font-weight: normal;
11+
font-style: normal
12+
}
13+
14+
@font-face {
15+
font-family: "et-book";
16+
src: url("../fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot");
17+
src: url("../fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.eot?#iefix") format("embedded-opentype"), url("../fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.woff") format("woff"), url("../fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.ttf") format("truetype"), url("../fonts/et-book/et-book-display-italic-old-style-figures/et-book-display-italic-old-style-figures.svg#etbookromanosf") format("svg");
18+
font-weight: normal;
19+
font-style: italic
20+
}
21+
22+
@font-face {
23+
font-family: "et-book";
24+
src: url("../fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot");
25+
src: url("../fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.eot?#iefix") format("embedded-opentype"), url("../fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.woff") format("woff"), url("../fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.ttf") format("truetype"), url("../fonts/et-book/et-book-bold-line-figures/et-book-bold-line-figures.svg#etbookromanosf") format("svg");
26+
font-weight: bold;
27+
font-style: normal
28+
}
29+
30+
@font-face {
31+
font-family: "et-book-roman-old-style";
32+
src: url("../fonts/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot");
33+
src: url("../fonts/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.eot?#iefix") format("embedded-opentype"), url("../fonts/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.woff") format("woff"), url("../fonts/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.ttf") format("truetype"), url("../fonts/et-book/et-book-roman-old-style-figures/et-book-roman-old-style-figures.svg#etbookromanosf") format("svg");
34+
font-weight: normal;
35+
font-style: normal;
36+
}

_sass/_settings.scss

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* This file contains all the constants for colors and font styles */
2+
3+
$body-font: et-book, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
4+
// Note that Gill Sans is the top of the stack and corresponds to what is used in Tufte's books
5+
// However, it is not a free font, so if it is not present on the computer that is viewing the webpage
6+
// The free Google 'Lato' font is used instead. It is similar.
7+
$sans-font: "Gill Sans", "Gill Sans MT", "Lato", Calibri, sans-serif;
8+
$code-font: Consolas, "Liberation Mono", Menlo, Courier, monospace;
9+
$url-font: "Lucida Console", "Lucida Sans Typewriter", Monaco, "Bitstream Vera Sans Mono", monospace;
10+
$text-color: #111;
11+
$bg-color: #fffff8;
12+
$contrast-color: #a00000;
13+
$border-color: #333333;
14+
$link-style: underline; // choices are 'color' or 'underline'. Default is color using $contrast-color set above

_sass/_syntax-highlighting.scss

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/**
2+
* Syntax highlighting styles
3+
*/
4+
$spacing-unit: 30px;
5+
%vertical-rhythm {
6+
margin-bottom: $spacing-unit / 2;
7+
}
8+
9+
.highlight {
10+
background: #fffff8;
11+
@extend %vertical-rhythm;
12+
13+
.c { color: #998; font-style: italic } // Comment
14+
.err { color: #a61717; background-color: #e3d2d2 } // Error
15+
.k { font-weight: bold } // Keyword
16+
.o { font-weight: bold } // Operator
17+
.cm { color: #998; font-style: italic } // Comment.Multiline
18+
.cp { color: #999; font-weight: bold } // Comment.Preproc
19+
.c1 { color: #998; font-style: italic } // Comment.Single
20+
.cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special
21+
.gd { color: #000; background-color: #fdd } // Generic.Deleted
22+
.gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific
23+
.ge { font-style: italic } // Generic.Emph
24+
.gr { color: #a00 } // Generic.Error
25+
.gh { color: #999 } // Generic.Heading
26+
.gi { color: #000; background-color: #dfd } // Generic.Inserted
27+
.gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific
28+
.go { color: #888 } // Generic.Output
29+
.gp { color: #555 } // Generic.Prompt
30+
.gs { font-weight: bold } // Generic.Strong
31+
.gu { color: #aaa } // Generic.Subheading
32+
.gt { color: #a00 } // Generic.Traceback
33+
.kc { font-weight: bold } // Keyword.Constant
34+
.kd { font-weight: bold } // Keyword.Declaration
35+
.kp { font-weight: bold } // Keyword.Pseudo
36+
.kr { font-weight: bold } // Keyword.Reserved
37+
.kt { color: #458; font-weight: bold } // Keyword.Type
38+
.m { color: #099 } // Literal.Number
39+
.s { color: #d14 } // Literal.String
40+
.na { color: #008080 } // Name.Attribute
41+
.nb { color: #0086B3 } // Name.Builtin
42+
.nc { color: #458; font-weight: bold } // Name.Class
43+
.no { color: #008080 } // Name.Constant
44+
.ni { color: #800080 } // Name.Entity
45+
.ne { color: #900; font-weight: bold } // Name.Exception
46+
.nf { color: #900; font-weight: bold } // Name.Function
47+
.nn { color: #555 } // Name.Namespace
48+
.nt { color: #000080 } // Name.Tag
49+
.nv { color: #008080 } // Name.Variable
50+
.ow { font-weight: bold } // Operator.Word
51+
.w { color: #bbb } // Text.Whitespace
52+
.mf { color: #099 } // Literal.Number.Float
53+
.mh { color: #099 } // Literal.Number.Hex
54+
.mi { color: #099 } // Literal.Number.Integer
55+
.mo { color: #099 } // Literal.Number.Oct
56+
.sb { color: #d14 } // Literal.String.Backtick
57+
.sc { color: #d14 } // Literal.String.Char
58+
.sd { color: #d14 } // Literal.String.Doc
59+
.s2 { color: #d14 } // Literal.String.Double
60+
.se { color: #d14 } // Literal.String.Escape
61+
.sh { color: #d14 } // Literal.String.Heredoc
62+
.si { color: #d14 } // Literal.String.Interpol
63+
.sx { color: #d14 } // Literal.String.Other
64+
.sr { color: #009926 } // Literal.String.Regex
65+
.s1 { color: #d14 } // Literal.String.Single
66+
.ss { color: #990073 } // Literal.String.Symbol
67+
.bp { color: #999 } // Name.Builtin.Pseudo
68+
.vc { color: #008080 } // Name.Variable.Class
69+
.vg { color: #008080 } // Name.Variable.Global
70+
.vi { color: #008080 } // Name.Variable.Instance
71+
.il { color: #099 } // Literal.Number.Integer.Long
72+
}

assets/img/.DS_Store

6 KB
Binary file not shown.

0 commit comments

Comments
 (0)