message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
Fix example in README
Fixes | @@ -46,10 +46,10 @@ and in the documentation.
.. code:: python
- #!/usr/bin/python3.5
+ #!/usr/bin/python3
- import asyncio
import logging
+ import sys
from juju import loop
from juju.model import Model
@@ -63,26 +63,28 @@ and in the documentation.
# Connect to the currently active Juju model
await model.connect_curren... |
remove 'unique' from delay_before/after
the 'unique' was not working as expected | @@ -123,11 +123,9 @@ mapping:
delay_before:
type: float
required: false
- unique: true
delay_after:
type: float
required: false
- unique: true
mqtt_publish:
type: map
|
fix: correct typo to spell "convention"
Fixes | @@ -49,7 +49,7 @@ and communicating it (using the cli provided by commitizen).
The reasoning behind it is that is easier to read, and enforces writing
descriptive commits.
-Besides that, having a convetion on your commits, makes it possible to
+Besides that, having a convention on your commits, makes it possible to
par... |
Remove relative parameter from export
The relativeSDF parameter is not used anymore as the whole export
relies on the individual requirements for visual, collision objects
etc. Thus, (and as Gazebo does not support relative pathing yet) it is
not needed at the moment. | @@ -205,7 +205,7 @@ def frame(framedata, indentation, relative):
return "".join(tagger.get_output())
-def inertial(inertialobj, inertialdata, indentation, relative):
+def inertial(inertialobj, inertialdata, indentation):
""" Simple wrapper for link inertial data.
The inertial object is required to determine the positio... |
Fix some typos
I found one, and flake8 found the rest | @@ -83,7 +83,7 @@ class VirtualArray(awkward.array.base.AwkwardArray):
return out
def deepcopy(self, generator=None, args=None, kwargs=None, cache=None, persistentkey=None, type=None, nbytes=None, persistvirtual=None):
- out = self.copy(generator=generator, args=arge, kwargs=kwargs, cache=cache, persistentkey=persisten... |
[modules/memory] Add parameter to only show used memory
No change to default behaviour, but adds boolean to only display used rather than used, total and percentage.
To only show used memory:
p memory.usedonly=1 | """Displays available RAM, total amount of RAM and percentage available.
Parameters:
- * cpu.warning : Warning threshold in % of memory used (defaults to 80%)
- * cpu.critical: Critical threshold in % of memory used (defaults to 90%)
+ * ram.warning : Warning threshold in % of memory used (defaults to 80%)
+ * ram.crit... |
Fixing race condition that caused all pages to be rendered.
Prior to encountering this condition, handled by only rendering first page and no other.
Also clearing out errors. | props: ['defaultFile'],
data: () => ({
supportsPDFs: true,
- scale: null,
- timeout: null,
isFullscreen: false,
- error: false,
progress: 0,
- totalPages: 0,
- pageHeight: 0,
- pageWidth: 0,
+ scale: null,
+ timeout: null,
+ totalPages: null,
+ pageHeight: null,
+ pageWidth: null,
}),
computed: {
fullscreenAllowed() {
... |
Regenerate requirements/prod.txt
Based on advice from Brandon I only re-compiled the requirements
for robot. | @@ -29,7 +29,6 @@ cryptography==38.0.1
# -r requirements/prod.in
# authlib
# pyjwt
- # secretstorage
defusedxml==0.7.1
# via -r requirements/prod.in
docutils==0.16
@@ -54,10 +53,6 @@ idna==3.4
# snowfakery
importlib-metadata==5.0.0
# via keyring
-jeepney==0.8.0
- # via
- # keyring
- # secretstorage
jinja2==3.1.2
# via
... |
specify python3 when creating virtualenv
Lemur is developed against Python3.5. If you do not specify the Python version it is possible the virtualenv will be built on a different version. | @@ -59,7 +59,7 @@ Create the virtual environment, activate it and enter the Lemur's directory:
.. code-block:: bash
- $ virtualenv lemur
+ $ virtualenv -p python3 lemur
$ source /www/lemur/bin/activate
$ cd lemur
|
Update desktop-guide.rst
Instructions for Mac are different than Windows/Linux. Added instructions for Mac. | @@ -31,6 +31,13 @@ To access a new server from your desktop app environment:
4. In the **URL** field, enter the complete URL of the server that you want to connect to. Must begin with either ``http://`` or ``https://``.
5. Click **Add**.
+To access a new server from your Mac desktop app environment:
+
+1. On the menu b... |
Fixed the link in 'pinned dependencies' page.
>There is additional documentation on this pinning scheme in [the conda docs](https://docs.conda.io/projects/conda-build/en/latest/resources/variants.html#build-variants)
'the conda docs' now point to | @@ -64,7 +64,7 @@ If a package is not pinned in `conda-forge-pinning <https://github.com/conda-for
ignore_run_exports:
- gmp
-There is additional documentation on this pinning scheme in `the conda docs <https://docs.conda.io/projects/conda-build/en/latest/source/variants.html#build-variants>`_.
+There is additional doc... |
Fixed typo
Renamed commando to command which was mistype. | @@ -10,18 +10,18 @@ def main():
elif x == "3":
exit()
else:
- print("Invalid!")
+ print("Invalid! option")
def cancel():
- comando("shutdown -a")
+ command("shutdown -a")
def shutdown():
t = int(input("how long to shut down the computer:\n"))
t = str(t * 60)
- cmd = "shutdown -s -f -t " + (t)
- comando(cmd)
+ cmd = "sh... |
Accelerate Tests
fix circleci config.yml | @@ -37,10 +37,6 @@ jobs:
- run:
command: |
mkdir screenshots
- - run:
- command: |
- . venv/bin/activate
- python -m pytest test/local
- run:
command: |
. venv/bin/activate
|
adding IoT resources
Adding IoT references to tools, blogs, videos, and testing guides. | - [OWASP Internet of Things Project](https://www.owasp.org/index.php/OWASP_Internet_of_Things_Project)
- [OWASP IoT Testing Guides](https://www.owasp.org/index.php/IoT_Testing_Guides)
+## IoT Hacking Communities
+
+- [IoT Village](https://www.iotvillage.org/)
+- [BuildItSecure.ly](http://builditsecure.ly/)
+- [Secure I... |
Update data-drift.md
updated image names | @@ -46,7 +46,7 @@ The default report includes 4 components. All plots are interactive.
The report returns **the share of drifting features** and an aggregate **Dataset Drift** result. For example:
-
+)
bl_info = {
"name": "SourceIO",
"author": "RED_EYE, ShadelessFox, Syborg64",
- "version": (4, 0, 3),
+ "version": (4, 0, 4),
"blender": (2, 80, 0),
"location": "File > Import-Export > SourceEngine assets",
"description": "GoldSrc/Source1/Source2 Engine assets(... |
update update on about page
Whys is it *the* NHS BSA and not *the* NHS Digital?! | @@ -37,7 +37,7 @@ cross-platform testing.</p>
<h3 id="sources">Data sources</h3>
-<p><strong>Prescribing data</strong> is from the monthly files published by <a href="https://www.nhsbsa.nhs.uk/information-services-portal-isp">NHS Business Service Authority</a>, used under the terms of the Open Government Licence.</p>
+... |
we already have a localized timezone
aside: I'm pretty sure we can drop `tz_abbrev` and just use `timezone`
directly everywhere, assuming
get_timezone_for_user(...)
is the same as
get_timezone_for_user(...).localize(datetime.utcnow()).tzinfo
which I suspect is the case. | @@ -209,9 +209,6 @@ class CaseDataView(BaseProjectReportSectionView):
else:
dynamic_properties = None
- the_time_is_now = datetime.utcnow()
- tz_abbrev = timezone.localize(the_time_is_now).tzname()
-
product_name_by_id = {
product['product_id']: product['name']
for product in SQLProduct.objects.filter(domain=self.domai... |
export/html: Fix table view (media queries)
Closes | padding: 0px;
box-sizing: border-box;
/* overflow: hidden; */
-}
-
-.view-table .requirement-statement {
- margin: 0px;
-}
-
-.view-table .requirement-statement p:first-child {
- margin-top: 0;
+ /* table-layout: fixed; */
}
.view-table tr,
border: 1px solid var(--color-table-border);
}
+/*
+.view-table .cell-number {}... |
fix: prune devices removed from amazon
Devices that are no longer reported by Amazon are now removed from HA
automatically.
closes | @@ -585,6 +585,23 @@ async def setup_alexa(hass, config_entry, login_obj: AlexaLogin):
)
hass.data[DATA_ALEXAMEDIA]["accounts"][email]["new_devices"] = False
+ # prune stale devices
+ device_registry = await dr.async_get_registry(hass)
+ for device_entry in dr.async_entries_for_config_entry(
+ device_registry, config_e... |
Changed some command-line options for naomi-setup.sh
Changed --primary to --system.
Changed --local to --local-compile | @@ -55,10 +55,10 @@ for var in "$@"; do
if [ "$var" = "--virtualenv" ]; then
OPTION="1"
fi
- if [ "$var" = "--local" ]; then
+ if [ "$var" = "--local-compile" ]; then
OPTION="2"
fi
- if [ "$var" = "--primary" ]; then
+ if [ "$var" = "--system" ]; then
OPTION="3"
fi
if [ "$var" = "--help" ]; then
@@ -69,10 +69,10 @@ for... |
Fix type hint for value_chain args
Fixes | @@ -465,7 +465,7 @@ def nth_product(index: int, *args: Iterable[_T]) -> Tuple[_T, ...]: ...
def nth_permutation(
iterable: Iterable[_T], r: int, index: int
) -> Tuple[_T, ...]: ...
-def value_chain(*args: Iterable[Any]) -> Iterable[Any]: ...
+def value_chain(*args: Union[_T, Iterable[_T]]) -> Iterable[_T]: ...
def prod... |
Remove duplicate `any-known-element` context
`inside-dict-key` is terminated by that context already. | @@ -180,7 +180,7 @@ contexts:
1: punctuation.definition.tag.begin.xml
2: entity.name.tag.localname.xml
3: punctuation.definition.tag.end.xml
- push: [any-known-element, inside-dict-key]
+ push: inside-dict-key
- include: scope:text.xml.plist#whitespace-or-tag
inside-dict-key:
|
Fix line tracing test in Py2.6.
See | # mode: run
# tag: trace
+from cpython.ref cimport PyObject, Py_INCREF, Py_XINCREF, Py_XDECREF
+
cdef extern from "frameobject.h":
ctypedef struct PyFrameObject:
- pass
-
-from cpython.ref cimport PyObject
+ PyObject *f_trace
from cpython.pystate cimport (
Py_tracefunc,
@@ -38,20 +38,23 @@ cdef int trace_trampoline(PyO... |
tests: quieten signal logger
Set signal logger level to CRITICAL to prevent it from spewing out
log message on the console for expected errors during tests. | # limitations under the License.
#
+import logging
import unittest
from nose.tools import assert_equal, assert_true, assert_false
@@ -31,6 +32,11 @@ class Callable(object):
class TestPriorityDispatcher(unittest.TestCase):
+ def setUp(self):
+ # Stop logger output interfering with nose output in the console.
+ logger = ... |
Add support for BoingBoing
Adds support for the BoingBoing comments system | "urlMain": "https://last.fm/",
"username_claimed": "blue",
"username_unclaimed": "noonewouldeverusethis7"
+ },
+ "boingboing.net": {
+ "errorType": "status_code",
+ "urlMain": "https://boingboing.net/",
+ "url": "https://bbs.boingboing.net/u/{}",
+ "username_claimed": "boingboing",
+ "username_unclaimed": "noonewouldev... |
osd: bind mount /var/run/udev/
without this, the command `ceph-volume lvm list --format json` hangs and
takes a very long time to complete. | @@ -92,6 +92,7 @@ fi
-v /var/lib/ceph:/var/lib/ceph:z \
-v /etc/ceph:/etc/ceph:z \
-v /var/run/ceph:/var/run/ceph:z \
+ -v /var/run/udev/:/var/run/udev/:z \
{% if ansible_distribution == 'Ubuntu' -%}
--security-opt apparmor:unconfined \
{% endif -%}
|
Should set config even if running populate.py
Need to set the value of self.config even if you just ran populate.py | @@ -29,7 +29,6 @@ class Naomi(object):
self._logger = logging.getLogger(__name__)
if repopulate:
populate.run()
- else:
self.config = profile.get_profile()
language = profile.get_profile_var(['language'])
if(not language):
|
Update Readme.rst
Clarifies description of what developer can expect when creating error messages. Previous wording was unclear. | @@ -378,7 +378,7 @@ Save and deploy these changes::
"Message": "BadRequestError: Unknown city 'vancouver', valid choices are: portland, seattle"
}
-We can see now that we can a ``Code`` and ``Message`` key, with the message
+We can see now that we have received a ``Code`` and ``Message`` key, with the message
being the... |
Remove redundant lines of code.
These are set in expand_template, so no need to set them here. | @@ -157,8 +157,6 @@ def _expand_template(template_name, **kwargs):
def create_dockerfile(template_name, data, dockerfile_dir, verbose=True):
- data['template_name'] = template_name
- data['wrapper_scripts'] = get_wrapper_scripts()
content = expand_template(template_name, data)
dockerfile = os.path.join(dockerfile_dir, ... |
test_classes: Modify functions to deal with web-public streams.
Modify common_subscribe_to_streams to perform subscription in
web-public streams as well, and make_stream function to create
web-public streams. | @@ -752,6 +752,7 @@ class ZulipTestCase(TestCase):
def make_stream(self, stream_name: str, realm: Optional[Realm]=None,
invite_only: bool=False,
+ is_web_public: bool=False,
history_public_to_subscribers: Optional[bool]=None) -> Stream:
if realm is None:
realm = get_realm('zulip')
@@ -764,6 +765,7 @@ class ZulipTestCas... |
Add systest for round-trip of NULL INT64.
Include NULL values in ARRAY<INT64>. | @@ -371,10 +371,11 @@ class TestSessionAPI(unittest.TestCase, _TestData):
BYTES_1 = b'Ymlu'
BYTES_2 = b'Ym9vdHM='
ALL_TYPES_ROWDATA = (
+ ([], False, None, None, 0.0, None, None, None),
([1], True, BYTES_1, SOME_DATE, 0.0, 19, u'dog', SOME_TIME),
([5, 10], True, BYTES_1, None, 1.25, 99, u'cat', None),
([], False, BYTES... |
Fix Attribute Error
for email_address in smallest_subnet['emails'].split("\n"):
AttributeError: 'list' object has no attribute 'split' | @@ -42,7 +42,7 @@ class NetworkWhois(OneShotAnalytics):
# Link it to every email address referenced
if smallest_subnet['emails']:
- for email_address in smallest_subnet['emails'].split("\n"):
+ for email_address in smallest_subnet['emails']:
email = Email.get_or_create(value=email_address)
links.update(company.link_to(... |
Update buildinfo.json
bump metronome to 0.6.65 | ],
"single_source": {
"kind": "url_extract",
- "url": "https://s3.amazonaws.com/downloads.mesosphere.io/metronome/builds/0.6.63-b7b4a2c/metronome-0.6.63-b7b4a2c.tgz",
- "sha1": "e9790e183b5a902f80fb1951c5cc17f384238230"
+ "url": "https://s3.amazonaws.com/downloads.mesosphere.io/metronome/builds/0.6.65-50400db/metronome... |
Update mkvtomp4.py
Error checking to make sure ffprobe and subsequently generateOptions return something valid, and catches with error messages when that does not occur | @@ -203,6 +203,9 @@ class MkvtoMp4:
if self.needProcessing(inputfile):
options, preopts, postopts = self.generateOptions(inputfile, original=original)
+ if not options:
+ self.log.error("Error converting, inputfile had a valid extension but returned no data. Either the file does not exist, was unreadable, or was an inc... |
click_handlers: Use e.button instead of deceprated e.which.
The middle button click is represented by 1. Tested by clicking
middle button on zulip logo and making sure it is not focused. | @@ -758,7 +758,7 @@ export function initialize() {
// Don't focus links on middle click.
$("body").on("mouseup", "a", (e) => {
- if (e.which === 2) {
+ if (e.button === 1) {
// middle click
e.target.blur();
}
|
Remove JSON wording
we support more than just JSON endpoints here | # Public APIs [](https://travis-ci.org/toddmotto/public-apis)
-A collective list of free JSON APIs for use in web development.
+A collective list of free APIs for use in web development.
A JSON encoding of all entries can be found [here](json).
|
Label plot axes in LineProfile plugin
plus some improvements to error handling | @@ -43,6 +43,8 @@ class LineProfile(GingaPlugin.LocalPlugin):
self.tw = None
self.mark_data_x = [None]
self.mark_data_y = [None]
+ self.y_lbl = 'Flux'
+ self.x_lbl = ''
self.gui_up = False
@@ -247,15 +249,17 @@ Use MultiDim to change step values of axes.""")
naxes = mddata.ndim
if self.selected_axis:
- axis_data = self... |
Update ilap_artifacts.py
Fix path | @@ -144,7 +144,7 @@ tosearch = {'lastBuild': ('IOS Build', '*LastBuildInfo.plist'),
'aggDictpasscodetype': ('Aggregate Dictionary', '*/AggregateDictionary/ADDataStore.sqlitedb'),
'alarms': ('Alarms', '*private/var/mobile/Library/Preferences/com.apple.mobiletimerd.plist'),
'appConduit': ('App Conduit', '**/AppConduit.lo... |
fix broken tft.md link
Broken link in tft.md file and updated with the correct [link] (https://www.tensorflow.org/tfx/transform/api_docs/python/tft) | Transform is available as a standalone library.
- [Getting Started with TensorFlow Transform](/tfx/transform/get_started)
-- [TensorFlow Transform API Reference](/tfx/transform/api_docs/python/tft)
+- [TensorFlow Transform API Reference](https://www.tensorflow.org/tfx/transform/api_docs/python/tft)
The `tft` module doc... |
Only verify if context menus pass a length check
According to Discord this is the check that is actually done | @@ -126,7 +126,6 @@ else:
CheckInputParameter = Union['Command[Any, ..., Any]', 'ContextMenu', CommandCallback, ContextMenuCallback]
VALID_SLASH_COMMAND_NAME = re.compile(r'^[\w-]{1,32}$')
-VALID_CONTEXT_MENU_NAME = re.compile(r'^[?!\w\s-]{1,32}$')
CAMEL_CASE_REGEX = re.compile(r'(?<!^)(?=[A-Z])')
@@ -157,7 +156,7 @@ d... |
Follow up to console port allocation
Addressed a comment in
Story:
Task: 38135 | @@ -843,9 +843,8 @@ def _allocate_port(task):
def _release_allocated_port(task):
node = task.node
dii = node.driver_internal_info or {}
- allocated_port = dii.get('allocated_ipmi_terminal_port')
+ allocated_port = dii.pop('allocated_ipmi_terminal_port', None)
if allocated_port:
- dii.pop('allocated_ipmi_terminal_port')... |
Update README.md
Adding di to Maintainers | ## Maintainers
-- [Sarah Aoun](https://github.com/saoun) @ [Open Technology Fund](https://www.opentech.fund/)
+- [Di Luong](https://www.opentech.fund/about/people/di-luong/) @ [Open Technology Fund](https://www.opentech.fund/)
- [Dan Blah](https://github.com/danblah) @ [Reset](https://www.reset.tech/)
- [Fredrik Jonsso... |
tools/chainload.py: Default to copying SEPFW
This doesn't really take any significant time and is the correct thing
to do. Use --no-sepfw for e.g. serial bring-up where doing the ADT dance
costs measurable time. | @@ -7,7 +7,7 @@ import argparse, pathlib, time
parser = argparse.ArgumentParser(description='Mach-O loader for m1n1')
parser.add_argument('-q', '--quiet', action="store_true", help="Disable framebuffer")
-parser.add_argument('-x', '--xnu', action="store_true", help="Load XNU")
+parser.add_argument('-n', '--no-sepfw', a... |
Match.construct: rename "scope" to "outer_scope"
TN: | @@ -843,10 +843,11 @@ class Match(AbstractExpression):
:rtype: ResolvedExpression
"""
+ outer_scope = PropertyDef.get_scope()
+
# Add the variables created for this expression to the current scope
- scope = PropertyDef.get_scope()
for _, var, _ in self.matchers:
- scope.add(var.local_var)
+ outer_scope.add(var.local_va... |
Fix minor typo
Change uia_phone_number to uia_phone_mapper | @@ -320,7 +320,7 @@ These configuration keys are used globally across all features.
[
{"email": {"mapper": uia_email_mapper, "case_insensitive": True}},
- {"us_phone_number": {"mapper": uia_phone_number}},
+ {"us_phone_number": {"mapper": uia_phone_mapper}},
]
@@ -1056,7 +1056,7 @@ Unified Signin
If you select ``sms`` ... |
Add local_get extra checks TODO
This is also a prerequisite for simplified get key, which is a
recommended step for .filter(pk_in=...) / prefetch_related optimization. | @@ -317,6 +317,13 @@ class QuerySetMixin(object):
# which is very fast, but not invalidated.
# Don't bother with Q-objects, select_related and previous filters,
# simple gets - thats what we are really up to here.
+ #
+ # TODO: this checks are far from adequete, at least these are missed:
+ # - settings.CACHEOPS_ENABLE... |
tests: reduce the amount of time we wait
This sleep 120 looks a bit long, let's reduce this to 30sec and see if
things go faster. | @@ -229,16 +229,16 @@ commands=
copy_admin_key={env:COPY_ADMIN_KEY:False} \
"
- # wait 2 minutes for services to be ready
- sleep 120
+ # wait 30sec for services to be ready
+ sleep 30
# test cluster state using ceph-ansible tests
testinfra -n 8 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxi... |
localtest: Easier access to DockerInDocker environment
Adding an environment variable for the Docker socket that
'runtests.sh' uses, makes it easier to access the DinD
instance from other parent container processes. | @@ -46,5 +46,6 @@ sudo docker run -ti \
-v /tmp/faucet-pip-cache:/var/tmp/pip-cache \
-v /lib/modules:/lib/modules \
-v /var/local/lib/docker:/var/lib/docker \
+ -e DOCKER_HOST=unix:///var/local/run/docker.sock \
-e FAUCET_TESTS="$FAUCET_TESTS" \
faucet/tests $CMD
|
Make celery monitoring heartbeat tasks use ignore_result=True
To avoid unnecessary reads and writes to the postgres result backend. | @@ -97,5 +97,5 @@ class Heartbeat(object):
heartbeat.__name__ = str(self.periodic_task_name)
- heartbeat = periodic_task(run_every=HEARTBEAT_FREQUENCY, queue=self.queue)(heartbeat)
+ heartbeat = periodic_task(run_every=HEARTBEAT_FREQUENCY, queue=self.queue, ignore_result=True)(heartbeat)
return heartbeat
|
Update README.md
added newsletter link in readme | |
<a href="https://discord.gg/xZjKRaNp8b">Join Discord</a>
|
+ <a href="https://evidentlyai.com/sign-up">Newsletter</a>
+ |
<a href="https://evidentlyai.com/blog">Blog</a>
|
<a href="https://twitter.com/EvidentlyAI">Twitter</a>
|
Removed "View Larger" button for images.
To save space, make the image itself a link. | </article>
<script type="text/html" id="image-preview-template">
- <img data-bind="attr: { src: thumb_url }" />
- <a target="_blank"
- class="btn btn-default preview-media"
- data-bind="attr: { href: url }"
- data-toggle="tooltip" data-title="{% trans 'Opens image in new tab' %}.">{% trans 'View Larger' %}<... |
Return always `uniqueNonce` even if count is 0
Closes | @@ -454,9 +454,7 @@ class SafeMultisigTransactionListView(ListAPIView):
)
response = super().get(request, *args, **kwargs)
- response.data["count_unique_nonce"] = (
- self.get_unique_nonce(address) if response.data["count"] else 0
- )
+ response.data["count_unique_nonce"] = self.get_unique_nonce(address)
return respons... |
ch_tests_tool: prefer SerialConsole for kernel logs
Use SerialConsole for fetching kernel logs. It is more versatile
than dmesg. Fallback to dmesg if SerialConsole feature is not
supported. | @@ -10,6 +10,7 @@ from assertpy.assertpy import assert_that, fail
from lisa import Environment, notifier
from lisa.executable import Tool
+from lisa.features import SerialConsole
from lisa.messages import SubTestMessage, TestStatus, create_test_result_message
from lisa.operating_system import CBLMariner
from lisa.tests... |
Deprecate TrainerProperties Mixin and move property definitions directly into `trainer.py`
Summary:
### New commit log messages
Deprecate TrainerProperties Mixin and move property definitions directly into `trainer.py` | @@ -139,10 +139,9 @@ class ModelManager:
rank = get_rank()
if rank == 0:
- trainer_logger = lightning_trainer.logger
# pyre-ignore
+ trainer_logger = lightning_trainer.logger
logger_data = trainer_logger.line_plot_aggregated
- # pyre-ignore
trainer_logger.clear_local_data()
if reporter is None:
training_report = None
|
Corrects model serving command line in a tutorial
The command line without this fix would give the error below:
`Error: Missing option "--model-path" / "-m".` | @@ -373,11 +373,11 @@ in MLflow saved the model as an artifact within the run.
In this example, you can use this MLmodel format with MLflow to deploy a local REST server that can serve predictions.
- To deploy the server, run:
+ To deploy the server, run (replace the path with your model's actual path):
.. code::
- mlf... |
removes use_instances from function signature
because it doesn't do anything anymore | @@ -436,7 +436,7 @@ class OpenAPIConverter(object):
def fields2parameters(
self, fields, schema=None, use_refs=True,
default_in='body', name='body', required=False,
- use_instances=False, description=None, **kwargs
+ description=None, **kwargs
):
"""Return an array of OpenAPI parameters given a mapping between field na... |
Refactor
Changed listener to expect only the Event model | @@ -35,5 +35,5 @@ class EventListener(StoppableThread):
while not self.wait(0.1):
while not self.events_queue.empty():
- event_type, event = self.events_queue.get()
- self.process_next_message(event_type, event)
+ event = self.events_queue.get()
+ self.process_next_message(event)
|
Remove dependency on matplotlib
Matplotlib was used just to include the colormap viridis, this has been changes to import it from pyqtgraph. | #
import logging
-import sys
import numpy as np
import pyqtgraph as pg
@@ -32,16 +31,6 @@ from .Qt import QtCore
log = logging.getLogger(__name__)
log.addHandler(logging.NullHandler())
-try:
- from matplotlib.cm import viridis
-except ImportError:
- log.warning("Matplotlib not found. Images will be greyscale")
-
-
-def... |
org_settings: Remove print statements.
This commit deletes the redundant `print` statement from the
`test_upload.py` file. | @@ -1703,9 +1703,7 @@ class S3Test(ZulipTestCase):
zerver.lib.upload.upload_backend.upload_realm_logo_image(image_file, user_profile, night)
original_path_id = os.path.join(str(user_profile.realm.id), "realm", "%s.original" % (file_name))
- print(original_path_id)
original_key = bucket.get_key(original_path_id)
- print... |
for audio - hide the VLC inctance window
the window is sized at 1x1 pixel. | @@ -211,7 +211,7 @@ class DialogCodeAV(QtWidgets.QDialog):
self.ddialog.setWindowFlags(self.ddialog.windowFlags() | QtCore.Qt.CustomizeWindowHint)
# Disable close button, only close through closing the Ui_Dialog_code_av
self.ddialog.setWindowFlags(self.ddialog.windowFlags() & ~QtCore.Qt.WindowCloseButtonHint)
- self.dd... |
hierachy_layout: Move number of via arg to add_power_pins()
this allows custom modules to state how many vias they need
for power rails. | @@ -1015,7 +1015,7 @@ class layout():
- def add_power_pin(self, name, loc, vertical=False, start_layer="m1"):
+ def add_power_pin(self, name, loc, size=[1,1], vertical=False, start_layer="m1"):
"""
Add a single power pin from M3 down to M1 at the given center location.
The starting layer is specified to determine which... |
go: update build tags check from latest go sources
Update the build tags check from the latest `go` sources:
Support `unix` build tag.
Support `boringcrypto` build tag. | @@ -16,8 +16,27 @@ import (
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
-// This file was adapted from Go src/go/build/build.go at commit 7c694fbad1ed6f2f825fd09cf7a86da3be549cea
-// on 2022-02-25.
+// This file was adapted from Go toolchain:
+// https://gi... |
DOC: Fix a mistake in the 1.7.0 release notes.
The function that was added to the C API (in is
`PyArray_FailUnlessWriteable`. | @@ -162,7 +162,7 @@ Added experimental support for the AArch64 architecture.
C API
-----
-New function ``PyArray_RequireWriteable`` provides a consistent interface
+New function ``PyArray_FailUnlessWriteable`` provides a consistent interface
for checking array writeability -- any C code which works with arrays whose
WR... |
Fix format in live-migration-usage.rst
It is :command:`some_command` instead of :command:``some_command``. | @@ -11,8 +11,8 @@ non-live-migration options.
The instructions below cover shared-storage and volume-backed migration. To
block-migrate instances, add the command-line option
-:command:``--block-migrate`` to the :command:``nova live-migration`` command,
-and :command:``--block-migration`` to the :command:``openstack se... |
Move closing parenthesis to the end of the previous line
I think the parenthesis is less distracting when placed there. | @@ -358,8 +358,7 @@ flow is zero (conversion_factor_single_flow).
inputs={b_gas: solph.Flow(nominal_value=10e10)},
outputs={b_el: solph.Flow(), b_th: solph.Flow()},
conversion_factors={b_el: 0.3, b_th: 0.5},
- conversion_factor_single_flow={b_el: 0.5}
- )
+ conversion_factor_single_flow={b_el: 0.5})
For :py:class:`~oem... |
Fix release-strategy link
[ci skip-rust-tests]
[ci skip-jvm-tests] | @@ -24,7 +24,7 @@ how to get your change committed.
+ [[Pants Style Guide|https://pants.readme.io/docs/style-guide]]
+ Releasing Pants
+ [[Release Process|https://pants.readme.io/docs/release-process]]
- + [[Release Strategy|https://pants.readme.io/docs/releases-strategy]]
+ + [[Release Strategy|https://pants.readme.io... |
Improve Python version detection
Ubuntu 16.04 no longer includes a 'python' executable.
If none of {$PYTHON,python,python2,python3} are usable, we advise
the user to either set PYTHON or install a usable python. | #!/usr/bin/env bash
-# Mininet install script for Ubuntu (and Debian Wheezy+)
-# Brandon Heller (brandonh@stanford.edu)
+# Mininet install script for Ubuntu and Debian
+# Original author: Brandon Heller
# Fail on error
set -e
@@ -102,14 +102,26 @@ function version_ge {
[ "$1" == "$latest" ]
}
-# Attempt to identify Pyt... |
wrap LSTMCell in DropoutWrapper if dropout param
Adds a `dropout=_` param to `lstm()`, which if provided wraps `lstm_cell` in a `rnn.DropoutWrapper` for regularization. Feel free to close if there's a smarter way, more for consideration on providing a dropout option for these layers where applicable. | @@ -234,12 +234,13 @@ def conv2d(x, size, window=3, stride=1, padding='SAME', bias=False, activation='
return x
-def lstm(x, size=None, summary_level=0):
+def lstm(x, size=None, summary_level=0, dropout=None):
"""
Args:
x: Input tensor.
size: Layer size, defaults to input size.
+ dropout: dropout_keep_prob (eg 0.5) for... |
Fix in ManagedObject search by prefix
HG--
branch : feature/microservices | @@ -36,6 +36,7 @@ from noc.main.models.notificationgroup import NotificationGroup
from noc.inv.models.networksegment import NetworkSegment
from noc.core.profile.loader import loader as profile_loader
from noc.core.model.fields import INETField, TagsField, DocumentReferenceField
+from noc.lib.db import SQL
from noc.lib.... |
Change InsightsEvaluator to pass stream along to its superclass during
construction.
Fixes | @@ -118,7 +118,7 @@ class SingleEvaluator(Evaluator):
class InsightsEvaluator(SingleEvaluator):
def __init__(self, broker=None, system_id=None, stream=sys.stdout, incremental=False):
- super(InsightsEvaluator, self).__init__(broker, stream=sys.stdout, incremental=incremental)
+ super(InsightsEvaluator, self).__init__(b... |
Update __init__.py
add missing map 0 to include all streams | @@ -200,7 +200,7 @@ class Converter(object):
i += 1
os.rename(outfile, infile)
- opts = ['-i', infile, '-c', 'copy']
+ opts = ['-i', infile, '-c', 'copy', '-map', '0']
info = self.ffmpeg.probe(infile)
i = len(info.attachment)
|
Extend contribution doc by IRC contact details
Add details how to contact with trove members over IRC channel. | @@ -323,3 +323,13 @@ If you want to run only the tests in one file you can use testtools e.g.
Note that some unit tests can use an existing database. The script
``tools/test-setup.sh`` sets up the database for CI jobs and can be
used for local setup.
+
+Is there something missing?
+---------------------------
+
+Do not... |
[airflow] fix error bug
Test Plan: this is tricky to test since getting PythonErrors is unexepected behavior - open to ideas
Reviewers: nate, max | message
pipelineName
}
+ ... on PythonError {
+ message
+ stack
+ }
... on ExecutePlanSuccess {
pipeline {
name
|
Remove Vagrant mount options
Originally applied to account for cywgin. Not an issue on WSL and was
responsible for masking challenge development errors (e.g. leaving off
executable permissions.) | # vi: set ft=ruby :
# TODO:
-# - mount_options looks really fishy
# - use double quote correctly
require 'etc'
@@ -20,9 +19,7 @@ Vagrant.configure("2") do |config|
shell.vm.network "private_network", ip: (ENV['SIP'] || '192.168.2.3'), nic_type: "virtio"
shell.vm.synced_folder ".", "/vagrant", disabled: true
- shell.vm.... |
Add mypy fallback class for TypedDict methods to mypy_extensions
This class is not defined at runtime but it's used by
mypy internally to support TypedDict methods.
Use NoReturn in argument types for better type safety
when the related mypy plugin hook is not active. | -from typing import Dict, Type, TypeVar, Optional, Union, Any, Generic
+import abc
+import sys
+from typing import (
+ Dict, Type, TypeVar, Optional, Union, Any, Generic, Mapping, ItemsView, KeysView, ValuesView
+)
_T = TypeVar('_T')
_U = TypeVar('_U')
+# Internal mypy fallback type for all typed dicts (does not exist ... |
parent: avoid needless quoting in Argv.
This just makes debug output a little more readable. | @@ -457,10 +457,16 @@ class Argv(object):
def __init__(self, argv):
self.argv = argv
+ must_escape = frozenset('\\$"`!')
+ must_escape_or_space = must_escape | frozenset(' ')
+
def escape(self, x):
+ if not self.must_escape_or_space.intersection(x):
+ return x
+
s = '"'
for c in x:
- if c in '\\$"`':
+ if c in self.mus... |
Fix a minor identitation issue in the generated C API binding
TN: minor | with Export => True,
Convention => C,
External_name => "${accessor_name}";
- ${ada_doc(field, lang='c')}
+ ${ada_doc(field, 3, lang='c')}
</%def>
|
Fix bug in test_pkg
Grains were being referenced but not required. | @@ -728,6 +728,7 @@ class PkgTest(ModuleCase, SaltReturnAssertsMixin):
ret = self.run_state('pkg.removed', name=target)
self.assertSaltTrueReturn(ret)
+ @requires_system_grains
def test_pkg_014_installed_missing_release(self, grains=None): # pylint: disable=unused-argument
'''
Tests that a version number missing the re... |
Update sharing-files.rst
Updated: Channels > Work with Messages > Share Files > Attachment Limits and Sizes to:
add a config settings link to configure file attachment maximum
corrected the max image resolution link config setting | @@ -69,6 +69,6 @@ Other document previews (such as Word, Excel, or PPT) are not yet supported.
Attachment Limits and Sizes
---------------------------
-Up to 10 files can be attached per post. The default maximum file size is 100 MB, but this can be changed by the System Admin.
+Up to 10 files can be attached per post.... |
fix: Stream feature view meta undefined created_timestamp issue
fix stream feature view meta undefied created_timestap issue | @@ -28,8 +28,8 @@ const FeastSFVSchema = z.object({
}),
}),
meta: z.object({
- createdTimestamp: z.string().transform((val) => new Date(val)),
- lastUpdatedTimestamp: z.string().transform((val) => new Date(val)),
+ createdTimestamp: z.string().transform((val) => new Date(val)).optional(),
+ lastUpdatedTimestamp: z.stri... |
Recruitment: reverse nomination order
This makes review appear in chronological order, making it easier to say things like "^^ what they said". | @@ -120,7 +120,8 @@ class Reviewer:
opening = f"<@&{Roles.mod_team}> <@&{Roles.admins}>\n{member.mention} ({member}) for Helper!"
current_nominations = "\n\n".join(
- f"**<@{entry['actor']}>:** {entry['reason'] or '*no reason given*'}" for entry in nomination['entries']
+ f"**<@{entry['actor']}>:** {entry['reason'] or ... |
bi tree function
HG--
branch : feature/microservices | @@ -229,21 +229,21 @@ class BIAPI(API):
if node and node["id"] == p_id:
return node
else:
- if node and "nodes" in node.keys():
- for child in node["nodes"]:
+ if node and "children" in node.keys():
+ for child in node["children"]:
_searched = search_parent(child, p_id)
if _searched:
return _searched
else:
return None
... |
Allow uri searches to use an index
Example migration:
Add a separate index by dataset.
create index ix_agdc_dataset_location_dataset_ref on agdc.dataset_location (dataset_ref);
Replace (dataset, uri) index with (uri, dataset) index.
alter table agdc.dataset_location add constraint uq_dataset_location_uri_scheme unique ... | @@ -75,7 +75,7 @@ DATASET = Table(
DATASET_LOCATION = Table(
'dataset_location', _core.METADATA,
Column('id', Integer, primary_key=True, autoincrement=True),
- Column('dataset_ref', None, ForeignKey(DATASET.c.id), nullable=False),
+ Column('dataset_ref', None, ForeignKey(DATASET.c.id), index=True, nullable=False),
# Th... |
update roi_objects.md
Give more detail regarding default parameter | Find objects within a region of interest, either cut those objects to the region of interest
or include objects that overlap with the region of interest.
-**plantcv.roi_objects**(*img, roi_contour, roi_hierarchy, object_contour, obj_hierarchy, roi_type*)
+**plantcv.roi_objects**(*img, roi_contour, roi_hierarchy, object... |
fix formatting of presets in util.cli
This patch adds braces to the format string to correctly format the available
presets in the usage string. | @@ -828,7 +828,7 @@ def cli(f, *, argv=None):
usage = [f'USAGE: {progname}']
if doc.presets:
- usage.append(f'["|".join(doc.presets)]')
+ usage.append(f'[{"|".join(doc.presets)}]')
usage.extend(('{}' if arg in mandatory else '[{}]').format(f'{arg}={arg[0].upper()}') for arg in serializers)
usage = '\n'.join(textwrap.wr... |
CompileCtx: move fields types annotation to a compilation pass
TN: | @@ -945,26 +945,14 @@ class CompileCtx(object):
pass_manager = PassManager()
pass_manager.add(
GrammarRulePass('compile grammar rule', Parser.compile),
+ GlobalPass('annotate fields types',
+ CompileCtx.annotate_fields_types,
+ disabled=not annotate_fields_types),
)
with names.camel_with_underscores:
pass_manager.run(s... |
Test fix - wait for pod to delete before creating new pod
Wait for pods to delete before using the pvc on another pod
This will avoid multi-attach error | @@ -71,6 +71,7 @@ class TestPVCFullWithIORWO(ManageTest):
log.info(f"FIO succeeded to fill the PVC with data")
log.info(f"Deleting the pod and attaching the full PVC to a new pod")
self.pod_obj.delete()
+ self.pod_obj.ocp.wait_for_delete(resource_name=self.pod_obj.name)
log.info(f"Creating a new Pod with the existing f... |
[Test] use 100 instead of 1000 labels for labelselect
1000 labels with low folding creates very large, long-running test cases | @@ -83,7 +83,7 @@ def prepare_inputs(input_tensor, idt):
@pytest.mark.parametrize("idt", [DataType.UINT8, DataType.UINT16, DataType.INT16])
# labels
-@pytest.mark.parametrize("labels", [10, 1000])
+@pytest.mark.parametrize("labels", [10, 100])
# folding
@pytest.mark.parametrize("fold", [-1, 2, 10])
# number of top labe... |
Use bytearray, not bytes, which is faster.
Turns out Alexandros was right that this would be an issue! | @@ -23,7 +23,7 @@ class AlgebraicProtocol(asyncio.Protocol):
self.receiveType = receiveType
self.sendType = sendType
self.transport = None
- self.buffer = bytes()
+ self.buffer = bytearray()
self.writelock = threading.Lock()
self._logger = logging.getLogger(__name__)
@@ -64,7 +64,7 @@ class AlgebraicProtocol(asyncio.Pr... |
Update control_heating_cooling_systems.py
specify output types of vectorized function | @@ -345,8 +345,8 @@ def calc_simple_temp_control(tsd, bpr, weekday):
:rtype: dict
"""
- tsd['ta_hs_set'] = np.vectorize(get_heating_system_set_point)(tsd['people'], range(HOURS_IN_YEAR), bpr, weekday)
- tsd['ta_cs_set'] = np.vectorize(get_cooling_system_set_point)(tsd['people'], range(HOURS_IN_YEAR), bpr, weekday)
+ ts... |
Add BlockStatusStore trait
This trait is used to pass the cache of block validation results to the
block scheduler. | @@ -42,6 +42,10 @@ pub trait BlockValidator: Sync + Send + Clone {
fn process_pending(&self, block: &Block, response_sender: Sender<BlockValidationResult>);
}
+pub trait BlockStatusStore {
+ fn status(&self, block_id: &str) -> BlockStatus;
+}
+
#[derive(Clone, Debug)]
pub struct BlockValidationResult {
pub block_id: St... |
File and Pillar roots are dictionaries
Fixes test_smtp_return test cases. | @@ -64,8 +64,8 @@ class SMTPReturnerTestCase(TestCase, LoaderModuleMockMixin):
'renderer': 'jinja|yaml',
'renderer_blacklist': [],
'renderer_whitelist': [],
- 'file_roots': [],
- 'pillar_roots': [],
+ 'file_roots': {},
+ 'pillar_roots': {},
'cachedir': '/'}), \
patch('salt.returners.smtp_return.gnupg'), \
patch('salt.r... |
A minor syntax correction
Removed an extra quote - " | @@ -185,7 +185,7 @@ defined in your :meth:`~pytorch_lightning.core.lightning.LightningModule.configu
.. warning::
* Before 1.3, Lightning automatically called ``lr_scheduler.step()`` in both automatic and manual optimization. From
1.3, ``lr_scheduler.step()`` is now for the user to call at arbitrary intervals.
- * Note... |
Add link to kaggle tutorial
closes | @@ -4,6 +4,11 @@ External Resources
Articles
--------
+`Grammer of graphics with plotnine <https://www.kaggle.com/residentmario/grammer-of-graphics-with-plotnine-optional/>`_
+ A good introductory tutorial on how to use ``plotnine``. It is part
+ of the `data visualization <https://www.kaggle.com/learn/data-visualisati... |
Update Missouri.md
Closes | @@ -43,9 +43,9 @@ id: mo-kansascity-1
### Kansas City police attempt to arrest a man leading the protest then spray the crowd | May 31st
+Footage shows a protestor speaking to other protestors on a megaphone. Police grab him and drag him to arrest. Other protestors come to his aid and are pepper-sprayed.
-
-tags: arres... |
Transfers: Shuffle equal-weight protocols. Fix
Given equal-weight protocols eligible for transfer, shuffle the
candidates in order to balance across several endpoints. | import copy
import os
+import random
from urlparse import urlparse
@@ -125,6 +126,8 @@ def select_protocol(rse_settings, operation, scheme=None, domain='wan'):
raise exception.RSEProtocolDomainNotSupported('Domain %s not supported' % domain)
candidates = _get_possible_protocols(rse_settings, operation, scheme, domain)
... |
Fix sign issue
The fact that dice loss is negative but all other losses are positive
caused problem when assessing improvement | @@ -461,7 +461,7 @@ def cmd_train(context):
val_losses.append(val_loss_total_avg)
if epoch > 1:
- if (val_losses[-2] - val_losses[-1]) * 100 / val_losses[-1] < epsilon:
+ if (val_losses[-2] - val_losses[-1]) * 100 / abs(val_losses[-1]) < epsilon:
patience_count += 1
if patience_count >= patience:
print(f"Stopping train... |
Update README.rst
capitalization for Stripe, URL | @@ -92,7 +92,7 @@ Add to the urls.py:
url(r'^payments/', include('djstripe.urls', namespace="djstripe")),
-Then tell stripe about the webhook (Stripe webhook docs can be found `here <https://stripe.com/docs/webhooks>`_) using the full url of your endpoint from the urls.py step above (e.g. ``https://yourwebsite.com/paym... |
Update the paths of keys and certs
Also added instruction of supporting multiple switches. | @@ -4,19 +4,22 @@ This document outlines the steps needed to test that a switch supports self-sign
## Prepare the keys and certificates.
### Generate key pairs for the controller.
- /usr/bin/openssl genrsa -out /tmp/ctrlr.key 2048
- /usr/bin/openssl req -new -x509 -nodes -days 3650 -subj '/C=US/ST=CA/L=Mountain View/O=... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.