- Webアプリの実装では「ある特定の権限や区分でのみ取得できるリソース」という概念がほぼ確実に存在する
- 例: 会社Aは会社Bの情報を閲覧できない
- 例: 情報Aについて、一般ユーザーは閲覧できず、管理者ユーザーは閲覧できる
- これらの情報の取得処理は、事故ったときのリスクが大きいわりに、実装レベルでは実装者やレビューなどの人力に頼りがち
- 誰でも簡単に理解できる安全な設計/仕組みが実現できると楽
- Django + Django Ninja がおすすめ
- 公式:
- FastAPI
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
define :one do | |
8.times do | |
play (scale :e3, :harmonic_minor).tick, release: 0.1 | |
sleep 0.125 | |
end | |
8.times do | |
play (scale :d4, :harmonic_minor).tick, release: 0.1 | |
sleep 0.125 | |
end | |
8.times do |
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
d = { | |
"success": True, | |
"calendars": [ | |
{ | |
"id": 123, | |
"year": 2014, | |
"months": [ | |
{ | |
"id": 50, | |
"monthnumber": 1, |
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
""" | |
- https://speakerdeck.com/anatoo/phpdexue-buvmxing-zheng-gui-biao-xian-enzinfalseshi-zu-mi | |
- http://blog.asial.co.jp/1221 | |
""" | |
import copy | |
class RegexVMThread(object): | |
def __init__(self): | |
self.string_pointer = 0 |
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
# -*- coding: utf-8 -*- | |
def parse_input_string(strs): | |
import shlex | |
parsed = shlex.split(cmd) | |
print(parsed) | |
return parsed | |
cmd = 'hoge | moge 1 | insert_delimiter ! | whitespace' | |
parsed = parse_input_string(cmd) |
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
--- | |
- hosts: 127.0.0.1 | |
connection: local | |
user: (user) | |
vars: | |
tmpdir: "/Users/(user)/tmpfile/python" | |
name: "Python" | |
version: "3.4.0" | |
tasks: | |
- name: "make dir" |
NewerOlder