message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
config/core: Fix handling of depreciated parameters
Provide warning to user when attempting to set a depreciated
parameter instead of during validation and only raise the warning
if a value has been explicitly provided. | @@ -290,6 +290,9 @@ class ConfigurationPoint(object):
def set_value(self, obj, value=None, check_mandatory=True):
if self.deprecated:
+ if value is not None:
+ msg = 'Depreciated parameter supplied for "{}" in "{}". The value will be ignored.'
+ logger.warning(msg.format(self.name, obj.name))
return
if value is None:
i... |
add support for psqlextra extensions in reset_db
This attempts to suport the django-postgres-extra library wich is also a valid postgresq engine | @@ -112,6 +112,7 @@ Type 'yes' to continue, or 'no' to cancel: """ % (database_name,))
'django.db.backends.postgresql',
'django.db.backends.postgresql_psycopg2',
'django.db.backends.postgis',
+ 'psqlextra.backend',
))
if engine in SQLITE_ENGINES:
|
fixing example_runner.ipynb
added the missing import of utils as pointed out in an issue. | }
],
"source": [
+ "from naslib.utils import utils\n",
"config = utils.get_config_from_args(config_type='nas')\n",
"\n",
"logger = setup_logger(config.save + \"/log.log\")\n",
|
Remove tflearn package
This package is unmaintained and hasn't been updated since 2017. Keras is now the way to go.
Additionally, this package was broken because it requires TensorFlow 1.x and we are using 2.x | @@ -208,8 +208,6 @@ RUN pip install mpld3 && \
pip install plotly && \
pip install git+https://github.com/nicta/dora.git && \
pip install git+https://github.com/hyperopt/hyperopt.git && \
- # tflean. Deep learning library featuring a higher-level API for TensorFlow. http://tflearn.org
- pip install git+https://github.c... |
Add arguments __repr__ in Distribution base class
Summary: Pull Request resolved: | @@ -221,4 +221,8 @@ class Distribution(object):
raise ValueError('The value argument must be within the support')
def __repr__(self):
- return self.__class__.__name__ + '()'
+ param_names = [k for k, _ in self.arg_constraints.items()]
+ args_string = ', '.join(['{}: {}'.format(p, self.__dict__[p]
+ if self.__dict__[p].... |
define int bounds for _SizesToOffsets
This patch defines integer bounds for `_SizesToOffsets`. | @@ -3719,6 +3719,7 @@ class _SizesToOffsets(Array):
def __init__(self, sizes):
assert sizes.ndim == 1
assert sizes.dtype == int
+ assert sizes._intbounds[0] >= 0
self._sizes = sizes
super().__init__(args=[sizes], shape=(sizes.shape[0]+1,), dtype=int)
@@ -3730,6 +3731,11 @@ class _SizesToOffsets(Array):
if not where:
re... |
Changes GSTModelPack method name: get_gst_circuits_list -> get_gst_circuits.
This follows our guidelines better by not putting the names of types
within function/method names. | @@ -232,7 +232,7 @@ class GSTModelPack(ModelPack):
kwargs.get('add_default_protocol', False),
)
- def get_gst_circuits_list(self, max_max_length, qubit_labels=None, fpr=False, lite=True, **kwargs):
+ def get_gst_circuits(self, max_max_length, qubit_labels=None, fpr=False, lite=True, **kwargs):
""" Construct a :class:`p... |
run bimpm configuration
map=0.541182 ndcg@5=0.596185 ndcg@3=0.509645 | "num_iters": 400,
"display_interval": 10,
"test_weights_iters": 400,
- "optimizer": "adadelta",
- "learning_rate": 0.0001
+ "optimizer": "adam",
+ "learning_rate": 0.001
},
"inputs": {
"share": {
"model_path": "./matchzoo/models/",
"model_py": "bimpm.BiMPM",
"setting": {
- "hidden_size": 100,
+ "hidden_size": 50,
"chan... |
Properly handle User-Agent when AXES_ONLY_USER_FAILURES is set
Fixes access to undefined variable in _query_user_attempts and
respects documentation of the settings. | @@ -41,7 +41,7 @@ def _query_user_attempts(request):
else:
params['ip_address'] = ip
- if settings.AXES_USE_USER_AGENT:
+ if settings.AXES_USE_USER_AGENT and not settings.AXES_ONLY_USER_FAILURES:
params['user_agent'] = ua
attempts = AccessAttempt.objects.filter(**params)
@@ -75,7 +75,7 @@ def get_cache_key(request_or_o... |
Move pypowervm requirement to 1.1.12
pypowervm needs to be 1.1.12 or later for PowerVM vSCSI cinder volume
support [1].
[1] | @@ -61,7 +61,7 @@ microversion-parse>=0.2.1 # Apache-2.0
os-xenapi>=0.3.1 # Apache-2.0
tooz>=1.58.0 # Apache-2.0
cursive>=0.2.1 # Apache-2.0
-pypowervm>=1.1.11 # Apache-2.0
+pypowervm>=1.1.12 # Apache-2.0
os-service-types>=1.2.0 # Apache-2.0
taskflow>=2.16.0 # Apache-2.0
python-dateutil>=2.5.3 # BSD
|
fix add option to disable to use of security groups
In advanced zones, security groups are supported only on the KVM hypervisor.
With hypervisor other than KVM, we need a way to disable the use of SGs
ref: | @@ -168,9 +168,15 @@ def get_security_groups(conn, vm_):
'''
Return a list of security groups to use, defaulting to ['default']
'''
- return config.get_cloud_config_value('securitygroup', vm_, __opts__,
- default=['default'])
-
+ securitygroup_enabled = config.get_cloud_config_value(
+ 'securitygroup_enabled', vm_, __o... |
[sync] Don't exclude root dir from sync events
This allows us to act early when we attempt to sync the deletion of the root directory. | @@ -1401,10 +1401,6 @@ class SyncEngine:
:returns: Whether the path is excluded from syncing.
"""
- # Is root folder?
- if path in ("/", ""):
- return True
-
dirname, basename = osp.split(path)
# Is in excluded files?
|
Support new primitives for machine-independent zo files.
Still missing the ability to enable them on the command line. | @@ -18,7 +18,7 @@ from pycket.values_string import W_String
from pycket.values_parameter import top_level_config
from pycket.error import SchemeException
from pycket import pycket_json
-from pycket.prims.expose import prim_env, expose, default
+from pycket.prims.expose import prim_env, expose, default, expose_val
from ... |
Set reasonable default ANSIBLE_COLLECTIONS_PATHS
When the current role is part of a collection, set the collection
search path for ANSIBLE to the parent collection, so that any playbooks
referencing collections within the same namespace can do their job
appropriately | @@ -413,6 +413,25 @@ def default_options(self):
@property
def default_env(self):
+ # Finds if the current project is part of an ansible_collections hierarchy
+ collection_indicator = "ansible_collections"
+ collections_paths_list = [
+ util.abs_path(
+ os.path.join(self._config.scenario.ephemeral_directory, "collection... |
[add] logger - use env for rotating log params
Two environment variables were added to allow customization of the rotating log parameters:
`FLEXGET_LOG_MAXBYTES` defines the maximum bytes per file (default 1 MB)
`FLEXGET_LOG_MAXCOUNT` defines the maximum number of files (default 9) | @@ -10,6 +10,7 @@ import sys
import threading
import uuid
import warnings
+import os
from flexget import __version__
from flexget.utils.tools import io_encoding
@@ -18,6 +19,9 @@ from flexget.utils.tools import io_encoding
TRACE = 5
# A level more detailed than INFO
VERBOSE = 15
+# environment variables to modify rotat... |
Update setup.py
bumping version number | @@ -38,8 +38,8 @@ def find_package_data(data_root, package_root):
# #########################
-VERSION = '0.7.3dev0'
-ISRELEASED = False
+VERSION = '0.8.0'
+ISRELEASED = True
__version__ = VERSION
# #########################
|
Temporarily display deployed_grpc dagster-graphql coverage until we resolve thread-safety flakiness
is there an issue I can link to this?
Summary: As title
Test Plan: BK
Reviewers: sashank, alangenfeld | @@ -274,7 +274,9 @@ def graphql_pg_extra_cmds_fn(_):
"-sqlite_instance_hosted_user_process_env",
"-sqlite_instance_multi_location",
"-sqlite_instance_managed_grpc_env",
- "-sqlite_instance_deployed_grpc_env",
+ # Temporarily disabling due to thread-safety issues with
+ # deployed gRPC servers (https://github.com/dagste... |
Export adaptive subdivison parameters to RPR scene file using scene render size
PURPOSE
A quick fix of RPR file export to apply adaptive subdivision parameters.
EFFECT OF CHANGE
added adaptive subdivision export to RPR file. | @@ -72,6 +72,10 @@ class ExportEngine(Engine):
self.rpr_context.set_parameter(pyrpr.CONTEXT_PREVIEW, False)
scene.rpr.export_ray_depth(self.rpr_context)
+ # adaptive subdivision will be limited to the current scene render size
+ self.rpr_context.enable_aov(pyrpr.AOV_COLOR)
+ self.rpr_context.sync_auto_adapt_subdivision... |
Implement UndefinedType::typeMeta.
Summary: Pull Request resolved: | @@ -9,7 +9,7 @@ ScalarType UndefinedType::scalarType() const {
return ScalarType::Undefined;
}
caffe2::TypeMeta UndefinedType::typeMeta() const {
- AT_ERROR("typeMeta not defined for UndefinedType");
+ return scalarTypeToTypeMeta(scalarType());
}
Backend UndefinedType::backend() const {
return Backend::Undefined;
|
[Tune] PTL replace deprecated `running_sanity_check` with `sanity_checking`
`running_sanity_check` was deprecated and removed in in favor of `sanity_checking` | @@ -174,7 +174,7 @@ class TuneReportCallback(TuneCallback):
def _get_report_dict(self, trainer: Trainer, pl_module: LightningModule):
# Don't report if just doing initial validation sanity checks.
- if trainer.running_sanity_check:
+ if trainer.sanity_checking:
return
if not self._metrics:
report_dict = {
@@ -228,7 +22... |
Updated run_danesfield wrt new obj file output location
The roof_geon_extraction tool now moves the output obj files to the
working_dir, updated the run_danesfield script to reflect this change. | @@ -414,12 +414,11 @@ def main(config_fpath):
# Buildings to DSM
#############################################
logging.info('---- Running buildings to dsm ----')
- objs_dir = os.path.join(working_dir, "output_obj")
# Generate the output DSM
output_dsm = os.path.join(working_dir, "buildings_to_dsm_DSM.tif")
cmd_args = [... |
Update Node instructions to v10.x
The required Node version was updated from v6.x to v10.x.
This commit updates the docs to reflect that.
Ref: learningequality/kolibri#4524 | @@ -28,12 +28,12 @@ Install environment dependencies
#. Install `Python <https://www.python.org/downloads/windows/>`__ if you are on Windows, on Linux and OSX Python is preinstalled (recommended versions 2.7+ or 3.4+).
#. Install `pip <https://pypi.python.org/pypi/pip>`__ package installer.
-#. Install `Node.js <https:... |
updates craft mailable command description
Referenced in issue | @@ -4,7 +4,7 @@ from ..commands import BaseScaffoldCommand
class MailableCommand(BaseScaffoldCommand):
"""
- Creates a new Job.
+ Creates a new Mailable.
mailable
{name : Name of the job you want to create}
|
new tests
ID methods getHGT, bbox, is_processed, compression, export2sqlite, getGammaImages
SAFE method getOSV | import pyroSAR
from pyroSAR.spatial import crsConvert, haversine
+from pyroSAR.ancillary import finder
import pytest
+import shutil
import os
testdir = os.getenv('TESTDATA_DIR', 'pyroSAR/tests/data/')
@@ -12,6 +14,7 @@ testcases = [
'bbox_area': 7.573045244595988,
'compression': 'zip',
'corners': {'ymax': 52.183979, 'y... |
check likelihood levels only if loop is executed
it is not guaranteed if the maxcall etc are used | @@ -1168,6 +1168,8 @@ class DynamicSampler(object):
# sample past the original bounds "for free".
for i in range(1):
+ iterated_batch = False
+ # To identify if the loop below was executed or not
for it, results in enumerate(
self.sampler.sample(dlogz=dlogz_batch,
logl_max=logl_max,
@@ -1198,11 +1200,11 @@ class Dynami... |
integ-tests: retry without --keep-logs on cluster deletion errors
keep-logs require a stack update that cannot be executed in case the stack is in a failure state | @@ -173,13 +173,19 @@ class ClustersFactory:
logging.info("Sleeping for 60 seconds in case cluster is not ready yet")
time.sleep(60)
- @retry(stop_max_attempt_number=10, wait_fixed=5000, retry_on_exception=retry_if_subprocess_error)
+ @retry(stop_max_attempt_number=5, wait_fixed=5000, retry_on_exception=retry_if_subpro... |
pe: better handle invalid import name
closes | @@ -903,8 +903,13 @@ class PE(object):
idx+=1
continue
+ try:
funcname = ibn.Name
+ except UnicodeDecodeError:
+ funcname = None
+ logger.warning("pe: failed to read import name at RVA 0x%x", ibn_rva)
+ if funcname is not None:
imports_list.append((save_name + arrayoff, libname, funcname))
idx += 1
|
Add a mention of the True/False returns with __virtual__()
And their relationship to `__virtualname__`.
Fixes | @@ -405,6 +405,10 @@ similar to the following:
return __virtualname__
return False
+Note that the ``__virtual__()`` function will return either a ``True`` or ``False``
+value. If it returns a ``True`` value, this ``__virtualname__`` module-level attribute
+can be set as seen in the above example. This is the name that ... |
[CMSIS-NN] Stop test generating 1x1 and 1xn Conv2d
I believe the flakiness in is the small chance of generating a
1x1 or 1xn convolution which allows for a different buffer size:
Therefore, careful selection of the distribution should alleviate
this issue. | @@ -37,7 +37,7 @@ namespace cmsisnn {
static std::random_device rd;
static std::mt19937 gen(rd());
-static std::uniform_int_distribution<> fake_parameters(1, 100);
+static std::uniform_int_distribution<> fake_parameters(2, 100);
class CMSISNNCalculatedBufferSize : public testing::TestWithParam<std::array<int32_t, 3>> {... |
[query/shuffler] somewhat tune branching factor to dataset & log phases
For example, a tiny table with one partition really ought not to use 64
branches. In the future, we should track the byte-size of partitions and
just use a local sort for one partition tables. | @@ -109,7 +109,13 @@ object LowerDistributedSort {
val oversamplingNum = 3
val seed = 7L
- val defaultBranchingFactor = ctx.getFlag("shuffle_max_branch_factor").toInt
+ val maxBranchingFactor = ctx.getFlag("shuffle_max_branch_factor").toInt
+ val defaultBranchingFactor = if (inputStage.numPartitions < maxBranchingFacto... |
Removed reference to Kivy VM
Removed reference to Kivy VM as it doesn't actually exist | @@ -22,8 +22,6 @@ recommend targeting Python 3 on Android, but you can target both
Python 3 and Python 2 regardless of which version you use with
buildozer on the desktop.
-We provide a ready-to-use [Virtual Machine for Virtualbox](https://kivy.org/#download).
-
Note that this tool has nothing to do with the eponymous ... |
Split exception assertion in pieces
Amazon Linux in particular has some funny encoding problems. By
splitting the assertion into multiple ones, we can provide roughly the
same assurance, but the test will actually pass. | @@ -1734,7 +1734,9 @@ class ConfigTestCase(TestCase):
with self.assertRaises(jsonschema.exceptions.ValidationError) as excinfo:
jsonschema.validate({'item': {'sides': '4', 'color': 'blue'}}, TestConf.serialize())
if JSONSCHEMA_VERSION >= _LooseVersion('3.0.0'):
- self.assertIn('\'4\' is not of type \'boolean\'', excinf... |
adalog/image: minor update for code coverage
TN: | @@ -22,6 +22,7 @@ procedure Main is
or Logic_Any (Empty_Array)
or Logic_All (Empty_Array))
and Equals (X, Y)
+ and Logic_Any ((1 => True_Rel))
and Logic_All ((1 => True_Rel));
begin
X.Dbg_Name := new String'("X");
|
Update sso-ldap.md
Updated what a 'forest' means. | @@ -70,7 +70,7 @@ Yes, using the [bulk import tool](https://docs.mattermost.com/deployment/bulk-lo
##### Can I connect to multiple AD servers?
-Not right now, need to connect the instances in a forest.
+Not right now. You'll need to connect the instances in a forest (a collection of LDAP domains).
Consider upvoting the... |
bump_release: simplify conditionals
Also remove a redundant early return. The last remaining part of the run
method is predicated on `not is_scratch_build()` already. | @@ -272,17 +272,14 @@ class BumpReleasePlugin(PreBuildPlugin):
user_provided_release=True)
return
- if release:
- if not self.append:
+ if release and not self.append:
self.log.debug("release set explicitly so not incrementing")
if not is_scratch_build(self.workflow):
self.check_build_existence_for_explicit_release(com... |
Remove nb_to_doc.py conversion
This step is not needed anymore, since now we are using nbsphinx to
build the docs from notebooks. | @@ -11,15 +11,9 @@ BUILDDIR = _build
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
-.PHONY: help Makefile examples
+.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile... |
Fixed test_docs_with_domain
This looks like a bad merge from when the DefaultConsumption migration was done. | @@ -22,7 +22,6 @@ from corehq.feature_previews import all_previews
DOC_PROVIDERS = {
DocTypeIDProvider(['Application']),
DocTypeIDProvider(['CommtrackConfig']),
- DocTypeIDProvider(['DefaultConsumption']),
ViewIDProvider('CommCareMultimedia', 'hqmedia/by_domain', DomainKeyGenerator()),
DocTypeIDProvider(['MobileAuthKey... |
Utility: fix hex dump on Python 2.
Also adds vertical bars around the ASCII dump. | import sys
import string
import io
+import six
from . import conversion
@@ -101,7 +102,7 @@ def dump_hex_data(data, start_address=0, width=8, output=None, print_ascii=True)
break
if print_ascii:
- s = ""
+ s = "|"
for n in range(start_i, start_i + line_width):
if n >= len(data):
break
@@ -115,7 +116,7 @@ def dump_hex_d... |
Fixes bug in Circuit.expand_instruments_and_separate_povm(...)
Typo in a variable name ('cir' variable was used instead of 'circuit')
when recursively calling a subroutine caused the
expand_instruments_and_separate_povm to break on circuits with multiple
instruments. Fixed now, but we should add such a unit test in th... | @@ -3723,7 +3723,7 @@ class Circuit(object):
else:
new_ootree = None
- add_expanded_circuit_outcomes(cir[0:k] + Circuit((expanded_layer_lbl,)) + cir[k + 1:],
+ add_expanded_circuit_outcomes(circuit[0:k] + Circuit((expanded_layer_lbl,)) + circuit[k + 1:],
running_outcomes + selected_instrmt_members, new_ootree, k + 1)
b... |
Typos in example00
1. Changed "ANIT-symmetric" into "ANTI-symmetric" in the comment
2. Replaced == with = | @@ -109,7 +109,7 @@ print(" * |10> not invariant under parity! It represents the physical symmetric
print('\n\nprint pblock=-1 basis:\n')
#
print(basis_singlet)
-print(" * |10> here represents the physical ANIT-symmetric superposition 1/sqrt(2)(|10> - |01>) [see bottom note when printing the symmetry-reduced basis]")
+... |
[commands] Refactor quoted_word free function to a StringView method.
Technically a breaking change, however this interface was not
documented or guaranteed to exist. | @@ -33,7 +33,6 @@ import discord
from .errors import *
from .cooldowns import Cooldown, BucketType, CooldownMapping
-from .view import quoted_word
from . import converter as converters
from ._types import _BaseCommand
from .cog import Cog
@@ -421,7 +420,7 @@ class Command(_BaseCommand):
if consume_rest_is_special:
argu... |
fontconfig: Update Conan conventions
Automatically created by bincrafters-conventions 0.24.3 | -#!/usr/bin/env python
-# -*- coding: utf-8 -*-
import os
from conans import ConanFile, CMake, tools, RunEnvironment
-
class FontconfigTestConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake", "cmake_find_package"
|
Make save_csv synchronous
Not synchronizing at the end of writing the file may lead to strange
effects for imbalanced tensors. | @@ -936,7 +936,7 @@ def save_csv(
truncate: bool = True,
):
"""
- Saves data to CSV files
+ Saves data to CSV files. Only 2D data, all split axes.
Parameters
----------
@@ -1045,6 +1045,7 @@ def save_csv(
offset = offset + row_width
csv_out.Close()
+ data.comm.handle.Barrier()
def save(
|
Chrysler: Correct ECU label for DASM
Chrysler: Correct ECU label for 0x753 | @@ -142,7 +142,7 @@ FW_VERSIONS = {
b'68535469AB',
b'68438454AC',
],
- (Ecu.fwdCamera, 0x753, None): [
+ (Ecu.fwdRadar, 0x753, None): [
b'68320950AL',
b'68320950AJ',
b'68454268AB',
|
Adding support for multiclass models or models returning multiple probabilities in fastai and the pyfunc flavor
*
Adding support for multiclass models or models returning multiple probabilities in `fastai` and the `pyfunc` flavor.
* Restore registered_model_name | @@ -317,7 +317,7 @@ class _FastaiModelWrapper:
def predict(self, dataframe):
dl = self.learner.dls.test_dl(dataframe)
preds, _ = self.learner.get_preds(dl=dl)
- return pd.DataFrame(map(np.array, preds.numpy()), columns=["predictions"])
+ return pd.Series(map(np.array, preds.numpy())).to_frame("predictions")
def _load_p... |
app engine compatibility: handle missing httplib._CS_* constants
fixes | @@ -11,10 +11,6 @@ from httplib import HTTPMessage
from httplib import (HTTP_PORT,
HTTPS_PORT,
- _CS_IDLE,
- _CS_REQ_STARTED,
- _CS_REQ_SENT,
-
CONTINUE,
SWITCHING_PROTOCOLS,
PROCESSING,
@@ -81,6 +77,9 @@ except ImportError:
# These may not be available on all versions of Python 2.6.x or 2.7.x
try:
from httplib import ... |
Update decorators.py
More robust in case you somehow end up with "None" in your sys.path list somewhere | @@ -20,7 +20,7 @@ import sys
# Hack to keep NLTK's "tokenize" module from colliding with the "tokenize" in
# the Python standard library.
old_sys_path = sys.path[:]
-sys.path = [p for p in sys.path if "nltk" not in p]
+sys.path = [p for p in sys.path if p and "nltk" not in p]
import inspect
sys.path = old_sys_path
|
skip running standardize on string type input
can you review the changes? And where should we put the is_string() function | # -*- coding: utf-8 -*-
+from warnings import warn
import numpy as np
import pandas as pd
from .mad import mad
-
+from ..misc import NeuroKitWarning
def standardize(data, robust=False, window=None, **kwargs):
"""Standardization of data.
@@ -59,15 +60,41 @@ def standardize(data, robust=False, window=None, **kwargs):
"""... |
ceph-volume: fix TypeError exception when setting osds-per-device > 1
osds-per-device needs to be passed to run_command as a string.
Otherwise, expandvars method will try to iterate over an integer. | @@ -298,7 +298,7 @@ def batch(module, container_image):
cmd.append('--dmcrypt')
if osds_per_device > 1:
- cmd.extend(['--osds-per-device', osds_per_device])
+ cmd.extend(['--osds-per-device', str(osds_per_device)])
if objectstore == 'filestore':
cmd.extend(['--journal-size', journal_size])
|
update to be compliant with latest qcodes versions
fix fixes errors in the tests of test_kernel_distortions.py and
test_lfilt_kernel_object.py | @@ -92,9 +92,9 @@ class ConfigParameter(ManualParameter):
if initial_value is not None:
self.validate(initial_value)
- self._save_val(initial_value)
+ self.cache.set(initial_value)
- def set(self, value):
+ def set_raw(self, value):
"""
Validate and saves value.
If the value is different from the latest value it sets t... |
Update version 0.9.3 -> 0.9.4
Fixes
Fixed QUBO sampling bug in `DWaveSampler` introduced in 0.9.2 | # =============================================================================
__all__ = ['__version__', '__author__', '__authoremail__', '__description__']
-__version__ = '0.9.3'
+__version__ = '0.9.4'
__author__ = 'D-Wave Systems Inc.'
__authoremail__ = 'acondello@dwavesys.com'
__description__ = 'All things D-Wave S... |
Update footer.scss
Footer logo sizing fix | @@ -192,10 +192,11 @@ footer {
height: 135px;
}
@media (min-width: 1600px) {
- background-size: 25rem !important;
+ background-size: 16.5vw !important;
width: unset;
height: 200px;
}
+
}
}
|
Add type hints for APISite.get_tokens()
It did cost me quite a while to find out why get_tokens("csrf") didn't
return anything. Answer: it needs to be get_tokens(["csrf"]). Hope the type
hints will help others. | @@ -19,6 +19,7 @@ from warnings import warn
import pywikibot
import pywikibot.family
+from pywikibot.backports import List
from pywikibot.comms.http import get_authentication
from pywikibot.data import api
from pywikibot.exceptions import (
@@ -1292,7 +1293,7 @@ class APISite(
return page._redirtarget
- def validate_to... |
[tensorboard] Fix function input parameter for add_hparams
Summary:
closes
both parameters in add_hparams are mandatory.
cc sanekmelnikov orionr
Pull Request resolved: | @@ -268,7 +268,7 @@ class SummaryWriter(object):
"""Returns the directory where event files will be written."""
return self.log_dir
- def add_hparams(self, hparam_dict=None, metric_dict=None):
+ def add_hparams(self, hparam_dict, metric_dict):
"""Add a set of hyperparameters to be compared in TensorBoard.
Args:
|
Add back tags field to node serializer.
Introduced by bad merge in | @@ -5,7 +5,7 @@ from api.base.exceptions import (Conflict, EndpointNotImplementedError,
RelationshipPostMakesNoChanges)
from api.base.serializers import (VersionedDateTimeField, HideIfRegistration, IDField,
JSONAPIRelationshipSerializer,
- JSONAPISerializer, LinksField,
+ JSONAPISerializer, LinksField, ValuesListField,... |
cli: correctly handle boto exception in set_asg_limits function
The exception "e" was raised but not defined. | @@ -345,7 +345,7 @@ def set_asg_limits(asg, min, max, desired):
asg.desired_capacity = desired
try:
return asg.update()
- except:
+ except boto.exception.BotoServerError as e:
raise e
def get_asg_ids(stack, config):
|
Avoid chdir in masspay
New comprehensive application wiring was tripping up on this. | @@ -21,12 +21,13 @@ from gratipay.billing.exchanges import get_ready_payout_routes_by_network
from httplib import IncompleteRead
-os.chdir('../logs/masspay')
+base_dir = '../logs/masspay'
ts = datetime.datetime.now().strftime('%Y-%m-%d')
-INPUT_CSV = '{}.input.csv'.format(ts)
-PAYPAL_CSV = '{}.output.paypal.csv'.format... |
Update generic.txt
Moving to ```zloader```: | @@ -10726,29 +10726,6 @@ littlegreenhands.org
alternasaludspa.com/1/
melonco.com/1/
-# Reference: https://twitter.com/FewAtoms/status/1317162909512892417
-# Reference: https://www.virustotal.com/gui/ip-address/8.208.76.109/relations
-# Reference: https://www.virustotal.com/gui/file/696bb0e2594ca7eda7482d77d12c56f904ff3... |
fix: Ensure that routing works when arg is False. Fixes
Thanks | @@ -88,7 +88,7 @@ async def handle_on(q: Q) -> bool:
else:
await func(q)
return True
- elif arg_value:
+ elif arg_value is not None:
func = _arg_handlers.get(arg)
if func:
await func(q)
|
Update docker-local-machine.rst
Included a note to reference the troubleshooting guide as per this issue | @@ -9,6 +9,8 @@ Note: This configuration should not be used in production, as it's using a known
If you're looking for a production installation with Docker, please see the `Mattermost Production Docker Deployment Guide <http://docs.mattermost.com/install/prod-docker.html>`_.
+If you have any problems installing, see t... |
ocs_ci/ocs/constants.py
- Added constant for 'couchbase-operator-namespace' | @@ -384,6 +384,8 @@ COUCHBASE_WORKER_EXAMPLE = os.path.join(
TEMPLATE_COUCHBASE_SERVER_DIR, "couchbase-worker-example.yaml"
)
+COUCHBASE_OPERATOR = 'couchbase-operator-namespace'
+
HELLO_WORLD_PRODUCER_YAML = os.path.join(
TEMPLATE_AMQ_DIR, "hello-world-producer.yaml"
)
|
Further tweak. As always, thanks to who did this all for
fontTools, I just copied. | @@ -10,6 +10,7 @@ env:
matrix:
fast_finish: true
exclude:
+ # Exclude the default Python 3.6 build
- python: 3.6
include:
- python: 3.6
@@ -20,11 +21,9 @@ matrix:
env: TOXENV=py37-cov
dist: xenial
sudo: true
- - python: pypy
- env: TOXENV=pypy-nocov
- - language: generic
- os: osx
- env: TOXENV=py36-cov
+ - python: pyp... |
Fix test loophole for loading samples during KFP startup
For more context see
We could remove this fix when ksonnet is deprecated. | @@ -47,12 +47,18 @@ cd ${DIR}/${KFAPP}
## Update pipeline component image
pushd ks_app
+# Delete pipeline component first before applying so we guarantee the pipeline component is new.
+ks delete default -c pipeline
+sleep 60s
+
ks param set pipeline apiImage ${GCR_IMAGE_BASE_DIR}/api-server:${GCR_IMAGE_TAG}
ks param s... |
use tempfile instead of writing to cwd
The Debian autopkgtest command runs by default in an environment where the
current working directory is not writeable. So, instead, use a proper
tempfile to test the %ls magic. | @@ -2,6 +2,7 @@ import os
import re
import subprocess
import pytest
+import tempfile
from metakernel import MetaKernel
from metakernel.tests.utils import (get_kernel, get_log_text, EvalKernel,
@@ -18,12 +19,10 @@ def test_magics():
for magic in ['file', 'html', 'javascript', 'latex', 'shell', 'time']:
assert magic in k... |
[ROI][gui] make draggable a property (read only).
Add condition, if not draggable then refuse to show the middle marker. | @@ -1369,11 +1369,15 @@ class _RoiMarkerHandler(object):
self._roi = weakref.ref(roi)
self._plot = weakref.ref(plot)
- self.draggable = False if roi.isICR() else True
+ self._draggable = False if roi.isICR() else True
self._color = 'black' if roi.isICR() else 'blue'
self._displayMidMarker = False
self._visible = True
+... |
Don't delete user created file
Since the user has explicitly created the file to state that they
are okay with Kubernetes cluster to be wiped out, we should not be
deleting this file. | @@ -191,7 +191,6 @@ clobber: clean
-rm -rf watt
-$(if $(filter-out -,$(ENVOY_COMMIT)),rm -rf envoy envoy-src)
-rm -rf docs/node_modules
- -rm -rf .skip_test_warning # reset the test warning too
-rm -rf venv && echo && echo "Deleted venv, run 'deactivate' command if your virtualenv is activated" || true
print-%:
|
Use a single lambda function for all invocations
Astoria Transformer Explosion | @@ -98,20 +98,20 @@ def _upload_step(s3, step_idx, step, context):
)
-def _get_function_name(context, step_idx):
- return '{run_id}_deployment_package_{step_idx}'.format(run_id=context.run_id, step_idx=step_idx)
+def _get_function_name(context):
+ return '{run_id}_function'.format(run_id=context.run_id)
-def _create_la... |
Update FormatTimestamp.js
Add nanosecond case | @@ -23,6 +23,8 @@ export default {
input = input / 1000 // microseconds -> milliseconds
} else if (tsLength === 10) {
input = input * 1000000 // seconds -> milliseconds
+ } else if (tsLength === 19) {
+ input = input / 1000000 // nanoseconds -> milliseconds
}
return input
},
|
pep8 fix
src/collectors/mesos/mesos.py:175:29: E124 closing bracket does not match visual indentation | @@ -171,8 +171,7 @@ class MesosCollector(diamond.collector.Collector):
def _sum_statistics(self, x, y):
stats = set(x) | set(y)
summed_stats = dict([(key, x.get(key, 0) + y.get(key, 0))
- for key in stats
- ])
+ for key in stats])
return summed_stats
def _collect_slave_statistics(self):
|
Update exercises/practice/darts/.docs/hints.md
nested --> concentric | - This _Stack Overflow_ Post: [Equation for Testing if a Point is Inside a Circle][point-circle-equation] outlines one method.
- This _DoubleRoot_ post [Position of a point relative to a circle][point-to-circle] outlines a different one.
- This _Math is Fun_ post covers a more general [Distance Between 2 Points][distan... |
icu: Update Conan conventions
Automatically created by bincrafters-conventions 0.18.2 | @@ -48,7 +48,7 @@ class ICUBase(ConanFile):
def build_requirements(self):
if self._the_os == "Windows":
- self.build_requires("msys2/20161025")
+ self.build_requires("msys2/20190524")
def source(self):
tools.get(**self.conan_data["sources"][self.version])
|
Fixed inline comment in debug.py
Was causing the Travis Ci build to fail | @@ -205,13 +205,16 @@ def run(generator, args, anchor_params):
while True:
key = cv2.waitKey(1)
cv2.imshow('Image', image)
- if key == ord('n'): # press n for next image
+ # press n for next image
+ if key == ord('n'):
i += 1
break
- if key == ord('b'): # press b for previous image
+ # press b for previous image
+ if k... |
tests: create as many drives for virtualbox as libvirt
This just ensures that virtualbox and libvirt are making
the same amount of devices for tests. | @@ -477,7 +477,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
'--add', 'scsi']
end
- (0..1).each do |d|
+ (0..2).each do |d|
vb.customize ['createhd',
'--filename', "disk-#{i}-#{d}",
'--size', '11000'] unless File.exist?("disk-#{i}-#{d}.vdi")
|
Update dev-setup.rst
Added link to CentOS 7 setup | @@ -10,6 +10,7 @@ If you don't plan on contributing code to the Mattermost open source project, th
.. toctree::
Setting up Ubuntu 16.04 <dev-setup-ubuntu-1604.rst>
+ Setting up CentOS 7 <dev-setup-centos-7.rst>
Setting up Mac OS X <dev-setup-osx.rst>
Setting up Archlinux <dev-setup-archlinux.rst>
Setting up Windows <de... |
Fixed breadcrumbs and page title
Using get_context_data combines page_context with menu_context, which has the nav info. | @@ -68,7 +68,7 @@ class TableauView(BaseDomainView):
def tableau_server_response(self):
from requests_toolbelt.adapters import host_header_ssl # avoid top-level import that breaks docs build
- context = self.page_context
+ context = self.get_context_data()
tabserver_url = 'https://{}/trusted/'.format(self.visualization... |
Add coverage for Blueprints.(app_)context_processor
Test both context_processor and app_context_processor functions.
Two context parameters are added into the context: one added to
the blueprint locally; another added to the app globally. The test
asserts the behaviors in both blueprint scope and the app scope.
The cov... | @@ -591,3 +591,45 @@ def test_add_template_test_with_name_and_template():
return flask.render_template('template_test.html', value=False)
rv = app.test_client().get('/')
assert b'Success!' in rv.data
+
+def test_context_processing():
+ app = flask.Flask(__name__)
+ answer_bp = flask.Blueprint('answer_bp', __name__)
+
+... |
Adding default gid if no gids given.
Fixes | @@ -270,6 +270,8 @@ class GoogleSheetsPreprocessor(BaseGooglePreprocessor):
gids = config.gids or []
if config.gid is not None:
gids.append(config.gid)
+ if not gids:
+ gids.append(0)
format_as = config.format
if config.collection and format_as not in GoogleSheetsPreprocessor.MAP_TYPES:
format_as = 'map'
|
Update setup_relative_calculation.py
flipping conditional statement for `remove_constraiint` | @@ -88,13 +88,13 @@ def getSetupOptions(filename):
if 'small_molecule_parameters_cache' not in setup_options:
setup_options['small_molecule_parameters_cache'] = None
+ if 'remove_constraints' not in setup_options:
+ setup_options['remove_constraints'] = False
+ _logger.info('No constraints will be removed')
# remove_co... |
service: dev: install: Try installing each package individually
This isn't as fast. But will tell users what packages failed to install
Fixes: | @@ -374,30 +374,27 @@ class Install(CMD):
# Check if plugins not in skip list have unmet dependencies
if not self.nocheck:
self.dep_check(CORE_PLUGIN_DEPS, self.skip)
- # Packages fail to install if we run pip processes in parallel
- packages = list(
- map(
- lambda package: Path(*main_package.parts, *package),
- [
- p... |
Re-structured property _parent_dir and fixed path validation
Propety _parent_dir (WB API V1 only) is tightly coupled with folder
metadata and contents for Bitbucket, which must be re-structured to
work with Bitbucket API 2.0 upgrade. validate_v1_path() is fixed as
a side product. | @@ -86,22 +86,30 @@ class BitbucketProvider(provider.BaseProvider):
for part in path_obj.parts:
part._id = (commit_sha, branch_name)
- self._parent_dir = await self._fetch_dir_listing(path_obj.parent)
+ # Cache parent directory listing (a WB API V1 feature)
+ # Note: Property ``_parent_dir`` has been re-structured for ... |
Fix mistaken up string formatting preventing immediate mapping
See | @@ -321,7 +321,7 @@ def open(name, device, keyfile=None):
ret = {}
keyfile_option = ('--key-file %s' % keyfile) if keyfile else ''
- devices = __salt__['cmd.run_stdout']('cryptsetup open {0} {0} {0}'\
+ devices = __salt__['cmd.run_stdout']('cryptsetup open {0} {1} {2}'\
.format(keyfile_option, device, name))
return ret... |
Fix handling of PropertyError DSL expression
TN: | @@ -1399,15 +1399,11 @@ class PropertyError(AbstractExpression):
super(PropertyError, self).__init__()
def construct(self):
- check_source_language(
- isinstance(self.expr_type, CompiledType),
- 'Invalid input type: {}'.format(repr(self.expr_type))
- )
check_source_language(
self.message is None or isinstance(self.mess... |
change default temp to 298 K
Change the default temp to 298K in perses/app/relative_point_mutation_setup.py | @@ -17,7 +17,7 @@ from openff.toolkit.topology import Molecule
from openmmforcefields.generators import SystemGenerator
ENERGY_THRESHOLD = 1e-2
-temperature = 300 * unit.kelvin
+temperature = 298 * unit.kelvin
kT = kB * temperature
beta = 1.0/kT
ring_amino_acids = ['TYR', 'PHE', 'TRP', 'PRO', 'HIS']
|
docs(README): Added links for cookiecutter projects
Added section to README for community donated cookiecutter templates.
refs | @@ -215,7 +215,9 @@ Tutorials
* [video](https://www.youtube.com/watch?v=pebeWrTqIIw)
* [slides](https://github.com/python-cmd2/talks/blob/master/PyOhio_2019/cmd2-PyOhio_2019.pdf)
* [example code](https://github.com/python-cmd2/talks/tree/master/PyOhio_2019/examples)
-
+* [Cookiecutter](https://github.com/cookiecutter/c... |
Adds backward compability to GateSet._calc() for pickled gatesets.
Now, if a GateSet doesn't have the _calcClass member, it initializes
_calcClass to GateMatrixCalc as a default. | @@ -967,6 +967,8 @@ class GateSet(object):
def _calc(self):
+ if not hasattr(self,"_calcClass"): #for backward compatibility
+ self._calcClass = _GateMatrixCalc
return self._calcClass(self._dim, self.gates, self.preps,
self.effects, self.povm_identity,
self.spamdefs, self._remainderlabel,
|
Update sparsifying_yolact_using_recipes.md
Update numbers for 0.12 | @@ -172,9 +172,11 @@ The table below compares these tradeoffs and shows how to run them on the COCO d
| Sparsification Type | Description | COCO mAP@all | Size on Disk | DeepSparse Performance** | Commands |
|:-------------------:|:---------------------------------------------------------------------------------:|:----... |
cache: py2 compatibility, kwargs after named args
Fix compaitbily with the py2 quayio branch. move the kwargs at the
end of the call | @@ -10,20 +10,20 @@ class ReadEndpointSupportedRedis(object):
raise Exception("Missing primary host for Redis model cache configuration")
self.write_client = StrictRedis(
- **primary,
socket_connect_timeout=1,
socket_timeout=2,
health_check_interval=2,
+ **primary,
)
if not replica:
self.read_client = self.write_client... |
[resotocore][fix] Define configfile parameter explicitly
Otherwise the system command might fail in certain scenarios.
This happens under tox, but not under pytest directly. | @@ -2198,6 +2198,7 @@ class SystemCommand(CLICommand, PreserveOutputFormat):
"--server.database", args.graphdb_database,
"--server.username", args.graphdb_username,
"--server.password", args.graphdb_password,
+ "--configuration", "none",
stderr=asyncio.subprocess.PIPE,
)
# fmt: on
@@ -2251,6 +2252,7 @@ class SystemComm... |
More aggressive shutdown detection
Prevents hanging language server processes after quit
Fixes | @@ -311,6 +311,7 @@ class WindowManager(object):
self._restarting = False
self._project_path = get_project_path(self._window)
self._on_closed = on_closed
+ self._is_closing = False
def get_session(self, config_name: str) -> 'Optional[Session]':
return self._sessions.get(config_name)
@@ -446,25 +447,33 @@ class WindowMa... |
Added parameter showname to hide network interface
Becomes a needless info for personal laptop usages where only one interface is used. | Parameters:
* traffic.exclude: Comma-separated list of interface prefixes to exclude (defaults to "lo,virbr,docker,vboxnet,veth")
* traffic.states: Comma-separated list of states to show (prefix with "^" to invert - i.e. ^down -> show all devices that are not in state down)
+ * traffic.showname: set as False to hide ne... |
fixed OneCall integration test
renamed `OneCall.one_call_historical` method to `OneCall.one_call_history` to complain with older PyOWM naming convention
added method `OneCall.to_geopoint` | @@ -527,7 +527,7 @@ class WeatherManager:
_, json_data = self.http_client.get_json(ONE_CALL_URI, params=params)
return one_call.OneCall.from_dict(json_data)
- def one_call_historical(self, lat: Union[int, float], lon: Union[int, float], dt: int = None):
+ def one_call_history(self, lat: Union[int, float], lon: Union[in... |
[microNPU] Remove xfail from tests relating to
Removes tests previously marked as xfail since the issue has now
been resolved. | @@ -347,7 +347,6 @@ def test_ethosu_binary_elementwise(
([1, 4, 4], [4, 1]),
],
)
-@pytest.mark.xfail(reason="See https://github.com/apache/tvm/issues/12511")
def test_binary_add_with_non_4d_shapes(
request,
accel_type,
@@ -606,7 +605,6 @@ def test_ethosu_right_shift_binary_elemwise(
@pytest.mark.parametrize("accel_typ... |
Change "@asyncio.coroutine" to "async def"
Fix - DeprecationWarning: "@coroutine" decorator is deprecated since Python 3.8, use "async def" instead | @@ -13,8 +13,7 @@ from asyncio.locks import Lock as _Lock
class Lock(_Lock):
if sys.version_info < (3, 7, 0):
- @asyncio.coroutine
- def acquire(self):
+ async def acquire(self):
"""Acquire a lock.
This method blocks until the lock is unlocked, then sets it to
locked and returns True.
@@ -27,7 +26,7 @@ class Lock(_Lock... |
tests: source: file: Correct gzip test
* Tests were checking for builtins.open rather than gzip.open.
This patch corrects that. | @@ -67,9 +67,9 @@ class TestFileSource(AsyncTestCase):
source = FakeFileSource('testfile.gz')
m_open = mock_open()
with patch('os.path.exists', return_value=True), \
- patch('builtins.open', m_open):
+ patch('gzip.open', m_open):
await source.open()
- m_open.assert_called_once_with('testfile.gz', 'rb')
+ m_open.assert_... |
client: do not retry upload long time
This is to make the task like
fail fast. | @@ -734,12 +734,14 @@ def _upload_with_go(storage, outdir, isolated_client):
# This mitigates https://crbug.com/1094369, where there is a data race on
# the uploaded files.
backoff = 10
+ started = time.time()
while True:
try:
_run_go_isolated_and_wait(cmd)
break
except Exception:
- if backoff > 100:
+ if time.time() >... |
DPDK: pick last hotplug probe match
probe can occur multiple times, last one will be the successful probe.
Swap to picking the last probe to split results. | @@ -832,10 +832,10 @@ class DpdkTestpmd(Tool):
]
after_rescind = self._last_run_output[device_removal_index:]
# Identify the device add event
- hotplug_match = self._search_hotplug_regex.search(after_rescind)
+ hotplug_match = self._search_hotplug_regex.finditer(after_rescind)
if not hotplug_match:
- hotplug_alt_match ... |
llvm, mechanisms/optimizationcontrolmechanism: Add callbacks to generate evaluate function
Add custom output state invocations to implement value parsing. | @@ -972,6 +972,36 @@ class OptimizationControlMechanism(ControlMechanism):
data = self.agent_rep._get_data_initializer(execution_id)
return (state, data)
+ def _get_evaluate_output_struct_type(self, ctx):
+ # Returns a scalar that is the predicted net_outcome
+ return ctx.float_ty
+
+ def _get_evaluate_alloc_struct_typ... |
added outputName to thumbnail representation
In case of integrating thumbnail, 'outputName' value will be used in templeate as {output} placeholder.
Without it integrated thumbnail would overwrite integrated review high res file. | @@ -162,6 +162,7 @@ class ExtractReview(publish.Extractor):
instance.data["representations"].append({
"name": "thumbnail",
"ext": "jpg",
+ "outputName": "thumb",
"files": os.path.basename(thumbnail_path),
"stagingDir": staging_dir,
"tags": ["thumbnail", "delete"]
|
Update prometheus_tds.txt
Minor update | @@ -17,6 +17,8 @@ http://109.248.203.207
http://109.248.203.23
http://109.248.203.33
http://109.248.203.50
+http://139.162.190.64
+http://139.162.190.91
http://155.94.193.10
http://172.104.151.55
http://185.158.114.121
@@ -40,11 +42,14 @@ http://188.130.139.228
http://188.130.139.5
http://188.130.139.88
http://195.123.... |
instruments/acme_cape: Fix missing parameter to `get_instruments`
The signature of `get_instruments` was missing the `keep_raw` parameter
so fix this and use it as part of the subsequent common invocation. | @@ -310,7 +310,7 @@ class AcmeCapeBackend(EnergyInstrumentBackend):
# pylint: disable=arguments-differ
def get_instruments(self, target, metadir,
- iio_capture, host, iio_devices, buffer_size):
+ iio_capture, host, iio_devices, buffer_size, keep_raw):
#
# Devlib's ACME instrument uses iio-capture under the hood, which ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.