Errors when trying the example with ros foxy/ignition dome

Hi, thanks for this example. I was trying it out but ran into errors pasted further below.  MoveIt2, Ignition Dome, ros_ign_bridge setup seems to work fine with the standard tutorials/examples in their respective site/repos.
Environment Details:
Ubuntu: 20.04
ROS Foxy
MoveIt2 - built from source (foxy branch)
Ignition Dome - binary
ros_ign  - built from source to match above combination
========
Output of ign_moveit2 example_follow_object.launch.py pasted below.  Rviz/Gazebo starts up and displays the model but  rviz warns of missing TF data.  I tried to investigate the Ruckig plugin error and it appears it is not part of MoveIt2 foxy branch.  Not sure if that is an issue.  Wondering if the example is still valid for ros foxy environment.  Appreciate  your response on this. thanks
ubuntu:~/environment/ign_moveit2 $ ros2 launch ign_moveit2 example_follow_object.launch.py
[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2021-12-16-05-02-36-650387-ip-172-31-39-103-74927
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [move_group-1]: process started with pid [74929]
[INFO] [rviz2-2]: process started with pid [74931]
[INFO] [parameter_bridge-3]: process started with pid [74933]
[INFO] [parameter_bridge-4]: process started with pid [74935]
[INFO] [parameter_bridge-5]: process started with pid [74937]
[INFO] [parameter_bridge-6]: process started with pid [74939]
[INFO] [ign gazebo-7]: process started with pid [74941]
[INFO] [parameter_bridge-8]: process started with pid [74944]
[INFO] [example_follow_object.py-9]: process started with pid [74946]
[move_group-1] Parsing robot urdf xml string.
[move_group-1] Link panda_link1 had 1 children
[move_group-1] Link panda_link2 had 1 children
[move_group-1] Link panda_link3 had 1 children
[move_group-1] Link panda_link4 had 1 children
[move_group-1] Link panda_link5 had 1 children
[move_group-1] Link panda_link6 had 1 children
[move_group-1] Link panda_link7 had 1 children
[move_group-1] Link panda_hand had 3 children
[move_group-1] Link panda_link8 had 0 children
[move_group-1] Link panda_leftfinger had 0 children
[move_group-1] Link panda_rightfinger had 0 children
[move_group-1] [ERROR] [1639630957.622238133] [moveit.ros.occupancy_map_monitor]: No 3D sensor plugin(s) defined for octomap updates
[move_group-1] [ERROR] [1639630957.704996049] [moveit.ros_planning.planning_pipeline]: Exception while loading planning adapter plugin 'default_planner_request_adapters/AddRuckigTrajectorySmoothing': According to the loaded plugin descriptions the class default_planner_request_adapters/AddRuckigTrajectorySmoothing with base class type planning_request_adapter::PlanningRequestAdapter does not exist. Declared types are  chomp/OptimizerAdapter default_planner_request_adapters/AddIterativeSplineParameterization default_planner_request_adapters/AddTimeOptimalParameterization default_planner_request_adapters/AddTimeParameterization default_planner_request_adapters/Empty default_planner_request_adapters/FixStartStateBounds default_planner_request_adapters/FixStartStateCollision default_planner_request_adapters/FixStartStatePathConstraints default_planner_request_adapters/FixWorkspaceBounds default_planner_request_adapters/ResolveConstraintFrames
[move_group-1] [ERROR] [1639630957.766286646] [moveit.plugins.moveit_simple_controller_manager]: No controller_names specified.
[move_group-1] Loading 'move_group/ApplyPlanningSceneService'...
[move_group-1] Loading 'move_group/ClearOctomapService'...
[move_group-1] Loading 'move_group/MoveGroupCartesianPathService'...
[move_group-1] Loading 'move_group/MoveGroupExecuteTrajectoryAction'...
[move_group-1] Loading 'move_group/MoveGroupGetPlanningSceneService'...
[move_group-1] Loading 'move_group/MoveGroupKinematicsService'...
[move_group-1] Loading 'move_group/MoveGroupMoveAction'...
[move_group-1] Loading 'move_group/MoveGroupPlanService'...
[move_group-1] Loading 'move_group/MoveGroupQueryPlannersService'...
[move_group-1] Loading 'move_group/MoveGroupStateValidationService'...
[move_group-1]
[move_group-1] You can start planning now!
[move_group-1]
[example_follow_object.py-9] [WARN] [1639630958.314876899] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[example_follow_object.py-9] [INFO] [1639630958.457572349] [ign_moveit2_example_follow_object]: ign_moveit2_py initialised successfuly
[rviz2-2] Parsing robot urdf xml string.
[rviz2-2] Link panda_link1 had 1 children
[rviz2-2] Link panda_link2 had 1 children
[rviz2-2] Link panda_link3 had 1 children
[rviz2-2] Link panda_link4 had 1 children
[rviz2-2] Link panda_link5 had 1 children
[rviz2-2] Link panda_link6 had 1 children
[rviz2-2] Link panda_link7 had 1 children
[rviz2-2] Link panda_hand had 3 children
[rviz2-2] Link panda_link8 had 0 children
[rviz2-2] Link panda_leftfinger had 0 children
[rviz2-2] Link panda_rightfinger had 0 children
[ign gazebo-7] Warning [GenericJoint.hpp:1480] [GenericJoint::setRestPosition] Value of _q0 [0], is out of the limit range [-3.07178, -0.0698132] for index [0] of Joint [Joint].
[move_group-1] [ERROR] [1639630959.227077502] [moveit_robot_state.conversions]: Found empty JointState message
[move_group-1] [ERROR] [1639630959.298389910] [ompl]: /tmp/binarydeb/ros-foxy-ompl-1.5.0/src/ompl/geometric/planners/rrt/src/RRTConnect.cpp:207 - panda_arm/panda_arm: Motion planning start tree could not be initialized!

Hello,
Please remove default_planner_request_adapters/AddRuckigTrajectorySmoothing from panda_moveit2_config/launch/move_group_action_server.launch.py#L65 to get rid of the following error. I expected the error to occur, but I did not expect it to cause any issues and be simply ignored.
[move_group-1] [ERROR] [1639630957.704996049] [moveit.ros_planning.planning_pipeline]: Exception while loading planning adapter plugin 'default_planner_request_adapters/AddRuckigTrajectorySmoothing': According to the loaded plugin descriptions the class default_planner_request_adapters/AddRuckigTrajectorySmoothing with base class type planning_request_adapter::PlanningRequestAdapter does not exist.

I have not tested this repository with foxy/dome for quite some time now as I am currently using rolling/fortress. The following error is especially strange. Please, let me know if the problem (and the error below) persists even after removing the planning adapter.
[move_group-1] [ERROR] [1639630957.766286646] [moveit.plugins.moveit_simple_controller_manager]: No controller_names specified.

On another note, there is https://github.com/AndrejOrsula/ign_moveit2/pull/12 in progress. This PR will deprecate the current approach using JointTrajectoryController Ignition plugin and convert the examples into equivalent ign_ros2_control+MoveIt 2 examples. It will probably be ready in a few weeks but I don't know when. I will test it on rolling/fortress, but foxy|galactic/edifice should also work. A bit more info on the current progress is mentioned in https://github.com/AndrejOrsula/ign_moveit2/issues/11#issuecomment-992271711.

Hi, thanks for your response.  I have tried after removing the planning adapter as suggested but the below error persists.
[move_group-1] [ERROR] [1639711658.446666553] [moveit.ros.occupancy_map_monitor]: No 3D sensor plugin(s) defined for octomap updates
[move_group-1] [ERROR] [1639711658.665691632] [moveit.plugins.moveit_simple_controller_manager]: No controller_names specified.

And, no improvement in visualisation outputs.  I continue to see this warning in Rviz.
Fixed Frame
No tf data. Actual error: Frame [panda_link0] does not exist

I shall continue my troubleshooting and update if any positive result.  Also, will follow your PR.  Thanks again!

You can ignore [moveit.ros.occupancy_map_monitor]: No 3D sensor plugin(s) defined for octomap updates This error should not lead to a crash of your setup.
Regarding the latter error about the non-defined controller names: I am not 100% sure how these parameters are handled within their classes, but there was some recent work on the MoveIt controller manager. You could try to add the required missing parameters despite the fact that 'moveit_manage_controllers': False in move_group_action_server.launch.py like this:
+   moveit_simple_controllers_yaml = load_yaml(
+        "moveit_resources_panda_moveit_config", "config/panda_controllers.yaml"
+   )
+    moveit_controllers = {
+        "moveit_simple_controller_manager": moveit_simple_controllers_yaml,
+        "moveit_controller_manager": "moveit_simple_controller_manager/MoveItSimpleControllerManager",
+    }

    # Start the actual move_group node/action server
    run_move_group_node = Node(
        package="moveit_ros_move_group",
        executable="move_group",
        output="screen",
        parameters=[
            robot_description,
            robot_description_semantic,
            kinematics_yaml,
            ompl_planning_pipeline_config,
            trajectory_execution,
+            moveit_controllers,
            planning_scene_monitor_parameters,
            joint_limits_yaml,
        ],
    )

@sjahr , thank you for the response!
Prior to trying out your suggestion, i upgraded ignition from 'dome' to 'edifice' (binary install) and also  the matching ros_ign package (built from source).  MoveIt2 for foxy was retained as earlier (built from source).  There was no difference in launch errors when trying the example despite this.  I could, however, get the robot to follow the box in ignition gazebo, but for very limited number of moves before the below error appears and robot stops responding to any further box moves in ignition.
[move_group-1] [ERROR] [1640049749.667444215] [ompl]: /tmp/binarydeb/ros-foxy-ompl-1.5.0/src/ompl/geometric/planners/rrt/src/RRTConnect.cpp:253 - panda_arm/panda_arm: Unable to sample any valid states for goal tree
Not sure, but I guess something is messing up during ompl sampling inside MoveIt 2 and reading more about it.
I have since tried out the changes suggested by @sjahr and observed it clears the error related to missing moveit_simple_control_manger.  Also observed that the below error on initialisation no longer appears and the robot model is loaded with box in its hand. (prior to this the gripper was not holding the box at start and below error occured).
[move_group-1] [ERROR] [1640049631.239364076] [ompl]: /tmp/binarydeb/ros-foxy-ompl-1.5.0/src/ompl/geometric/planners/rrt/src/RRTConnect.cpp:207 - panda_arm/panda_arm: Motion planning start tree could not be initialized!
No improvements in simulation, however - the robot follows the box for few moves and stops responding further with the error below.
[move_group-1] [ERROR] [1640049749.667444215] [ompl]: /tmp/binarydeb/ros-foxy-ompl-1.5.0/src/ompl/geometric/planners/rrt/src/RRTConnect.cpp:253 - panda_arm/panda_arm: Unable to sample any valid states for goal tree
There are new errors  saying "action clients not connected" after the introduction of moveit_controllers parameter but I guess those are  expected as the example is not implementing those in its current form.
Happy to say, I am encouraged by your feedback to keep learning! Thanks

Relevant repositories are now updated to use ign_ros2_control instead of JointTrajectoryController Ignition plugin. README.md is updated with relevant instructions, so I recommend using this approach. I will be closing this issue as it is no longer relevant since the new changes were made. If case you encounter any issues @parkbytes, feel free to open a new issue.
For the sake of completeness, I will give some answers below for the latest errors you were experiencing. Note, that these are no longer relevant in the new version of this repository.

Your update from dome to edifice concludes that the issue here was in fact connected with the utilised version of Ignition. Since dome is pretty much EOL now, I won't be looking into it.
The following error appears when a path cannot be planned, e.g. box was moved outside of reach. I am not sure why the node would stop working after that, but it's most likely connected to the utilised MoveIt configuration. If any of your nodes is using use_sim_time=false, that could also be causing such issue.
[move_group-1] [ERROR] [1640049749.667444215] [ompl]: /tmp/binarydeb/ros-foxy-ompl-1.5.0/src/ompl/geometric/planners/rrt/src/RRTConnect.cpp:253 - panda_arm/panda_arm: Unable to sample any valid states for goal tree

The action clients not connected errors are to be expected if you performed the changes suggested above, since there is no action server present in the old approach. All communication is implemented only via topics. It is possible (and relatively easy) to add action server also for the old approach, but I did not find it necessary when used together with the previous Python interface that already used feedback from the controller.


/amacro is not a valid chat message command

Issue: I cannot make the example in the README work. Error message: "advanced-macros | Error: /amacro is not a valid chat message command."
My environment: I am using The Forge to host my game. Running latest 5e (2.1.4) and Foundry (v10 build 291). I have disabled all modules except: Advanced Macros, libWrapper, socketlib
Steps: I created the 'Move token', 'pan', 'current-time', 'Return to corner', and 'run' macros based on the README, and then tried to execute the 'run' macro, first by typing '/run', then clicking 'execute macro' in the window.
Expected behavior: as described in README
Observed behavior: If called through chat, 'Error: /run is not a valid chat message command'. If manually executed, "advanced-macros | Error: /amacro is not a valid chat message command."
 Thanks!

You're not dumb. The README was made for 1.19, and that was a new feature, but the module went through a lot of fixes due to the breaking changes between 1.18 and 1.19, and that feature probably got broken with the fixes.
I'll try to get it fixed. Worst case scenario would be to change the README to not be misleading.

Hello, the latest version (1.19.5) fixed some of those issues. There are still some issues to be fixed, but just calling "/amacro" shouldn't throw an error anymore.

Foundry V11 will overhaul how macro calls are made, so the /amacro call will be removed. This time around, the README will be up to date.


Remove the use of endpoint

As it is deprecated in NDNts

Done in 330c34cf600e57c035e3a0f26fdc6db8cd651aef
Forgot to close this issue.


[CRUD generator] Info alert after delete.

Can you provide alert feedback option in CRUD generator?
I mean info alerts after create, update, delete actions?
Example: "The user was created successfully.", "The user was updated successfully.", "The user was deleted successfully."
I think it can be very useful when user operate on list of hundreds entries. Sometimes user can not remember what just did or is not sure.

duplicated https://github.com/yiisoft/yii2-gii/issues/26


Pull repeating code from tutorials into a utility module.

There is a lot of code repetition currently in the seismic tutorials. Code needs re-engineering and pulling out into utility module so it can be imported instead.

I haven't checked the notebooks in #525 yet: is this being done there @ggorman ?

I think this can be closed. Feel free to reopen if you think I'm wrong @mloubout


Coordinate on leveraging Selenium for testing

@wjonassen and @dezidizon are to coordinate on leveraging Selenium for testing OpenDCS.

Work can move forward on leveraging Selenium for testing OpenDCS, Contract W912HQ24F0215 Task 4a.
Status is now: approved-W912HQ24F0215-task4a
Cheers, Arthur Armour

An initial discussion occurred with @wjonassen on October 23, 2024, where he did a walk through of how Selenium is leveraged for automated UI testing of the OpenDCS Web app.
The following next steps were determined:

[ ] Set-up IntelliJ
[ ] Set-up environment in IntelliJ to work with the opendcs_rest_api repository
[ ] Have OpenDCS Web Client and OpenDCS REST API running locally
[ ] Start writing test cases
[ ] Start writing automated tests

@adamkorynta was able to work with me to have IntelliJ and my development environment set-up.


0.28: Tests fail: Test ../../techlibs/ecp5/cells_sim.v ->../../techlibs/ecp5/cells_sim.v:448: syntax error

Version
0.28
On which OS did this happen?
BSD
Reproduction Steps
Rn tests
Expected Behavior
n/a
Actual Behavior
Test ../../techlibs/achronix/speedster22i/cells_sim.v -> ok
Test ../../techlibs/anlogic/cells_sim.v -> ok
Test ../../techlibs/coolrunner2/cells_sim.v -> ok
Test ../../techlibs/ecp5/cells_sim.v ->../../techlibs/ecp5/cells_sim.v:448: syntax error
../../techlibs/ecp5/cells_sim.v:448: error: invalid module item.
gmake[1]: *** [Makefile:855: test] Error 2
gmake[1]: Leaving directory '/usr/ports/cad/yosys/work/yosys-yosys-0.28'
*** Error code 1

I'm seeing the same error on Linux.

I bisected it to 266f81816bbede3f42fabe59e7d0cd8873e1a467, but in hindsight I should've just looked at the error first because it says what the problem is; for some reason iverilog is unhappy with the $error on line 448 of techlibs/ecp5/cells_sim.v. I noticed NixOS has a version of iverilog that is over 2 years old (v11.0), perhaps this is a bug with iverilog that has been fixed since then? But I haven't had time to check yet.

I'll try updating iverilog to the latest Git version and see if that fixes the problem.

I used iverilog-11.0

I didn't yet manage to run the iverilog test suite after updating it but yosys compiles fine and its test suite runs without errors.

I just found out that iverilog has a 12.0 git tag (not GutHub release) that I expect to work but I haven't managed to compile it on Linux yet.

I can confirm that everything works as expected with iverilog 12.

As far as I'm concerned, this issue can be closed now.


utils: baseload: fix GetLoad() to correctly reflect the node load

AsInt64 failed to parse cpus millis like 800m, which caused to return 0 value as the CPU consumption on the node.
Use Value() to round up the milli CPUs to complete CPU then continue rounding it up to multiples of 2.
Signed-off-by: shereenH<EMAIL_ADDRESS>

/lgtm
/approve


Azata Zippy Magic Superpower with Buffs

Azata Zippy Magic Superpower with Buffs
Spell Ability Description
Wiki Link: Azata Zippy Magic Superpower

Whenever the Azata casts a spell that targets individual creatures, not areas, the spell affects one additional creature within a 30 foot radius from the target. If the target is an enemy, the spell affects one additional enemy; if the target is an ally, the spell affects one additional ally.

Relevance
When casting a single target buff from an Azata who has Zippy Magic, that buff will apply to a second ally.  For example, such an Azata casting Mage Armor on one ally will automatically cast Mage Armor on a second ally.  It is possible (but tedious) to control which ally receives the buff by moving all other allied characters outside a 30 ft radius.
Desired Solution
The ideal solution would allow the selection of a spell (targeting one character) cast from the main character (Azata with Zippy Magic) to apply to a second character.
A solution should also account for the Azata being a brown fur arcanist, and take Powerful Change and Share Transmutation into consideration.

For my current playthrough, my 24-hour buff routine includes over 200 spell casts.  I simply can't function without a feature to help manage so much buffing by a team including an Azata Archanist.
So this is a must-have feature for me.  Instead of waiting, I went ahead and taught myself how to mod, and implemented this feature.  I hope this is helpful to others, and I've submitted a pull request back to this repository so that others may use too.
This pull request adds a new option "Control Azata Zippy Magic Secondary Buff" as seen in screenshot:

When this checkbox is checked, an Azata secondary buff using Zippy Magic will no longer be cast on a random ally outside the functioning of the mod.  Rather selecting any two characters to receive the buff will only count for 1 spell cast.
For example, in the screenshot, 10 characters are selected to receive the Mage Armor spell.  Using the Azata option, this will count for only 5 casts of the spell from my main character.  If 9 characters were selected, then 5 casts would be counted.  If 8 characters were selected, then 4 casts would be counted.  And so on...
If the Azata option is not checked, then 10 casts would be performed as usual.  However, your Azata would actually cast the spell 20 times, with half of those being wasted.  So the idea in providing this option is to prevent wasting this wonderful Azata superpower.
This pull request also includes updates to the calculation of available spells to accommodate when the Azata option is checked.  For example, my main character may cast 14 level 1 spells.  With Azata Zippy Magic, if the Azata cast all 14 as buffs, then that would allow for a total of 28 level 1 buffs to be cast.  Checking the Azata option, for say Mage Armor + Magic Weapon Primary + Magic Weapon Secondary, will correctly allow for selecting 28 targets to receive those spells from the Azata.  The portrait highlights, casting limits, and calculations displayed for each spell should be correct.
I've also tested that this works correctly for both instant buffing and buffing with animations.
I hope this helps!  Let me know if any issues in the pull request :)

