code
stringlengths
3
6.57k
int(input()
read_row()
list(map(int, input()
split()
read_grid()
read_row()
range(read_val()
make_blank_row(i)
make_blank_grid(n)
make_blank_row(i)
range(1, n + 1)
compute_max_path_sum(grid)
make_blank_grid(len(grid)
dfs(i, j)
len(grid)
max(dfs(i + 1, j)
dfs(i + 1, j + 1)
dfs(0, 0)
range(read_val()
print(compute_max_path_sum(read_grid()
print(platform.system()
platform.system()
lower()
Exception("Unimplemented for OS {}".format(operating_system)
find_blender(version)
get_installed_blender_versions()
print("blender version '{}' not found; found {} version(s)
format(version, len(installed_versions)
installed_versions.items()
print(" {}: {}".format(v, path)
print("searching web archive...")
get_blender_version_download_links(version, operating_system_name)
print("found {} download(s)
format(len(versions)
print(" {}".format(url)
get_installed_blender_versions()
items()
find_blender('2.80')
print("Found blender: '{}'".format(blender)
print("No matching blender version installed :(")
distribution. (Y-axis is meaningless, just spreads data)
np.asarray([get_rand()
range(5000)
plt.plot(data, np.random.uniform(size=(5000,)
plt.show()
kornia_color_jitter_numpy(img, setting)
torch.from_numpy(img)
permute(2,0,1)
unsqueeze(0)
ColorJitter(setting, setting, setting, setting)
img.squeeze(0)
permute(1,2,0)
numpy()
__init__(self, opt)
self.reset_random()
opt.keys()
opt.keys()
opt.keys()
opt_get(opt, ['cosine_bias'], True)
opt.keys()
reset_random(self)
self.opt.keys()
random.Random(self.opt['random_seed'])
random.Random()
get_rand(self)
self.rand.random()
cos(r * pi / 2)
corrupt_images(self, imgs, return_entropy=False)
random.choices(self.random_corruptions, k=self.num_corrupts)
self.get_rand()
self.apply_corruption(img, aug, r, applied_augs)
undo_fns.append(undo_fn)
self.get_rand()
self.apply_corruption(img, aug, r, applied_augs)
entropy.append(r)
undo_fns.append(undo_fn)
ufn(img)
corrupted_imgs.append(img)
apply_corruption(self, img, aug, rand_val, applied_augmentations)
int(rand_val * 10 / 3)
kornia_color_jitter_numpy(img, setting)
cv2.GaussianBlur(img, (0,0)
random.randint(0,360)
np.zeros((intensity, intensity)
np.ones(intensity, dtype=np.float32)
cv2.warpAffine(k, cv2.getRotationMatrix2D((intensity / 2 - 0.5, intensity / 2 - 0.5)
np.sum(k)
cv2.filter2D(img, -1, k)
random.randint(0,4)
len(interpolation_modes)
cv2.resize(img, dsize=(img.shape[1]//scale, img.shape[0]//scale)
lq_resampling_undo_fn(scale, img)
cv2.resize(img, dsize=(img.shape[1]*scale, img.shape[0]*scale)
functools.partial(lq_resampling_undo_fn, scale)
np.random.rand(*img.shape)
NotImplementedError("specified jpeg corruption doesn't exist")
int((1-rand_val)
astype(np.uint8)
Image.fromarray(img)
BytesIO()