code
stringlengths
3
6.57k
except (FileNotFoundError, IOError, json.decoder.JSONDecodeError)
format_for_output(secrets: SecretsCollection, is_slim_mode: bool = False)
get_settings()
json()
secrets.json()
time.strftime('%Y-%m-%dT%H:%M:%SZ', time.gmtime()
items()
secret_dict.pop('line_number')
isinstance(secrets, SecretsCollection)
format_for_output(secrets)
open(filename, 'w')
f.write(json.dumps(output, indent=2)
upgrade(baseline: Dict[str, Any])
Version(baseline['version'])
Version(VERSION)
_is_relevant_upgrade_module(baseline_version)
module.upgrade(new_baseline)
_is_relevant_upgrade_module(current_version: Version)
wrapped(module_path: str)
module_path.rsplit('.', 1)
lstrip('v')
replace('_', '.')
Version(f'{affected_version_string}.0')
AdminSiteTests(TestCase)
setUp(self)
Client()
get_user_model()
self.client.force_login(self.admin_user)
get_user_model()
test_users_listed(self)
reverse('admin:core_user_changelist')
self.client.get(url)
self.assertContains(res, self.user.name)
self.assertContains(res, self.user.email)
test_user_change_page(self)
reverse('admin:core_user_change', args=[self.user.id])
self.client.get(url)
self.assertEqual(res.status_code, 200)
test_create_user_page(self)
reverse('admin:core_user_add')
self.client.get(url)
self.assertEqual(res.status_code, 200)
__init__ (self, id, init, fin, label=None)
str(self.id)
__repr__(self)
puis (init)
puis (fin)
str(self.label)
insertPrefix(self, prefid, preflab=None)
len(str(tempid)
str(prefid)
str(self.label)
str(preflab)
str(self.label)
__eq__(self, other)
type(self)
type(other)
__ne__(self, other)
self.__eq__(other)
__hash__(self)
unique (utile pour les tables de hachage)
type(self.id)
str(self.id)
join(str(ord(c)
int(res)
isInitialIn(list)
isFinalIn(list)
CAE_ENC(nn.Module)
__init__(self)
super()
__init__()
nn.Sequential(*list(model.features.children()
nn.Conv2d(3, 32, kernel_size=5, padding=2, stride=2)
nn.Conv2d(32, 64, kernel_size=3, padding=1, stride=2)
nn.Conv2d(64, 128, kernel_size=3, padding=1, stride=2)
nn.Conv2d(128, 256, kernel_size=3, padding=1, stride=2)
nn.Linear(256 * 6 * 6, 1000)
forward(self, x)
self.features(x)
F.relu(self.conv1(x)
F.relu(self.conv2(x)
F.relu(self.conv3(x)
F.relu(self.conv4(x)
x.view(-1, 256 * 6 * 6)
self.fc1(x)
CAE_DEC(nn.Module)
__init__(self)
super()
__init__()
nn.Linear(1000, 256 * 6 * 6)
nn.ConvTranspose2d(256, 128, 2, stride=2)
nn.ConvTranspose2d(128, 64, 2, stride=2)
nn.ConvTranspose2d(64, 32, 2, stride=2)
nn.ConvTranspose2d(32, 3, 2, stride=2)
nn.Conv2d(3, 3, kernel_size=1)
forward(self, x)
F.relu(self.fc2(x)
x.view(128, 256, 6, 6)
F.relu(self.deconv1(x)
F.relu(self.deconv2(x)