Pythonでrequetsでダイジェスト認証でgetしたいだけだったのに

Python + requests でベーシック認証はググれば日本語でよい紹介がたくさんあるのですが、ダイジェスト認証は、結局公式サイトにたどり着いて、最初から公式サイト見ろよオレ。

Authentication — Requests 2.26.0 documentation

import requests
from requests.auth import HTTPDigestAuth
r = requests.get('http://どこか/', auth=HTTPDigestAuth('user', 'pass'))
r.status_code

悲報:Macの蔵書管理アプリ『Delicious Library 3』がバージョン3.7で日本のAmazon未対応に

自分の蔵書管理は『Delicious Library 3』を使っていたのですが、

Delicious Library 3

Delicious Library 3

  • Delicious Monster Software, LLC
  • Reference
  • $38.99

v3.7でこのような残念なことに...。

Separately, Amazon Japan has decided to terminate their partner agreement with us, so we can no longer load item information from that store. We will continue to try to work with Amazon Japan to restore service. 引用https://itunes.apple.com/us/app/delicious-library-3/id635124250

いつか日本Amazonの扱いが復活するとよいのですが。

ごく簡単なTensorFlowのインストール (MacとAnacondaで)

GPU使わないのがインストールは楽。 Anacondaをインストールしとく。

Python3.5の環境を作る。TensorFlowはPython3.5をサポートなので。

conda create -n tensorflow python=3.5 anaconda

TensorFlowをインストール(使うwhlはそのとき最新のを確認してね)。

pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.2.1-py3-none-any.whl

あらもうできちゃった。

import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))

Ruby2.4.1でIt seems your ruby installation is missing psych (for YAML output).

gemでoutdatedしたら、あれれ。

~$ gem outdated
/usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/yaml.rb:5:in `<top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
/usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/usr/local/lib/ruby/gems/2.4.0/gems/psych-2.2.4/lib/psych.bundle, 9): Library not loaded: /usr/local/opt/ruby/lib/libruby.2.4.0.dylib (LoadError)
  Referenced from: /usr/local/lib/ruby/gems/2.4.0/gems/psych-2.2.4/lib/psych.bundle
  Reason: image not found - /usr/local/lib/ruby/gems/2.4.0/gems/psych-2.2.4/lib/psych.bundle
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/lib/ruby/gems/2.4.0/gems/psych-2.2.4/lib/psych.rb:8:in `<top (required)>'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/yaml.rb:6:in `<top (required)>'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems.rb:700:in `load_yaml'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/config_file.rb:340:in `load_file'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/config_file.rb:202:in `initialize'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/gem_runner.rb:75:in `new'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/gem_runner.rb:75:in `do_configuration'
    from /usr/local/Cellar/ruby/2.4.1_1/lib/ruby/2.4.0/rubygems/gem_runner.rb:40:in `run'
    from /usr/local/opt/ruby/bin/gem:21:in `<main>'

ググってみたら、

Upgrading to Ruby 2.4.1_1 breaks gem command. · Issue #11636 · Homebrew/homebrew-core · GitHub

brew reinstall -s libyaml
brew reinstall -s ruby

でも解消せず。さらに

rm -rf /usr/local/lib/ruby/gems/2.4.0/gems/psych-2.2.4
rm -rf /usr/local/lib/ruby/gems/2.4.0/extensions/x86_64-darwin-16/2.4.0/psych-2.2.4

これで gem outdated出来た。とりあえずめでたし。

"C++/WinRT" Windows開発に、また新たな1ページが

喜ぶべきなのだろうか、いや、喜ばしいと思いたい。 Windows開発に、また新たな1ページが。

C++ - C++/WinRT の紹介

マイクロソフトがいざなう、僕たちの旅は、幸せに向かっているはずだ。きっと。

あの頃は(WinRTでなく)Metroだった...(遠い目)
Froms WPF Silverlight そして Metro - osamuk's blog

macos Sierraと、Homebrew 1.0.0リリースでリポジトリは/usr/local/Homebrewに

Homebrewのリポジトリが/usr/local/Homebrewになったようです。 とりあえずbrew updateでよさそう。

http://community.brew.sh/t/how-to-migrate-existing-brews-from-usr-local-to-new-usr-local-homebrew/27community.brew.sh

こちらも参考にさせていただきました。 blog.ymyzk.com