Implemented in commit dee33c090fe8d6d03b1c960d81d646adeb357a2a.

Per advisement improvement implemented in 131102c22a39d5b930c81777c1e0827acc3971eb.

Correct bug where arcane reservoir points might not be available for Azata Zippy Magic secondary cast dddaf60997197be51354dfc057fa5ff49b1eca3a.

Fix animated casting bug when casting last Azata secondary buff but spell slots are already expended 4b40fb3ff49955f0a1bb207e54a9010c3c29ef95.

IsAOE is not the same as IsMass!  Bug fix 9bbaf3a16e4fe15bd514967114bb35b1bc84b7ad.

Here's a test with 250 buffs using the instant engine.  Code is looking stable in testing.

Found and fixed the case when a spell has a material cost and is the secondary buff.


[Feature] Support Schema in MaxCompute Source

Purpose of this pull request

Check list

[ ] Code changed are covered with tests, or it does not need tests for reason:
[ ] If any new Jar binary package adding in your PR, please add License Notice according
New License Guide
[ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
[ ] If you are contributing the connector code, please check that the following files are updated:

Update change log that in connector document. For more details you can refer to connector-v2
Update plugin-mapping.properties and add new connector information in it
Update the pom file of seatunnel-dist

[ ] Update the release-note.

Can you add new test case for this new feature? Like create MaxCompute Source with schema config and assert it.

OK, I add MaxcomputeSourceTest for this, will create MaxComputeSource and use prepare method to initialize the typeInfo


Test - Proximity Based Timer

Think of test cases and implement them for #8
Down below you'll see some test cases, they should cover most of the functionality
Test - Proximity timer.pdf

Added test cases


Mean-Sean Stack.

I am using the sean-generator, I keep getting:
Error: [$injector:modulerr] Failed to instantiate module angular-stripe due to:
TypeError: Cannot read property 'setPublishableKey' of undefined
at new module.exports (http://localhost/lib/angular-stripe/release/angular-stripe.js:18:34)
I am not just learning angular can someone explain how I can fix this.. with that platform. Would be greatley appreciated.

I really need to see code here since that error doesn't tell me anything. Happy to help here but I'm going to go ahead and close this since it's not an angular-stripe issue.

Thanks - I am muddling thru it it.

I can give you access to my repo.
From: Ben Drucker <notifications<EMAIL_ADDRESS>Reply-To: bendrucker/angular-stripe <reply<EMAIL_ADDRESS>Date: Wednesday, February 18, 2015 at 7:18 AM
To: bendrucker/angular-stripe <angular-stripe<EMAIL_ADDRESS>Cc: Dusty Countryman <countrdd<EMAIL_ADDRESS>Subject: Re: [angular-stripe] Mean-Sean Stack. (#7)
Closed #7https://github.com/bendrucker/angular-stripe/issues/7.

Reply to this email directly or view it on GitHubhttps://github.com/bendrucker/angular-stripe/issues/7#event-237613309.

If it's on GH I'm willing to spend a few minutes helping you diagnose this. Do whatever you need to do and let's keep the discussion in this thread.

It is on BitBucket...is that still ok?
From: Ben Drucker <notifications<EMAIL_ADDRESS>Reply-To: bendrucker/angular-stripe <reply<EMAIL_ADDRESS>Date: Wednesday, February 18, 2015 at 7:39 AM
To: bendrucker/angular-stripe <angular-stripe<EMAIL_ADDRESS>Cc: Dusty Countryman <countrdd<EMAIL_ADDRESS>Subject: Re: [angular-stripe] Mean-Sean Stack. (#7)
If it's on GH I'm willing to spend a few minutes helping you diagnose this. Do whatever you need to do and let's keep the discussion in this thread.

Reply to this email directly or view it on GitHubhttps://github.com/bendrucker/angular-stripe/issues/7#issuecomment-74857444.

I don't maintain an account there. If you can post code here I can help.

This is probably the easiest explanation - this is the boilerplate I used....https://github.com/meanjs/mean
I was adding angular-stripe into the applicationModuleVendorDependencies of the config.js
I think that is the problem, because I did not know where or how to set the key.
From: Ben Drucker <notifications<EMAIL_ADDRESS>Reply-To: bendrucker/angular-stripe <reply<EMAIL_ADDRESS>Date: Wednesday, February 18, 2015 at 7:43 AM
To: bendrucker/angular-stripe <angular-stripe<EMAIL_ADDRESS>Cc: Dusty Countryman <countrdd<EMAIL_ADDRESS>Subject: Re: [angular-stripe] Mean-Sean Stack. (#7)
I don't maintain an account there. If you can post code here I can help.

Reply to this email directly or view it on GitHubhttps://github.com/bendrucker/angular-stripe/issues/7#issuecomment-74857814.

Sorry but I don't have time to dissect someone's enormous boilerplate project. You inject stripeProvider and call stripeProvider.setPublishableKey. Not sure what else to tell you.

Thanks ben!
From: Ben Drucker <notifications<EMAIL_ADDRESS>Reply-To: bendrucker/angular-stripe <reply<EMAIL_ADDRESS>Date: Wednesday, February 18, 2015 at 9:09 AM
To: bendrucker/angular-stripe <angular-stripe<EMAIL_ADDRESS>Cc: Dusty Countryman <countrdd<EMAIL_ADDRESS>Subject: Re: [angular-stripe] Mean-Sean Stack. (#7)
Sorry but I don't have time to dissect someone's enormous boilerplate project. You inject stripeProvider and call stripeProvider.setPublishableKey. Not sure what else to tell you.

Reply to this email directly or view it on GitHubhttps://github.com/bendrucker/angular-stripe/issues/7#issuecomment-74868873.

Ben. Sorry to keep bugging you, guesing I am misunderstanding the module.
is it possible to do this from this module or is it limted to the helper functions at the end of the readme.
stripe.customers.list({ limit: 3 }, function(err, customers) {
// asynchronously called
});

This is a wrapper against Stripe.js which is strictly intended for tokenizing cards and bank accounts so they don't touch your server.
You're trying to call Stripe's API for application data. While you could theoretically use stripe-node via Browserify, this isn't something you should be trying to do. In order to do what you want, you'd have let the browser have access to your Stripe secret key which opens up a number of easy attack vectors for someone to get full access to your account.

OK. Gotcha. Thanks for the explanation.
I was getting confused...
So this I just want to submit the information to stripe, grab the token returned and then send it to my restfull api server to store the token for future billing, and then on the rest side is where I Would want to implement the stripe.js to actually talk to stripe...
Correct?
Thanks for the education.....I sometimes have a hard time wrapping my head around this stuff!
From: Ben Drucker <notifications<EMAIL_ADDRESS>Reply-To: bendrucker/angular-stripe <reply<EMAIL_ADDRESS>Date: Thursday, February 19, 2015 at 9:09 AM
To: bendrucker/angular-stripe <angular-stripe<EMAIL_ADDRESS>Cc: Dusty Countryman <countrdd<EMAIL_ADDRESS>Subject: Re: [angular-stripe] Mean-Sean Stack. (#7)
This is a wrapper against Stripe.jshttps://stripe.com/docs/stripe.js which is strictly intended for tokenizing cards and bank accounts so they don't touch your server.
You're trying to call Stripe's API for application data. While you could theoretically use stripe-node via Browserify, this isn't something you should be trying to do. In order to do what you want, you'd have let the browser have access to your Stripe secret key which opens up a number of easy attack vectors for someone to get full access to your account.

Reply to this email directly or view it on GitHubhttps://github.com/bendrucker/angular-stripe/issues/7#issuecomment-75057103.

on the rest side is where I Would want to implement the stripe.js to actually talk to stripe

Exactly. Your client's job is to use angular-stripe to turn cards / bank accounts into tokens. Then you make charges, add customers, list customers, etc. on your server.

Hey @bendrucker, I'm getting the same error mentioned at the beginning of this thread.
Uncaught Error: [$injector:modulerr] Failed to instantiate module clientApp due to:
Error: [$injector:modulerr] Failed to instantiate module angular-stripe due to:
TypeError: Cannot read property 'setPublishableKey' of undefined at new module.exports (http://localhost:9000/bower_components/angular-stripe/release/angular-stripe.js:18:34)

My app.js looks like this (edited for space):
angular.module('clientApp', [
  'ngCookies',
  'ngResource',
  'ngSanitize',
  'ui.router',
  'ngStorage',
  'angular-stripe'
])

.config(function($urlRouterProvider, $locationProvider, stripeProvider) {

  //
  // UI Router
  $urlRouterProvider.otherwise('/');
  $locationProvider.html5Mode(true);

  //
  // Stripe
  stripeProvider.setPublishableKey('my_key_was_here');
})

// etc...

I also tried setting the key in a controller when that didn't work:
angular.module('clientApp')
.controller('RegisterCtrl', function($scope, stripe) {
  'use strict';

  //
  // Stripe
  //stripe.setPublishableKey('pk_test_4KOAFDT9AawsCcEBxS2GdLYJ');

// etc...

I know your original response indicated that this is not an issue with the library, but I was hoping you could point me in the correct direction since the OP didn't post how he solved it. Thanks

@benjamincharity Sounds a lot like Stripe is not defined — you need to make sure to include Stripe.js before loading angular-stripe. I can put a more descriptive warning in if we can confirm that's your issue.

Spot on @bendrucker. Grunt was apparently choking during the concat/compile phase because of the non-local resource and was just blowing away the Stripe library.
Thanks for pointing my ship in the correct direction!

@bendrucker It's not explicitly obvious to include Stripe.js before loading angular-stripe. Can you update the readme to make this very obvious?

angular-stripe expects Stripe.js to be available as window.Stripe

I think that's adequate. If you can think of a clearer way to phrase that I'd welcome a PR. I won't use an example that makes use of code since it assumes you're loading your scripts via tags and I don't want to encourage that.


Zipkin server 2.12.3 springBoot projects add custom information to the span's json data structure

The version used when customizing the springBoot project on the zipkin server is 2.12.3. springBoot 2.1.17.RELEASE; I want to add custom information to the json result of the span. The kafka+es method collects and stores span data. thank you~!

if you still have questions, please join gitter to ask them https://app.gitter.im/#/room/#openzipkin_zipkin:gitter.im


Number of objects it can detect in a single image

I am trying to train the model on images which has 100s of objects in a single image, all distinctly visible. Is there a variable to set to detect these many number of objects?

This is not really the right tool - there are specialised approaches for counting large number of objects - like this for example: https://github.com/WeidiXie/cell_counting_v2


Async feature

Having an async mode with some loading props is something the package will accept?

I think this is a bit of a too-specific feature for react-cmdk. I recommend you use the components provided and build something the way you like it :)

Thanks @albingroen, will close this one!


unittest to py.test

I started writing tests with classic unittest.TestCase in mind, they should be rewritten into py.test format (just functions and asserts if I understand py.test correctly) :D
While at it, test coverage should be increased back to 100% ;)

I will write the tests for save/loading decks and some others.
Will start on it some time this week
Real work takes priority :)

I actually already have them done, just porting the rest now. Feel free to edit/upgrade them later though!


Create log file if it does not exist yet

Touch the output file to make sure it exists.
Fixes #3

thanks!


[New game]: Jump and Run Game

🎮 Game Request
The Jump and run game will be a fun game . There may be object and there would be hurdles for which it has to Jump the hurdles and run it from  there . It will be coded using HTML, CSS and Javascript .
Point down the features
Game points :

Simple but attractive UI .
Good color combination .
After every hurdle crossed some points will be added .
A Congratulation message in the end.

Select program in which you are contributing
GSSoC23
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hey  @Vidhi-44  ! Thank you for raising an issue 💗 You have been assigned this issue you can start working on the issue 🎮

Hey @Vidhi-44 ! Thank you for raising an issue 💗 You have been assigned this issue you can start working on the issue 🎮

Yess ! I will do this .. Thankyou !

Hello @Vidhi-44, Time's Uppp!⏰
Sorry for closing your issue!
But it's more than a week since we haven't received anything from your side 😢 .
Come up with new ideas, create a new issue and make sure you finish it within a week! 🔥
All the best! 🚀
Happy Hacking! 💗

Hey @Vidhi-44 ! Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇

Hey ! will you please assign me this again . I have the codebase ready.


Uploading multipart uploads via presigned URLS generated in .NET SDK and used via JS AJAX

The Question
I am attempting to allow our users to upload large files to our S3 bucket for processing. To do this, I am starting a multipart upload in the .NET SDK then generating separate pre-signed URLS for each required part (also in the .NET SDK).
Once I have the pre-signed URLS, I then use a basic AJAX call on the client browser to post each part of the split file.
Even if I attempt this with a small file which is only big enough for one chunk (~15mb) I get an ERR_CONNECTION_ABORTED response. If I use the URL to post via CURL, I get Signature "Does Not Match".
Creation of Multipart Upload
var multipartResponse = _client.InitiateMultipartUpload(new InitiateMultipartUploadRequest
    {
         BucketName = _bucket,
         Key = key,
         ServerSideEncryptionMethod = _encryption,
         ServerSideEncryptionKeyManagementServiceKeyId = _encryptionKeyId
     });
operation.Location.multipartFileUpload.UploadId = multipartResponse.UploadId;

Generation of pre-signed URLs
var expiry = DateTime.UtcNow.AddDays(1);
for (int i = 0; i < operation.Location.multipartFileUpload.ETags.Count; i++)
{
    operation.Location.multipartFileUpload.ETags[i].PreSignedUrl = _client.GetPreSignedURL(new
        GetPreSignedUrlRequest
        {
            BucketName = _bucket,
            Key = key,
            Expires = expiry,
            PartNumber = operation.Location.multipartFileUpload.ETags[i].Id,
            UploadId = operation.Location.multipartFileUpload.UploadId,
            Verb = HttpVerb.PUT,
            ServerSideEncryptionMethod = _encryption,
            ServerSideEncryptionKeyManagementServiceKeyId = _encryptionKeyId
        });
}

Javascript code to use Presigned URLs
uploadFilePart: function (etag, data) {

            $.ajax({
                url: etag.PreSignedUrl,
                type: 'PUT',
                processData: false,
                data: data,
                headers: {
                    'Access-Control-Allow-Origin': 'Tried with and without this'
                }
            }).success(function(data) {
                console.log(data);
            }).error(function (data) {
                console.log(data);
            });
        }

Example pre-signed url:
https://our-bucket-name.s3.ap-southeast-2.amazonaws.com//?uploadId=IEXxqXXXXXHcdval_ygDhDX9m5H.X8yt2ZE9XpyLfTXmK4nleibIUTKq_k.F55um.0dumTd00YhuVbKzvQT4.rbua7PS_TUDo2V5n0wT1Lqz4A8t.FeZldnmV7gWtewcOMs7sTl.lEZ4v6omOktPvYj4VxWZcbE4NE2DXfm0MIxI-
&partNumber=0
&X-Amz-Expires=86400
&X-Amz-Security-Token=FwoGZXIvYYdXXXXXXXHZHw2Wq6Dt1ABHbvCK4Adyu6UppRVIghIuDPD42sdVati6DYTV3g6qaJphZi5e2n7BVV0VzqwAN91HlHJ3seLmunj1kH4bf71edtx5E30bRIiLmIMgP29Wpbn5jmbEVm9w%2BdXlziA0c0tpU9OURsV2Kih6iwRY%2BRny9woMnzW8lHZWoi5sQUVRTAALWtijujscvde%2F1UBnraP8NxF1qTw6f%2FxJ4AvkELRKpRbhKe%2Fowtilqzub%2F%2Bu66RSk7u8O%2BLrvUdsND6w8o2baOhwYyLQfhc3Cq2aA4Yz06E0324OOW%2Bf9Vx5d9WaHk6ZTW8fC0A2e2m4cpg34zQcE7qw%3D%3D
&X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=ASIAXXXXXXXXXXXX5HCI7GJN7R/20210706/ap-southeast-2/s3/aws4_request
&X-Amz-Date=20210706T003948Z
&X-Amz-SignedHeaders=host
&X-Amz-Signature=9bea399ca1b2365a06XXXXXXXXXecb7853e2af195412ccea91da526a46c70c4d

Environment

SDK Version: AWSSDK.S3 <IP_ADDRESS> AWSSDK.Core <IP_ADDRESS>
Targeted .NET Platform:  4.8

This is a :question: general question

Hi @wroof,
Good morning.
Please try the guidance provided in https://github.com/aws/aws-sdk-net/issues/1832#issuecomment-820639067 and see if it helps. I have not tried the logic myself, but the articles provided in the comment might help.
Thanks,
Ashish


Quick post text box that adds a post without the full modal popup and without a title

@tibetsprague need designs for how images, attachments and link previews will work/look


[TASK] Add process proving key from circom/snarkjs encoding

Overview
We have the packed process for the arkworks proving key, we should also add one for the circom key.

Circom's ZKey can be converted to Arkworks' ProvingKey, so technically this already implemented.


Check if KinD supports Trustworthy Jwts.

From https://github.com/istio/istio/pull/15568.
Trustworthy Jwt type is available from v1.12 and later.
The sds_citadel_flow_test passed in my v1.12.x and v1.13.x GKE clusters. However, it's failing in KinD (kindest/node:v1.14.2). Reason of failing is control plane components with sidecar (e.g. Pilot, Mixer, etc.) failed to deploy. My guess is that KinD was having problems with trustworthy jwts so it couldn't spin up the containers. I don't have access to Prow clusters so it's hard to debug.
Logs: https://prow.istio.io/log?id=3081&job=integ-security-k8s-presubmit-tests-master
One way to test this is create a simple test using the new test framework with these extra config (similar to my PR) to see if Istio can be deployed.
cfg.Values["global.controlPlaneSecurityEnabled"] = "false"
cfg.Values["global.mtls.enabled"] = "true"
cfg.Values["global.sds.enabled"] = "true"
cfg.Values["global.sds.udsPath"] = "unix:/var/run/sds/uds_path"
// Trustworthy JWTs are available in Kubernetes 1.12 (beta) and later.
cfg.Values["global.sds.useTrustworthyJwt"] = "true"
cfg.Values["nodeagent.enabled"] = "true"
cfg.Values["nodeagent.image"] = "node-agent-k8s"
cfg.Values["nodeagent.env.CA_PROVIDER"] = "Citadel"
cfg.Values["nodeagent.env.CA_ADDR"] = "istio-citadel:8060"
cfg.Values["nodeagent.env.VALID_TOKEN"] = "true"

[ ] Configuration Infrastructure
[ ] Docs
[ ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Policies and Telemetry
[ ] Security
[X] Test and Release
[ ] User Experience
[ ] Developer Infrastructure

I don't have access to Prow and I'm not really familiar with KinD, can one of you guys see if you can deploy Istio in a test with those config? @fejta @howardjohn @utka @icygalz.

The kind utility can create a local cluster using any version of kubernetes. You can build your own images, and releases ship with their own set of prebuilt images. See https://github.com/kubernetes-sigs/kind/releases/tag/v0.4.0 for instructions for how to create a cluster using 1.13:
$ kind create cluster --image=kindest/node:v1.13.7@sha256:f3f1cfc2318d1eb88d91253a9c5fa45f6e9121b6b1e65aea6c7ef59f1549aaaf

So looks like k8s on KinD node v1.14.2 (which is prow is using) can not deploy Istio because of trustworthy jwts. I also tested with KinD newest verion 1.15.
Logs from Pilot
  Warning  FailedMount  50s                kubelet, kind-control-plane  MountVolume.SetUp failed for volume "istio-pilot-service-account-token-22h8l" : couldn't propagate object cache: timed out waiting for the condition
  Warning  FailedMount  50s                kubelet, kind-control-plane  MountVolume.SetUp failed for volume "istio-certs" : couldn't propagate object cache: timed out waiting for the condition
  Warning  FailedMount  14s (x7 over 47s)  kubelet, kind-control-plane  MountVolume.SetUp failed for volume "istio-token" : failed to fetch token: the server could not find the requested resource

@myidpt @quanjielin. How do you guys want to proceed? We can change the SDS Citadel flow test to use legacy jwts for short-term, unless fixing this KinD issue does not require a lot of time. Again, the test runs fine on GKE clusters with version 1.12 or higher.

@pitlv2109 using legacy jwt in test sounds good to me.

Again, the test runs fine on GKE clusters with version 1.12 or higher

just because it works on GKE doesn't mean it is standard. Afaik kind is a fully compliant k8s distribution so if it isn't enabled by default there then it may not be in other platforms. at the very least we should document this

Again, the test runs fine on GKE clusters with version 1.12 or higher

just because it works on GKE doesn't mean it is standard. Afaik kind is a fully compliant k8s distribution so if it isn't enabled by default there then it may not be in other platforms. at the very least we should document this

Yes. I'll investigate more on this.


Reformat header for easier copy / pasting

Is this still relevant @itsthejoker ? Stale?

We have received confirmation from the admins that our current method is the best method. Unfortunately, I don't see this changing anytime soon.


Update README.md

Added Yi model with some reference on basic usage

We will add this model to readme after the instruction-tuned version is released.


Implement methods for testing and unwrapping result

Implement exec methods for testing and unwrapping result, similar to option.

Can you please add a couple of tests of the intended usage of these, in particular of the when_used_as_spec functions? (Sorry I didn't catch it the first time.)

Yes. Should I add tests in rust_verify_test?

in particular of the when_used_as_spec functions?

I added it because I see similar things in option.rs. If this is undesired I can also remove it.


No intersectionRatio in polyfill on prototype

This will actually use the polyfill in safari if someone added it.
https://raw.githubusercontent.com/w3c/IntersectionObserver/master/polyfill/intersection-observer.js
ember-cli-build.js

app.import('vendor/intersection-observer-polyfill.js');

However, note, the requestAnimationFrame implementation is highly optimized, so in Safari and IE11, I imagine rAF is more efficient than the polyfill.
https://github.com/snewcomer/raf-pool

Safari supports IntersectionObserver spec as of 12.1 so closing


Docs: Getting started redownloads dataset instead of reading downloaded data set

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
Modin version (modin.__version__):
Python version:
Code we can use to reproduce:

Describe the problem
The Getting Started docs needs a correction to the pd.read_csv parameter to read dataset directly from disk to compare pandas and modin.pandas correctly.
Currently, each run will re-download the dataset and run the test, in which the difference in read_csv speeds is not reflected as the majority of the time is used to download the file.
Source code / logs
https://github.com/modin-project/modin/blame/master/docs/getting_started/quickstart.rst#L83
Line 83 and line 96 uses the s3_path parameter for the file which is the url, instead of the path to the downloaded taxi.csv file.
I'm willing to create a PR for this.
Extra note: there's also a possibility of improvement by checking whether the file is already downloaded and avoid redownloading when running the dataset download cell.

@rraihansaputra Thanks for opening the issue! After looking into it, you are correct that it's not showing the time spent reading it from disk but from the object store instead. I think it's still a valid comparison since reading from an object store is a normal use case. However, I'm not sure what the documentation was trying to show here, and I think we should have been more explicit. @modin-project/modin-contributors @modin-project/modin-core thoughts?

however, I'm not sure what the documentation was trying to show here

@pyrito the page is supposed to make Modin look faster :) We could download the dataset first as in the quickstart. We could explain that 1) we are doing that to show the perf improvement 2) it's still possible to read directly from s3, and normally that's how one would read the data.

Agree with the second point. It's still completely valid to read directly from s3 since that's a common use case and ends up being a bottleneck in terms of performance for many, so we are showing clear performance improvement there.

@pyrito the page is supposed to make Modin look faster :) We could download the dataset first as in the quickstart. We could explain that 1) we are doing that to show the perf improvement 2) it's still possible to read directly from s3, and normally that's how one would read the data.

Yeah I'm referring to the same page. The bug is that the file is actually downloaded, but the next cells refers to the s3_path which is the object path, rather than referring to read the downloaded file.
I believe reading from local emphasizes the improvements from using modin. Reading from an object store is a valid usecase, but I think it can be demonstrated somewhere else, not on this page.

Reading from S3 should still be faster in Modin, and if it is not, that's a bug 😄

That makes sense @rraihansaputra ! Do you want to go ahead and open a PR for this?


[WIP] Monoidal Category Tactic

Patch Description
This PR implements the start of a monoidal category solver, based roughly off of the ideas found in [1].
Specifically, we compute a normal form for each of the objects via reassoc, and then show that any composition of coherence morphisms is actually just the identity morphism between the normalized objects.
Notes
I'm almost over the finish line on this one, just have to show that normalization preserves equality for associators, and prove a couple of rather stubborn lemmas. Of note is strict-⊗, which is not being well behaved. The proof ought to follow by some simple rewrites like strict-∘, but Agda does not seem happy about that.
References

http://www.cse.chalmers.se/~peterd/papers/Coherence_Monoidal.pdf

This is very cool!
I'd love to help out but I'm super busy this and next week. What I can offer in the meantime is some observations:

I'm not surprised that you have unresolved metas in exactly the places you do because you have not yet used any of the coherence laws (triangle, pentagon) that make it possible to prove coherence for monoidal categories. I suspect these will be crucial in the missing steps/proofs though I'm not 100% certain since the subset of the free monoidal category you're using is somewhat degenerate (you don't have any "non-trivial" morphisms).
Why use slurp? It's nice that you can proof the extra unit isn't necessary, but who cares? A normal form with the extra unit is as good as one without, no? I suspect the slurps could get in the way in some of the proofs.
Is the use of rewrite necessary? I'm surprised it worked, I thought rewrite was not --safe.
I was surprised that you added syntax for objects (Word) and for morphisms (Expr) but not for equations on morphisms. If you had those, your syntax would be the free monoidal category over a discrete category (with the objects of 𝒞). I was expecting you to prove preserves-≈ in that category (i.e. w.r.t. to the "synthetic" equality) rather than in the embedding of that category into 𝒞. Maybe that would simplify some proofs by removing the extra [_↓] in the types. Maybe not. But worth considering if you remain stuck.
I would actually have gone a step further and added yet another syntax for normal forms — the free strict monoidal category over the objects of 𝒞 — but you don't seem to need it. I suspect if one added support for non-trivial morphisms (i.e. anything other than combinations of associators and unitors) this might become necessary because the normal forms are then more complicated. But I'm just speculating.
Nitpick: I find the name "coherence morphism" a bit misleading. I think it should be "coherent morphism" because these morphisms don't ensure coherence, they are coherent (it's the coherence laws that ensure their coherence). Anyway, that's a detail.

Yeah, I roughly see where I need to use the associators and unitors. The reason I am using this degenerate version is that during reflection, I plan on splitting the morphisms into the ones that just do coherence things, and non trivial ones. If we included the non trivial ones in our subcategory, then the key theorem coherence : Expr A B → (X : Word) → reassoc A X ≡ reassoc B X woudn't be true!
As for rewrite, it's a special version of with abstraction that does some extra stuff for us (See https://agda.readthedocs.io/en/v<IP_ADDRESS>/language/with-abstraction.html#rewrite). There is another very unsafe feature with the same name, but that uses pragmas.
I originally tried working with synthetic equality actually, but it didn't seem to be buying me a whole lot. Perhaps it could help with versions of the problematic strict-⊗ lemma.
Adding a syntax for normal forms is a great idea, I hadn't considered it! The whole proof is sort of a bizzare version of a coherence theorem anyways, so it makes sense that an explicit version of a stricit moniodal category could be useful. Will give this a go :)
WRT to naming, good point. I suppose just writing unitors/associators is clearer.

I managed to make some progress by using an explicit representation of normal forms. It allowed me to solve the case for the tensor product _⊗₁′_ in preserves-≈ and re-prove the other cases you had. I don't know how best to share this (is there a way to collaborate on PRs?) so I pushed it into a branch in my fork of the library:
https://github.com/sstucki/agda-categories/blob/27dc6adf0332a243747f83014b98fc3e7ee7786d/src/Categories/Tactic/Monoidal.agda
Hope this is helpful.

I think it is possible to add commits to this PR, at least for people who have push access to the repo (which I believe you do @sstucki ).  Though it might make sense to push to you another branch that is started from this one, to let @TOTBWF do the merge, if he so chooses.

@sstucki This is great! I think we might have ourselves a solver pretty soon :). WRT commiting to the branch, this is the most annoying thing about git IMO. I'll grab those commits off your branch and integrate them into mine.

