I hereby claim:
- I am wichert on github.
- I am wichert (https://keybase.io/wichert) on keybase.
- I have a public key whose fingerprint is 5D61 B9A0 8594 F6FA 57AB 2EA2 8A93 CA33 1E53 1D8B
To claim this, I am signing this object:
def enqueue(request, queue, func, *a, **kw): | |
"""Queue a function call. | |
:param request: Pyramid request object | |
:param queue: name of the rq queue to use | |
:param func: function or instance method to call | |
:return: rq job instance | |
>>> enqueue(request, 'email', myfunc, arg1, arg2) | |
""" |
I hereby claim:
To claim this, I am signing this object:
// Look for all elements with a clip class, and remove words form them | |
// until the text fits in the available space. This requires the element | |
// to have a fixed (maximum) width and height. | |
function cropText(root) { | |
var victims = root.querySelectorAll(".clip"), | |
rest, html, victim, $victim, words, cropped; | |
for (var i=0; i<victims.length; ++i) { | |
$victim=$(victim=victims[i]); | |
// We can only measure when the item is visible, but make it transparent |
#include <lua.hpp> | |
class Lua { | |
public: | |
static class Nil { Nil(); } nil; | |
Lua() { | |
L=luaL_newstate(); | |
} |
<!-- tools.pt --> | |
<html xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:i18n="http://xml.zope.org/namespaces/i18n" | |
xmlns:meta="http://xml.zope.org/namespaces/meta" | |
xmlns:metal="http://xml.zope.org/namespaces/metal" | |
xmlns:tal="http://xml.zope.org/namespaces/tal" | |
meta:interpolation="true" | |
tal:condition="False"> | |
<metal:tooltip define-macro="tooltip"> |
import unittest | |
import pyramid.testing | |
class RedisTempStoreTests(unittest.TestCase): | |
def setUp(self): | |
from .tmpstore import DummyRedis | |
self.config = pyramid.testing.setUp() | |
self.config.registry.settings['redis'] = self.redis = DummyRedis() |
#: Mapping of language codes send by browsers to supported dialects. | |
BROWSER_LANGUAGES = { | |
'en-CA': 'en_CA', | |
'en-GB': 'en_GB', | |
'en-US': 'en_GB', | |
'en': 'en_GB', | |
'nl': 'nl_NL', | |
'nl-NL': 'nl_NL', | |
'nl-BE': 'nl_NL', | |
'zh': 'zh_CN', |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Javascript error handling logic</title> | |
</head> | |
<body> | |
<script type="text/javascript" src="https://github.com/downloads/eriwen/javascript-stacktrace/stacktrace-0.4.js"></script> | |
<script type="text/javascript"> | |
// <![CDATA[ | |
// ]]> |
import argparse | |
import os | |
import re | |
import sys | |
from lxml import etree | |
def read(fn): | |
with open(fn, 'r') as input: | |
parser = etree.HTMLParser() |
# This module allows you to use markdown in Chameleon templates from pyramid. | |
# | |
# Markdown rendering is only down for text that is translatable, and has its | |
# message context set to ``markdown``. This is a complete abuse of the translation | |
# system, but currently provides the simplest way to get markdown running in | |
# Chameleon. | |
import CommonMark | |
from chameleon.utils import Markup | |
from translationstring import ChameleonTranslate | |
from pyramid_chameleon.localization import translator |