技術と本について書くブログ

技術と本について書くblog。技術メモなど雑記を書いているblog。

2019-01-27から1日間の記事一覧

venvを使ってPythonの環境構築を簡単にする

venvとは virtualenvはPython 3.3から使えるPythonの仮想環境のこと 以下のコマンドで仮想環境を作成 $ python3 -m venv hoge アクティベート $ source bin/activate 出るときは $ deactivate これで実行されます。 必要なパッケージをインストール $ pip in…

Pythonでcurlを行うかそれと同等の処理をrequestsを使って行う

curlコマンドの実行方法 import os.path p = "curl 'https://www.cotogoto.ai/webapi/noby.json' ..." req = os.system(p) print(req) requestsを使う場合 以下のサイトで簡単に生成できます。便利! https://curl.trillworks.com/

curlコマンドをRubyで叩きたい時の便利サイト!

以下のサイトでcurlコマンドを書くとrubyに変換してくれる!めちゃくちゃ便利! https://jhawthorn.github.io/curl-to-ruby/

Rubyのダブルクォーテーション”とシングルクォーテーション'の違い

シングルクォーテーションは文字列のみで展開はされない text1 = "a" text2 = "文字列#{text1}" print(text2) 出力結果 文字列a text1 = 'a' text2 = '文字列#{text1}' print(text2) 出力結果 文字列{text1} rubocopなどでとりあえず""を使っていると怒られる

ESLintのエラーまとめ

Expected indentation of 2 spaces but found 4 Visual Studio CodeならShift+Option+fで整形(space数は下のバーから変更) ✘ 18 problems (15 errors, 3 warnings) Expected method shorthand functionを書いてはいけない before mounted: function() { af…

app store connect apiでUSERを削除する

iOS

App Store Connect APIでユーザーの参照 GET https://api.appstoreconnect.apple.com/v1/users https://developer.apple.com/documentation/appstoreconnectapi/list_users クエリパラメーターと叩き方例 一覧を取る(一度に取れるのは50まで) 最初にトークン…