message
stringlengths
13
484
diff
stringlengths
38
4.63k
[loggingTools_test] give more time to TimerTest::test_split timers can be capricious...
@@ -59,7 +59,7 @@ class TimerTest(object): time.sleep(0.01) fist_lap = timer.split() assert timer.elapsed == fist_lap - time.sleep(0.02) + time.sleep(0.1) second_lap = timer.split() assert second_lap > fist_lap assert timer.elapsed == second_lap
Fixes predict for images Should solve and
@@ -694,7 +694,7 @@ def preprocess_for_prediction( dataset, model_definition['input_features'], [] if only_predictions else model_definition['output_features'], - data_hdf5, + data_hdf5_fp, ) return dataset, train_set_metadata
Allow the usage of scope markers without an actual Scope object TN:
<%def name="finalize_scope(scope)"> ${gdb_helper('end')} - % if scope.has_refcounted_vars(): + % if scope and scope.has_refcounted_vars(): ${scope.finalizer_name}; % endif </%def>
Updated blue-iris-login.yaml Add blue iris version extractors
@@ -2,7 +2,7 @@ id: blue-iris-login info: name: Blue Iris Login - author: dhiyaneshDK + author: dhiyaneshDK,idealphase severity: info description: A Blue Iris login panel was detected. reference: @@ -28,4 +28,8 @@ requests: status: - 200 -# Enhanced by mp on 2022/03/23 + extractors: + - type: regex + group: 1 + regex: ...
Update docker_build.yaml Remove layer caching
@@ -29,14 +29,6 @@ jobs: name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - name: Login to DockerHub uses: docker/login-...
replace finalize with item-local storage This patch replaces weakref.finalize, which resulted in a poorly understood memory leak, by a similar construction that adds the weak references to the cache item rather than a global registry. The main difference is that when a cache item is removed all callbacks are removed al...
@@ -1303,12 +1303,12 @@ def lru_cache(func=None, maxsize=128): key.append((type(arg), arg)) key = tuple(key) try: - v = cache[key] + v, refs_ = cache[key] except KeyError: - v = cache[key] = func(*args) + v = func(*args) assert _isimmutable(v) - for base in bases: - weakref.finalize(base, cache.pop, key, None) + popkey...
Add naming conventions. Specify that upper camel case should be used to name React and Python components.
@@ -39,6 +39,12 @@ before being compiled into Python components that are in the `dash_bio/component_factory/` and must be imported in `dash_bio/__init__.py`. +###### Naming components +Components, regardless of whether they are written using React or +Python, need to be named in upper camel case. This is incredibly +im...
Added missing return Added missing return in _broadcast of JaggedArrayNumba
@@ -269,6 +269,7 @@ class JaggedArrayNumba(NumbaMethods, awkward.array.jagged.JaggedArray): for i in range(len(self.starts)): index[self.starts[i]:self.stops[i]] = i return _JaggedArray_new(self, self.starts, self.stops, data[index], self.iscompact) + return impl elif isinstance(data, numba.types.Array): def impl(self,...
Fix doc build The 6.0 release of PyYAML (a bandit dependency) introduced a change that requires the `Loader=` argument when using `yaml.load()`. Because we don't need any of the additional funcationality available in `yaml.load()`, this function was switched to `yaml.safe_load()` instead.
@@ -42,7 +42,7 @@ comments = { 'default': {'line': '//'}} # Build globals -conf = yaml.load(open(template_abs + '/template_config.yaml', 'r')) +conf = yaml.safe_load(open(template_abs + '/template_config.yaml', 'r')) env = Environment( loader=FileSystemLoader(template_abs), trim_blocks=True,
Update CODING.md Fixed link to list of available parsers
@@ -59,7 +59,7 @@ entirely, consider extending the existing functionality to accomodate your requirements. Think broader than just your parser, let's make it useful for everybody! -[check existing parsers]: https://pubhub.devnetcloud.com/media/pyats-packages/docs/genie/genie_libs/#/parsers +[check existing parsers]: ht...
update CHANGES.md on storages Test Plan: none Reviewers: schrockn, leoeer, max
- Deprecated the `Materialization` event type in favor of the new `AssetMaterialization` event type, which requires the `asset_key` parameter. Solids yielding `Materialization` events will continue to work as before, though the `Materialization` event will be removed in a future release. -- We have added an `intermedia...
Use byte tensor for mnist labels. Summary: The C++ mnist example does not work because the labels are not correctly loaded. Currently it achieves 100 % accuracy. Specifying byte dtype fixes the issue. Pull Request resolved:
@@ -90,7 +90,7 @@ Tensor read_targets(const std::string& root, bool train) { expect_int32(targets, kTargetMagicNumber); expect_int32(targets, count); - auto tensor = torch::empty(count); + auto tensor = torch::empty(count, torch::kByte); targets.read(reinterpret_cast<char*>(tensor.data_ptr()), count); return tensor.to(...
[bugfix] hash for LogEntry should be unique Per : "it is advised to somehow mix together (e.g. using exclusive or) the hash values for the components of the object that also play a part in comparison of objects."
@@ -56,8 +56,8 @@ class LogEntry(object): self.data._type = self.type() def __hash__(self): - """Return the id as the hash.""" - return self.logid() + """Combine site and logid as the hash.""" + return self.logid() ^ hash(self.site) @property def _params(self):
Implement import_model and export_model in fhmm_exact.py Just like the existing methods in combinatorial_optimisation.py, these implementations require using the HDFDataStore.
@@ -3,7 +3,7 @@ import itertools from copy import deepcopy from collections import OrderedDict from warnings import warn - +import pickle import nilmtk import pandas as pd import numpy as np @@ -11,9 +11,10 @@ from hmmlearn import hmm from nilmtk.feature_detectors import cluster from nilmtk.disaggregate import Disaggre...
build_emoji: Remove now unused `bw_font()` function. This function was used get a black and white glyph for an emoji if there was no corresponding image file present in the `NotoColorEmoji.ttf` but due to the new emoji farm setup code, we no longer need this.
@@ -94,22 +94,6 @@ class MissingGlyphError(Exception): pass -def bw_font(name, code_point): - # type: (str, str) -> None - char = unichr(int(code_point, 16)) - - # AndroidEmoji.ttf is from - # https://android.googlesource.com/platform/frameworks/base.git/+/master/data/fonts/AndroidEmoji.ttf - # commit 07912f876c8639f81...
Include deprecated AMIs when retrieve pcluster AMI in integration test In integration test of test_create_wrong_pcluster_version and test_build_image_wrong_pcluster_version, the pcluster AMI used in the test is 2.8.1, which is deprecated, need to have `--include-deprecated` to have it shows up in the describe-image res...
@@ -125,6 +125,7 @@ def retrieve_pcluster_ami_without_standard_naming(region, os, version, architect {"Name": "architecture", "Values": [architecture]}, ], Owners=["self", "amazon"], + IncludeDeprecated=True, ).get("Images", []) ami_id = client.copy_image( Description="This AMI is a copy from an official AMI but uses a...
Fix mnexec -v We were discarding the version number sent to stderr fixes
@@ -47,7 +47,8 @@ slowtest: $(MININET) mininet/examples/test/runner.py -v mnexec: mnexec.c $(MN) mininet/net.py - $(CC) $(CFLAGS) $(LDFLAGS) -DVERSION=\"`PYTHONPATH=. $(PYMN) --version`\" $< -o $@ + $(CC) $(CFLAGS) $(LDFLAGS) \ + -DVERSION=\"`PYTHONPATH=. $(PYMN) --version 2>&1`\" $< -o $@ install-mnexec: $(MNEXEC) ins...
Fix PortMidi backend Hopefully for good this time using the library recommended method of importing everything. This issue has already crept up several times: Probably because the `byref` import was marked unused by IDEs and linters. Fixes Closes
@@ -5,9 +5,7 @@ Copied straight from Grant Yoshida's portmidizero, with slight modifications. """ import sys -from ctypes import (CDLL, CFUNCTYPE, POINTER, Structure, c_char_p, - c_int, c_long, c_uint, c_void_p, cast, - create_string_buffer) +from ctypes import * import ctypes.util dll_name = ''
llvm, component: Do not include 'control_allocation_search_space' param in compiled params This duplicates the information in 'search_space' param.
@@ -1389,7 +1389,7 @@ class Component(JSONDumpable, metaclass=ComponentsMeta): # autodiff specific types "pytorch_representation", "optimizer", # duplicate - "allocation_samples"} + "allocation_samples", "control_allocation_search_space"} # Mechanism's need few extra entires: # * matrix -- is never used directly, and i...
Use register_uri() for multi-URL registration in GitHub tests It doesn't make sense to use register_json_uri() for multi-URL registration since the extra help this method provides does not take any effects. Simply use `register_uri()` for this case.
@@ -758,7 +758,7 @@ class TestCRUD: create_tree_url = provider.build_repo_url('git', 'trees') crud_fixtures_1 = crud_fixtures['deleted_subfolder_tree_data_1'] crud_fixtures_2 = crud_fixtures['deleted_subfolder_tree_data_2'] - aiohttpretty.register_json_uri( + aiohttpretty.register_uri( 'POST', create_tree_url, **{
Add nltk to "full" option Update numpy version to >= 1.6.1 (1.6.0 has security vulnerability)
@@ -48,21 +48,22 @@ requirements = [ extras = { "attacut": ["attacut>=1.0.6"], - "benchmarks": ["numpy>=1.16", "pandas>=0.24"], + "benchmarks": ["numpy>=1.16.1", "pandas>=0.24"], "icu": ["pyicu>=2.3"], "ipa": ["epitran>=1.1"], - "ml": ["numpy>=1.16", "torch>=1.0.0"], + "ml": ["numpy>=1.16.1", "torch>=1.0.0"], "ner": ["...
Update greedy_word_swap.py Quick fix for the error
@@ -13,7 +13,6 @@ class GreedyWordSwap(Attack): """ def __init__(self, model, transformation, constraints=[], max_depth=32): super().__init__(model, transformation, constraints=constraints) - self.transformation = transformations[0] self.max_depth = max_depth def attack_one(self, original_label, tokenized_text):
change spell error change spell error of 'resource' word
@@ -35,7 +35,7 @@ Resources Resources are named after the server-side resource, which is set in the ``base_path`` attribute of the resource class. This guide creates a -resouce class for the ``/fake`` server resource, so the resource module +resource class for the ``/fake`` server resource, so the resource module is ca...
Update HowToUsePyparsing.rst Minor updates and added link to online module docs
@@ -5,8 +5,8 @@ Using the pyparsing module :author: Paul McGuire :address: ptmcg@users.sourceforge.net -:revision: 2.0.1 -:date: July, 2013 +:revision: 2.0.1a +:date: July, 2013 (minor update August, 2018) :copyright: Copyright |copy| 2003-2013 Paul McGuire. @@ -23,6 +23,9 @@ Using the pyparsing module .. contents:: :d...
Travis: simplify test for invalid escapes Argument '-q' kills output, unless there are error (not in Python2, unfortunately). We run compile test on all tested interpreters - it's fast. Second part of the inline comment was removed, as it's not completely right.
@@ -13,11 +13,8 @@ install: - pip install pep8 - pip install -e . script: - # Guard against invalid escapes in strings, like '\s'. If this fails, a - # string or docstring somewhere needs to be a raw string. - - if [ "$TRAVIS_PYTHON_VERSION" == "3.6" ]; then - python -We:invalid -m compileall -f mpmath; - fi + # Guard ...
Remove hostname from status table The status table talks about AppFuture states. Hostnames are related to tries.
@@ -117,7 +117,6 @@ class Database: timestamp = Column(DateTime, nullable=False) run_id = Column(Text, sa.ForeignKey('workflow.run_id'), nullable=False) try_id = Column('try_id', Integer, nullable=False) - hostname = Column('hostname', Text, nullable=True) __table_args__ = ( PrimaryKeyConstraint('task_id', 'run_id', 't...
Fixed typos Something is wrong with my keyboard.
@@ -18,7 +18,7 @@ Conceptual Steps Practical Steps ############### -Even a simple model takes several pull requests to migrate, to avoid data loss while deploys and migrationos are in progress. Best practice is a minimum of three pull requests, described below, each deployed to all large environments before merging the...
Use package manager configuration in mock config ...instead of assuming either DNF or YUM.
@@ -10,9 +10,7 @@ config_opts['use_bootstrap'] = False config_opts['chroot_setup_cmd'] += ' python3-rpm-macros' # Install weak dependencies to get group members -config_opts['yum_builddep_opts'] = config_opts.get('yum_builddep_opts', []) + ['--setopt=install_weak_deps=True'] -config_opts['dnf_builddep_opts'] = config_o...
Fix managed policies We need to compute the managed policies strings in Python so that we can compare them with the additional policies provided by users to avoid redundancy.
@@ -59,7 +59,7 @@ from pcluster.templates.cdk_builder_utils import ( ) from pcluster.templates.cw_dashboard_builder import CWDashboardConstruct from pcluster.templates.slurm_builder import SlurmConstruct -from pcluster.utils import join_shell_args +from pcluster.utils import join_shell_args, policy_name_to_arn StorageI...
Added get_package_manager from dvc.utils.pkg. Solves issue
@@ -10,7 +10,7 @@ from packaging import version from dvc import __version__ from dvc.lock import Lock, LockError from dvc.utils import boxify, env2bool - +from dvc.utils.pkg import get_package_manager logger = logging.getLogger(__name__) @@ -140,6 +140,6 @@ class Updater(object): # pragma: no cover ), } - package_manag...
Update README.md Description update due to
@@ -509,7 +509,7 @@ By using filter `ipinfo` all potentially infected computers in our organization' #### Suspicious direct file downloads -Maltrail tracks all suspicious direct file download attempts (e.g. `.apk`, `.chm`, `.dll`, `.egg`, `.exe`, `.hta`, `.hwp`, `.ps1`, `.scr` and `.sct` file extensions). This can trig...
Tests: Update Vault version conditional Updates vault version conditional to 1.11.1 as 1.11.0 does not have the same issue.
@@ -1064,7 +1064,7 @@ class TestIdentity(HvacIntegrationTestCase, TestCase): member_entity_ids if member_entity_ids is not None else [] - if group_type == "external" and utils.vault_version_lt("1.11") + if group_type == "external" and utils.vault_version_lt("1.11.1") else None ) self.assertEqual(
settings_streams: Use e.key instead of deprecated e.which. Tested by making sure Enter works as expected in the default stream input at Manage organization > Default stream.
@@ -110,7 +110,7 @@ export function build_page() { update_default_streams_table(); $(".create_default_stream").on("keypress", (e) => { - if (e.which === 13) { + if (e.key === "Enter") { e.preventDefault(); e.stopPropagation(); const default_stream_input = $(".create_default_stream");
Temporarily disable test_numerical_consistency_per_tensor Summary: Pull Request resolved: test_numerical_consistency_per_tensor in test_fake_quant is failing on Windows. ghstack-source-id: Test Plan: CircleCI tests
@@ -113,6 +113,8 @@ class TestFakeQuantizePerTensor(TestCase): @given(device=st.sampled_from(['cpu', 'cuda'] if torch.cuda.is_available() else ['cpu']), X=hu.tensor(shapes=hu.array_shapes(1, 5,), qparams=hu.qparams(dtypes=torch.quint8))) + # https://github.com/pytorch/pytorch/issues/30604 + @unittest.skip("temporarily ...
go: prepend $GOROOT/bin to PATH for tests Prepend $GOROOT/bin to PATH when running tests just as `go test` does. Fixes [ci skip-build-wheels]
@@ -33,6 +33,7 @@ from pants.backend.go.util_rules.first_party_pkg import ( FirstPartyPkgAnalysisRequest, FirstPartyPkgDigestRequest, ) +from pants.backend.go.util_rules.goroot import GoRoot from pants.backend.go.util_rules.import_analysis import ImportConfig, ImportConfigRequest from pants.backend.go.util_rules.link i...
Fix more broken merge stuff I hate moving around big chunks of code like this; I wish git was more intelligent moving things between files.
@@ -72,4 +72,4 @@ class TrackingSettings(object): "subscription_tracking"] = self.subscription_tracking.get() if self.ganalytics is not None: tracking_settings["ganalytics"] = self.ganalytics.get() - return + return tracking_settings
Update statevector.py Added a missing `
@@ -45,7 +45,7 @@ class Statevector(QuantumState, TolerancesMixin): data (np.array or list or Statevector or Operator or QuantumCircuit or qiskit.circuit.Instruction): Data from which the statevector can be constructed. This can be either a complex - vector, another statevector, a ``Operator` with only one column or a ...
Add print description, use function arguments changed name and ID to being name and region Add a string to the print calls denoting what's being printed out
@@ -2,17 +2,16 @@ import cassiopeia as cass from cassiopeia.core import Summoner -def print_summoner(name: str, id: int): - me = Summoner(name="Kalturi", id=21359666) +def print_newest_match(name: str, region: str): + summoner = Summoner(name=name, region=region) - #matches = cass.get_matches(me) - matches = me.matches...
Fix `unit.utils.test_verify` for Windows Use Windows api to get and set the maxstdio Change messages to work with Windows
@@ -10,10 +10,15 @@ import os import sys import stat import shutil -import resource import tempfile import socket +# Import third party libs +try: + import win32file +except ImportError: + import resource + # Import Salt Testing libs from tests.support.unit import skipIf, TestCase from tests.support.paths import TMP @@...
configure-system: Install `kexec-tools` Installing `kexec-tools` early in the deployment process enables workflows which need to reboot quickly or load alternative kernels/initrds.
- "linux-modules-extra-{{ kernel_version }}-{{ kernel_variant }}" # HWE kernel-specific tools are pulled in by {{ version }}-generic metapackages. - "linux-tools-{{ kernel_version }}-{{ 'generic' if kernel_variant != 'lowlatency' else 'lowlatency' }}" + +# Install kexec-tools +- name: Install kexec-tools + apt: + name:...
Update plotman.yaml Add in the pool_contract_address: example configuration.
@@ -153,6 +153,7 @@ plotting: # Your public keys: farmer and pool - Required for madMAx, optional for chia with mnemonic.txt # farmer_pk: ... # pool_pk: ... + # pool_contract_address: ... # If you enable Chia, plot in *parallel* with higher tmpdir_max_jobs and global_max_jobs type: chia
Fix stats tool for querying balance fixes
@@ -93,11 +93,14 @@ def format_qkc(qkc: Decimal): def query_address(client, args): address_hex = args.address.lower().lstrip("0").lstrip("x") + token_str = args.token.upper() assert len(address_hex) == 48 print("Querying balances for 0x{}".format(address_hex)) format = "{time:20} {total:>18} {shards}" - print(format.fo...
MNT: `pip install graphviz` in `Vagrantfile` following changes of dependencies.
@@ -20,7 +20,7 @@ install_dependencies = <<-SHELL sudo apt-get -y update sudo apt-get -y install python-pip python-pytest sudo apt-get -y install python-numpy python-networkx python-scipy python-ply python-matplotlib -sudo apt-get -y install python-pydot +sudo pip install graphviz sudo apt-get -y install libglpk-dev su...
client2: rendering: _clean_node_cache: merge loops Before the widget HTML API got removed `_clean_node_cache` had to iterate over the node cache and the widget cache. Since this API got removed, one loop over the node cache is enough. This patch merges both loops into one and does some refactoring.
@@ -114,44 +114,43 @@ export class LonaRenderingEngine { }; _clean_node_cache() { + Object.keys(this._nodes).forEach(node_id => { + // nodes - Object.keys(this._nodes).forEach(key => { - var node = this._get_node(key); + var node = this._get_node(node_id); - if(!this._root.contains(node)) { - this._remove_node(key); - ...
Remove unnecessary ports exposed in rest container Port 4004 was exposed in rest containers which is not required
@@ -166,7 +166,6 @@ services: image: hyperledger/sawtooth-rest-api:1.0 container_name: sawtooth-rest-api-default-0 expose: - - 4004 - 8008 command: | bash -c " @@ -180,7 +179,6 @@ services: image: hyperledger/sawtooth-rest-api:1.0 container_name: sawtooth-rest-api-default-1 expose: - - 4004 - 8008 command: | bash -c " ...
Docstring fix Summary: Correcting docstring for `add_image_with_boxes` method. Fixed spelling mistake. Pull Request resolved:
@@ -579,7 +579,7 @@ class SummaryWriter(object): dataformats (string): Image data format specification of the form NCHW, NHWC, CHW, HWC, HW, WH, etc. Shape: - img_tensor: Default is :math:`(3, H, W)`. It can be specified with ``dataformat`` agrument. + img_tensor: Default is :math:`(3, H, W)`. It can be specified with ...
SplinePlugTest : Fix bad assertions We were using `assertTrue()` where we should have been `assertEqual()`, but we were also asserting that values are equal when `createCounterpart()` is only expected to maintain the default value, not the current one.
@@ -432,8 +432,8 @@ class SplinePlugTest( GafferTest.TestCase ) : self.assertEqual( p2.getName(), "p2" ) self.assertTrue( isinstance( p2, Gaffer.SplineffPlug ) ) self.assertEqual( p2.numPoints(), p1.numPoints() ) - self.assertTrue( p2.getValue(), p1.getValue() ) - self.assertTrue( p2.defaultValue(), p1.defaultValue() )...
Update toolkit.rst Minor typo fix.
@@ -26,12 +26,13 @@ Below is a list of planned features of the developer toolkit with estimated time - Webhooks and slash commands to allow easy, low-effort extension and integration. - Mattermost HTTP REST APIv4 allowing for much more powerful server interaction. - - Mattermost Webapp moved over to Redux infrustructur...
Tiny grammar changes for consistency Isolated samples are "on" and "in" the tree. Dead leaves are not "on" the tree.
@@ -1051,7 +1051,7 @@ often have large regions that have not been inherited by any of the {ref}`sample nodes<sec_data_model_definitions_sample>` in the tree sequence, and therefore regions about which we know nothing. This is true, for example, of node 7 in the middle tree of our previous example, which is why it is -n...
metadata-writer: Fix multi-user mode * metadata-writer: Fix multi-user mode The metadata-writer should use a different function to watch Pods, if the namespace is empty, i.e, if it wants to watch Pods in all namespaces. * fixup! metadata-writer: Fix multi-user mode
@@ -137,13 +137,22 @@ pods_with_written_metadata = set() while True: print("Start watching Kubernetes Pods created by Argo") - for event in k8s_watch.stream( + if namespace_to_watch: + pod_stream = k8s_watch.stream( k8s_api.list_namespaced_pod, namespace=namespace_to_watch, label_selector=ARGO_WORKFLOW_LABEL_KEY, timeo...
billing: Fix the BillingError description check in test. The self.assertEqual statement won't get executed because BillingError would be raised and the execution would exit with block.
@@ -273,10 +273,9 @@ class StripeTest(ZulipTestCase): self.assertIsNone(extract_current_subscription(mock_customer_with_canceled_subscription())) def test_subscribe_customer_to_second_plan(self) -> None: - with self.assertRaises(BillingError) as context: + with self.assertRaisesRegex(BillingError, 'subscribing with exi...
Add efficientnet table Fix epoch
@@ -190,6 +190,21 @@ Training results are summarized as follows. | MobileNet-V3-Large | 4 x V100 | Yes | Cos90 | 256 | 7.63 | 26.09 | Download: [Cos90](https://nnabla.org/pretrained-models/nnabla-examples/ilsvrc2012/mbnv3_large_nhwc_cos90.h5) | | | MobileNet-V3-Samll | 4 x V100 | Yes | Cos90 | 256 | 5.49 | 33.49 | Down...
Add Feedbacks Activate timeout param of RestClient.call_async
@@ -165,11 +165,10 @@ class RestClient: timeout=timeout) as response: return await response.json() - async def _call_async_jsonrpc(self, target: str, method: RestMethod, params: Optional[NamedTuple], timeout): - # 'aioHttpClient' does not support 'timeout' + async def _call_async_jsonrpc(self, target: str, method: Rest...
[us.1 prod] fixed typo for Custer Instance to Cluster Instance Update Metadata so the word Custer appropriately states Cluster instance
@@ -48,5 +48,5 @@ sqlserver.task.context_switches_count,gauge,,unit,,Number of scheduler context s sqlserver.task.pending_io_count,gauge,,unit,,Number of physical I/Os that are performed by this task.,0,sql_server,task io pending sqlserver.task.pending_io_byte_count,gauge,,byte,,Total byte count of I/Os that are perfor...
Use instead of a in Issue Use `collections.Counter` instead of a `dict` in `terminal.py` Issue
@@ -8,6 +8,7 @@ import inspect import platform import sys import warnings +from collections import Counter from functools import partial from pathlib import Path from typing import Any @@ -754,10 +755,7 @@ class TerminalReporter: # because later versions are going to get rid of them anyway. if self.config.option.verbos...
utility: color_log: 'auto' mode checks both stderr and stdout .isatty() Both sys.stderr and sys.stdout are queried for 'auto' mode instead of the passed-in stream argument.
@@ -112,13 +112,16 @@ def build_color_logger( @param level Log level of the root logger. @param color_setting One of 'auto', 'always', or 'never'. The default 'auto' enables color if `is_tty` is True. @param stream The stream to which the log will be output. The default is stderr. - @param is_tty Whether the output str...
[varLib.merger] Only insert PairPosFormat1 if non-empty This is proper fix for
@@ -531,7 +531,6 @@ def _Lookup_PairPos_subtables_canonicalize(lst, font): tail.append(subtable) break tail.extend(it) - # TODO Only do this if at least one font has a Format1. tail.insert(0, _Lookup_PairPosFormat1_subtables_merge_overlay(head, font)) return tail @@ -541,12 +540,20 @@ def merge(merger, self, lst): excl...
Downgrade sphinx to a previous version Sphinx 1.7.3 was released 3 days ago: It contains a bug (issue which prevents doc generation. The fix is here but we must wait for its integration in a future 1.7.4 release
@@ -22,7 +22,7 @@ setup( tests_require=['pytest'], extras_require={ 'dev': ['scipy'], - 'deploy': ['pytest-runner', 'sphinx', 'sphinx_rtd_theme'] + 'deploy': ['pytest-runner', 'sphinx<1.7.3', 'sphinx_rtd_theme'] }, entry_points={ 'console_scripts': [],
Metadata API simplify dictionary.get() call Dictionary.get() by default will return "None" if the key is not found as documented in: This means we don't get anything by passing the default type.
@@ -1287,7 +1287,7 @@ class TargetFile(BaseFile): @property def custom(self) -> Any: - return self.unrecognized_fields.get("custom", None) + return self.unrecognized_fields.get("custom") @classmethod def from_dict(cls, target_dict: Dict[str, Any], path: str) -> "TargetFile":
Fixed potential time period oddities seen in GetCapabilities Sort time periods from earliest to latest Use 3 dates/times instead of 4 to determine time period
@@ -327,12 +327,11 @@ local function calculatePeriods(dates) end end - if dates[4] ~= nil then + if dates[3] ~= nil then -- Figure out the size and interval of the period based on first 3 values local diff1 = math.abs(dateToEpoch(dates[1]) - dateToEpoch(dates[2])) local diff2 = math.abs(dateToEpoch(dates[2]) - dateToEp...
Allow embedded Skydive etcd port Skydive uses an embedded etcd. Ports need to be opened in clustering mode.
@@ -65,8 +65,10 @@ outputs: config_settings: tripleo::skydive_analyzer::firewall_rules: '150 skydive_analyzer': - dport: 8082 - proto: tcp + dport: + - 8082 + - 12379 + - 12380 external_deploy_tasks: - name: Skydive deployment when: step == '5'
Now, failing one or more CI/CD Tests causes the workflow to fail. An additional file is also uploaded called "replicate_failures" which allows the user to easily retest just the failed tests locally.
@@ -87,9 +87,9 @@ def print_summary(test_count: int, pass_count:int, fail_count:int, error_count:i def exit_with_status(test_pass:bool, test_count: int, pass_count:int, fail_count:int, error_count:int)->None: if not test_pass: print("Result: FAIL") - print("DURING TESTING, THIS WILL STILL EXIT WITH AN EXIT CODE OF 0 (S...
Fix for bug in file.replace change report The issue this fixes occurs when then given pattern also matches the replacement text and show_changes is set to False, since this will always report changes to the file when no changes were necessary.
@@ -2035,8 +2035,8 @@ def replace(path, # Search the file; track if any changes have been made for the return val has_changes = False - orig_file = [] # used if show_changes - new_file = [] # used if show_changes + orig_file = [] # used for show_changes and change detection + new_file = [] # used for show_changes and c...
background_subtraction_again bg_img.shape>fg_img.shape still wasn't being covered
@@ -2109,7 +2109,7 @@ def test_plantcv_background_subtraction(): pcv.params.debug = None fgmask = pcv.background_subtraction(background_image=bg_img, foreground_image=fg_img) truths.append(np.sum(fgmask) > 0) - fgmask = pcv.background_subtraction(background_image=bg_img, foreground_image=big_img) + fgmask = pcv.backgro...
Updated Websocket connection Added support for Websocket connections through proxy server.
-define(["nbextensions/vpython_libraries/plotly.min", +define(["base/js/utils", + "nbextensions/vpython_libraries/plotly.min", "nbextensions/vpython_libraries/glow.min", - "nbextensions/vpython_libraries/jquery-ui.custom.min"], function(Plotly) { + "nbextensions/vpython_libraries/jquery-ui.custom.min"], function(utils,...
Define __iter__ for TensorProductState Otherwise python will happily let you iterate using len() and getitem() which is *not* what you want
@@ -84,6 +84,9 @@ class TensorProductState: return oneq_state raise IndexError() + def __iter__(self): + yield from self.states + def __len__(self): return len(self.states)
Fix table in benchmarking.md recommonmark doesn't support markdown tables :(
@@ -65,14 +65,23 @@ For the above example, the results will be saved in `./data/local/benchmarks/you ## Environment sets +```eval_rst ++---------------+-------------+------------+--------------------+ | Algorithm | Observation | Action | Environment Set | -| --- | --- | --- | --- | ++===============+=============+=====...
Optimize if-statement Combine the 'else' branches as they do the same assignment.
@@ -364,13 +364,10 @@ class SaltCloud(parsers.SaltCloudParser): elif self.options.bootstrap: host = self.options.bootstrap - if len(self.args) > 0: - if '=' not in self.args[0]: + if len(self.args) > 0 and '=' not in self.args[0]: minion_id = self.args.pop(0) else: minion_id = host - else: - minion_id = host vm_ = { 'd...
Use docker run init Forward signals and reap processes to avoid zombies.
@@ -58,6 +58,7 @@ class Executor(object): self._run_kwargs = { "labels": {"job_id": self._job_id}, + "init": True, "network_disabled": True, "mem_limit": settings.CONTAINER_EXEC_MEMORY_LIMIT, # Set to the same as mem_limit to avoid using swap
migrations: Add reverser for emoji_alt_code migration. This is easy to do, and prevents this feature from getting a server admin stuck in potentially a pretty uncomfortable way -- unable to roll back a deploy.
@@ -9,6 +9,17 @@ def change_emojiset(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> Non user.emojiset = "text" user.save(update_fields=["emojiset"]) +def reverse_change_emojiset(apps: StateApps, + schema_editor: DatabaseSchemaEditor) -> None: + UserProfile = apps.get_model("zerver", "UserProfile") + for user ...
Handle last_message_timestamp Set last_message_timestamp for one to one and group conversations.
@@ -181,6 +181,7 @@ def graphql_to_thread(thread): c_info = get_customization_info(thread) participants = [node['messaging_actor'] for node in thread['all_participants']['nodes']] user = next(p for p in participants if p['id'] == thread['thread_key']['other_user_id']) + last_message_timestamp = thread['last_message']['...
Update CHANGELOG.md Reviewed
## [Unreleased] -Added rate limit handling. +Added Slack API rate limit handling. ## [19.10.1] - 2019-10-15 Added support for changing the display name and icon for the Demisto bot in Slack.
Allow converting IValue to vector<string> Summary: Pull Request resolved: follow up for Test Plan: unit tests
@@ -738,8 +738,12 @@ inline vector<float> OperatorBase::GetVectorFromIValueList<float>( template <> inline vector<string> OperatorBase::GetVectorFromIValueList<string>( const c10::IValue& value) const { - CAFFE_THROW("Cannot extract vector<string> from ivalue."); + auto vs = value.template to<c10::List<string>>(); vect...
enhancement: [gha] add python 3.10 as a test target env Add python 3.10 as a test target environment in github actions.
@@ -16,7 +16,12 @@ jobs: - ubuntu-latest - windows-latest # - macos-latest - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: + - 3.6 + - 3.7 + - 3.8 + - 3.9 + - 3.10 steps: - uses: actions/checkout@v1
hap_tlv8: Convert to pytest Relates to
"""Unit tests for pyatv.support.hap_tlv8.""" -import unittest - from collections import OrderedDict from pyatv.support.hap_tlv8 import read_tlv, write_tlv @@ -17,23 +15,27 @@ LARGE_KEY_IN = {"2": b"\x31" * 256} LARGE_KEY_OUT = b"\x02\xff" + b"\x31" * 255 + b"\x02\x01\x31" -class Tlv8Test(unittest.TestCase): - def test_...
Remove test_annual_mmbtu_random_choice We are deprecating the use of annual_[energy], and we removed the /annual_mmbtu endpoint prior to merging with develop so we wouldn't have do the public deprecation process for that.
@@ -11,7 +11,6 @@ class EntryResourceTest(ResourceTestCaseMixin, TestCase): def setUp(self): super(EntryResourceTest, self).setUp() self.annual_kwh_url = "/v1/annual_kwh/" - self.annual_mmbtu_url = "/v1/annual_mmbtu/" self.default_building_types = [i for i in BuiltInProfile.default_buildings if i[0:8].lower() != 'flatl...
Add lambert conformal conic 2 to supported projections Uses cf conventions Example:
@@ -153,11 +153,23 @@ def _write_transverse_mercator_params(crs_var, crs): crs_var.longitude_of_central_meridian = crs.proj.central_meridian crs_var.latitude_of_projection_origin = crs.proj.latitude_of_origin +def _write_lcc2_params(crs_var, crs): + # e.g. http://spatialreference.org/ref/sr-org/mexico-inegi-lambert-con...
Rotate all axis labels g.set_xticklabels and g.set_yticklabels does not only apply to bottom and left axes
@@ -882,7 +882,7 @@ class FacetGrid(Grid): def set_xticklabels(self, labels=None, step=None, **kwargs): """Set x axis tick labels on the bottom row of the grid.""" - for ax in self._bottom_axes: + for ax in self.axes.flat: if labels is None: labels = [l.get_text() for l in ax.get_xticklabels()] if step is not None: @@ ...
Add date and organization to copyright of script.py.mako Add 2015 OpenStack Foundation to copyright of script.py.mako
-# Copyright ${create_date.year} <PUT YOUR NAME/COMPANY HERE> +# Copyright 2015 OpenStack Foundation # # 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
DOC: Made minor change to fprime keyword description in fsolve closes
@@ -62,7 +62,7 @@ def fsolve(func, x0, args=(), fprime=None, full_output=0, The starting estimate for the roots of ``func(x) = 0``. args : tuple, optional Any extra arguments to `func`. - fprime : callable(x), optional + fprime : callable ``f(x, *args)``, optional A function to compute the Jacobian of `func` with deriv...
HACK add `control_dependencies` to make sure `reduce_max` does not return a value shifted by a factor of 1e-14. Bug report on tf will be filled.
@@ -11,7 +11,7 @@ from zfit.core.interfaces import ZfitPDF from .. import settings from ..util.container import convert_to_container from .limits import Space -from ..settings import ztypes +from ..settings import ztypes, run def uniform_sample_and_weights(n_to_produce: Union[int, tf.Tensor], limits: Space, dtype): @@ ...
llvm/execution: Use generated LLVM function to get data structures Fixes ("llvm, composition: Store node wrappers as a custom struct instead of name")
@@ -190,11 +190,12 @@ class CompExecution(CUDAExecution): self._bin_func = None self._debug_env = debug_env - # At least the input_CIM wrapper should be generated - input_cim_fn = composition._get_node_wrapper(composition.input_CIM) # TODO: Consolidate these if len(execution_ids) > 1: + # At least the input_CIM wrapper...
[Dataset] RedditDataset change data.train_mask to numpy array * PPIDataset * Revert "PPIDataset" This reverts commit * Update reddit.py
@@ -94,11 +94,11 @@ class RedditDataset(DGLBuiltinDataset): Graph of the dataset num_labels : int Number of classes for each node - train_mask: Tensor + train_mask: numpy.ndarray Mask of training nodes - val_mask: Tensor + val_mask: numpy.ndarray Mask of validation nodes - test_mask: Tensor + test_mask: numpy.ndarray M...
pkg_analysis_spec_ada.mako: make Analysis_Unit a public access type This is necessary in order to make the Analysis_Unit type available to lexical environments. TN:
@@ -53,7 +53,8 @@ package ${ada_lib_name}.Analysis is type Analysis_Context is private; ${ada_doc('langkit.analysis_context_type', 3)} - type Analysis_Unit is private; + type Analysis_Unit_Type is private; + type Analysis_Unit is access all Analysis_Unit_Type; ${ada_doc('langkit.analysis_unit_type', 3)} No_Analysis_Uni...
Honor charm channel in bundles Fixes
@@ -436,7 +436,7 @@ class AddCharmChange(ChangeInfo): entity_id = await context.charmstore.entityId(self.charm) log.debug('Adding %s', entity_id) - await context.client_facade.AddCharm(channel=None, url=entity_id, force=False) + await context.client_facade.AddCharm(channel=self.channel, url=entity_id, force=False) retu...
MAINT: Update setup-cygwin to v3 again. Mistakenly left this in when fixing failing CI tests.
@@ -24,7 +24,7 @@ jobs: submodules: recursive fetch-depth: 3000 - name: Install Cygwin - uses: egor-tensin/setup-cygwin@v2 + uses: egor-tensin/setup-cygwin@v3 with: platform: x64 install-dir: 'C:\tools\cygwin'
tenant: Move JSON parsing to capture possible exceptions The request response JSON content parsing can raise exceptions; move the call into the try scope to capture possible exceptions.
@@ -1138,6 +1138,7 @@ class Tenant(): do_verify = RequestsClient(cloudagent_base_url, tls_enabled=False) response = do_verify.get(f'/v{self.supported_version}/keys/verify?challenge={challenge}') + response_body = response.json() except Exception as e: if response.status_code in (503, 504): numtries += 1 @@ -1155,7 +115...
Adding screenshot to Readme Adding a screenshot of the user home to the Readme to show off the look of RTB. Removed tagline as it's at the top of the page already and helps bring the description and image up further in the Readme.
# >_ Root the Box - -A Game of Hackers ------------------- Root the Box is a real-time scoring engine for computer wargames where hackers can practice and learn. The application can be easily configured and modified for any CTF game. Root the Box attempts to engage novice and experienced players alike by combining a fu...
docs: Add fake LDAP auth to subsystems/auth.md. Fixes
@@ -50,3 +50,35 @@ The steps to do this are a variation of the steps documented in showing a client ID and a client secret. In `dev_settings.py`, set `SOCIAL_AUTH_GITHUB_KEY` to the client ID, and in `dev-secrets.conf`, set `social_auth_github_secret` to the client secret. + +## Testing LDAP in development + +Historica...
Update 3_Timeseries.ipynb * Update 3_Timeseries.ipynb * Update examples/user_guide/3_Timeseries.ipynb fixed typo
"metadata": {}, "outputs": [], "source": [ - "df['ITime'] = pd.to_datetime(df['Time']).astype(int)" + "df['ITime'] = pd.to_datetime(df['Time']).astype('int64')" ] }, {
Silence: add separate unsilence error for manually-silenced channels It was confusing to reject a silence and an unsilence when overwrites were manually set to False. That's because it's contradictory to show an error stating it's already silence but then reject an unsilence with an error stating the channel isn't sile...
@@ -110,7 +110,15 @@ class Silence(commands.Cog): """ await self._get_instance_vars_event.wait() log.debug(f"Unsilencing channel #{ctx.channel} from {ctx.author}'s command.") + if not await self._unsilence(ctx.channel): + overwrite = ctx.channel.overwrites_for(self._verified_role) + if overwrite.send_messages is False ...
filter_files: increase the ratio to 0.7 0.6 was to low because it was good enough for the first entry and the ads
@@ -5,7 +5,7 @@ def filter_files(m3u8): files = [] good = m3u8.media_segment[1]["URI"] for segment in m3u8.media_segment: - if SequenceMatcher(None, good, segment["URI"]).ratio() > 0.6: + if SequenceMatcher(None, good, segment["URI"]).ratio() > 0.7: files.append(segment) m3u8.media_segment = files return m3u8
Fixed bed annotator to be more flexible Fixes
@@ -37,9 +37,15 @@ object BedAnnotator { .filter(l => !l.value.isEmpty) .foreach { _.foreach { line => - val Array(chrom, strStart, strEnd, value) = line.split("""\s+""") + val spl = line.split("""\s+""") + if (spl.length < 4) + fatal(s"Expected at least 4 fields, but found ${spl.length}") + val chrom = spl(0) + val st...
Add attributions for cover art & assistance * Update history Add Antoine and myself
- Upgrade Bejeweled to v2.7 (thanks Jeremy R.) - Upgrade Manic Miner to v1.1 - Fix Mockingboard issues in Apple Cider Spider, Bouncing Kamungas, Rescue Raiders, Skyfox, Thunder Bombs - - Add even more super hi-res artwork for IIgs users (thanks Alex L, Brian Wiser, mr_breaddoughrising) + - Add even more super hi-res ar...
Performance enhancement for content manifests In get_content_nodes_selectors, only step through child nodes that are marked as available.
@@ -235,7 +235,7 @@ def get_content_nodes_selectors(channel_id, channel_version, nodes_queries_list) if len(missing_leaf_nodes) == 0: include_node_ids.add(node.id) elif len(matching_leaf_nodes) > 0: - available_nodes_queue.extend(node.children.all()) + available_nodes_queue.extend(node.children.filter(available=True)) ...
Strip trailing mdq slash Having been bitten by trailing slash errors while configuring mdq I thought it'd be nice to protect others from such a frustrating typo.
@@ -794,7 +794,7 @@ class MetaDataMDX(InMemoryMetaData): sha1 transformation. """ super(MetaDataMDX, self).__init__(None, '') - self.url = url + self.url = url.rstrip('/') if entity_transform: self.entity_transform = entity_transform
Update predict-eth.md Reduce num confirmations, therefore faster turnaround in txs
@@ -75,6 +75,7 @@ In the Python console: from ocean_lib.example_config import ExampleConfig from ocean_lib.ocean.ocean import Ocean config = ExampleConfig.get_config("https://polygon-rpc.com") # points to Polygon mainnet +config["BLOCK_CONFIRMATIONS"] = 1 #faster ocean = Ocean(config) # Create Alice's wallet (you're Al...
Correctly handle numbers in zfs module This change will check if a value is a int or float and convert the type accordingly.
@@ -8,6 +8,7 @@ Salt interface to ZFS commands from __future__ import absolute_import # Import Python libs +import re import logging # Import Salt libs @@ -20,6 +21,10 @@ from salt.utils.odict import OrderedDict __virtualname__ = 'zfs' log = logging.getLogger(__name__) + +# Precompiled regex for value transform +re_zfs...
Add alarms with root and non-root to FM monitor HG-- branch : feature/microservices
@@ -192,13 +192,25 @@ class FMMonitorApplication(ExtApplication): r = {} pipeline = [{"$unwind": "$adm_path"}, - {"$group": {"_id": "$adm_path", "tags": {"$sum": 1}}} + {"$group": {"_id": {"adm_path": "$adm_path", "root": "$root"}, "tags": {"$sum": 1}}} ] + z = defaultdict(int) + y = {} res = get_db()["noc.alarms.activ...
Remove unnecessary clone Remove the clone of the message, re-ordering the log messages, such that they can be used with references (if necessary).
@@ -249,27 +249,27 @@ impl<'a> TransactionProcessor<'a> { let mut response = TpProcessResponse::new(); match self.handlers[0].apply(&request, &mut context) { Ok(()) => { - response.set_status(TpProcessResponse_Status::OK); info!("TP_PROCESS_REQUEST sending TpProcessResponse: OK"); + response.set_status(TpProcessRespons...