Skip to content

Instantly share code, notes, and snippets.

View rene-d's full-sized avatar
🤘
Let There Be Rock

rene-d rene-d

🤘
Let There Be Rock
  • Thales
  • France
View GitHub Profile
@rene-d
rene-d / md2html.js
Created June 26, 2018 10:58
Convert Markdown to HTML
// rené 06/2018
// Showdown: https://github.com/showdownjs/showdown
// Bootstrap: https://getbootstrap.com/
'use strict';
let fs = require('fs');
let showdown = require('showdown');
let conv = new showdown.Converter();
@rene-d
rene-d / MColinWhite.bas
Last active June 26, 2018 20:13
Test non paramétrique de Colin-White (VBA)
'
' TEST DE COLIN WHITE
'
' Test non paramétrique de deux échantillons de populations quelconques
'
' référence: NF X 06-065
'
' René DEVICHI 1998
'
Option Explicit
@rene-d
rene-d / NBLETTR.bas
Created June 26, 2018 20:12
Nombre en lettres (VBA)
'
' Conversion des nombres en lettres
'
' Copyright (c) 1999 René & Guy DEVICHI
'
Option Explicit
Dim dizaines(9) As String
Dim unités(19) As String
@rene-d
rene-d / colors.py
Last active May 1, 2024 17:50
ANSI color codes in Python
# SGR color constants
# rene-d 2018
class Colors:
""" ANSI color codes """
BLACK = "\033[0;30m"
RED = "\033[0;31m"
GREEN = "\033[0;32m"
BROWN = "\033[0;33m"
BLUE = "\033[0;34m"
@rene-d
rene-d / md2html.js
Created July 16, 2018 05:37
Markdown to HTML converter with markdown-it and highlight.js
#! /usr/bin/env node
// rené 07/2018
// markdown-it: https://markdown-it.github.io
// highlight.js: https://highlightjs.org/
// Bootstrap: https://getbootstrap.com/
'use strict';
// hack to require() modules in current directory
@rene-d
rene-d / get_gists.py
Last active October 29, 2023 15:10 — forked from leoloobeek/get_gists.py
Download all gists for a specific user
#! /usr/bin/env python3
import requests
import sys
from subprocess import call
import yaml
import os
import json
import argparse
@rene-d
rene-d / lastused.py
Created July 18, 2018 15:54
Sort subdirectories of a directory by the most recent file dates with them
#! /usr/bin/env python3
import os
import pathlib
import argparse
import datetime
from collections import defaultdict
parser = argparse.ArgumentParser(description='Sort subdirectories by most recent files within them')
parser.add_argument('-v', '--verbose', help="be verbose", action='store_true')
@rene-d
rene-d / cache-expl.py
Last active December 2, 2018 20:24
requests_cache explorer
#! /usr/bin/env python3
import sys
import requests_cache
import logging
import argparse
import os
from urllib.parse import urlparse
import datetime
import email.utils
@rene-d
rene-d / fantoir.py
Last active April 15, 2021 13:30
Créer une base SQLite3 à partir du fichier FANTOIR de data.gouv.fr
#! /usr/bin/env python3
# rene-d 2018
# Unlicense: http://unlicense.org
"""
Fichier FANTOIR (Fichier ANnuaire TOpographique Initialisé Réduit)
https://www.data.gouv.fr/fr/datasets/fichier-fantoir-des-voies-et-lieux-dits/
crée une base SQLite3 à partir du fichier texte
@rene-d
rene-d / parcelles.py
Last active September 29, 2021 20:24
Créer des fichiers .kml à partir des données GeoJSON du Plan Cadastral Informatisé https://www.data.gouv.fr/fr/datasets/plan-cadastral-informatise/
#! /usr/bin/env python3
# rene-d 2018
# Unlicense: http://unlicense.org
# données GeoJSON: https://cadastre.data.gouv.fr/data/etalab-cadastre/latest/geojson/
# exemple:
# ./parcelles.py -o elysee -p 75108BO25 -c 75108
# requirements: