Weak reference

I would like to save weak references to ruby objects of type MRB_TT_DATA.
I have been trying to save the object's mrb_value but I have found that, upon reusing the mrb_value later, I get unexpected behaviour such as raising NoMethodError when calling a method on the object that I know exists.
So my question is, should I be able to safety store an mrb_value and use it well later in the program as long as the gc callback has not been called on the object?
If not, can I use something like mrb_ptr() to store some sort of pointer to it?

It looks like your host language environment (hosting mruby) destroyed object whose reference was in MRB_TT_DATA. Probably that language GC decided that there are no references to object, and collected it.
If that was the case - try to signal to host language GC that object is still "alive" while in MRB_TT_DATA.

Weak references cannot be implemented without associating garbage collector update. Currently, we have no plan to tweak GC to implement weak references.
Reopen the issue if you really really need weak references (at our cost).

What I am building is a project to access java script objects in ruby (and vice versa but I have that working successfully).  A JSWrapper stores a reference to it's js object as a pointer to an emscripten::val. For this reason JSWrapper are of type MRB_TT_DATA. This part works well, but if I call the function again and it returns the same js object I want it to be converted into the same JSWrapper instance that is already pointing to that js object. For this reason, when a new JSWrapper is built I take it's mrb_value, store it as a property of the js object and can supposedly look for and retrieve that property every time a js object is converted in to a JSWrapper that has already been previously converted.
My assumption is, because JSWrapper is already of type MRB_TT_DATA, when the gc callback is called I can destroy the js property and therefor mrb_value from being used accidentally in the future. Is this assumption correct? My bug my be related to how I am store and retrieving the mrb_value but ether way I wanted to ensure that this was possible. Weak references are important, but for this use I really don't think any modifications need to be made to mruby.

@robfors Try this: when you store object in JSWrapper, store refference to it in a JS hash, or JS array on emscripten side. Check if then your object gets deleted. If it works that way, your object is probably GC-ed on empscripten side, as it "thinks" that there are no live references on JS side to that object.

@dmajkic thanks for the suggestion, I gave that a try, unfortunately I am still having the the issue.
Something weird that I am seeing is duplicate addresses in use.
I have found that I have a faulty assumption on how mruby works. To experiment, I was calling something like
  mrb_value v;
  v = mrb_obj_new(mrb, class_mrb, 0, NULL);
  printf("v%p\n", (void *)&mrb_ptr(v));
  v = mrb_obj_new(mrb, class_mrb, 0, NULL);
  printf("v%p\n", (void *)&mrb_ptr(v));

expecting that the pointer of each object would be different or that the gc callback would be called, but instead it seems to simply overwrite the rb object, so now I am confused.
Here is a simplified factory function that builds JSWrappers.
mrb_value build(val object_js)
{
  mrb_value js_wrapper;

  // try to get existing js_wrapper
  if (object_js_has_backward_reference_property(object_js))
  {
    void* js_wrapper_ptr = get_js_wrapper_ptr(object_js);
    js_wrapper = mrb_obj_value(js_wrapper_ptr);
    return js_wrapper;
  }
  js_wrapper = mrb_obj_new(mrb, class_mrb, 0, NULL);

  // set up forward reference (this part works)
  //   (rb:JSWapper -> c:mrb_value -> cpp:val -> js:object)
  val* object_js_ptr = (val*)mrb_malloc(mrb, sizeof(val));
  if (object_js_ptr == nullptr)
    // throw OutOfMemoryError
  new (object_js_ptr) val(object_js);
  mrb_data_init(js_wrapper, object_js_ptr, &_internal_data_type);

  // set up backward reference
  //    (js:object -> js:rb-weak-reference -> c:mrb_value -> rb:JSWapper)
  void* js_wrapper_ptr = mrb_ptr(js_wrapper);
  set_js_wrapper_ptr(js_wrapper_ptr, object_js);

  return js_wrapper;
}

Am I overwriting existing rb objects like I was in my experiment? Im not really sure how to fix it.

I have narrowed down the issue. I believe the mruby gc is collecting an object that is still referenced.
I am calling this rb method (from ruby):
def array(array_rb)
  # array_rb == [#<JSWapper>, #<JSWapper>, #<JSWapper>] # the first element is the one that gets mistakenly collected soon
  array_js = JSWapper.global.call(JSWapper.string("Array"))
  array_rb.each { |item| array_js.call(JSWapper.string("push"), item) }
  array_js
end

JSWapper::global is a c function that returns the element that will get mistakenly collected soon
array_js is a JSWapper
JSWapper#call is a c function
JSWapper::string is also a c function
the gc is arbitrary run during JSWapper.string("push") of the first iteration of each
by the time the first array_js.call is run, item has already been mistakenly destroyed

Could there be an mruby bug where mruby sees the result returned from JSWapper::global and thinks that, because it is not referenced any more (and some how ignore the reference from array_rb) it can be destroyed?
I don't know if there is much here to go on. I wish I could simplify my code base so I could submit something so the problem could be reproduced, but the bug is partially non deterministic, every change I make (even after the point of execution of the error) will change it's behaviour. Sometimes my test suite fully passes and sometimes I get other random errors. I can say, at least, that the bug goes away when I disable the gc.

Is it possible to investigate how JSWrapper is implemented (by source code)?

That would be awesome. I have created some git repos.
Note that JSWapper is actually called JSInterface in my code.
Look at js_interface.cpp and js_interface.hpp for comments.
Here is the way my project is structured:
bruby-bridge-mruby-embind implements the low level stuff, specific to mruby and embind. Look at the dev branch.
bruby-bridge is built on bruby-bridge-mruby-embind. It is .rb and .js files only. It has the JSValue class which is built on JSInterface.
Running the test suite of bruby-bridge-mruby-embind unfortunately passes with no issues. It's only when I run the test suite of bruby-bridge the the bug pops up, but given that  bruby-bridge is only .rb files it obviously does not have any non deterministic bugs.
The method where the bug happens (at the moment) is at interface_array.
Because this project compiles to js code, gdb is out of the question. In the debug branch of bruby-bridge-mruby-embind I have added a bunch of printfs to track the execution. In log.txt I have logged the output of running the test suite of bruby-bridge (note the bottom of it, I have added some of the js objects the JSInterfaces are referring to and it shows the point in execution that the gc collected the object). Note that it only made it to 13 of the 100 long loop at the top of js_value.rb.
If you need to run it yourself let me know and I will set everything up and give instructions on how to get to this result.
Thanks for any help you can give to solve this mess!

If you think my implementation of JSInterface is correct and their might be a bug with _mruby_s gc, I could replace the emscripten::val with a dummy class and compile everything to a traditional assembly executable. Then gdb could be used to search for the bug. Would that help?

I finally found the culprit! It was the overriding of == and  != (either one will break things). I guess mruby calls these internally and can not handle these methods doing complex operations in C (or being overridden at all?). I tried modifying them to immediately return the obvious value if the other operand is not of type JSInterface, and then simply returning true or false, but it still results in memory corruption.
As far as my project is concerned, leaving the default comparators should work for some of the cases, just not comparing JavaScript primitives as they are always converted into new JSInterfaces regardless if one already exists.
I guess it was Ruby code that produced non deterministic behaviour!


Multiple classifications from the same dataset

Hi, this library is awesome 🦾 I am working on a text classification problem and I would like to predict two values: a single value for category A and a single value for category B, starting from the same text (120-130 words in English).
Are there any examples that I can look at?

Hi:  Thanks.  If the two values are not mutually exclusive (i.e., both Category A and Category B can have 99% softmax probability for same example), then this is a multilabel classification problem and you can look at the multilabel section of the text classification tutorial.
If the probabilities are mutually-exclusive, you can get the "probabilities" of both classes using return_proba=True, which is also described/demonstrated in the same tutorial above (E.g., 95% for Category A, 5% for Category B).

Thanks will look more closely into it.

Is it possible to have multiple indepedent multiclassification for each output? e.g. f(x) = [3, 2, 5] where the classes can be categories from 0 to 10 each?


Allow pasting into fields in test UI

I'm not 100% about this fix, I might be missing some nuance about how search bar items work
But the reason pasting was not working is because item.value ||= clipboardText was never updating, because item.value was truthy:

This PR changes it to always replace item.value with the pasted text
An alternative fix would be to remove the {current: true} from the Custom item, so that item.value is just whatever that field contains, but I'm not sure what that represents/would do.
Actually I guess that wouldn't work because then you couldn't paste unless the field was empty. I'm not sure if there are circumstances where we shouldn't change item.value on paste though.
Fixes #188

Gotcha thanks, fix looks good! :)


Updated the footer component

Pull Request Template
Description
I have redesigned the footer :

By adding space between the links
Colors the icons according to their logo
Adding the space between the icons and the text
Changes the color of the headings
In desktop view, resolve the extra empty space.

The motive is to make it more attractive and innovative and to enhance the understandability of the users.
Fixes #98
Type of change

[x] Breaking change (fix or feature that would cause existing functionality to not work as expected).

How Has This Been Tested?

Go to the home page.
Scroll down to the footer.
You can see the expected output.

Additional Context (Please include any Screenshots/gifs if relevant)

Checklist:

