Spaces:
Runtime error
Runtime error
| SIDEBAR_INFO = """ | |
| <div class="contributors font-body text-bold"> | |
| <a class="contributor comma"> NamLH31,</a> | |
| <a class="contributor comma"> MinhNA4,</a> | |
| <a class="contributor comma"> DungNM31,</a> | |
| <a class="contributor comma"> AnhDTV7,</a> | |
| <a class="contributor comma"> AnhTVK</a> | |
| </div> | |
| """ | |
| LEADER_INFOR = """ | |
| Dr. Bùi Duy Quốc Nghị (NghiBDQ)\n | |
| Chief Scientist of AI4Code team at FPT Software AI Center | |
| """ | |
| NAM_INFOR = """ | |
| Lê Hải Nam (NamLH31)\n | |
| AI Resident at FPT Software AI Center | |
| """ | |
| DUNG_INFOR = """ | |
| Nguyễn Mạnh Dũng (DungNM31)\n | |
| AI Resident at FPT Software AI Center | |
| """ | |
| MINH_INFOR = """ | |
| Nguyễn Anh Mimh (MinhNA4)\n | |
| AI Engineer at FPT Software AI Center | |
| """ | |
| VA_INFOR = """ | |
| Đậu Thị Vân Anh (AnhDTV7)\n | |
| AI Resident at FPT Software AI Center | |
| """ | |
| KA_INFOR = """ | |
| Trần Vũ Kim Anh (AnhTVK)\n | |
| Software Developer at FPT Software AI Center | |
| """ | |
| GROUP_INFO = """ | |
| <div class="story-box font-body"> | |
| <p> | |
| Docify-Lab is from FPT Software AI Center.\n | |
| We focus on exploring new ways to address a lot of software engineering challenges. | |
| </p> | |
| """ | |
| STORY = """ | |
| <div class="story-box font-body"> | |
| <p> | |
| Docify-Lab is designed to assist developers with many different coding tasks.\n | |
| By leveraging the latest AI technology, our product help developers save time and effort, allowing them to focus on creating the best possible code. \n | |
| Now, developers can work more efficiently and effectively than ever before. | |
| </p> | |
| """ | |
| TRANS_EXAMPLE1 = """ | |
| def partition(array, low, high): | |
| pivot = array[high] | |
| i = low - 1 | |
| for j in range(low, high): | |
| if array[j] <= pivot: | |
| i = i + 1 | |
| tmp = array[i] | |
| array[i] = array[j] | |
| array[j] = tmp | |
| tmp = array[i + 1] | |
| array[i + 1] = array[high] | |
| array[high] = tmp | |
| return i + 1 | |
| def quickSort(array, low, high): | |
| if low < high: | |
| pi = partition(array, low, high) | |
| quickSort(array, low, pi - 1) | |
| quickSort(array, pi + 1, high) | |
| """ | |
| TRANS_EXAMPLE2 = """public String getMaxValue(List<Object> list, int first, int last) { | |
| List<Float> floatList = new ArrayList<>(); | |
| for (int i = 0; i < list.size(); i++) { | |
| Float prova2 = ((Double) list.get(i)).floatValue(); | |
| floatList.add(prova2); | |
| } | |
| float max = Float.MIN_VALUE; | |
| String maxValue = ""; | |
| for (int i = first; i < last; i++) { | |
| if (floatList.get(i) > max) { | |
| max = floatList.get(i); | |
| } | |
| } | |
| maxValue = String.format("%.1f", max); | |
| return maxValue; | |
| } | |
| """ | |
| TRANS_EXAMPLE3 = """public class Calculator | |
| { | |
| public int dot(int x, int y){ | |
| return x * y; | |
| } | |
| public int add(int x, int y){ | |
| add_rs = x + y; | |
| return rs; | |
| } | |
| public int divide(float a, float b){ | |
| result = a/b; | |
| return result; | |
| } | |
| public String nothing(){ | |
| return "nothing"; | |
| } | |
| } | |
| """ | |
| COM_EXAMPLE1 = """def sum2num (a, b):""" | |
| COM_EXAMPLE2 = """ | |
| def is_prime(n): | |
| for i in range(2,int(n/2)): | |
| if (n%i) = | |
| """ | |
| COM_EXAMPLE3 = """ | |
| public static int[] stringToIntegerArray(String input) { | |
| input = input.trim(); | |
| input = input.substring(1, input.length() - 1); | |
| if (input.length() == 0) { | |
| return new int[0]; | |
| } | |
| String[] parts = input.split(","); | |
| int[] output = new int[parts. | |
| """ | |
| RE_EXAMPLE1 = """ | |
| private JComboBox<String> initCombo(String[] items, int x, int y, String toolTip, Consumer consumerEvent) { | |
| JComboBox<int> combo = new JComboBox<>(items); | |
| combo.setBounds(x, y 140, 25); | |
| combo.setToolTipText(toolTip); | |
| combo.setCursor(new Cursor(Cursor.HAND_CURSOR)); | |
| combo.addItemListener(consumerEvent::accept); | |
| window.add(combo); | |
| return combo; | |
| } | |
| """ | |
| RE_EXAMPLE2 = """ | |
| def bubbleSort(arr): | |
| n = len(arr)) | |
| swapped = False | |
| for i in range(j-1): | |
| for j in range(0, n-i-1): | |
| if arr[j] > arr[j + 1]: | |
| swapped = True | |
| arr[j], arr[j + 1] = arr[j + 1], arr[j] | |
| if not swapped: | |
| return | |
| """ | |
| RE_EXAMPLE3 = """ | |
| public int add(char x, int y){ | |
| add_rs = x + y; | |
| return rs; | |
| } | |
| """ | |
| CGEN_EXAMPLE1 = "check if a string contains character @" | |
| CGEN_EXAMPLE2 = "Read csv file using pandas" | |
| CGEN_EXAMPLE3 = "Compare two numbers and return the bigger" | |
| SUM_EXAMPLE1 = """ | |
| def binary_search(arr, low, high, x): | |
| if high >= low: | |
| mid = (high + low) // 2 | |
| if arr[mid] == x: | |
| return mid | |
| elif arr[mid] > x: | |
| return binary_search(arr, low, mid - 1, x) | |
| else: | |
| return binary_search(arr, mid + 1, high, x) | |
| else: | |
| return -1 | |
| """ | |
| SUM_EXAMPLE2 = """ | |
| def read_csv(filename): | |
| df = pd.read_csv(filename) | |
| return df | |
| """ | |
| SUM_EXAMPLE3 = """public class Calculator | |
| { | |
| public int dot(int x, int y){ | |
| return x * y; | |
| } | |
| public int add(int x, int y){ | |
| add_rs = x + y; | |
| return rs; | |
| } | |
| public int divide(float a, float b){ | |
| result = a/b; | |
| return result; | |
| } | |
| public String nothing(){ | |
| return "nothing"; | |
| } | |
| } | |
| """ | |
| TEST_EXAMPLE1 = """public class Calculator | |
| { | |
| public int add(int x, int y){ | |
| add_rs = x + y; | |
| return rs; | |
| } | |
| } | |
| """ | |
| TEST_EXAMPLE2 = """public class Comparator | |
| { | |
| public int bigger_number(int x, int y){ | |
| if (x > y) | |
| return x; | |
| else | |
| return y; | |
| } | |
| public int smaller_number(int x, int y){ | |
| if (x < y) | |
| return x; | |
| else | |
| return y; | |
| } | |
| } | |
| """ | |
| TEST_EXAMPLE3 = """class TransformText { | |
| static String upper(String str) { | |
| str.toUpperCase() | |
| } | |
| static String lower(String str) { | |
| str.toLowerCase() | |
| } | |
| } | |
| """ |