message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
ENH: app.io.write_db now accepts just python data structures
[NEW] built-in types that can be converted to json are allowed | @@ -505,8 +505,11 @@ class write_db(_checkpointable):
def write(self, data, identifier=None):
if identifier is None:
identifier = self._make_output_identifier(data)
- out = data.to_json()
- stored = self.data_store.write(identifier, out)
+ try:
+ data = data.to_json()
+ except AttributeError:
+ data = json.dumps(data)
... |
Track global failures flag for YAML validations
Closes-bug: | @@ -831,6 +831,7 @@ def validate(filename, param_map):
},
...
]}
+ Returns a global retval that indicates any failures had been in the check progress.
"""
if args.quiet < 1:
print('Validating %s' % filename)
@@ -867,23 +868,23 @@ def validate(filename, param_map):
if VALIDATE_PUPPET_OVERRIDE.get(filename, False) or (
f... |
Remove future plan from portgroup document
This commit removes "future plan" for portgroup to avoid
misunderstanding. | @@ -16,9 +16,7 @@ configured on the switch have to correspond to the mode and properties that
will be configured on the ironic side, as bonding mode and properties may be
named differently on your switch, or have possible values different from the
ones described in `kernel documentation on bonding`_. Please refer to yo... |
Use instance attribute for terminators
If the `terminators` is the default, `None`, the function fails because the local variable was not updated. | @@ -163,7 +163,7 @@ class StatementParser:
invalid_command_chars = []
invalid_command_chars.extend(constants.QUOTES)
invalid_command_chars.extend(constants.REDIRECTION_CHARS)
- invalid_command_chars.extend(terminators)
+ invalid_command_chars.extend(self.terminators)
# escape each item so it will for sure get treated a... |
AutoPropertiesDSL: strip :param:-like directives from user documentation
TN: | @@ -17,6 +17,18 @@ class AutoPropertiesDSL(docutils.parsers.rst.Directive):
Directive to generate a definition list for all DSL constructors.
"""
+ def _prepare_docstring(self, docstring):
+ """
+ Remove anything that appears after a line that starts with ":". This
+ makes it possible to remove directives like ":param ... |
Reference logo by full URL
Apparently, readthedocs.io is unable to use an automatically generated link to
the logo if we use a relative reference. Using the full URL should work for both
GH and readthedocs.io. | HeAT - Helmholtz Analytics Toolkit
==================================
-
+
HeAT is a distributed tensor framework for high performance data analytics.
|
Handle arrays filled with identical values
Avoid possible repeated function call | @@ -82,7 +82,7 @@ def analyze(problem, X, Y, num_resamples=10,
except np.linalg.LinAlgError as e:
msg = "Singular matrix detected\n"
msg += "This may be due to the sample size ({}) being too small\n".format(Y.size)
- msg += "If this is not the case, please raise an issue with the\n"
+ msg += "If this is not the case, c... |
Fixed a typo in CubicSpline docstring
Original text in the note section of CubicSpline docstring:
"Parameters `bc_type` and ``interpolate`` work independently"
Note that CubicSpline does not have a parameter `interpolate`, but `extrapolate`. It should be a typo? | @@ -548,7 +548,7 @@ class CubicSpline(CubicHermiteSpline):
Notes
-----
- Parameters `bc_type` and ``interpolate`` work independently, i.e. the
+ Parameters `bc_type` and ``extrapolate`` work independently, i.e. the
former controls only construction of a spline, and the latter only
evaluation.
|
fix: Set owner & creation if new Document
via | @@ -396,6 +396,7 @@ class Document(BaseDocument):
"parenttype": self.doctype,
"parentfield": fieldname
})
+
def get_doc_before_save(self):
return getattr(self, '_doc_before_save', None)
@@ -468,9 +469,11 @@ class Document(BaseDocument):
self._original_modified = self.modified
self.modified = now()
self.modified_by = fr... |
Fix tests which now rely on the "view" tables
Shouldn't the same tables that exist in production exist everywhere in
our tests? | @@ -7,6 +7,7 @@ from pyquery import PyQuery as pq
from django.conf import settings
from django.core import mail
+from django.db import connection
from django.http import QueryDict
from django.test import TestCase
@@ -340,6 +341,15 @@ class TestFrontendHomepageViews(TestCase):
category='prescribing',
current_at='2015-09... |
fix: remove tab \t and newlines \n from start of query and remove from middle
# Conflicts:
# frappe/database/database.py | @@ -116,8 +116,14 @@ class Database(object):
"""
query = str(query)
+<<<<<<< HEAD
if not run:
return query
+=======
+
+ # remove \n \t from start of query and replace them with space anywhere in middle
+ query = re.sub(r'\s', ' ', query).lstrip()
+>>>>>>> ac5effc7dd (fix: remove tab \t and newlines \n from start of que... |
Update data export for new Heroku CLI
heroku pg:backups capture
vs.
heroku pg:backups:capture | @@ -614,13 +614,22 @@ def dump_database(id):
os.makedirs(dump_dir)
try:
- subprocess.check_call([
+ FNULL = open(os.devnull, 'w')
+ subprocess.call([
"heroku",
"pg:backups",
"capture"
"--app",
app_name(id)
- ])
+ ], stdout=FNULL, stderr=FNULL)
+
+ subprocess.call([ # for more recent versions of Heroku CLI.
+ "heroku",
... |
Fix a system test TODO
This should prevent the (as of yet, unexperienced) error case where
the API deletes the acked messages before we have a chance to seek
to them. | @@ -360,7 +360,8 @@ class TestPubsub(unittest.TestCase):
self.to_delete.append(topic)
SUBSCRIPTION_NAME = 'subscribing-to-seek' + unique_resource_id('-')
- subscription = topic.subscription(SUBSCRIPTION_NAME)
+ subscription = topic.subscription(
+ SUBSCRIPTION_NAME, retain_acked_messages=True)
self.assertFalse(subscrip... |
Update cli messages module
Add new error messages.
Change 'TestRun.fail' to 'TestRun.LOGGER.error'. | @@ -25,10 +25,23 @@ stop_cache_incomplete = [
r"Cache is in incomplete state - at least one core is inactive"
]
+add_cached_core = [
+ r"Error while adding core device to cache instance \d+",
+ r"Core device \'/dev/\S+\' is already cached\."
+]
+
+remove_mounted_core = [
+ r"Can\'t remove core \d+ from cache \d+\. Devi... |
Fix
Wrong cache call for objects parented to bones | @@ -225,7 +225,7 @@ def __gather_children(blender_object, blender_scene, export_settings):
parent_joint = find_parent_joint(root_joints, child.parent_bone)
if not parent_joint:
continue
- child_node = gather_node(child, None, None, None, export_settings)
+ child_node = gather_node(child, None, blender_scene, None, expo... |
Match: replace complex variables fiddling with SavedExpr/SequenceExpr
TN: | @@ -10,8 +10,8 @@ from langkit.diagnostics import Severity, check_source_language
from langkit.expressions import (
AbstractExpression, AbstractVariable, BasicExpr, BindingScope,
ComputingExpr, Let, NullCheckExpr, NullExpr, PropertyDef,
- ResolvedExpression, UnreachableExpr, attr_call, attr_expr, construct,
- render
+ ... |
Remove check for list type
minorminer has already been changed to always return dicts | @@ -182,10 +182,6 @@ class EmbeddingComposite(dimod.Sampler, dimod.Composite):
if bqm and not embedding:
raise ValueError("no embedding found")
- # this should change in later versions
- if isinstance(embedding, list):
- embedding = dict(enumerate(embedding))
-
bqm_embedded = dimod.embed_bqm(bqm, embedding, target_adja... |
feat: triggering a skill with alexa media player
Final code for triggering a skill with alexa media player | @@ -1110,7 +1110,9 @@ class AlexaClient(MediaPlayerDevice):
elif media_type == "skill":
await self.alexa_api.run_skill(
media_id,
- queue_delay=0,
+ queue_delay=self.hass.data[DATA_ALEXAMEDIA]["accounts"][self.email][
+ "options"
+ ][CONF_QUEUE_DELAY],
)
else:
await self.alexa_api.play_music(
|
streams-modal: Fix styling around stream accessibility option.
This fixes the faulty spacing around the various icons in
stream accessibility option under the create new stream modal. This
regression was introduced in 7e71bf. | @@ -584,13 +584,13 @@ form#add_new_subscription {
margin-bottom: 20px;
}
-.stream-creation-body #make-invite-only label span.icon-vector-globe {
+.stream-creation-body #make-invite-only label span.fa-globe {
margin-left: 14px;
margin-right: 10px;
}
-.stream-creation-body #make-invite-only label span.icon-vector-lock {
... |
Retry dialing a peer if the connection is refused
Employs exponential backoff to schedule the retries | import asyncio
+import random
from typing import (
Dict,
Iterable,
@@ -212,6 +213,8 @@ class PeerPool:
def get_best_head_slot_peer(self) -> Peer:
return self.get_best("head_slot")
+DIAL_RETRY_COUNT = 10
+
class Node(BaseService):
@@ -333,6 +336,20 @@ class Node(BaseService):
)
)
+ async def dial_peer_with_retries(self,... |
Fix documentation of MySQLPageGenerator
The comma made the query invalid. Also fix grammar. | @@ -2754,7 +2754,7 @@ def MySQLPageGenerator(query, site=None, verbose=None):
SELECT
page_namespace,
- page_title,
+ page_title
FROM page
WHERE page_namespace = 0;
@@ -2766,7 +2766,7 @@ def MySQLPageGenerator(query, site=None, verbose=None):
@param verbose: if True, print query to be executed;
if None, config.verbose_o... |
help: Add "Edit a custom profile field" section.
Adds a section on editing to the Custom profile fields help article.
Fixes part of | @@ -28,6 +28,19 @@ methods][authentication-production] documentation for details.
{end_tabs}
+## Edit a custom profile field
+
+{start_tabs}
+
+{settings_tab|profile-field-settings}
+
+1. In the **Actions** column, click the **pencil** (<i class="fa fa-pencil"></i>)
+ icon for the profile field you want to edit.
+
+1. ... |
simplify InRange based on intbounds
This patch simplifies `InRange` to its argument if the bounds of the argument
imply that `InRange` is a noop. | @@ -3276,6 +3276,12 @@ class InRange(Array):
assert index.size == 0 or 0 <= index.min() and index.max() < length
return index
+ def _simplified(self):
+ lower_length, upper_length = self.length._intbounds
+ lower_index, upper_index = self.index._intbounds
+ if 0 <= lower_index <= upper_index < lower_length:
+ return se... |
"FakeDeltaGenerator" and "MockQueue" are old test utilities that are no longer used.
Remove them! | @@ -24,7 +24,6 @@ from streamlit.delta_generator import DeltaGenerator
from streamlit.cursor import LockedCursor, make_delta_path
from streamlit.errors import DuplicateWidgetID
from streamlit.errors import StreamlitAPIException
-from streamlit.proto.Delta_pb2 import Delta
from streamlit.proto.Element_pb2 import Element... |
[doc] enhance admin/configuration/api.rst
enhance doc including remove 'nova-api' daemon which is deprecated
to use wsgi instead, and added some operations for password
response. | Compute API configuration
=========================
-The Compute API, run by the ``nova-api`` daemon, is the component of OpenStack
-Compute that receives and responds to user requests, whether they be direct API
-calls, or via the CLI tools or dashboard.
+The Compute API, is the component of OpenStack Compute that rec... |
Refactor SendKeysTests.setUp()
Use Application.start() consistently across linux/windows platforms | @@ -41,11 +41,11 @@ import unittest
import subprocess
import time
sys.path.append(".")
+from pywinauto.application import Application
if sys.platform == 'win32':
from pywinauto.keyboard import send_keys, parse_keys, KeySequenceError
from pywinauto.keyboard import KeyAction, VirtualKeyAction, PauseAction
from pywinauto.... |
Partial fix for github issue
this fixes an error message when canceling the Save dialog for Cuts
plugin under Qt5. | @@ -1002,32 +1002,28 @@ class Cuts(GingaPlugin.LocalPlugin):
target = Widgets.SaveDialog(
title='Save {0} data'.format(mode)).get_path()
+ if isinstance(target, tuple):
+ # is this always a tuple?
+ filename = target[0]
+ if filename == '':
+ # user canceled dialog
+ return
+ else:
+ filename = target
+
# Save cancelle... |
cephadm-adopt: set application on ganesha pool
Set the nfs application to the ganesha pool.
Closes: | ceph_pool:
name: "{{ nfs_ganesha_export_pool_name | default('nfs-ganesha') }}"
cluster: "{{ cluster }}"
+ application: nfs
delegate_to: "{{ groups[mon_group_name][0] }}"
run_once: true
environment:
|
Blacklist sphinxcontrib-bibtex v2.1.0
See mcmtroffaes/sphinxcontrib-bibtex#221 | @@ -52,7 +52,7 @@ plot =
matplotlib!=2.1.1
interactive = ipykernel
docs = sphinx>=1.6.7,!=2.1.0,!=3.2.0
- sphinxcontrib-bibtex
+ sphinxcontrib-bibtex!=2.1.0
sphinx_rtd_theme>=0.2.4
tests = pytest>=4.3
hypothesis
|
Bugfix: Fix out of bounds error for getting z notes
Fixes this out of bounds error by reducing the index number by 1 when
the index produced by searchsorted is equal to the last index of
t_instruments | @@ -62,6 +62,10 @@ def get_z_notes(start_times, z_instruments, t_instruments):
z_notes = []
for t in start_times:
idx = np.searchsorted(t_instruments, t, side='left') - 1
+
+ if idx.item() == t_instruments.size - 1:
+ idx -= 1
+
t_left = t_instruments[idx]
t_right = t_instruments[idx + 1]
interp = (t - t_left) / (t_rig... |
Remove stale test code line
This line was producing a fake error message when trying to load user modules
with the `-m` option. | @@ -497,7 +497,6 @@ def main():
for m in options.user_modules:
try:
rt.modules_system.load_module(m, force=True)
- raise EnvironError("test")
except EnvironError as e:
printer.warning("could not load module '%s' correctly: "
"Skipping..." % m)
|
Refactor get_relevant_case_updates_from_form_json
Add type hints to show why we can remove an unnecessary assertion.
Invert an `if` clause and use `continue`. | +from typing import List, Optional
+
import attr
from casexml.apps.case.xform import extract_case_blocks
@@ -18,19 +20,24 @@ class RepeaterResponse:
retry = attr.ib(default=True)
-def get_relevant_case_updates_from_form_json(domain, form_json, case_types, extra_fields,
- form_question_values=None):
+def get_relevant_ca... |
Make spatial depthwise convolution warp size aware
Summary:
Use new macro and remove hard-coded path.
Pull Request resolved: | #include <THCUNN/SharedMem.cuh>
#include <THCUNN/common.h>
#include <algorithm>
+#include <c10/macros/Macros.h>
-const int WARP_SIZE = 32;
// Crude benchmarks suggest 256 is better than 512 and 1024
// TODO: Autotune/use better heuristics, improve speed more.
const int MAX_BLOCK_SIZE = 256;
static int getGradParamsNumT... |
Fixed __len__, __setitem__ and __iter__ function of sequence with default value
Now, sequence emulates __len__ and __iter__ behaviour of list without
actually implement a list. Highest index is know stored in case a list
is changed at later point. Then, list is initialized with highest known
index. | @@ -7,6 +7,7 @@ __copyright__ = "oemof developer group"
__license__ = "GPLv3"
from collections import abc, UserList
+from itertools import repeat
def sequence(sequence_or_scalar):
@@ -66,9 +67,11 @@ class _Sequence(UserList):
def __init__(self, *args, **kwargs):
self.default = kwargs["default"]
self.default_changed = F... |
[pytorch] Minor: boilerplate to propagate errors in request_callback_impl
Summary:
Pull Request resolved:
Out of caution, avoid assuming that there's never a failure in a couple of
request_calback_impl case handlers, but rather propagate the error.
ghstack-source-id:
Test Plan: buck test mode/dev-nosan caffe2/test/... | @@ -143,10 +143,14 @@ std::shared_ptr<FutureMessage> RequestCallbackImpl::processRpc(
whenValueSet->addCallback(
[responseFuture, messageId, rref](
const rpc::Message& /* unused */,
- const c10::optional<utils::FutureError>& /* unused */) {
+ const c10::optional<utils::FutureError>& error) {
+ if (!error) {
Message m =... |
Change flite command to a variable for Codacy
Changing the ["flite","-lv"] command being passed to subprocess
into a variable to see if that makes Codacy happier. | @@ -1226,8 +1226,9 @@ def get_tts_engine(profile):
)
elif(get_profile_var(profile, ["tts_engine"]) == "flite-tts"):
try:
+ flite_cmd = ['flite', '-lv']
voices = subprocess.check_output(
- ['flite', '-lv'],
+ flite_cmd,
shell=False
).decode('utf-8').split(" ")[2:-1]
print(
|
docs: Replace A icon with help in format using markdown.
In the format-your-message-using-markdown, in the in-help
help section, the A icon is replace by help button. This
updates the docs. | @@ -273,7 +273,7 @@ A summary of the formatting syntax is available in-app.
{!start-composing.md!}
-1. Click the A (<i class="fa fa-font"></i>) icon at the bottom of the compose box.
+1. Click help at the bottom of the compose box.
{end_tabs}
|
[refactor] Just format error in format_error
Don't set the error, just return the formatted error and let the caller
handle setting. | @@ -370,7 +370,7 @@ class JsPrettierCommand(sublime_plugin.TextCommand):
shell=self.is_windows())
stdout, stderr = proc.communicate(input=source.encode('utf-8'))
if stderr or proc.returncode != 0:
- self.format_error_message(stderr.decode('utf-8'), str(proc.returncode))
+ self.error_message = self.format_error_message(... |
Replace `from numpy.random import poisson` with `import numpy as np` in `cirq-core/cirq/contrib/acquaintance/gates_test.py`
Fixes: | @@ -17,7 +17,7 @@ from random import randint
from string import ascii_lowercase as alphabet
from typing import Optional, Sequence, Tuple
-from numpy.random import poisson
+import numpy as np
import pytest
import cirq
@@ -233,7 +233,7 @@ def test_swap_network_init_error():
part_lens_and_acquaintance_sizes = [
- [[l + 1 ... |
fix: Show alert message
Append indicator element instead of adding
class to parent div to avoid css bleed | @@ -283,12 +283,12 @@ frappe.show_alert = function(message, seconds=7, actions={}) {
<a class="close">×</a>
</div>`);
- div.find('.alert-message').append(message.message);
-
if(message.indicator) {
- div.find('.alert-message').addClass('indicator '+ message.indicator);
+ div.find('.alert-message').append(`<span c... |
Put the TODO comment in a YAML array.
The `contains:` map needs an array of strings. By placing the TODO comment between brackets I hope that the user will be more likely to produce a valid file.
Closes: | @@ -241,7 +241,7 @@ class ModulesTestYmlBuilder(object):
test_files[i].pop("md5sum")
test_files[i][
"contains"
- ] = "# TODO nf-core: file md5sum was variable, please replace this text with a string found in the file instead"
+ ] = "[ # TODO nf-core: file md5sum was variable, please replace this text with a string foun... |
upload: respect --yes with large upload confirmation
If the user passes in --yes, don't prompt them to confirm large uploads.
Tested-by: Mike Frysinger | @@ -262,7 +262,7 @@ Gerrit Code Review: https://www.gerritcodereview.com/
answer = sys.stdin.readline().strip().lower()
answer = answer in ('y', 'yes', '1', 'true', 't')
- if answer:
+ if not opt.yes and answer:
if len(branch.commits) > UNUSUAL_COMMIT_THRESHOLD:
answer = _ConfirmManyUploads()
@@ -335,6 +335,7 @@ Gerrit... |
removeLocations with a Path object
addLocations with a Path object | @@ -125,6 +125,7 @@ def test_library_add_edit_delete(plex, movies, photos):
# Create Other Videos library = No external metadata scanning
section_name = "plexapi_test_section"
movie_location = movies.locations[0]
+ movie_path = plex.browse(path=movie_location)
photo_location = photos.locations[0]
plex.library.add(
name... |
[commands] Fix cog eject behaviour with application commands
This was using the old attribute I forgot to change. | @@ -514,9 +514,8 @@ class Cog(metaclass=CogMeta):
if not cls.__cog_is_app_commands_group__:
for command in self.__cog_app_commands__:
- try:
- guild_ids = command.__discord_app_commands_default_guilds__
- except AttributeError:
+ guild_ids = command._guild_ids
+ if guild_ids is None:
bot.tree.remove_command(command.nam... |
add check for pointer to string
Check if memory referenced is a pointer to a string. Fixes mimikatz
string test. | import re
import string
+import struct
from smda.common.SmdaReport import SmdaReport
@@ -172,6 +173,18 @@ def extract_insn_string_features(f, bb, insn):
string_read = read_string(f.smda_report, data_ref)
if string_read:
yield String(string_read.rstrip("\x00")), insn.offset
+ continue
+
+ # test to see if we're referenc... |
Fix border/outline color of inline code in tables
Fixes | @@ -219,6 +219,7 @@ a:visited.has-code span {
}
/* table fixes */
+
table,
article.pytorch-article table,
article.pytorch-article .wy-table-responsive table {
@@ -237,6 +238,16 @@ article.pytorch-article table td:first-of-type code {
white-space: nowrap;
}
+article.pytorch-article .wy-table-responsive table tbody td co... |
[BUG] Wrong icon on the place order button
Use paper plane as symbol
Fixes | </div>
{% if order.status == PurchaseOrderStatus.PENDING %}
<button type='button' class='btn btn-outline-secondary' id='place-order' title='{% trans "Place order" %}'>
- <span class='fas fa-shopping-cart icon-blue'></span>
+ <span class='fas fa-paper-plane icon-blue'></span>
</button>
{% elif order.status == PurchaseOr... |
Update argo_index_pa.py
Improved logging | @@ -190,7 +190,7 @@ class indexstore(ArgoIndexStoreProto):
with self.fs['index'].open(this_path + '.gz', "rb") as fg:
with gzip.open(fg) as f:
self.index = read_csv(f)
- log.debug("Argo index file loaded with pyarrow read_csv from: %s" % f.name)
+ log.debug("Argo index file loaded with pyarrow read_csv from: '%s'" % f.... |
Minor bugfix for demcz
setting firstcall=True | @@ -179,6 +179,7 @@ class demcz(_algorithm):
history.add_group('interest', slices)
### BURN_IN
+ firstcall = True
burnInpar = [np.zeros((nChains, dimensions))] * nSeedIterations
for i in range(nSeedIterations):
self._logPs = []
|
Burn 1 instead of 255
This aligns better to the value of an int-converted boolean image | @@ -56,7 +56,7 @@ def rasterize_file_thin_line(vector_filename_in, reference_file,
size = reference_file.RasterYSize, reference_file.RasterXSize
gdal_utils.gdal_save(numpy.zeros(size, dtype=numpy.uint8),
reference_file, raster_filename_out, gdal.GDT_Byte)
- subprocess.run(['gdal_rasterize', '-burn', '255']
+ subprocess... |
Instruments/EnergyMeas: Adds support for DerivedMeasurement from devlib
Delvib now is capable of performing postprocessing of MeasurementCSV
files, instead of calculating additional metrics in WA this will be
performed externally. Currently support has been added for calculating
average power and cumulative energy. | # pylint: disable=W0613,E1101
from __future__ import division
import os
-from collections import defaultdict
from devlib.instrument import CONTINUOUS
from devlib.instrument.energy_probe import EnergyProbeInstrument
from devlib.instrument.daq import DaqInstrument
from devlib.instrument.acmecape import AcmeCapeInstrument... |
UPDATE getting_started.rst - improve wording
Found a few sentences in the Docs that I thought could be a bit more readable, hopefully improved them. | @@ -20,7 +20,7 @@ If you want to install ``moto`` from source::
Moto usage
----------
-For example we have the following code we want to test:
+For example, we have the following code we want to test:
.. sourcecode:: python
@@ -39,12 +39,12 @@ For example we have the following code we want to test:
k.key = self.name
k.... |
Fix CodeHashingTest.test_external_module
altair no longer exports `vegalite.v3` by default. Add an explicit import. | @@ -22,7 +22,7 @@ import tempfile
import time
import unittest
-import altair as alt
+import altair.vegalite.v3
import numpy as np
import pandas as pd
import pytest
@@ -406,11 +406,14 @@ class CodeHashTest(unittest.TestCase):
def test_external_module(self):
"""Test code that references an external module."""
+ # NB: If ... |
RPR subdivision error.
Following error could be happen:
File "D:\RadeonProRenderBlenderAddon\src\rprblender\properties\object.py", line 120, in export_subdivision
factor = int(math.log2(16.0 / self.subdivision_factor))
ZeroDivisionError: float division by zero
Fixed by setting min=0.01 for subdivision factor. | @@ -76,7 +76,7 @@ class RPR_ObjectProperites(RPR_Properties):
subdivision_factor: FloatProperty(
name="Adaptive Level",
description="Subdivision factor for mesh, in pixels that it should be subdivided to. For finer subdivision set lower.",
- min=0.0, soft_max=10.0,
+ min=0.01, soft_max=10.0,
default=1.0
)
subdivision_b... |
Fix info on policy entries in Identity txn fam spec
Each policy is a list of type/key pairs (not a type and key list)
Also corrected the proto code to match the contents of protos/identity.proto | @@ -44,8 +44,8 @@ State
Policies
--------
A policy will have a name and a list of entries. Each policy entry will have a
-type and a key list. The type will be either PERMIT_KEY or DENY_KEY and the key
-list will be a list of public keys.
+list of type/key pairs. The type will be either PERMIT_KEY or DENY_KEY.
+Each ke... |
Update README.md
Removed old forum link
Renamed XBMC to Kodi in readme | ##What is Maraschino?
-I wanted a simple web interface to act as a nice overview/front page for my XBMC HTPC. I couldn't find anything that suited my requirements so I created something myself.
+I wanted a simple web interface to act as a nice overview/front page for my Kodi HTPC. I couldn't find anything that suited m... |
Tornado client now uses asyncio.
This means it will only work with Python 3.5+.
Closes | @@ -17,12 +17,11 @@ client::
from functools import partial
from tornado.httpclient import AsyncHTTPClient
-from tornado.concurrent import Future
-from .client import Client
+from .async_client import AsyncClient
-class TornadoClient(Client):
+class TornadoClient(AsyncClient):
"""
:param endpoint: The server address.
:p... |
Supress docker-compose image pulling progress bar.
This adds a huge amount of logging to our CircleCI logs and forces us in
100% of our tests to download the logs instead of viewing them in
CircleCI directly.
Might even speed things up a bit. | @@ -89,6 +89,7 @@ jobs:
command: |
set -x
sudo sysctl -w vm.max_map_count=262144
+ docker-compose pull --quiet
docker-compose up -d
sleep 20
docker-compose ps
|
Change condition in swap module
Summary: Pull Request resolved:
Test Plan:
python test/test_quantization.py
Imported from OSS | @@ -275,7 +275,7 @@ def swap_module(mod, mapping):
The corresponding quantized module of `mod`
"""
new_mod = mod
- if hasattr(mod, 'observer'):
+ if hasattr(mod, 'qconfig') and mod.qconfig is not None:
if type(mod) in mapping:
new_mod = mapping[type(mod)].from_float(mod)
|
Integ tests: set custom packages config after jinja rendering
when adding custom pacakges configs we parse the cluster config
file and in case jinja templates directives are present this might
fail | @@ -216,12 +216,12 @@ def pcluster_config_reader(test_datadir, vpc_stacks, region, request):
def _config_renderer(**kwargs):
config_file_path = test_datadir / config_file
- _add_custom_packages_configs(config_file_path, request)
default_values = _get_default_template_values(vpc_stacks, region, request)
file_loader = Fi... |
[DOC] Fix typos in tutorials
fix some typos | @@ -38,7 +38,7 @@ import numpy as np
# -------------------------------
# The most straight-forward way to call target specific function is via
# extern function call construct in tvm.
-# In th following example, we use :any:`tvm.call_pure_extern` to call
+# In the following example, we use :any:`tvm.call_pure_extern` t... |
Prepare 2.4.0rc5.
[ci skip-rust]
[ci skip-build-wheels] | See https://www.pantsbuild.org/v2.4/docs/release-notes-2-4 for an overview of the changes in this release series.
+## 2.4.0rc5 (Apr 17, 2021)
+
+### Bug fixes
+
+* Wait for all Sessions during pantsd shutdown (cherrypick of #11929) ([#11934](https://github.com/pantsbuild/pants/pull/11934))
+
+* Retrieve RunTracker args... |
Core & Internals: fix timer names in delete_dids
The same name was used for multiple code blocks and this makes the
timer not very useful. | @@ -1439,7 +1439,7 @@ def _delete_dids(
record_counter(name='undertaker.content.rowcount', delta=rowcount)
# Remove CollectionReplica
- with record_timer_block('undertaker.dids'):
+ with record_timer_block('undertaker.collection_replicas'):
stmt = delete(
models.CollectionReplica
).where(
@@ -1466,7 +1466,7 @@ def _del... |
[ci/release] Fix result output in Buildkite pipeline run
The new buildkite pipeline prints out faulty results due to a confusion of -ge/-gt and -le/-lt in the retry script. This is a cosmetic error (so behavior was still correct) that is resolved with this PR. | @@ -12,15 +12,15 @@ reason() {
# Keep in sync with e2e.py ExitCode enum
if [ "$1" -eq 0 ]; then
REASON="success"
- elif [ "$1" -ge 1 ] && [ "$1" -le 10 ]; then
+ elif [ "$1" -ge 1 ] && [ "$1" -lt 10 ]; then
REASON="runtime error"
- elif [ "$1" -gt 10 ] && [ "$1" -le 20 ]; then
+ elif [ "$1" -ge 10 ] && [ "$1" -lt 20 ];... |
[samplers/raysampler.py] change arguments ordering
same as other samplers | @@ -163,7 +163,7 @@ class EpiSampler(object):
Default (empty node_info) is using ray scheduling policy.
"""
- def __init__(self, pol, env, num_parallel=8, prepro=None, seed=256,
+ def __init__(self, env, pol, num_parallel=8, prepro=None, seed=256,
node_info={}):
pol = copy.deepcopy(pol)
pol.to('cpu')
|
Add regression test
Closes sympy/sympy#7171 | @@ -170,7 +170,7 @@ def test_sin_rewrite():
assert sin(cot(x)).rewrite(
exp).subs(x, 3).n() == sin(x).rewrite(exp).subs(x, cot(3)).n()
assert sin(log(x)).rewrite(Pow) == I*x**-I / 2 - I*x**I / 2
- assert sin(x).rewrite(Pow) == sin(x)
+ assert sin(x).rewrite(Pow) == sin(x) # issue sympy/sympy#7171
assert sin(x).rewrite(... |
[IMPR] Use SingleSiteBot with states_redirect.py
Bot class is noted as to be deprecated. Use SingleSitesBot instead.
StatesRedirectBot.site is set by super class but the generator must become
an StatesRedirectBot property
Create the abbrev in setup method | @@ -25,7 +25,7 @@ import re
import pywikibot
-from pywikibot.bot import suggest_help
+from pywikibot.bot import SingleSiteBot, suggest_help
from pywikibot import i18n
try:
@@ -34,32 +34,35 @@ except ImportError as e:
pycountry = e
-class StatesRedirectBot(pywikibot.Bot):
+class StatesRedirectBot(SingleSiteBot):
"""Bot ... |
test_signup: Test that cloning a system bot's email is not allowed.
Just now this is largely redundant with `test_signup_already_active`;
but very soon when we allow reusing an email across realms, the logic
will diverge. | @@ -1470,6 +1470,16 @@ class UserSignUpTest(ZulipTestCase):
result = self.client_get(result.url)
self.assert_in_response("You've already registered", result)
+ def test_signup_system_bot(self) -> None:
+ email = "notification-bot@zulip.com"
+ result = self.client_post('/accounts/home/', {'email': email}, subdomain="lea... |
Another small modification to replace
static ESCU name with the name of
your app | @@ -171,7 +171,14 @@ class Initialize:
for fname in ["savedsearches_investigations.j2", "savedsearches_detections.j2", "analyticstories_investigations.j2", "analyticstories_detections.j2", "savedsearches_baselines.j2"]:
full_path = os.path.join(filename_root, fname)
self.simple_replace_line(full_path, original, updated... |
remover min from possible negatives in the schemas
remover min from dT_Qcs (HVAC) and Tcs_set_C and Tcs_setb_C (USE TYPES) in schemas.yml file | @@ -1802,13 +1802,11 @@ get_building_comfort:
type: float
unit: '[C]'
values: '{0.0...n}'
- min: 0.0
Tcs_setb_C:
description: Setback point of temperature for cooling system
type: float
unit: '[C]'
values: '{0.0...n}'
- min: 0.0
Ths_set_C:
description: Setpoint temperature for heating system
type: float
@@ -2394,7 +239... |
Add test whirl_direction()
I used assert_equal for this test once it compares a list of strings. So it doesn't make sense applying a command which consideres tolerance in this case. Besides, it does need to be the exact output. | @@ -2,7 +2,7 @@ import os
import numpy as np
import pytest
-from numpy.testing import assert_almost_equal, assert_allclose
+from numpy.testing import assert_almost_equal, assert_allclose, assert_equal
from ross.bearing_seal_element import *
from ross.disk_element import *
@@ -1022,6 +1022,10 @@ def test_whirl_values(ro... |
Remove thrust_t from remainder_kernel_cuda
Summary:
complex is not supported, so no need to use thrust
Pull Request resolved: | @@ -68,9 +68,8 @@ void mul_kernel_cuda(TensorIterator& iter) {
void remainder_kernel_cuda(TensorIterator& iter) {
if (isIntegralType(iter.dtype(), /*includeBool*/ false)) {
AT_DISPATCH_INTEGRAL_TYPES(iter.dtype(), "remainder_cuda", [&]() {
- using thrust_t = typename ztype_cuda<scalar_t>::thrust_t;
- gpu_kernel_with_sc... |
correct link of flake8
correct link of flake8 | @@ -27,9 +27,9 @@ is 0.22. We periodically update it to newer versions.
Linting
-------
-.. _`Flake8`: https://github.com/google/yapf
+.. _`Flake8`: https://github.com/pycqa/flake8
-We use `Flake8` to check our code syntax. Lint tools basically provide these benefits.
+We use `Flake8`_ to check our code syntax. Lint to... |
fix: fix TIM register CCMR1/2_Output
TIM register CCRM2_output incorrectly listed the high bits.
Fixes the naming of those register bits. | @@ -76,7 +76,7 @@ TIM[45]:
- OR1
- OR2
- CCMR?_Output:
+ CCMR1_Output:
_add:
OC1M_3:
description: Bit 3 of Output compare 1 mode
@@ -87,6 +87,17 @@ TIM[45]:
bitOffset: 24
bitWidth: 1
+ CCMR2_Output:
+ _add:
+ OC3M_3:
+ description: Bit 3 of Output compare 3 mode
+ bitOffset: 16
+ bitWidth: 1
+ OC4M_3:
+ description: Bi... |
Disable crontab with empty whitelist
Ansible wont overwrite in the case of legit crontab users being added to
the whitelist | group: root
mode: 0644
+- name: Disable user crontab with whitelist
+ copy:
+ content: ""
+ dest: /etc/cron.allow
+ force: no
+ owner: root
+ group: root
+ mode: 0644
+
- name: Copy over sshd configs
copy:
src: sshd_config
|
docs: fix typos in tests-pytest-fixtures.rst
Fix typos in tests-pytest-fixtures.rst | @@ -36,7 +36,7 @@ These fixtures provide quick access to Brownie objects that are frequently used
.. py:attribute:: chain
- Yields an :func:`Chain <brownie.network.state.Chain>` object, used to access block data and interact with the local test chain.
+ Yields a :func:`Chain <brownie.network.state.Chain>` object, used ... |
Support `when_type` for singledispatch
This makes singledispatch backwards compatible enough with simplegeneric. | @@ -5,18 +5,38 @@ Aspects form intermediate items between tools and items.
from __future__ import absolute_import
import sys
+import warnings
from builtins import object
if sys.version_info.major >= 3: # Modern Python
- from functools import singledispatch
+ from functools import singledispatch as real_singledispatch
e... |
TST: fixed registration
Added pysat registration of test instruments. | @@ -654,7 +654,8 @@ class TestFmtCols():
class TestAvailableInst():
-
+ setup = pysat.tests.test_registry.TestRegistration.setup
+ teardown = pysat.tests.test_registry.TestRegistration.teardown
@pytest.mark.parametrize("inst_loc", [None, pysat.instruments])
@pytest.mark.parametrize("inst_flag, plat_flag",
[(None, None)... |
Server: Optimize the DICOM search & add filter
k | @@ -27,6 +27,7 @@ from girder.api import access
from girder.api.describe import Description, autoDescribeRoute
from girder.api.rest import Resource
from girder.constants import AccessType, TokenScope
+from girder.exceptions import RestException
from girder.models.item import Item
from girder.models.file import File
fro... |
Fixed bug in rbac
Removed quotes in namespace for subject | @@ -37,6 +37,6 @@ roleRef:
name: {{ template "ambassador.fullname" . }}
subjects:
- name: {{ template "ambassador.serviceAccountName" . }}
- namespace: {{ .Release.Namespace | quote }}
+ namespace: {{ .Release.Namespace }}
kind: ServiceAccount
{{- end -}}
|
Add `remove()` to Reaction
Added a coro, `remove()` which takes in a sole parameter, `member`.
This new coro will remove the reaction by the provided member from the reactions message.
`message.remove_reaction(reaction, member)` was not removed as to not introduce breaking changes. | @@ -93,6 +93,34 @@ class Reaction:
def __repr__(self):
return '<Reaction emoji={0.emoji!r} me={0.me} count={0.count}>'.format(self)
+ async def remove(self, user):
+ """|coro|
+
+ Remove the reaction by the provided :class:`User` from the message.
+
+ If the reaction is not your own (i.e. ``user`` parameter is not you)... |
update summary/views.py
add a try/except block to get as many summary fields as possible | @@ -249,10 +249,7 @@ def summary(request, user_uuid):
if len(message.keys()) > 0:
results['messages'][message.get('message_type') or "type"] = message.get('message') or ""
- if results['status'].lower() != "optimal":
- json_response['scenarios'].append(results)
- continue
-
+ try:
site = get_scenario_data(sites, scenar... |
api_types: Support all Zulip 2.1+ topic links message formats.
The `topic_links` parameter is new in Zulip 3.0 (feature level 1).
Previously it was named `subject_links`.
Since projected Zulip 4.0 (feature level 46) `topic_links` changed:
* earlier: ['www.link1.com']
* now: [{'url': 'www.link1.com', 'text': 'My lin... | @@ -30,7 +30,11 @@ class Message(TypedDict, total=False):
timestamp: int
client: str
subject: str # Only for stream msgs.
- topic_links: List[str]
+ # NOTE: new in Zulip 3.0 / ZFL 1, replacing `subject_links`
+ # NOTE: API response format of `topic_links` changed in Zulip 4.0 / ZFL 46
+ topic_links: List[Any]
+ # NOTE:... |
Added Prime Number to FORTRAN README
Added Prime to Fortran Readme | @@ -15,6 +15,7 @@ to an existing article which provides further documentation.
- :warning: [Even-Odd in Fortran][even-odd-article-issue]
- :warning: [Factorial in Fortran][factorial-article-issue]
- :warning: [Hello World in Fortran][hello-world-article-issue]
+- :warning: [Prime in Fortran][prime-number-article-issue]... |
Use generator instead of list expand or add method
Generator is memory efficient approach. | @@ -68,17 +68,20 @@ class Tree(Generic[_Leaf_T]):
return self.data
def _pretty(self, level, indent_str):
- if len(self.children) == 1 and not isinstance(self.children[0], Tree):
- return [indent_str*level, self._pretty_label(), '\t', '%s' % (self.children[0],), '\n']
+ yield indent_str*level
+ yield self._pretty_label(... |
Fix docstring information to be clear
* Fix docstring information to be clear
Updated the docstrings due to errors I encountered:
* `is_private` must be 1, normally would expect true or false
* `filedata` must be urlencoded base64 to work
* Update client.py | @@ -319,13 +319,13 @@ def attach_file(filename=None, filedata=None, doctype=None, docname=None, folder
'''Attach a file to Document (POST)
:param filename: filename e.g. test-file.txt
- :param filedata: base64 encode filedata
- :param doctype: Reference DocType to attach file
- :param docname: Reference DocName to atta... |
email-log: Handle checkbox saying "Show text only version".
After clicking on checkbox saying "Show text only version" UI was rendered
correctly but after refreshing page keeping checkbox checked, emails were
shown without "text only version" but checkbox value remained checked.
Now after refreshing page checkbox value... | </div>
<div style="text-align:right">
<label>
- <input type="checkbox" id="toggle"/>
+ <input type="checkbox" autocomplete="off" id="toggle"/>
<strong>Show text only version</strong>
</label>
<a href="#" data-toggle="modal" data-target="#forward_email_modal">
|
Frame : Minor tweaks
Remove unused include
Don't use GraphLayer::Nodes, because Frame has nothing to do with graph drawing
Always call the base class doRenderLayer() method | #include "IECore/MeshPrimitive.h"
#include "IECore/SimpleTypedData.h"
-#include "math.h"
-
using namespace GafferUI;
using namespace IECore;
using namespace Imath;
@@ -75,14 +73,12 @@ Imath::Box3f Frame::bound() const
void Frame::doRenderLayer( Layer layer, const Style *style ) const
{
- if( layer != GraphLayer::Nodes ... |
Remove nodename when creating hsbench-pod.
Fixes issue - 4233 | @@ -51,7 +51,6 @@ class HsBench(object):
# Create test pvc+pod
log.info(f"Create Golang pod to generate S3 workload... {self.namespace}")
pvc_size = "50Gi"
- node_name = "compute-0"
self.pod_name = "hsbench-pod"
self.pvc_obj = helpers.create_pvc(
sc_name=constants.DEFAULT_STORAGECLASS_RBD,
@@ -63,7 +62,6 @@ class HsBen... |
add listen to state.pkg
Allows for using listen and listen_in in salt-ssh | @@ -1691,6 +1691,7 @@ def pkg(pkg_path, pkg_sum, hash_type, test=None, **kwargs):
st_ = salt.state.State(popts, pillar=pillar)
snapper_pre = _snapper_pre(popts, kwargs.get('__pub_jid', 'called localy'))
ret = st_.call_chunks(lowstate)
+ ret = st_.call_listen(lowstate, ret)
try:
shutil.rmtree(root)
except (IOError, OSEr... |
Update floorplan.tcl
save num columns in floorplan to use in pin-assignment | @@ -70,6 +70,7 @@ foreach_in_collection tile [get_cells -hier -filter "ref_name=~Tile_PE* || ref_n
# Get grid height/width from max_row/col
set grid_num_rows [expr $max_row - $min_row + 1]
set grid_num_cols [expr $max_col - $min_col + 1]
+set savedvars(grid_num_cols) $grid_num_cols
# Multiply separation params by respe... |
fix: correct inconsistencies in .processors.{find,Processors.find}
correct inconsistencies between arguments of .processors.find and
.processors,Processors.find (and .backends.Parsers.find). | @@ -227,16 +227,18 @@ class Processors(object):
"""
return find_by_type(ptype, self.list(sort=False))
- def find(self, ipath, ptype=None,
+ def find(self, obj, forced_type=None,
cls=anyconfig.models.processor.Processor):
"""
- :param ipath: file path
- :param ptype: Processor's type or None
+ :param obj:
+ a file path,... |
ci: test with all current python versions.
Python 3.6 is EOL and 3.10 is out since a while, make sure we test with
those. | @@ -59,7 +59,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
- python-version: [3.9, 3.8, 3.7, 3.6]
+ python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- id: checkout-code
|
simplify Multiply._add
This patch removes simplifications of type (a*b)+a -> a*(b+1), which are
not considered important. The remaining simplification (a*b)+(a*c) -> a*(b+c)
is left in place in slightly more efficient form. | @@ -1721,13 +1721,9 @@ class Multiply(Array):
def _add(self, other):
func1, func2 = self.funcs
- if other == func1:
- return Multiply([func1, Add([func2, ones_like(func2)])])
- if other == func2:
- return Multiply([func2, Add([func1, ones_like(func1)])])
- if isinstance(other, Multiply) and not self.funcs.isdisjoint(ot... |
Decrement Guild.member_count even if member is not cached
Fix | @@ -686,11 +686,11 @@ class ConnectionState:
def parse_guild_member_remove(self, data):
guild = self._get_guild(int(data['guild_id']))
if guild is not None:
+ guild._member_count -= 1
user_id = int(data['user']['id'])
member = guild.get_member(user_id)
if member is not None:
guild._remove_member(member)
- guild._member... |
Support jupyter server root_dir with lab extension
Jupyter sends path relative to the root_dir which can be different from the cwd. This commit fixes the lab extension for panel preview to account for root_dir.
Reference: | from urllib.parse import urljoin
import tornado
+import os
from bokeh.command.util import build_single_handler_application
from bokeh.embed.bundle import extension_dirs
@@ -65,6 +66,17 @@ class ServerApplicationProxy:
def __init__(self, app, **kw):
self._app = app
+ @property
+ def root_dir(self):
+ """
+ Gets the root... |
Remove references to py34 from developer guide
Developer guide should not include references to Python 3.4
or py34, since this Python version is not supported.
Related-Bug: | @@ -8,9 +8,9 @@ This is a quick walkthrough to get you started developing code for Ironic.
This assumes you are already familiar with submitting code reviews to
an OpenStack project.
-The gate currently runs the unit tests under Python 2.7, Python 3.4
-and Python 3.5. It is strongly encouraged to run the unit tests loc... |
accept splitting at the tail of dataset
issue: | @@ -101,7 +101,7 @@ def split_dataset(dataset, split_at, order=None):
.format(type(split_at)))
if split_at < 0:
raise ValueError('split_at must be non-negative')
- if split_at >= n_examples:
+ if split_at > n_examples:
raise ValueError('split_at exceeds the dataset size')
subset1 = SubDataset(dataset, 0, split_at, orde... |
[IMPR] Don't trust token from NeedToken response
It can stop working any time soon and it can also be invalid
if multiple login attempts because of endless loops.
generate fresh login token on every login attempt
copy _logged_in() from api.Request
keep track of such issues | @@ -3140,12 +3140,12 @@ class LoginManager(login.LoginManager):
if self.site.family.ldapDomain:
login_request[self.keyword('ldap')] = self.site.family.ldapDomain
+ self.site._loginstatus = -2 # IN_PROGRESS
+ while True:
# get token using meta=tokens if supported
if not below_mw_1_27:
login_request[self.keyword('token')... |
omit group conv NHWC test for HIP
Summary:
Pull Request resolved:
broke ROCM test.
We don't have group conv in NHWC for hip yet and this diff omits related tests. | @@ -81,7 +81,9 @@ class TestConvolution(serial.SerializedTestCase):
kernel, size, input_channels, output_channels, batch_size, group,
order, engine, shared_buffer, use_bias, gc, dc):
# TODO: Group conv in NHWC not implemented for GPU yet.
- assume(group == 1 or order == "NCHW" or gc.device_type != caffe2_pb2.CUDA)
+ as... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.