Looks like using explicit equalities might be the right move after all. This lemma would be waaaaaay easier if we could pattern match on equality proofs.
invert-resp-≈ : ∀ (f g : Expr A B) → f ≈↓ g → invert f ≈↓ invert g

Can't you use the fact that f and inverse f form an iso? Lift f ≈↓ g to an equality on isos, the project out the component on the inverses.

Moving forward, you should probably have your branch track mine so that the histories are the same (makes merges easier)

Good idea, I'll do that!

Ok, more progress. ⌊⌋-α is done, and all that remains of the associator case is a gnarly reassociation. What are everyones thoughts on using the category tactic to implement this tactic? They both will be importing reflection code at the end of the day, so the dependency tree doesn't get any deeper.

Because of the stated reason, using the category tactic here seems reasonable.

What are everyones thoughts on using the category tactic to implement this tactic? They both will be importing reflection code at the end of the day, so the dependency tree doesn't get any deeper.

Actually, a lot of the code in this module is independently useful. It's a weak version of the coherence theorem for (discrete) monoidal categories. It just so happens that this proof is constructive so we can use it as an algorithm to "solve" equations in such categories. I think there's a point exposing that part of the module and making it independent of tactics code.
If the issue is just the "gnarly reassociation" for the associator case, then we can either prove it by hand (shouldn't be all that bad) or use the category tactic to generate a proof and substitute it in. Apparently the command for this is C-c C-m but I have never tried using it.

Would there be something to learn from @gelisam 's premonoidal solver?

The monoidal version of the problem is harder than the premonoidal version, so it is I who has the most to learn from this conversation :)
In particular, while I do have a definition for a free premonoidal category in that repo, I have not yet made a solver out of it.
What distinguishes a premonoidal category from a monoidal category is that the law (f *** id) >>> (id *** g) = f *** g = (id *** g) >>> (f *** id)
  |     |         |     |         |     |
