はしくれエンジニアもどきのメモ

情報系技術・哲学・デザインなどの勉強メモ・備忘録です。

schema.orgのCreativeWorkメモ

schema.orgのCreativeWorkメモ

schema.orgのCreativeWorkのメモ.

続きを読む

構造化データschema.orgとThingタイプ

構造化データschema.orgとThingタイプ

構造化データschema.orgについてのメモ. 特に,schema.orgのThingタイプについてのメモ.

続きを読む

Law of total Expectations(全期待値則)メモ

Law of total Expectations(全期待値則)メモ

確率に出てくるtotal Expectations則(日本語だと全期待値則?)のメモ. 次のように期待値(expected) operatorが2つ出てくる.

\begin{eqnarray} E[X] = E[E[X|Y]] = \sum_{y}{ E[X|Y=y]P(Y=y) } \end{eqnarray}

Law of total expectation - Wikipedia

  • Law of total Expectations(全期待値則)メモ
    • 確率変数が離散の場合の証明
    • 利用例
    • 参考リンク

続きを読む

自然数nが√n以下のすべての素数で割り切れなければ,nは素数であることの証明

自然数nが√n以下のすべての素数で割り切れなければ,nは素数であることの証明

自然数$n$が$\sqrt{n}$以下のすべての整数で割り切れなければ,$n$は素数であることの証明メモ.

  • 自然数nが√n以下のすべての素数で割り切れなければ,nは素数であることの証明
    • 対偶
    • 直観的な理解
    • 証明
    • 参考リンク

続きを読む

Jupyter Notebook の `Cannot configure while the Jupyter notebook server is running` エラー対策

Jupyter Notebook の Cannot configure while the Jupyter notebook server is running エラー対策

Jupyter Notebook で Cannot configure while the Jupyter notebook server is running エラーが出たときの対処メモ. 今のところ,一時的な対策しかない?

github.com

  • Jupyter Notebook の Cannot configure while the Jupyter notebook server is running エラー対策
    • 症状
      • 自環境での発生確認
    • 原因
    • 対策
      • --skip-running-checkフラグがない場合
        • 対策
    • 参考リンク
    • 関連リンク

続きを読む

はてなブログのmarkdown記法での記事テンプレートを考える

はてなブログmarkdown記法での記事テンプレートを考える

はてなブログmarkdown記法での記事テンプレートを考えてみたのでメモ.

続きを読む

はてなブログAPIで全記事の一括編集

はてなブログAPIで全記事の一括編集

はてなブログAPを使って,全記事の一括編集をしてみたのでメモ. すべての公開記事に対して,以下3つの処理を行う.

パース・加工処理は,BeautifulSoup4を使う.

  • はてなブログAPIで全記事の一括編集
    • 環境
    • 記事のバックアップ
    • 全記事のentry idの取得
    • はてなAPIによるentry idから記事の編集
    • 全記事に対しての処理
    • 参考リンク
    • 関連リンク

環境

  • Windows10
    • python 3.5.4
      • requests (2.18.4)
      • beautifulsoup4 (4.6.0)
続きを読む

はてなブログAPIで記事の取得と編集

はてなブログAPIで記事の取得と編集

はてなブログAPIはてなブログAtomPub)を使って,記事(1つ)の取得と編集のメモ.

前回の続きです.

cartman0.hatenablog.com

今回も,PythonでrequestsモジュールとBeautifulSoup4を使う.

ドキュメントはここです.はてなブログAtomPub - Hatena Developer Center

  • はてなブログAPIで記事の取得と編集
    • 環境
    • はてなブログAtomPub APIがサポートしているメンバURIの操作
    • メンバURI
    • メンバURIで記事の取得
      • リクエス
      • requestsモジュールでResponse確認
      • 記事のコンテンツ(content要素)の取得
    • メンバURIで記事の編集
      • リクエス
      • requestモジュールでのデータ指定
      • requestsモジュールでResponseを確認
    • 参考リンク
    • 関連リンク

環境

  • Windows10
    • python 3.5.4
      • requests (2.18.4)
      • beautifulsoup4 (4.6.0)

続きを読む

はてなブログAPIで記事一覧を取得

はてなブログAPIで記事一覧を取得

はてなブログAPIはてなブログAtomPub)で記事一覧取得のメモ. 「サービス文書URIを使って, コレクション操作の一覧の取得」と 「コレクションURIを使って,ブログエントリ一覧を取得」のメモ.

今回は,PythonでrequestsモジュールとBeautifulSoup4を使う.

ドキュメントはここです.はてなブログAtomPub - Hatena Developer Center

  • はてなブログAPIで記事一覧を取得
    • 環境
    • Atom Publishing Protocol とは
    • はてなAtomPubAPIの認証
    • URIの表記
    • サービス文書URIを使って, コレクション操作の一覧の取得
      • リクエス
      • requestsモジュールを利用したBasic認証
      • requestsモジュールでResponse確認
      • サービス文書URIのレスポンスから,コレクションURIを取得する
    • コレクションURIを使って,ブログエントリ一覧を取得
      • リクエス
      • 記事一覧の取得
      • 全記事のentry IDを取得
    • 参考リンク

環境

  • Windows10
    • python 3.5.4
      • requests (2.18.4)
      • beautifulsoup4 (4.6.0)

続きを読む

Slack RSS integrations のfetching(polling)の仕様 (About specifications of fetching(polling) in Slack RSS integrations)

Slack RSS integrations のfetching(polling)の仕様 (About specifications of fetching(polling) in Slack RSS integrations)

2017年9月時点の情報です.

SlackのRSS integrationsに登録していたフィードがうまく動作しなかったとき, RSS integrationsのfetch(poll)のタイミングなどの仕様をサポートに聞いてみたのでメモ.

Slack RSS Integration

  • Slack RSS integrations のfetching(polling)の仕様 (About specifications of fetching(polling) in Slack RSS integrations)
    • RSSフィードのitem保存件数
    • 更新間隔 (update interval)
      • <ttl>要素を見ているか
    • どのように新しいitemを更新(pick up) しているか
    • 参考リンク

続きを読む