message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
Update version 0.9.0 -> 0.9.1
Support dwave-cloud-client 0.7.x | # =============================================================================
__all__ = ['__version__', '__author__', '__authoremail__', '__description__']
-__version__ = '0.9.0'
+__version__ = '0.9.1'
__author__ = 'D-Wave Systems Inc.'
__authoremail__ = 'acondello@dwavesys.com'
__description__ = 'All things D-Wave S... |
Move StructType/ASTNodeType fields elaboration out of StructMetaclass
TN: | @@ -1378,10 +1378,6 @@ class StructMetaclass(CompiledTypeMetaclass):
assert sum(1 for b in [is_astnode, is_struct] if b) == 1
assert sum(1 for b in [is_base, is_root_grammar_class] if b) <= 1
- # Get the fields this class defines. Remove them as class members: we
- # want them to be stored in their own dict (see "cls.f... |
Fix dev version
Wasn't showing git commit | @@ -52,7 +52,7 @@ def _try_init_git_attrs():
def _init_git_commit():
repo = _guild_repo()
if repo:
- line = _cmd_out("git -C \"%s\" log -1 --oneline" % repo)
+ line = _cmd_out("git --work-tree \"%s\" log -1 --oneline" % repo)
commit = line.split(" ")[0]
else:
commit = None
|
Fix a bug raised by issue 3372.
* Fix a bug raised by issue 3372.
corner case: the input tensor may also be the input tensor of the whole
model. | @@ -441,7 +441,11 @@ class TorchModuleGraph(TorchGraph):
input_tensors = list(list_construct_cpp.inputs())
for _tensor in input_tensors:
debug_name = _tensor.debugName()
+ if debug_name in self.output_to_node:
input_order.append(self.output_to_node[debug_name].unique_name)
+ else:
+ # the input tensor may be the input ... |
Correct test--caching requires files on disk but the test just supplies
what would have been read from disk. | @@ -101,8 +101,9 @@ class CryptTestCase(TestCase):
salt.utils.fopen.assert_has_calls([open_priv_wb, open_pub_wb], any_order=True)
def test_sign_message(self):
- with patch('salt.utils.fopen', mock_open(read_data=PRIVKEY_DATA)):
- self.assertEqual(SIG, crypt.sign_message('/keydir/keyname.pem', MSG))
+ key = Crypto.Publi... |
DOC: Give a sense for why plans are useful earlier in the tutorial.
This incorporates early feedback from Thanks! | @@ -287,7 +287,15 @@ Try the following variations:
The :func:`~bluesky.plans.count` function (more precisely, Python *generator
function*) is an example of a *plan*, a sequence of instructions encoding an
experimental procedure. We'll get a better sense for why this design is useful
-as we continue.
+as we continue. Br... |
Fix bug in run_static()
Fix a bug when modeling too flexible bearings, displacement were getting larger than acceptable.
It uses axuliar bearings with high stiffness, considering almost zero displacement in bearing nodes. | @@ -1902,8 +1902,15 @@ class Rotor(object):
for node_y in range(int(len(self.M()) / 4)):
grav[4 * node_y + 1] = -9.8065
+ aux_brg = []
+ for n in self.df_bearings["n"]:
+ aux_brg.append(BearingElement(n=n, kxx=1e14, cxx=0))
+
+ aux_rotor = Rotor(self.shaft_elements, self.disk_elements, aux_brg)
+ aux_K = aux_rotor.K(0)... |
Removed autopep8 and use flake8 after black
`black` already does everything which `autopep8` can.
Also with `black` we don't need to use `flake8` for formatting, but we
still can use it to find errors, so let's run it after `black`. | @@ -31,21 +31,17 @@ repos:
hooks:
- id: pyupgrade
args: [--py36-plus]
-- repo: https://gitlab.com/pycqa/flake8
- rev: 3.7.7
- hooks:
- - id: flake8
- exclude: ^docs/source/conf.py$
-- repo: https://github.com/pre-commit/mirrors-autopep8
- rev: v1.4.3
- hooks:
- - id: autopep8
- repo: https://github.com/psf/black
rev: s... |
MNT: remove pending_cancel_exception
We should always handle the CancelExceptions internally | @@ -1162,7 +1162,6 @@ class RunEngine:
with self._state_lock:
self._task = current_task(self.loop)
debug = logging.getLogger('{}.msg'.format(self.log.name)).debug
- pending_cancel_exception = None
self._reason = ''
# sentinel to decide if need to add to the response stack or not
sentinel = object()
@@ -1373,7 +1372,6 @... |
build-prereq.sh updates for Debian:
Add support for CLIF prerequisite.
Add public key for Oracle Java PPA. Without this the Java install fails on Debian. | @@ -60,6 +60,11 @@ note_build_stage "Install Java and friends"
if ! java -version 2>&1 | fgrep "1.8"; then
echo "No Java 8, will install."
sudo -H apt-get install -y software-properties-common debconf-utils
+ # Debian needs authentication.
+ # (http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html)... |
Predicate: fix arguments checking
In particular, properly reject when there are too many arguments or
missing ones.
TN: | from __future__ import absolute_import, division, print_function
+
+from itertools import izip_longest
+
import funcy
-from langkit.compiled_types import (T, bool_type, equation_type,
+from langkit import names
+from langkit.compiled_types import (Argument, T, bool_type, equation_type,
logic_var_type, no_compiled_type)... |
Do not emit GDB helper directives without generating GDB hooks
These directives contain absolute paths to source files, so we want to
keep them out of release builds.
TN: | @@ -26,7 +26,8 @@ def gdb_helper(*args):
:param list[str] args: Elements of the special comment.
:rtype: str
"""
- return '--# {}'.format(' '.join(pipes.quote(a) for a in args))
+ return ('--# {}'.format(' '.join(pipes.quote(a) for a in args))
+ if get_context().emitter.generate_gdb_hook else '')
def precise_types_doc(... |
linkifiers: Add `title` attribute to `Delete` button.
This commit adds `title` attribute and removes
`aria-hidden` attribute in `Delete` button in
linkifiers table.
`aria-hidden` attribute is used only for icons on buttons
that have a plain-text label. | </td>
{{#if ../can_modify}}
<td class="no-select actions">
- <button class="button small delete btn-danger" data-linkifier-id="{{id}}">
- <i class="fa fa-trash-o" aria-hidden="true"></i>
+ <button class="button small delete btn-danger" data-linkifier-id="{{id}}" title="{{t 'Delete' }}" aria-label="{{t 'Delete' }}">
+ <... |
Update pin.py
SDA SCL 0 and SDA SCL 1 order modify | @@ -66,10 +66,17 @@ class Pin:
GPIO.cleanup()
# Cannot be used as GPIO
-SDA = Pin('GEN1_I2C_SDA')
-SCL = Pin('GEN1_I2C_SCL')
-SDA_1 = Pin('GEN2_I2C_SDA')
-SCL_1 = Pin('GEN2_I2C_SCL')
+# before #
+#SDA = Pin('GEN1_I2C_SDA')
+#SCL = Pin('GEN1_I2C_SCL')
+#SDA_1 = Pin('GEN2_I2C_SDA')
+#SCL_1 = Pin('GEN2_I2C_SCL')
+
+# afte... |
Update main.py
Fixed typo in summary: changed enabled to disabled | @@ -98,7 +98,7 @@ def main(args, pacu_main):
def summary(data, pacu_main):
- out = ' {} instances have termination protection enabled\n'.format(data['instance_count'])
+ out = ' {} instances have termination protection disabled\n'.format(data['instance_count'])
if data['instance_count'] > 0:
out += ' Instances without ... |
Update CONTRIBUTING.md
removed mention of Trello for bug tracking | Thank you for your interest in contributing! If you haven't already, drop us a line on mail@openprescribing.net. We want you working on things you're excited about.
-We use GitHub issues for suggestions, and [Trello](https://trello.com/b/RGR9BttD/oxford-data-lab) is our bug tracking system. Mail us and we'll add you.
+... |
Fix Cassandra cluster restart
Look the node up by both '127.0.0.1' and the private IP (if not found). | @@ -766,7 +766,7 @@ class CassandraAppStatus(service.BaseDbStatus):
def _get_actual_db_status(self):
try:
- self.client.execute('SELECT now() FROM system.local;')
+ if self.client.local_node_is_up():
return rd_instance.ServiceStatuses.RUNNING
except NoHostAvailable:
return rd_instance.ServiceStatuses.SHUTDOWN
@@ -1238,... |
Fix char scaping in legacy printer
Fixed code that identifies leaf nodes (now supports <edge label>-of) | @@ -362,7 +362,7 @@ def get_simple_graph(graph):
def legacy_graph_printer(metadata, nodes, root, edges):
- # These symbols can not be used directly for nodes
+ # These symbols can not be used directly for node names
must_scape_symbols = [':', '/', '(', ')']
# start from meta-data
@@ -372,6 +372,7 @@ def legacy_graph_pr... |
Grammar fix
Use 'if' instead of 'in case' | @@ -233,7 +233,7 @@ You can now call all of Salt's CLI tools without explicitly passing the configur
Additional Options
..................
-In case you want to distribute your virtualenv, you probably don't want to
+If you want to distribute your virtualenv, you probably don't want to
include Salt's clone ``.git/`` dir... |
tests: add vectorized roundtrip test to fixed/inertial planetary frames
This test ensures conversion from and to fixed frames is possible with
vectorized input and yields the same coordinates if coming back to the
original coordinate system. | +import numpy as np
import pytest
from astropy import units as u
from astropy.coordinates import (
@@ -146,7 +147,7 @@ def test_planetary_fixed_inertial_conversion(body, fixed_frame, inertial_frame):
fixed_position = fixed_frame(
0 * u.deg, 0 * u.deg, body.R, obstime=epoch, representation_type="spherical"
)
- inertial_... |
Back out "[reland] Skip OpenMP Thread when OMP_NUM_THREADS is 1"
Summary:
Pull Request resolved:
Original commit changeset:
With the previous diff, when user sets KMP_AFFINITY, it will be ignored when OMP_NUM_THREADS is 1. That could cause performance regression.
Test Plan: n/a | @@ -25,8 +25,8 @@ inline void parallel_for(
#ifdef _OPENMP
std::atomic_flag err_flag = ATOMIC_FLAG_INIT;
std::exception_ptr eptr;
- if (!omp_in_parallel() && ((end - begin) > grain_size) && omp_get_num_threads() > 1) {
-#pragma omp parallel
+
+#pragma omp parallel if (!omp_in_parallel() && ((end - begin) > grain_size))... |
Centre align logo and buttons
A subjective improvement in making the readme look nice. Only if others
agree of course :)
GitHub rst doesn't seem to like rst's actual ways of centreing things so
it seems putting stuff in html is the way to do this. | -|logo|
+.. raw:: html
-**A full-featured, hackable tiling window manager written and configured in Python**
-
-|website| |pypi| |ci| |rtd| |license|
+ <p align="center">
+ <a href="https://www.qtile.org">
+ <img
+ src="https://raw.githubusercontent.com/qtile/qtile/master/logo.png"
+ alt="Logo"
+ >
+ </a>
+ </p>
+ <p a... |
don't use half precision in test_ema on CPU
Summary:
X-link:
Pull Request resolved:
To fix errors introduced in | @@ -160,14 +160,17 @@ class TestEMA(unittest.TestCase):
self._test_ema_start_update(updates=1)
def test_ema_fp32(self):
- model = DummyModule().half()
+ # CPU no longer supports Linear in half precision
+ dtype = torch.half if torch.cuda.is_available() else torch.float
+
+ model = DummyModule().to(dtype)
optimizer = to... |
Add section on enhancements
* Add section on enhancements
Allow users to know how to request a feature change, by pointing
them towards our enhancements repository | @@ -76,6 +76,7 @@ A hardware TPM should always be used when real secrets and trust is required.
* [Running keylime](#running-keylime)
* [Provisioning](#provisioning)
* [Using keylime CA](#using-keylime-ca)
+* [Request a Feature](#request-a-feature)
* [Report a Security Vulnerability](#report-a-security-vulnerability)
*... |
Fix minor typo
Fixed minor typo in Autograd mechanics docs. | @@ -70,7 +70,7 @@ If there's even a single volatile input to an operation, its output is also
going to be volatile. Volatility spreads accross the graph much easier than
non-requiring gradient - you only need a **single** volatile leaf to have a
volatile output, while you need **all** leaves to not require gradient to
... |
Handle API pull addresses more flexibly
No matter the address handed in, if the user has github integration
then try using ssh to pull. If they don't, use a non-ssh cloning
address. | @@ -18596,10 +18596,17 @@ def do_playground_pull(area, current_project, github_url=None, branch=None, pypi
expected_name = 'unknown'
if github_url:
github_url = re.sub(r'[^A-Za-z0-9\-\.\_\~\:\/\#\[\]\@\$\+\,\=]', '', github_url)
- if github_url.startswith('git@') and can_publish_to_github and github_email:
expected_nam... |
Fill in more SCONS_CACHE_MSVC_CONFIG detail [ci skip]
The original release note blurb on the change to the msvc config
cache wasn't as clear as it could be, reworded a bit. | @@ -48,12 +48,16 @@ CHANGED/ENHANCED EXISTING FUNCTIONALITY
- The change to "content" and "content-timestamp" Decider names is reflected
in the User Guide as well, since the hash function may be other than md5
(tidying up from earlier change)
-- If SCONS_CACHE_MSVC_CONFIG is used, it will now attempt a sanity check for... |
make cutout op compatible with non eager mode
cutout op is not compatible with non eager mode, this is a fix | @@ -189,7 +189,7 @@ def cutout(
mask_4d = tf.expand_dims(masks.stack(), 1)
mask = tf.tile(mask_4d, [1, tf.shape(images)[1], 1, 1])
images = tf.where(
- mask == 0,
+ tf.equal(mask, 0),
tf.ones_like(images, dtype=images.dtype) * constant_values,
images,
)
|
[lp.remove_inames] Sort the inames before removing them
Picking a deterministic order in which the inames are removed is
*necessary* to ensure that the left over domain is the same across
interpreter runs. | @@ -1141,7 +1141,7 @@ def remove_unused_inames(kernel, inames=None):
# {{{ remove them
domains = kernel.domains
- for iname in unused_inames:
+ for iname in sorted(unused_inames):
new_domains = []
for dom in domains:
|
[docs] Fix typos in ray docs contributing guide
There are a couple typos in the [Ray contributing guide](https://docs.ray.io/en/master/ray-contribute/docs.html). I fixed the typos, added a relevant link, and reworded a sentence. | "\n",
"```shell\n",
"git clone git@github.com:ray-project/ray.git\n",
- "cd ray/docs\n",
+ "cd ray/doc\n",
"```\n",
"\n",
"To install the documentation dependencies, run the following command:\n",
"\n",
"## What to contribute?\n",
"\n",
- "If you take Ray Tune as an example, you can see that our documentation is made u... |
Document custom option name requirements.
If custom options don't start with ``custom_`` (or ``board_``),
pio-core will generate a warning here: | Custom options in ``platformio.ini``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-PlatformIO allows you extending project configuration with own data. You can read
-these values later using `ProjectConfig API <https://github.com/platformio/platformio-core/blob/develop/platformio/project/config.py>`__:
+PlatformIO allows you e... |
Update elf_rabbit.txt
[0] | # See the file 'LICENSE' for copying permission
# Reference: https://www.virustotal.com/#/ip-address/185.10.68.163
+# Reference: https://twitter.com/luc4m/status/1044148790008205312
/bruteforce_ssh
/bruteforce_ssh_386
|
Oops, add the return back.
We do not wanna process bot messages. | @@ -55,6 +55,7 @@ class Verification(Cog):
if message.author.bot:
# They're a bot, delete their message after the delay.
await message.delete(delay=BOT_MESSAGE_DELETE_DELAY)
+ return
# if a user mentions a role or guild member
# alert the mods in mod-alerts channel
|
fix vm cannot be found error
retry to prevent API doesn't return vms on time. | @@ -894,13 +894,11 @@ class AzurePlatform(Platform):
errors = [f"{error.code}: {error.message}"]
return errors
- def _initialize_nodes(self, environment: Environment, log: Logger) -> None:
-
- node_context_map: Dict[str, Node] = dict()
- for node in environment.nodes.list():
- node_context = get_node_context(node)
- no... |
Detect `pytest_` prefixed hooks
`pluggy` is deprecating the `implprefix` argument in the next major
release so implement this detection in our derived plugin manager.
Relates to pytest-dev/pluggy#145 | @@ -177,7 +177,7 @@ class PytestPluginManager(PluginManager):
"""
def __init__(self):
- super(PytestPluginManager, self).__init__("pytest", implprefix="pytest_")
+ super(PytestPluginManager, self).__init__("pytest")
self._conftest_plugins = set()
# state related to local conftest plugins
@@ -231,6 +231,11 @@ class Pyte... |
yet again
Found another place where I named the variable wrong. | @@ -15,7 +15,7 @@ class TestOMNICustom:
# Recast time in minutes rather than seconds
self.testInst.data.index = pds.Series([t + dt.timedelta(seconds=60-i) +
dt.timedelta(minutes=i) \
- for i,t in enumerate(testInst.data.index)])
+ for i,t in enumerate(self.testInst.data.index)])
# Add IMF data
self.testInst.data['BX_GS... |
Framework-HyperV: Introduce runSetupScriptOnlyOnce
Default behaviour is not changed.
This can be enabled as follows in case a test needs it:
<setupScript>.\Testscripts\Windows\tester1.ps1</setupScript>
+ <setupScript>.\Testscripts\Windows\tester1.ps1</setupScript>
+ <runSetupScriptOnlyOnce>enable</runSetupS... | @@ -523,20 +523,22 @@ function Run-Test {
}
if ($testPlatform -eq "Hyperv" -and $CurrentTestData.SetupScript) {
+ if ($null -eq $CurrentTestData.runSetupScriptOnlyOnce) {
foreach ($VM in $AllVMData) {
- if (Get-VM -Name $VM.RoleName -ComputerName `
- $VM.HyperVHost -EA SilentlyContinue) {
- Stop-VM -Name $VM.RoleName -... |
Delete OPENMP_STUB translation.
Summary:
Pull Request resolved: | "cudaMallocManaged": "hipSuccess"
}
},
- {
- "path": "aten/src/TH/generic/THTensorMath.cpp",
- "constants": {
- "_OPENMP": "_OPENMP_STUB"
- }
- },
{
"path": "aten/src/ATen/native/cuda/Distributions.cu",
"s_constants": {
|
Remove redundant include from jit/fuser/cpu/dynamic_library.h.
Summary:
Pull Request resolved:
ghimport-source-id: | #pragma once
-#include <c10/util/Exception.h>
-#include <torch/csrc/utils/disallow_copy.h>
#include <torch/csrc/WindowsTorchApiMacro.h>
+#include <torch/csrc/utils/disallow_copy.h>
namespace torch {
namespace jit {
|
minor fix
It should be 'state space' instead of 'action space' | @@ -764,7 +764,7 @@ class DesiredVelocityEnv(BottleneckEnv):
def get_state(self):
"""See class definition."""
- # action space is number of vehicles in each segment in each lane,
+ # state space is number of vehicles in each segment in each lane,
# number of rl vehicles in each segment in each lane
# mean speed in each... |
Update Arduino_Code.ino
Small changes:
Moving the memset function outside the loop so it doesn't draw time from the calculation. This doesn't change much the hashrate.
Using the actual size of "hash_bytes" to compare the result. sizeof is not always reliable. | @@ -52,7 +52,6 @@ uint16_t ducos1a(String lastblockhash, String newblockhash, uint16_t difficulty)
newblockhash.toUpperCase();
const char *c = newblockhash.c_str();
size_t final_len = newblockhash.length() / 2;
- memset(job, 0, job_maxsize);
for (size_t i = 0, j = 0; j < final_len; i += 2, j++)
job[j] = (c[i] % 32 + 9)... |
Update exercises/concept/tisbury-treasure-hunt/.docs/instructions.md
No quotes in the REPL | @@ -59,7 +59,7 @@ Implement the `get_coordinate()` function that takes a `(treasure, coordinate)`
```python
>>> get_coordinate(('Scrimshawed Whale Tooth', '2A'))
-"2A"
+2A
```
## 2. Format coordinates
|
Fixed some FLAKE8 errors and numbered tutorial
FLAKE8 did not like '#%%' so they have been changed to '# %%'. | # coding: utf-8
"""
-Kalman filter tutorial
+1 - Kalman filter tutorial
======================
"""
@@ -412,9 +412,10 @@ for state in track:
angle=np.rad2deg(orient),
alpha=0.2)
ax.add_artist(ellipse)
-# sphinx_gallery_thumbnail_number = 4
fig
+# sphinx_gallery_thumbnail_number = 4
+
# %%
# There are situations in which... |
Adds list(.) around a dataset.keys() call to check for comparable data in reports.
This fixes a bug in which datasets with identical circuits don't
get treated as "comparable" during report generation because a .keys()
generator is compared with a list of circuits. | @@ -1262,7 +1262,7 @@ def construct_standard_report(results, title="auto",
if len(results) > 1:
#check if data sets are comparable (if they have the same sequences)
arbitrary = next(iter(results.values()))
- comparable = all([list(v.dataset.keys()) == arbitrary.dataset.keys() for v in results.values()])
+ comparable = ... |
fix: use OAUTHLIB_RELAX_TOKEN_SCOPE for ignoring scope change
without this we get an error regarding the mismatch of scopes from microsoft | @@ -14,6 +14,8 @@ if any((os.getenv("CI"), frappe.conf.developer_mode, frappe.conf.allow_tests)):
# Disable mandatory TLS in developer mode and tests
os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1"
+os.environ["OAUTHLIB_RELAX_TOKEN_SCOPE"] = "1"
+
class ConnectedApp(Document):
"""Connect to a remote oAuth Server. Retri... |
push_notifications: Add `get_mobile_push_content()` function.
Given the rendered content of a message, this function strips
all the markup replacing emojis with their corresponding unicode
representation. | @@ -3,9 +3,12 @@ import base64
import binascii
from functools import partial
import logging
+import lxml.html as LH
import os
+import re
import time
import random
+
from typing import Any, Dict, List, Optional, SupportsInt, Text, Union, Type
from apns2.client import APNsClient
@@ -364,6 +367,38 @@ def get_alert_from_me... |
Use correct sdist/build_ext modules
This gets rid of the warning:
"standard file not found: should have one of README, README.txt" | @@ -6,8 +6,8 @@ import os.path
from setuptools import setup, Extension, find_packages
from distutils.version import LooseVersion
-from distutils.command.sdist import sdist as _sdist
-from distutils.command.build_ext import build_ext as _build_ext
+from setuptools.command.sdist import sdist as _sdist
+from setuptools.co... |
Update nasa-power.yaml
updated the tags listed. | @@ -43,6 +43,7 @@ Tags:
- metadata
- meteorological
- model
+ - opendap
- radiation
- satellite imagery
- solar
@@ -52,9 +53,6 @@ Tags:
- water
- weather
- zarr
- - NASA
- - ARCO
- - NASA Space Act Agreement
License: There are no restrictions on the use, access, and/or download of data from the NASA POWER Project. We r... |
Add missing `git add` in release
taken from most recent release process. | @@ -119,6 +119,7 @@ updates, leave it as it is.
```bash
git checkout master -b "version_bump_${NEXT_VER}"
python dev_tools/modules.py replace_version --old ${VER}.dev --new ${NEXT_VER}.dev
+git add .
git commit -m "Bump cirq version to ${NEXT_VER}"
git push origin "version_bump_${NEXT_VER}"
```
|
markdownlint fixes
README.md:581:121 MD013/line-length Line length [Expected: 120; Actual: 398]
99 | @@ -578,7 +578,10 @@ npm install @prettier/plugin-php
### Prettier Community Plugins
-Here's an [example SublimeText project](https://github.com/jonlabelle/SublimeJsPrettier/files/6498394/jsprettier-and-prettier-community-plugin-example.zip) \(posted in [Issue #239](https://github.com/jonlabelle/SublimeJsPrettier/issue... |
Move first query builder instantiation out of init and into Model.boot()
This allows for logic affecting the query builder (such as db connection
resource injection) to be injected by observer's "booting" event | @@ -216,7 +216,6 @@ class Model(TimeStampsMixin, ObservesEvents, metaclass=ModelMeta):
self._relationships = {}
self._global_scopes = {}
- self.get_builder()
self.boot()
@classmethod
@@ -278,12 +277,12 @@ class Model(TimeStampsMixin, ObservesEvents, metaclass=ModelMeta):
class_name = base_class.__name__
if class_name.e... |
update: enable new nautilus-only functionality
once the cluster is upgraded to nautilus, we can complete the process by
disallowing pre-nautilus OSDs and enabling all new nautilus-only functionality | - import_role:
name: ceph-client
+- name: complete upgrade
+ hosts:
+ - all
+ become: True
+ tasks:
+ - import_role:
+ name: ceph-defaults
+ - import_role:
+ name: ceph-facts
+
+ - name: container | disallow pre-nautilus OSDs and enable all new nautilus-only functionality
+ command: "{{ container_binary }} exec ceph-mo... |
add explanation about including 429 code
edit comments to describe 429 HTTP code that is included into count
of total (valid) responses counted for the availability SLO. | @@ -194,8 +194,8 @@ resource "google_monitoring_slo" "rating_service_availability_slo" {
"metric.label.\"response_code\"=\"200\""
])
- # The total is the number of non-4XX and 429 responses
- # We eliminate 4XX responses except 429 since they do not accurately represent server-side
+ # The total is the number of non-4X... |
ASTNode: delay automatic type resolution to checking pass...
... and consider for this all parse fields (i.e. including inheritted
ones). This will make it possible to tag as type resolved abstract
AST nodes that contain fields that are typed by the grammar.
TN: | @@ -1590,13 +1590,6 @@ class StructMetaclass(CompiledTypeMetaclass):
'Properties are not yet supported on plain structs'
)
- # Consider that AST nodes with type annotations for all their fields
- # are type resolved: they don't need to be referenced by the grammar.
- cls.is_type_resolved = (is_astnode and
- all(f._type... |
Update Raisecom.RCIOS profile
HG--
branch : feature/microservices | @@ -38,7 +38,7 @@ class Profile(BaseProfile):
if script.parent is None:
s_password = script.credentials.get("super_password", "")
self.pattern_more = [
- (r"^--More-- ", " "),
+ (r"^--More-- \(\d+% of \d+ bytes\)", "r"),
(r"^Enable: ", s_password + "\n")
]
|
Adding path_length method and the corresponding tests
Minor change in path_length documentation
Minor changes and added tests for path_length method
Add tests for path_length method | @@ -2793,6 +2793,27 @@ class Tree:
"""
return self._ll_tree.get_kc_distance(other._ll_tree, lambda_)
+ def path_length(self, u, v):
+ """
+ Returns the path length between two nodes
+ (i.e., the number of edges between two nodes in this tree).
+ If the two nodes have a most recent common ancestor, then this is defined ... |
Add key_type to CertificateUploadInputSchema
Parse cert body to determine algo | @@ -326,6 +326,7 @@ class CertificateUploadInputSchema(CertificateCreationSchema):
body = fields.String(required=True)
chain = fields.String(missing=None, allow_none=True)
csr = fields.String(required=False, allow_none=True, validate=validators.csr)
+ key_type = fields.String()
destinations = fields.Nested(AssociatedDe... |
[tests] Remove test_hackerspaces
wiki has been moved to https protocol
and access will not fail anymore. The test is obsolete then
(and the remaining tests will be enough). | @@ -196,10 +196,6 @@ class FailingSiteTestCase(SiteDetectionTestCase):
"""
self.assertNoSite('http://wiki.animutationportal.com/index.php/$1')
- def test_hackerspaces(self):
- """Test detection of MediaWiki sites for hackerspaces.org."""
- self.assertNoSite('http://hackerspaces.org/wiki/$1')
-
class APIDisabledTestCase... |
Improve the test by checking created dataset
This requires to
work | @@ -44,7 +44,12 @@ class TestBQUserDataset(unittest.TestCase):
unique_table_name = 'cf_test_table_' + str(uuid.uuid4()).replace('-', '_')
dataset = BQUserDataset.name(unique_table_name) \
.column(name='cartodb_id', type='INT64') \
- .column('the_geom', 'GEOMETRY')
-
- dataset.ttl_seconds(30)
+ .column('the_geom', 'GEOM... |
Do type checking for the input and kernel in the qnn conv2d
* [QNN] Convolution 2D Implementation.
Rebasing. Empty commit.
Clang-format styling.
* Reformatting code.
* Fixing lint issues. | @@ -40,6 +40,26 @@ namespace qnn {
// relay.op.qnn.conv2d
TVM_REGISTER_NODE_TYPE(QnnConv2DAttrs);
+bool QnnConv2DRel(const Array<Type>& types,
+ int num_inputs,
+ const Attrs& attrs,
+ const TypeReporter& reporter) {
+ CHECK_EQ(types.size(), 3);
+ const auto* data = types[0].as<TensorTypeNode>();
+ const auto* weight =... |
Update integration.rst
Made open source integrations link into a note to emphasize and make consistent with Overview>Integrations Overview. | Mattermost Integration Guide
----------------------------
-Documentation on extending and integrating with the Mattermost server. For developer focused documentation, see `https://developers.mattermost.com/ <https://developers.mattermost.com/>`_. To see what integrations are currently available, see `https://about.matt... |
Vehicles are cuboids, not cylinders!
See | @@ -17,7 +17,7 @@ class BicycleVehicle(Vehicle):
MASS: float = 1 # [kg]
LENGTH_A: float = Vehicle.LENGTH / 2 # [m]
LENGTH_B: float = Vehicle.LENGTH / 2 # [m]
- INERTIA_Z: float = 1/12 * MASS * (Vehicle.LENGTH ** 2 + 3 * Vehicle.WIDTH ** 2) # [kg.m2]
+ INERTIA_Z: float = 1/12 * MASS * (Vehicle.LENGTH ** 2 + Vehicle.WIDT... |
Fixed time conversion error ScansAPI.list
If datetime object is passed as per the documentation an error is thrown as mktime is expecting an time tuple instead of a datetime object. Modified the code to convert to a timetuple after type checking has happened. | @@ -587,7 +587,7 @@ class ScansAPI(TIOEndpoint):
# for the last_modified datetime attribute, we will want to convert
# that into a timestamp integer before passing it to the API.
params['last_modified'] = int(time.mktime(self._check(
- 'last_modified', last_modified, datetime)))
+ 'last_modified', last_modified, dateti... |
m1n1.hw.uat: fix VA_MASK
Was missing the lowest bits, which broke unaligned reads/writes | @@ -48,6 +48,7 @@ class UAT(Reloadable):
self.VA_MASK = 0
for (off, size) in self.LEVELS:
self.VA_MASK |= (size - 1) << off
+ self.VA_MASK |= self.PAGE_SIZE - 1
def set_ttbr(self, addr):
self.ttbr = addr
|
Update 2.7.rst
Fixed another broken link - issue h5py#1145 | @@ -88,7 +88,7 @@ Other changes
.. _`#811` : https://github.com/h5py/h5py/pull/811
.. _`#812` : https://github.com/h5py/h5py/pull/812
.. _`HDF5 Direct Chunk Write` : https://support.hdfgroup.org/HDF5/doc/Advanced/DirectChunkWrite/
-.. _`HDF5 File Image Operations` : http://www.hdfgroup.org/HDF5/doc/Advanced/FileImageOp... |
CodeSnippets: refactor on_message
Reduce nesting and code duplication. | @@ -222,7 +222,9 @@ class CodeSnippets(Cog):
@Cog.listener()
async def on_message(self, message: Message) -> None:
"""Checks if the message has a snippet link, removes the embed, then sends the snippet contents."""
- if not message.author.bot:
+ if message.author.bot:
+ return
+
all_snippets = []
for pattern, handler i... |
only catch `dropbox.exceptions.ApiError` in `get_metadata` ...
... and raise for instance AuthError, etc | @@ -53,6 +53,7 @@ OS_FILE_ERRORS = (
PermissionError,
)
+
def bytes_to_str(num, suffix='B'):
"""
Convert number to a human readable string with decimal prefix.
@@ -235,7 +236,7 @@ class MaestralApiClient(object):
try:
md = self.dbx.files_get_metadata(dbx_path, **kwargs)
logger.debug(f"Retrieved metadata for '{md.path_d... |
Harden 'create_bucket' systest against 429 responses.
Closes | @@ -94,7 +94,7 @@ class TestStorageBuckets(unittest.TestCase):
new_bucket_name = 'a-new-bucket' + unique_resource_id('-')
self.assertRaises(exceptions.NotFound,
Config.CLIENT.get_bucket, new_bucket_name)
- created = Config.CLIENT.create_bucket(new_bucket_name)
+ created = retry_429(Config.CLIENT.create_bucket)(new_buck... |
Update test.yml
Trying to fix pytorch installation problem | @@ -27,7 +27,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- pip install torch==1.6.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
+ pip install torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html
pip install -... |
Call update_search for project so it shows up in results
[#PLAT-1176] | @@ -80,10 +80,12 @@ class ApiSearchTestCase:
@pytest.fixture()
def project(self, user_one):
- return ProjectFactory(
+ project = ProjectFactory(
title='Graduation',
creator=user_one,
is_public=True)
+ project.update_search()
+ return project
@pytest.fixture()
def project_public(self, user_one):
|
[Network] Description of network bastion tunnel command
Description
Corrected the description of network bastion tunnel command and its corresponding example. Also removed an "(autogenerated)" suffix attached to the example description for the network bastion show command which didn't make sense to me. | @@ -7346,7 +7346,7 @@ helps['network bastion show'] = """
type: command
short-summary: Show a Azure bastion host machine.
examples:
- - name: Show a Azure bastion host machine. (autogenerated)
+ - name: Show a Azure bastion host machine.
text: |
az network bastion show --name MyBastionHost --resource-group MyResourceGr... |
Modify unit test
cr: | @@ -277,11 +277,6 @@ class TestRequests(unittest.TestCase):
'OptionName': 'EnableSpot',
'Value': 'true'
},
- {
- 'Namespace': 'aws:ec2:instances',
- 'OptionName': 'InstanceTypes',
- 'Value': 't2.micro, t2.large'
- },
{
'Namespace': 'aws:ec2:instances',
'OptionName': 'SpotMaxPrice',
|
[dynamic] multi out map test
Summary: created when attempting to repro a report
Test Plan: added test
Reviewers: cdecarolis, sandyryza, owen, yuhan | import pytest
-from dagster import execute_solid, solid
+from dagster import execute_pipeline, execute_solid, pipeline, solid
from dagster.core.definitions.events import Output
from dagster.core.definitions.output import OutputDefinition
from dagster.core.errors import DagsterInvalidDefinitionError, DagsterInvariantVio... |
synchronizer: ensure fairness between wallets
Scenario (prior to change):
User opens wallet1 with 10k addresses, and then immediately opens wallet2
with 100 addresses.
wallet1 will synchronise first, fully, and only then will wallet2 start syncing.
Now, wallet1 and wallet2 will sync concurrently (and wallet2 will finis... | @@ -61,6 +61,10 @@ class SynchronizerBase(NetworkJobOnDefaultServer):
def __init__(self, network: 'Network'):
self.asyncio_loop = network.asyncio_loop
self._reset_request_counters()
+ # Ensure fairness between Synchronizers. e.g. if multiple wallets
+ # are open, a large wallet should not starve the small wallets:
+ se... |
Fix type of FileKeyring.keyring_path
This type is always non-None as it is assigned in __init__ from a call that returns non-None Path | @@ -123,7 +123,7 @@ class FileKeyring(FileSystemEventHandler):
The salt is updated each time the master passphrase is changed.
"""
- keyring_path: Optional[Path] = None
+ keyring_path: Path
keyring_lock_path: Path
keyring_observer: Observer = None
load_keyring_lock: threading.RLock # Guards access to needs_load_keyring... |
Update kpot.txt
New trails + generalization | @@ -14,24 +14,37 @@ seeyouonlineservice.com
# Reference: https://twitter.com/James_inthe_box/status/1108789993923723264
/DJvS7iHPfoXDzPvo/gate.php
+/DJvS7iHPfoXDzPvo/login.php
# Reference: https://twitter.com/4chr4f2/status/1103316628245164032
+/NIwxn5JBvMom6naz/gate.php
/NIwxn5JBvMom6naz/login.php
# Reference: https:/... |
tests: Remove ignored parameters from custom profile field tests.
`update_realm_custom_profile_field` does not take `field_type`
as a parameter, so this removes it from any related tests.
Possibly these test parameters were missed in a refactor of this
endpoint / code. | @@ -415,21 +415,21 @@ class UpdateCustomProfileFieldTest(CustomProfileFieldTestCase):
realm = get_realm("zulip")
result = self.client_patch(
"/json/realm/profile_fields/100",
- info={"name": "Phone number", "field_type": CustomProfileField.SHORT_TEXT},
+ info={"name": "Phone number"},
)
self.assert_json_error(result, "... |
Add CII badge
We are currently determining our level of compliance, so this is a work in progress. | @@ -3,13 +3,15 @@ A Framework for Securing Software Update Systems
.. image:: https://travis-ci.org/theupdateframework/tuf.svg?branch=develop
:target: https://travis-ci.org/theupdateframework/tuf
+ :alt: Travis
.. image:: https://coveralls.io/repos/theupdateframework/tuf/badge.svg?branch=develop
:target: https://covera... |
use `shutil.move` instead of `os.replace` ...
... in case we need to move across file system borders | @@ -2296,7 +2296,8 @@ class UpDownSync:
# replace it and remove all its children.
# we download to a temporary file first (this may take some time)
- with tempfile.NamedTemporaryFile(delete=False) as f:
+ with tempfile.NamedTemporaryFile(prefix='maestral_download_',
+ delete=False) as f:
tmp_fname = f.name
md = self.cl... |
replay: only keep one init_data in merged events
don't merge init_data | @@ -269,9 +269,13 @@ void Replay::mergeSegments(const SegmentMap::iterator &begin, const SegmentMap::
new_events_->reserve(new_events_size);
for (int n : segments_need_merge) {
const auto &e = segments_[n]->log->events;
- auto middle = new_events_->insert(new_events_->end(), e.begin(), e.end());
+ if (e.size() > 0) {
+... |
Adapt existing content from elsewhere to document [91mYamlSyntaxException: Failed to read 'data/test_wrong_yaml_stories/wrong_yaml.yml'. while parsing a flow node
did not find expected node content
in "data/test_wrong_yaml_stories/wrong_yaml.yml", line 2, column 1
You can use to validate the YAML syntax of your file.... | @@ -21,6 +21,7 @@ abstract: The command line interface (CLI) gives you easy-to-remember commands f
|`rasa test` |Tests a trained Rasa model on any files starting with `test_`. |
|`rasa data split nlu` |Performs a 80/20 split of your NLU training data. |
|`rasa data convert` |Converts training data between different for... |
Add `check_redirect_on_user_query` helper function
Extract the checking for a redirect to reduce complexity | @@ -1171,35 +1171,12 @@ def merge_tickets(request):
})
-@helpdesk_staff_member_required
-def ticket_list(request):
- context = {}
-
- huser = HelpdeskUser(request.user)
-
- # Query_params will hold a dictionary of parameters relating to
- # a query, to be saved if needed:
- query_params = {
- 'filtering': {},
- 'filter... |
Update strawberryfields/decompositions.py
Docstring change | @@ -168,7 +168,8 @@ def nullT(n, m, U):
def clements(V, tol=1e-11):
- r"""Performs the Clements decomposition of a Unitary complex matrix.
+ r"""Performs the Clements decomposition of a unitary complex matrix, with local
+ phase shifts applied between two interferometers.
See Clements et al. Optica 3, 1460 (2016) [10.1... |
Code block: refactor `send_guide_embed`
* Rename to `send_instructions` to be consistent with the use of
"instructions" rather than "guide" elsewhere
* Rename the `description` parameter to `instructions` | @@ -76,15 +76,15 @@ class CodeBlockCog(Cog, name="Code Block"):
or channel.id in self.channel_whitelist
)
- async def send_guide_embed(self, message: discord.Message, description: str) -> None:
+ async def send_instructions(self, message: discord.Message, instructions: str) -> None:
"""
- Send an embed with `descriptio... |
Remove 2 of 3 types of 'get_saved_export'
There are 3 different signatures of this method in this file - one which
accepts domain and schema ID, one which accepts domain, app_id, and
identifier, and an SMS one that looks like it should match the first,
but accepts domain and a boolean | @@ -281,13 +281,6 @@ class BaseDownloadExportView(HQJSONResponseMixin, BaseProjectDataView):
"""
raise NotImplementedError("You must implement download_export_form.")
- @staticmethod
- def get_export_schema(domain, export_id):
- doc = get_document_or_404_lite(SavedExportSchema, export_id)
- if doc.index[0] == domain:
-... |
Make testManyArgs actually test pmap with many args
For some reason the test has always been passing a single array since it was added,
which seems contradictory with its purpose. | @@ -1690,7 +1690,7 @@ class PythonPmapTest(jtu.JaxTestCase):
vals = list(range(500))
ndevices = jax.device_count()
- self.assertAllClose(f(jnp.array([vals] * ndevices)),
+ self.assertAllClose(f([np.array([i] * ndevices) for i in range(500)]),
jnp.array([sum(vals)] * ndevices))
def testPostProcessMap2(self):
|
New link. Looked at similar architecture
(Big slanty building) | @@ -176,6 +176,8 @@ id: tx-dallas-4
The first-person video shows an individual running away from what seem to be loud explosions.
+Additional footage shows a protest in the same vicinity. Police sound a siren and protestors begin to back away. Police then begin releasing tear gas.
+
tags: flashbangs, tear-gas
id: tx-da... |
Webhooks: add support for multi-file upload
`Webhook.send()` now accepts a `files` kwarg holding a list of `File`
objects, which are included in the HTTP request as `file1`, `file2` and
so on.
This is an undocumented feature of the Discord API, but is analogous
with the client's sending of messages with multiple files. | @@ -104,13 +104,20 @@ class WebhookAdapter:
# mocks a ConnectionState for appropriate use for Message
return BaseUser(state=self, data=data)
- def execute_webhook(self, *, payload, wait=False, file=None):
+ def execute_webhook(self, *, payload, wait=False, file=None, files=None):
if file is not None:
multipart = {
'fil... |
An extra kill_process_psutil utility
* Add a function that terminate a `psutil.Process` instance and all of
its child processes.
* The original kill_process function also use `psutil` to kill child
processes, but we need to catch NoSuchProcess exception because after
a process is terminated some related processes may a... | @@ -29,7 +29,6 @@ def kill_process(proc, timeout=5, signal_=None, output=None):
If alive, kills the process.
First call ``terminate()`` or pass ``signal_`` if specified
to terminate for up to time specified in timeout parameter.
-
If process hangs then call ``kill()``.
:param proc: process to kill
@@ -38,23 +37,16 @@ d... |
Fix 12377
For Debian issue. | @@ -13,11 +13,12 @@ from .core import file_reader, file_writer
# Register read and write methods into Astropy:
# determine if it is 1) installed and 2) the correct version (v5.0+)
try:
+ import astropy
from astropy.utils.introspection import minversion
except ImportError:
ASTROPY_GE_5 = False
else:
- ASTROPY_GE_5 = min... |
Update Ads1115.py
Use port variable | @@ -12,7 +12,7 @@ if ('virtual' in globals() and virtual):
# This section is to be used if you use the i2c pins of the Arduino
arduino = Runtime.start("Arduino","Arduino")
-arduino.connect("COM3")
+arduino.connect(port)
# Sleep so that the Arduino can be initialized
sleep(4)
ads1115.attach(arduino,"1","0x48")
|
Fixed travis error:
- Comited wrong ingest.py file. | @@ -38,6 +38,7 @@ def find_diff(input_type, output_type, index, time_size, **query):
tiles_in = workflow.list_cells(product=input_type.name, **query)
tiles_out = workflow.list_cells(product=output_type.name, **query)
+ #TODO(csiro) Remove duplicates based on dataset_id / time. Could contain duplicates.
tasks = [{'tile'... |
update shell_plus to not save ipython history when using Jupyter
xref: | @@ -204,7 +204,7 @@ class Command(BaseCommand):
return {'django_extensions': ks}
- def run_notebookapp(self, app_init, options, use_kernel_specs=True):
+ def run_notebookapp(self, app_init, options, use_kernel_specs=True, history=True):
no_browser = options['no_browser']
if self.extra_args:
@@ -235,6 +235,10 @@ class C... |
swarming: improve logging in poll
Print out the bot id earler to help diagnosing failures; especially with
dimensions longer than 1500 bytes, which causes a BadValueError
exception. | @@ -318,7 +318,7 @@ class _BotBaseHandler(_BotApiHandler):
leased_indefinitely = None
machine_type = None
if bot_id:
- logging.debug('Fetching bot info and settings')
+ logging.debug('Fetching bot info and settings for bot id: %s', bot_id)
bot_info, bot_settings = ndb.get_multi([
bot_management.get_info_key(bot_id),
bo... |
Use Function to implement fork.
Summary:
Pull Request resolved:
This ensures normal optimization passes run for forked functions.
Test Plan: Imported from OSS | @@ -371,8 +371,8 @@ struct CodeImpl {
std::vector<IValue> constant_table_;
std::vector<Operation> operator_table_;
std::vector<Function*> function_table_;
+ std::vector<std::unique_ptr<GraphFunction>> forked_functions_;
std::vector<TypePtr> type_table_;
- std::vector<Code> code_table_;
std::vector<std::function<void(st... |
Enable elasticsearch in setup-elastic.sh
By enabling elasticsearch in setup-elastic.sh we provide
more support for persistent infra | @@ -59,6 +59,11 @@ else
systemctl restart elasticsearch
fi
+if ! systemctl is-enabled --quiet elasticsearch; then
+ echo "[+] Enabling Elasticsearch"
+ systemctl enable elasticsearch
+fi
+
if ! systemctl is-active --quiet elasticsearch; then
echo "[!] Failed to start Elasticsearch!" && exit 3
fi
|
update ANSYSCDBMeshIO.read() to determine true number of fields
fixes reading files with wrong nblock/eblock information
update make_format() | @@ -9,8 +9,8 @@ from sfepy.base.base import (complex_types, dict_from_keys_init,
assert_, is_derived_class, ordered_iteritems,
insert_static_method, output, get_default,
get_default_attr, Struct, basestr)
-from sfepy.base.ioutils \
- import skip_read_line, read_token, read_array, read_list, pt, enc, dec
+from sfepy.bas... |
Bug Regenerate session_secret if it can't be used with oauth-proxy
session_secret generated by 3.10 is 200 bytes. oauth-proxy can use 16, 24 or 32
bytes session_secret. | copy:
content: "{{ 32 | lib_utils_oo_random_word }}"
dest: "{{ generated_certs_dir }}/session_secret"
- when:
- - not session_secret_file.stat.exists
+ when: not session_secret_file.stat.exists or session_secret_file.stat.size > 50
# gen oauth_secret if necessary
- name: Generate oauth secret
|
Limit guard in can_add_batch if no summary
After a summary has been created, no more batches can be added, so the
guard around queue and block sizes should only be used when there is no
summary. | @@ -113,7 +113,8 @@ impl CandidateBlock {
}
pub fn can_add_batch(&self) -> bool {
- self.max_batches == 0 || self.pending_batches.len() < self.max_batches
+ self.summary.is_none()
+ && (self.max_batches == 0 || self.pending_batches.len() < self.max_batches)
}
fn check_batch_dependencies_add_batch(&mut self, batch: &Bat... |
Accept underscore, as well as dash, separated dates
The underscore separated format (e.g 2018_10) is used elsewhere in the
system and it simplifies things if we can accept the same format here. | @@ -3,9 +3,9 @@ DEFAULT_NUM_MONTHS = 60
def generate_dates(end_str, months=None):
"""
- Given an end date as a string in YYYY-MM form, return a list of N
- consecutive months as strings in YYYY-MM-01 form, with that month as the
- final member
+ Given an end date as a string in YYYY-MM form (or the underscore separated... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.