This file contains hidden or 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
pkgname=mathpartir | |
pkgver=1.2 | |
pkgrel=2 | |
pkgdesc="Latex package for typesetting type inference rules" | |
arch=(any) | |
url="http://cristal.inria.fr/~remy/latex/" | |
license=('GPL') | |
install=install | |
source=('http://cristal.inria.fr/~remy/latex/mathpartir.dvi' | |
'http://cristal.inria.fr/~remy/latex/mathpartir.sty' |
This file contains hidden or 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
checking for gcc... gcc | |
checking for C compiler default output file name... a.out | |
checking whether the C compiler works... yes | |
checking whether we are cross compiling... no | |
checking for suffix of executables... | |
checking for suffix of object files... o | |
checking whether we are using the GNU C compiler... yes | |
checking whether gcc accepts -g... yes | |
checking for gcc option to accept ISO C89... none needed | |
checking how to run the C preprocessor... gcc -E |
This file contains hidden or 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
function hailIfCargoMatches(lookingFor, specialHail) | |
function closure(event, data) | |
local cargoname,_,_ = unpack(data) | |
if cargoname:find(lookingFor, 1, true) then | |
sendChat(specialHail,"PRIVATE",currentTarget) | |
end | |
end | |
return closure | |
end |
This file contains hidden or 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
my_list = ['a','b','c'] | |
for index, value in enumerate(my_list): | |
print index, value | |
# This will print: | |
# 0 a | |
# 1 b | |
# 2 c |
This file contains hidden or 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 | |
import string as s | |
def tagify(*args, **kwargs): | |
r'''Turns the argument strings into tags. so 'my tag' becomes '#MyTag' | |
Any keyword arguments become tags with values. | |
>>> tagify('hi there') | |
['#HiThere'] |
This file contains hidden or 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 dispatch_hook(key, hooks, hook_data): | |
"""Dispatches a hook dictionary on a given piece of data.""" | |
hooks = hooks or dict() | |
if key in hooks: | |
hooks = hooks.get(key) | |
if hasattr(hooks, '__call__'): | |
hooks = [hooks] |
This file contains hidden or 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 reltime(date, compare_to=None, at='@'): | |
r'''Takes a datetime and returns a relative representation of the | |
time. | |
:param date: The date to render relatively | |
:param compare_to: what to compare the date to. Defaults to datetime.now() | |
:param at: date/time separator. defaults to "@". "at" is also reasonable. | |
>>> from datetime import datetime, timedelta | |
>>> today = datetime(2050, 9, 2, 15, 00) | |
>>> earlier = datetime(2050, 9, 2, 12) |
This file contains hidden or 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
# Contributor: dschauer, Dwight Schauer <[email protected]> | |
pkgname=openconnect-git | |
pkgver=20120907 | |
pkgrel=1 | |
pkgdesc="VPN client (intended to be) compatible with Cisco AnyConnect" | |
arch=(i686 x86_64) | |
url="http://git.infradead.org/users/dwmw2/openconnect.git" | |
license=('LGPL') | |
groups=() | |
depends=() |
This file contains hidden or 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 requests | |
def test_multiple_rels_per_link(): | |
r = requests.get('http://www.httpbin.org/response-headers?link=' | |
'</two-rel>;rel="alternate self";title="The Title"') | |
assert r.links == {'alternate': [{'href' : '/two-rel', | |
'rel': 'alternate', | |
'title': 'The Title'}], | |
'self' : [{'href' : '/two-rel', | |
'rel': 'self', |
This file contains hidden or 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
'''This script grabs the currently registered IANA link relations from | |
iana.org''' | |
from __future__ import print_function | |
from __future__ import unicode_literals | |
import requests | |
from lxml import objectify | |
import datetime |