This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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") |
This file has been truncated, but you can view the full file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a | |
à | |
abaissa | |
abaissable | |
abaissables | |
abaissai | |
abaissaient | |
abaissais | |
abaissait | |
abaissâmes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 <[email protected]> | |
# | |
# 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 |
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 2 columns, instead of 4 in line 8.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DE-EN vocabulary database compiled by dict.cc | |
# Date and time 2019-08-28 21:44 | |
# License THIS WORK IS PROTECTED BY INTERNATIONAL COPYRIGHT LAWS! | |
# License Private use is allowed as long as the data, or parts of it, are not published or given away. | |
# License By using this file, you agree to be bound to the Terms of Use published at the following URL: | |
# License https://www.dict.cc/translation_file_request.php | |
# Contains data from http://dict.tu-chemnitz.de/ with friendly permission by Frank Richter, TU Chemnitz | |
# Brought to you by Paul Hemetsberger and the users of https://www.dict.cc/, 2002 - 2019 | |
α-Keratin {n} α-keratin noun [biochem.] |
We can't make this file beautiful and searchable because it's too large.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DE-FR vocabulary database compiled by dict.cc | |
# Date and time 2019-08-28 21:50 | |
# License THIS WORK IS PROTECTED BY INTERNATIONAL COPYRIGHT LAWS! | |
# License Private use is allowed as long as the data, or parts of it, are not published or given away. | |
# License By using this file, you agree to be bound to the Terms of Use published at the following URL: | |
# License https://www.dict.cc/translation_file_request.php | |
# Brought to you by Paul Hemetsberger and the users of https://www.dict.cc/, 2002 - 2019 | |
(absolutes) Minimum {n} [zum Leben, Rente, Lohn] portion {f} congrue [rente, salaire] noun | |
(akute) Leberbeschwerden {f} crise {f} de foie noun [med.] |
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 2 columns, instead of 4 in line 7.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# BG-EN vocabulary database compiled by dict.cc | |
# Date and time 2019-08-28 22:04 | |
# License THIS WORK IS PROTECTED BY INTERNATIONAL COPYRIGHT LAWS! | |
# License Private use is allowed as long as the data, or parts of it, are not published or given away. | |
# License By using this file, you agree to be bound to the Terms of Use published at the following URL: | |
# License https://www.dict.cc/translation_file_request.php | |
# Brought to you by Paul Hemetsberger and the users of https://www.dict.cc/, 2002 - 2019 | |
(а/пък) и (and) then conj | |
(главен) готвач {м} chef noun [gastr.] [jobs] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
import re | |
_match_hex8 = re.compile( | |
r"^#(?P<r>[0-9a-f]{2})(?P<g>[0-9a-f]{2})(?P<b>[0-9a-f]{2})(?P<a>[0-9a-f]{2})?$", flags=re.I | |
).match | |
def parse_hex8(text, scale=255): | |
mo = _match_hex8(text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ast | |
import os | |
from typing import Set | |
STD_LIB = { | |
# fmt :off | |
'__future__', '__main__', '_abc', '_ast', '_asyncio', '_bisect', '_blake2', '_bootlocale', '_bz2', '_codecs', | |
'_codecs_cn', '_codecs_hk', '_codecs_iso2022', '_codecs_jp', '_codecs_kr', '_codecs_tw', '_collections', | |
'_collections_abc', '_compat_pickle', '_compression', '_contextvars', '_crypt', '_csv', '_ctypes', | |
'_ctypes_test', '_curses', '_curses_panel', '_datetime', '_dbm', '_decimal', '_dummy_thread', '_elementtree', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from enum import Enum | |
from pydantic import Field | |
from antarest.study.business.utils import FormFieldsBaseModel | |
class SizeEnum(str, Enum): | |
SMALL = "Small" | |
MEDIUM = "Medium" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Any, Dict, Optional, Tuple, Type | |
import pydantic.main | |
class AllOptionalMetaclass(pydantic.main.ModelMetaclass): | |
""" | |
Metaclass that makes all fields of a Pydantic model optional. | |
This metaclass modifies the class's annotations to make all fields |
OlderNewer