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
from functools import partial | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from pyriemann.utils.distance import distance_riemann | |
@partial(np.vectorize, excluded=['ref']) | |
def distance_riemann_v(c_xx, c_yy, ref): | |
""" Vectorized version of distance_riemann projected in 2D |
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
openapi: "3.0.0" | |
info: | |
version: 1.0.0 | |
title: Swagger Petstore | |
license: | |
name: MIT | |
servers: | |
- url: http://petstore.swagger.io/v1 | |
paths: | |
/pets: |
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
""" Small proof of concept of an epoching function using NumPy strides | |
License: BSD-3-Clause | |
Copyright: David Ojeda <[email protected]>, 2018 | |
""" | |
import numpy as np | |
from numpy.lib import stride_tricks | |
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
#include <iostream> | |
#include <vector> | |
#include <Eigen/Dense> | |
int main(int argc, char *argv[]) { | |
Eigen::MatrixXd X = Eigen::MatrixXd::Random(3, 3); | |
// PCA = EVD of the covariance matrix | |
Eigen::SelfAdjointEigenSolver < Eigen::MatrixXd > solver(X.selfadjointView<Eigen::Lower>()); |
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
#include <iostream> | |
#include <vector> | |
#include <iterator> | |
using namespace std; | |
int main(int , char *[]) { | |
vector<int> v1 = {0,1,2}; |
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/env python | |
def sqrt(x): | |
begin = 0 | |
end = x | |
while begin <= end: | |
mid = begin + (end - begin) // 2 |