[ f ]   |         |     |         |   [ g ]
  |     |    =  [ f ] [ g ]  =    |     |
  |   [ g ]       |     |       [ f ]   |
  |     |         |     |         |     |

is required to hold in a monoidal category but not in a premonoidal category (in fact there is no (***) in a premonoidal category, only the special cases first f = f *** id and second f = id *** f).
When looking for a definition for a free X, e.g. the free monoidal category, I start from a representation for the AST and I apply all the laws to reduce all the degrees of freedom. Above, we can see that the f and the g are free to slide past each other; by applying the corresponding law, I eliminate that freedom and force all the free-sliding blocks all the way to one side, say, the bottom. The end result is that the canonical representation looks like a tetris pile: blocks stacked on top of each other, with some overhangs.
  |        |            |        |
  |   [    f    ]       |        |
  |     |     |         |        |
[ g ]   |     |         |        |
  |     |   [ h ]       |        |
  |     |     |    =    |        |
  |   [    i    ]       |        |
  |     |     |         |        |
[    j    ]   |         |   [    f    ]
     |        |         |     |   [ h ]
     |      [ k ]     [ g ] [    i    ]
     |        |       [    j   ]  [ k ]

The canonical representation for the premonoidal case is much easier: the representation on the left is already canonical. It's just a list of atoms, shifted so that it only affects a subset of the strings at that height of the string diagram.

