Skip to content
Snippets Groups Projects
Commit 2d9a57a8 authored by Marek Chrastina's avatar Marek Chrastina
Browse files

Fix python environment

parent 73c17df6
No related branches found
No related tags found
5 merge requests!368Update prace.md to document the change from qprace to qprod as the default...,!367Update prace.md to document the change from qprace to qprod as the default...,!366Update prace.md to document the change from qprace to qprod as the default...,!323extended-acls-storage-section,!280Fix python environment
...@@ -17,6 +17,8 @@ docs: ...@@ -17,6 +17,8 @@ docs:
pylint: pylint:
stage: test stage: test
image: it4innovations/docker-pycheck:latest image: it4innovations/docker-pycheck:latest
before_script:
- source /opt/.venv3/bin/activate
script: script:
- pylint $(find . -name "*.py" -not -name "feslicescript.py") - pylint $(find . -name "*.py" -not -name "feslicescript.py")
......
...@@ -240,6 +240,7 @@ markdown_extensions: ...@@ -240,6 +240,7 @@ markdown_extensions:
- pymdownx.snippets: - pymdownx.snippets:
base_path: snippets base_path: snippets
- pymdownx.tabbed: - pymdownx.tabbed:
- pymdownx.superfences
google_analytics: google_analytics:
- 'UA-90498826-1' - 'UA-90498826-1'
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" combinations """ """ combinations """
from __future__ import print_function
import itertools import itertools
import re import re
...@@ -9,5 +11,5 @@ CHARS = ['A', 'S', 'U', 'T', 'D'] ...@@ -9,5 +11,5 @@ CHARS = ['A', 'S', 'U', 'T', 'D']
MASK = ''.join(reversed(CHARS)) MASK = ''.join(reversed(CHARS))
for i in range(1, len(CHARS)+1): for i in range(1, len(CHARS)+1):
for comb in itertools.combinations(CHARS, i): for comb in itertools.combinations(CHARS, i):
reg = "[^%s]" % ''.join(comb) REG = "[^%s]" % ''.join(comb)
print re.sub(reg, "-", MASK) print(re.sub(REG, "-", MASK))
...@@ -2,16 +2,18 @@ ...@@ -2,16 +2,18 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" matrix """ """ matrix """
from __future__ import print_function
import itertools import itertools
CHARS = ['A', 'S', 'U', 'P', 'D', 'B'] CHARS = ['A', 'S', 'U', 'P', 'D', 'B']
MASK = ''.join(reversed(CHARS)) MASK = ''.join(reversed(CHARS))
for bits in itertools.product([0, 1], repeat=len(CHARS)): for bits in itertools.product([0, 1], repeat=len(CHARS)):
s = "".join(str(bit) for bit in bits) SBIT = "".join(str(bit) for bit in bits)
ns = "" NST = ""
for i, _ in enumerate(s): for i, _ in enumerate(SBIT):
if s[i] == "1": if SBIT[i] == "1":
ns += MASK[i] NST += MASK[i]
else: else:
ns += "-" NST += "-"
print ns print(NST)
#!/usr/bin/env python2 #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" modules_matrix """ """ modules_matrix """
...@@ -133,7 +133,6 @@ def main(): ...@@ -133,7 +133,6 @@ def main():
if arg.json: if arg.json:
print(json.dumps(packages_json(software))) print(json.dumps(packages_json(software)))
else: else:
print(datalist)
print_hint() print_hint()
print_software(software) print_software(software)
......
...@@ -39,15 +39,13 @@ def linestart(line, disabled, test, prev_line=None): ...@@ -39,15 +39,13 @@ def linestart(line, disabled, test, prev_line=None):
if test: if test:
if (line.startswith("``") or line.startswith("extra:")) and not disabled: if (line.startswith("``") or line.startswith("extra:")) and not disabled:
return True return True
else: if (line.startswith("``") or prev_line.startswith("pages:")) and disabled:
if (line.startswith("``") or prev_line.startswith("pages:")) and disabled: return False
return False
else: else:
if line.startswith("``") and not disabled: if line.startswith("``") and not disabled:
return True return True
else: if line.startswith("``") and disabled:
if line.startswith("``") and disabled: return False
return False
return disabled return disabled
def testdata(arg): def testdata(arg):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment