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 re | |
from cms.models.pagemodel import Page | |
from django.contrib.sites.models import Site | |
from django.utils.safestring import mark_safe | |
TAG = re.compile(r''' | |
\{% # opening | |
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 re | |
tag = re.compile(r'\{% ?([^ ]+(?: [^ ]+)*) ?%\}') | |
rules = { | |
'static': lambda x: 'statistically', | |
'page': lambda x: 'paging '+x[0]+' up to', | |
} | |
def replace(m): | |
args = m.groups()[0].split(' ') |
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
int button = 2; | |
int led = 13; | |
int leds[] = {5,6,9,10,11}; | |
int leds_count = 5; | |
int cursor = 0; | |
int direction = 1; | |
void setup() { |
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
####################################### | |
# page-flow.xml | |
####################################### | |
<controller xmlns="http://www.orbeon.com/oxf/controller" matcher="regexp"> | |
<service public-methods="GET HEAD POST PUT" | |
path="/mlc/test" | |
model="test.xpl"/> | |
<page path="/mlc/page" |
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
2014-10-24 11:52:53,589 INFO ProcessorService - /mlc/test - Received request | |
2014-10-24 11:52:53,589 DEBUG URLGenerator - OXF Protocol: Using ResourceManager for key /org/orbeon/oxf/xml/schemas/pipeline.rng | |
2014-10-24 11:52:53,590 DEBUG URLGenerator - OXF Protocol: Using ResourceManager for key /config/prologue-servlet.xpl | |
2014-10-24 11:52:53,590 DEBUG URLGenerator - OXF Protocol: Using ResourceManager for key /org/orbeon/oxf/xml/schemas/aggregator.rng | |
2014-10-24 11:52:53,591 DEBUG ConcreteChooseProcessor - Choose: taking otherwise branch at line 25, column 40 of oxf:/config/prologue-servlet.xpl | |
2014-10-24 11:52:53,591 DEBUG URLGenerator - OXF Protocol: Using ResourceManager for key /org/orbeon/oxf/xml/schemas/page-flow-controller.rng | |
2014-10-24 11:52:53,591 DEBUG URLGenerator - OXF Protocol: Using ResourceManager for key /page-flow.xml | |
2014-10-24 11:52:53,592 DEBUG PageFlowControllerProcessor - processing page/service {controller: "oxf:/page-flow.xml", method: "PUT", path: "/mlc/test"} | |
2014-10-24 11 |
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 "TICL.h" | |
#include "CBL2.h" | |
#include <IRremote.h> | |
#define r_play 0xE1447A85 | |
#define r_stop 0xE14406F9 | |
#define r_fwd 0xE1444AB5 | |
#define r_rev 0xE144CA35 | |
#define r_aud 0xE144DE21 | |
#define r_sub 0xE1445EA1 |
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
require 'net/imap' | |
require 'base64' | |
require 'rexml/document' | |
require 'yaml' | |
require 'open3' | |
require 'pp' | |
class GPG | |
def initialize(gpg_exec, gpg_home, gpg_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
'''calculate lists of indexes for n objects taken k at a time without respect for order''' | |
def indexlist1(n,k): | |
''' | |
soultion by counting up in binary with k pegs | |
''' | |
l = range(k) | |
yield list(l) | |
#until the first peg is in its maximum position | |
while l[0] < (n - k): |
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/env python | |
import time, getpass | |
class FakeStream(object): | |
def write(self, *args, **kwargs): | |
pass | |
def flush(self, *args, **kwargs): | |
pass | |
print '''TapTempo |
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
- install mingw with mingw-get-inst (c,c++,developer toolkit) | |
in msys | |
- mingw-get install msys-wget-bin | |
- ln -s /mingw/bin/libtool /bin/libtool | |
- install tortoise-git | |
- git clone git://mspgcc4.git.sourceforge.net/gitroot/mspgcc4/mspgcc4 | |
in msys | |
- ./buildgcc.pl |
OlderNewer