Taking a closer look at this branch, it looks to me like you don't support atoms at all, only the structural bits such as the associators, unit-introduction, and unit elimination? That explains why your only normal form is the identity! Well, that certainly makes the problem a lot simpler.
And yet, from what I can see in the rest of this thread, it has already been quite a challenge! I guess I was wrong to think that the main challenge when writing this kind of solver was to figure out what the canonical representations look like, and that the rest (converting to and from the canonical representation, proving that an expression is equal to its canonical representation, writing a macro reflecting the type into an expression) would be routine.

Maybe it's worth defining Free Monoidal Categories in a separate PR.

Where is your definition of a Free Monoidal Category? I'd be curious to see how yours compares to my tetris pile approach. I don't see it in this nor any recent PR.

So is this completely stalled then?

I've been pretty busy as of late (started a new job and moved countries) so I haven't had the time to think about this too hard 🙁. Hopefully I'll have some time to devote to this soon!

Those are rather good reasons for not having time! Hope it all went smoothly.

I take it that this is still stalled (and there was no progress on something similar over in 1lab?)

We're currently discussing this in the Monoidal Café discord. We found a flaw in my Tetris pile idea from earlier in this thread: it doesn't support scalars (morphisms from unit to unit), which commute with each other but not with identity arrows. Word on the street is that @pigworker has found a complicated normal form for monoidal categories he calls "staircases", but it's not ready to be published yet.

I can't find the Monoidal Café discord - could I get an invite?

I was summoned here by @gelisam. Here is an invite to the Monoidal Cafe, feel welcome to join!
https://discord.gg/kswesAKQ


Refactor and improve custom exception class

I Would definitely say definition of all custom exceptions are quite repetitive and requires some refactor.
In addition it would be more helpful to provde additional information regarding the exception to allow tracking where the exception is generated easier.
Improvement

Use a macro to define an exeception class.
Provide file, function name and line number information when throwing an exception, and compose those into the exception message.

The exception error message now looks good to me.

Assertion Failed:
isOdd(this->RenderDistance)
...........................
C:\Users\steph\source\repos\SuperTerrain+\SuperTerrain+\Core\STPEnvironment.cpp(SuperTerrainPlus::STPEnvironment::STPChunkSetting::validate):36
------------------------------------------------------------------------------------------------------------------------------------------------
Environment 'STPChunkSetting' validation fails


Update Example to Swift 4.2

Hey!
I like your library. I updated the example to 4.2, added a gitignore and tidied up a bit.

Thanks for your contribution, I appreciate it.
Please see the review comments. After you've pushed a new commit for that, I'll happily merge the PR.

@LinusGeffarth I don't see any comments on this PR

@dylanshine
I added code suggestions for lines 69-70.

@LinusGeffarth Idk if its a privacy setting but I can't see your suggestions

I suggested:
public var lines: [Line] = []
public var drawingHistory: [Line] = []

line should actually be lines


Index out of bounds error

Please make sure that this is a bug. As per our
GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
No

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
Linux Ubuntu 20

TensorFlow installed from (source or binary):
Binary

Describe the current behavior
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 19, in run_odt_and_draw_results
IndexError: index 12 is out of bounds for axis 0 with size 5

