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
__pycache__ |
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 -*- | |
from datetime import datetime | |
import contextlib | |
import unittest | |
@contextlib.contextmanager | |
def mock_datetime_now(module_path, return_value): | |
""" | |
適当なモジュールの datetime.now() を mock し、適当な日付を返すようにする。 |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>スカンディナヴィア半島</title> | |
<link rel="stylesheet" href="./layout.css" type="text/css"></style> | |
</head> | |
<body> | |
<div id="header"> | |
<!-- |
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
class Array | |
def car | |
first | |
end | |
def cdr | |
clone.tap { |r| r.delete_at 0 } | |
end | |
def method_missing(name, *args) |
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
(defun _zizo (begin end format) | |
(let ((str (buffer-substring-no-properties begin end)) | |
(rules '((" " "+") ("|" "%7C") ("\n" "|") ("?" "%3F") ("&" "%26")))) | |
(loop for (pat rep) in rules | |
do (setq str (replace-regexp-in-string pat rep str))) | |
(browse-url (concat format str)))) | |
(defun zizo (begin end &optional arg) | |
(interactive "r\nP") | |
(_zizo begin end "http://chart.apis.google.com/chart?chst=d_text_outline&chld=000000|12|l|_|_|")) |