Copyright: @tk0miya License: BSDL
#pyconjp2020
See https://docs.google.com/presentation/d/1GzGae1_uB05-8tJZChOJdTuuP4XFJWuak7etHKEvJqQ/edit?usp=sharing
# frozen_string_literal: true | |
# ActiveYaml の association を Ransack で検索可能にする | |
module ActiveHash | |
module Ransackable | |
def ransackable_attributes(_auth_object = nil) | |
data.first.keys | |
end | |
def ransortable_attributes(auth_object = nil) |
on: | |
push: | |
branches: [main] | |
paths: | |
- db/schema.rb | |
- .tbls.yml | |
permissions: | |
contents: write |
Copyright: @tk0miya License: BSDL
#pyconjp2020
See https://docs.google.com/presentation/d/1GzGae1_uB05-8tJZChOJdTuuP4XFJWuak7etHKEvJqQ/edit?usp=sharing
$ python | |
Python 3.8.2 (default, Mar 2 2020, 00:44:41) | |
[Clang 11.0.0 (clang-1100.0.33.17)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> foo = lambda x = 1: 1 | |
>>> help(foo) | |
Help on function <lambda> in module __main__: | |
<lambda> lambda x=1 | |
>>> import inspect |
{% extends "!layout.html" %} | |
{% block content %} | |
<div class="notice" style="width: 100%; height: 24px; background-color: #ffe761; padding: 8px 20px 8px 20px;"> | |
このページは新しめのやつなので気をつけておくれやす。 っ[ぶぶづけ] | |
</div> | |
{{ super() }} | |
{% endblock %} |
From 551ad9efa5cc60a50e6f280e9aecdd12220693f1 Mon Sep 17 00:00:00 2001 | |
From: Takeshi KOMIYA <i.tkomiya@gmail.com> | |
Date: Mon, 16 Mar 2020 00:38:21 +0900 | |
Subject: [PATCH] doc: Fix messages in extensions are not translated | |
So far, custom extensions for python-doc have accessed internal data | |
structure of sphinx.locale module directly. But, it does not work at | |
present because the structure has changed since Sphinx-1.8 release. | |
This uses public translation APIs of Sphinx instead to get translated | |
messages. |
latex_elements = { | |
'extrapackages': r'\usepackage{titlesec}', | |
'preamble': '\n'.join([ | |
# 字下げ (なんでデフォルトで動かないんだろ?) | |
r'\setlength{\parindent}{1zw}', | |
# 段落調整、箇条書きの行間調整 | |
r'\setlength{\parskip}{0ex}', | |
# 見出しの装飾 | |
# ref: https://qiita.com/krtx/items/deeec0843caf37b66054 | |
r'\definecolor{teal}{RGB}{0,128,128}', |
preface and appendix for Sphinx |
""" | |
autodoc: show default value of arguments as is | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
:license: Same as Sphinx | |
""" | |
import ast | |
import inspect | |
from typing import Any, Dict |
````` | |
CommonMark では fenced code block の終了は、開始マーカーと同じかそれ以上の backtick を必要とします。 | |
``` | |
ですので、まだここはコードブロックの中です。 | |
`````````` | |
そして、ここはコードブロックの外です。 | |
また、fenced code block は backtick か tilde をマーカーに利用できると定義されているので | |
~~~ | |
ここはコードブロックですし |