message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
Handle non-scalar tensors
Fixes | @@ -109,7 +109,13 @@ class ScalarReader(object):
except ImportError as e:
log.debug("error importing make_ndarray: %s", e)
raise util.TryFailed()
- return val.tag, make_ndarray(val.tensor).item(), event.step
+ ndarray = make_ndarray(val.tensor)
+ try:
+ scalar_val = ndarray.item()
+ except ValueError:
+ return None
+ e... |
Move Save button in hamburger menu
This cleans up the header bar a little. | @@ -50,6 +50,7 @@ def create_hamburger_model(export_menu, tools_menu):
model.append_section(None, part)
part = Gio.Menu.new()
+ part.append(gettext("Save"), "win.file-save")
part.append(gettext("Save As..."), "win.file-save-as")
part.append_submenu(gettext("Export"), export_menu)
model.append_section(None, part)
@@ -17... |
Add delete_after to Interaction.edit_message
Closes | @@ -806,6 +806,7 @@ class InteractionResponse:
attachments: Sequence[Union[Attachment, File]] = MISSING,
view: Optional[View] = MISSING,
allowed_mentions: Optional[AllowedMentions] = MISSING,
+ delete_after: Optional[float] = None,
) -> None:
"""|coro|
@@ -835,6 +836,12 @@ class InteractionResponse:
allowed_mentions: O... |
limit queue size for async richlog
close | @@ -13,7 +13,7 @@ from util import cvimage
class _richlog_worker(threading.Thread):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
- self.queue = Queue()
+ self.queue = Queue(32)
self.lock = threading.Lock()
self.files = {}
self.daemon = True
|
add Jun 8 Seattle incident, woman stops breathing
The account from reddit was posted by one of the medics involved. | @@ -149,6 +149,14 @@ id: wa-seattle-12
* https://www.reddit.com/r/2020PoliceBrutality/comments/gycscp/cant_go_1_day_without_teargaslighting_us/?utm_source=share&utm_medium=web2x
* https://www.forbes.com/sites/jemimamcevoy/2020/06/08/seattle-police-use-tear-gas-against-protestors-despite-city-ban/#7e98a1d5b4bc
+### Woma... |
Fix rebase issue with CHANGES.txt
Rebasing off of master put my CHANGES.txt addition in an old release.
This commit moves it up to the correct section. | @@ -15,6 +15,10 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
From Adam Gross:
- Fix minor bug affecting SCons.Node.FS.File.get_csig()'s usage of the MD5 chunksize.
User-facing behavior does not change with this fix (GH Issue #3726).
+ - Added support for a new command-line parameter "--hash-format" to override the def... |
Validate.py
Modified validate to share a bit more info on the score that was incorrect. | @@ -176,7 +176,7 @@ def validate_standard_fields(object, uuids):
if 'impact' in object['tags'] and 'confidence' in object['tags']:
calculated_risk_score = int(((object['tags']['impact'])*(object['tags']['confidence']))/100)
if calculated_risk_score != object['tags']['risk_score']:
- errors.append("ERROR: risk_score not... |
Changes to the time.strftime to make it more accurate
Since some host files might need to be updated more frequently it's more appropriate to show timezone and the exact time for last build, hince changed the order of month and date to %d %B | @@ -925,7 +925,7 @@ def write_opening_header(final_file, **header_params):
write_data(final_file, "# This hosts file is a merged collection "
"of hosts from reputable sources,\n")
write_data(final_file, "# with a dash of crowd sourcing via Github\n#\n")
- write_data(final_file, "# Date: " + time.strftime("%B %d %Y", ti... |
FIX: Use genfromtxt to read channel names from .locs
Channel names read from .loc, .locs, and .eloc files were truncated to 4
character strings ("S4" numpy dtype). Using genfromtxt with "str" as
dtype lets numpy determine the required length and allows for reading
unicode characters as well. | @@ -313,8 +313,7 @@ def read_montage(kind, ch_names=None, path=None, unit='m', transform=False):
ch_names_ = data['name'].astype(str).tolist()
pos = np.vstack((data['x'], data['y'], data['z'])).T
elif ext in ('.loc', '.locs', '.eloc'):
- ch_names_ = np.loadtxt(fname, dtype='S4',
- usecols=[3]).astype(str).tolist()
+ ch... |
Fix some invalid French phone numbers starting with "+33 8x"
The full range of phone number starting with 08 isn't valid (eg. 083xx is not valid) so this patch limits the range to valid numbers only.
French validator used by the phonenumbers project: | @@ -11,7 +11,7 @@ class Provider(PhoneNumberProvider):
'+33 (0)4 ## ## ## ##',
'+33 (0)5 ## ## ## ##',
'+33 (0)6 ## ## ## ##',
- '+33 (0)8 ## ## ## ##',
+ '+33 (0)8 0# ## ## ##',
'+33 1 ## ## ## ##',
'+33 1 ## ## ## ##',
'+33 2 ## ## ## ##',
@@ -19,7 +19,7 @@ class Provider(PhoneNumberProvider):
'+33 4 ## ## ## ##',
'+... |
add max_keep_size
Summary:
Set max_keep_size to filter long utterances. Needed when trained on labeled datasets with long utterances.
Pull Request resolved: | @@ -76,6 +76,10 @@ class HubertPretrainingConfig(FairseqDataclass):
default=False,
metadata={"help": "pad shorter samples instead of cropping"},
)
+ max_keep_size: Optional[int] = field(
+ default=None,
+ metadata={"help": "exclude sample longer than this"},
+ )
max_sample_size: Optional[int] = field(
default=None,
met... |
boot: Fix ill-advised change from config component
When the config component was added, a change was made in boot that
causes problems. And I think was just wrong? | @@ -151,7 +151,6 @@ def _do_imports (components):
return done
-_inst = {}
def _do_launch (argv, skip_startup=False):
component_order = []
@@ -194,7 +193,7 @@ def _do_launch (argv, skip_startup=False):
if modules is False:
return False
- inst = _inst
+ inst = {}
for name in component_order:
cname = name
inst[name] = ins... |
Add checking for 404 errors that aborts create project
My apologies. I fixed my version, then added the code in your __init__.py to loop and wait for the not found error to disappear. By then, however, the error stopped occurring and I didn't notice that errors.py wasn't recognizing the error. | @@ -328,6 +328,10 @@ def get_gapi_error_detail(e,
message = error['error']['errors'][0]['message']
except KeyError:
message = error['error']['message']
+ if http_status == 404:
+ if 'Requested entity was not found' in message or 'does not exist' in message:
+ error = _create_http_error_dict(404, ErrorReason.NOT_FOUND.v... |
Update validate-credit-card-number-with-luhn-algorithm.yml
Adding digital lookup via negative numbers | @@ -12,6 +12,7 @@ rule:
- match: contain loop
description: Iterate over CC digits
- basic block:
+ - or:
- and:
- number: 0x0
- number: 0x2
@@ -24,6 +25,17 @@ rule:
- number: 0x7
- number: 0x9
description: Digital root lookup table
+ - and:
+ - number: 0x0
+ - number: 0x1
+ - number: 0x2
+ - number: 0x3
+ - number: 0x4... |
Update summer_2021.yaml
Added anione playlist urls | @@ -59,7 +59,7 @@ info:
streams:
crunchyroll: ''
museasia: ''
- anione: ''
+ anione: 'https://www.youtube.com/watch?v=hasJei2WwLk&list=PLxSscENEp7Jjad7wjjOwOoFgbHC5ZXhtG'
funimation|Funimation: ''
wakanim|Wakanim: ''
hidive: ''
@@ -178,7 +178,7 @@ info:
streams:
crunchyroll: ''
museasia: ''
- anione: ''
+ anione: 'http... |
change: relax urllib3 and requests restrictions.
Relax urllib3 and requests restrictions based on
and | @@ -39,7 +39,7 @@ required_packages = [
"protobuf>=3.1",
"scipy>=0.19.0",
"protobuf3-to-dict>=0.1.5",
- "requests>=2.20.0, <2.21",
+ "requests>=2.20.0, <3",
"smdebug-rulesconfig==0.1.2",
]
@@ -47,7 +47,7 @@ required_packages = [
extras = {
"analytics": ["pandas"],
"local": [
- "urllib3>=1.21, <1.25",
+ "urllib3>=1.21.1... |
Update ug015_storm_ref_pivot.rst
Updated / fixed refs() to reflect current state. | @@ -117,11 +117,14 @@ Optional parameters:
* **in:** return all nodes that have a secondary property *<type> (<ptype>) = <valu>* that is the same as (**references**) any primary *<prop> = <valu>* in the working set of nodes.
* **out:** return all the nodes whose primary *<prop> = <valu>* is the same as (is **referenced... |
Updating the logic to create a new spreadsheet if necessary.
Creates the spreadsheet, then performs a batch update with the new data. | @@ -141,20 +141,20 @@ class GoogleSheetsTranslator(base.Translator):
self._perform_batch_update(spreadsheet_id, requests)
else:
- sheets = []
- for catalog in catalogs:
- sheets.append(self._create_sheet_from_catalog(catalog, source_lang,
- prune=prune))
+ # Create a new spreadsheet and use the id.
+ service = self._cr... |
Remove type hints as part of
They broke the warning message that Python 2 is no longer supported. | -import typing
-
import sys
try:
@@ -11,9 +9,7 @@ except (ImportError, SyntaxError):
exit(1)
-def display_image(image,
- position: typing.Tuple[int, int] = None,
- align: str = 'topleft'):
+def display_image(image, position=None, align='topleft'):
""" Display an image on the mock turtle's canvas.
:param image: either a... |
[ci] Upgraded CircleCI using 13.1.0-browsers docker image.
fixed | @@ -3,7 +3,7 @@ jobs:
build:
working_directory: ~
docker:
- - image: circleci/node:12.9.1-browsers
+ - image: circleci/node:13.1.0-browsers
steps:
- checkout
- run: npm install
|
Check if SSLContext supports loading default certs
This changes behavior. When creating a TLS connection, not specifying
cacert/capath and while on a Python version without load_default_certs,
creating the socket will not fail as before, but verifying the
connection will fail instead. | @@ -145,7 +145,7 @@ def _wrap_sni_socket(sock, sslopt, hostname, check_hostname):
capath = sslopt.get('ca_cert_path', None)
if cafile or capath:
context.load_verify_locations(cafile=cafile, capath=capath)
- else:
+ elif hasattr(context, 'load_default_certs'):
context.load_default_certs(ssl.Purpose.SERVER_AUTH)
if sslop... |
Fixed a syntax error on DDL statement
COMPUPDATE EMPTYASNULL ON -> COMPUPDATE ON EMPTYASNULL | @@ -582,7 +582,7 @@ copy inventory from 's3://redshift-downloads/TPC-DS/30TB/inventory/' credentials
copy item from 's3://redshift-downloads/TPC-DS/30TB/item/' credentials 'aws_access_key_id=<USER_ACCESS_KEY_ID> ;aws_secret_access_key=<USER_SECRET_ACCESS_KEY>' gzip delimiter '|' COMPUPDATE ON EMPTYASNULL region 'us-eas... |
Pontoon: Update Hindi (hi-IN) localization of AMO
Localization authors:
Mahtab Alam
heemananyatanti
Shivam Singhal | @@ -5,8 +5,8 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2019-10-22 12:35+0000\n"
-"PO-Revision-Date: 2019-11-21 10:48+0000\n"
-"Last-Translator: ravi <ravi.103151@gmail.com>\n"
+"PO-Revision-Date: 2019-03-30 07:09+0000\n"
+"Last-Translator: heemanany... |
[utils.path] added `to_existing_cased_path`
works like `to_cased_path` but only returns existing paths, raises FileNotFoundError otherwise | @@ -155,10 +155,10 @@ def cased_path_candidates(path: str, root: str = osp.sep,
def to_cased_path(path: str, root: str = osp.sep,
is_fs_case_sensitive: bool = True) -> str:
"""
- Returns a cased version of the given path as far as corresponding nodes exist in the
- given root directory. If multiple matches are found, o... |
llvm, port: Do not create copy of port parameters for OVERRIDE modulation
It's not needed as the port function is not executed in OVERRIDE case. | @@ -2289,10 +2289,10 @@ class Port_Base(Port):
base_params = pnlvm.helpers.get_param_ptr(builder, self, params,
"function")
- if len(self.mod_afferents) > 0:
- # Create a local copy of the function parameters
- # only if there are modulating projections
- # LLVM is not eliminating the redundant copy
+ if any(a.sender.m... |
set default status for s3 posts
and add support for success_action_redirect. | @@ -776,8 +776,9 @@ class ResponseObject(_TemplateEnvironmentMixin, ActionAuthenticatorMixin):
template = self.response_template(S3_DELETE_BUCKET_WITH_ITEMS_ERROR)
return 409, {}, template.render(bucket=removed_bucket)
- def _bucket_response_post(self, request, body, bucket_name):
- if not request.headers.get("Content-... |
Use py_compile instead of distutils to compile model file
distutils is considered deprecated in python 3.10.
To be removed in 3.12. | @@ -6,8 +6,8 @@ Provides the CLI for the code generator which transforms a Gaphor models
"""
import argparse
-from distutils.util import byte_compile
from pathlib import Path
+from py_compile import compile
from gaphor.codegen import profile_coder, uml_coder
@@ -34,7 +34,7 @@ def main() -> None:
)
else:
uml_coder.gener... |
Fix for exec_ceph_cmd
For some commands, like "ceph fs ls", the returned output is a list | @@ -277,4 +277,9 @@ def exec_ceph_cmd(ceph_cmd):
ocp_pod_obj = OCP(kind='pods', namespace=defaults.ROOK_CLUSTER_NAMESPACE)
ct_pod = get_ceph_tools_pod()
ceph_cmd += " --format json-pretty"
- return ocp_pod_obj.exec_cmd_on_pod(ct_pod, ceph_cmd).toDict()
+ out = ocp_pod_obj.exec_cmd_on_pod(ct_pod, ceph_cmd)
+
+ # For som... |
fix return multi-valued attributes from LDAP
So the source attribute value can now be:
* `None` if there was no value
* a string (if there was one value)
* a list of strings (if there was more than one value) | @@ -357,7 +357,7 @@ class LDAPValueFormatter(object):
if self.string_format is not None:
values = {}
for attribute_name in self.attribute_names:
- value = self.get_attribute_value(record, attribute_name)
+ value = self.get_attribute_value(record, attribute_name, first_only=True)
if value is None:
values = None
break
@@... |
Adding import from Networkx and graph tool lib
change tempoary implemented in and still not tested. Futhermore some optimization could be done especialy on the import from graph tool | @@ -131,7 +131,7 @@ class Graph(fourier.GraphFourier, difference.GraphDifference):
r"""Doc TODO"""
##from graph_tool.all import *
import graph_tool
- g = graph_tool.Graph(directed=directed)
+ g = graph_tool.Graph(directed=directed) #TODO check for undirected graph
nonzero = self.W.nonzero()
g.add_edge_list(np.transpose... |
removed explicit lower from repre ext to not shadow upper case issue
Using lower here would hide possibly broken representation, as we would expect both repre["ext"] and repre["name"] be lowercased. In case the aren't review won't get created >> someone will notice and fix issues on source representation. | @@ -152,7 +152,7 @@ class ExtractReview(pyblish.api.InstancePlugin):
if input_ext.startswith("."):
input_ext = input_ext[1:]
- if input_ext.lower() not in self.supported_exts:
+ if input_ext not in self.supported_exts:
self.log.info(
"Representation has unsupported extension \"{}\"".format(
input_ext
|
wer_eligible
Fix nutrition_status_weight
Fix nutrition_status_weighed | @@ -966,6 +966,7 @@ class ChildHealthMonthlyAggregationHelper(BaseICDSAggregationHelper):
#fully_immunized_eligible = "{} AND {} > 365".format(valid_in_month, age_in_days)
pse_eligible = "({} AND {} > 36)".format(valid_in_month, age_in_months_end)
ebf_eligible = "({} AND {} <= 6)".format(valid_in_month, age_in_months)
... |
Update environment variable syntax in extras.yml
Update environment variable syntax in extras.yml for the windows workflow to match the powershell syntax. | @@ -59,13 +59,22 @@ jobs:
# Installing with -e to keep installation local (for NOSE_NOPATH)
# but still compile Cython extensions
python -m pip install -e .[testing]
- - name: Run test_packages ${{ matrix.nose-tests }}
+ - name: Run test_packages Ubuntu ${{ matrix.nose-tests }}
+ if: ${{matrix.os == 'ubuntu-18.04'}}
en... |
[profiler] Skip i386 skip condition
See for some context, this test wasn't actually being skipped on i386 | @@ -284,7 +284,7 @@ def test_estimate_peak_bandwidth(target, dev):
), f"Bandwidth should be between 10^9 and 10^12, but it is {bandwidth}"
-@pytest.mark.skipif(platform.machine() == "i386", reason="Cannot allocate enough memory on i386")
+@tvm.testing.skip_if_32bit(reason="Cannot allocate enough memory on i386")
@tvm.t... |
Integ tests: use node.name in place of node.id for test_name
I had an OSError, Invalid argument, because node.nodeid was:
tests_outputs/.../test_slurm.py::test_slurm[c5.xlarge-us-west-1-alinux-slurm].config
instead node.name is:
tests_outputs/.../test_slurm[c5.xlarge-us-west-1-alinux-slurm].config
Doc: | @@ -176,11 +176,11 @@ def clusters_factory(request):
def _write_cluster_config_to_outdir(request, cluster_config):
out_dir = request.config.getoption("output_dir")
os.makedirs(
- "{out_dir}/clusters_configs/{test_dir}".format(out_dir=out_dir, test_dir=os.path.dirname(request.node.nodeid)),
+ "{out_dir}/clusters_configs... |
store tasks used to initiate peer connections
to ensure they are kept alive and to be able to wait for them if we hit the upper limit on number of pending outgoing connections | @@ -64,7 +64,8 @@ class FullNodeDiscovery:
self.cleanup_task: Optional[asyncio.Task] = None
self.initial_wait: int = 0
self.resolver = dns.asyncresolver.Resolver()
- self.pending_outbound_connections: Set = set()
+ self.pending_outbound_connections: Set[str] = set()
+ self.pending_tasks: Set[asyncio.Task] = set()
async... |
feat(online_value_artist): add online_value_artist interface
add online_value_artist interface | @@ -124,5 +124,5 @@ def news_cctv(date: str = "20130308") -> pd.DataFrame:
if __name__ == "__main__":
- news_cctv_df = news_cctv(date="20150208")
+ news_cctv_df = news_cctv(date="20211115")
print(news_cctv_df)
|
Github workflow bot fix
It seems LABEL is not a recognized argument. | @@ -52,6 +52,5 @@ jobs:
steps:
- uses: actions-automation/pull-request-responsibility@main
with:
- LABEL: "keylime-bot for keylime"
reviewers: "core"
num_to_request: 3
|
fix: remove attr helpers and type
these can potentially lead to security issues, avoiding for now | @@ -196,12 +196,9 @@ def get_python_builtins():
'all': all,
'any': any,
'bool': bool,
- 'delattr': delattr,
'dict': dict,
'enumerate': enumerate,
'filter': filter,
- 'getattr': getattr,
- 'hasattr': hasattr,
'isinstance': isinstance,
'issubclass': issubclass,
'list': list,
@@ -210,11 +207,9 @@ def get_python_builtins()... |
doc: don't mention legacy tools in main README
Legacy tools will be removed in subsequent commits. | @@ -30,12 +30,6 @@ High-level support for implementing
[repository operations](https://theupdateframework.github.io/specification/latest/#repository-operations)
is planned but not yet provided: see [1.0.0 plans](https://github.com/theupdateframework/python-tuf/blob/develop/docs/1.0.0-ANNOUNCEMENT.md).
-In addition to t... |
zos: don't use universal-new-lines mode
PR-URL: | @@ -233,6 +233,11 @@ def LoadOneBuildFile(build_file_path, data, aux_data, includes,
# Open the build file for read ('r') with universal-newlines mode ('U')
# to make sure platform specific newlines ('\r\n' or '\r') are converted to '\n'
# which otherwise will fail eval()
+ if sys.platform == 'zos':
+ # On z/OS, univer... |
[subset] Add --layout-scripts
Fixes | @@ -168,6 +168,10 @@ Glyph set expansion:
* Keep all features.
--layout-features+=aalt --layout-features-=vrt2
* Keep default set of features plus 'aalt', but drop 'vrt2'.
+ --layout-scripts[+|-]=<script>[,<script>...]
+ Specify (=), add to (+=) or exclude from (-=) the comma-separated
+ set of OpenType layout script t... |
operations.repo: regen: return number of actual errors
Instead of just an error status. | @@ -234,7 +234,7 @@ class operations(sync_operations):
try:
if sync_rate is not None:
cache.set_sync_rate(1000000)
- ret = 0
+ errors = 0
# Force usage of unfiltered repo to include pkgs with metadata issues.
# Matches are collapsed directly to a list to avoid threading issues such
@@ -245,19 +245,19 @@ class operation... |
Update `numeric_match_with_0_1_relative_error_fn`
Allow `numeric_match_with_0_1_relative_error_fn` to run on non numeric targets. Currently if target is non-numeric, the function will fail while converting to float. Return 0. score by return False on `check_if_numeric_value_is_within_relative_error` instead of failing... | @@ -449,7 +449,10 @@ def check_if_numeric_value_is_within_relative_error(
# intentional: the task should supply valid targets.
assert isinstance(target, list)
assert len(target) == 1
+ try:
ftarget = float(target[0])
+ except ValueError:
+ return False
# We try to convert the model's response, a string, to a floating-p... |
doc: Fix the snippet in "The Script Validator" section
In the snippet of code, store_nfs_version should point to an object
instead of an array. | @@ -186,8 +186,8 @@ as well:
output: OUTPUT_VAR
- script:
store_nfs_version: # Because inline is set, this is just a friendly name
- - inline: rpm -q nfs-utils # Runs this text directly, rather than reading a file
- - output: nfs-version # Places the stdout of this script into an argument
+ inline: rpm -q nfs-utils # R... |
update rays.display : change xlabels
Better names, like it was already written in the docstrings of each histogram methods. The main problem was with the word 'distance' which is ambiguous (z vs y axis). | @@ -319,7 +319,7 @@ class Rays:
# axis1.set_title('Intensity profile')
axis1.plot(x, y, 'k-', label="Intensity")
axis1.set_ylim([0, max(y) * 1.1])
- axis1.set_xlabel("Distance")
+ axis1.set_xlabel("Height of ray")
axis1.set_ylabel("Ray count")
axis1.legend(["Intensity"])
@@ -328,7 +328,7 @@ class Rays:
axis2.plot(x, y,... |
SetQueryTest : Avoid `six`
We don't need now we only support Python 3. | ##########################################################################
import inspect
-import six
import unittest
import imath
@@ -200,7 +199,7 @@ class SetQueryTest( GafferSceneTest.SceneTestCase ) :
"""
) )
- with six.assertRaisesRegex( self, Gaffer.ProcessException, 'Context has no variable named "scene:path"' )... |
fix CreateCommCareUserModal
looks like django 1.10 (deployed Mar. 21) changed something
affecting the render_to_string call | @@ -12,7 +12,6 @@ from django.http import HttpResponseRedirect, HttpResponse,\
HttpResponseForbidden, HttpResponseBadRequest, Http404
from django.http.response import HttpResponseServerError
from django.shortcuts import render, redirect
-from django.template import RequestContext
from django.template.loader import rend... |
TST: Add a test with an almost singular design matrix for lsq_linear
The problem and the test was reported in issue | @@ -108,6 +108,19 @@ class BaseMixin(object):
assert_(isinstance(res.message, str))
assert_(res.success)
+ # This is a test for issue #9982.
+ def test_almost_singular(self):
+ A = np.array(
+ [[0.8854232310355122, 0.0365312146937765, 0.0365312146836789],
+ [0.3742460132129041, 0.0130523214078376, 0.0130523214077873],
... |
Deepcopy the object, then run again check_trigger_amount
This solves the issue of the timeseries going negative! | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
-import numpy as np
import logging
+from copy import deepcopy
+
+import numpy as np
LGR = logging.getLogger(__name__)
@@ -51,7 +53,8 @@ def find_runs(phys_in, ntp_list, tr_list, thr=None, padding=9):
for run_idx, run_tps in enumerate(ntp_list):
# correct time offset for th... |
Fix refrigeration schedules
Now Qcre_sys gets calculated. Now the final energy demands are missing. | @@ -118,9 +118,9 @@ def calc_deterministic_schedules(archetype_schedules, archetype_values, bpr, lis
# define schedules and codes
occupant_schedules = ['ve', 'Qs', 'X']
- electricity_schedules = ['Ea', 'El', 'Ed']
+ electricity_schedules = ['Ea', 'El', 'Ed', 'Qcre']
water_schedules = ['Vww', 'Vw']
- process_schedules =... |
Connected embed
Literally just changes the "Connected!" message to an embed so it looks a bit nicer, and the little added bonus that you can click on the Python Bot and it will send you to the bot's repo. | # coding=utf-8
+from discord import Embed
from discord.ext.commands import AutoShardedBot
from bot.constants import DEVLOG_CHANNEL
@@ -14,7 +15,15 @@ class Logging:
async def on_ready(self):
print("Connected!")
- await self.bot.get_channel(DEVLOG_CHANNEL).send("Connected!")
+
+ embed = Embed(description="Connected!")
+... |
Add pointer to checked-in tutorial code
Summary: Fixes
Test Plan: Manual
Reviewers: #ft, schrockn, sashank | @@ -20,3 +20,7 @@ Tutorial
reusing_solids
composite_solids
composition_functions
+
+
+You can find all of the tutorial code checked into the dagster repository at
+``dagster/examples/dagster_examples/intro_tutorial``.
|
defaults for stdout and stderr should be bytes
only print stdout if no OSError exception was raised | @@ -109,7 +109,8 @@ def compile(source,
stderr=subprocess.PIPE)
except OSError:
# preserve historic status code used by exec_command()
- cp = subprocess.CompletedProcess(c, 127, stdout='', stderr='')
+ cp = subprocess.CompletedProcess(c, 127, stdout=b'', stderr=b'')
+ else:
if verbose:
print(cp.stdout.decode())
finally... |
Fix latex error summary
* fix latex error summary
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see
* Move error to inside loop
* change error_pos[0] to log_index | @@ -195,8 +195,10 @@ def compile_tex(tex_file, tex_compiler, output_format):
if error_pos:
with open(tex_file, "r") as g:
tex = g.readlines()
- logger.error("LaTeX compilation error: {log[error_pos][2:])}")
for log_index in error_pos:
+ logger.error(
+ f"LaTeX compilation error: {log[log_index][2:]}"
+ )
index_line = l... |
Remove sudo for pip install
Sudo installs the packages during
pip install into the systems package
distribution dir, and not in the one from
the virtual environment | @@ -15,8 +15,8 @@ install:
- sudo ln -s /tmp/nextflow/nextflow /usr/local/bin/nextflow
# Set up nf-core and test/coverage modules
- cd ${TRAVIS_BUILD_DIR}
- - sudo pip install .
- - sudo pip install codecov nose pytest pytest-cov
+ - pip install .
+ - pip install codecov nose pytest pytest-cov
script: python -m pytest ... |
Add 'contactable()' function to filter out non-accessible speakers
Addresses requirement discussed in | @@ -512,6 +512,69 @@ def scan_network_any_soco(household_id=None, **network_scan_kwargs):
return any_zone
+def contactable(speakers):
+ """Find only contactable players in a set of `SoCo` objects.
+
+ This function checks a set of `SoCo` objects to ensure that each
+ associated Sonos player is currently contactable. A ... |
Fix wording for scheduler in Helm values
Summary: The field `scheduler` is not deprecated - only the the option for the K8sScheduler.
Test Plan: N/A
Reviewers: dgibson, nate, sashank | @@ -229,14 +229,18 @@ pipelineRun:
YOUR_ENV_VAR: ""
####################################################################################################
-# Scheduler: Configuration for the K8sScheduler. (deprecated)
+# Scheduler: Configuration for the scheduler
##########################################################... |
Improve performance of ilen function.
The benchmarks in and showed that this approach is faster than
the current (and the one before the current) implementation.
An inline comment to refer to the benchmarks has been added to the code
so that any future changes can refer to the old benchmarks. | @@ -441,10 +441,12 @@ def ilen(iterable):
This consumes the iterable, so handle with care.
"""
- length = 0
- for length, _ in enumerate(iterable, 1):
- pass
- return length
+ # This approach was selected because benchmarks showed it's likely the
+ # fastest of the known implementations at the time of writing.
+ # See ... |
[doc] Added update regarding URL difference based on deployment
This is from [1] as networking guide content has been imported from
openstack-manual [2].
[1]
[2]
Closes-Bug: | @@ -419,6 +419,13 @@ segment contains one IPv4 subnet and one IPv6 subnet.
As of the writing of this guide, there is not placement API CLI client,
so the :command:`curl` command is used for this example.
+ .. note::
+
+ Service points URLs differ depending on your OpenStack deployment. You
+ can discover the Placement ... |
Azure: add deploy and delete transformers
They are used to deploy a VM for other transformers like export VHD,
build kernel and so on. | @@ -11,6 +11,7 @@ from dataclasses_json import dataclass_json
from retry import retry
from lisa import schema
+from lisa.environment import Environments, EnvironmentSpace
from lisa.feature import Features
from lisa.features import StartStop
from lisa.node import RemoteNode
@@ -24,6 +25,7 @@ from .common import (
AZURE_... |
Add shape mismatch tests
* Add shape mismatch tests
Added a couple of tests in which we check tensors of different shapes for inequality.
The test should return the correct result and not throw ValueError from np.allclose.
* Remove whitespaces | @@ -235,11 +235,21 @@ class EqualTests(unittest.TestCase):
t2 = TensorBase(np.array([1, 4, 3]))
self.assertFalse(syft.equal(t1, t2))
+ def test_shape_not_equal(self):
+ t1 = TensorBase(np.array([1, 2]))
+ t2 = TensorBase(np.array([1, 4, 3]))
+ self.assertFalse(syft.equal(t1, t2))
+
def test_inequality_operation(self):
... |
Run CI tests on Windows, too
Involves adding caching on `windows-latest` too, and enforcing | @@ -5,7 +5,10 @@ on: [push, pull_request, workflow_dispatch]
jobs:
cache_nltk_data:
name: cache nltk_data
- runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ os: [ubuntu-latest, windows-latest]
+ runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
@@ -15,12 +18,12 @@ jobs:
id: restore-cache
wi... |
Update ffmpeg.py
get fix | @@ -130,7 +130,7 @@ class MediaStreamInfo(object):
self.metadata = {}
def toJson(self):
- language = self.metadata.get("language", default="und").lower().strip()
+ language = self.metadata.get("language", "und").lower().strip()
out = {'index': self.index,
'codec': self.codec,
'type': self.type}
|
Typo fix: example of BIF
example of method BIFWriter.write_bif() | @@ -652,7 +652,7 @@ $properties}\n"""
>>> from pgmpy.readwrite import BIFReader, BIFWriter
>>> model = BIFReader('dog-problem.bif').get_model()
>>> writer = BIFWriter(model)
- >>> writer.write_bif(filname='test_file.bif')
+ >>> writer.write_bif(filename='test_file.bif')
"""
writer = self.__str__()
with open(filename, "... |
macOS is now supported
Remove warning about macOS support from tutorial | @@ -72,13 +72,6 @@ capabilities, and set the stage for understanding how TVM works.
#
-################################################################################
-# .. note:: Supported operating systems
-#
-# TVMC is only supported on Linux. Currently macOS and Windows default
-# threading models do not support t... |
Update environmental_inhalers.json
tweaked wording to reflect to emphasise respimat [see issue 2144](https://github.com/ebmdatalab/openprescribing/issues/2144) is not an MDI as previously classified by dm+d | "why_it_matters": [
"The NHS has <a href='https://www.longtermplan.nhs.uk/wp-content/uploads/2019/08/nhs-long-term-plan-version-1.2.pdf'>committed",
"to reducing its carbon footprint by 51% by 2025</a> to meet the target in the Climate Change Act, including a shift to dry powdered",
- "inhalers (DPI) to deliver a reduc... |
Removed extra memory multiplication
(resolves | @@ -203,7 +203,7 @@ def parse_memory_limit(mem: float) -> str:
def parse_memory(mem: float, resource: bool) -> str:
"""Parse memory parameter."""
lsf_unit = get_lsf_units(resource=resource)
- megabytes_of_mem = convert_units(float(mem) * 1024, src_unit=lsf_unit, dst_unit='MB')
+ megabytes_of_mem = convert_units(float(m... |
Check pre-processing output falls in valid range
Summary: Check that pre-processed batch data is within range of expected magnitudes | @@ -11,6 +11,9 @@ from ml.rl.preprocessing.normalization import MISSING_VALUE, NormalizationParame
from torch.nn import Module, Parameter
+MAX_FEATURE_VALUE = 6
+MIN_FEATURE_VALUE = MAX_FEATURE_VALUE * -1
+
logger = logging.getLogger(__name__)
@@ -118,6 +121,8 @@ class Preprocessor(Module):
j, input[:, j : j + 1], norm... |
stats: Don't set display to none in alert class.
The alert class is used only by one element so this style
can be applied directly to the element instead. | @@ -108,10 +108,6 @@ p {
float: right;
}
-.alert {
- display: none;
-}
-
.button {
font-family: 'Source Sans Pro', 'Helvetica Neue', sans-serif !important;
border: none;
@@ -185,6 +181,10 @@ p {
position: relative;
}
+#id_stats_errors {
+ display: none;
+}
+
#users_hover_info,
#hoverinfo {
display: none;
|
Update getting_started.ipynb
Replaced jax.value_and_grad with jax.grad in section 7 since the outputted loss value wasn't being used | " [Module.apply](https://flax.readthedocs.io/en/latest/flax.linen.html#flax.linen.Module.apply)\n",
" method.\n",
"- Computes the `cross_entropy_loss` loss function.\n",
- "- Evaluates the loss function and its gradient using\n",
- " [jax.value_and_grad](https://jax.readthedocs.io/en/latest/jax.html#jax.value_and_grad)... |
[LLVM/CPU] Terminate basic block after "ret" instruction
* [LLVM/CPU] Terminate basic block after "ret" instruction
"Ret" is a terminator in LLVM IR and there should be no instructions
in the basic block following it. When generating a "ret", end the
current block and start a new one. | @@ -781,6 +781,9 @@ llvm::Value* CodeGenCPU::CreateIntrinsic(const CallNode* op) {
return CreateStaticHandle();
} else if (op->op.same_as(builtin::tvm_throw_last_error())) {
builder_->CreateRet(ConstInt32(-1));
+ auto next_block = std::next(builder_->GetInsertBlock()->getIterator());
+ llvm::BasicBlock* new_bb = llvm::... |
numpy based 16 based conversion
Uses numpy to save image as 16 bit image. | This code creates a dataframe of dicom headers based on dicom files in a filepath.
This code also extracts the images within those dicoms if requested. see section 'print images'
pip3 install image numpy pandas pydicom pillow pypng
+Make sure to have empty extracted-images, failed-dicom/1, failed-dicom/2, failed-dicom/... |
TF on some platforms never landed as 2.0.0
Using any available version between 2.0 and 2.1 for our TF2 tests. | @@ -7,7 +7,7 @@ These tests use `guild.tfevent`, which requires that we call
Install TensorFlow 2:
- >>> quiet("pip install tensorflow==2.0.0 --upgrade",
+ >>> quiet("pip install tensorflow>=2.0.0,<2.1 --upgrade",
... ignore="DEPRECATION")
NOTE: We install 2.0.0 here because `tensorflow` 2.1 appears to be
@@ -25,7 +25,... |
Cleaning up some types
Summary: We don't need metaclass here. | @@ -21,14 +21,9 @@ from typing import ( # noqa
FEATURES = Dict[int, float]
ACTION = Union[str, FEATURES]
-ACTION_TYPEVAR = TypeVar("ACTION_TYPEVAR", str, FEATURES)
-class NamedTupleGenericMeta(NamedTupleMeta, GenericMeta):
- pass
-
-
-class Samples(NamedTuple, Generic[ACTION_TYPEVAR], metaclass=NamedTupleGenericMeta):
... |
Update lhs.py
added a "approximate time left" print for console output | @@ -110,10 +110,14 @@ class lhs(_algorithm):
self.datawriter.save(like, randompar, simulations=simulations)
# Progress bar
acttime = time.time()
+
+ #create string of the aproximate time left to complete all runs
+ timestr = time.strftime("%H:%M:%S", time.gmtime(round(((acttime - starttime) /
+ (rep + 1)) * (repetition... |
added originalBasename and originalDirname to instance
Will be used to fill 'source' (and 'online') template.
Source template is used to publish in-situ, eg. without copying possibly massive files (as pointcaches etc.) | +import os.path
+
import pyblish.api
@@ -22,3 +24,9 @@ class CollectSource(pyblish.api.ContextPlugin):
self.log.info((
"Source of instance \"{}\" was already set to \"{}\""
).format(instance.data["name"], source))
+
+ if not instance.data.get("originalBasename"):
+ instance.data["originalBasename"] = os.path.basename(s... |
Removing radiation check
Since it wasn't working and isn't really necessary | @@ -1304,6 +1304,8 @@ class SensitivityDemandSimulateTool(object):
# num_simulations, sample_index
samples_folder = parameters[2].valueAsText
+ num_simulations = parameters[4]
+ sample_index = parameters[5]
if samples_folder is None:
return
elif not os.path.exists(samples_folder):
@@ -1315,11 +1317,11 @@ class Sensitiv... |
Fix: typo in link to Papermill library
I found this issue when I clicked the link and got a 404 | @@ -91,7 +91,7 @@ Dagster works with the tools and systems that you're already using with your dat
/ <img style="vertical-align:middle" src="https://user-images.githubusercontent.com/609349/57987827-fa268b80-7a3b-11e9-8a18-b675d76c19aa.png">
</td>
<td style="border-left: 0px"> <b>Jupyter / Papermill</b></td... |
Fix cleaning documents
Field <node> is missing in CLI example, this patch will make it right. | @@ -169,20 +169,20 @@ higher.
Examples of doing this with a JSON string::
- ironic --ironic-api-version 1.15 node-set-provision-state \
+ ironic --ironic-api-version 1.15 node-set-provision-state <node> \
clean --clean-steps '[{"interface": "deploy", "step": "erase_devices_metadata"}]'
- ironic --ironic-api-version 1.1... |
[nightly] Move scheduling tests into one suite
For future convenience, we are moving scheduling-related tests into one suite for easier monitoring and benchmarking. | @@ -61,8 +61,6 @@ CORE_NIGHTLY_TESTS = {
"non_streaming_shuffle_100gb",
"non_streaming_shuffle_50gb_large_partition",
"non_streaming_shuffle_50gb",
- "dask_on_ray_10gb_sort",
- "dask_on_ray_100gb_sort",
SmokeTest("dask_on_ray_large_scale_test_no_spilling"),
SmokeTest("dask_on_ray_large_scale_test_spilling"),
"stress_te... |
Fix issue with column delimitor in CHECKSUMS
Changed the way of parsing CHECKSUMS results | @@ -53,10 +53,10 @@ recipe:
wget -c $vcf_url.tbi
sum_obs=`sum $vcf_local`
- sum_exp=`grep $vcf_local CHECKSUMS | awk '{print $1,$2}'`
+ sum_exp=sum_exp=`awk 'BEGIN{OFS=" "} $3==FN{gsub("\t"FN,""); print $0}' "FN=$vcf_local" CHECKSUMS`
sum_obs_index=`sum $vcf_local.tbi`
- sum_exp_index=`grep $vcf_local.tbi CHECKSUMS | a... |
Standalone: Fix, wasn't detecting the standard library extension modules as standard library.
* On Windows these live in a dedicated directory, which meant they were
not discovered by standard library freezing and could be missing
therefore. | @@ -28,6 +28,8 @@ module.
import os
+from nuitka.utils.Utils import getOS
+
def getStandardLibraryPaths():
""" Get the standard library paths.
@@ -108,6 +110,12 @@ def getStandardLibraryPaths():
if os.path.isdir(candidate):
stdlib_paths.add(candidate)
+ if getOS() == "Windows":
+ import _ctypes
+ stdlib_paths.add(
+ os... |
Solve_captcha option added to config
Added solve_captcha to config. Setting to true will allow captcha solving, either auto (2Captcha is token found) or manual. | @@ -6,6 +6,7 @@ import requests
import os
from pokemongo_bot.event_manager import EventHandler
+from pokemongo_bot.base_task import BaseTask
from sys import platform as _platform
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
@@ -14,9 +15,11 @@ SITE_KEY = '6LeeTScTAAAAADqvhqVMhPp... |
GCE: return a clear error message on deletes
I'm working on another PR to actually handle
VM deletes the way we discussed, but this at least
allows GCE to return a clear message. | @@ -1130,14 +1130,20 @@ class GceCmds(CommonCloudFunctions) :
self.take_action_if_requested("VM", obj_attr_list, "deprovision_finished")
except CldOpsException, obj :
+ for line in traceback.format_exc().splitlines() :
+ cbwarn(line, True)
_status = obj.status
_fmsg = str(obj.msg)
except GCEException, obj :
+ for line ... |
Removed AddonIsEnabled check from UpNext menu
not working anymore | <setting id="ProgressManager_enabled" type="bool" label="30235" default="false"/>
<setting label="30238" type="lsep"/>
<setting id="upnext_install" type="action" label="30234" action="InstallAddon(service.upnext)" visible="!System.HasAddon(service.upnext)" option="close"/>
- <setting id="UpNextNotifier_enabled" type="b... |
Update docker.py
The repository:tag should be like seqrise.com:5000/clabee/bwa:latest, which is accepted by docker. If sp[1] doesn't match valid tag names, it maybe a part of repository. And if len(sp) == 3, sp[0] and sp[1] should merged as a repository name | @@ -27,6 +27,17 @@ def get_image(dockerRequirement, pull_image, dry_run=False):
sp = dockerRequirement["dockerImageId"].split(":")
if len(sp) == 1:
sp.append("latest")
+ elif len(sp) == 2:
+ # if sp[1] doesn't match valid tag names, it is a part of repository
+ if not re.match(r'[\w][\w.-]{0,127}', sp[1]):
+ sp[0] = sp... |
DontSkip.traverse_dontskip: add rules without processing locations
These grammar rules are artificial, i.e. are implementation/lowering
details, so manually propagate original location to them instead of
trying to guess the location from the traceback.
TN: | @@ -669,16 +669,15 @@ class Parser(object):
self.dontskip_parser = _pick_impl(
[Null(get_context().root_grammar_class)]
+ list(self.dontskip_parsers),
- True
+ True,
+ location=self.location
)
self.dontskip_parser.is_dont_skip_parser = True
# Add a named rule for the the DontSkip parsers. Don't forget to
# compile it (... |
4.3.1 Changelog
Adding 4.3.1 changelog, | @@ -4,8 +4,15 @@ This changelog summarizes updates to [Mattermost Team Edition](http://www.matter
Also see [changelog in progress](http://bit.ly/2nK3cVf) for the next release.
-## Release v4.3.0
-Release date: 2017-10-16
+## Release v4.3.1
+
+ - **v4.3.1, released 2017-10-20**
+ - Fixed an upgrade issue where the datab... |
SplineWidget : Fix drawing width
Qt 5 seems to be defaulting to a non-cosmetic pen, whereas Qt 4 presumably defaulted to a cosmetic one. | @@ -207,6 +207,7 @@ class SplineWidget( GafferUI.Widget ) :
painter.setTransform( transform )
for s in self.__splinesToDraw :
pen = QtGui.QPen( self._qtColor( s.color ) )
+ pen.setCosmetic( True )
painter.setPen( pen )
painter.drawPath( s.path )
|
Start saving comment history again
Restore a line of code which was inadvertently deleted in
Set the time of the comment history record
to be the time its content was entered, whether it is the first
edit or a later one. | @@ -30,7 +30,7 @@ from ..badges import badges
from ..misc import cache, send_email, allowedNames, get_errors, engine, ensure_locale_loaded
from ..misc import ratelimit, POSTING_LIMIT, AUTH_LIMIT, is_domain_banned
from ..models import SubPost, SubPostComment, Sub, Message, User, UserIgnores, SubMetadata, UserSaved
-from... |
Re-add Python 3.10 to the CI tests
As scikit-learn has been updated, allowing Python 3.10 versions to build on Windows | @@ -76,7 +76,7 @@ jobs:
needs: [cache_nltk_data, cache_third_party]
strategy:
matrix:
- python-version: ['3.7', '3.8', '3.9']
+ python-version: ['3.7', '3.8', '3.9', '3.10']
os: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
|
Adds Warning For Permission Error In Ping
Mostly affects linux machines not running as root. | @@ -42,8 +42,12 @@ class Latency(commands.Cog):
try:
url = urllib.parse.urlparse(URLs.site_schema + URLs.site).hostname
+ try:
delay = await aioping.ping(url, family=socket.AddressFamily.AF_INET) * 1000
site_ping = f"{delay:.{ROUND_LATENCY}f} ms"
+ except OSError:
+ # Some machines do not have permission to run ping
+ ... |
MonadWide: docstring correction.
Closes | @@ -819,7 +819,7 @@ class MonadWide(MonadTall):
| |
---------------------
- Using the `cmd_flip' method will switch which vertical side the
+ Using the ``cmd_flip`` method will switch which vertical side the
main pane will occupy. The main pane is considered the "top" of
the stack.
@@ -838,8 +838,8 @@ class MonadWide(M... |
enc2gen.py: fix create_legacy_two_gpr_one_scalable_one_fixed
* a few typos crept in to mess up the logic for selecting the widths
of the register encoder functions.
* Fix from | @@ -1310,7 +1310,7 @@ def create_legacy_two_gpr_one_scalable_one_fixed(env,ii):
opsz_codes =[]
for op in _gen_opnds(ii):
opnds.append(op)
- opsz_codes.append( get_gpr_opsz_code(opnds[0]))
+ opsz_codes.append( get_gpr_opsz_code(op) )
for osz in osz_list:
opsig = make_opnd_signature(ii,osz)
fname = "{}_{}_{}".format(enc_... |
Update workflow status badges in readme
Our two workflows, Lint and Build, now have separate status badges that link to the latest results from that workflow. | # SeasonalBot
-[
+[![Lint Badge][1]][2]
+[![Build Badge][3]][4]
[ {
} else if (presence.presence_info[item.user_id]) {
// XDate takes number of milliseconds since UTC epoch.
var last_active = presence.presence_info[item.user_id].last_active * 1000;
+
+ if (!isNaN(last_active)) {
var last_active_date = new XDate(last_acti... |
Fix error in shutdown_watcher
Fixes the following:
```
2017-08-08 17:04:48,799 [ERROR] conjure-up/kubernetes-core - events.py:206 - Error in cleanup code: 'generator' object has no attribute 'cr_code'
Traceback (most recent call last):
File "/snap/conjure-up/589/lib/python3.6/site-packages/conjureup/events.py", line 20... | @@ -198,7 +198,8 @@ async def shutdown_watcher():
for task in asyncio.Task.all_tasks(app.loop):
# cancel all other tasks
coro = getattr(task, '_coro', None)
- if coro and coro.cr_code is not shutdown_watcher.__code__:
+ cr_code = getattr(coro, 'cr_code', None)
+ if cr_code is not shutdown_watcher.__code__:
app.log.debu... |
minor: Refactor `userMentionHandler` to avoid duplicating escaping logic.
We avoid duplicating escaping logic for the same variable, which
helps to reduce the risk of any future bugs. | @@ -165,21 +165,24 @@ export function apply_markdown(message) {
// flags on the message itself that get used by the message
// view code and possibly our filtering code.
- if (helpers.my_user_id() === user_id && !silently) {
+ // If I mention "@aLiCe sMITH", I still want "Alice Smith" to
+ // show in the pill.
+ let di... |
DOC: fixed format and updated CHANGELOG entries
Fixed format in 3.0.0 block and updated entries to avoid duplicate entries, place updates in correct categories, and describe the changes made in this PR. | @@ -9,14 +9,16 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- custom.attach replaces custom.add
- Unit tests are now pytest compatible and use parametrize
- Added altitudes to test instruments
- - New flags added to instruments to streamline unit testing: `_test_download`, `_test_download_travi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.