added sleep calculator and a book

Hope this minor and first PR helps!. This book helped me a lot!
Thanks for making it open!

Thanks for the PR :)


Validation: add validation for curly braces in Recruitment

PCs often leave out the double curly braces when using Recruitment or sending Recruitment Reminders. Add validation for this.

I wonder if this is something we need to validate?
We are catching this in the error: https://openreview.net/forum?id=XmoAOBSvaZ&noteId=WbABCsfpU1g and we have a test for this: https://github.com/openreview/openreview-py/blob/a91c8af1c71ae55dc4646057260f00bdb116d698/tests/test_venue_request.py#L555
cc @melisabok @racheljsmart

What about adding a pre process function? adding Emilia so she can take a look.

Emilia and I realized that we don't have the Key error anymore because we are using find and replace to replace the tokens:
https://github.com/openreview/openreview-py/blob/master/openreview/tools.py#L1284
I still suggest creating a pre-process function to validate that the words that are wrapped between {{}} must be supported by us, this is the list of tokens supported, there are different tokens per field:
invitation_email_subject:

invitee_role

invitation_email_content:

fullname
contact_info
invitation_url (I would ignore accept_url and decline_url because this is legacy recruitment code)
invitee_role

accepted_email_template:

fullname
reviewer_name


Babel can not extract words from superset-ui packages

A clear and concise description of what the bug is.
Expected results
when extracting new strings for translation, words inside superset-ui packages should be extracted as well.
Actual results
Babel only extracts words from superset-frontend/src and backend code. ignored superset-ui plugins inside node_modules
Screenshots

How to reproduce the bug

Go to project root directory
Run flask fab babel-extract --target superset/translations --output superset/translations/messages.pot --config superset/translations/babel.cfg -k _ -k __ -k t -k tn -k tct
See logs

Environment

superset version: 0.37
python version: 3.7.0
node.js version: v12.18.2
npm version: 6.14.5

Checklist
Make sure these boxes are checked before submitting your issue - thank you!

[X] I have checked the superset logs for python stacktraces and included it here as text if there are any.
[X] I have reproduced the issue with at least the latest released version of superset.
[X] I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context
Many chart plugins use t function to translate strings, but these strings can not extracted for translation.

Hi, @grace-shi. there are a workaround to fetch translation from any directory that specify a custome babel.cfg file. The babel.cfg contains superset-ui-plugs directory.

closing ... issued has been resolved by  https://github.com/apache/incubator-superset/pull/10902.


Handling of fatal errors with duk_json_decode

Currently Duktape calls abort and exit if a fatal error occurs. For example when duk_json_decode is used with invalid JSON data.
This is not ideal for situations where Duktape is used inside a host application. In such a situation the host application just quits without a chance to inform the user.
Please make errors like duk_json_decode with invalid JSON data recoverable. Excuse me, but I don't see a reason why this should trigger a fatal error. So my proposal would be to inform the calling application that duk_json_decode was unsuccessful and let it deal with the situation.

duk_json_decode() follows the same behavior as JSON.parse(), i.e. it throws a SyntaxError when the input is not valid.
You can use duk_safe_call() to get a protected wrapper around duk_json_decode() and any other calls you make.

Your top-level call should be protected--duk_pcall() or duk_peval().  Otherwise any error thrown in JS has no place to go and will crash the process, as you've seen.  I learned this the hard way myself. :)
Duktape definitely works a bit differently than most JS engines in this regard.  I find it's easiest to work with if you view your native stuff as an extension of the JS environment.  So then the abort becomes intuitive--you crashed because you didn't wrap your JSON decode in a try/catch (i.e. protected call), which would be equally fatal in JS as well.

Duktape uses the same basic model as Lua: errors are handled by doing a longjmp, and that longjmp needs to have some place to go. Adding a longjmp catchpoint to every API call (and having return types indicating what happened etc) would be bad for e.g. performance so if fatal errors are an issue (they aren't for all programs) the first call you make should be one of the protected calls:

http://duktape.org/api.html#taglist-protected

This is analogous to an Ecmascript program wrapping its main function e.g. as:
try {
    mainProgram();
} catch (e) {
    print('main program failed: '  + e);
}

instead of bubbling out an unhandled exception.

On a sidenote, I've never seen any C program abuse longjmp quite so thoroughly as Duktape does. It's glorious. :stuck_out_tongue_winking_eye:  I have to give credit where it's due, the fact you don't leak a single byte of memory with all that jumping around is nothing short of amazing.

I don't agrea at all with saying "abuse longjmp". It's used precisely for its intended purpose, i.e. long control transfers which are otherwise unsupported in C :-)

I know, I was mostly using the word "abuse" in an ironic/joking manner, to point out how deftly it's actually employed. :)

There's some classes of programs where long control transfer is quite useful and unfortunately not well supported (other than longjmp) in portable programs. Many interpreters do that, and do some quite unportable stuff like managing multiple C stacks manually.
The upside of long control transfer is that you don't need to pollute every function everywhere with return values indicating an error occurred, and then plumb those error codes around very tediously. The downside is that resource tracking needs to be explicit - for Duktape this is relatively easy to handle as long all temporaries are on the value stack which is automatically memory managed. If that wasn't the case it'd be quite difficult to work with.

Thank you for your answer. But I need a bit more assistance on how to use duk_safe_call.
Basically I want to set the value of a global variable. The value is a JSON encoded string. But since this is a user provided string, it could have errors which is why I want to add some error handling on the JSON decoding.
My current code looks like this:
duk_push_global_object( context );
duk_push_string( context, value.c_str() );
duk_json_decode( context, -1 );
duk_put_prop_string( context, -2, variable.c_str() );
duk_pop( context );
How should I use duk_safe_call in this context?
Thank you.

If you just want to wrap this operation inside a protected call (and not a larger program), it'd look something like:
duk_ret_t my_json_decode(duk_context *ctx) {
    duk_json_decode(ctx, -1);
    return 1;  /* result on stack top */
}

/* ... */

duk_int_t rc;

duk_push_global_object(ctx);
duk_push_string(ctx, value.c_str());
rc = duk_safe_call(ctx, my_json_decode, 1 /*nargs*/, 1 /*nrets*/);
if (rc != 0) {
    printf("JSON decode failed: %s\n", duk_safe_to_string(ctx, -1));
    duk_pop_2(ctx);  /* pop global and error */
} else {
    /* success */
    duk_put_prop_string(ctx, -2, variable.c_str());
    duk_pop(ctx);
}

This will still abort if e.g. duk_push_string() runs out of memory. You could fix that but you'd need to postpone the string pushing to happen inside the safe call.

Thank you for the example. I have it working now.

Good to hear :)


PullRequestReviewsEnforcementRequest.DismissalRestrictionsRequest set to nil results in 422 from GH

According to doc user is able to pass nil to disable DismissalRestrictions and looking at method below this nil is converted to empty array.
Seems that this is not working properly because
&github.ProtectionRequest{
		RequiredPullRequestReviews: &github.PullRequestReviewsEnforcementRequest{DismissalRestrictionsRequest: nil, DismissStaleReviews:false},
	}

results in:
No subschema in "anyOf" matched.
For 'properties/dismissal_restrictions', [] is not an object.
Not all subschemas of "allOf" matched.
For 'anyOf/1', {"dismissal_restrictions"=>[], "dismiss_stale_reviews"=>false} is not a null. []]

and '422 Invalid request' from GH
@navarrano could you please take a look?

And I hope that PullRequestReviewsEnforcementRequest supports require_code_owner_reviews key 😄 .
https://developer.github.com/v3/repos/branches/#update-branch-protection

I ran into this issue as well in #674. See https://github.com/google/go-github/blob/e062a8cd852f0fb981c8c9f837c214c4d1031870/test/integration/repos_test.go#L111-L113.

I have PR #703 in to fix this.  It seems to be failing because I added a new library go-spew which is essentially the recursive %+v I always wanted and that doesn't get pulled in during the build.

Tests are passing :)

See my comment at https://github.com/google/go-github/pull/703#issuecomment-324064996.
I think in order to resolve this bug, we need to figure out how to reproduce a successful response from GitHub using REST API. Then, once we have that, we can work on the Go code to fix the code, if needed.

From my understanding of #703, the way to get a successful response from GitHub is to perform the API call involving DismissalRestrictionsRequest on an organization-owned repository. It doesn't work on personal repositories and gives 422 in that case. /cc @beiriannydd

I think this is solved by #744.

