Fx-Kirin

スポンサーリンク
Python

numpy の2つ行列で片方にあるものだけを抽出する。

numpy で2つの時間のインデックスをarrayデータとして持っていて、x にはない時間のインデックスがyにはあって、xにはないのでyから取り除きたいときにどうすればよいかすぐにはわからなかったため、備忘録を残しておきます。 In : ...
作業メモ

Synology DS216j の MySQL に外部からつなぐ

Synology DS216j をNAS(RAID1 12TB)として使っています。もっぱらデータ保存用です。他のパソコンをNAS用に購入してもいいなとは思っているのですが、ヘルス管理の定期処理などがとても手間な気がして、Synolog...
VMWare

VMWare Player をヘッドレスモードで使う。

If you want to run a headless VM under VMPlayer simply add the following to your vmware preferences file ($HOME/.vmware/...
Python

swig で foofunction is private と怒られた時。

/usr/include/c++/5/bits/ios_base.h:855:5: error: ‘std::ios_base::ios_base(const std::ios_base&)’ is private ios...
Python

DictCursor に AttrDict を指定する

import pymysql from dictmysql import DictMySQL from attrdict import AttrDict pymysql.cursors.DictCursor.dict_type = Att...
Python

Python requests に DefaultTimeout を設定する

Pythonコード import requests import pytest from requests.adapters import TimeoutSauce for default_timeout in : def __...
Python

Python Mock で オリジナルのインスタンメソッドのを呼びたい時

import os import requests from urllib3.poolmanager import PoolManager from requests.adapters import HTTPAdapter from ur...
Python

Python 2, Python 3 で string を bytes に変換する。

# Python 2 and 3: from builtins import bytes, chr data = 'mytext' data = bytes(data, 'ascii') 共通の処理系にしておきたかったので、メモ書き。...
Python

ctypes で c_char array を c_char_p に変換する

data = bytearray.fromhex('28d03bc3ee0243fa7d25a56dc042311d') p1 = (ctypes.c_char * len(data)) p1 = p1.from_b...
Python

Windowsユーザ御用達の uci.edu から直接python wheelをインストールしてくれるライブラリ pipwin

あんまり情報が出てこないのでメモ書き。 バグ直したった。 PR通してくれたので、pipでインストールしてももう大丈夫。
スポンサーリンク
タイトルとURLをコピーしました