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
app: ${hydra:runtime.cwd}/main | |
db: | |
driver: mysql | |
user: omry | |
password: secret |
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
defaults: | |
- db: mysql |
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
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved | |
from dataclasses import dataclass, field | |
from typing import Any, List | |
from omegaconf import MISSING, II, OmegaConf | |
import hydra | |
from hydra.core.config_store import ConfigStore | |
from hydra.utils import instantiate |
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
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved | |
from dataclasses import dataclass, field | |
from typing import Any, List | |
from omegaconf import MISSING, II, OmegaConf | |
import hydra | |
from hydra.core.config_store import ConfigStore | |
from hydra.utils import instantiate |
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
// Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved | |
// Regenerate parser by running 'python setup.py antlr' at project root. | |
// If you make changes here be sure to update the documentation (and update the grammar in command_line_syntax.md) | |
grammar Override; | |
single_override : override EOF; | |
overrides_file : override ('\n' override)*; | |
override: ( |
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 Any, Dict | |
class Singleton(type): | |
_instances: Dict[type, "Singleton"] = {} | |
def instance(cls: Any, *args: Any, **kwargs: Any) -> Any: | |
return cls(*args, **kwargs) | |
def __call__(cls, *args: Any, **kwargs: Any) -> Any: |
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 contextlib import contextmanager | |
from typing import Any | |
@contextmanager | |
def foo() -> Any: | |
print("1 before") | |
yield | |
print("1 after") |
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 contextlib import contextmanager | |
from typing import Any | |
@contextmanager | |
def foo() -> Any: | |
print("1 before") | |
yield | |
print("1 after") |
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 contextlib import contextmanager | |
from typing import Any | |
@contextmanager | |
def foo() -> Any: | |
print("1 before") | |
yield | |
print("1 after") |
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
server: | |
host: 127.0.0.1 | |
port: 8081 | |
app: | |
username: ${env:USER} | |
flask: | |
ENV: production | |
DEBUG: false |
NewerOlder