Skip to content

Instantly share code, notes, and snippets.

View Dabsunter's full-sized avatar
🍻
Coroned

David Dabsunter

🍻
Coroned
View GitHub Profile
@Dabsunter
Dabsunter / images.py
Last active February 8, 2023 17:42
Fix de @qadadri pour MicroMedIAn/PathAIA
# coding: utf8
"""Useful functions for images."""
import numpy
from skimage.io import imread
from skimage.transform import resize
from .paths import imfiles_in_folder
from .types import NDBoolMask, PathLike, NDImage, NDByteImage, Coord
from ..patches.compat import convert_coords
import itertools
from typing import Iterator, List, Tuple, Sequence, Optional, Union, Any
//Auteurs: KENGNE TAGNE Ivan, CHAUVEL Benjamin
//Groupe: 3
#include <TimerOne.h>
#include <analogComp.h>
#include <LiquidCrystal.h>
// Pins de l'écran lcd
const byte d7 = 2;
const byte d6 = 3;
# marche que pour le 2nd ordre
def euler2(F, a,b, y0, yp0, n):
h = (b-a)/n
T = np.linspace(a,b,n+1)
Yp = np.zeros(n+1)
Y = np.zeros(n+1)
Y[0] = y0
Yp[0] = yp0
for i in range(n):
Y[i+1] = Y[i] + h*Yp[i]
@Dabsunter
Dabsunter / recherche.c
Created September 25, 2020 15:29
Work until test-6
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
const int MAX_WORD_LENGHT = 255;
int main(void)
{
int n;
scanf("%d\n", &n);
@Dabsunter
Dabsunter / pretty_pdf_name.py
Created May 29, 2020 16:21
Rename every PDFs in the relative `rename` directory according to their metadatas
import os
from pdfminer.pdfparser import PDFParser
from pdfminer.pdfdocument import PDFDocument
print("Pretty PDF name")
for subdir, dirs, files in os.walk("rename"):
print("Dans", subdir)
for oldname in files:
oldpath = subdir + os.sep + oldname
@Dabsunter
Dabsunter / lotr_mono_str_translator.py
Last active April 3, 2020 11:06
Un petit utilitaire pour assister dans la traduction des fichiers .str des jeux Battle for the Earth (1/2/rotwk)
# -*- coding: utf-8 -*-
"""
Created on Fri Apr 3 12:47:04 2020
@author: davni
"""
from googletrans import Translator
import re
import numpy as np
import math
import random as rng
import matplotlib.pyplot as plt
# np.array sans tous les np.array
def mat(*coord):
try:
iter(coord[0])
return np.array([mat(*c) for c in coord])
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 31 15:22:51 2019
@author: David N.
"""
import random as rng
import numpy as np
import time

Keybase proof

I hereby claim:

  • I am Dabsunter on github.
  • I am dabsunter (https://keybase.io/dabsunter) on keybase.
  • I have a public key whose fingerprint is 8F49 ED52 A329 5276 FAA3 EDC4 8F46 46D1 AA55 3135

To claim this, I am signing this object:

[GF2-inlined]: http://latex.codecogs.com/svg.latex?%5Cinline%20%5Ctextrm%7BGF%7D%282%29
[GF2p15-inlined]: http://latex.codecogs.com/svg.latex?%5Cinline%20%5Ctextrm%7BGF%7D%282%5E%7B15%7D%29
[GF2p15p17-inlined]: http://latex.codecogs.com/svg.latex?%5Cinline%20%5Ctextrm%7BGF%7D%28%282%5E%7B15%7D%29%5E%7B17%7D%29
[A-inlined]: http://latex.codecogs.com/svg.latex?%5Cinline%20A
[B-inlined]: http://latex.codecogs.com/svg.latex?%5Cinline%20B
[D-inlined]: http://latex.codecogs.com/svg.latex?%5Cinline%20D
[G-inlined]: http://latex.codecogs.com/svg.latex?%5Cinline%20G
[M-inlined]: http://latex.codecogs.com/svg.latex?%5Cinline%20M
[P-inlined]: http://latex.codecogs.com/svg.latex?%5Cinline%20P
[h-inlined]: http://latex.codecogs.com/svg.latex?%5Cinline%20h