message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
{TestSDK} Delete local context file when local context scenario test is finished
* {TestSDK} add delete local context file when test is finished
* Revert "{TestSDK} add delete local context file when test is finished"
This reverts commit
* {TestSDK} add delete local context file when test is finished | @@ -198,6 +198,7 @@ class LocalContextScenarioTest(ScenarioTest):
def tearDown(self):
super(LocalContextScenarioTest, self).tearDown()
self.cmd('local-context off')
+ self.cmd('local-context delete --all --purge -y')
os.chdir(self.original_working_dir)
if os.path.exists(self.working_dir):
import shutil
|
First cut of dialogs using WinForms backend.
info, question, confirm and error are implemented | +from .libs import WinForms
+
+
+def info(window, title, message):
+ WinForms.MessageBox.Show(message, title)
+
+
+def question(window, title, message):
+ result = WinForms.MessageBox.Show(message, title, WinForms.MessageBoxButtons.YesNo)
+ return result == WinForms.DialogResult.Yes
+
+
+def confirm(window, title, mess... |
fix(pdbparsing): parse "+X" and "X+" charges
Fixes | @@ -367,7 +367,11 @@ class PDBFile(TextFile):
element[i] = line[_element].strip()
altloc_id[i] = line[_alt_loc]
atom_id_raw[i] = line[_atom_id]
- charge_raw[i] = line[_charge][::-1] # turn "1-" into "-1"
+ # turn "1-" into "-1", if necessary
+ if line[_charge][0] in "+-":
+ charge_raw[i] = line[_charge]
+ else:
+ charg... |
Update circuits.rst
Addresses | @@ -155,12 +155,12 @@ for accessing the results of your program execution:
.. code-block:: python
>>> print(result.state)
- <FockState: num_modes=3, cutoff=15, pure=False, hbar=2.0>
+ <FockState: num_modes=3, cutoff=5, pure=True, hbar=2.0>
>>> state = result.state
>>> state.trace() # trace of the quantum state
- 0.9999... |
Update twisted version
This fixes | -Twisted==16.0.0
-Yapsy==1.11.223
+Twisted==16.6.0
appdirs==1.4.0
argparse==1.2.1
colorama==0.3.7
@@ -24,7 +23,7 @@ six>=1.9.0
slowaes==0.1a1
txJSON-RPC==0.5
wsgiref==0.1.2
-zope.interface==4.1.3
+zope.interface==4.3.3
base58==0.2.2
googlefinance==0.7
pyyaml==3.12
|
Fix AntiSpam incorrectly invoking tempmute.
The AntiSpam punish method incorrectly invoked the tempmute
command, as it provided an unconverted duration argument. Since
direct invocation of commands bypasses converters, the conversion
of the duration string to a datetime object is now done manually.
Closes | @@ -14,6 +14,7 @@ from bot.constants import (
Guild as GuildConfig, Icons,
STAFF_ROLES,
)
+from bot.converters import ExpirationDate
log = logging.getLogger(__name__)
@@ -37,6 +38,7 @@ class AntiSpam:
self.bot = bot
role_id = AntiSpamConfig.punishment['role_id']
self.muted_role = Object(role_id)
+ self.expiration_date_... |
Implement GCSBucket.objects()
Test stats after this CL
========================
Ran 58 tests in 4491.154s
FAILED (SKIP=1, errors=12, failures=13) | @@ -2038,6 +2038,10 @@ class GCSBucket(BaseBucket):
"""
return self._bucket['name']
+ @property
+ def objects(self):
+ return self._object_container
+
def delete(self, delete_contents=False):
"""
Delete this bucket.
|
Update README.md
removed reference to Lamport-Diffie OTS as that has been dropped in favour of pure XMSS/WOTS+ | > Python-based blockchain ledger utilising hash-based one-time merkle tree signature scheme (XMSS) instead of ECDSA. Proof-of-stake block selection via a signed iterative hash chain reveal scheme which is both probabilistic and random (https://github.com/theQRL/pos).
>
-> Hash-based signatures means larger transactions... |
llvm, CompExecution: Don't regenerate data structure types
Reuse the ones from input_CIM wrapper | @@ -177,18 +177,22 @@ class CompExecution:
self.__frozen_vals = None
self.__conds = None
- #TODO: This should use compiled function
+ # At least the input_CIM wrapper should be generated
with LLVMBuilderContext() as ctx:
- # Data
- c_data = _convert_llvm_ir_to_ctype(self._composition._get_data_struct_type(ctx))
- self.... |
Remove tulip snapshots from the suggested list
Problem: seems to be dead:(
Solution: Remove its mention from the baking doc. | @@ -86,7 +86,6 @@ In order to run a baker locally, you'll need a fully-synced local `tezos-node`.
The fastest way to bootstrap the node is to import a snapshot.
Snapshots can be downloaded from the following websites:
-* [Tulip Snapshots](https://snapshots.tulip.tools/#/)
* [Tezos Giganode Snapshots](https://snapshots-... |
Fix p2p disconnect warning
encountered during local p2p testing | @@ -59,7 +59,7 @@ class Disconnect(Command):
try:
raw_decoded = cast(Dict[str, int], super().decode(data))
except rlp.exceptions.ListDeserializationError:
- self.logger.warning("Malformed Disconnect message: %s", data)
+ self.logger.warning("Malformed Disconnect message: %s" % data)
raise MalformedMessage("Malformed Di... |
Allow empty list as AccountCreateExtension(s).
All other graphene objects accept `[ ]` as extensions placeholder,
so AccountCreateExtension should comply. | @@ -319,7 +319,7 @@ class AccountCreateExtensions(Extension):
if isArgsThisClass(self, args):
self.data = args[0].data
else:
- if len(args) == 1 and len(kwargs) == 0:
+ if len(args) == 1 and len(kwargs) == 0 and not(isinstance(args[0], list)):
kwargs = args[0]
# assert "1.3.0" in kwargs["markets"], "CORE asset must be ... |
Fixed Typos
While going through the tutorial, I found some minor typos, so I fixed them.
Thanks | @@ -97,9 +97,9 @@ label_pipeline = lambda x: int(x) - 1
#
# `torch.utils.data.DataLoader <https://pytorch.org/docs/stable/data.html?highlight=dataloader#torch.utils.data.DataLoader>`__
# is recommended for PyTorch users (a tutorial is `here <https://pytorch.org/tutorials/beginner/data_loading_tutorial.html>`__).
-# It ... |
settings: Use variable for notification sound element.
This commit changes the click handler for playing
notification sound to use a variable instead of
directly using the element id such that we can
use the same code for realm-level settings also
by just setting the variable accordingly. | @@ -75,6 +75,7 @@ export function set_enable_marketing_emails_visibility() {
export function set_up(container, settings_object) {
const patch_url = "/json/settings";
+ const notification_sound_elem = $("#user-notification-sound-audio");
container.find(".notification-settings-form").on("change", "input, select", functio... |
streams: Make stream settings inputs responsive to narrow screens.
This makes the inputs and buttons responsive to narrow screens by
gracefully resizing and falling in place.
Fixes: | @@ -296,6 +296,10 @@ form#add_new_subscription {
-webkit-overflow-scrolling: touch;
}
+.subscriber_list_container .form_inline input {
+ vertical-align: top;
+}
+
.subscriber-list {
width: 100%;
margin: auto;
@@ -798,6 +802,10 @@ form#add_new_subscription {
margin-top: -5px;
}
+#subscription_overlay .stream-header .but... |
Don't try to upgrade DB on CI
This was added by mistake - the Concourse pipeline never did this
previously, and errors if we try (the necessary environment vars
aren't present, even if we wanted to). | @@ -25,7 +25,7 @@ NOTIFY_CREDENTIALS ?= ~/.notify-credentials
bootstrap: generate-version-file ## Set up everything to run the app
pip3 install -r requirements_for_test.txt
createdb notification_api || true
- (. environment.sh && flask db upgrade) || flask db upgrade
+ (. environment.sh && flask db upgrade) || true
.PH... |
DOC: Replace reference to np.swapaxis with np.swapaxes
DOC: Replace reference to np.swapaxis with np.swapaxes
The former function does not exist. | @@ -1639,7 +1639,7 @@ def moveaxis(a, source, destination):
>>> np.transpose(x).shape
(5, 4, 3)
- >>> np.swapaxis(x, 0, -1).shape
+ >>> np.swapaxes(x, 0, -1).shape
(5, 4, 3)
>>> np.moveaxis(x, [0, 1], [-1, -2]).shape
(5, 4, 3)
|
Update example.py
Deleted unnecessary blank line 50. | @@ -47,7 +47,6 @@ def parse(input_string):
root = None
current = None
stack = list(input_string)
-
if input_string == '()':
raise ValueError('tree with no nodes')
|
fix: move to OVNKubernetes
This commit moves the default CNI
cluster network provider to
OVNKubernetes as it will be the
eventual default. | @@ -14,7 +14,7 @@ networking:
clusterNetwork:
- cidr: {{ kubeinit_okd_pod_cidr }}
hostPrefix: 23
- networkType: OpenShiftSDN
+ networkType: OVNKubernetes
serviceNetwork:
- {{ kubeinit_okd_service_cidr }}
platform:
|
Remove MFaaS, it's broken
MFaaS returns http code 404 when accessed | @@ -1765,7 +1765,6 @@ API | Description | Auth | HTTPS | CORS |
| [JSON2Video](https://json2video.com) | Create and edit videos programmatically: watermarks,resizing,slideshows,voice-over,text animations | `apiKey` | Yes | No |
| [Lucifer Quotes](https://github.com/shadowoff09/lucifer-quotes) | Returns Lucifer quotes |... |
filter: Add `maybe_add_search_terms` function to add search_term.
This function adds search_term to the operators list.
This logic is extracted as a prep commit for the
changes related to | @@ -299,6 +299,15 @@ export class Filter {
let operand;
let term;
+ function maybe_add_search_terms() {
+ if (search_term.length > 0) {
+ operator = "search";
+ const _operand = search_term.join(" ");
+ term = {operator, operand: _operand, negated: false};
+ operators.push(term);
+ }
+ }
+
// Match all operands that ei... |
Fix false postive CVE-2017-10271
This commit is to increase accuracy by changing the CVE-2017-10271 scan string from "<faultstring>.*" to "<faultstring>java.lang.ProcessBuilder || <faultstring>0". | @@ -2,7 +2,7 @@ id: CVE-2017-10271
info:
name: Oracle WebLogic Server - Remote Command Execution
- author: dr_set,ImNightmaree
+ author: dr_set,ImNightmaree,true13
severity: high
description: |
The Oracle WebLogic Server component of Oracle Fusion Middleware (subcomponent - WLS Security) is susceptible to remote comman... |
Solving conflicts
Also removed the function `get_data_mobility`, which is obsolete. | @@ -231,16 +231,8 @@ class InputLocator(object):
return os.path.join(self.db_path, 'Systems', 'thermal_networks.xls')
def get_data_benchmark(self):
- """db/Benchmarks/benchmark_targets.xls"""
- return os.path.join(self.db_path, 'Benchmarks', 'benchmark_targets.xls')
-
- def get_data_benchmark_today(self):
- """db/Bench... |
CI: make sure we build libadalang_for_customers
The libadalang testsuite uses this component, so make sure it runs on an
up-to-date version. | @@ -125,6 +125,7 @@ libadalang_build_and_test:
- touch fingerprints/x86_64-linux.langkit_support.build.json.assume-unchanged
- touch fingerprints/x86_64-linux.langkit.build.json.assume-unchanged
- anod build --minimal --disable-cathod libadalang
+ - anod build --minimal --disable-cathod libadalang_for_customers
- anod ... |
bugfix of RhinoNurbsSurface closest_point method
change rhino_curve to rhino_surface
return parameters as tuple instead (for consistency with compas_occ) | @@ -456,21 +456,21 @@ class RhinoNurbsSurface(NurbsSurface):
point : :class:`compas.geometry.Point`
The test point.
return_parameters : bool, optional
- Return the UV parameters of the closest point in addition to the point location.
+ Return the UV parameters of the closest point as tuple in addition to the point loca... |
BUG FIX reopt.jl dvFuelUsage with sub hourly time step
since the units are:
FuelBurnSlope <=> gallons/kWh
FuelBurnYInt <=> gallons/hour
dvRatedProduction <=> kW
ProductionFactor <=> kW/kW
then the
TimeStepScaling <=> hour
is needed in the definition of
dvFuelUsage <=> gallons | @@ -246,10 +246,12 @@ function add_fuel_constraints(m, p)
# Constraint (1b): Fuel burn for non-CHP Constraints
@constraint(m, FuelBurnCon[t in p.FuelBurningTechs, ts in p.TimeStep],
- m[:dvFuelUsage][t,ts] == (p.FuelBurnSlope[t] * p.ProductionFactor[t,ts] * m[:dvRatedProduction][t,ts]) +
- (p.FuelBurnYInt[t] * m[:binTe... |
CollectionSingleton: switch to the standard result var mechanism
TN: | @@ -563,23 +563,20 @@ class CollectionSingleton(AbstractExpression):
self.expr.type.array_type().add_to_context()
self.static_type = self.expr.type.array_type()
- self.array_var = PropertyDef.get().vars.create('Singleton',
- self.type)
-
super(CollectionSingleton.Expr, self).__init__(
+ result_var_name='Singleton',
abs... |
Bugfix: Recursive BOM display
Actually request recursively! (duh)
Fix the idField and parentIdField for the BOM display (was incredibly wrong)
Sub-rows are initially displayed in the "collapsed" state | @@ -280,7 +280,9 @@ function loadBomTable(table, options) {
params.sub_part_detail = true;
}
- function requestSubItems(part_pk) {
+ // Function to request BOM data for sub-items
+ // This function may be called recursively for multi-level BOMs
+ function requestSubItems(bom_pk, part_pk) {
inventreeGet(
options.bom_url... |
[Core] Raise an exception on Ray version mismatch
Add unit tests that verify Ray version mismatches | @@ -456,19 +456,18 @@ def test_put_error2(ray_start_object_store_memory):
# get_error_message(ray_constants.PUT_RECONSTRUCTION_PUSH_ERROR, 1)
-@pytest.mark.skip("Publish happeds before we subscribe it")
-def test_version_mismatch(error_pubsub, shutdown_only):
+def test_version_mismatch(ray_start_cluster):
ray_version =... |
Change test to check individual check statuses before checking the
overall in order to print a more helpful error message | @@ -96,7 +96,10 @@ def test_checks_api(dcos_api_session):
results = r.json()
assert isinstance(results, dict)
- logging.info("returned checks: {}".format(checks))
- logging.info("run checks : {}".format(results['checks'].keys()))
- # Make sure we ran all the listed checks.
- assert set(checks.keys()) == set(results['ch... |
Fix GCE provider: #create returns bootstrap result
fixes | @@ -2580,7 +2580,10 @@ def create(vm_=None, call=None):
ssh_user, ssh_key = __get_ssh_credentials(vm_)
vm_['ssh_host'] = __get_host(node_data, vm_)
vm_['key_filename'] = ssh_key
- __utils__['cloud.bootstrap'](vm_, __opts__)
+
+ ret = __utils__['cloud.bootstrap'](vm_, __opts__)
+
+ ret.update(node_dict)
log.info('Create... |
lightbox: Fix incorrectly displayed avatar image.
The lightbox "v" shortcut should not show a user's avatar,
so this limits the scope of images it can choose to ones inside
of the `.message_content` div. | @@ -140,14 +140,14 @@ exports.open = function (image, options) {
exports.show_from_selected_message = function () {
var $message = $(".selected_message");
- var $image = $message.find("img");
+ var $image = $message.find(".message_content img");
while ($image.length === 0) {
$message = $message.prev();
if ($message.len... |
hotkey.js: Navigate using page up / page down
Using page up / page down, go to the top / bottom of compose textarea
Fixes | @@ -536,11 +536,12 @@ exports.process_hotkey = function (e, hotkey) {
compose_actions.cancel();
// don't return, as we still want it to be picked up by the code below
} else if (event_name === "page_up") {
- $("#compose-textarea").caret(0);
+ $("#compose-textarea").caret(0).animate({ scrollTop: 0 }, "fast");
return tru... |
Check for jpg bytes before make_response
If jpg_bytes wasn't retrieved from either desk or a tracked object, respond with 404
Prevents uncaught error for unknown event ids sent to event_snapshot endpoint | @@ -214,6 +214,9 @@ def event_snapshot(id):
except:
return "Event not found", 404
+ if jpg_bytes is None:
+ return "Event not found", 404
+
response = make_response(jpg_bytes)
response.headers["Content-Type"] = "image/jpg"
return response
|
Fixes a bug syncing roles for members who leave.
The event that was supposed to handle this was called
on_member_leave instead of on_member_remove, so the
even was never called when it should have been.
This commit renames the method. | @@ -118,7 +118,7 @@ class Sync:
# If we got `404`, the user is new. Create them.
await self.bot.api_client.post('bot/users', json=packed)
- async def on_member_leave(self, member: Member) -> None:
+ async def on_member_remove(self, member: Member) -> None:
"""Updates the user information when a member leaves the guild.... |
Update OS::Glance::CommonImageProperties in metadefs
Add missing properties, as of Train, defined in etc/schema-image.json
for OS::Glance::CommonImageProperties defined in
etc/metadefs/glance-common-image-props.json
Closes-bug: | "title": "OS Version",
"description": "Operating system version as specified by the distributor. (for example, '11.10')",
"type": "string"
+ },
+ "description": {
+ "title": "Image description",
+ "description": "A human-readable string describing this image.",
+ "type": "string"
+ },
+ "cinder_encryption_key_id": {
+ ... |
undo_votes: Correcting possible crash when submitting an invalid form. Not replying with json on
an endpoint that is supposed to do redirects. | @@ -2218,14 +2218,15 @@ def admin_undo_votes(uid):
if not current_user.admin:
abort(403)
- form = DummyForm()
- if not form.validate():
- return redirect(url_for('view_user', user=username))
-
try:
user = User.get(User.uid == uid)
except User.DoesNotExist:
- return jsonify(status='error', error='User does not exist')
+... |
Scons: Use "ccache.exe" via environment variable too.
* That gives users more control and is more like it's done for
"clcache.exe" where we cannot guess where it's installed. | @@ -1736,13 +1736,8 @@ if show_scons_mode:
# Inject ccache if it happens to be installed.
if win_target and gcc_mode:
- for location in [
- r"c:\msys64",
- r"c:\msys32",
- r"\msys64",
- r"\msys32",
- ]:
- candidate = os.path.join(location, r"usr\bin\ccache.exe")
+ if "NUITKA_CCACHE_BINARY" in os.environ:
+ candidate = ... |
Metadata Editor UI enhancements
Adding small UI enhancements to metadata editor:
Better search icon
Add tooltip to 'search by tags' button
Fix dark background in language search input field | @@ -190,12 +190,16 @@ export class FilterTools extends React.Component<
type="text"
placeholder="Search..."
onChange={this.handleSearch}
- rightIcon="search"
+ rightIcon="ui-components:search"
value={this.state.searchValue}
/>
</div>
<div className={FILTER_CLASS} id={this.props.schemaId}>
- <button className={FILTER_BU... |
Fix ManagedObject.get_profile()
HG--
branch : feature/moversion | @@ -937,7 +937,7 @@ class ManagedObject(Model):
"""
profile = getattr(self, "_profile", None)
if not profile:
- self._profile = self.profile.get_profile()()
+ self._profile = self.profile.get_profile()
return self._profile
def get_parser(self):
|
Fix the import for filter_utils
Changed from importing utils and calling it via utils.filter_utils
to a proper import utils.__init__.py didn't export it so the way it
was called probably worked for python 2 only.
This way is a more ubiquitous way of calling it. | @@ -28,6 +28,7 @@ from yaql.language import utils as yaql_utils
from mistral.config import cfg
from mistral.db.v2 import api as db_api
from mistral import utils
+from mistral.utils import filter_utils
# TODO(rakhmerov): it's work around the bug in YAQL.
# YAQL shouldn't expose internal types to custom functions.
@@ -12... |
Update elf_mirai.txt
[0]
One more ```Mirai-based``` botnet. C2 addresses + semaphore filenames. | l.ocalhost.host
/sonicwall
+
+# Reference: https://blog.netlab.360.com/threat-alert-a-new-worm-fbot-cleaning-adbminer-is-using-a-blockchain-based-dns-en/
+
+musl.lib
+rippr.cc
+ukrainianhorseriding.com
+/adbs
+/adbs2
+/fbot.aarch64
+/fbot.arm7
+/fbot.mips
+/fbot.mipsel
+/fbot.x86
+/fbot.x86_64
+/mipsel.bot.le
+/mips.bo... |
Same changes as in
Fixes: pull-request follow-up | " html1.value = '''\n",
" <h4>Country code: <b>{}</b></h4>\n",
" Country name: {}\n",
- " '''.format(feature['id'], feature['properties']['name'])\n",
+ " '''.format(feature['properties']['ISO_A2'], feature['properties']['NAME'])\n",
"\n",
"json_layer.on_hover(update_html)"
]
|
Reraise if errors occur when setting description
and suggest checking for RFC1035 compliance. | @@ -1331,7 +1331,10 @@ class GCEVolume(BaseVolume):
resource=self.name,
body=request_body).execute())
except Exception as e:
- cb.log.warning('Exception while setting volume description: %s', e)
+ cb.log.warning('Exception while setting volume description: %s.'
+ 'Check for invalid characters in description. Should'
+ ... |
Delete semi and highlights on rebuildtree
The semi and highlighted items are dirty after a tree rebuild. And need to be thrown away. | @@ -1546,6 +1546,7 @@ class RootNode(list):
self.object = "Project"
self.name = "Project"
self.semi_selected = []
+ self.highlighted = []
self.type = NODE_ROOT
self.kernel = kernel
@@ -1567,6 +1568,23 @@ class RootNode(list):
self.node_files = None
self.rebuild_tree()
+ def highlight_select(self, item):
+ if item not i... |
Update emotet.txt
Tails can be various. | @@ -2799,22 +2799,24 @@ proyectoin.com
# Reference: https://app.any.run/tasks/9056d965-915a-498a-83bc-a750fc0389f2/
-http://98.199.196.197/GPDnrZV7sOIw7mX
-http://188.85.143.170/iOEiihW73
-http://195.223.215.190/NG4N0hcJOy
+http://98.199.196.197
+http://188.85.143.170
+http://195.223.215.190
http://testtaglabel.com/wp-... |
Update add_request_headers.md
Added more docs on add_request_headers feature | @@ -4,7 +4,9 @@ Ambassador can add a dictionary of HTTP headers that can be added to each reques
## The `add_request_headers` annotation
-The `add_request_headers` attribute is a dictionary of `header`: `value` pairs. Envoy dynamic values `%DOWNSTREAM_REMOTE_ADDRESS_WITHOUT_PORT%` and `%PROTOCOL%` are supported, in add... |
fix: add mkdir instructions
The provided `download_data_kaggle.sh` is missing instructions to create the `data` folder and the `f8k` folder. | @@ -100,6 +100,8 @@ To make this work, we need to get the image files from the `kaggle` [dataset](ht
kaggle datasets download adityajn105/flickr8k
unzip flickr8k.zip
rm flickr8k.zip
+mkdir data
+mkdir data/f8k
mv Images data/f8k/images
mv captions.txt data/f8k/captions.txt
```
|
Added to the ceph-radosgw service template the ca-trust
volume avoiding to expose useless information.
This bug is referred to the following bugzilla: | @@ -17,6 +17,12 @@ ExecStart=/usr/bin/{{ container_binary }} run --rm --net=host \
-v /etc/ceph:/etc/ceph:z \
-v /var/run/ceph:/var/run/ceph:z \
-v /etc/localtime:/etc/localtime:ro \
+ {% if ansible_distribution == 'RedHat' -%}
+ -v /etc/pki/ca-trust/extracted:/etc/pki/ca-trust/extracted:ro \
+ -v /etc/pki/ca-trust/sou... |
Cleanup solve_poly_system(), comment on code
Also drop solve_generic(). | @@ -27,6 +27,10 @@ def test_solve_poly_system():
assert solve_poly_system([y - x, y - x - 1], x, y) == []
+ assert solve_poly_system([x - y + 5, x + y - 3], x, y) == [{x: -1, y: 4}]
+ assert solve_poly_system([x - 2*y + 5, 2*x - y - 3], x, y) == [{x: Rational(11, 3), y: Rational(13, 3)}]
+ assert solve_poly_system([x**... |
Update documentation regarding 0-pk pk-pk
Users now can change amplitude units using the
prefix pkpk_ (e.g. pkpk_m, pkpk_micron).
The docs now mention that the default is 0 to
peak and how it can be changed to peak to peak. | @@ -928,7 +928,8 @@ class FrequencyResponseResults:
Default is "rad/s"
amplitude_units : str, optional
Units for the y axis.
- Default is "m/N"
+ Default is "m/N" 0 to peak.
+ To use peak to peak use the prefix 'pkpk_' (e.g. pkpk_m)
fig : Plotly graph_objects.Figure()
The figure object with the plot.
mag_kwargs : optio... |
Added handling for OSError caused by trying to load a GNU readline shared library in
Python environments like PyPy which have a pure Python implementation of readline. | @@ -129,10 +129,10 @@ elif 'gnureadline' in sys.modules or 'readline' in sys.modules:
import ctypes
readline_lib = ctypes.CDLL(readline.__file__)
- except AttributeError: # pragma: no cover
+ except (AttributeError, OSError): # pragma: no cover
_rl_warn_reason = (
"this application is running in a non-standard Python e... |
tests: Remove ignored parameters from bots tests.
`service_interface` is not a parameter of `add_bot_backend`, but
`interface_type` is, and that has the same default value as what
was being provided by the test, so updated for the parameter name
change, which was possibly missed in a previous code refactor. | @@ -1448,7 +1448,7 @@ class BotTest(ZulipTestCase, UploadSerializeMixin):
"short_name": "hambot",
"bot_type": UserProfile.OUTGOING_WEBHOOK_BOT,
"payload_url": orjson.dumps("http://foo.bar.com").decode(),
- "service_interface": Service.GENERIC,
+ "interface_type": Service.GENERIC,
}
result = self.client_post("/json/bots... |
Remove unnecessary bullet points, unify formatting.
Use bulleted documents to display problems, uniform formatting. | @@ -64,11 +64,11 @@ The following manufacturers are known to work:
- QLogic
- Broadcom
-For information on **Mellanox SR-IOV Ethernet ConnectX cards**, see:
-- `Mellanox: How To Configure SR-IOV VFs on ConnectX-4 or newer <https://support.mellanox.com/s/article/HowTo-Configure-SR-IOV-for-ConnectX-4-ConnectX-5-ConnectX-... |
Version 0.7.3
MMS updates to new pip file. | @@ -19,7 +19,7 @@ with open(path.join(here, 'README.md'), encoding='utf-8') as f:
setup(
name='pyspedas',
- version='0.7.2',
+ version='0.7.3',
description='Python Space Physics Environment Data Analysis \
Software (SPEDAS)',
long_description=long_description,
|
Method stating which commit is being played during an halted rebase
This will be useful to me at least. This way, I know that I can tell
my script to omit some specific commits. If you accept to merge it, I
may also do similar method for merges and cherry pick. | @@ -1062,3 +1062,14 @@ class Repo(object):
def __repr__(self):
return '<git.Repo "%s">' % self.git_dir
+
+ def currentlyRebasingOn(self):
+ """
+ :return: The hash of the commit which is currently being replayed while rebasing.
+
+ None if we are not currently rebasing.
+ """
+ rebase_head_file = osp.join(self.git_dir,... |
push notif: Test GCM options parsing more comprehensively.
The payoff from making these into real unit tests. | @@ -1352,6 +1352,16 @@ class GCMParseOptionsTest(GCMTest):
with self.assertRaises(JsonableError):
apn.parse_gcm_options({"priority": "invalid"}, self.get_gcm_data())
+ def test_default_priority(self) -> None:
+ self.assertEqual(
+ "normal", apn.parse_gcm_options({}, self.get_gcm_data()))
+
+ def test_explicit_priority(... |
MAINT: core: Fix a compiler warning.
This change fixes:
gcc: numpy/core/src/umath/ufunc_object.c
numpy/core/src/umath/ufunc_object.c:657:19: warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
for (i = 0; i < len; i++) {
~ ^ ~~~ | @@ -654,8 +654,8 @@ _parse_signature(PyUFuncObject *ufunc, const char *signature)
PyErr_NoMemory();
goto fail;
}
- for (i = 0; i < len; i++) {
- ufunc->core_dim_flags[i] = 0;
+ for (size_t j = 0; j < len; j++) {
+ ufunc->core_dim_flags[j] = 0;
}
i = _next_non_white_space(signature, 0);
|
FIx:
check topic exist in `pubsub.peer_topics` | @@ -267,6 +267,7 @@ class GossipSub(IPubsubRouter):
num_mesh_peers_in_topic = len(self.mesh[topic])
if num_mesh_peers_in_topic < self.degree_low:
+ if topic in self.pubsub.peer_topics:
gossipsub_peers_in_topic = [peer for peer in self.pubsub.peer_topics[topic]
if peer in self.peers_gossipsub]
|
Add a `fast_test` option to Makefile
`fast_test` runs tests in parallel with keeping the db (speeds up things
a lot). | @@ -25,6 +25,10 @@ commands : Makefile
test :
${MANAGE} test
+## fast test : run all tests really fast.
+fast_test:
+ ${MANAGE} test --keepdb --parallel
+
## dev_database : re-make database using saved data
dev_database :
rm -f ${APP_DB}
|
Fix bug in sensor sorting for smurf export
Closes | @@ -208,7 +208,7 @@ def sort_for_yaml_dump(dictionary, category):
if category in ['materials', 'motors']:
return {category: sort_dict_list(dictionary[category], 'name')}
elif category == 'sensors':
- return sort_dict_list(dictionary[category], 'name')
+ return {category: sort_dict_list(dictionary[category], 'name')}
el... |
Use cv2 to replace scipy.misc (fix
* Converted scipy.misc to cv2
Scipy.misc is being deprecated so we should probably switch to OpenCV to reduce the number of needed dependencies.
* Removed unused import.
* Made Travis happy
* Travis fix
* Added cv2 dummy func and remove grayscale hack | import six
import tensorflow as tf
import re
-import io
from six.moves import range
from contextlib import contextmanager
@@ -71,20 +70,25 @@ def create_image_summary(name, val):
s = tf.Summary()
for k in range(n):
arr = val[k]
- if arr.shape[2] == 1: # scipy doesn't accept (h,w,1)
- arr = arr[:, :, 0]
+ #CV2 will only... |
[bugfix] Add Server414Error to pywikibot.__init__()
This is a follow up of:
[IMPR] add Server414Error in reflink.py and close file | @@ -44,7 +44,7 @@ from pywikibot.exceptions import (
PageSaveRelatedError, PageNotSaved, OtherPageSaveError,
LockedPage, CascadeLockedPage, LockedNoPage, NoCreateError,
EditConflict, PageDeletedConflict, PageCreatedConflict,
- ServerError, FatalServerError, Server504Error,
+ ServerError, FatalServerError, Server414Erro... |
Fix get_sender when using it on a ChannelForbidden
Closes | @@ -44,7 +44,7 @@ class SenderGetter(abc.ABC):
# in which case we want to force fetch the entire thing because
# the user explicitly called a method. If the user is okay with
# cached information, they may use the property instead.
- if (self._sender is None or self._sender.min) \
+ if (self._sender is None or getattr(... |
viafree: don't crash when episode is a text
fixes: | @@ -241,6 +241,7 @@ class Viaplay(Service, OpenGraphThumbMixin):
else:
output = title
return output
+
def _autoname(self, dataj):
program = dataj["format_slug"]
season = None
@@ -253,6 +254,11 @@ class Viaplay(Service, OpenGraphThumbMixin):
if season:
if len(dataj["format_position"]["episode"]) > 0:
episode = dataj["fo... |
Skips flax tests for unrelated configurations like conditional or importer node.
Flax tests will still be covered in testPenguinPipelineLocal and BulkInferrer test configurations. | @@ -232,9 +232,8 @@ class PenguinPipelineLocalEndToEndTest(tf.test.TestCase,
self._assertPipelineExecution(has_bulk_inferrer=True)
- @parameterized.parameters(('keras',), ('flax_experimental',))
- def testPenguinPipelineLocalWithImporter(self, model_framework):
- module_file = self._module_file_name(model_framework)
+ ... |
Fix `make client` in Python 3.6
Python 3.6 is more strict than previous versions about passing a
`typing.TypeVar` instance to `issubclass`.
Fixes | @@ -171,13 +171,13 @@ def name_to_py(name):
def strcast(kind, keep_builtins=False):
- if issubclass(kind, typing.GenericMeta):
- return str(kind)[1:]
- if str(kind).startswith('~'):
- return str(kind)[1:]
if (kind in basic_types or
type(kind) in basic_types) and keep_builtins is False:
return kind.__name__
+ if str(kin... |
Syntax: Improve CommonMark compatibility of emphasis
This commit improves left flanking delimiters to improve a couple of
edge cases. Most fixes require branching though and therefore won't be
available for ST3.
To prepare future changes, test cases are updated with more detailed
boundary checks. Also sync example ids ... | @@ -248,6 +248,30 @@ variables:
)
)
+ # https://spec.commonmark.org/0.30/#left-flanking-delimiter-run
+ bold_italic_asterisk_begin: |-
+ (?x:
+ (\*\*)(\*) {{no_space_nor_punct}}
+ | \B (\*\*)(\*) {{no_space_but_punct}}
+ )
+
+ bold_asterisk_begin: |-
+ (?x:
+ \*{2} {{no_space_nor_punct}}
+ | \B \*{2} {{no_space_but_pun... |
Update sso-ldap.md
Added a few issues to the Troubleshooting section. | @@ -73,3 +73,17 @@ Note: Currently the value is case sensitive. If the ID attribute is set to the u
This indicates your AD/LDAP server configuration has a maximum page size set and the query coming from Mattermost is returning a result set in excess of that limit.
To address this issue you can set the [max page size](h... |
Update _percentile.py
Returned `math.nan` instead of `math.inf` for simplicity and readability. | @@ -39,7 +39,7 @@ def _get_percentile_intermediate_result_over_trials(
is_maximize = direction == StudyDirection.MAXIMIZE
if not intermediate_values:
- return -math.inf if is_maximize else math.inf
+ return math.nan
if is_maximize:
percentile = 100 - percentile
|
fix _create_stream and tornado 5.0
This should be the last fix for tornado 5.0 | @@ -603,10 +603,10 @@ class TCPReqServerChannel(salt.transport.mixins.auth.AESReqServerMixin, salt.tra
self.payload_handler = payload_handler
self.io_loop = io_loop
self.serial = salt.payload.Serial(self.opts)
+ with salt.utils.async.current_ioloop(self.io_loop):
if USE_LOAD_BALANCER:
self.req_server = LoadBalancerWork... |
Update apt_kimsuky.txt
Adding ```Aliases``` field. | # Copyright (c) 2014-2020 Maltrail developers (https://github.com/stamparm/maltrail/)
# See the file 'LICENSE' for copying permission
+# Aliases: Black Banshee, Velvet Chollima
+
# Reference: https://otx.alienvault.com/pulse/5c93c4e48312d159728a9d78
# Reference: https://blog.alyac.co.kr/2209 (Korean)
|
Update ref_after_reparse for the new RefEnvs interface
TN: | @@ -10,7 +10,7 @@ import os.path
from langkit.compiled_types import ASTNode, Field, T, root_grammar_class
from langkit.diagnostics import Diagnostics
-from langkit.envs import EnvSpec, add_to_env
+from langkit.envs import EnvSpec, RefEnvs, add_to_env
from langkit.expressions import Env, New, Self, langkit_property
from... |
Adds reference to DarshanDeshpande/jax-models
h/t for for creating this, and to for reporting it. | @@ -94,8 +94,9 @@ submit your own example, we suggest that you start by forking one of the
official Flax example, and start from there.
| Link | Author | Task type | Reference |
-| ---------------------------- | ------------------ | --------------------------------- | ---------------------------------------------------... |
STY: Small style fixes in numeritypes.
[ci skip] | @@ -347,8 +347,7 @@ def _add_integer_aliases():
for info, charname, intname, Intname in [
(i_info,'i%d' % (bits//8,), 'int%d' % bits, 'Int%d' % bits),
- (u_info,'u%d' % (bits//8,), 'uint%d' % bits, 'UInt%d' % bits)
- ]:
+ (u_info,'u%d' % (bits//8,), 'uint%d' % bits, 'UInt%d' % bits)]:
if intname not in allTypes.keys():... |
Keep all-users
This is to handle existing PRs that may already be tagged all-users | @@ -10,7 +10,8 @@ from gevent.pool import Pool
LABELS_TO_EXPAND = [
"product/all-users-all-environments",
"product/prod-india-all-users",
- "product/feature-flag"
+ "product/feature-flag",
+ "product/all-users",
]
|
Fixed bug that caused the libdoc task to crash when fed this file
As a side benefit, I removed some duplicate code when computing the
keyword names. I also fixed the library documentation by using robot's
markup for preformatted code (leading pipe). | from robot.api import logger
-from robot.libraries.BuiltIn import BuiltIn
-from .baseobjects import BasePage
+from robot.libraries.BuiltIn import BuiltIn, RobotNotRunningError
+from cumulusci.robotframework.pageobjects.baseobjects import BasePage
import inspect
import robot.utils
import os
import sys
+def get_keyword_n... |
s/ditionary/dictionary
Summary: Spelling is hard
Test Plan: Read
Reviewers: sandyryza | @@ -27,7 +27,7 @@ class ModeDefinition(
resource_defs (Optional[Dict[str, ResourceDefinition]]): A dictionary of string resource
keys to their implementations. Individual solids may require resources to be present by
these keys.
- logger_defs (Optional[Dict[str, LoggerDefinition]]): A ditionary of string logger
+ logge... |
[Chore] Fix 'Attach bottles to the release' dependencies
Problem: Currently this step depends on non-architecture specific
step 'uninstall-tsp' which is no longer present.
Solution: Make it depend on arch-specific uninstall-tsp steps. | @@ -87,10 +87,11 @@ done
ymlappend "
- label: Add Big Sur bottle hashes to formulae
- depends_on:
- - \"uninstall-tsp-arm64\"
- - \"uninstall-tsp-x86_64\"
- if: build.tag =~ /^v.*/
+ depends_on:"
+for arch in "${architecture[@]}"; do
+ ymlappend " - \"uninstall-tsp-$arch\""
+done
+ ymlappend " if: build.tag =~ /^v.*/
s... |
No longer suggest removal of migration code
We might as well keep it in, as we'll only ever have to run any of this
command again if there's another major BNF release. | @@ -53,9 +53,9 @@ For each old code -> new code mapping, in reverse order of date
data, our measures, and so on, henceforward.
* Replace all the codes that have new normalised versions in all local
- version of the prescribing data. (This method will be removed once
- run, as it's only ever needed for an initial migrat... |
travis: Reduce test verbsoity
The errors are still reported in detail | @@ -59,7 +59,7 @@ install:
script:
- if [ "x$RUN_COV" != "x" ] ; then echo "Running with coverage"; export COV_ARGS="--cov=psyneulink"; else echo "Running without coverage"; export COV_ARGS=""; fi
- - pytest -n auto -p no:logging $COV_ARGS
+ - pytest -n auto -p no:logging --verbosity=0 $COV_ARGS
after_script:
- if [ "x... |
langkit.parsers.Transform: refactor compute_fields_type
TN: | @@ -1541,7 +1541,14 @@ class _Transform(Parser):
def get_type(self):
return resolve_type(self.typ)
- def compute_fields_types(self):
+ @property
+ def fields_parsers(self):
+ """
+ Return the list of parsers that return values for the fields in the
+ node this parser creates.
+
+ :rtype: list[Parser]
+ """
typ = self.g... |
multiprocessing.pool: Fix return of map_async()
Closes | @@ -46,7 +46,7 @@ class Pool(ContextManager[Pool]):
iterable: Iterable[_S] = ...,
chunksize: Optional[int] = ...,
callback: Optional[Callable[[_T], None]] = ...,
- error_callback: Optional[Callable[[BaseException], None]] = ...) -> MapResult[List[_T]]: ...
+ error_callback: Optional[Callable[[BaseException], None]] = .... |
Add an example with `constrain='domain'`
Add a following example demonstrating Fixed Ratio Axes with Compressed domain to (axes tutorial)[https://plot.ly/python/axes/]. | @@ -481,6 +481,37 @@ fig.update_layout(
fig.show()
```
+### Fixed Ratio Axes with Compressed domain
+
+If an axis needs to be compressed (either due to its own `scaleanchor` and `scaleratio` or those of the other axis), `constrain` determines how that happens: by increasing the "range" (default), or by decreasing the "... |
bugfix for BrozzlerWorker._needs_browsing
I'm sorry but with my previous commit I introduced a bug in
``BrozzlerWorker._needs_browsing`` method.
More specifically, if the ``brozzler_spy`` param is False (this happens
when ``youtube_dl`` is disabled), ``_needs_browsing`` method returns
always ``False`` and this messes w... | @@ -448,6 +448,8 @@ class BrozzlerWorker:
'text/html', 'application/xhtml+xml']:
return True
return False
+ else:
+ return True
def _already_fetched(self, page, brozzler_spy):
if brozzler_spy:
|
llvm: Use whitelist of allowed characters for function names
Fixes autodiff compiled test with cuda testing enabled. | @@ -90,7 +90,7 @@ class LLVMBuilderContext:
@classmethod
def get_unique_name(cls, name: str):
cls.__uniq_counter += 1
- name = re.sub(r"[- ()\[\]]", "_", name)
+ name = re.sub(r"[^a-zA-Z0-9_]", "_", name)
return name + '_' + str(cls.__uniq_counter)
def get_builtin(self, name: str, args=[], function_type=None):
|
Make default parameters consistent
This will make things easier to reason about. | [Global_Params]
model_name = 'darts_uno'
-unrolled = True
+unrolled = False
data_url = 'ftp.mcs.anl.gov/pub/candle/public/benchmarks/Pilot1/uno/'
savepath = './results'
log_interval = 10
|
not use bottleneck
change ffil_... method to not use bottleneck (in native xarray ffill) | @@ -1079,7 +1079,15 @@ class DataRecord(Dataset):
"""
# Forward fill element_id:
- self['element_id'] = self['element_id'].ffill('time')
+ fill_value=[]
+ ei = self['element_id'].values
+ for i in range(ei.shape[0]):
+ for j in range(ei.shape[1]):
+ if np.isnan(ei[i,j]):
+ ei[i,j]=fill_value
+ else:
+ fill_value=ei[i,j... |
Fix SESSION_COOKIE_SECURE & CSRF_COOKIE_SECURE values
was previously being always set to False. | @@ -962,9 +962,6 @@ REQUIRE_TWO_FACTOR_FOR_SUPERUSERS = False
# that adds messages to the partition with the fewest unprocessed messages
USE_KAFKA_SHORTEST_BACKLOG_PARTITIONER = False
-SESSION_COOKIE_SECURE = CSRF_COOKIE_SECURE = not DEBUG
-SESSION_COOKIE_HTTPONLY = CSRF_COOKIE_HTTPONLY = True
-
try:
# try to see if th... |
Update translations properly
This adds multiple language support for validation messages, refactors
it for labels, and fixes it for hints. Previously, changing a hint in
one language would delete that hint for all other languages. | @@ -1009,22 +1009,19 @@ def _update_search_properties(module, search_properties, lang='en'):
True
"""
- current = {p.name: p.label for p in module.search_config.properties}
+ props_by_name = {p.name: p for p in module.search_config.properties}
for prop in search_properties:
- if prop['name'] in current:
- label = curre... |
Bug in reporting missing objective
Was:
Eating exceptions that should cause batch to terminate with error
Printing traceback for handled error | @@ -289,9 +289,6 @@ class Batch(object):
except StopBatch as e:
if e.error:
raise
- except Exception as e:
- log.exception(
- "error running trial %s: %s", trial.run_id, e)
def _run_trial(self, trial, trial_runs, init_only):
self._apply_existing_run_id(trial, trial_runs)
|
proposition of enhancement
We should consider the absolute value of the object height and the magnification, because if the display range is 10 but the object height or image height is -20, the display range is not big enough | @@ -693,14 +693,16 @@ class ImagingPath(MatrixGroup):
"""
displayRange = self.largestDiameter
- if displayRange == float('+Inf') or displayRange <= 2 * self.objectHeight:
- displayRange = 2 * self.objectHeight
+ objHeight = abs(self.objectHeight)
+ if displayRange == float('+Inf') or displayRange <= 2 * objHeight:
+ di... |
BackdropNodeGadget : Fix GIL management for `frame()` method
`extend_container()` uses the Python API, so we can't release the GIL until after we call it. | @@ -134,9 +134,10 @@ GadgetPtr getEdgeGadget( StandardNodeGadget &g, StandardNodeGadget::Edge edge )
void frame( BackdropNodeGadget &b, object nodes )
{
- IECorePython::ScopedGILRelease gilRelease;
std::vector<Node *> n;
boost::python::container_utils::extend_container( n, nodes );
+
+ IECorePython::ScopedGILRelease gi... |
Note non-standard JSON grammar in tutorial
Closes | @@ -79,7 +79,10 @@ By the way, if you're curious what these terminals signify, they are roughly equ
Lark will accept this, if you really want to complicate your life :)
-(You can find the original definitions in [common.lark](/lark/grammars/common.lark).)
+You can find the original definitions in [common.lark](/lark/gr... |
Make HasField and ClearField use Text instead of str
This allows one to write `x.HasField("ok")` even if the file has
`from __future__ import unicode_literals`" | -from typing import Any, Sequence, Optional, Tuple
+from typing import Any, Sequence, Optional, Text, Tuple
from .descriptor import FieldDescriptor
@@ -21,8 +21,8 @@ class Message:
def SerializeToString(self) -> str: ...
def SerializePartialToString(self) -> str: ...
def ListFields(self) -> Sequence[Tuple[FieldDescript... |
DOC: update logarithm docs as per theory.
Made some changes addressing the discussions in Issue .
What this PR updates
Range of log functions in the Docs
Adds Additional Notes on the theoretical range outcomes. -pi | @@ -2011,7 +2011,7 @@ def add_newdoc(place, name, doc):
-----
Logarithm is a multivalued function: for each `x` there is an infinite
number of `z` such that `exp(z) = x`. The convention is to return the
- `z` whose imaginary part lies in `[-pi, pi]`.
+ `z` whose imaginary part lies in `(-pi, pi]`.
For real-valued input... |
Change scale TC fixture scope to "Class"
This is partial fix for
1. Change TC fixture scope to class, this is creating problem for other test executions
2. Planning to re-work on the entire TC to implement using kube jobs will have complete fix there. | @@ -13,7 +13,7 @@ from ocs_ci.framework.pytest_customization.marks import (
log = logging.getLogger(__name__)
-@pytest.fixture(scope='session')
+@pytest.fixture(scope='class')
def fioscale(request):
"""
FIO Scale fixture to create expected number of POD+PVC
|
Fixed bug where array annotations were copied when returning them
When only getting a part of the annotations and altering this, the user
might have the intention to alter the original object. | @@ -124,7 +124,7 @@ class DataObject(BaseNeo, pq.Quantity):
# if not possible, numpy raises an Error
for ann in self.array_annotations.keys():
# NO deepcopy, because someone might want to alter the actual object using this
- index_annotations[ann] = self.array_annotations[ann][index].copy()
+ index_annotations[ann] = s... |
[trivial] Fix mistaken variable rename
In the leading 'u' was
removed from the variable name, resulting in the variable
being renamed by mistake.
This patch corrects it.
Related-Bug: rhbz#1920293 | @@ -136,7 +136,7 @@ outputs:
upgrade_leapp_debug: {get_param: UpgradeLeappDebug}
upgrade_leapp_devel_skip: {get_param: UpgradeLeappDevelSkip}
upgrade_leapp_command_options: {get_param: UpgradeLeappCommandOptions}
- pgrade_leapp_reboot_timeout: {get_param: UpgradeLeappRebootTimeout}
+ upgrade_leapp_reboot_timeout: {get_... |
MAINT: Remove unnecessary list creation
`filter_types` isn't used anywhere else. List creation may already be optimized out, but it's a little more readable, at least. | @@ -5238,13 +5238,12 @@ def iircomb(w0, Q, ftype='notch', fs=2.0):
# Check for invalid cutoff frequency or filter type
ftype = ftype.lower()
- filter_types = ['notch', 'peak']
if not 0 < w0 < fs / 2:
raise ValueError("w0 must be between 0 and {}"
" (nyquist), but given {}.".format(fs / 2, w0))
if np.round(fs % w0) != 0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.