Describe the expected behavior
Was expecting arrays of bounding box values and so forth, as per the model inputs and outputs
Contributing

Do you want to contribute a PR? (yes/no):
Briefly describe your candidate solution(if contributing):

Standalone code to reproduce the issue
import cv2
from PIL import Image
import wget
import numpy as np
import os
from tflite_model_maker.config import ExportFormat
from tflite_model_maker import model_spec
from tflite_model_maker import object_detector
import tensorflow as tf
assert tf.__version__.startswith('2')
tf.get_logger().setLevel('ERROR')
from absl import logging
logging.set_verbosity(logging.ERROR)
spec = model_spec.get('efficientdet_lite0')
train_data, validation_data, test_data = object_detector.DataLoader.from_csv('gs://cloud-ml-data/img/openimage/csv/salads_ml_use.csv')
model = object_detector.create(train_data, model_spec=spec, batch_size=8, train_whole_model=True, validation_data=validation_data)
model.evaluate(test_data)
model.export(export_dir='/media/nvme')
model.evaluate_tflite('/media/nvme/model.tflite', test_data)
model_path = "/media/nvme/model.tflite"

classes = ["???"] * model.model_spec.config.num_classes
label_map = model.model_spec.config.label_map
for label_id, label_name in label_map.as_dict().items():
    classes[label_id - 1] = label_name

# Define a list of colors for visualization
COLORS = np.random.randint(0, 255, size=(len(classes), 3), dtype=np.uint8)

def preprocess_image(image_path, input_size):
    """Preprocess the input image to feed to the TFLite model"""
    img = tf.io.read_file(image_path)
    img = tf.io.decode_image(img, channels=3)
    img = tf.image.convert_image_dtype(img, tf.uint8)
    original_image = img
    resized_img = tf.image.resize(img, input_size)
    resized_img = resized_img[tf.newaxis, :]
    return resized_img, original_image

def set_input_tensor(interpreter, image):
    """Set the input tensor."""
    tensor_index = interpreter.get_input_details()[0]["index"]
    input_tensor = interpreter.tensor(tensor_index)()[0]
    input_tensor[:, :] = image

def get_output_tensor(interpreter, index):
    """Retur the output tensor at the given index."""
    output_details = interpreter.get_output_details()[index]
    tensor = np.squeeze(interpreter.get_tensor(output_details["index"]))
    return tensor

def detect_objects(interpreter, image, threshold):
    set_input_tensor(interpreter, image)
    interpreter.invoke()
    boxes = get_output_tensor(interpreter, 0)
    classes = get_output_tensor(interpreter, 1)
    scores = get_output_tensor(interpreter, 2)
    count = int(get_output_tensor(interpreter, 3))
    results = []
    for i in range(count):
        if scores[i] >= threshold:
            result = {
                "bounding_box": boxes[i],
                "class_id": classes[i],
                "score": scores[i],
            }
            results.append(result)
    return results

def run_odt_and_draw_results(image_path, interpreter, threshold=0.5):
    _, input_height, input_width, _ = interpreter.get_input_details()[0]["shape"]
    preprocessed_image, original_image = preprocess_image(
        image_path, (input_height, input_width)
    )
    results = detect_objects(interpreter, preprocessed_image, threshold=threshold)
    original_image_np = original_image.numpy().astype(np.uint8)
    for obj in results:
        ymin, xmin, ymax, xmax = obj["bounding_box"]
        xmin = int(xmin * original_image_np.shape[1])
        print("xmin plus: ")
        print(original_image_np.shape[1])
        xmax = int(xmax * original_image_np.shape[1])
        ymin = int(ymin * original_image_np.shape[0])
        print("ymin plus: ")
        print(original_image_np.shape[0])
        ymax = int(ymax * original_image_np.shape[0])
        class_id = int(obj["class_id"])
        color = [int(c) for c in COLORS[class_id]]
        cv2.rectangle(original_image_np, (xmin, ymin), (xmax, ymax), color, 2)
        y = ymin - 15 if ymin - 15 > 15 else ymin + 15
        label = "{}: {:.0f}%".format(classes[class_id], obj["score"] * 100)
        cv2.putText(
            original_image_np, label, (xmin, y), cv2.FONT_HERSHEY_SIMPLEX, 0.5, color, 2
        )
    original_uint8 = original_image_np.astype(np.uint8)
    return original_uint8

INPUT_IMAGE_URL = "https://storage.googleapis.com/cloud-ml-data/img/openimage/3/2520/3916261642_0a504acd60_o.jpg"

DETECTION_THRESHOLD = 0.3

TEMP_FILE = '/media/nvme/image.png'

# Download image and save to above location as a 512 x 512 input

interpreter = tf.lite.Interpreter(model_path=model_path)
interpreter.allocate_tensors()

detection_result_image = run_odt_and_draw_results(
	TEMP_FILE,
    interpreter,
    threshold=DETECTION_THRESHOLD
)

Are you trying to reproduce https://www.tensorflow.org/lite/tutorials/model_maker_object_detection locally for custom data and hitting problems?
If so, Can you please mention what steps have you changed?

Hi @ymodak
Thanks for the response, I am just using the Python code as is and also just using the standard data which is provided via gs:// link.
Also I have a question, which might be related, why does the model return negative values in the bounding box coordinates? What does it mean if the model returns negative numbers as apposed to positive numbers?
For example
StatefulPartitionedCall:3:
[-0.0034427345, -0.009861112, 0.96726143, 0.9857403 ... ]

Thanks

@tpmccallum I was checking if the issue still persists.
I was able to run the code sample provided in object detection example. The inference seems to be fine with tflite model maker 0.4.2 and TF 2.8.0. Please find the gist here and let us know if it is still an issue at your end.
Thanks.

Closing as stale. Please reopen if you'd like to work on this further. Thanks!


Use distributed ledger to record BX-bot trades using Hyperledger

An experimental Blockchain project to register BX-bot trades using Hyperledger.

Hyperledger experiment is happening in a different project:
https://github.com/gazbert/blockchain-mortgage-demo


can i get My owne Server?

this is first time her and i have some questions !
I like this app much more any app seen before...
iwant ask if i can Get my owne server ( kaiwa self-hosted ) in my server and mange my owne users?
if i get my owne server ::
Wher is My kaiwa panel !
IF kaiwa support admin right to mange server to control users >like kick - ban - mute - delete ..etc

Kaiwa is only a client. It's sort of like Gajim or Pidgin, except that it runs in a web browser, sort of like Converse.js. If you want a server, you need to install XMPP server software, such as Prosody or ejabberd, onto a server. Then you can serve the Kaiwa client from that or any other server running node.js to give your users a web client to connect to your XMPP server. As far as I know, Kaiwa does not support administration, unless of course you enable some feature like mod_admin_message in your XMPP server, but that shouldn't stop you from using other means of administration.

so that mean i can intergate with Rocket Chat its also work With node js !


How to compute inter-mic distance for general mic arrays and cylindrical noise

Hi @ehabets , thank you for sharing this code! I am implementing the method for general arrays to integrate in pyroomacoustics, and I have a couple of question about cylindrical noise.

The papers and the code are not completely clear about how the distance d between two sensors should be interpreted for general arrays in 3D. If the cylinder axis is the z-axis, is it correct to take d as the horizontal distance sqrt(x ** 2 + y ** 2) ?
While inspecting the code, I saw that you recommend to use Cholesky rather than eigenvalue decomposition for babble noise. What is the rational for that ?

Thank you in advance for your help!

Thank you for your inquiry, @fakufaku.

For a 3D array, you indeed need to take the Euclidian distance between the points.
The EVD produces eigenvectors that can largely vary from one frequency band to the following. This can lead to discontinuities in the filters’ magnitude response. The Cholesky decomposition was found to produce "smoother" magnitude responses and, consequently, more natural-sounding babble noise. A discussion and some improvements are discussed in [1].

[1] https://doi.org/10.1121/10.0003565

Thanks for the quick replay! Just to confirm:

For spherical noise, we use the sinc function and the 3D euclidean distance. For cylindrical noise, we use the Bessel function and the horizontal distance between sensors (i.e., ignoring z). Is that correct ?
I see, interesting! Thank you for the additional reference!

Correct. Please note that these models hold only for omnidirectional sensors in free-field.
You're welcome.

Please note that these models hold only for omnidirectional sensors in free-field.

Excellent point, I need to add an error or warning if directional microphones are used! 👍
Thank you so much for your help! 🙏

Here is where I started to add the code in case you are interested!
https://github.com/LCAV/pyroomacoustics/pull/296


window/showDocument cannot show two documents because of preview mode

If you have preview mode enabled, window/showDocument cannot be used to open two different documents because the last one will just overlap on top of the first one.
Is this behaviour intentional?

This is something VS Code decides and is not under the control of the LSP VS Code client lib. I am pretty sure that the same happens when using the VS Code API directly. Have you tried this?

Actually I don't want to add preview to the spec. This is very specific to editors. I think the best you can do for now is to handle this in the middleware. Is this OK for you?


enable whimsy to submit mlreqs on behalf of committers

This is needed to implement a fix for https://github.com/apache/whimsy/issues/35


Which of RV64GBCV, RV64GCBV, and RV64GCVB is legal?

Hi, I've seen vendors say that RV64GBCV, RV64GCBV, and RV64GCVB are all used when implementing the B and V extensions in the specification. Which of RV64GBCV, RV64GCBV, and RV64GCVB is legal according to the RISC-V specification?

According the table in the spec[1], rv64gcbv is the (more?) canonical one.
[1] https://github.com/riscv/riscv-isa-manual/blob/main/src/naming.adoc#subset-naming-convention


[FEATURE]  Add Stretchable Sidebar to Playground

Why do we need this improvement?
We need this improvement to enhance the user experience and usability of the Playground section in our project. Currently, users have the option to hide the entire sidebar, but they cannot resize or stretch the sidebar to view the full code content. This limitation can be frustrating for users, especially when they need to view longer sections of code without excessive scrolling.
By adding a stretchable sidebar feature, users would have the flexibility to expand the width of the sidebar horizontally, allowing them to view the entire code content comfortably. This enhancement would improve the overall usability of the Playground section and make it more intuitive and user-friendly.
this improvement is necessary to provide a smoother and more efficient experience for users interacting with the Playground section, ultimately enhancing their ability to navigate and interact with the code effectively.
How will this change help?
This change will help improve the usability and functionality of the Playground section in our project in several ways:

Enhanced Viewing Experience: The addition of a stretchable sidebar will allow users to expand the width of the sidebar horizontally, enabling them to view the entire code content without having to scroll excessively. This will enhance the overall viewing experience and make it easier for users to navigate and understand the code.

Increased Efficiency: With the ability to stretch the sidebar, users can quickly access and review longer sections of code without the need for repetitive scrolling. This will save time and effort for users, increasing their efficiency when interacting with the Playground section.

Improved Accessibility: The stretchable sidebar feature will make the code content more accessible to users with varying screen sizes and resolutions. Users will be able to adjust the width of the sidebar according to their preferences and viewing devices, ensuring optimal readability and usability for all users.

