message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
Update pythonpackage.yml
still nosetests setup | @@ -21,6 +21,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install Cython
+ pip install numpy
pip install -r requirements.txt
- name: Test with nose
run: |
|
OSLObjectUI : Remove plug deletion code
Instead we can hook into the metadata system provided by NodeUI. | @@ -214,6 +214,7 @@ Gaffer.Metadata.registerNode(
],
"primitiveVariables.*" : [
+ "deletable", True,
# Although the parameters plug is positioned
# as we want above, we must also register
# appropriate values for each individual parameter,
@@ -284,37 +285,3 @@ Gaffer.Metadata.registerNode(
}
)
-
-######################... |
Move metrics to CPU
Hopefully eliminates continuously growing memory usage during training | @@ -61,9 +61,10 @@ class KrakenTrainer(pl.Trainer):
def __init__(self,
enable_progress_bar: bool = True,
enable_summary: bool = True,
- min_epochs=5,
- max_epochs=100,
- pb_ignored_metrics=('loss', 'val_metric'),
+ min_epochs: int = 5,
+ max_epochs: int = 100,
+ pb_ignored_metrics: Sequence[str] = ('loss', 'val_metric'... |
Support for both api_key_required AND authorizer on routes
Changed to support routes that need both an api_key and an authorizer. | @@ -98,7 +98,7 @@ class SwaggerGenerator(object):
# type: (Any, Dict[str, Any], RouteEntry) -> None
if view.authorizer is not None:
self._generate_security_from_auth_obj(api_config, view.authorizer)
- return
+ #do not return, need to handle both authorizer AND api_key security
for auth in security:
name = list(auth.key... |
Improve visual settings of output panels
* Improve visual settings of output panels
* Add bullet
* fix navigation to result in Windows
* Add a single whitespace to diagnostics lines
ensure at least one space in indention.
ensure result_line_regexp and syntax highlighting keeps working after 99.999.999 of lines | @@ -7,7 +7,7 @@ scope: output.lsp.diagnostics
variables:
start_of_diag_body: ^\s+(?=\d)
- filename_and_colon: ^(.*)(:)$
+ filename_and_colon: ^\s*(\S)\s+(.*)(:)$
contexts:
main:
@@ -18,8 +18,9 @@ contexts:
- match: '{{filename_and_colon}}'
captures:
0: meta.diagnostic.preamble.lsp
- 1: string.unquoted.lsp
- 2: punctuat... |
Remove old numpy 1.16 work-arounds that hinder some masked transformations.
With this change, erfa.ufunc.s2p becomes much easier to handle for
masked arrays/quantities. | @@ -1562,11 +1562,8 @@ class UnitSphericalRepresentation(BaseRepresentation):
Converts spherical polar coordinates to 3D rectangular cartesian
coordinates.
"""
- # NUMPY_LT_1_16 cannot create a vector automatically
- p = u.Quantity(np.empty(self.shape + (3,)), u.dimensionless_unscaled,
- copy=False)
# erfa s2c: Convert... |
ensure --cluster-path is empty when trying to deploy a new cluster
This is to guard against accidentally writing over an existing clusters
information if it could not be connected to for whatever reason. | @@ -12,7 +12,7 @@ from oc.openshift_ops import OCP
from ocs import constants, ocp, defaults
from ocs.exceptions import CommandFailed, CephHealthException
from ocs.utils import create_oc_resource, apply_oc_resource
-from utility import templating
+from utility import templating, system
from utility.aws import AWS
from u... |
Remove link to outdated client docs in tutorial
Remove link to incomplete and severely outdated
client_setup_and_repository_example.md in client section of
TUTORIAL.md.
Instead we should link (or move the entire client tutorial part) to
tuf/client/README.md, which is more comprehensive and less outdated
than above docu... | @@ -672,10 +672,6 @@ Adding a verification key that has already been used. [repeated 32x]
## How to Perform an Update ##
-Documentation for setting up a TUF client and performing an update is
-available [here](../tuf/client_setup_and_repository_example.md). The documentation
-there is provided here for convenience.
-
T... |
Fixed a small bug that could cause issues on a multi-user machine where
more than one user is creating and running test installers and another
wants to run a production installer. Only one user per machine can run
the production installer at any one time. | @@ -122,7 +122,7 @@ else
# which serve as documentation.
sed -i -e '/^#/!d' install.cfg
# Set the insecure registry configuration based on the installer hostname
- echo -e "${lBlue}Set up the inescure registry config for hostname ${lCyan}vinstall${uId}${NC}"
+ echo -e "${lBlue}Set up the inescure registry config for ho... |
Fix lndmanage
fix bonus.lndmanage.sh | @@ -16,17 +16,22 @@ fi
# install
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
+
+ if [ -d "/home/admin/lndmanage" ]; then
+ echo "LNDMANAGE already installed"
+ exit 1
+ fi
+
echo "*** INSTALL LNDMANAGE ***"
- mkdir lndmanage
- cd lndmanage
+ mkdir /home/admin/lndmanage
+ cd /home/admin/lndmanage
# activate virtual envir... |
[MINOR] Fix typos in frame.py
Fixed typo in `frame.py` | @@ -1285,7 +1285,7 @@ class DataFrame(_Frame, Generic[T]):
... # 0,1,2,3
... # 1,4,5,6
- We can omit the the index by passing the keyword `index` and setting
+ We can omit the index by passing the keyword `index` and setting
it to false.
>>> df.to_clipboard(sep=',', index=False) # doctest: +SKIP
@@ -1801,7 +1801,7 @@ d... |
workload/rt-app: Better JSON processing error reporting
The rt-app workload parses the rt-app JSON file in order to override
some options (specifically duration). Previously, if the JSON was
syntactically incorrect, an uninformative ValueError was raised. Now
we raise a ConfigError with appropriate message prompting th... | @@ -21,7 +21,7 @@ from collections import OrderedDict
from subprocess import CalledProcessError
from wa import Workload, Parameter, Executable, File
-from wa.framework.exception import WorkloadError, ResourceError
+from wa.framework.exception import WorkloadError, ResourceError, ConfigError
from wa.utils.misc import ch... |
framework/instrumentation: handle non-job errors in ManagedCallback
If an error occurs in a ManagedCallback that is invoked outside of a
job, re-raise rather than attempting to update the status of the
non-existent job. | @@ -275,7 +275,10 @@ class ManagedCallback(object):
if isinstance(e, WorkloadError):
context.set_status('FAILED')
else:
+ if context.current_job:
context.set_status('PARTIAL')
+ else:
+ raise
# Need this to keep track of callbacks, because the dispatcher only keeps
|
doc/media: make module level match
ImageFile and SoundFile are located at media.ev3dev, not media. | :mod:`media <pybricks.media>` -- Sounds and Images
==================================================
-.. automodule:: pybricks.media
- :no-members:
+.. module:: pybricks.media
-You can use your own sound and image files by placing them in your project
-folder. You can also use any of the images and sounds built into e... |
Fixing sudo command
Fixing small spelling mistakes | @@ -362,7 +362,7 @@ There are a few things that still don't work, and you can see what works and wha
1. Running raspbian lite(headless) or desktop (both 64bit) we should first start off with an update/upgrade.
```bash
- sudo apt update && sydo apt upgrade
+ sudo apt update && sudo apt upgrade
```
Once completed reboot ... |
Fix 2
Forget to add : | @@ -1187,7 +1187,7 @@ class PokemonGoBot(object):
if response_dict:
self._player = response_dict['responses']['GET_PLAYER']['player_data']
- if 'warn' in response_dict['responses']['GET_PLAYER']
+ if 'warn' in response_dict['responses']['GET_PLAYER']:
warn = response_dict['responses']['GET_PLAYER']['warn']
player = sel... |
Allow nullable length unit in cable API
Cables models define it as None by default, but the API rejects a
request containing a null length_unit. Allows it in the API
serializer. | @@ -507,7 +507,7 @@ class CableSerializer(ValidatedModelSerializer):
termination_a = serializers.SerializerMethodField(read_only=True)
termination_b = serializers.SerializerMethodField(read_only=True)
status = ChoiceField(choices=CONNECTION_STATUS_CHOICES, required=False)
- length_unit = ChoiceField(choices=CABLE_LENGT... |
Remove scipy usage from laikad
Remove scipy | @@ -4,7 +4,7 @@ from typing import List
import numpy as np
from collections import defaultdict
-from scipy import linalg
+from numpy.linalg import linalg
from cereal import log, messaging
from laika import AstroDog
|
Remove comparison with default_in='body'
In general they differ at res[0]['schema']['required'] | @@ -110,7 +110,6 @@ class TestMarshmallowFieldToSwagger:
assert len(res[0]['schema']['required']) == 2
assert 'field1' in res[0]['schema']['required']
assert 'field2' in res[0]['schema']['required']
- assert res == swagger.fields2parameters(field_dict, default_in='body')
def test_fields2parameters_does_not_modify_metad... |
Catch OSError besides IOError in _GetType() to handle symlink loop exception
fixes | @@ -2410,7 +2410,7 @@ class FakeFilesystem(object):
obj = self.ResolveObject(path, follow_symlinks)
if obj:
return stat.S_IFMT(obj.st_mode) == st_flag
- except IOError:
+ except (IOError, OSError):
return False
return False
|
refine benchmark log
test=develop | @@ -258,8 +258,8 @@ def main():
logs = train_stats.log()
if it % cfg.log_iter == 0 and (not FLAGS.dist or trainer_id == 0):
ips = float(cfg['TrainReader']['batch_size']) / time_cost
- strs = 'iter: {}, lr: {:.6f}, {}, batch_cost: {:.5f} s, eta: {}, ips: {:.5f} images/sec'.format(
- it, np.mean(outs[-1]), logs, time_cos... |
Update emotet.txt
Tails are extremely various and there're no signs for these IPs to be legit. | @@ -2822,6 +2822,15 @@ http://91.242.136.103/fmrNxd4xgr7w
http://68.114.229.171/gK0HUPd
74.101.225.121:443/iMPCBDusm7qwkGo
+# Reference: https://www.virustotal.com/gui/ip-address/72.186.137.156/relations
+
+72.186.137.156:80
+
+# Reference: https://www.virustotal.com/gui/ip-address/66.7.242.50/relations
+
+66.7.242.50:... |
fix typo (Response -> Request)
check docs for more information | @@ -39,7 +39,7 @@ class ${ProjectName}SpiderMiddleware(object):
# Called when a spider or process_spider_input() method
# (from other spider middleware) raises an exception.
- # Should return either None or an iterable of Response, dict
+ # Should return either None or an iterable of Request, dict
# or Item objects.
pa... |
UT for testing urls for all the objects
Only exceptional urls are being tested, other urls are missing
test case. If some changes are introduced then these test
case makes sure that those changes follow url expected by the
ODL. | @@ -17,6 +17,7 @@ from oslo_config import cfg
from neutron.tests import base
+from networking_odl.common import constants as odl_const
from networking_odl.common import utils
@@ -30,19 +31,31 @@ class TestUtils(base.DietTestCase):
def test_neutronify_empty(self):
self.assertEqual('', utils.neutronify(''))
- def test_ma... |
full refactor complete
structure overhauled, changed stop logic | @@ -144,7 +144,15 @@ class TriviaNightCog(commands.Cog):
percentage *= 0.5
duration = next_question.time * percentage
- await asyncio.sleep(duration)
+ await asyncio.wait([self.question_closed.wait()], timeout=duration)
+
+ if self.question_closed.is_set():
+ await ctx.send(embed=question_view.end_question(self.scorebo... |
Skip namespace bucket creation via MCG RPC.
Skip namespace bucket creation via MCG RPC apart from Version 4.6 | @@ -12,13 +12,13 @@ from ocs_ci.ocs import constants
logger = logging.getLogger(__name__)
+@skipif_ocs_version("!=4.6")
@scale
class TestScaleNamespace(E2ETest):
"""
Test creation of a namespace scale resource
"""
- @skipif_ocs_version("!=4.6")
@pytest.mark.parametrize(
argnames=["platform"],
argvalues=[
@@ -47,7 +47,6... |
Update data_analytics_dag.py again
Need to use write_append to concatenate all of the tables, my bad. It's okay to have it keep adding the data for the sake of our demo. | @@ -113,8 +113,8 @@ with models.DAG(
ON Holidays.Date = Weather.Date;
"""
- # for demo purposes we are using WRITE_TRUNCATE
- # to reduce chance of 409 duplicate errors
+ # for demo purposes we are using WRITE_APPEND
+ # but if you run the DAG repeatedly it will continue to append
# Your use case may be different, see ... |
Remove style to show text in portico-page-container.
Fixes | @@ -593,10 +593,6 @@ a.bottom-signup-button {
padding-top: 50px !important;
}
-.portico-page-container {
- padding-top: 0px !important;
-}
-
.portico-page-header {
font-weight: 300;
font-size: 35px;
|
removed
"VirusTotal - Private API": "reached api alloted quota.",
from conf.json as it caused the circle to be green without testing | "_comment": "~~~ QUOTA ISSUES ~~~",
"AWS - Athena - Beta": "Issue 19834",
"Lastline": "issue 20323",
- "VirusTotal - Private API": "reached api alloted quota.",
"Google Resource Manager": "Cannot create projects because have reached alloted quota.",
"Looker": "Warehouse 'DEMO_WH' cannot be resumed because resource moni... |
Add type annotations to parsl.dataflow.futures
This comes from the benc-mypy branch | @@ -9,7 +9,7 @@ We have two basic types of futures:
from concurrent.futures import Future
import logging
import threading
-from typing import Sequence
+from typing import Optional, Sequence
from parsl.app.futures import DataFuture
from parsl.dataflow.taskrecord import TaskRecord
@@ -75,24 +75,24 @@ class AppFuture(Futu... |
Add packages and package_data to setup.py
Review: | # See the License for the specific language governing permissions and
# limitations under the License.
-from setuptools import setup
+from setuptools import find_packages, setup
# Read in requirements.txt
requirements = open('requirements.txt').readlines()
@@ -24,4 +24,6 @@ setup(
url='http://github.com/quantumlib/cirq... |
fix bug in
Summary:
Mistakenly created an infinite recursive call.
(Note: this ignores all push blocking failures!) | @@ -57,7 +57,7 @@ bool ConvDNNLowPAcc16Op<ReluFused>::RunOnDeviceWithOrderNHWC() {
template <bool ReluFused>
bool ConvDNNLowPAcc16Op<ReluFused>::GetQuantizationParameters_() {
- if (!this->GetQuantizationParameters_()) {
+ if (!BaseType::GetQuantizationParameters_()) {
return false;
}
|
Vagrant fixes
1)Fix glitch with vagrant and eth1 not having an active ip after first boot.
Removed unnecessary ntp install by script; will be done by openshift install. | @@ -12,10 +12,3 @@ else
echo "eth1 missing ip; restaring interface"
ifdown eth1 && ifup eth1
fi
-
-
-echo "Install ntp server to avoid to have desync issues"
-yum -y install ntp
-systemctl enable ntpd
-systemctl start ntpd
-date
|
Improve documentation and minor pystyle violations.
No semantic changes. | from typing import Callable, Any, Optional
-import jax
-import jax.numpy as jnp
-import numpy as np
-
from flax import linen as nn
from flax import struct
+import jax.numpy as jnp
+import numpy as np
+
@struct.dataclass
class TransformerConfig:
@@ -68,17 +67,17 @@ def sinusoidal_init(max_len=2048):
return init
+
class ... |
Update extract_features.py
adapt pooling in extract_features.py to lower pytorch version | @@ -64,7 +64,7 @@ class FeatureExtractor(torch.nn.Module):
def forward(self, src, seg):
emb = self.embedding(src, seg)
output = self.encoder(emb, seg)
- seg = torch.unsqueeze(seg, dim=-1)
+ seg = torch.unsqueeze(seg, dim=-1).type(torch.float)
output = output * seg
if self.pooling == "mean":
@@ -73,7 +73,7 @@ class Feat... |
update: use flags noout and nodeep-scrub only
1. set noout and nodeep-scrub flags,
2. upgrade each OSD node, one by one, wait for active+clean pgs
3. after all osd nodes are upgraded, unset flags | name: ceph-mgr
+- name: set osd flags
+ hosts: "{{ mon_group_name | default('mons') }}[0]"
+ become: True
+ tasks:
+ - import_role:
+ name: ceph-defaults
+ - import_role:
+ name: ceph-facts
+
+ - name: set osd flags
+ command: "{{ container_exec_cmd | default('') }} ceph --cluster {{ cluster }} osd set {{ item }}"
+ wi... |
make `correct` float to avoid truncating
Without float conversion the `acc` variable always becomes `0`. | @@ -402,7 +402,7 @@ Finally we can evaluate our model on the test nodes:
model.eval()
_, pred = model(data).max(dim=1)
- correct = pred[data.test_mask].eq(data.y[data.test_mask]).sum().item()
+ correct = float (pred[data.test_mask].eq(data.y[data.test_mask]).sum().item())
acc = correct / data.test_mask.sum().item()
pri... |
langkit.dsl: refactor special fields filter
TN: | @@ -82,6 +82,17 @@ def check_decorator_use(decorator, expected_cls, cls):
)
+def filter_out_special_fields(dct):
+ """
+ Helper for metaclasses. Return dct without the special fields (__foo__).
+
+ :param dict[str, T] dct: Class attributes dictionnary.
+ :rtype: dict[str, T]
+ """
+ return {k: v for k, v in dct.items()... |
Include API_HOST in URL
This makes no difference in production, but it means we can run a
development instance against a different API server and maintains
consistency with what we do elsewhere. | @@ -455,7 +455,8 @@ def measure_for_one_entity(request, measure, entity_code, entity_type):
"measure": measure,
"measure_options": measure_options,
"current_at": ImportLog.objects.latest_in_category("prescribing").current_at,
- "numerator_breakdown_url": "{}?{}".format(
+ "numerator_breakdown_url": "{}{}?{}".format(
+ ... |
Updated Lithuania Exchanges (to BY and RU-KGD)
used source from | "rotation": 135
},
"BY->LT": {
+ "capacity": [
+ -4553,
+ 4553
+ ],
"lonlat": [
25.756061,
54.789457
"rotation": 180
},
"LT->RU-KGD": {
+ "capacity": [
+ -2490,
+ 2490
+ ],
"lonlat": [
21.963913,
55.080726
|
[hail][ir] improve error message when unify fails in PruneDeadFields
With this added context it was completely obvious what I had done wrong. Without
this context, I just knew that somewhere I had some ints and structs that did not
unify. | @@ -138,6 +138,7 @@ object PruneDeadFields {
def unifyBaseType(base: BaseType, children: BaseType*): BaseType = unifyBaseTypeSeq(base, children)
def unifyBaseTypeSeq(base: BaseType, children: Seq[BaseType]): BaseType = {
+ try {
if (children.isEmpty)
return minimalBT(base)
base match {
@@ -188,6 +189,10 @@ object Prune... |
[Fix,Roofline] Fix roofline handling of multiple peak flops
In the switch to multiple possible peakflops measurement, the logic to
add all of them was skipped. Instead only the last was added. | @@ -145,6 +145,7 @@ def roofline_from_existing(
if isinstance(prim, tir.PrimFunc) and "hash" in prim.attrs.keys()
}
+ new_configuration = dict(report.configuration.items())
new_calls = []
for call in report.calls:
if "Hash" in call.keys() and call["Hash"] in all_features:
@@ -159,6 +160,10 @@ def roofline_from_existing... |
[builder] get 'Variation Font Origin' from font-wide custom parameters
Fixes | @@ -173,10 +173,13 @@ def to_ufos(data, include_instances=False, family_name=None, debug=False):
result = [ufos[master_id] for master_id in master_id_order]
instances = {'defaultFamilyName': source_family_name,
'data': data.pop('instances', [])}
- for key in ("Variation Font Origin",):
- value = data.get(key)
- if valu... |
Update install-mmte-helm-gitlab-helm.rst
Updated config > configJSON and fixed Helm chart location in deployment command. | @@ -57,7 +57,7 @@ Deploy Mattermost Team Edition Helm Chart
Requirements:
- - Mattermost Team Edition Helm Chart Version: 1.4.0
+ - Mattermost Team Edition Helm Chart Version: 3.8.2
To deploy Mattermost Team Edition with GitLab Helm Chart, disable the running ``MySql`` chart and configure InitContainer and Environment ... |
Added commented wildcards for spam domains
Added commented wildcards for spam domains so that they may be more easily scripted for automated integration into other platforms by finding and replacing lines that start with "#.*". | # Spam domains
# If your software is able, the below domains and all subdomains should be blocked
127.0.0.1 angiemktg.com
+#*.angiemktg.com
127.0.0.1 weconfirmyou.com
+#*.weconfirmyou.com
#=====================================
|
dding an unit test for checking that if no positive words were given,
highlighted text is same as original text | from collections import defaultdict
import pytest
-from DBotPredictPhishingWords import get_model_data, predict_phishing_words, main
from CommonServerPython import *
+from DBotPredictPhishingWords import get_model_data, predict_phishing_words, main
TOKENIZATION_RESULT = None
@@ -242,3 +242,30 @@ def test_main(mocker):
... |
GDB helpers: update env rebindings pretty-printer after un-refcouting
TN: | @@ -417,20 +417,18 @@ class RebindingsPrinter(BasePrinter):
return 'null'
def rebinding_img(value):
- new_env = EnvGetterPrinter(value['new_env'], self.context).env
- return ASTNodePrinter(new_env['node'], self.context).sloc(
- with_end=False
- ) if new_env and new_env['node'] else '<synthetic>'
-
- rebindings = self.v... |
Fix typo in streaming docs
Typo | @@ -141,7 +141,8 @@ When you need to remove one or more columns, give [`IterableDataset.remove_colum
```py
>>> from datasets import load_dataset
->>> dataset = load_dataset('glue', 'mrpc', split='train')features
+>>> dataset = load_dataset('glue', 'mrpc', split='train')
+>>> dataset.features
{'sentence1': Value(dtype='... |
Add a couple of sanity checks so we don't break the database.
Part of | @@ -9,5 +9,16 @@ if _upper_dir not in sys.path:
import chdb
+def sanity_check():
+ sdb = chdb.init_scratch_db()
+ snippet_count = sdb.execute_with_retry_s(
+ '''SELECT COUNT(*) FROM snippets''')[0]
+ assert snippet_count > 100
+
+ article_count = sdb.execute_with_retry_s(
+ '''SELECT COUNT(*) FROM articles''')[0]
+ ass... |
Add ddownload.com to file storage and sharing
added ddownload.com | @@ -276,6 +276,7 @@ API | Description | Auth | HTTPS | CORS |
| [AnonFiles](https://anonfiles.com/docs/api) | Upload and share your files anonymously | No | Yes | Unknown |
| [BayFiles](https://bayfiles.com/docs/api) | Upload and share your files | No | Yes | Unknown |
| [Box](https://developer.box.com/) | File Sharing... |
fix(db_query): Handle permlevel check cases clearer
Split to utility functions for clarity
Add example over code blocks
Re-arrange blocks based on priority | @@ -564,25 +564,38 @@ class DatabaseQuery:
permitted_fields = get_permitted_fields(doctype=self.doctype)
for i, field in enumerate(self.fields):
- if "distinct" in field:
+ # field: like 'name', 'published'
+ if is_plain_field(field) and field not in permitted_fields:
+ self.fields.remove(field)
+ continue
+
+ if "dist... |
Update .travis.yml
python3 didn't work. Modifying output redirect to get more info. The previous commit may have worked for python2. Still waiting for testing to finish on Travis. | @@ -86,7 +86,7 @@ install:
- echo 'installing pyglow';
- cd ./pyglow;
- travis_wait 50 make -C src/pyglow/models source >/dev/null;
- - travis_wait 50 python setup.py install --user >/dev/null;
+ - travis_wait 50 python setup.py install --user
- cd ../pysat;
# install pysat
- "python setup.py install"
|
op-guide: add accessing Spark with Python or R
Via: | @@ -164,4 +164,13 @@ scala> spark.sql("select count(*) from lineitem").show
+--------+
```
+You can also access Spark with Python or R using the following commands:
+
+```
+docker-compose exec tispark-master /opt/spark/bin/pyspark
+docker-compose exec tispark-master /opt/spark/bin/sparkR
+```
+
+For more details about ... |
doc: add instructions for setting up Cloud9 environment.
Added instructions that allow for a low-cost ~10min environment setup. | @@ -19,6 +19,23 @@ reported the issue. Please try to include as much information as you can. Detail
* Any modifications you've made relevant to the bug
* A description of your environment or deployment
+## Setting up your development environment [optional, but recommended]
+
+* Set up the Cloud9 environment:
+ * Instan... |
TST: make test_verbosity() pass
remove pause() and its use
remove non-existent precision argument in save() | @@ -20,15 +20,10 @@ from scipy.sparse.linalg import aslinearoperator, LinearOperator
__all__ = ['lobpcg']
-def pause():
- # Used only when verbosity level > 10.
- input()
-
-
def save(ar, fileName):
# Used only when verbosity level > 10.
from numpy import savetxt
- savetxt(fileName, ar, precision=8)
+ savetxt(fileName,... |
test-backend: Clean up leak data import files after test-suite run.
This is a simple, non-intrusive way of removing the bulk of the
clutter from `var/<uuid>/test-backend` after running `test-backend`.
Ideally, we'll replace this logic with proper tearDown methods. | @@ -16,6 +16,7 @@ import ujson
import httplib2
import httpretty
import requests
+import shutil
import django
from django.conf import settings
@@ -456,6 +457,21 @@ def main() -> None:
# an important clue as to why tests fail.
report_slow_tests()
+ # We now cleanup files leaked by certain tests that don't clean up
+ # af... |
Provide safer command to delete sharding jobs
This ensures that people who are blindly copy-pasting commands
don't accidentally delete running reshard jobs. | @@ -717,12 +717,11 @@ good idea to remove already completed jobs. See :ref:`reshard configuration
section <config/reshard>` for the default value of ``max_jobs`` parameter and
how to adjust if needed.
-For example, if the jobs have completed, to remove all the jobs run:
+For example, to remove all the completed jobs ru... |
Fix link for common_task/target_aggregate
The link to Create a Target Aggregate found on the docsite at currently leads to a 404, this should resolve that issue. | "setup_repo": "dist/markdown/html/src/docs/setup_repo.html",
"styleguide": "dist/markdown/html/src/docs/styleguide.html",
"target_addresses": "dist/markdown/html/src/docs/target_addresses.html",
+ "target_aggregate": "dist/markdown/html/src/docs/common_tasks/target_aggregate.html",
"test": "dist/markdown/html/src/docs/... |
Fix: tutorial index headings do not match tutorial content page
Index does not match content on tutorials page. This fixes that. I haven't worked the examples myself, so whether this is the correct fix or whether the content should be changed to match the index, is beyond my ability to judge. | @@ -127,21 +127,21 @@ upper_tabs:
#### INTERMEDIATE ####
- heading: "Intermediate"
- - title: "Shor's algorithm"
- path: /cirq/tutorials/shor
-
- #### ADVANCED ####
- - heading: "Advanced"
- title: "Quantum variational algorithm"
path: /cirq/tutorials/variational_algorithm
- - title: "QAOA experiment"
+ - title: "Appro... |
travis: Remove ssh loopback trick
Builds are currently failing. For example | @@ -58,11 +58,6 @@ before_script:
# TODO, only do this step for the postgres environment
- psql -c 'create database spotify;' -U postgres
- # allow ssh loopback
- - ssh-keygen -t rsa -N '' -C '' -f ~/.ssh/id_rsa
- - cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
- - ssh -o StrictHostKeyChecking=no localhost true
-
# C... |
Update sensor.py
Fix Issue | @@ -329,10 +329,9 @@ class GarbageCollection(Entity):
if self.date_inside(today):
next_date = self.get_next_date(today)
if next_date is not None:
- next_date_year = next_date.year
if not self.date_inside(next_date):
if self.__first_month <= self.__last_month:
- next_year = date(next_date_year + 1, self.__first_month, 1... |
Fix error on empty groups
When running with ALL target, application is trying to list all
projects in all groups. But it crushes when there are groups
without any project.
This change fixes such errors. | -from gitlabform.gitlab.core import GitLabCore
+from gitlabform.gitlab.core import GitLabCore, NotFoundException
class GitLabGroups(GitLabCore):
@@ -28,7 +28,10 @@ class GitLabGroups(GitLabCore):
returned, so if "group" (= members of this group) is also a member of some projects, they won't be
returned here.
"""
+ try:... |
Edit wwis_weather en-US locale
Added a ForecastKeyword keyword which can be either "weather" or
"forecast" in the templates. Also added a template for "Can you
tell me the weather forcast?" | @@ -26,6 +26,10 @@ class WWISWeatherPlugin(plugin.SpeechHandlerPlugin):
'locale': {
'en-US': {
'keywords': {
+ 'ForecastKeyword':[
+ 'WEATHER',
+ 'FORECAST'
+ ],
'WeatherTypePresentKeyword': [
'SNOWING',
'RAINING',
@@ -64,17 +68,18 @@ class WWISWeatherPlugin(plugin.SpeechHandlerPlugin):
]
},
'templates': [
- "WHAT IS T... |
utils/doc: Adds support for showing aliases when formatting parameters
Now displays all available local and global aliases when generating the
rst for a parameter. | @@ -274,6 +274,10 @@ def get_params_rst(parameters):
param.mandatory and '(mandatory)' or ' ')
desc = strip_inlined_text(param.description or '')
text += indent('{}\n'.format(desc))
+ if param.aliases:
+ text += indent('\naliases: {}\n'.format(', '.join(map(format_literal, param.aliases))))
+ if param.global_alias:
+ t... |
Update test_ops_decompositions.py
the 3 in line 212 should be an n | @@ -209,7 +209,7 @@ class TestGraphEmbed:
A = np.random.random([n, n]) + 1j * np.random.random([n, n])
A += A.T
- A -= np.trace(A) * np.identity(n) / 3
+ A -= np.trace(A) * np.identity(n) / n
sq, U = dec.graph_embed(A)
|
No longer need the name proxy, now that we're not mutating InstallRequirement
instances in combine_install_requirements | @@ -234,39 +234,6 @@ class Resolver:
return results
- def _get_ireq_with_name(
- self,
- ireq: InstallRequirement,
- proxy_cache: Dict[InstallRequirement, InstallRequirement],
- ) -> InstallRequirement:
- """
- Return the given ireq, if it has a name, or a proxy for the given ireq
- which has been prepared and therefor... |
Add django-zero-downtime-migrations Postgres DB engine
From the repo: | @@ -21,6 +21,8 @@ DEFAULT_POSTGRESQL_ENGINES = (
'django.db.backends.postgis',
'django.contrib.gis.db.backends.postgis',
'psqlextra.backend',
+ 'django_zero_downtime_migrations.backends.postgres',
+ 'django_zero_downtime_migrations.backends.postgis',
)
SQLITE_ENGINES = getattr(settings, 'DJANGO_EXTENSIONS_RESET_DB_SQLI... |
Don't yield in list comprehensions
I've tried to grep for more of this with no success. | @@ -259,11 +259,15 @@ class ApplicationServicesHandler(object):
event based on the service regex.
"""
services = self.store.get_app_services()
- interested_list = [
- s for s in services if (
- yield s.is_interested(event, self.store)
- )
- ]
+
+ # we can't use a list comprehension here. Since python 3, list
+ # compre... |
Update mkvtomp4.py
fix progress bar and isolate it to its own method | @@ -1064,12 +1064,9 @@ class MkvtoMp4:
try:
for timecode in conv:
if reportProgress:
- try:
- sys.stdout.write('\r')
- sys.stdout.write('[{0}] {1}%'.format('#' * (timecode / 10) + ' ' * (10 - (timecode / 10)), timecode))
- except:
- sys.stdout.write(str(timecode))
- sys.stdout.flush()
+ self.displayProgressBar(timecode... |
Add :rtype: markers to LocalVars.create* docstrings
TN: | @@ -2659,6 +2659,7 @@ class LocalVars(object):
:param str|names.Name name: The name of the variable.
:param langkit.compiled_types.CompiledType type: Type parameter. The
type of the local variable.
+ :rtype: LocalVars.LocalVar
"""
result = self.create_scopeless(name, type)
PropertyDef.get_scope().add(result)
@@ -2672,6... |
Change Default AoC Commands Channel
Changes the default value of the advent_of_code_commands constant to be
the same channel ID as sir-lancebot-commands. If no AoC commands channel
is set in the .env file, it'll re-direct people to sir-lancebot-commands
instead. | @@ -95,7 +95,7 @@ class Branding:
class Channels(NamedTuple):
admins = 365960823622991872
advent_of_code = int(environ.get("AOC_CHANNEL_ID", 782715290437943306))
- advent_of_code_commands = int(environ.get("AOC_COMMANDS_CHANNEL_ID", 783503267849437205))
+ advent_of_code_commands = int(environ.get("AOC_COMMANDS_CHANNEL_... |
doc/common/Keypad: fix name
Keypad is one word, so the class is not spelled KeyPad. | @@ -659,7 +659,7 @@ class LightMatrix:
pass
-class KeyPad:
+class Keypad:
"""Get status of buttons on a keypad layout."""
def pressed(self):
|
Remove broken Travis tests
We are working on replacing the tests carried out by Travis with GitLab | @@ -42,9 +42,9 @@ groups:
azul:
conditions:
- - "'*[Tt]ravis*' in check_runs.successful"
- "base.ref == 'master'"
- "'content' in labels"
+ # Will add a new condition for GitLab once that's set up
reviewers:
users:
- hannes-ucsc
@@ -55,9 +55,9 @@ groups:
browser:
conditions:
- - "'*[Tt]ravis*' in check_runs.successful"... |
use getattr in Batch constructor
Fixes | @@ -23,7 +23,7 @@ class Batch(object):
for (name, field) in dataset.fields.items():
if field is not None:
- batch = [x.__dict__[name] for x in data]
+ batch = [getattr(x, name) for x in data]
setattr(self, name, field.process(batch, device=device, train=train))
@classmethod
|
Remove dead code
get_node_by_instance_uuid will never return None,
so the OR condition is dead code. | @@ -159,7 +159,7 @@ class NovaNotification(base.NotificationEndpoint):
try:
current_node = (
self.cluster_data_model.get_node_by_instance_uuid(
- instance.uuid) or self.get_or_create_node(node.uuid))
+ instance.uuid))
except exception.ComputeNodeNotFound as exc:
LOG.exception(exc)
# If we can't create the node,
|
Add more interchange debugging logs
These are based on practical experience debugging the interchange. | @@ -516,6 +516,7 @@ class Interchange(object):
assert 'type' in r, f"Message is missing type entry: {r}"
if r['type'] == 'result':
try:
+ logger.debug(f"Removing task {r['task_id']} from manager record {manager}")
self._ready_managers[manager]['tasks'].remove(r['task_id'])
except Exception:
# If we reach here, there's ... |
Always define HPY macro when building HPy extensions
This allows to share code between HPy extensions and CPython extensions
that have not been ported to HPy yet. | @@ -217,6 +217,7 @@ class build_hpy_ext_mixin:
ext.hpy_abi = self.distribution.hpy_abi
ext.include_dirs += self.hpydevel.get_extra_include_dirs()
ext.sources += self.hpydevel.get_extra_sources()
+ ext.define_macros.append(('HPY', None))
if ext.hpy_abi == 'cpython':
ext.sources += self.hpydevel.get_ctx_sources()
ext._hp... |
STY: Fix up indentation.
[ci skip] | @@ -1109,9 +1109,7 @@ def luf(lamdaexpr, *args, **kwargs):
>>> np.compare_chararrays(a,b,">",True)
array([False,True,False])
-"""
-
- )
+ """)
add_newdoc('numpy.core.multiarray', 'fromiter',
"""
|
Replaced uses of ansi_aware_write with appropriate wrapper functions.
Made help command format for argparse commands the same as using "command -h" | @@ -720,7 +720,7 @@ class Cmd(cmd.Cmd):
pipe_proc = subprocess.Popen(pager, shell=True, stdin=subprocess.PIPE)
pipe_proc.communicate(msg_str.encode('utf-8', 'replace'))
else:
- ansi.ansi_aware_write(self.stdout, msg_str)
+ self.poutput(msg_str, end='')
except BrokenPipeError:
# This occurs if a command's output is bein... |
setup.py: allow to override default "share/man" via environment variable
Apparently on some BSD systems man pages go to /usr/man instead of /usr/share/man.
It's too complicated to keep track of all the nuances of Linux distros so package maintainers can simply override the default via a $FONTTOOLS_MANPATH env variable
... | from __future__ import print_function
import io
import sys
+import os
+from os.path import isfile, join as pjoin
+from glob import glob
from setuptools import setup, find_packages, Command
from distutils import log
+from distutils.util import convert_path
import subprocess as sp
import contextlib
@@ -259,6 +263,49 @@ c... |
Update ftcode.txt
Making generic trails harder due to info | @@ -26,7 +26,12 @@ qvo5sd7p5yazwbrgioky7rdu4vslxrcaeruhjr7ztn3t2pihp56ewlqd.onion
m1-systems.xyz
+# Reference: https://twitter.com/reecdeep/status/1179672368958058496
+
+home.goteamrob.com
+home.isdes.com
+
# Generic trails
-/?need=6ff4040&vid=docit1
-/?need=9f5b9ee&vid=docit1
+/?need=6ff4040
+/?need=9f5b9ee
|
[IMPR] Improvement for argument handling
call handle_args before local_args processing
use arg.partition(':') instead of looping over a generator with one element
rename args list to templates and do not redefine main parameter list | @@ -742,37 +742,35 @@ def main(*args):
salt = ''
force = False
calc = None
- args = []
-
- def if_arg_value(arg, name):
- if arg.startswith(name):
- yield arg[len(name) + 1:]
-
- for arg in pywikibot.handle_args(args):
- for v in if_arg_value(arg, '-file'):
- filename = v
- for v in if_arg_value(arg, '-locale'):
+ temp... |
Update eye_tracking_settings.py
Typo | # if app.platform == 'mac':
# eye_zoom_mouse.config.screen_area = Point2d(100, 75)
# eye_zoom_mouse.config.img_scale = 6
-# elif app.platformh == 'win':
+# elif app.platform == 'win':
# eye_zoom_mouse.config.screen_area = Point2d(200, 150)
# eye_zoom_mouse.config.img_scale = 4.5
|
RemoteMemoryBlock: close a process handle on cleanup
HG--
branch : issue_290 | @@ -149,10 +149,10 @@ class RemoteMemoryBlock(object):
last_error = win32api.GetLastError()
print('LastError = ', last_error, ': ', win32api.FormatMessage(last_error).rstrip())
sys.stdout.flush()
- #self._CloseHandle()
+ self._CloseHandle()
raise ctypes.WinError()
self.memAddress = 0
- #self._CloseHandle()
+ self._Clos... |
set warning for first local minimum in `complexity_delay`
pushing to dev because already broke it anw ^^ | @@ -202,9 +202,17 @@ def _embedding_delay_select(metric_values, algorithm="first local minimum"):
)["Peaks"]
elif algorithm == "first local minimum":
# Find reversed peaks
+ try:
optimal = signal_findpeaks(-1 * metric_values, relative_height_min=0.1, relative_max=True)[
"Peaks"
]
+ except ValueError:
+ warn(
+ "First l... |
Add method SEARCH to allowed method
I found method SEARCH used in Photos | @@ -199,7 +199,7 @@ SecRule REQUEST_FILENAME "@rx /(?:remote|index|public)\.php/" \
t:none,\
nolog,\
ver:'OWASP_CRS/3.3.0',\
- setvar:'tx.allowed_methods=%{tx.allowed_methods} PUT PATCH CHECKOUT COPY DELETE LOCK MERGE MKACTIVITY MKCOL MOVE PROPFIND PROPPATCH UNLOCK REPORT TRACE jsonp'"
+ setvar:'tx.allowed_methods=%{tx... |
Don't exec `celery`
If we do, flower is killed | @@ -13,4 +13,4 @@ fi
sleep 10
echo "==> $(date +%H:%M:%S) ==> Running Celery beat <=="
celery -C -A config.celery_app flower &
-exec celery -C -A config.celery_app beat -S django_celery_beat.schedulers:DatabaseScheduler --loglevel $log_level
+celery -C -A config.celery_app beat -S django_celery_beat.schedulers:Database... |
fix: Don't add currency field if it does not exist
closes | @@ -595,7 +595,9 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView {
add_currency_column(fieldname, doctype, col_index) {
// Adds dependent currency field if required
const df = frappe.meta.get_docfield(doctype, fieldname);
- if (df && df.fieldtype === 'Currency' && df.options && !df.options.i... |
Project quota validation
Before project creation, the budget quota is validated | @@ -125,6 +125,7 @@ public class ProjectServiceImpl implements ProjectService {
return projectDAO.getProjectsByEndpoint(endpointName);
}
+ @BudgetLimited
@Override
public void create(UserInfo user, ProjectDTO projectDTO, String projectName) {
if (!projectDAO.get(projectDTO.getName()).isPresent()) {
|
[S1.OSV.catch] fixed bug in stopping search if no files found on page 1
the number of pages are now read directly from the URL return of page 1
and those pages are then searched | @@ -155,6 +155,8 @@ class OSV(object):
address, outdir = self._typeEvaluate(osvtype)
# a dictionary for storing the url arguments
query = {'page': 1}
+ # a list of pages to be searched; will be extended during url readout
+ pages = [1]
if sensor in ['S1A', 'S1B']:
query['sentinel1__mission'] = sensor
@@ -189,7 +191,7 @... |
docs: Add communication guidance to mentor guide.
Also link to GSoC's mentor guide. | @@ -14,6 +14,10 @@ and help make sure that everything is on track. You are also expected to help
program administrators keep an eye on your mentee's progress, and flag any
concerns you might have.
+Mentors can refer to the excellent [GSoC Mentor
+Guide](https://google.github.io/gsocguides/mentor/) for detailed guidance... |
[tune] Remove _pause and related method in RayTrialExecutor.
Removes legacy code path that is never invoked | @@ -22,7 +22,7 @@ from ray.actor import ActorHandle
from ray.exceptions import GetTimeoutError
from ray import ray_constants
from ray._private.resource_spec import NODE_ID_PREFIX
-from ray.tune.error import AbortTrialExecution, TuneError
+from ray.tune.error import AbortTrialExecution
from ray.tune.logger import NoopLo... |
gen2-social-distancing: use latest OpenVINO,
remove `setOpenVINOVersion`, as the version was not specified to blobconverter | @@ -15,7 +15,7 @@ class DepthAI:
log.info("Creating DepthAI pipeline...")
pipeline = dai.Pipeline()
- pipeline.setOpenVINOVersion(dai.OpenVINO.Version.VERSION_2021_2)
+ #pipeline.setOpenVINOVersion(dai.OpenVINO.Version.VERSION_2021_2)
# Define sources and outputs
camRgb = pipeline.createColorCamera()
|
Update extensions.py
comments may help | @@ -7,8 +7,10 @@ from flask_sqlalchemy import SQLAlchemy as _BaseSQLAlchemy
class SQLAlchemy(_BaseSQLAlchemy):
-
def apply_pool_defaults(self, app, options):
+ """
+ Set default engine options. We enable `pool_pre_ping` to be the default value.
+ """
options = super().apply_pool_defaults(app, options)
options["pool_pre... |
Update developing.rst
Fixing a small typo I noticed. | @@ -40,7 +40,7 @@ example::
self.message = message
def run(self, fileStore):
- return "Hello, world!, here's a message: %s" % self.message
+ return "Hello, world! Here's a message: %s" % self.message
In the example a class, HelloWorld, is defined. The constructor requests 2
|
[flake8] Fix C407 flake8 issue
use a generator instead a list inside filter | @@ -154,8 +154,8 @@ class MWSite(object):
self.version = list(filter(
lambda x: x.startswith('MediaWiki'),
- [l.strip()
- for l in d['error']['*'].split('\n')]))[0].split()[1]
+ (l.strip()
+ for l in d['error']['*'].split('\n'))))[0].split()[1]
except Exception:
pass
else:
|
Update molecule2d app.
Add back selected atom IDs callback and switch back to modifying model data directly. | @@ -55,8 +55,6 @@ residue = {
DATAPATH = os.path.join(".", "tests", "dashbio_demos", "sample_data", "mol2d_")
-residue = read_structure(file_path='{}aspirin.json'.format(DATAPATH))
-
def header_colors():
return {}
@@ -88,17 +86,18 @@ def layout():
def callbacks(app):
@app.callback(
- Output('mol2d-container', 'children... |
OpenColorIOTransformUI : Fix potential issue with colorspace presets
Sorting after the transformation to names could potentially yield an order that was different to that used for the values. Also reformatted for clarity. | @@ -44,12 +44,19 @@ import GafferImage
def colorSpacePresetNames( plug ) :
- return IECore.StringVectorData( [ "None" ] + sorted( map( lambda x: "Roles/{0}".format( x.replace( "_", " ").title() ), GafferImage.OpenColorIOTransform.availableRoles() ) ) + sorted( GafferImage.OpenColorIOTransform.availableColorSpaces() ) )... |
re-enable hetr gpu test
working locally for me now, not sure what changed | @@ -252,10 +252,9 @@ def test_simple_graph():
def test_gpu_send_and_recv():
- pytest.skip("error loading GPU driver in child process")
# First check whether do we have gputransformer available, if not, xfail
if 'gpu' not in transformer_choices():
- pytest.xfail("GPUTransformer not available")
+ pytest.skip("GPUTransfor... |
changelog: [IMP] add BREAKING syntax
Should result in something like:
```
changelog:
- [IMP] add BREAKING syntax
BREAKING: Line1 ...
Line 2 ...
Line 3 ...
``` | @@ -59,6 +59,11 @@ class GsGenerateChangeLogCommand(WindowCommand, GitCommand):
contributors.add(entry.author)
if entry.long_hash in ancestor:
messages.append("{} (Merge {})".format(entry.summary, ancestor[entry.long_hash]))
+ elif entry.raw_body.find('BREAKING:'):
+ pos_start = entry.raw_body.find('BREAKING:')
+ key_l... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.