message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
Fix doc for torch.nn.functional.relu (fixes
Thank you Shengyi Qian (JasonQSY) for spotting and reporting. | @@ -611,7 +611,7 @@ In-place version of :func:`~threshold`.
def relu(input, inplace=False):
- r"""relu(input, threshold, value, inplace=False) -> Tensor
+ r"""relu(input, inplace=False) -> Tensor
Applies the rectified linear unit function element-wise. See
:class:`~torch.nn.ReLU` for more details.
|
doc : complete the documentation of summary_stats() so it explicitely
lists all the summary metrics output. | @@ -150,9 +150,9 @@ Other measures
.. _iqms_summary:
- :py:func:`~mriqc.qc.anatomical.summary_stats` (**summary_\*_\***):
- Mean, standard deviation, 5% percentile and 95% percentile of the distribution
- of background, :abbr:`CSF (cerebrospinal fluid)`, :abbr:`GM (gray-matter)` and
- :abbr:`WM (white-matter)`.
+ Mean,... |
added solid required_resource_keys to executionstep
Test Plan: na
Reviewers: sandyryza, yuhan, alangenfeld | @@ -203,7 +203,7 @@ class ExecutionStep(
"_ExecutionStep",
(
"pipeline_name key_suffix step_inputs step_input_dict step_outputs step_output_dict "
- "compute_fn kind solid_handle solid_version logging_tags tags hook_defs"
+ "compute_fn kind solid_handle solid_version solid_required_resource_keys logging_tags tags hook_... |
Update installation instructions in README.md
Link to documentation instead of duplicating install/build instructions | @@ -13,30 +13,10 @@ Documentation
-Build instructions
-==================
-
-GeoCAT-comp requires the following dependencies to be installed:
-
-* Python
-* Cython
-* Numpy
-* Xarray
-* Dask
-* Any C compiler (GCC and Clang have been tested)
-* gfortran
-* [ncomp](https://github.com/NCAR/ncomp)
-
-GeoCAT-comp can be bu... |
Fix for XsdGroup.is_emptiable()
- A choice model is empty if almost one item is emptiable
- Wrote a better fix for issue | @@ -250,6 +250,9 @@ class XsdGroup(MutableSequence, XsdAnnotated, ValidatorMixin, ParticleMixin):
return not self.mixed and not self
def is_emptiable(self):
+ if self.model == XSD_CHOICE_TAG:
+ return self.min_occurs == 0 or not self or any([item.is_emptiable() for item in self])
+ else:
return self.min_occurs == 0 or ... |
Use net_mask filter instead of ansible's ipaddr
For a long time [1] we have net_mask filter, so no need to use ugly
combination of the net_cidr filter together with ansible's ipaddr
filter.
1.
TrivialFix | deploy_image_filename: "{{ kolla_bifrost_deploy_image_filename }}"
ipv4_interface_mac: "{% raw %}{{ extra.pxe_interface_mac | default }}{% endraw %}"
ipv4_address: "{{ admin_oc_net_name | net_ip }}"
- ipv4_subnet_mask: "{{ admin_oc_net_name | net_cidr | ipaddr('netmask') }}"
+ ipv4_subnet_mask: "{{ admin_oc_net_name | ... |
Updating the documentation of the occupancy model
The units of the schedules generated were updated to match the new
schedules. | @@ -21,24 +21,21 @@ def calc_schedules(region, list_uses, archetype_schedules, bpr, archetype_values
Given schedule data for archetypal building uses, `calc_schedule` calculates the schedule for a building
with possibly a mixed schedule as defined in `building_uses` using a weighted average approach. The schedules are
... |
Simplify install instructions
...and remove the hardcoded python version reference. | @@ -59,27 +59,12 @@ Installation
.. installation-start-marker
-Compatible with Python 3.6+:
+Installation from [PyPI](https://pypi.org/project/dimod/):
.. code-block:: bash
pip install dimod
-To install from source (requires ``pip>=10.0.0``):
-
-.. code-block:: bash
-
- pip install -r requirements.txt
- python setup.py... |
Fix bug when there is no PYTHONPATH defined
I think this is why AppVeyor was failling its test. | @@ -81,7 +81,7 @@ def test_synchronize_with_PYTHONPATH(qtbot):
# Store PYTHONPATH original state
env = get_user_env()
- original_pathlist = env['PYTHONPATH']
+ original_pathlist = env.get('PYTHONPATH', [])
# Assert that PYTHONPATH is synchronized correctly with Spyder's path list
pathmanager.synchronize()
@@ -103,5 +10... |
Fix QA environment tox specificiers
Python 3.9 still fails, see PyCQA/pylint#3882 | [tox]
envlist =
- py39-qa
+ py38-qa
py{36,37,38,39,py3}-dj{22,30,31,master}
[gh-actions]
@@ -27,8 +27,8 @@ setenv =
ignore_errors = true
ignore_outcome = true
-[testenv:py39-qa]
-basepython = python3.9
+[testenv:py38-qa]
+basepython = python3.8
deps = -r requirements-qa.txt
commands =
mypy axes
|
ebuild.conditionals: DepSet.parse(): raise original DepsetParseError
Instead of creating and raising a new one. | @@ -167,7 +167,7 @@ class DepSet(boolean.AndRestriction):
except IGNORED_EXCEPTIONS:
raise
- except IndexError:
+ except (IndexError, DepsetParseError):
# [][-1] for a frame access, which means it was a parse error.
raise
except StopIteration:
|
Update adjoint methods for Fortran Dense
`transpose_dense()` now becomes little more than a `memcpy()` while
changing the relevant flags. The other two do this if necessary, and a
1D vector conjugation. | @@ -78,30 +78,25 @@ cpdef CSR conj_csr(CSR matrix):
cpdef Dense adjoint_dense(Dense matrix):
- cdef Dense out = dense.empty(matrix.shape[1], matrix.shape[0])
- cdef size_t row, col
+ cdef Dense out = dense.empty_like(matrix, fortran=not matrix.fortran)
+ out.shape = (out.shape[1], out.shape[0])
with nogil:
- for row in... |
Invert the use of forward_to_{slaves,replicas}
This is a purely internal change. | @@ -554,10 +554,10 @@ class Index(object):
@param forward_to_slaves (optional) same as forward_to_replicas, used for
backward compatibility.
"""
- forward_to_slaves |= forward_to_replicas
+ forward_to_replicas |= forward_to_slaves
path = '/synonyms/%s' % safe(object_id)
- params = {'forwardToReplicas': forward_to_slave... |
[client] Unskip succeeding tests in isolateserver_test.py
Unskip tests that are now succeeding in python3 on windows. | @@ -228,7 +228,6 @@ class UtilsTest(TestCase):
isolateserver.fileobj_copy(outobj, inobj, size=10)
- @unittest.skipIf(sys.platform == 'win32' and six.PY3, 'crbug.com/1182016')
def test_putfile(self):
tmpoutdir = None
tmpindir = None
|
Add comment on the purpose of the return + yield
Closes | @@ -253,6 +253,9 @@ class BatchAnnotatorUDF(UDF):
array_tsv_escape(values),
]
writer.write("\t".join(row) + "\n")
+ # This return + yeild combination results in a purely empty generator
+ # function. Specifically, the yield turns the function into a generator,
+ # and the return terminates the generator before yielding... |
Fix housenumber being preprocessed twice
prepare_housenumbers did the job already | @@ -163,8 +163,7 @@ class HousenumbersIndexer:
housenumbers = doc.get('housenumbers', {})
to_index = {}
for number, data in housenumbers.items():
- for hn in preprocess(number):
- to_index[hn] = config.DEFAULT_BOOST
+ to_index[number] = config.DEFAULT_BOOST
index_geohash(pipe, key, data['lat'], data['lon'])
index_token... |
"Light Linking City Attack" : Fix camera transform
Gaffy was partially blocked by a building. The Seed node's distribution
has apparently changed between versions. | @@ -1006,8 +1006,8 @@ __children["Assets"]["PathFilter8"]["paths"].setValue( IECore.StringVectorData(
__children["Assets"]["PathFilter8"]["__uiPosition"].setValue( imath.V2f( 26.7715721, -17.4012604 ) )
__children["Assets"]["Dot1"]["in"].setInput( __children["Assets"]["Plane"]["out"] )
__children["Assets"]["Dot1"]["__u... |
Stop race condition creating extra StaticDevices
StaticDevices is a third party model and it doesn't have a uniqueness
constraint on user_id and name, although we expect it to. This ensures
that only one thread at a time will attempt to create it for a given
user. | @@ -28,6 +28,7 @@ from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _, ngettext, ugettext_lazy, ugettext_noop
from corehq.apps.users.analytics import get_role_user_count
+from dimagi.utils.couch import CriticalSection
from soil.exceptions import TaskFailedError
from soil.uti... |
Bot.unload_extension: don't remove commands from no module
Fixes unload_extension in the case of a command added via eval | @@ -734,6 +734,8 @@ class BotBase(GroupMixin):
# first remove all the commands from the module
for cmd in self.all_commands.copy().values():
+ if cmd.module is None:
+ continue
if _is_submodule(lib_name, cmd.module):
if isinstance(cmd, GroupMixin):
cmd.recursively_remove_all_commands()
|
svtplay: fix a crash with season and episode info
fixes: | @@ -283,8 +283,8 @@ class Svtplay(Service, MetadataThumbMixin):
if not match:
return season, episode
- season = "{:02d}".format(match.group(1))
- episode = "{:02d}".format(match.group(2))
+ season = "{:02d}".format(int(match.group(1)))
+ episode = "{:02d}".format(int(match.group(2)))
return season, episode
|
test_nilrt_ip: Fix set_static_all test
The nameservers needs to be specified only by ip address. | @@ -98,13 +98,13 @@ class Nilrt_ipModuleTest(ModuleCase):
def test_static_all(self):
interfaces = self.__interfaces()
for interface in interfaces:
- result = self.run_function('ip.set_static_all', [interface, '192.168.10.4', '255.255.255.0', '192.168.10.1', '8.8.4.4 my.dns.com'])
+ result = self.run_function('ip.set_st... |
let `apply_annotations` retain annotations
For no or undocumented reason the `apply_annotations` decorator removed the
annotations from the signature of the wrapper. This patch restores the
annotations. | @@ -156,9 +156,7 @@ def _build_apply_annotations(signature):
continue
bound.arguments[name] = param.annotation(bound.arguments[name])
return bound.args, bound.kwargs
- # Copy the signature of `wrapped` without annotations. This matches the
- # behaviour of the compiled `apply` above.
- apply.__signature__ = inspect.Sig... |
Shapelet Transform bug fix
Added more helpful error messages when fit results in 0 extracted shapelets. Also removed the value error when time limit <= 0 as this is only relevant to the Contracted version of the transform. | @@ -83,6 +83,7 @@ class ShapeletTransform(BaseTransformer):
self.remove_self_similar = remove_self_similar
self.predefined_ig_rejection_level = 0.05
self.shapelets = None
+ self.is_fitted_ = False
def fit(self, X, y=None):
"""A method to fit the shapelet transform to a specified X and y
@@ -99,7 +100,7 @@ class Shapele... |
Do not show the database uri in migration error message
It was showing the auth information as well and being sent to the REST API client as part of the response. | @@ -147,10 +147,10 @@ class SqlAlchemyStore(AbstractStore):
if current_rev != head_revision:
raise MlflowException(
"Detected out-of-date database schema (found version %s, but expected %s). "
- "Take a backup of your database, then run 'mlflow db upgrade %s' to migrate "
- "your database to the latest schema. NOTE: sc... |
rate_limit: Remove inaccurate comment in rate_limit decorator.
The data is now stored in memory if things are happening inside tornado.
That aside, there is no reason for a comment on a rate_limit_user call
to talk about low level implementation details of that function. | @@ -796,7 +796,6 @@ def rate_limit(domain: str='api_by_user') -> Callable[[ViewFuncT], ViewFuncT]:
# TODO: implement per-IP non-authed rate limiting
return func(request, *args, **kwargs)
- # Rate-limiting data is stored in redis
rate_limit_user(request, user, domain)
return func(request, *args, **kwargs)
|
helper: Update unread_counts for TopicButtons in open TopicView.
* Based on the incoming messages, we update the unread_count of the
TopicButtons in open TopicView.
* We avoid adding muted topics to all_msg count, via add_to_count. | @@ -101,6 +101,10 @@ def set_count(id_list: List[int], controller: Any, new_count: int) -> None:
time.sleep(0.1)
streams = controller.view.stream_w.log
+ is_open_topic_view = controller.view.left_panel.is_in_topic_view
+ if is_open_topic_view:
+ topics = controller.view.topic_w.log
+ toggled_stream_id = controller.view... |
Happy New Years!
This fixes a datetime bug in tests that cause a failure due to a
hard-coded date. | @@ -180,10 +180,11 @@ class DateTimeParsingFunctionIntegrationTestCases(TestCase):
self.assertEqual(len(parser), 1)
def test_captured_pattern_is_on_day(self):
- input_text = 'My birthday is on January 1st.'
+ input_text = 'My birthday is on January 2nd.'
parser = parsing.datetime_parsing(input_text)
- self.assertIn('Ja... |
Iterate over sessions in the listener via the session buffers
This is more direct than going through the manager | @@ -583,7 +583,9 @@ class DocumentSyncListener(sublime_plugin.ViewEventListener, AbstractViewListene
return self._manager # type: ignore
def sessions(self, capability: Optional[str]) -> Generator[Session, None, None]:
- yield from self.manager.sessions(self.view, capability)
+ for sb in self.session_buffers_async():
+ ... |
Update php_script.txt
Moving this to dedicated trail with explicit name ```modxcore.txt``` | @@ -489,12 +489,6 @@ westflies.com/api/api.php
/835pnjmr1w4p5ypvgcymfkkx.php
-# Reference: https://forums.modx.com/thread/102644/evo-1-2-1-hacked-again-and-again
-# Generic trails for compromised MODX CMS-es
-
-/assets/images/accesson.php
-/assets/images/customizer.php
-
# Reference: https://twitter.com/MalwarePatrol/s... |
Update train_a3c.py
fix wrong import `policy` to `policies` | @@ -22,7 +22,7 @@ from chainerrl import links
from chainerrl import misc
from chainerrl.optimizers.nonbias_weight_decay import NonbiasWeightDecay
from chainerrl.optimizers import rmsprop_async
-from chainerrl import policy
+from chainerrl import policies
from chainerrl import v_function
from chainerrl.wrappers import a... |
Fix typo faq.md
Fixed link to Petastorm | @@ -8,7 +8,7 @@ If you want to help us implementing your favourite feature or model please take
## Do all datasets need to be loaded in memory?
-At the moment it depends on the type of feature: image features can be dynamically loaded from disk from an opened hdf5 file, while other types of features (that usually take ... |
Update writing_plugins.rst
Capitalize the first word in a sentence and add a period at the end. | @@ -404,7 +404,7 @@ return a result object, with which we can assert the tests' outcomes.
result.assert_outcomes(passed=4)
-additionally it is possible to copy examples for an example folder before running pytest on it
+Additionally it is possible to copy examples for an example folder before running pytest on it.
.. c... |
Update tutorial.rst
curl command to test the REST call on the python section produced an error on Windows. To fix it, the single quotes surrounding the --data argument were replaced with double quotes. | @@ -316,7 +316,7 @@ in MLflow saved the model as an artifact within the run.
curl -X POST -H "Content-Type:application/json; format=pandas-split" --data '{"columns":["alcohol", "chlorides", "citric acid", "density", "fixed acidity", "free sulfur dioxide", "pH", "residual sugar", "sulphates", "total sulfur dioxide", "vo... |
Update REQUEST-942-APPLICATION-ATTACK-SQLI.conf
ignore whitespaces before and after the match. | @@ -465,7 +465,7 @@ SecRule TX:PARANOIA_LEVEL "@lt 2" "phase:2,id:942014,nolog,pass,skipAfter:END-RE
# Identifies common initial SQLi probing requests where attackers insert/append
# quote characters to the existing normal payload to see how the app/db responds.
#
-SecRule ARGS_NAMES|ARGS|XML:/* "(^[\"'`;]+|[\"'`]+$)" ... |
Replace distance_matrix_euclidean with distance_matrix;
This speeds things up quite a bit, especially for Ih point clusters | @@ -828,7 +828,7 @@ def check_wyckoff_position(points, group, tol=1e-3):
if dsquared(xyz) > t: continue
#Calculate distances between original and generated points
pw = np.array([op.operate(p) for op in wp])
- dw = distance_matrix_euclidean(points, pw, PBC=PBC, squared=True)
+ dw = distance_matrix(points, pw, None, PBC=... |
docs: suggest pip install --upgrade
Close | @@ -18,26 +18,26 @@ Installation
------------
Fava is known to run on macOS, Linux, and Windows. You will need `Python 3
-<https://www.python.org/downloads/>`__ (at least version 3.5). Then you can
-use ``pip`` to install Fava by running::
+<https://www.python.org/downloads/>`__. Then you can use ``pip`` to install
+Fa... |
Clarified Sanger/Cancel Sanger button
Expanded the text on the "send" Sanger order button so it should be more obvious when you order Sanger and when you cancel a Sanger order | {# Email setting must be setup #}
{{ modal_sanger() }}
{% endif %}
+
+ {% if config['MAIL_USERNAME'] %}
+ {# Email setting must be setup #}
+ {{ modal_unsanger() }}
+ {% endif %}
+
{% endblock %}
{% macro sanger_button() %}
</div>
<div class="modal-footer">
<button class="btn btn-default" data-dismiss="modal">Close</bu... |
Provide a fallback implementation for PyContextVar_Get() that always returns the default value on Py<3.7.
This is currently needed to make the inline functions compile, because it seems that we are not properly excluding unused ones. | @@ -2,6 +2,14 @@ from cpython.object cimport PyObject
from cpython.ref cimport Py_XDECREF
cdef extern from "Python.h":
+ # Defining PyContextVar_Get() below to always return the default value for Py<3.7
+ # to make the inline functions sort-of work.
+ """
+ #if PY_VERSION_HEX < 0x030700b1 && !defined(PyContextVar_Get)
... |
[BUGFIX] fix for MXNet 1.5.
* remove clone.
* turn on numpy compatible.
* Revert "remove clone."
This reverts commit | from __future__ import absolute_import
+from distutils.version import LooseVersion
+
import numpy as np
import mxnet as mx
import mxnet.ndarray as nd
import numbers
+MX_VERSION = LooseVersion(mx.__version__)
+# After MXNet 1.5, empty tensors aren't supprted by default.
+# after we turn on the numpy compatible flag, MXN... |
[Doc] Fix link error in pipeline executor tutorial
Fix the link error. | """
Using Pipeline Executor in Relay
=================================
-**Author**: `Hua Jiang <https://https://github.com/huajsj>`_
+**Author**: `Hua Jiang <https://github.com/huajsj>`_
This is a short tutorial on how to use "Pipeline Executor" with Relay.
"""
|
Add some troubleshooting informations
This error could be somewhat difficult to find and as this
documentation file contains the instructions for a Quick Start
the quicker the issue is found and solved the better | @@ -167,6 +167,29 @@ following to bootstrap Ansible:
# scripts/bootstrap-ansible.sh
+Notes:
+ You might encounter an error while running the Ansible bootstrap script
+ when building some of the Python extension (like pycrypto) which says:
+
+ .. code-block:: shell-session
+
+ configure: error: cannot run C compiled pro... |
Fix Z offset not applied to onFloor objects.
Previously, the Z offset was being applied to both onFloor and other sampling. During the refactor it ended up in the else block corresponding to non-raycast, non-onFloor sampling. This fixes that issue. | @@ -74,6 +74,10 @@ def sample_kinematics(predicate, objA, objB, binary_state, use_ray_casting_metho
if sample_on_floor:
_, pos = objB.scene.get_random_point_by_room_instance(
objB.room_instance)
+
+ if pos is not None:
+ pos[2] = stable_z_on_aabb(
+ objA.get_body_id(), ([0, 0, pos[2]], [0, 0, pos[2]]))
else:
if use_ray... |
rtd-requirements: Update to Sphinx 4.1
See | # This file is strictly for building docs on readthedocs.org
# See pyproject.toml for local development
-Sphinx==3.5.3
-sphinx-rtd-theme==0.5.2
+Sphinx==4.1.2
+git+git://github.com/readthedocs/sphinx_rtd_theme@f5b0291#egg=sphinx-rtd-theme
toml
|
Fix typo: esp_format -> resp_format
Fixes the following error:
Traceback ...
File "...src/mpp-solar/mppsolar/protocols/protocol.py", line 173, in decode
NameError: name 'esp_format' is not defined | @@ -170,7 +170,7 @@ class AbstractProtocol(metaclass=abc.ABCMeta):
else:
# output[resp_format[2][item]['name']] = status
# _key = "{}".format(resp_format[2][item]["name"]).lower().replace(" ", "_")
- _key = esp_format[2][item]["name"]
+ _key = resp_format[2][item]["name"]
msgs[_key] = [status, ""]
# msgs[key] = [output... |
Add `restartable` field to `python_sources`
Closes | @@ -1027,6 +1027,7 @@ class PythonSourceTarget(Target):
PythonResolveField,
PythonRunGoalUseSandboxField,
PythonSourceField,
+ RestartableField,
)
help = "A single Python source file."
@@ -1108,6 +1109,7 @@ class PythonSourcesGeneratorTarget(TargetFilesGenerator):
PythonRunGoalUseSandboxField,
PythonDependenciesField,
... |
Use MaxSizePagination for the list of waffle endpoints to avoid pagination
[#PLAT-774] | @@ -6,6 +6,7 @@ from rest_framework import permissions as drf_permissions
from api.base.views import JSONAPIBaseView
from api.base.permissions import TokenHasScope
+from api.base.pagination import MaxSizePagination
from api.waffle.serializers import WaffleSerializer
from framework.auth.oauth_scopes import CoreScopes
@@... |
Add proper circuit breaking link
Remove old circuit breaking link as it is not maintained. | @@ -88,4 +88,4 @@ circuit_breakers:
max_retries: 3
```
-Circuit breaker metrics are exposed in statsd. For more information about the specific statistics, see the [Envoy documentation](https://www.envoyproxy.io/learn/circuit-breaking).
+Circuit breaker metrics are exposed in statsd. For more information about the speci... |
[IMPR] only provide few classes for the package interface
"from pywikibot.site import *" now only imports predefined classes
listed in __all__. | @@ -81,6 +81,9 @@ from pywikibot.tools import (
)
from pywikibot.tools import is_IP
+__all__ = ('APISite', 'DataSite', 'Family', 'LoginStatus', 'Namespace',
+ 'NamespacesDict', 'NonMWAPISite', 'PageInUse', 'RemovedSite',
+ 'Siteinfo', 'TokenWallet')
_logger = 'wiki.site'
|
[RPC][IOS] Add random to ios_rpc
random_fill is used in measure.py | #include "TVMRuntime.h"
// Runtime API
#include "../../../src/runtime/c_runtime_api.cc"
+#include "../../../src/runtime/contrib/random/random.cc"
#include "../../../src/runtime/cpu_device_api.cc"
#include "../../../src/runtime/dso_library.cc"
#include "../../../src/runtime/file_utils.cc"
|
add new prefix for production clusters to cleanup
prefix for production clusters will be changed from "jnk-" to "jXXX" where
XXX is last three digits from build number, so adding respective regex
to the defaults for aws cleanup script | @@ -5,6 +5,7 @@ AWS_REGION = 'us-east-2'
CLUSTER_PREFIXES_SPECIAL_RULES = {
'jnk-pr': 16, # keep it as first item before jnk prefix for fist match
'jnk': 36,
+ 'j\\d\\d\\d': 36,
'dnd': 'never',
'lr1': 24,
'lr2': 48,
|
Show also hidden partition in slurm
* Add the `-a` option when performing `scontrol show` to list hidden
partitions as well. | @@ -157,7 +157,7 @@ class SlurmJob(sched.Job):
def _get_all_nodes(self):
try:
- completed = os_ext.run_command('scontrol show -o nodes',
+ completed = os_ext.run_command('scontrol -a show -o nodes',
check=True)
except SpawnedProcessError as e:
raise JobError('could not retrieve node information') from e
@@ -220,7 +220,... |
Exclude fetches when the parent has an unapplied tree affecting change.
Correct ids to id__in. | @@ -705,7 +705,11 @@ class Resource extends mix(APIResource, IndexedDBResource) {
if (c.type === CHANGE_TYPES.CREATED) {
parent = c.obj.parent;
}
- return params.parent === parent || (params.ids || []).includes(c.key);
+ return (
+ params.parent === parent ||
+ params.parent === c.key ||
+ (params.id__in || []).include... |
utils/log: maintain indent for buffered records
Ensure buffered records are indented properly by saving the indent level
at the time the record was generated as part of the record, and
preferring that over the current indent level inside LineFormatter. | @@ -225,15 +225,19 @@ class InitHandler(logging.handlers.BufferingHandler):
super(InitHandler, self).__init__(capacity)
self.targets = []
- def add_target(self, target):
- if target not in self.targets:
- self.targets.append(target)
+ def emit(self, record):
+ record.indent_level = _indent_level
+ super(InitHandler, se... |
Use gauge instead of counter for deploys
The delta() prometheus function is used to show deploy annotations in grafana. This function should only be used against gauges. | # -*- coding: utf-8
from blinker import signal
-from prometheus_client import Counter, Histogram
+from prometheus_client import Counter, Gauge, Histogram
class Bookkeeper(object):
- """Trigger signals and counters"""
- deploy_counter = Counter("deployer_requests", "Request to deploy an app", ["app"])
+ """Measures time... |
ENH: Use OrderedDict in io.netcdf. Fixes
Makes use of orderedDict instead of regular dict in io.netcdf. Scavved
from pupynere.
First commit. Please no hate :-) | @@ -39,6 +39,11 @@ __all__ = ['netcdf_file']
import warnings
import weakref
from operator import mul
+try:
+ from collections import OrderedDict
+except ImportError:
+ OrderedDict = dict
+
import mmap as mm
import numpy as np
@@ -245,8 +250,8 @@ class netcdf_file(object):
self.version_byte = version
self.maskandscale =... |
ModuleDeprecationWrapper._add_deprecated_attr: Delete existing attribute
In Python __getattr__ is only invoked if object does not have the requested
attribute. If the deprecated module has the attribute, then the __getattr__
method of ModuleDeprecationWrapper will not be invoked and therefore no
warning will be issued. | @@ -1733,6 +1733,9 @@ class ModuleDeprecationWrapper(types.ModuleType):
else:
warning_message = u"{0}.{1} is deprecated."
+ if hasattr(self, name):
+ # __getattr__ will only be invoked if self.<name> does not exist.
+ delattr(self, name)
self._deprecated[name] = replacement_name, replacement, warning_message
def __seta... |
[docs] fix dynamic graph examples
fixes
## Test Plan
eyes | @@ -55,12 +55,12 @@ def load_pieces():
Then after creating ops for our downstream operations, we can put them all together in a job.
-```python file=/concepts/solids_pipelines/dynamic.py startafter=dyn_out_start endbefore=dyn_out_end
-@op(out=DynamicOut())
-def load_pieces():
- large_data = load_big_data()
- for idx, p... |
Update 2.5.0a.rst
Minor language tweaks | @@ -26,9 +26,9 @@ Below is an outline of the new process, once the menu tag has prepared it's opti
1. The menu class's ``render_from_tag()`` method is called. It takes the current context, as well as any 'option values' passed to / prepared by the template tag.
-2. ``render_from_tag()`` calls the class's ``get_contextu... |
Stats: Create guild boost stat collection
Collect Guild boost amount + level and post it to StatsD every hour in task. Added starting to cog `__init__.py` and stopping to `cog_unload`. | @@ -2,8 +2,10 @@ import string
from datetime import datetime
from discord import Member, Message, Status
-from discord.ext.commands import Bot, Cog, Context
+from discord.ext.commands import Cog, Context
+from discord.ext.tasks import loop
+from bot.bot import Bot
from bot.constants import Channels, Guild, Stats as Sta... |
Fix the error of "Expected all tensors to be on the same device".
Summary:
Pull Request resolved:
As title. | @@ -206,7 +206,9 @@ class NGramConvolutionalNetwork(nn.Module):
# shape: seq_len, batch_size, state_dim + action_dim
input = torch.cat((state, action), dim=-1)
# shape: seq_len, batch_size, (state_dim + action_dim) * context_size
- ngram_input = ngram(input, self.context_size, self.ngram_padding)
+ ngram_input = ngram(... |
(solid-execution-result-4) {input,output}_expectations --> {input,output}_expectation_step_events
Summary:
We need to figure out a plan for ExpectationDefinition. Until then we should
at least make the names make sense.
Test Plan: buildkite
Reviewers: max, natekupp, alangenfeld | @@ -144,11 +144,11 @@ def get_step_success_event(self):
check.failed('Step success not found for solid {}'.format(self.solid.name))
@property
- def input_expectations(self):
+ def input_expectation_step_events(self):
return self.step_events_by_kind.get(StepKind.INPUT_EXPECTATION, [])
@property
- def output_expectations... |
fix: [novelfull] use match and non-capturing group
Use .match instead of .findAll, add a non-capturing group, compile regex
outside of the loop, fixes | @@ -6,7 +6,9 @@ from ..utils.crawler import Crawler
logger = logging.getLogger('NOVEL_FULL')
search_url = 'https://novelfull.com/search?keyword=%s'
-
+# avoid compiling regex inside the loop
+RE_CHAPTER = r'(?:ch(apter))? (\d+)'
+RE_VOLUME = r'(?:book|vol|volume) (\d+)'
class NovelFullCrawler(Crawler):
base_url = [
@@ ... |
change to use clang if NDK >= 18
Summary:
Pull Request resolved:
ghimport-source-id: | @@ -37,9 +37,13 @@ if [ ! -d "$ANDROID_NDK" ]; then
exit 1
fi
+ANDROID_NDK_PROPERTIES="$ANDROID_NDK/source.properties"
+[ -f "$ANDROID_NDK_PROPERTIES" ] && ANDROID_NDK_VERSION=$(sed -n 's/^Pkg.Revision[^=]*= *\([0-9]*\)\..*$/\1/p' "$ANDROID_NDK_PROPERTIES")
+
echo "Bash: $(/bin/bash --version | head -1)"
echo "Caffe2 p... |
Remove deprecated code for generating dataset
fixes | @@ -8,13 +8,21 @@ from snips_nlu.common.utils import unicode_string, json_string
@plac.annotations(
language=("Language of the assistant", "positional", None, str),
- files=("List of intent and entity files", "positional", None, str, None,
- "filename"))
-def generate_dataset(language, *files):
- """Create a Snips NLU ... |
secscan: fix check for end of table
Correctly check for the end of the manifest table, for when the worker
needs to start over. Also add missing token to lock key. | @@ -247,7 +247,9 @@ class V4SecurityScanner(SecurityScannerInterface):
logger.warning("Could not acquire global lock for recent manifest indexing. Skipping")
try:
- with GlobalLock("SECURITYWORKER_INDEX_TOKEN_", lock_ttl=300, auto_renewal=True):
+ with GlobalLock(
+ "SECURITYWORKER_INDEX_TOKEN_" + str(start_token), loc... |
Brownfield BYO Bastion Template
The task Render Brownfield BYO Bastion Template is missing the dash on the destination file | when: create_vpc == "no" and byo_bastion == "no"
- name: Render Brownfield BYO Bastion Template
- template: src=roles/cloudformation-infra/files/brownfield-byo-bastion.json.j2 dest=roles/cloudformation-infra/files/{{ stack_name }}brownfield-byo-bastion.json
+ template: src=roles/cloudformation-infra/files/brownfield-by... |
Fix patched module was never automatically imported
Closes It has to be imported late in the process of
`import telethon` for its side-effects. | @@ -2,6 +2,7 @@ from .client.telegramclient import TelegramClient
from .network import connection
from .tl import types, functions, custom
from .tl.custom import Button
+from .tl import patched as _ # import for its side-effects
from . import version, events, utils, errors
__version__ = version.__version__
|
pytest: check item.keywords rather than named attribute
pytest-4 removed the latter way to check markers. | @@ -26,7 +26,7 @@ def pytest_runtest_setup(item):
import doctest
for m in marks_default_skip:
- if getattr(item.obj, m, None) and not item.config.getvalue(m):
+ if m in item.keywords and not item.config.getvalue(m):
pytest.skip('{0} tests not requested'.format(m))
if 'cuda' in item.keywords:
|
2022 Hyundai Elantra firmware versions
Added 2022 Hyundai Elantra fwdCamera, transmission, and engine fingerprints. | @@ -911,6 +911,7 @@ FW_VERSIONS = {
(Ecu.fwdCamera, 0x7c4, None): [
b'\xf1\x00CN7 MFC AT USA LHD 1.00 1.00 99210-AB000 200819',
b'\xf1\x00CN7 MFC AT USA LHD 1.00 1.03 99210-AA000 200819',
+ b'\xf1\x00CN7 MFC AT USA LHD 1.00 1.01 99210-AB000 210205',
],
(Ecu.esp, 0x7d1, None): [
b'\xf1\x00CN ESC \t 101 \x10\x03 58910-AB... |
Avoid random catalog numbers
Now we compute an MD5 instead of a random hash for local parts. | import copy
import re
import sys
+import hashlib
# Distributors definitions.
from .distributor import distributor_class
@@ -34,8 +35,12 @@ __all__ = ['dist_local_template']
if sys.version_info[0] < 3:
from urlparse import urlsplit, urlunsplit
+ def to_bytes(val):
+ return val
else:
from urllib.parse import urlsplit, ur... |
Remove OvsDpdkDriverType
Configuration of DPDK driver is not supported and hence
removing it from templates | @@ -80,14 +80,6 @@ parameters:
type: string
tags:
- role_specific
- OvsDpdkDriverType:
- default: "vfio-pci"
- description: >
- (DEPRECATED) DPDK Driver type. Ensure the Overcloud NIC to be used for DPDK supports
- this UIO/PMD driver.
- type: string
- tags:
- - role_specific
OvsPmdCoreList:
description: >
A list or ra... |
Fix parallel flags
Some of the reset flags for parallel were False rather than FALSE as they should be.
This commit corrects the oversight. | @@ -127,10 +127,10 @@ def parallel_map( # pylint: disable=dangerous-default-value
except (KeyboardInterrupt, Exception) as error:
if isinstance(error, KeyboardInterrupt):
Publisher().publish("terra.parallel.finish")
- os.environ['QISKIT_IN_PARALLEL'] = 'False'
+ os.environ['QISKIT_IN_PARALLEL'] = 'FALSE'
raise QiskitEr... |
Docs: Update array-stack.rst [skip ci]
This PR only adds a single comma to `array-stack.rst`. | @@ -6,7 +6,7 @@ think of as one large array. This is common with geospatial data in which we
might have many HDF5/NetCDF files on disk, one for every day, but we want to do
operations that span multiple days.
-To solve this problem we use the functions ``da.stack``, ``da.concatenate``,
+To solve this problem, we use th... |
Fix doc nit
use openstack hypervisor list instead nova hypervisor-list
to sync with sample given | @@ -1173,7 +1173,7 @@ aggregates in nova. These aggregates are defined (purely) as groupings
of related resource providers. Since compute nodes in nova are
represented in placement as resource providers, they can be added to a
placement aggregate as well. For example, get the uuid of the compute
-node using :command:`n... |
[MetaSchedule][Minor] Fix Median Number
The previous median number calculation util function used the wrong index which could cause out of bound issue as mentioned in . This PR fixed this issue. | @@ -357,7 +357,7 @@ inline double GetRunMsMedian(const RunnerResult& runner_result) {
std::sort(v.begin(), v.end());
int n = v.size();
if (n % 2 == 0) {
- return (v[n / 2] + v[n / 2 + 1]) * 0.5 * 1000.0;
+ return (v[n / 2 - 1] + v[n / 2]) * 0.5 * 1000.0;
} else {
return v[n / 2] * 1000.0;
}
|
lower batch size so it works on restricted platforms
Windows and maybe some other platforms have a lower limit on sqlite variables. | @@ -111,7 +111,7 @@ class HierarchicalDeterministic(AddressManager):
keys_batch, final_keys = [], []
for index in range(start, end+1):
keys_batch.append((index, self.public_key.child(index)))
- if len(keys_batch) % 2000 == 0:
+ if len(keys_batch) % 180 == 0:
yield self.db.add_keys(
self.account, self.chain_number, keys... |
ceph-nfs: add nfs-ganesha-rados-urls package
Since nfs-ganesha 2.8.3 the rados-urls library has been move to a
dedicated package. | - name: install redhat nfs-ganesha-rgw and ceph-radosgw packages
package:
- name: ['nfs-ganesha-rgw', 'nfs-ganesha-rados-grace', 'ceph-radosgw']
+ name: ['nfs-ganesha-rgw', 'nfs-ganesha-rados-grace', 'nfs-ganesha-rados-urls', 'ceph-radosgw']
state: "{{ (upgrade_ceph_packages|bool) | ternary('latest','present') }}"
regi... |
chore: Fix typo in rebase section
This is just a tiny typo fix
`the that => that` | @@ -559,7 +559,7 @@ The ``rebase`` action will rebase the pull request against its base branch.
.. warning::
Be aware that rebasing force-pushes the pull request head branch: any change
- done to the that branch while Mergify is rebasing will be lost.
+ done to that branch while Mergify is rebasing will be lost.
.. _up... |
Update README.md
fix: conf/decode.conf to conf/decode.yaml | - ASR config: [conf/tuning/train_asr_transformer2.yaml](conf/tuning/train_asr_transformer2.yaml)
- LM config: [conf/tuning/train_lm_transformer.yaml](conf/tuning/train_lm_transformer.yaml)
-- Decode config: [conf/decode.conf](conf/decode.conf)
+- Decode config: [conf/decode.yaml](conf/decode.yaml)
- Pretrained model: h... |
doc/README: Initial Readme Text
Fixes | -Pybricks API
-=============
+Pybricks end-user API & Documentation
+=====================================
-Description
+This repository documents the Pybricks end-user MicroPython API.
+
+Each `Pybricks firmware`_ comes with the `Pybricks package`_. All modules,
+classes, methods, and functions in that package have op... |
fix: process targets from template
YAML templates will only pass string. This will attempt to process a
target as a potential json and then as a comma separated string.
Closes | @@ -152,13 +152,30 @@ class AlexaNotificationService(BaseNotificationService):
async def async_send_message(self, message="", **kwargs):
"""Send a message to a Alexa device."""
_LOGGER.debug("Message: %s, kwargs: %s", message, kwargs)
+ _LOGGER.debug("Target type: %s", type(kwargs.get(ATTR_TARGET)))
kwargs["message"] =... |
Update util.py
Fixed edge case in loading of methods from classes--functions that return generic types (like Dict) where passing the first isinstance, but failing at initialization (i.e., this_method() ). | @@ -97,10 +97,13 @@ def load_programmatic_task(task_module_name: str) -> task.Task:
for i, k in enumerate(dir(this_task_class)):
this_method = getattr(this_task_class, k)
if isinstance(this_method, abc.ABCMeta):
+ try:
this_method_object = this_method()
if issubclass(this_method_object.__class__, task.Task):
assert(tas... |
Add the Unidata Python Gallery link to the MetPy README
Resolves: | @@ -90,6 +90,7 @@ Important Links
- Source code repository: https://github.com/Unidata/MetPy
- HTML Documentation : http://unidata.github.io/MetPy
+- Unidata Python Gallery: https://unidata.github.io/python-gallery/
- Issue tracker: http://github.com/Unidata/MetPy/issues
- Gitter chat room: https://gitter.im/Unidata/Me... |
Get rid of custom wrap_db_retry call in sync_allocations
Just for consistency, get rid of the last direct call to
wrap_db_retry and instead use neutron.db.api.retry_db_errors
in the sync_allocations code so we don't potentially get
bitten by slight inconsistencies between the two.
TrivialFix
Related-Bug: | @@ -20,7 +20,6 @@ import netaddr
from neutron_lib import context
from neutron_lib import exceptions as exc
from oslo_config import cfg
-from oslo_db import api as oslo_db_api
from oslo_db import exception as db_exc
from oslo_log import log
import six
@@ -136,9 +135,7 @@ class _TunnelTypeDriverBase(helpers.SegmentTypeDr... |
add back tips
add back tips | @@ -3,7 +3,7 @@ Type: Warning
Contract: Crowdfunding
Function name: withdrawfunds()
PC address: 816
-In the function 'withdrawfunds()' a non-zero amount of Ether is sent to msg.sender.
+In the function `'withdrawfunds()'` a non-zero amount of Ether is sent to msg.sender.
There is a check on storage index 1. This storag... |
Remove redundant array-gen loop in gather_ops_test.py
Summary:
Pull Request resolved:
Remove unnecessary [r for r in []] statements. | @@ -28,7 +28,7 @@ class TestGatherOps(serial.SerializedTestCase):
if ind.size == 0:
return [np.zeros((0, 10, 20)).astype(np.float32)]
- output = [r for r in [data[i] for i in ind]]
+ output = [data[i] for i in ind]
return [output]
self.assertReferenceChecks(gc, op, [data, ind], ref_gather)
@@ -67,7 +67,7 @@ class TestB... |
Eliminate usage of instance attributes in InitController.get_solution_stack
SIM:
cr | @@ -80,7 +80,8 @@ class InitController(AbstractBaseController):
self.force_non_interactive,
self.app.pargs.keyname,
self.app.pargs.profile,
- self.noverify
+ self.noverify,
+ self.app.pargs.platform
)
return
@@ -92,7 +93,7 @@ class InitController(AbstractBaseController):
self.region = set_up_credentials(self.app.pargs.... |
Redirect batch system standard output/error output for PBS/Torque
See
Modifying the wrapper script appears to be the only way to get the $PBS_JOBID
variable to add the PBS/Torque job ID to the standard output/error filename
Remove TODO comment which suggests implementing this feature | @@ -163,13 +163,6 @@ class TorqueBatchSystem(AbstractGridEngineBatchSystem):
# TODO: passing $PWD on command line not working for -d, resorting to
# $PBS_O_WORKDIR but maybe should fix this here instead of in script?
- # TODO: we previosuly trashed the stderr/stdout, as in the commented
- # code, but these may be retai... |
Fix jsonrpc's sendTransaction on token ID
snake_case to camelCase. not being used right now as mainnet doesn't
have native tokens yet. | @@ -720,10 +720,10 @@ class JSONRPCHttpServer:
)
gas_token_id = get_data_default(
- "gas_token_id", quantity_decoder, self.env.quark_chain_config.genesis_token
+ "gasTokenId", quantity_decoder, self.env.quark_chain_config.genesis_token
)
transfer_token_id = get_data_default(
- "transfer_token_id",
+ "transferTokenId",
... |
(config-type-database-2) Delete unused get_type in DauphinPipeline
Summary:
Unused method that is a harbinger of the bad old days of a merged
dagster type and config type system
Depends on D2238
Test Plan: BK
Reviewers: alangenfeld, sashank, themissinghlink | from dagster.core.definitions.pipeline import PipelineRunsFilter
from dagster.seven import lru_cache
-from .config_types import to_dauphin_config_type
from .runtime_types import to_dauphin_dagster_type
from .solids import DauphinSolidContainer, build_dauphin_solid_handles, build_dauphin_solids
@@ -87,15 +86,6 @@ def re... |
Disallow transformation from unitspherical to cartesian with both PM and RV.
This arguably is a bug in the representations, where UnitSpherical simply
drops the RV. | @@ -1078,6 +1078,19 @@ class BaseCoordinateFrame(ShapedLikeNDArray, metaclass=FrameMeta):
cached_repr = self.cache['representation'].get(cache_key)
if not cached_repr:
if differential_cls:
+ # Sanity check to ensure we do not just drop radial
+ # velocity. TODO: should Representation.represent_as
+ # allow this transfo... |
Fix: recent RCs are in 2021
I do this all the time, but we definitely don't want to relive 2020. | @@ -6,7 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project does not yet adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
for setuptools_scm/PEP 440 reasons.
-## 1.0rc9 aka Release Candidate 9 - 2020-03-16
+## 1.0rc9 aka Release Candidate 9 - 202... |
CopyImageMetadata : Remove todo
ImageProcessor does now provide an ArrayPlug for `in`, but we have standardised on using that only when all inputs serve a similar purpose (such as in Merge). When a secondary input has different semantics than the rest, it should have its own name. See | @@ -54,8 +54,6 @@ class GAFFERIMAGE_API CopyImageMetadata : public MetadataProcessor
GAFFER_NODE_DECLARE_TYPE( GafferImage::CopyImageMetadata, CopyImageMetadataTypeId, MetadataProcessor );
- /// \todo: If ImageProcessor provides an ArrayPlug for "in" instead,
- /// we can remove this secondary image plug.
ImagePlug *co... |
ceph-infra: Apply firewall rules with container
We don't have a reason to not apply firewall rules on the host when
using a containerized deployment.
The TripleO environments already manage the ceph firewall rules outside
ceph-ansible and set the configure_firewall variable to false.
Closes: | check_mode: no
changed_when: false
tags: firewall
- when: not containerized_deployment | bool
- when: (firewalld_pkg_query.get('rc', 1) == 0
or is_atomic | bool)
|
keymap reset_bind_alias no longer via alias
Also change keymap since on Windows ctrl-alt-shift-esc does not work. | @@ -150,7 +150,8 @@ DEFAULT_KEYMAP = {
"ctrl+shift+h": ("scale -1 1",),
"ctrl+shift+o": ("outline 1mm",),
"ctrl+shift+v": ("scale 1 -1",),
- "ctrl+alt+shift+escape": ("reset_bind_alias",),
+ "ctrl+alt+shift+escape": ("", "reset_bind_alias",),
+ "ctrl+alt+shift+home": ("bind default;alias default", ),
}
DEFAULT_ALIAS = ... |
Extract loop into function
Makes testing easier | @@ -1107,58 +1107,14 @@ class SaltAPIHandler(BaseSaltAPIHandler): # pylint: disable=W0223
is_finished,
)
- def more_todo():
- """
- Check if there are any more minions we are waiting on returns from
- """
- return any(x is False for x in minions.values())
-
- # here we want to follow the behavior of LocalClient.get_ite... |
fix error with passing `Null` when `generated=True`
Fixes | @@ -669,7 +669,7 @@ class Model(metaclass=ModelMeta):
passed_fields.add(meta.fields_map[key].source_field)
elif key in meta.fields_db_projection:
field_object = meta.fields_map[key]
- if field_object.generated:
+ if field_object.pk and field_object.generated:
self._custom_generated_pk = True
if value is None and not fi... |
Fix - added active site from settings if same as local id
Without this Tray configuring background process will not show proper site in LS dropdown | @@ -848,6 +848,11 @@ class SyncServerModule(OpenPypeModule, ITrayModule):
if self.enabled and sync_settings.get('enabled'):
sites.append(self.LOCAL_SITE)
+ active_site = sync_settings["config"]["active_site"]
+ # for Tray running background process
+ if active_site == get_local_site_id() and active_site not in sites:
+... |
Fix test case.
Fix test for generate_configuration function behavior. | @@ -203,35 +203,54 @@ class InternetExchangeTestCase(TestCase):
'as_name': 'Test 1',
'max_prefixes': 0,
'sessions': [
- {'ip_address': '2001:db8::1', 'enabled': True}
+ {
+ 'ip_address': '2001:db8::1',
+ 'password': False,
+ 'enabled': True, }
]
},
2: {
'as_name': 'Test 2',
'max_prefixes': 0,
'sessions': [
- {'ip_addre... |
improve console notifier initialization
The runbook should be loaded in _initialize, not every message. | import logging
from dataclasses import dataclass
-from typing import List, Type, cast
+from typing import Any, List, Type, cast
from dataclasses_json import dataclass_json # type: ignore
@@ -29,11 +29,14 @@ class Console(notifier.Notifier):
return ConsoleSchema
def _received_message(self, message: notifier.MessageBase)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.