message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
Added legendre_triple_product
Analytical solution of triple product of legendre polynomials | @@ -45,3 +45,14 @@ class Legendre(Polynomials):
l = np.sqrt(2) * l / st_lege_norm
return l
+
+ @staticmethod
+ def legendre_triple_product (k,l,m):
+
+ normk=1/((2*k)+1)
+ norml=1/((2*l)+1)
+ normm=1/((2*m)+1)
+ norm=np.sqrt(normm/(normk*norml))
+
+
+ return norm*(2*m+1)*Legendre.wigner_3j_PCE(k,l,m)**2
|
Update lang.py
account for nonetype being passed to language functions | @@ -3,8 +3,11 @@ from babelfish import Language
def getAlpha3TCode(code, default=None):
- code = code.strip().lower().replace('.', '')
lang = default or 'und'
+ if not code:
+ return lang
+
+ code = code.strip().lower().replace('.', '')
if len(code) == 3:
try:
@@ -26,8 +29,11 @@ def getAlpha3TCode(code, default=None):
... |
Update CODEOWNERS for distributed and rpc modules
Summary: Pull Request resolved:
Test Plan: Imported from OSS | /docs/cpp @goldsborough @ebetica @yf225
/torch/csrc/api/ @ebetica @goldsborough @yf225
/test/cpp/api/ @ebetica @goldsborough @yf225
-/torch/lib/c10d/ @pietern @mrshenli
-/torch/csrc/distributed/ @pietern @mrshenli
-/torch/distributed/ @apaszke @pietern @mrshenli
-/test/test_c10d.py @pietern @mrshenli
+/torch/lib/c10d/ ... |
[PersonalRoles] optimize code
"async with" not required for just reading data | @@ -121,7 +121,7 @@ class PersonalRoles(commands.Cog):
@checks.admin_or_permissions(manage_roles=True)
async def bl_list(self, ctx):
"""List of blacklisted role names"""
- async with self.config.guild(ctx.guild).blacklist() as blacklist:
+ blacklist = await self.config.guild(ctx.guild).blacklist()
pages = [chat.box(pag... |
fix profiler and self.inputs in process_results.py
profiler was not measuring all of the time consumed in process_results.py (especially not the outage simulator run as part of calc_avoided_outage_costs)
inputs passed to Results class was not attached to self | @@ -83,6 +83,7 @@ def process_results(self, dfm_list, data, meta, saveToDB=True):
:param saveToDB: boolean for saving postgres models
:return: None
"""
+ profiler = Profiler()
class Results:
@@ -108,13 +109,13 @@ def process_results(self, dfm_list, data, meta, saveToDB=True):
"gen_year_one_variable_om_costs",
]
- def _... |
Testsuite: reset StructMetaclass.entity_info
TN: | @@ -144,6 +144,7 @@ def reset_langkit():
StructMetaclass.astnode_types = []
StructMetaclass.struct_types = []
StructMetaclass.env_metadata = None
+ StructMetaclass.entity_info = None
Self.__dict__['_frozen'] = False
T._type_dict = {}
|
Update README.md
Point to new documentation on readthedocs.io | @@ -11,28 +11,24 @@ However, powerful business logic works in the background to ensure that stock tr
## Getting Started
-Refer to the [getting started guide](https://inventree.github.io/docs/start/install) for installation and setup instructions.
+Refer to the [getting started guide](https://inventree.readthedocs.io/en... |
Encode filename with sys.getfilesystemencoding()
On Linux, it remains utf-8.
On windows, broken filepaths with non-ascii characters are fixed with this patch. | @@ -1793,7 +1793,7 @@ references to the parent Dataset or Group.
if diskless and __netcdf4libversion__ < '4.2.1':
#diskless = False # don't raise error, instead silently ignore
raise ValueError('diskless mode requires netcdf lib >= 4.2.1, you have %s' % __netcdf4libversion__)
- bytestr = _strencode(str(filename))
+ byt... |
Update README
* Update README.md
* Typo fix for README
* Revert "Typo fix for README"
This reverts commit | BaseAxisPartition -> PandasOnRayAxisPartition -> {PandasOnRayColumnPartition, PandasOnRayRowPartition}
```
- `BaseAxisPartition` is a high level view onto BaseBlockPartitions' data. It is more
- convient to operate on `BaseAxisPartition` sometimes.
\ No newline at end of file
+ convenient to operate on `BaseAxisPartiti... |
defaults: fix CI issue with ceph_uid fact
The CI complains because of `ceph_uid` fact which doesn't exist since
the docker image tag used in the CI doesn't match with this condition. | ceph_uid: 64045
when:
- containerized_deployment
- - ceph_docker_image_tag | match("latest") or ceph_docker_image_tag | search("ubuntu")
+ - ceph_docker_image_tag | search("latest") or ceph_docker_image_tag | search("ubuntu")
- name: set_fact ceph_uid for Red Hat based system
set_fact:
|
[tests] Revert "Temporary deactivate wikidata default site tests"
This reverts commit | @@ -155,9 +155,8 @@ matrix:
env: LANGUAGE=test FAMILY=wikidata PYWIKIBOT_SITE_ONLY=1
- python: '3.4'
env: LANGUAGE=ar FAMILY=wiktionary PYWIKIBOT_TEST_NO_RC=1
- # T220999
- # - python: '3.6'
- # env: LANGUAGE=wikidata FAMILY=wikidata PYWIKIBOT_SITE_ONLY=1
+ - python: '3.6'
+ env: LANGUAGE=wikidata FAMILY=wikidata PYWIK... |
Playground should have red errors/tooltips when required config is missing
Summary:
issue:
'missing' state should be shown in the same style as 'invalid'
use explicit tooltip instead of div's title
Test Plan: {F159351}
Reviewers: nate, alangenfeld, max, bengotow | import * as React from "react";
import gql from "graphql-tag";
import styled from "styled-components/macro";
-import { Colors, Icon, Checkbox } from "@blueprintjs/core";
+import {
+ Colors,
+ Icon,
+ Checkbox,
+ Tooltip,
+ Intent,
+ Position
+} from "@blueprintjs/core";
import PythonErrorInfo from "../PythonErrorInfo";... |
[tests] Improvements for DeprecationTestCase
remove '.pyo' extension which was used by Python < 3.5 with -o option
avoid deeply nested flow control in _build_message | @@ -1408,7 +1408,7 @@ class DeprecationTestCase(DebugOnlyTestCase, TestCase):
self.warning_log = []
self.expect_warning_filename = inspect.getfile(self.__class__)
- if self.expect_warning_filename.endswith(('.pyc', '.pyo')):
+ if self.expect_warning_filename.endswith('.pyc'):
self.expect_warning_filename = self.expect_... |
Convert footnote to note
Github doesn't render footnotes correctly. | @@ -106,7 +106,10 @@ Once your PR has been merged, a GitHub action will automatically create the rele
After a couple minutes, check for the new release's appearance at https://pypi.org/project/cumulusci/
-Next, head to the Release object that was autocreated in the GitHub repository, edit it, paste in the changelog not... |
Update daylight-osm.yaml
added a few tags | @@ -5,11 +5,17 @@ Documentation: "[Project Website](https://daylightmap.org)"
Contact: osm@fb.com
ManagedBy: "[Meta](https://dataforgood.fb.com/)"
UpdateFrequency: Quarterly
+Collabs:
+ ASDI:
+ Tags:
+ - disaster response
# Collabs:
Tags:
- geospatial
- osm
- mapping
+ - disaster response
+ - sustainability
License: |
... |
Fix lint in test_utils.py
Summary:
Pull Request resolved:
ghimport-source-id:
Stack:
* **#17944 Fix lint in test_utils.py** | @@ -201,7 +201,7 @@ class TestCheckpoint(TestCase):
)
def test_checkpoint_rng_cpu(self):
- for i in range(5):
+ for _ in range(5):
inp = torch.randn(20000, device='cpu').requires_grad_()
phase1 = torch.nn.Dropout()
phase2 = torch.nn.Dropout()
@@ -229,7 +229,7 @@ class TestCheckpoint(TestCase):
@unittest.skipIf(not HAS_... |
TST: Add tests for datetime byteswaps and unicode byteswap casts
It seemst he unicode didn't actually help coverage, but here we go. | @@ -690,10 +690,28 @@ def test_datetime_string_conversion(self):
def test_time_byteswapping(self, time_dtype):
times = np.array(["2017", "NaT"], dtype=time_dtype)
times_swapped = times.astype(times.dtype.newbyteorder())
+ assert_array_equal(times, times_swapped)
unswapped = times_swapped.view(np.int64).newbyteorder()
a... |
Fixes Linksys.SPS2xx.get_mac_address_table
HG--
branch : feature/microservices | @@ -30,13 +30,12 @@ class Script(BaseScript):
vlan_oid = []
if mac is not None:
mac = mac.lower()
- for v in self.snmp.get_tables(["1.3.6.1.2.1.17.7.1.2.2.1.2"],
- bulk=True):
+ for v in self.snmp.get_tables(["1.3.6.1.2.1.17.7.1.2.2.1.2"]):
vlan_oid.append(v[0])
# mac iface type
- for v in self.snmp.get_tables(
- ["1.3... |
docs: Update Webmasters API sample
* docs: Update Webmasters API sample
webmasters@v3 has been merged into searchconsole@v1, so sample should be updated accordingly.
* docs: Update webmasters to searchconsole in method doc | @@ -55,7 +55,7 @@ argparser.add_argument('end_date', type=str,
def main(argv):
service, flags = sample_tools.init(
- argv, 'webmasters', 'v3', __doc__, __file__, parents=[argparser],
+ argv, 'searchconsole', 'v1', __doc__, __file__, parents=[argparser],
scope='https://www.googleapis.com/auth/webmasters.readonly')
# Fir... |
Plugins: Fix automatic heading style detection
Function was confused by headings of style
# MathJax <img src="url"> | @@ -73,10 +73,10 @@ class MdeMatchHeadingHashesDetector(MdeViewEventListener):
for h1, h2 in zip(
view.find_by_selector("markup.heading")[:10],
- view.find_by_selector("markup.heading - punctuation")[:10],
+ view.find_by_selector("markup.heading - punctuation.definition.heading")[:10],
):
num_leading += 1
- if h1.end()... |
call superclass __init__
hopefully this doesn't break anything.
it includes all the previous lines of this class's __init__ plus a few
lines about `excluded_states` that hopefully we either wanted or
are at least harmless. | @@ -21,10 +21,7 @@ class BeneficiaryExport(ExportableMixin, IcdsSqlData):
config.update({
'5_years': 60,
})
- self.config = config
- self.loc_level = loc_level
- self.show_test = show_test
- self.beta = beta
+ super(BeneficiaryExport, self).__init__(config, loc_level, show_test, beta)
@property
def group_by(self):
|
minor print formatting issue
used f-formatting instead | @@ -321,23 +321,21 @@ def revoke_grants(privs_to_revoke, dry_run=False, verbose=False, roles_by_slug=N
grants_to_revoke = []
for grantee_slug, priv_slugs in privs_to_revoke:
if grantee_slug not in roles_by_slug:
- logger.info('grantee %s does not exist.', grantee_slug)
+ logger.info(f'grantee {grantee_slug} does not ex... |
invert logic
I think this makes it easier to reason about | @@ -469,7 +469,7 @@ def rebuild_export(export_instance, last_access_cutoff=None, filters=None):
"""
Rebuild the given daily saved ExportInstance
"""
- if _should_not_rebuild_export(export_instance, last_access_cutoff):
+ if not _should_rebuild_export(export_instance, last_access_cutoff):
return
filters = filters or exp... |
Fix urllib usage in install.py
`getheader()` is no more in Python 3, use `get()` instead. | @@ -588,7 +588,7 @@ def _install_kraken_db(datadir, args):
db = os.path.join(kraken, base)
tooldir = args.tooldir or get_defaults()["tooldir"]
requests.packages.urllib3.disable_warnings()
- last_mod = urllib.request.urlopen(url).info().getheader('Last-Modified')
+ last_mod = urllib.request.urlopen(url).info().get('Last... |
Report IP in autoscaler DEBUG logging message
Fixes | @@ -616,7 +616,7 @@ class ScalerThread(ExceptionalThread):
for node, ip in ((node, node.privateIP) for node in provisionerNodes):
info = None
if ip not in recentMesosNodes:
- logger.debug("Worker node at %s is not reporting executor information")
+ logger.debug("Worker node at %s is not reporting executor information",... |
qt cpfp: (trivial) make some strings translatable
gettext was not picking these up | @@ -3306,17 +3306,17 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger):
return
d = WindowModalDialog(self, _('Child Pays for Parent'))
vbox = QVBoxLayout(d)
- msg = (
+ msg = _(
"A CPFP is a transaction that sends an unconfirmed output back to "
"yourself, with a high fee. The goal is to have miners confirm... |
Update mouse.py
Tap has been stubbed in, so the zoom mouse workaround is no longer needed. This used to crash on Windows. | @@ -100,13 +100,7 @@ class Actions:
def mouse_toggle_zoom_mouse():
"""Toggles zoom mouse"""
- if eye_zoom_mouse.zoom_mouse.enabled:
- try:
- eye_zoom_mouse.zoom_mouse.disable()
- except:
- eye_zoom_mouse.zoom_mouse.enabled = False
- else:
- eye_zoom_mouse.zoom_mouse.enable()
+ eye_zoom_mouse.toggle_zoom_mouse(not eye_z... |
Install typing for Mac
Summary:
Breaking this out of
When BUILD_CAFFE2 and BUILD_ATEN are removed, we need to install typing on Mac.
cc orionr
Pull Request resolved: | @@ -37,6 +37,12 @@ else
pip install --user pyyaml
fi
+ # Make sure that typing is installed for the codegen of building Aten to work
+ if [[ -n "$(python -c 'import typing' 2>&1)" ]]; then
+ echo "Installing typing with pip at $(which pip)"
+ pip install --user typing
+ fi
+
# Build protobuf compiler from third_party i... |
Update ug015_storm_ref_pivot.rst
Added documentation for join() | @@ -106,7 +106,46 @@ Optional parameters:
join()
------
-Todo
+Returns the current (working) set of nodes **and** the set of nodes that share a specified property of the same type / valu as the original set of nodes.
+
+``join()`` can be thought of as a ``pivot()`` that retains the original set of nodes and combines (j... |
Ensure that quickstart examples actually work.
Closes | @@ -66,12 +66,12 @@ messages to it
from google.cloud import pubsub
publisher = pubsub.PublisherClient()
- topic = 'projects/{project_id}/topics/{topic}'.format(
+ topic_name = 'projects/{project_id}/topics/{topic}'.format(
project_id=os.getenv('GOOGLE_CLOUD_PROJECT'),
topic='MY_TOPIC_NAME', # Set this to something appr... |
Update component.yaml to kfp v2 sdk
Update component.yaml to kfp v2 compatible. In v2,
you need to declare the data type for all of the input/output
arguments. | @@ -24,23 +24,23 @@ description: |
metadata:
annotations: {platform: 'OpenSource'}
inputs:
- - {name: model_id, description: 'Required. Training model ID', default: 'training-dummy'}
- - {name: epsilon, description: 'Required. Epsilon value for the FGSM attack', default: '0.2'}
- - {name: model_class_file, description:... |
Apply PR feedback:
add validation failed test to `push_msg` test | @@ -192,13 +192,13 @@ async def test_validate_msg(pubsubs_fsub, is_topic_1_val_passed, is_topic_2_val_
return True
def failed_sync_validator(peer_id, msg):
- raise ValidationError()
+ return False
async def passed_async_validator(peer_id, msg):
return True
async def failed_async_validator(peer_id, msg):
- raise Validat... |
doc(tutorial): Fix typo in waitress instructions
This should be a colon | @@ -129,7 +129,7 @@ since the latter doesn't work under Windows:
.. code:: bash
$ pip install waitress
- $ waitress-serve --port=8000 look.app
+ $ waitress-serve --port=8000 look:app
Now, in a different terminal, try querying the running app with curl:
|
Have a NodePort service for ambassador-admin, so that things in the cluster can talk to it.
Fixes | @@ -3,6 +3,22 @@ eval $(sh $HERE/../scripts/get_registries.sh)
cat <<EOF
---
+apiVersion: v1
+kind: Service
+metadata:
+ creationTimestamp: null
+ labels:
+ service: ambassador-admin
+ name: ambassador-admin
+spec:
+ type: NodePort
+ ports:
+ - name: ambassador-admin
+ port: 8888
+ targetPort: 8888
+ selector:
+ servic... |
Event Mgr Invalid function
Not sure what this effects, but there is no get_user_connection(user), so return was always False. | @@ -91,8 +91,8 @@ class EventManager(object):
'''
Returns bool if the given user has an open notify socket
'''
- connections = self.get_user_connection(user)
- return False if connections is None or len(connections) else True
+ connections = self.get_user_connections(user.team.id, user.id)
+ return False if connections... |
Content: update help channel claiming system
This commit changes the following inside the help channel guide:
* Only one help channel can be claimed at the same time
* You can use the search to find your channel
* The channel will close after 10 minutes if someone else sends a message | @@ -42,14 +42,14 @@ There are always 3 available help channels waiting to be claimed in the **Python
In order to claim one, simply start typing your question into one of these channels. Once your question has been posted, you have claimed this channel, and the channel will be moved down to the **Python Help: Occupied**... |
SUPP: More informative IntegrityError on duplicate columns
Closes
Author: Olof Asbrink
Closes from oasbrink/warning and squashes the following commits:
[Olof Asbrink] SUPP: More informative IntegrityError on duplicate columns | @@ -33,7 +33,11 @@ class Schema:
self._name_locs = dict((v, i) for i, v in enumerate(self.names))
if len(self._name_locs) < len(self.names):
- raise com.IntegrityError('Duplicate column names')
+ duplicate_names = list(self.names)
+ for v in self._name_locs.keys():
+ duplicate_names.remove(v)
+ raise com.IntegrityError... |
Update avcodecs.py
set maxrate with bitrate | @@ -859,6 +859,8 @@ class H265VAAPI(H265Codec):
# optlist.extend(['-vf', 'scale_vaapi=format=p010'])
# optlist.extend(['-hwaccel_output_format', 'vaapi'])
optlist.extend(['-vf', 'format=nv12,hwupload'])
+ if 'bitrate' in safe:
+ optlist.extend(['-maxrate:v', str(safe['bitrate']) + 'k'])
return optlist
|
Single source version
per
Fixes | # limitations under the License.
##############################################################################
+import os
+import re
+
from setuptools import setup, find_packages
-from pyquil import __version__
+
+HERE = os.path.abspath(os.path.dirname(__file__))
+
+
+def read(*parts):
+ with open(os.path.join(HERE, *... |
Update log.py
fix sysloghandler breaking windows | @@ -91,6 +91,14 @@ def checkLoggingConfig(configfile):
for k in defaults[s]:
if not config.has_option(s, k):
config.set(s, k, str(defaults[s][k]))
+
+ # Remove sysLogHandler if you're on Windows
+ if os.name == 'nt' and 'sysLogHandler' in config.get('handlers', 'keys'):
+ config.set('handlers', 'keys', config.get('hand... |
Add event_broker to ExampleTrackerStore
Custom tracker accepts optional event_broker parameter which needs to be
reflected in ExampleTrackerStore | @@ -109,9 +109,15 @@ def test_find_tracker_store(default_domain):
class ExampleTrackerStore(RedisTrackerStore):
- def __init__(self, domain, url, port, db, password, record_exp):
+ def __init__(self, domain, url, port, db, password, record_exp, event_broker=None):
super(ExampleTrackerStore, self).__init__(
- domain, ho... |
[2018.3] Update the latest release information for docs
2018.3.0 is new stable release
2017.7.5 is new previous stable release
2018.3 branch is the "latest" release branch | @@ -250,9 +250,9 @@ on_saltstack = 'SALT_ON_SALTSTACK' in os.environ
project = 'Salt'
version = salt.version.__version__
-latest_release = '2017.7.4' # latest release
-previous_release = '2016.11.9' # latest release from previous branch
-previous_release_dir = '2016.11' # path on web server for previous branch
+latest_... |
Fix script name Huawei.VRP get_fqdn
HG--
branch : feature/microservices | @@ -14,7 +14,7 @@ from noc.sa.interfaces.igetfqdn import IGetFQDN
class Script(BaseScript):
- name = "Cisco.IOS.get_fqdn"
+ name = "Huawei.VRP.get_fqdn"
interface = IGetFQDN
rx_hostname = re.compile(r"^sysname\s+(?P<hostname>\S+)", re.MULTILINE)
rx_hostname_lldp = re.compile(r"^System name\s+:\s*(?P<hostname>\S+)", re.... |
Update logical display regexp
Add predicted rotation regexp | # coding=utf-8
'''
-Copyright (C) 2012-2018 Diego Torres Milano
+Copyright (C) 2012-2022 Diego Torres Milano
Created on Dec 1, 2012
Licensed under the Apache License, Version 2.0 (the "License");
@@ -27,7 +27,7 @@ from typing import Optional
from com.dtmilano.android.adb.dumpsys import Dumpsys
-__version__ = '21.6.0'
+... |
SQLAlchemy transport: Use Query.with_for_update() instead of deprecated Query.with_lockmode().
Based on SQLAlchemy documentation:
* method sqlalchemy.orm.query.Query.with_lockmode(mode) with mode='update' - translates to FOR UPDATE (Deprecated since version 0.9)
* method sqlalchemy.orm.query.Query.with_for_update() Whe... | @@ -99,7 +99,7 @@ class Channel(virtual.Channel):
self.session.execute('BEGIN IMMEDIATE TRANSACTION')
try:
msg = self.session.query(self.message_cls) \
- .with_lockmode('update') \
+ .with_for_update() \
.filter(self.message_cls.queue_id == obj.id) \
.filter(self.message_cls.visible != False) \
.order_by(self.message_c... |
Pin graphene to <3.2
Summary & Motivation: It started breaking a ton of our tests. Doing this to unbork trunk
Test Plan: BK
Reviewers: alangenfeld, gibsondan, jmsanders
Pull Request: | @@ -34,7 +34,7 @@ def get_version() -> str:
packages=find_packages(exclude=["dagster_graphql_tests*"]),
install_requires=[
f"dagster{pin}",
- "graphene>=3",
+ "graphene>=3,<3.2",
"gql[requests]",
"requests",
"starlette", # used for run_in_threadpool utility fn
|
Update contributing.rst
new Discussion link | @@ -13,7 +13,7 @@ First off, thanks for taking the time to contribute!
and `Pandas <http://pandas.pydata.org/pandas*docs/stable/contributing.html>`_ contributing guides.
If you seek **support** for your argopy usage or if you don't want to read
-this whole thing and just have a question: `visit the chat room at gitter ... |
Moved assert to check out_path earlier.
Preserve temporary output directory with -d option. | @@ -36,9 +36,12 @@ class openram_test(openram_test):
os.chmod(out_path, 0o0750)
# specify the same verbosity for the system call
- verbosity = ""
+ opts = ""
for i in range(OPTS.debug_level):
- verbosity += " -v"
+ opts += " -v"
+ # keep the temp directory around
+ if not OPTS.purge_temp:
+ opts += " -d"
OPENRAM_HOME =... |
Fix static build on Windows
Summary:
Tested locally. It could be now be started by running `set EXTRA_CAFFE2_CMAKE_FLAGS= -DTORCH_STATIC=1` before build. If we want to make sure it works, then maybe we should add it into CI.
Pull Request resolved: | @@ -258,8 +258,8 @@ endif()
if (TORCH_STATIC)
- target_compile_definitions(torch PUBLIC TORCH_BUILD_STATIC_LIBS)
add_library(torch STATIC ${TORCH_SRCS})
+ target_compile_definitions(torch PUBLIC TORCH_BUILD_STATIC_LIBS)
else()
add_library(torch SHARED ${TORCH_SRCS})
endif()
|
fix serialization with legacy segmenter
addressed error encountered in | @@ -123,7 +123,9 @@ def serialize(records: Sequence[ocr_record],
idx += 1
# build region and line type dict
- page['types'] = list(regions.keys()) + list(set(line.script for line in records if line.script is not None))
+ page['types'] = list(set(line.script for line in records if line.script is not None))
+ if regions ... |
Docs- Update python-libselinux to python3-libselinux EL8
Associated issue | @@ -21,7 +21,7 @@ CentOS 8
.. code-block:: bash
- $ sudo yum install -y gcc python3-pip python3-devel openssl-devel libselinux-python
+ $ sudo yum install -y gcc python3-pip python3-devel openssl-devel python3-libselinux
Ubuntu 16.x
-----------
|
Init click option
will generate: batch files, config files(with overwrite option, and certificate key pair(overwrite option) | @@ -202,6 +202,37 @@ def sync(**kwargs):
run_stats.log_end(logger)
+@main.command()
+@click.help_option('-h', '--help')
+@click.pass_context
+def init(ctx):
+#genrerate example configs
+ sync = os.path.abspath('user-sync-config.yml')
+ umapi = os.path.abspath('connector-umapi.yml')
+ ldap = os.path.abspath('connector-l... |
fix CP timestep database field type
there was no bug caused by it being a float field, I'm just changing for correctness | @@ -410,7 +410,7 @@ class ElectricTariffModel(models.Model):
chp_standby_rate_us_dollars_per_kw_per_month = models.FloatField(blank=True, null=True)
chp_does_not_reduce_demand_charges = models.BooleanField(null=True, blank=True)
emissions_region = models.TextField(null=True, blank=True)
- coincident_peak_load_active_ti... |
Fix a problem that receipts doesn't exist.
It occurs when invoke results are not cached. | @@ -423,6 +423,7 @@ class BlockChain:
receipts, next_prep = self.__invoke_results.get(block.header.hash, (None, None))
if receipts is None and need_to_score_invoke:
self.get_invoke_func(block.header.height)(block, self.__last_block)
+ receipts, next_prep = self.__invoke_results.get(block.header.hash, (None, None))
if n... |
Warn when a session is closed quickly
Fixes | @@ -5,8 +5,9 @@ Session class for interacting with the FiftyOne App.
| `voxel51.com <https://voxel51.com/>`_
|
"""
-import logging
from collections import defaultdict
+import logging
+import time
import fiftyone.core.client as foc
import fiftyone.core.service as fos
@@ -135,6 +136,10 @@ class Session(foc.HasClient):
de... |
Remove the trailing "," in signaturesDB
That corresponding statement in worst case is `if (False or False or False,)` simplifies to `if (False,):` which simplifies to `True` , so the code below is unreachable | @@ -129,7 +129,7 @@ class SignatureDB(object):
if (
not self.enable_online_lookup
or byte_sig in self.online_lookup_miss
- or time.time() < self.online_lookup_timeout,
+ or time.time() < self.online_lookup_timeout
):
return []
|
fix store_credentials
fix store_credentials to store creds correctly when authorized_user_filename is passed. | @@ -163,7 +163,7 @@ def oauth(
if not creds:
creds = flow(scopes=scopes)
- store_credentials(creds)
+ store_credentials(creds, filename=authorized_user_filename)
client = Client(auth=creds)
return client
|
Adds more complex RandomSearchTuner test using input LSTMModule;
tests basic functionality + determinism | @@ -6,6 +6,7 @@ import numpy as np
import torch
from metal.end_model import EndModel
+from metal.modules import LSTMModule
from metal.tuners.random_tuner import RandomSearchTuner
from metal.utils import LogWriter
@@ -108,6 +109,76 @@ class RandomSearchModelTunerTest(unittest.TestCase):
# Clean up
rmtree(tuner.log_rootd... |
Remove use_count() == 1 in Tensor::Extend
Summary:
Pull Request resolved:
As suggested by jerryzh168, temporary fix for a new constraint that was added is to remove this assert. Long term jerryzh168 is going to work out a better way of handling this. | @@ -275,9 +275,6 @@ class CAFFE2_API TensorImpl : public c10::intrusive_ptr_target {
CAFFE_ENFORCE_GE_WITH_CALLER(dims_.size(), 1);
CAFFE_ENFORCE_GE_WITH_CALLER(
num, 0, "`num` must be non-negative for Extend");
- CAFFE_ENFORCE(
- storage_.use_count() == 1,
- "Can't call Extend on shared storage, please call Resize ins... |
fix test
Summary:
test that wasn't on the CI, but is tested internally.
Pull Request resolved: | @@ -6,7 +6,6 @@ from __future__ import unicode_literals
import torch.jit
import torch.nn as nn
import torch.nn.functional as F
-
from common_utils import TestCase
# TODO : Quantizer tests to be integrated with CI once quantizer intf hardened
@@ -219,6 +218,7 @@ class QuantizerTestCase(TestCase):
eagerDict = eagerQuantO... |
Added shell autocomplete config instructions
How to configure autocomplete for the GE CLI | @@ -957,6 +957,34 @@ If you have built a suite called ``churn_model_assumptions`` and a postgres data
This tap can then be run nightly before your model makes churn predictions!
+Shell autocompletion for the CLI
+======================
+
+If you want to enable autocompletion for the Great Expectations CLI, you can exec... |
Adding APIs for listing/adding/removing notification ignores
- Adding API endpoint for deleting notifications | @@ -15,7 +15,7 @@ from ..socketio import socketio
from ..misc import ratelimit, POSTING_LIMIT, AUTH_LIMIT, captchas_required
from ..models import Sub, User, SubPost, SubPostComment, SubMetadata, SubPostCommentVote, SubPostVote, SubSubscriber
from ..models import SiteMetadata, UserMetadata, Message, SubRule, Notificatio... |
better form spacing and remove redundant comment
resstricting to project target languages is anyway not useful since it restricts user to not be able to create new languages directly from HQ. Transifex adds any new languages pushed by HQ. | @@ -105,8 +105,6 @@ class AppTranslationsForm(forms.Form):
)
transifex_project_slug = forms.ChoiceField(label=ugettext_lazy("Trasifex project"), choices=(),
required=True)
- # Unfortunately transifex api does not provide a way to pull all possible target languages and
- # allow us to just add a checkbox instead of sele... |
linemin was miscalculating the error bar (standard deviation divided by
N, not sqrt(N)) | @@ -98,7 +98,7 @@ def line_minimization(
data, coords = vmc(wf, coords, accumulators={"pgrad": pgrad_acc}, **vmcoptions)
df = pd.DataFrame(data)[warmup:]
en = np.mean(df["pgradtotal"])
- en_err = np.std(df["pgradtotal"]) / len(df)
+ en_err = np.std(df["pgradtotal"]) / np.sqrt(len(df))
dpH = np.mean(df["pgraddpH"], axis... |
ebuild.processor: inherit_handler(): handle empty string arg to inherit
Previously these would throw a traceback. | @@ -935,7 +935,7 @@ class EbuildProcessor(object):
finally:
self.unlock()
-def inherit_handler(ecache, ebp, line, updates=None):
+def inherit_handler(ecache, ebp, line=None, updates=None):
"""Callback for implementing inherit digging into eclass_cache.
Not for normal consumption.
|
library: import ca_test_common in test_ceph_key
since we added `ca_test_common.py` let's use it in `test_ceph_key.py` | import json
import os
-import sys
import mock
import pytest
-from ansible.module_utils import basic
-from ansible.module_utils._text import to_bytes
+import ca_test_common
import ceph_key
-# From ceph-ansible documentation
-def set_module_args(args):
- if '_ansible_remote_tmp' not in args:
- args['_ansible_remote_tmp']... |
Update apt_38.txt
Root domains + sub-domains in explicit way to detect. | # Reference: https://otx.alienvault.com/pulse/5bb4bdccd63eeb0a87994870
bitdefs.ignorelist.com
+
+# Reference: https://twitter.com/ccxsaber/status/1204007469053165570
+
+gphi.site
+gphi-gsaeyheq.top
+gphi-adhaswe.xyz
+updatesinfos.com
+a.updatesinfos.com
+b.updatesinfos.com
+ip1.s.gphi.site
+ip2.s.gphi.site
+ip1.gphi-gs... |
Updating details and adding a video link
Added:
Detail about elderly man (75 years old)
Video from Facebook showing alternate angle of event
Removed:
Duplicate Twitter link that was related to the police tackling the man being interviewed, same link as is listed on line 8. | @@ -9,14 +9,14 @@ Three police officers run over to and tackle man with hands raised giving an int
### Police shove elderly man, causing him to fall on the back of his head | June 4th
-Two police officers shove an unarmed, elderly man, who falls backwards and strikes his head on the concrete sidewalk. He appears to be ... |
Fix a broken test for nomination reason.
We no longer return 400 if a reason is missing. | @@ -80,7 +80,7 @@ class CreationTests(APISubdomainTestCase):
'actor': ['This field is required.']
})
- def test_returns_400_for_missing_reason(self):
+ def test_returns_201_for_missing_reason(self):
url = reverse('bot:nomination-list', host='api')
data = {
'user': self.user.id,
@@ -88,10 +88,7 @@ class CreationTests(AP... |
PlugLayout : Support for embedded PlugLayout
This enables us to embed the PlugLayout in a larger layout that already
includes things like a scroll bar. | @@ -88,11 +88,15 @@ class PlugLayout( GafferUI.Widget ) :
# We use this when we can't find a ScriptNode to provide the context.
__fallbackContext = Gaffer.Context()
- def __init__( self, parent, orientation = GafferUI.ListContainer.Orientation.Vertical, layoutName = "layout", rootSection = "", **kw ) :
+ def __init__( ... |
popover: Rename show_user_info_popover function.
This commit renames the show_user_info_popover function to
show_user_info_popover_for_message, as it is used to open
the popover for users which are essentially related to a
particular message, like message sender and mentioned user. | @@ -247,7 +247,7 @@ exports._test_calculate_info_popover_placement = calculate_info_popover_placemen
// element is the target element to pop off of
// user is the user whose profile to show
// message is the message containing it, which should be selected
-function show_user_info_popover(element, user, message) {
+func... |
api/iodevices: simplify LUMPDevice API
All these device can do is read or write values at a particular mode. There is also no need for separate mode setters. | @@ -12,61 +12,23 @@ class LUMPDevice():
"""
pass
- def read(self):
- """Read latest values from the sensor.
-
- Returns:
- ``tuple``: Values read from the sensor.
- """
- pass
-
- def write(self, values):
- """Write values to the sensor.
+ def read(self, mode):
+ """Read values from a given mode.
Arguments:
- data (``t... |
run_isolated: update isolated client revision
This is to take crrev.com/4f137b333a6be75dd13c2fb375c97c444ea40979 | @@ -113,7 +113,7 @@ ISOLATED_CLIENT_DIR = u'ic'
# Take revision from
# https://ci.chromium.org/p/infra-internal/g/infra-packagers/console
ISOLATED_PACKAGE = 'infra/tools/luci/isolated/${platform}'
-ISOLATED_REVISION = 'git_revision:2ee27ca739de90c29d46eb3af3371a42fec3ebff'
+ISOLATED_REVISION = 'git_revision:1190afd45e1... |
Move fio runtime to a data disk
os disk might always have the required disk capacity to run fio | @@ -12,6 +12,8 @@ from lisa import (
TestCaseMetadata,
TestSuite,
TestSuiteMetadata,
+ schema,
+ search_space,
simple_requirement,
)
from lisa.environment import Environment
@@ -74,19 +76,27 @@ class CPUSuite(TestSuite):
The cpu hotplug steps are same as `verify_cpu_hot_plug` test case.
""",
priority=4,
+ requirement=s... |
builders: Make single_connection_client conifgurable
single_connection_client keeps a connection open to the pool on init
which may cause issues if the master changes | @@ -32,7 +32,7 @@ class RedisBuildLogs(object):
args = dict(self._redis_config)
args.update(
- {"socket_connect_timeout": 1, "socket_timeout": 2, "single_connection_client": True}
+ {"socket_connect_timeout": 1, "socket_timeout": 2}
)
self._redis_client = redis.StrictRedis(**args)
@@ -127,7 +127,7 @@ class RedisBuildLo... |
Remove default logging.
All tracked by datadog and stackdriver now. | @@ -44,25 +44,6 @@ DATABASES = {
}
}
-LOGGING = {
- 'version': 1,
- 'disable_existing_loggers': False,
- 'handlers': {
- 'file': {
- 'level': 'DEBUG',
- 'class': 'logging.FileHandler',
- 'filename': '/tmp/django.log',
- },
- },
- 'loggers': {
- 'django': {
- 'handlers': ['file'],
- 'level': 'DEBUG',
- 'propagate': True... |
Add number words into integer parsing to todo list
Parse number words separated by whitespace or hyphens into integers. | @@ -40,13 +40,37 @@ def _print(data):
def sort(data):
return sorted(data, key = lambda k: (-k['priority'] if 'priority' in k else 0, k['complete']))
-def parseNumber(string):
- ret = {'skip':1, 'value':1}
+def parseNumber(string, numwords = {}):
+ if not numwords:
+ units = ["zero", "one", "two", "three", "four", "five... |
[cleanup] Drop unused YahooSearchPageGenerator deprecation
Yahoo search wasn't functional and has been removed. Dropping its
deprecation clause. | @@ -50,7 +50,6 @@ from pywikibot.tools import (
filter_unique,
intersect_generators,
itergroup,
- ModuleDeprecationWrapper,
redirect_func,
)
@@ -3001,9 +3000,6 @@ FileGenerator = redirect_func(
CategoryGenerator = redirect_func(
PageClassGenerator, old_name='CategoryGenerator', since='20161017',
future_warning=True)
-w... |
[client] allow providing tokens for linking
This is mostly useful for testing, when having gone through the OAuth flow previously / on another machine. | @@ -247,10 +247,10 @@ class DropboxClient:
def get_auth_url(self) -> str:
"""
Returns a URL to authorize access to a Dropbox account. To link a Dropbox
- account, retrieve an auth token from the URL and link Maestral by calling
- :meth:`link` with the provided token.
+ account, retrieve an authorization code from the U... |
Rewriting: avoid using the dot notation for bare node primitives
TN: | @@ -548,9 +548,9 @@ package body ${ada_lib_name}.Rewriting_Implementation is
Unit_Handle : constant Unit_Rewriting_Handle :=
Handle (N.Unit);
begin
- if N.Is_Token_Node then
+ if Is_Token_Node (N) then
Children := (Kind => Expanded_Token_Node,
- Text => To_Unbounded_Wide_Wide_String (N.Text));
+ Text => To_Unbounded_Wi... |
Review of the `domain_to_idna()` notes.
This patch fix | @@ -1146,7 +1146,7 @@ def domain_to_idna(line):
Notes
-----
- - This method/function encode only the domain to `idna` format because in
+ - This function encode only the domain to `idna` format because in
most cases the encoding issue is due to a domain which looks like
`b'\xc9\xa2oogle.com'.decode('idna')`.
- About th... |
Laikad: minor refactor
extract code to get_est_pos func | @@ -62,6 +62,16 @@ class Laikad:
cls=CacheSerializer))
self.last_cached_t = t
+ def get_est_pos(self, t, processed_measurements):
+ if self.last_pos_fix_t is None or abs(self.last_pos_fix_t - t) >= 2:
+ min_measurements = 5 if any(p.constellation_id == ConstellationId.GLONASS for p in processed_measurements) else 4
+ p... |
fix py27 test
Summary: something changed with the `re` package in 2.7? I dunno this works around it well enough.
Test Plan: buildkite
Reviewers: #ft, max | -import re
-
import pytest
from dagster import (
@@ -37,10 +35,7 @@ def muptiple_outputs_pipeline():
with pytest.raises(
DagsterInvariantViolationError,
- match=re.escape(
- 'Output \'not_defined\' not defined in solid \'multiple_outputs\': '
- 'found outputs [\'output_one\', \'output_two\']'
- ),
+ match="Output 'not_... |
MAINT: Fix azure linter problems with pip 20.1
The default Python 3.8 pip version seems to have been upgraded, leading
to a large number of harmless messages being printed during package
installation. This PR fixes the linter script to ignore the messages. | @@ -29,9 +29,10 @@ stages:
addToPath: true
architecture: 'x64'
- script: >-
- python -m pip --disable-pip-version-check install -r linter_requirements.txt
+ python -m pip install -r linter_requirements.txt
displayName: 'Install tools'
- failOnStderr: true
+ # pip 21.1 emits a pile of garbage messages to annoy users :)
... |
remove unused variable tmp
as suggested by lgtm | @@ -237,7 +237,6 @@ def pslq(ctx, x, tol=None, maxcoeff=1000, maxsteps=100, verbose=False):
szmax = sz
# Step 2
y[m], y[m+1] = y[m+1], y[m]
- tmp = {}
for i in xrange(1,n+1): H[m,i], H[m+1,i] = H[m+1,i], H[m,i]
for i in xrange(1,n+1): A[m,i], A[m+1,i] = A[m+1,i], A[m,i]
for i in xrange(1,n+1): B[i,m], B[i,m+1] = B[i,m+... |
Update strategy.rst
Add docs for the prediction score | @@ -112,6 +112,9 @@ A prediction sample is shown as follows.
``Forecast Model`` module can make predictions, please refer to `Forecast Model: Model Training & Prediction <model.html>`_.
+Normally, the prediction score is the output of the models. But some models are learned from a label with a different scale. So the s... |
Convert output from kind to str
subprocess output is bytes. decode to string so it renders better in
error messages. | @@ -324,10 +324,10 @@ class KindWrapper(object):
output = subprocess.check_output(args, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
plog("vvvvvvvvvvvvvvvv Output from {} vvvvvvvvvvvvvvvv".format(args[0]))
- plog(e.output)
+ plog(e.output.decode('utf-8'))
plog("^^^^^^^^^^^^^^^^ Output from {} ^^... |
[unit test] simple rework of the TestProfileToolBar unit test to make sure mean and sum are computed in testDiagomalLine
Add to move down the "Trigger tool button for diagonal profile mode" because profile action are disable when the plot has no image. | @@ -110,27 +110,38 @@ class TestProfileToolBar(TestCaseQt, ParametricTestCase):
for method in ('sum', 'mean'):
with self.subTest(method=method):
+ self.toolBar.setProfileMethod(method)
+
# 2 positions to use for mouse events
pos1 = widget.width() * 0.4, widget.height() * 0.4
pos2 = widget.width() * 0.6, widget.height()... |
Update index.rst
We decided not to include a description here. If it doesn't work, we can change it back. | Toil Documentation
==================
-Everything you need to know about Toil.
-
-* Toil is a scalable, efficient, cross-platform pipeline management system.
-* Run it on Amazon Web Services and Toil can automatically manage the number of workers.
-* Write your workflows with an easy to use Python API (Turing complete!... |
Man: mention $$ a subst escape [skip appveyor]
Some rewordings elsewhere in Variable Substitution section -
mainly to a variable that's a function. | @@ -6414,18 +6414,25 @@ env.Command('marker', 'input_file', action=[MyBuildAction, Touch('$TARGET')])
&scons;
performs variable substitution on the string that makes up
the action part of the builder.
-Variables to be interpolated are indicated in the
-string with a leading
-<literal>$</literal>, to distinguish them fr... |
Minor bugfix for database initialization in demcz
changing randompar to vector | @@ -189,13 +189,13 @@ class demcz(_algorithm):
for rep, vector, simulations in self.repeat(param_generator):
- if firstcall == True:
- self.initialize_database(randompar, self.parameter()['name'], simulations, likelist)
- firstcall = False
burnInpar[i][rep] = vector
likelist = self.objectivefunction(
evaluation=self.ev... |
STY: pavement.py: don't use `type` as variable name
[ci skip] | @@ -137,17 +137,17 @@ def pdf():
ref = os.path.join(bdir_latex, "scipy-ref.pdf")
shutil.copy(ref, os.path.join(destdir_pdf, "reference.pdf"))
-def tarball_name(type='gztar'):
+def tarball_name(type_name='gztar'):
root = 'scipy-%s' % FULLVERSION
- if type == 'gztar':
+ if type_name == 'gztar':
return root + '.tar.gz'
- ... |
Dv3: add link for trained model
dv3: add trained model link for downloading | @@ -119,7 +119,10 @@ For more details about `train.py`, see `python train.py --help`.
#### load checkpoints
-You can load saved checkpoint and resume training with `--checkpoint`, if you wan to reset optimizer states, pass `--reset-optimizer` in addition.
+We provide a trained model ([dv3.single_frame](https://paddlesp... |
fix(global): data.path without hashes
removing hashes from data.path | @@ -314,8 +314,14 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
index_frame_start = int(repre.get("frameStart"))
dst_padding_exp = src_padding_exp
+ dst_start_frame = None
for i in src_collection.indexes:
src_padding = src_padding_exp % i
+
+ # for adding first frame into db
+ if not dst_start_frame:
+ dst_st... |
Modified train_rl to account for experiment names
Removed sbatch folder | @@ -64,6 +64,9 @@ parser.add_argument("--model-mem", action="store_true", default=False,
help="use memory in the model")
parser.add_argument("--arch", default='cnn1',
help="Architecture of Actor")
+parser.add_argument("--exp-name", default=None,
+ help="Name of the experiment to run.")
+
args = parser.parse_args()
# Se... |
Update README.md
Update documentation for billing | @@ -29,7 +29,7 @@ CONTENTS
[Starting/Stopping services](#Starting_Stopping_services)
- [Billing report](#Billing-Report)
+ [Billing report](#Billing_Report)
[Troubleshooting](#Troubleshooting)
@@ -474,13 +474,1... |
operator manifests: Test validation of new options
*
Container.yaml has 3 new options allowing opt-out for users (see schema
in osbs-client), test validation here | @@ -287,13 +287,19 @@ class TestSourceConfigSchemaValidation(object):
package_mappings:
bar: baz
spam: eggs
+ enable_digest_pinning: true
+ enable_repo_replacements: false
+ enable_registry_replacements: true
""",
{'operator_manifests': {
'manifests_dir': 'path/to/manifests',
'repo_replacements': [
{'registry': 'foo',
... |
Doc: Reminder to use configured format in examples
fix | @@ -415,8 +415,8 @@ Options
Examples
""""""""
-These may need to be adapted for your configuration and/or locale. See :command:`printformats`.
-::
+These may need to be adapted for your configuration and/or locale (START and END
+need to match the format configured). See :command:`printformats`. ::
khal new 18:00 Aweso... |
More thorough check whether UIA can be used
In order to prevent failed DLL loads e.g. under WINE | @@ -42,7 +42,11 @@ try:
log = logging.getLogger('comtypes')
log.setLevel('WARNING')
import comtypes # noqa: E402
+ import comtypes.client
+ comtypes.client.GetModule('UIAutomationCore.dll')
UIA_support = True
+except OSError:
+ UIA_support = False
except ImportError:
UIA_support = False
|
IDM: use projected velocity difference rather than speed difference
Fix | @@ -144,18 +144,20 @@ class IDMVehicle(ControlledVehicle):
np.power(self.desired_gap(ego_vehicle, front_vehicle) / utils.not_zero(d), 2)
return acceleration
- def desired_gap(self, ego_vehicle: Vehicle, front_vehicle: Vehicle = None) -> float:
+ def desired_gap(self, ego_vehicle: Vehicle, front_vehicle: Vehicle = None,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.