message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
Removing extra iter around items
Removing extra iter around items | @@ -2562,7 +2562,7 @@ def _hw_data(osdata):
'productname': 'hw.product',
'serialnumber': 'hw.serialno',
'uuid': 'hw.uuid'}
- for key, oid in iter(hwdata.items()):
+ for key, oid in hwdata.items():
value = __salt__['cmd.run']('{0} -n {1}'.format(sysctl, oid))
if not value.endswith(' value is not available'):
grains[key]... |
[IMPR] Fix html2unicode
Fix ignoring of convertIllegalHtmlEntities. Previously, ignoring any
entity inside range(128, 160) would work.
Do not attempt to resolve protected entites (note that this didn't
work when '&' was protected different way).
Add a lot of tests. | @@ -5535,7 +5535,7 @@ def html2unicode(text, ignore=None):
# This regular expression will match any decimal and hexadecimal entity and
# also entities that might be named entities.
entityR = re.compile(
- r'&(?:amp;)?(#(?P<decimal>\d+)|#x(?P<hex>[0-9a-fA-F]+)|(?P<name>[A-Za-z]+));')
+ r'&(#(?P<decimal>\d+)|#x(?P<hex>[0... |
Update OledSsd1306.py
Updated to be able to test on virtualArduinio | +# config
+port = "COM3"
+# Code to be able to use this script with virtalArduino
+if ('virtual' in globals() and virtual):
+ virtualArduino = Runtime.start("virtualArduino", "VirtualArduino")
+ virtualArduino.connect(port)
+#
# Initiate the Arduino
-arduino = Runtime.createAndStart("Arduino","Arduino")
-arduino.connec... |
abc.GuildChannel.set_permissions can raise NotFound.
Fix | @@ -549,6 +549,8 @@ class GuildChannel:
You do not have permissions to edit channel specific permissions.
HTTPException
Editing channel specific permissions failed.
+ NotFound
+ The role or member being edited is not part of the guild.
InvalidArgument
The overwrite parameter invalid or the target type was not
:class:`R... |
confirm_dialog: Fix loading spinner in confirm button in night mode.
We change the color of loading indicator to black only if we are not
using night mode, and in night mode indicator remains white. | @@ -5,6 +5,7 @@ import render_confirm_dialog_heading from "../templates/confirm_dialog_heading.h
import * as blueslip from "./blueslip";
import * as overlays from "./overlays";
+import * as settings_data from "./settings_data";
/*
Look for confirm_dialog in settings_user_groups
@@ -45,12 +46,14 @@ export function show_... |
Fix not exist MO in Report Pending Links
HG--
branch : feature/microservices | @@ -88,7 +88,10 @@ class ReportPendingLinks(object):
"remote_id": discovery["problems"]["lldp"][iface]}}
if "Pending link:" in discovery["problems"]["lldp"][iface]:
pend_str = rg.match(discovery["problems"]["lldp"][iface])
+ try:
rmo = ManagedObject.objects.get(name=pend_str.group("remote_mo"))
+ except ManagedObject.D... |
Update README.md
comma | @@ -26,7 +26,7 @@ MPF is written in Python 3. It is compatible with Windows, Mac, and Linux using
MPF is MIT-licensed, developed by fun people, and supported by a vibrant pinball-loving community. It is a work in progress we are actively developing. We review commits weekly.
-See also the [MPF Media Controller](https:/... |
windows.cmake fixes:
on UWP, always set /INCREMENTAL:NO as the cmake default
is YES, which clashes with other UWP linker options
make stack size configurable via cmake option | # fips cmake settings file for Windows platform with MSVC.
#-------------------------------------------------------------------------------
+set(FIPS_WINDOWS_STACK_SIZE 4194304 CACHE STRING "Windows process stack size (/STACK:xxx)")
+
# detect 32-bit or 64-bit target platform
if (CMAKE_CL_64)
set(FIPS_PLATFORM WIN64)
@... |
m1n1.constructutils: Add a global struct address tracer
Currently unconditional, kind of hacky. Good for HV use. | @@ -304,6 +304,7 @@ class ConstructClassBase(Reloadable, metaclass=ReloadableConstructMeta):
self._apply(obj)
+ g_struct_trace.add((self._addr, f"{cls.name} (end: {self._addr + size:#x})"))
return self
@classmethod
@@ -398,6 +399,23 @@ class ConstructClass(ConstructClassBase, Container):
if addr is not None:
setattr(ob... |
Suppressed error in filelock stubs
Added a # type: ignore comment to the `timeout` property setter in filelock to suppress errors about type mismatch between setter and getter. | @@ -23,7 +23,7 @@ class BaseFileLock:
@property
def timeout(self) -> float: ...
@timeout.setter
- def timeout(self, value: Union[int, str, float]) -> None: ...
+ def timeout(self, value: Union[int, str, float]) -> None: ... # type: ignore
@property
def is_locked(self) -> bool: ...
def acquire(self, timeout: Optional[fl... |
Accept InputFile/InputFileBig on .upload_file for
Now an input file thumbnail can also be specified, instead
needing to reupload the file every time. | @@ -624,6 +624,9 @@ class TelegramBareClient:
part_size_kb = get_appropriated_part_size(file_size)
file_name = os.path.basename(file_path)
"""
+ if isinstance(file, (InputFile, InputFileBig)):
+ return file # Already uploaded
+
if isinstance(file, str):
file_size = os.path.getsize(file)
elif isinstance(file, bytes):
|
Update docs/modeling/example-fitting-model-sets.rst
Update docs/modeling/example-fitting-model-sets.rst | @@ -8,7 +8,7 @@ But getting the data into the right shape can be a bit tricky.
The time savings could be worth the effort. In the example below, if we change
the width*height of the data cube to 500*500 it takes 140 ms on a 2015 MacBook Pro
to fit the models using model sets. Doing the same fit by looping over the 500*... |
Fix for session shenanigans with WebsocketDemultiplexer
* Fix for session shenanigans with WebsocketDemultiplexer
Session data was getting lost in the demux due to the session getting
saved after only the first connect/disconnect consumer was run.
* fix for flake8
* flake8 again
flake8 again | @@ -42,7 +42,13 @@ def channel_session(func):
def inner(message, *args, **kwargs):
# Make sure there's NOT a channel_session already
if hasattr(message, "channel_session"):
+ try:
return func(message, *args, **kwargs)
+ finally:
+ # Persist session if needed
+ if message.channel_session.modified:
+ message.channel_sess... |
Fix policy for DNS section
All parameters under DNS section have update policy UNSUPPORTED, hence also the parent section should be UNSUPPORTED. | @@ -1197,7 +1197,7 @@ class SlurmSettingsSchema(BaseSchema):
"""Represent the schema of the Scheduling Settings."""
scaledown_idletime = fields.Int(metadata={"update_policy": UpdatePolicy.COMPUTE_FLEET_STOP})
- dns = fields.Nested(DnsSchema, metadata={"update_policy": UpdatePolicy.COMPUTE_FLEET_STOP})
+ dns = fields.Ne... |
Update install.rst
Correcting typo Postge -> Postgre | @@ -9,7 +9,7 @@ The Data Cube is a set of python code with dependencies including:
* Python 3.5+ (3.6 recommended)
* GDAL
-* PostgeSQL database
+* PostgreSQL database
These dependencies along with the target operating system environment should be considered when deciding how to install Data Cube to meet your system req... |
setup.py: fix installation
fix all remaining issues of | @@ -46,7 +46,7 @@ recursively_include(package_data, 'pythonforandroid/recipes',
recursively_include(package_data, 'pythonforandroid/bootstraps',
['*.properties', '*.xml', '*.java', '*.tmpl', '*.txt', '*.png',
'*.mk', '*.c', '*.h', '*.py', '*.sh', '*.jpg', '*.aidl',
- '*.gradle', ])
+ '*.gradle', '.gitkeep', 'gradlew*',... |
[travis] add all dependencies
to make all unit tests run, and none skipped (hopefully), add a list of
dependencies | @@ -10,6 +10,15 @@ before_install:
install:
- pip install -U coverage==4.3 pytest pytest-mock
- pip install codeclimate-test-reporter
+ - pip install i3-py Pillow Babel DateTime python-dateutil
+ - pip install dbus-python docker feedparser i3ipc
+ - pip install libvirt-python math-utils
+ - pip install multiprocessing ... |
Document single-read rescue
See | @@ -185,7 +185,7 @@ Paired-end read name check
When reading paired-end files, Cutadapt checks whether the read names match.
Only the part of the read name before the first space is considered. If the
-read name ends with ``/1`` or ``/2``, then that is also ignored. For example,
+read name ends with ``1`` or ``2``, then... |
Remove instructions to push to ross repository
Core developers should push to their own fork as well. | @@ -132,18 +132,4 @@ The following blog posts have some good information on how to write commit messa
Step 5: Push changes to the main repo
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-For contributors
-++++++++++++++++
To create a Pull Request (PR), refer to `the github PR guide <https://help.github.com/articles/about-pul... |
Change websocket ping thread closing to be more responsive
Use threading.Event to close the thread more easily | @@ -123,7 +123,7 @@ class BitSharesWebsocket(Events):
self.user = user
self.password = password
self.keep_alive = keep_alive
- self.running = True
+ self.run_event = threading.Event()
if isinstance(urls, cycle):
self.urls = urls
elif isinstance(urls, list):
@@ -197,19 +197,17 @@ class BitSharesWebsocket(Events):
self._... |
llvm, state: Export params and context structures and initializers
Forward both form the underlying function. States don't add anything
extra. | @@ -2023,6 +2023,18 @@ class State_Base(State):
def _assign_default_state_name(self, context=None):
return False
+ def get_param_struct_type(self):
+ return self.function_object.get_param_struct_type()
+
+ def get_param_initializer(self):
+ return self.function_object.get_param_initializer()
+
+ def get_context_struct_... |
Update basic-skill.md
* Update basic-skill.md
Small wording changes
* Update docs/tutorials/basic-skill.md | # Creating a Basic Skill
-We will create a basic skill that makes opsdroid answer the text "how are you". This skill will be very similar to the [hello skill](../extending/skills.md#hello-world) found in the documentation.
-The video tutorial for creating your own skill is also available [here](https://www.youtube.com/... |
[DOCS] Add a Spark DataFrame example
* Update explore_expectations_in_a_notebook.rst
Add a Spark DataFrame example. This brings visibility to the SparkDFDataset API.
As a Spark user, I assumed that it was necessary to configure data context to connect to a Spark DataFrame, but I realized after that `SparkDFDataset` API... | @@ -51,7 +51,9 @@ All of these steps take place within your notebook:
If you wish to load data from somewhere else (e.g. from a SQL database or blob store), please fetch a copy of the data locally. Alternatively, you can :ref:`configure a Data Context with Datasources <tutorials__getting_started__connect_to_data>`, whi... |
Increase timeout for terraform commands
Fixes: | @@ -30,7 +30,7 @@ class Terraform(object):
cmd = f"terraform init -upgrade {self.path}"
else:
cmd = f"terraform init {self.path}"
- run_cmd(cmd)
+ run_cmd(cmd, timeout=1200)
def apply(self, tfvars, bootstrap_complete=False):
"""
@@ -45,7 +45,7 @@ class Terraform(object):
cmd = f"terraform apply '-var-file={tfvars}' -au... |
Adds DataSet.rename_outcome_labels(...)
A convenience method for cases when outcome labels in old datasets
need to be updated (e.g. from 'up' & 'down' to '0' and '1') | @@ -1838,3 +1838,35 @@ class DataSet(object):
self.cnt_cache = None
if bOpen: f.close()
+
+ def rename_outcome_labels(self, old_to_new_dict):
+ """
+ Replaces existing output labels with new ones as per `old_to_new_dict`.
+
+ Parameters
+ ----------
+ old_to_new_dict : dict
+ A mapping from old/existing outcome labels ... |
documentation: add optional total width arguments to formatting funcs
TN: | @@ -705,27 +705,32 @@ def _render(ctx, entity, **kwargs):
return text
-def get_available_width(indent_level):
+def get_available_width(indent_level, width=None):
"""
Return the number of available columns on source code lines.
- :param indent_level: Identation level of the source code lines.
+ :param int indent_level: ... |
[modules/vpn] Add tk requirement to documentation
fixes | a VPN connection using that profile.
Prerequisites:
+ * tk python library (usually python-tk or python3-tk, depending on your distribution)
* nmcli needs to be installed and configured properly.
To quickly test, whether nmcli is working correctly, type "nmcli -g NAME,TYPE,DEVICE con" which
lists all the connection prof... |
MAINT: doc: Refer to _rational_tests.c.src in the user-defined types section.
Also removed a few sentence written in the first person that express
opinions about the code. | @@ -217,14 +217,13 @@ type will behave much like a regular data-type except ufuncs must have
1-d loops registered to handle it separately. Also checking for
whether or not other data-types can be cast "safely" to and from this
new type or not will always return "can cast" unless you also register
-which types your new ... |
help_docs: Update instructions for change stream color.
Updates instructions for changing a stream's color so that
there are no missing or incorrect steps. | Zulip assigns each of your streams a color when you subscribe to the
stream. Changing a stream's color does not change it for anyone else.
-### Change the color of a stream
+## Change the color of a stream
{start_tabs}
{!stream-actions.md!}
-1. Pick a color from the grid, or select **Change color**.
+1. Click **Change ... |
Temporarily remove `ezancestry` test with Python 3.10
See | @@ -121,7 +121,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
- python-version: ['3.7', '3.8', '3.9', '3.10']
+ python-version: ['3.7', '3.8', '3.9']
steps:
- uses: actions/checkout@v2
|
Generators play nice with assignment now
Also, fixed an issue with dereferencing generators | @@ -107,6 +107,12 @@ class Generator:
self.__next__()
return self.generated[position]
+ def __setitem__(self, position, value):
+ if position >= len(self.generated):
+ temp = self.__getitem__(position)
+ self.generated[position] = value
+
+
def __len__(self):
return len(self._dereference())
def __next__(self):
@@ -140,... |
pytest: drop test against py <3.8
since the bump to ansible-core 2.12, we have to drop
testing against py36 and py37 given that ansible 2.12 requires python
>=3.8 | @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
- python-version: [3.6, 3.7, 3.8]
+ python-version: [3.8, 3.9]
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
|
core: don't restart on SIGHUP
("Respond to SIGHUP") adds a restart handler for SIGHUP, but
that doesn't really make sense. SIGHUP means the session has died, so
there's no use in restarting.
This breaks stuff like:
loginctrl terminate-session $XDG_SESSION_ID
Instead, let's just gracefully stop qtile.
Fixes | @@ -236,7 +236,7 @@ class Qtile(CommandObject):
async with LoopContext({
signal.SIGTERM: self.stop,
signal.SIGINT: self.stop,
- signal.SIGHUP: self.restart,
+ signal.SIGHUP: self.stop,
}), ipc.Server(
self._prepare_socket_path(self.socket_path),
self.server.call,
|
Uninstall python-openssl in chromium/base.
Otherwise we get an exception when running pip. | @@ -40,6 +40,7 @@ RUN apt-get update && \
xvfb && \
# 16.04's pyOpenSSL (installed by install-build-deps.sh) is too old for
# Google Cloud SDK.
+ sudo apt-get remove -y python-openssl && \
sudo pip install pyOpenSSL==19.0.0
# Needed for older versions of Chrome.
|
Hotfix for `poetry_requirements` not being recognized as a macro in build files
Added `poetry_requirements` in `register.py` to recognize it in build files.
[ci skip-rust] | @@ -19,6 +19,7 @@ from pants.backend.python.goals import (
)
from pants.backend.python.macros.pants_requirement import PantsRequirement
from pants.backend.python.macros.pipenv_requirements import PipenvRequirements
+from pants.backend.python.macros.poetry_requirements import PoetryRequirements
from pants.backend.python... |
Minor fix in Gym environment
added call to env.close() inside stop method.
surrounded with try catch, in order to avoid possible errors due to
gym inconsistency and bugs | @@ -81,7 +81,9 @@ class Gym(Environment):
self.env.render(mode=mode)
def stop(self):
- #self.env.close()
+ try:
+ self.env.close()
+ except:
pass
@staticmethod
|
fix(packaging): fix import error while installing
Previously an import error stating that typing-extensions is not installed
could occur while installing the Lona package | +try:
from .exceptions import * # NOQA: F403
from .routing import MATCH_ALL, Route
from .errors import * # NOQA: F403
from .view import LonaView
from .app import LonaApp
+except ImportError as e:
+ # this can happen while installing the package and can be ignored
+ if e.name != 'typing_extensions':
+ raise
+
VERSION = ... |
Updating FrugalScore metric card
* Updating FrugalScore metric card
removing duplicate paragraph
* Update README.md
added the acronym description
* Update README.md | ## Metric Description
-FrugalScore is a reference-based metric for NLG models evaluation. It is based on a distillation approach that allows to learn a fixed, low cost version of any expensive NLG metric, while retaining most of its original performance.
-
-The FrugalScore models are obtained by continuing the pretrain... |
Enable pool_pre_ping in the sqlalchemy connection engine
This makes the connection not die due to being idle for too long FeelsGoodMan | @@ -38,7 +38,7 @@ def check_connection(dbapi_con, con_record, con_proxy):
class DBManager:
def init(url):
- DBManager.engine = create_engine(url)
+ DBManager.engine = create_engine(url, pool_pre_ping=True)
DBManager.Session = sessionmaker(bind=DBManager.engine, autoflush=False)
DBManager.ScopedSession = scoped_session(... |
request: method: use simple string instead of lona._types.Symbol
This is part of an patch series to get rid of an non standard Enum
implementation. | -from lona._types import Symbol
-
-
class Request:
def __init__(self, view_runtime, connection):
self._view_runtime = view_runtime
@@ -16,7 +13,7 @@ class Request:
self.GET = {}
self.POST = {}
- self.method = Symbol('POST' if self.POST else 'GET')
+ self.method = 'POST' if self.POST else 'GET'
@property
def user(self):... |
Change field disk on Host API.
The field was renamed to disks and now return all disks(active and
inactive), with export_id too. | @@ -12,7 +12,7 @@ class HostSerializer(serializers.ModelSerializer):
env_name = serializers.SerializerMethodField('get_env_name')
region_name = serializers.SerializerMethodField('get_region_name')
offering = serializers.SerializerMethodField('get_offering')
- disk = serializers.SerializerMethodField('get_disk')
+ disks... |
Update hc.front.views.cron_preview to catch CronSimError explicitly
With a catch-all "except:" rule, we would swallow any unexpected
exceptions (ValueError, etc.) in cronsim. But we want to know
about them. cron_preview is a place where we can afford to crash, and generate a crash report. | @@ -7,7 +7,7 @@ from secrets import token_urlsafe
from urllib.parse import urlencode
from cron_descriptor import ExpressionDescriptor
-from cronsim import CronSim
+from cronsim.cronsim import CronSim, CronSimError
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.decorators i... |
Rename resources to paths
We name the parameter paths in all other calls | @@ -47,7 +47,7 @@ def create_translation(request):
ignore_warnings = form.cleaned_data["ignore_warnings"]
approve = form.cleaned_data["approve"]
force_suggestions = form.cleaned_data["force_suggestions"]
- resources = form.cleaned_data["paths"]
+ paths = form.cleaned_data["paths"]
project = entity.resource.project
@@ -... |
message_edit: Focus on dropdown-widget if only changing stream is allowed.
Previously, content box was focused inspite of it being disabled in case
when only stream editing was allowed. Now we instead focus on the stream
down. | @@ -599,6 +599,8 @@ function edit_message($row, raw_content) {
$message_edit_topic.trigger("focus");
} else if (editability === editability_types.TOPIC_ONLY) {
$row.find(".message_edit_topic").trigger("focus");
+ } else if (editability !== editability_types.FULL && is_stream_editable) {
+ $row.find(".select_stream_sett... |
Upgrade to Node 12
New dependencies no longer support Node 10. | @@ -5,7 +5,8 @@ WORKDIR /usr/src/app
ENV APP_NAME respa
-RUN apt-get update && apt-get install -y gdal-bin postgresql-client gettext npm
+RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
+RUN apt-get update && apt-get install -y gdal-bin postgresql-client gettext nodejs
COPY requirements.txt .
@@ -15,7 +16,7... |
Update the year in the LICENSE
The current LICENSE contains copyright with the year 2016, so I propose to update the year to 2017. | The MIT License (MIT)
-Copyright (c) 2015-2016 LBRY Inc
+Copyright (c) 2015-2017 LBRY Inc
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including without limitation the right... |
ensure default blinder source 'INTERMISSION' shows a SMTPE signal
Also removed SMTPE from the automatic generated test sources so that
'INTERMISSION' is the only test source that uses SMPTE (except you
configure it otherwise= | @@ -8,7 +8,7 @@ from configparser import SafeConfigParser
from lib.args import Args
from vocto.transitions import Composites, Transitions
-testPatternCount = -1
+testPatternCount = 0
GST_TYPE_VIDEO_TEST_SRC_PATTERN = [
"smpte",
@@ -92,8 +92,15 @@ class VocConfigParser(SafeConfigParser):
return self.get('source.{}'.form... |
features: Make more responsive.
This fixes some responsiveness issues with the features page where the
text for headers would go off the screen on mobile and narrower devices. | @@ -421,7 +421,7 @@ nav ul li.active::after {
}
.portico-landing.features-app section.hero .copy {
- width: 800px;
+ max-width: 800px;
margin: 0 auto;
text-align: center;
@@ -436,7 +436,7 @@ nav ul li.active::after {
font-size: 1.8em;
margin: 30px auto 0 auto;
- width: 600px;
+ max-width: 600px;
line-height: 1.3;
}
@@ ... |
Fix after Code Review
Some comments adjusted, additional assertions added. | @@ -1498,9 +1498,8 @@ class TestMembershipCreateRollOver(TestBase):
def test_membership_rollover_negative_remaining_values(self):
"""If current membership has used more seats/workshops than allowed, and
- therefore its remaining values are negative, the roll-over form should
- have max values for rolled-over fields set... |
Document retry of exceptions while streaming 'read'/'execute_sql' results.
See: | @@ -64,9 +64,24 @@ fails if the result set is too large,
.. note::
- If streaming a chunk fails due to a "resumable" error,
- :meth:`Session.read` retries the ``StreamingRead`` API reqeust,
- passing the ``resume_token`` from the last partial result streamed.
+ If streaming a chunk raises an exception, the application ... |
NEW: auto correct preview size if previews of configured size won't fit onto screen
If used will output a warning message like:
'Resizing previews so that they fit onto screen to WxH' | @@ -5,7 +5,7 @@ import math
import os
from configparser import NoOptionError
-from gi.repository import Gtk, GObject
+from gi.repository import Gtk, Gdk, GObject
from lib.videodisplay import VideoDisplay
import lib.connection as Connection
@@ -31,6 +31,21 @@ class VideoPreviewsController(object):
accelerators = Gtk.Acc... |
Pass in the correct output_dir to trainer_class.
Sometimes the output_dir needs to be formatted according to the env_name, the
work id, especially in sweeps.
This possibly got messup somewhere along the way. | @@ -201,7 +201,7 @@ def train_rl(
logging.info("Starting the training loop.")
trainer = trainer_class(
- output_dir=FLAGS.output_dir,
+ output_dir=output_dir,
train_env=train_env,
eval_env=eval_env,
)
|
sync.rsync: rsync_syncer: fix usersync handling
Fixes | @@ -56,18 +56,18 @@ class rsync_syncer(base.ExternalSyncer):
return proto[0], f"rsync:{proto[1]}"
pkgcore_config_type = ConfigHint({
- 'basedir': 'str', 'uri': 'str', 'conn_timeout': 'str',
+ 'basedir': 'str', 'uri': 'str', 'conn_timeout': 'str', 'usersync': 'bool',
'compress': 'bool', 'excludes': 'list', 'includes': '... |
Fix flow_extract_info() to return correct pon, onu and uni ids
This was also the root cause for auth failure after onu disable/re-enable. | @@ -174,8 +174,8 @@ class OpenOltPlatform(object):
if uni_port_no is None:
raise ValueError
- pon_intf = self.platform.intf_id_from_uni_port_num(uni_port_no)
- onu_id = self.platform.onu_id_from_uni_port_num(uni_port_no)
- uni_id = self.platform.uni_id_from_port_num(uni_port_no)
+ pon_intf = self.intf_id_from_uni_port_... |
Swapped Lambda for itemgetter
For the sake of code style and consistency, the lambda has been swapped with operator.itemgetter | import logging
from datetime import datetime
+from operator import itemgetter
from discord import Colour, Embed, Member, utils
from discord.ext.commands import Bot, Cog, Context, command
@@ -79,7 +80,7 @@ class Free(Cog):
# Sort channels in descending order by seconds
# Get position in list, inactivity, and channel obj... |
Function_Base: Reuse the PRNG type when crating a copy using new seed
The default is still Seeded(np.random.RandomState) | @@ -355,8 +355,10 @@ def _random_state_getter(self, owning_component, context):
assert seed_value != [DEFAULT_SEED], "Invalid seed for {} in context: {} ({})".format(owning_component, context.execution_id, seed_param)
current_state = self.values.get(context.execution_id, None)
- if current_state is None or current_stat... |
Correct a typo in the sessions.rst
typo | @@ -22,7 +22,7 @@ To use the middleware, wrap it around the appropriate level of consumer
in your ``routing.py``::
from channels.routing import ProtocolTypeRouter, URLRouter
- from channels.session import SessionMiddlewareStack
+ from channels.sessions import SessionMiddlewareStack
from myapp import consumers
|
Helpful tostring() for multiple values.
Useful in the new dumb repl. | @@ -62,8 +62,8 @@ class Values(W_ProtoObject):
return vals[0].tostring()
if len(vals) == 0:
return "(values)"
- else: #fixme
- return "MULTIPLE VALUES"
+ else: # This shouldn't be called in real code
+ return "\n".join([v.tostring() for v in vals])
class W_Cell(W_Object): # not the same as Racket's box
|
use evaluable methods where available
This patch function-wraps evaluables where available, such as subtract and
divide, rather than repeating the logic found in the evaluable module. | @@ -1220,7 +1220,7 @@ def subtract(__left: IntoArray, __right: IntoArray) -> Array:
:class:`Array`
'''
- return add(__left, negative(__right))
+ return _Wrapper.broadcasted_arrays(evaluable.subtract, __left, __right)
@implements(numpy.positive)
@@ -1252,7 +1252,7 @@ def negative(__arg: IntoArray) -> Array:
:class:`Arra... |
Add support for on update/delete clause in inline FK.
Refs | @@ -221,11 +221,16 @@ class SchemaMigrator(object):
return ctx
def add_inline_fk_sql(self, ctx, field):
- return (ctx
+ ctx = (ctx
.literal(' REFERENCES ')
.sql(Entity(field.rel_model._meta.table_name))
.literal(' ')
.sql(EnclosedNodeList((Entity(field.rel_field.column_name),))))
+ if field.on_delete is not None:
+ ctx... |
Comment out unused Fluent Bit config
The metrics server is disabled, so we don't need to configure it. | @@ -2722,8 +2722,8 @@ package:
# ===========
# Enable/Disable the built-in HTTP Server for metrics
HTTP_Server Off
- HTTP_Listen 0.0.0.0
- HTTP_Port 62020
+ #HTTP_Listen 0.0.0.0
+ #HTTP_Port 62020
[INPUT]
Name systemd
Tag host.*
|
Added another image
Image added of woman hit with rubber bullet. | @@ -59,6 +59,7 @@ A woman who says she was simply walking home with groceries was shot in the face
**Links**
* https://mobile.twitter.com/KevinRKrause/status/1266898396339675137
+* https://i.redd.it/ns0uj557x0251.jpg
### Police use flashbangs and tear gas on protestors | May 31st
|
[StatsWidget] fix issue when fail to import OpenGL
Management of lazy import if OpenGL is not installed.
closes | @@ -350,6 +350,12 @@ class _StatsWidgetBase(object):
:param Union[PlotWidget,SceneWidget,None] plot:
The plot containing the items on which statistics are applied
"""
+ try:
+ import OpenGL
+ except ImportError:
+ has_opengl = False
+ else:
+ has_opengl = True
from ..plot3d.SceneWidget import SceneWidget # Lazy import
... |
auto_properties_dsl.py: work around a circular dependency issue
TN: | @@ -9,8 +9,6 @@ import docutils.parsers.rst
from docutils.statemachine import StringList
from sphinx.util.docstrings import prepare_docstring
-from langkit.expressions import AbstractExpression
-
class AutoPropertiesDSL(docutils.parsers.rst.Directive):
"""
@@ -71,6 +69,16 @@ class AutoPropertiesDSL(docutils.parsers.rst... |
Travis: Reverting to autodocs deployment on `gcc-5` builder
Also disabling autodocs for YASK backend, as it is not available on that
builder. | @@ -92,5 +92,5 @@ script:
# Docs generation and deployment
- sphinx-apidoc -f -o docs/ examples
- - sphinx-apidoc -f -o docs/ devito
- - if [[ $DEVITO_BACKEND == 'yask' ]]; then ./docs/deploy.sh; fi
+ - sphinx-apidoc -f -o docs/ devito devito/yask/*
+ - if [[ $DEVITO_ARCH == 'gcc-5' ]]; then ./docs/deploy.sh; fi
|
langkit.expression.base: avoid the confusion on Any
Modules in the langkit.expression package have to deal with both
langkit.expression.logic.Any and typing.Any. Import the latter as _Any
to avoid the confusion.
TN: | @@ -4,8 +4,8 @@ from contextlib import contextmanager
from functools import partial
import inspect
from itertools import count
-from typing import (Any, Callable, Dict, List, Optional as Opt, Set, Tuple,
- Union)
+from typing import (Any as _Any, Callable, Dict, List, Optional as Opt, Set,
+ Tuple, Union)
from enum imp... |
Add type hint for cuda.set_rng_state
Summary:
Fixes
Pull Request resolved: | @@ -40,3 +40,5 @@ def max_memory_cached(device: Optional[_device_t]=...) -> int: ...
def reset_max_memory_cached(device: Optional[_device_t]=...) -> None: ...
def cudart() -> ctypes.CDLL: ...
def find_cuda_windows_lib() -> Optional[ctypes.CDLL]: ...
+def set_rng_state(new_state): ...
+def get_rng_state(): ...
|
Eagerly set mode when changing partition sets
Summary: Tiny nit
Test Plan: Run tests
Reviewers: dish | @@ -72,6 +72,7 @@ export const ConfigEditorConfigPicker: React.FC<ConfigEditorConfigPickerProps> =
const onSelectPartitionSet = (partitionSet: PartitionSet) => {
onSaveSession({
+ mode: partitionSet.mode,
base: {
partitionsSetName: partitionSet.name,
partitionName: null,
|
Update avemaria.txt
Cleaning ```nvpn.so``` VPN nodes. IP:port is currently in ```remcos``` trail. | @@ -553,10 +553,6 @@ info1.dynu.net
193.161.193.99:27522
server12511.sytes.net
-# Reference: https://app.any.run/tasks/f8d3ae21-bb4f-4d17-8559-b83b602d36a9/
-
-u868328.nvpn.so
-
# Reference: https://twitter.com/JAMESWT_MHT/status/1238208398069465088
# Reference: https://app.any.run/tasks/552ebaee-410b-4928-bcb2-7d65f76... |
Kill TH(C)Blas kwarg_only declarations.
Summary:
Pull Request resolved:
Since we don't generate these as end-user bindings, and we no longer reorder based on this property, we can just get rid of the property.
Test Plan: Imported from OSS | - THTensor* mat2
- arg: real beta
default: AS_REAL(1)
- kwarg_only: True
- arg: real alpha
default: AS_REAL(1)
- kwarg_only: True
]]
[[
name: _th_addmm_
- THTensor* mat2
- arg: real beta
default: AS_REAL(1)
- kwarg_only: True
- arg: real alpha
default: AS_REAL(1)
- kwarg_only: True
]]
[[
name: _th_addmv
- THTensor* vec... |
TST: added broadcasting unit test
Added a unit test for new behaviour. | @@ -109,7 +109,7 @@ class TestLonSLT():
assert (abs(self.py_inst['slt'] - self.py_inst['slt2'])).max() < 1.0e-6
def test_bad_lon_name_calc_solar_local_time(self):
- """Test calc_solar_local_time with a bad longitude name"""
+ """Test calc_solar_local_time with a bad longitude name."""
self.py_inst = pysat.Instrument(pl... |
Fix double loading of external plugins
`register_external_command` was receiving an instance of a class for each new external script. This lead to a double initialization when calling `gef.gdb.load(cls)`. Fixed by registering directly a class (just like `register_command`) | @@ -4554,9 +4554,8 @@ def register_external_context_pane(pane_name: str, display_pane_function: Callab
# Commands
#
-def register_external_command(obj: "GenericCommand") -> Type["GenericCommand"]:
+def register_external_command(cls: Type["GenericCommand"]) -> Type["GenericCommand"]:
"""Registering function for new GEF ... |
Make bga clearer.
Just moving a chunk of lines so that the process is more clear. | @@ -248,6 +248,14 @@ def boiler_generator_assn(eia_transformed_dfs,
'report_date'],
how='outer')
+ # Create a set of bga's that are linked, directly from bga8
+ bga_assn = bga_compiled_1[bga_compiled_1['boiler_id'].notnull()].copy()
+ bga_assn['bga_source'] = 'eia860_org'
+
+ # Create a set of bga's that were not linke... |
Temporary solution for having access to Python installation path.
* Temporary solution for having access to the root path for python installations until Caffe2/PyTorch figure out the best way to build.
* Update build.sh
Increasing the verbosity of HIP errors. | @@ -33,9 +33,10 @@ if [[ "$BUILD_ENVIRONMENT" == *rocm* ]]; then
git clone https://github.com/ROCm-Developer-Tools/pyHIPIFY.git
chmod a+x pyHIPIFY/*.py
sudo cp -p pyHIPIFY/*.py /opt/rocm/bin
+ sudo chown -R jenkins:jenkins /usr/local
rm -rf "$(dirname "${BASH_SOURCE[0]}")/../../../pytorch_amd/" || true
python "$(dirnam... |
Process all arguments before listing out the rules.
Without this, the list option was listing out the default rflint rules,
not the defaults set by CumulusCI or those set on the command line. | @@ -103,7 +103,8 @@ class RobotLint(BaseTask):
result = 0
if self.options["list"]:
- linter.run(["--list"])
+ args = self._get_args()
+ linter.run(args + ["--list"])
else:
files = self._get_files()
|
Update tileApp.py
Added log to description to make it more specific | @@ -38,9 +38,9 @@ def get_tileApp(files_found, report_folder, seeker):
data_list.append((datestamp, lat.lstrip(), longi.lstrip(), counter, head_tail[1]))
if len(data_list) > 0:
- description = 'Tile app recorded langitude and longitude coordinates.'
+ description = 'Tile app log recorded langitude and longitude coordin... |
Improve docker compose template
This patch sets proper DB collation and bump MySQL version to 5.7. | db:
- image: mysql:5.6
+ image: mysql:5.7
environment:
MYSQL_DATABASE: ralph_ng
MYSQL_ROOT_PASSWORD: ralph_ng
@@ -7,6 +7,7 @@ db:
MYSQL_PASSWORD: ralph_ng
volumes_from:
- data
+ command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
web:
build: ralph
@@ -35,7 +36,7 @@ nginx:
- web
data:
- ... |
mypy: Drop now-redundant `-i` option.
This used to be a synonym for `--incremental`. Since mypy 0.590,
incremental mode is the default, and the flag is ignored; so we
can happily drop it. | @@ -84,7 +84,7 @@ if not python_files and not pyi_files:
sys.exit(0)
extra_args = ["--follow-imports=silent",
- "-i", "--cache-dir=var/mypy-cache"]
+ "--cache-dir=var/mypy-cache"]
if args.linecoverage_report:
extra_args.append("--linecoverage-report")
extra_args.append("var/linecoverage-report")
|
fix: db ssl connection
ref:
[skip ci] | @@ -129,12 +129,11 @@ class MariaDBConnectionUtil:
conn_settings["local_infile"] = frappe.conf.local_infile
if frappe.conf.db_ssl_ca and frappe.conf.db_ssl_cert and frappe.conf.db_ssl_key:
- ssl_params = {
+ conn_settings["ssl"] = {
"ca": frappe.conf.db_ssl_ca,
"cert": frappe.conf.db_ssl_cert,
"key": frappe.conf.db_ssl... |
Avoid error sorting by relationships if related tables are not allowed
Refs | @@ -78,6 +78,7 @@ class IndexView(BaseView):
# We will be sorting by number of relationships, so populate that field
all_foreign_keys = await db.get_all_foreign_keys()
for table, foreign_keys in all_foreign_keys.items():
+ if table in tables.keys():
count = len(foreign_keys["incoming"] + foreign_keys["outgoing"])
table... |
moved refresh code out of container setter
when removing a child, its window will be None | @@ -42,8 +42,6 @@ class Widget:
child._impl.container = container
self.rehint()
- if self.interface.window and self.interface.window._impl.native.isVisible:
- self.interface.window.content.refresh()
def set_enabled(self, value):
self.native.enabled = self.interface.enabled
@@ -76,6 +74,7 @@ class Widget:
# if we don't ... |
Update data.json [ Repl.it -> Replit.com ]
Repl.it changed their domain and url to Replit.com.
"Repl.it/@" still works, but not for much longer. | "username_claimed": "blue",
"username_unclaimed": "noonewouldeverusethis7"
},
- "Repl.it": {
+ "Replit.com": {
"errorType": "status_code",
- "url": "https://repl.it/@{}",
- "urlMain": "https://repl.it/",
+ "url": "https://replit.com/@{}",
+ "urlMain": "https://replit.com/",
"username_claimed": "blue",
"username_unclaim... |
Integration test
integration testing only everything is working, not logic of PQ
use method
create slot attribute in constructor
corect class for test case
stop crawler in teardown method
use class
correct entity naming
python 2 adaptation
integration test with crawler and spider | @@ -2,12 +2,17 @@ import shutil
import tempfile
import unittest
+from twisted.internet import defer
+from twisted.trial.unittest import TestCase
+
from scrapy.crawler import Crawler
from scrapy.core.scheduler import Scheduler
from scrapy.http import Request
from scrapy.pqueues import _scheduler_slot_read, _scheduler_sl... |
Added translation and sound improvements
Added Shin chan - Aventuras en Cineland (Spain) [T-En by LeonarthCG]
Added Breath of Fire - Sound Restoration (Europe) [Hack by Bregalad]
Added Breath of Fire II - Sound Restoration (Europe) [Hack by Bregalad] | @@ -146,3 +146,21 @@ game (
rom ( name "Rhythm Tengoku (Japan).gba" size 16777216 crc baf7ffd2 md5 3c29922b367de3f58587a8f92d1280b7 sha1 e79563406966a66958b280c9b70cdc6c49c35f54 )
patch "https://www.romhacking.net/translations/1762/"
)
+game (
+ name "Shin chan - Aventuras en Cineland (Spain) [T-En by LeonarthCG]"
+ de... |
fix: Leaking color in bench --help
Since the character to render NC was cut off due to the char limit, the
whole list of following commands and descriptions would also turn
yellow. Let's keep it colourless in --help. Only, make it yellow when
the command is executed directly. | @@ -12,10 +12,9 @@ from frappe.exceptions import SiteNotSpecifiedError
from frappe.utils import update_progress_bar, cint
from frappe.coverage import CodeCoverage
-DATA_IMPORT_DEPRECATION = click.style(
+DATA_IMPORT_DEPRECATION = (
"[DEPRECATED] The `import-csv` command used 'Data Import Legacy' which has been deprecat... |
Now applying UTM correction to mesh
Now applying the UTM correction to each mesh rather than to
the point cloud data. | @@ -105,10 +105,13 @@ class pointCloudTextureMapper(object):
# Create a texture map image by finding the nearest point to a pixel and using
# its value to set the color.
- def texture_sample(self, img, mesh):
+ def texture_sample(self, img, mesh, utm_shift):
faces = mesh.faces()
- vertices = mesh.vertices()
+ vertices ... |
fix(get_czce_rank_table): 0.4.35: fix: get_czce_rank_table history-20071228 format
0.4.35: fix: get_czce_rank_table history-20071228 format | @@ -15,6 +15,7 @@ import warnings
from io import StringIO
import pandas as pd
+import requests
from bs4 import BeautifulSoup
from akshare.futures import cons
@@ -302,10 +303,12 @@ def get_czce_rank_table(date=None, vars_list=cons.contract_symbols):
return {}
if date <= datetime.date(2010, 8, 25):
url = cons.CZCE_VOL_RA... |
docs: installation: Add link to Quickstart after install
Once Flask is installed many users will want to proceed to the next section
in the docs (Quickstart). Add a link to the end of the Install section for
this. | @@ -142,6 +142,8 @@ update the code from the master branch:
pip install -U https://github.com/pallets/flask/archive/master.tar.gz
+Once you've installed Flask you can continue to :ref:`quickstart`.
+
.. _install-install-virtualenv:
Install virtualenv
|
Updating to just cancel update on first keyboard interrupt.
Instead of stopping grow, just stop asking to update and keep grow going.
Fixes | @@ -102,8 +102,11 @@ class Updater(object):
logging.info(' > Auto-updating to version: {}'.format(
colors.stylize(str(sem_latest), colors.HIGHLIGHT)))
else: # pragma: no cover
+ try:
choice = raw_input(
'Auto update now? [Y]es / [n]o / [a]lways: ').strip().lower()
+ except KeyboardInterrupt:
+ choice = 'n'
if choice no... |
Fix typo
NXF_SINGULARITY_CACHE -> NXF_SINGULARITY_CACHEDIR | @@ -86,10 +86,10 @@ For example, to launch the `viralrecon` pipeline:
docker run -itv `pwd`:`pwd` -w `pwd` nfcore/tools launch viralrecon -r 1.1.0
```
-If you use `$NXF_SINGULARITY_CACHE` for downloads, you'll also need to make this folder and environment variable available to the continer:
+If you use `$NXF_SINGULARIT... |
timings: add a wrapper to get a precise timestamp
HG--
branch : dev00 | @@ -106,6 +106,7 @@ The Following are the individual timing settings that can be adjusted:
"""
+import six
import time
import operator
from functools import wraps
@@ -274,6 +275,20 @@ class TimeoutError(RuntimeError):
pass
+#=========================================================================
+if six.PY3:
+ _clock... |
Drop workaround for CPython 3.9 (kiwi released)
See diofant/diofant#1071 | @@ -30,12 +30,7 @@ jobs:
fonts-freefont-otf latexmk lmodern
- name: Install dependencies
run: |
- if [ "${{ matrix.python-version }}" != "3.9" ]
- then
pip install -U .[interactive,develop,gmpy,exports,plot,docs]
- else
- pip install -U .[interactive,develop,gmpy,exports,docs]
- fi
- name: Linting with flake8, flake8-r... |
GUI: Run WISDEM support
Note where we can run WISDEM if OK is pressed. | @@ -390,7 +390,9 @@ class FormAndMenuWindow(QMainWindow):
msg.setInformativeText("Click cancel to back out and continue editing. Click OK to run WISDEM.")
msg.addButton(QMessageBox.Cancel)
msg.addButton(QMessageBox.Ok)
- msg.exec()
+ choice = msg.exec()
+ if choice == QMessageBox.Ok:
+ print("This is where we would run... |
Tweak and clarify MLP code:
- Change order of keyword arguments (visually cleaner, and matches order in
mlp_mnist.gin).
- Separate out and add comment to code that creates multiple hidden layers. | @@ -22,17 +22,22 @@ from __future__ import print_function
from trax import layers as tl
-def MLP(n_hidden_layers=2,
- d_hidden=512,
+def MLP(d_hidden=512,
+ n_hidden_layers=2,
activation_fn=tl.Relu,
n_output_classes=10,
mode='train'):
"""A multi-layer feedforward (perceptron) network."""
del mode
+ # Define a function ... |
Add a new section for using pyupdi as upload tool
Resolve // platformio/platform-atmelmegaavr#7 | @@ -25,6 +25,44 @@ incorrect upload flags. It's highly recommended to use the
:ref:`projectconf_upload_command` option that gives the full control over flags used
for uploading. Please read :ref:`atmelavr_upload_via_programmer` for more information.
+Upload using pyupdi
+^^^^^^^^^^^^^^^^^^^
+
+``pyupdi`` is a Python-ba... |
More consistency checks for dependencies
Closes | @@ -128,7 +128,28 @@ def check_versions():
assert not extra, f"Versions not in modules: {extra}"
+def _strip_dep_version(dependency):
+ dep_version_pos = len(dependency)
+ for pos, c in enumerate(dependency):
+ if c in "=<>":
+ dep_version_pos = pos
+ break
+ stripped = dependency[:dep_version_pos]
+ rest = dependency[... |
config/core: Update decription of execution order
Remove reference to "classic" execution order. | @@ -574,9 +574,7 @@ class RunConfiguration(Configuration):
``"by_spec"``
All iterations of the first spec are executed before moving on
- to the next spec. E.g. A1 A2 A3 B1 C1 C2 This may also be
- specified as ``"classic"``, as this was the way workloads were
- executed in earlier versions of WA.
+ to the next spec. E... |
Import T2T envs into PPO.
Add flags/code in PPO to support construction of ClientEnv. | @@ -49,12 +49,14 @@ import gin
import jax
from jax.config import config
import numpy as onp
+from tensor2tensor import envs # pylint: disable=unused-import
from tensor2tensor.envs import gym_env_problem
from tensor2tensor.envs import rendered_env_problem
from tensor2tensor.rl import gym_utils
+from tensor2tensor.rl.goo... |
fix - wrong icon used
Icon of provider from last configured site was used | @@ -1109,8 +1109,8 @@ class SyncServerModule(OpenPypeModule, ITrayModule):
return provider
sync_sett = self.sync_system_settings
- for site, detail in sync_sett.get("sites", {}).items():
- sites[site] = detail.get("provider")
+ for conf_site, detail in sync_sett.get("sites", {}).items():
+ sites[conf_site] = detail.get... |
alexfren/update_vsphere_docs
Link 8, was pointing to a broken link: this change points to | @@ -113,7 +113,7 @@ See our [blog post][11] on monitoring vSphere environments with Datadog.
[5]: https://docs.datadoghq.com/agent/guide/agent-commands/#start-stop-and-restart-the-agent
[6]: https://pubs.vmware.com/vsphere-51/index.jsp?topic=%2Fcom.vmware.powercli.cmdletref.doc%2FSet-CustomField.html
[7]: https://docs.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.