View sin_fit.m
% Compute the power series of sin(x) using
% linear least-squares.
samples = 1000000;
degree = 10;
noise = 0.1;
xs = stdnormal_rnd(samples, 1);
xPowers = zeros(samples, degree);
for d = 1:degree
View cartpole.py
import gym
def main():
env = gym.make('CartPole-v1')
env.render()
obs = env.reset()
reward = 0
while True:
obs, rew, done, _ = env.step(policy(obs))
env.render()
View main.go
package main
import (
"log"
"github.com/unixpickle/anynet"
"github.com/unixpickle/anynet/anyrnn"
"github.com/unixpickle/anyrl"
"github.com/unixpickle/anyvec/anyvec32"
gym "github.com/unixpickle/gym-socket-api/binding-go"
View main.go
package main
import (
"log"
"os"
"path/filepath"
gym "github.com/openai/gym-http-api/binding-go"
"github.com/unixpickle/anynet"
"github.com/unixpickle/anynet/anyrnn"
View bias.m
n = 10000;
values = zeros(n,1);
for i=1:n
vec = rand(2,1)*2 - [1; 1];
vec /= norm(vec);
values(i) = (180 / pi) * atan2(vec(2), vec(1));
end
hist(values, 30);
View mail.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View iterm.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View main.py
import fileinput
import random
import re
from nltk.corpus import wordnet as wn
from nltk.corpus import webtext
from nltk import FreqDist
EXTRA_WORD_PROB = 0.2
commonWords = []
for fileid in webtext.fileids():
View features.go
package main
import (
"encoding/csv"
"flag"
"fmt"
"math/rand"
"os"
"strings"
"time"
View data.go
package main
import (
"fmt"
"math"
"math/rand"
"time"
)
func main() {