Fix Bigarray syntax

fixes #2038

Thanks!

(Parser) The grammar could be a bit cleaner with the following approach:

%inline bigarray_access:
  DOT LBRACE lseparated_nonempty_list(COMMA, expr) COMMA? RBRACE { $3 }

(* down the road you can write*)

…
| E bigarray_access

…

| simple_expr bigarray_access EQUAL expr

The %inline keyword causes all references to bigarray_access to be replaced with its definition. Inlining can also help recover a slight efficiency margin. I don’t think that we need an extra state here. Without the %inline keyword, the language recognized by the grammar would be the same, but the LR automaton would probably have one more state and would perform one more reduction at run time.

(Printer) What happens when the code line breaks for gets and sets? Can you add an extra test?
x.{superlongthing, anothersuperongthing, etc}
Can the tests be moved to bigarray.re (or something similar)? syntax.re is becoming a massive amount of random syntax.
Question: do we need type checked tests ?

@IwanKaramazow

Great suggestion. I thought this was going to result in shift/reduce conflicts but apparently I was wrong. Changed!
Added a test for this. It doesn't look pretty. I'll fix the printer for these cases later. How would you expect the examples to look (especially the assignment one)?
& 4. moved the tests to the typechecked folder which will also refmt them!

Ideally we want:
bigThing.{
 1,
 2,
 3,          --> notice the trailing comma
}

/* should be fairly easy with the classic */
let k = makeList [atom "bigThing"; atom "."] in
let v = makeList ~break:IfNeed ~postSpace:true ~sep:commaTrail ~wrap:("{", "}") [....] in
label k v

Not sure how easy it is for set, to get the same layout:
bigThing.{
  1,
  2,
  3,
} = 3.0

Nice work :)
@chenglou ready to merge.

Thanks


[feature request] relative line numbers in vim mode

Something I miss from using terminal vim is the option to have relative line numbers; here is an illustration: http://jeffkreeftmeijer.com/images/relativenumber.gif
It would be enabled with :set relativenumber and was very useful for quickly jumping up and down to the desired line (e.g. 10j goes down ten lines) Without them, jumping a desired line often involves either guessing the offset, or repeatedly tapping j/k (an antipattern). One could also jump to the absolute line number, e.g. 1234gg, however for large files this is pretty slow.
Relative line numbers as an option would definitely be great to have in vim mode.

FYI, with today's CodeMirror APIs this is actually not that hard. Basic hacky implementation that works on codemirror.net:
function showRelativeLines(cm) {
  const lineNum = cm.getCursor().line + 1;
  if (cm.state.curLineNum === lineNum) {
    return;
  }
  cm.state.curLineNum = lineNum;
  cm.setOption('lineNumberFormatter', l =>
    l === lineNum ? lineNum : Math.abs(lineNum - l));
}
editor.on('cursorActivity', showRelativeLines)

How would you implement this in cm6?

How would you implement this in cm6?

The vim code is now being maintained at https://github.com/replit/codemirror-vim/ . If this is still important, check whether there is an issue open for it there.

@marijnh Can you update this page https://codemirror.net/5/demo/vim.html regarding active maintenance?  I know it's for v5 but it's always the first page I hit whenever I google "codemirror vim" (and not everyone knows that v6 has a different story) and everyone repeats that there's no active maintainer.

Good idea. Done in fbe87a2a


Add a new Absolute Date tag for Vienna Styles

The current tag $ArticleDate$ is a relative date like "today at 09:32".
Add a new tag (maybe $ArticleAbsoluteDate$) to display the absolute date like "2014/10/22 at 09:32". This will need to be localised.
First raised on the forums by Hurtzel.

defaults write uk.co.opencommunity.vienna2 DoesRelativeDateFormatting 0
typed in Terminal will force Vienna to display absolute dates in Articles view.
You will have to relaunch Vienna to activate the change.
To deactivate
defaults delete uk.co.opencommunity.vienna2 DoesRelativeDateFormatting


We need a way to be able to dump the semantics tree (debugDumpSemanticsTree) in release mode.

https://b.corp.google.com/issues/158690361

We'd prefer to only support this in debug mode; so noted on upstream issue.


Add support for AKS

Description
This PR adds supports AKS and allows users to install autotune on AKS as well.
Fixes # (issue)
Type of change

[ ] Bug fix
[x] New feature
[x] Docs update
[ ] Breaking change (What changes might users need to make in their application due to this PR?)
[ ] Requires DB changes

How has this been tested?
Please describe the tests that were run to verify your changes and steps to reproduce. Please specify any test configuration required.

[ ] New Test X
[ ] Functional testsuite

Test Configuration

Kubernetes clusters tested on:  AKS

Checklist :dart:

[x] Followed coding guidelines
[x] Comments added
[ ] Dependent changes merged
[x] Documentation updated
[ ] Tests added or updated

Additional information
Include any additional information such as links, test results, and screenshots here

This is no longer needed as this support has been added


[UI] Add Additional Colors

Hi!
First thanks for this awesome project, it's really inspiring, and I think I'm going to use it for my next personal project :)
I'm still trying to learn how it works, so forgive me if I misunderstood something.
So my suggestion is about the common named colors, here is a short but interesting article which kind of summarize what I'm trying to do:
http://thelandofcolor.com/11-basic-color-names/
And here is the more in-depth wikipedia starting point (not really necessary to read):
http://en.wikipedia.org/wiki/Linguistic_relativity_and_the_color_naming_debate

We have only 11 unambiguous colour terms in English: White, Black, Grey, Yellow, Red, Blue, Green, Brown, Pink, Orange, Purple.” ~Berlin & Kaye Research 1969

I know this is a complicated subject, and I know this is kind of english/western oriented, but by enhancing this list just a little bit I think we can make almost everyone happy without adding too much colors to the current list.
So, Brown is the only one really missing in Semantic UI, it would be really great to have it.
White, Black and Grey are there but not really, they are mainly used semantically as "default", "inverted" or "neutral" colors.
For example currently (next branch) I can't set a grey column, a gray or white button, and there's no difference between an "inverted" segment and an "inverted black" segment.
I think black, grey and white should be treated as real first citizen colors, "default" colors could be set to whites (or grays), "inverted" colors to blacks and "neutral" colors to grays, but this should be independant to the default color names. That would allow greater flexibility for the designer.
You added to the default "11 unambiguous colour terms" the Teal color, and I like it ^^
So this is one of the "ambiguous" color term, but we can see it more generally as the "blue-green" color that we can define, it's nice to have it.
I made a little fiddle, trying to show what I'd like to have, I think we could have a pretty nice range just by adding to the current list 3 more color names (besides grey and white):
https://jsfiddle.net/lemartialou/7m3z5ony/10/
So, what's added:

Brown: well brown is brown, "unambiguous" (my example is just a suggestion for brown, I don't mind what the default value would be since we can tweak it)
Black, Grey and White as first citizens (I tinted them a little bit just so we can differentiate them in the example)
Olive (or it can maybe be named Grass, but Olive sounds good ;): to describe a green-yellow color.

And Purple would be divided in 2 shades:

Violet: more blue, less red. (note: I used your version of purple for this one ;)
Purple: more red, less blue.

Here would be the "final" list of color names:
Red - Orange - Yellow - Olive - Green - Teal - Blue - Violet - Purple - Pink - Brown - Black - Grey - White
The perfect 14-color palette, all you need to describe colors, no more, no less! ;)
(Note: I think in the documentation examples the colors should be presented in that order, not in the alphabetical order, it would be more useful and more pleasing to the eye)
I've got more ideas about coloring, but first I'd like to know what you think about this, I'm a github noob but I can try to make some PR if you think that would help ^^
Cheers!

Thanks for the detailed, thoughtful post.
I agree with pretty much everything you're saying.
I particularly enjoyed this insight

All languages contain terms for black and white.
If a language contains three terms, then it contains a term for red.
If a language contains four terms, then it contains a term for either green or yellow (but not both).
If a language contains five terms, then it contains terms for both green and yellow.
If a language contains six terms, then it contains a term for blue.
If a language contains seven terms, then it contains a term for brown.
If a language contains eight or more terms, then it contains terms for purple, pink, orange, and/or gray.

Some notes

One of the difficulties with named colors that I still don't have a great solution for, is that brands often have many distinct variations of the same "named" color
Teal seems to be one of the most common non-obvious color.
I think adding neutrals as a color option is complicated because the default UI use types of neutrals heavily already, so they won't necessarily mesh.
One of the huge difficulties is maintaining text contrast. Yellowish shades can be very difficult to pull off without swapping text colors specifically for certain hues.

Actionable Changes

Add brown color
Add in a second purple'ish color. I think magenta is slightly more common for a redish purple.
Add in a second greenish color, I think olive is good
Adjust docs samples so they appear in chroma order

Hey thanks for the positive feedback! ^^

Adjust docs samples so they appear in chroma order

So that would be my first pull request (ever! yay! ^^), I hope I've done everything correcttly and you'll accept it :)

I think olive is good

Cool! ^^

I think magenta is slightly more common for a redish purple

I think that too, but here is why (to me) and why it may not be the best term to use:
Magenta can be an ambiguous term, but for people like me, using RGB and CMYK color systems for a while,  it means a really precise color or shade, not ambiguous at all: rgb(255,0,255) or cmyk(0,100,0,0), same amount of red and blue, in print the name "magenta" is often used to mean this fundamental color component that needs to be used to render an image on paper, it's a really particular shade.
I might be biased because I'm french, and when purple seems to be the most common word used in english, violet [fr] is the most common word used in french for the same type of shade, "purple" meaning a darker more redish shade: pourpre [fr].
Despite my bias I'm trying to adapt to english, and I have the feeling that between "Violet", "Purple" and "Magenta":

Violet says "I'm a purple kind of color, I'm going towards blue"
Purple says "I'm the general term, I can go anywhere, but I guess you'll more often see me going towards red"
Magenta says "I'm Magenta, end of discussion... ok if you insist you can make me go towards red, a little bit"

... well... it's exagerated I know... But I have the feeling that "Violet" is the only one that would naturally allow to go in the blue shades whereas both "Purple" and "Magenta" would make you go more on the red side.
Ok enough hairsplitting, if you choose Magenta that will be fine with me, the most important thing is having 2 shades of purple, so I... err... I won't mind ;)
On a side note Cyan is the other "fundamental" color not present in Semantic UI, I don't think it's needed for the same reasons, well, I might be wrong.
We can already see some Cyan-like color with some inverted Teal elements, maybe a Magenta-like color could be used as an inverted Purple on the same kind of elements (when purple is divided in 2).

I think adding neutrals as a color option is complicated because the default UI use types of neutrals heavily already, so they won't necessarily mesh

I'm still digging through the code, but I can effectively see that the neutrals, black and grey are the core colors of Semantic UI.
Let's put in another way: I don't want the "neutrals" as color option, I'd like the Black, White and Grey names as color option, with the same treatment as the other color names.
I'm not sure I understand everything (still digging), my guess here is that there would be a variable name clashing problem, because the neutrals variables are using color names like "lightGrey" or "White".
"Black" and "Grey" are also used by core elements, "Grey" is listed as an official site color variable but in fact it is more kind of the "default" color, you can't use it for coloring, "Black" is only sometimes behaving like that too.
I know it's more complicated than that, but can this problem be resolved this way:

