Add note about requiring 'offline_access' scope for refresh tokens

The spec and examples note that a refresh token is returned, but this is not true. By default, a refresh token is excluded from the on_behalf_of flow response and one must explicitly request the "offline_access" scopes to obtain one, per https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-scopes#offlineaccess.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 3cd73bb0-f8d5-84f7-3fc5-2022f8392a20
Version Independent ID: d598130d-ba3a-0078-d4b6-1e47fad5ea41
Content: Azure AD v2.0 OAuth2.0 On-Behalf-Of flow
Content Source: articles/active-directory/develop/active-directory-v2-protocols-oauth-on-behalf-of.md
Service: active-directory
GitHub Login: @navyasric
Microsoft Alias: nacanuma

@stewartadam Thanks for your feedback! We will investigate and update as appropriate.

@MohitGargMSFT Can you please assign this to @hpsin? This is in his area so he can better address this feedback.

Thanks, that's a good catch.  I've addressed this and the other OBO feedback in a PR, should be live tomorrow.

Thanks all!

#please-close


Better sound asset declaration.

Currently it's declared as class atribbutes.
Maybe it should be enums similar to enemies, but with value being tuple of tuples or smth

Current is good, see 291baa4 and c13e38a
Could be fancier but no time for that.


Device States Ready to Pair but fails to show up on HomeKit

I have restarted the esp32 more than 18 times and i have reset all the wifi data. I have no idea how to make the device show up on Homekit even though the serial monitor displays that the device is connected to wifi and it is ready to be paired.

Have you read and done Pairing to HomeKit?
In the Home app, tap on Add Accessory and scan the tag.
Anything happening?


New rule: io-ts codec restrictions

Prevent use of t.type unless it is nested within a t.readonly.
Prevent use of t.array, with fixer to t.readonlyArray.

You could probably fix t.type to t.readonly(t.type(...)) too.

Encourage providing a value for the optional name when using t.type
This makes it somewhat easier to grok errors returned from deeply nested codecs.

If we widen the scope of this to fp-ts generally, another useful rule might be forbidding lib imports.
Good:
import { flow } from 'fp-ts/function'

Bad:
import { flow } from 'fp-ts/lib/function'

Oh look, that already exists https://github.com/buildo/eslint-plugin-fp-ts/blob/main/docs/rules/no-lib-imports.md


RFC: Check READMEs for point-people being in the Artsy org

Proposal:
On every PR, which has a  meta section like this:

Meta

State: production
Point People: @alloy, @orta
CI :

This is a core Artsy Mobile OSS project, along with Energy, Eidolon, Emission and Emergence.

Fail the PR if the people who are assigned are still inside the Artsy org.
Reasoning
Code ownership changes naturally, but forgotten repos can get lost and no-one want to have orphaned. As people leave we should be re-applying who has ownership over the repo.
Failing is a strong call, but leaving the repo in a bad state isn't a great call either.
Exceptions:
There are probably a bunch of repos without the meta section. The meta section should ideally get added too them, but I think there's too many edge cases to make it worth forcing it on every repo. Open to changing that though.

The will should look something like this: https://github.com/orta/artsy-check-readmes/blob/master/check.ts#L44-L82

This (and most scheduled tasks in general) need some kind of peril "create an issue and update it" API, where you pass an identifier and Peril will automatically keep that issue up to date (or create it).


Variant Expressions get extra space

Describe the bug
An Databricks Variant expression such as select e.col:['attr_ID']::string as id gets an extra space:  select e.col: ['attr_ID']::string as id
To Reproduce
import sqlfmt.api as sqlfmt

sql = """
        select e.col:['attr_ID']::string as id
        from expl e"""

print(sqlfmt.format_string(sql, sqlfmt.Mode()))

Expected behavior
Should not add that space :)
Actual behavior
Provide any output generated by sqlfmt here. If this is a formatting issue, include the code generated by sqlfmt.
Additional context
What is the output of sqlfmt --version?
sqlfmt, version 0.23.2

Thanks for the report!


#GOV-527 Build and push docker image to dockerhub

(https://mifosforge.jira.com/browse/GOV-527)
…release and latest

Build and push docker image to dockerhub upon github tag release.

Resolve the conflicts


DataColumn - string (char*) support

Add support for the char* type (the aggregations will have a special case), e.g., the max/min could return the max/min length strings.

implemented in 89e7739c332d68f39e23549fc9b7f553cca7da69


leethub not working at all for me. i have solved more than 20 questions but not a single question pushed to my github

Please review previous closed issues before filling out a new one! Duplicate issues will be closed without comment.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.

leethub not working for me
i have solved more than 20 questions since i have added leethub extensions. I don't why but not a single solution pushed to github.

Switch to older version of leetcode .
There will be an option Revert to older version in drop down menu


Handle scale_factor and add_offset as scalar

The h5netcdf engine exposes single-valued attributes as arrays of shape
(1,), which is correct according to the NetCDF standard, but may cause
a problem when reading a value of shape () before the scale_factor and
add_offset have been applied.  This PR adds a check for the dimensionality
of add_offset and scale_factor and ensures they are scalar before they
are used for further processing, adds a unit test to verify that this
works correctly, and a note to the documentation to warn users of this
difference between the h5netcdf and netcdf4 engines.

[x] Closes #4471
[x] Tests added
[x] Passes isort . && black . && mypy . && flake8
[ ] User visible changes (including notable bug fixes) are documented in whats-new.rst

Is this bugfix notable enough to need a whats-new.rst entry?
For the unit test, I tried to construct an object that would emulate what is produced when reading a NetCDF4 file with the h5netcdf engine, but I gave up and settled for a temporary file instead.  If this is an undesired approach, I could use some guidance in how to construct the appropriate object that will expose the problem.

If this makes more sense as an integration test than as a unit test (for which I need help, see other comment), should I mark the current test in some way and/or move it to a different source file?

Thanks @gerritholl


[Acceptance Test] Edit Users Profile Page

Description and Goal of Test
View and edit a user's profile page as a User or an Admin.
Acceptance Criteria

[x] An admin can see a list of users/admin
[x] An admin can edit input for a user/admin
[x] An admin can delete any user/admin
[x] A user can only see their profile
[x] A user can edit their profile except for their role
[x] Can see a log of user activities

the tasks on this issue were completed and tested


SAM-3387: remove selection level feedback for distractors in matching questions to avoid loss of user data

https://jira.sakaiproject.org/browse/SAM-3387
The proposal here is to simply replace the text areas (and corresponding labels) for distractor choices (on the fly, client side), with a simple message indicating to the user that selection-level feedback is not available for distractor choices. This prevents the possibility of lost user data.
More detail and steps to reproduce in the JIRA.

@bjones86 Would it make more sense to disable the text areas vs hiding them?

Hiding them is more inline with what's already happening. There is a text area provided for the 'choice' in regular questions. This text area is hidden when you select the choice to be a distractor. I'm just tying into the existing JavaScript function to perform the same action on a few more fields.


Add subsection for eligibility exemptions for TOC candidacy

Since this is a change to the CFF charter, the Governing Board is the body to approve it, but the @cloudfoundry/toc should review these changes and agree on final language for them before asking the Board to do so.

@loewenstein we do have Section 7.e).ii).(4) as an exemption in the charter for voter eligibility, but I don't recall whether we had actively discussed a similar one for TOC candidacy (other than for the initial governance bootstrapping).

This change has been approved by the governing board and can be merged in.


[FEATURE] Global palm

Pull request checklist
Before submitting your PR, please review the following checklist:

[x] Consider adding a unit test if your PR resolves an issue.
[x] All new and existing tests pass locally (palm test)
[x] Lint (palm lint) has passed locally and any fixes were made for failures
[x] Docs have been reviewed and added / updated if needed (for bug fixes / features)

Breaking changes

[ ] Check if this pull request introduces a breaking change

What does this implement/fix? Explain your changes.
Being able to run palm outside of existing git projects unlocks a ton of new possibilities for palm.

Use discover_repository to allow us to raise and handle a custom exception in the case we are outside of a git repo
Change the implementation of branch detection so that we have proper control over when that check is executed
Update the implementation of palm_config.plugins to be a list with setters
Implement a global 'setup' plugin for OOTB global functionality, like new project scaffolding.

Does this close any currently open issues?
#14
Any other comments?
Globally configured palm plugins are available outside of repos, this allows users to create their own 'setup' plugins as needed. It's worth noting that we probably want to implement some mechanism for global plugins to exclude themselves from the global scope, as those may depend on being in the context of a git project.
Where has this been tested?
Operating System: MacOS

dn't exist and I would need to proceed manually. That was pretty confusing to me. But then it created a folder inside the folder with my new test project name and a bunch of things were generated there, so I guess it worked?

Thanks for testing!
I definitely need to iron out some bumps with the new command. TLDR is that I was trying to do things in palm that should happen within the cookie-cutter template (I learned this after I made that palmetto flavored dbt template) - I'll commit some fixes here this afternoon 🙂
Overall, it sounds like the global palm works as intended, but the new command needs some love (and better documentation/help text)

This is looking a lot better. Still have some questionable results but it may be more to do with our cookiecutter template than this functionality.
I am still getting an error, though:
Name: palm-dbt
Version: 0.3.1
Summary: dbt extension for Palm CLI
Home-page: https://github.com/palmetto/palm-dbt
Author: Palmetto - Data & Analytics team
Author-email<EMAIL_ADDRESS>License: Apache License 2.0
Location: /usr/local/lib/python3.9/site-packages
Requires: palm, pyyaml, sqlparse
Required-by:
Traceback (most recent call last):
  File "/usr/local/bin/palm", line 5, in <module>
    from palm.cli import cli
  File "/usr/local/lib/python3.9/site-packages/palm/cli.py", line 17, in <module>
    palm_config = PalmConfig()
  File "/usr/local/lib/python3.9/site-packages/palm/palm_config.py", line 31, in __init__
    self._setup()
  File "/usr/local/lib/python3.9/site-packages/palm/palm_config.py", line 42, in _setup
    self.branch = self._get_current_branch()
  File "/usr/local/lib/python3.9/site-packages/palm/palm_config.py", line 67, in _get_current_branch
    return self.repo.head.shorthand
_pygit2.GitError: reference 'refs/heads/main' not found

Project initialized successfully!

This is looking a lot better. Still have some questionable results but it may be more to do with our cookiecutter template than this functionality.
I am still getting an error, though:
_pygit2.GitError: reference 'refs/heads/main' not found
Project initialized successfully!

This error occurs when a repo is found, but there are no commits yet. I'd like to get a fix in for that, even if just to raise a more useful error. I'll need to spend some time on it.

This error occurs when a repo is found, but there are no commits yet.

Why would there be a repo found for a project that was just generated from nothing?

Why would there be a repo found for a project that was just generated from nothing?

In the case of the dbt template I wrote, the repo isinitialized as part of the post_hooks: https://github.com/jakeberesford-palmetto/cookiecutter-dbt/blob/main/hooks/post_gen_project.py#L13


Add a flag to configure whether AMP cache will be populated with winning bids only

In order to decide what bids have to be cached or not, a nice to have feature could be a flag to store only winning bids. This was an existing behaviour in the past and we think it could be interesting to recover it.
To activate this feature, we could add auction.cache.only-winning-bids (or similar) as a new execution parameter when launching the JVM. In addition to this, we could also be able to change configuration file properly.

I'm  ok with the general idea, but request the following changes:
if ext.prebid.cache.winningonly is true, then cache only the top bid
unless ext.prebid.targeting.includebidderkeys is true, in which case includebidderkeys takes precedence and winningonly should be ignored.

As a proposal:
Can we add a new key to the bid request ext.prebid.cache.winningonly to control a response not from configuration but from input request?
Example request:
{
  ...
  "ext": {
    "prebid": {
      "cache": {
        "winningonly": true,
        "bids": {...},
        "vastxml": {...}
      }
    }
  }
  ...
}

This gets into the old "config-vs-request" debate.
Am open to hearing the case for config. Would it be that a PBS host company decides to only ever cache the top bid -- therefore denying their client publishers the ability to use ext.prebid.targeting.includebidderkeys ?
Adding @jordillachmrf

@rpanchyk, in a shared environment we think this could be the right way (using request), but in our case we only need a widely solution (using configuration).
@bretg, sure... but answering your question... our proposal wouldn't affect other features or any other ways to configure PBS or to restrict publishers in any way.

our proposal wouldn't affect other features or any other ways to configure PBS or to restrict publishers in any way.

Sorry, but that's incorrect. Caching only the winning bid invalidates the includebidderkeys feature. This may be fine for a given host company, but needs to be explicit.
Here's a proposal - let's discuss config-vs-request this Friday in the Prebid Server PMC -- hopefully @jordillachmrf can be there to discuss.

Discussed with @jordillachmrf today in the Prebid Server meeting - we agreed that putting this flag in the request would be a good way avoid the includebidderkeys conflict, but putting the power to create and resolve that conflict in client hands.

@mikiescolarmrf - we discussed in todays committee meeting. I did a quick scan through this code and am not seeing it considering the state of ext.prebid.targeting.includebidderkeys as noted in the issue:
if ext.prebid.cache.winningonly is true, then cache only the top bid
unless ext.prebid.targeting.includebidderkeys is true, in which case includebidderkeys takes precedence and winningonly should be ignored.

And there ought to be a couple of additional unit tests that cover the interaction of these two settings.

@bretg sure... we are agree with you... ext.prebid.targeting.includebidderskeys should take precedence over other restrictions on results caching.
On the other hand, just to confirm the final decision, the agreement was to put the flag in the request, or in the configuration?
In any case, would you mind if we open a new PR and close the previous one?

I don't feel strongly about where this config exists. Re-reading the thread, sounds like we agreed that it was fine to leave on the request.

Submitted a new PR #484 with the flag in request and ext.prebid.targeting.includebidderskeys checking.

Updated PR with the changes discussed with @rpanchyk and @bretg - added support for both configuration property auction.cache.only-winning-bids and request field ext.prebid.cache.winningonly with latest having a higher priority.
includebidderskeys feature still takes precedence, regardless of winningonly source.

PR #484 is merged to master. Closing.
Please, open new issue if any changes needed.


Short solution needed: "Using rate limit" (nginx)

Please help us write most modern and shortest code solution for this issue:
Using rate limit (technology: nginx)
Fast way
Just write the code solution in the comments.
Prefered way

Create pull request with a new code file inside inbox folder.
Don't forget to use comments to make solution explained.
Link to this issue in comments of pull request.

Using rate limit


BUG: scipy.sparse.csc_matrix.argmin returns wrong values

Describe your issue.
scipy.sparse.csc_matrix.argmin seems to return wrong value when all elements are positive.
Reproducing Code Example
>>> import scipy
>>> x = scipy.sparse.coo_matrix(([1, 0.1, 1, 1], ([0, 0, 1, 1], [0, 1, 0, 1])), shape=(2, 2)).tocsc()
>>> x.todense()
matrix([[1. , 0.1],
        [1. , 1. ]])
>>> x.argmin()
2
>>> x.todense().argmin()
1

Error message
No error messages.

SciPy/NumPy/Python version information
1.9.1 1.23.0 sys.version_info(major=3, minor=9, micro=7, releaselevel='final', serial=0)

Thanks for the report, @asi1024.  Here are a few more examples:
In [75]: a = csc_matrix([[3, 4, 1], [10, 2, 9]])

In [76]: a.A
Out[76]:
array([[ 3,  4,  1],
       [10,  2,  9]])

In [77]: a.argmin()  # Should be 2
Out[77]: 4

In [78]: a.A.argmin()
Out[78]: 2

In [79]: b = csr_matrix([[3, 4, 1], [10, 2, 9]])

In [80]: b.A
Out[80]:
array([[ 3,  4,  1],
       [10,  2,  9]])

In [81]: b.argmin()  # Should be 2
Out[81]: 4

In [82]: b.A.argmin()
Out[82]: 2

In [83]: c = coo_matrix(([10, 9, 8, 0, 6, 5], ([0, 0, 1, 1, 2, 2], [0, 1, 0, 1, 0, 1])))

In [84]: c.A
Out[84]:
array([[10,  9],
       [ 8,  0],
       [ 6,  5]])

In [85]: c.argmin()  # Should be 3
Out[85]: 4

In [86]: c.A.argmin()
Out[86]: 3

The above was run using the main development branch:
In [87]: import scipy

In [88]: scipy.__version__
Out[88]: '1.10.0.dev0+1757.cc63003'

The bug is here: https://github.com/scipy/scipy/blob/cc63003326b7ae2e9dd41cd6af0e6e3079c32b95/scipy/sparse/_data.py#L282
If the matrix is entirely nonzero (i.e., nnz == prod(shape)) then we exit early with the untransformed argmin result. From a first look, it appears that the correct return value for that case should be mat.row[am] * mat.shape[1] + mat.col[am].

I'll put a fix together soon.


Add collaboration-init tag when initializeEditor for yjs collaboration

Follow up to:

#3520

This will allow having a hook that will tell when the editor has initiated the collaboration.
/**
 * @param {boolean} shouldRegisterEvent - pass isCollabEnabled
 * @returns {boolean} true when lexical editor has content from the collaboration session
 */
export const useEditorIsInCollab = (shouldRegisterEvent: boolean): boolean => {
  const [editor] = useLexicalComposerContext();
  const [isInCollab, setIsInCollab] = useState(false);

  useEffect(() => {
    if (!shouldRegisterEvent || isInCollab) {
      return undefined;
    }
    return editor.registerUpdateListener(({ tags }) => {
      if (tags.has('collaboration') || tags.has('collaboration-init')) {
        setIsInCollab(true);
      }
    });
  }, [editor, isInCollab, shouldRegisterEvent]);
}

This one is a bit tricky to change since there're some plugins (e.g., onChange) that rely on history-merge tag. At this point 'history-merge' is used as "(likely) not user-triggered change" which is often used by plugins that are initializing editor or auto-adjusting its initial state. See summary of #2706 with details from @zurfyx.

Same as "collaboration" tag, "(likely) not CURRENT user-triggered change".
When I tested, I always get 2 events. first is "history-merge" probable from another initialization.
and second is "history-merge" from CollabPlugin.
When there is a Yjs Doc then the second event is "collaboration".

If you think that this may break other parts of the editor.
How can we achieve the goal of knowing then the editor is ready to make changes that will be propagated to the collab session?

Added some extra details in your original Q&A post

Mentioned it in Q&A post, but you might want to use "synced" event from your collab provider. Having "init" event for collab is not 100% reliable anyway as you can always have concurrent edits from other clients during client boot

Ok, will try to use "synced" event from your collab provider. If it still does not solve the issue, we can come back to this topic.


Update Revoke-SPBusinessDataCatalogMetadataObject.md

Fixed example formatting.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sharepoint/sharepoint-ps/sharepoint-server/Revoke-SPBusinessDataCatalogMetadataObject.md
:white_check_mark:Succeeded
View (sharepoint-ps)

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


build(docker): add large generated directories to dockerignore

Checklist

[x] The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
[ ] Links to related issues (if applicable)
[ ] Tests for the changes have been added/updated (if applicable)
[ ] Docs related to the changes have been added/updated (if applicable)

Python tests failed. I assume this is unrelated to this exact PR, but might be related to your other work?

E: Unable to locate package python-ldap

Moving this forward to clear the backlog of PRs


[enh] Proposal to add class StringObject

I propose to add class StringObject. Then it will be possible to manipulate strings in object-oriented style:
$baseWord = new StringObject('soft', 'UTF-8');

$projectName = $baseWord
   ->preprend('yii')
   ->addWord('project')
   ->upperCaseEveryWord();

$projectNameWordsCount = $projectName->wordsCount();

Then we can make class StringHelper a wrapper over class StringObject. For example:
class StringHelper
{
    public static function createObject(string $string, string $encoding = null): StringObject
    {
        return new StringObject($string, $encoding);
    }

    public static function wordsCount(string $string, string $encoding = null): int
    {
        return static::createObject($string, $encoding)->wordsCount();
    }
}

You can use it https://github.com/fe3dback/str

@loveorigami Andrew, I know about this lib. Thanks. But I am talking about the future of this library.
There are many other good string processing libraries. But they have one problem - the authors stop supporting them. For example, there is an excellent library Stringy – but project is dead because author stopped supporting it. There's no code commits since 2017.
If Yii team isn't going to support and develop this library, then it should be replaced now with some kind of external solution. If the team is going, then I suggest an object-oriented design.

BTW library https://github.com/fe3dback/str is also rarely updated (only 3 commits for 2019) and still has no documentation and has no implementation of a static wrapper. I would not choose it for a long-term project.

What's the benefit in wrapping strings into objects?

What's the benefit in wrapping strings into objects?

An object has a state. This allows you to set the encoding only once.
Fluent interface is more convenient when you need a series of calls.

Just compare:
a) Using object:
$sentence = StringHelper::create($input, 'UTF-8')
    ->trim()
    ->upperCaseFirst()
    ->ensureLastSymbol('.');

b) Using static helper:
$encoding = 'UTF-8';

$buffer = StringHelper::trim($input, $encoding);
$buffer = StringHelper::upperCaseFirst($buffer, $encoding);
$buffer = StringHelper::ensureLastSymbol($buffer, '.', $encoding);

$sentence = $buffer;

On the other hand static methods are useful when a callable parameter is required:
public function rules()
{
    return [
        [['title', 'short_description'], 'filter', 'filter' => StringHelper::class . '::collapseWhitespaces'],
        [['title', 'short_description'], 'trim'],
        [['title', 'short_description'], 'required'],
        [['title', 'short_description'], 'string', 'max' => 128],
    ];
}

Here it would be very inconvenient to use a string object.

Therefore, it is convenient to have both an object interface for strings and a static wrapper in the same library.

@yiisoft/core-developers, @yiisoft/reviewers opinions?

Any benchmarks to measure overhead?

Any benchmarks to measure overhead?

@rob006 what kind of overhead do you mean? In such libraries, the main performance losses are the result of poor implementation, but not the result of using objects.
Implementation is a separate problem. This can be bad in both object-oriented style and static methods.

@rob006 what kind of overhead do you mean? In such libraries, the main performance losses are the result of poor implementation, but not the result of using objects.

I believe that creating objects and additional function calls will result noticeable overhead compared to simple operations on scalars. Especially if you want to use it internally in this way:
    public static function wordsCount(string $string, string $encoding = null): int
    {
        return static::createObject($string, $encoding)->wordsCount();
    }

Do you mean memory overhead or performance overhead?

Performance (CPU).

In order not to create a large number of objects during a series of static calls, we can implement it a little differently:
class StringHelper
{
    public static function wordsCount(string $string, string $encoding = null): int
    {
        // Simple operations on scalars here

        return $count;
    }
}

class StringObject
{
    protected $string;
    protected $encoding;

    public function __construct(string $string, string $encoding = null)
    {
        $this->string = $string;
        $this->encoding = $encoding;
    }

    public static function create(string $string, string $encoding = null): StringObject
    {
        return new static($string, $encoding);
    }

    public function wordsCount(): int
    {
        return StringHelper::wordsCount($this->string, $this->encoding);
    }
}

If you are worried about the performance of static calls, then this design will solve the problem. So, performance depends on the concrete implementation.

Hi, I merged performance improvements from the str lib into a maintained fork of Stringy + fixes from the community. Maybe you can find there some inspirations?! ☺ https://github.com/voku/Stringy

Can be implemented later as a wrapper for StringHelper.


