add config and launch files for hironx.

We added config and launch file for HIRONX environment.
It is executed depends on hironx_ros_bridge and hironx_moveit_config.
#6

I checked this PR with simulation and it seems OK, but I'm concerning with we have remaining issue with your real robot #6
I'm not sure, but I'm a bit doubtful of the behavior of JointTrajectory controller of HiroNX/Nextage. We have to command the robot continuously while jogging, and which is same situation I heard from you when we had a meeting at your lab. Do you have any idea how to command the robot continuously finally?
We have two choices to command the robot, message and action. We have use_action parameter in jog_joint_node and jog_frame_node.  With default parameter, they use message, ex. /larm_controller/command. So if you are confident you should use action, you can try to set use_action  true with your robot.
And please take extra care when you activate the robot !
Any idea @k-okada ?


{Feedback} Explain what az feedback does

Description
Fix #17393
The current az feedback help message is very vague.
> az feedback -h

Command
    az feedback : Send feedback to the Azure CLI Team!

This PR refines the help message to explicitly explain what az feedback does.
Testing Guide
> az feedback -h

Command
    az feedback : Send feedback to the Azure CLI Team.
        This command is interactive. If possible, it launches the default web browser to open GitHub
        issue creation page with the body auto-generated and pre-filled. You will have a chance to
        edit the issue body before submitting it.

feedback


Look into purescript for building the JS front-end for charting and inputting expressions

Useful to start working on some form of GUI for inputting expressions and so forth into a web-page and playing around with the results.

Went with Elm instead. (Great devstory out of the door)


read_float_from_inline_function() -> class Inline ?

While looking through the documentation, I stumbled upon read_float_from_inline_function(). That might be a (somewhat ugly) leftover from my attempts, to use inline functions in pyansys. I have written a class Inline to provide most of the inlline functions, including some comfort functions to get e.g. (x, y, z) in one go:
https://github.com/natter1/pyansystools/blob/master/pyansystools/inline.py
Would that be a better approach for inline functions in pymapdl?
import Inline

...
inline = Inline(mapdl)
[kx, ky, kz] = inline.kxyz(k)

I like your approach for writing the inline functions:

    def _read_inline(self, inline_function: str):
        """
        Use an Inline-Function and return its value.
        :param inline_function: String containing the complete inline-function
        :return: float
        """
        line = self._mapdl.run(f"__inline__={inline_function}")
        return float(re.search(r"(?<=__INLINE__ =).*", line).group(0))

    # ========================================================================
    # ============================ entity status =============================
    # ========================================================================
    def nsel(self, n: int) -> Status:
        """
        Status of node k (UNSELECTED==-1, UNDEFINED==0, SELECTED==1)
        :param n: node number in ANSYS
        :return: Status
        """
        result = self._read_inline(f"nsel({n})")
        return Status(result)

I believe this has been almost implemented all in #504


Does LucidDreamer train a lora during iterations like ProlificDreamer?

You mentioned lora in the paper, so just asking it for clarify, since it almost take twice amount of time to run LucidDreamer  than to run prolificdreamer

Hi, sorry for the late reply, we don't need to train a Lora during iterations.  For acceleration, you can try to modify the   '''xs_delta_t: 200''' and '''xs_inv_steps: 5''' in the original config to  '''xs_delta_t: 1000''' and '''xs_inv_steps: 1''', it means that you only use 1 step in ddim inversion. Our extra overhead should only exist with DDIM inversion compared with SDS.


feat: move client's helper functions to AgentBaker repo

/kind feature
What this PR does / why we need it:
Move client's helper functions to AgentBaker repo so that bootstrappers can use it.
Which issue(s) this PR fixes:

Fixes #
Requirements:

[ ] uses conventional commit messages

[ ] includes documentation
[ ] adds unit tests
[ ] tested upgrade from previous version

Special notes for your reviewer:
Release note:
none

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

51 of 66 (77.27%)  changed or added relevant lines in 1 file are covered.
9 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.3%) to 78.801%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pkg/proto/nbcontract/v1/helper.go
51
66
77.27%

Files with Coverage Reduction
New Missed Lines
%

pkg/proto/nbcontract/v1/helper.go
9
72.46%

Totals

Change from base Build<PHONE_NUMBER>:
-0.3%

Covered Lines:
2498

Relevant Lines:
3170

💛  - Coveralls


observer-pods: adding timeout and grace_period

Added Timeout and GracePeriod to docs.
release PR
ci-tools PR
DPTP-3184
/cc @bbguimaraes

/ok-to-test
/lgtm
/hold

/test links

/test links
please?

Thank you.

/hold cancel
/override links

/override ci/prow/links
All GitHub 429's.


CRC: Collection Authorization Document

Title: Collection Authorization Document
Author: Michael Sena<EMAIL_ADDRESS>Joel Thorstensson<EMAIL_ADDRESS>Type: Standards
Category: CRC
Status: Idea
Created: 2020-05-26
Simple Summary
The collection authorization document stores keys that encrypt and decrypt entries in a specific collection (CRC-).

The collection authorization document is a component of the Interoperable Data Standard (CRC-), and is often linked from the sources document (CRC-).

Abstract
Motivation
Provide privacy by encrypting entries in a specific collection document, allowing a DID to selectively disclose those individualdata stores upon request.
Definitions
collection read keys: The symmetric keys used to encrypt entries in the collection document (CRC-). These keys are encrypted to the public encryption key of the DID.
Specification
V1
Schema
Example

This CIP might be deprecated in favor of a general Access Controller document.


Roll engine 797157bdecb5..f200ee13aa37 (3 commits)

git@github.com:flutter/engine.git/compare/797157bdecb5...f200ee13aa37
git log 797157bdecb5..f200ee13aa37 --no-merges --oneline
2019-08-07<EMAIL_ADDRESS>Roll src/third_party/skia b2c5a94b1c7a..1dac7bc29f2d (5 commits) (flutter/engine#10707)
2019-08-07<EMAIL_ADDRESS>Roll fuchsia/sdk/core/mac-amd64 from UeWpb... to yqu1p... (flutter/engine#10704)
2019-08-07<EMAIL_ADDRESS>Test perf overlay gold on Linux (flutter/engine#10703)
The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff (jimgraham@google.com), and stop
the roller if necessary.

Trybots failed. These were the failed builds: https://cirrus-ci.com/task/4915724680691712 , https://cirrus-ci.com/task/6674943285133312 , https://cirrus-ci.com/task/4774987192336384 , https://cirrus-ci.com/task/6604574540955648 , https://cirrus-ci.com/task/5197199657402368

Commit queue failed; closing this roll.


Trouble presenting VCs

Is this a regression?
Yes
Description
We have some integration tests which test the flow of VC Presentation. With a new version of the SDK (4) we are seeing it get stuck at a state PresentationVerificationFailed (expected PresentationVerified).stffp
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in
Our context - we're using AtalaPrism in a fully p2p environment. We're doing our best to limit the requirement for centralized hosting (does not help communities we're working with).
To that end, instead of running a "Holder Agent" and using it's http endpoints, we use agent.sendMessage as part of our flow.
Our problem seems to occur near/ around where our Holder accepts a VC Presentation Request. Here we prepare a presentation and send it:
agent.createPresentationForRequestProof(request, credential)
  .then(presentation => {
    const message = presentation.makeMessage()

    agent.sendMessage(message).catch(handleSendMessageError)

We signal (through our own p2p channels) from the Holder to the verifying peer that we've sent the presentation. The verifying peer then polls the Verifier Agent (over http :sigh:) expecting it to have
a) Received the presentation
b) Verified the presentation
It seems to do (a) but not (b).
I assume there has been some change and we need to sign presentations ourself... or ... I
Anything else?
I have been unable to find documentation for our use case (where we I guess use the SDK as an Holder Agent?). Am I missing any? I've read the Breaking Changes in the CHANGELOG (thanks for posting those :heart:) and there were some mentions of proof/ signing and Pollux, but I couldn't see from reading the source code if that meant I am supposed to do anything new?

Thanks, continuing this here : https://github.com/hyperledger-labs/open-enterprise-agent/issues/883

OK, re-opening this because I think this module is building presentations incorrectly


Flakey fork integration test on Linux

Bug Description
https://github.com/metalbear-co/mirrord/actions/runs/5484378173/jobs/9991994490
Additional Info
I suspect that in this case it's an actual bug in mirrord and not just in the test. Maybe there are more things we need to take care of on a fork.

I've tried running this program:
use std::path::PathBuf;

use libc::fork;

fn main() {
    unsafe {
        let pid = fork();
        match pid {
            -1 => panic!("forked!"),
            0 => {
                println!("current pid: {}", libc::getpid());
                libc::socket(libc::AF_INET, libc::SOCK_STREAM, 0);
            }
            _ => {
                println!("current pid: {}", libc::getpid());
                let file = std::fs::File::open(&PathBuf::from("/etc/host.conf")).unwrap();
                println!("file {file:#?}");
                libc::socket(libc::AF_INET, libc::SOCK_STREAM, 0);
            }
        }
        libc::waitpid(pid, std::ptr::null_mut(), 0);
    }
}

with this config:
{
    "feature": {
        "fs": {
            "mode": "read",
            "read_only": ".*\\.conf"
        }
    }
}

A few times with mirrord (main branch), and the forking seems to be working.
OS: EndeavourOS Linux x86_64
Kernel: 6.4.1-arch1-1

Have a question: the test app claims that socket is called, but I'm not seeing it?
/// This program forks, and the child process calls `socket`.
/// It is used to verify that hooks are handled in a child socket after a fork.
int main() {
  pid_t pid = fork();
  if (!pid) {
    const char path[] = "/etc/host.conf";
    open(path, 0);
  }
  waitpid(pid, NULL, 0);
}

the test app claims that socket is called, but I'm not seeing it?

@meowjesty sorry, that's a mistake, I probably wanted to call socket and then changed my mind and called open. Should say open.

Probably fixed now. Reproduces at the pointed commit. At current main it passed 1000 times :+1:


add backfaceVisibility to ImageStylePropTypes

to eliminate to yellow box.
ViewStylePropTypes also has this prop.
https://github.com/facebook/react-native/blob/0a3694ce48be8991839c42aab2586202a12d43aa/Libraries/Components/View/ViewStylePropTypes.js

@facebook-github-bot shipit

@mkonicek shipit broken here?

Seems like a transient error.
@facebook-github-bot shipit


Documentation Bug: Share ViewModels between multiple destinations

https://composedestinations.rafaelcosta.xyz/common-use-cases/providing-viewmodels/#share-viewmodels-between-multiple-destinations
The sample code currently is:
@Composable
fun AppNavigation(
    activity: Activity
) {
    DestinationsNavHost(
        //...
        dependenciesContainerBuilder = { //this: DependenciesContainerBuilder<*>

            // 👇 To tie SettingsViewModel to "settings" nested navigation graph,
            // making it available to all screens that belong to it
            dependency(NavGraphs.settings) {
                val parentEntry = remember(navBackStackEntry) {
                    navController.getBackStackEntry(NavGraphs.settings.route)
                }
                hiltViewModel<SettingsViewModel>(parentEntry)
            }

            // 👇 To tie ActivityViewModel to the activity, making it available to all destinations
            dependency(hiltViewModel<ActivityViewModel>(activity))
        }
    )
}

However, for dependency(hiltViewModel<ActivityViewModel>(activity)), activity needs to be a ViewModelStoreOwner. Activity does not satisfy that, but FragmentActivity does, as would ComponentActivity (the superclass of FragmentActivity). It feels like the function signature should be fun AppNavigation(activity: ComponentActivity).
My apologies if I am missing some nuance here, and many thanks for writing this library!

Nice catch, thanks :)
Should be fixed!
Just as a side note, each page has a "edit this page" button at the bottom which lets you easily create a PR with the change :)
Each page is just markdown, so it's easily changed by anyone!

@commonsguy please let me know if you find anything else.
Documentation is definitely needing some attention, but I'm focused on v2 which will change things anyway, so I'll make sure to update and add everything for v2!


add support for discovery URLs without auth prefix (#179)

add support for discovery URLs without auth prefix (#179)

Summary
Keycloak 17 (Quarkus distribution) removes the default auth context path and uses no context path. Gatekeeper requires auth to be available, otherwise it determines the configuration as wrong and raises an error.
The official Keycloak migration guide properly states this fact: https://www.keycloak.org/migration/migrating-to-quarkus.
This bugfix will allow discovery URLs with and without auth prefix to be accepted by Gatekeeper.

Type
[x] Bug fix
[] Feature request
[] Enhancement
[] Docs
Why?

This fix is required to support Keycloak 17+ deployments (Quarkus distribution).
How to try it?

Test with Keycloak 17+.
Documentation

[ ] My change requires a change to the documentation or CHANGELOG.
[ ] I have updated the documentation/CHANGELOG accordingly.

this is not enough to fix as there are additional calls to keycloak by underlying library..., please see my comments in issue

@p53 Ah ok, I didn't get that, thank you for your response.


[Snyk] Security upgrade io.streamnative:pulsar-broker from <IP_ADDRESS> to <IP_ADDRESS>

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to fix one or more vulnerable packages in the `maven` dependencies of this project.
Changes included in this PR

Changes to the following files to upgrade the vulnerable dependencies to a fixed version:

pom.xml

Vulnerabilities that will be fixed
With an upgrade:

Severity
Priority Score (*)
Issue
Upgrade
Breaking Change
Exploit Maturity

379/1000  Why? Has a fix available, CVSS 3.3
Creation of Temporary File in Directory with Insecure Permissions SNYK-JAVA-COMGOOGLEGUAVA-5710356
io.streamnative:pulsar-broker:  <IP_ADDRESS> -> <IP_ADDRESS>
No
No Known Exploit

539/1000  Why? Has a fix available, CVSS 6.5
Denial of Service (DoS) SNYK-JAVA-IONETTY-5725787
io.streamnative:pulsar-broker:  <IP_ADDRESS> -> <IP_ADDRESS>
No
No Known Exploit

(*) Note that the real score may have changed since the PR was raised.
Check the changes in this PR to ensure they won't cause issues with your project.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings
📚 Read more about Snyk's upgrade and patch logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Creation of Temporary File in Directory with Insecure Permissions
🦉 Denial of Service (DoS)

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Added "onDelayedMouseleave" directive

The "delayedMouseLeave" directive has been renamed in Umbraco 7.4 to "onDelayedMouseleave" so I have added the new directive and left the old directive in there for backward compatibility reason.

Thanks @BatJan! (I've assigned to @mattbrailsford for review)

Seeing what HQ have to say as this is a breaking change.

Cool - Discovered it while working on another property editor highly inspired by nested content and could not wrap my head around why it did not work - Had a go in 7.3.7 and it worked fine...so then I had a closer look :)


parse inline tags as block

is it possible to add an option that can be controlled manually, as "pretty" option, to be able to render inline elements as block?
my suggestion:
{
  "inlineAsBlock": true | false | undefined
}

for example:
"inlineAsBlock": false or undefined --- will not affect and render like this ▼

Lorem ipsum dolor. maxime, dolores.</

and "inlineAsBlock": true --- will render like this ▼

		Lorem ipsum dolor.
		maxime, dolores.</

changes are also needed in
pug/lib/index.js

Changes Unknown when pulling c0f263dcd728c40e916143129848a7c0567aead9 on dutchenkoOleg:patch-1 into ** on pugjs:master**.

See pugjs/pug#2363
Also, this code overwrites the inlineTags field for all future calls of the parser, not just when the option is passed.


[Feature] Apache Airflow DAG to run finnish_museums.py

Problem Description

The script at src/cc_catalog_airflow/dags/provider_api_scripts/finnish_museums.py needs to be run via an Apache Airflow DAG.
Solution Description

Use the DAG factory to create the appropriate DAG.  It should run monthly.  See src/cc_catalog_airflow/dags/brooklyn_museum_workflow.py for an example

Context:  #532

Taking it up @mathemancer


Add size variations for dropdowns in v4

Same spirit as https://github.com/twbs/bootstrap/issues/17610.
I'll need to apply font-size to resize the dropdown component to their respective button component (especially when it's resized from the default).
If the elements are buttons, I can workaround by applying btn-lg or btn-sm.

Similarly, no plans for this for content within dropdowns.


[Robots.txt] Deduplicate robots rules before matching

This PR request deduplicates the  (dis)allow rules during sorting and before matching. This also applies to duplicates resulting of equivalent statements with and without percent-encoding and now normalized to a canonical form, cf. #389.
The Javadocs of SimpleRobotRules are also updated with references to RFC 9309.

Thanks @sebastian-nagel


Kafka connect is missing helm configurations

Kafka-connect deployment doesn't allow to set/override: security context for pod & container, running as root.
Also it's missing some of the recommended labels described in https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/#labels

Pull request for this: #652


Data set related issues

Hi,
What should I fill in after the ”dataset_type =  “ equation in this ”configs/IBL-NeRF/common.txt“ document?
If I want to train pictures of the kitchen.
There seems to be no "/config/IBL-NeRF/kitchen.txt" file in your file.
Thank you again for your excellent work!

Thank you for your reporting.
Since we support the "mitsuba" dataset type only in the current version, the dataset_type should be mitsuba.
I fixed the default value of config_parser.py and the corresponding config file anyway! :)

Thank you for your suggestions and help!


Exceeding GH API rates

Using GitHub API without being authenticated exposes us to API rate limit issue. This issue initially took place during local development when repeatedly running unit tests, precisely the TestBuildAnsibleInventoryFile test suite.
The following may appear:
API rate limit exceeded for xx.xx.xx.xx. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

Link to their documentation page here.

Closing this issue since we are no longer using the GitHub API with the new Go code.


Support for pnpm

When using this module with pnpm, following error occurs:
> nuxt-module-build --stub && nuxi prepare playground
│ 'nuxt-module-build' is not recognized as an internal or external command,
│ operable program or batch file.
│  ELIFECYCLE  Command failed with exit code 1.
│  WARN   Local package.json exists, but node_modules missing, did you mean to install?

have you installed dependencies?

Yes, added module to nuxt and package.json then ran pnpm i and this error pops up.

I have no idea how are you installing this module, but it is working in StackBlitz: https://stackblitz.com/edit/nuxt-starter-gd81vx?file=package.json

Closing as working on web container, must be issue on local system. Sorry for bothering you!
P.S thanks for awesome work!

it is weird, it is running the postinstall script of the module, I'll fix it in the next patch (0.4.6) in a few minutes...

it is weird, it is running the postinstall script of the module, I'll fix it in the next patch (0.4.6) in a few minutes...

But more weird it worked in stackblitz.
Thanks


Updated Code to Use NeuroAnalzyer.jl

Hey @Datseris,
So, this PR introduces a few new updates:

It uses NeuroAnalyzer.jl now to load the patient sample data
I created a new convenience function to process data
The complexity measures now are computed over $\delta$, $\theta$, $\alpha$, $\gamma$, and $\beta$ brainwave bands
I refreshed the plot with the new bands

The only problem I am having that I am not quite sure how to address is that the current version of NeuroAnalyzer requires a minimum compat entry of Wavelets to be 0.9. ComplexityMeasures.jl does not have that lower bound and as a result gets downgraded to 2.8.0 when NeuroAnalyzer is within the same Project environment. I will mention that I forked ComplexityMeasures.jl and added the 0.9 compat entry for Wavelets alongside 0.10 and the tests did pass in this fork.
What do you think we should do here?

I'll also mention that once we figure out how to handle this merge and you review it, I'll be able to do final edits for the reviewer and then we shall be done with all necessary paper edits.

I'll add 0.9 Wavelets in the next release of ComplexityMeasures.jl. Using 2.8 is a no-go unfortunately.

In the complexity measure estimation, you removed the "F" bar, that uses the input timeseries without any decomposition. Please revert that, I'd like to have the Full bar as well.

Hey @Datseris ,

I'll add 0.9 Wavelets in the next release of ComplexityMeasures.jl.

Great! I found the commit where you added that here: https://github.com/JuliaDynamics/ComplexityMeasures.jl/commit/223eaf1e5c20ff34e439d5930bcdd5caa2fda476
I am using that temporarily until you release the new version. Thanks!

Hey @Datseris , I think this is nearly complete. Here's the story:

Brought back the "F" bar
Slimmed down the code since we didn't use the other examples
Updated the project environment
Redid the project toml and submitted the manifest

Otherwise, I have added the main branch of ComplexityMeasures.jl at the moment as I can't seem to pull down 3.7.0 from the general registry. I am in the process of adding compat entries as well

Ok, @Datseris , can you do a final review here? This is all set now with a proper Manifest, Project.toml, and fully working example. Two quick additional things:

The "F" signal is the raw brain signal that has been passed through a denoising filter -- otherwise it has not been decomposed or modified in any way
I am not sure how that FFTW extra dependency was brought in. I removed it.

Let me know what you think and if you want any more edits! Thanks George!

Fixed the compat entries @Datseris ! I ended up having to completely reset the environment and add in packages one by one so as to not have any degradations or weird compat conflicts. All is ship shape now! How does it look?

Perfect, thanks!


Fix inverted coords when img_key=None

Fix #1059 and #1148 and replace #1078

An alternative solution to this would be pyplot.imshow(..., origin='lower')
https://github.com/theislab/scanpy/blob/master/scanpy/plotting/_tools/scatterplots.py#L301
by default pyplot.imshow(..., origin='upper') which makes y-axis flipped compared to the scatterplot

@giovp conditionally doing that would probably be cleaner and wouldn’t involve flipping the data right?

An alternative solution to this would be pyplot.imshow(..., origin='lower')
https://github.com/theislab/scanpy/blob/master/scanpy/plotting/_tools/scatterplots.py#L301
by default pyplot.imshow(..., origin='upper') which makes y-axis flipped compared to the scatterplot

Good point, but if img_key=None shouldn't we assume that there is no image? So nothing to pl.imshow.
Now the point would be:

passing a dummy array as "image" and then plot the spots as circles, so keeping the normal behavior
plot the spatial data as a simple scatterplot.

My reasoning is that, since there is no image to show:

we probably should assume that also scalefactors are empty.
the correct size of the spots (given by scalefactors, and plotted with circles) does not matter anymore, since their size is only important in the presence of an image in the background, so a normal scatterplot would do.
If the user does not want an image in the background, but wants to retain the size of the spots (because scalefactors are not empty), then alpha_img=0 should do the job.

Because of these reasons, I would go for the second option above, passing the coords as basis to the scatterplot fun.
Probably an even better option would be to plot the spots as hexagons, as originally suggested by @flying-sheep , but would wait for that after the plotting module is refactored.

@giovp conditionally doing that would probably be cleaner and wouldn’t involve flipping the data right?

The reason for flipping is that the coords from space ranger are given with upper origin
sc.pl.embedding(adata_spatial, basis = "coords")

Happy to discuss and change the behavior, I could have missed a crucial point.
And thank you @vitkl for feedback, we are in dire need of spatial transcriptomics scanpy users !

@giovp, I've thought about this a bit more and think it should be treated as an image rather than a scatterplot. This is so future updates to the spatial plotting function (like plotting hexagons) won't require a special case here.
If you can't find a scale factor, could we just say it's 1?

I think it makes sense. I will open a new PR cause I'll have to change the test as well.

Closing, see #1217


Print hash in CMutableTransaction::ToString

Keep in line with CTransaction::ToString. Truncates the hash at 10.

Merged via https://github.com/dashpay/dash/commit/2491e2af3ef098abf3e99c821cfbe2f80ba081b0
Many thanks!


Refactor TransformPost handling

Sample log:
|move|p1a: Ditto|Transform|p2a: Cacturne
|-transform|p1a: Ditto|p2a: Cacturne
|-endability|p1a: Ditto|Limber|[from] move: Transform
|move|p2a: Cacturne|Seed Bomb|p1a: Ditto
|-resisted|p1a: Ditto
|-damage|p1a: Ditto|0 fnt
|faint|p1a: Ditto
|
|win|p2
...
Battle: p1: error: Error: Rejected reveal() with name=transform and maxpp=16: Moveset is already full (moves: seedbomb, swordsdance, substitute, suckerpunch)

This error was thrown while handling a transformPost event, which contained the original Ditto's moveset rather than Cacturne's. Since the game was ending, a request PSMessage wasn't sent before this, causing the transformPost event to be based on the previous request containing the Ditto moveset.
Rename the transformPost BattleEvent to updateMoves, and emit it via the PSBattle for every BattleDriver#halt(command="decide") rather than directly after a transform event. This should reset PSBattle's #lastRequest field once emitted in order to prevent the message from being translated twice. With this the BattleDriver (or the BaseContext) should handle the event similar to transformPost except it asserts/reveals the moveset every turn.

Forgot to account for struggle.


Sorting: Sort given 0's , 1's and 2's in an array

Description
This code will sort all the given 0's , 1's and 2's in a given array in C++.
Time complexity of the code: O(n)
Domain
Competitive Programming
Type of Contribution
Documentation
Code of Conduct

[X] I follow Contributing Guidelines & Code of conduct of this project.

/assign


Format only changed files

closes #650

I love the output this gives
❯ time ./b format
Cannot find eslint, run `./b yarn` first if you need to format typescript files
Formatting tools/format.py with isort and black
All done! ✨ 🍰 ✨
1 file left unchanged.
./b format  0.06s user 0.05s system 17% cpu 0.615 total

vs
❯ time ./b format
...
./b format  0.09s user 0.06s system 3% cpu 4.536 total


THEEDGE-1998 create common to manage the identity

Description
Create a common file to manage the identity data.
Type of change
What is it?

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Documentation update
[ ] Tests update
[x] Refactor

Checklist:

[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[x] I run go fmt ./... to check that my code is properly formatted
[x] I run go vet ./... to check that my code is free of common Go style mistakes

/retest

/retest


Don't trust the external cache when looking for field descriptors

When looking for field descriptors for a typeref, we should iterate over every image info available, even those that the cache claimed to have processed, as a last ditch effort.
rdar://114567246
(cherry picked from commit a6be181ae5fe1d388624338ff1a591b615052a66)

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves #NNNNN, fix apple/llvm-project#MMMMM.

@swift-ci test


Core compilation breaks in Typescript 3.7.2

node_modules/@material-ui/core/Portal/Portal.d.ts:2:10 - error TS2440: Import declaration conflicts with local declaration of 'PortalProps'.

2 import { PortalProps } from '../Portal';
           ~~~~~~~~~~~

Found 1 error.

Please provide a full reproduction test case. This would help a lot 👷 .
A live example would be perfect. This codesandbox.io template may be a good starting point. Thank you!

@oliviertassinari this is related to compilation, sandbox is not really useful
I'll add the steps to reproduce

@oliviertassinari pls close the issue, it was fixed in https://github.com/mui-org/material-ui/pull/17676

💃


Verify CSV status

Hello!
While creating a policy using the web ui in RHACM, I have the option to add a CSV status policy where the policy is in charge to monitor that the Operator CSV is in Succeeded status, the autogenerated yaml file looks like:
    - complianceType: musthave
        objectDefinition:
          apiVersion: operators.coreos.com/v1alpha1
          kind: ClusterServiceVersion
          metadata:
            namespace: openshift-compliance
          spec:
            displayName: Compliance Operator
          status:
            phase: Succeeded
            reason: InstallSucceeded

I'm trying to use this plugin to simulate that behavior by defining the next:
compliance-operator
├── kustomization.yml
├── operator
│   ├── base
│   │   ├── csv-status.yaml
│   │   ├── kustomization.yaml
│   │   ├── namespace.yaml
│   │   ├── operator-group.yaml
│   │   └── subscription.yaml
│   └── overlays
│       └── default
│           ├── kustomization.yaml
│           └── patch-channel.yaml
└── policyGenerator.yaml

The content of compliance-operator/kustomization.yml is:
generators:
- ./policyGenerator.yaml
commonLabels:
  open-cluster-management.io/policy-set: install-operators
commonAnnotations:
  argocd.argoproj.io/compare-options: IgnoreExtraneous

Then, compliance-operator/policyGenerator.yaml
apiVersion: policy.open-cluster-management.io/v1
kind: PolicyGenerator
metadata:
  name: policy-install-compliance-operator
placementBindingDefaults:
  name: binding-policy-install-compliance-operator
policyDefaults:
  namespace: my-policies
  categories:
    - CM Configuration Management
    - CA Security Assessment and Authorization
  controls:
    - CM-2 Baseline Configuration
    - CA-2 Security Assessments
    - CA-7 Continuous Monitoring
  standards:
    - NIST SP 800-53
  policyAnnotations:
    policy.open-cluster-management.io/description: "Installs Compliance Operator"
  placement:
    clusterSelectors:
      matchExpressions:
        - key: environment
          operator: In
          values:
            - production
            - dev
            - qa
        - key: vendor
          operator: In
          values:
            - OpenShift
  policySets:
    - install-operators
  remediationAction: enforce
  severity: high

policies:
- name: policy-install-compliance-operator
  disabled: false
  manifests:
    - path: operator/overlays/default
policySets:
- name: install-operators
  description: Install all the required Operators

Then, compliance-operator/operator/overlays/default/kustomization.yaml
kind: Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1

resources:
  - ../../base

patches:
  - target:
      kind: Subscription
      name: compliance-operator
    path: patch-channel.yaml

We apply the patch, correctly
So, compliance-operator/operator/overlays/default/patch-channel.yaml content is:
- op: replace
  path: /spec/channel
  value: stable

Then, compliance-operator/operator/base/kustomization.yaml content is:
kind: Kustomization
apiVersion: kustomize.config.k8s.io/v1beta1

resources:
  - namespace.yaml
  - operator-group.yaml
  - subscription.yaml
  - csv-status.yaml

And the csv-status.yaml content is:
---
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
  namespace: openshift-compliance
spec:
  displayName: Compliance Operator
  status:
    phase: Succeeded
    reason: InstallSucceeded

Note, that I'm not specifying any metadata.name as that is how the RHACM web ui autogenerate it and that is the way to verify the status because the name is also autogenerated.
So, when I put all together, and run the kustomize build command, I get this error:
kustomize build --enable-alpha-plugins > compliance-operator-policy.yaml
error generating policies from the PolicyGenerator file '/var/folders/l0/vvhr89r17f170c_737kjmny40000z8/T/kust-plugin-config-246562119': failed to process provided kustomize directory 'operator/overlays/default': accumulating resources: accumulation err='accumulating resources from '../../base': 'PATH/components/policygenerator/apps/compliance-operator/operator/base' must resolve to a file': recursed accumulation of path 'PATH/components/policygenerator/apps/compliance-operator/operator/base': accumulating resources: accumulation err='accumulating resources from 'csv-status.yaml': missing metadata.name in object {{operators.coreos.com/v1alpha1 ClusterServiceVersion} {{ openshift-compliance} map[] map[]}}': must build at directory: 'PATH/components/policygenerator/apps/compliance-operator/operator/base/csv-status.yaml': file is not directory
Error: failure in plugin configured via /var/folders/l0/vvhr89r17f170c_737kjmny40000z8/T/kust-plugin-config-246562119; exit status 1: exit status 1

As you can see, the error is that I haven't defined a metadata.name object, but I don't need it/want it.
What options do I have to get a similar behavior as I got from the RHACM web ui?
Thank you

Hi @luiscachog! This is definitely a limitation of passing the manifest through Kustomize that it validates the YAML as a valid Kubernetes object. Currently the way around this that I can think of offhand (which, I'll admit, isn't all that elegant) is to leave the name in the YAML for Kustomize and then use a patch in the kustomization.yaml to remove the name from the result, something like this (you might need to adjust the indices depending on how the array is ordered):
patches:
- target:
    group: policy.open-cluster-management.io
    version: v1
    kind: Policy
    name: policy-install-compliance-operator
  patch: |-
    - op: remove
      path: /spec/policy-templates/0/objectDefinition/spec/object-templates/3/objectDefinition/metadata/name

I'll also note that there's an RFE in progress to report status as NonCompliant if it's provided in the objectDefinition for an enforced policy and doesn't match the object's status on the cluster, which may help here in the future once it's implemented: https://issues.redhat.com/browse/ACM-7020

@luiscachog Now that https://issues.redhat.com/browse/ACM-7020 is implemented, is it okay to close this issue?

Closing as there has been no updates. Feel free to reopen if this issue is still relevant.


New package: EuSoft.Ting.EN version <IP_ADDRESS>

[X] Have you signed the Contributor License Agreement?
[X] Have you checked that there aren't other open pull requests for the same manifest update/change?

[X] Does your manifest conform to the 1.4 schema?

Microsoft Reviewers: codeflow:open?pullrequest=https://github.com/microsoft/winget-pkgs/pull/110377&drop=dogfoodAlpha

@wingetbot waivers Add Validation-Domain


Error: The "docs" parameter must be an array on 'BulkImportAsync'

Getting the following error when performing 'BulkImportAsync':

"Microsoft.Azure.Documents.DocumentClientException : Partition range id 0 | Failed to import mini-batch. Exception was Message: {"Errors":["Encountered exception while executing function. Exception = Error: The "docs" parameter must be an array. Got "object".

This is strange because array of poco objects is passed as 'docs' param according to documentation.
Quote from official docs:

"5. The application invokes the BulkImportAsync API. The .NET library provides two overloads of the bulk import API - one that accepts a list of serialized JSON documents and the other accepts a list of deserialized POCO documents."

BTW the second overload that accepts IEnumerable of strings also throws the same error.
Version used: 2.1.0-preview2

BTW we get this same error even when using second overload of 'BulkImportAsync' that accepts 'IEnumerable' as docs param.

Hello @mkravchuk7, the Bulk Executor performs certain translations under the hood and thus the IEnumerable of documents is deserialized into an object of a different type. Because the source and destination types aren't the same, using "Auto" TypeNameHandling is always going to deserialize the IEnumerable input into a single object with "type" and "value" specified. This changes the expected object in the internal implementation of the BulkExecutor library, leading to this error.
In this scenario, it is recommended to not have a custom serializer for the DocumentClient object being used to instantiate the BulkExecutor.

So if I pass valid  'JsonSerializerSettingssettings' on 'DocumentClient' creation and use Bulk Executor it will throw some cryptic error? I see that internal implementation doesnt permit this setting but how the client of this lib should know about this? Would be nice to at least have more descriptive error in this case.


Add a new feature or application

Add new features/ application to the project :
Steps -

make a folder for relevant js,CSS and HTML file
make changes to the index.html file :
Make a div with class="card" inside the body inside the div block :
a. Add the image of the page added
b. Add the name of the application in a h2 tag
c. Add button for navigation

I want to work on this issue , please assign this to me

I would like to work on that issue under JWOC.

Hello, @Priyanshi662  I would like to work on this , please assign it to me.

Hii I am willing to pursue this issue under JWoC'24

@aniket-1206  updates? its been 4 days

Hi @Priyanshi662 , i am still working on it , today is forth day , by EOD i will send a PR

@aniket-1206  okay!

@Priyanshi662 I want work on this issue to make a new Application  under JWOC. kindly assign this issue to me

@Priyanshi662 please assign this issue to me under JWOC as i already requested for this issue last week. Thank You.


[Game Studio] Recent files property update notification fixed

This PR will be fixed the issue #195.
My first commit it's about the problem with the UI update on editor when you clean the list of recent projects, apparently it's not possible to use an ObservableCollection with value converter Take, I don't know why this, because to use a converter is the best solution as informed here Creating a WPF ItemSource Length Filter Converter. I had tried many different solutions using it, but none works.

Thanks! True that Converter often have lot of limitations...
Let's keep it simple the way you did (esp. since this MRU list is rarely updated) rather than using obscure WPF tricks, looks good to me!


Upload-Concat header not in Access-Control-Allow-Headers

I tried to make use of the concatenation extension of the tus protocol to improve high-ping transfer speed and ran into an issue with CORS making the final Upload-Concat call from the browser. The error that it gave me was:
Access to XMLHttpRequest at 'http://<IP_ADDRESS>:1080/files/' from origin 'http://<IP_ADDRESS>:8080' has been blocked by CORS policy: Request header field Upload-Concat is not allowed by Access-Control-Allow-Headers in preflight response.

Fixed in your PR #215, thanks!


Loi markers get duplicated after entering and exiting the Data Collection Flow

Fixed in https://github.com/google/ground-android/pull/1829


Invalid Items on Community Partner Form

Per Client Feedback:
The “Register: A New Community Partner “, accepted the entry with numeric values for “State” and “Country” with same Primary and secondary mission value. No runtime error happened. ( Test2)

There are packages in Django for countries if we want a drop-down there. For state, it's good enough to validate the correct char set.

looks like this is a duplicate of #1177 . @pallavi0902 @jerrodanzalone @caadler @Ruthie2018 please look into this.

This is a duplicate of #1174, except this also includes a check for primary mission.
As a side-note, #1177 is a similar ticket but for Campus Partners.


add chart-unit back in

I'm not sure how to proceed with adding chart-unit back in.
The diagrams suite of libraries are in lts-9.9 but not in nightly.  My numhask 0.1.* libraries are in nightly but the 0.0.* ones are in lts-9.9.
Could we add:

palette-<IP_ADDRESS>
SVGFonts-<IP_ADDRESS>
diagrams-svg-<IP_ADDRESS>
diagrams-lib-<IP_ADDRESS>
diagrams-core-<IP_ADDRESS>
diagrams-solve-0.1.1
dual-tree-0.2.1
svg-builder-<IP_ADDRESS>

to the nightly build,
or bump lts-9 versions to:

numhask-0.1.2
numhask-range-0.1.1

Yes, adding a package to the nightly build will implicitly pull in all of its transitive dependencies. I just had to add dual-tree and diagrams-solve to the "skipped-tests" section, since their testing dependencies are out of date. So chart-unit should be present in nightly-2017-10-20 and beyond if all goes well.
As for lts9, we prefer to stick to minor version bumps for the entire series, thus (ideally) ensuring backwards compatibility when upgrading from lts-9.x to lts-9.(x+1). So chart-unit will continue in lts9 on version 0.4.*, and numhask and numhask-range on version 0.0.*.

perfect, thanks!


Effective training of chatter bot

hello all ,
 how can we train the chatterbot effectively to achieve the good response from bot.

can you give suggestions to improve the quality of response from chatbot.

how can we train the chatterbot effectively to achieve the good response from bot.

A high amount of confidence. will give accurate response from bot. To set threshold like this
bot = ChatBot(
    'Default Response Example Bot',
    storage_adapter='chatterbot.storage.SQLStorageAdapter',
    logic_adapters=[
        {
            'import_path': 'chatterbot.logic.BestMatch'
        },
        {
            'import_path': 'chatterbot.logic.LowConfidenceAdapter',
            'threshold': 0.90,
            'default_response': 'I am sorry, but I do not understand.'
        }
    ],
    trainer='chatterbot.trainers.ListTrainer'
)

thanks for the reply .
Actually i want to know about  HOW TO TRAIN a basic chatbot with more amount of data.

@Hemanth2396, you should just create a dataset (dialogue corpus) and format it to one of the using formats to training.
There are list of state-of-the-art corpuses for training chatbots:

@7633 Can you give a detailed explanation about this, If you have tried and succeeded in doing this?

Actually i want to know about  HOW TO TRAIN a basic chatbot with more amount of data.

@Hemanth2396 and @anilneeluri
For large amount of data, it is recommended to write your corpus file. I think the below Q&A will answer your questions.

How to write a corpus file?
What is training and what are different training class are available?

1. How to write a corpus file?
Chatterbot does support both YAML  and JSON format in question and answers. You could find a large number of corpus files here https://github.com/gunthercox/chatterbot-corpus/tree/master/chatterbot_corpus/data.
Example
- - text: Hello, how are you doing today?
  - text: I am doing well, thank you.
- - text: I cannot find my keys.
  - text: Where was the last place you remember having them?

2. What is training and what are different training class are available?
Training is the process involves loading example dialog into the chat bot’s database. Chatterbot does support different training classes to train your bot.

So this is not an easy thing to complete. We don't usually get the data set in the yaml format i.e the question and answer format and practically is it possible to get the large amount of data in that format.

You could write your own training class for example UbuntuDialogCorpus and Twitter Training classes take a look exists training classes https://github.com/gunthercox/ChatterBot/blob/master/chatterbot/trainers.py

I tried writing this on the json file:
{"categories":"test_json",
"conversations": {"- - text": "Hello, how are you doing today?",
"  - text": "I am doing well, thank you.",
"- - text": "I cannot find my keys.",
"  - text": "Where was the last place you remember having them?"}}
It doesn't send an error on the console but the chatbot doesn't know the answers when say hello or when I ask her about the keys.

Try this:
{     "conversations": [           [                 "Hello, how are you doing today",                 "I am doing well, thank you"           ],          [                 "I cannot find my keys",                 "Where was the last place you remember having them?"          ]     ] }
This should be the proper JSON structure for training


WIP Beginnings of a full tutorial.

Err, isn't this the same as my renaming of "README" to "README.md" ? From the PR, I can't tell if this has any more actual content.

There's slightly more content, but really it's so I actually finish it this time.

nice to see more content, looks good to me 🍔

:+1:


Conflicting info on number of refreshes

In your table you state that refreshes are limited to 48 a day. Later in the same page is stated that: "The number of refreshes isn't currently restricted."
The limit of 48 refreshes per day is only in the service's UI, you can trigger more than 48 refreshes via the API or Power Automate.

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

ID: 86beb6b6-cc13-ca11-8caa-ddd4b0c0fe29
Version Independent ID: 86beb6b6-cc13-ca11-8caa-ddd4b0c0fe29
Content: Power BI Premium Per User - Power BI
Content Source: powerbi-docs/enterprise/service-premium-per-user-faq.yml
Service: powerbi
Sub-service: powerbi-premium
GitHub Login: @KesemSharabi
Microsoft Alias: kesharab

Thanks for your comment, @otravers. This issue has been assigned to the doc author for review.

Hi @otravers,
I'm checking with the product team whether the PPU refresh rate can be higher than 48 per day when using APIs.
Thanks,
Kesem

Hi @otravers,
After checking this with the engineering team I can confirm that you're correct, using APIs or Power Automate you can override the '48 per day' limit.
We'll consider adding this to the document.
Thanks,
Kesem


Need to create or obtain source RPM

We would be able to get the RPM from an official, supported Repo like "Fedora Project" or "Red Hat." It looks like there is no near-term solution for that (see #6454, #1098). So as an alternative, we would like to obtain the src RPM, so that we can create the RPM manually to be available on our local, trusted server.
I saw that there was previously a package.sh file at the top-level of the project for creating an RPM, but that file was removed in 2015. Was that script moved to another public project, so that we can use it to build our own RPM? Or is the source RPM available somewhere?

I found the 'releng' directory and its associated scripts on the non-master branch (e.g. version 1.8). That seems to have the scripts that we are looking for to generate our own RPMs.


Changed age to be a standard scalar variable in spec and in Scala.

This resolves https://github.com/openworm/tracker-commons/issues/39 at least for the spec and Scala.  Python and schema not fixed yet.

I am going to assume this is okay and merge it.


Dynamic background colors

Prerequisites

[x] I have read and understand the CONTRIBUTING guide
[x] I looked for duplicate issues before submitting this one

Description
using v2 of oh-my-posh i used different backgroundcolors to indicate the status of the local git repo

Is this still possible via envvar or is it static only?

That functionality is available when enabling colors on the git segment. See here for more info.

Oh i'm so blind sorry.. Thank you so much!
Keep up your great work


Feature Request: Hotkeys for Toolbar buttons

Hi there,
As a user I would be delighted if I could switch the tools using hotkeys (like p for "Pan", z for "Zoom", r for "Resetetc. or something similar) from keyboard as compared to searching and then clicking on the particular tool button.
Do let me know if find this useful as well.
Thanks,
A delighted pandas_bokeh user.

HI @codebraker,
this would be indeed interesting, however there is currently no standard mechanism to make this work in Bokeh to my knowledge, see https://discourse.bokeh.org/t/keyboard-shortcuts-keybindings-for-plot-tools/2222/3.
Best Patrik


add commands sns_canister_summary and nervous_system_parameters

Adds three new commands to sns-quill:

sns-canister-summary: prints info about the sns canisters.
nervous-system-parameters: prints the nervous system parameters
sns-summary: Intended to give an overview of the sns, for now it calls to both of the previous commands.

Looks like clippy is failing. I have this as an alias in my .bashrc. It should surface all the errors:
cargo clippy --locked --all-features --tests --benches -- -D warnings -D clippy::all -D clippy::mem_forget -A clippy::redundant_closure -A clippy::too_many_arguments -C debug-assertions=off

Looks like clippy is failing. I have this as an alias in my .bashrc. It should surface all the errors:
cargo clippy --locked --all-features --tests --benches -- -D warnings -D clippy::all -D clippy::mem_forget -A clippy::redundant_closure -A clippy::too_many_arguments -C debug-assertions=off

Great start! I like where it's going. In addition to all the comments, can you add the appropriate tests in the tests/ directory?


Form Wizard Does not create if_selected_then_work_type

Edit a current incident.
Add a new work type, "Landslide".
Before saving (and this is probably the issue), also add children to "Landslide," like "Area Covered in Mud" and "Mud Depth."
Save the form.
if_selected_then_work_type remains null.

Confirmed this is a generalized issue.
Current workaround: Click the "Edit" button and manually add the work_type.


Added compatibility with Python3 and Robot Framework 3

Added compatibility with Python3 (see #5 ).
Minimum requirement for Robot Framework is set to 3.0.

I've updated the PR with suggested changes and have also bumped version to 0.7.0, as requested.


Frame's setCut doesn't take into account x (cutX) and y (cutY) attributes

// Phaser v3 Beta 13
When I set a sprites crop the x  & y params don't have any effect. Maybe not the right method?
sprite.frame.setCut(10, 10, 30, 30)

// textures/Frame.js
    setCut: function (x, y, width, height)
    {
        this.cutX = x;
        this.cutY = y;

        this.cutWidth = width;
        this.cutHeight = height;

        return this.updateUVs();
    },

Yes, this is a bit of a legacy method actually. Will have a chat with the team and see if it's worth keeping (and fixing), or just removing.

What's the best way to crop a sprite texture it in v3?

Ideally using a mask, but for a simple crop that may be overkill, so I've added this to the list to look at soon.


Increase font size for Red Error Screens

moar readability :)

Agreed. It's not that useful now. Closing this as a dupe of https://github.com/flutter/flutter/issues/3091


Latest docker

Latest docker would not work due to https://github.com/docker/docker/issues/25176
Need to either reinstall / refresh docker data, or move old graph driver to the new path.
Creating a FS link (joint) will also work.

@sitano Thanks for the deep investigation! The change is both in latest docker and also in the just released docker 1.12.0 available at GitHub release page https://github.com/docker/docker/releases/tag/v1.12.0 and there the Windows 64bit zip: https://get.docker.com/builds/Windows/x86_64/docker-1.12.0.zip
As Windows is still a tech preview we have to ship around these obstacles.
The symlink/joint is a good idea that could be part of the update script to fetch the nightly version.
I think in a few weeks the official download of the docker exes would be more up to date and this migration step is obsolete by building a new packer basebox again.

@sitano There are two script to update docker engine to nightly or 1.12.0 in the repo renaming the directory to image\windowsfilter. :-)


Run button is now Submit

In the "Run the pipeline" section, the instructions ask you to select "Run" from the top of the canvas, but there isn't a run option.  There is however a "Submit" option.  From what I can tell, the Submit button is the Run button.  The instruction needs to be updated to match the current interface.

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

ID: 0c40f439-613c-e09d-9d5a-8c6001c47417
Version Independent ID: 185d3a30-b35b-cc5f-f374-f2881a1fccf6
Content: Tutorial: Predict automobile price with the designer - Azure Machine Learning
Content Source: articles/machine-learning/tutorial-designer-automobile-price-train-score.md
Service: machine-learning
Sub-service: core
GitHub Login: @PeterCLu
Microsoft Alias: peterlu

Thanks @IanKensey for the feedback. That's definitely an issue and we'll work on getting the instructions and any screenshots updated.

@PeterCLu Thanks Peter, do you want to keep this issue opening or we should close it?

#assign: @PeterCLu

@IanKensey thanks for the helpful report. The instructions have been updated. I will proceed to #please-close this issue


Implement module resource

Module resource is Posix-only. The implementation here is fairly complete as far as I know, except for a small incompatibility when attempting to increase a maximum limit while not being a superuser. CPython raises ValueError while this implementation raises OSError. I think CPython's choice is a mistake. A ValueError is supposed to indicate an invalid value, something that the caller should be able to prevent from happening with proper value checks and preconditions. For instance, trying to set a a pair of limits where current is higher than maximum is a legitimate ValueError. But to decide whether the caller is or is not allowed to raise the maximum is the domain of the OS. Some lightweight OS implementations may allow it in some circumstances or for some users. Therefore OSError is more appropriate, especially since the call already can raise OSError when the systems says "ni" for some reason.
But this is not the main reason I haven't implemented the CPython's behaviour in such case. In general, I prefer to implement all CPython's quirkiness, as unreasonable as it may be — for the sake of compatibility. In this case, however, I think it is not worth the effort, performance, and extra complexity. First, such situations should be rare. Second, to actually properly raise ValueError, the implementation would need to add another system call (at least); all this just to report the expected error type for a rare case. Finally, when I looked up how real life modules on PyPI handle such calls, in all cases I found they were catching both ValueError and OSError together, which is not surprising, given that the caller cannot predict which one might happen. (This by itself is another indication that the CPython's choice is unfortunate). So unless some real-life problem gets reported, I leave it as it is.
Still to do: make working on macOS.

OK, I did some reading of the source of Mono.Unix and that explained a lot. It turns out I was using the library incorrectly. Mono types, flags, error codes defined in Mono.Unix.Native are not (necessarily) the same as the corresponding native symbols of the underlying OS. Mono defines its own API that is the superset of all OS APIs, and maps them with a series of #ifdefs to the OS values/types. This is convenient for Mono applications, as they can simply use Mono types and constants with Mono calls and forget about the OS. This is less convenient for IronPython, because values passed from/to the Python user code are expected to be OS compliant. So to make a call to a Mono function, a user-supplied value has to be converted to the Mono language before the call, then Mono converts it back to the OS language and makes a P/Invoke. Similarly, in the opposite direction. The conversion functions in both directions are available in class Mono.Unix.Native.NativeConvert.
So I take back that Mono is badly tested on macOS. It is just that the conversions are (sometimes) missing. Mono "is working OK" on Linux because most constants and types are based on Linux. But since macOS uses sometimes different values and types, things were going wrong. With careful conversions, macOS should work fine too. I will probably review all places that IronPython makes a Mono call to check if correct conversions are in place.
Another consequence of the above is that Mono types and constants must not be used with direct P/Invoke calls. Since resource has to use P/Invoke, it was incorrect to use Timeval from Mono. The last committed version is correct.