java.lang.NoClassDefFoundError: scala/Product$class

I am using spark with java & maven. I am using azure-cosmos-spark_3-1_2-12:4.23.0 , other dependencies such as spark-sql, spark-core, jackson all are scala 2.12.X built.  Even my local spark version is 3.5.0 and scala version is 2.12.18
I am reading a stream of data but on trying any of below, api I am getting java.lang.NoClassDefFoundError: scala/Product$class error

datset.show()
dataset.writestream()..start();

Hi,
this was due to a dependency version compatibility issue, I was able to resolve it after tweaking the versions for my different dependencies


EBADF, bad file descriptor

on window platform，use exec，eg：
options =
        async: true
        timeout: 1000*60*10
        maxBuffer: 1024*1024*10

exec 'git init', options, (code, output) ->
        console.log('Exit code:', code);
        console.log('Program output:', output);
        if code != 0
          reject("Error: Git init failed:#{output}")
        else
          resolve()

throw e：
Error: EBADF, bad file descriptor
  at Error (native)
  at Object.fs.writeSync (fs.js:559:20)
  at SyncWriteStream.write (fs.js:1768:6)
  at Socket.<anonymous> (c:\Users\comeontom\.atom\packages\atom-butterfly\node_modules\shelljs\src\exec.js:113:22)
  at Socket.emit (events.js:129:20)
  at readableAddChunk (_stream_readable.js:161:16)
  at Socket.Readable.push (_stream_readable.js:125:10)
  at Pipe.onread (net.js:522:20)

@VectorHo: Hi! would you mind re-testing this with the latest version of shelljs.

^ from the git repo is best, since we haven't done a release in quite a while

@VectorHo is this still a concern? We've released ShellJS v0.7, which should have a lot of improvements.

If this is still an issue, please reopen


What is the correct use of fitBounds?

It's a bit unclear how to properly specify fitBounds. I have a range of markers and I'd like to ensure the viewport contains them all in view. I noticed that Control does allow for me to specify GeolocationOptions which has the fitBounds property in it. However when I provide it with proper data the bounds don't take effect.
An example might be helpful for future users as this particular use-case is likely very common.
:-) Thanks!

Here is a simple example:
import { render } from 'solid-js/web';
import { Component, createSignal } from 'solid-js';
import MapGL, { Viewport, Marker, useMap } from 'solid-map-gl';

const places = [
  [-0.118092, 51.509865], // London
  [30.523333, 50.450001], // Kyiv
  [2.154007, 41.390205], // Bacelona
];

const [viewport, setViewport] = createSignal({
  center: [0,0],
  zoom: 0,
} as Viewport);

const Root: Component = () => {
  const map = useMap();
  map().fitBounds(places, { padding: 10 });
  return <></>;
};

const App: Component = () => (
  <MapGL
    options={{
      accessToken: import.meta.env.VITE_MAPBOX_ACCESS_TOKEN,
      style: 'mb:basic',
    }}
    viewport={viewport()}
    onViewportChange={(evt: Viewport) => setViewport(evt)}
  >
    {places.map((place) => (
      <Marker lngLat={place} />
    ))}
    <Root />
  </MapGL>
);

render(() => <App />, document.getElementById('root') as HTMLElement);

You basically create a nested component which uses the useMap context to get access to the mapbox object. And then you can use any functionallity mapbox provides. Sorry haven't documented it yet.

Hi David,
I added this code to the documentation examples.
Let me know if it's working for you.


Bicep/DataFactory diagnosticSettings does not exist in context

Probably a bicep issue

Originally posted by @segraef in https://github.com/Azure/ResourceModules/pull/303#discussion_r739084431

Thank you Alex.


SciPy 1.6 breaks WXRotations

The new SciPy release is not compatible with our WXRotations object. Some interfaces changed and some functions seem to be removed or renamed.

Double post...

Double post...


Arc length parameterization?

I am using your spline library to generate splines for moving a robot, and have been using the LoopingCubicHermiteSpline version successfully for a while. I am currently picking points from the spline based on time in a loop, so more or less at even steps in T. What I am experiencing, though, is that the arc length traversed between each step varies a lot (which is to be expected). What would be better for me is some sort of arc length parameterization that would allow me to sample points from the spline based on the arc length, not the internal T value. This would give me constant speed for the robot, given even steps in time.
I was looking at the ArcLength::partition function, and was wondering if that would work? I assume it would if I just gave it the current arc length point (based on time) I want, and throw away all but the first point? Is there a better way to go about this with the current code, or is there an easy addition that could be done to the code to allow this?

I think you're looking for the "solve length cyclic" method: https://github.com/ejmahler/SplineLibrary/blob/master/spline_library/utils/arclength.h#L78
The "solve length" and "solve length cyclic" methods do the same thing that partition does, but partition does several steps, and the solve length methods do a single step.
For both solve length and solve length cyclic,, you give it a starting point on the spline, and a desired arc length, and it'll return the T value that will give you the desired arc length.
float startingPoint = 0.25f;
float desiredArcLength = 20.0f;
float endingPoint = ArcLength::solveLength(mySpline, desiredArcLength);

// verify results
float actualArcLength = mySpline.arcLength(startingPoint, endingPoint);

float error = std::abs(actualArcLength - desiredArcLength) / desiredArcLength;
assert(error < 0.001f);

The difference is that "solveLength" has no awareness of looping splines, and so you can't give it out of range T values etc, while SolveLengthCyclic handles the looping spline's wrapping logic.

Another option is to change the alpha parameter to the LoopingCubicHermiteSpline constructor. Its default is 0. If you set it to another value like 0.5f, it will change the T value of each point so that points with a larger euclidean distance will also have a larger T distance. Any floating point number is valid for alpha but I recommend sticking between 0 and 1, and I recommend starting with 0.5
alpha = 0.5 is also potentially nice for robotics, because it prevents some problems that alpha=0 has, such as those weird loops: https://i.imgur.com/DaCm3eW.png You probably don't want your robot following that loop!
alpha isn't useful if you need the T values of the spline to be specific values, but if you're talking about arc length parameterization, there's a chance you don't care about the T values, so it's worth looking into :) Thanks for using SplineLibrary


Wrong IP-Address printed in ModbusTCP:Creating after a rescan

Investigate this.
Previously connected to <IP_ADDRESS>, then disconnects, then finds <IP_ADDRESS>, then print ModbusTCP:Creating with: ('<IP_ADDRESS>', 1502..) then actually connects to <IP_ADDRESS>
srcful-gw  | DEBUG:server.wifi.wifi:device ip address <IP_ADDRESS>
srcful-gw  | INFO:server.web.handler.get.network:Scanning subnet <IP_ADDRESS>/24 for modbus devices on ports [1502] with timeout 0.01.
srcful-gw  | INFO:server.inverters.ModbusTCP:Creating with: ('<IP_ADDRESS>', 1502, 'SOLAREDGE', 1)
srcful-gw  | INFO:server.tasks.openInverterPerpetualTask:Found inverter at <IP_ADDRESS>, retry in 5 seconds...
srcful-gw  | INFO:server.bootstrap:Removing inverter from bootstrap: ('TCP', '<IP_ADDRESS>', 1502, 'SOLAREDGE', 1) not yet supported
srcful-gw  | INFO:server.bootstrap:Reading bootstrap file: /data/srcful/bootstrap.txt
srcful-gw  | INFO:server.inverters.ModbusTCP:Creating with: ('<IP_ADDRESS>', 1502, 'SOLAREDGE', 1)
srcful-gw  | INFO:server.bootstrap:Writing (w) inverter to bootstrap file: ('TCP', '<IP_ADDRESS>', 1502, 'SOLAREDGE', 1)

There is a fair chance that the inverter is also created in the process of the boostrap file thing (i.e just for the file handling stuff)
ie this line in the log
srcful-gw  | INFO:server.inverters.ModbusTCP:Creating with: ('<IP_ADDRESS>', 1502, 'SOLAREDGE', 1)
is from reading the boostrap file and creating all existing tasks - so an inverter is created with the old ip as that is what was in the file before,.
This does not mean that there is any connection to the inverter nor any tasks added to the queue.
I.e I think there is no issue here @davmoz


Autocomplete replacement ranges are incorrect?

As a helpful tester pointed out on my project...
https://github.com/Ryex/ic10emu/issues/3
Autocomplete replacements seems to incorrect, the last character entered before the replacement was accepted gets placed in front.
Project is live at https://ryex.github.io/ic10emu/ so you can try to replicate the issue yourself. I have the LSP messages logged in the console so I can see that the message is well formed as screenshot in the linked issue

@Ryex hey! Seems your server is providing wrong edit ranges. You could use insertText instead of textEdit so the ace client will take prefix replace calculations or provide correct insert/replace ranges. Right now prefixes are not considered.

For example: I reproduced same your issue and in that case range.end.column should be +1.

This is how ace client handles those ranges

Interesting. Neovim handles these edit ranges just fine so I assumed that wasn't the issue.
but editing the lsp to use a length of 1 for the edit range does indeed seem to fix the problem.

And testing with Neovim shows that it still works there.
Considering I'm already maintaining a branch of the lsp to compile it to Wasm I suppose this isn't all that bad an outcome.


KC-298: Add DescribeQuorum API

Add the DescribeQuorum API as stated in KIP-595.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

LGTM.


[PROPOSAL] Remove cypress test

What are you proposing?

In a few sentences, describe the feature and its core capabilities.

https://github.com/opensearch-project/dashboards-search-relevance/pull/30 introduces the cypress test on this repo. The best procedure for opensearch-project is to run the integration test from the ft repo, which we have already done https://github.com/opensearch-project/dashboards-search-relevance/pull/143. We should think about gracefully removing the cypress dependence from this repo. The advantage is that it reduces reliance, makes the project more concise, and reduces potential security vulnerabilities.

Changes are merged and backported. Resolve issue.


Grammar compilation has combinatorial performance for ranges and optionals

This is due to the naively aggressive inlining policy of the grammar compiler.
For example, the following grammar takes a long time to compile:
start: a? b? c? d? e? f? g? h? i? j? k? l?

a: "A"
b: "B"
c: "C"
d: "D"
e: "E"
f: "F"
g: "G"
h: "H"
i: "I"
j: "J"
k: "K"
l: "L"

Similar issue with exists with ranges, such as (a~1..10)~1..10
Obviously, they can also interact, for example (a? b? c? d?)~1..100
The solution is a smarter policy, which can extract such expressions into separate rules, when the combinatorical effect passes a certain threshold.
See also: Issue #175

