Skip to content

Instantly share code, notes, and snippets.

@bspeice
bspeice / playground.rs
Created January 16, 2019 02:59
RefCell replacement as normal
use std::cell::RefCell;
fn my_mutator(cell: &RefCell<u8>) {
// Even though we're given an immutable reference,
// the `replace` method allows us to modify the inner value.
cell.replace(14);
}
fn main() {
let cell = RefCell::new(25);
@bspeice
bspeice / Update-AUPackages.md
Created January 13, 2018 19:24
Update-AUPackages Report #powershell #chocolatey
@bspeice
bspeice / Update-AUPackages.md
Created October 31, 2017 03:58
Update-AUPackages Report #powershell #chocolatey
@bspeice
bspeice / Update-AUPackages.md
Created September 18, 2017 03:38
Update-AUPackages Report #powershell #chocolatey
@bspeice
bspeice / Update-AUPackages.md
Created April 7, 2017 23:13
Update-AUPackages Report #powershell #chocolatey
@bspeice
bspeice / Update-AUPackages.md
Created March 19, 2017 14:34
Update-AUPackages Report #powershell #chocolatey
@bspeice
bspeice / Update-AUPackages.md
Created March 14, 2017 02:30
Update-AUPackages Report #powershell #chocolatey
@bspeice
bspeice / edward_regime_switch.py
Created February 11, 2017 18:30
Trying to implement a simple regime switch model in Edward
import edward as ed
from edward import models as md
import tensorflow as tf
import pandas as pd
import numpy as np
# Using float32's everywhere because there's no DiscreteUniform, so typing is weird.
data = pd.read_csv('txtdata.csv', header=None).values[:,0].astype(dtype=np.float32)
n = len(data)