message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
Component: instantiate parameter classes in dependency order
ensures functions will be instantiated by the time their dependent functions
need to use them | @@ -483,8 +483,10 @@ import copy
import dill
import functools
import inspect
+import itertools
import logging
import numbers
+import toposort
import types
import warnings
@@ -2060,8 +2062,19 @@ class Component(JSONDumpable, metaclass=ComponentsMeta):
"""
from psyneulink.core.components.shellclasses import Function
+ pa... |
cli: fix variable name in update and get_master_server_id functions
The variable previously defined is stack_name and not stack. | @@ -136,7 +136,7 @@ def update(args):
temp_resources.extend(resources)
if not resources.next_token:
break
- resources = cfnconn.describe_stack_resources(stack, next_token=resources.next_token)
+ resources = cfnconn.describe_stack_resources(stack_name, next_token=resources.next_token)
resources = temp_resources
asg = [r... |
#AGENT-271 Do not fail to start agent when cannot contact server
#AGENT-271 Do not fail to start agent when cannot contact server | @@ -394,9 +394,9 @@ class ScalyrAgent(object):
if ping_result != 'success':
if 'badClientClockSkew' in ping_result:
# TODO: The server does not yet send this error message, but it will in the future.
- raise Exception('Sending request to the server failed due to bad clock skew. The system clock '
- 'on this host is too... |
tests: fix `test_nfs_is_up` test
the data structure seems to have been modified in ceph@master (quincy).
This commit update the test accordingly. | @@ -38,9 +38,14 @@ class TestNFSs(object):
cluster=cluster
)
output = host.check_output(cmd)
- daemons = [i for i in json.loads(
- output)["servicemap"]["services"]["rgw-nfs"]["daemons"]]
- assert hostname in daemons
+ keys = [i for i in json.loads(
+ output)["servicemap"]["services"]["rgw-nfs"]["daemons"].keys()]
+ ke... |
Update README.md
Added logo | [](https://opensource.org/licenses/MIT) [](https://travis-ci.org/inventree/InvenTree) [... |
Update Dockerfile to no longer fetch geoip database
It's not needed for local envs. Geoip queries will fail, but that should be ok.
Fixes | @@ -56,12 +56,6 @@ RUN apt-get update && apt-get -t stretch install -y \
libmaxminddb-dev \
&& rm -rf /var/lib/apt/lists/*
-ADD http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz /tmp
-
-RUN mkdir -p /usr/local/share/GeoIP \
- && gunzip -c /tmp/GeoLite2-Country.mmdb.gz > /usr/local/share/GeoIP/... |
Add a note to the ssh_known_hosts State doc.
I tried to use this state with multiple
hostname aliases in a single entry, and
discovered it did not work. Hopefully this
documentation tweak will help future users. | @@ -61,6 +61,9 @@ def present(
name
The name of the remote host (e.g. "github.com")
+ Note that only a single hostname is supported, if foo.example.com and
+ bar.example.com have the same host you will need two separate Salt
+ States to represent them.
user
The user who owns the ssh authorized keys file to modify
@@ -1... |
Fix bad merge, get CouchUser by user_id
... because | @@ -15,7 +15,7 @@ from corehq.apps.domain.auth import (
)
from corehq.apps.users.models import CouchUser, InvalidUser, AnonymousCouchUser
from corehq.apps.users.util import username_to_user_id
-from corehq.toggles import ANONYMOUS_WEB_APPS_USAGE, PUBLISH_CUSTOM_REPORTS
+from corehq.toggles import PUBLISH_CUSTOM_REPORTS... |
[doc] Don't use Sphinx 5.0
There are problems with parameters which are shown with double colons. | # This is a PIP requirements file for building Sphinx documentation of pywikibot
# requirements.txt is also needed
-sphinx >= 4.1.0
\ No newline at end of file
+sphinx >= 4.1.0,!=5.0.0
\ No newline at end of file
|
Fix incorrect scope for logging in StatisticsGen executor.
The "output_uri" variable may have been uninitialized at logging time. | @@ -84,4 +84,5 @@ class Executor(base_executor.BaseExecutor):
shard_name_template='',
coder=beam.coders.ProtoCoder(
statistics_pb2.DatasetFeatureStatisticsList)))
- tf.logging.info('Statistics written to {}.'.format(output_uri))
+ tf.logging.info('Statistics for split {} written to {}.'.format(
+ split, output_uri))
|
remove cattrs pin
dependency removal | -apache-airflow[gcp]==1.10.12
+apache-airflow[gcp]==1.10.14
SQLAlchemy==1.3.23 # must be under 1.4 until at least Airflow 2.0 (check airflow setup.py for restrictions)
-cattrs==1.0.0 #this has to be explicitly pinned to 1.0.0 until airflow 1.10.13 when a fix should be pushed
kubernetes==12.0.1
scipy==1.4.1; python_vers... |
Ensure nano is the default editor
The installation of `joe` will set it as the default editor. This is
surprising for many users and is bad for `sudo visudo`. Flip to `nano`. | - expect
- pandoc # for `pip install pwntools`
+- name: Ensure nano is the default editor
+ alternatives:
+ name: editor
+ path: /bin/nano
+
- name: Install common pip2 packages for CTF shell servers
pip:
name: "{{ item }}"
|
Minor fix of the histogram observer in FBL eval flows
Summary:
Pull Request resolved:
Fix the bug in quantization eval workflow; Add mul_nets option in histogram observer pybind | @@ -22,14 +22,16 @@ PYBIND11_MODULE(dnnlowp_pybind11, m) {
m.def(
"ObserveHistogramOfOutput",
- [](const string& out_file_name, int dump_freq) {
- AddGlobalNetObserverCreator([out_file_name, dump_freq](NetBase* net) {
+ [](const string& out_file_name, int dump_freq, bool mul_nets) {
+ AddGlobalNetObserverCreator(
+ [ou... |
2.7.2
Automatically generated by python-semantic-release | @@ -9,7 +9,7 @@ https://community.home-assistant.io/t/echo-devices-alexa-as-media-player-testers
"""
from datetime import timedelta
-__version__ = "2.7.1"
+__version__ = "2.7.2"
PROJECT_URL = "https://github.com/custom-components/alexa_media_player/"
ISSUE_URL = "{}issues".format(PROJECT_URL)
|
Implement open_issues in githubapi
Implemented the metric 'Open Issues' in githubapi.
This implementation returns the number issues opened per day. | @@ -126,6 +126,36 @@ class GitHubAPI(object):
# return the dataframe
return df
+ @annotate(tag='open-issues')
+ def open_issues(self, owner, repo):
+ """
+ Timeseries of the number of issues opened per day.
+
+ :param owner: The username of the project owner.
+ :param repo: The name of the repository.
+ :return: DatFra... |
Fix (for valid Python code)
Does not fix the original issue where for ex. a `if` statement is immediately followed by a `else` statement (not valid Python)
To fix the original issue, `if ind(leading_text) == ind(prevtxt.rstrip()) and not prevtxt[-1] == ':':` works but is unnecessary in my opinion | @@ -3982,7 +3982,7 @@ def insert_text(event):
ind = lambda txt: len(txt)-len(txt.lstrip())
prevtxt = to_text_string(self.textCursor(
).block().previous().text())
- if ind(leading_text) == ind(prevtxt):
+ if ind(leading_text) == ind(prevtxt.rstrip()):
self.unindent(force=True)
insert_text(event)
elif key == Qt.Key_Space... |
Give Python CSDK initialize_block default None arg
This is specified by the interface. | @@ -80,7 +80,7 @@ class ZmqService(Service):
# -- Block Creation --
- def initialize_block(self, previous_id):
+ def initialize_block(self, previous_id=None):
request = (
consensus_pb2.ConsensusInitializeBlockRequest(
previous_id=previous_id)
|
Add test to check role unassignment
Create a test that checks if a role gets deleted it will also get unassigned from the user | from django.urls import reverse
from .base import AuthenticatedAPITestCase
-from ..models import Role
+from ..models import Role, User
+
class CreationTests(AuthenticatedAPITestCase):
@@ -35,6 +36,20 @@ class CreationTests(AuthenticatedAPITestCase):
permissions=6,
position=0,
)
+ cls.role_to_delete = Role.objects.creat... |
target_test.py: Use clean paths to avoid failures
Currently some tests will fail if you run them twice, because there's no
proper cleanup done. | @@ -19,6 +19,7 @@ from __future__ import print_function
from helpers import unittest, skipOnTravis
from mock import Mock
import re
+import random
import luigi.target
import luigi.format
@@ -251,23 +252,25 @@ class FileSystemTargetTestMixin(object):
# We're cheating and retrieving the fs from target.
# TODO: maybe move ... |
remove gh issue for cursor_res
Summary: looking at and - not sure what exactly was meant to be done so putting up this diff
Test Plan: bk
Reviewers: sidkmenon | @@ -251,7 +251,6 @@ def watcher_thread(
)
try:
with engine.connect() as conn:
- # https://github.com/dagster-io/dagster/issues/3858
cursor_res = conn.execute(
db.select([SqlEventLogStorageTable.c.event]).where(
SqlEventLogStorageTable.c.id == index
|
shortened code using abs() and inplace ops
n = -n if n < 0 else n --> n = abs(n)
n = n // 10 --> n //= 10 | @@ -14,11 +14,11 @@ def sum_of_digits(n: int) -> int:
>>> sum_of_digits(0)
0
"""
- n = -n if n < 0 else n
+ n = abs(n)
res = 0
while n > 0:
res += n % 10
- n = n // 10
+ n //= 10
return res
@@ -35,7 +35,7 @@ def sum_of_digits_recursion(n: int) -> int:
>>> sum_of_digits_recursion(0)
0
"""
- n = -n if n < 0 else n
+ n = ... |
Used a shared cache db for sessions.
This will make our stuff work when we have multiple app servers. | @@ -55,6 +55,9 @@ INSTALLED_APPS = (
'rest_framework.authtoken',
)
+SESSION_ENGINE = "django.contrib.sessions.backends.cached_db"
+
+
MIDDLEWARE_CLASSES = (
# 'django.middleware.cache.UpdateCacheMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
|
Update nf_core/lint_utils.py
Change prettier syntax errors to issue a log instead of error out | @@ -72,7 +72,7 @@ def run_prettier_on_file(file):
)
except subprocess.CalledProcessError as e:
if ": SyntaxError: " in e.stdout.decode():
- raise ValueError(f"Can't format {file} because it has a synthax error.\n{e.stdout.decode()}") from e
+ log.critical(f"Can't format {file} because it has a syntax error.\n{e.stdout.... |
Add pre-processing step to dials.stills_process.
In this program it's a no-op. We'll use it in XFEL though. | @@ -330,6 +330,7 @@ def run(self):
# Wrapper function
def do_work(i, item_list):
processor = Processor(copy.deepcopy(params), composite_tag = "%04d"%i)
+
for item in item_list:
processor.process_datablock(item[0], item[1])
processor.finalize()
@@ -457,6 +458,12 @@ def process_datablock(self, tag, datablock):
dump.as_js... |
fix to loggin in AA
Summary: Pull Request resolved: | @@ -202,6 +202,10 @@ std::string AliasDb::toString() const {
std::stringstream ss{};
std::unordered_map<size_t, Element*> indexToElementMap;
+ for (const auto &ent : wildcardIndex_) {
+ indexToElementMap[ent.second->index] = ent.second;
+ }
+
ss << "\n===1. GRAPH===\n";
ss << graph_->toString();
@@ -232,7 +236,7 @@ std... |
Fix fwaas v1 configuration doc
Modify the fwaas v1 config about driver
Closes-Bug: | @@ -17,7 +17,7 @@ FWaaS management options are also available in the Dashboard.
service_provider = FIREWALL:Iptables:neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver:default
[fwaas]
- driver = neutron_fwaas.services.firewall.drivers.linux.iptables_fwaas.IptablesFwaasDriver
+ driver = iptables
enabl... |
Avoid importlib-metadata conflict with tox
importlib-metadata does not support installing versions after 2.0 on
Python versions prior to py38.
Also fix the path for ANSIBLE_CONFIG file | @@ -38,7 +38,7 @@ passenv =
SSH_AUTH_SOCK
TERM
setenv =
- ANSIBLE_CONFIG={toxinidir}/dev/null
+ ANSIBLE_CONFIG={toxinidir}/.ansible.cfg
ANSIBLE_CALLABLE_WHITELIST={env:ANSIBLE_CALLABLE_WHITELIST:timer,profile_roles}
ANSIBLE_DISPLAY_FAILED_STDERR=1
ANSIBLE_VERBOSITY=1
@@ -51,6 +51,7 @@ deps =
devel: ansible>=2.10.0a2,<2... |
proofreadpage_tests: fix test_page_gen_redlink
Recreated pages on en.wikisource.org and renamed pages in file. | @@ -651,11 +651,11 @@ class TestIndexPageMappingsRedlinks(IndexPageTestCase):
cached = True
- index_name = 'Index:Pywikibot test page 1'
- page_names = ['Page:Pywikibot test page 1/1',
- 'Page:Pywikibot test page 2/2',
+ index_name = 'Index:Pywikibot test page.djvu'
+ page_names = ['Page:Pywikibot test page.djvu/1',
+ ... |
Refactor code to follow project coding styling.
Changes in css styles | @@ -178,12 +178,13 @@ div.languages {
color: black;
text-align: {{end}};
float: right;
- margin-right:5%;
+ padding-{{end}}: 20px;
}
div.languages img {
vertical-align: text-top;
}
+
div.languages select {
background: white;
}
|
XFail Bow
For failure with `overriding declarations in extensions is not
supported`. | "project": "Bow.xcodeproj",
"scheme": "Bow",
"destination": "generic/platform=iOS",
- "configuration": "Release"
+ "configuration": "Release",
+ "xfail": {
+ "issue": "https://bugs.swift.org/browse/SR-11740",
+ "branch": ["master"]
+ }
},
{
"action": "TestXcodeProjectScheme",
|
Update issue template
Just until juju-crashdump gets fixed | @@ -25,13 +25,13 @@ Please attach tarball of **~/.cache/conjure-up**:
tar cvzf conjure-up.tar.gz ~/.cache/conjure-up
```
-## Crashdump
+## Sosreport
-In order to better get an overall idea of your system setup please also attach a
-**juju-crashdump** with **sosreport** plugin enabled.
+Please attach a sosreport:
```
-s... |
l3 notifer should not be a set
An exceptions is raised when a gateway is set to a router because
l3 notifer is a set
Close-Bug: | @@ -95,9 +95,9 @@ class DFL3AgentlessRouterPlugin(service_base.ServicePluginBase,
def _start_rpc_notifiers(self):
"""Initialization RPC notifiers for agents"""
- self.agent_notifiers[const.AGENT_TYPE_L3] = {
+ self.agent_notifiers[const.AGENT_TYPE_L3] = (
l3_rpc_agent_api.L3AgentNotifyAPI()
- }
+ )
def start_rpc_listen... |
drafts: Increase the duration of "Saved as draft" tooltip.
Now that it's further away from the composebox, we probably want it to
be visible for longer. Doubling it from 1.5 seconds to 3 seconds seems
reasonable to start with, although we should tune it based on feedback. | @@ -153,7 +153,7 @@ function draft_notify() {
function remove_instance() {
instance.destroy();
}
- setTimeout(remove_instance, 1500);
+ setTimeout(remove_instance, 3000);
}
export function update_draft(opts = {}) {
|
Update `TFTapasEmbeddings`
Update TFTapasEmbeddings | @@ -234,6 +234,16 @@ class TFTapasEmbeddings(tf.keras.layers.Layer):
position_ids = tf.math.minimum(self.max_position_embeddings - 1, position - first_position)
if input_ids is not None:
+ # Note: tf.gather, on which the embedding layer is based, won't check positive out of bound
+ # indices on GPU, returning zeros ins... |
Realign is_ganglia_enabled with upstream/develop
is_ganglia_enabled now relies on the stack parameters and
not config parameters | @@ -142,8 +142,10 @@ def create(args):
(event.get('ResourceType'), event.get('LogicalResourceId'),
event.get('ResourceStatusReason')))
logger.info('')
- outputs = cfn.describe_stacks(StackName=stack_name).get("Stacks")[0].get('Outputs', [])
- ganglia_enabled = is_ganglia_enabled(config.parameters)
+ result_stack = cfn.... |
Bugfix support str and byte streamed responses
Both Werkzeug and Quart Responses can stream strings, which need to be
converted to bytes before being sent to the ASGI server (using the
response charset). | @@ -119,19 +119,21 @@ class ASGIHTTPConnection:
if isinstance(response, WerkzeugResponse):
for data in response.response:
+ body = data.encode(response.charset) if isinstance(data, str) else data
await send(
cast(
HTTPResponseBodyEvent,
- {"type": "http.response.body", "body": data, "more_body": True},
+ {"type": "http... |
Update cscs.py
Remove leftovers from alternative config file with system Alps | @@ -980,7 +980,7 @@ site_configuration = {
{
'name': 'PrgEnv-aocc',
'target_systems': [
- 'alps', 'eiger', 'pilatus'
+ 'eiger', 'pilatus'
],
'modules': [
'PrgEnv-aocc'
@@ -989,7 +989,7 @@ site_configuration = {
{
'name': 'PrgEnv-cray',
'target_systems': [
- 'alps', 'eiger', 'pilatus'
+ 'eiger', 'pilatus'
],
'modules': ... |
Update changelog
last step before merging. | @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
+- Update smoke tests to count skipped & disabled tests as "pass". Also update the command line results from a TDVT run w... |
tenant: Do not disable TLS when enable_agent_mtls = False
The tenant should disable TLS only for the agent when
enable_agent_mtls=False, keeping the TLS enabled for other services. | @@ -111,20 +111,22 @@ class Tenant:
logger.warning(
"Warning: agent mTLS is currently disabled, keys will be sent in the clear! This should only be used for testing."
)
- else:
+
if not verify_server_cert:
logger.warning(
- "Warning: agent mTLS is enabled, but server certificate verification is disabled as 'trusted_ser... |
xfail the tag_sync test as well
In virtualized enviroments, kvmclock provides a slightly lower time resolution than the host default tsc and therefore this test can fail on fast hosts where sync() is not adding enough wait time. | @@ -66,7 +66,12 @@ def test_etag_sync(tmpdir):
new_etag = vdir.get_etag_from_file(fpath)
+ try:
assert old_etag != new_etag
+ except AssertionError:
+ pytest.xfail(
+ "Do we need to sleep?"
+ )
def test_etag_sleep(tmpdir, sleep_time):
|
ebd/ebuild.lib: drop unnecessary ORIG_VARS usage for variable exports
This is now covered by PKGCORE_BASH_VARS and the other function specific
appends to DONT_EXPORT_VARS. | # readonly. This limits users, but also helps to ensure that reloaded envs from older portages don't
# overwrite an internal ebd.sh function that has since changed.
-ORIG_VARS=( $(compgen -v) )
-
DONT_EXPORT_VARS=(
"${PKGCORE_BASH_VARS[@]}" BASH._* OLDPWD SANDBOX_.*
- ORIG_VARS "CCACHE.*" "DISTCC.*" SYNC DIR FEATURES
+... |
provision: Improve error messaging when attempting to use Ubuntu Trusty.
As part of dropping support, we add appropriate error messaging when a
user attempts to provision while using trusty. If the user is running
in Vagrant we append information on how to proceed. | @@ -128,6 +128,12 @@ codename = distro_info['DISTRIB_CODENAME']
family = distro_info['DISTRIB_FAMILY']
if not (vendor in SUPPORTED_PLATFORMS and codename in SUPPORTED_PLATFORMS[vendor]):
logging.critical("Unsupported platform: {} {}".format(vendor, codename))
+ if codename == 'trusty':
+ print()
+ print("Ubuntu Trusty ... |
[bugfix] Solve TypeError of RepeatingGenerator
A generator is not reversible. | @@ -2185,7 +2185,7 @@ def RepeatingGenerator(generator, key_func=lambda x: x, sleep_duration=60,
break
pywikibot.sleep(sleep_duration)
- yield from reversed(filtered_generator())
+ yield from reversed(list(filtered_generator()))
@deprecated_args(pageNumber='groupsize', step='groupsize', lookahead=None)
|
Python API: add docstring for Token.kind
TN: | @@ -452,6 +452,7 @@ class Token(ctypes.Structure):
@property
def kind(self):
+ ${py_doc('langkit.token_kind', 8)}
name = _token_kind_name(self._kind)
# The _token_kind_name wrapper is already supposed to handle exceptions
# so this should always return a non-null value.
|
Correct Arc by Sagitta.
Keyerror with start, end, sagitta value circular arc definition. | @@ -3557,7 +3557,7 @@ class Arc(PathSegment):
bulge = float(kwargs['bulge'])
sagitta = bulge * self.start.distance_to(self.end) / 2.0
elif 'sagitta' in kwargs:
- sagitta = float(kwargs['bulge'])
+ sagitta = float(kwargs['sagitta'])
if sagitta is not None:
control = Point.towards(self.start, self.end, 0.5)
angle = self.... |
Update README.md
mapping docker paths with spaces causes an error. using -v "$(pwd)":/scripts is more correct as per | @@ -76,7 +76,7 @@ Installing from Git is also supported (OS must have git installed).
Move to the local directory which contains your script(s) and run the container
-`docker run -it --rm --name pyez -v $PWD:/scripts juniper/pyez sh`
+`docker run -it --rm --name pyez -v "$(pwd)":/scripts juniper/pyez sh`
Your local scr... |
adopt: convert legacy grafana-server groupname early
This is a follow up on PR
cephadm-adopt.yml playbook is affected by the same bug
Closes: | invoking the playbook
when: ireallymeanit != 'yes'
+ - name: import_role ceph-defaults
+ import_role:
+ name: ceph-defaults
+
+ - name: check if a legacy grafana-server group exists
+ import_role:
+ name: ceph-facts
+ tasks_from: convert_grafana_server_group_name.yml
+ when: groups.get((grafana_server_group_name | defa... |
refactor: Extract out out root_dir and puppeteer_dir.
The puppeteer_dir will use used for passing in the path to save the
recording. | @@ -7,6 +7,9 @@ const puppeteer = require("puppeteer");
const test_credentials = require("../../var/puppeteer/test_credentials.js").test_credentials;
+const root_dir = path.resolve(__dirname, "../../");
+const puppeteer_dir = path.join(root_dir, "var/puppeteer");
+
class CommonUtils {
constructor() {
this.browser = nul... |
[tune] Deflake test_tune_restore.py
By switching to on_step_end and keeping track of the number of trials we avoid race conditions in this test suite. | @@ -169,15 +169,12 @@ class TuneFailResumeGridTest(unittest.TestCase):
class FailureInjectorCallback(Callback):
"""Adds random failure injection to the TrialExecutor."""
- def __init__(self, steps=20):
- self._step = 0
- self.steps = steps
-
- def on_trial_start(self, trials, **info):
- self._step += 1
- if self._step ... |
Enable text wrapping for comment text editor
This avoids expensive resizing of the editor pane. | @@ -585,6 +585,7 @@ Use -/= to move items up or down.</property>
<object class="GtkTextView" id="comment">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="wrap_mode">word</property>
</object>
</child>
</object>
|
minor fix in iterating values
ah yes, let me optimize these for the other functions | @@ -65,7 +65,7 @@ def entropy_shannon(signal, base=2):
if isinstance(signal, (np.ndarray, pd.DataFrame)) and signal.ndim > 1:
# n-dimensional
signal = _sanitize_multichannel(signal)
- info["Values"] = np.full(len(signal), np.nan) # Initialize empty vector of values
+ info["Values"] = np.full(signal.shape[1], np.nan) # ... |
Don't try to guess fixed "sections".
That would have way too many false positives. | @@ -114,5 +114,6 @@ if __name__ == '__main__':
for lang_code in lang_codes:
cfg = config.get_localized_config(lang_code)
+ if cfg.extract == 'snippet':
compute_fixed_snippets(cfg)
log.info('all done in %d seconds.' % (time.time() - start))
|
Host based ssh
* Add a toggle for using host-based authentication
Fixes
* Always load host keys
* Minor flake fixes
* Set `host_auth` attribute
This is required for `RepresentationMixin`. | @@ -10,6 +10,12 @@ from parsl.utils import RepresentationMixin
logger = logging.getLogger(__name__)
+class HostAuthSSHClient(paramiko.SSHClient):
+ def _auth(self, username, *args):
+ self._transport.auth_none(username)
+ return
+
+
class SSHChannel(Channel, RepresentationMixin):
''' SSH persistent channel. This enable... |
Do test discovery via unitttest discover
This will allow us to distinguish between test errors and test failures.
Also, define travis-test in terms of a target dependency, rather than
copying the target body. | -PYTEST_OPTS = --verbose
+UNITTEST_OPTS = --verbose
.PHONY: lint
lint:
@@ -46,18 +46,18 @@ api-docs:
sphinx-build-3 -b html api api/_build/html
dbus-tests:
- py.test-3 ${PYTEST_OPTS} ./tests/whitebox/integration
+ python3 -m unittest discover ${UNITTEST_OPTS} --top-level-directory ./tests/whitebox --start-directory ./t... |
save reader always after first ckpt beginning
fixes | @@ -83,20 +83,19 @@ def train_tensorflow(reader, train_data, test_data, dev_data, configuration: dic
def side_effect(metrics, prev_metric):
"""Returns: a state (in this case a metric) that is used as input for the next call"""
+ if prev_metric is None: # store whole reader only at beginning of training
+ reader.store(s... |
fix and simplify code logic
fix and simplify code logic | @@ -235,8 +235,8 @@ class ExecuteTaFuncWithQueue(AbstractTAFunc):
def get_splitter(self, D):
y = D.data['Y_train'].ravel()
train_size = 0.67
- if not self.resampling_strategy_args and self.resampling_strategy_args.get('train_size'):
- train_size = self.resampling_strategy_args.get('train_size')
+ if self.resampling_str... |
Redirect new-style type params to old-style type params in search
This allows users searching on new frontend to be able to switch
to the old frontend and then back seamlessly without losing their
search. | @@ -362,10 +362,16 @@ def search(request, tag_name=None):
extra_params = {'sort': {'newest': 'created'}}
else:
extra_params = None
+
fixed = fix_search_query(request.GET, extra_params=extra_params)
if fixed is not request.GET:
- return http.HttpResponsePermanentRedirect(urlparams(request.path,
- **fixed))
+ # We genera... |
refactor loss calculation
Now the loss calculation for 1D and 2D learners
is configurable via a parameter to their constructors. | @@ -40,7 +40,7 @@ def areas(ip):
return areas
-def _losses_per_triangle(ip):
+def _default_loss_per_triangle(ip):
devs = deviations(ip)
area_per_triangle = areas(ip)
losses = np.sum([dev * area_per_triangle for dev in devs], axis=0)
@@ -58,6 +58,13 @@ class Learner2D(BaseLearner):
bounds : list of 2-tuples
A list ``[(a... |
test_retention: Delete redundant get_user_profile_by_email call.
This does absolutely nothing and must be in the code accidentally. | @@ -34,7 +34,6 @@ from zerver.models import (
get_realm,
get_stream,
get_system_bot,
- get_user_profile_by_email,
)
# Class with helper functions useful for testing archiving of reactions:
@@ -134,7 +133,6 @@ class ArchiveMessagesTestingBase(RetentionTestingBase):
def _send_cross_realm_personal_message(self) -> int:
# ... |
The incoming parameters is not effective
The image_driver parameter is not used,
and it will not take effect when call
the function with image_driver..
Closes-Bug: | @@ -124,15 +124,18 @@ def upload_image_data(context, image, image_tag, image_data,
return img
-def delete_image(context, img_id, image_driver):
+def delete_image(context, img_id, image_driver=None):
+ if image_driver:
+ image_driver_list = [image_driver.lower()]
+ else:
image_driver_list = CONF.image_driver_list
- for ... |
Space out printing garbled characters [ci skip]
These sometimes run together, so stick a little spacing in there so you
can see what's happening a little better | @@ -24,7 +24,7 @@ class Command(BaseCommand):
old_source = form.source
new_source = fix_form(old_source)
if old_source != new_source:
- if input("commit the above changes?\n[y/N] ") == 'y':
+ if input("\n\ncommit the above changes?\n[y/N] ") == 'y':
form.source = new_source
app.save()
print("saved")
@@ -66,7 +66,7 @@ d... |
Check that '' is in sys.path in insight:main
Make sure the the current directory is in the python path to recognize modules in the current dir. | @@ -2,6 +2,7 @@ from __future__ import print_function
import logging
import pkgutil
import os
+import sys
import yaml
from .core import Scannable, LogFileOutput, Parser, IniConfigFile # noqa: F401
from .core import FileListing, LegacyItemAccess, SysconfigOptions # noqa: F401
@@ -250,6 +251,8 @@ def run(component=None, ... |
Update stale.yml
More lenient closing times. | @@ -22,19 +22,19 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: This issue is stale because it has been open 30 days
with no activity. Remove the stale label or add a comment, or this issue
- will be closed in 5 days. You can always re-open if you still feel this
+ will be closed in 15 days. You ... |
Core & Internals: directly fetch tokens from db
columns() doesn't accept strings (column names) anymore.
It must be given a column object. However, here the code
can be simplified to avoid using columns all together. | @@ -496,15 +496,11 @@ def __delete_expired_tokens_account(account, *, session: "Session"):
:param account: Account to delete expired tokens.
:param session: The database session in use.
"""
- stmt_select = select(models.Token) \
+ stmt_select = select(models.Token.token) \
.where(and_(models.Token.expired_at < datetime... |
Fix hardsigmoid/hardswish for proper device dispatch.
Summary:
make `hardsigmoid_backward` use tensoriterator but that can be done only after proper device dispatch.
Pull Request resolved: | - func: hardsigmoid_backward(Tensor grad_output, Tensor self) -> Tensor
use_c10_dispatcher: full
python_module: nn
+ dispatch:
+ CPU: hardsigmoid_backward
+ CUDA: hardsigmoid_backward
- func: hardtanh.out(Tensor self, Scalar min_val=-1, Scalar max_val=1, *, Tensor(a!) out) -> Tensor(a!)
python_module: nn
- func: hardsw... |
Consolidate bit_count / popCount methods
Fixes | __all__ = ['popCount']
-def popCount(v):
- """Return number of 1 bits (population count) of an integer.
+try:
+ bit_count = int.bit_count
+except AttributeError:
+ def bit_count(v):
+ return bin(v).count('1')
- If the integer is negative, the number of 1 bits in the
- twos-complement representation of the integer is re... |
test: Split IAM template tests with paramtrize
See also: | """Test IAM Policy templates are valid JSON."""
+import json
+
import jinja2
+import pytest
from foremast.iam.construct_policy import render_policy_template
from foremast.utils.templates import LOCAL_TEMPLATES
@@ -18,6 +21,11 @@ def iam_templates():
yield iam_template_name
+@pytest.mark.parametrize(argnames='template_n... |
Fix UBSAN non-security crash type list
The UBSAN_CRASH_TYPES_NON_SECURITY and UBSAN_CRASH_TYPES_SECURITY
lists of crash_analyzer have overlapping elements. Since during
the analyzis, crash_type is compared to the security list first,
the common elements can be removed from the non-security list. | @@ -74,13 +74,11 @@ UBSAN_CRASH_TYPES_NON_SECURITY = [
'Integer-overflow',
'Invalid-bool-value',
'Invalid-builtin-use',
- 'Incorrect-function-pointer-type',
'Invalid-enum-value',
'Invalid-null-argument',
'Invalid-null-return',
'Misaligned-address',
'No-return-value',
- 'Non-positive-vla-bound-value',
'Pointer-overflow'... |
Remove out-of-date TODO.
Summary: Pull Request resolved: | @@ -41,7 +41,7 @@ inline void THTensor_maybe_zero_dim(THTensor *tensor, bool condition_when_zero_d
}
// [NOTE: nDimension vs nDimensionLegacyNoScalars vs nDimensionLegacyAll]
-// nDimension corresponds to the "true" ATen dimension. TODO: implement.
+// nDimension corresponds to the "true" ATen dimension.
// nDimensionL... |
conda_forge_yml.rst: Add `remote_ci_setup` option
Users now have the option to override the `conda-forge-ci-setup`
package by installing it from a remote channel. | @@ -41,6 +41,7 @@ Top-level fields
* osx
* provider
* recipe_dir
+* remote_ci_setup
* skip_render
* templates
* test_on_native_only
@@ -318,6 +319,16 @@ The relative path to the recipe directory. The default is:
recipe_dir: recipe
+remote_ci_setup
+---------------
+This option can be used to override the default ``cond... |
docs / minor change to note
minor change to markdown | @@ -34,7 +34,8 @@ Transactions from Hummingbot are normal transactions conducted on exchanges; the
Hummingbot has the ability to send error logs to us.
-!!! note Private keys and API keys are stored locally for the operation of the Hummingbot client only. At no point will private or API keys be shared to CoinAlpha or b... |
Add check for dependent packages of tuners before starting restful server
* add module info for launcher check
* update launcher.py
Add packages check before start restful server.
* check sub-key
* modify mistype
* delete non-tuner in constants/ModuleName
* Delete ModuleName to prevent double maintain
* only catch Modu... | import json
import os
+import sys
import shutil
import string
-from subprocess import Popen, PIPE, call, check_output
+from subprocess import Popen, PIPE, call, check_output, check_call
import tempfile
+from nni.constants import ModuleName
from nni_annotation import *
from .launcher_utils import validate_all_content
fr... |
Save scheme/authority
Since we go through the trouble of parsing it, might as well keep em.
Especially if we want to be a "proxy" these might be important. | @@ -748,6 +748,9 @@ class HTTPRequest(object):
return False
path = b'%2F'.join(atoms)
+ if scheme is not EMPTY:
+ self.scheme = scheme
+ self.authority = authority
self.path = path
# Note that, like wsgiref and most other HTTP servers,
|
Move p2pd installation logics to install_p2pd.sh
To remove the complexity in circleci.yml | @@ -72,7 +72,7 @@ geth_steps: &geth_steps
sudo apt-get install -y build-essential;
python -m geth.install $GETH_VERSION;
fi
- sudo ln -s /home/circleci/.py-geth/geth-$GETH_VERSION/bin/geth /usr/local/bin/geth
+ sudo ln -s $GETH_BINARY /usr/local/bin/geth
geth version
- run:
name: run tox
@@ -87,45 +87,19 @@ geth_steps:... |
refactor: Show versions from Installed Applications to show "real"
versions synced with the site database | @@ -223,30 +223,31 @@ def install_app(context, apps):
@click.command('list-apps')
-@click.option('--only-apps', is_flag=True)
@pass_context
-def list_apps(context, only_apps):
+def list_apps(context):
"List apps in site"
- import click
- titled = False
-
- if len(context.sites) > 1:
- titled = True
for site in context.... |
CustomPageXML parsing: allow ":" in value
In situation where Regions have `:`, this would yield an error, such as the Segmonto syntax:
```xml
<TextRegion id="region_1601885451429_143" custom="structure {type:NumberingZone:page;}">
```
This fixes this CustomPAGE way to do stuff. | @@ -106,8 +106,8 @@ def parse_page(filename):
tag_vals = {}
vals = [val.strip() for val in vals.split(';') if val.strip()]
for val in vals:
- key, val = val.split(':')
- tag_vals[key] = val
+ key, *val = val.split(':')
+ tag_vals[key] = ":".join(val)
o[tag.strip()] = tag_vals
return o
|
BUG: Fix nan error in degenerate euler axes
For certain gimbal locked cases, it appears that certain entries in
`dcm_transformed` are greater than unit norm. That results in nan values
when arccos function us used. | @@ -57,6 +57,11 @@ def _compute_euler_from_dcm(dcm, seq, extrinsic=False):
# Step 4
angles = np.empty((num_rotations, 3))
+ # Ensure less than unit norm
+ positive_unity = dcm_transformed[:, 2, 2] > 1
+ negative_unity = dcm_transformed[:, 2, 2] < -1
+ dcm_transformed[positive_unity, 2, 2] = 1.0
+ dcm_transformed[negati... |
Remove excess indentation in broadcast alert
In response to: [^1].
[^1]: | +import inspect
from datetime import datetime
from flask import current_app
@@ -69,7 +70,7 @@ def _create_p1_zendesk_alert(broadcast_message):
if broadcast_message.status != BroadcastStatusType.BROADCASTING:
return
- message = f"""
+ message = inspect.cleandoc(f"""
Broadcast Sent
https://www.notifications.service.gov.u... |
Adjusted unit tests for stride_tricks
Fixed coverage of Raise-Error functions | @@ -13,8 +13,11 @@ class TestStrideTricks(unittest.TestCase):
# invalid value ranges
with self.assertRaises(ValueError):
ht.core.stride_tricks.broadcast_shape((5, 4), (5,))
+ with self.assertRaises(ValueError):
ht.core.stride_tricks.broadcast_shape((5, 4), (2, 3))
+ with self.assertRaises(ValueError):
ht.core.stride_tr... |
Adds launch bounds for CTC loss kernel
Summary:
Fixes
Pull Request resolved: | @@ -254,7 +254,9 @@ std::tuple<Tensor, Tensor> ctc_loss_gpu_template(const Tensor& log_probs, const
// The second (backward) half of the forward backward algorithm, (10) and (11). This is parallel to the
// alpha kernel above. (As mentioned above, it might make sense do the calculation in the alpha kernel.)
template<ty... |
Use is_connected() instead of _connected in checks
Was doing a falsy check on an Event object instead of using the (unused) is_connected() function. | @@ -261,7 +261,7 @@ class VoiceClient:
Disconnects this voice client from voice.
"""
- if not force and not self._connected.is_set():
+ if not force and not self.is_connected():
return
self.stop()
@@ -348,7 +348,7 @@ class VoiceClient:
source is not a :class:`AudioSource` or after is not a callable.
"""
- if not self._... |
Update CHANGELOG.md
Added information about | ## Other changes
- [Rule Test] Fix issue related to --start/--end/--days params - [#424](https://github.com/jertel/elastalert2/pull/424), [#433](https://github.com/jertel/elastalert2/pull/433) - @thican
+- [TheHive] Reduce risk of sourceRef collision for Hive Alerts by using full UUID -[#513](https://github.com/jertel/... |
Update CONTRIBUTING.md
Change Reddit to Google Groups Mailing List | @@ -8,10 +8,9 @@ If you encounter any issues installing or using NetBox, try one of the following
Join the #netbox channel on [Freenode IRC](https://freenode.net/). You can connect to Freenode at irc.freenode.net using
an IRC client, or you can use their [webchat client](https://webchat.freenode.net/).
-### Reddit
+###... |
Fix versionadded reference for new eauth token modularity
The version should be `Oxygen`, not `2017.7.2`.
Refs | @@ -529,7 +529,7 @@ def sync_roster(saltenv='base', extmod_whitelist=None, extmod_blacklist=None):
def sync_eauth_tokens(saltenv='base', extmod_whitelist=None, extmod_blacklist=None):
'''
- .. versionadded:: 2017.7.2
+ .. versionadded:: Oxygen
Sync eauth token modules from ``salt://_tokens`` to the master
|
update test on cli gui search
one less package in local registry because we removed p2p_noise | @@ -141,7 +141,7 @@ def test_real_search():
assert response_list.status_code == 200
data = json.loads(response_list.get_data(as_text=True))
- assert len(data) == 13, data
+ assert len(data) == 12, data
i = 0
assert data[i]["id"] == "fetchai/gym:0.1.0"
|
Upgrade django-allow-cidr to 0.3.0
Handles host header values with ports. | @@ -462,9 +462,9 @@ funcsigs==1.0.2 \
--hash=sha256:a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50
tzlocal==1.5.1 \
--hash=sha256:4ebeb848845ac898da6519b9b31879cf13b6626f7184c496037b818e238f2c4e
-django-allow-cidr==0.1.0 \
- --hash=sha256:94b436b7ebf0bba9c1c4bddc28ada13aa86baa692c5c10c3012837bb8cf44a0... |
undo some of my changes
the case i was trying to cover was already covered but didn't work due
to a bug
fixing the bugs next commit | @@ -294,9 +294,6 @@ class MeasurementControl(Instrument):
return isinstance(obj, type) and issubclass(obj, test_obj)
self.save_optimization_settings()
self.adaptive_function = self.af_pars.pop('adaptive_function')
- # Not sure where this line belongs, but for now is only used here
- self.expects_scalar = is_subclass(se... |
Fix pybind11 warnings in python_rpc_handler.cpp
Summary:
Pull Request resolved:
The warnings related to usage of the deprecated != operator. Instead
of checking the member field on every function call, we can check it
once, on construction of PythonRpcHandler.
Test Plan: Imported from OSS | @@ -4,13 +4,27 @@ namespace torch {
namespace distributed {
namespace rpc {
+namespace {
+
+py::object getFunction(const py::object& module, const char* name) {
+ py::object fn = module.attr(name);
+ TORCH_CHECK(
+ py::isinstance<py::function>(fn),
+ "attribute ",
+ name,
+ " is not a function");
+ return fn;
+}
+
+} /... |
(buildkite 2/n) Update Buildkite medium queue
Summary:
Moves us to the new Buildkite queues again, now that AWS has increased our EC2 instance quotas in us-west-2
Depends on D5770
Test Plan: buildkite
Reviewers: dgibson, alangenfeld | @@ -24,12 +24,8 @@ def wait_step():
class BuildkiteQueue(Enum):
- """These are the Buildkite CloudFormation queues that we use. All queues with "-p" suffix are
- provisioned by Pulumi.
- """
-
DOCKER = "docker-p"
- MEDIUM = "medium-v4-3-2"
+ MEDIUM = "buildkite-medium-v5-0-1"
WINDOWS = "windows-medium"
@classmethod
@@ ... |
Prepare 2.5.2rc2
[ci skip-rust] | See https://www.pantsbuild.org/v2.5/docs/release-notes-2-5 for an overview of the changes in this release series.
+## 2.5.2rc2 (Aug 06, 2021)
+
+### Bug fixes
+
+* Resolve plugins using the PEX --python option. (cherrypick of #12500) ([#12505](https://github.com/pantsbuild/pants/pull/12505))
+
## 2.5.2rc1 (Jul 28, 2021... |
Add missing TORCH_CUDA_API annotation to throw_nccl_error
Summary:
Pull Request resolved:
Test Plan: Imported from OSS | @@ -19,7 +19,7 @@ namespace nccl {
// Don't use them outside of these files.
namespace detail {
-void throw_nccl_error(ncclResult_t status);
+TORCH_CUDA_API void throw_nccl_error(ncclResult_t status);
static inline void NCCL_CHECK(ncclResult_t status) {
if (status != ncclSuccess) {
|
feat(device): z2m support for RDM001 (Philips)
related to | @@ -115,6 +115,18 @@ class HueSmartButtonLightController(LightController):
class Philips929003017102LightController(LightController):
+ def get_z2m_actions_mapping(self) -> DefaultActionsMapping:
+ return {
+ "left_press": Light.TOGGLE,
+ # "left_press_release": "",
+ "left_hold": Light.HOLD_BRIGHTNESS_TOGGLE,
+ "left_... |
Do not render anything while training in Colab
Fix | "\n",
"env = load_environment(env_config)\n",
"agent = load_agent(agent_config, env)\n",
- "evaluation = Evaluation(env, agent, num_episodes=3000, display_env=False)\n",
+ "evaluation = Evaluation(env, agent, num_episodes=3000, display_env=False, display_agent=False)\n",
"print(f\"Ready to train {agent} on {env}\")"
],... |
Fix --selective-upgrade compatibility with Python 2
`list.copy()` is equivalent to `list[:]`, but the former is only available in Python 3. | @@ -1840,7 +1840,7 @@ def do_install(
# Support for --selective-upgrade.
if selective_upgrade:
- for i, package_name in enumerate(package_names.copy()):
+ for i, package_name in enumerate(package_names[:]):
section = project.packages if not dev else project.dev_packages
package = convert_deps_from_pip(package_name)
pac... |
Fix test that broke on prerelease builds
The page I was using for the test apparently was updated to use
lightning components, when the test requires non-lightning components. | @@ -81,25 +81,26 @@ Non-lightning based form - checkbox
... e.g.: <input type="checkbox">
[Setup] Run keywords
- ... Go to page Home ServiceCrewMember
+ ... Go to page Home Campaign
... AND Click Object Button New
- ... AND Wait for modal New ServiceCrewMember
+ ... AND Wait for modal New Campaign
[Teardown] Click moda... |
ui: Hide loading indicators for non-existant narrows.
We were still displaying the loading spinner
even after displaying the error text, which
was confusing as we do not try to fetch again.
This fixes it. | @@ -248,6 +248,7 @@ exports.load_messages = function (opts) {
// retry or display a connection error.
//
// FIXME: Warn the user when this has happened?
+ message_scroll.hide_indicators();
const data = {
messages: [],
};
|
Tweaks to robot.rst after a review
Robot command-line options => Robot CLI options | @@ -683,8 +683,8 @@ The Robot Framework command-line test runner supports more than 50
<http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#command-line-options-for-test-execution>`_.
To make the ``robot`` task simpler to use, we've only exposed a few of the
command-line options at the task lev... |
Update android_bankbot.txt
Update for Reference section | @@ -86,8 +86,10 @@ vodafone5gapps.com
http://218.187.103.198
27.255.64.95:8080
-# Reference: https://twitter.com/malwrhunterteam/status/1252287608274722817
+# Reference: https://twitter.com/malwrhunterteam/status/1252287608274722817 (# Android variation)
# Reference: https://www.virustotal.com/gui/file/10cf5bdab9521966... |
llvm, composition: Do not switch to 'bin_execute = True' for nested compositions
'True' allows graceful fallback which is not what we want when using 'LLVM' | @@ -8905,8 +8905,6 @@ class Composition(Composition_Base, metaclass=ComponentsMeta):
# Compile all mechanism wrappers
for m in mechanisms:
_comp_ex._set_bin_node(m)
-
- bin_execute = True
except Exception as e:
if bin_execute is not True:
raise e from None
|
Review and update of component
removed 'uniform' from lognormal, changed assertion to number_of_nodes,
changed soil depth to 0.005 if negative. | @@ -314,7 +314,7 @@ class LandslideProbability(Component):
size=self.n)
self.Re /= 1000. # Convert mm to m
# Lognormal Distribution - Uniform in space
- elif self.groundwater__recharge_distribution == 'lognormal_uniform':
+ elif self.groundwater__recharge_distribution == 'lognormal':
assert (groundwater__recharge_mean ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.