Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python2
#vim:fileencoding=utf8
import matplotlib
matplotlib.rcParams['backend'] = "Agg"
from StringIO import StringIO
import pylab as pl
import numpy as np
import sixel
@ignisan
ignisan / __init__.py
Last active December 28, 2015 22:19
matplotlibの図をsixelとして出す
#!/usr/bin/env python2
@ignisan
ignisan / IsBaseOf.hpp
Last active August 29, 2015 13:55
cocos2d::Objectを継承しているとintrusive_ptrになる。そうでない場合はshared_ptrになる。
#pragma once
#include<type_traits>
namespace ignis {
namespace detail {
// ref) http://stackoverflow.com/questions/2910979/how-is-base-of-works
template<typename Base, typename Derived>
#include<iostream>
#include<string>
#include<boost/property_tree/ptree.hpp>
#include<boost/property_tree/json_parser.hpp>
#include<boost/optional.hpp>
/* input file
{
"Level":
{
#ifndef __IGNIS_ARRAY__
#define __IGNIS_ARRAY__
#include<vector>
#include<array>
#include<iostream>
namespace ignis {
template<class ValueType>
# __init__.py
@ignisan
ignisan / updatedb.py
Created October 14, 2015 07:43
retrieve slack log data
#!/usr/bin/env python
import requests,json
import pymongo
import datetime,time
token = "xoxp-your-token"
def main():
client = pymongo.MongoClient("localhost", 27017)
#include "Square.h"
void Square::setup(int left,int top,int width,int height,ofColor color)
{
this->left = left;
this->top = top;
this->width = width;
this->height = height;
this->color = color;
}