This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.1.4/Chart.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python 3.7.3 macOS | |
import sys | |
# リスト rangeによる確保 | |
val = list(range(10)) | |
get_size = sys.getsizeof(val) | |
print(get_size) | |
# 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
runtime: python37 | |
service: sample_django | |
handlers: | |
- url: /.* | |
script: auto | |
- url: /static | |
static_dir: static/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def set_password(self, raw_password): | |
self.password = make_password(raw_password) | |
self._password = raw_password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def make_password(password, salt=None, hasher='default'): | |
""" | |
Turn a plain-text password into a hash for database storage | |
Same as encode() but generate a new random salt. If password is None then | |
return a concatenation of UNUSABLE_PASSWORD_PREFIX and a random string, | |
which disallows logins. Additional random string reduces chances of gaining | |
access to staff or superuser accounts. See ticket #20079 for more info. | |
""" | |
if password is None: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf import settings | |
from django.contrib.auth.forms import PasswordResetForm | |
from rest_framework import serializers | |
from rest_framework.exceptions import ValidationError | |
class PasswordResetSerializer(serializers.Serializer): | |
""" | |
Serializer for requesting a password reset e-mail. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import glob | |
import time | |
import zipfile | |
import sys | |
from selenium import webdriver | |
from webdriver_manager.chrome import ChromeDriverManager | |