Skip to content

Instantly share code, notes, and snippets.

View DorianDepriester's full-sized avatar

Dorian Depriester DorianDepriester

View GitHub Profile
@DorianDepriester
DorianDepriester / Main.tex
Last active July 20, 2021 09:30
Page de garde LaTeX pour manuscrit de thèse
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fichier maître (Main.tex) %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Dorian Depriester, 2014
\documentclass[a4paper, 12pt, twoside]{book}
\usepackage[utf8]{inputenc} % LaTeX, comprend les accents !
\usepackage[T1]{fontenc}
\usepackage[francais]{babel}
\usepackage{lmodern}
@DorianDepriester
DorianDepriester / GoogleBookDownloader
Created July 2, 2014 08:27
Google Book Downloader
// ==UserScript==
// @name Google Book Downloader
// @namespace http://userscripts.org/scripts/show/24984
// @description Download any book from books.google.com
// @include http://books.google.*
// @include http://www.google.com/books/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// @version 2.3
// ==/UserScript==
@DorianDepriester
DorianDepriester / Annexes.tex
Last active April 17, 2023 08:01
Template complet pour Manuscrit de thèse
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% ANNEXES %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Figures Annexes}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Figures annexes}
\blindtext
@DorianDepriester
DorianDepriester / exportPGFPlots.m
Created July 23, 2015 10:32
Fonction d'export des données MATLAB dans un fichier texte, avec un nom pour chaque colonne
function exportPGFPlots( filename, varargin )
%Exporte les données au format ASCII, sous forme de colonnes avec un nom
%propre à chaque colonne, pour PGFPlots.
% exportPGFPlots('FICHIER', VAR1, 'NOM1', VAR2, 'NOM2', ...) enregistre
% les vecteurs VAR1, VAR2,.. dans le fichier FICHIER. Le fichier
% comporte en entête le nom des colonnes (NOM1, NOM2 etc.).
nbcol=(nargin-1)/2; % Nombre de colonnes dans le fichier
if ~mod(nbcol,1) == 0 % Si nbcol n'est pas un entier
error('Nombre de paramètres incohérent.')
@DorianDepriester
DorianDepriester / imageAligner.m
Last active September 22, 2022 17:57
Determine the affine transform between two images or EBSD maps #mtexScript
function [M, U] = imageAligner(im0, varargin)
%%IMAGEALIGNER computes the affine transform between two images.
% [M, U]= IMAGEALIGNER(im0, im1) displays reference image im0 and deformed
% image im1 in two seperate figures, and the user is asked to locate points
% appearing in both images (control points). Then, the transform matrix M
% and the displacements U are given. Both images can be images as 2d array,
% EBSD data or of class grain2d.
%
% It is assumed that coordinates in reference image X are transformed into
% Y as follows: