message
stringlengths
13
484
diff
stringlengths
38
4.63k
Change error msg for roll to use correct prefix Previously used `!` as the prefix, while `.` is the correct one Now imports prefix from bot.constants, so it'll always be up to date
@@ -10,7 +10,7 @@ from discord.ext import commands from discord.ext.commands import BadArgument, Bot, Cog, Context, MessageConverter, clean_content from bot import utils -from bot.constants import Colours, Emojis +from bot.constants import Client, Colours, Emojis log = logging.getLogger(__name__) @@ -70,7 +70,7 @@ clas...
Inherit ReAgent optimizer from PyTorch optimizer Summary: Pull Request resolved: See title
@@ -53,7 +53,7 @@ from .utils import is_torch_optimizer @dataclass -class Optimizer: +class Optimizer(torch.optim.Optimizer): # This is the wrapper for optimizer + scheduler optimizer: torch.optim.Optimizer lr_schedulers: List[torch.optim.lr_scheduler._LRScheduler]
mitmdump: also set dumper_filter to default filter on startup Fixes
@@ -152,6 +152,7 @@ def mitmdump(args=None): # pragma: no cover return dict( save_stream_filter=v, readfile_filter=v, + dumper_filter=v, ) return {}
Update cubes.py, changed axes for specsum Lines 311, 314 and 314: axis=(1,2) -> axis=1
@@ -308,13 +308,13 @@ def extract_aperture(cube, ap, r_mask=False, wcs=None, npixinmask = mask.sum() if method == 'mean': - specsum = nansum(cube[:, mask], axis=(1,2)) + specsum = nansum(cube[:, mask], axis=1) spec = specsum / npixinmask elif method == 'error': - specsum = nansum(cube[:, mask]**2, axis=(1,2)) + specsum...
Fixed incorrect file mode as pointed in github issue Changed file mode to 'a' instead of 'w'
@@ -107,9 +107,9 @@ created is itself a group, in this case the `root group`, named ``/``: >>> f.name u'/' -Creating a subgroup is accomplished via the aptly-named ``create_group``. But we need to open the file in read/write mode first :: +Creating a subgroup is accomplished via the aptly-named ``create_group``. But we...
Changed depot url template Blizzard changed the depot url format. Updated with new format
@@ -20,7 +20,7 @@ class DepotFile(object): """ #: The url template for all DepotFiles - url_template = "http://{0}.depot.battle.net:1119/{1}.{2}" + url_template = "https://{0}-s2-depot.classic.blizzard.com/{1}.{2}"" def __init__(self, bytes): #: The server the file is hosted on
Incidents: make crawl limit & sleep module-level constants Requested during review.
@@ -11,6 +11,14 @@ from bot.constants import Channels, Emojis, Roles, Webhooks log = logging.getLogger(__name__) +# Amount of messages for `crawl_task` to process at most on start-up - limited to 50 +# as in practice, there should never be this many messages, and if there are, +# something has likely gone very wrong +C...
MacOS is called "Macos" in settings not "Macosx".
@@ -51,7 +51,7 @@ class NinjaConan(ConanFile): def package_info(self): # ensure ninja is executable - if str(self.settings.os_build) in ["Linux", "Macosx"]: + if str(self.settings.os_build) in ["Linux", "Macos"]: name = os.path.join(self.package_folder, "bin", "ninja") os.chmod(name, os.stat(name).st_mode | 0o111) self...
Change Supervisor._processes to a dict so access is more natural This is just an implementation change and this should not lead to any behavior change from what I've seen.
@@ -71,7 +71,7 @@ class Supervisor(NamedMixin): self._args = arguments if arguments is not None else () self._background = background - self._processes = [] + self._processes = {} self._terminating = False super(Supervisor, self).__init__() @@ -102,7 +102,15 @@ class Supervisor(NamedMixin): args=self._args ) child.star...
TypeRepo.root_node: assert result is not None and refer to CompileCtx TN:
@@ -2831,7 +2831,9 @@ class TypeRepo(object): Shortcut to get the root AST node. :rtype: ASTNodeType """ - return StructMetaclass.root_grammar_class + result = get_context().root_grammar_class + assert result + return result @property def defer_root_node(self):
Avoid trying to deactivate the restricted session. Calling logout when the session is already dead results in calling the deactivate method on the gate middleware, which does not exist.
@@ -99,6 +99,8 @@ class WorkerGate(): if resp.object['type'] == 'http': self.q_http_replies.broadcast(resp) if resp.object['type'] == 'terminate': + if self.session != self.gateway_middleware: + # Not the restricted session, we can disable it self.session.deactivate() if resp.object['type'] == 'restart-master': aj.rest...
lightbox: Fix alignment of x button in image view menu. Fixes
color: hsla(0, 0%, 100%, 0.8); font-size: 2rem; - margin: 24px 20px 0 0; + margin: 11px 20px 0 0; transform: scaleY(0.75); font-weight: 300;
Update Loops.md Added a missing semicolon at the end of the tutorial array. Added a working solution.
@@ -50,7 +50,7 @@ In this exercise, you will need to loop through and print out all even numbers f Tutorial Code ------------- - @NUMBERS = (951,402,984,651,360,69,408,319,601,485,980,507,725,547,544,615,83,165,141,501,263,617,865,575,219,390,237,412,566,826,248,866,950,626,949,687,217,815,67,104,58,512,24,892,894,767,...
renamed measure() to expectation() fixed typo in call to backend.get_probabilities
@@ -151,7 +151,7 @@ class ProjectQDevice(Device): def execute(self): """ """ - #todo: I hope this function will become superflous, see https://github.com/XanaduAI/openqml/issues/18 + #todo: I hope this function will become superfluous, see https://github.com/XanaduAI/openqml/issues/18 self._out = self.execute_queued() ...
Docker: Add freetype-dev & replace libjpeg with libjpeg-turbo freetype-dev is required for loading fonts with pillow. * Remove zlib as zlib-dev installs zlib anyway
@@ -12,8 +12,8 @@ RUN apk add --no-cache --update \ git \ libffi-dev \ # Pillow dependencies - jpeg-dev \ - zlib \ + freetype-dev \ + libjpeg-turbo-dev \ zlib-dev RUN mkdir /bot
fix(test.py): fix test.py fix test.py
@@ -26,7 +26,7 @@ def test_path_func(): :rtype: pathlib.Path """ temp_path = get_ths_js("ths.js") - assert isinstance(temp_path, pathlib.WindowsPath) + assert isinstance(temp_path, pathlib.Path) if __name__ == "__main__":
Multparts working Multparts working for different quantities. MIssing groups the sub quantities (change in `kicost.py`file)
@@ -127,10 +127,17 @@ def subpart_qty(component): try: if logger.isEnabledFor(DEBUG_OBSESSIVE): print('Qty>>',component.refs,'>>', - component['manf#_subqty'], '*', len(component.refs)) - string = '=ceiling({{}}*{subqty}*{qty})'.format( - subqty=component['manf#_subqty'], + component.fields.get('manf#_subqty'), '*', + ...
Allow empty node_ids to override a manifest file In importcontent, node_ids is None needs to be treated differently from node_ids=[].
@@ -294,7 +294,7 @@ class Command(AsyncCommand): if manifest_file: content_manifest.read_file(manifest_file) use_content_manifest = True - elif path and detect_manifest and not (node_ids or exclude_node_ids): + elif path and detect_manifest and node_ids is None and exclude_node_ids is None: manifest_path = os.path.join...
Upgrade pandas version in CI Since pandas 1.1.5 was released, we should match the behavior to the latest version.
@@ -107,7 +107,7 @@ jobs: pyarrow-version: 1.0.1 - python-version: 3.8 spark-version: 3.0.1 - pandas-version: 1.1.4 + pandas-version: 1.1.5 pyarrow-version: 2.0.0 default-index-type: 'distributed-sequence' env:
Correct example configuration for databases. The loader module is common for databases, connectors and skills. So the configuration needs to follow the same format, i.e. each item under the databases 'sequence' needs a 'name' key, and various other parameters.
@@ -92,7 +92,7 @@ connectors: ## Database modules (optional) # databases: -# mongo: +# - name: mongo # host: "my host" # (Optional) default "localhost" # port: "12345" # (Optional) default "27017" # database: "mydatabase" # (Optional) default "opsdroid"
Prevent artifactual "running from outside your current environment" error Prevent warning when shutil.executable returns a symlink
@@ -299,10 +299,11 @@ def _check_environment_and_redirect(): If not, this utility tries to redirect the ``lightning`` call to the environment executable (prompting the user to install lightning for them there if needed). """ - env_executable = shutil.which("python") + env_executable = os.path.realpath(shutil.which("pyt...
create volume type with repeated name Test creating volume type with a repeated name will fail
@@ -69,3 +69,13 @@ class VolumeTypesNegativeTest(base.BaseVolumeAdminTest): self.assertRaises( lib_exc.NotFound, self.create_encryption_type, **create_kwargs) + + @decorators.attr(type=['negative']) + @decorators.idempotent_id('969b10c7-3d77-4e1b-a4f2-2d265980f7e5') + def test_create_with_repeated_name(self): + """Test...
Added a TODO comment I find that it is easier to search what to remove once something happens in code which has TODO comments. I added this one for good measure.
@@ -430,6 +430,7 @@ ctx_New(HPyContext ctx, HPy h_type, void **data) return HPy_NULL; #if PY_VERSION_HEX < 0x03080000 // Workaround for Python issue 35810; no longer necessary in Python 3.8 + // TODO: Remove this workaround once we no longer support Python versions older than 3.8 Py_INCREF(tp); #endif
gtk detailedlistrenderers: python 3.5 compat enum.auto() is in python >= 3.6
-from enum import Enum, auto +from enum import Enum import html from toga_gtk.icons import Icon @@ -33,9 +33,9 @@ class DetailedListRenderer: class IconTextRendererColumns(Enum): """ a single column contents""" - ICON = auto() - TITLE = auto() - TITLE_SUBTITLE = auto() + ICON = 1 + TITLE = 2 + TITLE_SUBTITLE = 3 class ...
integrations-docs: Update text in `create-bot-construct-url.md`. Revises the text about including a stream and a topic incoming webhook URLs in `create-bot-construct-url.md` for clarity and consistency.
@@ -6,16 +6,20 @@ bot using the bot's API key and the desired stream name: {!webhook-url.md!} Modify the parameters of the URL above, where `api_key` is the API key -of your Zulip bot, and `stream` is the [URL-encoded](https://www.urlencoder.org/) -stream name you want the notifications sent to. If you do not specify a...
'xfail' markers without a condition no longer rely on the underlying `Item` deriving from `PyobjMixin`
@@ -119,7 +119,6 @@ class MarkEvaluator: if hasattr(self, 'result'): return self.result if self.holder: - d = self._getglobals() if self.holder.args or 'condition' in self.holder.kwargs: self.result = False # "holder" might be a MarkInfo or a MarkDecorator; only @@ -135,6 +134,7 @@ class MarkEvaluator: for expr in args...
Fix out of order group names Non-matching order results in NaNs reported for S2
@@ -68,7 +68,7 @@ def analyze(problem, Y, calc_second_order=True, num_resamples=100, if not groups: D = problem['num_vars'] else: - D = len(set(problem['groups'])) + _, D = extract_group_names(groups) if calc_second_order and Y.size % (2 * D + 2) == 0: N = int(Y.size / (2 * D + 2)) @@ -107,7 +107,6 @@ def analyze(probl...
Remove unnecessary SetDefaultDevice(nullptr) (new context session reset default device to nullptr)
@@ -27,20 +27,12 @@ namespace { class ArrayDeviceTest : public ::testing::Test { protected: - void SetUp() override { - context_session_.emplace(); - orig_ = internal::GetDefaultDeviceNoExcept(); - SetDefaultDevice(nullptr); - } + void SetUp() override { context_session_.emplace(); } - void TearDown() override { - SetD...
Change openstack-dev to openstack-discuss Depends-On:
@@ -5,7 +5,7 @@ description = Service for storing sensitive client information for OpenStack description-file = README.md author = OpenStack -author-email = openstack-dev@lists.openstack.org +author-email = openstack-discuss@lists.openstack.org home-page = https://docs.openstack.org/barbican/latest/ classifier = Enviro...
test: string values inside qb objects case inside update queries needs a recursive call param wrapper got lost
@@ -116,6 +116,7 @@ class TestParameterization(unittest.TestCase): Case() .when(DocType.search_fields == "value", "other_value") .when(Coalesce(DocType.search_fields == "subject_in_function"), "true_value") + .else_("Overdue") ) ) @@ -128,6 +129,32 @@ class TestParameterization(unittest.TestCase): self.assertEqual(para...
the fix just type as int as there was already a check to ensure it will be an int
@@ -249,7 +249,7 @@ def discretize_oversample_1D(model, x_range, factor=10): # Evaluate model on oversampled grid x = np.linspace(x_range[0] - 0.5 * (1 - 1 / factor), x_range[1] - 0.5 * (1 + 1 / factor), - num = (x_range[1] - x_range[0]) * factor) + num=int((x_range[1] - x_range[0]) * factor)) values = model(x) @@ -265...
All trainees: factor out and improve the queryset Changes: * queryset "generation" is moved to a separate function * indentation was improved * is_*_instructor Sum(Case(When)) spaghetti was simplified using Python sub-function * new, general is_instructor annotation was added. Works with all instructor badges.
@@ -94,37 +94,50 @@ class TrainingProgressDelete(RedirectSupportMixin, OnlyForAdminsMixin, success_url = reverse_lazy('all_trainees') -@admin_required -def all_trainees(request): - filter = TraineeFilter( - request.GET, - queryset=Person.objects +def all_trainees_queryset(): + def has_badge(badge): + return Sum(Case(Wh...
fw/exception: Add 'message' property to `SerializerSyntaxError` Allow for the fact that Exceptions do not have a message attribute in Python3 so mimic the functionality.
@@ -89,6 +89,11 @@ class SerializerSyntaxError(Exception): """ Error loading a serialized structure from/to a file handle. """ + @property + def message(self): + if self.args: + return self.args[0] + return '' def __init__(self, message, line=None, column=None): super(SerializerSyntaxError, self).__init__(message)
tests/llvm/random: Random seed should be int32 Otherwise it hides the next argument (number of requested threads) Fixes ("cuda: Allow configurable thread block size")
@@ -37,7 +37,7 @@ def test_random_int(benchmark, mode): init_fun = pnlvm.LLVMBinaryFunction.get('__pnl_builtin_mt_rand_init') state = init_fun.byref_arg_types[0]() gpu_state = pnlvm.jit_engine.pycuda.driver.to_device(bytearray(state)) - init_fun.cuda_call(gpu_state, np.int64(SEED)) + init_fun.cuda_call(gpu_state, np.in...
logging: Organize logger configs for easier reference. This is a pure reordering.
@@ -1118,47 +1118,30 @@ LOGGING = { }, }, 'loggers': { + # root logger '': { 'handlers': DEFAULT_ZULIP_HANDLERS, 'filters': ['require_logging_enabled'], 'level': 'INFO', 'propagate': False, }, + + # Django, alphabetized 'django': { 'handlers': DEFAULT_ZULIP_HANDLERS, 'level': 'INFO', 'propagate': False, }, - 'zulip.req...
added OOPSpam API * added OOPSpam API * added OOSpam removed API from the name
@@ -234,6 +234,7 @@ API | Description | Auth | HTTPS | CORS | Link | | License-API | Unofficial REST API for choosealicense.com | No | Yes | No | [Go!](https://github.com/cmccandless/license-api/blob/master/README.md) | | LiveEdu | Live Coding Streaming | `OAuth` | Yes | Unknown | [Go!](https://www.liveedu.tv/developer...
fix PBI max per year in proforma because PBI max in mosel uses pwf_prod_incent with PV degradation for PV Techs, the max is lower by degradation every year
@@ -2583,7 +2583,7 @@ def generate_proforma(scenariomodel, output_file_path): for year in range(financial.analysis_years): hcs['{}{}'.format(upper_case_letters[year + 2], current_row)] = ( "=IF({year} < {pbi_year_limit}, " - "MIN({dol_per_kwh} * {pv_kwh}, {pbi_max}), 0)" + "MIN({dol_per_kwh} * {pv_kwh}, {pbi_max} * (1 ...
Support parsing of named Unicode escapes outside of the BMP in CPythons versions with a 2-byte Unicode representation. Closes
@@ -9,16 +9,16 @@ from __future__ import absolute_import import cython cython.declare(Nodes=object, ExprNodes=object, EncodedString=object, bytes_literal=object, StringEncoding=object, - FileSourceDescriptor=object, lookup_unicodechar=object, + FileSourceDescriptor=object, lookup_unicodechar=object, unicode_category=ob...
get_lldp_neighbors.py Junos fix chassis id if ip HG-- branch : pnpwin/get_lldp_neighborspy-junos-fix-chassis-i-1495805478736
@@ -14,6 +14,7 @@ from noc.sa.interfaces.base import (IntParameter, MACAddressParameter, InterfaceTypeError) from noc.sa.interfaces.igetlldpneighbors import IGetLLDPNeighbors +from noc.lib.validators import is_int, is_ipv4, is_ipv6 class Script(BaseScript): @@ -156,8 +157,7 @@ class Script(BaseScript): remote_port = ma...
Fix general_itest failues in cook_image Until is merged, we're not running general_itests in GHA
# See the License for the specific language governing permissions and # limitations under the License. """Contains methods used by the paasta client to build a docker image.""" +import argparse import os import sys +from typing import Optional from paasta_tools.cli.cmds.check import makefile_responds_to from paasta_too...
Call cleanup after each test This improves the situation for I see far fewer peak ipengine processes, but still more than I would expect if cleanup was working as expected after each test.
@@ -130,7 +130,9 @@ def load_dfk(config): module.config['globals'] = {} module.config['globals']['runDir'] = get_rundir() # Give unique rundir; needed running with -n=X where X > 1. parsl.clear() - parsl.load(module.config) + dfk = parsl.load(module.config) + yield + parsl.dfk().cleanup() @pytest.fixture(autouse=True)
Problem: nginx_container document is incorrect Solution Fixed nginx_container volume path and environment name.
@@ -12,8 +12,8 @@ reflect any changes made to the container. ``` docker run \ --name=tendermint_instance_pub_key \ - --env TENDERMINT_PUB_KEY_ACCESS_PORT='' + --env TM_PUB_KEY_ACCESS_PORT='' --publish=<nginx port for external connections>:<corresponding host port> \ - --volume=<host dir with public key>:/tendermint_nod...
Fix (very weird) Travis / pandoc install issue I really do not understand why there would be a difference between `sudo apt install pandoc` and `sudo apt-get install pandoc` Weird!
@@ -6,7 +6,7 @@ language: python python: - "3.6" install: - - sudo apt install pandoc # pandoc for jupyter notebooks + - sudo apt-get install pandoc # pandoc for jupyter notebooks - sudo apt install graphviz # graphviz for class inheritance diagrams in docs - pip install tox-travis script:
Update README.md Spelling corrections
@@ -15,7 +15,7 @@ A FEDn network, as illustrated in the picture below, is made up of three key age A Client is a data node, holding private data and connecting to a Combiner to recieve model update requests and model validation requests. Clients need to be configured to be able to execute model training for the ML-mode...
target/assistant: Fix logcat poller Rename the `start` method to `run` as this is what is what is called by the threading module's `start` method, otherwise this causes the polling to be done in the main thread blocking execution.
@@ -104,7 +104,7 @@ class LogcatPoller(threading.Thread): self.daemon = True self.exc = None - def start(self): + def run(self): self.logger.debug('starting polling') try: while True:
[dagit] Clean up /instance and /workspace redirects ### Summary & Motivation Cleaning up route redirects now that it's been a month or two. ### How I Tested These Changes Buildkite. Sanity check that Dagit routes are working as expected.
import {MainContent} from '@dagster-io/ui'; import * as React from 'react'; -import {Redirect, Route, Switch, useLocation} from 'react-router-dom'; +import {Route, Switch, useLocation} from 'react-router-dom'; const UserSettingsRoot = React.lazy(() => import('./UserSettingsRoot')); const WorkspaceRoot = React.lazy(() =...
Removed README Requirement From Contributing Document * Removed README requirement * Generated READMEs from sources using Ronbun on-behalf-of:
# Sample Programs in Ruby -Welcome to Sample Programs in Ruby! +Welcome to Sample Programs in Ruby! To find documentation related to the Ruby code in this repo, look [here.](https://sample-programs.therenegadecoder.com/languages/ruby) ## Sample Programs List
Fix message about help which parameters should be used for creating family file Let's show where will be file placed.
@@ -219,7 +219,7 @@ if __name__ == '__main__': print(""" Usage: {module} <url> <short name> Example: {module} https://www.mywiki.bogus/wiki/Main_Page mywiki -This will create the file families{sep}mywiki_family.py""" +This will create the file mywiki_family.py in pywikibot{sep}families""" .format(module=sys.argv[0].str...
operation events: fetch retry count from the right place it is in parameters directly, as stored in here:
@@ -172,8 +172,8 @@ class OperationsId(SecuredResource): return if exception is not None: operation.parameters.setdefault('error', str(exception)) - current_retries = context.get('current_retries') or 0 - total_retries = context.get('total_retries') or 0 + current_retries = operation.parameters.get('current_retries') o...
Ensure file_random_seed be 0 when use_per_host_infeed is True. Otherwise it will cause every host to read the same data and reduce the effectvie batch size by n times where n equals to the number of workers.
@@ -229,6 +229,13 @@ class BaseInputGeneratorFromFiles(BaseInputGenerator): 'record batcher.') return p + @base_layer.initializer + def __init__(self, params): + super(BaseInputGeneratorFromFiles, self).__init__(params) + if self.params.use_per_host_infeed and self.params.file_random_seed != 0: + raise ValueError('file...
more logging fixes call getLogger( "mininet" ) to set lg properly support warning() as well as (deprecated) warn() rearrange initialization slightly
'info': logging.INFO, 'output': OUTPUT, 'warning': logging.WARNING, + 'warn': logging.WARNING, 'error': logging.ERROR, 'critical': logging.CRITICAL } @@ -96,9 +97,9 @@ class MininetLogger( Logger, object ): __metaclass__ = Singleton - def __init__( self ): + def __init__( self, name="mininet" ): - Logger.__init__( self...
Get experiment object properties directly instead of using dictionary.
@@ -5,6 +5,8 @@ import nacl.utils import base64 import json +import sys + from studio.payload_builder import PayloadBuilder from studio import logs from studio.unencrypted_payload_builder import UnencryptedPayloadBuilder @@ -110,18 +112,22 @@ class EncryptedPayloadBuilder(PayloadBuilder): enc_key, enc_payload = self._e...
issue clean up FDs on failure explicitly The previous approach was crap since it left e.g. socketpair instances lying around for GC with their underlying FD already closed, coupled with FD number reuse, led to random madness when GC finally runs.
@@ -211,7 +211,7 @@ def create_socketpair(): return parentfp, childfp -def detach_popen(close_on_error=None, **kwargs): +def detach_popen(**kwargs): """ Use :class:`subprocess.Popen` to construct a child process, then hack the Popen so that it forgets the child it created, allowing it to survive a @@ -232,13 +232,7 @@ ...
Log payday.sql during recreate-schema.sh Took me a little longer to understand that this was happening while reviewing
@@ -24,6 +24,11 @@ echo "Applying sql/schema.sql ..." echo psql "$DATABASE_URL" < sql/schema.sql + + +echo "==============================================================================" +echo "Applying sql/payday.sql ..." +echo psql "$DATABASE_URL" < sql/payday.sql
No longer update influxDB IP in IP setter Because we're either binding on `localhost` or an external endpoint, there's no point in replacing this IP with the private one.
@@ -9,7 +9,6 @@ function set_manager_ip() { echo "Updating cloudify-amqpinflux.." /usr/bin/sed -i -e "s/AMQP_HOST=.*/AMQP_HOST="'"'"${ip}"'"'"/" /etc/sysconfig/cloudify-amqpinflux - /usr/bin/sed -i -e "s/INFLUXDB_HOST=.*/INFLUXDB_HOST="'"'"${ip}"'"'"/" /etc/sysconfig/cloudify-amqpinflux echo "Updating cloudify-riemann....
Update community-overview.rst small readability tweak
@@ -12,7 +12,7 @@ Mattermost Community Vision for Mattermost Community --------------------------------------------------------- -Increase popularity of Mattermost by increasing brand advocacy and meaningful product benefits that would otherwise not be offered through an engaged and empowered community contributing bes...
(snapshot-perf-1) More efficient implementation of has-snapshot-id Summary: Check for existence of a row without fetching and parsing the entire snaphsot Test Plan: BK Reviewers: prha
@@ -418,7 +418,7 @@ def delete_run(self, run_id): def has_pipeline_snapshot(self, pipeline_snapshot_id): check.str_param(pipeline_snapshot_id, 'pipeline_snapshot_id') - return bool(self.get_pipeline_snapshot(pipeline_snapshot_id)) + return self._has_snapshot_id(pipeline_snapshot_id) def add_pipeline_snapshot(self, pipe...
Trains imagenet for 100 epochs by default. This is closer to the number of steps reported in README's linked TensorBoard runs 225_200 steps, batch_size=512 56_250 steps, batch_size=2048
-# Copyright 2020 The Flax Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to i...
cleaned up data generation graph w seaborn ok graph w plotly ready (pending)
@@ -30,37 +30,81 @@ def volume_graph(l_args, s_ticker): if not ns_parser: return - opt = yf.Ticker(s_ticker).option_chain(ns_parser.s_expiry_date.strftime("%Y-%m-%d")) - # data available via: opt.calls, opt.puts + __get_volume_graph(s_ticker, ns_parser.s_expiry_date.strftime("%Y-%m-%d")) + + except SystemExit: + print(...
Fixed an uncaught bug A `break` was used instead of a `continue`, so it stopped mining instead of restarting it !
@@ -348,12 +348,12 @@ def AVRMine(): # Mining section debugOutput("Calculated hashrate ("+str(hashrate)+")") except: Connect() - break + continue try: soc.send(bytes(str(result[0]) + "," + str(hashrate) + ",Official AVR Miner v" + str(minerVersion), encoding="utf8")) # Send result back to the server except: Connect() -...
Adds default initialization to 'uuid' and 'collisionAction' in DataSet.__setstate__ This should fix some un-pickling old DataSet problems.
@@ -1457,8 +1457,8 @@ class DataSet(object): self.timeType = state_dict['timeType'] self.repType = state_dict['repType'] - self.collisionAction = state_dict['collisionAction'] - self.uuid = state_dict['uuid'] + self.collisionAction = state_dict.get('collisionAction','aggregate') + self.uuid = state_dict.get('uuid',None...
Raise minimal version to 0.1.77 Previous version constraint fails due to missing omnistaging api's.
@@ -26,7 +26,7 @@ except IOError: install_requires = [ "numpy>=1.12", - "jax>=0.1.59", + "jax>=0.1.77", "matplotlib", # only needed for tensorboard export "dataclasses;python_version<'3.7'", # will only install on py3.6 "msgpack",
Azure : Fix intermittent validation errors For some reason, in some situations, directories were listed with a trailing slash when reading the archive. This handles dir listing both with and without slashes.
@@ -80,9 +80,18 @@ for module in ( with tarfile.open( args.archive, "r:gz" ) as a: # getmember still reads the whole archive, so might as well grab them all - # as we go. We need to strip the first directory from all paths too as that - # contains the release name - archivePaths = { os.path.join( *m.name.split( os.sep ...
Fix test_glu_old HealthCheck with smarter generation strategy. Summary: Pull Request resolved:
@@ -13,25 +13,30 @@ import numpy as np import unittest +@st.composite +def _glu_old_input(draw): + dims = draw(st.lists(st.integers(min_value=1, max_value=5), min_size=1, max_size=3)) + axis = draw(st.integers(min_value=0, max_value=len(dims))) + # The axis dimension must be divisible by two + axis_dim = 2 * draw(st.in...
fix name bug in test_pass_inject_double_buffer Change the parameter 'C' name
@@ -7,7 +7,7 @@ def test_double_buffer(): tx = tvm.thread_axis("threadIdx.x") ib = tvm.ir_builder.create() A = ib.pointer("float32", name="A") - C = ib.pointer("float32", name="A") + C = ib.pointer("float32", name="C") ib.scope_attr(tx, "thread_extent", 1) with ib.for_range(0, n) as i: B = ib.allocate("float32", m, nam...
Update quickfiles.rst change "from flask_appbuilder.model.mixins import ImageColumn" to "from flask_appbuilder.models.mixins import ImageColumn"
@@ -10,7 +10,7 @@ Define your model (models.py) :: from flask_appbuilder import Model - from flask_appbuilder.model.mixins import ImageColumn + from flask_appbuilder.models.mixins import ImageColumn class Person(Model): id = Column(Integer, primary_key=True)
Take quadrature with more contrast for Rabi analysis Same idea as for the parabola analysis, issue
@@ -482,15 +482,15 @@ class Transmon(Qubit): if np.size(amps) != 1: self.measure_rabi(amps, n=1, MC=MC, analyze=False) a = ma.Rabi_Analysis(close_fig=close_fig) + # Decide which quadrature to take by comparing the contrast if take_fit_I: - ampl = abs(a.fit_res[0].params['period'].value)/2 + ampl = abs(a.fit_res[0].para...
Fix get_permissions for small group chats Closes
@@ -1259,7 +1259,7 @@ class ChatMethods: if isinstance(entity, types.Channel): FullChat = await self(functions.channels.GetFullChannelRequest(entity)) elif isinstance(entity, types.Chat): - FullChat = await self(functions.messages.GetFullChatRequest(entity)) + FullChat = await self(functions.messages.GetFullChatRequest...
fix: deduplicate currencies manually on mariadb 10.3 `insert ignore` doesn't work
@@ -29,6 +29,8 @@ def get_countries_and_currencies(): countries = [] currencies = [] + added_currencies = set() + for name, country in data.items(): country = frappe._dict(country) countries.append( @@ -42,7 +44,9 @@ def get_countries_and_currencies(): time_zones="\n".join(country.timezones or []), ) ) - if country.cur...
fix use-after-free bug Summary: Pull Request resolved: Test Plan: Imported from OSS
@@ -1990,7 +1990,9 @@ class ShapePropagator { if (inferred) { SHAPE_ASSERT(size_product != 0); size_t numel = 1; - for (int64_t s : tensor_types.at(0)->sizes().concrete_sizes().value()) + auto concrete_sizes = + tensor_types.at(0)->sizes().concrete_sizes().value(); + for (int64_t s : concrete_sizes) numel *= s; int64_t...
Add some files to the CODEOWNERS files for team-core to own And also fix a couple of bugs found when writing tests for the matching used by tamarack bot. This expands the files that the core team will be requested for on pull request reviews.
# This file uses an fnmatch-style matching pattern. # Team Boto -salt/**/*boto* @saltstack/team-boto +salt/*/*boto* @saltstack/team-boto # Team Core +requirements/* @saltstack/team-core salt/auth/* @saltstack/team-core salt/cache/* @saltstack/team-core salt/cli/* @saltstack/team-core @@ -24,14 +25,16 @@ salt/daemons/* ...
Handle application set status Because pylibjuju has an internal cache, very similar to how juju model cache works, we need to correctly handle when the application status is set by the charm author, vs how the application is dervied via the unit status.
@@ -80,10 +80,12 @@ class Application(model.ModelEntity): workload status and highlight the most relevant (severity). """ status = self.safe_data['status']['current'] - unit_status = [status] + if status == "unset": + unit_status = [] for unit in self.units: unit_status.append(unit.workload_status) return derive_status...
pagegenerators.py: -linter options fails Fix parsing of argument in handleArg() linter should select all categories instead gives error.
@@ -14,7 +14,7 @@ These parameters are supported to specify which pages titles to print: &params; """ # -# (C) Pywikibot team, 2008-2017 +# (C) Pywikibot team, 2008-2018 # # Distributed under the terms of the MIT license. # @@ -719,6 +719,7 @@ class GeneratorFactory(object): cats = self.site.siteinfo.get('linter') # Ge...
Remove panic from get_block All uses of get_block internally use the version that returns the result. This way, there can be no panics if the block is not found, but the appropriate handling of the error will occur.
@@ -172,7 +172,7 @@ impl SyncBlockPublisher { if self.is_building_block(state) { previous_block = state .get_previous_block_id() - .map(|block_id| self.get_block_checked(block_id.as_str()).ok()) + .map(|block_id| self.get_block(block_id.as_str()).ok()) .unwrap_or(None); self.cancel_block(state); } @@ -362,7 +362,7 @@ i...
Update nicinfo only when mac match is found Fix error of initializing NicInfo when upper_nic is not set
@@ -333,9 +333,9 @@ class Nics(InitializableMixin): upper_nic_mac = ip.get_mac(nic_name) if upper_nic_mac == lower_nic_mac: upper_nic = nic_name - break nic_info = NicInfo(upper_nic, lower_nic, pci_slot) self.append(nic_info) + break # Collects NIC info for any unpaired NICS for nic_name in [
Update vr_logging.py Fixed small variable name bug in vr logging.pu
@@ -354,7 +354,7 @@ class VRLogWriter(): torso_data_list = [is_valid] torso_data_list.extend(list(torso_trans)) torso_data_list.extend(list(torso_rot)) - self.data_map['vr']['vr_device_data']['torso_tracker'][self.frame_counter, ...] = np.array(torso_data) + self.data_map['vr']['vr_device_data']['torso_tracker'][self.f...
Fixed bug Now taking the most immediate subclasses of an invalid superclass for categorizing.
@@ -63,7 +63,10 @@ class Transformer(object): def categorize(self, ignore:List[str]=None): """ Attempts to find node categories and edge labels by following - subclass_of paths within the graph. + subclass_of paths within the graph. If a superclass is being ignored + then all of its children subclasses will be used unl...
Resolve DeprecationWarning DeprecationWarning: Please use assertRaisesRegex instead.
@@ -99,17 +99,17 @@ class CasePropertyValidationTests(SimpleTestCase): CaseProperty.wrap({"case_property": "foo"}) def test_blank_case_property(self): - with self.assertRaisesRegexp(BadValueError, "Value cannot be blank."): + with self.assertRaisesRegex(BadValueError, "Value cannot be blank."): CaseProperty.wrap({"case...
fix: ca reinstall test if still needed with latest rpi os
@@ -5,13 +5,13 @@ set -ex # Re-Install ARM/Raspberry Pi ca-certifcates # Which otherwise cause SSL Certificate Verification problems. -if $(arch | grep -q arm) -then - echo "Re-Installing ca-certifcates on Raspberry Pi / ARM CPU" - sudo apt-get remove -y ca-certificates - sudo apt-get update - sudo apt-get install -y c...
[client] add comment about os.path.islink() in fs.islink() Add information about why and on where stdlib is broken.
@@ -180,6 +180,10 @@ if sys.platform == 'win32': The stdlib is broken. https://msdn.microsoft.com/library/windows/desktop/aa365682.aspx + os.path.islink() always returns false on WindowsNT/95 and OS/2 in python2, + https://github.com/python/cpython/blob/2.7/Lib/ntpath.py#L220 + and also for Windows prior to 6.0 in pyth...
source: df: Allow for no_script execution Fixes:
@@ -47,6 +47,9 @@ class DataFlowSourceConfig: "results of desired record on a call to record()", default=False, ) + no_strict: bool = field( + "Do not exit on operation exceptions, just log errors", default=False, + ) orchestrator: BaseOrchestrator = MemoryOrchestrator.withconfig({}) @@ -130,7 +133,8 @@ class DataFlowS...
package.base: dynamic_getattr_dict(): drop raising ignored exceptions Since we don't catch generic Exceptions anymore we don't need to check for ignored exceptions as they should be raised by default since they aren't caught.
@@ -10,7 +10,7 @@ Right now, doesn't provide much, need to change that down the line __all__ = ("base", "wrapper", "dynamic_getattr_dict") from snakeoil import klass -from snakeoil.compatibility import cmp, IGNORED_EXCEPTIONS +from snakeoil.compatibility import cmp from pkgcore import exceptions as base_errors from pkg...
Replace default strings ' ' with ... This fixes a problem with pytype.
@@ -238,7 +238,7 @@ class str(Sequence[str]): def capitalize(self) -> str: ... def casefold(self) -> str: ... - def center(self, width: int, fillchar: str = ' ') -> str: ... + def center(self, width: int, fillchar: str = ...) -> str: ... def count(self, x: str, __start: Optional[int] = ..., __end: Optional[int] = ...) ...
Refactor w to frequency We have established the use of frequency instead of w to these arguments.
@@ -36,32 +36,32 @@ bokeh_colors = bp.RdGy[11] class _Coefficient: - def __init__(self, coefficient, w=None, interpolated=None): + def __init__(self, coefficient, frequency=None, interpolated=None): if isinstance(coefficient, (int, float)): - if w is not None and type(w) != float: - coefficient = [coefficient for _ in ...
Update Jenkinsfile Reduce tests
@@ -23,11 +23,7 @@ pipeline { withPythonEnv('/home/jenkins/allvenvs/') { sh 'COVERAGE_FILE=report/cov/coverage1 mpirun -n 1 coverage run --source=heat --parallel-mode -m pytest --junitxml=report/test/report1.xml heat/' sh 'COVERAGE_FILE=report/cov/coverage2 mpirun -n 2 coverage run --source=heat --parallel-mode -m pyte...
Update ursnif.txt Minus what we already have.
@@ -3445,6 +3445,19 @@ l4fnses.com gstat.coneybucks.com +# Reference: https://twitter.com/reecdeep/status/1283675503552008192 + +gstat.secundato.com +gstat.secundamo.com +gstat.premiamo.com +gstat.securezzas.com +gstat.securanto.com +gstat.secundato.net +gstat.securezzis.net +gstat.securanto.net +gstat.premiamo.eu +gst...
Fix code generation for ".domain" when there is no default logic binder TN:
@@ -283,12 +283,18 @@ class DomainExpr(ComputingExpr): static_type = T.EquationType def __init__(self, domain, logic_var_expr, abstract_expr=None): + from langkit.compile_context import get_context + self.domain = domain ":type: ResolvedExpression" self.logic_var_expr = logic_var_expr ":type: ResolvedExpression" + # Ge...
GafferUI.showURL : Use "xdg-open" on linux (if available) This avoids a problem whereby the current release of PySide2 totally omits the binding for QDesktopServices.
import os import sys +import distutils.spawn import GafferUI @@ -45,7 +46,13 @@ QtGui = GafferUI._qtImport( "QtGui" ) def showURL( url ) : + opener = None if sys.platform == "darwin" : - os.system( "open \"" + url + "\"" ) + opener = "open" + elif "linux" in sys.platform : + opener = distutils.spawn.find_executable( "x...
Update test_dbscan.py added max_bytes_per_batch variable in the code
@@ -41,6 +41,7 @@ dataset_names = ['noisy_moons', 'varied', 'aniso', 'blobs', 'noisy_circles', 'no_structure'] +@pytest.mark.parametrize('max_bytes_per_batch',[1e9, 5e9]) @pytest.mark.parametrize('datatype', [np.float32, np.float64]) @pytest.mark.parametrize('input_type', ['ndarray']) @pytest.mark.parametrize('use_hand...
ebd/ebuild-daemon.bash: add quotes around unknown coms/lines To make empty data vs whitespace vs garbage easier to be identified.
@@ -263,7 +263,7 @@ __ebd_process_ebuild_phases() { __ebd_write_line "yep!" ;; *) - echo "received unknown com during phase processing: ${line}" >&2 + echo "received unknown com during phase processing: \"${line}\"" >&2 exit 1 ;; esac @@ -407,7 +407,7 @@ __ebd_main_loop() { __ebd_write_line "yep!" ;; *) - echo "receive...
[PR tweaks per review Simplify the Py2 check for an existing-but-old cachedir by using any and a generator expression. Move an import to module scope.
@@ -35,6 +35,7 @@ import sys import SCons.Action import SCons.Warnings +from SCons.Util import PY3 cache_enabled = True cache_debug = False @@ -154,7 +155,6 @@ class CacheDir(object): if path is None: return - from SCons.Util import PY3 if PY3: self._readconfig3(path) else: @@ -204,9 +204,9 @@ class CacheDir(object): "...
(antocuni) Cherry-pick commit from PR Overwrite stub file for universal ABI extension Added a comment to the template that the file is autogenerated
@@ -100,7 +100,11 @@ def handle_hpy_ext_modules(dist, attr, hpy_ext_modules): _HPY_UNIVERSAL_MODULE_STUB_TEMPLATE = """ +# DO NOT EDIT THIS FILE! +# This file is automatically generated by hpy + def __bootstrap__(): + import sys, pkg_resources from hpy.universal import load ext_filepath = pkg_resources.resource_filenam...
Fix linter error and add comments: storing info in validator's own db
@@ -75,6 +75,7 @@ class Validator(BaseService): self.peer_pool = peer_pool self.privkey = privkey self.event_bus = event_bus + # TODO: `latest_proposed_epoch` should be written into/read from validator's own db self.latest_proposed_epoch = genesis_epoch self.slots_per_epoch = slots_per_epoch @@ -127,6 +128,9 @@ class V...
Removed incident tbd-tbd-2 It is identical to incident wa-seattle-12.
@@ -10,15 +10,3 @@ id: tbd-tbd-1 * https://twitter.com/perfectlyg0lden/status/1267014293628870656 - -### Officer beats a protestor while pinning him on the ground | - -At the beginning of this video, an officer can be seen punching a protestor in the head while pinning him to the ground. - -tags: punch, tackle - -id: t...
Simplify travis build Should speed up build times as well.
@@ -4,17 +4,11 @@ env: HYPOTHESIS_PROFILE=ci matrix: include: - python: "3.6" - env: TEST_TYPE=check - - python: "3.6" - env: TEST_TYPE=typecheck - - python: "3.6" - env: TEST_TYPE=coverage - - python: "2.7" - env: TEST_TYPE=coverage + env: TEST_TYPE=prcheck - python: "2.7" - env: TEST_TYPE=check + env: TEST_TYPE=prche...
Add auto_requires and auto_optional for components. new_component_type uses auto_requires and auto_optional to extend the requires and optional specs for decorators it produces. These decorators give their components automatic dependencies that extend whatever is specified when they're used.
@@ -418,7 +418,12 @@ def register_component( register_consumer(component) -def new_component_type(name=None, shared=True, cluster=False, emitter=False): +def new_component_type(name=None, + auto_requires=[], + auto_optional=[], + shared=True, + cluster=False, + emitter=False): """ Factory that creates component decorat...
TST: updated data variable unit test Updated data variable unit test to include four data variables.
@@ -433,13 +433,16 @@ class TestBasics(): self.testInst.load(self.ref_time.year, self.ref_doy) # Ensure the desired data variable is present and delete all others - self.testInst.data = self.testInst.data[['mlt']] + # 4-6 variables are needed to test all lines; choose the lesser limit + nvar = 4 + self.testInst.data = ...
llvm: Query and use local CPU features and name. Enables AVX instructions on CPUs that support them. No bservable performance improvement. (few % degradation on skylake + llvm3.9)
@@ -159,10 +159,12 @@ binding.initialize_native_target() # but why? binding.initialize_native_asmprinter() +__features = binding.get_host_cpu_features().flatten() +__cpu_name = binding.get_host_cpu_name() # Create compilation target, use default triple __target = binding.Target.from_default_triple() -__target_machine =...
discoveryplus: fix detecting seasons fixes:
@@ -150,7 +150,7 @@ class Dplay(Service): showid = None for what in res.json()["included"]: - if "attributes" in what and "alias" in what["attributes"] and "season" in what["attributes"]["alias"]: + if "attributes" in what and "alias" in what["attributes"] and "grid" in what["attributes"]["alias"]: programid = what["id...
ebuild.ebd_ipc: try to follow the old behavior for dosym/dohard Mostly trying to approximate what `ln -snfT` would result in.
@@ -639,20 +639,22 @@ class _Symlink(_InstallWrapper): arg_parser.add_argument('target') def run(self, args): - source = pjoin(self.op.ED, args.source.lstrip(os.path.sep)) - target = pjoin(self.op.ED, args.target.lstrip(os.path.sep)) - dest_dir = args.target.rsplit(os.path.sep, 1)[0] + if dest_dir != args.target: self....