Skip to content

Instantly share code, notes, and snippets.

View laurent-laporte-pro's full-sized avatar

Laurent LAPORTE laurent-laporte-pro

View GitHub Profile
@laurent-laporte-pro
laurent-laporte-pro / leo_access.py
Created August 28, 2019 20:13
Query the dictionary http://dict.leo.org/ from within Python.
#!/usr/bin/env python
# -*- coding: latin-1 -*-
#
# Query the dictionary http://dict.leo.org/ from within Python.
# This is based on an equivalent script for German/English by:
#
# Copyright (C) 2015 Ian Denhardt <ian@zenhack.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@laurent-laporte-pro
laurent-laporte-pro / liste.de.mots.francais.frgut.txt
Created August 28, 2019 20:11
Liste de plus de 300 000 mots français avec formes fléchies
This file has been truncated, but you can view the full file.
a
à
abaissa
abaissable
abaissables
abaissai
abaissaient
abaissais
abaissait
abaissâmes
@laurent-laporte-pro
laurent-laporte-pro / log_format.py
Created December 10, 2018 10:59
Python logger format compatible with PyCharm Ideolog plugin (IntelliJ Platform)
# coding: utf-8
import logging
#: Log format which gives you the date/time and the PID of the running process.
#: The level name is DEBUG, INFO, WARNING, ERROR or CRITICAL
#: This logger format is compatible with PyCharm Ideolog plugin (IntelliJ Platform).
LOG_FORMAT = "%(asctime)s [%(process)7d] %(levelname)8s - %(name)-30s - %(message)s"
logging.basicConfig(level=logging.DEBUG, format=LOG_FORMAT, filename="sample.log")