- 飲食は可能です
- キレイに使ってください
- 食べこぼしの多そうなものは、なるべく避けてくれると嬉しいです
- 電源はあります
- 足りない場合は譲り合って使ってください
- 私物のタップを使ってくれると助かります
This file contains 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
""" | |
日本語の「ら抜き言葉」を検知します。語は(可能動詞とした)終止形で指定してください(例:見れる)。 | |
実装については以下のURLを参照してください。 | |
https://blog.shodo.ink/entry/2021/09/05/013031 | |
形態素解析の辞書によっては、ら抜き言葉を1語として認識することがあるため必要となります。 | |
例:UniDic、SudachiDict、IPADic(見れる・来れるのみ) | |
こちらのコードはMIT Licenseとして公開します。 | |
Copyright (c) 2021 ZenProducts Inc. |
This file contains 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 random | |
data = [ | |
"分け目ぴっしー", | |
"背筋ぴーん", | |
"ワイシャツパリ", | |
"ネクタイギュッ", | |
"ネクタイピンパチ", | |
"背広ファッ", |
This file contains 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 re | |
import time | |
from pathlib import Path | |
from urllib.request import urlretrieve | |
from PIL import Image | |
ROOT_DIR = Path("path/to/repo") | |
PATH_GLOB = "**/*.md" |
This file contains 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
<template> | |
<quill-editor :content="value" | |
@change="onChange" | |
ref="myQuillEditor" | |
:options="editorOption" | |
@blur="onEditorBlur($event)" | |
@focus="onEditorFocus($event)" | |
@ready="onEditorReady($event)"> | |
</quill-editor> | |
</template> |
This file contains 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
function makeModel (fields) { | |
return class BaseModel { | |
constructor(options) { | |
options = options || {} | |
var v; | |
for (var [key, value] of Object.entries(fields)) { | |
if (options.hasOwnProperty(key)) { | |
v = options[key] | |
} else { |
This file contains 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 dataclasses import dataclass, field as dc_field | |
# Library | |
def field(default, verbose_name="", help_text=""): | |
return dc_field( | |
default=default, | |
metadata={ |
This file contains 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
> class F { | |
... constructor (a) { | |
..... if (a > 0) { | |
....... this.child = new F(a-1) | |
....... } | |
..... } | |
... } | |
undefined | |
> new F(3) | |
F { child: F { child: F { child: F {} } } } |
This file contains 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
""" Detect changes of Django Models. | |
""" | |
class ChangeDetector: | |
def __init__(self, *args, **kwargs): | |
super().__init__(*args, **kwargs) | |
self._dirty_fields = {f: False for f in self._get_field_names()} | |
self._inited = True |
This file contains 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
// This way didn't work. | |
// Cause this custom.js or nbextensions files will be loaded after initializing JupyterNotebookApp. | |
// It means this code won't affect to it's initializing Ajax requests. | |
// Sending token on each XHRs too. | |
// Because Safari won't handle Cookie and localStorage | |
// on iframes. | |
// Jupyter Client expects it's cookie, so it will be forbidden | |
// Instead, sending "token" by manually on each XHRs. |
NewerOlder