move "black" and "grey" site color variables to the neutrals
rename all these "neutrals" variables by giving them for example a "default" namespace ("black" becomes "defaultBlack", etc..., or maybe better "defaultDark" to be more "neutral")
refactor what needs to be refactored in order to use the new default variable names (that might be the not easy part ^^)
add new "black", "white" and "grey" color to the site color names and implement them like any other color (same way the new "Violet" color would be implemented ;)
assign the "defaulBlack" to "black", the "defaultWhite" to "white", etc... in order to set the default values.
maybe (or not) rename "neutrals" to "defaults" to make more sense (or not)

Et voilà! Full control on all the core default colors, "defaultBright" could be the "white" variable value, but it also could be yellow, or beige, or whatever without altering the "white" variable.
If I understand correctly the problem is that a lot of the core default colors are "hard coded" to whites, blacks or greys without using the global variables, so that would have to be treated to get real full control.
What do you think? Am I missing something? I know this shouldn't be your top priority right now, but do you think it would be a good idea?

One of the difficulties with named colors that I still don't have a great solution for, is that brands often have many distinct variations of the same "named" color.

Custom user defined color names FTW! ;)

Going through the code again, I noticed this: "grey" , "greyHover", "greyFocus", "greyDown" and "greyActive" seem to be already "free", since they are only used in "site.variables" and nowhere else. Can you confirm they are "orphan" variables?

Implementation isnt too difficult with colors. There's an inheritance system with semantic ui, generally all components inherit from globals/site.variables with there being 3 levels of inheritance for site variables, default, packaged theme, and site.
W/rt neutrals. Grey was originally intended to be used as a color, but was removed. It's not that there aren't uses for grey, but that in most cases they don't conform in usage to other colors. For example, inverted grey doesn't really make sense in english, or using grey as an accent color on a table, or segment isn't distinct from the shading of the table. I've tried to limit the options in SUI to only things that make sense in terms of design usage, removing possible but aesthetically unappealing options to avoid misuse.
I'm fine with choosing violet over magenta. I see your argument.
Standby for some code.

One unfortunate side effect of expanding colors rules is they are rather dense. They end up taking up about 60kb (65%) of the definition for button, which is a huge.

Well that ended up being 4 hours of work. Haha. It's done though.

Wow! Tremendous work! Thanks a lot! ^^

Add in a second greenish color, I think olive is great

I think poor olive has been forgotten, I hope it's just by mistake (crossed fingers).

There's no need for labeling variables as @default since this is what the default theme is for.

I understand what you mean, you're right, I think I didn't put the problem the right way.
Now with all those changes (and me familiarizing with the code) the situation is a little bit different: we've got black and grey available as site colors, and usable "where it make sense".
To me white should be listed under 'site colors' too, it would make more sense by presenting the full palette under the same category.
But I see in your last changes that you removed the "white" class possibility to the few elements that where able to deal with it (grid and icon).
I understand your motivation behind this, white is "expected" in a lot of cases, like black, and like grey.
But I still think we could enjoy less "rigidity", so I'll try to present the problem another way and make a new suggestion (hope you don't mind ^^) :
So, we can define site colors, neutral colors, user brand colors, famous brand colors, emotive colors...
What's nice is that everything is decoupled, colors can be independently tweaked...
Everything? No. Site colors and neutral colors are coupled, black on one side used as neutral, white on the other side that can't be used as a color name anymore, and grey going... well it's moving...
To me:

site colors should represent all the color names options and behave consitently. If I can paint a segment or a column in "pink", I should be able to paint it in "black", "white", or "grey" or any color name available. I know on some occasion it won't make sense, or it would be redundant, but there are a lot of situations where that could totally make sense. And it's a user triggered action, optional, I think the user should be able to know that it's not a good idea to create a black segment when the text is already black ;)
neutrals should represent (ideally) all the colors used for the core elements, "uncolored", the "monochromatic" Semantic UI. Blacks, whites and greys are used as core colors, but these colors should be independant from the colors used for coloring (they would be linked by default neutralBlack = black, neutralWhite = white, ...)

Ideally we could be able to tint the monochromatic Semantic UI just by tweaking the neutrals and without affecting the site colors
Won't it be cool? ^^

One unfortunate side effect of expanding colors rules is they are rather dense. They end up taking up about 60kb (65%) of the definition for button, which is a huge.

Yes, I can see that, this "waste of space" feeling might not be liked by users using just a few colors for their projects, and more generally it feels "non-optimal".
Wouldn't it be possible to use some LESS magic to resolve this problem?

In site.variables we would have something like:

availableColors: red, green, blue, facebook, positive;
(unnecessary to put neutrals in this, neutrals wouldn't be optional because they would be the "monochromatic core" ;)

in button.variableswe would have something like

buttonAvailableColors: availableColors;
(overrideable for maximum customizability ^^)

and in button.less we would have in the coloring section a loop iterating over the buttonAvailableColors and generating only the desired CSS.

I know it's more complicated than that, but won't it be a nice feature to have?

you could choose your colors at build time, globally or element by element for minimum file size.
that would open the way to "custom user colors"

My posts are reaaally too long, sorry for that ;p
Thanks again for your tremendous support!
PS: Don't forget poor olive! ^^

Still thinking about the "neutrals" (i know)
Shouldn't they be at least treated semantically like the "emotive colors"?
There is no "red" variable in the emotive colors, but "negativeColor" (which uses "red" as a value)
There shouldn't be "white" or "black" in the neutrals but "brightColor" and "darkColor".
Just food for thoughts ^^

There aren't any explicit control structures (loops) in LESS, there are idiosyncratic ways to accomplish loops with mix-ins, but this would add a level of complexity which might be prohibitive.
I did miss olive somehow while adding colors. It will be a bit of a chore to add given the amount of time i have available before June 1st, but will see if i can squeeze in.

Added olive, fixed some typos from previous commits.

Thanks again for your tremendous support, YOU ROCK ! :)
I know SUI 2.0's launch is around the corner, so I'll stop bothering you with my suggestions (for now ;)
Until then I'll try to concentrate on helping you finding typos or bugs in the new docs.
Cheers! ^^

It seems that inverted menu can't be set to grey, any reason why?

allow all colors like rgba and hls instead of only named


Updated sass

Motivation and context
Previous node-sass version breaks the built.
Resolved #2365
How has this been tested?
Tried to build
Checklist

[x] I submit my changes into the develop branch
[ ] I have added description of my changes into CHANGELOG file
[ ] I have updated the documentation accordingly
[ ] I have added tests to cover my changes
[ ] I have linked related issues (read github docs)
[ ] I have increased versions of npm packages if it is necessary (cvat-canvas,
cvat-core, cvat-data and cvat-ui)

License

[x] I submit my code changes under the same MIT License that covers the project.
Feel free to contact the maintainers if that's a concern.
[x] I have updated the license header for each file (see an example below)

# Copyright (C) 2020 Intel Corporation
#
# SPDX-License-Identifier: MIT

Coverage remained the same at 60.663% when pulling 93cc6b355acc5326fbcca3c6fd409b960df5c39e on bs/updated_sass into 3531316d52373f9f1528411b0987e0c8aa081fee on develop.


Misalignment of over grown tree node

first of all, thank you very much for this simple and superb control. I am using this on projects for the past few months and purely impressed by the simplicity, recently I am running in to an issue where I see misalignment of text when the text of a node doesn't fit in a single line. Screenshot as below.

Thank You
Miki Oracle

Thanks for your comments.
I'm really not sure what I can do about this as it's designed to leverage bootstraps list view, which also works this way.  The only thing I can suggest is to override the css in your project.


DB-side UPSERT optimiziation support

Provides a new feature option for DB providers to build a DB-optimized UPSERT functionality

Implementation for PSQL provided for re-use by repos using this module
Slightly annoying workaround to sq semantics called out in comments

Provides a new optimization type that requests DB optimization of the upsert

Didn't feel ready to make this the default
Falls back to update optimization if not available on DB provider

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.96%. Comparing base (b6bcbb4) to head (e1a20e0).
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #138   +/-   ##
=======================================
  Coverage   99.96%   99.96%
=======================================
  Files          79       80    +1
  Lines        6507     6567   +60
=======================================
+ Hits         6505     6565   +60
  Misses          1        1
  Partials        1        1

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Link to OSM Wiki for traffic_sign:forward

I noticed that I don't get to the wiki from the key traffic_sign:forward=*.
There is no Wiki page for that, just for traffic_sign=*.
This is what I see:

I wonder …
a. Could ID notice the missing wiki-page and instead link to the primary keys page traffic_sign?
b. Or should I add a redirect on the wiki?
About b: How to add a redirect?
The missing page is DE:Key:traffic_sign:forward. But I could not find help how to add a redirect, only something about categories. I am also unsure about the process inside the OSM Wiki World for pages like this.

CC @quincylvania since you worked on traffic signs in https://github.com/openstreetmap/iD/issues/5331 and might have an opinion :).

I added redirects for traffic_sign:forward and traffic_sign:backward in English. To do the same for other languages, replace the title parameter in the URL and save the page with the code #redirect [[…]]. (If you use Visual Editor, click the ☰ button in the toolbar and select Page settings.)
More broadly, the taginfo API we’re using to get tag descriptions just looks at the literal tag’s page on the wiki. But perhaps iD should lop off common subkeys (:forward, :backward, :both_ways, :left, :right, and :conditional, and others) before asking taginfo for the description. That would be consistent with how the {{tag}} template is used on the wiki.

Hey @tordans - thanks for raising the issue..
There are some existing closed issues about why iD can't really follow the documentation redirects.
For now, the best solution is to just make sure each tag has a documentation page.  #5321 might offer a better solution for looking up documentation to get around the limitations of what taginfo provides, and then we wouldn't need to follow redirects for moved documentation.
Incidentally, per #5333 - please avoid using traffic_sign:forward and traffic_sign:backward - iD can't support these!  😅   We will support traffic_sign:direction=forward/backward instead.


Update bar Icons

Is there any way to update the bar icons without re-initializing it?
What I mean is that after creating the ESTabBarController instance with its appropriate icon images, at some point in the app i need to switch the order of the icons (RTL - LTR), to achieve that I need to be able to switch the icons.
Thank you :)

Hi @Krystel,
At the moment that's not possible. That's an interesting feature though, I think it would mean having a method like:
- (void)setTabIcon:(UIImage *)icon atIndex:(NSInteger)index;

I might look into this in a future PR, or you can give it a try it if you feel fancy to it ;)

Hi @ezescaruli,
Thanks for the reply..
Yea pretty much..
I'll try to have a look when I can :)


Remove package-json dependency in favor of registry-url + custom code

This is just me playing with a POC, not an actual PR ready to be merged.
@xPaw, would it make sense to do something like this? registry-url could be replaced with code easily but not registry-auth-token, and unless I'm wrong, if we support custom registries, we should probably keep that latter one.
This is totally up for debate/discussion, and I know it has about 10 times more chances to be closed than merged, I'm cool with that, but this version has a couples benefits:

