Dataset Viewer
Auto-converted to Parquet Duplicate
concept
stringclasses
200 values
prompt
stringlengths
14
336
completion
stringlengths
0
416
render
<?code name = 'World'?><?def greet(name)?>
Hello, <?print name?>!<?end def?><?render greet(name=name)?>
find
<?code my_string = "Hello, World!"?><?code sub = "World"?>
<?print my_string.find(sub)?>
Boolean "and" operator
<?code x = True?><?code y = False?><?code z = True?>
<?print x and y?><?print y and z?><?print x and z?>
string_strip
<?code s = "!!!Hello!!!"?><?code chars = "!"?>
<?print s.strip(chars)?>
Boolean "or" operator
<?code x = False?><?code y = 'hello'?><?code z = 'world'?>
<?print x or y or z?>
string_count
<?code s = "banana"?><?code sub = "na"?><?code start = 2?><?code end = 4?>
<?print s.count(sub, start, end)?>
sum
<?code nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]?><?code start = 0?>
<?print sum(nums, start)?>
list
<?code my_list = [1, 2, 3, 4, 5]?>
<?print my_list[2]?>
Boolean negation
<?code x = None?><?code y = False?><?code z = 0?><?code w = 0.0?><?code a = ""?><?code b = []?><?code c = {}?><?code d = {/}?>
<?print not x?><?print not y?><?print not z?><?print not w?><?print not a?><?print not b?><?print not c?><?print not d?>
Boolean "or" operator
<?code x = False?><?code y = 0?><?code z = ''?><?code w = []?>
<?print x or y or z or w?>
find
<?code haystack = "mississippi"?><?code needle = "iss"?><?code start = 4?><?code end = 7?>
<?print haystack.find(needle, start, end)?>
color_r
<?code c = rgb(0.1, 0.2, 0.3, 0.4)?>
<?print c.r()?>
date
<?code d = date(2023, 12, 31)?>
<?print d.year()?>
string_count
<?code s = "hello world"?><?code sub = "o"?><?code start = 0?><?code end = 5?>
<?print s.count(sub, start, end)?>
isundefined
<?code x = [1, 2, 3]?><?code y = x[3]?>
<?if isundefined(y)?>y is undefined<?else?>y is defined<?end if?>
color_Color
<?code c = color.Color(r=255, g=0, b=0, a=255)?>
<?print c.r()?>
string_rstrip
<?code s = "12345123123"?>
<?print s.rstrip("123")?>
color_sat
<?code c1 = rgb(0.1, 0.2, 0.3)?><?code c2 = rgb(0.4, 0.5, 0.6)?><?code s1 = c1.sat()?>
<?code s2 = c2.sat()?><?print s1 < s2?>
color_hlsa
<?code c = rgb(0, 0.5, 1)?>
<?print repr(c.hlsa())?>
color_light
<?code c = rgb(0.2, 0.4, 0.6)?>
<?print c.light()?>
datetime_calendar
<?code dt = @(2024-02-29T12:00:00)?><?code fw = 1?><?code mfw = 7?>
<?print dt.calendar(firstweekday=fw, mindaysinfirstweek=mfw)?>
color_witha
<?code c = rgb(0.7, 0.8, 0.9)?><?code a = c.a()?>
<?print c.witha(a / 2)?>
asul4on
<?code a_list = [1, "two", 3.0, True]?>
<?print asul4on(a_list)?>
color_hsv
<?code c = rgb(0, 1, 0)?><?code h = c.hsv()?>
<?print h[0]?>
any
<?code list1 = [1, 0, 0]?><?code list2 = [0, 1, 0]?><?code list3 = [1, 1, 1]?><?code list4 = [0, 0, 0]?>
<?print any(list1)?><?print any(list2)?><?print any(list3)?><?print any(list4)?>
color_witha
<?code c = rgb(0.5, 0.5, 0.5, 0.7)?><?code a = 0.2?>
<?print c.witha(a)?>
logical_operators
<?code x = True?><?code y = False?>
<?print x or y?>
max_single_arg
<?code fruit1 = 'apple'?><?code fruit2 = 'banana'?><?code fruit3 = 'cherry'?>
<?print max(fruit1, fruit2, fruit3)?>
rsplit
<?code s = "one,two,three,four"?><?code sep = ","?>
<?print s.rsplit(sep, 2)?>
dictionary
<?code data = {"name": "Bob", "age": 25}?>
<?code data["city"] = "New York"?><?print data["city"]?>
color_abslum
<?code c = rgb(0.1, 0.2, 0.3)?><?code f = 0.2?><?code g = -0.1?>
<?print c.abslum(f).abslum(g)?>
color_invert
<?code c = rgb(0.5, 0.5, 0.5)?>
<?print c.invert(f=0.75)?>
conditional_expression
<?code a = 10?><?code b = 5?><?code condition = True?>
<?print a if condition else b?>
isfloat
<?code x = 12.34 ?>
<?print isfloat(x)?>
getattr_missing_without_default
<?code obj = {'a': 1, 'b': 2, 'c': 3}?>
<?print getattr(obj, 'd')?>
string_rstrip
<?code s = " This is a sentence. "?>
<?print s.rstrip()?>
color_rellum
<?code c = rgb(0, 0, 0)?><?code f = 0.0?>
<?print c.rellum(f)?>
rgb
<?code r_val = 0.9?><?code g_val = 0.1?><?code b_val = 0.5?><?code opacity = 0.7?>
<?print rgb(r_val, g_val, b_val, opacity).rellum(0.2)?>
bool
<?code x = [1, 2, 3]?><?code y = []?>
<?print bool(x)?><?print bool(y)?>
render
<?code names = ['Alice', 'Bob', 'Charlie'] ?><?def greet_person(name)?>Hello, <?print name?>!<?end def?><?for name in names?>
<?render greet_person(name=name)?><?end for?>
ceil
<?code x = -3.14?>
<?print ceil(x)?>
elif
<?code fruit = "banana"?><?code color1 = "yellow"?><?code color2 = "green"?>
<?if fruit == "apple"?>red<?elif fruit == "banana" and color1 == "yellow"?>yellow<?elif fruit == "banana" and color2 == "green"?>green<?elif fruit == "grape"?>purple<?else?>unknown<?end if?>
md5
<?code empty_string = ""?>
<?print md5(empty_string)?>
color_withlum
<?code c = rgb(0.5, 0.5, 0.5)?><?code lum_val = 0.8?>
<?print c.withlum(lum_val)?>
format
<?code date = @(2024-03-15)?>
<?print format(date, "%Y-%m-%d")?>
Binary bitwise "inclusive or" operator
<?code x = 0b1010?><?code y = 0b0011?><?code z = x | y?>
<?print bin(z)?>
range_stop_only
<?code stop = 20?><?code result = []?><?for i in range(stop)?><?code result.append(i // 4)?><?end for?>
<?print result?>
color
<?code c = #FF5733?>
<?print c.witha(128)?>
for
<?code text = "encyclopedia"?>
<?for i in range(len(text))?><?print text[i] if i % 2 == 0 else ""?><?end for?>
Attribute access
<?code book = {"title": "The Lord of the Rings", "author": "J.R.R. Tolkien"}?>
<?print book.author?>
color
<?code c = #FF5733?>
<?print c.witha(0.5)?>
set_clear
<?code my_set = {1, 2, 3}?><?code my_set.add(1)?>
<?code my_set.clear()?><?print my_set?>
color_invert
<?code c = rgb(0.7, 0.8, 0.9)?><?code f = 0.0?>
<?print c.invert(f=f)?>
string
<?code s = "banana"?><?code index = 2?>
<?print s[index]?>
Function calls
<?code values = [1, 2, 3, 4, 5]?>
<?print sum(values)?>
randchoice
<?code choices = {1: "rock", 2: "paper", 3: "scissors"}?><?code choice_key = randchoice(list(choices.keys()))?>
<?print choices[choice_key]?>
color_light
<?code c = rgb(0.5, 0.5, 0.5)?><?code new_c = c.withlight(c.light() + 0.1)?>
<?print new_c?>
slice_minimal
<?code my_string = "abcdefghijklmnopqrstuvwxyz"?><?code start_index = 5?><?code end_index = 15?>
<?print slice(my_string, start_index, end_index)?>
dict_get
<?code settings = {'theme': 'dark', 'notification': True, 'language': 'en'}?>
<?print settings.get('language', 'en')?>
hex
<?code numbers = [10, 20, 30, 40, 50]?>
<?for number in numbers?><?print hex(number)?> <?end for?>
color_Color
<?code c = color.Color(r=128, g=64, b=32, a=255)?>
<?print c.hls()?>
datetime_timestamp
<?code dt = @(2024-03-15T23:59:59)?><?code ts = dt.timestamp()?>
<?print repr(ts)?>
hex
<?code number = 0?>
<?print hex(number)?>
slice_partial
<?code my_list = ["apple", "banana", "cherry", "date", "elderberry"]?><?code start_index = 1?><?code end_index = 4?>
<?print slice(my_list, start_index, end_index)?>
round
<?code float_num = 12345.6789?><?code digits = 2?>
<?print round(float_num, digits)?>
datetime_month
<?code dt = @(2023-11-20T08:30:00)?><?code month = dt.month()?>
<?print month > 10?>
set_add
<?code my_set = {1, 2, 3}?><?code element = 4?>
<?code my_set.add(element)?><?print my_set?>
datetime_month
<?code dt = @(2024-02-29T12:00:00)?><?code month_num = dt.month()?>
<?print month_num == 2?>
list
<?code my_list = ["apple", "banana", "cherry"]?>
<?print my_list[1]?>
datetime_timestamp
<?code dt = @(2024-03-15T00:00:00)?><?code ts = dt.timestamp()?>
<?print ceil(ts / (60 * 60 * 24))?>
xmlescape
<?code html = "<p>This is a paragraph.</p>"?>
<?print xmlescape(html)?>
hasattr
<?code obj = {'a': 1, 'b': 'hello', 'c': True}?>
<?print hasattr(obj, 'b')?>
lexical_scope
<?code x = 1?><?def f1()?><?code x = 2?><?def f2()?><?code x = 3?><?def f3()?>
<?print x?><?end def?><?render f3()?><?print x?><?end def?><?render f2()?><?print x?><?end def?><?render f1()?>
else
<?code items = []?><?code message = ""?>
<?if items?><?print "Items found"?><?else?><?code message = "No items found"?><?print message?><?end if?>
rfind
<?code long_string = "This is a very long string with multiple occurrences of a substring."?><?code sub = "ing"?><?code start_index = 10?>
<?print long_string.rfind(sub, start_index)?>
last
<?code my_list = [1, 2, 3, 4, 5]?><?code default_value = 0?>
<?print last(my_list, default=default_value)?>
datetime_microsecond
<?code dt = @(2024-11-15T18:23:59.123456)?>
<?print dt.microsecond() % 1000?>
range_full
<?code start = 10?><?code stop = 20?><?code step = 2?><?code my_list = []?><?for i in range(start, stop, step)?><?code my_list.append(i)?><?end for?>
<?print my_list?>
datetime_weekday
<?code dt = @(2024-02-29T06:00:00)?><?code weekday_num = dt.weekday()?><?code weekdays = {0: 'Monday', 1: 'Tuesday', 2: 'Wednesday', 3: 'Thursday', 4: 'Friday', 5: 'Saturday', 6: 'Sunday'}?>
<?print weekdays[weekday_num]?>
color_sat
<?code c = rgb(0.8, 0.2, 0.4)?><?code s = c.sat()?>
<?print s?>
color_hlsa
<?code c = rgb(0.75, 0.25, 0.5, 0.6)?>
<?print c.hlsa().s?>
float
<?code x = 42.5?><?code y = 23.7?><?code z = x * y?>
<?print z?>
date
<?code d = date(1985, 10, 26)?>
<?print d.month()?>
chr
<?code char_code = 97?>
<?print chr(char_code)?>
floor
<?code float_with_decimal = 123.45?>
<?print floor(float_with_decimal)?>
Binary bitwise "inclusive or" operator
<?code x = 0b1100?><?code y = 0b0011?><?code z = x | y?>
<?print bin(z)?>
isbool
<?code x = {'a': 1, 'b': True}?><?code y = x['b']?>
<?if isbool(y)?>y is boolean<?else?>y is not boolean<?end if?>
string_capitalize
<?code s = "hELLo"?><?code expected = "HEllo"?>
<?print s.capitalize() == expected?>
def
<?code name = 'World'?><?def greet(name)?>
Hello, <?print name?>!<?end def?><?render greet(name=name)?>
null
<?code x = None?><?code y = 1?>
<?print x or y?>
min
<?code str1 = 'apple'?><?code str2 = 'banana'?><?code str3 = 'cherry'?><?code list_of_strings = [str1, str2, str3]?>
<?print min(list_of_strings)?>
code
<?code s = "abc"?><?code n = 2?>
<?code result = s * n?><?print result?>
list_insert
<?code my_list = ["one", "three"]?><?code element = "two"?><?code index = 1?>
<?code my_list.insert(index, element)?><?print my_list?>
datetime_minute
<?code dt1 = @(2024-05-01T12:30:00)?><?code dt2 = @(2024-05-01T12:45:00)?><?code m1 = dt1.minute()?><?code m2 = dt2.minute()?>
<?print m1 < m2?>
math
<?code x = 16?>
<?print math.sqrt(x) == 4?>
color_sat
<?code c = rgb(1, 0.5, 0)?>
<?print c.sat()?>
isint
<?code x = 1234?><?code y = 1234.0?><?code z = '1234'?><?code a = @(2024-04-04)?><?code b = #fff?>
<?print isint(x)?><?print isint(y)?><?print isint(z)?><?print isint(a)?><?print isint(b)?>
null
<?code x = None?><?code y = 42?>
<?print (x is None) and (y is not None)?>
slice_full
<?code my_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]?>
<?print slice(my_list, 2, 8, 2)?>
string_rstrip
<?code s = "Python is fun "?>
<?print s.rstrip()?>
End of preview. Expand in Data Studio
README.md exists but content is empty.
Downloads last month
16