Looks like this issue is fixed!

I fixed this for repeats and ranged repeats, not sure if we ever did something for optionals.

Well, it's possible to make Lark freeze for a few seconds with this:
from lark import Lark

g = """
start: a? b? c? d? e? f? g? h? i? j? k? l?
    | "a" a? b? c? d? e? f? g? h? i? j? k? l?
    | "b" a? b? c? d? e? f? g? h? i? j? k? l?
    | "c" a? b? c? d? e? f? g? h? i? j? k? l?
    | "d" a? b? c? d? e? f? g? h? i? j? k? l?
    | "e" a? b? c? d? e? f? g? h? i? j? k? l?
    | "f" a? b? c? d? e? f? g? h? i? j? k? l?
    | "g" a? b? c? d? e? f? g? h? i? j? k? l?
    | "h" a? b? c? d? e? f? g? h? i? j? k? l?
    | "i" a? b? c? d? e? f? g? h? i? j? k? l?
    | "j" a? b? c? d? e? f? g? h? i? j? k? l?
    | "k" a? b? c? d? e? f? g? h? i? j? k? l?

a: "A"
b: "B"
c: "C"
d: "D"
e: "E"
f: "F"
g: "G"
h: "H"
i: "I"
j: "J"
k: "K"
l: "L"
"""

print("start")
Lark(g, parser="lalr")
print("end")

But it's definitely not so dramatic as the title suggests.
I think maybe the best solution is to just warn when there are too many optionals (or fail when strict), and instruct users to split it into smaller rules.

P.S. when using a-z  (uncommenting s+) Lark dies, probably from a recursion error.


Support for YT 10.42.xx

http://www.apkmirror.com/apk/google-inc/youtube/youtube-10-42-52-nodpi-android-6-0-android-apk-download/

Don't have any testing device capable of running this.
We'll have to wait for lollipop release. Hope it will be available today.

@esgie
https://www.apkmirror.com/apk/google-inc/youtube/youtube-10-43-58-android-4-0-3-5-1-android-apk-download/

Some code has changed (in the first class, especially - but it still has the triggering code!), although hacks are still working :)
New version with support for 10.43 is up.
Added also theoretical support for yt 10.42 which has been released for marshmallow only. It won't be much use because no xposed for marshmallow atm, but it's there...

@esgie Ok, thanks! I'll close this now


Expose System and DB references as collections

[x] This contribution adheres to CONTRIBUTING.md.
[ ] New tests have been created for any new features or regression tests for bugfixes.
[x] tox successfully runs, including unit tests and style checks (see CONTRIBUTING.md).

Coverage decreased (-0.1%) to 65.317% when pulling c9e81369ae4af80aead62fc7e22573f394286232 on epage:collection into 07b74fb26f3a82a9f0fa68b1272f86174c42b9fb on ni:master.

Coverage decreased (-0.1%) to 65.317% when pulling c9e81369ae4af80aead62fc7e22573f394286232 on epage:collection into 07b74fb26f3a82a9f0fa68b1272f86174c42b9fb on ni:master.

Coverage decreased (-0.1%) to 65.317% when pulling c9e81369ae4af80aead62fc7e22573f394286232 on epage:collection into 07b74fb26f3a82a9f0fa68b1272f86174c42b9fb on ni:master.

Coverage decreased (-0.1%) to 65.317% when pulling a2a8becf70107028e282bf3daadf8141ecdd64b7 on epage:collection into 07b74fb26f3a82a9f0fa68b1272f86174c42b9fb on ni:master.


Check power symbol conventions

compare with kicad standard library default power symbols

copy the arrow from standard library

3cee2b2ce5d5743744f71345572cbad7625dd732


add redis implementation, add support for multiple cache providers

Description

Add Redis as cache provider and refactor the module so that multiple providers are possible.
Motivation and Context

Redis is nice to have out of the box. Also with the following changes, adding a new cache provider is trivial.
Screenshots (if appropriate)
Upgrade notes (if appropriate)

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.

I hereby agree to the terms of the Knot.x Contributor License Agreement.

I would suggest implement unit test for CacheAction with mock Cache implementation.
also two seperate tests for InMemoryCache and RedisCache.
Please update also a documentation

This PR is untouched since november. Is it still valid?


SweetAltert - Add "custom positioned dialog" & custom font/ font size

Hello!
First of all, thank you for the nice work with this add-on.
There are two features I would love to see in the future, unfortunately my Java knowledge is very limited so I need someone to do this for me :)

Would it be possible to extend the functionality with "custom positioned dialogues"?
Add a simple way to change the font and the font size for the shown messages.

Best regards

Hi McGeifer!
Thank you and I'm glad you enjoy working with the library!
I pushed a change to add support for SweetAlert's position property and a few more properties for timeouts, etc. You actually don't need to write any JS if you are adding support for properties that are part of the SweetAlert configuration. You can how the change looks in the Modal Window Options VI that was added or look at the other existing Options VIs.
Configuring styles takes a couple more steps you can see how the MySweetAlertStyles.gcomp is used to create a style theme for a dialog. The pattern shows how to create a reusable Library Component for the style and gives you the ability to fully configure any of the CSS properties for different parts of a dialog. The example does specifically show how to customize the font.

One more thing! To avoid fracturing the conversation too much I went ahead and posted the example to the NI forums: https://forums.ni.com/t5/Example-Programs/SweetAlert-Highly-configurable-popups-for-WebVIs-in-LabVIEW-NXG/ta-p/4011222
If it's not too much trouble we can continue the conversation there. I'll go ahead and close out this issue.


Setting a unique index

The floor documentation says : To create a unique index is just set a unique attribute.
The index, moreover, can be named by using its name attribute. To set an index to be unique, use the unique attribute.
@Entity(tableName: 'person', indices: [Index(value: ['custom_name'])])
class Person {
  @primaryKey
  final int id;

  @ColumnInfo(name: 'custom_name', nullable: false)
  final String name;

  Person(this.id, this.name);
}

I cannot figure out how it's syntax work. I need an output table like this:
CREATE TABLE contacts(
    id INTEGER PRIMARY KEY,
    first_name TEXT,
    last_name TEXT,
    email TEXT NOT NULL UNIQUE
);

There is an annotation, but no luck to make it work.
  @UniqueKey()
  final String email;

Any help will be appreciated.

I could make it works as follows syntax
@Entity(
  tableName: 'my_table',
  indices: [
    Index(value: ['email'], unique: true)
  ],
)

However I still want to know if would be possible to  specify a custom column to set a conflict strategy in dao:  @Insert(onConflict: OnConflictStrategy.replace) I guess this will result in replacing the entity on any conflict right?

The unique index works only in the last level entity.
When I set a unique index in a BaseEntity and I create another Entity that extends it (inheriting) the build runner will not create the unique indexes if I set the index on BaseEntity. The extends  of Entities only can inherit their primary keys, but not their unique indexes.
If my base entity has a unique index I have set it in all all the children's classes instead of creating it on the BaseEntity. That's correct?

I see the ConflictAlgorithm is executed by sqflite which is an abstraction os floor. As it isn't covered by this library I am closing this issue.
Here are the explanation by sqflite
The options of ConflictAlgorithm are:
rollback => When a constraint violation occurs, an immediate ROLLBACK occurs, thus ending the current transaction, and the command aborts with a return code of SQLITE_CONSTRAINT. If no transaction is active (other than the implied transaction that is created on every command) then this algorithm works the same as ABORT.
abort => When a constraint violation occurs,no ROLLBACK is executed so changes from prior commands within the same transaction are preserved. This is the default behavior.
fail => When a constraint violation occurs, the command aborts with a return code SQLITE_CONSTRAINT. But any changes to the database that the command made prior to encountering the constraint violation are preserved and are not backed out.
ignore => When a constraint violation occurs, the one row that contains the constraint violation is not inserted or changed. But the command continues executing normally. Other rows before and after the row that contained the constraint violation continue to be inserted or updated normally. No error is returned.
replace => When a UNIQUE constraint violation occurs, the pre-existing rows that are causing the constraint violation are removed prior to inserting or updating the current row. Thus the insert or update always occurs. The command continues executing normally. No error is returned. If a NOT NULL constraint violation occurs, the NULL value is replaced by the default value for that column. If the column has no default value, then the ABORT algorithm is used. If a CHECK constraint violation occurs then the IGNORE algorithm is used. When this conflict resolution strategy deletes rows in order to satisfy a constraint, it does not invoke delete triggers on those rows. This behavior might change in a future release.


Trying to Connect GKE to Arc, but fails with error

This is autogenerated. Please review and update as needed.
Describe the bug
Command Name
az connectedk8s connect
Errors:
No module named 'azure.core.rest'
Traceback (most recent call last):
python3.9/dist-packages/knack/cli.py, ln 233, in invoke
    cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 558, in execute
    self.commands_loader.load_arguments(command)
azure/cli/core/__init__.py, ln 480, in load_arguments
    self.command_table[command].load_arguments()  # this loads the arguments via reflection
cli/core/commands/__init__.py, ln 315, in load_arguments
    super(AzCliCommand, self).load_arguments()
...
azext_connectedk8s/vendored_sdks/preview_2022_05_01/__init__.py, ln 9, in <module>
    from ._connected_kubernetes_client import ConnectedKubernetesClient
azext_connectedk8s/vendored_sdks/preview_2022_05_01/_connected_kubernetes_client.py, ln 14, in <module>
    from azure.core.rest import HttpRequest, HttpResponse
ModuleNotFoundError: No module named 'azure.core.rest'

To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

Put any pre-requisite steps here...
az connectedk8s connect --name {} --resource-group {}

Expected Behavior
Environment Summary
Linux-5.10.0-21-cloud-amd64-x86_64-with-glibc2.31
Python 3.9.2
Installer: DEB

azure-cli 2.18.0 *

Extensions:
connectedk8s 1.3.0

Additional Context

Thank you for opening this issue, we will look into it.


 But i dont know how to help me.
I just don't get it why the following doesn't work. I have a simple custom action where I want to check slots if they are not Null!
slot1=tracker.get_slot('slot1')
slot2_info=tracker.get_slot('slot2')

if slot1 is not None:
     dispatcher.utter_template("info")
     return []
elif slot2 is not None:
     dispatcher.utter_message("Infos")
     return []
else:
    dispatcher.utter_message("help me")

Everything before the if-statement works fine and the statement is skipped without doing anything...

