message stringlengths 13 484 | diff stringlengths 38 4.63k |
|---|---|
Escape markdown in charinfo embed
The embed displays the original character. If it's a markdown char,
it would interfere with the embed's actual markdown. The backtick was
especially troublesome.
Fixes | @@ -6,7 +6,7 @@ from email.parser import HeaderParser
from io import StringIO
from typing import Tuple, Union
-from discord import Colour, Embed
+from discord import Colour, Embed, utils
from discord.ext.commands import BadArgument, Cog, Context, command
from bot.bot import Bot
@@ -145,7 +145,7 @@ class Utils(Cog):
u_c... |
Update README.md
* Update README.md
Added information in the dataset card
* Apply suggestions from code review | @@ -62,22 +62,34 @@ An annotated dataset for hate speech and offensive language detection on tweets.
[More Information Needed]
### Languages
-
-[More Information Needed]
+English (`en`)
## Dataset Structure
### Data Instances
-
-[More Information Needed]
+```
+{
+"count": 3,
+ "hate_speech_annotation": 0,
+ "offensive_... |
Make Settings & ValReg names consistent/correct
Add the "in-English" name for Settings and Validator Registry, along with
the "command/process" name, because they're different enough to be confusing.
Especially because the Docker and K8s container names add a third way to
refer to the TPs. | @@ -959,8 +959,8 @@ to view pod status, container names, Sawtooth log files, and more.
This example environment includes the following transaction processors:
* :doc:`Settings <../transaction_family_specifications/settings_transaction_family>`
- handles Sawtooth's on-chain settings. The ``sawtooth-settings-tp``
- trans... |
[IMPR] Reduce code complexity of date.escapePattern2
move inner part of pattern computing into a inner function and
dispatch it by the "dec" parameter type | @@ -17,7 +17,17 @@ from string import digits as _decimalDigits # noqa: N812
from pywikibot import Site
from pywikibot.textlib import NON_LATIN_DIGITS
-from pywikibot.tools import deprecated, first_lower, first_upper
+from pywikibot.tools import (
+ deprecated,
+ first_lower,
+ first_upper,
+ PYTHON_VERSION,
+)
+
+if PY... |
Update Styles.md
Change the href to match the file name | @@ -78,7 +78,7 @@ Here is an example for defining the same CSS class defined in the previous examp
To load the CSS file, we would need to use the `<link>` HTML tag in the following manner:
- <link rel="stylesheet" href="nice.css">
+ <link rel="stylesheet" href="style.css">
Please note that the stylesheet should be posi... |
Log failed access attempts regardless of settings
Fixes | @@ -433,8 +433,9 @@ def create_new_failure_records(request, failures):
ua = request.META.get('HTTP_USER_AGENT', '<unknown>')[:255]
username = request.POST.get(USERNAME_FORM_FIELD, None)
- # record failed attempt from this IP if not AXES_ONLY_USER_FAILURES
- if not AXES_ONLY_USER_FAILURES:
+ # Record failed attempt. Whe... |
Added new Jira 8 methods:
- Create single issue
- Create multiple issues | @@ -138,3 +138,35 @@ class Jira8(AtlassianRestAPI):
url = 'rest/api/2/attachment/meta'
return self.get(url)
+
+ # Issues
+ def create_issue(self, fields, update_history=False):
+ """
+ Creates an issue or a sub-task from a JSON representation
+
+ :param fields: JSON data
+ :param update_history: bool (if true then the ... |
formatting
reran pycodestyle and flake8 | @@ -23,12 +23,9 @@ __author__ = "Alex Epstein"
__copyright__ = "Copyright 2020, The Materials Project"
__version__ = "0.1"
-test_dir = os.path.join(os.path.dirname(__file__),
- PymatgenTest.TEST_FILES_DIR, "xtb",
- "sample_CREST_output")
-expected_output_dir = os.path.join(
- os.path.dirname(__file__), PymatgenTest.TES... |
Syntax: Update a couple of completions
This commit updates completions for sublime-syntax development according to the new scope naming guidelines, which are not yet covered by another PR.
see:
Note: The keywords `extends` and `throws` are no longer part of the scope naming guideline. They are therefore removed from th... | @@ -67,8 +67,14 @@ DATA = """
flow
import
declaration
- extends
- throws
+ function
+ class
+ struct
+ enum
+ union
+ trait
+ interface
+ impl
operator
assignment
arithmetic
@@ -101,12 +107,16 @@ DATA = """
union
trait
interface
+ impl
type
function
parameters
return-type
namespace
preprocessor
+ annotation
+ identifie... |
Fix the lint error in transformer doc.
Summary:
Fix the lint error in transformer doc.
Pull Request resolved: | @@ -190,7 +190,6 @@ class TransformerDecoder(Module):
>>> memory = torch.rand(10, 32, 512)
>>> tgt = torch.rand(20, 32, 512)
>>> out = transformer_decoder(tgt, memory)
-
"""
def __init__(self, decoder_layer, num_layers, norm=None):
|
Add 'condition' as attribute
condition is an attribute indicating if stability level 2 analysis is required or not | @@ -152,6 +152,7 @@ class Report:
self.crit_speed = None
self.MCS = None
self.RHO_gas = None
+ self.condition = None
@classmethod
def from_saved_rotors(cls, path, minspeed, maxspeed, speed_units="rpm"):
@@ -977,7 +978,6 @@ class Report:
# Level 1 screening criteria - API 684 - SP6.8.5.10
idx = min(range(len(RHO)), key=... |
Make CreateTpuEmbeddingEnqueueOpsForHost public method so that multi-tasking
training is easier to share TPU embeddings. | @@ -387,7 +387,7 @@ class BaseInputGenerator(base_layer.BaseLayer):
# into the TPU InfeedQueue (and only to TPUEmbedding).
# TODO(jeffreyzhao): Hack, come up with better solution.
# Ideally we would like users to override
- # _CreateTpuEmbeddingEnqueueOpsForHost() to modify the input batch
+ # CreateTpuEmbeddingEnqueue... |
added prefixes and cumulative reduce
and | @@ -603,7 +603,7 @@ def divide(lhs, rhs):
def divisors_of(item):
t_item = VY_type(item)
if t_item in [list, Generator]:
- return vectorise(divisors_of, item)
+ return Generator(prefixes(item))
divisors = []
if t_item == str:
@@ -1198,11 +1198,23 @@ def order(lhs, rhs):
else:
return infinite_replace(iterable(lhs, str), ... |
Better jpeg detection in utils._get_mime_type_for_image
Fixes | @@ -249,7 +249,7 @@ def _get_as_snowflake(data, key):
def _get_mime_type_for_image(data):
if data.startswith(b'\x89\x50\x4E\x47\x0D\x0A\x1A\x0A'):
return 'image/png'
- elif data.startswith(b'\xFF\xD8') and data.rstrip(b'\0').endswith(b'\xFF\xD9'):
+ elif data[6:10] in (b'JFIF', b'Exif'):
return 'image/jpeg'
elif data.s... |
Increased waiting time
sometimes happen that the list takes longer to complete the refresh | @@ -110,7 +110,7 @@ def auto_scroll(dir_items):
total_items = len(dir_items)
if total_items:
# Delay a bit to wait for the completion of the screen update
- xbmc.sleep(100)
+ xbmc.sleep(200)
if not _auto_scroll_init_checks():
return
# Check if all items are already watched
|
added logging metrics
from | @@ -188,6 +188,14 @@ WebSocket Metrics:
- ``mattermost_websocket_broadcasts_total``: The total number of WebSocket broadcasts sent by type.
- ``mattermost_websocket_event_total``: The total number of WebSocket events sent by type.
+Logging Metrics:
+
+ - ``logger_queue_used``: Current logging queue level(s).
+ - ``logg... |
Add count/timing metric to case importer
This will help us answer the question "How long does it take to import N cases"? | @@ -25,7 +25,7 @@ from corehq.apps.users.cases import get_wrapped_owner
from corehq.apps.users.models import CouchUser
from corehq.apps.users.util import format_username
from corehq.toggles import BULK_UPLOAD_DATE_OPENED
-from corehq.util.datadog.utils import case_load_counter
+from corehq.util.datadog.utils import cas... |
Fixed the problem with ner lazy loading
Fixed missing * operator in ner_utils.py, causing a TypeError. | @@ -493,7 +493,7 @@ class LazyNERDataset(Dataset):
True,
)
- features = convert_example_to_feature(example_row)
+ features = convert_example_to_feature(*example_row)
all_input_ids = torch.tensor(features.input_ids, dtype=torch.long)
all_input_mask = torch.tensor(features.input_mask, dtype=torch.long)
all_segment_ids = ... |
add unrealized profit and loss column in Holdings
Close | 'account': 'SELECT account,
units(sum(position)) as units,
cost(sum(position)) as book_value,
- value(sum(position)) as market_value
+ value(sum(position)) as market_value,
+ safediv((abs(sum(number(value(position)))) - abs(sum(number(cost(position))))), sum(number(cost(position)))) * 100 as unrealized_profit_pct
WHERE... |
Handle edge case of negative_sampling
Also, add parameter 'maximum number of negative samples.' | @@ -12,12 +12,26 @@ EPS = 1e-15
MAX_LOGVAR = 10
-def negative_sampling(pos_edge_index, num_nodes):
+def negative_sampling(pos_edge_index, num_nodes, max_num_samples=None):
+ r"""Sample negative edges of a graph ({0, ..., num_nodes - 1}, pos_edge_index).
+
+ Args:
+ pos_edge_index (LongTensor): Existing adjacency list o... |
bigbench/api/json_task.py
Added log likelihood metrics. | @@ -124,6 +124,25 @@ def bleurt_fn(targets: List[List[str]], responses: List[str]
results["bleurt"] = np.mean(results_list)
return results
+def log_likehood_fn(log_probs_gen: List[List[float]], targets: List[List[str]]
+) -> Dict[str, float]:
+ """Computes expected value of the log likelikehood E_{samples}[log(P(target... |
Markdown formatting error in the docs
The current format makes it look like the bullet point and the paragraph below is one and the same. These however contain two different ideas. I have added a new line to fix this formatting issue. | @@ -324,6 +324,7 @@ To continue learning about data resources please read:
A Data Package consists of:
- Metadata that describes the structure and contents of the package
- Resources such as data files that form the contents of the package
+
The Data Package metadata is stored in a "descriptor". This descriptor is what... |
Fix API contract of table_exists() to match docs.
Refs | @@ -2699,8 +2699,8 @@ class Database(_callable_context_manager):
for obj in group:
yield obj
- def table_exists(self, table, schema=None):
- return table.__name__ in self.get_tables(schema=schema)
+ def table_exists(self, table_name, schema=None):
+ return table_name in self.get_tables(schema=schema)
def get_tables(sel... |
Update test requirements
define versions of most test dependencies | @@ -11,11 +11,11 @@ mxnet
tensorflow
scikit-learn==0.22.1
xgboost==1.0.0
-lightgbm
+lightgbm==2.3.1
# Comment out because of compatibility issues with numpy versions
# catboost
-GPy
+GPy==1.9.9
numpy==1.18.1
-scipy
-statsmodels
+scipy==1.4.1
+statsmodels==0.11.0
|
Azure: use separated cached files
one file is too big to load, it's slow. | @@ -310,7 +310,7 @@ class AzurePlatform(Platform):
self.credential: DefaultAzureCredential = None
self._enviornment_counter = 0
self._eligible_capabilities: Optional[Dict[str, List[AzureCapability]]] = None
- self._locations_data_cache: Optional[Dict[str, AzureLocation]] = None
+ self._locations_data_cache: Dict[str, A... |
Fix bug in validate_sql
Didn't set dimension tests correctly in non-incremental case. | @@ -339,6 +339,8 @@ class Runner:
f"{len(tests)} tests found @ '{target_ref}' "
f"that are not present @ '{base_ref}'"
)
+ else:
+ tests = base_tests
with self.branch_manager(ref=ref):
validator.run_tests(tests, profile)
|
Add more kwargs to distutils/core.setup()
* Add more kwargs to distutils/core.setup()
These arguments are sourced from and
I do not claim that the list of kwargs is now complete.
* Add missing optional args values
* Remove duplicate, change "Dict" to "Mapping" | @@ -29,7 +29,20 @@ def setup(name: str = ...,
platforms: Union[List[str], str] = ...,
cmdclass: Mapping[str, Command] = ...,
data_files: List[Tuple[str, List[str]]] = ...,
- package_dir: Mapping[str, str] = ...) -> None: ...
+ package_dir: Mapping[str, str] = ...,
+ obsoletes: List[str] = ...,
+ provides: List[str] = .... |
Convert any relative paths of block devices into absolute paths
This does not verify that the paths exist. What it does is synthesize
the properly formatted absolute path based on the current working directory
and the rules of the platform. | @@ -247,7 +247,7 @@ class TopActions:
managed_objects = ObjectManager.Methods.GetManagedObjects(proxy, {})
pool_name = namespace.pool_name
names = pools(props={"Name": pool_name}).search(managed_objects)
- blockdevs = frozenset(namespace.blockdevs)
+ blockdevs = frozenset([os.path.abspath(p) for p in namespace.blockdev... |
[modules/pulseaudio] remove "warning" if "too loud"
Falls in the "meant well, but doesn't really make sense" category: When
the volume exceeds 100%, the widget was shown in "critical" state. Some
headsets, audio cards, etc. do require a high volume setting, however.
And anyhow, it's really up to the user.
fixes | @@ -253,8 +253,6 @@ class Module(core.module.Module):
def state(self, widget):
if self._mute:
return ["warning", "muted"]
- if int(self._left) > int(100):
- return ["critical", "unmuted"]
return ["unmuted"]
|
[] != None
Getting 500s when self._initial is set to an empty list | @@ -190,7 +190,7 @@ class Select2Ajax(forms.TextInput):
'hqstyle/forms/select_2_ajax_widget.html',
{
'id': attrs.get('id'),
- 'initial': self._initial or self._clean_initial(value),
+ 'initial': self._initial if self._initial is not None else self._clean_initial(value),
'endpoint': self.url,
'page_size': self.page_size... |
fix: incorrect filtering on address doctype
[skip ci] | @@ -177,7 +177,6 @@ def filter_dynamic_link_doctypes(
txt = txt or ""
filters = filters or {}
- TXT_PATTERN = re.compile(f"{txt}.*")
_doctypes_from_df = frappe.get_all(
"DocField",
@@ -186,13 +185,13 @@ def filter_dynamic_link_doctypes(
distinct=True,
order_by=None,
)
- doctypes_from_df = {d for d in _doctypes_from_df ... |
Remove '-s' (--script) argument to parted within align_check function
The -s argument results in no stdout output from parted in this context,
so the user must infer success or failure from the exit status. | @@ -216,7 +216,7 @@ def align_check(device, part_type, partition):
'Invalid partition passed to partition.align_check'
)
- cmd = 'parted -m -s {0} align-check {1} {2}'.format(
+ cmd = 'parted -m {0} align-check {1} {2}'.format(
device, part_type, partition
)
out = __salt__['cmd.run'](cmd).splitlines()
|
Disable django-cache-machine on staging.
Once this happened we can run our locust-tests, fix potential new
bottlenecks and then head towards production. | @@ -80,6 +80,9 @@ SLAVE_DATABASES = ['slave']
CACHE_MIDDLEWARE_KEY_PREFIX = CACHE_PREFIX
+# Disable cache-machine on dev to prepare for its removal.
+CACHE_MACHINE_ENABLED = False
+
CACHES = {
'filesystem': {
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
|
index.rst - github-link
index.rst - github-link | @@ -25,6 +25,7 @@ At a high-level:
Other Links:
+* Github: https://github.com/airbnb/streamalert
* Twitter (unofficial): https://twitter.com/streamalert_io
* Slack (unofficial): https://streamalert.herokuapp.com
|
Membership Rollover: Move "Copy" fields up
This fixes by moving the "Copy ...?" positions up the form. | @@ -235,6 +235,8 @@ class MembershipRollOverForm(MembershipCreateForm):
fields = [
"name",
"consortium",
+ "copy_members",
+ "copy_membership_tasks",
"public_status",
"variant",
"agreement_start",
@@ -252,8 +254,6 @@ class MembershipRollOverForm(MembershipCreateForm):
"inhouse_instructor_training_seats_rolled_from_prev... |
CI: Switch to the new codecov uploader
Apparently the python one is deprecated already | @@ -30,5 +30,5 @@ install:
test_script:
- iptest --coverage xml
on_finish:
- - pip install codecov
- - codecov -e PYTHON_VERSION PYTHON_ARCH
+ - curl -Os https://uploader.codecov.io/latest/windows/codecov.exe
+ - codecov -e PYTHON_VERSION,PYTHON_ARCH
|
fix ScipyIterative.__call__() to use eps_a from configuration options
update for future SciPy (1.1.x, atol argument) | @@ -265,6 +265,7 @@ class ScipyIterative(LinearSolver):
i_max=None, mtx=None, status=None, context=None, **kwargs):
solver_kwargs = self.build_solver_kwargs(conf)
+ eps_a = get_default(eps_a, self.conf.eps_a)
eps_r = get_default(eps_r, self.conf.eps_r)
i_max = get_default(i_max, self.conf.i_max)
@@ -302,7 +303,7 @@ cla... |
feat: add correct handling of Control-Delete and Shift-Delete
Closes | @@ -369,7 +369,7 @@ class ConsoleInputReader:
}
result.key = mapping.get(result.key, result.key)
- # Correctly handle Control-Arrow/Home/End and Control-Insert keys.
+ # Correctly handle Control-Arrow/Home/End and Control-Insert/Delete keys.
if (
ev.ControlKeyState & self.LEFT_CTRL_PRESSED
or ev.ControlKeyState & self.... |
Fix cancel callback
handle False value in legacy_runner. | @@ -99,7 +99,8 @@ class LegacyRunner(BaseRunner):
"""
exit sub tests, once received cancellation message from executor.
"""
- if future.cancelled() or future.exception():
+ # future is False, if it's called explictly by run_in_threads.
+ if not future or future.cancelled() or future.exception():
self._log.debug(f"recei... |
Update mongo.py
TypeError: to_list() missing 1 required positional argument: 'length' | @@ -213,5 +213,5 @@ class MongoStorage(BaseStorage):
:return: list of tuples where first element is chat id and second is user id
"""
db = await self.get_db()
- items = await db[STATE].find().to_list()
+ items = await db[STATE].find().to_list(length=None)
return [(int(item['chat']), int(item['user'])) for item in items... |
Updated assembler
Now includes support for vq_vae | import yaml
import importlib
from functools import partial
-from models.base_vae import VAE
+from models.guassian_vae import VAE
from models.two_stage_vae import Stage2VAE
+from models.vq_vae import VQVAE
from experiment import VAEModule, VAE2stageModule
def get_config(fpath):
@@ -13,6 +14,8 @@ def get_config(fpath):
p... |
avoid numpy runtime warnings
enhance query image error message | @@ -88,11 +88,11 @@ class DatafileEncap(ExplainDataEncap):
return fp.read()
except FileNotFoundError:
- raise ImageNotExistError(image_path)
+ raise ImageNotExistError(f"train_id:{train_id} path:{image_path} type:{image_type}")
except PermissionError:
- raise FileSystemPermissionError(image_path)
+ raise FileSystemPerm... |
Update integrations/acquisition/covid_hosp/test_scenarios.py
committing suggestion from | @@ -69,7 +69,7 @@ class AcquisitionTests(unittest.TestCase):
self.assertEqual(row['hospital_onset_covid'], 53)
actual = row['inpatient_bed_covid_utilization']
expected = 0.21056656682174496
- self.assertTrue(abs(actual - expected) < 1e-5)
+ self.assertAlmostEqual(actual, expected, delta=1e-5)
self.assertIsNone(row['adu... |
misc/rewriting: use analysis unit's Text function to get source buffer
This will help catching leading and trailing trivia.
TN: | @@ -71,7 +71,7 @@ begin
New_Line;
Put_Line ("Quoting source buffer for rewritten unit...");
declare
- Buffer : constant Text_Type := Root (U).Text;
+ Buffer : constant Text_Type := Text (U);
Buffer_Bytes : String (1 .. Buffer'Length * 4)
with Import => True,
Address => Buffer'Address;
|
refactor: views: Remove left_column_structure from LeftColumnView.
This attribute is not used. | @@ -713,11 +713,11 @@ class LeftColumnView(urwid.Pile):
self.stream_v = self.streams_view()
self.is_in_topic_view = False
- self.left_column_structure = [
+ contents = [
(4, self.menu_v),
self.stream_v
]
- super().__init__(self.left_column_structure)
+ super().__init__(contents)
def menu_view(self) -> Any:
count = self... |
Add a comment about using setuptools and Cython together when passing Extension objects into cythonize() or distutils.
Resolves | @@ -120,6 +120,10 @@ in one line)::
ext_modules = cythonize(extensions),
)
+Note that when using setuptools, you should import it before Cython as
+setuptools may replace the ``Extension`` class in distutils. Otherwise,
+both might disagree about the class to use here.
+
If your options are static (for example you do n... |
fixed function
forgot to add the input parameter | @@ -888,7 +888,7 @@ def import_from_pypower_ppc(network, ppc, overwrite_zero_s_nom=None):
-def import_from_pandapower_net(network, net):
+def import_from_pandapower_net(network, net, extra_line_data=False):
"""
Import network from pandapower net.
|
client: remove isolate specific test
test_cas_output covers cas path. | @@ -109,12 +109,6 @@ _repeated_files = {
'repeated_files.py': CONTENTS['repeated_files.py'],
}
-CONTENTS['output.isolated'] = json.dumps({
- 'files': {
- 'output.py': file_meta('output.py'),
- },
-}).encode()
-
def list_files_tree(directory):
"""Returns the list of all the files in a tree."""
@@ -312,26 +306,6 @@ class... |
Standalone: Enhanced isolation of compiled binary.
* Use "Py_SetPath" for Python3 to force the sys.path
to not reference CPython compile time paths.
* Also clear PYTHONPATH during initialize in any
case, no need to avoid doing that. | @@ -110,7 +110,8 @@ static void prepareStandaloneEnvironment()
#endif
/* Setup environment variables to tell CPython that we would like it to use
- * the provided binary directory as the place to look for DLLs.
+ * the provided binary directory as the place to look for DLLs and for
+ * extension modules.
*/
char *binar... |
Recommend Mangum for serverless deployments
It is an ASGI adapter that works well. | @@ -50,3 +50,25 @@ Most web browsers only support HTTP/2 over a TLS connection with
TLSv1.2 or better and certain ciphers. So to use these features with
Quart you must chose an ASGI server that implements HTTP/2 and use
SSL.
+
+Serverless deployment
+---------------------
+
+To deploy Quart in a FaaS setting you will n... |
Documentation: Remove parameter for dids contents; Fix
Since the core does not support dynamic for `list_contents`.
It is only supported on `get_did`. | @@ -498,7 +498,7 @@ class Attachment(ErrorHandlingMethodView):
.. sourcecode:: http
- GET /dids/scope1/dataset1?dynamic HTTP/1.1
+ GET /dids/scope1/dataset1 HTTP/1.1
Host: rucio.cern.ch
**Example response**:
@@ -513,7 +513,6 @@ class Attachment(ErrorHandlingMethodView):
"bytes": 234, "length": 3, "account": "jdoe", "op... |
ci: fix regex
This commit fixes a regex error in the job
result about page. | @@ -53,6 +53,6 @@ find ./$PIPELINE_ID -type f -exec sed -i -e 's#static/images/logo.svg#https://ra
find ./$PIPELINE_ID -type f -exec sed -i -e 's#static/images/favicon.ico#https://raw.githubusercontent.com/Kubeinit/kubeinit/master/images/favicon.ico#g' {} \;
find ./$PIPELINE_ID -type f -name '*.html' -exec sed -i -e 's... |
docs/contributing/version-control: Link to docs/git/fixing-commits.
For help with using `git rebase -i`. | @@ -60,7 +60,8 @@ Other considerations:
Zulip expects you to structure the commits in your pull requests to form
a clean history before we will merge them. It's best to write your
commits following these guidelines in the first place, but if you don't,
-you can always fix your history using `git rebase -i`.
+you can al... |
pull before push in github actions
Minimize errors from long running script trying to push to updated version of repository. | @@ -33,4 +33,5 @@ jobs:
git add bigbench/benchmark_tasks/README.md bigbench/benchmark_tasks/keywords_to_tasks.md
git add bigbench/benchmark_tasks/*/README.md
git commit -m "auto-generate task summary tables and README.md headers" || echo "No changes to commit"
+ git pull
git push
|
Refactor hard-coded values to allow flexibility.
Refactor hard-coded values to allow flexibility, and fixed a few spelling errors in the comments. | # Description : Checks to see if a directory exists in the users home directory, if not then create it
import os # Import the OS module
+MESSAGE = 'The directory already exists.'
+TESTDIR = 'testdir'
try:
- home = os.path.expanduser("~") # Set the variable home by expanding the users set home directory
+ home = os.path... |
[ReTrigger] 2.2.0
Bump to version 2.2.0 and fix reset cooldown message. | @@ -21,7 +21,7 @@ class ReTrigger(TriggerHandler, commands.Cog):
"""
__author__ = "TrustyJAID"
- __version__ = "2.1.2"
+ __version__ = "2.2.0"
def __init__(self, bot):
self.bot = bot
@@ -174,7 +174,7 @@ class ReTrigger(TriggerHandler, commands.Cog):
cooldown = {"time": time, "style": style, "last": []}
if time <= 0:
co... |
Backfill->Backwards padding
Clarify that this backwards filling is not specifically for adjusting reporting delay (backfill), but rather to deal with data sparsity issues (which occur regardless of backfill). | @@ -149,9 +149,9 @@ $$\dot{Y}_{it}^k = Y_{it}^k / \alpha_{wd(t)}.$$
We then use these adjusted counts to estimate the CLI percentage as described
above.
-### Backfill
+### Backwards padding
-To help with the reporting delay, we perform the following simple "backfill"
+To help with the reporting delay, we perform the fo... |
Define `NoneType` class in _typeshed
Type checkers can use this to handle protocol matching for None (e.g. `foo: Hashable = None`). | @@ -16,7 +16,7 @@ import array
import mmap
import sys
from typing import AbstractSet, Container, Iterable, Protocol, Text, Tuple, TypeVar, Union
-from typing_extensions import Literal
+from typing_extensions import Literal, final
_KT = TypeVar("_KT")
_KT_co = TypeVar("_KT_co", covariant=True)
@@ -164,3 +164,8 @@ if sys... |
Create Ceph Initial Dirs earlier
Include tasks from create_ceph_initial_dirs earlier during
ceph config role.
Fixes: | ---
+- name: include create_ceph_initial_dirs.yml
+ include_tasks: create_ceph_initial_dirs.yml
+ when:
+ - containerized_deployment|bool
+
- block:
- name: count number of osds for ceph-disk scenarios
set_fact:
- not containerized_deployment|bool
- block:
- - name: include create_ceph_initial_dirs.yml
- include_tasks:... |
Add support for passing input data to export_batch() instead of using
random data | @@ -33,7 +33,7 @@ class ModelExporter(object):
strip_doc_string=True, verbose=False)
print('Exported onnx to {}'.format(onnx_path))
- def export_batch(self, batch_size: int, export_intermediates: bool = False, export_layers: bool = False):
+ def export_batch(self, batch_size: int, inp: Union[None, Tuple[Tensor]] = None... |
Remove SPDLOG_HEADER_ONLY define
Defining this macro will cause a warning, since it is being defined in the code also if SPDLOG_COMPILED_LIB is not defined at include/spdlog/common.h:34 | @@ -100,7 +100,7 @@ class SpdlogConan(ConanFile):
def package_info(self):
if self.options.header_only:
- self.cpp_info.defines = ["SPDLOG_HEADER_ONLY", "SPDLOG_FMT_EXTERNAL"]
+ self.cpp_info.defines = ["SPDLOG_FMT_EXTERNAL"]
else:
self.cpp_info.libs = tools.collect_libs(self)
self.cpp_info.defines = ["SPDLOG_COMPILED_L... |
Windows/support
* add windows compile, install guide support
* adjust the format
* correct the format
test=develop
* fix the style
test=develop
* fix issue
test=develop
* disable the windows cpp-reference doc temporarily
test=develop
* restore the inference doc
test=develop | compile_Ubuntu.md
compile_CentOS.md
compile_MacOS.md
+ compile_Windows.md
|
Remove buggy LOC
Removes unused line from `enqueue_failed_tests` that was causing
errors. | @@ -247,7 +247,6 @@ def enqueue_failed_tests(run_file: Path, root_directory, args, rt: RunTimeTestCo
all_tdvt_test_configs = {}
all_test_pairs = []
failed_tests = tests['failed_tests']
- skipped_tests = tests['skipped_tests']
# Go through the failed tests and group the ones that can be run together in a FileTestSet.
fo... |
[FIX] 'kewords' should be a list in setup.py
Solve Python 3 "warning: 'keywords' should be a list, got type 'tuple' | @@ -206,9 +206,9 @@ setup(
version=get_version(),
description='Python MediaWiki Bot Framework',
long_description=read_desc('README.rst'),
- keywords=('API', 'bot', 'framework', 'mediawiki', 'pwb', 'python',
+ keywords=['API', 'bot', 'framework', 'mediawiki', 'pwb', 'python',
'pywikibot', 'pywikipedia', 'pywikipediabot'... |
[bugfix] Use wikidata item instead of dropped MediaWiki message
Use wikidata item instead of dropped MediaWiki message to create
a category which contains pages with missing references tag. | @@ -495,7 +495,7 @@ referencesSubstitute = {
# as it is already included there
noTitleRequired = ['be', 'szl']
-maintenance_category = 'cite_error_refs_without_references_category'
+maintenance_category = 'Q6483427'
_ref_regex = re.compile('</ref>', re.IGNORECASE)
_references_regex = re.compile('<references.*?/>', re.I... |
simple-cipher: update tests to v2.0.0
* simple-cipher: update tests to v2.0.0
Fixes
* Fix flake8 violation | @@ -4,7 +4,7 @@ import re
from simple_cipher import Cipher
-# Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0
+# Tests adapted from `problem-specifications//canonical-data.json` @ v2.0.0
class SimpleCipherTest(unittest.TestCase):
# Utility functions
@@ -65,10 +65,14 @@ class SubstitutionCipher... |
Update quickdraw.py
Minor cosmetic changes. The main reason I did this was to trigger another CI run. | @@ -44,9 +44,9 @@ flags.DEFINE_integer("num_epochs", 5,
("Number of epochs to train for."))
flags.DEFINE_integer("num_classes", 100, "Number of classification classes.")
-flags.register_validator('num_classes',
+flags.register_validator("num_classes",
lambda value: value >= 1 and value <= 100,
- message='--num_classes ... |
Added catch for ImportError
Summary: With tensorflow 1.13 tensorboard.summary.writer was throwing ImportError instead of ModuleNotFoundError, causing failing tests
Reviewers: mark.kurtz, tuan, mgoin, ben
Subscribers: #core | @@ -15,6 +15,8 @@ try:
from torch.utils.tensorboard import SummaryWriter
except ModuleNotFoundError:
from tensorboardX import SummaryWriter
+except ImportError:
+ from tensorboardX import SummaryWriter
from neuralmagicML.utils import create_dirs
|
Set the API number as suite metadata
This helps for those rare times I want to make sure the tests are
running on the version I think they are running on. | @@ -71,6 +71,7 @@ class Salesforce(object):
"""
try:
version = int(float(self.get_latest_api_version()))
+ self.builtin.set_suite_metadata("Salesforce API Version", version)
locator_module_name = "locators_{}".format(version)
except RobotNotRunningError:
|
don't delete media on ICDS
And change logging to log all in one email | from __future__ import absolute_import
from __future__ import unicode_literals
import hashlib
+import json
import logging
import mimetypes
from datetime import datetime
@@ -524,15 +525,18 @@ class ApplicationMediaReference(object):
return self._get_name(self.form_name, lang=lang)
-def _log_media_deletion(app, map_item,... |
Update integration_tests.yml
Changing access to branch name due to slashes | @@ -37,7 +37,7 @@ jobs:
- name: Pull examples
run : |
- python -m poetry run zenml example pull -b ${GITHUB_REF##*/} -f
+ python -m poetry run zenml example pull -b ${GITHUB_REF#refs/heads/} -f
- name: Run quickstart example
run : |
|
Remove test broken in
(and now covered by unit tests in the same PR) | @@ -115,16 +115,6 @@ class GeneralFrontendTest(SeleniumTestCase):
"//div[@id='charts']/div[1]").get_attribute("id"),
'measure_keppra')
- def test_ccg_measures_tags(self):
- url = self.live_server_url + '/ccg/02Q/measures/?tags=foobar'
- self.browser.get(url)
- # nothing is tagged foobar, so should return the text expec... |
Enable Stale
* Enable Stale
Current backdate to2022-01-01T00:00:00Z
* forgot one debug line | @@ -12,14 +12,11 @@ jobs:
stale:
runs-on: ubuntu-latest
- env:
- ACTIONS_STEP_DEBUG: true # DEBUG: toggle to false
-
steps:
- uses: actions/stale@v5
with:
# Debug
- debug-only: true # DEBUG: Toggle to false
+ debug-only: false # DEBUG: Toggle to false
start-date: '2022-01-01T00:00:00Z' # ISO 8601 or RFC 2822
# General
|
doc: Clarify how to create your own filter
The filter-scheduler doc was pretty old and I was recently asked to give
some guidance on how to create a custom filter.
A doc is better than any chat, so let's make that better. | @@ -325,14 +325,32 @@ would be available, and by default the |ComputeFilter|,
|ImagePropertiesFilter|, |ServerGroupAntiAffinityFilter|,
and |ServerGroupAffinityFilter| would be used.
+Each filter selects hosts in a different way and has different costs. The order
+of ``filter_scheduler.enabled_filters`` affects schedul... |
Add Docker login to Travis configuration
We want to add a Docker login to the Travis configuration in order
to avoid hitting the rate limit of Docker Hub when running
Travis builds. | @@ -19,6 +19,10 @@ env:
- secure: "GmJzDwP60bUWKzIWnhg4j8TkA/IQsM5Ulx+frkPkrZmLnmLZN5K6cWqruZLl/mB6VFvnuGNBwaYq5ADMD8LpIt8LYlmHZ/zOaE04ti3rOvaOHxG+ncMkloeeke+82ismFZsI/X15F4yawUKR74lnAS5u8BfY2P+Jqko1D+15WKg="
# DATADOG_API_KEY
- secure: "IDSCI7WXoTowmqcPM6Ip5I8iNu+utvLgzhpuI55Imi0kT6DEgqhYmRzHGY2AfSNKlhClYiGSGzWfqub3/0... |
Reused invalid_name_error variable when raising error.
Fixed | @@ -153,19 +153,13 @@ class BaseChannelLayer:
"Specific channel names in receive() must end at the !"
)
return True
- raise TypeError(
- "Channel name must be a valid unicode string containing only ASCII "
- + "alphanumerics, hyphens, or periods, not '{}'.".format(name)
- )
+ raise TypeError(self.invalid_name_error("Ch... |
TST: Two methods to bound errors:
Harmonic mean scaled covariance matrix
Using rotation error vector | @@ -813,13 +813,19 @@ def test_match_vectors_noise():
noisy_result = noise.apply(result)
est, cov = Rotation.match_vectors(noisy_result, vectors)
+
# Use rotation compositions to find out closeness
error_vector = (rot * est.inv()).as_rotvec()
-
assert_allclose(error_vector[0], 0, atol=tolerance)
assert_allclose(error_v... |
travis: Switch to xenial for linux builds
Give up on containers. THey are going away: | @@ -3,16 +3,18 @@ language: python
python:
- 3.5
- 3.6
-
-sudo: false
+ - 3.7
install:
- pip install coveralls
- pip install git+https://github.com/benureau/leabra.git@master
- pip install -e .[dev]
-os:
- - linux
+os: linux
+
+dist: xenial
+
+env: PYTHONWARNINGS="ignore::DeprecationWarning"
# Cache installed python pa... |
bug 1820
render classifications as list in Looker | @@ -39,6 +39,8 @@ interface TagData {
value: string;
}
+const LABEL_LISTS = [withPath(LABELS_PATH, CLASSIFICATIONS)];
+
export class TagsElement<State extends BaseState> extends BaseElement<State> {
private activePaths: string[] = [];
private colorByValue: boolean;
@@ -261,7 +263,7 @@ export class TagsElement<State ext... |
Adds broken s_async.jobret(job) test
jobret does not handle RetnErr being raised from within a job | @@ -10,6 +10,15 @@ from synapse.tests.common import *
class AsyncTests(SynTest):
+ def test_async_jobret(self):
+ job = (32 * '0', {
+ 'err': 'RetnErr', 'errmsg': "RetnErr: excn='NotReady'",
+ 'errfile': '/afile.py', 'errline': 123456, 'errinfo': {'excn': 'NotReady'}
+ })
+ s_async.jobret(job)
+ # FIXME - broken test d... |
update episodes _include to include markers
add markers attrib to episode | @@ -644,7 +644,7 @@ class Episode(Playable, Video):
_include = ('?checkFiles=1&includeExtras=1&includeRelated=1'
'&includeOnDeck=1&includeChapters=1&includePopularLeaves=1'
- '&includeConcerts=1&includePreferences=1')
+ '&includeMarkers=1&includeConcerts=1&includePreferences=1')
def _loadData(self, data):
""" Load attr... |
Refactor tests to be a bit more readable
Make arguments more verbose and have pytest params as inputs at the
start and expected things at the end | @@ -1143,13 +1143,13 @@ def test_preview_letter_template_precompiled_s3_error(
@pytest.mark.parametrize(
- "filetype, post_url, message, requested_page",
+ "requested_page, filetype, message, expected_post_url",
[
- ('png', 'precompiled-preview.png', "", ""),
- ('png', 'precompiled/overlay.png?page_number=1', "content-... |
change: simplify the code to build RPMs
Eliminate custom classes to build RPMs and just try to extend
setuptools.command.bdist_rpm.bdist_rpm to simplify the code to build
RPMs a lot. | @@ -4,9 +4,10 @@ from setuptools import setup, Command
import glob
import os.path
import os
-import subprocess
import sys
+import setuptools.command.bdist_rpm
+
sys.path.insert(0, os.path.dirname(__file__)) # load anyconfig from this dir.
from anyconfig.globals import PACKAGE, VERSION
@@ -27,55 +28,31 @@ def list_filep... |
Update triclinic lattice generation with random matrices
Remove merge errors | @@ -9,7 +9,7 @@ N : number of atoms in the primitive cell,
output:
a structure class
-possibly output cif file
+possibly output cif fileS
cif file with conventional setting
'''
@@ -643,10 +643,8 @@ class random_crystal():
self.valid = True
return
-<<<<<<< HEAD
=======
self.struct = self.Msg2
->>>>>>> 50f6fafe4b77c2013b... |
Set ingredient recipe names dynamically
not from the case | @@ -94,7 +94,7 @@ INDICATORS = [
I('urban_rural', IN_UCR, IS_RECALL_META),
I('food_code', IN_UCR),
I('food_name', IN_UCR, IN_FOOD_FIXTURE),
- I('recipe_name', IN_UCR),
+ I('recipe_name', IN_UCR, CALCULATED_LATER),
I('caseid'),
I('reference_food_code'),
I('base_term_food_code', IN_UCR),
@@ -200,7 +200,6 @@ class FoodRow... |
Delta Shape issues Fix
Did not account for number of frames. | @@ -108,7 +108,7 @@ class OverTheAirFlickeringTorch(EvasionAttack):
epoch_print_str = f"{num_epochs}:"
delta = torch.nn.parameter.Parameter(
- torch.zeros(x[0].shape[1], 3, 1, 1).normal_(mean=0.0, std=0.2).to(self.estimator.device), requires_grad=True
+ torch.zeros(1, 3, 1, 1).normal_(mean=0.0, std=0.2).to(self.estimat... |
Refactor existing pins evaluation
This was failing on second run because of unamed editable req.
Use dictionary comprehension as key evaluation was not used outside
loop.
Fixes | @@ -132,13 +132,8 @@ def cli(verbose, dry_run, pre, rebuild, find_links, index_url, extra_index_url,
# Proxy with a LocalRequirementsRepository if --upgrade is not specified
# (= default invocation)
if not (upgrade or upgrade_packages) and os.path.exists(dst_file):
- existing_pins = {}
ireqs = parse_requirements(dst_fi... |
opkg: Include reinstalled packages in return dict
Previously, if packages were reinstalled, they were not included
in the return dictionary of `install()`. Fix this issue. | @@ -385,6 +385,31 @@ def install(name=None,
new = list_pkgs()
ret = salt.utils.compare_dicts(old, new)
+ if pkg_type == 'file' and reinstall:
+ # For file-based packages, prepare 'to_reinstall' to have a list
+ # of all the package names that may have been reinstalled.
+ # This way, we could include reinstalled package... |
fw/output: Ensure that `Event` message is converted to a string
Explicitly convert the passed message into a string as this is expected when
generating a event summary, otherwise splitting can fail. | @@ -617,7 +617,7 @@ class Event(object):
def __init__(self, message):
self.timestamp = datetime.utcnow()
- self.message = message
+ self.message = str(message)
def to_pod(self):
return dict(
|
Implemented a general way to use of prompt widget.
Closes | @@ -38,6 +38,7 @@ import string
from collections import OrderedDict, deque
from libqtile.log_utils import logger
+from libqtile.command import _SelectError
from . import base
from .. import bar, command, hook, pangocffi, utils, xcbq, xkeysyms
@@ -377,15 +378,21 @@ class Prompt(base._TextBox):
# can't detect what's a pi... |
Don't check code style for UnitTests
Makefile: Remove static target | @@ -33,14 +33,14 @@ compile_ext:
test: compile_ext redis
@$(MAKE) unit coverage
@$(MAKE) integration_run
- @$(MAKE) static
+ @$(MAKE) flake
@$(MAKE) kill_redis
ci_test: compile_ext
@echo "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
@echo "TORNADO IS `python -c 'import torna... |
remote apps don't have this property
Sentry issue: [COMMCAREHQ-BSZ](https://sentry.io/dimagi/commcarehq/issues/578940381/) | @@ -255,7 +255,7 @@ def get_app_view_context(request, app):
)
})
context.update({
- 'smart_lang_display_enabled': app.smart_lang_display
+ 'smart_lang_display_enabled': getattr(app, 'smart_lang_display', False)
})
# Not used in APP_MANAGER_V2
context['is_app_view'] = True
|
Return on the end of the prefetch_to_device generator.
Following pep-0479, modern python generators signal the end by returning rather than raising StopIteration.
(this issue was originally noted by Marvin Ritter.)
ref: | @@ -149,7 +149,7 @@ def prefetch_to_device(iterator, size, devices=None):
try:
xs = queue.popleft()
except IndexError:
- raise StopIteration
+ return
try:
queue.append(jax.tree_map(_prefetch, next(iterator)))
except StopIteration:
|
Update apt_donot.txt
Screen on is very helpful. :) | @@ -163,7 +163,11 @@ ezeescan.com
# Reference: https://otx.alienvault.com/pulse/5d7f7deb8cdf93013777cbad
# Reference: https://www.secrss.com/articles/13726
# Reference: https://otx.alienvault.com/pulse/5d93295e8526be516a05f369
+# Reference: https://twitter.com/ArielJT/status/1183064542869381121
+bsodsupport.icu
+en-con... |
Update gdb_server_json_test.py.
Add boards list test.
Add features list test. | @@ -185,7 +185,7 @@ def gdb_server_json_test(board_id, testing_standalone=False):
result = GdbServerJsonTestResult()
- print("\n\n----- TESTING BOARDS LIST -----")
+ print("\n\n----- TESTING PROBES LIST -----")
out = subprocess.check_output(['pyocd', 'json', '--probes'])
data = json.loads(out)
test_count += 2
@@ -203,6... |
Make auto_box = False as default. Auto box should not be the default
in most cases, I believe. | @@ -176,7 +176,7 @@ class PackmolRunner:
def __init__(self, mols, param_list, input_file="pack.inp",
tolerance=2.0, filetype="xyz",
control_params={"maxit": 20, "nloop": 600},
- auto_box=True, output_file="packed.xyz",
+ auto_box=False, output_file="packed.xyz",
bin="packmol"):
"""
Args:
@@ -313,7 +313,6 @@ class Packm... |
Add reference to run interface servers in docs.
My mistake, I forgot to make a link to the section before referencing it. Added a link to the "Run Interface Servers" section. | @@ -136,6 +136,8 @@ Or telling a worker to ignore all messages on the "thumbnail" channel::
python manage.py runworker --exclude-channels=thumbnail
+.. _run-interface-servers:
+
Run interface servers
---------------------
|
tests/mechanism: Update overlooked old way of selecting mech execution mode
Pointed out by linter. | @@ -967,12 +967,7 @@ class TestTransferMechanismTimeConstant:
T.noise.base = 10
- if mech_mode == 'Python':
- val = T.execute([1, 2, -3, 0])
- elif mech_mode == 'LLVM':
- val = e.execute([1, 2, -3, 0])
- elif mech_mode == 'PTX':
- val = e.cuda_execute([1, 2, -3, 0])
+ val = EX([1, 2, -3, 0])
assert np.allclose(val, [[1... |
simplify inserted axes in coeffs of Polyval
Inserted axes of the points were already swapped with `Polyval`. This patch
does the same for inserted axes of the coefficients. | @@ -3682,10 +3682,11 @@ class Polyval(Array):
return zeros_like(self)
elif self.ngrad == degree:
return prependaxes(self._const_helper(), self.points.shape[:-1])
- points, where = unalign(self.points, naxes=self.points.ndim - 1)
- if len(where) < self.points.ndim - 1:
- where = where + tuple(range(self.points.ndim - 1,... |
[engine] Small bugfix if no IDs are configured
see | @@ -295,11 +295,14 @@ class Engine(object):
self._current_module = module
module.update_wrapper(module.widgets())
if module.error is None:
- widget_ids = module.parameter('id', '').split(',')
+ widget_ids = []
+ if module.parameter('id'):
+ widget_ids = module.parameter('id').split(',')
idx = 0
for widget in module.wid... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.