content stringlengths 7 1.05M |
|---|
# https://www.codechef.com/START11C/problems/FACEDIR
n = int(input())
for _ in range(n):
v = int(input())
v %= 4
if v == 0:
print("North")
elif v==1:
print("East")
elif v==2:
print("South")
else:
print("West") |
DATA = [ '123.108.237.112/28',
'123.108.239.224/28',
'202.253.96.144/28',
'202.253.99.144/28',
'210.228.189.188/30']
|
valor = False
if valor:
pass # para escrever alguma coisa depois
... #Tbm é a msm coisa
else:
print('Tchau') |
# the print keyword is used to display a message
print('Hello world!')
# Strings can be enclosed in single quotes
print('Hello world single quotes')
# Strings can also be enclosed in double quotes
print("Hello world - double quotes")
# using print to display integer / whole numbers
print(188)
# using print to display float number / real number
print(99.9)
|
print("Вычисление периметра и площади прямоугольника.")
strA = input("Ведите длину стороны A, в мм. : ")
strB = input("Ведите длину стороны B, в мм. : ")
a = int(strA); b = int(strB)
r = (a + b) * 2
print("Сторона A =", a,"Сторона B =", b, ": P прямоугольника =", r)
r = a * b
print("Сторона A =", a,"Сторона B =", b, ": S прямоугольника =", r)
print("Вычисление объема и площади куба.")
str = input("Введите длину ребра куба, в мм. : ")
a = int(str)
r = (a * a) * 6
y = a * a * a
print("Длина ребра =", a,"Площадь куба = ", r, "\t Объем равен =", y)
|
# -*- coding: utf-8 -*-
#Using Python3
#Drowing dynamic table
rows = input("Enter the number of rows: ")
columns = input("Enter the number of columns: ")
celNum = input("Enter number in cells: ")
rows = int(rows)
columns = int(columns)
celNum = int(celNum)
#Labels
print("Table", end = " ") #print on the same line
for i in range(0,columns):
print("T", end = " ")
print("Total")
#Body
for j in range(0, rows, 1 ):
print(" row" + str(j+1).zfill(1), end = " ") #formats int to string
for j in range(0, columns,1):
print(celNum, end = " ")
print("Suma")
#Totals
print("Total", end = " ") #print on the same line
for i in range(0,columns):
print("S", end = " ")
print("Vsi4ko")
|
# DROP TABLES
airport_codes_table_drop = "DROP TABLE IF EXISTS airport_codes"
immigration_table_drop = "DROP TABLE IF EXISTS immigration"
state_codes_table_drop = "DROP TABLE IF EXISTS state_codes"
# user_table_drop = "DROP TABLE IF EXISTS users"
# song_table_drop = "DROP TABLE IF EXISTS songs"
# artist_table_drop = "DROP TABLE IF EXISTS artists"
# time_table_drop = "DROP TABLE IF EXISTS time"
# # CREATE TABLES
#
# songplay_table_create = ("CREATE TABLE songplays ( \
# songplay_id serial PRIMARY KEY, \
# start_time timestamp NOT NULL, \
# user_id int NOT NULL, \
# level varchar NOT NULL, \
# song_id varchar, \
# artist_id varchar, \
# session_id int NOT NULL, \
# location varchar NOT NULL, \
# user_agent varchar NOT NULL \
# )")
#
# user_table_create = ("CREATE TABLE users ( \
# user_id int PRIMARY KEY, \
# first_name varchar NOT NULL, \
# last_name varchar NOT NULL, \
# gender char(1) NOT NULL, \
# level varchar NOT NULL \
# )")
#
# song_table_create = ("CREATE TABLE songs ( \
# song_id varchar PRIMARY KEY, \
# title varchar NOT NULL, \
# artist_id varchar NOT NULL, \
# year int NOT NULL, \
# duration numeric NOT NULL \
# )")
#
# artist_table_create = ("CREATE TABLE artists ( \
# artist_id varchar PRIMARY KEY, \
# name varchar NOT NULL, \
# location varchar NOT NULL, \
# latitude numeric, \
# longitude numeric \
# )")
#
# time_table_create = ("CREATE TABLE time ( \
# start_time timestamp PRIMARY KEY, \
# hour int NOT NULL, \
# day int NOT NULL, \
# week int NOT NULL, \
# month int NOT NULL, \
# year int NOT NULL, \
# weekday int NOT NULL \
# )")
#
# # INSERT RECORDS
#
# songplay_table_insert = ("INSERT INTO songplays (start_time, user_id, level, song_id, artist_id, session_id, location, user_agent) \
# VALUES(%s, %s, %s, %s, %s, %s, %s, %s) ON CONFLICT DO NOTHING")
#
# user_table_insert = ("INSERT INTO users (user_id, first_name, last_name, gender, level) VALUES(%s, %s, %s, %s, %s) \
# ON CONFLICT (user_id) DO UPDATE SET level = EXCLUDED.level")
#
# song_table_insert = "INSERT INTO songs (song_id, title, artist_id, year, duration) VALUES(%s, %s, %s, %s, %s) ON CONFLICT DO NOTHING"
#
# artist_table_insert = ("INSERT INTO artists (artist_id, name, location, latitude, longitude) VALUES(%s, %s, %s, %s, %s) ON CONFLICT DO NOTHING")
#
#
# time_table_insert = ("INSERT INTO time (start_time, hour, day, week, month, year, weekday) VALUES(%s, %s, %s, %s, %s, %s, %s) ON CONFLICT DO NOTHING")
#
# # FIND SONGS
#
# song_select = ("SELECT songs.song_id, artists.artist_id FROM songs \
# JOIN artists ON songs.artist_id = artists.artist_id \
# WHERE songs.title = %s AND artists.name = %s AND songs.duration = %s")
#
# # QUERY LISTS
#
# create_table_queries = [songplay_table_create, user_table_create, song_table_create, artist_table_create, time_table_create]
drop_table_queries = [airport_codes_table_drop, immigration_table_drop, state_codes_table_drop] |
def MergeSort(A):
if len(A) > 1:
mid = len(A) // 2
lefthalf = A[:mid]
righthalf = A[mid:]
print(lefthalf, " ", righthalf)
MergeSort(lefthalf)
MergeSort(righthalf)
i = j = k = 0
while i < len(lefthalf) and j < len(righthalf):
if lefthalf[i] < righthalf[j]:
A[k] = lefthalf[i]
i = i + 1
else:
A[k] = righthalf[j]
j = j + 1
k = k + 1
while i < len(lefthalf):
A[k] = lefthalf[i]
i = i + 1
k = k + 1
while j < len(righthalf):
A[k] = righthalf[j]
j = j + 1
k = k + 1
A = [534, 246, 933, 127, 277, 321, 454, 565, 220]
MergeSort(A)
print(A)
#PRINT |
print("Program to find the sum of two binary numbers \n\n")
a=input("Enter binary number ")
b=int(a,2)
print (b)
c=int(input("Enter numerical natural number"))
d=bin(c)[2:]
print (d)
input()
|
"""
Contains all error classes
"""
############################################################
# read errors
############################################################
class RecordSizeError(Exception):
"""
Exception raised when assert_eor finds EOR == False.
This means that the data read does not match the record length.
"""
def __init__(self, reclen, pos):
self.reclen = reclen
self.pos = pos
def __str__(self):
"""Return error message."""
return ("\n" +
"Not at end of data record in\n" +
"Poistion = {:d}\n" +
"RecLen = {:d}"
).format(
self.pos,
self.reclen)
class ReadError(Exception):
"""
Exception raised when data could not be read correctly.
"""
def __init__(self, message):
self.message = message
def __str__(self):
"""
Return error message.
"""
return (
"\n" +
"Error reading record from file: {}".format(
self.message))
class DataSizeError(Exception):
"""
Exception raised when assert_eor finds EOR == False.
This means that the data read does not match the record length.
"""
def __init__(self, filename, reclen, pos):
self.filename = filename
self.reclen = reclen
self.pos = pos
def __str__(self):
"""Return error message."""
return ("Not at end of data record in file {}.\n"+\
"Poistion = {:d}\n"+\
"RecLen = {:d}")\
.format(self.filename,
self.pos,
self.reclen)
class DataFileError(Exception):
"""
Exception raised when assert_eof finds EOF == False.
This means that the data file size does not match the file length.
"""
def __init__(self, filename, filesize, pos):
self.filename = filename
self.filesize = filesize
self.pos = pos
def __str__(self):
"""Return error message."""
return ("Not at end of data file in file {}.\n"+\
"Poistion = {:d}\n"+\
"Filesize = {:d}")\
.format(self.filename,
self.pos,
self.filesize)
class RecLenError(Exception):
"""
Exception raised when a record was not read correctly.
This means that the record header does not match the
record trailer (both should contain the length of the
data area).
"""
def __init__(self, filename, message):
self.filename = filename # name of file which caused an error
self.message = message
def __str__(self):
"""Return error message."""
return "Error reading record from file {}.\n{}"\
.format(self.filename,self.message)
class FileReadError(Exception):
"""
Exception raised when data could not be read correctly.
"""
def __init__(self, filename, message):
self.filename = filename # name of file which caused an error
self.message = message
def __str__(self):
"""
Return error message.
"""
return "Error reading record from file {}: {}"\
.format(self.filename,self.message)
class StringReadError(Exception):
"""
Exception raised string length is not specified.
"""
def __init__(self, message):
self.message = message
def __str__(self):
"""
Return error message.
"""
return self.message
############################################################
# Write Errors
############################################################
class RecordBeginningError(Exception):
"""
Exception raised when assert_bor finds BOR == False.
This means that the data buffer is not empty.
"""
def __init__(self, pos):
self.pos = pos
def __str__(self):
"""Return error message."""
return ("\n" +
"Not at beginning of data record:\n" +
"Poistion = {:d}"
).format(
self.pos)
class WriteError(Exception):
"""
Exception raised when data could not be written correctly.
"""
def __init__(self, filename, message):
self.filename = filename
self.message = message
def __str__(self):
"""
Return error message.
"""
return "Error writing record to file {}: {}"\
.format(self.filename,
self.message)
|
n=int(input('Digite um número inteiro: '))
dois= n * 2
tres= n * 3
quatro= n * 4
cinco= n * 5
seis= n * 6
sete= n * 7
oito= n * 8
nove= n * 9
dez= n * 10
print('A tabuada do número {} é: \n {} \n {} \n {} \n {} \n {} \n {} \n {} \n {} \n {} \n {}'.format(n, n ,dois, tres, quatro, cinco, seis, sete, oito, nove, dez)) |
#
# PySNMP MIB module XEDIA-L2DIAL-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/XEDIA-L2DIAL-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 21:36:26 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
Integer, OctetString, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "Integer", "OctetString", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
ValueSizeConstraint, ConstraintsUnion, ValueRangeConstraint, ConstraintsIntersection, SingleValueConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ConstraintsIntersection", "SingleValueConstraint")
ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup")
Counter32, ObjectIdentity, TimeTicks, IpAddress, Counter64, Integer32, Gauge32, iso, Unsigned32, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, NotificationType, Bits, ModuleIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Counter32", "ObjectIdentity", "TimeTicks", "IpAddress", "Counter64", "Integer32", "Gauge32", "iso", "Unsigned32", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "NotificationType", "Bits", "ModuleIdentity")
TextualConvention, DisplayString, RowStatus = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "RowStatus")
xediaMibs, = mibBuilder.importSymbols("XEDIA-REG", "xediaMibs")
xediaL2DialMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 838, 3, 30))
if mibBuilder.loadTexts: xediaL2DialMIB.setLastUpdated('9902272155Z')
if mibBuilder.loadTexts: xediaL2DialMIB.setOrganization('Xedia Corp.')
l2DialObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 838, 3, 30, 1))
l2DialConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 838, 3, 30, 2))
l2DialStatusTable = MibTable((1, 3, 6, 1, 4, 1, 838, 3, 30, 1, 1), )
if mibBuilder.loadTexts: l2DialStatusTable.setStatus('current')
l2DialStatusEntry = MibTableRow((1, 3, 6, 1, 4, 1, 838, 3, 30, 1, 1, 1), ).setIndexNames((0, "XEDIA-L2DIAL-MIB", "l2DialStatusIpAddress"))
if mibBuilder.loadTexts: l2DialStatusEntry.setStatus('current')
l2DialStatusIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 838, 3, 30, 1, 1, 1, 1), IpAddress())
if mibBuilder.loadTexts: l2DialStatusIpAddress.setStatus('current')
l2DialStatusSublayer = MibTableColumn((1, 3, 6, 1, 4, 1, 838, 3, 30, 1, 1, 1, 2), Integer32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: l2DialStatusSublayer.setStatus('current')
l2DialCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 838, 3, 30, 2, 1))
l2DialGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 838, 3, 30, 2, 2))
l2DialCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 838, 3, 30, 2, 1, 1)).setObjects(("XEDIA-L2DIAL-MIB", "l2DialStatusGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
l2DialCompliance = l2DialCompliance.setStatus('current')
l2DialStatusGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 838, 3, 30, 2, 2, 1)).setObjects(("XEDIA-L2DIAL-MIB", "l2DialStatusSublayer"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
l2DialStatusGroup = l2DialStatusGroup.setStatus('current')
mibBuilder.exportSymbols("XEDIA-L2DIAL-MIB", l2DialGroups=l2DialGroups, l2DialStatusIpAddress=l2DialStatusIpAddress, l2DialObjects=l2DialObjects, PYSNMP_MODULE_ID=xediaL2DialMIB, xediaL2DialMIB=xediaL2DialMIB, l2DialConformance=l2DialConformance, l2DialStatusEntry=l2DialStatusEntry, l2DialStatusSublayer=l2DialStatusSublayer, l2DialStatusTable=l2DialStatusTable, l2DialCompliance=l2DialCompliance, l2DialCompliances=l2DialCompliances, l2DialStatusGroup=l2DialStatusGroup)
|
class Variable(object):
def __init__(self, identity, constraints = None):
self.identity = identity
self.constraints = constraints or set()
def __eq__(self, other):
return self.identity == (other.identity if other is Variable else other)
def __hash__(self):
return hash(self.identity)
def __str__(self):
return "Variable({0})".format(self.identity)
|
def divisors(num):
divisors = []
try:
if num < 0:
raise ValueError("Ingresa un número positivo")
for i in range(1, num + 1):
if num % i == 0:
divisors.append(i)
return divisors
except ValueError as err:
print(err)
def run():
try:
num = int(input("Ingresa un número: "))
result = divisors(num)
if result is not None:
print("Los divisores de {} son: {}".format(num, result))
except ValueError as ve:
print("Se debe ingresar un número")
finally:
print("----------- Fin del programa -----------")
if __name__ == '__main__':
run()
|
"""
Qt3 UI emulation module.
Selection of widgets that emulate behavior from Qt3/Eneboo.
"""
|
class ChromosomeConfig:
def __init__(self, cross_type, mut_type, cross_prob, mut_prob):
self.__cross_type = cross_type
self.__mut_type = mut_type
self.__cross_prob = cross_prob
self.__mut_prob = mut_prob
@property
def cross_type(self):
return self.__cross_type
@property
def mut_type(self):
return self.__mut_type
@property
def cross_prob(self):
return self.__cross_prob
@property
def mut_prob(self):
return self.__mut_prob
|
def pytest_generate_tests(metafunc):
for scenario in metafunc.cls.scenarios:
metafunc.addcall(id=scenario[0], funcargs=scenario[1])
scenario1 = ('basic', {'attribute': 'value'})
scenario2 = ('advanced', {'attribute': 'value2'})
class Foo(object):
pass
class TestSampleWithScenarios(Foo):
scenarios = [scenario1, scenario2]
def test_demo(self, attribute):
assert isinstance(attribute, str)
|
def mensaje():
print("Estoy aprendiendo python")
print("Estoy aprendiendo python")
print("Estoy aprendiendo python")
mensaje()
mensaje()
mensaje()
print("Ejecutando codigo fuera del cuerpo de la funcion")
mensaje()
|
class Solution(object):
def lengthOfLIS(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
if nums is None or not nums:
return 0
dp = [1] * len(nums)
for curr, val in enumerate(nums):
for prev in range(curr):
if nums[prev] < val:
dp[curr] = max(dp[curr], dp[prev] + 1)
return max(dp)
|
# Visitor Permissions -
ORDER = 0x000000001
PAY = 0x000000002
# Customer Permissions - Can order, Pay, and comment on food
COMMENT = 0x000000004
# Delivery Person Permissions - Bid, choose routes, comment on customer
BID = 0x000000008
ROUTES = 0x000000010
CUSTOMER_COMMENT = 0x000000020
# Cook Permissions - food quality, menu, prices
FOOD_QUALITY = 0x000000040
MENU = 0x000000080
PRICES = 0x000000100
# Salesperson Permissions - Nagotiate with Supplier
SUPPLIER = 0x000000200
# Manager Permissions - commissions for sales, pay for cooks, complaints, management of customers
COMMISSIONS = 0x000000400
PAY = 0x000000800
COMPLAINTS = 0x000000800
MANAGEMENT = 0x000001000
|
# Crie um programa onde o usuario possa
# digitar varios valores numericos e cadastre-os
# em uma lista. Caso o numero ja exista la dentro,
# ele nao sera adicionado.
# No final, serao exibidos todos os valores
# unicos digitados, em ordem crescente
listagem = list()
r = 'S'
while True:
while r == 'S':
n = int(input('Digite um valor: '))
if n not in listagem:
listagem.append(n)
print('Valor adicionado com sucesso...')
else:
print('Valor duplicado! Nao vou adicionar...')
r = str(input('Quer continuar? [S/N] ')).strip().upper()[0]
while r != 'S' and r != 'N':
r = str(input('Quer continuar? [S/N] ')).strip().upper()[0]
if r == 'N':
break
listagem.sort()
print(listagem)
|
score=['10','20','30','100점']
i=0
while i<len(score):
print(score[i])
i=i+1 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
@ Author : pengj
@ date : 2019/1/6 11:10
@ IDE : PyCharm
@ GitHub : https://github.com/JackyPJB
@ Contact : pengjianbiao@hotmail.com
-------------------------------------------------
Description : 969. 煎饼排序
显示英文描述
用户通过次数 35
用户尝试次数 45
通过次数 35
提交次数 61
题目难度 Medium
给定数组 A,我们可以对其进行煎饼翻转:我们选择一些正整数 k <= A.length,然后反转 A 的前 k 个元素的顺序。我们要执行零次或多次煎饼翻转(按顺序一次接一次地进行)以完成对数组 A 的排序。
返回能使 A 排序的煎饼翻转操作所对应的 k 值序列。任何将数组排序且翻转次数在 10 * A.length 范围内的有效答案都将被判断为正确。
示例 1:
输入:[3,2,4,1]
输出:[4,2,4,3]
解释:
我们执行 4 次煎饼翻转,k 值分别为 4,2,4,和 3。
初始状态 A = [3, 2, 4, 1]
第一次翻转后 (k=4): A = [1, 4, 2, 3]
第二次翻转后 (k=2): A = [4, 1, 2, 3]
第三次翻转后 (k=4): A = [3, 2, 1, 4]
第四次翻转后 (k=3): A = [1, 2, 3, 4],此时已完成排序。
示例 2:
输入:[1,2,3]
输出:[]
解释:
输入已经排序,因此不需要翻转任何内容。
请注意,其他可能的答案,如[3,3],也将被接受。
提示:
1 <= A.length <= 100
A[i] 是 [1, 2, ..., A.length] 的排列
-------------------------------------------------
"""
__author__ = 'Max_Pengjb'
class Solution:
def pancakeSort(self, A):
"""
:type A: List[int]
:rtype: List[int]
"""
n = len(A)
r = []
def zz(AA, nn):
"""
:param AA: List[int]
:param nn: int
:return:
"""
if nn > 1:
big = max(AA)
ind = AA.index(big)
print(big, ind)
r.append(ind + 1)
r.append(nn)
AA = AA[:ind + 1:][::-1] + AA[ind + 1::]
print(ind + 1, AA)
AA = AA[::-1]
print(nn, AA)
nn -= 1
AA.pop()
zz(AA, nn)
zz(A, n)
print(r)
return r
Solution().pancakeSort([3, 2, 4, 1])
|
"""
entradas
temperatura-->float-->a
Salidas
deporte-->str-->d
"""
a = float(input("Digite su temperatura :"))
if(a > 85):
print("Natacion")
elif(a > 71 and a <= 85):
print("Tenis")
elif(a > 32 and a <= 70):
print("Golf")
elif(a > 10 and a <= 32):
print("Esqui")
elif(a <= 10):
print("Marcha")
else:
print("No se indentifico ningun deporte") |
"""Workspace rules (GHC binary distributions)"""
load("@bazel_skylib//:lib.bzl", "paths")
_GHC_BINS = {
"8.2.2": {
"linux-x86_64": ("https://downloads.haskell.org/~ghc/8.2.2/ghc-8.2.2-x86_64-deb8-linux.tar.xz", "48e205c62b9dc1ccf6739a4bc15a71e56dde2f891a9d786a1b115f0286111b2a"),
},
"8.0.2": {
"linux-x86_64": ("https://downloads.haskell.org/~ghc/8.0.2/ghc-8.0.2-x86_64-deb8-linux.tar.xz", "5ee68290db00ca0b79d57bc3a5bdce470de9ce9da0b098a7ce6c504605856c8f"),
},
"7.10.3": {
"linux-x86_64": ("https://downloads.haskell.org/~ghc/7.10.3/ghc-7.10.3-x86_64-deb8-linux.tar.xz", "b478e282afbf489614d0133ef698ba44e901eeb1794f4453c0fb0807cd271b96"),
},
}
_GHC_DEFAULT_VERSION = "8.2.2"
def _ghc_bindist_impl(ctx):
if ctx.os.name[:5] != "linux":
fail("Operating system {0} is not yet supported.".format(ctx.os.name))
version = ctx.attr.version
arch = "linux-x86_64" # TODO Adjust this when we support more platforms.
url, sha256 = _GHC_BINS[version][arch]
bindist_dir = ctx.path(".") # repo path
ctx.download_and_extract(
url = url,
output = ".",
sha256 = sha256,
type = "tar.xz",
stripPrefix = "ghc-" + version,
)
ctx.execute(["./configure", "--prefix", bindist_dir.realpath])
ctx.execute(["make", "install"])
ctx.template(
"BUILD",
Label("//haskell:ghc.BUILD"),
executable = False,
)
ghc_bindist = repository_rule(
_ghc_bindist_impl,
local = False,
attrs = {
"version": attr.string(
default=_GHC_DEFAULT_VERSION,
values=_GHC_BINS.keys(),
doc = "The desired GHC version"
),
},
)
"""Create a new repository with given `name` which will contain two
targets:
* filegroup `bin` containing all executable files of GHC
* C library `threaded-rts`
Example:
In `WORKSPACE` file:
```bzl
# This repository rule creates @ghc repository.
ghc_bindist(
name = "ghc",
version = "8.2.2",
)
# Register the toolchain defined locally in BUILD file:
register_toolchain("//:ghc")
```
In `BUILD` file:
```bzl
# Use binaries from @ghc//:bin to define //:ghc toolchain.
haskell_toolchain(
name = "ghc",
version = "8.2.2",
tools = "@ghc//:bin",
)
```
"""
|
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Dummy tests."""
def test_dummy():
assert True
|
def is_even(number):
number = int (number)
return number % 2 == 0
number = input('add number: ')
print(is_even(number))
|
class credit_card(object):
def __init__(self, name, sec_code, code):
credit = 0
self.name = name
self.sec_code = sec_code
self.code = code
self.credit = float(credit)
def add_credi(self, credit):
self.credit += float(credit)
def remove_credi(self, credit):
self.credit -= float(credit)
def print_credit(self):
return self.credit
|
# SPDX-License-Identifier: MIT
# Copyright (c) 2020 Akumatic
#
#https://adventofcode.com/2020/day/11
def readFile() -> list:
with open(f"{__file__.rstrip('code.py')}input.txt", "r") as f:
return [list(line.strip()) for line in f.readlines()]
def get_positions(seats: list, cache: dict, x: int, y: int):
idx = (x, y)
cache[idx] = {"adjacent": [], "next_seat": []}
for dx in range(-1, 2):
for dy in range(-1, 2):
if dx == 0 and dy == 0:
continue
# adjacent tiles
cache[idx]["adjacent"].append((x + dx, y + dy))
# next available seat
i, j = x, y
while i + dx in cache["rx"] and j + dy in cache["ry"]:
i += dx
j += dy
if seats[i][j] in ("L", "#"):
cache[idx]["next_seat"].append((i, j))
break
def count(seats: list, cache: dict, x: int, y: int, seat: str, selection: str) -> int:
return sum(1 for pos in cache[(x, y)][selection] if pos[0] in cache["rx"] and \
pos[1] in cache["ry"] and seats[pos[0]][pos[1]] == seat)
def create_cache(seats: list) -> dict:
cache = {"rx": range(len(seats)), "ry": range(len(seats[0]))}
for x in cache["rx"]:
for y in cache["ry"]:
get_positions(seats, cache, x, y)
return cache
def iterate(seats: list, cache: dict, adjacent: bool = True) -> list:
selection = "adjacent" if adjacent else "next_seat"
tolerance = 4 if adjacent else 5
while True:
tmp = [s[:] for s in seats]
for x in cache["rx"]:
for y in cache["ry"]:
if seats[x][y] == ".":
continue
elif seats[x][y] == "L":
if count(seats, cache, x, y, "#", selection) == 0:
tmp[x][y] = "#"
else: # seats[x][y] == "#":
if count(seats, cache, x, y, "#", selection) >= tolerance:
tmp[x][y] = "L"
if seats == tmp:
return seats
else:
seats = tmp
def part1(input: list, cache) -> int:
seats = iterate(input, cache)
return sum([row.count("#") for row in seats])
def part2(input: list, cache) -> int:
seats = iterate(input, cache, adjacent=False)
return sum([row.count("#") for row in seats])
if __name__ == "__main__":
input = readFile()
cache = create_cache(input)
print(f"Part 1: {part1(input, cache)}")
print(f"Part 2: {part2(input, cache)}") |
# Created by MechAviv
# Map ID :: 402000620
# Sandstorm Zone : Refuge Border
if sm.hasQuest(34929):
sm.spawnNpc(3001509, 298, 200)
sm.showNpcSpecialActionByTemplateId(3001509, "summon", 0)
sm.spawnNpc(3001512, 374, 200)
sm.showNpcSpecialActionByTemplateId(3001512, "summon", 0)
sm.spawnNpc(3001513, 431, 200)
sm.showNpcSpecialActionByTemplateId(3001513, "summon", 0)
sm.spawnNpc(3001510, 550, 200)
sm.showNpcSpecialActionByTemplateId(3001510, "summon", 0)
sm.spawnNpc(3001514, -181, 200)
sm.showNpcSpecialActionByTemplateId(3001514, "summon", 0)
sm.spawnNpc(3001515, -330, 200)
sm.showNpcSpecialActionByTemplateId(3001515, "summon", 0)
sm.spawnNpc(3001516, -275, 200)
sm.showNpcSpecialActionByTemplateId(3001516, "summon", 0)
sm.spawnNpc(3001517, -487, -5)
sm.showNpcSpecialActionByTemplateId(3001517, "summon", 0)
sm.spawnNpc(3001518, -330, -5)
sm.showNpcSpecialActionByTemplateId(3001518, "summon", 0)
sm.spawnNpc(3001519, -435, -5)
sm.showNpcSpecialActionByTemplateId(3001519, "summon", 0)
sm.spawnNpc(3001520, -380, -5)
sm.showNpcSpecialActionByTemplateId(3001520, "summon", 0)
sm.spawnNpc(3001521, -331, 132)
sm.showNpcSpecialActionByTemplateId(3001521, "summon", 0)
sm.spawnNpc(3001522, -439, 93)
sm.showNpcSpecialActionByTemplateId(3001522, "summon", 0)
sm.spawnNpc(3001511, -439, 200)
sm.showNpcSpecialActionByTemplateId(3001511, "summon", 0) |
def line_0(kwargs):
kwargs['a'] = 1
kwargs['b'] = kwargs['a'] + 1
kwargs['c'] = kwargs['b'] * kwargs['b']
if kwargs['a'] == 1:
kwargs['d'] = 1
else:
kwargs['d'] = 0
return kwargs
|
def bubble_sort(l, start, end, hook_func=None):
'''
@brief 冒泡排序算法,排序区间[start, end]
@param l 需要进行排序的list
@param start 开始位置
@param end 结束位置
@param hook_func hook函数这里主要是用作可视化
'''
count = 0
for i in range(start, end + 1):
for j in range(start, end - i):
if hook_func is not None:
hook_func(l, i, j, count)
count += 1
if l[j] > l[j + 1]:
l[j + 1], l[j] = l[j], l[j + 1]
return l
def bubble_sort_II(l, start, end, hook_func=None):
'''
@brief 冒泡排序算法,排序区间[start, end]
@param l 需要进行排序的list
@param start 开始位置
@param end 结束位置
@param hook_func hook函数这里主要是用作可视化
@note 使用sorted标志位记录后续的位置是否已经排序,按照冒泡排序算法的思路如果已经后面的位置未经过交换元素,后面一定已经有序
'''
count = 0
sorted = False
for i in range(start, end + 1):
sorted = True
for j in range(start, end - i):
if hook_func is not None:
hook_func(l, i, j, count)
count += 1
if l[j] > l[j + 1]:
l[j + 1], l[j] = l[j], l[j + 1]
sorted = False
if sorted:
break
return l
def bubble_sort_III(l, start, end, hook_func=None):
'''
@brief 冒泡排序算法,排序区间[start, end]
@param l 需要进行排序的list
@param start 开始位置
@param end 结束位置
@param hook_func hook函数这里主要是用作可视化
@note 使用sorted标志位记录后续的位置是否已经排序,按照冒泡排序算法的思路如果已经后面的位置未经过交换元素,后面一定已经有序
'''
count = 0
sorted = False
sorted_border = end
last_swap_index = 0
for i in range(start, end + 1):
sorted = True
for j in range(start, sorted_border):
if hook_func is not None:
hook_func(l, i, j, count)
count += 1
if l[j] > l[j + 1]:
l[j + 1], l[j] = l[j], l[j + 1]
sorted = False
last_swap_index = j
sorted_border = last_swap_index
if sorted:
break
return l
all = [bubble_sort, bubble_sort_II, bubble_sort_III]
|
# --------------
##File path for the file
file_path
#Code starts here
def read_file(path):
file = open(path,"r")
sentence = file.readline()
file.close()
return sentence
sample_message = read_file(file_path)
print(sample_message)
# --------------
#Code starts here
def read_file(file_path_1,file_path_2):
file_path_1 = open(file_path_1,"r")
file_path_2 = open(file_path_2,"r")
message_1 = file_path_1.readline()
message_2 = file_path_2.readline()
return message_1,message_2
def fuse_msg(message_a,message_b):
quotient = int(message_b)//int(message_a)
return str(quotient)
messages = read_file(file_path_1,file_path_2)
print(messages)
message_1 = messages[0]
print(message_1)
message_2 = messages[1]
print(message_2)
secret_msg_1 = fuse_msg(message_1,message_2)
print(secret_msg_1)
# --------------
#Code starts here
def read_file(file_path_3):
file = open(file_path_3,"r")
message_3 = file.readlines()
return message_3
def substitute_msg(message_c):
sub = ''
if message_c == 'Red':
sub = 'Army General'
elif message_c == 'Green':
sub = 'Data Scientist'
else:
sub = 'Marine Biologist'
return sub
messages = read_file(file_path_3)
print(messages)
message_3 = messages[0]
print(message_3)
secret_msg_2 = substitute_msg(message_3)
print(secret_msg_2)
# --------------
# File path for message 4 and message 5
file_path_4
file_path_5
#Code starts here
def read_file(file_path_4,file_path_5):
file1 = open(file_path_4,"r")
file2 = open(file_path_5,"r")
message_4 = file1.readline()
message_5 = file2.readline()
return message_4,message_5
#Function to compare message
def compare_msg(message_d,message_e):
#Splitting the message into a list
a_list=message_d.split()
#Splitting the message into a list
b_list=message_e.split()
#Comparing the elements from both the lists
c_list = [i for i in a_list if i not in b_list]
#Combining the words of a list back to a single string sentence
final_msg=" ".join(c_list)
#Returning the sentence
return final_msg
#Calling the function to read file
messages=read_file(file_path_4,file_path_5)
print(messages)
message_4 = messages[0]
message_5 = messages[1]
#Calling the function to read file
#message_5=read_file(file_path_5)
#Calling the function 'compare messages'
secret_msg_3=compare_msg(message_4,message_5)
#Printing the secret message
print(secret_msg_3)
#Code ends here
# --------------
#Code starts here
def read_file(file_path_6):
file = open(file_path_6,"r")
message_6 = file.readline()
return message_6
# Function to filter message
def extract_msg(message_f):
# Splitting the message into a list
a_list = message_f.split()
# Creating the lambda function to identify even length words
even_word = lambda x: (len(x) % 2 == 0)
# Splitting the message into a list
b_list = (filter(even_word, a_list))
# Combining the words of a list back to a single string sentence
final_msg = " ".join(b_list)
# Returning the sentence
return final_msg
# Calling the function to read file
message_6 = read_file(file_path_6)
print(message_6)
# Calling the function 'filter_msg'
secret_msg_4 = extract_msg(message_6)
# Printing the secret message
print(secret_msg_4)
# Code ends here
# --------------
#Secret message parts in the correct order
message_parts=[secret_msg_3, secret_msg_1, secret_msg_4, secret_msg_2]
final_path= user_data_dir + '/secret_message.txt'
#Code starts here
def write_file(path,secret_msg):
file = open(path,"a+")
file.write(secret_msg)
file.close()
secret_msg = " ".join(message_parts)
write_file(final_path,secret_msg)
print(secret_msg)
|
# -*- encoding: utf-8 -*-
bind = 'unix:mta-system.sock'
workers = 2
timeout = 300
loglevel = 'debug'
capture_output = True
accesslog = 'gunicorn-access.log'
errorlog = 'gunicorn-error.log'
enable_stdio_inheritance = True
|
while True:
try:
n = input("Entre com um número inteiro: ")
x = int(n)
break
except ValueError:
print("Não é um inteiro! Tente novamente.")
print("Muito Bem!")
|
"""
A small set of utitlit functions, that we could also have gotten from
cloudmesh.common.
"""
def readfile(filename, mode='r'):
"""
returns the content of a file
:param filename: the filename
:return:
"""
if mode not in ['r', 'rb']:
raise ValueError(f"incorrect mode : expected 'r' or 'rb' given {mode}")
with open(filename, mode)as file:
content = file.read()
file.close()
return content
def writefile(filename, content):
"""
writes the content into the file
:param filename: the filename
:param content: teh content
:return:
"""
with open(filename, 'w') as outfile:
outfile.write(content)
outfile.truncate()
|
# THIS FILE IS AUTO-GENERATED, DO NOT EDIT
config = {'all': {'comment': 'Entry point', 'type': 'nested', 'lists': ['2', '3', '4'], 'ensure_unique': True, 'ensure_unique_prefix': 4, 'max_slug_length': 50}, '2': {'comment': 'Two words (may also contain prepositions)', 'type': 'nested', 'lists': ['an']}, '3': {'comment': 'Three words (may also contain prepositions)', 'type': 'nested', 'lists': ['aan', 'ano', 'anl', 'nuo', 'as2', 's2o', 's2l', 'sl2']}, '4': {'comment': 'Four words (may also contain prepositions)', 'type': 'nested', 'lists': ['aano', 'aanl', 'anuo', 'as2o', 's2uo', 'as2l', 'asl2']}, 'an': {'comment': 'adjective-noun', 'type': 'cartesian', 'lists': ['adj_any', 'subj']}, 'aan': {'comment': 'adjective-adjective-noun', 'type': 'cartesian', 'lists': ['adj_far', 'adj_near', 'subj']}, 'ano': {'comment': 'adjective-noun-of-noun', 'type': 'cartesian', 'lists': ['adj_any', 'subj', 'of', 'of_noun_any']}, 'anl': {'comment': 'adjective-noun-from-location', 'type': 'cartesian', 'lists': ['adj_any', 'subj', 'from', 'from_noun_no_mod']}, 'nuo': {'comment': 'noun-of-adjective-noun', 'type': 'cartesian', 'lists': ['subj', 'of', 'of_modifier', 'of_noun']}, 'as2': {'comment': 'adjective-2word-subject', 'type': 'cartesian', 'lists': ['adj_far', 'subj2']}, 's2o': {'comment': '2word-subject-of-noun', 'type': 'cartesian', 'lists': ['subj2', 'of', 'of_noun_any']}, 's2l': {'comment': '2word-subject-from-location', 'type': 'cartesian', 'lists': ['subj2', 'from', 'from_noun_no_mod']}, 'sl2': {'comment': 'subject-from-some-location', 'type': 'cartesian', 'lists': ['subj', 'from', 'from2']}, 'aano': {'comment': 'adjective-adjective-noun-of-noun', 'type': 'cartesian', 'lists': ['adj_far', 'adj_near', 'subj', 'of', 'of_noun_any']}, 'aanl': {'comment': 'adjective-adjective-noun-from-location', 'type': 'cartesian', 'lists': ['adj_far', 'adj_near', 'subj', 'from', 'from_noun_no_mod']}, 'anuo': {'comment': 'adjective-noun-of-adjective-noun', 'type': 'cartesian', 'lists': ['adj_any', 'subj', 'of', 'of_modifier', 'of_noun']}, 'as2o': {'comment': 'adjective-2word-subject-of-noun', 'type': 'cartesian', 'lists': ['adj_far', 'subj2', 'of', 'of_noun_any']}, 's2uo': {'comment': 'adjective-2word-subject-of-adjective-noun', 'type': 'cartesian', 'lists': ['subj2', 'of', 'of_modifier', 'of_noun']}, 'as2l': {'comment': 'adjective-2word-subject-from-location', 'type': 'cartesian', 'lists': ['adj_far', 'subj2', 'from', 'from_noun_no_mod']}, 'asl2': {'comment': 'adjective-subject-from-some-location', 'type': 'cartesian', 'lists': ['adj_any', 'subj', 'from', 'from2']}, 'adj_far': {'comment': 'First adjective (with more following)', 'type': 'nested', 'lists': ['adjective', 'adjective_first', 'noun_adjective', 'size']}, 'adj_near': {'comment': 'Last adjective (closest to the subject)', 'type': 'nested', 'lists': ['adjective', 'color', 'noun_adjective', 'prefix']}, 'adj_any': {'comment': 'The only adjective (includes everything)', 'type': 'nested', 'lists': ['adjective', 'color', 'noun_adjective', 'prefix', 'size']}, 'subj': {'comment': 'The subject (animal)', 'type': 'nested', 'lists': ['animal', 'animal_breed', 'animal_legendary']}, 'of': {'type': 'const', 'value': 'of'}, 'of_noun_any': {'type': 'nested', 'lists': ['of_noun', 'of_noun_no_mod']}, 'from': {'type': 'const', 'value': 'from'}, 'from_noun_no_mod': {'type': 'words', 'words': ['venus', 'mars', 'jupiter', 'ganymede', 'saturn', 'uranus', 'neptune', 'pluto', 'betelgeuse', 'sirius', 'vega', 'arcadia', 'asgard', 'atlantis', 'avalon', 'camelot', 'eldorado', 'heaven', 'hell', 'hyperborea', 'lemuria', 'nibiru', 'shambhala', 'tartarus', 'valhalla', 'wonderland']}, 'prefix': {'type': 'words', 'words': ['giga', 'mega', 'micro', 'mini', 'nano', 'pygmy', 'super', 'uber', 'ultra', 'cyber', 'mutant', 'ninja', 'space'], 'max_length': 13}, 'of_modifier': {'type': 'words', 'words': ['absolute', 'abstract', 'algebraic', 'amazing', 'amusing', 'ancient', 'angelic', 'astonishing', 'authentic', 'awesome', 'beautiful', 'classic', 'delightful', 'demonic', 'eminent', 'enjoyable', 'eternal', 'excellent', 'exotic', 'extreme', 'fabulous', 'famous', 'fantastic', 'fascinating', 'flawless', 'fortunate', 'glorious', 'great', 'heavenly', 'holistic', 'hypothetical', 'ideal', 'illegal', 'imaginary', 'immense', 'imminent', 'immortal', 'impossible', 'impressive', 'improbable', 'incredible', 'inescapable', 'inevitable', 'infinite', 'inspiring', 'interesting', 'legal', 'magic', 'majestic', 'major', 'marvelous', 'massive', 'mysterious', 'nonconcrete', 'nonstop', 'luxurious', 'optimal', 'original', 'pastoral', 'perfect', 'perpetual', 'phenomenal', 'pleasurable', 'pragmatic', 'premium', 'radical', 'rampant', 'regular', 'remarkable', 'satisfying', 'serious', 'scientific', 'sexy', 'sheer', 'simple', 'silent', 'spectacular', 'splendid', 'stereotyped', 'stimulating', 'strange', 'striking', 'strongest', 'sublime', 'sudden', 'terrific', 'therapeutic', 'total', 'ultimate', 'uncanny', 'undeniable', 'unearthly', 'unexpected', 'unknown', 'unmatched', 'unnatural', 'unreal', 'unusual', 'utter', 'weird', 'wonderful', 'wondrous'], 'max_length': 13}, 'animal_breed': {'type': 'words', 'words': ['longhorn', 'akita', 'beagle', 'bloodhound', 'bulldog', 'chihuahua', 'collie', 'corgi', 'dalmatian', 'doberman', 'husky', 'labradoodle', 'labrador', 'mastiff', 'malamute', 'mongrel', 'poodle', 'rottweiler', 'spaniel', 'terrier', 'mule', 'mustang', 'pony', 'angora'], 'max_length': 13}, 'size': {'type': 'words', 'words': ['big', 'colossal', 'enormous', 'gigantic', 'great', 'huge', 'hulking', 'humongous', 'large', 'little', 'massive', 'miniature', 'petite', 'portable', 'small', 'tiny', 'towering'], 'max_length': 13}, 'from2': {'type': 'phrases', 'phrases': [('fancy', 'cafe'), ('prestigious', 'college'), ('prestigious', 'university'), ('big', 'city'), ('foreign', 'country'), ('small', 'town'), ('wild', 'west'), ('ancient', 'ruins'), ('another', 'dimension'), ('another', 'planet'), ('flying', 'circus'), ('secret', 'laboratory'), ('the', 'government'), ('the', 'future'), ('the', 'past'), ('the', 'stars')], 'number_of_words': 2, 'max_length': 24}, 'of_noun_no_mod': {'type': 'words', 'words': ['chemistry', 'education', 'experiment', 'mathematics', 'psychology', 'reading', 'cubism', 'painting', 'advertising', 'agreement', 'climate', 'competition', 'effort', 'emphasis', 'foundation', 'judgment', 'memory', 'opportunity', 'perspective', 'priority', 'promise', 'teaching'], 'max_length': 13}, 'of_noun': {'type': 'words', 'words': ['anger', 'bliss', 'contentment', 'courage', 'ecstasy', 'excitement', 'faith', 'felicity', 'fury', 'gaiety', 'glee', 'glory', 'greatness', 'inspiration', 'jest', 'joy', 'happiness', 'holiness', 'love', 'merriment', 'passion', 'patience', 'peace', 'persistence', 'pleasure', 'pride', 'recreation', 'relaxation', 'romance', 'serenity', 'tranquility', 'apotheosis', 'chaos', 'energy', 'essence', 'eternity', 'excellence', 'experience', 'freedom', 'nirvana', 'order', 'perfection', 'spirit', 'variation', 'acceptance', 'brotherhood', 'criticism', 'culture', 'discourse', 'discussion', 'justice', 'piety', 'respect', 'security', 'support', 'tolerance', 'trust', 'warranty', 'abundance', 'admiration', 'assurance', 'authority', 'awe', 'certainty', 'control', 'domination', 'enterprise', 'fame', 'grandeur', 'influence', 'luxury', 'management', 'opposition', 'plenty', 'popularity', 'prestige', 'prosperity', 'reputation', 'reverence', 'reward', 'superiority', 'triumph', 'wealth', 'acumen', 'aptitude', 'art', 'artistry', 'competence', 'efficiency', 'expertise', 'finesse', 'genius', 'leadership', 'perception', 'skill', 'virtuosity', 'argument', 'debate', 'action', 'agility', 'amplitude', 'attack', 'charisma', 'chivalry', 'defense', 'defiance', 'devotion', 'dignity', 'endurance', 'exercise', 'force', 'fortitude', 'gallantry', 'health', 'honor', 'infinity', 'inquire', 'intensity', 'luck', 'mastery', 'might', 'opportunity', 'penetration', 'performance', 'pluck', 'potency', 'protection', 'prowess', 'resistance', 'serendipity', 'speed', 'stamina', 'strength', 'swiftness', 'temperance', 'tenacity', 'valor', 'vigor', 'vitality', 'will', 'advance', 'conversion', 'correction', 'development', 'diversity', 'elevation', 'enhancement', 'enrichment', 'enthusiasm', 'focus', 'fruition', 'growth', 'improvement', 'innovation', 'modernism', 'novelty', 'proficiency', 'progress', 'promotion', 'realization', 'refinement', 'renovation', 'revolution', 'success', 'tempering', 'upgrade', 'ampleness', 'completion', 'satiation', 'saturation', 'sufficiency', 'vastness', 'wholeness', 'attraction', 'beauty', 'bloom', 'cleaning', 'courtesy', 'glamour', 'elegance', 'fascination', 'kindness', 'joviality', 'politeness', 'refinement', 'symmetry', 'sympathy', 'tact', 'calibration', 'drama', 'economy', 'engineering', 'examination', 'philosophy', 'poetry', 'research', 'science', 'democracy', 'election', 'feminism', 'champagne', 'coffee', 'cookies', 'flowers', 'fragrance', 'honeydew', 'music', 'pizza', 'aurora', 'blizzard', 'current', 'dew', 'downpour', 'drizzle', 'hail', 'hurricane', 'lightning', 'rain', 'snow', 'storm', 'sunshine', 'tempest', 'thunder', 'tornado', 'typhoon', 'weather', 'wind', 'whirlwind', 'abracadabra', 'adventure', 'atheism', 'camouflage', 'destiny', 'endeavor', 'expression', 'fantasy', 'fertility', 'imagination', 'karma', 'masquerade', 'maturity', 'radiance', 'shopping', 'sorcery', 'unity', 'witchcraft', 'wizardry', 'wonder', 'youth', 'purring'], 'max_length': 13}, 'subj2': {'type': 'phrases', 'phrases': [('atlantic', 'puffin'), ('bank', 'swallow'), ('barn', 'owl'), ('barn', 'swallow'), ('barred', 'owl'), ('chimney', 'swift'), ('cliff', 'swallow'), ('emperor', 'goose'), ('harlequin', 'duck'), ('himalayan', 'snowcock'), ('hyacinth', 'macaw'), ('mangrove', 'cuckoo'), ('mute', 'swan'), ('northern', 'cardinal'), ('peregrine', 'falcon'), ('prairie', 'falcon'), ('red', 'cardinal'), ('snow', 'goose'), ('snowy', 'owl'), ('trumpeter', 'swan'), ('tufted', 'puffin'), ('whooper', 'swan'), ('whooping', 'crane'), ('fire', 'ant'), ('alpine', 'chipmunk'), ('beaked', 'whale'), ('bottlenose', 'dolphin'), ('clouded', 'leopard'), ('eared', 'seal'), ('elephant', 'seal'), ('feral', 'cat'), ('feral', 'dog'), ('feral', 'donkey'), ('feral', 'goat'), ('feral', 'horse'), ('feral', 'pig'), ('fur', 'seal'), ('grizzly', 'bear'), ('harbor', 'porpoise'), ('honey', 'badger'), ('humpback', 'whale'), ('killer', 'whale'), ('mountain', 'deer'), ('mountain', 'goat'), ('mountain', 'lion'), ('olympic', 'marmot'), ('pampas', 'deer'), ('pine', 'marten'), ('polynesian', 'rat'), ('rhesus', 'macaque'), ('river', 'dolphin'), ('sea', 'lion'), ('sea', 'otter'), ('snow', 'leopard'), ('sperm', 'whale'), ('spinner', 'dolphin'), ('vampire', 'bat'), ('gila', 'monster'), ('freshwater', 'crocodile'), ('saltwater', 'crocodile'), ('snapping', 'turtle'), ('walking', 'mushroom')], 'number_of_words': 2, 'max_length': 22}, 'adjective': {'type': 'words', 'words': ['acrid', 'ambrosial', 'amorphous', 'armored', 'aromatic', 'bald', 'blazing', 'boisterous', 'bouncy', 'brawny', 'bulky', 'camouflaged', 'caped', 'chubby', 'curvy', 'elastic', 'ethereal', 'fat', 'feathered', 'fiery', 'flashy', 'flat', 'fluffy', 'foamy', 'fragrant', 'furry', 'fuzzy', 'glaring', 'hairy', 'heavy', 'hissing', 'horned', 'icy', 'imaginary', 'invisible', 'lean', 'loud', 'loutish', 'lumpy', 'lush', 'masked', 'meaty', 'messy', 'misty', 'nebulous', 'noisy', 'nondescript', 'organic', 'purring', 'quiet', 'quirky', 'radiant', 'roaring', 'ruddy', 'rustling', 'screeching', 'shaggy', 'shapeless', 'shiny', 'silent', 'silky', 'singing', 'skinny', 'smooth', 'soft', 'spicy', 'spiked', 'statuesque', 'sticky', 'tacky', 'tall', 'tangible', 'tentacled', 'thick', 'thundering', 'venomous', 'warm', 'weightless', 'whispering', 'winged', 'wooden', 'adorable', 'affable', 'amazing', 'amiable', 'attractive', 'beautiful', 'calm', 'charming', 'cherubic', 'classic', 'classy', 'convivial', 'cordial', 'cuddly', 'curly', 'cute', 'debonair', 'elegant', 'famous', 'fresh', 'friendly', 'funny', 'gorgeous', 'graceful', 'gregarious', 'grinning', 'handsome', 'hilarious', 'hot', 'interesting', 'kind', 'laughing', 'lovely', 'meek', 'mellow', 'merciful', 'neat', 'nifty', 'notorious', 'poetic', 'pretty', 'refined', 'refreshing', 'sexy', 'smiling', 'sociable', 'spiffy', 'stylish', 'sweet', 'tactful', 'whimsical', 'abiding', 'accurate', 'adamant', 'adaptable', 'adventurous', 'alluring', 'aloof', 'ambitious', 'amusing', 'annoying', 'arrogant', 'aspiring', 'belligerent', 'benign', 'berserk', 'benevolent', 'bold', 'brave', 'cheerful', 'chirpy', 'cocky', 'congenial', 'courageous', 'cryptic', 'curious', 'daft', 'dainty', 'daring', 'defiant', 'delicate', 'delightful', 'determined', 'devout', 'didactic', 'diligent', 'discreet', 'dramatic', 'dynamic', 'eager', 'eccentric', 'elated', 'encouraging', 'enigmatic', 'enthusiastic', 'evasive', 'faithful', 'fair', 'fanatic', 'fearless', 'fervent', 'festive', 'fierce', 'fine', 'free', 'gabby', 'garrulous', 'gay', 'gentle', 'glistening', 'greedy', 'grumpy', 'happy', 'honest', 'hopeful', 'hospitable', 'impetuous', 'independent', 'industrious', 'innocent', 'intrepid', 'jolly', 'jovial', 'just', 'lively', 'loose', 'loyal', 'merry', 'modest', 'mysterious', 'nice', 'obedient', 'optimistic', 'orthodox', 'outgoing', 'outrageous', 'overjoyed', 'passionate', 'perky', 'placid', 'polite', 'positive', 'proud', 'prudent', 'puzzling', 'quixotic', 'quizzical', 'rebel', 'resolute', 'rampant', 'righteous', 'romantic', 'rough', 'rousing', 'sassy', 'satisfied', 'sly', 'sincere', 'snobbish', 'spirited', 'spry', 'stalwart', 'stirring', 'swinging', 'tasteful', 'thankful', 'tidy', 'tremendous', 'truthful', 'unselfish', 'upbeat', 'uppish', 'valiant', 'vehement', 'vengeful', 'vigorous', 'vivacious', 'zealous', 'zippy', 'able', 'adept', 'analytic', 'astute', 'attentive', 'brainy', 'busy', 'calculating', 'capable', 'careful', 'cautious', 'certain', 'clever', 'competent', 'conscious', 'cooperative', 'crafty', 'crazy', 'cunning', 'daffy', 'devious', 'discerning', 'efficient', 'expert', 'functional', 'gifted', 'helpful', 'enlightened', 'idealistic', 'impartial', 'industrious', 'ingenious', 'inquisitive', 'intelligent', 'inventive', 'judicious', 'keen', 'knowing', 'literate', 'logical', 'masterful', 'mindful', 'nonchalant', 'observant', 'omniscient', 'poised', 'practical', 'pragmatic', 'proficient', 'provocative', 'qualified', 'radical', 'rational', 'realistic', 'resourceful', 'savvy', 'sceptical', 'sensible', 'serious', 'shrewd', 'skilled', 'slick', 'slim', 'sloppy', 'smart', 'sophisticated', 'stoic', 'succinct', 'talented', 'thoughtful', 'tricky', 'unbiased', 'uptight', 'versatile', 'versed', 'visionary', 'wise', 'witty', 'accelerated', 'active', 'agile', 'athletic', 'dashing', 'deft', 'dexterous', 'energetic', 'fast', 'frisky', 'hasty', 'hypersonic', 'meteoric', 'mighty', 'muscular', 'nimble', 'nippy', 'powerful', 'prompt', 'quick', 'rapid', 'resilient', 'robust', 'rugged', 'solid', 'speedy', 'steadfast', 'steady', 'strong', 'sturdy', 'tireless', 'tough', 'unyielding', 'rich', 'wealthy', 'meticulous', 'precise', 'rigorous', 'scrupulous', 'strict', 'airborne', 'burrowing', 'crouching', 'flying', 'hidden', 'hopping', 'jumping', 'lurking', 'tunneling', 'warping', 'aboriginal', 'amphibian', 'aquatic', 'arboreal', 'polar', 'terrestrial', 'urban', 'accomplished', 'astonishing', 'authentic', 'awesome', 'delectable', 'excellent', 'exotic', 'exuberant', 'fabulous', 'fantastic', 'fascinating', 'flawless', 'fortunate', 'funky', 'godlike', 'glorious', 'groovy', 'honored', 'illustrious', 'imposing', 'important', 'impressive', 'incredible', 'invaluable', 'kickass', 'majestic', 'magnificent', 'marvellous', 'monumental', 'perfect', 'phenomenal', 'pompous', 'precious', 'premium', 'private', 'remarkable', 'spectacular', 'splendid', 'successful', 'wonderful', 'wondrous', 'offbeat', 'original', 'outstanding', 'quaint', 'unique', 'ancient', 'antique', 'prehistoric', 'primitive', 'abstract', 'acoustic', 'angelic', 'arcane', 'archetypal', 'augmented', 'auspicious', 'axiomatic', 'beneficial', 'bipedal', 'bizarre', 'complex', 'dancing', 'dangerous', 'demonic', 'divergent', 'economic', 'electric', 'elite', 'eminent', 'enchanted', 'esoteric', 'finicky', 'fractal', 'futuristic', 'gainful', 'hallowed', 'heavenly', 'heretic', 'holistic', 'hungry', 'hypnotic', 'hysterical', 'illegal', 'imperial', 'imported', 'impossible', 'inescapable', 'juicy', 'liberal', 'ludicrous', 'lyrical', 'magnetic', 'manipulative', 'mature', 'military', 'macho', 'married', 'melodic', 'natural', 'naughty', 'nocturnal', 'nostalgic', 'optimal', 'pastoral', 'peculiar', 'piquant', 'pristine', 'prophetic', 'psychedelic', 'quantum', 'rare', 'real', 'secret', 'simple', 'spectral', 'spiritual', 'stereotyped', 'stimulating', 'straight', 'strange', 'tested', 'therapeutic', 'true', 'ubiquitous', 'uncovered', 'unnatural', 'utopian', 'vagabond', 'vague', 'vegan', 'victorious', 'vigilant', 'voracious', 'wakeful', 'wandering', 'watchful', 'wild', 'bright', 'brilliant', 'colorful', 'crystal', 'dark', 'dazzling', 'fluorescent', 'glittering', 'glossy', 'gleaming', 'light', 'mottled', 'neon', 'opalescent', 'pastel', 'smoky', 'sparkling', 'spotted', 'striped', 'translucent', 'transparent', 'vivid'], 'max_length': 13}, 'animal': {'type': 'words', 'words': ['earthworm', 'leech', 'worm', 'scorpion', 'spider', 'tarantula', 'barnacle', 'crab', 'crayfish', 'lobster', 'pillbug', 'prawn', 'shrimp', 'ant', 'bee', 'beetle', 'bug', 'bumblebee', 'butterfly', 'caterpillar', 'cicada', 'cricket', 'dragonfly', 'earwig', 'firefly', 'grasshopper', 'honeybee', 'hornet', 'inchworm', 'ladybug', 'locust', 'mantis', 'mayfly', 'mosquito', 'moth', 'sawfly', 'silkworm', 'termite', 'wasp', 'woodlouse', 'centipede', 'millipede', 'pronghorn', 'antelope', 'bison', 'buffalo', 'bull', 'chamois', 'cow', 'gazelle', 'gaur', 'goat', 'ibex', 'impala', 'kudu', 'markhor', 'mouflon', 'muskox', 'nyala', 'sheep', 'wildebeest', 'yak', 'zebu', 'alpaca', 'camel', 'llama', 'vicugna', 'caribou', 'chital', 'deer', 'elk', 'moose', 'pudu', 'reindeer', 'sambar', 'wapiti', 'beluga', 'dolphin', 'narwhal', 'orca', 'porpoise', 'whale', 'donkey', 'horse', 'stallion', 'zebra', 'giraffe', 'okapi', 'hippo', 'rhino', 'boar', 'hog', 'pig', 'swine', 'warthog', 'peccary', 'buzzard', 'eagle', 'goshawk', 'harrier', 'hawk', 'vulture', 'duck', 'goose', 'swan', 'teal', 'bird', 'hummingbird', 'swift', 'kiwi', 'potoo', 'seriema', 'cassowary', 'emu', 'condor', 'auk', 'avocet', 'guillemot', 'kittiwake', 'puffin', 'seagull', 'skua', 'stork', 'dodo', 'dove', 'pigeon', 'kingfisher', 'tody', 'bustard', 'coua', 'coucal', 'cuckoo', 'koel', 'malkoha', 'roadrunner', 'kagu', 'caracara', 'falcon', 'kestrel', 'chachalaca', 'chicken', 'curassow', 'grouse', 'guan', 'junglefowl', 'partridge', 'peacock', 'pheasant', 'quail', 'rooster', 'turkey', 'loon', 'coot', 'crane', 'turaco', 'hoatzin', 'bullfinch', 'crow', 'jackdaw', 'jaybird', 'finch', 'lyrebird', 'magpie', 'myna', 'nightingale', 'nuthatch', 'oriole', 'oxpecker', 'raven', 'robin', 'rook', 'skylark', 'sparrow', 'starling', 'swallow', 'waxbill', 'wren', 'heron', 'ibis', 'jacamar', 'piculet', 'toucan', 'toucanet', 'woodpecker', 'flamingo', 'grebe', 'albatross', 'fulmar', 'petrel', 'spoonbill', 'ara', 'cockatoo', 'kakapo', 'lorikeet', 'macaw', 'parakeet', 'parrot', 'penguin', 'ostrich', 'boobook', 'owl', 'booby', 'cormorant', 'frigatebird', 'pelican', 'quetzal', 'trogon', 'axolotl', 'bullfrog', 'frog', 'newt', 'salamander', 'toad', 'angelfish', 'barracuda', 'carp', 'catfish', 'dogfish', 'goldfish', 'guppy', 'eel', 'flounder', 'herring', 'lionfish', 'mackerel', 'oarfish', 'perch', 'salmon', 'seahorse', 'sturgeon', 'sunfish', 'tench', 'trout', 'tuna', 'wrasse', 'sawfish', 'shark', 'stingray', 'jellyfish', 'alligator', 'caiman', 'crocodile', 'gharial', 'starfish', 'urchin', 'hedgehog', 'coyote', 'dingo', 'dog', 'fennec', 'fox', 'hound', 'jackal', 'tanuki', 'wolf', 'bobcat', 'caracal', 'cat', 'cougar', 'jaguar', 'jaguarundi', 'leopard', 'lion', 'lynx', 'manul', 'ocelot', 'panther', 'puma', 'serval', 'smilodon', 'tiger', 'wildcat', 'aardwolf', 'binturong', 'cheetah', 'civet', 'fossa', 'hyena', 'meerkat', 'mongoose', 'badger', 'coati', 'ermine', 'ferret', 'marten', 'mink', 'otter', 'polecat', 'skunk', 'stoat', 'weasel', 'wolverine', 'seal', 'walrus', 'raccoon', 'ringtail', 'bear', 'panda', 'bat', 'armadillo', 'elephant', 'mammoth', 'mastodon', 'mole', 'hyrax', 'bandicoot', 'bettong', 'cuscus', 'kangaroo', 'koala', 'numbat', 'quokka', 'quoll', 'wallaby', 'wombat', 'echidna', 'platypus', 'tapir', 'anteater', 'sloth', 'agouti', 'beaver', 'capybara', 'chinchilla', 'chipmunk', 'degu', 'dormouse', 'gerbil', 'gopher', 'groundhog', 'jackrabbit', 'jerboa', 'hamster', 'hare', 'lemming', 'marmot', 'mouse', 'muskrat', 'porcupine', 'rabbit', 'rat', 'squirrel', 'vole', 'ape', 'baboon', 'bonobo', 'capuchin', 'chimpanzee', 'galago', 'gibbon', 'gorilla', 'lemur', 'lori', 'macaque', 'mandrill', 'marmoset', 'monkey', 'orangutan', 'tamarin', 'tarsier', 'uakari', 'dugong', 'manatee', 'shrew', 'aardwark', 'clam', 'cockle', 'mussel', 'oyster', 'scallop', 'shellfish', 'ammonite', 'cuttlefish', 'nautilus', 'octopus', 'squid', 'limpet', 'slug', 'snail', 'sponge', 'tuatara', 'agama', 'chameleon', 'dragon', 'gecko', 'iguana', 'lizard', 'pogona', 'skink', 'adder', 'anaconda', 'asp', 'boa', 'cobra', 'copperhead', 'mamba', 'python', 'rattlesnake', 'sidewinder', 'snake', 'taipan', 'viper', 'tortoise', 'turtle', 'dinosaur', 'raptor', 'mushroom'], 'max_length': 13}, 'color': {'type': 'words', 'words': ['almond', 'amaranth', 'apricot', 'artichoke', 'auburn', 'azure', 'banana', 'beige', 'black', 'blond', 'blue', 'brown', 'burgundy', 'carmine', 'carrot', 'celadon', 'cerise', 'cerulean', 'charcoal', 'cherry', 'chestnut', 'chocolate', 'cinnamon', 'copper', 'cream', 'crimson', 'cyan', 'daffodil', 'dandelion', 'denim', 'ebony', 'eggplant', 'gray', 'ginger', 'green', 'indigo', 'infrared', 'jasmine', 'khaki', 'lavender', 'lilac', 'mauve', 'magenta', 'mahogany', 'maize', 'marigold', 'mustard', 'ochre', 'orange', 'papaya', 'peach', 'persimmon', 'pink', 'pistachio', 'pumpkin', 'purple', 'raspberry', 'red', 'rose', 'russet', 'saffron', 'sage', 'scarlet', 'sepia', 'silver', 'tan', 'tangerine', 'taupe', 'teal', 'tomato', 'turquoise', 'tuscan', 'ultramarine', 'ultraviolet', 'umber', 'vanilla', 'vermilion', 'violet', 'viridian', 'white', 'wine', 'wisteria', 'yellow', 'agate', 'amber', 'amethyst', 'aquamarine', 'asparagus', 'beryl', 'brass', 'bronze', 'cobalt', 'coral', 'cornflower', 'diamond', 'emerald', 'garnet', 'golden', 'granite', 'ivory', 'jade', 'jasper', 'lemon', 'lime', 'malachite', 'maroon', 'myrtle', 'nickel', 'olive', 'olivine', 'onyx', 'opal', 'orchid', 'pearl', 'peridot', 'platinum', 'quartz', 'ruby', 'sandy', 'sapphire', 'steel', 'thistle', 'topaz', 'tourmaline', 'tungsten', 'xanthic', 'zircon'], 'max_length': 13}, 'noun_adjective': {'type': 'words', 'words': ['fancy', 'magic', 'rainbow', 'woodoo'], 'max_length': 13}, 'animal_legendary': {'type': 'words', 'words': ['basilisk', 'chupacabra', 'dragon', 'griffin', 'pegasus', 'unicorn'], 'max_length': 13}, 'adjective_first': {'type': 'words', 'words': ['first', 'new'], 'max_length': 13}}
# Python 2 compatibility - all words must be unicode
# (this is to make Python 2 and 3 both work from the same __init__.py code)
try:
for listdef in config.values():
if listdef['type'] == 'words':
listdef['words'] = [unicode(x) for x in listdef['words']]
elif listdef['type'] == 'phrases':
listdef['phrases'] = [tuple(unicode(y) for y in x) for x in listdef['phrases']]
elif listdef['type'] == 'const':
listdef['value'] = unicode(listdef['value'])
except NameError:
pass
|
#!/usr/bin/python
#
# Copyright (C) 2006 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
XML_ENTRY_1 = """<?xml version='1.0'?>
<entry xmlns='http://www.w3.org/2005/Atom'
xmlns:g='http://base.google.com/ns/1.0'>
<category scheme="http://base.google.com/categories/itemtypes"
term="products"/>
<id> http://www.google.com/test/id/url </id>
<title type='text'>Testing 2000 series laptop</title>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>A Testing Laptop</div>
</content>
<link rel='alternate' type='text/html'
href='http://www.provider-host.com/123456789'/>
<link rel='license'
href='http://creativecommons.org/licenses/by-nc/2.5/rdf'/>
<g:label>Computer</g:label>
<g:label>Laptop</g:label>
<g:label>testing laptop</g:label>
<g:item_type>products</g:item_type>
</entry>"""
TEST_BASE_ENTRY = """<?xml version='1.0'?>
<entry xmlns='http://www.w3.org/2005/Atom'
xmlns:g='http://base.google.com/ns/1.0'>
<category scheme="http://base.google.com/categories/itemtypes"
term="products"/>
<title type='text'>Testing 2000 series laptop</title>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>A Testing Laptop</div>
</content>
<app:control xmlns:app='http://purl.org/atom/app#'>
<app:draft>yes</app:draft>
<gm:disapproved xmlns:gm='http://base.google.com/ns-metadata/1.0'/>
</app:control>
<link rel='alternate' type='text/html'
href='http://www.provider-host.com/123456789'/>
<g:label>Computer</g:label>
<g:label>Laptop</g:label>
<g:label>testing laptop</g:label>
<g:item_type>products</g:item_type>
</entry>"""
BIG_FEED = """<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title type="text">dive into mark</title>
<subtitle type="html">
A <em>lot</em> of effort
went into making this effortless
</subtitle>
<updated>2005-07-31T12:29:29Z</updated>
<id>tag:example.org,2003:3</id>
<link rel="alternate" type="text/html"
hreflang="en" href="http://example.org/"/>
<link rel="self" type="application/atom+xml"
href="http://example.org/feed.atom"/>
<rights>Copyright (c) 2003, Mark Pilgrim</rights>
<generator uri="http://www.example.com/" version="1.0">
Example Toolkit
</generator>
<entry>
<title>Atom draft-07 snapshot</title>
<link rel="alternate" type="text/html"
href="http://example.org/2005/04/02/atom"/>
<link rel="enclosure" type="audio/mpeg" length="1337"
href="http://example.org/audio/ph34r_my_podcast.mp3"/>
<id>tag:example.org,2003:3.2397</id>
<updated>2005-07-31T12:29:29Z</updated>
<published>2003-12-13T08:29:29-04:00</published>
<author>
<name>Mark Pilgrim</name>
<uri>http://example.org/</uri>
<email>f8dy@example.com</email>
</author>
<contributor>
<name>Sam Ruby</name>
</contributor>
<contributor>
<name>Joe Gregorio</name>
</contributor>
<content type="xhtml" xml:lang="en"
xml:base="http://diveintomark.org/">
<div xmlns="http://www.w3.org/1999/xhtml">
<p><i>[Update: The Atom draft is finished.]</i></p>
</div>
</content>
</entry>
</feed>
"""
SMALL_FEED = """<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Example Feed</title>
<link href="http://example.org/"/>
<updated>2003-12-13T18:30:02Z</updated>
<author>
<name>John Doe</name>
</author>
<id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
<entry>
<title>Atom-Powered Robots Run Amok</title>
<link href="http://example.org/2003/12/13/atom03"/>
<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
<updated>2003-12-13T18:30:02Z</updated>
<summary>Some text.</summary>
</entry>
</feed>
"""
GBASE_FEED = """<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:g='http://base.google.com/ns/1.0' xmlns:batch='http://schemas.google.com/gdata/batch'>
<id>http://www.google.com/base/feeds/snippets</id>
<updated>2007-02-08T23:18:21.935Z</updated>
<title type='text'>Items matching query: digital camera</title>
<link rel='alternate' type='text/html' href='http://base.google.com'>
</link>
<link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.google.com/base/feeds/snippets'>
</link>
<link rel='self' type='application/atom+xml' href='http://www.google.com/base/feeds/snippets?start-index=1&max-results=25&bq=digital+camera'>
</link>
<link rel='next' type='application/atom+xml' href='http://www.google.com/base/feeds/snippets?start-index=26&max-results=25&bq=digital+camera'>
</link>
<generator version='1.0' uri='http://base.google.com'>GoogleBase </generator>
<openSearch:totalResults>2171885</openSearch:totalResults>
<openSearch:startIndex>1</openSearch:startIndex>
<openSearch:itemsPerPage>25</openSearch:itemsPerPage>
<entry>
<id>http://www.google.com/base/feeds/snippets/13246453826751927533</id>
<published>2007-02-08T13:23:27.000Z</published>
<updated>2007-02-08T16:40:57.000Z</updated>
<category scheme='http://base.google.com/categories/itemtypes' term='Products'>
</category>
<title type='text'>Digital Camera Battery Notebook Computer 12v DC Power Cable - 5.5mm x 2.5mm (Center +) Camera Connecting Cables</title>
<content type='html'>Notebook Computer 12v DC Power Cable - 5.5mm x 2.1mm (Center +) This connection cable will allow any Digital Pursuits battery pack to power portable computers that operate with 12v power and have a 2.1mm power connector (center +) Digital ...</content>
<link rel='alternate' type='text/html' href='http://www.bhphotovideo.com/bnh/controller/home?O=productlist&A=details&Q=&sku=305668&is=REG&kw=DIDCB5092&BI=583'>
</link>
<link rel='self' type='application/atom+xml' href='http://www.google.com/base/feeds/snippets/13246453826751927533'>
</link>
<author>
<name>B&H Photo-Video</name>
<email>anon-szot0wdsq0at@base.google.com</email>
</author>
<g:payment_notes type='text'>PayPal & Bill Me Later credit available online only.</g:payment_notes>
<g:condition type='text'>new</g:condition>
<g:location type='location'>420 9th Ave. 10001</g:location>
<g:id type='text'>305668-REG</g:id>
<g:item_type type='text'>Products</g:item_type>
<g:brand type='text'>Digital Camera Battery</g:brand>
<g:expiration_date type='dateTime'>2007-03-10T13:23:27.000Z</g:expiration_date>
<g:customer_id type='int'>1172711</g:customer_id>
<g:price type='floatUnit'>34.95 usd</g:price>
<g:product_type type='text'>Digital Photography>Camera Connecting Cables</g:product_type>
<g:item_language type='text'>EN</g:item_language>
<g:manufacturer_id type='text'>DCB5092</g:manufacturer_id>
<g:target_country type='text'>US</g:target_country>
<g:weight type='float'>1.0</g:weight>
<g:image_link type='url'>http://base.google.com/base_image?q=http%3A%2F%2Fwww.bhphotovideo.com%2Fimages%2Fitems%2F305668.jpg&dhm=ffffffff84c9a95e&size=6</g:image_link>
</entry>
<entry>
<id>http://www.google.com/base/feeds/snippets/10145771037331858608</id>
<published>2007-02-08T13:23:27.000Z</published>
<updated>2007-02-08T16:40:57.000Z</updated>
<category scheme='http://base.google.com/categories/itemtypes' term='Products'>
</category>
<title type='text'>Digital Camera Battery Electronic Device 5v DC Power Cable - 5.5mm x 2.5mm (Center +) Camera Connecting Cables</title>
<content type='html'>Electronic Device 5v DC Power Cable - 5.5mm x 2.5mm (Center +) This connection cable will allow any Digital Pursuits battery pack to power any electronic device that operates with 5v power and has a 2.5mm power connector (center +) Digital ...</content>
<link rel='alternate' type='text/html' href='http://www.bhphotovideo.com/bnh/controller/home?O=productlist&A=details&Q=&sku=305656&is=REG&kw=DIDCB5108&BI=583'>
</link>
<link rel='self' type='application/atom+xml' href='http://www.google.com/base/feeds/snippets/10145771037331858608'>
</link>
<author>
<name>B&H Photo-Video</name>
<email>anon-szot0wdsq0at@base.google.com</email>
</author>
<g:location type='location'>420 9th Ave. 10001</g:location>
<g:condition type='text'>new</g:condition>
<g:weight type='float'>0.18</g:weight>
<g:target_country type='text'>US</g:target_country>
<g:product_type type='text'>Digital Photography>Camera Connecting Cables</g:product_type>
<g:payment_notes type='text'>PayPal & Bill Me Later credit available online only.</g:payment_notes>
<g:id type='text'>305656-REG</g:id>
<g:image_link type='url'>http://base.google.com/base_image?q=http%3A%2F%2Fwww.bhphotovideo.com%2Fimages%2Fitems%2F305656.jpg&dhm=7315bdc8&size=6</g:image_link>
<g:manufacturer_id type='text'>DCB5108</g:manufacturer_id>
<g:upc type='text'>838098005108</g:upc>
<g:price type='floatUnit'>34.95 usd</g:price>
<g:item_language type='text'>EN</g:item_language>
<g:brand type='text'>Digital Camera Battery</g:brand>
<g:customer_id type='int'>1172711</g:customer_id>
<g:item_type type='text'>Products</g:item_type>
<g:expiration_date type='dateTime'>2007-03-10T13:23:27.000Z</g:expiration_date>
</entry>
<entry>
<id>http://www.google.com/base/feeds/snippets/3128608193804768644</id>
<published>2007-02-08T02:21:27.000Z</published>
<updated>2007-02-08T15:40:13.000Z</updated>
<category scheme='http://base.google.com/categories/itemtypes' term='Products'>
</category>
<title type='text'>Digital Camera Battery Power Cable for Kodak 645 Pro-Back ProBack & DCS-300 Series Camera Connecting Cables</title>
<content type='html'>Camera Connection Cable - to Power Kodak 645 Pro-Back DCS-300 Series Digital Cameras This connection cable will allow any Digital Pursuits battery pack to power the following digital cameras: Kodak DCS Pro Back 645 DCS-300 series Digital Photography ...</content>
<link rel='alternate' type='text/html' href='http://www.bhphotovideo.com/bnh/controller/home?O=productlist&A=details&Q=&sku=305685&is=REG&kw=DIDCB6006&BI=583'>
</link>
<link rel='self' type='application/atom+xml' href='http://www.google.com/base/feeds/snippets/3128608193804768644'>
</link>
<author>
<name>B&H Photo-Video</name>
<email>anon-szot0wdsq0at@base.google.com</email>
</author>
<g:weight type='float'>0.3</g:weight>
<g:manufacturer_id type='text'>DCB6006</g:manufacturer_id>
<g:image_link type='url'>http://base.google.com/base_image?q=http%3A%2F%2Fwww.bhphotovideo.com%2Fimages%2Fitems%2F305685.jpg&dhm=72f0ca0a&size=6</g:image_link>
<g:location type='location'>420 9th Ave. 10001</g:location>
<g:payment_notes type='text'>PayPal & Bill Me Later credit available online only.</g:payment_notes>
<g:item_type type='text'>Products</g:item_type>
<g:target_country type='text'>US</g:target_country>
<g:accessory_for type='text'>digital kodak camera</g:accessory_for>
<g:brand type='text'>Digital Camera Battery</g:brand>
<g:expiration_date type='dateTime'>2007-03-10T02:21:27.000Z</g:expiration_date>
<g:item_language type='text'>EN</g:item_language>
<g:condition type='text'>new</g:condition>
<g:price type='floatUnit'>34.95 usd</g:price>
<g:customer_id type='int'>1172711</g:customer_id>
<g:product_type type='text'>Digital Photography>Camera Connecting Cables</g:product_type>
<g:id type='text'>305685-REG</g:id>
</entry>
</feed>"""
EXTENSION_TREE = """<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<g:author xmlns:g="http://www.google.com">
<g:name>John Doe
<g:foo yes="no" up="down">Bar</g:foo>
</g:name>
</g:author>
</feed>
"""
TEST_AUTHOR = """<?xml version="1.0" encoding="utf-8"?>
<author xmlns="http://www.w3.org/2005/Atom">
<name xmlns="http://www.w3.org/2005/Atom">John Doe</name>
<email xmlns="http://www.w3.org/2005/Atom">johndoes@someemailadress.com</email>
<uri xmlns="http://www.w3.org/2005/Atom">http://www.google.com</uri>
</author>
"""
TEST_LINK = """<?xml version="1.0" encoding="utf-8"?>
<link xmlns="http://www.w3.org/2005/Atom" href="http://www.google.com"
rel="test rel" foo1="bar" foo2="rab"/>
"""
TEST_GBASE_ATTRIBUTE = """<?xml version="1.0" encoding="utf-8"?>
<g:brand type='text' xmlns:g="http://base.google.com/ns/1.0">Digital Camera Battery</g:brand>
"""
CALENDAR_FEED = """<?xml version='1.0' encoding='utf-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
xmlns:gd='http://schemas.google.com/g/2005'
xmlns:gCal='http://schemas.google.com/gCal/2005'>
<id>http://www.google.com/calendar/feeds/default</id>
<updated>2007-03-20T22:48:57.833Z</updated>
<title type='text'>GData Ops Demo's Calendar List</title>
<link rel='http://schemas.google.com/g/2005#feed'
type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default'></link>
<link rel='http://schemas.google.com/g/2005#post'
type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default'></link>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default'></link>
<author>
<name>GData Ops Demo</name>
<email>gdata.ops.demo@gmail.com</email>
</author>
<generator version='1.0' uri='http://www.google.com/calendar'>
Google Calendar</generator>
<openSearch:startIndex>1</openSearch:startIndex>
<entry>
<id>
http://www.google.com/calendar/feeds/default/gdata.ops.demo%40gmail.com</id>
<published>2007-03-20T22:48:57.837Z</published>
<updated>2007-03-20T22:48:52.000Z</updated>
<title type='text'>GData Ops Demo</title>
<link rel='alternate' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/gdata.ops.demo%40gmail.com/private/full'>
</link>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/gdata.ops.demo%40gmail.com'>
</link>
<author>
<name>GData Ops Demo</name>
<email>gdata.ops.demo@gmail.com</email>
</author>
<gCal:color value='#2952A3'></gCal:color>
<gCal:accesslevel value='owner'></gCal:accesslevel>
<gCal:hidden value='false'></gCal:hidden>
<gCal:timezone value='America/Los_Angeles'></gCal:timezone>
</entry>
<entry>
<id>
http://www.google.com/calendar/feeds/default/jnh21ovnjgfph21h32gvms2758%40group.calendar.google.com</id>
<published>2007-03-20T22:48:57.837Z</published>
<updated>2007-03-20T22:48:53.000Z</updated>
<title type='text'>GData Ops Demo Secondary Calendar</title>
<summary type='text'></summary>
<link rel='alternate' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/jnh21ovnjgfph21h32gvms2758%40group.calendar.google.com/private/full'>
</link>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/jnh21ovnjgfph21h32gvms2758%40group.calendar.google.com'>
</link>
<author>
<name>GData Ops Demo Secondary Calendar</name>
</author>
<gCal:color value='#528800'></gCal:color>
<gCal:accesslevel value='owner'></gCal:accesslevel>
<gCal:hidden value='false'></gCal:hidden>
<gCal:timezone value='America/Los_Angeles'></gCal:timezone>
<gd:where valueString=''></gd:where>
</entry>
</feed>
"""
CALENDAR_FULL_EVENT_FEED = """<?xml version='1.0' encoding='utf-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
xmlns:gd='http://schemas.google.com/g/2005'
xmlns:gCal='http://schemas.google.com/gCal/2005'>
<id>
http://www.google.com/calendar/feeds/default/private/full</id>
<updated>2007-03-20T21:29:57.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/g/2005#event'></category>
<title type='text'>GData Ops Demo</title>
<subtitle type='text'>GData Ops Demo</subtitle>
<link rel='http://schemas.google.com/g/2005#feed'
type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full'>
</link>
<link rel='http://schemas.google.com/g/2005#post'
type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full'>
</link>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full?updated-min=2001-01-01&max-results=25'>
</link>
<author>
<name>GData Ops Demo</name>
<email>gdata.ops.demo@gmail.com</email>
</author>
<generator version='1.0' uri='http://www.google.com/calendar'>
Google Calendar</generator>
<openSearch:totalResults>10</openSearch:totalResults>
<openSearch:startIndex>1</openSearch:startIndex>
<openSearch:itemsPerPage>25</openSearch:itemsPerPage>
<gCal:timezone value='America/Los_Angeles'></gCal:timezone>
<entry>
<id>
http://www.google.com/calendar/feeds/default/private/full/o99flmgmkfkfrr8u745ghr3100</id>
<published>2007-03-20T21:29:52.000Z</published>
<updated>2007-03-20T21:29:57.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/g/2005#event'></category>
<title type='text'>test deleted</title>
<content type='text'></content>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=bzk5ZmxtZ21rZmtmcnI4dTc0NWdocjMxMDAgZ2RhdGEub3BzLmRlbW9AbQ'
title='alternate'></link>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/o99flmgmkfkfrr8u745ghr3100'>
</link>
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/o99flmgmkfkfrr8u745ghr3100/63310109397'>
</link>
<author>
<name>GData Ops Demo</name>
<email>gdata.ops.demo@gmail.com</email>
</author>
<gCal:sendEventNotifications value='false'>
</gCal:sendEventNotifications>
<gd:eventStatus value='http://schemas.google.com/g/2005#event.canceled'>
</gd:eventStatus>
<gd:comments>
<gd:feedLink href='http://www.google.com/calendar/feeds/default/private/full/o99flmgmkfkfrr8u745ghr3100/comments'>
</gd:feedLink>
</gd:comments>
<gd:visibility value='http://schemas.google.com/g/2005#event.default'>
</gd:visibility>
<gd:transparency value='http://schemas.google.com/g/2005#event.opaque'>
</gd:transparency>
<gd:when startTime='2007-03-23T12:00:00.000-07:00'
endTime='2007-03-23T13:00:00.000-07:00'>
<gd:reminder minutes='10'></gd:reminder>
</gd:when>
<gd:where></gd:where>
</entry>
<entry>
<id>
http://www.google.com/calendar/feeds/default/private/full/2qt3ao5hbaq7m9igr5ak9esjo0</id>
<published>2007-03-20T21:26:04.000Z</published>
<updated>2007-03-20T21:28:46.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/g/2005#event'></category>
<title type='text'>Afternoon at Dolores Park with Kim</title>
<content type='text'></content>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=MnF0M2FvNWhiYXE3bTlpZ3I1YWs5ZXNqbzAgZ2RhdGEub3BzLmRlbW9AbQ'
title='alternate'></link>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/2qt3ao5hbaq7m9igr5ak9esjo0'>
</link>
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/2qt3ao5hbaq7m9igr5ak9esjo0/63310109326'>
</link>
<author>
<name>GData Ops Demo</name>
<email>gdata.ops.demo@gmail.com</email>
</author>
<gCal:sendEventNotifications value='false'>
</gCal:sendEventNotifications>
<gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'>
</gd:eventStatus>
<gd:comments>
<gd:feedLink href='http://www.google.com/calendar/feeds/default/private/full/2qt3ao5hbaq7m9igr5ak9esjo0/comments'>
</gd:feedLink>
</gd:comments>
<gd:visibility value='http://schemas.google.com/g/2005#event.private'>
</gd:visibility>
<gd:transparency value='http://schemas.google.com/g/2005#event.opaque'>
</gd:transparency>
<gd:who rel='http://schemas.google.com/g/2005#event.organizer'
valueString='GData Ops Demo' email='gdata.ops.demo@gmail.com'>
<gd:attendeeStatus value='http://schemas.google.com/g/2005#event.accepted'>
</gd:attendeeStatus>
</gd:who>
<gd:who rel='http://schemas.google.com/g/2005#event.attendee'
valueString='Ryan Boyd (API)' email='api.rboyd@gmail.com'>
<gd:attendeeStatus value='http://schemas.google.com/g/2005#event.invited'>
</gd:attendeeStatus>
</gd:who>
<gd:when startTime='2007-03-24T12:00:00.000-07:00'
endTime='2007-03-24T15:00:00.000-07:00'>
<gd:reminder minutes='20'></gd:reminder>
</gd:when>
<gd:where valueString='Dolores Park with Kim'></gd:where>
</entry>
<entry>
<id>
http://www.google.com/calendar/feeds/default/private/full/uvsqhg7klnae40v50vihr1pvos</id>
<published>2007-03-20T21:28:37.000Z</published>
<updated>2007-03-20T21:28:37.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/g/2005#event'></category>
<title type='text'>Team meeting</title>
<content type='text'></content>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=dXZzcWhnN2tsbmFlNDB2NTB2aWhyMXB2b3NfMjAwNzAzMjNUMTYwMDAwWiBnZGF0YS5vcHMuZGVtb0Bt'
title='alternate'></link>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/uvsqhg7klnae40v50vihr1pvos'>
</link>
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/uvsqhg7klnae40v50vihr1pvos/63310109317'>
</link>
<author>
<name>GData Ops Demo</name>
<email>gdata.ops.demo@gmail.com</email>
</author>
<gd:recurrence>DTSTART;TZID=America/Los_Angeles:20070323T090000
DTEND;TZID=America/Los_Angeles:20070323T100000
RRULE:FREQ=WEEKLY;BYDAY=FR;UNTIL=20070817T160000Z;WKST=SU
BEGIN:VTIMEZONE TZID:America/Los_Angeles
X-LIC-LOCATION:America/Los_Angeles BEGIN:STANDARD
TZOFFSETFROM:-0700 TZOFFSETTO:-0800 TZNAME:PST
DTSTART:19701025T020000 RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD BEGIN:DAYLIGHT TZOFFSETFROM:-0800 TZOFFSETTO:-0700
TZNAME:PDT DTSTART:19700405T020000
RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU END:DAYLIGHT
END:VTIMEZONE</gd:recurrence>
<gCal:sendEventNotifications value='true'>
</gCal:sendEventNotifications>
<gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'>
</gd:eventStatus>
<gd:visibility value='http://schemas.google.com/g/2005#event.public'>
</gd:visibility>
<gd:transparency value='http://schemas.google.com/g/2005#event.opaque'>
</gd:transparency>
<gd:reminder minutes='10'></gd:reminder>
<gd:where valueString=''></gd:where>
</entry>
<entry>
<id>
http://www.google.com/calendar/feeds/default/private/full/st4vk9kiffs6rasrl32e4a7alo</id>
<published>2007-03-20T21:25:46.000Z</published>
<updated>2007-03-20T21:25:46.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/g/2005#event'></category>
<title type='text'>Movie with Kim and danah</title>
<content type='text'></content>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=c3Q0dms5a2lmZnM2cmFzcmwzMmU0YTdhbG8gZ2RhdGEub3BzLmRlbW9AbQ'
title='alternate'></link>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/st4vk9kiffs6rasrl32e4a7alo'>
</link>
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/st4vk9kiffs6rasrl32e4a7alo/63310109146'>
</link>
<author>
<name>GData Ops Demo</name>
<email>gdata.ops.demo@gmail.com</email>
</author>
<gCal:sendEventNotifications value='false'>
</gCal:sendEventNotifications>
<gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'>
</gd:eventStatus>
<gd:comments>
<gd:feedLink href='http://www.google.com/calendar/feeds/default/private/full/st4vk9kiffs6rasrl32e4a7alo/comments'>
</gd:feedLink>
</gd:comments>
<gd:visibility value='http://schemas.google.com/g/2005#event.default'>
</gd:visibility>
<gd:transparency value='http://schemas.google.com/g/2005#event.opaque'>
</gd:transparency>
<gd:when startTime='2007-03-24T20:00:00.000-07:00'
endTime='2007-03-24T21:00:00.000-07:00'>
<gd:reminder minutes='10'></gd:reminder>
</gd:when>
<gd:where></gd:where>
</entry>
<entry>
<id>
http://www.google.com/calendar/feeds/default/private/full/ofl1e45ubtsoh6gtu127cls2oo</id>
<published>2007-03-20T21:24:43.000Z</published>
<updated>2007-03-20T21:25:08.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/g/2005#event'></category>
<title type='text'>Dinner with Kim and Sarah</title>
<content type='text'></content>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=b2ZsMWU0NXVidHNvaDZndHUxMjdjbHMyb28gZ2RhdGEub3BzLmRlbW9AbQ'
title='alternate'></link>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/ofl1e45ubtsoh6gtu127cls2oo'>
</link>
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/ofl1e45ubtsoh6gtu127cls2oo/63310109108'>
</link>
<author>
<name>GData Ops Demo</name>
<email>gdata.ops.demo@gmail.com</email>
</author>
<gCal:sendEventNotifications value='false'>
</gCal:sendEventNotifications>
<gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'>
</gd:eventStatus>
<gd:comments>
<gd:feedLink href='http://www.google.com/calendar/feeds/default/private/full/ofl1e45ubtsoh6gtu127cls2oo/comments'>
</gd:feedLink>
</gd:comments>
<gd:visibility value='http://schemas.google.com/g/2005#event.default'>
</gd:visibility>
<gd:transparency value='http://schemas.google.com/g/2005#event.opaque'>
</gd:transparency>
<gd:when startTime='2007-03-20T19:00:00.000-07:00'
endTime='2007-03-20T21:30:00.000-07:00'>
<gd:reminder minutes='10'></gd:reminder>
</gd:when>
<gd:where></gd:where>
</entry>
<entry>
<id>
http://www.google.com/calendar/feeds/default/private/full/b69s2avfi2joigsclecvjlc91g</id>
<published>2007-03-20T21:24:19.000Z</published>
<updated>2007-03-20T21:25:05.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/g/2005#event'></category>
<title type='text'>Dinner with Jane and John</title>
<content type='text'></content>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=YjY5czJhdmZpMmpvaWdzY2xlY3ZqbGM5MWcgZ2RhdGEub3BzLmRlbW9AbQ'
title='alternate'></link>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/b69s2avfi2joigsclecvjlc91g'>
</link>
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/b69s2avfi2joigsclecvjlc91g/63310109105'>
</link>
<author>
<name>GData Ops Demo</name>
<email>gdata.ops.demo@gmail.com</email>
</author>
<gCal:sendEventNotifications value='false'>
</gCal:sendEventNotifications>
<gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'>
</gd:eventStatus>
<gd:comments>
<gd:feedLink href='http://www.google.com/calendar/feeds/default/private/full/b69s2avfi2joigsclecvjlc91g/comments'>
</gd:feedLink>
</gd:comments>
<gd:visibility value='http://schemas.google.com/g/2005#event.default'>
</gd:visibility>
<gd:transparency value='http://schemas.google.com/g/2005#event.opaque'>
</gd:transparency>
<gd:when startTime='2007-03-22T17:00:00.000-07:00'
endTime='2007-03-22T19:30:00.000-07:00'>
<gd:reminder minutes='10'></gd:reminder>
</gd:when>
<gd:where></gd:where>
</entry>
<entry>
<id>
http://www.google.com/calendar/feeds/default/private/full/u9p66kkiotn8bqh9k7j4rcnjjc</id>
<published>2007-03-20T21:24:33.000Z</published>
<updated>2007-03-20T21:24:33.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/g/2005#event'></category>
<title type='text'>Tennis with Elizabeth</title>
<content type='text'></content>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=dTlwNjZra2lvdG44YnFoOWs3ajRyY25qamMgZ2RhdGEub3BzLmRlbW9AbQ'
title='alternate'></link>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/u9p66kkiotn8bqh9k7j4rcnjjc'>
</link>
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/u9p66kkiotn8bqh9k7j4rcnjjc/63310109073'>
</link>
<author>
<name>GData Ops Demo</name>
<email>gdata.ops.demo@gmail.com</email>
</author>
<gCal:sendEventNotifications value='false'>
</gCal:sendEventNotifications>
<gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'>
</gd:eventStatus>
<gd:comments>
<gd:feedLink href='http://www.google.com/calendar/feeds/default/private/full/u9p66kkiotn8bqh9k7j4rcnjjc/comments'>
</gd:feedLink>
</gd:comments>
<gd:visibility value='http://schemas.google.com/g/2005#event.default'>
</gd:visibility>
<gd:transparency value='http://schemas.google.com/g/2005#event.opaque'>
</gd:transparency>
<gd:when startTime='2007-03-24T10:00:00.000-07:00'
endTime='2007-03-24T11:00:00.000-07:00'>
<gd:reminder minutes='10'></gd:reminder>
</gd:when>
<gd:where></gd:where>
</entry>
<entry>
<id>
http://www.google.com/calendar/feeds/default/private/full/76oj2kceidob3s708tvfnuaq3c</id>
<published>2007-03-20T21:24:00.000Z</published>
<updated>2007-03-20T21:24:00.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/g/2005#event'></category>
<title type='text'>Lunch with Jenn</title>
<content type='text'></content>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=NzZvajJrY2VpZG9iM3M3MDh0dmZudWFxM2MgZ2RhdGEub3BzLmRlbW9AbQ'
title='alternate'></link>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/76oj2kceidob3s708tvfnuaq3c'>
</link>
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/76oj2kceidob3s708tvfnuaq3c/63310109040'>
</link>
<author>
<name>GData Ops Demo</name>
<email>gdata.ops.demo@gmail.com</email>
</author>
<gCal:sendEventNotifications value='false'>
</gCal:sendEventNotifications>
<gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'>
</gd:eventStatus>
<gd:comments>
<gd:feedLink href='http://www.google.com/calendar/feeds/default/private/full/76oj2kceidob3s708tvfnuaq3c/comments'>
</gd:feedLink>
</gd:comments>
<gd:visibility value='http://schemas.google.com/g/2005#event.default'>
</gd:visibility>
<gd:transparency value='http://schemas.google.com/g/2005#event.opaque'>
</gd:transparency>
<gd:when startTime='2007-03-20T11:30:00.000-07:00'
endTime='2007-03-20T12:30:00.000-07:00'>
<gd:reminder minutes='10'></gd:reminder>
</gd:when>
<gd:where></gd:where>
</entry>
<entry>
<id>
http://www.google.com/calendar/feeds/default/private/full/5np9ec8m7uoauk1vedh5mhodco</id>
<published>2007-03-20T07:50:02.000Z</published>
<updated>2007-03-20T20:39:26.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/g/2005#event'></category>
<title type='text'>test entry</title>
<content type='text'>test desc</content>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=NW5wOWVjOG03dW9hdWsxdmVkaDVtaG9kY28gZ2RhdGEub3BzLmRlbW9AbQ'
title='alternate'></link>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/5np9ec8m7uoauk1vedh5mhodco'>
</link>
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/5np9ec8m7uoauk1vedh5mhodco/63310106366'>
</link>
<author>
<name>GData Ops Demo</name>
<email>gdata.ops.demo@gmail.com</email>
</author>
<gCal:sendEventNotifications value='false'>
</gCal:sendEventNotifications>
<gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'>
</gd:eventStatus>
<gd:comments>
<gd:feedLink href='http://www.google.com/calendar/feeds/default/private/full/5np9ec8m7uoauk1vedh5mhodco/comments'>
</gd:feedLink>
</gd:comments>
<gd:visibility value='http://schemas.google.com/g/2005#event.private'>
</gd:visibility>
<gd:transparency value='http://schemas.google.com/g/2005#event.opaque'>
</gd:transparency>
<gd:who rel='http://schemas.google.com/g/2005#event.attendee'
valueString='Vivian Li' email='vli@google.com'>
<gd:attendeeStatus value='http://schemas.google.com/g/2005#event.declined'>
</gd:attendeeStatus>
</gd:who>
<gd:who rel='http://schemas.google.com/g/2005#event.organizer'
valueString='GData Ops Demo' email='gdata.ops.demo@gmail.com'>
<gd:attendeeStatus value='http://schemas.google.com/g/2005#event.accepted'>
</gd:attendeeStatus>
</gd:who>
<gd:when startTime='2007-03-21T08:00:00.000-07:00'
endTime='2007-03-21T09:00:00.000-07:00'>
<gd:reminder minutes='10'></gd:reminder>
</gd:when>
<gd:where valueString='anywhere'></gd:where>
</entry>
<entry>
<id>
http://www.google.com/calendar/feeds/default/private/full/fu6sl0rqakf3o0a13oo1i1a1mg</id>
<published>2007-02-14T23:23:37.000Z</published>
<updated>2007-02-14T23:25:30.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/g/2005#event'></category>
<title type='text'>test</title>
<content type='text'></content>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=ZnU2c2wwcnFha2YzbzBhMTNvbzFpMWExbWcgZ2RhdGEub3BzLmRlbW9AbQ'
title='alternate'></link>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/fu6sl0rqakf3o0a13oo1i1a1mg'>
</link>
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/fu6sl0rqakf3o0a13oo1i1a1mg/63307178730'>
</link>
<link rel="http://schemas.google.com/gCal/2005/webContent" title="World Cup" href="http://www.google.com/calendar/images/google-holiday.gif" type="image/gif">
<gCal:webContent width="276" height="120" url="http://www.google.com/logos/worldcup06.gif" />
</link>
<author>
<name>GData Ops Demo</name>
<email>gdata.ops.demo@gmail.com</email>
</author>
<gCal:sendEventNotifications value='false'>
</gCal:sendEventNotifications>
<gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'>
</gd:eventStatus>
<gd:comments>
<gd:feedLink href='http://www.google.com/calendar/feeds/default/private/full/fu6sl0rqakf3o0a13oo1i1a1mg/comments'>
</gd:feedLink>
</gd:comments>
<gd:visibility value='http://schemas.google.com/g/2005#event.default'>
</gd:visibility>
<gd:transparency value='http://schemas.google.com/g/2005#event.opaque'>
</gd:transparency>
<gd:when startTime='2007-02-15T08:30:00.000-08:00'
endTime='2007-02-15T09:30:00.000-08:00'>
<gd:reminder minutes='10'></gd:reminder>
</gd:when>
<gd:where></gd:where>
</entry>
<entry>
<id>
http://www.google.com/calendar/feeds/default/private/full/h7a0haa4da8sil3rr19ia6luvc</id>
<published>2007-07-16T22:13:28.000Z</published>
<updated>2007-07-16T22:13:29.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/g/2005#event' />
<title type='text'></title>
<content type='text' />
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=aDdhMGhhYTRkYThzaWwzcnIxOWlhNmx1dmMgZ2RhdGEub3BzLmRlbW9AbQ'
title='alternate' />
<link rel='http://schemas.google.com/gCal/2005/webContent'
type='application/x-google-gadgets+xml'
href='http://gdata.ops.demo.googlepages.com/birthdayicon.gif'
title='Date and Time Gadget'>
<gCal:webContent width='300' height='136'
url='http://google.com/ig/modules/datetime.xml'>
<gCal:webContentGadgetPref name='color' value='green' />
</gCal:webContent>
</link>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/h7a0haa4da8sil3rr19ia6luvc' />
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/h7a0haa4da8sil3rr19ia6luvc/63320307209' />
<author>
<name>GData Ops Demo</name>
<email>gdata.ops.demo@gmail.com</email>
</author>
<gd:comments>
<gd:feedLink href='http://www.google.com/calendar/feeds/default/private/full/h7a0haa4da8sil3rr19ia6luvc/comments' />
</gd:comments>
<gCal:sendEventNotifications value='false'>
</gCal:sendEventNotifications>
<gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed' />
<gd:visibility value='http://schemas.google.com/g/2005#event.default' />
<gd:transparency value='http://schemas.google.com/g/2005#event.opaque' />
<gd:when startTime='2007-03-14' endTime='2007-03-15' />
<gd:where />
</entry>
</feed>
"""
CALENDAR_BATCH_REQUEST = """<?xml version='1.0' encoding='utf-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
xmlns:batch='http://schemas.google.com/gdata/batch'
xmlns:gCal='http://schemas.google.com/gCal/2005'>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event' />
<entry>
<batch:id>1</batch:id>
<batch:operation type='insert' />
<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event' />
<title type='text'>Event inserted via batch</title>
</entry>
<entry>
<batch:id>2</batch:id>
<batch:operation type='query' />
<id>http://www.google.com/calendar/feeds/default/private/full/glcs0kv2qqa0gf52qi1jo018gc</id>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event' />
<title type='text'>Event queried via batch</title>
</entry>
<entry>
<batch:id>3</batch:id>
<batch:operation type='update' />
<id>http://www.google.com/calendar/feeds/default/private/full/ujm0go5dtngdkr6u91dcqvj0qs</id>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event' />
<title type='text'>Event updated via batch</title>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=dWptMGdvNWR0bmdka3I2dTkxZGNxdmowcXMgaGFyaXNodi50ZXN0QG0' title='alternate' />
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/ujm0go5dtngdkr6u91dcqvj0qs' />
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/ujm0go5dtngdkr6u91dcqvj0qs/63326098791' />
</entry>
<entry>
<batch:id>4</batch:id>
<batch:operation type='delete' />
<id>http://www.google.com/calendar/feeds/default/private/full/d8qbg9egk1n6lhsgq1sjbqffqc</id>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event' />
<title type='text'>Event deleted via batch</title>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=ZDhxYmc5ZWdrMW42bGhzZ3Exc2picWZmcWMgaGFyaXNodi50ZXN0QG0' title='alternate' />
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/d8qbg9egk1n6lhsgq1sjbqffqc' />
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/d8qbg9egk1n6lhsgq1sjbqffqc/63326018324' />
</entry>
</feed>
"""
CALENDAR_BATCH_RESPONSE = """<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
xmlns:batch='http://schemas.google.com/gdata/batch'
xmlns:gCal='http://schemas.google.com/gCal/2005'>
<id>http://www.google.com/calendar/feeds/default/private/full</id>
<updated>2007-09-21T23:01:00.380Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event'></category>
<title type='text'>Batch Feed</title>
<link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full' />
<link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full' />
<link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/batch' />
<entry>
<batch:id>1</batch:id>
<batch:status code='201' reason='Created' />
<batch:operation type='insert' />
<id>http://www.google.com/calendar/feeds/default/private/full/n9ug78gd9tv53ppn4hdjvk68ek</id>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event' />
<title type='text'>Event inserted via batch</title>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=bjl1Zzc4Z2Q5dHY1M3BwbjRoZGp2azY4ZWsgaGFyaXNodi50ZXN0QG0' title='alternate' />
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/n9ug78gd9tv53ppn4hdjvk68ek' />
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/n9ug78gd9tv53ppn4hdjvk68ek/63326098860' />
</entry>
<entry>
<batch:id>2</batch:id>
<batch:status code='200' reason='Success' />
<batch:operation type='query' />
<id>http://www.google.com/calendar/feeds/default/private/full/glsc0kv2aqa0ff52qi1jo018gc</id>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event' />
<title type='text'>Event queried via batch</title>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=Z2xzYzBrdjJhcWEwZmY1MnFpMWpvMDE4Z2MgaGFyaXNodi50ZXN0QG0' title='alternate' />
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/glsc0kv2aqa0ff52qi1jo018gc' />
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/glsc0kv2aqa0ff52qi1jo018gc/63326098791' />
</entry>
<entry xmlns:gCal='http://schemas.google.com/gCal/2005'>
<batch:id>3</batch:id>
<batch:status code='200' reason='Success' />
<batch:operation type='update' />
<id>http://www.google.com/calendar/feeds/default/private/full/ujm0go5dtngdkr6u91dcqvj0qs</id>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event' />
<title type='text'>Event updated via batch</title>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=dWptMGdvNWR0bmdka3I2dTkxZGNxdmowcXMgaGFyaXNodi50ZXN0QG0' title='alternate' />
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/ujm0go5dtngdkr6u91dcqvj0qs' />
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/full/ujm0go5dtngdkr6u91dcqvj0qs/63326098860' />
<batch:id>3</batch:id>
<batch:status code='200' reason='Success' />
<batch:operation type='update' />
</entry>
<entry>
<batch:id>4</batch:id>
<batch:status code='200' reason='Success' />
<batch:operation type='delete' />
<id>http://www.google.com/calendar/feeds/default/private/full/d8qbg9egk1n6lhsgq1sjbqffqc</id>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event' />
<title type='text'>Event deleted via batch</title>
<content type='text'>Deleted</content>
</entry>
</feed>
"""
GBASE_ATTRIBUTE_FEED = """<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:gm='http://base.google.com/ns-metadata/1.0'>
<id>http://www.google.com/base/feeds/attributes</id>
<updated>2006-11-01T20:35:59.578Z</updated>
<category scheme='http://base.google.com/categories/itemtypes' term='online jobs'></category>
<category scheme='http://base.google.com/categories/itemtypes' term='jobs'></category>
<title type='text'>Attribute histogram for query: [item type:jobs]</title>
<link rel='alternate' type='text/html' href='http://base.google.com'></link>
<link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.google.com/base/feeds
/attributes'></link>
<link rel='self' type='application/atom+xml' href='http://www.google.com/base/feeds/attributes/-/jobs'></link>
<generator version='1.0' uri='http://base.google.com'>GoogleBase</generator>
<openSearch:totalResults>16</openSearch:totalResults>
<openSearch:startIndex>1</openSearch:startIndex>
<openSearch:itemsPerPage>16</openSearch:itemsPerPage>
<entry>
<id>http://www.google.com/base/feeds/attributes/job+industry%28text%29N%5Bitem+type%3Ajobs%5D</id>
<updated>2006-11-01T20:36:00.100Z</updated>
<title type='text'>job industry(text)</title>
<content type='text'>Attribute"job industry" of type text.
</content>
<link rel='self' type='application/atom+xml' href='http://www.google.com/base/feeds/attributes/job+industry%28text
%29N%5Bitem+type%3Ajobs%5D'></link>
<gm:attribute name='job industry' type='text' count='4416629'>
<gm:value count='380772'>it internet</gm:value>
<gm:value count='261565'>healthcare</gm:value>
<gm:value count='142018'>information technology</gm:value>
<gm:value count='124622'>accounting</gm:value>
<gm:value count='111311'>clerical and administrative</gm:value>
<gm:value count='82928'>other</gm:value>
<gm:value count='77620'>sales and sales management</gm:value>
<gm:value count='68764'>information systems</gm:value>
<gm:value count='65859'>engineering and architecture</gm:value>
<gm:value count='64757'>sales</gm:value>
</gm:attribute>
</entry>
</feed>
"""
GBASE_ATTRIBUTE_ENTRY = """<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:gm='http://base.google.com/ns-metadata/1.0'>
<id>http://www.google.com/base/feeds/attributes/job+industry%28text%29N%5Bitem+type%3Ajobs%5D</id>
<updated>2006-11-01T20:36:00.100Z</updated>
<title type='text'>job industry(text)</title>
<content type='text'>Attribute"job industry" of type text.
</content>
<link rel='self' type='application/atom+xml' href='http://www.google.com/base/feeds/attributes/job+industry%28text%29N%5Bitem+type%3Ajobs%5D'></link>
<gm:attribute name='job industry' type='text' count='4416629'>
<gm:value count='380772'>it internet</gm:value>
<gm:value count='261565'>healthcare</gm:value>
<gm:value count='142018'>information technology</gm:value>
<gm:value count='124622'>accounting</gm:value>
<gm:value count='111311'>clerical and administrative</gm:value>
<gm:value count='82928'>other</gm:value>
<gm:value count='77620'>sales and sales management</gm:value>
<gm:value count='68764'>information systems</gm:value>
<gm:value count='65859'>engineering and architecture</gm:value>
<gm:value count='64757'>sales</gm:value>
</gm:attribute>
</entry>
"""
GBASE_LOCALES_FEED = """<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
xmlns:gm='http://base.google.com/ns-metadata/1.0'>
<id> http://www.google.com/base/feeds/locales/</id>
<updated>2006-06-13T18:11:40.120Z</updated>
<title type="text">Locales</title>
<link rel="alternate" type="text/html" href="http://base.google.com"/>
<link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"
href="http://www.google.com/base/feeds/locales/"/>
<link rel="self" type="application/atom+xml" href="http://www.google.com/base/feeds/locales/"/>
<author>
<name>Google Inc.</name>
<email>base@google.com</email>
</author>
<generator version="1.0" uri="http://base.google.com">GoogleBase</generator>
<openSearch:totalResults>3</openSearch:totalResults>
<openSearch:itemsPerPage>25</openSearch:itemsPerPage>
<entry>
<id>http://www.google.com/base/feeds/locales/en_US</id>
<updated>2006-03-27T22:27:36.658Z</updated>
<category scheme="http://base.google.com/categories/locales" term="en_US"/>
<title type="text">en_US</title>
<content type="text">en_US</content>
<link rel="self" type="application/atom+xml"
href="http://www.google.com/base/feeds/locales/en_US"></link>
<link rel="related" type="application/atom+xml"
href="http://www.google.com/base/feeds/itemtypes/en_US" title="Item types in en_US"/>
</entry>
<entry>
<id>http://www.google.com/base/feeds/locales/en_GB</id>
<updated>2006-06-13T18:14:18.601Z</updated>
<category scheme="http://base.google.com/categories/locales" term="en_GB"/>
<title type="text">en_GB</title>
<content type="text">en_GB</content>
<link rel="related" type="application/atom+xml"
href="http://www.google.com/base/feeds/itemtypes/en_GB" title="Item types in en_GB"/>
<link rel="self" type="application/atom+xml"
href="http://www.google.com/base/feeds/locales/en_GB"/>
</entry>
<entry>
<id>http://www.google.com/base/feeds/locales/de_DE</id>
<updated>2006-06-13T18:14:18.601Z</updated>
<category scheme="http://base.google.com/categories/locales" term="de_DE"/>
<title type="text">de_DE</title>
<content type="text">de_DE</content>
<link rel="related" type="application/atom+xml"
href="http://www.google.com/base/feeds/itemtypes/de_DE" title="Item types in de_DE"/>
<link rel="self" type="application/atom+xml"
href="http://www.google.com/base/feeds/locales/de_DE"/>
</entry>
</feed>"""
GBASE_STRING_ENCODING_ENTRY = """<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gm='http://base.google.com/ns-metadata/1.0'
xmlns:g='http://base.google.com/ns/1.0' xmlns:batch='http://schemas.google.com/gdata/batch'>
<id>http://www.google.com/base/feeds/snippets/17495780256183230088</id>
<published>2007-12-09T03:13:07.000Z</published>
<updated>2008-01-07T03:26:46.000Z</updated>
<category scheme='http://base.google.com/categories/itemtypes' term='Products'/>
<title type='text'>Digital Camera Cord Fits SONY Cybershot DSC-R1 S40</title>
<content type='html'>SONY \xC2\xB7 Cybershot Digital Camera Usb Cable DESCRIPTION
This is a 2.5 USB 2.0 A to Mini B (5 Pin) high quality digital camera
cable used for connecting your Sony Digital Cameras and Camcoders. Backward
Compatible with USB 2.0, 1.0 and 1.1. Fully ...</content>
<link rel='alternate' type='text/html'
href='http://adfarm.mediaplex.com/ad/ck/711-5256-8196-2?loc=http%3A%2F%2Fcgi.ebay.com%2FDigital-Camera-Cord-Fits-SONY-Cybershot-DSC-R1-S40_W0QQitemZ270195049057QQcmdZViewItem'/>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/base/feeds/snippets/17495780256183230088'/>
<author>
<name>eBay</name>
</author>
<g:item_type type='text'>Products</g:item_type>
<g:item_language type='text'>EN</g:item_language>
<g:target_country type='text'>US</g:target_country>
<g:price type='floatUnit'>0.99 usd</g:price>
<g:image_link type='url'>http://thumbs.ebaystatic.com/pict/270195049057_1.jpg</g:image_link>
<g:category type='text'>Cameras & Photo>Digital Camera Accessories>Cables</g:category>
<g:category type='text'>Cords & Connectors>USB Cables>For Other Brands</g:category>
<g:customer_id type='int'>11729</g:customer_id>
<g:id type='text'>270195049057</g:id>
<g:expiration_date type='dateTime'>2008-02-06T03:26:46Z</g:expiration_date>
</entry>"""
RECURRENCE_EXCEPTION_ENTRY = """<entry xmlns='http://www.w3.org/2005/Atom'
xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
xmlns:gd='http://schemas.google.com/g/2005'
xmlns:gCal='http://schemas.google.com/gCal/2005'>
<id>
http://www.google.com/calendar/feeds/default/private/composite/i7lgfj69mjqjgnodklif3vbm7g</id>
<published>2007-04-05T21:51:49.000Z</published>
<updated>2007-04-05T21:51:49.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/g/2005#event'></category>
<title type='text'>testDavid</title>
<content type='text'></content>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=aTdsZ2ZqNjltanFqZ25vZGtsaWYzdmJtN2dfMjAwNzA0MDNUMTgwMDAwWiBnZGF0YS5vcHMudGVzdEBt'
title='alternate'></link>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/default/private/composite/i7lgfj69mjqjgnodklif3vbm7g'>
</link>
<author>
<name>gdata ops</name>
<email>gdata.ops.test@gmail.com</email>
</author>
<gd:visibility value='http://schemas.google.com/g/2005#event.default'>
</gd:visibility>
<gCal:sendEventNotifications value='true'>
</gCal:sendEventNotifications>
<gd:transparency value='http://schemas.google.com/g/2005#event.opaque'>
</gd:transparency>
<gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'>
</gd:eventStatus>
<gd:recurrence>DTSTART;TZID=America/Anchorage:20070403T100000
DTEND;TZID=America/Anchorage:20070403T110000
RRULE:FREQ=DAILY;UNTIL=20070408T180000Z;WKST=SU
EXDATE;TZID=America/Anchorage:20070407T100000
EXDATE;TZID=America/Anchorage:20070405T100000
EXDATE;TZID=America/Anchorage:20070404T100000 BEGIN:VTIMEZONE
TZID:America/Anchorage X-LIC-LOCATION:America/Anchorage
BEGIN:STANDARD TZOFFSETFROM:-0800 TZOFFSETTO:-0900 TZNAME:AKST
DTSTART:19701025T020000 RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD BEGIN:DAYLIGHT TZOFFSETFROM:-0900 TZOFFSETTO:-0800
TZNAME:AKDT DTSTART:19700405T020000
RRULE:FREQ=YEARLY;BYMONTH=4;BYDAY=1SU END:DAYLIGHT
END:VTIMEZONE</gd:recurrence>
<gd:where valueString=''></gd:where>
<gd:reminder minutes='10'></gd:reminder>
<gd:recurrenceException specialized='true'>
<gd:entryLink>
<entry>
<id>i7lgfj69mjqjgnodklif3vbm7g_20070407T180000Z</id>
<published>2007-04-05T21:51:49.000Z</published>
<updated>2007-04-05T21:52:58.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/g/2005#event'></category>
<title type='text'>testDavid</title>
<content type='text'></content>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/event?eid=aTdsZ2ZqNjltanFqZ25vZGtsaWYzdmJtN2dfMjAwNzA0MDdUMTgwMDAwWiBnZGF0YS5vcHMudGVzdEBt'
title='alternate'></link>
<author>
<name>gdata ops</name>
<email>gdata.ops.test@gmail.com</email>
</author>
<gd:visibility value='http://schemas.google.com/g/2005#event.default'>
</gd:visibility>
<gd:originalEvent id='i7lgfj69mjqjgnodklif3vbm7g'
href='http://www.google.com/calendar/feeds/default/private/composite/i7lgfj69mjqjgnodklif3vbm7g'>
<gd:when startTime='2007-04-07T13:00:00.000-05:00'>
</gd:when>
</gd:originalEvent>
<gCal:sendEventNotifications value='false'>
</gCal:sendEventNotifications>
<gd:transparency value='http://schemas.google.com/g/2005#event.opaque'>
</gd:transparency>
<gd:eventStatus value='http://schemas.google.com/g/2005#event.canceled'>
</gd:eventStatus>
<gd:comments>
<gd:feedLink href='http://www.google.com/calendar/feeds/default/private/full/i7lgfj69mjqjgnodklif3vbm7g_20070407T180000Z/comments'>
<feed>
<updated>2007-04-05T21:54:09.285Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/g/2005#message'>
</category>
<title type='text'>Comments for: testDavid</title>
<link rel='alternate' type='text/html'
href='http://www.google.com/calendar/feeds/default/private/full/i7lgfj69mjqjgnodklif3vbm7g_20070407T180000Z/comments'
title='alternate'></link>
</feed>
</gd:feedLink>
</gd:comments>
<gd:when startTime='2007-04-07T13:00:00.000-05:00'
endTime='2007-04-07T14:00:00.000-05:00'>
<gd:reminder minutes='10'></gd:reminder>
</gd:when>
<gd:where valueString=''></gd:where>
</entry>
</gd:entryLink>
</gd:recurrenceException>
</entry>"""
NICK_ENTRY = """<?xml version="1.0" encoding="UTF-8"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:apps="http://schemas.google.com/apps/2006"
xmlns:gd="http://schemas.google.com/g/2005">
<atom:id>https://www.google.com/a/feeds/example.com/nickname/2.0/Foo</atom:id>
<atom:updated>1970-01-01T00:00:00.000Z</atom:updated>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/apps/2006#nickname'/>
<atom:title type="text">Foo</atom:title>
<atom:link rel="self" type="application/atom+xml"
href="https://www.google.com/a/feeds/example.com/nickname/2.0/Foo"/>
<atom:link rel="edit" type="application/atom+xml"
href="https://www.google.com/a/feeds/example.com/nickname/2.0/Foo"/>
<apps:nickname name="Foo"/>
<apps:login userName="TestUser"/>
</atom:entry>"""
NICK_FEED = """<?xml version="1.0" encoding="UTF-8"?>
<atom:feed xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/"
xmlns:apps="http://schemas.google.com/apps/2006">
<atom:id>
http://www.google.com/a/feeds/example.com/nickname/2.0
</atom:id>
<atom:updated>1970-01-01T00:00:00.000Z</atom:updated>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/apps/2006#nickname'/>
<atom:title type="text">Nicknames for user SusanJones</atom:title>
<atom:link rel='http://schemas.google.com/g/2005#feed'
type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/nickname/2.0"/>
<atom:link rel='http://schemas.google.com/g/2005#post'
type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/nickname/2.0"/>
<atom:link rel="self" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/nickname/2.0?username=TestUser"/>
<openSearch:startIndex>1</openSearch:startIndex>
<openSearch:itemsPerPage>2</openSearch:itemsPerPage>
<atom:entry>
<atom:id>
http://www.google.com/a/feeds/example.com/nickname/2.0/Foo
</atom:id>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/apps/2006#nickname'/>
<atom:title type="text">Foo</atom:title>
<atom:link rel="self" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/nickname/2.0/Foo"/>
<atom:link rel="edit" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/nickname/2.0/Foo"/>
<apps:nickname name="Foo"/>
<apps:login userName="TestUser"/>
</atom:entry>
<atom:entry>
<atom:id>
http://www.google.com/a/feeds/example.com/nickname/2.0/suse
</atom:id>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/apps/2006#nickname'/>
<atom:title type="text">suse</atom:title>
<atom:link rel="self" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/nickname/2.0/Bar"/>
<atom:link rel="edit" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/nickname/2.0/Bar"/>
<apps:nickname name="Bar"/>
<apps:login userName="TestUser"/>
</atom:entry>
</atom:feed>"""
USER_ENTRY = """<?xml version="1.0" encoding="UTF-8"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:apps="http://schemas.google.com/apps/2006"
xmlns:gd="http://schemas.google.com/g/2005">
<atom:id>https://www.google.com/a/feeds/example.com/user/2.0/TestUser</atom:id>
<atom:updated>1970-01-01T00:00:00.000Z</atom:updated>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/apps/2006#user'/>
<atom:title type="text">TestUser</atom:title>
<atom:link rel="self" type="application/atom+xml"
href="https://www.google.com/a/feeds/example.com/user/2.0/TestUser"/>
<atom:link rel="edit" type="application/atom+xml"
href="https://www.google.com/a/feeds/example.com/user/2.0/TestUser"/>
<apps:login userName="TestUser" password="password" suspended="false"
ipWhitelisted='false' hashFunctionName="SHA-1"/>
<apps:name familyName="Test" givenName="User"/>
<apps:quota limit="1024"/>
<gd:feedLink rel='http://schemas.google.com/apps/2006#user.nicknames'
href="https://www.google.com/a/feeds/example.com/nickname/2.0?username=Test-3121"/>
<gd:feedLink rel='http://schemas.google.com/apps/2006#user.emailLists'
href="https://www.google.com/a/feeds/example.com/emailList/2.0?recipient=testlist@example.com"/>
</atom:entry>"""
USER_FEED = """<?xml version="1.0" encoding="UTF-8"?>
<atom:feed xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:apps="http://schemas.google.com/apps/2006"
xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/"
xmlns:gd="http://schemas.google.com/g/2005">
<atom:id>
http://www.google.com/a/feeds/example.com/user/2.0
</atom:id>
<atom:updated>1970-01-01T00:00:00.000Z</atom:updated>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/apps/2006#user'/>
<atom:title type="text">Users</atom:title>
<atom:link rel="next" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/user/2.0?startUsername=john"/>
<atom:link rel='http://schemas.google.com/g/2005#feed'
type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/user/2.0"/>
<atom:link rel='http://schemas.google.com/g/2005#post'
type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/user/2.0"/>
<atom:link rel="self" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/user/2.0"/>
<openSearch:startIndex>1</openSearch:startIndex>
<atom:entry>
<atom:id>
http://www.google.com/a/feeds/example.com/user/2.0/TestUser
</atom:id>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/apps/2006#user'/>
<atom:title type="text">TestUser</atom:title>
<atom:link rel="self" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/user/2.0/TestUser"/>
<atom:link rel="edit" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/user/2.0/TestUser"/>
<gd:who rel='http://schemas.google.com/apps/2006#user.recipient'
email="TestUser@example.com"/>
<apps:login userName="TestUser" suspended="false"/>
<apps:quota limit="2048"/>
<apps:name familyName="Test" givenName="User"/>
<gd:feedLink rel='http://schemas.google.com/apps/2006#user.nicknames'
href="http://www.google.com/a/feeds/example.com/nickname/2.0?username=TestUser"/>
<gd:feedLink rel='http://schemas.google.com/apps/2006#user.emailLists'
href="http://www.google.com/a/feeds/example.com/emailList/2.0?recipient=TestUser@example.com"/>
</atom:entry>
<atom:entry>
<atom:id>
http://www.google.com/a/feeds/example.com/user/2.0/JohnSmith
</atom:id>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/apps/2006#user'/>
<atom:title type="text">JohnSmith</atom:title>
<atom:link rel="self" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/user/2.0/JohnSmith"/>
<atom:link rel="edit" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/user/2.0/JohnSmith"/>
<gd:who rel='http://schemas.google.com/apps/2006#user.recipient'
email="JohnSmith@example.com"/>
<apps:login userName="JohnSmith" suspended="false"/>
<apps:quota limit="2048"/>
<apps:name familyName="Smith" givenName="John"/>
<gd:feedLink rel='http://schemas.google.com/apps/2006#user.nicknames'
href="http://www.google.com/a/feeds/example.com/nickname/2.0?username=JohnSmith"/>
<gd:feedLink rel='http://schemas.google.com/apps/2006#user.emailLists'
href="http://www.google.com/a/feeds/example.com/emailList/2.0?recipient=JohnSmith@example.com"/>
</atom:entry>
</atom:feed>"""
EMAIL_LIST_ENTRY = """<?xml version="1.0" encoding="UTF-8"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:apps="http://schemas.google.com/apps/2006"
xmlns:gd="http://schemas.google.com/g/2005">
<atom:id>
https://www.google.com/a/feeds/example.com/emailList/2.0/testlist
</atom:id>
<atom:updated>1970-01-01T00:00:00.000Z</atom:updated>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/apps/2006#emailList'/>
<atom:title type="text">testlist</atom:title>
<atom:link rel="self" type="application/atom+xml"
href="https://www.google.com/a/feeds/example.com/emailList/2.0/testlist"/>
<atom:link rel="edit" type="application/atom+xml"
href="https://www.google.com/a/feeds/example.com/emailList/2.0/testlist"/>
<apps:emailList name="testlist"/>
<gd:feedLink rel='http://schemas.google.com/apps/2006#emailList.recipients'
href="http://www.google.com/a/feeds/example.com/emailList/2.0/testlist/recipient/"/>
</atom:entry>"""
EMAIL_LIST_FEED = """<?xml version="1.0" encoding="UTF-8"?>
<atom:feed xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/"
xmlns:apps="http://schemas.google.com/apps/2006"
xmlns:gd="http://schemas.google.com/g/2005">
<atom:id>
http://www.google.com/a/feeds/example.com/emailList/2.0
</atom:id>
<atom:updated>1970-01-01T00:00:00.000Z</atom:updated>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/apps/2006#emailList'/>
<atom:title type="text">EmailLists</atom:title>
<atom:link rel="next" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/emailList/2.0?startEmailListName=john"/>
<atom:link rel='http://schemas.google.com/g/2005#feed'
type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/emailList/2.0"/>
<atom:link rel='http://schemas.google.com/g/2005#post'
type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/emailList/2.0"/>
<atom:link rel="self" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/emailList/2.0"/>
<openSearch:startIndex>1</openSearch:startIndex>
<atom:entry>
<atom:id>
http://www.google.com/a/feeds/example.com/emailList/2.0/us-sales
</atom:id>
<atom:updated>1970-01-01T00:00:00.000Z</atom:updated>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/apps/2006#emailList'/>
<atom:title type="text">us-sales</atom:title>
<atom:link rel="self" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/emailList/2.0/us-sales"/>
<atom:link rel="edit" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/emailList/2.0/us-sales"/>
<apps:emailList name="us-sales"/>
<gd:feedLink rel='http://schemas.google.com/apps/2006#emailList.recipients'
href="http://www.google.com/a/feeds/example.com/emailList/2.0/us-sales/recipient/"/>
</atom:entry>
<atom:entry>
<atom:id>
http://www.google.com/a/feeds/example.com/emailList/2.0/us-eng
</atom:id>
<atom:updated>1970-01-01T00:00:00.000Z</atom:updated>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/apps/2006#emailList'/>
<atom:title type="text">us-eng</atom:title>
<atom:link rel="self" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/emailList/2.0/us-eng"/>
<atom:link rel="edit" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/emailList/2.0/us-eng"/>
<apps:emailList name="us-eng"/>
<gd:feedLink rel='http://schemas.google.com/apps/2006#emailList.recipients'
href="http://www.google.com/a/feeds/example.com/emailList/2.0/us-eng/recipient/"/>
</atom:entry>
</atom:feed>"""
EMAIL_LIST_RECIPIENT_ENTRY = """<?xml version="1.0" encoding="UTF-8"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:apps="http://schemas.google.com/apps/2006"
xmlns:gd="http://schemas.google.com/g/2005">
<atom:id>https://www.google.com/a/feeds/example.com/emailList/2.0/us-sales/recipient/TestUser%40example.com</atom:id>
<atom:updated>1970-01-01T00:00:00.000Z</atom:updated>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/apps/2006#emailList.recipient'/>
<atom:title type="text">TestUser</atom:title>
<atom:link rel="self" type="application/atom+xml"
href="https://www.google.com/a/feeds/example.com/emailList/2.0/us-sales/recipient/TestUser%40example.com"/>
<atom:link rel="edit" type="application/atom+xml"
href="https://www.google.com/a/feeds/example.com/emailList/2.0/us-sales/recipient/TestUser%40example.com"/>
<gd:who email="TestUser@example.com"/>
</atom:entry>"""
EMAIL_LIST_RECIPIENT_FEED = """<?xml version="1.0" encoding="UTF-8"?>
<atom:feed xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/"
xmlns:gd="http://schemas.google.com/g/2005">
<atom:id>
http://www.google.com/a/feeds/example.com/emailList/2.0/us-sales/recipient
</atom:id>
<atom:updated>1970-01-01T00:00:00.000Z</atom:updated>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/apps/2006#emailList.recipient'/>
<atom:title type="text">Recipients for email list us-sales</atom:title>
<atom:link rel="next" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/emailList/2.0/us-sales/recipient/?startRecipient=terry@example.com"/>
<atom:link rel='http://schemas.google.com/g/2005#feed'
type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/emailList/2.0/us-sales/recipient"/>
<atom:link rel='http://schemas.google.com/g/2005#post'
type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/emailList/2.0/us-sales/recipient"/>
<atom:link rel="self" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/emailList/2.0/us-sales/recipient"/>
<openSearch:startIndex>1</openSearch:startIndex>
<atom:entry>
<atom:id>
http://www.google.com/a/feeds/example.com/emailList/2.0/us-sales/recipient/joe%40example.com
</atom:id>
<atom:updated>1970-01-01T00:00:00.000Z</atom:updated>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/apps/2006#emailList.recipient'/>
<atom:title type="text">joe@example.com</atom:title>
<atom:link rel="self" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/emailList/2.0/us-sales/recipient/joe%40example.com"/>
<atom:link rel="edit" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/emailList/2.0/us-sales/recipient/joe%40example.com"/>
<gd:who email="joe@example.com"/>
</atom:entry>
<atom:entry>
<atom:id>
http://www.google.com/a/feeds/example.com/emailList/2.0/us-sales/recipient/susan%40example.com
</atom:id>
<atom:updated>1970-01-01T00:00:00.000Z</atom:updated>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/apps/2006#emailList.recipient'/>
<atom:title type="text">susan@example.com</atom:title>
<atom:link rel="self" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/emailList/2.0/us-sales/recipient/susan%40example.com"/>
<atom:link rel="edit" type="application/atom+xml"
href="http://www.google.com/a/feeds/example.com/emailList/2.0/us-sales/recipient/susan%40example.com"/>
<gd:who email="susan@example.com"/>
</atom:entry>
</atom:feed>"""
ACL_FEED = """<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
xmlns:gAcl='http://schemas.google.com/acl/2007'>
<id>http://www.google.com/calendar/feeds/liz%40gmail.com/acl/full</id>
<updated>2007-04-21T00:52:04.000Z</updated>
<title type='text'>Elizabeth Bennet's access control list</title>
<link rel='http://schemas.google.com/acl/2007#controlledObject'
type='application/atom+xml'
href='http://www.google.com/calendar/feeds/liz%40gmail.com/private/full'>
</link>
<link rel='http://schemas.google.com/g/2005#feed'
type='application/atom+xml'
href='http://www.google.com/calendar/feeds/liz%40gmail.com/acl/full'>
</link>
<link rel='http://schemas.google.com/g/2005#post'
type='application/atom+xml'
href='http://www.google.com/calendar/feeds/liz%40gmail.com/acl/full'>
</link>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/liz%40gmail.com/acl/full'>
</link>
<generator version='1.0'
uri='http://www.google.com/calendar'>Google Calendar</generator>
<openSearch:totalResults>2</openSearch:totalResults>
<openSearch:startIndex>1</openSearch:startIndex>
<entry>
<id>http://www.google.com/calendar/feeds/liz%40gmail.com/acl/full/user%3Aliz%40gmail.com</id>
<updated>2007-04-21T00:52:04.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/acl/2007#accessRule'>
</category>
<title type='text'>owner</title>
<content type='text'></content>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/liz%40gmail.com/acl/full/user%3Aliz%40gmail.com'>
</link>
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/liz%40gmail.com/acl/full/user%3Aliz%40gmail.com'>
</link>
<author>
<name>Elizabeth Bennet</name>
<email>liz@gmail.com</email>
</author>
<gAcl:scope type='user' value='liz@gmail.com'></gAcl:scope>
<gAcl:role value='http://schemas.google.com/gCal/2005#owner'>
</gAcl:role>
</entry>
<entry>
<id>http://www.google.com/calendar/feeds/liz%40gmail.com/acl/full/default</id>
<updated>2007-04-21T00:52:04.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/acl/2007#accessRule'>
</category>
<title type='text'>read</title>
<content type='text'></content>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/liz%40gmail.com/acl/full/default'>
</link>
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/liz%40gmail.com/acl/full/default'>
</link>
<author>
<name>Elizabeth Bennet</name>
<email>liz@gmail.com</email>
</author>
<gAcl:scope type='default'></gAcl:scope>
<gAcl:role value='http://schemas.google.com/gCal/2005#read'>
</gAcl:role>
</entry>
</feed>"""
ACL_ENTRY = """<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:gd='http://schemas.google.com/g/2005' xmlns:gCal='http://schemas.google.com/gCal/2005' xmlns:gAcl='http://schemas.google.com/acl/2007'>
<id>http://www.google.com/calendar/feeds/liz%40gmail.com/acl/full/user%3Aliz%40gmail.com</id>
<updated>2007-04-21T00:52:04.000Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/acl/2007#accessRule'>
</category>
<title type='text'>owner</title>
<content type='text'></content>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/liz%40gmail.com/acl/full/user%3Aliz%40gmail.com'>
</link>
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/calendar/feeds/liz%40gmail.com/acl/full/user%3Aliz%40gmail.com'>
</link>
<author>
<name>Elizabeth Bennet</name>
<email>liz@gmail.com</email>
</author>
<gAcl:scope type='user' value='liz@gmail.com'></gAcl:scope>
<gAcl:role value='http://schemas.google.com/gCal/2005#owner'>
</gAcl:role>
</entry>"""
DOCUMENT_LIST_FEED = """<?xml version='1.0' encoding='UTF-8'?>
<ns0:feed xmlns:ns0="http://www.w3.org/2005/Atom"><ns1:totalResults
xmlns:ns1="http://a9.com/-/spec/opensearchrss/1.0/">2</ns1:totalResults><ns1:startIndex
xmlns:ns1="http://a9.com/-/spec/opensearchrss/1.0/">1</ns1:startIndex><ns0:entry><ns0:content
src="http://foo.com/fm?fmcmd=102&key=supercalifragilisticexpeadocious"
type="text/html"
/><ns0:author><ns0:name>test.user</ns0:name><ns0:email>test.user@gmail.com</ns0:email></ns0:author><ns0:category
label="spreadsheet" scheme="http://schemas.google.com/g/2005#kind"
term="http://schemas.google.com/docs/2007#spreadsheet"
/><ns0:id>http://docs.google.com/feeds/documents/private/full/spreadsheet%3Asupercalifragilisticexpeadocious</ns0:id><ns0:link
href="http://foo.com/ccc?key=supercalifragilisticexpeadocious" rel="alternate"
type="text/html" /><ns0:link
href="http://foo.com/feeds/worksheets/supercalifragilisticexpeadocious/private/full"
rel="http://schemas.google.com/spreadsheets/2006#worksheetsfeed"
type="application/atom+xml" /><ns0:link
href="http://docs.google.com/feeds/documents/private/full/spreadsheet%3Asupercalifragilisticexpeadocious"
rel="self" type="application/atom+xml" /><ns0:title type="text">Test Spreadsheet</ns0:title><ns0:updated>2007-07-03T18:03:32.045Z</ns0:updated></ns0:entry><ns0:entry><ns0:content
src="http://docs.google.com/RawDocContents?action=fetch&docID=gr00vy"
type="text/html"
/><ns0:author><ns0:name>test.user</ns0:name><ns0:email>test.user@gmail.com</ns0:email></ns0:author><ns0:category
label="document" scheme="http://schemas.google.com/g/2005#kind"
term="http://schemas.google.com/docs/2007#document"
/><ns0:id>http://docs.google.com/feeds/documents/private/full/document%3Agr00vy</ns0:id><ns0:link
href="http://foobar.com/Doc?id=gr00vy" rel="alternate" type="text/html"
/><ns0:link
href="http://docs.google.com/feeds/documents/private/full/document%3Agr00vy"
rel="self" type="application/atom+xml" /><ns0:title type="text">Test Document</ns0:title><ns0:updated>2007-07-03T18:02:50.338Z</ns0:updated></ns0:entry><ns0:id>http://docs.google.com/feeds/documents/private/full</ns0:id><ns0:link
href="http://docs.google.com" rel="alternate" type="text/html" /><ns0:link
href="http://docs.google.com/feeds/documents/private/full"
rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml"
/><ns0:link href="http://docs.google.com/feeds/documents/private/full"
rel="http://schemas.google.com/g/2005#post" type="application/atom+xml"
/><ns0:link href="http://docs.google.com/feeds/documents/private/full"
rel="self" type="application/atom+xml" /><ns0:title type="text">Available
Documents -
test.user@gmail.com</ns0:title><ns0:updated>2007-07-09T23:07:21.898Z</ns0:updated></ns0:feed>
"""
DOCUMENT_LIST_ENTRY = """<?xml version='1.0' encoding='UTF-8'?>
<ns0:entry xmlns:ns0="http://www.w3.org/2005/Atom"><ns0:content
src="http://foo.com/fm?fmcmd=102&key=supercalifragilisticexpealidocious"
type="text/html"
/><ns0:author><ns0:name>test.user</ns0:name><ns0:email>test.user@gmail.com</ns0:email></ns0:author><ns0:category
label="spreadsheet" scheme="http://schemas.google.com/g/2005#kind"
term="http://schemas.google.com/docs/2007#spreadsheet"
/><ns0:id>http://docs.google.com/feeds/documents/private/full/spreadsheet%3Asupercalifragilisticexpealidocious</ns0:id><ns0:link
href="http://foo.com/ccc?key=supercalifragilisticexpealidocious"
rel="alternate" type="text/html" /><ns0:link
href="http://foo.com/feeds/worksheets/supercalifragilisticexpealidocious/private/full"
rel="http://schemas.google.com/spreadsheets/2006#worksheetsfeed"
type="application/atom+xml" /><ns0:link
href="http://docs.google.com/feeds/documents/private/full/spreadsheet%3Asupercalifragilisticexpealidocious"
rel="self" type="application/atom+xml" /><ns0:title type="text">Test Spreadsheet</ns0:title><ns0:updated>2007-07-03T18:03:32.045Z</ns0:updated></ns0:entry>
"""
BATCH_ENTRY = """<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:batch="http://schemas.google.com/gdata/batch"
xmlns:g="http://base.google.com/ns/1.0">
<id>http://www.google.com/base/feeds/items/2173859253842813008</id>
<published>2006-07-11T14:51:43.560Z</published>
<updated>2006-07-11T14:51: 43.560Z</updated>
<title type="text">title</title>
<content type="html">content</content>
<link rel="self"
type="application/atom+xml"
href="http://www.google.com/base/feeds/items/2173859253842813008"/>
<link rel="edit"
type="application/atom+xml"
href="http://www.google.com/base/feeds/items/2173859253842813008"/>
<g:item_type>recipes</g:item_type>
<batch:operation type="insert"/>
<batch:id>itemB</batch:id>
<batch:status code="201" reason="Created"/>
</entry>"""
BATCH_FEED_REQUEST = """<?xml version="1.0" encoding="UTF-8"?>
<feed
xmlns="http://www.w3.org/2005/Atom"
xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/"
xmlns:g="http://base.google.com/ns/1.0"
xmlns:batch="http://schemas.google.com/gdata/batch">
<title type="text">My Batch Feed</title>
<entry>
<id>http://www.google.com/base/feeds/items/13308004346459454600</id>
<batch:operation type="delete"/>
</entry>
<entry>
<id>http://www.google.com/base/feeds/items/17437536661927313949</id>
<batch:operation type="delete"/>
</entry>
<entry>
<title type="text">...</title>
<content type="html">...</content>
<batch:id>itemA</batch:id>
<batch:operation type="insert"/>
<g:item_type>recipes</g:item_type>
</entry>
<entry>
<title type="text">...</title>
<content type="html">...</content>
<batch:id>itemB</batch:id>
<batch:operation type="insert"/>
<g:item_type>recipes</g:item_type>
</entry>
</feed>"""
BATCH_FEED_RESULT = """<?xml version="1.0" encoding="UTF-8"?>
<feed
xmlns="http://www.w3.org/2005/Atom"
xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/"
xmlns:g="http://base.google.com/ns/1.0"
xmlns:batch="http://schemas.google.com/gdata/batch">
<id>http://www.google.com/base/feeds/items</id>
<updated>2006-07-11T14:51:42.894Z</updated>
<title type="text">My Batch</title>
<link rel="http://schemas.google.com/g/2005#feed"
type="application/atom+xml"
href="http://www.google.com/base/feeds/items"/>
<link rel="http://schemas.google.com/g/2005#post"
type="application/atom+xml"
href="http://www.google.com/base/feeds/items"/>
<link rel=" http://schemas.google.com/g/2005#batch"
type="application/atom+xml"
href="http://www.google.com/base/feeds/items/batch"/>
<entry>
<id>http://www.google.com/base/feeds/items/2173859253842813008</id>
<published>2006-07-11T14:51:43.560Z</published>
<updated>2006-07-11T14:51: 43.560Z</updated>
<title type="text">...</title>
<content type="html">...</content>
<link rel="self"
type="application/atom+xml"
href="http://www.google.com/base/feeds/items/2173859253842813008"/>
<link rel="edit"
type="application/atom+xml"
href="http://www.google.com/base/feeds/items/2173859253842813008"/>
<g:item_type>recipes</g:item_type>
<batch:operation type="insert"/>
<batch:id>itemB</batch:id>
<batch:status code="201" reason="Created"/>
</entry>
<entry>
<id>http://www.google.com/base/feeds/items/11974645606383737963</id>
<published>2006-07-11T14:51:43.247Z</published>
<updated>2006-07-11T14:51: 43.247Z</updated>
<title type="text">...</title>
<content type="html">...</content>
<link rel="self"
type="application/atom+xml"
href="http://www.google.com/base/feeds/items/11974645606383737963"/>
<link rel="edit"
type="application/atom+xml"
href="http://www.google.com/base/feeds/items/11974645606383737963"/>
<g:item_type>recipes</g:item_type>
<batch:operation type="insert"/>
<batch:id>itemA</batch:id>
<batch:status code="201" reason="Created"/>
</entry>
<entry>
<id>http://www.google.com/base/feeds/items/13308004346459454600</id>
<updated>2006-07-11T14:51:42.894Z</updated>
<title type="text">Error</title>
<content type="text">Bad request</content>
<batch:status code="404"
reason="Bad request"
content-type="application/xml">
<errors>
<error type="request" reason="Cannot find item"/>
</errors>
</batch:status>
</entry>
<entry>
<id>http://www.google.com/base/feeds/items/17437536661927313949</id>
<updated>2006-07-11T14:51:43.246Z</updated>
<content type="text">Deleted</content>
<batch:operation type="delete"/>
<batch:status code="200" reason="Success"/>
</entry>
</feed>"""
ALBUM_FEED = """<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:exif="http://schemas.google.com/photos/exif/2007" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:gml="http://www.opengis.net/gml" xmlns:georss="http://www.georss.org/georss" xmlns:photo="http://www.pheed.com/pheed/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:batch="http://schemas.google.com/gdata/batch" xmlns:gphoto="http://schemas.google.com/photos/2007">
<id>http://picasaweb.google.com/data/feed/api/user/sample.user/albumid/1</id>
<updated>2007-09-21T18:23:05.000Z</updated>
<category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/photos/2007#album"/>
<title type="text">Test</title>
<subtitle type="text"/>
<rights type="text">public</rights>
<icon>http://lh6.google.com/sample.user/Rt8WNoDZEJE/AAAAAAAAABk/HQGlDhpIgWo/s160-c/Test.jpg</icon>
<link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://picasaweb.google.com/data/feed/api/user/sample.user/albumid/1"/>
<link rel="alternate" type="text/html" href="http://picasaweb.google.com/sample.user/Test"/>
<link rel="http://schemas.google.com/photos/2007#slideshow" type="application/x-shockwave-flash" href="http://picasaweb.google.com/s/c/bin/slideshow.swf?host=picasaweb.google.com&RGB=0x000000&feed=http%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fsample.user%2Falbumid%2F1%3Falt%3Drss"/>
<link rel="self" type="application/atom+xml" href="http://picasaweb.google.com/data/feed/api/user/sample.user/albumid/1?start-index=1&max-results=500&kind=photo%2Ctag"/>
<author>
<name>sample</name>
<uri>http://picasaweb.google.com/sample.user</uri>
</author>
<generator version="1.00" uri="http://picasaweb.google.com/">Picasaweb</generator> <openSearch:totalResults>4</openSearch:totalResults>
<openSearch:startIndex>1</openSearch:startIndex>
<openSearch:itemsPerPage>500</openSearch:itemsPerPage>
<gphoto:id>1</gphoto:id>
<gphoto:name>Test</gphoto:name>
<gphoto:location/>
<gphoto:access>public</gphoto:access> <gphoto:timestamp>1188975600000</gphoto:timestamp>
<gphoto:numphotos>2</gphoto:numphotos>
<gphoto:user>sample.user</gphoto:user>
<gphoto:nickname>sample</gphoto:nickname>
<gphoto:commentingEnabled>true</gphoto:commentingEnabled>
<gphoto:commentCount>0</gphoto:commentCount>
<entry> <id>http://picasaweb.google.com/data/entry/api/user/sample.user/albumid/1/photoid/2</id>
<published>2007-09-05T20:49:23.000Z</published>
<updated>2007-09-21T18:23:05.000Z</updated>
<category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/photos/2007#photo"/>
<title type="text">Aqua Blue.jpg</title>
<summary type="text">Blue</summary>
<content type="image/jpeg" src="http://lh4.google.com/sample.user/Rt8WU4DZEKI/AAAAAAAAABY/IVgLqmnzJII/Aqua%20Blue.jpg"/> <link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://picasaweb.google.com/data/feed/api/user/sample.user/albumid/1/photoid/2"/>
<link rel="alternate" type="text/html" href="http://picasaweb.google.com/sample.user/Test/photo#2"/>
<link rel="self" type="application/atom+xml" href="http://picasaweb.google.com/data/entry/api/user/sample.user/albumid/1/photoid/2"/>
<gphoto:id>2</gphoto:id>
<gphoto:version>1190398985145172</gphoto:version>
<gphoto:position>0.0</gphoto:position>
<gphoto:albumid>1</gphoto:albumid> <gphoto:width>2560</gphoto:width>
<gphoto:height>1600</gphoto:height>
<gphoto:size>883405</gphoto:size>
<gphoto:client/>
<gphoto:checksum/>
<gphoto:timestamp>1189025362000</gphoto:timestamp>
<exif:tags> <exif:flash>true</exif:flash>
<exif:imageUniqueID>c041ce17aaa637eb656c81d9cf526c24</exif:imageUniqueID>
</exif:tags>
<gphoto:commentingEnabled>true</gphoto:commentingEnabled>
<gphoto:commentCount>1</gphoto:commentCount>
<media:group>
<media:title type="plain">Aqua Blue.jpg</media:title> <media:description type="plain">Blue</media:description>
<media:keywords>tag, test</media:keywords>
<media:content url="http://lh4.google.com/sample.user/Rt8WU4DZEKI/AAAAAAAAABY/IVgLqmnzJII/Aqua%20Blue.jpg" height="1600" width="2560" type="image/jpeg" medium="image"/>
<media:thumbnail url="http://lh4.google.com/sample.user/Rt8WU4DZEKI/AAAAAAAAABY/IVgLqmnzJII/s72/Aqua%20Blue.jpg" height="45" width="72"/>
<media:thumbnail url="http://lh4.google.com/sample.user/Rt8WU4DZEKI/AAAAAAAAABY/IVgLqmnzJII/s144/Aqua%20Blue.jpg" height="90" width="144"/>
<media:thumbnail url="http://lh4.google.com/sample.user/Rt8WU4DZEKI/AAAAAAAAABY/IVgLqmnzJII/s288/Aqua%20Blue.jpg" height="180" width="288"/>
<media:credit>sample</media:credit>
</media:group>
</entry>
<entry>
<id>http://picasaweb.google.com/data/entry/api/user/sample.user/albumid/1/photoid/3</id>
<published>2007-09-05T20:49:24.000Z</published>
<updated>2007-09-21T18:19:38.000Z</updated>
<category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/photos/2007#photo"/>
<title type="text">Aqua Graphite.jpg</title>
<summary type="text">Gray</summary>
<content type="image/jpeg" src="http://lh5.google.com/sample.user/Rt8WVIDZELI/AAAAAAAAABg/d7e0i7gvhNU/Aqua%20Graphite.jpg"/>
<link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://picasaweb.google.com/data/feed/api/user/sample.user/albumid/1/photoid/3"/>
<link rel="alternate" type="text/html" href="http://picasaweb.google.com/sample.user/Test/photo#3"/>
<link rel="self" type="application/atom+xml" href="http://picasaweb.google.com/data/entry/api/user/sample.user/albumid/1/photoid/3"/>
<gphoto:id>3</gphoto:id>
<gphoto:version>1190398778006402</gphoto:version>
<gphoto:position>1.0</gphoto:position>
<gphoto:albumid>1</gphoto:albumid>
<gphoto:width>2560</gphoto:width>
<gphoto:height>1600</gphoto:height>
<gphoto:size>798334</gphoto:size>
<gphoto:client/>
<gphoto:checksum/>
<gphoto:timestamp>1189025363000</gphoto:timestamp>
<exif:tags>
<exif:flash>true</exif:flash>
<exif:imageUniqueID>a5ce2e36b9df7d3cb081511c72e73926</exif:imageUniqueID>
</exif:tags>
<gphoto:commentingEnabled>true</gphoto:commentingEnabled>
<gphoto:commentCount>0</gphoto:commentCount>
<media:group>
<media:title type="plain">Aqua Graphite.jpg</media:title>
<media:description type="plain">Gray</media:description>
<media:keywords/>
<media:content url="http://lh5.google.com/sample.user/Rt8WVIDZELI/AAAAAAAAABg/d7e0i7gvhNU/Aqua%20Graphite.jpg" height="1600" width="2560" type="image/jpeg" medium="image"/>
<media:thumbnail url="http://lh5.google.com/sample.user/Rt8WVIDZELI/AAAAAAAAABg/d7e0i7gvhNU/s72/Aqua%20Graphite.jpg" height="45" width="72"/>
<media:thumbnail url="http://lh5.google.com/sample.user/Rt8WVIDZELI/AAAAAAAAABg/d7e0i7gvhNU/s144/Aqua%20Graphite.jpg" height="90" width="144"/>
<media:thumbnail url="http://lh5.google.com/sample.user/Rt8WVIDZELI/AAAAAAAAABg/d7e0i7gvhNU/s288/Aqua%20Graphite.jpg" height="180" width="288"/>
<media:credit>sample</media:credit>
</media:group>
</entry>
<entry>
<id>http://picasaweb.google.com/data/entry/api/user/sample.user/albumid/1/tag/tag</id>
<updated>2007-09-05T20:49:24.000Z</updated>
<category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/photos/2007#tag"/>
<title type="text">tag</title>
<summary type="text">tag</summary>
<link rel="alternate" type="text/html" href="http://picasaweb.google.com/lh/searchbrowse?q=tag&psc=G&uname=sample.user&filter=0"/>
<link rel="self" type="application/atom+xml" href="http://picasaweb.google.com/data/entry/api/user/sample.user/albumid/1/tag/tag"/>
<author>
<name>sample</name>
<uri>http://picasaweb.google.com/sample.user</uri>
</author>
</entry>
<entry>
<id>http://picasaweb.google.com/data/entry/api/user/sample.user/albumid/1/tag/test</id>
<updated>2007-09-05T20:49:24.000Z</updated>
<category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/photos/2007#tag"/>
<title type="text">test</title>
<summary type="text">test</summary>
<link rel="alternate" type="text/html" href="http://picasaweb.google.com/lh/searchbrowse?q=test&psc=G&uname=sample.user&filter=0"/>
<link rel="self" type="application/atom+xml" href="http://picasaweb.google.com/data/entry/api/user/sample.user/albumid/1/tag/test"/>
<author>
<name>sample</name>
<uri>http://picasaweb.google.com/sample.user</uri>
</author>
</entry>
</feed>"""
CODE_SEARCH_FEED = """<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:opensearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:gcs="http://schemas.google.com/codesearch/2006" xml:base="http://www.google.com">
<id>http://www.google.com/codesearch/feeds/search?q=malloc</id>
<updated>2007-12-19T16:08:04Z</updated>
<title type="text">Google Code Search</title>
<generator version="1.0" uri="http://www.google.com/codesearch">Google Code Search</generator>
<opensearch:totalResults>2530000</opensearch:totalResults>
<opensearch:startIndex>1</opensearch:startIndex>
<author>
<name>Google Code Search</name>
<uri>http://www.google.com/codesearch</uri>
</author>
<link rel="http://schemas.google.com/g/2006#feed" type="application/atom+xml" href="http://schemas.google.com/codesearch/2006"/>
<link rel="self" type="application/atom+xml" href="http://www.google.com/codesearch/feeds/search?q=malloc"/>
<link rel="next" type="application/atom+xml" href="http://www.google.com/codesearch/feeds/search?q=malloc&start-index=11"/>
<link rel="alternate" type="text/html" href="http://www.google.com/codesearch?q=malloc"/>
<entry><id>http://www.google.com/codesearch?hl=en&q=+malloc+show:LDjwp-Iqc7U:84hEYaYsZk8:xDGReDhvNi0&sa=N&ct=rx&cd=1&cs_p=http://www.gnu.org&cs_f=software/autoconf/manual/autoconf-2.60/autoconf.html-002&cs_p=http://www.gnu.org&cs_f=software/autoconf/manual/autoconf-2.60/autoconf.html-002#first</id><updated>2007-12-19T16:08:04Z</updated><author><name>Code owned by external author.</name></author><title type="text">software/autoconf/manual/autoconf-2.60/autoconf.html</title><link rel="alternate" type="text/html" href="http://www.google.com/codesearch?hl=en&q=+malloc+show:LDjwp-Iqc7U:84hEYaYsZk8:xDGReDhvNi0&sa=N&ct=rx&cd=1&cs_p=http://www.gnu.org&cs_f=software/autoconf/manual/autoconf-2.60/autoconf.html-002&cs_p=http://www.gnu.org&cs_f=software/autoconf/manual/autoconf-2.60/autoconf.html-002#first"/><gcs:package name="http://www.gnu.org" uri="http://www.gnu.org"></gcs:package><gcs:file name="software/autoconf/manual/autoconf-2.60/autoconf.html-002"></gcs:file><content type="text/html"><pre> 8: void *<b>malloc</b> ();
</pre></content><gcs:match lineNumber="4" type="text/html"><pre> #undef <b>malloc</b>
</pre></gcs:match><gcs:match lineNumber="8" type="text/html"><pre> void *<b>malloc</b> ();
</pre></gcs:match><gcs:match lineNumber="14" type="text/html"><pre> rpl_<b>malloc</b> (size_t n)
</pre></gcs:match><gcs:match lineNumber="18" type="text/html"><pre> return <b>malloc</b> (n);
</pre></gcs:match></entry>
<entry><id>http://www.google.com/codesearch?hl=en&q=+malloc+show:h4hfh-fV-jI:niBq_bwWZNs:H0OhClf0HWQ&sa=N&ct=rx&cd=2&cs_p=ftp://ftp.gnu.org/gnu/guile/guile-1.6.8.tar.gz&cs_f=guile-1.6.8/libguile/mallocs.c&cs_p=ftp://ftp.gnu.org/gnu/guile/guile-1.6.8.tar.gz&cs_f=guile-1.6.8/libguile/mallocs.c#first</id><updated>2007-12-19T16:08:04Z</updated><author><name>Code owned by external author.</name></author><title type="text">guile-1.6.8/libguile/mallocs.c</title><link rel="alternate" type="text/html" href="http://www.google.com/codesearch?hl=en&q=+malloc+show:h4hfh-fV-jI:niBq_bwWZNs:H0OhClf0HWQ&sa=N&ct=rx&cd=2&cs_p=ftp://ftp.gnu.org/gnu/guile/guile-1.6.8.tar.gz&cs_f=guile-1.6.8/libguile/mallocs.c&cs_p=ftp://ftp.gnu.org/gnu/guile/guile-1.6.8.tar.gz&cs_f=guile-1.6.8/libguile/mallocs.c#first"/><gcs:package name="ftp://ftp.gnu.org/gnu/guile/guile-1.6.8.tar.gz" uri="ftp://ftp.gnu.org/gnu/guile/guile-1.6.8.tar.gz"></gcs:package><gcs:file name="guile-1.6.8/libguile/mallocs.c"></gcs:file><content type="text/html"><pre> 86: {
scm_t_bits mem = n ? (scm_t_bits) <b>malloc</b> (n) : 0;
if (n &amp;&amp; !mem)
</pre></content><gcs:match lineNumber="54" type="text/html"><pre>#include &lt;<b>malloc</b>.h&gt;
</pre></gcs:match><gcs:match lineNumber="62" type="text/html"><pre>scm_t_bits scm_tc16_<b>malloc</b>;
</pre></gcs:match><gcs:match lineNumber="66" type="text/html"><pre><b>malloc</b>_free (SCM ptr)
</pre></gcs:match><gcs:match lineNumber="75" type="text/html"><pre><b>malloc</b>_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED)
</pre></gcs:match><gcs:match lineNumber="77" type="text/html"><pre> scm_puts(&quot;#&lt;<b>malloc</b> &quot;, port);
</pre></gcs:match><gcs:match lineNumber="87" type="text/html"><pre> scm_t_bits mem = n ? (scm_t_bits) <b>malloc</b> (n) : 0;
</pre></gcs:match><gcs:match lineNumber="90" type="text/html"><pre> SCM_RETURN_NEWSMOB (scm_tc16_<b>malloc</b>, mem);
</pre></gcs:match><gcs:match lineNumber="98" type="text/html"><pre> scm_tc16_<b>malloc</b> = scm_make_smob_type (&quot;<b>malloc</b>&quot;, 0);
</pre></gcs:match><gcs:match lineNumber="99" type="text/html"><pre> scm_set_smob_free (scm_tc16_<b>malloc</b>, <b>malloc</b>_free);
</pre></gcs:match><rights>GPL</rights></entry>
<entry><id>http://www.google.com/codesearch?hl=en&q=+malloc+show:9wyZUG-N_30:7_dFxoC1ZrY:C0_iYbFj90M&sa=N&ct=rx&cd=3&cs_p=http://ftp.gnu.org/gnu/bash/bash-3.0.tar.gz&cs_f=bash-3.0/lib/malloc/alloca.c&cs_p=http://ftp.gnu.org/gnu/bash/bash-3.0.tar.gz&cs_f=bash-3.0/lib/malloc/alloca.c#first</id><updated>2007-12-19T16:08:04Z</updated><author><name>Code owned by external author.</name></author><title type="text">bash-3.0/lib/malloc/alloca.c</title><link rel="alternate" type="text/html" href="http://www.google.com/codesearch?hl=en&q=+malloc+show:9wyZUG-N_30:7_dFxoC1ZrY:C0_iYbFj90M&sa=N&ct=rx&cd=3&cs_p=http://ftp.gnu.org/gnu/bash/bash-3.0.tar.gz&cs_f=bash-3.0/lib/malloc/alloca.c&cs_p=http://ftp.gnu.org/gnu/bash/bash-3.0.tar.gz&cs_f=bash-3.0/lib/malloc/alloca.c#first"/><gcs:package name="http://ftp.gnu.org/gnu/bash/bash-3.0.tar.gz" uri="http://ftp.gnu.org/gnu/bash/bash-3.0.tar.gz"></gcs:package><gcs:file name="bash-3.0/lib/malloc/alloca.c"></gcs:file><content type="text/html"><pre> 78: #ifndef emacs
#define <b>malloc</b> x<b>malloc</b>
extern pointer x<b>malloc</b> ();
</pre></content><gcs:match lineNumber="69" type="text/html"><pre> <b>malloc</b>. The Emacs executable needs alloca to call x<b>malloc</b>, because
</pre></gcs:match><gcs:match lineNumber="70" type="text/html"><pre> ordinary <b>malloc</b> isn&#39;t protected from input signals. On the other
</pre></gcs:match><gcs:match lineNumber="71" type="text/html"><pre> hand, the utilities in lib-src need alloca to call <b>malloc</b>; some of
</pre></gcs:match><gcs:match lineNumber="72" type="text/html"><pre> them are very simple, and don&#39;t have an x<b>malloc</b> routine.
</pre></gcs:match><gcs:match lineNumber="76" type="text/html"><pre> Callers below should use <b>malloc</b>. */
</pre></gcs:match><gcs:match lineNumber="79" type="text/html"><pre>#define <b>malloc</b> x<b>malloc</b>
</pre></gcs:match><gcs:match lineNumber="80" type="text/html"><pre>extern pointer x<b>malloc</b> ();
</pre></gcs:match><gcs:match lineNumber="132" type="text/html"><pre> It is very important that sizeof(header) agree with <b>malloc</b>
</pre></gcs:match><gcs:match lineNumber="198" type="text/html"><pre> register pointer new = <b>malloc</b> (sizeof (header) + size);
</pre></gcs:match><rights>GPL</rights></entry>
<entry><id>http://www.google.com/codesearch?hl=en&q=+malloc+show:uhVCKyPcT6k:8juMxxzmUJw:H7_IDsTB2L4&sa=N&ct=rx&cd=4&cs_p=http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7b/src/mozilla-source-1.7b-source.tar.bz2&cs_f=mozilla/xpcom/build/malloc.c&cs_p=http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7b/src/mozilla-source-1.7b-source.tar.bz2&cs_f=mozilla/xpcom/build/malloc.c#first</id><updated>2007-12-19T16:08:04Z</updated><author><name>Code owned by external author.</name></author><title type="text">mozilla/xpcom/build/malloc.c</title><link rel="alternate" type="text/html" href="http://www.google.com/codesearch?hl=en&q=+malloc+show:uhVCKyPcT6k:8juMxxzmUJw:H7_IDsTB2L4&sa=N&ct=rx&cd=4&cs_p=http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7b/src/mozilla-source-1.7b-source.tar.bz2&cs_f=mozilla/xpcom/build/malloc.c&cs_p=http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7b/src/mozilla-source-1.7b-source.tar.bz2&cs_f=mozilla/xpcom/build/malloc.c#first"/><gcs:package name="http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7b/src/mozilla-source-1.7b-source.tar.bz2" uri="http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7b/src/mozilla-source-1.7b-source.tar.bz2"></gcs:package><gcs:file name="mozilla/xpcom/build/malloc.c"></gcs:file><content type="text/html"><pre> 54: http://gee.cs.oswego.edu/dl/html/<b>malloc</b>.html
You may already by default be using a c library containing a <b>malloc</b>
</pre></content><gcs:match lineNumber="4" type="text/html"><pre>/* ---------- To make a <b>malloc</b>.h, start cutting here ------------ */
</pre></gcs:match><gcs:match lineNumber="22" type="text/html"><pre> Note: There may be an updated version of this <b>malloc</b> obtainable at
</pre></gcs:match><gcs:match lineNumber="23" type="text/html"><pre> ftp://gee.cs.oswego.edu/pub/misc/<b>malloc</b>.c
</pre></gcs:match><gcs:match lineNumber="34" type="text/html"><pre>* Why use this <b>malloc</b>?
</pre></gcs:match><gcs:match lineNumber="37" type="text/html"><pre> most tunable <b>malloc</b> ever written. However it is among the fastest
</pre></gcs:match><gcs:match lineNumber="40" type="text/html"><pre> allocator for <b>malloc</b>-intensive programs.
</pre></gcs:match><gcs:match lineNumber="54" type="text/html"><pre> http://gee.cs.oswego.edu/dl/html/<b>malloc</b>.html
</pre></gcs:match><gcs:match lineNumber="56" type="text/html"><pre> You may already by default be using a c library containing a <b>malloc</b>
</pre></gcs:match><gcs:match lineNumber="57" type="text/html"><pre> that is somehow based on some version of this <b>malloc</b> (for example in
</pre></gcs:match><rights>Mozilla</rights></entry>
<entry><id>http://www.google.com/codesearch?hl=en&q=+malloc+show:4n1P2HVOISs:Ybbpph0wR2M:OhIN_sDrG0U&sa=N&ct=rx&cd=5&cs_p=http://regexps.srparish.net/src/hackerlab/hackerlab-1.0pre2.tar.gz&cs_f=hackerlab-1.0pre2/src/hackerlab/tests/mem-tests/unit-must-malloc.sh&cs_p=http://regexps.srparish.net/src/hackerlab/hackerlab-1.0pre2.tar.gz&cs_f=hackerlab-1.0pre2/src/hackerlab/tests/mem-tests/unit-must-malloc.sh#first</id><updated>2007-12-19T16:08:04Z</updated><author><name>Code owned by external author.</name></author><title type="text">hackerlab-1.0pre2/src/hackerlab/tests/mem-tests/unit-must-malloc.sh</title><link rel="alternate" type="text/html" href="http://www.google.com/codesearch?hl=en&q=+malloc+show:4n1P2HVOISs:Ybbpph0wR2M:OhIN_sDrG0U&sa=N&ct=rx&cd=5&cs_p=http://regexps.srparish.net/src/hackerlab/hackerlab-1.0pre2.tar.gz&cs_f=hackerlab-1.0pre2/src/hackerlab/tests/mem-tests/unit-must-malloc.sh&cs_p=http://regexps.srparish.net/src/hackerlab/hackerlab-1.0pre2.tar.gz&cs_f=hackerlab-1.0pre2/src/hackerlab/tests/mem-tests/unit-must-malloc.sh#first"/><gcs:package name="http://regexps.srparish.net/src/hackerlab/hackerlab-1.0pre2.tar.gz" uri="http://regexps.srparish.net/src/hackerlab/hackerlab-1.0pre2.tar.gz"></gcs:package><gcs:file name="hackerlab-1.0pre2/src/hackerlab/tests/mem-tests/unit-must-malloc.sh"></gcs:file><content type="text/html"><pre> 11: echo ================ unit-must-<b>malloc</b> tests ================
./unit-must-<b>malloc</b>
echo ...passed
</pre></content><gcs:match lineNumber="2" type="text/html"><pre># tag: Tom Lord Tue Dec 4 14:54:29 2001 (mem-tests/unit-must-<b>malloc</b>.sh)
</pre></gcs:match><gcs:match lineNumber="11" type="text/html"><pre>echo ================ unit-must-<b>malloc</b> tests ================
</pre></gcs:match><gcs:match lineNumber="12" type="text/html"><pre>./unit-must-<b>malloc</b>
</pre></gcs:match><rights>GPL</rights></entry>
<entry><id>http://www.google.com/codesearch?hl=en&q=+malloc+show:GzkwiWG266M:ykuz3bG00ws:2sTvVSif08g&sa=N&ct=rx&cd=6&cs_p=http://ftp.gnu.org/gnu/tar/tar-1.14.tar.bz2&cs_f=tar-1.14/lib/malloc.c&cs_p=http://ftp.gnu.org/gnu/tar/tar-1.14.tar.bz2&cs_f=tar-1.14/lib/malloc.c#first</id><updated>2007-12-19T16:08:04Z</updated><author><name>Code owned by external author.</name></author><title type="text">tar-1.14/lib/malloc.c</title><link rel="alternate" type="text/html" href="http://www.google.com/codesearch?hl=en&q=+malloc+show:GzkwiWG266M:ykuz3bG00ws:2sTvVSif08g&sa=N&ct=rx&cd=6&cs_p=http://ftp.gnu.org/gnu/tar/tar-1.14.tar.bz2&cs_f=tar-1.14/lib/malloc.c&cs_p=http://ftp.gnu.org/gnu/tar/tar-1.14.tar.bz2&cs_f=tar-1.14/lib/malloc.c#first"/><gcs:package name="http://ftp.gnu.org/gnu/tar/tar-1.14.tar.bz2" uri="http://ftp.gnu.org/gnu/tar/tar-1.14.tar.bz2"></gcs:package><gcs:file name="tar-1.14/lib/malloc.c"></gcs:file><content type="text/html"><pre> 22: #endif
#undef <b>malloc</b>
</pre></content><gcs:match lineNumber="1" type="text/html"><pre>/* Work around bug on some systems where <b>malloc</b> (0) fails.
</pre></gcs:match><gcs:match lineNumber="23" type="text/html"><pre>#undef <b>malloc</b>
</pre></gcs:match><gcs:match lineNumber="31" type="text/html"><pre>rpl_<b>malloc</b> (size_t n)
</pre></gcs:match><gcs:match lineNumber="35" type="text/html"><pre> return <b>malloc</b> (n);
</pre></gcs:match><rights>GPL</rights></entry>
<entry><id>http://www.google.com/codesearch?hl=en&q=+malloc+show:o_TFIeBY6dY:ktI_dt8wPao:AI03BD1Dz0Y&sa=N&ct=rx&cd=7&cs_p=http://ftp.gnu.org/gnu/tar/tar-1.16.1.tar.gz&cs_f=tar-1.16.1/lib/malloc.c&cs_p=http://ftp.gnu.org/gnu/tar/tar-1.16.1.tar.gz&cs_f=tar-1.16.1/lib/malloc.c#first</id><updated>2007-12-19T16:08:04Z</updated><author><name>Code owned by external author.</name></author><title type="text">tar-1.16.1/lib/malloc.c</title><link rel="alternate" type="text/html" href="http://www.google.com/codesearch?hl=en&q=+malloc+show:o_TFIeBY6dY:ktI_dt8wPao:AI03BD1Dz0Y&sa=N&ct=rx&cd=7&cs_p=http://ftp.gnu.org/gnu/tar/tar-1.16.1.tar.gz&cs_f=tar-1.16.1/lib/malloc.c&cs_p=http://ftp.gnu.org/gnu/tar/tar-1.16.1.tar.gz&cs_f=tar-1.16.1/lib/malloc.c#first"/><gcs:package name="http://ftp.gnu.org/gnu/tar/tar-1.16.1.tar.gz" uri="http://ftp.gnu.org/gnu/tar/tar-1.16.1.tar.gz"></gcs:package><gcs:file name="tar-1.16.1/lib/malloc.c"></gcs:file><content type="text/html"><pre> 21: #include &lt;config.h&gt;
#undef <b>malloc</b>
</pre></content><gcs:match lineNumber="1" type="text/html"><pre>/* <b>malloc</b>() function that is glibc compatible.
</pre></gcs:match><gcs:match lineNumber="22" type="text/html"><pre>#undef <b>malloc</b>
</pre></gcs:match><gcs:match lineNumber="30" type="text/html"><pre>rpl_<b>malloc</b> (size_t n)
</pre></gcs:match><gcs:match lineNumber="34" type="text/html"><pre> return <b>malloc</b> (n);
</pre></gcs:match><rights>GPL</rights></entry>
<entry><id>http://www.google.com/codesearch?hl=en&q=+malloc+show:_ibw-VLkMoI:jBOtIJSmFd4:-0NUEVeCwfY&sa=N&ct=rx&cd=8&cs_p=http://freshmeat.net/redir/uclibc/20616/url_bz2/uClibc-0.9.28.1.tar.bz2&cs_f=uClibc-0.9.29/include/malloc.h&cs_p=http://freshmeat.net/redir/uclibc/20616/url_bz2/uClibc-0.9.28.1.tar.bz2&cs_f=uClibc-0.9.29/include/malloc.h#first</id><updated>2007-12-19T16:08:04Z</updated><author><name>Code owned by external author.</name></author><title type="text">uClibc-0.9.29/include/malloc.h</title><link rel="alternate" type="text/html" href="http://www.google.com/codesearch?hl=en&q=+malloc+show:_ibw-VLkMoI:jBOtIJSmFd4:-0NUEVeCwfY&sa=N&ct=rx&cd=8&cs_p=http://freshmeat.net/redir/uclibc/20616/url_bz2/uClibc-0.9.28.1.tar.bz2&cs_f=uClibc-0.9.29/include/malloc.h&cs_p=http://freshmeat.net/redir/uclibc/20616/url_bz2/uClibc-0.9.28.1.tar.bz2&cs_f=uClibc-0.9.29/include/malloc.h#first"/><gcs:package name="http://freshmeat.net/redir/uclibc/20616/url_bz2/uClibc-0.9.28.1.tar.bz2" uri="http://freshmeat.net/redir/uclibc/20616/url_bz2/uClibc-0.9.28.1.tar.bz2"></gcs:package><gcs:file name="uClibc-0.9.29/include/malloc.h"></gcs:file><content type="text/html"><pre> 1: /* Prototypes and definition for <b>malloc</b> implementation.
Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
</pre></content><gcs:match lineNumber="1" type="text/html"><pre>/* Prototypes and definition for <b>malloc</b> implementation.
</pre></gcs:match><gcs:match lineNumber="26" type="text/html"><pre> `pt<b>malloc</b>&#39;, a <b>malloc</b> implementation for multiple threads without
</pre></gcs:match><gcs:match lineNumber="28" type="text/html"><pre> See the files `pt<b>malloc</b>.c&#39; or `COPYRIGHT&#39; for copying conditions.
</pre></gcs:match><gcs:match lineNumber="32" type="text/html"><pre> This work is mainly derived from <b>malloc</b>-2.6.4 by Doug Lea
</pre></gcs:match><gcs:match lineNumber="35" type="text/html"><pre> ftp://g.oswego.edu/pub/misc/<b>malloc</b>.c
</pre></gcs:match><gcs:match lineNumber="40" type="text/html"><pre> `pt<b>malloc</b>.c&#39;.
</pre></gcs:match><gcs:match lineNumber="45" type="text/html"><pre># define __<b>malloc</b>_ptr_t void *
</pre></gcs:match><gcs:match lineNumber="51" type="text/html"><pre># define __<b>malloc</b>_ptr_t char *
</pre></gcs:match><gcs:match lineNumber="56" type="text/html"><pre># define __<b>malloc</b>_size_t size_t
</pre></gcs:match><rights>LGPL</rights></entry>
<entry><id>http://www.google.com/codesearch?hl=en&q=+malloc+show:F6qHcZ9vefo:bTX7o9gKfks:hECF4r_eKC0&sa=N&ct=rx&cd=9&cs_p=http://ftp.gnu.org/gnu/glibc/glibc-2.0.1.tar.gz&cs_f=glibc-2.0.1/hurd/hurdmalloc.h&cs_p=http://ftp.gnu.org/gnu/glibc/glibc-2.0.1.tar.gz&cs_f=glibc-2.0.1/hurd/hurdmalloc.h#first</id><updated>2007-12-19T16:08:04Z</updated><author><name>Code owned by external author.</name></author><title type="text">glibc-2.0.1/hurd/hurdmalloc.h</title><link rel="alternate" type="text/html" href="http://www.google.com/codesearch?hl=en&q=+malloc+show:F6qHcZ9vefo:bTX7o9gKfks:hECF4r_eKC0&sa=N&ct=rx&cd=9&cs_p=http://ftp.gnu.org/gnu/glibc/glibc-2.0.1.tar.gz&cs_f=glibc-2.0.1/hurd/hurdmalloc.h&cs_p=http://ftp.gnu.org/gnu/glibc/glibc-2.0.1.tar.gz&cs_f=glibc-2.0.1/hurd/hurdmalloc.h#first"/><gcs:package name="http://ftp.gnu.org/gnu/glibc/glibc-2.0.1.tar.gz" uri="http://ftp.gnu.org/gnu/glibc/glibc-2.0.1.tar.gz"></gcs:package><gcs:file name="glibc-2.0.1/hurd/hurdmalloc.h"></gcs:file><content type="text/html"><pre> 15: #define <b>malloc</b> _hurd_<b>malloc</b>
#define realloc _hurd_realloc
</pre></content><gcs:match lineNumber="3" type="text/html"><pre> All hurd-internal code which uses <b>malloc</b> et al includes this file so it
</pre></gcs:match><gcs:match lineNumber="4" type="text/html"><pre> will use the internal <b>malloc</b> routines _hurd_{<b>malloc</b>,realloc,free}
</pre></gcs:match><gcs:match lineNumber="7" type="text/html"><pre> of <b>malloc</b> et al is the unixoid one using sbrk.
</pre></gcs:match><gcs:match lineNumber="11" type="text/html"><pre>extern void *_hurd_<b>malloc</b> (size_t);
</pre></gcs:match><gcs:match lineNumber="15" type="text/html"><pre>#define <b>malloc</b> _hurd_<b>malloc</b>
</pre></gcs:match><rights>GPL</rights></entry>
<entry><id>http://www.google.com/codesearch?hl=en&q=+malloc+show:CHUvHYzyLc8:pdcAfzDA6lY:wjofHuNLTHg&sa=N&ct=rx&cd=10&cs_p=ftp://apache.mirrors.pair.com/httpd/httpd-2.2.4.tar.bz2&cs_f=httpd-2.2.4/srclib/apr/include/arch/netware/apr_private.h&cs_p=ftp://apache.mirrors.pair.com/httpd/httpd-2.2.4.tar.bz2&cs_f=httpd-2.2.4/srclib/apr/include/arch/netware/apr_private.h#first</id><updated>2007-12-19T16:08:04Z</updated><author><name>Code owned by external author.</name></author><title type="text">httpd-2.2.4/srclib/apr/include/arch/netware/apr_private.h</title><link rel="alternate" type="text/html" href="http://www.google.com/codesearch?hl=en&q=+malloc+show:CHUvHYzyLc8:pdcAfzDA6lY:wjofHuNLTHg&sa=N&ct=rx&cd=10&cs_p=ftp://apache.mirrors.pair.com/httpd/httpd-2.2.4.tar.bz2&cs_f=httpd-2.2.4/srclib/apr/include/arch/netware/apr_private.h&cs_p=ftp://apache.mirrors.pair.com/httpd/httpd-2.2.4.tar.bz2&cs_f=httpd-2.2.4/srclib/apr/include/arch/netware/apr_private.h#first"/><gcs:package name="ftp://apache.mirrors.pair.com/httpd/httpd-2.2.4.tar.bz2" uri="ftp://apache.mirrors.pair.com/httpd/httpd-2.2.4.tar.bz2"></gcs:package><gcs:file name="httpd-2.2.4/srclib/apr/include/arch/netware/apr_private.h"></gcs:file><content type="text/html"><pre> 173: #undef <b>malloc</b>
#define <b>malloc</b>(x) library_<b>malloc</b>(gLibHandle,x)
</pre></content><gcs:match lineNumber="170" type="text/html"><pre>/* Redefine <b>malloc</b> to use the library <b>malloc</b> call so
</pre></gcs:match><gcs:match lineNumber="173" type="text/html"><pre>#undef <b>malloc</b>
</pre></gcs:match><gcs:match lineNumber="174" type="text/html"><pre>#define <b>malloc</b>(x) library_<b>malloc</b>(gLibHandle,x)
</pre></gcs:match><rights>Apache</rights></entry>
</feed>"""
YOU_TUBE_VIDEO_FEED = """<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
xmlns:gml='http://www.opengis.net/gml'
xmlns:georss='http://www.georss.org/georss'
xmlns:media='http://search.yahoo.com/mrss/'
xmlns:yt='http://gdata.youtube.com/schemas/2007'
xmlns:gd='http://schemas.google.com/g/2005'>
<id>http://gdata.youtube.com/feeds/api/standardfeeds/top_rated</id>
<updated>2008-02-21T18:57:10.801Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://gdata.youtube.com/schemas/2007#video'/>
<title type='text'>Top Rated</title>
<logo>http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo>
<link rel='alternate' type='text/html'
href='http://www.youtube.com/browser?s=tr'/>
<link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml'
href='http://gdata.youtube.com/feeds/api/standardfeeds/top_rated'/>
<link rel='self' type='application/atom+xml'
href='http://gdata.youtube.com/feeds/api/standardfeeds/top_rated?start_index=1&max-results=25'/>
<link rel='self' type='application/atom+xml'
href='http://gdata.youtube.com/feeds/api/standardfeeds/top_rated?start_index=26&max-results=25'/>
<author>
<name>YouTube</name>
<uri>http://www.youtube.com/</uri>
</author>
<generator version='beta'
uri='http://gdata.youtube.com/'>YouTube data API</generator>
<openSearch:totalResults>99</openSearch:totalResults>
<openSearch:startIndex>1</openSearch:startIndex>
<openSearch:itemsPerPage>25</openSearch:itemsPerPage>
<entry>
<id>http://gdata.youtube.com/feeds/api/videos/ZTUVgYoeN_b</id>
<published>2007-02-16T20:22:57.000Z</published>
<updated>2007-02-16T20:22:57.000Z</updated>
<category scheme="http://schemas.google.com/g/2005#kind"
term="http://gdata.youtube.com/schemas/2007#video"/>
<category scheme="http://gdata.youtube.com/schemas/2007/keywords.cat"
term="Steventon"/>
<category scheme="http://gdata.youtube.com/schemas/2007/keywords.cat"
term="walk"/>
<category scheme="http://gdata.youtube.com/schemas/2007/keywords.cat"
term="Darcy"/>
<category scheme="http://gdata.youtube.com/schemas/2007/categories.cat"
term="Entertainment" label="Entertainment"/>
<title type="text">My walk with Mr. Darcy</title>
<content type="html"><div ... html content trimmed ...></content>
<link rel="self" type="application/atom+xml"
href="http://gdata.youtube.com/feeds/api/videos/ZTUVgYoeN_b"/>
<link rel="alternate" type="text/html"
href="http://www.youtube.com/watch?v=ZTUVgYoeN_b"/>
<link rel="http://gdata.youtube.com/schemas/2007#video.responses"
type="application/atom+xml"
href="http://gdata.youtube.com/feeds/api/videos/ZTUVgYoeN_b/responses"/>
<link rel="http://gdata.youtube.com/schemas/2007#video.ratings"
type="application/atom+xml"
href="http://gdata.youtube.com/feeds/api/videos/ZTUVgYoeN_b/ratings"/>
<link rel="http://gdata.youtube.com/schemas/2007#video.complaints"
type="application/atom+xml"
href="http://gdata.youtube.com/feeds/api/videos/ZTUVgYoeN_b/complaints"/>
<link rel="http://gdata.youtube.com/schemas/2007#video.related"
type="application/atom+xml"
href="http://gdata.youtube.com/feeds/api/videos/ZTUVgYoeN_b/related"/>
<author>
<name>Andy Samplo</name>
<uri>http://gdata.youtube.com/feeds/api/users/andyland74</uri>
</author>
<media:group>
<media:title type="plain">Shopping for Coats</media:title>
<media:description type="plain">
What could make for more exciting video?
</media:description>
<media:keywords>Shopping, parkas</media:keywords>
<yt:duration seconds="79"/>
<media:category label="People"
scheme="http://gdata.youtube.com/schemas/2007/categories.cat">People
</media:category>
<media:content
url='http://www.youtube.com/v/ZTUVgYoeN_b'
type='application/x-shockwave-flash' medium='video'
isDefault='true' expression="full" duration='215' yt:format="5"/>
<media:content
url='rtsp://rtsp2.youtube.com/ChoLENy73bIAEQ1k30OPEgGDA==/0/0/0/video.3gp'
type='video/3gpp' medium='video'
expression="full" duration='215' yt:format="1"/>
<media:content
url='rtsp://rtsp2.youtube.com/ChoLENy73bIAEQ1k30OPEgGDA==/0/0/0/video.3gp'
type='video/3gpp' medium='video'
expression="full" duration='215' yt:format="6"/>
<media:player url="http://www.youtube.com/watch?v=ZTUVgYoeN_b"/>
<media:thumbnail url="http://img.youtube.com/vi/ZTUVgYoeN_b/2.jpg"
height="97" width="130" time="00:00:03.500"/>
<media:thumbnail url="http://img.youtube.com/vi/ZTUVgYoeN_b/1.jpg"
height="97" width="130" time="00:00:01.750"/>
<media:thumbnail url="http://img.youtube.com/vi/ZTUVgYoeN_b/3.jpg"
height="97" width="130" time="00:00:05.250"/>
<media:thumbnail url="http://img.youtube.com/vi/ZTUVgYoeN_b/0.jpg"
height="240" width="320" time="00:00:03.500"/>
</media:group>
<yt:statistics viewCount="93"/>
<gd:rating min='1' max='5' numRaters='435' average='4.94'/>
<gd:comments>
<gd:feedLink
href="http://gdata.youtube.com/feeds/api/videos/ZTUVgYoeN_b/comments"
countHint='2197'/>
</gd:comments>
</entry>
</feed>"""
YOU_TUBE_COMMENT_FEED = """<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'>
<id>http://gdata.youtube.com/feeds/api/videos/ZTUVgYoeN_b/comments?start-index=1&max-results=25</id>
<updated>2008-02-25T23:14:03.148Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#comment'/>
<title type='text'>Comments on 'My walk with Mr. Darcy'</title>
<logo>http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo>
<link rel='related' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/ZTUVgYoeN_b'/>
<link rel='alternate' type='text/html' href='http://www.youtube.com/watch?v=ZTUVgYoeN_b'/>
<link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/ZTUVgYoeN_b/comments'/>
<link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/ZTUVgYoeN_b/comments?start-index=1&max-results=25'/>
<link rel='next' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/ZTUVgYoeN_b/comments?start-index=26&max-results=25'/>
<author>
<name>YouTube</name>
<uri>http://www.youtube.com/</uri>
</author>
<generator version='beta' uri='http://gdata.youtube.com/'>YouTube data API</generator>
<openSearch:totalResults>100</openSearch:totalResults>
<openSearch:startIndex>1</openSearch:startIndex>
<openSearch:itemsPerPage>25</openSearch:itemsPerPage>
<entry>
<id>http://gdata.youtube.com/feeds/api/videos/ZTUVgYoeN_b/comments/7F2BAAD03653A691</id>
<published>2007-05-23T00:21:59.000-07:00</published>
<updated>2007-05-23T00:21:59.000-07:00</updated>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#comment'/>
<title type='text'>Walking is fun.</title>
<content type='text'>Walking is fun.</content>
<link rel='related' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/ZTUVgYoeN_b'/>
<link rel='alternate' type='text/html' href='http://www.youtube.com/watch?v=ZTUVgYoeN_b'/>
<link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/api/videos/ZTUVgYoeN_b/comments/7F2BAAD03653A691'/>
<author>
<name>andyland744</name>
<uri>http://gdata.youtube.com/feeds/api/users/andyland744</uri>
</author>
</entry>
</feed>"""
YOU_TUBE_PLAYLIST_FEED = """<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
xmlns:media='http://search.yahoo.com/mrss/'
xmlns:yt='http://gdata.youtube.com/schemas/2007'
xmlns:gd='http://schemas.google.com/g/2005'>
<id>http://gdata.youtube.com/feeds/users/andyland74/playlists?start-index=1&max-results=25</id>
<updated>2008-02-26T00:26:15.635Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#playlistLink'/>
<title type='text'>andyland74's Playlists</title>
<logo>http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo>
<link rel='related' type='application/atom+xml' href='http://gdata.youtube.com/feeds/users/andyland74'/>
<link rel='alternate' type='text/html' href='http://www.youtube.com/profile_play_list?user=andyland74'/>
<link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://gdata.youtube.com/feeds/users/andyland74/playlists'/>
<link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/users/andyland74/playlists?start-index=1&max-results=25'/>
<author>
<name>andyland74</name>
<uri>http://gdata.youtube.com/feeds/users/andyland74</uri>
</author>
<generator version='beta' uri='http://gdata.youtube.com/'>YouTube data API</generator>
<openSearch:totalResults>1</openSearch:totalResults>
<openSearch:startIndex>1</openSearch:startIndex>
<openSearch:itemsPerPage>25</openSearch:itemsPerPage>
<entry>
<id>http://gdata.youtube.com/feeds/users/andyland74/playlists/8BCDD04DE8F771B2</id>
<published>2007-11-04T17:30:27.000-08:00</published>
<updated>2008-02-22T09:55:14.000-08:00</updated>
<category scheme='http://schemas.google.com/g/2005#kind' term='http://gdata.youtube.com/schemas/2007#playlistLink'/>
<title type='text'>My New Playlist Title</title>
<content type='text'>My new playlist Description</content>
<link rel='related' type='application/atom+xml' href='http://gdata.youtube.com/feeds/users/andyland74'/>
<link rel='alternate' type='text/html' href='http://www.youtube.com/view_play_list?p=8BCDD04DE8F771B2'/>
<link rel='self' type='application/atom+xml' href='http://gdata.youtube.com/feeds/users/andyland74/playlists/8BCDD04DE8F771B2'/>
<author>
<name>andyland74</name>
<uri>http://gdata.youtube.com/feeds/users/andyland74</uri>
</author>
<yt:description>My new playlist Description</yt:description>
<gd:feedLink rel='http://gdata.youtube.com/schemas/2007#playlist' href='http://gdata.youtube.com/feeds/playlists/8BCDD04DE8F771B2'/>
</entry>
</feed>"""
YOU_TUBE_SUBSCRIPTIONS_FEED = """<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
xmlns:media='http://search.yahoo.com/mrss/'
xmlns:yt='http://gdata.youtube.com/schemas/2007'
xmlns:gd='http://schemas.google.com/g/2005'>
<id>http://gdata.youtube.com/feeds/users/andyland74/subscriptions?start-index=1&max-results=25</id>
<updated>2008-02-26T00:26:15.635Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://gdata.youtube.com/schemas/2007#subscription'/>
<title type='text'>andyland74's Subscriptions</title>
<logo>http://www.youtube.com/img/pic_youtubelogo_123x63.gif</logo>
<link rel='related' type='application/atom+xml'
href='http://gdata.youtube.com/feeds/users/andyland74'/>
<link rel='alternate' type='text/html'
href='http://www.youtube.com/profile_subscriptions?user=andyland74'/>
<link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml'
href='http://gdata.youtube.com/feeds/users/andyland74/subscriptions'/>
<link rel='self' type='application/atom+xml'
href='http://gdata.youtube.com/feeds/users/andyland74/subscriptions?start-index=1&max-results=25'/>
<author>
<name>andyland74</name>
<uri>http://gdata.youtube.com/feeds/users/andyland74</uri>
</author>
<generator version='beta' uri='http://gdata.youtube.com/'>YouTube data API</generator>
<openSearch:totalResults>1</openSearch:totalResults>
<openSearch:startIndex>1</openSearch:startIndex>
<openSearch:itemsPerPage>25</openSearch:itemsPerPage>
<entry>
<id>http://gdata.youtube.com/feeds/users/andyland74/subscriptions/d411759045e2ad8c</id>
<published>2007-11-04T17:30:27.000-08:00</published>
<updated>2008-02-22T09:55:14.000-08:00</updated>
<category scheme='http://gdata.youtube.com/schemas/2007/subscriptiontypes.cat'
term='channel'/>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://gdata.youtube.com/schemas/2007#subscription'/>
<title type='text'>Videos published by : NBC</title>
<link rel='related' type='application/atom+xml'
href='http://gdata.youtube.com/feeds/users/andyland74'/>
<link rel='alternate' type='text/html'
href='http://www.youtube.com/profile_videos?user=NBC'/>
<link rel='self' type='application/atom+xml'
href='http://gdata.youtube.com/feeds/users/andyland74/subscriptions/d411759045e2ad8c'/>
<author>
<name>andyland74</name>
<uri>http://gdata.youtube.com/feeds/users/andyland74</uri>
</author>
<yt:username>NBC</yt:username>
<gd:feedLink rel='http://gdata.youtube.com/schemas/2007#user.uploads'
href='http://gdata.youtube.com/feeds/api/users/nbc/uploads'/>
</entry>
</feed>"""
YOU_TUBE_PROFILE = """<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns='http://www.w3.org/2005/Atom'
xmlns:media='http://search.yahoo.com/mrss/'
xmlns:yt='http://gdata.youtube.com/schemas/2007'
xmlns:gd='http://schemas.google.com/g/2005'>
<id>http://gdata.youtube.com/feeds/users/andyland74</id>
<published>2006-10-16T00:09:45.000-07:00</published>
<updated>2008-02-26T11:48:21.000-08:00</updated>
<category scheme='http://gdata.youtube.com/schemas/2007/channeltypes.cat'
term='Standard'/>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://gdata.youtube.com/schemas/2007#userProfile'/>
<title type='text'>andyland74 Channel</title>
<link rel='alternate' type='text/html'
href='http://www.youtube.com/profile?user=andyland74'/>
<link rel='self' type='application/atom+xml'
href='http://gdata.youtube.com/feeds/users/andyland74'/>
<author>
<name>andyland74</name>
<uri>http://gdata.youtube.com/feeds/users/andyland74</uri>
</author>
<yt:age>33</yt:age>
<yt:username>andyland74</yt:username>
<yt:books>Catch-22</yt:books>
<yt:gender>m</yt:gender>
<yt:company>Google</yt:company>
<yt:hobbies>Testing YouTube APIs</yt:hobbies>
<yt:location>US</yt:location>
<yt:movies>Aqua Teen Hungerforce</yt:movies>
<yt:music>Elliott Smith</yt:music>
<yt:occupation>Technical Writer</yt:occupation>
<yt:school>University of North Carolina</yt:school>
<media:thumbnail url='http://i.ytimg.com/vi/YFbSxcdOL-w/default.jpg'/>
<yt:statistics viewCount='9' videoWatchCount='21' subscriberCount='1'
lastWebAccess='2008-02-25T16:03:38.000-08:00'/>
<gd:feedLink rel='http://gdata.youtube.com/schemas/2007#user.favorites'
href='http://gdata.youtube.com/feeds/users/andyland74/favorites' countHint='4'/>
<gd:feedLink rel='http://gdata.youtube.com/schemas/2007#user.contacts'
href='http://gdata.youtube.com/feeds/users/andyland74/contacts' countHint='1'/>
<gd:feedLink rel='http://gdata.youtube.com/schemas/2007#user.inbox'
href='http://gdata.youtube.com/feeds/users/andyland74/inbox' countHint='0'/>
<gd:feedLink rel='http://gdata.youtube.com/schemas/2007#user.playlists'
href='http://gdata.youtube.com/feeds/users/andyland74/playlists'/>
<gd:feedLink rel='http://gdata.youtube.com/schemas/2007#user.subscriptions'
href='http://gdata.youtube.com/feeds/users/andyland74/subscriptions' countHint='4'/>
<gd:feedLink rel='http://gdata.youtube.com/schemas/2007#user.uploads'
href='http://gdata.youtube.com/feeds/users/andyland74/uploads' countHint='1'/>
</entry>"""
NEW_CONTACT = """<?xml version='1.0' encoding='UTF-8'?>
<atom:entry xmlns:atom='http://www.w3.org/2005/Atom'
xmlns:gd='http://schemas.google.com/g/2005'>
<atom:category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/contact/2008#contact' />
<atom:title type='text'>Elizabeth Bennet</atom:title>
<atom:content type='text'>Notes</atom:content>
<gd:email rel='http://schemas.google.com/g/2005#work'
address='liz@gmail.com' />
<gd:email rel='http://schemas.google.com/g/2005#home'
address='liz@example.org' />
<gd:phoneNumber rel='http://schemas.google.com/g/2005#work'
primary='true'>(206)555-1212</gd:phoneNumber>
<gd:phoneNumber rel='http://schemas.google.com/g/2005#home'>(206)555-1213</gd:phoneNumber>
<gd:im address='liz@gmail.com'
protocol='http://schemas.google.com/g/2005#GOOGLE_TALK'
rel='http://schemas.google.com/g/2005#home' />
<gd:postalAddress rel='http://schemas.google.com/g/2005#work'
primary='true'>1600 Amphitheatre Pkwy Mountain View</gd:postalAddress>
</atom:entry>"""
CONTACTS_FEED = """<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'
xmlns:gd='http://schemas.google.com/g/2005'>
<id>http://www.google.com/m8/feeds/contacts/liz%40gmail.com/base</id>
<updated>2008-03-05T12:36:38.836Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/contact/2008#contact' />
<title type='text'>Contacts</title>
<link rel='http://schemas.google.com/g/2005#feed'
type='application/atom+xml'
href='http://www.google.com/m8/feeds/contacts/liz%40gmail.com/base' />
<link rel='http://schemas.google.com/g/2005#post'
type='application/atom+xml'
href='http://www.google.com/m8/feeds/contacts/liz%40gmail.com/base' />
<link rel='self' type='application/atom+xml'
href='http://www.google.com/m8/feeds/contacts/liz%40gmail.com/base?max-results=25' />
<author>
<name>Elizabeth Bennet</name>
<email>liz@gmail.com</email>
</author>
<generator version='1.0' uri='http://www.google.com/m8/feeds/contacts'>Contacts</generator>
<openSearch:totalResults>1</openSearch:totalResults>
<openSearch:startIndex>1</openSearch:startIndex>
<openSearch:itemsPerPage>25</openSearch:itemsPerPage>
<entry>
<id>http://www.google.com/m8/feeds/contacts/liz%40gmail.com/base/c9012de</id>
<updated>2008-03-05T12:36:38.835Z</updated>
<category scheme='http://schemas.google.com/g/2005#kind'
term='http://schemas.google.com/contact/2008#contact' />
<title type='text'>Fitzgerald</title>
<link rel='self' type='application/atom+xml'
href='http://www.google.com/m8/feeds/contacts/liz%40gmail.com/base/c9012de' />
<link rel='edit' type='application/atom+xml'
href='http://www.google.com/m8/feeds/contacts/liz%40gmail.com/base/c9012de/1204720598835000' />
<gd:phoneNumber rel='http://schemas.google.com/g/2005#home'
primary='true'>456</gd:phoneNumber>
</entry>
</feed>"""
|
#https://www.unimed.coop.br/viver-bem/pais-e-filhos/estatura-por-idade
def altura(idade, genero):
num = 0
idade = idade
idade = int(idade)
num = idade-1
if genero == 'masculino':
lista_altura_média_homens = [
[71.0,75.7,80.5],#1
[81.7,87.8,93.9],#2
[90.6,96.2,102.8],#3
[97.5,103.4,110.4],#4
[102.0,108.7,117.1],#5
[108.5,117.5,126.2],#6
[114.0,124.1,133.4],#7
[119.6,130.0,140.2],#8
[124.2,135.5,145.3],#9
[128.7,140.3,150.3],#10
[133.4,144.2,150.3],#11
[137.8,151.9,164.6],#12
[143.7,157.1,168.4],#13
[148.2,159.6,170.7],#14
[150.2,161.1,171.6],#15
[150.8,162.2,172.0],#16
[151.0,162.5,172.2],#17
[151.0,162.5,172.2],#18
]
tam = len(lista_altura_média_homens)
if idade > tam:
print("Não temos essa idade registrada. Digite uma idade de 1 a 18 anos. ")
else:
print('')
print('---'*20)
print('')
altura_min = lista_altura_média_homens[num][0]
altura_max = lista_altura_média_homens[num][2]
altura_med = lista_altura_média_homens[num][1]
print(f"""Para homens com {idade} anos de idade:
A altura média é: {altura_med} cm
A altura mínima é: {altura_min} cm
A altura máxima é: {altura_max} cm
""")
if genero == 'feminino':
lista_altura_mulheres = [
[68.9,74.0,79.2],#1
[80.0,86.4,92.9],#2
[88.4,95.7,103.5],#3
[95.2,103.2,112.3],#4
[100.0,109.1,118.8],#5
[108.0,115.9,125.4],#6
[114.0,122.3,131.7],#7
[119.1,128.0,137.4],#8
[123.6,132.9,143.4],#9
[127.7,138.6,149.3],#10
[132.3,144.7,157.4],#11
[137.8,151.9,164.6],#12
[143.7,157.1,168.4],#13
[148.2,159.6,170.7],#14
[150.2,161.1,171.6],#15
[150.8,162.2,172.0],#16
[151.0,162.5,172.2],#17
[151.0,162.5,172.2],#18
]
tam = len(lista_altura_mulheres)
if idade > tam:
print("Não temos essa idade registrada. Digite uma idade de 1 a 18 anos. ")
else:
print('')
print('---'*20)
print('')
altura_min = lista_altura_mulheres[num][0]
altura_max = lista_altura_mulheres[num][2]
altura_med = lista_altura_mulheres[num][1]
print(f"""
Para mulheres com {idade} anos de idade:
A altura média é: {altura_med} cm
A altura mínima é: {altura_min} cm
A altura máxima é: {altura_max} cm
""") |
def getQuestions(dir):
questions = []
with open(dir, 'r', encoding='utf-8') as f:
for line in f:
questions.append(line.strip())
return questions
def getTriples(dir):
triples = []
with open(dir, 'r', encoding='utf-8') as f:
for i, line in enumerate(f):
line_sp = line.strip()
line_list = line_sp.split('\t')
triples.append({
'id': line_list[0],
'triples': line_list[2]})
return triples
def getTriplesWithId(id, triples):
list = []
for triple in triples:
if triple['id'] == str(id):
list.append(triple['triples'])
return list
def format(x):
return x.strip()
|
class MyTooManyWhoisQuerisError(Exception):
pass
class MyWhoisBanError(Exception):
pass
|
def simple(func):
func.__annotation__ = "Hello"
return func
@simple
def foo():
pass
def complex(msg):
def annotate(func):
func.__annotation__ = msg
return func
return annotate
@complex("Hi")
def bar():
pass
foo
bar
class C(object):
@staticmethod
def smeth(arg0, arg1):
arg0
arg1
@classmethod
def cmeth(cls, arg0):
cls
arg0
|
{
"targets": [
{
"target_name": "EspressoLogicMinimizer",
"cflags": ["-std=c99", "-Wno-misleading-indentation", "-Wno-unused-result", "-Wno-format-overflow", "-Wno-implicit-fallthrough"],
"sources": [
"bridge/addon.cc",
"bridge/bridge.c",
"espresso-src/black_white.c",
"espresso-src/canonical.c",
"espresso-src/cofactor.c",
"espresso-src/cols.c",
"espresso-src/compl.c",
"espresso-src/contain.c",
"espresso-src/cpu_time.c",
"espresso-src/cubestr.c",
"espresso-src/cvrin.c",
"espresso-src/cvrm.c",
"espresso-src/cvrmisc.c",
"espresso-src/cvrout.c",
"espresso-src/dominate.c",
"espresso-src/equiv.c",
"espresso-src/espresso.c",
"espresso-src/essen.c",
"espresso-src/essentiality.c",
"espresso-src/exact.c",
"espresso-src/expand.c",
"espresso-src/gasp.c",
"espresso-src/gimpel.c",
"espresso-src/globals.c",
"espresso-src/hack.c",
"espresso-src/indep.c",
"espresso-src/irred.c",
"espresso-src/map.c",
"espresso-src/matrix.c",
"espresso-src/mincov.c",
"espresso-src/opo.c",
"espresso-src/pair.c",
"espresso-src/part.c",
"espresso-src/primes.c",
"espresso-src/prtime.c",
"espresso-src/reduce.c",
"espresso-src/rows.c",
"espresso-src/set.c",
"espresso-src/setc.c",
"espresso-src/sharp.c",
"espresso-src/sigma.c",
"espresso-src/signature.c",
"espresso-src/signature_exact.c",
"espresso-src/sminterf.c",
"espresso-src/solution.c",
"espresso-src/sparse.c",
"espresso-src/unate.c",
"espresso-src/util_signature.c",
"espresso-src/verify.c"
],
"include_dirs" : [
"<!(node -e \"require('nan')\")",
"espresso-src"
]
}
]
}
|
class Instance():
def __init__(self):
self.words=[]
self.labels=[]
self.words_size=0
self.words_index = []
self.label_index = [] |
LEAGUE_IDS = {
"BL": 394,
"BL2": 395,
"BL3": 403,
"FL": 396,
"FL2": 397,
"EPL": 398,
"EL1": 425,
"LLIGA": 399,
"SD": 400,
"SA": 401,
"PPL": 402,
"DED": 404,
"CL": 405
}
|
class Solution:
def findRestaurant(self, list1, list2):
"""
:type list1: List[str]
:type list2: List[str]
:rtype: List[str]
"""
dic={}
for item1 in list1:
for item2 in list2:
if item1==item2:
dic[item1]=list1.index(item1)+list2.index(item2)
return [k for k in dic if dic[k]==min(dic.values())] |
{
"targets": [
{
"target_name": "polyglot",
"sources": [ "polyglot.cpp" ]
}
]
}
|
#7-8 & 7-9
# Create our orders list
sandwich_orders = ['ham', 'bologna','pastrami', 'cheese', 'blt', 'pastrami', 'turkey', 'pastrami']
finished_sandwiches = []
# Deli is out of pastrami, so we will remove all pastrami orders.
print("\nThe deli is out of pastrami sandwiches.")
while 'pastrami' in sandwich_orders:
sandwich_orders.remove('pastrami')
# Loop through the orders and make them
for sandwich in sandwich_orders:
print(f"I finished your {sandwich} sandwich. \n")
finished_sandwiches.append(sandwich)
print(finished_sandwiches)
#7-10 Polling users about dream vacations
# Set a flag so we can break when flag is False
flag = True
# Dictionary to store users name and dream vacation location
dream_vacations = {}
while flag:
name = input("\nWhat is your name? ")
destination = input("Where is your dream vacation location? ")
dream_vacations[name] = destination
poll_again = input("Would you like to poll another person? (yes/no)")
if poll_again == 'no':
flag = False
print("- - - Results - - -")
for name, location in dream_vacations.items():
print(f"{name.title()} would go to {location}.") |
'''
--- Part Two ---
The Elves in accounting are thankful for your help; one of them even offers you a starfish coin they had left over from a past vacation.
They offer you a second one if you can find three numbers in your expense report that meet the same criteria.
Using the above example again, the three entries that sum to 2020 are 979, 366, and 675. Multiplying them together produces the answer, 241861950.
In your expense report, what is the product of the three entries that sum to 2020?
'''
# abrir y leer archivo
f = open ('input.txt','r')
mensaje = f.read()
f.close()
list_numbers = mensaje.split('\n')
for i in list_numbers:
for j in list_numbers:
for k in list_numbers:
if(int(i)+int(j)+int(k)==2020):
print(int(i)*int(j)*int(k)) |
#http://code.activestate.com/recipes/52219-associating-multiple-values-with-each-key-in-a-dic/
#https://www.oreilly.com/library/view/python-cookbook/0596001673/ch01s06.html
def repeatedValue():
# this method allows duplicate values for the same key
d = dict()
# To add a key->value pair, do this:
#d.setdefault(key, []).append(value)
d.setdefault('a',[]).append('apple')
d.setdefault('b',[]).append('ball')
d.setdefault('c',[]).append('cat')
d.setdefault('a',[]).append('aeroplane')
d.setdefault('a',[]).append('anar')
d.setdefault('b',[]).append('balloon')
#aval = d['a']
print(d)
d['a'].remove('apple')
print(d)
def nonRepeatedValue():
example = {}
example.setdefault('a', set()).add('apple')
example.setdefault('b', set()).add('ball')
example.setdefault('a', set()).add('ant')
#example.setdefault('a', set()).add('apple')
#example.setdefault('c', {})['cat']=1
#example.setdefault('a', {})['ant']=1
#example.setdefault('a', {})['apple']=1
print(example)
d = example['a']
print(d)
if __name__ == '__main__':
#repeatedValue()
nonRepeatedValue()
|
"""
Tools for managing a federated Carbon cluster.
"""
class CarbonateException(Exception):
pass
|
STATUS_ACTIVE = 1
STATUS_INACTIVE = 2
STATUS_PENDING = 3
STATUS_FAILED = 9
STATUS_DONE = 10
STATUS_DELETED = 11
STATUS_FLOW_OPEN = 1
STATUS_FLOW_PROCESSING = 2
STATUS_FLOW_PROCESSED = 3
STATUS_FLOW_COMMITTED = 4
STATUS_FLOW_ABORTED = 11
TAP_ACCESS_PUBLIC = 1
TAP_ACCESS_SUBSCRIBERS = 2
TAP_ACCESS_PRIVATE = 3
DATA_STATE_NOT_MATERIALIZED = 1
DATA_STATE_MATERIALIZED = 2
DATA_STATE_READ_ONLY = 3
DATA_STATE_REQUEST_REBUILD = 4
DATA_STATE_REBUILDING = 5
DATA_STATE_REQUEST_TRUNCATE = 6
TRX_TYPE_FLOW = 1
TRX_TYPE_CREDIT = 2
FLOW_UPLOAD = 1
FLOW_DOWNLOAD = 3
TAG_ENTITY_TYPE = 1
TAG_PRIVACY_TYPE = 2
TAG_FEED_TYPE = 3
DISPLAY_MODE_BUYER = 1
DISPLAY_MODE_SELLER = 2
DISPLAY_MODE_FULL = 3
|
# The following is just an example used in class. The actual code is below:
# running = True
# while running:
#
# try:
# query = input('Enter 1 to search phonebook, enter 2 to quit: ')
# except ValueError:
# print('Imput must be a number. Please try again.')
# continue
#
# if query == '1':
# print('Thank you.')
# elif query == '2':
# quit()
# else:
# print('I did not understand that')
# PHONEBOOK LAB
phonebook = {'Katie': {'name': 'Katie', 'number': '2109415792', 'phrase': 'friend'},
'Charlie': {'name': 'Charlie', 'number': '504699679', 'phrase': 'neighbor'},
'Chelsea': {'name': 'Chelsea', 'number': '2109415778', 'phrase': 'sister'},
'James': {'name': 'James', 'number': '5689412374', 'phrase': 'son'}}
running = True
while running:
try:
query = int(input('Enter 1 to create a contact, 2 to retrieve contact, 3 to update contact and 4 to delete contact: '))
except ValueError:
print('Imput must be a number. Please try again.')
continue
if query == 1:
add_name = str(input('Enter a name: ')).capitalize()
add_number = str(input('Enter a number: '))
add_phrase = str(input('Enter a phrase: '))
newdictionary = {'name': add_name, 'number': add_number, 'add_phrase': add_phrase}
phonebook.update(newdictionary)
print('Your new contact has been created successfully: ' + str(newdictionary.values()))
elif query == 2:
print('These are your options: ' + str(phonebook.keys()))
name = (str(input('Which contact do you want to retrieve? '))).capitalize()
if name in phonebook:
print(phonebook[name])
else:
print('There is no such name. Try again.')
elif query == 3:
upd_name = str(input('What name would you like to update? ')).capitalize()
del phonebook[upd_name]
new_name = str(input('Enter a name: ')).capitalize()
new_number = str(input('Enter a number: '))
new_phrase = str(input('Enter a phrase: '))
upd_dictionary = {'name': new_name, 'number': new_number, 'add_phrase': new_phrase}
phonebook.update(upd_dictionary)
print('Your contact has been updated successfully: ' + str(upd_dictionary.values()))
elif query == 4:
del_name = str(input('Which name would you like to delete?'))
del phonebook[del_name]
print(phonebook)
else:
print('Incorrect value. Please try again.') |
class ParticleSettingsTextureSlot:
clump_factor = None
damp_factor = None
density_factor = None
field_factor = None
gravity_factor = None
kink_amp_factor = None
kink_freq_factor = None
length_factor = None
life_factor = None
mapping = None
mapping_x = None
mapping_y = None
mapping_z = None
object = None
rough_factor = None
size_factor = None
texture_coords = None
time_factor = None
use_map_clump = None
use_map_damp = None
use_map_density = None
use_map_field = None
use_map_gravity = None
use_map_kink_amp = None
use_map_kink_freq = None
use_map_length = None
use_map_life = None
use_map_rough = None
use_map_size = None
use_map_time = None
use_map_velocity = None
uv_layer = None
velocity_factor = None
|
# Some globals gane defaults
DEFAULT_DICE_SIDES_NUMBER = 6 # Nb of side of the Dices
SCORING_DICE_VALUE = [1, 5] # List of the side values of the dice who trigger a standard score
SCORING_MULTIPLIER = [100, 50] # List of multiplier for standard score
THRESHOLD_BONUS = 3 # Threshold of the triggering for bonus in term of occurrence of the same slide value
STD_BONUS_MULTIPLIER = 100 # Standard multiplier for bonus
ACE_BONUS_MULTIPLIER = 1000 # Special multiplier for ace bonus
DEFAULT_DICES_NUMBER = 5 # Number of dices by default in the set
|
#
# PySNMP MIB module HP-ICF-INST-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HP-ICF-INST-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:34:11 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15)
#
OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier")
NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
SingleValueConstraint, ConstraintsUnion, ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ConstraintsUnion", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsIntersection")
hpSwitch, = mibBuilder.importSymbols("HP-ICF-OID", "hpSwitch")
ModuleCompliance, NotificationGroup, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup", "ObjectGroup")
Bits, TimeTicks, Counter32, Counter64, MibIdentifier, Unsigned32, NotificationType, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, Gauge32, IpAddress, Integer32, iso, ObjectIdentity = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "TimeTicks", "Counter32", "Counter64", "MibIdentifier", "Unsigned32", "NotificationType", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Gauge32", "IpAddress", "Integer32", "iso", "ObjectIdentity")
TextualConvention, DisplayString, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString", "TruthValue")
hpicfInstMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45))
hpicfInstMIB.setRevisions(('2007-09-07 00:00',))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
if mibBuilder.loadTexts: hpicfInstMIB.setRevisionsDescriptions(('Initial revision.',))
if mibBuilder.loadTexts: hpicfInstMIB.setLastUpdated('200709070000Z')
if mibBuilder.loadTexts: hpicfInstMIB.setOrganization('HP Networking')
if mibBuilder.loadTexts: hpicfInstMIB.setContactInfo('Hewlett-Packard Company 8000 Foothills Blvd. Roseville, CA 95747')
if mibBuilder.loadTexts: hpicfInstMIB.setDescription('This MIB module contains HP proprietary definitions for Instrumentation.')
hpicfInstObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 1))
hpicfInstConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 2))
hpicfInstGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 2, 1))
hpicfInstCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 2, 2))
hpicfInstEnable = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 1, 1), TruthValue().clone('true')).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpicfInstEnable.setStatus('current')
if mibBuilder.loadTexts: hpicfInstEnable.setDescription('The operational status of Instrumentation on this switch.')
hpicfInstMaxMemMB = MibScalar((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 1, 2), Integer32().clone(2)).setMaxAccess("readwrite")
if mibBuilder.loadTexts: hpicfInstMaxMemMB.setStatus('current')
if mibBuilder.loadTexts: hpicfInstMaxMemMB.setDescription('The maximum memory that can be used by Instrumentation, in megabytes.')
hpicfInstParameterTable = MibTable((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 1, 3), )
if mibBuilder.loadTexts: hpicfInstParameterTable.setStatus('current')
if mibBuilder.loadTexts: hpicfInstParameterTable.setDescription('Values of monitored instrumentation parameters.')
hpicfInstParameterEntry = MibTableRow((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 1, 3, 1), ).setIndexNames((0, "HP-ICF-INST-MIB", "hpicfInstParameterIndex"), (0, "HP-ICF-INST-MIB", "hpicfInstInterfaceIndex"), (0, "HP-ICF-INST-MIB", "hpicfInstIntervalIndex"))
if mibBuilder.loadTexts: hpicfInstParameterEntry.setStatus('current')
if mibBuilder.loadTexts: hpicfInstParameterEntry.setDescription('An entry in the hpicfInstParameterTable.')
hpicfInstParameterIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 1, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: hpicfInstParameterIndex.setStatus('current')
if mibBuilder.loadTexts: hpicfInstParameterIndex.setDescription('The index of the parameter.')
hpicfInstInterfaceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 1, 3, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: hpicfInstInterfaceIndex.setStatus('current')
if mibBuilder.loadTexts: hpicfInstInterfaceIndex.setDescription('Interface index i.e. port number for per port parameters and 0 for global parameters.')
hpicfInstIntervalIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 1, 3, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535)))
if mibBuilder.loadTexts: hpicfInstIntervalIndex.setStatus('current')
if mibBuilder.loadTexts: hpicfInstIntervalIndex.setDescription('The index of the interval.')
hpicfInstParameterName = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 1, 3, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 20))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpicfInstParameterName.setStatus('current')
if mibBuilder.loadTexts: hpicfInstParameterName.setDescription('The name of the parameter.')
hpicfInstIntervalName = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 1, 3, 1, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 20))).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpicfInstIntervalName.setStatus('current')
if mibBuilder.loadTexts: hpicfInstIntervalName.setDescription('The name of the interval.')
hpicfInstParameterValue = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 1, 3, 1, 6), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpicfInstParameterValue.setStatus('current')
if mibBuilder.loadTexts: hpicfInstParameterValue.setDescription('The current parameter value for the given interface and interval.')
hpicfInstParamValMin = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 1, 3, 1, 7), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpicfInstParamValMin.setStatus('current')
if mibBuilder.loadTexts: hpicfInstParamValMin.setDescription('The minimum value of the parameter for the given interface and interval.')
hpicfInstParamValMax = MibTableColumn((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 1, 3, 1, 8), Unsigned32()).setMaxAccess("readonly")
if mibBuilder.loadTexts: hpicfInstParamValMax.setStatus('current')
if mibBuilder.loadTexts: hpicfInstParamValMax.setDescription('The maximum value of the parameter for the given interface and interval.')
hpicfInstBaseGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 2, 1, 2)).setObjects(("HP-ICF-INST-MIB", "hpicfInstEnable"), ("HP-ICF-INST-MIB", "hpicfInstMaxMemMB"), ("HP-ICF-INST-MIB", "hpicfInstParameterName"), ("HP-ICF-INST-MIB", "hpicfInstIntervalName"), ("HP-ICF-INST-MIB", "hpicfInstParameterValue"), ("HP-ICF-INST-MIB", "hpicfInstParamValMin"), ("HP-ICF-INST-MIB", "hpicfInstParamValMax"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfInstBaseGroup = hpicfInstBaseGroup.setStatus('current')
if mibBuilder.loadTexts: hpicfInstBaseGroup.setDescription('A collection of objects to support basic Instrumentation configuration on HP switches.')
hpicfInstBaseCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 11, 2, 14, 11, 5, 1, 45, 2, 2, 1)).setObjects(("HP-ICF-INST-MIB", "hpicfInstBaseGroup"))
if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0):
hpicfInstBaseCompliance = hpicfInstBaseCompliance.setStatus('current')
if mibBuilder.loadTexts: hpicfInstBaseCompliance.setDescription('The compliance statement for HP switches running Instrumentation and implementing the HP-ICF-INST MIB.')
mibBuilder.exportSymbols("HP-ICF-INST-MIB", hpicfInstIntervalIndex=hpicfInstIntervalIndex, hpicfInstEnable=hpicfInstEnable, hpicfInstBaseGroup=hpicfInstBaseGroup, hpicfInstCompliances=hpicfInstCompliances, hpicfInstParameterEntry=hpicfInstParameterEntry, hpicfInstConformance=hpicfInstConformance, hpicfInstParameterName=hpicfInstParameterName, hpicfInstBaseCompliance=hpicfInstBaseCompliance, hpicfInstInterfaceIndex=hpicfInstInterfaceIndex, hpicfInstParamValMax=hpicfInstParamValMax, hpicfInstParameterTable=hpicfInstParameterTable, hpicfInstGroups=hpicfInstGroups, hpicfInstObjects=hpicfInstObjects, hpicfInstMaxMemMB=hpicfInstMaxMemMB, hpicfInstParameterValue=hpicfInstParameterValue, hpicfInstIntervalName=hpicfInstIntervalName, PYSNMP_MODULE_ID=hpicfInstMIB, hpicfInstMIB=hpicfInstMIB, hpicfInstParamValMin=hpicfInstParamValMin, hpicfInstParameterIndex=hpicfInstParameterIndex)
|
class Constants:
# Constants related to the core physics of the game
FIELD_LENGTH = 1800
FIELD_HEIGHT = 800
BALL_RADIUS = 8
NUM_PLAYERS = 5
GAME_LENGTH = 1800
GOAL_WIDTH = 20
MAX_BALL_VELOCITY = 10
MAX_PLAYER_VELOCITY = 5
NUM_PLAYERS = 5
PLAYER_RADIUS = 24
STARTING_POSITIONS = [[[200, 200], [200, 400], [500, 200], [500, 400], [800, 300]],
[[1600, 200], [1600, 400], [1300, 200], [1300, 400], [1000, 300]]]
|
class Layer:
def __init__(self, name, parent):
self.name = name
self.parent = parent
self.children = []
def add_child(self, child):
self.children.append(child)
|
# Answer 1.
listy = [1,5,6,4,1,2,3,5]
sub_list = [1,1,5]
# print("Original List :" + str(listy))
# print("Original sub_list : " + str(sub_list))
flag = 0
# if(all(x in listy for x in sub_list)):
# flag = 1
if (set(sub_list).issubset(set(listy))):
flag = 1
if (flag):
print("It's a Match")
else:
print("It's Gone")
# Answer 2.
def checkPrimeNumbers(num):
# for num in range(2,2500):
count = 0
for i in range(2,num):
if num%i == 0:
count = 1
if (count == 0):
# print(num, "Prime no.")
return True
else:
return False
lst = list(range(1,2500))
isPrime = filter(checkPrimeNumbers, lst)
print("prime numbers between 1 - 2500:", list(isPrime))
# Answer 3)
def getCapitalize(*arg):
for word in arg:
string = word.split(" ")
capitalized_list = [capital.capitalize() for capital in string]
words = (" ").join(capitalized_list)
print(words)
getCapitalize("hey this is sai","I am in mumbai","teaching is my passion") |
def event_handler(obj, event):
if event == lv.EVENT.VALUE_CHANGED:
print("State: %s" % ("Checked" if obj.is_checked() else "Unchecked"))
cb = lv.cb(lv.scr_act())
cb.set_text("I agree to terms and conditions.")
cb.align(None, lv.ALIGN.CENTER, 0, 0)
cb.set_event_cb(event_handler) |
K, X = map(int, input().split())
out_list = []
for i in range(X-(K-1), X+(K)):
out_list.append(str(i))
print(" ".join(out_list))
|
"""BoilerplatePython.
https://boilerplatepython.readthedocs.io/
https://github.com/Robpol86/boilerplatepython
https://pypi.org/project/boilerplatepython
"""
__author__ = "@Robpol86"
__license__ = "BSD-2-Clause"
__version__ = "0.0.1"
|
"""
Header class, a dictionary that contains information about the file content
"""
class Header(dict):
"""
Header class, a dictionary that contains information about the file content
"""
def is_proper(self):
"Whether it is an header created by lyncs_io"
return "_lyncs_io" in self
|
class Solution:
def minimumEffort(self, tasks: List[List[int]]) -> int:
tasks.sort(key=lambda x: x[1]-x[0])
answer=0
for actual, req in tasks:
answer=max(answer+actual,req)
return answer |
class ParserMeta(type):
registry = {}
def __new__(cls, name, bases, ns):
result = type.__new__(cls, name, bases, ns)
if name != 'Parser':
domains = ns['domains']
for domain in domains:
cls.registry[domain] = result
return result
class UnknownParser:
@staticmethod
def normalize_url(url):
return url
@staticmethod
def get_title(url):
# TODO: load URL, extract <title> tag
return ''
def get_parser(domain):
return ParserMeta.registry.get(domain, UnknownParser)
class Parser(metaclass=ParserMeta):
pass
class YouTube(Parser):
domains = ['youtube.com', 'youtube.de']
@staticmethod
def normalize_url(url):
pass
@staticmethod
def get_title(url):
pass
class BandCamp(Parser):
domains = ['bandcamp.com']
@staticmethod
def normalize_url(url):
pass
@staticmethod
def get_title(url):
pass
if __name__ == '__main__':
print(get_parser('youtube.com'))
print(get_parser('bandcamp.com'))
print(get_parser('meine-band.de'))
|
""":mod:`wand.exceptions` --- Errors and warnings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This module maps MagickWand API's errors and warnings to Python's native
exceptions and warnings. You can catch all MagickWand errors using Python's
natural way to catch errors.
.. seealso::
`ImageMagick Exceptions <http://www.imagemagick.org/script/exception.php>`_
.. versionadded:: 0.1.1
.. versionchanged:: 0.5.8
Warning & Error Exceptions are now explicitly defined. Previously
ImageMagick domain-based errors were dynamically generated at runtime.
"""
class WandException(Exception):
"""All Wand-related exceptions are derived from this class."""
class BaseWarning(WandException, Warning):
"""Base class for Wand-related warnings.
.. versionadded:: 0.4.4
"""
class BaseError(WandException):
"""Base class for Wand-related errors.
.. versionadded:: 0.4.4
"""
class BaseFatalError(WandException):
"""Base class for Wand-related fatal errors.
.. versionadded:: 0.4.4
"""
class WandLibraryVersionError(WandException):
"""Base class for Wand-related ImageMagick version errors.
.. versionadded:: 0.3.2
"""
class WandRuntimeError(WandException, RuntimeError):
"""Generic class for Wand-related runtime errors.
.. versionadded:: 0.5.2
"""
class ResourceLimitWarning(BaseWarning, MemoryError):
"""A program resource is exhausted e.g. not enough memory."""
wand_error_code = 300
class ResourceLimitError(BaseError, MemoryError):
"""A program resource is exhausted e.g. not enough memory."""
wand_error_code = 400
class ResourceLimitFatalError(BaseFatalError, MemoryError):
"""A program resource is exhausted e.g. not enough memory."""
wand_error_code = 700
class TypeWarning(BaseWarning):
"""A font is unavailable; a substitution may have occurred."""
wand_error_code = 305
class TypeError(BaseError):
"""A font is unavailable; a substitution may have occurred."""
wand_error_code = 405
class TypeFatalError(BaseFatalError):
"""A font is unavailable; a substitution may have occurred."""
wand_error_code = 705
class OptionWarning(BaseWarning):
"""A command-line option was malformed."""
wand_error_code = 310
class OptionError(BaseError):
"""A command-line option was malformed."""
wand_error_code = 410
class OptionFatalError(BaseFatalError):
"""A command-line option was malformed."""
wand_error_code = 710
class DelegateWarning(BaseWarning):
"""An ImageMagick delegate failed to complete."""
wand_error_code = 315
class DelegateError(BaseError):
"""An ImageMagick delegate failed to complete."""
wand_error_code = 415
class DelegateFatalError(BaseFatalError):
"""An ImageMagick delegate failed to complete."""
wand_error_code = 715
class MissingDelegateWarning(BaseWarning, ImportError):
"""The image type can not be read or written because the appropriate;
delegate is missing."""
wand_error_code = 320
class MissingDelegateError(BaseError, ImportError):
"""The image type can not be read or written because the appropriate;
delegate is missing."""
wand_error_code = 420
class MissingDelegateFatalError(BaseFatalError, ImportError):
"""The image type can not be read or written because the appropriate;
delegate is missing."""
wand_error_code = 720
class CorruptImageWarning(BaseWarning, ValueError):
"""The image file may be corrupt."""
wand_error_code = 325
class CorruptImageError(BaseError, ValueError):
"""The image file may be corrupt."""
wand_error_code = 425
class CorruptImageFatalError(BaseFatalError, ValueError):
"""The image file may be corrupt."""
wand_error_code = 725
class FileOpenWarning(BaseWarning, IOError):
"""The image file could not be opened for reading or writing."""
wand_error_code = 330
class FileOpenError(BaseError, IOError):
"""The image file could not be opened for reading or writing."""
wand_error_code = 430
class FileOpenFatalError(BaseFatalError, IOError):
"""The image file could not be opened for reading or writing."""
wand_error_code = 730
class BlobWarning(BaseWarning, IOError):
"""A binary large object could not be allocated, read, or written."""
wand_error_code = 335
class BlobError(BaseError, IOError):
"""A binary large object could not be allocated, read, or written."""
wand_error_code = 435
class BlobFatalError(BaseFatalError, IOError):
"""A binary large object could not be allocated, read, or written."""
wand_error_code = 735
class StreamWarning(BaseWarning, IOError):
"""There was a problem reading or writing from a stream."""
wand_error_code = 340
class StreamError(BaseError, IOError):
"""There was a problem reading or writing from a stream."""
wand_error_code = 440
class StreamFatalError(BaseFatalError, IOError):
"""There was a problem reading or writing from a stream."""
wand_error_code = 740
class CacheWarning(BaseWarning):
"""Pixels could not be read or written to the pixel cache."""
wand_error_code = 345
class CacheError(BaseError):
"""Pixels could not be read or written to the pixel cache."""
wand_error_code = 445
class CacheFatalError(BaseFatalError):
"""Pixels could not be read or written to the pixel cache."""
wand_error_code = 745
class CoderWarning(BaseWarning):
"""There was a problem with an image coder."""
wand_error_code = 350
class CoderError(BaseError):
"""There was a problem with an image coder."""
wand_error_code = 450
class CoderFatalError(BaseFatalError):
"""There was a problem with an image coder."""
wand_error_code = 750
class ModuleWarning(BaseWarning):
"""There was a problem with an image module."""
wand_error_code = 355
class ModuleError(BaseError):
"""There was a problem with an image module."""
wand_error_code = 455
class ModuleFatalError(BaseFatalError):
"""There was a problem with an image module."""
wand_error_code = 755
class DrawWarning(BaseWarning):
"""A drawing operation failed."""
wand_error_code = 360
class DrawError(BaseError):
"""A drawing operation failed."""
wand_error_code = 460
class DrawFatalError(BaseFatalError):
"""A drawing operation failed."""
wand_error_code = 760
class ImageWarning(BaseWarning):
"""The operation could not complete due to an incompatible image."""
wand_error_code = 365
class ImageError(BaseError):
"""The operation could not complete due to an incompatible image."""
wand_error_code = 465
class ImageFatalError(BaseFatalError):
"""The operation could not complete due to an incompatible image."""
wand_error_code = 765
class WandWarning(BaseWarning):
"""There was a problem specific to the MagickWand API."""
wand_error_code = 370
class WandError(BaseError):
"""There was a problem specific to the MagickWand API."""
wand_error_code = 470
class WandFatalError(BaseFatalError):
"""There was a problem specific to the MagickWand API."""
wand_error_code = 770
class RandomWarning(BaseWarning):
"""There is a problem generating a true or pseudo-random number."""
wand_error_code = 375
class RandomError(BaseError):
"""There is a problem generating a true or pseudo-random number."""
wand_error_code = 475
class RandomFatalError(BaseFatalError):
"""There is a problem generating a true or pseudo-random number."""
wand_error_code = 775
class XServerWarning(BaseWarning):
"""An X resource is unavailable."""
wand_error_code = 380
class XServerError(BaseError):
"""An X resource is unavailable."""
wand_error_code = 480
class XServerFatalError(BaseFatalError):
"""An X resource is unavailable."""
wand_error_code = 780
class MonitorWarning(BaseWarning):
"""There was a problem activating the progress monitor."""
wand_error_code = 385
class MonitorError(BaseError):
"""There was a problem activating the progress monitor."""
wand_error_code = 485
class MonitorFatalError(BaseFatalError):
"""There was a problem activating the progress monitor."""
wand_error_code = 785
class RegistryWarning(BaseWarning):
"""There was a problem getting or setting the registry."""
wand_error_code = 390
class RegistryError(BaseError):
"""There was a problem getting or setting the registry."""
wand_error_code = 490
class RegistryFatalError(BaseFatalError):
"""There was a problem getting or setting the registry."""
wand_error_code = 790
class ConfigureWarning(BaseWarning):
"""There was a problem getting a configuration file."""
wand_error_code = 395
class ConfigureError(BaseError):
"""There was a problem getting a configuration file."""
wand_error_code = 495
class ConfigureFatalError(BaseFatalError):
"""There was a problem getting a configuration file."""
wand_error_code = 795
class PolicyWarning(BaseWarning):
"""A policy denies access to a delegate, coder, filter, path, or
resource."""
wand_error_code = 399
class PolicyError(BaseError):
"""A policy denies access to a delegate, coder, filter, path, or
resource."""
wand_error_code = 499
class PolicyFatalError(BaseFatalError):
"""A policy denies access to a delegate, coder, filter, path, or
resource."""
wand_error_code = 799
#: (:class:`dict`) The dictionary of (code, exc_type).
TYPE_MAP = {
300: ResourceLimitWarning,
305: TypeWarning,
310: OptionWarning,
315: DelegateWarning,
320: MissingDelegateWarning,
325: CorruptImageWarning,
330: FileOpenWarning,
335: BlobWarning,
340: StreamWarning,
345: CacheWarning,
350: CoderWarning,
355: ModuleWarning,
360: DrawWarning,
365: ImageWarning,
370: WandWarning,
375: RandomWarning,
380: XServerWarning,
385: MonitorWarning,
390: RegistryWarning,
395: ConfigureWarning,
399: PolicyWarning,
400: ResourceLimitError,
405: TypeError,
410: OptionError,
415: DelegateError,
420: MissingDelegateError,
425: CorruptImageError,
430: FileOpenError,
435: BlobError,
440: StreamError,
445: CacheError,
450: CoderError,
455: ModuleError,
460: DrawError,
465: ImageError,
470: WandError,
475: RandomError,
480: XServerError,
485: MonitorError,
490: RegistryError,
495: ConfigureError,
499: PolicyError,
700: ResourceLimitFatalError,
705: TypeFatalError,
710: OptionFatalError,
715: DelegateFatalError,
720: MissingDelegateFatalError,
725: CorruptImageFatalError,
730: FileOpenFatalError,
735: BlobFatalError,
740: StreamFatalError,
745: CacheFatalError,
750: CoderFatalError,
755: ModuleFatalError,
760: DrawFatalError,
765: ImageFatalError,
770: WandFatalError,
775: RandomFatalError,
780: XServerFatalError,
785: MonitorFatalError,
790: RegistryFatalError,
795: ConfigureFatalError,
799: PolicyFatalError,
}
|
class Solution:
def characterReplacement(self, s, k):
"""
:type s: str
:type k: int
:rtype: int
"""
dic, start, end = {}, 0, 0
for end in range(1, len(s)+1):
if not s[end-1] in dic: dic[s[end-1]] = 1
else: dic[s[end-1]] += 1
if end-start-max(dic.values()) > k:
dic[s[start]] -= 1
start += 1
return end-start |
# Trabajando con ciclos for
x = 1
y = 12
z = 2
print("Mi nombre es ")
for item in range(x, y, z):
print(f"@Mangusoft se repetira {item}")
# if item == 3:
# break
|
class Symbol:
def __init__(
self, lexeme, type, category, value, scope, extends, implements, params
):
self.__lexeme__ = lexeme
self.__type__ = type
self.__category__ = category
self.__value__ = value
self.__scope__ = scope
self.__extends__ = extends
self.__implements__ = implements
self.__params__ = params
@property
def lexeme(self):
return self.__lexeme__
@lexeme.setter
def lexeme(self, lexeme):
self.__lexeme__ = lexeme
@property
def type(self):
return self.__type__
@type.setter
def type(self, type):
self.__type__ = type
@property
def category(self):
return self.__category__
@category.setter
def category(self, category):
self.__category__ = category
@property
def value(self):
return self.__value__
@value.setter
def value(self, value):
self.__value__ = value
@property
def scope(self):
return self.__scope__
@scope.setter
def scope(self, scope):
self.__scope__ = scope
@property
def extends(self):
return self.__extends__
@extends.setter
def extends(self, extends):
self.__extends__ = extends
@property
def implements(self):
return self.__implements__
@implements.setter
def implements(self, implements):
self.__implements__ = implements
@property
def params(self):
return self.__params__
@params.setter
def params(self, params):
self.__params__ = params
|
"""
Definition of ListNode
class ListNode(object):
def __init__(self, val, next=None):
self.val = val
self.next = next
"""
class Solution:
"""
@param head: ListNode head is the head of the linked list
@param m: An integer
@param n: An integer
@return: The head of the reversed ListNode
"""
def reverseBetween(self, head, m, n):
i = 0
node = head
if m == n:
return head
pre_node = None
reverse_start = None
while node:
i += 1
next_node = node.next
if i == m - 1:
reverse_start = node
if i == m:
reverse_end = node
pre_node = node
if i > m and i < n:
node.next = pre_node
pre_node = node
if i == n:
node.next = pre_node
reverse_end.next = next_node
if reverse_start:
reverse_start.next = node
else:
return node
node = next_node
return head
|
# Implement a method tht accepts 3 integer values "a, b and c".
# The method should return True if a triangle can be built with the sides of given length and False in any other case.
# All triangles must have surface greater than 0 to be accepted
def is_triangle(a, b, c):
return True if a+b>c and a+c>b and c+b>a else False
|
number1 = input("Please enter a number and press enter: ")
number2 = input("Please enter another nunber and press enter ")
number1 = int(number1)
number2 = int(number2)
print("number1 + number2 =", number1+number2)
|
def solution(A, K):
shift = K % len(A)
if shift == 0:
return A
shifted_array = []
for i in range(-shift, len(A) - shift):
shifted_array.append(A[i])
return shifted_array
|
pilha = []
exp = str(input('Digite a expressão: '))
for parenteses in exp:
if parenteses == '(':
pilha.append('(')
elif parenteses == ')':
if len(pilha) > 0:
pilha.pop()
break
print('_' * 30)
if len(pilha) == 0:
print('Expressão VÁLIDA!')
else:
print('Expressão INVÁLIDA!')
|
s = list(input())
a = "".join(s[:5])
b = "".join(s[6:13])
c = "".join(s[14:21])
print(a,b,c) |
# AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"Helpers": "Helpers.ipynb",
"notify": "Helpers.ipynb",
"keys": "Helpers.ipynb",
"scanDb": "Helpers.ipynb",
"toDf": "Helpers.ipynb",
"fromSeries": "Helpers.ipynb",
"fromDf": "Helpers.ipynb",
"fromDict": "Helpers.ipynb",
"toListDict": "Helpers.ipynb",
"toSeries": "Helpers.ipynb",
"setNoUpdate": "Helpers.ipynb",
"setUpdate": "Helpers.ipynb",
"DATABASE_TABLE_NAME": "database.ipynb",
"INVENTORY_BUCKET_NAME": "database.ipynb",
"INPUT_BUCKET_NAME": "database.ipynb",
"REGION": "database.ipynb",
"ACCESS_KEY_ID": "database.ipynb",
"SECRET_ACCESS_KEY": "database.ipynb",
"LINEKEY": "database.ipynb",
"createIndex": "KeySchema.ipynb",
"KeySchema": "KeySchema.ipynb",
"DBHASHLOCATION": "database.ipynb",
"DBCACHELOCATION": "database.ipynb",
"ALLDATAKEY": "S3.ipynb",
"DEFAULTKEYS": "S3.ipynb",
"S3Cache": "S3.ipynb",
"loadFromCache": "S3.ipynb",
"saveRemoteCache": "S3.ipynb",
"resetS3Cache": "S3.ipynb",
"BRANCH": "database.ipynb",
"VALUEUPDATESCHEMAURL": "Update.ipynb",
"Updater": "Update.ipynb",
"updateWithDict": "Update.ipynb",
"ValueUpdate2": "Update.ipynb",
"saveBatchToDynamodb": "Update.ipynb",
"saveBatchToDynamodb2": "Update.ipynb",
"valueUpdate2": "Update.ipynb",
"INTCOLS": "database.ipynb",
"ECOMMERCE_COL_LIST": "database.ipynb",
"ProductDatabase": "database.ipynb",
"cacheDb": "database.ipynb",
"lambdaDumpToS3": "database.ipynb",
"lambdaDumpOnlineS3": "database.ipynb",
"Product": "database.ipynb",
"ValueUpdate": "database.ipynb",
"chunks": "database.ipynb",
"lambdaUpdateProduct": "database.ipynb",
"updateS3Input": "database.ipynb",
"lambdaUpdateS3": "database.ipynb",
"ProductsFromList": "query.ipynb",
"lambdaProductsFromList": "database.ipynb",
"lambdaSingleQuery": "database.ipynb",
"lambdaAllQuery": "database.ipynb",
"lambdaAllQueryFeather": "database.ipynb",
"Querier": "query.ipynb",
"allQuery": "query.ipynb",
"productsFromList": "query.ipynb",
"singleProductQuery": "query.ipynb"}
modules = ["helpers.py",
"schema.py",
"s3.py",
"update.py",
"database.py",
"query.py"]
doc_url = "https://thanakijwanavit.github.io/villaProductDatabase/"
git_url = "https://github.com/thanakijwanavit/villaProductDatabase/tree/master/"
def custom_doc_links(name): return None
|
"""
Este archivo contiene todas las funciones del desafio a mimir
"""
def mimir(dia_semana, vacacion):
"""
El parametro dia_semana es True si estamos en un dia de la semana,
el parametro vacacion es True si estamos en vacaciones.
Podemos mimir si no es dia de semana o si estamos en vacaciones.
Devolver True si podemos mimir
mimir(False, False) → True
mimir(True, False) → False
mimir(False, True) → True
mimir(True, True) → True
"""
print("not implemented")
# Validemos tu respuesta!
if __name__ == "__main__":
"""
Descomentá el desafio que desees testear
"""
right = True
checkers = [[False, False, True], [True, False, False],
[False, True, True], [True, True, True]]
for check in checkers:
if mimir(check[0], check[1]) == check[2]:
res = "Correcto"
else:
res = f"Oh no! mimir falló para dia_semana: {check[0]}, vacacion: {check[1]} no retornó {check[2]}"
right = False
break
if right:
res = "Todo Correcto!"
print(res)
|
def Contract_scalar_2x5(\
t0_6,t1_6,t2_6,t3_6,\
t0_5,t1_5,t2_5,t3_5,\
t0_4,t1_4,t2_4,t3_4,\
t0_3,t1_3,t2_3,t3_3,\
t0_2,t1_2,t2_2,t3_2,\
t0_1,t1_1,t2_1,t3_1,\
t0_0,t1_0,t2_0,t3_0,\
o1_5,o2_5,\
o1_4,o2_4,\
o1_3,o2_3,\
o1_2,o2_2,\
o1_1,o2_1\
):
##############################
# ./input/input_Lx2Ly5.dat
##############################
# (o1_2*(t1_2*((t0_2*((t1_1*((t1_1.conj()*o1_1)*(t1_0*(t0_0*t0_1))))*(t2_1*((o2_1*t2_1.conj())*(t2_0*(t3_0*t3_1))))))*(t1_2.conj()*(t2_2.conj()*((o2_2*t2_2)*(t3_2*(t0_3*(t1_3.conj()*((t1_3*o1_3)*(t2_3*((t2_3.conj()*o2_3)*(t3_3*(t0_4*(t1_4*((t1_4.conj()*o1_4)*(t2_4*((t2_4.conj()*o2_4)*(t3_4*((t2_5*((o2_5*t2_5.conj())*(t2_6*(t3_6*t3_5))))*(t1_5.conj()*((o1_5*t1_5)*(t0_5*(t0_6*t1_6))))))))))))))))))))))))
# cpu_cost= 3.22004e+13 memory= 4.00042e+10
# final_bond_order ()
##############################
return np.tensordot(
o1_2, np.tensordot(
t1_2, np.tensordot(
np.tensordot(
t0_2, np.tensordot(
np.tensordot(
t1_1, np.tensordot(
np.tensordot(
t1_1.conj(), o1_1, ([4], [1])
), np.tensordot(
t1_0, np.tensordot(
t0_0, t0_1, ([1], [0])
), ([1], [0])
), ([0, 3], [5, 2])
), ([0, 3, 4], [6, 4, 2])
), np.tensordot(
t2_1, np.tensordot(
np.tensordot(
o2_1, t2_1.conj(), ([1], [4])
), np.tensordot(
t2_0, np.tensordot(
t3_0, t3_1, ([0], [1])
), ([0], [0])
), ([3, 4], [5, 2])
), ([2, 3, 4], [6, 4, 0])
), ([1, 3, 4], [0, 2, 4])
), ([0], [2])
), np.tensordot(
t1_2.conj(), np.tensordot(
t2_2.conj(), np.tensordot(
np.tensordot(
o2_2, t2_2, ([0], [4])
), np.tensordot(
t3_2, np.tensordot(
t0_3, np.tensordot(
t1_3.conj(), np.tensordot(
np.tensordot(
t1_3, o1_3, ([4], [0])
), np.tensordot(
t2_3, np.tensordot(
np.tensordot(
t2_3.conj(), o2_3, ([4], [1])
), np.tensordot(
t3_3, np.tensordot(
t0_4, np.tensordot(
t1_4, np.tensordot(
np.tensordot(
t1_4.conj(), o1_4, ([4], [1])
), np.tensordot(
t2_4, np.tensordot(
np.tensordot(
t2_4.conj(), o2_4, ([4], [1])
), np.tensordot(
t3_4, np.tensordot(
np.tensordot(
t2_5, np.tensordot(
np.tensordot(
o2_5, t2_5.conj(), ([1], [4])
), np.tensordot(
t2_6, np.tensordot(
t3_6, t3_5, ([1], [0])
), ([1], [0])
), ([2, 3], [2, 5])
), ([1, 2, 4], [4, 6, 0])
), np.tensordot(
t1_5.conj(), np.tensordot(
np.tensordot(
o1_5, t1_5, ([0], [4])
), np.tensordot(
t0_5, np.tensordot(
t0_6, t1_6, ([1], [0])
), ([1], [0])
), ([1, 2], [1, 4])
), ([0, 1, 4], [4, 6, 0])
), ([0, 2, 4], [2, 0, 5])
), ([0], [2])
), ([1, 2], [4, 2])
), ([1, 2, 4], [5, 4, 2])
), ([1, 2], [5, 2])
), ([1, 2, 4], [7, 3, 2])
), ([1, 2, 3], [7, 0, 2])
), ([0], [5])
), ([1, 2], [7, 2])
), ([1, 2, 4], [8, 4, 2])
), ([1, 2], [6, 0])
), ([1, 2, 4], [8, 4, 2])
), ([1, 2, 3], [7, 2, 0])
), ([0], [5])
), ([2, 3], [6, 1])
), ([1, 2, 4], [8, 4, 0])
), ([1, 2], [6, 0])
), ([0, 2, 4, 5, 6, 7], [7, 0, 1, 5, 3, 6])
), ([0, 1, 2, 3], [0, 4, 3, 1])
), ([0, 1], [0, 1])
)
|
"""
Jupyter notebook config
https://jupyter-notebook.readthedocs.io/en/stable/config.html
"""
def scrub_output_pre_save(model, **kwargs):
"""
Scrub notebook output before saving
https://gist.github.com/binaryfunt/f31a7ecc8d698dd0edbec1489f2ab055
"""
# Only run on notebooks
if model["type"] != "notebook":
return
# Only run on nbformat v4
if model["content"]["nbformat"] != 4:
return
for cell in model["content"]["cells"]:
if cell["cell_type"] != "code":
continue
cell["outputs"] = []
cell["execution_count"] = None
if "collapsed" in cell["metadata"]:
cell["metadata"].pop("collapsed", 0)
c.FileContentsManager.pre_save_hook = scrub_output_pre_save
|
class TreeNode(object):
def __init__(self, value):
self.value = value
self.left = None
self.right = None
# store the number of left child for each tree Node
self.num_of_left = 0
# store the max height difference
self.max_diff = float('-inf')
self.max_diff_node = None |
class Config(object):
VERSION = "0.1.1"
TEMPLATES_PATH = "config/"
HEADERS = "headers.template"
MAIL_FROM = "notify@example.com"
MAIL_TO = "root@example.org"
SUBJECT = "Mail from mailer.py\n\n"
TEMPLATE = "default.message"
|
'''
Write a program which takes an array of n integers,
where A[i] denotes the maximum you can advance from
index l, and returns whether it is possible to advance
to the last index starting from the beginning of the array.
'''
def can_reach_end(array): # Time: O(n) | Space: O(1)
furthest_reached = 0
last_index = len(array) - 1
i = 0
while i <= furthest_reached and furthest_reached < last_index:
furthest_reached = max(furthest_reached, array[i] + i)
i += 1
return furthest_reached
assert(can_reach_end([3, 3, 1, 0, 2, 0, 1]) == 6)
assert(can_reach_end([3, 2, 0, 0, 2, 0, 1]) == 3)
assert(can_reach_end([3, 2, -1, 0, 2, 0, 1]) == 3)
|
def pubkeys(obj):
keys = list()
for key in (key for key in dir(obj) if not key.startswith('_')):
keys.append(key)
return keys
|
num_queries = int(input())
def executeQuery(num_queries):
stack = list()
string = ""
k = 0
for i in range(num_queries):
q = input().split()
if(q[0] == '4'):
string = stack.pop()
elif(q[0] == '1'):
stack.append(string)
string += q[1]
elif(q[0] == '2'):
str_len = len(string)
stack.append(string)
k = int(q[1])
if(str_len == k):
string = ""
else:
string = string[0:str_len - k]
else:
print(string[int(q[1]) - 1])
executeQuery(num_queries) |
"""
Return sum of iterable and start value
--------------------------------------
Input: value optional: start value
Return: sum of values
"""
numbers = [0, 1, 2, 3, 4, 5]
print('numbers: {}\n sum: {}'.format(numbers, sum(numbers)))
start_value = 10
print('numbers: {} + start value: {}\n sum: {}'.format(numbers, start_value, sum(numbers, start_value)))
numbers = [0, 1, 2, 3, 4, 5, -10]
print('numbers: {}\n sum: {}'.format(numbers, sum(numbers))) |
ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
with open("p022_names.txt") as f:
names = f.read().split(",")
names = [x.replace("\"", "") for x in names]
names.sort()
total = 0
for i, name in enumerate(names):
score = 0
for letter in name:
score += ALPHABET.index(letter) + 1
total += (i + 1) * score
print(total)
|
# data = [1,2,3,4,5,6,7]
data = [2,1,4,6,7,5,3,9,10,8]
print(data)
def heap_min(data):
length = len(data)
for i in range(length-1,-1, -1):
if data[i] < data[i//2]:
data[i],data[i//2] = data[i//2],data[i]
return data
def sort(data):
ll = []
length = len(data)
for i in range(0,length):
data = heap_min(data[:])
ll.append(data[0])
del data[0]
print(data)
return ll
data = sort(data)
print(data)
|
""" Node is defined as
class node:
def __init__(self, data):
self.data = data
self.left = None
self.right = None
"""
def check_binary_search_tree_(root, minBound = 0, maxBound = 10000):
if root.left is not None:
if root.left.data >= root.data:
return False
if not minBound <= root.left.data <= maxBound:
return False
if not check_binary_search_tree_(root.left, minBound, root.data - 1):
return False
if root.right is not None:
if root.right.data <= root.data:
return False
if not minBound <= root.right.data <= maxBound:
return False
if not check_binary_search_tree_(root.right, root.data + 1, maxBound):
return False
return True |
#Intersection: Given two (singly) linked lists, determine if the two lists intersect.
#Return the intersecting node. Note that the intersection is defined based on reference,
#not value. That is, if the kth node of the first linked list is the exact same node (by
#reference) as the jth node of the second linked list, then they are intersecting
#in Python i can compare objects its the same? A: yes
#Since i got classes i can pass the var by "reference" cause it will be the object
#The only way its possible is if the second linked list is at the end of the first one
# i.e 1->2->3->4->5->6 && 4->5->6 i cannot have and intersecting linked list in the middle
#of the other one cause then it wont point to the same next object and so on
#asuming that i could just traverse it until i find the first node
class LinkedList:
def __init__(self,value):
self.next=None
self.value=value
def add(self,value):
head = self
while head.next != None:
head = head.next
head.next= LinkedList(value)
def push(self,value):
new_head=LinkedList(value)
new_head.next=self
return new_head
def print(self):
head = self
while head.next != None:
print(head.value, end = '')
head = head.next
print(head.value)
def intersection(l1,l2): #O(n)
while l1:
if l1 == l2: # worst caseO(n)
return l1
l1=l1.next
return None
l = LinkedList(2)
l.add(3)
l.add(2)
l.add(1)
l.add(2)
l.add(5)
l.add(3)
l.add(7)
l.print() # 23212537
print(intersection(l,l.next.next.next).value) #1
l2 = LinkedList(2)
l2.add(3)
l2.add(2)
l2.add(1)
l2.add(2)
l2.add(5)
l2.add(3)
l2.add(7)
print(intersection(l,l2))#None
# Since i thought it was really easy i read some hints so i have to check if either l1
#intersects l2 or l2 intersects l1
def intersection2(l1,l2): #O(n+m)
l1cp=l1
while l1:
if l1 == l2: # worst case O(n)
return l1
l1=l1.next
while l2:
if l1cp ==l2: # worst case O(m)
return l2
l2=l2.next
return None
print(intersection2(l.next.next.next,l).value)#1
print(intersection2(l2,l))#None
print(intersection(l.next.next.next,l)) #None |
def factorial(a):
if a == 1:
return 1
else:
return (a * factorial(a-1))
num = 7
print("The factorial of", num, "is", factorial(num))
|
"""
from predict import get_most_likely_author
from iris import iris_predict_one, score
# STUFF FROM CLASS. DOESN'T HAVE base.html
@app.route('/add_author')
def add_author():
twitter_handle = request.args['twitter_handle']
new_user = upsert_user(twitter_handle, nlp)
return '{}\'s tweets added to the database: {}'.format(new_user.name , ', '.join([t.text for t in new_user.tweets]))
@app.route('/predict_author')
def predict_author():
tweet_to_classify = request.args['tweet_to_classify']
users = [user.name for user in User.query.all()]
most_likely_author = get_most_likely_author(users, tweet_to_classify, nlp)
return most_likely_author
@app.route('/latest_tweet')
def latest_tweet():
twitter_handle = request.args['twitter_handle']
twitter_user = retrieve_user(twitter_handle)
return f'@{twitter_user.name}\'s latest tweet in the DB is: {twitter_user.tweets[-1].text}'
@app.route('/iris')
def iris():
prediction = iris_predict_one(200)
return str(prediction)
@app.route('/iris_score')
def iris_score():
return str(score())
# STUFF FROM CLASS JUNE 10 -- NOT WORKING
# ALSO REMOVED twitter FROM IMPORT STATEMENTS
# For example, changed to 'from .twitter.data.model'
def create_app():
app = Flask(__name__)
# add twitter api
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///twitter_db.sqlite3'
DB.init_app(app)
# pdb.set_trace()
nlp_path = os.path.join('/'.join(os.path.abspath(__file__).split('/')[:-1]), 'my_model')
nlp = spacy.load(nlp_path)
@app.route('/')
def root():
return render_template('base.html', title='Predictor', users=User.query.all())
@app.route('/user', methods=['POST'])
@app.route('/user/<name>', methods=['GET'])
def user(name=None, message=''):
name = name or request.values["user_name"]
try:
if request.method == "POST":
upsert_user(name, nlp)
message = f"User {name} successfully added!"
tweets = User.query.filter(User.name == name).one().tweets
except Exception as e:
message = f"Error adding {name}: {e}"
tweets = []
return render_template("user.html", title=name, tweets=tweets, message=message)
@app.route('/compare', methods=["POST"])
def compare():
# getting users and hypothetical tweet from client
user0, user1 = sorted(
[request.values['user0'], request.values['user1']])
tweet_to_classify = request.values["tweet_text"]
# stops clients from comparing same user
if user0 == user1:
message = "Cannot compare users to themselves!"
else:
# Function returns a tuple of (prediction, probability)
prediction = compare_two_tweets(user0, user1, tweet_to_classify, nlp)
message = 'The tweet "{}" is more likely to be from @{} than @{} at {}% probability.'.format(
tweet_to_classify,
# Changed 2 to 1 and 1 to 0. NOT TESTED
user1 if prediction[0] == 0 else user0,
user0 if prediction[0] == 1 else user1,
prediction[1]
)
return render_template('prediction.html', title='Prediction', message=message)
return app
# if __name__ == '__main__':
# app.run()
In __init__.py:
from .twitter_app import create_app
APP = create_app()
"""
|
batch = [[1, 5, 6, 2], # shape (8,4)
[3, 2, 1, 3],
[5, 2, 1, 2],
[6, 4, 8, 4],
[2, 8, 5, 3],
[1, 1, 9, 4],
[6, 6, 0, 4],
[8, 7, 6, 4]]
# https://nnfs.io/lqw
# https://nnfs.io/vyu
# https://nnfs.io/jei
# https://nnfs.io/bkw
|
class Messenger(object):
def __init__(self, logger, messageDisplay):
self.logger = logger
self.messageDisplay = messageDisplay
#Test this...
def sendMessage(self, message):
self.logger.info(message)
def sendUpdate(self, message):
# this should update the button text -- probably does not belong on this object
self.logger.info(message)
def showSaveAndExit(self):
return self.messageDisplay.askquestion(
'Save And Quit', 'Would you like to save your changes?')
def showCardIsNotPaired(self):
self.messageDisplay.showinfo(
'Card Unassigned', 'Card is not currently assigned to a video')
def showCannotPairToInactiveVideos(self):
self.messageDisplay.showinfo('Video Is Not Active',
'This video\'s file wasn\'t found on the last scan. Please rescan, and pair again.')
def showCardScannedIsAKiller(self):
self.messageDisplay.showinfo(
'Kill Card', 'This card is currently assigned to kill the application.')
def showDefaultDeviceWarning(self):
self.messageDisplay.showwarning(
'No USB Set', 'Please select a USB as a source device and then perform a Scan and Update')
self.logger.warning('No USB device is set!')
def displayScanError(self, e):
self.messageDisplay.showerror('Error Occurred', 'Error: ' + str(e))
self.logger.error('Scan Failed: ' + str(e))
def showAbortScanMessage(self):
self.messageDisplay.showwarning(
'No Files Found', 'A scan failed to find any files.')
self.logger.warning('Empty Scan occurred when attempting a merge')
def showScanErrorMessage(self, e):
self.messageDisplay.showerror('Scan Failed', 'Scan error: ' + str(e))
self.logger.error(str(e))
# def showCurrentDeviceNotFoundWarning(self):
# self.messageDisplay.showwarning(
# 'Missing USB Source', 'WARNING: The current USB repository was not found among the available devices.')
# self.logger.warning(
# 'Current USB repository was not located in device scan!')
# def terminateWithCurrentDeviceNotFoundMsg(self):
# self.messageDisplay.showerror(
# 'No Devices Detected', 'No devices were detected including the current USB repository.\nPlease inspect USB device, or contact help.')
# self.logger.critical('Scanner detected no devices. Closing...')
# SUGGEST - Removal
# def terminateWithNoDeviceFailureMessage(self):
# self.messageDisplay.showerror(
# 'Storage Failure', 'No USB devices could be found, this editor will now close.')
# self.logger.critical('Failed to find any devices with any media. Closing...')
# SUGGEST - Removal
# def showImproperStorageWarning(self):
# self.messageDisplay.showerror(
# 'Improper Storage', 'Media files should not be stored in /media/pi.\nPlease move files to subfolder, or a USB device.')
# self.logger.error(
# 'User error: Files were stored on pi media root. Requested User Action...')
|
# Python - 2.7.6
def solution(n):
# 範圍限制,大於等於4000以上的無對應符號,所以不處理
if n <= 0 or n >= 4000:
return ''
symbols = 'IVXLCDM'
result = ''
# 轉換方式為
# 將symbol兩個作為一組,並加上下一組的較小的那一個
# step group
# 1 IV + X
# 2 XL + C
# 3 CD + M
i = 0
while n:
n, v = n // 10, n % 10 # 剩餘位數, 目前位數
p5, p1 = v // 5, v % 5 # 計算出5跟1的數量
r = ''
if p1 == 4:
# 針對1數量為4個做處理,從加法變減法
# 小的在前 (I),大的在後 (V 或 X)
r = symbols[i] + symbols[i + 1 + p5]
else:
# 1數量為0~3個的為加法
if p5:
r = symbols[i + 1] # V
r += symbols[i] * p1 # I, II, III
result = r + result
i += 2
return result |
def welcome():
print("welcome to pyMassSpecTools")
def cli():
welcome()
|
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKCYAN = '\033[96m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
print(bcolors.OKBLUE + bcolors.BOLD + "Hello I am you calculator" + bcolors.ENDC)
button_first = input(bcolors.OKBLUE + bcolors.BOLD + "Type First Number: " + bcolors.ENDC)
print(bcolors.OKBLUE + bcolors.BOLD + "You chose " + button_first + bcolors.ENDC)
button_second = input(bcolors.OKBLUE + bcolors.BOLD + "Type Second Number: " + bcolors.ENDC)
print(bcolors.OKBLUE + bcolors.BOLD + "You chose " + button_second + bcolors.ENDC)
button_third = input(bcolors.OKBLUE + bcolors.BOLD + "Type + - * or /: " + bcolors.ENDC)
print(bcolors.OKBLUE + bcolors.BOLD + "You chose " + button_third + bcolors.ENDC)
if button_third == "+":
number1 = int(button_first) + int(button_second)
print(bcolors.OKBLUE + bcolors.BOLD + "You got: " + str(number1) + bcolors.ENDC)
elif button_third == "-":
number2 = int(button_first) - int(button_second)
print(bcolors.OKBLUE + bcolors.BOLD + "You got: " + str(number2) + bcolors.ENDC)
elif button_third == "*":
number3 = int(button_first) * int(button_second)
print(bcolors.OKBLUE + bcolors.BOLD + "You got: " + str(number3) + bcolors.ENDC)
elif button_third == "/":
number4 = int(button_first) / int(button_second)
print(bcolors.OKBLUE + bcolors.BOLD + "You got: " + str(number4) + bcolors.ENDC) |
'''
Created on 2014-11-30
@author: ouyangsiqi
'''
class Card:
'''
This class is the parking card
'''
__cardId = 0
__levelId = 0
__spaceId = 0
def __init__(self, cardId, levelId, spaceId):
'''
Constructor
'''
self.__cardId = cardId
self.__levelId = levelId
self.__spaceId = spaceId
def getCardId(self):
'''
The method to get the card id
'''
return self.__cardId
def getLevelId(self):
'''
The method to get the level id
'''
return self.__levelId
def getSpaceId(self):
'''
The method to get the space id
'''
return self.__spaceId
|
ENTRY_POINT = 'right_angle_triangle'
#[PROMPT]
def right_angle_triangle(a, b, c):
'''
Given the lengths of the three sides of a triangle. Return True if the three
sides form a right-angled triangle, False otherwise.
A right-angled triangle is a triangle in which one angle is right angle or
90 degree.
Example:
right_angle_triangle(3, 4, 5) == True
right_angle_triangle(1, 2, 3) == False
'''
#[SOLUTION]
return a*a == b*b + c*c or b*b == a*a + c*c or c*c == a*a + b*b
#[CHECK]
def check(candidate):
# Check some simple cases
assert candidate(3, 4, 5) == True, "This prints if this assert fails 1 (good for debugging!)"
assert candidate(1, 2, 3) == False
assert candidate(10, 6, 8) == True
assert candidate(2, 2, 2) == False
assert candidate(7, 24, 25) == True
assert candidate(10, 5, 7) == False
assert candidate(5, 12, 13) == True
assert candidate(15, 8, 17) == True
assert candidate(48, 55, 73) == True
# Check some edge cases that are easy to work out by hand.
assert candidate(1, 1, 1) == False, "This prints if this assert fails 2 (also good for debugging!)"
assert candidate(2, 2, 10) == False
|
#!/usr/bin/env python
# To run the script put 'python ./script.py' in terminal
lines = [line.rstrip('\n') for line in open('sv_en.txt')]
svArray = []
enArray = []
for s in lines:
first,second = s.split(' = ')
svArray.append( first );
enArray.append( second );
thefile = open('en.txt', 'w')
for item in enArray:
print>>thefile, item+" = "
thefile.close()
thefile = open('sv.txt', 'w')
for item in svArray:
print>>thefile, item
thefile.close()
thefile = open('sv_en_backup', 'w')
for item in lines:
print>>thefile, item
thefile.close()
|
async def gotAddet(bot, guild):
sID = await bot.db.fetchval('SELECT sid FROM config.guild WHERE sid = $1', guild.id)
if sID is None:
query = "WITH exec0 AS (INSERT INTO config.guild (sid, sname) VALUES ($1, $2)) INSERT INTO config.modules (sid) VALUES ($1)"
await bot.db.execute(query, guild.id, guild.name)
else:
await bot.db.execute("UPDATE config.guild SET sname = $1 WHERE sid = $2", guild.name, guild.id)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.