by shigemk2

当面は技術的なことしか書かない

memo use package

The use-package macro allows you to isolate package configuration in your .emacs file in a way that is both performance-oriented and, well, tidy. I created it because I have over 80 packages that I use in Emacs, and things were getting difficult to manage. Yet with this utility my total load time is around 2 seconds, with no loss of functionality!

init.elを読みやすくするマクロ集合体だけど、あとでつかう

設定がなんのことか分からず困惑した

google spreadsheet api

google spreadsheet api

なのだけど、updateは既にセルにデータが入っていたら何もしない挙動になっている

https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/append

https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/clear

https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updatesheetpropertiesrequest

Python flatten

>>> import operator
>>> l = [[1,2,3],[4,5,6], [7], [8,9]]
>>> reduce(operator.concat, l)
[1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> l
[[1, 2, 3], [4, 5, 6], [7], [8, 9]]
>>> reduce(operator.add, l)
[1, 2, 3, 4, 5, 6, 7, 8, 9]
>>> reduce(lambda x, y: x+y, l)
[1, 2, 3, 4, 5, 6, 7, 8, 9]

解法としてはこうなるんだろうけど、なんでflattenされるのか謎

10.3. operator — 関数形式の標準演算子 — Python 3.6.5 ドキュメント

d.hatena.ne.jp

stackoverflow.com

markdown正則行列と逆行列latex

正則行列と逆行列


A = \left(
  \begin{array}{ccc}
    1 & 1 \\
    0 & 2
  \end{array}
  \right)
B = \left(
  \begin{array}{ccc}
    1 & 0 \\
    0 & 1/2
  \end{array}
  \right)
<div style="padding-left: 2em">
[tex:
A = \left(
  \begin{array}{ccc}
    1 & 1 \\
    0 & 2
  \end{array}
  \right)
B = \left(
  \begin{array}{ccc}
    1 & 0 \\
    0 & 1/2
  \end{array}
  \right)
]
</div>

特に意味のないelisp

(defun insert-hatena-latex-markdown ()
  (interactive)
  (insert "<div style=\"padding-left: 2em\">") (newline)
  (insert "[tex:") (newline)
  (insert "]") (newline)
  (insert "</div>") (newline)
  )

https://ja.wikipedia.org/wiki/%E6%AD%A3%E5%89%87%E8%A1%8C%E5%88%97

awscli 1.15.67

  • api-change iot Update iot command to latest version
  • api-change directconnect Update directconnect command to latest version
  • api-change cloudhsmv2 Update cloudhsmv2 command to latest version
  • api-change glacier Update glacier command to latest version
  • api-change sagemaker Update sagemaker command to latest version
  • api-change glue Update glue command to latest version
  • api-change mq Update mq command to latest version