prompt
large_stringlengths
72
9.34k
completion
large_stringlengths
0
7.61k
<|file_name|>test.py<|end_file_name|><|fim▁begin|>from planarprocess import * from gds_helpers import * from itertools import cycle xmin, xmax = -5, 5 layers = gds_cross_section('mypmos.gds', [(0,xmin), (0, xmax)], 'gdsmap.map') ['P-Active-Well', 'Active-Cut', 'N-Well', 'Metal-2', 'Metal-1', 'P-Select', 'N-Select', '...
custom_style[solid].update(dict(hatch=None, fill=True))
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self):<|fim▁hole|> self.assertListEqual(sorted(actual), sorted(expected)) def test_permission_fr...
expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS']) actual = permission.to_list()
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): <|fim_middle|> <|fim▁end|>
def test_permission_from_list_to_list(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS']) actual = permission.to_list() self.assertListEqual(sorted(actual), sorted(expected)) def test_permission_from_...
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self): <|fim_middle|> def test_permission_from_int_to_list(self): expected = ['ADMINIST...
expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS']) actual = permission.to_list() self.assertListEqual(sorted(actual), sorted(expected))
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAG...
expected = ['ADMINISTRATOR', 'SEND_MESSAGES'] permission = Permission(2056) actual = permission.to_list() self.assertListEqual(sorted(actual), sorted(expected))
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAG...
self.assertTrue("ADMINISTRATOR" in Permission(2056))
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAG...
self.assertTrue(["ADMINISTRATOR", "SEND_MESSAGES"] in Permission(2056))
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAG...
self.assertTrue("USE_VAD" not in Permission(2056))
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAG...
self.assertTrue(["SPEAK", "MANAGE_EMOJIS"] not in Permission(2056))
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAG...
permission = Permission(2056) self.assertTrue(permission.allows("ADMINISTRATOR")) self.assertFalse(permission.allows("MENTION_EVERYONE")) permission.add("MENTION_EVERYONE") self.assertTrue(permission.allows("MENTION_EVERYONE"))
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAG...
permission = Permission(2056) self.assertTrue(permission.allows("ADMINISTRATOR")) self.assertTrue(permission.allows("SEND_MESSAGES")) permission.remove("SEND_MESSAGES") self.assertFalse(permission.allows("SEND_MESSAGES"))
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def <|fim_middle|>(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAGE_WEBHOOKS', 'USE_E...
test_permission_from_list_to_list
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAG...
test_permission_from_int_to_list
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAG...
test_permission_in_permission
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAG...
test_permissions_in_permission
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAG...
test_permission_not_in_permission
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAG...
test_permissions_not_in_permission
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAG...
test_permission_add
<|file_name|>test_permission.py<|end_file_name|><|fim▁begin|>import unittest from bolt.discord.permissions import Permission class TestPermission(unittest.TestCase): def test_permission_from_list_to_list(self): expected = ['MANAGE_WEBHOOKS', 'USE_EXTERNAL_EMOJIS'] permission = Permission(['MANAG...
test_permission_remove
<|file_name|>after_signup.py<|end_file_name|><|fim▁begin|>import urllib from canvas import util def make_cookie_key(key): return 'after_signup_' + str(key) <|fim▁hole|>def _get(request, key): key = make_cookie_key(key) val = request.COOKIES.get(key) if val is not None: val = util.loads(urllib...
<|file_name|>after_signup.py<|end_file_name|><|fim▁begin|>import urllib from canvas import util def make_cookie_key(key): <|fim_middle|> def _get(request, key): key = make_cookie_key(key) val = request.COOKIES.get(key) if val is not None: val = util.loads(urllib.unquote(val)) return (ke...
return 'after_signup_' + str(key)
<|file_name|>after_signup.py<|end_file_name|><|fim▁begin|>import urllib from canvas import util def make_cookie_key(key): return 'after_signup_' + str(key) def _get(request, key): <|fim_middle|> def get_posted_comment(request): ''' Gets a comment waiting to be posted, if one exists. Returns a...
key = make_cookie_key(key) val = request.COOKIES.get(key) if val is not None: val = util.loads(urllib.unquote(val)) return (key, val,)
<|file_name|>after_signup.py<|end_file_name|><|fim▁begin|>import urllib from canvas import util def make_cookie_key(key): return 'after_signup_' + str(key) def _get(request, key): key = make_cookie_key(key) val = request.COOKIES.get(key) if val is not None: val = util.loads(urllib.unquote(va...
''' Gets a comment waiting to be posted, if one exists. Returns a pair containing the cookie key used to retrieve it and its deserialized JSON. ''' #TODO use dcramer's django-cookies so that we don't rely on having the response object to mutate cookies. # That would make this API much cleaner a...
<|file_name|>after_signup.py<|end_file_name|><|fim▁begin|>import urllib from canvas import util def make_cookie_key(key): return 'after_signup_' + str(key) def _get(request, key): key = make_cookie_key(key) val = request.COOKIES.get(key) if val is not None: <|fim_middle|> return...
val = util.loads(urllib.unquote(val))
<|file_name|>after_signup.py<|end_file_name|><|fim▁begin|>import urllib from canvas import util def <|fim_middle|>(key): return 'after_signup_' + str(key) def _get(request, key): key = make_cookie_key(key) val = request.COOKIES.get(key) if val is not None: val = util.loads(urllib.unquote(val...
make_cookie_key
<|file_name|>after_signup.py<|end_file_name|><|fim▁begin|>import urllib from canvas import util def make_cookie_key(key): return 'after_signup_' + str(key) def <|fim_middle|>(request, key): key = make_cookie_key(key) val = request.COOKIES.get(key) if val is not None: val = util.loads(urllib....
_get
<|file_name|>after_signup.py<|end_file_name|><|fim▁begin|>import urllib from canvas import util def make_cookie_key(key): return 'after_signup_' + str(key) def _get(request, key): key = make_cookie_key(key) val = request.COOKIES.get(key) if val is not None: val = util.loads(urllib.unquote(va...
get_posted_comment
<|file_name|>setup.py<|end_file_name|><|fim▁begin|><|fim▁hole|># or saved. Do not modify them directly here. # NB: PACKAGES is deprecated NAME = 'ZenPacks.community.DistributedCollectors' VERSION = '1.7' AUTHOR = 'Egor Puzanov' LICENSE = '' NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.community'] PACKAGES = ['ZenPacks'...
################################ # These variables are overwritten by Zenoss when the ZenPack is exported
<|file_name|>training_stsbenchmark_continue_training.py<|end_file_name|><|fim▁begin|>""" This example loads the pre-trained SentenceTransformer model 'nli-distilroberta-base-v2' from the server. It then fine-tunes this model for some epochs on the STS benchmark dataset. Note: In this example, you must specify a Senten...
model = SentenceTransformer(model_save_path) test_evaluator = EmbeddingSimilarityEvaluator.from_input_examples(test_samples, name='sts-test') test_evaluator(model, output_path=model_save_path)
<|file_name|>training_stsbenchmark_continue_training.py<|end_file_name|><|fim▁begin|>""" This example loads the pre-trained SentenceTransformer model 'nli-distilroberta-base-v2' from the server. It then fine-tunes this model for some epochs on the STS benchmark dataset. Note: In this example, you must specify a Senten...
util.http_get('https://sbert.net/datasets/stsbenchmark.tsv.gz', sts_dataset_path)
<|file_name|>training_stsbenchmark_continue_training.py<|end_file_name|><|fim▁begin|>""" This example loads the pre-trained SentenceTransformer model 'nli-distilroberta-base-v2' from the server. It then fine-tunes this model for some epochs on the STS benchmark dataset. Note: In this example, you must specify a Senten...
dev_samples.append(inp_example)
<|file_name|>training_stsbenchmark_continue_training.py<|end_file_name|><|fim▁begin|>""" This example loads the pre-trained SentenceTransformer model 'nli-distilroberta-base-v2' from the server. It then fine-tunes this model for some epochs on the STS benchmark dataset. Note: In this example, you must specify a Senten...
test_samples.append(inp_example)
<|file_name|>training_stsbenchmark_continue_training.py<|end_file_name|><|fim▁begin|>""" This example loads the pre-trained SentenceTransformer model 'nli-distilroberta-base-v2' from the server. It then fine-tunes this model for some epochs on the STS benchmark dataset. Note: In this example, you must specify a Senten...
train_samples.append(inp_example)
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
if __name__ == "__main__":
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
def __init__(self, artist, title, year=None): self.__artist = artist self.__title = title self.__year = year def artist(self): return self.__artist def setArtist(self, artist): self.__artist = artist def title(self): return self.__title def set...
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
self.__artist = artist self.__title = title self.__year = year
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
return self.__artist
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
self.__artist = artist
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
return self.__title
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
self.__title = title
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
return self.__year
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
self.__year = year
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
year = "" if self.__year is not None: year = " in {0}".format(self.__year) return "{0} by {1}{2}".format(self.__title, self.__artist, year)
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
def __init__(self, artist, title, year=None): super(Painting, self).__init__(artist, title, year)
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
super(Painting, self).__init__(artist, title, year)
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
def __init__(self, artist, title, year=None, material=None): super(Sculpture, self).__init__(artist, title, year) self.__material = material def material(self): return self.__material def setMaterial(self, material): self.__material = material def __str__(self): ...
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
super(Sculpture, self).__init__(artist, title, year) self.__material = material
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
return self.__material
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
self.__material = material
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
materialString = "" if self.__material is not None: materialString = " ({0})".format(self.__material) return "{0}{1}".format(super(Sculpture, self).__str__(), materialString)
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
def __init__(self, width, height, depth=None): self.__width = width self.__height = height self.__depth = depth def width(self): return self.__width def setWidth(self, width): self.__width = width def height(self): return self.__height def setH...
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
self.__width = width self.__height = height self.__depth = depth
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
return self.__width
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
self.__width = width
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
return self.__height
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
self.__height = height
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
return self.__depth
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
self.__depth = depth
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
raise NotImplemented
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
raise NotImplemented
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
year = " in {0}".format(self.__year)
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
materialString = " ({0})".format(self.__material)
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
items = [] items.append(Painting("Cecil Collins", "The Poet", 1941)) items.append(Painting("Cecil Collins", "The Sleeping Fool", 1943)) items.append(Painting("Edvard Munch", "The Scream", 1893)) items.append(Painting("Edvard Munch", "The Sick Child", 1896)) items.append(Painting("Edvard Munch", ...
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
uniquematerials.add(item.material())
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
__init__
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
artist
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
setArtist
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
title
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
setTitle
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
year
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
setYear
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
__str__
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
__init__
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
__init__
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
material
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
setMaterial
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
__str__
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
__init__
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
width
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
setWidth
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
height
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
setHeight
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
depth
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
setDepth
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
area
<|file_name|>item.py<|end_file_name|><|fim▁begin|>#!/usr/bin/env python3 # Copyright (c) 2008-9 Qtrac Ltd. All rights reserved. # This program or module is free software: you can redistribute it and/or # modify it under the terms of the GNU General Public License as published # by the Free Software Foundation, either v...
volume
<|file_name|>definitions.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012-2020 Ben Kurtovic <ben.kurtovic@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction,...
def get_html_tag(markup):
<|file_name|>definitions.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012-2020 Ben Kurtovic <ben.kurtovic@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction,...
"""Return the HTML tag associated with the given wiki-markup.""" return MARKUP_TO_HTML[markup]
<|file_name|>definitions.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012-2020 Ben Kurtovic <ben.kurtovic@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction,...
"""Return if the given *tag*'s contents should be passed to the parser.""" return tag.lower() not in PARSER_BLACKLIST
<|file_name|>definitions.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012-2020 Ben Kurtovic <ben.kurtovic@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction,...
"""Return whether or not the given *tag* contains visible text.""" return tag.lower() not in INVISIBLE_TAGS
<|file_name|>definitions.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012-2020 Ben Kurtovic <ben.kurtovic@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction,...
"""Return whether or not the given *tag* can exist without a close tag.""" return tag.lower() in SINGLE
<|file_name|>definitions.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012-2020 Ben Kurtovic <ben.kurtovic@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction,...
"""Return whether or not the given *tag* must exist without a close tag.""" return tag.lower() in SINGLE_ONLY
<|file_name|>definitions.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012-2020 Ben Kurtovic <ben.kurtovic@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction,...
"""Return whether *scheme* is valid for external links.""" scheme = scheme.lower() if slashes: return scheme in URI_SCHEMES return scheme in URI_SCHEMES and not URI_SCHEMES[scheme]
<|file_name|>definitions.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012-2020 Ben Kurtovic <ben.kurtovic@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction,...
return scheme in URI_SCHEMES
<|file_name|>definitions.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012-2020 Ben Kurtovic <ben.kurtovic@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction,...
get_html_tag
<|file_name|>definitions.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012-2020 Ben Kurtovic <ben.kurtovic@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction,...
is_parsable
<|file_name|>definitions.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012-2020 Ben Kurtovic <ben.kurtovic@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction,...
is_visible
<|file_name|>definitions.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012-2020 Ben Kurtovic <ben.kurtovic@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction,...
is_single
<|file_name|>definitions.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012-2020 Ben Kurtovic <ben.kurtovic@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction,...
is_single_only
<|file_name|>definitions.py<|end_file_name|><|fim▁begin|># Copyright (C) 2012-2020 Ben Kurtovic <ben.kurtovic@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction,...
is_scheme