message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
Support HTTP status code 201 in rest_client
201 is a valid HTTP status code when doing POST method, it means the
resource has been created.
So we shouldn't show error log for status 201. | @@ -79,6 +79,8 @@ class AtlassianRestAPI(object):
response_content = response.content
if response.status_code == 200:
log.debug('Received: {0}\n {1}'.format(response.status_code, response_content))
+ elif response.status_code == 201:
+ log.debug('Received: {0}\n "Created" response'.format(response.status_code))
elif re... |
Add `http.HTTPMethod`
`description` isn't actually read-only at runtime, but I don't think there's any other way of telling type checkers "this is an attribute that the members have, not a member itself". And pretending it's a property is already what we do for `HTTPStatus`, which has the same issue. | @@ -2,6 +2,12 @@ import sys
from enum import IntEnum
from typing_extensions import Literal
+if sys.version_info >= (3, 11):
+ from enum import StrEnum
+
+if sys.version_info >= (3, 11):
+ __all__ = ["HTTPStatus", "HTTPMethod"]
+else:
__all__ = ["HTTPStatus"]
class HTTPStatus(IntEnum):
@@ -74,3 +80,17 @@ class HTTPStatu... |
converts non-string column names to string
to avoid failing in display later | @@ -51,7 +51,7 @@ def validate_column_names(column_names, invalid_column_names):
try:
validate_property(column_name, allow_parents=False)
except (ValueError, TypeError):
- invalid_column_names.add(column_name)
+ invalid_column_names.add(str(column_name))
# Cobble together the context needed to render breadcrumbs that c... |
[auxdata.dem_create] added min. version to egm96_15.gtx error message
converting from EGM96 geoid heights to WGS84 ellipsoid heights
requires PROJ.4 version 5.0.0 or higher; see: | @@ -204,7 +204,7 @@ def dem_create(src, dst, t_srs=None, tr=None, geoid_convert=False, geoid='EGM96'
errstr = str(e)
if 'Cannot open egm96_15.gtx' in errstr:
addition = '\nplease refer to the following site for instructions ' \
- 'on how to use the file egm96_15.gtx:\n' \
+ 'on how to use the file egm96_15.gtx (require... |
(trivial) qt locktimeedit: fix a DeprecationWarning
/home/user/wspace/electrum/electrum/gui/qt/locktimeedit.py:145: DeprecationWarning: an integer is required (got type Alignment). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
painter.drawText(textRect, ... | @@ -142,7 +142,7 @@ class LockTimeHeightEdit(LockTimeRawEdit):
textRect.adjust(2, 0, -10, 0)
painter = QPainter(self)
painter.setPen(ColorScheme.GRAY.as_color())
- painter.drawText(textRect, Qt.AlignRight | Qt.AlignVCenter, "height")
+ painter.drawText(textRect, int(Qt.AlignRight | Qt.AlignVCenter), "height")
def get_m... |
Added annotation file for ignored chromosomes
Based on ignoreForNorm list (genome file), where by default X chromosome
is not ignored | @@ -53,3 +53,12 @@ for sample in samples:
print('ERROR: Required file "{}" for sample "{}" specified in '
'configuration file is NOT available.'.format(file, sample))
exit(1)
+
+ignoreForPeaks = ignore_forNorm
+if "X" in ignoreForPeaks:
+ ignoreForPeaks.remove("X")
+ignoreForPeaksFile = os.path.join(outdir_MACS2,'Annot... |
Improve `mmap.mmap.__enter__`
It returns `Self` at runtime, not `mmap.mmap`, so inheriting from `AbstractContextManager` doesn't really do anything for us. | import sys
-from _typeshed import ReadableBuffer
-from contextlib import AbstractContextManager
+from _typeshed import ReadableBuffer, Self
from typing import Iterable, Iterator, NoReturn, Sized, overload
ACCESS_DEFAULT: int
@@ -27,7 +26,7 @@ if sys.platform != "win32":
PAGESIZE: int
-class mmap(AbstractContextManager[... |
TST: Make negative bar count check exact message.
To make sure the ValueError is not being occluded by another error. | @@ -646,7 +646,10 @@ class MinuteEquityHistoryTestCase(WithHistory, ZiplineTestCase):
"""
Negative bar counts leak future information.
"""
- with self.assertRaises(ValueError):
+ with self.assertRaisesRegexp(
+ ValueError,
+ "bar_count must be >= 1, but got -1"
+ ):
self.data_portal.get_history_window(
[self.ASSET1],
p... |
changelog: fix number of new rules
This was caused by a bug in the GH action which updates this number
automatically: | @@ -15,7 +15,7 @@ It includes many new rules, including all new techniques introduced in MITRE ATT
- main: more detailed progress bar output when matching functions #562 @mr-tz
- main: detect file limitations without doing code analysis for better performance #583 @williballenthin
-### New Rules (82)
+### New Rules (80... |
portico-signin: Fix organization name text overflow.
This fixes the issue on subdomain.zulipchat.com/login/ where the
organization name will have characters such as the lowercase "g"
cut off near the bottom due to the line-height being too small and
the overflow being hidden.
This re-arranges the properties to fix that... | @@ -493,7 +493,7 @@ html {
.split-view .org-header .info-box {
display: inline-block;
position: relative;
- margin: 15px 0px 0px 20px;
+ margin: 20px 0px 0px 20px;
width: calc(100% - 125px);
/* full width minus the avatar + padding + borders */
@@ -511,13 +511,13 @@ html {
.split-view .info-box .organization-name {
fon... |
Matplotlib max-h fix so that plots are not cut off
`object-fit:contain` only works with `max-h` if they are set on the same element. I moved `max-h` to `img` and also increased the height a bit such that the plot has enough space and can adapt to the container height.
Fixes | <div id="bokehDiv"/>
{:else if value && value["type"] == "matplotlib"}
<div
- class="output-image w-full max-h-80 flex justify-center items-center relative"
+ class="output-image w-full flex justify-center items-center relative"
{theme}
>
<!-- svelte-ignore a11y-missing-attribute -->
- <img class="w-full h-full object-... |
node: move working path to lazy created.
The working path is needed for custom script so far. Not to create it,
if it's not necessary. | @@ -52,10 +52,11 @@ class Node(ContextMixin, InitializableMixin):
self.features: Features
self.tools = Tools(self)
# the path uses remotely
- self.remote_working_path: Optional[PurePath] = None
node_id = str(self.index) if self.index >= 0 else ""
self.log = get_logger(logger_name, node_id)
+ # The working path will be ... |
Noviflow docs: icmpv6 match moved to table 6 instead of 3
add match fields for FaucetIPv6TupleTest | @@ -23,28 +23,38 @@ In this example, the server running FAUCET is 10.0.1.8; configuration for CPN in
.. code-block:: none
- set config controller controllergroup 1 controllerid 1 priority 1 ipaddr 10.0.1.8 port 6653 security none
+ set config controller controllergroup faucet controllerid 1 priority 1 ipaddr 10.0.1.8 p... |
Get output from process
In case of error | @@ -16,22 +16,29 @@ script:
# This is the call made when pressing the integration test button.
demisto.results('ok')
sys.exit(0)
-
if demisto.command() == 'rasterize':
- from subprocess import call
+ import os
+ import subprocess
+ return_code = 0
+ error_message = ''
friendlyName = 'url.png'
if demisto.get(demisto.arg... |
Initialize GceVirtualMachine.preempt_marker in the constructor.
This way if PKB fails before GceVirtualMachine.Create we don't get a missing field error checking for the preempt marker.
This only happened when there was an unrelated failure in _CreateDependencies. | @@ -424,6 +424,8 @@ class GceVirtualMachine(virtual_machine.BaseVirtualMachine):
if (not FLAGS.gce_migrate_on_maintenance or
self.gpu_count or self.network.placement_group):
self.on_host_maintenance = 'TERMINATE'
+ if self.preemptible:
+ self.preempt_marker = f'gs://{FLAGS.gcp_preemptible_status_bucket}/{FLAGS.run_uri}... |
Make curl in DevStack Bypass Proxy
This commit modifies curl option in wait_for_nova_resources to
bypass proxy with --noproxy option. Without this option, if you run
DevStack behind proxy, curl command fails with timeout &
wait_for_nova_resources also fails.
Because curl only accesses Placement service API, this modifi... | @@ -2202,7 +2202,7 @@ function wait_for_nova_resources {
for i in $(seq 1 12); do
# Fetch provider UUIDs from Placement
local providers
- providers=$(curl -sH "X-Auth-Token: $token" $endpoint/resource_providers \
+ providers=$(curl --noproxy '*' -sH "X-Auth-Token: $token" $endpoint/resource_providers \
| jq -r '.resour... |
Add table that describes paired-end counterparts of trimming options
... and some other improvements.
Closes | -=============
-Recipes (FAQ)
-=============
+===============
+Recipes and FAQ
+===============
This section gives answers to frequently asked questions. It shows you how to
get cutadapt to do what you want it to do!
@@ -174,6 +174,38 @@ principle::
Note the ``-`` character in the second invocation to cutadapt.
+Suppor... |
azure: added HCS family support
HCS VM family was considered as H family until now and that was causing
various issues in lisav2 testing. | @@ -216,6 +216,16 @@ Function Validate-SubscriptionUsage($RGXMLData, $Location, $OverrideVMSize, $Sto
$currentStatus = Set-Usage -currentStatus $currentStatus -text $identifierText -usage $testVMUsage -AllowedUsagePercentage $AllowedUsagePercentage
$overFlowErrors += Test-Usage -currentStatus $currentStatus -text $iden... |
`test_cases` README: Address post-merge review of
Thanks for the review! | @@ -13,7 +13,7 @@ multiple other mechanisms for spotting errors in the stubs.
Different test cases in this directory serve different purposes. For some stubs in
typeshed, the type annotations are complex enough that it's useful to have
-basic sanity checks that test whether a type checker understands the intent of
+san... |
[docs] Improve docs-serve and fix link
[docs] Improve docs-serve and fix link
1. Make sure dependencies are installed when using docs-serve
2. Fix link to customizing reports from report reference page. | @@ -42,7 +42,10 @@ lint: install-dependencies
typecheck: install-dependencies
source ${VENV_ACTIVATE} && python3 presubmit.py typecheck
-docs-serve:
+install-docs-dependencies: docs/Gemfile.lock
+ cd docs && bundle install
+
+docs-serve: install-docs-dependencies
cd docs && bundle exec jekyll serve --livereload
clear-c... |
.github: squish issue template onto single lines
The GitHub UI seems to keep line breaks from the template for new
issues, so squish onto single lines. | -Please do not report issues that can be reproduced with the
-[upstream Java project](https://github.com/googlei18n/libphonenumber): if your
-issue can be reproduced with the
-[online Java demo](http://libphonenumber.appspot.com/),
-report your [problem upstream](https://github.com/googlei18n/libphonenumber/blob/master... |
fix(tests): Fix incorrect `pytest.raises(...) as` usage
The exception variable used in the `as` should be used outside of the
`with` scope. | @@ -184,30 +184,26 @@ async def test_merge_commit_message_undefined(
)
with pytest.raises(context.RenderTemplateFailure) as x:
await ctxt.pull_request.get_commit_message()
- assert str(x) == "foobar"
+ assert "foobar" in str(x.value)
@pytest.mark.parametrize(
- "body,error",
+ "body",
[
- (
"""Hello world
# Commit Mess... |
Skipped tests
Increased timeout for - Endpoint Malware Investigation - Generic - Test | "Demisto REST API"
],
"fromversion": "5.0.0",
- "timeout": 900
+ "timeout": 1200
},
{
"playbookID": "ParseExcel-test"
"_comment": "~~~ INSTANCE ISSUES ~~~",
+ "AlphaSOC Wisdom": "Issue 19235",
+ "DomainTools Iris": "Issue 20433",
+ "Cybereason": "Issue 20430",
+ "SentinelOne V2": "Issue 19361",
+ "ThreatQ v2": "Issue 1... |
fix the log of parse_summary feature.
Detail: fix the issue that the 100% process info is printed twice by determining whether the file_handler.offset changed. | @@ -88,6 +88,7 @@ class EventParser:
start_offset = file_handler.offset
try:
event_str = _SummaryParser.event_load(file_handler)
+ if start_offset != file_handler.offset:
self._print_process(file_handler)
crc_check_time = 0
if event_str is None:
|
Change batch size to 1
This is the default when using the Lambda API, and it also
prevents the issues with partial failures. | @@ -557,7 +557,7 @@ class Chalice(object):
return EventSourceHandler(event_func, SNSEvent)
return _register_sns_message
- def on_sqs_message(self, queue, batch_size=10, name=None):
+ def on_sqs_message(self, queue, batch_size=1, name=None):
def _register_sqs_message(event_func):
handler_name = name
if handler_name is N... |
Update tags.yaml
Added missing tags. | - commerce
- complaints
- computed tomography
+- computer forensics
- computer security
- computer vision
- conservation
- denoising
- dialog
- dicom
+- digital forensics
- digital preservation
- disaster response
- distributional semantics
|
Fix for
I think this was a typo? I can deploy VPSes again, at least. | @@ -1179,7 +1179,7 @@ class Cloud(object):
'minion', vm_, self.opts, default={}
)
- alias, driver = vm_['provider'].split(':')
+ alias, driver = vm_['driver'].split(':')
fun = '{0}.create'.format(driver)
if fun not in self.clouds:
log.error(
|
Fix docs for test_request_context
Fixes | @@ -2140,8 +2140,8 @@ class Flask(_PackageBoundObject):
return RequestContext(self, environ)
def test_request_context(self, *args, **kwargs):
- """Creates a WSGI environment from the given values (see
- :class:`werkzeug.test.EnvironBuilder` for more information, this
+ """Creates a :class:`~flask.ctx.RequestContext` fr... |
Changed mount.mount module to accept only the mount point.
Previously the mount.mount needs at least the device and the mount
point. Using this approach it doesn't use the /etc/fstab entries.
Change to needs only the mount point.
You still can use the device, but now is an optional parameter. | @@ -1245,7 +1245,7 @@ def automaster(config="/etc/auto_salt"):
def mount(
- name, device, mkmnt=False, fstype="", opts="defaults", user=None, util="mount"
+ name, device=False, mkmnt=False, fstype="", opts="defaults", user=None, util="mount"
):
"""
Mount a device
@@ -1295,7 +1295,11 @@ def mount(
else:
args += " -t {0}... |
Refactor flake8 integration test to use create_options_bootstrapper
follow up on | @@ -10,10 +10,9 @@ from pants.base.specs import FilesystemLiteralSpec, OriginSpec, SingleAddress
from pants.core.goals.lint import LintOptions, LintResults
from pants.engine.addresses import Address
from pants.engine.fs import DigestContents, FileContent
-from pants.engine.rules import RootRule
+from pants.engine.rules... |
Update core.py with f-strings (issue
Corrected past shortcomings | @@ -3269,7 +3269,7 @@ def _scalar_heuristic(arr, elem):
dout._fill_value.flat[0]).all():
warnings.warn(
"Upon accessing multidimensional field "
- f"{indx:s}, need to keep dimensionality "
+ f"{indx!s}, need to keep dimensionality "
"of fill_value at 0. Discarding "
"heterogeneous fill_value and setting "
f"all to {dou... |
ParameterisedHolderUI: Updated deprecated presets() method
Cortex 10 deprecated `presets()` in favour of `getPresets()` for
Parameters. | @@ -226,7 +226,7 @@ def __plugPresetValues( plug ) :
# make sure to get the values in the same
# order that the names were given.
- values = [ parameter.presets()[x] for x in parameter.presetNames() ]
+ values = [ parameter.getPresets()[x] for x in parameter.presetNames() ]
if isinstance( plug, Gaffer.StringPlug ) :
re... |
[swarming] Fix unicode for fix_python_cmd.
Also use fs.stat instead of os.stat. | @@ -260,20 +260,23 @@ def fix_python_cmd(cmd, env=None):
# At this point we need to prepend some resolved python to cmd.
if sys.platform == 'win32':
- python_exe = 'python.exe'
+ python_exe = u'python.exe'
check = fs.isfile
else:
- python_exe = 'python'
+ python_exe = u'python'
def check(candidate):
try:
- return bool(... |
voctocore: fixup streamblanker
removed debug message | @@ -98,7 +98,6 @@ class StreamblankToolbarController(object):
if current_time - self.last_draw_time >= 1.0:
self.last_draw_time = current_time
for button in list(self.blank_btns.values()) + [self.livebtn]:
- print(button.get_name())
if self.blink:
button.get_style_context().add_class("blink")
else:
|
[tests] Use PY2 instead of PYTHON_VERSION for WarningSourceSkipContextManager
Pywikibot supports Python (3.4)/3.5+. It is not necessary to have a different
behaviour for 3.0 - 3.1 anymore | @@ -253,7 +253,7 @@ class WarningSourceSkipContextManager(warnings.catch_warnings):
skip_frames -= 1
# Ignore socket IO warnings (T183696, T184996)
- if (PYTHON_VERSION >= (3, 2)
+ if (not PY2
and issubclass(warn_msg.category, ResourceWarning)
and str(warn_msg.message).startswith(
('unclosed <ssl.SSLSocket',
|
boxes: Improve error message for invalid stream name.
Now that autocomplete for stream box has been added, we can show a hint
to use autocomplete when the user inputs an invalid stream name. | @@ -319,7 +319,14 @@ class WriteBox(urwid.Pile):
if header.focus_col == 0:
stream_name = header[0].edit_text
if not self.model.is_valid_stream(stream_name):
- self.view.set_footer_text("Invalid stream name", 3)
+ invalid_stream_error = (
+ 'Invalid stream name.'
+ ' Use {} or {} to autocomplete.'
+ .format(keys_for_com... |
Make code pass PEP8 checks
Per suggestion at | @@ -807,22 +807,26 @@ There's a couple of things to keep in mind when enabling cors for a view:
.. code-block:: python
from chalice import Chalice, Response
+
app = Chalice(app_name='multipleorigincors')
+ _ALLOWED_ORIGINS = set([
+ 'http://allowed1.example.com',
+ 'http://allowed2.example.com',
+ ])
+
+
@app.route('/c... |
Add entry for distributed tests to CODEOWNERS.
Summary:
Pull Request resolved:
ghstack-source-id:
Test Plan: waitforbuildbot | /torch/distributed/rpc @mrshenli @pritamdamania87 @zhaojuanmao
/torch/distributed/autograd @mrshenli @pritamdamania87 @zhaojuanmao
/torch/distributed/optim @mrshenli @pritamdamania87 @zhaojuanmao @aazzolini
+
+# Distributed tests
+/test/distributed @mrshenli @pritamdamania87 @zhaojuanmao
+/torch/testing/_internal/distr... |
s/paramter/parameter/
Minor typo | @@ -313,7 +313,7 @@ In addition to credentials, you can also configure non-credential values. In
general, boto3 follows the same approach used in credential lookup: try various
locations until a value is found. Boto3 uses these sources for configuration:
-* Explicitly passed as the ``config`` paramter when creating a c... |
Fix travis build for python 3.6 failing
This fixes a build error in python 3.6 in travis. | @@ -26,6 +26,9 @@ python:
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq -y python-virtualenv
+ # otherwise imagecodecs fails to build on py3.6,
+ # see https://github.com/scikit-image/scikit-image/issues/4673
+ - pip install --upgrade pip
install:
# TODO why was this deactivated?
|
Doc improvement for bulk update
[skip ci] | @@ -234,7 +234,12 @@ efficiently update one or more columns on a list of models. For example:
.. note::
For large lists of objects, you should specify a reasonable batch_size and
wrap the call to :py:meth:`~Model.bulk_update` with
- :py:meth:`Database.atomic`.
+ :py:meth:`Database.atomic`:
+
+ .. code-block:: python
+
... |
Allow deleting a pres exchange item without reading it first
Related to this allows deleting a presentation exchange
record without reading it from storage. | @@ -34,6 +34,8 @@ from ....messaging.valid import (
from ....storage.error import StorageError, StorageNotFoundError
from ....storage.vc_holder.base import VCHolder
from ....storage.vc_holder.vc_record import VCRecord
+from ....storage.record import StorageRecord
+from ....storage.base import BaseStorage
from ....utils... |
Update exercism-xswift project configuration
Configuration has been updated with a new source branch. This branch also only appears to build with SwiftPM, so the build configuration has also been updated. The configurations for Swift 4 no longer apply, so the associated xfails have also been removed. | "repository": "Git",
"url": "https://github.com/masters3d/xswift.git",
"path": "exercism-xswift",
- "branch": "do-not-delete-pre-4.2-compatibility",
+ "branch": "master",
"maintainer": "cheyo@masters3d.com",
"compatibility": [
{
- "version": "4.0",
- "commit": "7614aae4a87d92e2343473c619a805ace98a474e"
- },
- {
- "vers... |
Fix circuit_dag_test
Networkx changed its copy and eq functions for DiGraph
between version 2.1 and 2.2, which breaks the attached test
in version 2.1 (but it works in 2.2).
In any case, it's probably safer to convert both instances
to cirq Dags. | @@ -249,4 +249,4 @@ def test_larger_circuit():
def test_is_maximalist(circuit):
dag = cirq.CircuitDag.from_circuit(circuit)
transitive_closure = networkx.dag.transitive_closure(dag)
- assert transitive_closure == dag
+ assert cirq.CircuitDag(incoming_graph_data=transitive_closure) == dag
|
Use ContentNodeSlim for displaying node summary data.
Include num_coach_contents to ensure display. | import samePageCheckGenerator from 'kolibri.utils.samePageCheckGenerator';
-import { LessonResource, ContentNodeResource } from 'kolibri.resources';
+import { LessonResource, ContentNodeSlimResource } from 'kolibri.resources';
import { createTranslator } from 'kolibri.utils.i18n';
import { error as logError } from 'kol... |
remove comment # Debug variables
total sr required and provided are useful outputs | @@ -492,7 +492,6 @@ def process_results(self, dfm_list, data, meta, saveToDB=True):
self.nested_outputs["Scenario"]["Site"][name]["load_met_series_kw"] = self.results_dict.get("load_met")
self.nested_outputs["Scenario"]["Site"][name]["load_met_pct"] = self.results_dict.get("load_met_pct")
self.nested_outputs["Scenario"... |
Update ffmpeg.py
include language to toJson | @@ -135,12 +135,14 @@ class MediaStreamInfo(object):
'type': self.type}
if self.type == 'audio':
out['channels'] = self.audio_channels
+ out['language'] = self.metadata['language'].lower().strip()
elif self.type == 'video':
out['pix_fmt'] = self.pix_fmt
out['profile'] = self.profile
elif self.type == 'subtitle':
out['f... |
travis + circleci: Start postgresql during provision.
Otherwise, in CircleCI it isn't running when we need it later.
Travis must special-case starting it automatically. | @@ -301,6 +301,7 @@ def main(options):
run(["sudo", "service", "rabbitmq-server", "restart"])
run(["sudo", "service", "redis-server", "restart"])
run(["sudo", "service", "memcached", "restart"])
+ run(["sudo", "service", "postgresql", "restart"])
elif options.is_docker:
run(["sudo", "service", "rabbitmq-server", "resta... |
Expands \e (for 10^ exponent) macro in latex rendering.
This is needed because Katex doesn't support custom commands, and
in any case isn't setup to do so. | @@ -246,7 +246,7 @@ def latex_value(el, precision=6, polarprecision=3,
p = s.split('e')
if len(p) == 2:
ex = str(int(p[1])) #exponent without extras (e.g. +04 => 4)
- s = p[0] + "\\e{" + ex + "}"
+ s = p[0] + "\\times 10^{" + ex + "}"
#Strip superfluous endings
if "." in s:
|
Change board embed color
Can't update color when the game is over anymore | @@ -11,7 +11,7 @@ from PIL import Image, ImageDraw, ImageFont
from discord.ext import commands
from bot.bot import Bot
-from bot.constants import Colours, MODERATION_ROLES
+from bot.constants import MODERATION_ROLES
from bot.utils.decorators import with_role
DECK = list(product(*[(0, 1, 2)]*4))
@@ -262,7 +262,7 @@ clas... |
Fix the snapshots events integration test
* When restoring a snapshot we also restart the rest service and nginx,
which might lead to intermittent connection errors.
So, I added the error type "ConnectionError" to the except clause. | @@ -17,6 +17,7 @@ import uuid
import time
import json
from datetime import datetime
+from requests.exceptions import ConnectionError
from integration_tests import AgentlessTestCase
from integration_tests.framework.postgresql import run_query
from integration_tests.tests.utils import get_resource as resource
@@ -182,7 +... |
set domain_name to 'Unknown' instead of 'not set'
for consistency | @@ -861,7 +861,7 @@ class IOSDriver(NetworkDriver):
# default values.
vendor = u'Cisco'
uptime = -1
- serial_number, fqdn, os_version, hostname = (u'Unknown', u'Unknown', u'Unknown', u'Unknown')
+ serial_number, fqdn, os_version, hostname, domain_name = (u'Unknown',)*5
# obtain output from device
show_ver = self._send_... |
Remove warning from unused temp
Follow up to (01d323abea91f8b75caffa452f57320b06a57e9e).
That PR creates a temp that's only used in the limited API
(and therefore causes warnings on all other paths) | @@ -3492,6 +3492,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.putln(code.error_goto_if_null(env.module_cname, self.pos))
code.putln("#endif")
code.putln("#endif") # CYTHON_PEP489_MULTI_PHASE_INIT
+ code.putln("CYTHON_UNUSED_VAR(%s);" % module_temp) # only used in limited API
code.putln(
"%s = PyModule_GetDi... |
extensions guide: method to implement is __call__
(Not forward().) | @@ -147,7 +147,7 @@ The learning rate will be dropped according to the curve below with :math:`{\rm
if self._init is None:
self._init = getattr(optimizer, self._attr)
- def forward(self, trainer):
+ def __call__(self, trainer):
self._t += 1
optimizer = trainer.updater.get_optimizer('main')
@@ -174,4 +174,4 @@ This exte... |
Fix connection unable to connect to old alias
Fixes: milvus-io/milvus#16740 | @@ -62,7 +62,7 @@ class Connections(metaclass=SingleInstanceMetaClass):
"""
self._kwargs = {"default": {"host": DefaultConfig.DEFAULT_HOST,
"port": DefaultConfig.DEFAULT_PORT,
- "user": "",}}
+ "user": ""}}
self._conns = {}
def add_connection(self, **kwargs):
@@ -159,40 +159,34 @@ class Connections(metaclass=SingleInst... |
Always use current CCG membership
Relates to | @@ -353,7 +353,7 @@ def create_bigquery_views():
sql = """
SELECT
prescribing.sha AS sha,
- prescribing.pct AS pct,
+ practices.ccg_id AS pct,
prescribing.practice AS practice,
COALESCE(bnf_map.current_bnf_code, prescribing.bnf_code)
AS bnf_code,
@@ -362,14 +362,16 @@ def create_bigquery_views():
prescribing.net_cost A... |
Use numeric limits to define TensorTypeSet(FULL) representation
Summary:
Pull Request resolved:
This also removes an annoying warning about change of sign conversion
Test Plan: Run unit tests | @@ -41,7 +41,7 @@ public:
TensorTypeSet()
: repr_(0) {}
TensorTypeSet(Full)
- : repr_(-1) {}
+ : repr_(std::numeric_limits<decltype(repr_)>::max()) {}
// Public version of TensorTypeSet(uint64_t) API; external users
// must be explicit when they do this!
TensorTypeSet(Raw, uint64_t x)
|
zulip_ops: Add aptitude dependency.
This is useful for `aptitude why`. | @@ -5,6 +5,8 @@ class zulip_ops::base {
$org_base_packages = [# Management for our systems
"openssh-server",
"mosh",
+ # package management
+ "aptitude",
# SSL Certificates
"letsencrypt",
# Monitoring
|
Update sg_document-structure.rst
Link to handbook. | Document Structure
==================
-Structure and organization are an important part of a document's ease of use and its understandability. Information should be organized and presented in a logical order, with similar subjects grouped together in the same section.
-
-In most cases, a document has a title, an introd... |
Update noaa-cdr-fundamental.yaml
Updating contact information | @@ -6,8 +6,8 @@ Description: |
Documentation: https://www.ncdc.noaa.gov/cdr
Contact: |
For questions regarding the specific CDR data holdings, please contact NCEI.SAT.INFO@NOAA.GOV.<br />
- For any questions regarding data delivery not associated with this platform or any general questions regarding the NOAA Big Data P... |
Update src/azure-cli/azure/cli/command_modules/sql/_help.py
Fixed typo | @@ -518,7 +518,7 @@ examples:
helps['sql midb list'] = """
type: command
-short-summary: List maanged databases on a managed instance.
+short-summary: List managed databases on a managed instance.
examples:
- name: List managed databases on a managed instance
text: az sql midb list -g mygroup --mi myinstance
|
Modify the error message of capsule failed
Closes-Bug: | @@ -170,7 +170,7 @@ class API(object):
host_state = self._schedule_container(context, new_capsule,
extra_spec)
except Exception as exc:
- new_capsule.status = consts.ERROR
+ new_capsule.status = consts.FAILED
new_capsule.status_reason = str(exc)
new_capsule.save(context)
return
|
DOCS: Add an example of admonition with warning style
I didn't find this useful tip (change the class of an admonition) in the documentation. See and for related but different things. | @@ -560,6 +560,22 @@ must also include a table title. See example above.
- ```{important} This is an example
of an important directive.
```
+* - ````md
+ ```{admonition} Title
+ :class: warning
+ text
+ ```
+ ````
+ - ````md
+ ```{admonition} This is a title
+ :class: warning
+ An example of an admonition with a title ... |
Update relatedUserSelectorViewTests.es6.js to use the new avatar rendering mechanism.
This test was not updated to use the new avatar rendering support recently
added to Djblets, which was causing this test to fail. This patch updates
the test.
Testing Done:
This test was run locally, and now passes.
Reviewed at | @@ -20,15 +20,30 @@ suite('rb/admin/views/relatedUserSelectorView', function() {
it('with inital options', function() {
let view = new RB.RelatedUserSelectorView({
$input: $('<input id="id_people" type="hidden">'),
- initialOptions: [{"username": "admin", "fullname":
- "Admin User", "id": 1,
- "avatarURL": "https://sec... |
Handles out of range pagination token datetime
Check that "after_datetime" token used for pagination is smaller than the given starting datetime when doing a lookup | @@ -335,6 +335,8 @@ class DocumentLogsModel(SharedModel, ActionLogsDataInterface, ElasticsearchLogsM
after_random_id = page_token["random_id"]
if after_datetime is not None:
+ if after_datetime < start_datetime:
+ return LogEntriesPage([], None)
end_datetime = min(end_datetime, after_datetime)
all_logs = []
|
add expires docs to set_cookie.
update set_cookie docstring to explain what expires will accept and behave properly, without having to go track down httputil.format_timestamp, which is not exposed in the docs(that I could find). | @@ -543,6 +543,10 @@ class RequestHandler(object):
Newly-set cookies are not immediately visible via `get_cookie`;
they are not present until the next request.
+ expires may be a numeric timestamp as returned by `time.time`,
+ a time tuple as returned by `time.gmtime`, or a
+ `datetime.datetime` object.
+
Additional ke... |
Update Docs for building PyTorch for Android.
Summary: Pull Request resolved: | @@ -49,6 +49,7 @@ For this you can use `./scripts/build_pytorch_android.sh` script.
```
git clone https://github.com/pytorch/pytorch.git
cd pytorch
+git submodule update --init --recursive
sh ./scripts/build_pytorch_android.sh
```
|
Update sets.py
Update helper text to maintain consistency of constant names between docs and sets_categories_data.py | @@ -99,12 +99,12 @@ def singleton_ingredients(dishes, intersection):
"""Determine which `dishes` have a singleton ingredient (an ingredient that only appears once across dishes).
:param dishes: list - of ingredient sets.
- :param intersection: constant - can be one of `<CATEGORY>_INTERSECTION` constants imported from `... |
Eliminated "print >>" for python3
Should be backward-compatible. | @@ -26,6 +26,8 @@ import gffutils
from gffutils.iterators import DataIterator
import tempfile
+from __future__ import print_function
+
SEQ_DIR = "seq"
RNASEQ_DIR = "rnaseq"
SRNASEQ_DIR = "srnaseq"
@@ -76,7 +78,7 @@ def _output_gff3(gff3_file, out_file, dialect):
attr = {"transcript_id": transcript_id, "gene_id": gene_i... |
confirguration/core: Add parameter default to MetaConfig
Uses os.eviron as the default environment for creation of a
MetaConfiguration object, this allows an instance to be created without
providing any parameters and fixes re-creating an instance from pod. | @@ -626,7 +626,7 @@ class MetaConfiguration(Configuration):
def user_config_file(self):
return os.path.join(self.user_directory, 'config.yaml')
- def __init__(self, environ):
+ def __init__(self, environ=os.environ):
super(MetaConfiguration, self).__init__()
user_directory = environ.pop('WA_USER_DIRECTORY', '')
if user... |
use WatchedFileHandler instead of RotatingFileHandler
this guarantees that the log file will be recreated after it has been deleted | @@ -40,7 +40,7 @@ config_name = os.getenv("MAESTRAL_CONFIG", "maestral")
log_file = get_log_path("maestral", config_name + ".log")
log_fmt = logging.Formatter(fmt="%(asctime)s %(name)s %(levelname)s: %(message)s",
datefmt="%Y-%m-%d %H:%M:%S")
-rfh = logging.handlers.RotatingFileHandler(log_file, maxBytes=10**5, backupC... |
[Jira] document parameter usage for jira server
jira server usage for assign_issue account_id parameter | @@ -1099,7 +1099,8 @@ class Jira(AtlassianRestAPI):
"""Assign an issue to a user. None will set it to unassigned. -1 will set it to Automatic.
:param issue: the issue ID or key to assign
:type issue: int or str
- :param account_id: the account ID of the user to assign the issue to
+ :param account_id: the account ID of... |
Issue 47: Automatic deployment on PyPI
This configures an automated deployment on PyPI. The password is encrypted, such
that only Travis CI can decrypt it. Automatic deployment will only be done for
tags. | @@ -14,3 +14,10 @@ script:
- mpirun pytest --cov=heat
after_success:
- codecov
+deploy:
+ provider: pypi
+ user: bhagemeier
+ password:
+ secure: jYXgTpuqLjDB4ScljLTeY1LOsc1XeAdzPcG7+WPkDI14ucTvG4szsaxP3RbQXtStGNJYLhENKD9XUlEJOXnWvAsSR/Pk5GRGNGJaD+0G5NB8HwQZvcpAieQz0lfyaanpohFUH3ttowXDMGRz/BaqAYC2KzxIVAib/34WmvG3lR8UpI... |
Scroll to top of registration to show validation errors
# Conflicts:
# contentcuration/contentcuration/frontend/accounts/pages/Create.vue | :lazy-src="require('shared/images/kolibri-logo.svg')"
:src="require('shared/images/kolibri-logo.svg')"
/>
- <h2 class="text-xs-center mb-4 primary--text">
+ <h2 ref="top" class="text-xs-center mb-4 primary--text">
{{ $tr('createAnAccountTitle') }}
</h2>
<VLayout justify-center class="px-4">
|
Do not show the same photo multiple times
This happened on person albums | @@ -367,7 +367,8 @@ class AlbumDateViewSet(viewsets.ModelViewSet):
"hidden",
"exif_timestamp",
"owner",
- ),
+ )
+ .distinct(),
),
Prefetch(
"photos__owner",
@@ -433,7 +434,7 @@ class AlbumDateListViewSet(viewsets.ModelViewSet):
& Q(photos__faces__person__id=self.request.query_params.get("person"))
)
qs = (
- qs.annota... |
SDK - Make it easier to compile and submit a pipeline run
* SDK - Make it easier to compile and submit a pipeline run
Adds the `Client.run_pipeline_func_on_kfp(func)` function that compiles the pipeline and submits it for execution on KFP-enabled cluster.
* Renamed run_pipeline_func_on_kfp to create_run_from_pipeline_f... | @@ -18,9 +18,11 @@ import logging
import json
import os
import tarfile
+import tempfile
import zipfile
import yaml
from datetime import datetime
+from typing import Mapping, Callable
import kfp_server_api
@@ -255,6 +257,43 @@ class Client(object):
IPython.display.display(IPython.display.HTML(html))
return response.run
... |
Use a lock to serialise checkpointing.
Prior to this, parsl/tests/test_checkpointing/test_regression_233.py
was failing on benc's laptop fairly regularly - within 10 iterations of
while pytest parsl/tests/test_checkpointing/test_regression_233.py; do echo TICK ; done | @@ -81,6 +81,8 @@ class DataFlowKernel(object):
logger.info("Parsl version: {}".format(get_version()))
logger.info("Libsubmit version: {}".format(libsubmit.__version__))
+ self.checkpoint_lock = threading.Lock()
+
# Update config with defaults
self._config = update_config(config, self.rundir)
@@ -613,7 +615,7 @@ class ... |
Update generic.txt
> ta569.txt | @@ -17214,11 +17214,6 @@ http://52.221.14.194
http://54.254.144.12
php.ooo
-# Reference: https://twitter.com/malware_traffic/status/1574848307519754242
-# Reference: https://github.com/brad-duncan/IOCs/blob/main/2022-09-27-TA569-Soc-Gholish-IOCs.txt
-
-dotimewat.com
-
# Reference: https://www.virustotal.com/gui/file/a0... |
Rewrite chunks of Set Dropdown Value so it will work on firefox.
Apparently, SeleniumLibrary's scroll_element_into_view doesn't seem to work
for elements in a scrollable div on Firefox. Also, the use of ActionChains
seems unnecessary, so I remove them. | @@ -10,8 +10,8 @@ file.
"""
import re
-from selenium.webdriver.common.action_chains import ActionChains
from SeleniumLibrary.errors import ElementNotFound
+from selenium.common.exceptions import NoSuchElementException
from cumulusci.robotframework.pageobjects import pageobject
from cumulusci.robotframework.pageobjects ... |
streamalert - rules.rst - update logs req
streamalert - rules.rst - update logs req | @@ -90,7 +90,7 @@ Parameter Details
logs
~~~~~~~~~~~
-``logs`` define the log sources the rule supports; The ``def`` function block is not run unless this condition is satisfied.
+``logs`` define the log sources the rule supports; The ``def`` function block is not run unless this condition is satisfied. Your rule(s) mu... |
added default version
this fix case when there is no existing version published yet | @@ -1024,6 +1024,8 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
version = pype.api.get_latest_version(asset, subset)
if version:
version = int(version["name"]) + 1
+ else:
+ version = 1
template_data["subset"] = subset
template_data["family"] = "render"
|
Remove /sr.* pattern from test
/sr.* pattern should raise exception | @@ -1184,7 +1184,7 @@ class FilemodLineTests(TestCase, LoaderModuleMockMixin):
cfg_content = '- /srv/custom'
isfile_mock = MagicMock(side_effect=lambda x: True if x == name else DEFAULT)
- for before_line in ['/srv/salt', '/srv/sa.*t', '/sr.*']:
+ for before_line in ['/srv/salt', '/srv/sa.*t']:
with patch('os.path.isfi... |
timestamp error catch
Added error catch for constructing timestamps when reading Madrigal HDF5 files | @@ -98,6 +98,12 @@ def load(fnames, tag=None, sat_id=None, xarray_coords=[]):
# lowercase variable names
data.columns = [item.lower() for item in data.columns]
# datetime index from times
+ time_keys = np.array(['year', 'month', 'day', 'hour', 'min', 'sec'])
+ if not np.all([key in data.columns for key in time_keys]):
... |
Add instruction to anaconda prompt
Add instruction to use Anaconda prompt on Windows. | @@ -20,7 +20,7 @@ Ross's code was tested in Python 3.6 and higher.
Install ross
------------
-You can install the latest release version with::
+Using the terminal (or the Anaconda prompt if on Windows) you can install the latest release version with::
pip install ross-rotordynamics
|
CI: use docker image cimg/python, not circleci/python
The circleci/python images appear to be outdated and do not support
python3.11. | @@ -11,9 +11,10 @@ commands:
- run:
name: "Preparing environment"
command: |
+ python --version # check that python is installed
sudo apt-get update
sudo apt-get install -y openjdk-11-jre
- sudo pip install nox
+ pip install nox
- run:
name: "Testing OmegaConf"
command: |
@@ -26,7 +27,7 @@ jobs:
py_version:
type: strin... |
Windows: When using MinGW require it to be no older than CondaCC
* That one is fairly old, and older will only cause issues we do
not want to deal with. | @@ -727,6 +727,15 @@ The gcc compiler %s (version %s) doesn't have the sufficient \
version (>= 4.4).""" % (the_compiler, gcc_version)
)
+ # CondaCC or newer.
+ if mingw_mode and gcc_version < "5.3":
+ sys.exit(
+ """\
+The MinGW64 compiler %s (version %s) doesn't have the sufficient \
+version (>= 5.3).""" % (the_comp... |
Don't inadvertently copy over a bunch of foreign keys
Manually specify which fields to copy, handle the known foreign key objects explicitly. | @@ -168,12 +168,18 @@ class Command(BaseCommand):
location_types_map[old_id] = new_id
# MPTT sorts this queryset so we can just save in the same order
- new_loc_ids_by_code = {}
+ new_loc_pks_by_code = {}
for loc in SQLLocation.active_objects.filter(domain=self.existing_domain):
- loc.location_id = ''
- loc.parent_id =... |
BUGFIX - Fixes assertion error to none type
If the call to ombi failed and returned 'None' this would cause an error when ARM later tries to add the 'background_url' | @@ -187,6 +187,7 @@ def call_omdb_api(title=None, year=None, imdb_id=None, plot="short"):
try:
title_info_json = urllib.request.urlopen(strurl).read()
title_info = json.loads(title_info_json.decode())
+ title_info['background_url'] = None
app.logger.debug(f"omdb - {title_info}")
except urllib.error.HTTPError as e:
app.... |
Move date formatting into a function
We no longer need to replace dashes with slashes in the date string as
we don't support IE8 any longer and IE9 upwards can parse the dates as
they are. | @@ -474,9 +474,7 @@ var analyseChart = {
stepped: true,
format: {
to: function(val) {
- var d = _this.globalOptions.allMonths[val];
- return Highcharts.dateFormat('%b \'%y',
- new Date(d.replace(/-/g, '/')));
+ return formatDate(_this.globalOptions.allMonths[val]);
},
from: function(val) {
return _this.globalOptions.al... |
bd_rate: Parse Mutliconfig presets correctly
With new multiconfig options, we are parsing and storing them in new
structure of folders, so we require to treat them differently. | @@ -377,6 +377,7 @@ try:
print("Runs do not match.")
sys.exit(1)
task = info_data[0]["task"]
+ codec = info_data[0]["codec"]
except FileNotFoundError:
# no info.json, using bare directories
print("Couldn't open", args.run[0])
@@ -403,17 +404,25 @@ if info_data and not args.overlap:
if info_data:
for video in videos:
+ ... |
UserGuide.yml trivial typo
contianer | containers are also purposefully isolated from the host system, so in
order to run a tool inside a Docker container there is additional work to
ensure that input files are available inside the container and output
- files can be recovered from the contianer. CWL can perform this work
+ files can be recovered from the c... |
feat: Run build command for all apps
After `bench build` is run, it will check `package.json` of
every installed app run `yarn build` if a build script exists. | @@ -2,6 +2,7 @@ const fs = require('fs');
const path = require('path');
const chalk = require('chalk');
const rollup = require('rollup');
+const { execSync } = require('child_process');
const log = console.log; // eslint-disable-line
const {
@@ -26,18 +27,25 @@ create_build_file();
if (build_for_app) {
build_assets_for... |
help-docs: Update accessing private messages information.
Removes unnecessary mention of mac keyboard shortcut because the
documentation updates when a mac keyboard is detected.
Also, removes reference to accessing group private messages from
the right sidbar. | @@ -34,11 +34,11 @@ There are several ways to access an existing PM or group PM.
* For recent conversations, click on **Private messages** near
the top of the left sidebar.
-* Click on any user or group in the right sidebar.
-* Start typing a user's name in [search](/help/search-for-messages). You'll be
- able to selec... |
`select_related` user profile when listing users
This is used for the user avatar | @@ -98,7 +98,7 @@ def index(request, *args):
else:
ordering = 'name'
- paginator = Paginator(users, per_page=20)
+ paginator = Paginator(users.select_related('wagtail_userprofile'), per_page=20)
users = paginator.get_page(request.GET.get('p'))
if request.is_ajax():
|
Fix, need to track fallback variable usage in classes too.
* Functions with local classes that were using outside functions
closure variables were not properly generating code for providing
those values. | @@ -223,6 +223,8 @@ class VariableClosureLookupVisitorPhase1(VisitorNoopMixin):
),
source_ref = node.source_ref
)
+
+ variable.addVariableUser(provider)
else:
new_node = ExpressionLocalsVariableRef(
locals_scope = provider.getFunctionLocalsScope(),
|
config: change tpm_hash_alg to SHA1 by default
This ensures that Keylime works out of the box on older kernel versions. | @@ -115,12 +115,14 @@ max_retries = 10
# TPM2-specific options, allows customizing default algorithms to use.
# Specify the default crypto algorithms to use with a TPM2 for this agent.
+# On kernel versions less than 5.10 choose sha1 as hash algorithm, because
+# otherwise IMA attestation will fail.
#
# Currently accep... |
Add treshold for infinite scroll loading
in chrome at 75% zoom the scroll can be a not integer.
some time it can go to negative as well.
using a treshold in stead of equality this could not happen | @@ -11,12 +11,15 @@ library.add(
faCaretSquareUp
);
+const BOTTOM_DISTANCE_TRESHOLD = 5;
+
/**
* A scrollable container that after rendering an initial amount of items will
* only render the rest of them (in chunks) if they are required, or in this
* case, when the user scrolls to the bottom of the container.
*/
class ... |
Improve compare_notebook
And detect difference when final line return is missing | @@ -16,20 +16,25 @@ _BLANK_LINE = re.compile(r'^\s*$')
def _multilines(obj):
try:
- return obj.splitlines()
+ lines = obj.splitlines()
+ return lines + [''] if obj.endswith('\n') else lines
except AttributeError:
# Remove the final blank space on Python 2.7
# return json.dumps(obj, indent=True, sort_keys=True).splitlin... |
Added RTD to project_urls
Added a link to RTD to project_urls so it's easier to find the documentation from the pypi site. | [metadata]
name = jsonschema
url = https://github.com/Julian/jsonschema
+project_urls =
+ Docs = https://python-jsonschema.readthedocs.io/en/stable/
description = An implementation of JSON Schema validation for Python
long_description = file: README.rst
author = Julian Berman
|
Update plot_j1j2.py
Correct plotting script | @@ -15,7 +15,7 @@ sigma = []
evar = []
evarsig = []
-data = json.load(open('test2.log'))
+data = json.load(open('test.log'))
for iteration in data["Output"]:
iters.append(iteration["Iteration"])
energy.append(iteration["Energy"]["Mean"])
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.