message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
With no exploration, action selection is now based on visit counts
Instead of value | @@ -19,9 +19,12 @@ class Node(object):
self.count = 0
self.value = 0
- def select_action(self, temperature):
+ def select_action(self, temperature=10):
if self.children:
+ if temperature > 0:
return max(self.children.keys(), key=(lambda key: self.children[key].selection_strategy(temperature)))
+ else:
+ return max(self... |
feat: exported several useful libraries
Added DataLayerProvenance, Storage, ThreadedQueue, EmptyVolumeException
to possible from cloudvolume import * | -from .cloudvolume import CloudVolume
+from .cloudvolume import CloudVolume, EmptyVolumeException
+from .provenance import DataLayerProvenance
from .storage import Storage
+from .threaded_queue import ThreadedQueue
\ No newline at end of file
|
Kill _th_fill binding, which isn't used anymore.
Summary:
Pull Request resolved:
We still keep the function in TH, since it's called from within TH.
Test Plan: Imported from OSS | - IntArrayRefSize size
- IntArrayRef stride
]]
-[[
- name: _th_fill_
- return: self
- cname: fill
- variants: function
- cpu_half: True
- cpu_bool: True
- cuda_bool: True
- cpu_bfloat16: True
- options:
- - arguments:
- - THTensor* self
- - real value
- - zero_dim_tensor_only: True
- arguments:
- - THTensor* self
- - T... |
fix(email): handle case where cstr returns text_type of str
chardet requires input to be bytes or bytesarray, but sometimes
frappe.cstr() returns text_type of str without encoding it to utf-8 | @@ -480,7 +480,7 @@ class Email:
"""Detect chartset."""
charset = part.get_content_charset()
if not charset:
- charset = chardet.detect(cstr(part))['encoding']
+ charset = chardet.detect(safe_encode(cstr(part)))['encoding']
return charset
|
quota: Fix calculating org size
Fixing database call which will now match on manifest vs repository to correctly calculate org size. | @@ -244,10 +244,10 @@ def cache_namespace_repository_sizes(namespace_name):
now_ms = get_epoch_timestamp_ms()
subquery = (
- Tag.select(Tag.repository_id)
+ Tag.select(Tag.manifest)
.where(Tag.hidden == False)
.where((Tag.lifetime_end_ms >> None) | (Tag.lifetime_end_ms > now_ms))
- .group_by(Tag.repository_id)
+ .group... |
Update manual.py
more printing of version info for debugging | @@ -302,7 +302,8 @@ def main():
silent = args['auto']
tag = True
- safePrint("%sbit Python." % (struct.calcsize("P") * 8))
+ safePrint("Python %s-bit %s." % (struct.calcsize("P") * 8, sys.version))
+ safePrint("Guessit version: %s." % guessit.__version__)
# Settings overrides
if(args['config']):
|
bugfix - notifier changes the vertex as it notifies
This causes following notifiers to use the changed value.
So worker processes, that receive their data by these notifications,
receive a changed value. specifically alarms contain a redundant field
'resource' | @@ -18,6 +18,7 @@ from vitrage.common.constants import EntityCategory
from vitrage.common.constants import NotifierEventTypes
from vitrage.common.constants import VertexProperties as VProps
from vitrage.evaluator.actions import evaluator_event_transformer as evaluator
+from vitrage.graph.driver.networkx_graph import ve... |
Use nodejs v8
Use current version of nodejs, since v7 is not maintained
anymore. | yum: name=epel-release
- name: Install nodejs
- shell: curl -sL https://rpm.nodesource.com/setup_7.x | bash - && yum install -y nodejs
+ shell: curl -sL https://rpm.nodesource.com/setup_8.x | bash - && yum install -y nodejs
- name: Check node version
command: node -v
|
Another minor fix to get a system test to work.
A missed "frequency" column was still being used in the dataset tests. | @@ -104,11 +104,11 @@ Gx^4 20 80
self.assertEqual(ds[('Gx','Gy')][('1',)], 60)
dataset_txt2 = \
-"""## Columns = 0 frequency, count total
+"""## Columns = 0 count, 1 count
{} 0 100
-Gx 0.1 100
-GxGy 0.4 100
-Gx^4 0.2 100
+Gx 10 90
+GxGy 40 60
+Gx^4 20 80
"""
with open(temp_files + "/TinyDataset2.txt","w") as output:
ou... |
ansible: remove seemingly unused raw_params
Traced git log all the way back to beginning of time, and checked
Ansible versions starting Jan 2016. Zero clue where this came from, but
the convention suggests it came from Ansible at some point. | @@ -93,16 +93,13 @@ class Runner(object):
Subclasses may override `_run`()` and extend `setup()` and `revert()`.
"""
def __init__(self, module, service_context, emulate_tty=None,
- raw_params=None, args=None, env=None):
+ args=None, env=None):
if args is None:
args = {}
- if raw_params is not None:
- args['_raw_params'... |
Fixed data path problem in visualization
Fixed data path problem in visualization | @@ -18,6 +18,7 @@ import gym
import numpy as np
import os
import sys
+import time
import ray
try:
@@ -100,7 +101,10 @@ def visualizer_rllib(args):
sys.exit(1)
sim_params.restart_instance = False
- sim_params.emission_path = './test_time_rollout/'
+ dir_path = os.path.dirname(os.path.realpath(__file__))
+ emission_path ... |
Updated changelog
[formerly f3dbb5315dcd0bce2e37a1706f22b109682f5276] [formerly ed77e400e03cc6da83430580fc202d962eef6bf2] [formerly b70d6dca8cfc0f974bca21019fb37bebe547f139] | @@ -16,11 +16,20 @@ These are taken from the GitHub Issues tab.
## 4.1
#### Features
* Vigenere is now enabled, due to massive performance gains from the C++ core
+* Pytest can now be run over the entire program, from main to the output. This means we can crate tests that test the whole of Ciphey, not just small unit t... |
Update active_directory_password_spraying.yml
description update | @@ -4,19 +4,24 @@ version: 1
date: '2021-04-07'
author: Mauricio Velazco, Splunk
type: batch
-description: Monitor for activities and techniques associated with Password Spraying attacks against Active Directory environments.
+description: Monitor for activities and techniques associated with Password Spraying attacks ... |
Re-add test_two_families to run_tests
Add back test_two_families to the validator set of tests. | @@ -192,6 +192,8 @@ test_battleship() {
test_validator() {
run_docker_test ./validator/tests/unit_validator.yaml
copy_coverage .coverage.validator
+ run_docker_test test_two_families
+ copy_coverage .coverage.test_two_families
run_docker_test test_events_and_receipts
copy_coverage .coverage.test_events_and_receipts
run... |
Very basic cyclic prng log to track exactly when the cycles restart
Closes | from threading import Lock
import random
import sympy
+from datetime import datetime
mutex = Lock()
+LOGFILE = 'prng.log'
+
def modexp(b, e, m):
bits = [(e >> bit) & 1 for bit in range(0, e.bit_length())]
s = b
@@ -16,6 +19,10 @@ def modexp(b, e, m):
s %= m
return v
+def log(message):
+ with open(LOGFILE, 'a') as f:
+ ... |
Add monitor failure description to Discord notification
Include more information about the failures, so it will be easier to
understand what happened to a specific job just looking at the Discord
notification message content. | @@ -76,18 +76,26 @@ class CustomSendDiscordMessage(SendDiscordMessage):
stats = self.data.stats
n_scraped_items = stats.get("item_scraped_count", 0)
+ failures_report = []
+ for result in self.result.monitor_results:
+ if result.status != "FAIL":
+ continue
+ failures_report.append(f"{result.monitor.name}: {result.reas... |
Quick add some explanation about the resampling in slowfast.
* Quick add some explanation about the resampling in slowfast.
Fix.
* Fix docstring.
* Fix typo. | @@ -371,9 +371,11 @@ class ResNet3dSlowFast(nn.Module):
Args:
pretrained (str): The file path to a pretrained model.
resample_rate (int): A large temporal stride ``resample_rate``
- on input frames, corresponding to the :math:`\\tau` in the paper.
- i.e., it processes only one out of ``resample_rate`` frames.
- Default... |
Fix env bugs
Fix env bugs | @@ -9,7 +9,7 @@ RUN apt-get update && \
rm go.tgz
ENV GOROOT=/usr/local/go GOPATH=/root/gopath
-ENV PATH=${PATH}:${GOROOT}/bin
+ENV PATH=\${PATH}:\${GOROOT}/bin
CMD ["sh", "-c", "cd /root/gopath/src/github.com/PaddlePaddle/cloud/go/cmd/pfsserver && go get ./... && go build"]
EOF
|
fix typo in config
was a `,`, not a `:`, so 'options' was a set rather than a dictionary. | @@ -267,7 +267,12 @@ class Config(object):
'check-templated-letter-state': {
'task': 'check-templated-letter-state',
'schedule': crontab(day_of_week='mon-fri', hour=9, minute=0),
- 'options': {'queue', QueueNames.PERIODIC}
+ 'options': {'queue': QueueNames.PERIODIC}
+ },
+ 'check-precompiled-letter-state': {
+ 'task': ... |
help: Replace perfect-scrollbar with simplebar in help pages.
The perfect-scrollbar library created one major problem, which is that
`ctrl-F` didn't work, and several smaller problems.
Fixes and fixes | /* eslint indent: "off" */
-import PerfectScrollbar from 'perfect-scrollbar';
+import SimpleBar from 'simplebar';
function registerCodeSection($codeSection) {
const $li = $codeSection.find("ul.nav li");
@@ -78,10 +78,12 @@ function render_code_sections() {
function scrollToHash(container) {
var hash = window.location.h... |
Update run_server documentation.
Fixes | @@ -34,7 +34,7 @@ python butler.py run_server
```
It may take a few seconds to start. Once you see an output line like
-`INFO <timestamp> admin_server.py:<num>] Starting admin server`, you can see the web interface by navigating to [http://localhost:9000](http://localhost:9000).
+`[INFO] Listening at: http://0.0.0.0:90... |
Fix no-else-return pylint error
Addresses pylint errors related to no-else-return on pymatgen.io.vasp.outputs | @@ -995,7 +995,6 @@ class Vasprun(MSONable):
[vbm_spins[0], vbm_spins[1]],
[vbm_spins_kpoints[0] == cbm_spins_kpoints[0], vbm_spins_kpoints[1] == cbm_spins_kpoints[1]],
)
- else:
return max(cbm - vbm, 0), cbm, vbm, vbm_kpoint == cbm_kpoint
def calculate_efermi(self):
@@ -5352,7 +5351,6 @@ class Eigenval:
[vbm_spins[0],... |
[Android][RPC] Fix Vulkan runtime support.
Update Android RPC app to reflect the new
Vulkan source code tree structure. | #endif
#ifdef TVM_VULKAN_RUNTIME
-#include "../src/runtime/vulkan/vulkan.cc"
+#include "../src/runtime/vulkan/vulkan_buffer.cc"
+#include "../src/runtime/vulkan/vulkan_common.cc"
+#include "../src/runtime/vulkan/vulkan_device.cc"
+#include "../src/runtime/vulkan/vulkan_device_api.cc"
+#include "../src/runtime/vulkan/vu... |
Missing schedule documentation
Added guide for schedules supported by library but not directly available using `python manage.py create_jobs <app name>` command | @@ -33,16 +33,20 @@ Create a job
------------
A job is a Python script with a mandatory ``BaseJob`` class which extends from
-``HourlyJob``, ``DailyJob``, ``WeeklyJob``, ``MonthlyJob`` or ``Yearly``.
+``MinutelyJob``, ``QuarterHourlyJob``, ``HourlyJob``, ``DailyJob``, ``WeeklyJob``, ``MonthlyJob`` or ``Yearly``.
It has... |
Update elf_mirai.txt
Duplication | @@ -26414,64 +26414,6 @@ scan.aykashi.xyz
# Reference: https://twitter.com/0xrb/status/1293852159000211458
-/OneDrive.arc
-/OneDrive.arm
-/OneDrive.arm4
-/OneDrive.arm4l
-/OneDrive.arm4t
-/OneDrive.arm4tl
-/OneDrive.arm4tll
-/OneDrive.arm5
-/OneDrive.arm5l
-/OneDrive.arm5n
-/OneDrive.arm6
-/OneDrive.arm64
-/OneDrive.ar... |
ENH: Remove recurring check
The 'itemsize != 0' condition was already verified. | @@ -420,7 +420,7 @@ PyArray_GetStridedCopyFn(int aligned, npy_intp src_stride,
/* contiguous dst */
if (itemsize != 0 && dst_stride == itemsize) {
/* contiguous src */
- if (itemsize != 0 && src_stride == itemsize) {
+ if (src_stride == itemsize) {
return &_contig_to_contig;
}
/* general src */
@@ -592,7 +592,7 @@ NPY_... |
ParameterisedHolderTest : Update for signal message changes
The exceptions are reported as messages as of | @@ -1003,7 +1003,14 @@ class ParameterisedHolderTest( GafferTest.TestCase ) :
ph = GafferCortex.ParameterisedHolderNode()
ph.setParameterised( c )
- self.assertRaises( RuntimeError, ph["parameters"]["driver"].setValue, 10 )
+ # capture the message that will be emitted by the signal handler
+ with IECore.CapturingMessag... |
used PlaceholderLineEdit
Changed lambda to separate method as lamba is supposed to have some issue during QtDestroy | @@ -20,6 +20,7 @@ from openpype.tools.utils.models import (
ProjectModel,
ProjectSortFilterProxy
)
+from openpype.tools.utils import PlaceholderLineEdit
class StandaloneOverlayWidget(QtWidgets.QFrame):
@@ -61,7 +62,7 @@ class StandaloneOverlayWidget(QtWidgets.QFrame):
btns_layout.addWidget(cancel_btn, 0)
btns_layout.ad... |
Change comments in utils.py.
Removed completed functions-in-use TODO. | # See the License for the specific language governing permissions and
# limitations under the License.
"""Supporting methods for the classification pipeline."""
-# TODO(Sahana): Verify if all the methods are being used by the pipeline.
import argparse
from typing import Any, Dict, List
|
BLD: compare platform.architecture() correctly
The function returns a tuple of values, of which we need to check the first.
Fixes | @@ -290,7 +290,7 @@ def add_system_root(library_root):
vcpkg = shutil.which('vcpkg')
if vcpkg:
vcpkg_dir = os.path.dirname(vcpkg)
- if platform.architecture() == '32bit':
+ if platform.architecture()[0] == '32bit':
specifier = 'x86'
else:
specifier = 'x64'
|
Reduce min_pending_latency within allowable values
[clowntown] | @@ -10,7 +10,7 @@ automatic_scaling:
target_cpu_utilization: 0.95
target_throughput_utilization: 0.95
max_concurrent_requests: 20
- min_pending_latency: 30000ms
+ min_pending_latency: 15000ms
max_pending_latency: automatic
builtins:
|
[deflakey] test_error_handling.py in workflow
## Why are these changes needed?
This test timeout. Move it to large.
```
WARNING: //python/ray/workflow:tests/test_error_handling: Test execution time (288.7s excluding execution overhead) outside of range for MODERATE tests. Consider setting timeout="long" or size="large"... | @@ -7,7 +7,13 @@ load("//bazel:python.bzl", "py_test_module_list")
SRCS = glob(["**/conftest.py"])
-LARGE_TESTS = ["tests/test_recovery.py", "tests/test_basic_workflows_2.py", "tests/test_metadata.py", "tests/test_events.py"]
+LARGE_TESTS = [
+ "tests/test_error_handling.py",
+ "tests/test_recovery.py",
+ "tests/test_b... |
Make doc test as python3 only
Summary: I was cleaning up some virtual environments and ran into this
Test Plan: Run unit tests in python 2
Reviewers: max, alangenfeld | @@ -38,6 +38,7 @@ def _path_starts_with(path, starts_with):
# (probably hard since tests are collected before fixtures are executed -- but maybe we can lever
# the checked-in snapshots for this) or collect the test failures and display all of them.
@pytest.mark.docs
+@pytest.mark.skipif(sys.version_info < (3, 6), reaso... |
[IMPR] set -ignore option to CANCEL.MATCH by default
set -ignore option to CANCEL.MATCH by default to ignore ISBN errors
update module doc string
simplify arg parsing | @@ -16,7 +16,12 @@ The following parameters are supported:
inserted.
-ignore: Ignores if an error occurred and either skips the page or
- only that method. It can be set to 'page' or 'method'.
+ only that method. It can be set to:
+ all - dos not ignore errors
+ match - ignores ISBN related errors (default)
+ method - ... |
Move common tools to one function
So they can be applied to all tools. | @@ -28,10 +28,7 @@ def apply_default_tool_set(view, modeling_language, event_manager, rubberband_st
)
view.add_controller(*text_edit_tools(view, event_manager))
view.add_controller(rubberband_tool(view, rubberband_state))
- view.add_controller(*scroll_tools(view))
- view.add_controller(zoom_tool(view))
- view.add_contr... |
Add exercise conventions
closes | Exercism exercises in Python
+
## Contributing Guide
Please see the [contributing guide](https://github.com/exercism/x-common/blob/master/CONTRIBUTING.md)
+
## Working on the Exercises
We welcome both improvements to the existing exercises and new exercises.
-A pool of exercise ideas can be found in the [x-common repo]... |
fix(background jobs): Show method name on Background Jobs page.
After background jobs page doesn't provide any information. | @@ -28,6 +28,7 @@ def get_info(show_failed=False):
if j.kwargs.get('site')==frappe.local.site:
jobs.append({
'job_name': j.kwargs.get('kwargs', {}).get('playbook_method') \
+ or j.kwargs.get('kwargs', {}).get('job_type') \
or str(j.kwargs.get('job_name')),
'status': j.get_status(), 'queue': name,
'creation': format_dat... |
rolling_update: add any_errors_fatal
If a failure occurs in ceph-validate, the upgrade playbook keeps running
where we expect it to fail. | - "{{ iscsi_gw_group_name|default('iscsigws') }}"
- "{{ grafana_server_group_name|default('grafana-server') }}"
+ any_errors_fatal: True
become: True
gather_facts: False
vars:
|
fix: check whether the cluster is healthy
This commit unblocks the CI and only check that the
cluster is healthy. | changed_when: "cmd_res.rc == 0"
retries: 60
delay: 60
+ until: "'Healthy' in cmd_res.stdout"
# We should have all the master and worker nodes started
- until: cmd_res.stdout_lines | list | count == ( groups['all_control_plane_nodes'] | count + groups['all_compute_nodes'] | count )
+ # TODO:FIXME: Count and compare with... |
Update helm-chart readme to reflect current image
Default image tag was incorrectly stated, this commit corrects it. | @@ -46,7 +46,7 @@ The following tables lists the configurable parameters of the Ambassador chart a
| Parameter | Description | Default |
| ------------------------------- | ------------------------------------------ | ---------------------------------------------------------- |
| `image.repository` | Image | `quay.io/d... |
Skip cephadm playbook when there is no mon or nfs group
This change just make us able to skip the cephadm playbook when no
mons or nfs nodes are defined by the inventory. | @@ -579,10 +579,6 @@ outputs:
ms_client_mode: secure
- {get_attr: [DefaultCephConfigOverrides, value, vars]}
cephadm_extra_vars: {get_attr: [CephAdmVars, value, vars]}
- - name: Prepare cephadm user and keys
- include_role:
- name: tripleo_run_cephadm
- tasks_from: enable_ceph_admin_user.yml
# This is supposed to run a... |
fix order time indication
fix order time indication | @@ -353,6 +353,11 @@ class Mt5Gateway(BaseGateway):
self.local_sys_map[local_id] = sys_id
self.sys_local_map[sys_id] = local_id
+
+ order = self.orders.get(local_id, None)
+ if local_id and order:
+ order.datetime = generate_datetime(data["order_time_setup"])
+
# Update order data
elif trans_type in {TRADE_TRANSACTION_... |
Fix command line parameters (remove -P in front of URI)
I removed the `-P` flags in front of `examples/hyperparam` because it gave me the error "Please specify URI" on WSL2 with Ubuntu 20.04. | @@ -51,15 +51,15 @@ Runs the Keras deep learning training with default parameters and log it in expe
.. code-block:: bash
- mlflow run -e random --experiment-id <hyperparam_experiment_id> -P examples/hyperparam
+ mlflow run -e random --experiment-id <hyperparam_experiment_id> examples/hyperparam
.. code-block:: bash
- ... |
Skip this test if pywin32 is not present
Skip this test if pywin32 is not present because it's not part of Spyder
listed dependencies | # Local imports
from spyder.py3compat import PY3
from spyder.widgets import pathmanager as pathmanager_mod
+from spyder.utils.programs import is_module_installed
@pytest.fixture
@@ -62,8 +63,9 @@ def test_check_uncheck_path(qtbot):
assert pathmanager.not_active_pathlist == []
-@pytest.mark.skipif(os.name != 'nt',
- rea... |
Handle admin_ips login error
While this could provide information leakage, I think the benefit of knowing the issue to new RTB admins (particularly since it defaults to localhost) outweighs the risk. | @@ -77,6 +77,14 @@ class LoginHandler(BaseHandler):
and not user.is_admin()
):
self.redirect("/user/missions/firstlogin")
+ elif user.is_admin() and not self.allowed_ip():
+ self.render(
+ "public/login.html",
+ info=[
+ "Succesfull credentials, but administration is restriceted via IP. See 'admin_ips' in configuration... |
Allow users to order by value column
Tks for the solution
Tks for the bug report | @@ -248,6 +248,7 @@ class ReimbursementModelAdmin(SimpleHistoryAdmin):
return 'R$ {:.2f}'.format(obj.total_net_value).replace('.', ',')
value.short_description = 'valor'
+ value.admin_order_field = 'total_net_value'
def still_available(self, obj):
return obj.available_in_latest_dataset
|
Fix some major issues with the LGPO module
Issue with the movement of the registry object to salt.utils
Issues with dict values in the debug
Fix __virtual__ | @@ -35,7 +35,7 @@ Current known limitations
- lxml
- uuid
- struct
- - salt.modules.reg
+ - salt.utils.win_reg
'''
# Import Python libs
from __future__ import absolute_import, unicode_literals, print_function
@@ -98,7 +98,7 @@ try:
import lxml
import struct
from lxml import etree
- from salt.modules.reg import Registry... |
POSIX mode for shlex.split doesn't handle spaces
This shows up on Python 3.7 - this change may introduce a regression
on other Python envs on Windows. May need to reinstate. | @@ -935,19 +935,10 @@ def user():
return os.getenv("USER") or ""
def shlex_split(s):
- s = s or ""
- return shlex.split(s)
-
- # TODO: this causes problems! Do we need it?
- posix = PLATFORM != "Windows"
# If s is None, this call will block (see
# https://bugs.python.org/issue27775)
s = s or ""
- parts = shlex.split(s,... |
move cutadapt param.opts to the end of call to allow overriding presets
by user | @@ -19,7 +19,7 @@ if paired:
threads: 8
conda: CONDA_SHARED_ENV
shell: """
- cutadapt {params.opts} -j {threads} -e 0.1 -q 16 -O 3 --trim-n --minimum-length 25 -a AGATCGGAAGAGC -A AGATCGGAAGAGC \
+ cutadapt -j {threads} -e 0.1 -q 16 -O 3 --trim-n --minimum-length 25 -a AGATCGGAAGAGC -A AGATCGGAAGAGC {params.opts} \
-o ... |
Detect spyder
If running in spyder ide then use no_notebook. | +import os
from ._version import get_versions
from .gs_version import glowscript_version
__version__ = get_versions()['version']
@@ -10,6 +11,8 @@ del glowscript_version
def __checkisnotebook(): # returns True if running in Jupyter notebook
try:
+ if any('SPYDER' in name for name in os.environ):
+ return False # Spyder... |
Updates gate optimization in do_long_sequence_gst for propagation.
The gauge optimization performed as a part of do_long_sequence_gst
now includes 'gateset' and '_gaugeGroupEl' in the gauge-opt params
dictionary so that it can be used properly with the
'gauge_propagate_confidence_region_factory' method of an Estimate
o... | @@ -570,7 +570,10 @@ def do_long_sequence_gst_base(dataFilenameOrSet, targetGateFilenameOrSet,
if "comm" not in gaugeOptParams:
gaugeOptParams["comm"] = comm
- go_gs_final = _alg.gaugeopt_to_target(gs_lsgst_list[-1],**gaugeOptParams)
+ gaugeOptParams['returnAll'] = True # so we get gaugeEl to save
+ gaugeOptParams['gat... |
Add mention to dont_merge_cookies in CookiesMiddlewares docs
Add mention to dont_merge_cookies in CookiesMiddlewares docs | @@ -237,6 +237,17 @@ Default: ``True``
Whether to enable the cookies middleware. If disabled, no cookies will be sent
to web servers.
+Notice that if the :class:`~scrapy.http.Request`
+has ``meta['dont_merge_cookies']`` evaluated to ``True``.
+despite the value of :setting:`COOKIES_ENABLED` the cookies will **not** be
... |
Update readme.md
Add case for compiling ops if tensorflow was compiled from source using gcc >= 5.0 | @@ -26,6 +26,13 @@ TF_INC=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')
g++ -std=c++11 -shared word2vec_ops.cc word2vec_kernels.cc -o word2vec_ops.so -fPIC -I $TF_INC -O2 -D_GLIBCXX_USE_CXX11_ABI=0
```
+If tensorflow was compiled from source using gcc >= 5.0, you don't need to append D_GLIBC... |
wait_for event param is now positional only
Closes Closes BOT-33N | @@ -404,7 +404,7 @@ class Incidents(Cog):
def check(payload: discord.RawReactionActionEvent) -> bool:
return payload.message_id == incident.id
- coroutine = self.bot.wait_for(event="raw_message_delete", check=check, timeout=timeout)
+ coroutine = self.bot.wait_for("raw_message_delete", check=check, timeout=timeout)
ret... |
Changed the names of some parameters
This should fix Not sure if it will... | @@ -119,13 +119,13 @@ class CompleteTutorial(BaseTask):
# at the first choices in general, so fully
# random on the whole avatar space is not the way to go either
avatar['skin']=random.randint(0,3)
- avatar['hair']=random.randint(0,3)
- avatar['shirt']=random.randint(0,3)
- avatar['pants']=random.randint(0,3)
- avatar[... |
Update bot/exts/holidays/halloween/candy_collection.py
From | @@ -201,7 +201,7 @@ class CandyCollection(commands.Cog):
inline=False
)
e.add_field(
- name=f'{user.name}' + "'s Candy Score",
+ name="Your Candy Score",
value=get_user_candy_score(),
inline=False
)
|
use SPD solver for diagonally dominant matrices
This patch adds a test for diagonal dominance and switches Pardiso to the SPD
matrix type to benefit from this property. | @@ -264,10 +264,17 @@ class MKLMatrix(Matrix):
upper = numpy.zeros(len(self.data), dtype=bool)
rowptr = numpy.empty_like(self.rowptr)
rowptr[0] = 1
+ diagdom = True
for irow, (n, m) in enumerate(numeric.overlapping(self.rowptr-1), start=1):
d = n + self.colidx[n:m].searchsorted(irow)
upper[d:m] = True
rowptr[irow] = ro... |
add 1D data as curves, not scatter
Even if x values are not monotonic, it can still be a curve (mesh, parametric data...) | """
__authors__ = ["P. Knobel"]
__license__ = "MIT"
-__date__ = "27/06/2017"
+__date__ = "23/10/2017"
import numpy
@@ -175,18 +175,11 @@ class ArrayCurvePlot(qt.QWidget):
xerror=self.__axis_errors,
yerror=y_errors)
- # x monotonically increasing or decreasiing: curve
- elif numpy.all(numpy.diff(x) > 0) or numpy.all(num... |
fix: changed aws to github url for fashion mnist
changed aws to github url for fashion mnist data as aws url comes blocked for me | @@ -155,7 +155,7 @@ def set_hw_parser(parser=None):
default=resource_filename('jina', '/'.join(('resources', 'helloworld.flow.index.yml'))),
help='the yaml path of the index flow')
gp.add_argument('--index-data-url', type=str,
- default='http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/train-images-idx3-ubyte... |
ocs_ci/ocs/pillowfight.py
- Docstring fix | @@ -68,8 +68,8 @@ class PillowFight(object):
Args:
replicas (int): Number of pod replicas
- num_items (str): Number of items to be loaded to the cluster
- num_threads (str): Number of threads
+ num_items (int): Number of items to be loaded to the cluster
+ num_threads (int): Number of threads
"""
ocp_local = OCP(namesp... |
middlewares: session: fix session id generation
Previously the session id would always be
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' | @@ -23,7 +23,7 @@ def generate_random_string(length):
for i in range(length):
characters.append(random.choice(choices))
- return ''.join(choices)
+ return ''.join(characters)
def generate_session_key(connection):
|
Factor log_exceptions into a configuration parameter
This simplifies away unnecessary propagation, cleans up argument lists.
As far as I can tell, log_exceptions is True in all execution paths. It seems that removed the last occasion of it being (spuriously) set to False. | @@ -116,6 +116,7 @@ class RemoteScheduler(object):
self._rpc_retry_attempts = config.getint('core', 'rpc-retry-attempts', 3)
self._rpc_retry_wait = config.getint('core', 'rpc-retry-wait', 30)
+ self._log_exceptions = config.getboolean('core', 'log-exceptions', True)
if HAS_REQUESTS:
self._fetcher = RequestsFetcher(requ... |
Suppressing hypothesis health check for qnnpack_add
Summary: Pull Request resolved:
Test Plan: Imported from OSS | @@ -6,6 +6,7 @@ import torch.jit
import torch.nn.functional as F
from torch.nn.modules.utils import _pair
+from hypothesis import settings, HealthCheck
from hypothesis import assume, given
from hypothesis import strategies as st
import hypothesis_utils as hu
@@ -1520,6 +1521,7 @@ class TestQNNPackOps(TestCase):
self.as... |
Move sfp_mnemonics to Passive DNS category
Move sfp_mnemonics from `Search Engine`s to `Passive DNS` category | @@ -18,7 +18,7 @@ import socket
from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEvent
class sfp_mnemonic(SpiderFootPlugin):
- """Mnemonic PassiveDNS:Footprint,Investigate,Passive:Search Engines::Obtain Passive DNS information from PassiveDNS.mnemonic.no."""
+ """Mnemonic PassiveDNS:Footprint,Investigate,Passi... |
purge: ceph-crash purge fixes
This fixes the service file removal and makes the playbook
call `systemctl reset-failed` on the service because in Ceph
Nautilus, ceph-crash doesn't handle `SIGTERM` signal.
Closes: | enabled: no
failed_when: false
+ - name: systemctl reset-failed ceph-crash@{{ 'ceph-crash@' + ansible_facts['hostname'] }} # noqa 303
+ command: "systemctl reset-failed ceph-crash@{{ 'ceph-crash@' + ansible_facts['hostname'] }}"
+ changed_when: false
+ failed_when: false
+ when: containerized_deployment | bool
+
- name... |
Added enable_timeout
Added enable_timeout to see if that fixes the system's inability to find it in the config. | @@ -20,10 +20,13 @@ autofire_coils:
ac_test:
coil: c_test
switch: s_test
+ enable_timeout: False
ac_test_inverted:
coil: c_test2
switch: s_test_nc
+ enable_timout: False
ac_test_inverted2:
coil: c_test2
switch: s_test
reverse_switch: True
+ enable_timeout: False
|
ENH: added io to utils
Added Input/Output methods to the utilities module. | # -*- coding: utf-8 -*-
"""Utilities supporting pysat classes, packages, and the testing environment.
-pysat.utils contains a number of functions used
-throughout the pysat package. This includes conversion
-of formats, loading of files, and user-supplied info
+pysat.utils contains a number of functions used throughout... |
fix bug when using a pretrained model (made IL -> RL fail)
Logging mean return better | @@ -169,9 +169,9 @@ utils.configure_logging(model_name)
# Define obss preprocessor
if 'emb' in args.arch:
- obss_preprocessor = utils.IntObssPreprocessor(model_name, envs[0].observation_space)
+ obss_preprocessor = utils.IntObssPreprocessor(args.pretrained_model or model_name, envs[0].observation_space)
else:
- obss_pr... |
Fix issue causing Windows executable to be missing Python modules
Due to importing some modules indirectly via six, the Windows
executable is not properly including some required python libraries.
The fix is to manually include them when performing the py2exe
freezing. | @@ -231,6 +231,10 @@ setup(
options={
"py2exe": {
# TODO(windows): Auto-generate this list based on contents of the monitors directory.
+ # TODO(czerwin): Add in check to guard against new six.move
+ # dependencies. py2exe does not properly follow dependencies
+ # imported via six.move since they are proxied, so we mus... |
Remove kwargs validation for identity project updates
Keystone supports setting custom properties when updating projects [1]. This
change removes the check in openstacksdk cloud that prevents users from
passing in custom kwargs when calling update_project.
[1]
Story:
Task: 39157 | @@ -98,7 +98,6 @@ class IdentityCloudMixin(_normalize.Normalizer):
return _utils._get_entity(self, 'project', name_or_id, filters,
domain_id=domain_id)
- @_utils.valid_kwargs('description')
def update_project(self, name_or_id, enabled=None, domain_id=None,
**kwargs):
with _utils.shade_exceptions(
|
Resolving "https://pencilcode.net/lib/pencilcodeembed.js - Failed to load resource: net::ERR_CERT_DATE_INVALID" error
This error occurred when the pencilcode SSL cert expired. Since this is outside our control, we ignore the error. | @@ -51,6 +51,12 @@ var CONSOLE_ERRORS_TO_IGNORE = [
_.escapeRegExp(
'http://localhost:9099/www.googleapis.com/identitytoolkit/v3/' +
'relyingparty/verifyPassword?key=fake-api-key'),
+ // This error covers the case when the PencilCode site uses an
+ // invalid SSL certificate (which can happen when it expires).
+ // In ... |
parent: Trim whitespace & e variable in first stage
SSH command size: 439 (-4 bytes)
Preamble size: 8962 (no change) | @@ -336,8 +336,8 @@ class Stream(mitogen.core.Stream):
os.close(r)
os.close(W)
os.close(w)
- os.environ['ARGV0']=e=sys.executable
- os.execv(e,['mitogen:CONTEXT_NAME'])
+ os.environ['ARGV0']=sys.executable
+ os.execv(sys.executable,['mitogen:CONTEXT_NAME'])
os.write(1,'EC0\n')
C=_(sys.stdin.read(PREAMBLE_COMPRESSED_LEN... |
added peers command to console
node versions now stored on VE p2p response | @@ -21,7 +21,7 @@ import fork
log, consensus = logger.getLogger(__name__)
-cmd_list = ['balance', 'mining', 'seed', 'hexseed', 'recoverfromhexseed', 'recoverfromwords', 'stakenextepoch', 'stake', 'address', 'wallet', 'send', 'mempool', 'getnewaddress', 'quit', 'exit', 'search' ,'json_search', 'help', 'savenewaddress', ... |
fix(rename_doc): Use sbool instead of cint
cint("false") returns True which is what is sent by frappe dialog. This
may be required to be fixed in the client alone but making this change
to make the API more "robust" as this has been working in this
particular way for far too long now :') | @@ -9,7 +9,7 @@ from frappe.model.dynamic_links import get_dynamic_link_map
from frappe.model.naming import validate_name
from frappe.model.utils.user_settings import sync_user_settings, update_user_settings_data
from frappe.query_builder import Field
-from frappe.utils import cint
+from frappe.utils.data import sbool
... |
fix: Comment out caching code to fix test
Remove debug flag | @@ -64,8 +64,10 @@ def create_review_points_log(user, points, reason=None):
@frappe.whitelist()
def get_energy_points(user):
- points = frappe.cache().hget('energy_points', user,
- lambda: get_user_energy_and_review_points(user))
+ # points = frappe.cache().hget('energy_points', user,
+ # lambda: get_user_energy_and_re... |
apple: Rewrite comment in tests in generate_access_url_payload.
The original comment is worded rather unclearly, we should explain these
details better. | @@ -2537,8 +2537,9 @@ class AppleIdAuthBackendTest(AppleAuthMixin, SocialAuthBase):
)
def generate_access_url_payload(self, account_data_dict: Dict[str, str]) -> str:
- # The ACCESS_TOKEN_URL endpoint works a bit different in standard Oauth2,
- # where the token_data_dict contains some essential data. we add that data ... |
Cycles Renderer : Remove `m_pause` member
It is not being used for anything. | @@ -2906,7 +2906,6 @@ class CyclesRenderer final : public IECoreScenePreview::Renderer
m_sceneChanged( true ),
m_sessionReset( false ),
m_outputsChanged( true ),
- m_pause( false ),
m_cryptomatteAccurate( true ),
m_cryptomatteDepth( 0 ),
m_seed( 0 ),
@@ -3623,8 +3622,7 @@ class CyclesRenderer final : public IECoreScene... |
Update facebook.py
Reflect on the feedback provided! | @@ -58,7 +58,6 @@ class FacebookOAuth2(BaseOAuth2):
)
return {'username': response.get('username', response.get('name')),
'email': response.get('email', ''),
- 'profile_picture': response.get('profile_picture', ''),
'fullname': fullname,
'first_name': first_name,
'last_name': last_name}
|
[fix] filelist login, changed set to list for entries
modified: flexget/components/sites/sites/filelist.py | @@ -141,12 +141,25 @@ class SearchFileList:
url = BASE_URL + 'takelogin.php'
try:
+ # get validator token
+ response = requests.get(BASE_URL + 'login.php')
+ soup = get_soup(response.content)
+
+ login_validator = soup.find("input", {"name": "validator"})
+
+ if not login_validator:
+ raise plugin.PluginError(
+ 'FileL... |
Remove warning about default hash type
This is no longer needed in the 2017.7 branch as the default
has changed. | @@ -246,9 +246,6 @@ def _fingerprint(public_key, fingerprint_hash_type=None):
if fingerprint_hash_type:
hash_type = fingerprint_hash_type.lower()
else:
- # Set fingerprint_hash_type to md5 as default
- log.warning('Public Key hashing currently defaults to "md5". This will '
- 'change to "sha256" in the 2017.7.0 release... |
Refactor test_roles_client
This patch refactors test_roles_client to include more reusable
fixtures. This is going to ease the development of the tests of some
new library methods in a follow up patch. | @@ -18,32 +18,40 @@ from tempest.tests.lib.services import base
class TestRolesClient(base.BaseServiceTest):
+
+ FAKE_ROLE_ID = "1"
+ FAKE_ROLE_NAME = "test"
+ FAKE_DOMAIN_ID = "1"
+
+ FAKE_ROLE_ID_2 = "2"
+ FAKE_ROLE_NAME_2 = "test2"
+
FAKE_ROLE_INFO = {
"role": {
- "domain_id": "1",
- "id": "1",
- "name": "test",
- "... |
Expose KeyPressEvent in key_binding/__init__.py
This is often used in type annotations. | @@ -5,13 +5,16 @@ from .key_bindings import (
KeyBindingsBase,
merge_key_bindings,
)
-from .key_processor import KeyPress
+from .key_processor import KeyPress, KeyPressEvent
__all__ = [
+ # key_bindings.
"ConditionalKeyBindings",
"DynamicKeyBindings",
"KeyBindings",
"KeyBindingsBase",
"merge_key_bindings",
+ # key_proc... |
Remove redundant word 'strategy'
Most of strategies have word 'strategy' in their display name. | @@ -245,7 +245,7 @@ class BaseStrategy(loadable.Loadable):
should perform.
"""
- LOG.info("Initializing " + self.get_display_name() + " Strategy")
+ LOG.info("Initializing " + self.get_display_name())
if not self.compute_model:
raise exception.ClusterStateNotDefined()
|
Fix browbeat_network conditional
During the browbeat workload installation process we only check
if browbeat_network is defined, but we also need to make sure it
is not none. | - name: Check browbeat_network
fail: msg="browbeat_network needs to be set"
- when: browbeat_network is not defined
+ when: browbeat_network is not defined or browbeat_network is none
- name: Copy userdata files
template:
|
Ignore error when piping output to inexistent program
* Ignore the `BrokenPipeError` which is caused when
the `logging.Handler` tries to `emit` to a closed stream. | @@ -101,6 +101,24 @@ def set_handler_level(hdlr, level):
logging.Handler.setLevel = set_handler_level
+# Here we monkeypatch the `handleError` method of `logging.Handler` in
+# order to ignore `BrokenPipeError` exceptions while keeping the default
+# behavior for all the other types of exceptions.
+
+def handleError(fu... |
Fix missing in _CombinedRegistry.bindings.
This method was never called, so not really a bug. Found thanks to the new mypy
release. | @@ -1326,6 +1326,7 @@ class _CombinedRegistry(KeyBindingsBase):
KeyBindings object."""
raise NotImplementedError
+ @property
def bindings(self) -> List[Binding]:
"""Not needed - this object is not going to be wrapped in another
KeyBindings object."""
|
Minor implementation improvements
Use `contextlib.suppress` instead of `try/except/pass`.
Check explicitly for `None` so as to allow empty strings. | @@ -13,6 +13,7 @@ __all__ = [
]
+import contextlib
import functools
import glob
import inspect
@@ -802,21 +803,15 @@ class RegressionTest(RegressionMixin, jsonext.JSONSerializable):
if name is not None:
self.name = name
- try:
- if not self.descr:
- self.descr = self.name
-
- except AttributeError:
# Pass if descr is a... |
docker: fix and improve build_locally.sh
Cotainers are now tagged with the correct version. Plain logging is now used
and there is the option to pass parameters to the buildx command. | @@ -9,6 +9,6 @@ KEYLIME_DIR=${2:-"../../"}
./generate-files.sh ${VERSION}
for part in base registrar verifier tenant; do
- docker buildx build -t keylime_${part} -f ${part}/Dockerfile $KEYLIME_DIR
+ docker buildx build -t keylime_${part}:${VERSION} -f ${part}/Dockerfile $KEYLIME_DIR --progress plain ${@:3}
rm -f ${part... |
Change git URL in README to https
Like in this URL won't work for people who do not have a GitHub SSH key, whereas a https URL should work for anyone. | @@ -57,7 +57,7 @@ or a Git URI::
mlflow run examples/sklearn_elasticnet_wine -P alpha=0.4
- mlflow run git@github.com:mlflow/mlflow-example.git -P alpha=0.4
+ mlflow run https://github.com/mlflow/mlflow-example.git -P alpha=0.4
See ``examples/sklearn_elasticnet_wine`` for a sample project with an MLproject file.
|
(mod/docs)adding `import asyncio`
might make the docs a bit clearer | @@ -82,6 +82,9 @@ if that's something you would want. Let's add this view in our `views.py` file:
.. code-block:: python
from api.commands import inittasks as tasklist
+ import asyncio
+
+ ...
class TaskView(APIView):
def get(self, request):
|
Added new option `skip` to dependencies which can be used to suppress
installation of folders under unpackaged/pre or unpackaged/post | @@ -565,6 +565,10 @@ class UpdateDependencies(BaseSalesforceMetadataApiTask):
)
)
+ skip = dependency.get('skip')
+ if not isinstance(skip, list):
+ skip = [skip,]
+
# Initialize github3.py API against repo
gh = self.project_config.get_github_api()
repo_owner, repo_name = dependency['github'].split('/')[3:5]
@@ -587,6 ... |
core: more descriptive graceful shutdown timeout error
Accounts for timers too
Tidy up a wordy comment further down the file | @@ -3333,10 +3333,10 @@ class Broker(object):
self._loop_once(max(0, deadline - time.time()))
if self.keep_alive():
- LOG.error('%r: some streams did not close gracefully. '
- 'The most likely cause for this is one or '
- 'more child processes still connected to '
- 'our stdout/stderr pipes.', self)
+ LOG.error('%r: pe... |
framework/instruments: add ManagedCallback __repr__
Add a __repr__ for ManagedCallback callback to prove a useful
representation in logging. | @@ -280,6 +280,12 @@ class ManagedCallback(object):
else:
raise
+ def __repr__(self):
+ text = 'ManagedCallback({}, {})'
+ return text.format(self.instrument.name, self.callback.im_func.func_name)
+
+ __str__ = __repr__
+
# Need this to keep track of callbacks, because the dispatcher only keeps
# weak references, so if... |
use keyword arguments to send argument to writeGlyphToString
the order was wrong... | @@ -290,12 +290,19 @@ class RGlyph(RBaseObject, BaseGlyph):
def _loadFromGLIF(self, glifData):
try:
- readGlyphFromString(glifData, glyphObject=self.naked(),
- pointPen=self.getPointPen())
+ readGlyphFromString(
+ aString=glifData,
+ glyphObject=self.naked(),
+ pointPen=self.getPointPen()
+ )
except GlifLibError:
raise... |
[microTVM][Zephyr] Disable test_armv7m_intrinsic since it's broken
add xfail | @@ -104,12 +104,12 @@ def _apply_desired_layout_no_simd(relay_mod):
@tvm.testing.requires_micro
@pytest.mark.skip_boards(["mps2_an521"])
+@pytest.mark.xfail(reason="due https://github.com/apache/tvm/issues/12619")
def test_armv7m_intrinsic(workspace_dir, board, west_cmd, microtvm_debug):
"""Testing a ARM v7m SIMD exten... |
Reword some anti-crossing docstrings
Based on review from | @@ -19,12 +19,12 @@ __all__ = ['anti_crossing_clique', 'anti_crossing_loops']
def anti_crossing_clique(num_variables: int) -> BinaryQuadraticModel:
- """Generate an anti crossing problem with a single clique.
+ """Generate an anti-crossing problem with a single clique.
- Let ``N = num_variables // 2``. This function re... |
Increase the size limit for GROUP_CONCAT.
We were hitting this for zh_hans and zh_hant. | @@ -164,6 +164,7 @@ def install_scratch_db():
# generate a sql query that will atomically swap tables in
# 'citationhunt' and 'scratch'. Modified from:
# http://blog.shlomoid.com/2010/02/emulating-missing-rename-database.html
+ cursor.execute('''SET group_concat_max_len = 2048;''')
cursor.execute('''
SELECT CONCAT('REN... |
Increase test runs and reduce test run success count threshold.
Tested-by: Ellis Breen
Tested-by: Build Bot | @@ -45,7 +45,7 @@ class TouchTest(ConnectionTestCase):
self.assertFalse(rv.success)
self.assertTrue(E.NotFoundError._can_derive(rv.rc))
- @flaky(5,2)
+ @flaky(20,1)
def test_trivial_multi_touch(self):
kv = self.gen_kv_dict(prefix="trivial_multi_touch")
self.cb.upsert_multi(kv, ttl=1)
|
tests: operation: archive: Test for preseve directory structure
Fixes: | +import os
+import pathlib
+import tempfile
from unittest.mock import patch, mock_open
from dffml import run
@@ -91,3 +94,56 @@ class TestTarOperations(AsyncTestCase):
), patch("tarfile.TarInfo.fromtarfile", m_open):
async for _, _ in run(dataflow):
m_open.assert_any_call("test/path/to/tar_file.tar", "rb")
+
+
+class T... |
[luhn] bump to 1.7.0
* [luhn] bump to 1.7.0
Bump `luhn` to latest version of the canonical data.
* bump CI | @@ -2,7 +2,7 @@ import unittest
from luhn import Luhn
-# Tests adapted from `problem-specifications//canonical-data.json` @ v1.6.1
+# Tests adapted from `problem-specifications//canonical-data.json` @ v1.7.0
class LuhnTest(unittest.TestCase):
@@ -27,6 +27,9 @@ class LuhnTest(unittest.TestCase):
def test_invalid_credit_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.