More optimized as it only downloads latest JSON (until we support specifying a version, though package-json doesn't seem to work with package@version format, IIUC)
Better control over error messages (when a package is not found for example)

I don't know, this is probably stupid, but I wanted to give it a try. Feel free to close if it is.

This PR does add have few advantages, listed above (on top of removing a dependency with extra other dependencies), but it is not a complete necessity right now.
Closing the PR for now, and if we need it in the (distant) future, it will be archived in here.


div's replaced with span's

I replaced div's with span's because of HTML validation errors, which appear when I use  inside header tags. Headers can't contain div's but they work fine with span's.

I’m sorry, we can’t merge this in. Even if we use divs, the children can be anything, including other divs or paragraph tags. This means this PR will not help the validation. :-(

Current use of divs brings some limitations and user can't do anything about it. Children can be anything and that's ok. The user has to take care about it.
I thing it is one step closer for better validation.


Calendar View formatting

What Kind of Sample (view or column format)
Calendar view formatting, specifically, the day's listing on the right side.
We're using a Calendar view in a list, which works well. But we'd like to be able to add:

More detail and perhaps color coding to individual items in the calendar on the left
More detail to the items in the day's listing to the right

I found this helpful article from @tecchan1107 explaining how to make additional columns available. There's also a good example of color coding in one of the links from the article: Calendar view customizations. What I'm not sure about is the syntax for changing what metadata is shown per event on the left or right sides. I may just need a quick example to help me along - or someone to tell me I can't change the content shown (which would be sad).
Are you Willing to Help?
Sure!

@sympmarc
Hello, as far as I remember, when I wrote that article, it wasn't possible to apply a custom formatting to the items listed on the right pane. However, I will have a deeper look as soon as possible to tell you if possible or not.

Awesome, @Fedes365. It's something I've had multiple people ask for.

Hello @sympmarc
to check if there is something new allowed by Microsoft Lists, first I've opened the calendar formatting schema.
If we read that schema, we can find two pieces of information regarding the calendar custom formatting:

we can customize the command bar
we can customize the class properties to be applied to the thin coloured raws and we can use expressions too.

... and nothing else 🤔
I've also made other attempts by adding some elements such as divs here and there but with no results. From my findings it's not possible to apply a custom formatting to the items on the right pane yet. Conversely, I would expect to find something like "eventTileFormatter" or similar in the JSON schema above, in order to add containers, styles etc... but this is not the case.
Anyway, this is just the result of my check and I could be wrong. Maybe @tecchan1107 or other Lists experts could have new suggestions and ideas.

Thank you, @Fedes365. That's consistent with what I've found as well. I've tried various approaches to get something different than just the Title to show in either panel, but with no success. This certainly feels like a gap in the list formatting capabilities. Hoping someone else has an idea!

I did some research on my end, but that did not seem to be possible at this time...😣

I've just shoved additional details into the Title column 😂
As for the colour coding, a crap load of JSON conditionals is required:

  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/row-formatting.schema.json",
  "additionalEventClass": {
    "operator": ":",
    "operands": [
      {
        "operator": "==",
        "operands": [
          "[$FacultyImpacted]",
          "English"
        ]
      },
      "=if(@isSelected == true, 'sp-css-color-WhiteFont sp-css-backgroundColor-BgBrown' , 'sp-css-backgroundColor-BgGold sp-css-color-GoldFont')",
      {
        "operator": ":",
        "operands": [
          {
            "operator": "==",
            "operands": [
              "[$FacultyImpacted]",
              "Mathematics"
            ]
          },
          "=if(@isSelected == true, 'sp-css-color-WhiteFont sp-css-backgroundColor-BgDarkRed' , 'sp-css-backgroundColor-BgCoral sp-css-color-CoralFont')",
          {
            "operator": ":",
            "operands": [
              {
                "operator": "==",
                "operands": [
                  "[$FacultyImpacted]",
                  "Science"
                ]
              },
              "=if(@isSelected == true, 'sp-css-color-WhiteFont sp-css-backgroundColor-BgTeal' , 'sp-css-backgroundColor-BgCyan sp-css-color-CyanFont')",
              {
                "operator": ":",
                "operands": [
                  {
                    "operator": "==",
                    "operands": [
                      "[$FacultyImpacted]",
                      "CAPA"
                    ]
                  },
                  "=if(@isSelected == true, 'sp-css-color-WhiteFont sp-css-backgroundColor-BgDarkPink' , 'sp-css-backgroundColor-BgLilac sp-css-color-LilacFont')",
                  {
                    "operator": ":",
                    "operands": [
                      {
                        "operator": "==",
                        "operands": [
                          "[$FacultyImpacted]",
                          "PDHPE"
                        ]
                      },
                      "=if(@isSelected == true, 'sp-css-color-WhiteFont sp-css-backgroundColor-BgGreen' , 'sp-css-backgroundColor-BgMintGreen sp-css-color-MintGreenFont')",
                      {
                        "operator": ":",
                        "operands": [
                          {
                            "operator": "==",
                            "operands": [
                              "[$FacultyImpacted]",
                              "HSIE"
                            ]
                          },
                          "=if(@isSelected == true, 'sp-css-color-WhiteFont sp-css-backgroundColor-BgGray' , 'sp-css-backgroundColor-BgLightGray sp-css-color-LightGrayFont')",
                          {
                            "operator": ":",
                            "operands": [
                              {
                                "operator": "==",
                                "operands": [
                                  "[$FacultyImpacted]",
                                  "TAS"
                                ]
                              },
                              "=if(@isSelected == true, 'sp-css-color-WhiteFont sp-css-backgroundColor-BgLavender' , 'sp-css-backgroundColor-BgLightPurple sp-css-color-LightPurpleFont')",
                              {
                                "operator": ":",
                                "operands": [
                                  {
                                    "operator": "==",
                                    "operands": [
                                      "[$FacultyImpacted]",
                                      "Music"
                                    ]
                                  },
                                  "=if(@isSelected == true, 'sp-css-color-WhiteFont sp-css-backgroundColor-BgDarkPink' , 'sp-css-backgroundColor-BgLilac sp-css-color-LilacFont')",
                                  {
                                    "operator": ":",
                                    "operands": [
                                      {
                                        "operator": "==",
                                        "operands": [
                                          "[$FacultyImpacted]",
                                          "SASS"
                                        ]
                                      },
                                      "=if(@isSelected == true, 'sp-css-color-WhiteFont sp-css-backgroundColor-BgDarkBlue' , 'sp-css-backgroundColor-BgLightBlue sp-css-color-LightBlueFont')",
                                      {
                                        "operator": ":",
                                        "operands": [
                                          {
                                            "operator": "==",
                                            "operands": [
                                              "[$FacultyImpacted]",
                                              "Student Wellbeing"
                                            ]
                                          },
                                          "=if(@isSelected == true, 'sp-css-color-WhiteFont sp-css-backgroundColor-BgBlue' , 'sp-css-backgroundColor-BgCornflowerBlue sp-css-color-CornflowerBlueFont')",
                                          {
                                            "operator": ":",
                                            "operands": [
                                              {
                                                "operator": "==",
                                                "operands": [
                                                  "[$FacultyImpacted]",
                                                  "Senior Executive"
                                                ]
                                              },
                                              "=if(@isSelected == true, 'sp-css-color-WhiteFont sp-css-backgroundColor-BgDarkPink' , 'sp-css-backgroundColor-BgLilac sp-css-color-LilacFont')",
                                              {
                                                "operator": ":",
                                                "operands": [
                                                  {
                                                    "operator": "==",
                                                    "operands": [
                                                      "[$FacultyImpacted]",
                                                      "Administration (Careers/Library)"
                                                    ]
                                                  },
                                                  "=if(@isSelected == true, 'sp-css-color-WhiteFont sp-css-backgroundColor-BgRed' , 'sp-css-backgroundColor-BgDustRose sp-css-color-DustRoseFont')+' sp-field-fontSizeSmall'",
                                                  ""
                                                ]
                                              }
                                            ]
                                          }
                                        ]
                                      }
                                    ]
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}```

Hello, i'm trying to use the Calendar view customizations formatting but it says my code is wrong.. any ideas:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/calendar-formatting.schema.json",
"additionalEventClass":
"=if([$Category] =='Public Holiday' && @isSelected == false, 'sp-css-backgroundColor-successBackground50 sp-css-color-BlackText sp-css-borderColor-GreenText ms-bgColor-sharedGreenCyan10--hover ms-fontColor-white--hover',
if([$Category] =='Public Holiday' && @isSelected == true, 'ms-bgColor-green sp-css-color-WhiteText',
if([$Category] =='Admin Task' && @isSelected == false, 'sp-css-backgroundColor-BgPeach sp-css-color-BlackText sp-css-borderColor-RedText ms-bgColor-sharedRed10--hover ms-fontColor-white--hover',
if([$Category] =='Admin Task' && @isSelected == true, 'sp-css-backgroundColor-redDark sp-css-color-WhiteText',
if([$Category] =='Census Date' && @isSelected == false, 'sp-css-backgroundColor-BgGold sp-css-color-BlackText sp-css-borderColor-BrownText ms-bgColor-yellow--hover ms-fontColor-white--hover',
if([$Category] =='Census Date' && @isSelected == true, 'ms-bgColor-sharedOrange10 sp-css-color-BlackText',
if([$Category] =='myExperience' && @isSelected == false, 'ms-bgColor-communicationTint20 sp-css-color-BlackText sp-css-borderColor-BlueText ms-bgColor-sharedCyanBlue10--hover ms-fontColor-white--hover',
if([$Category] =='myExperience' && @isSelected == true, 'sp-css-backgroundColor-BlueText sp-css-color-WhiteText',
if([$Category] =='Exams' && @isSelected == false, 'sp-css-backgroundColor-BgLilac sp-css-color-BlackText sp-css-borderColor-DarkPurpleText ms-bgColor-sharedBlueMagenta20--hover ms-fontColor-white--hover',
if([$Category] =='Exams' && @isSelected == true, 'sp-css-backgroundColor-BgPurple sp-css-color-WhiteText',
if(@isSelected == false, 'sp-css-backgroundColor-neutralBackground20 sp-css-color-BlackText ms-bgColor-neutralTertiaryAlt--hover ms-fontColor-black--hover', 'sp-css-backgroundColor-neutralTertiary sp-css-color-WhiteText')))))))))))"
}
Original one
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/calendar-formatting.schema.json",
"additionalEventClass": "=if([$PROJECT] =='Project A' && @isSelected == false, 'sp-css-backgroundColor-successBackground50 sp-css-color-BlackText sp-css-borderColor-GreenText ms-bgColor-sharedGreenCyan10--hover ms-fontColor-white--hover', if([$PROJECT] =='Project A' && @isSelected == true, 'ms-bgColor-green sp-css-color-WhiteText', if([$PROJECT] =='Project B' && @isSelected == false, 'sp-css-backgroundColor-BgPeach sp-css-color-BlackText sp-css-borderColor-RedText ms-bgColor-sharedRed10--hover ms-fontColor-white--hover', if([$PROJECT] =='Project B' && @isSelected == true, 'sp-css-backgroundColor-redDark sp-css-color-WhiteText', if([$PROJECT] =='Project C' && @isSelected == false, 'sp-css-backgroundColor-BgGold sp-css-color-BlackText sp-css-borderColor-BrownText ms-bgColor-yellow--hover ms-fontColor-white--hover', if([$PROJECT] =='Project C' && @isSelected == true, 'ms-bgColor-sharedOrange10 sp-css-color-BlackText', if([$PROJECT] =='Project D' && @isSelected == false, 'ms-bgColor-communicationTint20 sp-css-color-BlackText sp-css-borderColor-BlueText ms-bgColor-sharedCyanBlue10--hover ms-fontColor-white--hover', if([$PROJECT] =='Project D' && @isSelected == true, 'sp-css-backgroundColor-BlueText sp-css-color-WhiteText', if([$PROJECT] =='Project E' && @isSelected == false, 'sp-css-backgroundColor-BgLilac sp-css-color-BlackText sp-css-borderColor-DarkPurpleText ms-bgColor-sharedBlueMagenta20--hover ms-fontColor-white--hover', if([$PROJECT] =='Project E' && @isSelected == true, 'sp-css-backgroundColor-BgPurple sp-css-color-WhiteText', if(@isSelected == false, 'sp-css-backgroundColor-neutralBackground20 sp-css-color-BlackText ms-bgColor-neutralTertiaryAlt--hover ms-fontColor-black--hover', 'sp-css-backgroundColor-neutralTertiary sp-css-color-WhiteText')))))))))))"
}

Hello
is it possible to share the List Calendar to Outlook?

I think you may be able to open up the list in Outlook desktop classic. But don't expect calendar view formatting to work of course :P


The сomment tab doesn't expand

Bug:
add text, collapse the comment tab, and then expand the comment tab - the text is deleted
https://user-images.githubusercontent.com/45556620/120499090-72b0d880-c3c8-11eb-94b3-e5c32917ad9a.mp4

will be fixed in https://github.com/BeamMW/ios-wallet/issues/467


QuickSight VPC

Changing QuickSight architecture to use private subnets
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The connection to VPC looks good to me.


Memory inefficiency in RNNs

Context
I have been working with small ConvLSTM architecture and getting an OOM with a moderate number of filters. I think I have detected a memory inefficiency related to RNNs that may be the root cause, although I have not been able to fully solve the problem.
System information.
TensorFlow version (you are using): 2.6.2
GPU model and memory: Tesla P100 16GB (Kaggle GPU)
Are you willing to contribute it (Yes/No): Yes
Describe the feature and the current behavior/state.
At the moment, keras.backend.rnn returns the tuple (last_output, outputs, new_states). Layers that call this method may only require last_output, so retrieving and storing outputs in memory, in this case, is inefficient and not needed.
The current behavior is especially harmful to Convolutional versions of RNNs and LSTMs, since storing outputs means storing something close to n_filters * input. For example, if a ConvLSTM with 50 filters 3x3 is instantiated and is applied to a video with 100x100 frames, keras.backend.rnn will return 50 copies of the complete video (98x98 frames) even if return_sequences=False, when just the last 98x98 frame for each filter is needed.
As it can be seen from the example, if the current state is as described, the memory impact can be huge, restricting the use of ConvLSTMs to a moderate number of filters even with simple architectures.
Will this change the current api? How?
Yes. keras.backend.rnn will receive a flag (return_all_outputs) indicating if all outputs from the process have to be returned, and thus kept in memory. If not, only last_output will be kept during the process, saving the corresponding memory.
To keep the current return format, if return_all_outputs is False, the method can still return the tuple (last_output, [last_output], new_states).
Who will benefit from this feature?
The whole community, especially users using Convolutional versions of RNNs and LSTMs. Other users have reported similar memory issues with ConvLSTMs in StackOverflow (for instance: link).
Contributing

Do you want to contribute a PR? (yes/no): yes
If yes, please read this page for instructions
Briefly describe your candidate solution(if contributing): the solution described in the API Changes has been implemented in this repo. Some TODOs are pending, like applying masks correctly to outputs when return_all_outputs is False. However, other updates are needed, since it does not solve the OOM of my original problem.

Standalone code to reproduce the issue.
Check this notebook to see how a simple architecture results in an OOM. Especially worrying is the following line of the provided logs:
2022-02-23 00:08:53.579673: I tensorflow/core/common_runtime/bfc_allocator.cc:1011] Bin (16777216): 	Total Chunks: 826, Chunks in use: 826. 14.79GiB allocated for chunks. 14.79GiB in use in bin. 14.78GiB client-requested in use in bin.

Check this notebook that imports my proposal, which also gets an OOM.

@atmguille thanks for filing! Would you be willing to contribute a PR here?

@mattdangerw sure! I have already a proposal in the repository I mention in the issue. I have done some experiments in CPU and experienced better performance in RAM usage for small number of filters. However, as I mentioned in the issue, I may be missing something else for GPU.
Thanks for your time. Let me know what are the next steps!

Tagging @qlzh727 and @fchollet who probably know the most about Keras RNN layers to see if they have thoughts.
I would say next could be opening a pull request and we can continue discussion there.
It would be good to verify this functions with a GPU, could you try running your proposed changes with a GPU runtime in a colab?

@mattdangerw the code works in GPU. I have tested it in Kaggle, the notebook that uses my proposal is able to fit the model in memory while the notebook that uses the current state of Keras is not.
I agree with you, we can discuss further details of the code in the PR. I will try to open it as soon as I can.
Thanks again for your time and dedication!


RepeatOperation without Kryo's cloning

Why?
I do all my efforts to enable orion GWT-able.
Next Step
Split orion to two submodules: core and serializable or orion-core and orion-serializable. Please help me in the naming here.
The core would be GWT-able (not depending on Kryo and artemis-odb-serialization).
The other one would be just core + serialization/json stuff.
Next-next Step
All Reflection stuff would be made through ClassReflection from gdx or artemis. To be decided. Help me in there too.
Changes: RepeatOperation, Operation
In RepeatOperation, instead of cloning repeated operation in the begin() (for later cloning again to bring to starting state) why not reuse the repeated operation (which may be a tree) and just call rewind() function that will not do a reset() as for pooling, but just remark the completed flag to false.
Operation.java doesn't have abstract isComplete() method, instead it's final but there's new protected completed field to be set manually in all your operations.
Also, rewind() was added here but it may be reimplemented, like in TemporalOperation.
If you don't understand this part, then look into RepeatOperation.java and Operation.java.
Changes: Executor
Next, Executor.java has a slight change - it doesn't call act() if operation is completed.
Changes: Sequence/Parallel Operation
Both operations have now something like
if (op.completedOps >= children.size) {
	op.completed = true;
}

just before a loop executing all children operations. I thought it would be more logic to execute it after the for but at least VoidEntityOperationTest would not pass because nulls would be expected earlier (in 4th step AFAIR).
Also, those operations try to determine on their own when they are completed basing on all children. It's counted like:

remember if wasCompleted
process operation
if !wasCompleted i isCompleted then increment completedOps counter

Test: RepeatOperation2Test
I make a new file with simple cases that I believe have to pass to make sure that reusing instead of cloning would work.
Other tests
I change those things:

in many tests, applying fixes to new rewind() and completed API
checking count of allocated instances in repeated_operations_are_recycled() from RepeatOperationTest.java. Because no cloning
I throw an exception in NullOperator but it wasn't called after all

very nice! i haven't had time yet to look into the details yet (life got in the way). you've done something about my concerns :)
i'll try to take a look tomorrow.

During next step I've found that I forgot to modify one place (usage of copy()):
https://github.com/FEOMedia/artemis-odb-orion/pull/24/files#diff-3ded9b93f7b0ee8011ce827017c1d8afL46
So, please do not merge it. However, review could be useful.

NEXT STEP
https://github.com/Namek/artemis-odb-orion/commit/544b58165694b0699319e15ea0e9e0431648bf47 - split orion to orion-core and orion-serializable
build log
https://jitpack.io/com/github/Namek/artemis-odb-orion/master---step_2_serializable_and_core_splitted-SNAPSHOT/build.log
import with Gradle
compile 'com.github.Namek.artemis-odb-orion:orion-core:master---step_2_serializable_and_core_splitted-SNAPSHOT'

How do you feel about us removing kryo? it'd mandate reset() on operations (or rewind()) - but it'd make GWT work better, and - afaik - we can't really leverage kryo on android unless we write custom serializers for every type.

nearing completion on compiled prefabs, converting json to "optimized" java - https://gist.github.com/junkdog/6ff07302cf3dc31007fbcb89ce7827a1 - it could be adapted for predefined operations too - low overhead deserialization was the reason I originally went for kryo - and it'd work on GWT too.

How do you feel about us removing kryo?

@junkdog I have no use of serialization at all so that's totally fine with me. Just saying because I'm probably not applicable to judge.
Due to prefabs it seems interesting but it's like too much for a goal I wanted to achieve. I just needed orion core to be GWT-able. In fact, I could just fork it and remove stuff I don't need but also wanted to share some efforts since it's cool API.

Just rebased upon latest master which includes new ForkOperation. I had to do one ugly thing, though:
	/**
	 * A method created for one internal case. You should pretend it doesn't exist at all.
	 */
	public void markCompleted() {
		completed = true;
	}

^ inside ForkOperation.java


Add Words and Chars primitives

Add two text primitives, NumWords and NumCharacter which count the number of words and the number of characters when the variable type is Text.

Codecov Report

Merging #51 into master will increase coverage by 0.04%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #51      +/-   ##
==========================================
+ Coverage   87.14%   87.19%   +0.04%
==========================================
  Files          74       74
  Lines        6946     6973      +27
==========================================
+ Hits         6053     6080      +27
  Misses        893      893

Impacted Files
Coverage Δ

primitives/transform_primitive.py
97.46% <0%> (+0.13%)
:arrow_up:

.../feature_function_tests/test_transform_features.py
85.45% <0%> (+0.37%)
:arrow_up:

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 4d30e76...2f4a678. Read the comment docs.


How to get the normal of the line I collide with?

Hi,
Thanks for this library, we're looking forward to using it. After reading the documentation, we have one question however. How would one go about calculating the rebound vector / direction when a collision occurs? For example, when bouncing a ball against a wall, how do I make it bounce in the right direction?
Thank you

The normal of the line you collide with is given via the Result object's overlap_x and overlap_y properties. Determining the resulting bounce angle is a matter of flipping the incoming angle across the axis that those two properties describe.
A more in-depth explanation can be found here. You might be able to find some better tutorials out there, but the concept is the same.

Rigid bodies make up only a small subset of use-cases for collision detection, so adding code specifically for it would be outside of the scope of this library. Collisions is meant to be a low-level library. If your project requires friction, bounciness, momentum, etc, you're better off using a physics engine (or writing your own that wraps around Collisions).

Agreed 👍


Request: make cargo test trigger a warning if there's unused Rust code in tests directory

I wanted to write integration tests for some code, so I created a tests directory and wrote some tests in it. But some of my tests were written in a subdirectory of tests - e.g. tests/foo/bar.rs - and they were all ignored. It took me quite a while to figure out that my tests weren't even running. After I made tests/foo/mod.rs, I still had to add mod foo to some file in tests - another easy mistake to make, that results in zero warnings.
But even after fixing those issues, I still wouldn't be very safe. If I were to create tests/foo/uh_oh.rs then that file wouldn't be executed (because I didn't update tests/foo/mod.rs) and, again, I won't receive any warnings that my tests aren't running. I'm not sure if this is the right place for this issue (perhaps clippy is a better fit for finding this problem?), but I do think that this behavior is surprising

I'm all for finding good ways to "test the tests".  But isn't this more of a general problem around programming in Rust?  I think it makes sense to having some kind of linting/doctor tool for rust sources in general (and then find ways to use that in cargo).
So in that light, I'm inclined to close this.  But let me know your thoughts!

Cargo may be the best situated to discover this, since it knows which files are used and the structure of the targets. However, it may be difficult or impossible to do due to conditional compilation. Modules can be disabled with cfg attributes among other things, and it would be difficult to reliably get an exhaustive list.  If you want to hack something together, you can try to run cargo check --all-targets and then read all the dep-info files (target/debug/deps/*.d) to see which files were used and compare to the list of files on the filesystem.  However, it will miss all disabled modules.


CORS header adding trailing slash automatically

When adding CORS header parameter, such as IMGPROXY_ALLOW_ORIGIN =https://my.domain.com, imgproxy always adds a trailing slash by default, converting it to IMGPROXY_ALLOW_ORIGIN =https://my.domain.com/. These are different URLs and I believe it is a good practice to avoid the trailing slash.
Is there a way of not adding it? I also tried IMGPROXY_ALLOW_ORIGIN =https://my.domain.com* but does not work either.

Hi @DarthSim, do you eventually know if I am missing something here?
Thanks in advance! 🙇

Hey @joaofrca!
That's weird that you're facing this problem. imgproxy does nothing fancy but fetch the env variable as is and put it to the header without any modifications.

Hi @DarthSim !
Thanks lots for your input 🙇 You're totally right, this is not related with imgproxy at all.. Closing the ticket.
Thank you! 🙏


Update ValueGenerated using conventions.

Fixes #7205

@divega Per triage discussion and the comments in #7205, can you look at this an make a judgement as to whether the "complexity increase" is worth it? My opinion is that it is not, especially given that the existing way of doing it will likely get even simpler when we implement Nine Rings for Nine Kings (#7166).

Discussed this and @AndriySvyryd will send a new version.

@ajcvickers Rebased


master versions of add-on manager manifests

@simonswine FYI
I've ported the manifests over to the master/ tree (which is where we cut new releases from) and moved the manifests into a subdirectory of the k8s-backend directory.

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

What's the plan with this PR?

@djosborne I need to find a reviewer, and then merge.  Care to have a go?

@djosborne this is ready for another look.

2 more nits I noticed. Then do these need to be put into v2.1 as well? Otherwise, LGTM

@djosborne I think this is ready for another look.

Can you update the docs to explain these are k8s 1.5 manifests? And arrange them in a way so that there is room to add 1.6 versions of them?


MSAL.PS <IP_ADDRESS> and X5C

I looked at the source code of MSAL.PS version <IP_ADDRESS> and searched for "x5c". I see all occurrences have been commented:
#
# [Parameter(Mandatory=$true, ParameterSetName='ConfidentialClientCertificate')]
# [Parameter(Mandatory=$true, ParameterSetName='ConfidentialClientCertificate-AuthorizationCode')]
# [Parameter(Mandatory=$true, ParameterSetName='ConfidentialClientCertificate-OnBehalfOf')]
# [switch] $SendX5C,

#if ($SendX5C) { [void] $AquireTokenParameters.WithSendX5C($SendX5C) }

Why? Is there a (pre-release) version where it's not/

Here's the commit where it was added as commented from the start.
@jasoth, can you please commented why?

I was going to implement it but have not had time to figure out how to implement properly and test.
Jason Thompson
Sr. Program Managerhttps://aka.ms/jasoth/LinkedIn | Microsoft Identity CxP GTPhttps://azure.microsoft.com/en-us/case-studies/?service=active-directory | +1<PHONE_NUMBER>tel:+15138269258
Microsoft Teams<EMAIL_ADDRESS>| Book meetinghttps://aka.ms/jasoth/bookmeeting | Calendar availability (EST/EDT)https://aka.ms/jasoth/calendar
From: Alexander Batishchev<EMAIL_ADDRESS>Sent: Thursday, June 11, 2020 3:36 PM
To: jasoth/MSAL.PS<EMAIL_ADDRESS>Cc: Jason Thompson (ID CXP<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [jasoth/MSAL.PS] MSAL.PS <IP_ADDRESS> and X5C (#8)
Here's the commithttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjasoth%2FMSAL.PS%2Fcommit%2Fd4297bcf3d93c65d5a3c34e083f7acb1abdd1cf3&data=02|01|Jason.Thompson%40microsoft.com|42882866499d43b5533d08d80e3eb6ae|72f988bf86f141af91ab2d7cd011db47|1|0|637275009806717044&sdata=EZ5wFkQyFUCs2rR40JafMhwRoPMzaIrKGgo2a1ncmx8%3D&reserved=0 where it was added as commented from the start.
@jasothhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjasoth&data=02|01|Jason.Thompson%40microsoft.com|42882866499d43b5533d08d80e3eb6ae|72f988bf86f141af91ab2d7cd011db47|1|0|637275009806722029&sdata=AUtqNPEfsugsQcQP6%2BTF1n%2BJAUtOlw8MjKHQsIT8Ozs%3D&reserved=0, can you please commented why?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjasoth%2FMSAL.PS%2Fissues%2F8%23issuecomment-642887673&data=02|01|Jason.Thompson%40microsoft.com|42882866499d43b5533d08d80e3eb6ae|72f988bf86f141af91ab2d7cd011db47|1|0|637275009806727020&sdata=IZ%2F4Nfkld4iarkk1nDuovXbajZKBsfIHc5VRnOULl4Q%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAEDJ2NPDZTXS5CSZ63PB2DDRWEW3FANCNFSM4N3WKPHQ&data=02|01|Jason.Thompson%40microsoft.com|42882866499d43b5533d08d80e3eb6ae|72f988bf86f141af91ab2d7cd011db47|1|0|637275009806732006&sdata=b1KBJ24pTI%2B9LQ9Z2tSkxFLQnBVJpgJozHoOKIWmJ6U%3D&reserved=0.

Would be great to have this feature as right now the latest version doesn't work with 1PA.
Do you know if there any alternative to get it working from PowerShell?

I would suggest using New-MsalClientApplication and then use the WithSendX5C methodhttps://docs.microsoft.com/en-us/dotnet/api/microsoft.identity.client.acquiretokenforclientparameterbuilder.withsendx5c?view=azure-dotnet on the application object from PowerShell to do X5C.
Jason Thompson
Sr. Program Managerhttps://aka.ms/jasoth/LinkedIn | Microsoft Identity CxP GTPhttps://azure.microsoft.com/en-us/case-studies/?service=active-directory | +1<PHONE_NUMBER>tel:+15138269258
Microsoft Teams<EMAIL_ADDRESS>| Book meetinghttps://aka.ms/jasoth/bookmeeting | Calendar availability (EST/EDT)https://aka.ms/jasoth/calendar
From: Alexander Batishchev<EMAIL_ADDRESS>Sent: Thursday, June 11, 2020 6:25 PM
To: jasoth/MSAL.PS<EMAIL_ADDRESS>Cc: Jason Thompson (ID CXP<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: Re: [jasoth/MSAL.PS] MSAL.PS <IP_ADDRESS> and X5C (#8)
Would be great to have this feature as right now the latest version doesn't work with 1PA.
Do you know if there any alternative to get it working from PowerShell?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fjasoth%2FMSAL.PS%2Fissues%2F8%23issuecomment-642961529&data=02|01|Jason.Thompson%40microsoft.com|2b85c226ddbe41d6aaa708d80e564625|72f988bf86f141af91ab2d7cd011db47|1|0|637275111002014169&sdata=L64Zafgzt86YsDVMOvE4DopokrxL9IwL%2BPs7lsZCfzk%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAEDJ2NIOIS5RKAK5W4YV27LRWFKTTANCNFSM4N3WKPHQ&data=02|01|Jason.Thompson%40microsoft.com|2b85c226ddbe41d6aaa708d80e564625|72f988bf86f141af91ab2d7cd011db47|1|0|637275111002019162&sdata=ZOl5%2BvxNowqkCORzWiuZMokVCdp5bPPoiJ%2FHCTmoFb4%3D&reserved=0.

Here's what appears to work for me:
if ($SendX5C)
{
    $app = New-MsalClientApplication -ClientId $clientId -TenantId $tenantId -Authority $authority -ClientCertificate $cert
    $scopes = [string[]] @( $Scope )
    $response = $app.AcquireTokenForClient($scopes).WithSendX5C($true).ExecuteAsync().GetAwaiter().GetResult()
}
else
{
    $response = Get-MsalToken -ClientId $clientId -TenantId $tenantId -Authority $authority -Scopes $Scope -ClientCertificate $cert
}

Still would be great if it could be just a switch on Get-MsalToken. Thanks!

I added the SendX5C parameter in the latest update.

@jasoth I'm having a problem with parameters set too. From the list for version <IP_ADDRESS> I see that I can include SendX5C only in one of them:
Get-MsalToken [-SendX5C] [-AuthorizationCode <String>] [-UserAssertion <String>] [-UserAssertionType <String>] [-AzureCloudInstance
    {None | AzurePublic | AzureChina | AzureGermany | AzureUsGovernment}] [-TenantId <String>] [-Authority <Uri>]
    [-ConfidentialClientApplication] <IConfidentialClientApplication> [-Scopes <String[]>] [-CorrelationId <Guid>] [-ExtraQueryParameters
    <Hashtable>] [-ForceRefresh] [<CommonParameters>]

But I want to call it in the following way:
Get-MsalToken -ClientId $c `
              -TenantId $t `
              -Authority https://login.windows-ppe.net/$t/v2.0 `
              -Scopes https://management.core.windows.net/.default `
              -ClientCertificate $cert `
              -SendX5C

Can you please add SendX5C to more/rest of parameter sets?

There are two other usages as well. I assigned it to all parameter sets that involve a ClientCertificate. However, the combination of parameters you have there is not resolving correctly for some reason. I'll take a look at some point.
    Get-MsalToken [-ClientId] <String> -ClientCertificate <X509Certificate2> [-SendX5C] -UserAssertion <String>
    [-UserAssertionType <String>] [-RedirectUri <Uri>] [-AzureCloudInstance {None | AzurePublic | AzureChina |
    AzureGermany | AzureUsGovernment}] [-TenantId <String>] [-Authority <Uri>] [-Scopes <String[]>] [-CorrelationId
    <Guid>] [-ExtraQueryParameters <Hashtable>] [<CommonParameters>]

    Get-MsalToken [-ClientId] <String> -ClientCertificate <X509Certificate2> [-SendX5C] -AuthorizationCode <String>
    [-RedirectUri <Uri>] [-AzureCloudInstance {None | AzurePublic | AzureChina | AzureGermany | AzureUsGovernment}]
    [-TenantId <String>] [-Authority <Uri>] [-Scopes <String[]>] [-CorrelationId <Guid>] [-ExtraQueryParameters
    <Hashtable>] [<CommonParameters>]

    Get-MsalToken [-SendX5C] [-AuthorizationCode <String>] [-UserAssertion <String>] [-UserAssertionType <String>]
    [-AzureCloudInstance {None | AzurePublic | AzureChina | AzureGermany | AzureUsGovernment}] [-TenantId <String>]
    [-Authority <Uri>] [-ConfidentialClientApplication] <IConfidentialClientApplication> [-Scopes <String[]>]
    [-CorrelationId <Guid>] [-ExtraQueryParameters <Hashtable>] [-ForceRefresh] [<CommonParameters>]

hi, I updated to <IP_ADDRESS> but still getting an error:

Parameter set cannot be resolved using the specified named parameters. One or more parameters issued cannot be used
| together or an insufficient number of parameters were provided.

How I ran the script:

Get-MsalToken -ClientId $clientId -TenantId $tenantId -Authority $authority -Scopes $Scope -ClientCertificate $cert -XendX5C

This should be fixed now.


Audio?

I can not figure out how to add audio everything else  works though!

hey! Sorry - the documentation for that isn't very good (aka nonexistant)
Here is what i did:

Make a folder called "assets" under dist
Add mp3 files (or whatever file type) to the assets folder
Set the "audio" field to "/assets/myfilename.mp3"

You may have to hit the refresh button next to the audio input field

Let me know if that works for you! Also, thanks for trying this out, I think you're the first person to do so

of course! the animation works beautifully! it is my first animatronic and
I love it!
On Fri, 12 Apr 2019 at 15:59, John Horton<EMAIL_ADDRESS>wrote:

Let me know if that works for you! Also, thanks for trying this out, I
think you're the first person to do so
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/johnventions/Arduino-Director/issues/1#issuecomment-482703519,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AusyZJ5_webIeU34PeNxabo6fdwE8NSWks5vgOWZgaJpZM4cssTE
.

Well hot diggity dog that's awesome news. Would love to hear more about it / I have a couple ideas for software improvements. My email is johnventions AT gmail if you want to chat animatronics


feat: pixel driller API

The pixel driller API converts many single-band raster files into one gigantic multi-band raster file with each band tagged with its initial file name. The API will return the value for any given pixel on the /{x}/{y} endpoint.
The first time it is run, or anytime the source rasters are updated, the ingestion process will need to be rerun by sending a POST request to the /reimport endpoint with {"code": str} matching the ADMIN_CODE envvar.

This likely needs a few adjustments, but the core idea is there as a first try. There are simple tests for the two main functions - we could add a CI job to run them.
FWIW: I'm in no way suggesting this isn't a terrible way to do this, or even that it doesn't result in horrible data warping during reprojection. We need to investigate the data integrity in particular.

Hey Matt, that was quick! :)
A few random thoughts:

I had assumed this would be a new API endpoint within the existing backend for some reason, but a new service also works. Any thoughts on the choice?
How big will the mega-file be for Jamaica? I imagine eventually we'll want to deploy this for the global visualisation tool too. So that'll be hundreds of rasters with global coverage, all stacked into one file. That seems a bit gross. Maybe it's not? With the values resampled to a regular grid there are lots of potential alternatives though. Sharded parquet?
What's the response time for a few hundred bands of a single pixel with the current method?

Thanks again for the quick setup and provocation to test something else out!

ingesting to zarr takes a few minutes, with data stored in chunks whose layout and size can be tuned
this approach maintains the resolution and CRS of the source data, though it stores grid coordinates explicitly in the coordinate dimensions, rather than using the affine transform
it uses xarray's ds.sel(..., method="nearest") selector to pick the nearest pixel
retrieval is probably fast enough, locally I'm seeing around ~60ms to get JSON back for all layers for a single point
the tileserver/stacks directory of zarr stores is ~820M, a little smaller than the ~990M tileserver/raster Cloud-Optimised GeoTIFFs directory for terracotta
I think this would sit well as an endpoint within backend - the metadata for layers and zarr datasets is all in a couple of CSVs as I've set it up now, but these are tightly coupled to the risk results (each hazard/rp/... layer that we query for an intensity value in pixel_driller now is also one for which we calculate damages and store in the postgres database). So metadata about these layers could well go in our db in a future iteration.
ingest.py could go in etl
the JSON response could be tweaked in many ways

do we want to use and expose the compound string keys as they are?
do we like [{'key':'coastal__rp_10__...', 'band_data':0.92349237}, ...] list of objects
big object of {'coastal__rp_10__...': 0.92349237, ...}
other, more structured/flexible ways of passing the key metadata? Or more compact (currently around ~50k response size)?

Sounds like a great upgrade to what I came up with - I'll look properly tomorrow when I can see the code.
Agreed that there's lots to consider with sending layer metadata, including figuring out exactly what we need to transfer.

That looks like a really strong rework of the original code @tomalrussell, thanks.
@thomas-fred - the choice for a new service was that this is a fundamentally different data representation than terracotta's (or at least might have been - I wandered through several different ideas before going for raster bands), and that writing a small, simple FastAPI is a relatively small, extensible, self-contained job that relies on tech already used in the project.
The initial solution ran about 1.5s for retrieving the full list of existing rasters. @tomalrussell has got that down to about 60ms, although I don't know if that's running in a container or directly on the host system. He's also shrunk the file size for the output from about 7.5GB to less than 1GB, so, again, a massive improvement.


Unable to converge

Hi, thanks for the repo.
When I try to use the ACELoss, the HD Loss is very high for hundreds epochs (approx. 1e+4) while the DSC is around 0.005 or so. I am wondering if I use this repo right.
What I am trying to do is multi-label segmentation, that inputting B1HW and outputting BCHW (where C is the number of classes). Previously, I used Dice loss for my task and it worked well (approx. 0.95 DSC). Currently, I simply switched from dice loss to 0.8 * dice + 0.2 * ACE.
I am wondering if I am using ACE correctly or not?

Hi, shijianjian,
Thanks for your attention, but I do not know what kind of problem you have met. Firstly, ACE Loss is extended from AC Loss, Xu Chen et al.  and Jun Ma et al. have proved that the AC-based loss function is useful for a single class segmentation, same with them we just demonstrate the usefulness in binary segmentation task, that is because, for the multi-class problem, there are several parameters need to be tuned carefully, maybe it can also work well, but we have not tested it. Secondly, if you want to combine it with DICE Loss, please use "mean" to please "sum", this tip I have provided in READ.ME. Finally, you can read the original paper to learn more details, maybe it can help you.
Best;
Xiangde.

Hi, shijianjian,
Thanks for your attention, but I do not know what kind of problem you have met. Firstly, ACE Loss is extended from AC Loss, Xu Chen et al.  and Jun Ma et al. have proved that the AC-based loss function is useful for a single class segmentation, same with them we just demonstrate the usefulness in binary segmentation task, that is because, for the multi-class problem, there are several parameters need to be tuned carefully, maybe it can also work well, but we have not tested it. Secondly, if you want to combine it with DICE Loss, please use "mean" to please "sum", this tip I have provided in READ.ME. Finally, you can read the original paper to learn more details, maybe it can help you.
Best;
Xiangde.

@Luoxd1996 Thanks for  the quick response. The major mistake I did there was to input logits the sigmoid/softmax results to the loss function. I could use "mean" to integrate the loss now. Thanks your advise.
I am doing a organ segmentation task and I am currently using beta = 1 for it, which performs not as good as dice loss (dice only = 0.96, dice+ACE = 0.93). I have noticed in the paper that you mentioned that the beta is suggested to be in (2, 10) for this kind of task. Can you share your thoughts on how to select the best beta value?
Thank you!
FYI, the code:
class ACELossVM(nn.Module):
    """
    Active Contour Loss
    based on total variations and mean curvature

    to use these methods just as constrains (combining with dice loss or ce loss)
    with torch.mean() to replace torch.sum().

    For instance, for curvilinear or tubular structures image segmentation tasks:
        a) β (0 < β < 2) has better segmentation results
        b) β (2 < β < 10) for non-tubular structures
    """
    def __init__(self, u=1, a=1e-3, b=1, from_logits=True, reduction='sum') -> None:
        super().__init__()
        self.u = u
        self.a = a
        self.b = b
        self.from_logits = from_logits
        self.reduction = reduction

    def first_derivative(self, input):
        u = input
        m = u.shape[2]
        n = u.shape[3]

        ci_0 = (u[:, :, 1, :] - u[:, :, 0, :]).unsqueeze(2)
        ci_1 = u[:, :, 2:, :] - u[:, :, 0:m - 2, :]
        ci_2 = (u[:, :, -1, :] - u[:, :, m - 2, :]).unsqueeze(2)
        ci = torch.cat([ci_0, ci_1, ci_2], 2) / 2

        cj_0 = (u[:, :, :, 1] - u[:, :, :, 0]).unsqueeze(3)
        cj_1 = u[:, :, :, 2:] - u[:, :, :, 0:n - 2]
        cj_2 = (u[:, :, :, -1] - u[:, :, :, n - 2]).unsqueeze(3)
        cj = torch.cat([cj_0, cj_1, cj_2], 3) / 2

        return ci, cj

    def second_derivative(self, input, ci, cj):
        u = input
        # m = u.shape[2]
        n = u.shape[3]

        cii_0 = (u[:, :, 1, :] + u[:, :, 0, :] - 2 * u[:, :, 0, :]).unsqueeze(2)
        cii_1 = u[:, :, 2:, :] + u[:, :, :-2, :] - 2 * u[:, :, 1:-1, :]
        cii_2 = (u[:, :, -1, :] + u[:, :, -2, :] - 2 * u[:, :, -1, :]).unsqueeze(2)
        cii = torch.cat([cii_0, cii_1, cii_2], 2)

        cjj_0 = (u[:, :, :, 1] + u[:, :, :, 0] - 2 * u[:, :, :, 0]).unsqueeze(3)
        cjj_1 = u[:, :, :, 2:] + u[:, :, :, :-2] - 2 * u[:, :, :, 1:-1]
        cjj_2 = (u[:, :, :, -1] + u[:, :, :, -2] - 2 * u[:, :, :, -1]).unsqueeze(3)

        cjj = torch.cat([cjj_0, cjj_1, cjj_2], 3)

        cij_0 = ci[:, :, :, 1:n]
        cij_1 = ci[:, :, :, -1].unsqueeze(3)

        cij_a = torch.cat([cij_0, cij_1], 3)
        cij_2 = ci[:, :, :, 0].unsqueeze(3)
        cij_3 = ci[:, :, :, 0:n - 1]
        cij_b = torch.cat([cij_2, cij_3], 3)
        cij = cij_a - cij_b

        return cii, cjj, cij

    def region(self, y_pred, y_true, u=1):
        label = y_true.float()
        c_in = torch.ones_like(y_pred)
        c_out = torch.zeros_like(y_pred)
        if self.reduction == 'mean':
            region_in = torch.abs(torch.mean(y_pred * ((label - c_in) ** 2)))
            region_out = torch.abs(torch.mean((1 - y_pred) * ((label - c_out) ** 2)))
        elif self.reduction == 'sum':
            region_in = torch.abs(torch.sum(y_pred * ((label - c_in) ** 2)))
            region_out = torch.abs(torch.sum((1 - y_pred) * ((label - c_out) ** 2)))
        else:
            raise ValueError
        region = u * region_in + region_out
        return region

    def elastica(self, input, a=1, b=1):
        ci, cj = self.first_derivative(input)
        cii, cjj, cij = self.second_derivative(input, ci, cj)
        beta = 1e-8
        length = torch.sqrt(beta + ci ** 2 + cj ** 2)
        curvature = (beta + ci ** 2) * cjj + (beta + cj ** 2) * cii - 2 * ci * cj * cij
        curvature = torch.abs(curvature) / ((ci ** 2 + cj ** 2) ** 1.5 + beta)
        if self.reduction == 'mean':
            elastica = torch.mean((a + b * (curvature ** 2)) * torch.abs(length))
        elif self.reduction == 'sum':
            elastica = torch.sum((a + b * (curvature ** 2)) * torch.abs(length))
        else:
            raise ValueError
        return elastica

    def forward(self, y_pred, y_true):
        if self.from_logits:
            y_pred = torch.sigmoid(y_pred)
        loss = self.region(y_pred, y_true, u=self.u) + self.elastica(y_pred, a=self.a, b=self.b)
        return loss

@Luoxd1996 Thanks for  the quick response. The major mistake I did there was to input logits the sigmoid/softmax results to the loss function. I could use "mean" to integrate the loss now. Thanks your advise.
I am doing a organ segmentation task and I am currently using beta = 1 for it, which performs not as good as dice loss (dice only = 0.96, dice+ACE = 0.93). I have noticed in the paper that you mentioned that the beta is suggested to be in (2, 10) for this kind of task. Can you share your thoughts on how to select the best beta value?
Thank you!
FYI, the code:
class ACELossVM(nn.Module):
    """
    Active Contour Loss
    based on total variations and mean curvature

    to use these methods just as constrains (combining with dice loss or ce loss)
    with torch.mean() to replace torch.sum().

    For instance, for curvilinear or tubular structures image segmentation tasks:
        a) β (0 < β < 2) has better segmentation results
        b) β (2 < β < 10) for non-tubular structures
    """
    def __init__(self, u=1, a=1e-3, b=1, from_logits=True, reduction='sum') -> None:
        super().__init__()
        self.u = u
        self.a = a
        self.b = b
        self.from_logits = from_logits
        self.reduction = reduction

    def first_derivative(self, input):
        u = input
        m = u.shape[2]
        n = u.shape[3]

        ci_0 = (u[:, :, 1, :] - u[:, :, 0, :]).unsqueeze(2)
        ci_1 = u[:, :, 2:, :] - u[:, :, 0:m - 2, :]
        ci_2 = (u[:, :, -1, :] - u[:, :, m - 2, :]).unsqueeze(2)
        ci = torch.cat([ci_0, ci_1, ci_2], 2) / 2

        cj_0 = (u[:, :, :, 1] - u[:, :, :, 0]).unsqueeze(3)
        cj_1 = u[:, :, :, 2:] - u[:, :, :, 0:n - 2]
        cj_2 = (u[:, :, :, -1] - u[:, :, :, n - 2]).unsqueeze(3)
        cj = torch.cat([cj_0, cj_1, cj_2], 3) / 2

        return ci, cj

    def second_derivative(self, input, ci, cj):
        u = input
        # m = u.shape[2]
        n = u.shape[3]

        cii_0 = (u[:, :, 1, :] + u[:, :, 0, :] - 2 * u[:, :, 0, :]).unsqueeze(2)
        cii_1 = u[:, :, 2:, :] + u[:, :, :-2, :] - 2 * u[:, :, 1:-1, :]
        cii_2 = (u[:, :, -1, :] + u[:, :, -2, :] - 2 * u[:, :, -1, :]).unsqueeze(2)
        cii = torch.cat([cii_0, cii_1, cii_2], 2)

        cjj_0 = (u[:, :, :, 1] + u[:, :, :, 0] - 2 * u[:, :, :, 0]).unsqueeze(3)
        cjj_1 = u[:, :, :, 2:] + u[:, :, :, :-2] - 2 * u[:, :, :, 1:-1]
        cjj_2 = (u[:, :, :, -1] + u[:, :, :, -2] - 2 * u[:, :, :, -1]).unsqueeze(3)

        cjj = torch.cat([cjj_0, cjj_1, cjj_2], 3)

        cij_0 = ci[:, :, :, 1:n]
        cij_1 = ci[:, :, :, -1].unsqueeze(3)

        cij_a = torch.cat([cij_0, cij_1], 3)
        cij_2 = ci[:, :, :, 0].unsqueeze(3)
        cij_3 = ci[:, :, :, 0:n - 1]
        cij_b = torch.cat([cij_2, cij_3], 3)
        cij = cij_a - cij_b

        return cii, cjj, cij

    def region(self, y_pred, y_true, u=1):
        label = y_true.float()
        c_in = torch.ones_like(y_pred)
        c_out = torch.zeros_like(y_pred)
        if self.reduction == 'mean':
            region_in = torch.abs(torch.mean(y_pred * ((label - c_in) ** 2)))
            region_out = torch.abs(torch.mean((1 - y_pred) * ((label - c_out) ** 2)))
        elif self.reduction == 'sum':
            region_in = torch.abs(torch.sum(y_pred * ((label - c_in) ** 2)))
            region_out = torch.abs(torch.sum((1 - y_pred) * ((label - c_out) ** 2)))
        else:
            raise ValueError
        region = u * region_in + region_out
        return region

    def elastica(self, input, a=1, b=1):
        ci, cj = self.first_derivative(input)
        cii, cjj, cij = self.second_derivative(input, ci, cj)
        beta = 1e-8
        length = torch.sqrt(beta + ci ** 2 + cj ** 2)
        curvature = (beta + ci ** 2) * cjj + (beta + cj ** 2) * cii - 2 * ci * cj * cij
        curvature = torch.abs(curvature) / ((ci ** 2 + cj ** 2) ** 1.5 + beta)
        if self.reduction == 'mean':
            elastica = torch.mean((a + b * (curvature ** 2)) * torch.abs(length))
        elif self.reduction == 'sum':
            elastica = torch.sum((a + b * (curvature ** 2)) * torch.abs(length))
        else:
            raise ValueError
        return elastica

    def forward(self, y_pred, y_true):
        if self.from_logits:
            y_pred = torch.sigmoid(y_pred)
        loss = self.region(y_pred, y_true, u=self.u) + self.elastica(y_pred, a=self.a, b=self.b)
        return loss

Hi, shijianjian,
In my understanding, there is not good guidance to select the best value of "u, a, b", it is also the main drawback of AC-based loss functions, too many parameters, you can search them in a pre-defined spacing. In addition, we recommend you to read Prof. Xuecheng Tai and Prof. Tony Chan's paper, named "Image segmentation using Euler’s elastica as the regularization". By the way, our work's main contributions are not how to select the best parameters, so we just evaluate the robustness in some different values.
Best,
Xiangde.

Hi, shijianjian,
In my understanding, there is not good guidance to select the best value of "u, a, b", it is also the main drawback of AC-based loss functions, too many parameters, you can search them in a pre-defined spacing. In addition, we recommend you to read Prof. Xuecheng Tai and Prof. Tony Chan's paper, named "Image segmentation using Euler’s elastica as the regularization". By the way, our work's main contributions are not how to select the best parameters, so we just evaluate the robustness in some different values.
Best,
Xiangde.

Hi, shijianjian,
Also thanks for your re-written ACE code, we will update it and add more details about the usage later. Thank you again!
Sincerely，
Xiangde.

Hi, shijianjian,
Also thanks for your re-written ACE code, we will update it and add more details about the usage later. Thank you again!
Sincerely，
Xiangde.

I did not do a grid search but tried with few parameter combinations. With ACE loss only, I can hardly make it work for my project. Interestingly, the DSC will not be improved after several epochs (approx. 3 epochs):

a=0.001, b=1 >>>> DSC 0.6271
a=0.001, b=2 >>>> DSC 0.5432
a=0.001, b=5 >>>> DSC 0.5763
a=0.0001, b=1 >>>> DSC 0.6107
a=0.0001, b=2 >>>> DSC 0.5763

Additionally, I tried to add some randomness whilst training but also no luck there. As simple as following:
        loss = self.region(y_pred, y_true, u=self.u * np.random.randint(5)) + self.elastica(
            y_pred, a=self.a * np.random.randint(100), b=self.b * np.random.randint(5))

To me, ACE loss is not easy to make it work and it seems to be very sensitive to hyperparameter settings. I think this can be a critical point to have more people using ACE loss. Hope it could be improved in your next work!

I did not do a grid search but tried with few parameter combinations. With ACE loss only, I can hardly make it work for my project. Interestingly, the DSC will not be improved after several epochs (approx. 3 epochs):

a=0.001, b=1 >>>> DSC 0.6271
a=0.001, b=2 >>>> DSC 0.5432
a=0.001, b=5 >>>> DSC 0.5763
a=0.0001, b=1 >>>> DSC 0.6107
a=0.0001, b=2 >>>> DSC 0.5763

Additionally, I tried to add some randomness whilst training but also no luck there. As simple as following:
        loss = self.region(y_pred, y_true, u=self.u * np.random.randint(5)) + self.elastica(
            y_pred, a=self.a * np.random.randint(100), b=self.b * np.random.randint(5))

To me, ACE loss is not easy to make it work and it seems to be very sensitive to hyperparameter settings. I think this can be a critical point to have more people using ACE loss. Hope it could be improved in your next work!

Hi，shijinajian，
@shijianjian ，thanks for your suggestions. I agree with your opinion, the ACE Loss is sensitive to the hyperparameters, that is because of the ACE Model property, but we have reduced them to 3. In addition, I do not know what's your task and what's your target's structure, so I do not know what's your problems. You can try other loss functions for your task, good luck.
Best,
Xiangde.

Hi，shijinajian，
@shijianjian ，thanks for your suggestions. I agree with your opinion, the ACE Loss is sensitive to the hyperparameters, that is because of the ACE Model property, but we have reduced them to 3. In addition, I do not know what's your task and what's your target's structure, so I do not know what's your problems. You can try other loss functions for your task, good luck.
Best,
Xiangde.


term: remove "Dvcfile" from install/plugins

PR references -
 install/plugins — see also #1420 (review) (on Vim plugin) from #1445.

OK @sarthakforwet thanks for checking the Install section but it seems there's nothing to update here! Closing 🙂

P/s but feel free to address the last checkboxes in the original issue, e.g. "push cmd ref."


Use EditorConfig

Check this out:
http://editorconfig.org/

@MHM5000 Fork the project, add it and open a pull request.


feature: add armv7 prebuilds

Use qemu and --platform linux/arm/v7 to cross build
binaries for 32 bit arm v7.
Based on #714, see also #601.
Untested, but a slimmed down version seems to build ok.

This is a much needed feature and a good approach but there seem to be some issues.

This build will fail because you're missing a necessary quotation mark and a new line at the end of the new job
It's unnecessary to add a completely new job for this specific build when you can simply use a build matrix

This is implemented in a much cleaner way in #758 since that was already been done for a fork.

Oooh so much better - all hail #758 !


add onTouchStart to pretty-text-input

Tested this in Chrome's device simulator, and with this change, clicking an input box to the right of a pretty pill correctly places the cursor directly to the right of the pill as expected.
With change:

Previously:

edit: this will need an npm version patch — not sure if I should add that to this PR or do it separately

patching separately from this branch.


Fix rstar-demo for aarch64 macos

[x] I agree to follow the project's code of conduct.
[-] I added an entry to CHANGES.md if knowledge of this change could be valuable to users.

The current demo wasn't compiling on my machine - failing due to an old downstream dep of kiss3d (winit). Fixed by the update.

... investigating ci error.

... investigating ci error.

The latest-and-greatest nalgebra crate doesn't work on rust pre-1.51, which was just release about a month ago.
Rather than answer hard questions about how long we should endeavor to support old versions of rust, since it's just a demo-crate, I've opted to peg it to a slightly-less-than-latest release for now.

bors r=urschrei


transactions flow example

During me exploration of Sui ecosystem I noticed that there is a lack of visual representation of some technical aspects. I decided to add my understanding of the transactions in SUI in the form of a graph. Looking forward to your feedback/suggestions.

added an image in Mermaid

Hi @szymcio32 This PR keeps failing on the Rust license check. Unclear why. Could you rebase and try it again, or make a new PR? Sorry for the trouble

Should be fine now

Thanks @szymcio32 Merged!


Better handling of statements/expressions

Currently there are a number of places where semi-colons are required that are counter-intuitive (e.g. after the closing brace of a block). This is due to the way the parser handles statements vs expressions. This section of the parser is quite messy and hacky. It will need to be re-thought out and rewritten.
This issue may want to wait on the development of a clearer grammar for the language as a whole.

Fixed by #9


Bump Version: 0.0.1 -> 0.1.0

Codecov Report
Patch coverage: 100.00% and project coverage change: +0.05 :tada:

Comparison is base (73ade75) 81.32% compared to head (dc5776d) 81.37%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #17      +/-   ##
==========================================
+ Coverage   81.32%   81.37%   +0.05%
==========================================
  Files           6        6
  Lines         348      349       +1
  Branches       24       24
==========================================
+ Hits          283      284       +1
  Misses         42       42
  Partials       23       23

Impacted Files
Coverage Δ

zkpy/__init__.py
100.00% <100.00%> (ø)

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

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


Facing issue regarding setting up React Native with eslint-config-rallycoding

Hi All,
I have been facing this issue for quite some time regarding setting up my React Native environment. I have started using ESLint config Rallycoding in Atom. I am getting the below error --

Unable to resolve path to module 'react' (import/no-unresolved).
Unable to resolve path to module 'react-native' (import/no-unresolved).

My .eslintrc file goes here --
{   "extends": "rallycoding" }
And my package.json file also goes here --
{ 	"name": "FirstReactAndroidApp", 	"version": "0.0.1", 	"private": true, 	"scripts": { 		"start": "node node_modules/react-native/local-cli/cli.js start" 	}, 	"dependencies": { 		"babel-eslint": "^6.1.2", 		"eslint": "^3.19.0", 		"eslint-import-resolver-node": "^0.2.3", 		"eslint-plugin-class-property": "^1.0.6", 		"eslint-plugin-import": "^1.16.0", 		"eslint-plugin-jsx-a11y": "^2.2.3", 		"eslint-plugin-react": "^6.10.3", 		"react": "15.3.1", 		"react-native": "0.33.0" 	}, 	"devDependencies": { 		"eslint-config-rallycoding": "^3.2.0" 	} }
Please help me with this issue. Let me know incase you need any more info.

I'm having the same exact problem. Did you ever find a solution?

Same here, any luck finding a fix?

I'm facing the same issue 👎  any luck with it?

hi i having this problem ,
how can i fix it?
{ 	"parser": "babel-eslint", 	"extends": "rallycoding", 	"plugins": [ 		"react", 		"import", 		"jsx-a11y" 	] }


Simplify the accordion controller

Trello card
https://trello.com/c/PVtlFla9/442-review-javascript-and-remove-use-of-style-in-favour-of-changing-css-classes
Context
This follows on from #561, that should be reviewed first.
Changes proposed in this pull request
https://trello.com/c/PVtlFla9/442-review-javascript-and-remove-use-of-style-in-favour-of-changing-css-classes
The accordion Javascript was complicated and operated on a list of buttons and content, identifying each by its id every time.
This simplified approach wraps each pair (button and content) in a <section> element and toggles a single inactive class on it, the display of the contents are then controlled via CSS.
Guidance to review
Review (and hopefully approve #561) before this, only 7328126 is relevant here.

Looks good, I'll put a tick on it once the other PR has been merged down and this has been rebased 👍

Fixed the chevron colour CSS observed in #561, now it changes to black when in :focus

Following the z-index change (2d0662c) the shadow is always visible when in :focus


Add simplest TTY detection for Colorize

Simplest version of #3925.
It renames @on to @enabled because Colorize::Object has #on method also, but @on is not related and its name does not make a sense.

What? https://travis-ci.org/crystal-lang/crystal/jobs/214889120

Just a question: what if I want to send output to a file and later show it colorized in another way but still recognizing the color codes? For example like what travis does (stores colored output and probably formats it in the web with JS). I don't understand why the Colorize should be enabled or disabled according to one possible output (STDOUT and STDERR). I understand that this is the most probable output, but this will lead to a lot of confusion and unexpected behaviour.
I'd say to revert this merge, but I'd like to know others' opinions.

For example:
# foo.cr
require "colorize"

# I want to write "hello" in red to a file
File.write("file.txt", "hello".colorize.red)

puts "Done!"

Now:
$ bin/crystal foo.cr
Done!
$ cat file.txt
hello # in red
$ bin/crystal foo.cr > another.txt
Done!
$ cat file.txt
hello # without colors

Totally unexpected behaviour.
Colorize shouldn't be tied to STDOUT/STDERR.

This PR change the default setting from enabled to enabled if TTY.
And tidy up some names.
Colorize was already global and not sensible to the targeted IO. I agree it is an issue it should be addressed (for example in playground you can send the log with ansi colors despite the tty). But I see that as a separate issue.

For example this is with Ruby's colorize:
require "colorize"

puts "hello".colorize(:red)

It outputs "hello" in red to the console. But if we redirect the output to a file with ruby foo.rb > file.txt and then cat file.txt we still get colors. And I don't think it's good to assume that just because we send the output to a file or some other device we don't want colors (for example using cat and having colors if very convenient).
@MakeNowJust What do you think about this?

I agree with @asterite 's last comment, colorize should not assume anything, but it should be easy for the user to disable the colors on demand.
We could have an helper like Colorize.on_tty_only! that checks stdout/err and disable colors when it's not a tty.
A use case would be to have a big colored output, and pipe it to less:
$ ./some_big_colored_output | less -R

The -R will interpret the colors and display them in the less pager..

@asterite said:

(for example using cat and having colors if very convenient).

But I use cat for removing colors sometime (i.e. brew install foo | cat). Expected behavior is different between peoples. This makes harder colorize problem.
However I think I shouldn't have changed default behavior (backward compatibility is important and current behavior is difficult to understand). @bew's Colorize.on_tty_only! seems good idea. Thank you @bew.


Docker container up and running.  Unable to copy files to local-media directory.  Permissions show ok via ls-l.

Donation sent requesting support / assistance in resolving this issue.  I have been trying for 1 week now to get cloud-media-scripts working.

Can you paste your docker bindings here?

sudo docker create --name cms
--restart=always
--net=lsio
--privileged --cap-add=MKNOD --cap-add=SYS_ADMIN --device=/dev/fuse
-e PUID=0
-e PGID=0
-e ENCRYPT_MEDIA="1"
-e READ_ONLY="1"
-e CLEAR_CHUNK_MAX_SIZE="1000G"
-e REMOVE_LOCAL_FILES_WHEN_SPACE_EXCEEDS_GB="2000"
-e FREEUP_ATLEAST_GB="1000"
-v "/share/media":/local-media:shared
-v /mnt/external/media:/local-decrypt:shared
-v /mnt/external/media/cloud-encrypt:/cloud-encrypt:shared
-v "/share/appdata/cms":/config
-v /mnt/external/plexdrive:/chunks
-v /logs:/log
madslundt/cloud-media-scripts
On Wed, Oct 30, 2019 at 4:02 PM Mads Engel Lundt<EMAIL_ADDRESS>wrote:

Can you paste your docker bindings here?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/madslundt/docker-cloud-media-scripts/issues/49?email_source=notifications&email_token=AMBXXV5TTPWCRWFVUFLYJHDQRHR4XA5CNFSM4JGB6522YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECVSRKA#issuecomment-548087976,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMBXXV77SVT4G72JCLOGZMTQRHR4XANCNFSM4JGB652Q
.

--
Robert Smith
<EMAIL_ADDRESS>(804) 393-8951

Here is the log from the docker container:
User gid:    0
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Started mongod --logpath /log/mongod.log
Started mount
2019-10-30T20:19:20.395+0000 I CONTROL  [main] log file "/log/mongod.log" exists; moved to "/log/mongod.log.2019-10-30T20-19-20".
[ 2019-10-30@20:19:26 ] Mounting Google Drive mountpoint: /cloud-encrypt
[ 2019-10-30@20:19:31 ] Mounting decrypted Google Drive: /cloud-decrypt
2019/10/30 20:19:31 NOTICE: Encrypted drive 'local-crypt:': poll-interval is not supported by this remote
[ 2019-10-30@20:19:36 ] Mounting union: /local-media

Any suggestions on what i can do to fix this issue?

Donation sent requesting support / assistance in resolving this issue. I have been trying for 2 weeks now to get cloud-media-scripts working.

I'm closing this because the issue is a duplicate of this one https://github.com/madslundt/docker-cloud-media-scripts/issues/47


[BSO] Expand Vasa's random boss list, currently missing a few

🚀 Feature Proposal
Vasa has the unique feature of dropping loot from any boss which uses +k to fight, however I noticed that a few bosses are missing from the Vasa boss list for some reason. They are listed below, would make for even greater variety in loot if they get added!

Abyssal sire
Alchemical hydra
Barrows
All 3 Dagannoth kings
Grotesque guardians
Kraken
Sarachnis
Thermonuclear smoke devil
Malygos, Treebeard & Sea kraken (Completely understandable if left out though, would be a bit much but feel its worth noting)

Added all of these to vasas drop table.


Url checking from isUrl()

Why this is allowing the following url??
wwww.colorjetindia.com
www-w.colorjetinia.com
ww.w-w.colorjetindia.com
how can i prevent this

Think so