message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
llvm/cuda: Clarify handling of kernel parameters
Remove duplicate is_comp_run checks | @@ -392,10 +392,11 @@ def _gen_cuda_kernel_wrapper_module(function):
# Runs need special handling. data_in and data_out are one dimensional,
# but hold entries for all parallel invocations.
+ # comp_state, comp_params, comp_data, comp_in, comp_out, #trials, #inputs
is_comp_run = len(args) == 7
if is_comp_run:
- runs_co... |
Bug fix
records.values() was consuming the response, resulting in nothing
to return. Changed to records.peek(). | @@ -37,7 +37,7 @@ class NeoTransformer(Transformer):
with self.driver.session() as session:
for i in itertools.count(1):
records = session.read_transaction(query, pageSize=size, pageNumber=i)
- if len(records.values()) > 0:
+ if records.peek() != None:
yield records
else:
return
@@ -72,7 +72,6 @@ class NeoTransformer(T... |
Update verifier.yml
instead of "goss", us the (variable) "{{ goss_dst }}" which can always be found. Solves | register: test_files
- name: Execute Goss tests
- command: "goss -g {{ item }} validate --format {{ goss_format }}"
+ command: "{{ goss_dst }} -g {{ item }} validate --format {{ goss_format }}"
register: test_results
with_items: "{{ test_files.stdout_lines }}"
ignore_errors: true
|
workloads/hackbench: fixes
Only install/uninstall the executable once per run
Add results file as a raw artifact | @@ -18,6 +18,7 @@ import os
import re
from wa import Workload, Parameter, Executable
+from wa.utils.exec_control import once
timeout_buffer = 10
@@ -58,32 +59,38 @@ class Hackbench(Workload):
binary_name = 'hackbench'
- def setup(self, context):
- self.command = '{} -s {} -g {} -l {} {} > {}'
- self.target_binary = Non... |
Adding troubleshooting for docker timeout
Reference:
I split troubleshooting into performance and fetch sections. | @@ -27,7 +27,10 @@ This integration was integrated and tested with version 7.3.2 of QRadar.
4. Click **Test** to validate the URLs, token, and connection.
-## Troubleshooting Performance Issues
+## Troubleshooting
+This section provides information for troubleshooting performance and fetching issues.
+
+### Performance... |
Update tests/test_decompositions.py
ensures that the unittest method uses the SF test suite default tolerance. | @@ -143,7 +143,7 @@ class DecompositionsModule(BaseTest):
for i in new_tlist:
U_rec=dec.T(*i) @ U_rec
U_rec = np.diag(new_diags) @ U_rec
- self.assertAlmostEqual(np.linalg.norm(U_rec-U), 0)
+ self.assertAlmostEqual(np.linalg.norm(U_rec-U), 0, delta=self.tol)
def test_williamson_BM_random_circuit(self):
|
Minor: don't reinvent mapcat
Reuse funcy's one | @@ -920,16 +920,13 @@ class ResolvedExpression(object):
:rtype: list[ResolvedExpression]
"""
- def mapcat(seq, map_fn):
- return sum([map_fn(v) for v in seq], [])
-
def explore(values):
if values is None:
return []
elif isinstance(values, list):
- return mapcat(values, explore)
+ return funcy.mapcat(explore, values)
el... |
Fixed pathing
Fixed pathing to venv and
requirements.txt files. | @@ -62,7 +62,6 @@ jobs:
- name: Install Python Dependencies
run: |
- cd bin/docker_detection_tester
python -m venv .venv
source .venv/bin/activate
python -m pip install wheel
@@ -70,8 +69,8 @@ jobs:
- name: Run the CI
run: |
- cd bin/docker_detection_tester
source .venv/bin/activate
+ cd bin/docker_detection_tester
ech... |
Update auth.py
bcrypt.hashpw needs encoded string | @@ -29,7 +29,7 @@ def confirm_password(attempt, password_hash):
attempt: the password attempt
password_hash: the real password pash
"""
- return bcrypt.hashpw(attempt, password_hash) == password_hash
+ return bcrypt.hashpw(attempt.encode('utf-8'), password_hash) == password_hash
@log_action
def login(username, password... |
qt bump fee: rename "Final" checkbox to "Keep Replace-By-Fee enabled"
Now that the checkbox is hidden behind an advanced option, there is
no need to be brief about it, better to be explicit.
(terminology unchanged for kivy.) | @@ -115,20 +115,21 @@ class _BaseRBFDialog(WindowModalDialog):
vbox.addWidget(adv_widget)
def _add_advanced_options(self, adv_vbox: QVBoxLayout) -> None:
- self.cb_is_final = QCheckBox(_('Final'))
- adv_vbox.addWidget(self.cb_is_final)
+ self.cb_rbf = QCheckBox(_('Keep Replace-By-Fee enabled'))
+ self.cb_rbf.setChecked... |
[bugfix] Use collections.abc.Mapping for MonthNames class
typing.Mapping has not items() method in Python 3.5.0 | import calendar
import datetime
import re
-from collections import defaultdict
-from collections.abc import MutableMapping
+
+from collections import abc, defaultdict
from contextlib import suppress
from functools import singledispatch
from string import digits as _decimalDigits # noqa: N812
@@ -553,7 +553,7 @@ def _ma... |
visitors (CGen): except -> except AttributeError
Also docs fixes | @@ -128,7 +128,7 @@ class CGen(Visitor):
"""
def _args_decl(self, args):
- """Convert an iterable of :class:`Argument` into cgen format."""
+ """Generate cgen declarations from an iterable of symbols and expressions."""
ret = []
for i in args:
if i.is_Object:
@@ -145,10 +145,8 @@ class CGen(Visitor):
return ret
def _ar... |
doc: BFV instances and IsolatedHostsFilter
Since BFV instances don't have a specific image attached to them, the
filter will consider them as not having a specific image, hence not
isolated. Correcting the doc. | @@ -508,6 +508,12 @@ isolated hosts, and the isolated hosts can only run isolated images. The flag
``restrict_isolated_hosts_to_isolated_images`` can be used to force isolated
hosts to only run isolated images.
+The logic within the filter depends on the
+``restrict_isolated_hosts_to_isolated_images`` config option, wh... |
Style <pre> tag backgrounds the same as <code>.
This makes it consistent with the django-wiki version of the code
blocks, which looks neater. | .breadcrumb-section {
padding: 1rem;
}
+
+pre {
+ /*
+ * Style it the same as the <code> tag, since highlight.js does not style
+ * backgrounds of <pre> tags but bulma does, resulting in a weird off-white
+ * border.
+ */
+ background-color: #282c34;
+}
|
Pin pandas to < 1.1.0
pandas 1.1.0 has breaking changes to its styling code. We're temporarily pinning to < 1.1.0, and have an open issue to fix this here: | @@ -37,7 +37,10 @@ click = ">=7.0"
enum-compat = "*"
numpy = "*"
packaging = "*"
-pandas = ">=0.21.0"
+# pandas 1.1.0 has breaking changes to its styling code. We're temporarily
+# pinning to < 1.1.0, and have an open issue to fix this here:
+# https://github.com/streamlit/streamlit/issues/1777
+pandas = ">=0.21.0, <1.... |
Changes for NDK23
The arch no longer used in url for NDK23+ | @@ -474,12 +474,13 @@ class TargetAndroid(Target):
ext = 'tar.bz2'
else:
ext = 'zip'
- archive = 'android-ndk-r{0}-' + _platform + '-{1}.' + ext
+ archive = 'android-ndk-r{0}-' + _platform + '{1}.' + ext
is_64 = (os.uname()[4] == 'x86_64')
else:
raise SystemError('Unsupported platform: {}'.format(platform))
architectur... |
Remove out of date note.
The note about DdApiKey is mandatory is out of date and should be removed. | @@ -55,7 +55,7 @@ Datadog recommends creating two separate Terraform configurations:
Separating the configurations of the API key and the forwarder means that you don't need to provide the Datadog API key when updating the forwarder.
-**Note:** The `DdApiKey` parameter is required by the CloudFormation template, so you... |
Fixes for optional slit operation
partial (?) fix for github issue
- fixes an issue where the code was trying to update the GUI when the
GUI was not yet built | @@ -415,7 +415,7 @@ class Cuts(GingaPlugin.LocalPlugin):
self.select_cut(tag)
if tag == self._new_cut:
self.save_cuts.set_enabled(False)
- if self.use_slit:
+ if self.use_slit and self.gui_up:
self.save_slit.set_enabled(False)
# plot cleared in replot_all() if no more cuts
self.replot_all()
@@ -428,7 +428,7 @@ class Cu... |
fix Utils.encode_bytes
No one has encountered this yet, but there was a bug in encode_bytes if
ProcHelper.__init__ is called with an input string (that needs to be
fixed too.) | @@ -12,7 +12,7 @@ def decode_bytes(s):
def encode_bytes(s):
- return s or s.replace('\n', os.linesep).encode('utf-8') if s is not None else None
+ return s.replace('\n', os.linesep).encode('utf-8') if s is not None else None
# unicode function
|
Correct globus configuration doc subheading level
Previously the configuration section was at the same level as
the globus introduction; now it is at the same level as the
globus authorization section. | @@ -325,7 +325,7 @@ execute-side file system, because Globus file transfers happen
between two Globus endpoints.
Globus Configuration
-^^^^^^^^^^^^^^^^^^^^
+""""""""""""""""""""
In order to manage where files are staged, users must configure the default ``working_dir`` on a remote location. This information is specifie... |
fix datetime format for better understanding
original: 1017 01:29:34.751[I]LISA.suite
current: 2020-10-17 01:29:34.751 INFO LISA.suite | @@ -105,8 +105,8 @@ class LogWriter(object):
_get_root_logger = partial(logging.getLogger, DEFAULT_LOG_NAME)
_format = logging.Formatter(
- fmt="%(asctime)s.%(msecs)03d[%(levelname)-.1s]%(name)s %(message)s",
- datefmt="%m%d %H:%M:%S",
+ fmt="%(asctime)s.%(msecs)03d %(levelname)-.4s %(name)s %(message)s",
+ datefmt="%Y... |
Make bearing objects pickable
This removes the lambda definition within the _process_coefficients
method, since lambda is not picklable this would cause an error when
trying to pickle bearing objects. | @@ -204,7 +204,12 @@ class BearingElement(Element):
" must have the same dimension"
)
else:
- interpolated = lambda x: np.array(coefficient[0])
+ interpolated = interpolate.interp1d(
+ [0, 1],
+ [coefficient[0], coefficient[0]],
+ kind='linear',
+ fill_value="extrapolate",
+ )
return coefficient, interpolated
|
Fix
Madara without ajax O_O | @@ -7,10 +7,9 @@ from lncrawl.core.crawler import Crawler
logger = logging.getLogger(__name__)
search_url = 'https://novelcake.com/?s=%s&post_type=wp-manga'
-chapter_list_url = 'https://novelcake.com/wp-admin/admin-ajax.php'
-class NovelCake(Crawler):
+class NovelCakeCrawler(Crawler):
base_url = 'https://novelcake.com/... |
Update README.rst
installing all the requirements for this application | @@ -55,9 +55,17 @@ The SNAP potential comes with this lammps installation. The GAP package for GAP
Install all the libraries from requirement.txt file::
- pip install -r requirement.txt
+ pip install -r requirements.txt
(If doesn't works provide the path of requirement.txt file)
+For all the requirements above::
+ pip ... |
DOC: add nbsphinx to the doc/conf.py
[NEW] allows for inclusion of jupyter notebooks in the documentation | @@ -22,7 +22,11 @@ import sys, os
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.todo', 'sphinx.ext.doctest', 'sphinx.ext.imgmath']
+extensions = ['sphinx.ext.todo',
+ 'sphinx.ext.doctest',
+ 's... |
Update ci.yml
Back to pestpp develop
Added timeout default
Debug false for interim coveralls post | @@ -10,6 +10,7 @@ jobs:
pyemuCI:
name: autotests
runs-on: ${{ matrix.os }}
+ timeout-minutes: 120
strategy:
fail-fast: false
matrix:
@@ -113,7 +114,7 @@ jobs:
exit 1
fi
cp -r bin/$d/. "$HOME/.local/bin/"
- git clone -b master --depth 1 https://github.com/usgs/pestpp
+ git clone -b develop --depth 1 https://github.com/u... |
refactor: extract_email_id condition
The condition made no sense and could never be True. | @@ -85,10 +85,7 @@ def get_formatted_email(user, mail=None):
def extract_email_id(email):
"""fetch only the email part of the Email Address"""
- email_id = parse_addr(email)[1]
- if email_id and isinstance(email_id, str) and not isinstance(email_id, str):
- email_id = email_id.decode("utf-8", "ignore")
- return email_i... |
Improve code completion performance (meta control of `MultiColumnCompletionsMenu`).
Improve rendering performance of the "meta" control of the
`MultiColumnCompletionsMenu` when there are many completions. | @@ -709,7 +709,19 @@ class _SelectedCompletionMetaControl(UIControl):
app = get_app()
if app.current_buffer.complete_state:
state = app.current_buffer.complete_state
- return 2 + max(get_cwidth(c.display_meta_text) for c in state.completions)
+
+ if len(state.completions) >= 30:
+ # When there are many completions, cal... |
Fix environment temperature dash
HG--
branch : feature/microservices | ]
],
"refId": "A",
- "measurement": "{{graph}} on slot $tag_slot",
- "alias": "{{graph}}"
+ "measurement": "{{graph}}",
+ "alias": "{{graph}} on slot $tag_slot"
}
],
"datasource": null,
|
Form helper path based on current module path rather than pwd
Fixed issue which was introduced by new tests in PR
as introduced, those new tests only worked if run from the root
of the parsl source tree. | # executors.
import importlib
+import pathlib
import parsl
from functools import partial
@@ -41,7 +42,8 @@ def test_check_import_module_function_partial():
def test_check_importlib_function():
- spec = importlib.util.spec_from_file_location("dynamically_loaded_module", "parsl/tests/callables_helper.py")
+ helper_path =... |
Add classifier: Hydrology
Include the PyPI classifier "Topic :: Scientific/Engineering :: Hydrology" following | @@ -87,6 +87,7 @@ setup(
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Atmospheric Science",
+ "Topic :: Scientific/Engineering :: Hydrology",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Operating System :: OS Indepe... |
Twig in Wordpress
Was very unsuccessful with the given Twig examples, quotes were escaped so got invalid, file_excerpt threw an error, too. Include and also injecting the file name helped. Don't know if this is a wordpress thing... | @@ -775,6 +775,7 @@ Execute code using SSTI for Slim engine.
{{7*7}}
{{7*'7'}} would result in 49
{{dump(app)}}
+{{dump(_context)}}
{{app.request.server.all|join(',')}}
```
@@ -796,6 +797,7 @@ $output = $twig > render (
```python
"{{'/etc/passwd'|file_excerpt(1,30)}}"@
+{{include("wp-config.php")}}
```
### Twig - Code ... |
handle autofire hw rules in a switch matrix
matrix switch based hw rules need to have the matrix columns mirrored since opp has reverse column order | @@ -1052,6 +1052,10 @@ class OppHardwarePlatform(LightsPlatform, SwitchPlatform, DriverPlatform):
return
_, _, coil_num = driver.number.split('-')
+
+ #mirror switch matrix columns to handle the fact that OPP matrix is in reverse column order
+ switch_num = 8 * (15 - (switch_num // 8)) + switch_num % 8
+
msg = bytearra... |
avx512 MASK_AS_CONTROL instr do not get their dest R/W value modified.
* This applies to instr like VPBLENDMD where mask is a control value
not for merging or zeroing.
* Modified the definition of xed_decoded_inst_merging() to return false
for instr with XED_ATTRIBUTE_MASK_AS_CONTROL. | @@ -889,6 +889,7 @@ xed_bool_t xed_decoded_inst_merging(const xed_decoded_inst_t* p) {
if (xed3_operand_get_mask(p) != 0)
# if defined(XED_SUPPORTS_AVX512)
if (xed3_operand_get_zeroing(p) == 0)
+ if (!xed_decoded_inst_get_attribute(p, XED_ATTRIBUTE_MASK_AS_CONTROL))
return 1;
# elif defined(XED_SUPPORTS_KNC)
return 1;
... |
Test with a 64 bit after_cursor
Same as but I missed
this assertion in the first PR. | @@ -1998,7 +1998,7 @@ def _fetch_counts(storage, after_cursor=None):
_fetch_counts(storage, after_cursor=cursor_run1)
== materialization_count_by_partition
)
- assert _fetch_counts(storage, after_cursor=9999999) == {c: {}, d: {}}
+ assert _fetch_counts(storage, after_cursor=9999999999) == {c: {}, d: {}}
def test_get_ob... |
Update REFERENCES.md
fix the format of the citation. | @@ -21,6 +21,7 @@ chronographically.
A number of the below methods are available in GluonTS.
### [Tree-based probabilistic forecaster](https://proceedings.neurips.cc/paper/2021/file/32b127307a606effdcc8e51f60a45922-Paper.pdf)
+```
@article{hasson2021probabilistic,
title={Probabilistic Forecasting: A Level-Set Approach}... |
improve efficiency of SctructuredTopology.locate
This patch changes the implementation of SctructuredTopology._asaffine to avoid
using basis and meshgrid, and relying instead on the known ordering of points
in a uniform sample. | @@ -2257,21 +2257,19 @@ class StructuredTopology(TransformChainsTopology):
def _asaffine(self, geom, arguments):
# determine geom0, scale, error such that geom ~= geom0 + index * scale + error
- funcsp = self.basis('std', degree=1, periodic=())
- verts = numeric.meshgrid(*map(numpy.arange, numpy.array(self.shape)+1)).r... |
recognize that function name had changed.
Function name had changed some time back, but global replace of function name missed this instance. This fixes the help in impulse_response | @@ -557,7 +557,7 @@ def impulse_response(sys, T=None, X0=0., input=0, output=None,
See Also
--------
- ForcedReponse, initial_response, step_response
+ forced_response, initial_response, step_response
Examples
--------
|
Tests: Added ability to specify modules to recurse to.
* Intended for using with "test_dataclasses" to make it recurse into
the sub tests it has. | @@ -127,6 +127,13 @@ def main():
recurse_not.append(arg[len("recurse_not:"):])
del args[count]
+ recurse_to = []
+
+ for count, arg in reversed(tuple(enumerate(args))):
+ if arg.startswith("recurse_to:"):
+ recurse_to.append(arg[len("recurse_to:"):])
+ del args[count]
+
if args:
sys.exit("Error, non understood mode(s) ... |
Fix installation step to make it more neutral
This is a followup of | @@ -37,13 +37,19 @@ Try the Koalas 10 minutes tutorial on a live Jupyter notebook [here](https://myb
## Getting Started
-Koalas can be installed as below:
+Koalas can be installed in many ways such as Conda and pip.
```bash
+# Conda
+conda install koalas -c conda-forge
+```
+
+```bash
+# pip
pip install koalas
```
-Koa... |
Update dmsp_ivm.py
Updated variable name for madrigal download method | @@ -155,7 +155,7 @@ def download(date_array, tag='', sat_id='', data_path=None, user=None,
The affiliation field is set to pysat to enable tracking of pysat downloads.
"""
- mad_meth.download(date_array, inst_code=str(madrigal_inst_code),
+ mad_meth.download(date_array, inst_code=str(madrigal_inst_tag),
kindat=str(madr... |
Cleanup artifacts of earlier fixes
Only remove 'vcs+' pattern from URI in convert_deps_from_pip if the
requirement uri explicitly begins with requirement.vcs+ | @@ -45,7 +45,7 @@ specifiers = [k for k in lookup.keys()]
# List of version control systems we support.
VCS_LIST = ('git', 'svn', 'hg', 'bzr')
-SCHEME_LIST = ('http://', 'https://', 'ftp://', 'file://', 'git://')
+SCHEME_LIST = ('http://', 'https://', 'ftp://', 'file://')
requests = requests.Session()
@@ -661,10 +661,1... |
RandomUI : Adapt _RandomColorPlugValueWidget to new PlugValueWidget API
This means we now have proper error handling, and the computation of values is being done asynchronously. | @@ -175,6 +175,8 @@ Gaffer.Metadata.registerNode(
class _RandomColorPlugValueWidget( GafferUI.PlugValueWidget ) :
+ __gridSize = imath.V2i( 10, 3 )
+
def __init__( self, plug, **kw ) :
self.__grid = GafferUI.GridContainer( spacing = 4 )
@@ -182,22 +184,41 @@ class _RandomColorPlugValueWidget( GafferUI.PlugValueWidget )... |
Fixing a race in miner submit_work
Issue | @@ -279,8 +279,9 @@ class Miner:
if header_hash not in self.work_map:
return False
- block = self.work_map[header_hash]
- header = copy.copy(block.header)
+ # this copy is necessary since there might be multiple submissions concurrently
+ block = copy.copy(self.work_map[header_hash])
+ header = block.header
header.nonc... |
Disable flaky tests in dist_autograd_test
Summary: Pull Request resolved:
Test Plan: Imported from OSS | @@ -379,6 +379,7 @@ class DistAutogradTest(object):
def test_graph_for_builtin_remote_call(self):
self._test_graph(torch.add, ExecMode.REMOTE)
+ @unittest.skip("Test is flaky, see https://github.com/pytorch/pytorch/issues/28885")
@dist_init
def test_graph_for_python_remote_call(self):
self._test_graph(my_py_add, ExecMo... |
Bug fix for multi-level display in BOM table
Multi-level BOM loading was broken
Using the wrong column name for 'treeShowField'
Also adds functionality to auto-expand sub-part when loading | @@ -812,7 +812,7 @@ function loadBomTable(table, options={}) {
// Part column
cols.push(
{
- field: 'sub_part_detail.full_name',
+ field: 'sub_part',
title: '{% trans "Part" %}',
sortable: true,
switchable: false,
@@ -1194,12 +1194,15 @@ function loadBomTable(table, options={}) {
response[idx].parentId = bom_pk;
}
- va... |
Update ncbi-covid-19.yaml
updated the description | Name: COVID-19 Genome Sequence Dataset
-Description: A centralized sequence repository for all strains of novel corona virus (SARS-CoV-2) submitted to the National Center for Biotechnology Information (NCBI). Included are both the original sequences submitted by the principal investigator as well as SRA-processed seque... |
Mazda: Add 2023 CX9 fw
* Mazda: Add 2023 CX9 fw
DongleID:
Discord User: bsk#7841
* Attempt to steer below 28mph for CX9
* undo comment | @@ -283,6 +283,7 @@ FW_VERSIONS = {
b'TC3M-3210X-A-00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
],
(Ecu.engine, 0x7e0, None): [
+ b'PXGW-188K2-C\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
b'PXM4-188K2-C\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',
b'PXM4-188K2-D\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00',... |
Update ua.txt
See also old ```apt_tvrms.txt```. | @@ -884,3 +884,8 @@ Mozilla/5.0 (Windows NT 10.0; &)
# Reference: https://twitter.com/luc4m/status/1166765980489584640
WSHRAT
+
+# Reference: https://media.kasperskycontenthub.com/wp-content/uploads/sites/43/2018/08/01075510/TV_RMS_IoC_eng.pdf
+
+Mozilla/4.0 (compatible; RMS)
+Mozilla/4.0 (compatible; MSIE 6.0; DynGate... |
Increase number of samples for testing distributions
* Increase number of samples for testing distributions
* remove flaky annotation
* Update test_distribution_sampling.py
Removed import. | import mxnet as mx
import numpy as np
import pytest
-from flaky import flaky
# First-party imports
from gluonts.distribution import (
@@ -86,7 +85,6 @@ DISTRIBUTIONS_WITH_CDF = [Gaussian, Uniform, Laplace, Binned]
DISTRIBUTIONS_WITH_QUANTILE_FUNCTION = [Gaussian, Uniform, Laplace, Binned]
-@flaky(max_runs=3)
@pytest.ma... |
fail silently on piexif errors
since errors are not handled currently the server do not respond | @@ -292,7 +292,11 @@ class BaseEngine(object):
exif_dict = self._get_exif_segment()
if exif_dict and piexif.ImageIFD.Orientation in exif_dict["0th"]:
exif_dict["0th"][piexif.ImageIFD.Orientation] = 1
+ try:
self.exif = piexif.dump(exif_dict)
+ except Exception as e:
+ msg = """[piexif] %s""" % e
+ logger.error(msg)
def... |
[NixIO] Read and write channel_ids of ChannelIndex
Fixes | @@ -262,8 +262,11 @@ class NixIO(BaseIO):
for c in nix_source.sources
if c.type == "neo.channelindex")
chan_names = list(c["neo_name"] for c in chx if "neo_name" in c)
+ chan_ids = list(c["channel_id"] for c in chx if "channel_id" in c)
if chan_names:
neo_attrs["channel_names"] = chan_names
+ if chan_ids:
+ neo_attrs["... |
Remove references not cited
Related to | @@ -80,29 +80,6 @@ year = {2019},
url = {https://bokeh.org/},
}
-@book{vance2010machinery,
- title={Machinery vibration and rotordynamics},
- author={Vance, John M and Zeidan, Fouad Y and Murphy, Brian G},
- year={2010},
- publisher={John Wiley \& Sons},
- doi={10.1002/9780470903704},
-}
-
-@book{childs1993turbomachine... |
ENH: more refinements on summary_logs
[CHANGED] find start of the last exception traceback and display that | @@ -761,18 +761,22 @@ class ReadOnlyTinyDbDataStore(ReadOnlyDataStoreBase):
@property
def summary_incomplete(self):
"""returns a table summarising incomplete results"""
+ # detect last exception line
+ err_pat = re.compile(r"[A-Z][a-z]+[A-Z][a-z]+\:.+")
types = defaultdict(list)
indices = "type", "origin"
for member in... |
Create a snapshot from a in-use volume with force=False
In order to test the interface of "force=False",
and distinguish with "force=True".
If the interface is "force=True",
we can create a snapshot from a in-use volume successfully. | @@ -16,6 +16,7 @@ from tempest.api.volume import base
from tempest import config
from tempest.lib.common.utils import data_utils
from tempest.lib import decorators
+from tempest.lib import exceptions as lib_exc
from tempest import test
CONF = config.CONF
@@ -42,6 +43,10 @@ class VolumesSnapshotTestJSON(base.BaseVolumeT... |
Fix concatenation TypeError in code_sentences
Fixes | @@ -3197,8 +3197,10 @@ class DialogCodeText(QtWidgets.QWidget):
self.autocode_history.insert(0, undo_dict)
self.parent_textEdit.append(_("Automatic code sentence in files:") \
+ _("\nCode: ") + item.text(0)
- + _("\nWith text fragment: ") + text + _(
- "\nUsing line ending: ") + ending + "\n" + msg)
+ + _("\nWith text ... |
fix: setup.cfg was not in MANIFEST.in
Add setup.cfg into MANIFEST.in. | @@ -7,6 +7,7 @@ include docs/*
include docs/api/*.*
include pkg/*
include setup.py
+include setup.cfg
recursive-include src *.py
# for f in tests/**/*.* ; do echo ${f/*\./*.}; done | sort | uniq
recursive-include tests *.ini *.json *.properties *.py *.sh *.toml *.xml *.yml
|
Update TsIOCMenu.vue
Fix typo | @@ -143,7 +143,7 @@ export default {
'intelligence'
).then(() => {
Snackbar.open({
- message: 'Attribtue added successfully',
+ message: 'Attribute added successfully',
type: 'is-white',
position: 'is-top',
actionText: 'View intelligence',
|
Fix neutron dhcp log path
The neutron dhcp-agent log path is not set properly.
The service is logging at /var/log/containers/neutron/dhcp-agent.log
and the log is set to /var/log/neutron/dhcp-agent.log | @@ -27,7 +27,7 @@ parameters:
type: json
default:
tag: openstack.neutron.agent.dhcp
- path: /var/log/neutron/dhcp-agent.log
+ path: /var/log/containers/neutron/dhcp-agent.log
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
|
`test_devtools_ui` - Test if dash will run when other `before_request` functions has been registered to flask
This test validates issue
The root of this issue lies in the devtools ui, and only occurs when the devtools ui has been enabled | from time import sleep
+import flask
import dash_core_components as dcc
import dash_html_components as html
@@ -224,3 +225,38 @@ def test_dvui006_no_undo_redo(dash_duo):
dash_duo.wait_for_text_to_equal("#b", "xyz")
dash_duo.wait_for_no_elements("._dash-undo-redo")
+
+
+def test_dvui007_other_before_request_func(dash_th... |
Fix bug in Trio's _read_exactly()
This method calls Trio's `receive_some(n)`, which I found out can actually
return fewer than `n` bytes. This is only noticeable on large messages
(query results of around 80KB triggered the issue). The solution is to call
`receive_some(...)` in a loop until `n` bytes has been received. | @@ -237,8 +237,11 @@ class ConnectionInstance:
return bytes(buffer)
async def _read_exactly(self, num):
+ data = b''
try:
- return await self._stream.receive_some(num)
+ while len(data) < num:
+ data += await self._stream.receive_some(num - len(data))
+ return data
except (trio.BrokenResourceError, trio.ClosedResourceE... |
fix: add compatibildity mode for non_standard_message
closes | @@ -18,8 +18,16 @@ def print_non_standard(data):
format = request.values.get("format", "classic")
if format == "json":
return jsonify(data)
+
+ if not data:
+ message = "no results"
+ result = -1
else:
- return jsonify(dict(result=1, message="success", epidata=data))
+ message = "success"
+ result = 1
+ if result == -1... |
Update match.py
Reorder order matters | @@ -984,18 +984,18 @@ class ParticipantStats(CassiopeiaObject):
def kills(self) -> int:
return self._data[ParticipantStatsData].kills
- @load_match_on_attributeerror
@property
+ @load_match_on_attributeerror
def baron_kills(self) -> int:
return self._data[ParticipantStatsData].baronKills
- @load_match_on_attributeerror... |
Fix IDRAC reset URl call
For resetting IDRAC the URL must include {"ResetType": "GracefulRestart"}
post body.
With empty body it get 400 Error | @@ -145,7 +145,8 @@ class Redfish(object):
def reset(self):
manager_url = self.get_manager_url()
reset_url = f"{manager_url}/Actions/Manager.Reset"
- request = Request(reset_url, headers=self.headers, method='POST', data=json.dumps({}).encode('utf-8'))
+ request = Request(reset_url, headers=self.headers, method='POST',... |
Remove redundant call to StateToNumber
Previously, StateToNumber was called on a vector obtained from
v = NumberToState(i), so that StateToNumber(v) == i. | @@ -55,11 +55,9 @@ class DirectMatrixWrapper : public AbstractMatrixWrapper<Operator, WfType> {
operator_.FindConn(v, matrix_elements, connectors, newconfs);
- const auto numberv = hilbert_index_.StateToNumber(v);
-
for (size_t k = 0; k < connectors.size(); ++k) {
- const auto j = numberv + hilbert_index_.DeltaStateToN... |
Adapt test_hpylong.py to CPython 3.10
CPython 3.10 does not support types with custom __int__ all of the
PyLong_As... methods | @@ -34,6 +34,16 @@ class TestLong(HPyTest):
vi = sys.version_info
return (vi.major > 3 or (vi.major == 3 and vi.minor >= 8))
+ def python_supports_magic_int(self):
+ """ Return True if the Python version is 3.9 or earlier and thus
+ should support calling __int__ on non-int based types in some
+ HPyLong_As... methods.
... |
Attempt to fix assumed auto-merge deletion
This test had a chunk missing from it | @@ -103,6 +103,14 @@ class TestJobEndpoint(ResourceTestCaseMixin, TestCase):
post_file = os.path.join('job', 'test', 'posts', 'handle_reopt_error.json')
post = json.load(open(post_file, 'r'))
+
+ resp = self.api_client.post('/dev/job/', format='json', data=post)
+ self.assertHttpCreated(resp)
+ r = json.loads(resp.cont... |
Fix unicode error for downloads with unicode filenames.
Fixes | @@ -90,7 +90,8 @@ def urlparams(url_, hash=None, **query):
New query params will be appended to existing parameters, except duplicate
names, which will be replaced.
"""
- url = django_urlparse(url_)
+ url = django_urlparse(force_text(url_))
+
fragment = hash if hash is not None else url.fragment
# Use dict(parse_qsl) s... |
utils/serializer: Fix exception handling in Python3
Allow for the fact that exceptions do not have a 'message' attribute in
Python3. | @@ -231,7 +231,7 @@ class yaml(object):
lineno = None
if hasattr(e, 'problem_mark'):
lineno = e.problem_mark.line # pylint: disable=no-member
- raise SerializerSyntaxError(e.message, lineno)
+ raise SerializerSyntaxError(e.args[0] if e.args else str(e), lineno)
loads = load
|
Update readSettings.py
remove old permissions setting from defaults | @@ -116,7 +116,6 @@ class ReadSettings:
'embed-subs': 'True',
'embed-only-internal-subs': 'False',
'sub-providers': '',
- 'permissions': '777',
'post-process': 'False',
'pix-fmt': '',
'preopts': '',
|
Prevent displaying related events dropdown
When link query param is present | @@ -480,7 +480,7 @@ class BookRoomModal extends React.Component {
disabled={bookingBlocked(fprops)}
required />
</Segment>
- {this.renderRelatedEventsDropdown(bookingBlocked(fprops), fprops.form.mutators)}
+ {!link && this.renderRelatedEventsDropdown(bookingBlocked(fprops), fprops.form.mutators)}
</Form>
{conflictsExis... |
fix: F821 undefined name 'InternalError'
tx flake8 | @@ -80,7 +80,7 @@ def return_coordinates(doctype, filters_sql):
"""SELECT name, latitude, longitude FROM `tab{}` WHERE {}""".format(doctype, filters_sql),
as_dict=True,
)
- except InternalError:
+ except frappe.db.InternalError:
frappe.msgprint(
frappe._("This Doctype does not contain latitude and longitude fields"), r... |
Handle version=None when converted to a string it becomes 'None'
parm should default to empty string rather than None, it would fix better with existing code. | @@ -1027,7 +1027,7 @@ def install(name=None, refresh=False, pkgs=None, **kwargs):
# The user user salt cmdline with version=5.3 might be interpreted
# as a float it must be converted to a string in order for
# string matching to work.
- if not isinstance(version_num, six.string_types):
+ if not isinstance(version_num, ... |
Explicitly condition on results of needed jobs.
! failure() returns true for "success", "skipped", and "cancelled" | @@ -24,7 +24,7 @@ concurrency:
name: Create conda-based installers for Windows, macOS, and Linux
jobs:
- build-noarch-conda-pkgs:
+ build-noarch-pkgs:
name: Build ${{ matrix.pkg }}
runs-on: ubuntu-latest
if: github.event_name != 'release'
@@ -96,8 +96,8 @@ jobs:
runs-on: ${{ matrix.os }}
needs:
- build-matrix
- - build... |
zulip.scss: Remove dead CSS from 2013.
We remove the dead CSS which was introduced in commit
back in 2013 and doesn't seem to have any use now. Its probably
the case that we removed the actual html structure which used this
CSS since 2013 and forgot to clean up the css part. | @@ -855,12 +855,6 @@ td.pointer {
border-bottom-left-radius: 3px;
}
-.message_header .icon-vector-narrow {
- font-size: 0.6em;
- position: relative;
- top: -1px;
-}
-
.copy-paste-text {
/* Hide the text that we want copy paste to capture */
position: absolute;
|
Add deprecation warning for pre_save_duplicate
* Add deprecation warning for pre_save_duplicate
* Update mixin.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see | import itertools
+import warnings
from itertools import repeat
from typing import Dict, List, Optional
@@ -197,7 +198,20 @@ class CloneMixin(object):
pass
def pre_save_duplicate(self, instance): # pylint: disable=R0201
- """Override this method to modify the duplicate instance before it's saved."""
+ """
+ This method ... |
Added cdipdir_vec.
Same as cdipdir but for lists. | @@ -196,6 +196,10 @@ def cdipdir(time_in=None, iyear=None, idoy=None):
For time out of interval, computation is made for nearest boundary.
Same as SPEDAS cdipdir.
"""
+ if (time_in is None) and (iyear is None) and (idoy is None):
+ print("Error: No time was provided.")
+ return
+
if (iyear is None) or (idoy is None):
i... |
helper: Add muted stream unreads to unread_counts.
We previously skipped setting unread_counts for streams which were
muted. We now set these counts so that when unmuting (muted) streams we
have values to use, to set their unread_count. | @@ -317,8 +317,6 @@ def classify_unread_counts(model: Any) -> UnreadCounts:
for stream in unread_msg_counts['streams']:
count = len(stream['unread_message_ids'])
stream_id = stream['stream_id']
- if stream_id in model.muted_streams:
- continue
if [model.stream_dict[stream_id]['name'],
stream['topic']] in model.muted_to... |
MAINT: handle case where input data is a python container
[FIXED] handling List, or Tuple type hints requires we
consider that when validating data types | @@ -959,6 +959,9 @@ def _validate_data_type(self, data):
}:
return True
+ if isinstance(data, (tuple, list)):
+ data = data[0]
+
class_name = data.__class__.__name__
valid = class_name in self._data_types
if not valid:
|
Add reminder to clear build/ directory.
Otherwise full-build detritus can get bundled into the lite build.
See issue | @@ -136,7 +136,7 @@ Release Procedure
`git tag vX.Y.Z`
- Push the tag to Github with:
`git push <github-remote> vX.Y.Z`
- - Push the package to PyPI with:
- `cd python && ./setup.py sdist bdist_wheel upload`
- Push the lite package to PyPI with:
- `cd python && ./setup.py lite sdist bdist_wheel upload`
+ `cd python && ... |
Disable additional shuffling while training
Before this change dataset was shuffled once and
then on every step random sample was returned.
Problem is that this way we do not guarantee that
all samples from dataset will be used. | @@ -387,16 +387,22 @@ class Tub(object):
pass
- def get_record_gen(self, record_transform=None, shuffle=True, df=None):
+ def get_record_gen(self, record_transform=None, shuffle=False, df=None):
if df is None:
df = self.get_df()
-
while True:
- for row in self.df.iterrows():
+ for row in df.iterrows():
+ # NOTE: If shu... |
Raise warning only if check_sld is True
If the user is not worried about the slenderness ratio this warning can
pollute the output screen. This avoids raising the warning when we are
not checking the slenderness ratio. | @@ -1391,6 +1391,8 @@ class Rotor(object):
for shaft in self.shaft_elements
if shaft.slenderness_ratio < 1.6
]
+
+ if check_sld:
if len(SR):
warnings.warn(
"The beam elements "
@@ -1438,7 +1440,7 @@ class Rotor(object):
),
showlegend=False,
hoverinfo="none",
- ),
+ )
)
# plot shaft elements
@@ -1889,7 +1891,7 @@ class ... |
use pytest
`python setup.py test` has been deprecated. | @@ -31,7 +31,7 @@ The sections below outline the steps in each case.
1. (**important**) announce your plan to the rest of the community *before you start working*. This announcement should be in the form of a (new) issue;
1. (**important**) wait until some kind of consensus is reached about your idea being a good idea;... |
Add missing DHCPv6 ports from constants
Still not in use. Will be used in [1]
[1]
Partially-implements: blueprint ipv6 | @@ -117,6 +117,8 @@ METADATA_HTTP_PORT = 80
DHCP_CLIENT_PORT = 68
DHCP_SERVER_PORT = 67
+DHCPV6_CLIENT_PORT = 546
+DHCPV6_SERVER_PORT = 547
EMPTY_MAC = '00:00:00:00:00:00'
BROADCAST_MAC = 'ff:ff:ff:ff:ff:ff'
|
Update travis.yml
The CI is refactored to include the
two stages "linting" and "test". The former includes a check of black
code style and is (currently) allowed to fail. | @@ -7,9 +7,19 @@ python:
install:
- pip install docutils
- pip install -e .
+ - pip install black>=19.10b0
env: MPLBACKEND=Agg
+jobs:
+ allow_failures:
+ env:
+ - CAN_FAIL=true
+ include:
+ - stage: "linting"
+ env: CAN_FAIL=true
+ script: black --check .
+ - stage: "test"
script:
- pytest
- rst2html.py --halt=2 README... |
Use context manager for file open
Also remove a useless print statement to reduce noise | @@ -161,7 +161,6 @@ class SiteManager:
exists = cursor.fetchone()
if exists:
# Assume metricity is already populated if it exists
- print("Metricity already exists, not creating.")
return
print("Creating metricity relations and populating with some data.")
cursor.execute("CREATE DATABASE metricity")
@@ -171,8 +170,8 @@... |
Updated Dependency Installation name
Was Ubuntu before but changed it to Fedora (since Ubuntu was above) | @@ -8,7 +8,7 @@ Local Installation (For Development)
[*Also remember the database dependency in the README.md file*](http://ghtorrent.org/msr14.html)
1. [Dependency Installation for Ubuntu](#Ubuntu)
-1. [Dependency Installation for Ubuntu](#Fedora)
+1. [Dependency Installation for Fedora](#Fedora)
1. [Dependency Instal... |
Fix last example command to remove postgres data vol
change name of postgres data volume container | @@ -266,4 +266,4 @@ Delete a persistent storage volume:
**WARNING: All postgres data will be destroyed.**
- `$ docker-compose stop -t 0 postgres`
- `$ docker-compose rm postgres`
- - `$ docker volume rm osf_postgres_data_vol`
+ - `$ docker volume rm osfio_postgres_data_vol`
|
Update querying.rst
From the original description, it sounded like using .tuples(), .dicts() etc would imply .iterate(), which is not the case.
Explicitly state that for maximum performance you might want to do both, and show how you should do it. | @@ -711,6 +711,21 @@ dictionaries, namedtuples or tuples. The following methods can be used on any
* :py:meth:`~BaseQuery.namedtuples`
* :py:meth:`~BaseQuery.tuples`
+Don't forget to append the :py:meth:`~BaseQuery.iterator` method call to also
+reduce memory consumption. For example, the above code might look like:
+
... |
Python API: fix the wrapping of integer values
TN: | @@ -140,7 +140,7 @@ class PythonAPISettings(AbstractAPISettings):
return dispatch_on_type(type, [
(ct.bool_type, lambda _: ctype_type('c_uint8')),
- (ct.long_type, lambda _: ctype_type('c_long')),
+ (ct.long_type, lambda _: ctype_type('c_int')),
(ct.lexical_env_type, lambda _: 'LexicalEnv._c_type'),
(ct.logic_var_type,... |
Update dynamics_model_utils.py
To increase readability, make use of pandas index method `get_loc`
instead of relying on `np.where`. | @@ -770,7 +770,7 @@ class BaseDynamics:
self.weights_upper &= w_upper
def load_pars(self, adata, gene):
- idx = np.where(adata.var_names == gene)[0][0] if isinstance(gene, str) else gene
+ idx = adata.var_names.get_loc(gene) if isinstance(gene, str) else gene
self.alpha = adata.var["fit_alpha"][idx]
self.beta = adata.v... |
Update contact_list.py
Try to fix | @@ -73,8 +73,8 @@ class ContactList(MyTreeView):
selected_keys.append(sel_key)
if not selected_keys or not idx.isValid():
menu.addAction(_("New contact"), lambda: self.parent.new_contact_dialog())
- menu.addAction(_("Import file"), lambda: self.import_contacts())
- menu.addAction(_("Export file"), lambda: self.export_c... |
Make MlflowClient serializable
Make the Java MlflowClient class implement Serializable so that it can be used in Spark jobs | @@ -10,6 +10,7 @@ import org.mlflow.api.proto.Service.*;
import org.mlflow.tracking.creds.*;
import java.io.File;
+import java.io.Serializable;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
@@ -21,7 +22,7 @@ import java.util.stream.Collectors;
/**
* Client to an MLflow Tracking Se... |
Update vadokrist.txt
Have parsed addresses from screenshots (absent in IoC base list in the ESET's article). | @@ -15,6 +15,12 @@ http://191.237.255.155
http://191.239.244.141
http://191.239.245.87
http://191.239.255.102
+cloudmx.homelinux.com
+dumblegat.simple-url.com
+javfoms.podzone.org
+jotagot.mypets.ws
+metalpink.serveftp.org
+vemvem.duckdns.org
# Reference: https://twitter.com/wwp96/status/1366485090340077572
# Reference... |
JSON: throw warning for incompatible function names
if functions share names with nodes or graphs, they'll be treated as
references to the node or graph instead. | @@ -199,6 +199,7 @@ import pint
import psyneulink
import re
import types
+import warnings
from psyneulink.core.globals.keywords import \
MODEL_SPEC_ID_COMPOSITION, MODEL_SPEC_ID_GENERIC, MODEL_SPEC_ID_NODES, MODEL_SPEC_ID_PARAMETER_SOURCE, \
@@ -206,7 +207,7 @@ from psyneulink.core.globals.keywords import \
MODEL_SPEC_... |
Update Dockerfile.dev
Made some changes to support Python3, and fixed a few path related issues. | -FROM ubuntu
+FROM ubuntu:18.04
MAINTAINER perryism
@@ -6,8 +6,12 @@ RUN apt-get update && \
apt-get -y install \
wget \
zip \
- python-pip \
+ python3-pip \
+ python3-dev \
git \
+ && cd /usr/local/bin \
+ && ln -s /usr/bin/python3 python \
+ && pip3 install --upgrade pip \
&& rm -rf /var/lib/apt/lists/*
ARG VERSION=0... |
fix arg type
fix default arg type string to int | @@ -97,7 +97,7 @@ if __name__ == '__main__':
'--out', dest='output', default='out.jpg',
help='the name of the output file.')
parser.add_argument(
- '--max-results', dest='max_results', default=4,
+ '--max-results', dest='max_results', default=4, type=int,
help='the max results of face detection.')
args = parser.parse_a... |
Internally enable Flake8 lints for invalid whitespace
W291 - Trailing whitespace
W293 - blank line contains whitespace | @@ -5,8 +5,6 @@ extend-ignore:
E501, # line too long (> 79 characters)
E731, # Do not assign a lambda expression
E741, # Ambiguous variable name (enable once fixed)
- W291, # Trailing whitespace (enable once fixed)
- W293, # Blank line contains whitespace (enable once fixed)
W503, # line break before binary operator (c... |
Handle different kernel builds on SUSE Linux Enterprise
SUSE has introduced the kernel-azure build to support faster feature enablement for Azure than is possible with the kernel-default build. This requires that the RDMA kernel modules are built against both kernels. Therefore the agent must install the proper package... | # Microsoft Azure Linux Agent
#
-# Copyright 2017 Microsoft Corporation
+# Copyright 2018 Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -40,7 +40,23 @@ class SUSERDMAHandler(RDMAHandler):
zypper_remove = 'z... |
Improve _exprs()
Get the user message if the ouput from a function is nan. Some code improvements | @@ -507,10 +507,9 @@ def cols(self):
:return: json
"""
functions_array = ["min", "max", "stddev", "kurtosis", "mean", "skewness", "sum", "variance",
- "approx_count_distinct", "na", "zeros", "percentile"]
+ "approx_count_distinct", "countDistinct", "na", "zeros", "percentile", "count"]
_result = {}
- if is_dict(data):
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.