pandazx's blog

データ分析など雑多な技術ブログ

python

気になるPython Library 2019.10.19

sotabench Easily evaluate machine learning models on public benchmarks. https://github.com/paperswithcode/sotabench-eval

気になるPython Library 2019.10.12

imagededup Finding duplicate images made easy! 類似画像判定 https://github.com/idealo/imagededup

気になるPython Library 2019.9.20

DeepPrivacy A Generative Adversarial Network for Face Anonymization https://github.com/hukkelas/DeepPrivacy 顔検出して、その顔を匿名化。ただし、元画像のデータ分布は維持する。匿名化した画像を見ると匿名化というより、表情を変えた画像を生成し…

気になるPythonライブラリ 2019.9.6

faceswapFaceSwap is a tool that utilizes deep learning to recognize and swap faces in pictures and videos. https://github.com/deepfakes/faceswap nlpNatural Language Processing Best Practices & Examples. https://github.com/microsoft/nlp Buf…

気になるPythonライブラリ 2019.9.1

HungaBunga Brute-Force all sklearn models with all parameters using .fit .predict! https://github.com/ypeleg/HungaBunga Causal ML Uplift modeling and causal inference with machine learning algorithms. https://github.com/uber/causalml Grove…

気になるPythonライブラリ 2019.6.2

videoflowPython framework that facilitates the quick development of complex video analysis applications and other series-processing based applications in a multiprocessing environment GitHub - videoflow/videoflow: Python framework that fac…

気になるPythonライブラリ 2019.5.17

Python weeklyからの抜粋 Interesting Projects, Tools and Libraries openpilotopenpilot is an open source driving agent. Currently, it performs the functions of Adaptive Cruise Control (ACC) and Lane Keeping Assist System (LKAS) for selected …

データ可視化のアニメーション

データ可視化でグラフをアニメーション表示する方法はRではgganimateがある。 Rで解析:ggplot2のプロットを簡単アニメーション「gganimate」パッケージ 以下の動画にリッチなアニメーション例がある。 The Grammar of Animation - YouTube 上記よりもリッチ…

python2で実行スクリプト名の判定

以下のようにしておけば、sample.py が他のスクリプトから呼ばれた時に main()を実行することを避けられる。 # sample.py import sys def calc(val): x = val + 1 def main(): calc(1) if sys.argsv[0] == __file__: main() これにより、前に作ったスクリプ…

AWS SDKサンプルプログラム(Python2)

Get S3 bucket list # coding:utf-8 from boto3.session import Session import os session = Session( aws_access_key_id = os.environ['access_key'], aws_secret_access_key = os.environ['secret_access_key'], region_name = 'ap-northeast-1', ) s3 = …

psycopg2.OperationalError: asynchronous connection attempt underway

pythonで並列処理 - pandazx's blog というブログを以前、書いたが、 並列処理の中でPostgreSQLにSELECTを投げる処理をした時に以下のエラーが発生した。 psycopg2.OperationalError: asynchronous connection attempt underway このエラーは並列処理前にDB…

pythonで並列処理

python2.7で実装した際のメモ。 実装イメージ csvファイルの行ごとに重たい処理をするので、行ごとに並列処理したい 行の先頭列にはIDがあり、IDをキーに並列処理の結果を受け取って、出力したい csv上、IDには重複があるが、同一IDは2回処理したくない 各プ…

ImportError: No module named cv2

前提 OS: Amazon Linux(CentOSみたいなもの) AMI: Amazon Linux AMI with NVIDIA GRID GPU Driver on AWS Marketplace python 2.7 PFN発のディープラーニングフレームワークchainerで画像分類をするよ(chainerでニューラルネット1) - 人工言語処理入門 この…

pillowインストールでエラー

前提 OS: Amazon Linux(CentOSみたいなもの) AMI: Amazon Linux AMI with NVIDIA GRID GPU Driver on AWS Marketplace Amazon Linux で、pip install pillowしたらエラー発生 ValueError: jpeg is required unless explicitly disabled using --disable-jpeg…