Skip to content

Instantly share code, notes, and snippets.

| Left align | Right align | Center align |
|:-----------|------------:|:------------:|
| This | This | This |
| column | column | column |
| will | will | will |
| be | be | be |
| left | right | center |
| aligned | aligned | aligned |
@mountcedar
mountcedar / file2.txt
Last active March 20, 2016 08:31
Googleフォームを使った出欠席確認と自動返信、その後の連絡方法まとめ ref: http://qiita.com/mountcedar/items/3454d7aafcf1fd4541ff
Logger.log('hogehoge');
@mountcedar
mountcedar / file0.txt
Last active January 27, 2016 22:43
mongodbを用いたPythonクラスインスタンスのdumpとrestoreとquery検索 ref: http://qiita.com/mountcedar/items/f63006a6d5d5e14acc93
import numpy
import logging
from datetime import datetime
from dbarchive import Base
class Sample(Base):
def __init__(self, maxval=10):
self.base = "hoge"
self.bin = numpy.arange(maxval)
self.created = datetime.now()
@mountcedar
mountcedar / file0.txt
Last active December 16, 2015 06:23
python clickでサブコマンドを簡単に実装する ref: http://qiita.com/mountcedar/items/45b06ce58b1d2ae001f3
$ pip install click
@mountcedar
mountcedar / file0.txt
Last active August 29, 2015 14:21
今さら聞けないVagrantとDigital Oceanで格安VPS運用 ref: http://qiita.com/mountcedar/items/353e615a618ad1fc4ec4
# caskをインストールしていない人はここから
$ brew install caskroom/cask/brew-cask
# インストールしている人はここから
$ brew cask install vagrant virtualbox
@mountcedar
mountcedar / extract_arguments.py
Last active August 29, 2015 14:20
Pythonで関数の引数をargparseに自動登録する ref: http://qiita.com/mountcedar/items/1b2e76f3bfd18dcc1975
#!/usr/bin/env python
import argparse
from inspect import getargspec
def set_arguments(parser, func):
args, varargs, keywords, defaults = getargspec(func)
print 'args: ', args
print 'varargs', varargs
@mountcedar
mountcedar / INSTALL_RECEIPT.json
Last active February 19, 2016 04:37
Homebrewで自作のプロジェクト(ライブラリ)を公開する ref: http://qiita.com/mountcedar/items/f10161d4e483aa8c1283
"HEAD": "",
"built_as_bottle": true,
"compiler": "gcc",
"poured_from_bottle": true,
"stdlib": null,
"tapped_from": “<tap名>”,
"time": 0,
"unused_options": [],
"used_options": []
@mountcedar
mountcedar / draggable_rectangle.py
Created September 18, 2014 02:31
PythonでmatplotlibとPySideを連携させる ref: http://qiita.com/mountcedar/items/ccf671a497563b0cd671
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
class DraggableRectangle:
def __init__(self, rect):
self.rect = rect
@mountcedar
mountcedar / auth.rb
Created September 11, 2014 08:33
Sakura VPSのubuntu12.04上にgollumを入れる ref: http://qiita.com/mountcedar/items/a59ef90a0bf3e98672bd
module Precious
class App < Sinatra::Base
use Rack::Auth::Basic, "This is private wiki" do |username, password|
[username, password] == ['yukke', 'passwd']
end
end
end
@mountcedar
mountcedar / file0.txt
Created June 15, 2014 09:19
Rubyが苦手な人のためのインフラストラクチャ自動化ツールAnsible ref: http://qiita.com/mountcedar/items/fcc83b23d7e5f97529f5
$ pip install ansible