message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
Change PATH for "ip addr list" command so it could work with cloud-user
It's needed for some custom images like RHEL7 where /usr/sbin/ is not
enabled by default for users under test.
Closes-bug: | @@ -239,7 +239,8 @@ class TrunkTest(base.BaseTempestTestCase):
# Configure VLAN interfaces on server
command = CONFIGURE_VLAN_INTERFACE_COMMANDS % {'tag': vlan_tag}
server['ssh_client'].exec_command(command)
- out = server['ssh_client'].exec_command('ip addr list')
+ out = server['ssh_client'].exec_command(
+ 'PATH=$PA... |
add simplification for Ravel._add
This patch promotes ravel through add unconditionally, rather than only in
the situation that both terms have matching structure. | @@ -3146,8 +3146,7 @@ class Ravel(Array):
return Ravel(Multiply([self.func, Unravel(other, *self.func.shape[-2:])]))
def _add(self, other):
- if isinstance(other, Ravel) and equalshape(other.func.shape[-2:], self.func.shape[-2:]):
- return Ravel(Add([self.func, other.func]))
+ return Ravel(self.func + Unravel(other, *s... |
fix urllib.reverse example
Responding to | @@ -76,7 +76,7 @@ in js
```
var urllib = hqImport('hqwebapp/js/urllib.js');
var widgetId = 'xxxx';
-$.get(urllib.reverse('more_widget_info'), widgetId).done(function () {...});
+$.get(urllib.reverse('more_widget_info', widgetId)).done(function () {...});
```
|
Disable native wayland for snap
Snap is using QT4 (due to lack of pyside2 in core18) which is not compatible with Wayland.
Hopefully this should prevent from occurring. | @@ -29,6 +29,8 @@ apps:
syncplay:
command: bin/desktop-launch $SNAP/usr/bin/python3 $SNAP/bin/syncplay
desktop: lib/python3.5/site-packages/syncplay/resources/syncplay.desktop
+ environment:
+ DISABLE_WAYLAND: 1
syncplay-server:
command: bin/syncplay-server
|
dcos-integration-test:test task streaming endpoint
make sure master adminrouter can proxy request to agent adminrouter to read
the dcos-log streaming endpoint. | @@ -95,6 +95,15 @@ def test_task_logs(dcos_api_session):
check_log_entry('STDOUT_LOG', url + '?filter=STREAM:STDOUT', dcos_api_session)
check_log_entry('STDERR_LOG', url + '?filter=STREAM:STDERR', dcos_api_session)
+ stream_url = get_task_url(dcos_api_session, task_id, stream=True)
+ response = dcos_api_session.get(str... |
Add Archive.org API + Internet Archive category
Add the internet archive API (link to docs) and include its own category, since it covers a many areas. | @@ -34,6 +34,7 @@ Please note a passing build status indicates all listed APIs are available since
* [Geocoding](#geocoding)
* [Government](#government)
* [Health](#health)
+* [Internet Archive](#internet-archive)
* [Jobs](#jobs)
* [Machine Learning](#machine-learning)
* [Music](#music)
@@ -407,6 +408,11 @@ API | Descr... |
Add Sanic-Plugins-Framework library to Extensions doc
I made a new tool for devs to use for easily and quickly creating Sanic Plugins (extensions), and for application builders to easily use those plugins in their app. | # Extensions
A list of Sanic extensions created by the community.
-
+- [Sanic-Plugins-Framework](https://github.com/ashleysommer/sanicpluginsframework): Library for easily creating and using Sanic plugins.
- [Sessions](https://github.com/subyraman/sanic_session): Support for sessions.
Allows using redis, memcache or an... |
Update API docs link and remove travisCI mention
Fixes | @@ -72,10 +72,7 @@ your code. You can run only the linting checks by using this command:
The project's configuration instructs tox to test against many different
versions of Python. A tox test will use as many of those as it can find on your
-local computer. Rather than installing all those versions, we recommend that
... |
Added support for PCIe TPU, as well as USB
Also added message showing which found | @@ -31,7 +31,12 @@ class ObjectDetector():
def __init__(self):
edge_tpu_delegate = None
try:
- edge_tpu_delegate = load_delegate('libedgetpu.so.1.0')
+ edge_tpu_delegate = load_delegate('libedgetpu.so.1.0', {"device": "usb"})
+ print("USB TPU found")
+ except ValueError:
+ try:
+ edge_tpu_delegate = load_delegate('libe... |
utils.types.not_implemented_error: fix properties handling
TN: | @@ -182,6 +182,8 @@ def not_implemented_error(self_or_cls, method): # no-code-coverage
:rtype: NotImplementedError
"""
cls = self_or_cls if inspect.isclass(self_or_cls) else type(self_or_cls)
+ if isinstance(method, property):
+ method = method.fget
return NotImplementedError('{} must override method {}'.format(
cls.__... |
Fix broken unit test test_network_absent
This started failing following commit which relied on the
'Name' key being present in the return value of docker.networks -
as the mock didn't have this set the test started failing. | @@ -69,10 +69,14 @@ class DockerNetworkTestCase(TestCase, LoaderModuleMockMixin):
'''
docker_remove_network = Mock(return_value='removed')
docker_disconnect_container_from_network = Mock(return_value='disconnected')
+ docker_networks = Mock(return_value=[{
+ 'Name': 'network_foo',
+ 'Containers': {'container': {}}
+ }]... |
Fix PIL augs failing on ndarray as batch.images
Some augmenters in `imgaug.augmenters.pillike` failed when
`batch.images` was a single ndarray instead of a list of
arrays. This patch fixes the underlying issues. | @@ -66,6 +66,10 @@ from . import size as sizelib
from .. import parameters as iap
+# TODO some of the augmenters in this module broke on numpy arrays as
+# image inputs (as opposed to lists of arrays) without any test failing
+# add appropriate tests for that
+
_EQUALIZE_USE_PIL_BELOW = 64*64 # H*W
@@ -1380,7 +1384,7 @... |
Connected components check in pageseg.segment()
Re-add old ocropy cc check to skip processing empty pages with lots of
noise. Resolves and | @@ -377,6 +377,11 @@ def segment(im, text_direction: str = 'horizontal-lr',
binary = np.array(a > 0.5*(np.amin(a) + np.amax(a)), 'i')
binary = 1 - binary
+ _, ccs = morph.label(binary)
+ if ccs > np.dot(*im.size)/(30*30):
+ logger.warning(f'To many connected components for a page image: {ccs}')
+ return {'text_directio... |
panels: Fix incorrect frb positioning.
The previous `top_offset` calculation didn't include the height
of the panels which led the calculations to be performed as if
a portion which was hidden behind the searchbox, was visible to
the user.
The new formula is corect as the frb_top calculation in
panel.resize_app also us... | @@ -9,7 +9,7 @@ import * as timerender from "./timerender";
let is_floating_recipient_bar_showing = false;
function top_offset(elem) {
- return elem.offset().top - $("#message_view_header").safeOuterHeight();
+ return elem.offset().top - $("#message_view_header").safeOuterHeight() - $("#panels").height();
}
export func... |
Return newly created SignedTransaction when `sign` is invoked.
This is useful for tearing down/rebuilding and passing transactions
around. | @@ -345,6 +345,7 @@ class TransactionBuilder(dict):
signedtx.sign(self.wifs, chain=self.blockchain.rpc.chain_params)
self["signatures"].extend(signedtx.json().get("signatures"))
+ return signedtx
def verify_authority(self):
""" Verify the authority of the signed transaction
|
Removed an except clause which was only there to support Python 2.4 on Linux.
Since we don't support versions of Python before 2.7 anymore, this was not needed. | @@ -234,9 +234,10 @@ pastebufferr = """Redirecting to or from paste buffer requires %s
to be installed on operating system.
%s"""
+# Can we access the clipboard?
+can_clip = False
if sys.platform == "win32":
# Running on Windows
- can_clip = False
try:
import win32clipboard
@@ -265,7 +266,6 @@ if sys.platform == "win32... |
Using windows line breaks by default.
Resolves | return ClipboardJS.isSupported();
},
textFileLink() {
- const errorBlob = new Blob([this.text], { type: 'text/plain' });
+ const windowsFormattedText = this.text.replace('\n', '\r\n');
+ const errorBlob = new Blob([windowsFormattedText], { type: 'text/plain', endings: 'native' });
if (navigator.msSaveBlob) {
return nav... |
feat: pass additional params to ansible-playbook
Allow the user to pass additional parameters to the underlying command
`ansible-playbook`, except -h, -l, -p and -n (if they should exist).
Eg: bluebanquise-playbook -p computes -n c[001-002] --tags time | @@ -5,24 +5,32 @@ export ANSIBLE_CONFIG=/etc/bluebanquise
usage() {
echo "Usage:
$(basename $0) -l
- $(basename $0) -p <playbook> [-n <nodeset>]
+ $(basename $0) -p <playbook> [-n <nodeset>] [ansible-playbook parameters]
+
+Runs Ansible playbooks, executing the defined playbook on the targeted nodes.
Options:
+ -h prin... |
use cast_withscale in function.replace_arguments
This patch generalizes function.replace_arguments to the broader class of
array-like arguments that support Numpy's dispatch protocol. | @@ -2850,7 +2850,8 @@ def replace_arguments(__array: IntoArray, __arguments: Mapping[str, IntoArray])
:class:`Array`
'''
- return _Replace(Array.cast(__array), {k: Array.cast(v) for k, v in __arguments.items()})
+ array, scale = Array.cast_withscale(__array)
+ return _Replace(array, {k: Array.cast(v) for k, v in __argu... |
Fix extension for compiled python files for start.c (.pyo/.pyc)
Because as of Python 3.5, the .pyo filename extension is no longer used
See also: `PEP 488 -- Elimination of PYO files` (https://www.python.org/dev/peps/pep-0488/) | @@ -305,6 +305,11 @@ int main(int argc, char *argv[]) {
/* Get the entrypoint, search the .pyo then .py
*/
char *dot = strrchr(env_entrypoint, '.');
+#if PY_MAJOR_VERSION > 2
+ char *ext = ".pyc";
+#else
+ char *ext = ".pyo";
+#endif
if (dot <= 0) {
LOGP("Invalid entrypoint, abort.");
return -1;
@@ -313,14 +318,14 @@ i... |
api/pupdevices/UltrasonicSensor: drop silent
Like its EV3 counterpart, this does not work reliably enough, so remove. | @@ -244,15 +244,10 @@ class UltrasonicSensor:
"""
pass
- def distance(self, silent=False):
+ def distance(self):
"""Measures the distance between the sensor and an object using
ultrasonic sound waves.
- Arguments:
- silent (bool): Choose ``True`` to turn the sensor off after
- measuring the distance. This reduces inter... |
EmptyArray: replace use of LiteralExpr with CallExpr
TN: | @@ -1616,7 +1616,7 @@ class EmptyArray(AbstractExpression):
@staticmethod
def construct_static(array_type, abstract_expr=None):
- return LiteralExpr('Create (Items_Count => 0)', array_type,
+ return CallExpr('Create', array_type, ['Items_Count => 0'],
result_var_name='Empty_Array',
abstract_expr=abstract_expr)
|
Update README.rst
Update broken banners for Build_Status, Coverage and Version | @@ -212,13 +212,9 @@ Staff at
repository-admin@oasis-open.org and any specific CLA-related questions
to repository-cla@oasis-open.org.
-.. |Build_Status| image:: https://travis-ci.org/oasis-open/cti-python-
-stix2.svg?branch=master
+.. |Build_Status| image:: https://travis-ci.org/oasis-open/cti-python-stix2.svg?branch=... |
changelog: Make references to "Recent topics" consistent.
Updates the current 6.0 release notes to include information about
the rename to "Recent conversations", and updates past references
to "recent topics" to be consistently formatted as "Recent topics". | @@ -64,9 +64,10 @@ log][commit-log] for an up-to-date list of raw changes.
clearer and link to the Zulip server troubleshooting guide.
- Redesigned the interface for configuring message editing and
deletion permissions to be easier to understand.
-- Improved Recent Topics. The timestamp links now go to the latest
- mes... |
typing: don't accidentally use typing.Self
We can switch to it when all type checkers have support | import collections # Needed by aliases like DefaultDict, see mypy issue 2986
import sys
-from _typeshed import Self, SupportsKeysAndGetItem
+from _typeshed import Self as TypeshedSelf, SupportsKeysAndGetItem
from abc import ABCMeta, abstractmethod
from types import BuiltinFunctionType, CodeType, FrameType, FunctionType... |
fix lsr bug
fix lsr bug in image classification | @@ -41,7 +41,7 @@ def _basic_model(data, model, args, is_train):
if is_train and args.use_label_smoothing:
cost = _calc_label_smoothing_loss(softmax_out, label, args.class_dim,
- args.epsilon)
+ args.label_smoothing_epsilon)
else:
cost = fluid.layers.cross_entropy(input=softmax_out, label=label)
@@ -93,9 +93,9 @@ def _... |
Expose Dec_Ref and Inc_Ref for entities to $.Analysis clients
TN: | @@ -346,6 +346,9 @@ package ${ada_lib_name}.Analysis is
Empty_Env : Lexical_Env renames AST_Envs.Empty_Env;
No_Entity_Info : Entity_Info renames AST_Envs.No_Entity_Info;
+ procedure Inc_Ref (E : Entity) renames AST_Envs.Inc_Ref;
+ procedure Dec_Ref (E : in out Entity) renames AST_Envs.Dec_Ref;
+
## Declare arrays of le... |
Mock out station_api.ApiServer in test.TestCase
Test.__init__ call station_api.start_server() that starts an ApiServer(). | @@ -127,6 +127,7 @@ from openhtf import plugs
from openhtf import util
from openhtf.core import measurements
from openhtf.core import phase_executor
+from openhtf.core import station_api
from openhtf.core import test_record
from openhtf.core import test_state
from openhtf.util import conf
@@ -322,6 +323,11 @@ class Tes... |
pkg_analysis_body_ada.mako: Rename Child_Number into Child_Index
TN: | @@ -1175,7 +1175,7 @@ package body ${ada_lib_name}.Analysis is
${array_types.body(LexicalEnvType.array)}
${array_types.body(T.root_node.entity.array)}
- function Child_Number
+ function Child_Index
(Node : access ${root_node_value_type}'Class)
return Positive
with Pre => Node.Parent /= null;
@@ -2742,11 +2742,11 @@ pac... |
Register stats from request_success and request_failure
Old update was causing breaking issues. | @@ -71,12 +71,15 @@ class Runner:
self.target_user_count = None
# set up event listeners for recording requests
- def on_request(request_type, name, response_time, response_length, exception, context, **kwargs):
+ def on_request_success(request_type, name, response_time, response_length, **_kwargs):
+ self.stats.log_re... |
Adding a unit test with the empty list case in `KeyRange.to_pb()`.
Also reworked the `to_pb()` tests to just create a protobuf and
just use one assertion. | @@ -93,31 +93,58 @@ class TestKeyRange(unittest.TestCase):
self.assertEqual(krange.end_closed, None)
def test_to_pb_w_start_closed_and_end_open(self):
+ from google.protobuf.struct_pb2 import ListValue
+ from google.protobuf.struct_pb2 import Value
from google.cloud.spanner_v1.proto.keys_pb2 import KeyRange
- KEY_1 = [... |
Fix file skipping
files_wanted and files_unwanted need to provide indices. Previously, these were providing the File objects themselves from the file_list, which transmission can't recognize. | @@ -579,7 +579,7 @@ class PluginTransmission(TransmissionBase):
if options['post'].get('main_file_only') and main_id is not None:
# Set Unwanted Files
options['change']['files_unwanted'] = [
- x for x in file_list if x not in dl_list
+ x for x in range(len(file_list)) if x not in dl_list
]
options['change']['files_want... |
Avoid DB requests when making health checks
This allows us to do more custom things when the DB is unavailable, such as querying the cache.
This also reduces pressure on the DB. | @@ -91,11 +91,7 @@ def base(request):
def health(request):
- c = Channel.objects.first()
- if c:
- return HttpResponse(c.name)
- else:
- return HttpResponse("No channels created yet!")
+ return HttpResponse("Healthy!")
def stealth(request):
|
faq: update fio command
Via: | @@ -271,14 +271,14 @@ The Direct mode wraps the Write request into the I/O command and sends this comm
- Random Read test:
- ```
- ./fio -ioengine=libaio -bs=32k -direct=1 -thread -rw=randread -size=10G -filename=fio_randread_test.txt -name='PingCAP' -iodepth=4 -runtime=60
+ ```bash
+ ./fio -ioengine=psync -bs=32k -fda... |
2.0b15-release-notes
Mostly block slugs | # Prefect Release Notes
+## 2.0b15
+
+### Uniquely refer to blocks with slugs
+Blocks are a convienient way to secure store and retreive configuration. Now, retreiving configuration stored with blocks is even easier with slugs, both human and machine readable unique identifiers. By deafult, slugs are a concatination of... |
Add test case for calling c10 ops from pytorch
Summary: Pull Request resolved: | @@ -9968,6 +9968,16 @@ tensor([[[1., 1., 1., ..., 1., 1., 1.],
do_test(torch.tensor([[1, 2]]).data)
do_test(torch.tensor([[1, 2]]).detach())
+ def test_c10_layer_norm(self):
+ # test that we can call c10 ops and they return a reasonable result
+ X = torch.rand(5, 5, dtype=torch.float)
+ epsilon = 1e-4
+
+ expected_norm... |
TST: updated param tests
Updated param tests by using new test function and improving docstrings. | @@ -12,9 +12,10 @@ import pytest
import shutil
import tempfile
-import pysat # required for reimporting pysat
-from pysat._params import Parameters # required for eval statements
+import pysat # Required for reimporting pysat
+from pysat._params import Parameters # Required for eval statements
from pysat.tests.classes.... |
CI: let pip handle attrs implicitly from databroker
the conda version is too old | @@ -54,7 +54,7 @@ before_install:
install:
- export GIT_FULL_HASH=`git rev-parse HEAD`
- conda create -n testenv python=$TRAVIS_PYTHON_VERSION scipy matplotlib numpy h5py -c conda-forge -c defaults --override-channels
- - conda install -n testenv nose jsonschema traitlets pytest coverage pip databroker ophyd historydic... |
Update __main__.py
Added back checking for an `--age` argument for `sos purge`. Was dropped in | @@ -1738,7 +1738,7 @@ def cmd_purge(args, workflow_args):
# from .monitor import summarizeExecution
env.verbosity = args.verbosity
try:
- if not (args.tasks or args.all or args.status or args.tags):
+ if not (args.tasks or args.all or args.status or args.tags or args.age):
raise ValueError(
"Please specify either IDs o... |
Update README.md
Updating the CORS value for restcountries.com | @@ -669,7 +669,7 @@ API | Description | Auth | HTTPS | CORS |
| [positionstack](https://positionstack.com/) | Forward & Reverse Batch Geocoding REST API | `apiKey` | Yes | Unknown |
| [PostcodeData.nl](http://api.postcodedata.nl/v1/postcode/?postcode=1211EP&streetnumber=60&ref=domeinnaam.nl&type=json) | Provide geoloca... |
Fix typo in linux installation docs
wihsh -> wish | @@ -40,7 +40,7 @@ Preparation
this by invoking at least one of :bash:`pdflatex --version`, :bash:`xelatex --version`, and
:bash:`lualatex --version` in a terminal.
-3. Optional: If you whish to have syntax highlighting and some other :ref:`nice features <usage-gui-config>`
+3. Optional: If you wish to have syntax highl... |
Fixed tutorial 11 bug
Fixed the accidental deletion of "}," in the code that had broken the tutorial | "cell_type": "markdown",
"metadata": {
"collapsed": true
+ },
"source": [
"This tutorial walks through how to add traffic lights to experiments. This tutorial will use the following files:\n",
"\n",
|
Apply suggestions from code review
Thanks, David! | @@ -204,7 +204,7 @@ PageObjects Library
===================
The **PageObjects** library provides support for page objects,
-robotframework-style. Even though robot is a keyword driven framework,
+Robot Framework-style. Even though robot is a keyword-driven framework,
we've implemented a way to dynamically load in keywo... |
CTypes: Make all operations target C type aware.
* The real gains of course will be in the source type awareness, this is
only for using it in conditions. | @@ -192,9 +192,14 @@ def getOperationCode(to_name, operator, arg_names, in_place, emit, context):
context.addCleanupTempName(to_name)
else:
+ if to_name.c_type != "PyObject *":
+ value_name = context.allocateTempName("op_%s_res" % operator.lower())
+ else:
+ value_name = to_name
+
emit(
"%s = %s( %s );" % (
- to_name,
... |
chore: remove numpy related deprecations
numpy recently released a minor v1.24.0 which broke our tests primarily
due to the usage of `np.bool` which has been deprecated in favour of python `bool`. | @@ -192,7 +192,7 @@ def structurewise_uncertainty(fname_lst, fname_hard, fname_unc_vox, fname_out):
if i_mc_label > 0:
data_tmp[mc_dict["mc_labeled"][i_mc][i_class] == i_mc_label] = 1.
- data_class_obj_mc.append(data_tmp.astype(np.bool))
+ data_class_obj_mc.append(data_tmp.astype(bool))
# COMPUTE IoU
# Init intersectio... |
Pendulum trust region parameter tuning
reduced network size
quiet=True for trpo | @@ -51,7 +51,7 @@ def experiment(alg, env_id, horizon, gamma, n_epochs, n_steps, n_steps_per_fit,
'params': {'lr': 3e-4}},
loss=F.mse_loss,
n_features=64,
- batch_size=64,
+ batch_size=32,
input_shape=mdp.info.observation_space.shape,
output_shape=(1,))
@@ -118,7 +118,7 @@ if __name__ == '__main__':
n_epochs_cg=100,
cg... |
I'm a dumbass.
This typo breaks the installer | @@ -186,7 +186,7 @@ function setup_config_files() {
cp --no-clobber "/opt/arm/setup/.abcde.conf" "/etc/.abcde.conf"
chown arm:arm "/etc/.abcde.conf"
# link to the new install location so runui.py doesn't break
- sudo -u arm ln -sf /etc/.abdce.conf /etc/arm/config/abcde.conf
+ sudo -u arm ln -sf /etc/.abcde.conf /etc/ar... |
Added feature occurence and avg score vs feature occurence
Removed print statement | @@ -762,7 +762,6 @@ class BaseSplitter(ms.BaseCrossValidator):
# if i.__class__.__name__ == 'EnsembleModelFeatureSelector':
# plot_ensemble_feature_graphs = True
dirs = [d for d in os.listdir(savepath) if 'EnsembleModelFeatureSelector' in d]
- print(dirs)
# Plot feature_occurence curve and average score against occuren... |
adapt to spyder-3.1.3+
spyder.exe is now spyder3.exe | @@ -939,18 +939,30 @@ if exist "%WINPYDIR%\scripts\idlex.pyw" (
self.create_batch_script('spyder.bat',r"""@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
+if exist "%WINPYDIR%\scripts\spyder3.exe" (
+ "%WINPYDIR%\scripts\spyder3.exe" %*
+) else (
"%WINPYDIR%\scripts\spyder.exe" %*
+)
""")
self.create_batc... |
[Fix] Fix bug in the installation of `mmsegmentation` in Dockerfile
* pip install mmsegmentation
Change from mmseg to mmsegmentation.
* Update Dockerfile | @@ -15,7 +15,7 @@ RUN apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build
# Install MMCV, MMDetection and MMSegmentation
RUN pip install mmcv-full==latest+torch1.6.0+cu101 -f https://openmmlab.oss-accelerate.aliyuncs.com/mmcv/dist/index.html
RUN pip install mmdet==2.11.0
-RUN pip install mmseg
+... |
Fix incorrectnesses in the mocking order of certain test functions in test_platformops.py
SIM:
CR: | @@ -280,7 +280,12 @@ class TestPlatformOperations(unittest.TestCase):
@mock.patch('ebcli.operations.platformops.io')
@mock.patch('ebcli.operations.platformops.elasticbeanstalk')
@mock.patch('ebcli.operations.platformops.commonops')
- def test_delete_no_environments(self, mock_io, mock_elasticbeanstalk, mock_commonops):... |
[basePen] Add addVarComposite() to DecomposingPen
Also change AbstractPen's. | @@ -143,7 +143,8 @@ class AbstractPen:
and the 'location' argument must be a dictionary mapping axis tags
to their locations.
"""
- raise NotImplementedError
+ # GlyphSet decomposes for us
+ raise AttributeError
class NullPen(AbstractPen):
@@ -222,6 +223,10 @@ class DecomposingPen(LoggingPen):
tPen = TransformPen(self,... |
Add SymbolTableFactory to symtable stub
This is not documented API, but AFAIR the typeshed policy is now that stubs should preferably reflect reality rather than solely documented API.
See | @@ -47,3 +47,8 @@ class Symbol(object):
def is_namespace(self) -> bool: ...
def get_namespaces(self) -> Sequence[SymbolTable]: ...
def get_namespace(self) -> SymbolTable: ...
+
+class SymbolTableFactory(object):
+ def __init__(self) -> None: ...
+ def new(self, table: Any, filename: str) -> SymbolTable: ...
+ def __cal... |
Update README.md
Fix typo issue.
I'm not sure about this one, but I don't understand the code if it's not like this. Please check before merging. | @@ -233,7 +233,7 @@ An enhanced example of the previous bot just puts two of the three things into a
for entrez_id, ensembl in raw_data.items():
# data type object
entrez_gene_id = wdi_core.WDString(value=entrez_id, prop_nr='P351')
- ensembl_transcript_id = wdi_core.WDString(value='entrez_id_string', prop_nr='P704')
+ ... |
fix: fix test_fl_sms on test_notebooks.py
Currently it could fail with os.chdir since changing directory doesn't alter import paths, it changes the directory for opening files.
See original PR: | @@ -124,9 +124,10 @@ def test_fl_with_trainconfig(isolated_filesystem, start_remote_server_worker_onl
@pytest.mark.skip
def test_fl_sms(isolated_filesystem): # pragma: no cover
sys.path.append("advanced/Federated SMS Spam prediction/")
- os.chdir("advanced/Federated SMS Spam prediction/")
import preprocess
+ os.chdir("... |
Fix PGPKey.decrypt misusing message.issuers instead of encrypters.
- We only want to see if our key/subkey fingerprint is in some of
the PKESKs, we don't care if it's in the signatures. | @@ -2219,9 +2219,9 @@ class PGPKey(Armorable, ParentRef, PGPObject):
warnings.warn("This message is not encrypted", stacklevel=2)
return message
- if self.fingerprint.keyid not in message.issuers:
+ if self.fingerprint.keyid not in message.encrypters:
sks = set(self.subkeys)
- mis = set(message.issuers)
+ mis = set(mes... |
Plugins: Fix, the webengine process wasn't found on Windows
* It seems that the code was never ported to PySide and it's
unclear which PyQt ever worked with it. | @@ -177,7 +177,6 @@ import %(binding_name)s.QtCore
),
),
(
- # TODO: Expose this as an option to add it.
"translations_path",
applyBindingName(
"""\
@@ -200,6 +199,10 @@ import %(binding_name)s.QtCore
"""Does it include the Nuitka patch, i.e. is a self-built one with it applied."""
return self._getQtInformation().nuitk... |
vray device aspect ratio fix
Vray has different attribute name for device aspect ratio from other renderers.
(.aspectRatio instead of .deviceAspectRatio)
Testing
open/create a maya scene with vray renderer set
run OpenPype -> Set Resolution
resolution should be set without an error message about nonexistent vray attrib... | @@ -2141,7 +2141,7 @@ def set_scene_resolution(width, height, pixelAspect):
cmds.setAttr("%s.height" % control_node, height)
deviceAspectRatio = ((float(width) / float(height)) * float(pixelAspect))
- cmds.setAttr("%s.deviceAspectRatio" % control_node, deviceAspectRatio)
+ cmds.setAttr("%s.aspectRatio" % control_node, ... |
Make it harder to do potentially foolish things during release
Summary: Switch from y/N, Y/n, to N/! -- make em hit shift.
Test Plan: N/A
Reviewers: nate, alangenfeld | @@ -378,11 +378,11 @@ def check_new_version(new_version):
should_continue = input(
'You appear to be releasing a new version, {new_version}, without having '
'previously run a prerelease.\n(Last version found was {previous_version})\n'
- 'Are you sure you know what you\'re doing? (Y/n)'.format(
+ 'Are you sure you know... |
emoji_picker: Move click handler out from global scope.
In this commit we are moving the .emoji-popover-emoji.reaction
click handler to register_click_handlers() so as to have parity
with rest of the code design. | @@ -301,26 +301,6 @@ function maybe_select_emoji(e) {
}
}
-$(document).on('click', '.emoji-popover-emoji.reaction', function () {
- // When an emoji is clicked in the popover,
- // if the user has reacted to this message with this emoji
- // the reaction is removed
- // otherwise, the reaction is added
- var emoji_name... |
validation: remove extraneous check for ClassDefaults.variable
ClassDefaults.variable is always set by default | @@ -891,18 +891,6 @@ class Component(object):
# Used by run to store return value of execute
self.results = []
- # ENFORCE REQUIRED CLASS DEFAULTS
-
- # All subclasses must implement self.ClassDefaults.variable
- # Do this here, as _validate_variable might be overridden by subclass
- try:
- if self.ClassDefaults.variab... |
Update README for pgAdmin
Add instructions for developers to use pgAdmin | @@ -143,6 +143,16 @@ To lint the code base ::
tox -e lint
+pgAdmin
+-------------------
+
+If you want to interact with the Postgres database from a GUI:
+
+ 1. Copy the `pgadmin_servers.json.example` into a `pgadmin_servers.json` file.
+ 2. `docker-compose up` causes pgAdmin to run on http://localhost:8432
+
+Side not... |
Problem: older backends are no longer supported
Solution: when running the command `bigchaindb configure`, configure for
`localmongodb` only. | @@ -271,7 +271,10 @@ def create_parser():
help='Prepare the config file '
'and create the node keypair')
config_parser.add_argument('backend',
- choices=['rethinkdb', 'mongodb', 'localmongodb'],
+ choices=['localmongodb'],
+ default='localmongodb',
+ const='localmongodb',
+ nargs='?',
help='The backend to use. It can b... |
Added `feedback_required`
Added `feedback_required` in defs `comment` and `reply_to_comment` | @@ -17,7 +17,11 @@ def comment(self, media_id, comment_text):
return True
if not self.reached_limit('comments'):
self.delay('comment')
- if self.api.comment(media_id, comment_text):
+ _r = self.api.comment(media_id, comment_text)
+ if _r == 'feedback_required':
+ self.logger.error("`Comment` action has been BLOCKED...!... |
Adjust botorch css to match Ax css for Sphinx docs
Summary: Pull Request resolved: | @@ -220,6 +220,46 @@ div.body {
max-width: 900px;
}
+table {
+ overflow: hidden;
+}
+
+dl {
+ margin-bottom: 15px;
+ }
+
+dl.class > dt {
+ background-color: #f8f8f8;
+ border-left: 3px solid #F15A24;
+ padding: 2px 0px 2px 5px;
+}
+
+dl.class > dt > code {
+ background: none;
+}
+
+dl.class > dt > em.property {
+ colo... |
Allow the wrapper and environment to be optional.
This gives the option of using the environment provided at the worker. | @@ -255,17 +255,20 @@ def wqex_create_task(itemid, item, wrapper, env_file, command_path, infile_funct
infile_item = os.path.join(tmpdir, 'item_{}.p'.format(itemid))
outfile = os.path.join(tmpdir, 'output_{}.p'.format(itemid))
- coffea_command = 'python {} {} {} {}'.format(basename(command_path), basename(infile_functi... |
Update README.txt
fix link to tensorboard tutorial | @@ -3,7 +3,7 @@ Intermediate tutorials
1. tensorboard_tutorial.py
Classifying Names with a Character-Level RNN
- https://pytorch.org/tutorials/beginner/tensorboard_tutorial.html
+ https://pytorch.org/tutorials/intermediate/tensorboard_tutorial.html
2. char_rnn_classification_tutorial.py
Classifying Names with a Charact... |
fix(automl): fix typo in code example for AutoML Tables
Typo in AutoML Tables code example at | @@ -56,7 +56,7 @@ class TablesClient(object):
>>> from google.oauth2 import service_account
>>>
>>> client = automl_v1beta1.TablesClient(
- ... credentials=service_account.Credentials.from_service_account_file('~/.gcp/account.json')
+ ... credentials=service_account.Credentials.from_service_account_file('~/.gcp/account... |
Charinfo: up char limit and reduce line limit
Pagination means more characters can be supported without cluttering
anything. It also means infinite lines, so there's no longer a need to
squeeze out the most from a single page. Reducing the line limit leads
to a smaller, tidier presentation. | @@ -119,7 +119,7 @@ class Utils(Cog):
@command()
@in_whitelist(channels=(Channels.bot_commands,), roles=STAFF_ROLES)
async def charinfo(self, ctx: Context, *, characters: str) -> None:
- """Shows you information on up to 25 unicode characters."""
+ """Shows you information on up to 50 unicode characters."""
match = re.... |
fix xfails involving literals
Summary:
I missed these in
cc apaszke jamesr66a zdevito
Pull Request resolved: | @@ -2289,21 +2289,6 @@ a")
y2 = torch.sum(x, dim=0)
self.assertEqual(y, y2)
- # TODO: renable when we support passing literals to script fns
- @unittest.expectedFailure
- def test_literal_xfail(self):
- def func4(a, b):
- c = 0, (0, 0)
- x = True
- while x:
- x = False
- c = a, (a, b)
- d, e = c
- f, g = e
- return d +... |
Fix compiling of MultipleSubstFormat1 with zero out glyphs
str.split('') returns [''], whereas we expect [].
Fix that. | @@ -356,7 +356,7 @@ class MultipleSubst(FormatSwitchingBaseTable):
return
# TTX v3.1 and later.
- outGlyphs = attrs["out"].split(",")
+ outGlyphs = attrs["out"].split(",") if attrs["out"] else []
mapping[attrs["in"]] = [g.strip() for g in outGlyphs]
@staticmethod
|
Update Minnesota.md
Closes
Closes | @@ -848,3 +848,34 @@ geolocation: 44.9342249, -93.2624022
* https://twitter.com/929_julian/status/1337531637026971649
+
+### Police shove woman carrying pizza | 2021-06-04
+
+In a protest in response to the killing of Winston Smith, police violently shove a woman carrying pizza. One of the people who recorded the incid... |
Implementation of allclose
allclose tunneled from torch.allclose
implementations in operations and tensor.py
implemented unit-tests | @@ -143,6 +143,18 @@ class TestOperations(unittest.TestCase):
with self.assertRaises(TypeError):
ht.ones(array_len).all(axis='bad_axis_type')
+ def test_allclose(self):
+ a = ht.float32([[2, 2], [2, 2]])
+ b = ht.float32([[2.00005, 2.00005], [2.00005, 2.00005]])
+
+ self.assertFalse(ht.allclose(a, b))
+ self.assertTrue... |
Update doc about output_differentiability keyword in derivatives.yaml
Summary: Pull Request resolved:
Test Plan: Imported from OSS | # same length as the number of outputs from the forward function. The list
# should contain only booleans, specifying whether each of the output Tensor
# is differentiable.
+# If it is not specified for a function that returns multiple elements but
+# uses `grad` instead of `grads[idx]`, then all but the first output w... |
improve prng compile times with loop rolling
cf. | @@ -123,34 +123,29 @@ def threefry_2x32(keypair, count):
else:
x = list(np.split(count.ravel(), 2))
- rotations = onp.uint32([13, 15, 26, 6, 17, 29, 16, 24])
+ rotations = asarray([13, 15, 26, 6, 17, 29, 16, 24], dtype="uint32")
ks = [key1, key2, key1 ^ key2 ^ onp.uint32(0x1BD11BDA)]
x[0] = x[0] + ks[0]
x[1] = x[1] + k... |
Clarify part of the docs
The comment on Content-Length is unclear and better removed (it meant
the content-length would be calculated by Quart and emitted). | @@ -19,8 +19,7 @@ str
return render_template("index.html")
A solitary string return indicates that you intend to return a string
-mimetype ``text/html`` and a specified Content-Length header. The
-string will be encoded using the default
+mimetype ``text/html``. The string will be encoded using the default
:attr:`~quar... |
Bump HDF5 used for MPI CI
It appears 1.10.4 and lower use deprecated MPI APIs, which have now been
removed in the latest releases. | @@ -117,7 +117,7 @@ jobs:
py37-deps-hdf51103-mpi:
python.version: '3.7'
TOXENV: py37-test-mindeps-mpi4py
- HDF5_VERSION: 1.10.3
+ HDF5_VERSION: 1.10.5
HDF5_DIR: $(HDF5_CACHE_DIR)/$(HDF5_VERSION)
HDF5_MPI: ON
CC: mpicc
|
purge-iscsi-gateways: don't run all ceph-facts
We only need to have the container_binary fact. Because we're not
gathering the facts from all nodes then the purge fails trying to get
one of the grafana fact.
Closes: | block:
- import_role:
name: ceph-facts
+ tasks_from: container_binary
+
+ - name: set_fact container_exec_cmd
+ set_fact:
+ container_exec_cmd: "{{ container_binary }} exec ceph-mon-{{ ansible_hostname }}"
+ when: containerized_deployment | bool
- name: get iscsi gateway list
command: "{{ container_exec_cmd | default('... |
Fix empty strings crashing Namespace for float options
This feels like a Discord bug to me but it's causing issues | @@ -142,7 +142,8 @@ class Namespace:
self.__dict__[name] = value
elif opt_type == 10: # number
value = option['value'] # type: ignore # Key is there
- if value is None:
+ # This condition is written this way because 0 can be a valid float
+ if value is None or value == '':
self.__dict__[name] = float('nan')
else:
self.... |
jenkins.bash: Don't delete test results on the second loop run.
Also, spec repo and docker pull also needs to be run once. | @@ -20,12 +20,13 @@ venv() {
source "$1"/bin/activate
}
-# Test for Python 2.7 and Python 3
-for PYTHON_VERSION in 2 3
-do
git clean --force -d -x || /bin/true
cloneorpull common-workflow-language https://github.com/common-workflow-language/common-workflow-language.git
docker pull node:slim
+
+# Test for Python 2.7 and... |
MAINT: Remove useless custom tp_alloc and tp_free on ndarray
array_alloc is equivalent to the default object allocator
PyType_GenericAlloc. array_free was added "just in case" in but
doesn't seem to serve any actual purpose. | @@ -1705,22 +1705,6 @@ array_iter(PyArrayObject *arr)
return PySeqIter_New((PyObject *)arr);
}
-static PyObject *
-array_alloc(PyTypeObject *type, Py_ssize_t NPY_UNUSED(nitems))
-{
- /* nitems will always be 0 */
- PyObject *obj = PyObject_Malloc(type->tp_basicsize);
- PyObject_Init(obj, type);
- return obj;
-}
-
-stat... |
Correct Shutdown stop.
Should properly finalize in a way that will kill the thread. | @@ -1282,7 +1282,8 @@ class LhystudioController(Module):
context.register("control/Resume", resume_k40)
def finalize(self, *args, **kwargs):
- pass
+ if self._thread is not None:
+ self.write(b'\x18\n')
def __repr__(self):
return "LhystudioController()"
@@ -1467,7 +1468,6 @@ class LhystudioController(Module):
self.cont... |
Simplify .travis.yml conda install
Use conda-forge channel. | @@ -30,16 +30,13 @@ before_install:
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- - hash -r
- - conda config --set always_yes yes --set changeps1 no
- - conda update -q conda
- # Useful for debugging any issues with conda
- - conda info -a
+ - conda update --yes conda
+ - cond... |
Take use_inherit_rotation and inherit_scale into account.
This implementation should also fix an issue where static poses don't use Bone Constraints. | @@ -43,7 +43,14 @@ def gather_joint(blender_object, blender_bone, export_settings):
else:
correction_matrix_local = gltf2_blender_math.multiply(
blender_bone.parent.bone.matrix_local.inverted(), blender_bone.bone.matrix_local)
- matrix_basis = blender_bone.matrix_basis
+
+ if (blender_bone.bone.use_inherit_rotation == ... |
Update `MAINTAINERS.md` for new maintainers.
While we have this file, we should keep it updated. If we were to remove it though, we'd want to link directly to
[ci skip-rust]
[ci skip-build-wheels] | Active Maintainers
==================
+* Alexey Tereshenkov
* Andreas Stenius
* Benjy Weinberger
+* Carina C. Zona
+* Christopher Neugebauer
* Daniel McClanahan
* Daniel Wagner-Hall
* Eric Arellano
@@ -11,6 +14,7 @@ Active Maintainers
* Ity Kaul
* Patrick Lawson
* John Sirois
+* Joshua Cannon
* Kris Wilson
* Nora Howar... |
Retry getting credentials from Boto3
It may make network requests that can fail.
Also, we want a good error message if it fails, and not a complaint about operating on None.
Fixes hopefully | @@ -538,9 +538,19 @@ def _monkey_patch_boto():
# We get a Credentials object
# <https://github.com/boto/botocore/blob/8d3ea0e61473fba43774eb3c74e1b22995ee7370/botocore/credentials.py#L227>
- # or a RefreshableCredentials
+ # or a RefreshableCredentials, or None on failure.
+ creds = None
+ for attempt in retry(timeout=... |
NodeSetEditor : Add `floating` argument to `acquire()` method.
This provides control over whether or not the acquired editor will be embedded in the main layout or in a floating window. | @@ -103,15 +103,14 @@ class NodeSetEditor( GafferUI.EditorWidget ) :
return result
## Ensures that the specified node has a visible editor of this class type editing
- # it, creating one if necessary.
- ## \todo User preferences for whether these are made floating, embedded, whether
- # they are reused etc. This class ... |
Install package for fast string matching
But really, mostly to supress a warning! | @@ -15,3 +15,4 @@ flake8==3.3.0 # PEP checking
coverage>=4.5.3 # Unit test coverage
python-coveralls==2.9.1 # Coveralls linking (for Travis)
fuzzywuzzy>=0.17.0 # Fuzzy string matching
+python-Levenshtein>=0.12.0 # Required for fuzzywuzzy
\ No newline at end of file
|
SystemMetricsTest: fix type conversion issue
Summary:
The tests were using `uint64_t` rather than the `size_t` that `getRssMemBytes`
return. This is fine on 64-bit architectures but fails on 32-bit ones. | @@ -16,7 +16,7 @@ namespace fbzmq {
TEST(SystemMetricsTest, MemoryStats) {
SystemMetrics systemMetrics_{};
- folly::Optional<uint64_t> rssMem1 = systemMetrics_.getRSSMemBytes();
+ folly::Optional<size_t> rssMem1 = systemMetrics_.getRSSMemBytes();
EXPECT_TRUE(rssMem1.hasValue());
// check sanity of return value, check f... |
Ignore mypy errors
Sadly the latest version doesn't pick up that Quart matches the
ASGI3Framework type in Hypercorn. | @@ -1388,9 +1388,9 @@ class Quart(PackageStatic):
if loop is not None:
loop.set_debug(debug or False)
- loop.run_until_complete(serve(self, config))
+ loop.run_until_complete(serve(self, config)) # type: ignore
else:
- asyncio.run(serve(self, config), debug=config.debug)
+ asyncio.run(serve(self, config), debug=config.... |
[CI] fixing build script
if package is installed, this will wait for y/n user input | #!/bin/bash
-python3 -m pip uninstall scipy
+python3 -m pip uninstall -y scipy
python3 -m pip install git+https://github.com/zhanghang1989/d2l-book
python3 -m pip install --force-reinstall ipython==7.16
|
[query] Increase test parallelism
I changed this from 2=>1 in April of last year unintentionally while debugging
(it's easy to get interleaved prints/logs with 2 concurrent worker threads). | @@ -17,7 +17,7 @@ def startTestHailContext():
if not _initialized:
backend_name = os.environ.get('HAIL_QUERY_BACKEND', 'spark')
if backend_name == 'spark':
- hl.init(master='local[1]', min_block_size=0, quiet=True)
+ hl.init(master='local[2]', min_block_size=0, quiet=True)
else:
Env.hc() # force initialization
_initial... |
[IMPR] simplify code in treat_disamb_only
move code out of try statement in treat_disamb_only
remove include = False statement; include is False by default | @@ -747,13 +747,6 @@ class DisambiguationRobot(SingleSiteBot):
new_targets = []
try:
text = ref_page.get()
- ignore_reason = self.checkContents(text)
- if ignore_reason:
- pywikibot.output(
- '\n\nSkipping {0} because it contains {1}.\n\n'
- .format(ref_page.title(), ignore_reason))
- else:
- include = True
except pywi... |
Some inconsistencies fixed
"this repository repository" fixed and some punctuation. | @@ -10,7 +10,7 @@ Jarvis is a simple personal assistant for Linux, MacOS and Windows which works o
## Getting Started
-In order to start Jarvis just clone [this repository](https://github.com/sukeesh/Jarvis.git) repository and run `python installer`.
+In order to start Jarvis just clone [this repository](https://github... |
Fix minor documentation error
This method does not throw any error nor takes any input. | @@ -847,7 +847,6 @@ class Customer(StripeModel):
Checks to see if this customer has an active subscription to any plan.
:returns: True if there exists an active subscription, False otherwise.
- :throws: TypeError if ``plan`` is None and more than one active subscription exists for this customer.
"""
return len(self._ge... |
Add collectionMode data and modeUpdate
Added collectionMode to collection data.
modUpdate acts like webUI, `collection.modeUpdate(mode="default")` | @@ -994,6 +994,7 @@ class Collections(PlexObject):
self.childCount = utils.cast(int, data.attrib.get('childCount'))
self.minYear = utils.cast(int, data.attrib.get('minYear'))
self.maxYear = utils.cast(int, data.attrib.get('maxYear'))
+ self.collectionMode = data.attrib.get('collectionMode')
@property
def children(self)... |
If field cannot be found (usu where read/write operations have different serializers), assume error was in attributes by default.
Used when building custom error message. | @@ -7,8 +7,12 @@ from rest_framework.exceptions import APIException, AuthenticationFailed
def get_resource_object_member(error_key, context):
from api.base.serializers import RelationshipField
- field = context['view'].serializer_class._declared_fields[error_key]
+ field = context['view'].serializer_class._declared_fie... |
Bump timeout
The original timeout seemed OK for local tests but would result in
spurious failures under Browserstack. | @@ -136,7 +136,7 @@ class SeleniumTestCase(StaticLiveServerTestCase):
super(SeleniumTestCase, cls).tearDownClass()
def _find_and_wait(self, locator_type, locator, waiter):
- wait = 5
+ wait = 15
try:
element = WebDriverWait(self.browser, wait).until(
waiter((locator_type, locator))
|
Fix css bug in custom.css.
White color was applied to all elements with class .nav-link instead of only the ones inside a .navbar-nav element.
This caused the links in the right column to turn white as well, making them invisible on the white background. | background-color: #2F4858 !important;
}
-/* This is kept for reference, in case the logo needs to be adjusted in the css. */
-/*.navbar-brand>.logo {*/
-/* filter: drop-shadow(1px 1px 0px #ffffff88);*/
-/*}*/
-
-.nav-link {
- color: #ffffffff!important;
+.navbar-nav > .nav-item > .nav-link {
+ color: #ffffffff;
}
.navb... |
[CONTRIBUTING.md] Added more instruction in Incident Report Format
Added some verbose instruction in **Incident Report Format** for the people who want to contribute. | @@ -205,7 +205,7 @@ Use the following format for all incident reports.
```
// State.md
-## City
+## City Name (Note: Exclude this, if city section is already available)
### Brief description of a thing that happened | Date
@@ -219,7 +219,7 @@ created a github repository on June 1st 2020 to compile evidence of police br... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.