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 typing import List, Optional | |
def position_of(string: str, list: List[str]) -> Optional[int]: | |
if not string in list: return None | |
return list.index(string) |
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 concat(lhs: str, rhs: str) -> str: | |
return lhs + rhs |
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 unittest | |
loader = unittest.TestLoader() | |
start_dir = '.' | |
suite = loader.discover(start_dir) | |
runner = unittest.TextTestRunner() | |
runner.run(suite) |
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 unittest | |
class ExampleTests(unittest.TestCase): | |
def test_add(self): | |
expectation = 4 | |
actual = 2 + 2 | |
self.assertEqual( | |
expectation, | |
actual, |
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
. | |
---------------------------------------------------------------------- | |
Ran 1 test in 0.000s | |
OK |
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
if __name__ == '__main__': | |
unittest.main() |
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
[[source]] | |
name = "pypi" | |
url = "https://pypi.org/simple" | |
verify_ssl = true | |
[dev-packages] | |
[packages] | |
numpy = "*" |
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
# 1 | |
from ..converter.ConverterInterface import ConverterInterface as Base | |
# 2 | |
from ..model.IntermediateEntry import IntermediateEntry | |
from ..model.IntermediateLanguage import IntermediateLanguage | |
from ..model.IntermediateLocalization import IntermediateLocalization | |
from ..model.LocalizationFile import LocalizationFile | |
#3 |
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
# Declaring class and inheriting from base converter. | |
class GroupingConverter(Base): |
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 fileExtension(self) -> str: | |
# This converter will output a simple txt-file. | |
return ".txt" |
OlderNewer