question stringlengths 11 198 ⌀ | code stringlengths 0 12.1k |
|---|---|
null | ax.legend(loc='upper left') |
null | all(dict.values()) |
null | a = re.compile('p(?:resent|eople)') |
null | zipfile.ZipFile(zipbytes) |
null | del L[index] |
null | subprocess.call(['php', 'path/to/script.php']) |
null | zip(*elements)[1] |
null | list(d.values()) |
null | l3 = [x for x in l1 if x not in l2] |
null | x.pop(random.randrange(len(x))) |
null | globals() |
null | print('hello') |
null | l = request.user.groups.values_list('name', flat=True) |
null | df.loc[:, (slice(None), 'A')] |
null | f.set_size_inches(11.69, 8.27) |
null | cur.callproc('my_stored_proc', (first_param, second_param, an_out_param)) |
null | new_dict = {k: my_dict[k] for k in my_list if k in my_dict} |
null | return Response(json_string) |
null | df.drop(['TMP'], axis=1, inplace=True) |
null | df1.sort(['a', 'b'], ascending=[True, False]) |
null | [[[flatten[int(i * 2)]]] for i in range(int(len(flatten) / 2))] |
null | super(UsuarioForm, self).__init__(*args, **kwargs) |
null | {tuple(x) for x in l1}.intersection(map(tuple, l2)) |
null | {'List of things': ['Alice', 'Bob', 'Evan']} |
null | [[int(j) for j in i] for i in a] |
null | sorted(l, key=lambda s: (s.isdigit(), s)) |
null | grouped = df.groupby(level='DATE') |
null | file.write('first line\n') |
null | a.__setitem__(slice(0, 1), [1]) |
null | ax.set_title('Title for second plot') |
null | pd.concat([pd.Series(initial_value), cum_growth]).reset_index(drop=True) |
null | ax.xaxis.set_major_formatter(dates.DateFormatter('%H:%M')) |
null | [i for i in my_list if all(x not in i for x in ['91', '18'])] |
null | f.write('%d' % number) |
null | lst.append(os.path.splitext(x)[0]) |
null | print(f.read()) |
null | ax.axes.get_xaxis().set_visible(False) |
null | array([[1, 3, 4, 1], [1, 2, 3, 2], [1, 2, 1, 3]]) |
null | session.delete(instance) |
null | ['{}_{}'.format(k, v) for k, v in list(d.items())] |
null | ndb.KeyProperty(kind='Foo', required=True) |
null | print(list(combinations(['hel', 'lo', 'bye'], 2))) |
null | initgstreamer() |
null | a = a.reshape((a.shape[0], -1, n)) |
null | mergedgroupdict('(?P<b>.b.)|(?P<i>.i.)', 'abcdefghijk'[::-1]) |
null | r = requests.post(url, files=files, data=data, headers=headers) |
null | [[0, 0], [1, 1]] |
null | session.commit() |
null | pd.to_datetime(pd.Series(['05/23/2005']), format='%m/%d/%Y') |
null | cursor = db.cursor(dictionary=True) |
null | driver.execute_script('window.scrollTo(0, document.body.scrollHeight);') |
null | df.corr().ix[('special_col'), :-1] |
null | all_data.append(data) |
null | pobj.stdin.flush() |
null | global_dict['bar'] = 'hello' |
null | s.reset_index(drop=True, inplace=True) |
null | np.any(my_array[:, (0)] == value) |
null | cv2.imshow('image', im) |
null | print(celery.current_task.task_id) |
null | parser.add_argument('input2', nargs='+', type=int) |
null | print(text.encode().decode('unicode-escape')) |
null | example2() |
null | a = re.compile('p(?:resent)') |
null | random_key = os.urandom(16) |
null | [item for item in lis if item[1] not in seen and not seen.add(item[1])] |
null | list(range(0, 10, 3)) |
null | lines.sort() |
null | super(ConcurrentModel, self).save(*args, **kwargs) |
null | win.show_all() |
null | """,""".join(map(str, li2)) |
null | print(alphs[:i] + alphs[i::-1]) |
null | pd.crosstab(df.A, df.B).apply(lambda r: r / r.sum(), axis=1) |
null | df1.apply(lambda s: df2.corrwith(s)) |
null | driver.execute_script('%s' % js) |
null | [0, 0, 0, 0, 0, 0, 0, 0, 0], |
null | df2[df2.Name == 'Joe'].T |
null | min([x for x in [None, 1, 2] if x is not None]) |
null | l = ['foo', 'bar', 'buz'] |
null | ['this', 'day', 'is'] |
null | map(lambda d: d.get('value', 'default value'), l) |
null | im = Image.open(tempimg) |
null | xml_soup = BeautifulSoup(xml_object, 'xml') |
null | print(('Nope, that is not a two. That is a', x)) |
null | L = [c for c in L if c not in ['a', 'c']] |
null | re.sub('(%)', '\\g<1>\\g<1>', original) |
null | struct.unpack('>Q', str) |
null | time.sleep(4) |
null | myplsda = PLSRegression().fit(X=Xdata, Y=dummy) |
null | np.random.seed(1) |
null | s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) |
null | d = dict(itertools.zip_longest(fillvalue='', *([iter(l)] * 2))) |
null | result.append(b[index]) |
null | Image('img.png').write('clipboard:') |
null | SCRIPT_ROOT = os.path.dirname(os.path.realpath(__file__)) |
null | re.sub('\\s+', '', 'strip my spaces') |
null | df['in'].groupby((df['in'] != df['in'].shift()).cumsum()).cumsum() |
null | procs.append(multiprocessing.Process(target=worker)) |
null | f.close() |
null | starf = [int(i) for i in starf] |
null | print('Valid' if re.match('^[a-zA-Z0-9_]*$', word) else 'Invalid') |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.