Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am riku179 on github.
  • I am riku179 (https://keybase.io/riku179) on keybase.
  • I have a public key ASC4_kzjVL0Y1RNuMzwu9k1hVpvtJs582vRoqvUGRa5pcQo

To claim this, I am signing this object:

@riku179
riku179 / cross_scanning_matrix.cc
Created October 31, 2020 09:02
行列の斜め走査
#include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
for (int s=0; s<N+M-1; s++) {
int i, j;

Arch Linux Memo

vagrant-libvirtのインストールに失敗する

こんなエラーでしぬ

error: ‘VIR_DOMAIN_QEMU_AGENT_COMMAND_BLOCK’ undeclared

rubyをインストールしてから

$ CONFIGURE_ARGS="with-libvirt-include=/usr/include/libvirt with-libvirt-lib=/usr/lib" vagrant plugin install vagrant-libvirt

@riku179
riku179 / celery.conf
Created September 11, 2016 07:37
service file for celery
# See
# http://docs.celeryproject.org/en/latest/tutorials/daemonizing.html#available-options
CELERY_APP="App name"
CELERYD_NODES="worker"
CELERYD_OPTS=""
CELERY_BIN="/usr/bin/celery"
CELERYD_PID_FILE="/var/run/celery/%n.pid"
CELERYD_LOG_FILE="/var/log/celery/%n.log"
CELERYD_LOG_LEVEL="INFO"
@riku179
riku179 / python3_memo.md
Last active March 26, 2020 13:57
How to use OpenCV with Python3 in ArchLinux
  • procedure
$ sudo pacman -S opencv
$ sudo pip install numpy
  • check
$ python
&gt;&gt;&gt; import cv2

djangoの雑多なメモ(Django 1.10)

djangoのモデルを外部から利用

import sys, os, django
sys.path.append('/path/to/My/Project')
os.environ['DJANGO_SETTINGS_MODULE'] = 'MyProject.settings'
django.setup()