Have you managed to solve this yet?

yes!


Remove insiders re-enroll prompt

For #8775

[x] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
[x] Title summarizes what is changing
[x] Has a news entry file (remember to thank yourself!)
[ ] Appropriate comments and documentation strings in the code
[ ] Has sufficient logging.
[ ] Has telemetry for enhancements.
[x] Unit tests & system/integration tests are added/updated
[ ] Test plan is updated as appropriate
[ ] package-lock.json has been regenerated by running npm install (if dependencies have changed)
[ ] The wiki is updated with any design decisions/details.

Codecov Report

Merging #9453 into master will decrease coverage by 0.02%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #9453      +/-   ##
==========================================
- Coverage   60.94%   60.92%   -0.03%
==========================================
  Files         530      530
  Lines       28628    28611      -17
  Branches     4338     4334       -4
==========================================
- Hits        17448    17431      -17
  Misses      10229    10229
  Partials      951      951

Impacted Files
Coverage Δ

src/client/telemetry/index.ts
86.48% <ø> (ø)
:arrow_up:

src/client/telemetry/constants.ts
100% <ø> (ø)
:arrow_up:

src/client/common/insidersBuild/types.ts
100% <ø> (ø)
:arrow_up:

src/client/common/utils/localize.ts
94.94% <ø> (-0.02%)
:arrow_down:

...t/common/insidersBuild/insidersExtensionService.ts
96.92% <100%> (-0.45%)
:arrow_down:

...nt/common/insidersBuild/insidersExtensionPrompt.ts
100% <100%> (ø)
: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 aec72d4...01e3fc7. Read the comment docs.


refactor: Updates for collections API

Transform read cursor to native Node.js readable streams
Rename insert to insertOne, to have consistent apis:

insertOne, insertMany, findOne, findMany

Allow collation option for update and delete queries.
Code documentation on collection APIs

What are the thoughts on insertOrReplace & insertOrReplaceMany?

Very Cool!


Node ssh subcommand

This PR adds helper command for accessing host nodes through ssh.
$ kontena node ssh -h
Usage:
    kontena node ssh [OPTIONS] NODE_ID

Parameters:
    NODE_ID                       Node id

Options:
    -i, --identity-file IDENTITY_FILE Ssh private key to use
    -u, --user USER               Login as a user (default: "core")
    --private-ip                  Connect to node using private ip
    --internal-ip                 Connect to node through VPN
    -h, --help                    print help

Looking good!


Feature/psp22 burnable mintable

rebased to main, added results to the extensions and examples, checking results in tests


Kopimed-coffeescript-medium 01

Pull Request Type
What kind of change does this PR introduce?
[ ] Solved an issue/task
added calculator.coffee

Merged

This is an automated message from Fork, Commit, Merge [BOT].

Thank you for your contribution! Your pull request has been merged. The files have been reset for the next contributor.
What's next?
If you're looking for more ways to contribute, I invite you to check out our forkcommitmerge.io website repository. The repository contain real issues that you can help to resolve or create some of your own if you see any bugs or want to add new features to the site, etc. You can also check out the Influences section in the README to find more projects similar to this one.
Also please leave a star to this project if you feel it helped you, i would really appreciate it.
I look forward to seeing your contributions!


Unhandled Exception - 'Access to the path 'DLSSUpdater.exe' is denied.'

