message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
MNT: add a RLock for RE state
And use it in the state machine. This will eventually have to cover
more things | @@ -81,14 +81,20 @@ class LoggingPropertyMachine(PropertyMachine):
super().__init__(machine_type)
def __set__(self, obj, value):
- old_value = self.__get__(obj)
+ own = type(obj)
+ old_value = self.__get__(obj, own)
+ with obj._state_lock:
super().__set__(obj, value)
- value = self.__get__(obj)
+ value = self.__get__(o... |
"Getting Started" : Add replacement strings for 3rd party tool paths
and versions | @@ -310,6 +310,20 @@ source_parsers = {
source_suffix = ['.rst', '.md']
+# Variables for string replacement functions
+
+arnold_version = '2018'
+arnold_path_linux = '/opt/solidangle/mtoa/{0}'.format( arnold_version )
+arnold_path_osx = '/opt/solidangle/mtoa/{0}'.format( arnold_version )
+
+delight_version = '8.5.1'
+d... |
Fix logic predicate code generation when property uses entity info
TN: | 'Self.Field_{}'.format(i)
for i, _ in enumerate(args_types)
]
+ if prop.uses_entity_info:
+ args.append('Node_0.Info')
args_fmt = '({})'.format(', '.join(args)) if args else ''
%>
return ${prop.name} ${args_fmt};
|
Add a negative test for security_group api
Currently,test_security_groups_negative.py only prevent to create
a security_group named "default",but sometimes,
user create a security_group named "test-123",
and then change the name to "default",
so we should add negative test as below. | @@ -175,6 +175,16 @@ class NegativeSecGroupTest(base.BaseSecGroupTest):
self.security_groups_client.create_security_group,
name=name)
+ @test.attr(type=['negative'])
+ @decorators.idempotent_id('966e2b96-023a-11e7-a9e4-fa163e4fa634')
+ def test_create_security_group_update_name_default(self):
+ # Update security group ... |
Adjust Campo Formoso-BA spider
resolve okfn-brasil/querido-diario#788 | +from datetime import date
+
from gazette.spiders.base.doem import DoemGazetteSpider
class BaCampoFormosoSpider(DoemGazetteSpider):
TERRITORY_ID = "2906006"
name = "ba_campo_formoso"
+ start_date = date(2018, 1, 3) # edition_number 873
state_city_url_part = "ba/campoformoso"
|
Fix toy sensor
Summary: Missed a spot here.
Test Plan: Run dagit in root dir, no more sensor error
Reviewers: rexledesma, prha | @@ -52,7 +52,8 @@ def toy_file_sensor(_):
@sensor(pipeline_name="log_asset_pipeline")
def toy_asset_sensor(context):
- events = context.instance.events_for_asset_key(
+ with context.get_instance() as instance:
+ events = instance.events_for_asset_key(
AssetKey(["model"]), after_cursor=context.last_run_key, ascending=Fa... |
Use only URL /sendgrid/ to send email
Remove the root URL setup part that may confuse readers
Revise the text | @@ -280,21 +280,14 @@ from django.contrib import admin
from .views import index
-urlpatterns = [
- url(r'^admin/', admin.site.urls),
- url(r'^$', index, name='sendgrid'),
-]
-```
-
-These paths allow the root URL to send the email. For a true Django app, you may want to move this code to another URL like so:
-
-```pyth... |
Exclude /etc/openldap to avoid overriding ro file
Currently /etc/openldap is bind-mounted by keystone containers
with ro flag so it should be excluded from config files generaed
by puppet.
Closes-Bug: | @@ -103,6 +103,8 @@ if [ -z "$NO_ARCHIVE" ]; then
ro_files+="/etc/pki/ca-trust/source/anchors /etc/pki/tls/certs/ca-bundle.crt "
ro_files+="/etc/pki/tls/certs/ca-bundle.trust.crt /etc/pki/tls/cert.pem "
ro_files+="/etc/hosts /etc/localtime /etc/hostname "
+ # /etc/openldap is bind mounted with "ro" option in keystone c... |
Problem: No reason to check the BEP (+typo)
Solution: Say why there is a link to the BEP, and fix a typo. | @@ -75,10 +75,10 @@ configuration file as documented under
[Configuration Settings](configuration.html).
-## bigchaindb upsert-validator
-_[BEP#3](https://github.com/bigchaindb/BEPs/tree/master/3)_
+## bigchaindb upsert-validator (insecure)
+Add, update, or remove a validator from the validators set of the local node. ... |
Remove format properties for campbell plot
This removes properties applied to the campbell plot since now we are
going to set those in the plotly_theme file. | @@ -808,49 +808,18 @@ class CampbellResults:
)
)
- fig.update_xaxes(
- title_text="<b>Frequency</b>",
- title_font=dict(family="Arial", size=20),
- tickfont=dict(size=16),
- range=[0, np.max(speed_range)],
- gridcolor="lightgray",
- showline=True,
- linewidth=2.5,
- linecolor="black",
- mirror=True,
- )
+ fig.update_xa... |
Delete the IPSec before the router is deleted
The termination of the IPSec connection process requires router's
netns presence to execute successfully, so the IPSec connection
deletion should be executed before the router is deleted,
rather than the router deletion.
Closes-Bug: | @@ -38,7 +38,7 @@ class VPNService(object):
registry.subscribe(
router_added_actions, resources.ROUTER, events.AFTER_CREATE)
registry.subscribe(
- router_removed_actions, resources.ROUTER, events.AFTER_DELETE)
+ router_removed_actions, resources.ROUTER, events.BEFORE_DELETE)
registry.subscribe(
router_updated_actions, ... |
Use `find_packages` in azure-cli/setup.py
This will scour the azure-cli folder for packages, instead of relying on enumerating them.
Documentation on the find_packages function can be found here: | from __future__ import print_function
from codecs import open
-from setuptools import setup
+from setuptools import setup, find_packages
try:
from azure_bdist_wheel import cmdclass
@@ -134,10 +134,7 @@ setup(
'az.completion.sh',
'az.bat',
],
- packages=[
- 'azure',
- 'azure.cli',
- ],
+ packages=find_packages(exclude=[... |
Add CAR.LEXUS_RX various missing firmware
2018 RX350L DongleID/route 45b442be1779b307|2020-09-15--12-04-24 | @@ -1094,6 +1094,7 @@ FW_VERSIONS = {
b'\x01896630E41200\x00\x00\x00\x00',
b'\x01896630E37300\x00\x00\x00\x00',
b'\x018966348R8500\x00\x00\x00\x00',
+ b'\x018966348W1300\x00\x00\x00\x00',
],
(Ecu.esp, 0x7b0, None): [
b'F152648472\x00\x00\x00\x00\x00\x00',
@@ -1101,6 +1102,7 @@ FW_VERSIONS = {
b'F152648492\x00\x00\x00\x... |
[resotocore][fix] Silence apscheduler logs
It uses the term `Job` which confuses people with resoto jobs. | @@ -248,6 +248,8 @@ def setup_process(args: Namespace, child_process: Optional[str] = None) -> None:
logging.getLogger("backoff").setLevel(logging.FATAL)
# transitions (fsm) creates a lot of log noise. Only show warnings.
logging.getLogger("transitions.core").setLevel(logging.WARNING)
+ # apscheduler uses the term Job ... |
Update cache.py
make D.feature([symbol], [Feature('close')], disk_cache=1) work correctly | @@ -471,7 +471,7 @@ class DatasetCache(BaseProviderCache):
not_space_fields = remove_fields_space(fields)
data = data.loc[:, not_space_fields]
# set features fields
- data.columns = list(fields)
+ data.columns = [str(i) for i in fields]
return data
@staticmethod
|
Update install.rst
Minor grammar and typo fixes | @@ -186,7 +186,7 @@ prevents ``pip`` from updating system packages. This has to be addressed to
successfully install Scrapy and its dependencies. Here are some proposed
solutions:
-* *(Recommended)* **Don't** use system python, install a new, updated version
+* *(Recommended)* **Don't** use system python. Install a new... |
Update address regex
Problem: Currently this regex matches only tz1 addresses. However there
are more supported curves and corresponding addresses.
Solution: Support tz1, tz2, tz3 addresses in the regex. | @@ -54,7 +54,7 @@ systemd_enable = {
ledger_regex = b"ledger:\/\/[\w\-]+\/[\w\-]+\/[\w']+\/[\w']+"
secret_key_regex = b"(encrypted|unencrypted):(?:\w{54}|\w{88})"
-address_regex = b"tz1\w{33}"
+address_regex = b"tz[123]\w{33}"
# Input validators
|
Gate boto_elb tests if proper version of moto isn't installed
For Python 2 tests, we can use an older version. But when running
these tests of Python 3, we need a newer version of moto that supports
Python 3.
This gates the tests if the expected version of moto is missing. | from __future__ import absolute_import
import logging
from copy import deepcopy
+import pkg_resources
# import Python Third Party Libs
# pylint: disable=import-error
@@ -45,8 +46,10 @@ except ImportError:
# Import Salt Libs
import salt.config
+import salt.ext.six as six
import salt.loader
import salt.modules.boto_elb a... |
tgz_mdf is misspelled
tgz_mdf should be changed to tgz_md5 to make it work | @@ -15,7 +15,7 @@ class CIFAR10(data.Dataset):
base_folder = 'cifar-10-batches-py'
url = "http://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz"
filename = "cifar-10-python.tar.gz"
- tgz_mdf = 'c58f30108f718f92721af3b95e74349a'
+ tgz_md5 = 'c58f30108f718f92721af3b95e74349a'
train_list = [
['data_batch_1', 'c99cafc1522... |
README.md: Add link to bug report guidelines.
Fixes | @@ -103,7 +103,8 @@ discussion mailing list](#community) and uses [GitHub issues
][gh-issues]. There are also lists for the [Android][email-android]
and [iOS][email-ios] apps. Feel free to send any questions or
suggestions of areas where you'd love to see more documentation to the
-relevant list! Please report any secu... |
Removed useless Json file from zip savefile
_save_attributes is already stored in config, no need for json version
of it | @@ -90,6 +90,7 @@ class Serializable(object):
object_type, save_attributes = cls._load_pickle(zip_file, config_path).values()
loaded_object = object_type.__new__(object_type)
+ setattr(loaded_object, '_save_attributes', save_attributes)
for att, method in save_attributes.items():
method = method[:-1] if method[-1] is '... |
Rename parameter: is_cum_func -> numeric_only
For using more general name for the argument.
It's suggested by at | @@ -91,7 +91,7 @@ class GroupBy(object, metaclass=ABCMeta):
return [s.spark.column for s in self._agg_columns]
@abstractmethod
- def _apply_series_op(self, op, should_resolve: bool = False, is_cum_func: bool = False):
+ def _apply_series_op(self, op, should_resolve: bool = False, numeric_only: bool = False):
pass
# TOD... |
Allow the emailAddress field to be empty and don't supply a default value. Email address is an optional field
and makes DNs... interesting. | @@ -575,7 +575,7 @@ def create_ca(ca_name,
L='Salt Lake City',
O='SaltStack',
OU=None,
- emailAddress='xyz@pdq.net',
+ emailAddress=None,
fixmode=False,
cacert_path=None,
ca_filename=None,
@@ -605,7 +605,7 @@ def create_ca(ca_name,
OU
organizational unit, default is None
emailAddress
- email address for the CA owner, d... |
[4.0] Remove Python 2 related code from threadedhttp.py
reorder imports
remove UnicodeMixin | # -*- coding: utf-8 -*-
"""Http backend layer, formerly providing a httplib2 wrapper."""
#
-# (C) Pywikibot team, 2007-2019
+# (C) Pywikibot team, 2007-2020
#
# Distributed under the terms of the MIT license.
#
-from __future__ import absolute_import, division, unicode_literals
-
-
__docformat__ = 'epytext'
# standard ... |
Update markdown_widget.html
Updated URL to point to new point in the MathJax documentation. | <script type="text/html" class="latex-info-text">
<p>
- {%- trans link_start='<a href="https://docs.mathjax.org/en/latest/tex.html#supported-latex-commands">'|safe,
+ {%- trans link_start='<a href="https://docs.mathjax.org/en/latest/input/tex/macros/index.html">'|safe,
link_end='</a>'|safe -%}
You may write formulae us... |
Add mount point to /etc/fstab so that PD is mounted after reboot.
Comment in the code could be better. Confirmed that it worked on my centos box, should probably look at some others | @@ -434,6 +434,10 @@ class BaseLinuxMixin(virtual_machine.BaseOsMixin):
mnt_cmd = ('sudo mkdir -p {1};sudo mount -o discard {0} {1};'
'sudo chown -R $USER:$USER {1};').format(device_path, mount_path)
self.RemoteHostCommand(mnt_cmd)
+ # add to /etc/fstab to mount on reboot
+ mnt_cmd = ('echo "{0} {1} ext4 defaults" '
+ ... |
This provides a way to (optionally) add a tag to the DeepVariant docker image, instead of "latest".
.../build_docker_image.sh $project $tag
will make the images
gcr.io/google.com/brain-genomics/deepvariant{,_gpu,_runner}:$tag
The tag will be applied to the build as well as to the images,
in that context. | @@ -38,14 +38,14 @@ steps:
- name: 'gcr.io/cloud-builders/docker'
args:
- 'build'
- - '--tag=gcr.io/$PROJECT_ID/deepvariant'
+ - '--tag=gcr.io/$PROJECT_ID/deepvariant:$TAG_NAME'
- '.'
id: 'cpu'
dir: 'deepvariant/docker'
- name: 'gcr.io/cloud-builders/docker'
args:
- 'build'
- - '--tag=gcr.io/$PROJECT_ID/deepvariant_gpu... |
Added simple invocation tests for render-function
TRAC#7301 | @@ -193,3 +193,17 @@ def test_wrong_upload_headers_rfc7233(rf: RequestFactory):
rf, upload_id, content, 0, 10)
post_request.META["HTTP_CONTENT_RANGE"] = "bytes 54343-3223/*"
assert isinstance(widget.handle_ajax(post_request), HttpResponseBadRequest)
+
+
+def test_render():
+ widget = AjaxUploadWidget(ajax_target_path="... |
<fix>[installation]: clean useless zops cron after os upgrade
Resolves: ZSTAC-49156,ZSTAC-48956 | @@ -3821,9 +3821,17 @@ check_ha_need_upgrade()
}
add_zops_init_cronjob() {
+ echo_subtitle "Add zops cron job"
if [ ! -f /tmp/zops_init.sock ];then
touch /tmp/zops_init.sock
fi
+ # remove not in current os version cron job
+ ALL_ZOPS_CRON=`crontab -l |grep zops_init.py |grep -v ${ISO_ARCH}/${ISO_VER} | cut -d " " -f10`... |
Update test_nonlinear.py
Fixing assert failure if scip is compiled using quadprecision | @@ -261,7 +261,7 @@ def test_gastrans():
if scip.getStatus() == 'timelimit':
pytest.skip()
- assert abs(scip.getPrimalbound() - 89.08584) < 1.0e-9
+ assert abs(scip.getPrimalbound() - 89.08584) < 1.0e-6
def test_quad_coeffs():
"""test coefficient access method for quadratic constraints"""
|
add regression test coverage for buildtest history query --output.
Also we add coverage for Tee class which was required to capture output from
buildtest build | +import os
+import shutil
+
import pytest
-from buildtest.cli.history import build_history, query_builds
+from buildtest.cli.build import BuildTest, Tee
+from buildtest.cli.history import BUILD_HISTORY_DIR, build_history, query_builds
+from buildtest.config import SiteConfiguration
+from buildtest.defaults import BUILD... |
Fix run_in_executor call in user guide
Addresses | @@ -177,7 +177,7 @@ use `.IOLoop.run_in_executor`, which returns
``Futures`` that are compatible with coroutines::
async def call_blocking():
- await IOLoop.current().run_in_executor(blocking_func, args)
+ await IOLoop.current().run_in_executor(None, blocking_func, args)
Parallelism
^^^^^^^^^^^
|
update plexurl
It appears plex is doing away with the plexapp.com url.
It no longer has a valid SAN cert for that domain as it redirects to plex.tv now.
Update myplex.py to reflect new signin URL. | @@ -29,7 +29,7 @@ class MyPlexAccount(PlexObject):
timeout (int): timeout in seconds on initial connect to myplex (default config.TIMEOUT).
Attributes:
- SIGNIN (str): 'https://my.plexapp.com/users/sign_in.xml'
+ SIGNIN (str): 'https://plex.tv/users/sign_in.xml'
key (str): 'https://plex.tv/users/account'
authentication... |
DOC: updated and fixed changelog
Updated the changelog for line length, trailing whitespace, and new changes. | @@ -11,17 +11,22 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Expanded Constellation utility by:
- Adding common properties: `empty`, `index`, `date`, `today`, `yesterday`,
`tomorrow`, and `variables` (#764)
- - Improving the printed output to inform user of the Constellation contents (#764)
... |
Update BeyondTrust_Password_Safe_description.md
Updated description. | -To Generate the API key, enter the UI, go to Configuration, under General go to API Registration
\ No newline at end of file
+To configure an integration instance, you need your BeyondTrust API key. The API key is generated after you configure an API Registration. For detailed instructions, see the [BeyondTrust Passwo... |
Simplify default calib file handing
If an empty string (`''`) is passed as the `calibration_file` value, a default
calib setting will be used by DepthAI. Message from the console:
```
depthai: Calibration file is not specified, will use default setting;
```
So, I think we can collapse the file handling a bit. | @@ -12,13 +12,9 @@ blob_config_fpath = './resources/nn/object_detection_4shave/object_detection.jso
if path.exists('./resources/depthai.calib'):
calib_fpath = './resources/depthai.calib'
- print("Using Calibration File: depthai.calib")
-
-elif path.exists('./resources/default.calib'):
- calib_fpath = './resources/defau... |
Fix issue with STORAGE_ENGINE_CACHE_SIZE parameter
In mongodb docker image STORAGE_ENGINE_CACHE_SIZE
will always be set to '' (two quotation marks)
and verification will fail. So it's impossible to
run image without --storage-engine-cache-size set.
This change removes double quotes while assigning
default value to STOR... | @@ -66,7 +66,7 @@ if [[ -z "${REPLICA_SET_NAME:?REPLICA_SET_NAME not specified. Exiting!}" || \
-z "${MONGODB_KEY_FILE_PATH:?MONGODB_KEY_FILE_PATH not specified. Exiting!}" || \
-z "${MONGODB_CA_FILE_PATH:?MONGODB_CA_FILE_PATH not specified. Exiting!}" || \
-z "${MONGODB_CRL_FILE_PATH:?MONGODB_CRL_FILE_PATH not specifi... |
schema fix type converter errors on string input
If a variable applies on a int value with validation, there will be type
error. Because the dataclass_json run before type converted. Using the
right fields function can fix it. | @@ -607,12 +607,17 @@ class RemoteNode(Node):
type: str = constants.ENVIRONMENTS_NODES_REMOTE
address: str = ""
port: int = field(
- default=22, metadata=metadata(validate=validate.Range(min=1, max=65535))
+ default=22,
+ metadata=metadata(
+ field_function=fields.Int, validate=validate.Range(min=1, max=65535)
+ ),
)
p... |
Fix Bon Appetit
Time was manually set to 0 as it appears Bon Appetit no longer provides times
on their website. Please advise if a different workaround would be preferred. | @@ -12,10 +12,10 @@ class BonAppetit(AbstractScraper):
return self.soup.find('h1', {'itemprop': 'name'}).get_text()
def total_time(self):
- return get_minutes(self.soup.find('span', {'itemprop': 'totalTime'}))
+ return 0
def ingredients(self):
- ingredients_html = self.soup.findAll('span', {'itemprop': "ingredients"})
... |
Add back missing bots/load handler.
This wasn't merged correctly into the final webapp2->Flask migration
CL. | @@ -161,6 +161,7 @@ handlers = [
('/add-external-user-permission', configuration.AddExternalUserPermission),
('/bots', bots.Handler),
('/bots/dead', bots.DeadBotsHandler),
+ ('/bots/load', bots.JsonHandler),
('/commit-range', commit_range.Handler),
('/commit-range/load', commit_range.JsonHandler),
('/configuration', co... |
STY: MetaLabel defaults and docstring
Updated the MetaLabel default input for 'plot' and
the Instrument docstring. | @@ -76,29 +76,14 @@ class Instrument(object):
if True, the list of files found will be checked to
ensure the filesizes are greater than zero. Empty files are
removed from the stored list of files.
- units_label : str
- String used to label units in storage. Defaults to 'units'.
- name_label : str
- String used to label... |
home.py: move timezone to register_ret.
Moving the user_profile data section down into fetch_initial_state_data
so it entirely pulls from register_ret in | @@ -221,7 +221,6 @@ def home_real(request):
avatar_url = avatar_url(user_profile),
avatar_url_medium = avatar_url(user_profile, medium=True),
avatar_source = user_profile.avatar_source,
- timezone = user_profile.timezone,
# Stream message notification settings:
stream_desktop_notifications_enabled = user_profile.enable... |
fix spelling error
constributions should be contributions | </div>
---
-MatchZoo is a toolkit for text matching. It was developed with a focus on facilitating the designing, comparing and sharing of deep text matching models. There are a number of deep matching methods, such as DRMM, MatchPyramid, MV-LSTM, aNMM, DUET, ARC-I, ARC-II, DSSM, and CDSSM, designed with a unified inte... |
Unparsers: don't emit anything for empty sequences of tokens
TN: | @@ -576,7 +576,9 @@ package body ${ada_lib_name}.Unparsing.Implementation is
(Result : in out Unparsing_Buffer;
First_Token, Last_Token : Token_Type) is
begin
- if First_Token = No_Token and then Last_Token = No_Token then
+ if (First_Token = No_Token and then Last_Token = No_Token)
+ or else Last_Token < First_Token
+... |
Update publish script
1. Add quotes in script
2. Upgrade azure-storage-blob dependencies | set -e
unset AZURE_CLI_DIAGNOSTICS_TELEMETRY
-pip install azure-storage==0.36.0
+pip install azure-storage-blob==1.1.0
wd=`cd $(dirname $0); pwd`
-if [ -z $PUBLISH_STORAGE_SAS ] || [ -z $PUBLISH_STORAGE_ACCT ] || [ -z $PUBLISH_CONTAINER ]; then
+if [ -z "$PUBLISH_STORAGE_SAS" ] || [ -z "$PUBLISH_STORAGE_ACCT" ] || [ -z... |
Python3 fixes for CentOS/RHEL
1) python3 should be python34
2) python34-pip does does exist, you must install python34-setuptools and then: easy_install-3.4 pip | @@ -20,7 +20,8 @@ Python 3:
```no-highlight
# yum install -y epel-release
-# yum install -y gcc python3 python3-devel python3-pip libxml2-devel libxslt-devel libffi-devel graphviz openssl-devel
+# yum install -y gcc python34 python34-devel python34-setuptools libxml2-devel libxslt-devel libffi-devel graphviz openssl-de... |
Add from_bytes() methods to signing library
Add methods for creating keys from bytes to avoid unnecessary conversion to and
from hex. | @@ -47,11 +47,14 @@ class Secp256k1PrivateKey(PrivateKey):
def secp256k1_private_key(self):
return self._private_key
+ @staticmethod
+ def from_bytes(byte_str):
+ return Secp256k1PrivateKey(secp256k1.PrivateKey(byte_str, ctx=__CTX__))
+
@staticmethod
def from_hex(hex_str):
try:
- priv = binascii.unhexlify(hex_str)
- re... |
Fixes taxonomy of R_uc observable
_process_tex wasn't set, so it was still set to the last value from the
loop above and hence the taxonomy was wrong.
The R_uc observable will now be listed under both Z->uu and Z->cc. | @@ -135,7 +135,8 @@ for _f in (_leptons, _uquarks, _dquarks):
_obs_name = "R_uc"
_obs = flavio.classes.Observable(_obs_name)
_obs.tex = r"$R_{uc}^0$"
-_obs.add_taxonomy(r'Process :: $Z^0$ decays :: Flavour conserving decays :: $' + _process_tex + r"$")
+for q in ('u', 'c'):
+ _obs.add_taxonomy(r"Process :: $Z^0$ decays... |
fix FeaturedTheme icon, set icon_src for all text_enabled plugins
Any plugin where `text_enabled=True` should
define an icon_src but its only for the admin.
Just give them all a simple icon instead of thumbnail | +from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from cms.plugin_base import CMSPluginBase
from cms.plugin_pool import plugin_pool
from cms.models.pluginmodel import CMSPlugin
from cms.extensions.extension_pool import extension_pool
-from sorl.thumbnail import get_thumbnail
-
fr... |
add node.nics indexerror assertion
node.nics get_nic_by_index doesn't catch indexerror currently
This makes for confusion output. Add a try except to
give a better description of the error in this case. | @@ -185,7 +185,23 @@ class Nics(InitializableMixin):
# when there are more than one nic on the system
number_of_nics = len(self.get_upper_nics())
assert_that(number_of_nics).is_greater_than(0)
- return self.nics[self.get_upper_nics()[index]]
+ try:
+ nic_name = self.get_upper_nics()[index]
+ except IndexError:
+ raise ... |
run tests on github not self-hosted
the self-hosted was an experiment on duo that we are
not using (yet) on develop | @@ -19,7 +19,7 @@ on:
jobs:
docker-build:
name: Build Docker Image
- runs-on: self-hosted
+ runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
@@ -40,7 +40,7 @@ jobs:
docker-pytorch-end2end:
name: Docker Torch End2End
needs: docker-build
- runs-on: self-hosted
+ runs-on: ubuntu-18.... |
Drop unneeded filter(None, ...) [ci skip]
(skipping build 'cause this is tiny, untested, and the last one took four
attempts to complete without timing out) | @@ -2539,7 +2539,7 @@ class EditInternalDomainInfoView(BaseInternalDomainSettingsView):
def send_handoff_email(self):
partner_contact = self.internal_settings_form.cleaned_data['partner_contact']
dimagi_contact = self.internal_settings_form.cleaned_data['dimagi_contact']
- recipients = filter(None, [partner_contact, di... |
Fix forwarding of arguments into kernel function
Summary:
They should be forwarded by their actual type, not their rvalue reference.
This looked like perfect forwarding but actually wasn't.
Pull Request resolved:
ghstack-source-id: | @@ -11,7 +11,7 @@ namespace detail {
template<class FuncType, FuncType* kernel_func, class ReturnType, class... Parameters>
class WrapKernelFunction_<FuncType, kernel_func, ReturnType, guts::typelist::typelist<Parameters...>> final : public c10::OperatorKernel {
public:
- auto operator()(Parameters&&... args) -> declty... |
Snowfakery version 7.
Windows compatibility improved, especially in test cases.
Changed the syntax for CSV handling.
Added --output-folder command. | -version = "0.6.1"
+version = "0.7.0"
|
disable script detection by default
pytorch's CTC does not work for script detection as activations are too
peeked and don't capture the entire grapheme during recognition. | @@ -246,7 +246,7 @@ def binarize(threshold, zoom, escale, border, perc, range, low, high):
type=click.Choice(['horizontal-lr', 'horizontal-rl',
'vertical-lr', 'vertical-rl']),
help='Sets principal text direction')
-@click.option('-s/-n', '--script-detect/--no-script-detect', default=True,
+@click.option('-s/-n', '--scr... |
tv4play: override thumbnail download
in some videos they dont have og:image | @@ -11,6 +11,7 @@ from svtplay_dl.fetcher.dash import dashparse
from svtplay_dl.fetcher.hls import hlsparse
from svtplay_dl.service import OpenGraphThumbMixin
from svtplay_dl.service import Service
+from svtplay_dl.utils.http import download_thumbnails
class Tv4play(Service, OpenGraphThumbMixin):
@@ -61,6 +62,7 @@ clas... |
Remove user.admin checks from access_list handling
* Remove check for user.admin
Related to: | @@ -289,7 +289,6 @@ class QueryParameters:
.distinct("org_unit_id")
.values_list("org_unit_id", flat=True)
)
- if self.user.admin:
access_list.update(self.parameters.get("access").get(filter_key))
items = set(self.get_filter(filter_key) or [])
result = get_replacement_result(items, access_list, raise_exception, return_... |
server: don't print exceptions for network errors during opening and closing handshakes
Since full tracebacks are printed if a connection is reset
during handshake. Connection resets are to be expected, even in
controlled environments. Simply log them as info rather than warning,
and don't print a full traceback.
Clo... | @@ -62,6 +62,9 @@ class WebSocketServerProtocol(WebSocketCommonProtocol):
path = yield from self.handshake(
origins=self.origins, subprotocols=self.subprotocols,
extra_headers=self.extra_headers)
+ except ConnectionError as exc:
+ logger.info('Connection error during opening handshake', exc_info=True)
+ raise
except Ex... |
FilePage.download(): add revision parameter to download arbitrary revision
The parameter will default to the latest revision when unprovided,
so that this method remain backwards-compatiable. The revision
(instance of FileInfo) will provide the url and sha1 for the download
and verification process. | @@ -2634,7 +2634,7 @@ class FilePage(Page):
return self.site.upload(self, source_filename=filename, source_url=url,
**kwargs)
- def download(self, filename=None, chunk_size=100 * 1024):
+ def download(self, filename=None, chunk_size=100 * 1024, revision=None):
"""
Download to filename file of FilePage.
@@ -2642,7 +2642... |
Update README.md - enhance MacOS instructions
Added git cloning flint2 and how to get brew installed. Will update install.sh to compile and install flint2 | # chia-blockchain
Python 3.7 is used for this project. Make sure your python version is >=3.7 by typing python3.
-### Install
+### Install on Debian/Ubuntu
```bash
-# for Debian-based distros
-sudo apt-get install build-essential cmake python3-dev python3-venv --no-install-recommends mongodb-org=4.2.1
+sudo apt-get ins... |
[varLib.mutator] Fix mutating of ValueRecord objects
Part of fixing | @@ -740,6 +740,12 @@ def merge(merger, self, lst):
@MutatorMerger.merger(otBase.ValueRecord)
def merge(merger, self, lst):
+
+ # All other structs are merged with self pointing to a copy of base font,
+ # except for ValueRecords which are sometimes created later and initialized
+ # to have 0/None members. Hence the cop... |
navbar: Use `filter._sub` instead of calling `stream_data`.
Previously, in `make_tab_data()` we were using the stream name,
which we got from the filter, to call `stream_data.get_sub_by_name()`.
This commit switches to just using `filter._sub`, which is simpler and
better. | @@ -35,10 +35,7 @@ function make_tab_data(filter) {
// We can now be certain that the narrow
// involves a stream which exists and
// the current user can access.
- const stream = filter.operands("stream")[0];
- // We can rely on current_stream because if the stream doesn't
- // exist then the "question-circle-o" case ... |
fix: grid copy from excel with header, field label in user language
fix grid copy from excel with header row, support field label in user language | @@ -87,16 +87,17 @@ frappe.ui.form.ControlTable = class ControlTable extends frappe.ui.form.Control
}
get_field(field_name) {
let fieldname;
+ field_name = field_name.toLowerCase();
this.grid.meta.fields.some(field => {
if (frappe.model.no_value_type.includes(field.fieldtype)) {
return false;
}
- field_name = field_nam... |
Adds the plugin names field to scala sources
This adds the previously-defined `ScalaConsumedPluginNamesField` to Scala source files, as implied by the previous state of the code | @@ -51,13 +51,17 @@ class ScalaDependenciesField(Dependencies):
class ScalaConsumedPluginNamesField(StringSequenceField):
- """The names of Scala plugins that this source file requires.
+ help = """The names of Scala plugins that this source file requires.
+
+ The plugin must be defined by a corresponding `scalac_plugi... |
settings: Don't check mobile notifications if they are disabled.
Fixes | @@ -109,6 +109,12 @@ exports.set_up = function () {
exports.update_page = function () {
_.each(exports.notification_settings, function (setting) {
+ if (setting === 'enable_offline_push_notifications'
+ && !page_params.realm_push_notifications_enabled) {
+ // If push notifications are disabled at the realm level,
+ // ... |
[tox] Remove externals folder from exclude list
exclude folder was a pywikibot 2.0 folder
and is no longer needed with pywikibot 3.0 | @@ -106,7 +106,7 @@ deps =
ignore = D105,D211,D401,D413,D412,FI12,FI13,FI15,FI16,FI17,FI5,H101,H236,H301,H404,H405,H903,P101,P102,P103,W503
enable-extensions = H203,H204,H205
-exclude = .tox,.git,./*.egg,ez_setup.py,build,externals,user-config.py,./scripts/i18n/*,scripts/userscripts/*
+exclude = .tox,.git,./*.egg,ez_se... |
Lena Program 1 Bugfix
* Hebbian learning fix
simply changed it from error to warning.
* Removed no-targets error
removed error statement when system is not given targets for learning, because Hebbian doesn't need targets
* Typo Fixes
Fixing a problem discovered by Lena | @@ -916,7 +916,7 @@ def _validate_targets(object, targets, num_input_sets, context=None):
raise RunError("Length ({}) of target{} specified for run of {}"
" does not match expected target length of {}".
format(target_len, plural, append_type_to_name(object),
- np.size(object.target_mechanism.target)))
+ np.size(targetM... |
Rename 'version' arg to new_fulltext() as 'since'.
'since' is more consistent with other API calls. | @@ -642,13 +642,13 @@ class Zotero(object):
data=json.dumps(payload),
)
- def new_fulltext(self, version):
+ def new_fulltext(self, since):
"""
Retrieve list of full-text content items and versions which are newer
- than <version>
+ than <since>
"""
- query_string = "/{t}/{u}/fulltext?since={v}".format(
- t=self.librar... |
libmanage.py: minor style fix
TN: | @@ -481,7 +481,7 @@ class ManageScript(object):
raise
print >> sys.stderr, col('Errors, exiting', Colors.FAIL)
sys.exit(1)
- except Exception, e:
+ except Exception as e:
if parsed_args.debug:
raise
import traceback
|
if a trainable impl fit returns None, use it
as the trained impl | @@ -1304,6 +1304,10 @@ class TrainableIndividualOp(PlannedIndividualOp, TrainableOperator):
trained_impl = trainable_impl.fit(X, y)
else:
trained_impl = trainable_impl.fit(X, y, **filtered_fit_params)
+ # if the trainable fit method returns None, assume that
+ # the trainableshould be used as the trained impl as well
+... |
renamed function
corrected documentation
added a function to get all attributes of multiple faces | @@ -768,7 +768,7 @@ class FaceAttributesManagement(object):
temp = list(zip(names, values))
return [[self.get_face_attribute(fkey, name, value) for name, value in temp] for fkey in fkeys]
- def get_all_face_attributes(self, key, data=False):
+ def get_face_all_attributes(self, key, data=True):
"""Get all attributes of ... |
Update README.md
Added latest German BERTs from DMBZ | @@ -891,6 +891,8 @@ The table below shows the currently available model types and their models. You
| BERT | bert | bert-large-uncased-whole-word-masking-finetuned-squad | 24-layer, 1024-hidden, 16-heads, 340M parameters. <br>The bert-large-uncased-whole-word-masking model fine-tuned on SQuAD |
| BERT | bert | bert-lar... |
Psycopg2Connector __init__ doesn't accept a pool
The Psycopg2Connector __init__ function does not have a pool
argument. A user-created pool can be used, but it's to be
passed to the open function. | @@ -76,7 +76,6 @@ class Psycopg2Connector(connector.BaseConnector):
*,
json_dumps: Optional[Callable] = None,
json_loads: Optional[Callable] = None,
- pool: Optional[psycopg2.pool.ThreadedConnectionPool] = None,
**kwargs: Any,
):
"""
|
purge: fix rbd mirror purge
as of the service launched isn't
it's now `ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}` | - name: stop ceph rbd mirror with systemd
service:
- name: ceph-rbd-mirror@admin.service
+ name: "ceph-rbd-mirror@rbd-mirror.{{ ansible_hostname }}"
state: stopped
failed_when: false
|
[tests] Only find one alternative script with script_tests.py
utils.execute_pwb imports pwb and pywikibot and config variable cannot
be set directly for that environment and will be ignored. To set the
pwb_close_matches variable use the global argument handling.
This partly reverts | @@ -10,14 +10,12 @@ import unittest
from contextlib import suppress
from pywikibot.tools import has_module
-from pywikibot import config
from tests import join_root_path, unittest_print
from tests.aspects import DefaultSiteTestCase, MetaTestCaseClass, PwbTestCase
from tests.utils import execute_pwb
-saved_pwb_close_mat... |
Update data-and-archives.rst
Updated "Contribute Code" URL to the updated Github page. | Import your data
================
-You can import data from other tools to use with Boards. `Contribute code <https://www.focalboard.com/contribute/getting-started>`_ to expand this.
+You can import data from other tools to use with Boards. `Contribute code <https://mattermost.github.io/focalboard/>`_ to expand this.
I... |
[ci] add delay to `gdbserver_session`
Force delay to let gdbserver spawn correct and start listening to the tcp port | @@ -10,6 +10,7 @@ import platform
import re
import subprocess
import tempfile
+import time
import unittest
import warnings
from typing import Dict, Iterable, List, Optional, Union
@@ -262,6 +263,7 @@ def gdbserver_session(*args, **kwargs):
port = kwargs.get("port", 0) or GDBSERVER_DEFAULT_PORT
sess = start_gdbserver(ex... |
Sort `sawtooth peer list` output
This makes the command's output easier to predict. | @@ -59,7 +59,7 @@ def do_peer(args):
def do_peer_list(args):
rest_client = RestClient(base_url=args.url)
- peers = rest_client.list_peers()
+ peers = sorted(rest_client.list_peers())
if args.format == 'csv' or args.format == 'default':
print(','.join(peers))
|
[ci] always handle multiple containers
I missed a few places where CI tries to get the logs of a service.
All of these can fail if the pod has multiple containers. I added
`--all-containers` to ensure it never fails for multi-container Pods. | @@ -740,7 +740,7 @@ set +e
kubectl -n {self.namespace} rollout status --timeout=1h {resource_type} {name} && \
{wait_cmd}
EC=$?
-kubectl -n {self.namespace} logs --tail=999999 -l app={name} | {pretty_print_log}
+kubectl -n {self.namespace} logs --tail=999999 -l app={name} --all-containers=true | {pretty_print_log}
set ... |
travis: Drop patch element from python version
It's not used to select python installation. | @@ -12,9 +12,9 @@ dist: bionic
env:
jobs:
- - PYTHON=3.8.2
- - PYTHON=3.7.7
- - PYTHON=3.6.8
+ - PYTHON=3.8
+ - PYTHON=3.7
+ - PYTHON=3.6
global:
- PYTHONWARNINGS="ignore::DeprecationWarning"
- PIP_PROGRESS_BAR="off"
@@ -33,8 +33,8 @@ before_install:
# Install venv on Linux using Ubuntu distributed python
# distutils a... |
Fix empty Total_LCA_operation file
`NONE` feedstock was being ignored which resulted in merging with an empty dataframe | @@ -58,7 +58,9 @@ def lca_operation(locator):
# get the mean of all values for this
factors_resources_simple = [(name, values['GHG_kgCO2MJ'].mean()) for name, values in factors_resources.items()]
- factors_resources_simple = pd.DataFrame(factors_resources_simple, columns=['code', 'GHG_kgCO2MJ'])
+ factors_resources_sim... |
fix: Minor link fix in `CONTRIBUTING.md`
The link to the python SDK header in the contrib document was incorrect. | ## Overview
This guide is targeted at developers looking to contribute to Feast components in
the main Feast repository:
-- [Feast Python SDK / CLI](#feast-python-sdk-%2F-cli)
+- [Feast Python SDK / CLI](#feast-python-sdk--cli)
- [Feast Java Serving](#feast-java-serving)
- [Feast Go Client](#feast-go-client)
@@ -212,4 ... |
llvm, functions/LinearCombination: Don't emit pow(x,1.0)
It's not easy to optimize it away. | @@ -946,9 +946,12 @@ class LinearCombination(
pow_f = ctx.get_builtin("pow", [ctx.float_ty])
for i in range(vi.type.pointee.count):
+ ptri = builder.gep(vi, [ctx.int32_ty(0), ctx.int32_ty(i), index])
+ in_val = builder.load(ptri)
+
# No exponent
if isinstance(exponent_type, pnlvm.ir.LiteralStructType):
- exponent = ctx... |
remove always-on png forcing
only force output format of binarization to png if extension is jpeg or
similar. also prints a warning when forcing. | @@ -57,7 +57,11 @@ def binarizer(threshold, zoom, escale, border, perc, range, low, high, base_imag
try:
res = binarization.nlbin(im, threshold, zoom, escale, border, perc, range,
low, high)
- res.save(output, format='png')
+ form = None
+ if os.path.splitext(output)[1] in ['.jpg', '.jpeg', '.JPG', '.JPEG']:
+ form = '... |
[easy] remove unloadable toy schedule from examples
Test Plan: inspection
Reviewers: sashank, dgibson, yuhan | @@ -156,37 +156,4 @@ def get_toys_schedules():
run_config_fn=lambda _: {"intermediate_storage": {"filesystem": {}}},
execution_timezone=_toys_tz_info(),
),
- ScheduleDefinition(
- name="pandas_hello_world_hourly",
- cron_schedule="0 * * * *",
- pipeline_name="pandas_hello_world_pipeline",
- run_config_fn=lambda _: {
- ... |
Improve expectation docs
See | @@ -319,6 +319,13 @@ programs run on this QVM.
sample. The expectations returned from *different* ``expectation`` calls *will then
generally be different*.
+ To measure the expectation of a PauliSum, you probably want to
+ do something like this::
+
+ progs, coefs = hamiltonian.get_programs()
+ expect_coeffs = np.array... |
link subevent to messages for survey sms's
This will fix a bug where searching by phone number
doesn't pick up the events in the messaging event report
since the SMS isn't linked to the messaging event | @@ -59,6 +59,7 @@ def send_first_message(domain, recipient, phone_entry_or_number, session, respon
metadata = MessageMetadata(
workflow=workflow,
xforms_session_couch_id=session.couch_id,
+ messaging_subevent_id=logged_subevent.pk
)
if isinstance(phone_entry_or_number, PhoneNumber):
send_sms_to_verified_number(
@@ -111... |
Catch NotFound errors when trying to delete the invocation message when cleaning
This often happens during a raid, when an int e script is added to ban & clean messages. Since the invocation
message will be deleted on the first run, we should except subsequent NotFound errors. | @@ -3,7 +3,7 @@ import random
import re
from typing import Iterable, Optional
-from discord import Colour, Embed, Message, TextChannel, User
+from discord import Colour, Embed, Message, TextChannel, User, errors
from discord.ext import commands
from discord.ext.commands import Cog, Context, group, has_any_role
@@ -115,... |
Updating README
Moving Travis logo down and using image reference to declutter. | Mininet: Rapid Prototyping for Software Defined Networks
========================================================
-[](https://travis-ci.org/mininet/mininet)
-
*The best way to emulate almost any network on your laptop!*
Mininet 2.3.0d1
+[![Build St... |
[bugfix] Make archivebot ignore headers in nowiki, pre, etc.
archivebot.py has been incorrectly searching for thread headers in tags
like nowiki, pre, source and in comments | @@ -109,7 +109,7 @@ import pywikibot
from pywikibot.date import apply_month_delta
from pywikibot import i18n
-from pywikibot.textlib import TimeStripper
+from pywikibot.textlib import TimeStripper, _get_regexes
from pywikibot.textlib import to_local_digits
from pywikibot.tools import issue_deprecation_warning, FrozenDi... |
Review of domain_to_idna() to support more tests cases
Please note this patch comes after an issue reported by
which I could reproduce in 1/3 computer. | @@ -1159,23 +1159,44 @@ def domain_to_idna(line):
"""
if not line.startswith('#'):
- for separator in ['\t', ' ']:
- comment = ''
+ tabs = '\t'
+ space = ' '
- if separator in line:
+ tabs_position, space_position = (line.find(tabs), line.find(space))
+
+ if tabs_position > -1 and space_position > -1:
+ if space_positi... |
Update data-sources.rst
Update 3GPP data source doc | @@ -31,9 +31,21 @@ Ethical Considerations
-ListServ (3GPP)
+3GPP
=================
+The 3GPP mailing archive is managed using the LISTSERV software and is hosted at:
+https://list.etsi.org/scripts/wa.exe?HOME
+In order to be able to view most header fields and text bodies (there might still
+be some fields that are hid... |
Update test_platform_base.py
spelling correction | @@ -543,7 +543,7 @@ def test_multi_transition():
assert len(platform.transition_models) == 2
assert len(platform.transition_times) == 2
- # Check that platform states lenght increases as platform moves
+ # Check that platform states length increases as platform moves
assert len(platform) == 1
time = datetime.datetime.n... |
utils/misc: remove unused to_identifier
This has been moved to devlib, but, it appears, never removed from WA. | @@ -290,14 +290,6 @@ class LoadSyntaxError(Exception):
RAND_MOD_NAME_LEN = 30
-BAD_CHARS = string.punctuation + string.whitespace
-TRANS_TABLE = string.maketrans(BAD_CHARS, '_' * len(BAD_CHARS))
-
-
-def to_identifier(text):
- """Converts text to a valid Python identifier by replacing all
- whitespace and punctuation."... |
docs: add name and description to example SAML2 backend
these attributes are required to generate valid metadata in combination with required_attributes and/or optional_attributes | @@ -18,6 +18,8 @@ config:
enable_metadata_reload: no
sp_config:
+ name: "SP Name"
+ description: "SP Description"
key_file: backend.key
cert_file: backend.crt
organization: {display_name: Example Identities, name: Example Identities Org., url: 'http://www.example.com'}
|
docs: improved description of `virtualenvs.create` option
I tried to clarify how the `virtualenvs.create` config option works and
why it is a good idea to have virtual environments in docker containers
as well. | @@ -257,7 +257,23 @@ Use parallel execution when using the new (`>=1.1.0`) installer.
Create a new virtual environment if one doesn't already exist.
-If set to `false`, poetry will install dependencies into the current python environment.
+If set to `false`, Poetry will not create a new virtual environment. If it detec... |
Update config.yml
update slim upload folder | @@ -204,7 +204,7 @@ jobs:
mv dist/escu DA-ESS-ContentUpdate
mv dist/mustang DA-ESS-ContentUpdate-Mustang
slim package -o upload DA-ESS-ContentUpdate
- slim package -o upload_mustang DA-ESS-ContentUpdate-Mustang
+ slim package -o upload DA-ESS-ContentUpdate-Mustang
cp upload/*.tar.gz DA-ESS-ContentUpdate-latest.tar.gz
c... |
[AAT] Do not assume that StructWithLength is always 32 bits long
Most AAT tables encode struct lengths into 32 bits but some use only 16.
Therefore, take the size of the encoded struct length from otData. | @@ -447,22 +447,24 @@ class StructWithLength(Struct):
table = self.tableClass()
table.decompile(reader, font)
reader.seek(pos + table.StructLength)
- del table.StructLength
return table
def write(self, writer, font, tableDict, value, repeatIndex=None):
- value.StructLength = 0xdeadbeef
+ for convIndex, conv in enumerat... |
Fix formatting in 0.10.x upgrade instructions
Just a tiny bullet list fix | @@ -50,6 +50,7 @@ you will need to update that code to use the more precise name ``batch_kwargs_ge
For example, in the method ``DataContext.get_available_data_asset_names`` the parameter ``generator_names`` is now ``batch_kwargs_generator_names``.
If you are using ``BatchKwargsGenerators`` in your project config, follo... |
Add description for BQ tables and view relations.
Also make changes to table_options macro based on testing against a
real project. | {%- endmacro -%}
{% macro table_options() %}
- {%- set raw_persist_docs = config.get('persist_docs', {}) -%}
- {%- set raw_persist_relation_docs = raw_persist_docs.get('relation', false) -%}
-
- {%- if raw_persist_docs is {} -%}
- {{ return('') }}
- {% endif %}
+ {%- set raw_persist_docs = config.get('persist_docs', no... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.