Better Code Analysis: By providing users with a clear and unobstructed view of the entire code content, the stretchable sidebar will facilitate better code analysis and comprehension. Users will be able to focus on understanding the code logic and structure without distractions or limitations imposed by the interface.

this change will significantly enhance the usability, efficiency, and accessibility of the Playground section, ultimately improving the overall user experience and satisfaction with our project.
Screenshots

How could it be implemented/designed?

User Interface Design:

Add a draggable handle or separator between the sidebar and the main content area.
When users hover over the handle, display a cursor indicating that the handle is draggable.
Implement visual feedback, such as a change in cursor appearance or highlighting, to indicate the dragging action.

Resize Functionality:

Allow users to click and drag the handle horizontally to resize the width of the sidebar.
Implement logic to dynamically adjust the width of the sidebar and the content area as the handle is dragged.

Constraints and Limits:

Set minimum and maximum widths for the sidebar to prevent it from becoming too narrow or too wide, ensuring a usable and aesthetically pleasing layout.
Consider responsive design principles to accommodate different screen sizes and resolutions.

Persistence:

Save the user's preferred sidebar width in local storage or as part of their user settings, so that it persists across sessions.
Ensure that the selected sidebar width is maintained when navigating between pages or refreshing the browser.

Accessibility Considerations:

Ensure that the stretchable sidebar feature is accessible to users with disabilities by providing keyboard navigation options and ensuring compatibility with screen readers.
Implement appropriate aria roles and attributes to convey the purpose and state of the stretchable sidebar to assistive technologies.

Testing and Iteration:

Conduct usability testing with a diverse group of users to gather feedback on the implementation and design of the stretchable sidebar feature.
Iterate on the design based on user feedback and make necessary adjustments to improve usability and user satisfaction.

the stretchable sidebar feature can be implemented and designed to provide users with a flexible and intuitive way to resize the sidebar according to their preferences, enhancing the overall user experience of the Playground section in our project.
🚧 Breaking changes
Yes
👀 Have you checked for similar open issues?

[X] I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

[X] I have read the Contributing Guidelines

Are you willing to work on this issue?
No, someone else can work on it.

cc @devilkiller-ag

Hi @GUNGODD, thanks for your suggestion! I think it would be better if we make the interface between the input and output editor stretchable instead of the option and navigation sidebar as:

Decreasing the sidebar's width will make it hard to fit dropdowns and checkboxes in the same row.
Increasing the sidebar width won't help solve our issue of less editor width.

However, we need to keep in mind that the editor is only for trying and playing with modelina.
@jonaslagoni  what's your view on this?

I completely understand your point about the limitations of adjusting the sidebar width and the importance of maintaining a functional editor space.
After considering your input, making the interface between the input and output editor stretchable could offer a more versatile solution. By allowing users to adjust this area, we can provide flexibility without compromising the usability of dropdowns and checkboxes in the sidebar.
It's crucial to maintain a balance between editor space and sidebar functionality, especially considering that our editor primarily serves as a tool for experimenting with Modelina.
I'll proceed with exploring the implementation of a stretchable interface between the input and output editor. If you have any other suggestions or considerations, please feel free to share them with me.

We can use an existing implementation of Split Pane from AsyncAPI Studio. But as far as I remember it is adopted from another open-source repository by Jeremy Grieshop and uses many outdated dependencies.
There is another option (better from my pov), we can use a Resizable Component from ShadCN UI. ShadCN UI components are highly customizable and open-source.  Can I join and offer some help or submit a PR with a fix?

Hi @AKACHI-4, You can work on this issue ✨

Thanks @devilkiller-ag would raise PR ASAP.

@AKACHI-4, sorry I have been offline due to midterms. I would like to work on this too. Please make sure to share your work progress with me.

Hey @GUNGODD, I raised a PR, kindly check, that will surely help you out.

gotcha  ..