[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[x] I have signed the commit message to agree to the Developer Certificate of Origin (DCO) (to certify that you wrote or otherwise have the right to submit your contribution to the project.) by adding "--signoff" to my git commit command.

Same problem as your other PR, your current branch is not up-t0-dated with the development branch.

Ok, I will update it


How can I move a file to another directory?

Is it possible to move a file from its current directory to a different one using oil.nvim?
I know we can move it to a subdirectory by putting NewDir/ in front of the file name. But moving it out of the current directory will require printing the file path relative to a root folder.

Cut the file from the current directory by putting the cursor above it and dd
Navigate to the target directory (using telescope/fzf-lua, :e, or the builtin - keymap to go up a directory)
Paste the file p
Save the buffer :w

Thank you!

What if I'm pasting between 2 nvim instances opened on tmux?
I'm getting error on write:
Error detected while processing BufWriteCmd Autocomma
nds for "oil://*":
Error parsing oil buffers

Oil keeps track of each file by assigning an ID to it. The ID is local to each neovide instance. So, you can't do file operations betweens different Neovim instances

@TheLeoP
Thanks, got it.
Can you suggest then how to paste a file to the desired directory in the Telescope window?

From an efficiency perspective, that just seems like an odd (wrong) thing to want to do? Strikes me as...

I just entered my house through the front door and am standing in the lobby.
I see the kitchen is straight ahead and realize I want a beer from the fridge.
I turn around, exit through the front door I just entered.
I walk around the house and enter through the back patio door and proceed toward the fridge.

In fact, that may have been generous as we may actually be talking about breaking a window.


Eliminate oneof Body from AgentToServer

This eliminates oneof Body from AgentToServer and puts all fields in AgentToServer
which allows to include multiple messages in one AgentToServer. This can reduce
the number of roundtrips and makes it uniform with ServerToAgent.
Resolves https://github.com/open-telemetry/opamp-spec/issues/43

cc @djaglowski if you want to have a look before I merge.


[Feature request] feed list agenda should have an order by

meeting_time?
name?

By name you mean sorting alphabetically?


Android - Crash when editing a message

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Launch the app
Log in with any account
Search for any user
Find you message in the conversation
Click on Edit
Write longer message

Expected Result:
Able to edit a message
Actual Result:
App crashes after editing the message
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platform:
Where is this issue occurring?
Web
iOS
Android ✔
Desktop App
Mobile Web
Version Number: 1.0.69-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
IMPORTANT NOTE: This was only reproducible constantly for 1 tester on a Samsung Galaxy S21/11. Attaching crash logs.
Crash logs
https://user-images.githubusercontent.com/44479856/122128286-6139e880-ce2c-11eb-9dbc-3351e0247aec.mp4
Expensify/Expensify Issue URL:
View all open jobs on Upwork

Triggered auto assignment to @Jag96 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

I can see this crash in crashlytics.
The error here is
Fatal Exception: java.lang.IndexOutOfBoundsException setSpan (107 ... 107) ends beyond length 106

android.text.SpannableStringBuilder.checkRange (SpannableStringBuilder.java:1335)
android.text.SpannableStringBuilder.setSpan (SpannableStringBuilder.java:694)
android.text.SpannableStringBuilder.setSpan (SpannableStringBuilder.java:686)
android.text.Selection.setSelection (Selection.java:94)
android.text.Selection.setSelection (Selection.java:78)
android.widget.EditText.setSelection (EditText.java:152)
com.facebook.react.views.textinput.ReactEditText.setSelection (ReactEditText.java:340)

It looks like this react-native issue could be related: https://github.com/facebook/react-native/issues/29063. I haven't been able to reproduce on my iPhone or on the Android emulator, so there may be more to this. cc @parasharrajat since this is partially related to the discussion going on in https://github.com/Expensify/Expensify.cash/pull/3434#issuecomment-859732106.
All that being said, this is an External issue so applying the External label.

Triggered auto assignment to @NicMendonca (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

Triggered auto assignment to @NikkiWines (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

Posted to Upwork: https://www.upwork.com/jobs/~01b31c0c7bf061f50b

@Jag96 I tried this solution and it's not fixed that issue
I think this was related to this issue so can fix it under that issue.
PROPOSAL 1
How to fix it?
We need to update the below-mentioned functions.
https://github.com/Expensify/Expensify.cash/blob/5394fc8c55f860e98d926076cbac8221fea790b7/src/pages/home/report/ReportActionItemMessageEdit.js#L85
https://github.com/Expensify/Expensify.cash/blob/5394fc8c55f860e98d926076cbac8221fea790b7/src/pages/home/report/ReportActionItemMessageEdit.js#L65
like this
updateDraft(newDraft) {
    this.textInput.setNativeProps({text: newDraft});
    this.setState({draft: newDraft}, () => {});
    this.debouncedSaveDraft(newDraft);
}

debouncedSaveDraft(newDraft) {
    saveReportActionDraft(this.props.reportID, this.props.action.reportActionID, newDraft);
}

PROPOSAL 2
@Jag96 you are right selection has some issues but I tested well and it has just an issue on IOS and yes we can fix it by removing the selection prop for Android as we already not using this prop on IOS.  and after that, I also need to handle some more work that relates to the emoji position on android and can do that under one PR.
Thanks

I posted on https://github.com/Expensify/Expensify.cash/issues/3691 that I was unable to reproduce an issue w/ the same error message on 1.0.73-0, since I'm unable to reproduce this on my emulator @isagoico can we get a retest of this issue for the tester on the Samsung Galaxy S21/11 on the latest E.cash version? Just to confirm it hasn't been fixed by that version

@isagoico just bumping @Jag96's comment above about retesting this issue, in case you missed it!

My bad, we had retested this and forgot to update here. Issue is still ocurring to the same same tester on the same device latest build.

@isagoico is this only reproducible for this one tester on the one device? Or can we confirm that it can be reproduced on multiple android devices? Either way though, since it's reproducible on at least one device, do we want to accept the above proposal for this one @Jag96?

Yep! so far it has been reproducible only on 1 device for 1 tester.

@NikkiWines I haven't had a chance to review the proposals, @aliabbasmalik8 is Proposal 1 preferred over Proposal 2? For Proposal 2 can you expand on and after that, I also need to handle some more work that relates to the emoji position on android.

@Jag96

@aliabbasmalik8 is Proposal 1 preferred over Proposal 2?

YES

Asked internally to get another set of eyes on the proposal to make sure I'm not missing any potential side effects.

So to be clear, you're saying that the problem occurs because the trim function is being used on the draft message, and is causing the selection state to get out-of-sync with the draft message, such that the selection is attempting to index beyond the bounds of the draft message?
And the only change in Proposal 1 is to not trim the draft before updating the state? If so, it seems reasonable. But I do wonder if a better solution would be to fix this upstream in React Native...
Also, do we know the context for when + why the selection prop was disabled on iOS?

One question. If selection prop is disabled on IOS, then how do we manage cursor position there?

@roryabraham for proposal 1, I passed newDraft directly to debouncedSaveDraft function and called this function saveReportActionDraft  with  newDraft value.
the purpose of doing this is setState takes some time to update the state so when we saved value at the backend before updating the state then the previous value saved and this.props. draftMessage have the previous message and the selection is attempting to index beyond the bounds of the draft message
https://github.com/Expensify/Expensify.cash/blob/5394fc8c55f860e98d926076cbac8221fea790b7/src/pages/home/report/ReportActionItemMessageEdit.js#L122
We can also achieve this way
updateDraft(newDraft) {
    this.textInput.setNativeProps({text: newDraft});
    this.setState({draft: newDraft}, () => {
         this.debouncedSaveDraft(); // called function in callback when state update successfully
    }
);
}

Also, do we know the context for when + why the selection prop was disabled on iOS?

Selection Props have a serious problem with Texinput on IOS.
https://github.com/facebook/react-native/issues/29063
https://github.com/Expensify/Expensify.cash/blob/c5707430dff9ecfb631012bb0ba25357c7f367e5/src/components/TextInputFocusable/index.ios.js#L72

I'm sorry @aliabbasmalik8, I am having a lot of difficulty understanding your last comment. First, can you help me understand the race condition you're describing, and why not trimming the newDraft fixes it? Maybe with an example?

@roryabraham Now it can be resolved by updating this function updateDraft
https://github.com/Expensify/Expensify.cash/blob/57f557cd31198a631305b617c374f2418eb5e9fa/src/pages/home/report/ReportActionItemMessageEdit.js#L69-L74
like this
updateDraft(newDraft) {
    this.textInput.setNativeProps({text: newDraft});
    this.setState({draft: newDraft});
    this.debouncedSaveDraft(newDraft);
}

and 2nd point already resolved by someone else by update code from defaultValue={this.props.draftMessage} to  defaultValue={this.state.draft}  at here
https://github.com/Expensify/Expensify.cash/blob/57f557cd31198a631305b617c374f2418eb5e9fa/src/pages/home/report/ReportActionItemMessageEdit.js#L126
Thanks

@roryabraham bumping @aliabbasmalik8's proposal ☝

@aliabbasmalik8 I have the same question that @roryabraham had previously, why does not trimming the newDraft fix the issue here?

@Jag96 right now not trimming fixed the issue.
I mentioned here https://github.com/Expensify/Expensify.cash/issues/3599#issuecomment-877697045
and the first point(that mentioned in the first proposal) is already resolved.

@aliabbasmalik8 can you provide an example to explain why not trimming fixes the issue? I don't understand what the actual issue is and how not trimming the value fixes it.

@Jag96
we used selection in TextInputFocusable props so when we update the message then selection(cursor position) also update and if we use space at the end of the message then trim will remove that space so selection(cursor position) goes beyond the message length so it'll create this issue
https://github.com/Expensify/Expensify.cash/blob/57f557cd31198a631305b617c374f2418eb5e9fa/src/pages/home/report/ReportActionItemMessageEdit.js#L121-L136

@aliabbasmalik8 thanks for the explanation, that sounds reasonable to me. @roryabraham is out this week, so @NikkiWines if you don't have any other questions I think this is good to move forward!

No further questions from me. @NicMendonca you're good to hire @aliabbasmalik8 for this job.

@aliabbasmalik8 can you please apply for the job in Upwork so we can start the contract? Thanks!

@NicMendonca applied for the JOB.
Here is my PROPOSAL: https://www.upwork.com/ab/proposals/1417930058476466177
Thanks

@aliabbasmalik8 hired! Feel free to spin up the PR now. Thanks!

Paid.


How to get all collections using api

The current API docs only who how to get items from a specific collection. How would we go about pulling ALL of the collections and their related entries?
I'm asking this, because i'd like to load an entry based on it's slug in a more generic way. Right now i have to hardcode the collection slug.

First get a collection list and get the entries as needed.
$collections = cockpit('collections')->collections();

foreach($collections as $name => $collection) {
    $entries = $collection->find();
}

Thanks, it works!


Add RUN_ONCE support to zlib init

Includes some coding-standard fixups as well.

Checklist

[ ] documentation is added or updated
[ ] tests are added or updated

This pull request is ready to merge

Merged to master. Thank you for the contribution!


Low quality image on signin page

Description
Adding a new gif on the signin page instead of a low quality image which looks kind of decent.
I have designed the page. Can I go with this?
Screenshots
Low Quality Image-

New GIF-
https://user-images.githubusercontent.com/64919642/194700247-1384040b-09ad-46ab-9b0c-b4ec14237368.mp4
Additional information
I have also made this responsive according to the screen sizes.

Hi , I would like to contribute to this . Please assign this issue to me

@rohan9024 This looks cool. Can you add some similar type of GIF with transparent background?

@Debajyoti14 The gif gets screwed. Can we go with current gif? And also I have replaced more images, can we replace it as well?

https://user-images.githubusercontent.com/64919642/194763565-e40cfc10-c27e-46d4-84b1-de887e24361e.mp4
https://user-images.githubusercontent.com/64919642/194763571-5ce7cb17-9aa2-4653-ada6-c6bf73c8cabf.mp4

@Debajyoti14 who is assigned for this task?

@rohan9024 Assigning you.
Change the about us SVG as u shown.
The SVG u added login screen should have a transparent background.
Work on the changes requested.

@rohan9024 Are you working on this issue?

@Debajyoti14 working on it..... transparent background won't be possible .....can we go with the one I showed you?

@rohan9024 If not Gif, go with appropriate svg

@Debajyoti14 okay sure...can you please guide me on how should I commit changes and create a PR?

Guess you have already forked the GitHub Repo and make the changes in the main branch itself.
That's fine. Just push your code to the github in the main branch.
Then after pushing in the code in your repo,
you will be able to see the contribute button in the home screen of your forked repo.
Then tap contribute
, make a PR.
That's it we will merge it after reviewing the changes.

@Debajyoti14 Bro, I'm having this error.... can you please help?

This should help
https://stackoverflow.com/questions/5335197/gits-famous-error-permission-to-git-denied-to-user


html2canvas-beta-4 not capturing entire screen

I'm been noticing consistent issues (in html2canvas 0.5-beta versions) with screenshot capturing when the page is very long vertically. What appears to happening is that only the portion of the page which is actually within range of the viewport is captured while the rest is cut off.

You might try making sure the page is scrolled to the top when calling html2canvas. I have this problem if I put the button at the bottom of the page, but if the button is at the top of the page and the user is scrolled up, all of the page is captured.

I'm using the html2canvas v.0.5.0-beta4 so I don't understand because not capturing full view. It capture only window size. Did you found a solution? Thanks


Only the primary image shows on the product page

When a product has several images, the thumbnails show up fine. But only the first image is shown when you click on its thumbnail.

I think this commit will help you https://github.com/cscart/cscart-boilerplate/pull/59/commits/1e67537c65941ad4a0ef74e9f7b36d1feb36b99a

That does not work here. It enlarges the height of the container showing all images at the same time. To clarify the problem, this is on the product details page.

This fix doesnt solve the problem, now all images are shown together, one below another

Issue was fixed long time ago.


[$500] IOU - Total Split amount is not displayed on participant LHN

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.4.36-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4263495
Email or phone of affected tester (no customers<EMAIL_ADDRESS>Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:Precondition:
User A and User B (gmail accounts) does not have previous conversation

User A creates group chat with User B and User C
User A creates Split bill
Take a look at User's B LHN

Expected Result:
Total Split bill amount should be present on User's B LHN
Actual Result:
Only shared Split bill amount is present on User's B LHN. Total can only be seen in Search results list
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/b5249080-d02a-4ee8-984a-e3f8f551a393
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01b4ee716715d2a5b2
Upwork Job ID:<PHONE_NUMBER>800477184
Last Price Increase: 2024-02-02

We think that this bug might be related to #vip-split-p2p-chat-groups

What is expected out of it it should show the total amount only. and not the requested amount?

solution :
In IOU.js, ensure that the total amount is correctly calculated and included in the splitData:
javascript
const totalAmount = calculateTotalAmount(participants, amount);
const {splitData, splits, onyxData} = createSplitsAndOnyxData(participants, currentUserLogin, currentUserAccountID, totalAmount, comment, currency, category, existingSplitChatReportID);
In MoneyRequestPreview.js, update the component to display the total amount:
javascript
const totalAmount = props.iouReport.totalAmount || '';
// ...
{totalAmount}

@cjoshi-zeals Both reports should be in LHN

@promisingcoder Please follow the proposal template (check contributing guide)

Like this?

@cjoshi-zeals No, there should be two reports in the LHN: the 1:1 report with the requester showing your due amount and the group report showing the total split amount.

Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
accountIDs is taken from the report.visibleChatMemberAccountIDs array.
https://github.com/Expensify/App/blob/3ab4e6e12d9ff38e69493321f0d31f032481b373/src/libs/OptionsListUtils.ts#L1457
When computing the value of result.tooltipText using the ReportUtils.getReportParticipantsTitle function, report.visibleChatMemberAccountIDs is also used.
https://github.com/Expensify/App/blob/3ab4e6e12d9ff38e69493321f0d31f032481b373/src/libs/OptionsListUtils.ts#L663
This conversation on Slack explains that when notificationPreference=hidden is present, which this true in this case, report.visibleChatMemberAccountIDs should empty because the user didn't actively join yet.

Therefore the item.accountID will be NaN.
What changes do you think we should make in order to solve the problem?

Instead of using report.visibleChatMemberAccountIDs for accountIDs over here and here, we should use the ReportUtils.getParticipantsIDs function.
For consistency, this solution borrows from the LHNOptionsList component displayed below.
https://github.com/Expensify/App/blob/3ab4e6e12d9ff38e69493321f0d31f032481b373/src/components/LHNOptionsList/LHNOptionsList.tsx#L65

@Tony-MK Thanks for the proposal. Your RCA makes sense but the use of visibleChatMemberAccountIDs is actually intended.
🎀 👀 🎀 This seems internal.
When creating a group, all participants should be visible. cc @rlinoz

Looks like this is a dupe of https://github.com/Expensify/App/issues/35537, if it is internal it can be handled here.

haven't had the chance to look at this one yet.

Melv?

Hey Cristi, will you have a chance to look at this one this week?

I can't reproduce this one. It has been fixed. Could you confirm?

Yep, no longer able to repro. Closing!


fix: add mandatory offset

In Node.js 10.x passing in the offset is mandatory. This makes sure everything continues to work as it should.
Refs: https://github.com/nodejs/node/pull/18395

Coverage remained the same at 88.956% when pulling 907c81f8acfdc82ccfc0cff3e4812132932a63a8 on BridgeAR:master into 80b63c08bdb32d04fd36502f24180e0c8e8f69ee on arobson:master.

Ping @arobson

Ping @arobson again

PTAL


What settings could be used by mode sleepTimer please?

Hi, we are happy with the sleepTimer in mode, but we cannot figure out what settings could be used by that? Thanks

A mode can have any settings, as long as they are in this list: https://developers.google.com/actions/reference/smarthome/traits/modes
sleepTimer could have settings of off, on, or maybe Wool. While they may not all make sense, it does provide a fair amount of flexibility.

Sorry, I forgot to mention that's for AC_Unit. For most AC_Units, the sleep timer has settings of Off, 0.5hr, 1hr, 2hrs, etc. Can we use an amount of time in the settings?

Modes only support the string phrases, not specific lengths of time.


svg2pdf: 0.9.1 -> 0.10.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/typst/svg2pdf/releases.
meta.description for svg2pdf is: Convert SVG files to PDFs
meta.homepage for svg2pdf is: https://github.com/typst/svg2pdf
meta.changelog for svg2pdf is: https://github.com/typst/svg2pdf/releases/tag/v0.10.0
Updates performed

Rust version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.10.0 with grep in /nix/store/4gnvxhmgcxsyf8sa2a5bg3n7ac8dqmmx-svg2pdf-0.10.0
found 0.10.0 in filename of file in /nix/store/4gnvxhmgcxsyf8sa2a5bg3n7ac8dqmmx-svg2pdf-0.10.0

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
svg2pdf

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/4gnvxhmgcxsyf8sa2a5bg3n7ac8dqmmx-svg2pdf-0.10.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A svg2pdf https://github.com/r-ryantm/nixpkgs/archive/28b735d287f1f866a530e099ca74ad934ee07aa9.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/28b735d287f1f866a530e099ca74ad934ee07aa9#svg2pdf

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/4gnvxhmgcxsyf8sa2a5bg3n7ac8dqmmx-svg2pdf-0.10.0
ls -la /nix/store/4gnvxhmgcxsyf8sa2a5bg3n7ac8dqmmx-svg2pdf-0.10.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }' run on x86_64-linux 1

1 package built:

svg2pdf

Maintainer pings
cc @doronbehar @figsoda for testing.

@ofborg eval


get errors in IE 11 because the destructuring assignment syntax

module.exports = (target, ...keys) => {

IE11 doesn't support spread operator.
https://caniuse.com/#feat=rest-parameters
This works well on most of browser, but it's basically provided to nodejs.
If you need to let it work completely on many browser, you should use some transpilers.


Is that possible to expose the non-rosetta enpoint through rosetta-cardano?

Hi team,
I am currently working on pulling data from the cardano blockchain, like the validator status and slot leader info.
I think the rosetta-cardano will interact with the Cardano node through cardano-cli. Is that possible to expose the non-rosetta endpoint? Or is the only way to run the cardano-node and cardano-db-sync node exposed to graphQL?

If you'd like to expose the Rosetta Cardano node you can use bind mount on run like --mount type=bind,source="$(pwd)"/ipc,target=/ipc, then set your CARDANO_NODE_SOCKET_PATH to node.socket in the local ipc directory for cardano-cli to use


Library of existing tools - existence and expansion?

Would it be possible to add a larger library of existing tools to this repo?  When I open it, I don't see any existing tools, and I have to create a new library and create a new tool (if that's expected, it would be nice to have that documented, as I could find no guidance on that, and had to play around until it worked.)
I see the small set of tools in the test directory, but I don't see anything in the forum or elsewhere regarding a repo of tools in the freecad tool bit format.  Do you know of such a source?
Thanks, great Addon.

I think having BTL automatically create a library by default makes sense; I am not so sure about creating tools by default.
First to be clear I am talking about tools, not tool shapes (for the latter, BTL already creates common default shapes). Since no two users will have the same tools I don't know that a default set makes much sense if most users would probably just delete them immediately.
But in general, something like an "online tool database" would definitely be nice to have, to make it easier to add tools by part number or other attributes. That idea has been discussed in the FreeCAD forum before.


Analytics collection is not feasible with some plan functions

Describe the Bug
Analytics submissions for add_facts calls on thousands of targets bogs down analytics submissions.
Expected Behavior
Analytics submissions should not degrade performance.
Additional Context
Turning off analytics submission is a good work around for existing installs. Stop collecting analytics by default.

https://github.com/puppetlabs/bolt/pull/3294


[WIP][PTX-2377] Add backup kill stork test

@gleb can u put link to passed torpedo job run

with backup_test enabled
without backup_test enabled.

This PR is expected to work as is when backend is Portworx as well as AKS? If yes, then in that case, can u paste jenkins job links where:

Volume backend is PX.
Volume backend is AKS.
Job without backup test and without any other ENV vars required for backup test to work

@vinayakshnd yes, maybe except numer 2. I need a spawn PR that allows to install stork without getting porx to be merged.

For

@vinayakshnd yes, maybe except numer 2. I need a spawn PR that allows to install stork without getting porx to be merged.

We really don't need to wait for the spawn. Since, in case of AKS, application yaml specs are not referring to PX storage class, event though PX is installed on AKS, applications to be backed up and restored does not use PX.

https://jenkins.portworx.co/job/tp-backup-gleb/27 this is my test on ESXi machines with multiple clusters using PX volume
https://jenkins.portworx.co/job/PX-Backup/job/gleb-aks-backup-job/82/ AKS on multiple clusters without PX volumes


Resolve path to jsdoc-fork

It looks like the build for 85ca4e18888f32ea853d0a47249612807317a0ea only passed because we are using a cached node_modules on Travis (where both the jsdoc and jsdoc-fork packages were found).  I've cleared our Travis cache, so this build will only pass if a clean install works.

Looks good, please merge when it passes on Travis.


Not able to download "Salesforce Extension pack" from vscode

@sandy081
Hi Sandeep, I follow each and every step you mentioned in the above post and attaching the result for the same.
I am also not able to download "Salesforce Extension Pack", getting error "We can not connect to extension market place this time".
Please help me on this.
Help -> Toggle Developer Tools -> Network

To confirm its a DNS issue check if you can access this page https://ms-python.gallerycdn.vsassets.io/extensions/ms-python/python/2019.8.29288/1565127378610/Microsoft.VisualStudio.Services.Icons.Default,
Yes I am able to open the link and see the image.
Help -> Toggle Developer Tools -> Console
Failed to load resource: net::ERR_TIMED_OUT workbench.desktop.main.js:1642   ERR net::ERR_TIMED_OUT: Error: net::ERR_TIMED_OUT     at SimpleURLLoaderWrapper.<anonymous> (electron/js2c/browser_init.js:2623:21)     at SimpleURLLoaderWrapper.emit (events.js:203:13) marketplace.visualstudio.com/_apis/public/gallery/extensionquery:1 Failed to load resource: net::ERR_TIMED_OUT 2workbench.desktop.main.js:6668 Error querying extensions gallery Canceled (anonymous) @ workbench.desktop.main.js:6668 workbench.desktop.main.js:6668 Error querying extensions gallery XHR timeout: undefinedms (anonymous) @ workbench.desktop.main.js:6668 marketplace.visualstudio.com/_apis/public/gallery/extensionquery:1 Failed to load resource: net::ERR_TIMED_OUT
View -> Command Pallette... -> Toggle Shared Process -> Console
2az764295.vo.msecnd.net/extensions/marketplace.json:1 Failed to load resource: net::ERR_TIMED_OUT
Log (shared)
[2020-06-10 11:50:32.933] [sharedprocess] [info] main {"machineId":"48fe33e62508cacf66f14a567d671e76e5f2563e2186c3f7681e1ce13e22add6","windowId":2} [2020-06-10 11:51:13.033] [sharedprocess] [info] Starting to clean up unused language packs.
log(window)
[2020-06-10 11:51:03.595] [renderer1] [error] net::ERR_TIMED_OUT: Error: net::ERR_TIMED_OUT     at SimpleURLLoaderWrapper.<anonymous> (electron/js2c/browser_init.js:2623:21)     at SimpleURLLoaderWrapper.emit (events.js:203:13)
Thanks
Originally posted by @ravi0725 in https://github.com/microsoft/vscode/issues/97484#issuecomment-641762355

I am also not able to download "Salesforce Extension Pack", getting error "We can not connect to extension market place this time"

Do you mean are you able see the extension in the view but not able to install it?
Can you please record a gif or video and share it?

When I type "Salesforce extension pack" in extension search bar , I got error.....

Please enable the log level to trace and try again typing "Salesforce extension pack" in extension search.. and provide
- Help -> Toggle Developer Tools -> Console
- View -> Command Pallette... -> Toggle Shared Process -> Console
- View -> Open View… -> Log (Shared)
- View -> Open View… -> Log (Window)

Help -> Toggle Developer Tools -> Console
Failed to load resource: net::ERR_TIMED_OUT workbench.desktop.main.js:1642 ERR net::ERR_TIMED_OUT: Error: net::ERR_TIMED_OUT at SimpleURLLoaderWrapper.<anonymous> (electron/js2c/browser_init.js:2623:21) at SimpleURLLoaderWrapper.emit (events.js:203:13) marketplace.visualstudio.com/_apis/public/gallery/extensionquery:1 Failed to load resource: net::ERR_TIMED_OUT 2workbench.desktop.main.js:6668 Error querying extensions gallery Canceled (anonymous) @ workbench.desktop.main.js:6668 workbench.desktop.main.js:6668 Error querying extensions gallery XHR timeout: undefinedms (anonymous) @ workbench.desktop.main.js:6668 marketplace.visualstudio.com/_apis/public/gallery/extensionquery:1 Failed to load resource: net::ERR_TIMED_OUT
View -> Command Pallette... -> Toggle Shared Process -> Console
2az764295.vo.msecnd.net/extensions/marketplace.json:1 Failed to load resource: net::ERR_TIMED_OUT
Log (shared)
[2020-06-10 11:50:32.933] [sharedprocess] [info] main {"machineId":"48fe33e62508cacf66f14a567d671e76e5f2563e2186c3f7681e1ce13e22add6","windowId":2} [2020-06-10 11:51:13.033] [sharedprocess] [info] Starting to clean up unused language packs.
log(window)
[2020-06-10 11:51:03.595] [renderer1] [error] net::ERR_TIMED_OUT: Error: net::ERR_TIMED_OUT at SimpleURLLoaderWrapper.<anonymous> (electron/js2c/browser_init.js:2623:21) at SimpleURLLoaderWrapper.emit (events.js:203:13)

Hi @sandy081
Can you please confirm whether the last logs I sent you is correct or you want me to send again.
Also if you can clear me on ,when you say enable log level, from where I can do this, please help.

It seems you are not able to access this URL -https://az764295.vo.msecnd.net/extensions/marketplace.json

{
"malicious": [
"visualstuiocode.emmet",
"joaomoreno.banana",
"JacobeanResearchandDevelopmentLLC.vscode-scxml-preview",
"joaquin6.package-watch",
"KazuoCode.gthubsum",
"MaxGotovkin.tslens"
]
}
Getting this result.

Can you please guide how to resolve this. I am not able to access the url (https://az764295.vo.msecnd.net/extensions/marketplace.json)

Visual Studio Code Insiders, is working fine on my system.
Can we use Visual Studio insider instead of Normal Visual Studio code.
I mean what is the difference ?

@deepak1556 Again I need your help here to figure out why the user is not able to access above URL with in VS Code?

@ravi0725 can you start vscode with --log-net-log=netlog.json from the command line, search for the extension "Salesforce Extension Pack", quit the app and attach the log here.
Can you also check if the issue repros when you create a new user profile for vscode, to do this start vscode with --user-data-dir <new-path-for-user-data>

I  start the vscode from command line but did got get any log when I try to install it "Salesforce extension pack" . Got the same message "Could not connect to marketplace"

Assigning to @deepak1556 as it seems network issues with VS Code. Please assign me back if there is something I can do.

@ravi0725 does this issue still occur for you on the latest version of VS Code (non-insiders)?

Can we use Visual Studio insider instead of Normal Visual Studio code.
I mean what is the difference?

Visual Studio Insiders updates more frequently, but if the issue still occurs for you on the latest VS Code, but not the latest VS Code Insiders, then I wonder whether it is a user-data issue.

@ravi0725 does this issue still occur for you on the latest version of VS Code (non-insiders)?

Can we use Visual Studio insider instead of Normal Visual Studio code.
I mean what is the difference?

Visual Studio Insiders updates more frequently, but if the issue still occurs for you on the latest VS Code, but not the latest VS Code Insiders, then I wonder whether it is a user-data issue.


updates

Type of Change

[ ] Bugfix
[ ] New feature
[x] Enhancement
[ ] Refactoring
[ ] Dependency updates
[ ] Documentation
[ ] CI/CD

Description

Additional Changes

[ ] This PR modifies the API contract
[ ] This PR modifies the database schema
[ ] This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Checklist

[ ] I formatted the code cargo +nightly fmt --all
[ ] I addressed lints thrown by cargo clippy
[ ] I reviewed the submitted code
[ ] I added unit tests for my changes where possible

Any update

Any update

Hey Kindly link the Issue to this PR

I have already done the pr


Support for cache policy

I needed a new parameter in the ResourceType for URLRequest's cachePolicy.
It might be useful for others too so I'm submitting a pull request for you to consider, but keep in mind that merging this would be a breaking change since the cachePolicy is then required.

Thank you @ilessiivi 😄


feat: move all endpoints to one class

TICKETID
Description

Briefly describe what this change will do

How to Test

Add steps to locally test these changes

Checklist

[ ] Tests written or updated for the changes.
[ ] Documentation is updated.
[ ] Changelog is updated.

@MaxAndreassenRPM I have separated out different classes for different types of endpoints. Also added a base class for base url. I am not sure whether naming of classes and functions are great, but let me know if you have suggestions regarding them.


Fix for the storageURI output

In it's current format, the storageURI output breaks (Deployment failed. The template output 'storageUri' is not valid: Index (zero based) must be greater than or equal to zero and less than the size of the argument list)
This is fixed once the storageUri type is changed to "object" rather than string. I have also adjusted the value inside the reference function to use the Microsoft.Storage/storageAccounts Resource Provider.

That's absolutely right, also if we actually want to return the blob storage storageURI rather than the storageAccount object then I think an even better option would be to still cast to the string but bring back the blob storage primary endpoint as the output.
Hence the last output would become :-
"storageUri": {
  "type": "string",
  "value": "[reference(concat('Microsoft.Storage/storageAccounts/',variables('storageName'))).primaryEndpoints.blob]"
}

This also has the advantage of demonstrating traversing the object hierarchy in ARM templates.

@christianreddington : Thanks for your contribution to the Azure documentation! The author, @tfitzmac, has been notified to review your proposed change.

@christianreddington - thanks for making this fix. I have no idea why it took so many days for the process to notify me of the change. Usually, the process is faster.

#sign-off


.setPropertyType() in Property.Builder does not work

Properties in the produced TD do not have @types.

The recent commit https://github.com/thingweb/thingweb/commit/61c383f990ce6c87cbd81314554e5f392e3bd73e should fix this issue.
Please confirm.

Works, many thanks!
Let's go into the next round in a new issue ;)


x/benchmarks: linux-amd64-perf builder failing

#!watchflakes
post <- log ~ `\[sweet\] error: failed to execute benchmarks` && log ~ `no space left on device`

Looking at the x/benchmarks builder status page (e.g. https://build.golang.org/?repo=golang.org%2Fx%2Fbenchmarks ) I see a string of failures on the linux-amd64-perf builder, starting roughly Feb 23. The failures look like they are due to http://go.dev/cl/c/benchmarks/+/462717, but from looking at the failure mode it appears that the testing is encountering an "out of disk space" condition:
[sweet] Setting up benchmark: tile38
[sweet] error: write /workdir/tmp/go-sweet2118815512/work/tile38/experiment/assets/data/appendonly.aof: no space left on device
[sweet] error: failed to execute benchmarks, see log for details

Representative log: https://build.golang.org/log/0d197e2888248afbae28e89b19f1a8fdbdcb2775
The failure is happening with the sweet tile38 benchmark.

This still occurs occasionally..
https://build.golang.org/log/dfe28c1b755f77aed5f7e5ef6e3a3cd0ce7ed4ba:
[sweet] Setting up benchmark: tile38
[sweet] error: write /workdir/tmp/go-sweet2943223291/work/tile38/experiment/assets/gen-data/geonames/allCountries.txt: no space left on device
[sweet] error: failed to execute benchmarks, see log for details
toolchain: experiment

That's on a run at CL 488635, committed Apr. 25.

I mean, yeah, it's definitely copying more data than it strictly needs to. The assets should really be better split between run-time data and gen-time data. That's probably not the sole problem though, but fixing that would probably help.


How to use localePath() with route params?

Unfortunately the docs doesnt show how to use localePath() with route params. E.g.:
/products/[id]

How to do link to such a page? I tried localePath('products/' + id) with no success.

<NuxtLink :to="`${localePath('products')}/${item.global_name}`" v-for="item of products">  ....
for a URL like https://mywebshop.com/en/products/macbook-pro-14
and a Nuxt folder structure like

i18n config in nuxt.config.ts like
	i18n: {
		locales: [
			{
				code: 'de',
				iso: 'de-DE',
				name: 'Deutsch',
			},
			{ code: 'en', iso: 'en-GB', name: 'English' },
		],
		strategy: 'prefix',
		defaultLocale: 'de',
		customRoutes: 'config',
		rootRedirect: 'de',
		pages: {
			index: { de: '/', en: '/' },
			'products/index': { de: '/produkte', en: '/products' },
			'products/[id]': { de: '/produkte/[id]', en: '/products/[id]' },
		},
		detectBrowserLanguage: {
			useCookie: true,
			cookieKey: 'i18n_redirected',
			redirectOn: 'root',
			fallbackLocale: 'de',
		},
	},

I always try to avoid using route names because they are hard to find and sometimes I just cant find the right one at all

I agree they're a bit hidden, I used to check devtools often to make sure I had the correct route name. But currently it's the most reliable way to retrieve routes regardless of i18n configuration, as the route name remains (essentially) the same across languages while the route path does not due to localization, prefix strategy, parameters and encoding.
You can also set a custom route name using definePageMeta({ name: 'my-route' }) if you prefer, this should work as long as Nuxt's experimental.scanPageMeta is enabled.

I use custom route paths per language, e.g. '/products' becomes '/produkte' in German. Now I want to link to '/products/123' and the dev tools show me as the name 'products-id___de'.
This is why I tried to avoid path names, but in this case I have to use them. How can I use them with custom route paths? E.g. I have the following file structure:
/products/index.vue
/products/[id].vue

Which I map to:
/products
/products/123
/produkte
/produkte/123

I think I got it:
localePath({ name: 'products-id', params: { id: props.id } })

I have just published the first release candidate for v9 which includes the experimental typed routes experimental.typedPages, I feel like this should resolve your issue as it provides proper name autocompletion.
Try it out and please open new issues if you experience any with this feature 🙏

Sounds amazing, I will check soon!!

I tried it and it is super cool, finally autocompletion for route paths!! :)
However @BobbieGoede I would add at least one example with name and params to the docs, it is still missing. E.g. for path app/pages/products/[id].vue:
localePath({ name: 'products-id', params: { id: props.id } })

Thanks for trying it out! I agree we still need to add that somewhere in the docs, just not sure where 😂 Feel free to open a PR, reopening this issue to track the documentation issue.


bash path

Hello,
I am using rails 3.1.x + whenever on FreeBSD 8.2.
Everything is fine. But whenever -i produces /bin/bash -l -c  for the crontab file. On FreeBSD bash resides as /usr/local/bin/bash. Currently, I need to edit the crontab file manually after executing whenever in order to correct the path to the bash executable.
It might be possible to set a link from /bin/bash to /usr/local/bin/bash, but on my system I can't (because of using jails / chroot environment with the system dirs mounted read only).
Is there any way to override the default bash path /bin/bash?
Thanks

You can edit the job template:
set :job_template, "/usr/local/bin/bash -l -c ':job'"


WIP: Parsing and emitting tagged values

Some serialization formats like CBOR or BSON allow the definition of "tagged values" or "subtypes" to extend the format or to add additional type information to values. They can only supported with some help from serde.
This patch should add support to deserialize and serialize these tagged values. The default behavior will be to discard the tag and only use the value so they are completely optional to use.
For now the patch only supports serialization but I would like to get early feedback about the inclusion in serde.
See also #163 and pyfisch/cbor#3

This means that types need to know about the formats they serialize to... This would break the current separation of serializers and serializees. I'm assuming you want the same type to yield different tag values depending on the serializer? Otherwise this could maybe be merged with some kind of general enum discriminant mapping. Then your tagged types would simply be an enum whose discriminant is converted to a specific type.
Another possibility might be to allow specialization to create different impls depending on the serializer, but I have not put any thought into whether that is feasible.

The tag values are defined by the format. Some formats do not support tags at all and formats that support them will have different values for the same thing. For this reason I need to yield different tag values depending on the serializer.
In CBOR every application can define custom tags so any solution using an enum with a fixed list of types is unusable. Currently there are tags for URLs (tag 32) and UUIDs (tag 37) for example. Such types are useful for multiple formats. But one day a user might define a tag 6877 he uses in an application to mark color names in french language. The user must be able to serialize this specific tag. There is a list of IANA registered tags.
I have not yet worked with specialization and don't know if how it could be used in this case.

Would it be possible to generalize this to formats in which tags are not u64? YAML tags are strings.

Probably I should generalize it. But I don't know how to do that. Because if I support two different formats (u64 and String) I should also support i8 (used by BSON but can be mapped to u64) and probably other formats.

Well... If we can all agree that aggregate types make no sense here, we have a rather short list:
enum Tag<'a> {
    U64(u64), U32(u32), U16(u16), U8(u8),
    I64(i64), I32(i32), I16(i16), I8(i8),
    String(&'a str),
    Bytes(&'a [u8]),
    F64(f64), F32(f32),
}

Then the second tuple field of the tag arguments can simply be that enum, and everyone can decide what they want to do with it.

I've thought about trying to implement something like this for cbor, because I had to do that annoying hack to get tags to work. I'm not crazy about that mapping from serializer to tag though, especially since it would result in linear scan of tag types. Have you considered other options?
I suppose one option could be a central registry of tag names that both the serializers and serializees use, but then that'd make it hard for people to create a custom type. The other option could be to just use a string, but that might make things non-portable.
However, tags are to a certain extent a non-portable construct. If I have, say, a DateTime object that I want to serialize to cbor and yaml (assuming they have custom), I would have to modify the impl of DateTime to support each of these backends to add in the right tag names for each serializer, so we might not actually need something super generic. Specialization might be the right approach here once it's stabilized.

@oli-obk Also floats make no real sense since they are inexact and for this reason no good keys.
@erickt as I said before people will want to use custom types so this should be easy. An alternative to the linear scan could be a callback. A closure is passed to serialize_tagged_value that takes a single argument describing the used serialization format.


Update regular expression to work with Windows style paths

Makes the regular expression work with both POSIX and Windows style paths.
Conversion of path to string in Windows generates a string with DOS style backslashes. The original regular expression failed to match the string resulting in the failure of subsequent lines of code. The new regular expression works with forward slashes as well as backslashes.

Thanks. This change helped me to solve the of "AttributeError: 'NoneType' object has no attribute 'group'" on Windows 10.

@rakesh-malviya Another way to solve the error is to get the latest version of fastai (1.0.47). The from_name_re() function has been updated to convert the path to POSIX path before matching the regular expression. To do that,  just install it using pip ( pip install fastai ).
That said, conda defaults to fastai=1.0.38 which doesn't work with this on Windows 10 and so, in my opinion, the regex should be changed so that learners won't have to go through the hassle of finding fixes instead of doing deep learning.

That said, conda defaults to fastai=1.0.38 which doesn't play well with this on Windows 10 and so, in my opinion, the regex should be changed. That way learners won't have to go through forums after forums searching for solutions.

fyi, conda doesn't default to any specific versions. It means that this is the only version it can find that fits the requirements for your particular setup, see: https://docs.fast.ai/troubleshoot.html#cant-install-the-latest-fastai-conda-package and if it's not a problem with your particular situation as explained at that url, please report it as a bug in our dependencies.

@stas00 Thank you for the information. Using that troubleshooting guide, I was able to see that the reason conda installs fastai 1.0.38 is that there are no win64 packages for spacy 2.0.18 in the fastai channel which is a dependency for fastai 1.0.47.
Should I report this in this [ https://forums.fast.ai/t/fastai-v1-install-issues-thread/24111/7 ] forum thread?

@madhurjyaroy, I re-copied win64 packages, can you please retest? Thank you.

@madhurjyaroy, I re-copied win64 packages, can you please retest? Thank you.

Thank you. Works fine, now.
On a side note, there is also another issue with using fastai on Windows and this one is concerned with PyTorch 1.0.1. ( https://github.com/pytorch/pytorch/issues/17108 ). Pytorch 1.0.0 works fine, though. Might be worth putting in the troubleshooting guide asking people to explicity install pytorch=1.0.0 if they get the error or their Windows setup.


ModuleNotFoundError: No module named 'taming'

I`m tring use Node Zero123:Image Rotate in 3D
there is a issues:
File "E:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Zero123-Porting\ldm\models\diffusion\ddpm.py", line 26, in
from ldm.models.autoencoder import VQModelInterface, IdentityFirstStage, AutoencoderKL
File "E:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Zero123-Porting\ldm\models\autoencoder.py", line 6, in
from taming.modules.vqvae.quantize import VectorQuantizer2 as VectorQuantizer
ModuleNotFoundError: No module named 'taming'
I`m using ComfyUI_Windows_protable, and :
Total VRAM 8188 MB, total RAM 65223 MB
pytorch version: 2.4.1+cu124
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4060 : cudaMallocAsync
I think maybe it`s the same issues with  https://github.com/kealiu/ComfyUI-Zero123-Porting/issues/4
I printed python system environment of sys.path:
(base) PS E:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Zero123-Porting> python init.py
Python version: 3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 15:03:56) [MSC v.1929 64 bit (AMD64)]

and i print the sys.path, like:
print(sys.path) sys.path.insert(0, os.path.dirname(__file__)) print(sys.path)
its be : (base) PS E:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Zero123-Porting> python init.py
['E:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Zero123-Porting', 'C:\Anaconda\python312.zip', 'C:\Anaconda\DLLs', 'C:\Anaconda\Lib', 'C:\Anaconda', 'C:\Anaconda\Lib\site-packages', 'e:\comfyui_windows_portable_nvidia\comfyui_windows_portable\comfyui\custom_nodes\comfyui-zero123-porting\src\taming-transformers', 'e:\comfyui_windows_portable_nvidia\comfyui_windows_portable\comfyui\custom_nodes\comfyui-zero123-porting\src\clip', 'C:\Anaconda\Lib\site-packages\win32', 'C:\Anaconda\Lib\site-packages\win32\lib', 'C:\Anaconda\Lib\site-packages\Pythonwin']
['E:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Zero123-Porting', 'E:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Zero123-Porting', 'C:\Anaconda\python312.zip', 'C:\Anaconda\DLLs', 'C:\Anaconda\Lib', 'C:\Anaconda', 'C:\Anaconda\Lib\site-packages', 'e:\comfyui_windows_portable_nvidia\comfyui_windows_portable\comfyui\custom_nodes\comfyui-zero123-porting\src\taming-transformers', 'e:\comfyui_windows_portable_nvidia\comfyui_windows_portable\comfyui\custom_nodes\comfyui-zero123-porting\src\clip', 'C:\Anaconda\Lib\site-packages\win32', 'C:\Anaconda\Lib\site-packages\win32\lib', 'C:\Anaconda\Lib\site-packages\Pythonwin']`
the taming-transformers path is be setted

seems the same as  https://github.com/kealiu/ComfyUI-Zero123-Porting/issues/3
could u pls try https://github.com/CompVis/stable-diffusion/issues/72

seems the same as #3
could u pls try CompVis/stable-diffusion#72

thanks for your reply.
I tried https://github.com/CompVis/stable-diffusion/issues/72 but it`s not work.
And I found if I use 'pip install -e' to install taming, it will be install in 'src/taming-transformation' file,
and the code wanna use 'src/taming-transformation/taming', I don`t know why the path is not work but if I Put the taming file into the 'ComfyUI-Zero123-Porting/', it will be work.
and the clip will be not find too,
I put the clip into the  'ComfyUI-Zero123-Porting/',and i use'from clip.clip import clip', it`s work.
But I think perhaps this is not the right solution, because the results of the model's operation are very strange.
It has no error messages, but the results are quite different.


[Feature] Visual Map Gradient Inquiry

What problem does this feature solve?
https://echarts.apache.org/examples/en/editor.html?c=area-pieces
As in the example above, I want to add a gradient background color to a specific section using a visual map. I want to add it as a gradient.
Is there a way??
There are users who have the same problem as me, so I will share the link.
https://github.com/apache/echarts/issues/8034
Please help. thank you
What does the proposed API look like?

There is an option for Gradient. See this stackoverflow post.

I want to give a gradient to each section.
I know that I need to use a visual map to give area colors for each section, but is there a way to give a gradient in a visual map?

Any news on this?
@MatthiasMert Unfortunately your proposed solution does not really apply, as it would require multiple datasets.
With visualMap we can alter the visualization of a single dataset, but it does not support gradients (as required in this ticket).

I'm having the same issue, it would be nice for the visualMap to apply a color over the top of a series' own areaStyle with some opacity


Use case

Could this code be used in place of an ssh-agent to make ssh.exe (under MSYS2) see keys loaded by Pageant?

https://github.com/cuviper/ssh-pageant exists - you can close this if you want, but I'd be interested in your plans for this code.


Centroid is a proper field ext.

This is a reminder for me, but if you use this you should be aware of the following. Right now, the Pfaffian method can only do iso/aut/gen2sig for groups where the centroid is isomorphic to the prime field.
I'm not sure if adj-ten already does this or not. Pete can let you know.
EDIT: Added a branch (field-exts) where I slowly update this.

This is currently working. Will be pushed to master soon. Currently, this is on dev.


Wrong file owner in image pulled from Docker Hub

Before pushing the image on CI kontrol --help worked fine: https://github.com/runtimeverification/kontrol/actions/runs/6273447948/job/17036929997
After pulling the image:
$ docker run --rm runtimeverificationinc/kontrol:ubuntu-jammy-0.1.3 kontrol --help
Unable to find image 'runtimeverificationinc/kontrol:ubuntu-jammy-0.1.3' locally
ubuntu-jammy-0.1.3: Pulling from runtimeverificationinc/kontrol
445a6a12be2b: Pull complete
5283d12e99e9: Pull complete
9b6d1a784f13: Pull complete
eabe052c5de0: Pull complete
b95de52dfae6: Pull complete
3425cedef1dd: Pull complete
803108da4639: Pull complete
8d286995a433: Pull complete
e5701859d8ff: Pull complete
4f4fb700ef54: Pull complete
2b91b930eb52: Pull complete
3e7ae33f2b82: Pull complete
be278fa6099f: Pull complete
Digest: sha256:56a95ab151dde546a8c9089ae7fd8b9b76638f66b025b2a916a8f5687164cd45
Status: Downloaded newer image for runtimeverificationinc/kontrol:ubuntu-jammy-0.1.3

$ docker images
REPOSITORY                       TAG                  IMAGE ID       CREATED        SIZE
runtimeverificationinc/kontrol   ubuntu-jammy-0.1.3   d62a63dc5d84   27 hours ago   2.93GB

$ docker run --rm runtimeverificationinc/kontrol:ubuntu-jammy-0.1.3 kontrol --help
/usr/bin/python3: can't open file '/home/user/.local/bin/kontrol': [Errno 13] Permission denied

This is because all files and folders in /home/user are owned by root:
$ docker run --rm --user root runtimeverificationinc/kontrol:ubuntu-jammy-0.1.3 ls -la
total 32
drwxr-x--- 1 root root 4096 Sep 21 09:31 .
drwxr-xr-x 1 root root 4096 Sep 21 09:20 ..
-rw-r--r-- 1 root root  220 Jan  6  2022 .bash_logout
-rw-r--r-- 1 root root 3771 Jan  6  2022 .bashrc
drwxr-xr-x 4 root root 4096 Sep 21 09:25 .cache
drwxr-xr-x 4 root root 4096 Sep 21 09:20 .foundry
drwxr-xr-x 4 root root 4096 Sep 21 09:25 .local
-rw-r--r-- 1 root root  807 Jan  6  2022 .profile

When building the image locally, file ownership is set properly to user. (File ownership is probably set properly also on CI, but this needs checking.)

Might be related: https://github.com/runtimeverification/evm-semantics/pull/2068#issuecomment-1720954112

@F-WRunTime, have you seen anything similar before?

@F-WRunTime Can I assign this to you and move it to In Progress?

@F-WRunTime Can I assign this to you and move it to In Progress?

Yes

Wild... After pushing to dockerhub the permissions are no longer correct.
I've checked direct on a runner the image that got pushed

Run on two different machines. Was built on -9 and pulled down by -24

New test. Built on -9 pushed to internal registry. Same issue?

Btw, image v0.1.9 works for me:
% docker run --rm runtimeverificationinc/kontrol:ubuntu-jammy-0.1.9 kontrol --help
Unable to find image 'runtimeverificationinc/kontrol:ubuntu-jammy-0.1.9' locally
...
Digest: sha256:af8e9a4d0f7b3a051486ae1857c3d0e038c0064c82745e661c99a92f88b1bab9
Status: Downloaded newer image for runtimeverificationinc/kontrol:ubuntu-jammy-0.1.9
usage: kontrol [-h]
               {version,compile,solc-to-k,build,prove,show,to-dot,list,view-kcfg,remove-node,simplify-node,step-node,merge-nodes,section-edge,get-model}
...

Between 10 <> 9

Their base layers are different.

Will revert any changes to the dockerfile to 0.1.9 build and determine if there's a change there.

[ ] https://github.com/runtimeverification/kontrol/actions/runs/6339829440/job/17219843401

This PR published a viable image for use
https://github.com/runtimeverification/kontrol/pull/59 -- This can be closed.

Fixed in #59.

Issue surfaced in runtimeverificationinc/kontrol:ubuntu-jammy-0.1.22 once again.

Alright after many hours testing / debugging it seems I have found a few problematic runners causing the issue. Specifically WHY they are producing images such that the overlay2 folders on pull down from remote repository is incorrect isn't clear.
I rebuilt the known broken runner I could find. And redeployed them. I standardized the runners installation of buildx on all runners, as it was not clear it was installed everywhere properly. Waiting on next build of Kontrol to see if there is improvement.

Build 0.1.50 has had a successful build and proper permissions on pull down. This needs to be monitored for a couple more builds to make sure this issue is resolved.

Checking some of the latest builds. Going to consider this closed now.


Normative: Move numberingSystem before style in resolvedOptions

Fix https://github.com/tc39/proposal-intl-duration-format/issues/163
See the proposed action and reason by @anba in https://github.com/tc39/proposal-intl-duration-format/issues/163#issuecomment-1696789573

TG1 discussion and approval: https://github.com/tc39/ecma402/blob/master/meetings/notes-2023-09-07.md#normative-move-numberingsystem-before-style-in-resolvedoptions

Perfect, will mark this and present it in plenary next.

Change and rationale LGTM. Does this reflect the plenary consensus or does this need to be raised again?

It need to be raised in plenary. That is exactly why I create this PR to make sure it went through proper process.

test PR https://github.com/tc39/test262/pull/3912

@ben-allen @sffc @ryzokuken This is discussed and agreed in TG2 in 2023-09-07 but we need someone to bring this up to TG1 in Nov 2023 before this can be merged.

2023-11-28: This PR achieved TC39-TG1 consensus.

@FrankYFTang could you please rebase this? Let's get this merged.


The items are not selectable

The items are not selectable , what should I do so that they become selectable ?
The problem is that it takes the data straight from the bank, more is not selectable , did js the same way of examples and documentation select2
Note: I'm using the database mongo db , as seen below.

Mongoid
[{"_id":{"$oid":"5571c1c04a414d0fd4e91500"},"_keywords":["aguarda","de","documento","juntada"],"created_at":"2015-06-05T15:35:28.681Z","descricao":"Aguarda Juntada de Documento","updated_at":"2015-06-05T15:35:28.681Z"},{"_id":{"$oid":"5571c1c04a414d0fd4ea1500"},"_keywords":["situacao"],"created_at":"2015-06-05T15:35:28.685Z","descricao":"Situação","updated_at":"2015-06-05T15:35:28.685Z"},{"_id":{"$oid":"5571c1c04a414d0fd4eb1500"},"_keywords":["contestacao"],"created_at":"2015-06-05T15:35:28.686Z","descricao":"Contestação","updated_at":"2015-06-05T15:35:28.686Z"}];

HTML:
<select class="lista">
    <option value="3620194" selected="selected"></option>
</select>

JS:
function formatLista (item) {
    if (item.loading) return item.descricao;

    var markup = '
' +
    '

' +
    '
' +
    '
' +
    '
<option class="contacts-dropdown" value="'+item._id.$oid+'">' + item.descricao + '</option>
' +
    '

' +
    '

' +
    '
';

      markup += '

';
      return markup;
  }

  function formatListaSelection (item) {
    return item.descricao ;
  }

$(document).ready(function(){
    $(".lista").select2({
      ajax: {
        url: function (params) {
          return '/fases/search/' + encodeURIComponent(params.term);
        },
        dataType: 'json',
        processResults: function (data, page) {
          return {
            results: data
          };
        },
      },
      escapeMarkup: function (markup) { return markup; },
      minimumInputLength: 1,
      templateResult: formatLista,
      templateSelection: formatListaSelection
    });
  });

These should help solve your problems

Stack Overflow answer
Select2 documentation

I'm going to leave this open as it's not clear in the documentation that the id field is required.

Thanks, managed to solve with What had the documentation .

https://select2.github.io/announcements-4.0.html#changed-id

      processResults: function (data, page) {
          var select2data = $.map(data, function(obj) {
            obj.id = obj.id || obj._id.$oid;
            obj.text = obj.text || obj.descricao;
            return obj;
          });

          return {
            results: select2data

          };

Sometimes I should google :100: :+1:

why not has a alias id config?

Select2's expected data format is now well-documented: https://select2.org/data-sources/formats
If you're coming from 3.x, see https://select2.org/upgrading/migrating-from-35#the-id-and-text-properties-are-strictly-enforced

In my situation, I had multiple initializations of the Select2 plugin which was making the option unselectable. As a workaround, I commented on the first initialization, and it started working.


3d Secure payment mode

I am trying to test payments above 50eur and I am not getting the SecureMode parameter.
This is my code:
`    $createdWallet = $mangoPayApi->Wallets->Create($wallet);
// create pay-in CARD DIRECT
$payIn = new \MangoPay\PayIn();
$payIn->CreditedWalletId = $createdWallet->Id;
$payIn->AuthorId = $mangosource;
$payIn->DebitedFunds = new \MangoPay\Money();
$payIn->DebitedFunds->Amount = $decvalue;
$payIn->DebitedFunds->Currency = "EUR";
$payIn->Fees = new \MangoPay\Money();
$payIn->Fees->Amount = $decvalue * 0.03 + 33;
$payIn->Fees->Currency = "EUR";

$payIn->SecureMode = "FORCE";

$payIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsCard();
$payIn->PaymentDetails->CardType = $card->CardType;
$payIn->PaymentDetails->CardId = $card->Id;

$payIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect();
$payIn->ExecutionDetails->SecureModeReturnURL = 'https://www.something.com/#'.$oid;

$createdPayIn = $mangoPayApi->PayIns->Create($payIn);
$chargeID = $createdPayIn->Id;

if ($createdPayIn->Status == \MangoPay\PayInStatus::Succeeded) {
mysqli_stmt_bind_param($instra, "s", $chargeID); mysqli_stmt_execute($instra);
} else { echo "I don't get anything here!!!".$createdPayIn->ExecutionDetials->SecureModeNeeded.$createdPayIn->SecureModeRedirectURL.$createdPayIn->Status." - ".$createdPayIn->ResultCode;
}; } catch (\MangoPay\Libraries\ResponseException $e) { echo $payIn->ExecutionDetails->SecureModeRedirectURL; print_r($e->GetErrorDetails()); };

@mickaelpois Can you just confirm this is the right endpoint: $createdPayIn->ExecutionDetials->SecureModeNeeded ?

Hi,
I do confirm your code looks ok. There a multiple settings working for the 3DS support. First of all, there is an account wide setting. By default, I think it triggers 3DS above 50€.
Secondly, you as a dev, can force the usage of 3DS using the flag, SecureMode.
$CardPreAuthorization->SecureMode = 'FORCE';

Last but not least, the 3DS is not always very stable in sandbox. Might be related to sandbox errors...


data: guranshdeol

Added guranshdeol.json in data dir to create my BioDrop profile.

@anirudhp26 Thanks for the review, that was a silly mistake😅


Azure ML trained model is present but cannot be registered

Hello,
Few months ago I have sucessfully trained a model on Azure ML and deployed it.
I'm working from Visual Studio, using python.
I'm trying to redo the operation using a new ressource group but similar code. I cannot make it works anymore despite few days of trying.
My file model.h5 can be found in the outputs folder, created next to the logs and azureml-logs folders.
My code is a simple keras training, here is the interesting part, I believe you only need this part to understand what went wrong :
print('Training...')
history = model.fit(train_seq, epochs=epochs, validation_data=val_seq, callbacks=callbacks)

#Scoring
run.log('accuracy', np.max(history.history['val_accuracy']))
run.log('loss', np.max(history.history['val_loss']))

#Saving
os.makedirs('outputs', exist_ok=True)
model_path = os.path.join('outputs', 'model.h5')
model.save(model_path)

print(run.get_file_names())

print('Registering model...')
model = run.register_model(model_name='cityscape_seg',
                           model_path=model_path)

Model.register(workspace=run.experiment.workspace,
               model_path = model_path,
               model_name = 'cityscape_seg',
               properties={
                   'Accuracy': np.max(history.history['val_accuracy']),
                   'Loss': np.min(history.history['val_loss']),
                   })

run.complete()

After 40 attempts, I always got an error like this one :
Could not locate the provided model_path outputs/model.h5 in the set of files uploaded to the run
The "fun" part of the story, is that while making this issues on of the run worked. I tried again 3 times and the 3 times failed.
I didn't understand why, so just to make sure I hadn't modify my train.py (which is generate in the notebook, like this doc : https://docs.microsoft.com/fr-fr/azure/machine-learning/tutorial-train-models-with-aml), I downloaded the train.py used in the successful run and use it in another attempt.
I didn't work, I got another error. Always the same.
Could not locate the provided model_path outputs/model.h5 in the set of files uploaded to the run:
You will find under the train.py that worked only 1 time (run 39) on 43 attempts.
Any help will be truly appreciate.
#PARAMETERS

img_size = (128, 128)

num_classes = 8

batch_size = 5

imgaug_multiplier = 2

epochs = 5

import os

import numpy as np

import keras

from keras import layers

from keras.preprocessing import image

import imgaug as ia

from imgaug import augmenters as iaa

from azureml.core import Run, Dataset, Workspace

def get_model(img_size, num_classes):

    inputs = keras.Input(shape=img_size + (3,))

    ### [First half of the network: downsampling inputs] ###

    # Entry block

    x = layers.Conv2D(32, 3, strides=2, padding="same")(inputs)

    x = layers.BatchNormalization()(x)

    x = layers.Activation("relu")(x)

    previous_block_activation = x  # Set aside residual

    # Blocks 1, 2, 3 are identical apart from the feature depth.

    for filters in [64, 128, 256]:

        x = layers.Activation("relu")(x)

        x = layers.SeparableConv2D(filters, 3, padding="same")(x)

        x = layers.BatchNormalization()(x)

        x = layers.Activation("relu")(x)

        x = layers.SeparableConv2D(filters, 3, padding="same")(x)

        x = layers.BatchNormalization()(x)

        x = layers.MaxPooling2D(3, strides=2, padding="same")(x)

        # Project residual

        residual = layers.Conv2D(filters, 1, strides=2, padding="same")(

            previous_block_activation

        )

        x = layers.add([x, residual])  # Add back residual

        previous_block_activation = x  # Set aside next residual

    ### [Second half of the network: upsampling inputs] ###

    for filters in [256, 128, 64, 32]:

        x = layers.Activation("relu")(x)

        x = layers.Conv2DTranspose(filters, 3, padding="same")(x)

        x = layers.BatchNormalization()(x)

        x = layers.Activation("relu")(x)

        x = layers.Conv2DTranspose(filters, 3, padding="same")(x)

        x = layers.BatchNormalization()(x)

        x = layers.UpSampling2D(2)(x)

        # Project residual

        residual = layers.UpSampling2D(2)(previous_block_activation)

        residual = layers.Conv2D(filters, 1, padding="same")(residual)

        x = layers.add([x, residual])  # Add back residual

        previous_block_activation = x  # Set aside next residual

    # Add a per-pixel classification layer

    outputs = layers.Conv2D(num_classes, 3, activation="softmax", padding="same")(x)

    # Define the model

    model = keras.Model(inputs, outputs)

    return model

def convertCats(x):

    if x in cats['void']:

        return 0

    elif x in cats['flat']:

        return 1

    elif x in cats['construction']:

        return 2

    elif x in cats['object']:

        return 3

    elif x in cats['nature']:

        return 4

    elif x in cats['sky']:

        return 5

    elif x in cats['human']:

        return 6

    elif x in cats['vehicle']:

        return 7

convertCats_v = np.vectorize(convertCats)

def preprocessImg(img):

    image_matrix = np.expand_dims(img, 2)

    converted_image = convertCats_v(image_matrix)

    return converted_image

class Image(keras.utils.Sequence):

    """Helper to iterate over the data (as Numpy arrays)."""

    def __init__(self, batch_size, img_size, input_img_paths, target_img_paths):

        self.batch_size = batch_size

        self.img_size = img_size

        self.input_img_paths = input_img_paths

        self.target_img_paths = target_img_paths

    def __len__(self):

        return len(self.target_img_paths) // self.batch_size

    def __getitem__(self, idx):

        """Returns tuple (input, target) correspond to batch #idx."""

        i = idx * self.batch_size

        batch_input_img_paths = self.input_img_paths[i : i + self.batch_size]

        batch_target_img_paths = self.target_img_paths[i : i + self.batch_size]

        x = np.zeros((self.batch_size * imgaug_multiplier,) + self.img_size + (3,), dtype="float32")

        for j, path in enumerate(batch_input_img_paths):

            img = image.load_img(path, target_size=self.img_size)

            x[j] = img

        y = np.zeros((self.batch_size * imgaug_multiplier,) + self.img_size + (1,), dtype="uint8")

        for j, path in enumerate(batch_target_img_paths):

            _img = image.load_img(path, target_size=self.img_size, color_mode="grayscale")

            y[j] = preprocessImg(_img)

        seq = iaa.Sequential([                      # Image AUGMENTATION

            iaa.Affine(rotate=(-25, 25)),

            iaa.Crop(percent=(0, 0.3))

        ])

        for mul in range(1, imgaug_multiplier):

            for i in range(0, self.batch_size):

                ia.seed(int(j * mul))

                image_aug = seq(image=x[j])

                x[batch_size * mul + j] = image_aug

                image_aug = seq(image=y[j])

                y[batch_size * mul + j] = image_aug # END Image AUGMENTATION

        return x, y

# Get parameters

parser = argparse.ArgumentParser()

parser.add_argument('--dataset')

args = parser.parse_args()

run = Run.get_context()

dataset = run.input_datasets['dataset']

#Loading paths

print('Loading paths...')

test_cities = ['berlin', 'bielefeld', 'bonn', 'leverkusen', 'mainz', 'munich']

train_cities = ['darmstadt']

val_cities = ['lindau']

train_img_paths = []

train_ann_paths = []

for cities in train_cities:

    train_img_dir = dataset + "/train_images/" + cities

    train_ann_dir = dataset + "/train_segmentation/" + cities

    train_img_paths = train_img_paths + sorted(

        [

            os.path.join(train_img_dir, fname)

            for fname in os.listdir(train_img_dir)

            if fname.endswith("_leftImg8bit.png")

        ]

    )

    train_ann_paths = train_ann_paths + sorted(

        [

            os.path.join(train_ann_dir, fname)

            for fname in os.listdir(train_ann_dir)

            if fname.endswith("_gtFine_labelIds.png")

        ]

    )

print("Number of train images:", len(train_img_paths))

print("Number of train annotations:", len(train_ann_paths))

val_img_paths = []

val_ann_paths = []

for cities in val_cities:

    val_img_dir = dataset + "/val_images/" + cities

    val_ann_dir = dataset + "/val_segmentation/" + cities

    val_img_paths = val_img_paths + sorted(

        [

            os.path.join(val_img_dir, fname)

            for fname in os.listdir(val_img_dir)

            if fname.endswith("_leftImg8bit.png")

        ]

    )

    val_ann_paths = val_ann_paths + sorted(

        [

            os.path.join(val_ann_dir, fname)

            for fname in os.listdir(val_ann_dir)

            if fname.endswith("_gtFine_labelIds.png")

        ]

    )

print("Number of val images:", len(val_img_paths))

print("Number of val annotations:", len(val_ann_paths))

#Preparing data

cats = {

 'void': [0, 1, 2, 3, 4, 5, 6],

 'flat': [7, 8, 9, 10],

 'construction': [11, 12, 13, 14, 15, 16],

 'object': [17, 18, 19, 20],

 'nature': [21, 22],

 'sky': [23],

 'human': [24, 25],

 'vehicle': [26, 27, 28, 29, 30, 31, 32, 33, -1]}

# Build model

model = get_model(img_size, num_classes)

model.summary()

#Preparing sequences

print('Creating sequences...')

train_seq = Image(

    batch_size, img_size, train_img_paths, train_ann_paths

)

val_seq = Image(

    batch_size, img_size, val_img_paths, val_ann_paths

)

#Verify sequences

assert train_seq[0][0].shape == (batch_size * imgaug_multiplier, *img_size, 3)

assert train_seq[0][1].shape == (batch_size * imgaug_multiplier, *img_size, 1)

#Compiling model

print('Compiling...')

model.compile(optimizer="adam", loss="sparse_categorical_crossentropy", metrics=['accuracy'])

callbacks = [

    keras.callbacks.ModelCheckpoint("checkpoint.h5", save_best_only=True),

    keras.callbacks.EarlyStopping(patience=3, verbose=1)

]

print('Training...')

history = model.fit(train_seq, epochs=epochs, validation_data=val_seq, callbacks=callbacks)

#Scoring

run.log('accuracy', np.max(history.history['val_accuracy']))

run.log('loss', np.max(history.history['val_loss']))

#Saving

os.makedirs('outputs', exist_ok=True)

model_path = os.path.join('outputs', 'model.h5')

model.save(model_path)

print(run.get_file_names())

print('Registering model...')

model = run.register_model(model_name='cityscape_seg',

                           model_path=model_path)

Model.register(workspace=run.experiment.workspace,

               model_path = model_path,

               model_name = 'cityscape_seg',

               properties={

                   'Accuracy': np.max(history.history['val_accuracy']),

                   'Loss': np.min(history.history['val_loss']),

                   })

run.complete()

@devmaxime  Please help with the link to the document on which the above document feedback request is created.
In case your query is not related to document content, open a new forum thread in Microsoft Q&A or Stack Overflow as it could be better place to get help on your scenario. These forum community members could provide their expert guidance on your scenario based on their experience. Thanks.

@devmaxime  Since we have not heard back from you we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


Dehumidifier controllable value is wrong

The control range of dehumidifier(dmaker.derh.22l) is 40%-70%, in homekit adjustable 1%-100%, can not correspond to the correct value.thanks

homebridge-miot v1.6.0
Node.js  v18.15.0

This is only a visual limitation. In HomeKit you cannot change the range of the slider, it has to always be 1% to 100%. In the background this is being calculated from the HomeKit value into the actual slider value. I know that this is white odd, but there is nothing that can be done currently.

When the dehumidifier set to 40%, home kit shows 25%, does it correspond to this zone? (40%-70%)
thanks.good luck!

And what does it show at 70%?

58%

You would need to post some debug log of that so I can see what the actual values are which you set


adding travis configuration

@tvararu I was thinking the same thing but was too lazy, but yeah lets do that just to be sure. Thank you for calling me out on my laziness

Skipping a deployment with the cloudfoundry provider because the current build is a pull request.

LoL

Sorry, just merging it, I saw the pull request thing, then I pulled it out into a new branch and it was still saying it, lets just merge and fix if it breaks.


Readme clean

Codecov Report

Merging #10 (d2de2b6) into main (5c5cfd8) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #10   +/-   ##
=======================================
  Coverage   88.23%   88.23%
=======================================
  Files           6        6
  Lines          85       85
=======================================
  Hits           75       75
  Misses         10       10

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5c5cfd8...d2de2b6. Read the comment docs.


removing update to athena lambda config

to: @jacknagz
cc: @airbnb/streamalert-maintainers
size: small
Background
The athena lambda config used to require different bucket/refresh type information for various tables that were created. That is no longer necessary and this adds a default setting for the data bucket in the config.
Changes

Removing some code that would overwrite the existing bucket entry when creating a new table.
Adding the default to the config and updating the set_prefix method to handle updating this item.
NOTE: this could conflict with the s3_bucket_suffix setting within the firehose config if the user has set that to something else. (I'm thinking we should remove that...?)
SECOND NOTE: I was curious why this is needed at all within the config, but it looks like the generate_athena terraform generation code requires this for setting up bucket notifications for listed buckets. 🤔

Coverage remained the same at 95.889% when pulling 89b81628f34382a32c2e54b7361ad0905bcc8057 on ryandeivert-fix-athena-overwrite into 8ad077a1806eb8934207f13ac0387d3986abbfa5 on master.


Improve contact page mobile responsiveness

Improve page and make another file of contact_img.svg n add the svg image there.

#36