code stringlengths 3 6.57k |
|---|
rewards (torch.Tensor) |
shape
(N, T) |
dimension (number of episodes) |
shape
(N, T) |
dimension (number of episodes) |
torch.full((1, 1, 1, max_path_length - 1) |
torch.cumprod(F.pad(adv_filter, (1, 0) |
F.pad(baselines, (0, 1) |
F.pad(deltas, (0, max_path_length - 1) |
unsqueeze(0) |
unsqueeze(0) |
F.conv2d(deltas, adv_filter, stride=1) |
squeeze() |
pad_to_last(nums, total_length, axis=-1, val=0) |
nums (numpy.ndarray) |
total_length (int) |
axis (int) |
val (int) |
torch.Tensor(nums) |
len(tensor.shape) |
len(tensor.shape) |
len(tensor.shape) |
abs(axis - len(tensor.shape) |
max(total_length - tensor.shape[axis], val) |
F.pad(tensor, padding_config) |
filter_valids(tensor, valids) |
valids (last index of valid tensors) |
tensor (torch.Tensor) |
valids (list[int]) |
range(len(valids) |
with_app(buildername="needs", srcdir="doc_test/doc_export_id") |
test_export_id(app, status, warning) |
app.build() |
Path(app.outdir, "needs.json") |
read_text() |
json.loads(content) |
with_app(buildername="html", srcdir="doc_test/doc_export_id") |
test_export_id_html(app, status, warning) |
app.build() |
os.path.exists(os.path.join(app.outdir, "needs.json") |
VoxelGrid2D(object) |
__init__(self) |
np.array([]) |
np.array([]) |
np.array([0, 0, 0]) |
coefficients (a, b, c, d) |
np.floor(pts / voxel_size) |
astype(np.int32) |
np.lexsort((y_col, z_col, x_col) |
discrete_pts.copy() |
np.ascontiguousarray(discrete_pts_2d) |
np.unique(contiguous_array, return_index=True) |
unique_indices.sort() |
np.diff(unique_indices) |
np.array(extents) |
transpose() |
np.floor(extents_transpose[0] / voxel_size) |
np.ceil((extents_transpose[1] / voxel_size) |
all() |
ValueError("Extents are smaller than min_voxel_coord") |
all() |
ValueError("Extents are smaller than max_voxel_coord") |
np.amin(voxel_coords, axis=0) |
np.amax(voxel_coords, axis=0) |
astype(np.int32) |
astype(int) |
np.ones(self.num_divisions.astype(int) |
map_to_index(self, map_index) |
length(dim) |
len(self.min_voxel_coord) |
len(map_index) |
index (same as np.floor for positive values) |
np.int32(map_index / self.voxel_size) |
np.clip(indices[:, 0], 0, num_divisions_2d[0]) |
np.clip(indices[:, 1], 0, num_divisions_2d[1]) |
argparse.ArgumentParser() |
parser.add_argument("-c", "--config", help="additional configuration to load (e.g. for testing) |
parser.parse_args() |
add_configuration(app, args.config) |
Account.pull('admin') |
Account() |
a.add_account(params) |
a.save() |
print("superuser account reseted for user " + username + " with password " + password) |
print("THIS SUPERUSER ACCOUNT IS INSECURE! GENERATE A NEW PASSWORD FOR IT IMMEDIATELY! OR CREATE A NEW ACCOUNT AND DELETE THIS ONE...") |
Migration(migrations.Migration) |
models.CharField(default=1, max_length=30) |
ProductPartitionHelper(object) |
__init__(self, adgroup_id) |
CreateSubdivision(self, parent=None, value=None) |
str(self.next_id) |
self.CreateAddOperation(adgroup_criterion) |
CreateUnit(self, parent=None, value=None, bid_amount=None) |
str(bid_amount) |
self.CreateAddOperation(adgroup_criterion) |
GetOperations(self) |
CreateAddOperation(self, criterion) |
self.operations.append(operation) |
main(client, adgroup_id) |
ProductPartitionHelper(adgroup_id) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.