This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
CircularBuffer.h - circular buffer library for Arduino. | |
Copyright (c) 2009 Hiroki Yagita. | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
'Software'), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.db import models | |
class Person(models.Model): | |
name = models.CharField(max_length=200) | |
groups = models.ManyToManyField('Group', through='GroupMember', related_name='people') | |
class Meta: | |
ordering = ['name'] | |
def __unicode__(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# coding: utf-8 | |
import sys | |
import fileinput | |
def read_ints(f): | |
return map(int, f.readline().strip().split()) | |
def read_line(f): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
======================================== | |
In defense of zope libraries 翻訳 | |
======================================== | |
Pyramid が Zope ライブラリを使っていることについての非常に長い defence | |
---------------------------------------------------------------------- | |
freenode の #pyramid IRC チャンネルで、以下のような質問に私は | |
うんざりするほど多くの時間を割いてきた。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import colander as c | |
import deform.widget as w | |
from deform.form import Form | |
from deform.schema import FileData | |
import os | |
here = os.path.dirname(__file__) | |
class Store(dict): | |
def preview_url(self, name): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Background tasks to be run either by uwsgi, or directly if on dev server. | |
""" | |
import cPickle as pickle | |
import logging | |
from django.core.mail import send_mail | |
LOG = logging.getLogger(__name__) | |
HAS_UWSGI = False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def cbv_decorator(decorator): | |
""" | |
Turns a normal view decorator into a class-based-view decorator. | |
Usage: | |
@cbv_decorator(login_required) | |
class MyClassBasedView(View): | |
pass | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
/*! | |
* @brief GNU拡張機能を用いたラムダ関数を実現するマクロ | |
* | |
* gccもしくはC++0x対応コンパイラでのみコンパイル可能<br> | |
* トップレベルで用いることはできない |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
探し物はなんですか | |
掴みやすい石ですか | |
かぶりの中も スラブ中も 探したけれど見つからないのに | |
まだまだ探す気ですか | |
それより僕と登りませんか | |
壁の中へ 壁の中へ | |
行ってみたいと思いませんか | |
Woo woo woo | |
Woo woo woo | |
Woo woo woo さあ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from wsgiref.simple_server import make_server | |
from webob.dec import wsgify | |
class OTree(object): | |
def __init__(self, name=""): | |
self.children = {} | |
self.name = name | |
self.fn = None | |
def _get_name(self, child, name): |
OlderNewer