diff --git "a/all/conala_structured.json" "b/all/conala_structured.json" new file mode 100644--- /dev/null +++ "b/all/conala_structured.json" @@ -0,0 +1,33962 @@ +{ + "Source": "https://arxiv.org/pdf/1805.08949.pdf", + "Categories": [ + { + "Math complexity": 2, + "Language complexity": 7, + "Domain knowledge complexity": 8 + } + ], + "Instances": [ + { + "Input": "dropping all columns named 'a' from a multiindex 'df', across all level.", + "Output Program": [ + "df.drop('a', level=1, axis=1)" + ], + "Output Answer": [ + "df.drop('a', level=1, axis=1)" + ], + "split": "train" + }, + { + "Input": "Send a post request with raw data `DATA` and basic authentication with `username` and `password`", + "Output Program": [ + "requests.post(url, data=DATA, headers=HEADERS_DICT, auth=(username, password))" + ], + "Output Answer": [ + "requests.post(url, data=DATA, headers=HEADERS_DICT, auth=(username, password))" + ], + "split": "test" + }, + { + "Input": "filter a Django model `MyModel` to have charfield length of max `255`", + "Output Program": [ + "MyModel.objects.extra(where=['CHAR_LENGTH(text) > 254'])" + ], + "Output Answer": [ + "MyModel.objects.extra(where=['CHAR_LENGTH(text) > 254'])" + ], + "split": "train" + }, + { + "Input": "decode escape sequences in string `myString`", + "Output Program": [ + "myString.decode('string_escape')" + ], + "Output Answer": [ + "myString.decode('string_escape')" + ], + "split": "train" + }, + { + "Input": "Save matplotlib graph to image file `filename.png` at a resolution of `300 dpi`", + "Output Program": [ + "plt.savefig('filename.png', dpi=300)" + ], + "Output Answer": [ + "plt.savefig('filename.png', dpi=300)" + ], + "split": "train" + }, + { + "Input": "decode url `url` with utf8 and print it", + "Output Program": [ + "print urllib.unquote(url).decode('utf8')" + ], + "Output Answer": [ + "print urllib.unquote(url).decode('utf8')" + ], + "split": "train" + }, + { + "Input": "decode json string `request.body` to python dict", + "Output Program": [ + "json.loads(request.body)" + ], + "Output Answer": [ + "json.loads(request.body)" + ], + "split": "test" + }, + { + "Input": "find the first element of the tuple with the maximum second element in a list of tuples `lis`", + "Output Program": [ + "max(lis, key=lambda item: item[1])[0]" + ], + "Output Answer": [ + "max(lis, key=lambda item: item[1])[0]" + ], + "split": "test" + }, + { + "Input": "append list `a` to `c`", + "Output Program": [ + "c.extend(a)" + ], + "Output Answer": [ + "c.extend(a)" + ], + "split": "test" + }, + { + "Input": "remove a div with a id `main-content` using beautifulsoup", + "Output Program": [ + "soup.find('div', id='main-content').decompose()" + ], + "Output Answer": [ + "soup.find('div', id='main-content').decompose()" + ], + "split": "test" + }, + { + "Input": "variable number of digits `digits` in variable `value` in format string \"{0:.{1}%}\"", + "Output Program": [ + "\"\"\"{0:.{1}%}\"\"\".format(value, digits)" + ], + "Output Answer": [ + "\"\"\"{0:.{1}%}\"\"\".format(value, digits)" + ], + "split": "train" + }, + { + "Input": "sort a list of strings `strings` based on regex match", + "Output Program": [ + "strings.sort(key=lambda str: re.sub('.*%', '', str))" + ], + "Output Answer": [ + "strings.sort(key=lambda str: re.sub('.*%', '', str))" + ], + "split": "train" + }, + { + "Input": "get full path of current directory", + "Output Program": [ + "os.path.dirname(os.path.abspath(__file__))" + ], + "Output Answer": [ + "os.path.dirname(os.path.abspath(__file__))" + ], + "split": "train" + }, + { + "Input": "Split a string `text` with comma, question mark or exclamation by non-consuming regex using look-behind", + "Output Program": [ + "re.split('(?<=[\\\\.\\\\?!]) ', text)" + ], + "Output Answer": [ + "re.split('(?<=[\\\\.\\\\?!]) ', text)" + ], + "split": "train" + }, + { + "Input": "recursively go through all subdirectories and files in `rootdir`", + "Output Program": [ + "for (root, subFolders, files) in os.walk(rootdir):\n pass" + ], + "Output Answer": [ + "for (root, subFolders, files) in os.walk(rootdir):\n pass" + ], + "split": "train" + }, + { + "Input": "copy file `srcfile` to directory `dstdir`", + "Output Program": [ + "shutil.copy(srcfile, dstdir)" + ], + "Output Answer": [ + "shutil.copy(srcfile, dstdir)" + ], + "split": "test" + }, + { + "Input": "Trimming a string `str`", + "Output Program": [ + "str.strip()" + ], + "Output Answer": [ + "str.strip()" + ], + "split": "train" + }, + { + "Input": "Create sub matrix of a list of lists `[[2, 3, 4], [2, 3, 4], [2, 3, 4]]` (without numpy)", + "Output Program": [ + "[[2, 3, 4], [2, 3, 4], [2, 3, 4]]" + ], + "Output Answer": [ + "[[2, 3, 4], [2, 3, 4], [2, 3, 4]]" + ], + "split": "train" + }, + { + "Input": "check if all values in the columns of a numpy matrix `a` are same", + "Output Program": [ + "np.all(a == a[(0), :], axis=0)" + ], + "Output Answer": [ + "np.all(a == a[(0), :], axis=0)" + ], + "split": "train" + }, + { + "Input": "unpack hexadecimal string `s` to a list of integer values", + "Output Program": [ + "struct.unpack('11B', s)" + ], + "Output Answer": [ + "struct.unpack('11B', s)" + ], + "split": "train" + }, + { + "Input": "immediately see output of print statement that doesn't end in a newline", + "Output Program": [ + "sys.stdout.flush()" + ], + "Output Answer": [ + "sys.stdout.flush()" + ], + "split": "train" + }, + { + "Input": "Convert list `t` to tuple", + "Output Program": [ + "tuple(l)" + ], + "Output Answer": [ + "tuple(l)" + ], + "split": "test" + }, + { + "Input": "save json output from a url \u2018http://search.twitter.com/search.json?q=hi\u2019 to file \u2018hi.json\u2019 in Python 2", + "Output Program": [ + "urllib.urlretrieve('http://search.twitter.com/search.json?q=hi', 'hi.json')" + ], + "Output Answer": [ + "urllib.urlretrieve('http://search.twitter.com/search.json?q=hi', 'hi.json')" + ], + "split": "train" + }, + { + "Input": "run flask application `app` in debug mode.", + "Output Program": [ + "app.run(debug=True)" + ], + "Output Answer": [ + "app.run(debug=True)" + ], + "split": "train" + }, + { + "Input": "check if file `filename` is descendant of directory '/the/dir/'", + "Output Program": [ + "os.path.commonprefix(['/the/dir/', os.path.realpath(filename)]) == '/the/dir/'" + ], + "Output Answer": [ + "os.path.commonprefix(['/the/dir/', os.path.realpath(filename)]) == '/the/dir/'" + ], + "split": "train" + }, + { + "Input": "append list `mylog` to `list1`", + "Output Program": [ + "list1.extend(mylog)" + ], + "Output Answer": [ + "list1.extend(mylog)" + ], + "split": "test" + }, + { + "Input": "convert list `list_of_ints` into a comma separated string", + "Output Program": [ + "\"\"\",\"\"\".join([str(i) for i in list_of_ints])" + ], + "Output Answer": [ + "\"\"\",\"\"\".join([str(i) for i in list_of_ints])" + ], + "split": "test" + }, + { + "Input": "get an element at index `[1,1]`in a numpy array `arr`", + "Output Program": [ + "print arr[1, 1]" + ], + "Output Answer": [ + "print arr[1, 1]" + ], + "split": "train" + }, + { + "Input": "List all the files that matches the pattern `hello*.txt`", + "Output Program": [ + "glob.glob('hello*.txt')" + ], + "Output Answer": [ + "glob.glob('hello*.txt')" + ], + "split": "train" + }, + { + "Input": "read file 'filename' line by line into a list `lines`", + "Output Program": [ + "lines = [line.rstrip('\\n') for line in open('filename')]", + "with open('filename') as f:\n lines = f.readlines()" + ], + "Output Answer": [ + "lines = [line.rstrip('\\n') for line in open('filename')]", + "with open('filename') as f:\n lines = f.readlines()" + ], + "split": "train" + }, + { + "Input": "check if all values of a dictionary `your_dict` are zero `0`", + "Output Program": [ + "all(value == 0 for value in your_dict.values())" + ], + "Output Answer": [ + "all(value == 0 for value in your_dict.values())" + ], + "split": "train" + }, + { + "Input": "Remove characters in `b` from a string `a`", + "Output Program": [ + "a = a.replace(char, '')" + ], + "Output Answer": [ + "a = a.replace(char, '')" + ], + "split": "train" + }, + { + "Input": "create a dictionary using two lists`x` and `y`", + "Output Program": [ + "dict(zip(x, y))" + ], + "Output Answer": [ + "dict(zip(x, y))" + ], + "split": "train" + }, + { + "Input": "check if all elements in list `myList` are identical", + "Output Program": [ + "all(x == myList[0] for x in myList)" + ], + "Output Answer": [ + "all(x == myList[0] for x in myList)" + ], + "split": "test" + }, + { + "Input": "clear session key 'mykey'", + "Output Program": [ + "del request.session['mykey']" + ], + "Output Answer": [ + "del request.session['mykey']" + ], + "split": "train" + }, + { + "Input": "abort the execution of the script using message 'aa! errors!'", + "Output Program": [ + "sys.exit('aa! errors!')" + ], + "Output Answer": [ + "sys.exit('aa! errors!')" + ], + "split": "train" + }, + { + "Input": "Sort a list of strings 'words' such that items starting with 's' come first.", + "Output Program": [ + "sorted(words, key=lambda x: 'a' + x if x.startswith('s') else 'b' + x)" + ], + "Output Answer": [ + "sorted(words, key=lambda x: 'a' + x if x.startswith('s') else 'b' + x)" + ], + "split": "train" + }, + { + "Input": "extract subset of key-value pairs with keys as `('l', 'm', 'n')` from dictionary object `bigdict`", + "Output Program": [ + "dict((k, bigdict[k]) for k in ('l', 'm', 'n'))" + ], + "Output Answer": [ + "dict((k, bigdict[k]) for k in ('l', 'm', 'n'))" + ], + "split": "train" + }, + { + "Input": "get the opposite diagonal of a numpy array `array`", + "Output Program": [ + "np.diag(np.rot90(array))" + ], + "Output Answer": [ + "np.diag(np.rot90(array))" + ], + "split": "train" + }, + { + "Input": "slice list `[1, 2, 3, 4, 5, 6, 7]` into lists of two elements each", + "Output Program": [ + "list(grouper(2, [1, 2, 3, 4, 5, 6, 7]))" + ], + "Output Answer": [ + "list(grouper(2, [1, 2, 3, 4, 5, 6, 7]))" + ], + "split": "train" + }, + { + "Input": "Convert hex string `s` to integer", + "Output Program": [ + "int(s, 16)" + ], + "Output Answer": [ + "int(s, 16)" + ], + "split": "train" + }, + { + "Input": "generate unique equal hash for equal dictionaries `a` and `b`", + "Output Program": [ + "hash(pformat(a)) == hash(pformat(b))" + ], + "Output Answer": [ + "hash(pformat(a)) == hash(pformat(b))" + ], + "split": "train" + }, + { + "Input": "match string 'this is my string' with regex '\\\\b(this|string)\\\\b'\r\nthen replace it with regex '\\\\1'", + "Output Program": [ + "re.sub('\\\\b(this|string)\\\\b', '\\\\1', 'this is my string')" + ], + "Output Answer": [ + "re.sub('\\\\b(this|string)\\\\b', '\\\\1', 'this is my string')" + ], + "split": "train" + }, + { + "Input": "sort list `lst` with positives coming before negatives with values sorted respectively", + "Output Program": [ + "sorted(lst, key=lambda x: (x < 0, x))" + ], + "Output Answer": [ + "sorted(lst, key=lambda x: (x < 0, x))" + ], + "split": "train" + }, + { + "Input": "regex matching 5-digit substrings not enclosed with digits in `s`", + "Output Program": [ + "re.findall('(?q', s)[0]" + ], + "Output Answer": [ + "struct.unpack('>q', s)[0]" + ], + "split": "train" + }, + { + "Input": "remove the element in list `a` at index `index`", + "Output Program": [ + "del a[index]", + "a.pop(index)" + ], + "Output Answer": [ + "del a[index]", + "a.pop(index)" + ], + "split": "train" + }, + { + "Input": "check if `obj_to_test` is a string", + "Output Program": [ + "isinstance(obj_to_test, str)" + ], + "Output Answer": [ + "isinstance(obj_to_test, str)" + ], + "split": "test" + }, + { + "Input": "match blank lines in `s` with regular expressions", + "Output Program": [ + "re.split('\\n\\\\s*\\n', s)" + ], + "Output Answer": [ + "re.split('\\n\\\\s*\\n', s)" + ], + "split": "train" + }, + { + "Input": "apply function `log2` to the grouped values by 'type' in dataframe `df`", + "Output Program": [ + "df.groupby('type').apply(lambda x: np.mean(np.log2(x['v'])))" + ], + "Output Answer": [ + "df.groupby('type').apply(lambda x: np.mean(np.log2(x['v'])))" + ], + "split": "train" + }, + { + "Input": "Move x-axis of the pyplot object `ax` to the top of a plot in matplotlib", + "Output Program": [ + "ax.xaxis.set_ticks_position('top')" + ], + "Output Answer": [ + "ax.xaxis.set_ticks_position('top')" + ], + "split": "train" + }, + { + "Input": "assign the index of the last occurence of `x` in list `s` to the variable `last`", + "Output Program": [ + "last = len(s) - s[::-1].index(x) - 1" + ], + "Output Answer": [ + "last = len(s) - s[::-1].index(x) - 1" + ], + "split": "train" + }, + { + "Input": "From multiIndexed dataframe `data` select columns `a` and `c` within each higher order column `one` and `two`", + "Output Program": [ + "data.loc[:, (list(itertools.product(['one', 'two'], ['a', 'c'])))]" + ], + "Output Answer": [ + "data.loc[:, (list(itertools.product(['one', 'two'], ['a', 'c'])))]" + ], + "split": "train" + }, + { + "Input": "remove specific elements in a numpy array `a`", + "Output Program": [ + "numpy.delete(a, index)" + ], + "Output Answer": [ + "numpy.delete(a, index)" + ], + "split": "train" + }, + { + "Input": "get multiple integer values from a string 'string1'", + "Output Program": [ + "map(int, re.findall('\\\\d+', string1))" + ], + "Output Answer": [ + "map(int, re.findall('\\\\d+', string1))" + ], + "split": "train" + }, + { + "Input": "read file 'myfile' using encoding 'iso-8859-1'", + "Output Program": [ + "codecs.open('myfile', 'r', 'iso-8859-1').read()" + ], + "Output Answer": [ + "codecs.open('myfile', 'r', 'iso-8859-1').read()" + ], + "split": "train" + }, + { + "Input": "get everything after last slash in a url stored in variable 'url'", + "Output Program": [ + "url.rsplit('/', 1)[-1]" + ], + "Output Answer": [ + "url.rsplit('/', 1)[-1]" + ], + "split": "train" + }, + { + "Input": "split string `text` by space", + "Output Program": [ + "text.split()" + ], + "Output Answer": [ + "text.split()" + ], + "split": "test" + }, + { + "Input": "Generate MD5 checksum of file in the path `full_path` in hashlib", + "Output Program": [ + "print hashlib.md5(open(full_path, 'rb').read()).hexdigest()" + ], + "Output Answer": [ + "print hashlib.md5(open(full_path, 'rb').read()).hexdigest()" + ], + "split": "train" + }, + { + "Input": "append 4 to list `foo`", + "Output Program": [ + "foo.append(4)" + ], + "Output Answer": [ + "foo.append(4)" + ], + "split": "train" + }, + { + "Input": "Normalize string `str` from 'cp1252' code to 'utf-8' code", + "Output Program": [ + "print str.encode('cp1252').decode('utf-8').encode('cp1252').decode('utf-8')" + ], + "Output Answer": [ + "print str.encode('cp1252').decode('utf-8').encode('cp1252').decode('utf-8')" + ], + "split": "train" + }, + { + "Input": "Calling an external command \"echo Hello World\"", + "Output Program": [ + "print os.popen('echo Hello World').read()", + "print subprocess.Popen('echo Hello World', shell=True, stdout=subprocess.PIPE).stdout.read()", + "return_code = subprocess.call('echo Hello World', shell=True)" + ], + "Output Answer": [ + "print os.popen('echo Hello World').read()", + "print subprocess.Popen('echo Hello World', shell=True, stdout=subprocess.PIPE).stdout.read()", + "return_code = subprocess.call('echo Hello World', shell=True)" + ], + "split": "train" + }, + { + "Input": "Get the date object `date_of_manufacture` of object `car` in string format '%Y-%m-%d'", + "Output Program": [ + "{{car.date_of_manufacture.strftime('%Y-%m-%d')}}" + ], + "Output Answer": [ + "{{car.date_of_manufacture.strftime('%Y-%m-%d')}}" + ], + "split": "train" + }, + { + "Input": "Add key \"mynewkey\" to dictionary `d` with value \"mynewvalue\"", + "Output Program": [ + "d['mynewkey'] = 'mynewvalue'" + ], + "Output Answer": [ + "d['mynewkey'] = 'mynewvalue'" + ], + "split": "test" + }, + { + "Input": "find the index of an element 'MSFT' in a list `stocks_list`", + "Output Program": [ + "[x for x in range(len(stocks_list)) if stocks_list[x] == 'MSFT']" + ], + "Output Answer": [ + "[x for x in range(len(stocks_list)) if stocks_list[x] == 'MSFT']" + ], + "split": "test" + }, + { + "Input": "find element by css selector \"input[onclick*='1 Bedroom Deluxe']\"", + "Output Program": [ + "driver.find_element_by_css_selector(\"input[onclick*='1 Bedroom Deluxe']\")" + ], + "Output Answer": [ + "driver.find_element_by_css_selector(\"input[onclick*='1 Bedroom Deluxe']\")" + ], + "split": "train" + }, + { + "Input": "split a list of tuples `data` into sub-lists of the same tuple field using itertools", + "Output Program": [ + "[list(group) for key, group in itertools.groupby(data, operator.itemgetter(1))]" + ], + "Output Answer": [ + "[list(group) for key, group in itertools.groupby(data, operator.itemgetter(1))]" + ], + "split": "train" + }, + { + "Input": "select alternate characters of \"H-e-l-l-o- -W-o-r-l-d\"", + "Output Program": [ + "'H-e-l-l-o- -W-o-r-l-d'[::2]" + ], + "Output Answer": [ + "'H-e-l-l-o- -W-o-r-l-d'[::2]" + ], + "split": "train" + }, + { + "Input": "append a numpy array 'b' to a numpy array 'a'", + "Output Program": [ + "np.vstack((a, b))" + ], + "Output Answer": [ + "np.vstack((a, b))" + ], + "split": "test" + }, + { + "Input": "check whether a file \"/etc\" exists", + "Output Program": [ + "print os.path.isfile('/etc')" + ], + "Output Answer": [ + "print os.path.isfile('/etc')" + ], + "split": "train" + }, + { + "Input": "sort a list of dictionaries `l` by values in key `name` in descending order", + "Output Program": [ + "newlist = sorted(l, key=itemgetter('name'), reverse=True)" + ], + "Output Answer": [ + "newlist = sorted(l, key=itemgetter('name'), reverse=True)" + ], + "split": "test" + }, + { + "Input": "replace spaces with underscore", + "Output Program": [ + "mystring.replace(' ', '_')" + ], + "Output Answer": [ + "mystring.replace(' ', '_')" + ], + "split": "test" + }, + { + "Input": "make a 60 seconds time delay", + "Output Program": [ + "time.sleep(60)" + ], + "Output Answer": [ + "time.sleep(60)" + ], + "split": "train" + }, + { + "Input": "Sort lis `list5` in ascending order based on the degrees value of its elements", + "Output Program": [ + "sorted(list5, lambda x: (degree(x), x))" + ], + "Output Answer": [ + "sorted(list5, lambda x: (degree(x), x))" + ], + "split": "test" + }, + { + "Input": "get all combination of n binary values", + "Output Program": [ + "lst = map(list, itertools.product([0, 1], repeat=n))", + "lst = list(itertools.product([0, 1], repeat=n))" + ], + "Output Answer": [ + "lst = map(list, itertools.product([0, 1], repeat=n))", + "lst = list(itertools.product([0, 1], repeat=n))" + ], + "split": "train" + }, + { + "Input": "average each two columns of array `data`", + "Output Program": [ + "data.reshape(-1, j).mean(axis=1).reshape(data.shape[0], -1)" + ], + "Output Answer": [ + "data.reshape(-1, j).mean(axis=1).reshape(data.shape[0], -1)" + ], + "split": "test" + }, + { + "Input": "find 10 largest differences between each respective elements of list `l1` and list `l2`", + "Output Program": [ + "heapq.nlargest(10, xrange(len(l1)), key=lambda i: abs(l1[i] - l2[i]))" + ], + "Output Answer": [ + "heapq.nlargest(10, xrange(len(l1)), key=lambda i: abs(l1[i] - l2[i]))" + ], + "split": "test" + }, + { + "Input": "convert a list with string `['1', '2', '3']` into list with integers", + "Output Program": [ + "map(int, ['1', '2', '3'])" + ], + "Output Answer": [ + "map(int, ['1', '2', '3'])" + ], + "split": "train" + }, + { + "Input": "download to a directory '/path/to/dir/filename.ext' from source 'http://example.com/file.ext'", + "Output Program": [ + "urllib.urlretrieve('http://example.com/file.ext', '/path/to/dir/filename.ext')" + ], + "Output Answer": [ + "urllib.urlretrieve('http://example.com/file.ext', '/path/to/dir/filename.ext')" + ], + "split": "train" + }, + { + "Input": "Format a datetime string `when` to extract date only", + "Output Program": [ + "then = datetime.datetime.strptime(when, '%Y-%m-%d').date()" + ], + "Output Answer": [ + "then = datetime.datetime.strptime(when, '%Y-%m-%d').date()" + ], + "split": "test" + }, + { + "Input": "get index of the biggest 2 values of a list `a`", + "Output Program": [ + "sorted(range(len(a)), key=lambda i: a[i])[-2:]" + ], + "Output Answer": [ + "sorted(range(len(a)), key=lambda i: a[i])[-2:]" + ], + "split": "train" + }, + { + "Input": "combine dataframe `df1` and dataframe `df2` by index number", + "Output Program": [ + "pd.merge(df1, df2, left_index=True, right_index=True, how='outer')" + ], + "Output Answer": [ + "pd.merge(df1, df2, left_index=True, right_index=True, how='outer')" + ], + "split": "train" + }, + { + "Input": "count non zero values in each column in pandas data frame", + "Output Program": [ + "df.astype(bool).sum(axis=1)" + ], + "Output Answer": [ + "df.astype(bool).sum(axis=1)" + ], + "split": "test" + }, + { + "Input": "create a set that is the exclusive or of [1, 2, 3] and [3, 4, 5]", + "Output Program": [ + "set([1, 2, 3]) ^ set([3, 4, 5])" + ], + "Output Answer": [ + "set([1, 2, 3]) ^ set([3, 4, 5])" + ], + "split": "train" + }, + { + "Input": "get biggest 3 values from each column of the pandas dataframe `data`", + "Output Program": [ + "data.apply(lambda x: sorted(x, 3))" + ], + "Output Answer": [ + "data.apply(lambda x: sorted(x, 3))" + ], + "split": "train" + }, + { + "Input": "Evaluate a nested dictionary `myobject.id.number` to get `number` if `myobject` is present with getattr", + "Output Program": [ + "getattr(getattr(myobject, 'id', None), 'number', None)" + ], + "Output Answer": [ + "getattr(getattr(myobject, 'id', None), 'number', None)" + ], + "split": "train" + }, + { + "Input": "Match regex pattern '((?:A|B|C)D)' on string 'BDE'", + "Output Program": [ + "re.findall('((?:A|B|C)D)', 'BDE')" + ], + "Output Answer": [ + "re.findall('((?:A|B|C)D)', 'BDE')" + ], + "split": "train" + }, + { + "Input": "clamping floating number `my_value` to be between `min_value` and `max_value`", + "Output Program": [ + "max(min(my_value, max_value), min_value)" + ], + "Output Answer": [ + "max(min(my_value, max_value), min_value)" + ], + "split": "train" + }, + { + "Input": "iterate over a dictionary `d` in sorted order", + "Output Program": [ + "it = iter(sorted(d.iteritems()))", + "for (key, value) in sorted(d.iteritems()):\n pass" + ], + "Output Answer": [ + "it = iter(sorted(d.iteritems()))", + "for (key, value) in sorted(d.iteritems()):\n pass" + ], + "split": "train" + }, + { + "Input": "get the dimensions of numpy array `a`", + "Output Program": [ + "N.shape(a)", + "a.shape" + ], + "Output Answer": [ + "N.shape(a)", + "a.shape" + ], + "split": "train" + }, + { + "Input": "Check if 3 is not in a list [2, 3, 4]", + "Output Program": [ + "(3 not in [2, 3, 4])" + ], + "Output Answer": [ + "(3 not in [2, 3, 4])" + ], + "split": "train" + }, + { + "Input": "check if a pandas dataframe `df`'s index is sorted", + "Output Program": [ + "all(df.index[:-1] <= df.index[1:])" + ], + "Output Answer": [ + "all(df.index[:-1] <= df.index[1:])" + ], + "split": "test" + }, + { + "Input": "reload a module `module`", + "Output Program": [ + "reload(module)" + ], + "Output Answer": [ + "reload(module)" + ], + "split": "test" + }, + { + "Input": "convert a number 2130706433 to ip string", + "Output Program": [ + "socket.inet_ntoa(struct.pack('!L', 2130706433))" + ], + "Output Answer": [ + "socket.inet_ntoa(struct.pack('!L', 2130706433))" + ], + "split": "train" + }, + { + "Input": "Convert DateTime column 'date' of pandas dataframe 'df' to ordinal", + "Output Program": [ + "df['date'].apply(lambda x: x.toordinal())" + ], + "Output Answer": [ + "df['date'].apply(lambda x: x.toordinal())" + ], + "split": "test" + }, + { + "Input": "reverse a string `some_string`", + "Output Program": [ + "some_string[::(-1)]" + ], + "Output Answer": [ + "some_string[::(-1)]" + ], + "split": "train" + }, + { + "Input": "extract table data from table `rows` using beautifulsoup", + "Output Program": [ + "[[td.findNext(text=True) for td in tr.findAll('td')] for tr in rows]" + ], + "Output Answer": [ + "[[td.findNext(text=True) for td in tr.findAll('td')] for tr in rows]" + ], + "split": "train" + }, + { + "Input": "Rename a folder `Joe Blow` to `Blow, Joe`", + "Output Program": [ + "os.rename('Joe Blow', 'Blow, Joe')" + ], + "Output Answer": [ + "os.rename('Joe Blow', 'Blow, Joe')" + ], + "split": "train" + }, + { + "Input": "Add key 'a' to dictionary `data` with value 1", + "Output Program": [ + "data.update({'a': 1, })", + "data.update(a=1)", + "data.update(dict(a=1))" + ], + "Output Answer": [ + "data.update({'a': 1, })", + "data.update(a=1)", + "data.update(dict(a=1))" + ], + "split": "test" + }, + { + "Input": "regular expression matching all but 'aa' and 'bb'", + "Output Program": [ + "re.findall('-(?!aa|bb)([^-]+)', string)" + ], + "Output Answer": [ + "re.findall('-(?!aa|bb)([^-]+)', string)" + ], + "split": "train" + }, + { + "Input": "check whether a path \"/etc\" exists", + "Output Program": [ + "print os.path.exists('/etc')" + ], + "Output Answer": [ + "print os.path.exists('/etc')" + ], + "split": "train" + }, + { + "Input": "split string \"0,1,2\" based on delimiter ','", + "Output Program": [ + "\"\"\"0,1,2\"\"\".split(',')" + ], + "Output Answer": [ + "\"\"\"0,1,2\"\"\".split(',')" + ], + "split": "train" + }, + { + "Input": "Convert unix timestamp '1347517370' to formatted string '%Y-%m-%d %H:%M:%S'", + "Output Program": [ + "time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(1347517370))" + ], + "Output Answer": [ + "time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(1347517370))" + ], + "split": "test" + }, + { + "Input": "Call a base class's class method `do` from derived class `Derived`", + "Output Program": [ + "super(Derived, cls).do(a)" + ], + "Output Answer": [ + "super(Derived, cls).do(a)" + ], + "split": "test" + }, + { + "Input": "split string `str1` on one or more spaces with a regular expression", + "Output Program": [ + "re.split(' +', str1)" + ], + "Output Answer": [ + "re.split(' +', str1)" + ], + "split": "train" + }, + { + "Input": "Parse a file `sample.xml` using expat parsing in python 3", + "Output Program": [ + "parser.ParseFile(open('sample.xml', 'rb'))" + ], + "Output Answer": [ + "parser.ParseFile(open('sample.xml', 'rb'))" + ], + "split": "train" + }, + { + "Input": "decode url `url` from UTF-16 code to UTF-8 code", + "Output Program": [ + "urllib.unquote(url).decode('utf8')" + ], + "Output Answer": [ + "urllib.unquote(url).decode('utf8')" + ], + "split": "train" + }, + { + "Input": "sort a list of tuples `a` by the sum of second and third element of each tuple", + "Output Program": [ + "sorted(a, key=lambda x: (sum(x[1:3]), x[0]), reverse=True)" + ], + "Output Answer": [ + "sorted(a, key=lambda x: (sum(x[1:3]), x[0]), reverse=True)" + ], + "split": "train" + }, + { + "Input": "zip keys with individual values in lists `k` and `v`", + "Output Program": [ + "[dict(zip(k, x)) for x in v]" + ], + "Output Answer": [ + "[dict(zip(k, x)) for x in v]" + ], + "split": "train" + }, + { + "Input": "get domain/host name from request object in Django", + "Output Program": [ + "request.META['HTTP_HOST']" + ], + "Output Answer": [ + "request.META['HTTP_HOST']" + ], + "split": "train" + }, + { + "Input": "Delete an element \"hello\" from a dictionary `lol`", + "Output Program": [ + "lol.pop('hello')" + ], + "Output Answer": [ + "lol.pop('hello')" + ], + "split": "train" + }, + { + "Input": "serialise SqlAlchemy RowProxy object `row` to a json object", + "Output Program": [ + "json.dumps([dict(row.items()) for row in rs])" + ], + "Output Answer": [ + "json.dumps([dict(row.items()) for row in rs])" + ], + "split": "train" + }, + { + "Input": "convert a list into a generator object", + "Output Program": [ + "(n for n in [1, 2, 3, 5])" + ], + "Output Answer": [ + "(n for n in [1, 2, 3, 5])" + ], + "split": "test" + }, + { + "Input": "prepend string 'hello' to all items in list 'a'", + "Output Program": [ + "['hello{0}'.format(i) for i in a]" + ], + "Output Answer": [ + "['hello{0}'.format(i) for i in a]" + ], + "split": "train" + }, + { + "Input": "sort a list of dictionaries `a` by dictionary values in descending order", + "Output Program": [ + "sorted(a, key=lambda i: i.values()[0], reverse=True)" + ], + "Output Answer": [ + "sorted(a, key=lambda i: i.values()[0], reverse=True)" + ], + "split": "train" + }, + { + "Input": "check if object `obj` is a string", + "Output Program": [ + "isinstance(obj, basestring)" + ], + "Output Answer": [ + "isinstance(obj, basestring)" + ], + "split": "test" + }, + { + "Input": "split string `s` to list conversion by ','", + "Output Program": [ + "[x.strip() for x in s.split(',')]" + ], + "Output Answer": [ + "[x.strip() for x in s.split(',')]" + ], + "split": "train" + }, + { + "Input": "get the first element of each tuple from a list of tuples `G`", + "Output Program": [ + "[x[0] for x in G]" + ], + "Output Answer": [ + "[x[0] for x in G]" + ], + "split": "train" + }, + { + "Input": "get line count of file `filename`", + "Output Program": [ + "def bufcount(filename):\n f = open(filename)\n lines = 0\n buf_size = (1024 * 1024)\n read_f = f.read\n buf = read_f(buf_size)\n while buf:\n lines += buf.count('\\n')\n buf = read_f(buf_size)\n return lines" + ], + "Output Answer": [ + "def bufcount(filename):\n f = open(filename)\n lines = 0\n buf_size = (1024 * 1024)\n read_f = f.read\n buf = read_f(buf_size)\n while buf:\n lines += buf.count('\\n')\n buf = read_f(buf_size)\n return lines" + ], + "split": "train" + }, + { + "Input": "get the maximum 2 values per row in array `A`", + "Output Program": [ + "A[:, -2:]" + ], + "Output Answer": [ + "A[:, -2:]" + ], + "split": "train" + }, + { + "Input": "Concatenate elements of a list 'x' of multiple integers to a single integer", + "Output Program": [ + "sum(d * 10 ** i for i, d in enumerate(x[::-1]))" + ], + "Output Answer": [ + "sum(d * 10 ** i for i, d in enumerate(x[::-1]))" + ], + "split": "train" + }, + { + "Input": "get a dictionary `records` of key-value pairs in PyMongo cursor `cursor`", + "Output Program": [ + "records = dict((record['_id'], record) for record in cursor)" + ], + "Output Answer": [ + "records = dict((record['_id'], record) for record in cursor)" + ], + "split": "test" + }, + { + "Input": "throw an exception \"I know Python!\"", + "Output Program": [ + "raise Exception('I know Python!')" + ], + "Output Answer": [ + "raise Exception('I know Python!')" + ], + "split": "train" + }, + { + "Input": "remove line breaks from string `textblock` using regex", + "Output Program": [ + "re.sub('(?<=[a-z])\\\\r?\\\\n', ' ', textblock)" + ], + "Output Answer": [ + "re.sub('(?<=[a-z])\\\\r?\\\\n', ' ', textblock)" + ], + "split": "train" + }, + { + "Input": "pars a string 'http://example.org/#comments' to extract hashtags into an array", + "Output Program": [ + "re.findall('#(\\\\w+)', 'http://example.org/#comments')" + ], + "Output Answer": [ + "re.findall('#(\\\\w+)', 'http://example.org/#comments')" + ], + "split": "train" + }, + { + "Input": "Converting string lists `s` to float list", + "Output Program": [ + "floats = map(float, s.split())", + "floats = [float(x) for x in s.split()]" + ], + "Output Answer": [ + "floats = map(float, s.split())", + "floats = [float(x) for x in s.split()]" + ], + "split": "train" + }, + { + "Input": "Get Last Day of the second month in year 2012", + "Output Program": [ + "monthrange(2012, 2)" + ], + "Output Answer": [ + "monthrange(2012, 2)" + ], + "split": "train" + }, + { + "Input": "create variable key/value pairs with argparse", + "Output Program": [ + "parser.add_argument('--conf', nargs=2, action='append')" + ], + "Output Answer": [ + "parser.add_argument('--conf', nargs=2, action='append')" + ], + "split": "train" + }, + { + "Input": "get the first value from dataframe `df` where column 'Letters' is equal to 'C'", + "Output Program": [ + "df.loc[df['Letters'] == 'C', 'Letters'].values[0]" + ], + "Output Answer": [ + "df.loc[df['Letters'] == 'C', 'Letters'].values[0]" + ], + "split": "test" + }, + { + "Input": "Filter dictionary `d` to have items with value greater than 0", + "Output Program": [ + "d = {k: v for k, v in d.items() if v > 0}" + ], + "Output Answer": [ + "d = {k: v for k, v in d.items() if v > 0}" + ], + "split": "train" + }, + { + "Input": "separate words delimited by one or more spaces into a list", + "Output Program": [ + "re.split(' +', 'hello world sample text')" + ], + "Output Answer": [ + "re.split(' +', 'hello world sample text')" + ], + "split": "test" + }, + { + "Input": "print multiple arguments 'name' and 'score'.", + "Output Program": [ + "print 'Total score for {} is {}'.format(name, score)" + ], + "Output Answer": [ + "print 'Total score for {} is {}'.format(name, score)" + ], + "split": "train" + }, + { + "Input": "split a string 's' by space while ignoring spaces within square braces and quotes.", + "Output Program": [ + "re.findall('\\\\[[^\\\\]]*\\\\]|\"[^\"]*\"|\\\\S+', s)" + ], + "Output Answer": [ + "re.findall('\\\\[[^\\\\]]*\\\\]|\"[^\"]*\"|\\\\S+', s)" + ], + "split": "train" + }, + { + "Input": "Get the index value in list `p_list` using enumerate in list comprehension", + "Output Program": [ + "{p.id: {'id': p.id, 'position': ind} for ind, p in enumerate(p_list)}" + ], + "Output Answer": [ + "{p.id: {'id': p.id, 'position': ind} for ind, p in enumerate(p_list)}" + ], + "split": "train" + }, + { + "Input": "read the contents of the file 'file.txt' into `txt`", + "Output Program": [ + "txt = open('file.txt').read()" + ], + "Output Answer": [ + "txt = open('file.txt').read()" + ], + "split": "train" + }, + { + "Input": "randomly switch letters' cases in string `s`", + "Output Program": [ + "\"\"\"\"\"\".join(x.upper() if random.randint(0, 1) else x for x in s)" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(x.upper() if random.randint(0, 1) else x for x in s)" + ], + "split": "train" + }, + { + "Input": "add key value pairs 'item4' , 4 and 'item5' , 5 to dictionary `default_data`", + "Output Program": [ + "default_data.update({'item4': 4, 'item5': 5, })" + ], + "Output Answer": [ + "default_data.update({'item4': 4, 'item5': 5, })" + ], + "split": "train" + }, + { + "Input": "unzip the list `[('a', 1), ('b', 2), ('c', 3), ('d', 4)]`", + "Output Program": [ + "zip(*[('a', 1), ('b', 2), ('c', 3), ('d', 4)])" + ], + "Output Answer": [ + "zip(*[('a', 1), ('b', 2), ('c', 3), ('d', 4)])" + ], + "split": "test" + }, + { + "Input": "writing items in list `itemlist` to file `outfile`", + "Output Program": [ + "outfile.write('\\n'.join(itemlist))" + ], + "Output Answer": [ + "outfile.write('\\n'.join(itemlist))" + ], + "split": "train" + }, + { + "Input": "load a file `file.py` into the python console", + "Output Program": [ + "execfile('file.py')" + ], + "Output Answer": [ + "execfile('file.py')" + ], + "split": "train" + }, + { + "Input": "get every thing after last `/`", + "Output Program": [ + "url.rsplit('/', 1)" + ], + "Output Answer": [ + "url.rsplit('/', 1)" + ], + "split": "train" + }, + { + "Input": "align values in array `b` to the order of corresponding values in array `a`", + "Output Program": [ + "a[np.in1d(a, b)]" + ], + "Output Answer": [ + "a[np.in1d(a, b)]" + ], + "split": "train" + }, + { + "Input": "case insensitive string comparison between `first` and `second`", + "Output Program": [ + "(first.lower() == second.lower())" + ], + "Output Answer": [ + "(first.lower() == second.lower())" + ], + "split": "train" + }, + { + "Input": "BeautifulSoup get value associated with attribute 'content' where attribute 'name' is equal to 'City' in tag 'meta' in HTML parsed string `soup`", + "Output Program": [ + "soup.find('meta', {'name': 'City'})['content']" + ], + "Output Answer": [ + "soup.find('meta', {'name': 'City'})['content']" + ], + "split": "train" + }, + { + "Input": "map two lists `keys` and `values` into a dictionary", + "Output Program": [ + "dict((k, v) for k, v in zip(keys, values))", + "new_dict = {k: v for k, v in zip(keys, values)}", + "dict([(k, v) for k, v in zip(keys, values)])" + ], + "Output Answer": [ + "dict((k, v) for k, v in zip(keys, values))", + "new_dict = {k: v for k, v in zip(keys, values)}", + "dict([(k, v) for k, v in zip(keys, values)])" + ], + "split": "train" + }, + { + "Input": "find tuple in list of tuples `a_list` with the largest second element", + "Output Program": [ + "max(a_list, key=operator.itemgetter(1))" + ], + "Output Answer": [ + "max(a_list, key=operator.itemgetter(1))" + ], + "split": "train" + }, + { + "Input": "get the sum of each second value from a list of tuple `structure`", + "Output Program": [ + "sum(x[1] for x in structure)" + ], + "Output Answer": [ + "sum(x[1] for x in structure)" + ], + "split": "train" + }, + { + "Input": "kill a process `make.exe` from python script on windows", + "Output Program": [ + "os.system('taskkill /im make.exe')" + ], + "Output Answer": [ + "os.system('taskkill /im make.exe')" + ], + "split": "train" + }, + { + "Input": "get relative path of path '/usr/var' regarding path '/usr/var/log/'", + "Output Program": [ + "print os.path.relpath('/usr/var/log/', '/usr/var')" + ], + "Output Answer": [ + "print os.path.relpath('/usr/var/log/', '/usr/var')" + ], + "split": "train" + }, + { + "Input": "drop duplicate indexes in a pandas data frame `df`", + "Output Program": [ + "df[~df.index.duplicated()]" + ], + "Output Answer": [ + "df[~df.index.duplicated()]" + ], + "split": "train" + }, + { + "Input": "find the element that holds string 'TEXT A' in file `root`", + "Output Program": [ + "e = root.xpath('.//a[text()=\"TEXT A\"]')" + ], + "Output Answer": [ + "e = root.xpath('.//a[text()=\"TEXT A\"]')" + ], + "split": "train" + }, + { + "Input": "Represent DateTime object '10/05/2012' with format '%d/%m/%Y' into format '%Y-%m-%d'", + "Output Program": [ + "datetime.datetime.strptime('10/05/2012', '%d/%m/%Y').strftime('%Y-%m-%d')" + ], + "Output Answer": [ + "datetime.datetime.strptime('10/05/2012', '%d/%m/%Y').strftime('%Y-%m-%d')" + ], + "split": "train" + }, + { + "Input": "delay for \"5\" seconds", + "Output Program": [ + "time.sleep(5)" + ], + "Output Answer": [ + "time.sleep(5)" + ], + "split": "train" + }, + { + "Input": "update all values associated with key `i` to string 'updated' if value `j` is not equal to 'None' in dictionary `d`", + "Output Program": [ + "{i: 'updated' for i, j in d.items() if j != 'None'}" + ], + "Output Answer": [ + "{i: 'updated' for i, j in d.items() if j != 'None'}" + ], + "split": "train" + }, + { + "Input": "check if any of the items in `search` appear in `string`", + "Output Program": [ + "any(x in string for x in search)" + ], + "Output Answer": [ + "any(x in string for x in search)" + ], + "split": "train" + }, + { + "Input": "Get the sum of values to the power of their indices in a list `l`", + "Output Program": [ + "sum(j ** i for i, j in enumerate(l, 1))" + ], + "Output Answer": [ + "sum(j ** i for i, j in enumerate(l, 1))" + ], + "split": "train" + }, + { + "Input": "get all environment variables", + "Output Program": [ + "os.environ" + ], + "Output Answer": [ + "os.environ" + ], + "split": "train" + }, + { + "Input": "get the position of item 1 in `testlist`", + "Output Program": [ + "[i for (i, x) in enumerate(testlist) if (x == 1)]", + "gen = (i for (i, x) in enumerate(testlist) if (x == 1))\nfor i in gen:\n pass", + "for i in [i for (i, x) in enumerate(testlist) if (x == 1)]:\n pass", + "for i in (i for (i, x) in enumerate(testlist) if (x == 1)):\n pass" + ], + "Output Answer": [ + "[i for (i, x) in enumerate(testlist) if (x == 1)]", + "gen = (i for (i, x) in enumerate(testlist) if (x == 1))\nfor i in gen:\n pass", + "for i in [i for (i, x) in enumerate(testlist) if (x == 1)]:\n pass", + "for i in (i for (i, x) in enumerate(testlist) if (x == 1)):\n pass" + ], + "split": "test" + }, + { + "Input": "Creating an empty list `l`", + "Output Program": [ + "l = []", + "l = list()" + ], + "Output Answer": [ + "l = []", + "l = list()" + ], + "split": "train" + }, + { + "Input": "merge two lists `a` and `b` into a single list", + "Output Program": [ + "[j for i in zip(a, b) for j in i]" + ], + "Output Answer": [ + "[j for i in zip(a, b) for j in i]" + ], + "split": "train" + }, + { + "Input": "From a list of strings `my_list`, remove the values that contains numbers.", + "Output Program": [ + "[x for x in my_list if not any(c.isdigit() for c in x)]" + ], + "Output Answer": [ + "[x for x in my_list if not any(c.isdigit() for c in x)]" + ], + "split": "train" + }, + { + "Input": "check if a directory `path` exists and create it if necessary", + "Output Program": [ + "try:\n os.makedirs(path)\nexcept OSError as exception:\n if (exception.errno != errno.EEXIST):\n raise", + "distutils.dir_util.mkpath(path)", + "try:\n os.makedirs(path)\nexcept OSError:\n if (not os.path.isdir(path)):\n raise" + ], + "Output Answer": [ + "try:\n os.makedirs(path)\nexcept OSError as exception:\n if (exception.errno != errno.EEXIST):\n raise", + "distutils.dir_util.mkpath(path)", + "try:\n os.makedirs(path)\nexcept OSError:\n if (not os.path.isdir(path)):\n raise" + ], + "split": "test" + }, + { + "Input": "get set intersection between dictionaries `d1` and `d2`", + "Output Program": [ + "dict((x, set(y) & set(d1.get(x, ()))) for x, y in d2.iteritems())" + ], + "Output Answer": [ + "dict((x, set(y) & set(d1.get(x, ()))) for x, y in d2.iteritems())" + ], + "split": "train" + }, + { + "Input": "write records in dataframe `df` to table 'test' in schema 'a_schema'", + "Output Program": [ + "df.to_sql('test', engine, schema='a_schema')" + ], + "Output Answer": [ + "df.to_sql('test', engine, schema='a_schema')" + ], + "split": "test" + }, + { + "Input": "get a list `res_list` of the first elements of each tuple in a list of tuples `rows`", + "Output Program": [ + "res_list = [x[0] for x in rows]" + ], + "Output Answer": [ + "res_list = [x[0] for x in rows]" + ], + "split": "train" + }, + { + "Input": "use regular expression '((\\\\d)(?:[()]*\\\\2*[()]*)*)' to split string `s`", + "Output Program": [ + "[i[0] for i in re.findall('((\\\\d)(?:[()]*\\\\2*[()]*)*)', s)]" + ], + "Output Answer": [ + "[i[0] for i in re.findall('((\\\\d)(?:[()]*\\\\2*[()]*)*)', s)]" + ], + "split": "train" + }, + { + "Input": "Call a subprocess with arguments `c:\\\\Program Files\\\\VMware\\\\VMware Server\\\\vmware-cmd.bat` that may contain spaces", + "Output Program": [ + "subprocess.Popen(['c:\\\\Program Files\\\\VMware\\\\VMware Server\\\\vmware-cmd.bat'])" + ], + "Output Answer": [ + "subprocess.Popen(['c:\\\\Program Files\\\\VMware\\\\VMware Server\\\\vmware-cmd.bat'])" + ], + "split": "test" + }, + { + "Input": "django urlsafe base64 decode string `uenc` with decryption", + "Output Program": [ + "base64.urlsafe_b64decode(uenc.encode('ascii'))" + ], + "Output Answer": [ + "base64.urlsafe_b64decode(uenc.encode('ascii'))" + ], + "split": "train" + }, + { + "Input": "Collapse hierarchical column index to level 0 in dataframe `df`", + "Output Program": [ + "df.columns = df.columns.get_level_values(0)" + ], + "Output Answer": [ + "df.columns = df.columns.get_level_values(0)" + ], + "split": "train" + }, + { + "Input": "Sort the values of the dataframe `df` and align the columns accordingly based on the obtained indices after np.argsort.", + "Output Program": [ + "pd.DataFrame(df.columns[np.argsort(df.values)], df.index, np.unique(df.values))" + ], + "Output Answer": [ + "pd.DataFrame(df.columns[np.argsort(df.values)], df.index, np.unique(df.values))" + ], + "split": "train" + }, + { + "Input": "numpy concatenate two arrays `a` and `b` along the first axis", + "Output Program": [ + "print concatenate((a, b), axis=0)", + "c = np.r_[(a[None, :], b[None, :])]", + "np.array((a, b))" + ], + "Output Answer": [ + "print concatenate((a, b), axis=0)", + "c = np.r_[(a[None, :], b[None, :])]", + "np.array((a, b))" + ], + "split": "test" + }, + { + "Input": "convert epoch time represented as milliseconds `s` to string using format '%Y-%m-%d %H:%M:%S.%f'", + "Output Program": [ + "datetime.datetime.fromtimestamp(s).strftime('%Y-%m-%d %H:%M:%S.%f')" + ], + "Output Answer": [ + "datetime.datetime.fromtimestamp(s).strftime('%Y-%m-%d %H:%M:%S.%f')" + ], + "split": "test" + }, + { + "Input": "get keys with same value in dictionary `d`", + "Output Program": [ + "print [key for key, value in d.iteritems() if value == 1]", + "print [key for key in d if d[key] == 1]" + ], + "Output Answer": [ + "print [key for key, value in d.iteritems() if value == 1]", + "print [key for key in d if d[key] == 1]" + ], + "split": "train" + }, + { + "Input": "encode string `s` to utf-8 code", + "Output Program": [ + "s.encode('utf8')" + ], + "Output Answer": [ + "s.encode('utf8')" + ], + "split": "train" + }, + { + "Input": "parse milliseconds epoch time '1236472051807' to format '%Y-%m-%d %H:%M:%S'", + "Output Program": [ + "time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(1236472051807 / 1000.0))" + ], + "Output Answer": [ + "time.strftime('%Y-%m-%d %H:%M:%S', time.gmtime(1236472051807 / 1000.0))" + ], + "split": "test" + }, + { + "Input": "Get the number of NaN values in each column of dataframe `df`", + "Output Program": [ + "df.isnull().sum()" + ], + "Output Answer": [ + "df.isnull().sum()" + ], + "split": "train" + }, + { + "Input": "split string `s` into a list of strings based on ',' then replace empty strings with zero", + "Output Program": [ + "\"\"\",\"\"\".join(x or '0' for x in s.split(','))" + ], + "Output Answer": [ + "\"\"\",\"\"\".join(x or '0' for x in s.split(','))" + ], + "split": "train" + }, + { + "Input": "Get day name from a datetime object", + "Output Program": [ + "date.today().strftime('%A')" + ], + "Output Answer": [ + "date.today().strftime('%A')" + ], + "split": "train" + }, + { + "Input": "encode a pdf file `pdf_reference.pdf` with `base64` encoding", + "Output Program": [ + "a = open('pdf_reference.pdf', 'rb').read().encode('base64')" + ], + "Output Answer": [ + "a = open('pdf_reference.pdf', 'rb').read().encode('base64')" + ], + "split": "train" + }, + { + "Input": "check if list `seq` is empty", + "Output Program": [ + "if (not seq):\n pass" + ], + "Output Answer": [ + "if (not seq):\n pass" + ], + "split": "train" + }, + { + "Input": "concatenate '-' in between characters of string `str`", + "Output Program": [ + "re.sub('(?<=.)(?=.)', '-', str)" + ], + "Output Answer": [ + "re.sub('(?<=.)(?=.)', '-', str)" + ], + "split": "train" + }, + { + "Input": "print \".\" without newline", + "Output Program": [ + "sys.stdout.write('.')" + ], + "Output Answer": [ + "sys.stdout.write('.')" + ], + "split": "test" + }, + { + "Input": "get the dot product of two one dimensional numpy arrays", + "Output Program": [ + "np.dot(a[:, (None)], b[(None), :])" + ], + "Output Answer": [ + "np.dot(a[:, (None)], b[(None), :])" + ], + "split": "train" + }, + { + "Input": "find rows matching `(0,1)` in a 2 dimensional numpy array `vals`", + "Output Program": [ + "np.where((vals == (0, 1)).all(axis=1))" + ], + "Output Answer": [ + "np.where((vals == (0, 1)).all(axis=1))" + ], + "split": "train" + }, + { + "Input": "strip the string `.txt` from anywhere in the string `Boat.txt.txt`", + "Output Program": [ + "\"\"\"Boat.txt.txt\"\"\".replace('.txt', '')" + ], + "Output Answer": [ + "\"\"\"Boat.txt.txt\"\"\".replace('.txt', '')" + ], + "split": "train" + }, + { + "Input": "match regex pattern '(\\\\d+(\\\\.\\\\d+)?)' with string '3434.35353'", + "Output Program": [ + "print re.match('(\\\\d+(\\\\.\\\\d+)?)', '3434.35353').group(1)" + ], + "Output Answer": [ + "print re.match('(\\\\d+(\\\\.\\\\d+)?)', '3434.35353').group(1)" + ], + "split": "train" + }, + { + "Input": "Find last occurrence of character '}' in string \"abcd}def}\"", + "Output Program": [ + "'abcd}def}'.rfind('}')" + ], + "Output Answer": [ + "'abcd}def}'.rfind('}')" + ], + "split": "test" + }, + { + "Input": "get a list of variables from module 'adfix.py' in current module.", + "Output Program": [ + "print [item for item in dir(adfix) if not item.startswith('__')]" + ], + "Output Answer": [ + "print [item for item in dir(adfix) if not item.startswith('__')]" + ], + "split": "train" + }, + { + "Input": "return a 401 unauthorized in django", + "Output Program": [ + "return HttpResponse('Unauthorized', status=401)" + ], + "Output Answer": [ + "return HttpResponse('Unauthorized', status=401)" + ], + "split": "test" + }, + { + "Input": "handle the `urlfetch_errors ` exception for imaplib request to url `url`", + "Output Program": [ + "urlfetch.fetch(url, deadline=10 * 60)" + ], + "Output Answer": [ + "urlfetch.fetch(url, deadline=10 * 60)" + ], + "split": "train" + }, + { + "Input": "shutdown and restart a computer running windows from script", + "Output Program": [ + "subprocess.call(['shutdown', '/r'])" + ], + "Output Answer": [ + "subprocess.call(['shutdown', '/r'])" + ], + "split": "train" + }, + { + "Input": "check if string `a` is an integer", + "Output Program": [ + "a.isdigit()" + ], + "Output Answer": [ + "a.isdigit()" + ], + "split": "train" + }, + { + "Input": "set pythonpath in python script.", + "Output Program": [ + "sys.path.append('/path/to/whatever')" + ], + "Output Answer": [ + "sys.path.append('/path/to/whatever')" + ], + "split": "test" + }, + { + "Input": "add one day and three hours to the present time from datetime.now()", + "Output Program": [ + "datetime.datetime.now() + datetime.timedelta(days=1, hours=3)" + ], + "Output Answer": [ + "datetime.datetime.now() + datetime.timedelta(days=1, hours=3)" + ], + "split": "train" + }, + { + "Input": "sort array `order_array` based on column 'year', 'month' and 'day'", + "Output Program": [ + "order_array.sort(order=['year', 'month', 'day'])" + ], + "Output Answer": [ + "order_array.sort(order=['year', 'month', 'day'])" + ], + "split": "train" + }, + { + "Input": "regular expression matching all but 'aa' and 'bb' for string `string`", + "Output Program": [ + "re.findall('-(?!aa-|bb-)([^-]+)', string)" + ], + "Output Answer": [ + "re.findall('-(?!aa-|bb-)([^-]+)', string)" + ], + "split": "train" + }, + { + "Input": "get the content of child tag with`href` attribute whose parent has css `someclass`", + "Output Program": [ + "self.driver.find_element_by_css_selector('.someclass a').get_attribute('href')" + ], + "Output Answer": [ + "self.driver.find_element_by_css_selector('.someclass a').get_attribute('href')" + ], + "split": "test" + }, + { + "Input": "concatenate items from list `parts` into a string starting from the second element", + "Output Program": [ + "\"\"\"\"\"\".join(parts[1:])" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(parts[1:])" + ], + "split": "train" + }, + { + "Input": "Return the decimal value for each hex character in data `data`", + "Output Program": [ + "print ' '.join([str(ord(a)) for a in data])" + ], + "Output Answer": [ + "print ' '.join([str(ord(a)) for a in data])" + ], + "split": "train" + }, + { + "Input": "fill list `myList` with 4 0's", + "Output Program": [ + "self.myList.extend([0] * (4 - len(self.myList)))" + ], + "Output Answer": [ + "self.myList.extend([0] * (4 - len(self.myList)))" + ], + "split": "train" + }, + { + "Input": "iterate over a dictionary `dict` in sorted order", + "Output Program": [ + "return iter(sorted(dict.iteritems()))", + "return sorted(dict.iteritems())" + ], + "Output Answer": [ + "return iter(sorted(dict.iteritems()))", + "return sorted(dict.iteritems())" + ], + "split": "train" + }, + { + "Input": "check if the third element of all the lists in a list \"items\" is equal to zero.", + "Output Program": [ + "any(item[2] == 0 for item in items)" + ], + "Output Answer": [ + "any(item[2] == 0 for item in items)" + ], + "split": "train" + }, + { + "Input": "convert string representation `s2` of binary string rep of integer to floating point number", + "Output Program": [ + "struct.unpack('d', struct.pack('Q', int(s2, 0)))[0]" + ], + "Output Answer": [ + "struct.unpack('d', struct.pack('Q', int(s2, 0)))[0]" + ], + "split": "train" + }, + { + "Input": "replace white spaces in string ' a\\n b\\n c\\nd e' with empty string ''", + "Output Program": [ + "re.sub('(?m)^[^\\\\S\\\\n]+', '', ' a\\n b\\n c\\nd e')" + ], + "Output Answer": [ + "re.sub('(?m)^[^\\\\S\\\\n]+', '', ' a\\n b\\n c\\nd e')" + ], + "split": "train" + }, + { + "Input": "get the platform OS name", + "Output Program": [ + "platform.system()" + ], + "Output Answer": [ + "platform.system()" + ], + "split": "train" + }, + { + "Input": "do a boolean check if a string `lestring` contains any of the items in list `lelist`", + "Output Program": [ + "any(e in lestring for e in lelist)" + ], + "Output Answer": [ + "any(e in lestring for e in lelist)" + ], + "split": "train" + }, + { + "Input": "split string 'a b.c' on space \" \" and dot character \".\"", + "Output Program": [ + "re.split('[ .]', 'a b.c')" + ], + "Output Answer": [ + "re.split('[ .]', 'a b.c')" + ], + "split": "train" + }, + { + "Input": "reverse sort counter `x` by value", + "Output Program": [ + "sorted(x.items(), key=lambda pair: pair[1], reverse=True)" + ], + "Output Answer": [ + "sorted(x.items(), key=lambda pair: pair[1], reverse=True)" + ], + "split": "test" + }, + { + "Input": "SQLAlchemy count the number of rows with distinct values in column `name` of table `Tag`", + "Output Program": [ + "session.query(Tag).distinct(Tag.name).group_by(Tag.name).count()" + ], + "Output Answer": [ + "session.query(Tag).distinct(Tag.name).group_by(Tag.name).count()" + ], + "split": "train" + }, + { + "Input": "limit float 13.9499999 to two decimal points", + "Output Program": [ + "('%.2f' % 13.9499999)" + ], + "Output Answer": [ + "('%.2f' % 13.9499999)" + ], + "split": "train" + }, + { + "Input": "Add row `['8/19/2014', 'Jun', 'Fly', '98765']` to dataframe `df`", + "Output Program": [ + "df.loc[len(df)] = ['8/19/2014', 'Jun', 'Fly', '98765']" + ], + "Output Answer": [ + "df.loc[len(df)] = ['8/19/2014', 'Jun', 'Fly', '98765']" + ], + "split": "train" + }, + { + "Input": "None", + "Output Program": [ + "datetime.datetime.strptime('2007-03-04T21:08:12', '%Y-%m-%dT%H:%M:%S')" + ], + "Output Answer": [ + "datetime.datetime.strptime('2007-03-04T21:08:12', '%Y-%m-%dT%H:%M:%S')" + ], + "split": "train" + }, + { + "Input": "create a list which indicates whether each element in `x` and `y` is identical", + "Output Program": [ + "[(x[i] == y[i]) for i in xrange(len(x))]" + ], + "Output Answer": [ + "[(x[i] == y[i]) for i in xrange(len(x))]" + ], + "split": "train" + }, + { + "Input": "Reverse a string \"foo\"", + "Output Program": [ + "'foo'[::(-1)]" + ], + "Output Answer": [ + "'foo'[::(-1)]" + ], + "split": "train" + }, + { + "Input": "clear the terminal screen in Linux", + "Output Program": [ + "os.system('clear')" + ], + "Output Answer": [ + "os.system('clear')" + ], + "split": "train" + }, + { + "Input": "split a unicode string `text` into a list of words and punctuation characters with a regex", + "Output Program": [ + "re.findall('\\\\w+|[^\\\\w\\\\s]', text, re.UNICODE)" + ], + "Output Answer": [ + "re.findall('\\\\w+|[^\\\\w\\\\s]', text, re.UNICODE)" + ], + "split": "train" + }, + { + "Input": "zip two lists `[1, 2]` and `[3, 4]` into a list of two tuples containing elements at the same index in each list", + "Output Program": [ + "zip([1, 2], [3, 4])" + ], + "Output Answer": [ + "zip([1, 2], [3, 4])" + ], + "split": "train" + }, + { + "Input": "Find all the items from a dictionary `D` if the key contains the string `Light`", + "Output Program": [ + "[(k, v) for k, v in D.iteritems() if 'Light' in k]" + ], + "Output Answer": [ + "[(k, v) for k, v in D.iteritems() if 'Light' in k]" + ], + "split": "train" + }, + { + "Input": "rotate x-axis text labels of plot `ax` 45 degrees", + "Output Program": [ + "ax.set_xticklabels(ax.xaxis.get_majorticklabels(), rotation=45)" + ], + "Output Answer": [ + "ax.set_xticklabels(ax.xaxis.get_majorticklabels(), rotation=45)" + ], + "split": "train" + }, + { + "Input": "create a regular expression object with a pattern that will match nothing", + "Output Program": [ + "re.compile('a^')" + ], + "Output Answer": [ + "re.compile('a^')" + ], + "split": "train" + }, + { + "Input": "write dataframe `df` to csv file `filename` with dates formatted as yearmonthday `%Y%m%d`", + "Output Program": [ + "df.to_csv(filename, date_format='%Y%m%d')" + ], + "Output Answer": [ + "df.to_csv(filename, date_format='%Y%m%d')" + ], + "split": "train" + }, + { + "Input": "compile Visual Studio project `project.sln` from the command line through python", + "Output Program": [ + "os.system('msbuild project.sln /p:Configuration=Debug')" + ], + "Output Answer": [ + "os.system('msbuild project.sln /p:Configuration=Debug')" + ], + "split": "train" + }, + { + "Input": "make a barplot of data in column `group` of dataframe `df` colour-coded according to list `color`", + "Output Program": [ + "df['group'].plot(kind='bar', color=['r', 'g', 'b', 'r', 'g', 'b', 'r'])" + ], + "Output Answer": [ + "df['group'].plot(kind='bar', color=['r', 'g', 'b', 'r', 'g', 'b', 'r'])" + ], + "split": "test" + }, + { + "Input": "Get rank of rows from highest to lowest of dataframe `df`, grouped by value in column `group`, according to value in column `value`", + "Output Program": [ + "df.groupby('group')['value'].rank(ascending=False)" + ], + "Output Answer": [ + "df.groupby('group')['value'].rank(ascending=False)" + ], + "split": "train" + }, + { + "Input": "append 3 lists in one list", + "Output Program": [ + "[[] for i in range(3)]" + ], + "Output Answer": [ + "[[] for i in range(3)]" + ], + "split": "train" + }, + { + "Input": "Get all the sentences from a string `text` using regex", + "Output Program": [ + "re.split('\\\\.\\\\s', text)" + ], + "Output Answer": [ + "re.split('\\\\.\\\\s', text)" + ], + "split": "train" + }, + { + "Input": "Write a regex statement to match 'lol' to 'lolllll'.", + "Output Program": [ + "re.sub('l+', 'l', 'lollll')" + ], + "Output Answer": [ + "re.sub('l+', 'l', 'lollll')" + ], + "split": "train" + }, + { + "Input": "find the index of the maximum value in the array `arr` where the boolean condition in array `cond` is true", + "Output Program": [ + "np.ma.array(np.tile(arr, 2).reshape(2, 3), mask=~cond).argmax(axis=1)" + ], + "Output Answer": [ + "np.ma.array(np.tile(arr, 2).reshape(2, 3), mask=~cond).argmax(axis=1)" + ], + "split": "train" + }, + { + "Input": "Selenium `driver` click a hyperlink with the pattern \"a[href^='javascript']\"", + "Output Program": [ + "driver.find_element_by_css_selector(\"a[href^='javascript']\").click()" + ], + "Output Answer": [ + "driver.find_element_by_css_selector(\"a[href^='javascript']\").click()" + ], + "split": "train" + }, + { + "Input": "get proportion of rows in dataframe `trace_df` whose values for column `ratio` are greater than 0", + "Output Program": [ + "(trace_df['ratio'] > 0).mean()" + ], + "Output Answer": [ + "(trace_df['ratio'] > 0).mean()" + ], + "split": "train" + }, + { + "Input": "python how to get every first element in 2 dimensional list `a`", + "Output Program": [ + "[i[0] for i in a]" + ], + "Output Answer": [ + "[i[0] for i in a]" + ], + "split": "train" + }, + { + "Input": "Create a default empty json object if no json is available in request parameter `mydata`", + "Output Program": [ + "json.loads(request.POST.get('mydata', '{}'))" + ], + "Output Answer": [ + "json.loads(request.POST.get('mydata', '{}'))" + ], + "split": "train" + }, + { + "Input": "delete first row of array `x`", + "Output Program": [ + "x = numpy.delete(x, 0, axis=0)" + ], + "Output Answer": [ + "x = numpy.delete(x, 0, axis=0)" + ], + "split": "train" + }, + { + "Input": "generate a 12-digit random number", + "Output Program": [ + "random.randint(100000000000, 999999999999)", + "'%0.12d' % random.randint(0, 999999999999)" + ], + "Output Answer": [ + "random.randint(100000000000, 999999999999)", + "'%0.12d' % random.randint(0, 999999999999)" + ], + "split": "train" + }, + { + "Input": "Check if all the items in a list `['a', 'b']` exists in another list `l`", + "Output Program": [ + "set(['a', 'b']).issubset(set(l))" + ], + "Output Answer": [ + "set(['a', 'b']).issubset(set(l))" + ], + "split": "train" + }, + { + "Input": "django filter by hour", + "Output Program": [ + "Entry.objects.filter(pub_date__contains='08:00')" + ], + "Output Answer": [ + "Entry.objects.filter(pub_date__contains='08:00')" + ], + "split": "test" + }, + { + "Input": "Convert hex string \"a\" to integer", + "Output Program": [ + "int('a', 16)" + ], + "Output Answer": [ + "int('a', 16)" + ], + "split": "train" + }, + { + "Input": "get modified time of file `file`", + "Output Program": [ + "print ('last modified: %s' % time.ctime(os.path.getmtime(file)))", + "time.ctime(os.path.getmtime(file))" + ], + "Output Answer": [ + "print ('last modified: %s' % time.ctime(os.path.getmtime(file)))", + "time.ctime(os.path.getmtime(file))" + ], + "split": "train" + }, + { + "Input": "sort a multidimensional list `a` by second and third column", + "Output Program": [ + "a.sort(key=operator.itemgetter(2, 3))" + ], + "Output Answer": [ + "a.sort(key=operator.itemgetter(2, 3))" + ], + "split": "train" + }, + { + "Input": "change figure size to 3 by 4 in matplotlib", + "Output Program": [ + "plt.figure(figsize=(3, 4))" + ], + "Output Answer": [ + "plt.figure(figsize=(3, 4))" + ], + "split": "train" + }, + { + "Input": "check if \"blah\" is in string `somestring`", + "Output Program": [ + "if ('blah' not in somestring):\n pass" + ], + "Output Answer": [ + "if ('blah' not in somestring):\n pass" + ], + "split": "train" + }, + { + "Input": "convert a hex string `x` to string", + "Output Program": [ + "y = str(int(x, 16))" + ], + "Output Answer": [ + "y = str(int(x, 16))" + ], + "split": "train" + }, + { + "Input": "print a string after a specific substring ', ' in string `my_string `", + "Output Program": [ + "print my_string.split(', ', 1)[1]" + ], + "Output Answer": [ + "print my_string.split(', ', 1)[1]" + ], + "split": "train" + }, + { + "Input": "Add 1 to each integer value in list `my_list`", + "Output Program": [ + "new_list = [(x + 1) for x in my_list]" + ], + "Output Answer": [ + "new_list = [(x + 1) for x in my_list]" + ], + "split": "train" + }, + { + "Input": "Filter a dictionary `d` to remove keys with value 'None' and replace other values with 'updated'", + "Output Program": [ + "dict((k, 'updated') for k, v in d.iteritems() if v != 'None')" + ], + "Output Answer": [ + "dict((k, 'updated') for k, v in d.iteritems() if v != 'None')" + ], + "split": "train" + }, + { + "Input": "check if `x` is an integer", + "Output Program": [ + "isinstance(x, int)", + "(type(x) == int)" + ], + "Output Answer": [ + "isinstance(x, int)", + "(type(x) == int)" + ], + "split": "train" + }, + { + "Input": "webbrowser open url 'http://example.com'", + "Output Program": [ + "webbrowser.open('http://example.com')" + ], + "Output Answer": [ + "webbrowser.open('http://example.com')" + ], + "split": "train" + }, + { + "Input": "Multiply a matrix `P` with a 3d tensor `T` in scipy", + "Output Program": [ + "scipy.tensordot(P, T, axes=[1, 1]).swapaxes(0, 1)" + ], + "Output Answer": [ + "scipy.tensordot(P, T, axes=[1, 1]).swapaxes(0, 1)" + ], + "split": "test" + }, + { + "Input": "Sort dictionary `x` by value in ascending order", + "Output Program": [ + "sorted(x.items(), key=operator.itemgetter(1))" + ], + "Output Answer": [ + "sorted(x.items(), key=operator.itemgetter(1))" + ], + "split": "train" + }, + { + "Input": "un-escape a backslash-escaped string in `Hello,\\\\nworld!`", + "Output Program": [ + "print '\"Hello,\\\\nworld!\"'.decode('string_escape')" + ], + "Output Answer": [ + "print '\"Hello,\\\\nworld!\"'.decode('string_escape')" + ], + "split": "train" + }, + { + "Input": "remove the element in list `a` with index 1", + "Output Program": [ + "a.pop(1)" + ], + "Output Answer": [ + "a.pop(1)" + ], + "split": "train" + }, + { + "Input": "convert a string `my_string` with dot and comma into a float number `my_float`", + "Output Program": [ + "my_float = float(my_string.replace(',', ''))" + ], + "Output Answer": [ + "my_float = float(my_string.replace(',', ''))" + ], + "split": "test" + }, + { + "Input": "get a dict of variable names `['some', 'list', 'of', 'vars']` as a string and their values", + "Output Program": [ + "dict((name, eval(name)) for name in ['some', 'list', 'of', 'vars'])" + ], + "Output Answer": [ + "dict((name, eval(name)) for name in ['some', 'list', 'of', 'vars'])" + ], + "split": "train" + }, + { + "Input": "replace extension '.txt' in basename '/home/user/somefile.txt' with extension '.jpg'", + "Output Program": [ + "print os.path.splitext('/home/user/somefile.txt')[0] + '.jpg'" + ], + "Output Answer": [ + "print os.path.splitext('/home/user/somefile.txt')[0] + '.jpg'" + ], + "split": "train" + }, + { + "Input": "prompt string 'Press Enter to continue...' to the console", + "Output Program": [ + "raw_input('Press Enter to continue...')" + ], + "Output Answer": [ + "raw_input('Press Enter to continue...')" + ], + "split": "train" + }, + { + "Input": "Get all indexes of a list `a` where each value is greater than `2`", + "Output Program": [ + "[i for i in range(len(a)) if a[i] > 2]" + ], + "Output Answer": [ + "[i for i in range(len(a)) if a[i] > 2]" + ], + "split": "train" + }, + { + "Input": "Get the current directory of a script", + "Output Program": [ + "os.path.basename(os.path.dirname(os.path.realpath(__file__)))" + ], + "Output Answer": [ + "os.path.basename(os.path.dirname(os.path.realpath(__file__)))" + ], + "split": "test" + }, + { + "Input": "counting the number of true booleans in a python list `[True, True, False, False, False, True]`", + "Output Program": [ + "sum([True, True, False, False, False, True])" + ], + "Output Answer": [ + "sum([True, True, False, False, False, True])" + ], + "split": "train" + }, + { + "Input": "sort a list of lists `L` by index 2 of the inner list", + "Output Program": [ + "sorted(L, key=itemgetter(2))" + ], + "Output Answer": [ + "sorted(L, key=itemgetter(2))" + ], + "split": "train" + }, + { + "Input": "find duplicate names in column 'name' of the dataframe `x`", + "Output Program": [ + "x.set_index('name').index.get_duplicates()" + ], + "Output Answer": [ + "x.set_index('name').index.get_duplicates()" + ], + "split": "test" + }, + { + "Input": "get a sorted list of the characters of string `s` in lexicographic order, with lowercase letters first", + "Output Program": [ + "sorted(s, key=str.lower)" + ], + "Output Answer": [ + "sorted(s, key=str.lower)" + ], + "split": "train" + }, + { + "Input": "delete all characters \"i\" in string \"it is icy\"", + "Output Program": [ + "\"\"\"it is icy\"\"\".replace('i', '')" + ], + "Output Answer": [ + "\"\"\"it is icy\"\"\".replace('i', '')" + ], + "split": "test" + }, + { + "Input": "Open a file `yourfile.txt` in write mode", + "Output Program": [ + "f = open('yourfile.txt', 'w')" + ], + "Output Answer": [ + "f = open('yourfile.txt', 'w')" + ], + "split": "test" + }, + { + "Input": "check if a local variable `myVar` exists", + "Output Program": [ + "('myVar' in locals())" + ], + "Output Answer": [ + "('myVar' in locals())" + ], + "split": "train" + }, + { + "Input": "copy file '/dir/file.ext' to '/new/dir'", + "Output Program": [ + "shutil.copy2('/dir/file.ext', '/new/dir')" + ], + "Output Answer": [ + "shutil.copy2('/dir/file.ext', '/new/dir')" + ], + "split": "train" + }, + { + "Input": "Confirm urls in Django properly", + "Output Program": [ + "url('^$', include('sms.urls'))," + ], + "Output Answer": [ + "url('^$', include('sms.urls'))," + ], + "split": "train" + }, + { + "Input": "convert a python dictionary 'a' to a list of tuples", + "Output Program": [ + "[(k, v) for k, v in a.iteritems()]" + ], + "Output Answer": [ + "[(k, v) for k, v in a.iteritems()]" + ], + "split": "train" + }, + { + "Input": "Delete character \"M\" from a string `s` using python", + "Output Program": [ + "s = s.replace('M', '')" + ], + "Output Answer": [ + "s = s.replace('M', '')" + ], + "split": "train" + }, + { + "Input": "swap values in a tuple/list inside a list `mylist`", + "Output Program": [ + "map(lambda t: (t[1], t[0]), mylist)" + ], + "Output Answer": [ + "map(lambda t: (t[1], t[0]), mylist)" + ], + "split": "train" + }, + { + "Input": "add header 'WWWAuthenticate' in a flask app with value 'Basic realm=\"test\"'", + "Output Program": [ + "response.headers['WWW-Authenticate'] = 'Basic realm=\"test\"'" + ], + "Output Answer": [ + "response.headers['WWW-Authenticate'] = 'Basic realm=\"test\"'" + ], + "split": "train" + }, + { + "Input": "change working directory to the directory `owd`", + "Output Program": [ + "os.chdir(owd)" + ], + "Output Answer": [ + "os.chdir(owd)" + ], + "split": "test" + }, + { + "Input": "Trimming a string \"Bob has a cat\"", + "Output Program": [ + "'Bob has a cat'.strip()" + ], + "Output Answer": [ + "'Bob has a cat'.strip()" + ], + "split": "train" + }, + { + "Input": "sort list of lists `L` by the second item in each list", + "Output Program": [ + "L.sort(key=operator.itemgetter(1))" + ], + "Output Answer": [ + "L.sort(key=operator.itemgetter(1))" + ], + "split": "train" + }, + { + "Input": "extract elements at indices (1, 2, 5) from a list `a`", + "Output Program": [ + "[a[i] for i in (1, 2, 5)]" + ], + "Output Answer": [ + "[a[i] for i in (1, 2, 5)]" + ], + "split": "train" + }, + { + "Input": "check if string `string` starts with a number", + "Output Program": [ + "string[0].isdigit()" + ], + "Output Answer": [ + "string[0].isdigit()" + ], + "split": "train" + }, + { + "Input": "get the max string length in list `i`", + "Output Program": [ + "max(len(word) for word in i)" + ], + "Output Answer": [ + "max(len(word) for word in i)" + ], + "split": "train" + }, + { + "Input": "check if type of a variable `s` is string", + "Output Program": [ + "isinstance(s, str)" + ], + "Output Answer": [ + "isinstance(s, str)" + ], + "split": "train" + }, + { + "Input": "remove a substring \".com\" from the end of string `url`", + "Output Program": [ + "if url.endswith('.com'):\n url = url[:(-4)]", + "url = re.sub('\\\\.com$', '', url)", + "print url.replace('.com', '')" + ], + "Output Answer": [ + "if url.endswith('.com'):\n url = url[:(-4)]", + "url = re.sub('\\\\.com$', '', url)", + "print url.replace('.com', '')" + ], + "split": "train" + }, + { + "Input": "convert binary string '010101' to integer", + "Output Program": [ + "int('010101', 2)" + ], + "Output Answer": [ + "int('010101', 2)" + ], + "split": "train" + }, + { + "Input": "create a slice object using string `string_slice`", + "Output Program": [ + "slice(*[(int(i.strip()) if i else None) for i in string_slice.split(':')])" + ], + "Output Answer": [ + "slice(*[(int(i.strip()) if i else None) for i in string_slice.split(':')])" + ], + "split": "train" + }, + { + "Input": "Resample dataframe `frame` to resolution of 1 hour `1H` for timeseries index, summing values in the column `radiation` averaging those in column `tamb`", + "Output Program": [ + "frame.resample('1H').agg({'radiation': np.sum, 'tamb': np.mean})" + ], + "Output Answer": [ + "frame.resample('1H').agg({'radiation': np.sum, 'tamb': np.mean})" + ], + "split": "train" + }, + { + "Input": "extract all the values with keys 'x' and 'y' from a list of dictionaries `d` to list of tuples", + "Output Program": [ + "[(x['x'], x['y']) for x in d]" + ], + "Output Answer": [ + "[(x['x'], x['y']) for x in d]" + ], + "split": "test" + }, + { + "Input": "reverse sort list of dicts `l` by value for key `time`", + "Output Program": [ + "l = sorted(l, key=itemgetter('time'), reverse=True)" + ], + "Output Answer": [ + "l = sorted(l, key=itemgetter('time'), reverse=True)" + ], + "split": "test" + }, + { + "Input": "format print output of list of floats `l` to print only up to 3 decimal points", + "Output Program": [ + "print '[' + ', '.join('%5.3f' % v for v in l) + ']'" + ], + "Output Answer": [ + "print '[' + ', '.join('%5.3f' % v for v in l) + ']'" + ], + "split": "train" + }, + { + "Input": "convert list `[('Name', 'Joe'), ('Age', 22)]` into a dictionary", + "Output Program": [ + "dict([('Name', 'Joe'), ('Age', 22)])" + ], + "Output Answer": [ + "dict([('Name', 'Joe'), ('Age', 22)])" + ], + "split": "test" + }, + { + "Input": "Convert each list in list `main_list` into a tuple", + "Output Program": [ + "map(list, zip(*main_list))" + ], + "Output Answer": [ + "map(list, zip(*main_list))" + ], + "split": "train" + }, + { + "Input": "remove multiple values from a list `my_list` at the same time with index starting at `2` and ending just before `6`.", + "Output Program": [ + "del my_list[2:6]" + ], + "Output Answer": [ + "del my_list[2:6]" + ], + "split": "train" + }, + { + "Input": "Find the full path of current directory", + "Output Program": [ + "full_path = os.path.realpath(__file__)" + ], + "Output Answer": [ + "full_path = os.path.realpath(__file__)" + ], + "split": "train" + }, + { + "Input": "unpack keys and values of a dictionary `d` into two lists", + "Output Program": [ + "keys, values = zip(*d.items())" + ], + "Output Answer": [ + "keys, values = zip(*d.items())" + ], + "split": "train" + }, + { + "Input": "convert all of the items in a list `lst` to float", + "Output Program": [ + "[float(i) for i in lst]" + ], + "Output Answer": [ + "[float(i) for i in lst]" + ], + "split": "train" + }, + { + "Input": "django redirect to view 'Home.views.index'", + "Output Program": [ + "redirect('Home.views.index')" + ], + "Output Answer": [ + "redirect('Home.views.index')" + ], + "split": "train" + }, + { + "Input": "format datetime in `dt` as string in format `'%m/%d/%Y`", + "Output Program": [ + "dt.strftime('%m/%d/%Y')" + ], + "Output Answer": [ + "dt.strftime('%m/%d/%Y')" + ], + "split": "train" + }, + { + "Input": "get the tuple in list `a_list` that has the largest item in the second index", + "Output Program": [ + "max_item = max(a_list, key=operator.itemgetter(1))" + ], + "Output Answer": [ + "max_item = max(a_list, key=operator.itemgetter(1))" + ], + "split": "train" + }, + { + "Input": "find and replace 2nd occurrence of word 'cat' by 'Bull' in a sentence 's'", + "Output Program": [ + "re.sub('^((.*?cat.*?){1})cat', '\\\\1Bull', s)", + "re.sub('^((?:(?!cat).)*cat(?:(?!cat).)*)cat', '\\\\1Bull', s)" + ], + "Output Answer": [ + "re.sub('^((.*?cat.*?){1})cat', '\\\\1Bull', s)", + "re.sub('^((?:(?!cat).)*cat(?:(?!cat).)*)cat', '\\\\1Bull', s)" + ], + "split": "train" + }, + { + "Input": "Create a dictionary `d` from list of key value pairs `iterable`", + "Output Program": [ + "d = {k: v for (k, v) in iterable}" + ], + "Output Answer": [ + "d = {k: v for (k, v) in iterable}" + ], + "split": "train" + }, + { + "Input": "input a tuple of integers from user", + "Output Program": [ + "tuple(int(x.strip()) for x in raw_input().split(','))" + ], + "Output Answer": [ + "tuple(int(x.strip()) for x in raw_input().split(','))" + ], + "split": "train" + }, + { + "Input": "Getting the last element of list `some_list`", + "Output Program": [ + "some_list[(-1)]" + ], + "Output Answer": [ + "some_list[(-1)]" + ], + "split": "train" + }, + { + "Input": "remove items from dictionary `myDict` if the item's value `val` is equal to 42", + "Output Program": [ + "myDict = {key: val for key, val in myDict.items() if val != 42}" + ], + "Output Answer": [ + "myDict = {key: val for key, val in myDict.items() if val != 42}" + ], + "split": "train" + }, + { + "Input": "encode string \"\\\\xc3\\\\x85\u3042\" to bytes", + "Output Program": [ + "\"\"\"\\\\xc3\\\\x85\u3042\"\"\".encode('utf-8')" + ], + "Output Answer": [ + "\"\"\"\\\\xc3\\\\x85\u3042\"\"\".encode('utf-8')" + ], + "split": "train" + }, + { + "Input": "remove the punctuation '!', '.', ':' from a string `asking`", + "Output Program": [ + "out = ''.join(c for c in asking if c not in ('!', '.', ':'))" + ], + "Output Answer": [ + "out = ''.join(c for c in asking if c not in ('!', '.', ':'))" + ], + "split": "train" + }, + { + "Input": "Delete self-contained digits from string `s`", + "Output Program": [ + "s = re.sub('^\\\\d+\\\\s|\\\\s\\\\d+\\\\s|\\\\s\\\\d+$', ' ', s)" + ], + "Output Answer": [ + "s = re.sub('^\\\\d+\\\\s|\\\\s\\\\d+\\\\s|\\\\s\\\\d+$', ' ', s)" + ], + "split": "train" + }, + { + "Input": "cut a string using delimiter '&'", + "Output Program": [ + "s[:s.rfind('&')]" + ], + "Output Answer": [ + "s[:s.rfind('&')]" + ], + "split": "train" + }, + { + "Input": "Taking the results of a bash command \"awk '{print $10, $11}' test.txt > test2.txt\"", + "Output Program": [ + "os.system(\"awk '{print $10, $11}' test.txt > test2.txt\")" + ], + "Output Answer": [ + "os.system(\"awk '{print $10, $11}' test.txt > test2.txt\")" + ], + "split": "train" + }, + { + "Input": "get the maximum string length in nested list `i`", + "Output Program": [ + "len(max(i, key=len))" + ], + "Output Answer": [ + "len(max(i, key=len))" + ], + "split": "train" + }, + { + "Input": "create list `done` containing permutations of each element in list `[a, b, c, d]` with variable `x` as tuples", + "Output Program": [ + "done = [(el, x) for el in [a, b, c, d]]" + ], + "Output Answer": [ + "done = [(el, x) for el in [a, b, c, d]]" + ], + "split": "train" + }, + { + "Input": "combine lists `l1` and `l2` by alternating their elements", + "Output Program": [ + "[val for pair in zip(l1, l2) for val in pair]" + ], + "Output Answer": [ + "[val for pair in zip(l1, l2) for val in pair]" + ], + "split": "test" + }, + { + "Input": "Split a string `l` by multiple words `for` or `or` or `and`", + "Output Program": [ + "[re.split('_(?:f?or|and)_', s) for s in l]" + ], + "Output Answer": [ + "[re.split('_(?:f?or|and)_', s) for s in l]" + ], + "split": "train" + }, + { + "Input": "insert a new field 'geolocCountry' on an existing document 'b' using pymongo", + "Output Program": [ + "db.Doc.update({'_id': b['_id']}, {'$set': {'geolocCountry': myGeolocCountry}})" + ], + "Output Answer": [ + "db.Doc.update({'_id': b['_id']}, {'$set': {'geolocCountry': myGeolocCountry}})" + ], + "split": "train" + }, + { + "Input": "Convert hex string \"0xa\" to integer", + "Output Program": [ + "int('0xa', 16)" + ], + "Output Answer": [ + "int('0xa', 16)" + ], + "split": "train" + }, + { + "Input": "Convert list of dictionaries `L` into a flat dictionary", + "Output Program": [ + "dict(pair for d in L for pair in d.items())" + ], + "Output Answer": [ + "dict(pair for d in L for pair in d.items())" + ], + "split": "train" + }, + { + "Input": "python sum of ascii values of all characters in a string `string`", + "Output Program": [ + "sum(map(ord, string))" + ], + "Output Answer": [ + "sum(map(ord, string))" + ], + "split": "train" + }, + { + "Input": "round off the float that is the product of `2.52 * 100` and convert it to an int", + "Output Program": [ + "int(round(2.51 * 100))" + ], + "Output Answer": [ + "int(round(2.51 * 100))" + ], + "split": "test" + }, + { + "Input": "getting every possible combination of two elements in a list", + "Output Program": [ + "list(itertools.combinations([1, 2, 3, 4, 5, 6], 2))" + ], + "Output Answer": [ + "list(itertools.combinations([1, 2, 3, 4, 5, 6], 2))" + ], + "split": "train" + }, + { + "Input": "get the canonical path of file `path`", + "Output Program": [ + "os.path.realpath(path)" + ], + "Output Answer": [ + "os.path.realpath(path)" + ], + "split": "train" + }, + { + "Input": "make a row-by-row copy `y` of array `x`", + "Output Program": [ + "y = [row[:] for row in x]" + ], + "Output Answer": [ + "y = [row[:] for row in x]" + ], + "split": "train" + }, + { + "Input": "send cookies `cookie` in a post request to url 'http://wikipedia.org' with the python requests library", + "Output Program": [ + "r = requests.post('http://wikipedia.org', cookies=cookie)" + ], + "Output Answer": [ + "r = requests.post('http://wikipedia.org', cookies=cookie)" + ], + "split": "train" + }, + { + "Input": "duplicate data in pandas dataframe `x` for 5 times", + "Output Program": [ + "pd.concat([x] * 5, ignore_index=True)" + ], + "Output Answer": [ + "pd.concat([x] * 5, ignore_index=True)" + ], + "split": "train" + }, + { + "Input": "Get a new list `list2`by removing empty list from a list of lists `list1`", + "Output Program": [ + "list2 = [x for x in list1 if x != []]" + ], + "Output Answer": [ + "list2 = [x for x in list1 if x != []]" + ], + "split": "test" + }, + { + "Input": "get the ASCII value of a character as an int", + "Output Program": [ + "ord()" + ], + "Output Answer": [ + "ord()" + ], + "split": "train" + }, + { + "Input": "Normalize line ends in a string 'mixed'", + "Output Program": [ + "mixed.replace('\\r\\n', '\\n').replace('\\r', '\\n')" + ], + "Output Answer": [ + "mixed.replace('\\r\\n', '\\n').replace('\\r', '\\n')" + ], + "split": "train" + }, + { + "Input": "convert nan values to \u2018n/a\u2019 while reading rows from a csv `read_csv` with pandas", + "Output Program": [ + "df = pd.read_csv('my.csv', na_values=['n/a'])" + ], + "Output Answer": [ + "df = pd.read_csv('my.csv', na_values=['n/a'])" + ], + "split": "train" + }, + { + "Input": "encode value of key `City` in dictionary `data` as `ascii`, ignoring non-ascii characters", + "Output Program": [ + "data['City'].encode('ascii', 'ignore')" + ], + "Output Answer": [ + "data['City'].encode('ascii', 'ignore')" + ], + "split": "train" + }, + { + "Input": "truncate float 1.923328437452 to 3 decimal places", + "Output Program": [ + "round(1.923328437452, 3)" + ], + "Output Answer": [ + "round(1.923328437452, 3)" + ], + "split": "test" + }, + { + "Input": "create a random list of integers", + "Output Program": [ + "[int(1000 * random.random()) for i in xrange(10000)]" + ], + "Output Answer": [ + "[int(1000 * random.random()) for i in xrange(10000)]" + ], + "split": "test" + }, + { + "Input": "write pandas dataframe `df` to the file 'c:\\\\data\\\\t.csv' without row names", + "Output Program": [ + "df.to_csv('c:\\\\data\\\\t.csv', index=False)" + ], + "Output Answer": [ + "df.to_csv('c:\\\\data\\\\t.csv', index=False)" + ], + "split": "train" + }, + { + "Input": "Reverse a string `s`", + "Output Program": [ + "''.join(reversed(s))" + ], + "Output Answer": [ + "''.join(reversed(s))" + ], + "split": "train" + }, + { + "Input": "apply logical operator 'AND' to all elements in list `a_list`", + "Output Program": [ + "all(a_list)" + ], + "Output Answer": [ + "all(a_list)" + ], + "split": "train" + }, + { + "Input": "hide output of subprocess `['espeak', text]`", + "Output Program": [ + "subprocess.check_output(['espeak', text], stderr=subprocess.STDOUT)" + ], + "Output Answer": [ + "subprocess.check_output(['espeak', text], stderr=subprocess.STDOUT)" + ], + "split": "train" + }, + { + "Input": "Print new line character as `\\n` in a string `foo\\nbar`", + "Output Program": [ + "print 'foo\\nbar'.encode('string_escape')" + ], + "Output Answer": [ + "print 'foo\\nbar'.encode('string_escape')" + ], + "split": "test" + }, + { + "Input": "case insensitive comparison between strings `first` and `second`", + "Output Program": [ + "(first.upper() == second.upper())" + ], + "Output Answer": [ + "(first.upper() == second.upper())" + ], + "split": "train" + }, + { + "Input": "get UTC datetime in ISO format", + "Output Program": [ + "datetime.datetime.utcnow().isoformat()" + ], + "Output Answer": [ + "datetime.datetime.utcnow().isoformat()" + ], + "split": "train" + }, + { + "Input": "to convert a list of tuples `list_of_tuples` into list of lists", + "Output Program": [ + "[list(t) for t in zip(*list_of_tuples)]" + ], + "Output Answer": [ + "[list(t) for t in zip(*list_of_tuples)]" + ], + "split": "train" + }, + { + "Input": "split string `my_string` on white spaces", + "Output Program": [ + "\"\"\" \"\"\".join(my_string.split())" + ], + "Output Answer": [ + "\"\"\" \"\"\".join(my_string.split())" + ], + "split": "test" + }, + { + "Input": "Create an array containing the conversion of string '100110' into separate elements", + "Output Program": [ + "np.array(map(int, '100110'))" + ], + "Output Answer": [ + "np.array(map(int, '100110'))" + ], + "split": "train" + }, + { + "Input": "Sort a list of dictionary `l` based on key `time` in descending order", + "Output Program": [ + "l = sorted(l, key=lambda a: a['time'], reverse=True)" + ], + "Output Answer": [ + "l = sorted(l, key=lambda a: a['time'], reverse=True)" + ], + "split": "test" + }, + { + "Input": "Check the status code of url `url`", + "Output Program": [ + "r = requests.head(url)\nreturn (r.status_code == 200)" + ], + "Output Answer": [ + "r = requests.head(url)\nreturn (r.status_code == 200)" + ], + "split": "train" + }, + { + "Input": "assign an array of floats in range from 0 to 100 to a variable `values`", + "Output Program": [ + "values = np.array([i for i in xrange(100)], dtype=np.float64)" + ], + "Output Answer": [ + "values = np.array([i for i in xrange(100)], dtype=np.float64)" + ], + "split": "train" + }, + { + "Input": "sort list `results` by keys value 'year'", + "Output Program": [ + "sorted(results, key=itemgetter('year'))" + ], + "Output Answer": [ + "sorted(results, key=itemgetter('year'))" + ], + "split": "train" + }, + { + "Input": "Sort a list of dictionaries `mylist` by keys \"weight\" and \"factor\"", + "Output Program": [ + "mylist.sort(key=operator.itemgetter('weight', 'factor'))" + ], + "Output Answer": [ + "mylist.sort(key=operator.itemgetter('weight', 'factor'))" + ], + "split": "train" + }, + { + "Input": "factorize all string values in dataframe `s` into floats", + "Output Program": [ + "(s.factorize()[0] + 1).astype('float')" + ], + "Output Answer": [ + "(s.factorize()[0] + 1).astype('float')" + ], + "split": "train" + }, + { + "Input": "Parse string `datestr` into a datetime object using format pattern '%Y-%m-%d'", + "Output Program": [ + "dateobj = datetime.datetime.strptime(datestr, '%Y-%m-%d').date()" + ], + "Output Answer": [ + "dateobj = datetime.datetime.strptime(datestr, '%Y-%m-%d').date()" + ], + "split": "train" + }, + { + "Input": "print number `value` as thousands separators", + "Output Program": [ + "'{:,}'.format(value)" + ], + "Output Answer": [ + "'{:,}'.format(value)" + ], + "split": "train" + }, + { + "Input": "get the indexes of the largest `2` values from a list of integers `a`", + "Output Program": [ + "sorted(range(len(a)), key=lambda i: a[i], reverse=True)[:2]" + ], + "Output Answer": [ + "sorted(range(len(a)), key=lambda i: a[i], reverse=True)[:2]" + ], + "split": "train" + }, + { + "Input": "convert dictionary of pairs `d` to a list of tuples", + "Output Program": [ + "[(v, k) for k, v in d.iteritems()]" + ], + "Output Answer": [ + "[(v, k) for k, v in d.iteritems()]" + ], + "split": "train" + }, + { + "Input": "read a file `file` without newlines", + "Output Program": [ + "[line.rstrip('\\n') for line in file]" + ], + "Output Answer": [ + "[line.rstrip('\\n') for line in file]" + ], + "split": "test" + }, + { + "Input": "download a file \"http://www.example.com/songs/mp3.mp3\" over HTTP and save to \"mp3.mp3\"", + "Output Program": [ + "urllib.urlretrieve('http://www.example.com/songs/mp3.mp3', 'mp3.mp3')" + ], + "Output Answer": [ + "urllib.urlretrieve('http://www.example.com/songs/mp3.mp3', 'mp3.mp3')" + ], + "split": "test" + }, + { + "Input": "print a floating point number 2.345e-67 without any truncation", + "Output Program": [ + "print '{:.100f}'.format(2.345e-67)" + ], + "Output Answer": [ + "print '{:.100f}'.format(2.345e-67)" + ], + "split": "train" + }, + { + "Input": "Move the cursor of file pointer `fh1` at the end of the file.", + "Output Program": [ + "fh1.seek(2)" + ], + "Output Answer": [ + "fh1.seek(2)" + ], + "split": "train" + }, + { + "Input": "split 1d array `a` into 2d array at the last element", + "Output Program": [ + "np.split(a, [-1])" + ], + "Output Answer": [ + "np.split(a, [-1])" + ], + "split": "train" + }, + { + "Input": "check if a global variable 'myVar' exists", + "Output Program": [ + "if ('myVar' in globals()):\n pass" + ], + "Output Answer": [ + "if ('myVar' in globals()):\n pass" + ], + "split": "train" + }, + { + "Input": "remove the last element in list `a`", + "Output Program": [ + "a.pop()", + "del a[(-1)]" + ], + "Output Answer": [ + "a.pop()", + "del a[(-1)]" + ], + "split": "train" + }, + { + "Input": "Execute SQL statement `sql` with values of dictionary `myDict` as parameters", + "Output Program": [ + "cursor.execute(sql, myDict.values())" + ], + "Output Answer": [ + "cursor.execute(sql, myDict.values())" + ], + "split": "train" + }, + { + "Input": "convert binary string '11111111' to integer", + "Output Program": [ + "int('11111111', 2)" + ], + "Output Answer": [ + "int('11111111', 2)" + ], + "split": "train" + }, + { + "Input": "convert date strings in pandas dataframe column`df['date']` to pandas timestamps using the format '%d%b%Y'", + "Output Program": [ + "df['date'] = pd.to_datetime(df['date'], format='%d%b%Y')" + ], + "Output Answer": [ + "df['date'] = pd.to_datetime(df['date'], format='%d%b%Y')" + ], + "split": "train" + }, + { + "Input": "set the current working directory to path `path`", + "Output Program": [ + "os.chdir(path)" + ], + "Output Answer": [ + "os.chdir(path)" + ], + "split": "train" + }, + { + "Input": "split string `s` into float values and write sum to `total`", + "Output Program": [ + "total = sum(float(item) for item in s.split(','))" + ], + "Output Answer": [ + "total = sum(float(item) for item in s.split(','))" + ], + "split": "train" + }, + { + "Input": "Check the status code of url \"www.python.org\"", + "Output Program": [ + "conn = httplib.HTTPConnection('www.python.org')\nconn.request('HEAD', '/')\nr1 = conn.getresponse()\nprint r1.status, r1.reason" + ], + "Output Answer": [ + "conn = httplib.HTTPConnection('www.python.org')\nconn.request('HEAD', '/')\nr1 = conn.getresponse()\nprint r1.status, r1.reason" + ], + "split": "train" + }, + { + "Input": "convert a binary `b8` to a float number", + "Output Program": [ + "struct.unpack('d', b8)[0]" + ], + "Output Answer": [ + "struct.unpack('d', b8)[0]" + ], + "split": "train" + }, + { + "Input": "remove newline in string 'Unix EOL\\n' on the right side", + "Output Program": [ + "'Unix EOL\\n'.rstrip('\\r\\n')" + ], + "Output Answer": [ + "'Unix EOL\\n'.rstrip('\\r\\n')" + ], + "split": "train" + }, + { + "Input": "Convert a list `['A:1', 'B:2', 'C:3', 'D:4']` to dictionary", + "Output Program": [ + "dict(map(lambda s: s.split(':'), ['A:1', 'B:2', 'C:3', 'D:4']))" + ], + "Output Answer": [ + "dict(map(lambda s: s.split(':'), ['A:1', 'B:2', 'C:3', 'D:4']))" + ], + "split": "train" + }, + { + "Input": "round number 8.005 up to 2 decimal places", + "Output Program": [ + "round(8.005, 2)" + ], + "Output Answer": [ + "round(8.005, 2)" + ], + "split": "train" + }, + { + "Input": "Get all the values in key `gold` summed from a list of dictionary `myLIst`", + "Output Program": [ + "sum(item['gold'] for item in myLIst)" + ], + "Output Answer": [ + "sum(item['gold'] for item in myLIst)" + ], + "split": "train" + }, + { + "Input": "convert a set of tuples `queryresult` to a string `emaillist`", + "Output Program": [ + "emaillist = '\\n'.join(item[0] for item in queryresult)" + ], + "Output Answer": [ + "emaillist = '\\n'.join(item[0] for item in queryresult)" + ], + "split": "train" + }, + { + "Input": "convert Date object `dateobject` into a DateTime object", + "Output Program": [ + "datetime.datetime.combine(dateobject, datetime.time())" + ], + "Output Answer": [ + "datetime.datetime.combine(dateobject, datetime.time())" + ], + "split": "train" + }, + { + "Input": "lowercase a python dataframe string in column 'x' if it has missing values in dataframe `df`", + "Output Program": [ + "df['x'].str.lower()" + ], + "Output Answer": [ + "df['x'].str.lower()" + ], + "split": "train" + }, + { + "Input": "switch positions of each two adjacent characters in string `a`", + "Output Program": [ + "print ''.join(''.join(i) for i in zip(a2, a1)) + a[-1] if len(a) % 2 else ''" + ], + "Output Answer": [ + "print ''.join(''.join(i) for i in zip(a2, a1)) + a[-1] if len(a) % 2 else ''" + ], + "split": "train" + }, + { + "Input": "Extract brackets from string `s`", + "Output Program": [ + "brackets = re.sub('[^(){}[\\\\]]', '', s)" + ], + "Output Answer": [ + "brackets = re.sub('[^(){}[\\\\]]', '', s)" + ], + "split": "test" + }, + { + "Input": "Delete third row in a numpy array `x`", + "Output Program": [ + "x = numpy.delete(x, 2, axis=1)" + ], + "Output Answer": [ + "x = numpy.delete(x, 2, axis=1)" + ], + "split": "train" + }, + { + "Input": "apply functions `mean` and `std` to each column in dataframe `df`", + "Output Program": [ + "df.groupby(lambda idx: 0).agg(['mean', 'std'])" + ], + "Output Answer": [ + "df.groupby(lambda idx: 0).agg(['mean', 'std'])" + ], + "split": "train" + }, + { + "Input": "rotate the xtick labels of matplotlib plot `ax` by `45` degrees to make long labels readable", + "Output Program": [ + "ax.set_xticklabels(labels, rotation=45)" + ], + "Output Answer": [ + "ax.set_xticklabels(labels, rotation=45)" + ], + "split": "test" + }, + { + "Input": "grab one random item from a database `model` in django/postgresql", + "Output Program": [ + "model.objects.all().order_by('?')[0]" + ], + "Output Answer": [ + "model.objects.all().order_by('?')[0]" + ], + "split": "train" + }, + { + "Input": "Insert item `12` to a list `my_list`", + "Output Program": [ + "my_list.append(12)" + ], + "Output Answer": [ + "my_list.append(12)" + ], + "split": "test" + }, + { + "Input": "get month name from a datetime object `today`", + "Output Program": [ + "today.strftime('%B')" + ], + "Output Answer": [ + "today.strftime('%B')" + ], + "split": "train" + }, + { + "Input": "get the creation time of file `path_to_file`", + "Output Program": [ + "return os.path.getctime(path_to_file)" + ], + "Output Answer": [ + "return os.path.getctime(path_to_file)" + ], + "split": "train" + }, + { + "Input": "get tuples of the corresponding elements from lists `lst` and `lst2`", + "Output Program": [ + "[(x, lst2[i]) for i, x in enumerate(lst)]" + ], + "Output Answer": [ + "[(x, lst2[i]) for i, x in enumerate(lst)]" + ], + "split": "train" + }, + { + "Input": "Get all matches with regex pattern `\\\\d+[xX]` in list of string `teststr`", + "Output Program": [ + "[i for i in teststr if re.search('\\\\d+[xX]', i)]" + ], + "Output Answer": [ + "[i for i in teststr if re.search('\\\\d+[xX]', i)]" + ], + "split": "test" + }, + { + "Input": "convert datetime object to date object in python", + "Output Program": [ + "datetime.datetime.now().date()" + ], + "Output Answer": [ + "datetime.datetime.now().date()" + ], + "split": "train" + }, + { + "Input": "Sum elements of tuple `b` to their respective elements of each tuple in list `a`", + "Output Program": [ + "c = [[(i + j) for i, j in zip(e, b)] for e in a]" + ], + "Output Answer": [ + "c = [[(i + j) for i, j in zip(e, b)] for e in a]" + ], + "split": "train" + }, + { + "Input": "create a list containing the digits values from binary string `x` as elements", + "Output Program": [ + "[int(d) for d in str(bin(x))[2:]]" + ], + "Output Answer": [ + "[int(d) for d in str(bin(x))[2:]]" + ], + "split": "train" + }, + { + "Input": "recursively delete all contents in directory `path`", + "Output Program": [ + "shutil.rmtree(path, ignore_errors=False, onerror=None)" + ], + "Output Answer": [ + "shutil.rmtree(path, ignore_errors=False, onerror=None)" + ], + "split": "train" + }, + { + "Input": "create a regular expression object with the pattern '\\xe2\\x80\\x93'", + "Output Program": [ + "re.compile('\\xe2\\x80\\x93')" + ], + "Output Answer": [ + "re.compile('\\xe2\\x80\\x93')" + ], + "split": "train" + }, + { + "Input": "match multiple regex patterns with the alternation operator `|` in a string `(zyx)bc`", + "Output Program": [ + "re.findall('\\\\(.*?\\\\)|\\\\w', '(zyx)bc')" + ], + "Output Answer": [ + "re.findall('\\\\(.*?\\\\)|\\\\w', '(zyx)bc')" + ], + "split": "test" + }, + { + "Input": "get keys and items of dictionary `d`", + "Output Program": [ + "d.items()" + ], + "Output Answer": [ + "d.items()" + ], + "split": "train" + }, + { + "Input": "replace value '-' in any column of pandas dataframe to \"NaN\"", + "Output Program": [ + "df.replace('-', 'NaN')" + ], + "Output Answer": [ + "df.replace('-', 'NaN')" + ], + "split": "train" + }, + { + "Input": "find the index of sub string 's' in string `str` starting from index 15", + "Output Program": [ + "str.find('s', 15)" + ], + "Output Answer": [ + "str.find('s', 15)" + ], + "split": "train" + }, + { + "Input": "convert scientific notation of variable `a` to decimal", + "Output Program": [ + "\"\"\"{:.50f}\"\"\".format(float(a[0] / a[1]))" + ], + "Output Answer": [ + "\"\"\"{:.50f}\"\"\".format(float(a[0] / a[1]))" + ], + "split": "train" + }, + { + "Input": "click on the text button 'section-select-all' using selenium python", + "Output Program": [ + "browser.find_element_by_class_name('section-select-all').click()" + ], + "Output Answer": [ + "browser.find_element_by_class_name('section-select-all').click()" + ], + "split": "train" + }, + { + "Input": "check if any element of list `substring_list` are in string `string`", + "Output Program": [ + "any(substring in string for substring in substring_list)" + ], + "Output Answer": [ + "any(substring in string for substring in substring_list)" + ], + "split": "train" + }, + { + "Input": "merge lists `a` and `a` into a list of tuples", + "Output Program": [ + "list(zip(a, b))" + ], + "Output Answer": [ + "list(zip(a, b))" + ], + "split": "train" + }, + { + "Input": "Validate IP address using Regex", + "Output Program": [ + "pat = re.compile('^\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}$')" + ], + "Output Answer": [ + "pat = re.compile('^\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}\\\\.\\\\d{1,3}$')" + ], + "split": "train" + }, + { + "Input": "adding url `url` to mysql row", + "Output Program": [ + "cursor.execute('INSERT INTO index(url) VALUES(%s)', (url,))" + ], + "Output Answer": [ + "cursor.execute('INSERT INTO index(url) VALUES(%s)', (url,))" + ], + "split": "train" + }, + { + "Input": "run shell command 'rm -r some.file' in the background", + "Output Program": [ + "subprocess.Popen(['rm', '-r', 'some.file'])" + ], + "Output Answer": [ + "subprocess.Popen(['rm', '-r', 'some.file'])" + ], + "split": "train" + }, + { + "Input": "decode JSON string `u` to a dictionary", + "Output Program": [ + "json.load(u)" + ], + "Output Answer": [ + "json.load(u)" + ], + "split": "train" + }, + { + "Input": "Join data of dataframe `df1` with data in dataframe `df2` based on similar values of column 'user_id' in both dataframes", + "Output Program": [ + "s1 = pd.merge(df1, df2, how='inner', on=['user_id'])" + ], + "Output Answer": [ + "s1 = pd.merge(df1, df2, how='inner', on=['user_id'])" + ], + "split": "train" + }, + { + "Input": "convert a raw string `raw_string` into a normal string", + "Output Program": [ + "raw_string.decode('string_escape')" + ], + "Output Answer": [ + "raw_string.decode('string_escape')" + ], + "split": "test" + }, + { + "Input": "find the index of sub string 'cc' in string 'sdfasdf'", + "Output Program": [ + "'sdfasdf'.index('cc')" + ], + "Output Answer": [ + "'sdfasdf'.index('cc')" + ], + "split": "train" + }, + { + "Input": "sort list `your_list` by the `anniversary_score` attribute of each object", + "Output Program": [ + "your_list.sort(key=lambda x: x.anniversary_score)" + ], + "Output Answer": [ + "your_list.sort(key=lambda x: x.anniversary_score)" + ], + "split": "train" + }, + { + "Input": "Filter queryset for all objects in Django model `MyModel` where texts length are greater than `254`", + "Output Program": [ + "MyModel.objects.filter(text__regex='^.{254}.*')" + ], + "Output Answer": [ + "MyModel.objects.filter(text__regex='^.{254}.*')" + ], + "split": "train" + }, + { + "Input": "list all files in directory `path`", + "Output Program": [ + "os.listdir(path)" + ], + "Output Answer": [ + "os.listdir(path)" + ], + "split": "train" + }, + { + "Input": "select all rows from pandas DataFrame 'df' where the value in column 'A' is greater than 1 or less than -1 in column 'B'.", + "Output Program": [ + "df[(df['A'] > 1) | (df['B'] < -1)]" + ], + "Output Answer": [ + "df[(df['A'] > 1) | (df['B'] < -1)]" + ], + "split": "train" + }, + { + "Input": "rename file `dir` to `dir` + '!'", + "Output Program": [ + "os.rename(dir, dir + '!')" + ], + "Output Answer": [ + "os.rename(dir, dir + '!')" + ], + "split": "train" + }, + { + "Input": "delete an empty directory", + "Output Program": [ + "os.rmdir()" + ], + "Output Answer": [ + "os.rmdir()" + ], + "split": "train" + }, + { + "Input": "download a file 'http://www.example.com/' over HTTP", + "Output Program": [ + "response = urllib2.urlopen('http://www.example.com/')\nhtml = response.read()" + ], + "Output Answer": [ + "response = urllib2.urlopen('http://www.example.com/')\nhtml = response.read()" + ], + "split": "test" + }, + { + "Input": "add a colorbar to plot `plt` using image `im` on axes `ax`", + "Output Program": [ + "plt.colorbar(im, ax=ax)" + ], + "Output Answer": [ + "plt.colorbar(im, ax=ax)" + ], + "split": "train" + }, + { + "Input": "Merge all columns in dataframe `df` into one column", + "Output Program": [ + "df.apply(' '.join, axis=0)" + ], + "Output Answer": [ + "df.apply(' '.join, axis=0)" + ], + "split": "train" + }, + { + "Input": "sort objects in `Articles` in descending order of counts of `likes`", + "Output Program": [ + "Article.objects.annotate(like_count=Count('likes')).order_by('-like_count')" + ], + "Output Answer": [ + "Article.objects.annotate(like_count=Count('likes')).order_by('-like_count')" + ], + "split": "train" + }, + { + "Input": "sort list of strings `xs` by the length of string", + "Output Program": [ + "xs.sort(key=lambda s: len(s))" + ], + "Output Answer": [ + "xs.sort(key=lambda s: len(s))" + ], + "split": "train" + }, + { + "Input": "dictionary `d` to string, custom format", + "Output Program": [ + "\"\"\"
\"\"\".join([('%s:: %s' % (key, value)) for key, value in d.items()])" + ], + "Output Answer": [ + "\"\"\"
\"\"\".join([('%s:: %s' % (key, value)) for key, value in d.items()])" + ], + "split": "train" + }, + { + "Input": "scroll a to the bottom of a web page using selenium webdriver", + "Output Program": [ + "driver.execute_script('window.scrollTo(0, document.body.scrollHeight);')" + ], + "Output Answer": [ + "driver.execute_script('window.scrollTo(0, document.body.scrollHeight);')" + ], + "split": "train" + }, + { + "Input": "sort list `['14:10:01', '03:12:08']`", + "Output Program": [ + "sorted(['14:10:01', '03:12:08'])" + ], + "Output Answer": [ + "sorted(['14:10:01', '03:12:08'])" + ], + "split": "train" + }, + { + "Input": "find the index of the element with the maximum value from a list 'a'.", + "Output Program": [ + "max(enumerate(a), key=lambda x: x[1])[0]" + ], + "Output Answer": [ + "max(enumerate(a), key=lambda x: x[1])[0]" + ], + "split": "train" + }, + { + "Input": "Format all floating variables `var1`, `var2`, `var3`, `var1` to print to two decimal places.", + "Output Program": [ + "print '%.2f kg = %.2f lb = %.2f gal = %.2f l' % (var1, var2, var3, var4)" + ], + "Output Answer": [ + "print '%.2f kg = %.2f lb = %.2f gal = %.2f l' % (var1, var2, var3, var4)" + ], + "split": "train" + }, + { + "Input": "get the type of `i`", + "Output Program": [ + "type(i)" + ], + "Output Answer": [ + "type(i)" + ], + "split": "test" + }, + { + "Input": "manually throw/raise a `ValueError` exception with the message 'A very specific bad thing happened'", + "Output Program": [ + "raise ValueError('A very specific bad thing happened')" + ], + "Output Answer": [ + "raise ValueError('A very specific bad thing happened')" + ], + "split": "train" + }, + { + "Input": "find all elements in a list of tuples `a` where the first element of each tuple equals 1", + "Output Program": [ + "[item for item in a if item[0] == 1]" + ], + "Output Answer": [ + "[item for item in a if item[0] == 1]" + ], + "split": "train" + }, + { + "Input": "search for regex pattern 'Test(.*)print' in string `testStr` including new line character '\\n'", + "Output Program": [ + "re.search('Test(.*)print', testStr, re.DOTALL)" + ], + "Output Answer": [ + "re.search('Test(.*)print', testStr, re.DOTALL)" + ], + "split": "train" + }, + { + "Input": "create a pandas data frame from list of nested dictionaries `my_list`", + "Output Program": [ + "pd.concat([pd.DataFrame(l) for l in my_list], axis=1).T" + ], + "Output Answer": [ + "pd.concat([pd.DataFrame(l) for l in my_list], axis=1).T" + ], + "split": "train" + }, + { + "Input": "reverse a list `L`", + "Output Program": [ + "L[::(-1)]", + "L.reverse()" + ], + "Output Answer": [ + "L[::(-1)]", + "L.reverse()" + ], + "split": "train" + }, + { + "Input": "change legend font size with matplotlib.pyplot to 6", + "Output Program": [ + "plot.legend(loc=2, prop={'size': 6})" + ], + "Output Answer": [ + "plot.legend(loc=2, prop={'size': 6})" + ], + "split": "train" + }, + { + "Input": "Check if any key in the dictionary `dict1` starts with the string `EMP$$`", + "Output Program": [ + "any(key.startswith('EMP$$') for key in dict1)" + ], + "Output Answer": [ + "any(key.startswith('EMP$$') for key in dict1)" + ], + "split": "test" + }, + { + "Input": "Reverse a string `string`", + "Output Program": [ + "''.join(reversed(string))" + ], + "Output Answer": [ + "''.join(reversed(string))" + ], + "split": "train" + }, + { + "Input": "get the sum of values associated with the key \u2018success\u2019 for a list of dictionaries `s`", + "Output Program": [ + "sum(d['success'] for d in s)" + ], + "Output Answer": [ + "sum(d['success'] for d in s)" + ], + "split": "train" + }, + { + "Input": "set the font 'Purisa' of size 12 for a canvas' text item `k`", + "Output Program": [ + "canvas.create_text(x, y, font=('Purisa', 12), text=k)" + ], + "Output Answer": [ + "canvas.create_text(x, y, font=('Purisa', 12), text=k)" + ], + "split": "train" + }, + { + "Input": "remove newline in string 'Mac EOL\\r'", + "Output Program": [ + "'Mac EOL\\r'.rstrip('\\r\\n')" + ], + "Output Answer": [ + "'Mac EOL\\r'.rstrip('\\r\\n')" + ], + "split": "train" + }, + { + "Input": "extract attribute `my_attr` from each object in list `my_list`", + "Output Program": [ + "[o.my_attr for o in my_list]" + ], + "Output Answer": [ + "[o.my_attr for o in my_list]" + ], + "split": "train" + }, + { + "Input": "sort list `a` in ascending order based on the addition of the second and third elements of each tuple in it", + "Output Program": [ + "sorted(a, key=lambda x: (sum(x[1:3]), x[0]))" + ], + "Output Answer": [ + "sorted(a, key=lambda x: (sum(x[1:3]), x[0]))" + ], + "split": "train" + }, + { + "Input": "write content of DataFrame `df` into text file 'c:\\\\data\\\\pandas.txt'", + "Output Program": [ + "df.to_csv('c:\\\\data\\\\pandas.txt', header=None, index=None, sep=' ', mode='a')" + ], + "Output Answer": [ + "df.to_csv('c:\\\\data\\\\pandas.txt', header=None, index=None, sep=' ', mode='a')" + ], + "split": "test" + }, + { + "Input": "convert int values in list `numlist` to float", + "Output Program": [ + "numlist = [float(x) for x in numlist]" + ], + "Output Answer": [ + "numlist = [float(x) for x in numlist]" + ], + "split": "test" + }, + { + "Input": "remove multiple spaces in a string `foo`", + "Output Program": [ + "\"\"\" \"\"\".join(foo.split())" + ], + "Output Answer": [ + "\"\"\" \"\"\".join(foo.split())" + ], + "split": "train" + }, + { + "Input": "do a scatter plot with empty circles", + "Output Program": [ + "plt.plot(np.random.randn(100), np.random.randn(100), 'o', mfc='none')" + ], + "Output Answer": [ + "plt.plot(np.random.randn(100), np.random.randn(100), 'o', mfc='none')" + ], + "split": "test" + }, + { + "Input": "drop rows of dataframe `df` whose index is smaller than the value of `start_remove` or bigger than the value of`end_remove`", + "Output Program": [ + "df.query('index < @start_remove or index > @end_remove')" + ], + "Output Answer": [ + "df.query('index < @start_remove or index > @end_remove')" + ], + "split": "train" + }, + { + "Input": "Sort list `keys` based on its elements' dot-seperated numbers", + "Output Program": [ + "keys.sort(key=lambda x: map(int, x.split('.')))" + ], + "Output Answer": [ + "keys.sort(key=lambda x: map(int, x.split('.')))" + ], + "split": "train" + }, + { + "Input": "django return a QuerySet list containing the values of field 'eng_name' in model `Employees`", + "Output Program": [ + "Employees.objects.values_list('eng_name', flat=True)" + ], + "Output Answer": [ + "Employees.objects.values_list('eng_name', flat=True)" + ], + "split": "train" + }, + { + "Input": "add multiple columns `hour`, `weekday`, `weeknum` to pandas data frame `df` from lambda function `lambdafunc`", + "Output Program": [ + "df[['hour', 'weekday', 'weeknum']] = df.apply(lambdafunc, axis=1)" + ], + "Output Answer": [ + "df[['hour', 'weekday', 'weeknum']] = df.apply(lambdafunc, axis=1)" + ], + "split": "train" + }, + { + "Input": "Replace comma with dot in a string `original_string` using regex", + "Output Program": [ + "new_string = re.sub('\"(\\\\d+),(\\\\d+)\"', '\\\\1.\\\\2', original_string)" + ], + "Output Answer": [ + "new_string = re.sub('\"(\\\\d+),(\\\\d+)\"', '\\\\1.\\\\2', original_string)" + ], + "split": "train" + }, + { + "Input": "get the value associated with unicode key 'from_user' of first dictionary in list `result`", + "Output Program": [ + "result[0][u'from_user']" + ], + "Output Answer": [ + "result[0][u'from_user']" + ], + "split": "test" + }, + { + "Input": "webbrowser open url `url`", + "Output Program": [ + "webbrowser.open_new(url)" + ], + "Output Answer": [ + "webbrowser.open_new(url)" + ], + "split": "train" + }, + { + "Input": "select rows whose column value in column `column_name` does not equal `some_value` in pandas data frame", + "Output Program": [ + "df.loc[df['column_name'] != some_value]" + ], + "Output Answer": [ + "df.loc[df['column_name'] != some_value]" + ], + "split": "train" + }, + { + "Input": "get the largest key whose not associated with value of 0 in dictionary `x`", + "Output Program": [ + "(k for k, v in x.iteritems() if v != 0)" + ], + "Output Answer": [ + "(k for k, v in x.iteritems() if v != 0)" + ], + "split": "test" + }, + { + "Input": "Find the`a` tag in html `root` which starts with the text `TEXT A` and assign it to `e`", + "Output Program": [ + "e = root.xpath('.//a[starts-with(text(),\"TEXT A\")]')" + ], + "Output Answer": [ + "e = root.xpath('.//a[starts-with(text(),\"TEXT A\")]')" + ], + "split": "train" + }, + { + "Input": "Google App Engine execute GQL query 'SELECT * FROM Schedule WHERE station = $1' with parameter `foo.key()`", + "Output Program": [ + "db.GqlQuery('SELECT * FROM Schedule WHERE station = $1', foo.key())" + ], + "Output Answer": [ + "db.GqlQuery('SELECT * FROM Schedule WHERE station = $1', foo.key())" + ], + "split": "test" + }, + { + "Input": "build a dictionary containing the conversion of each list in list `[['two', 2], ['one', 1]]` to a key/value pair as its items", + "Output Program": [ + "dict([['two', 2], ['one', 1]])" + ], + "Output Answer": [ + "dict([['two', 2], ['one', 1]])" + ], + "split": "train" + }, + { + "Input": "get the value at index 1 for each tuple in the list of tuples `L`", + "Output Program": [ + "[x[1] for x in L]" + ], + "Output Answer": [ + "[x[1] for x in L]" + ], + "split": "train" + }, + { + "Input": "Get pandas GroupBy object with sum over the rows with same column names within dataframe `df`", + "Output Program": [ + "df.groupby(df.columns, axis=1).sum()" + ], + "Output Answer": [ + "df.groupby(df.columns, axis=1).sum()" + ], + "split": "train" + }, + { + "Input": "converting integer `num` to list", + "Output Program": [ + "[int(x) for x in str(num)]" + ], + "Output Answer": [ + "[int(x) for x in str(num)]" + ], + "split": "train" + }, + { + "Input": "Find all files in directory \"/mydir\" with extension \".txt\"", + "Output Program": [ + "for file in os.listdir('/mydir'):\n if file.endswith('.txt'):\n pass", + "for (root, dirs, files) in os.walk('/mydir'):\n for file in files:\n if file.endswith('.txt'):\n pass", + "os.chdir('/mydir')\nfor file in glob.glob('*.txt'):\n pass" + ], + "Output Answer": [ + "for file in os.listdir('/mydir'):\n if file.endswith('.txt'):\n pass", + "for (root, dirs, files) in os.walk('/mydir'):\n for file in files:\n if file.endswith('.txt'):\n pass", + "os.chdir('/mydir')\nfor file in glob.glob('*.txt'):\n pass" + ], + "split": "test" + }, + { + "Input": "convert list `data` into a string of its elements", + "Output Program": [ + "print ''.join(map(str, data))" + ], + "Output Answer": [ + "print ''.join(map(str, data))" + ], + "split": "train" + }, + { + "Input": "match a sharp, followed by letters (including accent characters) in string `str1` using a regex", + "Output Program": [ + "hashtags = re.findall('#(\\\\w+)', str1, re.UNICODE)" + ], + "Output Answer": [ + "hashtags = re.findall('#(\\\\w+)', str1, re.UNICODE)" + ], + "split": "train" + }, + { + "Input": "Convert array `a` to numpy array", + "Output Program": [ + "a = np.array(a)" + ], + "Output Answer": [ + "a = np.array(a)" + ], + "split": "train" + }, + { + "Input": "convert a date string `s` to a datetime object", + "Output Program": [ + "datetime.datetime.strptime(s, '%Y-%m-%dT%H:%M:%SZ')" + ], + "Output Answer": [ + "datetime.datetime.strptime(s, '%Y-%m-%dT%H:%M:%SZ')" + ], + "split": "train" + }, + { + "Input": "Getting the length of `my_string`", + "Output Program": [ + "len(my_string)" + ], + "Output Answer": [ + "len(my_string)" + ], + "split": "test" + }, + { + "Input": "copy file \"/dir/file.ext\" to \"/new/dir/newname.ext\"", + "Output Program": [ + "shutil.copy2('/dir/file.ext', '/new/dir/newname.ext')" + ], + "Output Answer": [ + "shutil.copy2('/dir/file.ext', '/new/dir/newname.ext')" + ], + "split": "train" + }, + { + "Input": "get a list of indices of non zero elements in a list `a`", + "Output Program": [ + "[i for i, e in enumerate(a) if e != 0]" + ], + "Output Answer": [ + "[i for i, e in enumerate(a) if e != 0]" + ], + "split": "train" + }, + { + "Input": "Slice `url` with '&' as delimiter to get \"http://www.domainname.com/page?CONTENT_ITEM_ID=1234\" from url \"http://www.domainname.com/page?CONTENT_ITEM_ID=1234¶m2¶m3\r\n\"", + "Output Program": [ + "url.split('&')" + ], + "Output Answer": [ + "url.split('&')" + ], + "split": "train" + }, + { + "Input": "count the occurrences of items in list `l`", + "Output Program": [ + "dict(((x, l.count(x)) for x in set(l)))", + "Counter(l)", + "[[x, l.count(x)] for x in set(l)]" + ], + "Output Answer": [ + "dict(((x, l.count(x)) for x in set(l)))", + "Counter(l)", + "[[x, l.count(x)] for x in set(l)]" + ], + "split": "test" + }, + { + "Input": "Check the status code of url \"http://www.stackoverflow.com\"", + "Output Program": [ + "urllib.urlopen('http://www.stackoverflow.com').getcode()" + ], + "Output Answer": [ + "urllib.urlopen('http://www.stackoverflow.com').getcode()" + ], + "split": "train" + }, + { + "Input": "read csv file 'myfile.csv' into array", + "Output Program": [ + "df = pd.read_csv('myfile.csv', sep=',', header=None)", + "np.genfromtxt('myfile.csv', delimiter=',', dtype=None)", + "np.genfromtxt('myfile.csv', delimiter=',')" + ], + "Output Answer": [ + "df = pd.read_csv('myfile.csv', sep=',', header=None)", + "np.genfromtxt('myfile.csv', delimiter=',', dtype=None)", + "np.genfromtxt('myfile.csv', delimiter=',')" + ], + "split": "train" + }, + { + "Input": "match zero-or-more instances of lower case alphabet characters in a string `f233op `", + "Output Program": [ + "re.findall('([a-z])*', 'f233op')", + "re.findall('([a-z]*)', 'f233op')" + ], + "Output Answer": [ + "re.findall('([a-z])*', 'f233op')", + "re.findall('([a-z]*)', 'f233op')" + ], + "split": "train" + }, + { + "Input": "Serialize dictionary `data` and its keys to a JSON formatted string", + "Output Program": [ + "json.dumps({str(k): v for k, v in data.iteritems()})" + ], + "Output Answer": [ + "json.dumps({str(k): v for k, v in data.iteritems()})" + ], + "split": "train" + }, + { + "Input": "uniqueness for list of lists `testdata`", + "Output Program": [ + "[list(i) for i in set(tuple(i) for i in testdata)]" + ], + "Output Answer": [ + "[list(i) for i in set(tuple(i) for i in testdata)]" + ], + "split": "train" + }, + { + "Input": "find overlapping matches from a string `hello` using regex", + "Output Program": [ + "re.findall('(?=(\\\\w\\\\w))', 'hello')" + ], + "Output Answer": [ + "re.findall('(?=(\\\\w\\\\w))', 'hello')" + ], + "split": "train" + }, + { + "Input": "get a list `y` of the first element of every tuple in list `x`", + "Output Program": [ + "y = [i[0] for i in x]" + ], + "Output Answer": [ + "y = [i[0] for i in x]" + ], + "split": "train" + }, + { + "Input": "print two numbers `10` and `20` using string formatting", + "Output Program": [ + "\"\"\"{0} {1}\"\"\".format(10, 20)" + ], + "Output Answer": [ + "\"\"\"{0} {1}\"\"\".format(10, 20)" + ], + "split": "train" + }, + { + "Input": "append list `list1` to `list2`", + "Output Program": [ + "list2.extend(list1)" + ], + "Output Answer": [ + "list2.extend(list1)" + ], + "split": "test" + }, + { + "Input": "remove frame of legend in plot `plt`", + "Output Program": [ + "plt.legend(frameon=False)" + ], + "Output Answer": [ + "plt.legend(frameon=False)" + ], + "split": "train" + }, + { + "Input": "Change data type of data in column 'grade' of dataframe `data_df` into float and then to int", + "Output Program": [ + "data_df['grade'] = data_df['grade'].astype(float).astype(int)" + ], + "Output Answer": [ + "data_df['grade'] = data_df['grade'].astype(float).astype(int)" + ], + "split": "train" + }, + { + "Input": "convert string `user_input` into a list of integers `user_list`", + "Output Program": [ + "user_list = [int(number) for number in user_input.split(',')]" + ], + "Output Answer": [ + "user_list = [int(number) for number in user_input.split(',')]" + ], + "split": "test" + }, + { + "Input": "convert a beautiful soup html `soup` to text", + "Output Program": [ + "print soup.get_text()" + ], + "Output Answer": [ + "print soup.get_text()" + ], + "split": "train" + }, + { + "Input": "call a shell script `notepad` using subprocess", + "Output Program": [ + "subprocess.call(['notepad'])" + ], + "Output Answer": [ + "subprocess.call(['notepad'])" + ], + "split": "test" + }, + { + "Input": "Convert JSON array `array` to Python object", + "Output Program": [ + "data = json.loads(array)" + ], + "Output Answer": [ + "data = json.loads(array)" + ], + "split": "train" + }, + { + "Input": "get the type of variable `variable_name`", + "Output Program": [ + "print type(variable_name)" + ], + "Output Answer": [ + "print type(variable_name)" + ], + "split": "test" + }, + { + "Input": "get yesterday's date as a string in `YYYY-MM-DD` format using timedelta", + "Output Program": [ + "(datetime.now() - timedelta(1)).strftime('%Y-%m-%d')" + ], + "Output Answer": [ + "(datetime.now() - timedelta(1)).strftime('%Y-%m-%d')" + ], + "split": "train" + }, + { + "Input": "Remove characters in '!@#$' from a string `line`", + "Output Program": [ + "line = line.translate(string.maketrans('', ''), '!@#$')" + ], + "Output Answer": [ + "line = line.translate(string.maketrans('', ''), '!@#$')" + ], + "split": "train" + }, + { + "Input": "update the `globals()` dictionary with the contents of the `vars(args)` dictionary", + "Output Program": [ + "globals().update(vars(args))" + ], + "Output Answer": [ + "globals().update(vars(args))" + ], + "split": "train" + }, + { + "Input": "serialize `itemlist` to file `outfile`", + "Output Program": [ + "pickle.dump(itemlist, outfile)" + ], + "Output Answer": [ + "pickle.dump(itemlist, outfile)" + ], + "split": "train" + }, + { + "Input": "check whether a path \"/does/not/exist\" exists", + "Output Program": [ + "print os.path.exists('/does/not/exist')" + ], + "Output Answer": [ + "print os.path.exists('/does/not/exist')" + ], + "split": "train" + }, + { + "Input": "get a relative path of file 'my_file' into variable `fn`", + "Output Program": [ + "fn = os.path.join(os.path.dirname(__file__), 'my_file')" + ], + "Output Answer": [ + "fn = os.path.join(os.path.dirname(__file__), 'my_file')" + ], + "split": "train" + }, + { + "Input": "sum the values in each row of every two adjacent columns in dataframe `df`", + "Output Program": [ + "df.groupby(np.arange(len(df.columns)) // 2 + 1, axis=1).sum().add_prefix('s')" + ], + "Output Answer": [ + "df.groupby(np.arange(len(df.columns)) // 2 + 1, axis=1).sum().add_prefix('s')" + ], + "split": "train" + }, + { + "Input": "Convert nested list `x` into a flat list", + "Output Program": [ + "[j for i in x for j in i]" + ], + "Output Answer": [ + "[j for i in x for j in i]" + ], + "split": "train" + }, + { + "Input": "remove duplicate rows from dataframe `df1` and calculate their frequency", + "Output Program": [ + "df1.groupby(['key', 'year']).size().reset_index()" + ], + "Output Answer": [ + "df1.groupby(['key', 'year']).size().reset_index()" + ], + "split": "train" + }, + { + "Input": "find consecutive segments from a column 'A' in a pandas data frame 'df'", + "Output Program": [ + "df.reset_index().groupby('A')['index'].apply(np.array)" + ], + "Output Answer": [ + "df.reset_index().groupby('A')['index'].apply(np.array)" + ], + "split": "train" + }, + { + "Input": "get a string `randomkey123xyz987` between two substrings in a string `api('randomkey123xyz987', 'key', 'text')` using regex", + "Output Program": [ + "re.findall(\"api\\\\('(.*?)'\", \"api('randomkey123xyz987', 'key', 'text')\")" + ], + "Output Answer": [ + "re.findall(\"api\\\\('(.*?)'\", \"api('randomkey123xyz987', 'key', 'text')\")" + ], + "split": "train" + }, + { + "Input": "Retrieve each line from a file 'File.txt' as a list", + "Output Program": [ + "[line.split() for line in open('File.txt')]" + ], + "Output Answer": [ + "[line.split() for line in open('File.txt')]" + ], + "split": "test" + }, + { + "Input": "Make a dictionary from list `f` which is in the format of four sets of \"val, key, val\"", + "Output Program": [ + "{f[i + 1]: [f[i], f[i + 2]] for i in range(0, len(f), 3)}" + ], + "Output Answer": [ + "{f[i + 1]: [f[i], f[i + 2]] for i in range(0, len(f), 3)}" + ], + "split": "train" + }, + { + "Input": "split a string `Docs/src/Scripts/temp` by `/` keeping `/` in the result", + "Output Program": [ + "\"\"\"Docs/src/Scripts/temp\"\"\".replace('/', '/\\x00/').split('\\x00')" + ], + "Output Answer": [ + "\"\"\"Docs/src/Scripts/temp\"\"\".replace('/', '/\\x00/').split('\\x00')" + ], + "split": "test" + }, + { + "Input": "load json file 'sample.json' with utf-8 bom header", + "Output Program": [ + "json.loads(open('sample.json').read().decode('utf-8-sig'))" + ], + "Output Answer": [ + "json.loads(open('sample.json').read().decode('utf-8-sig'))" + ], + "split": "train" + }, + { + "Input": "Get all indexes of a letter `e` from a string `word`", + "Output Program": [ + "[index for index, letter in enumerate(word) if letter == 'e']" + ], + "Output Answer": [ + "[index for index, letter in enumerate(word) if letter == 'e']" + ], + "split": "train" + }, + { + "Input": "get list of duplicated elements in range of 3", + "Output Program": [ + "[y for x in range(3) for y in [x, x]]" + ], + "Output Answer": [ + "[y for x in range(3) for y in [x, x]]" + ], + "split": "train" + }, + { + "Input": "find maximal value in matrix `matrix`", + "Output Program": [ + "max([max(i) for i in matrix])" + ], + "Output Answer": [ + "max([max(i) for i in matrix])" + ], + "split": "test" + }, + { + "Input": "Sort list `li` in descending order based on the second element of each list inside list`li`", + "Output Program": [ + "sorted(li, key=operator.itemgetter(1), reverse=True)" + ], + "Output Answer": [ + "sorted(li, key=operator.itemgetter(1), reverse=True)" + ], + "split": "train" + }, + { + "Input": "pandas dataframe, how do i split a column 'AB' into two 'A' and 'B' on delimiter ' '", + "Output Program": [ + "df['A'], df['B'] = df['AB'].str.split(' ', 1).str" + ], + "Output Answer": [ + "df['A'], df['B'] = df['AB'].str.split(' ', 1).str" + ], + "split": "train" + }, + { + "Input": "Get a list of lists with summing the values of the second element from each list of lists `data`", + "Output Program": [ + "[[sum([x[1] for x in i])] for i in data]" + ], + "Output Answer": [ + "[[sum([x[1] for x in i])] for i in data]" + ], + "split": "train" + }, + { + "Input": "merge a list of integers `[1, 2, 3, 4, 5]` into a single integer", + "Output Program": [ + "reduce(lambda x, y: 10 * x + y, [1, 2, 3, 4, 5])" + ], + "Output Answer": [ + "reduce(lambda x, y: 10 * x + y, [1, 2, 3, 4, 5])" + ], + "split": "train" + }, + { + "Input": "get tuples from lists `lst` and `lst2` using list comprehension in python 2", + "Output Program": [ + "[(lst[i], lst2[i]) for i in xrange(len(lst))]" + ], + "Output Answer": [ + "[(lst[i], lst2[i]) for i in xrange(len(lst))]" + ], + "split": "train" + }, + { + "Input": "copy list `old_list` as `new_list`", + "Output Program": [ + "new_list = copy.copy(old_list)", + "new_list = old_list[:]", + "new_list = list(old_list)" + ], + "Output Answer": [ + "new_list = copy.copy(old_list)", + "new_list = old_list[:]", + "new_list = list(old_list)" + ], + "split": "train" + }, + { + "Input": "get a numpy array that contains the element wise minimum of three 3x1 arrays", + "Output Program": [ + "np.array([np.arange(3), np.arange(2, -1, -1), np.ones((3,))]).min(axis=0)" + ], + "Output Answer": [ + "np.array([np.arange(3), np.arange(2, -1, -1), np.ones((3,))]).min(axis=0)" + ], + "split": "train" + }, + { + "Input": "throw a value error with message 'A very specific bad thing happened', 'foo', 'bar', 'baz'", + "Output Program": [ + "raise ValueError('A very specific bad thing happened')" + ], + "Output Answer": [ + "raise ValueError('A very specific bad thing happened')" + ], + "split": "train" + }, + { + "Input": "concatenate a list of numpy arrays `input_list` together into a flattened list of values", + "Output Program": [ + "np.concatenate(input_list).ravel().tolist()" + ], + "Output Answer": [ + "np.concatenate(input_list).ravel().tolist()" + ], + "split": "train" + }, + { + "Input": "Unpack column 'stats' in dataframe `df` into a series of columns", + "Output Program": [ + "df['stats'].apply(pd.Series)" + ], + "Output Answer": [ + "df['stats'].apply(pd.Series)" + ], + "split": "train" + }, + { + "Input": "Find the list in a list of lists `alkaline_earth_values` with the max value of the second element.", + "Output Program": [ + "max(alkaline_earth_values, key=lambda x: x[1])" + ], + "Output Answer": [ + "max(alkaline_earth_values, key=lambda x: x[1])" + ], + "split": "train" + }, + { + "Input": "check if object `a` has property 'property'", + "Output Program": [ + "if hasattr(a, 'property'):\n pass" + ], + "Output Answer": [ + "if hasattr(a, 'property'):\n pass" + ], + "split": "train" + }, + { + "Input": "access the class variable `a_string` from a class object `test`", + "Output Program": [ + "getattr(test, a_string)" + ], + "Output Answer": [ + "getattr(test, a_string)" + ], + "split": "train" + }, + { + "Input": "sum the length of lists in list `x` that are more than 1 item in length", + "Output Program": [ + "sum(len(y) for y in x if len(y) > 1)" + ], + "Output Answer": [ + "sum(len(y) for y in x if len(y) > 1)" + ], + "split": "train" + }, + { + "Input": "combine elements of each list in list `L` into digits of a single integer", + "Output Program": [ + "[''.join(str(d) for d in x) for x in L]" + ], + "Output Answer": [ + "[''.join(str(d) for d in x) for x in L]" + ], + "split": "test" + }, + { + "Input": "check if 'a' is in list `a`", + "Output Program": [ + "('a' in a)" + ], + "Output Answer": [ + "('a' in a)" + ], + "split": "train" + }, + { + "Input": "convert dictionary `dict` into a string formatted object", + "Output Program": [ + "'{' + ','.join('{0!r}:{1!r}'.format(*x) for x in dct.items()) + '}'" + ], + "Output Answer": [ + "'{' + ','.join('{0!r}:{1!r}'.format(*x) for x in dct.items()) + '}'" + ], + "split": "train" + }, + { + "Input": "append values `[3, 4]` to a set `a`", + "Output Program": [ + "a.update([3, 4])" + ], + "Output Answer": [ + "a.update([3, 4])" + ], + "split": "train" + }, + { + "Input": "check if string `my_string` is empty", + "Output Program": [ + "if (not my_string):\n pass", + "if some_string:\n pass" + ], + "Output Answer": [ + "if (not my_string):\n pass", + "if some_string:\n pass" + ], + "split": "train" + }, + { + "Input": "delete letters from string '12454v'", + "Output Program": [ + "\"\"\"\"\"\".join(filter(str.isdigit, '12454v'))" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(filter(str.isdigit, '12454v'))" + ], + "split": "train" + }, + { + "Input": "reverse a priority queue `q` in python without using classes", + "Output Program": [ + "q.put((-n, n))" + ], + "Output Answer": [ + "q.put((-n, n))" + ], + "split": "test" + }, + { + "Input": "get list of sums of neighboring integers in string `example`", + "Output Program": [ + "[sum(map(int, s)) for s in example.split()]" + ], + "Output Answer": [ + "[sum(map(int, s)) for s in example.split()]" + ], + "split": "train" + }, + { + "Input": "case insensitive comparison of strings `string1` and `string2`", + "Output Program": [ + "if (string1.lower() == string2.lower()):\n print 'The strings are the same (case insensitive)'\nelse:\n print 'The strings are not the same (case insensitive)'" + ], + "Output Answer": [ + "if (string1.lower() == string2.lower()):\n print 'The strings are the same (case insensitive)'\nelse:\n print 'The strings are not the same (case insensitive)'" + ], + "split": "train" + }, + { + "Input": "remove duplicates from a list of sets 'L'", + "Output Program": [ + "[set(item) for item in set(frozenset(item) for item in L)]" + ], + "Output Answer": [ + "[set(item) for item in set(frozenset(item) for item in L)]" + ], + "split": "train" + }, + { + "Input": "Create numpy array of `5` numbers starting from `1` with interval of `3`", + "Output Program": [ + "print np.linspace(1, 3, num=5)" + ], + "Output Answer": [ + "print np.linspace(1, 3, num=5)" + ], + "split": "train" + }, + { + "Input": "read a file from redirected stdin and save to variable `result`", + "Output Program": [ + "result = sys.stdin.read()" + ], + "Output Answer": [ + "result = sys.stdin.read()" + ], + "split": "train" + }, + { + "Input": "get a value of datetime.today() in the UTC time zone", + "Output Program": [ + "datetime.now(pytz.utc)" + ], + "Output Answer": [ + "datetime.now(pytz.utc)" + ], + "split": "test" + }, + { + "Input": "Trimming \"\\n\" from string `myString`", + "Output Program": [ + "myString.strip('\\n')" + ], + "Output Answer": [ + "myString.strip('\\n')" + ], + "split": "train" + }, + { + "Input": "convert dictionary `adict` into string", + "Output Program": [ + "\"\"\"\"\"\".join('{}{}'.format(key, val) for key, val in adict.items())", + "\"\"\"\"\"\".join('{}{}'.format(key, val) for key, val in sorted(adict.items()))" + ], + "Output Answer": [ + "\"\"\"\"\"\".join('{}{}'.format(key, val) for key, val in adict.items())", + "\"\"\"\"\"\".join('{}{}'.format(key, val) for key, val in sorted(adict.items()))" + ], + "split": "train" + }, + { + "Input": "delete all values in a list `mylist`", + "Output Program": [ + "del mylist[:]" + ], + "Output Answer": [ + "del mylist[:]" + ], + "split": "train" + }, + { + "Input": "sort a pandas data frame by column `a` in ascending, and by column `b` in descending order", + "Output Program": [ + "df.sort(['a', 'b'], ascending=[True, False])" + ], + "Output Answer": [ + "df.sort(['a', 'b'], ascending=[True, False])" + ], + "split": "train" + }, + { + "Input": "split string `s` by '@' and get the first element", + "Output Program": [ + "s.split('@')[0]" + ], + "Output Answer": [ + "s.split('@')[0]" + ], + "split": "train" + }, + { + "Input": "Keep only unique words in list of words `words` and join into string", + "Output Program": [ + "print ' '.join(sorted(set(words), key=words.index))" + ], + "Output Answer": [ + "print ' '.join(sorted(set(words), key=words.index))" + ], + "split": "train" + }, + { + "Input": "Save plot `plt` as png file 'filename.png'", + "Output Program": [ + "plt.savefig('filename.png')" + ], + "Output Answer": [ + "plt.savefig('filename.png')" + ], + "split": "train" + }, + { + "Input": "fill missing value in one column 'Cat1' with the value of another column 'Cat2'", + "Output Program": [ + "df['Cat1'].fillna(df['Cat2'])" + ], + "Output Answer": [ + "df['Cat1'].fillna(df['Cat2'])" + ], + "split": "train" + }, + { + "Input": "Remove all items from a dictionary `myDict` whose values are `42`", + "Output Program": [ + "{key: val for key, val in myDict.items() if val != 42}" + ], + "Output Answer": [ + "{key: val for key, val in myDict.items() if val != 42}" + ], + "split": "train" + }, + { + "Input": "iterate backwards from 10 to 0", + "Output Program": [ + "xrange(10, 0, -1)" + ], + "Output Answer": [ + "xrange(10, 0, -1)" + ], + "split": "train" + }, + { + "Input": "round number 2.0005 up to 3 decimal places", + "Output Program": [ + "round(2.0005, 3)" + ], + "Output Answer": [ + "round(2.0005, 3)" + ], + "split": "train" + }, + { + "Input": "Trimming a string \" Hello\\n\" by space", + "Output Program": [ + "' Hello\\n'.strip(' ')" + ], + "Output Answer": [ + "' Hello\\n'.strip(' ')" + ], + "split": "train" + }, + { + "Input": "filter objects month wise in django model `Sample` for year `2011`", + "Output Program": [ + "Sample.objects.filter(date__year='2011', date__month='01')" + ], + "Output Answer": [ + "Sample.objects.filter(date__year='2011', date__month='01')" + ], + "split": "train" + }, + { + "Input": "get complete path of a module named `os`", + "Output Program": [ + "imp.find_module('os')[1]" + ], + "Output Answer": [ + "imp.find_module('os')[1]" + ], + "split": "train" + }, + { + "Input": "Sort dictionary `d` by value in descending order", + "Output Program": [ + "sorted(d, key=d.get, reverse=True)" + ], + "Output Answer": [ + "sorted(d, key=d.get, reverse=True)" + ], + "split": "train" + }, + { + "Input": "Compose keys from dictionary `d1` with respective values in dictionary `d2`", + "Output Program": [ + "result = {k: d2.get(v) for k, v in d1.items()}" + ], + "Output Answer": [ + "result = {k: d2.get(v) for k, v in d1.items()}" + ], + "split": "train" + }, + { + "Input": "change current working directory", + "Output Program": [ + "os.chdir('.\\\\chapter3')", + "os.chdir('C:\\\\Users\\\\username\\\\Desktop\\\\headfirstpython\\\\chapter3')" + ], + "Output Answer": [ + "os.chdir('.\\\\chapter3')", + "os.chdir('C:\\\\Users\\\\username\\\\Desktop\\\\headfirstpython\\\\chapter3')" + ], + "split": "train" + }, + { + "Input": "remove last comma character ',' in string `s`", + "Output Program": [ + "\"\"\"\"\"\".join(s.rsplit(',', 1))" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(s.rsplit(',', 1))" + ], + "split": "test" + }, + { + "Input": "execute command 'echo $0' in Z shell", + "Output Program": [ + "os.system(\"zsh -c 'echo $0'\")" + ], + "Output Answer": [ + "os.system(\"zsh -c 'echo $0'\")" + ], + "split": "train" + }, + { + "Input": "Get the age of directory (or file) `/tmp` in seconds.", + "Output Program": [ + "print os.path.getmtime('/tmp')" + ], + "Output Answer": [ + "print os.path.getmtime('/tmp')" + ], + "split": "train" + }, + { + "Input": "make a 0.1 seconds time delay", + "Output Program": [ + "time.sleep(0.1)", + "sleep(0.1)" + ], + "Output Answer": [ + "time.sleep(0.1)", + "sleep(0.1)" + ], + "split": "train" + }, + { + "Input": "order a list of lists `l1` by the first value", + "Output Program": [ + "l1.sort(key=lambda x: int(x[0]))" + ], + "Output Answer": [ + "l1.sort(key=lambda x: int(x[0]))" + ], + "split": "train" + }, + { + "Input": "stack two dataframes next to each other in pandas", + "Output Program": [ + "pd.concat([GOOG, AAPL], keys=['GOOG', 'AAPL'], axis=1)" + ], + "Output Answer": [ + "pd.concat([GOOG, AAPL], keys=['GOOG', 'AAPL'], axis=1)" + ], + "split": "train" + }, + { + "Input": "Sort list `alist` in ascending order based on each of its elements' attribute `foo`", + "Output Program": [ + "alist.sort(key=lambda x: x.foo)" + ], + "Output Answer": [ + "alist.sort(key=lambda x: x.foo)" + ], + "split": "train" + }, + { + "Input": "sort each row in a pandas dataframe `df` in descending order", + "Output Program": [ + "df.sort(axis=1, ascending=False)" + ], + "Output Answer": [ + "df.sort(axis=1, ascending=False)" + ], + "split": "train" + }, + { + "Input": "Get a list of all keys from dictionary `dictA` where the number of occurrences of value `duck` in that key is more than `1`", + "Output Program": [ + "[k for k, v in dictA.iteritems() if v.count('duck') > 1]" + ], + "Output Answer": [ + "[k for k, v in dictA.iteritems() if v.count('duck') > 1]" + ], + "split": "train" + }, + { + "Input": "get the first row, second column; second row, first column, and first row third column values of numpy array `arr`", + "Output Program": [ + "arr[[0, 1, 1], [1, 0, 2]]" + ], + "Output Answer": [ + "arr[[0, 1, 1], [1, 0, 2]]" + ], + "split": "train" + }, + { + "Input": "Convert long int `myNumber` into date and time represented in the the string format '%Y-%m-%d %H:%M:%S'", + "Output Program": [ + "datetime.datetime.fromtimestamp(myNumber).strftime('%Y-%m-%d %H:%M:%S')" + ], + "Output Answer": [ + "datetime.datetime.fromtimestamp(myNumber).strftime('%Y-%m-%d %H:%M:%S')" + ], + "split": "train" + }, + { + "Input": "Concat each values in a tuple `(34.2424, -64.2344, 76.3534, 45.2344)` to get a string", + "Output Program": [ + "\"\"\"\"\"\".join(str(i) for i in (34.2424, -64.2344, 76.3534, 45.2344))" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(str(i) for i in (34.2424, -64.2344, 76.3534, 45.2344))" + ], + "split": "train" + }, + { + "Input": "count the number of integers in list `a`", + "Output Program": [ + "sum(isinstance(x, int) for x in a)" + ], + "Output Answer": [ + "sum(isinstance(x, int) for x in a)" + ], + "split": "train" + }, + { + "Input": "gets the `n` th-to-last element in list `some_list`", + "Output Program": [ + "some_list[(- n)]" + ], + "Output Answer": [ + "some_list[(- n)]" + ], + "split": "train" + }, + { + "Input": "convert matlab engine array `x` to a numpy ndarray", + "Output Program": [ + "np.array(x._data).reshape(x.size[::-1]).T" + ], + "Output Answer": [ + "np.array(x._data).reshape(x.size[::-1]).T" + ], + "split": "train" + }, + { + "Input": "convert a list of dictionaries `listofdict into a dictionary of dictionaries", + "Output Program": [ + "dict((d['name'], d) for d in listofdict)" + ], + "Output Answer": [ + "dict((d['name'], d) for d in listofdict)" + ], + "split": "train" + }, + { + "Input": "convert a DateTime string back to a DateTime object of format '%Y-%m-%d %H:%M:%S.%f'", + "Output Program": [ + "datetime.strptime('2010-11-13 10:33:54.227806', '%Y-%m-%d %H:%M:%S.%f')" + ], + "Output Answer": [ + "datetime.strptime('2010-11-13 10:33:54.227806', '%Y-%m-%d %H:%M:%S.%f')" + ], + "split": "train" + }, + { + "Input": "divide the members of a list `conversions` by the corresponding members of another list `trials`", + "Output Program": [ + "[(c / t) for c, t in zip(conversions, trials)]" + ], + "Output Answer": [ + "[(c / t) for c, t in zip(conversions, trials)]" + ], + "split": "train" + }, + { + "Input": "round number `h` to nearest integer", + "Output Program": [ + "h = int(round(h))" + ], + "Output Answer": [ + "h = int(round(h))" + ], + "split": "train" + }, + { + "Input": "make an HTTP post request with data `post_data`", + "Output Program": [ + "post_response = requests.post(url='http://httpbin.org/post', json=post_data)" + ], + "Output Answer": [ + "post_response = requests.post(url='http://httpbin.org/post', json=post_data)" + ], + "split": "train" + }, + { + "Input": "sort column `m` in panda dataframe `df`", + "Output Program": [ + "df.sort('m')" + ], + "Output Answer": [ + "df.sort('m')" + ], + "split": "train" + }, + { + "Input": "remove column by index `[:, 0:2]` in dataframe `df`", + "Output Program": [ + "df = df.ix[:, 0:2]" + ], + "Output Answer": [ + "df = df.ix[:, 0:2]" + ], + "split": "train" + }, + { + "Input": "get a list of booleans `z` that shows wether the corresponding items in list `x` and `y` are equal", + "Output Program": [ + "z = [(i == j) for i, j in zip(x, y)]" + ], + "Output Answer": [ + "z = [(i == j) for i, j in zip(x, y)]" + ], + "split": "train" + }, + { + "Input": "Calling an external command \"some_command with args\"", + "Output Program": [ + "stream = os.popen('some_command with args')", + "os.system('some_command with args')" + ], + "Output Answer": [ + "stream = os.popen('some_command with args')", + "os.system('some_command with args')" + ], + "split": "train" + }, + { + "Input": "convert list `lst` of tuples of floats to list `str_list` of tuples of strings of floats in scientific notation with eight decimal point precision", + "Output Program": [ + "str_list = [tuple('{0:.8e}'.format(flt) for flt in sublist) for sublist in lst]" + ], + "Output Answer": [ + "str_list = [tuple('{0:.8e}'.format(flt) for flt in sublist) for sublist in lst]" + ], + "split": "train" + }, + { + "Input": "concatenate items of list `l` with a space ' '", + "Output Program": [ + "print ' '.join(map(str, l))" + ], + "Output Answer": [ + "print ' '.join(map(str, l))" + ], + "split": "test" + }, + { + "Input": "split strings in list `l` on the first occurring tab `\\t` and enter only the first resulting substring in a new list", + "Output Program": [ + "[i.split('\\t', 1)[0] for i in l]" + ], + "Output Answer": [ + "[i.split('\\t', 1)[0] for i in l]" + ], + "split": "train" + }, + { + "Input": "replace fields delimited by braces {} in string \"Day old bread, 50% sale {0}\" with string 'today'", + "Output Program": [ + "\"\"\"Day old bread, 50% sale {0}\"\"\".format('today')" + ], + "Output Answer": [ + "\"\"\"Day old bread, 50% sale {0}\"\"\".format('today')" + ], + "split": "train" + }, + { + "Input": "Get a string with string formatting from dictionary `d`", + "Output Program": [ + "\"\"\", \"\"\".join(['{}_{}'.format(k, v) for k, v in d.iteritems()])" + ], + "Output Answer": [ + "\"\"\", \"\"\".join(['{}_{}'.format(k, v) for k, v in d.iteritems()])" + ], + "split": "train" + }, + { + "Input": "get a request parameter `a` in jinja2", + "Output Program": [ + "{{request.args.get('a')}}" + ], + "Output Answer": [ + "{{request.args.get('a')}}" + ], + "split": "train" + }, + { + "Input": "get the path of the current python module", + "Output Program": [ + "print os.getcwd()" + ], + "Output Answer": [ + "print os.getcwd()" + ], + "split": "train" + }, + { + "Input": "open a file `/home/user/test/wsservice/data.pkl` in binary write mode", + "Output Program": [ + "output = open('/home/user/test/wsservice/data.pkl', 'wb')" + ], + "Output Answer": [ + "output = open('/home/user/test/wsservice/data.pkl', 'wb')" + ], + "split": "train" + }, + { + "Input": "argparse associate zero or more arguments with flag 'file'", + "Output Program": [ + "parser.add_argument('file', nargs='*')" + ], + "Output Answer": [ + "parser.add_argument('file', nargs='*')" + ], + "split": "train" + }, + { + "Input": "Get index of numpy array `a` with another numpy array `b`", + "Output Program": [ + "a[tuple(b)]" + ], + "Output Answer": [ + "a[tuple(b)]" + ], + "split": "train" + }, + { + "Input": "scalar multiply matrix `a` by `b`", + "Output Program": [ + "(a.T * b).T" + ], + "Output Answer": [ + "(a.T * b).T" + ], + "split": "train" + }, + { + "Input": "separate numbers and characters in string '20M10000N80M'", + "Output Program": [ + "re.findall('([0-9]+)([A-Z])', '20M10000N80M')", + "re.findall('([0-9]+|[A-Z])', '20M10000N80M')" + ], + "Output Answer": [ + "re.findall('([0-9]+)([A-Z])', '20M10000N80M')", + "re.findall('([0-9]+|[A-Z])', '20M10000N80M')" + ], + "split": "train" + }, + { + "Input": "set the value in column 'B' to NaN if the corresponding value in column 'A' is equal to 0 in pandas dataframe `df`", + "Output Program": [ + "df.ix[df.A == 0, 'B'] = np.nan" + ], + "Output Answer": [ + "df.ix[df.A == 0, 'B'] = np.nan" + ], + "split": "train" + }, + { + "Input": "match regex '[a-zA-Z][\\\\w-]*$' on string '!A_B'", + "Output Program": [ + "re.match('[a-zA-Z][\\\\w-]*$', '!A_B')" + ], + "Output Answer": [ + "re.match('[a-zA-Z][\\\\w-]*$', '!A_B')" + ], + "split": "train" + }, + { + "Input": "sort datetime objects `birthdays` by `month` and `day`", + "Output Program": [ + "birthdays.sort(key=lambda d: (d.month, d.day))" + ], + "Output Answer": [ + "birthdays.sort(key=lambda d: (d.month, d.day))" + ], + "split": "train" + }, + { + "Input": "create a list containing the multiplication of each elements at the same index of list `lista` and list `listb`", + "Output Program": [ + "[(a * b) for a, b in zip(lista, listb)]" + ], + "Output Answer": [ + "[(a * b) for a, b in zip(lista, listb)]" + ], + "split": "train" + }, + { + "Input": "append `date` to list value of `key` in dictionary `dates_dict`, or create key `key` with value `date` in a list if it does not exist", + "Output Program": [ + "dates_dict.setdefault(key, []).append(date)" + ], + "Output Answer": [ + "dates_dict.setdefault(key, []).append(date)" + ], + "split": "train" + }, + { + "Input": "swap keys with values in a dictionary `a`", + "Output Program": [ + "res = dict((v, k) for k, v in a.iteritems())" + ], + "Output Answer": [ + "res = dict((v, k) for k, v in a.iteritems())" + ], + "split": "test" + }, + { + "Input": "get an absolute file path of file 'mydir/myfile.txt'", + "Output Program": [ + "os.path.abspath('mydir/myfile.txt')" + ], + "Output Answer": [ + "os.path.abspath('mydir/myfile.txt')" + ], + "split": "test" + }, + { + "Input": "drop all columns in dataframe `df` that holds a maximum value bigger than 0", + "Output Program": [ + "df.columns[df.max() > 0]" + ], + "Output Answer": [ + "df.columns[df.max() > 0]" + ], + "split": "train" + }, + { + "Input": "check if string `foo` is UTF-8 encoded", + "Output Program": [ + "foo.decode('utf8').encode('utf8')" + ], + "Output Answer": [ + "foo.decode('utf8').encode('utf8')" + ], + "split": "train" + }, + { + "Input": "get current datetime in ISO format", + "Output Program": [ + "datetime.datetime.now().isoformat()" + ], + "Output Answer": [ + "datetime.datetime.now().isoformat()" + ], + "split": "train" + }, + { + "Input": "sort a nested list by the inverse of element 2, then by element 1", + "Output Program": [ + "sorted(l, key=lambda x: (-int(x[1]), x[0]))" + ], + "Output Answer": [ + "sorted(l, key=lambda x: (-int(x[1]), x[0]))" + ], + "split": "train" + }, + { + "Input": "combine list of dictionaries `dicts` with the same keys in each list to a single dictionary", + "Output Program": [ + "dict((k, [d[k] for d in dicts]) for k in dicts[0])" + ], + "Output Answer": [ + "dict((k, [d[k] for d in dicts]) for k in dicts[0])" + ], + "split": "test" + }, + { + "Input": "convert a string `s` containing hex bytes to a hex string", + "Output Program": [ + "binascii.a2b_hex(s)" + ], + "Output Answer": [ + "binascii.a2b_hex(s)" + ], + "split": "train" + }, + { + "Input": "get the number of all keys in the nested dictionary `dict_list`", + "Output Program": [ + "len(dict_test) + sum(len(v) for v in dict_test.itervalues())" + ], + "Output Answer": [ + "len(dict_test) + sum(len(v) for v in dict_test.itervalues())" + ], + "split": "train" + }, + { + "Input": "Log message 'test' on the root logger.", + "Output Program": [ + "logging.info('test')" + ], + "Output Answer": [ + "logging.info('test')" + ], + "split": "train" + }, + { + "Input": "get the indices of tuples in list of tuples `L` where the first value is 53", + "Output Program": [ + "[i for i, v in enumerate(L) if v[0] == 53]" + ], + "Output Answer": [ + "[i for i, v in enumerate(L) if v[0] == 53]" + ], + "split": "train" + }, + { + "Input": "get index of key 'c' in dictionary `x`", + "Output Program": [ + "list(x.keys()).index('c')" + ], + "Output Answer": [ + "list(x.keys()).index('c')" + ], + "split": "train" + }, + { + "Input": "Join pandas data frame `frame_1` and `frame_2` with left join by `county_ID` and right join by `countyid`", + "Output Program": [ + "pd.merge(frame_1, frame_2, left_on='county_ID', right_on='countyid')" + ], + "Output Answer": [ + "pd.merge(frame_1, frame_2, left_on='county_ID', right_on='countyid')" + ], + "split": "train" + }, + { + "Input": "count `True` values associated with key 'one' in dictionary `tadas`", + "Output Program": [ + "sum(item['one'] for item in tadas.values())" + ], + "Output Answer": [ + "sum(item['one'] for item in tadas.values())" + ], + "split": "train" + }, + { + "Input": "round off entries in dataframe `df` column `Alabama_exp` to two decimal places, and entries in column `Credit_exp` to three decimal places", + "Output Program": [ + "df.round({'Alabama_exp': 2, 'Credit_exp': 3})" + ], + "Output Answer": [ + "df.round({'Alabama_exp': 2, 'Credit_exp': 3})" + ], + "split": "train" + }, + { + "Input": "shutdown a computer using subprocess", + "Output Program": [ + "subprocess.call(['shutdown', '/s'])" + ], + "Output Answer": [ + "subprocess.call(['shutdown', '/s'])" + ], + "split": "train" + }, + { + "Input": "Insert directory 'apps' into directory `__file__`", + "Output Program": [ + "sys.path.insert(1, os.path.join(os.path.dirname(__file__), 'apps'))" + ], + "Output Answer": [ + "sys.path.insert(1, os.path.join(os.path.dirname(__file__), 'apps'))" + ], + "split": "test" + }, + { + "Input": "sum values in list of dictionaries `example_list` with key 'gold'", + "Output Program": [ + "sum(item['gold'] for item in example_list)" + ], + "Output Answer": [ + "sum(item['gold'] for item in example_list)" + ], + "split": "train" + }, + { + "Input": "sort list `X` based on values from another list `Y`", + "Output Program": [ + "[x for y, x in sorted(zip(Y, X))]" + ], + "Output Answer": [ + "[x for y, x in sorted(zip(Y, X))]" + ], + "split": "train" + }, + { + "Input": "Convert a Unicode string `title` to a 'ascii' string", + "Output Program": [ + "unicodedata.normalize('NFKD', title).encode('ascii', 'ignore')" + ], + "Output Answer": [ + "unicodedata.normalize('NFKD', title).encode('ascii', 'ignore')" + ], + "split": "train" + }, + { + "Input": "Initialize a list of empty lists `a` of size 3", + "Output Program": [ + "a = [[] for i in xrange(3)]" + ], + "Output Answer": [ + "a = [[] for i in xrange(3)]" + ], + "split": "train" + }, + { + "Input": "extracting column `1` and `9` from array `data`", + "Output Program": [ + "data[:, ([1, 9])]" + ], + "Output Answer": [ + "data[:, ([1, 9])]" + ], + "split": "train" + }, + { + "Input": "Change log level dynamically to 'DEBUG' without restarting the application", + "Output Program": [ + "logging.getLogger().setLevel(logging.DEBUG)" + ], + "Output Answer": [ + "logging.getLogger().setLevel(logging.DEBUG)" + ], + "split": "train" + }, + { + "Input": "return `True` if string `foobarrrr` contains regex `ba[rzd]`", + "Output Program": [ + "bool(re.search('ba[rzd]', 'foobarrrr'))" + ], + "Output Answer": [ + "bool(re.search('ba[rzd]', 'foobarrrr'))" + ], + "split": "test" + }, + { + "Input": "swap each pair of characters in string `s`", + "Output Program": [ + "\"\"\"\"\"\".join([s[x:x + 2][::-1] for x in range(0, len(s), 2)])" + ], + "Output Answer": [ + "\"\"\"\"\"\".join([s[x:x + 2][::-1] for x in range(0, len(s), 2)])" + ], + "split": "train" + }, + { + "Input": "sort a pandas data frame by column `Peak` in ascending and `Weeks` in descending order", + "Output Program": [ + "df.sort(['Peak', 'Weeks'], ascending=[True, False], inplace=True)" + ], + "Output Answer": [ + "df.sort(['Peak', 'Weeks'], ascending=[True, False], inplace=True)" + ], + "split": "train" + }, + { + "Input": "Convert a hex string `437c2123 ` according to ascii value.", + "Output Program": [ + "\"\"\"437c2123\"\"\".decode('hex')" + ], + "Output Answer": [ + "\"\"\"437c2123\"\"\".decode('hex')" + ], + "split": "train" + }, + { + "Input": "throw an Exception with message 'This is the exception you expect to handle'", + "Output Program": [ + "raise Exception('This is the exception you expect to handle')" + ], + "Output Answer": [ + "raise Exception('This is the exception you expect to handle')" + ], + "split": "train" + }, + { + "Input": "Django get maximum value associated with field 'added' in model `AuthorizedEmail`", + "Output Program": [ + "AuthorizedEmail.objects.filter(group=group).order_by('-added')[0]" + ], + "Output Answer": [ + "AuthorizedEmail.objects.filter(group=group).order_by('-added')[0]" + ], + "split": "test" + }, + { + "Input": "update the fields in django model `Book` using dictionary `d`", + "Output Program": [ + "Book.objects.create(**d)" + ], + "Output Answer": [ + "Book.objects.create(**d)" + ], + "split": "train" + }, + { + "Input": "decode unicode string `s` into a readable unicode literal", + "Output Program": [ + "s.decode('unicode_escape')" + ], + "Output Answer": [ + "s.decode('unicode_escape')" + ], + "split": "train" + }, + { + "Input": "Initialize a list `a` with `10000` items and each item's value `0`", + "Output Program": [ + "a = [0] * 10000" + ], + "Output Answer": [ + "a = [0] * 10000" + ], + "split": "train" + }, + { + "Input": "read line by line from stdin", + "Output Program": [ + "for line in fileinput.input():\n pass", + "for line in sys.stdin:\n pass" + ], + "Output Answer": [ + "for line in fileinput.input():\n pass", + "for line in sys.stdin:\n pass" + ], + "split": "train" + }, + { + "Input": "access a tag called \"name\" in beautifulsoup `soup`", + "Output Program": [ + "print soup.find('name').string" + ], + "Output Answer": [ + "print soup.find('name').string" + ], + "split": "test" + }, + { + "Input": "remove the fragment identifier `#something` from a url `http://www.address.com/something#something`", + "Output Program": [ + "urlparse.urldefrag('http://www.address.com/something#something')" + ], + "Output Answer": [ + "urlparse.urldefrag('http://www.address.com/something#something')" + ], + "split": "train" + }, + { + "Input": "open the login site 'http://somesite.com/adminpanel/index.php' in the browser", + "Output Program": [ + "webbrowser.open('http://somesite.com/adminpanel/index.php')" + ], + "Output Answer": [ + "webbrowser.open('http://somesite.com/adminpanel/index.php')" + ], + "split": "train" + }, + { + "Input": "get number in list `myList` closest in value to number `myNumber`", + "Output Program": [ + "min(myList, key=lambda x: abs(x - myNumber))" + ], + "Output Answer": [ + "min(myList, key=lambda x: abs(x - myNumber))" + ], + "split": "train" + }, + { + "Input": "encode string `data` using hex 'hex' encoding", + "Output Program": [ + "print data.encode('hex')" + ], + "Output Answer": [ + "print data.encode('hex')" + ], + "split": "train" + }, + { + "Input": "split a `utf-8` encoded string `stru` into a list of characters", + "Output Program": [ + "list(stru.decode('utf-8'))" + ], + "Output Answer": [ + "list(stru.decode('utf-8'))" + ], + "split": "train" + }, + { + "Input": "get the next value greatest to `2` from a list of numbers `num_list`", + "Output Program": [ + "min([x for x in num_list if x > 2])" + ], + "Output Answer": [ + "min([x for x in num_list if x > 2])" + ], + "split": "train" + }, + { + "Input": "sort objects in model `Profile` based on Theirs `reputation` attribute", + "Output Program": [ + "sorted(Profile.objects.all(), key=lambda p: p.reputation)" + ], + "Output Answer": [ + "sorted(Profile.objects.all(), key=lambda p: p.reputation)" + ], + "split": "train" + }, + { + "Input": "write multiple strings `line1`, `line2` and `line3` in one line in a file `target`", + "Output Program": [ + "target.write('%r\\n%r\\n%r\\n' % (line1, line2, line3))" + ], + "Output Answer": [ + "target.write('%r\\n%r\\n%r\\n' % (line1, line2, line3))" + ], + "split": "test" + }, + { + "Input": "replace everything that is not an alphabet or a digit with '' in 's'.", + "Output Program": [ + "re.sub('[\\\\W_]+', '', s)" + ], + "Output Answer": [ + "re.sub('[\\\\W_]+', '', s)" + ], + "split": "train" + }, + { + "Input": "subtract 1 hour and 10 minutes from time object `t`", + "Output Program": [ + "(t - datetime.timedelta(hours=1, minutes=10))" + ], + "Output Answer": [ + "(t - datetime.timedelta(hours=1, minutes=10))" + ], + "split": "train" + }, + { + "Input": "Get the dot product of matrix `[1,0,0,1,0,0]` and matrix `[[0,1],[1,1],[1,0],[1,0],[1,1],[0,1]]`", + "Output Program": [ + "np.dot([1, 0, 0, 1, 0, 0], [[0, 1], [1, 1], [1, 0], [1, 0], [1, 1], [0, 1]])" + ], + "Output Answer": [ + "np.dot([1, 0, 0, 1, 0, 0], [[0, 1], [1, 1], [1, 0], [1, 0], [1, 1], [0, 1]])" + ], + "split": "train" + }, + { + "Input": "replace each 'a' with 'b' and each 'b' with 'a' in the string 'obama' in a single pass.", + "Output Program": [ + "\"\"\"obama\"\"\".replace('a', '%temp%').replace('b', 'a').replace('%temp%', 'b')" + ], + "Output Answer": [ + "\"\"\"obama\"\"\".replace('a', '%temp%').replace('b', 'a').replace('%temp%', 'b')" + ], + "split": "test" + }, + { + "Input": "make a flat list from list of lists `sublist`", + "Output Program": [ + "[item for sublist in l for item in sublist]" + ], + "Output Answer": [ + "[item for sublist in l for item in sublist]" + ], + "split": "train" + }, + { + "Input": "decode a urllib escaped url string `url` with `utf8`", + "Output Program": [ + "url = urllib.unquote(url).decode('utf8')" + ], + "Output Answer": [ + "url = urllib.unquote(url).decode('utf8')" + ], + "split": "train" + }, + { + "Input": "remove item \"b\" in list `a`", + "Output Program": [ + "a.remove('b')" + ], + "Output Answer": [ + "a.remove('b')" + ], + "split": "train" + }, + { + "Input": "get count of values in numpy array `a` that are between values `25` and `100`", + "Output Program": [ + "((25 < a) & (a < 100)).sum()" + ], + "Output Answer": [ + "((25 < a) & (a < 100)).sum()" + ], + "split": "train" + }, + { + "Input": "Find the greatest number in set `(1, 2, 3)`", + "Output Program": [ + "print max(1, 2, 3)" + ], + "Output Answer": [ + "print max(1, 2, 3)" + ], + "split": "train" + }, + { + "Input": "Print +1 using format '{0:+d}'", + "Output Program": [ + "print '{0:+d}'.format(score)" + ], + "Output Answer": [ + "print '{0:+d}'.format(score)" + ], + "split": "train" + }, + { + "Input": "get values from a dictionary `my_dict` whose key contains the string `Date`", + "Output Program": [ + "[v for k, v in my_dict.items() if 'Date' in k]" + ], + "Output Answer": [ + "[v for k, v in my_dict.items() if 'Date' in k]" + ], + "split": "train" + }, + { + "Input": "sort rows of numpy matrix `arr` in ascending order according to all column values", + "Output Program": [ + "numpy.sort(arr, axis=0)" + ], + "Output Answer": [ + "numpy.sort(arr, axis=0)" + ], + "split": "train" + }, + { + "Input": "replace periods `.` that are not followed by periods or spaces with a period and a space `. `", + "Output Program": [ + "re.sub('\\\\.(?=[^ .])', '. ', para)" + ], + "Output Answer": [ + "re.sub('\\\\.(?=[^ .])', '. ', para)" + ], + "split": "train" + }, + { + "Input": "throw an assertion error with message \"Unexpected value of 'distance'!\", distance", + "Output Program": [ + "raise AssertionError(\"Unexpected value of 'distance'!\", distance)" + ], + "Output Answer": [ + "raise AssertionError(\"Unexpected value of 'distance'!\", distance)" + ], + "split": "train" + }, + { + "Input": "Convert hex string `hexString` to int", + "Output Program": [ + "int(hexString, 16)" + ], + "Output Answer": [ + "int(hexString, 16)" + ], + "split": "train" + }, + { + "Input": "Open image 'picture.jpg'", + "Output Program": [ + "img = Image.open('picture.jpg')\nimg.show()" + ], + "Output Answer": [ + "img = Image.open('picture.jpg')\nimg.show()" + ], + "split": "train" + }, + { + "Input": "split dataframe `df` where the value of column `a` is equal to 'B'", + "Output Program": [ + "df.groupby((df.a == 'B').shift(1).fillna(0).cumsum())" + ], + "Output Answer": [ + "df.groupby((df.a == 'B').shift(1).fillna(0).cumsum())" + ], + "split": "train" + }, + { + "Input": "Create new list `result` by splitting each item in list `words`", + "Output Program": [ + "result = [item for word in words for item in word.split(',')]" + ], + "Output Answer": [ + "result = [item for word in words for item in word.split(',')]" + ], + "split": "train" + }, + { + "Input": "get logical xor of `a` and `b`", + "Output Program": [ + "(bool(a) != bool(b))", + "(bool(a) ^ bool(b))", + "((a and (not b)) or ((not a) and b))", + "xor(bool(a), bool(b))" + ], + "Output Answer": [ + "(bool(a) != bool(b))", + "(bool(a) ^ bool(b))", + "((a and (not b)) or ((not a) and b))", + "xor(bool(a), bool(b))" + ], + "split": "train" + }, + { + "Input": "read excel file `file_name` using pandas", + "Output Program": [ + "dfs = pd.read_excel(file_name, sheetname=None)" + ], + "Output Answer": [ + "dfs = pd.read_excel(file_name, sheetname=None)" + ], + "split": "train" + }, + { + "Input": "join together with \",\" elements inside a list indexed with 'category' within a dictionary `trans`", + "Output Program": [ + "\"\"\",\"\"\".join(trans['category'])" + ], + "Output Answer": [ + "\"\"\",\"\"\".join(trans['category'])" + ], + "split": "test" + }, + { + "Input": "delete digits at the end of string `s`", + "Output Program": [ + "re.sub('\\\\b\\\\d+\\\\b', '', s)" + ], + "Output Answer": [ + "re.sub('\\\\b\\\\d+\\\\b', '', s)" + ], + "split": "train" + }, + { + "Input": "convert numpy array into python list structure", + "Output Program": [ + "np.array([[1, 2, 3], [4, 5, 6]]).tolist()" + ], + "Output Answer": [ + "np.array([[1, 2, 3], [4, 5, 6]]).tolist()" + ], + "split": "train" + }, + { + "Input": "calculate the md5 checksum of a file named 'filename.exe'", + "Output Program": [ + "hashlib.md5(open('filename.exe', 'rb').read()).hexdigest()" + ], + "Output Answer": [ + "hashlib.md5(open('filename.exe', 'rb').read()).hexdigest()" + ], + "split": "train" + }, + { + "Input": "call a function with argument list `args`", + "Output Program": [ + "func(*args)" + ], + "Output Answer": [ + "func(*args)" + ], + "split": "train" + }, + { + "Input": "read a file 'C:/name/MyDocuments/numbers' into a list `data`", + "Output Program": [ + "data = [line.strip() for line in open('C:/name/MyDocuments/numbers', 'r')]" + ], + "Output Answer": [ + "data = [line.strip() for line in open('C:/name/MyDocuments/numbers', 'r')]" + ], + "split": "test" + }, + { + "Input": "append elements of a set `b` to a list `a`", + "Output Program": [ + "a.extend(b)" + ], + "Output Answer": [ + "a.extend(b)" + ], + "split": "test" + }, + { + "Input": "create list `lst` containing 100 instances of object `Object`", + "Output Program": [ + "lst = [Object() for i in range(100)]" + ], + "Output Answer": [ + "lst = [Object() for i in range(100)]" + ], + "split": "test" + }, + { + "Input": "add a column 'new_col' to dataframe `df` for index in range", + "Output Program": [ + "df['new_col'] = range(1, len(df) + 1)" + ], + "Output Answer": [ + "df['new_col'] = range(1, len(df) + 1)" + ], + "split": "train" + }, + { + "Input": "print a character that has unicode value `\\u25b2`", + "Output Program": [ + "print u'\\u25b2'.encode('utf-8')" + ], + "Output Answer": [ + "print u'\\u25b2'.encode('utf-8')" + ], + "split": "train" + }, + { + "Input": "Execute a sql statement using variables `var1`, `var2` and `var3`", + "Output Program": [ + "cursor.execute('INSERT INTO table VALUES (%s, %s, %s)', (var1, var2, var3))" + ], + "Output Answer": [ + "cursor.execute('INSERT INTO table VALUES (%s, %s, %s)', (var1, var2, var3))" + ], + "split": "train" + }, + { + "Input": "Load the url `http://www.google.com` in selenium webdriver `driver`", + "Output Program": [ + "driver.get('http://www.google.com')" + ], + "Output Answer": [ + "driver.get('http://www.google.com')" + ], + "split": "train" + }, + { + "Input": "calculate ratio of sparsity in a numpy array `a`", + "Output Program": [ + "np.isnan(a).sum() / np.prod(a.shape)" + ], + "Output Answer": [ + "np.isnan(a).sum() / np.prod(a.shape)" + ], + "split": "train" + }, + { + "Input": "Parse a unicode string `M\\\\N{AMPERSAND}M\\\\N{APOSTROPHE}s`", + "Output Program": [ + "u'M\\\\N{AMPERSAND}M\\\\N{APOSTROPHE}s'.decode('unicode-escape')" + ], + "Output Answer": [ + "u'M\\\\N{AMPERSAND}M\\\\N{APOSTROPHE}s'.decode('unicode-escape')" + ], + "split": "train" + }, + { + "Input": "limit float 3.14159 to two decimal points", + "Output Program": [ + "('%.2f' % 3.14159)" + ], + "Output Answer": [ + "('%.2f' % 3.14159)" + ], + "split": "train" + }, + { + "Input": "insert 77 to index 2 of list `x`", + "Output Program": [ + "x.insert(2, 77)" + ], + "Output Answer": [ + "x.insert(2, 77)" + ], + "split": "train" + }, + { + "Input": "convert a unicode 'Andr\\xc3\\xa9' to a string", + "Output Program": [ + "\"\"\"\"\"\".join(chr(ord(c)) for c in u'Andr\\xc3\\xa9').decode('utf8')" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(chr(ord(c)) for c in u'Andr\\xc3\\xa9').decode('utf8')" + ], + "split": "train" + }, + { + "Input": "Convert list of lists `data` into a flat list", + "Output Program": [ + "[y for x in data for y in (x if isinstance(x, list) else [x])]" + ], + "Output Answer": [ + "[y for x in data for y in (x if isinstance(x, list) else [x])]" + ], + "split": "test" + }, + { + "Input": "regex for repeating words in a string `s`", + "Output Program": [ + "re.sub('(?').is_selected()" + ], + "Output Answer": [ + "driver.find_element_by_name('').is_selected()" + ], + "split": "train" + }, + { + "Input": "print script's directory", + "Output Program": [ + "print os.path.dirname(os.path.realpath(__file__))" + ], + "Output Answer": [ + "print os.path.dirname(os.path.realpath(__file__))" + ], + "split": "train" + }, + { + "Input": "get value of the environment variable 'KEY_THAT_MIGHT_EXIST' with default value `default_value`", + "Output Program": [ + "print os.getenv('KEY_THAT_MIGHT_EXIST', default_value)" + ], + "Output Answer": [ + "print os.getenv('KEY_THAT_MIGHT_EXIST', default_value)" + ], + "split": "train" + }, + { + "Input": "substitute multiple whitespace with single whitespace in string `mystring`", + "Output Program": [ + "\"\"\" \"\"\".join(mystring.split())" + ], + "Output Answer": [ + "\"\"\" \"\"\".join(mystring.split())" + ], + "split": "train" + }, + { + "Input": "do a `left` merge of dataframes `x` and `y` on the column `state` and sort by `index`", + "Output Program": [ + "x.reset_index().merge(y, how='left', on='state', sort=False).sort('index')" + ], + "Output Answer": [ + "x.reset_index().merge(y, how='left', on='state', sort=False).sort('index')" + ], + "split": "train" + }, + { + "Input": "get current time", + "Output Program": [ + "datetime.datetime.now().time()", + "datetime.datetime.time(datetime.datetime.now())" + ], + "Output Answer": [ + "datetime.datetime.now().time()", + "datetime.datetime.time(datetime.datetime.now())" + ], + "split": "train" + }, + { + "Input": "get the highest element in absolute value in a numpy matrix `x`", + "Output Program": [ + "max(x.min(), x.max(), key=abs)" + ], + "Output Answer": [ + "max(x.min(), x.max(), key=abs)" + ], + "split": "test" + }, + { + "Input": "get a new string including all but the last character of string `x`", + "Output Program": [ + "x[:(-2)]" + ], + "Output Answer": [ + "x[:(-2)]" + ], + "split": "train" + }, + { + "Input": "MySQL execute query 'SELECT * FROM foo WHERE bar = %s AND baz = %s' with parameters `param1` and `param2`", + "Output Program": [ + "c.execute('SELECT * FROM foo WHERE bar = %s AND baz = %s', (param1, param2))" + ], + "Output Answer": [ + "c.execute('SELECT * FROM foo WHERE bar = %s AND baz = %s', (param1, param2))" + ], + "split": "train" + }, + { + "Input": "change flask security register url to `/create_account`", + "Output Program": [ + "app.config['SECURITY_REGISTER_URL'] = '/create_account'" + ], + "Output Answer": [ + "app.config['SECURITY_REGISTER_URL'] = '/create_account'" + ], + "split": "train" + }, + { + "Input": "remove duplicate dict in list `l`", + "Output Program": [ + "[dict(t) for t in set([tuple(d.items()) for d in l])]" + ], + "Output Answer": [ + "[dict(t) for t in set([tuple(d.items()) for d in l])]" + ], + "split": "train" + }, + { + "Input": "apply itertools.product to elements of a list of lists `arrays`", + "Output Program": [ + "list(itertools.product(*arrays))" + ], + "Output Answer": [ + "list(itertools.product(*arrays))" + ], + "split": "train" + }, + { + "Input": "plot categorical data in series `df` with kind `bar` using pandas and matplotlib", + "Output Program": [ + "df.groupby('colour').size().plot(kind='bar')" + ], + "Output Answer": [ + "df.groupby('colour').size().plot(kind='bar')" + ], + "split": "train" + }, + { + "Input": "throw an error window in python in windows", + "Output Program": [ + "ctypes.windll.user32.MessageBoxW(0, u'Error', u'Error', 0)" + ], + "Output Answer": [ + "ctypes.windll.user32.MessageBoxW(0, u'Error', u'Error', 0)" + ], + "split": "train" + }, + { + "Input": "merge 2 dataframes `df1` and `df2` with same values in a column 'revenue' with and index 'date'", + "Output Program": [ + "df2['revenue'] = df2.CET.map(df1.set_index('date')['revenue'])" + ], + "Output Answer": [ + "df2['revenue'] = df2.CET.map(df1.set_index('date')['revenue'])" + ], + "split": "train" + }, + { + "Input": "extract data field 'bar' from json object", + "Output Program": [ + "json.loads('{\"foo\": 42, \"bar\": \"baz\"}')[u'bar']" + ], + "Output Answer": [ + "json.loads('{\"foo\": 42, \"bar\": \"baz\"}')[u'bar']" + ], + "split": "train" + }, + { + "Input": "iterate over a python dictionary, ordered by values", + "Output Program": [ + "sorted(dictionary.items(), key=lambda x: x[1])" + ], + "Output Answer": [ + "sorted(dictionary.items(), key=lambda x: x[1])" + ], + "split": "train" + }, + { + "Input": "check if all elements in a tuple `(1, 6)` are in another `(1, 2, 3, 4, 5)`", + "Output Program": [ + "all(i in (1, 2, 3, 4, 5) for i in (1, 6))" + ], + "Output Answer": [ + "all(i in (1, 2, 3, 4, 5) for i in (1, 6))" + ], + "split": "train" + }, + { + "Input": "check if a user `user` is in a group from list of groups `['group1', 'group2']`", + "Output Program": [ + "return user.groups.filter(name__in=['group1', 'group2']).exists()" + ], + "Output Answer": [ + "return user.groups.filter(name__in=['group1', 'group2']).exists()" + ], + "split": "train" + }, + { + "Input": "convert pandas index in a dataframe to columns", + "Output Program": [ + "df.reset_index(level=['tick', 'obs'])" + ], + "Output Answer": [ + "df.reset_index(level=['tick', 'obs'])" + ], + "split": "test" + }, + { + "Input": "find rows with non zero values in a subset of columns where `df.dtypes` is not equal to `object` in pandas dataframe", + "Output Program": [ + "df.loc[(df.loc[:, (df.dtypes != object)] != 0).any(1)]" + ], + "Output Answer": [ + "df.loc[(df.loc[:, (df.dtypes != object)] != 0).any(1)]" + ], + "split": "train" + }, + { + "Input": "separate numbers from characters in string \"30m1000n20m\"", + "Output Program": [ + "re.findall('(([0-9]+)([A-Z]))', '20M10000N80M')" + ], + "Output Answer": [ + "re.findall('(([0-9]+)([A-Z]))', '20M10000N80M')" + ], + "split": "train" + }, + { + "Input": "Get a random string of length `length`", + "Output Program": [ + "return ''.join(random.choice(string.lowercase) for i in range(length))" + ], + "Output Answer": [ + "return ''.join(random.choice(string.lowercase) for i in range(length))" + ], + "split": "train" + }, + { + "Input": "Convert string to boolean from defined set of strings", + "Output Program": [ + "s in ['true', '1', 't', 'y', 'yes', 'yeah', 'yup', 'certainly', 'uh-huh']" + ], + "Output Answer": [ + "s in ['true', '1', 't', 'y', 'yes', 'yeah', 'yup', 'certainly', 'uh-huh']" + ], + "split": "train" + }, + { + "Input": "filter rows in pandas starting with alphabet 'f' using regular expression.", + "Output Program": [ + "df.b.str.contains('^f')" + ], + "Output Answer": [ + "df.b.str.contains('^f')" + ], + "split": "test" + }, + { + "Input": "for a dictionary `a`, set default value for key `somekey` as list and append value `bob` in that key", + "Output Program": [ + "a.setdefault('somekey', []).append('bob')" + ], + "Output Answer": [ + "a.setdefault('somekey', []).append('bob')" + ], + "split": "train" + }, + { + "Input": "concatenate array of strings `['A', 'B', 'C', 'D']` into a string", + "Output Program": [ + "\"\"\"\"\"\".join(['A', 'B', 'C', 'D'])" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(['A', 'B', 'C', 'D'])" + ], + "split": "test" + }, + { + "Input": "return list `result` of sum of elements of each list `b` in list of lists `a`", + "Output Program": [ + "result = [sum(b) for b in a]" + ], + "Output Answer": [ + "result = [sum(b) for b in a]" + ], + "split": "train" + }, + { + "Input": "get the maximum of 'salary' and 'bonus' values in a dictionary", + "Output Program": [ + "print max(d, key=lambda x: (d[x]['salary'], d[x]['bonus']))" + ], + "Output Answer": [ + "print max(d, key=lambda x: (d[x]['salary'], d[x]['bonus']))" + ], + "split": "train" + }, + { + "Input": "match urls whose domain doesn't start with `t` from string `document` using regex", + "Output Program": [ + "re.findall('http://[^t][^s\"]+\\\\.html', document)" + ], + "Output Answer": [ + "re.findall('http://[^t][^s\"]+\\\\.html', document)" + ], + "split": "test" + }, + { + "Input": "Get the difference between two lists `[1, 2, 2, 2, 3]` and `[1, 2]` that may have duplicate values", + "Output Program": [ + "Counter([1, 2, 2, 2, 3]) - Counter([1, 2])" + ], + "Output Answer": [ + "Counter([1, 2, 2, 2, 3]) - Counter([1, 2])" + ], + "split": "train" + }, + { + "Input": "split string 'fooxyzbar' based on case-insensitive matching using string 'XYZ'", + "Output Program": [ + "re.compile('XYZ', re.IGNORECASE).split('fooxyzbar')" + ], + "Output Answer": [ + "re.compile('XYZ', re.IGNORECASE).split('fooxyzbar')" + ], + "split": "train" + }, + { + "Input": "sum each element `x` in list `first` with element `y` at the same index in list `second`.", + "Output Program": [ + "[(x + y) for x, y in zip(first, second)]" + ], + "Output Answer": [ + "[(x + y) for x, y in zip(first, second)]" + ], + "split": "train" + }, + { + "Input": "import all classes from module `some.package`", + "Output Program": [ + "globals().update(importlib.import_module('some.package').__dict__)" + ], + "Output Answer": [ + "globals().update(importlib.import_module('some.package').__dict__)" + ], + "split": "train" + }, + { + "Input": "convert 173 to binary string", + "Output Program": [ + "bin(173)" + ], + "Output Answer": [ + "bin(173)" + ], + "split": "train" + }, + { + "Input": "running r script '/pathto/MyrScript.r' from python", + "Output Program": [ + "subprocess.call(['/usr/bin/Rscript', '--vanilla', '/pathto/MyrScript.r'])" + ], + "Output Answer": [ + "subprocess.call(['/usr/bin/Rscript', '--vanilla', '/pathto/MyrScript.r'])" + ], + "split": "test" + }, + { + "Input": "merge a pandas data frame `distancesDF` and column `dates` in pandas data frame `datesDF` into single", + "Output Program": [ + "pd.concat([distancesDF, datesDF.dates], axis=1)" + ], + "Output Answer": [ + "pd.concat([distancesDF, datesDF.dates], axis=1)" + ], + "split": "train" + }, + { + "Input": "sort list `lst` in descending order based on the second item of each tuple in it", + "Output Program": [ + "lst.sort(key=lambda x: x[2], reverse=True)" + ], + "Output Answer": [ + "lst.sort(key=lambda x: x[2], reverse=True)" + ], + "split": "train" + }, + { + "Input": "Get all object attributes of an object", + "Output Program": [ + "dir()" + ], + "Output Answer": [ + "dir()" + ], + "split": "train" + }, + { + "Input": "append to file 'test1' content 'koko'", + "Output Program": [ + "with open('test1', 'ab') as f:\n pass" + ], + "Output Answer": [ + "with open('test1', 'ab') as f:\n pass" + ], + "split": "train" + }, + { + "Input": "Get all indexes of boolean numpy array where boolean value `mask` is True", + "Output Program": [ + "numpy.where(mask)" + ], + "Output Answer": [ + "numpy.where(mask)" + ], + "split": "train" + }, + { + "Input": "iterate items in lists `listone` and `listtwo`", + "Output Program": [ + "for item in itertools.chain(listone, listtwo):\n pass" + ], + "Output Answer": [ + "for item in itertools.chain(listone, listtwo):\n pass" + ], + "split": "train" + }, + { + "Input": "converting byte string `c` in unicode string", + "Output Program": [ + "c.decode('unicode_escape')" + ], + "Output Answer": [ + "c.decode('unicode_escape')" + ], + "split": "train" + }, + { + "Input": "send multipart encoded file `files` to url `url` with headers `headers` and metadata `data`", + "Output Program": [ + "r = requests.post(url, files=files, headers=headers, data=data)" + ], + "Output Answer": [ + "r = requests.post(url, files=files, headers=headers, data=data)" + ], + "split": "test" + }, + { + "Input": "sort a list of lists `s` by second and third element in each list.", + "Output Program": [ + "s.sort(key=operator.itemgetter(1, 2))" + ], + "Output Answer": [ + "s.sort(key=operator.itemgetter(1, 2))" + ], + "split": "train" + }, + { + "Input": "Get a md5 hash from string `thecakeisalie`", + "Output Program": [ + "k = hashlib.md5('thecakeisalie').hexdigest()" + ], + "Output Answer": [ + "k = hashlib.md5('thecakeisalie').hexdigest()" + ], + "split": "train" + }, + { + "Input": "create a django query for a list of values `1, 4, 7`", + "Output Program": [ + "Blog.objects.filter(pk__in=[1, 4, 7])" + ], + "Output Answer": [ + "Blog.objects.filter(pk__in=[1, 4, 7])" + ], + "split": "train" + }, + { + "Input": "remove periods inbetween capital letters that aren't immediately preceeded by word character(s) in a string `s` using regular expressions", + "Output Program": [ + "re.sub('(?ijl', A, B)" + ], + "Output Answer": [ + "np.einsum('ijk,ikl->ijl', A, B)" + ], + "split": "train" + }, + { + "Input": "Concat a list of strings `lst` using string formatting", + "Output Program": [ + "\"\"\"\"\"\".join(lst)" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(lst)" + ], + "split": "train" + }, + { + "Input": "get the number of values in list `j` that is greater than 5", + "Output Program": [ + "sum(((i > 5) for i in j))", + "len([1 for i in j if (i > 5)])" + ], + "Output Answer": [ + "sum(((i > 5) for i in j))", + "len([1 for i in j if (i > 5)])" + ], + "split": "train" + }, + { + "Input": "sort a list `unsorted_list` based on another sorted list `presorted_list`", + "Output Program": [ + "sorted(unsorted_list, key=presorted_list.index)" + ], + "Output Answer": [ + "sorted(unsorted_list, key=presorted_list.index)" + ], + "split": "train" + }, + { + "Input": "get rows of dataframe `df` where column `Col1` has values `['men', 'rocks', 'mountains']`", + "Output Program": [ + "df[df.Col1.isin(['men', 'rocks', 'mountains'])]" + ], + "Output Answer": [ + "df[df.Col1.isin(['men', 'rocks', 'mountains'])]" + ], + "split": "train" + }, + { + "Input": "Check if a given key `key` exists in dictionary `d`", + "Output Program": [ + "if (key in d):\n pass" + ], + "Output Answer": [ + "if (key in d):\n pass" + ], + "split": "train" + }, + { + "Input": "summing the second item in a list of lists of lists", + "Output Program": [ + "[sum([x[1] for x in i]) for i in data]" + ], + "Output Answer": [ + "[sum([x[1] for x in i]) for i in data]" + ], + "split": "train" + }, + { + "Input": "clear Tkinter Canvas `canvas`", + "Output Program": [ + "canvas.delete('all')" + ], + "Output Answer": [ + "canvas.delete('all')" + ], + "split": "train" + }, + { + "Input": "convert nested list 'Cards' into a flat list", + "Output Program": [ + "[a for c in Cards for b in c for a in b]" + ], + "Output Answer": [ + "[a for c in Cards for b in c for a in b]" + ], + "split": "train" + }, + { + "Input": "convert binary string '0b0010101010' to integer", + "Output Program": [ + "int('0b0010101010', 2)" + ], + "Output Answer": [ + "int('0b0010101010', 2)" + ], + "split": "train" + }, + { + "Input": "Set multi index on columns 'Company' and 'date' of data frame `df` in pandas.", + "Output Program": [ + "df.set_index(['Company', 'date'], inplace=True)" + ], + "Output Answer": [ + "df.set_index(['Company', 'date'], inplace=True)" + ], + "split": "train" + }, + { + "Input": "Find all words containing letters between A and Z in string `formula`", + "Output Program": [ + "re.findall('\\\\b[A-Z]', formula)" + ], + "Output Answer": [ + "re.findall('\\\\b[A-Z]', formula)" + ], + "split": "train" + }, + { + "Input": "make a function `f` that calculates the sum of two integer variables `x` and `y`", + "Output Program": [ + "f = lambda x, y: x + y" + ], + "Output Answer": [ + "f = lambda x, y: x + y" + ], + "split": "train" + }, + { + "Input": "Getting the length of array `s`", + "Output Program": [ + "len(s)" + ], + "Output Answer": [ + "len(s)" + ], + "split": "test" + }, + { + "Input": "check if any item from list `b` is in list `a`", + "Output Program": [ + "print any(x in a for x in b)" + ], + "Output Answer": [ + "print any(x in a for x in b)" + ], + "split": "train" + }, + { + "Input": "Concatenating two one-dimensional NumPy arrays 'a' and 'b'.", + "Output Program": [ + "numpy.concatenate([a, b])" + ], + "Output Answer": [ + "numpy.concatenate([a, b])" + ], + "split": "train" + }, + { + "Input": "write bytes `bytes_` to a file `filename` in python 3", + "Output Program": [ + "open('filename', 'wb').write(bytes_)" + ], + "Output Answer": [ + "open('filename', 'wb').write(bytes_)" + ], + "split": "test" + }, + { + "Input": "Get a list `C` by subtracting values in one list `B` from corresponding values in another list `A`", + "Output Program": [ + "C = [(a - b) for a, b in zip(A, B)]" + ], + "Output Answer": [ + "C = [(a - b) for a, b in zip(A, B)]" + ], + "split": "train" + }, + { + "Input": "Create 2D numpy array from the data provided in 'somefile.csv' with each row in the file having same number of values", + "Output Program": [ + "X = numpy.loadtxt('somefile.csv', delimiter=',')" + ], + "Output Answer": [ + "X = numpy.loadtxt('somefile.csv', delimiter=',')" + ], + "split": "train" + }, + { + "Input": "Execute a post request to url `http://httpbin.org/post` with json data `{'test': 'cheers'}`", + "Output Program": [ + "requests.post('http://httpbin.org/post', json={'test': 'cheers'})" + ], + "Output Answer": [ + "requests.post('http://httpbin.org/post', json={'test': 'cheers'})" + ], + "split": "train" + }, + { + "Input": "generate a string of numbers separated by comma which is divisible by `4` with remainder `1` or `2`.", + "Output Program": [ + "\"\"\",\"\"\".join(str(i) for i in xrange(100) if i % 4 in (1, 2))" + ], + "Output Answer": [ + "\"\"\",\"\"\".join(str(i) for i in xrange(100) if i % 4 in (1, 2))" + ], + "split": "train" + }, + { + "Input": "check whether file \"/path/to/file\" exists", + "Output Program": [ + "my_file = Path('/path/to/file')\nif my_file.is_file():\n pass" + ], + "Output Answer": [ + "my_file = Path('/path/to/file')\nif my_file.is_file():\n pass" + ], + "split": "train" + }, + { + "Input": "Convert each key,value pair in a dictionary `{'My Key': 'My Value'}` to lowercase", + "Output Program": [ + "dict((k.lower(), v.lower()) for k, v in {'My Key': 'My Value'}.iteritems())" + ], + "Output Answer": [ + "dict((k.lower(), v.lower()) for k, v in {'My Key': 'My Value'}.iteritems())" + ], + "split": "train" + }, + { + "Input": "find all words in a string `mystring` that start with the `$` sign", + "Output Program": [ + "[word for word in mystring.split() if word.startswith('$')]" + ], + "Output Answer": [ + "[word for word in mystring.split() if word.startswith('$')]" + ], + "split": "test" + }, + { + "Input": "Swap values in a tuple/list in list `mylist`", + "Output Program": [ + "[(t[1], t[0]) for t in mylist]" + ], + "Output Answer": [ + "[(t[1], t[0]) for t in mylist]" + ], + "split": "train" + }, + { + "Input": "sort a python list of dictionaries `users` by a given list `order` of ids 'id' with the desired order", + "Output Program": [ + "users.sort(key=lambda x: order.index(x['id']))" + ], + "Output Answer": [ + "users.sort(key=lambda x: order.index(x['id']))" + ], + "split": "train" + }, + { + "Input": "extract all rows from dataframe `data` where the value of column 'Value' is True", + "Output Program": [ + "data[data['Value'] == True]" + ], + "Output Answer": [ + "data[data['Value'] == True]" + ], + "split": "train" + }, + { + "Input": "numpy concatenate two arrays `a` and `b` along the second axis", + "Output Program": [ + "print concatenate((a, b), axis=1)" + ], + "Output Answer": [ + "print concatenate((a, b), axis=1)" + ], + "split": "test" + }, + { + "Input": "sort a list of dictionary `persons` according to the key `['passport']['birth_info']['date']`", + "Output Program": [ + "sorted(persons, key=lambda x: x['passport']['birth_info']['date'])" + ], + "Output Answer": [ + "sorted(persons, key=lambda x: x['passport']['birth_info']['date'])" + ], + "split": "train" + }, + { + "Input": "print \"Please enter something: \" to console, and read user input to `var`", + "Output Program": [ + "var = raw_input('Please enter something: ')" + ], + "Output Answer": [ + "var = raw_input('Please enter something: ')" + ], + "split": "train" + }, + { + "Input": "remove a substring `suffix` from the end of string `text`", + "Output Program": [ + "if (not text.endswith(suffix)):\n return text\nreturn text[:(len(text) - len(suffix))]" + ], + "Output Answer": [ + "if (not text.endswith(suffix)):\n return text\nreturn text[:(len(text) - len(suffix))]" + ], + "split": "train" + }, + { + "Input": "access an arbitrary value from dictionary `dict`", + "Output Program": [ + "next(iter(dict.values()))" + ], + "Output Answer": [ + "next(iter(dict.values()))" + ], + "split": "train" + }, + { + "Input": "split a string `s` into integers", + "Output Program": [ + "l = (int(x) for x in s.split())" + ], + "Output Answer": [ + "l = (int(x) for x in s.split())" + ], + "split": "train" + }, + { + "Input": "sort list `list_of_strings` based on second index of each string `s`", + "Output Program": [ + "sorted(list_of_strings, key=lambda s: s.split(',')[1])" + ], + "Output Answer": [ + "sorted(list_of_strings, key=lambda s: s.split(',')[1])" + ], + "split": "test" + }, + { + "Input": "get a list each value `i` in the implicit tuple `range(3)`", + "Output Program": [ + "list(i for i in range(3))" + ], + "Output Answer": [ + "list(i for i in range(3))" + ], + "split": "train" + }, + { + "Input": "round number 1.005 up to 2 decimal places", + "Output Program": [ + "round(1.005, 2)" + ], + "Output Answer": [ + "round(1.005, 2)" + ], + "split": "train" + }, + { + "Input": "add key \"item3\" and value \"3\" to dictionary `default_data `", + "Output Program": [ + "default_data['item3'] = 3", + "default_data.update({'item3': 3, })" + ], + "Output Answer": [ + "default_data['item3'] = 3", + "default_data.update({'item3': 3, })" + ], + "split": "train" + }, + { + "Input": "get the size of object `items`", + "Output Program": [ + "items.__len__()" + ], + "Output Answer": [ + "items.__len__()" + ], + "split": "train" + }, + { + "Input": "sum each value in a list `l` of tuples", + "Output Program": [ + "map(sum, zip(*l))" + ], + "Output Answer": [ + "map(sum, zip(*l))" + ], + "split": "train" + }, + { + "Input": "find all the values in attribute `value` for the tags whose `type` attribute is `submit` in selenium", + "Output Program": [ + "browser.find_elements_by_xpath(\"//*[@type='submit']\").get_attribute('value')" + ], + "Output Answer": [ + "browser.find_elements_by_xpath(\"//*[@type='submit']\").get_attribute('value')" + ], + "split": "train" + }, + { + "Input": "add a path `/path/to/2014_07_13_test` to system path", + "Output Program": [ + "sys.path.append('/path/to/2014_07_13_test')" + ], + "Output Answer": [ + "sys.path.append('/path/to/2014_07_13_test')" + ], + "split": "train" + }, + { + "Input": "convert list `l` to dictionary having each two adjacent elements as key/value pair", + "Output Program": [ + "dict(zip(l[::2], l[1::2]))" + ], + "Output Answer": [ + "dict(zip(l[::2], l[1::2]))" + ], + "split": "train" + }, + { + "Input": "add one to the hidden web element with id 'XYZ' with selenium python script", + "Output Program": [ + "browser.execute_script(\"document.getElementById('XYZ').value+='1'\")" + ], + "Output Answer": [ + "browser.execute_script(\"document.getElementById('XYZ').value+='1'\")" + ], + "split": "test" + }, + { + "Input": "set color marker styles `--bo` in matplotlib", + "Output Program": [ + "plt.plot(range(10), '--bo')" + ], + "Output Answer": [ + "plt.plot(range(10), '--bo')" + ], + "split": "train" + }, + { + "Input": "Trimming a string \" Hello \"", + "Output Program": [ + "' Hello '.strip()" + ], + "Output Answer": [ + "' Hello '.strip()" + ], + "split": "train" + }, + { + "Input": "flush output of python print", + "Output Program": [ + "sys.stdout.flush()" + ], + "Output Answer": [ + "sys.stdout.flush()" + ], + "split": "train" + }, + { + "Input": "insert ' ' between every three digit before '.' and replace ',' with '.' in 12345678.46", + "Output Program": [ + "format(12345678.46, ',').replace(',', ' ').replace('.', ',')" + ], + "Output Answer": [ + "format(12345678.46, ',').replace(',', ' ').replace('.', ',')" + ], + "split": "train" + }, + { + "Input": "given list `to_reverse`, reverse the all sublists and the list itself", + "Output Program": [ + "[sublist[::-1] for sublist in to_reverse[::-1]]" + ], + "Output Answer": [ + "[sublist[::-1] for sublist in to_reverse[::-1]]" + ], + "split": "train" + }, + { + "Input": "split string 'Words, words, words.' on punctuation", + "Output Program": [ + "re.split('\\\\W+', 'Words, words, words.')" + ], + "Output Answer": [ + "re.split('\\\\W+', 'Words, words, words.')" + ], + "split": "train" + }, + { + "Input": "split a string `42 0` by white spaces.", + "Output Program": [ + "\"\"\"42 0\"\"\".split()" + ], + "Output Answer": [ + "\"\"\"42 0\"\"\".split()" + ], + "split": "train" + }, + { + "Input": "calculate the date six months from the current date", + "Output Program": [ + "print (datetime.date.today() + datetime.timedelta(((6 * 365) / 12))).isoformat()" + ], + "Output Answer": [ + "print (datetime.date.today() + datetime.timedelta(((6 * 365) / 12))).isoformat()" + ], + "split": "train" + }, + { + "Input": "return dataframe `df` with last row dropped", + "Output Program": [ + "df.ix[:-1]" + ], + "Output Answer": [ + "df.ix[:-1]" + ], + "split": "train" + }, + { + "Input": "encode string 'data to be encoded'", + "Output Program": [ + "encoded = base64.b64encode('data to be encoded')" + ], + "Output Answer": [ + "encoded = base64.b64encode('data to be encoded')" + ], + "split": "test" + }, + { + "Input": "convert string of bytes `y\\xcc\\xa6\\xbb` into an int", + "Output Program": [ + "struct.unpack(' 0" + ], + "Output Answer": [ + "len(set(list1).intersection(list2)) > 0" + ], + "split": "train" + }, + { + "Input": "sort a list of objects 'somelist' where the object has member number variable `resultType`", + "Output Program": [ + "somelist.sort(key=lambda x: x.resultType)" + ], + "Output Answer": [ + "somelist.sort(key=lambda x: x.resultType)" + ], + "split": "train" + }, + { + "Input": "Encode each value to 'UTF8' in the list `EmployeeList`", + "Output Program": [ + "[x.encode('UTF8') for x in EmployeeList]" + ], + "Output Answer": [ + "[x.encode('UTF8') for x in EmployeeList]" + ], + "split": "train" + }, + { + "Input": "control the keyboard and mouse with dogtail in linux", + "Output Program": [ + "dogtail.rawinput.click(100, 100)" + ], + "Output Answer": [ + "dogtail.rawinput.click(100, 100)" + ], + "split": "train" + }, + { + "Input": "clear text from textarea 'foo' with selenium", + "Output Program": [ + "driver.find_element_by_id('foo').clear()" + ], + "Output Answer": [ + "driver.find_element_by_id('foo').clear()" + ], + "split": "train" + }, + { + "Input": "get filename without extension from file `filename`", + "Output Program": [ + "os.path.splitext(filename)[0]" + ], + "Output Answer": [ + "os.path.splitext(filename)[0]" + ], + "split": "test" + }, + { + "Input": "encode `u'X\\xc3\\xbcY\\xc3\\x9f'` as unicode and decode with utf-8", + "Output Program": [ + "u'X\\xc3\\xbcY\\xc3\\x9f'.encode('raw_unicode_escape').decode('utf-8')" + ], + "Output Answer": [ + "u'X\\xc3\\xbcY\\xc3\\x9f'.encode('raw_unicode_escape').decode('utf-8')" + ], + "split": "train" + }, + { + "Input": "Convert a string of numbers `example_string` separated by `,` into a list of integers", + "Output Program": [ + "map(int, example_string.split(','))" + ], + "Output Answer": [ + "map(int, example_string.split(','))" + ], + "split": "train" + }, + { + "Input": "Fit Kmeans function to a one-dimensional array `x` by reshaping it to be a multidimensional array of single values", + "Output Program": [ + "km.fit(x.reshape(-1, 1))" + ], + "Output Answer": [ + "km.fit(x.reshape(-1, 1))" + ], + "split": "train" + }, + { + "Input": "find the index of sub string 'a' in string `str`", + "Output Program": [ + "str.find('a')" + ], + "Output Answer": [ + "str.find('a')" + ], + "split": "train" + }, + { + "Input": "get a list of items from the list `some_list` that contain string 'abc'", + "Output Program": [ + "matching = [s for s in some_list if 'abc' in s]" + ], + "Output Answer": [ + "matching = [s for s in some_list if 'abc' in s]" + ], + "split": "train" + }, + { + "Input": "find all the elements that consists value '1' in a list of tuples 'a'", + "Output Program": [ + "[item for item in a if 1 in item]" + ], + "Output Answer": [ + "[item for item in a if 1 in item]" + ], + "split": "train" + }, + { + "Input": "generate a list of consecutive integers from 0 to 8", + "Output Program": [ + "list(range(9))" + ], + "Output Answer": [ + "list(range(9))" + ], + "split": "train" + }, + { + "Input": "compare two lists in python `a` and `b` and return matches", + "Output Program": [ + "set(a).intersection(b)" + ], + "Output Answer": [ + "set(a).intersection(b)" + ], + "split": "train" + }, + { + "Input": "get the last part of a string before the character '-'", + "Output Program": [ + "print x.rsplit('-', 1)[0]" + ], + "Output Answer": [ + "print x.rsplit('-', 1)[0]" + ], + "split": "test" + }, + { + "Input": "sort numpy float array `A` column by column", + "Output Program": [ + "A = np.array(sorted(A, key=tuple))" + ], + "Output Answer": [ + "A = np.array(sorted(A, key=tuple))" + ], + "split": "train" + }, + { + "Input": "declare an array", + "Output Program": [ + "my_list = []" + ], + "Output Answer": [ + "my_list = []" + ], + "split": "test" + }, + { + "Input": "generate a random number in 1 to 7 with a given distribution [0.1, 0.05, 0.05, 0.2, 0.4, 0.2]", + "Output Program": [ + "numpy.random.choice(numpy.arange(1, 7), p=[0.1, 0.05, 0.05, 0.2, 0.4, 0.2])" + ], + "Output Answer": [ + "numpy.random.choice(numpy.arange(1, 7), p=[0.1, 0.05, 0.05, 0.2, 0.4, 0.2])" + ], + "split": "train" + }, + { + "Input": "find the count of a word 'Hello' in a string `input_string`", + "Output Program": [ + "input_string.count('Hello')" + ], + "Output Answer": [ + "input_string.count('Hello')" + ], + "split": "train" + }, + { + "Input": "Convert hex string \"deadbeef\" to integer", + "Output Program": [ + "int('deadbeef', 16)" + ], + "Output Answer": [ + "int('deadbeef', 16)" + ], + "split": "train" + }, + { + "Input": "get a list of all integer points in a `dim` dimensional hypercube with coordinates from `-x` to `y` for all dimensions", + "Output Program": [ + "list(itertools.product(range(-x, y), repeat=dim))" + ], + "Output Answer": [ + "list(itertools.product(range(-x, y), repeat=dim))" + ], + "split": "train" + }, + { + "Input": "find indexes of all occurrences of a substring `tt` in a string `ttt`", + "Output Program": [ + "[m.start() for m in re.finditer('(?=tt)', 'ttt')]" + ], + "Output Answer": [ + "[m.start() for m in re.finditer('(?=tt)', 'ttt')]" + ], + "split": "train" + }, + { + "Input": "remove symbols from a string `s`", + "Output Program": [ + "re.sub('[^\\\\w]', ' ', s)" + ], + "Output Answer": [ + "re.sub('[^\\\\w]', ' ', s)" + ], + "split": "test" + }, + { + "Input": "Reverse a string `a_string`", + "Output Program": [ + "def reversed_string(a_string):\n return a_string[::(-1)]", + "a_string[::(-1)]" + ], + "Output Answer": [ + "def reversed_string(a_string):\n return a_string[::(-1)]", + "a_string[::(-1)]" + ], + "split": "train" + }, + { + "Input": "add a column 'day' with value 'sat' to dataframe `df`", + "Output Program": [ + "df.xs('sat', level='day', drop_level=False)" + ], + "Output Answer": [ + "df.xs('sat', level='day', drop_level=False)" + ], + "split": "test" + }, + { + "Input": "find the index of a list with the first element equal to '332' within the list of lists `thelist`", + "Output Program": [ + "[index for index, item in enumerate(thelist) if item[0] == '332']" + ], + "Output Answer": [ + "[index for index, item in enumerate(thelist) if item[0] == '332']" + ], + "split": "test" + }, + { + "Input": "Update datetime field in `MyModel` to be the existing `timestamp` plus 100 years", + "Output Program": [ + "MyModel.objects.update(timestamp=F('timestamp') + timedelta(days=36524.25))" + ], + "Output Answer": [ + "MyModel.objects.update(timestamp=F('timestamp') + timedelta(days=36524.25))" + ], + "split": "test" + }, + { + "Input": "remove item `c` in list `a`", + "Output Program": [ + "a.remove(c)" + ], + "Output Answer": [ + "a.remove(c)" + ], + "split": "train" + }, + { + "Input": "download \"http://randomsite.com/file.gz\" from http and save as \"file.gz\"", + "Output Program": [ + "testfile = urllib.URLopener()\ntestfile.retrieve('http://randomsite.com/file.gz', 'file.gz')" + ], + "Output Answer": [ + "testfile = urllib.URLopener()\ntestfile.retrieve('http://randomsite.com/file.gz', 'file.gz')" + ], + "split": "train" + }, + { + "Input": "count the number of rows with missing values in a pandas dataframe `df`", + "Output Program": [ + "sum(df.apply(lambda x: sum(x.isnull().values), axis=1) > 0)" + ], + "Output Answer": [ + "sum(df.apply(lambda x: sum(x.isnull().values), axis=1) > 0)" + ], + "split": "train" + }, + { + "Input": "change the state of the Tkinter `Text` widget to read only i.e. `disabled`", + "Output Program": [ + "text.config(state=DISABLED)" + ], + "Output Answer": [ + "text.config(state=DISABLED)" + ], + "split": "train" + }, + { + "Input": "Remove all strings from a list a strings `sents` where the values starts with `@$\\t` or `#`", + "Output Program": [ + "[x for x in sents if not x.startswith('@$\\t') and not x.startswith('#')]" + ], + "Output Answer": [ + "[x for x in sents if not x.startswith('@$\\t') and not x.startswith('#')]" + ], + "split": "test" + }, + { + "Input": "get creation time of file `file`", + "Output Program": [ + "time.ctime(os.path.getctime(file))" + ], + "Output Answer": [ + "time.ctime(os.path.getctime(file))" + ], + "split": "train" + }, + { + "Input": "read an excel file 'ComponentReport-DJI.xls'", + "Output Program": [ + "open('ComponentReport-DJI.xls', 'rb').read(200)" + ], + "Output Answer": [ + "open('ComponentReport-DJI.xls', 'rb').read(200)" + ], + "split": "train" + }, + { + "Input": "replace repeated instances of \"*\" with a single instance of \"*\"", + "Output Program": [ + "re.sub('\\\\*+', '*', text)" + ], + "Output Answer": [ + "re.sub('\\\\*+', '*', text)" + ], + "split": "train" + }, + { + "Input": "Calling an external command \"some_command < input_file | another_command > output_file\"", + "Output Program": [ + "os.system('some_command < input_file | another_command > output_file')" + ], + "Output Answer": [ + "os.system('some_command < input_file | another_command > output_file')" + ], + "split": "train" + }, + { + "Input": "get index of character 'b' in list '['a', 'b']'", + "Output Program": [ + "['a', 'b'].index('b')" + ], + "Output Answer": [ + "['a', 'b'].index('b')" + ], + "split": "train" + }, + { + "Input": "Convert list of booleans `walls` into a hex string", + "Output Program": [ + "hex(int(''.join([str(int(b)) for b in walls]), 2))" + ], + "Output Answer": [ + "hex(int(''.join([str(int(b)) for b in walls]), 2))" + ], + "split": "train" + }, + { + "Input": "get the html from the current web page of a Selenium driver", + "Output Program": [ + "driver.execute_script('return document.documentElement.outerHTML;')" + ], + "Output Answer": [ + "driver.execute_script('return document.documentElement.outerHTML;')" + ], + "split": "test" + }, + { + "Input": "convert a list 'a' to a dictionary where each even element represents the key to the dictionary, and the following odd element is the value", + "Output Program": [ + "b = {a[i]: a[i + 1] for i in range(0, len(a), 2)}" + ], + "Output Answer": [ + "b = {a[i]: a[i + 1] for i in range(0, len(a), 2)}" + ], + "split": "train" + }, + { + "Input": "find the euclidean distance between two 3-d arrays `A` and `B`", + "Output Program": [ + "np.sqrt(((A - B) ** 2).sum(-1))" + ], + "Output Answer": [ + "np.sqrt(((A - B) ** 2).sum(-1))" + ], + "split": "train" + }, + { + "Input": "check python version", + "Output Program": [ + "sys.version_info", + "sys.version" + ], + "Output Answer": [ + "sys.version_info", + "sys.version" + ], + "split": "train" + }, + { + "Input": "download file from http url \"http://randomsite.com/file.gz\" and save as \"file.gz\"", + "Output Program": [ + "urllib.urlretrieve('http://randomsite.com/file.gz', 'file.gz')" + ], + "Output Answer": [ + "urllib.urlretrieve('http://randomsite.com/file.gz', 'file.gz')" + ], + "split": "train" + }, + { + "Input": "get the first element of each tuple in a list `rows`", + "Output Program": [ + "[x[0] for x in rows]" + ], + "Output Answer": [ + "[x[0] for x in rows]" + ], + "split": "train" + }, + { + "Input": "check characters of string `string` are true predication of function `predicate`", + "Output Program": [ + "all(predicate(x) for x in string)" + ], + "Output Answer": [ + "all(predicate(x) for x in string)" + ], + "split": "test" + }, + { + "Input": "create a list by appending components from list `a` and reversed list `b` interchangeably", + "Output Program": [ + "[value for pair in zip(a, b[::-1]) for value in pair]" + ], + "Output Answer": [ + "[value for pair in zip(a, b[::-1]) for value in pair]" + ], + "split": "train" + }, + { + "Input": "create a list of tuples which contains number 9 and the number before it, for each occurrence of 9 in the list 'myList'", + "Output Program": [ + "[(x, y) for x, y in zip(myList, myList[1:]) if y == 9]" + ], + "Output Answer": [ + "[(x, y) for x, y in zip(myList, myList[1:]) if y == 9]" + ], + "split": "train" + }, + { + "Input": "get first element of each tuple in list `A`", + "Output Program": [ + "[tup[0] for tup in A]" + ], + "Output Answer": [ + "[tup[0] for tup in A]" + ], + "split": "train" + }, + { + "Input": "Encode a latin character in string `Sopet\\xc3\\xb3n` properly", + "Output Program": [ + "u'Sopet\\xc3\\xb3n'.encode('latin-1').decode('utf-8')" + ], + "Output Answer": [ + "u'Sopet\\xc3\\xb3n'.encode('latin-1').decode('utf-8')" + ], + "split": "test" + }, + { + "Input": "print list of items `myList`", + "Output Program": [ + "print '\\n'.join(str(p) for p in myList)" + ], + "Output Answer": [ + "print '\\n'.join(str(p) for p in myList)" + ], + "split": "train" + }, + { + "Input": "find element `a` that contains string \"TEXT A\" in file `root`", + "Output Program": [ + "e = root.xpath('.//a[contains(text(),\"TEXT A\")]')" + ], + "Output Answer": [ + "e = root.xpath('.//a[contains(text(),\"TEXT A\")]')" + ], + "split": "train" + }, + { + "Input": "call bash command 'tar c my_dir | md5sum' with pipe", + "Output Program": [ + "subprocess.call('tar c my_dir | md5sum', shell=True)" + ], + "Output Answer": [ + "subprocess.call('tar c my_dir | md5sum', shell=True)" + ], + "split": "train" + }, + { + "Input": "Calling an external command \"ls -l\"", + "Output Program": [ + "call(['ls', '-l'])", + "from subprocess import call" + ], + "Output Answer": [ + "call(['ls', '-l'])", + "from subprocess import call" + ], + "split": "train" + }, + { + "Input": "Get all the keys from dictionary `y` whose value is `1`", + "Output Program": [ + "[i for i in y if y[i] == 1]" + ], + "Output Answer": [ + "[i for i in y if y[i] == 1]" + ], + "split": "train" + }, + { + "Input": "Get a list values of a dictionary item `pass_id` from post requests in django", + "Output Program": [ + "request.POST.getlist('pass_id')" + ], + "Output Answer": [ + "request.POST.getlist('pass_id')" + ], + "split": "train" + }, + { + "Input": "decode string \"\\\\x89\\\\n\" into a normal string", + "Output Program": [ + "\"\"\"\\\\x89\\\\n\"\"\".decode('string_escape')" + ], + "Output Answer": [ + "\"\"\"\\\\x89\\\\n\"\"\".decode('string_escape')" + ], + "split": "test" + }, + { + "Input": "Update row values for a column `Season` using vectorized string operation in pandas", + "Output Program": [ + "df['Season'].str.split('-').str[0].astype(int)" + ], + "Output Answer": [ + "df['Season'].str.split('-').str[0].astype(int)" + ], + "split": "train" + }, + { + "Input": "open file `path` with mode 'r'", + "Output Program": [ + "open(path, 'r')" + ], + "Output Answer": [ + "open(path, 'r')" + ], + "split": "test" + }, + { + "Input": "create a NumPy array containing elements of array `A` as pointed to by index in array `B`", + "Output Program": [ + "A[np.arange(A.shape[0])[:, (None)], B]" + ], + "Output Answer": [ + "A[np.arange(A.shape[0])[:, (None)], B]" + ], + "split": "train" + }, + { + "Input": "execute a command `command ` in the terminal from a python script", + "Output Program": [ + "os.system(command)" + ], + "Output Answer": [ + "os.system(command)" + ], + "split": "train" + }, + { + "Input": "import a nested module `c.py` within `b` within `a` with importlib", + "Output Program": [ + "importlib.import_module('.c', 'a.b')" + ], + "Output Answer": [ + "importlib.import_module('.c', 'a.b')" + ], + "split": "train" + }, + { + "Input": "Sort dictionary `u` in ascending order based on second elements of its values", + "Output Program": [ + "sorted(u.items(), key=lambda v: v[1])" + ], + "Output Answer": [ + "sorted(u.items(), key=lambda v: v[1])" + ], + "split": "train" + }, + { + "Input": "Get the indices in array `b` of each element appearing in array `a`", + "Output Program": [ + "np.in1d(b, a).nonzero()[0]" + ], + "Output Answer": [ + "np.in1d(b, a).nonzero()[0]" + ], + "split": "train" + }, + { + "Input": "check if all of the following items in list `['a', 'b']` are in a list `['a', 'b', 'c']`", + "Output Program": [ + "set(['a', 'b']).issubset(['a', 'b', 'c'])" + ], + "Output Answer": [ + "set(['a', 'b']).issubset(['a', 'b', 'c'])" + ], + "split": "train" + }, + { + "Input": "sort a list of dictionary values by 'date' in reverse order", + "Output Program": [ + "list.sort(key=lambda item: item['date'], reverse=True)" + ], + "Output Answer": [ + "list.sort(key=lambda item: item['date'], reverse=True)" + ], + "split": "train" + }, + { + "Input": "run function 'SudsMove' simultaneously", + "Output Program": [ + "threading.Thread(target=SudsMove).start()" + ], + "Output Answer": [ + "threading.Thread(target=SudsMove).start()" + ], + "split": "train" + }, + { + "Input": "get a list of locally installed Python modules", + "Output Program": [ + "help('modules')" + ], + "Output Answer": [ + "help('modules')" + ], + "split": "train" + }, + { + "Input": "sort dictionary `tag_weight` in reverse order by values cast to integers", + "Output Program": [ + "sorted(tag_weight.items(), key=lambda x: int(x[1]), reverse=True)" + ], + "Output Answer": [ + "sorted(tag_weight.items(), key=lambda x: int(x[1]), reverse=True)" + ], + "split": "train" + }, + { + "Input": "convert a string `s` containing a decimal to an integer", + "Output Program": [ + "int(Decimal(s))" + ], + "Output Answer": [ + "int(Decimal(s))" + ], + "split": "train" + }, + { + "Input": "sort a list `l` of dicts by dict value 'title'", + "Output Program": [ + "l.sort(key=lambda x: x['title'])" + ], + "Output Answer": [ + "l.sort(key=lambda x: x['title'])" + ], + "split": "test" + }, + { + "Input": "Get a dictionary from a dictionary `hand` where the values are present", + "Output Program": [ + "dict((k, v) for k, v in hand.iteritems() if v)" + ], + "Output Answer": [ + "dict((k, v) for k, v in hand.iteritems() if v)" + ], + "split": "train" + }, + { + "Input": "Remove anything in parenthesis from string `item` with a regex", + "Output Program": [ + "item = re.sub(' ?\\\\([^)]+\\\\)', '', item)" + ], + "Output Answer": [ + "item = re.sub(' ?\\\\([^)]+\\\\)', '', item)" + ], + "split": "train" + }, + { + "Input": "sort list `the_list` by the length of string followed by alphabetical order", + "Output Program": [ + "the_list.sort(key=lambda item: (-len(item), item))" + ], + "Output Answer": [ + "the_list.sort(key=lambda item: (-len(item), item))" + ], + "split": "train" + }, + { + "Input": "lower a string `text` and remove non-alphanumeric characters aside from space", + "Output Program": [ + "re.sub('[^\\\\sa-zA-Z0-9]', '', text).lower().strip()" + ], + "Output Answer": [ + "re.sub('[^\\\\sa-zA-Z0-9]', '', text).lower().strip()" + ], + "split": "test" + }, + { + "Input": "access value associated with key 'American' of key 'Apple' from dictionary `dict`", + "Output Program": [ + "dict['Apple']['American']" + ], + "Output Answer": [ + "dict['Apple']['American']" + ], + "split": "train" + }, + { + "Input": "Change background color in Tkinter", + "Output Program": [ + "root.configure(background='black')" + ], + "Output Answer": [ + "root.configure(background='black')" + ], + "split": "train" + }, + { + "Input": "get list of keys in dictionary `my_dict` whose values contain values from list `lst`", + "Output Program": [ + "[key for item in lst for key, value in my_dict.items() if item in value]" + ], + "Output Answer": [ + "[key for item in lst for key, value in my_dict.items() if item in value]" + ], + "split": "train" + }, + { + "Input": "make a line plot with errorbars, `ebar`, from data `x, y, err` and set color of the errorbars to `y` (yellow)", + "Output Program": [ + "ebar = plt.errorbar(x, y, yerr=err, ecolor='y')" + ], + "Output Answer": [ + "ebar = plt.errorbar(x, y, yerr=err, ecolor='y')" + ], + "split": "train" + }, + { + "Input": "replace each occurrence of the pattern '(http://\\\\S+|\\\\S*[^\\\\w\\\\s]\\\\S*)' within `a` with ''", + "Output Program": [ + "re.sub('(http://\\\\S+|\\\\S*[^\\\\w\\\\s]\\\\S*)', '', a)" + ], + "Output Answer": [ + "re.sub('(http://\\\\S+|\\\\S*[^\\\\w\\\\s]\\\\S*)', '', a)" + ], + "split": "train" + }, + { + "Input": "return a string from a regex match with pattern '' in string 'line'", + "Output Program": [ + "imtag = re.match('', line).group(0)" + ], + "Output Answer": [ + "imtag = re.match('', line).group(0)" + ], + "split": "train" + }, + { + "Input": "convert double 0.00582811585976 to float", + "Output Program": [ + "struct.unpack('f', struct.pack('f', 0.00582811585976))" + ], + "Output Answer": [ + "struct.unpack('f', struct.pack('f', 0.00582811585976))" + ], + "split": "train" + }, + { + "Input": "remove identical items from list `my_list` and sort it alphabetically", + "Output Program": [ + "sorted(set(my_list))" + ], + "Output Answer": [ + "sorted(set(my_list))" + ], + "split": "train" + }, + { + "Input": "Get all the second values from a list of lists `A`", + "Output Program": [ + "[row[1] for row in A]" + ], + "Output Answer": [ + "[row[1] for row in A]" + ], + "split": "train" + }, + { + "Input": "convert a list `L` of ascii values to a string", + "Output Program": [ + "\"\"\"\"\"\".join(chr(i) for i in L)" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(chr(i) for i in L)" + ], + "split": "train" + }, + { + "Input": "lowercase all keys and values in dictionary `{'My Key': 'My Value'}`", + "Output Program": [ + "dict((k.lower(), v) for k, v in {'My Key': 'My Value'}.iteritems())" + ], + "Output Answer": [ + "dict((k.lower(), v) for k, v in {'My Key': 'My Value'}.iteritems())" + ], + "split": "train" + }, + { + "Input": "find maximum with lookahead = 4 in a list `arr`", + "Output Program": [ + "[max(abs(x) for x in arr[i:i + 4]) for i in range(0, len(arr), 4)]" + ], + "Output Answer": [ + "[max(abs(x) for x in arr[i:i + 4]) for i in range(0, len(arr), 4)]" + ], + "split": "train" + }, + { + "Input": "convert a list of strings `lst` to list of integers", + "Output Program": [ + "[map(int, sublist) for sublist in lst]" + ], + "Output Answer": [ + "[map(int, sublist) for sublist in lst]" + ], + "split": "train" + }, + { + "Input": "find the current directory", + "Output Program": [ + "os.path.realpath(__file__)", + "os.getcwd()" + ], + "Output Answer": [ + "os.path.realpath(__file__)", + "os.getcwd()" + ], + "split": "train" + }, + { + "Input": "Find indices of elements equal to zero from numpy array `x`", + "Output Program": [ + "numpy.where((x == 0))[0]" + ], + "Output Answer": [ + "numpy.where((x == 0))[0]" + ], + "split": "train" + }, + { + "Input": "sort list of date strings 'd'", + "Output Program": [ + "sorted(d, key=lambda x: datetime.datetime.strptime(x, '%m-%Y'))" + ], + "Output Answer": [ + "sorted(d, key=lambda x: datetime.datetime.strptime(x, '%m-%Y'))" + ], + "split": "train" + }, + { + "Input": "Use a regex to get all text in a string `example_str` that is not surrounded by square brackets", + "Output Program": [ + "re.findall('(.*?)(?:\\\\[.*?\\\\]|$)', example_str)" + ], + "Output Answer": [ + "re.findall('(.*?)(?:\\\\[.*?\\\\]|$)', example_str)" + ], + "split": "test" + }, + { + "Input": "get the position of item `element` in list `testlist`", + "Output Program": [ + "try:\n print testlist.index(element)\nexcept ValueError:\n pass", + "print testlist.index(element)" + ], + "Output Answer": [ + "try:\n print testlist.index(element)\nexcept ValueError:\n pass", + "print testlist.index(element)" + ], + "split": "test" + }, + { + "Input": "find the minimum value in a numpy array `arr` excluding 0", + "Output Program": [ + "arr[arr != 0].min()" + ], + "Output Answer": [ + "arr[arr != 0].min()" + ], + "split": "train" + }, + { + "Input": "get a list of the row names from index of a pandas data frame", + "Output Program": [ + "list(df.index)" + ], + "Output Answer": [ + "list(df.index)" + ], + "split": "train" + }, + { + "Input": "get the number of values in list `j` that is greater than `i`", + "Output Program": [ + "j = np.array(j)\nsum((j > i))" + ], + "Output Answer": [ + "j = np.array(j)\nsum((j > i))" + ], + "split": "train" + }, + { + "Input": "print bold text 'Hello'", + "Output Program": [ + "print '\\x1b[1m' + 'Hello'" + ], + "Output Answer": [ + "print '\\x1b[1m' + 'Hello'" + ], + "split": "train" + }, + { + "Input": "Insert a character `-` after every two elements in a string `s`", + "Output Program": [ + "\"\"\"-\"\"\".join(a + b for a, b in zip(s[::2], s[1::2]))" + ], + "Output Answer": [ + "\"\"\"-\"\"\".join(a + b for a, b in zip(s[::2], s[1::2]))" + ], + "split": "train" + }, + { + "Input": "split elements of a list `l` by '\\t'", + "Output Program": [ + "[i.partition('\\t')[-1] for i in l if '\\t' in i]" + ], + "Output Answer": [ + "[i.partition('\\t')[-1] for i in l if '\\t' in i]" + ], + "split": "train" + }, + { + "Input": "reverse all x-axis points in pyplot", + "Output Program": [ + "plt.gca().invert_xaxis()" + ], + "Output Answer": [ + "plt.gca().invert_xaxis()" + ], + "split": "train" + }, + { + "Input": "shuffle columns of an numpy array 'r'", + "Output Program": [ + "np.random.shuffle(np.transpose(r))" + ], + "Output Answer": [ + "np.random.shuffle(np.transpose(r))" + ], + "split": "test" + }, + { + "Input": "Get the value with the maximum length in each column in array `foo`", + "Output Program": [ + "[max(len(str(x)) for x in line) for line in zip(*foo)]" + ], + "Output Answer": [ + "[max(len(str(x)) for x in line) for line in zip(*foo)]" + ], + "split": "train" + }, + { + "Input": "copy a file from `src` to `dst`", + "Output Program": [ + "copyfile(src, dst)" + ], + "Output Answer": [ + "copyfile(src, dst)" + ], + "split": "train" + }, + { + "Input": "convert pandas group by object to multi-indexed dataframe with indices 'Name' and 'Destination'", + "Output Program": [ + "df.set_index(['Name', 'Destination'])" + ], + "Output Answer": [ + "df.set_index(['Name', 'Destination'])" + ], + "split": "train" + }, + { + "Input": "get the last element in list `astr`", + "Output Program": [ + "astr[(-1)]" + ], + "Output Answer": [ + "astr[(-1)]" + ], + "split": "train" + }, + { + "Input": "reverse list `yourdata`", + "Output Program": [ + "sorted(yourdata, reverse=True)" + ], + "Output Answer": [ + "sorted(yourdata, reverse=True)" + ], + "split": "train" + }, + { + "Input": "declare an array `variable`", + "Output Program": [ + "variable = []" + ], + "Output Answer": [ + "variable = []" + ], + "split": "train" + }, + { + "Input": "join elements of each tuple in list `a` into one string", + "Output Program": [ + "[''.join(x) for x in a]" + ], + "Output Answer": [ + "[''.join(x) for x in a]" + ], + "split": "train" + }, + { + "Input": "Convert a binary value '1633837924' to string", + "Output Program": [ + "struct.pack(' 2 and k < 4)" + ], + "Output Answer": [ + "dict((k, v) for k, v in parent_dict.iteritems() if k > 2 and k < 4)" + ], + "split": "train" + }, + { + "Input": "select all rows whose values in a column `column_name` equals a scalar `some_value` in pandas data frame object `df`", + "Output Program": [ + "df.loc[df['column_name'] == some_value]" + ], + "Output Answer": [ + "df.loc[df['column_name'] == some_value]" + ], + "split": "train" + }, + { + "Input": "regex search and split string 'aaa bbb ccc ddd eee fff' by delimiter '(d(d)d)'", + "Output Program": [ + "re.split('(d(d)d)', 'aaa bbb ccc ddd eee fff', 1)" + ], + "Output Answer": [ + "re.split('(d(d)d)', 'aaa bbb ccc ddd eee fff', 1)" + ], + "split": "train" + }, + { + "Input": "Search for string 'blabla' in txt file 'example.txt'", + "Output Program": [ + "f = open('example.txt')\ns = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)\nif (s.find('blabla') != (-1)):\n pass", + "if ('blabla' in open('example.txt').read()):\n pass" + ], + "Output Answer": [ + "f = open('example.txt')\ns = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)\nif (s.find('blabla') != (-1)):\n pass", + "if ('blabla' in open('example.txt').read()):\n pass" + ], + "split": "train" + }, + { + "Input": "convert list `lst` of key, value pairs into a dictionary", + "Output Program": [ + "dict([(e[0], int(e[1])) for e in lst])" + ], + "Output Answer": [ + "dict([(e[0], int(e[1])) for e in lst])" + ], + "split": "train" + }, + { + "Input": "play the wav file 'sound.wav'", + "Output Program": [ + "winsound.PlaySound('sound.wav', winsound.SND_FILENAME)" + ], + "Output Answer": [ + "winsound.PlaySound('sound.wav', winsound.SND_FILENAME)" + ], + "split": "train" + }, + { + "Input": "create a new 2 dimensional array containing two random rows from array `A`", + "Output Program": [ + "A[(np.random.randint(A.shape[0], size=2)), :]" + ], + "Output Answer": [ + "A[(np.random.randint(A.shape[0], size=2)), :]" + ], + "split": "train" + }, + { + "Input": "throw a ValueError with message 'represents a hidden bug, do not catch this'", + "Output Program": [ + "raise ValueError('represents a hidden bug, do not catch this')" + ], + "Output Answer": [ + "raise ValueError('represents a hidden bug, do not catch this')" + ], + "split": "train" + }, + { + "Input": "Parsing webpage 'http://www.google.com/' using BeautifulSoup", + "Output Program": [ + "page = urllib2.urlopen('http://www.google.com/')\nsoup = BeautifulSoup(page)" + ], + "Output Answer": [ + "page = urllib2.urlopen('http://www.google.com/')\nsoup = BeautifulSoup(page)" + ], + "split": "train" + }, + { + "Input": "Django check if an object with criteria `name` equal to 'name' and criteria `title` equal to 'title' exists in model `Entry`", + "Output Program": [ + "Entry.objects.filter(name='name', title='title').exists()" + ], + "Output Answer": [ + "Entry.objects.filter(name='name', title='title').exists()" + ], + "split": "train" + }, + { + "Input": "sending http headers to `client`", + "Output Program": [ + "client.send('HTTP/1.0 200 OK\\r\\n')" + ], + "Output Answer": [ + "client.send('HTTP/1.0 200 OK\\r\\n')" + ], + "split": "test" + }, + { + "Input": "permanently set the current directory to the 'C:/Users/Name/Desktop'", + "Output Program": [ + "os.chdir('C:/Users/Name/Desktop')" + ], + "Output Answer": [ + "os.chdir('C:/Users/Name/Desktop')" + ], + "split": "train" + }, + { + "Input": "Sum numbers in a list 'your_list'", + "Output Program": [ + "sum(your_list)" + ], + "Output Answer": [ + "sum(your_list)" + ], + "split": "train" + }, + { + "Input": "remove newline in string `s` on the left side", + "Output Program": [ + "s.lstrip()" + ], + "Output Answer": [ + "s.lstrip()" + ], + "split": "train" + }, + { + "Input": "convert date string '24052010' to date object in format '%d%m%Y'", + "Output Program": [ + "datetime.datetime.strptime('24052010', '%d%m%Y').date()" + ], + "Output Answer": [ + "datetime.datetime.strptime('24052010', '%d%m%Y').date()" + ], + "split": "train" + }, + { + "Input": "double backslash escape all double quotes in string `s`", + "Output Program": [ + "print s.encode('unicode-escape').replace('\"', '\\\\\"')" + ], + "Output Answer": [ + "print s.encode('unicode-escape').replace('\"', '\\\\\"')" + ], + "split": "test" + }, + { + "Input": "read json `elevations` to pandas dataframe `df`", + "Output Program": [ + "pd.read_json(elevations)" + ], + "Output Answer": [ + "pd.read_json(elevations)" + ], + "split": "train" + }, + { + "Input": "Set the resolution of a monitor as `FULLSCREEN` in pygame", + "Output Program": [ + "pygame.display.set_mode((0, 0), pygame.FULLSCREEN)" + ], + "Output Answer": [ + "pygame.display.set_mode((0, 0), pygame.FULLSCREEN)" + ], + "split": "train" + }, + { + "Input": "convert a column of list in series `s` to dummies", + "Output Program": [ + "pd.get_dummies(s.apply(pd.Series).stack()).sum(level=0)" + ], + "Output Answer": [ + "pd.get_dummies(s.apply(pd.Series).stack()).sum(level=0)" + ], + "split": "train" + }, + { + "Input": "join a list of strings `list` using a space ' '", + "Output Program": [ + "\"\"\" \"\"\".join(list)" + ], + "Output Answer": [ + "\"\"\" \"\"\".join(list)" + ], + "split": "test" + }, + { + "Input": "make a comma-separated string from a list `myList`", + "Output Program": [ + "myList = ','.join(map(str, myList))" + ], + "Output Answer": [ + "myList = ','.join(map(str, myList))" + ], + "split": "test" + }, + { + "Input": "count number of times string 'brown' occurred in string 'The big brown fox is brown'", + "Output Program": [ + "\"\"\"The big brown fox is brown\"\"\".count('brown')" + ], + "Output Answer": [ + "\"\"\"The big brown fox is brown\"\"\".count('brown')" + ], + "split": "test" + }, + { + "Input": "extract dictionary from list of dictionaries based on a key's value.", + "Output Program": [ + "[d for d in a if d['name'] == 'pluto']" + ], + "Output Answer": [ + "[d for d in a if d['name'] == 'pluto']" + ], + "split": "train" + }, + { + "Input": "Replace a separate word 'H3' by 'H1' in a string 'text'", + "Output Program": [ + "re.sub('\\\\bH3\\\\b', 'H1', text)" + ], + "Output Answer": [ + "re.sub('\\\\bH3\\\\b', 'H1', text)" + ], + "split": "test" + }, + { + "Input": "convert date string `s` in format pattern '%d/%m/%Y' into a timestamp", + "Output Program": [ + "time.mktime(datetime.datetime.strptime(s, '%d/%m/%Y').timetuple())" + ], + "Output Answer": [ + "time.mktime(datetime.datetime.strptime(s, '%d/%m/%Y').timetuple())" + ], + "split": "train" + }, + { + "Input": "sort dictionary of lists `myDict` by the third item in each list", + "Output Program": [ + "sorted(myDict.items(), key=lambda e: e[1][2])" + ], + "Output Answer": [ + "sorted(myDict.items(), key=lambda e: e[1][2])" + ], + "split": "train" + }, + { + "Input": "get the path of Python executable under windows", + "Output Program": [ + "os.path.dirname(sys.executable)" + ], + "Output Answer": [ + "os.path.dirname(sys.executable)" + ], + "split": "train" + }, + { + "Input": "convert hex string '0xdeadbeef' to decimal", + "Output Program": [ + "ast.literal_eval('0xdeadbeef')" + ], + "Output Answer": [ + "ast.literal_eval('0xdeadbeef')" + ], + "split": "train" + }, + { + "Input": "Merge column 'word' in dataframe `df2` with column 'word' on dataframe `df1`", + "Output Program": [ + "df1.merge(df2, how='left', on='word')" + ], + "Output Answer": [ + "df1.merge(df2, how='left', on='word')" + ], + "split": "train" + }, + { + "Input": "extract date from a string `monkey 10/01/1980 love banana`", + "Output Program": [ + "dparser.parse('monkey 10/01/1980 love banana', fuzzy=True)" + ], + "Output Answer": [ + "dparser.parse('monkey 10/01/1980 love banana', fuzzy=True)" + ], + "split": "train" + }, + { + "Input": "terminate the script using status value 0", + "Output Program": [ + "sys.exit(0)" + ], + "Output Answer": [ + "sys.exit(0)" + ], + "split": "train" + }, + { + "Input": "find rows of 2d array in 3d numpy array 'arr' if the row has value '[[0, 3], [3, 0]]'", + "Output Program": [ + "np.argwhere(np.all(arr == [[0, 3], [3, 0]], axis=(1, 2)))" + ], + "Output Answer": [ + "np.argwhere(np.all(arr == [[0, 3], [3, 0]], axis=(1, 2)))" + ], + "split": "train" + }, + { + "Input": "split a string `a` with new line character", + "Output Program": [ + "a.split('\\n')[:-1]" + ], + "Output Answer": [ + "a.split('\\n')[:-1]" + ], + "split": "train" + }, + { + "Input": "Parse string '21/11/06 16:30' according to format '%d/%m/%y %H:%M'", + "Output Program": [ + "datetime.strptime('21/11/06 16:30', '%d/%m/%y %H:%M')" + ], + "Output Answer": [ + "datetime.strptime('21/11/06 16:30', '%d/%m/%y %H:%M')" + ], + "split": "train" + }, + { + "Input": "write the data of dataframe `df` into text file `np.txt`", + "Output Program": [ + "np.savetxt('c:\\\\data\\\\np.txt', df.values, fmt='%d')" + ], + "Output Answer": [ + "np.savetxt('c:\\\\data\\\\np.txt', df.values, fmt='%d')" + ], + "split": "test" + }, + { + "Input": "Get value for \"username\" parameter in GET request in Django", + "Output Program": [ + "request.GET.get('username', '')" + ], + "Output Answer": [ + "request.GET.get('username', '')" + ], + "split": "train" + }, + { + "Input": "request page 'https://www.mysite.com/' with credentials of username 'username' and password 'pwd'", + "Output Program": [ + "requests.get('https://www.mysite.com/', auth=('username', 'pwd'))" + ], + "Output Answer": [ + "requests.get('https://www.mysite.com/', auth=('username', 'pwd'))" + ], + "split": "train" + }, + { + "Input": "get each value from a list of lists `a` using itertools", + "Output Program": [ + "print list(itertools.chain.from_iterable(a))" + ], + "Output Answer": [ + "print list(itertools.chain.from_iterable(a))" + ], + "split": "train" + }, + { + "Input": "print the truth value of `a`", + "Output Program": [ + "print bool(a)" + ], + "Output Answer": [ + "print bool(a)" + ], + "split": "train" + }, + { + "Input": "check if a global variable `myVar` exists", + "Output Program": [ + "('myVar' in globals())" + ], + "Output Answer": [ + "('myVar' in globals())" + ], + "split": "train" + }, + { + "Input": "find all digits in string '6,7)' and put them to a list", + "Output Program": [ + "re.findall('\\\\d|\\\\d,\\\\d\\\\)', '6,7)')" + ], + "Output Answer": [ + "re.findall('\\\\d|\\\\d,\\\\d\\\\)', '6,7)')" + ], + "split": "train" + }, + { + "Input": "sum the product of elements of two lists named `a` and `b`", + "Output Program": [ + "sum(x * y for x, y in list(zip(a, b)))" + ], + "Output Answer": [ + "sum(x * y for x, y in list(zip(a, b)))" + ], + "split": "train" + }, + { + "Input": "Filter Django objects by `author` with ids `1` and `2`", + "Output Program": [ + "Book.objects.filter(author__id=1).filter(author__id=2)" + ], + "Output Answer": [ + "Book.objects.filter(author__id=1).filter(author__id=2)" + ], + "split": "train" + }, + { + "Input": "terminate process `p`", + "Output Program": [ + "p.terminate()" + ], + "Output Answer": [ + "p.terminate()" + ], + "split": "train" + }, + { + "Input": "join Numpy array `b` with Numpy array 'a' along axis 0", + "Output Program": [ + "b = np.concatenate((a, a), axis=0)" + ], + "Output Answer": [ + "b = np.concatenate((a, a), axis=0)" + ], + "split": "train" + }, + { + "Input": "get all possible combination of items from 2-dimensional list `a`", + "Output Program": [ + "list(itertools.product(*a))" + ], + "Output Answer": [ + "list(itertools.product(*a))" + ], + "split": "train" + }, + { + "Input": "convert a string into datetime using the format '%Y-%m-%d %H:%M:%S.%f'", + "Output Program": [ + "datetime.datetime.strptime(string_date, '%Y-%m-%d %H:%M:%S.%f')" + ], + "Output Answer": [ + "datetime.datetime.strptime(string_date, '%Y-%m-%d %H:%M:%S.%f')" + ], + "split": "test" + }, + { + "Input": "Convert tuple `level1` to list", + "Output Program": [ + "level1 = map(list, level1)" + ], + "Output Answer": [ + "level1 = map(list, level1)" + ], + "split": "test" + }, + { + "Input": "replace percent-encoded code in request `f` to their single-character equivalent", + "Output Program": [ + "f = urllib.urlopen(url, urllib.unquote(urllib.urlencode(params)))" + ], + "Output Answer": [ + "f = urllib.urlopen(url, urllib.unquote(urllib.urlencode(params)))" + ], + "split": "train" + }, + { + "Input": "get the name of function `func` as a string", + "Output Program": [ + "print func.__name__" + ], + "Output Answer": [ + "print func.__name__" + ], + "split": "train" + }, + { + "Input": "sort a list of dictionary `mylist` by the key `title`", + "Output Program": [ + "mylist.sort(key=lambda x: x['title'])" + ], + "Output Answer": [ + "mylist.sort(key=lambda x: x['title'])" + ], + "split": "test" + }, + { + "Input": "get a list of substrings consisting of the first 5 characters of every string in list `buckets`", + "Output Program": [ + "[s[:5] for s in buckets]" + ], + "Output Answer": [ + "[s[:5] for s in buckets]" + ], + "split": "train" + }, + { + "Input": "Sort a data `a` in descending order based on the `modified` attribute of elements using lambda function", + "Output Program": [ + "a = sorted(a, key=lambda x: x.modified, reverse=True)" + ], + "Output Answer": [ + "a = sorted(a, key=lambda x: x.modified, reverse=True)" + ], + "split": "train" + }, + { + "Input": "Make a scatter plot using unpacked values of list `li`", + "Output Program": [ + "plt.scatter(*zip(*li))" + ], + "Output Answer": [ + "plt.scatter(*zip(*li))" + ], + "split": "train" + }, + { + "Input": "convert strings in list-of-lists `lst` to ints", + "Output Program": [ + "[[int(x) for x in sublist] for sublist in lst]" + ], + "Output Answer": [ + "[[int(x) for x in sublist] for sublist in lst]" + ], + "split": "train" + }, + { + "Input": "Split a string `x` by last occurrence of character `-`", + "Output Program": [ + "print x.rpartition('-')[0]" + ], + "Output Answer": [ + "print x.rpartition('-')[0]" + ], + "split": "test" + }, + { + "Input": "convert list `myintegers` into a unicode string", + "Output Program": [ + "\"\"\"\"\"\".join(chr(i) for i in myintegers)" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(chr(i) for i in myintegers)" + ], + "split": "train" + }, + { + "Input": "convert datetime object `(1970, 1, 1)` to seconds", + "Output Program": [ + "(t - datetime.datetime(1970, 1, 1)).total_seconds()" + ], + "Output Answer": [ + "(t - datetime.datetime(1970, 1, 1)).total_seconds()" + ], + "split": "test" + }, + { + "Input": "check if string `str` is palindrome", + "Output Program": [ + "str(n) == str(n)[::-1]" + ], + "Output Answer": [ + "str(n) == str(n)[::-1]" + ], + "split": "train" + }, + { + "Input": "printing numbers rounding up to third decimal place", + "Output Program": [ + "print '%.3f' % 3.1415" + ], + "Output Answer": [ + "print '%.3f' % 3.1415" + ], + "split": "train" + }, + { + "Input": "Get reverse of list items from list 'b' using extended slicing", + "Output Program": [ + "[x[::-1] for x in b]" + ], + "Output Answer": [ + "[x[::-1] for x in b]" + ], + "split": "test" + }, + { + "Input": "replace value 0 with 'Female' and value 1 with 'Male' in column 'sex' of dataframe `data`", + "Output Program": [ + "data['sex'].replace([0, 1], ['Female', 'Male'], inplace=True)" + ], + "Output Answer": [ + "data['sex'].replace([0, 1], ['Female', 'Male'], inplace=True)" + ], + "split": "train" + }, + { + "Input": "create a symlink directory `D:\\\\testdirLink` for directory `D:\\\\testdir` with unicode support using ctypes library", + "Output Program": [ + "kdll.CreateSymbolicLinkW(u'D:\\\\testdirLink', u'D:\\\\testdir', 1)" + ], + "Output Answer": [ + "kdll.CreateSymbolicLinkW(u'D:\\\\testdirLink', u'D:\\\\testdir', 1)" + ], + "split": "train" + }, + { + "Input": "match the pattern '[:;][)(](?![)(])' to the string `str`", + "Output Program": [ + "re.match('[:;][)(](?![)(])', str)" + ], + "Output Answer": [ + "re.match('[:;][)(](?![)(])', str)" + ], + "split": "train" + }, + { + "Input": "Flask get posted form data 'firstname'", + "Output Program": [ + "first_name = request.form.get('firstname')" + ], + "Output Answer": [ + "first_name = request.form.get('firstname')" + ], + "split": "train" + }, + { + "Input": "start a new thread for `myfunction` with parameters 'MyStringHere' and 1", + "Output Program": [ + "thread.start_new_thread(myfunction, ('MyStringHere', 1))" + ], + "Output Answer": [ + "thread.start_new_thread(myfunction, ('MyStringHere', 1))" + ], + "split": "train" + }, + { + "Input": "get dictionary with max value of key 'size' in list of dicts `ld`", + "Output Program": [ + "max(ld, key=lambda d: d['size'])" + ], + "Output Answer": [ + "max(ld, key=lambda d: d['size'])" + ], + "split": "train" + }, + { + "Input": "Creating an empty list", + "Output Program": [ + "list()", + "[]" + ], + "Output Answer": [ + "list()", + "[]" + ], + "split": "train" + }, + { + "Input": "Subtract the mean of each row in dataframe `df` from the corresponding row's elements", + "Output Program": [ + "df.sub(df.mean(axis=1), axis=0)" + ], + "Output Answer": [ + "df.sub(df.mean(axis=1), axis=0)" + ], + "split": "train" + }, + { + "Input": "remove all words which contains number from a string `words` using regex", + "Output Program": [ + "re.sub('\\\\w*\\\\d\\\\w*', '', words).strip()" + ], + "Output Answer": [ + "re.sub('\\\\w*\\\\d\\\\w*', '', words).strip()" + ], + "split": "train" + }, + { + "Input": "get the largest key in a dictionary `x` with non-zero value", + "Output Program": [ + "max(k for k, v in x.iteritems() if v != 0)" + ], + "Output Answer": [ + "max(k for k, v in x.iteritems() if v != 0)" + ], + "split": "test" + }, + { + "Input": "Return values for column `C` after group by on column `A` and `B` in dataframe `df`", + "Output Program": [ + "df.groupby(['A', 'B'])['C'].unique()" + ], + "Output Answer": [ + "df.groupby(['A', 'B'])['C'].unique()" + ], + "split": "train" + }, + { + "Input": "execute script 'script.ps1' using 'powershell.exe' shell", + "Output Program": [ + "os.system('powershell.exe', 'script.ps1')" + ], + "Output Answer": [ + "os.system('powershell.exe', 'script.ps1')" + ], + "split": "test" + }, + { + "Input": "a sequence of empty lists of length `n`", + "Output Program": [ + "[[] for _ in range(n)]" + ], + "Output Answer": [ + "[[] for _ in range(n)]" + ], + "split": "train" + }, + { + "Input": "convert a string `a` of letters embedded in squared brackets into embedded lists", + "Output Program": [ + "[i.split() for i in re.findall('\\\\[([^\\\\[\\\\]]+)\\\\]', a)]" + ], + "Output Answer": [ + "[i.split() for i in re.findall('\\\\[([^\\\\[\\\\]]+)\\\\]', a)]" + ], + "split": "train" + }, + { + "Input": "run python script 'script2.py' from another python script, passing in 1 as an argument", + "Output Program": [ + "os.system('script2.py 1')" + ], + "Output Answer": [ + "os.system('script2.py 1')" + ], + "split": "train" + }, + { + "Input": "Return a subplot axes positioned by the grid definition `1,1,1` using matpotlib", + "Output Program": [ + "fig.add_subplot(1, 1, 1)" + ], + "Output Answer": [ + "fig.add_subplot(1, 1, 1)" + ], + "split": "train" + }, + { + "Input": "select a substring of `s` beginning at `beginning` of length `LENGTH`", + "Output Program": [ + "s = s[beginning:(beginning + LENGTH)]" + ], + "Output Answer": [ + "s = s[beginning:(beginning + LENGTH)]" + ], + "split": "train" + }, + { + "Input": "append dict `{'f': var6, 'g': var7, 'h': var8}` to value of key `e` in dict `jsobj['a']['b']`", + "Output Program": [ + "jsobj['a']['b']['e'].append({'f': var6, 'g': var7, 'h': var8})" + ], + "Output Answer": [ + "jsobj['a']['b']['e'].append({'f': var6, 'g': var7, 'h': var8})" + ], + "split": "train" + }, + { + "Input": "write a tuple of tuples `A` to a csv file using python", + "Output Program": [ + "writer.writerow(A)" + ], + "Output Answer": [ + "writer.writerow(A)" + ], + "split": "train" + }, + { + "Input": "Print a string `card` with string formatting", + "Output Program": [ + "print 'I have: {0.price}'.format(card)" + ], + "Output Answer": [ + "print 'I have: {0.price}'.format(card)" + ], + "split": "train" + }, + { + "Input": "find the index of sub string 's' in string `str` starting from index 16", + "Output Program": [ + "str.find('s', 16)" + ], + "Output Answer": [ + "str.find('s', 16)" + ], + "split": "train" + }, + { + "Input": "get value of the environment variable 'HOME' with default value '/home/username/'", + "Output Program": [ + "print os.environ.get('HOME', '/home/username/')" + ], + "Output Answer": [ + "print os.environ.get('HOME', '/home/username/')" + ], + "split": "train" + }, + { + "Input": "pivot dataframe `df` so that values for `upc` become column headings and values for `saleid` become the index", + "Output Program": [ + "df.pivot_table(index='saleid', columns='upc', aggfunc='size', fill_value=0)" + ], + "Output Answer": [ + "df.pivot_table(index='saleid', columns='upc', aggfunc='size', fill_value=0)" + ], + "split": "train" + }, + { + "Input": "using python's datetime module, get the year that utc-11 is currently in", + "Output Program": [ + "(datetime.datetime.utcnow() - datetime.timedelta(hours=11)).year" + ], + "Output Answer": [ + "(datetime.datetime.utcnow() - datetime.timedelta(hours=11)).year" + ], + "split": "train" + }, + { + "Input": "Save array at index 0, index 1 and index 8 of array `np` to tmp file `tmp`", + "Output Program": [ + "np.savez(tmp, *[getarray[0], getarray[1], getarray[8]])" + ], + "Output Answer": [ + "np.savez(tmp, *[getarray[0], getarray[1], getarray[8]])" + ], + "split": "train" + }, + { + "Input": "get the first object from a queryset in django model `Entry`", + "Output Program": [ + "Entry.objects.filter()[:1].get()" + ], + "Output Answer": [ + "Entry.objects.filter()[:1].get()" + ], + "split": "test" + }, + { + "Input": "selecting rows in Numpy ndarray 'a', where the value in the first column is 0 and value in the second column is 1", + "Output Program": [ + "a[np.where((a[:, (0)] == 0) * (a[:, (1)] == 1))]" + ], + "Output Answer": [ + "a[np.where((a[:, (0)] == 0) * (a[:, (1)] == 1))]" + ], + "split": "test" + }, + { + "Input": "get the name of the OS", + "Output Program": [ + "print os.name" + ], + "Output Answer": [ + "print os.name" + ], + "split": "train" + }, + { + "Input": "combine two lists `[1, 2, 3, 4]` and `['a', 'b', 'c', 'd']` into a dictionary", + "Output Program": [ + "dict(zip([1, 2, 3, 4], ['a', 'b', 'c', 'd']))" + ], + "Output Answer": [ + "dict(zip([1, 2, 3, 4], ['a', 'b', 'c', 'd']))" + ], + "split": "train" + }, + { + "Input": "Get multiple matched strings using regex pattern `(?:review: )?(http://url.com/(\\\\d+))\\\\s?`", + "Output Program": [ + "pattern = re.compile('(?:review: )?(http://url.com/(\\\\d+))\\\\s?', re.IGNORECASE)" + ], + "Output Answer": [ + "pattern = re.compile('(?:review: )?(http://url.com/(\\\\d+))\\\\s?', re.IGNORECASE)" + ], + "split": "train" + }, + { + "Input": "extract the first four rows of the column `ID` from a pandas dataframe `df`", + "Output Program": [ + "df.groupby('ID').head(4)" + ], + "Output Answer": [ + "df.groupby('ID').head(4)" + ], + "split": "train" + }, + { + "Input": "Get Last Day of the second month in 2100", + "Output Program": [ + "calendar.monthrange(2100, 2)" + ], + "Output Answer": [ + "calendar.monthrange(2100, 2)" + ], + "split": "train" + }, + { + "Input": "get value of first index of each element in list `a`", + "Output Program": [ + "[x[0] for x in a]" + ], + "Output Answer": [ + "[x[0] for x in a]" + ], + "split": "train" + }, + { + "Input": "check if key 'stackoverflow' and key 'google' are presented in dictionary `sites`", + "Output Program": [ + "set(['stackoverflow', 'google']).issubset(sites)" + ], + "Output Answer": [ + "set(['stackoverflow', 'google']).issubset(sites)" + ], + "split": "train" + }, + { + "Input": "get sorted list of keys of dict `d`", + "Output Program": [ + "sorted(d)" + ], + "Output Answer": [ + "sorted(d)" + ], + "split": "test" + }, + { + "Input": "change string `s` to upper case", + "Output Program": [ + "s.upper()" + ], + "Output Answer": [ + "s.upper()" + ], + "split": "train" + }, + { + "Input": "sort a list of lists `l` by index 2 of the inner list", + "Output Program": [ + "l.sort(key=(lambda x: x[2]))" + ], + "Output Answer": [ + "l.sort(key=(lambda x: x[2]))" + ], + "split": "train" + }, + { + "Input": "create a list containing the subtraction of each item in list `L` from the item prior to it", + "Output Program": [ + "[(y - x) for x, y in zip(L, L[1:])]" + ], + "Output Answer": [ + "[(y - x) for x, y in zip(L, L[1:])]" + ], + "split": "train" + }, + { + "Input": "find button that is in li class `next` and assign it to variable `next`", + "Output Program": [ + "next = driver.find_element_by_css_selector('li.next>a')" + ], + "Output Answer": [ + "next = driver.find_element_by_css_selector('li.next>a')" + ], + "split": "train" + }, + { + "Input": "read csv file 'my_file.csv' into numpy array", + "Output Program": [ + "my_data = genfromtxt('my_file.csv', delimiter=',')" + ], + "Output Answer": [ + "my_data = genfromtxt('my_file.csv', delimiter=',')" + ], + "split": "train" + }, + { + "Input": "count the number of words in a string `s`", + "Output Program": [ + "len(s.split())" + ], + "Output Answer": [ + "len(s.split())" + ], + "split": "train" + }, + { + "Input": "remove all whitespaces in string `sentence`", + "Output Program": [ + "sentence = re.sub('\\\\s+', '', sentence, flags=re.UNICODE)" + ], + "Output Answer": [ + "sentence = re.sub('\\\\s+', '', sentence, flags=re.UNICODE)" + ], + "split": "train" + }, + { + "Input": "zip list `a`, `b`, `c` into a list of tuples", + "Output Program": [ + "[(x + tuple(y)) for x, y in zip(zip(a, b), c)]" + ], + "Output Answer": [ + "[(x + tuple(y)) for x, y in zip(zip(a, b), c)]" + ], + "split": "train" + }, + { + "Input": "insert string `string1` after each character of `string2`", + "Output Program": [ + "string2.replace('', string1)[len(string1):-len(string1)]" + ], + "Output Answer": [ + "string2.replace('', string1)[len(string1):-len(string1)]" + ], + "split": "train" + }, + { + "Input": "remove newline in string \"Hello\\n\\n\\n\" on the right side", + "Output Program": [ + "'Hello\\n\\n\\n'.rstrip('\\n')" + ], + "Output Answer": [ + "'Hello\\n\\n\\n'.rstrip('\\n')" + ], + "split": "train" + }, + { + "Input": "Split a multi-line string ` a \\n b \\r\\n c ` by new line character `\\n`", + "Output Program": [ + "' a \\n b \\r\\n c '.split('\\n')" + ], + "Output Answer": [ + "' a \\n b \\r\\n c '.split('\\n')" + ], + "split": "test" + }, + { + "Input": "request http url `url`", + "Output Program": [ + "r = requests.get(url)" + ], + "Output Answer": [ + "r = requests.get(url)" + ], + "split": "train" + }, + { + "Input": "create pandas data frame `df` from txt file `filename.txt` with column `Region Name` and separator `;`", + "Output Program": [ + "df = pd.read_csv('filename.txt', sep=';', names=['Region Name'])" + ], + "Output Answer": [ + "df = pd.read_csv('filename.txt', sep=';', names=['Region Name'])" + ], + "split": "train" + }, + { + "Input": "print a digit `your_number` with exactly 2 digits after decimal", + "Output Program": [ + "print '{0:.2f}'.format(your_number)" + ], + "Output Answer": [ + "print '{0:.2f}'.format(your_number)" + ], + "split": "train" + }, + { + "Input": "encode a string `data to be encoded` to `ascii` encoding", + "Output Program": [ + "encoded = 'data to be encoded'.encode('ascii')" + ], + "Output Answer": [ + "encoded = 'data to be encoded'.encode('ascii')" + ], + "split": "test" + }, + { + "Input": "replace single quote character in string \"didn't\" with empty string ''", + "Output Program": [ + "\"\"\"didn't\"\"\".replace(\"'\", '')" + ], + "Output Answer": [ + "\"\"\"didn't\"\"\".replace(\"'\", '')" + ], + "split": "train" + }, + { + "Input": "restart a computer after `900` seconds using subprocess", + "Output Program": [ + "subprocess.call(['shutdown', '/r', '/t', '900'])" + ], + "Output Answer": [ + "subprocess.call(['shutdown', '/r', '/t', '900'])" + ], + "split": "train" + }, + { + "Input": "find intersection data between series `s1` and series `s2`", + "Output Program": [ + "pd.Series(list(set(s1).intersection(set(s2))))" + ], + "Output Answer": [ + "pd.Series(list(set(s1).intersection(set(s2))))" + ], + "split": "test" + }, + { + "Input": "download a file `url` over HTTP and save to \"10MB\"", + "Output Program": [ + "response = requests.get(url, stream=True)\nwith open('10MB', 'wb') as handle:\n for data in tqdm(response.iter_content()):\n handle.write(data)" + ], + "Output Answer": [ + "response = requests.get(url, stream=True)\nwith open('10MB', 'wb') as handle:\n for data in tqdm(response.iter_content()):\n handle.write(data)" + ], + "split": "test" + }, + { + "Input": "convert string `x' to dictionary splitted by `=` using list comprehension", + "Output Program": [ + "dict([x.split('=') for x in s.split()])" + ], + "Output Answer": [ + "dict([x.split('=') for x in s.split()])" + ], + "split": "train" + }, + { + "Input": "make a list of lists in which each list `g` are the elements from list `test` which have the same characters up to the first `_` character", + "Output Program": [ + "[list(g) for _, g in itertools.groupby(test, lambda x: x.split('_')[0])]" + ], + "Output Answer": [ + "[list(g) for _, g in itertools.groupby(test, lambda x: x.split('_')[0])]" + ], + "split": "train" + }, + { + "Input": "remove parentheses and text within it in string `filename`", + "Output Program": [ + "re.sub('\\\\([^)]*\\\\)', '', filename)" + ], + "Output Answer": [ + "re.sub('\\\\([^)]*\\\\)', '', filename)" + ], + "split": "train" + }, + { + "Input": "find the index of sub string 's' in string `str` starting from index 11", + "Output Program": [ + "str.find('s', 11)" + ], + "Output Answer": [ + "str.find('s', 11)" + ], + "split": "train" + }, + { + "Input": "format the variables `self.goals` and `self.penalties` using string formatting", + "Output Program": [ + "\"\"\"({:d} goals, ${:d})\"\"\".format(self.goals, self.penalties)" + ], + "Output Answer": [ + "\"\"\"({:d} goals, ${:d})\"\"\".format(self.goals, self.penalties)" + ], + "split": "test" + }, + { + "Input": "sum a list of numbers `list_of_nums`", + "Output Program": [ + "sum(list_of_nums)" + ], + "Output Answer": [ + "sum(list_of_nums)" + ], + "split": "train" + }, + { + "Input": "get index of rows in dataframe `df` which column 'BoolCol' matches value True", + "Output Program": [ + "df[df['BoolCol']].index.tolist()" + ], + "Output Answer": [ + "df[df['BoolCol']].index.tolist()" + ], + "split": "test" + }, + { + "Input": "open file '5_1.txt' in directory `direct`", + "Output Program": [ + "x_file = open(os.path.join(direct, '5_1.txt'), 'r')" + ], + "Output Answer": [ + "x_file = open(os.path.join(direct, '5_1.txt'), 'r')" + ], + "split": "train" + }, + { + "Input": "apply a list of functions named 'functions' over a list of values named 'values'", + "Output Program": [ + "[x(y) for x, y in zip(functions, values)]" + ], + "Output Answer": [ + "[x(y) for x, y in zip(functions, values)]" + ], + "split": "train" + }, + { + "Input": "convert elements of each tuple in list `l` into a string separated by character `@`", + "Output Program": [ + "\"\"\" \"\"\".join([('%d@%d' % t) for t in l])" + ], + "Output Answer": [ + "\"\"\" \"\"\".join([('%d@%d' % t) for t in l])" + ], + "split": "test" + }, + { + "Input": "create a new column `weekday` in pandas data frame `data` based on the values in column `my_dt`", + "Output Program": [ + "data['weekday'] = data['my_dt'].apply(lambda x: x.weekday())" + ], + "Output Answer": [ + "data['weekday'] = data['my_dt'].apply(lambda x: x.weekday())" + ], + "split": "test" + }, + { + "Input": "Make function `WRITEFUNCTION` output nothing in curl `p`", + "Output Program": [ + "p.setopt(pycurl.WRITEFUNCTION, lambda x: None)" + ], + "Output Answer": [ + "p.setopt(pycurl.WRITEFUNCTION, lambda x: None)" + ], + "split": "train" + }, + { + "Input": "sort list `lst` based on each element's number of occurrences", + "Output Program": [ + "sorted(lst, key=lambda x: (-1 * c[x], lst.index(x)))" + ], + "Output Answer": [ + "sorted(lst, key=lambda x: (-1 * c[x], lst.index(x)))" + ], + "split": "train" + }, + { + "Input": "get two random records from model 'MyModel' in Django", + "Output Program": [ + "MyModel.objects.order_by('?')[:2]" + ], + "Output Answer": [ + "MyModel.objects.order_by('?')[:2]" + ], + "split": "train" + }, + { + "Input": "Find name of current directory", + "Output Program": [ + "dir_path = os.path.dirname(os.path.realpath(__file__))" + ], + "Output Answer": [ + "dir_path = os.path.dirname(os.path.realpath(__file__))" + ], + "split": "train" + }, + { + "Input": "regular expression for validating string 'user' containing a sequence of characters ending with '-' followed by any number of digits.", + "Output Program": [ + "re.compile('{}-\\\\d*'.format(user))" + ], + "Output Answer": [ + "re.compile('{}-\\\\d*'.format(user))" + ], + "split": "train" + }, + { + "Input": "Get an item from a list of dictionary `lst` which has maximum value in the key `score` using lambda function", + "Output Program": [ + "max(lst, key=lambda x: x['score'])" + ], + "Output Answer": [ + "max(lst, key=lambda x: x['score'])" + ], + "split": "train" + }, + { + "Input": "remove None value from list `L`", + "Output Program": [ + "[x for x in L if x is not None]" + ], + "Output Answer": [ + "[x for x in L if x is not None]" + ], + "split": "train" + }, + { + "Input": "sort dictionary `d` by key", + "Output Program": [ + "od = collections.OrderedDict(sorted(d.items()))" + ], + "Output Answer": [ + "od = collections.OrderedDict(sorted(d.items()))" + ], + "split": "train" + }, + { + "Input": "format string \"({} goals, ${})\" with variables `goals` and `penalties`", + "Output Program": [ + "\"\"\"({} goals, ${})\"\"\".format(self.goals, self.penalties)" + ], + "Output Answer": [ + "\"\"\"({} goals, ${})\"\"\".format(self.goals, self.penalties)" + ], + "split": "test" + }, + { + "Input": "read a single character from stdin", + "Output Program": [ + "sys.stdin.read(1)" + ], + "Output Answer": [ + "sys.stdin.read(1)" + ], + "split": "train" + }, + { + "Input": "unzip list `original` and return a generator", + "Output Program": [ + "result = ((a for (a, b) in original), (b for (a, b) in original))" + ], + "Output Answer": [ + "result = ((a for (a, b) in original), (b for (a, b) in original))" + ], + "split": "test" + }, + { + "Input": "get all combination of 3 binary values", + "Output Program": [ + "lst = list(itertools.product([0, 1], repeat=3))", + "bin = [0, 1]\n[(x, y, z) for x in bin for y in bin for z in bin]" + ], + "Output Answer": [ + "lst = list(itertools.product([0, 1], repeat=3))", + "bin = [0, 1]\n[(x, y, z) for x in bin for y in bin for z in bin]" + ], + "split": "train" + }, + { + "Input": "find all anchors with a hyperlink that matches the pattern '^(?!(?:[a-zA-Z][a-zA-Z0-9+.-]*:|//))'", + "Output Program": [ + "soup.find_all('a', href=re.compile('^(?!(?:[a-zA-Z][a-zA-Z0-9+.-]*:|//))'))" + ], + "Output Answer": [ + "soup.find_all('a', href=re.compile('^(?!(?:[a-zA-Z][a-zA-Z0-9+.-]*:|//))'))" + ], + "split": "train" + }, + { + "Input": "Sort a list of tuples `b` by third item in the tuple", + "Output Program": [ + "b.sort(key=lambda x: x[1][2])" + ], + "Output Answer": [ + "b.sort(key=lambda x: x[1][2])" + ], + "split": "test" + }, + { + "Input": "generate a random 12-digit number", + "Output Program": [ + "\"\"\"\"\"\".join(str(random.randint(0, 9)) for _ in xrange(12))", + "int(''.join(str(random.randint(0, 9)) for _ in xrange(12)))" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(str(random.randint(0, 9)) for _ in xrange(12))", + "int(''.join(str(random.randint(0, 9)) for _ in xrange(12)))" + ], + "split": "train" + }, + { + "Input": "create dictionary from list of variables 'foo' and 'bar' already defined", + "Output Program": [ + "dict((k, globals()[k]) for k in ('foo', 'bar'))" + ], + "Output Answer": [ + "dict((k, globals()[k]) for k in ('foo', 'bar'))" + ], + "split": "train" + }, + { + "Input": "remove all spaces from a string converted from dictionary `{'a': 1, 'b': 'as df'}`", + "Output Program": [ + "str({'a': 1, 'b': 'as df'}).replace(': ', ':').replace(', ', ',')" + ], + "Output Answer": [ + "str({'a': 1, 'b': 'as df'}).replace(': ', ':').replace(', ', ',')" + ], + "split": "train" + }, + { + "Input": "Get the position of a regex match for word `is` in a string `String`", + "Output Program": [ + "re.search('\\\\bis\\\\b', String).start()" + ], + "Output Answer": [ + "re.search('\\\\bis\\\\b', String).start()" + ], + "split": "train" + }, + { + "Input": "convert list of sublists `lst` of floats to a list of sublists `str_list` of strings of integers in scientific notation with 8 decimal points", + "Output Program": [ + "str_list = [['{0:.8e}'.format(flt) for flt in sublist] for sublist in lst]" + ], + "Output Answer": [ + "str_list = [['{0:.8e}'.format(flt) for flt in sublist] for sublist in lst]" + ], + "split": "train" + }, + { + "Input": "subtract elements of list `List1` from elements of list `List2`", + "Output Program": [ + "[(x1 - x2) for x1, x2 in zip(List1, List2)]" + ], + "Output Answer": [ + "[(x1 - x2) for x1, x2 in zip(List1, List2)]" + ], + "split": "train" + }, + { + "Input": "pygobject center window `window`", + "Output Program": [ + "window.set_position(Gtk.WindowPosition.CENTER)" + ], + "Output Answer": [ + "window.set_position(Gtk.WindowPosition.CENTER)" + ], + "split": "train" + }, + { + "Input": "check if all boolean values in a python dictionary `dict` are true", + "Output Program": [ + "all(dict.values())" + ], + "Output Answer": [ + "all(dict.values())" + ], + "split": "train" + }, + { + "Input": "query all data from table `Task` where the value of column `time_spent` is bigger than 3 hours", + "Output Program": [ + "session.query(Task).filter(Task.time_spent > timedelta(hours=3)).all()" + ], + "Output Answer": [ + "session.query(Task).filter(Task.time_spent > timedelta(hours=3)).all()" + ], + "split": "train" + }, + { + "Input": "read pandas data frame csv `comma.csv` with extra commas in column specifying string delimiter `'`", + "Output Program": [ + "df = pd.read_csv('comma.csv', quotechar=\"'\")" + ], + "Output Answer": [ + "df = pd.read_csv('comma.csv', quotechar=\"'\")" + ], + "split": "train" + }, + { + "Input": "Getting the second to last element of list `some_list`", + "Output Program": [ + "some_list[(-2)]" + ], + "Output Answer": [ + "some_list[(-2)]" + ], + "split": "train" + }, + { + "Input": "Get a list `myList` from 1 to 10", + "Output Program": [ + "myList = [i for i in range(10)]" + ], + "Output Answer": [ + "myList = [i for i in range(10)]" + ], + "split": "train" + }, + { + "Input": "Format a date object `str_data` into iso fomrat", + "Output Program": [ + "datetime.datetime.strptime(str_date, '%m/%d/%Y').date().isoformat()" + ], + "Output Answer": [ + "datetime.datetime.strptime(str_date, '%m/%d/%Y').date().isoformat()" + ], + "split": "train" + }, + { + "Input": "Find octal characters matches from a string `str` using regex", + "Output Program": [ + "print re.findall(u\"'\\\\\\\\[0-7]{1,3}'\", str)" + ], + "Output Answer": [ + "print re.findall(u\"'\\\\\\\\[0-7]{1,3}'\", str)" + ], + "split": "test" + }, + { + "Input": "Log info message 'Log message' with attributes `{'app_name': 'myapp'}`", + "Output Program": [ + "logging.info('Log message', extra={'app_name': 'myapp'})" + ], + "Output Answer": [ + "logging.info('Log message', extra={'app_name': 'myapp'})" + ], + "split": "train" + }, + { + "Input": "Set colorbar range from `0` to `15` for pyplot object `quadmesh` in matplotlib", + "Output Program": [ + "quadmesh.set_clim(vmin=0, vmax=15)" + ], + "Output Answer": [ + "quadmesh.set_clim(vmin=0, vmax=15)" + ], + "split": "train" + }, + { + "Input": "delete 1st, 2nd and 4th columns from dataframe `df`", + "Output Program": [ + "df.drop(df.columns[[0, 1, 3]], axis=1)" + ], + "Output Answer": [ + "df.drop(df.columns[[0, 1, 3]], axis=1)" + ], + "split": "train" + }, + { + "Input": "remove colon character surrounded by vowels letters in string `word`", + "Output Program": [ + "word = re.sub(u'([aeiou]):(([aeiou][^aeiou]*){3})$', u'\\\\1\\\\2', word)" + ], + "Output Answer": [ + "word = re.sub(u'([aeiou]):(([aeiou][^aeiou]*){3})$', u'\\\\1\\\\2', word)" + ], + "split": "train" + }, + { + "Input": "count the number of elements in array `myArray`", + "Output Program": [ + "len(myArray)" + ], + "Output Answer": [ + "len(myArray)" + ], + "split": "train" + }, + { + "Input": "split a string `yas` based on tab '\\t'", + "Output Program": [ + "re.split('\\\\t+', yas.rstrip('\\t'))" + ], + "Output Answer": [ + "re.split('\\\\t+', yas.rstrip('\\t'))" + ], + "split": "train" + }, + { + "Input": "reverse list `ut` based on the `count` attribute of each object", + "Output Program": [ + "ut.sort(key=lambda x: x.count, reverse=True)" + ], + "Output Answer": [ + "ut.sort(key=lambda x: x.count, reverse=True)" + ], + "split": "test" + }, + { + "Input": "joining data from dataframe `df1` with data from dataframe `df2` based on matching values of column 'Date_Time' in both dataframes", + "Output Program": [ + "df1.merge(df2, on='Date_Time')" + ], + "Output Answer": [ + "df1.merge(df2, on='Date_Time')" + ], + "split": "test" + }, + { + "Input": "create a list of integers between 2 values `11` and `17`", + "Output Program": [ + "list(range(11, 17))" + ], + "Output Answer": [ + "list(range(11, 17))" + ], + "split": "train" + }, + { + "Input": "Filter duplicate entries w.r.t. value in 'id' from a list of dictionaries 'L'", + "Output Program": [ + "dict((x['id'], x) for x in L).values()" + ], + "Output Answer": [ + "dict((x['id'], x) for x in L).values()" + ], + "split": "train" + }, + { + "Input": "save numpy array `x` into text file 'test.txt'", + "Output Program": [ + "np.savetxt('test.txt', x)" + ], + "Output Answer": [ + "np.savetxt('test.txt', x)" + ], + "split": "train" + }, + { + "Input": "running bash script 'sleep.sh'", + "Output Program": [ + "subprocess.call('sleep.sh', shell=True)" + ], + "Output Answer": [ + "subprocess.call('sleep.sh', shell=True)" + ], + "split": "test" + }, + { + "Input": "extract all the values of a specific key named 'values' from a list of dictionaries", + "Output Program": [ + "results = [item['value'] for item in test_data]" + ], + "Output Answer": [ + "results = [item['value'] for item in test_data]" + ], + "split": "train" + }, + { + "Input": "convert a pandas series `sf` into a pandas dataframe `df` with columns `email` and `list`", + "Output Program": [ + "pd.DataFrame({'email': sf.index, 'list': sf.values})" + ], + "Output Answer": [ + "pd.DataFrame({'email': sf.index, 'list': sf.values})" + ], + "split": "test" + }, + { + "Input": "Get a list of words from a string `Hello world, my name is...James the 2nd!` removing punctuation", + "Output Program": [ + "re.compile('\\\\w+').findall('Hello world, my name is...James the 2nd!')" + ], + "Output Answer": [ + "re.compile('\\\\w+').findall('Hello world, my name is...James the 2nd!')" + ], + "split": "train" + }, + { + "Input": "encode string `data` as `hex`", + "Output Program": [ + "data.encode('hex')" + ], + "Output Answer": [ + "data.encode('hex')" + ], + "split": "train" + }, + { + "Input": "Split string 'sad_pandas_and_happy_cats_for_people' based on string 'and', 'or' or 'for'", + "Output Program": [ + "re.split('_(?:for|or|and)_', 'sad_pandas_and_happy_cats_for_people')" + ], + "Output Answer": [ + "re.split('_(?:for|or|and)_', 'sad_pandas_and_happy_cats_for_people')" + ], + "split": "train" + }, + { + "Input": "send a signal `signal.SIGUSR1` to the current process", + "Output Program": [ + "os.kill(os.getpid(), signal.SIGUSR1)" + ], + "Output Answer": [ + "os.kill(os.getpid(), signal.SIGUSR1)" + ], + "split": "test" + }, + { + "Input": "convert hex string 'deadbeef' to decimal", + "Output Program": [ + "int('deadbeef', 16)" + ], + "Output Answer": [ + "int('deadbeef', 16)" + ], + "split": "train" + }, + { + "Input": "check if any values in a list `input_list` is a list", + "Output Program": [ + "any(isinstance(el, list) for el in input_list)" + ], + "Output Answer": [ + "any(isinstance(el, list) for el in input_list)" + ], + "split": "train" + }, + { + "Input": "Parsing HTML string `html` using BeautifulSoup", + "Output Program": [ + "parsed_html = BeautifulSoup(html)\nprint parsed_html.body.find('div', attrs={'class': 'container', }).text" + ], + "Output Answer": [ + "parsed_html = BeautifulSoup(html)\nprint parsed_html.body.find('div', attrs={'class': 'container', }).text" + ], + "split": "train" + }, + { + "Input": "calculate mean across dimension in a 2d array `a`", + "Output Program": [ + "np.mean(a, axis=1)" + ], + "Output Answer": [ + "np.mean(a, axis=1)" + ], + "split": "test" + }, + { + "Input": "search for string that matches regular expression pattern '(?` in dataframe `df`", + "Output Program": [ + "df.replace({'\\n': '
'}, regex=True)" + ], + "Output Answer": [ + "df.replace({'\\n': '
'}, regex=True)" + ], + "split": "test" + }, + { + "Input": "Convert ascii value 'P' to binary", + "Output Program": [ + "bin(ord('P'))" + ], + "Output Answer": [ + "bin(ord('P'))" + ], + "split": "train" + }, + { + "Input": "Get data of dataframe `df` where the sum of column 'X' grouped by column 'User' is equal to 0", + "Output Program": [ + "df.loc[df.groupby('User')['X'].transform(sum) == 0]" + ], + "Output Answer": [ + "df.loc[df.groupby('User')['X'].transform(sum) == 0]" + ], + "split": "train" + }, + { + "Input": "disable logging while running unit tests in python django", + "Output Program": [ + "logging.disable(logging.CRITICAL)" + ], + "Output Answer": [ + "logging.disable(logging.CRITICAL)" + ], + "split": "train" + }, + { + "Input": "join two dataframes based on values in selected columns", + "Output Program": [ + "pd.merge(a, b, on=['A', 'B'], how='outer')" + ], + "Output Answer": [ + "pd.merge(a, b, on=['A', 'B'], how='outer')" + ], + "split": "train" + }, + { + "Input": "substract 1 hour and 10 minutes from current time", + "Output Program": [ + "t = datetime.datetime.now()\n(t - datetime.timedelta(hours=1, minutes=10))" + ], + "Output Answer": [ + "t = datetime.datetime.now()\n(t - datetime.timedelta(hours=1, minutes=10))" + ], + "split": "train" + }, + { + "Input": "Generate a random integer between 0 and 9", + "Output Program": [ + "randint(0, 9)" + ], + "Output Answer": [ + "randint(0, 9)" + ], + "split": "train" + }, + { + "Input": "insert a character ',' into a string in front of '+' character in second part of the string", + "Output Program": [ + "\"\"\",+\"\"\".join(c.rsplit('+', 1))" + ], + "Output Answer": [ + "\"\"\",+\"\"\".join(c.rsplit('+', 1))" + ], + "split": "train" + }, + { + "Input": "upload binary file `myfile.txt` with ftplib", + "Output Program": [ + "ftp.storbinary('STOR myfile.txt', open('myfile.txt', 'rb'))" + ], + "Output Answer": [ + "ftp.storbinary('STOR myfile.txt', open('myfile.txt', 'rb'))" + ], + "split": "train" + }, + { + "Input": "create tuples containing elements that are at the same index of list `lst` and list `lst2`", + "Output Program": [ + "[(i, j) for i, j in zip(lst, lst2)]" + ], + "Output Answer": [ + "[(i, j) for i, j in zip(lst, lst2)]" + ], + "split": "train" + }, + { + "Input": "sort a list of dictionaries `list_of_dct` by values in an order `order`", + "Output Program": [ + "sorted(list_of_dct, key=lambda x: order.index(x.values()[0]))" + ], + "Output Answer": [ + "sorted(list_of_dct, key=lambda x: order.index(x.values()[0]))" + ], + "split": "train" + }, + { + "Input": "if Selenium textarea element `foo` is not empty, clear the field", + "Output Program": [ + "driver.find_element_by_id('foo').clear()" + ], + "Output Answer": [ + "driver.find_element_by_id('foo').clear()" + ], + "split": "train" + }, + { + "Input": "construct pandas dataframe from a list of tuples", + "Output Program": [ + "df = pandas.DataFrame(data, columns=['R_Number', 'C_Number', 'Avg', 'Std'])" + ], + "Output Answer": [ + "df = pandas.DataFrame(data, columns=['R_Number', 'C_Number', 'Avg', 'Std'])" + ], + "split": "train" + }, + { + "Input": "Print a string `value` with string formatting", + "Output Program": [ + "print 'Value is \"{}\"'.format(value)" + ], + "Output Answer": [ + "print 'Value is \"{}\"'.format(value)" + ], + "split": "train" + }, + { + "Input": "remove elements in list `b` from list `a`", + "Output Program": [ + "[x for x in a if x not in b]" + ], + "Output Answer": [ + "[x for x in a if x not in b]" + ], + "split": "train" + }, + { + "Input": "replace all elements in array `A` that are not present in array `[1, 3, 4]` with zeros", + "Output Program": [ + "np.where(np.in1d(A, [1, 3, 4]).reshape(A.shape), A, 0)" + ], + "Output Answer": [ + "np.where(np.in1d(A, [1, 3, 4]).reshape(A.shape), A, 0)" + ], + "split": "test" + }, + { + "Input": "remove white spaces from all the lines using a regular expression in string 'a\\n b\\n c'", + "Output Program": [ + "re.sub('(?m)^\\\\s+', '', 'a\\n b\\n c')" + ], + "Output Answer": [ + "re.sub('(?m)^\\\\s+', '', 'a\\n b\\n c')" + ], + "split": "train" + }, + { + "Input": "In Django, filter `Task.objects` based on all entities in ['A', 'P', 'F']", + "Output Program": [ + "Task.objects.exclude(prerequisites__status__in=['A', 'P', 'F'])" + ], + "Output Answer": [ + "Task.objects.exclude(prerequisites__status__in=['A', 'P', 'F'])" + ], + "split": "train" + }, + { + "Input": "append the sum of each tuple pair in the grouped list `list1` and list `list2` elements to list `list3`", + "Output Program": [ + "list3 = [(a + b) for a, b in zip(list1, list2)]" + ], + "Output Answer": [ + "list3 = [(a + b) for a, b in zip(list1, list2)]" + ], + "split": "train" + }, + { + "Input": "Sort dictionary `d` by value in ascending order", + "Output Program": [ + "sorted(d.items(), key=(lambda x: x[1]))" + ], + "Output Answer": [ + "sorted(d.items(), key=(lambda x: x[1]))" + ], + "split": "train" + }, + { + "Input": "find all occurrences of the pattern '\\\\[[^\\\\]]*\\\\]|\\\\([^\\\\)]*\\\\)|\"[^\"]*\"|\\\\S+' within `strs`", + "Output Program": [ + "re.findall('\\\\[[^\\\\]]*\\\\]|\\\\([^\\\\)]*\\\\)|\"[^\"]*\"|\\\\S+', strs)" + ], + "Output Answer": [ + "re.findall('\\\\[[^\\\\]]*\\\\]|\\\\([^\\\\)]*\\\\)|\"[^\"]*\"|\\\\S+', strs)" + ], + "split": "train" + }, + { + "Input": "find all possible sequences of elements in a list `[2, 3, 4]`", + "Output Program": [ + "map(list, permutations([2, 3, 4]))" + ], + "Output Answer": [ + "map(list, permutations([2, 3, 4]))" + ], + "split": "train" + }, + { + "Input": "best way to extract subset of key-value pairs with keys matching 'l', 'm', or 'n' from python dictionary object", + "Output Program": [ + "{k: bigdict[k] for k in bigdict.keys() & {'l', 'm', 'n'}}" + ], + "Output Answer": [ + "{k: bigdict[k] for k in bigdict.keys() & {'l', 'm', 'n'}}" + ], + "split": "train" + }, + { + "Input": "sort dataframe `df` based on column 'a' in ascending and column 'b' in descending", + "Output Program": [ + "df.sort_values(['a', 'b'], ascending=[True, False])" + ], + "Output Answer": [ + "df.sort_values(['a', 'b'], ascending=[True, False])" + ], + "split": "train" + }, + { + "Input": "remove whitespace in string `sentence` from beginning and end", + "Output Program": [ + "sentence.strip()" + ], + "Output Answer": [ + "sentence.strip()" + ], + "split": "train" + }, + { + "Input": "Get data from dataframe `df` where column 'X' is equal to 0", + "Output Program": [ + "df.groupby('User')['X'].transform(sum) == 0" + ], + "Output Answer": [ + "df.groupby('User')['X'].transform(sum) == 0" + ], + "split": "train" + }, + { + "Input": "zip a list of tuples `[(1, 4), (2, 5), (3, 6)]` into a list of tuples according to original tuple index", + "Output Program": [ + "zip(*[(1, 4), (2, 5), (3, 6)])" + ], + "Output Answer": [ + "zip(*[(1, 4), (2, 5), (3, 6)])" + ], + "split": "train" + }, + { + "Input": "find all substrings in string `mystring` composed only of letters `a` and `b` where each `a` is directly preceded and succeeded by `b`", + "Output Program": [ + "re.findall('\\\\b(?:b+a)+b+\\\\b', mystring)" + ], + "Output Answer": [ + "re.findall('\\\\b(?:b+a)+b+\\\\b', mystring)" + ], + "split": "train" + }, + { + "Input": "deep copy list `old_list` as `new_list`", + "Output Program": [ + "new_list = copy.deepcopy(old_list)" + ], + "Output Answer": [ + "new_list = copy.deepcopy(old_list)" + ], + "split": "train" + }, + { + "Input": "getting a list of all subdirectories in the directory `directory`", + "Output Program": [ + "os.walk(directory)" + ], + "Output Answer": [ + "os.walk(directory)" + ], + "split": "train" + }, + { + "Input": "extract a url from a string `myString`", + "Output Program": [ + "print re.search('(?Phttps?://[^\\\\s]+)', myString).group('url')", + "print re.findall('(https?://[^\\\\s]+)', myString)" + ], + "Output Answer": [ + "print re.search('(?Phttps?://[^\\\\s]+)', myString).group('url')", + "print re.findall('(https?://[^\\\\s]+)', myString)" + ], + "split": "test" + }, + { + "Input": "replacing '\\u200b' with '*' in a string using regular expressions", + "Output Program": [ + "u'used\\u200b'.replace(u'\\u200b', '*')" + ], + "Output Answer": [ + "u'used\\u200b'.replace(u'\\u200b', '*')" + ], + "split": "train" + }, + { + "Input": "create datetime object from \"16sep2012\"", + "Output Program": [ + "datetime.datetime.strptime('16Sep2012', '%d%b%Y')" + ], + "Output Answer": [ + "datetime.datetime.strptime('16Sep2012', '%d%b%Y')" + ], + "split": "train" + }, + { + "Input": "move x-axis to the top of a plot `ax`", + "Output Program": [ + "ax.xaxis.tick_top()" + ], + "Output Answer": [ + "ax.xaxis.tick_top()" + ], + "split": "train" + }, + { + "Input": "sort a dictionary `y` by value then by key", + "Output Program": [ + "sorted(y.items(), key=lambda x: (x[1], x[0]), reverse=True)" + ], + "Output Answer": [ + "sorted(y.items(), key=lambda x: (x[1], x[0]), reverse=True)" + ], + "split": "train" + }, + { + "Input": "convert a dataframe `df`'s column `ID` into datetime, after removing the first and last 3 letters", + "Output Program": [ + "pd.to_datetime(df.ID.str[1:-3])" + ], + "Output Answer": [ + "pd.to_datetime(df.ID.str[1:-3])" + ], + "split": "train" + }, + { + "Input": "Display maximum output data of columns in dataframe `pandas` that will fit into the screen", + "Output Program": [ + "pandas.set_option('display.max_columns', None)" + ], + "Output Answer": [ + "pandas.set_option('display.max_columns', None)" + ], + "split": "train" + }, + { + "Input": "Drop rows of pandas dataframe `df` having NaN in column at index \"1\"", + "Output Program": [ + "df.dropna(subset=[1])" + ], + "Output Answer": [ + "df.dropna(subset=[1])" + ], + "split": "test" + }, + { + "Input": "delete the element `c` from list `a`", + "Output Program": [ + "if (c in a):\n a.remove(c)", + "try:\n a.remove(c)\nexcept ValueError:\n pass" + ], + "Output Answer": [ + "if (c in a):\n a.remove(c)", + "try:\n a.remove(c)\nexcept ValueError:\n pass" + ], + "split": "train" + }, + { + "Input": "get output from process `p1`", + "Output Program": [ + "p1.communicate()[0]" + ], + "Output Answer": [ + "p1.communicate()[0]" + ], + "split": "train" + }, + { + "Input": "Create new DataFrame object by merging columns \"key\" of dataframes `split_df` and `csv_df` and rename the columns from dataframes `split_df` and `csv_df` with suffix `_left` and `_right` respectively", + "Output Program": [ + "pd.merge(split_df, csv_df, on=['key'], suffixes=('_left', '_right'))" + ], + "Output Answer": [ + "pd.merge(split_df, csv_df, on=['key'], suffixes=('_left', '_right'))" + ], + "split": "test" + }, + { + "Input": "read file `fname` line by line into a list `content`", + "Output Program": [ + "with open(fname) as f:\n content = f.readlines()" + ], + "Output Answer": [ + "with open(fname) as f:\n content = f.readlines()" + ], + "split": "train" + }, + { + "Input": "create a set containing all keys' names from dictionary `LoD`", + "Output Program": [ + "{k for d in LoD for k in d.keys()}" + ], + "Output Answer": [ + "{k for d in LoD for k in d.keys()}" + ], + "split": "train" + }, + { + "Input": "Print a celsius symbol with matplotlib", + "Output Program": [ + "ax.set_xlabel('Temperature ($^\\\\circ$C)')" + ], + "Output Answer": [ + "ax.set_xlabel('Temperature ($^\\\\circ$C)')" + ], + "split": "train" + }, + { + "Input": "set an array of unicode characters `[u'\\xe9', u'\\xe3', u'\\xe2']` as labels in Matplotlib `ax`", + "Output Program": [ + "ax.set_yticklabels([u'\\xe9', u'\\xe3', u'\\xe2'])" + ], + "Output Answer": [ + "ax.set_yticklabels([u'\\xe9', u'\\xe3', u'\\xe2'])" + ], + "split": "train" + }, + { + "Input": "pandas dataframe `df` column 'a' to list", + "Output Program": [ + "df['a'].values.tolist()" + ], + "Output Answer": [ + "df['a'].values.tolist()" + ], + "split": "train" + }, + { + "Input": "move dictionaries in list `lst` to the end of the list if value of key 'language' in each dictionary is not equal to 'en'", + "Output Program": [ + "sorted(lst, key=lambda x: x['language'] != 'en')" + ], + "Output Answer": [ + "sorted(lst, key=lambda x: x['language'] != 'en')" + ], + "split": "train" + }, + { + "Input": "apply jinja2 filters `forceescape` and `linebreaks` on variable `my_variable`", + "Output Program": [ + "{{my_variable | forceescape | linebreaks}}" + ], + "Output Answer": [ + "{{my_variable | forceescape | linebreaks}}" + ], + "split": "train" + }, + { + "Input": "serve a static html page 'your_template.html' at the root of a django project", + "Output Program": [ + "url('^$', TemplateView.as_view(template_name='your_template.html'))" + ], + "Output Answer": [ + "url('^$', TemplateView.as_view(template_name='your_template.html'))" + ], + "split": "train" + }, + { + "Input": "print a list of floating numbers `l` using string formatting", + "Output Program": [ + "print [('%5.3f' % val) for val in l]" + ], + "Output Answer": [ + "print [('%5.3f' % val) for val in l]" + ], + "split": "train" + }, + { + "Input": "Replace NaN values in column 'value' with the mean of data in column 'group' of dataframe `df`", + "Output Program": [ + "df[['value']].fillna(df.groupby('group').transform('mean'))" + ], + "Output Answer": [ + "df[['value']].fillna(df.groupby('group').transform('mean'))" + ], + "split": "train" + }, + { + "Input": "check if elements in list `my_list` are coherent in order", + "Output Program": [ + "return my_list == range(my_list[0], my_list[-1] + 1)" + ], + "Output Answer": [ + "return my_list == range(my_list[0], my_list[-1] + 1)" + ], + "split": "train" + }, + { + "Input": "get the date 2 months from today", + "Output Program": [ + "(date(2010, 12, 31) + relativedelta(months=(+ 2)))" + ], + "Output Answer": [ + "(date(2010, 12, 31) + relativedelta(months=(+ 2)))" + ], + "split": "train" + }, + { + "Input": "print elements of list `list` seperated by tabs `\\t`", + "Output Program": [ + "print '\\t'.join(map(str, list))" + ], + "Output Answer": [ + "print '\\t'.join(map(str, list))" + ], + "split": "test" + }, + { + "Input": "Check if key 'key1' in `dict`", + "Output Program": [ + "('key1' in dict)" + ], + "Output Answer": [ + "('key1' in dict)" + ], + "split": "train" + }, + { + "Input": "get the size of file 'C:\\\\Python27\\\\Lib\\\\genericpath.py'", + "Output Program": [ + "os.stat('C:\\\\Python27\\\\Lib\\\\genericpath.py').st_size" + ], + "Output Answer": [ + "os.stat('C:\\\\Python27\\\\Lib\\\\genericpath.py').st_size" + ], + "split": "train" + }, + { + "Input": "print unicode string '\\xd0\\xbf\\xd1\\x80\\xd0\\xb8' with utf-8", + "Output Program": [ + "print u'\\xd0\\xbf\\xd1\\x80\\xd0\\xb8'.encode('raw_unicode_escape')" + ], + "Output Answer": [ + "print u'\\xd0\\xbf\\xd1\\x80\\xd0\\xb8'.encode('raw_unicode_escape')" + ], + "split": "test" + }, + { + "Input": "Iterating over a dictionary `d` using for loops", + "Output Program": [ + "for (key, value) in d.items():\n pass", + "for (key, value) in d.iteritems():\n pass" + ], + "Output Answer": [ + "for (key, value) in d.items():\n pass", + "for (key, value) in d.iteritems():\n pass" + ], + "split": "train" + }, + { + "Input": "split a string `mystring` considering the spaces ' '", + "Output Program": [ + "mystring.replace(' ', '! !').split('!')" + ], + "Output Answer": [ + "mystring.replace(' ', '! !').split('!')" + ], + "split": "test" + }, + { + "Input": "Update a user's name as `Bob Marley` having id `123` in SQLAlchemy", + "Output Program": [ + "session.query(User).filter_by(id=123).update({'name': u'Bob Marley'})" + ], + "Output Answer": [ + "session.query(User).filter_by(id=123).update({'name': u'Bob Marley'})" + ], + "split": "train" + }, + { + "Input": "disable the certificate check in https requests for url `https://kennethreitz.com`", + "Output Program": [ + "requests.get('https://kennethreitz.com', verify=False)" + ], + "Output Answer": [ + "requests.get('https://kennethreitz.com', verify=False)" + ], + "split": "train" + }, + { + "Input": "split a string into a list of words and whitespace", + "Output Program": [ + "re.split('(\\\\W+)', s)" + ], + "Output Answer": [ + "re.split('(\\\\W+)', s)" + ], + "split": "test" + }, + { + "Input": "BeautifulSoup search string 'Elsie' inside tag 'a'", + "Output Program": [ + "soup.find_all('a', string='Elsie')" + ], + "Output Answer": [ + "soup.find_all('a', string='Elsie')" + ], + "split": "train" + }, + { + "Input": "get list of string elements in string `data` delimited by commas, putting `0` in place of empty strings", + "Output Program": [ + "[(int(x) if x else 0) for x in data.split(',')]" + ], + "Output Answer": [ + "[(int(x) if x else 0) for x in data.split(',')]" + ], + "split": "train" + }, + { + "Input": "reverse a list `array`", + "Output Program": [ + "reversed(array)", + "list(reversed(array))" + ], + "Output Answer": [ + "reversed(array)", + "list(reversed(array))" + ], + "split": "train" + }, + { + "Input": "set environment variable 'DEBUSSY' equal to 1", + "Output Program": [ + "os.environ['DEBUSSY'] = '1'" + ], + "Output Answer": [ + "os.environ['DEBUSSY'] = '1'" + ], + "split": "train" + }, + { + "Input": "find all occurrences of a substring in a string", + "Output Program": [ + "[m.start() for m in re.finditer('test', 'test test test test')]" + ], + "Output Answer": [ + "[m.start() for m in re.finditer('test', 'test test test test')]" + ], + "split": "train" + }, + { + "Input": "print float `a` with two decimal points", + "Output Program": [ + "print(('%.2f' % a))", + "print('{0:.2f}'.format(a))", + "print(('%.2f' % round(a, 2)))", + "print('{0:.2f}'.format(round(a, 2)))" + ], + "Output Answer": [ + "print(('%.2f' % a))", + "print('{0:.2f}'.format(a))", + "print(('%.2f' % round(a, 2)))", + "print('{0:.2f}'.format(round(a, 2)))" + ], + "split": "train" + }, + { + "Input": "rename `last` row index label in dataframe `df` to `a`", + "Output Program": [ + "df = df.rename(index={last: 'a'})" + ], + "Output Answer": [ + "df = df.rename(index={last: 'a'})" + ], + "split": "train" + }, + { + "Input": "print variable `value ` without spaces", + "Output Program": [ + "print 'Value is \"' + str(value) + '\"'" + ], + "Output Answer": [ + "print 'Value is \"' + str(value) + '\"'" + ], + "split": "train" + }, + { + "Input": "Copy list `old_list` and name it `new_list`", + "Output Program": [ + "new_list = [x[:] for x in old_list]" + ], + "Output Answer": [ + "new_list = [x[:] for x in old_list]" + ], + "split": "train" + }, + { + "Input": "Check if tuple (2, 3) is not in a list [(2, 3), (5, 6), (9, 1)]", + "Output Program": [ + "((2, 3) not in [(2, 3), (5, 6), (9, 1)])" + ], + "Output Answer": [ + "((2, 3) not in [(2, 3), (5, 6), (9, 1)])" + ], + "split": "train" + }, + { + "Input": "delete all occurrences of character 'i' in string 'it is icy'", + "Output Program": [ + "\"\"\"\"\"\".join(filter(lambda char: char != 'i', 'it is icy'))" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(filter(lambda char: char != 'i', 'it is icy'))" + ], + "split": "test" + }, + { + "Input": "convert index at level 0 into a column in dataframe `df`", + "Output Program": [ + "df.reset_index(level=0, inplace=True)" + ], + "Output Answer": [ + "df.reset_index(level=0, inplace=True)" + ], + "split": "test" + }, + { + "Input": "insert elements of list `k` into list `a` at position `n`", + "Output Program": [ + "a = a[:n] + k + a[n:]" + ], + "Output Answer": [ + "a = a[:n] + k + a[n:]" + ], + "split": "train" + }, + { + "Input": "display attribute `attr` for each object `obj` in list `my_list_of_objs`", + "Output Program": [ + "print [obj.attr for obj in my_list_of_objs]" + ], + "Output Answer": [ + "print [obj.attr for obj in my_list_of_objs]" + ], + "split": "train" + }, + { + "Input": "read a text file 'very_Important.txt' into a string variable `str`", + "Output Program": [ + "str = open('very_Important.txt', 'r').read()" + ], + "Output Answer": [ + "str = open('very_Important.txt', 'r').read()" + ], + "split": "train" + }, + { + "Input": "get http header of the key 'your-header-name' in flask", + "Output Program": [ + "request.headers['your-header-name']" + ], + "Output Answer": [ + "request.headers['your-header-name']" + ], + "split": "train" + }, + { + "Input": "limit float 13.949999999999999 to two decimal points", + "Output Program": [ + "float('{0:.2f}'.format(13.95))", + "'{0:.2f}'.format(13.95)" + ], + "Output Answer": [ + "float('{0:.2f}'.format(13.95))", + "'{0:.2f}'.format(13.95)" + ], + "split": "train" + }, + { + "Input": "select values from column 'A' for which corresponding values in column 'B' will be greater than 50, and in column 'C' - equal 900 in dataframe `df`", + "Output Program": [ + "df['A'][(df['B'] > 50) & (df['C'] == 900)]" + ], + "Output Answer": [ + "df['A'][(df['B'] > 50) & (df['C'] == 900)]" + ], + "split": "test" + }, + { + "Input": "round 1123.456789 to be an integer", + "Output Program": [ + "print round(1123.456789, -1)" + ], + "Output Answer": [ + "print round(1123.456789, -1)" + ], + "split": "train" + }, + { + "Input": "Iterate over dictionary `d` in ascending order of values", + "Output Program": [ + "sorted(d.iteritems(), key=lambda x: x[1])" + ], + "Output Answer": [ + "sorted(d.iteritems(), key=lambda x: x[1])" + ], + "split": "train" + }, + { + "Input": "plot logarithmic axes with matplotlib", + "Output Program": [ + "ax.set_yscale('log')" + ], + "Output Answer": [ + "ax.set_yscale('log')" + ], + "split": "train" + }, + { + "Input": "extract date from a string 'monkey 20/01/1980 love banana'", + "Output Program": [ + "dparser.parse('monkey 20/01/1980 love banana', fuzzy=True)" + ], + "Output Answer": [ + "dparser.parse('monkey 20/01/1980 love banana', fuzzy=True)" + ], + "split": "train" + }, + { + "Input": "convert the sum of list `walls` into a hex presentation", + "Output Program": [ + "hex(sum(b << i for i, b in enumerate(reversed(walls))))" + ], + "Output Answer": [ + "hex(sum(b << i for i, b in enumerate(reversed(walls))))" + ], + "split": "train" + }, + { + "Input": "remove white space padding around a saved image `test.png` in matplotlib", + "Output Program": [ + "plt.savefig('test.png', bbox_inches='tight')" + ], + "Output Answer": [ + "plt.savefig('test.png', bbox_inches='tight')" + ], + "split": "train" + }, + { + "Input": "make a flat list from list of lists `list2d`", + "Output Program": [ + "list(itertools.chain(*list2d))", + "list(itertools.chain.from_iterable(list2d))" + ], + "Output Answer": [ + "list(itertools.chain(*list2d))", + "list(itertools.chain.from_iterable(list2d))" + ], + "split": "train" + }, + { + "Input": "convert a urllib unquoted string `unescaped` to a json data `json_data`", + "Output Program": [ + "json_data = json.loads(unescaped)" + ], + "Output Answer": [ + "json_data = json.loads(unescaped)" + ], + "split": "test" + }, + { + "Input": "Create a key `key` if it does not exist in dict `dic` and append element `value` to value.", + "Output Program": [ + "dic.setdefault(key, []).append(value)" + ], + "Output Answer": [ + "dic.setdefault(key, []).append(value)" + ], + "split": "train" + }, + { + "Input": "replace carriage return in string `somestring` with empty string ''", + "Output Program": [ + "somestring.replace('\\\\r', '')" + ], + "Output Answer": [ + "somestring.replace('\\\\r', '')" + ], + "split": "train" + }, + { + "Input": "remove duplicates from list `myset`", + "Output Program": [ + "mynewlist = list(myset)" + ], + "Output Answer": [ + "mynewlist = list(myset)" + ], + "split": "train" + }, + { + "Input": "Get only first element in each of the innermost of the multidimensional list `listD`", + "Output Program": [ + "[[[x[0]] for x in listD[i]] for i in range(len(listD))]" + ], + "Output Answer": [ + "[[[x[0]] for x in listD[i]] for i in range(len(listD))]" + ], + "split": "train" + }, + { + "Input": "generate pdf file `output_filename` from markdown file `input_filename`", + "Output Program": [ + "with open(input_filename, 'r') as f:\n html_text = markdown(f.read(), output_format='html4')\npdfkit.from_string(html_text, output_filename)" + ], + "Output Answer": [ + "with open(input_filename, 'r') as f:\n html_text = markdown(f.read(), output_format='html4')\npdfkit.from_string(html_text, output_filename)" + ], + "split": "train" + }, + { + "Input": "Change the current directory one level up", + "Output Program": [ + "os.chdir('..')" + ], + "Output Answer": [ + "os.chdir('..')" + ], + "split": "train" + }, + { + "Input": "list all the contents of the directory 'path'.", + "Output Program": [ + "os.listdir('path')" + ], + "Output Answer": [ + "os.listdir('path')" + ], + "split": "train" + }, + { + "Input": "display the float `1/3*100` as a percentage", + "Output Program": [ + "print '{0:.0f}%'.format(1.0 / 3 * 100)" + ], + "Output Answer": [ + "print '{0:.0f}%'.format(1.0 / 3 * 100)" + ], + "split": "test" + }, + { + "Input": "merge a list of dictionaries in list `L` into a single dict", + "Output Program": [ + "{k: v for d in L for k, v in d.items()}" + ], + "Output Answer": [ + "{k: v for d in L for k, v in d.items()}" + ], + "split": "train" + }, + { + "Input": "sum all elements of nested list `L`", + "Output Program": [ + "sum(sum(i) if isinstance(i, list) else i for i in L)" + ], + "Output Answer": [ + "sum(sum(i) if isinstance(i, list) else i for i in L)" + ], + "split": "test" + }, + { + "Input": "Reverse a string 'hello world'", + "Output Program": [ + "'hello world'[::(-1)]" + ], + "Output Answer": [ + "'hello world'[::(-1)]" + ], + "split": "train" + }, + { + "Input": "split unicode string \"\u0440\u0430\u0437 \u0434\u0432\u0430 \u0442\u0440\u0438\" into words", + "Output Program": [ + "u'\\u0440\\u0430\\u0437 \\u0434\\u0432\\u0430 \\u0442\\u0440\\u0438'.split()" + ], + "Output Answer": [ + "u'\\u0440\\u0430\\u0437 \\u0434\\u0432\\u0430 \\u0442\\u0440\\u0438'.split()" + ], + "split": "train" + }, + { + "Input": "extract dictionary `d` from list `a` where the value associated with the key 'name' of dictionary `d` is equal to 'pluto'", + "Output Program": [ + "[d for d in a if d['name'] == 'pluto']" + ], + "Output Answer": [ + "[d for d in a if d['name'] == 'pluto']" + ], + "split": "train" + }, + { + "Input": "cut off the last word of a sentence `content`", + "Output Program": [ + "\"\"\" \"\"\".join(content.split(' ')[:-1])" + ], + "Output Answer": [ + "\"\"\" \"\"\".join(content.split(' ')[:-1])" + ], + "split": "test" + }, + { + "Input": "remove newline in string `s`", + "Output Program": [ + "s.strip()" + ], + "Output Answer": [ + "s.strip()" + ], + "split": "train" + }, + { + "Input": "append a list [8, 7] to list `foo`", + "Output Program": [ + "foo.append([8, 7])" + ], + "Output Answer": [ + "foo.append([8, 7])" + ], + "split": "train" + }, + { + "Input": "iterate over a dictionary `foo` sorted by the key", + "Output Program": [ + "for k in sorted(foo.keys()):\n pass" + ], + "Output Answer": [ + "for k in sorted(foo.keys()):\n pass" + ], + "split": "train" + }, + { + "Input": "Set value for key `a` in dict `count` to `0` if key `a` does not exist or if value is `none`", + "Output Program": [ + "count.setdefault('a', 0)" + ], + "Output Answer": [ + "count.setdefault('a', 0)" + ], + "split": "train" + }, + { + "Input": "decode a hex string '4a4b4c' to UTF-8.", + "Output Program": [ + "bytes.fromhex('4a4b4c').decode('utf-8')" + ], + "Output Answer": [ + "bytes.fromhex('4a4b4c').decode('utf-8')" + ], + "split": "test" + }, + { + "Input": "remove dictionary from list `a` if the value associated with its key 'link' is in list `b`", + "Output Program": [ + "a = [x for x in a if x['link'] not in b]" + ], + "Output Answer": [ + "a = [x for x in a if x['link'] not in b]" + ], + "split": "train" + }, + { + "Input": "Sort a structured numpy array 'df' on multiple columns 'year', 'month' and 'day'.", + "Output Program": [ + "df.sort(['year', 'month', 'day'])" + ], + "Output Answer": [ + "df.sort(['year', 'month', 'day'])" + ], + "split": "train" + }, + { + "Input": "search and split string 'aaa bbb ccc ddd eee fff' by delimiter '(ddd)'", + "Output Program": [ + "re.split('(ddd)', 'aaa bbb ccc ddd eee fff', 1)" + ], + "Output Answer": [ + "re.split('(ddd)', 'aaa bbb ccc ddd eee fff', 1)" + ], + "split": "train" + }, + { + "Input": "Find current directory", + "Output Program": [ + "cwd = os.getcwd()" + ], + "Output Answer": [ + "cwd = os.getcwd()" + ], + "split": "train" + }, + { + "Input": "throw a runtime error with message 'specific message'", + "Output Program": [ + "raise RuntimeError('specific message')" + ], + "Output Answer": [ + "raise RuntimeError('specific message')" + ], + "split": "train" + }, + { + "Input": "save xlsxwriter file to 'C:/Users/Steven/Documents/demo.xlsx' path", + "Output Program": [ + "workbook = xlsxwriter.Workbook('C:/Users/Steven/Documents/demo.xlsx')" + ], + "Output Answer": [ + "workbook = xlsxwriter.Workbook('C:/Users/Steven/Documents/demo.xlsx')" + ], + "split": "train" + }, + { + "Input": "sort a dictionary `d` by key", + "Output Program": [ + "OrderedDict(sorted(d.items(), key=(lambda t: t[0])))" + ], + "Output Answer": [ + "OrderedDict(sorted(d.items(), key=(lambda t: t[0])))" + ], + "split": "train" + }, + { + "Input": "convert a hex-string representation to actual bytes", + "Output Program": [ + "\"\"\"\\\\xF3\\\\xBE\\\\x80\\\\x80\"\"\".replace('\\\\x', '').decode('hex')" + ], + "Output Answer": [ + "\"\"\"\\\\xF3\\\\xBE\\\\x80\\\\x80\"\"\".replace('\\\\x', '').decode('hex')" + ], + "split": "test" + }, + { + "Input": "get a name of function `my_function` as a string", + "Output Program": [ + "my_function.func_name" + ], + "Output Answer": [ + "my_function.func_name" + ], + "split": "train" + }, + { + "Input": "create list of values from dictionary `dict1` that have a key that starts with 'EMP$$'", + "Output Program": [ + "[value for key, value in dict1.items() if key.startswith('EMP$$')]" + ], + "Output Answer": [ + "[value for key, value in dict1.items() if key.startswith('EMP$$')]" + ], + "split": "test" + }, + { + "Input": "round number `value` up to `significantDigit` decimal places", + "Output Program": [ + "round(value, significantDigit)" + ], + "Output Answer": [ + "round(value, significantDigit)" + ], + "split": "train" + }, + { + "Input": "extract first column from a multi-dimensional array `a`", + "Output Program": [ + "[row[0] for row in a]" + ], + "Output Answer": [ + "[row[0] for row in a]" + ], + "split": "train" + }, + { + "Input": "Determine the byte length of a utf-8 encoded string `s`", + "Output Program": [ + "return len(s.encode('utf-8'))" + ], + "Output Answer": [ + "return len(s.encode('utf-8'))" + ], + "split": "train" + }, + { + "Input": "check if all elements in a list 'lst' are the same type 'int'", + "Output Program": [ + "all(isinstance(x, int) for x in lst)" + ], + "Output Answer": [ + "all(isinstance(x, int) for x in lst)" + ], + "split": "train" + }, + { + "Input": "Remove character `char` from a string `a`", + "Output Program": [ + "a = a.replace(char, '')" + ], + "Output Answer": [ + "a = a.replace(char, '')" + ], + "split": "train" + }, + { + "Input": "remove adjacent duplicate elements from a list `[1, 2, 2, 3, 2, 2, 4]`", + "Output Program": [ + "[k for k, g in itertools.groupby([1, 2, 2, 3, 2, 2, 4])]" + ], + "Output Answer": [ + "[k for k, g in itertools.groupby([1, 2, 2, 3, 2, 2, 4])]" + ], + "split": "train" + }, + { + "Input": "split string \"This is a string\" into words that do not contain whitespaces", + "Output Program": [ + "\"\"\"This is a string\"\"\".split()" + ], + "Output Answer": [ + "\"\"\"This is a string\"\"\".split()" + ], + "split": "train" + }, + { + "Input": "What's the best way to search for a Python dictionary value in a list of dictionaries?", + "Output Program": [ + "any(d['site'] == 'Superuser' for d in data)" + ], + "Output Answer": [ + "any(d['site'] == 'Superuser' for d in data)" + ], + "split": "train" + }, + { + "Input": "Concatenate dataframe `df_1` to dataframe `df_2` sorted by values of the column 'y'", + "Output Program": [ + "pd.concat([df_1, df_2.sort_values('y')])" + ], + "Output Answer": [ + "pd.concat([df_1, df_2.sort_values('y')])" + ], + "split": "train" + }, + { + "Input": "remove all whitespace in a string `sentence`", + "Output Program": [ + "pattern = re.compile('\\\\s+')\nsentence = re.sub(pattern, '', sentence)", + "sentence.replace(' ', '')" + ], + "Output Answer": [ + "pattern = re.compile('\\\\s+')\nsentence = re.sub(pattern, '', sentence)", + "sentence.replace(' ', '')" + ], + "split": "train" + }, + { + "Input": "Format string `hello {name}, how are you {name}, welcome {name}` to be interspersed by `name` three times, specifying the value as `john` only once", + "Output Program": [ + "\"\"\"hello {name}, how are you {name}, welcome {name}\"\"\".format(name='john')" + ], + "Output Answer": [ + "\"\"\"hello {name}, how are you {name}, welcome {name}\"\"\".format(name='john')" + ], + "split": "train" + }, + { + "Input": "scroll to the bottom of a web page using selenium webdriver", + "Output Program": [ + "driver.execute_script('window.scrollTo(0, Y)')" + ], + "Output Answer": [ + "driver.execute_script('window.scrollTo(0, Y)')" + ], + "split": "train" + }, + { + "Input": "left trimming \"\\n\\r\" from string `myString`", + "Output Program": [ + "myString.lstrip('\\n\\r')" + ], + "Output Answer": [ + "myString.lstrip('\\n\\r')" + ], + "split": "train" + }, + { + "Input": "normalize a pandas dataframe `df` by row", + "Output Program": [ + "df.div(df.sum(axis=1), axis=0)" + ], + "Output Answer": [ + "df.div(df.sum(axis=1), axis=0)" + ], + "split": "train" + }, + { + "Input": "get index of rows in column 'BoolCol'", + "Output Program": [ + "df.loc[df['BoolCol']]" + ], + "Output Answer": [ + "df.loc[df['BoolCol']]" + ], + "split": "test" + }, + { + "Input": "print a string `s` by splitting with comma `,`", + "Output Program": [ + "print s.split(',')" + ], + "Output Answer": [ + "print s.split(',')" + ], + "split": "train" + }, + { + "Input": "sort list `trial_list` based on values of dictionary `trail_dict`", + "Output Program": [ + "sorted(trial_list, key=lambda x: trial_dict[x])" + ], + "Output Answer": [ + "sorted(trial_list, key=lambda x: trial_dict[x])" + ], + "split": "train" + }, + { + "Input": "save a numpy array `image_array` as an image 'outfile.jpg'", + "Output Program": [ + "scipy.misc.imsave('outfile.jpg', image_array)" + ], + "Output Answer": [ + "scipy.misc.imsave('outfile.jpg', image_array)" + ], + "split": "train" + }, + { + "Input": "Format a string `u'Andr\\xc3\\xa9'` that has unicode characters", + "Output Program": [ + "\"\"\"\"\"\".join(chr(ord(c)) for c in u'Andr\\xc3\\xa9')" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(chr(ord(c)) for c in u'Andr\\xc3\\xa9')" + ], + "split": "train" + }, + { + "Input": "split a list `l` into evenly sized chunks `n`", + "Output Program": [ + "[l[i:i + n] for i in range(0, len(l), n)]" + ], + "Output Answer": [ + "[l[i:i + n] for i in range(0, len(l), n)]" + ], + "split": "train" + }, + { + "Input": "find all the indexes in a Numpy 2D array where the value is 1", + "Output Program": [ + "zip(*np.where(a == 1))" + ], + "Output Answer": [ + "zip(*np.where(a == 1))" + ], + "split": "train" + }, + { + "Input": "count the number of items in a generator/iterator `it`", + "Output Program": [ + "sum(1 for i in it)" + ], + "Output Answer": [ + "sum(1 for i in it)" + ], + "split": "train" + }, + { + "Input": "get a list of the keys in each dictionary in a dictionary of dictionaries `foo`", + "Output Program": [ + "[k for d in foo.values() for k in d]" + ], + "Output Answer": [ + "[k for d in foo.values() for k in d]" + ], + "split": "train" + }, + { + "Input": "Find all `div` tags whose classes has the value `comment-` in a beautiful soup object `soup`", + "Output Program": [ + "soup.find_all('div', class_=re.compile('comment-'))" + ], + "Output Answer": [ + "soup.find_all('div', class_=re.compile('comment-'))" + ], + "split": "train" + }, + { + "Input": "insert row into mysql database with column 'column1' set to the value `value`", + "Output Program": [ + "cursor.execute('INSERT INTO table (`column1`) VALUES (%s)', (value,))" + ], + "Output Answer": [ + "cursor.execute('INSERT INTO table (`column1`) VALUES (%s)', (value,))" + ], + "split": "train" + }, + { + "Input": "select the last column of dataframe `df`", + "Output Program": [ + "df[df.columns[-1]]" + ], + "Output Answer": [ + "df[df.columns[-1]]" + ], + "split": "test" + }, + { + "Input": "For each index `x` from 0 to 3, append the element at index `x` of list `b` to the list at index `x` of list a.", + "Output Program": [ + "[a[x].append(b[x]) for x in range(3)]" + ], + "Output Answer": [ + "[a[x].append(b[x]) for x in range(3)]" + ], + "split": "train" + }, + { + "Input": "Write all tuple of tuples `A` at once into csv file", + "Output Program": [ + "writer.writerows(A)" + ], + "Output Answer": [ + "writer.writerows(A)" + ], + "split": "train" + }, + { + "Input": "delete all digits in string `s` that are not directly attached to a word character", + "Output Program": [ + "re.sub('$\\\\d+\\\\W+|\\\\b\\\\d+\\\\b|\\\\W+\\\\d+$', '', s)" + ], + "Output Answer": [ + "re.sub('$\\\\d+\\\\W+|\\\\b\\\\d+\\\\b|\\\\W+\\\\d+$', '', s)" + ], + "split": "train" + }, + { + "Input": "convert list with str into list with int", + "Output Program": [ + "list(map(int, ['1', '2', '3']))" + ], + "Output Answer": [ + "list(map(int, ['1', '2', '3']))" + ], + "split": "train" + }, + { + "Input": "loop over a list `mylist` if sublists length equals 3", + "Output Program": [ + "[x for x in mylist if len(x) == 3]" + ], + "Output Answer": [ + "[x for x in mylist if len(x) == 3]" + ], + "split": "test" + }, + { + "Input": "regex, find \"n\"s only in the middle of string `s`", + "Output Program": [ + "re.findall('n(?<=[^n]n)n+(?=[^n])(?i)', s)" + ], + "Output Answer": [ + "re.findall('n(?<=[^n]n)n+(?=[^n])(?i)', s)" + ], + "split": "test" + }, + { + "Input": "open a 'gnome' terminal from python script and run 'sudo apt-get update' command.", + "Output Program": [ + "os.system('gnome-terminal -e \\'bash -c \"sudo apt-get update; exec bash\"\\'')" + ], + "Output Answer": [ + "os.system('gnome-terminal -e \\'bash -c \"sudo apt-get update; exec bash\"\\'')" + ], + "split": "test" + }, + { + "Input": "create list `new_list` containing the last 10 elements of list `my_list`", + "Output Program": [ + "new_list = my_list[-10:]" + ], + "Output Answer": [ + "new_list = my_list[-10:]" + ], + "split": "train" + }, + { + "Input": "find the string matches within parenthesis from a string `s` using regex", + "Output Program": [ + "m = re.search('\\\\[(\\\\w+)\\\\]', s)" + ], + "Output Answer": [ + "m = re.search('\\\\[(\\\\w+)\\\\]', s)" + ], + "split": "train" + }, + { + "Input": "format string \"({0.goals} goals, ${0.penalties})\"", + "Output Program": [ + "\"\"\"({0.goals} goals, ${0.penalties})\"\"\".format(self)" + ], + "Output Answer": [ + "\"\"\"({0.goals} goals, ${0.penalties})\"\"\".format(self)" + ], + "split": "test" + }, + { + "Input": "Find all the tags `a` and `div` from Beautiful Soup object `soup`", + "Output Program": [ + "soup.find_all(['a', 'div'])" + ], + "Output Answer": [ + "soup.find_all(['a', 'div'])" + ], + "split": "train" + }, + { + "Input": "group a list `list_of_tuples` of tuples by values", + "Output Program": [ + "zip(*list_of_tuples)" + ], + "Output Answer": [ + "zip(*list_of_tuples)" + ], + "split": "train" + }, + { + "Input": "create a new 2D array with 2 random rows from array `A`", + "Output Program": [ + "A[(np.random.choice(A.shape[0], 2, replace=False)), :]" + ], + "Output Answer": [ + "A[(np.random.choice(A.shape[0], 2, replace=False)), :]" + ], + "split": "train" + }, + { + "Input": "convert ascii value 'a' to int", + "Output Program": [ + "ord('a')" + ], + "Output Answer": [ + "ord('a')" + ], + "split": "train" + }, + { + "Input": "split string \"This is a string\" into words that does not contain whitespaces", + "Output Program": [ + "\"\"\"This is a string\"\"\".split()" + ], + "Output Answer": [ + "\"\"\"This is a string\"\"\".split()" + ], + "split": "train" + }, + { + "Input": "format floating point number `TotalAmount` to be rounded off to two decimal places and have a comma thousands' seperator", + "Output Program": [ + "print 'Total cost is: ${:,.2f}'.format(TotalAmount)" + ], + "Output Answer": [ + "print 'Total cost is: ${:,.2f}'.format(TotalAmount)" + ], + "split": "train" + }, + { + "Input": "write a list of strings `row` to csv object `csvwriter`", + "Output Program": [ + "csvwriter.writerow(row)" + ], + "Output Answer": [ + "csvwriter.writerow(row)" + ], + "split": "train" + }, + { + "Input": "get modification time of file `path`", + "Output Program": [ + "os.path.getmtime(path)" + ], + "Output Answer": [ + "os.path.getmtime(path)" + ], + "split": "train" + }, + { + "Input": "request URL `url` using http header `{'referer': my_referer}`", + "Output Program": [ + "requests.get(url, headers={'referer': my_referer})" + ], + "Output Answer": [ + "requests.get(url, headers={'referer': my_referer})" + ], + "split": "train" + }, + { + "Input": "Add 100 to each element of column \"x\" in dataframe `a`", + "Output Program": [ + "a['x'].apply(lambda x, y: x + y, args=(100,))" + ], + "Output Answer": [ + "a['x'].apply(lambda x, y: x + y, args=(100,))" + ], + "split": "train" + }, + { + "Input": "get all the elements except strings from the list 'lst'.", + "Output Program": [ + "[element for element in lst if not isinstance(element, str)]" + ], + "Output Answer": [ + "[element for element in lst if not isinstance(element, str)]" + ], + "split": "test" + }, + { + "Input": "Round number `answer` to 2 precision after the decimal point", + "Output Program": [ + "answer = str(round(answer, 2))" + ], + "Output Answer": [ + "answer = str(round(answer, 2))" + ], + "split": "test" + }, + { + "Input": "escaping quotes in string", + "Output Program": [ + "replace('\"', '\\\\\"')" + ], + "Output Answer": [ + "replace('\"', '\\\\\"')" + ], + "split": "train" + }, + { + "Input": "remove key 'c' from dictionary `d`", + "Output Program": [ + "{i: d[i] for i in d if i != 'c'}" + ], + "Output Answer": [ + "{i: d[i] for i in d if i != 'c'}" + ], + "split": "test" + }, + { + "Input": "print 'here is your checkmark: ' plus unicode character u'\\u2713'", + "Output Program": [ + "print 'here is your checkmark: ' + u'\\u2713'" + ], + "Output Answer": [ + "print 'here is your checkmark: ' + u'\\u2713'" + ], + "split": "train" + }, + { + "Input": "Get a list comprehension in list of lists `X`", + "Output Program": [ + "[[X[i][j] for j in range(len(X[i]))] for i in range(len(X))]" + ], + "Output Answer": [ + "[[X[i][j] for j in range(len(X[i]))] for i in range(len(X))]" + ], + "split": "train" + }, + { + "Input": "python pickle/unpickle a list to/from a file 'afile'", + "Output Program": [ + "pickle.load(open('afile', 'rb'))" + ], + "Output Answer": [ + "pickle.load(open('afile', 'rb'))" + ], + "split": "train" + }, + { + "Input": "Check if key 'a' in `d`", + "Output Program": [ + "('a' in d)" + ], + "Output Answer": [ + "('a' in d)" + ], + "split": "train" + }, + { + "Input": "specify multiple positional arguments with argparse", + "Output Program": [ + "parser.add_argument('input', nargs='+')" + ], + "Output Answer": [ + "parser.add_argument('input', nargs='+')" + ], + "split": "train" + }, + { + "Input": "remove square bracket '[]' from pandas dataframe `df` column 'value'", + "Output Program": [ + "df['value'] = df['value'].str.strip('[]')" + ], + "Output Answer": [ + "df['value'] = df['value'].str.strip('[]')" + ], + "split": "train" + }, + { + "Input": "convert string `apple` from iso-8859-1/latin1 to utf-8", + "Output Program": [ + "apple.decode('iso-8859-1').encode('utf8')" + ], + "Output Answer": [ + "apple.decode('iso-8859-1').encode('utf8')" + ], + "split": "train" + }, + { + "Input": "Sort items in dictionary `d` using the first part of the key after splitting the key", + "Output Program": [ + "sorted(d.items(), key=lambda (name, num): (name.rsplit(None, 1)[0], num))" + ], + "Output Answer": [ + "sorted(d.items(), key=lambda (name, num): (name.rsplit(None, 1)[0], num))" + ], + "split": "train" + }, + { + "Input": "using beautifulsoup to select div blocks within html `soup`", + "Output Program": [ + "soup.find_all('div', class_='crBlock ')" + ], + "Output Answer": [ + "soup.find_all('div', class_='crBlock ')" + ], + "split": "train" + }, + { + "Input": "sort list `a` using the first dimension of the element as the key to list `b`", + "Output Program": [ + "a.sort(key=lambda x: b.index(x[0]))" + ], + "Output Answer": [ + "a.sort(key=lambda x: b.index(x[0]))" + ], + "split": "train" + }, + { + "Input": "Matplotlib change marker size to 500", + "Output Program": [ + "scatter(x, y, s=500, color='green', marker='h')" + ], + "Output Answer": [ + "scatter(x, y, s=500, color='green', marker='h')" + ], + "split": "train" + }, + { + "Input": "remove first directory from path '/First/Second/Third/Fourth/Fifth'", + "Output Program": [ + "os.path.join(*x.split(os.path.sep)[2:])" + ], + "Output Answer": [ + "os.path.join(*x.split(os.path.sep)[2:])" + ], + "split": "train" + }, + { + "Input": "set the stdin of the process 'grep f' to be b'one\\ntwo\\nthree\\nfour\\nfive\\nsix\\n'", + "Output Program": [ + "p = Popen(['grep', 'f'], stdout=PIPE, stdin=PIPE, stderr=STDOUT)\ngrep_stdout = p.communicate(input='one\\ntwo\\nthree\\nfour\\nfive\\nsix\\n')[0]" + ], + "Output Answer": [ + "p = Popen(['grep', 'f'], stdout=PIPE, stdin=PIPE, stderr=STDOUT)\ngrep_stdout = p.communicate(input='one\\ntwo\\nthree\\nfour\\nfive\\nsix\\n')[0]" + ], + "split": "train" + }, + { + "Input": "remove a key 'key' from a dictionary `my_dict`", + "Output Program": [ + "my_dict.pop('key', None)" + ], + "Output Answer": [ + "my_dict.pop('key', None)" + ], + "split": "train" + }, + { + "Input": "get the average of a list values for each key in dictionary `d`)", + "Output Program": [ + "[(i, sum(j) / len(j)) for i, j in d.items()]" + ], + "Output Answer": [ + "[(i, sum(j) / len(j)) for i, j in d.items()]" + ], + "split": "train" + }, + { + "Input": "sort list `l` based on its elements' digits", + "Output Program": [ + "sorted(l, key=lambda x: int(re.search('\\\\d+', x).group(0)))" + ], + "Output Answer": [ + "sorted(l, key=lambda x: int(re.search('\\\\d+', x).group(0)))" + ], + "split": "train" + }, + { + "Input": "delete all occureces of `8` in each string `s` in list `lst`", + "Output Program": [ + "print [s.replace('8', '') for s in lst]" + ], + "Output Answer": [ + "print [s.replace('8', '') for s in lst]" + ], + "split": "train" + }, + { + "Input": "Convert a string of numbers 'example_string' separated by comma into a list of numbers", + "Output Program": [ + "[int(s) for s in example_string.split(',')]" + ], + "Output Answer": [ + "[int(s) for s in example_string.split(',')]" + ], + "split": "train" + }, + { + "Input": "Split string `Hello` into a string of letters seperated by `,`", + "Output Program": [ + "\"\"\",\"\"\".join('Hello')" + ], + "Output Answer": [ + "\"\"\",\"\"\".join('Hello')" + ], + "split": "train" + }, + { + "Input": "print unicode string `ex\\xe1mple` in uppercase", + "Output Program": [ + "print u'ex\\xe1mple'.upper()" + ], + "Output Answer": [ + "print u'ex\\xe1mple'.upper()" + ], + "split": "train" + }, + { + "Input": "sort a zipped list `zipped` using lambda function", + "Output Program": [ + "sorted(zipped, key=lambda x: x[1])" + ], + "Output Answer": [ + "sorted(zipped, key=lambda x: x[1])" + ], + "split": "train" + }, + { + "Input": "sort a list of strings 'mylist'.", + "Output Program": [ + "mylist.sort()" + ], + "Output Answer": [ + "mylist.sort()" + ], + "split": "train" + }, + { + "Input": "retrieve arabic texts from string `my_string`", + "Output Program": [ + "print re.findall('[\\\\u0600-\\\\u06FF]+', my_string)" + ], + "Output Answer": [ + "print re.findall('[\\\\u0600-\\\\u06FF]+', my_string)" + ], + "split": "train" + }, + { + "Input": "click a href button having text `Send InMail` with selenium", + "Output Program": [ + "driver.findElement(By.linkText('Send InMail')).click()" + ], + "Output Answer": [ + "driver.findElement(By.linkText('Send InMail')).click()" + ], + "split": "test" + }, + { + "Input": "get the size of list `items`", + "Output Program": [ + "len(items)" + ], + "Output Answer": [ + "len(items)" + ], + "split": "train" + }, + { + "Input": "create a list `result` containing elements form list `list_a` if first element of list `list_a` is in list `list_b`", + "Output Program": [ + "result = [x for x in list_a if x[0] in list_b]" + ], + "Output Answer": [ + "result = [x for x in list_a if x[0] in list_b]" + ], + "split": "train" + }, + { + "Input": "select `div` tags whose `id`s begin with `value_xxx_c_1_f_8_a_`", + "Output Program": [ + "soup.select('div[id^=\"value_xxx_c_1_f_8_a_\"]')" + ], + "Output Answer": [ + "soup.select('div[id^=\"value_xxx_c_1_f_8_a_\"]')" + ], + "split": "train" + }, + { + "Input": "convert a string `123,456.908` with dot and comma into a floating number", + "Output Program": [ + "float('123,456.908'.replace(',', ''))" + ], + "Output Answer": [ + "float('123,456.908'.replace(',', ''))" + ], + "split": "test" + }, + { + "Input": "get the creation time of file `file`", + "Output Program": [ + "print ('created: %s' % time.ctime(os.path.getctime(file)))" + ], + "Output Answer": [ + "print ('created: %s' % time.ctime(os.path.getctime(file)))" + ], + "split": "train" + }, + { + "Input": "lookup an attribute in any scope by name 'range'", + "Output Program": [ + "getattr(__builtins__, 'range')" + ], + "Output Answer": [ + "getattr(__builtins__, 'range')" + ], + "split": "train" + }, + { + "Input": "append each line in file `myfile` into a list", + "Output Program": [ + "[x for x in myfile.splitlines() if x != '']" + ], + "Output Answer": [ + "[x for x in myfile.splitlines() if x != '']" + ], + "split": "test" + }, + { + "Input": "print a string using multiple strings `name` and `score`", + "Output Program": [ + "print 'Total score for %s is %s ' % (name, score)" + ], + "Output Answer": [ + "print 'Total score for %s is %s ' % (name, score)" + ], + "split": "train" + }, + { + "Input": "python, format string \"{} %s {}\" to have 'foo' and 'bar' in the first and second positions", + "Output Program": [ + "\"\"\"{} %s {}\"\"\".format('foo', 'bar')" + ], + "Output Answer": [ + "\"\"\"{} %s {}\"\"\".format('foo', 'bar')" + ], + "split": "train" + }, + { + "Input": "generate a random string of length `x` containing lower cased ASCII letters", + "Output Program": [ + "\"\"\"\"\"\".join(random.choice(string.lowercase) for x in range(X))" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(random.choice(string.lowercase) for x in range(X))" + ], + "split": "train" + }, + { + "Input": "choose a random file from the directory contents of the C drive, `C:\\\\`", + "Output Program": [ + "random.choice(os.listdir('C:\\\\'))" + ], + "Output Answer": [ + "random.choice(os.listdir('C:\\\\'))" + ], + "split": "test" + }, + { + "Input": "check if the string `myString` is empty", + "Output Program": [ + "if (not myString):\n pass" + ], + "Output Answer": [ + "if (not myString):\n pass" + ], + "split": "train" + }, + { + "Input": "split string in column 'stats' by ',' into separate columns in dataframe `df`", + "Output Program": [ + "df['stats'].str[1:-1].str.split(',').apply(pd.Series).astype(float)" + ], + "Output Answer": [ + "df['stats'].str[1:-1].str.split(',').apply(pd.Series).astype(float)" + ], + "split": "train" + }, + { + "Input": "replace values `['ABC', 'AB']` in a column 'BrandName' of pandas dataframe `df` with another value 'A'", + "Output Program": [ + "df['BrandName'] = df['BrandName'].replace(['ABC', 'AB'], 'A')" + ], + "Output Answer": [ + "df['BrandName'] = df['BrandName'].replace(['ABC', 'AB'], 'A')" + ], + "split": "train" + }, + { + "Input": "open a file `Output.txt` in append mode", + "Output Program": [ + "file = open('Output.txt', 'a')" + ], + "Output Answer": [ + "file = open('Output.txt', 'a')" + ], + "split": "test" + }, + { + "Input": "save xlsxwriter file in 'app/smth1/smth2/Expenses01.xlsx' path and assign to variable `workbook`", + "Output Program": [ + "workbook = xlsxwriter.Workbook('app/smth1/smth2/Expenses01.xlsx')" + ], + "Output Answer": [ + "workbook = xlsxwriter.Workbook('app/smth1/smth2/Expenses01.xlsx')" + ], + "split": "train" + }, + { + "Input": "remove decimal points in pandas data frame using round", + "Output Program": [ + "df.round()" + ], + "Output Answer": [ + "df.round()" + ], + "split": "train" + }, + { + "Input": "remove all non-numeric characters from string `sdkjh987978asd098as0980a98sd `", + "Output Program": [ + "re.sub('[^0-9]', '', 'sdkjh987978asd098as0980a98sd')" + ], + "Output Answer": [ + "re.sub('[^0-9]', '', 'sdkjh987978asd098as0980a98sd')" + ], + "split": "train" + }, + { + "Input": "compare contents at filehandles `file1` and `file2` using difflib", + "Output Program": [ + "difflib.SequenceMatcher(None, file1.read(), file2.read())" + ], + "Output Answer": [ + "difflib.SequenceMatcher(None, file1.read(), file2.read())" + ], + "split": "train" + }, + { + "Input": "Group the values from django model `Article` with group by value `pub_date` and annotate by `title`", + "Output Program": [ + "Article.objects.values('pub_date').annotate(article_count=Count('title'))" + ], + "Output Answer": [ + "Article.objects.values('pub_date').annotate(article_count=Count('title'))" + ], + "split": "train" + }, + { + "Input": "convert the elements of list `L` from hex byte strings to hex integers", + "Output Program": [ + "[int(x, 16) for x in L]" + ], + "Output Answer": [ + "[int(x, 16) for x in L]" + ], + "split": "train" + }, + { + "Input": "Drop the rows in pandas timeseries `df` from the row containing index `start_remove` to the row containing index `end_remove`", + "Output Program": [ + "df.loc[(df.index < start_remove) | (df.index > end_remove)]" + ], + "Output Answer": [ + "df.loc[(df.index < start_remove) | (df.index > end_remove)]" + ], + "split": "train" + }, + { + "Input": "replace all occurrences of a string `\\n` by string `
` in a pandas data frame `df`", + "Output Program": [ + "df.replace({'\\n': '
'}, regex=True)" + ], + "Output Answer": [ + "df.replace({'\\n': '
'}, regex=True)" + ], + "split": "test" + }, + { + "Input": "Remove duplicates elements from list `sequences` and sort it in ascending order", + "Output Program": [ + "sorted(set(itertools.chain.from_iterable(sequences)))" + ], + "Output Answer": [ + "sorted(set(itertools.chain.from_iterable(sequences)))" + ], + "split": "train" + }, + { + "Input": "merge list `['it']` and list `['was']` and list `['annoying']` into one list", + "Output Program": [ + "['it'] + ['was'] + ['annoying']" + ], + "Output Answer": [ + "['it'] + ['was'] + ['annoying']" + ], + "split": "test" + }, + { + "Input": "round number `x` to nearest integer", + "Output Program": [ + "int(round(x))" + ], + "Output Answer": [ + "int(round(x))" + ], + "split": "train" + }, + { + "Input": "append a path `/path/to/main_folder` in system path", + "Output Program": [ + "sys.path.append('/path/to/main_folder')" + ], + "Output Answer": [ + "sys.path.append('/path/to/main_folder')" + ], + "split": "train" + }, + { + "Input": "get the size of a list `[1,2,3]`", + "Output Program": [ + "len([1, 2, 3])" + ], + "Output Answer": [ + "len([1, 2, 3])" + ], + "split": "train" + }, + { + "Input": "print all environment variables", + "Output Program": [ + "print os.environ" + ], + "Output Answer": [ + "print os.environ" + ], + "split": "train" + }, + { + "Input": "sort a list of tuples `my_list` by second parameter in the tuple", + "Output Program": [ + "my_list.sort(key=lambda x: x[1])" + ], + "Output Answer": [ + "my_list.sort(key=lambda x: x[1])" + ], + "split": "train" + }, + { + "Input": "split string 'x+13.5*10x-4e1' into tokens", + "Output Program": [ + "print [i for i in re.split('([\\\\d.]+|\\\\W+)', 'x+13.5*10x-4e1') if i]" + ], + "Output Answer": [ + "print [i for i in re.split('([\\\\d.]+|\\\\W+)', 'x+13.5*10x-4e1') if i]" + ], + "split": "train" + }, + { + "Input": "filter the objects in django model 'Sample' between date range `2011-01-01` and `2011-01-31`", + "Output Program": [ + "Sample.objects.filter(date__range=['2011-01-01', '2011-01-31'])" + ], + "Output Answer": [ + "Sample.objects.filter(date__range=['2011-01-01', '2011-01-31'])" + ], + "split": "train" + }, + { + "Input": "print a celsius symbol on x axis of a plot `ax`", + "Output Program": [ + "ax.set_xlabel(u'Temperature (\\u2103)')" + ], + "Output Answer": [ + "ax.set_xlabel(u'Temperature (\\u2103)')" + ], + "split": "train" + }, + { + "Input": "get modification time of file `filename`", + "Output Program": [ + "t = os.path.getmtime(filename)" + ], + "Output Answer": [ + "t = os.path.getmtime(filename)" + ], + "split": "train" + }, + { + "Input": "create 3 by 3 matrix of random numbers", + "Output Program": [ + "numpy.random.random((3, 3))" + ], + "Output Answer": [ + "numpy.random.random((3, 3))" + ], + "split": "train" + }, + { + "Input": "find all the rows in Dataframe 'df2' that are also present in Dataframe 'df1', for the columns 'A', 'B', 'C' and 'D'.", + "Output Program": [ + "pd.merge(df1, df2, on=['A', 'B', 'C', 'D'], how='inner')" + ], + "Output Answer": [ + "pd.merge(df1, df2, on=['A', 'B', 'C', 'D'], how='inner')" + ], + "split": "train" + }, + { + "Input": "find all digits between two characters `\\xab` and `\\xbb`in a string `text`", + "Output Program": [ + "print re.findall(u'\\\\d+', '\\n'.join(re.findall(u'\\xab([\\\\s\\\\S]*?)\\xbb', text)))" + ], + "Output Answer": [ + "print re.findall(u'\\\\d+', '\\n'.join(re.findall(u'\\xab([\\\\s\\\\S]*?)\\xbb', text)))" + ], + "split": "train" + }, + { + "Input": "append line \"appended text\" to file \"test.txt\"", + "Output Program": [ + "with open('test.txt', 'a') as myfile:\n myfile.write('appended text')" + ], + "Output Answer": [ + "with open('test.txt', 'a') as myfile:\n myfile.write('appended text')" + ], + "split": "train" + }, + { + "Input": "list all files in a current directory", + "Output Program": [ + "glob.glob('*')" + ], + "Output Answer": [ + "glob.glob('*')" + ], + "split": "train" + }, + { + "Input": "Remove characters \"!@#$\" from a string `line`", + "Output Program": [ + "line.translate(None, '!@#$')", + "line = re.sub('[!@#$]', '', line)" + ], + "Output Answer": [ + "line.translate(None, '!@#$')", + "line = re.sub('[!@#$]', '', line)" + ], + "split": "train" + }, + { + "Input": "convert a raw string `raw_byte_string` into a normal string", + "Output Program": [ + "raw_byte_string.decode('unicode_escape')" + ], + "Output Answer": [ + "raw_byte_string.decode('unicode_escape')" + ], + "split": "test" + }, + { + "Input": "sort list `mylist` alphabetically", + "Output Program": [ + "mylist.sort(key=lambda x: x.lower())" + ], + "Output Answer": [ + "mylist.sort(key=lambda x: x.lower())" + ], + "split": "train" + }, + { + "Input": "get current url in selenium webdriver `browser`", + "Output Program": [ + "print browser.current_url" + ], + "Output Answer": [ + "print browser.current_url" + ], + "split": "train" + }, + { + "Input": "split string `text` by \",\"", + "Output Program": [ + "text.split(',')" + ], + "Output Answer": [ + "text.split(',')" + ], + "split": "test" + }, + { + "Input": "Exclude column names when writing dataframe `df` to a csv file `filename.csv`", + "Output Program": [ + "df.to_csv('filename.csv', header=False)" + ], + "Output Answer": [ + "df.to_csv('filename.csv', header=False)" + ], + "split": "train" + }, + { + "Input": "Log message of level 'info' with value of `date` in the message", + "Output Program": [ + "logging.info('date={}'.format(date))" + ], + "Output Answer": [ + "logging.info('date={}'.format(date))" + ], + "split": "train" + }, + { + "Input": "produce a pivot table as dataframe using column 'Y' in datafram `df` to form the axes of the resulting dataframe", + "Output Program": [ + "df.pivot_table('Y', rows='X', cols='X2')" + ], + "Output Answer": [ + "df.pivot_table('Y', rows='X', cols='X2')" + ], + "split": "train" + }, + { + "Input": "use `%s` operator to print variable values `str1` inside a string", + "Output Program": [ + "'first string is: %s, second one is: %s' % (str1, 'geo.tif')" + ], + "Output Answer": [ + "'first string is: %s, second one is: %s' % (str1, 'geo.tif')" + ], + "split": "test" + }, + { + "Input": "trim string \" Hello \"", + "Output Program": [ + "' Hello '.strip()" + ], + "Output Answer": [ + "' Hello '.strip()" + ], + "split": "train" + }, + { + "Input": "select rows from a dataframe `df` whose value for column `column_name` is not in `some_values`", + "Output Program": [ + "df.loc[~df['column_name'].isin(some_values)]" + ], + "Output Answer": [ + "df.loc[~df['column_name'].isin(some_values)]" + ], + "split": "train" + }, + { + "Input": "delete an item `thing` in a list `some_list` if it exists", + "Output Program": [ + "cleaned_list = [x for x in some_list if x is not thing]" + ], + "Output Answer": [ + "cleaned_list = [x for x in some_list if x is not thing]" + ], + "split": "train" + }, + { + "Input": "click a href button with text 'Send InMail' with selenium", + "Output Program": [ + "driver.find_element_by_link_text('Send InMail').click()" + ], + "Output Answer": [ + "driver.find_element_by_link_text('Send InMail').click()" + ], + "split": "test" + }, + { + "Input": "Get only digits from a string `strs`", + "Output Program": [ + "\"\"\"\"\"\".join([c for c in strs if c.isdigit()])" + ], + "Output Answer": [ + "\"\"\"\"\"\".join([c for c in strs if c.isdigit()])" + ], + "split": "train" + }, + { + "Input": "get value of the environment variable 'KEY_THAT_MIGHT_EXIST'", + "Output Program": [ + "print os.environ.get('KEY_THAT_MIGHT_EXIST')" + ], + "Output Answer": [ + "print os.environ.get('KEY_THAT_MIGHT_EXIST')" + ], + "split": "train" + }, + { + "Input": "convert a string literal `s` with values `\\\\` to raw string literal", + "Output Program": [ + "s = s.replace('\\\\', '\\\\\\\\')" + ], + "Output Answer": [ + "s = s.replace('\\\\', '\\\\\\\\')" + ], + "split": "train" + }, + { + "Input": "return a random word from a word list 'words'", + "Output Program": [ + "print random.choice(words)" + ], + "Output Answer": [ + "print random.choice(words)" + ], + "split": "train" + }, + { + "Input": "Sort a list 'lst' in descending order.", + "Output Program": [ + "sorted(lst, reverse=True)" + ], + "Output Answer": [ + "sorted(lst, reverse=True)" + ], + "split": "train" + }, + { + "Input": "Open a file `path/to/FILE_NAME.ext` in write mode", + "Output Program": [ + "new_file = open('path/to/FILE_NAME.ext', 'w')" + ], + "Output Answer": [ + "new_file = open('path/to/FILE_NAME.ext', 'w')" + ], + "split": "test" + }, + { + "Input": "split string 'happy_hats_for_cats' using string '_for_'", + "Output Program": [ + "re.split('_for_', 'happy_hats_for_cats')" + ], + "Output Answer": [ + "re.split('_for_', 'happy_hats_for_cats')" + ], + "split": "train" + }, + { + "Input": "remove duplicate elements from list 'L'", + "Output Program": [ + "dict((x[0], x) for x in L).values()" + ], + "Output Answer": [ + "dict((x[0], x) for x in L).values()" + ], + "split": "test" + }, + { + "Input": "Get a repeated pandas data frame object `x` by `5` times", + "Output Program": [ + "pd.concat([x] * 5)" + ], + "Output Answer": [ + "pd.concat([x] * 5)" + ], + "split": "train" + }, + { + "Input": "Check if the value of the key \"name\" is \"Test\" in a list of dictionaries `label`", + "Output Program": [ + "any(d['name'] == 'Test' for d in label)" + ], + "Output Answer": [ + "any(d['name'] == 'Test' for d in label)" + ], + "split": "train" + }, + { + "Input": "sorting list 'X' based on values from another list 'Y'", + "Output Program": [ + "[x for y, x in sorted(zip(Y, X))]" + ], + "Output Answer": [ + "[x for y, x in sorted(zip(Y, X))]" + ], + "split": "train" + }, + { + "Input": "unzip list `[('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e', )]`", + "Output Program": [ + "zip(*[('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e',)])" + ], + "Output Answer": [ + "zip(*[('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e',)])" + ], + "split": "test" + }, + { + "Input": "BeautifulSoup find tag 'div' with styling 'width=300px;' in HTML string `soup`", + "Output Program": [ + "soup.findAll('div', style='width=300px;')" + ], + "Output Answer": [ + "soup.findAll('div', style='width=300px;')" + ], + "split": "train" + }, + { + "Input": "SQLAlchemy count the number of rows in table `Congress`", + "Output Program": [ + "rows = session.query(Congress).count()" + ], + "Output Answer": [ + "rows = session.query(Congress).count()" + ], + "split": "train" + }, + { + "Input": "concatenate sequence of numpy arrays `LIST` into a one dimensional array along the first axis", + "Output Program": [ + "numpy.concatenate(LIST, axis=0)" + ], + "Output Answer": [ + "numpy.concatenate(LIST, axis=0)" + ], + "split": "train" + }, + { + "Input": "print each first value from a list of tuples `mytuple` with string formatting", + "Output Program": [ + "print ', ,'.join([str(i[0]) for i in mytuple])" + ], + "Output Answer": [ + "print ', ,'.join([str(i[0]) for i in mytuple])" + ], + "split": "train" + }, + { + "Input": "sort string `s` in lexicographic order", + "Output Program": [ + "sorted(sorted(s), key=str.upper)" + ], + "Output Answer": [ + "sorted(sorted(s), key=str.upper)" + ], + "split": "train" + }, + { + "Input": "select rows of dataframe `df` whose value for column `A` is `foo`", + "Output Program": [ + "print df.loc[df['A'] == 'foo']" + ], + "Output Answer": [ + "print df.loc[df['A'] == 'foo']" + ], + "split": "train" + }, + { + "Input": "get all sub-elements of an element tree `a` excluding the root element", + "Output Program": [ + "[elem.tag for elem in a.iter() if elem is not a]" + ], + "Output Answer": [ + "[elem.tag for elem in a.iter() if elem is not a]" + ], + "split": "train" + }, + { + "Input": "destruct elements of list `[1, 2, 3]` to variables `a`, `b` and `c`", + "Output Program": [ + "a, b, c = [1, 2, 3]" + ], + "Output Answer": [ + "a, b, c = [1, 2, 3]" + ], + "split": "train" + }, + { + "Input": "print number 1255000 as thousands separators", + "Output Program": [ + "locale.setlocale(locale.LC_ALL, 'en_US')\nlocale.format('%d', 1255000, grouping=True)" + ], + "Output Answer": [ + "locale.setlocale(locale.LC_ALL, 'en_US')\nlocale.format('%d', 1255000, grouping=True)" + ], + "split": "train" + }, + { + "Input": "Create `list2` to contain the lists from list `list1` excluding the empty lists from `list1`", + "Output Program": [ + "list2 = [x for x in list1 if x]" + ], + "Output Answer": [ + "list2 = [x for x in list1 if x]" + ], + "split": "test" + }, + { + "Input": "append a tuple of elements from list `a` with indexes '[0][0] [0][2]' to list `b`", + "Output Program": [ + "b.append((a[0][0], a[0][2]))" + ], + "Output Answer": [ + "b.append((a[0][0], a[0][2]))" + ], + "split": "test" + }, + { + "Input": "sort a pandas data frame according to column `Peak` in ascending and `Weeks` in descending order", + "Output Program": [ + "df.sort_values(['Peak', 'Weeks'], ascending=[True, False], inplace=True)" + ], + "Output Answer": [ + "df.sort_values(['Peak', 'Weeks'], ascending=[True, False], inplace=True)" + ], + "split": "train" + }, + { + "Input": "Convert array `a` into a list", + "Output Program": [ + "numpy.array(a).reshape(-1).tolist()" + ], + "Output Answer": [ + "numpy.array(a).reshape(-1).tolist()" + ], + "split": "test" + }, + { + "Input": "update fields in Django model `Book` with arguments in dictionary `d` where primary key is equal to `pk`", + "Output Program": [ + "Book.objects.filter(pk=pk).update(**d)" + ], + "Output Answer": [ + "Book.objects.filter(pk=pk).update(**d)" + ], + "split": "train" + }, + { + "Input": "count the occurrences of item \"b\" in list `l`", + "Output Program": [ + "l.count('b')" + ], + "Output Answer": [ + "l.count('b')" + ], + "split": "test" + }, + { + "Input": "delete the last column of numpy array `a` and assign resulting array to `b`", + "Output Program": [ + "b = np.delete(a, -1, 1)" + ], + "Output Answer": [ + "b = np.delete(a, -1, 1)" + ], + "split": "train" + }, + { + "Input": "convert a string 'mystr' to numpy array of integer values", + "Output Program": [ + "print np.array(list(mystr), dtype=int)" + ], + "Output Answer": [ + "print np.array(list(mystr), dtype=int)" + ], + "split": "train" + }, + { + "Input": "add 1 hour and 2 minutes to time object `t`", + "Output Program": [ + "dt = datetime.datetime.combine(datetime.date.today(), t)" + ], + "Output Answer": [ + "dt = datetime.datetime.combine(datetime.date.today(), t)" + ], + "split": "train" + }, + { + "Input": "convert the zip of range `(1, 5)` and range `(7, 11)` into a dictionary", + "Output Program": [ + "dict(zip(range(1, 5), range(7, 11)))" + ], + "Output Answer": [ + "dict(zip(range(1, 5), range(7, 11)))" + ], + "split": "train" + }, + { + "Input": "create a datetime with the current date & time", + "Output Program": [ + "datetime.datetime.now()" + ], + "Output Answer": [ + "datetime.datetime.now()" + ], + "split": "test" + }, + { + "Input": "List comprehension with an accumulator in range of 10", + "Output Program": [ + "list(accumulate(range(10)))" + ], + "Output Answer": [ + "list(accumulate(range(10)))" + ], + "split": "train" + }, + { + "Input": "trim string `myString `", + "Output Program": [ + "myString.strip()" + ], + "Output Answer": [ + "myString.strip()" + ], + "split": "train" + }, + { + "Input": "Divide elements in list `a` from elements at the same index in list `b`", + "Output Program": [ + "[(x / y) for x, y in zip(a, b)]" + ], + "Output Answer": [ + "[(x / y) for x, y in zip(a, b)]" + ], + "split": "train" + }, + { + "Input": "convert a string of date strings `date_stngs ` to datetime objects and put them in a dataframe", + "Output Program": [ + "pd.to_datetime(pd.Series(date_stngs))" + ], + "Output Answer": [ + "pd.to_datetime(pd.Series(date_stngs))" + ], + "split": "train" + }, + { + "Input": "loop over files in directory `source`", + "Output Program": [ + "for (root, dirs, filenames) in os.walk(source):\n for f in filenames:\n pass" + ], + "Output Answer": [ + "for (root, dirs, filenames) in os.walk(source):\n for f in filenames:\n pass" + ], + "split": "test" + }, + { + "Input": "set UTC offset by 9 hrs ahead for date '2013/09/11 00:17'", + "Output Program": [ + "dateutil.parser.parse('2013/09/11 00:17 +0900')" + ], + "Output Answer": [ + "dateutil.parser.parse('2013/09/11 00:17 +0900')" + ], + "split": "train" + }, + { + "Input": "Get attribute `my_str` of object `my_object`", + "Output Program": [ + "getattr(my_object, my_str)" + ], + "Output Answer": [ + "getattr(my_object, my_str)" + ], + "split": "test" + }, + { + "Input": "match regex pattern 'a*?bc*?' on string 'aabcc' with DOTALL enabled", + "Output Program": [ + "re.findall('a*?bc*?', 'aabcc', re.DOTALL)" + ], + "Output Answer": [ + "re.findall('a*?bc*?', 'aabcc', re.DOTALL)" + ], + "split": "train" + }, + { + "Input": "Draw node labels `labels` on networkx graph `G ` at position `pos`", + "Output Program": [ + "networkx.draw_networkx_labels(G, pos, labels)" + ], + "Output Answer": [ + "networkx.draw_networkx_labels(G, pos, labels)" + ], + "split": "train" + }, + { + "Input": "get digits only from a string `aas30dsa20` using lambda function", + "Output Program": [ + "\"\"\"\"\"\".join(filter(lambda x: x.isdigit(), 'aas30dsa20'))" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(filter(lambda x: x.isdigit(), 'aas30dsa20'))" + ], + "split": "test" + }, + { + "Input": "reverse sort items in dictionary `mydict` by value", + "Output Program": [ + "sorted(mydict.iteritems(), key=itemgetter(1), reverse=True)" + ], + "Output Answer": [ + "sorted(mydict.iteritems(), key=itemgetter(1), reverse=True)" + ], + "split": "train" + }, + { + "Input": "Open gzip-compressed file encoded as utf-8 'file.gz' in text mode", + "Output Program": [ + "gzip.open('file.gz', 'rt', encoding='utf-8')" + ], + "Output Answer": [ + "gzip.open('file.gz', 'rt', encoding='utf-8')" + ], + "split": "train" + }, + { + "Input": "write line \"hi there\" to file `myfile`", + "Output Program": [ + "f = open('myfile', 'w')\nf.write('hi there\\n')\nf.close()" + ], + "Output Answer": [ + "f = open('myfile', 'w')\nf.write('hi there\\n')\nf.close()" + ], + "split": "test" + }, + { + "Input": "cartesian product of `x` and `y` array points into single array of 2d points", + "Output Program": [ + "numpy.dstack(numpy.meshgrid(x, y)).reshape(-1, 2)" + ], + "Output Answer": [ + "numpy.dstack(numpy.meshgrid(x, y)).reshape(-1, 2)" + ], + "split": "train" + }, + { + "Input": "plot dataframe `df` without a legend", + "Output Program": [ + "df.plot(legend=False)" + ], + "Output Answer": [ + "df.plot(legend=False)" + ], + "split": "test" + }, + { + "Input": "display first 5 characters of string 'aaabbbccc'", + "Output Program": [ + "\"\"\"{:.5}\"\"\".format('aaabbbccc')" + ], + "Output Answer": [ + "\"\"\"{:.5}\"\"\".format('aaabbbccc')" + ], + "split": "train" + }, + { + "Input": "delete all elements from a list `x` if a function `fn` taking value as parameter returns `0`", + "Output Program": [ + "[x for x in lst if fn(x) != 0]" + ], + "Output Answer": [ + "[x for x in lst if fn(x) != 0]" + ], + "split": "train" + }, + { + "Input": "print a rational number `3/2`", + "Output Program": [ + "print '\\n\\x1b[4m' + '3' + '\\x1b[0m' + '\\n2'" + ], + "Output Answer": [ + "print '\\n\\x1b[4m' + '3' + '\\x1b[0m' + '\\n2'" + ], + "split": "train" + }, + { + "Input": "replace NaN values in array `a` with zeros", + "Output Program": [ + "b = np.where(np.isnan(a), 0, a)" + ], + "Output Answer": [ + "b = np.where(np.isnan(a), 0, a)" + ], + "split": "train" + }, + { + "Input": "Initialize a pandas series object `s` with columns `['A', 'B', 'A1R', 'B2', 'AABB4']`", + "Output Program": [ + "s = pd.Series(['A', 'B', 'A1R', 'B2', 'AABB4'])" + ], + "Output Answer": [ + "s = pd.Series(['A', 'B', 'A1R', 'B2', 'AABB4'])" + ], + "split": "train" + }, + { + "Input": "determine if checkbox with id '' is checked in selenium python webdriver", + "Output Program": [ + "driver.find_element_by_id('').is_selected()" + ], + "Output Answer": [ + "driver.find_element_by_id('').is_selected()" + ], + "split": "train" + }, + { + "Input": "get rows of dataframe `df` that match regex '(Hel|Just)'", + "Output Program": [ + "df.loc[df[0].str.contains('(Hel|Just)')]" + ], + "Output Answer": [ + "df.loc[df[0].str.contains('(Hel|Just)')]" + ], + "split": "test" + }, + { + "Input": "remove false entries from a dictionary `hand`", + "Output Program": [ + "{k: v for k, v in hand.items() if v}" + ], + "Output Answer": [ + "{k: v for k, v in hand.items() if v}" + ], + "split": "train" + }, + { + "Input": "get the indexes of the x and y axes in Numpy array `np` where variable `a` is equal to variable `value`", + "Output Program": [ + "i, j = np.where(a == value)" + ], + "Output Answer": [ + "i, j = np.where(a == value)" + ], + "split": "train" + }, + { + "Input": "Remove all items from a dictionary `d` where the values are less than `1`", + "Output Program": [ + "d = dict((k, v) for k, v in d.iteritems() if v > 0)" + ], + "Output Answer": [ + "d = dict((k, v) for k, v in d.iteritems() if v > 0)" + ], + "split": "train" + }, + { + "Input": "Split string with comma (,) and remove whitespace from a string 'my_string'", + "Output Program": [ + "[item.strip() for item in my_string.split(',')]" + ], + "Output Answer": [ + "[item.strip() for item in my_string.split(',')]" + ], + "split": "train" + }, + { + "Input": "check if directory `directory ` exists and create it if necessary", + "Output Program": [ + "if (not os.path.exists(directory)):\n os.makedirs(directory)" + ], + "Output Answer": [ + "if (not os.path.exists(directory)):\n os.makedirs(directory)" + ], + "split": "test" + }, + { + "Input": "pandas subtract a row from dataframe `df2` from dataframe `df`", + "Output Program": [ + "pd.DataFrame(df.values - df2.values, columns=df.columns)" + ], + "Output Answer": [ + "pd.DataFrame(df.values - df2.values, columns=df.columns)" + ], + "split": "train" + }, + { + "Input": "round 123 to 100", + "Output Program": [ + "int(round(123, -2))" + ], + "Output Answer": [ + "int(round(123, -2))" + ], + "split": "train" + }, + { + "Input": "set the default encoding to 'utf-8'", + "Output Program": [ + "sys.setdefaultencoding('utf8')" + ], + "Output Answer": [ + "sys.setdefaultencoding('utf8')" + ], + "split": "train" + }, + { + "Input": "find all files with extension '.c' in directory `folder`", + "Output Program": [ + "results += [each for each in os.listdir(folder) if each.endswith('.c')]" + ], + "Output Answer": [ + "results += [each for each in os.listdir(folder) if each.endswith('.c')]" + ], + "split": "train" + }, + { + "Input": "Convert escaped utf string to utf string in `your string`", + "Output Program": [ + "print 'your string'.decode('string_escape')" + ], + "Output Answer": [ + "print 'your string'.decode('string_escape')" + ], + "split": "train" + }, + { + "Input": "Convert integer elements in list `wordids` to strings", + "Output Program": [ + "[str(wi) for wi in wordids]" + ], + "Output Answer": [ + "[str(wi) for wi in wordids]" + ], + "split": "train" + }, + { + "Input": "Match regex '[a-zA-Z][\\\\w-]*\\\\Z' on string 'A\\n'", + "Output Program": [ + "re.match('[a-zA-Z][\\\\w-]*\\\\Z', 'A\\n')" + ], + "Output Answer": [ + "re.match('[a-zA-Z][\\\\w-]*\\\\Z', 'A\\n')" + ], + "split": "train" + }, + { + "Input": "Remove word characters in parenthesis from string `item` with a regex", + "Output Program": [ + "item = re.sub(' ?\\\\(\\\\w+\\\\)', '', item)" + ], + "Output Answer": [ + "item = re.sub(' ?\\\\(\\\\w+\\\\)', '', item)" + ], + "split": "train" + }, + { + "Input": "BeautifulSoup find string 'Python Jobs' in HTML body `body`", + "Output Program": [ + "soup.body.findAll(text='Python Jobs')" + ], + "Output Answer": [ + "soup.body.findAll(text='Python Jobs')" + ], + "split": "train" + }, + { + "Input": "unzip list `[('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e', )]` and fill empty results with None", + "Output Program": [ + "map(None, *[('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e',)])" + ], + "Output Answer": [ + "map(None, *[('a', 1), ('b', 2), ('c', 3), ('d', 4), ('e',)])" + ], + "split": "test" + }, + { + "Input": "sort a list of objects `s` by a member variable 'resultType'", + "Output Program": [ + "s.sort(key=operator.attrgetter('resultType'))" + ], + "Output Answer": [ + "s.sort(key=operator.attrgetter('resultType'))" + ], + "split": "train" + }, + { + "Input": "Create a list containing all ascii characters as its elements", + "Output Program": [ + "[chr(i) for i in xrange(127)]" + ], + "Output Answer": [ + "[chr(i) for i in xrange(127)]" + ], + "split": "test" + }, + { + "Input": "split string 'abcdefg' into a list of characters", + "Output Program": [ + "re.findall('\\\\w', 'abcdefg')" + ], + "Output Answer": [ + "re.findall('\\\\w', 'abcdefg')" + ], + "split": "train" + }, + { + "Input": "Get the position of a regex match `is` in a string `String`", + "Output Program": [ + "re.search('is', String).start()" + ], + "Output Answer": [ + "re.search('is', String).start()" + ], + "split": "train" + }, + { + "Input": "concatenate a list of strings `['a', 'b', 'c']`", + "Output Program": [ + "\"\"\"\"\"\".join(['a', 'b', 'c'])" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(['a', 'b', 'c'])" + ], + "split": "test" + }, + { + "Input": "set columns `['race_date', 'track_code', 'race_number']` as indexes in dataframe `rdata`", + "Output Program": [ + "rdata.set_index(['race_date', 'track_code', 'race_number'])" + ], + "Output Answer": [ + "rdata.set_index(['race_date', 'track_code', 'race_number'])" + ], + "split": "train" + }, + { + "Input": "format number of spaces between strings `Python`, `:` and `Very Good` to be `20`", + "Output Program": [ + "print '%*s : %*s' % (20, 'Python', 20, 'Very Good')" + ], + "Output Answer": [ + "print '%*s : %*s' % (20, 'Python', 20, 'Very Good')" + ], + "split": "test" + }, + { + "Input": "logoff computer having windows operating system using python", + "Output Program": [ + "subprocess.call(['shutdown', '/l '])" + ], + "Output Answer": [ + "subprocess.call(['shutdown', '/l '])" + ], + "split": "train" + }, + { + "Input": "change the font size on plot `matplotlib` to 22", + "Output Program": [ + "matplotlib.rcParams.update({'font.size': 22})" + ], + "Output Answer": [ + "matplotlib.rcParams.update({'font.size': 22})" + ], + "split": "train" + }, + { + "Input": "Create array `a` containing integers from stdin", + "Output Program": [ + "a.fromlist([int(val) for val in stdin.read().split()])" + ], + "Output Answer": [ + "a.fromlist([int(val) for val in stdin.read().split()])" + ], + "split": "train" + }, + { + "Input": "Rename file from `src` to `dst`", + "Output Program": [ + "os.rename(src, dst)" + ], + "Output Answer": [ + "os.rename(src, dst)" + ], + "split": "train" + }, + { + "Input": "check if date `yourdatetime` is equal to today's date", + "Output Program": [ + "yourdatetime.date() == datetime.today().date()" + ], + "Output Answer": [ + "yourdatetime.date() == datetime.today().date()" + ], + "split": "train" + }, + { + "Input": "change the size of the sci notation to '30' above the y axis in matplotlib `plt`", + "Output Program": [ + "plt.rc('font', **{'size': '30'})" + ], + "Output Answer": [ + "plt.rc('font', **{'size': '30'})" + ], + "split": "train" + }, + { + "Input": "Set index equal to field 'TRX_DATE' in dataframe `df`", + "Output Program": [ + "df = df.set_index(['TRX_DATE'])" + ], + "Output Answer": [ + "df = df.set_index(['TRX_DATE'])" + ], + "split": "train" + }, + { + "Input": "parse string \"Aug 28 1999 12:00AM\" into datetime", + "Output Program": [ + "parser.parse('Aug 28 1999 12:00AM')" + ], + "Output Answer": [ + "parser.parse('Aug 28 1999 12:00AM')" + ], + "split": "train" + }, + { + "Input": "round number 6.005 up to 2 decimal places", + "Output Program": [ + "round(6.005, 2)" + ], + "Output Answer": [ + "round(6.005, 2)" + ], + "split": "train" + }, + { + "Input": "simple way to append a pandas series `a` and `b` with same index", + "Output Program": [ + "pd.concat([a, b], ignore_index=True)" + ], + "Output Answer": [ + "pd.concat([a, b], ignore_index=True)" + ], + "split": "train" + }, + { + "Input": "remove all duplicates from a list of sets `L`", + "Output Program": [ + "list(set(frozenset(item) for item in L))" + ], + "Output Answer": [ + "list(set(frozenset(item) for item in L))" + ], + "split": "train" + }, + { + "Input": "convert `ms` milliseconds to a datetime object", + "Output Program": [ + "datetime.datetime.fromtimestamp(ms / 1000.0)" + ], + "Output Answer": [ + "datetime.datetime.fromtimestamp(ms / 1000.0)" + ], + "split": "train" + }, + { + "Input": "generate random Decimal", + "Output Program": [ + "decimal.Decimal(random.randrange(10000)) / 100" + ], + "Output Answer": [ + "decimal.Decimal(random.randrange(10000)) / 100" + ], + "split": "train" + }, + { + "Input": "create a list with the sum of respective elements of the tuples of list `l`", + "Output Program": [ + "[sum(x) for x in zip(*l)]" + ], + "Output Answer": [ + "[sum(x) for x in zip(*l)]" + ], + "split": "train" + }, + { + "Input": "convert csv file 'test.csv' into two-dimensional matrix", + "Output Program": [ + "numpy.loadtxt(open('test.csv', 'rb'), delimiter=',', skiprows=1)" + ], + "Output Answer": [ + "numpy.loadtxt(open('test.csv', 'rb'), delimiter=',', skiprows=1)" + ], + "split": "train" + }, + { + "Input": "get a list of characters in string `x` matching regex pattern `pattern`", + "Output Program": [ + "print re.findall(pattern, x)" + ], + "Output Answer": [ + "print re.findall(pattern, x)" + ], + "split": "train" + }, + { + "Input": "sum the column `positions` along the other columns `stock`, `same1`, `same2` in a pandas data frame `df`", + "Output Program": [ + "df.groupby(['stock', 'same1', 'same2'], as_index=False)['positions'].sum()" + ], + "Output Answer": [ + "df.groupby(['stock', 'same1', 'same2'], as_index=False)['positions'].sum()" + ], + "split": "train" + }, + { + "Input": "read lines from a csv file `./urls-eu.csv` into a list of lists `arr`", + "Output Program": [ + "arr = [line.split(',') for line in open('./urls-eu.csv')]" + ], + "Output Answer": [ + "arr = [line.split(',') for line in open('./urls-eu.csv')]" + ], + "split": "train" + }, + { + "Input": "lambda function that adds two operands", + "Output Program": [ + "lambda x, y: x + y" + ], + "Output Answer": [ + "lambda x, y: x + y" + ], + "split": "train" + }, + { + "Input": "sort a python dictionary `a_dict` by element `1` of the value", + "Output Program": [ + "sorted(a_dict.items(), key=lambda item: item[1][1])" + ], + "Output Answer": [ + "sorted(a_dict.items(), key=lambda item: item[1][1])" + ], + "split": "train" + }, + { + "Input": "build a dict of key:value pairs from a string representation of a dict, `{'muffin' : 'lolz', 'foo' : 'kitty'}`", + "Output Program": [ + "ast.literal_eval(\"{'muffin' : 'lolz', 'foo' : 'kitty'}\")" + ], + "Output Answer": [ + "ast.literal_eval(\"{'muffin' : 'lolz', 'foo' : 'kitty'}\")" + ], + "split": "train" + }, + { + "Input": "convert binary string '\\x00\\x00\\x80?\\x00\\x00\\x00@\\x00\\x00@@\\x00\\x00\\x80@' to numpy array", + "Output Program": [ + "np.fromstring('\\x00\\x00\\x80?\\x00\\x00\\x00@\\x00\\x00@@\\x00\\x00\\x80@', dtype='' and pass authorization token 'TOK:' to the header", + "Output Program": [ + "r = requests.get('', headers={'Authorization': 'TOK:'})" + ], + "Output Answer": [ + "r = requests.get('', headers={'Authorization': 'TOK:'})" + ], + "split": "train" + }, + { + "Input": "store the output of command 'ls' in variable `direct_output`", + "Output Program": [ + "direct_output = subprocess.check_output('ls', shell=True)" + ], + "Output Answer": [ + "direct_output = subprocess.check_output('ls', shell=True)" + ], + "split": "train" + }, + { + "Input": "Check if value 'one' is among the values of dictionary `d`", + "Output Program": [ + "'one' in d.itervalues()" + ], + "Output Answer": [ + "'one' in d.itervalues()" + ], + "split": "train" + }, + { + "Input": "parse string `a` to float", + "Output Program": [ + "float(a)" + ], + "Output Answer": [ + "float(a)" + ], + "split": "train" + }, + { + "Input": "get number of keys in dictionary `yourdict`", + "Output Program": [ + "len(yourdict.keys())" + ], + "Output Answer": [ + "len(yourdict.keys())" + ], + "split": "test" + }, + { + "Input": "Get the value of the minimum element in the second column of array `a`", + "Output Program": [ + "a[np.argmin(a[:, (1)])]" + ], + "Output Answer": [ + "a[np.argmin(a[:, (1)])]" + ], + "split": "train" + }, + { + "Input": "convert Unicode codepoint to utf8 hex", + "Output Program": [ + "unichr(int('fd9b', 16)).encode('utf-8')" + ], + "Output Answer": [ + "unichr(int('fd9b', 16)).encode('utf-8')" + ], + "split": "train" + }, + { + "Input": "pass a list of parameters `((1, 2, 3),) to sql queue 'SELECT * FROM table WHERE column IN %s;'", + "Output Program": [ + "cur.mogrify('SELECT * FROM table WHERE column IN %s;', ((1, 2, 3),))" + ], + "Output Answer": [ + "cur.mogrify('SELECT * FROM table WHERE column IN %s;', ((1, 2, 3),))" + ], + "split": "train" + }, + { + "Input": "print numbers in list `list` with precision of 3 decimal places", + "Output Program": [ + "print '[%s]' % ', '.join('%.3f' % val for val in list)" + ], + "Output Answer": [ + "print '[%s]' % ', '.join('%.3f' % val for val in list)" + ], + "split": "train" + }, + { + "Input": "retrieve all items in an numpy array 'x' except the item of the index 1", + "Output Program": [ + "x[(np.arange(x.shape[0]) != 1), :, :]" + ], + "Output Answer": [ + "x[(np.arange(x.shape[0]) != 1), :, :]" + ], + "split": "train" + }, + { + "Input": "get a dataframe `df2` that contains all the columns of dataframe `df` that do not end in `prefix`", + "Output Program": [ + "df2 = df.ix[:, (~df.columns.str.endswith('prefix'))]" + ], + "Output Answer": [ + "df2 = df.ix[:, (~df.columns.str.endswith('prefix'))]" + ], + "split": "train" + }, + { + "Input": "delete all rows in a numpy array `a` where any value in a row is zero `0`", + "Output Program": [ + "a[np.all(a != 0, axis=1)]" + ], + "Output Answer": [ + "a[np.all(a != 0, axis=1)]" + ], + "split": "train" + }, + { + "Input": "get multiple parameters with same name from a url in pylons", + "Output Program": [ + "request.params.getall('c')" + ], + "Output Answer": [ + "request.params.getall('c')" + ], + "split": "train" + }, + { + "Input": "remove all instances of `[1, 1]` from a list `a`", + "Output Program": [ + "[x for x in a if x != [1, 1]]" + ], + "Output Answer": [ + "[x for x in a if x != [1, 1]]" + ], + "split": "train" + }, + { + "Input": "get the absolute path of a running python script", + "Output Program": [ + "os.path.abspath(__file__)" + ], + "Output Answer": [ + "os.path.abspath(__file__)" + ], + "split": "train" + }, + { + "Input": "sort list of strings `the_list` by integer suffix before \"_\"", + "Output Program": [ + "sorted(the_list, key=lambda x: int(x.split('_')[1]))" + ], + "Output Answer": [ + "sorted(the_list, key=lambda x: int(x.split('_')[1]))" + ], + "split": "train" + }, + { + "Input": "execute external commands/script `your_own_script` with csh instead of bash", + "Output Program": [ + "os.system('tcsh your_own_script')" + ], + "Output Answer": [ + "os.system('tcsh your_own_script')" + ], + "split": "train" + }, + { + "Input": "Find all numbers and dots from a string `text` using regex", + "Output Program": [ + "re.findall('Test([0-9.]*[0-9]+)', text)" + ], + "Output Answer": [ + "re.findall('Test([0-9.]*[0-9]+)', text)" + ], + "split": "test" + }, + { + "Input": "convert list `x` into a flat list", + "Output Program": [ + "y = map(operator.itemgetter(0), x)" + ], + "Output Answer": [ + "y = map(operator.itemgetter(0), x)" + ], + "split": "train" + }, + { + "Input": "adding a 1-d array `[1, 2, 3, 4, 5, 6, 7, 8, 9]` to a 3-d array `np.zeros((6, 9, 20))`", + "Output Program": [ + "np.zeros((6, 9, 20)) + np.array([1, 2, 3, 4, 5, 6, 7, 8, 9])[(None), :, (None)]" + ], + "Output Answer": [ + "np.zeros((6, 9, 20)) + np.array([1, 2, 3, 4, 5, 6, 7, 8, 9])[(None), :, (None)]" + ], + "split": "train" + }, + { + "Input": "sort a dictionary `a` by values that are list type", + "Output Program": [ + "t = sorted(a.items(), key=lambda x: x[1])" + ], + "Output Answer": [ + "t = sorted(a.items(), key=lambda x: x[1])" + ], + "split": "train" + }, + { + "Input": "subset numpy array `a` by column and row, returning the values from the first row, first column and the second row, second column and the third row, first column.", + "Output Program": [ + "a[np.arange(3), (0, 1, 0)]" + ], + "Output Answer": [ + "a[np.arange(3), (0, 1, 0)]" + ], + "split": "train" + }, + { + "Input": "convert a list of strings `['1', '-1', '1']` to a list of numbers", + "Output Program": [ + "map(int, ['1', '-1', '1'])" + ], + "Output Answer": [ + "map(int, ['1', '-1', '1'])" + ], + "split": "train" + }, + { + "Input": "extract the 2nd elements from a list of tuples", + "Output Program": [ + "[x[1] for x in elements]" + ], + "Output Answer": [ + "[x[1] for x in elements]" + ], + "split": "train" + }, + { + "Input": "delete all columns in DataFrame `df` that do not hold a non-zero value in its records", + "Output Program": [ + "df.loc[:, ((df != 0).any(axis=0))]" + ], + "Output Answer": [ + "df.loc[:, ((df != 0).any(axis=0))]" + ], + "split": "train" + }, + { + "Input": "check if a local variable 'myVar' exists", + "Output Program": [ + "if ('myVar' in locals()):\n pass" + ], + "Output Answer": [ + "if ('myVar' in locals()):\n pass" + ], + "split": "train" + }, + { + "Input": "get all the values in column `b` from pandas data frame `df`", + "Output Program": [ + "df['b']" + ], + "Output Answer": [ + "df['b']" + ], + "split": "train" + }, + { + "Input": "subscript text 'H20' with '2' as subscripted in matplotlib labels for arrays 'x' and 'y'.", + "Output Program": [ + "plt.plot(x, y, label='$H_2O$')", + "plt.plot(x, y, label=u'H\\u2082O')" + ], + "Output Answer": [ + "plt.plot(x, y, label='$H_2O$')", + "plt.plot(x, y, label=u'H\\u2082O')" + ], + "split": "test" + }, + { + "Input": "get index of the first biggest element in list `a`", + "Output Program": [ + "a.index(max(a))" + ], + "Output Answer": [ + "a.index(max(a))" + ], + "split": "train" + }, + { + "Input": "Truncate `\\r\\n` from each string in a list of string `example`", + "Output Program": [ + "example = [x.replace('\\r\\n', '') for x in example]" + ], + "Output Answer": [ + "example = [x.replace('\\r\\n', '') for x in example]" + ], + "split": "train" + }, + { + "Input": "Parse DateTime object `datetimevariable` using format '%Y-%m-%d'", + "Output Program": [ + "datetimevariable.strftime('%Y-%m-%d')" + ], + "Output Answer": [ + "datetimevariable.strftime('%Y-%m-%d')" + ], + "split": "train" + }, + { + "Input": "Convert a dictionary `dict` into a list with key and values as list items.", + "Output Program": [ + "[y for x in dict.items() for y in x]" + ], + "Output Answer": [ + "[y for x in dict.items() for y in x]" + ], + "split": "train" + }, + { + "Input": "capture final output of a chain of system commands `ps -ef | grep something | wc -l`", + "Output Program": [ + "subprocess.check_output('ps -ef | grep something | wc -l', shell=True)" + ], + "Output Answer": [ + "subprocess.check_output('ps -ef | grep something | wc -l', shell=True)" + ], + "split": "test" + }, + { + "Input": "Get average for every three columns in `df` dataframe", + "Output Program": [ + "df.groupby(np.arange(len(df.columns)) // 3, axis=1).mean()" + ], + "Output Answer": [ + "df.groupby(np.arange(len(df.columns)) // 3, axis=1).mean()" + ], + "split": "train" + }, + { + "Input": "Find all the lists from a lists of list 'items' if third element in all sub-lists is '0'", + "Output Program": [ + "[x for x in items if x[2] == 0]" + ], + "Output Answer": [ + "[x for x in items if x[2] == 0]" + ], + "split": "train" + }, + { + "Input": "divide values associated with each key in dictionary `d1` from values associated with the same key in dictionary `d2`", + "Output Program": [ + "dict((k, float(d2[k]) / d1[k]) for k in d2)" + ], + "Output Answer": [ + "dict((k, float(d2[k]) / d1[k]) for k in d2)" + ], + "split": "train" + }, + { + "Input": "filter dataframe `grouped` where the length of each group `x` is bigger than 1", + "Output Program": [ + "grouped.filter(lambda x: len(x) > 1)" + ], + "Output Answer": [ + "grouped.filter(lambda x: len(x) > 1)" + ], + "split": "train" + }, + { + "Input": "check if string `one` exists in the values of dictionary `d`", + "Output Program": [ + "'one' in d.values()" + ], + "Output Answer": [ + "'one' in d.values()" + ], + "split": "train" + }, + { + "Input": "index a list `L` with another list `Idx`", + "Output Program": [ + "T = [L[i] for i in Idx]" + ], + "Output Answer": [ + "T = [L[i] for i in Idx]" + ], + "split": "train" + }, + { + "Input": "reset index to default in dataframe `df`", + "Output Program": [ + "df = df.reset_index(drop=True)" + ], + "Output Answer": [ + "df = df.reset_index(drop=True)" + ], + "split": "train" + }, + { + "Input": "convert hex string \"0xff\" to decimal", + "Output Program": [ + "int('0xff', 16)" + ], + "Output Answer": [ + "int('0xff', 16)" + ], + "split": "train" + }, + { + "Input": "get a random item from list `choices`", + "Output Program": [ + "random_choice = random.choice(choices)" + ], + "Output Answer": [ + "random_choice = random.choice(choices)" + ], + "split": "train" + }, + { + "Input": "replace only first occurence of string `TEST` from a string `longlongTESTstringTEST`", + "Output Program": [ + "u'longlongTESTstringTEST'.replace('TEST', '?', 1)" + ], + "Output Answer": [ + "u'longlongTESTstringTEST'.replace('TEST', '?', 1)" + ], + "split": "train" + }, + { + "Input": "replace string ' and ' in string `stuff` with character '/'", + "Output Program": [ + "stuff.replace(' and ', '/')" + ], + "Output Answer": [ + "stuff.replace(' and ', '/')" + ], + "split": "train" + }, + { + "Input": "Print string `t` with proper unicode representations", + "Output Program": [ + "print t.decode('unicode_escape')" + ], + "Output Answer": [ + "print t.decode('unicode_escape')" + ], + "split": "train" + }, + { + "Input": "group dataframe `df` based on minute interval", + "Output Program": [ + "df.groupby(df.index.map(lambda t: t.minute))" + ], + "Output Answer": [ + "df.groupby(df.index.map(lambda t: t.minute))" + ], + "split": "train" + }, + { + "Input": "identify duplicated rows in columns 'PplNum' and 'RoomNum' with additional column in dataframe `df`", + "Output Program": [ + "df.groupby(['PplNum', 'RoomNum']).cumcount() + 1" + ], + "Output Answer": [ + "df.groupby(['PplNum', 'RoomNum']).cumcount() + 1" + ], + "split": "train" + }, + { + "Input": "Get a minimum value from a list of tuples `list` with values of type `string` and `float` with nan", + "Output Program": [ + "min(list, key=lambda x: float('inf') if math.isnan(x[1]) else x[1])" + ], + "Output Answer": [ + "min(list, key=lambda x: float('inf') if math.isnan(x[1]) else x[1])" + ], + "split": "train" + }, + { + "Input": "Sort lists in the list `unsorted_list` by the element at index 3 of each list", + "Output Program": [ + "unsorted_list.sort(key=lambda x: x[3])" + ], + "Output Answer": [ + "unsorted_list.sort(key=lambda x: x[3])" + ], + "split": "train" + }, + { + "Input": "convert column of date objects 'DateObj' in pandas dataframe `df` to strings in new column 'DateStr'", + "Output Program": [ + "df['DateStr'] = df['DateObj'].dt.strftime('%d%m%Y')" + ], + "Output Answer": [ + "df['DateStr'] = df['DateObj'].dt.strftime('%d%m%Y')" + ], + "split": "train" + }, + { + "Input": "Getting today's date in YYYY-MM-DD", + "Output Program": [ + "datetime.datetime.today().strftime('%Y-%m-%d')" + ], + "Output Answer": [ + "datetime.datetime.today().strftime('%Y-%m-%d')" + ], + "split": "train" + }, + { + "Input": "convert date `my_date` to datetime", + "Output Program": [ + "datetime.datetime.combine(my_date, datetime.time.min)" + ], + "Output Answer": [ + "datetime.datetime.combine(my_date, datetime.time.min)" + ], + "split": "train" + }, + { + "Input": "filter `Users` by field `userprofile` with level greater than or equal to `0`", + "Output Program": [ + "User.objects.filter(userprofile__level__gte=0)" + ], + "Output Answer": [ + "User.objects.filter(userprofile__level__gte=0)" + ], + "split": "train" + }, + { + "Input": "get the index of an integer `1` from a list `lst` if the list also contains boolean items", + "Output Program": [ + "next(i for i, x in enumerate(lst) if not isinstance(x, bool) and x == 1)" + ], + "Output Answer": [ + "next(i for i, x in enumerate(lst) if not isinstance(x, bool) and x == 1)" + ], + "split": "test" + }, + { + "Input": "sort a multidimensional array `a` by column with index 1", + "Output Program": [ + "sorted(a, key=lambda x: x[1])" + ], + "Output Answer": [ + "sorted(a, key=lambda x: x[1])" + ], + "split": "train" + }, + { + "Input": "Create list by splitting string `mystring` using \",\" as delimiter", + "Output Program": [ + "mystring.split(',')" + ], + "Output Answer": [ + "mystring.split(',')" + ], + "split": "train" + }, + { + "Input": "Get a list of items in the list `container` with attribute equal to `value`", + "Output Program": [ + "items = [item for item in container if item.attribute == value]" + ], + "Output Answer": [ + "items = [item for item in container if item.attribute == value]" + ], + "split": "train" + }, + { + "Input": "extract unique dates from time series 'Date' in dataframe `df`", + "Output Program": [ + "df['Date'].map(lambda t: t.date()).unique()" + ], + "Output Answer": [ + "df['Date'].map(lambda t: t.date()).unique()" + ], + "split": "train" + }, + { + "Input": "get all characters between two `$` characters in string `string`", + "Output Program": [ + "re.findall('\\\\$([^$]*)\\\\$', string)" + ], + "Output Answer": [ + "re.findall('\\\\$([^$]*)\\\\$', string)" + ], + "split": "train" + }, + { + "Input": "select a first form with no name in mechanize", + "Output Program": [ + "br.select_form(nr=0)" + ], + "Output Answer": [ + "br.select_form(nr=0)" + ], + "split": "train" + }, + { + "Input": "Get all non-ascii characters in a unicode string `\\xa3100 is worth more than \\u20ac100`", + "Output Program": [ + "print re.sub('[\\x00-\\x7f]', '', u'\\xa3100 is worth more than \\u20ac100')" + ], + "Output Answer": [ + "print re.sub('[\\x00-\\x7f]', '', u'\\xa3100 is worth more than \\u20ac100')" + ], + "split": "train" + }, + { + "Input": "sort list `xs` in ascending order of length of elements", + "Output Program": [ + "xs.sort(lambda x, y: cmp(len(x), len(y)))" + ], + "Output Answer": [ + "xs.sort(lambda x, y: cmp(len(x), len(y)))" + ], + "split": "train" + }, + { + "Input": "split string `s` based on white spaces", + "Output Program": [ + "re.findall('\\\\s+|\\\\S+', s)" + ], + "Output Answer": [ + "re.findall('\\\\s+|\\\\S+', s)" + ], + "split": "train" + }, + { + "Input": "select rows in a dataframe `df` column 'closing_price' between two values 99 and 101", + "Output Program": [ + "df = df[(df['closing_price'] >= 99) & (df['closing_price'] <= 101)]" + ], + "Output Answer": [ + "df = df[(df['closing_price'] >= 99) & (df['closing_price'] <= 101)]" + ], + "split": "test" + }, + { + "Input": "Formate current date and time to a string using pattern '%Y-%m-%d %H:%M:%S'", + "Output Program": [ + "datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')" + ], + "Output Answer": [ + "datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')" + ], + "split": "train" + }, + { + "Input": "Get a list comparing two lists of tuples `l1` and `l2` if any first value in `l1` matches with first value in `l2`", + "Output Program": [ + "[x[0] for x in l1 if any(x[0] == y[0] for y in l2)]" + ], + "Output Answer": [ + "[x[0] for x in l1 if any(x[0] == y[0] for y in l2)]" + ], + "split": "train" + }, + { + "Input": "Convert a datetime object `dt` to microtime", + "Output Program": [ + "time.mktime(dt.timetuple()) + dt.microsecond / 1000000.0" + ], + "Output Answer": [ + "time.mktime(dt.timetuple()) + dt.microsecond / 1000000.0" + ], + "split": "train" + }, + { + "Input": "convert string '01/12/2011' to an integer timestamp", + "Output Program": [ + "int(datetime.datetime.strptime('01/12/2011', '%d/%m/%Y').strftime('%s'))" + ], + "Output Answer": [ + "int(datetime.datetime.strptime('01/12/2011', '%d/%m/%Y').strftime('%s'))" + ], + "split": "train" + }, + { + "Input": "Generate random integers between 0 and 9", + "Output Program": [ + "print(random.randint(0, 9))" + ], + "Output Answer": [ + "print(random.randint(0, 9))" + ], + "split": "train" + }, + { + "Input": "Sort dictionary `dict1` by value in ascending order", + "Output Program": [ + "sorted(dict1, key=dict1.get)" + ], + "Output Answer": [ + "sorted(dict1, key=dict1.get)" + ], + "split": "train" + }, + { + "Input": "Extract only characters from a string as a list", + "Output Program": [ + "re.split('[^a-zA-Z]*', 'your string')" + ], + "Output Answer": [ + "re.split('[^a-zA-Z]*', 'your string')" + ], + "split": "train" + }, + { + "Input": "in Django, select 100 random records from the database `Content.objects`", + "Output Program": [ + "Content.objects.all().order_by('?')[:100]" + ], + "Output Answer": [ + "Content.objects.all().order_by('?')[:100]" + ], + "split": "train" + }, + { + "Input": "download a file `url` over HTTP and save to `file_name`", + "Output Program": [ + "u = urllib2.urlopen(url)\nf = open(file_name, 'wb')\nmeta = u.info()\nfile_size = int(meta.getheaders('Content-Length')[0])\nprint ('Downloading: %s Bytes: %s' % (file_name, file_size))\nfile_size_dl = 0\nblock_sz = 8192\nwhile True:\n buffer = u.read(block_sz)\n if (not buffer):\n break\n file_size_dl += len(buffer)\n f.write(buffer)\n status = ('%10d [%3.2f%%]' % (file_size_dl, ((file_size_dl * 100.0) / file_size)))\n status = (status + (chr(8) * (len(status) + 1)))\n print status,\nf.close()" + ], + "Output Answer": [ + "u = urllib2.urlopen(url)\nf = open(file_name, 'wb')\nmeta = u.info()\nfile_size = int(meta.getheaders('Content-Length')[0])\nprint ('Downloading: %s Bytes: %s' % (file_name, file_size))\nfile_size_dl = 0\nblock_sz = 8192\nwhile True:\n buffer = u.read(block_sz)\n if (not buffer):\n break\n file_size_dl += len(buffer)\n f.write(buffer)\n status = ('%10d [%3.2f%%]' % (file_size_dl, ((file_size_dl * 100.0) / file_size)))\n status = (status + (chr(8) * (len(status) + 1)))\n print status,\nf.close()" + ], + "split": "test" + }, + { + "Input": "convert a python dictionary `d` to a list of tuples", + "Output Program": [ + "[(v, k) for k, v in d.items()]" + ], + "Output Answer": [ + "[(v, k) for k, v in d.items()]" + ], + "split": "train" + }, + { + "Input": "get items from list `a` that don't appear in list `b`", + "Output Program": [ + "[y for y in a if y not in b]" + ], + "Output Answer": [ + "[y for y in a if y not in b]" + ], + "split": "train" + }, + { + "Input": "apply two different aggregating functions `mean` and `sum` to the same column `dummy` in pandas data frame `df`", + "Output Program": [ + "df.groupby('dummy').agg({'returns': [np.mean, np.sum]})" + ], + "Output Answer": [ + "df.groupby('dummy').agg({'returns': [np.mean, np.sum]})" + ], + "split": "train" + }, + { + "Input": "get value of first child of xml node `name`", + "Output Program": [ + "name[0].firstChild.nodeValue" + ], + "Output Answer": [ + "name[0].firstChild.nodeValue" + ], + "split": "train" + }, + { + "Input": "sort pandas data frame `df` using values from columns `c1` and `c2` in ascending order", + "Output Program": [ + "df.sort(['c1', 'c2'], ascending=[True, True])" + ], + "Output Answer": [ + "df.sort(['c1', 'c2'], ascending=[True, True])" + ], + "split": "train" + }, + { + "Input": "convert list of strings `str_list` into list of integers", + "Output Program": [ + "[int(i) for i in str_list]" + ], + "Output Answer": [ + "[int(i) for i in str_list]" + ], + "split": "train" + }, + { + "Input": "get the size of list `s`", + "Output Program": [ + "len(s)" + ], + "Output Answer": [ + "len(s)" + ], + "split": "train" + }, + { + "Input": "split string \"jvm.args= -Dappdynamics.com=true, -Dsomeotherparam=false,\" on the first occurrence of delimiter '='", + "Output Program": [ + "\"\"\"jvm.args= -Dappdynamics.com=true, -Dsomeotherparam=false,\"\"\".split('=', 1)" + ], + "Output Answer": [ + "\"\"\"jvm.args= -Dappdynamics.com=true, -Dsomeotherparam=false,\"\"\".split('=', 1)" + ], + "split": "train" + }, + { + "Input": "check if dictionary `L[0].f.items()` is in dictionary `a3.f.items()`", + "Output Program": [ + "set(L[0].f.items()).issubset(set(a3.f.items()))" + ], + "Output Answer": [ + "set(L[0].f.items()).issubset(set(a3.f.items()))" + ], + "split": "train" + }, + { + "Input": "Get a list of all values in column `a` in pandas data frame `df`", + "Output Program": [ + "df['a'].tolist()" + ], + "Output Answer": [ + "df['a'].tolist()" + ], + "split": "train" + }, + { + "Input": "ordering a list of dictionaries `mylist` by elements 'weight' and 'factor'", + "Output Program": [ + "mylist.sort(key=lambda d: (d['weight'], d['factor']))" + ], + "Output Answer": [ + "mylist.sort(key=lambda d: (d['weight'], d['factor']))" + ], + "split": "train" + }, + { + "Input": "Flatten list `x`", + "Output Program": [ + "x = [i[0] for i in x]" + ], + "Output Answer": [ + "x = [i[0] for i in x]" + ], + "split": "train" + }, + { + "Input": "Get the characters count in a file `filepath`", + "Output Program": [ + "os.stat(filepath).st_size" + ], + "Output Answer": [ + "os.stat(filepath).st_size" + ], + "split": "test" + }, + { + "Input": "call `doSomething()` in a try-except without handling the exception", + "Output Program": [ + "try:\n doSomething()\nexcept:\n pass", + "try:\n doSomething()\nexcept Exception:\n pass" + ], + "Output Answer": [ + "try:\n doSomething()\nexcept:\n pass", + "try:\n doSomething()\nexcept Exception:\n pass" + ], + "split": "train" + }, + { + "Input": "find the index of sub string 'Aloha' in `x`", + "Output Program": [ + "x.find('Aloha')" + ], + "Output Answer": [ + "x.find('Aloha')" + ], + "split": "train" + }, + { + "Input": "finding the index of an item 'foo' given a list `['foo', 'bar', 'baz']` containing it", + "Output Program": [ + "[i for i, j in enumerate(['foo', 'bar', 'baz']) if j == 'foo']" + ], + "Output Answer": [ + "[i for i, j in enumerate(['foo', 'bar', 'baz']) if j == 'foo']" + ], + "split": "train" + }, + { + "Input": "Get Last Day of the first month in 2002", + "Output Program": [ + "calendar.monthrange(2002, 1)" + ], + "Output Answer": [ + "calendar.monthrange(2002, 1)" + ], + "split": "train" + }, + { + "Input": "list all \".txt\" files of a directory \"/home/adam/\"", + "Output Program": [ + "print glob.glob('/home/adam/*.txt')" + ], + "Output Answer": [ + "print glob.glob('/home/adam/*.txt')" + ], + "split": "train" + }, + { + "Input": "delete every non `utf-8` characters from a string `line`", + "Output Program": [ + "line = line.decode('utf-8', 'ignore').encode('utf-8')" + ], + "Output Answer": [ + "line = line.decode('utf-8', 'ignore').encode('utf-8')" + ], + "split": "train" + }, + { + "Input": "sorting a list of tuples `list_of_tuples` by second key", + "Output Program": [ + "sorted(list_of_tuples, key=lambda tup: tup[1])" + ], + "Output Answer": [ + "sorted(list_of_tuples, key=lambda tup: tup[1])" + ], + "split": "train" + }, + { + "Input": "generate all possible string permutations of each two elements in list `['hel', 'lo', 'bye']`", + "Output Program": [ + "print [''.join(a) for a in combinations(['hel', 'lo', 'bye'], 2)]" + ], + "Output Answer": [ + "print [''.join(a) for a in combinations(['hel', 'lo', 'bye'], 2)]" + ], + "split": "train" + }, + { + "Input": "get the last element in list `alist`", + "Output Program": [ + "alist[(-1)]" + ], + "Output Answer": [ + "alist[(-1)]" + ], + "split": "train" + }, + { + "Input": "python regex for hyphenated words in `text`", + "Output Program": [ + "re.findall('\\\\w+(?:-\\\\w+)+', text)" + ], + "Output Answer": [ + "re.findall('\\\\w+(?:-\\\\w+)+', text)" + ], + "split": "train" + }, + { + "Input": "delete a column `column_name` without having to reassign from pandas data frame `df`", + "Output Program": [ + "df.drop('column_name', axis=1, inplace=True)" + ], + "Output Answer": [ + "df.drop('column_name', axis=1, inplace=True)" + ], + "split": "train" + }, + { + "Input": "extract only alphabetic characters from a string `your string`", + "Output Program": [ + "\"\"\" \"\"\".join(re.split('[^a-zA-Z]*', 'your string'))" + ], + "Output Answer": [ + "\"\"\" \"\"\".join(re.split('[^a-zA-Z]*', 'your string'))" + ], + "split": "train" + }, + { + "Input": "Convert CSV file `Result.csv` to Pandas dataframe using separator ' '", + "Output Program": [ + "df.to_csv('Result.csv', index=False, sep=' ')" + ], + "Output Answer": [ + "df.to_csv('Result.csv', index=False, sep=' ')" + ], + "split": "train" + }, + { + "Input": "sum of squares values in a list `l`", + "Output Program": [ + "sum(i * i for i in l)" + ], + "Output Answer": [ + "sum(i * i for i in l)" + ], + "split": "train" + }, + { + "Input": "find the index of the second occurrence of the substring `bar` in string `foo bar bar bar`", + "Output Program": [ + "\"\"\"foo bar bar bar\"\"\".replace('bar', 'XXX', 1).find('bar')" + ], + "Output Answer": [ + "\"\"\"foo bar bar bar\"\"\".replace('bar', 'XXX', 1).find('bar')" + ], + "split": "train" + }, + { + "Input": "Get a list from two strings `12345` and `ab` with values as each character concatenated", + "Output Program": [ + "[(x + y) for x in '12345' for y in 'ab']" + ], + "Output Answer": [ + "[(x + y) for x in '12345' for y in 'ab']" + ], + "split": "train" + }, + { + "Input": "find href value that has string 'follow?page' inside it", + "Output Program": [ + "print soup.find('a', href=re.compile('.*follow\\\\?page.*'))" + ], + "Output Answer": [ + "print soup.find('a', href=re.compile('.*follow\\\\?page.*'))" + ], + "split": "train" + }, + { + "Input": "convert date string 'January 11, 2010' into day of week", + "Output Program": [ + "datetime.datetime.strptime('January 11, 2010', '%B %d, %Y').strftime('%A')" + ], + "Output Answer": [ + "datetime.datetime.strptime('January 11, 2010', '%B %d, %Y').strftime('%A')" + ], + "split": "train" + }, + { + "Input": "disable abbreviation in argparse", + "Output Program": [ + "parser = argparse.ArgumentParser(allow_abbrev=False)" + ], + "Output Answer": [ + "parser = argparse.ArgumentParser(allow_abbrev=False)" + ], + "split": "train" + }, + { + "Input": "lower-case the string obtained by replacing the occurrences of regex pattern '(?<=[a-z])([A-Z])' in string `s` with eplacement '-\\\\1'", + "Output Program": [ + "re.sub('(?<=[a-z])([A-Z])', '-\\\\1', s).lower()" + ], + "Output Answer": [ + "re.sub('(?<=[a-z])([A-Z])', '-\\\\1', s).lower()" + ], + "split": "train" + }, + { + "Input": "get a list `no_integers` of all the items in list `mylist` that are not of type `int`", + "Output Program": [ + "no_integers = [x for x in mylist if not isinstance(x, int)]" + ], + "Output Answer": [ + "no_integers = [x for x in mylist if not isinstance(x, int)]" + ], + "split": "train" + }, + { + "Input": "Sort list `my_list` in alphabetical order based on the values associated with key 'name' of each dictionary in the list", + "Output Program": [ + "my_list.sort(key=operator.itemgetter('name'))" + ], + "Output Answer": [ + "my_list.sort(key=operator.itemgetter('name'))" + ], + "split": "train" + }, + { + "Input": "create a list containing keys of dictionary `d` and sort it alphabetically", + "Output Program": [ + "sorted(d, key=d.get)" + ], + "Output Answer": [ + "sorted(d, key=d.get)" + ], + "split": "train" + }, + { + "Input": "read keyboard-input", + "Output Program": [ + "raw_input('Enter your input:')" + ], + "Output Answer": [ + "raw_input('Enter your input:')" + ], + "split": "test" + }, + { + "Input": "get the date 6 months from today", + "Output Program": [ + "six_months = (date.today() + relativedelta(months=(+ 6)))" + ], + "Output Answer": [ + "six_months = (date.today() + relativedelta(months=(+ 6)))" + ], + "split": "train" + }, + { + "Input": "force bash interpreter '/bin/bash' to be used instead of shell", + "Output Program": [ + "os.system('GREPDB=\"echo 123\"; /bin/bash -c \"$GREPDB\"')" + ], + "Output Answer": [ + "os.system('GREPDB=\"echo 123\"; /bin/bash -c \"$GREPDB\"')" + ], + "split": "train" + }, + { + "Input": "Extract subset of key value pair for keys 'l', 'm', 'n' from `bigdict` in python 3", + "Output Program": [ + "{k: bigdict[k] for k in ('l', 'm', 'n')}" + ], + "Output Answer": [ + "{k: bigdict[k] for k in ('l', 'm', 'n')}" + ], + "split": "train" + }, + { + "Input": "Replace repeated instances of a character '*' with a single instance in a string 'text'", + "Output Program": [ + "re.sub('\\\\*\\\\*+', '*', text)" + ], + "Output Answer": [ + "re.sub('\\\\*\\\\*+', '*', text)" + ], + "split": "train" + }, + { + "Input": "add column `d` to index of dataframe `df`", + "Output Program": [ + "df.set_index(['d'], append=True)" + ], + "Output Answer": [ + "df.set_index(['d'], append=True)" + ], + "split": "train" + }, + { + "Input": "Get all the items from a list of tuple 'l' where second item in tuple is '1'.", + "Output Program": [ + "[x for x in l if x[1] == 1]" + ], + "Output Answer": [ + "[x for x in l if x[1] == 1]" + ], + "split": "train" + }, + { + "Input": "convert a list of hex byte strings `['BB', 'A7', 'F6', '9E']` to a list of hex integers", + "Output Program": [ + "[int(x, 16) for x in ['BB', 'A7', 'F6', '9E']]" + ], + "Output Answer": [ + "[int(x, 16) for x in ['BB', 'A7', 'F6', '9E']]" + ], + "split": "train" + }, + { + "Input": "Delete an element `key` from a dictionary `d`", + "Output Program": [ + "del d[key]" + ], + "Output Answer": [ + "del d[key]" + ], + "split": "train" + }, + { + "Input": "lookup dictionary key `key1` in Django template `json`", + "Output Program": [ + "{{json.key1}}" + ], + "Output Answer": [ + "{{json.key1}}" + ], + "split": "train" + }, + { + "Input": "replacing nan in the dataframe `df` with row average", + "Output Program": [ + "df.fillna(df.mean(axis=1), axis=1)" + ], + "Output Answer": [ + "df.fillna(df.mean(axis=1), axis=1)" + ], + "split": "test" + }, + { + "Input": "create a list `files` containing all files in directory '.' that starts with numbers between 0 and 9 and ends with the extension '.jpg'", + "Output Program": [ + "files = [f for f in os.listdir('.') if re.match('[0-9]+.*\\\\.jpg', f)]" + ], + "Output Answer": [ + "files = [f for f in os.listdir('.') if re.match('[0-9]+.*\\\\.jpg', f)]" + ], + "split": "train" + }, + { + "Input": "round number 1.0005 up to 3 decimal places", + "Output Program": [ + "round(1.0005, 3)" + ], + "Output Answer": [ + "round(1.0005, 3)" + ], + "split": "train" + }, + { + "Input": "execute a jar file 'Blender.jar' using subprocess", + "Output Program": [ + "subprocess.call(['java', '-jar', 'Blender.jar'])" + ], + "Output Answer": [ + "subprocess.call(['java', '-jar', 'Blender.jar'])" + ], + "split": "train" + }, + { + "Input": "create a set from string `s` to remove duplicate characters", + "Output Program": [ + "print ' '.join(set(s))" + ], + "Output Answer": [ + "print ' '.join(set(s))" + ], + "split": "train" + }, + { + "Input": "length of longest element in list `words`", + "Output Program": [ + "len(max(words, key=len))" + ], + "Output Answer": [ + "len(max(words, key=len))" + ], + "split": "test" + }, + { + "Input": "Create a tuple `t` containing first element of each tuple in tuple `s`", + "Output Program": [ + "t = tuple(x[0] for x in s)" + ], + "Output Answer": [ + "t = tuple(x[0] for x in s)" + ], + "split": "train" + }, + { + "Input": "Selecting Element \"//li/label/input\" followed by text \"polishpottery\" with Selenium WebDriver `driver`", + "Output Program": [ + "driver.find_element_by_xpath(\"//li/label/input[contains(..,'polishpottery')]\")" + ], + "Output Answer": [ + "driver.find_element_by_xpath(\"//li/label/input[contains(..,'polishpottery')]\")" + ], + "split": "train" + }, + { + "Input": "get a list of values for key 'key' from a list of dictionaries `l`", + "Output Program": [ + "[d['key'] for d in l]" + ], + "Output Answer": [ + "[d['key'] for d in l]" + ], + "split": "train" + }, + { + "Input": "get indexes of the largest `2` values from a list `a` using itemgetter", + "Output Program": [ + "zip(*sorted(enumerate(a), key=operator.itemgetter(1)))[0][-2:]" + ], + "Output Answer": [ + "zip(*sorted(enumerate(a), key=operator.itemgetter(1)))[0][-2:]" + ], + "split": "train" + }, + { + "Input": "get indexes of all true boolean values from a list `bool_list`", + "Output Program": [ + "[i for i, elem in enumerate(bool_list, 1) if elem]" + ], + "Output Answer": [ + "[i for i, elem in enumerate(bool_list, 1) if elem]" + ], + "split": "train" + }, + { + "Input": "write dataframe `df`, excluding index, to a csv file", + "Output Program": [ + "df.to_csv(filename, index=False)" + ], + "Output Answer": [ + "df.to_csv(filename, index=False)" + ], + "split": "test" + }, + { + "Input": "replace nan values in a pandas data frame with the average of columns", + "Output Program": [ + "df.apply(lambda x: x.fillna(x.mean()), axis=0)" + ], + "Output Answer": [ + "df.apply(lambda x: x.fillna(x.mean()), axis=0)" + ], + "split": "train" + }, + { + "Input": "Retrieve list of values from dictionary 'd'", + "Output Program": [ + "list(d.values())" + ], + "Output Answer": [ + "list(d.values())" + ], + "split": "train" + }, + { + "Input": "find a value within nested json 'data' where the key inside another key 'B' is unknown.", + "Output Program": [ + "data['A']['B'].values()[0]['maindata'][0]['Info']" + ], + "Output Answer": [ + "data['A']['B'].values()[0]['maindata'][0]['Info']" + ], + "split": "test" + }, + { + "Input": "sort the list of tuples `lst` by the sum of every value except the first and by the first value in reverse order", + "Output Program": [ + "sorted(lst, key=lambda x: (sum(x[1:]), x[0]), reverse=True)" + ], + "Output Answer": [ + "sorted(lst, key=lambda x: (sum(x[1:]), x[0]), reverse=True)" + ], + "split": "train" + }, + { + "Input": "get list of all unique characters in a string 'aaabcabccd'", + "Output Program": [ + "list(set('aaabcabccd'))" + ], + "Output Answer": [ + "list(set('aaabcabccd'))" + ], + "split": "train" + }, + { + "Input": "create a file 'filename' with each tuple in the list `mylist` written to a line", + "Output Program": [ + "open('filename', 'w').write('\\n'.join('%s %s' % x for x in mylist))" + ], + "Output Answer": [ + "open('filename', 'w').write('\\n'.join('%s %s' % x for x in mylist))" + ], + "split": "train" + }, + { + "Input": "writing items in list `thelist` to file `thefile`", + "Output Program": [ + "for item in thelist:\n thefile.write(('%s\\n' % item))", + "for item in thelist:\n pass" + ], + "Output Answer": [ + "for item in thelist:\n thefile.write(('%s\\n' % item))", + "for item in thelist:\n pass" + ], + "split": "train" + }, + { + "Input": "Convert string '03:55' into datetime.time object", + "Output Program": [ + "datetime.datetime.strptime('03:55', '%H:%M').time()" + ], + "Output Answer": [ + "datetime.datetime.strptime('03:55', '%H:%M').time()" + ], + "split": "train" + }, + { + "Input": "python regex - check for a capital letter with a following lowercase in string `string`", + "Output Program": [ + "re.sub('^[A-Z0-9]*(?![a-z])', '', string)" + ], + "Output Answer": [ + "re.sub('^[A-Z0-9]*(?![a-z])', '', string)" + ], + "split": "test" + }, + { + "Input": "list all files of a directory \"somedirectory\"", + "Output Program": [ + "os.listdir('somedirectory')" + ], + "Output Answer": [ + "os.listdir('somedirectory')" + ], + "split": "train" + }, + { + "Input": "multiply the columns of sparse matrix `m` by array `a` then multiply the rows of the resulting matrix by array `a`", + "Output Program": [ + "numpy.dot(numpy.dot(a, m), a)" + ], + "Output Answer": [ + "numpy.dot(numpy.dot(a, m), a)" + ], + "split": "train" + }, + { + "Input": "convert an rgb image 'messi5.jpg' into grayscale `img`", + "Output Program": [ + "img = cv2.imread('messi5.jpg', 0)" + ], + "Output Answer": [ + "img = cv2.imread('messi5.jpg', 0)" + ], + "split": "train" + }, + { + "Input": "erase all the contents of a file `filename`", + "Output Program": [ + "open(filename, 'w').close()" + ], + "Output Answer": [ + "open(filename, 'w').close()" + ], + "split": "test" + }, + { + "Input": "run r script '/usr/bin/Rscript --vanilla /pathto/MyrScript.r'", + "Output Program": [ + "subprocess.call('/usr/bin/Rscript --vanilla /pathto/MyrScript.r', shell=True)" + ], + "Output Answer": [ + "subprocess.call('/usr/bin/Rscript --vanilla /pathto/MyrScript.r', shell=True)" + ], + "split": "test" + }, + { + "Input": "plot a bar graph from the column 'color' in the DataFrame 'df'", + "Output Program": [ + "df.colour.value_counts().plot(kind='bar')" + ], + "Output Answer": [ + "df.colour.value_counts().plot(kind='bar')" + ], + "split": "train" + }, + { + "Input": "clear terminal screen on windows", + "Output Program": [ + "os.system('cls')" + ], + "Output Answer": [ + "os.system('cls')" + ], + "split": "train" + }, + { + "Input": "extract attributes 'src=\"js/([^\"]*\\\\bjquery\\\\b[^\"]*)\"' from string `data`", + "Output Program": [ + "re.findall('src=\"js/([^\"]*\\\\bjquery\\\\b[^\"]*)\"', data)" + ], + "Output Answer": [ + "re.findall('src=\"js/([^\"]*\\\\bjquery\\\\b[^\"]*)\"', data)" + ], + "split": "test" + }, + { + "Input": "sort list `mylist` of tuples by arbitrary key from list `order`", + "Output Program": [ + "sorted(mylist, key=lambda x: order.index(x[1]))" + ], + "Output Answer": [ + "sorted(mylist, key=lambda x: order.index(x[1]))" + ], + "split": "train" + }, + { + "Input": "convert utf-8 string `s` to lowercase", + "Output Program": [ + "s.decode('utf-8').lower()" + ], + "Output Answer": [ + "s.decode('utf-8').lower()" + ], + "split": "train" + }, + { + "Input": "list folders in zip file 'file' that ends with '/'", + "Output Program": [ + "[x for x in file.namelist() if x.endswith('/')]" + ], + "Output Answer": [ + "[x for x in file.namelist() if x.endswith('/')]" + ], + "split": "train" + }, + { + "Input": "group a list of dicts `LD` into one dict by key", + "Output Program": [ + "print dict(zip(LD[0], zip(*[d.values() for d in LD])))" + ], + "Output Answer": [ + "print dict(zip(LD[0], zip(*[d.values() for d in LD])))" + ], + "split": "test" + }, + { + "Input": "trim whitespace (including tabs) in `s` on the right side", + "Output Program": [ + "s = s.rstrip()" + ], + "Output Answer": [ + "s = s.rstrip()" + ], + "split": "train" + }, + { + "Input": "find all anchor tags in html `soup` whose url begins with `http://www.iwashere.com`", + "Output Program": [ + "soup.find_all('a', href=re.compile('http://www\\\\.iwashere\\\\.com/'))" + ], + "Output Answer": [ + "soup.find_all('a', href=re.compile('http://www\\\\.iwashere\\\\.com/'))" + ], + "split": "train" + }, + { + "Input": "Create a list containing the indexes of rows where the value of column 'BoolCol' in dataframe `df` are equal to True", + "Output Program": [ + "df.iloc[np.flatnonzero(df['BoolCol'])]" + ], + "Output Answer": [ + "df.iloc[np.flatnonzero(df['BoolCol'])]" + ], + "split": "test" + }, + { + "Input": "make a list of integers from 0 to `5` where each second element is a duplicate of the previous element", + "Output Program": [ + "print [u for v in [[i, i] for i in range(5)] for u in v]" + ], + "Output Answer": [ + "print [u for v in [[i, i] for i in range(5)] for u in v]" + ], + "split": "train" + }, + { + "Input": "select all rows in dataframe `df` where the values of column 'columnX' is bigger than or equal to `x` and smaller than or equal to `y`", + "Output Program": [ + "df[(x <= df['columnX']) & (df['columnX'] <= y)]" + ], + "Output Answer": [ + "df[(x <= df['columnX']) & (df['columnX'] <= y)]" + ], + "split": "train" + }, + { + "Input": "get value of key `post code` associated with first index of key `places` of dictionary `data`", + "Output Program": [ + "print data['places'][0]['post code']" + ], + "Output Answer": [ + "print data['places'][0]['post code']" + ], + "split": "train" + }, + { + "Input": "get the logical xor of two variables `str1` and `str2`", + "Output Program": [ + "return (bool(str1) ^ bool(str2))" + ], + "Output Answer": [ + "return (bool(str1) ^ bool(str2))" + ], + "split": "train" + }, + { + "Input": "convert a list of integers into a single integer", + "Output Program": [ + "r = int(''.join(map(str, x)))" + ], + "Output Answer": [ + "r = int(''.join(map(str, x)))" + ], + "split": "train" + }, + { + "Input": "replace special characters in url 'http://spam.com/go/' using the '%xx' escape", + "Output Program": [ + "urllib.quote('http://spam.com/go/')" + ], + "Output Answer": [ + "urllib.quote('http://spam.com/go/')" + ], + "split": "train" + }, + { + "Input": "find the index of sub string 'df' in string 'sdfasdf'", + "Output Program": [ + "'sdfasdf'.index('df')" + ], + "Output Answer": [ + "'sdfasdf'.index('df')" + ], + "split": "train" + }, + { + "Input": "loop through 0 to 10 with step 2", + "Output Program": [ + "for i in xrange(0, 10, 2):\n pass" + ], + "Output Answer": [ + "for i in xrange(0, 10, 2):\n pass" + ], + "split": "train" + }, + { + "Input": "write `newFileBytes` to a binary file `newFile`", + "Output Program": [ + "newFile.write(struct.pack('5B', *newFileBytes))" + ], + "Output Answer": [ + "newFile.write(struct.pack('5B', *newFileBytes))" + ], + "split": "test" + }, + { + "Input": "print a unicode string `text`", + "Output Program": [ + "print text.encode('windows-1252')" + ], + "Output Answer": [ + "print text.encode('windows-1252')" + ], + "split": "train" + }, + { + "Input": "loop through `mylist` with step 2", + "Output Program": [ + "for i in mylist[::2]:\n pass" + ], + "Output Answer": [ + "for i in mylist[::2]:\n pass" + ], + "split": "train" + }, + { + "Input": "sort a list of lists `list_to_sort` by indices 2,0,1 of the inner list", + "Output Program": [ + "sorted_list = sorted(list_to_sort, key=itemgetter(2, 0, 1))" + ], + "Output Answer": [ + "sorted_list = sorted(list_to_sort, key=itemgetter(2, 0, 1))" + ], + "split": "train" + }, + { + "Input": "convert tuple elements in list `[(1,2),(3,4),(5,6),]` into lists", + "Output Program": [ + "map(list, zip(*[(1, 2), (3, 4), (5, 6)]))" + ], + "Output Answer": [ + "map(list, zip(*[(1, 2), (3, 4), (5, 6)]))" + ], + "split": "train" + }, + { + "Input": "assign values to two variables, `var1` and `var2` from user input response to `'Enter two numbers here: ` split on whitespace", + "Output Program": [ + "var1, var2 = raw_input('Enter two numbers here: ').split()" + ], + "Output Answer": [ + "var1, var2 = raw_input('Enter two numbers here: ').split()" + ], + "split": "train" + }, + { + "Input": "Sort a list of dictionaries `list_to_be_sorted` by the value of the dictionary key `name`", + "Output Program": [ + "newlist = sorted(list_to_be_sorted, key=lambda k: k['name'])" + ], + "Output Answer": [ + "newlist = sorted(list_to_be_sorted, key=lambda k: k['name'])" + ], + "split": "test" + }, + { + "Input": "Django set default value of field `b` equal to '0000000'", + "Output Program": [ + "b = models.CharField(max_length=7, default='0000000', editable=False)" + ], + "Output Answer": [ + "b = models.CharField(max_length=7, default='0000000', editable=False)" + ], + "split": "test" + }, + { + "Input": "check if path `my_path` is an absolute path", + "Output Program": [ + "os.path.isabs(my_path)" + ], + "Output Answer": [ + "os.path.isabs(my_path)" + ], + "split": "test" + }, + { + "Input": "reading tab-delimited csv file `filename` with pandas on mac", + "Output Program": [ + "pandas.read_csv(filename, sep='\\t', lineterminator='\\r')" + ], + "Output Answer": [ + "pandas.read_csv(filename, sep='\\t', lineterminator='\\r')" + ], + "split": "train" + }, + { + "Input": "Add indexes in a data frame `df` to a column `index1`", + "Output Program": [ + "df['index1'] = df.index" + ], + "Output Answer": [ + "df['index1'] = df.index" + ], + "split": "test" + }, + { + "Input": "skip the newline while printing `line`", + "Output Program": [ + "print line.rstrip('\\n')" + ], + "Output Answer": [ + "print line.rstrip('\\n')" + ], + "split": "train" + }, + { + "Input": "join each element in array `a` with element at the same index in array `b` as a tuple", + "Output Program": [ + "np.array([zip(x, y) for x, y in zip(a, b)])" + ], + "Output Answer": [ + "np.array([zip(x, y) for x, y in zip(a, b)])" + ], + "split": "test" + }, + { + "Input": "check if character '-' exists in a dataframe `df` cell 'a'", + "Output Program": [ + "df['a'].str.contains('-')" + ], + "Output Answer": [ + "df['a'].str.contains('-')" + ], + "split": "train" + }, + { + "Input": "check if a numpy array `a1` contains any element of another array `a2`", + "Output Program": [ + "np.any(np.in1d(a1, a2))" + ], + "Output Answer": [ + "np.any(np.in1d(a1, a2))" + ], + "split": "train" + }, + { + "Input": "decode a double URL encoded string \r\n'FireShot3%2B%25282%2529.png' to\r\n'FireShot3+(2).png'", + "Output Program": [ + "urllib.unquote(urllib.unquote('FireShot3%2B%25282%2529.png'))" + ], + "Output Answer": [ + "urllib.unquote(urllib.unquote('FireShot3%2B%25282%2529.png'))" + ], + "split": "train" + }, + { + "Input": "get the ASCII value of a character 'a' as an int", + "Output Program": [ + "ord('a')" + ], + "Output Answer": [ + "ord('a')" + ], + "split": "train" + }, + { + "Input": "write line \"hi there\" to file `f`", + "Output Program": [ + "print('hi there', file=f)" + ], + "Output Answer": [ + "print('hi there', file=f)" + ], + "split": "test" + }, + { + "Input": "check if object `obj` has attribute 'attr_name'", + "Output Program": [ + "hasattr(obj, 'attr_name')" + ], + "Output Answer": [ + "hasattr(obj, 'attr_name')" + ], + "split": "train" + }, + { + "Input": "Get keys from a dictionary 'd' where the value is '1'.", + "Output Program": [ + "print [key for key, value in d.items() if value == 1]" + ], + "Output Answer": [ + "print [key for key, value in d.items() if value == 1]" + ], + "split": "train" + }, + { + "Input": "extract all keys from a list of dictionaries `LoD`", + "Output Program": [ + "[i for s in [d.keys() for d in LoD] for i in s]" + ], + "Output Answer": [ + "[i for s in [d.keys() for d in LoD] for i in s]" + ], + "split": "train" + }, + { + "Input": "Display a image file `pathToFile`", + "Output Program": [ + "Image.open('pathToFile').show()" + ], + "Output Answer": [ + "Image.open('pathToFile').show()" + ], + "split": "train" + }, + { + "Input": "Terminating a Python script with error message \"some error message\"", + "Output Program": [ + "sys.exit('some error message')" + ], + "Output Answer": [ + "sys.exit('some error message')" + ], + "split": "train" + }, + { + "Input": "find all substrings in `mystring` beginning and ending with square brackets", + "Output Program": [ + "re.findall('\\\\[(.*?)\\\\]', mystring)" + ], + "Output Answer": [ + "re.findall('\\\\[(.*?)\\\\]', mystring)" + ], + "split": "train" + }, + { + "Input": "list all files in directory \".\"", + "Output Program": [ + "for (dirname, dirnames, filenames) in os.walk('.'):\n for subdirname in dirnames:\n print os.path.join(dirname, subdirname)\n for filename in filenames:\n pass" + ], + "Output Answer": [ + "for (dirname, dirnames, filenames) in os.walk('.'):\n for subdirname in dirnames:\n print os.path.join(dirname, subdirname)\n for filename in filenames:\n pass" + ], + "split": "train" + }, + { + "Input": "find all matches of regex pattern '([a-fA-F\\\\d]{32})' in string `data`", + "Output Program": [ + "re.findall('([a-fA-F\\\\d]{32})', data)" + ], + "Output Answer": [ + "re.findall('([a-fA-F\\\\d]{32})', data)" + ], + "split": "test" + }, + { + "Input": "convert list of key-value tuples `[('A', 1), ('B', 2), ('C', 3)]` into dictionary", + "Output Program": [ + "dict([('A', 1), ('B', 2), ('C', 3)])" + ], + "Output Answer": [ + "dict([('A', 1), ('B', 2), ('C', 3)])" + ], + "split": "train" + }, + { + "Input": "sort a set `s` by numerical value", + "Output Program": [ + "sorted(s, key=float)" + ], + "Output Answer": [ + "sorted(s, key=float)" + ], + "split": "train" + }, + { + "Input": "Check whether a numpy array `a` contains a given row `[1, 2]`", + "Output Program": [ + "any(np.equal(a, [1, 2]).all(1))" + ], + "Output Answer": [ + "any(np.equal(a, [1, 2]).all(1))" + ], + "split": "train" + }, + { + "Input": "Get all matching patterns 'a.*?a' from a string 'a 1 a 2 a 3 a 4 a'.", + "Output Program": [ + "re.findall('(?=(a.*?a))', 'a 1 a 2 a 3 a 4 a')" + ], + "Output Answer": [ + "re.findall('(?=(a.*?a))', 'a 1 a 2 a 3 a 4 a')" + ], + "split": "train" + }, + { + "Input": "remove newline in string 'Windows EOL\\r\\n' on the right side", + "Output Program": [ + "'Windows EOL\\r\\n'.rstrip('\\r\\n')" + ], + "Output Answer": [ + "'Windows EOL\\r\\n'.rstrip('\\r\\n')" + ], + "split": "train" + }, + { + "Input": "get the value of attribute 'property' of object `a` with default value 'default value'", + "Output Program": [ + "getattr(a, 'property', 'default value')" + ], + "Output Answer": [ + "getattr(a, 'property', 'default value')" + ], + "split": "train" + }, + { + "Input": "Removing duplicates in list `abracadabra`", + "Output Program": [ + "list(OrderedDict.fromkeys('abracadabra'))" + ], + "Output Answer": [ + "list(OrderedDict.fromkeys('abracadabra'))" + ], + "split": "test" + }, + { + "Input": "function to get the size of object", + "Output Program": [ + "len()" + ], + "Output Answer": [ + "len()" + ], + "split": "train" + }, + { + "Input": "Jinja join elements of array `tags` with space string ' '", + "Output Program": [ + "{{tags | join(' ')}}" + ], + "Output Answer": [ + "{{tags | join(' ')}}" + ], + "split": "train" + }, + { + "Input": "get a list of all keys in Cassandra database `cf` with pycassa", + "Output Program": [ + "list(cf.get_range().get_keys())" + ], + "Output Answer": [ + "list(cf.get_range().get_keys())" + ], + "split": "test" + }, + { + "Input": "reverse sort dictionary `d` based on its values", + "Output Program": [ + "sorted(d.items(), key=lambda (k, v): v, reverse=True)" + ], + "Output Answer": [ + "sorted(d.items(), key=lambda (k, v): v, reverse=True)" + ], + "split": "train" + }, + { + "Input": "Convert a list of lists `lol` to a dictionary with key as second value of a list and value as list itself", + "Output Program": [ + "{x[1]: x for x in lol}" + ], + "Output Answer": [ + "{x[1]: x for x in lol}" + ], + "split": "train" + }, + { + "Input": "trim whitespace in string `s`", + "Output Program": [ + "s.strip()" + ], + "Output Answer": [ + "s.strip()" + ], + "split": "train" + }, + { + "Input": "Get all the matches from a string `abcd` if it begins with a character `a`", + "Output Program": [ + "re.findall('[^a]', 'abcd')" + ], + "Output Answer": [ + "re.findall('[^a]', 'abcd')" + ], + "split": "train" + }, + { + "Input": "reverse a UTF-8 string 'a'", + "Output Program": [ + "b = a.decode('utf8')[::-1].encode('utf8')" + ], + "Output Answer": [ + "b = a.decode('utf8')[::-1].encode('utf8')" + ], + "split": "train" + }, + { + "Input": "generate 6 random numbers between 1 and 50", + "Output Program": [ + "random.sample(xrange(1, 50), 6)" + ], + "Output Answer": [ + "random.sample(xrange(1, 50), 6)" + ], + "split": "train" + }, + { + "Input": "convert list of tuples `L` to a string", + "Output Program": [ + "\"\"\", \"\"\".join('(' + ', '.join(i) + ')' for i in L)" + ], + "Output Answer": [ + "\"\"\", \"\"\".join('(' + ', '.join(i) + ')' for i in L)" + ], + "split": "test" + }, + { + "Input": "Get all texts and tags from a tag `strong` from etree tag `some_tag` using lxml", + "Output Program": [ + "print etree.tostring(some_tag.find('strong'))" + ], + "Output Answer": [ + "print etree.tostring(some_tag.find('strong'))" + ], + "split": "train" + }, + { + "Input": "subtract 5 hours from the time object `dt`", + "Output Program": [ + "dt -= datetime.timedelta(hours=5)" + ], + "Output Answer": [ + "dt -= datetime.timedelta(hours=5)" + ], + "split": "train" + }, + { + "Input": "download file from http url `file_url`", + "Output Program": [ + "file_name = wget.download(file_url)" + ], + "Output Answer": [ + "file_name = wget.download(file_url)" + ], + "split": "train" + }, + { + "Input": "split string 'QH QD JC KD JS' into a list on white spaces", + "Output Program": [ + "\"\"\"QH QD JC KD JS\"\"\".split()" + ], + "Output Answer": [ + "\"\"\"QH QD JC KD JS\"\"\".split()" + ], + "split": "test" + }, + { + "Input": "split string `s` by words that ends with 'd'", + "Output Program": [ + "re.findall('\\\\b(\\\\w+)d\\\\b', s)" + ], + "Output Answer": [ + "re.findall('\\\\b(\\\\w+)d\\\\b', s)" + ], + "split": "test" + }, + { + "Input": "merge rows from dataframe `df1` with rows from dataframe `df2` and calculate the mean for rows that have the same value of axis 1", + "Output Program": [ + "pd.concat((df1, df2), axis=1).mean(axis=1)" + ], + "Output Answer": [ + "pd.concat((df1, df2), axis=1).mean(axis=1)" + ], + "split": "train" + }, + { + "Input": "change directory to the directory of a python script", + "Output Program": [ + "os.chdir(os.path.dirname(__file__))" + ], + "Output Answer": [ + "os.chdir(os.path.dirname(__file__))" + ], + "split": "train" + }, + { + "Input": "append a pandas series `b` to the series `a` and get a continuous index", + "Output Program": [ + "a.append(b).reset_index(drop=True)" + ], + "Output Answer": [ + "a.append(b).reset_index(drop=True)" + ], + "split": "train" + }, + { + "Input": "sort a dictionary `d` by length of its values and print as string", + "Output Program": [ + "print ' '.join(sorted(d, key=lambda k: len(d[k]), reverse=True))" + ], + "Output Answer": [ + "print ' '.join(sorted(d, key=lambda k: len(d[k]), reverse=True))" + ], + "split": "train" + }, + { + "Input": "get current time in pretty format", + "Output Program": [ + "strftime('%Y-%m-%d %H:%M:%S', gmtime())" + ], + "Output Answer": [ + "strftime('%Y-%m-%d %H:%M:%S', gmtime())" + ], + "split": "train" + }, + { + "Input": "Enable the SO_REUSEADDR socket option in socket object `s` to fix the error `only one usage of each socket address is normally permitted`", + "Output Program": [ + "s.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)" + ], + "Output Answer": [ + "s.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)" + ], + "split": "train" + }, + { + "Input": "get the item at index 0 from the tuple that has maximum value at index 1 in list `lis`", + "Output Program": [ + "max(lis, key=itemgetter(1))[0]" + ], + "Output Answer": [ + "max(lis, key=itemgetter(1))[0]" + ], + "split": "test" + }, + { + "Input": "import a module 'a.b.c' with importlib.import_module in python 2", + "Output Program": [ + "importlib.import_module('a.b.c')" + ], + "Output Answer": [ + "importlib.import_module('a.b.c')" + ], + "split": "train" + }, + { + "Input": "sort list of nested dictionaries `yourdata` in reverse order of 'key' and 'subkey'", + "Output Program": [ + "yourdata.sort(key=lambda e: e['key']['subkey'], reverse=True)" + ], + "Output Answer": [ + "yourdata.sort(key=lambda e: e['key']['subkey'], reverse=True)" + ], + "split": "train" + }, + { + "Input": "get current date and time", + "Output Program": [ + "datetime.datetime.now()" + ], + "Output Answer": [ + "datetime.datetime.now()" + ], + "split": "train" + }, + { + "Input": "check if datafram `df` has any NaN vlaues", + "Output Program": [ + "df.isnull().values.any()" + ], + "Output Answer": [ + "df.isnull().values.any()" + ], + "split": "train" + }, + { + "Input": "convert an int 65 to hex string", + "Output Program": [ + "hex(65)" + ], + "Output Answer": [ + "hex(65)" + ], + "split": "train" + }, + { + "Input": "multiplication of two 1-dimensional arrays in numpy", + "Output Program": [ + "np.outer(a, b)" + ], + "Output Answer": [ + "np.outer(a, b)" + ], + "split": "train" + }, + { + "Input": "print string including multiple variables `name` and `score`", + "Output Program": [ + "print ('Total score for', name, 'is', score)" + ], + "Output Answer": [ + "print ('Total score for', name, 'is', score)" + ], + "split": "train" + }, + { + "Input": "unquote a urlencoded unicode string '%0a'", + "Output Program": [ + "urllib2.unquote('%0a')" + ], + "Output Answer": [ + "urllib2.unquote('%0a')" + ], + "split": "train" + }, + { + "Input": "find the real user home directory using python", + "Output Program": [ + "os.path.expanduser('~user')" + ], + "Output Answer": [ + "os.path.expanduser('~user')" + ], + "split": "train" + }, + { + "Input": "convert 21 to binary string", + "Output Program": [ + "bin(21)" + ], + "Output Answer": [ + "bin(21)" + ], + "split": "train" + }, + { + "Input": "Get the zip output as list from the lists `[1, 2, 3]`, `[4, 5, 6]`, `[7, 8, 9]`", + "Output Program": [ + "[list(a) for a in zip([1, 2, 3], [4, 5, 6], [7, 8, 9])]" + ], + "Output Answer": [ + "[list(a) for a in zip([1, 2, 3], [4, 5, 6], [7, 8, 9])]" + ], + "split": "train" + }, + { + "Input": "Rearrange the columns 'a','b','x','y' of pandas DataFrame `df` in mentioned sequence 'x' ,'y','a' ,'b'", + "Output Program": [ + "df = df[['x', 'y', 'a', 'b']]" + ], + "Output Answer": [ + "df = df[['x', 'y', 'a', 'b']]" + ], + "split": "train" + }, + { + "Input": "Remove the string value `item` from a list of strings `my_sequence`", + "Output Program": [ + "[item for item in my_sequence if item != 'item']" + ], + "Output Answer": [ + "[item for item in my_sequence if item != 'item']" + ], + "split": "train" + }, + { + "Input": "convert decimal integer 8 to a list of its binary values as elements", + "Output Program": [ + "[int(x) for x in list('{0:0b}'.format(8))]" + ], + "Output Answer": [ + "[int(x) for x in list('{0:0b}'.format(8))]" + ], + "split": "train" + }, + { + "Input": "return a DateTime object with the current UTC date", + "Output Program": [ + "today = datetime.datetime.utcnow().date()" + ], + "Output Answer": [ + "today = datetime.datetime.utcnow().date()" + ], + "split": "train" + }, + { + "Input": "sort keys of dictionary 'd' based on their values", + "Output Program": [ + "sorted(d, key=lambda k: d[k][1])" + ], + "Output Answer": [ + "sorted(d, key=lambda k: d[k][1])" + ], + "split": "train" + }, + { + "Input": "recursively remove folder `name`", + "Output Program": [ + "os.removedirs(name)" + ], + "Output Answer": [ + "os.removedirs(name)" + ], + "split": "train" + }, + { + "Input": "rename column 'gdp' in dataframe `data` to 'log(gdp)'", + "Output Program": [ + "data.rename(columns={'gdp': 'log(gdp)'}, inplace=True)" + ], + "Output Answer": [ + "data.rename(columns={'gdp': 'log(gdp)'}, inplace=True)" + ], + "split": "train" + }, + { + "Input": "get list of n next values of a generator `it`", + "Output Program": [ + "list(itertools.islice(it, 0, n, 1))" + ], + "Output Answer": [ + "list(itertools.islice(it, 0, n, 1))" + ], + "split": "train" + }, + { + "Input": "add color bar with image `mappable` to plot `plt`", + "Output Program": [ + "plt.colorbar(mappable=mappable, cax=ax3)" + ], + "Output Answer": [ + "plt.colorbar(mappable=mappable, cax=ax3)" + ], + "split": "test" + }, + { + "Input": "Get total number of values in a nested dictionary `food_colors`", + "Output Program": [ + "sum(len(x) for x in food_colors.values())" + ], + "Output Answer": [ + "sum(len(x) for x in food_colors.values())" + ], + "split": "train" + }, + { + "Input": "un-escaping characters in a string with python", + "Output Program": [ + "\"\"\"\\\\u003Cp\\\\u003E\"\"\".decode('unicode-escape')" + ], + "Output Answer": [ + "\"\"\"\\\\u003Cp\\\\u003E\"\"\".decode('unicode-escape')" + ], + "split": "train" + }, + { + "Input": "Check if all the values in a list `['a', 'b']` are present in another list `['b', 'a', 'foo', 'bar']`", + "Output Program": [ + "all(x in ['b', 'a', 'foo', 'bar'] for x in ['a', 'b'])" + ], + "Output Answer": [ + "all(x in ['b', 'a', 'foo', 'bar'] for x in ['a', 'b'])" + ], + "split": "train" + }, + { + "Input": "count all elements in a nested dictionary `food_colors`", + "Output Program": [ + "sum(len(v) for v in food_colors.itervalues())" + ], + "Output Answer": [ + "sum(len(v) for v in food_colors.itervalues())" + ], + "split": "train" + }, + { + "Input": "check if string `test.mp3` ends with one of the strings from a tuple `('.mp3', '.avi')`", + "Output Program": [ + "\"\"\"test.mp3\"\"\".endswith(('.mp3', '.avi'))" + ], + "Output Answer": [ + "\"\"\"test.mp3\"\"\".endswith(('.mp3', '.avi'))" + ], + "split": "train" + }, + { + "Input": "create list `changed_list ` containing elements of list `original_list` whilst converting strings containing digits to integers", + "Output Program": [ + "changed_list = [(int(f) if f.isdigit() else f) for f in original_list]" + ], + "Output Answer": [ + "changed_list = [(int(f) if f.isdigit() else f) for f in original_list]" + ], + "split": "train" + }, + { + "Input": "remove all instances of parenthesesis containing text beginning with `as ` from string `line`", + "Output Program": [ + "line = re.sub('\\\\(+as .*?\\\\) ', '', line)" + ], + "Output Answer": [ + "line = re.sub('\\\\(+as .*?\\\\) ', '', line)" + ], + "split": "train" + }, + { + "Input": "take screenshot 'screen.png' on mac os x", + "Output Program": [ + "os.system('screencapture screen.png')" + ], + "Output Answer": [ + "os.system('screencapture screen.png')" + ], + "split": "train" + }, + { + "Input": "drop a single subcolumn 'a' in column 'col1' from a dataframe `df`", + "Output Program": [ + "df.drop(('col1', 'a'), axis=1)" + ], + "Output Answer": [ + "df.drop(('col1', 'a'), axis=1)" + ], + "split": "train" + }, + { + "Input": "iterate over a dictionary `foo` in sorted order", + "Output Program": [ + "for (k, v) in sorted(foo.items()):\n pass" + ], + "Output Answer": [ + "for (k, v) in sorted(foo.items()):\n pass" + ], + "split": "train" + }, + { + "Input": "execute a command in the command prompt to list directory contents of the c drive `c:\\\\'", + "Output Program": [ + "os.system('dir c:\\\\')" + ], + "Output Answer": [ + "os.system('dir c:\\\\')" + ], + "split": "train" + }, + { + "Input": "check if dictionary `d` contains all keys in list `['somekey', 'someotherkey', 'somekeyggg']`", + "Output Program": [ + "all(word in d for word in ['somekey', 'someotherkey', 'somekeyggg'])" + ], + "Output Answer": [ + "all(word in d for word in ['somekey', 'someotherkey', 'somekeyggg'])" + ], + "split": "train" + }, + { + "Input": "Compare if each value in list `a` is less than respective index value in list `b`", + "Output Program": [ + "all(i < j for i, j in zip(a, b))" + ], + "Output Answer": [ + "all(i < j for i, j in zip(a, b))" + ], + "split": "train" + }, + { + "Input": "Get all urls within text `s`", + "Output Program": [ + "re.findall('\"(http.*?)\"', s, re.MULTILINE | re.DOTALL)" + ], + "Output Answer": [ + "re.findall('\"(http.*?)\"', s, re.MULTILINE | re.DOTALL)" + ], + "split": "test" + }, + { + "Input": "create a list containing elements from list `list` that are predicate to function `f`", + "Output Program": [ + "[f(x) for x in list]" + ], + "Output Answer": [ + "[f(x) for x in list]" + ], + "split": "train" + }, + { + "Input": "use a list of values `[3,6]` to select rows from a pandas dataframe `df`'s column 'A'", + "Output Program": [ + "df[df['A'].isin([3, 6])]" + ], + "Output Answer": [ + "df[df['A'].isin([3, 6])]" + ], + "split": "train" + }, + { + "Input": "request url 'https://www.reporo.com/' without verifying SSL certificates", + "Output Program": [ + "requests.get('https://www.reporo.com/', verify=False)" + ], + "Output Answer": [ + "requests.get('https://www.reporo.com/', verify=False)" + ], + "split": "train" + }, + { + "Input": "remove leading and trailing zeros in the string 'your_Strip'", + "Output Program": [ + "your_string.strip('0')" + ], + "Output Answer": [ + "your_string.strip('0')" + ], + "split": "train" + }, + { + "Input": "initialize a list `lst` of 100 objects Object()", + "Output Program": [ + "lst = [Object() for _ in range(100)]" + ], + "Output Answer": [ + "lst = [Object() for _ in range(100)]" + ], + "split": "test" + }, + { + "Input": "Convert array `x` into a correlation matrix", + "Output Program": [ + "np.corrcoef(x)" + ], + "Output Answer": [ + "np.corrcoef(x)" + ], + "split": "train" + }, + { + "Input": "get current requested url", + "Output Program": [ + "self.request.url" + ], + "Output Answer": [ + "self.request.url" + ], + "split": "train" + }, + { + "Input": "get a list `cleaned` that contains all non-empty elements in list `your_list`", + "Output Program": [ + "cleaned = [x for x in your_list if x]" + ], + "Output Answer": [ + "cleaned = [x for x in your_list if x]" + ], + "split": "train" + }, + { + "Input": "sort 2d array `matrix` by row with index 1", + "Output Program": [ + "sorted(matrix, key=itemgetter(1))" + ], + "Output Answer": [ + "sorted(matrix, key=itemgetter(1))" + ], + "split": "train" + }, + { + "Input": "sort a list of dictionary `list` first by key `points` and then by `time`", + "Output Program": [ + "list.sort(key=lambda item: (item['points'], item['time']))" + ], + "Output Answer": [ + "list.sort(key=lambda item: (item['points'], item['time']))" + ], + "split": "test" + }, + { + "Input": "Reverse key-value pairs in a dictionary `map`", + "Output Program": [ + "dict((v, k) for k, v in map.iteritems())" + ], + "Output Answer": [ + "dict((v, k) for k, v in map.iteritems())" + ], + "split": "train" + }, + { + "Input": "get the dimensions of array `a`", + "Output Program": [ + "N.shape(a)" + ], + "Output Answer": [ + "N.shape(a)" + ], + "split": "train" + }, + { + "Input": "print letter that appears most frequently in string `s`", + "Output Program": [ + "print collections.Counter(s).most_common(1)[0]" + ], + "Output Answer": [ + "print collections.Counter(s).most_common(1)[0]" + ], + "split": "train" + }, + { + "Input": "convert a flat list into a list of tuples of every two items in the list, in order", + "Output Program": [ + "print zip(my_list[0::2], my_list[1::2])" + ], + "Output Answer": [ + "print zip(my_list[0::2], my_list[1::2])" + ], + "split": "train" + }, + { + "Input": "modify sys.path for python module `subdir`", + "Output Program": [ + "sys.path.append(os.path.join(os.path.dirname(__file__), 'subdir'))" + ], + "Output Answer": [ + "sys.path.append(os.path.join(os.path.dirname(__file__), 'subdir'))" + ], + "split": "test" + }, + { + "Input": "flatten a dataframe df to a list", + "Output Program": [ + "df.values.flatten()" + ], + "Output Answer": [ + "df.values.flatten()" + ], + "split": "train" + }, + { + "Input": "Split string `line` into a list by whitespace", + "Output Program": [ + "line.split()" + ], + "Output Answer": [ + "line.split()" + ], + "split": "test" + }, + { + "Input": "Find all Chinese characters in string `ipath`", + "Output Program": [ + "re.findall(u'[\\u4e00-\\u9fff]+', ipath)" + ], + "Output Answer": [ + "re.findall(u'[\\u4e00-\\u9fff]+', ipath)" + ], + "split": "train" + }, + { + "Input": "zip lists `[1, 2], [3, 4], [5, 6]` in a list", + "Output Program": [ + "zip(*[[1, 2], [3, 4], [5, 6]])" + ], + "Output Answer": [ + "zip(*[[1, 2], [3, 4], [5, 6]])" + ], + "split": "train" + }, + { + "Input": "remove substring 'bag,' from a string 'lamp, bag, mirror'", + "Output Program": [ + "print 'lamp, bag, mirror'.replace('bag,', '')" + ], + "Output Answer": [ + "print 'lamp, bag, mirror'.replace('bag,', '')" + ], + "split": "test" + }, + { + "Input": "Convert tuple `t` to list", + "Output Program": [ + "list(t)" + ], + "Output Answer": [ + "list(t)" + ], + "split": "test" + }, + { + "Input": "select only specific columns 'a' and 'c' from a dataframe 'data' with multiindex columns", + "Output Program": [ + "data.loc[:, ([('one', 'a'), ('one', 'c'), ('two', 'a'), ('two', 'c')])]" + ], + "Output Answer": [ + "data.loc[:, ([('one', 'a'), ('one', 'c'), ('two', 'a'), ('two', 'c')])]" + ], + "split": "train" + }, + { + "Input": "remove all values within one list `[2, 3, 7]` from another list `a`", + "Output Program": [ + "[x for x in a if x not in [2, 3, 7]]" + ], + "Output Answer": [ + "[x for x in a if x not in [2, 3, 7]]" + ], + "split": "train" + }, + { + "Input": "convert rows in pandas data frame `df` into list", + "Output Program": [ + "df.apply(lambda x: x.tolist(), axis=1)" + ], + "Output Answer": [ + "df.apply(lambda x: x.tolist(), axis=1)" + ], + "split": "train" + }, + { + "Input": "get keys and items of dictionary `d` as a list", + "Output Program": [ + "list(d.items())" + ], + "Output Answer": [ + "list(d.items())" + ], + "split": "train" + }, + { + "Input": "fetch smilies matching regex pattern '(?::|;|=)(?:-)?(?:\\\\)|\\\\(|D|P)' in string `s`", + "Output Program": [ + "re.findall('(?::|;|=)(?:-)?(?:\\\\)|\\\\(|D|P)', s)" + ], + "Output Answer": [ + "re.findall('(?::|;|=)(?:-)?(?:\\\\)|\\\\(|D|P)', s)" + ], + "split": "train" + }, + { + "Input": "reverse sort Counter `x` by values", + "Output Program": [ + "sorted(x, key=x.get, reverse=True)" + ], + "Output Answer": [ + "sorted(x, key=x.get, reverse=True)" + ], + "split": "test" + }, + { + "Input": "Get sum of values of columns 'Y1961', 'Y1962', 'Y1963' after group by on columns \"Country\" and \"Item_code\" in dataframe `df`.", + "Output Program": [ + "df.groupby(['Country', 'Item_Code'])[['Y1961', 'Y1962', 'Y1963']].sum()" + ], + "Output Answer": [ + "df.groupby(['Country', 'Item_Code'])[['Y1961', 'Y1962', 'Y1963']].sum()" + ], + "split": "train" + }, + { + "Input": "execute python code `myscript.py` in a virtualenv `/path/to/my/venv` from matlab", + "Output Program": [ + "system('/path/to/my/venv/bin/python myscript.py')" + ], + "Output Answer": [ + "system('/path/to/my/venv/bin/python myscript.py')" + ], + "split": "train" + }, + { + "Input": "Check if 3 is not in the list [4,5,6]", + "Output Program": [ + "(3 not in [4, 5, 6])" + ], + "Output Answer": [ + "(3 not in [4, 5, 6])" + ], + "split": "train" + }, + { + "Input": "remove all non-alphabet chars from string `s`", + "Output Program": [ + "\"\"\"\"\"\".join([i for i in s if i.isalpha()])" + ], + "Output Answer": [ + "\"\"\"\"\"\".join([i for i in s if i.isalpha()])" + ], + "split": "train" + }, + { + "Input": "Get the integer location of a key `bob` in a pandas data frame", + "Output Program": [ + "df.index.get_loc('bob')" + ], + "Output Answer": [ + "df.index.get_loc('bob')" + ], + "split": "test" + }, + { + "Input": "erase the contents of a file `filename`", + "Output Program": [ + "open('filename', 'w').close()" + ], + "Output Answer": [ + "open('filename', 'w').close()" + ], + "split": "train" + }, + { + "Input": "fetch all elements in a dictionary `parent_dict`, falling between two keys 2 and 4", + "Output Program": [ + "dict((k, v) for k, v in parent_dict.iteritems() if 2 < k < 4)" + ], + "Output Answer": [ + "dict((k, v) for k, v in parent_dict.iteritems() if 2 < k < 4)" + ], + "split": "train" + }, + { + "Input": "sort list of strings in list `the_list` by integer suffix", + "Output Program": [ + "sorted(the_list, key=lambda k: int(k.split('_')[1]))" + ], + "Output Answer": [ + "sorted(the_list, key=lambda k: int(k.split('_')[1]))" + ], + "split": "train" + }, + { + "Input": "set environment variable 'DEBUSSY' to '1'", + "Output Program": [ + "os.environ['DEBUSSY'] = '1'" + ], + "Output Answer": [ + "os.environ['DEBUSSY'] = '1'" + ], + "split": "train" + }, + { + "Input": "remove backslashes from string `result`", + "Output Program": [ + "result.replace('\\\\', '')" + ], + "Output Answer": [ + "result.replace('\\\\', '')" + ], + "split": "train" + }, + { + "Input": "get unique values from the list `['a', 'b', 'c', 'd']`", + "Output Program": [ + "set(['a', 'b', 'c', 'd'])" + ], + "Output Answer": [ + "set(['a', 'b', 'c', 'd'])" + ], + "split": "train" + }, + { + "Input": "Get a list of pairs from a string `word` using lambda function", + "Output Program": [ + "list(map(lambda x, y: x + y, word[:-1], word[1:]))" + ], + "Output Answer": [ + "list(map(lambda x, y: x + y, word[:-1], word[1:]))" + ], + "split": "test" + }, + { + "Input": "trim whitespace (including tabs) in `s` on the left side", + "Output Program": [ + "s = s.lstrip()" + ], + "Output Answer": [ + "s = s.lstrip()" + ], + "split": "train" + }, + { + "Input": "insert variables `(var1, var2, var3)` into sql statement 'INSERT INTO table VALUES (?, ?, ?)'", + "Output Program": [ + "cursor.execute('INSERT INTO table VALUES (?, ?, ?)', (var1, var2, var3))" + ], + "Output Answer": [ + "cursor.execute('INSERT INTO table VALUES (?, ?, ?)', (var1, var2, var3))" + ], + "split": "train" + }, + { + "Input": "Sort dictionary `o` in ascending order based on its keys and items", + "Output Program": [ + "sorted(o.items())" + ], + "Output Answer": [ + "sorted(o.items())" + ], + "split": "test" + }, + { + "Input": "merge lists `list_a` and `list_b` into a list of tuples", + "Output Program": [ + "zip(list_a, list_b)" + ], + "Output Answer": [ + "zip(list_a, list_b)" + ], + "split": "train" + }, + { + "Input": "run app `app` on host '192.168.0.58' and port 9000 in Flask", + "Output Program": [ + "app.run(host='192.168.0.58', port=9000, debug=False)" + ], + "Output Answer": [ + "app.run(host='192.168.0.58', port=9000, debug=False)" + ], + "split": "train" + }, + { + "Input": "get os version", + "Output Program": [ + "import platform\nplatform.release()" + ], + "Output Answer": [ + "import platform\nplatform.release()" + ], + "split": "train" + }, + { + "Input": "get the date 1 month from today", + "Output Program": [ + "(date(2010, 12, 31) + relativedelta(months=(+ 1)))" + ], + "Output Answer": [ + "(date(2010, 12, 31) + relativedelta(months=(+ 1)))" + ], + "split": "train" + }, + { + "Input": "sort two lists `list1` and `list2` together using lambda function", + "Output Program": [ + "[list(x) for x in zip(*sorted(zip(list1, list2), key=lambda pair: pair[0]))]" + ], + "Output Answer": [ + "[list(x) for x in zip(*sorted(zip(list1, list2), key=lambda pair: pair[0]))]" + ], + "split": "train" + }, + { + "Input": "append to file 'test' content 'koko'", + "Output Program": [ + "open('test', 'a+b').write('koko')" + ], + "Output Answer": [ + "open('test', 'a+b').write('koko')" + ], + "split": "train" + }, + { + "Input": "match regex pattern 'TAA(?:[ATGC]{3})+?TAA' on string `seq`", + "Output Program": [ + "re.findall('TAA(?:[ATGC]{3})+?TAA', seq)" + ], + "Output Answer": [ + "re.findall('TAA(?:[ATGC]{3})+?TAA', seq)" + ], + "split": "train" + }, + { + "Input": "extract floating point numbers from a string 'Current Level: -13.2 db or 14.2 or 3'", + "Output Program": [ + "re.findall('[-+]?\\\\d*\\\\.\\\\d+|\\\\d+', 'Current Level: -13.2 db or 14.2 or 3')" + ], + "Output Answer": [ + "re.findall('[-+]?\\\\d*\\\\.\\\\d+|\\\\d+', 'Current Level: -13.2 db or 14.2 or 3')" + ], + "split": "train" + }, + { + "Input": "add string `-` in `4th` position of a string `s`", + "Output Program": [ + "s[:4] + '-' + s[4:]" + ], + "Output Answer": [ + "s[:4] + '-' + s[4:]" + ], + "split": "train" + }, + { + "Input": "split string `s` by letter 's'", + "Output Program": [ + "s.split('s')" + ], + "Output Answer": [ + "s.split('s')" + ], + "split": "train" + }, + { + "Input": "Get the length of list `my_list`", + "Output Program": [ + "len(my_list)" + ], + "Output Answer": [ + "len(my_list)" + ], + "split": "test" + }, + { + "Input": "right trimming \"\\n\\t\" from string `myString`", + "Output Program": [ + "myString.rstrip('\\n\\t')" + ], + "Output Answer": [ + "myString.rstrip('\\n\\t')" + ], + "split": "train" + }, + { + "Input": "Produce a string that is suitable as Unicode literal from string 'M\\\\N{AMPERSAND}M\\\\N{APOSTROPHE}s'", + "Output Program": [ + "u'M\\\\N{AMPERSAND}M\\\\N{APOSTROPHE}s'.encode().decode('unicode-escape')" + ], + "Output Answer": [ + "u'M\\\\N{AMPERSAND}M\\\\N{APOSTROPHE}s'.encode().decode('unicode-escape')" + ], + "split": "train" + }, + { + "Input": "set labels `[1, 2, 3, 4, 5]` on axis X in plot `plt`", + "Output Program": [ + "plt.xticks([1, 2, 3, 4, 5])" + ], + "Output Answer": [ + "plt.xticks([1, 2, 3, 4, 5])" + ], + "split": "train" + }, + { + "Input": "remove all non-alphanumeric characters except space from a string `text` and lower it", + "Output Program": [ + "re.sub('(?!\\\\s)[\\\\W_]', '', text).lower().strip()" + ], + "Output Answer": [ + "re.sub('(?!\\\\s)[\\\\W_]', '', text).lower().strip()" + ], + "split": "test" + }, + { + "Input": "create a list of aggregation of each element from list `l2` to all elements of list `l1`", + "Output Program": [ + "[(x + y) for x in l2 for y in l1]" + ], + "Output Answer": [ + "[(x + y) for x in l2 for y in l1]" + ], + "split": "train" + }, + { + "Input": "multiply array `a` and array `b`respective elements then sum each row of the new array", + "Output Program": [ + "np.einsum('ji,i->j', a, b)" + ], + "Output Answer": [ + "np.einsum('ji,i->j', a, b)" + ], + "split": "train" + }, + { + "Input": "execute shell command 'grep -r PASSED *.log | sort -u | wc -l' with a | pipe in it", + "Output Program": [ + "subprocess.call('grep -r PASSED *.log | sort -u | wc -l', shell=True)" + ], + "Output Answer": [ + "subprocess.call('grep -r PASSED *.log | sort -u | wc -l', shell=True)" + ], + "split": "train" + }, + { + "Input": "remove all special characters, punctuation and spaces from a string `mystring` using regex", + "Output Program": [ + "re.sub('[^A-Za-z0-9]+', '', mystring)" + ], + "Output Answer": [ + "re.sub('[^A-Za-z0-9]+', '', mystring)" + ], + "split": "test" + }, + { + "Input": "get a list from a list `lst` with values mapped into a dictionary `dct`", + "Output Program": [ + "[dct[k] for k in lst]" + ], + "Output Answer": [ + "[dct[k] for k in lst]" + ], + "split": "test" + }, + { + "Input": "decode the string 'stringnamehere' to UTF-8", + "Output Program": [ + "stringnamehere.decode('utf-8', 'ignore')" + ], + "Output Answer": [ + "stringnamehere.decode('utf-8', 'ignore')" + ], + "split": "train" + }, + { + "Input": "Split string `input` at every space followed by an upper-case letter", + "Output Program": [ + "re.split('[ ](?=[A-Z])', input)" + ], + "Output Answer": [ + "re.split('[ ](?=[A-Z])', input)" + ], + "split": "test" + }, + { + "Input": "Reset the indexes of a pandas data frame", + "Output Program": [ + "df2 = df.reset_index()" + ], + "Output Answer": [ + "df2 = df.reset_index()" + ], + "split": "train" + }, + { + "Input": "convert keys in dictionary `thedict` into case insensitive", + "Output Program": [ + "theset = set(k.lower() for k in thedict)" + ], + "Output Answer": [ + "theset = set(k.lower() for k in thedict)" + ], + "split": "train" + }, + { + "Input": "print unicode characters in a string `\\u0420\\u043e\\u0441\\u0441\\u0438\\u044f`", + "Output Program": [ + "print u'\\u0420\\u043e\\u0441\\u0441\\u0438\\u044f'" + ], + "Output Answer": [ + "print u'\\u0420\\u043e\\u0441\\u0441\\u0438\\u044f'" + ], + "split": "train" + }, + { + "Input": "add an entry 'wuggah' at the beginning of list `myList`", + "Output Program": [ + "myList.insert(0, 'wuggah')" + ], + "Output Answer": [ + "myList.insert(0, 'wuggah')" + ], + "split": "test" + }, + { + "Input": "replace placeholders in string '{1} {ham} {0} {foo} {1}' with arguments `(10, 20, foo='bar', ham='spam')`", + "Output Program": [ + "\"\"\"{1} {ham} {0} {foo} {1}\"\"\".format(10, 20, foo='bar', ham='spam')" + ], + "Output Answer": [ + "\"\"\"{1} {ham} {0} {foo} {1}\"\"\".format(10, 20, foo='bar', ham='spam')" + ], + "split": "train" + }, + { + "Input": "Reverse string 'foo'", + "Output Program": [ + "''.join(reversed('foo'))" + ], + "Output Answer": [ + "''.join(reversed('foo'))" + ], + "split": "train" + }, + { + "Input": "strip everything up to and including the character `&` from url `url`, strip the character `=` from the remaining string and concatenate `.html` to the end", + "Output Program": [ + "url.split('&')[-1].replace('=', '') + '.html'" + ], + "Output Answer": [ + "url.split('&')[-1].replace('=', '') + '.html'" + ], + "split": "train" + }, + { + "Input": "Add header `('Cookie', 'cookiename=cookie value')` to mechanize browser `br`", + "Output Program": [ + "br.addheaders = [('Cookie', 'cookiename=cookie value')]" + ], + "Output Answer": [ + "br.addheaders = [('Cookie', 'cookiename=cookie value')]" + ], + "split": "train" + }, + { + "Input": "Initialize `SECRET_KEY` in flask config with `Your_secret_string `", + "Output Program": [ + "app.config['SECRET_KEY'] = 'Your_secret_string'" + ], + "Output Answer": [ + "app.config['SECRET_KEY'] = 'Your_secret_string'" + ], + "split": "test" + }, + { + "Input": "get the path of the python module `amodule`", + "Output Program": [ + "path = os.path.abspath(amodule.__file__)" + ], + "Output Answer": [ + "path = os.path.abspath(amodule.__file__)" + ], + "split": "train" + }, + { + "Input": "wait for shell command `p` evoked by subprocess.Popen to complete", + "Output Program": [ + "p.wait()" + ], + "Output Answer": [ + "p.wait()" + ], + "split": "train" + }, + { + "Input": "Convert a datetime object `my_datetime` into readable format `%B %d, %Y`", + "Output Program": [ + "my_datetime.strftime('%B %d, %Y')" + ], + "Output Answer": [ + "my_datetime.strftime('%B %d, %Y')" + ], + "split": "train" + }, + { + "Input": "copy the content of file 'file.txt' to file 'file2.txt'", + "Output Program": [ + "shutil.copy('file.txt', 'file2.txt')" + ], + "Output Answer": [ + "shutil.copy('file.txt', 'file2.txt')" + ], + "split": "train" + }, + { + "Input": "run command 'command -flags arguments &' on command line tools as separate processes", + "Output Program": [ + "subprocess.call('command -flags arguments &', shell=True)" + ], + "Output Answer": [ + "subprocess.call('command -flags arguments &', shell=True)" + ], + "split": "train" + }, + { + "Input": "keep a list `dataList` of lists sorted as it is created by second element", + "Output Program": [ + "dataList.sort(key=lambda x: x[1])" + ], + "Output Answer": [ + "dataList.sort(key=lambda x: x[1])" + ], + "split": "train" + }, + { + "Input": "zip lists in a list [[1, 2], [3, 4], [5, 6]]", + "Output Program": [ + "zip(*[[1, 2], [3, 4], [5, 6]])" + ], + "Output Answer": [ + "zip(*[[1, 2], [3, 4], [5, 6]])" + ], + "split": "train" + }, + { + "Input": "append string 'str' at the beginning of each value in column 'col' of dataframe `df`", + "Output Program": [ + "df['col'] = 'str' + df['col'].astype(str)" + ], + "Output Answer": [ + "df['col'] = 'str' + df['col'].astype(str)" + ], + "split": "train" + }, + { + "Input": "Unpack each value in list `x` to its placeholder '%' in string '%.2f'", + "Output Program": [ + "\"\"\", \"\"\".join(['%.2f'] * len(x))" + ], + "Output Answer": [ + "\"\"\", \"\"\".join(['%.2f'] * len(x))" + ], + "split": "train" + }, + { + "Input": "get a list of all subdirectories in the directory `directory`", + "Output Program": [ + "[x[0] for x in os.walk(directory)]" + ], + "Output Answer": [ + "[x[0] for x in os.walk(directory)]" + ], + "split": "train" + }, + { + "Input": "convert a pandas `df1` groupby object to dataframe", + "Output Program": [ + "DataFrame({'count': df1.groupby(['Name', 'City']).size()}).reset_index()" + ], + "Output Answer": [ + "DataFrame({'count': df1.groupby(['Name', 'City']).size()}).reset_index()" + ], + "split": "train" + }, + { + "Input": "get top `3` items from a dictionary `mydict` with largest sum of values", + "Output Program": [ + "heapq.nlargest(3, mydict.iteritems(), key=lambda tup: sum(tup[1]))" + ], + "Output Answer": [ + "heapq.nlargest(3, mydict.iteritems(), key=lambda tup: sum(tup[1]))" + ], + "split": "train" + }, + { + "Input": "filter dataframe `df` by values in column `A` that appear more than once", + "Output Program": [ + "df.groupby('A').filter(lambda x: len(x) > 1)" + ], + "Output Answer": [ + "df.groupby('A').filter(lambda x: len(x) > 1)" + ], + "split": "test" + }, + { + "Input": "Get a environment variable `DEBUSSY`", + "Output Program": [ + "print os.environ['DEBUSSY']" + ], + "Output Answer": [ + "print os.environ['DEBUSSY']" + ], + "split": "train" + }, + { + "Input": "convert ndarray with shape 3x3 to array", + "Output Program": [ + "np.zeros((3, 3)).ravel()" + ], + "Output Answer": [ + "np.zeros((3, 3)).ravel()" + ], + "split": "train" + }, + { + "Input": "sort a list of objects `ut` in reverse order by their `count` property", + "Output Program": [ + "ut.sort(key=lambda x: x.count, reverse=True)" + ], + "Output Answer": [ + "ut.sort(key=lambda x: x.count, reverse=True)" + ], + "split": "test" + }, + { + "Input": "call multiple bash function \u2018vasp\u2019 and \u2018tee tee_output\u2019 using \u2018|\u2019", + "Output Program": [ + "subprocess.check_call('vasp | tee tee_output', shell=True)" + ], + "Output Answer": [ + "subprocess.check_call('vasp | tee tee_output', shell=True)" + ], + "split": "test" + }, + { + "Input": "add a header to a csv file", + "Output Program": [ + "writer.writeheader()" + ], + "Output Answer": [ + "writer.writeheader()" + ], + "split": "test" + }, + { + "Input": "create a dataframe `d` filled with zeros with indices from 0 to length of `data` and column names from `feature_list`", + "Output Program": [ + "d = pd.DataFrame(0, index=np.arange(len(data)), columns=feature_list)" + ], + "Output Answer": [ + "d = pd.DataFrame(0, index=np.arange(len(data)), columns=feature_list)" + ], + "split": "train" + }, + { + "Input": "get a sum of 4d array `M`", + "Output Program": [ + "M.sum(axis=0).sum(axis=0)" + ], + "Output Answer": [ + "M.sum(axis=0).sum(axis=0)" + ], + "split": "train" + }, + { + "Input": "remove escape character from string \"\\\\a\"", + "Output Program": [ + "\"\"\"\\\\a\"\"\".decode('string_escape')" + ], + "Output Answer": [ + "\"\"\"\\\\a\"\"\".decode('string_escape')" + ], + "split": "test" + }, + { + "Input": "Delete an item with key \"key\" from `mydict`", + "Output Program": [ + "mydict.pop('key', None)" + ], + "Output Answer": [ + "mydict.pop('key', None)" + ], + "split": "train" + }, + { + "Input": "get key-value pairs in dictionary `my_dictionary` for all keys in list `my_list` in the order they appear in `my_list`", + "Output Program": [ + "dict(zip(my_list, map(my_dictionary.get, my_list)))" + ], + "Output Answer": [ + "dict(zip(my_list, map(my_dictionary.get, my_list)))" + ], + "split": "train" + }, + { + "Input": "split a string `s` by ';' and convert to a dictionary", + "Output Program": [ + "dict(item.split('=') for item in s.split(';'))" + ], + "Output Answer": [ + "dict(item.split('=') for item in s.split(';'))" + ], + "split": "train" + }, + { + "Input": "upload uploaded file from path '/upload' to Google cloud storage 'my_bucket' bucket", + "Output Program": [ + "upload_url = blobstore.create_upload_url('/upload', gs_bucket_name='my_bucket')" + ], + "Output Answer": [ + "upload_url = blobstore.create_upload_url('/upload', gs_bucket_name='my_bucket')" + ], + "split": "train" + }, + { + "Input": "concatenate lists `listone` and `listtwo`", + "Output Program": [ + "(listone + listtwo)" + ], + "Output Answer": [ + "(listone + listtwo)" + ], + "split": "train" + }, + { + "Input": "write a regex pattern to match even number of letter `A`", + "Output Program": [ + "re.compile('^([^A]*)AA([^A]|AA)*$')" + ], + "Output Answer": [ + "re.compile('^([^A]*)AA([^A]|AA)*$')" + ], + "split": "train" + }, + { + "Input": "get html source of Selenium WebElement `element`", + "Output Program": [ + "element.get_attribute('innerHTML')" + ], + "Output Answer": [ + "element.get_attribute('innerHTML')" + ], + "split": "test" + }, + { + "Input": "extract date from a string 'monkey 2010-07-32 love banana'", + "Output Program": [ + "dparser.parse('monkey 2010-07-32 love banana', fuzzy=True)" + ], + "Output Answer": [ + "dparser.parse('monkey 2010-07-32 love banana', fuzzy=True)" + ], + "split": "train" + }, + { + "Input": "Delete an item with key `key` from `mydict`", + "Output Program": [ + "try:\n del mydict[key]\nexcept KeyError:\n pass\ntry:\n del mydict[key]\nexcept KeyError:\n pass", + "del mydict[key]" + ], + "Output Answer": [ + "try:\n del mydict[key]\nexcept KeyError:\n pass\ntry:\n del mydict[key]\nexcept KeyError:\n pass", + "del mydict[key]" + ], + "split": "train" + }, + { + "Input": "set size of `figure` to landscape A4 i.e. `11.69, 8.27` inches", + "Output Program": [ + "figure(figsize=(11.69, 8.27))" + ], + "Output Answer": [ + "figure(figsize=(11.69, 8.27))" + ], + "split": "train" + }, + { + "Input": "sort a list of tuples 'unsorted' based on two elements, second and third", + "Output Program": [ + "sorted(unsorted, key=lambda element: (element[1], element[2]))" + ], + "Output Answer": [ + "sorted(unsorted, key=lambda element: (element[1], element[2]))" + ], + "split": "train" + }, + { + "Input": "define global variable `something` with value `bob`", + "Output Program": [ + "globals()['something'] = 'bob'" + ], + "Output Answer": [ + "globals()['something'] = 'bob'" + ], + "split": "train" + }, + { + "Input": "split list `mylist` into a list of lists whose elements have the same first five characters", + "Output Program": [ + "[list(v) for k, v in itertools.groupby(mylist, key=lambda x: x[:5])]" + ], + "Output Answer": [ + "[list(v) for k, v in itertools.groupby(mylist, key=lambda x: x[:5])]" + ], + "split": "train" + }, + { + "Input": "split list `l` into `n` sized lists", + "Output Program": [ + "[l[i:i + n] for i in xrange(0, len(l), n)]" + ], + "Output Answer": [ + "[l[i:i + n] for i in xrange(0, len(l), n)]" + ], + "split": "train" + }, + { + "Input": "Make a auto scrolled window to the end of the list in gtk", + "Output Program": [ + "self.treeview.connect('size-allocate', self.treeview_changed)" + ], + "Output Answer": [ + "self.treeview.connect('size-allocate', self.treeview_changed)" + ], + "split": "train" + }, + { + "Input": "remove dollar sign '$' from second to last column data in dataframe 'df' and convert the data into floats", + "Output Program": [ + "df[df.columns[1:]].replace('[\\\\$,]', '', regex=True).astype(float)" + ], + "Output Answer": [ + "df[df.columns[1:]].replace('[\\\\$,]', '', regex=True).astype(float)" + ], + "split": "train" + }, + { + "Input": "sorting a list of tuples `lst` by the sum of the second elements onwards, and third element of the tuple", + "Output Program": [ + "sorted(lst, key=lambda x: (sum(x[1:]), x[0]))" + ], + "Output Answer": [ + "sorted(lst, key=lambda x: (sum(x[1:]), x[0]))" + ], + "split": "train" + }, + { + "Input": "convert hex string \"FFFF\" to decimal", + "Output Program": [ + "int('FFFF', 16)" + ], + "Output Answer": [ + "int('FFFF', 16)" + ], + "split": "train" + }, + { + "Input": "get the filename without the extension from file 'hemanth.txt'", + "Output Program": [ + "print os.path.splitext(os.path.basename('hemanth.txt'))[0]" + ], + "Output Answer": [ + "print os.path.splitext(os.path.basename('hemanth.txt'))[0]" + ], + "split": "test" + }, + { + "Input": "convert string `s` to lowercase", + "Output Program": [ + "s.lower()" + ], + "Output Answer": [ + "s.lower()" + ], + "split": "train" + }, + { + "Input": "format number 1000000000.0 using latex notation", + "Output Program": [ + "print '\\\\num{{{0:.2g}}}'.format(1000000000.0)" + ], + "Output Answer": [ + "print '\\\\num{{{0:.2g}}}'.format(1000000000.0)" + ], + "split": "train" + }, + { + "Input": "decode utf-8 code `x` into a raw unicode literal", + "Output Program": [ + "print str(x).decode('raw_unicode_escape')" + ], + "Output Answer": [ + "print str(x).decode('raw_unicode_escape')" + ], + "split": "train" + }, + { + "Input": "Get a list of integers by splitting a string `user` with comma", + "Output Program": [ + "[int(s) for s in user.split(',')]" + ], + "Output Answer": [ + "[int(s) for s in user.split(',')]" + ], + "split": "test" + }, + { + "Input": "read a binary file 'test/test.pdf'", + "Output Program": [ + "f = open('test/test.pdf', 'rb')" + ], + "Output Answer": [ + "f = open('test/test.pdf', 'rb')" + ], + "split": "train" + }, + { + "Input": "Open a background process 'background-process' with arguments 'arguments'", + "Output Program": [ + "subprocess.Popen(['background-process', 'arguments'])" + ], + "Output Answer": [ + "subprocess.Popen(['background-process', 'arguments'])" + ], + "split": "test" + }, + { + "Input": "Reverse the order of words, delimited by `.`, in string `s`", + "Output Program": [ + "\"\"\".\"\"\".join(s.split('.')[::-1])" + ], + "Output Answer": [ + "\"\"\".\"\"\".join(s.split('.')[::-1])" + ], + "split": "test" + }, + { + "Input": "regular expression syntax for not to match anything", + "Output Program": [ + "re.compile('.\\\\A|.\\\\A*|.\\\\A+')" + ], + "Output Answer": [ + "re.compile('.\\\\A|.\\\\A*|.\\\\A+')" + ], + "split": "train" + }, + { + "Input": "get current RAM usage of current program", + "Output Program": [ + "pid = os.getpid()\npy = psutil.Process(pid)\nmemoryUse = (py.memory_info()[0] / (2.0 ** 30))" + ], + "Output Answer": [ + "pid = os.getpid()\npy = psutil.Process(pid)\nmemoryUse = (py.memory_info()[0] / (2.0 ** 30))" + ], + "split": "train" + }, + { + "Input": "convert hex '\\xff' to integer", + "Output Program": [ + "ord('\\xff')" + ], + "Output Answer": [ + "ord('\\xff')" + ], + "split": "train" + }, + { + "Input": "Print a string `word` with string format", + "Output Program": [ + "print '\"{}\"'.format(word)" + ], + "Output Answer": [ + "print '\"{}\"'.format(word)" + ], + "split": "test" + }, + { + "Input": "normalize the dataframe `df` along the rows", + "Output Program": [ + "np.sqrt(np.square(df).sum(axis=1))" + ], + "Output Answer": [ + "np.sqrt(np.square(df).sum(axis=1))" + ], + "split": "train" + }, + { + "Input": "match regex '\\\\((.*?)\\\\)|(\\\\w)' with string '(zyx)bc'", + "Output Program": [ + "re.findall('\\\\((.*?)\\\\)|(\\\\w)', '(zyx)bc')" + ], + "Output Answer": [ + "re.findall('\\\\((.*?)\\\\)|(\\\\w)', '(zyx)bc')" + ], + "split": "test" + }, + { + "Input": "Get a list of integers `lst` from a file `filename.txt`", + "Output Program": [ + "lst = map(int, open('filename.txt').readlines())" + ], + "Output Answer": [ + "lst = map(int, open('filename.txt').readlines())" + ], + "split": "test" + }, + { + "Input": "find the index of sub string 's' in string `str` starting from index 11 and ending at index 14", + "Output Program": [ + "str.find('s', 11, 14)" + ], + "Output Answer": [ + "str.find('s', 11, 14)" + ], + "split": "train" + }, + { + "Input": "input an integer tuple from user", + "Output Program": [ + "tuple(map(int, raw_input().split(',')))" + ], + "Output Answer": [ + "tuple(map(int, raw_input().split(',')))" + ], + "split": "train" + }, + { + "Input": "convert python dictionary `your_data` to json array", + "Output Program": [ + "json.dumps(your_data, ensure_ascii=False)" + ], + "Output Answer": [ + "json.dumps(your_data, ensure_ascii=False)" + ], + "split": "train" + }, + { + "Input": "unpack the arguments out of list `params` to function `some_func`", + "Output Program": [ + "some_func(*params)" + ], + "Output Answer": [ + "some_func(*params)" + ], + "split": "train" + }, + { + "Input": "Extract first two substrings in string `phrase` that end in `.`, `?` or `!`", + "Output Program": [ + "re.match('(.*?[.?!](?:\\\\s+.*?[.?!]){0,1})', phrase).group(1)" + ], + "Output Answer": [ + "re.match('(.*?[.?!](?:\\\\s+.*?[.?!]){0,1})', phrase).group(1)" + ], + "split": "train" + }, + { + "Input": "sum the 3 largest integers in groupby by 'STNAME' and 'COUNTY_POP'", + "Output Program": [ + "df.groupby('STNAME')['COUNTY_POP'].agg(lambda x: x.nlargest(3).sum())" + ], + "Output Answer": [ + "df.groupby('STNAME')['COUNTY_POP'].agg(lambda x: x.nlargest(3).sum())" + ], + "split": "train" + }, + { + "Input": "declare an array with element 'i'", + "Output Program": [ + "intarray = array('i')" + ], + "Output Answer": [ + "intarray = array('i')" + ], + "split": "train" + }, + { + "Input": "convert currency string `dollars` to decimal `cents_int`", + "Output Program": [ + "cents_int = int(round(float(dollars.strip('$')) * 100))" + ], + "Output Answer": [ + "cents_int = int(round(float(dollars.strip('$')) * 100))" + ], + "split": "train" + }, + { + "Input": "Get a list of tuples with multiple iterators using list comprehension", + "Output Program": [ + "[(i, j) for i in range(1, 3) for j in range(1, 5)]" + ], + "Output Answer": [ + "[(i, j) for i in range(1, 3) for j in range(1, 5)]" + ], + "split": "train" + }, + { + "Input": "filter dataframe `df` by sub-level index '0630' in pandas", + "Output Program": [ + "df[df.index.map(lambda x: x[1].endswith('0630'))]" + ], + "Output Answer": [ + "df[df.index.map(lambda x: x[1].endswith('0630'))]" + ], + "split": "train" + }, + { + "Input": "open a text file `data.txt` in io module with encoding `utf-16-le`", + "Output Program": [ + "file = io.open('data.txt', 'r', encoding='utf-16-le')" + ], + "Output Answer": [ + "file = io.open('data.txt', 'r', encoding='utf-16-le')" + ], + "split": "train" + }, + { + "Input": "get value of environment variable \"HOME\"", + "Output Program": [ + "os.environ['HOME']" + ], + "Output Answer": [ + "os.environ['HOME']" + ], + "split": "train" + }, + { + "Input": "get count of rows in each series grouped by column 'col5' and column 'col2' of dataframe `df`", + "Output Program": [ + "df.groupby(['col5', 'col2']).size().groupby(level=1).max()" + ], + "Output Answer": [ + "df.groupby(['col5', 'col2']).size().groupby(level=1).max()" + ], + "split": "train" + }, + { + "Input": "convert generator object to a dictionary", + "Output Program": [ + "{i: (i * 2) for i in range(10)}", + "dict((i, i * 2) for i in range(10))" + ], + "Output Answer": [ + "{i: (i * 2) for i in range(10)}", + "dict((i, i * 2) for i in range(10))" + ], + "split": "train" + }, + { + "Input": "pandas read comma-separated CSV file `s` and skip commented lines starting with '#'", + "Output Program": [ + "pd.read_csv(StringIO(s), sep=',', comment='#')" + ], + "Output Answer": [ + "pd.read_csv(StringIO(s), sep=',', comment='#')" + ], + "split": "train" + }, + { + "Input": "sorting the lists in list of lists `data`", + "Output Program": [ + "[sorted(item) for item in data]" + ], + "Output Answer": [ + "[sorted(item) for item in data]" + ], + "split": "train" + }, + { + "Input": "create an empty data frame `df2` with index from another data frame `df1`", + "Output Program": [ + "df2 = pd.DataFrame(index=df1.index)" + ], + "Output Answer": [ + "df2 = pd.DataFrame(index=df1.index)" + ], + "split": "train" + }, + { + "Input": "Getting the length of `my_tuple`", + "Output Program": [ + "len(my_tuple)" + ], + "Output Answer": [ + "len(my_tuple)" + ], + "split": "test" + }, + { + "Input": "round number 4.0005 up to 3 decimal places", + "Output Program": [ + "round(4.0005, 3)" + ], + "Output Answer": [ + "round(4.0005, 3)" + ], + "split": "train" + }, + { + "Input": "post request url `url` with parameters `payload`", + "Output Program": [ + "r = requests.post(url, data=payload)" + ], + "Output Answer": [ + "r = requests.post(url, data=payload)" + ], + "split": "train" + }, + { + "Input": "delete every 8th column in a numpy array 'a'.", + "Output Program": [ + "np.delete(a, list(range(0, a.shape[1], 8)), axis=1)" + ], + "Output Answer": [ + "np.delete(a, list(range(0, a.shape[1], 8)), axis=1)" + ], + "split": "train" + }, + { + "Input": "Reverse list `s`", + "Output Program": [ + "s[::(-1)]" + ], + "Output Answer": [ + "s[::(-1)]" + ], + "split": "train" + }, + { + "Input": "generate random upper-case ascii string of 12 characters length", + "Output Program": [ + "print ''.join(choice(ascii_uppercase) for i in range(12))" + ], + "Output Answer": [ + "print ''.join(choice(ascii_uppercase) for i in range(12))" + ], + "split": "train" + }, + { + "Input": "find out the number of non-matched elements at the same index of list `a` and list `b`", + "Output Program": [ + "sum(1 for i, j in zip(a, b) if i != j)" + ], + "Output Answer": [ + "sum(1 for i, j in zip(a, b) if i != j)" + ], + "split": "train" + }, + { + "Input": "Get the average values from two numpy arrays `old_set` and `new_set`", + "Output Program": [ + "np.mean(np.array([old_set, new_set]), axis=0)" + ], + "Output Answer": [ + "np.mean(np.array([old_set, new_set]), axis=0)" + ], + "split": "train" + }, + { + "Input": "find the magnitude (length) squared of a vector `vf` field", + "Output Program": [ + "np.einsum('...j,...j->...', vf, vf)" + ], + "Output Answer": [ + "np.einsum('...j,...j->...', vf, vf)" + ], + "split": "train" + }, + { + "Input": "create a json response `response_data`", + "Output Program": [ + "return HttpResponse(json.dumps(response_data), content_type='application/json')" + ], + "Output Answer": [ + "return HttpResponse(json.dumps(response_data), content_type='application/json')" + ], + "split": "train" + }, + { + "Input": "Trimming a string \" Hello \"", + "Output Program": [ + "' Hello '.strip()" + ], + "Output Answer": [ + "' Hello '.strip()" + ], + "split": "train" + }, + { + "Input": "create dict of squared int values in range of 100", + "Output Program": [ + "{(x ** 2) for x in xrange(100)}" + ], + "Output Answer": [ + "{(x ** 2) for x in xrange(100)}" + ], + "split": "train" + }, + { + "Input": "create new column `A_perc` in dataframe `df` with row values equal to the value in column `A` divided by the value in column `sum`", + "Output Program": [ + "df['A_perc'] = df['A'] / df['sum']" + ], + "Output Answer": [ + "df['A_perc'] = df['A'] / df['sum']" + ], + "split": "train" + }, + { + "Input": "check if string `some_string` is empty", + "Output Program": [ + "if (not some_string):\n pass" + ], + "Output Answer": [ + "if (not some_string):\n pass" + ], + "split": "train" + }, + { + "Input": "BeautifulSoup find a tag whose id ends with string 'para'", + "Output Program": [ + "soup.findAll(id=re.compile('para$'))" + ], + "Output Answer": [ + "soup.findAll(id=re.compile('para$'))" + ], + "split": "train" + }, + { + "Input": "find consecutive consonants in a word `CONCENTRATION` using regex", + "Output Program": [ + "re.findall('[bcdfghjklmnpqrstvwxyz]+', 'CONCERTATION', re.IGNORECASE)" + ], + "Output Answer": [ + "re.findall('[bcdfghjklmnpqrstvwxyz]+', 'CONCERTATION', re.IGNORECASE)" + ], + "split": "train" + }, + { + "Input": "convert decimal `8` to binary list", + "Output Program": [ + "[int(x) for x in bin(8)[2:]]" + ], + "Output Answer": [ + "[int(x) for x in bin(8)[2:]]" + ], + "split": "train" + }, + { + "Input": "make matplotlib plot legend put marker in legend only once", + "Output Program": [ + "legend(numpoints=1)" + ], + "Output Answer": [ + "legend(numpoints=1)" + ], + "split": "train" + }, + { + "Input": "increment a value with leading zeroes in a number `x`", + "Output Program": [ + "str(int(x) + 1).zfill(len(x))" + ], + "Output Answer": [ + "str(int(x) + 1).zfill(len(x))" + ], + "split": "test" + }, + { + "Input": "sum the product of each two items at the same index of list `a` and list `b`", + "Output Program": [ + "sum(i * j for i, j in zip(a, b))" + ], + "Output Answer": [ + "sum(i * j for i, j in zip(a, b))" + ], + "split": "train" + }, + { + "Input": "convert hex string '470FC614' to a float number", + "Output Program": [ + "struct.unpack('!f', '470FC614'.decode('hex'))[0]" + ], + "Output Answer": [ + "struct.unpack('!f', '470FC614'.decode('hex'))[0]" + ], + "split": "test" + }, + { + "Input": "get the common prefix from comparing two absolute paths '/usr/var' and '/usr/var2/log'", + "Output Program": [ + "os.path.commonprefix(['/usr/var', '/usr/var2/log'])" + ], + "Output Answer": [ + "os.path.commonprefix(['/usr/var', '/usr/var2/log'])" + ], + "split": "train" + }, + { + "Input": "In `soup`, get the content of the sibling of the `td` tag with text content `Address:`", + "Output Program": [ + "print soup.find(text='Address:').findNext('td').contents[0]" + ], + "Output Answer": [ + "print soup.find(text='Address:').findNext('td').contents[0]" + ], + "split": "test" + }, + { + "Input": "get a list of items form nested list `li` where third element of each item contains string 'ar'", + "Output Program": [ + "[x for x in li if 'ar' in x[2]]" + ], + "Output Answer": [ + "[x for x in li if 'ar' in x[2]]" + ], + "split": "train" + }, + { + "Input": "Check if all elements in list `lst` are tupples of long and int", + "Output Program": [ + "all(isinstance(x, (int, long)) for x in lst)" + ], + "Output Answer": [ + "all(isinstance(x, (int, long)) for x in lst)" + ], + "split": "train" + }, + { + "Input": "Print a emoji from a string `\\\\ud83d\\\\ude4f` having surrogate pairs", + "Output Program": [ + "\"\"\"\\\\ud83d\\\\ude4f\"\"\".encode('utf-16', 'surrogatepass').decode('utf-16')" + ], + "Output Answer": [ + "\"\"\"\\\\ud83d\\\\ude4f\"\"\".encode('utf-16', 'surrogatepass').decode('utf-16')" + ], + "split": "train" + }, + { + "Input": "get current script directory", + "Output Program": [ + "os.path.dirname(os.path.abspath(__file__))" + ], + "Output Answer": [ + "os.path.dirname(os.path.abspath(__file__))" + ], + "split": "train" + }, + { + "Input": "getting the string between 2 '$' characters in '$sin (x)$ is an function of x'", + "Output Program": [ + "re.findall('\\\\$(.*?)\\\\$', '$sin (x)$ is an function of x')" + ], + "Output Answer": [ + "re.findall('\\\\$(.*?)\\\\$', '$sin (x)$ is an function of x')" + ], + "split": "train" + }, + { + "Input": "convert python 2 dictionary `a` to a list of tuples where the value is the first tuple element and the key is the second tuple element", + "Output Program": [ + "[(v, k) for k, v in a.iteritems()]" + ], + "Output Answer": [ + "[(v, k) for k, v in a.iteritems()]" + ], + "split": "train" + }, + { + "Input": "Enclose numbers in quotes in a string `This is number 1 and this is number 22`", + "Output Program": [ + "re.sub('(\\\\d+)', '\"\\\\1\"', 'This is number 1 and this is number 22')" + ], + "Output Answer": [ + "re.sub('(\\\\d+)', '\"\\\\1\"', 'This is number 1 and this is number 22')" + ], + "split": "train" + }, + { + "Input": "Use multiple groupby and agg operations `sum`, `count`, `std` for pandas data frame `df`", + "Output Program": [ + "df.groupby(level=0).agg(['sum', 'count', 'std'])" + ], + "Output Answer": [ + "df.groupby(level=0).agg(['sum', 'count', 'std'])" + ], + "split": "train" + }, + { + "Input": "convert a list of tuples `queryresult` to a string from the first indexes.", + "Output Program": [ + "emaillist = '\\n'.join([item[0] for item in queryresult])" + ], + "Output Answer": [ + "emaillist = '\\n'.join([item[0] for item in queryresult])" + ], + "split": "train" + }, + { + "Input": "format a string `num` using string formatting", + "Output Program": [ + "\"\"\"{0:.3g}\"\"\".format(num)" + ], + "Output Answer": [ + "\"\"\"{0:.3g}\"\"\".format(num)" + ], + "split": "train" + }, + { + "Input": "convert a date string '2013-1-25' in format '%Y-%m-%d' to different format '%-m/%d/%y'", + "Output Program": [ + "datetime.datetime.strptime('2013-1-25', '%Y-%m-%d').strftime('%-m/%d/%y')" + ], + "Output Answer": [ + "datetime.datetime.strptime('2013-1-25', '%Y-%m-%d').strftime('%-m/%d/%y')" + ], + "split": "train" + }, + { + "Input": "strip html from strings", + "Output Program": [ + "re.sub('<[^<]+?>', '', text)" + ], + "Output Answer": [ + "re.sub('<[^<]+?>', '', text)" + ], + "split": "train" + }, + { + "Input": "reverse the keys and values in a dictionary `myDictionary`", + "Output Program": [ + "{i[1]: i[0] for i in myDictionary.items()}" + ], + "Output Answer": [ + "{i[1]: i[0] for i in myDictionary.items()}" + ], + "split": "test" + }, + { + "Input": "sum columns of a list `array`", + "Output Program": [ + "[sum(row[i] for row in array) for i in range(len(array[0]))]" + ], + "Output Answer": [ + "[sum(row[i] for row in array) for i in range(len(array[0]))]" + ], + "split": "test" + }, + { + "Input": "return http status code 204 from a django view", + "Output Program": [ + "return HttpResponse(status=204)" + ], + "Output Answer": [ + "return HttpResponse(status=204)" + ], + "split": "train" + }, + { + "Input": "get the path of module `a_module`", + "Output Program": [ + "print a_module.__file__" + ], + "Output Answer": [ + "print a_module.__file__" + ], + "split": "train" + }, + { + "Input": "solve for the least squares' solution of matrices `a` and `b`", + "Output Program": [ + "np.linalg.solve(np.dot(a.T, a), np.dot(a.T, b))" + ], + "Output Answer": [ + "np.linalg.solve(np.dot(a.T, a), np.dot(a.T, b))" + ], + "split": "train" + }, + { + "Input": "remove all non -word, -whitespace, or -apostrophe characters from string `doesn't this mean it -technically- works?`", + "Output Program": [ + "re.sub(\"[^\\\\w' ]\", '', \"doesn't this mean it -technically- works?\")" + ], + "Output Answer": [ + "re.sub(\"[^\\\\w' ]\", '', \"doesn't this mean it -technically- works?\")" + ], + "split": "train" + }, + { + "Input": "sort a list of strings `list`", + "Output Program": [ + "list.sort()" + ], + "Output Answer": [ + "list.sort()" + ], + "split": "train" + }, + { + "Input": "plot a data logarithmically in y axis", + "Output Program": [ + "plt.yscale('log', nonposy='clip')" + ], + "Output Answer": [ + "plt.yscale('log', nonposy='clip')" + ], + "split": "train" + }, + { + "Input": "sort a list `your_list` of class objects by their values for the attribute `anniversary_score`", + "Output Program": [ + "your_list.sort(key=operator.attrgetter('anniversary_score'))" + ], + "Output Answer": [ + "your_list.sort(key=operator.attrgetter('anniversary_score'))" + ], + "split": "train" + }, + { + "Input": "order a list of lists `[[1, 'mike'], [1, 'bob']]` by the first value of individual list", + "Output Program": [ + "sorted([[1, 'mike'], [1, 'bob']])" + ], + "Output Answer": [ + "sorted([[1, 'mike'], [1, 'bob']])" + ], + "split": "train" + }, + { + "Input": "test if either of strings `a` or `b` are members of the set of strings, `['b', 'a', 'foo', 'bar']`", + "Output Program": [ + "set(['a', 'b']).issubset(['b', 'a', 'foo', 'bar'])" + ], + "Output Answer": [ + "set(['a', 'b']).issubset(['b', 'a', 'foo', 'bar'])" + ], + "split": "train" + }, + { + "Input": "call a function `otherfunc` inside a bash script `test.sh` using subprocess", + "Output Program": [ + "subprocess.call('test.sh otherfunc')" + ], + "Output Answer": [ + "subprocess.call('test.sh otherfunc')" + ], + "split": "train" + }, + { + "Input": "Group a pandas data frame by monthly frequenct `M` using groupby", + "Output Program": [ + "df.groupby(pd.TimeGrouper(freq='M'))" + ], + "Output Answer": [ + "df.groupby(pd.TimeGrouper(freq='M'))" + ], + "split": "train" + }, + { + "Input": "truncate string `s` up to character ':'", + "Output Program": [ + "s.split(':', 1)[1]" + ], + "Output Answer": [ + "s.split(':', 1)[1]" + ], + "split": "train" + }, + { + "Input": "insert string `foo` at position `0` of list `list`", + "Output Program": [ + "list.insert(0, 'foo')" + ], + "Output Answer": [ + "list.insert(0, 'foo')" + ], + "split": "train" + }, + { + "Input": "Access environment variable \"HOME\"", + "Output Program": [ + "os.environ['HOME']" + ], + "Output Answer": [ + "os.environ['HOME']" + ], + "split": "train" + }, + { + "Input": "sort list `list_` based on first element of each tuple and by the length of the second element of each tuple", + "Output Program": [ + "list_.sort(key=lambda x: [x[0], len(x[1]), x[1]])" + ], + "Output Answer": [ + "list_.sort(key=lambda x: [x[0], len(x[1]), x[1]])" + ], + "split": "train" + }, + { + "Input": "regular expression \"^(.+)\\\\n((?:\\\\n.+)+)\" matching a multiline block of text", + "Output Program": [ + "re.compile('^(.+)\\\\n((?:\\\\n.+)+)', re.MULTILINE)" + ], + "Output Answer": [ + "re.compile('^(.+)\\\\n((?:\\\\n.+)+)', re.MULTILINE)" + ], + "split": "train" + }, + { + "Input": "count number of occurrences of a substring 'ab' in a string \"abcdabcva\"", + "Output Program": [ + "\"\"\"abcdabcva\"\"\".count('ab')" + ], + "Output Answer": [ + "\"\"\"abcdabcva\"\"\".count('ab')" + ], + "split": "train" + }, + { + "Input": "remove all square brackets from string 'abcd[e]yth[ac]ytwec'", + "Output Program": [ + "re.sub('\\\\[.*?\\\\]', '', 'abcd[e]yth[ac]ytwec')" + ], + "Output Answer": [ + "re.sub('\\\\[.*?\\\\]', '', 'abcd[e]yth[ac]ytwec')" + ], + "split": "train" + }, + { + "Input": "setup a smtp mail server to `smtp.gmail.com` with port `587`", + "Output Program": [ + "server = smtplib.SMTP('smtp.gmail.com', 587)" + ], + "Output Answer": [ + "server = smtplib.SMTP('smtp.gmail.com', 587)" + ], + "split": "train" + }, + { + "Input": "get the sum of the products of each pair of corresponding elements in lists `a` and `b`", + "Output Program": [ + "sum(x * y for x, y in zip(a, b))" + ], + "Output Answer": [ + "sum(x * y for x, y in zip(a, b))" + ], + "split": "train" + }, + { + "Input": "loop over files in directory '.'", + "Output Program": [ + "for fn in os.listdir('.'):\n if os.path.isfile(fn):\n pass" + ], + "Output Answer": [ + "for fn in os.listdir('.'):\n if os.path.isfile(fn):\n pass" + ], + "split": "test" + }, + { + "Input": "check whether a file \"/etc/password.txt\" exists", + "Output Program": [ + "print os.path.isfile('/etc/password.txt')" + ], + "Output Answer": [ + "print os.path.isfile('/etc/password.txt')" + ], + "split": "train" + }, + { + "Input": "Check if key 'c' in `d`", + "Output Program": [ + "('c' in d)" + ], + "Output Answer": [ + "('c' in d)" + ], + "split": "train" + }, + { + "Input": "check whether file `file_path` exists", + "Output Program": [ + "os.path.exists(file_path)" + ], + "Output Answer": [ + "os.path.exists(file_path)" + ], + "split": "train" + }, + { + "Input": "Strip all non-ASCII characters from a unicode string, `\\xa3\\u20ac\\xa3\\u20ac`", + "Output Program": [ + "print set(re.sub('[\\x00-\\x7f]', '', u'\\xa3\\u20ac\\xa3\\u20ac'))" + ], + "Output Answer": [ + "print set(re.sub('[\\x00-\\x7f]', '', u'\\xa3\\u20ac\\xa3\\u20ac'))" + ], + "split": "train" + }, + { + "Input": "sort a list `s` by first and second attributes", + "Output Program": [ + "s = sorted(s, key=lambda x: (x[1], x[2]))" + ], + "Output Answer": [ + "s = sorted(s, key=lambda x: (x[1], x[2]))" + ], + "split": "train" + }, + { + "Input": "navigate to webpage given by url `http://www.python.org` using Selenium", + "Output Program": [ + "driver.get('http://www.google.com.br')" + ], + "Output Answer": [ + "driver.get('http://www.google.com.br')" + ], + "split": "train" + }, + { + "Input": "store data frame `df` to file `file_name` using pandas, python", + "Output Program": [ + "df.to_pickle(file_name)" + ], + "Output Answer": [ + "df.to_pickle(file_name)" + ], + "split": "train" + }, + { + "Input": "Return rows of data associated with the maximum value of column 'Value' in dataframe `df`", + "Output Program": [ + "df.loc[df['Value'].idxmax()]" + ], + "Output Answer": [ + "df.loc[df['Value'].idxmax()]" + ], + "split": "train" + }, + { + "Input": "get the output of a subprocess command `echo \"foo\"` in command line", + "Output Program": [ + "subprocess.check_output('echo \"foo\"', shell=True)" + ], + "Output Answer": [ + "subprocess.check_output('echo \"foo\"', shell=True)" + ], + "split": "train" + }, + { + "Input": "store integer 3, 4, 1 and 2 in a list", + "Output Program": [ + "[3, 4, 1, 2]" + ], + "Output Answer": [ + "[3, 4, 1, 2]" + ], + "split": "train" + }, + { + "Input": "generate a list of all unique pairs of integers in `range(9)`", + "Output Program": [ + "list(permutations(range(9), 2))" + ], + "Output Answer": [ + "list(permutations(range(9), 2))" + ], + "split": "train" + }, + { + "Input": "Reverse list `x`", + "Output Program": [ + "x[::-1]" + ], + "Output Answer": [ + "x[::-1]" + ], + "split": "train" + }, + { + "Input": "remove null columns in a dataframe `df`", + "Output Program": [ + "df = df.dropna(axis=1, how='all')" + ], + "Output Answer": [ + "df = df.dropna(axis=1, how='all')" + ], + "split": "train" + }, + { + "Input": "Create list of dictionaries from pandas dataframe `df`", + "Output Program": [ + "df.to_dict('records')" + ], + "Output Answer": [ + "df.to_dict('records')" + ], + "split": "train" + }, + { + "Input": "convert dict `result` to numpy structured array", + "Output Program": [ + "numpy.array([(key, val) for key, val in result.iteritems()], dtype)" + ], + "Output Answer": [ + "numpy.array([(key, val) for key, val in result.iteritems()], dtype)" + ], + "split": "train" + }, + { + "Input": "Get `3` unique items from a list", + "Output Program": [ + "random.sample(range(1, 16), 3)" + ], + "Output Answer": [ + "random.sample(range(1, 16), 3)" + ], + "split": "train" + }, + { + "Input": "open the file 'words.txt' in 'rU' mode", + "Output Program": [ + "f = open('words.txt', 'rU')" + ], + "Output Answer": [ + "f = open('words.txt', 'rU')" + ], + "split": "train" + }, + { + "Input": "Select rows whose value of the \"B\" column is \"one\" or \"three\" in the DataFrame `df`", + "Output Program": [ + "print df.loc[df['B'].isin(['one', 'three'])]" + ], + "Output Answer": [ + "print df.loc[df['B'].isin(['one', 'three'])]" + ], + "split": "train" + }, + { + "Input": "use operations like max/min within a row to a dataframe 'd' in pandas", + "Output Program": [ + "d.apply(lambda row: min([row['A'], row['B']]) - row['C'], axis=1)" + ], + "Output Answer": [ + "d.apply(lambda row: min([row['A'], row['B']]) - row['C'], axis=1)" + ], + "split": "train" + }, + { + "Input": "combine values from column 'b' and column 'a' of dataframe `df` into column 'c' of datafram `df`", + "Output Program": [ + "df['c'] = np.where(df['a'].isnull, df['b'], df['a'])" + ], + "Output Answer": [ + "df['c'] = np.where(df['a'].isnull, df['b'], df['a'])" + ], + "split": "test" + }, + { + "Input": "create a list of integers with duplicate values `[0, 0, 1, 1, 2, 2, 3, 3, 4, 4]`", + "Output Program": [ + "[0, 0, 1, 1, 2, 2, 3, 3, 4, 4]" + ], + "Output Answer": [ + "[0, 0, 1, 1, 2, 2, 3, 3, 4, 4]" + ], + "split": "train" + }, + { + "Input": "convert string '2011221' into a DateTime object using format '%Y%W%w'", + "Output Program": [ + "datetime.strptime('2011221', '%Y%W%w')" + ], + "Output Answer": [ + "datetime.strptime('2011221', '%Y%W%w')" + ], + "split": "train" + }, + { + "Input": "Remove string \"1\" from string `string`", + "Output Program": [ + "string.replace('1', '')" + ], + "Output Answer": [ + "string.replace('1', '')" + ], + "split": "train" + }, + { + "Input": "find the index of sub string 'World' in `x`", + "Output Program": [ + "x.find('World')" + ], + "Output Answer": [ + "x.find('World')" + ], + "split": "train" + }, + { + "Input": "create a list `listofzeros` of `n` zeros", + "Output Program": [ + "listofzeros = [0] * n" + ], + "Output Answer": [ + "listofzeros = [0] * n" + ], + "split": "train" + }, + { + "Input": "pandas: delete rows in dataframe `df` based on multiple columns values", + "Output Program": [ + "df.set_index(list('BC')).drop(tuples, errors='ignore').reset_index()" + ], + "Output Answer": [ + "df.set_index(list('BC')).drop(tuples, errors='ignore').reset_index()" + ], + "split": "test" + }, + { + "Input": "Create list `instancelist` containing 29 objects of type MyClass", + "Output Program": [ + "instancelist = [MyClass() for i in range(29)]" + ], + "Output Answer": [ + "instancelist = [MyClass() for i in range(29)]" + ], + "split": "train" + }, + { + "Input": "reset index of dataframe `df`so that existing index values are transferred into `df`as columns", + "Output Program": [ + "df.reset_index(inplace=True)" + ], + "Output Answer": [ + "df.reset_index(inplace=True)" + ], + "split": "train" + }, + { + "Input": "get first non-null value per each row from dataframe `df`", + "Output Program": [ + "df.stack().groupby(level=0).first()" + ], + "Output Answer": [ + "df.stack().groupby(level=0).first()" + ], + "split": "train" + }, + { + "Input": "create a list where each element is a value of the key 'Name' for each dictionary `d` in the list `thisismylist`", + "Output Program": [ + "[d['Name'] for d in thisismylist]" + ], + "Output Answer": [ + "[d['Name'] for d in thisismylist]" + ], + "split": "train" + }, + { + "Input": "call a Python script \"test1.py\"", + "Output Program": [ + "subprocess.call('test1.py', shell=True)" + ], + "Output Answer": [ + "subprocess.call('test1.py', shell=True)" + ], + "split": "train" + }, + { + "Input": "finding the index of elements containing substring 'how' and 'what' in a list of strings 'myList'.", + "Output Program": [ + "[i for i, j in enumerate(myList) if 'how' in j.lower() or 'what' in j.lower()]" + ], + "Output Answer": [ + "[i for i, j in enumerate(myList) if 'how' in j.lower() or 'what' in j.lower()]" + ], + "split": "test" + }, + { + "Input": "convert a string `s` to its base-10 representation", + "Output Program": [ + "int(s.encode('hex'), 16)" + ], + "Output Answer": [ + "int(s.encode('hex'), 16)" + ], + "split": "train" + }, + { + "Input": "call parent class `Instructor` of child class constructor", + "Output Program": [ + "super(Instructor, self).__init__(name, year)" + ], + "Output Answer": [ + "super(Instructor, self).__init__(name, year)" + ], + "split": "train" + }, + { + "Input": "convert binary string to numpy array", + "Output Program": [ + "np.fromstring('\\x00\\x00\\x80?\\x00\\x00\\x00@\\x00\\x00@@\\x00\\x00\\x80@', dtype='>f4')" + ], + "Output Answer": [ + "np.fromstring('\\x00\\x00\\x80?\\x00\\x00\\x00@\\x00\\x00@@\\x00\\x00\\x80@', dtype='>f4')" + ], + "split": "train" + }, + { + "Input": "Filter a dictionary `d` to remove keys with value None and replace other values with 'updated'", + "Output Program": [ + "dict((k, 'updated') for k, v in d.iteritems() if v is None)" + ], + "Output Answer": [ + "dict((k, 'updated') for k, v in d.iteritems() if v is None)" + ], + "split": "train" + }, + { + "Input": "Create new string with unique characters from `s` seperated by ' '", + "Output Program": [ + "print ' '.join(OrderedDict.fromkeys(s))" + ], + "Output Answer": [ + "print ' '.join(OrderedDict.fromkeys(s))" + ], + "split": "train" + }, + { + "Input": "convert the string '0,1,2' to a list of integers", + "Output Program": [ + "[int(x) for x in '0,1,2'.split(',')]" + ], + "Output Answer": [ + "[int(x) for x in '0,1,2'.split(',')]" + ], + "split": "train" + }, + { + "Input": "extract ip address from an html string", + "Output Program": [ + "ip = re.findall('[0-9]+(?:\\\\.[0-9]+){3}', s)" + ], + "Output Answer": [ + "ip = re.findall('[0-9]+(?:\\\\.[0-9]+){3}', s)" + ], + "split": "test" + }, + { + "Input": "create a regular expression that matches the pattern '^(.+)(?:\\\\n|\\\\r\\\\n?)((?:(?:\\\\n|\\\\r\\\\n?).+)+)' over multiple lines of text", + "Output Program": [ + "re.compile('^(.+)(?:\\\\n|\\\\r\\\\n?)((?:(?:\\\\n|\\\\r\\\\n?).+)+)', re.MULTILINE)" + ], + "Output Answer": [ + "re.compile('^(.+)(?:\\\\n|\\\\r\\\\n?)((?:(?:\\\\n|\\\\r\\\\n?).+)+)', re.MULTILINE)" + ], + "split": "train" + }, + { + "Input": "format float `3.5e+20` to `$3.5 \\\\times 10^{20}$` and set as title of matplotlib plot `ax`", + "Output Program": [ + "ax.set_title('$%s \\\\times 10^{%s}$' % ('3.5', '+20'))" + ], + "Output Answer": [ + "ax.set_title('$%s \\\\times 10^{%s}$' % ('3.5', '+20'))" + ], + "split": "train" + }, + { + "Input": "Define a list with string values `['a', 'c', 'b', 'obj']`", + "Output Program": [ + "['a', 'c', 'b', 'obj']" + ], + "Output Answer": [ + "['a', 'c', 'b', 'obj']" + ], + "split": "train" + }, + { + "Input": "Sum of sums of each list, in a list of lists named 'lists'.", + "Output Program": [ + "sum(sum(x) for x in lists)" + ], + "Output Answer": [ + "sum(sum(x) for x in lists)" + ], + "split": "train" + }, + { + "Input": "zip file `pdffile` using its basename as directory name", + "Output Program": [ + "archive.write(pdffile, os.path.basename(pdffile))" + ], + "Output Answer": [ + "archive.write(pdffile, os.path.basename(pdffile))" + ], + "split": "train" + }, + { + "Input": "Iterate ove list `[1, 2, 3]` using list comprehension", + "Output Program": [ + "print [item for item in [1, 2, 3]]" + ], + "Output Answer": [ + "print [item for item in [1, 2, 3]]" + ], + "split": "test" + }, + { + "Input": "converting string '(1,2,3,4)' to a tuple", + "Output Program": [ + "ast.literal_eval('(1,2,3,4)')" + ], + "Output Answer": [ + "ast.literal_eval('(1,2,3,4)')" + ], + "split": "train" + }, + { + "Input": "read a ragged csv file `D:/Temp/tt.csv` using `names` parameter in pandas", + "Output Program": [ + "pd.read_csv('D:/Temp/tt.csv', names=list('abcdef'))" + ], + "Output Answer": [ + "pd.read_csv('D:/Temp/tt.csv', names=list('abcdef'))" + ], + "split": "train" + }, + { + "Input": "commit all the changes after executing a query.", + "Output Program": [ + "dbb.commit()" + ], + "Output Answer": [ + "dbb.commit()" + ], + "split": "train" + }, + { + "Input": "parse string \"Jun 1 2005 1:33PM\" into datetime by format \"%b %d %Y %I:%M%p\"", + "Output Program": [ + "datetime.strptime('Jun 1 2005 1:33PM', '%b %d %Y %I:%M%p')" + ], + "Output Answer": [ + "datetime.strptime('Jun 1 2005 1:33PM', '%b %d %Y %I:%M%p')" + ], + "split": "train" + }, + { + "Input": "python regex to find all numbers and dots from 'text'", + "Output Program": [ + "re.findall('Test([\\\\d.]*\\\\d+)', text)" + ], + "Output Answer": [ + "re.findall('Test([\\\\d.]*\\\\d+)', text)" + ], + "split": "test" + }, + { + "Input": "convert a list of lists `L` to list of integers", + "Output Program": [ + "L = [int(''.join([str(y) for y in x])) for x in L]" + ], + "Output Answer": [ + "L = [int(''.join([str(y) for y in x])) for x in L]" + ], + "split": "test" + }, + { + "Input": "Write a string `My String` to a file `file` including new line character", + "Output Program": [ + "file.write('My String\\n')" + ], + "Output Answer": [ + "file.write('My String\\n')" + ], + "split": "train" + }, + { + "Input": "get a sum of all values from key `gold` in a list of dictionary `example_list`", + "Output Program": [ + "sum([item['gold'] for item in example_list])" + ], + "Output Answer": [ + "sum([item['gold'] for item in example_list])" + ], + "split": "train" + }, + { + "Input": "convert the dataframe column 'col' from string types to datetime types", + "Output Program": [ + "df['col'] = pd.to_datetime(df['col'])" + ], + "Output Answer": [ + "df['col'] = pd.to_datetime(df['col'])" + ], + "split": "train" + }, + { + "Input": "combine two sequences into a dictionary", + "Output Program": [ + "dict(zip(keys, values))" + ], + "Output Answer": [ + "dict(zip(keys, values))" + ], + "split": "train" + }, + { + "Input": "Extract values not equal to 0 from numpy array `a`", + "Output Program": [ + "a[a != 0]" + ], + "Output Answer": [ + "a[a != 0]" + ], + "split": "train" + }, + { + "Input": "removing control characters from a string `s`", + "Output Program": [ + "return ''.join(ch for ch in s if unicodedata.category(ch)[0] != 'C')" + ], + "Output Answer": [ + "return ''.join(ch for ch in s if unicodedata.category(ch)[0] != 'C')" + ], + "split": "train" + }, + { + "Input": "print a list of integers `list_of_ints` using string formatting", + "Output Program": [ + "print ', '.join(str(x) for x in list_of_ints)" + ], + "Output Answer": [ + "print ', '.join(str(x) for x in list_of_ints)" + ], + "split": "train" + }, + { + "Input": "read the first line of a string `my_string`", + "Output Program": [ + "my_string.splitlines()[0]" + ], + "Output Answer": [ + "my_string.splitlines()[0]" + ], + "split": "train" + }, + { + "Input": "get the directory name of `path`", + "Output Program": [ + "os.path.dirname(path)" + ], + "Output Answer": [ + "os.path.dirname(path)" + ], + "split": "train" + }, + { + "Input": "Jinja parse datetime object `car.date_of_manufacture` to use format pattern `datetime`", + "Output Program": [ + "{{car.date_of_manufacture | datetime}}" + ], + "Output Answer": [ + "{{car.date_of_manufacture | datetime}}" + ], + "split": "train" + }, + { + "Input": "convert a list `my_list` into string with values separated by spaces", + "Output Program": [ + "\"\"\" \"\"\".join(my_list)" + ], + "Output Answer": [ + "\"\"\" \"\"\".join(my_list)" + ], + "split": "train" + }, + { + "Input": "binarize the values in columns of list `order` in a pandas data frame", + "Output Program": [ + "pd.concat([df, pd.get_dummies(df, '', '').astype(int)], axis=1)[order]" + ], + "Output Answer": [ + "pd.concat([df, pd.get_dummies(df, '', '').astype(int)], axis=1)[order]" + ], + "split": "train" + }, + { + "Input": "decode encodeuricomponent in GAE", + "Output Program": [ + "urllib.unquote(h.path.encode('utf-8')).decode('utf-8')" + ], + "Output Answer": [ + "urllib.unquote(h.path.encode('utf-8')).decode('utf-8')" + ], + "split": "train" + }, + { + "Input": "Convert integer `number` into an unassigned integer", + "Output Program": [ + "struct.unpack('H', struct.pack('h', number))" + ], + "Output Answer": [ + "struct.unpack('H', struct.pack('h', number))" + ], + "split": "test" + }, + { + "Input": "sort list `l` by index 2 of the item", + "Output Program": [ + "sorted(l, key=(lambda x: x[2]))" + ], + "Output Answer": [ + "sorted(l, key=(lambda x: x[2]))" + ], + "split": "train" + }, + { + "Input": "create a list where each element is a dictionary with keys 'key1' and 'key2' and values corresponding to each value in the lists referenced by keys 'key1' and 'key2' in dictionary `d`", + "Output Program": [ + "[{'key1': a, 'key2': b} for a, b in zip(d['key1'], d['key2'])]" + ], + "Output Answer": [ + "[{'key1': a, 'key2': b} for a, b in zip(d['key1'], d['key2'])]" + ], + "split": "train" + }, + { + "Input": "check whether elements in list `a` appear only once", + "Output Program": [ + "len(set(a)) == len(a)" + ], + "Output Answer": [ + "len(set(a)) == len(a)" + ], + "split": "train" + }, + { + "Input": "round number 7.005 up to 2 decimal places", + "Output Program": [ + "round(7.005, 2)" + ], + "Output Answer": [ + "round(7.005, 2)" + ], + "split": "train" + }, + { + "Input": "match regex 'abc(de)fg(123)' on string 'abcdefg123 and again abcdefg123'", + "Output Program": [ + "re.findall('abc(de)fg(123)', 'abcdefg123 and again abcdefg123')" + ], + "Output Answer": [ + "re.findall('abc(de)fg(123)', 'abcdefg123 and again abcdefg123')" + ], + "split": "train" + }, + { + "Input": "remove extra white spaces & tabs from a string `s`", + "Output Program": [ + "\"\"\" \"\"\".join(s.split())" + ], + "Output Answer": [ + "\"\"\" \"\"\".join(s.split())" + ], + "split": "train" + }, + { + "Input": "replace unicode characters ''\\u2022' in string 'str' with '*'", + "Output Program": [ + "str.decode('utf-8').replace(u'\\u2022', '*')" + ], + "Output Answer": [ + "str.decode('utf-8').replace(u'\\u2022', '*')" + ], + "split": "train" + }, + { + "Input": "Get a list of pairs of key-value sorted by values in dictionary `data`", + "Output Program": [ + "sorted(data.items(), key=lambda x: x[1])" + ], + "Output Answer": [ + "sorted(data.items(), key=lambda x: x[1])" + ], + "split": "train" + }, + { + "Input": "get a list of all items in list `j` with values greater than `5`", + "Output Program": [ + "[x for x in j if x >= 5]" + ], + "Output Answer": [ + "[x for x in j if x >= 5]" + ], + "split": "train" + }, + { + "Input": "load a tsv file `c:/~/trainSetRel3.txt` into a pandas data frame", + "Output Program": [ + "DataFrame.from_csv('c:/~/trainSetRel3.txt', sep='\\t')" + ], + "Output Answer": [ + "DataFrame.from_csv('c:/~/trainSetRel3.txt', sep='\\t')" + ], + "split": "train" + }, + { + "Input": "create a list containing a four elements long tuples of permutations of binary values", + "Output Program": [ + "itertools.product(range(2), repeat=4)" + ], + "Output Answer": [ + "itertools.product(range(2), repeat=4)" + ], + "split": "train" + }, + { + "Input": "append line \"cool beans...\" to file \"foo\"", + "Output Program": [ + "with open('foo', 'a') as f:\n f.write('cool beans...')" + ], + "Output Answer": [ + "with open('foo', 'a') as f:\n f.write('cool beans...')" + ], + "split": "train" + }, + { + "Input": "convert a list of characters `['a', 'b', 'c', 'd']` into a string", + "Output Program": [ + "\"\"\"\"\"\".join(['a', 'b', 'c', 'd'])" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(['a', 'b', 'c', 'd'])" + ], + "split": "train" + }, + { + "Input": "Write a comment `# Data for Class A\\n` to a file object `f`", + "Output Program": [ + "f.write('# Data for Class A\\n')" + ], + "Output Answer": [ + "f.write('# Data for Class A\\n')" + ], + "split": "train" + }, + { + "Input": "get line count of file 'myfile.txt'", + "Output Program": [ + "sum((1 for line in open('myfile.txt')))" + ], + "Output Answer": [ + "sum((1 for line in open('myfile.txt')))" + ], + "split": "train" + }, + { + "Input": "sort list `L` based on the value of variable 'resultType' for each object in list `L`", + "Output Program": [ + "sorted(L, key=operator.itemgetter('resultType'))" + ], + "Output Answer": [ + "sorted(L, key=operator.itemgetter('resultType'))" + ], + "split": "train" + }, + { + "Input": "find a tag `option` whose `value` attribute is `state` in selenium", + "Output Program": [ + "driver.find_element_by_xpath(\"//option[@value='\" + state + \"']\").click()" + ], + "Output Answer": [ + "driver.find_element_by_xpath(\"//option[@value='\" + state + \"']\").click()" + ], + "split": "train" + }, + { + "Input": "in django, check if a user is in a group 'Member'", + "Output Program": [ + "return user.groups.filter(name='Member').exists()" + ], + "Output Answer": [ + "return user.groups.filter(name='Member').exists()" + ], + "split": "train" + }, + { + "Input": "switch keys and values in a dictionary `my_dict`", + "Output Program": [ + "dict((v, k) for k, v in my_dict.iteritems())" + ], + "Output Answer": [ + "dict((v, k) for k, v in my_dict.iteritems())" + ], + "split": "train" + }, + { + "Input": "split dictionary/list inside a pandas column 'b' into separate columns in dataframe `df`", + "Output Program": [ + "pd.concat([df.drop('b', axis=1), pd.DataFrame(df['b'].tolist())], axis=1)" + ], + "Output Answer": [ + "pd.concat([df.drop('b', axis=1), pd.DataFrame(df['b'].tolist())], axis=1)" + ], + "split": "train" + }, + { + "Input": "find recurring patterns in a string '42344343434'", + "Output Program": [ + "re.findall('^(.+?)((.+)\\\\3+)$', '42344343434')[0][:-1]" + ], + "Output Answer": [ + "re.findall('^(.+?)((.+)\\\\3+)$', '42344343434')[0][:-1]" + ], + "split": "train" + }, + { + "Input": "set font size of axis legend of plot `plt` to 'xx-small'", + "Output Program": [ + "plt.setp(legend.get_title(), fontsize='xx-small')" + ], + "Output Answer": [ + "plt.setp(legend.get_title(), fontsize='xx-small')" + ], + "split": "train" + }, + { + "Input": "pad 'dog' up to a length of 5 characters with 'x'", + "Output Program": [ + "\"\"\"{s:{c}^{n}}\"\"\".format(s='dog', n=5, c='x')" + ], + "Output Answer": [ + "\"\"\"{s:{c}^{n}}\"\"\".format(s='dog', n=5, c='x')" + ], + "split": "train" + }, + { + "Input": "replace a string `Abc` in case sensitive way using maketrans", + "Output Program": [ + "\"\"\"Abc\"\"\".translate(maketrans('abcABC', 'defDEF'))" + ], + "Output Answer": [ + "\"\"\"Abc\"\"\".translate(maketrans('abcABC', 'defDEF'))" + ], + "split": "train" + }, + { + "Input": "Create 3d array of zeroes of size `(3,3,3)`", + "Output Program": [ + "numpy.zeros((3, 3, 3))" + ], + "Output Answer": [ + "numpy.zeros((3, 3, 3))" + ], + "split": "test" + }, + { + "Input": "converting dictionary `d` into a dataframe `pd` with keys as data for column 'Date' and the corresponding values as data for column 'DateValue'", + "Output Program": [ + "pd.DataFrame(d.items(), columns=['Date', 'DateValue'])" + ], + "Output Answer": [ + "pd.DataFrame(d.items(), columns=['Date', 'DateValue'])" + ], + "split": "train" + }, + { + "Input": "abort the execution of a python script", + "Output Program": [ + "sys.exit()" + ], + "Output Answer": [ + "sys.exit()" + ], + "split": "train" + }, + { + "Input": "find the sums of length 7 subsets of a list `daily`", + "Output Program": [ + "weekly = [sum(visitors[x:x + 7]) for x in range(0, len(daily), 7)]" + ], + "Output Answer": [ + "weekly = [sum(visitors[x:x + 7]) for x in range(0, len(daily), 7)]" + ], + "split": "train" + }, + { + "Input": "Delete mulitple columns `columnheading1`, `columnheading2` in pandas data frame `yourdf`", + "Output Program": [ + "yourdf.drop(['columnheading1', 'columnheading2'], axis=1, inplace=True)" + ], + "Output Answer": [ + "yourdf.drop(['columnheading1', 'columnheading2'], axis=1, inplace=True)" + ], + "split": "train" + }, + { + "Input": "load data containing `utf-8` from file `new.txt` into numpy array `arr`", + "Output Program": [ + "arr = numpy.fromiter(codecs.open('new.txt', encoding='utf-8'), dtype='jik', X, X)" + ], + "Output Answer": [ + "np.einsum('ij,kj->jik', X, X)" + ], + "split": "train" + }, + { + "Input": "check if string `b` is a number", + "Output Program": [ + "b.isdigit()" + ], + "Output Answer": [ + "b.isdigit()" + ], + "split": "train" + }, + { + "Input": "remove newline in string `s` on the right side", + "Output Program": [ + "s.rstrip()" + ], + "Output Answer": [ + "s.rstrip()" + ], + "split": "train" + }, + { + "Input": "removing key values pairs with key 'mykey1' from a list of dictionaries `mylist`", + "Output Program": [ + "[{k: v for k, v in d.iteritems() if k != 'mykey1'} for d in mylist]" + ], + "Output Answer": [ + "[{k: v for k, v in d.iteritems() if k != 'mykey1'} for d in mylist]" + ], + "split": "train" + }, + { + "Input": "extend dictionary `a` with key/value pairs of dictionary `b`", + "Output Program": [ + "a.update(b)" + ], + "Output Answer": [ + "a.update(b)" + ], + "split": "train" + }, + { + "Input": "split string `str` with delimiter '; ' or delimiter ', '", + "Output Program": [ + "re.split('; |, ', str)" + ], + "Output Answer": [ + "re.split('; |, ', str)" + ], + "split": "train" + }, + { + "Input": "replace nans by preceding values in pandas dataframe `df`", + "Output Program": [ + "df.fillna(method='ffill', inplace=True)" + ], + "Output Answer": [ + "df.fillna(method='ffill', inplace=True)" + ], + "split": "train" + }, + { + "Input": "convert a list of lists `list_of_lists` into a list of strings keeping empty sub-lists as empty string ''", + "Output Program": [ + "[''.join(l) for l in list_of_lists]" + ], + "Output Answer": [ + "[''.join(l) for l in list_of_lists]" + ], + "split": "train" + }, + { + "Input": "removing duplicate characters from a string variable \"foo\"", + "Output Program": [ + "\"\"\"\"\"\".join(set(foo))" + ], + "Output Answer": [ + "\"\"\"\"\"\".join(set(foo))" + ], + "split": "train" + }, + { + "Input": "create a list of integers from 1 to 5 with each value duplicated", + "Output Program": [ + "[(i // 2) for i in xrange(10)]" + ], + "Output Answer": [ + "[(i // 2) for i in xrange(10)]" + ], + "split": "train" + }, + { + "Input": "delete all instances of a character 'i' in a string 'it is icy'", + "Output Program": [ + "re.sub('i', '', 'it is icy')" + ], + "Output Answer": [ + "re.sub('i', '', 'it is icy')" + ], + "split": "test" + }, + { + "Input": "Replace special characters in utf-8 encoded string `s` using the %xx escape", + "Output Program": [ + "urllib.quote(s.encode('utf-8'))" + ], + "Output Answer": [ + "urllib.quote(s.encode('utf-8'))" + ], + "split": "train" + }, + { + "Input": "Delete an element 0 from a dictionary `a`", + "Output Program": [ + "{i: a[i] for i in a if (i != 0)}" + ], + "Output Answer": [ + "{i: a[i] for i in a if (i != 0)}" + ], + "split": "train" + }, + { + "Input": "pull a value with key 'name' from a json object `item`", + "Output Program": [ + "print item['name']" + ], + "Output Answer": [ + "print item['name']" + ], + "split": "train" + }, + { + "Input": "make new column 'C' in panda dataframe by adding values from other columns 'A' and 'B'", + "Output Program": [ + "df['C'] = df['A'] + df['B']" + ], + "Output Answer": [ + "df['C'] = df['A'] + df['B']" + ], + "split": "train" + }, + { + "Input": "python selenium click on button '.button.c_button.s_button'", + "Output Program": [ + "driver.find_element_by_css_selector('.button.c_button.s_button').click()" + ], + "Output Answer": [ + "driver.find_element_by_css_selector('.button.c_button.s_button').click()" + ], + "split": "train" + }, + { + "Input": "combining rows in pandas by adding their values", + "Output Program": [ + "df.groupby(df.index).sum()" + ], + "Output Answer": [ + "df.groupby(df.index).sum()" + ], + "split": "train" + }, + { + "Input": "replace white spaces in dataframe `df` with '_'", + "Output Program": [ + "df.replace(' ', '_', regex=True)" + ], + "Output Answer": [ + "df.replace(' ', '_', regex=True)" + ], + "split": "train" + }, + { + "Input": "Spawn a process to run python script `myscript.py` in C++", + "Output Program": [ + "system('python myscript.py')" + ], + "Output Answer": [ + "system('python myscript.py')" + ], + "split": "train" + }, + { + "Input": "Convert a Unicode string `a` to a 'ascii' string", + "Output Program": [ + "a.encode('ascii', 'ignore')" + ], + "Output Answer": [ + "a.encode('ascii', 'ignore')" + ], + "split": "train" + }, + { + "Input": "replace the last occurence of an expression '' with '' in a string `s`", + "Output Program": [ + "re.sub('(.*)', '\\\\1', s)" + ], + "Output Answer": [ + "re.sub('(.*)', '\\\\1', s)" + ], + "split": "train" + }, + { + "Input": "remove parentheses only around single words in a string `s` using regex", + "Output Program": [ + "re.sub('\\\\((\\\\w+)\\\\)', '\\\\1', s)" + ], + "Output Answer": [ + "re.sub('\\\\((\\\\w+)\\\\)', '\\\\1', s)" + ], + "split": "train" + }, + { + "Input": "convert a tensor with list of constants `[1, 2, 3]` into a numpy array in tensorflow", + "Output Program": [ + "print type(tf.Session().run(tf.constant([1, 2, 3])))" + ], + "Output Answer": [ + "print type(tf.Session().run(tf.constant([1, 2, 3])))" + ], + "split": "train" + }, + { + "Input": "change NaN values in dataframe `df` using preceding values in the frame", + "Output Program": [ + "df.fillna(method='ffill', inplace=True)" + ], + "Output Answer": [ + "df.fillna(method='ffill', inplace=True)" + ], + "split": "train" + }, + { + "Input": "Get a list of strings `split_text` with fixed chunk size `n` from a string `the_list`", + "Output Program": [ + "split_list = [the_list[i:i + n] for i in range(0, len(the_list), n)]" + ], + "Output Answer": [ + "split_list = [the_list[i:i + n] for i in range(0, len(the_list), n)]" + ], + "split": "train" + }, + { + "Input": "print a 2 dimensional list `tab` as a table with delimiters", + "Output Program": [ + "print '\\n'.join('\\t'.join(str(col) for col in row) for row in tab)" + ], + "Output Answer": [ + "print '\\n'.join('\\t'.join(str(col) for col in row) for row in tab)" + ], + "split": "test" + }, + { + "Input": "separate each character in string `s` by '-'", + "Output Program": [ + "re.sub('(.)(?=.)', '\\\\1-', s)" + ], + "Output Answer": [ + "re.sub('(.)(?=.)', '\\\\1-', s)" + ], + "split": "train" + }, + { + "Input": "check if all string elements in list `words` are upper-cased", + "Output Program": [ + "print all(word[0].isupper() for word in words)" + ], + "Output Answer": [ + "print all(word[0].isupper() for word in words)" + ], + "split": "train" + }, + { + "Input": "numpy: check if array 'a' contains all the numbers in array 'b'.", + "Output Program": [ + "numpy.array([(x in a) for x in b])" + ], + "Output Answer": [ + "numpy.array([(x in a) for x in b])" + ], + "split": "train" + }, + { + "Input": "Generate a random integer between `a` and `b`", + "Output Program": [ + "random.randint(a, b)" + ], + "Output Answer": [ + "random.randint(a, b)" + ], + "split": "train" + }, + { + "Input": "Find all records from collection `collection` without extracting mongo id `_id`", + "Output Program": [ + "db.collection.find({}, {'_id': False})" + ], + "Output Answer": [ + "db.collection.find({}, {'_id': False})" + ], + "split": "train" + }, + { + "Input": "Escape character '}' in string '{0}:<15}}{1}:<15}}{2}:<8}}' while using function `format` with arguments `('1', '2', '3')`", + "Output Program": [ + "print '{0}:<15}}{1}:<15}}{2}:<8}}'.format('1', '2', '3')" + ], + "Output Answer": [ + "print '{0}:<15}}{1}:<15}}{2}:<8}}'.format('1', '2', '3')" + ], + "split": "train" + }, + { + "Input": "Join elements of list `l` with a comma `,`", + "Output Program": [ + "\"\"\",\"\"\".join(l)" + ], + "Output Answer": [ + "\"\"\",\"\"\".join(l)" + ], + "split": "test" + }, + { + "Input": "split string `Word to Split` into a list of characters", + "Output Program": [ + "list('Word to Split')" + ], + "Output Answer": [ + "list('Word to Split')" + ], + "split": "train" + }, + { + "Input": "get a list of tuples of every three consecutive items in list `[1, 2, 3, 4, 5, 6, 7, 8, 9]`", + "Output Program": [ + "list(zip(*((iter([1, 2, 3, 4, 5, 6, 7, 8, 9]),) * 3)))" + ], + "Output Answer": [ + "list(zip(*((iter([1, 2, 3, 4, 5, 6, 7, 8, 9]),) * 3)))" + ], + "split": "train" + }, + { + "Input": "find the index of element closest to number 11.5 in list `a`", + "Output Program": [ + "min(enumerate(a), key=lambda x: abs(x[1] - 11.5))" + ], + "Output Answer": [ + "min(enumerate(a), key=lambda x: abs(x[1] - 11.5))" + ], + "split": "train" + }, + { + "Input": "replace '-' in pandas dataframe `df` with `np.nan`", + "Output Program": [ + "df.replace('-', np.nan)" + ], + "Output Answer": [ + "df.replace('-', np.nan)" + ], + "split": "train" + }, + { + "Input": "divide the value for each key `k` in dict `d2` by the value for the same key `k` in dict `d1`", + "Output Program": [ + "{k: (d2[k] / d1[k]) for k in d1.keys() & d2}" + ], + "Output Answer": [ + "{k: (d2[k] / d1[k]) for k in d1.keys() & d2}" + ], + "split": "train" + }, + { + "Input": "get a list of values with key 'key' from a list of dictionaries `l`", + "Output Program": [ + "[d['key'] for d in l if 'key' in d]" + ], + "Output Answer": [ + "[d['key'] for d in l if 'key' in d]" + ], + "split": "train" + }, + { + "Input": "display a pdf file that has been downloaded as `my_pdf.pdf`", + "Output Program": [ + "webbrowser.open('file:///my_pdf.pdf')" + ], + "Output Answer": [ + "webbrowser.open('file:///my_pdf.pdf')" + ], + "split": "train" + }, + { + "Input": "reduce the first element of list of strings `data` to a string, separated by '.'", + "Output Program": [ + "print '.'.join([item[0] for item in data])" + ], + "Output Answer": [ + "print '.'.join([item[0] for item in data])" + ], + "split": "train" + }, + { + "Input": "interleave the elements of two lists `a` and `b`", + "Output Program": [ + "[j for i in zip(a, b) for j in i]" + ], + "Output Answer": [ + "[j for i in zip(a, b) for j in i]" + ], + "split": "train" + }, + { + "Input": "Convert the first row of numpy matrix `a` to a list", + "Output Program": [ + "numpy.array(a)[0].tolist()" + ], + "Output Answer": [ + "numpy.array(a)[0].tolist()" + ], + "split": "test" + }, + { + "Input": "download a file `url` over HTTP", + "Output Program": [ + "r = requests.get(url)" + ], + "Output Answer": [ + "r = requests.get(url)" + ], + "split": "test" + }, + { + "Input": "pandas: change all the values of a column 'Date' into \"int(str(x)[-4:])\"", + "Output Program": [ + "df['Date'] = df['Date'].apply(lambda x: int(str(x)[-4:]))" + ], + "Output Answer": [ + "df['Date'] = df['Date'].apply(lambda x: int(str(x)[-4:]))" + ], + "split": "train" + }, + { + "Input": "convert values in dictionary `d` into integers", + "Output Program": [ + "{k: int(v) for k, v in d.iteritems()}" + ], + "Output Answer": [ + "{k: int(v) for k, v in d.iteritems()}" + ], + "split": "train" + }, + { + "Input": "remove Nan values from array `x`", + "Output Program": [ + "x = x[numpy.logical_not(numpy.isnan(x))]" + ], + "Output Answer": [ + "x = x[numpy.logical_not(numpy.isnan(x))]" + ], + "split": "train" + }, + { + "Input": "create array containing the maximum value of respective elements of array `[2, 3, 4]` and array `[1, 5, 2]`", + "Output Program": [ + "np.maximum([2, 3, 4], [1, 5, 2])" + ], + "Output Answer": [ + "np.maximum([2, 3, 4], [1, 5, 2])" + ], + "split": "test" + }, + { + "Input": "List all the files that doesn't contain the name `hello`", + "Output Program": [ + "glob.glob('[!hello]*.txt')" + ], + "Output Answer": [ + "glob.glob('[!hello]*.txt')" + ], + "split": "train" + }, + { + "Input": "reverse y-axis in pyplot", + "Output Program": [ + "plt.gca().invert_yaxis()" + ], + "Output Answer": [ + "plt.gca().invert_yaxis()" + ], + "split": "train" + }, + { + "Input": "convert dictionary `dict` into a flat list", + "Output Program": [ + "print [y for x in dict.items() for y in x]" + ], + "Output Answer": [ + "print [y for x in dict.items() for y in x]" + ], + "split": "train" + }, + { + "Input": "Create a dictionary from string `e` separated by `-` and `,`", + "Output Program": [ + "dict((k, int(v)) for k, v in (e.split(' - ') for e in s.split(',')))" + ], + "Output Answer": [ + "dict((k, int(v)) for k, v in (e.split(' - ') for e in s.split(',')))" + ], + "split": "train" + }, + { + "Input": "create a list with permutations of string 'abcd'", + "Output Program": [ + "list(powerset('abcd'))" + ], + "Output Answer": [ + "list(powerset('abcd'))" + ], + "split": "train" + }, + { + "Input": "Getting the length of array `l`", + "Output Program": [ + "len(l)" + ], + "Output Answer": [ + "len(l)" + ], + "split": "test" + }, + { + "Input": "creating a list of dictionaries [{'A': 1, 'C': 4, 'B': 2, 'D': 4}, {'A': 1, 'C': 4, 'B': 1, 'D': 5}]", + "Output Program": [ + "[{'A': 1, 'C': 4, 'B': 2, 'D': 4}, {'A': 1, 'C': 4, 'B': 1, 'D': 5}]" + ], + "Output Answer": [ + "[{'A': 1, 'C': 4, 'B': 2, 'D': 4}, {'A': 1, 'C': 4, 'B': 1, 'D': 5}]" + ], + "split": "train" + }, + { + "Input": "get canonical path of the filename `path`", + "Output Program": [ + "os.path.realpath(path)" + ], + "Output Answer": [ + "os.path.realpath(path)" + ], + "split": "train" + }, + { + "Input": "Initialize a list of empty lists `x` of size 3", + "Output Program": [ + "x = [[] for i in range(3)]" + ], + "Output Answer": [ + "x = [[] for i in range(3)]" + ], + "split": "train" + }, + { + "Input": "cut a string by delimiter '&'", + "Output Program": [ + "s.rfind('&')" + ], + "Output Answer": [ + "s.rfind('&')" + ], + "split": "train" + }, + { + "Input": "make a window `root` jump to the front", + "Output Program": [ + "root.lift()" + ], + "Output Answer": [ + "root.lift()" + ], + "split": "train" + }, + { + "Input": "insert `_suff` before the file extension in `long.file.name.jpg` or replace `_a` with `suff` if it precedes the extension.", + "Output Program": [ + "re.sub('(\\\\_a)?\\\\.([^\\\\.]*)$', '_suff.\\\\2', 'long.file.name.jpg')" + ], + "Output Answer": [ + "re.sub('(\\\\_a)?\\\\.([^\\\\.]*)$', '_suff.\\\\2', 'long.file.name.jpg')" + ], + "split": "test" + }, + { + "Input": "Calling an external command \"ls\"", + "Output Program": [ + "p = subprocess.Popen('ls', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)\nfor line in p.stdout.readlines():\n print line,\nretval = p.wait()" + ], + "Output Answer": [ + "p = subprocess.Popen('ls', shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)\nfor line in p.stdout.readlines():\n print line,\nretval = p.wait()" + ], + "split": "train" + }, + { + "Input": "create a flat dictionary by summing values associated with similar keys in each dictionary of list `dictlist`", + "Output Program": [ + "dict((key, sum(d[key] for d in dictList)) for key in dictList[0])" + ], + "Output Answer": [ + "dict((key, sum(d[key] for d in dictList)) for key in dictList[0])" + ], + "split": "train" + }, + { + "Input": "print cpu and memory usage", + "Output Program": [ + "print(psutil.cpu_percent())\nprint(psutil.virtual_memory())" + ], + "Output Answer": [ + "print(psutil.cpu_percent())\nprint(psutil.virtual_memory())" + ], + "split": "train" + }, + { + "Input": "print '[1, 2, 3]'", + "Output Program": [ + "print '[%s, %s, %s]' % (1, 2, 3)" + ], + "Output Answer": [ + "print '[%s, %s, %s]' % (1, 2, 3)" + ], + "split": "train" + }, + { + "Input": "calculat the difference between each row and the row previous to it in dataframe `data`", + "Output Program": [ + "data.set_index('Date').diff()" + ], + "Output Answer": [ + "data.set_index('Date').diff()" + ], + "split": "train" + }, + { + "Input": "Convert a string `s` containing hex bytes to a hex string", + "Output Program": [ + "s.decode('hex')" + ], + "Output Answer": [ + "s.decode('hex')" + ], + "split": "train" + }, + { + "Input": "get a list of of elements resulting from splitting user input by commas and stripping white space from each resulting string `s`", + "Output Program": [ + "[s.strip() for s in raw_input().split(',')]" + ], + "Output Answer": [ + "[s.strip() for s in raw_input().split(',')]" + ], + "split": "train" + } + ], + "Metadata": [ + { + "Answer": "", + "Explanation": "question_id: 22397058" + }, + { + "Answer": "", + "Explanation": "question_id: 8519922" + }, + { + "Answer": "", + "Explanation": "question_id: 23351183" + }, + { + "Answer": "", + "Explanation": "question_id: 4020539" + }, + { + "Answer": "", + "Explanation": "question_id: 39870642" + }, + { + "Answer": "", + "Explanation": "question_id: 16566069" + }, + { + "Answer": "", + "Explanation": "question_id: 18979111" + }, + { + "Answer": "", + "Explanation": "question_id: 13145368" + }, + { + "Answer": "", + "Explanation": "question_id: 8177079" + }, + { + "Answer": "", + "Explanation": "question_id: 32063985" + }, + { + "Answer": "", + "Explanation": "question_id: 14932247" + }, + { + "Answer": "", + "Explanation": "question_id: 1082413" + }, + { + "Answer": "", + "Explanation": "question_id: 3430372" + }, + { + "Answer": "", + "Explanation": "question_id: 5801945" + }, + { + "Answer": "", + "Explanation": "question_id: 13571134" + }, + { + "Answer": "", + "Explanation": "question_id: 12842997" + }, + { + "Answer": "", + "Explanation": "question_id: 761804" + }, + { + "Answer": "", + "Explanation": "question_id: 15650538" + }, + { + "Answer": "", + "Explanation": "question_id: 14859458" + }, + { + "Answer": "", + "Explanation": "question_id: 14961562" + }, + { + "Answer": "", + "Explanation": "question_id: 5917537" + }, + { + "Answer": "", + "Explanation": "question_id: 16296643" + }, + { + "Answer": "", + "Explanation": "question_id: 3040904" + }, + { + "Answer": "", + "Explanation": "question_id: 32722143" + }, + { + "Answer": "", + "Explanation": "question_id: 3328012" + }, + { + "Answer": "", + "Explanation": "question_id: 8177079" + }, + { + "Answer": "", + "Explanation": "question_id: 438684" + }, + { + "Answer": "", + "Explanation": "question_id: 3582601" + }, + { + "Answer": "", + "Explanation": "question_id: 22625616" + }, + { + "Answer": "", + "Explanation": "question_id: 3277503" + }, + { + "Answer": "", + "Explanation": "question_id: 35253971" + }, + { + "Answer": "", + "Explanation": "question_id: 3939361" + }, + { + "Answer": "", + "Explanation": "question_id: 15183084" + }, + { + "Answer": "", + "Explanation": "question_id: 3844801" + }, + { + "Answer": "", + "Explanation": "question_id: 2375335" + }, + { + "Answer": "", + "Explanation": "question_id: 28773683" + }, + { + "Answer": "", + "Explanation": "question_id: 11573817" + }, + { + "Answer": "", + "Explanation": "question_id: 179369" + }, + { + "Answer": "", + "Explanation": "question_id: 17608210" + }, + { + "Answer": "", + "Explanation": "question_id: 5352546" + }, + { + "Answer": "", + "Explanation": "question_id: 16114333" + }, + { + "Answer": "", + "Explanation": "question_id: 2231663" + }, + { + "Answer": "", + "Explanation": "question_id: 17926273" + }, + { + "Answer": "", + "Explanation": "question_id: 209513" + }, + { + "Answer": "", + "Explanation": "question_id: 16735786" + }, + { + "Answer": "", + "Explanation": "question_id: 4338032" + }, + { + "Answer": "", + "Explanation": "question_id: 40620804" + }, + { + "Answer": "", + "Explanation": "question_id: 41807864" + }, + { + "Answer": "", + "Explanation": "question_id: 3437059" + }, + { + "Answer": "", + "Explanation": "question_id: 251464" + }, + { + "Answer": "", + "Explanation": "question_id: 11174790" + }, + { + "Answer": "", + "Explanation": "question_id: 21669374" + }, + { + "Answer": "", + "Explanation": "question_id: 508657" + }, + { + "Answer": "", + "Explanation": "question_id: 4703390" + }, + { + "Answer": "", + "Explanation": "question_id: 227459" + }, + { + "Answer": "", + "Explanation": "question_id: 163542" + }, + { + "Answer": "", + "Explanation": "question_id: 53513" + }, + { + "Answer": "", + "Explanation": "question_id: 18358938" + }, + { + "Answer": "", + "Explanation": "question_id: 3277503" + }, + { + "Answer": "", + "Explanation": "question_id: 1406145" + }, + { + "Answer": "", + "Explanation": "question_id: 4365964" + }, + { + "Answer": "", + "Explanation": "question_id: 5788891" + }, + { + "Answer": "", + "Explanation": "question_id: 13279399" + }, + { + "Answer": "", + "Explanation": "question_id: 379906" + }, + { + "Answer": "", + "Explanation": "question_id: 5245058" + }, + { + "Answer": "", + "Explanation": "question_id: 6376886" + }, + { + "Answer": "", + "Explanation": "question_id: 3817529" + }, + { + "Answer": "", + "Explanation": "question_id: 687295" + }, + { + "Answer": "", + "Explanation": "question_id: 6027690" + }, + { + "Answer": "", + "Explanation": "question_id: 4065737" + }, + { + "Answer": "", + "Explanation": "question_id: 3457673" + }, + { + "Answer": "", + "Explanation": "question_id: 23354124" + }, + { + "Answer": "", + "Explanation": "question_id: 2612802" + }, + { + "Answer": "", + "Explanation": "question_id: 36139" + }, + { + "Answer": "", + "Explanation": "question_id: 3523048" + }, + { + "Answer": "", + "Explanation": "question_id: 29100599" + }, + { + "Answer": "", + "Explanation": "question_id: 38273353" + }, + { + "Answer": "", + "Explanation": "question_id: 3294889" + }, + { + "Answer": "", + "Explanation": "question_id: 42950" + }, + { + "Answer": "", + "Explanation": "question_id: 7011291" + }, + { + "Answer": "", + "Explanation": "question_id: 38862349" + }, + { + "Answer": "", + "Explanation": "question_id: 5844672" + }, + { + "Answer": "", + "Explanation": "question_id: 2052390" + }, + { + "Answer": "", + "Explanation": "question_id: 4642501" + }, + { + "Answer": "", + "Explanation": "question_id: 1015142" + }, + { + "Answer": "", + "Explanation": "question_id: 761804" + }, + { + "Answer": "", + "Explanation": "question_id: 1064335" + }, + { + "Answer": "", + "Explanation": "question_id: 35883459" + }, + { + "Answer": "", + "Explanation": "question_id: 16387069" + }, + { + "Answer": "", + "Explanation": "question_id: 5607551" + }, + { + "Answer": "", + "Explanation": "question_id: 14716342" + }, + { + "Answer": "", + "Explanation": "question_id: 17277100" + }, + { + "Answer": "", + "Explanation": "question_id: 402504" + }, + { + "Answer": "", + "Explanation": "question_id: 40535203" + }, + { + "Answer": "", + "Explanation": "question_id: 1949318" + }, + { + "Answer": "", + "Explanation": "question_id: 3061" + }, + { + "Answer": "", + "Explanation": "question_id: 2151517" + }, + { + "Answer": "", + "Explanation": "question_id: 3220284" + }, + { + "Answer": "", + "Explanation": "question_id: 4433017" + }, + { + "Answer": "", + "Explanation": "question_id: 627435" + }, + { + "Answer": "", + "Explanation": "question_id: 1303243" + }, + { + "Answer": "", + "Explanation": "question_id: 1197600" + }, + { + "Answer": "", + "Explanation": "question_id: 18137341" + }, + { + "Answer": "", + "Explanation": "question_id: 14406214" + }, + { + "Answer": "", + "Explanation": "question_id: 34438901" + }, + { + "Answer": "", + "Explanation": "question_id: 18470323" + }, + { + "Answer": "", + "Explanation": "question_id: 10996140" + }, + { + "Answer": "", + "Explanation": "question_id: 11339210" + }, + { + "Answer": "", + "Explanation": "question_id: 16883447" + }, + { + "Answer": "", + "Explanation": "question_id: 7253803" + }, + { + "Answer": "", + "Explanation": "question_id: 743806" + }, + { + "Answer": "", + "Explanation": "question_id: 3431825" + }, + { + "Answer": "", + "Explanation": "question_id: 3428769" + }, + { + "Answer": "", + "Explanation": "question_id: 4641765" + }, + { + "Answer": "", + "Explanation": "question_id: 10525301" + }, + { + "Answer": "", + "Explanation": "question_id: 89228" + }, + { + "Answer": "", + "Explanation": "question_id: 4830535" + }, + { + "Answer": "", + "Explanation": "question_id: 1024847" + }, + { + "Answer": "", + "Explanation": "question_id: 1762484" + }, + { + "Answer": "", + "Explanation": "question_id: 21691126" + }, + { + "Answer": "", + "Explanation": "question_id: 8092877" + }, + { + "Answer": "", + "Explanation": "question_id: 663171" + }, + { + "Answer": "", + "Explanation": "question_id: 9775297" + }, + { + "Answer": "", + "Explanation": "question_id: 82831" + }, + { + "Answer": "", + "Explanation": "question_id: 72899" + }, + { + "Answer": "", + "Explanation": "question_id: 1007481" + }, + { + "Answer": "", + "Explanation": "question_id: 510348" + }, + { + "Answer": "", + "Explanation": "question_id: 16193578" + }, + { + "Answer": "", + "Explanation": "question_id: 14931769" + }, + { + "Answer": "", + "Explanation": "question_id: 14401047" + }, + { + "Answer": "", + "Explanation": "question_id: 9323159" + }, + { + "Answer": "", + "Explanation": "question_id: 2424412" + }, + { + "Answer": "", + "Explanation": "question_id: 21018612" + }, + { + "Answer": "", + "Explanation": "question_id: 26153795" + }, + { + "Answer": "", + "Explanation": "question_id: 13070461" + }, + { + "Answer": "", + "Explanation": "question_id: 28773683" + }, + { + "Answer": "", + "Explanation": "question_id: 26053849" + }, + { + "Answer": "", + "Explanation": "question_id: 11348347" + }, + { + "Answer": "", + "Explanation": "question_id: 20477190" + }, + { + "Answer": "", + "Explanation": "question_id: 14925239" + }, + { + "Answer": "", + "Explanation": "question_id: 11985628" + }, + { + "Answer": "", + "Explanation": "question_id: 9775731" + }, + { + "Answer": "", + "Explanation": "question_id: 364519" + }, + { + "Answer": "", + "Explanation": "question_id: 3061761" + }, + { + "Answer": "", + "Explanation": "question_id: 18724607" + }, + { + "Answer": "", + "Explanation": "question_id: 10406130" + }, + { + "Answer": "", + "Explanation": "question_id: 17315881" + }, + { + "Answer": "", + "Explanation": "question_id: 6420361" + }, + { + "Answer": "", + "Explanation": "question_id: 9590965" + }, + { + "Answer": "", + "Explanation": "question_id: 6677332" + }, + { + "Answer": "", + "Explanation": "question_id: 20576618" + }, + { + "Answer": "", + "Explanation": "question_id: 663171" + }, + { + "Answer": "", + "Explanation": "question_id: 8139797" + }, + { + "Answer": "", + "Explanation": "question_id: 8735312" + }, + { + "Answer": "", + "Explanation": "question_id: 1024847" + }, + { + "Answer": "", + "Explanation": "question_id: 39600161" + }, + { + "Answer": "", + "Explanation": "question_id: 82831" + }, + { + "Answer": "", + "Explanation": "question_id: 2168123" + }, + { + "Answer": "", + "Explanation": "question_id: 12400256" + }, + { + "Answer": "", + "Explanation": "question_id: 1269217" + }, + { + "Answer": "", + "Explanation": "question_id: 10974932" + }, + { + "Answer": "", + "Explanation": "question_id: 89228" + }, + { + "Answer": "", + "Explanation": "question_id: 1179305" + }, + { + "Answer": "", + "Explanation": "question_id: 300445" + }, + { + "Answer": "", + "Explanation": "question_id: 40384599" + }, + { + "Answer": "", + "Explanation": "question_id: 13480031" + }, + { + "Answer": "", + "Explanation": "question_id: 29945684" + }, + { + "Answer": "", + "Explanation": "question_id: 5844672" + }, + { + "Answer": "", + "Explanation": "question_id: 5022066" + }, + { + "Answer": "", + "Explanation": "question_id: 16041405" + }, + { + "Answer": "", + "Explanation": "question_id: 13331419" + }, + { + "Answer": "", + "Explanation": "question_id: 10915391" + }, + { + "Answer": "", + "Explanation": "question_id: 1303243" + }, + { + "Answer": "", + "Explanation": "question_id: 9905471" + }, + { + "Answer": "", + "Explanation": "question_id: 12440342" + }, + { + "Answer": "", + "Explanation": "question_id: 845058" + }, + { + "Answer": "", + "Explanation": "question_id: 37125495" + }, + { + "Answer": "", + "Explanation": "question_id: 41067960" + }, + { + "Answer": "", + "Explanation": "question_id: 4928274" + }, + { + "Answer": "", + "Explanation": "question_id: 2052390" + }, + { + "Answer": "", + "Explanation": "question_id: 5075247" + }, + { + "Answer": "", + "Explanation": "question_id: 2527892" + }, + { + "Answer": "", + "Explanation": "question_id: 4004550" + }, + { + "Answer": "", + "Explanation": "question_id: 42950" + }, + { + "Answer": "", + "Explanation": "question_id: 27146262" + }, + { + "Answer": "", + "Explanation": "question_id: 30787901" + }, + { + "Answer": "", + "Explanation": "question_id: 8425046" + }, + { + "Answer": "", + "Explanation": "question_id: 4383082" + }, + { + "Answer": "", + "Explanation": "question_id: 15286401" + }, + { + "Answer": "", + "Explanation": "question_id: 234512" + }, + { + "Answer": "", + "Explanation": "question_id: 18816297" + }, + { + "Answer": "", + "Explanation": "question_id: 3278850" + }, + { + "Answer": "", + "Explanation": "question_id: 8344905" + }, + { + "Answer": "", + "Explanation": "question_id: 6416131" + }, + { + "Answer": "", + "Explanation": "question_id: 19339" + }, + { + "Answer": "", + "Explanation": "question_id: 899103" + }, + { + "Answer": "", + "Explanation": "question_id: 5280178" + }, + { + "Answer": "", + "Explanation": "question_id: 7253803" + }, + { + "Answer": "", + "Explanation": "question_id: 6280978" + }, + { + "Answer": "", + "Explanation": "question_id: 41923906" + }, + { + "Answer": "", + "Explanation": "question_id: 319426" + }, + { + "Answer": "", + "Explanation": "question_id: 11205386" + }, + { + "Answer": "", + "Explanation": "question_id: 209840" + }, + { + "Answer": "", + "Explanation": "question_id: 1874194" + }, + { + "Answer": "", + "Explanation": "question_id: 12218112" + }, + { + "Answer": "", + "Explanation": "question_id: 6278847" + }, + { + "Answer": "", + "Explanation": "question_id: 7287996" + }, + { + "Answer": "", + "Explanation": "question_id: 22918212" + }, + { + "Answer": "", + "Explanation": "question_id: 14299978" + }, + { + "Answer": "", + "Explanation": "question_id: 10541640" + }, + { + "Answer": "", + "Explanation": "question_id: 510348" + }, + { + "Answer": "", + "Explanation": "question_id: 4484690" + }, + { + "Answer": "", + "Explanation": "question_id: 5858916" + }, + { + "Answer": "", + "Explanation": "question_id: 40639071" + }, + { + "Answer": "", + "Explanation": "question_id: 4906977" + }, + { + "Answer": "", + "Explanation": "question_id: 364621" + }, + { + "Answer": "", + "Explanation": "question_id: 2972212" + }, + { + "Answer": "", + "Explanation": "question_id: 3471999" + }, + { + "Answer": "", + "Explanation": "question_id: 16084642" + }, + { + "Answer": "", + "Explanation": "question_id: 273192" + }, + { + "Answer": "", + "Explanation": "question_id: 638360" + }, + { + "Answer": "", + "Explanation": "question_id: 24189150" + }, + { + "Answer": "", + "Explanation": "question_id: 22412258" + }, + { + "Answer": "", + "Explanation": "question_id: 40582103" + }, + { + "Answer": "", + "Explanation": "question_id: 804995" + }, + { + "Answer": "", + "Explanation": "question_id: 2229827" + }, + { + "Answer": "", + "Explanation": "question_id: 14507794" + }, + { + "Answer": "", + "Explanation": "question_id: 41572822" + }, + { + "Answer": "", + "Explanation": "question_id: 21887754" + }, + { + "Answer": "", + "Explanation": "question_id: 21787496" + }, + { + "Answer": "", + "Explanation": "question_id: 24958010" + }, + { + "Answer": "", + "Explanation": "question_id: 9339630" + }, + { + "Answer": "", + "Explanation": "question_id: 21787496" + }, + { + "Answer": "", + "Explanation": "question_id: 26266362" + }, + { + "Answer": "", + "Explanation": "question_id: 2606976" + }, + { + "Answer": "", + "Explanation": "question_id: 8380389" + }, + { + "Answer": "", + "Explanation": "question_id: 208894" + }, + { + "Answer": "", + "Explanation": "question_id: 53513" + }, + { + "Answer": "", + "Explanation": "question_id: 16772071" + }, + { + "Answer": "", + "Explanation": "question_id: 27457970" + }, + { + "Answer": "", + "Explanation": "question_id: 493386" + }, + { + "Answer": "", + "Explanation": "question_id: 23566515" + }, + { + "Answer": "", + "Explanation": "question_id: 25823608" + }, + { + "Answer": "", + "Explanation": "question_id: 18723580" + }, + { + "Answer": "", + "Explanation": "question_id: 9891814" + }, + { + "Answer": "", + "Explanation": "question_id: 26443308" + }, + { + "Answer": "", + "Explanation": "question_id: 9759820" + }, + { + "Answer": "", + "Explanation": "question_id: 4356842" + }, + { + "Answer": "", + "Explanation": "question_id: 19445682" + }, + { + "Answer": "", + "Explanation": "question_id: 14764126" + }, + { + "Answer": "", + "Explanation": "question_id: 354038" + }, + { + "Answer": "", + "Explanation": "question_id: 3108285" + }, + { + "Answer": "", + "Explanation": "question_id: 6310475" + }, + { + "Answer": "", + "Explanation": "question_id: 19156472" + }, + { + "Answer": "", + "Explanation": "question_id: 39600161" + }, + { + "Answer": "", + "Explanation": "question_id: 19664253" + }, + { + "Answer": "", + "Explanation": "question_id: 13655392" + }, + { + "Answer": "", + "Explanation": "question_id: 3059301" + }, + { + "Answer": "", + "Explanation": "question_id: 7026131" + }, + { + "Answer": "", + "Explanation": "question_id: 364519" + }, + { + "Answer": "", + "Explanation": "question_id: 10666163" + }, + { + "Answer": "", + "Explanation": "question_id: 8751653" + }, + { + "Answer": "", + "Explanation": "question_id: 3984539" + }, + { + "Answer": "", + "Explanation": "question_id: 30015665" + }, + { + "Answer": "", + "Explanation": "question_id: 14411633" + }, + { + "Answer": "", + "Explanation": "question_id: 373459" + }, + { + "Answer": "", + "Explanation": "question_id: 20950650" + }, + { + "Answer": "", + "Explanation": "question_id: 17223174" + }, + { + "Answer": "", + "Explanation": "question_id: 455612" + }, + { + "Answer": "", + "Explanation": "question_id: 19365513" + }, + { + "Answer": "", + "Explanation": "question_id: 969285" + }, + { + "Answer": "", + "Explanation": "question_id: 32996293" + }, + { + "Answer": "", + "Explanation": "question_id: 931092" + }, + { + "Answer": "", + "Explanation": "question_id: 4810537" + }, + { + "Answer": "", + "Explanation": "question_id: 367155" + }, + { + "Answer": "", + "Explanation": "question_id: 13704860" + }, + { + "Answer": "", + "Explanation": "question_id: 3252590" + }, + { + "Answer": "", + "Explanation": "question_id: 10998621" + }, + { + "Answer": "", + "Explanation": "question_id: 940822" + }, + { + "Answer": "", + "Explanation": "question_id: 13999850" + }, + { + "Answer": "", + "Explanation": "question_id: 498106" + }, + { + "Answer": "", + "Explanation": "question_id: 18897261" + }, + { + "Answer": "", + "Explanation": "question_id: 10974932" + }, + { + "Answer": "", + "Explanation": "question_id: 26720916" + }, + { + "Answer": "", + "Explanation": "question_id: 11219949" + }, + { + "Answer": "", + "Explanation": "question_id: 27946742" + }, + { + "Answer": "", + "Explanation": "question_id: 3895874" + }, + { + "Answer": "", + "Explanation": "question_id: 31767173" + }, + { + "Answer": "", + "Explanation": "question_id: 23931444" + }, + { + "Answer": "", + "Explanation": "question_id: 41178532" + }, + { + "Answer": "", + "Explanation": "question_id: 30062429" + }, + { + "Answer": "", + "Explanation": "question_id: 16436133" + }, + { + "Answer": "", + "Explanation": "question_id: 3877491" + }, + { + "Answer": "", + "Explanation": "question_id: 13496087" + }, + { + "Answer": "", + "Explanation": "question_id: 3931541" + }, + { + "Answer": "", + "Explanation": "question_id: 2984751" + }, + { + "Answer": "", + "Explanation": "question_id: 209513" + }, + { + "Answer": "", + "Explanation": "question_id: 237079" + }, + { + "Answer": "", + "Explanation": "question_id: 1683775" + }, + { + "Answer": "", + "Explanation": "question_id: 17109608" + }, + { + "Answer": "", + "Explanation": "question_id: 3437059" + }, + { + "Answer": "", + "Explanation": "question_id: 2636755" + }, + { + "Answer": "", + "Explanation": "question_id: 12572362" + }, + { + "Answer": "", + "Explanation": "question_id: 9304408" + }, + { + "Answer": "", + "Explanation": "question_id: 4484690" + }, + { + "Answer": "", + "Explanation": "question_id: 3501382" + }, + { + "Answer": "", + "Explanation": "question_id: 4302027" + }, + { + "Answer": "", + "Explanation": "question_id: 4490961" + }, + { + "Answer": "", + "Explanation": "question_id: 613183" + }, + { + "Answer": "", + "Explanation": "question_id: 1885181" + }, + { + "Answer": "", + "Explanation": "question_id: 627435" + }, + { + "Answer": "", + "Explanation": "question_id: 6633523" + }, + { + "Answer": "", + "Explanation": "question_id: 2553354" + }, + { + "Answer": "", + "Explanation": "question_id: 3548673" + }, + { + "Answer": "", + "Explanation": "question_id: 983354" + }, + { + "Answer": "", + "Explanation": "question_id: 7270321" + }, + { + "Answer": "", + "Explanation": "question_id: 23887592" + }, + { + "Answer": "", + "Explanation": "question_id: 31258561" + }, + { + "Answer": "", + "Explanation": "question_id: 12765833" + }, + { + "Answer": "", + "Explanation": "question_id: 4174941" + }, + { + "Answer": "", + "Explanation": "question_id: 15247628" + }, + { + "Answer": "", + "Explanation": "question_id: 7371935" + }, + { + "Answer": "", + "Explanation": "question_id: 22187233" + }, + { + "Answer": "", + "Explanation": "question_id: 4710067" + }, + { + "Answer": "", + "Explanation": "question_id: 843277" + }, + { + "Answer": "", + "Explanation": "question_id: 123198" + }, + { + "Answer": "", + "Explanation": "question_id: 32458541" + }, + { + "Answer": "", + "Explanation": "question_id: 674519" + }, + { + "Answer": "", + "Explanation": "question_id: 3559559" + }, + { + "Answer": "", + "Explanation": "question_id: 13384841" + }, + { + "Answer": "", + "Explanation": "question_id: 19410585" + }, + { + "Answer": "", + "Explanation": "question_id: 299446" + }, + { + "Answer": "", + "Explanation": "question_id: 761804" + }, + { + "Answer": "", + "Explanation": "question_id: 5201191" + }, + { + "Answer": "", + "Explanation": "question_id: 2621674" + }, + { + "Answer": "", + "Explanation": "question_id: 5577501" + }, + { + "Answer": "", + "Explanation": "question_id: 39373620" + }, + { + "Answer": "", + "Explanation": "question_id: 4843173" + }, + { + "Answer": "", + "Explanation": "question_id: 1038824" + }, + { + "Answer": "", + "Explanation": "question_id: 1476" + }, + { + "Answer": "", + "Explanation": "question_id: 13324554" + }, + { + "Answer": "", + "Explanation": "question_id: 10020591" + }, + { + "Answer": "", + "Explanation": "question_id: 12300912" + }, + { + "Answer": "", + "Explanation": "question_id: 1547733" + }, + { + "Answer": "", + "Explanation": "question_id: 7351270" + }, + { + "Answer": "", + "Explanation": "question_id: 12692135" + }, + { + "Answer": "", + "Explanation": "question_id: 31676133" + }, + { + "Answer": "", + "Explanation": "question_id: 11303225" + }, + { + "Answer": "", + "Explanation": "question_id: 5137497" + }, + { + "Answer": "", + "Explanation": "question_id: 6612769" + }, + { + "Answer": "", + "Explanation": "question_id: 1614236" + }, + { + "Answer": "", + "Explanation": "question_id: 7284952" + }, + { + "Answer": "", + "Explanation": "question_id: 10624937" + }, + { + "Answer": "", + "Explanation": "question_id: 1874194" + }, + { + "Answer": "", + "Explanation": "question_id: 27589325" + }, + { + "Answer": "", + "Explanation": "question_id: 1747817" + }, + { + "Answer": "", + "Explanation": "question_id: 983855" + }, + { + "Answer": "", + "Explanation": "question_id: 2233917" + }, + { + "Answer": "", + "Explanation": "question_id: 8081545" + }, + { + "Answer": "", + "Explanation": "question_id: 930397" + }, + { + "Answer": "", + "Explanation": "question_id: 29218750" + }, + { + "Answer": "", + "Explanation": "question_id: 41552839" + }, + { + "Answer": "", + "Explanation": "question_id: 16050952" + }, + { + "Answer": "", + "Explanation": "question_id: 817122" + }, + { + "Answer": "", + "Explanation": "question_id: 8247792" + }, + { + "Answer": "", + "Explanation": "question_id: 5744980" + }, + { + "Answer": "", + "Explanation": "question_id: 39373620" + }, + { + "Answer": "", + "Explanation": "question_id: 9962293" + }, + { + "Answer": "", + "Explanation": "question_id: 7946798" + }, + { + "Answer": "", + "Explanation": "question_id: 34410358" + }, + { + "Answer": "", + "Explanation": "question_id: 15666169" + }, + { + "Answer": "", + "Explanation": "question_id: 209513" + }, + { + "Answer": "", + "Explanation": "question_id: 3494906" + }, + { + "Answer": "", + "Explanation": "question_id: 12492137" + }, + { + "Answer": "", + "Explanation": "question_id: 6569528" + }, + { + "Answer": "", + "Explanation": "question_id: 5106228" + }, + { + "Answer": "", + "Explanation": "question_id: 5137497" + }, + { + "Answer": "", + "Explanation": "question_id: 6532881" + }, + { + "Answer": "", + "Explanation": "question_id: 28986489" + }, + { + "Answer": "", + "Explanation": "question_id: 7164679" + }, + { + "Answer": "", + "Explanation": "question_id: 23887881" + }, + { + "Answer": "", + "Explanation": "question_id: 4842956" + }, + { + "Answer": "", + "Explanation": "question_id: 13496087" + }, + { + "Answer": "", + "Explanation": "question_id: 227459" + }, + { + "Answer": "", + "Explanation": "question_id: 1749466" + }, + { + "Answer": "", + "Explanation": "question_id: 30190459" + }, + { + "Answer": "", + "Explanation": "question_id: 10264618" + }, + { + "Answer": "", + "Explanation": "question_id: 783897" + }, + { + "Answer": "", + "Explanation": "question_id: 4172131" + }, + { + "Answer": "", + "Explanation": "question_id: 30605909" + }, + { + "Answer": "", + "Explanation": "question_id: 931092" + }, + { + "Answer": "", + "Explanation": "question_id: 1790520" + }, + { + "Answer": "", + "Explanation": "question_id: 11269575" + }, + { + "Answer": "", + "Explanation": "question_id: 15392730" + }, + { + "Answer": "", + "Explanation": "question_id: 319426" + }, + { + "Answer": "", + "Explanation": "question_id: 2150739" + }, + { + "Answer": "", + "Explanation": "question_id: 18637651" + }, + { + "Answer": "", + "Explanation": "question_id: 1249786" + }, + { + "Answer": "", + "Explanation": "question_id: 28207743" + }, + { + "Answer": "", + "Explanation": "question_id: 1547733" + }, + { + "Answer": "", + "Explanation": "question_id: 1949318" + }, + { + "Answer": "", + "Explanation": "question_id: 23638638" + }, + { + "Answer": "", + "Explanation": "question_id: 13438574" + }, + { + "Answer": "", + "Explanation": "question_id: 861190" + }, + { + "Answer": "", + "Explanation": "question_id: 42458734" + }, + { + "Answer": "", + "Explanation": "question_id: 5868374" + }, + { + "Answer": "", + "Explanation": "question_id: 1823058" + }, + { + "Answer": "", + "Explanation": "question_id: 13070461" + }, + { + "Answer": "", + "Explanation": "question_id: 674519" + }, + { + "Answer": "", + "Explanation": "question_id: 12330522" + }, + { + "Answer": "", + "Explanation": "question_id: 22676" + }, + { + "Answer": "", + "Explanation": "question_id: 20048987" + }, + { + "Answer": "", + "Explanation": "question_id: 14332141" + }, + { + "Answer": "", + "Explanation": "question_id: 42098487" + }, + { + "Answer": "", + "Explanation": "question_id: 843277" + }, + { + "Answer": "", + "Explanation": "question_id: 627435" + }, + { + "Answer": "", + "Explanation": "question_id: 9336270" + }, + { + "Answer": "", + "Explanation": "question_id: 1476" + }, + { + "Answer": "", + "Explanation": "question_id: 23797491" + }, + { + "Answer": "", + "Explanation": "question_id: 1810743" + }, + { + "Answer": "", + "Explanation": "question_id: 21212706" + }, + { + "Answer": "", + "Explanation": "question_id: 1949318" + }, + { + "Answer": "", + "Explanation": "question_id: 8751653" + }, + { + "Answer": "", + "Explanation": "question_id: 275018" + }, + { + "Answer": "", + "Explanation": "question_id: 16374540" + }, + { + "Answer": "", + "Explanation": "question_id: 31818050" + }, + { + "Answer": "", + "Explanation": "question_id: 11692613" + }, + { + "Answer": "", + "Explanation": "question_id: 8704952" + }, + { + "Answer": "", + "Explanation": "question_id: 11619169" + }, + { + "Answer": "", + "Explanation": "question_id: 22245171" + }, + { + "Answer": "", + "Explanation": "question_id: 30628176" + }, + { + "Answer": "", + "Explanation": "question_id: 30766151" + }, + { + "Answer": "", + "Explanation": "question_id: 364519" + }, + { + "Answer": "", + "Explanation": "question_id: 3877491" + }, + { + "Answer": "", + "Explanation": "question_id: 22128218" + }, + { + "Answer": "", + "Explanation": "question_id: 3464359" + }, + { + "Answer": "", + "Explanation": "question_id: 9354127" + }, + { + "Answer": "", + "Explanation": "question_id: 10487278" + }, + { + "Answer": "", + "Explanation": "question_id: 9621388" + }, + { + "Answer": "", + "Explanation": "question_id: 237079" + }, + { + "Answer": "", + "Explanation": "question_id: 18990069" + }, + { + "Answer": "", + "Explanation": "question_id: 29696641" + }, + { + "Answer": "", + "Explanation": "question_id: 5826427" + }, + { + "Answer": "", + "Explanation": "question_id: 3743222" + }, + { + "Answer": "", + "Explanation": "question_id: 40313203" + }, + { + "Answer": "", + "Explanation": "question_id: 13081090" + }, + { + "Answer": "", + "Explanation": "question_id: 6996603" + }, + { + "Answer": "", + "Explanation": "question_id: 372102" + }, + { + "Answer": "", + "Explanation": "question_id: 14182339" + }, + { + "Answer": "", + "Explanation": "question_id: 3294889" + }, + { + "Answer": "", + "Explanation": "question_id: 42172204" + }, + { + "Answer": "", + "Explanation": "question_id: 674764" + }, + { + "Answer": "", + "Explanation": "question_id: 16962512" + }, + { + "Answer": "", + "Explanation": "question_id: 34527388" + }, + { + "Answer": "", + "Explanation": "question_id: 8122079" + }, + { + "Answer": "", + "Explanation": "question_id: 2407398" + }, + { + "Answer": "", + "Explanation": "question_id: 11264005" + }, + { + "Answer": "", + "Explanation": "question_id: 13042013" + }, + { + "Answer": "", + "Explanation": "question_id: 1196074" + }, + { + "Answer": "", + "Explanation": "question_id: 2331943" + }, + { + "Answer": "", + "Explanation": "question_id: 19618912" + }, + { + "Answer": "", + "Explanation": "question_id: 24242433" + }, + { + "Answer": "", + "Explanation": "question_id: 674764" + }, + { + "Answer": "", + "Explanation": "question_id: 17038639" + }, + { + "Answer": "", + "Explanation": "question_id: 23351183" + }, + { + "Answer": "", + "Explanation": "question_id: 120656" + }, + { + "Answer": "", + "Explanation": "question_id: 8916302" + }, + { + "Answer": "", + "Explanation": "question_id: 11816315" + }, + { + "Answer": "", + "Explanation": "question_id: 6996603" + }, + { + "Answer": "", + "Explanation": "question_id: 22676" + }, + { + "Answer": "", + "Explanation": "question_id: 42387471" + }, + { + "Answer": "", + "Explanation": "question_id: 38549915" + }, + { + "Answer": "", + "Explanation": "question_id: 35097130" + }, + { + "Answer": "", + "Explanation": "question_id: 2587402" + }, + { + "Answer": "", + "Explanation": "question_id: 8519599" + }, + { + "Answer": "", + "Explanation": "question_id: 20986631" + }, + { + "Answer": "", + "Explanation": "question_id: 17713873" + }, + { + "Answer": "", + "Explanation": "question_id: 11530799" + }, + { + "Answer": "", + "Explanation": "question_id: 2075128" + }, + { + "Answer": "", + "Explanation": "question_id: 402504" + }, + { + "Answer": "", + "Explanation": "question_id: 2052390" + }, + { + "Answer": "", + "Explanation": "question_id: 2191699" + }, + { + "Answer": "", + "Explanation": "question_id: 20062565" + }, + { + "Answer": "", + "Explanation": "question_id: 41946927" + }, + { + "Answer": "", + "Explanation": "question_id: 3940128" + }, + { + "Answer": "", + "Explanation": "question_id: 7125009" + }, + { + "Answer": "", + "Explanation": "question_id: 3735814" + }, + { + "Answer": "", + "Explanation": "question_id: 931092" + }, + { + "Answer": "", + "Explanation": "question_id: 35269374" + }, + { + "Answer": "", + "Explanation": "question_id: 15457504" + }, + { + "Answer": "", + "Explanation": "question_id: 275018" + }, + { + "Answer": "", + "Explanation": "question_id: 677656" + }, + { + "Answer": "", + "Explanation": "question_id: 40384599" + }, + { + "Answer": "", + "Explanation": "question_id: 31247198" + }, + { + "Answer": "", + "Explanation": "question_id: 9746522" + }, + { + "Answer": "", + "Explanation": "question_id: 1546226" + }, + { + "Answer": "", + "Explanation": "question_id: 4143502" + }, + { + "Answer": "", + "Explanation": "question_id: 41513324" + }, + { + "Answer": "", + "Explanation": "question_id: 2597099" + }, + { + "Answer": "", + "Explanation": "question_id: 7503241" + }, + { + "Answer": "", + "Explanation": "question_id: 30026815" + }, + { + "Answer": "", + "Explanation": "question_id: 8172861" + }, + { + "Answer": "", + "Explanation": "question_id: 3933478" + }, + { + "Answer": "", + "Explanation": "question_id: 4302027" + }, + { + "Answer": "", + "Explanation": "question_id: 17071871" + }, + { + "Answer": "", + "Explanation": "question_id: 1555968" + }, + { + "Answer": "", + "Explanation": "question_id: 14299978" + }, + { + "Answer": "", + "Explanation": "question_id: 852055" + }, + { + "Answer": "", + "Explanation": "question_id: 6900955" + }, + { + "Answer": "", + "Explanation": "question_id: 4800811" + }, + { + "Answer": "", + "Explanation": "question_id: 13078751" + }, + { + "Answer": "", + "Explanation": "question_id: 13905936" + }, + { + "Answer": "", + "Explanation": "question_id: 3964681" + }, + { + "Answer": "", + "Explanation": "question_id: 17757450" + }, + { + "Answer": "", + "Explanation": "question_id: 18663644" + }, + { + "Answer": "", + "Explanation": "question_id: 3523048" + }, + { + "Answer": "", + "Explanation": "question_id: 7717380" + }, + { + "Answer": "", + "Explanation": "question_id: 2721782" + }, + { + "Answer": "", + "Explanation": "question_id: 518021" + }, + { + "Answer": "", + "Explanation": "question_id: 123198" + }, + { + "Answer": "", + "Explanation": "question_id: 4111412" + }, + { + "Answer": "", + "Explanation": "question_id: 258746" + }, + { + "Answer": "", + "Explanation": "question_id: 2600191" + }, + { + "Answer": "", + "Explanation": "question_id: 1949318" + }, + { + "Answer": "", + "Explanation": "question_id: 3518778" + }, + { + "Answer": "", + "Explanation": "question_id: 22229255" + }, + { + "Answer": "", + "Explanation": "question_id: 12337583" + }, + { + "Answer": "", + "Explanation": "question_id: 3724551" + }, + { + "Answer": "", + "Explanation": "question_id: 11430863" + }, + { + "Answer": "", + "Explanation": "question_id: 15096021" + }, + { + "Answer": "", + "Explanation": "question_id: 1386811" + }, + { + "Answer": "", + "Explanation": "question_id: 17895835" + }, + { + "Answer": "", + "Explanation": "question_id: 8177079" + }, + { + "Answer": "", + "Explanation": "question_id: 25540259" + }, + { + "Answer": "", + "Explanation": "question_id: 40707158" + }, + { + "Answer": "", + "Explanation": "question_id: 6378889" + }, + { + "Answer": "", + "Explanation": "question_id: 14694482" + }, + { + "Answer": "", + "Explanation": "question_id: 3777301" + }, + { + "Answer": "", + "Explanation": "question_id: 10973614" + }, + { + "Answer": "", + "Explanation": "question_id: 402504" + }, + { + "Answer": "", + "Explanation": "question_id: 30483977" + }, + { + "Answer": "", + "Explanation": "question_id: 1024847" + }, + { + "Answer": "", + "Explanation": "question_id: 3939361" + }, + { + "Answer": "", + "Explanation": "question_id: 8306171" + }, + { + "Answer": "", + "Explanation": "question_id: 899103" + }, + { + "Answer": "", + "Explanation": "question_id: 82831" + }, + { + "Answer": "", + "Explanation": "question_id: 402504" + }, + { + "Answer": "", + "Explanation": "question_id: 1270951" + }, + { + "Answer": "", + "Explanation": "question_id: 40660956" + }, + { + "Answer": "", + "Explanation": "question_id: 716477" + }, + { + "Answer": "", + "Explanation": "question_id: 21558999" + }, + { + "Answer": "", + "Explanation": "question_id: 14358567" + }, + { + "Answer": "", + "Explanation": "question_id: 29703793" + }, + { + "Answer": "", + "Explanation": "question_id: 39112645" + }, + { + "Answer": "", + "Explanation": "question_id: 23914774" + }, + { + "Answer": "", + "Explanation": "question_id: 9743134" + }, + { + "Answer": "", + "Explanation": "question_id: 13156395" + }, + { + "Answer": "", + "Explanation": "question_id: 627435" + }, + { + "Answer": "", + "Explanation": "question_id: 7658932" + }, + { + "Answer": "", + "Explanation": "question_id: 3925465" + }, + { + "Answer": "", + "Explanation": "question_id: 35837346" + }, + { + "Answer": "", + "Explanation": "question_id: 18142090" + }, + { + "Answer": "", + "Explanation": "question_id: 14745022" + }, + { + "Answer": "", + "Explanation": "question_id: 37619348" + }, + { + "Answer": "", + "Explanation": "question_id: 273192" + }, + { + "Answer": "", + "Explanation": "question_id: 2600191" + }, + { + "Answer": "", + "Explanation": "question_id: 4299741" + }, + { + "Answer": "", + "Explanation": "question_id: 18990069" + }, + { + "Answer": "", + "Explanation": "question_id: 2612802" + }, + { + "Answer": "", + "Explanation": "question_id: 39277638" + }, + { + "Answer": "", + "Explanation": "question_id: 2052390" + }, + { + "Answer": "", + "Explanation": "question_id: 33711985" + }, + { + "Answer": "", + "Explanation": "question_id: 29370211" + }, + { + "Answer": "", + "Explanation": "question_id: 4800419" + }, + { + "Answer": "", + "Explanation": "question_id: 610883" + }, + { + "Answer": "", + "Explanation": "question_id: 13303100" + }, + { + "Answer": "", + "Explanation": "question_id: 35707224" + }, + { + "Answer": "", + "Explanation": "question_id: 18524642" + }, + { + "Answer": "", + "Explanation": "question_id: 7571635" + }, + { + "Answer": "", + "Explanation": "question_id: 39268928" + }, + { + "Answer": "", + "Explanation": "question_id: 3392354" + }, + { + "Answer": "", + "Explanation": "question_id: 9573244" + }, + { + "Answer": "", + "Explanation": "question_id: 14750675" + }, + { + "Answer": "", + "Explanation": "question_id: 26441253" + }, + { + "Answer": "", + "Explanation": "question_id: 40498088" + }, + { + "Answer": "", + "Explanation": "question_id: 319426" + }, + { + "Answer": "", + "Explanation": "question_id: 32296933" + }, + { + "Answer": "", + "Explanation": "question_id: 31143732" + }, + { + "Answer": "", + "Explanation": "question_id: 27318022" + }, + { + "Answer": "", + "Explanation": "question_id: 4530069" + }, + { + "Answer": "", + "Explanation": "question_id: 761804" + }, + { + "Answer": "", + "Explanation": "question_id: 10472907" + }, + { + "Answer": "", + "Explanation": "question_id: 14465279" + }, + { + "Answer": "", + "Explanation": "question_id: 17141558" + }, + { + "Answer": "", + "Explanation": "question_id: 15210485" + }, + { + "Answer": "", + "Explanation": "question_id: 7794208" + }, + { + "Answer": "", + "Explanation": "question_id: 364621" + }, + { + "Answer": "", + "Explanation": "question_id: 39870642" + }, + { + "Answer": "", + "Explanation": "question_id: 30357276" + }, + { + "Answer": "", + "Explanation": "question_id: 29218750" + }, + { + "Answer": "", + "Explanation": "question_id: 627435" + }, + { + "Answer": "", + "Explanation": "question_id: 3476732" + }, + { + "Answer": "", + "Explanation": "question_id: 31818050" + }, + { + "Answer": "", + "Explanation": "question_id: 761804" + }, + { + "Answer": "", + "Explanation": "question_id: 4668619" + }, + { + "Answer": "", + "Explanation": "question_id: 9534608" + }, + { + "Answer": "", + "Explanation": "question_id: 613183" + }, + { + "Answer": "", + "Explanation": "question_id: 17846545" + }, + { + "Answer": "", + "Explanation": "question_id: 20796355" + }, + { + "Answer": "", + "Explanation": "question_id: 1010961" + }, + { + "Answer": "", + "Explanation": "question_id: 533398" + }, + { + "Answer": "", + "Explanation": "question_id: 6879364" + }, + { + "Answer": "", + "Explanation": "question_id: 510348" + }, + { + "Answer": "", + "Explanation": "question_id: 40744328" + }, + { + "Answer": "", + "Explanation": "question_id: 13079852" + }, + { + "Answer": "", + "Explanation": "question_id: 11850425" + }, + { + "Answer": "", + "Explanation": "question_id: 25817930" + }, + { + "Answer": "", + "Explanation": "question_id: 14743454" + }, + { + "Answer": "", + "Explanation": "question_id: 14162026" + }, + { + "Answer": "", + "Explanation": "question_id: 10664430" + }, + { + "Answer": "", + "Explanation": "question_id: 17426386" + }, + { + "Answer": "", + "Explanation": "question_id: 25355705" + }, + { + "Answer": "", + "Explanation": "question_id: 930397" + }, + { + "Answer": "", + "Explanation": "question_id: 34155829" + }, + { + "Answer": "", + "Explanation": "question_id: 8303993" + }, + { + "Answer": "", + "Explanation": "question_id: 4170655" + }, + { + "Answer": "", + "Explanation": "question_id: 3731426" + }, + { + "Answer": "", + "Explanation": "question_id: 31818050" + }, + { + "Answer": "", + "Explanation": "question_id: 4476373" + }, + { + "Answer": "", + "Explanation": "question_id: 13838405" + }, + { + "Answer": "", + "Explanation": "question_id: 19973489" + }, + { + "Answer": "", + "Explanation": "question_id: 32996293" + }, + { + "Answer": "", + "Explanation": "question_id: 89228" + }, + { + "Answer": "", + "Explanation": "question_id: 16127862" + }, + { + "Answer": "", + "Explanation": "question_id: 13550423" + }, + { + "Answer": "", + "Explanation": "question_id: 6696027" + }, + { + "Answer": "", + "Explanation": "question_id: 2847272" + }, + { + "Answer": "", + "Explanation": "question_id: 17462994" + }, + { + "Answer": "", + "Explanation": "question_id: 9647586" + }, + { + "Answer": "", + "Explanation": "question_id: 247770" + }, + { + "Answer": "", + "Explanation": "question_id: 5285181" + }, + { + "Answer": "", + "Explanation": "question_id: 26727314" + }, + { + "Answer": "", + "Explanation": "question_id: 72899" + }, + { + "Answer": "", + "Explanation": "question_id: 5508352" + }, + { + "Answer": "", + "Explanation": "question_id: 3809265" + }, + { + "Answer": "", + "Explanation": "question_id: 15103484" + }, + { + "Answer": "", + "Explanation": "question_id: 12307099" + }, + { + "Answer": "", + "Explanation": "question_id: 364621" + }, + { + "Answer": "", + "Explanation": "question_id: 2317134" + }, + { + "Answer": "", + "Explanation": "question_id: 638048" + }, + { + "Answer": "", + "Explanation": "question_id: 2040038" + }, + { + "Answer": "", + "Explanation": "question_id: 10271484" + }, + { + "Answer": "", + "Explanation": "question_id: 26367812" + }, + { + "Answer": "", + "Explanation": "question_id: 1031851" + }, + { + "Answer": "", + "Explanation": "question_id: 3501382" + }, + { + "Answer": "", + "Explanation": "question_id: 51520" + }, + { + "Answer": "", + "Explanation": "question_id: 26897536" + }, + { + "Answer": "", + "Explanation": "question_id: 3487377" + }, + { + "Answer": "", + "Explanation": "question_id: 2150739" + }, + { + "Answer": "", + "Explanation": "question_id: 34705205" + }, + { + "Answer": "", + "Explanation": "question_id: 7271482" + }, + { + "Answer": "", + "Explanation": "question_id: 11533274" + }, + { + "Answer": "", + "Explanation": "question_id: 10824319" + }, + { + "Answer": "", + "Explanation": "question_id: 35427814" + }, + { + "Answer": "", + "Explanation": "question_id: 18292500" + }, + { + "Answer": "", + "Explanation": "question_id: 2917372" + }, + { + "Answer": "", + "Explanation": "question_id: 14538885" + }, + { + "Answer": "", + "Explanation": "question_id: 20375561" + }, + { + "Answer": "", + "Explanation": "question_id: 35561743" + }, + { + "Answer": "", + "Explanation": "question_id: 19100540" + }, + { + "Answer": "", + "Explanation": "question_id: 14764126" + }, + { + "Answer": "", + "Explanation": "question_id: 2354166" + }, + { + "Answer": "", + "Explanation": "question_id: 11692613" + }, + { + "Answer": "", + "Explanation": "question_id: 6618515" + }, + { + "Answer": "", + "Explanation": "question_id: 1207457" + }, + { + "Answer": "", + "Explanation": "question_id: 11219949" + }, + { + "Answer": "", + "Explanation": "question_id: 8386675" + }, + { + "Answer": "", + "Explanation": "question_id: 19617355" + }, + { + "Answer": "", + "Explanation": "question_id: 9012008" + }, + { + "Answer": "", + "Explanation": "question_id: 4605439" + }, + { + "Answer": "", + "Explanation": "question_id: 13636592" + }, + { + "Answer": "", + "Explanation": "question_id: 10618586" + }, + { + "Answer": "", + "Explanation": "question_id: 2052390" + }, + { + "Answer": "", + "Explanation": "question_id: 10668585" + }, + { + "Answer": "", + "Explanation": "question_id: 5503925" + }, + { + "Answer": "", + "Explanation": "question_id: 3743222" + }, + { + "Answer": "", + "Explanation": "question_id: 6504200" + }, + { + "Answer": "", + "Explanation": "question_id: 36113747" + }, + { + "Answer": "", + "Explanation": "question_id: 1450393" + }, + { + "Answer": "", + "Explanation": "question_id: 14435268" + }, + { + "Answer": "", + "Explanation": "question_id: 6250046" + }, + { + "Answer": "", + "Explanation": "question_id: 21414159" + }, + { + "Answer": "", + "Explanation": "question_id: 12141150" + }, + { + "Answer": "", + "Explanation": "question_id: 3059301" + }, + { + "Answer": "", + "Explanation": "question_id: 2612802" + }, + { + "Answer": "", + "Explanation": "question_id: 18711384" + }, + { + "Answer": "", + "Explanation": "question_id: 29471884" + }, + { + "Answer": "", + "Explanation": "question_id: 930865" + }, + { + "Answer": "", + "Explanation": "question_id: 364621" + }, + { + "Answer": "", + "Explanation": "question_id: 8691311" + }, + { + "Answer": "", + "Explanation": "question_id: 7142227" + }, + { + "Answer": "", + "Explanation": "question_id: 6323296" + }, + { + "Answer": "", + "Explanation": "question_id: 14043934" + }, + { + "Answer": "", + "Explanation": "question_id: 28253102" + }, + { + "Answer": "", + "Explanation": "question_id: 8687018" + }, + { + "Answer": "", + "Explanation": "question_id: 952914" + }, + { + "Answer": "", + "Explanation": "question_id: 16566069" + }, + { + "Answer": "", + "Explanation": "question_id: 2793324" + }, + { + "Answer": "", + "Explanation": "question_id: 9560207" + }, + { + "Answer": "", + "Explanation": "question_id: 3090175" + }, + { + "Answer": "", + "Explanation": "question_id: 8337004" + }, + { + "Answer": "", + "Explanation": "question_id: 17106819" + }, + { + "Answer": "", + "Explanation": "question_id: 10078470" + }, + { + "Answer": "", + "Explanation": "question_id: 42731970" + }, + { + "Answer": "", + "Explanation": "question_id: 2052390" + }, + { + "Answer": "", + "Explanation": "question_id: 209513" + }, + { + "Answer": "", + "Explanation": "question_id: 16387069" + }, + { + "Answer": "", + "Explanation": "question_id: 13353233" + }, + { + "Answer": "", + "Explanation": "question_id: 12808420" + }, + { + "Answer": "", + "Explanation": "question_id: 432842" + }, + { + "Answer": "", + "Explanation": "question_id: 16888888" + }, + { + "Answer": "", + "Explanation": "question_id: 27175400" + }, + { + "Answer": "", + "Explanation": "question_id: 29881993" + }, + { + "Answer": "", + "Explanation": "question_id: 3940128" + }, + { + "Answer": "", + "Explanation": "question_id: 817122" + }, + { + "Answer": "", + "Explanation": "question_id: 1966207" + }, + { + "Answer": "", + "Explanation": "question_id: 16874598" + }, + { + "Answer": "", + "Explanation": "question_id: 817087" + }, + { + "Answer": "", + "Explanation": "question_id: 17498027" + }, + { + "Answer": "", + "Explanation": "question_id: 3925614" + }, + { + "Answer": "", + "Explanation": "question_id: 4741537" + }, + { + "Answer": "", + "Explanation": "question_id: 1807026" + }, + { + "Answer": "", + "Explanation": "question_id: 12168648" + }, + { + "Answer": "", + "Explanation": "question_id: 16658068" + }, + { + "Answer": "", + "Explanation": "question_id: 902408" + }, + { + "Answer": "", + "Explanation": "question_id: 4618373" + }, + { + "Answer": "", + "Explanation": "question_id: 38708621" + }, + { + "Answer": "", + "Explanation": "question_id: 30747705" + }, + { + "Answer": "", + "Explanation": "question_id: 455612" + }, + { + "Answer": "", + "Explanation": "question_id: 4641765" + }, + { + "Answer": "", + "Explanation": "question_id: 2783079" + }, + { + "Answer": "", + "Explanation": "question_id: 10632111" + }, + { + "Answer": "", + "Explanation": "question_id: 25474338" + }, + { + "Answer": "", + "Explanation": "question_id: 73663" + }, + { + "Answer": "", + "Explanation": "question_id: 29454773" + }, + { + "Answer": "", + "Explanation": "question_id: 962619" + }, + { + "Answer": "", + "Explanation": "question_id: 13368659" + }, + { + "Answer": "", + "Explanation": "question_id: 14104778" + }, + { + "Answer": "", + "Explanation": "question_id: 104420" + }, + { + "Answer": "", + "Explanation": "question_id: 7522533" + }, + { + "Answer": "", + "Explanation": "question_id: 8586738" + }, + { + "Answer": "", + "Explanation": "question_id: 7271482" + }, + { + "Answer": "", + "Explanation": "question_id: 2597932" + }, + { + "Answer": "", + "Explanation": "question_id: 13728486" + }, + { + "Answer": "", + "Explanation": "question_id: 15455388" + }, + { + "Answer": "", + "Explanation": "question_id: 2637760" + }, + { + "Answer": "", + "Explanation": "question_id: 961632" + }, + { + "Answer": "", + "Explanation": "question_id: 5577501" + }, + { + "Answer": "", + "Explanation": "question_id: 11533274" + }, + { + "Answer": "", + "Explanation": "question_id: 7961363" + }, + { + "Answer": "", + "Explanation": "question_id: 2600191" + }, + { + "Answer": "", + "Explanation": "question_id: 4383571" + }, + { + "Answer": "", + "Explanation": "question_id: 82831" + }, + { + "Answer": "", + "Explanation": "question_id: 26640145" + }, + { + "Answer": "", + "Explanation": "question_id: 11811392" + }, + { + "Answer": "", + "Explanation": "question_id: 1773805" + }, + { + "Answer": "", + "Explanation": "question_id: 4476373" + }, + { + "Answer": "", + "Explanation": "question_id: 10697757" + }, + { + "Answer": "", + "Explanation": "question_id: 674764" + }, + { + "Answer": "", + "Explanation": "question_id: 31547657" + }, + { + "Answer": "", + "Explanation": "question_id: 16128833" + }, + { + "Answer": "", + "Explanation": "question_id: 14442636" + }, + { + "Answer": "", + "Explanation": "question_id: 4934806" + }, + { + "Answer": "", + "Explanation": "question_id: 4906977" + }, + { + "Answer": "", + "Explanation": "question_id: 2077897" + }, + { + "Answer": "", + "Explanation": "question_id: 20206615" + }, + { + "Answer": "", + "Explanation": "question_id: 415511" + }, + { + "Answer": "", + "Explanation": "question_id: 17794266" + }, + { + "Answer": "", + "Explanation": "question_id: 663171" + }, + { + "Answer": "", + "Explanation": "question_id: 775296" + }, + { + "Answer": "", + "Explanation": "question_id: 14793098" + }, + { + "Answer": "", + "Explanation": "question_id: 9427163" + }, + { + "Answer": "", + "Explanation": "question_id: 3034014" + }, + { + "Answer": "", + "Explanation": "question_id: 31029560" + }, + { + "Answer": "", + "Explanation": "question_id: 3365673" + }, + { + "Answer": "", + "Explanation": "question_id: 41463763" + }, + { + "Answer": "", + "Explanation": "question_id: 6407780" + }, + { + "Answer": "", + "Explanation": "question_id: 674509" + }, + { + "Answer": "", + "Explanation": "question_id: 34468983" + }, + { + "Answer": "", + "Explanation": "question_id: 4789021" + }, + { + "Answer": "", + "Explanation": "question_id: 20461165" + }, + { + "Answer": "", + "Explanation": "question_id: 39187788" + }, + { + "Answer": "", + "Explanation": "question_id: 15103484" + }, + { + "Answer": "", + "Explanation": "question_id: 2030053" + }, + { + "Answer": "", + "Explanation": "question_id: 715417" + }, + { + "Answer": "", + "Explanation": "question_id: 15325182" + }, + { + "Answer": "", + "Explanation": "question_id: 20585920" + }, + { + "Answer": "", + "Explanation": "question_id: 34158494" + }, + { + "Answer": "", + "Explanation": "question_id: 13283689" + }, + { + "Answer": "", + "Explanation": "question_id: 42211584" + }, + { + "Answer": "", + "Explanation": "question_id: 30551576" + }, + { + "Answer": "", + "Explanation": "question_id: 33435418" + }, + { + "Answer": "", + "Explanation": "question_id: 8993904" + }, + { + "Answer": "", + "Explanation": "question_id: 14050824" + }, + { + "Answer": "", + "Explanation": "question_id: 4116061" + }, + { + "Answer": "", + "Explanation": "question_id: 1476" + }, + { + "Answer": "", + "Explanation": "question_id: 19894365" + }, + { + "Answer": "", + "Explanation": "question_id: 40076861" + }, + { + "Answer": "", + "Explanation": "question_id: 11584773" + }, + { + "Answer": "", + "Explanation": "question_id: 6886493" + }, + { + "Answer": "", + "Explanation": "question_id: 4706499" + }, + { + "Answer": "", + "Explanation": "question_id: 8218032" + }, + { + "Answer": "", + "Explanation": "question_id: 1720421" + }, + { + "Answer": "", + "Explanation": "question_id: 13837848" + }, + { + "Answer": "", + "Explanation": "question_id: 24642040" + }, + { + "Answer": "", + "Explanation": "question_id: 4233476" + }, + { + "Answer": "", + "Explanation": "question_id: 4508155" + }, + { + "Answer": "", + "Explanation": "question_id: 9304908" + }, + { + "Answer": "", + "Explanation": "question_id: 40196941" + }, + { + "Answer": "", + "Explanation": "question_id: 1400608" + }, + { + "Answer": "", + "Explanation": "question_id: 2300756" + }, + { + "Answer": "", + "Explanation": "question_id: 642154" + }, + { + "Answer": "", + "Explanation": "question_id: 7657457" + }, + { + "Answer": "", + "Explanation": "question_id: 40903174" + }, + { + "Answer": "", + "Explanation": "question_id: 5775719" + }, + { + "Answer": "", + "Explanation": "question_id: 275018" + }, + { + "Answer": "", + "Explanation": "question_id: 961632" + }, + { + "Answer": "", + "Explanation": "question_id: 12829889" + }, + { + "Answer": "", + "Explanation": "question_id: 1303243" + }, + { + "Answer": "", + "Explanation": "question_id: 24659239" + }, + { + "Answer": "", + "Explanation": "question_id: 27218543" + }, + { + "Answer": "", + "Explanation": "question_id: 311627" + }, + { + "Answer": "", + "Explanation": "question_id: 32458541" + }, + { + "Answer": "", + "Explanation": "question_id: 276052" + }, + { + "Answer": "", + "Explanation": "question_id: 29815129" + }, + { + "Answer": "", + "Explanation": "question_id: 20512297" + }, + { + "Answer": "", + "Explanation": "question_id: 11613284" + }, + { + "Answer": "", + "Explanation": "question_id: 3411025" + }, + { + "Answer": "", + "Explanation": "question_id: 1849375" + }, + { + "Answer": "", + "Explanation": "question_id: 18453566" + }, + { + "Answer": "", + "Explanation": "question_id: 12804801" + }, + { + "Answer": "", + "Explanation": "question_id: 15509617" + }, + { + "Answer": "", + "Explanation": "question_id: 42950" + }, + { + "Answer": "", + "Explanation": "question_id: 20180210" + }, + { + "Answer": "", + "Explanation": "question_id: 275018" + }, + { + "Answer": "", + "Explanation": "question_id: 24525111" + }, + { + "Answer": "", + "Explanation": "question_id: 8177079" + }, + { + "Answer": "", + "Explanation": "question_id: 25388796" + }, + { + "Answer": "", + "Explanation": "question_id: 9396706" + }, + { + "Answer": "", + "Explanation": "question_id: 13237941" + }, + { + "Answer": "", + "Explanation": "question_id: 35414625" + }, + { + "Answer": "", + "Explanation": "question_id: 1082413" + }, + { + "Answer": "", + "Explanation": "question_id: 19939084" + }, + { + "Answer": "", + "Explanation": "question_id: 40924332" + }, + { + "Answer": "", + "Explanation": "question_id: 415511" + }, + { + "Answer": "", + "Explanation": "question_id: 41256648" + }, + { + "Answer": "", + "Explanation": "question_id: 10351772" + }, + { + "Answer": "", + "Explanation": "question_id: 1866343" + }, + { + "Answer": "", + "Explanation": "question_id: 10406130" + }, + { + "Answer": "", + "Explanation": "question_id: 961632" + }, + { + "Answer": "", + "Explanation": "question_id: 2153444" + }, + { + "Answer": "", + "Explanation": "question_id: 209840" + }, + { + "Answer": "", + "Explanation": "question_id: 38987" + }, + { + "Answer": "", + "Explanation": "question_id: 17141558" + }, + { + "Answer": "", + "Explanation": "question_id: 3925096" + }, + { + "Answer": "", + "Explanation": "question_id: 19794051" + }, + { + "Answer": "", + "Explanation": "question_id: 2951701" + }, + { + "Answer": "", + "Explanation": "question_id: 10586778" + }, + { + "Answer": "", + "Explanation": "question_id: 31957364" + }, + { + "Answer": "", + "Explanation": "question_id: 2133571" + }, + { + "Answer": "", + "Explanation": "question_id: 2231663" + }, + { + "Answer": "", + "Explanation": "question_id: 10543303" + }, + { + "Answer": "", + "Explanation": "question_id: 36518800" + }, + { + "Answer": "", + "Explanation": "question_id: 1024847" + }, + { + "Answer": "", + "Explanation": "question_id: 39988589" + }, + { + "Answer": "", + "Explanation": "question_id: 1602934" + }, + { + "Answer": "", + "Explanation": "question_id: 37619348" + }, + { + "Answer": "", + "Explanation": "question_id: 15839491" + }, + { + "Answer": "", + "Explanation": "question_id: 16734590" + }, + { + "Answer": "", + "Explanation": "question_id: 1476" + }, + { + "Answer": "", + "Explanation": "question_id: 24041436" + }, + { + "Answer": "", + "Explanation": "question_id: 13840883" + }, + { + "Answer": "", + "Explanation": "question_id: 7974442" + }, + { + "Answer": "", + "Explanation": "question_id: 518021" + }, + { + "Answer": "", + "Explanation": "question_id: 740287" + }, + { + "Answer": "", + "Explanation": "question_id: 9236926" + }, + { + "Answer": "", + "Explanation": "question_id: 9573244" + }, + { + "Answer": "", + "Explanation": "question_id: 4290716" + }, + { + "Answer": "", + "Explanation": "question_id: 11677860" + }, + { + "Answer": "", + "Explanation": "question_id: 7356042" + }, + { + "Answer": "", + "Explanation": "question_id: 9733638" + }, + { + "Answer": "", + "Explanation": "question_id: 11064917" + }, + { + "Answer": "", + "Explanation": "question_id: 82831" + }, + { + "Answer": "", + "Explanation": "question_id: 764235" + }, + { + "Answer": "", + "Explanation": "question_id: 11416772" + }, + { + "Answer": "", + "Explanation": "question_id: 13384841" + }, + { + "Answer": "", + "Explanation": "question_id: 17734779" + }, + { + "Answer": "", + "Explanation": "question_id: 17424182" + }, + { + "Answer": "", + "Explanation": "question_id: 21887754" + }, + { + "Answer": "", + "Explanation": "question_id: 39804375" + }, + { + "Answer": "", + "Explanation": "question_id: 70797" + }, + { + "Answer": "", + "Explanation": "question_id: 1038824" + }, + { + "Answer": "", + "Explanation": "question_id: 3097866" + }, + { + "Answer": "", + "Explanation": "question_id: 6429638" + }, + { + "Answer": "", + "Explanation": "question_id: 38388799" + }, + { + "Answer": "", + "Explanation": "question_id: 41127441" + }, + { + "Answer": "", + "Explanation": "question_id: 31818050" + }, + { + "Answer": "", + "Explanation": "question_id: 6416131" + }, + { + "Answer": "", + "Explanation": "question_id: 1712227" + }, + { + "Answer": "", + "Explanation": "question_id: 14180866" + }, + { + "Answer": "", + "Explanation": "question_id: 12579061" + }, + { + "Answer": "", + "Explanation": "question_id: 24722212" + }, + { + "Answer": "", + "Explanation": "question_id: 6900955" + }, + { + "Answer": "", + "Explanation": "question_id: 15049182" + }, + { + "Answer": "", + "Explanation": "question_id: 8409095" + }, + { + "Answer": "", + "Explanation": "question_id: 761804" + }, + { + "Answer": "", + "Explanation": "question_id: 3804727" + }, + { + "Answer": "", + "Explanation": "question_id: 17484631" + }, + { + "Answer": "", + "Explanation": "question_id: 39821166" + }, + { + "Answer": "", + "Explanation": "question_id: 19894478" + }, + { + "Answer": "", + "Explanation": "question_id: 6429638" + }, + { + "Answer": "", + "Explanation": "question_id: 546321" + }, + { + "Answer": "", + "Explanation": "question_id: 11414596" + }, + { + "Answer": "", + "Explanation": "question_id: 8908287" + }, + { + "Answer": "", + "Explanation": "question_id: 444591" + }, + { + "Answer": "", + "Explanation": "question_id: 8209568" + }, + { + "Answer": "", + "Explanation": "question_id: 39602824" + }, + { + "Answer": "", + "Explanation": "question_id: 6086047" + }, + { + "Answer": "", + "Explanation": "question_id: 2212433" + }, + { + "Answer": "", + "Explanation": "question_id: 23855976" + }, + { + "Answer": "", + "Explanation": "question_id: 9969684" + }, + { + "Answer": "", + "Explanation": "question_id: 4768151" + }, + { + "Answer": "", + "Explanation": "question_id: 17438096" + }, + { + "Answer": "", + "Explanation": "question_id: 8751653" + }, + { + "Answer": "", + "Explanation": "question_id: 17021863" + }, + { + "Answer": "", + "Explanation": "question_id: 12845112" + }, + { + "Answer": "", + "Explanation": "question_id: 82831" + }, + { + "Answer": "", + "Explanation": "question_id: 42178481" + }, + { + "Answer": "", + "Explanation": "question_id: 21022865" + }, + { + "Answer": "", + "Explanation": "question_id: 2186656" + }, + { + "Answer": "", + "Explanation": "question_id: 517355" + }, + { + "Answer": "", + "Explanation": "question_id: 22799300" + }, + { + "Answer": "", + "Explanation": "question_id: 22240602" + }, + { + "Answer": "", + "Explanation": "question_id: 41821112" + }, + { + "Answer": "", + "Explanation": "question_id: 13860026" + }, + { + "Answer": "", + "Explanation": "question_id: 12843099" + }, + { + "Answer": "", + "Explanation": "question_id: 3944876" + }, + { + "Answer": "", + "Explanation": "question_id: 18695605" + }, + { + "Answer": "", + "Explanation": "question_id: 38831808" + }, + { + "Answer": "", + "Explanation": "question_id: 663171" + }, + { + "Answer": "", + "Explanation": "question_id: 1303243" + }, + { + "Answer": "", + "Explanation": "question_id: 29422691" + }, + { + "Answer": "", + "Explanation": "question_id: 1185524" + }, + { + "Answer": "", + "Explanation": "question_id: 2544710" + }, + { + "Answer": "", + "Explanation": "question_id: 2849286" + }, + { + "Answer": "", + "Explanation": "question_id: 3774571" + }, + { + "Answer": "", + "Explanation": "question_id: 5618878" + }, + { + "Answer": "", + "Explanation": "question_id: 17284947" + }, + { + "Answer": "", + "Explanation": "question_id: 17057544" + }, + { + "Answer": "", + "Explanation": "question_id: 30328646" + }, + { + "Answer": "", + "Explanation": "question_id: 36454494" + }, + { + "Answer": "", + "Explanation": "question_id: 25678689" + }, + { + "Answer": "", + "Explanation": "question_id: 28161356" + }, + { + "Answer": "", + "Explanation": "question_id: 8247792" + }, + { + "Answer": "", + "Explanation": "question_id: 2793324" + }, + { + "Answer": "", + "Explanation": "question_id: 22733642" + }, + { + "Answer": "", + "Explanation": "question_id: 2111163" + }, + { + "Answer": "", + "Explanation": "question_id: 521502" + }, + { + "Answer": "", + "Explanation": "question_id: 4697006" + }, + { + "Answer": "", + "Explanation": "question_id: 15974730" + }, + { + "Answer": "", + "Explanation": "question_id: 20067636" + }, + { + "Answer": "", + "Explanation": "question_id: 16138015" + }, + { + "Answer": "", + "Explanation": "question_id: 2338531" + }, + { + "Answer": "", + "Explanation": "question_id: 18272066" + }, + { + "Answer": "", + "Explanation": "question_id: 1946181" + }, + { + "Answer": "", + "Explanation": "question_id: 7732125" + }, + { + "Answer": "", + "Explanation": "question_id: 4444923" + }, + { + "Answer": "", + "Explanation": "question_id: 4267019" + }, + { + "Answer": "", + "Explanation": "question_id: 19334374" + }, + { + "Answer": "", + "Explanation": "question_id: 28416408" + }, + { + "Answer": "", + "Explanation": "question_id: 674764" + }, + { + "Answer": "", + "Explanation": "question_id: 4843158" + }, + { + "Answer": "", + "Explanation": "question_id: 2191699" + }, + { + "Answer": "", + "Explanation": "question_id: 5749195" + }, + { + "Answer": "", + "Explanation": "question_id: 29558007" + }, + { + "Answer": "", + "Explanation": "question_id: 1388818" + }, + { + "Answer": "", + "Explanation": "question_id: 15851568" + }, + { + "Answer": "", + "Explanation": "question_id: 12496531" + }, + { + "Answer": "", + "Explanation": "question_id: 10487278" + }, + { + "Answer": "", + "Explanation": "question_id: 4265988" + }, + { + "Answer": "", + "Explanation": "question_id: 11300383" + }, + { + "Answer": "", + "Explanation": "question_id: 209513" + }, + { + "Answer": "", + "Explanation": "question_id: 41727442" + }, + { + "Answer": "", + "Explanation": "question_id: 4664850" + }, + { + "Answer": "", + "Explanation": "question_id: 875968" + }, + { + "Answer": "", + "Explanation": "question_id: 931092" + }, + { + "Answer": "", + "Explanation": "question_id: 17552997" + }, + { + "Answer": "", + "Explanation": "question_id: 20683167" + }, + { + "Answer": "", + "Explanation": "question_id: 5871168" + }, + { + "Answer": "", + "Explanation": "question_id: 2793324" + }, + { + "Answer": "", + "Explanation": "question_id: 19602931" + }, + { + "Answer": "", + "Explanation": "question_id: 28199524" + }, + { + "Answer": "", + "Explanation": "question_id: 3842155" + }, + { + "Answer": "", + "Explanation": "question_id: 11791568" + }, + { + "Answer": "", + "Explanation": "question_id: 12666897" + }, + { + "Answer": "", + "Explanation": "question_id: 11833266" + }, + { + "Answer": "", + "Explanation": "question_id: 237079" + }, + { + "Answer": "", + "Explanation": "question_id: 118516" + }, + { + "Answer": "", + "Explanation": "question_id: 3878555" + }, + { + "Answer": "", + "Explanation": "question_id: 89228" + }, + { + "Answer": "", + "Explanation": "question_id: 3847472" + }, + { + "Answer": "", + "Explanation": "question_id: 27589325" + }, + { + "Answer": "", + "Explanation": "question_id: 17731822" + }, + { + "Answer": "", + "Explanation": "question_id: 26809954" + }, + { + "Answer": "", + "Explanation": "question_id: 4576115" + }, + { + "Answer": "", + "Explanation": "question_id: 40319433" + }, + { + "Answer": "", + "Explanation": "question_id: 1093322" + }, + { + "Answer": "", + "Explanation": "question_id: 19602931" + }, + { + "Answer": "", + "Explanation": "question_id: 22412258" + }, + { + "Answer": "", + "Explanation": "question_id: 14858916" + }, + { + "Answer": "", + "Explanation": "question_id: 35797523" + }, + { + "Answer": "", + "Explanation": "question_id: 38251245" + }, + { + "Answer": "", + "Explanation": "question_id: 31302904" + }, + { + "Answer": "", + "Explanation": "question_id: 3182716" + }, + { + "Answer": "", + "Explanation": "question_id: 15769246" + }, + { + "Answer": "", + "Explanation": "question_id: 14299978" + }, + { + "Answer": "", + "Explanation": "question_id: 7323859" + }, + { + "Answer": "", + "Explanation": "question_id: 89228" + }, + { + "Answer": "", + "Explanation": "question_id: 1920145" + }, + { + "Answer": "", + "Explanation": "question_id: 5430470" + }, + { + "Answer": "", + "Explanation": "question_id: 24242433" + }, + { + "Answer": "", + "Explanation": "question_id: 25292838" + }, + { + "Answer": "", + "Explanation": "question_id: 5838735" + }, + { + "Answer": "", + "Explanation": "question_id: 37878946" + }, + { + "Answer": "", + "Explanation": "question_id: 33065588" + }, + { + "Answer": "", + "Explanation": "question_id: 10675054" + }, + { + "Answer": "", + "Explanation": "question_id: 10194713" + }, + { + "Answer": "", + "Explanation": "question_id: 32191029" + }, + { + "Answer": "", + "Explanation": "question_id: 3931541" + }, + { + "Answer": "", + "Explanation": "question_id: 652291" + }, + { + "Answer": "", + "Explanation": "question_id: 2108126" + }, + { + "Answer": "", + "Explanation": "question_id: 739993" + }, + { + "Answer": "", + "Explanation": "question_id: 40208429" + }, + { + "Answer": "", + "Explanation": "question_id: 1094717" + }, + { + "Answer": "", + "Explanation": "question_id: 2878084" + }, + { + "Answer": "", + "Explanation": "question_id: 15158599" + }, + { + "Answer": "", + "Explanation": "question_id: 4880960" + }, + { + "Answer": "", + "Explanation": "question_id: 19794051" + }, + { + "Answer": "", + "Explanation": "question_id: 4659524" + }, + { + "Answer": "", + "Explanation": "question_id: 30693804" + }, + { + "Answer": "", + "Explanation": "question_id: 5404665" + }, + { + "Answer": "", + "Explanation": "question_id: 2744795" + }, + { + "Answer": "", + "Explanation": "question_id: 32792874" + }, + { + "Answer": "", + "Explanation": "question_id: 13395888" + }, + { + "Answer": "", + "Explanation": "question_id: 4695143" + }, + { + "Answer": "", + "Explanation": "question_id: 18493677" + }, + { + "Answer": "", + "Explanation": "question_id: 13291539" + }, + { + "Answer": "", + "Explanation": "question_id: 22741068" + }, + { + "Answer": "", + "Explanation": "question_id: 903853" + }, + { + "Answer": "", + "Explanation": "question_id: 180606" + }, + { + "Answer": "", + "Explanation": "question_id: 764235" + }, + { + "Answer": "", + "Explanation": "question_id: 34543513" + }, + { + "Answer": "", + "Explanation": "question_id: 34696853" + }, + { + "Answer": "", + "Explanation": "question_id: 5137497" + }, + { + "Answer": "", + "Explanation": "question_id: 4588628" + }, + { + "Answer": "", + "Explanation": "question_id: 17627531" + }, + { + "Answer": "", + "Explanation": "question_id: 17284947" + }, + { + "Answer": "", + "Explanation": "question_id: 364621" + }, + { + "Answer": "", + "Explanation": "question_id: 11764260" + }, + { + "Answer": "", + "Explanation": "question_id: 3964681" + }, + { + "Answer": "", + "Explanation": "question_id: 26640145" + }, + { + "Answer": "", + "Explanation": "question_id: 10543303" + }, + { + "Answer": "", + "Explanation": "question_id: 8924173" + }, + { + "Answer": "", + "Explanation": "question_id: 3258573" + }, + { + "Answer": "", + "Explanation": "question_id: 23145240" + }, + { + "Answer": "", + "Explanation": "question_id: 2051744" + }, + { + "Answer": "", + "Explanation": "question_id: 20546419" + }, + { + "Answer": "", + "Explanation": "question_id: 6018916" + }, + { + "Answer": "", + "Explanation": "question_id: 123198" + }, + { + "Answer": "", + "Explanation": "question_id: 14301913" + }, + { + "Answer": "", + "Explanation": "question_id: 930397" + }, + { + "Answer": "", + "Explanation": "question_id: 13237941" + }, + { + "Answer": "", + "Explanation": "question_id: 1514553" + }, + { + "Answer": "", + "Explanation": "question_id: 35015693" + }, + { + "Answer": "", + "Explanation": "question_id: 33769531" + }, + { + "Answer": "", + "Explanation": "question_id: 10213994" + }, + { + "Answer": "", + "Explanation": "question_id: 8938449" + }, + { + "Answer": "", + "Explanation": "question_id: 17474211" + }, + { + "Answer": "", + "Explanation": "question_id: 32675861" + }, + { + "Answer": "", + "Explanation": "question_id: 11361985" + }, + { + "Answer": "", + "Explanation": "question_id: 3398589" + }, + { + "Answer": "", + "Explanation": "question_id: 18500541" + }, + { + "Answer": "", + "Explanation": "question_id: 2878084" + }, + { + "Answer": "", + "Explanation": "question_id: 10972410" + }, + { + "Answer": "", + "Explanation": "question_id: 37004138" + }, + { + "Answer": "", + "Explanation": "question_id: 642154" + }, + { + "Answer": "", + "Explanation": "question_id: 53513" + }, + { + "Answer": "", + "Explanation": "question_id: 16677816" + }, + { + "Answer": "", + "Explanation": "question_id: 20211942" + }, + { + "Answer": "", + "Explanation": "question_id: 1747817" + }, + { + "Answer": "", + "Explanation": "question_id: 1960516" + }, + { + "Answer": "", + "Explanation": "question_id: 8654637" + }, + { + "Answer": "", + "Explanation": "question_id: 17071871" + }, + { + "Answer": "", + "Explanation": "question_id: 8970524" + }, + { + "Answer": "", + "Explanation": "question_id: 4940032" + }, + { + "Answer": "", + "Explanation": "question_id: 33824334" + }, + { + "Answer": "", + "Explanation": "question_id: 307305" + }, + { + "Answer": "", + "Explanation": "question_id: 14262654" + }, + { + "Answer": "", + "Explanation": "question_id: 2052390" + }, + { + "Answer": "", + "Explanation": "question_id: 11709079" + }, + { + "Answer": "", + "Explanation": "question_id: 9561243" + }, + { + "Answer": "", + "Explanation": "question_id: 8315209" + }, + { + "Answer": "", + "Explanation": "question_id: 30405804" + }, + { + "Answer": "", + "Explanation": "question_id: 432842" + }, + { + "Answer": "", + "Explanation": "question_id: 2972212" + }, + { + "Answer": "", + "Explanation": "question_id: 11344827" + }, + { + "Answer": "", + "Explanation": "question_id: 275018" + }, + { + "Answer": "", + "Explanation": "question_id: 2803852" + }, + { + "Answer": "", + "Explanation": "question_id: 18886596" + }, + { + "Answer": "", + "Explanation": "question_id: 21104592" + }, + { + "Answer": "", + "Explanation": "question_id: 19954469" + }, + { + "Answer": "", + "Explanation": "question_id: 29034928" + }, + { + "Answer": "", + "Explanation": "question_id: 8546245" + }, + { + "Answer": "", + "Explanation": "question_id: 44778" + }, + { + "Answer": "", + "Explanation": "question_id: 1666700" + }, + { + "Answer": "", + "Explanation": "question_id: 7900882" + }, + { + "Answer": "", + "Explanation": "question_id: 18785032" + }, + { + "Answer": "", + "Explanation": "question_id: 15863066" + }, + { + "Answer": "", + "Explanation": "question_id: 9637838" + }, + { + "Answer": "", + "Explanation": "question_id: 1217251" + }, + { + "Answer": "", + "Explanation": "question_id: 647515" + }, + { + "Answer": "", + "Explanation": "question_id: 9210525" + }, + { + "Answer": "", + "Explanation": "question_id: 42060144" + }, + { + "Answer": "", + "Explanation": "question_id: 3276180" + }, + { + "Answer": "", + "Explanation": "question_id: 179369" + }, + { + "Answer": "", + "Explanation": "question_id: 36381230" + }, + { + "Answer": "", + "Explanation": "question_id: 2094176" + }, + { + "Answer": "", + "Explanation": "question_id: 4363072" + }, + { + "Answer": "", + "Explanation": "question_id: 31247198" + }, + { + "Answer": "", + "Explanation": "question_id: 23531030" + }, + { + "Answer": "", + "Explanation": "question_id: 3355822" + }, + { + "Answer": "", + "Explanation": "question_id: 716477" + }, + { + "Answer": "", + "Explanation": "question_id: 39604780" + }, + { + "Answer": "", + "Explanation": "question_id: 843277" + }, + { + "Answer": "", + "Explanation": "question_id: 31465002" + }, + { + "Answer": "", + "Explanation": "question_id: 41821112" + }, + { + "Answer": "", + "Explanation": "question_id: 5301996" + }, + { + "Answer": "", + "Explanation": "question_id: 17856928" + }, + { + "Answer": "", + "Explanation": "question_id: 6740311" + }, + { + "Answer": "", + "Explanation": "question_id: 8249836" + }, + { + "Answer": "", + "Explanation": "question_id: 19068269" + }, + { + "Answer": "", + "Explanation": "question_id: 22229255" + }, + { + "Answer": "", + "Explanation": "question_id: 16296643" + }, + { + "Answer": "", + "Explanation": "question_id: 12527959" + }, + { + "Answer": "", + "Explanation": "question_id: 7142062" + }, + { + "Answer": "", + "Explanation": "question_id: 2878084" + }, + { + "Answer": "", + "Explanation": "question_id: 38379453" + }, + { + "Answer": "", + "Explanation": "question_id: 3766633" + }, + { + "Answer": "", + "Explanation": "question_id: 5618878" + }, + { + "Answer": "", + "Explanation": "question_id: 21519203" + }, + { + "Answer": "", + "Explanation": "question_id: 34696853" + }, + { + "Answer": "", + "Explanation": "question_id: 15851568" + }, + { + "Answer": "", + "Explanation": "question_id: 3855093" + }, + { + "Answer": "", + "Explanation": "question_id: 7852855" + }, + { + "Answer": "", + "Explanation": "question_id: 17331290" + }, + { + "Answer": "", + "Explanation": "question_id: 1450393" + }, + { + "Answer": "", + "Explanation": "question_id: 3241594" + }, + { + "Answer": "", + "Explanation": "question_id: 4685571" + }, + { + "Answer": "", + "Explanation": "question_id: 364621" + }, + { + "Answer": "", + "Explanation": "question_id: 31888871" + }, + { + "Answer": "", + "Explanation": "question_id: 1447575" + }, + { + "Answer": "", + "Explanation": "question_id: 14571103" + }, + { + "Answer": "", + "Explanation": "question_id: 13279399" + }, + { + "Answer": "", + "Explanation": "question_id: 849674" + }, + { + "Answer": "", + "Explanation": "question_id: 30546889" + }, + { + "Answer": "", + "Explanation": "question_id: 2972212" + }, + { + "Answer": "", + "Explanation": "question_id: 26081300" + }, + { + "Answer": "", + "Explanation": "question_id: 18082130" + }, + { + "Answer": "", + "Explanation": "question_id: 1555968" + }, + { + "Answer": "", + "Explanation": "question_id: 33680914" + }, + { + "Answer": "", + "Explanation": "question_id: 38081866" + }, + { + "Answer": "", + "Explanation": "question_id: 23612271" + }, + { + "Answer": "", + "Explanation": "question_id: 13368659" + }, + { + "Answer": "", + "Explanation": "question_id: 33147992" + }, + { + "Answer": "", + "Explanation": "question_id: 3781851" + }, + { + "Answer": "", + "Explanation": "question_id: 1358977" + }, + { + "Answer": "", + "Explanation": "question_id: 663171" + }, + { + "Answer": "", + "Explanation": "question_id: 10895028" + }, + { + "Answer": "", + "Explanation": "question_id: 8687568" + }, + { + "Answer": "", + "Explanation": "question_id: 14041791" + }, + { + "Answer": "", + "Explanation": "question_id: 7934620" + }, + { + "Answer": "", + "Explanation": "question_id: 674764" + }, + { + "Answer": "", + "Explanation": "question_id: 4906977" + }, + { + "Answer": "", + "Explanation": "question_id: 39353758" + }, + { + "Answer": "", + "Explanation": "question_id: 14043080" + }, + { + "Answer": "", + "Explanation": "question_id: 22712292" + }, + { + "Answer": "", + "Explanation": "question_id: 5123839" + }, + { + "Answer": "", + "Explanation": "question_id: 23359886" + }, + { + "Answer": "", + "Explanation": "question_id: 1854" + }, + { + "Answer": "", + "Explanation": "question_id: 7271385" + }, + { + "Answer": "", + "Explanation": "question_id: 17407691" + }, + { + "Answer": "", + "Explanation": "question_id: 40987319" + }, + { + "Answer": "", + "Explanation": "question_id: 42950" + }, + { + "Answer": "", + "Explanation": "question_id: 30062429" + }, + { + "Answer": "", + "Explanation": "question_id: 2813806" + }, + { + "Answer": "", + "Explanation": "question_id: 4642501" + }, + { + "Answer": "", + "Explanation": "question_id: 9257094" + }, + { + "Answer": "", + "Explanation": "question_id: 4174941" + }, + { + "Answer": "", + "Explanation": "question_id: 4029436" + }, + { + "Answer": "", + "Explanation": "question_id: 20457174" + }, + { + "Answer": "", + "Explanation": "question_id: 3518778" + }, + { + "Answer": "", + "Explanation": "question_id: 19410018" + }, + { + "Answer": "", + "Explanation": "question_id: 8270092" + }, + { + "Answer": "", + "Explanation": "question_id: 12655007" + }, + { + "Answer": "", + "Explanation": "question_id: 14431731" + }, + { + "Answer": "", + "Explanation": "question_id: 275018" + }, + { + "Answer": "", + "Explanation": "question_id: 172439" + }, + { + "Answer": "", + "Explanation": "question_id: 4476373" + }, + { + "Answer": "", + "Explanation": "question_id: 41386443" + }, + { + "Answer": "", + "Explanation": "question_id: 5229425" + }, + { + "Answer": "", + "Explanation": "question_id: 8908287" + }, + { + "Answer": "", + "Explanation": "question_id: 3151146" + }, + { + "Answer": "", + "Explanation": "question_id: 14764126" + }, + { + "Answer": "", + "Explanation": "question_id: 18079563" + }, + { + "Answer": "", + "Explanation": "question_id: 22676" + }, + { + "Answer": "", + "Explanation": "question_id: 1246444" + }, + { + "Answer": "", + "Explanation": "question_id: 27659153" + }, + { + "Answer": "", + "Explanation": "question_id: 640001" + }, + { + "Answer": "", + "Explanation": "question_id: 674764" + }, + { + "Answer": "", + "Explanation": "question_id: 13945749" + }, + { + "Answer": "", + "Explanation": "question_id: 4362586" + }, + { + "Answer": "", + "Explanation": "question_id: 21800169" + }, + { + "Answer": "", + "Explanation": "question_id: 13223737" + }, + { + "Answer": "", + "Explanation": "question_id: 4231345" + }, + { + "Answer": "", + "Explanation": "question_id: 4284648" + }, + { + "Answer": "", + "Explanation": "question_id: 13740672" + }, + { + "Answer": "", + "Explanation": "question_id: 7668141" + }, + { + "Answer": "", + "Explanation": "question_id: 42394627" + }, + { + "Answer": "", + "Explanation": "question_id: 1731346" + }, + { + "Answer": "", + "Explanation": "question_id: 5137497" + }, + { + "Answer": "", + "Explanation": "question_id: 5900683" + }, + { + "Answer": "", + "Explanation": "question_id: 6561653" + }, + { + "Answer": "", + "Explanation": "question_id: 16096754" + }, + { + "Answer": "", + "Explanation": "question_id: 9001509" + }, + { + "Answer": "", + "Explanation": "question_id: 13945749" + }, + { + "Answer": "", + "Explanation": "question_id: 510357" + }, + { + "Answer": "", + "Explanation": "question_id: 2600191" + }, + { + "Answer": "", + "Explanation": "question_id: 19339" + }, + { + "Answer": "", + "Explanation": "question_id: 14931769" + }, + { + "Answer": "", + "Explanation": "question_id: 15313250" + }, + { + "Answer": "", + "Explanation": "question_id: 7349646" + }, + { + "Answer": "", + "Explanation": "question_id: 13496087" + }, + { + "Answer": "", + "Explanation": "question_id: 9495262" + }, + { + "Answer": "", + "Explanation": "question_id: 39268928" + }, + { + "Answer": "", + "Explanation": "question_id: 2674391" + }, + { + "Answer": "", + "Explanation": "question_id: 16127862" + }, + { + "Answer": "", + "Explanation": "question_id: 8194156" + }, + { + "Answer": "", + "Explanation": "question_id: 16389188" + }, + { + "Answer": "", + "Explanation": "question_id: 27659153" + }, + { + "Answer": "", + "Explanation": "question_id: 2806611" + }, + { + "Answer": "", + "Explanation": "question_id: 18102109" + }, + { + "Answer": "", + "Explanation": "question_id: 32743479" + }, + { + "Answer": "", + "Explanation": "question_id: 930397" + }, + { + "Answer": "", + "Explanation": "question_id: 11479392" + }, + { + "Answer": "", + "Explanation": "question_id: 12772057" + }, + { + "Answer": "", + "Explanation": "question_id: 34750084" + }, + { + "Answer": "", + "Explanation": "question_id: 17558552" + }, + { + "Answer": "", + "Explanation": "question_id: 18742657" + }, + { + "Answer": "", + "Explanation": "question_id: 15282189" + }, + { + "Answer": "", + "Explanation": "question_id: 13411544" + }, + { + "Answer": "", + "Explanation": "question_id: 33724111" + }, + { + "Answer": "", + "Explanation": "question_id: 187455" + }, + { + "Answer": "", + "Explanation": "question_id: 17038426" + }, + { + "Answer": "", + "Explanation": "question_id: 6416131" + }, + { + "Answer": "", + "Explanation": "question_id: 403421" + }, + { + "Answer": "", + "Explanation": "question_id: 13793321" + }, + { + "Answer": "", + "Explanation": "question_id: 18265935" + }, + { + "Answer": "", + "Explanation": "question_id: 42765620" + }, + { + "Answer": "", + "Explanation": "question_id: 11114358" + }, + { + "Answer": "", + "Explanation": "question_id: 3685265" + }, + { + "Answer": "", + "Explanation": "question_id: 13745648" + }, + { + "Answer": "", + "Explanation": "question_id: 25148611" + }, + { + "Answer": "", + "Explanation": "question_id: 26097916" + }, + { + "Answer": "", + "Explanation": "question_id: 7633274" + }, + { + "Answer": "", + "Explanation": "question_id: 200738" + }, + { + "Answer": "", + "Explanation": "question_id: 34410358" + }, + { + "Answer": "", + "Explanation": "question_id: 3294889" + }, + { + "Answer": "", + "Explanation": "question_id: 15080500" + }, + { + "Answer": "", + "Explanation": "question_id: 9210525" + }, + { + "Answer": "", + "Explanation": "question_id: 5251663" + }, + { + "Answer": "", + "Explanation": "question_id: 11709079" + }, + { + "Answer": "", + "Explanation": "question_id: 15819980" + }, + { + "Answer": "", + "Explanation": "question_id: 13496087" + }, + { + "Answer": "", + "Explanation": "question_id: 15534223" + }, + { + "Answer": "", + "Explanation": "question_id: 14306852" + }, + { + "Answer": "", + "Explanation": "question_id: 199059" + }, + { + "Answer": "", + "Explanation": "question_id: 21804935" + }, + { + "Answer": "", + "Explanation": "question_id: 663171" + }, + { + "Answer": "", + "Explanation": "question_id: 2823472" + }, + { + "Answer": "", + "Explanation": "question_id: 1303243" + }, + { + "Answer": "", + "Explanation": "question_id: 1713594" + }, + { + "Answer": "", + "Explanation": "question_id: 3207219" + }, + { + "Answer": "", + "Explanation": "question_id: 20970279" + }, + { + "Answer": "", + "Explanation": "question_id: 19339" + }, + { + "Answer": "", + "Explanation": "question_id: 1780174" + }, + { + "Answer": "", + "Explanation": "question_id: 19384532" + }, + { + "Answer": "", + "Explanation": "question_id: 319426" + }, + { + "Answer": "", + "Explanation": "question_id: 14524322" + }, + { + "Answer": "", + "Explanation": "question_id: 3277503" + }, + { + "Answer": "", + "Explanation": "question_id: 2416823" + }, + { + "Answer": "", + "Explanation": "question_id: 23970693" + }, + { + "Answer": "", + "Explanation": "question_id: 6886493" + }, + { + "Answer": "", + "Explanation": "question_id: 20733827" + }, + { + "Answer": "", + "Explanation": "question_id: 35015693" + }, + { + "Answer": "", + "Explanation": "question_id: 34338341" + }, + { + "Answer": "", + "Explanation": "question_id: 2151517" + }, + { + "Answer": "", + "Explanation": "question_id: 3437059" + }, + { + "Answer": "", + "Explanation": "question_id: 8270092" + }, + { + "Answer": "", + "Explanation": "question_id: 34358278" + }, + { + "Answer": "", + "Explanation": "question_id: 21822054" + }, + { + "Answer": "", + "Explanation": "question_id: 25698710" + }, + { + "Answer": "", + "Explanation": "question_id: 4523551" + }, + { + "Answer": "", + "Explanation": "question_id: 27868020" + }, + { + "Answer": "", + "Explanation": "question_id: 5255657" + }, + { + "Answer": "", + "Explanation": "question_id: 40221516" + }, + { + "Answer": "", + "Explanation": "question_id: 14043934" + }, + { + "Answer": "", + "Explanation": "question_id: 3996904" + }, + { + "Answer": "", + "Explanation": "question_id: 13655392" + }, + { + "Answer": "", + "Explanation": "question_id: 2911754" + }, + { + "Answer": "", + "Explanation": "question_id: 18990069" + }, + { + "Answer": "", + "Explanation": "question_id: 35078261" + }, + { + "Answer": "", + "Explanation": "question_id: 7732125" + }, + { + "Answer": "", + "Explanation": "question_id: 19961490" + }, + { + "Answer": "", + "Explanation": "question_id: 28669459" + }, + { + "Answer": "", + "Explanation": "question_id: 9053260" + }, + { + "Answer": "", + "Explanation": "question_id: 34945274" + }, + { + "Answer": "", + "Explanation": "question_id: 3984539" + }, + { + "Answer": "", + "Explanation": "question_id: 1516795" + }, + { + "Answer": "", + "Explanation": "question_id: 11703064" + }, + { + "Answer": "", + "Explanation": "question_id: 613183" + }, + { + "Answer": "", + "Explanation": "question_id: 17352321" + }, + { + "Answer": "", + "Explanation": "question_id: 9040939" + }, + { + "Answer": "", + "Explanation": "question_id: 5352546" + }, + { + "Answer": "", + "Explanation": "question_id: 2544710" + }, + { + "Answer": "", + "Explanation": "question_id: 17141558" + }, + { + "Answer": "", + "Explanation": "question_id: 8270092" + }, + { + "Answer": "", + "Explanation": "question_id: 27868020" + }, + { + "Answer": "", + "Explanation": "question_id: 8092877" + }, + { + "Answer": "", + "Explanation": "question_id: 32926587" + }, + { + "Answer": "", + "Explanation": "question_id: 2612802" + }, + { + "Answer": "", + "Explanation": "question_id: 973473" + }, + { + "Answer": "", + "Explanation": "question_id: 6886493" + }, + { + "Answer": "", + "Explanation": "question_id: 510348" + }, + { + "Answer": "", + "Explanation": "question_id: 9760588" + }, + { + "Answer": "", + "Explanation": "question_id: 31522361" + }, + { + "Answer": "", + "Explanation": "question_id: 18684397" + }, + { + "Answer": "", + "Explanation": "question_id: 14406214" + }, + { + "Answer": "", + "Explanation": "question_id: 7742752" + }, + { + "Answer": "", + "Explanation": "question_id: 42100344" + }, + { + "Answer": "", + "Explanation": "question_id: 11361985" + }, + { + "Answer": "", + "Explanation": "question_id: 13413590" + }, + { + "Answer": "", + "Explanation": "question_id: 2793324" + }, + { + "Answer": "", + "Explanation": "question_id: 748028" + }, + { + "Answer": "", + "Explanation": "question_id: 41861705" + }, + { + "Answer": "", + "Explanation": "question_id: 3277503" + }, + { + "Answer": "", + "Explanation": "question_id: 11399384" + }, + { + "Answer": "", + "Explanation": "question_id: 8440117" + }, + { + "Answer": "", + "Explanation": "question_id: 2406700" + }, + { + "Answer": "", + "Explanation": "question_id: 23748995" + }, + { + "Answer": "", + "Explanation": "question_id: 42364593" + }, + { + "Answer": "", + "Explanation": "question_id: 4901483" + }, + { + "Answer": "", + "Explanation": "question_id: 30650254" + }, + { + "Answer": "", + "Explanation": "question_id: 7351270" + }, + { + "Answer": "", + "Explanation": "question_id: 40682209" + }, + { + "Answer": "", + "Explanation": "question_id: 18131741" + }, + { + "Answer": "", + "Explanation": "question_id: 546321" + }, + { + "Answer": "", + "Explanation": "question_id: 9938130" + }, + { + "Answer": "", + "Explanation": "question_id: 4048964" + }, + { + "Answer": "", + "Explanation": "question_id: 1602934" + }, + { + "Answer": "", + "Explanation": "question_id: 6591931" + }, + { + "Answer": "", + "Explanation": "question_id: 3182716" + }, + { + "Answer": "", + "Explanation": "question_id: 3294889" + }, + { + "Answer": "", + "Explanation": "question_id: 113534" + }, + { + "Answer": "", + "Explanation": "question_id: 2631935" + }, + { + "Answer": "", + "Explanation": "question_id: 15445981" + }, + { + "Answer": "", + "Explanation": "question_id: 5932059" + }, + { + "Answer": "", + "Explanation": "question_id: 7271482" + }, + { + "Answer": "", + "Explanation": "question_id: 31958637" + }, + { + "Answer": "", + "Explanation": "question_id: 2606976" + }, + { + "Answer": "", + "Explanation": "question_id: 3940128" + }, + { + "Answer": "", + "Explanation": "question_id: 5971312" + }, + { + "Answer": "", + "Explanation": "question_id: 4664850" + }, + { + "Answer": "", + "Explanation": "question_id: 455612" + }, + { + "Answer": "", + "Explanation": "question_id: 247724" + }, + { + "Answer": "", + "Explanation": "question_id: 42142756" + }, + { + "Answer": "", + "Explanation": "question_id: 28669459" + }, + { + "Answer": "", + "Explanation": "question_id: 28684154" + }, + { + "Answer": "", + "Explanation": "question_id: 10406130" + }, + { + "Answer": "", + "Explanation": "question_id: 22187233" + }, + { + "Answer": "", + "Explanation": "question_id: 20461165" + }, + { + "Answer": "", + "Explanation": "question_id: 8785554" + }, + { + "Answer": "", + "Explanation": "question_id: 444058" + }, + { + "Answer": "", + "Explanation": "question_id: 8369219" + }, + { + "Answer": "", + "Explanation": "question_id: 29386995" + }, + { + "Answer": "", + "Explanation": "question_id: 455612" + }, + { + "Answer": "", + "Explanation": "question_id: 15315452" + }, + { + "Answer": "", + "Explanation": "question_id: 3348825" + }, + { + "Answer": "", + "Explanation": "question_id: 674509" + }, + { + "Answer": "", + "Explanation": "question_id: 773814" + }, + { + "Answer": "", + "Explanation": "question_id: 2793324" + }, + { + "Answer": "", + "Explanation": "question_id: 3276180" + }, + { + "Answer": "", + "Explanation": "question_id: 9755538" + }, + { + "Answer": "", + "Explanation": "question_id: 17731822" + }, + { + "Answer": "", + "Explanation": "question_id: 11837979" + }, + { + "Answer": "", + "Explanation": "question_id: 952914" + }, + { + "Answer": "", + "Explanation": "question_id: 8740353" + }, + { + "Answer": "", + "Explanation": "question_id: 12905999" + }, + { + "Answer": "", + "Explanation": "question_id: 11755208" + }, + { + "Answer": "", + "Explanation": "question_id: 12897374" + }, + { + "Answer": "", + "Explanation": "question_id: 40852575" + }, + { + "Answer": "", + "Explanation": "question_id: 4135344" + }, + { + "Answer": "", + "Explanation": "question_id: 12280143" + }, + { + "Answer": "", + "Explanation": "question_id: 2759323" + }, + { + "Answer": "", + "Explanation": "question_id: 5306756" + }, + { + "Answer": "", + "Explanation": "question_id: 3494906" + }, + { + "Answer": "", + "Explanation": "question_id: 15856127" + }, + { + "Answer": "", + "Explanation": "question_id: 931092" + }, + { + "Answer": "", + "Explanation": "question_id: 7286879" + }, + { + "Answer": "", + "Explanation": "question_id: 7900882" + }, + { + "Answer": "", + "Explanation": "question_id: 6266727" + }, + { + "Answer": "", + "Explanation": "question_id: 275018" + }, + { + "Answer": "", + "Explanation": "question_id: 4641765" + }, + { + "Answer": "", + "Explanation": "question_id: 364519" + }, + { + "Answer": "", + "Explanation": "question_id: 18663026" + }, + { + "Answer": "", + "Explanation": "question_id: 3283984" + }, + { + "Answer": "", + "Explanation": "question_id: 42260840" + }, + { + "Answer": "", + "Explanation": "question_id: 19156472" + }, + { + "Answer": "", + "Explanation": "question_id: 8970524" + }, + { + "Answer": "", + "Explanation": "question_id: 2793324" + }, + { + "Answer": "", + "Explanation": "question_id: 5137497" + }, + { + "Answer": "", + "Explanation": "question_id: 2052390" + }, + { + "Answer": "", + "Explanation": "question_id: 22904654" + }, + { + "Answer": "", + "Explanation": "question_id: 7271385" + }, + { + "Answer": "", + "Explanation": "question_id: 9001509" + }, + { + "Answer": "", + "Explanation": "question_id: 3519125" + }, + { + "Answer": "", + "Explanation": "question_id: 251464" + }, + { + "Answer": "", + "Explanation": "question_id: 3735814" + }, + { + "Answer": "", + "Explanation": "question_id: 31818050" + }, + { + "Answer": "", + "Explanation": "question_id: 903853" + }, + { + "Answer": "", + "Explanation": "question_id: 6714826" + }, + { + "Answer": "", + "Explanation": "question_id: 13252333" + }, + { + "Answer": "", + "Explanation": "question_id: 3939361" + }, + { + "Answer": "", + "Explanation": "question_id: 3460161" + }, + { + "Answer": "", + "Explanation": "question_id: 9206964" + }, + { + "Answer": "", + "Explanation": "question_id: 1580270" + }, + { + "Answer": "", + "Explanation": "question_id: 41192805" + }, + { + "Answer": "", + "Explanation": "question_id: 8270092" + }, + { + "Answer": "", + "Explanation": "question_id: 11921649" + }, + { + "Answer": "", + "Explanation": "question_id: 20986631" + }, + { + "Answer": "", + "Explanation": "question_id: 761804" + }, + { + "Answer": "", + "Explanation": "question_id: 18594469" + }, + { + "Answer": "", + "Explanation": "question_id: 21800169" + }, + { + "Answer": "", + "Explanation": "question_id: 5864485" + }, + { + "Answer": "", + "Explanation": "question_id: 12987178" + }, + { + "Answer": "", + "Explanation": "question_id: 902761" + }, + { + "Answer": "", + "Explanation": "question_id: 2783079" + }, + { + "Answer": "", + "Explanation": "question_id: 312443" + }, + { + "Answer": "", + "Explanation": "question_id: 27175400" + }, + { + "Answer": "", + "Explanation": "question_id: 10472907" + }, + { + "Answer": "", + "Explanation": "question_id: 5384570" + }, + { + "Answer": "", + "Explanation": "question_id: 41251391" + }, + { + "Answer": "", + "Explanation": "question_id: 13794532" + }, + { + "Answer": "", + "Explanation": "question_id: 5507948" + }, + { + "Answer": "", + "Explanation": "question_id: 40144769" + }, + { + "Answer": "", + "Explanation": "question_id: 18872717" + }, + { + "Answer": "", + "Explanation": "question_id: 8687568" + }, + { + "Answer": "", + "Explanation": "question_id: 817122" + }, + { + "Answer": "", + "Explanation": "question_id: 2424412" + }, + { + "Answer": "", + "Explanation": "question_id: 9138112" + }, + { + "Answer": "", + "Explanation": "question_id: 35622945" + }, + { + "Answer": "", + "Explanation": "question_id: 7574841" + }, + { + "Answer": "", + "Explanation": "question_id: 2972212" + }, + { + "Answer": "", + "Explanation": "question_id: 3559559" + }, + { + "Answer": "", + "Explanation": "question_id: 8556076" + }, + { + "Answer": "", + "Explanation": "question_id: 8569201" + }, + { + "Answer": "", + "Explanation": "question_id: 13945749" + }, + { + "Answer": "", + "Explanation": "question_id: 24748445" + }, + { + "Answer": "", + "Explanation": "question_id: 18637651" + }, + { + "Answer": "", + "Explanation": "question_id: 72899" + }, + { + "Answer": "", + "Explanation": "question_id: 14262654" + }, + { + "Answer": "", + "Explanation": "question_id: 3673428" + }, + { + "Answer": "", + "Explanation": "question_id: 9206964" + }, + { + "Answer": "", + "Explanation": "question_id: 5180365" + }, + { + "Answer": "", + "Explanation": "question_id: 6916542" + }, + { + "Answer": "", + "Explanation": "question_id: 237079" + }, + { + "Answer": "", + "Explanation": "question_id: 20837786" + }, + { + "Answer": "", + "Explanation": "question_id: 21188504" + }, + { + "Answer": "", + "Explanation": "question_id: 37004138" + }, + { + "Answer": "", + "Explanation": "question_id: 20457038" + }, + { + "Answer": "", + "Explanation": "question_id: 6275762" + }, + { + "Answer": "", + "Explanation": "question_id: 17665809" + }, + { + "Answer": "", + "Explanation": "question_id: 10569438" + }, + { + "Answer": "", + "Explanation": "question_id: 21360028" + }, + { + "Answer": "", + "Explanation": "question_id: 18229082" + }, + { + "Answer": "", + "Explanation": "question_id: 1602934" + }, + { + "Answer": "", + "Explanation": "question_id: 5373474" + }, + { + "Answer": "", + "Explanation": "question_id: 1038824" + }, + { + "Answer": "", + "Explanation": "question_id: 1747817" + }, + { + "Answer": "", + "Explanation": "question_id: 38147447" + }, + { + "Answer": "", + "Explanation": "question_id: 6539881" + }, + { + "Answer": "", + "Explanation": "question_id: 15795525" + }, + { + "Answer": "", + "Explanation": "question_id: 19339" + }, + { + "Answer": "", + "Explanation": "question_id: 19011613" + }, + { + "Answer": "", + "Explanation": "question_id: 12814667" + }, + { + "Answer": "", + "Explanation": "question_id: 19948732" + }, + { + "Answer": "", + "Explanation": "question_id: 26724275" + }, + { + "Answer": "", + "Explanation": "question_id: 163542" + }, + { + "Answer": "", + "Explanation": "question_id: 11277432" + }, + { + "Answer": "", + "Explanation": "question_id: 3061761" + }, + { + "Answer": "", + "Explanation": "question_id: 29565452" + }, + { + "Answer": "", + "Explanation": "question_id: 39129846" + }, + { + "Answer": "", + "Explanation": "question_id: 8282553" + }, + { + "Answer": "", + "Explanation": "question_id: 19334374" + }, + { + "Answer": "", + "Explanation": "question_id: 14737222" + }, + { + "Answer": "", + "Explanation": "question_id: 727507" + }, + { + "Answer": "", + "Explanation": "question_id: 7142227" + }, + { + "Answer": "", + "Explanation": "question_id: 36139" + }, + { + "Answer": "", + "Explanation": "question_id: 3518778" + }, + { + "Answer": "", + "Explanation": "question_id: 36661837" + }, + { + "Answer": "", + "Explanation": "question_id: 19601086" + }, + { + "Answer": "", + "Explanation": "question_id: 1712227" + }, + { + "Answer": "", + "Explanation": "question_id: 18448469" + }, + { + "Answer": "", + "Explanation": "question_id: 11924135" + }, + { + "Answer": "", + "Explanation": "question_id: 15103484" + }, + { + "Answer": "", + "Explanation": "question_id: 2261011" + }, + { + "Answer": "", + "Explanation": "question_id: 6633523" + }, + { + "Answer": "", + "Explanation": "question_id: 237079" + }, + { + "Answer": "", + "Explanation": "question_id: 2850966" + }, + { + "Answer": "", + "Explanation": "question_id: 2545397" + }, + { + "Answer": "", + "Explanation": "question_id: 15286401" + }, + { + "Answer": "", + "Explanation": "question_id: 4928526" + }, + { + "Answer": "", + "Explanation": "question_id: 1957273" + }, + { + "Answer": "", + "Explanation": "question_id: 701402" + }, + { + "Answer": "", + "Explanation": "question_id: 24958010" + }, + { + "Answer": "", + "Explanation": "question_id: 9573244" + }, + { + "Answer": "", + "Explanation": "question_id: 29370211" + }, + { + "Answer": "", + "Explanation": "question_id: 27060098" + }, + { + "Answer": "", + "Explanation": "question_id: 17977584" + }, + { + "Answer": "", + "Explanation": "question_id: 22904654" + }, + { + "Answer": "", + "Explanation": "question_id: 37084812" + }, + { + "Answer": "", + "Explanation": "question_id: 1249388" + }, + { + "Answer": "", + "Explanation": "question_id: 977491" + }, + { + "Answer": "", + "Explanation": "question_id: 1908741" + }, + { + "Answer": "", + "Explanation": "question_id: 2397687" + }, + { + "Answer": "", + "Explanation": "question_id: 41513324" + }, + { + "Answer": "", + "Explanation": "question_id: 25698710" + }, + { + "Answer": "", + "Explanation": "question_id: 455612" + }, + { + "Answer": "", + "Explanation": "question_id: 7458689" + }, + { + "Answer": "", + "Explanation": "question_id: 11574195" + }, + { + "Answer": "", + "Explanation": "question_id: 31818050" + }, + { + "Answer": "", + "Explanation": "question_id: 9153527" + }, + { + "Answer": "", + "Explanation": "question_id: 1712227" + }, + { + "Answer": "", + "Explanation": "question_id: 931092" + }, + { + "Answer": "", + "Explanation": "question_id: 4906977" + }, + { + "Answer": "", + "Explanation": "question_id: 8459231" + }, + { + "Answer": "", + "Explanation": "question_id: 18312447" + }, + { + "Answer": "", + "Explanation": "question_id: 4668619" + }, + { + "Answer": "", + "Explanation": "question_id: 8440117" + }, + { + "Answer": "", + "Explanation": "question_id: 237079" + }, + { + "Answer": "", + "Explanation": "question_id: 15451958" + }, + { + "Answer": "", + "Explanation": "question_id: 29464234" + }, + { + "Answer": "", + "Explanation": "question_id: 13902805" + }, + { + "Answer": "", + "Explanation": "question_id: 31650399" + }, + { + "Answer": "", + "Explanation": "question_id: 4706499" + }, + { + "Answer": "", + "Explanation": "question_id: 22625616" + }, + { + "Answer": "", + "Explanation": "question_id: 3939361" + }, + { + "Answer": "", + "Explanation": "question_id: 24242433" + }, + { + "Answer": "", + "Explanation": "question_id: 5212870" + }, + { + "Answer": "", + "Explanation": "question_id: 36139" + }, + { + "Answer": "", + "Explanation": "question_id: 15985339" + }, + { + "Answer": "", + "Explanation": "question_id: 743806" + }, + { + "Answer": "", + "Explanation": "question_id: 19781609" + }, + { + "Answer": "", + "Explanation": "question_id: 12843099" + }, + { + "Answer": "", + "Explanation": "question_id: 4289331" + }, + { + "Answer": "", + "Explanation": "question_id: 9550867" + }, + { + "Answer": "", + "Explanation": "question_id: 3367288" + }, + { + "Answer": "", + "Explanation": "question_id: 761804" + }, + { + "Answer": "", + "Explanation": "question_id: 17071871" + }, + { + "Answer": "", + "Explanation": "question_id: 4915920" + }, + { + "Answer": "", + "Explanation": "question_id: 19601086" + }, + { + "Answer": "", + "Explanation": "question_id: 18116235" + }, + { + "Answer": "", + "Explanation": "question_id: 4906977" + }, + { + "Answer": "", + "Explanation": "question_id: 7262828" + }, + { + "Answer": "", + "Explanation": "question_id: 1456617" + }, + { + "Answer": "", + "Explanation": "question_id: 4644025" + }, + { + "Answer": "", + "Explanation": "question_id: 8577137" + }, + { + "Answer": "", + "Explanation": "question_id: 34410358" + }, + { + "Answer": "", + "Explanation": "question_id: 1143379" + }, + { + "Answer": "", + "Explanation": "question_id: 23887881" + }, + { + "Answer": "", + "Explanation": "question_id: 17149561" + }, + { + "Answer": "", + "Explanation": "question_id: 6618515" + }, + { + "Answer": "", + "Explanation": "question_id: 19339" + }, + { + "Answer": "", + "Explanation": "question_id: 3945750" + }, + { + "Answer": "", + "Explanation": "question_id: 10822635" + }, + { + "Answer": "", + "Explanation": "question_id: 27516849" + }, + { + "Answer": "", + "Explanation": "question_id: 12985456" + }, + { + "Answer": "", + "Explanation": "question_id: 19112735" + }, + { + "Answer": "", + "Explanation": "question_id: 7371935" + }, + { + "Answer": "", + "Explanation": "question_id: 17071871" + }, + { + "Answer": "", + "Explanation": "question_id: 10408927" + }, + { + "Answer": "", + "Explanation": "question_id: 19300174" + }, + { + "Answer": "", + "Explanation": "question_id: 8639973" + }, + { + "Answer": "", + "Explanation": "question_id: 1823058" + }, + { + "Answer": "", + "Explanation": "question_id: 510348" + }, + { + "Answer": "", + "Explanation": "question_id: 4842956" + }, + { + "Answer": "", + "Explanation": "question_id: 4126227" + }, + { + "Answer": "", + "Explanation": "question_id: 4004550" + }, + { + "Answer": "", + "Explanation": "question_id: 13636592" + }, + { + "Answer": "", + "Explanation": "question_id: 5183533" + }, + { + "Answer": "", + "Explanation": "question_id: 5503925" + }, + { + "Answer": "", + "Explanation": "question_id: 2600191" + }, + { + "Answer": "", + "Explanation": "question_id: 6710684" + }, + { + "Answer": "", + "Explanation": "question_id: 28207743" + }, + { + "Answer": "", + "Explanation": "question_id: 14043934" + }, + { + "Answer": "", + "Explanation": "question_id: 18789262" + }, + { + "Answer": "", + "Explanation": "question_id: 10607688" + }, + { + "Answer": "", + "Explanation": "question_id: 20222485" + }, + { + "Answer": "", + "Explanation": "question_id: 761804" + }, + { + "Answer": "", + "Explanation": "question_id: 16418415" + }, + { + "Answer": "", + "Explanation": "question_id: 17690738" + }, + { + "Answer": "", + "Explanation": "question_id: 11801309" + }, + { + "Answer": "", + "Explanation": "question_id: 18722196" + }, + { + "Answer": "", + "Explanation": "question_id: 9035479" + }, + { + "Answer": "", + "Explanation": "question_id: 9507819" + }, + { + "Answer": "", + "Explanation": "question_id: 2612802" + }, + { + "Answer": "", + "Explanation": "question_id: 15548506" + }, + { + "Answer": "", + "Explanation": "question_id: 319426" + }, + { + "Answer": "", + "Explanation": "question_id: 1450897" + }, + { + "Answer": "", + "Explanation": "question_id: 9849192" + }, + { + "Answer": "", + "Explanation": "question_id: 1883604" + }, + { + "Answer": "", + "Explanation": "question_id: 6159900" + }, + { + "Answer": "", + "Explanation": "question_id: 73663" + }, + { + "Answer": "", + "Explanation": "question_id: 11144513" + }, + { + "Answer": "", + "Explanation": "question_id: 20865487" + }, + { + "Answer": "", + "Explanation": "question_id: 24076297" + }, + { + "Answer": "", + "Explanation": "question_id: 3895424" + }, + { + "Answer": "", + "Explanation": "question_id: 39381222" + }, + { + "Answer": "", + "Explanation": "question_id: 1800187" + }, + { + "Answer": "", + "Explanation": "question_id: 39816795" + }, + { + "Answer": "", + "Explanation": "question_id: 14442636" + }, + { + "Answer": "", + "Explanation": "question_id: 37080612" + }, + { + "Answer": "", + "Explanation": "question_id: 15158599" + }, + { + "Answer": "", + "Explanation": "question_id: 18079029" + }, + { + "Answer": "", + "Explanation": "question_id: 8425046" + }, + { + "Answer": "", + "Explanation": "question_id: 21261330" + }, + { + "Answer": "", + "Explanation": "question_id: 273192" + }, + { + "Answer": "", + "Explanation": "question_id: 22093471" + }, + { + "Answer": "", + "Explanation": "question_id: 2742784" + }, + { + "Answer": "", + "Explanation": "question_id: 21129020" + }, + { + "Answer": "", + "Explanation": "question_id: 3608411" + }, + { + "Answer": "", + "Explanation": "question_id: 42548362" + }, + { + "Answer": "", + "Explanation": "question_id: 7768859" + }, + { + "Answer": "", + "Explanation": "question_id: 89228" + }, + { + "Answer": "", + "Explanation": "question_id: 2317134" + }, + { + "Answer": "", + "Explanation": "question_id: 19794051" + }, + { + "Answer": "", + "Explanation": "question_id: 8936030" + }, + { + "Answer": "", + "Explanation": "question_id: 19339" + }, + { + "Answer": "", + "Explanation": "question_id: 2338531" + }, + { + "Answer": "", + "Explanation": "question_id: 5891453" + }, + { + "Answer": "", + "Explanation": "question_id: 464736" + }, + { + "Answer": "", + "Explanation": "question_id: 2674391" + }, + { + "Answer": "", + "Explanation": "question_id: 6726636" + }, + { + "Answer": "", + "Explanation": "question_id: 18071222" + }, + { + "Answer": "", + "Explanation": "question_id: 4302166" + }, + { + "Answer": "", + "Explanation": "question_id: 14764126" + }, + { + "Answer": "", + "Explanation": "question_id: 3899980" + }, + { + "Answer": "", + "Explanation": "question_id: 8192379" + }, + { + "Answer": "", + "Explanation": "question_id: 2759067" + }, + { + "Answer": "", + "Explanation": "question_id: 4741537" + }, + { + "Answer": "", + "Explanation": "question_id: 6407362" + }, + { + "Answer": "", + "Explanation": "question_id: 14159753" + }, + { + "Answer": "", + "Explanation": "question_id: 33565643" + }, + { + "Answer": "", + "Explanation": "question_id: 698223" + }, + { + "Answer": "", + "Explanation": "question_id: 466345" + }, + { + "Answer": "", + "Explanation": "question_id: 31818050" + }, + { + "Answer": "", + "Explanation": "question_id: 20400135" + }, + { + "Answer": "", + "Explanation": "question_id: 32296933" + }, + { + "Answer": "", + "Explanation": "question_id: 748491" + }, + { + "Answer": "", + "Explanation": "question_id: 439115" + }, + { + "Answer": "", + "Explanation": "question_id: 14180866" + }, + { + "Answer": "", + "Explanation": "question_id: 4315506" + }, + { + "Answer": "", + "Explanation": "question_id: 40094588" + }, + { + "Answer": "", + "Explanation": "question_id: 17166601" + }, + { + "Answer": "", + "Explanation": "question_id: 1532810" + }, + { + "Answer": "", + "Explanation": "question_id: 16193578" + }, + { + "Answer": "", + "Explanation": "question_id: 6243460" + }, + { + "Answer": "", + "Explanation": "question_id: 11932729" + }, + { + "Answer": "", + "Explanation": "question_id: 3207219" + }, + { + "Answer": "", + "Explanation": "question_id: 988228" + }, + { + "Answer": "", + "Explanation": "question_id: 11760095" + }, + { + "Answer": "", + "Explanation": "question_id: 29311354" + }, + { + "Answer": "", + "Explanation": "question_id: 26894227" + }, + { + "Answer": "", + "Explanation": "question_id: 2689189" + }, + { + "Answer": "", + "Explanation": "question_id: 15269161" + }, + { + "Answer": "", + "Explanation": "question_id: 3475251" + }, + { + "Answer": "", + "Explanation": "question_id: 7125009" + }, + { + "Answer": "", + "Explanation": "question_id: 6159900" + }, + { + "Answer": "", + "Explanation": "question_id: 32283692" + }, + { + "Answer": "", + "Explanation": "question_id: 23855976" + }, + { + "Answer": "", + "Explanation": "question_id: 19069701" + }, + { + "Answer": "", + "Explanation": "question_id: 19267591" + }, + { + "Answer": "", + "Explanation": "question_id: 8214932" + }, + { + "Answer": "", + "Explanation": "question_id: 20796355" + }, + { + "Answer": "", + "Explanation": "question_id: 379906" + }, + { + "Answer": "", + "Explanation": "question_id: 2212433" + }, + { + "Answer": "", + "Explanation": "question_id: 14956683" + }, + { + "Answer": "", + "Explanation": "question_id: 867866" + }, + { + "Answer": "", + "Explanation": "question_id: 8671702" + }, + { + "Answer": "", + "Explanation": "question_id: 7351270" + }, + { + "Answer": "", + "Explanation": "question_id: 8712332" + }, + { + "Answer": "", + "Explanation": "question_id: 38426168" + }, + { + "Answer": "", + "Explanation": "question_id: 18397805" + }, + { + "Answer": "", + "Explanation": "question_id: 14734750" + }, + { + "Answer": "", + "Explanation": "question_id: 17812978" + }, + { + "Answer": "", + "Explanation": "question_id: 2186656" + }, + { + "Answer": "", + "Explanation": "question_id: 3283306" + }, + { + "Answer": "", + "Explanation": "question_id: 4287209" + }, + { + "Answer": "", + "Explanation": "question_id: 533398" + }, + { + "Answer": "", + "Explanation": "question_id: 356483" + }, + { + "Answer": "", + "Explanation": "question_id: 15096021" + }, + { + "Answer": "", + "Explanation": "question_id: 32283692" + }, + { + "Answer": "", + "Explanation": "question_id: 20230211" + }, + { + "Answer": "", + "Explanation": "question_id: 2111163" + }, + { + "Answer": "", + "Explanation": "question_id: 5061582" + }, + { + "Answer": "", + "Explanation": "question_id: 5306079" + }, + { + "Answer": "", + "Explanation": "question_id: 14931769" + }, + { + "Answer": "", + "Explanation": "question_id: 3308102" + }, + { + "Answer": "", + "Explanation": "question_id: 21164910" + }, + { + "Answer": "", + "Explanation": "question_id: 843277" + }, + { + "Answer": "", + "Explanation": "question_id: 17193850" + }, + { + "Answer": "", + "Explanation": "question_id: 17138464" + }, + { + "Answer": "", + "Explanation": "question_id: 311627" + }, + { + "Answer": "", + "Explanation": "question_id: 3989016" + }, + { + "Answer": "", + "Explanation": "question_id: 13781828" + }, + { + "Answer": "", + "Explanation": "question_id: 40173569" + }, + { + "Answer": "", + "Explanation": "question_id: 11351874" + }, + { + "Answer": "", + "Explanation": "question_id: 14971373" + }, + { + "Answer": "", + "Explanation": "question_id: 40963347" + }, + { + "Answer": "", + "Explanation": "question_id: 10666163" + }, + { + "Answer": "", + "Explanation": "question_id: 11840111" + }, + { + "Answer": "", + "Explanation": "question_id: 13167391" + }, + { + "Answer": "", + "Explanation": "question_id: 1400608" + }, + { + "Answer": "", + "Explanation": "question_id: 8214932" + }, + { + "Answer": "", + "Explanation": "question_id: 1012185" + }, + { + "Answer": "", + "Explanation": "question_id: 20490274" + }, + { + "Answer": "", + "Explanation": "question_id: 9210525" + }, + { + "Answer": "", + "Explanation": "question_id: 455612" + }, + { + "Answer": "", + "Explanation": "question_id: 30651487" + }, + { + "Answer": "", + "Explanation": "question_id: 4628618" + }, + { + "Answer": "", + "Explanation": "question_id: 10037742" + }, + { + "Answer": "", + "Explanation": "question_id: 3294889" + }, + { + "Answer": "", + "Explanation": "question_id: 13793973" + }, + { + "Answer": "", + "Explanation": "question_id: 11073609" + }, + { + "Answer": "", + "Explanation": "question_id: 37497559" + }, + { + "Answer": "", + "Explanation": "question_id: 15148684" + }, + { + "Answer": "", + "Explanation": "question_id: 17555218" + }, + { + "Answer": "", + "Explanation": "question_id: 19738169" + }, + { + "Answer": "", + "Explanation": "question_id: 32490629" + }, + { + "Answer": "", + "Explanation": "question_id: 15661013" + }, + { + "Answer": "", + "Explanation": "question_id: 10040143" + }, + { + "Answer": "", + "Explanation": "question_id: 30843103" + }, + { + "Answer": "", + "Explanation": "question_id: 20183069" + }, + { + "Answer": "", + "Explanation": "question_id: 5864485" + }, + { + "Answer": "", + "Explanation": "question_id: 3398589" + }, + { + "Answer": "", + "Explanation": "question_id: 9089043" + }, + { + "Answer": "", + "Explanation": "question_id: 14673394" + }, + { + "Answer": "", + "Explanation": "question_id: 27946742" + }, + { + "Answer": "", + "Explanation": "question_id: 3940128" + }, + { + "Answer": "", + "Explanation": "question_id: 15043326" + }, + { + "Answer": "", + "Explanation": "question_id: 2582580" + }, + { + "Answer": "", + "Explanation": "question_id: 16866261" + }, + { + "Answer": "", + "Explanation": "question_id: 2587402" + }, + { + "Answer": "", + "Explanation": "question_id: 35005907" + }, + { + "Answer": "", + "Explanation": "question_id: 31617845" + }, + { + "Answer": "", + "Explanation": "question_id: 7999935" + }, + { + "Answer": "", + "Explanation": "question_id: 13168252" + }, + { + "Answer": "", + "Explanation": "question_id: 209840" + }, + { + "Answer": "", + "Explanation": "question_id: 6429638" + }, + { + "Answer": "", + "Explanation": "question_id: 36402748" + }, + { + "Answer": "", + "Explanation": "question_id: 7238226" + }, + { + "Answer": "", + "Explanation": "question_id: 9637838" + }, + { + "Answer": "", + "Explanation": "question_id: 3996904" + }, + { + "Answer": "", + "Explanation": "question_id: 613183" + }, + { + "Answer": "", + "Explanation": "question_id: 8199398" + }, + { + "Answer": "", + "Explanation": "question_id: 3506678" + }, + { + "Answer": "", + "Explanation": "question_id: 8905864" + }, + { + "Answer": "", + "Explanation": "question_id: 22676" + }, + { + "Answer": "", + "Explanation": "question_id: 674519" + }, + { + "Answer": "", + "Explanation": "question_id: 15474933" + }, + { + "Answer": "", + "Explanation": "question_id: 12589481" + }, + { + "Answer": "", + "Explanation": "question_id: 317413" + }, + { + "Answer": "", + "Explanation": "question_id: 17618981" + }, + { + "Answer": "", + "Explanation": "question_id: 2424412" + }, + { + "Answer": "", + "Explanation": "question_id: 1712227" + }, + { + "Answer": "", + "Explanation": "question_id: 2769061" + }, + { + "Answer": "", + "Explanation": "question_id: 11009155" + }, + { + "Answer": "", + "Explanation": "question_id: 18170459" + }, + { + "Answer": "", + "Explanation": "question_id: 23748995" + }, + { + "Answer": "", + "Explanation": "question_id: 861190" + }, + { + "Answer": "", + "Explanation": "question_id: 15096021" + }, + { + "Answer": "", + "Explanation": "question_id: 2011048" + }, + { + "Answer": "", + "Explanation": "question_id: 730764" + }, + { + "Answer": "", + "Explanation": "question_id: 674764" + }, + { + "Answer": "", + "Explanation": "question_id: 176918" + }, + { + "Answer": "", + "Explanation": "question_id: 21887754" + }, + { + "Answer": "", + "Explanation": "question_id: 432842" + }, + { + "Answer": "", + "Explanation": "question_id: 42950" + }, + { + "Answer": "", + "Explanation": "question_id: 3207219" + }, + { + "Answer": "", + "Explanation": "question_id: 26541968" + }, + { + "Answer": "", + "Explanation": "question_id: 10213994" + }, + { + "Answer": "", + "Explanation": "question_id: 4059550" + }, + { + "Answer": "", + "Explanation": "question_id: 930397" + }, + { + "Answer": "", + "Explanation": "question_id: 8383213" + }, + { + "Answer": "", + "Explanation": "question_id: 13411544" + }, + { + "Answer": "", + "Explanation": "question_id: 1534542" + }, + { + "Answer": "", + "Explanation": "question_id: 8199398" + }, + { + "Answer": "", + "Explanation": "question_id: 32533944" + }, + { + "Answer": "", + "Explanation": "question_id: 26894227" + }, + { + "Answer": "", + "Explanation": "question_id: 1883980" + }, + { + "Answer": "", + "Explanation": "question_id: 18649884" + }, + { + "Answer": "", + "Explanation": "question_id: 11066874" + }, + { + "Answer": "", + "Explanation": "question_id: 16766643" + }, + { + "Answer": "", + "Explanation": "question_id: 10750802" + }, + { + "Answer": "", + "Explanation": "question_id: 39414085" + }, + { + "Answer": "", + "Explanation": "question_id: 3159155" + }, + { + "Answer": "", + "Explanation": "question_id: 5048841" + }, + { + "Answer": "", + "Explanation": "question_id: 575819" + }, + { + "Answer": "", + "Explanation": "question_id: 5404068" + }, + { + "Answer": "", + "Explanation": "question_id: 546321" + }, + { + "Answer": "", + "Explanation": "question_id: 21822054" + }, + { + "Answer": "", + "Explanation": "question_id: 5352546" + }, + { + "Answer": "", + "Explanation": "question_id: 3878555" + }, + { + "Answer": "", + "Explanation": "question_id: 11040626" + }, + { + "Answer": "", + "Explanation": "question_id: 18131367" + }, + { + "Answer": "", + "Explanation": "question_id: 2397687" + }, + { + "Answer": "", + "Explanation": "question_id: 5844672" + }, + { + "Answer": "", + "Explanation": "question_id: 19745091" + }, + { + "Answer": "", + "Explanation": "question_id: 33058590" + }, + { + "Answer": "", + "Explanation": "question_id: 2225564" + }, + { + "Answer": "", + "Explanation": "question_id: 31818050" + }, + { + "Answer": "", + "Explanation": "question_id: 7372592" + }, + { + "Answer": "", + "Explanation": "question_id: 29360607" + }, + { + "Answer": "", + "Explanation": "question_id: 14637696" + }, + { + "Answer": "", + "Explanation": "question_id: 2054416" + }, + { + "Answer": "", + "Explanation": "question_id: 11406091" + }, + { + "Answer": "", + "Explanation": "question_id: 25040875" + }, + { + "Answer": "", + "Explanation": "question_id: 13070461" + }, + { + "Answer": "", + "Explanation": "question_id: 13076560" + }, + { + "Answer": "", + "Explanation": "question_id: 20107570" + }, + { + "Answer": "", + "Explanation": "question_id: 18689823" + }, + { + "Answer": "", + "Explanation": "question_id: 16228248" + }, + { + "Answer": "", + "Explanation": "question_id: 14227561" + }, + { + "Answer": "", + "Explanation": "question_id: 40384599" + }, + { + "Answer": "", + "Explanation": "question_id: 13902805" + }, + { + "Answer": "", + "Explanation": "question_id: 3820312" + }, + { + "Answer": "", + "Explanation": "question_id: 899103" + }, + { + "Answer": "", + "Explanation": "question_id: 14295673" + }, + { + "Answer": "", + "Explanation": "question_id: 21805490" + }, + { + "Answer": "", + "Explanation": "question_id: 3207219" + }, + { + "Answer": "", + "Explanation": "question_id: 2508861" + }, + { + "Answer": "", + "Explanation": "question_id: 13163145" + }, + { + "Answer": "", + "Explanation": "question_id: 12201577" + }, + { + "Answer": "", + "Explanation": "question_id: 4914277" + }, + { + "Answer": "", + "Explanation": "question_id: 19894365" + }, + { + "Answer": "", + "Explanation": "question_id: 31029560" + }, + { + "Answer": "", + "Explanation": "question_id: 10365225" + }, + { + "Answer": "", + "Explanation": "question_id: 4810537" + }, + { + "Answer": "", + "Explanation": "question_id: 30759776" + }, + { + "Answer": "", + "Explanation": "question_id: 13408919" + }, + { + "Answer": "", + "Explanation": "question_id: 7555335" + }, + { + "Answer": "", + "Explanation": "question_id: 6797984" + }, + { + "Answer": "", + "Explanation": "question_id: 6510477" + }, + { + "Answer": "", + "Explanation": "question_id: 5558418" + }, + { + "Answer": "", + "Explanation": "question_id: 1185524" + }, + { + "Answer": "", + "Explanation": "question_id: 15313250" + }, + { + "Answer": "", + "Explanation": "question_id: 21800169" + }, + { + "Answer": "", + "Explanation": "question_id: 31743603" + }, + { + "Answer": "", + "Explanation": "question_id: 40156469" + }, + { + "Answer": "", + "Explanation": "question_id: 23306653" + }, + { + "Answer": "", + "Explanation": "question_id: 432842" + }, + { + "Answer": "", + "Explanation": "question_id: 41067960" + }, + { + "Answer": "", + "Explanation": "question_id: 5399112" + }, + { + "Answer": "", + "Explanation": "question_id: 19035186" + }, + { + "Answer": "", + "Explanation": "question_id: 674764" + }, + { + "Answer": "", + "Explanation": "question_id: 2990121" + }, + { + "Answer": "", + "Explanation": "question_id: 18367007" + }, + { + "Answer": "", + "Explanation": "question_id: 6740865" + }, + { + "Answer": "", + "Explanation": "question_id: 2990121" + }, + { + "Answer": "", + "Explanation": "question_id: 4174941" + }, + { + "Answer": "", + "Explanation": "question_id: 8081545" + }, + { + "Answer": "", + "Explanation": "question_id: 961263" + }, + { + "Answer": "", + "Explanation": "question_id: 72899" + }, + { + "Answer": "", + "Explanation": "question_id: 755857" + }, + { + "Answer": "", + "Explanation": "question_id: 3320406" + }, + { + "Answer": "", + "Explanation": "question_id: 27896214" + }, + { + "Answer": "", + "Explanation": "question_id: 20461165" + }, + { + "Answer": "", + "Explanation": "question_id: 17027690" + }, + { + "Answer": "", + "Explanation": "question_id: 730764" + }, + { + "Answer": "", + "Explanation": "question_id: 17960441" + }, + { + "Answer": "", + "Explanation": "question_id: 39299703" + }, + { + "Answer": "", + "Explanation": "question_id: 36190533" + }, + { + "Answer": "", + "Explanation": "question_id: 28431359" + }, + { + "Answer": "", + "Explanation": "question_id: 227459" + }, + { + "Answer": "", + "Explanation": "question_id: 6159900" + }, + { + "Answer": "", + "Explanation": "question_id: 843277" + }, + { + "Answer": "", + "Explanation": "question_id: 24958010" + }, + { + "Answer": "", + "Explanation": "question_id: 11399384" + }, + { + "Answer": "", + "Explanation": "question_id: 5333244" + }, + { + "Answer": "", + "Explanation": "question_id: 73663" + }, + { + "Answer": "", + "Explanation": "question_id: 9889635" + }, + { + "Answer": "", + "Explanation": "question_id: 402504" + }, + { + "Answer": "", + "Explanation": "question_id: 120656" + }, + { + "Answer": "", + "Explanation": "question_id: 373194" + }, + { + "Answer": "", + "Explanation": "question_id: 6586310" + }, + { + "Answer": "", + "Explanation": "question_id: 17457793" + }, + { + "Answer": "", + "Explanation": "question_id: 14766194" + }, + { + "Answer": "", + "Explanation": "question_id: 17467504" + }, + { + "Answer": "", + "Explanation": "question_id: 275018" + }, + { + "Answer": "", + "Explanation": "question_id: 610883" + }, + { + "Answer": "", + "Explanation": "question_id: 7961363" + }, + { + "Answer": "", + "Explanation": "question_id: 1712227" + }, + { + "Answer": "", + "Explanation": "question_id: 13002848" + }, + { + "Answer": "", + "Explanation": "question_id: 5137497" + }, + { + "Answer": "", + "Explanation": "question_id: 2430539" + }, + { + "Answer": "", + "Explanation": "question_id: 10194713" + }, + { + "Answer": "", + "Explanation": "question_id: 14986218" + }, + { + "Answer": "", + "Explanation": "question_id: 1185524" + }, + { + "Answer": "", + "Explanation": "question_id: 12211944" + }, + { + "Answer": "", + "Explanation": "question_id: 34015615" + }, + { + "Answer": "", + "Explanation": "question_id: 13368659" + }, + { + "Answer": "", + "Explanation": "question_id: 13628725" + }, + { + "Answer": "", + "Explanation": "question_id: 12485244" + }, + { + "Answer": "", + "Explanation": "question_id: 10258584" + }, + { + "Answer": "", + "Explanation": "question_id: 14043934" + }, + { + "Answer": "", + "Explanation": "question_id: 19602931" + }, + { + "Answer": "", + "Explanation": "question_id: 5453026" + }, + { + "Answer": "", + "Explanation": "question_id: 31371879" + }, + { + "Answer": "", + "Explanation": "question_id: 19490064" + }, + { + "Answer": "", + "Explanation": "question_id: 509742" + }, + { + "Answer": "", + "Explanation": "question_id: 20400135" + }, + { + "Answer": "", + "Explanation": "question_id: 16868457" + }, + { + "Answer": "", + "Explanation": "question_id: 415511" + }, + { + "Answer": "", + "Explanation": "question_id: 12362542" + }, + { + "Answer": "", + "Explanation": "question_id: 13145368" + }, + { + "Answer": "", + "Explanation": "question_id: 10675054" + }, + { + "Answer": "", + "Explanation": "question_id: 13237941" + }, + { + "Answer": "", + "Explanation": "question_id: 415511" + }, + { + "Answer": "", + "Explanation": "question_id: 29530232" + }, + { + "Answer": "", + "Explanation": "question_id: 2269827" + }, + { + "Answer": "", + "Explanation": "question_id: 364519" + }, + { + "Answer": "", + "Explanation": "question_id: 23566515" + }, + { + "Answer": "", + "Explanation": "question_id: 15286401" + }, + { + "Answer": "", + "Explanation": "question_id: 300445" + }, + { + "Answer": "", + "Explanation": "question_id: 2668909" + }, + { + "Answer": "", + "Explanation": "question_id: 1476" + }, + { + "Answer": "", + "Explanation": "question_id: 8372399" + }, + { + "Answer": "", + "Explanation": "question_id: 14931769" + }, + { + "Answer": "", + "Explanation": "question_id: 12329853" + }, + { + "Answer": "", + "Explanation": "question_id: 14961014" + }, + { + "Answer": "", + "Explanation": "question_id: 13557937" + }, + { + "Answer": "", + "Explanation": "question_id: 27587127" + }, + { + "Answer": "", + "Explanation": "question_id: 4690094" + }, + { + "Answer": "", + "Explanation": "question_id: 6996603" + }, + { + "Answer": "", + "Explanation": "question_id: 19758364" + }, + { + "Answer": "", + "Explanation": "question_id: 4152376" + }, + { + "Answer": "", + "Explanation": "question_id: 35420052" + }, + { + "Answer": "", + "Explanation": "question_id: 4581646" + }, + { + "Answer": "", + "Explanation": "question_id: 5555063" + }, + { + "Answer": "", + "Explanation": "question_id: 6159313" + }, + { + "Answer": "", + "Explanation": "question_id: 4581646" + }, + { + "Answer": "", + "Explanation": "question_id: 18351951" + }, + { + "Answer": "", + "Explanation": "question_id: 818949" + }, + { + "Answer": "", + "Explanation": "question_id: 37584492" + }, + { + "Answer": "", + "Explanation": "question_id: 4524723" + }, + { + "Answer": "", + "Explanation": "question_id: 22397058" + }, + { + "Answer": "", + "Explanation": "question_id: 364519" + }, + { + "Answer": "", + "Explanation": "question_id: 5486725" + }, + { + "Answer": "", + "Explanation": "question_id: 7128153" + }, + { + "Answer": "", + "Explanation": "question_id: 28767642" + }, + { + "Answer": "", + "Explanation": "question_id: 30551576" + }, + { + "Answer": "", + "Explanation": "question_id: 1222677" + }, + { + "Answer": "", + "Explanation": "question_id: 25991612" + }, + { + "Answer": "", + "Explanation": "question_id: 12096252" + }, + { + "Answer": "", + "Explanation": "question_id: 28667684" + }, + { + "Answer": "", + "Explanation": "question_id: 3728017" + }, + { + "Answer": "", + "Explanation": "question_id: 18684076" + }, + { + "Answer": "", + "Explanation": "question_id: 13142347" + }, + { + "Answer": "", + "Explanation": "question_id: 3061761" + }, + { + "Answer": "", + "Explanation": "question_id: 952914" + }, + { + "Answer": "", + "Explanation": "question_id: 1807026" + }, + { + "Answer": "", + "Explanation": "question_id: 18432823" + }, + { + "Answer": "", + "Explanation": "question_id: 2764586" + }, + { + "Answer": "", + "Explanation": "question_id: 16099694" + }, + { + "Answer": "", + "Explanation": "question_id: 2173797" + }, + { + "Answer": "", + "Explanation": "question_id: 5944630" + }, + { + "Answer": "", + "Explanation": "question_id: 8650415" + }, + { + "Answer": "", + "Explanation": "question_id: 3061761" + }, + { + "Answer": "", + "Explanation": "question_id: 4131123" + }, + { + "Answer": "", + "Explanation": "question_id: 15852295" + }, + { + "Answer": "", + "Explanation": "question_id: 610883" + }, + { + "Answer": "", + "Explanation": "question_id: 2354166" + }, + { + "Answer": "", + "Explanation": "question_id: 25440008" + }, + { + "Answer": "", + "Explanation": "question_id: 743806" + }, + { + "Answer": "", + "Explanation": "question_id: 34587346" + }, + { + "Answer": "", + "Explanation": "question_id: 4112265" + }, + { + "Answer": "", + "Explanation": "question_id: 18454570" + }, + { + "Answer": "", + "Explanation": "question_id: 16296643" + }, + { + "Answer": "", + "Explanation": "question_id: 18470323" + }, + { + "Answer": "", + "Explanation": "question_id: 2514961" + }, + { + "Answer": "", + "Explanation": "question_id: 22749706" + }, + { + "Answer": "", + "Explanation": "question_id: 19585280" + }, + { + "Answer": "", + "Explanation": "question_id: 3294889" + }, + { + "Answer": "", + "Explanation": "question_id: 14571103" + }, + { + "Answer": "", + "Explanation": "question_id: 20950650" + }, + { + "Answer": "", + "Explanation": "question_id: 32751229" + }, + { + "Answer": "", + "Explanation": "question_id: 39538010" + }, + { + "Answer": "", + "Explanation": "question_id: 17138464" + }, + { + "Answer": "", + "Explanation": "question_id: 10406130" + }, + { + "Answer": "", + "Explanation": "question_id: 22520932" + }, + { + "Answer": "", + "Explanation": "question_id: 31793195" + }, + { + "Answer": "", + "Explanation": "question_id: 2769061" + }, + { + "Answer": "", + "Explanation": "question_id: 8654637" + }, + { + "Answer": "", + "Explanation": "question_id: 4287209" + }, + { + "Answer": "", + "Explanation": "question_id: 5971312" + }, + { + "Answer": "", + "Explanation": "question_id: 3160752" + }, + { + "Answer": "", + "Explanation": "question_id: 12897374" + }, + { + "Answer": "", + "Explanation": "question_id: 41923858" + }, + { + "Answer": "", + "Explanation": "question_id: 1185524" + }, + { + "Answer": "", + "Explanation": "question_id: 902408" + }, + { + "Answer": "", + "Explanation": "question_id: 4642501" + }, + { + "Answer": "", + "Explanation": "question_id: 2407398" + }, + { + "Answer": "", + "Explanation": "question_id: 1094717" + }, + { + "Answer": "", + "Explanation": "question_id: 30241279" + }, + { + "Answer": "", + "Explanation": "question_id: 1854" + }, + { + "Answer": "", + "Explanation": "question_id: 34962104" + }, + { + "Answer": "", + "Explanation": "question_id: 546321" + }, + { + "Answer": "", + "Explanation": "question_id: 13668393" + }, + { + "Answer": "", + "Explanation": "question_id: 4706499" + }, + { + "Answer": "", + "Explanation": "question_id: 9618050" + }, + { + "Answer": "", + "Explanation": "question_id: 4703390" + }, + { + "Answer": "", + "Explanation": "question_id: 5254445" + }, + { + "Answer": "", + "Explanation": "question_id: 13128565" + }, + { + "Answer": "", + "Explanation": "question_id: 518021" + }, + { + "Answer": "", + "Explanation": "question_id: 761804" + }, + { + "Answer": "", + "Explanation": "question_id: 30747705" + }, + { + "Answer": "", + "Explanation": "question_id: 10839719" + }, + { + "Answer": "", + "Explanation": "question_id: 30693804" + }, + { + "Answer": "", + "Explanation": "question_id: 16568056" + }, + { + "Answer": "", + "Explanation": "question_id: 21562986" + }, + { + "Answer": "", + "Explanation": "question_id: 18050937" + }, + { + "Answer": "", + "Explanation": "question_id: 5843518" + }, + { + "Answer": "", + "Explanation": "question_id: 33078554" + }, + { + "Answer": "", + "Explanation": "question_id: 4182603" + }, + { + "Answer": "", + "Explanation": "question_id: 9760588" + }, + { + "Answer": "", + "Explanation": "question_id: 13209288" + }, + { + "Answer": "", + "Explanation": "question_id: 11621165" + }, + { + "Answer": "", + "Explanation": "question_id: 3296499" + }, + { + "Answer": "", + "Explanation": "question_id: 10569438" + }, + { + "Answer": "", + "Explanation": "question_id: 10155684" + }, + { + "Answer": "", + "Explanation": "question_id: 17895835" + }, + { + "Answer": "", + "Explanation": "question_id: 89228" + }, + { + "Answer": "", + "Explanation": "question_id: 931092" + }, + { + "Answer": "", + "Explanation": "question_id: 41133414" + }, + { + "Answer": "", + "Explanation": "question_id: 15459217" + }, + { + "Answer": "", + "Explanation": "question_id: 34902378" + }, + { + "Answer": "", + "Explanation": "question_id: 247770" + }, + { + "Answer": "", + "Explanation": "question_id: 16196712" + }, + { + "Answer": "", + "Explanation": "question_id: 2158347" + }, + { + "Answer": "", + "Explanation": "question_id: 36875258" + }, + { + "Answer": "", + "Explanation": "question_id: 3294889" + }, + { + "Answer": "", + "Explanation": "question_id: 9554544" + }, + { + "Answer": "", + "Explanation": "question_id: 273192" + }, + { + "Answer": "", + "Explanation": "question_id: 12324456" + }, + { + "Answer": "", + "Explanation": "question_id: 3294889" + }, + { + "Answer": "", + "Explanation": "question_id: 402504" + }, + { + "Answer": "", + "Explanation": "question_id: 4112265" + }, + { + "Answer": "", + "Explanation": "question_id: 20025882" + }, + { + "Answer": "", + "Explanation": "question_id: 7568627" + }, + { + "Answer": "", + "Explanation": "question_id: 973473" + }, + { + "Answer": "", + "Explanation": "question_id: 10373660" + }, + { + "Answer": "", + "Explanation": "question_id: 3411025" + }, + { + "Answer": "", + "Explanation": "question_id: 29836836" + }, + { + "Answer": "", + "Explanation": "question_id: 5971312" + }, + { + "Answer": "", + "Explanation": "question_id: 18200052" + }, + { + "Answer": "", + "Explanation": "question_id: 403421" + }, + { + "Answer": "", + "Explanation": "question_id: 9609375" + }, + { + "Answer": "", + "Explanation": "question_id: 15907200" + }, + { + "Answer": "", + "Explanation": "question_id: 22963263" + }, + { + "Answer": "", + "Explanation": "question_id: 24841306" + }, + { + "Answer": "", + "Explanation": "question_id: 40452956" + }, + { + "Answer": "", + "Explanation": "question_id: 15411107" + }, + { + "Answer": "", + "Explanation": "question_id: 9932549" + }, + { + "Answer": "", + "Explanation": "question_id: 186857" + }, + { + "Answer": "", + "Explanation": "question_id: 23823206" + }, + { + "Answer": "", + "Explanation": "question_id: 1720421" + }, + { + "Answer": "", + "Explanation": "question_id: 2045175" + }, + { + "Answer": "", + "Explanation": "question_id: 7263824" + }, + { + "Answer": "", + "Explanation": "question_id: 3276180" + }, + { + "Answer": "", + "Explanation": "question_id: 15411107" + }, + { + "Answer": "", + "Explanation": "question_id: 15571267" + }, + { + "Answer": "", + "Explanation": "question_id: 9376384" + }, + { + "Answer": "", + "Explanation": "question_id: 4940032" + }, + { + "Answer": "", + "Explanation": "question_id: 13627865" + }, + { + "Answer": "", + "Explanation": "question_id: 13368723" + }, + { + "Answer": "", + "Explanation": "question_id: 312443" + }, + { + "Answer": "", + "Explanation": "question_id: 5218948" + }, + { + "Answer": "", + "Explanation": "question_id: 32464280" + }, + { + "Answer": "", + "Explanation": "question_id: 40384599" + }, + { + "Answer": "", + "Explanation": "question_id: 9210525" + }, + { + "Answer": "", + "Explanation": "question_id: 678236" + }, + { + "Answer": "", + "Explanation": "question_id: 6797984" + }, + { + "Answer": "", + "Explanation": "question_id: 13490292" + }, + { + "Answer": "", + "Explanation": "question_id: 8901996" + }, + { + "Answer": "", + "Explanation": "question_id: 6378889" + }, + { + "Answer": "", + "Explanation": "question_id: 2497027" + }, + { + "Answer": "", + "Explanation": "question_id: 3595685" + }, + { + "Answer": "", + "Explanation": "question_id: 4357787" + }, + { + "Answer": "", + "Explanation": "question_id: 415511" + }, + { + "Answer": "", + "Explanation": "question_id: 940822" + }, + { + "Answer": "", + "Explanation": "question_id: 276052" + }, + { + "Answer": "", + "Explanation": "question_id: 19819863" + }, + { + "Answer": "", + "Explanation": "question_id: 20056548" + }, + { + "Answer": "", + "Explanation": "question_id: 18524112" + }, + { + "Answer": "", + "Explanation": "question_id: 14182339" + }, + { + "Answer": "", + "Explanation": "question_id: 2545397" + }, + { + "Answer": "", + "Explanation": "question_id: 674764" + }, + { + "Answer": "", + "Explanation": "question_id: 2233917" + }, + { + "Answer": "", + "Explanation": "question_id: 455612" + }, + { + "Answer": "", + "Explanation": "question_id: 14661051" + }, + { + "Answer": "", + "Explanation": "question_id: 4979542" + }, + { + "Answer": "", + "Explanation": "question_id: 3329386" + }, + { + "Answer": "", + "Explanation": "question_id: 40517350" + }, + { + "Answer": "", + "Explanation": "question_id: 1514553" + }, + { + "Answer": "", + "Explanation": "question_id: 3887469" + }, + { + "Answer": "", + "Explanation": "question_id: 329886" + }, + { + "Answer": "", + "Explanation": "question_id: 12224778" + }, + { + "Answer": "", + "Explanation": "question_id: 19328874" + }, + { + "Answer": "", + "Explanation": "question_id: 4906977" + }, + { + "Answer": "", + "Explanation": "question_id: 17679089" + }, + { + "Answer": "", + "Explanation": "question_id: 17815945" + }, + { + "Answer": "", + "Explanation": "question_id: 18366797" + }, + { + "Answer": "", + "Explanation": "question_id: 34197047" + }, + { + "Answer": "", + "Explanation": "question_id: 18176933" + }, + { + "Answer": "", + "Explanation": "question_id: 518021" + }, + { + "Answer": "", + "Explanation": "question_id: 31818050" + }, + { + "Answer": "", + "Explanation": "question_id: 4476373" + }, + { + "Answer": "", + "Explanation": "question_id: 28925267" + }, + { + "Answer": "", + "Explanation": "question_id: 931092" + }, + { + "Answer": "", + "Explanation": "question_id: 18319101" + }, + { + "Answer": "", + "Explanation": "question_id: 14914615" + }, + { + "Answer": "", + "Explanation": "question_id: 18461623" + }, + { + "Answer": "", + "Explanation": "question_id: 19863964" + }, + { + "Answer": "", + "Explanation": "question_id: 17166601" + }, + { + "Answer": "", + "Explanation": "question_id: 2428092" + }, + { + "Answer": "", + "Explanation": "question_id: 761804" + }, + { + "Answer": "", + "Explanation": "question_id: 19454970" + }, + { + "Answer": "", + "Explanation": "question_id: 18504967" + }, + { + "Answer": "", + "Explanation": "question_id: 9573244" + }, + { + "Answer": "", + "Explanation": "question_id: 11924135" + }, + { + "Answer": "", + "Explanation": "question_id: 27744882" + }, + { + "Answer": "", + "Explanation": "question_id: 13557937" + }, + { + "Answer": "", + "Explanation": "question_id: 6146778" + }, + { + "Answer": "", + "Explanation": "question_id: 587647" + }, + { + "Answer": "", + "Explanation": "question_id: 41821112" + }, + { + "Answer": "", + "Explanation": "question_id: 1592158" + }, + { + "Answer": "", + "Explanation": "question_id: 7287996" + }, + { + "Answer": "", + "Explanation": "question_id: 5999747" + }, + { + "Answer": "", + "Explanation": "question_id: 6889785" + }, + { + "Answer": "", + "Explanation": "question_id: 13252333" + }, + { + "Answer": "", + "Explanation": "question_id: 38147259" + }, + { + "Answer": "", + "Explanation": "question_id: 3718657" + }, + { + "Answer": "", + "Explanation": "question_id: 15043326" + }, + { + "Answer": "", + "Explanation": "question_id: 674519" + }, + { + "Answer": "", + "Explanation": "question_id: 42364992" + }, + { + "Answer": "", + "Explanation": "question_id: 39159475" + }, + { + "Answer": "", + "Explanation": "question_id: 8704952" + }, + { + "Answer": "", + "Explanation": "question_id: 2389846" + }, + { + "Answer": "", + "Explanation": "question_id: 14524322" + }, + { + "Answer": "", + "Explanation": "question_id: 753052" + }, + { + "Answer": "", + "Explanation": "question_id: 35945473" + }, + { + "Answer": "", + "Explanation": "question_id: 15352457" + }, + { + "Answer": "", + "Explanation": "question_id: 12476452" + }, + { + "Answer": "", + "Explanation": "question_id: 247770" + }, + { + "Answer": "", + "Explanation": "question_id: 41648246" + }, + { + "Answer": "", + "Explanation": "question_id: 11403474" + }, + { + "Answer": "", + "Explanation": "question_id: 36139" + }, + { + "Answer": "", + "Explanation": "question_id: 17952279" + }, + { + "Answer": "", + "Explanation": "question_id: 17038639" + }, + { + "Answer": "", + "Explanation": "question_id: 40744328" + }, + { + "Answer": "", + "Explanation": "question_id: 6159313" + }, + { + "Answer": "", + "Explanation": "question_id: 5826427" + }, + { + "Answer": "", + "Explanation": "question_id: 24082784" + }, + { + "Answer": "", + "Explanation": "question_id: 436599" + }, + { + "Answer": "", + "Explanation": "question_id: 8243188" + }, + { + "Answer": "", + "Explanation": "question_id: 4906977" + }, + { + "Answer": "", + "Explanation": "question_id: 19643099" + }, + { + "Answer": "", + "Explanation": "question_id: 587345" + }, + { + "Answer": "", + "Explanation": "question_id: 8899905" + }, + { + "Answer": "", + "Explanation": "question_id: 12182744" + }, + { + "Answer": "", + "Explanation": "question_id: 9470142" + }, + { + "Answer": "", + "Explanation": "question_id: 12030179" + }, + { + "Answer": "", + "Explanation": "question_id: 41821112" + }, + { + "Answer": "", + "Explanation": "question_id: 902408" + }, + { + "Answer": "", + "Explanation": "question_id: 11801309" + }, + { + "Answer": "", + "Explanation": "question_id: 82831" + }, + { + "Answer": "", + "Explanation": "question_id: 1602934" + }, + { + "Answer": "", + "Explanation": "question_id: 82831" + }, + { + "Answer": "", + "Explanation": "question_id: 16866261" + }, + { + "Answer": "", + "Explanation": "question_id: 4233476" + }, + { + "Answer": "", + "Explanation": "question_id: 29983106" + }, + { + "Answer": "", + "Explanation": "question_id: 17098654" + }, + { + "Answer": "", + "Explanation": "question_id: 15741759" + }, + { + "Answer": "", + "Explanation": "question_id: 8217613" + }, + { + "Answer": "", + "Explanation": "question_id: 19672101" + }, + { + "Answer": "", + "Explanation": "question_id: 14169122" + }, + { + "Answer": "", + "Explanation": "question_id: 10201977" + }, + { + "Answer": "", + "Explanation": "question_id: 10857924" + }, + { + "Answer": "", + "Explanation": "question_id: 29815129" + }, + { + "Answer": "", + "Explanation": "question_id: 15579649" + }, + { + "Answer": "", + "Explanation": "question_id: 6494508" + }, + { + "Answer": "", + "Explanation": "question_id: 13954840" + }, + { + "Answer": "", + "Explanation": "question_id: 17071871" + }, + { + "Answer": "", + "Explanation": "question_id: 12376863" + }, + { + "Answer": "", + "Explanation": "question_id: 38152389" + }, + { + "Answer": "", + "Explanation": "question_id: 31743603" + }, + { + "Answer": "", + "Explanation": "question_id: 5882405" + }, + { + "Answer": "", + "Explanation": "question_id: 3939361" + }, + { + "Answer": "", + "Explanation": "question_id: 674764" + }, + { + "Answer": "", + "Explanation": "question_id: 8528178" + }, + { + "Answer": "", + "Explanation": "question_id: 3964681" + }, + { + "Answer": "", + "Explanation": "question_id: 38535931" + }, + { + "Answer": "", + "Explanation": "question_id: 10543303" + }, + { + "Answer": "", + "Explanation": "question_id: 348196" + }, + { + "Answer": "", + "Explanation": "question_id: 20110170" + }, + { + "Answer": "", + "Explanation": "question_id: 31828240" + }, + { + "Answer": "", + "Explanation": "question_id: 455612" + }, + { + "Answer": "", + "Explanation": "question_id: 17117912" + }, + { + "Answer": "", + "Explanation": "question_id: 1186789" + }, + { + "Answer": "", + "Explanation": "question_id: 30729735" + }, + { + "Answer": "", + "Explanation": "question_id: 10716796" + }, + { + "Answer": "", + "Explanation": "question_id: 12557612" + }, + { + "Answer": "", + "Explanation": "question_id: 16766643" + }, + { + "Answer": "", + "Explanation": "question_id: 11760095" + }, + { + "Answer": "", + "Explanation": "question_id: 4484690" + }, + { + "Answer": "", + "Explanation": "question_id: 29360607" + }, + { + "Answer": "", + "Explanation": "question_id: 2168123" + }, + { + "Answer": "", + "Explanation": "question_id: 1400608" + }, + { + "Answer": "", + "Explanation": "question_id: 2890896" + }, + { + "Answer": "", + "Explanation": "question_id: 587345" + }, + { + "Answer": "", + "Explanation": "question_id: 17306755" + }, + { + "Answer": "", + "Explanation": "question_id: 17589590" + }, + { + "Answer": "", + "Explanation": "question_id: 15465204" + }, + { + "Answer": "", + "Explanation": "question_id: 237079" + }, + { + "Answer": "", + "Explanation": "question_id: 12777222" + }, + { + "Answer": "", + "Explanation": "question_id: 19779790" + }, + { + "Answer": "", + "Explanation": "question_id: 22365172" + }, + { + "Answer": "", + "Explanation": "question_id: 3945856" + }, + { + "Answer": "", + "Explanation": "question_id: 20154303" + }, + { + "Answer": "", + "Explanation": "question_id: 15271907" + }, + { + "Answer": "", + "Explanation": "question_id: 8270092" + }, + { + "Answer": "", + "Explanation": "question_id: 466345" + }, + { + "Answer": "", + "Explanation": "question_id: 1093322" + }, + { + "Answer": "", + "Explanation": "question_id: 356483" + }, + { + "Answer": "", + "Explanation": "question_id: 18524642" + }, + { + "Answer": "", + "Explanation": "question_id: 2918362" + }, + { + "Answer": "", + "Explanation": "question_id: 11692613" + }, + { + "Answer": "", + "Explanation": "question_id: 17134716" + }, + { + "Answer": "", + "Explanation": "question_id: 579856" + }, + { + "Answer": "", + "Explanation": "question_id: 5927180" + }, + { + "Answer": "", + "Explanation": "question_id: 4324790" + }, + { + "Answer": "", + "Explanation": "question_id: 3590165" + }, + { + "Answer": "", + "Explanation": "question_id: 11833266" + }, + { + "Answer": "", + "Explanation": "question_id: 5137497" + }, + { + "Answer": "", + "Explanation": "question_id: 4830535" + }, + { + "Answer": "", + "Explanation": "question_id: 12309976" + }, + { + "Answer": "", + "Explanation": "question_id: 21804935" + }, + { + "Answer": "", + "Explanation": "question_id: 13254241" + }, + { + "Answer": "", + "Explanation": "question_id: 38704545" + }, + { + "Answer": "", + "Explanation": "question_id: 9880173" + }, + { + "Answer": "", + "Explanation": "question_id: 19546911" + }, + { + "Answer": "", + "Explanation": "question_id: 4174941" + }, + { + "Answer": "", + "Explanation": "question_id: 3294889" + }, + { + "Answer": "", + "Explanation": "question_id: 1780174" + }, + { + "Answer": "", + "Explanation": "question_id: 3899782" + }, + { + "Answer": "", + "Explanation": "question_id: 31818050" + }, + { + "Answer": "", + "Explanation": "question_id: 6018340" + }, + { + "Answer": "", + "Explanation": "question_id: 4241757" + }, + { + "Answer": "", + "Explanation": "question_id: 13093727" + }, + { + "Answer": "", + "Explanation": "question_id: 16772071" + }, + { + "Answer": "", + "Explanation": "question_id: 4587915" + }, + { + "Answer": "", + "Explanation": "question_id: 9652832" + }, + { + "Answer": "", + "Explanation": "question_id: 32292554" + }, + { + "Answer": "", + "Explanation": "question_id: 4706499" + }, + { + "Answer": "", + "Explanation": "question_id: 4481724" + }, + { + "Answer": "", + "Explanation": "question_id: 30994370" + }, + { + "Answer": "", + "Explanation": "question_id: 845058" + }, + { + "Answer": "", + "Explanation": "question_id: 2338531" + }, + { + "Answer": "", + "Explanation": "question_id: 32874539" + }, + { + "Answer": "", + "Explanation": "question_id: 22187233" + }, + { + "Answer": "", + "Explanation": "question_id: 4789021" + }, + { + "Answer": "", + "Explanation": "question_id: 8305518" + }, + { + "Answer": "", + "Explanation": "question_id: 38231591" + }, + { + "Answer": "", + "Explanation": "question_id: 11303238" + }, + { + "Answer": "", + "Explanation": "question_id: 10346336" + }, + { + "Answer": "", + "Explanation": "question_id: 12402561" + }, + { + "Answer": "", + "Explanation": "question_id: 4008546" + }, + { + "Answer": "", + "Explanation": "question_id: 3008992" + }, + { + "Answer": "", + "Explanation": "question_id: 2173087" + }, + { + "Answer": "", + "Explanation": "question_id: 18837262" + }, + { + "Answer": "", + "Explanation": "question_id: 179369" + }, + { + "Answer": "", + "Explanation": "question_id: 6133434" + }, + { + "Answer": "", + "Explanation": "question_id: 28538536" + }, + { + "Answer": "", + "Explanation": "question_id: 6375343" + }, + { + "Answer": "", + "Explanation": "question_id: 4793617" + }, + { + "Answer": "", + "Explanation": "question_id: 20078816" + }, + { + "Answer": "", + "Explanation": "question_id: 663171" + }, + { + "Answer": "", + "Explanation": "question_id: 5501641" + }, + { + "Answer": "", + "Explanation": "question_id: 10194713" + }, + { + "Answer": "", + "Explanation": "question_id: 30945784" + }, + { + "Answer": "", + "Explanation": "question_id: 16412563" + }, + { + "Answer": "", + "Explanation": "question_id: 9210525" + }, + { + "Answer": "", + "Explanation": "question_id: 12717716" + }, + { + "Answer": "", + "Explanation": "question_id: 13628725" + }, + { + "Answer": "", + "Explanation": "question_id: 15752422" + }, + { + "Answer": "", + "Explanation": "question_id: 20205455" + }, + { + "Answer": "", + "Explanation": "question_id: 22702760" + }, + { + "Answer": "", + "Explanation": "question_id: 432842" + }, + { + "Answer": "", + "Explanation": "question_id: 798854" + }, + { + "Answer": "", + "Explanation": "question_id: 574236" + }, + { + "Answer": "", + "Explanation": "question_id: 28901311" + }, + { + "Answer": "", + "Explanation": "question_id: 11697709" + }, + { + "Answer": "", + "Explanation": "question_id: 16249440" + }, + { + "Answer": "", + "Explanation": "question_id: 21887754" + }, + { + "Answer": "", + "Explanation": "question_id: 6480441" + }, + { + "Answer": "", + "Explanation": "question_id: 18837607" + }, + { + "Answer": "", + "Explanation": "question_id: 17815945" + }, + { + "Answer": "", + "Explanation": "question_id: 14695134" + }, + { + "Answer": "", + "Explanation": "question_id: 4682088" + }, + { + "Answer": "", + "Explanation": "question_id: 89228" + }, + { + "Answer": "", + "Explanation": "question_id: 39532974" + }, + { + "Answer": "", + "Explanation": "question_id: 21205074" + }, + { + "Answer": "", + "Explanation": "question_id: 8704952" + }, + { + "Answer": "", + "Explanation": "question_id: 39607540" + }, + { + "Answer": "", + "Explanation": "question_id: 2372573" + }, + { + "Answer": "", + "Explanation": "question_id: 21800169" + }, + { + "Answer": "", + "Explanation": "question_id: 4230000" + }, + { + "Answer": "", + "Explanation": "question_id: 40016359" + }, + { + "Answer": "", + "Explanation": "question_id: 17960441" + }, + { + "Answer": "", + "Explanation": "question_id: 2597099" + }, + { + "Answer": "", + "Explanation": "question_id: 10915391" + }, + { + "Answer": "", + "Explanation": "question_id: 1854" + }, + { + "Answer": "", + "Explanation": "question_id: 27966626" + }, + { + "Answer": "", + "Explanation": "question_id: 12723751" + }, + { + "Answer": "", + "Explanation": "question_id: 748028" + }, + { + "Answer": "", + "Explanation": "question_id: 3376534" + }, + { + "Answer": "", + "Explanation": "question_id: 4697006" + }, + { + "Answer": "", + "Explanation": "question_id: 27975069" + }, + { + "Answer": "", + "Explanation": "question_id: 8215686" + }, + { + "Answer": "", + "Explanation": "question_id: 8243188" + }, + { + "Answer": "", + "Explanation": "question_id: 4454298" + }, + { + "Answer": "", + "Explanation": "question_id: 20876077" + }, + { + "Answer": "", + "Explanation": "question_id: 4108561" + }, + { + "Answer": "", + "Explanation": "question_id: 41071947" + }, + { + "Answer": "", + "Explanation": "question_id: 3518778" + }, + { + "Answer": "", + "Explanation": "question_id: 13656519" + }, + { + "Answer": "", + "Explanation": "question_id: 12575421" + }, + { + "Answer": "", + "Explanation": "question_id: 25817930" + }, + { + "Answer": "", + "Explanation": "question_id: 20180210" + }, + { + "Answer": "", + "Explanation": "question_id: 5618878" + }, + { + "Answer": "", + "Explanation": "question_id: 35118265" + }, + { + "Answer": "", + "Explanation": "question_id: 10960463" + }, + { + "Answer": "", + "Explanation": "question_id: 32838802" + }, + { + "Answer": "", + "Explanation": "question_id: 5010536" + }, + { + "Answer": "", + "Explanation": "question_id: 13842088" + }, + { + "Answer": "", + "Explanation": "question_id: 35414625" + }, + { + "Answer": "", + "Explanation": "question_id: 3097866" + }, + { + "Answer": "", + "Explanation": "question_id: 4127344" + }, + { + "Answer": "", + "Explanation": "question_id: 14853243" + }, + { + "Answer": "", + "Explanation": "question_id: 7961363" + }, + { + "Answer": "", + "Explanation": "question_id: 15405636" + }, + { + "Answer": "", + "Explanation": "question_id: 41923858" + }, + { + "Answer": "", + "Explanation": "question_id: 7138686" + }, + { + "Answer": "", + "Explanation": "question_id: 10194713" + }, + { + "Answer": "", + "Explanation": "question_id: 19205916" + }, + { + "Answer": "", + "Explanation": "question_id: 13567345" + }, + { + "Answer": "", + "Explanation": "question_id: 3437059" + }, + { + "Answer": "", + "Explanation": "question_id: 2152898" + }, + { + "Answer": "", + "Explanation": "question_id: 4880960" + }, + { + "Answer": "", + "Explanation": "question_id: 7745260" + }, + { + "Answer": "", + "Explanation": "question_id: 17117912" + }, + { + "Answer": "", + "Explanation": "question_id: 15852295" + }, + { + "Answer": "", + "Explanation": "question_id: 12974474" + }, + { + "Answer": "", + "Explanation": "question_id: 19729928" + }, + { + "Answer": "", + "Explanation": "question_id: 8153631" + }, + { + "Answer": "", + "Explanation": "question_id: 265960" + }, + { + "Answer": "", + "Explanation": "question_id: 14111705" + }, + { + "Answer": "", + "Explanation": "question_id: 18695605" + }, + { + "Answer": "", + "Explanation": "question_id: 354038" + }, + { + "Answer": "", + "Explanation": "question_id: 42950" + }, + { + "Answer": "", + "Explanation": "question_id: 19555472" + }, + { + "Answer": "", + "Explanation": "question_id: 35044115" + }, + { + "Answer": "", + "Explanation": "question_id: 6490560" + }, + { + "Answer": "", + "Explanation": "question_id: 25040875" + }, + { + "Answer": "", + "Explanation": "question_id: 19153328" + }, + { + "Answer": "", + "Explanation": "question_id: 15390374" + }, + { + "Answer": "", + "Explanation": "question_id: 10562778" + }, + { + "Answer": "", + "Explanation": "question_id: 8556076" + }, + { + "Answer": "", + "Explanation": "question_id: 15411107" + }, + { + "Answer": "", + "Explanation": "question_id: 20668060" + }, + { + "Answer": "", + "Explanation": "question_id: 1348026" + }, + { + "Answer": "", + "Explanation": "question_id: 21778118" + }, + { + "Answer": "", + "Explanation": "question_id: 1299855" + }, + { + "Answer": "", + "Explanation": "question_id: 31818050" + }, + { + "Answer": "", + "Explanation": "question_id: 20638006" + }, + { + "Answer": "", + "Explanation": "question_id: 15286401" + }, + { + "Answer": "", + "Explanation": "question_id: 10677350" + }, + { + "Answer": "", + "Explanation": "question_id: 10484261" + }, + { + "Answer": "", + "Explanation": "question_id: 18938276" + }, + { + "Answer": "", + "Explanation": "question_id: 2813829" + }, + { + "Answer": "", + "Explanation": "question_id: 5352546" + }, + { + "Answer": "", + "Explanation": "question_id: 12426043" + }, + { + "Answer": "", + "Explanation": "question_id: 4284648" + }, + { + "Answer": "", + "Explanation": "question_id: 16772071" + }, + { + "Answer": "", + "Explanation": "question_id: 40055835" + }, + { + "Answer": "", + "Explanation": "question_id: 1476" + }, + { + "Answer": "", + "Explanation": "question_id: 3780403" + }, + { + "Answer": "", + "Explanation": "question_id: 7996940" + }, + { + "Answer": "", + "Explanation": "question_id: 1185524" + }, + { + "Answer": "", + "Explanation": "question_id: 3777301" + }, + { + "Answer": "", + "Explanation": "question_id: 28657018" + }, + { + "Answer": "", + "Explanation": "question_id: 2600775" + }, + { + "Answer": "", + "Explanation": "question_id: 12030074" + }, + { + "Answer": "", + "Explanation": "question_id: 13840379" + }, + { + "Answer": "", + "Explanation": "question_id: 11041411" + }, + { + "Answer": "", + "Explanation": "question_id: 10805589" + }, + { + "Answer": "", + "Explanation": "question_id: 12768504" + }, + { + "Answer": "", + "Explanation": "question_id: 32511444" + }, + { + "Answer": "", + "Explanation": "question_id: 663171" + }, + { + "Answer": "", + "Explanation": "question_id: 41083229" + }, + { + "Answer": "", + "Explanation": "question_id: 8409095" + }, + { + "Answer": "", + "Explanation": "question_id: 5618878" + }, + { + "Answer": "", + "Explanation": "question_id: 1391026" + }, + { + "Answer": "", + "Explanation": "question_id: 1186789" + }, + { + "Answer": "", + "Explanation": "question_id: 642154" + }, + { + "Answer": "", + "Explanation": "question_id: 15886340" + }, + { + "Answer": "", + "Explanation": "question_id: 29035168" + }, + { + "Answer": "", + "Explanation": "question_id: 6696027" + }, + { + "Answer": "", + "Explanation": "question_id: 4940032" + }, + { + "Answer": "", + "Explanation": "question_id: 33127636" + }, + { + "Answer": "", + "Explanation": "question_id: 21947035" + }, + { + "Answer": "", + "Explanation": "question_id: 306400" + }, + { + "Answer": "", + "Explanation": "question_id: 14026704" + }, + { + "Answer": "", + "Explanation": "question_id: 4223923" + }, + { + "Answer": "", + "Explanation": "question_id: 15352457" + }, + { + "Answer": "", + "Explanation": "question_id: 30009948" + }, + { + "Answer": "", + "Explanation": "question_id: 6294179" + }, + { + "Answer": "", + "Explanation": "question_id: 11399384" + }, + { + "Answer": "", + "Explanation": "question_id: 7571635" + }, + { + "Answer": "", + "Explanation": "question_id: 10973614" + }, + { + "Answer": "", + "Explanation": "question_id: 82831" + }, + { + "Answer": "", + "Explanation": "question_id: 21899953" + }, + { + "Answer": "", + "Explanation": "question_id: 14764126" + }, + { + "Answer": "", + "Explanation": "question_id: 741877" + }, + { + "Answer": "", + "Explanation": "question_id: 1038824" + }, + { + "Answer": "", + "Explanation": "question_id: 2755950" + }, + { + "Answer": "", + "Explanation": "question_id: 8724352" + }, + { + "Answer": "", + "Explanation": "question_id: 2597166" + }, + { + "Answer": "", + "Explanation": "question_id: 31818050" + }, + { + "Answer": "", + "Explanation": "question_id: 1602934" + }, + { + "Answer": "", + "Explanation": "question_id: 1400608" + }, + { + "Answer": "", + "Explanation": "question_id: 13093727" + }, + { + "Answer": "", + "Explanation": "question_id: 3805958" + }, + { + "Answer": "", + "Explanation": "question_id: 17238587" + }, + { + "Answer": "", + "Explanation": "question_id: 17057544" + }, + { + "Answer": "", + "Explanation": "question_id: 3398589" + }, + { + "Answer": "", + "Explanation": "question_id: 41469647" + }, + { + "Answer": "", + "Explanation": "question_id: 12323403" + }, + { + "Answer": "", + "Explanation": "question_id: 354038" + }, + { + "Answer": "", + "Explanation": "question_id: 275018" + }, + { + "Answer": "", + "Explanation": "question_id: 13254241" + }, + { + "Answer": "", + "Explanation": "question_id: 577234" + }, + { + "Answer": "", + "Explanation": "question_id: 4998629" + }, + { + "Answer": "", + "Explanation": "question_id: 1388818" + }, + { + "Answer": "", + "Explanation": "question_id: 27905295" + }, + { + "Answer": "", + "Explanation": "question_id: 18022241" + }, + { + "Answer": "", + "Explanation": "question_id: 9841303" + }, + { + "Answer": "", + "Explanation": "question_id: 31743603" + }, + { + "Answer": "", + "Explanation": "question_id: 3939361" + }, + { + "Answer": "", + "Explanation": "question_id: 22187233" + }, + { + "Answer": "", + "Explanation": "question_id: 8905864" + }, + { + "Answer": "", + "Explanation": "question_id: 5844672" + }, + { + "Answer": "", + "Explanation": "question_id: 39605640" + }, + { + "Answer": "", + "Explanation": "question_id: 34023918" + }, + { + "Answer": "", + "Explanation": "question_id: 21350605" + }, + { + "Answer": "", + "Explanation": "question_id: 17438906" + }, + { + "Answer": "", + "Explanation": "question_id: 42462530" + }, + { + "Answer": "", + "Explanation": "question_id: 41246071" + }, + { + "Answer": "", + "Explanation": "question_id: 1207457" + }, + { + "Answer": "", + "Explanation": "question_id: 2556108" + }, + { + "Answer": "", + "Explanation": "question_id: 31405409" + }, + { + "Answer": "", + "Explanation": "question_id: 34097281" + }, + { + "Answer": "", + "Explanation": "question_id: 38457059" + }, + { + "Answer": "", + "Explanation": "question_id: 6372228" + }, + { + "Answer": "", + "Explanation": "question_id: 583557" + }, + { + "Answer": "", + "Explanation": "question_id: 27457970" + }, + { + "Answer": "", + "Explanation": "question_id: 3668964" + }, + { + "Answer": "", + "Explanation": "question_id: 10565598" + }, + { + "Answer": "", + "Explanation": "question_id: 8081545" + }, + { + "Answer": "", + "Explanation": "question_id: 3996904" + }, + { + "Answer": "", + "Explanation": "question_id: 12345387" + }, + { + "Answer": "", + "Explanation": "question_id: 9079540" + }, + { + "Answer": "", + "Explanation": "question_id: 44778" + }, + { + "Answer": "", + "Explanation": "question_id: 113655" + }, + { + "Answer": "", + "Explanation": "question_id: 2231663" + }, + { + "Answer": "", + "Explanation": "question_id: 849674" + }, + { + "Answer": "", + "Explanation": "question_id: 9706041" + }, + { + "Answer": "", + "Explanation": "question_id: 899103" + }, + { + "Answer": "", + "Explanation": "question_id: 17097236" + }, + { + "Answer": "", + "Explanation": "question_id: 11840111" + }, + { + "Answer": "", + "Explanation": "question_id: 364621" + }, + { + "Answer": "", + "Explanation": "question_id: 16330838" + }, + { + "Answer": "", + "Explanation": "question_id: 25040875" + }, + { + "Answer": "", + "Explanation": "question_id: 21684346" + }, + { + "Answer": "", + "Explanation": "question_id: 1773805" + }, + { + "Answer": "", + "Explanation": "question_id: 12814667" + }, + { + "Answer": "", + "Explanation": "question_id: 27436748" + }, + { + "Answer": "", + "Explanation": "question_id: 3471999" + }, + { + "Answer": "", + "Explanation": "question_id: 5183533" + }, + { + "Answer": "", + "Explanation": "question_id: 22676" + }, + { + "Answer": "", + "Explanation": "question_id: 12604909" + }, + { + "Answer": "", + "Explanation": "question_id: 9224385" + }, + { + "Answer": "", + "Explanation": "question_id: 11620914" + }, + { + "Answer": "", + "Explanation": "question_id: 28742436" + }, + { + "Answer": "", + "Explanation": "question_id: 22625616" + }, + { + "Answer": "", + "Explanation": "question_id: 2051744" + }, + { + "Answer": "", + "Explanation": "question_id: 11351874" + }, + { + "Answer": "", + "Explanation": "question_id: 4627981" + }, + { + "Answer": "", + "Explanation": "question_id: 1482308" + }, + { + "Answer": "", + "Explanation": "question_id: 518021" + }, + { + "Answer": "", + "Explanation": "question_id: 35883459" + }, + { + "Answer": "", + "Explanation": "question_id: 3220755" + }, + { + "Answer": "", + "Explanation": "question_id: 12791501" + }, + { + "Answer": "", + "Explanation": "question_id: 8247792" + }, + { + "Answer": "", + "Explanation": "question_id: 21350605" + }, + { + "Answer": "", + "Explanation": "question_id: 1892339" + }, + { + "Answer": "", + "Explanation": "question_id: 2763750" + }, + { + "Answer": "", + "Explanation": "question_id: 89228" + }, + { + "Answer": "", + "Explanation": "question_id: 974678" + }, + { + "Answer": "", + "Explanation": "question_id: 276052" + }, + { + "Answer": "", + "Explanation": "question_id: 517355" + }, + { + "Answer": "", + "Explanation": "question_id: 13114512" + }, + { + "Answer": "", + "Explanation": "question_id: 10824319" + }, + { + "Answer": "", + "Explanation": "question_id: 1397827" + } + ] +} \ No newline at end of file