neulab/docprompting-conala huggingface dataset:
# split a list in first column  into multiple columns keeping other columns as well in pandas data frame
pd.concat([df[0].apply(pd.Series), df[1]], axis=1)
# Call a subprocess with arguments `c:\\Program Files\\VMware\\VMware Server\\vmware-cmd.bat` that may contain spaces
subprocess.Popen(['c:\\Program Files\\VMware\\VMware Server\\vmware-cmd.bat'])
# reverse a priority queue `q` in python without using classes
q.put((-n, n))
# numpy concatenate two arrays `a` and `b` along the first axis
print(concatenate((a, b), axis=0))
# numpy concatenate two arrays `a` and `b` along the second axis
print(concatenate((a, b), axis=1))
# numpy concatenate two arrays `a` and `b` along the first axis
c = np.r_[(a[None, :], b[None, :])]
# numpy concatenate two arrays `a` and `b` along the first axis
np.array((a, b))
# return a 401 unauthorized in django
return HttpResponse('Unauthorized', status=401)
# Get the integer location of a key `bob` in a pandas data frame
df.index.get_loc('bob')
# converting two lists `[1, 2, 3]` and `[4, 5, 6]` into a matrix
np.column_stack(([1, 2, 3], [4, 5, 6]))
# delete all occurrences of character 'i' in string 'it is icy'
"""""".join([char for char in 'it is icy' if char != 'i'])
# delete all instances of a character 'i' in a string 'it is icy'
re.sub('i', '', 'it is icy')
# delete all characters "i" in string "it is icy"
"""it is icy""".replace('i', '')
# How to delete all instances of a character in a string in python?
"""""".join([char for char in 'it is icy' if char != 'i'])
# converting list of strings `intstringlist` to list of integer `nums`
nums = [int(x) for x in intstringlist]
# convert list of string numbers into list of integers
map(int, eval(input('Enter the unfriendly numbers: ')))
# Find all files in directory "/mydir" with extension ".txt"
os.chdir('/mydir')
for file in glob.glob('*.txt'):
    pass
# Find all files in directory "/mydir" with extension ".txt"
for file in os.listdir('/mydir'):
    if file.endswith('.txt'):
        pass
# Find all files in directory "/mydir" with extension ".txt"
for (root, dirs, files) in os.walk('/mydir'):
    for file in files:
        if file.endswith('.txt'):
            pass
# decode json string `request.body` to python dict
json.loads(request.body)
# How to sort a Dataframe by the ocurrences in a column in Python (pandas)
df.groupby('prots').sum().sort('scores', ascending=False)
# get json data from restful service 'url'
json.load(urllib.request.urlopen('url'))
# django filter by hour
Entry.objects.filter(pub_date__contains='08:00')
# sort a list of dictionary `list` first by key `points` and then by `time`
list.sort(key=lambda item: (item['points'], item['time']))
# Convert integer `number` into an unassigned integer
struct.unpack('H', struct.pack('h', number))
# write dataframe `df`, excluding index, to a csv file
df.to_csv(filename, index=False)
# convert a urllib unquoted string `unescaped` to a json data `json_data`
json_data = json.loads(unescaped)
# write `newFileBytes` to a binary file `newFile`
newFile.write(struct.pack('5B', *newFileBytes))
# Django get maximum value associated with field 'added' in model `AuthorizedEmail`
AuthorizedEmail.objects.filter(group=group).order_by('-added')[0]
# get the highest element in absolute value in a numpy matrix `x`
max(x.min(), x.max(), key=abs)