Skip to content

Instantly share code, notes, and snippets.

View VincentRouvreau's full-sized avatar

Vincent Rouvreau VincentRouvreau

View GitHub Profile
****************************** INTRUSIVE_LIST ******************************
40102 simplices - Persistent_cohomology_random_filtrations________10000_2: 0.01s
40102 simplices - Persistence_boundary_matrix_random_filtrations__10000_2: 0.009s
40102 simplices - Persistence_chain_matrix_random_filtrations_____10000_2: 0.12s
40102 simplices - Persistence_chain_matrix_vine_random_filtrations10000_2: 0.118s
40102 simplices - Persistence_RU_matrix_vine_random_filtrations___10000_2: 0.346s
40102 simplices - Persistence_RU_matrix_repr_random_filtrations___10000_2: 0.023s
60508 simplices - Persistent_cohomology_random_filtrations________10000_3: 0.017s
60508 simplices - Persistence_boundary_matrix_random_filtrations__10000_3: 0.017s
60508 simplices - Persistence_chain_matrix_random_filtrations_____10000_3: 0.474s
@VincentRouvreau
VincentRouvreau / bench_persistence_graphical_tools.py
Created April 7, 2022 08:01
Persistence graphical tools benchmark
import numpy as np
import gudhi
import matplotlib.pyplot as plt
from timeit import default_timer as timer
from datetime import timedelta
def randpers(nb_elts):
a = np.random.random(size=(nb_elts, 2))
# birth = column 0 | death = column 0 + column 1
return np.concatenate(((a[:,0]).reshape(nb_elts,1), (a[:,0] + a[:,1]).reshape(nb_elts,1)), axis=1)
@VincentRouvreau
VincentRouvreau / skcub.py
Created February 2, 2022 09:49
Not square cubical complexes
# Standard scientific Python imports
import numpy as np
# Standard scikit-learn imports
from sklearn.datasets import fetch_openml
from sklearn.pipeline import Pipeline
from sklearn.model_selection import train_test_split
from sklearn.svm import SVC
from sklearn import metrics
@VincentRouvreau
VincentRouvreau / benchmark_numpy_load_save_compressed_or_not.py
Created January 25, 2022 16:56
A gist to benchmark numpy load/save with compressed or not file format
import gudhi as gd
import numpy as np
import timeit
import os
pt = gd.read_points_from_off_file('SO3_50000.off')
np_pt = np.array(pt)
np.save("SO3_50000.npy", np_pt)
print ("SO3_50000.npy size = ", os.path.getsize("SO3_50000.npy"))
FROM fedora:33
# Upgrade distribution
RUN dnf upgrade -y
# Tools necessary for installing and configuring Ubuntu
RUN dnf install -y g++ cmake python3 boost-devel eigen3-devel gmp-devel CGAL-devel python3-devel python3-pip python3-tkinter python3-pybind11 \
&& dnf clean all \
&& rm -rf /var/cache/yum
/* Author(s): Vincent Rouvreau
*
* Copyright (C) 2021 Inria - MIT license
*
* Modification(s):
*/
#include <iostream>
#include <cmath> // for cos, sin
/* Author(s): Vincent Rouvreau
*
* Copyright (C) 2021 Inria - MIT license
*
* Modification(s):
*/
#include <iostream>
#include <gudhi/Coxeter_triangulation.h>
/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
* See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
* Author(s): Vincent Rouvreau
*
* Copyright (C) 2020 Inria
*
* Modification(s):
* - YYYY/MM Author: Description of the modification
*/
FROM ubuntu:20.04
# Update and upgrade distribution
RUN apt-get update && \
apt-get upgrade -y
# Tools necessary for installing and configuring Ubuntu
RUN apt-get install -y \
apt-utils \
locales \
2020-06-01T14:05:44.7641161Z ##[section]Starting: Request a runner to run this job
2020-06-01T14:05:45.0444881Z Can't find any online and idle self-hosted runner in current repository that matches the required labels: 'ubuntu-latest'
2020-06-01T14:05:45.0444912Z Can't find any online and idle self-hosted runner in current repository's account/organization that matches the required labels: 'ubuntu-latest'
2020-06-01T14:05:45.0444931Z Found online and idle hosted runner in current repository's account/organization that matches the required labels: 'ubuntu-latest'
2020-06-01T14:05:45.2334678Z ##[section]Finishing: Request a runner to run this job
2020-06-01T14:05:54.7461447Z Current runner version: '2.263.0'
2020-06-01T14:05:54.7487202Z ##[group]Operating System
2020-06-01T14:05:54.7487823Z Ubuntu
2020-06-01T14:05:54.7488053Z 18.04.4
2020-06-01T14:05:54.7488219Z LTS