message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
setup.py: add mock module as dependency
mock is used to mock output from subprocess in tests.
this is a standard module in py3 but no present in py27,
that's why this dependency | @@ -54,6 +54,7 @@ setup(name='cwltool',
'schema-salad >= 2.4.20170308171942, < 3',
'typing >= 3.5.2, < 3.6',
'six >= 1.10.0',
+ 'mock >= 2.0.0',
],
setup_requires=[] + pytest_runner,
|
[ci] Fix `python_package_basic` tests error: pep517.wrappers.BackendUnavailable
This error is raised when we try to get the metadata from a package and this happens because we forgot to first install the build requirements from the `pyproject.toml` file | @@ -436,10 +436,11 @@ def _extract_metainfo_files_from_package_unsafe(
os.path.join(output_path, 'pyproject.toml')
)
- # Get build backend from pyproject.toml:
+ # Get build backend and requirements from pyproject.toml:
with open(os.path.join(path, 'pyproject.toml')) as f:
build_sys = pytoml.load(f)['build-system']
bac... |
Correct sphinx-rtd-theme deps
got sphinx==6 and theme == 0.5.1 for some reason (pip resolver?) | @@ -41,7 +41,7 @@ gmpy = ['gmpy2>=2.1.0']
plot = ['matplotlib>=3.5.0']
interactive = ['ipykernel']
docs = ['sphinx>=4', 'sphinxcontrib-bibtex>=2.1', 'sphinxcontrib-autoprogram',
- 'sphinx_rtd_theme>=0.2']
+ 'sphinx-rtd-theme>=1']
tests = ['pytest>=6', 'hypothesis', 'pytest-timeout', 'pexpect']
develop = ['diofant[tests... |
Update data.py
Added type to editor config strings. | @@ -24,8 +24,8 @@ class IndentStyle(str, Enum):
class EditorSettings:
indent_style: IndentStyle = IndentStyle.Space
indent_size: int = 4
- ace_editor_language: "python"
- highlightjs_language: "python"
+ ace_editor_language: str = "python"
+ highlightjs_language: str = "python"
def __post_init__(self):
|
add error message if Dropout gets no rng key
closes (though there's more work to be done here) | @@ -217,6 +217,12 @@ def Dropout(rate, mode='train'):
def init_fun(input_shape):
return input_shape, ()
def apply_fun(params, inputs, rng):
+ if rng is None:
+ msg = ("Dropout layer requires apply_fun to be called with a PRNG key "
+ "argument. That is, instead of `apply_fun(params, inputs)`, call "
+ "it like `apply_f... |
remove platform tabs, as the launch options aren't platform specific anymore
clarify niche launch options | @@ -32,10 +32,6 @@ TF2 may be looking for an outdated list of graphics cards to enable higher perfo
You can fake your graphics card to one TF2 checks for, in order to unlock better graphics card usage using launch options.
-=== "Windows"
- * **Intel** (Broadwater or higher (past ~2005)): `-force_device_id 0x2500`
- * O... |
Add field to model
Doing this as a standalone to split the work up more easily | @@ -2158,6 +2158,7 @@ class CaseSearch(DocumentSchema):
data_registry = StringProperty()
data_registry_workflow = StringProperty() # one of REGISTRY_WORKFLOW_*
additional_registry_cases = StringListProperty() # list of xpath expressions
+ expand_id_property = StringProperty() # case property referencing another case's ... |
Update run.py
Modified error #L527
test=develop | @@ -523,8 +523,8 @@ def evaluate(logger, args):
inference_program = main_program.clone(for_test=True)
eval_loss, bleu_rouge = validation(
- inference_program, avg_cost, s_probs, e_probs, feed_order,
- place, dev_count, vocab, brc_data, logger, args)
+ inference_program, avg_cost, s_probs, e_probs, match,
+ feed_order, ... |
python-slugify: use explicit re-exports
Fixes | from .__version__ import (
- __author__,
- __author_email__,
- __copyright__,
- __description__,
- __license__,
- __title__,
- __url__,
- __version__,
+ __author__ as __author__,
+ __author_email__ as __author_email__,
+ __copyright__ as __copyright__,
+ __description__ as __description__,
+ __license__ as __license__,... |
Update netwire.txt
Minor update. | @@ -2078,8 +2078,11 @@ kyelines.ddns.net
# Reference: https://twitter.com/malware_traffic/status/1242966785462349824
# Reference: https://www.malware-traffic-analysis.net/2020/03/25/index.html
+# Reference: https://unit42.paloaltonetworks.com/guloader-installing-netwire-rat/
185.163.47.168:2020
+185.163.47.168:2121
+18... |
Don't fail during ValueRecord copy if src has more items
We drop hinting by simply changing ValueFormat, without cleaning
up the actual ValueRecords. This was causing failure at this assert
if font was subsetted without hinting and then passed to mutator. | @@ -894,7 +894,8 @@ class ValueRecord(object):
setattr(self, name, None if isDevice else 0)
if src is not None:
for key,val in src.__dict__.items():
- assert hasattr(self, key)
+ if not hasattr(self, key):
+ continue
setattr(self, key, val)
elif src is not None:
self.__dict__ = src.__dict__.copy()
|
Change AOT from ExprVisitor to MixedModeVisitor
This should allow better scale-ability for AOT when targeting larger networks. | @@ -53,7 +53,7 @@ using StorageMap =
* This is an on demand allocator for AOT. A new temporary
* (storage allocator identifier) is allocated for each operation.
*/
-class AOTOnDemandAllocator : public ExprVisitor {
+class AOTOnDemandAllocator : public MixedModeVisitor {
public:
// run the visitor on a function.
void Ru... |
Adds chialpha function to chi2fns.py
This allows us to test ChiAlphaFunction independently of a GST optimization. | @@ -125,6 +125,64 @@ def chi2_terms(model, dataset, circuits=None,
return terms
+def chialpha(alpha, model, dataset, circuits=None,
+ pfratio_stitchpt=1e-4, radius=1e-6,
+ check=False, memLimit=None, opLabelAliases=None,
+ evaltree_cache=None, comm=None):
+ """
+ TODO: docstring
+ """
+ from ..objects import objectivef... |
python_api/astnode_types_py: emit private accessors for implicit args
TN: | '()')
%>
- % for field in cls.fields_with_accessors():
-
- <%
- arg_list = ['self'] + [a.name.lower for a in field.explicit_arguments]
- %>
+ ## First, emit public properties/methods for field accessors. Accessors
+ ## with no implicit argument will implement C calls themselves, but those
+ ## with some will just deleg... |
Update uiautomatorhelper API calls
Update tests | @@ -24,7 +24,7 @@ import json
from culebratester_client import WindowHierarchyChild, WindowHierarchy
-__version__ = '20.9.0'
+__version__ = '20.9.1'
import sys
import warnings
@@ -1204,7 +1204,7 @@ class View:
# __str = str('', 'utf-8', 'replace')
__str = ''
if "class" in self.map:
- __str += re.sub('.*\.', '', self.ma... |
fix: fix icon on do not disturb switch
Update to new MDI entry for do not disturb switch per Home Assistant update 2021.10.0. | @@ -309,7 +309,7 @@ class DNDSwitch(AlexaMediaSwitch):
@property
def icon(self):
"""Return the icon of the switch."""
- return super()._icon("mdi:do-not-disturb", "mdi:do-not-disturb-off")
+ return super()._icon("mdi:minus-circle", "mdi:minus-circle-off")
def _handle_event(self, event):
"""Handle events."""
|
libcloud: Match cloud names correctly upon deletion.
We were previously (greedily) using count() instead of matching exactly. | @@ -621,6 +621,8 @@ class LibcloudCmds(CommonCloudFunctions) :
_status = 100
_fmsg = "An error has occurred, but no error message was captured"
+ _search = "cb-" + obj_attr_list["username"] + "-" + obj_attr_list["cloud_name"]
+
for credentials_list in obj_attr_list["credentials"].split(";"):
_status, _msg, _local_conn,... |
Enable cache
This potentially fixes (I'm still waiting for user test results).
The potential cause for this error was no cache table (no cache at all
was set up), so the Django-select2 AutoResponseView was unable to find
a correct widget by `field_id` GET parameter. | @@ -247,6 +247,20 @@ AUTH_PASSWORD_VALIDATORS = [
},
]
+# CACHE
+# -----------------------------------------------------------------------------
+# https://docs.djangoproject.com/en/2.2/topics/cache/#database-caching
+CACHES = {
+ 'default': {
+ 'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
+ 'LOCATION': 'c... |
Simplify MarkerTask's ctor
Based on a comment by | @@ -157,12 +157,14 @@ class SignalTask(Task):
class MarkerTask(Task):
- def __init__(self, name, *args, **kwargs):
- if (args and kwargs) or len(args) > 1 or len(kwargs) > 1 or (kwargs and 'details' not in kwargs):
- raise ValueError('Expected only one argument or the kwarg "details"')
+ def __init__(self, name, detail... |
More updates to stale.yml
adding more labels to stale bot config bug, feature, test failure | @@ -10,10 +10,13 @@ daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- Confirmed
- - Blocker
+ - Release Blocker
- Critical
- P1
- P2
+ - Bug
+ - Feature
+ - Test Failure
# Label to use when marking an issue as stale
staleLabel: stale
|
Use the newer one of cmake and cmake3.
Summary:
On my devgpu, `cmake` is newer than `cmake3`. Using `cmake3` causes compilation to fail. Instead of blindly using `cmake3`, we pick the newer of the two.
Pull Request resolved: | @@ -16,11 +16,23 @@ if [ -x "$(command -v rsync)" ]; then
fi
# We test the presence of cmake3 (for platforms like CentOS and Ubuntu 14.04)
-# and use that if so.
+# and use the newer of cmake and cmake3 if so.
CMAKE_COMMAND="cmake"
if [[ -x "$(command -v cmake3)" ]]; then
+ if [[ -x "$(command -v cmake)" ]]; then
+ # h... |
Fix problem when generating cross_coupling_array
Linux machines do not support the same sintaxe as Windows when creating multiple vectors using `numpy.linspace()`. | @@ -747,7 +747,7 @@ class Report:
... RHO_ratio=[1.11, 1.14],
... RHOd=30.45,
... RHOs=37.65,
- ... oper_speed=1000.0) # doctest: +ELLIPSIS
+ ... oper_speed=1000.0)
>>> report.Qa
23022.32142857143
"""
@@ -787,7 +787,8 @@ class Report:
Qa_list[-1] = Qa
# Defining cross-coupling range to 10*Qa - API 684 - SP6.8.5.8
- cro... |
Update mouse grid
Use app.register("launch"... ) to correctly check setting after startup | @@ -9,7 +9,6 @@ import math, time
import typing
mod = Module()
-
shimmer_effect_enabled = mod.setting(
"grid_shimmer_effect_enabled",
type=bool,
@@ -405,7 +404,6 @@ mg = MouseSnapNine()
class GridActions:
def grid_activate():
"""Brings up a/the grid (mouse grid or otherwise)"""
-
if mg.start():
ctx.tags = ["user.mouse_... |
Protect core config preparation function against non-existing cache
It is legal to call KCAS_IOCTL_INSERT_CORE against non-existing cache
(in try_add mode), however in that case core_id has to be provded.
Return error code in case when given cache id does not exist and core_id
is set to OCF_CORE_MAX. | @@ -1178,6 +1178,10 @@ int cache_mngt_prepare_core_cfg(struct ocf_mngt_core_config *cfg,
if (cmd_info->core_id == OCF_CORE_MAX) {
struct cache_priv *cache_priv;
+
+ if (!cache)
+ return -OCF_ERR_CACHE_NOT_EXIST;
+
cache_priv = ocf_cache_get_priv(cache);
core_id = find_free_core_id(cache_priv->core_id_bitmap);
if (core_... |
auth: Fix example code
Continuation of
The oauth2 version of authorize_redirect is no longer a coroutine, so
don't use await in example code. The oauth1 version is still a
coroutine, but one twitter example was incorrectly calling it with
yield instead of await. | @@ -634,7 +634,7 @@ class OAuth2Mixin(object):
if not new_entry:
# Call failed; perhaps missing permission?
- await self.authorize_redirect()
+ self.authorize_redirect()
return
self.finish("Posted a message!")
@@ -772,7 +772,7 @@ class TwitterMixin(OAuthMixin):
access_token=self.current_user["access_token"])
if not new... |
Add Spotify intergration colour
Added property `colour` and alias `color` which returns the Spotify
integration colour (#1db954).
Technically Discord uses both (#1cb050 and #1db954) but it appears the
former is an official Spotify colour. | @@ -25,6 +25,7 @@ DEALINGS IN THE SOFTWARE.
"""
from .enums import ActivityType, try_enum
+from .colour import Colour
import datetime
__all__ = ('Activity', 'Streaming', 'Game', 'Spotify')
@@ -456,6 +457,20 @@ class Spotify:
"""
return ActivityType.listening
+ @property
+ def colour(self):
+ """Returns the Spotify inte... |
Added Open990 to IRS 990 dataset page
Pull request suggested by Jed Sundwall. Thanks! | @@ -33,3 +33,7 @@ DataAtWork:
URL: https://projects.propublica.org/nonprofits/
AuthorName: ProPublica
AuthorURL: https://propublica.org
+ - Title: Open990
+ URL: https://www.open990.com/
+ AuthorName: 990 Consulting, LLC
+ AuthorURL: https://www.990consulting.com/
|
Addressed issues raised by Nathan and Florian
Added a comment to clarify supporting branches and cherry-picking
Added a git snippet for merging the master
clarified language from the main branch descriptions
specified where links to the travis and codacy checks can be found
fixed typo in formatting | @@ -24,10 +24,11 @@ We consider _origin/master_ to be the main branch where the source code of HEAD
* contains only reviewed code
#### The project branch
-Every project/experiment has it's own project branch, prefixed with _Proj/_. We consider the project branch to be the main branch where the source code of HEAD alway... |
apply_ban() logic refined
Refined the logic for `apply_ban()` even further to be cleaner. (Thanks, | @@ -236,26 +236,26 @@ class Infractions(InfractionScheduler, commands.Cog):
Will also remove the banned user from the Big Brother watch list if applicable.
"""
# In the case of a permanent ban, we don't need get_active_infractions to tell us if one is active
- send_msg = kwargs.get("expires_at") is None
- active_infrac... |
DOC: mitigate newton optimization not converging.
[skip azp] [skip actions] | @@ -251,7 +251,8 @@ def newton(func, x0, fprime=None, args=(), tol=1.48e-8, maxiter=50,
The above is the equivalent of solving for each value in ``(x, a)``
separately in a for-loop, just faster:
- >>> loop_res = [optimize.newton(f, x0, fprime=fder, args=(a0,))
+ >>> loop_res = [optimize.newton(f, x0, fprime=fder, args=... |
docker venv fix
* docker venv fix
Run once with --upgrade-deps
Required to ensure that setuptools is automatically upgraded
* Fix comment | @@ -30,15 +30,18 @@ fi
# This should be done on the *mounted* filesystem,
# so that the installed modules persist!
if [[ -n "$INVENTREE_PY_ENV" ]]; then
+
+ if test -d "$INVENTREE_PY_ENV"; then
+ # venv already exists
echo "Using Python virtual environment: ${INVENTREE_PY_ENV}"
- # Setup a virtual environment (within t... |
Fix datastore abnormal display with trove backup-show
According bug description, the datastore display abnormal
when use trove backup-show. The cause of the problem
is method _print_object unformatted datastore from result.
Fix by formatted datastore where necessary.
Closes-Bug: | @@ -143,6 +143,12 @@ def _print_object(obj):
obj._info['id'] = obj.id
del(obj._info['str_id'])
+ # Get datastore type and version, where necessary
+ if hasattr(obj, 'datastore'):
+ if 'type' in obj.datastore:
+ obj._info['datastore'] = obj.datastore['type']
+ obj._info['datastore_version'] = obj.datastore['version']
+
... |
Update to IGV.js 2.2.11
Update igv javascrit from 1.0.9 to 2.2.11. Addresses issue | src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<!-- IGV JS-->
- <script type="text/javascript" src="https://igv.org/web/release/1.0.9/igv-1.0.9.js"></script>
+ <script type="text/javascript" src="https://igv.org/web/release/2.2.11/dist/igv.min.js"></script>
</head>
<body>
<div cl... |
fix: Don't unlink file blindly
This made sense with the missing_ok. But now, a try-except seems
unnecessary too. Also, possibly destructive. Best to stray away from
these things. | @@ -507,7 +507,6 @@ def convert_archive_content(sql_file_path):
sql_file_path = Path(sql_file_path)
os.rename(sql_file_path, old_sql_file_path)
- sql_file_path.unlink()
sql_file_path.touch()
with open(old_sql_file_path) as r, open(sql_file_path, "a") as w:
|
update dict access
* update dict access
``` if 'header' not in options or 'Sec-WebSocket-Key' not in options['header']:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: argument of type 'NoneType' is not iterable```
* Remove extra space for linter | @@ -81,7 +81,7 @@ def _get_handshake_headers(resource, url, host, port, options):
hostport = _pack_hostname(host)
else:
hostport = "%s:%d" % (_pack_hostname(host), port)
- if "host" in options and options["host"] is not None:
+ if options.get("host"):
headers.append("Host: %s" % options["host"])
else:
headers.append("H... |
BUG: fixed bug in general unit test
Fixed a bug in the `methods.general` unit tests caused by improper cycling through dict keys. Also removed use of 'inplace' to reduce Warnings. | @@ -151,23 +151,23 @@ def remove_leading_text(inst, target=None):
for prepend_str in target:
if isinstance(inst.data, pds.DataFrame):
- inst.data.rename(columns=lambda x: x.split(prepend_str)[-1],
- inplace=True)
+ inst.data = inst.data.rename(
+ columns=lambda x: x.split(prepend_str)[-1])
else:
- map = {}
+ map_keys =... |
SUPP: Disable BigQuery explicitly in all/test_join.py
Strangely, `pytest.mark.only_on_backends` doesn't skip BigQuery, so I
added an explicit skip as a workaround.
Author: Li Jin
Closes from icexelloss/disable-test-join-bigquery and squashes the following commits:
[Li Jin] Fix comments
[Li Jin] SUPP: Disable BigQuery e... | @@ -2,7 +2,7 @@ import pandas as pd
import pytest
from pytest import param
-from ibis.tests.backends import Csv, Pandas, PySpark
+from ibis.tests.backends import BigQuery, Csv, Pandas, PySpark
# add here backends that passes join tests
all_db_join_supported = [Pandas, PySpark]
@@ -30,8 +30,9 @@ all_db_join_supported = ... |
Fix inverted confusion_matrix axis
confusion_matrix accepts two arrays, but the first one should be the true value, the second one should be the predictions made to be compared. It was inverted right here. | @@ -48,8 +48,8 @@ class ConfusionMatrix:
self.idx2label = {idx: str(label) for idx, label in
enumerate(np.unique(
[self.predictions, self.conditions]))}
- self.cm = confusion_matrix(self.predictions,
- self.conditions,
+ self.cm = confusion_matrix(self.conditions,
+ self.predictions,
labels=labels,
sample_weight=sample... |
Fix - added json support to all resources
encode method was missing for WebpublishRestApiResource | @@ -38,18 +38,11 @@ class WebpublishApiEndpoint(ResourceRestApiEndpoint):
return self.resource.dbcon
-class RestApiResource:
- """Resource carrying needed info and Avalon DB connection for publish."""
- def __init__(self, server_manager, executable, upload_dir,
- studio_task_queue=None):
- self.server_manager = server_... |
[JIT] Optimize before inlining
Summary:
This speeds up the inlining pass of FairSeq model from 180s -> 13s.
Pull Request resolved: | #include <torch/csrc/jit/api/function_impl.h>
-#include <torch/csrc/jit/passes/inliner.h>
-
#include <torch/csrc/jit/frontend/error_report.h>
+#include <torch/csrc/jit/passes/inliner.h>
+#include <torch/csrc/jit/passes/peephole.h>
+#include "torch/csrc/jit/passes/constant_propagation.h"
namespace torch {
namespace jit ... |
IOS: add support for VRF for get_arp_table func
Simply takes into account the vrf function arg and exec
the expected ios command. | @@ -2175,12 +2175,12 @@ class IOSDriver(NetworkDriver):
]
"""
if vrf:
- msg = "VRF support has not been added for this getter on this platform."
- raise NotImplementedError(msg)
+ command = 'show arp vrf {} | exclude Incomplete'.format(vrf)
+ else:
+ command = 'show arp | exclude Incomplete'
arp_table = []
- command = ... |
Only install PyQt5 when it cannot be imported to prevent double
installation under conda. | @@ -12,8 +12,23 @@ with open('README_PYPI.md', encoding='utf-8') as f:
# version_nr contains ... well ... the version in the form __version__ = '0.1b10'
version_nr = {}
-with open("pyfda/version.py", encoding='utf-8') as fp:
- exec(fp.read(), version_nr)
+with open("pyfda/version.py", encoding='utf-8') as f_v:
+ exec(f... |
Update phishing.txt
```.zip``` files contain PHP-based distros of phishing tools. Not a malware as well, so let it be detected by ```phishing``` trail. | phish-education.apwg.org
csd.link
frog.wix.ru
+
+# Reference: https://twitter.com/malwrhunterteam/status/1031899551542591490
+
+avataarhornefashion.com
+chinaspacplus.com
+
+# Reference: https://twitter.com/malwrhunterteam/status/1031901896234033153
+
+ytvertkn.tk
|
Adds advancedOptions argument to do_std_practice_gst(...)
Allows more advanced usage of `do_std_practice_gst`, making it
much more flexible with the addition of a single argument. | @@ -621,7 +621,7 @@ def do_long_sequence_gst_base(dataFilenameOrSet, targetGateFilenameOrSet,
def do_stdpractice_gst(dataFilenameOrSet,targetGateFilenameOrSet,
prepStrsListOrFilename, effectStrsListOrFilename,
germsListOrFilename, maxLengths, modes="TP,CPTP,Target",
- comm=None, memLimit=None, verbosity=2):
+ comm=None... |
Window resizeable argument change
Resizeable argument was having no impact on MainWindow whether set True or False. This allows for fixed window on mainwindow creation. | @@ -41,9 +41,12 @@ class Window:
self.native = WinForms.Form(self)
self.native.ClientSize = Size(*self.interface._size)
self.native.interface = self.interface
- self.native.Resize += self.winforms_resize
self.toolbar_native = None
self.toolbar_items = None
+ if not self.native.interface.resizeable:
+ self.native.FormBo... |
Infraction Date Humanization
Changed to use the format `"%Y-%m-%d %H:%M"`, which will turn out looking like `2019-09-18 13:59` | @@ -1260,11 +1260,11 @@ class Moderation(Scheduler, Cog):
active = infraction_object["active"]
user_id = infraction_object["user"]
hidden = infraction_object["hidden"]
- created = datetime.fromisoformat(infraction_object["inserted_at"].strftime("%c"))
+ created = datetime.fromisoformat(infraction_object["inserted_at"].... |
Fixes bug in cloud-noise model creation so "S" and "D" paramroots work correctly.
Adds logic needed to make the ham_basis and/or other_basis None when
the corresponding types of error generators are not in the model as
described by `paramroot`. | @@ -940,8 +940,13 @@ def _get_lindblad_factory(simulator, parameterization, errcomp_type, sparse_lind
if parameterization == "CPTP": p = "GLND"
elif "S" in parameterization: p = parameterization.replace("S", "s")
elif "D" in parameterization: p = parameterization.replace("D", "d")
- _, evotype, nonham_mode, param_mode ... |
Fixed a bug, where the last chunk was treated as a partial chunk and
written out a second time to a different file at the end of the loop. | @@ -137,7 +137,6 @@ def process_gromacs_xtc(queue, processname, totframes, fchunksize, totalchunks,
chunkcount = starting_chunk + 1 # Offset the chunkcount by 1
lastchunksize = totframes - (totalchunks * fchunksize)
outAL = []
- addzero = ""
for curframe in range(first_frame, last_frame):
j = last_frame - curframe
mdt[... |
[ROCm] Enable wrongly skipped tests on CPU on ROCm
Summary:
`skipIfRocm` skips the test on ROCm regardless of device type [CPU or GPU]. `skipCUDAIfRocm` skips only on GPU on ROCm and runs the test on CPU.
ezyang iotamudelta
Pull Request resolved: | @@ -9373,7 +9373,7 @@ class TestNNDeviceType(NNTestCase):
grad_input, = torch.autograd.grad(output, input, create_graph=True)
grad_input.sum().backward()
- @skipIfRocm
+ @skipCUDAIfRocm
@largeCUDATensorTest('12GB')
def test_conv_large_nosplit(self, device):
# Here we just test the convolution correctly route to the fal... |
send wakeup chars to wake sleeping devices before talking to them
per | @@ -52,6 +52,7 @@ import google.protobuf.json_format
import serial
import threading
import logging
+import time
import sys
import traceback
from . import mesh_pb2
@@ -347,9 +348,17 @@ class StreamInterface(MeshInterface):
self.stream = serial.Serial(
devPath, 921600, exclusive=True, timeout=0.5)
self._rxThread = thread... |
qEI bugfix to use objective for computing incumbent best
Summary:
The get_acquisition was using f to compute the current best rather than objective(f).
This also fixes the seed as discussed. | @@ -59,7 +59,7 @@ def get_acquisition_function(
if acquisition_function_name == "qEI":
return qExpectedImprovement(
model=model,
- best_f=model.posterior(X_observed).mean.max().item(),
+ best_f=objective(model.posterior(X_observed).mean).max().item(),
objective=objective,
constraints=constraints,
X_pending=X_pending,
@... |
Sync tests: test _get_confirmation_result for small diffs
Should always return True and the given message if the diff size is too
small. | @@ -351,3 +351,22 @@ class SyncerSyncTests(unittest.TestCase):
self.syncer._get_confirmation_result.assert_called_once()
self.assertEqual(self.syncer._get_confirmation_result.call_args[0][1], author)
self.assertEqual(self.syncer._get_confirmation_result.call_args[0][2], message)
+
+ def test_confirmation_result_small_d... |
Adds the universe repository to the used sources
This change is required, to support Ubuntu Server 18.04.01, which by default doesn't ship with universe. Universe contains python3-venv which is needed for tljh | @@ -66,6 +66,7 @@ def main():
else:
logger.info('Setting up hub environment')
initial_setup = True
+ subprocess.check_output(['add-apt-repository', 'universe'], stderr=subprocess.STDOUT)
subprocess.check_output(['apt-get', 'update', '--yes'], stderr=subprocess.STDOUT)
subprocess.check_output(['apt-get', 'install', '--y... |
[p4a] Check if p4a.fork/p4a.branch changed...
and if so, remove the old p4a installation so the new one can be installed | @@ -32,7 +32,7 @@ from buildozer.target import Target
from os import environ
from os.path import exists, join, realpath, expanduser, basename, relpath
from platform import architecture
-from shutil import copyfile
+from shutil import copyfile, rmtree
from glob import glob
from buildozer.libs.version import parse
@@ -63... |
instruments/energy_measurments: Improve instrument description
Add note to users that all configuration for the backends should be
added through this instrument rather than directly. | @@ -366,6 +366,9 @@ class EnergyMeasurement(Instrument):
description = """
This instrument is designed to be used as an interface to the various
energy measurement instruments located in devlib.
+
+ This instrument should be used to provide configuration for any of the
+ Energy Instrument Backends rather than specifyin... |
Changed link for document.cookie blacklist
Link was not working due to use of period in title. | @@ -54,7 +54,7 @@ Cross-site scripting (XSS) is a type of computer security vulnerability typicall
- [Bypass space filter](#bypass-space-filter)
- [Bypass email filter](#bypass-email-filter)
- [Bypass document blacklist](#bypass-document-blacklist)
- - [Bypass document.cookie blacklist](#bypass-document.cookie-blacklis... |
Add design decision for resource peoprety renaming
Closes | @@ -16,5 +16,22 @@ It is intended as a reference.
in the same zone. By requiring the zone across the board, it is less likely to
lead to a miss match. (Related to 63_.)
+- **Name property updates will result in cloud-dependent code.**
+
+ Some providers (e.g., GCE, Azure) do not allow names of resources to be
+ changed... |
adding a line space
adding a line space, should be double | @@ -6,6 +6,7 @@ import re
from timesketch.lib.analyzers import interface
from timesketch.lib.analyzers import manager
+
class WinCrashSketchPlugin(interface.BaseSketchAnalyzer):
"""Sketch analyzer for Windows application crashes."""
@@ -191,4 +192,5 @@ class WinCrashSketchPlugin(interface.BaseSketchAnalyzer):
's' if le... |
doc: Update sections example.
Modify documention and example to better explain sections | @@ -437,20 +437,19 @@ Sections
--------
It is a common requirement to be able to run the same set of workloads under
-different device configurations. E.g. you may want to investigate impact of
+different device configurations. E.g. you may want to investigate the impact of
changing a particular setting to different va... |
Update elf_mirai.txt
Trivial update, because basicly we detect so-called ```Echobot``` for a long-long time ago. :) | @@ -3859,6 +3859,7 @@ senpai.site
/tnx12015.sh
# Reference: https://blog.trendmicro.com/trendlabs-security-intelligence/bashlite-iot-malware-updated-with-mining-and-backdoor-commands-targets-wemo-devices/
+# Reference: https://blogs.akamai.com/sitr/2019/06/latest-echobot-26-infection-vectors.html
/ECHOBOT.arc
/ECHOBOT.... |
increase the timeout between sending take question api calls to a minute
this was bombarding the backend with calls every second as a user was typing, which in turn would update the database, and reindex the question in elastic | }
}
- $('#id_content').on('keyup', _.throttle(takeQuestion, 1000));
+ $('#id_content').on('keyup', _.throttle(takeQuestion, 60000));
$(document).on('click', '#details-edit', function(ev) {
ev.preventDefault();
|
Fix random state generator
Answers
Authors:
- Victor Lafargue (https://github.com/viclafargue)
Approvers:
- Divye Gala (https://github.com/divyegala)
- John Zedlewski (https://github.com/JohnZed)
URL: | -# Copyright (c) 2020, NVIDIA CORPORATION.
+# Copyright (c) 2020-2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -25,16 +25,9 @@ def _create_rs_generator(random_state):
The random_state from which the CuP... |
flip_update_test
binary image must be covered when depug=plot | @@ -882,12 +882,14 @@ def test_plantcv_flip():
pcv.params.debug_outdir = cache_dir
# Read in test data
img = cv2.imread(os.path.join(TEST_DATA, TEST_INPUT_COLOR))
+ img_binary = cv2.imread(os.path.join(TEST_DATA, TEST_INPUT_BINARY))
# Test with debug = "print"
pcv.params.debug = "print"
_ = pcv.flip(img=img, direction=... |
updates snakemake to handle bug in groups processing
reference: | @@ -13,7 +13,7 @@ config = default_config
# minimum required snakemake version
-min_version("5.1.3")
+min_version("5.2.2")
def get_conda_envs_dir():
if config.get("yaml_dir"):
@@ -160,9 +160,6 @@ elif config.get("workflow", "complete") == "complete":
if config.get("perform_genome_binning", True):
# later update to incl... |
docs(ruby): update the list of GCP environments in AUTHENTICATION.md
pr | @@ -41,7 +41,7 @@ code.
1. Specify project ID in method arguments
2. Specify project ID in configuration
3. Discover project ID in environment variables
-4. Discover GCE project ID
+4. Discover GCP project ID
5. Discover project ID in credentials JSON
**Credentials** are discovered in the following order:
@@ -51,36 +51... |
Update .readthedocs.yml
Python 3.8 is still not supported by read the docs (https://github.com/readthedocs/readthedocs.org/issues/6324), so reverting the change to 3.7 as this also fails. We need to wait for rtd to add support for us. | @@ -9,8 +9,7 @@ sphinx:
formats: all
python:
- # TODO: Move to 3.8 when supported by rtd https://github.com/readthedocs/readthedocs.org/issues/6324
- version: 3.7
+ version: 3.8
install:
- method: pip
path: .
|
Update dace/codegen/targets/rtl.py
Implemented suggestion to remove unnecessary comment by definelicht | @@ -488,7 +488,7 @@ model->s_axis_{name}_tdata = {name}[0];'''
elif isinstance(arr, data.Stream):
buses[edge.dst_conn] = (edge.data.data, False, total_size, vec_len, edge.data.volume)
elif isinstance(arr, data.Scalar):
- scalars[edge.dst_conn] = (False, total_size) #(edge.data.data, False, total_size, 1, edge.data.volu... |
flake8: run the workflow conditionally
We don't need to run flake8 on ansible modules and their tests if we
don't have any modifitions. | name: flake8
-on: [pull_request]
+on:
+ pull_request:
+ paths:
+ - 'library/**.py'
+ - 'tests/conftest.py'
+ - 'tests/library/**.py'
+ - 'tests/functional/tests/**.py'
jobs:
build:
runs-on: ubuntu-latest
|
ref(RemoteContentFEhandling):
added remote content check to Available channels page | import ChannelTokenModal from './ChannelTokenModal';
import ChannelUpdateModal from './ChannelUpdateModal';
import { getFreeSpaceOnServer } from './api';
+ import plugin_data from 'plugin_data';
export default {
name: 'AvailableChannelsPage',
freeSpace: null,
disableBottomBar: false,
disableModal: false,
+ remoteConten... |
STY: reduce number of unused lines in unit tests
Simplified unit tests to reduce number of unused lines. | @@ -285,12 +285,13 @@ class TestBasics():
"""Test successful clearance of custom functions
"""
def custom1(inst, imult, out_units='hours'):
- out = (inst.data.mlt * imult).values
- return {'data': out, 'long_name': 'doubleMLTlong',
+ return {'data': (inst.data.mlt * imult).values,
+ 'long_name': 'doubleMLTlong',
'units... |
Add CephOSD service to roles/Standalone.yaml
Closes-Bug: | - OS::TripleO::Services::CephMon
- OS::TripleO::Services::CephRbdMirror
- OS::TripleO::Services::CephRgw
+ - OS::TripleO::Services::CephOSD
- OS::TripleO::Services::CertmongerUser
- OS::TripleO::Services::CinderApi
- OS::TripleO::Services::CinderBackendDellEMCUnity
|
update hivealerter
Add the possibility to use rule and match fileds in the description of TheHive alert | ## Other changes
- Upgrade stomp 8.0.0 to 8.0.1 - [#832](https://github.com/jertel/elastalert2/pull/832) - @jertel
- Add support for Kibana 8.2 for Kibana Discover, Upgrade Pytest 7.1.1 to 7.1.2, Upgrade pylint 2.13.5 to 2.13.8, Upgrade Jinja2 3.1.1 to 3.1.2 - [#840](https://github.com/jertel/elastalert2/pull/840) - @n... |
fix: change reference to master branch
In response to review on PR eth-brownie/brownie#917. | @@ -598,7 +598,9 @@ def from_brownie_mix(
print(f"Downloading from {url}...")
_stream_download(url, str(project_path.parent))
- project_path.parent.joinpath(project_name + "-mix-master").rename(project_path)
+ project_path.parent.joinpath(project_name + "-mix-{}".format(default_branch)).rename(
+ project_path
+ )
_crea... |
vscode command palette jupyter commands
vscode command ids for jupiter have changed. This updates the jupyter
commands in vscode.talon to the new commands. fixes | @@ -249,10 +249,10 @@ select word: user.vscode("editor.action.addSelectionToNextFindMatch")
skip word: user.vscode("editor.action.moveSelectionToNextFindMatch")
# jupyter
-cell next: user.vscode("jupyter.gotoNextCellInFile")
-cell last: user.vscode("jupyter.gotoPrevCellInFile")
-cell run above: user.vscode("jupyter.run... |
Fix implicit bug in _AudioLabelDataset
Add type checking before calling .split(). The old code will break if the input is a list of strings, which happens when using multiple manifests. | @@ -214,7 +214,7 @@ target_label_0, "offset": offset_in_sec_0}
{"audio_filepath": "/path/to/audio_wav_n.wav", "duration": time_in_sec_n, "label": \
target_label_n, "offset": offset_in_sec_n}
Args:
- manifest_filepath (str): Dataset parameter. Path to JSON containing data.
+ manifest_filepath (Union[str, List[str]]): Da... |
Fix documentation of KMeans
Just a small fix of duplicates in KMeans doc.
Authors:
- Micka (@lowener)
Approvers:
- Dante Gama Dessavre (@dantegd)
URL: | @@ -211,12 +211,7 @@ class KMeans(Base,
Number of instances the k-means algorithm will be called with different seeds.
The final results will be from the instance that produces lowest inertia out
of n_init instances.
- oversampling_factor : float64
- scalable k-means|| oversampling factor
- max_samples_per_batch : int ... |
ebuild.ebd: pkg_pretend: use base build tempdir for $T and disable writing env to it
To avoid create temp pkg dirs in it or writing anything to it during
pkg_pretend() as defined in the spec.
Decreases overall runtime for threaded sanity checks against large
package sets a significant amount. | @@ -889,22 +889,22 @@ class ebuild_operations(object):
commands = None
if not pkg.built:
commands = {"request_inherit": partial(inherit_handler, self._eclass_cache)}
+
+ # Use base build tempdir for $T instead of full pkg specific path to
+ # avoid having to create/remove directories -- pkg_pretend isn't
+ # allowed to... |
Update Michigan.md
Closes
Closes | @@ -240,8 +240,35 @@ id: mi-kalamazoo-2
**Links**
-* WOODTV8 live crew: https://streamable.com/xvlky1
-* Kalamazoo Gazette via Facebook Live: https://streamable.com/0wfiu3
-* MLive article: https://www.mlive.com/news/kalamazoo/2020/06/my-heart-was-wrenched-with-pain-assistant-chief-says-of-ordering-tear-gas-on-proteste... |
BUG: fixed instruments iteration test
Fixed bug introduced by testing for any item that
that is iterable. Also simplified kwarg names and
added more comments. | """
import importlib
+import numpy as np
class Constellation(object):
@@ -14,7 +15,7 @@ class Constellation(object):
Parameters
----------
- constellation_module : string
+ const_module : string
Name of a pysat constellation module
instruments : list-like
A list of pysat Instruments to include in the Constellation
@@ -... |
deps: upgrade upstream requirements.txt package versions
These outdated packages were preventing the upstream image from
starting correctly. | @@ -82,7 +82,7 @@ Pillow==8.3.2
ply==3.11
prometheus-client==0.7.1
protobuf==3.12.2
-psutil==5.6.7
+psutil==5.9.0
psycopg2-binary==2.8.4
pyasn1==0.4.8
pyasn1-modules==0.2.8
@@ -94,7 +94,7 @@ PyMySQL==0.9.3
pyOpenSSL==19.1.0
pyparsing==2.4.6
PyPDF2==1.26.0
-pyrsistent==0.15.7
+pyrsistent==0.18.1
python-dateutil==2.8.1
p... |
Change "Couch" to "Couch/SQL" in doc_in_es
I keep getting tripped up by the label "Couch Doc" and then remember it
actually means Couch or SQL. Small change to the text should make this
clearer and match reality. | </form>
<br>
<div class="alert alert-warning">
- Hey there! This page is primarily for comparing documents in elasticsearch and couch.
+ Hey there! This page is primarily for comparing documents in elasticsearch and couch/sql.
Are you sure you don't want
<a href="{% url "raw_couch" %}?id={{ doc_id }}">raw_couch</a>?
</... |
[ml-release][no_ci] Do not output progress bar for air tf benchmark.
Release test log is highly polluted by pyramid shaped progress bar in remote actors. | @@ -82,6 +82,7 @@ def train_func(use_ray: bool, config: dict):
epochs=epochs,
steps_per_epoch=steps_per_epoch,
callbacks=callbacks,
+ verbose=2, # Disables progress bar in remote actors.
)
results = history.history
loss = results["loss"][-1]
|
Re-arrange for clarity
to make it clear that the comment about the log domain specificity applies to the 'defaults write' command and not the 'notifyutil' command. | @@ -52,14 +52,14 @@ To enable complete protocol logging, open Terminal and run the command:
defaults write -g CalLogSimpleConfiguration -array com.apple.calendar.store.log.caldav.http
+The debug logging domains are specified using a reverse-dns style hierarchy, so to enable all Calendar logging (includes logging of acc... |
More WIP dependabot changelog CI
Fixes a typo in and allows the workflow to trigger on `reopen`
for easier debugging. | @@ -3,6 +3,7 @@ on:
pull_request:
types:
- opened
+ - reopened
permissions:
# Needed to be able to push the commit. See
@@ -11,7 +12,7 @@ permissions:
contents: write
# The pull_requests "synchronize" event doesn't seem to fire with just `contents: write`, so
# CI doesn't run with the new changelog. Maybe `pull_request... |
Update OracleSQL Injection.md
missing 'T' in the SELECT in the Oracle blind SQLI section | @@ -68,8 +68,8 @@ SELECT owner, table_name FROM all_tab_columns WHERE column_name LIKE '%PASS%';
| Version is 12.2 | SELECT COUNT(*) FROM v$version WHERE banner LIKE 'Oracle%12.2%'; |
| Subselect is enabled | SELECT 1 FROM dual WHERE 1=(SELECT 1 FROM dual) |
| Table log_table exists | SELECT 1 FROM dual WHERE 1=(SELECT... |
Fix spelling
HG--
branch : feature/microservices | @@ -322,7 +322,7 @@ class MetricsCheck(DiscoveryCheck):
else:
m["abs_value"] = m["value"] * m["scale"]
self.logger.debug(
- "[%s] Measured value: %s. Scale: %s. Resuling value: %s",
+ "[%s] Measured value: %s. Scale: %s. Resulting value: %s",
key, m["value"], m["scale"], m["abs_value"]
)
# Schedule batch
|
Update hosts.origin.example
Changing sample config from:
#openshift_metrics_hawkular_hostname=https://hawkular-metrics.example.com/hawkular/metrics
To:
#openshift_metrics_hawkular_hostname=hawkular-metrics.example.com
Reason:
When i set my inventory with [openshift_metrics_hawkular_hostname=https://metrics.MYDOMAIN.com... | @@ -539,7 +539,7 @@ openshift_master_identity_providers=[{'name': 'htpasswd_auth', 'login': 'true',
# Defaults to https://hawkular-metrics.{{openshift_master_default_subdomain}}/hawkular/metrics
# Currently, you may only alter the hostname portion of the url, alterting the
# `/hawkular/metrics` path will break installa... |
[IMPR] Simplify report() method
The method never runs into the while loop but break always the loop.
Return from the method instead exit the loop. | @@ -591,7 +591,7 @@ class checkImagesBot(object):
"""Function to make the reports easier."""
self.image_to_report = image_to_report
self.newtext = newtext
- self.head = head or u''
+ self.head = head or ''
self.notification = notification
self.notification2 = notification2
@@ -603,34 +603,24 @@ class checkImagesBot(obj... |
Update tests.py
add onto testing to cover new lines of code | @@ -4547,10 +4547,10 @@ def test_plantcv_hyperspectral_analyze_spectral():
mask = cv2.imread(os.path.join(HYPERSPECTRAL_TEST_DATA, HYPERSPECTRAL_MASK), -1)
array_data = pcv.hyperspectral.read_data(filename=spectral_filename)
pcv.params.debug = "plot"
- _ = pcv.hyperspectral.analyze_spectral(array=array_data, mask=mask,... |
Typo in README.md
just a small typo fix | @@ -39,4 +39,4 @@ Here are some ideas I work or want to work on when I have time. If you want to c
- Add statistics and visualisations as in [atlas_analyze](https://github.com/metagenome-atlas/atlas_analyze)
- Implementation of most rules as snakemake wrapper
- Cloud execution
-- Update to new nakemake version and use ... |
zulip_tools.py: Add `GENERIC_CACHE_SCRIPT_PARSER`.
This parser will act as a parent parser for all the cache cleaning scripts. | #!/usr/bin/env python3
from __future__ import print_function
+import argparse
import datetime
import errno
import logging
@@ -34,6 +35,19 @@ BLUE = '\x1b[34m'
MAGENTA = '\x1b[35m'
CYAN = '\x1b[36m'
+# Parent parser for cache cleaning scripts.
+GENERIC_CACHE_SCRIPT_PARSER = argparse.ArgumentParser(add_help=False)
+GENER... |
Fix tracing docs and add more comprehensive examples
Summary:
Fixes
Pull Request resolved: | @@ -1373,11 +1373,12 @@ if _enabled:
**Tracing:**
- Using ``torch.jit.trace``, you can turn an existing module or Python
- function into a TorchScript program. You must provide example inputs,
- and we run the function, recording the operations performed on all the tensors. We turn the resulting recording
- into a Torc... |
Fix missing saltenv and pillarenv in pillar.item
Fixes | @@ -373,10 +373,16 @@ def item(*args, **kwargs):
ret = {}
default = kwargs.get('default', '')
delimiter = kwargs.get('delimiter', DEFAULT_TARGET_DELIM)
+ pillarenv = kwargs.get('pillarenv', None)
+ saltenv = kwargs.get('saltenv', None)
+
+ pillar_dict = __pillar__ \
+ if all(x is None for x in (saltenv, pillarenv)) \
+... |
Working fix for one of the bullet points.
Thanks Pirate. | @@ -15,7 +15,7 @@ for Discord.
- Modern Pythonic API using ``async``\/``await`` syntax
- Sane rate limit handling that prevents 429s
-- Implements the entirety of the Discord API
+- Implements the entire Discord API
- Command extension to aid with bot creation
- Easy to use with an object oriented design
- Optimised fo... |
Fix chapter range selection
Fix chapter range selection | @@ -392,7 +392,7 @@ class MessageHandler:
def resolve_chapter(name):
cid = 0
if name.isdigit():
- cid = int(str)
+ cid = int(name)
else:
cid = self.app.crawler.get_chapter_index_of(name)
# end if
|
Support dict of links in pagination detection
Some responses, e.g. by keystone
(http://git.openstack.org/cgit/openstack/keystone/tree/api-ref/source/v3/samples/admin/groups-list-response.json?h=stable/rocky#n2)
contain a dict in the `links` key. We convert such a dict to a list of
dicts, because that's the format we ex... | @@ -1369,6 +1369,9 @@ class Resource(dict):
pagination_key = '{key}_links'.format(key=cls.resources_key)
if pagination_key:
links = data.get(pagination_key, {})
+ # keystone might return a dict
+ if isinstance(links, dict):
+ links = ({k: v} for k, v in six.iteritems(links))
for item in links:
if item.get('rel') == 'ne... |
Update edf.py
Making ch_offsets variable an int64 (instead of int32) which prevents int overflow in Windows. | @@ -247,7 +247,7 @@ class RawEDF(BaseRaw):
this_sel = orig_sel[idx]
# We could read this one EDF block at a time, which would be this:
- ch_offsets = np.cumsum(np.concatenate([[0], n_samps]))
+ ch_offsets = np.cumsum(np.concatenate([[0], n_samps]), dtype=np.int64)
block_start_idx, r_lims, d_lims = _blk_read_lims(start,... |
[Datasets] [Docs] Improve `.limit()` and `.take()` docstrings
Improve docstrings for .limit() and .take(), making the distinction more clear. | @@ -1744,7 +1744,11 @@ class Dataset(Generic[T]):
return Dataset(plan, self._epoch, self._lazy)
def limit(self, limit: int) -> "Dataset[T]":
- """Limit the dataset to the first number of records specified.
+ """Truncate the dataset to the first ``limit`` records.
+
+ Contrary to :meth`.take`, this will not move any dat... |
Update script.py
Handle non utf-8 characters during decoding for %%bash | @@ -210,7 +210,7 @@ def in_thread(coro):
async def _handle_stream(stream, stream_arg, file_object):
while True:
- line = (await stream.readline()).decode("utf8")
+ line = (await stream.readline()).decode("utf8", errors="replace")
if not line:
break
if stream_arg:
|
Remove debug check
Remove debug check, would fail if the image name happens to be "debug" | @@ -145,7 +145,7 @@ parser_run.add_argument("command", help="command to run within container", nargs
def run(args):
register_docker_subcommand("run")
acifile = get_aci_fname(args.image)
- if not acifile and args.image != "debug":
+ if not acifile:
pull(parser_pull.parse_args([args.image]))
acifile = get_aci_fname(args.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.