message
stringlengths
13
484
diff
stringlengths
38
4.63k
Modify custom models to take state copies I don't fully understand why this is needed, but it prevents some bugs when rerunning a platform simulation. Since the model maker is only called once per platform, having a deepcopy shouldn't slow things down much. [ci skip]
@@ -132,12 +132,12 @@ def create_smooth_transition_models(initial_state, x_coords, y_coords, times, tu if d > 0: # if platform is not already at target coord, add linear acceleration model try: - accel_model = Point2PointConstantAcceleration(state=state, + accel_model = Point2PointConstantAcceleration(state=deepcopy(st...
Fix wrong production name in the test Love when tests just encode the erroneous data!
@@ -80,7 +80,7 @@ class GlyphDataTest(unittest.TestCase): self.assertEqual(prod("brevecomb_acutecomb"), "uni03060301") self.assertEqual(prod("vaphalaa-malayalam"), "uni0D030D35.1") self.assertEqual(prod("onethird"), "uni2153") - self.assertEqual(prod("Jacute"), "uni00A40301") + self.assertEqual(prod("Jacute"), "uni004A...
Refactor Token_Start/End to rely on Node.Token TN:
@@ -2445,10 +2445,7 @@ package body ${ada_lib_name}.Analysis is function Token_Start (Node : access ${root_node_value_type}'Class) return Token_Type - is - ((TDH => Token_Data (Node.Unit), - Token => Node.Token_Start, - Trivia => No_Token_Index)); + is (Node.Token (Node.Token_Start)); --------------- -- Token_End -- @@...
[main] offset periodic tasks and add random jitter this prevents fetching profile pics and checking for updates immediately on startup
@@ -14,6 +14,7 @@ import shutil import logging.handlers from collections import deque import asyncio +import random from concurrent.futures import ThreadPoolExecutor from typing import Union, List, Iterator, Dict, Optional, Deque, Any @@ -237,9 +238,8 @@ class Maestral: thread_name_prefix="maestral-thread-pool", max_wo...
Rename PathManipulationTests to PathManipulationTestBase for consistency This base class has no tests, and all other non-concrete test case base classes in this file use a *TestBase convention.
@@ -3958,12 +3958,12 @@ class ResolvePathTest(FakeFileOpenTestBase): self.assertEqual('!!foo!bar!baz', self.filesystem.ResolvePath('!!foo!bar!baz!!')) -class PathManipulationTests(TestCase): +class PathManipulationTestBase(TestCase): def setUp(self): self.filesystem = fake_filesystem.FakeFilesystem(path_separator='|') ...
Re-add validate_unique Cannot save the object otherwise. the View form_valid always returns None, even when saving with commit None
@@ -71,11 +71,21 @@ class BaseDeterminationForm(forms.ModelForm): return cleaned_data + def validate_unique(self): + # Update the instance data + # form_valid on the View does not return the determination instance so we have to do this here. + self.instance.submission = self.submission + self.instance.author = self.req...
Created helper function `get_webhook` and added property in `News` `News.get_webhook` fetch discord.Webhook by ID provided in config. `self.webhook` use webhook that it got from this function.
+import discord from discord.ext.commands import Cog +from bot import constants from bot.bot import Bot MAIL_LISTS = [ @@ -15,10 +17,11 @@ class News(Cog): def __init__(self, bot: Bot): self.bot = bot self.bot.loop.create_task(self.sync_maillists()) + self.webhook = self.bot.loop.create_task(self.get_webhook()) async d...
Set the BUILD_ENVIRONMENT variable before installing sccache. Summary: Set the build environment before installing sccache in order to make sure the docker images have the links set up. Pull Request resolved:
@@ -5,6 +5,10 @@ ARG EC2 ADD ./install_base.sh install_base.sh RUN bash ./install_base.sh && rm install_base.sh +# Include BUILD_ENVIRONMENT environment variable in image +ARG BUILD_ENVIRONMENT +ENV BUILD_ENVIRONMENT ${BUILD_ENVIRONMENT} + # Install Python ARG PYTHON_VERSION ADD ./install_python.sh install_python.sh @@...
Updated README.md for nginx The default parameter for logs in conftest.py is modsec2-apache, which causes ModSecurity to always look for [modsec2-apache] in config.ini.This causes problem with nginx server as its logging regex are different.This is solved by changing default parameter from modsec2-apache to modsec3-ngi...
@@ -17,7 +17,7 @@ Requirements ============ There are Three requirements for running the OWASP CRS regressions. -1. You must have ModSecurity specify the location of your error.log, this is done in the config.ini file.If you are using nginx you need to specify ModSecurity to look for [modsec3-nginx] in config.ini, this...
Fix get_all_prefixes() call context.jsonld prefixes are modelled in two different ways at the moment: as the 'old' `prefix = string URL` tag-values or as `'<prefix>' = dict(@id, tag-value This is probably a LinkML bug(?) but for now, to permit validation, we fix the unit test here.
@@ -125,7 +125,11 @@ class Validator(object): """ if not jsonld: jsonld = get_jsonld_context() - prefixes: Set = set(k for k, v in jsonld.items() if isinstance(v, str)) # type: ignore + prefixes: Set = set( + k for k, v in jsonld.items() + if isinstance(v, str) or + (isinstance(v, dict) and v.setdefault('@prefix', Fals...
Small fix in printing download location * Revert "Replaced with ThrowException fn (#290)" This reverts commit * Minor fix in logging
@@ -1062,7 +1062,7 @@ Function Get-LISAv2Tools($XMLSecretFile) $WebClient.DownloadFile("$toolFileAccessLocation/$_","$CurrentDirectory\Tools\$_") # Successfully downloaded files - LogMsg "File $_ successfully downloaded in Tools folder: $_." + LogMsg "File $_ successfully downloaded in Tools folder: $CurrentDirectory\T...
Replace outdated link with rationale for pinning Closes Refs (supersedes)
@@ -5,7 +5,7 @@ pip-tools = pip-compile + pip-sync ================================== A set of command line tools to help you keep your ``pip``-based packages fresh, -even when you've pinned them. `You do pin them, right?`_ +even when you've pinned them. You do pin them, right? (In building your Python application and ...
boost: corrected check for key my test used a modified conandata.yml so that I did not test in real conditions.
@@ -140,7 +140,7 @@ class BoostConan(ConanFile): def source(self): tools.get(**self.conan_data["sources"][self.version]) - if self.conan_data["patches"][self.version]: + if self.version in self.conan_data["patches"]: for patch in self.conan_data["patches"][self.version]: tools.patch(**patch)
Updates ObjectMapper hash to build against 4.2 This new hash passes project_precommit_check when built against Xcode 10 Beta 3's compiler.
"maintainer": "tristanhimmelman@gmail.com", "compatibility": [ { - "version": "3.0", - "commit": "eef27bfcfd201036a12992b6988e64a088fe7354" + "version": "4.2", + "commit": "ed1caa237b9742135996fefe3682b834bb394a6a" } ], "platforms": [ "workspace": "ObjectMapper.xcworkspace", "scheme": "ObjectMapper-iOS", "destination":...
astdoc.py: rename "is_inherit" to "is_inherited" TN:
@@ -118,11 +118,11 @@ def print_field(context, file, struct, field): )), )) - is_inherit = not field.struct == struct + is_inherited = field.struct != struct inherit_note = ( ' [inherited from {}]'.format(field_ref(field)) - if is_inherit else '' + if is_inherited else '' ) print('<div class="node_wrapper">', file=file...
bump to 3.6 Anaconda is now at P3.6
@@ -4,12 +4,12 @@ language: python python: - 2.7 - - 3.5 + - 3.6 matrix: include: - - python: 3.5 + - python: 3.6 env: CC=clang CXX=clang++ - - python: 3.5 + - python: 3.6 env: NOMKL=1 addons: apt: @@ -58,6 +58,6 @@ script: - nosetests --verbosity=2 --with-coverage --cover-package=qutip qutip after_success: - - if [[ $...
data/stubconfig/repos.conf: use tar-based repo instead of sqfs To avoid requiring namespace and sqfs mounting support for external usage (e.g. the github pkgcheck action).
@@ -6,8 +6,5 @@ location = ../stubrepo [gentoo] location = /var/db/repos/gentoo -repo-type = sqfs-v1 -# distfiles.gentoo.org certs aren't actually valid, defeating the purpose of https; thus -# forcing http. -sync-uri = http://distfiles.gentoo.org/snapshots/squashfs/gentoo-current.lzo.sqfs -sync-type = sqfs +sync-uri =...
Fix help for `--process-total-child-memory-usage` and `--process-per-child-memory-usage` In particular, the `--process-total-child-memory-usage` flag was setting `default_help_repr="1GiB",`, even though it did not have a `default`. Additionally, add some clarifications around which processes are impacted, and what happ...
@@ -460,6 +460,9 @@ class LocalStoreOptions: ) +_PER_CHILD_MEMORY_USAGE = "512MiB" + + DEFAULT_EXECUTION_OPTIONS = ExecutionOptions( # Remote execution strategy. remote_execution=False, @@ -470,7 +473,7 @@ DEFAULT_EXECUTION_OPTIONS = ExecutionOptions( remote_ca_certs_path=None, # Process execution setup. process_total_...
DOC: updated changelog Updated changelog with description of things changed in the PR.
@@ -42,6 +42,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Added .zenodo.json file, to improve specification of authors in citation - Improved __str__ and __repr__ functions for basic classes - Improved docstring readability and consistency + - Added Travis-CI testing for the documentation -...
creates_node handles Opt parser Also, adding a non-transitive mode to use in the pp pass.
@@ -1437,7 +1437,7 @@ class NodeToParsersPass(): self.compute(c) -def creates_node(p): +def creates_node(p, follow_refs=True): """ Predicate that is true on parsers that create a node directly, or are just a reference to one or several parsers that creates nodes, without @@ -1449,12 +1449,17 @@ def creates_node(p): Row...
Add Puerto Rico data source I forgot to do this in
@@ -128,6 +128,7 @@ Real-time electricity data is obtained using [parsers](https://github.com/tmrowc - New England: [NEISO](https://www.iso-ne.com/isoexpress/) - New York: [NYISO](http://www.nyiso.com/public/markets_operations/market_data/graphs/index.jsp) - PJM: [PJM](http://www.pjm.com/markets-and-operations.aspx) + ...
[modules/datetime] Add encoding for locale When creating the date/time string, use the locale's preferred encoding to format the string. hopefully, this fixes
@@ -35,6 +35,7 @@ class Module(bumblebee.engine.Module): locale.setlocale(locale.LC_TIME, lcl.split(".")) def get_time(self, widget): - return datetime.datetime.now().strftime(self._fmt) + enc = locale.getpreferredencoding() + return datetime.datetime.now().strftime(self._fmt).decode(enc) # vim: tabstop=8 expandtab shi...
datapaths: Allow pcap_switch without pxpcap pcap_switch has virtual ports which don't require pxpcap, so we no longer strictly require pxpcap.
@@ -291,9 +291,6 @@ def launch (address = '127.0.0.1', port = 6633, max_retry_delay = 16, Launches a switch """ - if not pxpcap.enabled: - raise RuntimeError("You need PXPCap to use this component") - if ctl_port: if ctl_port is True: ctl_port = DEFAULT_CTL_PORT @@ -479,6 +476,9 @@ class PCapSwitch (ExpireMixin, Softwa...
pin away bad recent grpcio version did not track down the lock but local processes and tests lock up when using 1.48.0 ### How I Tested These Changes bk
@@ -67,7 +67,9 @@ def get_version() -> str: # alembic 1.7.0 is a breaking change "alembic>=1.2.1,!=1.6.3,<1.7.0", "croniter>=0.3.34", - "grpcio>=1.32.0", # ensure version we require is >= that with which we generated the grpc code (set in dev-requirements) + # ensure grpcio version we require is >= that with which we g...
remove roles names as str, snapshot order This commit removes the role names as strings. Also do a slight change for clarity.
@@ -357,11 +357,11 @@ class TestRefresh(unittest.TestCase): self._assert_version_equals(Timestamp.type, 99999) # repo add new timestamp keys and recovers the timestamp version - self.sim.root.roles["timestamp"].keyids.clear() - self.sim.signers["timestamp"].clear() + self.sim.root.roles[Timestamp.type].keyids.clear() +...
Fix wrongly converted assert * Fix wrongly converted assert Seems like this assertion was replaced by an exception but the condition got wrongly converted. * Update src/datasets/search.py
@@ -305,7 +305,7 @@ class FaissIndex(BaseIndex): scores (`List[List[float]`): The retrieval scores of the retrieved examples. indices (`List[List[int]]`): The indices of the retrieved examples. """ - if len(query.shape) != 1 or (len(query.shape) == 2 and query.shape[0] != 1): + if len(query.shape) != 1 and (len(query.s...
[CI] Chaos tests for dataset random shuffle 1tb Add chaos tests for dataset random shuffle 1tb: both simple shuffle and push-based shuffle Mark dataset_shuffle_push_based_random_shuffle_1tb as stable
test_name: dataset_shuffle_push_based_random_shuffle_1tb test_suite: dataset_test - stable: false - frequency: nightly team: core cluster: num_nodes: 20 type: sdk_command file_manager: sdk + +- name: chaos_dataset_shuffle_random_shuffle_1tb + group: core-dataset-tests + working_dir: nightly_tests + legacy: + test_name:...
Combine nginx federation server blocks I'm pretty sure there's no technical reason these have to be distinct server blocks, so collapse into one and go with the more terse location block.
@@ -38,6 +38,11 @@ the reverse proxy and the homeserver. server { listen 443 ssl; listen [::]:443 ssl; + + # For the federation port + listen 8448 ssl default_server; + listen [::]:8448 ssl default_server; + server_name matrix.example.com; location /_matrix { @@ -48,17 +53,6 @@ server { client_max_body_size 10M; } } - ...
ubuiltins: Fix next. MICROPY_PY_BUILTINS_NEXT2 is not enabled.
@@ -746,21 +746,9 @@ def min(*args): """ -@overload def next(iterator: Iterator) -> Any: - ... - - -@overload -def next(iterator: Iterator, default: Any) -> Any: - ... - - -def next(*args): """ Retrieves the next item from the iterator by calling its ``__next__()`` method. - If ``default`` is given, it is returned if t...
Quickfix : Motorconversion Linked to
@@ -22,8 +22,11 @@ def derive_oldMotor(obj): if oldProps in obj.keys(): if oldProps == 'motor/type' and obj[oldProps] == 'PID': new_motor.update({newProps: 'generic_bldc'}) + elif oldProps == 'motor/type' and obj[oldProps] == 'DC': + new_motor.update({newProps: 'generic_dc'}) else: new_motor.update({newProps: obj[oldPr...
fix: typo in role advanced_dns_server Fixes:
service: name: "{{ item }}" state: restarted - loop: "{{ dns_server_services_to_start }}" + loop: "{{ advanced_dns_server_services_to_start }}" when: - "'service' not in ansible_skip_tags" - (start_services | bool)
Fix create default experiment error Fix This adds additional condition test to properly handle experiment data stored as unicode data type.
@@ -181,7 +181,7 @@ class SqlAlchemyStore(AbstractStore): default_experiment = { SqlExperiment.experiment_id.name: int(SqlAlchemyStore.DEFAULT_EXPERIMENT_ID), SqlExperiment.name.name: Experiment.DEFAULT_EXPERIMENT_NAME, - SqlExperiment.artifact_location.name: self._get_artifact_location(0), + SqlExperiment.artifact_loc...
Updates IMAG_TOL from 1e-8 to 1e-7, as 1e-8 was causing machine- precision errors with 2Q-GST germ selection.
@@ -17,7 +17,7 @@ from ..tools import basis as _basis from . import gaugegroup as _gaugegroup from .protectedarray import ProtectedArray as _ProtectedArray -IMAG_TOL = 1e-8 #tolerance for imaginary part being considered zero +IMAG_TOL = 1e-7 #tolerance for imaginary part being considered zero def optimize_gate(gateToOp...
accept new param 'for' as request user This allows us to exactly match the request with what would actually happen if a user was making the request.
@@ -185,12 +185,14 @@ def formplayer_as_user_auth(view): @wraps(view) def _inner(request, *args, **kwargs): with mutable_querydict(request.GET): - as_user = request.GET.pop('as', None) + request_user = request.GET.pop('for', None) + if not request_user: + request_user = request.GET.pop('as', None) - if not as_user: + i...
Small adjustment to formatting of doctest Trying this as a quick fix to . If this doesn't work, I recommend we comment it out, since we have this function covered elsewhere.
@@ -75,9 +75,9 @@ def _check_latest_data(lang): def tag_ner(lang, input_text, output_type=list): """Run NER for chosen language. Choosing output_type=list, returns a list of tuples: + >>> tag_ner('latin', input_text='ut Venus, ut Sirius, ut Spica', output_type=list) [('ut',), ('Venus',), (',',), ('ut',), ('Sirius', 'En...
Fix Eltex.MES get_spanning_tree HG-- branch : feature/dcs
@@ -38,6 +38,7 @@ class Script(BaseScript): PORT_ROLE = { "altn": "alternate", "back": "backup", + "bkup": "backup", "boun": "master", "desg": "designated", "dsbl": "disabled",
docs: Remove dead link to citizencodeofconduct.org. This website has been defunct for years, and seems unlikely to return. I have removed the dead link to citizencodeofconduct.org that consistently breaks the `tools/test-documentation` test tool.
@@ -98,7 +98,6 @@ community members. ## License and attribution This Code of Conduct is adapted from the -[Citizen Code of Conduct](http://citizencodeofconduct.org/) and the [Django Code of Conduct](https://www.djangoproject.com/conduct/), and is under a [Creative Commons BY-SA](https://creativecommons.org/licenses/by-...
fix how 'connected_cb' works in the processprotocol Conflicts: test/test_torconfig.py txtorcon/controller.py
@@ -1313,8 +1313,8 @@ ControlPort Port''') trans.signalProcess = Mock(side_effect=error.ProcessExitedAlready) trans.loseConnection = Mock() + # obsolete? conflict from cherry-pick 37bc60f tpp.timeout_expired() - self.assertTrue(tpp.transport.loseConnection.called) @defer.inlineCallbacks @@ -1691,7 +1691,8 @@ ControlPor...
generate-fixtures: Extract zulip_test_template creation as a function. This will be helpful in the upcoming changes which will make use of this extracted function to re-create zulip_test_template after migrating zulip_test db so that we have latest schema in tests.
@@ -3,6 +3,14 @@ set -e export DJANGO_SETTINGS_MODULE=zproject.test_settings +create_template_database() +{ + psql -h localhost postgres zulip_test << EOF +DROP DATABASE IF EXISTS zulip_test_template; +CREATE DATABASE zulip_test_template TEMPLATE zulip_test; +EOF +} + if [ "$1" != "--force" ]; then "$(dirname "$0")/../...
Update issue matching regex fixes it being unable to get issue numbers larger than 9 limits it somewhat length-wise and character-wise to the actual github limits
@@ -51,7 +51,8 @@ CODE_BLOCK_RE = re.compile( MAXIMUM_ISSUES = 5 # Regex used when looking for automatic linking in messages -AUTOMATIC_REGEX = re.compile(r"((?P<org>.+?)\/)?(?P<repo>.+?)#(?P<number>.+?)") +# regex101 of current regex https://regex101.com/r/V2ji8M/6 +AUTOMATIC_REGEX = re.compile(r"((?P<org>[a-zA-Z0-9][...
Uses MULTIPART_MISSING_SEMICOLON instead of MULTIPART_SEMICOLON_MISSING MULTIPART_SEMICOLON_MISSING does not exists in SecLang nor in ModSec.
@@ -176,7 +176,7 @@ SecRule MULTIPART_STRICT_ERROR "!@eq 0" \ DA %{MULTIPART_DATA_AFTER},\ HF %{MULTIPART_HEADER_FOLDING},\ LF %{MULTIPART_LF_LINE},\ - SM %{MULTIPART_SEMICOLON_MISSING},\ + SM %{MULTIPART_MISSING_SEMICOLON},\ IQ %{MULTIPART_INVALID_QUOTING},\ IH %{MULTIPART_INVALID_HEADER_FOLDING},\ FLE %{MULTIPART_FIL...
modified: tests/test_ansible_roll_over.py ... Added config params mixed_lvm_configs and device_to_add, which are needed adding new OSD node. device_to_add --> to add device to the existing OSD node for cluster expansion. Added 'limit' option for config roll over Fixed a typo 'shotrtname'
@@ -61,6 +61,8 @@ def run(ceph_cluster, **kw): ubuntu_repo = config.get('ubuntu_repo', None) base_url = config.get('base_url', None) installer_url = config.get('installer_url', None) + mixed_lvm_configs = config.get('is_mixed_lvm_configs', None) + device_to_add = config.get('device', None) ceph_cluster.ansible_config =...
When possible, disable unparsing code generation in testcases This improves the time it takes to run most testcases. TN:
@@ -194,6 +194,7 @@ class Emitter(object): self.generate_ada_api = generate_ada_api or bool(main_programs) self.generate_astdoc = generate_astdoc self.generate_gdb_hook = generate_gdb_hook + self.generate_unparser = context.generate_unparser self.pretty_print = pretty_print self.post_process_ada = post_process_ada self...
use existing PipelineIndex when possible Summary: Observed in {F359602} when loading dagit pages we end up spending a lot of time creating pipeline snapshot ids, beacuse of the callsite modified here. Test Plan: before {F359677} after {F359679} Reviewers: schrockn, prha, dgibson
@@ -83,6 +83,7 @@ def get_full_external_pipeline(self, pipeline_name): return ExternalPipeline( self.external_repository_data.get_external_pipeline_data(pipeline_name), repository_handle=self.handle, + pipeline_index=self.get_pipeline_index(pipeline_name), ) def get_all_external_pipelines(self): @@ -116,16 +117,18 @@ c...
Update distributed training doc for RC * update distributed_CN add the catalog * Update index_en.rst * Update index_en.rst * Update index_en.rst
Distributed Training ###################### -docs about distributed training +For more distributed training features and practices, please follow: + +- `fleetx docs <https://fleet-x.readthedocs.io/en/latest/index.html>`_ : including quickstart guide, parallel computing setups, on-cloud training practice, etc.
Fix, make more certain that the binary directory remains valid. * Keep an extra reference should protect better against in-place changes.
@@ -1746,6 +1746,8 @@ static PyObject *getBinaryDirectoryObject() { static PyObject *binary_directory = NULL; if (binary_directory != NULL) { + CHECK_OBJECT(binary_directory); + return binary_directory; } @@ -1766,6 +1768,9 @@ static PyObject *getBinaryDirectoryObject() { abort(); } + // Make sure it's usable for cachi...
Adds missing instructions in docs. The docs missed a `cd ..` command due to which installation was failing. Fixes
@@ -91,6 +91,7 @@ To set up Portia for development use the commands below:: npm install && bower install cd node_modules/ember-cli && npm install && cd ../../ ember build + cd .. docker build . -t portia You can run it using::
Include commits from tags in level tree Some commits may only be referenced by a tag, we should still keep track of these
@@ -368,6 +368,7 @@ class Operator(): } for tag in repo.tags: + commits.add(tag.commit) commit_hash = tag.commit.hexsha tree['tags'][tag.name] = { 'target': commit_hash,
Add FIXME To solve the C_D issue in the future
@@ -145,7 +145,7 @@ class EarthSatellite: if atmosphere is not None and A_over_m is not None: perturbations[atmospheric_drag_model] = { "R": Earth.R.to(u.km).value, - "C_D": 2.2, # dimensionless (any value would do) + "C_D": 2.2, # FIXME, add C_D as a parameter of the EarthSatellite object "A_over_m": A_over_m, "model"...
Make DC options static Some datacenters don't allow calling GetConfigRequest, this way it can both be reused and such calls omitted.
@@ -53,6 +53,9 @@ class TelegramBareClient: # Current TelegramClient version __version__ = '0.13.3' + # TODO Make this thread-safe, all connections share the same DC + _dc_options = None + # region Initialization def __init__(self, session, api_id, api_hash, @@ -85,7 +88,6 @@ class TelegramBareClient: self.updates = Up...
docs(style): block highlighting * docs(style): block highlighting fixed target block highlighting * docs(style): style and inherit explicit background-color and added back background inherit fixed spacing
@@ -56,6 +56,9 @@ code.xref.docutils.literal { div.viewcode-block:target { background: inherit; + background-color: #dadada; + border-radius: 5px; + padding: 5px; } a:hover, div.sphinxsidebar a:hover, a.reference:hover, a.reference.internal:hover code {
docs(introduction.py): update date to introduction.py update date to introduction.py
@@ -1775,8 +1775,8 @@ if __name__ == "__main__": symbol="01611", period="1", adjust="", - start_date="2022-06-02 09:30:00", - end_date="2022-06-02 18:32:00", + start_date="2022-10-02 09:30:00", + end_date="2022-10-29 18:32:00", ) print(stock_hk_hist_min_em_df)
Enable contiguous gradients with Z1+MoE MoE training with zero stage 1 only works with `contiguous gradients=True`.
@@ -1376,7 +1376,6 @@ class DeepSpeedEngine(Module): # Overlap and contiguous grads are meaningless in stage 1 and are ignored if zero_stage == ZeroStageEnum.optimizer_states: overlap_comm = False - contiguous_gradients = False round_robin_gradients = False if isinstance(self.module, PipelineModule):
Updating Pennsylvania folder Removed redundant link to the May 30th Philadelphia incident where police beat an individual, correct date on initial one.
@@ -22,7 +22,7 @@ Protesters try to help someone stand up; police wait until the person is halfway ## Philadelphia -### Police beat down man | May 31st +### Police beat down man | May 30th The journalist was trying to get a closer look at the police, while they were beating an individual. @@ -66,10 +66,4 @@ Three prote...
Adjust count to be fore all AbstractNode targets, which includes Registrations and QuickFileNodes [#PLAT-1024]
@@ -8,7 +8,7 @@ from dateutil.parser import parse from datetime import datetime, timedelta from django.utils import timezone -from osf.models import Node, QuickFilesNode +from osf.models import AbstractNode from website.app import init_app from scripts.analytics.base import SummaryAnalytics @@ -31,21 +31,16 @@ class Fi...
Update vxvault_url.py small correction in your notes and error msg.
@@ -24,7 +24,7 @@ class VXVaultUrl(Feed): self.analyze(line) # don't need to do much here; want to add the information - # and tag it with 'phish' + # and tag it with 'malware' def analyze(self, data): if data.startswith('http'): tags = ['malware'] @@ -35,4 +35,4 @@ class VXVaultUrl(Feed): url.add_source(self.name) url...
Remove extraneous copies in StabilizerStateChForm JSON parsing As pointed out in
@@ -73,12 +73,12 @@ class StabilizerStateChForm: def _from_json_dict_(cls, n, G, F, M, gamma, v, s, omega, **kwargs): copy = StabilizerStateChForm(n) - copy.G = np.array(G.copy()) - copy.F = np.array(F.copy()) - copy.M = np.array(M.copy()) - copy.gamma = np.array(gamma.copy()) - copy.v = np.array(v.copy()) - copy.s = n...
Fix locking in swift-recon-cron The previous locking method would leave the lock dir lying around if the process died unexpectedly, preventing others swift-recon-cron process from running sucessfuly and requiring a manual clean.
@@ -19,9 +19,10 @@ swift-recon-cron.py import os import sys -from gettext import gettext as _ +from eventlet import Timeout -from swift.common.utils import get_logger, dump_recon_cache, readconf +from swift.common.utils import get_logger, dump_recon_cache, readconf, \ + lock_path from swift.obj.diskfile import ASYNCDIR...
Tests: When deleting really fails on Windows, try again next test run * This gives an extra chance, for it to become deleted before the next deleting attempt. * With this spurious errors on Windows will hopefully become less.
@@ -584,6 +584,9 @@ Exit codes {exit_cpython:d} (CPython) != {exit_nuitka:d} (Nuitka)""".format( # It appears there is a tiny lock race that we randomly cause, # likely because --run spawns a subprocess that might still # be doing the cleanup work. + if os.path.exists(nuitka_cmd2[0]+".away"): + os.unlink(nuitka_cmd2[0]...
Fix Jigsaw not only depending on its own RNG Jigsaw behaved previously non-deterministically as it dependent on its own local RNG and additionally the global RNG. This patch fixes that issue.
@@ -5604,7 +5604,9 @@ class Jigsaw(meta.Augmenter): for i in np.arange(len(samples.destinations)): padder = size_lib.CenterPadToMultiplesOf( width_multiple=samples.nb_cols[i], - height_multiple=samples.nb_rows[i]) + height_multiple=samples.nb_rows[i], + seed=random_state + ) row = batch.subselect_rows_by_indices([i]) r...
Performance improvements Regex can potentially be very slow, so I removed as many regex checks as possible. Only one that's left in is the mentions regex as that's impossible to do without using regex
@@ -12,7 +12,7 @@ import re import time import datetime -BUCKET_RE = r"(\d{17,18})-(\d{17,18})-\d+" +MENTION_RE = re.compile("<@[!&]?\\d+>") class ViolationException(Exception): @@ -53,13 +53,15 @@ class AntiSpam(BaseCog): await self.violate(ex) async def process_message(self, ctx: Message): - # Use the discord's messa...
[ci] Fix runtime env tests This fixes failing tests from
@@ -36,6 +36,9 @@ def test_get_wheel_filename(): ray_version = "3.0.0.dev0" for sys_platform in ["darwin", "linux", "win32"]: for py_version in ["36", "37", "38", "39"]: + if sys_platform == "win32" and py_version == "36": + # Windows wheels are not built for py3.6 anymore + continue filename = get_wheel_filename(sys_p...
Update Maceio-AL spider Updates Maceio-AL spider. It sorts imports, replaces MUNICIPALITY_ID (deprecated field) with TERRITORY_ID, replaces some insecure selectors and reorganizes pagination requests
-from dateparser import parse from datetime import datetime import scrapy +from dateparser import parse from gazette.items import Gazette from gazette.spiders.base import BaseGazetteSpider class AlMaceioSpider(BaseGazetteSpider): - MUNICIPALITY_ID = "2704302" + TERRITORY_ID = "2704302" + name = "al_maceio" allowed_doma...
TRAC#7497 Fix integration tests The pages are now removed from the admin views, so skip these tests. Keep them around until this is deployed in production and we know that the new app works well.
import re from random import choice, randint +import pytest from bs4 import BeautifulSoup from django.conf import settings from django.contrib import admin @@ -583,6 +584,7 @@ class ViewsTest(ComicframeworkTestCase): self._test_page_can_be_viewed(user, testpage1) self._test_page_can_be_viewed(self.root, testpage1) + @p...
[IMPR] Improve PropertyGenerator._update_old_result_dict add str, int or list to old_dict only raise a ValueError if there is an unexpected type instead of an AssertionError print the unexpected type instead of the value
@@ -763,14 +763,14 @@ class PropertyGenerator(QueryGenerator): def _update_old_result_dict(old_dict, new_dict) -> None: """Update old result dict with new_dict.""" for k, v in new_dict.items(): - if k not in old_dict: - old_dict[k] = v - continue - if isinstance(v, list): - old_dict[k].extend(v) - continue - assert isi...
Update 1_getting_started.rst We can verify *the* that the data ONE *the* is enough:)
@@ -59,7 +59,7 @@ You should see a CSV version of the data dumped into your terminal. All csvkit t ``data.csv`` will now contain a CSV version of our original file. If you aren't familiar with the ``>`` syntax, it means "redirect standard out to a file". If that's hard to remember it may be more convenient to think of ...
context_processors: Enable platform detection in templates. This enables the ability to detect the platform in a template.
@@ -95,6 +95,11 @@ def zulip_default_context(request): settings_path = "/etc/zulip/settings.py" settings_comments_path = "/etc/zulip/settings.py" + if hasattr(request, "client") and request.client.name == "ZulipElectron": + platform = "ZulipElectron" + else: + platform = "ZulipWeb" + return { 'root_domain_landing_page'...
Removed unused parameter from log std policy useless parameter removed the parameter is taken from the plain gaussian state dependant std policy
@@ -273,7 +273,7 @@ class StateLogStdGaussianPolicy(ParametricPolicy): This policy is similar to the State std gaussian policy, but here the regressor represents the logarithm of the standard deviation """ - def __init__(self, mu, log_std, eps=1e-6): + def __init__(self, mu, log_std): """ Constructor. @@ -285,11 +285,9...
[IMPR] fix typos in logging.py Fix typos in docstring.
@@ -35,6 +35,7 @@ from typing import Any from pywikibot.backports import Callable, List from pywikibot.tools import deprecated_args, issue_deprecation_warning + STDOUT = 16 #: VERBOSE = 18 #: INPUT = 25 #: @@ -87,7 +88,7 @@ def logoutput(msg: Any, the log message to include an exception traceback. :param msg: The messa...
MAINT: _lib: Fix a build warning. Cast pos to size_t when comparing to nread. Fixes this warning: gcc: scipy/_lib/messagestream.c scipy/_lib/messagestream.c:2050:35: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'long' [-Wsign-compare] __pyx_t_1 = ((__pyx_v_nread != __pyx_v_pos)...
@@ -64,7 +64,7 @@ cdef class MessageStream: try: stdio.rewind(self.handle) nread = stdio.fread(buf, 1, pos, self.handle) - if nread != pos: + if nread != <size_t>pos: raise IOError("failed to read messages from buffer") obj = PyBytes_FromStringAndSize(buf, nread)
Update noaa-gefs.yaml Removed duplicate email reference
@@ -4,7 +4,7 @@ Documentation: https://github.com/awslabs/open-data-docs/tree/main/docs/noaa/noa Contact: | For questions regarding data content or quality, visit [the NOAA GEFS site](http://www.emc.ncep.noaa.gov/index.php?branch=GEFS). <br/> For any questions regarding data delivery not associated with this platform o...
Update _version.py Add Naoya as a maintainer
@@ -3,8 +3,8 @@ import subprocess __all__ = ['__author__', '__author_email__', '__version__', '__git_uri__', '__dependencies__', '__optional_dependencies__'] -__author__ = "Erik Ritter (maintainer), Serena Jiang, John Bodley, Bill Ulammandakh, Robert Chang, Dan Frank, Chetan Sharma, Matthew Wardrop" -__author_email__ =...
Update overview.rst Missing whitespace casuses it to be broken.
@@ -50,7 +50,7 @@ and use that number to determine which of these installation tutorials you shoul follow to complete your installation. If you don't see your number, choose the closest that you can. -#. `Big Sur (11.5.1)<https://openmined.github.io/PySyft/install_tutorials/osx_11_5_1.html#>`__ +#. `Big Sur (11.5.1) <h...
Fix typo in dense.py typo
@@ -336,7 +336,7 @@ class EmbeddingRetriever(BaseRetriever): from sentence_transformers import SentenceTransformer except ImportError: raise ImportError("Can't find package `sentence-transformers` \n" - "You can install it via `pip install sentece-transformers` \n" + "You can install it via `pip install sentence-transf...
Add logging for boto3 calls Adds default logging for all boto3 calls performed through the Boto3Client and Boto3Resource classes. Logging level will be changed to info once we disable printing logging output to stdout
@@ -83,11 +83,21 @@ class AWSExceptionHandler: return wrapper +def _log_boto3_calls(params, **kwargs): + service = kwargs["event_name"].split(".")[-2] + operation = kwargs["event_name"].split(".")[-1] + region = kwargs["context"].get("client_region", boto3.session.Session().region_name) + LOGGER.debug( # TODO: change t...
When calling a submenu command from a higher level, strip off the first argument (which enters the submenu) and pass the rest on to the submenu
@@ -672,8 +672,9 @@ class AddSubmenu(object): for sub_attr, par_attr in self.shared_attributes.items(): setattr(submenu, sub_attr, getattr(parent_cmd, par_attr)) - if line: - # Execute the command + if line.parsed.args: + # Remove the menu argument and execute the command in the submenu + line = submenu.parser_manager....
Make collecting of the logs more error prone for internall error Fixes:
@@ -387,7 +387,10 @@ def pytest_runtest_makereport(item, call): ): test_case_name = item.name mcg = True if any(x in item.location[0] for x in ['mcg', 'ecosystem']) else False + try: collect_ocs_logs(dir_name=test_case_name, mcg=mcg) + except Exception as ex: + log.error(f"Failed to collect OCS logs. Error: {ex}") # Co...
Plugins: Enhanced PySide2 workaround even further * Copy the exact signature and strip annotations to provide exact number of args as it seems PySide2 will allow to not have some, but star arguments do not allow to tell that.
@@ -585,19 +585,35 @@ def nuitka_wrap(cls): wrapper_count += 1 wrapper_name = "_wrapped_function_%s_%d" % (attr, wrapper_count) + signature = inspect.signature(value) + + # Remove annotations junk that cannot be executed. + signature = signature.replace( + return_annotation = inspect.Signature.empty, + parameters=[ + p...
[GodvilleData] ability to remove apikey from config unhide apikey cmd
@@ -122,7 +122,7 @@ class GodvilleData: finaltext += chat.box(times) await self.bot.say(finaltext) - @godville.command(pass_context=True, hidden=True) + @godville.group(pass_context=True, invoke_without_command=True) async def apikey(self, ctx: commands.Context, apikey: str, *, godname: str): """Set apikey for your cha...
Update mediaprocessor.py self reference
@@ -54,10 +54,10 @@ class MediaProcessor: # QTFS if self.settings.relocate_moov: - converter.QTFS(output['output']) + self.QTFS(output['output']) # Copy to additional locations - output_files = converter.replicate(output['output']) + output_files = self.replicate(output['output']) # Run any post process scripts if self...
IE config : Locate Qt.py This is needed to build the documentation.
@@ -71,6 +71,7 @@ oiioVersion = gafferReg["OpenImageIO"] ocioVersion = gafferReg["OpenColorIO"] oslVersion = gafferReg["OpenShadingLanguage"] vdbVersion = gafferReg.get( "OpenVDB", "3.0.0" ) +qtPyVersion = gafferReg.get( "qtPyVersion", "1.0.0.b3" ) if targetApp : @@ -236,6 +237,7 @@ LOCATE_DEPENDENCY_PYTHONPATH = [ os....
r1.2.1: connection functions initialize to None Yeah, having a null function was a bad idea. It seemed like a good idea at the time.
@@ -40,12 +40,9 @@ class HsDev(object): self.part = '' - def null_func(self): - pass - - self.on_connected = null_func - self.on_disconnected = null_func - self.on_reconnect = null_func + self.on_connected = None + self.on_disconnected = None + self.on_reconnect = None def __del__(self): self.close()
Support Python 3.9 (Fix This issue was already raised on adding a TODO to consider going back to Generic[T] once this is solved.
@@ -205,8 +205,10 @@ class DecoderComparer: return f"<DecoderComparer {self.value}:{self.value.priority()}>" -class CrackResult(NamedTuple, Generic[T]): - value: T +class CrackResult(NamedTuple): + # TODO consider using Generic[T] again for value's type once + # https://bugs.python.org/issue36517 is resolved + value: A...
TST: fixed parametrize bug Fixed a bug in parametrized function, as it turns out that input should not be provided as a dictionary. Dictionary input only works sometimes, and may cause the dict values to be cast as lists.
@@ -63,23 +63,27 @@ class TestBasics(): with pytest.raises(ValueError): self.meta = pysat.Meta(metadata='Not a Panda') - @pytest.mark.parametrize("set_dict", - [({}), ({'units': 'V', 'long_name': 'Longgggg'})]) - def test_inst_data_assign_meta(self, set_dict): + @pytest.mark.parametrize("labels,vals", + [([], []), + ([...
Remove 12.04 builds Remove 12.04-i386 and 12.04-amd64 builds from Jenkinsfile.
@@ -67,21 +67,6 @@ stage 'Build' deleteDir() } }, - "12.04-amd64" : { - node('master'){ - deleteDir() - sh """ - commit_hash=\"${env.commit_hash}\" - mkdir \$commit_hash - working_dir=\$(pwd) - docker run -v \$working_dir/\$commit_hash:/\$commit_hash --rm dnanexus/dx-toolkit:12.04 /bin/bash -xc \"git clone https://gith...
Update serializer with explicit fields value Without it DRF raises error (since 3.3.0)
@@ -16,5 +16,6 @@ To accept tags through a `REST` API call we need to add the following to our `Se class Meta: model = YourModel + fields = '__all__' And you're done, so now you can add tags to your model.
Scons: Do not suggest using "clang-cl.exe" as it doesn't work on its own yet.
@@ -580,15 +580,11 @@ c) Install MinGW64 to "C:\\MinGW64" or "\\MinGW", where then it is automatically proper variant (32/64 bits, your Python arch is %r), or else cryptic errors will be shown. -d) Set the environment variable "CC" to the *full* path of either "gcc.exe" or - to "clang-cl.exe". Also be sure to head prop...
Tests RBD: Delete csi-rbdplugin while PVC creation, Pod creation and IO are progressing CEPHFS: Delete csi-cephfsplugin while PVC creation, Pod creation and IO are progressing
import logging from concurrent.futures import ThreadPoolExecutor import pytest +from functools import partial from ocs_ci.framework.testlib import ManageTest, tier4 from ocs_ci.ocs import constants from ocs_ci.ocs.resources.pod import ( - get_mds_pods, get_mon_pods, get_mgr_pods, get_osd_pods + get_mds_pods, get_mon_po...
[modules/traffic] Recreate widget list during each iteration To avoid "stray" devices being kept in the list, empty the widgets list during each iteration and re-populate it from the list of available interfaces. fixes
@@ -44,9 +44,6 @@ class Module(bumblebee.engine.Module): self._update_widgets(widgets) def create_widget(self, widgets, name, txt=None, attributes={}): - widget = self.widget(name) - if widget: return widget - widget = bumblebee.output.Widget(name=name) widget.full_text(txt) widgets.append(widget) @@ -69,6 +66,8 @@ cla...
Use cgi instead of html module The html module is only available for python3. The cgi module provides almost identical functionality and is present for both python2 and python3.
@@ -8,7 +8,7 @@ Bindings normally consists of three parts: """ import base64 -import html +import cgi import logging import saml2 @@ -87,15 +87,15 @@ def http_form_post_message(message, location, relay_state="", _msg = _msg.decode('ascii') saml_response_input = HTML_INPUT_ELEMENT_SPEC.format( - name=html.escape(typ), -...
Disable strictPropertyInitialization This is not easily compatible with code that initialises properties outside of the constructor (used in Stimulus)
"noUnusedLocals": true, "noUnusedParameters": true, "strictNullChecks": true, - "strictPropertyInitialization": true, // Requires `--strictNullChecks` be enabled in order to take effect + "strictPropertyInitialization": false, "target": "ES2021" // Since lowest browser support is for Safari 14 }, "files": [
Qt change_password_dialog: fix deadlock in hww case if device unplugged fixes
@@ -2562,25 +2562,27 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): if not ok: return - try: - hw_dev_pw = self.wallet.keystore.get_password_for_storage_encryption() - except UserCancelled: - return - except BaseException as e: - self.logger.exception('') - self.show_error(repr(e)) - return + def on_pas...
LandBOSSE second integration Use the default project data in the library.
@@ -5,7 +5,10 @@ with warnings.catch_warnings(): warnings.filterwarnings("ignore", message="numpy.ufunc size changed") import pandas as pd -from .OpenMDAOFileOperations import OpenMDAOFileOperations + +# The library path is where to find the default input data for LandBOSSE. +library_path = '../../library/landbosse' + ...
Update exception message This was incorrectly suggesting the user needed to create an instance of RedisCache, when in fact it is the parent that needs to be instantiated.
@@ -128,7 +128,10 @@ class RedisCache: raise RuntimeError("RedisCache must be a class attribute.") if instance is None: - raise RuntimeError("You must create an instance of RedisCache to use it.") + raise RuntimeError( + "You must access the RedisCache instance through the cog instance " + "before accessing it using th...
Ram 1500: remove harness Update values.py
@@ -56,7 +56,7 @@ CAR_INFO: Dict[str, Optional[Union[ChryslerCarInfo, List[ChryslerCarInfo]]]] = { ], CAR.JEEP_CHEROKEE: ChryslerCarInfo("Jeep Grand Cherokee 2016-18", video_link="https://www.youtube.com/watch?v=eLR9o2JkuRk"), CAR.JEEP_CHEROKEE_2019: ChryslerCarInfo("Jeep Grand Cherokee 2019-21", video_link="https://ww...
Remove script tag from reports/filters_js.html, which is redundant These are the pages where filters_js.html is included, which all descend from either GenericReportView or BaseDownloadExportView, which both use corehq/apps/export/templates/export/download_export.html corehq/apps/reports/templates/reports/standard/base...
{# This file may be compressed; it should contain only script tags #} -<script src="{% static 'select2-3.4.5-legacy/select2.min.js' %}"></script> <script src="{% static 'reports/js/filters/button_group.js' %}"></script> <script src="{% static 'reports/js/filters/select2s.js' %}"></script> <script src="{% static 'report...
Skip slow quanitized tests under ASAN Summary: Skip tests that take more than finish under a sec normally but take 20+ min under ASAN Pull Request resolved: Test Plan: CI
@@ -1455,6 +1455,7 @@ class TestQuantizedOps(TestCase): quantize_ref = torch.quantize_per_tensor(float_ref, Y_scale, Y_zero_point, dtype_x) self.assertEqual(qy.int_repr().numpy(), quantize_ref.int_repr().numpy()) + @unittest.skipIf(TEST_WITH_UBSAN, "Takes 20+ min to finish with ASAN") @given(X=hu.tensor(shapes=hu.array...
Allow struct types to be exposed in public APIs TN:
@@ -2017,7 +2017,7 @@ class CompileCtx(object): This also emits non-blocking errors for all types that are exposed in the public API whereas they should not. """ - from langkit.compiled_types import ArrayType, Field + from langkit.compiled_types import ArrayType, Field, StructType def expose(t, to_internal, for_field, ...
Fix, helper was wrongly named. * This could lead to linker errors for some code that does int < int comparisons with type certainty.
@@ -1222,7 +1222,7 @@ int RICH_COMPARE_BOOL_GTE_OBJECT_INT(PyObject *operand1, PyObject *operand2) { return MY_RICHCOMPARE_BOOL(operand1, operand2, Py_GE); } -int RICH_COMPARE_LT_BOOL_INT_INT(PyObject *operand1, PyObject *operand2) { +int RICH_COMPARE_BOOL_LT_INT_INT(PyObject *operand1, PyObject *operand2) { assert(PyI...
ac3 6 channel fixed regression
@@ -715,7 +715,7 @@ class Ac3Codec(AudioCodec): if 'channels' in opt: c = opt['channels'] if c > 6: - opt['channels'] = 8 + opt['channels'] = 6 return super(Ac3Codec, self).parse_options(opt, stream)