Skip to content

Commit 133c407

Browse files
committed
add Memorystore/Mod13, update .gcloudignore & pkg versions
1 parent def3142 commit 133c407

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1561
-164
lines changed

mod0-baseline/.gcloudignore

+63-7
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,73 @@
88
#
99
.gcloudignore
1010

11-
# Ignore source code control maintenance files
12-
.git
11+
# Source code control files
12+
.git/
1313
.gitignore
1414
.hgignore
1515
.hg/
1616

17-
# Python files
18-
*.pyc
19-
*.pyo
17+
# README/text files
18+
LICENSE
19+
*.md
20+
21+
# Tests/results (not in .gitignore)
22+
noxfile.py
23+
test_translate.py
24+
pylintrc
25+
pylintrc.test
26+
27+
# most of .gitignore (except `lib`)
28+
#
29+
# Python
30+
*.py[cod]
2031
__pycache__/
2132
/setup.cfg
2233

23-
# no need to upload README
24-
README.md
34+
# C extensions
35+
*.so
36+
37+
# Packages
38+
*.egg
39+
*.egg-info
40+
dist
41+
build
42+
eggs
43+
.eggs
44+
parts
45+
bin
46+
var
47+
sdist
48+
develop-eggs
49+
.installed.cfg
50+
lib64
51+
*.tgz
52+
53+
# Installer logs
54+
pip-log.txt
55+
56+
# Tests/results
57+
.nox/
58+
.pytest_cache/
59+
.cache
60+
.pytype
61+
.coverage
62+
coverage.xml
63+
*sponge_log.xml
64+
system_tests/local_test_setup
65+
66+
# Mac
67+
.DS_Store
68+
69+
# IDEs/editors
70+
*.sw[op]
71+
*~
72+
.vscode
73+
.idea
74+
75+
# Built documentation
76+
docs/_build
77+
docs.metadata
78+
79+
# Virtual environment
80+
env/

mod1-flask/.gcloudignore

+63-7
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,73 @@
88
#
99
.gcloudignore
1010

11-
# Ignore source code control maintenance files
12-
.git
11+
# Source code control files
12+
.git/
1313
.gitignore
1414
.hgignore
1515
.hg/
1616

17-
# Python files
18-
*.pyc
19-
*.pyo
17+
# README/text files
18+
LICENSE
19+
*.md
20+
21+
# Tests/results (not in .gitignore)
22+
noxfile.py
23+
test_translate.py
24+
pylintrc
25+
pylintrc.test
26+
27+
# most of .gitignore (except `lib`)
28+
#
29+
# Python
30+
*.py[cod]
2031
__pycache__/
2132
/setup.cfg
2233

23-
# no need to upload README
24-
README.md
34+
# C extensions
35+
*.so
36+
37+
# Packages
38+
*.egg
39+
*.egg-info
40+
dist
41+
build
42+
eggs
43+
.eggs
44+
parts
45+
bin
46+
var
47+
sdist
48+
develop-eggs
49+
.installed.cfg
50+
lib64
51+
*.tgz
52+
53+
# Installer logs
54+
pip-log.txt
55+
56+
# Tests/results
57+
.nox/
58+
.pytest_cache/
59+
.cache
60+
.pytype
61+
.coverage
62+
coverage.xml
63+
*sponge_log.xml
64+
system_tests/local_test_setup
65+
66+
# Mac
67+
.DS_Store
68+
69+
# IDEs/editors
70+
*.sw[op]
71+
*~
72+
.vscode
73+
.idea
74+
75+
# Built documentation
76+
docs/_build
77+
docs.metadata
78+
79+
# Virtual environment
80+
env/

mod1-flask/appengine_config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021 Google LLC
1+
# Copyright 2020 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

mod1-flask/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
flask==1.1.2
1+
flask

mod11-functions/.gcloudignore

+63-7
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,73 @@
88
#
99
.gcloudignore
1010

11-
# Ignore source code control maintenance files
12-
.git
11+
# Source code control files
12+
.git/
1313
.gitignore
1414
.hgignore
1515
.hg/
1616