I just started seeing a 422 when an empty array is passed for dismissal_restrictions.  The docs (https://developer.github.com/v3/repos/branches/#update-branch-protection) specifically mention that passing an empty array is the right way to disable dismissal restrictions (which is weird, IMO, since null would work just fine for this, and the object isn't normally an array).
In any case, I have a support request out to GitHub to try to find out what the expected behavior is/should be.  If the docs are wrong, and the property should be null (instead of an empty array), I'll provide a PR to make the change.

It seems to me that GitHub has updated the docs by now, and I'm not aware of what exactly we're waiting on them, so removed that label. I think PR #791 will resolve this issue (let me know if not).


SPFx 1.16 load WebPart error r.default.acequire is not a function

Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested

[ ] 💥 Internet Explorer
[X] 💥 Microsoft Edge
[X] 💥 Google Chrome
[ ] 💥 FireFox
[ ] 💥 Safari
[ ] mobile (iOS/iPadOS)
[ ] mobile (Android)
[ ] not applicable
[ ] other (enter in the "Additional environment details" area below)

Additional environment details

SPFx version: 1.16
Node.js version 16.16.0 LTS
-Graph API
-SPFx PnP Controls
-SPFx PnP Property Controls

Describe the bug / error
I developed a WebPart using SPFx Framework 1.16 with no problems, but, when I add this WebPart with other custom WebParts in the same page, the others WebParts not loading with an error saying:
-WebPartZone.LoadWebPart r.default.acequire is not a function

Thanks in advance
Steps to reproduce

Just added Webpart SPFx version 1.16.0 in a page with others custom Webpart, including another WebParts using the same version of SPFx

Expected behavior
WebPartZone.LoadWebPart r.default.acequire is not a function

@Wagnerah - sorry for the long delay.
Could you share the web part or repro tenant with me?
The word acequire sounds weird to me. It seems like some misspelled code that should be acquire.
You can use<EMAIL_ADDRESS>to share the details.


Symbol heading is off for ADS-B tracks

See https://github.com/snstac/adsbxcot/issues/14

See https://github.com/snstac/airtak/issues/23


[Feature Request] Blacklist file

Your config file format is fine for a small number of entries but becomes a bit verbose for large block lists.  Would it be possible to update the config format to support referencing an external file of IP addresses and CIDR ranges (example: https://github.com/firehol/blocklist-ipsets/blob/master/xroxy_30d.ipset )?  It would essentially ignore any line that begins with # and then loop through each IP (expanding the CIDR entries) to set srcip and dstip and a high blocktime for all ports.  For now, I'm creating a quick convert script that converts the list into the correct config format to test the performance impact (I'm hoping eBPF has better performance than iptable's ipset).

This is something I will look into doing in the future. I know I've done this with another program without any issues. I might just implement this type of functionality into my Barricade Firewall project here which is basically this XDP firewall, but with performance improvements and the ability to connect to a backbone to sync filters (still in development).

Do you recommend I switch over to https://github.com/Barricade-FW/Firewall for further testing?  I had noticed it before but I wasn't sure which project was most current/active.

The XDP firewall itself in the Barricade Firewall project is functional at the moment without the backbone. However, you will need to install Libsodium on the system (it's not in-use right now, but will be in the future). You'll need to install it regardless for compiling, though.
The XDP firewall in the Barricade FW should perform faster than this firewall because of improvements with timestamps. I read a mailing list thread here that states using bpf_ktime_get_ns() inside of the XDP program will decrease performance (this function returns the time in nano seconds since the system has last started and this is the function this firewall uses to get the current time inside the XDP program). I haven't performed benchmark tests myself, but I still decided to just update a BPF map every second in the user space with the UNIX timestamp and use that to identify how long a source IP should be blocked for inside the XDP program. This should be fastest than using the other function anyways.
There were some key changes for config options in the Barricade Firewall when I converted everything to JSON. I don't have it documented at the moment, but I will be doing so in the future. In the meantime, I'd recommend reading this file to learn what the key names are (they're in quotes usually inside the json_object_object_get_ex() function).
Here's an example config for the Barricade Firewall:
{
    "interface": "ens18",
    "stats": true,

    "filters": [
        {
            "enabled": true,
            "action": 0,

            "tcp_enabled": true,
            "tcp_dport": 8888,

            "blocktime": 15
        }
    ]
}

I hope this helps!

Cool, I'll transfer this request to your Barricade Firewall project.


Update Composer dependencies (2021-11-24-00-13)

Visual regression test passed!
View the visual regression test report


1194 when renaming a token ask to rename any local styles in addition to the remap tokens functionality we have

When we rename a token, we can update the styles in the document and activeTheme either.

Also coverage :grimacing:

@swordEdge could you solve the conflicts?


💄(course) replace course-detail__run-cta

Purpose
&__run-cta in _course_detail.scss is still used by the fragment_course_run template when not connected to lms
Proposal
Restore that portion of the scss.

Hey @jbpenrath thank you for the quick feedback, i've amended the pr and the commit to fix it like you suggested.
Sorry for the long delay.


metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

Some time in the last 12 hours, our build system using gsutil started failing and it appears to be related to six 1.11.0, which was just released.
$ gsutil
...
 File "myproject/venv/lib/python2.7/site-packages/apitools/base/protorpclite/messages.py", line 1168, in <module>
    class Field(six.with_metaclass(_FieldMeta, object)):
TypeError: Error when calling the metaclass bases
    metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

gsutil declares a dependency on six>=1.9.0 (ugh) so it pulls in the just released 1.11.0. Rolling back to six 1.10.0 and gsutil runs alright. I'm not really involved in Python or gsutil, so maybe gsutil needs to fix something, no idea, but it seems like a breakage that's not called out in the release notes or maybe something to fix.
cc @jdemeyer @benjaminp
Possibly introduced in https://github.com/benjaminp/six/pull/191

Just stumbled onto this as well. Not using gsutil. Another package (django-extensions) has six>=1.2 as a dependency. For now, adding 1.10.0 to the requirements myself as a temporary workaround.

A minimal non-working example would be nice.

Looking at the 3rd party package code that triggers the error, it boils down to this:
import six

class Meta(type):
    pass

class A(six.with_metaclass(Meta)):
    __metaclass__ = Meta

Removing the __metaclass__ prevents the TypeError.

Removing the metaclass prevents the TypeError.

Obviously, that is the right fix. The whole point of using six.with_metaclass is that you do not need __metaclass__ (which is not supported in Python 3).
That being said, if this broke actual usage (even if that actual usage is arguably wrong), it makes sense to try to fix this.

Having this issue since this morning, seems somehow related to the new version, yesterday was working fine
Collecting six>=1.5.2 (from pyOpenSSL==17.2.0->comp-b==1.2.6.dev1->-c constraints.txt (line 1))
  Downloading six-1.11.0-py2.py3-none-any.whl

Successfully built tornado WeasyPrint MarkupSafe ndg-httpsclient Jinja2 pika pycparser
Installing collected packages: six, setuptools, webencodings, html5lib, tinycss2, cssselect2, pycparser, cffi, WeasyPrint, idna, asn1crypto, cryptography, pyOpenSSL, singledispatch, backports-abc, tornado, director-api, pika, PyMySQL, amqp-client, MarkupSafe, Jinja2, urllib3, pyasn1, alabaster, ndg-httpsclient, colorlog, queue-listener, comp-b, mando, colorama, py, futures
  Found existing installation: six 1.10.0
    Uninstalling six-1.10.0:
      Successfully uninstalled six-1.10.0
  Rolling back uninstall of six
Exception:
Traceback (most recent call last):
  File "/opt/test/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/opt/test/local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/opt/test/local/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/opt/test/local/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/opt/test/local/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/opt/test/local/lib/python2.7/site-packages/pip/wheel.py", line 247, in move_wheel_files
    prefix=prefix,
  File "/opt/test/local/lib/python2.7/site-packages/pip/locations.py", line 140, in distutils_scheme
    d = Distribution(dist_args)
  File "/opt/test/local/lib/python2.7/site-packages/setuptools/dist.py", line 321, in __init__
    _Distribution.__init__(self, attrs)
  File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/opt/test/local/lib/python2.7/site-packages/setuptools/dist.py", line 387, in finalize_options
    ep.require(installer=self.fetch_build_egg)
  File "/opt/test/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2324, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/opt/test/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 862, in resolve
    new_requirements = dist.requires(req.extras)[::-1]
  File "/opt/test/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2568, in requires
    dm = self._dep_map
  File "/opt/test/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2815, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/opt/test/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2824, in _compute_dependencies
    for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
  File "/opt/test/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2806, in _parsed_pkg_info
    metadata = self.get_metadata(self.PKG_INFO)
  File "/opt/test/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1468, in get_metadata
    value = self._get(self._fn(self.egg_info, name))
  File "/opt/test/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1577, in _get
    with open(path, 'rb') as stream:
IOError: [Errno 2] No such file or directory: '/opt/test/lib/python2.7/site-packages/six-1.10.0.dist-info/METADATA'

IOError: [Errno 2] No such file or directory: '/opt/test/lib/python2.7/site-packages/six-1.10.0.dist-info/METADATA'

This is obviously unrelated to this issue.

I'll create a pull request to remove the __metaclass__ from my example. Not sure if @dghubble can spot a similar pattern or if it's caused by something different.

I could probably manage to fix the
class A(six.with_metaclass(Meta)):
    __metaclass__ = Meta

example but it will lead to more complicated code for six.with_metaclass.
I would like some input from the six maintainers on how to proceed.

I have the same issue with some google libraries:
  File "/Users/florenthemmi/dev/env/lib/python2.7/site-packages/apache_beam/internal/gcp/json_value.py", line 23, in <module>
    from apitools.base.py import extra_types
  File "/Users/florenthemmi/dev/env/lib/python2.7/site-packages/apitools/base/py/__init__.py", line 21, in <module>
    from apitools.base.py.base_api import *
  File "/Users/florenthemmi/dev/env/lib/python2.7/site-packages/apitools/base/py/base_api.py", line 31, in <module>
    from apitools.base.protorpclite import message_types
  File "/Users/florenthemmi/dev/env/lib/python2.7/site-packages/apitools/base/protorpclite/message_types.py", line 25, in <module>
    from apitools.base.protorpclite import messages
  File "/Users/florenthemmi/dev/env/lib/python2.7/site-packages/apitools/base/protorpclite/messages.py", line 1165, in <module>
    class Field(six.with_metaclass(_FieldMeta, object)):
TypeError: Error when calling the metaclass bases
    metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

The issue in google-apitools is the same:
# TODO(rafek): Prevent additional field subclasses.
class Field(six.with_metaclass(_FieldMeta, object)):
    """Definition for message field."""

    __initialized = False  # pylint:disable=invalid-name
    __variant_to_type = {}  # pylint:disable=invalid-name

    # TODO(craigcitro): Remove this alias.
    #
    # We add an alias here for backwards compatibility; note that in
    # python3, this attribute will silently be ignored.
    __metaclass__ = _FieldMeta

Got the same issue using a Django package.
 File "/usr/local/lib/python2.7/site-packages/autocomplete_light/shortcuts.py", line 8, in <module>     from .forms import *   File "/usr/local/lib/python2.7/site-packages/autocomplete_light/forms.py", line 438, in <module>     class ModelForm(six.with_metaclass(*bases)):   File "/usr/local/lib/python2.7/site-packages/autocomplete_light/forms.py", line 283, in __new__     attrs)   File "/usr/local/lib/python2.7/site-packages/django/forms/models.py", line 208, in __new__     new_class = super(ModelFormMetaclass, mcs).__new__(mcs, name, bases, attrs)   File "/usr/local/lib/python2.7/site-packages/django/forms/forms.py", line 41, in __new__     new_class = super(DeclarativeFieldsMetaclass, mcs).__new__(mcs, name, bases, attrs)   File "/usr/local/lib/python2.7/site-packages/django/forms/widgets.py", line 153, in __new__     new_class = super(MediaDefiningClass, mcs).__new__(mcs, name, bases, attrs) TypeError: Error when calling the metaclass bases     metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

Which version of django-autocomplete-light is that?

django-autocomplete-light 2.3.3

Same issue with django-autocomplete-light 2.3.3:
class ModelForm(six.with_metaclass(*bases)):
    """
    ModelForm override using our metaclass that adds our various mixins.

    .. py:attribute:: autocomplete_fields

        A list of field names on which you want automatic autocomplete fields.

    .. py:attribute:: autocomplete_exclude

        A list of field names on which you do not want automatic autocomplete
        fields.

    .. py:attribute:: autocomplete_names

        A dict of ``field_name: AutocompleteName`` to override the default
        autocomplete that would be used for a field.

    Note: all of ``autocomplete_fields``, ``autocomplete_exclude`` and
    ``autocomplete_names`` understand generic foreign key and generic many to
    many descriptor names.
    """
    __metaclass__ = ModelFormMetaclass

same for me using the module boxsdk.
just need to:
pip install six==1.11.0 boxsdk==2.0.0a8
python -c "import boxsdk"
et bim:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/boxsdk/__init__.py", line 6, in <module>
    from .client import *  # pylint:disable=wildcard-import,redefined-builtin
  File "/usr/local/lib/python2.7/site-packages/boxsdk/client/__init__.py", line 5, in <module>
    from .client import Client
  File "/usr/local/lib/python2.7/site-packages/boxsdk/client/client.py", line 12, in <module>
    from ..object.events import Events
  File "/usr/local/lib/python2.7/site-packages/boxsdk/object/events.py", line 15, in <module>
    class EventsStreamType(with_metaclass(ExtendableEnumMeta, TextEnum)):
  File "/usr/local/lib/python2.7/site-packages/boxsdk/util/compat.py", line 77, in with_metaclass
    return type.__new__(TemporaryMetaSubclass, str('temporary_class'), bases, {})
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

using six 1.10.0 there is no problem.

boxsdk is more interesting because it uses six.with_metaclass in an unusual way to define a variant of with_metaclass:
def with_metaclass(meta, *bases, **with_metaclass_kwargs):
    """Extends the behavior of six.with_metaclass.
    [...]
    """
    temporary_class = six.with_metaclass(meta, *bases, **with_metaclass_kwargs)
    temporary_metaclass = type(temporary_class)

    class TemporaryMetaSubclass(temporary_metaclass):
        @classmethod
        def __prepare__(cls, name, this_bases, **kwds):  # pylint:disable=unused-argument
            return meta.__prepare__(name, bases, **kwds)

    return type.__new__(TemporaryMetaSubclass, str('temporary_class'), bases, {})

This is using with_metaclass internals, so it shouldn't be a surprise that it breaks.
It would be better if boxsdk would have a complete self-contained implementation if they don't like six.with_metaclass. The current mixture of six.with_metaclass with custom code is what causes the trouble.

I have the same issue with the pywbem project. I can circumvent the issue by pinning the six version to 0.10.0, for the time being.
File six_meta_issue.py:
import six

class MetaPywbemLoggers(type):
    loggers = {}

class PywbemLoggers(six.with_metaclass(MetaPywbemLoggers)):
    __metaclass__ = MetaPywbemLoggers

With six 1.11.0:
$ PYTHONPATH=. python -c "import six_meta_issue"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "six_meta_issue.py", line 6, in <module>
    class PywbemLoggers(six.with_metaclass(MetaPywbemLoggers)):
TypeError: Error when calling the metaclass bases
    metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

class PywbemLoggers(six.with_metaclass(MetaPywbemLoggers)):
    __metaclass__ = MetaPywbemLoggers

As discussed above, this is wrong: you should not combine six.with_metaclass and __metaclass__. However, as many people seem to do this, it's becoming clear that a fix is needed.

@jdemeyer Hi, I'm sorry for having overlooked the advice above.
After removing the setting of the __metaclass__ attribute, it seems to work on all Python versions we test with. Travis is slow currently, but locally it worked fine. Consider the issue solved for us.
Having said that, six is so commonly used, and this error is so easy to overlook, that a more tolerant way of dealing with this (maybe by raising a DeprecationWarning?) would be good.

I have a fix for the __metaclass__ issue at #211.

How feasible would it be to get a bugfix release out for six that resolves this? While we can work around this in each of our own projects, it impacts anyone who pip installs the latest release (and transitively pulls in the latest release of six).

How feasible would it be to get a bugfix release out for six that resolves this?

What is "this"?
There is no bug in six.with_metaclass: in all the cases that I saw, it's the code using six.with_metaclass that is wrong. Of course, if several projects make the same mistake (combining six.with_metaclass and __metaclass__), it makes sense to support that. This is what I did in #211.
For the record in case it's not clear: I am not a six developer/maintainer, it just happens that I created the pull request #191 that started all this...

With so many different projects impacted by #191, often its best to revert the commit in question and cut a pint release to mitigate the issue. Reverts are easier to get in. Later, you can write and discuss a new implementation with the maintainers.

With so many different projects impacted by #191, often its best to revert the commit in question and cut a point release to mitigate the issue. Reverts are easier to get in. Later, you can write and discuss a new implementation with the maintainers and if there really is a breaking change, draft a changelog note about it.

Please can we release a version with the revert? This is impacting several projects (latest of which being SecurityInnovation/PGPy#217), and whilst it's their fault for incorrect usage, it's clearly a surprisingly common pattern, and has caught people off-guard due to it occurring in a minor version without a mention of breakage in the release notes.
Many thanks :-)

Or just apply my patch from #211.

The quoted text explains why a revert would be preferable in the meantime :-)

in the meantime

I think we're already past that timeframe :-)
Anyway, I'm not disagreeing here: I just wanted to re-advertise my fix in case somebody missed it. In any case, it will be a maintainer of six who has to make the decision.

Still learning my way about use of metaclass
so IIUC, we should not be using
metaclass = NSG
but we are fine to use
# get the data type
data_type = getattr(data, "metaclass", type(data))
or the later also should not be used?
Please if anyone can clarify?
Thanks in adv !

Cleaning up my open issues.


Tpwdcee 1252

Coverage increased (+2.9%) to 88.32% when pulling dff0921feaee2d3b6f659bc2e03d759e13516e0e on TPWDCEE-1252 into 1394138fdcb027d65257f4ef4087d9828fad4332 on master.


Support for animated 3D files

Thanks for your work. Voyager is awesome. It would be great if it could support animations.

Thanks! Animation is definitely on our roadmap, we have just not had a good use case yet.

We look forward to hearing from you as we have a good use case in our project around Voyager and animated gltf. What is the best way to contact you about this ? (i'll edit this and add example links)
One of our collaborators will be in Washington in early December and he can present the whole project and explain our needs and dreams. Is this a good opportunity for you?

Hi @TitouanBoudart ,
Thanks for checking in. Feel free to reach out through email or DM on social: https://dpo.si.edu/contact


[Discussion] Study Publications and Contacts are not written fo xlsx

We ensured that they were correctly added to the model. ARCtrl.ISA.Spreadsheet does not correctly parse this into a FsWorkbook. There we verified the information to be missing.
I am pretty sure the ARCtrl.ISA.Spreadsheet/InvestigationFile/Study=> Studies.toSparseTable function does not include both Publications and Contacts. This is a critical error for Arcitect.

Not a bug. This is by design. The amount of duplicate information between the study file and Investigation file is a pain to handle.

Was a bad Idea to include all this information in the study file to begin with.

When i contacted you about what fields are not needed for our arctypes. Why did we keep those?

They are needed. Just not part of the study file. They are part of the investigation file

That's what I meant with duplicate information. Keeping investigation and study file synchronous

They are needed. Just not part of the study file. They are part of the investigation file

I get that, but why does ArcStudy need publications and contacts?

Well it is a property of the study. But stored in the investigation file.

The study object of the investigation file and the study object of the study file are complmentary and need to be merged by the "SetISAFromContracts" method.

I think I cannot follow. Can you explain to me where the contacts from ArcStudy are used?

They are read from and written to the Investigation file.
That's part of the isa specification.
It's up to the user what he uses them for.

Study/Assay Contacts should be written to respective xlsx. files
add sync contacts function on investigation level to also pull lower level contacts/performers to investigation lvl.
write=read

Study/Assay Contacts should be written to respective xlsx. files
This would imply that we should drop this info from the investigation file altogether. It would be exactly duplicated information.
add sync contacts function on investigation level to also pull lower level contacts/performers to investigation lvl.
Depends on how you interpret it. A person being responsible for one study does not necessarily mean that this person is also responsible for the full investigation.
write=read
Agreed, but where is this not the case in this specific scenario?

I talked with Timo and Dominik about this and the current intent is to keep performers on assays/studies and investigation. People can be in an assay but not in the investigation and reverse.
User friendly handling of persons must be done by the UIs. Example. Autocomplete full person by suggestion.

closing in favor of #167


Blazor : @for loop increment the counter in-loop

Describe the bug
While looping with @for the counter is been autoincrementing for each hit after the first usage inside a funtion.
To Reproduce
        @for( int c = 0; c < 1; c++ )
        {

                <NavLink class="nav-link" href="@(first( c ))" Match="NavLinkMatch.All" @onclick="OnClickTranslationLink">
                    @(second( c ))
                </NavLink>

        }

private string first( int f )
{
    return f.ToString();

}

private string second( int f )
{
    return f.ToString();
}

Got Exceptions? Include both the message and the stack trace
-->
Further technical details

ASP.NET Core version : 3.1.100-preview1-014459
Include the output of dotnet --info

PM> dotnet --info
.NET Core SDK (reflecting any global.json):
Version:   3.1.100-preview1-014459
Commit:    ac3b59712d
Runtime Environment:
OS Name:     Windows
OS Version:  6.3.9600
OS Platform: Windows
RID:         win81-x64
Base Path:   C:\Program Files\dotnet\sdk\3.1.100-preview1-014459\
Host (useful for support):
Version: 3.1.0-preview1.19506.1
Commit:  bbf5542781
.NET Core SDKs installed:
2.0.2 [C:\Program Files\dotnet\sdk]
2.1.700 [C:\Program Files\dotnet\sdk]
2.1.801 [C:\Program Files\dotnet\sdk]
2.1.802 [C:\Program Files\dotnet\sdk]
3.0.100 [C:\Program Files\dotnet\sdk]
3.1.100-preview1-014459 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.0-preview1.19508.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.0-preview1.19506.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.0-preview1.19506.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

The IDE : Visual Studio 2019 Pro 16.4 preview 2

@YordanYanakiev thanks for contacting us.
I'm not sure what you are trying to say. Could you provide a minimalistical repro project that reproduces the issue, what your expectation is and the current behavior you are observing?

The expected results should be - the parameter of each of the functions to be always the same inside the loop, but each function receive somehow increased value of the counter (c)
BlazorApp10.zip

Here a screenshot

@YordanYanakiev thanks for the repro.
I believe that this is an unfortunate consequence of how we create the child content. Here is a look at the compiled razor code for the loop.
I believe the issue is that the integer gets captured into the closure defined for the child content and as such it is always 10. This is most unfortunate, as its definitely counter-intuitive. I'm not sure if there is something we can do about it.
for( int c = 0; c < 10; c++ )
{
    __builder.AddContent(17, "            ");
    __builder.OpenElement(18, "li");
    __builder.AddAttribute(19, "class", "nav-item px-3");
    __builder.AddMarkupContent(20, "\r\n                ");
    __builder.OpenComponent<Microsoft.AspNetCore.Components.Routing.NavLink>(21);
    __builder.AddAttribute(22, "class", "nav-link");
    __builder.AddAttribute(23, "href", first( c )
    );
    __builder.AddAttribute(24, "Match", Microsoft.AspNetCore.Components.CompilerServices.RuntimeHelpers.TypeCheck<Microsoft.AspNetCore.Components.Routing.NavLinkMatch>(
      NavLinkMatch.All
    ));
    __builder.AddAttribute(25, "ChildContent", (Microsoft.AspNetCore.Components.RenderFragment)((__builder2) => {
        __builder2.AddMarkupContent(26, "\r\n                    ");
        __builder2.AddContent(27, second(c));
        __builder2.AddMarkupContent(28, "\r\n                ");
    }
    ));
    __builder.CloseComponent();
    __builder.AddMarkupContent(29, "\r\n            ");
    __builder.CloseElement();
    __builder.AddMarkupContent(30, "\r\n");
}

We'll discuss this within the team and see if we can do something about this or if there is an alternative way to achieve the same thing.

It's actually even worse.
if You add for instance a third function
    private string third( int f )
    {
        Console.WriteLine( f );
        return f.ToString();
    }

And call it in the very same body of the loop - the result in it will be MAYBE 0.

I don't see how the result might be 0. In any case this seems to be an issue with NavLink specifically, as there is a pattern to support this (the same way Router does).
The problem here is that NavLink defines the content as a RenderFragment and that we should probably have made NavLink something like NavLink with the content being RenderFragment so that T can be passed in as context inside the loop.
We can't fix that for 3.1 I believe, but we might be able to do something in 5.0. In general the answer for this type of situation is to use templated components as described in https://docs.microsoft.com/en-us/aspnet/core/blazor/components?view=aspnetcore-3.0#templated-components

As more levels of DOM objects is adding seems like the bug getting worse.
It's an ideological issue which must be noted and fixed i believe. :|

A trivial way to workaround this is to put the scope inside a separate component and render the contents there. For example

    BlazorApp10
    <button class="navbar-toggler" @onclick="ToggleNavMenu">

    </button>

        @for( int c = 0; c < 1; c++ )
        {
            <LinkItem Index="c" />
        }

@code {
    private bool collapseNavMenu = true;

    private string NavMenuCssClass => collapseNavMenu ? "collapse" : null;

    private void ToggleNavMenu()
    {
        collapseNavMenu = !collapseNavMenu;
    }
}

    <NavLink class="nav-link" href="@first()" Match="NavLinkMatch.All">
        @second()
    </NavLink>

@code{
    [Parameter] public int Index { get; set; }

    private string first()
    {
        return Index.ToString();

    }

    private string second()
    {
        return Index.ToString();
    }
}

Yeah. I've actually consider this, but if the language construction offer a clear (on a first sign) approach usually peoples will go for it. This is my point.

Ok, so we've discussed this within the team and apparently this is a C# behavior for which there is a trivial alternative, which is to use foreach. If you do the following you get the expected behavior:
        @foreach(var c in Enumerable.Range(0,10))
        {

                <NavLink class="nav-link" href="@(first( c ))" Match="NavLinkMatch.All" >
                    @(second( c ))
                </NavLink>

        }`

Also, capturing the variable inside of the loop also produces the desired effects. See
        @for( int c = 0; c < 10; c++ )
        {
            var current = c;

                <NavLink class="nav-link" href="@(first( current ))" Match="NavLinkMatch.All" >
                    @(second( current ))
                </NavLink>

        }

Given this, It is unlikely that we do anything here at the Razor level (as this is simply c#) and the recommendation is to use foreach or capture the loop variable in a local inside the loop scope as defined above.
I've filed an issue to track whether we add an analyzer to inform users when they run into this case. https://github.com/aspnet/AspNetCore/issues/16815

I have considered it, yet it is giant issue I believe, and probably it have to be fixed or just the normal loops with counters removed as a feature for the syntax, although many components with enumerated names or so will be depending on such feature.

@YordanYanakiev change your code like this:
@for (int c = 0; c < 1; c++)
{
    int local_c = c; // <== Add this, and then use local variable

        <NavLink class="nav-link" href="@(first( c ))" Match="NavLinkMatch.All">
            @(second(local_c))
        </NavLink>

}

Notice that you have to use local variable only in places where it will be captured into the closure. Of course you can use it also in other places, but it is not necessary. Similar problems where reported here #15633 and here #16140. It is documented also at the end of this section:
https://docs.microsoft.com/en-us/aspnet/core/blazor/components?view=aspnetcore-3.0#lambda-expressions
I have to agree with @javiercn that in case of components with child content it is not obvious that in final code we will have closure.

It looks that I was to slow with my answer and Javier was faster.

I would actually suggest the internal compiler to create a local variable inside the normal loop with counter and use it instead of the counter, when it is used in razor statement. This will solve the problem above.

We wouldn't declare the variable locally, Blazor transpiles to C# in the closest way possible and doesn't have insight into the C# code that you write in the page while its compiling to it, and even if it had, we wouldn't alter the user code in that way.


[BUG] Release 1.3.9 integ-test fail

What is the bug?
Release 1.3.9 integ-test fail
OSD - tar fail at functionalTestDashboards https://build.ci.opensearch.org/blue/organizations/jenkins/bundle-build-zhujiaxi/detail/bundle-build-zhujiaxi/123/pipeline
Couldn't determine Mocha version
(node:1228) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 preprocessor:close listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
tput: No value for $TERM and no -T specified
error Command failed with exit code 8.
.....
.....
2023-03-14 04:29:10 ERROR    | functionalTestDashboards | with-security        | FAIL  |
2023-03-14 04:29:10 ERROR    | functionalTestDashboards | without-security     | FAIL  |

OSD - rpm fail at functionalTestDashboards https://build.ci.opensearch.org/blue/organizations/jenkins/bundle-build-zhujiaxi/detail/bundle-build-zhujiaxi/125/pipeline/65/
Couldn't determine Mocha version
(node:1436) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 preprocessor:close listeners added to [EventEmitter]. Use emitter.setMaxListeners() to increase limit
tput: No value for $TERM and no -T specified
error Command failed with exit code 7.
.....
.....
2023-03-14 06:19:54 ERROR    | functionalTestDashboards | with-security        | FAIL  |
2023-03-14 06:19:54 ERROR    | functionalTestDashboards | without-security     | FAIL  |

How can one reproduce the bug?
Steps to reproduce the behavior.
What is the expected behavior?
A clear and concise description of what you expected to happen.
What is your host/environment?
Operating system, version.
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
Add any other context about the problem.

https://github.com/opensearch-project/opensearch-dashboards-functional-test/pull/589

the PRs to address them is referenced above, thanks @jordarlu

i'll close this issue for now as PRs are merged and tests passed on my side for 1.3.9 using changes from those PRs. please reopen if they are still not working or there are other concerns


Bug: name 'nof_nan_errors' is not defined

Describe the bug
Inclusion of #536 has broken live tool?
Proposed fix
Think the issue is with this block of code which tries to check and return nof_nan_errors rather than nof_nans:
nof_errors = len(values)
# select out only the valid values, that is remove all nans.
values = [i for i, not_nan in zip(values, pd.notna(values)) if not_nan]
nof_nans = nof_errors - len(values)
if nof_nan_errors != 0:
  logger.warning(f"{error.code} returned {nof_nan_errors} NaNs! "
                           + f"output: {str(values)}")

Thanks for this stephen - getting a fix out ASAP!

fixed as of 360cfc602987bddf8db6cb3548da264b42c8c135


first-fit, best-fit and worst-fit memory allocations (Dynamic Memory Allocation)

🚀 Feature
(A clear and concise description of what the feature is.)
Have you read the Contributing Guidelines on Pull Requests?
(Write your answer here.)
Yes
Motivation
(Please outline the motivation for the proposal.)
To Simulate first-fit, best-fit and worst-fit memory allocations in java and c
Pitch
(Please explain why this feature should be implemented and how it would be used.)
Being a part of the GSSOC'21, I would like to implement this in java and C .Please do assign this to me

I have pushed the code and made the pull request
https://github.com/TesseractCoding/NeoAlgo/pull/2766

@HarshCasper I have opened a new pull request
https://github.com/TesseractCoding/NeoAlgo/pull/2858
But its shows DeepSource: Java (beta) Failing after 8s — Analysis Failed: Issues detected that need attention. this error
Everyone is facing this issue
PLEASE TRY TO RESOLVE THIS ISSUE .ITS A BUG I GUESS


drivers: dma for stm32u5 returns from a repeated start or stop command

On a repeated dma_start, the stm3u5 dma driver should return immediately if it is already started.
On a repeated dma_stop, the stm3u5 dma driver should return immediately if it is already stopped.
This like the dma driver does for other stm32 series.
Fixes https://github.com/zephyrproject-rtos/zephyr/issues/54414
Signed-off-by: Francois Ramu<EMAIL_ADDRESS>

$ west build -p auto -b nucleo_u575zi_q tests/drivers/dma/loop_transfer/D
===================================================================
TESTSUITE dma_m2m_loop succeeded

------ TESTSUITE SUMMARY START ------

SUITE PASS - 100.00% [dma_m2m_loop]: pass = 3, fail = 0, skip = 0, total = 3 dus
 - PASS - [dma_m2m_loop.test_dma_m2m_loop] duration = 0.605 seconds
 - PASS - [dma_m2m_loop.test_dma_m2m_loop_repeated_start_stop] duration = 0.605s
 - PASS - [dma_m2m_loop.test_dma_m2m_loop_suspend_resume] duration = 0.866 secos

------ TESTSUITE SUMMARY END ------

===================================================================
PROJECT EXECUTION SUCCESSFUL

Change to use the new stm32_dma_is_enabled_stream() function inside the stm32_dma_disable_stream() (only for the driver of this stm32u5 serie).


[RxR-Habitat] About dagger_trainer.py

I was using the Network to generate the episode stored in the \data\trajectories_dirs\...\trajectories.lmdb
when expert_uuid = self.config.IL.DAGGER.expert_policy_sensor_uuid = shortest_path_sensor
I wonder in habitat which function define shortest_path_sensor?
What is the output of the shortest_path_sensor?
The Principles of operation of shortest_path_sensor？
How to use the shortest_path_sensor to judge the trajectory is the shortest?
Sincerely！
Thanks！

Hi！ @jacobkrantz  I think maybe you know.

I finally solve it according to issue #7
sincerely thanks @jacobkrantz


Sonar Code Coverage is showing incorrect pie chart.

The actual values from db
{
			"name" : "coverage",
			"value" : 96.5,
			"formattedValue" : "96.5%",
			"status" : "Ok"
		},

But in the UI its showing 0% coverage. Is this a known issue ?

No its not a know issue.  can you try and debug it, the code for creating the screen is in UI/src/components/widgets/codeanalysis/view.js

I found the issue by looking at different db entries. If it is  "name" : "coverage" we are not displaying it . If its "name" : "line_coverage" then it is displayed. Which is fine I guess.
But the real issue is once a projects sonar details are loaded in the db based on the metrics I had put in the properties file during the first run. Even if I change the property file to add new metrics at a later stage, its not loading the new metrics specified in the subsequent cron jobs.

If you change the properties file, you need to restart the collector. But your issue points to a good enhancement: Let the UI capture the things that we want to the sonar collector to capture.

Yes. I restarted the collector. Even after that the previously collected stats in the db for a project  is not updated with the new metrics I have specified.
Yes the UI modification will be really nice to have down the line.

Can you delete the existing DB record and re run the collector? The collector wont upsert a record if SONAR's api sends the same date time stamp for the latest scan. Or, you can run another scan instead and look for the new record.

Ahh.  Makes sense.  Probably the data has not been updated in sonar since last scan.
For new scans the newly added metrics are coming as expected.


Packaging the bi-dexhands directory

It would be easier to use if you can rename the folder bi-dexhands to bidexhands and add a __init__.py to turn it into a python package.
This allows directly use this package in the code. Otherwise there will be a ModuleNotFoundError when importing bidexhands.
The setup.py can be updated as follows.
import os
from setuptools import setup, find_packages
import setuptools

def get_version() -> str:
    init = open(os.path.join("bidexhands", "__init__.py"), "r").read().split()
    return init[init.index("__version__") + 2][1:-1]

setup(
    name="bidexhands",
    version=get_version(),
    description="xxx",
    long_description=open("README.md", encoding="utf8").read(),
    long_description_content_type="text/markdown",
    author="xxx",
    author_email="xxx",
    packages=setuptools.find_packages(),
    keywords="xxx",
    python_requires='>=3.7',
)

You also need to modify several import lines inside the package, e.g., change
from tasks.shadow_hand_over import ShadowHandOver

to
from bidexhands.tasks.shadow_hand_over import ShadowHandOver

If you don't mind, I can open a pull request.

Dear @ltzheng ,
Thank you for your concern! Yeah it is my bad and we also want to do this before. But I've been busy lately so haven't done QAQ.

If you don't mind, I can open a pull request.
Yeah, if you'd like to open a PR we would greatly appreciate it!

Hope this can help you.

Hi @ltzheng ,
We package the Bi-DexHands as your suggestions. Thank you very much!
An example usage, also added in the README.md:
import bidexhands as bi
import torch

env_name = 'ShadowHandOver'
algo = "ppo"
env = bi.make(env_name, algo)

obs = env.reset()
terminated = False

while not terminated:
    act = torch.tensor(env.action_space.sample()).repeat((env.num_envs, 1))
    obs, reward, done, info = env.step(act)

Hope this can help you.

Sorry for didn't notice your comment five days ago.
I created a fork 2 days ago, but it seems you've already fixed it now.
Well done. Really appreciate it :)

Hi @cypypccpy
I think there still exist some bugs. I have opened a PR and maybe you can have a check when available.

Hi @cypypccpy I think there still exist some bugs. I have opened a PR and maybe you can have a check when available.

Hi @ltzheng ,
Yeah I also agree. I have merged your PR, thank you for your contribution!


Multiuser tracking

Allow several users to track the same tweet.

Has many through with new model. Then draw avg values on combined chart and separate lines per tracking user on line chart. On a label instead of username we'll show country. This way we'll see the difference in numbers between countries if any.


feat: add query builder with escaping

So, instead of writing
query := fmt.Sprintf("SELECT * FROM table WHERE foo = '%s' AND bar != %d", "foo", 1234)

We can do something like
query := Build("SELECT * FROM table WHERE foo = ? AND bar != ?", "foo", 1234)

And this should be safe to use without input sanitizing.

Just use parametrized queries.


new actions to access service on bugly.qq.com

hi, @KrauseFx,
Sorry to pull it again as I've pulled it sevral days ago which is closed.
It's obviously that I shold have introduced our service which named bugly to you.You can experience it by visiting https://bugly.qq.com.
We provide services for mobile app developers(mostly in China) to collect,analysis crashes apps report and distribute apps to target users. We have such a large amount of users that we should provide various plugins to access our services.It sounds like the way crashlytics works.
The action I commited is just an easy way for developers to upload/update their apks to bugly.
I've add the way in which the integration goes to the end of /doc/Actions.md as required.
I think it meets the standard you required for an action to add to your main repo.I'm looking forward to it so that developers can access our service in their fastlane process .

Hey @sexiong306, as replied in https://github.com/fastlane/fastlane/pull/5481#issuecomment-234528427 we don't plan on merging new actions for external services for now. The document states

In general, we might not accept actions that

Access the API of a third party service, the third party service should own and maintain the action

Instead please provide a fastlane plugin that people can easily start using 👍 We'll link to it from the fastlane main repo and you will have full control over the action

ok,thank you all the same.


Dependency updates

Upgrade to version 21.x of the Oracle Client libraries, which are more openly accessible.
Upgrade to the latest version of laurenz/oracle_fdw, which is required to use the new Oracle Client libraries.

Testing complete 1,568,638 corporate records queried through the new FDW image and reprocessed.  No errors.

@garywong-bc, ready for review and merge.


Compilation with libsodium fails with pkg-config error, even if it is added in cargo depedencies

error: failed to run custom build command for `libsodium-sys v0.0.16`
process didn't exit successfully: `/Users/user/Work/Leizure/social/target/debug/build/libsodium-sys-931a54f48241e646/build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=SODIUM_LIB_DIR
cargo:rerun-if-env-changed=SODIUM_STATIC

--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "`\"pkg-config\" \"--libs\" \"--cflags\" \"libsodium\"` did not exit successfully: exit code: 1\n--- stderr\nPackage libsodium was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libsodium.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'libsodium\' found\n"', src/libcore/result.rs:906:4
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:69
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:58
             at src/libstd/panicking.rs:381
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:397
   4: std::panicking::begin_panic
             at src/libstd/panicking.rs:577
   5: std::panicking::begin_panic
             at src/libstd/panicking.rs:538
   6: std::panicking::try::do_call
             at src/libstd/panicking.rs:522
   7: std::panicking::try::do_call
             at src/libstd/panicking.rs:498
   8: <core::ops::range::Range<Idx> as core::fmt::Debug>::fmt
             at src/libcore/panicking.rs:71
   9: core::result::unwrap_failed
             at /Users/travis/build/rust-lang/rust/src/libcore/macros.rs:23
  10: <core::result::Result<T, E>>::unwrap
             at /Users/travis/build/rust-lang/rust/src/libcore/result.rs:772
  11: build_script_build::main
             at ./build.rs:20
  12: panic_unwind::dwarf::eh::read_encoded_pointer
             at src/libpanic_unwind/lib.rs:99
  13: <std::rand::reader::ReaderRng<R> as rand::Rng>::fill_bytes
             at src/libstd/panicking.rs:459
             at src/libstd/panic.rs:361
             at src/libstd/rt.rs:59
  14: build_script_build::main

warning: build failed, waiting for other jobs to finish...
error: build failed

Process finished with exit code 101

I fixed it by installing libsodium library manually in the OS,
In mac,
it is brew install libsodium
Verify libsodium with pkg-config:
pkg-config --list-all|grep libsodium --> This should return the libsodium entry in pkg-config

I don't understand your issue. These are bindings to libsodium, it needs to be installed for you to use sodiumoxide.

@dnaq I added this for beginners. It is not exactly an issue, it is an info.

Had same issues. I knew I already had libsodium. But realised later I did not have pkg-config. That did it. So check up on that too just to be sure.


Helm deploy, Value File, vsts variable substitution

How can I use the VSTS variables in the Value File used in the "Package and deploy Helm charts (Preview)" task?   I tried using a value file artifact (external to the chart) containing KEY: $(some-var), but just got the literal "$(some-var)".

I have the same issue when supplying the "destination" input to the helm "package" command.
Looking at the code, the input type is set to string, wheres the helm CLI is expecting a path:
https://github.com/kubernetes/helm/blob/master/docs/helm/helm_package.md
Shouldnt the input be set to type "filePath"?
Cheers,
Matt

@davidwmartines, "Package and deploy Helm charts" task install and upgrade commands have 'Set values' input to override the Value file values, you can use same. you can define key=$(some-var) in 'Set values' input or  you can add --set key=$(some-var) in arguments.

@dendle, "destination" input you can specify absolute filepath like  "C:\agent\helm" or you can use release environment variables in "destination" input. also. ex:-$(SYSTEM.ARTIFACTSDIRECTORY)\ . Can you specify what error are you seeing?

Hello @vithati
In the build logs, the default variable is not substituted - I see the command being passed exactly what is in the destination field.
Here is the error:

Error: Failed to save: GetFileAttributesEx $(Build.ArtifactStagingDirectory): The system cannot find the file specified.

Also, the tooltip help for that input says "Specify values in a YAML file or a URL." - this seems wrong given your helpful explanation.
Thanks,
Matt

Hi @dendle, I have used $(Build.ArtifactStagingDirectory) in task in build defintion, it working for me. How are you specifying environment varaible $(Build.ArtifactStagingDirectory) in task. Can you share your task screenshot? I will change tooltip info.

I just used the default value as-is, and substitution did not work.
I also just tried what you have shown, where you add a subfolder to the varible, with the same results:
2018-07-24T11:04:23.5489170Z [command]C:\hostedtoolcache\windows\helm\2.8.2\x64\windows-amd64\helm.exe package --dependency-update --save --destination $(Build.ArtifactStagingDirectory)/Dendlebot-chart "D:\a\r1\a_Dendlebot-Docker container-CI\Dendlebot-chart"
Screenshot below:

Does it matter which preview features (in VSTS) I have turned on?

Hi vihati
When i read your post it just dawned on me; i am using this in a release and not a build.
Can you test again in a release setting please? I am really hoping you replicate the issue!
I will do as you have asked and post accordingly.
Thanks!

Yeah - it works in a build setting.
Probably because the variable is only defined in build and not release - sorry!
Also, my assumption was that if the directory was not there it would create it - although this does not appear to happen.  There also doesn't appear to be a "Make Dir" task?
Thanks for your help!

@dendle, $(Build.ArtifactStagingDirectory) not avaiable in 'Release', because of that it didn't work. You can find availble predefined varaible for 'Release' here https://docs.microsoft.com/en-us/vsts/pipelines/release/variables?view=vsts&tabs=batch You can use other task like powershell, bash task to create dir.

Thanks for your help vihati

@vihati How does this work for secret release variables? key=$(some-var) doesn't seem to work if some-var is a secret variable. The task runs, but the actual value of some-var isn't passed. Thanks!

Please disregard previous post, it was a mistake in my configuration. Thanks!


Custom cookie loading

I was assigned the task (by Bot Services) of making this dependency compatible with our hosting provider (Heroku). As stated in the README, "we store the cookie internally in a file, and files do not persist in Heroku." I plan to resolve this by storing the cookie in a database.
If I make a pull request to support this, which would be preferable (please add a reaction or comment)?

Flexibility: I add an option to provide functions for saving and loading the cookie. ❤
Ease-of-use: I add an option to provide a connection url to a JDBC-compatible database (requires Java 1.7+). 🚀
Both: I could do both, whoever in that case, I'd be more inclined to provide examples for the save and load functions that are tailored to specific database types (MySQL, SQL Server, PostgreSQL). 👀

lmao.


Blog post fixes after QA

https://www.pivotaltracker.com/story/show/99203320

I'm gonna merge this to blog branch as it was QAd and UATed:
https://www.pivotaltracker.com/story/show/99203320


.watch properly works for a floatingActionButton but not for Appbar actions ?

I have the following bit of code (cut short for space reasons, full code can be provided if needed)
    return WillPopScope(
      onWillPop: _onWillPop,
        child: Scaffold(
            appBar: AppBar(
              title: Text('Title')
              actions: <Widget>[
                MyUserIcon()
              ],
            ),
            floatingActionButton:
            (int.parse(ref.watch(globalUserDataProvider).userid) > 0) ?
            FloatingActionButton( ...)
            : null,
            body: Stack( ... )

When my globalUserDataProvider is updated, my FloatingActionButton updates in realtime and I see the button appear or disappear depending on if userid is > 0.  Thats working great, looks and runs amazingly!
However
I also have a user Icon sitting in the appbar in the actions area MyUserIcon().  This part does not update in realtime when the globalUserDataProvider is updated
Here is the MyUserIcon() widget condensed.  In order to keep things small in this report, Ive replaced the actual images with Text widgets here, User is NOT logged in and User is logged in.
What should be happening is those text widgets should update in real-time when globalUserDataProvider is updated, but they aren't changing
Is this something to do with my code or to do with the structure of riverpod do you think?

class MyUserIcon extends ConsumerStatefulWidget {
  MyUserIcon({Key? key, this.callback}) : super(key: key);

  @override
  _MyUserIconState createState() => _MyUserIconState();
}

class _MyUserIconState extends ConsumerState<MyUserIcon> with WidgetsBindingObserver {

  @override
  void initState() {
    super.initState();
    WidgetsBinding.instance!.addObserver(this);
  }

  @override
  void dispose() {
    WidgetsBinding.instance!.removeObserver(this);
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {

    var data = ref.watch(globalUserDataProvider);

    return
      Container(
          child:Row(
            children: [
              IconButton(
                padding: EdgeInsets.zero,
                icon:
                (int.parse(ref.watch(globalUserDataProvider).userid) > 0)
                    ?
                Container(margin:EdgeInsets.fromLTRB(0.0, 0, 5.0, 4.0),
                    child: ClipRRect(borderRadius: BorderRadius.circular(100.0),
                        child:
                        (int.parse(ref.watch(globalUserDataProvider).userid) > 0) ?
                        Text('User is logged in')
                            :
                            Text('User is NOT logged in')
                    ))
                    :
                Text('User is NOT logged in')
                onPressed: () async {
...
                },
              ),
            ],
          )
      );

  }
}

Hello!
I do not understand your code. But what is globalUserDataProvider? Chances are the problem is in your provider, not the widget.

Hello!
I do not understand your code. But what is globalUserDataProvider? Chances are the problem is in your provider, not the widget.

Hey!
Its a ChangeNotifierProvider
final globalUserDataProvider = ChangeNotifierProvider<GlobalUserData>((ref) {
  return GlobalUserData();
});

class GlobalUserData with ChangeNotifier{
  static var _userId = '0';
  static var _userAvatar = '';

  String get userid => _userId;
  String get useravatar => _userAvatar;

  static setUserData(String a, String b) {
    _userId = a;
    _userAvatar = b;
  }

}

I thought the problem might be that I am not doing a notifyListeners() call inside my setUserData that is the problem right?
As some background I am setting this data from a void Function that is not in my widget tree   GlobalUserData.setUserData(_newuserid, _newuseravatar); so I had to set setUserData to a static variable for it to work.
But when I made it into a static then I am not allowed to use notifyListeners().
What is interesting about all this is going back to my first post, the ref.watch(globalUserDataProvider).userid still seems to work in my floatingActionButton

It's quite likely that the lack of a notifyListeners is the issue, yes.
As for why you were not able to call notifyListeners, chances are you're trying to modify the state while widgets are building, which is not allowed. You may need to use addPostFrameCallback


[BUG] is aligned function does not check for specified alignment!!

  template<std::size_t Alignment, std::integral T>
  constexpr bool is_aligned(T v) noexcept
  {
    static_assert(is_power_of_2(Alignment), "[eve] Alignment must be a power of 2");
    return (v & (Alignment - 1)) == 0;
  }

  //================================================================================================
  //! @brief Checks if a pointer satisfy an alignment constraint.
  //!
  //! @param  ptr         Pointer to check
  //! @tparam Alignment   Alignment constraint to verify. Behavior is undefined if this constraint
  //!                     is not a power of 2.
  //!
  //! @return `true` if `ptr` is aligned over `Alignment`, `false` otherwise.
  //================================================================================================
  template<std::size_t Alignment, typename T>
  constexpr bool is_aligned(T *ptr) noexcept
  {
    static_assert(is_power_of_2(Alignment), "[eve] Alignment must be a power of 2");
    return is_aligned<Alignment>(reinterpret_cast<std::uintptr_t>(ptr));
  }

No wait. How in the world does it pass my check.
Why does not this work?
    if (eve::is_aligned<eve::expected_cardinal_v<T>>(f))
    {
      std::cout << "before f_" << std::endl;
      auto f_ = eve::aligned_ptr<T>(f);
      std::cout << "after f_" << std::endl;

This is the pointer I get:
0x62500001a010, it's not aligned to 32

AH!! expected cardinal!


cilium-cli: add external-other-target arg to connectivity tests

Allow overriding the "blocked" domain in the test using --external-other-target instead of hard-coding cilium.io
This is a workaround for failing to-fqdn tests in IPv6-only cluster. These fail because "cilium.io" doesn't have an AAAA record, so curl tries to connect to the IPv4 address and fails with a different error code than the one expected by the test (network unreachable instead of timeout).
Fixes: #35553
Add --external-other-target parameter to cilium CLI connectivity tests.

/test

/test ci-integration

/ci-integration

/test

@sayboras :ping_pong: would be nice to see this merged, wdyt?

/test


estimator.plot_coarse_T() thwors an error when no stationary distribution is found

I compute macrostates and get a warning that the stationary distribution couldn't be computed:
Computing `10` macrostates
/Users/marius/miniconda3/envs/py38_devel/lib/python3.8/site-packages/pygpcca/_gpcca.py:1255: UserWarning: Stationary distribution couldn't be calculated. Reason: Stationary distribution is not invariant under the transition matrix..
  warnings.warn(f"Stationary distribution couldn't be calculated. Reason: {e}.")
WARNING: No stationary distribution found in GPCCA object
Adding `.macrostates_memberships`
       `.macrostates`
       `.schur`
       `.coarse_T`
    Finish (0:00:04)

That is fine, can happen. However, in the next step, I try to plot the coarse grained transition matrix by calling g_fwd.plot_coarse_T(). This first correctly issues a warning, WARNING: Coarse stationary distribution is None, ignoring. However, it then raises an exception:
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-19-0272e020f3dd> in <module>
----> 1 g_fwd.plot_coarse_T()

~/Projects/cellrank/cellrank/tl/estimators/_gpcca.py in plot_coarse_T(self, show_stationary_dist, show_initial_dist, cmap, xtick_rotation, annotate, show_cbar, title, figsize, dpi, save, text_kwargs, **kwargs)
    739         if annotate:
    740             annotate_heatmap(im)
--> 741             annotate_dist_ax(stat_ax, coarse_stat_d.values)
    742             annotate_dist_ax(init_ax, coarse_init_d)
    743

AttributeError: 'NoneType' object has no attribute 'values'

Versions:
cellrank==1.3.1+ga966e79 scanpy==1.7.2 anndata==0.7.5 numpy==1.19.2 numba==0.51.2 scipy==1.5.3 pandas==1.2.4 pygpcca==1.0.2 scikit-learn==0.24.2 statsmodels==0.12.1 python-igraph==0.8.3 scvelo==0.2.3 pygam==0.8.0 matplotlib==3.3.2 seaborn==0.11.0

...

Fixed via https://github.com/theislab/cellrank/commit/e16e27d2a79b9851352ad3d5878c3cfe7dde1cf1.


puppet-lint: Allow 4.x

Hey @jovandeginste, any chance you could merge and release this shortly? Would you be interested in migrating the module to Vox Pupuli so more people can help out with the maintenance?

releases with 0.3.0

I wouldn't mind migrating to Vox Pupuli, tell me what to do!

awesome! I sent you an invitati9n to join the vox pupuli github org. After you accepted it, you can migrate the github repo to us. Then pleaee add<EMAIL_ADDRESS>as owner on rubygems. Of corse you will keep merge access (if you like). If you have any coworkers or other current maintainers that should keep merge access let me know and I can invite them as well.

I believe I performed all steps; I was the only developer for this project, so no need to add other maintainers.

awesome! Thanks for all the work you put into the project <3

No problem, it was not that much work and well worth it so far. There are some open issues, and I'm still happy to help where I can (but it's probably in better hands now anyway). I hope to learn more, too :-)


fix: New Arb Sepolia Chain Created for .arb.eth Domain Even if One Already Exists

Description:
When creating a .arb.eth domain, the system always creates a new Arb Sepolia chain, even if the chain already exists for the domain. This behavior is incorrect and redundant, as the existing chain should be recognized instead of creating a new one.
Steps to Reproduce:

Attempt to create a new .arb.eth domain.
Observe that a new Arb Sepolia chain is created, even if a chain for the domain already exists.

Expected Behavior:
If an Arb Sepolia chain already exists for a .arb.eth domain, the system should not create a new one. Instead, it should recognize and use the existing chain.
Actual Behavior:
The system always creates a new Arb Sepolia chain, even if an existing one is already associated with the domain.
Acceptance Criteria:

[ ] The system checks for an existing Arb Sepolia chain when creating a .arb.eth domain.
[ ] A new chain is only created if no existing Arb Sepolia chain is found for the domain.

@pikonha That's already solved, right?


parser.lua error

I get this error when using :Lushify :
Could not parse buffer due to Lua error: ...vim/site/pack/packer/start/lush.nvim/lua/lush/parser.lua:439: attempt to index field '__lush' (a nil value)

And this when I'm trying to load it with :colorscheme'
Error detected while processing /home/vs/git/neosolarfog/colors/neosolarfog.lua:
E5113: Error while calling lua chunk: ...vim/site/pack/packer/start/lush.nvim/lua/lush/parser.lua:439: attempt to index field '__lush' (a nil value)
stack traceback:
        ...vim/site/pack/packer/start/lush.nvim/lua/lush/parser.lua:439: in function 'Statement'
        .../packer/start/neosolarfog/lua/lush_theme/neosolarfog.lua:152: in function 'lush_spec_fn'
        ...vim/site/pack/packer/start/lush.nvim/lua/lush/parser.lua:505: in function 'parse'
        ...share/nvim/site/pack/packer/start/lush.nvim/lua/lush.lua:76: in function 'lush'
        .../packer/start/neosolarfog/lua/lush_theme/neosolarfog.lua:66: in main chunk
        [C]: in function 'require'
        /home/vs/git/neosolarfog/colors/neosolarfog.lua:19: in main chunk

Please provide the colorscheme files

Can this error occur because I'm using a bunch of variables for colors?
-- You probably always want to set this in your vim file
vim.opt.background = 'dark'
vim.g.colors_name = 'neosolarfog'

-- By setting our module to nil, we clear lua's cache,
-- which means the require ahead will *always* occur.
--
-- This isn't strictly required but it can be a useful trick if you are
-- incrementally editing your config a lot and want to be sure your themes
-- changes are being picked up without restarting neovim.
--
-- Note if you're working in on your theme and have :Lushify'd the buffer,
-- your changes will be applied with our without the following line.
--
-- The performance impact of this call can be measured in the hundreds of
-- *nanoseconds* and such could be considered "production safe".

-- include our theme file and pass it to lush to apply
require('lush')(require('lush_theme.neosolarfog'))

local lush = require('lush')
-- local hsl = lush.hsl

local base03 = "#002b36"
local base02 = "#073642"
local base01 = "#586e75"
local base00 = "#657b83"
local base0 = "#839496"
local base1 = "#93a1a1"
local gray = "#7488d"
local yellow = "#b58900"
local orange = "#cb4b16"
local red = "#dc322f"
-- local magenta = "#d33682"
-- local violet = "#6c71c4"
local blue = "#268bd2"
local cyan = "#2aa198"

-- LSP/Linters mistakenly show `undefined global` errors in the spec, they may
-- support an annotation like the following. Consult your server documentation.
---@diagnostic disable: undefined-global
local theme = lush(function()
  return {
    -- The following are the Neovim (as of 0.8.0-dev+100-g371dfb174) highlight
    -- groups, mostly used for styling UI elements.
    -- Comment them out and add your own properties to override the defaults.
    -- An empty definition `{}` will clear all styling, leaving elements looking
    -- like the 'Normal' group.
    -- To be able to link to a group, it must already be defined, so you may have
    -- to reorder items as you go.
    --
    -- See :h highlight-groups
    --
    ColorColumn  { bg = base02 }, -- Columns set with 'colorcolumn'
    Conceal      { }, -- Placeholder characters substituted for concealed text (see 'conceallevel')
    Cursor       { fg = base03, bg = base0 }, -- Character under the cursor
    CursorColumn { bg = base02 }, -- Screen-column at the cursor, when 'cursorcolumn' is set.
    CursorLine   { bg = base02 }, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if foreground (ctermfg OR guifg) is not set.
    Directory    { fg = base0, bg = base03 }, -- Directory names (and other special names in listings)
    DiffAdd      { fg = base03, bg = cyan }, -- Diff mode: Added line |diff.txt|
    DiffChange   { fg = base03, bg = yellow}, -- Diff mode: Changed line |diff.txt|
    DiffDelete   { fg = base0, bg = red}, -- Diff mode: Deleted line |diff.txt|
    DiffText     { fg = base01, bg = blue}, -- Diff mode: Changed text within a changed line |diff.txt|
    -- EndOfBuffer  { }, -- Filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|.
    -- ErrorMsg     { }, -- Error messages on the command line
    VertSplit    { fg = "#74888d", bg = base03 }, -- Column separating vertically split windows
    Folded       { fg = gray }, -- Line used for closed folds
    FoldColumn   { fg = base02}, -- 'foldcolumn'
    SignColumn   { bg = base03 }, -- Column where |signs| are displayed
    IncSearch    { fg = base03, bg = cyan }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c"
    -- Substitute   { }, -- |:substitute| replacement text highlighting
    LineNr       { fg = base01 }, -- Line number for ":number" and ":#" commands, and when 'number' or 'relativenumber' option is set.
    CursorLineNr { fg = base01, gui = "bold"  }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line.
    MatchParen   { fg = base0, bg = orange }, -- Character under the cursor or just before it, if it is a paired bracket, and its match. |pi_paren.txt|
    ModeMsg      { }, -- 'showmode' message (e.g., "-- INSERT -- ")
    -- MsgArea      { }, -- Area for messages and cmdline
    -- MsgSeparator { }, -- Separator for scrolled messages, `msgsep` flag of 'display'
    -- MoreMsg      { }, -- |more-prompt|
    -- NonText      { }, -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|.
    Normal       { fg = base0 }, -- Normal text
    -- NormalFloat  { }, -- Normal text in floating windows.
    -- NormalNC     { }, -- normal text in non-current windows
    Pmenu        { bg = base02 }, -- Popup menu: Normal item.
    PmenuSel     { fg = base03 , bg = base00 }, -- Popup menu: Selected item.
    PmenuSbar    { Pmenu }, -- Popup menu: Scrollbar.
    PmenuThumb   { PmenuSel }, -- Popup menu: Thumb of the scrollbar.
    -- Question     { }, -- |hit-enter| prompt and yes/no questions
    -- QuickFixLine { }, -- Current |quickfix| item in the quickfix window. Combined with |hl-CursorLine| when the cursor is there.
    Search       { fg = base03, bg = yellow }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out.
    -- SpecialKey   { }, -- Unprintable characters: text displayed differently from what it really is. But not 'listchars' whitespace. |hl-Whitespace|
    -- SpellBad     { }, -- Word that is not recognized by the spellchecker. |spell| Combined with the highlighting used otherwise.
    -- SpellCap     { }, -- Word that should start with a capital. |spell| Combined with the highlighting used otherwise.
    -- SpellLocal   { }, -- Word that is recognized by the spellchecker as one that is used in another region. |spell| Combined with the highlighting used otherwise.
    -- SpellRare    { }, -- Word that is recognized by the spellchecker as one that is hardly ever used. |spell| Combined with the highlighting used otherwise.
    StatusLine   { fg = base03, bg = base0 }, -- Status line of current window
    StatusLineNC { fg = gray, bg = base02}, -- Status lines of not-current windows. Note: If this is equal to "StatusLine" Vim will use "^^^" in the status line of the current window.
    -- TabLine      { }, -- Tab pages line, not active tab page label
    -- TabLineFill  { }, -- Tab pages line, where there are no labels
    -- TabLineSel   { }, -- Tab pages line, active tab page label
    -- Title        { }, -- Titles for output from ":set all", ":autocmd" etc.
    Visual       { bg = base02 }, -- Visual mode selection
    -- VisualNOS    { }, -- Visual mode selection when vim is "Not Owning the Selection".
    -- WarningMsg   { }, -- Warning messages
    Whitespace   { fg = base01 }, -- "nbsp", "space", "tab" and "trail" in 'listchars'
    -- Winseparator { }, -- Separator between window splits. Inherts from |hl-VertSplit| by default, which it will replace eventually.
    -- WildMenu     { }, -- Current match in 'wildmenu' completion

    -- Common vim syntax groups used for all kinds of code and markup.
    -- Commented-out groups should chain up to their preferred (*) group
    -- by default.
    --
    -- See :h group-name
    --
    -- Uncomment and edit if you want more specific syntax highlighting.

    Comment        { fg = base01 , gui="italic" }, -- Any comment

    Constant       { fg = base1 }, -- (*) Any constant
    -- String         { }, --   A string constant: "this is a string"
    -- Character      { }, --   A character constant: 'c', '\n'
    -- Number         { }, --   A number constant: 234, 0xff
    -- Boolean        { }, --   A boolean constant: TRUE, false
    -- Float          { }, --   A floating point constant: 2.3e10

    Identifier     { gui = bold }, -- (*) Any variable name
    Function       { gui = bold }, --   Function name (also: methods for classes)

    Statement      { Normal, gui = "bold" }, -- (*) Any statement
    -- Conditional    { }, --   if, then, else, endif, switch, etc.
    -- Repeat         { }, --   for, do, while, etc.
    -- Label          { }, --   case, default, etc.
    -- Operator       { }, --   "sizeof", "+", "*", etc.
    -- Keyword        { }, --   any other keyword
    -- Exception      { }, --   try, catch, throw

    PreProc        { gui = "italic"}, -- (*) Generic Preprocessor
    -- Include        { }, --   Preprocessor #include
    -- Define         { }, --   Preprocessor #define
    -- Macro          { }, --   Same as Define
    -- PreCondit      { }, --   Preprocessor #if, #else, #endif, etc.

    Type           { Normal, gui = "bold" }, -- (*) int, long, char, etc.
    StorageClass   { }, --   static, register, volatile, etc.
    Structure      { }, --   struct, union, enum, etc.
    Typedef        { }, --   A typedef

    Special        { gui = "italic"}, -- (*) Any special symbol
    -- SpecialChar    { }, --   Special character in a constant
    -- Tag            { }, --   You can use CTRL-] on this
    -- Delimiter      { }, --   Character that needs attention
    -- SpecialComment { }, --   Special things inside a comment (e.g. '\n')
    -- Debug          { }, --   Debugging statements

    Underlined     { gui = "underline" }, -- Text that stands out, HTML links
    -- Ignore         { }, -- Left blank, hidden |hl-Ignore| (NOTE: May be invisible here in template)
    Error          { fg = base03, bg = red }, -- Any erroneous construct
    Todo           { fg = base03, bg = base0}, -- Anything that needs extra attention; mostly the keywords TODO FIXME and XXX

    -- These groups are for the native LSP client and diagnostic system. Some
    -- other LSP clients may use these groups, or use their own. Consult your
    -- LSP client's documentation.

    -- See :h lsp-highlight, some groups may not be listed, submit a PR fix to lush-template!
    --
    -- LspReferenceText            { } , -- Used for highlighting "text" references
    -- LspReferenceRead            { } , -- Used for highlighting "read" references
    -- LspReferenceWrite           { } , -- Used for highlighting "write" references
    -- LspCodeLens                 { } , -- Used to color the virtual text of the codelens. See |nvim_buf_set_extmark()|.
    -- LspCodeLensSeparator        { } , -- Used to color the seperator between two or more code lens.
    -- LspSignatureActiveParameter { } , -- Used to highlight the active parameter in the signature help. See |vim.lsp.handlers.signature_help()|.

    -- See :h diagnostic-highlights, some groups may not be listed, submit a PR fix to lush-template!
    --
    -- DiagnosticError            { } , -- Used as the base highlight group. Other Diagnostic highlights link to this by default (except Underline)
    -- DiagnosticWarn             { } , -- Used as the base highlight group. Other Diagnostic highlights link to this by default (except Underline)
    -- DiagnosticInfo             { } , -- Used as the base highlight group. Other Diagnostic highlights link to this by default (except Underline)
    -- DiagnosticHint             { } , -- Used as the base highlight group. Other Diagnostic highlights link to this by default (except Underline)
    -- DiagnosticVirtualTextError { } , -- Used for "Error" diagnostic virtual text.
    -- DiagnosticVirtualTextWarn  { } , -- Used for "Warn" diagnostic virtual text.
    -- DiagnosticVirtualTextInfo  { } , -- Used for "Info" diagnostic virtual text.
    -- DiagnosticVirtualTextHint  { } , -- Used for "Hint" diagnostic virtual text.
    -- DiagnosticUnderlineError   { } , -- Used to underline "Error" diagnostics.
    -- DiagnosticUnderlineWarn    { } , -- Used to underline "Warn" diagnostics.
    -- DiagnosticUnderlineInfo    { } , -- Used to underline "Info" diagnostics.
    -- DiagnosticUnderlineHint    { } , -- Used to underline "Hint" diagnostics.
    -- DiagnosticFloatingError    { } , -- Used to color "Error" diagnostic messages in diagnostics float. See |vim.diagnostic.open_float()|
    -- DiagnosticFloatingWarn     { } , -- Used to color "Warn" diagnostic messages in diagnostics float.
    -- DiagnosticFloatingInfo     { } , -- Used to color "Info" diagnostic messages in diagnostics float.
    -- DiagnosticFloatingHint     { } , -- Used to color "Hint" diagnostic messages in diagnostics float.
    -- DiagnosticSignError        { } , -- Used for "Error" signs in sign column.
    -- DiagnosticSignWarn         { } , -- Used for "Warn" signs in sign column.
    -- DiagnosticSignInfo         { } , -- Used for "Info" signs in sign column.
    -- DiagnosticSignHint         { } , -- Used for "Hint" signs in sign column.

    -- Tree-Sitter syntax groups. Most link to corresponding
    -- vim syntax groups (e.g. TSKeyword => Keyword) by default.
    --
    -- See :h nvim-treesitter-highlights, some groups may not be listed, submit a PR fix to lush-template!
    --
    -- TSAttribute          { } , -- Annotations that can be attached to the code to denote some kind of meta information. e.g. C++/Dart attributes.
    -- TSBoolean            { } , -- Boolean literals: `True` and `False` in Python.
    -- TSCharacter          { } , -- Character literals: `'a'` in C.
    -- TSCharacterSpecial   { } , -- Special characters.
    TSComment            { fg = base01 , gui = "italic"  } , -- Line comments and block comments.
    -- TSConditional        { } , -- Keywords related to conditionals: `if`, `when`, `cond`, etc.
    -- TSConstant           { } , -- Constants identifiers. These might not be semantically constant. E.g. uppercase variables in Python.
    -- TSConstBuiltin       { } , -- Built-in constant values: `nil` in Lua.
    -- TSConstMacro         { } , -- Constants defined by macros: `NULL` in C.
    -- TSConstructor        { } , -- Constructor calls and definitions: `{}` in Lua, and Java constructors.
    -- TSDebug              { } , -- Debugging statements.
    -- TSDefine             { } , -- Preprocessor #define statements.
    -- TSError              { } , -- Syntax/parser errors. This might highlight large sections of code while the user is typing still incomplete code, use a sensible highlight.
    -- TSException          { } , -- Exception related keywords: `try`, `except`, `finally` in Python.
    -- TSField              { } , -- Object and struct fields.
    -- TSFloat              { } , -- Floating-point number literals.
    -- TSFunction           { } , -- Function calls and definitions.
    -- TSFuncBuiltin        { } , -- Built-in functions: `print` in Lua.
    -- TSFuncMacro          { } , -- Macro defined functions (calls and definitions): each `macro_rules` in Rust.
    -- TSInclude            { } , -- File or module inclusion keywords: `#include` in C, `use` or `extern crate` in Rust.
    -- TSKeyword            { } , -- Keywords that don't fit into other categories.
    -- TSKeywordFunction    { } , -- Keywords used to define a function: `function` in Lua, `def` and `lambda` in Python.
    -- TSKeywordOperator    { } , -- Unary and binary operators that are English words: `and`, `or` in Python; `sizeof` in C.
    -- TSKeywordReturn      { } , -- Keywords like `return` and `yield`.
    -- TSLabel              { } , -- GOTO labels: `label:` in C, and `::label::` in Lua.
    -- TSMethod             { } , -- Method calls and definitions.
    -- TSNamespace          { } , -- Identifiers referring to modules and namespaces.
    -- TSNone               { } , -- No highlighting (sets all highlight arguments to `NONE`). this group is used to clear certain ranges, for example, string interpolations. Don't change the values of this highlight group.
    -- TSNumber             { } , -- Numeric literals that don't fit into other categories.
    -- TSOperator           { } , -- Binary or unary operators: `+`, and also `->` and `*` in C.
    -- TSParameter          { } , -- Parameters of a function.
    -- TSParameterReference { } , -- References to parameters of a function.
    -- TSPreProc            { } , -- Preprocessor #if, #else, #endif, etc.
    -- TSProperty           { } , -- Same as `TSField`.
    -- TSPunctDelimiter     { } , -- Punctuation delimiters: Periods, commas, semicolons, etc.
    -- TSPunctBracket       { } , -- Brackets, braces, parentheses, etc.
    -- TSPunctSpecial       { } , -- Special punctuation that doesn't fit into the previous categories.
    -- TSRepeat             { } , -- Keywords related to loops: `for`, `while`, etc.
    -- TSStorageClass       { } , -- Keywords that affect how a variable is stored: `static`, `comptime`, `extern`, etc.
    -- TSString             { } , -- String literals.
    -- TSStringRegex        { } , -- Regular expression literals.
    -- TSStringEscape       { } , -- Escape characters within a string: `\n`, `\t`, etc.
    -- TSStringSpecial      { } , -- Strings with special meaning that don't fit into the previous categories.
    -- TSSymbol             { } , -- Identifiers referring to symbols or atoms.
    -- TSTag                { } , -- Tags like HTML tag names.
    -- TSTagAttribute       { } , -- HTML tag attributes.
    -- TSTagDelimiter       { } , -- Tag delimiters like `<` `>` `/`.
    -- TSText               { } , -- Non-structured text. Like text in a markup language.
    -- TSStrong             { } , -- Text to be represented in bold.
    -- TSEmphasis           { } , -- Text to be represented with emphasis.
    -- TSUnderline          { } , -- Text to be represented with an underline.
    -- TSStrike             { } , -- Strikethrough text.
    -- TSTitle              { } , -- Text that is part of a title.
    -- TSLiteral            { } , -- Literal or verbatim text.
    -- TSURI                { } , -- URIs like hyperlinks or email addresses.
    -- TSMath               { } , -- Math environments like LaTeX's `$ ... $`
    -- TSTextReference      { } , -- Footnotes, text references, citations, etc.
    -- TSEnvironment        { } , -- Text environments of markup languages.
    -- TSEnvironmentName    { } , -- Text/string indicating the type of text environment. Like the name of a `\begin` block in LaTeX.
    -- TSNote               { } , -- Text representation of an informational note.
    -- TSWarning            { } , -- Text representation of a warning note.
    -- TSDanger             { } , -- Text representation of a danger note.
    -- TSType               { } , -- Type (and class) definitions and annotations.
    -- TSTypeBuiltin        { } , -- Built-in types: `i32` in Rust.
    -- TSVariable           { } , -- Variable names that don't fit into other categories.
    -- TSVariableBuiltin    { } , -- Variable names defined by the language: `this` or `self` in Javascript.
  }
end)

-- Return our parsed theme for extension or use elsewhere.
return theme

-- vi:nowrap

Okay, I'm stupid... forgot to enclose bold in double quotes. Sorry for bothering you, and awesome plugin btw


[Question] How to set the background color when drawing font images in PNG format

description
What I need is to use the specified font file to write content, the content is the font name, the background color is white, and the picture in PNG format is drawn.
code
package main

import (
	"context"
	"fmt"
	"time"

	"github.com/tdewolff/canvas"
	"github.com/tdewolff/canvas/renderers"
)

func main() {
	drawFontImage()
}

// drawFontImage 画字体图片
func drawFontImage() {
	basePath := "storage/image/"

	// 设置字体
	filename := "DancingScript-Regular"
	fullFilename := filename + ".ttf"
	font := canvas.NewFontFamily(filename)
	if err := font.LoadFontFile(basePath+fullFilename, canvas.FontRegular); err != nil {
		panic(err)
	}
	face := font.Face(40, canvas.Black, canvas.FontRegular, canvas.FontNormal)

	// 创建一个新的画布
	c := canvas.New(300, 300)
	cvsCtx := canvas.NewContext(c)

	// 设置画布背景色
	cvsCtx.SetFillColor(canvas.White)
	cvsCtx.SetStrokeColor(canvas.White)

	// 写入文字
	// 文字容器控制
	text := canvas.NewTextBox(face, filename, 300, 100, canvas.Center, canvas.Justify, 0.0, 0.0)
	cvsCtx.DrawText(0, 150, text)

    // 填充
	cvsCtx.FillStroke()

	// 将画布内容写入到 PNG 图片文件
	outputFilename := basePath + filename + time.Now().Format("2006-02-02_15_04_05") + ".png"
	if err := renderers.Write(outputFilename, c, canvas.DPI(96.0)); err != nil {
		panic(err)
	}
	fmt.Println("文件保存: " + outputFilename)
}

resources

font： Dancing Script

Result
I set a white fill and it doesn't seem to work, I tried other colors too and the same
The PNG format is used, causing the entire image to be transparent. Is there a way to set a white background within the canvas?
cvsCtx.SetFillColor(canvas.White)
cvsCtx.SetStrokeColor(canvas.White)

The SetFill* and SetStroke* functions set the filling color and stroking color for the next DrawPath! It is not a drawing operation by itself. Additionally, your call to FillStroke doesn't do anything, because you never specified path that should be filled and stroked. The only thing you ever draw is using DrawText.
You should use:
ctx.SetFillColor(canvas.White)
ctx.DrawPath(0.0, 0.0, canvas.Rectangle(c.W, c.H))

text := ...
ctx.DrawText(...)

And remove the call to SetStrokeColor and FillStroke.

The SetFill* and SetStroke* functions set the filling color and stroking color for the next DrawPath! It is not a drawing operation by itself. Additionally, your call to FillStroke doesn't do anything, because you never specified path that should be filled and stroked. The only thing you ever draw is using DrawText.
You should use:
ctx.SetFillColor(canvas.White)
ctx.DrawPath(0.0, 0.0, canvas.Rectangle(c.W, c.H))

text := ...
ctx.DrawText(...)

And remove the call to SetStrokeColor and FillStroke.

@tdewolff
Thank you, my problem is solved


Version number missing from extracted docs folder name

Issue
Once the documentation is generated the version number is correctly part of the tar.gz filename. Once I extract it out, the version number is missing and 'null' is in it's place.
For example, let say we have the project 'Example' and it's version is '1.0'. The resulting tar.gz file for html would look like Example-1.0-docs-html.tar.gz. When I extract the tar.gz file, I end up with a folder named, Example-null-docs-html.
Environment
Pygradle version: 0.3.9

@mcarlin We'll take a look at this next week.


update ng2-drag-drop

Library name changed from ng2-drag-drop to ng-drag-drop now this library also supports for angular 4.

Don't create a pull request to add a library, instead use devarchy.com/angular.
Only create a pull request to change the categorization.
Open an issue if you are not sure how to change the categorization to fit a library you want to add.

Glad to merge!