Hey @devilkiller-ag we need to add arroe icon right (wrt #1908 )

Hey @devilkiller-ag we need to add arroe icon right (wrt #1908 )

I was talking about this comment

working on this @devilkiller-ag

Any updates on this @ibishal?

@jerensl Would you like to work on this issue?

@jerensl Would you like to work on this issue?

Sure, I will start to work on this next week

@jerensl Would you like to work on this issue?

Sure, I will start to work on this next week

Okay great!


Setting IP Address in unit test to pass the ipRestrictions middleware

Discussed in https://github.com/orgs/honojs/discussions/3458

Originally posted by snowfluke September 27, 2024
Hi, thank you for the amazing works.
I just wondering how can I set an IP Address in the app.request() in unit test using bun:test.
Because I've got an error stating that:
src/test/index.test.ts:
4 |   const server = getBunServer(c);
5 |   if (!server) {
6 |     throw new TypeError("env has to include the 2nd argument of fetch.");
7 |   }
8 |   if (typeof server.requestIP !== "function") {
9 |     throw new TypeError("server.requestIP is not a function.");
              ^
TypeError: server.requestIP is not a function.
      at getConnInfo (/home/ppu/ocr-bun/node_modules/hono/dist/adapter/bun/conninfo.js:9:11)

My test is fairly simple one:
// index.test.ts
  test("GET /", async () => {
    const res = await app.request("/", {}, MOCK_ENV);

    expect(res.status).toBe(200);
  });

// index.ts
app.use(
  "*",
  ipRestriction(
    getConnInfo,
    {
      denyList: [],
      allowList: ["<IP_ADDRESS>", "::1", "*"]
    },
    async (remote) => {
      throw new UnauthorizedError(
        `Your IP Address (${remote.addr}) is blocked`
      );
    }
  )
);

Solve by adding server object to the mock_env and passing it as third argument in app.request():
const MOCK_ENV = {
    server: {
      requestIP: () => {
        return {
          address: '<IP_ADDRESS>',
          family: 'foo',
          port: '123'
        }
      }
    }
}

Reference: https://github.com/honojs/hono/issues/3460


Empty Dataframes don't display

Based on ITables the following code doesn't show the UI
from itables.sample_dfs import get_dict_of_test_dfs
dict_of_test_dfs = get_dict_of_test_dfs()
dict_of_test_dfs["empty"]

.take

df = pd.DataFrame(columns=[])
Dataframe with no columns doesn't showup so Buckaroo doesn't showup.


Fix react-native-tts conflict causing earpiece output

Fix for compatibility with react-native-tts allowing media/case speaker usage instead of earpiece

This is an iOS only issue.. in fact, an iPhone only issue, as iPad has no earpiece

I believe this is the original issue for which a PR was not done: https://github.com/wenkesj/react-native-voice/issues/75

What needed to be done to make it merged in and publish?

I don't have merge privileges... but if you want the fix in the short term you can 'npm install' it from my fork/branch via this URL:
https://github.com/jferas/react-native-voice.git#earpiece_fix

@jferas I've made some investigation and testing, this PR affects a bug related to onSpeechPartialResults method. It newer calls this method with all possible results (include just one possible result).
Expected behaviour: Invoked when any results are computed (as usual include only 1 item in the array) and the last invoke should include all possible results.
Suggestion from @dalinarkholin works for me. Diff, https://github.com/dalinarkholin/react-native-voice

@peteychuk is this good to merge? or we need to apply another patch?
do you wanna to send a PR to fix this?

@sibelius this PR needed another patch of course as it broke some stuff (I've described above).
https://github.com/dalinarkholin/react-native-voice works for me in my cases. I think it makes sense to create PR from @dalinarkholin fork.
Anyway, I'm not confident enough to say that nothing broke.

@peteychuk can you test using master?
I think this and https://github.com/wenkesj/react-native-voice/issues/50 is fixed on master

I'm using TTS, and it is working fine with master

Note: setting the audio session to AVAudioSessionCategoryRecord while the user is playing audio may crash the app. I'm pretty sure that you'd need to check the current session category to determine what category to set (in this case, either PlayAndRecord or Record).

Hi all, is there a way I could test this? Not sure what the use case is thanks!


Add additional encryption options

[x] Merge after #26

Added options to set up kms keys for Pub/Sub and GCS

I will move it to draft as need to fix some points.
Also cmek is missing for dataflow service - improvements required.
I've opened issue for hardening discussions #35


__tracer is not created when an error happens

If you instrument this code
console.log(123);
throw new Error('no');
console.log(456);

the ___tracer variable is never created. The documentation claims that you can use fondue to track where errors happened but if an error being thrown breaks fondue then this doesn't seem to be possible

Oops, seems to be an issues with something in our stack.


Some Shader code doesn't work as expected on Android.

Description
Hello Skia team. I love trying something fun with Skia.
I'm trying to build image filter feature with Shader and I found out some shader code doesn't work on Android devices.
It works as expected on iOS devices.
I attached the code to reproduce.
Thanks :)
Version
1.2.3
Steps to reproduce

This is the result of the code below. The Shader code below works well on iOS but it doesn't on Android devices. I couldn't get what's wrong with the code because there is no error.
You can reproduce with the code below.
Thanks :)
Snack, code example, screenshot, or link to a repository
import {
  Canvas,
  Fill,
  ImageShader,
  rect,
  Shader,
  Skia,
  useImage,
} from '@shopify/react-native-skia';
import { useWindowDimensions } from 'react-native';

type Value = string | number;
type Values = Value[];

export const glsl = (source: TemplateStringsArray, ...values: Values) => {
  const processed = source.flatMap((s, i) => [s, values[i]]).filter(Boolean);
  return processed.join('');
};

export const frag = (source: TemplateStringsArray, ...values: Values) => {
  const code = glsl(source, ...values);
  const rt = Skia.RuntimeEffect.Make(code);
  if (rt === null) {
    throw new Error("Couldn't Compile Shader");
  }
  return rt;
};

const source = frag`
uniform shader image1;
uniform shader image2;
uniform vec2 resolution;
const half3 W = half3(0.2125, 0.7154, 0.0721);

half3 overlayBlender(half3 Color, half3 filter) {
  half3 filter_result;
  float luminance = dot(filter, W);

  if (luminance < 0.5)
    filter_result = 2. * filter * Color;
  else
    filter_result = 1. - (1. - (2. * (filter - 0.5))) * (1. - Color);

  return filter_result;
}

half3 BrightnessContrastSaturation(half3 color, float brt, float con, float sat) {
  half3 black = half3(0., 0., 0.);
  half3 middle = half3(0.5, 0.5, 0.5);
  float luminance = dot(color, W);
  half3 gray = half3(luminance, luminance, luminance);

  half3 brtColor = mix(black, color, brt);
  half3 conColor = mix(middle, brtColor, con);
  half3 satColor = mix(gray, conColor, sat);
  return satColor;
}

half4 setFilter(vec2 uv) {
  half3 imageColor = image1.eval(uv * resolution).rgb;
  half3 filter = image2.eval(uv * resolution).rgb;

  // Adjust the brightness/contrast/saturation
  float T_bright = 1.0;
  float T_contrast = 1.0;
  float T_saturation = 1.0;
  half3 bcs_result = BrightnessContrastSaturation(imageColor, T_bright, T_contrast, T_saturation);

  // More red, less blue
  half3 rb_result = half3(bcs_result.r * 1.3, bcs_result.g, bcs_result.b * 0.9);

  // Add filter (overlay blending)
  half3 after_filter = mix(rb_result, overlayBlender(rb_result, filter), 0.55);

  return half4(after_filter, 1);
}

half4 main(vec2 fragCoord) {
  vec2 uv = fragCoord / resolution;
  return setFilter(uv);
}
`;

const Playground = () => {
  const { width: stageWidth, height: stageHeight } = useWindowDimensions();
  const bounds = rect(0, 0, stageWidth, stageHeight);

  const uniforms = {
    resolution: [stageWidth, stageHeight],
  };

  const image1 = useImage(
    'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQmIVmEWQg8wNvhxXSpDgASADcCyYGwPl0R_eS0vwD8NA&s',
  );
  const image2 = useImage(
    'https://github.com/yulu/Instagram_Filter/blob/master/res/drawable-hdpi/toaster.png?raw=true',
  );
  if (!image1 || !image2) {
    return null;
  }

  return (
    <Canvas
      style={{
        width: stageWidth,
        height: stageHeight,
      }}
    >
      <Fill>
        <Shader source={source} uniforms={uniforms}>
          <ImageShader image={image1} rect={bounds} fit="cover" />
          <ImageShader image={image2} rect={bounds} fit="cover" />
        </Shader>
      </Fill>
    </Canvas>
  );
};

export default Playground;

Thank you @daehyeonmun2021 for such a concise and nicely reproducible example. if you replace the use of the filter variable name, it will work nicely on Android too. I am currently investigating why this error wasn't nicely throw on the React Native side.

@wcandillon Thanks :D


Error AuthenticationRequiredError (401): X-Apikey header is missing

I am trying to integrate your module to our guilded bot using this piece of code:
async def scan(ctx, *, url):
  print(f"{space.a}{pointer.c} Scan command triggered.")
  print(f'{space.b}{pointer.d} Data: "{url}"')
  with virustotal_python.Virustotal(VirToken) as vtotal:
    try:
        resp = vtotal.request("urls", data={"url": url}, method="POST")
        # Safe encode URL in base64 format
        # https://developers.virustotal.com/reference/url
        url_id = urlsafe_b64encode(url.encode()).decode().strip("=")
        report = vtotal.request(f"urls/{url_id}")
        await ctx.send(embed=guilded.Embed(
    title="Scan Command",
    description=f"""Scan info for {url}\n\nObjectType:\n```{report.object_type}```\nData:\n```{report.data}```""",
    color=embed_color))
    except virustotal_python.VirustotalError as err:
        await ctx.send(embed=guilded.Embed(
    title="Scan Command",
    description=f"Failed to send URL: {url} for analysis and get the report: {err}",
    color=embed_color))

Then whenever I run this, I always receive this kind of error:

I wish someone would help me with this issue. Thanks!

Hi @RedFurrFox
Thanks for checking out the library.
Are you using the latest version available 1.0.0:
pip list | grep virustotal-python

I can see you've taken the example from the README, I just tested with 1.0.0 and all is working as expected. HTTP status 401 indicates that you may not have provided the API key correctly, can you check that the VirToken variable is populated correctly with your API key?

401
AuthenticationRequiredError
The operation requires an authenticated user. Verify that you have provided your API key.

Taken from: https://developers.virustotal.com/reference/errors

ohh my bad I forgot to recall that string xd. Thanks for the tip tho


Dev v3.2.1

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

93 of 97 (95.88%)  changed or added relevant lines in 5 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.4%) to 97.231%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

repository/IngSoft2-Model/Lightyear.class.st
0
4
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.4%

Covered Lines:
913

Relevant Lines:
939

💛  - Coveralls


[AUTOPATCHER-CORE] Upgrade mysql to 8.0.33 address CVE-2023-21976, CVE-2023-21972, CVE-2023-21982, CVE-2023-21977, CVE-2023-21980 -

[AUTOPATCHER-CORE] Upgrade mysql to 8.0.33 address CVE-2023-21976, CVE-2023-21972, CVE-2023-21982, CVE-2023-21977, CVE-2023-21980
Upgrade pipeline run -> https://dev.azure.com/mariner-org/mariner/_build/results?buildId=348979&view=results
AMD64 build -> https://dev.azure.com/mariner-org/mariner/_build/results?buildId=348991&view=results
ARM64 build -> https://dev.azure.com/mariner-org/mariner/_build/results?buildId=348992&view=results

verified that ARM64 build by re-running build pipeline (break was due to an infra issue)


[SYSTEMML-884] Fix Scala Map MLContext input

Update scala.collection.Map<String, Object> to scala.collection.Map.
to avoid asInstanceOf casts of ints/doubles/etc from Scala.
Add comments to input methods of Script.
Create output methods for Script.

This allows the following code to work from Spark Shell:
val addScript = dml("print(a + b)")
addScript.in(Map("a"->1,"b"->2))

rather than needing to cast (as previously required), as in the following:
addScript.in(Map("a"->1.asInstanceOf[AnyRef],"b"->2.asInstanceOf[AnyRef]))

Awesome, thanks for finding a fix for this, @deroneriksson.  LGTM.

Sure I'll add a comment to describe the reasoning.
Thanks for reviewing.


Readonly in declaration files (part 2)

Augments #6697 to emit readonly modifier in declaration file for get-only accessors in classes.

:+1:

:+1:

I'm concerned that this creates .d.ts files that are non-backwards compatible with versions of tsc introduced before readonly support.
As an example, we had a class with some get-only accessors as part of a library we use internally, and we started compiling the library with typescript@next. This broke usage by internal applications that were still using the TS 1.8.x line, because they couldn't consume the new typings.

@JKillian would adding an empty setter to the source class be a problem?

@mhegazy That could be a good work around, or just changing the accessor to a regular method could work for us as well.
Really, just wanted to mention this because it was a surprising back-compat issue and I wasn't sure if it was intended or not.

Thanks @JKillian, this is not the first time we got this feedback, I will bring this up in the next design meeting.

Sounds good. I think this case would be solved nicely in a way similar to that mentioned here: that is, a "typingsTarget" option of some sort that lets you emit typings that will be compatible with older versions of the compiler. Of course, I don't know the complexity or difficulties of that, I'll happily work with whatever you all decide.

looping back, we are sorry we did not catch this issue as part of implementing the readonly properties. moving forward we will be more cognizant of adding new syntax to generated .d.ts files for new features.
it seems there is no clean solution for this issue, that does not involve yet another compiler flag. we would recommend either adding an empty setter or using a post build script to remove the reference to readonly for now. again sorry for the inconvenience, and we will add dts compat to our new feature checklist in the feature.


Enrich Xml comment response documentation with content type and schema and examples

Xml response documentation should allow specifying more than a simple description. I would like to document my controllers with an enriched <response> node:

allow <response code="123">description here</response> (currently supported)
allow specifying the response content type in xml in 3 ways:<response code="400" contentType="application/problem+json">description here</response>

where this form restricts the content type to be only that type, or<response code="400">
  <contentType>application/problem+json</contentType>
  <contentType>application/problem+xml</contentType>
  <contentType>text/plain</contentType>
</response>

where this form adds an additional content type to the set of possible or:<response code="400">
  <example contentType="application/problem+json">...</example>
  <example contentType="application/problem+xml">...</example>
</response>

where this form adds specific examples for the negotiated content types
allow specifying the schema of the response type:<response code="400" type="MyNamespace.ReturnType"></response>

allow description to be placed directly inside <response> or inside a <description> tag inside response
allow <example> elements inside <response>; if only 1 per content type exists, place in the Example member but if multiples exist place in the Examples member; examples without a contentType attribute should be tied to the content type on the <response> node.
allow <response example=""> example attribute for simple example form.

Also it would be nice if the [SwaggerResponse()] attribute could do exactly the same things.

ITNOA
I need this feature too

@martincostello Do you have any idea to how to begin this?

I would start with looking here and go from there.


WeVidi video download support

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

[X] I understand that I will be blocked if I remove or skip any mandatory* field

Checklist

[X] I'm requesting a feature unrelated to a specific site
[X] I've looked through the README
[X] I've verified that I'm running yt-dlp version 2023.01.06 (update instructions) or later (specify commit)
[X] I've searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue

Provide a description that is worded well enough to be understood
I would like WeVidi video download support implemented into this as said in the title.
If you don't know what WeVidi is, it's basically a YouTube alternative that's like Vidlii but with actually good moderation as stated in the example video URL.
Example of a WeVidi video URL: https://wevidi.net/watch/UOxjNMyp70w
Provide verbose output that clearly demonstrates the problem

[x] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[X] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
[debug] Command-line config: ['-vU', 'test:youtube']
[debug] Portable config "yt-dlp.conf": ['-i']
[debug] Encodings: locale cp65001, fs utf-8, pref cp65001, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2023.01.06 [9d339c4] (win32_exe)
[debug] Python 3.8.10 (CPython 64bit) - Windows-10-10.0.22000-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg N-106550-g072101bd52-20220410 (fdk,setts), ffprobe N-106624-g391ce570c8-20220415, phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2023.01.06, Current version: 2023.01.06
yt-dlp is up to date (2023.01.06)
"wevidi_video.mp4" is the filename for the WeVidi video
"https://wevidi.net/watch/" is the url for the video, and "video_id" is the id for the video
[command] yt-dlp -o wevidi_video.mp4 "https://wevidi.net/watch/video_id"
yes i know it probably doesn't meet up with the proper syntax but idk what does💀

I'm requesting a feature unrelated to a specific site

Make sure to use the appropriate issue template. Read, don't just blindly check the boxes!
Post a verbose log attempting to d/l from the site being requested
yt-dlp -vU "https://wevidi.net/watch/UOxjNMyp70w"


add warning to CI

DO NOT MERGE IT YET

Removed allowed failure for windows and macos. Disabled matrix cancellation on failure. Seems output better) @brxken128 You can merge now)

Removed allowed failure for windows and macos. Disabled matrix cancellation on failure. Seems output better) @brxken128 You can merge now)

Do we know why the tests are failing on Windows and MacOS? Is it something to do with different path handling between the platforms? I had some really, really odd issues with that before.

Do we know why the tests are failing on Windows and MacOS?
only Windows.

Is it something to do with different path handling between the platforms?
I think so)

I'll try to fix)

Good luck! It's probably something annoying - it might require platform-specific #cfg[] calls? Best thing I can think of :)


Set the correct initial state for the useMedia hook

Description
Fixes #2436
This change updates useMedia to use React's lazy-initialization for useState. Instead of always returning false as the initial state, it will do an initial matchMedia call (if not on the server). This can help in prevent screen flickering for UIs that use this hook, and will prevent a render cycle as well.

Closing for the concern of SSR. useMediaLayout prevents the jitter (although it doesn't prevent the component from needlessly rerendering, at least on the client side).