Skip to content

Instantly share code, notes, and snippets.

KOKADO, kota kokardy

Block or report user

Report or block kokardy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kokardy / file0.go
Created Sep 23, 2013
interface型でない変数の型アサーション ref:
View file0.go
t, ok := x.(T)
kokardy / minprice.go
Created Jul 21, 2013
View minprice.go
package main
minprice.exe -dose [投与量] [規格:価格] [規格:価格]*
import (
kokardy /
Created Jul 10, 2013
How to use reportlab.platypus.Image with PNG that is created by matplotlib.pyplot.save_figure function
from StringIO import StringIO
from PIL import ImageFileIO
import matplotlib.pyplot as plt
from reportlab.platypus import Image
buf = StringIO()
#plot your graphs
plt.save_figure(buf, format="png")
kokardy /
Created Jan 4, 2013
[reportlab] a custom Template for duplex printing. a new page must start at odd-numbered page on pagebreak. 両面印刷用のテンプレート 改ページ時にかならず奇数ページからはじめる。
class CustomSimpleDocTemplate(SimpleDocTemplate):
def handle_pageBreak(self,slow=None):
SimpleDocTemplate.handle_pageBreak(self, slow=slow)
if % 2 == 1:
SimpleDocTemplate.handle_pageBreak(self, slow=slow)
kokardy / RelatedObjectLookups.js
Last active Dec 9, 2015
I tried to fix #11561. "raw_id_fields_readonly" is similar to "raw_id_fields", but do not require "change permission". If a user does not have "change permission", "raw_id_fields" works as "raw_id_fields_readonly".
View RelatedObjectLookups.js
function showRelatedObjectLookupPopup(triggeringLink, readonly) {
var name =^lookup_/, '');
name = id_to_windowname(name);
var href;
href = triggeringLink.href
if (\?/) >= 0) {
href = href.replace(/\?/, 'readonly/?');
href = href + '&pop=1';
You can’t perform that action at this time.