message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
reduce number of points in bounding polygons
very high number of points causes performance issues in badly written
software | @@ -572,11 +572,11 @@ def calculate_polygonal_environment(im: PIL.Image.Image = None,
angle = np.arctan2(dir_vec[1], dir_vec[0])
if topline:
- upper_seam = geom.LineString(_calc_seam(baseline, upper_polygon, angle)).simplify(1)
- bottom_seam = geom.LineString(_calc_seam(offset_baseline, bottom_offset_polygon, angle)).s... |
BUG: fix for 2D
Fixed unit test for 2D, use only variable names that are common for all test instruments. | @@ -432,13 +432,12 @@ class TestBasics():
self.testInst.load(2009, 1)
# Ensure the desired data variable is present and delete all others
- self.testInst.data = self.testInst.data[['dummy1', 'mlt']]
+ self.testInst.data = self.testInst.data[['mlt']]
# Test output with one data variable
output = self.testInst.__str__()
... |
Fix the GPU trainer for NoneCalibration and RNN
Summary: Pull Request resolved: | @@ -1496,6 +1496,12 @@ class Net(object):
if device_option is not None:
ops = [copy.deepcopy(op) for op in ops]
map(lambda x: x.device_option.CopyFrom(device_option), ops)
+ for op in ops:
+ if op.type == "RecurrentNetwork":
+ for arg in op.arg:
+ if arg.name.endswith('step_net'):
+ for step_op in arg.n.op:
+ step_op.d... |
Update task.py
adding subtask shuffling to coqa task | @@ -19,6 +19,7 @@ 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):
@@ -61,8 +62,13 @@ class CoQA(task.Task):
)
def evaluate_model(self, model, max_examples=-1, rand... |
[varLib] Optimize GDEF VarStore when generating varfonts
Sweet... | @@ -518,6 +518,11 @@ def _merge_OTL(font, model, master_fonts, axisTags):
GDEF.Version = 0x00010003
GDEF.VarStore = store
+ # Optimize
+ varidx_map = store.optimize()
+ GDEF.remap_device_varidxes(varidx_map)
+ font['GPOS'].table.remap_device_varidxes(varidx_map)
+
# Pretty much all of this file should be redesigned and... |
Update _instrument.py
Minor improvement to concat_data docstring | @@ -707,7 +707,8 @@ class Instrument(object):
user provided value is used instead.
For xarray, dim='time' is passed along to xarray.concat
- except if the user includes a value as a keyword argument.
+ except if the user includes a value for dim as a
+ keyword argument.
Parameters
----------
|
Update rays.py
Cleanup regarding generators and detectors. Spearated the logic better. | @@ -9,11 +9,9 @@ Subclasses can provide a computed ray for Monte Carlo simulation.
"""
class Rays:
- def __init__(self, rays=[], maxCount=0, histogramOnly=False):
+ def __init__(self, rays=[]):
self.rays = rays
- self.maxCount = maxCount
self.iteration = 0
- self.histogramOnly = histogramOnly
# We cache these because t... |
tweak xla_bridge.py flags
* add environment variables for jax_disable_most_optimizations and
jax_cpu_backend_variant
* comment on the default values in help strings | @@ -30,7 +30,7 @@ from absl import logging
logging._warn_preinit_stderr = 0
import jax.lib
-from .._src.config import flags
+from .._src.config import flags, bool_env
from . import tpu_driver_client
from . import xla_client
from jax._src import util, traceback_util
@@ -52,21 +52,26 @@ flags.DEFINE_string(
'provided, --... |
Update interactive-message-buttons.rst
Fixed a small typo | @@ -76,7 +76,7 @@ Name
Give your action a descriptive name.
URL
- The actions are backed by an integration that handles HTTP POST requests when users clicks the message button. The URL parameter determines where this action is sent to. The request contains an ``application/json`` JSON string.
+ The actions are backed b... |
Only change what is essential for test fix
Revert change to keep list iteration
Fix method name typo | @@ -263,7 +263,6 @@ For example:
# Import python libs
from __future__ import absolute_import
-import collections
import difflib
import itertools
import logging
@@ -614,7 +613,7 @@ def _find_keep_files(root, keep):
'''
real_keep = set()
real_keep.add(root)
- if isinstance(keep, collections.Iterable):
+ if isinstance(kee... |
Update README.md
* Update README.md
add News section for zz request.
* Update README.md
* Update README.md | DGL is an easy-to-use, high performance and scalable Python package for deep learning on graphs. DGL is framework agnostic, meaning if a deep graph model is a component of an end-to-end application, the rest of the logics can be implemented in any major frameworks, such as PyTorch, Apache MXNet or TensorFlow.
<p align=... |
Pinning CircleCI image to the one used when build times were usual
(Consulted with CircleCI support). | @@ -8,7 +8,7 @@ version: 2
jobs:
quick-build:
docker:
- - image: circleci/python:3.6
+ - image: circleci/python@sha256:b568e83138255d4f0b89610ac18af53d4e2bd13c2e1b5538607ec3dc729e7eb4 # Pinning CircleCI image to the one used when build times were usual (Consulted with CircleCI support).
environment:
DISTRIB: "conda"
PY... |
fix don't report managing Adobe-only users when we haven't.
Needed to distinguish writing output file from management. | @@ -99,12 +99,11 @@ class RuleProcessor(object):
self.read_stray_key_map(options['stray_list_input_path'])
self.stray_list_output_path = options['stray_list_output_path']
- # determine whether we need to process strays at all
- self.will_process_strays = (not options['exclude_strays']) and (options['manage_groups'] or
... |
Add PHP-Noise API to Art & Design
PHP-Noise is a Noise-Background-Image-Generator.
The API is documented right under the form on the website. For more documentation, you can provide the help parameter to the API. | @@ -117,6 +117,7 @@ API | Description | Auth | HTTPS | CORS |
| [Icons8](http://docs.icons8.apiary.io/#reference/0/meta) | Icons | `OAuth` | Yes | Unknown |
| [Metropolitan Museum of Art](https://metmuseum.github.io/) | Met Museum of Art | No | Yes | Unknown |
| [Noun Project](http://api.thenounproject.com/index.html) ... |
Updated DNS Made Easy API Documentation link
* Updated DNS Made Easy API Documentation link
Updated API Docs link to the current one
* Reload CI | @@ -43,7 +43,7 @@ The current supported providers are:
- Dinahosting ([docs](https://en.dinahosting.com/api))
- DirectAdmin ([docs](https://www.directadmin.com/features.php?id=504))
- DNSimple ([docs](https://developer.dnsimple.com/))
-- DnsMadeEasy ([docs](http://www.dnsmadeeasy.com/pdf/API-Docv2.pdf))
+- DnsMadeEasy ... |
Update smokeloader.txt
and | @@ -333,7 +333,7 @@ statexadver3552ap93.club
statexadver3552mn12.club
swissmarine.club
zel.biz
-(advertmarin|advertserv|advertstat|advexmai|cmailadvert|dsmaild|kxserv|kxservxmar|mailadvert|mailserv|mailsmall|mailstat|sdstat|smantex|starserver|statexadver|zmailserv)[0-9][0-9a-z]+\.(com|club|world)
+(advertmarin|advertpa... |
[tune/release] Make long running distributed PBT cheaper
The test currently uses 6 GPUs out of 8 available, so we can get rid of one instance.
Savings will be 25% for one instance less (3 instead of 4). | @@ -10,8 +10,8 @@ head_node_type:
worker_node_types:
- name: worker_node
instance_type: g3.8xlarge
- min_workers: 3
- max_workers: 3
+ min_workers: 2
+ max_workers: 2
use_spot: false
aws:
|
Update hive_ransomware.txt
Minor update for Ref section | # See the file 'LICENSE' for copying permission
# Reference: https://twitter.com/fbgwls245/status/1408632067181604865
+# Reference: https://otx.alienvault.com/pulse/60db5d29be7b348bae7da15f
# Reference: https://www.virustotal.com/gui/file/77a398c870ad4904d06d455c9249e7864ac92dda877e288e5718b3c8d9fc6618/detection
hivecu... |
scripts/eddn-report: EliteLogAgent latest is 2.0.0.660
This allows for ignoring the ancient 0.9.2.412 that showed some errors
yesterday. | @@ -174,6 +174,11 @@ def process_file(input_file: str) -> None:
else:
print(line)
+ elif matches.group('software_name') == 'EliteLogAgent':
+ # Apparently a Barry Carylon project, but no home page ?
+ if matches.group('software_version') == '2.0.0.660':
+ print(line)
+
##################################################... |
Update login.html
Use SITE_NAME for login box title on login page (with default value).
This can be useful when using multiple powerdns admin in an organization. | <body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
- <a href="{{ url_for('index.index') }}"><b>{{ SITE_NAME }}</b></a>
+ <a href="{{ url_for('index.index') }}">
+ {% if SETTING.get('site_name') %}
+ <b>{{ SITE_NAME }}</b>
+ {% else %}
+ <b>PowerDNS</b>-Admin
+ {% endif %}
+ </a>
... |
Cabana: fix auto zoom y-axis for multiple line series
auto zoom y-axis for multiple series | @@ -365,10 +365,10 @@ void ChartView::updateAxisY() {
}
} else {
for (auto &s : sigs) {
- for (int i = 0; i < s.series->count(); ++i) {
- double y = s.series->at(i).y();
- if (y < min_y) min_y = y;
- if (y > max_y) max_y = y;
+ auto begin = std::lower_bound(s.vals.begin(), s.vals.end(), axis_x->min(), [](auto &p, doubl... |
[IMPR] Faster lookup for write actions
Use a set instead a tuple for loopup which is upto
20 times faster. | @@ -1221,7 +1221,7 @@ class Request(MutableMapping):
# Actions that imply database updates on the server, used for various
# things like throttling or skipping actions when we're in simulation
# mode
- self.write = self.action in (
+ self.write = self.action in {
'block', 'clearhasmsg', 'createaccount', 'delete', 'edit... |
Slight correction on nu_to_M for circular orbits
Corrected to simply the nu_to_M case for circular orbit (M=E=nu @ e=0) | @@ -13,7 +13,7 @@ def danby_coe(k, p, ecc, inc, raan, argp, nu, tof, numiter=20, rtol=1e-8):
if ecc == 0:
# Solving for circular orbit
- M0 = E_to_M(nu_to_E(nu, ecc), ecc)
+ M0 = nu # for circular orbit M = E = nu
M = M0 + n * tof
nu = M - 2 * np.pi * np.floor(M / 2 / np.pi)
return nu
|
shell/pkgcore.sh: _choose(): break retry loop after 3 invalid inputs
[skip ci] | @@ -27,20 +27,30 @@ unset PKGSHELL SCRIPTDIR
# usage: _choose "${array[@]}"
# returns: index of array choice (assuming array indexing starts at 1)
_choose() {
- local choice x i=0 num_opts=$#
+ local choice num_opts=$#
+
+ # show available choices
+ local x i=0
for x in $@; do
echo " $(( ++i )): ${x}" >&2
done
+
+ # re... |
Transfers: fix exceptions in globus poller. Closes
Globus tries to set transfer to success without an external id.
Also, __str__ for the globus transfertool can return None, which is
not expected for this method. | @@ -57,10 +57,11 @@ def bulk_group_transfers(transfer_paths, policy='single', group_bulk=200):
class GlobusTransferStatusReport(TransferStatusReport):
supported_db_fields = [
- 'state'
+ 'state',
+ 'external_id',
]
- def __init__(self, request_id, globus_response):
+ def __init__(self, request_id, external_id, globus_r... |
Stop leaking file descriptors
and other tidying | @@ -20,8 +20,9 @@ def init_save_file(webui: "RedWebUi") -> str:
fd, webui.save_path = tempfile.mkstemp(
prefix="", dir=webui.config["save_dir"]
)
+ os.close(fd)
return os.path.split(webui.save_path)[1]
- except (OSError, IOError):
+ except OSError:
# Don't try to store it.
pass
return None # should already be None, but... |
[internal] Re-enable skipped JVM inference tests.
Fixes
[ci skip-build-wheels] | @@ -325,7 +325,7 @@ def test_infer_java_imports_same_target_with_cycle(rule_runner: RuleRunner) -> N
) == InferredDependencies(dependencies=[target_a.address])
-@pytest.mark.xfail(reason="https://github.com/pantsbuild/pants/issues/13056")
+@maybe_skip_jdk_test
def test_dependencies_from_inferred_deps(rule_runner: RuleR... |
Update 1.0.8 Changelog
Update CHANGES.md | * With the new `cron_schedule` argument to `TimeWindowPartitionsDefinition`, you can now supply arbitrary cron expressions to define time window-based partition sets.
* Graph-backed assets can now be subsetted for execution via `AssetsDefinition.from_graph(my_graph, can_subset=True)`.
* `RunsFilter` is now exported in ... |
Prevent a race between registering and shutting down a service
May also help with the test issue seen in and worked around in | @@ -186,6 +186,9 @@ class ClientMonitor(object):
if not isinstance(message, tuple):
raise TypeError("Expected tuple, got " + str(type(message)))
command, arg = message
+ with lock:
+ if exiting.is_set():
+ raise RuntimeError("service is exiting, cannot connect")
if command == "register":
process = psutil.Process(int(ar... |
log2html: Render log entries with javascript
Instead of generating a static file, save log data as JSON and render it
dynamically with javascript. This is in preparation to support live
filtering on things like debug level and log content. | import os
import re
import sys
+import json
import logging
import argparse
@@ -32,20 +33,46 @@ HTML_TEMPLATE = """<head>
overflow-x: auto;
}}
</style>
+ <script>
+ var content = {content};
+
+ function createEntry(entry) {{
+ var outer = document.createElement("div");
+ outer.className = "box_log";
+
+ var details = do... |
better YAML conversion support
Expand the conversion tool to support optionally providing the
hardware role name, the IPMI username and the IPMI password | @@ -36,7 +36,7 @@ import sys
import yaml
-def to_yaml(path, cluster_name):
+def to_yaml(path, cluster_name, hardware_type, ipmi_username, ipmi_password):
"""
Opens and reads the given file, which is assumed to be in cluster.txt
format. Returns a string with cluster.txt converted to YAML or dies trying.
@@ -64,11 +64,11... |
Fix named arguments after kwargs
In Python3, you're unable to send named parameters after **kwargs
* Use single quotes | @@ -1281,7 +1281,8 @@ class TelegramClient(TelegramBareClient):
def send_voice_note(self, *args, **kwargs):
"""Wrapper method around .send_file() with is_voice_note=True"""
- return self.send_file(*args, **kwargs, is_voice_note=True)
+ kwargs['is_voice_note'] = True
+ return self.send_file(*args, **kwargs)
def _send_al... |
configure-system: Skip some steps on virtual
Do not configure processor microcode or IPMI on virtual
builds; it's time consuming and pointless.
This improves build time of a 1h1w by ~2% in my lab. | # IPMI module configuration and loading
+- name: Configure the kernel's IPMI module
+ block:
- name: Load ipmi_devintf kernel module
modprobe:
name: ipmi_devintf
mode: '0644'
vars:
kernel_module_name: ipmi_devintf
+ when: ansible_virtualization_role == "NA"
# ip_conntrack module configuration and loading
- name: Config... |
Fix `intersphinx_mapping` in the Sphinx config
Allows Sphinx linking of classes, functions, and modules
across projects, e.g. :class:`~mxnet.gluon.HybridBlock`. | # documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
-# import sys
+import sys
+
# sys.path.insert(0, os.path.abspath('.'))
@@ -176,4 +177,10 @@ texinfo_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {'https://... |
offset baseline separators from actual baseline in dataset
Otherwise our postprocessor produced cut off lines | @@ -596,12 +596,18 @@ class BaselineSet(Dataset):
return self.transform(im, target)
@staticmethod
- def _get_ortho_line(lineseg, point):
+ def _get_ortho_line(lineseg, point, line_width, offset):
lineseg = np.array(lineseg)
norm_vec = lineseg[1,...] - lineseg[0,...]
norm_vec_len = np.sqrt(np.sum(norm_vec**2))
unit_vec ... |
[modules/git] Fix recursion error
Endless loop caused by stupid bug when trying to find the root git
repository. | @@ -22,7 +22,7 @@ class Module(bumblebee.engine.Module):
super(Module, self).__init__(engine, config,
bumblebee.output.Widget(full_text=self.gitinfo)
)
- self._fmt = self.parameter("format", "{branch}")
+ self._fmt = self.parameter("format", "{branch} - {directory}")
def gitinfo(self, widget):
info = ""
@@ -35,16 +35,1... |
added docstring to download multi pdf
also made the PDF name as a parameter which is passed by the user | @@ -17,7 +17,44 @@ standard_format = "templates/print_formats/standard.html"
@frappe.whitelist()
def download_multi_pdf(doctype, name, format=None):
- # name can include names of many docs of the same doctype.
+ """
+ Concatenate multiple docs as PDF .
+
+ Returns a PDF compiled by concatenating multiple documents. The... |
Don't generate core name when adding core to corepool.
When core frome corepool is added to cache, it's old name is loaded and cores
in corepool cannot be referenced by name anyway so new name is not needed. | @@ -534,8 +534,7 @@ int cache_mngt_prepare_core_cfg(struct ocf_mngt_core_config *cfg,
struct kcas_insert_core *cmd_info)
{
struct block_device *bdev;
- static char core_name[OCF_CORE_NAME_SIZE];
- struct cache_priv *cache_priv;
+ char core_name[OCF_CORE_NAME_SIZE] = {};
ocf_cache_t cache;
uint16_t core_id;
int result;
... |
Added drop_nodes call to tests/constants.py
Also rearanged dropping: Network (+Edges) -> Nodes (+Modifications) -> Namespaces -> Annotations | @@ -6,14 +6,13 @@ import tempfile
import unittest
from json import dumps
-from requests.compat import urlparse
-
from pybel import BELGraph
from pybel.constants import *
from pybel.manager.cache import CacheManager
from pybel.parser.parse_bel import BelParser
from pybel.parser.parse_exceptions import *
from pybel.parse... |
Fix tests again
Third times the charm to fix a find-replace error this time. | @@ -1055,7 +1055,7 @@ def test_xmp_sidecar_gps():
<rdf:li>London</rdf:li>
<rdf:li>United Kingdom</rdf:li>
<rdf:li>London 2018</rdf:li>
- <rdf:li>St. James''s Park</rdf:li>
+ <rdf:li>St. James's Park</rdf:li>
</rdf:Seq>
</digiKam:TagsList>
</rdf:Description>
|
Add the stemming library to the docker file
Stemming is a useful tool for text preprocessing, and would be nice to have available in the kernels notebook | @@ -306,6 +306,7 @@ RUN pip install --upgrade mpld3 && \
pip install python-louvain && \
pip install pyexcel-ods && \
pip install sklearn-pandas && \
+ pip install stemming && \
##### ^^^^ Add new contributions above here
# clean up pip cache
rm -rf /root/.cache/pip/* && \
|
Add fake entry for process testing
Add `| Dave Machado | Dave Machado's Website | No | Yes | [Go!](http://www.davemachado.com) |` under `Development` for testing of deployment script and updating JSON. | @@ -155,6 +155,7 @@ API | Description | Auth | HTTPS | Link |
| Adorable Avatars | Generate random cartoon avatars | No | Yes | [Go!](http://avatars.adorable.io) |
| APIs.guru | Wikipedia for Web APIs, OpenAPI/Swagger specs for public APIs | No | Yes | [Go!](https://apis.guru/api-doc/) |
| CDNJS | Library info on CDNJS... |
[Chore] Add password-filename daemons' modules option
Problem: Currently modules don't support password-encrypted keys.
Solution: Add a password-filename option that allows providing password
for the password-endcrypted keys. | @@ -37,6 +37,13 @@ rec {
'';
};
+ passwordFilename = mkOption {
+ type = types.nullOr types.path;
+ default = null;
+ description = ''
+ Path to the file with passwords that can be used to decrypt encrypted keys.
+ '';
+ };
};
genDaemonConfig = { instancesCfg, service-name, service-pkgs, service-start-script, service-p... |
New session per request, or context manager
Mimics the behaviour of the Session class of the requests library | @@ -47,9 +47,10 @@ class Requests(object):
Wraps the requests library to simplify use with JSON REST APIs.
Sets auth headers automatically, and requests JSON responses by
- default. To accommodate authenticating non-API requests easily, it
- uses a single session across all requests made with the same
- instance.
+ def... |
Update sentinel-2.yaml
Hi, I've just added my tutorial. I did this because a lot of the content I found online was outdated and not working. | @@ -65,6 +65,10 @@ Resources:
Type: SNS Topic
DataAtWork:
Tutorials:
+ - Title: How to Work with Landsat and Sentinel-2 on AWS with Python
+ URL: https://www.matecdev.com/posts/landsat-sentinel-aws-s3-python.html
+ AuthorName: Martin D. Maas
+ AuthorURL: https://www.matecdev.com
- Title: Getting Started With Geospatial... |
Fix typo
changed header to header.txt | @@ -23,7 +23,7 @@ recipe:
head -n1 dbNSFP*_variant.chrM > $UNPACK_DIR/header.txt
rm dbNSFP*_variant.chrM
# unzip only files with chromosomal info, eg. skip genes and readme.
- cat $UNPACK_DIR/header > dbNSFP.txt
+ cat $UNPACK_DIR/header.txt > dbNSFP.txt
unzip -p dbNSFPv*.zip "dbNSFP*_variant.chr*" | grep -v '^#chr' | s... |
Remove alpha warning for 'projects.create' API.
No longer alpha / invite-only.
Closes | @@ -23,18 +23,6 @@ With this API, you can do the following:
Don't forget to look at the :ref:`Authentication` section below.
It's slightly different from the rest of this library.
-.. warning::
-
- Alpha
-
- The `projects.create() API method`_ is in the Alpha stage. It might be changed in
- backward-incompatible ways a... |
swap vanguard with yield curve for a more pleasant gallery viewing
experience | @@ -114,7 +114,23 @@ layout = html.Div(className='gallery', children=[
and to push data.
''',
),
+ AppSection(
+ app_name='3-D Yield Curve',
+ app_link='https://dash-yield-curve.plot.ly',
+ code_link='https://github.com/plotly/dash-yield-curve',
+ img_src='assets/images/gallery/dash-yield-curve-app.png',
+ description=... |
Pickling DateTime Objects with Timezones
Closes | @@ -28,6 +28,9 @@ class StaticTzInfo(tzinfo):
raise ValueError('Not naive datetime (tzinfo is already set)')
return dt.replace(tzinfo=self)
+ def __getinitargs__(self):
+ return self.__name, self.__offset
+
def pop_tz_offset_from_string(date_string, as_offset=True):
for name, info in _tz_offsets:
|
Additional operator information values
Summary:
Pull Request resolved:
Closes
Modified the values reported by the benchmarking platform to include tensor_shape and op_args. These values have a different naming scheme to values like flops and latency. | namespace caffe2 {
const std::string NetObserverReporterPrint::IDENTIFIER = "Caffe2Observer ";
+static std::string get_op_args(PerformanceInformation p);
+static std::string get_tensor_shapes(PerformanceInformation p);
void NetObserverReporterPrint::report(
NetBase* net,
@@ -27,6 +29,9 @@ void NetObserverReporterPrint:... |
Python3.5: Fixup for versions before 3.5.2
* The API used was introduced in a minor version.
* While at it, inline the copy with our own stuff for slight increase
in speed. | @@ -89,6 +89,49 @@ static void Nuitka_Generator_entry_point( struct Nuitka_GeneratorObject *generat
}
#endif
+#if PYTHON_VERSION >= 300
+static void Nuitka_SetStopIterationValue( PyObject *value )
+{
+ CHECK_OBJECT( value );
+
+#if PYTHON_VERSION <= 352
+ PyObject *args[1] = { value };
+ PyObject *stop_value = CALL_FUN... |
use new setting for part-actions
PR complete for | {% block content %}
+{% settings_value 'BUY_FUNCTION_ENABLE' as enable_buy %}
+{% settings_value 'SELL_FUNCTION_ENABLE' as enable_sell %}
+{% settings_value 'PO_FUNCTION_ENABLE' as enable_po %}
+{% settings_value 'STOCK_FUNCTION_ENABLE' as enable_stock %}
+
<div class="panel panel-default panel-inventree">
<!-- Default... |
Implement workaround for
Symptom was:
File "/usr/local/lib/python3.6/asyncio/streams.py", line 214, in _drain_helper
assert waiter is None or waiter.cancelled() | @@ -28,6 +28,8 @@ class Link(s_coro.Fini):
self.sock = self.writer.get_extra_info('socket')
+ self._drain_lock = asyncio.Lock(loop=plex.loop)
+
# disable nagle ( to minimize latency for small xmit )
self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
# enable TCP keep alives...
@@ -83,6 +85,8 @@ class Link(... |
Remove code climate upload from docker
During the afterbuild phase it was giving an error for
fatal: not a git repository (or any parent up to mount point /). | @@ -48,12 +48,6 @@ jobs:
uses: ./.github/actions/setup_and_test
with:
xvfb_command: 'xvfb-run'
- - name: Upload Code Coverage to Code Climate
- uses: paambaati/codeclimate-action@v3.0.0
- env:
- CC_TEST_REPORTER_ID: 05f6288b94a87daa172d3e96a33ec331a4374be7d01eb9a42b3b21c4c550a8ff
- with:
- coverageCommand: poetry run c... |
Compliance Export CSV version correction
Corrected the version of Mattermost where CSV files will not be limited to a specific number of rows from v5.35 to v5.36. | @@ -100,7 +100,7 @@ When run manually via the System Console, ``.csv`` and Actiance XML files are wr
Is there a maximum row limit for CSV files?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-No. From Mattermost Server v5.35, there's no limit to the number of rows within Compliance Monitoring CSV files.
+No. From Matterm... |
export/html: Document page: styles for <blockquote>
Closes | @@ -67,6 +67,12 @@ pre.code {
font-family: var(--code-font-family);
}
+blockquote {
+ color: #666;
+ padding: .25em 0 0.25em 1rem;
+ border-left: 4px solid #ccc;
+}
+
a.reference.external {
display: inline-block;
max-width: 100%;
|
pass daemon to Commands instance in qt console.
follow | @@ -2184,9 +2184,12 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
'lnutil': lnutil,
})
- c = commands.Commands(config=self.config,
+ c = commands.Commands(
+ config=self.config,
+ daemon=self.gui_object.daemon,
network=self.network,
callback=lambda: self.console.set_json(True))
+
methods = {}
def mkfun... |
Github workflows : Use Python script for Arnold versions
MSVC has trouble building from a bash shell. See | @@ -177,21 +177,38 @@ jobs:
- name: Build and test Arnold extension
run: |
- for arnoldVersion in 6.2.0.1 7.0.0.2
- do
- # Install Arnold
- ./.github/workflows/main/installArnold.py --version $arnoldVersion
- export ARNOLD_ROOT=$GITHUB_WORKSPACE/arnoldRoot/$arnoldVersion
+ import subprocess
+ import sys
+ import os
+
+... |
wsrtsegmented: dont skip over a bunch of text
for some reason this code skipped over the first lines in a single
segmented file and the end of it. | @@ -367,7 +367,6 @@ def _wrstsegments(entries: list) -> str:
time = float(re.search(r"X-TIMESTAMP-MAP=MPEGTS:(\d+)", t).group(1)) / 90000
if time > 0:
time -= 10
- text = text[3 : len(text) - 2]
itmes = []
if len(text) > 1:
for n in text:
|
More tests for rebalance_missing_suppression_count
This option already has everything ops needs to control client/server
error responses during rebalance; we should document it's expected use
more effectively. | @@ -1627,6 +1627,31 @@ class TestReplicatedObjController(CommonObjectControllerMixin,
policy_opts.rebalance_missing_suppression_count = 2
do_test([Timeout(), 404, 404], 503)
+ # overloaded primary after double rebalance
+ # ... opts should increase rebalance_missing_suppression_count
+ policy_opts.rebalance_missing_sup... |
Fix mypy issue with torch.linalg
* add a compatibiliy stub for torch solve
* change missing _torch_solve_cast calls
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see
* bump pytorch version to 1.7.1
* Fix mypy issue with torch.linalg | @@ -3,7 +3,10 @@ import torch
from packaging import version
if version.parse(torch.__version__) > version.parse("1.7.1"):
- from torch.linalg import solve
+ # TODO: remove the type: ignore once Python 3.6 is deprecated.
+ # It turns out that Pytorch has no attribute `torch.linalg` for
+ # Python 3.6 / PyTorch 1.7.0, 1.... |
Properly check for pre-moderation workflow
[#PLAT-921] | @@ -162,12 +162,12 @@ class PreprintSerializer(TaxonomizableSerializerMixin, JSONAPISerializer):
return 'https://dx.doi.org/{}'.format(obj.article_doi) if obj.article_doi else None
def get_preprint_doi_url(self, obj):
+ doi = None
doi_identifier = obj.get_identifier('doi')
if doi_identifier:
doi = doi_identifier.value
... |
Update manipulate.py
Just altered findall to find_all | @@ -16,7 +16,7 @@ class Manipulate(object):
manipulate:
- <destination field>:
- [findall]: <boolean>
+ [find_all]: <boolean>
[phase]: <phase>
[from]: <source field>
[extract]: <regexp>
@@ -45,7 +45,7 @@ class Manipulate(object):
'extract': {'type': 'string', 'format': 'regex'},
'separator': {'type': 'string'},
'remove... |
Insist on credentials for testing AMI finding
Fix by only looking for the Flatcar AMI when we have AWS credentials | @@ -41,6 +41,8 @@ class AWSProvisionerBenchTest(ToilTest):
Tests for the AWS provisioner that don't actually provision anything.
"""
+ # Needs to talk to EC2 for image discovery
+ @needs_aws_ec2
def testAMIFinding(self):
for zone in ['us-west-2a', 'eu-central-1a', 'sa-east-1b']:
provisioner = AWSProvisioner('fakename',... |
Update fynloski.txt
Moved to ```cybergate``` | @@ -1075,12 +1075,6 @@ myhtrahdd-22322.portmap.io
178.124.140.136:2033
okechu.ddns.net
-# Reference: https://www.virustotal.com/gui/file/1bc564fed502e1c1769f39a9e2cdc214f1bde06357102403668428fe624f3faf/detection
-
-142.44.161.51:4338
-185.101.92.3:4338
-ales2018.myq-see.com
-
# Reference: https://www.virustotal.com/gui... |
Enhancement - Add raw_config_args option to providers
Adds raw_config_args support for providers.
Fixes a copy/paste typo in the raw_config_args support for instances. | @@ -81,6 +81,13 @@ Vagrant.configure('2') do |config|
end
}
end
+
+ # Raw Configuration
+ if provider['raw_config_args']
+ provider['raw_config_args'].each { |raw_config_arg|
+ eval("virtualbox.#{raw_config_arg}")
+ }
+ end
end
# The vagrant-vbguest plugin attempts to update packages
@@ -119,6 +126,13 @@ Vagrant.config... |
DomainExpr: switch to ComputingExpr
TN: | @@ -7,7 +7,7 @@ from langkit.compiled_types import (
from langkit.diagnostics import check_multiple, check_source_language
from langkit.expressions.base import (
- AbstractExpression, CallExpr, LiteralExpr, PropertyDef, ResolvedExpression,
+ AbstractExpression, CallExpr, ComputingExpr, LiteralExpr, PropertyDef,
constru... |
Return better errors on invalid API parameters
* Return better errors on invalid API parameters
For example:
```
{
"success": false,
"errors": {
"user_id": "value is not a valid integer"
}
}
``` | from functools import wraps
from flask import request
-from pydantic import create_model
+from pydantic import ValidationError, create_model
ARG_LOCATIONS = {
"query": lambda: request.args,
@@ -41,7 +41,18 @@ def validate_args(spec, location):
@wraps(func)
def wrapper(*args, **kwargs):
data = ARG_LOCATIONS[location]()
... |
fix BAU bill in proforma
escalation rate was raised to wrong year | @@ -1142,15 +1142,17 @@ def generate_proforma(scenariomodel, template_workbook, output_file_path):
current_row += 1
ws['A{}'.format(current_row)] = "Electricity bill without system ($)"
ws['B{}'.format(current_row)] = 0
- ws['C{}'.format(current_row)] = '={}'.format(year_one_bau_bill_cell)
electric_bau_costs_cell_serie... |
Installation for MacOS: use curl instead of wget
See issue - For consistency, change also the instructions for Linux. | @@ -16,12 +16,12 @@ package. The Python 3 version is recommended.
On MacOS, run::
- wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
+ curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
sh Miniconda3-latest-MacOSX-x86_64.sh
On Linux, run::
- wget https://repo.anaco... |
add options to classify text for labels and fmt
add option to classify_text on a label first TSV
similar to training format. Also add option to
not print the text output at all. Finally, add
a delimiter for output and switch default from
"," its previous default, to "\t" | @@ -20,16 +20,23 @@ def main():
parser.add_argument('--model_type', type=str, default='default')
parser.add_argument('--modules', default=[], nargs="+")
parser.add_argument('--scores', '-s', action="store_true")
+ parser.add_argument('--label_first', action="store_true", help="Use the second column")
+ parser.add_argum... |
Small update to signing region override logic
Only override the signing region if the arn region is used.
This ensures that if the client region is used, we will use the
signing region that the client was originally resolved to. | @@ -1388,10 +1388,9 @@ class S3EndpointSetter(object):
def set_endpoint(self, request, **kwargs):
if self._use_accesspoint_endpoint(request):
self._validate_accesspoint_supported(request)
- region_name = self._get_region_for_accesspoint_endpoint(request)
+ region_name = self._resolve_region_for_accesspoint_endpoint(
+ ... |
Reapply: Add support for PyTorch estimators
Commit was not correctly
applied during recent 1.5.0 release. | @@ -184,6 +184,24 @@ class TestImperceptibleASR:
except ARTTestException as e:
art_warning(e)
+ @pytest.mark.skipMlFramework("tensorflow", "mxnet", "kerastf", "non_dl_frameworks")
+ def test_loss_gradient_masking_threshold_torch(self, art_warning, asr_dummy_estimator, audio_batch_padded):
+ try:
+ test_delta = audio_ba... |
Remove mention of Python 2.7 from installation docs
Closes | @@ -52,15 +52,12 @@ Cutadapt installation requires this software to be installed:
Under Ubuntu, you may need to install the packages ``build-essential`` and
``python3-dev`` to get a C compiler.
-On Windows, you need `Microsoft Visual C++ Compiler for
-Python 2.7 <https://www.microsoft.com/en-us/download/details.aspx?id... |
[IMPR] Use pywikibot.__version__ for version informations
detached from | @@ -30,6 +30,9 @@ repo_dir = abspath(join(docs_dir, '..'))
sys.path.insert(0, repo_dir)
os.chdir(repo_dir)
+os.environ['PYWIKIBOT_NO_USER_CONFIG'] = '1'
+import pywikibot # noqa: E402
+
# -- General configuration ----------------------------------------------------
# If your documentation needs a minimal Sphinx version... |
Fixed typo in normalize() function.
Changed 'channely' to 'channel' in the comments of normalize function. | @@ -192,7 +192,7 @@ def normalize(tensor, mean, std, inplace=False):
Args:
tensor (Tensor): Tensor image of size (C, H, W) to be normalized.
mean (sequence): Sequence of means for each channel.
- std (sequence): Sequence of standard deviations for each channely.
+ std (sequence): Sequence of standard deviations for eac... |
FIX: Force tuple elements to have the same dtype
Fix | @@ -85,7 +85,7 @@ def _support_enumeration_gen(payoff_matrices):
n_min = min(nums_actions)
for k in range(1, n_min+1):
- supps = (np.arange(k), np.empty(k, np.int_))
+ supps = (np.arange(0, k, 1, np.int_), np.empty(k, np.int_))
actions = (np.empty(k+1), np.empty(k+1))
A = np.empty((k+1, k+1))
|
MAINT: Pin jinja2<3.1 to avoid breaking sphinx
Ref:
Note: jinja2 is not a requirement that we need to directlys specify. | @@ -61,6 +61,8 @@ doc =
nbsphinx
numpydoc>=0.9.1
sphinx>=3.0.0
+ # Ref: https://github.com/sphinx-doc/sphinx/issues/10291
+ jinja2<3.1
[options.package_data]
plotnine = plotnine/tests/baseline_images/**/*.png, plotnine/data/*.csv
|
bump required Python version to >=3.7
Python version 3.5 reached end of life in September 2020, version 3.6 in
December 2021. This patch drops support for both versions. | @@ -35,7 +35,7 @@ setup(
packages=['nutils', 'nutils.matrix'],
long_description=long_description,
license='MIT',
- python_requires='>=3.5',
+ python_requires='>=3.7',
install_requires=['numpy>=1.17', 'treelog>=1.0b5', 'stringly'],
extras_require=dict(
docs=['Sphinx>=1.6', 'scipy>=0.13', 'matplotlib>=1.3'],
|
Add '-E' options to pass proxy env for sudo
script install-deps.sh doesn't pass proxy options
INSTALLER_CMD="sudo -H ${PKG_MANAGER} -y install"
Added -E (similar to elsewhere in script) to allow dnf/yum
installation of packages.
Updated OS_FAMILY "Suse", "Debian" and "RedHat" for consistency.
Closes-bug: | @@ -14,7 +14,7 @@ CHECK_CMD_PKGS=(
# is installed
if [ -x '/usr/bin/zypper' ]; then
OS_FAMILY="Suse"
- INSTALLER_CMD="sudo -H zypper install -y"
+ INSTALLER_CMD="sudo -H -E zypper install -y"
CHECK_CMD="zypper search --match-exact --installed"
PKG_MAP=(
[gcc]=gcc
@@ -35,7 +35,7 @@ if [ -x '/usr/bin/zypper' ]; then
fi
e... |
Argument parsing and support currention functionality for
still need to add support for -o, -r, and -e options. | @@ -1683,24 +1683,28 @@ Paths or arguments that contain spaces must be enclosed in quotes
exit_msg = 'Leaving IPython, back to {}'.format(sys.argv[0])
embed(banner1=banner, exit_msg=exit_msg)
- show_parser = argparse.ArgumentParser(
- description='list past commands issued',
+ history_parser = argparse.ArgumentParser(
... |
PERF: Variable-size minutely cache.
Use a variable-size cache for minutely pricing data.
Increase the default cache size for close to 3000, since close prices
are used in many places in the simulation as the best-known price of
assets. This dramatically speeds up algorithms that read the prices of
many assets without o... | @@ -42,6 +42,7 @@ from zipline.data.bar_reader import BarReader, NoDataForSid, NoDataOnDate
from zipline.data.us_equity_pricing import check_uint32_safe
from zipline.utils.calendars import get_calendar
from zipline.utils.cli import maybe_show_progress
+from zipline.utils.compat import mappingproxy
from zipline.utils.me... |
Move location of adding calibration in _poisson
Unsure why, but if the calibration region is added at the end
versus at the beginning, the _poisson function segmentation
faults when decorated with numba.jit. Moving the calibration
region to the beginning alleviates this. | @@ -158,6 +158,10 @@ def radial(coord_shape, img_shape, golden=True, dtype=np.float):
def _poisson(nx, ny, max_attempts, radius_x, radius_y, calib, seed=None):
mask = np.zeros((ny, nx))
+ # Add calibration region
+ mask[int(ny / 2 - calib[-2] / 2):int(ny / 2 + calib[-2] / 2),
+ int(nx / 2 - calib[-1] / 2):int(nx / 2 + ... |
Remove duplicated Zuul job definition
Now neutron-tempest-dvr-ha-multinode-full has been replaced in tempest,
nova and devstack with neutron-ovs-tempest-dvr-ha-multinode-full. This
definition should be no longer needed. | availability_zone: nova
debug_iptables_rules: True
-# TODO(ralonsoh): remove this duplicated definition when "devstack",
-# "tempest" and "nova" adopt the new name.
-- job:
- name: neutron-tempest-dvr-ha-multinode-full
- parent: neutron-ovs-tempest-dvr-ha-multinode-full
-
- job:
name: neutron-ovs-tempest-multinode-full... |
Rewrite /app/version.json with correct CIRCLE_BUILD_URL
* Rewrite /app/version.json with correct CIRCLE_BUILD_URL
* Combine build, deploy, and release jobs
This is so that we don't have to touch the image again once it's built. | version: 2.0
jobs:
- build:
+ build-deploy: # build for the master branch
machine: true
working_directory: ~/addons-server
steps:
@@ -15,14 +15,32 @@ jobs:
"$CIRCLE_BUILD_URL"
> version.json
- run:
- name: Build docker image and save to cache
+ name: Build docker image and push to repo
command: |
docker build -t app:bu... |
kde speedup
Added an `nkde` option which resamples the underlying log-volume grid when
evaluating/plotting the KDE PDF. Should resolve | @@ -36,8 +36,8 @@ __all__ = ["runplot", "traceplot", "cornerpoints", "cornerplot",
"boundplot", "cornerbound", "_hist2d", "_quantile"]
-def runplot(results, span=None, logplot=False, kde=True, color='blue',
- plot_kwargs=None, label_kwargs=None, lnz_error=True,
+def runplot(results, span=None, logplot=False, kde=True, ... |
settings: Link to relevant help center articles in notification settings.
This provides a hook for users to get to these /help/ pages, which contain
details on exactly how these notifications/settings work, as well as
troubleshooting advice.
Fixes: | <div class="desktop_notifications m-10 {{#if for_realm_settings}}org-subsection-parent{{else}}subsection-parent{{/if}}">
<div class="subsection-header inline-block">
- <h3>{{t "Desktop message notifications" }}</h3>
+ <h3>{{t "Desktop message notifications" }}
+ {{> ../help_link_widget link="/help/desktop-notifications... |
README corrections
Use Python 3 print() statements | @@ -75,9 +75,9 @@ set containing them:
.. code:: python
- >>> import soco
- >>> for zone in soco.discover():
- ... print zone.player_name
+ >>> from soco import discover
+ >>> for zone in discover():
+ ... print(zone.player_name)
Living Room
Kitchen
@@ -86,7 +86,7 @@ If you prefer a list to a set:
.. code:: python
- >>... |
DOC: pip install tulip from GitHub in README
[ci skip] | @@ -24,6 +24,10 @@ consult https://tulip-control.sourceforge.io/doc/install.html
The next section describes how to build documentation.
A test suite is provided under ``tests/``. Consult the section "Testing" below.
+Pip can install the latest development version too::
+
+ pip install https://github.com/tulip-control/t... |
Lexical env: reformat Env_Getter documentation, add some privacy
TN: | @@ -61,34 +61,29 @@ package Langkit_Support.Lexical_Env is
type Getter_Fn_T is access
function (Self : Getter_State_T) return Lexical_Env;
- type Env_Getter (Dynamic : Boolean := False) is record
- case Dynamic is
- when True =>
- Getter_State : Getter_State_T;
- Getter_Fn : Getter_Fn_T;
- when False =>
- Env : Lexical... |
add 1 second delay to acc pedal alert
So that the screen wouldn't appear to "flicker" when openpilot is engaged while the acc pedal is being released | @@ -334,7 +334,7 @@ EVENTS: Dict[int, Dict[str, Union[Alert, Callable[[Any, messaging.SubMaster, boo
"openpilot will not brake while gas pressed",
"",
AlertStatus.normal, AlertSize.small,
- Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .0, .0, .1),
+ Priority.LOWEST, VisualAlert.none, AudibleAlert.none, .0, .0,... |
[ROCm] Add dlpack backend support
Depends on the Tensorflow commit included in this
PR | @@ -64,6 +64,14 @@ def from_dlpack(dlpack):
gpu_backend = xla_bridge.get_backend("cuda")
except RuntimeError:
gpu_backend = None
+
+ # Try ROCm if CUDA backend not found
+ if gpu_backend is None:
+ try:
+ gpu_backend = xla_bridge.get_backend("rocm")
+ except RuntimeError:
+ gpu_backend = None
+
buf = xla_client._xla.dl... |
cfn-lint: Restore iE3008 since the issue has been resolved
They just released the 1.18.1 version that fixes the | @@ -209,10 +209,9 @@ deps = cfn-lint
# E2504 disabled since does not allow two-digit numbers in ephemeral(n)
# W2507 disabled since we want to have nullable String type parameters
# E2523 disabled since we have both a Launch Template and Launch Configuration
-# iE3008 disabled because of https://github.com/awslabs/cfn-... |
typo
just fixing typo | @@ -48,7 +48,7 @@ n = 10
distribution1 = 'uniform'
Remin_value = 20.
Remax_value = 120.
-#Opton 2 - Lognormal-Uniform
+#Option 2 - Lognormal-Uniform
distribution2 = 'lognormal_uniform'
Remean = 4.
Restandard_deviation = 0.25
|
switch_to_containers: remove ceph-disk references
as of stable-4.0, ceph-disk is no longer supported. | - import_role:
name: ceph-defaults
- - name: collect running osds and ceph-disk unit(s)
- shell: |
- systemctl list-units | grep "loaded active" | grep -Eo 'ceph-osd@[0-9]+.service|ceph-disk@dev-[a-z]{3,4}[0-9]{1}.service|ceph-volume|ceph\.target'
- register: running_osds
- changed_when: false
- failed_when: false
-
- ... |
Remove unused TensorImpl dependencies
Summary: Pull Request resolved: | #include <ATen/core/TensorImpl.h>
#include <c10/core/Backend.h>
-#include <ATen/core/LegacyTypeDispatch.h>
#include <ATen/core/WrapDimMinimal.h>
-#include "c10/util/Optional.h"
-
-#include <ATen/core/VariableHooksInterface.h>
+#include <c10/util/Optional.h>
namespace at {
|
Update cp2k_check.py
Reverting back to default CP2K modulefile for gpu and mc checks | @@ -11,6 +11,7 @@ import reframe.utility.sanity as sn
class Cp2kCheck(rfm.RunOnlyRegressionTest):
def __init__(self):
self.valid_prog_environs = ['builtin']
+ self.modules = ['CP2K']
self.executable = 'cp2k.psmp'
self.executable_opts = ['H2O-256.inp']
@@ -50,7 +51,6 @@ class Cp2kCpuCheck(Cp2kCheck):
super().__init__()
... |
Update README
Added line | [](https://pypi.python.org/pypi/wikidataintegrator)
# Installation #
-The easiest way to install WikidataIntegrator is using `pip`
+The easiest way to install WikidataIntegrator is using `pip` or `pip3`. WikidataIntegrator supports python3.6 and higher, hence... |
Make sure image labels are ints
Sometimes these are numpy.int64, which doesn't work at least
in Python 3. | @@ -68,7 +68,7 @@ def image_generator(images, labels):
yield {
"image/encoded": [enc_string],
"image/format": ["png"],
- "image/class/label": [label],
+ "image/class/label": [int(label)],
"image/height": [height],
"image/width": [width]
}
|
Update init.yml (FortiOS 5.4)
Update init.yml (FortiOS 5.4) | @@ -17,6 +17,6 @@ prefixes:
host: (?<=devname=)(.*)(?=\s+devid=)
devid: (?<=devid=)(.*)(?=\s+logid=)
logid: (?<=logid=)(.*)(?=\s+type=)
- processName: ([^ ]+)
- tag: ([^ ]+)
- line: 'date={date} time={time} devname={host} devid={devid} logid={logid} {processName} {tag}'
+ processName: (?<=type=)(.*)(?=\s+subtype=)
+ ta... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.