Add index for tags/categories

Describe your problem
When a tag's URL is e.g. example.com/tag/the-tag, this lists all posts with the-tag; the parent URL path component will be a 404 Not Found: example.com/tag
There is currently no way to display a list of all tags from the database. Neither a category index.
Both $tags->keys() and $categories->keys() can return a list of known tags and categories, respectively.
But as of now, Bludit aborts with a 404 for the expected /tag index for 2 reasons:

Either it aborts with a 404 early when the URL slug is /tag (i.e. the tag prefix without a trailing slash), or
it tries to fetch a list of pages with the tag '' (empty string), which fails and sets the page to 404/not found as well, but at a later point.

Bludit version
v3.9.2

Hello, with the new version of Bludit v4.0 rc1, I would like to close the old Github issues. If you feel that your issue is not resolved in the latest version, create a new ticket.

Help and Support use the Forum https://forum.bludit.org
Bugs and new requests here in Github https://github.com/bludit/bludit/issues


[bug] Sanitize log name if there have dots

Background
When we have log:name.with.dots.bala in the conf/schemas/weird_logs.json or conf/logs.json, the create_table and generate_data_table_schema methods will throw KeyError.
https://github.com/airbnb/streamalert/blob/f8a9da465f2f9d187cc8300a0f0e2e1f013c1e4a/streamalert_cli/athena/handler.py#L405
https://github.com/airbnb/streamalert/blob/f8a9da465f2f9d187cc8300a0f0e2e1f013c1e4a/streamalert_cli/athena/helpers.py#L213
It is still a mystery to me that how did we create carbonblack tables correctly before.
Description
Steps to Reproduce

The issue can be reproduce when running create_table cli to create an Athena table

python manage.py athena create-table  --bucket nobody2020030420-streamalert-data  --table-name carbonblack_alert_status_updated

Traceback (most recent call last):
  File "manage.py", line 116, in <module>
    main()
  File "manage.py", line 112, in main
    sys.exit(not cli_runner(options))
  File "/Users/nobody/Work/ext_streamalert/streamalert_cli/runner.py", line 70, in cli_runner
    result = cmds[args.command](args)
  File "/Users/nobody/Work/ext_streamalert/streamalert_cli/runner.py", line 126, in <lambda>
    command: lambda opts, cmd=cli_command: cmd.handler(opts, config)
  File "/Users/nobody/Work/ext_streamalert/streamalert_cli/athena/handler.py", line 187, in handler
    options.schema_override
  File "/Users/nobody/Work/ext_streamalert/streamalert_cli/athena/handler.py", line 406, in create_table
    log_info = config['logs'][table.replace('_', ':', 1)]
KeyError: 'carbonblack:alert_status_updated'

I also added unit test cases to reproduce this issue.

Desired Change

Sanitize log name by replacing . with _.
Increase the unit test coverage for the code under streamalert_cli/

This should be fixed.


Fail to achieve the result of paper

Thanks for your nice work!
When I try to run run_coseg.sh and run_seg.sh in this project, I cannot get the result like those in paper, and even worse than the baseline. How do I need to modify the source code or trainging plan to achieve the result mentioned in the paper?

Functions adjust_learning_rate and warmup_learning_rate in util.py have not relate parameters, are there any affect to training if commenting these two function?

@aakash-saboo could you please let me know how did you run the preprocessing.py? I got the error when transposing numpy.array with incorrect dimension. The code is " image = image[:, :, 0].transpose((0, 2, 1)) ". I've tried to adjust the dimension by myself but still can't get a correct one. Thank you!

@xhu248 Thank you for your contribution.While i am very intersted in the method about contrast learning proposed by your team,i have some question :
1.In your paper,said that"The training epoch for contrastive learning is 70, and for segmentation training, it stops after 120 epochs."I am not sure if the "contrastive learning" and the "segmentation training" are pointed global contrast(SimCLR) in step 1 and Local contrast(pixel contrast) in step 2.If so,i want to know how many epoches about fine-tune in step 3.
2. whether the code  " image = image[:, :, 0].transpose((0, 2, 1)) " should be removed in preprocessing.py?Because,error will be reported during code execution raised by this code,and it is not rational to appear in preprocessing.py.
I am looking forward to your early reply,and thank for your contribution again!


LPI UI refactor

Checklist

[x] Appropriate branch selected (all PRs must first be merged to dev before they can be merged to master)
[x] Any modified or new methods or classes have helpful JSDoc and code is thoroughly commented
[x] The description lists all applicable issues this PR seeks to resolve
[x] The description lists any configuration setting(s) that differ from the default settings
[x] All tests and CI builds passing

Description
LPI was developed without understanding how it would work in the real world. This PR refactors the LPI UI to work better with how users use it.
The webhook URL is moved to the project settings, and the LPI can now be updated from any deployment with existing servers. The checkbox has also been refactored into a set of buttons which should be simpler to understand.
This PR also detaches Pelias deployment from OTP deployment -- failures are handled by not allowing Pelias deployment unless OTP is already deployed.
Requires https://github.com/ibi-group/datatools-server/pull/443

Thanks Binh! Have addressed all changes.


Allow Path/Image to take TReadOnlyProperty with shapeProperty/imageProperty

It looks like these will need to take a slightly more unhooked approach, due to:

Imageable (where _image lives, and _imageProperty will) is mixed by non-Node things. TinyForwardingProperty.setTargetProperty has a lot of assumptions about Node/NodeLike. SpriteImage is not Node-like. @zepumph I'm curious about review, I wasn't expecting the setTargetProperty implementation (... it looks safe to me to pass null in?)
image.image is... not what you pass in (in many cases). It coerces things to HTMLImageElement/HTMLCanvasElement (and mipmap things get stored elsewhere). Long story short, we need to still store _image, while _imageProperty can be this pure and amazing representation of "what is the current input" (which is great and valuable).
Path also coerces (away from string)
Path subtypes lazily construct actual Shape instances (when asked, and track whether it needs to be regenerated). This requires extra storage.

Finishing testing and adding some implementations in sims (where we were clearly linking something that could be a Property/DerivedProperty).

Additionally in https://github.com/phetsims/beers-law-lab/commit/7c794ec118cdf0ecde6b93b0082b4d036146cdac, I had to add strictAxonDependencies:false to something (otherwise... reading Node bounds inside of a DerivedProperty would be prohibited?).
@samreid thoughts on whether this issue (related to https://github.com/phetsims/axon/issues/441) qualifies as a good catch (hey, should we listen to the bodyNode/probeNode bounds?) or as noise?

@zepumph, available to review?

From review:

[ ] I'd like to talk about how Imageable supports (or doesn't support) null. It doesn't seem like it has a place there, but nulling out a shape in Path seemed useful. I'm curious about the discrepancy. For example asserting we have an image set: https://github.com/phetsims/scenery/blob/b356bc1001e5cb054856f2d004f7fcd682ab172f/js/nodes/Imageable.ts#L242.
[ ] On slack you mentioned that it was awkward to have ParsedImage as the type for getHitTestData. I'll leave it up to you if you want to expand the definition of what a ParsedImage is, or hard code them for that function. Either sounds great to me.

Thus far I have only completed the Path and Imageable files review.

[ ] Here are some spots I found that may look nicer using this newer pattern, are you familiar enough with any of them to refactor them? I think having a couple more usages before closing sounds pretty nice:

https://github.com/phetsims/center-and-variability/blob/efb391ba28295aeba0f52f72119f34bdcf02b86f/js/common/view/CAVNumberLineNode.ts#L52-L66
https://github.com/phetsims/circuit-construction-kit-common/blob/eb8a4916be8e6d169e813a98a96c465032d6515f/js/view/CCKCLightBulbNode.ts#L181-L198
https://github.com/phetsims/circuit-construction-kit-common/blob/11ef57ab8e430fad8b5ffbd22921be3045a0c867/js/view/FuseNode.ts#L163-L167
https://github.com/phetsims/curve-fitting/blob/11782cde78d25957f63a4f7e1644ccb39e8d7fb6/js/curve-fitting/view/CurveNode.js#L35-L50
https://github.com/phetsims/fluid-pressure-and-flow/blob/26cbe7264c054f51854867b721bbef0cacefa193/js/under-pressure/view/TrapezoidPoolWaterNode.js#L32-L54
https://github.com/phetsims/forces-and-motion-basics/blob/74cf55d82c077387eb98a7a7caf95425f3575f98/js/motion/view/WaterBucketNode.js#L91-L102
https://github.com/phetsims/geometric-optics/blob/f4abc13a6bd32587a49ac6557f9da4c812482d86/js/lens/view/LensNode.ts#L76-L80
https://github.com/phetsims/geometric-optics/blob/f4abc13a6bd32587a49ac6557f9da4c812482d86/js/mirror/view/MirrorNode.ts#L73-L76
https://github.com/phetsims/joist/blob/b7425bbddee0006ead535c8908535f5d623de7df/js/Helper.ts#L553-L560

And I stopped looking there (made it to joist/)

[ ] Here are some usages for 'shape' that maybe want to include 'shapeProperty' too.

https://github.com/phetsims/density-buoyancy-common/blob/bd98c9901305ddece235f29d74adcbb3e73222af/js/buoyancy/model/Boat.ts#L29-L28
https://github.com/phetsims/density-buoyancy-common/blob/bd98c9901305ddece235f29d74adcbb3e73222af/js/buoyancy/model/Bottle.ts#L172
https://github.com/phetsims/density-buoyancy-common/blob/44aceaa70b22a6eba736e2bf2f3797b4c764854d/js/common/model/Cone.ts#L29
All other shapes in buoyancy
https://github.com/phetsims/scenery/blob/6b4224126ed30aa88ce790ed547df14552cf51ef/js/nodes/Circle.ts#L334
https://github.com/phetsims/scenery/blob/6b4224126ed30aa88ce790ed547df14552cf51ef/js/nodes/Line.ts#L528
https://github.com/phetsims/scenery/blob/d5a8b540ca4a13157eb4f1d28ccb3f582885c5a3/js/nodes/Path.ts#L608
https://github.com/phetsims/scenery/blob/16003c1e12b6dd545771a0cbea898701d29000f2/js/nodes/Rectangle.ts#L1031

[ ] Would it be easy to add support for this for highlights too while we are add it? Probably not and worth a separate issue but I thought I'd ask: https://github.com/phetsims/scenery/blob/601793e60898e1d63d51b11994887ac7aae005d3/js/overlays/HighlightOverlay.ts#L29

Otherwise I completed the review and everything looks really nice. Thank you!

Here are some usages for 'shape' that maybe want to include 'shapeProperty' too.

The cases of drawableMarkFlags don't actually include 'shapeProperty', so there is no need to remove them.

Here are some usages for 'shape' that maybe want to include 'shapeProperty' too.

The Density/Buoyancy ones aren't based on Path, so that won't work either:

Created an issue for potential chip-away to refactor using the new patterns as noted above: https://github.com/phetsims/scenery/issues/1651

Created an issue for the highlight overlay shapeProperty in https://github.com/phetsims/scenery/issues/1652.

@zepumph thoughts on the above? Is everything handled?

I think this all looks great. Thanks for handling this.


Is it possible to use Vinyl with tisch?

It seems as though PgR and Rec are very similar. It might reduce friction at the edges of this library to use the more widespread Vinyl.

Yes and no. At the time I evaluated Vinyl and other alternatives, and it
made sense to do something else due to the many tricky instances that need
to be provided, type inference, and also because I'm not a big fan of
buying into Vinyl or any of the competing alternatives. In related news,
I'm actually thinking of revamping records internally to use Vector
instead, which should lead to a more efficient runtime, but also to more
efficient compilation times with enough type level tricks which are usually
not possible with an inductive data type such as the current HList.
On Jan 5, 2017 14:32, "Joe Hermaszewski"<EMAIL_ADDRESS>wrote:
It seems as though PgR and Rec are very similar. It might reduce friction
at the edges of this library to use the more widespread Vinyl.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/k0001/tisch/issues/14, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAM5mOv7_RWPVynpk8TiOXUyD5XeY4Hks5rPPD2gaJpZM4LbsNj
.

That makes sense, thanks for answering.


Deploy Laravel

I tried to deploy laravel app using coolify. In my project I have composer.json and also there have not package.json. When I click next, it recommended my application buildpack as Node. When I manually select PHP and start building, it shows in logs that composer packages are not installing.
Any idea how do I achieve this?

The next version will contain composer support in PHP buildpack, but also will add Laravel in some upcoming releases.

It is happening in the next release!


RFC: Finalize website

This PR is a RFC: Requesting for comment. Please leave your feedback about how the code can be tidied out for production!
TODO:

[x] Landing page
[x] Register page
[ ] Code cleanup
[ ] Code refactor
[ ] Responsive design

@provsalt having technical issues right now - imagine not having access

I'll take over from here 🚀


implement subdomain focus feature in data-prep-connector

Why are these changes needed?
If the user provides https://research.example.com/ as a seed url for the data-prep-connector, there is a requirement that the user wants to automatically apply subdomain focus so we do not crawl other subdomains than research for the domain example.com.
This PR implements the subdomain focus feature.
Related issue number (if any).
#724

@qiragg Please confirm that you can see this PR and comment on it. You can also tag me once your you approve it. I am also soliciting input from the broader community on this one. I know we did it before in the first part of the year and I want to make sure we capture lessons learned from the previous implementation (what worked and what did not work).

@qiragg @yuanchi2807 Please review and comment as you see fit. @qqirag it may help if you can elaborate further on the rated issue based on previous experience with similar functionality in bluecrawl

@Qiragg @yuanchi2807 Please review and comment as you see fit. @qqirag it may help if you can elaborate further on the rated issue based on previous experience with similar functionality in bluecrawl

I am not knowledgable enough to crawling requirements to make a comment.

@Qiragg @yuanchi2807 Please review and comment as you see fit. @qqirag it may help if you can elaborate further on the rated issue based on previous experience with similar functionality in bluecrawl

In bluecrawl, we do provide the ability to do subdomain_focus automatically based on the input seed url but we cannot focus on multiple subdomains per job. For crawling, it would make sense to be able to launch a single job that focuses on multiple subdomains which is what this feature would provide. This is a functionality that was missing in DPK-connector and is much needed for launching certain targeted crawls.
There are a couple of points to discuss here:

It is more intuitive to set the default subdomain_focus to be true but we will not do that here based we do not want to depart from the default crawler behavior in the earlier version.
We expect the user to not provide ibm.com and research.ibm.com as seed urls at the same time if they want subdomain_focus to be applied to on research. It is not clear if we should reject jobs which are improperly configured in such a way or allow the user to rectify their mistake. While this is obvious in this case: in rare cases, the user may want to apply path_focus and subdomain_focus at the same time by providing: research.ibm.com/help/ and ibm.com/support/. In such a case, my understanding is that we will end up crawling both ibm.com/help/ and ibm.com/support/.

Ideally, we only want to crawl research.ibm.com/help/ and ibm.com/support/ for such a user-defined case.
The PR looks good to me for now. I think if we get feedback regarding a different design choice that the user wants, we can think about it at that point.

