message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
Blackened setup.py
It is Python code, so should follow the same conventions as all our
other code.
Towards compliance | from setuptools import setup
import sys
-sys.path.append('./heat/core')
+
+sys.path.append("./heat/core")
import version
print(version, dir(version))
-with open('README.md', 'r') as handle:
+with open("README.md", "r") as handle:
long_description = handle.read()
# with open('./heat/core/version.py') as handle:
@@ -13,3... |
Fix uvloop version to maintain Python<3.7 support
uvloop released v0.15 which requires Python >=3.7. This commit fixes the version so that Haystack can be directly installed in colab using pip | @@ -18,7 +18,7 @@ sqlalchemy_utils
# for using FAISS with GPUs, install faiss-gpu
faiss-cpu==1.6.3; sys_platform != 'win32' and sys_platform != 'cygwin'
tika
-uvloop; sys_platform != 'win32' and sys_platform != 'cygwin'
+uvloop==0.14; sys_platform != 'win32' and sys_platform != 'cygwin'
httptools
nltk
more_itertools
|
fix test when jsonrpcclient is not installed
When building a Debian package for jsonrpcclient, all tests succeed
except for tests/test_main.py. `import jsonrpcclient` discovers the
module in the build directory just fine. pkg_resources, however, does
not find it.
This is not the most elegant fix, but my efforts to use ... | @@ -21,7 +21,13 @@ from jsonrpcclient.clients.http_client import HTTPClient
from jsonrpcclient.exceptions import JsonRpcClientError
from jsonrpcclient.requests import Notification, Request
+try:
version = pkg_resources.require("jsonrpcclient")[0].version
+except pkg_resources.DistributionNotFound:
+ # pkg_resources (an... |
osd: add tag on 'wait for all osd to be up' task
This allows skipping this task if really desired.
Use it carefully. Use it at your own risk.
Fixes: | when:
- not ansible_check_mode
- inventory_hostname == ansible_play_hosts_all | last
+ tags: wait_all_osds_up
- name: include crush_rules.yml
include_tasks: crush_rules.yml
when: hostvars[groups[mon_group_name][0]]['crush_rule_config'] | default(crush_rule_config) | bool
+ tags: wait_all_osds_up
# Create the pools list... |
MAINT: update reference
Update reference to correct tutorial. | @@ -139,7 +139,7 @@ loaded, this would be labeled orbit 1.
Loaded Orbit Number: 30
Orbit iteration is built into f15.orbits just like daily iteration is built
-into f15 (see :ref:`tutorial-load`).
+into f15 (see :ref:`tutorial-iteration`).
.. code:: python
|
tag crash fix
had too many arguments
also new log line for movie stream creation | @@ -49,7 +49,7 @@ class MediaProcessor:
tag = Metadata(mediatype, tvdbid=tvdbid, tmdbid=tmbdid, imdbid=imdbid, season=season, episode=episode, original=original, language=language)
if self.settings.tagfile:
self.log.info("Tagging %s with TMDB ID %s." % (inputfile, tag.tmdbid))
- tag.writeTags(output['output'], self.con... |
regression tests: add GBM model trained on v0.6.1
* regression tests: add GBM model trained on v0.6.1
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see
* ignore flake8 error | @@ -43,8 +43,9 @@ def test_model_loaded_from_old_config_prediction_works(tmpdir):
[
"https://predibase-public-us-west-2.s3.us-west-2.amazonaws.com/ludwig_unit_tests/twitter_bots_v05_1.zip",
"https://predibase-public-us-west-2.s3.us-west-2.amazonaws.com/ludwig_unit_tests/respiratory_v05.zip",
+ "https://predibase-public... |
plugins/dbnd-databricks/src/dbnd_databricks/databrick_config.py: print
warning if no databricks-clusterid was given. | @@ -3,7 +3,9 @@ from typing import Dict, List
from dbnd import parameter
from dbnd._core.constants import SparkClusters
from dbnd._core.task.config import Config
+import logging
+logger = logging.getLogger(__name__)
class DatabricksConfig(Config):
"""Databricks cloud for Apache Spark """
@@ -22,9 +24,9 @@ class Databri... |
fw/output: record wa/devlib version in output
Add wa and devlib versions to RunOutput's metadata on creation. They
already get logged, but this will make them readily accessible to
scripts and output processors. | @@ -5,11 +5,14 @@ from collections import OrderedDict
from copy import copy, deepcopy
from datetime import datetime
+import devlib
+
from wa.framework.configuration.core import JobSpec, Status
from wa.framework.configuration.execution import CombinedConfig
from wa.framework.exception import HostError
from wa.framework.... |
[internal] go: make only single instance of SDK run script
Each invocation of the Go SDK was creating a new (and slightly different) instance of the run script which is inefficient. Modify the script so that it only needs to be created once for a particular `GoRoot`.
[ci skip-rust] | from __future__ import annotations
-import shlex
import textwrap
from dataclasses import dataclass
from typing import Iterable, Mapping
@@ -50,10 +49,16 @@ class GoSdkProcess:
self.output_directories = tuple(output_directories)
-@rule
-async def setup_go_sdk_process(request: GoSdkProcess, goroot: GoRoot, bash: BashBina... |
Use sys.exit instead of exit from site packages
sys.exit allows us to return non-zero exit status. | # limitations under the License.
import os
+from sys import exit
import uuid
import shutil
import inspect
@@ -828,7 +829,7 @@ def main():
os.remove(largefile)
except Exception as err:
print(log_output.json_report(err))
- exit()
+ exit(1)
if __name__ == "__main__":
# Execute only if run as a script
|
Run run_continuous_indexing_task every 10 minutes
but allow overriding in localsettings as COUCH_REINDEX_SCHEDULE | from __future__ import absolute_import
from __future__ import unicode_literals
-from celery.schedules import crontab
+
+from datetime import timedelta
+
from celery.task.base import periodic_task
from corehq.preindex.accessors import index_design_doc, get_preindex_designs
+from corehq.util.celery_utils import deseriali... |
adopt: check for POOL_APP_NOT_ENABLED warning
This commit makes the cephadm-adopt playbook fail if the cluster
has the `POOL_APP_NOT_ENABLED` warning raised.
Closes: | name: ceph-facts
tasks_from: container_binary.yml
+ - name: set_fact ceph_cmd
+ set_fact:
+ ceph_cmd: "{{ container_binary + ' run --rm --net=host -v /etc/ceph:/etc/ceph:z -v /var/lib/ceph:/var/lib/ceph:ro -v /var/run/ceph:/var/run/ceph:z --entrypoint=ceph ' + ceph_docker_registry + '/' + ceph_docker_image + ':' + ceph... |
output: Adapt test suite to new location of module
The output module was moved from svtplay_dl.output to
svtplay_dl.utils.output some time ago. | @@ -28,12 +28,12 @@ class progressTest(unittest.TestCase):
self.mockfile = mockfile()
svtplay_dl.utils.output.progress_stream = self.mockfile
- @patch('svtplay_dl.output.progressbar')
+ @patch('svtplay_dl.utils.output.progressbar')
def test_0_0(self, pbar):
svtplay_dl.utils.output.progress(0, 0)
self.assertFalse(pbar.c... |
Fix Extract Indicators from file bug
No condition was set for else | @@ -2,6 +2,7 @@ id: extract_indicators_from_file_-_generic
version: -1
name: Extract Indicators From File - Generic
fromversion: 3.6.0
+releaseNotes: "-"
description: |-
Extract indicators from a file.
Currently supports PDFs and text-based file types (e.g., .txt, .htm, .html, and so on).
@@ -44,7 +45,7 @@ tasks:
iscom... |
BUG: Add extern to PyArrayDTypeMeta_Type declaration
This was missing the extern, but pre GCC 10 it seemed to have worked
fine without.
Closes | @@ -1821,7 +1821,7 @@ typedef void (PyDataMem_EventHookFunc)(void *inp, void *outp, size_t size,
* may change without warning!
*/
/* TODO: Make this definition public in the API, as soon as its settled */
- NPY_NO_EXPORT PyTypeObject PyArrayDTypeMeta_Type;
+ NPY_NO_EXPORT extern PyTypeObject PyArrayDTypeMeta_Type;
/*
*... |
Add remark on invest parameterization for SinkDSM
Note: This could be addressed in a separate issue since it
leads to a non-trivial parameterization challenge for the
user | @@ -1096,6 +1096,10 @@ class SinkDSM(Sink):
----------
demand: numeric
original electrical demand (normalized)
+ For investment modeling, it is advised to use the maximum of the
+ demand timeseries and the cumulated (fixed) infeed time series
+ for normalization, because the balancing potential may be determined by
+ b... |
Fixed test test vars to dim. Somehow the dtype of variable 'var'
is '<U13'. | @@ -60,7 +60,7 @@ class Vars2DimTest(CliDataTest):
var_names = ds["var"]
self.assertEqual(("var",), var_names.dims)
self.assertTrue(hasattr(var_names, "encoding"))
- self.assertEqual("object", str(var_names.dtype))
+ self.assertEqual("<U13", str(var_names.dtype))
self.assertEqual(3, len(var_names))
self.assertIn("preci... |
Update settings.py
```chmod +x``` literally should also be covered I suppose. | @@ -89,7 +89,7 @@ SUSPICIOUS_HTTP_REQUEST_REGEXES = (
("potential xxe injection", r"\[<!ENTITY"),
("potential data leakage", r"im[es]i=\d{15}|(mac|sid)=([0-9a-f]{2}:){5}[0-9a-f]{2}|sim=\d{20}|([a-z0-9_.+-]+@[a-z0-9-.]+\.[a-z]+\b.{0,100}){4}"),
("config file access", r"\.ht(access|passwd)|\bwp-config\.php"),
- ("potenti... |
Ensure CancelledErrors propogate to serving code
It is the serving code that can cancelled the task, and it should be
the place that handles the cancellation. | @@ -640,6 +640,10 @@ class Quart(PackageStatic):
By default this switches the error response to a 500 internal
server error.
"""
+ # If task is cancelled error should propogate to serving code.
+ if isinstance(error, asyncio.CancelledError):
+ raise error
+
await got_request_exception.send(self, exception=error)
intern... |
Cleaned up invite query
For some users (Admins) who had many users, previous query could lead to
one second+ load times of their page. This reduces the query to a single
query for better performance. | @@ -573,17 +573,10 @@ def getInviteCodeInfo(uid):
# Codes that this user has generated, that other users signed up with
try:
- user_codes = InviteCode.select().where(InviteCode.uid == uid)
- info['invitedTo'] = []
- for code in user_codes:
- try:
- invited_users = UserMetadata.select().where((UserMetadata.key == 'invit... |
Fail more obviously when a sensor name isn't found
Previously this helper would return None and it would fail with a weird error somewhere else.
This change should probably be added to the other helper functions in this file as well. would render this a moot point | """Definition of all of the sensor information"""
import numpy as np
-
+from holodeck.exceptions import HolodeckException
class Sensors:
"""Class information of sensor data with mappings from names to corresponding numbers
@@ -131,7 +131,13 @@ class Sensors:
Returns:
int: The index value for the sensor.
"""
- return Se... |
fix: update SAD pipeline tutorial to match latest API
... and also show how to use "apply" pretrained models | pipeline:
name: pyannote.audio.pipeline.speech_activity_detection.SpeechActivityDetection
params:
- scores: /path/to/precomputed/sad
+ # replace {{RAW_DIR}} by its actual value
+ precomputed: {{RAW_DIR}}
+
+freeze:
+ pad_onset: 0.0
+ pad_offset: 0.0
|
Add until to retry pulling the container images
"Pre-fetch all the containers" task has retries and deley parameter,
but it doesn't work because the statement to retry is missing.
Add until parameter to retry pulling container images. | @@ -161,6 +161,8 @@ outputs:
name: "{{ prefetch_image }}"
validate_certs: false
force: true
+ register: result
+ until: result is succeeded
retries: 5
delay: 5
loop_control:
|
Update conf.py
Added 301 redirects for developer pages that have been moved. | @@ -61,6 +61,15 @@ redirects = {
"integrations/jira": "https://mattermost.gitbook.io/plugin-jira/",
"integrations/zoom": "https://mattermost.gitbook.io/plugin-zoom/",
"integrations/net-promoter-score": "https://docs.mattermost.com/manage/user-satisfaction-surveys.html",
+ "developer/interactive-dialogs": "https://devel... |
Check Appendix A attributes for CF 1.6 and 1.7
* Check Appendix A attributes for CF 1.6 and 1.7
Adds a check for CF 1.6 and 1.7 attributes, as well as a general
framework to execute these checks. | @@ -14,6 +14,7 @@ from netCDF4 import Dataset
from lxml import etree as ET
from distutils.version import StrictVersion
from compliance_checker.base import fix_return_value, Result, GenericFile
+from compliance_checker.cf.cf import CFBaseCheck
from owslib.sos import SensorObservationService
from owslib.swe.sensor.sml im... |
Build with 3.8 for windows
this will be supported for win7 | @@ -12,8 +12,8 @@ jobs:
- {name: '3.9', python: '3.9', os: ubuntu-latest, architecture: 'x64', cibuild: "yes"}
- {name: '3.8', python: '3.8', os: ubuntu-latest, architecture: 'x64', cibuild: "no"}
- {name: '3.7', python: '3.7', os: ubuntu-latest, architecture: 'x64', cibuild: "no"}
- - {name: Windows, python: '3.9', os... |
Use better check that we are on mainnet when deciding to use default Chia DNS server
Use a better check for if we are on mainnet when using the default chia dns introducer | @@ -489,8 +489,8 @@ class FullNode:
default_port = None
if "dns_servers" in self.config:
dns_servers = self.config["dns_servers"]
- elif self.config["port"] == 8444:
- # If `dns_servers` misses from the `config`, hardcode it if we're running mainnet.
+ elif network_name == "mainnet":
+ # If `dns_servers` is missing fro... |
Provides better error messages for KFP namespace errors
Trap KFP namespace errors and display cause appropriately avoiding
double scroll bars in the error dialog box. | @@ -21,6 +21,7 @@ import re
import tempfile
import time
import requests
+import json
from datetime import datetime
from elyra._version import __version__
@@ -29,6 +30,7 @@ from elyra.pipeline import RuntimePipelineProcess, PipelineProcessor, PipelinePr
from elyra.util.path import get_absolute_path
from jinja2 import En... |
Update example_progressbar.py
Moved progressbar to _algorithm.py | -import spotpy.tools.progressbar as pb
-# Initial call to print 0% progress
-pgr = 0
-listlen = 1000000
-pb.printProgressBar(pgr, listlen, prefix='Progress:', suffix='Complete', length=10)
-for i in range(1000000):
- pgr += 1
- pb.printProgressBar(pgr, listlen, prefix='Progress:', suffix='Complete', length=10)
|
Add spacing to warning banner.
The yellow warning banner is always too close to the page. This will add a little space. | {{ block "header" . }}{{ partialCached "header_navbar.html" .}}{{ end }}
<!-- Draft alert -->
- <div class="container">
+ <div class="container pt-3">
<aside class="alert alert-warning text-center py-1 mt-n3 mt-md-n4 mt-xl-n5" role="alert">
You're viewing the latest version of the ACL Anthology.
<a class="btn btn-warni... |
Simplify 'eb init' logic to determine if default branch exists
SIM:
cr | @@ -114,9 +114,7 @@ class InitController(AbstractBaseController):
except CommandError:
source_control_setup = False
- default_branch_exists = False
- if gitops.git_management_enabled() and not self.interactive:
- default_branch_exists = True
+ default_branch_exists = not not (gitops.git_management_enabled() and not sel... |
Prevent passing phonemes to models during evaluation
(to ensure realistic results regardless on the model used) | @@ -80,13 +80,11 @@ class G2PEvaluator:
batch = batch.to(self.device)
if self.hparams.eval_mode == "sentence":
hyps, scores = self._get_phonemes(
- batch.grapheme_encoded,
- batch.phn_encoded_bos
+ batch.grapheme_encoded
)
elif self.hparams.eval_mode == "word":
hyps, scores = self._get_phonemes_wordwise(
- batch.graphe... |
Update settings.py
Based on, e.g.: | @@ -78,7 +78,7 @@ LOCALHOST_IP = { 4: "127.0.0.1", 6: "::1" }
IGNORE_DNS_QUERY_SUFFIXES = (".arpa", ".local", ".guest")
VALID_DNS_CHARS = string.letters + string.digits + '-' + '.' # Reference: http://stackoverflow.com/a/3523068
SUSPICIOUS_CONTENT_TYPES = ("application/x-sh", "application/x-shellscript", "application/h... |
support tenants in azure-ad
Ability to specify the config variable TENANT_ID to use another tenant than the 'common' default tenant | @@ -41,8 +41,8 @@ class AzureADOAuth2(BaseOAuth2):
name = 'azuread-oauth2'
SCOPE_SEPARATOR = ' '
AUTHORIZATION_URL = \
- 'https://login.microsoftonline.com/common/oauth2/authorize'
- ACCESS_TOKEN_URL = 'https://login.microsoftonline.com/common/oauth2/token'
+ 'https://login.microsoftonline.com/{tenant_id}/oauth2/author... |
Added fix for empty overrides value in apply config methods
In `apply_minion_config` and `apply_master_config` there is a call to
`overrides.get` while the `overrides` value still has the potential of
being `None`. Updated the call to be `(overrides or {}).get` to
prevent unwarranted exceptions. | @@ -3278,7 +3278,7 @@ def apply_minion_config(overrides=None,
if 'beacons' not in opts:
opts['beacons'] = {}
- if overrides.get('ipc_write_buffer', '') == 'dynamic':
+ if (overrides or {}).get('ipc_write_buffer', '') == 'dynamic':
opts['ipc_write_buffer'] = _DFLT_IPC_WBUFFER
if 'ipc_write_buffer' not in overrides:
opts... |
Update glowcommlab.js
Updated websocket url logic. | @@ -40,12 +40,7 @@ export function createWebsocket(msg, serviceUrl) {
var uri = msg.content.data.wsuri
var url;
- if (document.location.hostname.includes("localhost")){
- url = "ws://localhost:" + port + uri;
- }
- else {
url = serviceUrl + port + uri;
- }
ws = new WebSocket(url);
ws.binaryType = "arraybuffer";
|
fix: fix registration with amazon.com.au
closes | "issue_tracker": "https://github.com/custom-components/alexa_media_player/issues",
"dependencies": ["persistent_notification"],
"codeowners": ["@keatontaylor", "@alandtse"],
- "requirements": ["alexapy==1.20.4", "packaging~=20.3", "wrapt~=1.12.1"]
+ "requirements": ["alexapy==1.20.5", "packaging~=20.3", "wrapt~=1.12.1"... |
Update list_sidebar.html
make placeholder search translatable | </a>
<ul class="dropdown-menu list-stats-dropdown" role="menu">
<div class="dropdown-search">
- <input type="text" placeholder="Search" data-element="search" class="form-control input-xs">
+ <input type="text" placeholder={{__("Search") }} data-element="search" class="form-control input-xs">
</div>
<div class="stat-res... |
add tooltip details for each file in list
Added Character count, Codings count, and Memo, if present | @@ -137,10 +137,25 @@ class DialogCodeText(QtWidgets.QWidget):
self.ui.listWidget.setContextMenuPolicy(Qt.CustomContextMenu)
self.ui.listWidget.customContextMenuRequested.connect(self.viewfile_menu)
self.ui.listWidget.setStyleSheet(tree_font)
+ # Fill additional details about each file in the memo
+ cur = self.app.conn... |
Fix CEM Trainer
Summary:
Pull Request resolved:
now, MDNRNNTrainer has been migrated to PytorchLightning, we should migrate CEM Trainer to PytorchLightning as well. This is an adhoc fix.
Oncall Short Name: oncall_reinforcement_learning | @@ -29,6 +29,7 @@ def print_mdnrnn_losses(minibatch, model_index, losses) -> None:
)
+# TODO: Convert CEMTrainer to PytorchLightning
class CEMTrainer(RLTrainer):
def __init__(
self,
@@ -43,8 +44,14 @@ class CEMTrainer(RLTrainer):
self.minibatch_size = parameters.mdnrnn.minibatch_size
def train(self, training_batch: rlt... |
Try resolving foreign keys differently
This is work in progress. Let's see if it works as expected. | @@ -132,11 +132,7 @@ def deserialize_energy_system(cls, path,
key in data and
source[key] in data[key]):
- source_value = source[key]
- target_value = data[key][source_value]
- del source[key]
- key = source_value
- source[source_value] = target_value
+ source[key] = data[key][source[key]]
if isinstance(source[key], ca... |
Model converter: surround the output of the ONNX converter with blank lines
This is consistent with how MO output is handled, and makes it easier
for users to pick out parts of the model converter's output. | @@ -98,9 +98,12 @@ def convert_to_onnx(context, model, output_dir, args):
cmd = [str(args.python), str(Path(__file__).absolute().parent / model.converter_to_onnx), *conversion_to_onnx_args]
context.printf('Conversion to ONNX command: {}', ' '.join(map(quote_arg, cmd)))
+ context.printf('')
- return True if args.dry_run... |
opt: Extend pyomo hack to pyomo 5.6+
Thanks to Soner Candas for reporting the problem and the providing the fix. | @@ -145,6 +145,25 @@ class LConstraint(object):
def __repr__(self):
return "{} {} {}".format(self.lhs, self.sense, self.rhs)
+try:
+ from pyomo.core.base import expr_coopr3
+
+ def _build_sum_expression(variables, constant=0.):
+ expr = expr_coopr3._SumExpression()
+ expr._args = [item[1] for item in variables]
+ expr.... |
Expect an object, not an array for next_content.
Use inexplicably different url name. | @@ -72,10 +72,10 @@ class ContentNodeResource extends Resource {
this.next_cache = this.next_cache || {};
const key = this.cacheKey({ id }, filteredResourceIds);
if (!this.next_cache[key]) {
- const url = this.urls[`${this.name}-next_content`](
+ const url = this.urls[`${this.name}_next_content`](
...this.resourceIds.m... |
Fix converting units when plotting multiple coefficients
Set _frequency_range as an auxiliar variable to avoid overriding frequency_range every time it converts units.
Add labels to help identifying the curves
Run Black v22 | @@ -267,26 +267,27 @@ class BearingElement(Element):
default_units = "N*s/m"
y_units = damping_units
- frequency_range = np.linspace(min(self.frequency), max(self.frequency), 30)
+ _frequency_range = np.linspace(min(self.frequency), max(self.frequency), 30)
for coeff in coefficients:
y_value = (
Q_(
- getattr(self, f"{... |
Update fareit.txt
Also cleaning redundancy: this generic detection sign lives in ```fareit.txt`` for hundred of years. :) | @@ -650,7 +650,11 @@ jaling.aba.vg
# Reference: https://app.any.run/tasks/de23e90e-1180-4938-95ad-cb6c777fbaa4/
-http://142.202.190.17/p/z05857687.php
+http://142.202.190.17
+
+# Reference: https://www.virustotal.com/gui/file/f3ee2c7189752aa65a0803d879a3be59384eab730d31edddff4c61e2fdd2d738/detection
+
+clogwars.com
# G... |
Clarify error messages when using existing fileinfo
Clean up the error messages when use_existing_fileinfo is called with
mandatory fields absent from one or more of the fileinfo dictionaries in
target_files | @@ -1416,13 +1416,13 @@ def generate_targets_metadata(targets_directory, target_files, version,
# Ensure all fileinfo entries in target_files have a non-empty hashes dict
if not fileinfo.get('hashes', None):
- raise securesystemslib.exceptions.Error('use_existing_hashes option set'
- ' but no hashes exist in roledb for... |
minor bug fix
gloabalvars... | @@ -820,8 +820,8 @@ def calc_pressure_nodes(edge_node_df, pipe_diameter, pipe_length, edge_mass_flow
temperature_return_edges__k, gv, 2)
# TODO: here 70% pump efficiency assumed, better estimate according to massflows
- pressure_loss_pipe_supply_kW = pressure_loss_pipe_supply__pa * edge_mass_flow / gv.Pwater /1000 /0.7... |
Fix type error in (X/Y)PowGate._act_on_
There was a type error due to the fact that the common superclass `EigenGate` does not define `_act_on_`. We can act on each gate instead of looping over them, which avoids the type error. | @@ -24,7 +24,8 @@ This module creates Gate instances for the following gates:
Each of these are implemented as EigenGates, which means that they can be
raised to a power (i.e. cirq.H**0.5). See the definition in EigenGate.
"""
-from typing import Any, cast, Collection, Optional, Sequence, Tuple, Union
+from typing impo... |
update to suggestions
use offset to better align indentation guides with block scope. Remove some empty lines | @@ -36,6 +36,8 @@ def paintEvent(self, event):
color = QColor(self.color)
color.setAlphaF(.5)
painter.setPen(color)
+ offset = self.editor.document().documentMargin() + \
+ self.editor.contentOffset().x()
for _, line_number, block in self.editor.visible_blocks:
@@ -69,14 +71,13 @@ def paintEvent(self, event):
indentati... |
Lexical envs: comment Reset_Lookup_Cache
For AdaCore/libadalang#45
(no-tn-check) | @@ -83,6 +83,11 @@ package body Langkit_Support.Lexical_Env is
procedure Reset_Lookup_Cache (Self : Lexical_Env) is
begin
+ -- Don't destroy the map itself: preserve entries but clear their
+ -- contents. This is an optimization that will save time during
+ -- deallocation (here) and reallocation (when filling the cach... |
Updated get_player_status api request
* Updated get_player_status api request
Added last seen timestamp when user is offline to ger_player_status request.
* Fix to never seen
Added fix when user (somehow) was never seen
* Changed check at line 1423
Updated to check if result does not exist && updated last seen result | @@ -1480,7 +1480,11 @@ async def api_get_player_status(conn: Connection) -> Optional[bytes]:
if not p:
# no such player online
- return JSON({'online': False})
+ res = await glob.db.fetch('SELECT latest_activity FROM users WHERE id = %s', [pid])
+ if not res:
+ return (404, b'Player not found.')
+
+ return JSON({'onlin... |
Much better twoDgrid performance
No need to use multiple nested for loops, over an order of magnitude speedup when plotting SPAM from the notebook (http://nbviewer.jupyter.org/github/Effective-Quadratures/Effective-Quadratures/blob/master/ipython-notebooks/SPAM.ipynb) | @@ -487,16 +487,13 @@ def twoDgrid(coefficients, index_set):
# Now create a tensor grid with this max. order
x, y = np.mgrid[0:max_order, 0:max_order]
- z = (x*0 + y*0) + float('NaN')
- counter = 0
- for counter in range(0, len(coefficients)):
- for i in range(0, max_order):
- for j in range(0, max_order):
- if (i == i... |
update-locked-requirements: Add py2 option to compile requirements.
In this commit we add a new option which could be used to specify
python version. When 'py2' is specified, future/futures are not
removed from the requirements lock file generated. | @@ -10,6 +10,7 @@ source /srv/zulip-py3-venv/bin/activate
compile_requirements () {
source="$1"
output="$2"
+ python_version="$3"
pip-compile --output-file "$output" "$source"
@@ -19,9 +20,11 @@ compile_requirements () {
# in the output of pip-compile it's no longer needed.
sed -i 's/-e //' "$output"
+ if [ "$python_ve... |
Onefile: Remove onefile binary at startup
* We did only clear the standalone binary, allowing confusion in case of
compilation errors. | @@ -87,6 +87,8 @@ def _createNodeTree(filename):
"""
+ # Many cases to deal with, pylint: disable=too-many-branches
+
# First, build the raw node tree from the source code.
main_module = Building.buildModuleTree(
filename=filename,
@@ -109,9 +111,15 @@ def _createNodeTree(filename):
removeDirectory(path=standalone_dir,... |
Change collision naming scheme to "-" + number.
Since "tex-17.png" is more concise than "tex 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17.png". | @@ -212,13 +212,13 @@ class GlTF2Exporter:
def __add_image(self, image: gltf2_io_image_data.ImageData):
name = image.adjusted_name()
count = 1
- regex = re.compile(r"\d+$")
- regex_found = re.findall(regex, name)
+ regex = re.compile(r"-\d+$")
while name in self.__images.keys():
+ regex_found = re.findall(regex, name)
... |
Update performance_memoization.py
make lru_cache decorator Python 2 and 3 compatible | @@ -2,9 +2,14 @@ import dash
from dash.dependencies import Input, Output
import dash_html_components as html
import dash_core_components as dcc
-import functools32
+import sys
import time
+if sys.version_info < (3, 2, 0):
+ from functools32 import lru_cache
+else:
+ from functools import lru_cache
+
app = dash.Dash(__n... |
combine_bined_coverages_MAGs
with new names | @@ -955,7 +955,7 @@ rule combine_bined_coverages_MAGs:
input:
binned_coverage_files = expand("genomes/alignments/{sample}_coverage_binned.txt",
sample=SAMPLES),
- cluster_attribution = "genomes/cluster_attribution.tsv"
+ cluster_attribution = "genomes/contig2genome.tsv"
params:
samples= SAMPLES
output:
|
Fixing a call to content_ctl
generate. This passes initial
testing using nektos act on
my own system! | @@ -121,7 +121,7 @@ jobs:
source .venv/bin/activate
rm -rf dist/escu/default/data/ui/panels/*.xml
python contentctl.py --path . ${{ steps.vars.outputs.skip_enrichment_var }} generate --product ESCU --output dist/escu
- python contentctl.py --path . ${{ steps.vars.outputs.skip_enrichment_var }} --product SSA --output di... |
Unnominate banned users from the talent pool
Fixes | import logging
import textwrap
from collections import ChainMap
+from typing import Union
-from discord import Color, Embed, Member
+from discord import Color, Embed, Member, User
from discord.ext.commands import Cog, Context, group
from bot.api import ResponseCodeError
@@ -164,25 +165,10 @@ class TalentPool(WatchChann... |
DynamicVariable: override equality and hashing operators
TN: | @@ -1977,6 +1977,17 @@ class DynamicVariable(AbstractVariable):
def __repr__(self):
return '<DynamicVariable {}>'.format(self.argument_name.lower)
+ @property
+ def _id_tuple(self):
+ return (self.argument_name, self.type)
+
+ def __eq__(self, other):
+ return (isinstance(other, DynamicVariable) and
+ self._id_tuple ==... |
Update summary() example
Update required due to Pandas new version (1.2.0). | @@ -198,12 +198,12 @@ class Element(ABC):
n 0
n_l 0
n_r 0
- m 32.5897
+ m 32.589728
Id 0.178089
Ip 0.329564
tag None
color Firebrick
- scale_factor 1
+ scale_factor 1.000000
dof_global_index None
type DiskElement
dtype: object
|
v2 add Settings.add_soc_incentive input
and some minor formatting | @@ -249,10 +249,12 @@ class Settings(BaseModel, models.Model):
help_text=("The threshold for the difference between the solution's objective value and the best possible "
"value at which the solver terminates")
)
- # use_decomposition_model = models.BooleanField(null=True, blank=True)
- # optimality_tolerance_decomp_su... |
Update glowcomm.js
Reinstate some canvas code. | @@ -774,8 +774,21 @@ function handle_cmds(dcmds) {
case 'local_light': {glowObjs[idx] = local_light(cfg); break}
case 'distant_light': {glowObjs[idx] = distant_light(cfg); break}
case 'canvas': {
+ var container = document.getElementById("glowscript");
+ if (container !== null) {
+ window.__context = { glowscript_conta... |
AnimationGadget : Add popup tooltips for tangents in editor gadget.
* hovering over a tangent's handle in the animation gadget will now
display a popup tooltip listing the tangent's
- direction
- slope
- scale
ref | @@ -766,7 +766,18 @@ void AnimationGadget::plugDirtied( Gaffer::Plug *plug )
std::string AnimationGadget::getToolTip( const IECore::LineSegment3f &line ) const
{
- if( const Animation::ConstKeyPtr key = keyAt( line ) )
+ std::pair< Gaffer::Animation::ConstKeyPtr, Gaffer::Animation::Direction > keyTangent = tangentAt( l... |
pmerge: fix indentation for displaying failures.
It still is fucking dense, but this is at least a bit
more clear as to what failure is referenced. | @@ -374,7 +374,6 @@ def display_failures(out, sequence, first_level=True, debug=False):
if first_level:
# pops below need to exactly match.
out.first_prefix.extend((out.fg("red"), "!!! ", out.reset))
- out.first_prefix.append(" ")
out.write(f"request {frame.atom}, mode {frame.mode}")
for pkg, steps in sequence:
out.wri... |
Reduce number of calls to Tree.meta in PropagatePositions
Since Tree.meta is property with additional presence check it
introduces unnecessary overhead in accessing underlying Meta
object once it's already initialized. Having local reference to actual
Meta object allows to reduce these presence checks to bare minimum | @@ -27,33 +27,39 @@ class PropagatePositions:
def __call__(self, children):
res = self.node_builder(children)
+ # local reference to Tree.meta reduces number of presence checks
if isinstance(res, Tree):
+ res_meta = res.meta
for c in children:
- if isinstance(c, Tree) and not c.meta.empty:
- res.meta.line = c.meta.line... |
update interface.py: replace position z with length L
we can't really use relative position if we want to enable stacking of multiple matrix surfaces in matrix group. Having the length of each surface is enough information. | class Interface:
- def __init__(self, z, n):
+ def __init__(self, L, n):
self.n = n
- self.z = z
+ self.L = L
+
class SphericalInterface(Interface):
- def __init__(self, z, n, R):
+ def __init__(self, L, n, R):
+ super(SphericalInterface, self).__init__(L=L, n=n)
self.R = R
- super(SphericalInterface, self).__init__(z=... |
ebd/helpers/common/prepalldocs: various doc compression fixes
Don't compress html docdir files, use the right docdir target, and don't
try to compress dirs.
At some point this will go away after we finish IPC support and add
docompress support, but this hack works for now. | @@ -10,17 +10,19 @@ elif [[ ${ED:-unset} == "unset" ]]; then
__helper_exit -1 "The variable ED is missing from the environment, but is required for prefix mode; failing."
fi
-dir=${ED}/usr/share/doc
+dir=${ED}/usr/share/doc/${PF}
[[ ! -d ${dir} ]] && return
-z=$(find "${dir}" -print \
+z=$(find "${dir}" \
'(' -type f -... |
Update generic.txt
Resounded from | @@ -1764,3 +1764,12 @@ space.bajamelide.ch
# Reference: https://twitter.com/malware_traffic/status/1110176575922864128
zabenkot.top
+
+# Reference: https://twitter.com/angel11VR/status/1109075153114279936
+# Reference: https://app.any.run/tasks/37b99bb8-a81b-4298-bc78-b19ecc0adb0f
+
+185.25.50.168:4444
+
+# Reference: ... |
Update description of the `rsync -i` flag
Backfills cl/508089905 | @@ -417,10 +417,8 @@ _DETAILED_HELP_TEXT = ("""
ignored. Note that gsutil does not follow directory symlinks,
regardless of whether -e is specified.
- -i This forces rsync to skip any files which exist on the destination
- and have a modified time that is newer than the source file.
- (If an existing destination file h... |
[python3] let PdfFileReader handle file opening
In Python 3, file() is deprecated.
PdfFileReader can internally handle file opening and closing, so file() no longer necessary.
See description of stream parameter here:
Alternatively, open() can be used. | @@ -16,7 +16,7 @@ def get_pdf(html, options=None, output = None):
try:
pdfkit.from_string(html, fname, options=options or {})
if output:
- append_pdf(PdfFileReader(file(fname,"rb")),output)
+ append_pdf(PdfFileReader(fname),output)
else:
with open(fname, "rb") as fileobj:
filedata = fileobj.read()
|
Update apt_sidewinder.txt
donot | @@ -742,12 +742,3 @@ maritimepakistan.kpt-pk.net
ksew.org
srilankanavy.ksew.org
-
-# Reference: https://twitter.com/_re_fox/status/1517173649568149504
-# Reference: https://www.virustotal.com/gui/file/5b6c10c35cab002750ba16aa8eba4f46d8e7267ae7c40c9e610add6da01ba3fd/detection
-
-hibiscus.live
-records.hibiscus.live
-/ND... |
Batch should be sorted by decreasing size.
`pack_padded_sequence` requires that a minibatch be sorted by decreasing order. | @@ -157,6 +157,9 @@ class Iterator(object):
continue
self.iterations += 1
self._iterations_this_epoch += 1
+ # NOTE: `rnn.pack_padded_sequence` requires that a minibatch be sorted by
+ # decreasing order, which requires reversing relative to typical sort keys
+ minibatch.reverse()
yield Batch(minibatch, self.dataset, s... |
Use __name__ in FromPackageLoader in test_grammar.py
This is the recommended way to call FromPackageLoader from its docs, and makes running the tests a bit more portable | @@ -141,7 +141,7 @@ class TestGrammar(TestCase):
self.assertRaises( GrammarError, Lark, g)
def test_import_custom_sources(self):
- custom_loader = FromPackageLoader('tests', ('grammars', ))
+ custom_loader = FromPackageLoader(__name__, ('grammars', ))
grammar = """
start: startab
@@ -154,7 +154,7 @@ class TestGrammar(T... |
Make it more obvious how tests can be run locally
See for reference.
[skip CI] | ### How to contribute
* [fork this project](https://github.com/gitpython-developers/GitPython/fork) on github
+* For setting up the environment to run the self tests, look at `.travis.yml`.
* Add yourself to AUTHORS.md and write your patch. **Write a test that fails unless your patch is present.**
* Initiate a pull req... |
Update recurrentnet.rst
fixed length of bptt | @@ -324,7 +324,7 @@ Backprop Through Time is implemented as follows.
loss.unchain_backward() # Truncate the graph
optimizer.update() # Update the parameters
-In this case, we update the parameters on every 35 consecutive words.
+In this case, we update the parameters on every ``bprop_len`` consecutive words.
The call o... |
Extend model consistency with all class-like tools
Add Deployments, Profiles and Use Cases. | -"""A Property-based test."""
+"""A Property-based test.
+
+This is a property based/model based/monkey test.
+
+It starts a user session and performs all sorts of user
+actions:
+- create/delete elements
+- create/delete diagrams
+- connect, disconnect
+- change owner element
+- undo, redo
+- copy, paste
+
+Some tips:... |
test_events: Remove 'realm_user' from event_types in subscription test.
We were including 'realm_user' in event_types along with 'subscription',
but we don't send event of type 'realm_user' when subscribing to a new
stream. This was added in
This commit removes 'realm_user' from event_types. | @@ -1830,7 +1830,7 @@ class SubscribeActionTest(BaseAction):
action: Callable[[], object] = lambda: self.subscribe(self.example_user("hamlet"), "test_stream")
events = self.verify_action(
action,
- event_types=["subscription", "realm_user"],
+ event_types=["subscription"],
include_subscribers=include_subscribers)
check... |
Pass bandwidth to scipy bivariate kde
Fixes | @@ -451,7 +451,7 @@ def _statsmodels_bivariate_kde(x, y, bw, gridsize, cut, clip):
def _scipy_bivariate_kde(x, y, bw, gridsize, cut, clip):
"""Compute a bivariate kde using scipy."""
data = np.c_[x, y]
- kde = stats.gaussian_kde(data.T)
+ kde = stats.gaussian_kde(data.T, bw_method=bw)
data_std = data.std(axis=0, ddof=1... |
Padding can get confused when there are other files present.
Validate against source collection. | @@ -276,9 +276,11 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
src_head = src_collection.format("{head}")
src_tail = src_collection.format("{tail}")
-
# fix dst_padding
- padd_len = len(files[0].replace(src_head, "").replace(src_tail, ""))
+ valid_files = [x for x in files if src_collection.match(x)]
+ padd_... |
Update jira-exploitaiton-workflow.yaml
Corrected exploitation typo | -id: jira-exploitaiton-workflow
+id: jira-exploitation-workflow
info:
- name: Jira Exploitaiton workflow
+ name: Jira Exploitation workflow
author: micha3lb3n
variables:
|
Correct typo: n --> np (numpy)
Rather than "n.dot(m)" the comment should say "np.dot(m)" | }
},
"source": [
- "jnp.dot(n, m).block_until_ready() # Note: yields the same result as n.dot(m)"
+ "jnp.dot(n, m).block_until_ready() # Note: yields the same result as np.dot(m)"
],
"execution_count": 3,
"outputs": [
|
Improve CLI usage argument name.
Towards | @@ -129,9 +129,9 @@ def cf_info_cmd():
print('-', key + ':', cfinfo[key])
@cli.command('import')
-@click.argument('zipfile')
-def import_cmd(zipfile):
- opsmgr.upload('/api/products', zipfile)
+@click.argument('tile')
+def import_cmd(tile):
+ opsmgr.upload('/api/products', tile)
@cli.command('install')
@click.argument(... |
Update README.md
Fixed trailing sentence. | @@ -30,7 +30,7 @@ To start collecting data for your network, create an inventory file to gather th
* Connect to the container via ```docker attach sq-poller```
* Launch the poller with the appropriate options. For example, ```sq-poller -D inventory.yml -k``` where mydatacenter is the name of the namespace where the dat... |
Update morphology_tutorial.md
accidentally added both the new and old way to print out results | @@ -438,8 +438,7 @@ To deploy a workflow over a full image set please see tutorial on
[workflow parallelization](pipeline_parallel.md).
```python
- # Write shape and color data to results file
- pcv.print_results(filename=args.result)
+ # Write all data to results file
pcv.outputs.save_results(filename=args.result)
if ... |
Candy collection: fix positional arg being passed as kword
This caused a `TypeError` to be raised, as the `id` argument could only be used as a positional argument and not by keyword. | @@ -134,7 +134,7 @@ class CandyCollection(commands.Cog):
@property
def hacktober_channel(self) -> discord.TextChannel:
"""Get #hacktoberbot channel from its ID."""
- return self.bot.get_channel(id=Channels.community_bot_commands)
+ return self.bot.get_channel(Channels.community_bot_commands)
@staticmethod
async def sen... |
updated installation order in Installation.md
opencv needs to be installed before you can install plantcv | @@ -72,13 +72,13 @@ conda create --file requirements.txt -n plantcv -c conda-forge python=3.6 nb_con
# Activate the plantcv environment (you will have to do this each time you start a new session)
source activate plantcv
-# Install PlantCV
-python setup.py install
-
# Install OpenCV (not through conda)
pip install open... |
Untyped property wrappers: do not rely on tagged types for nodes
TN: | @@ -9,18 +9,27 @@ function ${property.name}
is
<%
uses_einfo = property.uses_entity_info
- args = [str(arg.name) for arg in property.natural_arguments]
+ args = ([Self.type.internal_conversion(T.root_node, 'E.Node')] +
+ [str(arg.name) for arg in property.natural_arguments])
%>
% if uses_einfo:
E_Info : ${T.entity_info... |
Removes TDDataSet tests which compute fourier modes to fix TravisCI.
Last commit did *not* make TravisCI's scipy happy, so I'm just removing
the offending function calls (the compute fourier modes in a TDDataSet)
since this logic is currently being updated and it's not worth debugging
this scipy issue now. | @@ -493,9 +493,10 @@ Gx^4 20 80 0.2 100
#Test various other methods
nStrs = len(ds)
- ds.compute_fourier_filtering(verbosity=5)
- dsT = ds.create_dataset_at_time(0.2)
- dsT2 = ds.create_dataset_from_time_range(0,0.3)
+ #Remove these test for now since TravisCI scipy doesn't like to interpolate
+ #ds.compute_fourier_fil... |
fix: provide timedelta to coordinator
closes | @@ -839,7 +839,7 @@ async def setup_alexa(hass, config_entry, login_obj):
hass.data[DATA_ALEXAMEDIA]["accounts"][email]["websocket"] = None
coordinator = hass.data[DATA_ALEXAMEDIA]["accounts"][email].get("coordinator")
if coordinator:
- coordinator.update_interval = scan_interval
+ coordinator.update_interval = timedel... |
Missing variable refactor
Should have been refactored in | @@ -99,8 +99,8 @@ class TaskQueueSubscriber(multiprocessing.Process):
"""
logger.warning(f"Connection closing: {exception}")
self._channel = None
- # Setting the kill_event will trigger shutdown via the event_watcher
- self.kill_event.set()
+ # Setting the quiesce_event will trigger shutdown via the event_watcher
+ sel... |
Remove note about change of mutation state
I think we now allow this anyway. See | @@ -3228,10 +3228,6 @@ class TableCollection:
The ``parent`` of a given mutation is the ID of the next mutation
encountered traversing the tree upwards from that mutation, or
``NULL`` if there is no such mutation.
-
- .. note:: note: This method does not check that all mutations result
- in a change of state, as requir... |
Remove trailing slash from base_url in tempest plugin
When service endpoint url has trailing slash, tempest plugin constructs
wrong url with two slashes.
Added rstrip('/') for base_url for ensure trailing slash is absent. | @@ -228,7 +228,7 @@ class BaseBaremetalTest(api_version_utils.BaseMicroversionTest,
def validate_self_link(self, resource, uuid, link):
"""Check whether the given self link formatted correctly."""
expected_link = "{base}/{pref}/{res}/{uuid}".format(
- base=self.client.base_url,
+ base=self.client.base_url.rstrip('/'),
... |
Fix issue Moved close button at the top-right to avoid hiding by interaction preview
Moved close button at the top-right | .oppia-delete-interaction-button {
height: 25px;
padding: 0;
+ position: absolute;
right: 0;
- top: 2px;
+ top: 0;
width: 25px;
}
|
Remove redeclared Vermont office ID.
This is already defined a few lines above. | @@ -103,7 +103,6 @@ class Datasource(BaseDatasource):
STATE_SEC_OF_STATE_ELEC_OFFICE_ID = 44
STATE_AUDITOR_ELEC_OFFICE_ID = 13
STATE_ATTORNEY_GEN_ELEC_OFFICE_ID = 12
- STATE_TREASURER_ELEC_OFFICE_ID = 53
# State office per district
STATE_SENATE_ELEC_OFFICE_ID = 9
STATE_REP_ELEC_OFFICE_ID = 8
|
Uptade run_campbell docstring
Add log dec and precession to the "docstring's return" | @@ -1360,8 +1360,9 @@ class Rotor(object):
Returns
-------
results : array
- Array with the natural frequencies corresponding to each speed
- of the speed_rad array. It will be returned if plot=False.
+ Array with the damped natural frequencies, log dec and precessions
+ corresponding to each speed of the speed_rad arr... |
Update fork link in CONTRIBUTING.rst
Fork button was redirecting to fork jinja project instead of click project. | @@ -124,7 +124,7 @@ First time setup
.. _username: https://docs.github.com/en/github/using-git/setting-your-username-in-git
.. _email: https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account/setting-your-commit-email-address
.. _GitHub account: https://github.com/join
-.. _Fork: https://githu... |
Fix 'git_repo_exist' bug causing a deadlock
* Use command option `-h` with `git ls-remote` to list only
refs/heads reducing the size of the output. | @@ -227,7 +227,8 @@ def git_repo_exists(url, timeout=5):
"""Check if URL refers to git valid repository."""
try:
os.environ['GIT_TERMINAL_PROMPT'] = '0'
- run_command('git ls-remote %s' % url, check=True, timeout=timeout)
+ run_command('git ls-remote --exit-code -h %s' % url, check=True,
+ timeout=timeout)
except (Spaw... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.