message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
Add another test case for Metadata.supports_py2
This pattern is commonly used to indicate Python 2.7 or 3.x support. | @@ -81,7 +81,8 @@ def test_normalize_file_permissions():
("3", False),
(">= 3.7", False),
("<4, > 3.2", False),
- ('>3.4', False),
+ (">3.4", False),
+ (">=2.7, !=3.0.*, !=3.1.*, !=3.2.*", True),
],
)
def test_supports_py2(requires_python, expected_result):
|
Remove long comment
was complaining about this. It looks like personal debugging
info, so I think it should be safe to delete. Otherwise, we should
put it into a more useful form. | @@ -15,5 +15,3 @@ export JOBNAME="${jobname}"
${user_script}
'''
-
-# cd / && aprun -n 1 -N 1 -cc none -d 24 -F exclusive /bin/bash -c "/usr/bin/perl /home/yadunandb/.globus/coasters/cscript4670024543168323237.pl http://10.128.0.219:60003,http://127.0.0.2:60003,http://192.5.86.107:60003 0718-5002250-000000 NOLOGGING; e... |
Add 5th screenshot custom click & fix style issue
I tested this locally as well. | @@ -185,7 +185,10 @@ quaternary:
message: wait for IA quaternary
PR:
- overseerScript: await page.waitForNavigation({waitUntil:"domcontentloaded"}); await page.waitForSelector("#ember906");page.click("#ember906");page.done();
+ overseerScript:
+ await page.waitForNavigation({waitUntil:"domcontentloaded"});
+ await page... |
doc: minor fix to resource resolution docs
Correct the documentation for what happens if a resource is not found. | @@ -241,8 +241,9 @@ An object looking for a resource invokes a resource resolver with an instance of
``Resource`` describing the resource it is after. The resolver goes through the
getters registered for that resource type in priority order attempting to obtain
the resource; once the resource is obtained, it is returne... |
Update README.md
changed references to librephotos | <div style="text-align:center"><img width="100" src ="/screenshots/logo.png"/></div>
-# Ownphotos
+# LibrePhotos
## Screenshots
-
-:
pass
else:
return guid
- return self.guids.order_by('-created').first()
+ return self.guids.first()
class Meta:
abstract = True
|
Update solve_captchas.py for aiopogo 2.0
Update solve_captchas to use the protobuf objects returned by aiopogo
2.0, also use the inventory_timestamp in the account dict if available. | #!/usr/bin/env python3
-from multiprocessing.managers import BaseManager
from asyncio import get_event_loop, sleep
+from multiprocessing.managers import BaseManager
from time import time
-from selenium import webdriver
-from selenium.webdriver.support.ui import WebDriverWait
-from selenium.webdriver.support import expe... |
Use links from releases, not packages.
Prevents duplicates. | @@ -55,8 +55,8 @@ function import_opsmgr_variables() {
{% endif %}
{% endfor %}
{% endfor %}
- {% for package in context.packages if package.is_app %}
- {% for link in package.consumes %}
+ {% for release in context.releases if release.consumes %}
+ {% for link in release.consumes %}
<% if_link('{{ link }}') do |link| ... |
Replace sudo with --user in CI caffe2 install
Summary: Pull Request resolved: | @@ -217,7 +217,7 @@ if [[ -z "$INTEGRATED" ]]; then
else
- sudo FULL_CAFFE2=1 python setup.py install
+ FULL_CAFFE2=1 python setup.py install --user
# TODO: I'm not sure why this is necessary
cp -r torch/lib/tmp_install $INSTALL_PREFIX
|
Add Timeout To The Sync Cog
Adds a 30-minute timeout while waiting for the guild to be chunked in
the sync cog, after which the cog is not loaded. | import asyncio
+import datetime
from typing import Any, Dict
from botcore.site_api import ResponseCodeError
from discord import Member, Role, User
from discord.ext import commands
-from discord.ext.commands import Cog, Context
+from discord.ext.commands import Cog, Context, errors
from bot import constants
from bot.bot... |
Assert that unsigned resources stay unsigned
This adds a test to verify that an unsigned resource retains the
signature version `botocore.UNSIGNED`. Previously an issue with
deepcopy caused this behavior to break. | # language governing permissions and limitations under the License.
from tests import unittest
+import botocore
import botocore.stub
+from botocore.config import Config
from botocore.stub import Stubber
from botocore.compat import six
@@ -531,3 +533,16 @@ class TestS3ObjectSummary(unittest.TestCase):
# Even though an H... |
Fix SB generator
Fixed one bug where the muxing logic was incorrect
Made the config reg addressing explicit and to-spec. | @@ -46,7 +46,7 @@ class SB(Configurable):
for side_in in sides:
if side_in == side:
continue
- mux_in = getattr(side.I, f"layer{layer}")[track]
+ mux_in = getattr(side_in.I, f"layer{layer}")[track]
self.wire(mux_in, mux.ports.I[idx])
idx += 1
for input_ in self.inputs[layer]:
@@ -60,8 +60,18 @@ class SB(Configurable):
... |
[Bug] Final state was stored as Hermitian by default.
Final state will not be Hermitian if initial state is not. | @@ -537,6 +537,7 @@ def _generic_ode_solve(func, ode_args, rho0, tlist, e_ops, opt,
if opt.store_final_state:
cdata = get_curr_state_data(r)
- output.final_state = Qobj(cdata, dims=dims, isherm=True)
+ output.final_state = Qobj(cdata, dims=dims,
+ isherm=rho0.isherm or None)
return output
|
BUG: fix regression in _save(): remove precision argument
does not exist in recent numpy | @@ -21,7 +21,7 @@ __all__ = ['lobpcg']
def _save(ar, fileName):
# Used only when verbosity level > 10.
- np.savetxt(fileName, ar, precision=8)
+ np.savetxt(fileName, ar)
def _report_nonhermitian(M, a, b, name):
|
fw/DatabaseOutput: Only attempt to extract config if avaliable
Do not try to parse `kernel_config` if no data is present. | @@ -948,6 +948,7 @@ class DatabaseOutput(Output):
def kernel_config_from_db(raw):
kernel_config = {}
+ if raw:
for k, v in zip(raw[0], raw[1]):
kernel_config[k] = v
return kernel_config
|
Update org.py
Fix a string formatting issue. | @@ -7,12 +7,12 @@ def dict_to_yaml(x):
yaml = []
for key, value in x.items():
if type(value) == list:
- yaml += "{key}:".format(key=key)
+ yaml += "{key}:\n".format(key=key)
for v in value:
- yaml += "- {v}".format(v=v)
+ yaml += "- {v}\n".format(v=v)
else:
- yaml += "{key}: {value}".format(key=key, value=value)
- retu... |
Throw if block is too old
So that the block stays in the new_block_pool to avoid broadcast storm | @@ -648,7 +648,11 @@ class ShardState:
self.header_tip.height,
)
)
- return None
+ raise ValueError(
+ "block is too old {} << {}".format(
+ block.header.height, self.header_tip.height
+ )
+ )
if self.db.contain_minor_block_by_hash(block.header.get_hash()):
return None
|
Minor fixes to ARFReg
Make the weighted vote be applied only when aggregation is 'mean'
Fix typo
Update test | @@ -249,7 +249,7 @@ class BaseTreeRegressor(HoeffdingTreeRegressor):
leaf_model: base.Regressor = None,
model_selector_decay: float = 0.95,
nominal_attributes: list = None,
- attr_obs: str = "gaussian",
+ attr_obs: str = "e-bst",
attr_obs_params: dict = None,
min_samples_split: int = 5,
seed=None,
@@ -733,7 +733,7 @@ c... |
Strip quotes from font names in SVG
Fix | @@ -27,7 +27,9 @@ def text(svg, node, font_size):
# TODO: use real computed values
style = INITIAL_VALUES.copy()
- style['font_family'] = node.get('font-family', 'sans-serif').split(',')
+ style['font_family'] = [
+ font.strip('"\'') for font in
+ node.get('font-family', 'sans-serif').split(',')]
style['font_style'] = ... |
Changed the way song is played from AsnycIO Queue to Python List[]
Added $removesong <index> command | @@ -71,7 +71,7 @@ class VoiceState:
self.voice = None
self.bot = bot
self.play_next_song = asyncio.Event()
- self.songs = asyncio.Queue()
+ #self.songs = asyncio.Queue()
self.playlist = []
self.skip_votes = set() # a set of user_ids that voted
self.audio_player = self.bot.loop.create_task(self.audio_player_task())
@@ -... |
Attempt fix test timeouts
Zuul unit test jobs have sometimes been timing out, often while
executing a test that attempts getaddrinfo. Mock the getaddrinfo call
to see if that helps. | @@ -5580,17 +5580,34 @@ class TestStatsdLogging(unittest.TestCase):
# instantiation so we don't call getaddrinfo() too often and don't have
# to call bind() on our socket to detect IPv4/IPv6 on every send.
#
- # This test uses the real getaddrinfo, so we patch over the mock to
- # put the real one back. If we just stop... |
Updated build_application_zip to raise when there's an error.
The errors were being returned, but nothing is looking at that return value. | @@ -3,6 +3,8 @@ from io import open
import os
import tempfile
from wsgiref.util import FileWrapper
+from celery import states
+from celery.exceptions import Ignore
from celery.task import task
from celery.utils.log import get_task_logger
from django.conf import settings
@@ -152,6 +154,9 @@ def build_application_zip(inc... |
Add component overlay classes.
These are the classes that should apply to all overlays and replace
their current functions. | .new-style a.no-style {
color: inherit;
}
+
+/* -- unified overlay design component -- */
+.overlay {
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100vw;
+ height: 100vh;
+ overflow: auto;
+ -webkit-overflow-scrolling: touch;
+
+ background-color: rgba(32,32,32,0.8);
+ z-index: 105;
+
+ pointer-events: none;
+ opac... |
Force output format to json
To solve a potential issue wih "print(r.json())" at L1504 | @@ -1494,7 +1494,8 @@ class WDItemEngine(object):
'claim': statement_id,
'token': login.get_edit_token(),
'baserevid': revision,
- 'bot': True
+ 'bot': True,
+ 'format': 'json'
}
headers = {
'User-Agent': user_agent
|
DOC: sparse.csgraph: clarify laplacian normalization
Clarify normalization of laplacian being symmetric normalization as
opposed to random walk normalization. | @@ -24,7 +24,7 @@ def laplacian(csgraph, normed=False, return_diag=False, use_out_degree=False):
csgraph : array_like or sparse matrix, 2 dimensions
compressed-sparse graph, with shape (N, N).
normed : bool, optional
- If True, then compute normalized Laplacian.
+ If True, then compute symmetric normalized Laplacian.
r... |
Fix pre 0.4 builds.
Fix regex expression to search for libaten | @@ -106,7 +106,7 @@ cuda_files = find(curdir, lambda file: file.endswith(".cu"), True)
cuda_headers = find(curdir, lambda file: file.endswith(".cuh"), True)
headers = find(curdir, lambda file: file.endswith(".h"), True)
-libaten = list(set(find(torch_dir, re.compile("libaten", re.IGNORECASE).search, True)))
+libaten = ... |
Update eveonline.py
update documentation url since original url is 404'ing | """
EVE Online Single Sign-On (SSO) OAuth2 backend
-Documentation at https://developers.eveonline.com/resource/single-sign-on
+Documentation at https://eveonline-third-party-documentation.readthedocs.io/en/latest/sso/index.html
"""
from .oauth import BaseOAuth2
@@ -8,8 +8,9 @@ from .oauth import BaseOAuth2
class EVEOnl... |
Update reverse_words.py
The following update results in less lines of code and faster performance while preserving functionality. | # Created by sarathkaul on 18/11/19
+# Edited by farnswj1 on 4/4/20
def reverse_words(input_str: str) -> str:
@@ -13,10 +14,7 @@ def reverse_words(input_str: str) -> str:
input_str = input_str.split(" ")
new_str = list()
- for a_word in input_str:
- new_str.insert(0, a_word)
-
- return " ".join(new_str)
+ return ' '.jo... |
added more output for debugging
added more output for debugging
more info | @@ -65,7 +65,6 @@ def test_detection(test):
print("Testing %s" % name)
# Download data to temporal folder
data_dir = tempfile.TemporaryDirectory(prefix="data", dir=get_path("%s/humvee" % SSML_CWD))
- print("Temporal data dir %s" % data_dir.name)
# Temporal solution
d = test_desc['attack_data'][0]
test_data = os.path.ab... |
improve simplification for Take with inserted index
This patch replaces InsertAxis._rtake by a more powerful, unalign-based
simplification in Take.simplified. | @@ -1192,9 +1192,6 @@ class InsertAxis(Array):
return appendaxes(self.func, index.shape)
return InsertAxis(_take(self.func, index, axis), self.length)
- def _rtake(self, func, axis):
- return insertaxis(_take(func, self.func, axis), axis+self.ndim-1, self.length)
-
def _takediag(self, axis1, axis2):
assert axis1 < axis... |
allow to pass 0 files to python App
Needed for LKQL's documentation generator. | @@ -1945,7 +1945,7 @@ class App(object):
def __init__(self, args=None):
self.parser = argparse.ArgumentParser(description=self.description)
- self.parser.add_argument('files', nargs='+', help='Files')
+ self.parser.add_argument('files', nargs='*', help='Files')
self.add_arguments()
# Parse command line arguments
|
Add a docstring to testing default gate domain constant
This was breaking my doc build for reasons I have not been able to track down. | @@ -16,6 +16,7 @@ from typing import List, Union, Sequence, Dict, Optional, TYPE_CHECKING
from cirq import ops, value
from cirq.circuits import Circuit
+from cirq._doc import document
if TYPE_CHECKING:
import cirq
@@ -33,6 +34,13 @@ DEFAULT_GATE_DOMAIN: Dict[ops.Gate, int] = {
ops.Y: 1,
ops.Z: 1
}
+document(
+ DEFAULT_... |
Update ptcheat.rst
scheduler.step() should not be called at the start of every epoch as of PyTorch 1.1.0. Instead it should be called after the optimizer has updated the weights (after optimizer.step() is called) | @@ -237,7 +237,7 @@ Learning rate scheduling
.. code-block:: python
scheduler = optim.X(optimizer,...) # create lr scheduler
- scheduler.step() # update lr at start of epoch
+ scheduler.step() # update lr after optimizer updates weights
optim.lr_scheduler.X # where X is LambdaLR, MultiplicativeLR,
# StepLR, MultiStepLR... |
Remove trailing slash in MANIFEST.in
Trailing slashes aren't allowed in directory patterns on Windows, and
have no effect otherwise. | @@ -2,8 +2,8 @@ include README.md
include LICENSE.txt
include requirements.txt
include qutip.bib
-recursive-include qutip/ *.pyx
-recursive-include qutip/ *.pxi
-recursive-include qutip/ *.hpp
-recursive-include qutip/ *.pxd
-recursive-include qutip/ *.ini
+recursive-include qutip *.pyx
+recursive-include qutip *.pxi
+... |
orgmode: Add support for console (shell-session) pygment lexer
Pygment has a colorizer for shell session avalaible as "console" or
"shell-session":
This simple change enables processing for these languages for
colorized console transcripts that I use often in my blog. | '(("asymptote" . "asymptote")
("awk" . "awk")
("c" . "c")
+ ("console" . "console")
("c++" . "cpp")
("cpp" . "cpp")
("clojure" . "clojure")
("scala" . "scala")
("scheme" . "scheme")
("sh" . "sh")
+ ("shell-session" . "shell-session")
("sql" . "sql")
("sqlite" . "sqlite3")
("tcl" . "tcl"))
|
Validate that head and tail are valid properties
Are defined on the element. | @@ -3,8 +3,9 @@ import itertools
import pytest
from gaphor.C4Model import diagramitems as c4_diagramitems
+from gaphor.core.modeling.element import Element
from gaphor.diagram.presentation import LinePresentation
-from gaphor.diagram.support import get_diagram_item_metadata
+from gaphor.diagram.support import get_diagr... |
Standardize timezone when truncating dates
This fixes the tests when run on other timezones. | @@ -109,7 +109,8 @@ def product_counts(index, period, expressions):
for product, series in index.datasets.count_by_product_through_time(period, **expressions):
click.echo(product.name)
for timerange, count in series:
- click.echo(' {}: {}'.format(timerange[0].strftime("%Y-%m-%d"), count))
+ formatted_dt = _assume_utc(t... |
remove unused import statement
small commit and push to try run testing on jenkins again | @@ -4,7 +4,6 @@ Demand model of thermal loads
"""
from __future__ import division
import numpy as np
-import pandas as pd
from cea.demand import demand_writers
from cea.demand import latent_loads
from cea.demand import occupancy_model, hourly_procedure_heating_cooling_system_load, ventilation_air_flows_simple
|
Don't zip datum lists together
Hopefully this is simpler iteration | @@ -909,27 +909,28 @@ class EntriesHelper(object):
datum_.id = new_id
ret = []
- offset = 0
- for this_datum_meta, parent_datum_meta in zip_longest(datums, parent_datums):
- if parent_datum_meta and this_datum_meta != parent_datum_meta:
+ datums_remaining = list(datums)
+ for parent_datum_meta in parent_datums:
if not ... |
Add docker instructions
Thanks for helping me get this to run! | @@ -21,6 +21,19 @@ python setup.py install
bash install_for_anaconda_users.sh
```
+### For Docker Users
+
+Install Docker from https://www.docker.com/
+For macOS users with [Homebrew](https://brew.sh/) installed, use `brew cask install docker`
+
+Then, run:
+
+```sh
+git clone https://github.com/OpenMined/PySyft.git
+c... |
Update mediaprocessor.py
default to None instead of first valid pix_fmt, lets FFMPEG choose | @@ -708,11 +708,11 @@ class MediaProcessor:
vpix_fmt = None
elif vpix_fmt and vpix_fmt not in valid_formats:
if vHDR and len(self.settings.hdr.get('pix_fmt')) > 0:
- new_vpix_fmt = next((vf for vf in self.settings.hdr.get('pix_fmt') if vf in valid_formats), valid_formats[0])
+ new_vpix_fmt = next((vf for vf in self.set... |
Update suspicious_event_log_service_behavior.yml
updating filter name | @@ -8,7 +8,7 @@ datamodel: []
description: This search looks for Windows events that indicate the event logging service has been shut down.
search: (`wineventlog_security` EventCode=1100) | stats count min(_time) as firstTime max(_time) as lastTime by EventCode
dest | `security_content_ctime(firstTime)` | `security_con... |
DOCS: developer style guide
First draft of a pysat style guide. | @@ -93,3 +93,35 @@ For merging, you should:
Travis to run the tests for each change you add in the pull request.
Because testing here will delay tests by other developers, please ensure
that the code passes all tests on your local system first.
+
+Project Style Guidelines
+------------------------
+
+In general, pysat ... |
Re-enable Compute library tests.
ci image v0.06 does not appear to have the flakiness shown in ci image v0.05.
However what changed between the 2 remains a mystery and needs further
debugging. However for now re-enable this to see how this fares in CI
Fixes | @@ -27,5 +27,4 @@ source tests/scripts/setup-pytest-env.sh
find . -type f -path "*.pyc" | xargs rm -f
make cython3
-echo "Temporarily suspended while we understand flakiness with #8117"
-#run_pytest ctypes python-arm_compute_lib tests/python/contrib/test_arm_compute_lib
+run_pytest ctypes python-arm_compute_lib tests/p... |
fix: travis handle git errors if any occur
eg:
fatal: Invalid symmetric difference expression
fatal: bad object | @@ -47,11 +47,14 @@ matrix:
script: bench --site test_site run-ui-tests frappe --headless
before_install:
- # do we really want to run travis?
+ # do we really want to run travis? check which files are changed and if git doesnt face any fatal errors
- |
- ONLY_DOCS_CHANGES=$(git diff --name-only $TRAVIS_COMMIT_RANGE | ... |
Update charsets
add all digits to setset
add upperset letters to alphaset
set vars must start with alphaset char | @@ -12,13 +12,13 @@ binset = set('01')
decset = set('0123456789')
hexset = set('01234567890abcdef')
intset = set('01234567890abcdefx')
-setset = set('.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')
+setset = set('.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789')
varset = set('$.:abcdefghijklmnop... |
Add no_letterhead to form_dict
no_letterhead in form_dict was missing | @@ -1220,7 +1220,7 @@ def format(*args, **kwargs):
import frappe.utils.formatters
return frappe.utils.formatters.format_value(*args, **kwargs)
-def get_print(doctype=None, name=None, print_format=None, style=None, html=None, as_pdf=False, doc=None, output = None):
+def get_print(doctype=None, name=None, print_format=No... |
update signal-scope ExternalProject version
also fix qt version argument passed to external signal-scope build | @@ -586,11 +586,12 @@ if(USE_SIGNAL_SCOPE)
ExternalProject_Add(signal-scope
GIT_REPOSITORY https://github.com/openhumanoids/signal-scope.git
- GIT_TAG 62fe2f4
+ GIT_TAG a0bc791
CMAKE_CACHE_ARGS
${default_cmake_args}
${python_args}
${qt_args}
+ -DUSED_QTVERSION:STRING=${DD_QT_VERSION}
DEPENDS
ctkPythonConsole
PythonQt
|
Remove old test code at end of launcher.py
This is from benc-mypy typechecking work. | @@ -506,10 +506,3 @@ wait
overrides=self.overrides,
debug=debug_num)
return x
-
-
-if __name__ == '__main__':
-
- s = SingleNodeLauncher()
- wrapped = s("hello", 1, 1)
- print(wrapped)
|
AnimationGadget : draw tangents in animation editor gadget.
* draw tangent as line from key to tangent end position.
* draw handle as square at tangent end position.
ref | @@ -569,12 +569,55 @@ void AnimationGadget::renderLayer( Layer layer, const Style *style, RenderReason
{
Animation::CurvePlug *curvePlug = IECore::runTimeCast<Animation::CurvePlug>( &runtimeTyped );
+ const Imath::Color3f color3 = colorFromName( drivenPlugName( curvePlug ) );
+ const Imath::Color4f color4( color3.x, co... |
Give console feedback when creating datatoken
Why:
it takes a few seconds for the tx to go through on rinkeby
printing the resulting address helps insight & debugging | @@ -76,8 +76,11 @@ alice_wallet = Wallet(ocean.web3, private_key=os.getenv('ALICE_KEY'))
Publish a datatoken.
```
+print("create datatoken: begin")
data_token = ocean.create_data_token('DataToken1', 'DT1', alice_wallet, blob=ocean.config.metadata_store_url)
token_address = data_token.address
+print("create datatoken: d... |
Fix butler output.
Encode process output so that we don't get b'' everywhere. | @@ -118,7 +118,7 @@ def process_proc_output(proc, print_output=True):
lines = []
for line in iter(proc.stdout.readline, b''):
- _print('| %s' % line.rstrip())
+ _print('| %s' % line.rstrip().decode('utf-8'))
lines.append(line)
return b''.join(lines)
|
Add hall of fame
powered by | `nlp` originated from a fork of the awesome [`TensorFlow Datasets`](https://github.com/tensorflow/datasets) and the HuggingFace team want to deeply thank the TensorFlow Datasets team for building this amazing library. More details on the differences between `nlp` and `tfds` can be found in the section [Main differences... |
[massthings] dont use this cog. i srsly, dont
massunban cmd | @@ -3,9 +3,10 @@ from collections import Counter
from typing import Union
import discord
-from redbot.core import checks, commands
+from redbot.core import checks, commands, modlog
from redbot.core.config import Config
from redbot.core.i18n import Translator, cog_i18n
+from redbot.core.utils import AsyncIter
from redbo... |
jenkins engine status checker changes
previous was useless, it wasnot failed due incorrect creds. | @@ -85,8 +85,8 @@ class JenkinsEngine(BaseEngine):
status = config.get('PROVISIONER_UNKNOWN_STATE')
try:
client = jenkins.Jenkins(config.get('JENKINS_API_URL'), **conn_kw)
- version = client.get_version()
- if version:
+ auth_verify = client.get_whoami()
+ if auth_verify:
status = config.get('PROVISIONER_OK_STATE')
exc... |
Update rsmtool/utils.py
Change description of formula. | @@ -746,7 +746,7 @@ def quadratic_weighted_kappa(y_true_observed, y_pred, ddof=0):
:math:`QWK=\\frac{2*Cov[M-H]}{Var(H)+Var(M)+(\\bar{M}-\\bar{H})^2}`, where
- - :math:'Cov' - Covariance with normalization by the number of observations given
+ - :math:`Cov` - covariance with normalization by :math:`N` (the total number... |
Opt: allow deferred type as _booleanize
TN: | @@ -1072,7 +1072,12 @@ class Opt(Parser):
return [self.parser]
def get_type(self):
- return self._booleanize or self.parser.get_type()
+ if self._booleanize is None:
+ return self.parser.get_type()
+ elif self._booleanize is BoolType:
+ return self._booleanize
+ else:
+ return resolve_type(self._booleanize)
def create_... |
Move atbash alphabet to cipheydists
Move atbash alphabet to cipheydists and add a parameter to specify which alphabet is used for the atbash operation. | from typing import Optional, Dict, List
-from ciphey.iface import Config, ParamSpec, T, U, Decoder, registry
+from ciphey.iface import Config, ParamSpec, T, U, Decoder, registry, WordList
@registry.register
@@ -18,8 +18,7 @@ class Atbash(Decoder[str, str]):
"""
result = ""
- letters = list("abcdefghijklmnopqrstuvwxyz")... |
Update CONTRIBUTING.md
Minor typo fixes | -============
Contributing
============
@@ -52,7 +51,7 @@ To set up `pysat` for local development:
Now you can make your changes locally. Tests for new instruments are
performed automatically. Tests for custom functions should be added to the
appropriately named file in ``pysat/tests``. For example, custom functions
- ... |
[commands] Fix certain annotations being allowed in hybrid commands
Union types were not properly constrained and callable types were
too eagerly being converted | @@ -109,6 +109,11 @@ def is_transformer(converter: Any) -> bool:
)
+def required_pos_arguments(func: Callable[..., Any]) -> int:
+ sig = inspect.signature(func)
+ return sum(p.default is p.empty for p in sig.parameters.values())
+
+
def make_converter_transformer(converter: Any) -> Type[app_commands.Transformer]:
async... |
FCR API Bulk_run_v2 handler (FIRST DRAFT)
Summary: This diff creates the handler for the v2 api for the bulk_run in FCR. | @@ -242,6 +242,31 @@ class CommandHandler(Counters, FacebookBase, FcrIface):
for dev, cmds in device_to_commands.items()
}
+ @ensure_thrift_exception
+ @input_fields_validator
+ @_append_debug_info_to_exception
+ @_ensure_uuid
+ async def bulk_run_v2(
+ self, request: ttypes.BulkRunCommandRequest
+ ) -> ttypes.BulkRunC... |
use isErr func
Fix release notes | @@ -15,7 +15,7 @@ script: |-
var retries = parseInt(args.retries) || 10;
for (i = 0 ; i < retries; i++) {
res = executeCommand('addEntitlement', {'persistent': args.persistent, 'replyEntriesTag': args.replyEntriesTag})
- if (res[0].Type === entryTypes.error) {
+ if (isError(res[0])) {
if (res[0].Contents.contains('[inv... |
camerad: reduce cpu usage
wait for 50ms | @@ -126,7 +126,7 @@ CameraBuf::~CameraBuf() {
}
bool CameraBuf::acquire() {
- if (!safe_queue.try_pop(cur_buf_idx, 1)) return false;
+ if (!safe_queue.try_pop(cur_buf_idx, 50)) return false;
if (camera_bufs_metadata[cur_buf_idx].frame_id == -1) {
LOGE("no frame data? wtf");
|
[perimeterPen] move source encoding declaration to the first line
Otherwise I get this error on python2.7:
SyntaxError: Non-ASCII character '\xc2' in file perimeterPen.py on line 87, but no encoding declared; see for details | -"""Calculate the perimeter of a glyph."""
# -*- coding: utf-8 -*-
+"""Calculate the perimeter of a glyph."""
from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
|
Fix incorrect __round__ behaviour
In some cases with large scenario parameters,
__round__ raises an error:
TypeError: type NoneType doesn't define __round__ method
Fix __round__ behaviour for StreamingAlgorithm ins == None. | @@ -330,7 +330,11 @@ class Table(Chart):
:returns: rounded float
:returns: str "n/a"
"""
- return round(ins.result(), 3) if has_result else "n/a"
+ r = ins.result()
+ if not has_result or r is None:
+ return "n/a"
+ else:
+ return round(r, 3)
def _row_has_results(self, values):
"""Determine whether row can be assumed a... |
The CLI documentation link sends to error 404
The CLI documentation link redirects to (with an ending slash), which gives a "page not found" error. works. It could probably be also solved by modifying the redirection. | @@ -134,7 +134,7 @@ By default, the Dropbox folder names will contain the capitalised config-name in
In the above case, this will be "Dropbox (Personal)" and "Dropbox (Work)".
A full documentation of the CLI is available on the
-[website](https://samschott.github.io/maestral/cli/).
+[website](https://maestral.app/cli).... |
PathListingWidget : Adapt for persistent PathModel
Logically this belongs with the previous commit, but I've separated them in the hope that it'll be easier to review separately. | @@ -392,23 +392,9 @@ class PathListingWidget( GafferUI.Widget ) :
dirPath = self.__dirPath()
if self.__currentDir!=dirPath or str( self.__path )==self.__currentPath :
- selectedPaths = self.getSelectedPaths()
- expandedPaths = None
- if str( self.__path ) == self.__currentPath :
- # the path location itself hasn't chan... |
Update developers.md : remove codacy
We took codacy out of our CI > 6 mos ago, because it was too heavy. Local was even harder to use. We missed removing it from developers.md, I guess. Fixing that now:) | @@ -130,46 +130,6 @@ pre-commit install
Now, this will auto-apply isort (import sorting), flake8 (linting) and black (automatic code formatting) to commits. Black formatting is the standard and is checked as part of pull requests.
-### 7.2 Code quality tests
-
-Use [codacy-analysis-cli](https://github.com/codacy/codacy... |
TST: Use joba='R' in gejsv
Previously joba='A' would incorrectly calculate a very small singulat
value for complex128 with Windows on Azure. joba='R' calculates the rank
more accurately leading to a passing result | @@ -1920,7 +1920,7 @@ def test_gejsv_with_rank_deficient_matrix(dtype):
sva[k:] = 0
SIGMA = np.diag(work[0] / work[1] * sva[:n])
A_rank_k = u @ SIGMA @ v.T
- sva, u, v, work, iwork, info = gejsv(A_rank_k)
+ sva, u, v, work, iwork, info = gejsv(A_rank_k, joba='R')
assert_equal(iwork[0], k)
assert_equal(iwork[1], k)
|
Updated Validator.pizza to MailCheck.ai
Updated Validator.pizza to MailCheck.ai (name, url, and description) to match service's change from December 2nd 2021. | @@ -446,12 +446,12 @@ API | Description | Auth | HTTPS | CORS |
| [EVA](https://eva.pingutil.com/) | Validate email addresses | No | Yes | Yes |
| [Kickbox](https://open.kickbox.com/) | Email verification API | No | Yes | Yes |
| [Lob.com](https://lob.com/) | US Address Verification | `apiKey` | Yes | Unknown |
+| [Mai... |
Fix vae_test
The success condition is not so reliable. I've seen several CI failure because of it. So relax it a little bit. | @@ -121,7 +121,7 @@ class VaeTest(VaeMnistTest):
last_val_loss = hist.history['val_loss'][-1]
print("loss: ", last_val_loss)
- self.assertTrue(38.0 < last_val_loss <= 39.0)
+ self.assertTrue(37.5 < last_val_loss <= 39.0)
if INTERACTIVE_MODE:
self.show_encoded_images(model)
self.show_sampled_images(lambda eps: decoding_... |
Update egghead_questions.json
Fixed question "Who is considered to be the founder of Earth Day?"
Fixed question "When was the first Earth Day?" | "1999",
"1970"
],
- "correct_answer": 2
+ "correct_answer": 3
},
{
"question": "Who is considered to be the founder of Earth Day?",
"President Jimmy Carter",
"President John F. Kennedy",
"Vice President Al Gore",
- "Senator Gaylord Nelson"
+ "John McConnell"
],
"correct_answer": 3
},
|
Update settings.py
Fix missing kwargs and task ids in django-celery-results | @@ -895,6 +895,7 @@ CELERY_TASK_DECORATOR_KWARGS = {
CELERY_RESULT_BACKEND = os.environ.get("CELERY_RESULT_BACKEND", "django-db")
CELERY_RESULT_PERSISTENT = True
+CELERY_RESULT_EXTENDED = True
CELERY_RESULT_EXPIRES = timedelta(days=7)
CELERY_TASK_ACKS_LATE = strtobool(
os.environ.get("CELERY_TASK_ACKS_LATE", "False")
|
[easy] Allow non-integer daemon intervals
Summary: Some new daemons ping more frequently than once per second potentially.
Test Plan: BK
Reviewers: johann, prha | @@ -37,7 +37,7 @@ def get_default_daemon_logger(daemon_name):
class DagsterDaemon:
def __init__(self, interval_seconds):
self._logger = get_default_daemon_logger(type(self).__name__)
- self.interval_seconds = check.int_param(interval_seconds, "interval_seconds")
+ self.interval_seconds = check.numeric_param(interval_se... |
[cli][testing] skipping files that cannot be dumped to json
Files that are unable to be dumped to json will now be skipped in the loop. | @@ -106,7 +106,12 @@ def format_record(test_record):
elif service == 'kinesis':
kinesis_path = os.path.join(DIR_TEMPLATES, 'kinesis.json')
with open(kinesis_path, 'r') as kinesis_template:
+ try:
template = json.load(kinesis_template)
+ except ValueError as err:
+ LOGGER_CLI.error('Error loading kinesis.json: %s', err)... |
Update documentation for release process
Summary: Removing references to RTD and add step for release notes.
Test Plan: docs only
Reviewers: sashank, max, alangenfeld, yuhan | @@ -37,7 +37,6 @@ It's also prudent to release from a fresh virtualenv.
- You must have PyPI credentials available to twine (see below), and you must be permissioned as a
maintainer on the projects.
-- You must be permissioned as a maintainer on ReadTheDocs.
- You must export `SLACK_RELEASE_BOT_TOKEN` with an appropria... |
Remove an unnecessary pylint annotation
Most likely when the method was modified to handle all StratisCliUserErrors
in the same way, the number of branches fell below pylint's objection
level. | @@ -102,7 +102,6 @@ def get_errors(exc):
# pylint: disable=too-many-return-statements
-# pylint: disable=too-many-branches
def _interpret_errors(errors):
"""
Laboriously add best guesses at the cause of the error, based on
|
move function specific imports to function
re: review from that this should only get imported in the function
modify the else/if logic since inside the function we already know the python version is >= 3.10, and just have to know if it is 3.11 or greater | @@ -44,10 +44,6 @@ from _pytest.stash import StashKey
if TYPE_CHECKING:
from _pytest.assertion import AssertionState
-if sys.version_info >= (3, 11):
- from importlib.resources.readers import FileReader
-elif sys.version_info >= (3, 10):
- from importlib.readers import FileReader
assertstate_key = StashKey["AssertionSt... |
Update contributing documentation (fixes
Also documents the usage of the new PR import script. | @@ -360,22 +360,21 @@ Pull Requests
* All pull requests must be reviewed by a person other than the request's
author.
+* Modified pull requests must be re-reviewed before merging. **Note that Github
+ does not enforce this!**
+
* Pull requests will not be merged unless Travis and Gitlab CI tests pass.
Gitlab tests are ... |
Make sure False is not interpreted as None when parsing WDL secondary file
same for 0, '', and [] | @@ -190,14 +190,14 @@ class SynthesizeWDL:
# check the json file for the expression's value
# this is a higher priority and overrides anything written in the .wdl
json_expressn = self.json_var(wf=wfname, var=var)
- if json_expressn:
+ if json_expressn is not None:
var_expressn['value'] = json_expressn
# empty string
if... |
Fixed my repeat of the previous value when nothing available
The repeat is `~` | @@ -539,7 +539,7 @@ def subpartqty_split(components, distributors, split_extra_fields):
field_manf_dist_code_prior = field_manf_dist_code
# Update other fields
for field, values in subparts_extra.items():
- subpart_actual[field] = values[subparts_index] if subparts_index < len(values) else values[-1]
+ subpart_actual[f... |
docs(introdution.py): update course info to introduction.py
update course info to introduction.py | @@ -695,7 +695,7 @@ if __name__ == "__main__":
print(futures_zh_realtime_df)
futures_zh_minute_sina_df = futures_zh_minute_sina(
- symbol="TF2009", period="1"
+ symbol="M2301", period="1"
)
print(futures_zh_minute_sina_df)
|
Update CONTRIBUTING.md
* Update CONTRIBUTING.md
Needed to tell people so we do not receive any duplicate solution. Do not count this as hactoberfest-accepted
* Update CONTRIBUTING.md
* Update CONTRIBUTING.md
typo fix
* Update CONTRIBUTING.md | @@ -15,7 +15,7 @@ We are very happy that you consider implementing algorithms and data structure f
- Your work will be distributed under [MIT License](LICENSE.md) once your pull request is merged
- You submitted work fulfils or mostly fulfils our styles and standards
-**New implementation** is welcome! For example, new... |
tools: update operator Region split
Via: | @@ -360,7 +360,7 @@ Success!
### `operator [show | add | remove]`
-Use this command to view and control the scheduling operation.
+Use this command to view and control the scheduling operation, split a Region, or merge Regions.
Usage:
@@ -380,6 +380,8 @@ Usage:
>> operator remove 1 // Remove the scheduling operation of... |
Catch TypeError instead of KeyError.
Fixes | @@ -231,7 +231,7 @@ class Channel(virtual.Channel):
def _message_to_python(self, message, queue_name, queue):
try:
body = base64.b64decode(message['Body'].encode())
- except KeyError:
+ except TypeError:
body = message['Body'].encode()
payload = loads(bytes_to_str(body))
if queue_name in self._noack_queues:
|
improve tagging method
prevent duplicate posters while still copying all other streams | @@ -200,27 +200,20 @@ class Converter(object):
i += 1
os.rename(outfile, infile)
- opts = ['-i', infile, '-c', 'copy', '-map', '0']
+ opts = ['-i', infile, '-map', '0:v:0', '-c:v:0', 'copy', '-map', '0:a?', '-c:a', 'copy', '-map', '0:s?', '-c:s', 'copy', '-map', '0:t?', '-c:t', 'copy']
info = self.ffmpeg.probe(infile)
... |
Remove $SCRIPT_ROOT from 'admin.create_template_from_zone' URL
As the URL here is contructed from Flask's "url_for" which already
takes the script root into account, we do not need to add it here
explicitly. This would result in a duplicate script root otherwise. | data['name'] = modal.find('#template_name').val();
data['description'] = modal.find('#template_description').val();
data['domain'] = modal.find('#domain').val();
- applyChanges(data, $SCRIPT_ROOT + "{{ url_for('admin.create_template_from_zone') }}", true);
+ applyChanges(data, "{{ url_for('admin.create_template_from_zo... |
query: apply filters to CSV result
Fix | @@ -177,7 +177,7 @@ class QueryShell(BQLShell, FavaModule):
try:
types, rows = run_query(
- self.ledger.all_entries,
+ self.ledger.entries,
self.ledger.options,
query_string,
numberify=True,
|
config.errors: try to consistently not capitalize error messages
This allows the cli tool output to look more consistent. | @@ -36,7 +36,7 @@ class PermissionError(BaseError):
self.message = message
def __str__(self):
- s = "Permission denied to %r" % (self.path,)
+ s = "permission denied to %r" % (self.path,)
if self.message:
s += "; %s." % (self.message.rstrip("."),)
return s
@@ -88,7 +88,7 @@ class ParsingError(ConfigurationError):
self.... |
2.8.8
Automatically generated by python-semantic-release | @@ -9,7 +9,7 @@ https://community.home-assistant.io/t/echo-devices-alexa-as-media-player-testers
"""
from datetime import timedelta
-__version__ = "2.8.7"
+__version__ = "2.8.8"
PROJECT_URL = "https://github.com/custom-components/alexa_media_player/"
ISSUE_URL = "{}issues".format(PROJECT_URL)
|
Support DNSimple sandbox
An optional parameter 'sandbox' can be used to select the base URL
for the Sandbox API (see ). | @@ -30,13 +30,16 @@ class DnsimpleClientUnauthorized(DnsimpleClientException):
class DnsimpleClient(object):
- BASE = 'https://api.dnsimple.com/v2/'
- def __init__(self, token, account):
+ def __init__(self, token, account, sandbox):
self.account = account
sess = Session()
sess.headers.update({'Authorization': 'Bearer ... |
Fix segfault while printing value type for an error msg in emitListComprehension
Summary: Pull Request resolved: | @@ -1135,8 +1135,9 @@ struct to_ir {
list_type = getListCompType(lc, IntType::get());
} else {
throw ErrorReport(lc.range())
- << "iterator expression is expected to be a list, iterable, or range, found "
- << (siv ? siv->getValue()->type()->python_str() : siv->kind());
+ << "iterator expression is expected to be a lis... |
Add more expiration details to infraction DMs
Separate the expiration timestamp and the duration. Explicitly indicate
if an infraction is permanent or expired. Include the time remaining as
a humanised delta. | import typing as t
from datetime import datetime
+import arrow
import discord
from discord.ext.commands import Context
@@ -44,6 +45,7 @@ LONGEST_EXTRAS = max(len(INFRACTION_APPEAL_SERVER_FOOTER), len(INFRACTION_APPEAL
INFRACTION_DESCRIPTION_TEMPLATE = (
"**Type:** {type}\n"
"**Expires:** {expires}\n"
+ "**Duration:** {... |
Metadata binding : Release GIL when registering an instance value
This method ends up invoking an Action, which tries to cancel background tasks. If those background tasks are using Python, they need to acquire the GIL in order to be cancelled. | @@ -316,6 +316,12 @@ struct ValueChangedSlotCaller
};
+void registerInstanceValue( GraphComponent *instance, InternedString key, ConstDataPtr value, bool persistent )
+{
+ IECorePython::ScopedGILRelease gilRelease;
+ Metadata::registerValue( instance, key, value, persistent );
+}
+
list keysToList( const std::vector<In... |
update xgboost version
Change version of xgboost to reflect newest version change from 1.4.2 to 1.5.0.
Authors:
- Mark Sadang (https://github.com/msadang)
Approvers:
- AJ Schmidt (https://github.com/ajschmidt8)
URL: | @@ -55,7 +55,7 @@ gpuci_mamba_retry install -c conda-forge -c rapidsai -c rapidsai-nightly -c nvid
"dask-cuda=${MINOR_VERSION}" \
"ucx-py=0.23.*" \
"ucx-proc=*=gpu" \
- "xgboost=1.4.2dev.rapidsai${MINOR_VERSION}" \
+ "xgboost=1.5.0dev.rapidsai${MINOR_VERSION}" \
"rapids-build-env=${MINOR_VERSION}.*" \
"rapids-notebook-... |
Use secure sha256 instead of sha1
Fix for bandit B303: Use of insecure MD2, MD4, MD5, or SHA1 hash function.
Partial-Bug: | @@ -183,7 +183,7 @@ def http_log_req(_logger, args, kwargs):
for (key, value) in six.iteritems(kwargs['headers']):
if key in SENSITIVE_HEADERS:
v = value.encode('utf-8')
- h = hashlib.sha1(v)
+ h = hashlib.sha256(v)
d = h.hexdigest()
value = "{SHA1}%s" % d
header = ' -H "%s: %s"' % (key, value)
|
Added a check to look at action
While comparing rally results, need another check to ensure that
action is present. | @@ -265,6 +265,8 @@ class Elastic(object):
continue
else:
for action in data[uuids[0]][scenario]:
+ if action not in data[uuids[1]][scenario]:
+ continue
dset = [data[uuids[0]][scenario][action],
data[uuids[1]][scenario][action]]
perf0 = data[uuids[0]][scenario][action]
|
Changed clip_grad_norm_ total_norm calculation
Summary:
Redefines the computation of the total_norm to increase performance as shown in
Pull Request resolved: | @@ -25,17 +25,13 @@ def clip_grad_norm_(parameters, max_norm, norm_type=2):
max_norm = float(max_norm)
norm_type = float(norm_type)
if norm_type == inf:
- total_norm = max(p.grad.data.abs().max() for p in parameters)
+ total_norm = max(p.grad.detach().abs().max() for p in parameters)
else:
- total_norm = 0
- for p in p... |
Use system background colour
I cannot test this on Windows as background colour is White despite having dark mode set. This is presumably a bug in wx/wxPython. | @@ -156,12 +156,11 @@ class ConsolePanel(wx.Panel):
style.SetLineSpacing(0)
style.SetParagraphSpacingBefore(0)
style.SetParagraphSpacingAfter(0)
+ bg = self.background_color()
if self.is_dark:
fg = wx.Colour("white")
- bg = wx.Colour("black")
else:
fg = wx.Colour("black")
- bg = wx.Colour("white")
style.SetTextColour(f... |
Sync: keep the mention for all edits of the confirmation prompt
This makes it clearer to users where the notification came from. | @@ -43,6 +43,7 @@ class Syncer(abc.ABC):
log.trace(f"Sending {self.name} sync confirmation prompt.")
allowed_emoji = (constants.Emojis.check_mark, constants.Emojis.cross_mark)
+ mention = ""
msg_content = (
f'Possible cache issue while syncing {self.name}s. '
f'More than {self.MAX_DIFF} {self.name}s were changed. '
@@ ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.