This file contains 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
#! /usr/bin/python | |
""" | |
Simple example for IRL based on apprenticeship learning | |
""" | |
from __future__ import print_function | |
import numpy as np | |
def linearMDP(S=5, goal=3): | |
""" |
This file contains 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
This is an excellent tool when you're compiling latex files. Nevertheless, there's a bug when you insert a tilde as a nbsp. Something that needs to be modified in ''/usr/bin/texi2dvi'', and that's this part of code ''catcode_special=true'' to''catcode_special=false''. After that, a nice example for your latex file is: | |
texi2dvi --pdf --clean --verbose --batch file.tex |
This file contains 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
""" | |
this is an extended version of http://hmmlearn.github.io/hmmlearn/auto_examples/plot_hmm_sampling.html#example-plot-hmm-sampling-py | |
sampling as in the example, then fitting data to another model (with also 4 variables) and then doing some scoring with | |
the same model and also with a mixture of gaussians | |
""" | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from hmmlearn import hmm |
This file contains 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
Eigen::ArrayXXb findPeaks(Eigen::ArrayXXd &M, unsigned int &footprint_size){ | |
Eigen::ArrayXXb result = Eigen::ArrayXXb::Zero(M.rows(), M.cols()); | |
bool tmp_max; | |
bool quit_for=false; | |
for(int i = footprint_size; i<M.rows()-footprint_size; ++i){ | |
for(int j = footprint_size; j<M.cols()-footprint_size; ++j){ | |
tmp_max=true; | |
for(int ii=i-footprint_size; ii<i+footprint_size;++ii){ | |
for(int jj=j-footprint_size; jj<j+footprint_size;++jj){ | |
if(ii==i && jj==j) |
This file contains 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
import numpy as np # import library for linear algebra and more utilities | |
from numpy.random import randint # import random int | |
# initialize random seed | |
np.random.seed(4) | |
houses = ["Gryffindor","Slytherin", "Hufflepuff", "Ravenclaw"] | |
houses_points = [] | |
for _ in houses: | |
# houses_points.append(randint(0, 100, randint(60,100))) |
This file contains 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
license: gpl-3.0 |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Example of Bootstrap 3 Carousel</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> |
This file contains 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
license: gpl-3.0 |
This file contains 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
sudo usb_modeswitch -v 12d1 -p 1f01 -J |
This file contains 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
# in root of grpc project | |
GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install . |
OlderNewer