Skip to content

Commit

Permalink
[WIP] Splash Page (#576)
Browse files Browse the repository at this point in the history
* Added a splash page

* Intermediate commit.

* More edits.

* Looking better now.

* Added a graph, tidied up a bit.

* Delete 1_GaussianMixtureModel.md

* Delete quick-start.md

* Minor changes.

* Added current build script.

* Unbolded.
  • Loading branch information
cpfiffer authored and yebai committed Dec 8, 2018
1 parent 6b26d1d commit f27f2c9
Show file tree
Hide file tree
Showing 18 changed files with 48,269 additions and 410 deletions.
87 changes: 72 additions & 15 deletions docs/site/_docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ end
```


<a target='_blank' href='https://github.com/cpfiffer/Turing.jl/blob/337864f8aee1734befb283b73d167b912e8718ad/src/core/compiler.jl#L177-L212' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/TuringLang/Turing.jl/blob/88a3643335ff88f763b3568553b6777316a50e67/src/core/compiler.jl#L177-L212' class='documenter-source'>source</a><br>

### <a id='Turing.@~' href='#Turing.@~'>#</a> **`Turing.@~`** &mdash; *Macro*.

Expand All @@ -71,7 +71,7 @@ Example:
```


<a target='_blank' href='https://github.com/cpfiffer/Turing.jl/blob/337864f8aee1734befb283b73d167b912e8718ad/src/core/compiler.jl#L97-L109' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/TuringLang/Turing.jl/blob/88a3643335ff88f763b3568553b6777316a50e67/src/core/compiler.jl#L97-L109' class='documenter-source'>source</a><br>


<a id='Samplers-1'></a>
Expand All @@ -93,7 +93,7 @@ Generic interface for implementing inference algorithms. An implementation of an
Turing translates models to chunks that call the modelling functions at specified points. The dispatch is based on the value of a `sampler` variable. To include a new inference algorithm implements the requirements mentioned above in a separate file, then include that file at the end of this one.


<a target='_blank' href='https://github.com/cpfiffer/Turing.jl/blob/337864f8aee1734befb283b73d167b912e8718ad/src/Turing.jl#L91-L102' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/TuringLang/Turing.jl/blob/88a3643335ff88f763b3568553b6777316a50e67/src/Turing.jl#L92-L103' class='documenter-source'>source</a><br>

### <a id='Turing.Gibbs' href='#Turing.Gibbs'>#</a> **`Turing.Gibbs`** &mdash; *Type*.

Expand All @@ -111,7 +111,7 @@ alg = Gibbs(1000, HMC(1, 0.2, 3, :v1), PG(20, 1, :v2))
```


<a target='_blank' href='https://github.com/cpfiffer/Turing.jl/blob/337864f8aee1734befb283b73d167b912e8718ad/src/samplers/gibbs.jl#L1-L10' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/TuringLang/Turing.jl/blob/88a3643335ff88f763b3568553b6777316a50e67/src/samplers/gibbs.jl#L1-L10' class='documenter-source'>source</a><br>

### <a id='Turing.HMC' href='#Turing.HMC'>#</a> **`Turing.HMC`** &mdash; *Type*.

Expand Down Expand Up @@ -144,7 +144,7 @@ sample(gdemo([1.5, 2]), HMC(1000, 0.05, 10))
```


<a target='_blank' href='https://github.com/cpfiffer/Turing.jl/blob/337864f8aee1734befb283b73d167b912e8718ad/src/samplers/hmc.jl#L1-L26' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/TuringLang/Turing.jl/blob/88a3643335ff88f763b3568553b6777316a50e67/src/samplers/hmc.jl#L1-L26' class='documenter-source'>source</a><br>

### <a id='Turing.HMCDA' href='#Turing.HMCDA'>#</a> **`Turing.HMCDA`** &mdash; *Type*.

Expand Down Expand Up @@ -177,7 +177,7 @@ sample(gdemo([1.5, 2]), HMCDA(1000, 200, 0.65, 0.3))
```


<a target='_blank' href='https://github.com/cpfiffer/Turing.jl/blob/337864f8aee1734befb283b73d167b912e8718ad/src/samplers/hmcda.jl#L1-L26' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/TuringLang/Turing.jl/blob/88a3643335ff88f763b3568553b6777316a50e67/src/samplers/hmcda.jl#L1-L26' class='documenter-source'>source</a><br>

### <a id='Turing.IPMCMC' href='#Turing.IPMCMC'>#</a> **`Turing.IPMCMC`** &mdash; *Type*.

Expand Down Expand Up @@ -210,7 +210,7 @@ sample(gdemo([1.5, 2]), IPMCMC(100, 100, 4, 2))
```


<a target='_blank' href='https://github.com/cpfiffer/Turing.jl/blob/337864f8aee1734befb283b73d167b912e8718ad/src/samplers/ipmcmc.jl#L1-L26' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/TuringLang/Turing.jl/blob/88a3643335ff88f763b3568553b6777316a50e67/src/samplers/ipmcmc.jl#L1-L26' class='documenter-source'>source</a><br>

### <a id='Turing.IS' href='#Turing.IS'>#</a> **`Turing.IS`** &mdash; *Type*.

Expand Down Expand Up @@ -245,7 +245,7 @@ sample(gdemo([1.5, 2]), IS(1000))
```


<a target='_blank' href='https://github.com/cpfiffer/Turing.jl/blob/337864f8aee1734befb283b73d167b912e8718ad/src/samplers/is.jl#L1-L28' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/TuringLang/Turing.jl/blob/88a3643335ff88f763b3568553b6777316a50e67/src/samplers/is.jl#L1-L28' class='documenter-source'>source</a><br>

### <a id='Turing.MH' href='#Turing.MH'>#</a> **`Turing.MH`** &mdash; *Type*.

Expand Down Expand Up @@ -278,7 +278,7 @@ sample(gdemo([1.5, 2]), MH(1000, (:m, (x) -> Normal(x, 0.1)), :s)))
```


<a target='_blank' href='https://github.com/cpfiffer/Turing.jl/blob/337864f8aee1734befb283b73d167b912e8718ad/src/samplers/mh.jl#L1-L26' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/TuringLang/Turing.jl/blob/88a3643335ff88f763b3568553b6777316a50e67/src/samplers/mh.jl#L1-L26' class='documenter-source'>source</a><br>

### <a id='Turing.NUTS' href='#Turing.NUTS'>#</a> **`Turing.NUTS`** &mdash; *Type*.

Expand Down Expand Up @@ -311,7 +311,7 @@ sample(gdemo([1.j_max, 2]), NUTS(1000, 200, 0.6j_max))
```


<a target='_blank' href='https://github.com/cpfiffer/Turing.jl/blob/337864f8aee1734befb283b73d167b912e8718ad/src/samplers/nuts.jl#L1-L26' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/TuringLang/Turing.jl/blob/88a3643335ff88f763b3568553b6777316a50e67/src/samplers/nuts.jl#L1-L26' class='documenter-source'>source</a><br>

### <a id='Turing.PG' href='#Turing.PG'>#</a> **`Turing.PG`** &mdash; *Type*.

Expand Down Expand Up @@ -344,7 +344,7 @@ sample(gdemo([1.5, 2]), PG(100, 100))
```


<a target='_blank' href='https://github.com/cpfiffer/Turing.jl/blob/337864f8aee1734befb283b73d167b912e8718ad/src/samplers/pgibbs.jl#L1-L26' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/TuringLang/Turing.jl/blob/88a3643335ff88f763b3568553b6777316a50e67/src/samplers/pgibbs.jl#L1-L26' class='documenter-source'>source</a><br>

### <a id='Turing.PMMH' href='#Turing.PMMH'>#</a> **`Turing.PMMH`** &mdash; *Type*.

Expand All @@ -363,7 +363,7 @@ alg = PMMH(100, SMC(20, :v1), MH(1,(:v2, (x) -> Normal(x, 1))))
```


<a target='_blank' href='https://github.com/cpfiffer/Turing.jl/blob/337864f8aee1734befb283b73d167b912e8718ad/src/samplers/pmmh.jl#L1-L13' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/TuringLang/Turing.jl/blob/88a3643335ff88f763b3568553b6777316a50e67/src/samplers/pmmh.jl#L1-L13' class='documenter-source'>source</a><br>

### <a id='Turing.SGHMC' href='#Turing.SGHMC'>#</a> **`Turing.SGHMC`** &mdash; *Type*.

Expand Down Expand Up @@ -391,7 +391,7 @@ sample(example, SGHMC(1000, 0.01, 0.1))
```


<a target='_blank' href='https://github.com/cpfiffer/Turing.jl/blob/337864f8aee1734befb283b73d167b912e8718ad/src/samplers/sghmc.jl#L1-L21' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/TuringLang/Turing.jl/blob/88a3643335ff88f763b3568553b6777316a50e67/src/samplers/sghmc.jl#L1-L21' class='documenter-source'>source</a><br>

### <a id='Turing.SGLD' href='#Turing.SGLD'>#</a> **`Turing.SGLD`** &mdash; *Type*.

Expand Down Expand Up @@ -419,7 +419,7 @@ sample(example, SGLD(1000, 0.5))
```


<a target='_blank' href='https://github.com/cpfiffer/Turing.jl/blob/337864f8aee1734befb283b73d167b912e8718ad/src/samplers/sgld.jl#L1-L21' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/TuringLang/Turing.jl/blob/88a3643335ff88f763b3568553b6777316a50e67/src/samplers/sgld.jl#L1-L21' class='documenter-source'>source</a><br>

### <a id='Turing.SMC' href='#Turing.SMC'>#</a> **`Turing.SMC`** &mdash; *Type*.

Expand Down Expand Up @@ -452,13 +452,69 @@ sample(gdemo([1.5, 2]), SMC(1000))
```


<a target='_blank' href='https://github.com/cpfiffer/Turing.jl/blob/337864f8aee1734befb283b73d167b912e8718ad/src/samplers/smc.jl#L1-L26' class='documenter-source'>source</a><br>
<a target='_blank' href='https://github.com/TuringLang/Turing.jl/blob/88a3643335ff88f763b3568553b6777316a50e67/src/samplers/smc.jl#L1-L26' class='documenter-source'>source</a><br>


<a id='Data-Structures-1'></a>

## Data Structures

### <a id='Libtask.TArray' href='#Libtask.TArray'>#</a> **`Libtask.TArray`** &mdash; *Type*.


```
TArray{T}(dims, ...)
```

Implementation of data structures that automatically perform copy-on-write after task copying.

If current*task is an existing key in `s`, then return `s[current*task]`. Otherwise, return`s[current*task] = s[last*task]`.

Usage:

```julia
TArray(dim)
```

Example:

```julia
ta = TArray(4) # init
for i in 1:4 ta[i] = i end # assign
Array(ta) # convert to 4-element Array{Int64,1}: [1, 2, 3, 4]
```
<a id='Utilities-1'></a>
## Utilities
### <a id='Libtask.tzeros' href='#Libtask.tzeros'>#</a> **`Libtask.tzeros`** &mdash; *Function*.
```
tzeros(dims, ...)
```

Construct a distributed array of zeros. Trailing arguments are the same as those accepted by `TArray`.

```julia
tzeros(dim)
```

Example:

```julia
tz = tzeros(4) # construct
Array(tz) # convert to 4-element Array{Int64,1}: [0, 0, 0, 0]
```


<a id='Index-1'></a>

## Index

- [`Libtask.TArray`]({{site.baseurl}}/docs/library/#Libtask.TArray)
- [`Turing.Gibbs`]({{site.baseurl}}/docs/library/#Turing.Gibbs)
- [`Turing.HMC`]({{site.baseurl}}/docs/library/#Turing.HMC)
- [`Turing.HMCDA`]({{site.baseurl}}/docs/library/#Turing.HMCDA)
Expand All @@ -472,6 +528,7 @@ sample(gdemo([1.5, 2]), SMC(1000))
- [`Turing.SGLD`]({{site.baseurl}}/docs/library/#Turing.SGLD)
- [`Turing.SMC`]({{site.baseurl}}/docs/library/#Turing.SMC)
- [`Turing.Sampler`]({{site.baseurl}}/docs/library/#Turing.Sampler)
- [`Libtask.tzeros`]({{site.baseurl}}/docs/library/#Libtask.tzeros)
- [`Turing.@model`]({{site.baseurl}}/docs/library/#Turing.@model)
- [`Turing.@~`]({{site.baseurl}}/docs/library/#Turing.@~)

57 changes: 0 additions & 57 deletions docs/site/_docs/quick-start.md

This file was deleted.

23 changes: 22 additions & 1 deletion docs/site/_includes/feature_row
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@
</div>
{% endif %}

{% if f.i_class %}
<span style="font-size: 3em">
<div class="archive__item-teaser" size="3em">
<i class="{{ f.i_class }}"></i>
{% if f.image_caption %}
<span class="archive__item-caption">{{ f.image_caption | markdownify | remove: "<p>" | remove: "</p>" }}</span>
{% endif %}
</div>
</span>
{% endif %}

<div class="archive__item-body">
{% if f.title %}
<h2 class="archive__item-title">{{ f.title }}</h2>
Expand All @@ -46,8 +57,18 @@
<p><a href="{{ f_url }}" class="btn {{ f.btn_class }}">{{ f.btn_label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}</a></p>
{% endif %}
</div>

{% if f.code_chunk %}
<div class="language-julia highlighter-rouge">
<div class="highlight">
<pre class="highlight">
{{ f.code_chunk }}
</pre>
</div>
</div>
{% endif %}
</div>
</div>
{% endfor %}

</div>
</div>
2 changes: 1 addition & 1 deletion docs/site/_includes/page__hero.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ <h1 id="page-title" class="page__title" itemprop="headline">
{% else %}
{% assign url = action.url | relative_url %}
{% endif %}
<a href="{{ url }}" class="btn btn--light-outline btn--large">{{ action.label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}</a>
<a href="{{ url }}" class="btn btn--dark-outline btn--inverse">{{ action.label | default: site.data.ui-text[site.locale].more_label | default: "Learn More" }}</a>
{% endfor %}
{% endif %}
</div>
Expand Down
30 changes: 29 additions & 1 deletion docs/site/_sass/minimal-mistakes/_archive.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
position: relative;
border-radius: $border-radius;
overflow: hidden;
text-align: center;

img {
width: 100%;
Expand Down Expand Up @@ -331,6 +332,33 @@
}
}
}

&--center-left {
float: left;
margin-left: 0;
margin-right: 0;
width: 100%;
clear: both;
font-size: 1.0em;

.archive__item-teaser {
margin-bottom: 2em;
}

@include breakpoint($small) {
text-align: center;

.archive__item-teaser {
margin: 0 auto;
width: span(5 of 12);
}

.archive__item-body {
margin: 0 auto;
width: span(7 of 12);
}
}
}
}

/* Place inside an archive layout */
Expand Down Expand Up @@ -365,4 +393,4 @@
padding-right: 0;
}
}
}
}
9 changes: 7 additions & 2 deletions docs/site/_sass/minimal-mistakes/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
(primary, $primary-color),
(inverse, #fff),
(light-outline, transparent),
(dark-outline, transparent),
(success, $success-color),
(warning, $warning-color),
(danger, $danger-color),
Expand All @@ -46,11 +47,15 @@
&--#{$buttoncolor} {
@include yiq-contrasted($color);
@if ($buttoncolor == inverse) {
border: 1px solid $border-color;
border: 1px solid $inverse-border-color;
}
@if ($buttoncolor == light-outline) {
border: 1px solid #fff;
}
@if ($buttoncolor == dark-outline) {
border: 1px solid $text-color;
background-color: rgba(255, 255, 255, 0.5);
}

&:visited {
@include yiq-contrasted($color);
Expand Down Expand Up @@ -95,4 +100,4 @@
&--small {
font-size: $type-size-7;
}
}
}
Loading

0 comments on commit f27f2c9

Please sign in to comment.