@Qiragg Thanks for the analysis. Good stuff: Can you click on "Files Changed" then click on the green button "review changes" then check "approve" then click submit to indicate your approval.
@hmtbr:
1- what happens if we use the seed url : http://www.research.ibm.com/ and set path focus to true (i.e. path focus is for the Root  (i.e. / ), will that produce the same result as sub-domain focus ?
2- Also,  what if the user specifies the "unexpected" in the case that @Qiragg identified above (ie. 2 seeds URLs  ibm.com and research.ibm.com and subdomain focus set to true? Will the code default  to the least restrictive or the more restrictive case ?

1- what happens if we use the seed url : http://www.research.ibm.com/ and set path focus to true (i.e. path focus is for the Root (i.e. / ), will that produce the same result as sub-domain focus ?

Currently there is no support for path focus with subdomain. It will produce pages from domain *.ibm.com.

2- Also, what if the user specifies the "unexpected" in the case that @Qiragg identified above (ie. 2 seeds URLs ibm.com and research.ibm.com and subdomain focus set to true? Will the code default to the least restrictive or the more restrictive case ?

It will produce pages from domain *.ibm.com.

1- what happens if we use the seed url : http://www.research.ibm.com/ and set path focus to true (i.e. path focus is for the Root (i.e. / ), will that produce the same result as sub-domain focus ?

Currently there is no support for path focus with subdomain. It will produce pages from domain *.ibm.com.

is this a bug in the logic then that need to be fixed ? If the application specifies www.ibm.com/docs with path focus it should not received anything from research.ibm.com/docs . No?

@touma-I Thanks for your approval. The cases don't produce intuitive results actually. I will address them in another issue and PR soon. This PR itself won't introduce any regression, so I merge this now to unblock our work.

@touma-I Thanks for your approval. The cases don't produce intuitive results actually. I will address them in another issue and PR soon. This PR itself won't introduce any regression, so I merge this now to unblock our work.

Thanks @hmtbr Agree. Now that this has matured to this point, it is appropriate to consider usability by outsiders who are not intimately familiar with our internal processes. I do think that if path focus is done right, we won't need subdomain focus and It will be appropriate to do a second iteration. thanks again.


scoop update causes error message "Your local changes to the following files would be overwritten by merge"

Bug Report
Package Name: Scoop
Current Behaviour
See log below.
Expected Behaviour
An error free update
Additional context/output
PS C:\Users\xxxx> scoop update *
Updating Scoop...
Updating 'extras' bucket...
error: Your local changes to the following files would be overwritten by merge:
        scripts/everything/install-context.reg
        scripts/everything/uninstall-context.reg
Please commit your changes or stash them before you merge.
Aborting

Possible Solution

System details
Windows version: 10
OS architecture: 64bit
PowerShell version: 7.2.1
Additional software: Windows terminal
Scoop Configuration

{
  "SCOOP_BRANCH": "master",
  "SCOOP_REPO": "https://github.com/lukesampson/scoop",
  "lastupdate": "2021-12-22T14:05:35.9687239+11:00"
}

Can you do scoop bucket rm extras and then scoop bucket add extras?

I think this is a duplicate of #7546
the root cause of this is being discussed there as well


feat(postcss-loader): support passing in a function for postcss definition

🔗 Linked issue

#7015
#19482
❓ Type of change

[ ] 📖 Documentation (updates to the documentation or readme)
[x] 🐞 Bug fix (a non-breaking change that fixes an issue)
[ ] 👌 Enhancement (improving an existing functionality like performance)
[x] ✨ New feature (a non-breaking change that adds functionality)
[ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This is an updated version of #8899 that applies the changes to the now-default PostCSS 8 config.
If postcss config is a function, we execute the custom function, but we also apply the default config of Nuxt. Therefore we can ensure that the config has a minimum default.
Postcssconfig can either be an object (already supported) or a function which gets passed in the loadercontext. But nuxt does not support passing in a function currently.
Why
Passing in a function allows more complex uses cases, e.g. by applying different postcss steps for different ressources. (see also https://github.com/webpack-contrib/postcss-loader#function)
Solution
This approach adds a new "postcssConfig" option to the "postcss" Nuxt config. Either this is the regular postcssConfig, or it is a function. see https://webpack.js.org/loaders/postcss-loader/#postcssoptions
(only works with postcss@8, because postcss-loader >= 4.0 is required, and postcss7 nuxt setup conflicts with this version of postcss-loader)
e.g.
nuxt.config.js.
module.exports = {
  build: {
    postcss: {
      postcssOptions: loaderContext => {
        // e.g. do something else with ".sss" files
        if (/\.sss$/.test(loaderContext.resourcePath)) {
          return {
            parser: 'sugarss',
            plugins: [['postcss-short', { prefix: 'x' }], 'postcss-preset-env']
          };
        }

        return {
          plugins: [['postcss-short', { prefix: 'x' }], 'postcss-preset-env']
        };
      }
    }
  }
};

📝 Checklist

[x] I have linked an issue or discussion.
[ ] I have updated the documentation accordingly.

I am not sure that this change correctly applies the preset properties to the postcss-preset-env configuration.
I also don't know how to add tests. Is there an existing test that I could adjust for this change, @danielroe?
I would also need to open a separate PR for updating the documentation. The current section on PostCSS config sessions has not yet been updated to Nuxt 2.16 changes (https://nuxtjs.org/docs/configuration-glossary/configuration-build#postcss)

I am not sure that this change correctly applies the preset properties to the postcss-preset-env configuration.

I have extracted the changes to preset to a separate PR (#19518) because it makes the review faster, and I could test that it works.
I'm not sure how to test this PR, though.

Codecov Report
Patch coverage: 64.51% and project coverage change: -0.03 :warning:

Comparison is base (83e6869) 66.18% compared to head (60735c7) 66.16%.

Additional details and impacted files
@@            Coverage Diff             @@
##              2.x   #19495      +/-   ##
==========================================
- Coverage   66.18%   66.16%   -0.03%
==========================================
  Files          93       93
  Lines        4096     4105       +9
  Branches     1158     1163       +5
==========================================
+ Hits         2711     2716       +5
- Misses       1119     1123       +4
  Partials      266      266

Flag
Coverage Δ

unittests
66.16% <64.51%> (-0.03%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

packages/config/src/config/build.js
100.00% <ø> (ø)

packages/webpack/src/utils/postcss.js
77.06% <64.51%> (-1.94%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

@obulat would you be happy to resolve conflicts in this PR? I can help with adding a test fixture.

Merging to include in 2.17. Feel free to come back to me if you think there's anything missing here.

Merging to include in 2.17. Feel free to come back to me if you think there's anything missing here.

Thank you for getting this PR finished, @danielroe!


Make a decision on how to process the data

@Antonio-John @Mark-Simons-ONS
This is a discussion to be had between us.
My guess is that processing the result for the whole nation at once will take a long time. I have never done it so I do not know. So should we be able to specify any one local authority to process at a time, e.g. "Swansea" or limit to a list, e.g. ["Kingston upon Thames", "Lambeth", "Lewisham"] so we can check different areas are calculating okay, and also run the pipeline a bit quicker when we are developing.
The question is should we:

Calculate each of 379 local authorities one by one and concatenate the results afterwards
Calculate the whole nation at once in one big computation and then aggregate the results by local authority for reporting

You can add your thoughts on this issue in the comments and/or we can chat on a Teams call about it. Either way we should write what we decide in the comments.

From a development point of view I think it's easier to calculate results 1 by 1. That way we could have a list like you have mentioned.
Furthermore, it could give us the functionality further down the line off: If we wanted to do all LA's in Wales (or any group of LA's), we could just pass that list through.

The for loop going through the local authorities is good for the time being but I think we should attempt a whole-nation-at-once calculation. I think it would be much faster.
I have created an issue for this: https://github.com/ONSdigital/SDG_11.2.1/issues/159
I will now close this issue.


THORN-2325: replaced favicon-default.ico with thorntail logo

Motivation
Thorntail is not WildFly and there is a spiffy new logo available.
Modifications
No code was changed. The favicon-default.ico file was replaced with a
copy of https://thorntail.io/favicon.ico
Result
By default, resources served by Thorntail in a browser will display the
spiffy new logo wherever the browser in use happens to display such
things (e.g. on tabs, next the the URL, etc.) and developers will smile.

Can one of the admins verify this patch?

Can one of the admins verify this patch?

ok to test

Thanks!


[Feature] Update Toilet Status

API Document
API Request
POST {{host_api}}/toilet/{toilet_id}
Body:
{
  "status": true
}

API Response
{
  "message": "success"
}

Definition

toilet_id is the ID of the toilet

Closing this now. This feature has already been merged.


Question: does it make sense to support multi-plugin yaml files?

When specifying plugin files from the CLI we just allow one at a time. However, it may make sense from a user perspective to have a few coupled together so they can be shared and run more easily together.
Reading them in seems relatively easy, I'm not so sure about storing them or running them though.

when we read them in it would obviously be assumed you're running them both.
when installing them, maybe install both separately and also have a file for the pair together?

FWIW you can run a directory of plugins already which is how I run large groups of plugins for testing. This may be sufficient.


Using IdentityServer for authorized login

Hello community,
I want to use the IdentityServer to secure the IdentityManager. When I using the following code for the open id connect authentication.

But the IdentityServerBearerTokenAuthenticationOptions throw an exception with whom I don't know what to do with that:
"An exception of type 'System.NullReferenceException' occurred in IdentityServer3.AccessTokenValidation.dll but was not handled in user code".
Do you know how to solve the problem or is there an other possibility using the IdentityServer for secure the IdentityManager?

I watched this video: https://vimeo.com/125427106
But it does not help me using the IdentityServer to secure the IdentityManager.
And the sample which I found here : https://github.com/IdentityManager/IdentityManager/tree/master/source
Log in the user automatically without asking for a username or a password.

Right, but there's a different Startup that can be configured to do OIDC w/ IdSvr.

Ohh yes thank you I did not see it


More capabilities

Hi,
I tried the feature and this is great, it allows us to cover new cases, thank you.
I have several questions though :

Does the NoPa feature is available through APIs ? We can invite a guest with API so, maybe we can enable this feature through the request ?

Can we enforce NoPa to be activated on some specific users ?
We have one case where one of our clients have employees under an Azure AD tenant and somehow, tenant is not configured like it should be and collaboration is not working between us.
So, their employees have azure ad accounts, and will not be prompted for NoPa, but since Azure authentication is not working for them in our tenant, they can't access our ressources...

I see we can activate NoPa through PowerShell, can we invite users with NoPa with P$ commands as well ?

Be able somehow to enforce NoPa feature for some accounts will be a good addition, maybe with a checkbox during invitation process through the regular "Users > Invite Guest" tab ? Because today admin is not deciding.

From what I'm reading, if an account is created using NoPa, it will stay that way forever.. If the user get an MSA weeks after, we have to re create an account. Will it change in the future ? It would be nice to have the capability.

Regards,

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 83f1378d-b047-11d1-a138-5c52a3fee6ba
Version Independent ID: 57c51f57-90ad-e0f9-1e6b-3262f94de02c
Content: One-time passcode authentication for B2B guest users - Azure Active Directory
Content Source: articles/active-directory/b2b/one-time-passcode.md
Service: active-directory
GitHub Login: @msmimart
Microsoft Alias: mimart

@iam4567 Thanks for your feedback! We will investigate and update as appropriate.

@iam4567

No, there is currently no API available for one time pass-code authentication for B2B users.
This feature is currently in preview and once it is live it will be turned on by default for all tenants.
I do not believe inviting users with one time pass-code authentication feature is available through PowerShell.
Also, for any product feedback please post this to Azure AD UserVoice. This will allow the community to upvote and for the product team to include into their plans. We also have the "Give Product Feedback" button in our documents now to take you directly to the appropriate feedback page.

@iam4567 We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.


Need fix on TemplateId filtering by changing IDataSource interface to accept template id (maybe create an args parameter, instead of multiple overloads)

Need fix on TemplateId filtering by changing IDataSource interface to accept template id (maybe create an args parameter, instead of multiple overloads)

The Retrieve method needs to take a lot more parameters, so this IDataSource interface needs some rework. (e.g. Date Range. Look at what Retrieve ELM node supports) Move arguments into RetrieveArgs class


add user management routes under /pasaport for pasaport.kamp.us

https://pano-dev.kamp.us/settings type of pages will be hosted under /pasaport route and will be served as pasaport.kamp.us

@usirin I'm assuming all the apps using authentication should share this page to account settings. Is that a correct assumption?
Would you like me to create a page for this after #457 ?

@Ketcap i am sorry, i've missed this. we talked about this on stream today and decided to move forward with the plan @Ketcap decided above.

No worries @usirin , i'll lay down the plan for this and create more tasks and split into chunks as we spoke

Sub pages added for future tasks see https://github.com/kamp-us/monorepo/discussions/526


[yaml] Normalize error_handling docs on API catalog

This PR normalizes all instances of error_handling as a parameter in the API catalog to use the same config/description.
Before this, there were different typings being used for various transforms, and the Java implementation could get out-of-sync despite the functionality being the same.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

R: @robertwb


PoloniexApiError: Please do not make more than 6 API calls per second.

I'm getting this error quite a lot at the minute, I've two different backtraces for it
Traceback (most recent call last):
  File "/home/dog/poloniexlendingbot_new/lendingbot.py", line 91, in <module>
    Lending.lend_all()
  File "/home/dog/poloniexlendingbot_new/modules/Lending.py", line 126, in lend_all
    lending_balances = api.return_available_account_balances("lending")['lending']
  File "/home/dog/poloniexlendingbot_new/modules/Poloniex.py", line 105, in return_available_account_balances
    balances = self.api_query('returnAvailableAccountBalances', {"account": account})
  File "/home/dog/poloniexlendingbot_new/modules/Poloniex.py", line 79, in api_query
    json_ret = _read_response(ret)
  File "/home/dog/poloniexlendingbot_new/modules/Poloniex.py", line 46, in _read_response
    raise PoloniexApiError(data['error'])
PoloniexApiError: Please do not make more than 6 API calls per second.

  File "/home/dog/poloniexlendingbot_new/lendingbot.py", line 91, in <module>
    Lending.lend_all()
  File "/home/dog/poloniexlendingbot_new/modules/Lending.py", line 125, in lend_all
    total_lended = Data.get_total_lended()[0]
  File "/home/dog/poloniexlendingbot_new/modules/Data.py", line 41, in get_total_lended
    crypto_lended = api.return_active_loans()
  File "/home/dog/poloniexlendingbot_new/modules/Poloniex.py", line 129, in return_active_loans
    return self.api_query('returnActiveLoans')
  File "/home/dog/poloniexlendingbot_new/modules/Poloniex.py", line 79, in api_query
    json_ret = _read_response(ret)
  File "/home/dog/poloniexlendingbot_new/modules/Poloniex.py", line 46, in _read_response
    raise PoloniexApiError(data['error'])
PoloniexApiError: Please do not make more than 6 API calls per second.

I've recently started lending across a total of 4 currencies. I'm not sure if that's significant, but I don't think anything else has changed.

I meant to say, this was on master at 16849f2461c0dd1e5bcd3f99251b11ce52aad39d
Though I looked at the diff from head and there doesn't seem to be anything that would change this.

Yeah, this is an occasional error that stems from the bot acting too quick, only solution is to add an API request rate limiter.

The python API that I've been using for a sell bot has a coach mode that limits you to 6 calls a second.
The repo is here: https://github.com/s4w3d0ff/python-poloniex
The return format is a bit different and the functions are of course all named differently, but everything is there by the looks of it. Could be a pain to move API I guess, though would be nice to have a separately maintained API.

@laxdog I will take a look at it, but it is not a priority.

Discussion for addition of a coach in #188
This issue is about poor error handling.

@Evanito should we close this one as well?


Creating support for expected goals and game state values in our kloppy data model

Expected goals
By adding an optional xg attribute to our ShotEvent class, we can support the widely used expected goal property in kloppy. This property could be fed by the raw input data during deserialization (e.g. StatsBomb) or in a later stage could be calculated by the user using an xG model of choice.
Proposed implementation:
@dataclass(repr=False)
@docstring_inherit_attributes(Event)
class ShotEvent(Event):
    """
    ShotEvent
    Attributes:
        event_type (EventType): `EventType.SHOT` (See [`EventType`][kloppy.domain.models.event.EventType])
        event_name (str): `"shot"`,
        result_coordinates (Point): See [`Point`][kloppy.domain.models.pitch.Point]
        result (ShotResult): See [`ShotResult`][kloppy.domain.models.event.ShotResult]
        xg (ExpectedGoal): See [`ExpectedGoal`][kloppy.domain.models.event.ExpectedGoal]
    """
    result: ShotResult
    result_coordinates: Point = None
    event_type: EventType = EventType.SHOT
    event_name: str = "shot"
    xg: Optional[ExpectedGoal]

@dataclass
class ExpectedGoal:
    """
    Expected goal metrics of an event

    Attributes:
         xg: The probability of scoring from the shot situation, not considering shot execution characteristics
         execution_xg: The probability of scoring following the execution of the shot
         gk_difficulty_xg: The probability of a goalkeeper conceding a goal
    """

    xg: Optional[float] = field(default=None)
    execution_xg: Optional[float] = field(default=None)
    gk_difficulty_xg: Optional[float] = field(default=None)

    @property
    def net_shot_execution(self) -> Optional[float]:
        return None if None in (self.xg, self.execution_xg) else self.execution_xg - self.xg

Game state values
By adding optional gs_scoring_before, gs_scoring_after, gs_conceding_before and gs_conceding_after attributes to our Event class, we can support the widely used game state based value models in kloppy. This property could be fed by the raw input data during deserialization (e.g. StatsBomb's on-the-ball value models) or in a later stage could be calculated by the user using a game state value model of choice (e.g. VAEP).
Proposed implementation:
@dataclass
@docstring_inherit_attributes(DataRecord)
class Event(DataRecord, ABC):
    """
    Abstract event baseclass. All other event classes inherit from this class.

    Attributes:
        event_id: identifier given by provider
        team: See [`Team`][kloppy.domain.models.common.Team]
        player: See [`Player`][kloppy.domain.models.common.Player]
        coordinates: Coordinates where event happened. See [`Point`][kloppy.domain.models.pitch.Point]
        raw_event: Dict
        state: Dict[str, Any]
        qualifiers: See [`Qualifier`][kloppy.domain.models.event.Qualifier]
    """

    event_id: str
    team: Team
    player: Player
    coordinates: Point

    result: Optional[ResultType]
    gsv: Optional[GameStateValue]

    raw_event: Dict
    state: Dict[str, Any]
    related_event_ids: List[str]

    qualifiers: List[Qualifier]

    freeze_frame: Optional["Frame"]

@dataclass
class GameStateValue:
    """
    Game state value metrics of an event.

    Attributes:
         gsv_scoring_before (Optional[float]): The probability the team will score in X actions prior to the event.
         gsv_scoring_after (Optional[float]): The probability the team will score in X actions after the event.
         gsv_conceding_before (Optional[float]): The probability the team will concede a goal in X actions before the event.
         gsv_conceding_after (Optional[float]): The probability the team will concede a goal in X actions after the event.
    """

    gsv_scoring_before: Optional[float] = field(default=None)
    gsv_scoring_after: Optional[float] = field(default=None)
    gsv_conceding_before: Optional[float] = field(default=None)
    gsv_conceding_after: Optional[float] = field(default=None)

    @property
    def gsv_scoring_net(self) -> Optional[float]:
        return None if None in (self.gsv_scoring_before, self.gsv_scoring_after) else self.gsv_scoring_after - self.gsv_scoring_before

    @property
    def gsv_conceding_net(self) -> Optional[float]:
        return None if None in (self.gsv_conceding_before, self.gsv_conceding_after) else self.gsv_conceding_after - self.gsv_conceding_before

    @property
    def gsv_total_net(self) -> Optional[float]:
        if None in (self.gsv_scoring_before, self.gsv_scoring_after, self.gsv_conceding_before, self.gsv_conceding_after):
            return None
        return (self.gsv_scoring_after - self.gsv_scoring_before) - (self.gsv_conceding_after - self.gsv_conceding_before)

Any feedback is highly welcome!

A few thoughts:

I would also add xA, xT, execution ratings, decision ratings, win probability, pitch control, pitch influence, and pressing intensity. 😄 But jokes aside, my main point is that if we create a separate field for each metric, things could get pretty complex and it might quickly explode. I think it's a better idea to use a single list, dict or custom container to store all metrics.
I would attach this container for metrics to the DataRecord class since it is also possible to compute metrics for tracking data frames (e.g., pitch control).
I suppose we want a base class for metrics and a few subclasses.

from typing import Optional, Dict, Union, List
from dataclasses import dataclass, field
from abc import ABC, abstractmethod
import numpy as np

@dataclass
class Metric(ABC):
    name: str
    provider: Optional['Provider'] = None

@dataclass
class ScalarMetric(Metric):
    value: float

@dataclass
class PlayerMetric(Metric):
    value: Dict['Player', float]

@dataclass
class SurfaceMetric(Metric):
    value: np.ndarray

    def value_at(self, loc : Point):
        return value[loc.y, loc.x]

Then, you can define classes for the most common metrics as
class ExpectedGoals(ScalarMetric):
    """Expected goals""""
    name = "xG"

class PostShotExpectedGoals(ScalerMetric):
     """"Post-shot expected goals"""
     name = "PsXG"

class GameStateValue(ScalarMetric):
     """Game state value""""
    gsv_scoring_before: Optional[float] = field(default=None)
    gsv_scoring_after: Optional[float] = field(default=None)
    gsv_conceding_before: Optional[float] = field(default=None)
    gsv_conceding_after: Optional[float] = field(default=None)

    @property
    def gsv_scoring_net(self) -> Optional[float]:
        return None if None in (self.gsv_scoring_before, self.gsv_scoring_after) else self.gsv_scoring_after - self.gsv_scoring_before

    @property
    def gsv_conceding_net(self) -> Optional[float]:
        return None if None in (self.gsv_conceding_before, self.gsv_conceding_after) else self.gsv_conceding_after - self.gsv_conceding_before

    @property
    def value(self) -> Optional[float]:
        if None in (self.gsv_scoring_before, self.gsv_scoring_after, self.gsv_conceding_before, self.gsv_conceding_after):
            return None
        return (self.gsv_scoring_after - self.gsv_scoring_before) - (self.gsv_conceding_after - self.gsv_conceding_before)

I am not sure whether "metric" is the right terminology here.  In the context of soccer analysis, a metric typically involves the aggregation or analysis of multiple data points. For example, if you are tracking the number of goals scored by a soccer player in each game, each individual game's goal count would be a data point. If you calculate the average number of goals scored per game over a season, that average becomes a metric. To make this distinction, I prefer to use "statistic" in the context of a single data point.

Good point 😅. I agree that adding a list of Statsitics is probably a better way to keep it clean and still have a lot of flexibility in adding statistics.

Agree.

Makes sense!

Fine to use "statistic" in this terminology.

Below, an updated version of how the DataRecord class would change, based on your inputs:
@dataclass
class DataRecord(ABC):
    """
    DataRecord

    Attributes:
        dataset: Reference to the dataset this record belongs to.
        prev_record: Reference to the previous DataRecord.
        next_record: Reference to the next DataRecord.
        period: See [`Period`][kloppy.domain.models.common.Period]
        timestamp: Timestamp of occurrence.
        ball_owning_team: See [`Team`][kloppy.domain.models.common.Team]
        ball_state: See [`BallState`][kloppy.domain.models.common.BallState]
        statistics: List of Statistics associated with this record.
    """

    dataset: "Dataset" = field(init=False)
    prev_record: Optional["DataRecord"] = field(init=False)
    next_record: Optional["DataRecord"] = field(init=False)
    period: "Period"
    timestamp: float
    ball_owning_team: Optional["Team"]
    ball_state: Optional["BallState"]
    statistics: List[Statistic] = field(default_factory=list)

I'll probably be working on implementing this in the near future and adding a parser for StatsBomb.