message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
Update CNN.py
added , map_location=torch.device('cpu') | @@ -61,7 +61,7 @@ class CNN(nn.Module):
with open(os.path.join(input_path, 'cnn_config.json'), 'r') as fIn:
config = json.load(fIn)
- weights = torch.load(os.path.join(input_path, 'pytorch_model.bin'))
+ weights = torch.load(os.path.join(input_path, 'pytorch_model.bin'), map_location=torch.device('cpu'))
model = CNN(**... |
Fix test_clients_monasca failure
'cafile','certfile','keyfile' and 'insecure'
need mock override.
Closes-Bug: | @@ -65,6 +65,10 @@ class TestClients(base.TestCase):
expected = {'username': 'foousername',
'password': 'foopassword',
'auth_url': 'http://server.ip:35357',
+ 'cafile': None,
+ 'certfile': None,
+ 'keyfile': None,
+ 'insecure': False,
'user_domain_id': 'foouserdomainid',
'project_domain_id': 'fooprojdomainid'}
|
docs: Use term operation instead of openapi in generate_curl_example.
The term operation makes more sense instead of openapi. OpenAPI
specs defines a unique operation as a combination of a path and a
HTTP method. | @@ -158,17 +158,18 @@ def generate_curl_example(endpoint: str, method: str,
raise AssertionError("exclude and include cannot be set at the same time.")
lines = ["```curl"]
- openapi_entry = openapi_spec.spec()['paths'][endpoint][method.lower()]
- openapi_params = openapi_entry.get("parameters", [])
- openapi_request_bo... |
Pin torchvision version.
Summary:
Pull Request resolved:
ghimport-source-id: | @@ -146,6 +146,7 @@ test_torchvision() {
# PyTorch CI
git clone https://github.com/pytorch/vision --quiet
pushd vision
+ git checkout 2f64dd90e14fe5463b4e5bd152d56e4a6f0419de
# python setup.py install with a tqdm dependency is broken in the
# Travis Python nightly (but not in latest Python nightlies, so
# this should b... |
Update generic.txt
> ```cobaltstrike-1.txt``` | @@ -10809,12 +10809,6 @@ http://151.80.220.125
tennysondonehue.com
-# Reference: https://www.virustotal.com/gui/ip-address/104.207.140.218/relations
-# Reference: https://www.virustotal.com/gui/file/0906273884fdd14dfc89eea5c252fd46d5fcd000692e4af7e258048b5588b4d0/detection
-
-us-system3.com
-us-system89.com
-
# Referen... |
Allow developers to choose attachments
* Allow developers to choose attachments
This change allows developers to choose attachments, even if there is a cur_frm object.
* Update communication.js
* Merge this.attachments and form attachments
* fix codacy | @@ -354,11 +354,14 @@ frappe.views.CommunicationComposer = Class.extend({
var fields = this.dialog.fields_dict;
var attach = $(fields.select_attachments.wrapper).find(".attach-list").empty();
+ var files = [];
+ if (this.attachments && this.attachments.length) {
+ files = files.concat(this.attachments);
+ }
if (cur_frm... |
Update gcloud.sh
Fix $1: unbound variable
Removed while loop on empty $1 | set -euo pipefail
+SETTING=${1:-""}
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Configure python path
@@ -47,8 +48,7 @@ function main {
popd
}
-while [ "$1" != "" ]; do
- case $1 in
+case $SETTING in
--teardown | --revert )
shift
teardown "$@"
@@ -59,4 +59,3 @@ while [ "$1" != "" ]; do
exit 0
;;
esac
-done
|
User Guide: don't link to tigris any more [ci skip]
Troubleshooting section had a remaining link to tigris.org.
Now points to scons website - not to github, because we don't
encourage directly filing a bug before first discussing. | odds are pretty good that someone else will run into
the same problem, too.
If so, please let the SCons development team know
- (preferably by filing a bug report
- or feature request at our project pages at tigris.org)
+ using the contact information at
+ <ulink url="https://scons.org/contact.html"/>
so that we can us... |
Update DiyServo.py
Updated so that pins are set before attaching | @@ -19,8 +19,8 @@ arduino.connect(port)
# Start the MotorDualPwm. You can use also use a different type of Motor
motor = Runtime.start("diyservo.motor","MotorDualPwm")
# Tell the motor to attach to the Arduino and what pins to use
-motor.attach(arduino)
motor.setPwmPins(10,11)
+motor.attach(arduino)
# Start the DiyServ... |
dep-update: bump deployment.updated_at
Apparently this doesn't happen automatically! | # * limitations under the License.
import uuid
+from datetime import datetime
from flask import request
from flask_restful_swagger import swagger
@@ -284,6 +285,8 @@ class DeploymentUpdateId(SecuredResource):
if params.get('node_instances'):
dep_upd.deployment_update_node_instances = \
params['node_instances']
+ if dep... |
Fix flush sync wrappers
Call completion function in case of allocation error | @@ -245,6 +245,13 @@ static void _cache_mngt_cache_flush_complete(ocf_cache_t cache, void *priv,
kfree(context);
}
+/*
+ * Possible return values:
+ * 0 - completion was called and operation succeded
+ * -KCAS_ERR_WAITING_INTERRUPTED - operation was canceled, caller must
+ * propagate error, completion will be called a... |
Removed paired optional
ATAC-seq natively supports only paired-end sequencing. | @@ -39,7 +39,6 @@ onstart:
if "verbose" in config and config["verbose"]:
print("--- Workflow parameters --------------------------------------------------------")
print("samples:", samples)
- print("paired:", paired)
print("ATAC fragment cutoff: ", atac_fragment_cutoff)
print("-" * 80, "\n")
|
Adalog: fix a memory leak in N_Propagate equations
TN: | @@ -1837,6 +1837,7 @@ package body Langkit_Support.Adalog.Solver is
Free (Self.Conv);
when N_Propagate =>
+ Self.Comb_Vars.Destroy;
Destroy (Self.Comb.all);
Free (Self.Comb);
|
Move helper functions to unnamed namespace.
Currently, the helper functions in this file are in global
namespace. I am guessing the purpose of excluding them from was to
keep them local. | using namespace nom;
+namespace {
+
std::map<std::string, caffe2::Argument>
getArgumentsFromOperator(caffe2::OperatorDef op) {
std::map<std::string, caffe2::Argument> argMap;
@@ -83,6 +85,8 @@ std::vector<int> getDilations(std::map<std::string, caffe2::Argument> argMap) {
return dilations;
}
+} // namespace
+
namespace... |
Remove use of single letter variable
A single letter variable name of 'f' causes pylint to throw a coding style
convention warning:
C0103: Variable name "f" doesn't conform to snake_case naming style
(invalid-name) | @@ -179,9 +179,9 @@ class Metadata():
The file cannot be written.
"""
- with tempfile.TemporaryFile() as f:
- f.write(self.to_json(compact).encode('utf-8'))
- persist_temp_file(f, filename, storage_backend)
+ with tempfile.TemporaryFile() as temp_file:
+ temp_file.write(self.to_json(compact).encode('utf-8'))
+ persist_... |
make rebuildstaging --deploy work
if you have commcare-cloud on the path | @@ -67,8 +67,11 @@ fi
if [[ $deploy = 'y' && $no_push != 'y' ]]
then
- rebuildstaging $args && \
- echo 'rebuildstaging will no longer deploy for you. From commcarehq-ansible, run `fab staging deploy`'
+ rebuildstaging $args && {
+ which commcare-cloud \
+ && commcare-cloud staging fab deploy \
+ || echo 'Could not aut... |
Remove redundant text
Full Examples: Bucket policy Operations is repeated twice | @@ -162,11 +162,6 @@ The full API Reference is available here.
* [set_bucket_policy.py](https://github.com/minio/minio-py/blob/master/examples/set_bucket_policy.py)
* [get_bucket_policy.py](https://github.com/minio/minio-py/blob/master/examples/get_bucket_policy.py)
-#### Full Examples: Bucket policy Operations
-
-* [s... |
Update default.py
Having the sha1 & sha256 hashes by default would actually be pretty useful I think. This change would add those. | @@ -21,6 +21,8 @@ def width(s, character_count):
def render_meta(doc, ostream):
rows = [
(width("md5", 22), width(doc["meta"]["sample"]["md5"], 82)),
+ (width("sha1", 22), width(doc["meta"]["sample"]["sha1"], 82)),
+ (width("sha256", 22), width(doc["meta"]["sample"]["sha256"], 82)),
("path", doc["meta"]["sample"]["path... |
Fix QATConv3D
Update to optional Conv3D import | @@ -18,6 +18,7 @@ Utility / helper functions
import random
import re
+import warnings
from collections import OrderedDict, namedtuple
from contextlib import contextmanager
from copy import deepcopy
@@ -35,7 +36,6 @@ from torch.utils.data import DataLoader
try:
quant_err = None
from torch.nn.qat import Conv2d as QATConv... |
Mark chaos_dataset_shuffle_push_based_sort_1tb and chaos_dataset_shuffle_sort_1tb stable
They passed for the past 7 runs. | test_name: chaos_dataset_shuffle_push_based_sort_1tb
test_suite: chaos_test
- stable: false
-
frequency: nightly
team: core
cluster:
test_name: chaos_dataset_shuffle_sort_1tb
test_suite: chaos_test
- stable: false
-
frequency: nightly
team: core
cluster:
|
client: fix format string in ValueError
This fixes output like | @@ -582,7 +582,7 @@ def _fetch_and_map_with_go(isolated_hash, storage, outdir, go_cache_dir,
proc.kill()
proc.wait()
# Raise unconditionally, because |proc| was forcefully terminated.
- raise ValueError("timedout after %d seconds (cmd=%s)",
+ raise ValueError("timedout after %d seconds (cmd=%s)" %
(check_period_sec * m... |
test: Make ephemeral sagemaker component tests more stable
* increase timeout
Increase timeout to make canaries less flakey
* Increase minio timeout
Make canaries less flakey
* Update run_integration_tests
* correct sleep
* remove unnecessary wait | @@ -164,6 +164,8 @@ function install_kfp() {
echo "[Installing KFP] Minio port-forwarded to ${MINIO_LOCAL_PORT}"
echo "[Installing KFP] Waiting for pods to stand up"
+ #TODO: In the future, modify kubectl wait to end when only one pod becomes ready.
+ sleep 3m
kubectl wait --for=condition=ready -n "${KFP_NAMESPACE}" po... |
Fix toObject() r-value version
Summary:
Pull Request resolved:
It should use moveToIntrusivePtr.
This function is a very hot one and used a lot in interpreter loop. e.g.
GET_ATTR, SET_ATTR. Making a copy and doing incref/decref caused big overhead. | @@ -76,7 +76,7 @@ inline c10::intrusive_ptr<ivalue::ConstantString> IValue::toString() const & {
}
inline c10::intrusive_ptr<ivalue::Object> IValue::toObject() && {
AT_ASSERT(isObject(), "Expected Object but got ", tagKind());
- return toIntrusivePtr<ivalue::Object>();
+ return moveToIntrusivePtr<ivalue::Object>();
}
i... |
run `add_filesystem` after `inject_yum_repos`
This is to avoid issues with baseimage special case
conflicting with scratch images.
* | @@ -37,19 +37,19 @@ class BinaryPreBuildTask(plugin_based.PluginBasedTask[PreBuildTaskParams]):
{"name": "check_base_image"},
{"name": "koji_parent"},
{"name": "resolve_composes"},
- {"name": "add_filesystem"},
{"name": "flatpak_update_dockerfile"},
{"name": "bump_release"},
{"name": "add_flatpak_labels"},
{"name": "ad... |
Unpin flake8
The latest version requires entrypoint >= 3 which is already satisfied in the base image which doesn't trigger a distutil reinstall. | @@ -62,10 +62,7 @@ RUN apt-get install -y libfreetype6-dev && \
pip install keras-rl && \
#keras-rcnn
pip install git+https://github.com/broadinstitute/keras-rcnn && \
- # version 3.7.1 adds a dependency on entrypoints > 3. This causes a reinstall but fails because
- # it is a distutils package and can't be uninstalled... |
Fix of maggroups
Change matrix reading from row to column based and adjust the start of hexagonal magnetic spacegroups to 143 | @@ -124,7 +124,7 @@ class MagneticSpaceGroup(SymmetryGroup):
def _get_point_operator(idx):
'''Retrieve information on point operator (rotation matrix and Seitz label).'''
- hex = self._data['bns_number'][0] >= 168 and self._data['bns_number'][0] <= 194
+ hex = self._data['bns_number'][0] >= 143 and self._data['bns_numb... |
fix(astro): missing snake_name caused runtime issues with fits datasets
* Update fits.py
Fix bug while plotting and manipulating df coming from FITS files
* Update packages/vaex-astro/vaex/astro/fits.py | @@ -18,6 +18,7 @@ logger = logging.getLogger("vaex.astro.fits")
class FitsBinTable(DatasetMemoryMapped):
+ snake_name='fits'
def __init__(self, filename, write=False, fs_options={}, fs=None):
super(FitsBinTable, self).__init__(filename, write=write)
self.ucds = {}
|
Add Chinese and Portuguese moves
Also add 10.3, 10.3.1, and 10.3.2 to iOS list. | @@ -148,7 +148,7 @@ def get_device_info(account):
def generate_device_info(account):
ios8 = ('8.0', '8.0.1', '8.0.2', '8.1', '8.1.1', '8.1.2', '8.1.3', '8.2', '8.3', '8.4', '8.4.1')
ios9 = ('9.0', '9.0.1', '9.0.2', '9.1', '9.2', '9.2.1', '9.3', '9.3.1', '9.3.2', '9.3.3', '9.3.4', '9.3.5')
- ios10 = ('10.0', '10.0.1', '... |
events: Remove code for settings which are included in property_types.
These lines in fetch_initial_state_data are redundant now since these
settings are already included in property_types after | @@ -269,11 +269,6 @@ def fetch_initial_state_data(
Realm.POLICY_ADMINS_ONLY if user_profile is None else realm.delete_own_message_policy
)
- # TODO: Can we delete these lines? They seem to be in property_types...
- state["realm_message_content_edit_limit_seconds"] = realm.message_content_edit_limit_seconds
- state[
- "... |
Add some more options for modal forms
Ability to display info or warning panels before the form | +<div>
+{% if form.pre_form_info %}
+<div class='alert alert-info' role='alert' style='display: block;'>
+{{ form.pre_form_info }}
+</div>
+{% endif %}
+{% if form.pre_form_warning %}
+<div class='alert alert-warning' role='alert' style='display: block;'>
+{{ form.pre_form_warning }}
+</div>
+{% endif %}
{% block non_f... |
Change type check to use isinstance instead of str compare
Authors:
Approvers:
- Adam Thompson (https://github.com/awthomp)
URL: | @@ -170,7 +170,7 @@ class _UpFIRDn(object):
def __init__(self, h, x_dtype, up, down):
"""Helper for resampling"""
- if str(type(h)) == "<class 'cupy._core.core.ndarray'>":
+ if isinstance(h, cp.ndarray):
pp = cp
else:
pp = np
|
eggroll not support iterator in put_all api anymore, convert to
list | @@ -28,7 +28,7 @@ def _save_as_func(rdd: RDD, name, namespace, partition, persistent):
def _func(_, it):
eggroll_util.maybe_create_eggroll_client()
- dup.put_all(it)
+ dup.put_all(list(it))
return 1,
rdd.mapPartitionsWithIndex(_func, preservesPartitioning=False).collect()
|
muting_ui: Fix bug with same name of function parameter and a file.
The parameter passed to 'handle_topic_updates' is 'muted_topics'
and there is also a javascript file with same name.
So 'muted_topics.get_muted_topics' gives error, and this commit
fixes this by changing the parametr name to 'muted_topics_list'.
This w... | @@ -45,9 +45,9 @@ export function rerender_for_muted_topic(old_muted_topics) {
}
}
-export function handle_topic_updates(muted_topics) {
+export function handle_topic_updates(muted_topics_list) {
const old_muted_topics = muted_topics.get_muted_topics();
- muted_topics.set_muted_topics(muted_topics);
+ muted_topics.set_... |
Update MAKE-RELEASE.md
Add an entry to make sure changelog gets one last look before a release is made | ## For the Pull Request
- Update CHANGELOG.md, add entry inbetween `## Unversioned` and any changelog entries with `## YOUR.VERSION`
+- Look through the changelog entries of this version, and reorder any entries so the most important changes are at the top of each category
- Update pajbot/constants.py
## After the Pull... |
Adds a placeholder for the 'mul' operator.
Summary: Pull Request resolved:
Test Plan: Imported from OSS | @@ -40,6 +40,14 @@ class FloatFunctional(torch.nn.Module):
self.observer(r)
return r
+ r"""Operation equivalent to ``torch.mul``"""
+ def mul(self, x, y):
+ # type: (Tensor, Tensor) -> Tensor
+ r = torch.mul(x, y)
+ # TODO: Fix for QAT.
+ self.observer(r)
+ return r
+
r"""Operation equivalent to ``torch.cat``"""
def ca... |
Alter the notification progress initializer to take a resource
Before this made it so notifications had no way of being able to tell
which specific resource they derived from. | @@ -92,7 +92,8 @@ class Notification(Model):
return self.save(doc)
def initProgress(self, user, title, total=0, state=ProgressState.ACTIVE,
- current=0, message='', token=None, estimateTime=True):
+ current=0, message='', token=None, estimateTime=True, resource=None,
+ resourceName=None):
"""
Create a "progress" type n... |
Change to iterable as Python3.5 doesn't support Collection.
We don't really need the getitem and len attributes anyway | import re
from collections import defaultdict, namedtuple
-from collections.abc import Collection
+from collections.abc import Iterable
from functools import lru_cache
from .exceptions import NotFound, InvalidUsage
from .views import CompositionView
@@ -112,8 +112,8 @@ class Router:
self.hosts.add(host)
else:
- if not ... |
[cleanup] Remove T249090 debugging stuff
Solving T249090 issue was declined because Python 2.7
is to be dropped soon and the related tests are done
with Python 3.5 now. Therefore we can remove this
debugging code. | @@ -17,7 +17,6 @@ import pywikibot.login
import pywikibot.page
import pywikibot.site
-from pywikibot import config
from pywikibot.throttle import Throttle
from pywikibot.tools import (
suppress_warnings,
@@ -25,13 +24,13 @@ from pywikibot.tools import (
UnicodeType,
)
-from tests import patch, unittest_print
from tests... |
Check for empty list in matplotlib unit conversion
Sometimes matplotlib >=3.1 can send an empty list for conversion.
To prevent an exception we must check that the list contains
something before checking the first element. | @@ -98,7 +98,7 @@ def quantity_support(format='latex_inline'):
def convert(val, unit, axis):
if isinstance(val, u.Quantity):
return val.to_value(unit)
- elif isinstance(val, list) and isinstance(val[0], u.Quantity):
+ elif isinstance(val, list) and val and isinstance(val[0], u.Quantity):
return [v.to_value(unit) for v ... |
Update rogue_dns.txt
(```/``` means period here). | 171.244.33.116:53
220.136.110.179:53
42.112.35.45:53
+42.112.35.46:53
+42.112.35.47:53
+42.112.35.48:53
+42.112.35.49:53
+42.112.35.50:53
+42.112.35.51:53
+42.112.35.52:53
+42.112.35.53:53
+42.112.35.54:53
42.112.35.55:53
# Reference: https://twitter.com/bad_packets/status/1079251375987425280
|
Use create_astnode for EnumNode subclasses
TN: | @@ -2642,30 +2642,22 @@ def create_enum_node_classes(cls):
is_bool_node = bool(cls._qualifier)
fields = list(cls._fields)
- base_enum_dct = {
- 'alternatives': cls._alternatives,
- 'is_enum_node': True,
- 'is_bool_node': is_bool_node,
- 'is_type_resolved': True,
-
- '_doc': cls._doc,
- '_fields': fields,
- '_is_abstrac... |
compose-validate: Use settings config value for policy check.
Updates the check in compose validate for the organization's
policy on sending private messages to use the code/value in
settings_config, instead of the number value. | @@ -483,7 +483,8 @@ function validate_private_message() {
const user_ids = compose_pm_pill.get_user_ids();
if (
- page_params.realm_private_message_policy === 2 && // Frontend check for for PRIVATE_MESSAGE_POLICY_DISABLED
+ page_params.realm_private_message_policy ===
+ settings_config.private_message_policy_values.dis... |
Update filter-dev-guide.md
made small changed to md syntax | @@ -9,8 +9,6 @@ Sometimes you may want Ambassador Edge Stack to manipulate an incoming request.
Ambassador Edge Stack supports these use cases by allowing you to execute custom logic in `Filters`. Filters are written in Golang, and managed by Ambassador Edge Stack.
-
-
## Prerequisites
`Plugin` `Filter`s are built as [... |
Translated using Weblate (Russian)
Currently translated at 84.4% (103 of 122 strings)
Translation: udiskie/udiskie
Translate-URL: | @@ -8,16 +8,17 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-03-01 16:22+0000\n"
-"PO-Revision-Date: 2019-02-16 21:18+0300\n"
-"Last-Translator: mr-GreyWolf <mr.greywolf@list.ru>\n"
-"Language-Team: Russian\n"
+"PO-Revision-Date: 2022-04-17 13:10+0000\n"
+"Last-Translator: We... |
Apply automatic formatting to _ecg_findpeaks_peakdetect
As outlined in | @@ -1039,6 +1039,7 @@ def _ecg_findpeaks_peakdetect(detection, sampling_rate=1000):
"""Based on https://github.com/berndporr/py-ecg-detectors/
Optimized for vectorized computation.
+
"""
min_peak_distance = int(0.3 * sampling_rate)
min_missed_distance = int(0.25 * sampling_rate)
@@ -1068,8 +1069,9 @@ def _ecg_findpeaks... |
[IMPROV] Link: Normalize before assert
Instead of checking all different variants in the assert, just normalize it
first and then assert that the normalization worked. | @@ -4619,14 +4619,14 @@ class Link(ComparableMixin):
"""
source_is_page = isinstance(source, BasePage)
- assert source is None or source_is_page or isinstance(source, pywikibot.site.BaseSite), \
- "source parameter should be either a Site or Page object"
-
if source_is_page:
self._source = source.site
else:
self._sourc... |
add minimal and nice-to-have functionality
maybe add these functionality parts in the template to make a feature request more precise/clearer | @@ -15,6 +15,14 @@ A clear and concise description of what the problem is, followed by the solution
Who is affected by the change (Users, Managers, Admins)?
+### Minimal functionality
+
+What functionality would you like to have?
+
+### Nice-to-have functionality
+
+What sort of related functionality would you like to ... |
Fixed base_invalid_option unit test
argparse output for invalid option has different text and goes to stderr | @@ -54,10 +54,9 @@ def test_base_invalid_option(base_app, capsys):
run_cmd(base_app, 'show -z')
out, err = capsys.readouterr()
show_help = run_cmd(base_app, 'help show')
- expected = ['no such option: -z']
- expected.extend(show_help)
+ expected = ['usage: show [-h] [-l] [param]', 'show: error: unrecognized arguments: ... |
Enable linkcheck on CI
Probably, we should do this on deployment only. | @@ -46,6 +46,7 @@ matrix:
script:
- python setup.py flake8
- sphinx-build -W -b html docs build/sphinx/html
+ - sphinx-build -W -b linkcheck docs build/sphinx/linkcheck
- py.test --cov diofant diofant/polys
- python: 3.5
env: COVERAGE='on' EXTRA='on' DIOFANT_GROUND_TYPES='gmpy'
|
feat: add polygon matic + mumbai networks
Added polygon's matic and mumbai networks to the default network config,
now that polygonscam is available. | @@ -62,6 +62,18 @@ live:
id: ftm-main
host: https://rpcapi.fantom.network
explorer: https://api.ftmscan.com/api
+ - name: Polygon
+ networks:
+ - name: Mainnet
+ chainid: 137
+ id: polygon-main (Infura)
+ host: https://polygon-mainnet.infura.io/v3/$WEB3_INFURA_PROJECT_ID
+ explorer: https://api.polygonscan.com/api
+ - ... |
Fixed two links to old docs.
Fixed two old links | @@ -298,8 +298,8 @@ class KeyTable(object):
The scope for both ``key_expr`` and ``agg_expr`` is all column names in the input :class:`KeyTable`.
- For more information, see the documentation on writing `expressions <../overview.html#expressions>`_
- and using the `Hail Expression Language <../reference.html#HailExpress... |
user status: Change Last seen to Last online.
Change "Last seen" to "Last online" in the full user profile. | <span class="value">{{user_type}}</span>
</div>
<div class="default-field">
- <span class="name">{{#tr this}}Last seen{{/tr}}</span>
+ <span class="name">{{#tr this}}Last online{{/tr}}</span>
<span class="value">{{last_seen}}</span>
</div>
{{#if user_time}}
|
MAINT: Remove unused import.
Remove import of assert_array_almost_equal_nulp. | from numpy.testing import (
assert_, assert_equal, assert_raises, assert_array_equal,
assert_almost_equal, assert_array_almost_equal, assert_no_warnings,
- assert_allclose, assert_array_almost_equal_nulp
+ assert_allclose,
)
from numpy.compat import pickle
|
Windows Canvas should always use GraphicsPath
This solves a bug with rendering text with stroke. | @@ -30,12 +30,11 @@ class WinformContext(Context):
@property
def current_path(self):
if len(self.paths) == 0:
- return None
+ self.add_path()
return self.paths[-1]
- @current_path.setter
- def current_path(self, current_path):
- self.paths.append(current_path)
+ def add_path(self):
+ self.paths.append(GraphicsPath())
c... |
[pymtl/Aerodactyl/test/Host_test] A copy for HostAerodactyl_test
* This file, like the non-host version, will scan all files that share the same
module name (i.e., 'HostAerodactyl') and same ending (i.e., '_test') with the
file containing the code
* Then, the file will dynamically load all these files into the globals(... | # HostAerodactyl_test
#=========================================================================
+import os
import importlib
import pytest
from pymtl import *
-from pclib.test import run_sim
-from fpga import SwShim
-
-# Import designs
-from CompAerodactyl.Aerodactyl import Aerodactyl
-from CompAerodactyl.HostAerodacty... |
Remove unnecessary string concatenations
Python joins string literals spanning multiple lines anyway and getting
rid of the pluses removes unnecessary noise. | @@ -125,10 +125,10 @@ class Grouping:
Return :obj:`None` if you don't want to store :obj:`e` in a group.
"""
raise NotImplementedError("\n\n"
- "There is no default implementation for `Groupings.key`.\n" +
- "Congratulations, you managed to execute supposedly " +
- "unreachable code.\n" +
- "Please let us know by filin... |
update pymysql.constants.CR
values from | @@ -65,4 +65,15 @@ CR_ALREADY_CONNECTED = 2058
CR_AUTH_PLUGIN_CANNOT_LOAD = 2059
CR_DUPLICATE_CONNECTION_ATTR = 2060
CR_AUTH_PLUGIN_ERR = 2061
-CR_ERROR_LAST = 2061
+CR_INSECURE_API_ERR = 2062
+CR_FILE_NAME_TOO_LONG = 2063
+CR_SSL_FIPS_MODE_ERR = 2064
+CR_DEPRECATED_COMPRESSION_NOT_SUPPORTED = 2065
+CR_COMPRESSION_WRON... |
[internal] jvm: limit caching of JDK setup processes
As per the `Process`es used to obtain information on the JDK should not be cached permanently especially for use of the system JVM. This was originally present in the code refactored by but was lost in a rebase.
[ci skip-rust]
[ci skip-build-wheels] | @@ -8,7 +8,7 @@ from dataclasses import dataclass
from pants.backend.java.compile.javac_subsystem import JavacSubsystem
from pants.engine.fs import Digest
from pants.engine.internals.selectors import Get
-from pants.engine.process import FallibleProcessResult, Process, ProcessResult
+from pants.engine.process import Fa... |
Update brocade_fastiron_telnet.py
Removed debug = True line | @@ -145,7 +145,7 @@ class BrocadeFastironTelnet(CiscoBaseConnection):
def check_config_mode(self, check_string=')#', pattern=''):
"""Checks if the device is in configuration mode or not."""
- debug = True
+ debug = False
if not pattern:
pattern = re.escape(self.base_prompt)
if debug:
|
Update gcloud-tasks-emulator to 0.5.1
0.5.0 had a bug that would prevent process_task_queues from submitting tasks
correctly. | @@ -10,7 +10,7 @@ deps =
30: Django >= 3.0, < 3.1
commands =
pip install beautifulsoup4 # Test requirements
- pip install gcloud-tasks-emulator>=0.4.0
+ pip install gcloud-tasks-emulator>=0.5.1
pip install gcloud-storage-emulator>=0.2.2
pip install requests-oauthlib
pip install google-auth-oauthlib
|
Support using styles from Pygments plugins
`pygments.styles.STYLE_MAP` contains only styles built directly into
Pygments library. To list all available styles (including styles
registered by plugins), one should use `get_all_styles` generator.
For respective Pygments documentation, see: | @@ -16,7 +16,7 @@ from httpie.compat import is_windows
from httpie.plugins import FormatterPlugin
-AVAILABLE_STYLES = set(pygments.styles.STYLE_MAP.keys())
+AVAILABLE_STYLES = set(pygments.styles.get_all_styles())
AVAILABLE_STYLES.add('solarized')
# This is the native style provided by the terminal emulator color schem... |
background_subtraction_test
Force the test to face the situation where bg_img.shape>fg_img.shape to cover an if statement | @@ -1983,6 +1983,8 @@ def test_plantcv_background_subtraction():
pcv.params.debug = None
fgmask = pcv.background_subtraction(background_image=bg_img, foreground_image=fg_img)
truths.append(np.sum(fgmask) > 0)
+ fgmask = pcv.background_subtraction(background_image=fg_img, foreground_image=bg_img)
+ truths.append(np.sum(... |
Format-The-Codebase
rename a test | @@ -243,7 +243,7 @@ class TestLoadInterface(unittest.TestCase):
class TestLoadFromPipeline(unittest.TestCase):
- def test_question_answering(self):
+ def test_text_to_text_model_from_pipeline(self):
pipe = transformers.pipeline(model="sshleifer/bart-tiny-random")
output = pipe("My name is Sylvain and I work at Hugging ... |
Add test cases for normalize()
Reorder reorder rules | @@ -22,6 +22,10 @@ _NORMALIZE_REPETITION = list(
_NORMALIZE_REORDER = [
("\u0e40\u0e40", "\u0e41"), # Sara E + Sara E -> Sara Ae
+ (
+ f"([{tonemarks}\u0e4c]+)([{above_v}{below_v}]+)",
+ "\\2\\1",
+ ), # TONE/Thanthakhat+ + A/BVOWELV+ -> A/BVOWEL+ + TONE/Thanthakhat+
(
f"\u0e4d([{tonemarks}]*)\u0e32",
"\\1\u0e33",
@@ -... |
Fixing cron.yaml attempt
Gcloud needs a way to lint this file | @@ -76,7 +76,7 @@ cron:
- description: District Rankings Calculation
url: /tasks/math/enqueue/district_rankings_calc/2018
- schedule: every tuesday
+ schedule: every tuesday 1:00
timezone: America/Los_Angeles
- description: Upcoming match notification sending
|
Fix run launcher lint
### Summary & Motivation
### How I Tested These Changes | @@ -167,8 +167,10 @@ def cleanup_test_instance(instance):
# To avoid filesystem contention when we close the temporary directory, wait for
# all runs to reach a terminal state, and close any subprocesses or threads
# that might be accessing the run history DB.
- if instance._run_launcher:
- instance._run_launcher.join(... |
[DOC] Update README.md
Do not recommend using `sudo` or `-e` during package installation (for users) | @@ -27,7 +27,7 @@ Donwload the package as zip from github and uncompress or if you have ``git`` us
open a terminal in the phy2bids folder and execute the command:
-``sudo pip3 install -e .``
+``pip3 install .``
type the command:
|
remove ssh_key_path validation
Follow-up to fix test | @@ -163,7 +163,6 @@ def test_do_validate_config(tmpdir, monkeypatch):
expected_output = {
'ip_detect_contents': 'ip-detect script `genconf/ip-detect` must exist',
'master_list': 'Must set master_list, no way to calculate value.',
- 'ssh_key_path': 'could not find ssh private key: genconf/ssh_key'
}
with tmpdir.as_cwd()... |
Update EPS_Screen.kv
Removed purple centerline hyphens. | origin: self.center
canvas.after:
PopMatrix
- Label:
- pos_hint: {"center_x": 0.12, "center_y": 0.5}
- text: '--------------'
- markup: True
- color: 1,0,1
- font_size: 20
Label:
id: beta4b_label
pos_hint: {"center_x": 0.07, "center_y": 0.31}
|
[core/output] Add prefix/suffix metadata
see | @@ -397,6 +397,7 @@ class WidgetDrawer(object):
if self._prefix:
self._full_text = u"{}{}".format(self._prefix, self._full_text)
+ return self._prefix
def add_suffix_iconmarkup(self, widget):
"""add custom Pango markup for suffix"""
@@ -412,6 +413,7 @@ class WidgetDrawer(object):
if self._suffix:
self._full_text = u"{}... |
docstring update
[skip ci] | @@ -267,6 +267,8 @@ class Event(BaseNeo, pq.Quantity):
1. By default, an array of `n` event times will be transformed into
`n-1` epochs, where the end of one epoch is the beginning of the next.
+ This assumes that the events are ordered in time; it is the
+ responsibility of the caller to check this is the case.
2. If ... |
BUILDTEST_ROOT needs to be set in environment when building documentation.
The error in rtd build for apidocs is due to fact BUILDTEST_ROOT is not
set upon build. | @@ -17,8 +17,8 @@ import sys
BUILDTEST_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+os.environ["BUILDTEST_ROOT"] = BUILDTEST_ROOT
sys.path.insert(0, os.path.join(BUILDTEST_ROOT,'src'))
-print (sys.path)
# -- Project information -----------------------------------------------------
project = 'buil... |
Compute metrics under distributed strategies.
Removed the conditional over distributed strategies when computing metrics.
Metrics are now computed even when distributed strategies are used. | @@ -300,12 +300,7 @@ def resnet_model_fn(features, labels, mode, model_class,
else:
train_op = None
- if not tf.contrib.distribute.has_distribution_strategy():
accuracy = tf.metrics.accuracy(labels, predictions['classes'])
- else:
- # Metrics are currently not compatible with distribution strategies during
- # training... |
controls: remove noTarget event
remove noTarget alert | @@ -420,16 +420,6 @@ class Controls:
if self.sm['liveLocationKalman'].excessiveResets:
self.events.add(EventName.localizerMalfunction)
- # Only allow engagement with brake pressed when stopped behind another stopped car
- speeds = self.sm['longitudinalPlan'].speeds
- if len(speeds) > 1:
- v_future = speeds[-1]
- else:
... |
Updated rtol to order function
Compute eccentricity for recseries propagation
Updated rtol to order function | @@ -471,8 +471,15 @@ def recseries(k, r, v, tofs, rtol=1e-6):
v0 = v.to_value(u.m / u.s)
tofs = tofs.to_value(u.s)
+ # angular momentum vector
+ h = np.cross(r0,v0)
+ # eccentricity vector
+ e = np.cross(v0,h)/k - r0/np.linalg.norm(r0)
+ # eccentricity magnitude
+ ecc = np.linalg.norm(e)
+
# rough estiamte of order fro... |
Pass --concurrent flag to ebtables calls
This flag will force ebtables to acquire a lock so we don't
have to worry about ebtables errors occuring if something else
on the system is trying to use ebtables as well.
Closes-Bug: | @@ -191,4 +191,4 @@ NAMESPACE = None
def ebtables(comm):
execute = ip_lib.IPWrapper(NAMESPACE).netns.execute
- return execute(['ebtables'] + comm, run_as_root=True)
+ return execute(['ebtables', '--concurrent'] + comm, run_as_root=True)
|
fix: Clear class_doctypes cache for doctype rename, deletes for all
sites | @@ -396,9 +396,18 @@ class DocType(Document):
frappe.db.commit()
# Do not rename and move files and folders for custom doctype
- if not self.custom and not frappe.flags.in_patch:
+ if not self.custom:
+ if not frappe.flags.in_patch:
self.rename_files_and_folders(old, new)
+ for site in frappe.utils.get_sites():
+ frapp... |
portico: Auto-detect field to focus for registration page.
This replaces the manually-curated logic for which field to focus. | @@ -45,14 +45,13 @@ $(function () {
}
if ($("#registration").length > 0) {
- if ($("#id_team_name").length === 1) {
- common.autofocus('#id_team_name');
- } else if ($('#id_email').length === 1 && !$('#id_email').attr('disabled')) {
- common.autofocus('#id_email');
- } else if ($("#source_realm_select").length === 1) {... |
Set n_estimators of GradientBoostingClassifier
it does not change with sklean 0.22 | @@ -154,7 +154,7 @@ class TestScikitlearnGradientBoostingClassifier(unittest.TestCase):
def setUpClass(cls):
np.random.seed(seed=1234)
- cls.sklearn_model = GradientBoostingClassifier(n_estimators=10)
+ cls.sklearn_model = GradientBoostingClassifier(n_estimators=100)
cls.classifier = ScikitlearnGradientBoostingClassifi... |
Should this example be corrected?
Assuming that matrix is represented like in numpy, the example looks confusing. (Unless I am overlooking something.) | @@ -291,15 +291,15 @@ instances
```python
import random
def rand2d(rows, cols):
- return [[random.choice([+1, -1]) for _ in range(rows)] for _ in range(cols)]
+ return [[random.choice([+1, -1]) for _ in range(cols)] for _ in range(rows)]
def random_instance(length):
# transverse field terms
h = rand2d(length, length)
#... |
Use RABBIT_USER for the rabbit user in the documentation
Use RABBIT_USER for the rabbit user in the documentation.
Closes-Bug: | @@ -28,7 +28,7 @@ the ``auth_strategy`` field:
verbose = True
log_dir = /var/log/cloudkitty
# oslo_messaging_rabbit is deprecated
- transport_url = rabbit://openstack:RABBIT_PASSWORD@RABBIT_HOST
+ transport_url = rabbit://RABBIT_USER:RABBIT_PASSWORD@RABBIT_HOST
auth_strategy = noauth
@@ -46,7 +46,7 @@ For keystone (ide... |
Fixes authentication error when using oracle
This commit applies for oralce dialect the same query strategy already implemeted for MSSQL in
security manager when checking for authentication/permissions, since a
query like "SELECT EXISTS(1) FROM DUAL" in oracle databases would raise
an missing expression error (observed... | @@ -311,8 +311,8 @@ class SecurityManager(BaseSecurityManager):
)
.exists()
)
- # Special case for MSSQL (works on PG and MySQL > 8)
- if self.appbuilder.get_session.bind.dialect.name == "mssql":
+ # Special case for MSSQL/Oracle (works on PG and MySQL > 8)
+ if self.appbuilder.get_session.bind.dialect.name in ("mssql"... |
Correct output format of iron
If nnz of input matrices is zero, the output of iron defaulted to the format "coo" even if explicitly given otherwise (see issue | @@ -330,7 +330,7 @@ def kron(A, B, format=None):
if A.nnz == 0 or B.nnz == 0:
# kronecker product is the zero matrix
- return coo_matrix(output_shape)
+ return coo_matrix(output_shape).asformat(format)
# expand entries of a into blocks
row = A.row.repeat(B.nnz)
|
Issue proposal for dealing with repeats
if allow_repeats = False after a period where it is True then use the highest status associated with that worker as the exclusion criteria. | @@ -186,6 +186,8 @@ def check_worker_status():
else:
worker_id = request.args['workerId']
assignment_id = request.args['assignmentId']
+ allow_repeats = CONFIG.getboolean('HIT Configuration', 'allow_repeats')
+ if allow_repeats: # if you allow repeats focus on current worker/assignment combo
try:
part = Participant.que... |
Correctly encode user supplied name in mail From header
This broke initially because someone put their address (containing
commas) as their name. | +from email.utils import formataddr
+
from django.conf import settings
from django.core.mail import get_connection, EmailMultiAlternatives
from django.template.loader import get_template
@@ -19,7 +21,7 @@ def send_feedback_mail(user_name, user_email_addr, subject, message, url):
email = EmailMultiAlternatives(
subject=... |
Update config.yml
update content versions | @@ -5,7 +5,7 @@ jobs:
- image: devdemisto/content-build:3.0.0.3368 # disable-secrets-detection
resource_class: medium+
environment:
- CONTENT_VERSION: "19.11.0"
+ CONTENT_VERSION: "19.11.1"
SERVER_VERSION: "5.0.0"
GIT_SHA1: "93fab15da3ae0b427e63510836018f8efd6b7b5e" # guardrails-disable-line disable-secrets-detection
s... |
only load unloadable sensors on sensor page
### How I Tested These Changes
load the sensor page with unloadable schedules - see they are no longer fetched and filtered client side | @@ -10,7 +10,6 @@ import {UnloadableSensors} from '../instigation/Unloadable';
import {SENSOR_FRAGMENT} from '../sensors/SensorFragment';
import {SensorInfo} from '../sensors/SensorInfo';
import {SensorsTable} from '../sensors/SensorsTable';
-import {InstigationType} from '../types/globalTypes';
import {Loading} from '... |
Add test to make sure on_node_updated task is called properly
Test is called on title change with correct kwargs
Test is only called once when both the title and contributors are changed | @@ -3383,18 +3383,35 @@ class TestOnNodeUpdate:
def teardown_method(self, method):
handlers.celery_before_request()
- @mock.patch('osf.models.node.enqueue_task')
- def test_enqueue_called(self, enqueue_task, node, user, request_context):
+ def test_on_node_updated_called(self, node, user, request_context):
node.title =... |
Update installation_and_setup.rst
dont know if (solph) is correct. Only tried with cbc | @@ -231,8 +231,9 @@ You can choose from the list of examples
* storage_investment (solph)
* simple_dispatch (solph)
* csv_reader_investment (solph)
- * flexible_modelling (solph)
* csv_reader_dispatch (solph)
+ * add_constraints (solph)
+ * variable_chp (solph)
Test the installation and the installed solver:
|
Fixed attribute decoding for elements with simpleType
- Validate xml and xsi admitted attributes (TODO: tests for this) | @@ -346,8 +346,19 @@ class XsdElement(Sequence, XsdAnnotated, ValidatorMixin, ParticleMixin, XPathMix
yield element_decode_hook(ElementData(elem.tag, *result), self)
del result
else:
- if elem.attrib:
- yield self._validation_error("a simpleType element can't has attributes.", validation, elem)
+ # simpleType
+ if not ... |
updates installation link
closes | @@ -45,7 +45,7 @@ IceVision is the first agnostic computer vision framework to offer a curated col
pip install icevision[all]
```
-For more installation options, check our [docs](https://airctic.github.io/icevision/install/).
+For more installation options, check our [docs](https://airctic.com/0.7.0/install/).
**Import... |
Update environmental_inhalers.json
I have added codes for generic respimat | " WHERE form_route IN ('pressurizedinhalation.inhalation', 'powderinhalation.inhalation')",
" AND bnf_code LIKE '03%' ",
" AND bnf_code NOT LIKE '0301011R0%' ",
+ " AND bnf_name NOT LIKE '%Respimat%' ",
+ " AND bnf_code NOT LIKE '0301040X0AA%' ",
+ " AND bnf_code NOT LIKE '0301011Z0AA%' ",
+ " AND bnf_code NOT LIKE '03... |
tests: handle `-` in the sfdisk version test
When a `-` is in the version (meaning a version such as: `2.38-rc1`),
take only the part before the dash.
This closes | @@ -33,6 +33,10 @@ def have_sfdisk_with_json():
data = r.stdout.strip()
vstr = data.split(" ")[-1]
+
+ if "-" in vstr:
+ vstr = vstr.split("-")[0]
+
ver = list(map(int, vstr.split(".")))
return ver[0] >= 2 and ver[1] >= 27
|
Use domain with tracker store factory
Make sure domain is passed to tracker store factory for proper validation (closes ) | @@ -168,7 +168,9 @@ def _run_markers(
telemetry.track_markers_parsed_count(num_markers, max_depth, branching_factor)
- tracker_loader = _create_tracker_loader(endpoint_config, strategy, count, seed)
+ tracker_loader = _create_tracker_loader(
+ endpoint_config, strategy, domain, count, seed
+ )
def _append_suffix(path: ... |
Uncast data before writing out
Copied from
Reverts the str() cast introduced in | @@ -22,8 +22,9 @@ import re
import sys
from io import open
import logging
+from copy import deepcopy
-from .casting import cast_data
+from .casting import cast_data, uncast_data
__all__ = [
"load", "loads", "dump", "dumps", # TODO Add GlyphsEncoder / GlyphsDecoder ala json module
@@ -218,7 +219,8 @@ class Writer(object... |
Update malicious_js.txt
Added description for specific trails. | @@ -10,6 +10,9 @@ ejyoklygase.tk
examhome.net
mp3menu.org
uustoughtonma.org
+
+# Generic detection for compromised Bitrix CMS
+
/lib/crypta.js
/bitrix/js/main/core/core_loader.js
/bitrix/js/main/core/core_tasker.js
|
Fix workspace property on WorkspaceProcessContext
Summary: This property was returning the wrong value. It not used anywhere, so this diff just removes it.
Test Plan: unit
Reviewers: dgibson | @@ -197,10 +197,6 @@ def create_request_context(self):
def instance(self):
return self._instance
- @property
- def workspace(self):
- return self._instance
-
@property
def repository_locations(self):
return list(self._repository_locations.values())
|
Add timing outputs for decoding phase to know how much time is spent in decoder
fetching and post processing. | @@ -1045,6 +1045,7 @@ class Decoder(base_runner.BaseRunner):
start_time = time.time()
while num_examples_metric.total_value < samples_per_summary:
tf.logging.info('Fetching dec_output.')
+ fetch_start = time.time()
run_options = config_pb2.RunOptions(
report_tensor_allocations_upon_oom=False)
if self._summary_op is Non... |
Incorporated dwmcqueen fix
for dvd calls this may not be useful. But incorporating anyway.
I think maybe modifications to the ui omdb search would be good. | @@ -243,6 +243,9 @@ def get_video_details(job):
logging.debug("Trying title: " + title)
response = callwebservice(job, omdb_api_key, title, year)
logging.debug("response: " + response)
+ if response == "fail":
+ logging.debug("Removing year...")
+ response = callwebservice(job, omdb_api_key, title, "")
def callwebservi... |
Ignore empty material slot for displacement
The Displacement shader slot parser was trying to work in case of empty material slot, causing exception.
Changes made:
added forgotten check for empty material slot;
added explicit displacement removal for correct viewport update. | @@ -165,9 +165,11 @@ def assign_materials(rpr_context: RPRContext, rpr_shape: pyrpr.Shape,
rpr_shape.set_material(None)
# sync displacement for single material shape only
- if len(material_slots) == 1:
+ if len(material_slots) == 1 and material_slots[0].material:
rpr_displacement = material.sync(rpr_context, material_s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.