prompt
stringlengths
6
183
completion
stringlengths
2
154
<?code color2 = color.Color(0, 128, 0) ?>
<?print color2.abslum(0.3)?>
<?code color3 = color.Color(0, 0, 255) ?>
<?print color3.withsat(0.5)?>
<?code event_day = today() ?>
<?print 'Event scheduled for ' + event_day.isoformat()?>
<?code d = date(2023, 6, 1) ?>
<?print d.week(firstweekday=3, mindaysinfirstweek=4)?>
<?code datetime_now = now() ?>
<?print datetime_now?>
<?def order_summary(order_id, total)?>Order ID: <?print order_id?>, Total: <?print total?><?end def?>
<?print order_summary.renders(12345, '$250')?>
<?code d = date(2024, 2, 29) ?>
<?print d.yearday()?>
<?code name = 'John Doe'?>
<?print name.startswith('John')?>
<?code numbers = range(10)?>
<?for number in numbers?><?if number % 2 == 0?><?print number?><?end if?><?end for?>
<?def product_template(items)?><?for item in items?><?printx item?><?end for?><?end def?><?code products = ['<laptop>', '<phone>', '<tablet>']?>
<?renderx product_template(items=products)?>
<?code city = 'New York---'?>
<?print city.rstrip('-')?>
<?code data = None?>
<?code isDataPresent = bool(data)?><?print 'Is there data available: ' + str(isDataPresent)?>
<?code color2 = color.Color(0, 128, 0) ?>
<?print color2.withhue(240)?>
<?code color9 = color.Color(139, 69, 19) ?>
<?print color9.rellum(0.25)?>
<?code message = 'Good morning everyone!'?>
<?print message.startswith('Good')?>
<?code city = 'new york city'?>
<?print 'City: ' + city.capitalize()?>
<?def calculate_total(prices)?>
<?return sum(prices)?><?end def?>
<?code sentence = 'coding is fun, fun is coding'?>
<?print sentence.rfind('fun')?>
<?code color4 = color.Color(123, 50, 200) ?>
<?print color4.r()?>
<?code color2 = color.Color(0, 128, 0) ?>
<?print color2.hsv()?>
<?print min(
my_list)?>
<?code text = 'hello world hello'?>
<?print text.rfind('hello')?>
<?code boolSet = set([True, False, True])?>
<?print 'Set of booleans: ' + str(boolSet)?>
<?code product = {'name': 'Laptop', 'price': 1200} ?>
<?code product.clear() ?><?print product?>
<?code d = date(2024, 2, 29) ?>
<?print d.calendar(firstweekday=0, mindaysinfirstweek=4)?>
<?if not
isdefined(data)?><?print 'Data is not defined'?><?end if?>
<?code color1 = color.Color(255, 0, 0) ?>
<?print color1.hsv()?>
<?code x = 10?><?code y = 20?><?def sum?>
<?print 'Sum: ' + str(x + y)?><?end def?><?render sum()?>
<?code closing_time = datetime(2023, 10, 21, 18, 45) ?>
<?print closing_time.minute()?>
<?code names = 'John, Jane, Doe'?>
<?print names.rsplit(', ')?>
<?code language = 'English---'?>
<?print language.rstrip('-')?>
<?code data = {'id': 101, 'value': 'test'} ?>
<?for (key, value) in data.items()?><?print key?>: <?print value?><?end for?>
<?code message = None?>
<?renderx_or_print message()?>
<?code settings = {'theme': 'dark', 'notifications': True} ?>
<?for (key, value) in settings.items()?><?print key?> is set to <?print value?><?end for?>
<?code launch_day = datetime(2025, 4, 3, 12, 0) ?>
<?print launch_day.year()?>
<?code isUsed = True?>
<?print 'Boolean value of isUsed: ' + str(bool(isUsed))?>
<?code color8 = color.Color(240, 128, 128, 90) ?>
<?print color8.combine(b=200, a=255)?>
<?code meeting_time = datetime(2023, 8, 10, 8, 30) ?>
<?print meeting_time.mimeformat()?>
<?code message = 'Hello!'?>
<?code messageExists = bool(message)?><?print 'Message exists: ' + str(messageExists)?>
<?code condition = isdefined(data)?><?print not
condition?>
<?def article(header, content)?>
<article><header><?render header()?></header><section><?render content()?></section></article><?end def?><?renderblocks article()?>
<?code color6 = color.Color(75, 0, 130) ?>
<?print color6.combine(g=100, a=200)?>
<?code my_list = ['a', 'b', 'c']?><?for (index, item) in enumerate(my_list)?>
<?print index?>: <?print item?><?end for?>
<?code digits = ['1', '2', '3'] ?>
<?print ''.join(digits)?>
<?code age = 30?><?def print_age?>
<?print 'Age: ' + str(age)?><?end def?><?render print_age()?>
<?def greeting_template(name)?>Hello, <?print name?>!<?end def?><?code name = 'John'?>
<?render_or_print greeting_template(name=name)?>
<?code scientific_notation = 3.14e-10?>
<?print 'Scientific notation: ' + str(scientific_notation)?>
<?code release_date = datetime(2025, 4, 5, 16, 0) ?>
<?print release_date.day()?>
<?code color6 = color.Color(75, 0, 130) ?>
<?print color6.lum()?>
<?code text = 'hello world from UL4'?>
<?print text.rsplit()?>
<?code text = ' hello world '?>
<?print text.strip()?>
<?code meeting = datetime(2023, 8, 10, 9, 15, 20) ?>
<?print meeting.second()?>
<?note?>NOTE: This function is
used temporarily, replace it in the final version.<?end note?>
<?code d = date(2024, 2, 29) ?>
<?print d.week(firstweekday=0, mindaysinfirstweek=4)?>
<?code examDate = date(2024, 5, 30, 9, 30, 0)?>
<?print 'Exam Date: ' + str(examDate)?>
<?note?>This loop handles the
iteration through items in the list.<?end note?>
<?code userLoggedIn = True?>
<?if bool(userLoggedIn)?><?print 'User is logged in'?><?else?><?print 'User is not logged in'?><?end if?>
<?code exp_value = 4e23?>
<?print 'Exponential float: ' + str(exp_value)?>
<?code appointment = datetime(2023, 10, 21, 9, 45) ?>
<?print appointment.year()?>
<?code color2 = color.Color(0, 128, 0) ?>
<?print color2.r()?>
<?code color3 = color.Color(0, 0, 255) ?>
<?print color3.withlum(0.5)?>
<?code data = '1234-5678-1234'?>
<?print data.replace('-', ' ')?>
<?code start_date = date(2023, 6, 1) ?>
<?print start_date.isoformat()?>
<?code flag = False?><?print not
flag?>
<?code current_date = today() ?>
<?print 'The current date is ' + str(current_date)?>
<?ignore?>
<?ignore?><?note Ignored loop?><?for i in range(5)?><?print i?><?end for?><?end ignore?><?end ignore?>
<?code userDetails = dict(name='Charlie', age=25, city='New York')?>
<?print 'User details: ' + str(userDetails)?>
<?def person_template(person)?><?printx 'Name: ' + person['name']?>, <?printx 'Age: ' + str(person['age'])?><?end def?><?code person = {'name': 'John & Sons', 'age': 30}?>
<?renderx person_template(person=person)?>
<?code booleanValue = True?>
<?print 'Boolean as string: ' + str(booleanValue)?>
<?code color2 = color.Color(0, 128, 0, 200) ?>
<?print color2.hlsa()?>
<?print isinstance(
'test', str)?>
<?code date_str = '2024-10-21'?>
<?print date_str.rsplit('-')?>
<?code sentence = 'this is a test, this is only a test'?>
<?print sentence.find('is', 5)?>
<?code product = {'name': 'Laptop', 'price': 1200} ?>
<?print product.get('stock', 'Out of stock')?>
<?code sentence = 'repeat, repeat, repeat'?>
<?print sentence.replace('repeat', 'done', 2)?>
<?code color10 = color.Color(255, 165, 0) ?>
<?print color10.abslum(0.5)?>
<?code color4 = color.Color(123, 50, 200) ?>
<?print color4.hls()?>
<?code quantity = '3'?>
<?code total = float(quantity) * 20.5?><?print 'Total cost: ' + str(total)?>
<?code text = 'Hello, World!'?><?if 'Hello' in
text?><?print 'Substring found'?><?end if?>
<?code departure = datetime(2023, 11, 5, 6, 15, 0) ?>
<?print departure.second()?>
<?code color9 = color.Color(139, 69, 19) ?>
<?print color9.withlum(0.4)?>
<?code d = date(2023, 7, 10) ?>
<?print d.week(firstweekday=5, mindaysinfirstweek=7)?>
<?code fruits = ['apple', 'banana'] ?>
<?code fruits.insert(1, 'cherry') ?>
<?code birthday = date(1990, 5, 15) ?>
<?print birthday.mimeformat()?>
<?code color5 = color.Color(255, 255, 0) ?>
<?print color5.rellight(0.3)?>
<?def item_template(item)?>Item: <?print item?><?end def?><?code items = ['apple', 'banana', 'cherry']?>
<?for item in items?><?render_or_print item_template(item=item)?><?end for?>
<?code d = date(2023, 10, 21) ?>
<?print d.week(firstweekday=0, mindaysinfirstweek=4)?>
<?code sentence = 'this is a test'?>
<?print sentence.upper()?>
<?doc?>The following code handles
the login logic for the application.<?end doc?>
<?code description = 'strip the characters---'?>
<?print description.rstrip('-')?>
<?code lines = ['line1', 'line2', 'line3'] ?>
<?print '\n'.join(lines)?>
<?code phrase = 'coding is fun, fun is coding'?>
<?print phrase.rfind('fun')?>
<?code is_empty = False?>
<?print 'Is empty: ' + str(is_empty)?>
<?code currentDate = date(2024, 10, 21)?>
<?code nextMonth = currentDate + monthdelta(1)?><?print 'Next month: ' + str(nextMonth)?>
<?code color5 = color.Color(255, 255, 0) ?>
<?print color5.sat()?>
<?code color10 = color.Color(255, 165, 0, 50) ?>
<?print color10.hsva()?>
<?code city = 'New York City'?>
<?print city.startswith('New')?>
<?printx my_dict['key']
?>
<?code color5 = color.Color(255, 255, 0) ?>
<?print color5.hsv()?>
<?code value = 16?><?print value >>
3?>