message
stringlengths
13
484
diff
stringlengths
38
4.63k
m1n1.utils: Make Register sub-subclasses work, optimize Now figures out the fields/etc in a metaclass, not at object instantiation time.
@@ -70,11 +70,31 @@ class Reloadable: def _reloadme(self): self.__class__ = self._reloadcls() -class Register(Reloadable): +class RegisterMeta(type): + def __new__(cls, name, bases, dct): + m = super().__new__(cls, name, bases, dct) + + f = {} + + if bases and bases[0] is not Reloadable: + for cls in bases[0].mro(): + ...
Update mediaprocessor.py null out blank dispositions
@@ -822,6 +822,8 @@ class MediaProcessor: self.log.debug("Cleaning up default disposition settings from not preferred languages. %d streams will have default flag removed." % (len(default_streams_not_in_preferred_language))) for remove in default_streams_not_in_preferred_language: remove['disposition'] = remove.get('di...
[BlackrockIO] Consistency improvements Made __get_nonneural_evtypes_variant_b and ..._variant_a consistent by creating mask using bitwise operators in both methods instead of equality with integer. This is also in line with the Blackrock manual that also refers to single bits being set.
@@ -1862,12 +1862,14 @@ class BlackrockRawIO(BaseRawIO): 'digital_input_port': { 'name': 'digital_input_port', 'field': 'digital_input', - 'mask': data['packet_insertion_reason'] == 1, + 'mask': self.__is_set(data['packet_insertion_reason'], 0) & + ~self.__is_set(data['packet_insertion_reason'], 7), 'desc': "Events of ...
change if statement to caught any not None keywords allowing for `title="",year=""` to work correctly
@@ -517,7 +517,7 @@ class PlexPartialObject(PlexObject): key = '/library/metadata/%s/matches' % self.ratingKey params = {'manual': 1} - if any([agent, title, year, language]): + if any(x is not None for x in [agent, title, year, language]): if title is None: params['title'] = self.title else:
ovs-fw: catches exception from ovsdb OVS agent will raise an exception when deleting multiple vms in bulk. Nova will delete tap when vms are removed. Then, ovs agent checks ovs_port by calling "self.get_ovs_port", and the exception will be raised. The patch will catch exception. Closes-Bug:
@@ -507,7 +507,13 @@ class OVSFirewallDriver(firewall.FirewallDriver): self.prepare_port_filter(port) return old_of_port = self.get_ofport(port) + try: of_port = self.get_or_create_ofport(port) + except exceptions.OVSFWPortNotFound as not_found_error: + LOG.info("port %(port_id)s does not exist in ovsdb: %(err)s.", + {...
diamond: Update test cases Adds missing test cases from the canonical test data and stores this test version.
@@ -3,11 +3,19 @@ import unittest from diamond import make_diamond +# test cases adapted from `x-common//canonical-data.json` @ version: 1.0.0 + class DiamondTests(unittest.TestCase): - def test_letter_A(self): + def test_degenerate_case_with_a_single_row(self): self.assertMultiLineEqual(make_diamond('A'), 'A\n') - def...
TST: updated meta tests Updated the meta unit tests by: fixing more csv unit tests, updating the name and comments of a case change unit test, and fixing the setup for Immutable unit tests.
@@ -805,9 +805,9 @@ class TestBasics(): @pytest.mark.parametrize("bad_key,bad_val,err_msg", [("col_names", [], "col_names must include"), - ("name", None, "Must provide an instrument"), - ("name", 5, "keyword name must be related"), - ("name", 'fake_inst', + ("filename", None, "Must provide an instrument"), + ("filenam...
We don't have iteritems in Cython. Fixes Helps
@@ -158,7 +158,8 @@ cdef class OutputContainer(Container): if k not in options: used_options.add(k) # ... and warn if any weren't used. - unused_options = {k: v for k, v in self.options.iteritems() if k not in used_options} + # TODO: How to items vs iteritems for Py2 vs 3 in Cython? + unused_options = {k: v for k, v in...
feat: getting common fields from telegram data Changes: added method to extract first, second name and nick from data
@@ -17,5 +17,11 @@ class TelegramProvider(Provider): def extract_uid(self, data): return data['id'] + def extract_common_fields(self, data): + return { + 'first_name': data['first_name'], + 'last_name': data['last_name'], + 'username': data['username'], + } provider_classes = [TelegramProvider]
station length comments Fixed formatting and added comments.
@@ -107,12 +107,12 @@ def list_files(tag='', sat_id=None, data_path=None, format_str=None): if tag == "stations": orig_files = files.copy() - # print (orig_files) new_files = [] + # Assigns the validity of each station file to be 1 year for orig in orig_files.iteritems(): files.ix[orig[0] + doff - pds.DateOffset(days=1...
Support --all-tenant in server side If all-tenant is determined to be 1, then set context.all_tenant to true. Closes-Bug:
@@ -17,6 +17,7 @@ from oslo_log import log as logging from oslo_utils import strutils import pecan from pecan import rest +import six from zun.api.controllers import link from zun.api.controllers.v1 import collection @@ -108,6 +109,17 @@ class ContainersController(rest.RestController): def _get_containers_collection(se...
Tutorial Fixes 1. `time_step` needs to be reset after each episode. 2. `next_time_step` should be `time_step` for collecting rewards.
" action = tf.random_uniform([1], 0, 2, dtype=tf.int32)\n", " time_step = tf_env.step(action)\n", " episode_steps += 1\n", - " episode_reward += next_time_step.reward.numpy()\n", + " episode_reward += time_step.reward.numpy()\n", " rewards.append(episode_reward)\n", " steps.append(episode_steps)\n", + " time_step = tf_...
lxml is not a real dependency. From what I see this module is used by beautifulsoup4, but not directly from KiCost. Not a big problem, but could be a problem in the future.
@@ -80,7 +80,7 @@ with open(os.path.join('kicost','HISTORY.rst')) as history_file: # KiCost Python packages requirements to run-time. requirements = [ 'beautifulsoup4 >= 4.3.2', # Deal with HTML and XML tags. - 'lxml >= 3.7.2', +# 'lxml >= 3.7.2', # Indirectly used, this is beautifulsoup4's dependency 'XlsxWriter >= 0....
Add reward ignore threshold Summary: If this threshold is set, we will ignore abnormal data with rewards larger than the threshold when computing the loss function.
# Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. import logging from enum import Enum +from typing import Optional import reagent.types as rlt import torch @@ -20,13 +21,28 @@ class LossFunction(Enum): L1Loss = "L1_Loss" -def _get_loss_function(loss_fn: LossFunction): +def _get_loss_function(loss...
Adds idleOpStr argument to create_standard_cloudnoise_sequences. (arg was already present for create_cloudnoise_sequences)
@@ -1566,8 +1566,9 @@ def create_standard_cloudnoise_sequences(nQubits, maxLengths, singleQfiducials, availability=None, geometry="line", maxIdleWeight=1, maxhops=0, extraWeight1Hops=0, extraGateWeight=0, paramroot="H+S", sparse=False, verbosity=0, cache=None, idleOnly=False, - idtPauliDicts=None, algorithm="greedy"): ...
PythonAPISettings: add a shortcut property to get the context TN:
@@ -15,6 +15,10 @@ class PythonAPISettings(AbstractAPISettings): self.c_api_settings = c_api_settings self.module_name = module_name + @property + def context(self): + return self.c_api_settings.context + def get_enum_alternative(self, type_name, alt_name, suffix): return alt_name.upper
Run 'test-requirements' as part of 'make test' This is consistent with our other apps [1]. Although it won't get picked up by CI just yet [2], we can still benefit from it locally. [1]: [2]:
@@ -54,7 +54,7 @@ generate-version-file: ## Generates the app version file @echo -e "__git_commit__ = \"${GIT_COMMIT}\"\n__time__ = \"${DATE}\"" > ${APP_VERSION_FILE} .PHONY: test -test: generate-version-file ## Run tests +test: test-requirements ## Run tests ./scripts/run_tests.sh .PHONY: freeze-requirements
fix: typo of argment parser desc in train.py Remove duplicated `of`
@@ -108,7 +108,7 @@ parser.add_argument('--crop-pct', default=None, type=float, parser.add_argument('--mean', type=float, nargs='+', default=None, metavar='MEAN', help='Override mean pixel value of dataset') parser.add_argument('--std', type=float, nargs='+', default=None, metavar='STD', - help='Override std deviation ...
Upgrade Theano to 1.0.1 Upgrades Theano to 1.0.1
@@ -16,6 +16,7 @@ dependencies: - pygame - matplotlib - pandas + - mkl-service=1.1.2 - pip: - pyprind - ipdb @@ -25,8 +26,8 @@ dependencies: - pyzmq - cached_property - cloudpickle - - git+https://github.com/Theano/Theano.git@adfe319ce6b781083d8dc3200fb4481b00853791#egg=Theano - - git+https://github.com/neocxi/Lasagne....
Update all_practices Remove reference to mean
<h1>Find a practice</h1> -<p>Search for a practice by name, and see how the practice compares to the national mean for key prescribing indicators.</p> +<p>Search for a practice by name, and see how this practice compares with its peers across the NHS in England.</p> <input class="form-control" id="search" placeholder="...
fw/entrypoint: log devlib version Log devlib version alongside WA version.
@@ -20,6 +20,8 @@ import logging import os import warnings +import devlib + from wa.framework import pluginloader from wa.framework.command import init_argument_parser from wa.framework.configuration import settings @@ -98,6 +100,7 @@ def main(): settings.set("verbosity", args.verbose) log.init(settings.verbosity) logg...
integrate transformer into runner Transformer is called before combinator, it can provide variables to combinator and other parts.
@@ -6,7 +6,7 @@ from logging import FileHandler from threading import Lock from typing import Any, Callable, Dict, Iterator, List, Optional -from lisa import notifier, schema +from lisa import notifier, schema, transformer from lisa.action import Action from lisa.combinator import Combinator from lisa.parameter_parser....
Remove Public APIs This API is in the header of the README.md file
@@ -545,7 +545,6 @@ API | Description | Auth | HTTPS | CORS | | [Plino](https://plino.herokuapp.com/) | An intelligent spam filtering system | No | Yes | No | | [Postman](https://docs.api.getpostman.com/) | Tool for testing APIs | `apiKey` | Yes | Unknown | | [ProxyCrawl](https://proxycrawl.com) | Scraping and crawling...
Show requests deprecation warning by default This adds a warning filter that ensures that the requests deprecation warning is printed unless a user manually disables it.
@@ -24,6 +24,13 @@ _WARNING_MSG = ( ) +warnings.filterwarnings( + action="always", + category=DeprecationWarning, + module=__name__, +) + + def request(method, url, **kwargs): """Constructs and sends a :class:`Request <Request>`.
Update README.md Merge announcement
`scikit-multiflow` is a machine learning package for streaming data in Python. +# Merger announcement + +## TLDR + +[creme](https://creme-ml.github.io/) and [scikit-multiflow](https://scikit-multiflow.github.io/) are merging. A new package will be released from this merge and both development teams will work together o...
Update FORWARD_TRAFFIC.yml (FortiOS 5.4) Update FORWARD_TRAFFIC.yml (FortiOS 5.4)
# messages: - error: 'FORWARD_TRAFFIC' - tag: "subtype=forward" + tag: "forward" values: - level: ([^ ]+) - vd: ([^ ]+) - srcip: ([^ ]+) - srcport: ([^ ]+) - srcintf: ([^ ]+) - dstip: ([^ ]+) - dstport: ([^ ]+) - dstintf: ([^ ]+) - poluuId: ([^ ]+) - sessiondId: ([^ ]+) - protocolId: ([^ ]+) - action: ([^ ]+) + level: ...
Update messages_en.py typo correction
@@ -479,7 +479,7 @@ en = { "server-disable-ready-argument": "disable readiness feature", "server-motd-argument": "path to file from which motd will be fetched", "server-rooms-argument": "path to database file to use and/or create to store persistent room data. Enables rooms to persist without watchers and through resta...
show outputs on e2e tests remove debug line
@@ -129,7 +129,7 @@ class DbndKubernetesJobWatcher(KubernetesJobWatcher): if event["type"] == "ERROR": return self.process_error(event) - # self._extended_process_state(event) + self._extended_process_state(event) self.resource_version = task.metadata.resource_version except Exception as e:
Update extensions.py another attempt to fix this warning ``` WARNING: Explicit markup ends without a blank line; unexpected unindent. This usually occurs when the text following a directive is wrapped to the next line without properly indenting a multi-line text block ```
:copyright: (c) 2018 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. """ -from flask_sqlalchemy import SQLAlchemy as BaseSQLAlchemy +from flask_sqlalchemy import SQLAlchemy as _BaseSQLAlchemy -class SQLAlchemy(BaseSQLAlchemy): +class SQLAlchemy(_BaseSQLAlchemy): + def apply_pool_de...
informational-overlays: Add "The basics" section to keyboard shortcuts. This adds a section for basic shortcuts.
<div class="overlay-modal" id="keyboard-shortcuts" tabindex="-1" role="dialog" aria-label="{{ _('Keyboard shortcuts') }}"> <div class="modal-body" tabindex="0"> + <div> + <table class="hotkeys_full_table hotkeys_table wide table table-striped table-bordered table-condensed"> + <thead> + <tr> + <th colspan="2">{{ _("The...
Report reward training baseline mse Summary: A baseline mse would simply be the reward's variance. The variance is computed only on the evaluation data to be directly comparable with the eval MSE.
@@ -20,6 +20,7 @@ class RewardNetEvaluator: def __init__(self, trainer: RewardNetTrainer) -> None: self.trainer = trainer self.mse_loss = [] + self.rewards = [] self.best_model = None self.best_model_loss = 1e9 @@ -35,11 +36,13 @@ class RewardNetEvaluator: reward = eval_tdp.training_input.slate_reward else: reward = ev...
configure: fix config folder creation The folder creation was failing when passing a filename to -c parameter Tested with: c /test/config1 c test/config2 c config3
@@ -228,7 +228,8 @@ def configure(args): # noqa: C901 FIXME!!! # ensure that the directory for the config file exists (because # ~/.parallelcluster is likely not to exist on first usage) try: - os.makedirs(os.path.dirname(config_file)) + config_folder = os.path.dirname(config_file) or "." + os.makedirs(config_folder) e...
Convert PlatformVersion to SolutionStack when launching docker applications locally SIM: cr
@@ -102,7 +102,7 @@ def _get_solution_stack(): # Test out sstack and tier before we ask any questions (Fast Fail) if solution_string: - if PlatformVersion.is_valid_arn(solution_string): + if PlatformVersion.is_custom_platform_arn(solution_string): try: platformops.describe_custom_platform_version(solution_string) excep...
Make production database parameter fine configurable Allow database parameters configuration with separate environment variables: * GALAXY_DB_NAME * GALAXY_DB_USER * GALAXY_DB_PASSWORD * GALAXY_DB_HOST * GALAXY_DB_PORT
@@ -24,6 +24,11 @@ The following environment variables are supported: * GALAXY_ALLOWED_HOSTS * GALAXY_EMAIL_HOST * GALAXY_DB_URL +* GALAXY_DB_NAME +* GALAXY_DB_USER +* GALAXY_DB_PASSWORD +* GALAXY_DB_HOST +* GALAXY_DB_PORT * GALAXY_EMAIL_PORT * GALAXY_EMAIL_USER * GALAXY_EMAIL_PASSWORD @@ -78,9 +83,22 @@ ALLOWED_HOSTS ...
Remove peak load as max size for CHP in reopt.jl This was hardcoding max size at less than the user input max_kw, if peak load is less than max_kw
@@ -228,12 +228,6 @@ function add_bigM_adjustments(m, p) m[:NewMaxSize][t] = p.MaxSize[t] end end - for t in p.CHPTechs - m[:NewMaxSize][t] = maximum([p.ElecLoad[ts] for ts in p.TimeStep]) - if (m[:NewMaxSize][t] > p.MaxSize[t]) - m[:NewMaxSize][t] = p.MaxSize[t] - end - end # NewMaxSizeByHour is designed to scale the ...
doc/contributing: Add a guide to documentation styles Add a documentation style guide to aid in keeping a consistent style when adding new documentation.
-Contributing Code -================= +Contributing +============ + +Code +---- We welcome code contributions via GitHub pull requests. To help with maintainability of the code line we ask that the code uses a coding style @@ -53,3 +56,130 @@ submitting a pull request: Once you have your contribution is ready, please f...
ImageWriterTest : Add missing offsets I assume this is what the loop on the `offset` variable was intended for, as otherwise it is completely unused, and the `o` node remains at default values throughout.
@@ -378,6 +378,8 @@ class ImageWriterTest( GafferImageTest.ImageTestCase ) : imath.V2i( 106, 28 ) ]: + o["offset"].setValue( offset ) + with Gaffer.Context() : w["task"].execute()
(doc) update advance MM overview and coti Update order optimization parameters and description, and add external links for COTI
@@ -28,7 +28,8 @@ There are two ways to configure these parameters: | [Price Band](./price-band) | `price_floor` | `Enter the price below which only buy orders will be placed` | Place only buy orders when mid price falls below this price. | | [Ping Pong](./ping-pong) | `ping_pong_enabled` | `Would you like to use the p...
drop 'sudo: false' move part of apt packages to lint stage; add names to stages
-sudo: false dist: xenial - language: python addons: apt: packages: - socat - - enchant - - aspell - - aspell-en env: global: @@ -29,13 +24,20 @@ stages: jobs: include: - stage: lint + name: documentation spell check python: "3.6" - env: DOCS_SPELL_CHECK="y" + addons: + apt: + packages: + - enchant + - aspell + - aspel...
family: nrf52: correct out of date code to use discoverer method Ensure core discovery after mass erase on locked targets.
@@ -103,7 +103,7 @@ class NRF52(CoreSightTarget): raise exceptions.TargetError("unable to unlock device") # Cached badness from create_ap run during AP lockout prevents create_cores from # succeeding. - self.dp.create_1_ap(AHB_AP_NUM) + self._discoverer._create_1_ap(AHB_AP_NUM) else: LOG.warning("%s APPROTECT enabled: ...
mgr: do not copy all keyrings on all mgr There is no need to loop over all mgr nodes to set this fact, it's even breaking deployments because it tries to copy all mgr keyring on all mgr. Closes:
- name: set_fact _mgr_keys set_fact: - _mgr_keys: "{{ _mgr_keys | default([{ 'name': 'client.admin', 'path': '/etc/ceph/' + cluster + '.client.admin.keyring', 'copy_key': copy_admin_key }]) + [{ 'name': 'mgr.' + hostvars[item]['ansible_hostname'], 'path': '/var/lib/ceph/mgr/' + cluster + '-' + hostvars[item]['ansible_h...
fixed issue 208 Removed quotes around number answers to fix this issue:
@@ -28,15 +28,15 @@ class Task(object): """) # make a script - if answer == "1": + if answer == 1: Task.one(my_bot) # unfollow your nonfriends - if answer == "2": + if answer == 2: Task.two(my_bot) # exit sript - if answer == "3": + if answer == 3: exit() # invalid input
Adding ANSIBLE0019 to skiplist for linters linters fail because ANSIBLE0019 has been enabled link: This is a temporary merge until we reenable ANSIBLE0019
@@ -16,7 +16,7 @@ whitelist_externals = bash commands = bash -c "cd ansible; find . -type f -regex '.*.y[a]?ml' -print0 | xargs -t -n1 -0 \ ansible-lint \ - -x ANSIBLE0012,ANSIBLE0006,ANSIBLE0007,ANSIBLE0016" \ + -x ANSIBLE0012,ANSIBLE0006,ANSIBLE0007,ANSIBLE0016,ANSIBLE0019" \ --exclude=rally pykwalify -d browbeat-con...
Fix install galaxy role warning message Fix the msg value to use '%s' and remove extra ',' to get a properly formatted message and the '%s' sequence replaced.
@@ -181,8 +181,8 @@ def _install_galaxy_role() -> None: Role: https://galaxy.ansible.com/docs/contributing/creating_role.html#role-names As an alternative, you can add 'role-name' to either skip_list or warn_list. - """, - fqrn, + """ + % fqrn ) if 'role-name' in options.warn_list: _logger.warning(msg)
Edit requisite documentation Fixes
@@ -632,7 +632,7 @@ mod_python.sls - require_in: - service: httpd -Now the httpd server will only start if php or mod_python are first verified to +Now the httpd server will only start if both php and mod_python are first verified to be installed. Thus allowing for a requisite to be defined "after the fact".
Fix issue where available channels were pooled only taken from nsX files, not the nev.
@@ -1495,7 +1495,6 @@ class BlackrockIO(BaseIO): for nsx_nb in nsx_to_load: all_channels.extend( self.__nsx_ext_header[nsx_nb]['electrode_id'].astype(int)) - else: elec_id = self.__nev_ext_header[b'NEUEVWAV']['electrode_id'] all_channels.extend(elec_id.astype(int)) all_channels = np.unique(all_channels).tolist()
fix: Travis lint with matrix exclusions Go back to four Build Jobs and run linting with Python 3.6.
@@ -5,6 +5,31 @@ python: - 3.5 - 3.6 +env: + - TOXENV=py34 + - TOXENV=py35 + - TOXENV=py36 + - TOXENV=lint + +matrix: + exclude: + - python: 3.4 + env: TOXENV=py35 + - python: 3.4 + env: TOXENV=py36 + - python: 3.4 + env: TOXENV=lint + - python: 3.5 + env: TOXENV=py34 + - python: 3.5 + env: TOXENV=py36 + - python: 3.5 ...
build arm executable for linux update python 3 duh ugh testing testing testing fixes fixed artifacts upload fixed build for arm debugging ci debugging ci debugging ci debugging ci changed file name for arm
@@ -100,13 +100,8 @@ jobs: arch: aarch64 distro: ubuntu_latest - # Create an artifacts directory - setup: | - mkdir -p "${PWD}/artifacts" - # Mount the artifacts directory as /artifacts in the container dockerRunArgs: | - --volume "${PWD}/artifacts:/artifacts" --volume "${PWD}/:/spotdl" # The shell to run commands with...
Update permalink to match that of `navigation.yml` Broken link: Works with: Guided by consistency being king, I presume it was better to change the permalink than change the destination URL of the link.
--- title: Conversational AI Examples -permalink: /docs/convAI-examples/ +permalink: /docs/convAI-minimal-start/ excerpt: "Conversational AI Examples" last_modified_at: 2020/10/15 23:16:38 toc: true
Added additional instructions for virtualenv Since I am not automatically appending the "source virtualenvwrapper.sh" to the end of the line, print out some instructions asking the user to do so.
@@ -84,7 +84,6 @@ if [ $OPTION == "1" ]; then fi pip install --user virtualenvwrapper echo 'sourcing virtualenvwrapper.sh' - #export VIRTUALENVWRAPPER_PYTHON=`which python3` export VIRTUALENVWRAPPER_VIRTUALENV=~/.local/bin/virtualenv source ~/.local/bin/virtualenvwrapper.sh echo 'checking if Naomi virtualenv exists' @@...
fix normalize local name 'local' should be returned for local site only
@@ -5,6 +5,7 @@ import threading import time from openpype.lib import Logger +from openpype.lib.local_settings import get_local_site_id from openpype.pipeline import Anatomy from .abstract_provider import AbstractProvider @@ -220,6 +221,6 @@ class LocalDriveHandler(AbstractProvider): def _normalize_site_name(self, site...
Update v_generate_user_grant_revoke_ddl.sql added support for privileges granted on pg_catalog tables and other system owned objects
@@ -3,7 +3,7 @@ Purpose: View to generate grant or revoke ddl for users and groups. This recreating users or group privileges or for revoking privileges before dropping a user or group. -Version: 1.03 +Current Version: 1.04 Columns - objowner: Object owner @@ -20,15 +20,23 @@ ddl: DDL text Notes: History: + +Version 1....
Update espidf_debugging_unit_testing_analysis.rst BUG FIX in test_calc.c renamed main() to app_main()
@@ -338,7 +338,7 @@ implement several basic functions ``addition``, ``subtraction``, ``multiplicatio TEST_ASSERT_EQUAL(32, division(100, 3)); } - void main() { + void app_main() { UNITY_BEGIN(); RUN_TEST(test_function_calculator_addition);
Abort deployment if no CNI present This commit makes it so deployment is aborted in case of no CNI plugin provided when selecting specific cni_bin directory.
@@ -4,6 +4,8 @@ import os import sys import yaml +CNI_DIR = 'cni_bin' + def create(config, plandir, cluster, overrides, dnsconfig=None): k = config.k @@ -31,9 +33,12 @@ def create(config, plandir, cluster, overrides, dnsconfig=None): installparam['plan'] = plan installparam['kubetype'] = 'kind' yaml.safe_dump(installpa...
Improve serialization behavior of line-less pages If no lines are given to the serializer but a number of regions exist the serializer now outputs all regions (in a random order). Fixes
@@ -209,6 +209,20 @@ def serialize(records: Sequence[ocr_record], seg_idx += 1 line_offset += len(segment) cur_ent.append(line) + + # No records but there are regions -> serialize all regions + if not records and regions: + logger.debug(f'No lines given but {len(region_map)}. Serialize all regions.') + for reg in regio...
validate: fix bug when using vault since a variable encrypted with vault is no longer a string but a encrypted object we can't use the filter | length, we have to convert it to a string before. Fixes:
when: - ceph_docker_registry_auth | bool - (ceph_docker_registry_username is not defined or ceph_docker_registry_password is not defined) or - (ceph_docker_registry_username | length == 0 or ceph_docker_registry_password | length == 0) + (ceph_docker_registry_username | string | length == 0 or ceph_docker_registry_pass...
config_service: change pop-up message for force refresh button. Review-Url:
on-tap="_forceRefresh"> </paper-icon-button> <paper-tooltip for="force-refresh" offset="0"> - Force the config refresh. + Re-import the config-set from the repository. </paper-tooltip> </template> </div>
TypeSet: fix handling of abstract classes with no concrete subclasses TN:
@@ -156,13 +156,22 @@ class TypeSet(object): for parent in reversed(parents): if not parent.abstract or parent in self.matched_types: break - subclasses = set(parent.subclasses) + + subclasses = set(parent.concrete_subclasses) if not subclasses.issubset(self.matched_types): break - # If we reach this point, all parent'...
Create Wyckoff symmetry checking: (get_wyckoff_symmetry, check_wyckoff_position) Needed: Better database access and storage. Needed: Checking function for a single point.
@@ -250,7 +250,6 @@ def merge_coordinate(coor, lattice, wyckoff, tol): else: return coor, True - def estimate_volume(numIons, species, factor=2.0): volume = 0 for numIon, specie in zip(numIons, species): @@ -415,9 +414,58 @@ def site_symm(point, gen_pos, tol=1e-3, lattice=Euclidean_lattice): symmetry.append(el) return ...
Update mkvtomp4.py fix missing input_dir, filename_ input_extension and output_dir variables
@@ -321,7 +321,9 @@ class MkvtoMp4: dump["input"] = self.generateSourceDict(inputfile) dump["output"], dump["preopts"], dump["postopts"] = self.generateOptions(inputfile, original) parsed = self.converter.parse_options(dump["output"]) - cmds = self.converter.ffmpeg.generateCommands(inputfile, self.getOutputFile(inputfi...
Fix how we get the pint registry With new pint version (0.18) we need to use ureg.get() to get the application registry.
@@ -9,7 +9,7 @@ import pint new_units_path = Path(__file__).parent / "new_units.txt" ureg = pint.get_application_registry() -if isinstance(ureg, pint.registry.LazyRegistry): +if isinstance(ureg.get(), pint.registry.LazyRegistry): ureg = pint.UnitRegistry() ureg.load_definitions(str(new_units_path)) # set ureg to make p...
Remove duplicate policy modals Because `PolicyModals` was in both `UsingStudio` and `SettingsIndex` components, it was open two times which also caused a focus bug. This removes `PolicyModals` component from `UsingStudio` and leaves it only in `SettingsIndex`.
target="_blank" rel="noopener noreferrer" /> - - <PolicyModals /> </div> </template> <script> import { mapActions } from 'vuex'; - import PolicyModals from 'shared/views/policies/PolicyModals'; import { policies } from 'shared/constants'; export default { name: 'UsingStudio', - components: { - PolicyModals, - }, method...
Modify method BaseModel.get() Swap default and config arguments
@@ -48,7 +48,7 @@ class BaseModel: return Config().pop(variables, config, **kwargs) @classmethod - def get(cls, variables, config, default=None): + def get(cls, variables, default=None, config=None): """ Return variables from config """ return Config().get(variables, default=default, config=config)
Update __init__.py Added Lion Optimization Algorithm to __init__.py file
@@ -26,6 +26,7 @@ from niapy.algorithms.basic.gwo import GreyWolfOptimizer from niapy.algorithms.basic.hho import HarrisHawksOptimization from niapy.algorithms.basic.hs import HarmonySearch, HarmonySearchV1 from niapy.algorithms.basic.kh import KrillHerd +from niapy.algorithms.basic.loa import LionOptimizationAlgorithm...
Fix selectize initialization in the Details page Fixes:
@@ -11,7 +11,9 @@ $(function () { return {value: tag} } - var allTags = $("#update-tags-input").data("all-tags"); + // Use attr() instead of data() here, as data() converts attribute's string value + // to a JS object, but we need an unconverted string: + var allTags = $("#update-tags-input").attr("data-all-tags"); var...
CoilSetPriority causing desyncs The CoilSetPriority command is causing a desync condition on Node 9 and above. If I recall right, this was added to troubleshoot hardware rules and isn't strictly required by spike, so I removed it.
@@ -1251,8 +1251,8 @@ class SpikePlatform(SwitchPlatform, LightsPlatform, DriverPlatform, DmdPlatform, self.log.warning("Did not get status for node %s", node) if self.node_firmware_version[node] >= 0x3100: - self.log.debug("SetLEDMask, CoilSetMask, CoilSetOCTime, CoilSetOCBehavior, SetNumLEDsInputs and " - "CoilSetPri...
Fix docstr db in tfr.plot_joint * Fix docstr db in tfr.plot_joint When ```db=True```, tfr.plot_joint multiplies by 10. The info for the funtion states, however, that it multiplies by 20. * fix docstr dB in tfr.plot; plot_joint; plot_topo
@@ -1091,7 +1091,7 @@ class AverageTFR(_BaseTFR): amount of images. dB : bool - If True, 20*log10 is applied to the data to get dB. + If True, 10*log10 is applied to the data to get dB. colorbar : bool If true, colorbar will be added to the plot. For user defined axes, the colorbar cannot be drawn. Defaults to True. @@...
Add delay to paper trade order created event firings, fixes XMM Fixes: XMM Paper Trade cancel orders loop
# distutils: sources=['hummingbot/core/cpp/Utils.cpp', 'hummingbot/core/cpp/LimitOrder.cpp', 'hummingbot/core/cpp/OrderExpirationEntry.cpp'] +import asyncio from collections import ( deque, defaultdict ) @@ -23,6 +24,9 @@ from hummingbot.core.Utils cimport( getIteratorFromReverseIterator, reverse_iterator ) +from hummi...
remove card in landing page first section It was causing layout difficulties and not really adding much
@@ -208,7 +208,6 @@ export default function LandingPage() { </section> <div className={classes.spacer} /> <Container component="section" maxWidth="md"> - <Paper elevation={isBelowMd ? 0 : 1} className={classes.card}> <Typography component="h2" className={classes.header} @@ -231,11 +230,10 @@ export default function Lan...
add python built-in complex type to array types fixes
@@ -153,8 +153,8 @@ def make_shaped_array(x): return ShapedArray(onp.shape(x), dtype) array_types = [onp.ndarray, onp.float64, onp.float32, onp.complex64, - onp.int64, onp.int32, onp.bool_, onp.uint64, onp.uint32, float, - int, bool] + onp.int64, onp.int32, onp.bool_, onp.uint64, onp.uint32, + complex, float, int, bool...
Only log connection failures to debug This is noisy and obscuring the real message in the page. This warns almost every time because some hosts are firewalled off and we can't get the file so setting to debug log only so we can read the output more clearly.
@@ -130,7 +130,10 @@ async def transfer_one_file( ) resp = await asyncio.wait_for(reader.read(), timeout=1.0) except (asyncio.TimeoutError, ConnectionRefusedError) as ex: - logger.warning(f"error getting file from {host}: {ex!r}") + # this is not ununusual because we sometimes advertise hosts from + # firewalled subnet...
[logger.py] add tensorboard logging support Usage: call `logger.add_tensorboard_output(logdir)` before training. PyTorch >= 1.1 or tensorboardX is required.
@@ -1254,6 +1254,9 @@ _header_printed = False _running_processes = [] _async_plot_flag = False +_summary_writer = None +_global_step = 0 + def _add_output(file_name, arr, fds, mode='a'): if file_name not in arr: @@ -1287,6 +1290,48 @@ def add_tabular_output(file_name): _add_output(file_name, _tabular_outputs, _tabular_...
Remove FieldRowPanel top padding inside MultiFieldPanel fixes
@@ -57,14 +57,18 @@ $object-title-height: 40px; border-color: $color-input-focus-border; } - fieldset { + fieldset, + .field-row { padding-top: $object-title-height + 12px; + } + + fieldset { padding-left: 0; padding-right: 0; - } .field-row { - padding-top: $object-title-height + 12px; + padding-top: 0; + } } .object-...
Migrate Alcatel.get_metrics to new interface HG-- branch : feature/microservices
@@ -21,14 +21,14 @@ class SlotRule(OIDRule): name = "slot" def iter_oids(self, script, metric): - healthModuleSlot = [0] + health_module_slot = [0] i = 1 r = {} if script.has_capability("Stack | Members"): - healthModuleSlot = range(1, script.capabilities["Stack | Members"] + 1) + health_module_slot = range(1, script.c...
Updated to_netcdf4 documentation Included attribute information
@@ -2020,7 +2020,12 @@ class Instrument(object): structure - All attributes attached to instrument meta are written to netCDF attrs. + All attributes attached to instrument meta are written to netCDF attrs + with the exception of 'Date_End', 'Date_Start', 'File', 'File_Date', + 'Generation_Date', and 'Logical_File_ID'....
Add space after comma in default Quantity.__repr__ This since numpy is now much better in removing superfluous spaces.
@@ -1226,7 +1226,8 @@ class Quantity(np.ndarray, metaclass=InheritDocstrings): def __repr__(self): prefixstr = '<' + self.__class__.__name__ + ' ' - arrstr = np.array2string(self.view(np.ndarray), separator=',', + sep = ',' if NUMPY_LT_1_14 else ', ' + arrstr = np.array2string(self.view(np.ndarray), separator=sep, pref...
docs: updated pip installation instructions Simplified instructions in light of binaries being available for fpzip and compressed_segmentation.
@@ -21,24 +21,30 @@ CloudVolume can be used in single or multi-process capacity and can be optimized ## Setup -Cloud-volume is compatible with Python 2.6+ and 3.4+ (we've noticed it's faster on Python 3). On linux it requires g++ and python3-dev. After installation, you'll also need to set up your cloud credentials. +C...
Update Osc.py created new Mrl OscMessage - and converted from JavaOSC
# we want them sent to python so we subscribe to # the publishOSCMessage method - python.subscribe("osc", "publishOSCMessage") + python.subscribe("osc", "publishOscMessage") # the messages will come back to us in onOscMessage - def onOSCMessage(message): + def onOscMessage(message): print(message) data = message.getArg...
Update sre_parse module for Python 3.8 It seems in Python 3.8, the 'Pattern' object in the (undocumented?) sre_parse module was renamed to 'State', along with a few associated parameters.
@@ -4,6 +4,7 @@ from typing import ( Any, Dict, FrozenSet, Iterable, List, Match, Optional, Pattern as _Pattern, Tuple, Union ) +import sys from sre_constants import _NamedIntConstant as NIC, error as _Error SPECIAL_CHARS: str @@ -20,7 +21,7 @@ GLOBAL_FLAGS: int class Verbose(Exception): ... -class Pattern: +class _Sta...
Update correlation_tools.py if I understood well this function the variable `clipped` should report if any value was smaller than the threshold value not the hardcoded 0
@@ -20,7 +20,7 @@ from statsmodels.tools.sm_exceptions import ( def clip_evals(x, value=0): # threshold=0, value=0): evals, evecs = np.linalg.eigh(x) - clipped = np.any(evals < 0) + clipped = np.any(evals < value) x_new = np.dot(evecs * np.maximum(evals, value), evecs.T) return x_new, clipped
Additional caps to Iskratel.ESCOM.get_lldp_neighbors sript HG-- branch : feature/microservices
@@ -50,11 +50,18 @@ class Script(BaseScript): caps = 0 for c in i[4].split(","): c = c.strip() + """ + System capability legend: + B - Bridge; R - Router; W - Wlan Access Point; T - telephone; + D - DOCSIS Cable Device; H - Host; r - Repeater; + TP - Two Ports MAC Relay; S - S-VLAN; C - C-VLAN; O - Other + """ if c: ca...
ip_conntrack module loading moved ip_conntrack module loading above sysctl loading to prevent errors when loading systctl changes that involved nf_conntrack
@@ -53,6 +53,31 @@ execute 'load ipmi_devintf kernel module at boot' do not_if "grep ipmi_devintf /etc/modules" end +# ip_conntrack module loading and configuration +# +execute 'load ip_conntrack kernel module' do + command 'modprobe ip_conntrack' + not_if 'lsmod | grep nf_conntrack' +end + +begin + sys_params = node['...
commands/list: add "augmentations" and "all" Allow specifying "augmentations" and "all" as the plugin kind to lost. In the case of of the former, instruments and output processors get listed. In the case of the latter, every plugin kind gets listed.
@@ -27,6 +27,7 @@ class ListCommand(Command): def initialize(self, context): kinds = get_kinds() + kinds.extend(['augmentations', 'all']) self.parser.add_argument('kind', metavar='KIND', help=('Specify the kind of plugin to list. Must be ' 'one of: {}'.format(', '.join(sorted(kinds)))), @@ -52,6 +53,21 @@ class ListCom...
Disable flaky test in threading_utils_test.py There's probably a way to fix it but it's not worth the work for now.
@@ -268,8 +268,9 @@ class ThreadPoolTest(unittest.TestCase): actual = pool.join() self.assertEqual(['a', 'c', 'b'], actual) + # Disabled due to https://crbug.com/778055 @timeout(30) - def test_abort(self): + def disabled_test_abort(self): # Trigger a ridiculous amount of tasks, and abort the remaining. completed = Fals...
Remove .resolve_unique, which is unused and untested TN:
@@ -16,10 +16,8 @@ from langkit.expressions.utils import array_aggr, assign_var @auto_attr_custom("get") @auto_attr_custom("get_sequential", sequential=True) -@auto_attr_custom("resolve_unique", resolve_unique=True) -def env_get(self, env_expr, symbol_expr, resolve_unique=False, - sequential=False, sequential_from=Self...
Update api-ref for partial download requests. Change [1] fixed partial downloads in glance and changed the status codes to be more appropriate. Updating api-ref to reflect what the v2 code will now do. [1]
@@ -102,16 +102,24 @@ verify the integrity of the image data. - You can download the binary image data in your machine if the image has image data. -- If image data exists, the call returns the HTTP ``200`` response code. +- If image data exists, the call returns the HTTP ``200`` response code for a + full image downlo...
Update v_generate_tbl_ddl.sql Added ENCODE RAW keyword for non compressed columns (Issue
@@ -43,6 +43,7 @@ History: 2017-05-03 pvbouwel Change table & schemaname of Foreign key constraints to allow for filters 2018-01-15 pvbouwel Add QUOTE_IDENT for identifiers (schema,table and column names) 2018-05-30 adedotua Add table_id column +2018-05-30 adedotua Added ENCODE RAW keyword for non compressed columns (I...
In this commit: I cleaned up some residue code The quiz now selects a random category if None provided Updated doc strings Displaying the category when the quiz is starting
@@ -45,13 +45,10 @@ class TriviaQuiz(commands.Cog): return questions @commands.group(name="quiz", aliases=["trivia"], invoke_without_command=True) - async def quiz_game(self, ctx: commands.Context, category: str = "general") -> None: + async def quiz_game(self, ctx: commands.Context, category: str = None) -> None: """ ...
Add safeguard against malicious exploitation of ISO_C_BINDING import For security, write `use, intrinsic :: ISO_C_BINDING` instead of `use ISO_C_BINDING` (fixes
@@ -284,7 +284,7 @@ class FCodePrinter(CodePrinter): name=name) imports = ''.join(self._print(i) for i in expr.imports) - imports += 'use ISO_C_BINDING\n' + imports += 'use, intrinsic :: ISO_C_BINDING\n' decs = ''.join(self._print(i) for i in expr.declarations) body = '' @@ -335,7 +335,7 @@ class FCodePrinter(CodePrint...
remove format arg removing the format arg since we also removed it from the posts.py logic
{% if can_download %} <span class='section'>Downloads</span> <a href="{{url_for('posts.download')}}?type=kp&post={{post_path|urlencode}}" class="btn btn-primary btn-download" style='display: block;'>Portable Knowledge Post</a> - <a href="{{url_for('posts.download')}}?type=post&format=pdf&post={{post_path|urlencode}}" c...
Capitalisation mistake Changed "BigchaindB" to "BigchainDB"
@@ -13,7 +13,7 @@ Code is Apache-2.0 and docs are CC-BY-4.0 BigchainDB Server requires Python 3.5+ and Python 3.5+ [will run on any modern OS](https://docs.python.org/3.5/using/index.html), but we recommend using an LTS version of [Ubuntu Server](https://www.ubuntu.com/server) or a similarly server-grade Linux distribu...
[Sigma] Update OriginalFileName mapping * Update OriginalFileName mapping the previous mapping did create a query that was not parseable, e.g. for rule # * remove one Image mapping that was not unique
@@ -326,7 +326,6 @@ fieldmappings: TargetFilename: product=linux: filename default: xml_string - Image: xml_string # that is a value name that might be used in other queries as well. Ideally it would be something _all ImageLoaded: xml_string QueryName: xml_string TargetProcessAddress: xml_string @@ -339,7 +338,7 @@ fie...
fix doctest again... python 2 and 3 don't print lines/columns of datasets/dataframes in the same order: change calls to specify order or narrow selection
@@ -166,7 +166,7 @@ class DataRecord(Dataset): the dimension 'item_id'. >>> dr2=DataRecord(grid, ... items=my_items2) - >>> dr2.to_dataframe() + >>> dr2.to_dataframe()[['grid_element', 'element_id']] grid_element element_id item_id 0 node 1 @@ -181,7 +181,7 @@ class DataRecord(Dataset): >>> dr3=DataRecord(grid, ... tim...
fix first submission not associated with user ID see
@@ -180,12 +180,11 @@ class PenguinStatsReporter: ) - if self.logged_in: client = self.client - else: + if not self.logged_in: uid = config.get('reporting/penguin_stats_uid', None) if uid is not None: - self.try_login(uid) + if not self.try_login(uid): # use exclusive client instance to get response cookie client = pen...
Update pytests-dev.yml Removed windows testing in set env var
@@ -27,12 +27,7 @@ jobs: - name: Set environment variables run: | - if [[ ${{ matrix.os }} == windows* ]] ; - then - echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV - else echo "CONDA_ENV_FILE=ci/requirements/py${{matrix.python-version}}-dev.yml" >> $GITHUB_ENV - fi echo "PYTHON_VERSION=${{...
Handle user error in update labels * Get only required fields when processing messages * Handle customer id in group add/delete/sync/clear I always wondered what this was: if user_email != u'*' * Allow * to mean all users in group operations * Make pylon happy, handle user error in update labels
@@ -4714,7 +4714,7 @@ def doProcessMessagesOrThreads(users, function, unit=u'messages'): for my_key in body: kwargs[u'body'][my_key] = labelsToLabelIds(gmail, body[my_key]) if not kwargs[u'body']: - del(kwargs[u'body']) + del kwargs[u'body'] i = 0 if unit == u'messages' and function in [u'delete', u'modify']: batchFunc...
Scons: Fixup for Python3 compiler version output decoding * This should only affect MinGW64 with Python3, but was not generally observed.
@@ -303,7 +303,7 @@ def detectVersion(env, cc): # version = line line = pipe.stdout.readline() - if str is not bytes: + if str is not bytes and type(line) is bytes: line = line.decode("utf8") match = re.search(r'[0-9]+(\.[0-9]+)+', line)
Fixing detection to conform to new sysmon behavior.
@@ -13,7 +13,7 @@ description: this detection was designed to identifies suspicious office documen or other malware component. It is really good practice to disable macro by default to avoid automatically execute macro code while opening or closing a office document files. -search: '`sysmon` EventCode=7 process_name IN...
DOC: clarify typical optional input Update concat dosctring with info about sorting.
@@ -1583,7 +1583,8 @@ class Instrument(object): ---- For pandas, sort=False is passed along to the underlying pandas.concat method. If sort is supplied as a keyword, the - user provided value is used instead. + user provided value is used instead. Recall that sort orders the + data columns, not the data values or the i...
optional 'forceconvert' parameter overrides deluge getting list of files from torrent in favor of just reading from directory
@@ -49,6 +49,20 @@ try: category = torrent_data['label'].lower() files = [] + + # Check forcepath which overrides talking to deluge for files and instead reads the path + try: + force = (str(sys.argv[4]).lower().strip() == 'forcepath') + except: + force = False + + if force: + log.debug("List of files in path override:...