message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
fix of router hanging
break if no adjacent connections | @@ -284,7 +284,13 @@ class _GreedyRouter:
]
if len(candidate_swap_sets) == 1:
self.apply_swap(*candidate_swap_sets[0])
+
+ if list(
+ self.remaining_dag.findall_nodes_until_blocked(
+ self.acts_on_nonadjacent_qubits)):
return
+ else:
+ break
frontier_edges = sorted(time_slices[0].edges)
self.bring_farthest_pair_togethe... |
Clarified installation process for development
Included the words "install from source" and links to documentation on pip -e
and setuptool's "developer mode". | @@ -64,7 +64,7 @@ the structure of the code and of the repository.
https://github.com/plotly/plotly.py/issues/1965. If you have writing skills,
the wording of existing examples can also be improved in places.
-Contributing code or documentation are not the only way to contribute! You can
+Contributing code or documenta... |
Fix serialization bug
* In dataset base, remove __reduce_ex__ and override __getattr__.
``torchtext.Dataset.__getattr__`` is a generator. That doesn't
play well with pickle. Returning a generator (when appropriate)
seems to fix the issue without changing API. | @@ -50,16 +50,6 @@ class DatasetBase(Dataset):
the same structure as in the fields argument passed to the constructor.
"""
- def __getstate__(self):
- return self.__dict__
-
- def __setstate__(self, _d):
- self.__dict__.update(_d)
-
- def __reduce_ex__(self, proto):
- # This is a hack. Something is broken with torch pi... |
Update Bolivia installed capacity
Source unchanged. Added plants explicitly listed as biomass to both "unknown" and "biomass". Confirmed with IAEA PRIS that Bolivia has no nuclear power plants. | },
"BO": {
"capacity": {
- "hydro": 483.22,
- "unknown": 1344.55,
+ "biomass": 46.22,
+ "hydro": 734.84,
+ "nuclear": 0,
+ "solar": 115.07,
+ "unknown": 2273.22,
"wind": 27
},
"contributors": [
|
Fix complete indexing in bson serialization and remove <= 2^16 variable
restriction | @@ -23,8 +23,10 @@ from dimod.binary_quadratic_model import BinaryQuadraticModel
def bqm_bson_encoder(bqm):
"""todo"""
num_variables = len(bqm)
- if num_variables > 2**16:
- raise ValueError
+
+ index_dtype = np.uint32
+ if num_variables <= 2**16:
+ index_dtype = np.uint16
variable_order = sorted(bqm.linear)
num_possib... |
Update install.rst
Fix grammatical mistakes | @@ -15,7 +15,7 @@ Using Pipenv
Using AUR
---------
-*aiogram* is also available in Arch User Repository, so you can install this framework on any Arch-based distribution like ArchLinux, Antergos, Manjaro, etc. To do this, use your favorite AUR-helper and install `python-aiogram <https://aur.archlinux.org/packages/pytho... |
Fixed upload chunk retry
Fixed empty body when retried chunk upload | @@ -811,14 +811,13 @@ class HostedNeptuneBackend(Backend):
def _upload_loop(self, fun, data, progress_indicator, **kwargs):
ret = None
for part in data.generate():
- part_to_send = part.get_data()
- ret = with_api_exceptions_handler(self._upload_loop_chunk)(fun, part, part_to_send, data, **kwargs)
+ ret = with_api_exce... |
Add clarification to salt ssh docs about key auto-generation.
Fixes | @@ -64,7 +64,8 @@ Deploy ssh key for salt-ssh
===========================
By default, salt-ssh will generate key pairs for ssh, the default path will be
-/etc/salt/pki/master/ssh/salt-ssh.rsa
+``/etc/salt/pki/master/ssh/salt-ssh.rsa``. The key generation happens when you run
+``salt-ssh`` for the first time.
You can us... |
target: Force consistent logcat format
On some devices the default logcat format was inconsistent with what was
expected. This change explicitly sets the logcat format to be as
expected. | @@ -113,7 +113,7 @@ class AndroidAssistant(object):
if self.logcat_poller:
self.logcat_poller.write_log(outfile)
else:
- self.target.dump_logcat(outfile)
+ self.target.dump_logcat(outfile, logcat_format='threadtime')
def clear_logcat(self):
if self.logcat_poller:
@@ -226,7 +226,7 @@ class LogcatPoller(threading.Thread)... |
Fix Log Line for Vault Token Generation Debug Line
Fixes
This patch replaces an errant period with a comma to correctly log a
debug statement. | @@ -40,7 +40,7 @@ def generate_token(minion_id, signature, impersonated_by_master=False):
True. This happens when the master generates minion pillars.
'''
log.debug(
- 'Token generation request for %s (impersonated by master: %s)'.
+ 'Token generation request for %s (impersonated by master: %s)',
minion_id, impersonate... |
bootstrap: Patch bootstrap.js to support contenteditable.
If the lookup input is contenteditable, it should be searching for text
rather than input. | , lookup: function (event) {
var items
- this.query = this.$element.val()
+ this.query = this.$element.is("[contenteditable]") ? this.$element.text() : this.$element.val();
if (!this.options.helpOnEmptyStrings) {
if (!this.query || this.query.length < this.options.minLength) {
|
Avoid infinite loops with td with break-inside: avoid
Related to | @@ -2753,3 +2753,21 @@ def test_table_break_children_margin():
</table>
'''
assert len(render_pages(html)) == 3
+
+
+def test_table_td_break_inside_avoid():
+ # Test regression: https://github.com/Kozea/WeasyPrint/issues/1547
+ html = '''
+ <style>
+ @page { size: 4cm }
+ td { break-inside: avoid; line-height: 3cm }
+ ... |
PathListingWidget : Fix GIL management bug
This could trigger a hang when shift+clicking to expand a whole section of the HierarchyView. | @@ -927,6 +927,8 @@ void propagateExpandedWalk( QTreeView *treeView, PathModel *model, QModelIndex i
void propagateExpanded( uint64_t treeViewAddress, uint64_t modelIndexAddress, bool expanded, int numLevels )
{
+ IECorePython::ScopedGILRelease gilRelease;
+
QTreeView *treeView = reinterpret_cast<QTreeView *>( treeView... |
Update Readme
Indicate Pretrained model link | @@ -111,6 +111,10 @@ matplotlib # visualization
# Instructions
+Pretrained Model can be download from below link or Step3 section:
+
+ [http://bit.ly/result_mockingjay](http://bit.ly/result_mockingjay)
+
***Before you start, make sure all the packages required listed above are installed correctly***
### Step 0. Preproc... |
Gaffer startup : Remove compatibility for non-namespaced StringAlgo
We will be removing StringAlgo entirely. | import Gaffer
-for module in ( Gaffer.StringAlgo, Gaffer.MetadataAlgo, Gaffer.MonitorAlgo ) :
+for module in ( Gaffer.MetadataAlgo, Gaffer.MonitorAlgo ) :
for name in dir( module ) :
if not name.startswith( "__" ) :
setattr( Gaffer, name, getattr( module, name ) )
|
feat: API to fetch the latest backup available
Take a backup if it doesnt exist with the required expiry | @@ -206,6 +206,31 @@ def get_backup():
recipient_list = odb.send_email()
frappe.msgprint(_("Download link for your backup will be emailed on the following email address: {0}").format(', '.join(recipient_list)))
+
+@frappe.whitelist()
+def fetch_latest_backups(with_files=True, recent=3):
+ """Takes backup on-demand if d... |
[batch] add missing insert into to billing_project_users
This was missing in / | @@ -30,6 +30,9 @@ CREATE TABLE IF NOT EXISTS `billing_project_users` (
FOREIGN KEY (`billing_project`) REFERENCES billing_projects(name) ON DELETE CASCADE
) ENGINE = InnoDB;
+INSERT INTO `billing_project_users` (`billing_project`, `user`)
+VALUES ('test', 'test-dev');
+
CREATE TABLE IF NOT EXISTS `instances` (
`name` V... |
Scheduling should enable/disable systemd timer
in addition to start/stop | @@ -56,7 +56,7 @@ class InsightsSchedulerSystemd(object):
@property
def active(self):
try:
- systemctl_status = run_command_get_output('systemctl is-active insights-client.timer')
+ systemctl_status = run_command_get_output('systemctl is-enabled insights-client.timer')
return systemctl_status['status'] == 0
except OSEr... |
Improve dashboard redirect logic
Use dashboard for location-restricted users, and send mobile workers to cloudcare by default | +from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext_noop, ugettext as _
@@ -14,17 +15,13 @@ from corehq.apps.domain.decorators import login_and_domain_required
from corehq.apps.domain.views import Domai... |
Update target_encoder.py
Changed "ith" to "i-th" for clarity. | @@ -27,7 +27,7 @@ class TargetEncoder(BaseEstimator, TransformerMixin):
Categories (unique values) per feature:
- 'auto' : Determine categories automatically from the training data.
- - list : ``categories[i]`` holds the categories expected in the ith
+ - list : ``categories[i]`` holds the categories expected in the i-... |
Fix added docstrings to core.domain.value_generators_domain
* Fix added docstrings to core.domain.value_generators_domain
* Fix Addresses review comments for commit
Adds type information in the docstrings. Also fixes indentation and typos.
* Fix Fixes a minor typo
* Fix Changes Throws to Raises | @@ -45,12 +45,23 @@ class BaseValueGenerator(object):
@classmethod
def get_html_template(cls):
+ """Returns the HTML template for the class.
+
+ Returns:
+ str. The HTML template corresponding to the class.
+ """
return utils.get_file_contents(os.path.join(
os.getcwd(), feconf.VALUE_GENERATORS_DIR, 'templates',
'%s.htm... |
Fix typo & Minor changes
Thanks for the fixes | PyTorch Recipes
---------------------------------------------
-Recipes are bite-sized bite-sized, actionable examples of how to use specific PyTorch features, different from our full-length tutorials.
+Recipes are bite-sized, actionable examples of how to use specific PyTorch features, different from our full-length tu... |
Improve device/firmware selection
Remove iOS 10.0 which is rare and only exists on two models, limit
iPhone SE to versions after 9.3, add iOS 10.3.3. | @@ -148,7 +148,8 @@ def get_device_info(account):
def generate_device_info(account):
ios8 = ('8.0', '8.0.1', '8.0.2', '8.1', '8.1.1', '8.1.2', '8.1.3', '8.2', '8.3', '8.4', '8.4.1')
ios9 = ('9.0', '9.0.1', '9.0.2', '9.1', '9.2', '9.2.1', '9.3', '9.3.1', '9.3.2', '9.3.3', '9.3.4', '9.3.5')
- ios10 = ('10.0', '10.0.1', '... |
Uses latest pip for Github Actions.
We resolved all dependency conflicts and we can use latest pip in the github actions. | @@ -44,8 +44,7 @@ jobs:
- name: Install dependencies
run: |
- # TODO(b/174469322): install the latest pip once resolved.
- python -m pip install --upgrade 'pip<20.3' wheel
+ python -m pip install --upgrade pip wheel
pip install -e .[all]
- name: Run unit tests
|
fix: redirect to page with middleware using absolute URL
See
Closes | @@ -2,7 +2,9 @@ import { NextRequest, NextResponse } from "next/server";
export function middleware(req: NextRequest) {
if (req.cookies["couchers-sesh"] && req.nextUrl.pathname === "/") {
- return NextResponse.rewrite("/dashboard");
+ const url = req.nextUrl.clone();
+ url.pathname = "/dashboard";
+ return NextResponse... |
Unify the "Log out" spelling
* Replaces the "Log Out" with "Log out" text to avoid having 2 versions
for translations | {% if redirect.data %}
<input name="{{ redirect.field }}" type="hidden" value="{{ redirect.data }}">
{% endif %}
- <input type="submit" value="{% trans %}Log Out{% endtrans %}">
+ <input type="submit" value="{% trans %}Log out{% endtrans %}">
</form>
{% endblock %}
|
calico: update libnetwork plugin
v1.1.3-2-d2iq fixes an issue with crashing on ipv6 enabled hosts. | },
"calico-libnetwork-plugin": {
"kind": "url",
- "url": "https://github.com/mesosphere/libnetwork-plugin/releases/download/v1.1.3-1-d2iq/libnetwork-plugin-amd64",
- "sha1": "f363d1d1fdacefac8d91fb4336495e5b5020920f"
+ "url": "https://github.com/mesosphere/libnetwork-plugin/releases/download/v1.1.3-2-d2iq/libnetwork-pl... |
rewrite Topology.select using Topology.f_index
The original implementation of `Topology.select` uses `Sample.index` to
determine the selected element indices. This patch uses `Topology.f_index`
instead, which leads to a slightly simpler implementation, without loops in
Python (list comprehension). Timings of the cylind... | @@ -423,9 +423,13 @@ class Topology(types.Singleton):
return function.get(values, 0, self.f_index)
def select(self, indicator, ischeme='bezier2', **kwargs):
+ # Select elements where `indicator` is strict positive at any of the
+ # integration points defined by `ischeme`. We sample `indicator > 0`
+ # together with the... |
CODEOWNERS for distributed optimizer.
Summary:
Pull Request resolved:
ghstack-source-id:
Test Plan: waitforbuildbot | /torch/csrc/distributed/autograd @mrshenli @pritamdamania87 @zhaojuanmao
/torch/distributed/rpc @mrshenli @pritamdamania87 @zhaojuanmao
/torch/distributed/autograd @mrshenli @pritamdamania87 @zhaojuanmao
+/torch/distributed/optim @mrshenli @pritamdamania87 @zhaojuanmao @aazzolini
|
Adjust zeromq example
Closes | @@ -13,5 +13,4 @@ if __name__ == '__main__':
while True:
request = socket.recv().decode()
response = methods.dispatch(request)
- if not response.is_notification:
socket.send_string(str(response))
|
Add mariadb-client to prod image.
Add mariadb client to easier debugging of deployments. | @@ -11,7 +11,7 @@ ENV PYTHONUNBUFFERED=1
RUN apt-get update && \
apt-get install -y --no-install-recommends \
- libmariadbclient18 optipng \
+ libmariadbclient18 optipng mariadb-client \
libxslt1.1 && \
rm -rf /var/lib/apt/lists/*
|
fw/workload: Add attribute to control if package data should be cleared.
Allow specifying that the package data should not be cleared
before starting the workload. | @@ -175,6 +175,7 @@ class ApkWorkload(Workload):
loading_time = 10
package_names = []
view = None
+ clear_data_on_reset = True
# Set this to True to mark that this workload requires the target apk to be run
# for initialisation purposes before the main run is performed.
@@ -257,7 +258,8 @@ class ApkWorkload(Workload):
... |
GlusterFS: Check for namespace if deploying a StorageClass
Fixes: | oc_project:
state: present
name: "{{ glusterfs_namespace }}"
- when: glusterfs_is_native or glusterfs_heketi_is_native
+ when: glusterfs_is_native or glusterfs_heketi_is_native or glusterfs_storageclass
- name: Delete pre-existing heketi resources
oc_obj:
|
Add coverage for raising ServiceNotValid if set_service is called on a
service that is not defined | @@ -59,6 +59,15 @@ class TestBaseProjectKeychain(unittest.TestCase):
self.assertEquals(keychain.project_config, self.project_config)
self.assertEquals(keychain.key, self.key)
+ def test_set_non_existant_service(self):
+ self._test_set_non_existant_service()
+
+ def _test_set_non_existant_service(self, project=False):
+... |
TST: changed testing class
Changed the class object in listify test. Also simplified pysat imports. | @@ -18,7 +18,6 @@ import tempfile
import pysat
from pysat.tests.registration_test_class import TestWithRegistration
-from pysat.utils import testing
def prep_dir(inst=None):
@@ -229,7 +228,7 @@ class TestListify():
new_iterable = pysat.utils.listify(iterable)
tst_iterable = ['test' for i in range(nitem)]
- testing.asse... |
update linear_elastic_damping.py example for current TS solvers
use HDF5 for output | @@ -32,6 +32,7 @@ options = {
'ts' : 'ts',
'save_steps' : -1,
'post_process_hook_final' : print_times,
+ 'output_format' : 'h5',
}
variables = {
@@ -57,6 +58,12 @@ equations = {
+ dw_lin_elastic.i.Omega( solid.D, v, u ) = 0""",
}
+def adapt_time_step(ts, status, adt, problem, verbose=False):
+ if ts.time > 0.5:
+ ts.se... |
placed subproblem solves into celery tasks
Locally on the docker the speedup isn't all that evident, but solves are in the task format | @@ -31,7 +31,7 @@ import julia
import sys
import traceback
import os
-from celery import shared_task, Task
+from celery import shared_task, Task, group
from reo.exceptions import REoptError, OptimizationTimeout, UnexpectedError, NotOptimal, REoptFailedToStartError
from reo.models import ModelManager
from reo.src.profil... |
Rename to inline_backend_fmt()
Rename to inline_fmt()
Tmp | @@ -32,7 +32,7 @@ logger = logging.getLogger('matplotlib.mathtext')
logger.setLevel(logging.ERROR) # suppress warnings!
__all__ = [
- 'rc', 'rc_configurator', 'inline_backend_config',
+ 'rc', 'rc_configurator', 'inline_backend_fmt',
]
# Dictionaries used to track custom proplot settings
@@ -426,7 +426,7 @@ def _get_syn... |
User Manual: Avoid backslashes in mention of default onefile tempdir spec
* We now convert the backward slashes to forward slashes for a
while now, and it's good to use this on Windows too, and esp.
for quoting in shells, it's much less of a problem. | @@ -484,7 +484,7 @@ Finding files`_ as well.
For the unpacking, by default a unique user temporary path one is used,
and then deleted, however this default
-``--onefile-tempdir-spec="%TEMP%\\onefile_%PID%_%TIME%"`` can be
+``--onefile-tempdir-spec="%TEMP%/onefile_%PID%_%TIME%"`` can be
overridden with a path specificat... |
Update version 0.9.3 -> 0.9.4
New Features
* `assert_consistent_bqm` to `dimod.testing` for testing different BQM implementations
* Testing is now done with parameterized package - this does not affect installed packages
* FileView version 2.0 with improved docs | #
# ================================================================================================
-__version__ = '0.9.3'
+__version__ = '0.9.4'
__author__ = 'D-Wave Systems Inc.'
__authoremail__ = 'acondello@dwavesys.com'
__description__ = 'A shared API for binary quadratic model samplers.'
|
Fix input test
Updated with constraints as static method | @@ -41,4 +41,6 @@ class TestCRESTInput(PymatgenTest):
cin = CRESTInput(molecule=mol, constraints=constraints)
with open(os.path.join(expected_output_dir, "expected_constrains.txt"), "r") as f:
exp_con = f.read()
- self.assertEqual(exp_con.strip(), cin.constrains_template().strip())
+ self.assertEqual(exp_con.strip(), c... |
Update .env
Removed old values from Server 2 / 3 4
Added missing = sign. | @@ -71,14 +71,12 @@ HLL_HOST_2=
HLL_PORT_2=
HLL_PASSWORD_2=
RCONWEB_PORT_2=8011
-RCONWEB_PASSWORD_2=
-RCONWEB_USERNAME_2=rconuser
DISCORD_WEBHOOK_AUDIT_LOG_2=
SERVER_SHORT_NAME_2=MyServer2
DISCORD_CHAT_WEBHOOK_2=
DISCORD_PING_TRIGGER_WORDS_2=
DISCORD_PING_TRIGGER_ROLES_2=
-DISCORD_PING_TRIGGER_WEBHOOK_2
+DISCORD_PING_T... |
Update docker-compose.yaml
change version/tag of image (latest is not found) | @@ -7,6 +7,6 @@ services:
- ~/OpenBBUserData:/home/python/OpenBBUserData
- ~/.openbb_terminal:/home/python/.openbb_terminal
platform: linux/amd64
- image: ghcr.io/openbb-finance/openbbterminal/openbb:latest
+ image: ghcr.io/openbb-finance/openbbterminal/openbb:2.0.0
stdin_open: true # docker run -i
tty: true # docker r... |
Load gen_extra.calc at import time
This allows downstream variants to import their gen_extra/calc.py
module. | @@ -48,6 +48,12 @@ CLOUDCONFIG_KEYS = {'coreos', 'runcmd', 'apt_sources', 'root', 'mounts', 'disk_s
PACKAGE_KEYS = {'package', 'root'}
+# Allow overriding calculators with a `gen_extra/calc.py` if it exists
+gen_extra_calc = None
+if os.path.exists('gen_extra/calc.py'):
+ gen_extra_calc = importlib.machinery.SourceFile... |
Update bug-fix-release.md
Added ordering coaster to T-2 Logistics | @@ -205,7 +205,7 @@ The final release is cut - RC cuts and bug fixes should be completed by this dat
- Ensure [Security Policies](https://docs.mattermost.com/process/security.html) page has been updated
- Update dependancies after release branch is cut in `mattermost-server`, `mattermost-webapp`, `desktop`, `mattermost... |
6.4 migration: fix ordering of drop_drift calls
First drop the trigger that uses the column, then drop the column | @@ -457,12 +457,6 @@ EXECUTE PROCEDURE recalc_drift_instance_counts_update();
def drop_drift_availability_columns():
- op.drop_column('node_instances', 'is_status_check_ok')
- op.drop_column('node_instances', 'has_configuration_drift')
- op.drop_column('deployments', 'unavailable_instances')
- op.drop_column('deploymen... |
Fix bug Properly mark variables within XML
The XML placeables must be marked before variable placeables to avoid
marking variables, but leaving out XML attributes and tags. | @@ -90,20 +90,28 @@ def mark_placeables(text):
NewlineEscapePlaceable.parse,
TabEscapePlaceable.parse,
EscapePlaceable.parse,
+
# The spaces placeable can match '\n ' and mask the newline,
# so it has to come later.
SpacesPlaceable.parse,
- PythonFormatNamedPlaceable.parse,
- PythonFormatPlaceable.parse,
+
+ # The XML ... |
Filter out crashes in fuzz_task which have an empty state.
Should fix | @@ -231,6 +231,9 @@ class Crash(object):
if self.is_archived() and not self.fuzzed_key:
return 'Unable to store testcase in blobstore: %s' % self.crash_state
+ if not self.crash_state or not self.crash_type:
+ return 'Empty crash state or type'
+
return None
@@ -996,8 +999,8 @@ def filter_crashes(crashes):
for crash in... |
fix sparse dqn
Summary:
Pull Request resolved:
we need to unfold embeddings from different sparse features | @@ -72,8 +72,12 @@ class SparseDQN(ModelBase):
dense_features = torch.cat(
(state.float_features, action.float_features), dim=-1
)
+ batch_size = dense_features.shape[0]
sparse_features = self.fetch_id_list_features(state, action)
+ # shape: batch_size, num_sparse_features, embedding_dim
embedded_sparse = self.sparse_a... |
Mention jupytext --check pytest in the documentation
Closes | @@ -42,8 +42,13 @@ You may also find useful to `--pipe` the text representation of a notebook into
jupytext --sync --pipe black notebook.ipynb # read most recent version of notebook, reformat with black, save
```
-Execute `jupytext --help` to access the full documentation.
+For programs that don't accept pipes, use `{}... |
Ability to manually turn off pants pex creation for test running.
Useful e.g., if running pants from sources in another repo via
a script that invokes pants's own ./pants wrapper. In that case
we know we don't have issues with pants's integration test rooting. | @@ -122,7 +122,9 @@ for arg in "$@"; do
test_goal_used=true
fi
done
-if [[ "${test_goal_used}" == 'true' && "${TRAVIS}" != 'true' ]]; then
+
+no_regen_pex="${NO_REGEN_PEX:-${TRAVIS}}"
+if [[ "${test_goal_used}" == 'true' && "${no_regen_pex}" != 'true' ]]; then
"$HERE/build-support/bin/bootstrap_pants_pex.sh"
fi
|
Also register op schema when no kernels are registered
Summary: Pull Request resolved: | @@ -34,6 +34,13 @@ private:
#define C10_DEFINE_OP_SCHEMA(Name, Schema) \
C10_EXPORT const c10::OperatorHandle& Name() { \
+ /* must be meyers singleton to make sure this is registered before any */ \
+ /* kernels referencing it are registered. */ \
static ::c10::detail::OpSchemaRegistrar registrar(Schema); \
return reg... |
Update Travis builds to run on Trusty
Drops pypy builds. | sudo: false
+dist: trusty
+
language: python
python:
- "2.7"
@@ -6,16 +8,12 @@ python:
- "3.4"
- "3.5"
- "3.6"
- # allow failures on CPython dev and pypy
+ # allow failures on CPython dev
# we want to be warned about these, but they aen't critical
- "3.7-dev"
- - "pypy"
- - "pypy3"
matrix:
allow_failures:
- python: "3.... |
pkg_unparsing_impl_body_ada.mako: remove unused function
TN: | @@ -35,11 +35,6 @@ package body ${ada_lib_name}.Unparsing.Implementation is
subtype Present_Token_Sequence_Template is Token_Sequence_Template (True);
- function Create_Token_Sequence
- (First, Last : Token_Type) return Present_Token_Sequence_Template
- with Pre => First /= No_Token and then Last /= No_Token;
- -- Crea... |
Python3.8: Improved compatibility with behaviour changes
* These were causing errors to the test suite (keep GeneratorExit)
and the other was derived from diff, closing sets async form of
the stop iteration. | @@ -1219,6 +1219,17 @@ static int Nuitka_AsyncgenAthrow_traverse(struct Nuitka_AsyncgenAthrowObject *as
}
static PyObject *Nuitka_AsyncgenAthrow_send(struct Nuitka_AsyncgenAthrowObject *asyncgen_athrow, PyObject *arg) {
+#if _DEBUG_ASYNCGEN
+ PRINT_STRING("Nuitka_AsyncgenAthrow_send: Enter with state:\asyncgen_athrow:"... |
DOC: updated block comments
Updated some block comment grammar. | @@ -582,9 +582,9 @@ def generate_instrument_list(inst_loc, user_info=None):
if not travis_skip:
instrument_download.append(inst_dict)
elif not inst._password_req:
- # we don't want to test download for this combo
- # But we do want to test the download warnings
- # for instruments without a password requirement
+ # We ... |
Removed validation
No longer necessary because select2 doesn't allow you to enter free text. | @@ -548,9 +548,6 @@ hqDefine("cloudcare/js/form_entry/entrycontrols_full", function () {
self.options.subscribe(function () {
self.renderSelect2();
- if (!self.isValid(self.rawAnswer())) {
- self.question.error(gettext('Not a valid choice'));
- }
});
self.renderSelect2 = function () {
|
llvm, functions/TransferFunctions: Zero the output array before writing max value/indicator
Fixes occasional result corruption. | @@ -2261,6 +2261,9 @@ class SoftMax(TransferFunction):
with pnlvm.helpers.array_ptr_loop(builder, arg_in, "exp_div") as args:
self.__gen_llvm_exp_div(*args, **kwargs)
elif output_type == MAX_VAL:
+ # zero out the output array
+ with pnlvm.helpers.array_ptr_loop(builder, arg_in, "zero_output") as (b,i):
+ b.store(ctx.fl... |
add instructions for setting up .env file for docs release
Test Plan: inspection
Reviewers: sashank, yuhan, bob | @@ -44,10 +44,17 @@ git push
Once you have _confirmed_ that the new version of the site is up at `docs.dagster.io` (may take up to 5 min), clone the following repo and run:
```
-# This updates the search index against the live site
+# If you haven't already, check out the doc scraper repo, which builds the search index... |
WebUI: Remove SOURCE state
See commit | * - Thomas Beermann, <thomas.beermann@cern.ch>, 2014-2015
* - Stefan Prenner, <stefan.prenner@cern.ch>, 2017-2018
* - Hannes Hansen, <hannes.jakob.hansen@cern.ch>, 2018
- * - Dimitrios Christidis, <dimitrios.christidis@cern.ch>, 2019
+ * - Dimitrios Christidis, <dimitrios.christidis@cern.ch>, 2019-2020
*/
html_replicas... |
Add Circuit.zip method
Handy to have around when building circuits up in tiled pieces and wanting to guarantee the moment structure comes out right. | @@ -3764,3 +3764,56 @@ def test_deprecated():
circuit = cirq.Circuit([cirq.H(q)])
with cirq.testing.assert_logs('final_state_vector', 'deprecated'):
_ = circuit.final_wavefunction()
+
+
+def test_zip():
+ a, b, c, d = cirq.LineQubit.range(4)
+
+ circuit1 = cirq.Circuit(cirq.H(a), cirq.CNOT(a, b))
+ circuit2 = cirq.Circ... |
Added dummy user data for cypress tests
added dummy data for cypress tests | "groups": [],
"user_permissions": []
}
+ },
+ {
+ "model": "users.user",
+ "pk": 21,
+ "fields": {
+ "password": "argon2$argon2i$v=19$m=512,t=2,p=2$TTBSdHR5U2tlTHNT$YAw7zxAUVGlIUCWH6ejUtg",
+ "last_login": null,
+ "is_superuser": false,
+ "first_name": "Dev",
+ "last_name": "Doctor",
+ "email": "",
+ "is_staff": false,... |
Cleanup, use same C "bool" definition as CPython2 does.
* They use an enum in their headers which when included clashes with
our previous "int" typedef.
* So we do the same, even for Python3, where they seem to have
stopped doing that. | #define initstate system_initstate
#endif
-/* Include the Python C-API header files. */
+/* Include the relevant Python C-API header files. */
#include "Python.h"
#include "methodobject.h"
#include "frameobject.h"
#include "pydebug.h"
#include "marshal.h"
+/* The bool type. From Python2 header or self defined for Pytho... |
Fix typo in schedule inference
This was caught by the daceml test suite | @@ -180,7 +180,7 @@ class TilingType(aenum.AutoNumberEnum):
# Maps from ScheduleType to default StorageType
SCOPEDEFAULT_STORAGE = {
- StorageType.Default: StorageType.Default,
+ ScheduleType.Default: StorageType.Default,
None: StorageType.CPU_Heap,
ScheduleType.Sequential: StorageType.Register,
ScheduleType.MPI: Stora... |
more details on decoder in PE tutorial
Describe what decoder.rnn_size and decoder.encoder_projection are used for. | @@ -357,6 +357,15 @@ decoder. Without further ado, here it goes::
As in the case of encoders, the decoder needs its RNN and embedding size
settings, maximum output length, dropout parameter, and vocabulary settings.
+The outputs of the individual encoders are by default simply concatenated
+and projected to the decoder... |
Fix crypto_com default init parameters
The default initialization parameters for the crypto_com_order_book_tracker has been modified | @@ -31,7 +31,7 @@ class CryptoComOrderBookTracker(OrderBookTracker):
def __init__(
self,
- shared_client: aiohttp.ClientSession,
+ shared_client: aiohttp.ClientSession = None,
throttler: Optional[AsyncThrottler] = None,
trading_pairs: Optional[List[str]] = None,
):
|
Don't autoescape when rendering jija templates
Enabling autoescape leads to unusable CFN templates. | @@ -1111,7 +1111,11 @@ def render_template(template_str, params_dict, tags, config_version=None):
:param params_dict: Template parameters dict
"""
try:
- environment = Environment(loader=BaseLoader, autoescape=True)
+ # A nosec comment is appended to the following line in order to disable the B701 check.
+ # This is do... |
Support pkgs kwarg in pkg.upgrade on FreeBSD
The pkgs kwarg is passed by salt.states.pkg.uptodate. If it
is not recognized by the pkg module, all packages are upgraded. | @@ -1154,6 +1154,7 @@ def upgrade(*names, **kwargs):
force = kwargs.pop('force', False)
local = kwargs.pop('local', False)
dryrun = kwargs.pop('dryrun', False)
+ pkgs = kwargs.pop('pkgs', [])
opts = ''
if force:
opts += 'f'
@@ -1168,7 +1169,10 @@ def upgrade(*names, **kwargs):
cmd.append('upgrade')
if opts:
cmd.append(... |
ebuild.processor: more rework and simplification
Drop old unused, forget_all_processors() function. | @@ -50,12 +50,6 @@ def _single_thread_allowed(functor):
return _inner
-@_single_thread_allowed
-def forget_all_processors():
- active_ebp_list[:] = []
- inactive_ebp_list[:] = []
-
-
@_single_thread_allowed
def shutdown_all_processors():
"""Kill all known processors."""
@@ -336,17 +330,12 @@ class EbuildProcessor:
"gid... |
[cmap] Document rationale for getBestCmap choice of subtable
Fixes | @@ -91,6 +91,11 @@ class table__c_m_a_p(DefaultTable.DefaultTable):
(0, 1), # Unicode 1.1
(0, 0) # Unicode 1.0
+ This particular order matches what HarfBuzz uses to choose what
+ subtable to use by default. This order prefers the largest-repertoire
+ subtable, and among those, prefers the Windows-platform over the
+ Un... |
Typo
I think this is suppose to be the type of the `text` param instead of the param itself right? | @@ -119,7 +119,7 @@ def word_tokenize(text, language='english', preserve_line=False):
for the specified language).
:param text: text to split into words
- :param text: str
+ :type text: str
:param language: the model name in the Punkt corpus
:type language: str
:param preserve_line: An option to keep the preserve the s... |
pyglow check
Debugged pyglow check | @@ -46,14 +46,27 @@ install:
fi
- pwd
- ls
- - if [[ -d "$pyglow_dir" && -e "$pyglow_dir/setup.py" && "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
- cd pyglow;
+ # check if there is a partial download of pyglow, remove if true
+ - export PYGLOW_DIR=./pyglow
+ - if [[ -d "$PYGLOW_DIR" && "$TRAVIS_PYTHON_VERSION" == "2.7" ... |
docs: Add the firestore_setup_client_create_with_project_id region tag
The Firestore quickstart_new_instance sample can be used to demonstrate setting up client using a project id.
With this region tag, we can include it into this doc: | @@ -21,12 +21,14 @@ from google.cloud import firestore
def quickstart_new_instance():
# [START firestore_setup_client_create]
+ # [START firestore_setup_client_create_with_project_id]
from google.cloud import firestore
# The `project` parameter is optional and represents which project the client
# will act on behalf of... |
Renamed getChildView => childView
getChildView was removed from CollectionView | @@ -111,7 +111,7 @@ hqDefine("cloudcare/js/formplayer/layout/views/settings", function () {
var SettingsContainerView = Marionette.CollectionView.extend({
tagName: 'tbody',
- getChildView: function (item) {
+ childView: function (item) {
if (item.get('slug') === slugs.SET_LANG) {
return LangSettingView;
} else if (item... |
Update todos.css
Cleaned up code to make it easier to read | @@ -4,13 +4,13 @@ body{
background: linear-gradient(to right, #96DEDA, #50C9C3); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
+
#container{
width: 350px;
margin: 10% auto;
background: #f7f7f7;
box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.2);
height: 350px;
-
}
header
@@ -37,12 +37,13 @@ h1{
font-... |
Added "www.vdtrack.com" to "data/StevenBlack/hosts"
Follow-up to the last one.
127.0.0.1 www.vdtrack.com | 127.0.0.1 twitter.cm # common misspelling
127.0.0.1 ttwitter.com # common misspelling and, besides, scumbags there.
127.0.0.1 vdtrack.com
+127.0.0.1 www.vdtrack.com
127.0.0.1 virtual.thewhig.com
127.0.0.1 www.dobre-programy.pl
127.0.0.1 www.quickcash-system.com
|
Pack token records
This saves quite a lot of memory and has minimal performance impact. | @@ -47,7 +47,7 @@ package Langkit_Support.Token_Data_Handlers is
-- this is either null or the symbolization of the token text.
--
-- For instance: null for keywords but actual text for identifiers.
- end record;
+ end record with Pack;
-- Holder for per-token data to be stored in the token data handler
-- Trivias are ... |
config: fix ipv6
As of nautilus, if you set `ms bind ipv6 = True` you must explicitly set
`ms bind ipv4 = False` too, otherwise OSDs will still try to pick up an
IPv4 address.
Closes: | @@ -10,6 +10,7 @@ auth supported = none
{% endif %}
{% if ip_version == 'ipv6' %}
ms bind ipv6 = true
+ms bind ipv4 = false
{% endif %}
{% if common_single_host_mode is defined and common_single_host_mode %}
osd crush chooseleaf type = 0
|
Qt : Use legacy xcb tablet coordinates
Works around an issue with 5.12+ when using a wacom tablet on linux.
This generally results in clicks being misplaced and drag operations
behaving erratically.
See:
This can hopefully be removed once this patch is in: | @@ -56,6 +56,8 @@ fi
export LC_NUMERIC=C
+##########################################################################
+
# Find where this script is located, resolving any symlinks that were used
# to invoke it. Set GAFFER_ROOT based on the script location.
################################################################... |
update: remove an old parameter in ceph_key module call
the `containerized` parameter in ceph_key module doesn't exist anymore.
This was making the module failing but was hidden because of the
`ignore_errors: True`. | caps:
mon: "allow profile {{ item.0 }}"
cluster: "{{ cluster }}"
- containerized: "{{ 'docker exec ceph-mon-' + hostvars[item.1]['ansible_hostname'] if containerized_deployment else None }}"
when:
- cephx
delegate_to: "{{ item.1 }}"
|
Make ceph-ansible integration respect PythonInterpreter
PythonInterpreter defaults to /usr/bin/python. If a user overrides
this default, e.g. to something like python3, then we should use it.
Modify ceph-base.yml to use the PythonInterpreter parameter. The
variable will already be set to ansible_python_interpreter by t... | @@ -469,6 +469,7 @@ outputs:
- '{% if ansible_ssh_private_key_file is defined %}--private-key {{ansible_ssh_private_key_file}}{% endif %}'
- '-i'
- '{{playbook_dir}}/ceph-ansible/inventory.yml'
+ - '{% if ansible_python_interpreter is defined %}-e ansible_python_interpreter={{ansible_python_interpreter}}{% endif %}'
- ... |
improve variable code
Remove redundant variable, and rename for better understanding.
Fix loading logic to handle cmd and env variables correctly. | @@ -45,12 +45,13 @@ def load_variables(
if higher_level_variables is None:
higher_level_variables = {}
- env_variables = _load_from_env()
current_variables: Dict[str, VariableEntry] = dict()
if isinstance(higher_level_variables, list):
+ env_variables = _load_from_env()
cmd_variables = _load_from_pairs(higher_level_var... |
Don't build sdist/bdist_wheel with script of deploy phase
Trying to fix diofant/diofant#777 | @@ -64,9 +64,8 @@ matrix:
- git clone https://github.com/diofant/diofant.github.io.git sphinx_docs
- rm -rf sphinx_docs/.git
- rsync -a --delete build/sphinx/html/ sphinx_docs/en/latest/
- - python setup.py sdist bdist_wheel
- VERSION=$(python -c 'import diofant;print(diofant.__version__)')
- - cp -a dist gdist
+ - mkd... |
regression in page parsing
causes baseline to be set to polygon shape. fixes | @@ -171,7 +171,7 @@ def parse_page(filename):
baseline = None
if base is not None and not base.get('points').isspace() and len(base.get('points')):
try:
- baseline = _parse_coords(pol.get('points'))
+ baseline = _parse_coords(base.get('points'))
except:
logger.info('TextLine {} without baseline'.format(line.get('id')))... |
Fix overzealous html-escaping in Markup renderer
HTML entities in link and image titles, urls, and image alts were
being double-escaped.
The following is legal Markdown

It should render to
<img src="img.png" alt="©">
rather than
<img src="img.png" alt="&copy;">
Ref: | @@ -2,7 +2,6 @@ import threading
from weakref import ref as weakref
import mistune
-from markupsafe import escape
from markupsafe import Markup
from werkzeug.urls import url_parse
@@ -12,6 +11,10 @@ from lektor.context import get_ctx
_markdown_cache = threading.local()
+def escape(text: str) -> str:
+ return mistune.es... |
Add order_by kwarg to DWaveSampler constructor
Used for adjusting the feature based solver selection. | @@ -105,6 +105,12 @@ class DWaveSampler(dimod.Sampler, dimod.Structured):
then it will instead propogate the `SolverNotFoundError` to the
user.
+ order_by (callable/str/None):
+ Solver sorting key function or (or :class:`~dwave.cloud.Solver`
+ attribute/item dot-separated path).
+ See :class:`~dwave.cloud.Client.get_so... |
snapcraft: use 2.1 branch
This allows us to pull in the next iteration of Juju including the
upcoming bash completion fixes. | @@ -52,7 +52,7 @@ parts:
juju:
source: https://github.com/juju/juju.git
source-type: git
- source-tag: juju-2.1-beta5
+ source-branch: "2.1"
source-depth: 1
plugin: godeps
go-importpath: github.com/juju/juju
|
[cleanup] Raise an exception if 'titles' is still used as where parameter
'titles' value for where parameter was deprecated 5 years ago. | @@ -1296,19 +1296,15 @@ class GeneratorsMixin:
:raises TypeError: a namespace identifier has an inappropriate
type such as NoneType or bool
"""
- where_types = ['nearmatch', 'text', 'title', 'titles']
+ where_types = ['nearmatch', 'text', 'title']
if not searchstring:
raise Error('search: searchstring cannot be empty')... |
Enable Cosmos HTTPS tunneling through a proxy secured by basic auth
See | @@ -27,6 +27,7 @@ ExecStartPre=/bin/ping -c1 leader.mesos
ExecStartPre=/opt/mesosphere/bin/bootstrap dcos-cosmos
ExecStart=/opt/mesosphere/bin/java \\
-Xmx2G \\
+ -Djdk.http.auth.tunneling.disabledSchemes="" \\
-classpath ${PKG_PATH}/usr/cosmos.jar \\
com.simontuffs.onejar.Boot \\
-admin.port=127.0.0.1:9990 \\
|
Update task.py
reverting change | @@ -19,7 +19,6 @@ import bigbench.api.task as task
from bigbench.benchmark_tasks.coqa_conversational_question_answering.coqa_official_evaluation_script import \
CoQAEvaluator
import os
-import random
class CoQA(task.Task):
@@ -62,13 +61,8 @@ class CoQA(task.Task):
)
def evaluate_model(self, model, max_examples=-1, rand... |
Update Thanos to 0.25.0
Release notes: | %global debug_package %{nil}
Name: thanos
-Version: 0.24.0
-Release: 2%{?dist}
+Version: 0.25.0
+Release: 1%{?dist}
Summary: Highly available Prometheus setup with long term storage capabilities.
License: ASL 2.0
URL: https://thanos.io
|
Ditch outdated tasks from deploy.json
Server is now containerized, so we don't need to do minification or any of the root_web stuff from github-deploy-repo anymore | "actions": [
"// client - API",
- {
- "type": "minimize-js",
- "src": "src/client/delphi_epidata.js",
- "dst": "src/client/delphi_epidata.min.js"
- },
{
"type": "copy",
"src": "src/client/delphi_epidata.py",
"dst": "[[package]]/client/delphi_epidata.py",
"add-header-comment": true
},
- {
- "type": "move",
- "src": "src... |
update discord invite
discordapp.com domain will go defunct very soon, everything has transitioned to discord.com now | @@ -268,4 +268,4 @@ At this point the rest of the resolution is straightforward since there is no mo
* [Official Website](https://python-poetry.org)
* [Issue Tracker](https://github.com/python-poetry/poetry/issues)
-* [Discord](https://discordapp.com/invite/awxPgve)
+* [Discord](https://discord.com/invite/awxPgve)
|
Update cyclesort.py
Changing for Python 3 using exception handling for robust code | @@ -44,7 +44,13 @@ def cycle_sort(array):
# Main Code starts here
-user_input = input('Enter numbers separated by a comma:\n')
+if __name__ == '__main__':
+ try:
+ raw_input # Python 2
+ except NameError:
+ raw_input = input # Python 3
+
+user_input = raw_input('Enter numbers separated by a comma:\n')
unsorted = [int(i... |
MAINT: Clarify sign of last iircomb coefficient
There's no reason to create a variable and then overwrite it. | @@ -5278,18 +5278,20 @@ def iircomb(w0, Q, ftype='notch', fs=2.0):
# b - cz^-N or b + cz^-N
b = np.zeros(N + 1)
b[0] = bx
- b[-1] = cx
if ftype == 'notch':
b[-1] = -cx
+ else:
+ b[-1] = +cx
# Compute denominator coefficients
# Eq 11.5.1 (p. 590) or Eq 11.5.4 (p. 591) from reference [1]
# 1 - az^-N or 1 + az^-N
a = np.z... |
swarming: switch ts_mon metrics from seconds to milliseconds
The problem isn't the data but the bucketting; they get bucketed at second
resolution. Since most hooks runs in a negligible amount of time, this leads to
unactionable data.
Review-Url: | @@ -105,13 +105,13 @@ DEFAULT_SETTINGS = {
### Monitoring
-_bucketer = ts_mon.GeometricBucketer(growth_factor=10**0.05,
+_bucketer = ts_mon.GeometricBucketer(growth_factor=10**0.07,
num_finite_buckets=100)
hooks_durations = ts_mon.CumulativeDistributionMetric(
'swarming/bots/hooks/durations', bucketer=_bucketer,
- desc... |
Bugfix: validation always fails: 'str' object has no attribute 'get'
Recently changed data validation function does its checks by treating
attributes/values as they were dictionaries; however, they are lists
of dictionaries.
data["telemetry"].get("ts") is bound to fail: the correct check would be
data["telemetry"][i].g... | @@ -43,8 +43,26 @@ class TBUtility:
error = 'deviceName is empty in data: '
if error is None and not data.get("deviceType"):
error = 'deviceType is empty in data: '
- if error is None and data.get("attributes") is None and (data.get("telemetry") is None or (data["telemetry"].get("ts") is not None and len(data["telemetr... |
Ensemble class modified
Ensemble class changed in order to work with the TD3 algorithm
now, withouth an index fit fits every target
added min target selection | @@ -28,8 +28,8 @@ class Ensemble(object):
def fit(self, *z, **fit_params):
"""
- Fit the ``idx``-th model of the ensemble if ``idx`` is provided, a
- random model otherwise.
+ Fit the ``idx``-th model of the ensemble if ``idx`` is provided, every
+ model otherwise.
Args:
*z (list): a list containing the inputs to use t... |
Adapted AnalogSignal test to the renaming of duplicate_with_new_array to
duplicate_with_new_data | @@ -241,7 +241,7 @@ class TestAnalogSignalProperties(unittest.TestCase):
signal1 = self.signals[1]
signal2 = self.signals[2]
data2 = self.data[2]
- signal1b = signal1.duplicate_with_new_array(data2)
+ signal1b = signal1.duplicate_with_new_data(data2)
assert_arrays_almost_equal(np.asarray(signal1b),
np.asarray(signal2 /... |
ssh-add -k should be lower case k
Upper case K errors out for linux | @@ -99,7 +99,7 @@ def generate_instructions(chapter, platform):
dcc.SyntaxHighlighter(
('$ ssh-add ~/.ssh/id_rsa' if platform == 'Windows' else
- '$ ssh-add -K ~/.ssh/id_rsa'),
+ '$ ssh-add -k ~/.ssh/id_rsa'),
customStyle=styles.code_container,
language='python'
),
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.