Encountered an unhandled exception:
  at System.IO.FileSystem.RemoveDirectoryRecursive(String fullPath, WIN32_FIND_DATA& findData, Boolean topLevel)
  at System.IO.FileSystem.RemoveDirectory(String fullPath, Boolean recursive)
  at DlssUpdater.Windows.Splashscreen.Splashscreen.OnContentRendered(EventArgs e)
  at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
  at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
  at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)```

Hey I fixed the issue by deleting the entire program  and then downloading it again and extracting it to the same directory.

I would not say that is a fix for the issue. An "auto-updater" which requires you to delete the application and manually update it is not an "auto-updater".
I have this same issue, and the workaround for the moment is, as you say, to delete everything and download the new version. I have tried to bisect which files need to be overwritten, to see if it could be done without deleting the database. But I think that needs to be deleted.

Yeah I used the wrong choice of words there. I definitely meant it's a
workaround though.  If I run into this issue again I'll try and just delete
the database file. Thanks for the info.
On Tue, Dec 17, 2024, 7:33 AM Fooughhy @.***> wrote:

I would not say that is a fix for the issue. An "auto-updater" which
requires you to delete the application and manually update it is not an
"auto-updater".
I have this same issue, and the workaround for the moment is, as you
say, to delete everything and download the new version. I have tried to
bisect which files need to be overwritten, to see if it could be done
without deleting the database. But I think that needs to be deleted.
—
Reply to this email directly, view it on GitHub
https://github.com/Drommedhar/DlssUpdater/issues/30#issuecomment-2548773165,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGKO4ITHOERD4AADOYMORZL2GA753AVCNFSM6AAAAABSO3PG5GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNBYG43TGMJWGU
.
You are receiving this because you commented.Message ID:
@.***>

DlssUpdater is now available through the Microsoft Store which now handles updates. This should resolve this issue.


getState() is cached no matter that store was changed

As the redux-axios-middleware is caching configuration per name of the client it's not possible different store to be passed for testing unless different client is created for each test which sounds overwhelming.
Here is a sample test that illustrates the problem:
import axios from 'axios';
import axiosMiddleware from '../src/middleware';

import { expect } from 'chai';
import configureMockStore from 'redux-mock-store';
import MockAdapter from 'axios-mock-adapter';

const options = {
  returnRejectedPromiseOnError: true,

  interceptors: {
    request: [
      ({ getState, dispatch }, config) => {
        console.log('state in interceptor: ', getState());
        config.headers['Authorization'] = 'Bearer ' + getState().access_token;
        return config;
      }
    ],
    response: [
      {
        success: ({ dispatch }, response) => {
          return response;
        },
        error: ({ dispatch, getSourceAction }, error) => {
          return Promise.reject(error);
        }
      }
    ]
  }
};

const middleware = axiosMiddleware(axios, options);

describe('axiosMiddleware', () => {
  const mockAxiosClient = new MockAdapter(axios);
  const mockStore = configureMockStore([middleware]);
  const mockAdapter = mockAxiosClient.adapter();

  afterEach(() => {
    mockAxiosClient.reset();
  });

  after(() => {
    mockAxiosClient.restore();
  });

  it('attaches authorization header on each request', () => {
    let got;

    mockAxiosClient.onGet('/test').reply(config => {
      got = config.headers['Authorization'];
      return [200];
    });

    const action = () => {
      return {
        type: 'LOAD',
        payload: {
          request: {
            url: '/test'
          }
        }
      };
    };

    const store = mockStore({ access_token: '::access_token::' });

    return store.dispatch(action()).then(() => {
      expect(got).to.equal('Bearer ::access_token::');
    });
  });

  it('attaches another authorization header on each request', () => {
    let got;

    mockAxiosClient.onGet('/test2').reply(config => {
      got = config.headers['Authorization'];
      return [200];
    });

    const action = () => {
      return {
        type: 'ANOTHER_LOAD_ACTION',
        payload: {
          request: {
            url: '/test2'
          }
        }
      };
    };

    const store = mockStore({ access_token: '::another_access_token::' });

    return store.dispatch(action()).then(() => {
      expect(got).to.equal('Bearer ::another_access_token::');
    });
  });
});

The following test fails with:
  1) axiosMiddleware attaches another authorization header on each request:

      AssertionError: expected 'Bearer ::access_token::' to equal 'Bearer ::another_access_token::'
      + expected - actual

      -Bearer ::access_token::
      +Bearer ::another_access_token::

e.g the test of first test is used as it caches the store instance that was passed no matter that another store is created using mockStore.
As better feedback I've added few loggings in the interceptor too:
return ({ getState, dispatch }) => next => action => {
    if (!middlewareOptions.isAxiosRequest(action)) {
      return next(action);
    }
    console.log(`action: ${action.type}, store value: `, getState());

and this is the execution log:
  axiosMiddleware
action: LOAD, store value:  { access_token: '::access_token::' } -> this is in the middleware
state in interceptor:  { access_token: '::access_token::' } -> this is in the interceptor
    ✓ attaches authorization header on each request
action: ANOTHER_LOAD_ACTION, store value:  { access_token: '::another_access_token::' } -> this is in the middleware
state in interceptor:  { access_token: '::access_token::' } -> this is in the interceptor

As possible solution middleware may keep reference to interceptors and to re-attach them before each request but this will add additional overhead.
Any thoughts on this ?

I have the same issue

I've resolved it temporary in the project side by creating a new .spec.js file for each scenario but it's overwhelming if you have many scenarios.


Run integration tests under different DB name

So that it won't interfere with the local dev setup and e2e tests.
TECH: SQLALCHEMY_DATABASE_URI env variable is used to determine DB to which Inspire is connecting.  If before test it will be set to different db name: for example INVENIO_SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://inspirehep:inspirehep@localhost:5432/inspire_2 it will use it for the tests.
This variable can be set on executing test command:
INVENIO_SQLALCHEMY_DATABASE_URI=postgresql+psycopg2://inspirehep:inspirehep@localhost:5432/inspire_2 poetry run pytest/tests/integration

in https://github.com/inspirehep/inspirehep/blob/d524f1fe523b61da6d3e47ea678eccd56b91a5a4/backend/run-tests.sh#L10
Or it can be hard-coded in https://github.com/inspirehep/inspirehep/blob/d524f1fe523b61da6d3e47ea678eccd56b91a5a4/backend/tests/integration/conftest.py#L37
Please note that setting INVENIO_SQLALCHEMY_DATABASE_URI will still override value set in conftest.
BTW: Do we need this ? Looks like it's value is overwritten if we use INVENIO_SQLALCHEMY_DATABASE_URI
Don't forget to also change ES index prefix by setting SEARCH_INDEX_PREFIX env, otherwise running tests will delete ES indexes used by local env.
Same changes should work for integration-async

Some services (matcher, oai, migrator) have hardcoded index names in the config, so we have to find a proper method for updating them. One idea is to create a function which will update them based on the prefix, eg.

def get_prefixed_index(index_name, index_prefix=None):
    prefix = index_prefix or current_app.config.get("SEARCH_INDEX_PREFIX")
    if prefix not in index_name:
          return prefix + index_name
    return index_name

but when used directly in config it gives the  RuntimeError: Working outside of application context. error.

Some tests like this one remove aliases from the ES.
One solution might be to create the proper aliases pointing to the test indices.


[BEAM-6441] Add script to set the version of Beam

This is the script from #8223 but merging first so website precommit can succeed. There is a practice in the release guide of linking to the repo, and this is a new script.

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

[x] Choose reviewer(s) and mention them in a comment (R: @username).
[x] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[x] If this contribution is large, please file an Apache Individual Contributor License Agreement.

Noting that this doesn't touch anything that has tests, so CI results are not relevant.

retest this please

@apilloud WDYT? To test this, you can just run the script and not commit the results. Should be a pretty straightforward helper script. The whole point is just to isolate the knowledge of "where do we hardcode versions" into a single place that is reusable somewhat. Then I will revise the cut release branch script to use this, and have new ideas how to make it non-invasive.

LGTM


1.16.5

Is it possible to upgrade it to the new verison  ?

Hi,
because my app is dependent on MCProtocolLib, which doesn't support this version yet, I can't update it.
You can make issue there, and ask for the update.
I will update my app ASAP, when the new version of the library is released.

I have read your issue, and I realized that neither you nor I tested it.
So I did now. It just works:

To be sure, I added it to README. 1f940aea144e3d233adbb43f2f9c7edea8c2c468


Block level SLP auto-vectorization

The SLP approach seems to allow for more flexibility than the standard inner loop transform, and although it is relatively more complicated to implement, the infrastructure could be reused for loop vectorization with relatively little effort.
Aliasing seems to be a significant blocker to auto-vec. Because variables may refer to the same memory region at runtime, it's not trivial to determine whether the vectorized code is legal (e.g. in the presence of serial/dependent operations). A simple solution for this is to insert runtime aliasing guards, but that may only be reasonable for loops.
Additionally, it would be nice to have an intrinsic API like OptimizerHints.AsRestrict(T).
TODOs

SLP vectorizer:

[x] Initial implementation
[x] Recognize store seeds

Pointers only. In the future we may want to consider consider struct field accesses (esp. for equality methods)

[ ] Recognize reduction seeds (is this even worth outside loops?)
[x] Vector code generation
[x] Basic cost estimation
[ ] Legalization (mem aliasing)

Operations

[x] Pointer loads
[x] Basic binops (arithmetic and bitwise)

[ ] Handle implicit widening (e.g. conv.u16/store.u16 (binop x, y -> i32))

[x] Math.{Min, Max, Abs, Sqrt, Floor, Ceiling}

~Round, Fmadd~  (no xplat intrinsics for these)

[ ] Comparison and selects
[ ] Conversions

Handling widening/narrowing seems to be complicated

What else?

Extras:

[x] Basic if-conversion

[x] Code gen support for SelectInst
[ ] Handle non-diamond graphs through path duplication (for empty blocks only)

[x] Basic loop unrolling (single block only)

We probably want to tune it better around some caried dep heuristic.

[x] Consider introducing a GetElementPtr/LEA instruction, because recognizing indexing expressions is tricky. Having this could also help consolidation of load/store instructions for arrays and fields.

Consider first-class support for vector types in the IR. This may not be that valuable outside of bringing the ability to perform basic peepholes.

Research

Exploiting Superword Level Parallelism with Multimedia Instruction Sets
Loop-Aware SLP in GCC
LLVM's initial SLP implementation
https://llvm.org/devmtg/2015-04/slides/pslp_slides_EUROLLVM2015.pdf

Sample cases where it would ideally be applied
Typical SLP target:
//Ideally, these pointers would have concrete aggregate types such as Vector4 and Matrix4x4,
//but handling fields should be done separately from the initial implementation.
public static void SLP_MatrixTransform(float* pos, float* mat, int count) {
    //This could be made redundant by making SLP aware of the loop, so it could clone and guard the vectorized version
    pos = OptimizerHints.AsRestrict(pos);

    for (int i = 0; i < count; i++) {
        float x = pos[0], y = pos[1], z = pos[2], w = pos[3];

        pos[0] = x * mat[0] + y * mat[4] + z * mat[ 8] + w * mat[12];
        pos[1] = x * mat[1] + y * mat[5] + z * mat[ 9] + w * mat[13];
        pos[2] = x * mat[2] + y * mat[6] + z * mat[10] + w * mat[14];
        pos[3] = x * mat[3] + y * mat[7] + z * mat[11] + w * mat[15];

        pos += 4;
        mat += 16;
    }
}
//Ideal output
public static void SLP_MatrixTransform(float* pos, float* mat, int count) {
    for (int i = 0; i < count; i++) {
        float x = pos[0], y = pos[1], z = pos[2], w = pos[3];

        //It shouldn't really matter whether we use custom operators or static intrinsics (op_Addition vs Vector128.Add),
        //though the former would make decompiled code significantly easier to read.
        //Load()/LoadUnsafe() methods should also have no significant difference at the IL level,
        //but using the most common methods could help minimize generic instantiations in the final module.
        var res =
            Vector128.Create(x) * Vector128.Load(&mat[0]) +
            Vector128.Create(y) * Vector128.Load(&mat[4]) +
            Vector128.Create(z) * Vector128.Load(&mat[8]) +
            Vector128.Create(w) * Vector128.Load(&mat[12]);
        Vector128.Store(res, &pos[0]);

        pos += 4;
        mat += 16;
    }
}

A reasonable reduction loop:
//Original
int CountLetters(string text) {
    return text.Count(ch => ch is >= 'A' and <= 'Z');
}

//After LinqExpansion, DevirtLambdas, and Inlining
int CountLetters(string text) {
    char& start = text.GetPinnableReference();
    char& end = start + text.Length;
    int count = 0;

    for (; start < end; start++) {
        char ch = *start;
        if (ch >= 'A' && ch <= 'Z') {
            count++;
        }
    }
    return count;
}

//After SimplifyCFG* (If Conversion)
count += (ch >= 'A' & ch <= 'Z');

//After SimplifyInsts*
count += (uint)(ch - 'A') < 26;

//After LoopVectorization*
int CountLetters(string text) {
    char& start = text.GetPinnableReference();
    char& end = start + text.Length;
    int count = 0;

    //Ideally the condition would be `start <= (end - 16)`, but that's a GC hole for `length < 16`
    for (; end - start >= 16; start += 16) {
        //Problem: implicit binop widening
        //  conv.k (binop x, y)     safe to narrow binop if both x and y are of type k  (it may be possible to propagate this info upwards for some ops)
        //  ult(x - C1) < C2        safe to narrow if x >= 0 && C2 < RangeMax(x) - C1
        var t1 = Vector256.Subtract(Vector256.LoadUnsafe((ushort&)start), Vector256.Create((ushort)'A'));
        var t2 = Vector256.CompareLessThan(t1, Vector256.Create((ushort)26));
        //Problem: widening reductions
        //  v_count += t2       this could overflow, also incorrect for floats
        count += BitOperations.PopCount(t2.ExtractMostSignificantBits());
    }
    for (; start < end; start++) {
        count += (uint)(*start - 'A') < 26;
    }
    return count;
}

Closing this for now as I have no more interest nor energy to work on it.


[fmt] Export all symbols

I have fmt:x64-windows installed, but the most basic use of fmt::format fails to link. Searching the issue tracker, it seems to be the same issue as #331. The same fix (#333) worked.

Thanks for the PR, looks great!


python312Packages.jsonargparse: 4.33.2 -> 4.34.0

Diff: https://github.com/omni-us/jsonargparse/compare/refs/tags/v4.33.2...v4.34.0
Changelog: https://github.com/omni-us/jsonargparse/blob/4.34.0/CHANGELOG.rst

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 355524

x86_64-linux

:white_check_mark: 4 packages built:

python311Packages.jsonargparse
python311Packages.jsonargparse.dist
python312Packages.jsonargparse
python312Packages.jsonargparse.dist


Cannot find module 'estraverse-fb' running gulp  after module initialization.

Generate a project running generator-node from yeoman inside a directory with name node-gen.
$ cd node-gen
$ gulp

Gives me  Error: Cannot find module 'estraverse-fb'
Options:

Error:

Can you try running again npm install?

@SBoudrias hi, thanks for your answer , i was trying with that, but not works, i managed it to work  with
$ npm install estraverse-fb

But that shouldn't be necessary, i think, since all the other packages and dependencies are intalled automatically.
Looks like a missing dependency in some package.json file.

Bug with ESLint v2.3.0
Issue https://github.com/eslint/eslint/issues/5476

I fix it with npm install estraverse-fb --save-dev

Are we still facing this?

Eslint marked it as fixed. So I'll close here.

working, just fine, recently tested, thanks.

Still getting this problem when running 'npm test'. Latest version of generator-node which from package.json I can see it's using eslint 2.1.0.
I'm using node v4.2.1 and npm v3.5.2


Lockable and two factor authentication co-operation

Hi,
In our project we use lockable and devise-two-factor gem. Lockable seems to increase the failed_attempts counter by one before each authentication and then rely on the successful login to reset the counter later in the SessionController#create call. This is somewhat counter intuitive already by it self.
When two factor authentication is used this comes more troublesome because the failed_attempts is increased even before the user has really tried to sign in. If the user has some trouble with receiving the two factor authentication token and he initiates the login process several times the account may get locked even before the user has finished a single login process.
Shouldn't the lockable increase the failed_attempts counter only after the login really fails?

Further investigation showed that it was a call to user_signed_in? that caused the failed_attempts counter to increase. Also calling current_user does the same. We have before filters using both of those.
Is there a way to find out if a user has been signed in without the devise trying to look for signed in user from the request?

Well, Devise does not provide two factor authentication, so you should really discuss it with the gem you are using to provide it or provide the appropriate code samples if it is hand-rolled. user_signed_in? will always try to sign the user in, you can look into warden for mechanisms to check if the user is signed in without executing any of the callbacks.


Error resultset

I'm using VerdictDB in Java, according to your tutorial. I saw in the paper that they used, for example, the query #tq-12 of TPC-H. If I use it in Java, I have this error:
Exception in thread "main" java.lang.NullPointerException 	at org.verdictdb.commons.AttributeValueRetrievalHelper.getDouble(AttributeValueRetrievalHelper.java:172) 	at org.verdictdb.jdbc41.VerdictResultSet.getDouble(VerdictResultSet.java:332) 	at Main.runQuery(Main.java:110) 	at Main.main(Main.java:61)
My code to run the query is:
 private static void runQuery(Connection verdictConn, Connection mysqlConn, String database)
            throws SQLException {
        Stopwatch watch = new Stopwatch();
        watch.start();
        ResultSet rs2 =
                verdictConn.createStatement()
          .executeQuery(String.format(" SELECT\n" +
                  "    l_shipmode,\n" +
                  "    sum(case\n" +
                  "        when o_orderpriority = '1-URGENT'\n" +
                  "            OR o_orderpriority = '2-HIGH'\n" +
                  "            then 1\n" +
                  "        else 0\n" +
                  "    end) as high_line_count,\n" +
                  "    sum(case\n" +
                  "        when o_orderpriority <> '1-URGENT'\n" +
                  "            AND o_orderpriority <> '2-HIGH'\n" +
                  "            then 1\n" +
                  "        else 0\n" +
                  "    end) AS low_line_count\n" +
                  "FROM\n" +
                  "    tpch.orders,\n" +
                  "    tpch.lineitem\n" +
                  "WHERE\n" +
                  "    o_orderkey = l_orderkey\n" +
                  "    AND l_shipmode in ('MAIL', 'SHIP')\n" +
                  "    AND l_commitdate < l_receiptdate\n" +
                  "    AND l_shipdate < l_commitdate\n" +
                  "    AND l_receiptdate >= date '1994-01-01'\n" +
                  "    AND l_receiptdate < date '1994-01-01' + interval '1' year\n" +
                  "GROUP BY\n" +
                  "    l_shipmode\n" +
                  "ORDER BY\n" +
                  "    l_shipmode;", database));

        watch.stop();
        if (rs2.next()) {
            System.out.println("  " + rs2.getDouble(1));
        }
        Long time = watch.elapsedTime(TimeUnit.SECONDS);
        System.out.println("Time Taken = " + time + " s");
        rs2.close();
    }

I suspect this happened due to "database NULL" -> double conversion, but who knows...
What was the scale of your data (say, 1 GB)?

Yes, I used 1GB of data.

Can you tell me which version of VerdictDB you used?
I just ran the same query for TPCH 1GB, and it ran fine.  FYI, I used pyverdict, which I installed by "pip install pyverdict --upgrade".

I'm using version 0.5.8 in Java. I did not want to do the queries in python.
Now I got the result of the query, the error was when I was trying to print the resultset values (it returned string and I was trying to print double). Thanks


Fix insert false positives in SkipsModelValidations

Adding insert to the forbidden methods list for SkipsModelValidations in https://github.com/rubocop-hq/rubocop-rails/pull/289 introduced false positives, particularly since String#insert and Array#insert are commonly used.
We can reduce the impact by matching on the arguments: Active Record's insert method takes one positional argument and two optional keyword arguments (:returning and :unique_by). Anything else can be ignored.

Before submitting the PR make sure the following are checked:

[x] Wrote good commit messages.
[x] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
[x] If this is a new cop, consider making a corresponding update to the Rails Style Guide.
[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

Thanks!


Unable to remove environment

FE api req timeout: 1min

Can you provide more info:

Version of Flagsmith
Steps to reproduce
curl command that produces error
logging from API

Version of Flagsmith: latest
Steps to reproduce:

click the red icon
curl command that produces error: delete env method
logging from API:

Can you paste the entire curl command including the response? Thanks

@gagantrivedi are you able to take a look?

I am a little confused here.  @RadovanPelka  First, you are running this locally, right? Secondly, the traceback that you have posted is for identities endpoint and not for environment delete. Can you post the logs of environment delete as well?

Please reopen if this is still an issue


Add xm_create_context_safe(), avoid buffer overruns

A safer xm_create_context_safe() function was added for creating the XM context; the now-deprecated xm_create_context() remains for backwards compatibility.
 :)
So I did what @Artefact2 suggested and padded out-of-bounds reads with 0.
All of the READ_x macros will now return 0 if the provided offset exceeds the bounds of moddata.
All occurrences of memcpy were also replaced with a new READ_MEMCPY macro that pads with zeros.
Fixes #6

Looking good. Don't forget to add your name/email before the license header where you made non-trivial changes, like this.

GNU's rules are confusing. So, the version's supposed to be bumped to 1.0.0 because "an interface was added"? :confused:
I typically follow the SemVer rules as used in node.js (major.minor.patch), so it would become 0.1.0. Intuitively, it's probably the same rules as GNU's, though.

Should be 1:0:1. Old programs will work with the new library (no relinking needed) but new programs might not work with the old library.

Done.

Thanks!


Add ngx-electronify builder

@santoshyadavdev could you please review this one? Thanks 🙏

@santoshyadavdev could you please review this one? Thanks 🙏

Thank you @santoshyadavdev 😃

Thank you @santoshyadavdev 😃

Thanks @bampakoa for creating this builder.

Thanks @bampakoa for creating this builder.


[Bug]: Project Name can't have space

Which Framework?
React, Hardhat
What happened?
If your project name has a space then we get the following error.

Steps to reproduce
When executing the create command give a space to the project name.
Anything else?
No response

@viral-sangani any updates on this?

@therealharpaljadeja is it still an issue? i can try work on this

getting some warnings when installing ..


Initial commit of jupyter config as nix options.

Closing this as it might not be the best approach to providing a configuration API to the end user.


[FLINK-5949] [yarn] Don't check Kerberos credentials for non-Kerberos authentication methods

Additionally uses the UserGroupInformation#getAuthenticationMethod() to determine whether KERBEROS is used for authentication.
This fixes issues MapR users have been bumping into, where only MapR's custom SSL security was enabled (no Kerberos), but the Kerberos credentials were still checked for. For MapR's SSL security, the getAuthenticationMethod() returns CUSTOM (see http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Flink-Yarn-and-MapR-Kerberos-issue-td11996.html).
Also tested and confirmed that the change doesn't break previous Kerberos with YARN behaviours for other vendors, e.g. CDH.
This change should also be backported for {{release-1.2}}.

+1 to merge

Thanks for the review :-)
Failing tests seem to be something instable with Maven.
Merging this to master and release-1.2 ..


How about the performance without pretrained weight?

How about the performance without the pretrained weight (that is, training from scratch)?

@twmht 你好，你把模型转成pytorch后最终MAE能达到什么程度？


Bailador::Feature::HttpPreflight for CORS

Create a Feature that will generate OPTION routes that are required for CORS
https://en.wikipedia.org/wiki/Cross-origin_resource_sharing

because in #216 removes the only B::F::* so i want someting else to be tested that does use-feature()


Update pygments

Having updated pygments version in CI allows for more syntax coloration for Ada code

It passed but doesnt change a thing to the syntax coloring...


Make history views accept GET requests

The history views are safe(they do not have server-side side-effects).
Therefore, these should be GET requests. This removes the need for the
csrf_exempt decorator.
The new JavaScript function ajaxForm() is a helper that uses an HTML
form element to collect data to make a fetch() call.

Thanks!


Remove dummy value locals for function ptr calls

This makes the generated code cleaner so it's easier to debug.

Nice improvement!

I believe I had a good reason to do this.
You can see where I did this here.
I'm not sure I remember correctly, but this was certainly for debugging reasons, possibly to clearly indicate that this value is never used because I might have thought otherwise at the time.
This is possibly not needed anymore, though.

Thanks for your contribution!


Issue 117 - No value in nested struct causes arrayIndexOutOfBounds

https://github.com/databricks/spark-xml/issues/117
Added a check into convertRow function to return null instead
of empty Row object.
This will ensure that Spark doesn't throw ArrayIndexOutOfBounds
when there's no value in a nested struct.
Change-Id: Id796de2b861868543b7fc6e95a6cd56567be5d47
Signed-off-by: Jan Scherbaum<EMAIL_ADDRESS>

@lokm01 Thanks for this PR and simplified examples in the issues. Let me try to reproduce the issue first. Meanwhile, it would be great if we have a test in XmlSuite for this.

@HyukjinKwon No problem, added the test.

@lokm01 I could reproduce and test. So, I looked though Spark internal JSON and external Avro data source to check how they deal with. Generally, LGTM except for few comments. Let me double-check.

@HyukjinKwon Done, thanks for feedback

Thanks. This one is merged to master, https://github.com/databricks/spark-xml/commit/19eb2779cf232dc0239e54bf353fa609c8b05231.


Update CI actions/setup-python version

Summary
Update action to remove CI deprecate messages
Details and comments

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
3 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.09%) to 87.629%

Files with Coverage Reduction
New Missed Lines
%

qiskit_machine_learning/datasets/gaussian.py
3
37.11%

Totals

Change from base Build<PHONE_NUMBER>:
-0.09%

Covered Lines:
3053

Relevant Lines:
3484

💛  - Coveralls


Test get_options for nominal behavior

The commits in this PR begin the process of creating a unit test for the test driver. Following the milestone 6 goals, this PR tests only the function get_options and only tests for nominal behavior.
The following changes have been made:

Add driver-test.cpp to solution.

Create function driver_test that will call all of the modularized test functions.
Create function test_get_options which will be called by driver_test, and other necessary functions to test get_options.

Add the test suite driver_test to the suites collection in suites.cpp

This PR also addresses issue #25 and creates a driver-test subfolder that driver-test-specfic files will be in, as well as creates a filter for these files in VS2019.

Thanks for the PR @Ndemco. I will look over as much as I can before this afternoon's call.

Good start @Ndemco.
I have placed a few comments in situ, and have the following overall observation: The current setup is a bit complicated. I see test_get_options as containing the following conceptual steps for each test case:

Set cmd-line string
Set up expected options: copy a reference options struct that is already inited with the most common values and change the members appropriately in the copy. No need for function reset_options
Get a vector of strings after splitting the command line: simply call split
Copy data from every string in the vector to args array
Call get_options
Compare received and expected options

Steps 1 and 2 can be done in test_get_options; the other steps can be done in a function. So, test_get_options will essentially have just 3 steps for each test case. Depending on the number of lines to set up the expected options (at least 2 lines, may be 3-5, average 3.5 lines), each test case should take about 5.5 lines. 30 test cases should have ~165 lines. As comparison, generate_cmdline_option_pairs has ~210 lines, and may be get_options will get that long, but it will be significantly simpler.
This is my imagination. It is possible I have overlooked something, but I feel my approach is worth a try.

@smurthys I've created a function that does steps 3 through 6 in your suggestion:
void parse_cmd_line_and_compare(char* args[], const std::string& cmd_line,
const Options& expected, const std::string& test_case)
{
	std::vector<std::string> v = split(cmd_line, ' ');
	std::size_t size = v.size();
	for (std::size_t i = 0; i < size; ++i)
		args[i] = v[i].data();

	Options received = get_options(args, size);
	compare(received, expected, test_case);
}

Following steps 1 through 6 of your suggestion, I wrote this code into test_get_options and it seems to work as intended:
void test_get_options()
{
    char* args[100];

    Options o;
    o.command_name = "array_test";

    const std::string cmd_line_0("C:/Libraries/stl-lite/array_test.exe");
    Options expected = o;
    parse_cmd_line_and_compare(args, cmd_line_0, expected, "cmd_line_0");
}

The function is doing a lot of different things which makes it hard to give it an appropriate name, which then makes it hard to know exactly what the function is doing without looking at the code, but I do agree this is probably a better way to go about it. test_get_options is just one part of the driver_test, it does not make sense and is distracting to have a 200+ line function in driver.cpp just to be called in test_get_options.

@Ndemco I will comment as best as I understand from the short description, but I need to see things in context which is possible if you push the changes. At a high level, I don't think the proposed function parse_cmd_line_and_compare needs the args parameter. That is an unnecessary dependency.

but I do agree this is probably a better way to go about it
I see you are still not fully convinced that this approach is simpler and better than using a map or a large vector of pairs. 😄

test_get_options is just one part of the driver_test, it does not make sense and is distracting to have a 200+ line function in driver.cpp just to be called in test_get_options.

I'm afraid I don't follow. You do have the choice to rename functions and the choice to partition a function into other functions. There is also the option of spreading code across files. Indeed, creating and naming naming abstractions is key part of software design. Plus, none of this code will be in driver.cpp, and testing get_options for nominal behavior is just one scenario. There are so many other scenarios that need testing.

OK. I have just pushed the changes.

I'm afraid I don't follow.

Sorry, I don't think last part of my comment was very clear. What I meant was, driver-test.cpp (I mistakenly said driver.cpp) is going to have a lot more to it by the time driver_test is complete and it does not make sense to have a 200+ line function (generate_cmd_line_option_pairs) simply to be called in test_get_options. I agree with your suggestion that moving the generating of cmd_line strings to test_get_options and simplifying the behavior is easier to understand and more readable.

Thanks for the clarification @Ndemco and for the changes.

it does not make sense to have a 200+ line function (generate_cmd_line_option_pairs) simply to be called in test_get_options

Wasn't there a 200+ line function before this refactoring as well, and get_tesp_options was even then just calling a 200+ line function. We may still have a 200+ line function but the function interface as well as the entire structure is significantly simpler. If the concern is that a single function has 200 lines, and that is a valid concern, nothing prevents us from splitting the function at logical boundaries. In fact, we just went through that process in PR #23.

@Ndemco You probably have noticed that I have left some comments in situ. Overall, I think the revisions make the unit tests pretty straightforward. I suggest reviewing my comments and replying or changing and push the changes. Also, at that time, please say what else needs to be done: It seems like more command lines need to be added to test_get_options, but I could be wrong about that.

@smurthys

It seems like more command lines need to be added to test_get_options, but I could be wrong about that.

You are correct, there is a long comment at the bottom of driver-test.cpp that describes all the test cases that still need to be added to test_get_options (these are the command lines that were in the now removed generate_cmd_line_and_options_pair function). I wanted to make sure we agreed on the behavior and format of test_get_options before implementing it to every test case.
After implementing every test case described in the comment, I will take a deeper dive into all the command lines we have and see if there are more that need to be added.

I'm wondering if test_get_options and all functions specific to test_get_options should be in their own file to reduce clutter in driver-test.cpp.

I have an idea about automatically generating command line, for example:
void get_header(std::string& cmd_line, Options& expected_options)
{
	bool header = static_cast<bool>(std::rand() % 2);
	if (header) {
		bool value = static_cast<bool>(std::rand() % 2);
		cmd_line.append(" -h ");
		cmd_line.append(value ? "yes" : "no");
		expected_options.header = value;
	}
}

the advantage is that any number of command lines can be tested without manual input.
the disadvantage is that it may make the test more complicated.

I made a few minor changes to driver-test. Please review.

Revise file prologue
Rename test_get_options to test_get_options_nominal
Rename parse_cmd_line_and_compare to test_cmd_line
Rename compare to verify_options
Revise function prologue

Pending the use of std::string_view in parsing cmd-line, I'm OK with the code in this PR. However, I have not verified if the expected options are set up correctly for each cmd-line. I can spend some time tomorrow morning, but I think we all should carefully look at them.
@cmcmone I like your idea of generating cmd-line. The technique you propose is fairly well known and is the core of "fuzz buzz" testing. The challenge in this case will be generating valid combinations, but it can be done. However, I recommend we consider that approach after this PR, at an appropriate time.

@smurthys

I made a few minor changes to driver-test.

I like the function name changes. Thanks for that.

Thanks @Ndemco for the change.
I notice that L14-l17 include iostream and string_view, but I did see any else you use them.

I'm wondering if test_get_options and all functions specific to test_get_options should be in their own file to reduce clutter in driver-test.cpp.

I don't see any clutter @Ndemco. Could you point to some examples?

I just noticed that the PR was attempting to merge into dev, which is incorrect. I edited the PR so that the base is driver-test as it should be.
Important: please check the base at PR at creation. GitHub defaults the base to the default branch, which is dev in this repo.

I just noticed that the PR was attempting to merge into dev

Sorry about that. I asked you on Teams about which branch I should be merging into and you sent me a screenshot of get-options-nominal merging into dev so I assumed that was what you wanted.

@smurthys

I don't see any clutter @Ndemco. Could you point to some examples?

It is not very cluttered now but I imagine it will get cluttered as we add more to driver_test.

It is not very cluttered now but I imagine it will get cluttered as we add more to driver_test.

:smiley: I think test_get_options_nominal is not cluttered, but it's just too long. But if we split it, it feels like it breaks the integrity.
F.3: Keep functions short and simple

Thanks @Ndemco @smurthys for the contribution.

I notice that L14-l17 include iostream and string_view, but I did see any else you use them.
include <cstdint> because use USHRT_MAX in L245

Good catch @cmcmone. BTW, USHRT_MAX is declared in <climits>. BTW, L245 presents an interesting challenge for this PR because the data type of fail threshold has changed. I am right now thinking of a way to address this issue.

I just noticed that the PR was attempting to merge into dev

Sorry about that. I asked you on Teams about which branch I should be merging into and you sent me a screenshot of get-options-nominal merging into dev so I assumed that was what you wanted.

My bad then. I was only answering the question of which way the directions go. I assumed you were aware of the branch pattern. I recall discussing that driver-test branch encompasses all development related to testing the driver. No issues though.

It is not very cluttered now but I imagine it will get cluttered as we add more to driver_test.

😃 I think test_get_options_nominal is not cluttered, but it's just too long. But if we split it, it feels like it breaks the integrity.
F.3: Keep functions short and simple

I believe I have already mentioned a couple of time in this PR that it is perfectly fine to partition test_get_options_nominal to smaller functions. I don't think that the partitioning breaks the function's "integrity".

I assume you have noticed the alert that this branch has conflicts that must be resolved.

Good catch @cmcmone. BTW, USHRT_MAX is declared in <climits>. BTW, L245 presents an interesting challenge for this PR because the data type of fail threshold has changed. I am right now thinking of a way to address this issue.

Thanks @smurthys pointing out this error. I didn't realize that  is a part of the C numeric limits interface.

EDIT: I reviewed possible changes to avoid having to use USHRT_MAX here, but decided that any change causes conflicts either now or later. I think we can address this issue slightly differently later.

For this reason, I think @Ndemco can create an issue to record this, so we won't forget it in the later version.

It is not very cluttered now but I imagine it will get cluttered as we add more to driver_test.

😃 I think test_get_options_nominal is not cluttered, but it's just too long. But if we split it, it feels like it breaks the integrity.
F.3: Keep functions short and simple

I believe I have already mentioned a couple of time in this PR that it is perfectly fine to partition test_get_options_nominal to smaller functions. I don't think that the partitioning breaks the function's "integrity".

Sorry for not noticing the previous comment, I re-checked this PR comment again.
OK, if so, then we can split this function.

I assume you have noticed the alert that this branch has conflicts that must be resolved.

I resolved the conflict(first time), but I’m not sure if I did it correctly. Please let me know if there has a problem, then I will undo this merge.

I think I can make some contribution to this PR, so I made the following changes:

Change cmd_line_3 to cmd_line 3  14a01fa
Fixed missing a semicolon  485c13b
Remove useless header files (iostream and string_view)  4bb24ad
Fixed conflicts  f333310
Split test function  a02a142

Please let me know if you have any questions.  I can undo these mergers at any time.

@smurthys

I reviewed possible changes to avoid having to use USHRT_MAX here, but decided that any change causes conflicts either now or later. I think we can address this issue slightly differently later.

Thanks for investigating the issue, I agree this is something we can address later. I like @cmcmone's recommendation of creating an issue. If you agree, I can create an issue on this to be resolved later.

@cmcmone For this reason, I think @Ndemco can create an issue to record this, so we won't forget it in the later version.
I agree creating an issue is the best way to go about this. Following @smurthys approval, I will create an issue for this.

Thanks @cmcmone for all the changes you made. I think your changes improved the organization of driver-test.cpp significantly. I made one small change which was changing cmd_line 3 to cmd-line 3.
I am interested to see how you would generate the test_case string in the test_cmd_line function.

Thanks @cmcmone for all the changes you made. I think your changes improved the organization of driver-test.cpp significantly. I made one small change which was changing cmd_line 3 to cmd-line 3.

:sweat_smile: I habitually write the underline. Thanks @Ndemco

I am interested to see how you would generate the test_case string in the test_cmd_line function.

I update the test_cmd_line function and generate the test_case string in it.   80bf78f

@cmcmone

For this reason, I think @Ndemco can create an issue to record this, so we won't forget it in the later version.

I agree creating an issue is the best way to go about this. Following @smurthys approval, I will create an issue for this.

believe merging dev into this branch addresses this issue. After merging, USHRT_MAX would need to be replaced with INT_MAX in driver_test. Unrelated to this, I think merging dev into this branch does cause an expected conflict, one that is easily resolved.

So, I looked at splitting cmd-line into string_view instead of string. The process revealed some unrelated issues in get_options, which I logged as Issue #29.
Back to splitting cmd-line into string_view in test_cmd_line: Though the change needed to use string_view is pretty straightforward including addressing const-ness, splitting a single long cmd-line string requires spaces to be replaced with the null character otherwise, the elements of the args array become parts of one long C-string. The situation is best demonstrated in a call. You could see it for yourself, but I suggest not spending that effort at this point. We should rather continue to split using string and close this PR first.

I think I can make some contribution to this PR, so I made the following changes:

Change cmd_line_3 to cmd_line 3  14a01fa
Fixed missing a semicolon  485c13b
Remove useless header files (iostream and string_view)  4bb24ad
Fixed conflicts f333310
Split test function a02a142

Please let me know if you have any questions. I can undo these mergers at any time.
I have another suggestion is that we don’t need the third parameter of test_cmd_line, we can generate this string in the test_cmd_line function and pass it to verify_options.

Thanks @cmcmone for jumping in. The changes look good. IMO it would have been better to study fuzz buzz before creating the smaller test functions, but the current code is acceptable.
BTW, in commit in commit f333310, I don't see changes relevant to the merge conflicts identified. The conflicts were in VS project and project filters files, but the commit shows changes only in driver-test.cpp. Am I seeing this wrong?

Thanks @Ndemco for creating the tests. They provide a fair coverage of the nominal behavior of get_options. Thanks @cmcmone for breaking down functions and making other edits.
I just pushed two changes:

Made template options a file-scoped static constant, and removed template_options parameter from test functions.
Renamed function test_get_options_combine_random to test_get_options_combine_arbitrary. The commit message has the rationale

I have the following summary thoughts about the  the test driver:

The functions appear to be placed in some undecipherable order: It is common practice to list related functions together; and to place first the function that is used first. This is not the case currently. Also, using the common practice, I recall moving the function test_cmd_line to the bottom in b593d08, but it seems that change was reverted. Not a big deal, but we need to make and practice a convention. The common practice is as good as any.
While the current tests provide good coverage, they do not test if the command_name member is retrieved correctly, because all tests use the same program file path. I recommend adding a couple of tests just to test that member.

I have not been able to verify the quality of all the tests, but eyeballing, they seem good and correctly set up.
Other than the two thoughts I share above, I feel these changes look good. I recommend merging dev into this branch which I see will cause three simple and obvious conflicts, and all are fixed rather easily: just make sure there are three tests suites in suites.cpp after merging, and the project has a filter for each test suite under "Source Files".

@cmcmone

For this reason, I think @Ndemco can create an issue to record this, so we won't forget it in the later version.

I agree creating an issue is the best way to go about this. Following @smurthys approval, I will create an issue for this.

believe merging dev into this branch addresses this issue. After merging, USHRT_MAX would need to be replaced with INT_MAX in driver_test. Unrelated to this, I think merging dev into this branch does cause an expected conflict, one that is easily resolved.

Yes, I think we can merge current branch to driver-test first, and then merge dev to driver-test.

Back to splitting cmd-line into string_view in test_cmd_line: Though the change needed to use string_view is pretty straightforward including addressing const-ness, splitting a single long cmd-line string requires spaces to be replaced with the null character otherwise, the elements of the args array become parts of one long C-string. The situation is best demonstrated in a call. You could see it for yourself, but I suggest not spending that effort at this point. We should rather continue to split using string and close this PR first.

Thanks @smurthys for explaining, but I'm not sure I fully understand, maybe we can make it clear the next meeting.

BTW, in commit in commit f333310, I don't see changes relevant to the merge conflicts identified. The conflicts were in VS project and project filters files, but the commit shows changes only in driver-test.cpp. Am I seeing this wrong?

I’m sure I modified the VS project and project filters files, and after I submit it, it only shows this  Merge branch 'driver-test' into get-options-nominal, nothing else. I don't know why.

I just pushed two changes:

Made template options a file-scoped static constant, and removed template_options parameter from test functions.
Renamed function test_get_options_combine_random to test_get_options_combine_arbitrary. The commit message has the rationale

Thanks @smurthys for that change, I agree almost, just curious that the get_template_options function also needs to be set to static?

The functions appear to be placed in some undecipherable order: It is common practice to list related functions together; and to place first the function that is used first. This is not the case currently. Also, using the common practice, I recall moving the function test_cmd_line to the bottom in b593d08, but it seems that change was reverted. Not a big deal, but we need to make and practice a convention. The common practice is as good as any.

Thanks @smurthys to pointing out, I think it's because I messed up the order when I split the function. Should I change it? It might be inappropriate if I make changes before ready merge.

While the current tests provide good coverage, they do not test if the command_name member is retrieved correctly, because all tests use the same program file path. I recommend adding a couple of tests just to test that member.

Is it possible to create an array to save command_name, then test it?

@cmcmone

just curious that the get_template_options function also needs to be set to static?

A function that should be callable only within the translation unit (TU) should be marked static, just like a file-scope variable. So, technically the many of the test_ functions should also be marked static but I'd leave them the way they are.

@cmcmone

I think we can merge current branch to driver-test first, and then merge dev to driver-test

No. I'm saying merge dev into this branch before merging this PR (no matter to which branch this PR merges). I suggest we do this during Monday's call so we can go over merge conflicts, and @Ndemco should merge dev into this branch. We need to make sure that all changes are complete before Monday's call.

While the current tests provide good coverage, they do not test if the command_name member is retrieved correctly, because all tests use the same program file path. I recommend adding a couple of tests just to test that member.

Is it possible to create an array to save command_name, then test it?

I' afraid I don't follow. Do you mean create an array with many program file paths and use the array elements to test if command_name returned is correct? If so, yes. An array with program file paths and a corresponding array with expected command names can be used. Alternatively, a map with program file path as value and command_name as key can also be used.
However, the choice depends on how many program file paths are being checked. We should always keep the solution simple and use the simplest means. For example, if we test only a couple of program file paths, don't use arrays or maps. Just directly set the values and test. That is, start with designing the tests first and worry about implementing it later.

The functions appear to be placed in some undecipherable order: It is common practice to list related functions together; and to place first the function that is used first. This is not the case currently. Also, using the common practice, I recall moving the function test_cmd_line to the bottom in b593d08, but it seems that change was reverted. Not a big deal, but we need to make and practice a convention. The common practice is as good as any.

Thanks @smurthys to pointing out, I think it's because I messed up the order when I split the function. Should I change it? It might be inappropriate if I make changes before ready merge.

At this point, I feel we shouldn't bother changing anything that is not necessary. Going forward, we should just remember to do it right the first time.

@cmcmone

just curious that the get_template_options function also needs to be set to static?

A function that should be callable only within the translation unit (TU) should be marked static, just like a file-scope variable. So, technically the many of the test_ functions should also be marked static but I'd leave them the way they are, for now.

Thanks @smurthys for the explain.
So the function is defined as static is like "hidden", prevent external files from accessing it?

While the current tests provide good coverage, they do not test if the command_name member is retrieved correctly, because all tests use the same program file path. I recommend adding a couple of tests just to test that member.

Is it possible to create an array to save command_name, then test it?

I' afraid I don't follow. Do you mean create an array with many program file paths and use the array elements to test if command_name returned is correct? If so, yes. An array with program file paths and a corresponding array with expected command names can be used. Alternatively, a map with program file path as value and command_name as key can also be used.
However, the choice depends on how many program file paths are being checked. We should always keep the solution simple and use the simplest means. For example, if we test only a couple of program file paths, don't use arrays or maps. Just directly set the values and test. That is, start with designing the tests first and worry about implementing it later.

Make sense, thank you for your reply.

Thanks @smurthys and @cmcmone for the contributions you made yesterday. I've read through the new suggestions and hope to address all of the pending issues and discussions in this comment.

While @cmcmone attempted to resolve the merge conflicts, there still seemed to be merge conflicts that were present. The last comment I see about it is this:

I’m sure I modified the VS project and project filters files, and after I submit it, it only shows this Merge branch 'driver-test' into get-options-nominal, nothing else. I don't know why.

However, I'm assuming this was resolved as there doesn't seem to be any conflicts present anymore.

Thanks @smurthys for figuring out how to use string_views, I agree it is probably best to go over the required changes in a call and merge the branch using strings for now.

I've looked through all the changed code, it is much more readable and organized than it was when this PR was created; thank you both for the improvements you've made. One issue I see that I think needs to be resolved before we merge as it is an important part of design: because the test_case parameter in verify_options is now automatically generated, it is very hard to know which test case correlates with which command line since it is not explicitly written in each call to test_cmd_line. This makes it difficult to find exactly which command-line failed when running tests. I believe this issue needs to be resolved before merging this branch as the ability to easily find which test case failed is an important part of design. I can revert some of the changes and add the test_case parameter back to test_cmd_line so the command-line number can be explicitly written, but I know @cmcmone  put a lot of work into the code the way it is now and I would not want to change or revert anything without first hearing your opinions. Perhaps I am not seeing it correctly or perhaps there is a better way to solve this.

I pushed a change that adds the function test_get_options_command_line which tests a few different file paths and file names. I also changed the file path/name in two test cases in test_get_options_combine_arbitrary and added test cases in test_get_options_edge_case to test for a very very long command_name. Thanks @smurthys for catching this.

I think this addresses most of the ongoing conversations in this PR and my own thoughts. If I missed something and you would like my input, please let me know. Great work everyone!

because the test_case parameter in verify_options is now automatically generated, it is very hard to know which test case correlates with which command line since it is not explicitly written in each call to test_cmd_line.

Thanks to @Ndemco for pointing out this serious bug. I didn't realize this before modifying the code. I am sorry for my mistake.

@Ndemco Good changes. I suggest adding the following tests where the program file path:

does not have a drive letter or path, say driver.exe
does not have an extension , multi-drive (this is legal)
has a relative path and a non-EXE extension, bin/driver.com

I agree that automating test identification results in information loss. I do recommend adding explicit case identification back. However, I like to remind again that the test structure will be different if fuzz testing is adopted (which for some reason hasn't received any love in this thread 😿)

@cmcmone

Thanks to @Ndemco for pointing out this serious bug. I didn't realize this before modifying the code. I am sorry for my mistake.

I did not realize this either until I had created a buggy command line and couldn't find which one had the bug. We both approved of this so it is both of our mistake!

@smurthys I've implemented your suggestions into test_get_options_command_name thanks for pointing them out.
I've done a little research on fuzz testing but I don't have a great understanding of how it is implemented. I would love to learn more about it!

I've just made a push the makes the following changes:

Add @smurthys's suggested test cases to test_get_options_command_name.
Revert the code back to explicit case identification
Changed the order some of the tester functions are defined so cmd-line 1 - cmd-line 37 are defined in order of their number; this makes it easier to search for the specific command line that triggered the error.

WIth these changes, I think this PR will be ready to merge after our meeting today. Thanks @smurthys and @cmcmone for all the hard work!

Thanks @Ndemco for making the changes. The changes look good. I look forward to today's call.

Thanks @Ndemco for those changes.

Re-opened because I think @cmcmone accidentally closed the PR before it was approved and merged.

I just tested all the changes and everything seems to work as expected.

Re-opened because I think @cmcmone accidentally closed the PR before it was approved and merged.

Yes, sorry for this accident. @smurthys

Thanks @Ndemco. I too tested and all three test suites run successfully. Excellent job everyone.

I also successfully pulled and tested the test suites. Great work!

Thanks @Ndemco for merge, everything looks good, but I think there have some tiny issue need to fix

L410 since we use INT_MAX, so I think we must include <climits>
Format the code, L42 and L150  need to add an empty line(two empty lines between functions)

L410 since we use INT_MAX, so I think we must include <climits>
Format the code, L42 and L150 need to add an empty line(two empty lines between functions)

Good catch @cmcmone, I just pushed changes that address those issues. I did not find the issue on L150 that you mentioned, but I went through the file and made sure all function definitions had two empty lines after them.


Provide an easier way to re-connect to a database server (aduxr)

Issue Type: Feature Request
Provide an easier way to re-connect to a database server if a server has disconnected. Often enough a server gets disconnected. Currently, you have to go through the process of getting re-connected by clicking on the server (too subtle) or creating a new connection to the server. We have watched a number of users create a new connection to connect to the server after looking for a "Reconnect" command off the right-click server menu.
Add a re-connect command.

Azure Data Studio version: Azure Data Studio 1.5.2 (f74080c96310354bc92211f1826c0fdce78ca2f6, 2019-03-22T06:09:10.602Z)
OS version: Darwin x64 18.5.0

OE now supports 'Refresh' icon which is more intuitive and easy to understand. Closing this issue as resolved.


Support for low vram devices (4gb and maybe even 2g)

Currently SHARK can barely fit fp16 model into 4g device (AMD RX570) and even start inference with reduced vulkan block size but will always crash in middle because of OOM.
Solutions for this could be to:

Allow moving model parts into CPU like text_encoder, vae and others. (Will likely allow 4g devices to inference at 512x512 without OOM)
Allow Vulkan to allocate on shared vram (will likely make SHARK as slow as ONNX)
And other not vendor locked ways listed on Optimizations page

P.S. Thanks for this amazing project, it enabled me to use SD on vega 8 laptop that doesn't have UMA buffer bios option.

Managed to run on 4g device by moving everything except unet and vae to CPU and removing unet from memory before vae starts.

Would you mind posting your solution? Or at least some details?
I tried SD 2.1 FP16 on my 6GB card, but ran out of memory. SD 1.5 isn't available in FP16 and FP32 is again running OOM.

@holgerpieta Sure https://github.com/deinferno/SHARK, most optimal solution is using --onnx_vae option in my fork

Ah, of course, could checked for a fork.
I'll give it a try and report back.

I tried it with a local copy of the SD2.1 converted to ONNX and --onnx_vae="D:/local/path/vae_decoder/model.onnx", but it complained that this is not a valid HuggingFaces repo ID.
As far as I know, there is no official ONNX release of SD2.1.
Any hints what I should enter there?

OK, I was able to solve that problem myself, I had to omit the "model.onnx" at the end.
Now it runs, technically, with any of the options --cpu_clip, --cpu_vae or --onnx_vae, and it's impressively fast (0.35 s/it), but the resulting images are just black.
Any hints?

@holgerpieta Try installing latest IREE supported drivers from SHARK's wiki page if you got an AMD card, or if you got Nvidia card maybe it's not yet supported.


Improve FLAC3D writer performance

Improved: vectorize calculation of cosine angles to determine points order (much faster),
Fixed: issue when meshio.Mesh contains cell types not supported by FLAC3D,
Added: zone_data option to define cell_data to export as zone group (e.g. meshio.write("filename.f3grid", mesh, zone_data = "gmsh:physical") to export Gmsh physical groups as FLAC3D zone groups).

meshio.write("filename.f3grid", mesh, zone_data = "gmsh:physical")

Can't merge this. The zone_data keyword is too specific to the flac3d writer, it wouldn't do anything else for any other mesh type. Can you check in mesh.cell_data for suitables zones and translate those?
Also np.cross is really slow, and if you're looking for speed you almost always want to try and replace it with dot products. There is an expression for (np.cross(p1 - p0, p2 - p0) * (p3 - p0)).sum(axis=1) (the scalar triple product) in terms of dot products only, see https://math.stackexchange.com/q/1954789/36678. I can't recall if that's any faster than the cross product now, but it's certainly worth trying.

Thanks for your contribution!
For performance (much faster), could you post the figure generated by https://github.com/nschloe/meshio/blob/master/test/performance.py, before and after the PR? You need to add flac3d into the list.

@nschloe Okay I removed the zone_data option and improved interoperability with Gmsh and Medit (based on what's already done for Medit format). I also improved the way labels were handled.
Concerning the scalar triple product, I need to know its sign to correctly reorder the points (that determines the direction of the normal vector in FLAC3D), so I cannot use the expression in your link... Actually, the main purpose of this PR is to avoid calling np.cross for each cell by replacing it with a single call to bigger numpy.arrays which significantly improves the performance of the writer (see below). np.cross seems to be quite optimized in the latest version of numpy and I think the only way to improve a bit more the performance is to avoid creating intermediate numpy.arrays when broadcasting (e.g. use cython or numba).
@tianyikillua Unfortunately, I cannot run the test since FLAC3D does not support triangles. The only way would be to transform triangles to wedges and quads to hexahedra. Nevertheless, here are some benchmark results for a custom mesh with 573642 tetrahedra (new below).
25.6 s ± 139 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
7.07 s ± 49.5 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

np.cross seems to be quite optimized in the latest version of numpy

Yeah, it's good enough. It's about five times slower than a dot, though, which is why I'd once looked into this. It's alright to use cross.

LGTM. FLAC3D is a rather obscure format, so I'm fine with an incomplete test coverage. Would be nice to have tests for this though.


Update TermsSection / DefinitionSections according to isodoc-models

Update according to this change: https://github.com/riboseinc/isodoc-models/commit/96ce060d6c262b8172aba552c035e9768d647376

TermsSection now only contains terms (TermCollection) (removed "subsections: TermSection")
Added DefinitionSection that only contains definitions (DefinitionCollection) (for symbols/abbrevs)
DefinitionElement has been moved from Text model into <<Terms>> Definition

Related to: https://github.com/riboseinc/isodoc-models/issues/32

TermsSection now only contains terms (TermCollection) (removed "subsections: TermSection")

Done

Definitions: done.


Question: Get the user email

Is there any way to get the user email?

Not through the normal API; from what I recall, you must request elevated permission from Twitter for information such as email.

@meteochu You need the permission and then you can add it as a parameter parameters["include_email"] on the request verifyAccountCredentials.
I ended up creating a fork because I was needing that. If you guys want I can make a PR.

Oh, I didn't realize that. Please do!

@meteochu  check https://github.com/mattdonnelly/Swifter/pull/238


Re-Adding JWSTSIAF-165 (NIS 027 data)

This PR adds back in the changes from #120 (covering JWSTSIAF ticket 165) which was originally added in PRDOPSSOC-027 and then removed in PRDOPSSOC-028.
This PR (same as the original #120), aims to update the reference V2,V3 before launch for NIS_CEN and NIS_CEN_OSS.
I've held off on re-generating the NIRISS xml, xlsx, and analysis files so its easier to compare this PR to PR #120. I will re-generate the data (both for pysiaf and to be posted and reviewed in the JWSTSIAF ticket) once this PR has been approved.

Tagging @goudfroo here since I can't set you as a reviewer. I've sent you an invitation to access the repository so if you accept that it should fix this.

These changes have been approved via a comment in https://jira.stsci.edu/browse/JWSTSIAF-175 and this PR is now ready to be merged when we start the CR creation process


Fix inconsistent JSDoc

Some JSDoc types are inconsistent or incorrect.

I have singed CLA.

confirmed CLA

thanks!


Event Listener - Containerize / GHA to complete containerization

Taking the existing demo code that currently is listening for events and:

create a dockerfile
create a github action that will build the image and cache it in a container registry - likely github container registry
think through a strategy for tagging

dockerfile created and action created to build docker image and publish it to the github container registry.
pr: https://github.com/bcgov/nr-rfc-grib-copy/pull/18


Possible simplification with thiserror

It might be possible to simplify your errors somewhat by bringing in thiserror. It automates implementing Display and From traits pretty cleanly, and can be paired with anyhow (if you wanted). It's not necessary, but might remove some lines of code and seems to be pretty idiomatic currently in the community.

Thanks for the suggestion of the thiserror crate, it's really useful. I'll look into using anyhow in the near future.


Update link

Hello,
Thanks for the library. Could you please update the link from http to https? This to make sure there is no mixed content while writing web apps.
Many thanks!

Hi there,
Good spot. At the time of writing, https did not work. I'm not too sure if it does now.
By all means, please submit a PR as I'm not in a position at the moment myself to update.

Hi,
It doesn't work. I solved it by putting it behind an Azure Function (API call).
Thanks for the library!!

Oh dear, it's shame that 2 years on it still doesn't support HTTPS. Thanks for trying.


help please 6 item

How do I accomplish item 6 and beyond? I just opened python for the first time 2 hours ago, created txt in step 4, but I don't understand how to execute step 6, where to enter this command?

Python scripts executes from console (command prompt, power shell)
You should open command prompt then switch to the directory with project and after that run command.
I have checked again the project it works correct
According to your screenshot I could recommed redownload project, seems to be file is corrupted or edited


add snowflake and upgrade tensorflow to 2.0

add snowflake libraries:

snowflake-connector-python
snowflake-sqlalchemy

Update TensorFlow to 2.0 which includes Keras so removed Keras.
unpinned Pandas which causes some issues with Snowflake

and added pyarrow which is a requirement to read Parquet files from Dask/Pandas

tested both locally and in app.demo.saturnenterprise.io and worked fine

closed by #23