17-
# Python files
18-
*.pyc
19-
*.pyo
17+
# README/text files
18+
LICENSE
19+
*.md
20+
21+
# Tests/results (not in .gitignore)
22+
noxfile.py
23+
test_translate.py
24+
pylintrc
25+
pylintrc.test
26+
27+
# most of .gitignore (except `lib`)
28+
#
29+
# Python
30+
*.py[cod]
2031
__pycache__/
2132
/setup.cfg
2233

23-
# no need to upload README
24-
README.md
34+
# C extensions
35+
*.so
36+
37+
# Packages
38+
*.egg
39+
*.egg-info
40+
dist
41+
build
42+
eggs
43+
.eggs
44+
parts
45+
bin
46+
var
47+
sdist
48+
develop-eggs
49+
.installed.cfg
50+
lib64
51+
*.tgz
52+
53+
# Installer logs
54+
pip-log.txt
55+
56+
# Tests/results
57+
.nox/
58+
.pytest_cache/
59+
.cache
60+
.pytype
61+
.coverage
62+
coverage.xml
63+
*sponge_log.xml
64+
system_tests/local_test_setup
65+
66+
# Mac
67+
.DS_Store
68+
69+
# IDEs/editors
70+
*.sw[op]
71+
*~
72+
.vscode
73+
.idea
74+
75+
# Built documentation
76+
docs/_build
77+
docs.metadata
78+
79+
# Virtual environment
80+
env/

mod11-functions/requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
flask==1.1.2
2-
google-cloud-ndb==1.9.0
1+
flask
2+
google-cloud-ndb==1.11.1

mod12-memcache/.gcloudignore

+63-7
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,73 @@
88
#
99
.gcloudignore
1010

11-
# Ignore source code control maintenance files
12-
.git
11+
# Source code control files
12+
.git/
1313
.gitignore
1414
.hgignore
1515
.hg/
1616

17-
# Python files
18-
*.pyc
19-
*.pyo
17+
# README/text files
18+
LICENSE
19+
*.md
20+
21+
# Tests/results (not in .gitignore)
22+
noxfile.py
23+
test_translate.py
24+
pylintrc
25+
pylintrc.test
26+
27+
# most of .gitignore (except `lib`)
28+
#
29+
# Python
30+
*.py[cod]
2031
__pycache__/
2132
/setup.cfg
2233

23-
# no need to upload README
24-
README.md
34+
# C extensions
35+
*.so
36+
37+
# Packages
38+
*.egg
39+
*.egg-info
40+
dist
41+
build
42+
eggs
43+
.eggs
44+
parts
45+
bin
46+
var
47+
sdist
48+
develop-eggs
49+
.installed.cfg
50+
lib64
51+
*.tgz
52+
53+
# Installer logs
54+
pip-log.txt
55+
56+
# Tests/results
57+
.nox/
58+
.pytest_cache/
59+
.cache
60+
.pytype
61+
.coverage
62+
coverage.xml
63+
*sponge_log.xml
64+
system_tests/local_test_setup
65+
66+
# Mac
67+
.DS_Store
68+
69+
# IDEs/editors
70+
*.sw[op]
71+
*~
72+
.vscode
73+
.idea
74+
75+
# Built documentation
76+
docs/_build
77+
docs.metadata
78+
79+
# Virtual environment
80+
env/

mod12-memcache/main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2020 Google LLC
1+
# Copyright 2021 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ def root():
4141
visitor = '{}: {}'.format(ip_addr, usr_agt)
4242
visits = memcache.get('visits')
4343

44-
# if cache empty or new visitor, register visit & run DB query
44+
# register visit & run DB query if cache empty or new visitor
4545
if not visits or visits[0]['visitor'] != visitor:
4646
store_visit(ip_addr, usr_agt)
4747
visits = list(fetch_visits(10))

mod12-memcache/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
flask==1.1.2
1+
flask

0 commit comments

Comments
 (0)