repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
gregmbi/polyaxon | core/polyaxon/stores/base_store.py | <filename>core/polyaxon/stores/base_store.py
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/L... |
gregmbi/polyaxon | core/polyaxon/tracking/__init__.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/tests/test_polypod/test_contexts.py | <filename>core/tests/test_polypod/test_contexts.py
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/lice... |
gregmbi/polyaxon | core/polyaxon/tracking/run.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | examples/in_cluster/pytorch/mnist/train.py | <filename>examples/in_cluster/pytorch/mnist/train.py
from __future__ import print_function
import logging
import torch
import torch.nn.functional as F
from torchvision import datasets, transforms
from torch.autograd import Variable
logging.basicConfig(level=logging.INFO)
def get_train_loader(data_dir, batch_size, ... |
gregmbi/polyaxon | core/polyaxon/polypod/contexts.py | <gh_stars>0
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... |
gregmbi/polyaxon | core/polyaxon/deploy/schemas/deployment_types.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/builds/builder.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/tests/test_polypod/test_resolvers/test_core_resolver.py | <filename>core/tests/test_polypod/test_resolvers/test_core_resolver.py
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:/... |
gregmbi/polyaxon | core/polyaxon/polyflow/run/dag.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/polyaxonfile/specs/operation.py | <filename>core/polyaxon/polyaxonfile/specs/operation.py
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org... |
gregmbi/polyaxon | core/polyaxon/managers/base.py | <filename>core/polyaxon/managers/base.py
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICEN... |
gregmbi/polyaxon | core/polyaxon/polyboard/artifacts/kinds.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/utils/enums_utils.py | from enum import Enum
from typing import Iterable, List, Set, Tuple, Type, Union
def enum_to_choices(enumeration: Type[Enum]) -> Iterable[Tuple]:
return tuple((e.value, e.value) for e in enumeration)
def enum_to_set(enumeration: Type[Enum]) -> Set:
return set(e.value for e in enumeration)
def values_to_ch... |
gregmbi/polyaxon | core/tests/test_sidecar/test_monitor.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/tests/test_tracking/test_events/test_event_values.py | <reponame>gregmbi/polyaxon
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... |
gregmbi/polyaxon | core/polyaxon/tracking/contrib/fastai.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/k8s/events.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/tests/test_lifecycles/test_lifecycle.py | <filename>core/tests/test_lifecycles/test_lifecycle.py
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/... |
gregmbi/polyaxon | core/polyaxon/stores/polyaxon_store.py | <reponame>gregmbi/polyaxon<filename>core/polyaxon/stores/polyaxon_store.py
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# ht... |
gregmbi/polyaxon | core/polyaxon/schemas/types/dockerfile.py | <reponame>gregmbi/polyaxon
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... |
gregmbi/polyaxon | core/polyaxon/tracking/events/events_processors.py | <filename>core/polyaxon/tracking/events/events_processors.py<gh_stars>0
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:... |
gregmbi/polyaxon | core/polyaxon/utils/date_utils.py | <reponame>gregmbi/polyaxon
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... |
gregmbi/polyaxon | core/polyaxon/proxies/schemas/base.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/polyflow/early_stopping/policies.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/utils/memoize_decorators.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | examples/in_cluster/tensorflow/mnist/model.py | import argparse
import gzip
import numpy as np
import os
import tensorflow as tf
from six.moves.urllib.request import urlretrieve
# Polyaxon
from polyaxon_client.tracking import Experiment
ACTIVATIONS = {
'relu': tf.nn.relu,
'sigmoid': tf.sigmoid,
'tanh': tf.tanh,
}
OPTIMIZERS = {
'sgd': tf.train.Gr... |
gregmbi/polyaxon | core/polyaxon/polyflow/run/job.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/polyflow/parallel/iterative.py | <filename>core/polyaxon/polyflow/parallel/iterative.py
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/... |
gregmbi/polyaxon | core/tests/test_polyaxonfile/test_polyaxonfile_pipelines.py | <gh_stars>0
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... |
gregmbi/polyaxon | core/polyaxon/client/project.py | <gh_stars>0
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... |
gregmbi/polyaxon | core/polyaxon/streams/controllers/archived_logs.py | <reponame>gregmbi/polyaxon
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... |
gregmbi/polyaxon | core/polyaxon/polypod/specs/contexts.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/k8s/manager.py | <filename>core/polyaxon/k8s/manager.py
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE... |
gregmbi/polyaxon | sdks/python/http_client/v1/polyaxon_sdk/models/v1_environment.py | <reponame>gregmbi/polyaxon<filename>sdks/python/http_client/v1/polyaxon_sdk/models/v1_environment.py
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of ... |
gregmbi/polyaxon | core/polyaxon/sidecar/outputs/artifacts.py | <reponame>gregmbi/polyaxon
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... |
gregmbi/polyaxon | core/tests/test_polyflow/test_conds.py | <reponame>gregmbi/polyaxon
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... |
gregmbi/polyaxon | core/tests/test_proxies/test_gateway/test_base.py | <filename>core/tests/test_proxies/test_gateway/test_base.py
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache... |
gregmbi/polyaxon | core/polyaxon/polyflow/component/component_reference.py | <reponame>gregmbi/polyaxon
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... |
gregmbi/polyaxon | core/polyaxon/schemas/fields/indexed_dict.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/api.py | <filename>core/polyaxon/api.py
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... |
gregmbi/polyaxon | core/polyaxon/proxies/schemas/locations.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/tests/test_polyflow/test_environments/test_environments.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/client/run.py | <filename>core/polyaxon/client/run.py
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... |
gregmbi/polyaxon | core/polyaxon/polyflow/schedule/execute.py | <filename>core/polyaxon/polyflow/schedule/execute.py
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/li... |
gregmbi/polyaxon | core/polyaxon/polyflow/run/spark/spark.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/polyflow/environment/__init__.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/polypod/sidecar/container.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/polyaxonfile/check.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/polypod/init/git.py | <filename>core/polyaxon/polypod/init/git.py
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LI... |
gregmbi/polyaxon | core/polyaxon/sidecar/logging/monitor.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/polyflow/parallel/__init__.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/tests/test_polytune/test_random_search.py | <reponame>gregmbi/polyaxon
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... |
gregmbi/polyaxon | core/polyaxon/notifiers/slack_webhook.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/cli/run.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/tests/test_managers/test_base.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/polyflow/parallel/bayes.py | <reponame>gregmbi/polyaxon
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... |
gregmbi/polyaxon | core/polyaxon/polyaxonfile/specs/compiled_operation.py | <filename>core/polyaxon/polyaxonfile/specs/compiled_operation.py<gh_stars>0
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# h... |
gregmbi/polyaxon | core/polyaxon/settings.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/utils/signal_decorators.py | <reponame>gregmbi/polyaxon<filename>core/polyaxon/utils/signal_decorators.py<gh_stars>0
# pylint:disable=inconsistent-return-statements
class IgnoreRawDecorator(object):
"""
The `IgnoreRawDecorator` is a decorator to ignore raw/fixture data during signals handling.
usage example:
@receiver(post_s... |
gregmbi/polyaxon | core/polyaxon/agents/base.py | <reponame>gregmbi/polyaxon<gh_stars>0
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... |
gregmbi/polyaxon | sdks/python/http_client/v1/polyaxon_sdk/models/v1_run_profile.py | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
gregmbi/polyaxon | core/polyaxon/k8s/custom_resources/operation.py | <reponame>gregmbi/polyaxon<filename>core/polyaxon/k8s/custom_resources/operation.py
#!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
... |
jsbankole/kairos-fhir-dsl-mapping-example | src/main/groovy/projects/gecco/crf/GroovyGeneratorFromTemplate/Diseases/generateGroovyFromTemplate.py | import pandas as pd
import numpy as np
import os
template_file_list = []
values_file_list = []
file_name_root_list = []
######### CARDIOVASCULAR DISEASES ############
template_file_list.append("template_CardiovascularDiseases")
values_file_list.append("values_CardiovascularDiseases.xlsx")
file_name_root_list.append("... |
jsbankole/kairos-fhir-dsl-mapping-example | src/main/groovy/projects/gecco/crf/GroovyGeneratorFromTemplate/History of Travel/generateHistoryTravel.py | <reponame>jsbankole/kairos-fhir-dsl-mapping-example
import os
# Number of times the history of travel must be created
nb_iterations = 2
# Path for the template file
template = "historyTravelTemplate"
# Auxiliar file with excerpt for ExportResourceMappingConfig
aux_file_name = "aux_ExportResourceMappingConfig.txt"
if ... |
kylebystrom/pawpyseed | pawpyseed/core/noncollinear.py | <filename>pawpyseed/core/noncollinear.py
from pawpyseed.core.wavefunction import *
class NCLWavefunction(pawpyc.CNCLWavefunction, Wavefunction):
def __init__(self, struct, pwf, cr, dim, symprec=1e-4, setup_projectors=False):
"""
Arguments:
struct (pymatgen.core.Structure): structur... |
kylebystrom/pawpyseed | parse_headers.py | <reponame>kylebystrom/pawpyseed
import os
import re
directory = "pawpyseed/core/"
def write_pxd(pxdname, files):
full_file = ""
# full_file += '# cython : profile=True\n'
full_file += "# cython : language_level=3\n"
full_file += "from libc.stdio cimport FILE\n"
for fname in files:
f = ope... |
kylebystrom/pawpyseed | docs/colors.py | import re
import sys
filename = sys.argv[1]
p = re.compile("#[0-9A-Fa-f]{6}")
f = open(filename)
string = f.read()
f.close()
res = p.findall(string)
mapping = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F',]
mapping = [item for item in zip(mapping, reversed(mapping))]
mapping = {k:v for k,v in map... |
kylebystrom/pawpyseed | pawpyseed/compiler.py | <reponame>kylebystrom/pawpyseed<gh_stars>10-100
import subprocess
def compile_core(comp, scilib):
"""
ATTENTION, NOT FINISHED
"""
subprocess.call(("make pawpy_%s" % comp).split())
def compile_core(comp, scilib):
"""
ATTENTION, NOT FINISHED
"""
subprocess.call("make hfc".split())
|
kylebystrom/pawpyseed | pawpyseed/core/rayleigh.py | <filename>pawpyseed/core/rayleigh.py
import numpy as np
from scipy.special import sph_harm, spherical_jn
k = np.array([0.6, 0.2, 0.3]) * 2 * np.pi
def planewave(coord):
return np.exp(1j * (k[0] * grid[0] + k[1] * grid[1] + k[2] * grid[2])) * np.exp(
1j * np.dot(k, [1, 1, 1])
)
m, l, = (
1,
... |
kylebystrom/pawpyseed | pawpyseed/core/wavefunction.py | ## @package pawpyseed.core.wavefunction
# Base class containing Python classes for parsing files
# and storing and analyzing wavefunction data.
import os
import time
import numpy as np
from pymatgen.io.vasp.inputs import Poscar, Potcar
from pymatgen.io.vasp.outputs import Vasprun
import pawpyseed.core.symmetry as pa... |
kylebystrom/pawpyseed | pawpyseed/analysis/defect_composition.py | ## File presenting the PawpyData class
# and its children for analysis of pawpyseed
# output primarily from core.projector.Projector
import os
import matplotlib.pyplot as plt
import numpy as np
import yaml
from pymatgen.electronic_structure.core import Spin
from pymatgen.io.vasp.inputs import Poscar
from pymatgen.io.... |
kylebystrom/pawpyseed | pawpyseed/core/quadrature.py | <reponame>kylebystrom/pawpyseed
import numpy as np
MAXSIZE = 100
f = open("quadrature.c", "w")
f.write('#include "quadrature.h"\n\n')
x = []
for i in range(3, MAXSIZE + 1):
x.append(np.polynomial.legendre.leggauss(i))
f.write("double QUADRATURE_POINTS[%d][%d] = {\n" % (MAXSIZE - 2, MAXSIZE + 1))
for i in ran... |
kylebystrom/pawpyseed | pawpyseed/core/tests/test_momentum.py | import os
import numpy as np
from numpy.testing import assert_almost_equal, assert_array_almost_equal, assert_raises
class PawpyTestError(Exception):
"""
Class for handling errors that occur during execution
of Python functions in pawpyseed
"""
def __init__(self, msg):
self.msg = msg
M... |
kylebystrom/pawpyseed | pawpyseed/analysis/tests/test_defect_composition.py | <reponame>kylebystrom/pawpyseed<gh_stars>10-100
import os
from pawpyseed.analysis.defect_composition import *
from pawpyseed.core.projector import Projector
MODULE_DIR = os.path.dirname(os.path.abspath(__file__))
class PawpyTestError(Exception):
"""
Class for handling errors that occur during execution
... |
kylebystrom/pawpyseed | pawpyseed/core/gaunt.py | """
\file
Python script for generating Gaunt coefficients and factors used for offsite
partial wave overlap integrals.
"""
import numpy as np
from sympy import N
from sympy.physics.wigner import gaunt, wigner_3j
gcs = np.zeros([4, 4, 4, 7, 4])
facs = np.zeros([4, 4, 4, 7, 4])
print(gaunt(1, 0, 1, 1, 0, 0))
print(N(ga... |
kylebystrom/pawpyseed | pawpyseed/core/utils.py | <reponame>kylebystrom/pawpyseed
## @package pawpyseed.core.utils
# Miscellaneous utilities file for the Python portion of the code..
class PAWpyError(Exception):
"""
Class for handling errors that occur during execution
of Python functions in pawpyseed
"""
def __init__(self, msg):
self.ms... |
kylebystrom/pawpyseed | setup.py | import codecs
import configparser
import os
import sys
import numpy as np
from setuptools import Extension, setup
class PawpyBuildError(Exception):
pass
try:
from Cython.Build import cythonize
except ImportError:
raise ImportError(
"Need Cython>=0.29.21 to build pawpyseed. Please run 'pip insta... |
kylebystrom/pawpyseed | pawpyseed/core/quad_check.py | import numpy as np
total = 0
for rstep in range(100):
numtheta = min(int(rstep * 27 / 100), 26) + 3
print(numtheta)
pts, wts = np.polynomial.legendre.leggauss(numtheta)
for thetastep in range(numtheta):
numphi = int((numtheta * 2 + 2) * (1 - pts[thetastep] ** 2) ** 0.5)
for phistep in ... |
kylebystrom/pawpyseed | pawpyseed/analysis/run_pawpy.py | <reponame>kylebystrom/pawpyseed
import os
import shutil
from shutil import rmtree
from monty.shutil import decompress_dir
from pymatgen.io.vasp import Vasprun
from pawpyseed.core.projector import Projector
from pawpyseed.core.wavefunction import Wavefunction
class PathHolder:
def __init__(self, path):
s... |
Nuklear-s-Team/fibonacciThing | Fibonnacci GUI VERSION.py | <reponame>Nuklear-s-Team/fibonacciThing
# Copyright 2020 <NAME> and <NAME>
# Improved by Luzgog
# Made with the same translate function as the original.
import tkinter as tkinter
from tkinter import messagebox
from tkinter import scrolledtext
from Fibonacci_Encoder import encode, decode, encodeReversed, decod... |
Nuklear-s-Team/fibonacciThing | Fibonacci_Encoder.py | # Copyright 2019 by <NAME> and <NAME>
# Improved by Luzgog
# How to use:
# Run the program.
# It will ask you to decode or encode.
# Type de for decode, and en for encode.
# Then type your message. While encoding,
# you can use most punctuation except an
# apostrophe. You can use commas and other
# punctuati... |
homersoft/oadr2-ven-python | test/util.py | <gh_stars>1-10
from lxml import etree
def read_xml(path):
utf8_parser = etree.XMLParser(encoding="utf-8")
with open(path) as xml_file:
return etree.fromstring(xml_file.read().encode("utf-8"), parser=utf8_parser)
|
homersoft/oadr2-ven-python | test/signal_level_unittest.py | <filename>test/signal_level_unittest.py<gh_stars>1-10
import unittest
from datetime import datetime, timedelta
from os import remove
from test.adr_event_generator import AdrEvent, AdrEventStatus
from freezegun import freeze_time
from oadr2.poll import OpenADR2
DB_FILENAME = "test.db"
class SignalLevelTest(unittest.... |
homersoft/oadr2-ven-python | oadr2/poll.py | # pylint: disable=W1202, I1101
import threading
import urllib.error
import urllib.parse
import urllib.request
from random import uniform
import requests
from lxml import etree
from oadr2 import base, logger
# HTTP parameters:
REQUEST_TIMEOUT = 5 # HTTP request timeout
DEFAULT_VTN_POLL_INTERVAL = 300 # poll the VTN... |
homersoft/oadr2-ven-python | setup.py | #!/usr/bin/env python
#from distutils.core import setup
from setuptools import find_packages, setup
setup(
name = 'oadr2-ven',
version = '1.0.2',
description = 'OpenADR 2.0a VEN for Python',
author = 'EnerNOC Advanced Technology',
author_email = '<EMAIL>',
url = 'http://open.enernoc.com',
... |
homersoft/oadr2-ven-python | oadr2/schemas.py | <reponame>homersoft/oadr2-ven-python
from datetime import datetime
from typing import List, Optional, Union
from lxml import etree
from pydantic import BaseModel
from oadr2 import schedule
# Stuff for the 2.0a spec of OpenADR
OADR_XMLNS_A = 'http://openadr.org/oadr-2.0a/2012/07'
PYLD_XMLNS_A = 'http://docs.oasis-ope... |
homersoft/oadr2-ven-python | test/test_conformance.py | <reponame>homersoft/oadr2-ven-python<gh_stars>1-10
from datetime import datetime, timedelta
from test.adr_event_generator import AdrEvent, AdrEventStatus, generate_payload
from unittest import mock
import pytest
from freezegun import freeze_time
from oadr2 import controller, event
from oadr2.poll import OpenADR2
from... |
homersoft/oadr2-ven-python | oadr2/event.py | <filename>oadr2/event.py
# Event Handler class.
# --------
# Requires the python libXML wrapper "lxml" to function properly
# pylint: disable=W1202
__author__ = "<NAME> <<EMAIL>>, <NAME> <<EMAIL>>"
import uuid
from typing import List
from lxml import etree
from lxml.builder import ElementMaker
from oadr2 import even... |
homersoft/oadr2-ven-python | test/schedule_unittest.py | import datetime as dt
import unittest
from dateutil.relativedelta import relativedelta
from oadr2 import schedule
class ScheduleTest(unittest.TestCase):
def test_parse_duration(self):
self.assertEqual(('+', 0, 0, 0, 0, 3, 0), schedule.parse_duration('PT3M'))
self.assertEqual(('+', 0, 0, 0, 0, 3... |
homersoft/oadr2-ven-python | test/adr_event_generator.py | <filename>test/adr_event_generator.py
from dataclasses import dataclass
from datetime import datetime, timedelta
from enum import Enum
from typing import Dict, List, Optional, Union
from lxml import etree
from oadr2.schemas import EventSchema, SignalSchema
def format_duration(duration: Union[timedelta, None]) -> st... |
homersoft/oadr2-ven-python | oadr2/__init__.py | <filename>oadr2/__init__.py
import logging
class IdFilter():
def __init__(self, client_id=None):
self.client_id = client_id
def filter(self, record):
record.client_id = self.client_id
return True
logger = logging.getLogger("oadr2")
|
homersoft/oadr2-ven-python | oadr2/eventdb.py | <gh_stars>1-10
from datetime import datetime
from typing import Dict, List, Optional, Sequence, Union
from sqlalchemy import (Boolean, Column, Float, ForeignKey, Integer, String,
create_engine)
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import Session, relations... |
homersoft/oadr2-ven-python | test/test_event_processing.py | from datetime import datetime, timedelta
from test.adr_event_generator import AdrEvent, AdrEventStatus, generate_payload
from unittest import mock
import pytest
from freezegun import freeze_time
from oadr2 import controller, event
from oadr2.schemas import NS_A
TEST_DB_ADDR = "%s/test2.db"
scenario = dict(
not_... |
homersoft/oadr2-ven-python | oadr2/xmpp.py | # Classes for sending/receiving OpenADR 2.0 messages via XMPP
# --------
# Requires the python libXML wrapper "lxml" to function properly
# Please not that the standard python xml library is needed as well
__author__ = '<NAME> <<EMAIL>>, <NAME> <<EMAIL>>'
import logging
from io import StringIO
from xml.etree import... |
homersoft/oadr2-ven-python | oadr2/database.py | <filename>oadr2/database.py
# A small handler/abstraciton layer for SQLite database connections
import logging
import sqlite3
DEFAULT_DB_PATH = 'oadr2.db'
class DBHandler(object):
# Member varialbes:
# --------
# db_path
# The following is a list of which functions relate to which class/handler/mod... |
homersoft/oadr2-ven-python | oadr2/memdb.py | from typing import Dict, NamedTuple, Optional, Sequence, Tuple
EventEntry = NamedTuple("EventEntry", (("vtn_id", str), ("mod_num", int), ("raw_xml", str)))
class DBHandler:
"""
In-memory OADR2 protocol state backing store based on Python dict.
"""
def __init__(self, db_path=""):
self.events ... |
homersoft/oadr2-ven-python | oadr2/schedule.py | '''
This module handles scheduling for OpenADR2 entities,
e.g. event schedules, price schedules, etc.
'''
__author__ = '<NAME> <EMAIL>'
import calendar
import datetime
import random
import re
# import logging
from dateutil.relativedelta import relativedelta
DB_PATH = 'oadr2.db'
DURATION_PAT = r'([+-])?P(?:(\d+)Y)?... |
Joshinn-io/augur | augur/__init__.py | <reponame>Joshinn-io/augur
#SPDX-License-Identifier: MIT
import os
ROOT_AUGUR_DIRECTORY = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
|
Joshinn-io/augur | workers/facade_worker/facade_worker/excel_generators/example.py | <gh_stars>100-1000
#!/usr/bin/python3
# Copyright 2017-2018 <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.