Console API

While working on my project I noticed a few things about the Console API: the Root and Offscreen consoles seem to be clearly distinct concepts with some shared common functionality. The current API doesn't really reflect this: all functionality is implemented under the Console enum. Examples:

init_root is only applicable to Root
new is only applicable to Offscreen
all static methods could be either free functions or under RootConsole. Having them as free functions would probably provide a nicer API, while having them under RootConsole would match the libtcod documentation (which is why I'm more in favor of the 2nd option)

My suggestion would be the following: split Console into two structs and a trait:

OffscreenConsole: struct for offscreen console functionality
RootConsole: struct for the root console funcionality
Console: trait for the shared functionality

In practice all trait methods except for con(&self) can be implemented in the Console trait itself, so OffscreenConsole and RootConsole would only have to provide con(&self).
Advantages:

You can still use &Console or Box<Console> to have a collection of consoles, if you truly do not want to have distinctions between Root and Offscreen consoles.
Type specific functionality will not bleed through to an other type (new and init_root).

Disadvantages:

Breaking change
More import statements (explicit Console trait import)

I'm only making these suggestions, because there's an open invitation on the main project page, if you want me to stop, please just say so.

Please don't stop, this is the only way we can improve things :-).
(also, sorry, the reply is quite long and I hope it doesn't sound negative, I don't mean it to be, but it's a bit complex and I'd like to have more thinking on this before we go ahead)
The way it's currently organised maps relatively closely to the libtcod interface. Some functions (e.g. is_fullscreen, set_fade, flush) do not require TCOD_console_t so I made them as static. Everything that does expect TCOD_console_t (e.g. width, put_char, clear) can be applied both to root and offscreen consoles. Apart from the way they're constructed and destroyed, they're pretty much identical (from libtcod's point of view).
This is a bit tough because on one hand, I want good ergonomics and an API that looks closer to Rust than to C, on the other hand I don't want to drastically depart from libtcod because of the people who come here with libtcod knowledge but used a different language so far.
If we made the current static functions into methods on Root console, it will limit their use compared to what we have now. You'll have to pass the root console object everywhere you want to read keyboard, etc.
How would we handle blit? A method on the Console trait that takes &mut Console?
I'm not too happy about requiring a new import to even get started, but it's not a deal breaker.
On the other hand, I think it does make sense to me semantically (i.e. that's what I would have done anyway if I were designing libtcod -- which doesn't mean it's necessarily a good idea :-) ).
I'm not too fond of moving the static functions to freestanging ones, because other than the way you type the invocation, they're pretty much identical, aren't they? Thing is -- in that case, I don't see much reason for splitting root and offscreen consoles into different types -- they only thing that'll be different then is the constructor and destructor code. Or am I missing other functions that can only be called on one or the other but not both?
And while we're at this, there's a bit of a weirdness now because we export RootConsole, which you can theoretically write to before init_root is called. I don't know what that's going to do, but prolly nothing good. If do make the root console-related functionality into a more "normal" Rust object, we could stop exporting it and only have it available through init_root (or its new equivalent). It would make things slightly more verbose but also safer I think.
Also the fact that getting information is in the system module (check_for_event) but you can get keyboard state from console, too (and it's actually the preferred way as far as I can tell). So should we do something about that? And even more generally, there's an overlap between console and system and it's not always clear why it's where it is (e.g. fullscreen stuff is split, input, flush, fading, fonts, etc.).

First, now that I though about it, I'm not a big fan free Console functions either. Having said that,
you misunderstood the suggestion, probably because it was not clearly written at the first place, so let me go into a bit more detail:
There would be 2 structs and 1 trait, each with the following content:

RootConsole: struct, contains init_root and every static function from the current Console, still as static functions (so essentially that change would be, eg.: Console::flush into RootConsole::flush
OffscreenConsole: struct, contains new
Console: trait, contains everything from Console that takes &self or &mut self

I actually made a small-scale implementation of this just to see how it would look, and you were right to mention blit, it's the most problematic of the functions. You cannot implement it on the trait because it ruins object safety. You could implement it as methods on the concrete structs, but that makes it pretty inconvenient to maintain. Here's what I came up with:
Have blit as a free function. While I agree, that functions related to the Root console should not be free-standing functions, blit doesn't really belong to anything. Since console is in its separate module (if we count #138) it can be called as console::blit and with the same semantics as now.
Then it can be implemented as follows (asserts left out to save space):
pub fn blit<T, U>(source_console: &T,
                  source_x: i32, source_y: i32,
                  source_width: i32, source_height: i32,
                  destination_console: &mut U,
                  destination_x: i32, destination_y: i32,
                  foreground_alpha: f32, background_alpha: f32)
    where T: Console,
          U: Console {
    unsafe {
        ffi::TCOD_console_blit(source_console.con(),
                               source_x, source_y, source_width, source_height,
                               destination_console.con(),
                               destination_x, destination_y,
                               foreground_alpha, background_alpha);
    }
}

Now if we implement the Console trait for various type, using blit is actually really convenient. I put together this example file to test the changes:
extern crate tcod;

use tcod::console;
use tcod::{Console, RootConsole, OffscreenConsole};
use tcod::colors;

fn main() {
    let mut root = RootConsole::init(80, 50, "Using blit with libtcod", false);

    let mut direct: OffscreenConsole = OffscreenConsole::new(20, 20);
    let mut boxed_direct: Box<OffscreenConsole> = Box::new(OffscreenConsole::new(20, 20));
    let mut trait_object: &Console = &OffscreenConsole::new(20, 20);
    let mut boxed_trait: Box<Console> = Box::new(OffscreenConsole::new(20, 20));

    root.set_default_background(colors::darkest_green);

    direct.set_default_background(colors::red);
    boxed_direct.set_default_background(colors::white);
    trait_object.set_default_background(colors::black);
    boxed_trait.set_default_background(colors::blue);

    root.clear();

    direct.clear();
    boxed_direct.clear();
    trait_object.clear();
    boxed_trait.clear();

    console::blit(&direct, 0, 0, 20, 20, &mut root, 0, 0, 1.0, 1.0);
    console::blit(&boxed_direct, 0, 0, 20, 20, &mut root, 20, 0, 1.0, 1.0);
    console::blit(&trait_object, 0, 0, 20, 20, &mut root, 0, 20, 1.0, 1.0);
    console::blit(&boxed_trait, 0, 0, 20, 20, &mut root, 20, 20, 1.0, 1.0);

    RootConsole::flush();
    RootConsole::wait_for_keypress(true);
}

I wrote up some comments previously, but after much delibaration I decided to rewrite them into a more appealing format. My earlier posts contained an explanation detailing my original suggestion, but right now, I don't think that suggestion went far enough. In the next several points I'll list the issues I see with the current design, the propsed solutions then some cons for the whole change. Fair warning: this is going to be a really long post.
Object Initialization
The problem: the problem consists of three parts:

RootConsole can be written to a read from before it is initialized, with methods that take &self or &mut self
some of its static methods can only be called before init
some of its static methods can only be be called after init

The solution:

The proposed change already solves this problem, since RootConsole::init is the only way to get an instance of the RootConsole object.
Since I could only find a single function that requires this (TCODConsole::setCustomFont), adding a second init function (let's say RootConsole::init_with_font) is a feasible solution. An other alternative is building a separate Settings object and passing that to RootConsole. I'm in favor of the first alternative.
This is the trickiest of the three problems, and would require us to convert all of RootConsole's static functions into methods, taking &self or &mut self. I firmly believe this is the right move, but this leads up to the second issue:

Thread safety
The problem: as of right now, we are not treating the RootConsole as an object. We are wrapping functions that essentially change mutable global state (or static mut in Rust terms), while making no guarantees about the safety of these operations. Consider the following code:
fn main() {
    Console::init_root(80, 20, "Threading bug", false);

    for i in 0..2 {
        thread::spawn(move || {
            Console::set_fullscreen(Console::is_fullscreen());
        });
    }

    timer::sleep(Duration::milliseconds(50));
}

Since the borrow checker doesn't know we are manipulating some global state from different threads, this compiles without even a warning. This code actually segfaults on my system, which is definitely a bug.
The solution: same as the previous issue: declaring the RootConsole static functions as actual methods would essentially make RootConsole into something the borrow checker can validate. I have a hard time thinking about alternative solutions (locking on a static would probably work, but it's not very elegant).
Cons
Divergence from the original C API: while this is a valid concern, I think it's more important to provide something that reflects Rust's philosophy. The functionality is still very recognizable, but it's wrapped in a way that makes sense in the Rust ecosystem.
Also there's the concern that changing the previously static functions into methods will limit the functionality. While this is true, as I detailed in my Thread safety section, the current implementation is inherently unsafe. I also think that this change would be a nice step towards a nice Rust-like API.
Implementation Details
All the changes detailed above are fairly easy to do. I did a proof of concept implementation to see, how it'd look, and the only problem I ran into was the blit function (very correctly pointed out in your previous comment).
The problem is that it cannot be implemented on the Console trait, since it would ruin object safety, which would in turn make creating Box<Console> objects impossible. This, of course had to be avoided. An other alternative would've been to implement it for all the concrete Console implementers (RootConsole and OffscreenConsole). This would unfortunately lose out on generality: traits objects would no longer be able to use blit. This was also not an option.
The solution was to have blit as a free function. Now you said, that you disliked the idea of free functions here, but hear me out: blit doesn't logically belong anywhere, even in the current implementation. It is a function, that operates on any two Console types, but is not a method. If/when #138 gets merged, console will be split into its own module, which made blit a nice candidate for a free function, since the calling syntax would be the following:
use tcod::console;

console::blit(...)

Which is really close to the current implementation, but with all the added benefits of the points mentioned in the post. It's also worth noting, that we wouldn't lose out on performance either: with the right Console trait implementation the following blit implementation is possible (asserts ommited to save space):
pub fn blit<T, U>(source_console: &T,
                  source_x: i32, source_y: i32,
                  source_width: i32, source_height: i32,
                  destination_console: &mut U,
                  destination_x: i32, destination_y: i32,
                  foreground_alpha: f32, background_alpha: f32)
    where T: Console,
          U: Console {
    unsafe {
        ffi::TCOD_console_blit(source_console.con(),
                               source_x, source_y, source_width, source_height,
                               destination_console.con(),
                               destination_x, destination_y,
                               foreground_alpha, background_alpha);
    }
}

It's also worth mentioning, that this would also make it far more convenient to use for boxed and trait objects. This is from the example file I wrote to test the reworked blit function:
let mut root = RootConsole::init(80, 50, "Using blit with libtcod", false);

let mut direct: OffscreenConsole = OffscreenConsole::new(20, 20);
let mut boxed_direct: Box<OffscreenConsole> = Box::new(OffscreenConsole::new(20, 20));
let mut trait_object: &Console = &OffscreenConsole::new(20, 20);
let mut boxed_trait: Box<Console> = Box::new(OffscreenConsole::new(20, 20));

console::blit(&direct, 0, 0, 20, 20, &mut root, 0, 0, 1.0, 1.0);
console::blit(&boxed_direct, 0, 0, 20, 20, &mut root, 20, 0, 1.0, 1.0);
console::blit(&trait_object, 0, 0, 20, 20, &mut root, 0, 20, 1.0, 1.0);
console::blit(&boxed_trait, 0, 0, 20, 20, &mut root, 20, 20, 1.0, 1.0);

Note that you don't have to stack &s and *s to get blit working.
Edits

Sorry I misread your original idea even though the new proposal is about making these functions members of RootConsole.
Secondly, while I do want to keep tcod-rs familiar to existing libtcod users, if a user gets a segfault while using the "safe" parts of tcod, that's absolutely a bug.
And yeah, I think your suggestion makes sense. Methods on root console will let the borrow checker deal with the shared mutable state that libtcod tracks and I'm in favour of your blit suggestion, too.
Regarding "init root with font": I think you can use it before and after the root console is initialised. If you call it after a root console is initialised, it'll just change the way things are rendered. So I think we may want to keep both "init with font" constructor and keep the "set_custom_font" as a method around, too.
Also, I would actually like to require picking a font when creating a root console as the default interface. terminal.png is just a fallback when you don't enter anything and it's kept for legacy reasons. It's super ugly and doesn't seem to follow the layout of the newer fonts shipped with tcod.
Problem is, it's another four arguments to the constructor.

Well, if you can set the font before and after, then libtcod's documentation is pretty broken :-).
I actually thought about the problem of having a lot of parameters (both to functions and constructors), and I can't really see an easy fix. We can keep it as it is, and rely on the user to check the docs. An other idea might be to have separate objects that we pass to these functions, as to imitate named parameters. I'm not sure I'm too fond of this idea either.

Hm, I think I may have misinterpreted the docs. Anyway, I've tried it now and it doesn't seem to have an effect, so I'm fine with just allowing that during initialisation.
Regarding parameters, not sure if this is what you meant by the second idea, but something like http://doc.rust-lang.org/std/process/struct.Command.html doesn't seem too bad to me:
let mut root = tcod::console::Root::new()
                      .size(80, 40),
                      .fullscreen()
                      .font(&Path("dejavu16x16_gs_tc.png").
                      .initialize();

root.print_ex(40, 15, BackgroundFlag::None, TextAlignment::Center,"Hello!");
root.flush();

Although since Root::new doesn't actually return an instance of Root but some intermediate builder struct that actually has the size, font, etc. methods, this would be both surprising and split things in the docs. So maybe not really worth it.

My suggestion was making a separate RootData or something like that, which would make the initialization into something like this:
let mut root = tcod::console::Root::init(RootData { width: 80, height: 30,
                                                    is_fullscreen: true,
                                                    font: &Path("dejavu16x16_gs_tc.png" });

This is of cource just a poor man's replacement for named parameters, but apart from this and the builder pattern you mentioned I don't know what other possibilities there are. Maybe a different naming convention for the pattern you mentioned?
let mut root = tcod::console::Root::initializer()
                      .size(80, 40),
                      .fullscreen()
                      .font(&Path("dejavu16x16_gs_tc.png").
                      .create();

root.print_ex(40, 15, BackgroundFlag::None, TextAlignment::Center,"Hello!");
root.flush();

This has the problem that the user might think that they can create Root consoles at will, so this is not a terribly good idea either.
On a slightly different topic: would you prefer dropping Console suffixes in favor of console::Root and no reexports?

Alternatively, we could use a slightly modified version of your idea:
use tcod::console as console;

let mut root = console::RootInitializer::new()
                      .size(80, 40),
                      .fullscreen()
                      .font(&Path("dejavu16x16_gs_tc.png").
                      .initialize();

This has the advantage that the documentation would not have to be split, Root would still have its init static function taking a lot of parameters and RootInitializer would just be a convenience struct, making its initialization easier.

I like your last suggestion.
Also, I think we can combat the lack of explicitness in the full init_root by using better values for the parameters. Say instead of passing bool to fullscreen, we could have an enum that is Windowed or Fullscreen. The screen dimensions, title and font path are relatively straightforward and we could create a named tuple for the font char layout:
let mut root = console::Root::init(80, 40, "My Game", Fullscreen,
    &Path("dejavu16x16_gs_tc.png"), FONT_LAYOUT_TCOD,
    FontCharacterDimension(32, 8));

Still not perfect but a bit more readable imho.

While we're at naming, we could actually create a simple additional Font type and make the Path inside of the Console, which would make the above example:
let mut root = console::Root::init(80, 40, "My Game", Fullscreen,
    Font { path: "dejavu16x16_gs_tc.png" } , FONT_LAYOUT_TCOD,
    FontCharacterDimension(32, 8));

// Or
let mut root = console::Root::init(80, 40, "My Game", Fullscreen,
    Font::with_path("dejavu16x16_gs_tc.png") , FONT_LAYOUT_TCOD,
    FontCharacterDimension(32, 8));

// Or
let mut root = console::Root::init(80, 40, "My Game", Fullscreen,
    Font("dejavu16x16_gs_tc.png"), FONT_LAYOUT_TCOD,
    FontCharacterDimension(32, 8));

Since we still seem to be discussing this.

Closed via #144.


Generation does not work with splitted files

Have a look on #21 last comment.

any news on this ? i also have this problem

Not yet. Had no time to look into it the last 3 days. Sorry.
But could you provide a simple 2 file example swagger-definition please. That could improve speed when resolving this issue ;-)

Hi,
I am also having this issue. The generation is working but not for collections with generics:
"fooList": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        }
      },

Should look like this:
private Map<String, String> fooList;

but generates this:
private String fooList;

Any idea if this will be fixed.

Hi, I had a look into the code-generator documentation and did not found any hint that it is possible to use more than one spec-file (it's the -i parameter, right?). So we only could build a custom file-merge and present that to the code-generator.
Do you have more information about using multiple spec-files for the code-generator?

In swagger specs you have the option to reference external elements like:
$ref: '../common/Definitions.yaml#/Error'

Yes I read that also somewhere in the net, and also that the 'swagger-editor' supports that. But the 'code-generator' only supports one, right? And we only delegate to that generator. I will try it.

The swagger generator supports it. Yes, I think you need only delegate.

I'm also interested on this fix


Need build help. Java compiler is not available.

[x] I have read the FAQ.
[x] I have searched in existing issues.

Environment

OS: Arch Linux
scrcpy version: [e.g. 1.12.1]
installation method: manual build
device model:
Android version: 13

Describe the bug
ninja -Cx
ninja: Entering directory `x'
[49/64] Generating server/scrcpy-server with a custom command
> Task :server:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':server:compileReleaseJavaWithJavac'.
> Java compiler is not available. Please check that /usr/lib/jvm/java-17-openjdk contains a valid JDK installation.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 573ms
14 actionable tasks: 1 executed, 13 up-to-date
[62/64] Linking target app/scrcpy
FAILED: server/scrcpy-server

javac seems to be available at specified location.
/usr/lib/jvm/java-17-openjdk/bin/javac --version
javac 17.0.11

how to debug further?

Two reboots fixed the issue.
Nothing change in between.


[Search] Vector Search Updates For August Preview

This PR includes the following updates:

Regenerate using the latest searchindex.json Swagger: link

Replaced all occurrences of Vector with Vectors.
Added a sample demonstrating the usage of multiple Vectors in a search.

Updated the FieldBuilder functionality to support Vector.
Added convenience for setting the fields in a Vector query.

Added a sample demonstrating the usage of multi fields vector search.

Fixes: https://github.com/Azure/azure-sdk-for-net/issues/37699
Fixes: https://github.com/Azure/azure-sdk-for-net/issues/37907

API change check
APIView has identified API level changes in this PR and created following API reviews.
Azure.Search.Documents


ASB-1760: Fix - Add full stop

Task
https://pins-ds.atlassian.net/browse/ASB-1760?atlOrigin=eyJpIjoiN2RjMDBhYTM2MGJmNDcwMGEzMGNmMjEzODY1MjdhNzEiLCJwIjoiaiJ9

:tada: This PR is included in version 2.12.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


chart version range specifications

In order to keep a Chart ecosystem healthy, it is important for some range of Chart updates to be applied quickly and consistently. Encoding a specific version into Application objects and then updating it with every change means that new versions are unlikely to be applied across the whole population of Application objects: the Chart maintainers might release a new version, but only some Application owners will action the upgrade, which represents toil for them.
To address this, we think it makes sense for Shipper to develop the ability to work with semver version range specifications for Charts. In this way, Application owners can specify a version constraint that they're comfortable with (for example, upwards float on minor or bugfix versions), and get those updates automatically.
Approach
Allow a version range specification as part of the version key of the chart field in Application objects; for example, a floating patch specification: ~1.1.0. When a Release is created as part of a rollout, Shipper should resolve that range specification to a concrete, pinned version, such as 1.1.6. The Release should get that pinned version in the version key.
Release will not support version range constraints: Releases must always have a concrete version. This ensures that aborts and rollbacks always go back to a predictable version. Version range resolution is a feature of the higher level Application interface.
Considerations
Become a real Helm repo client
In order to resolve the version range spec, Shipper will need to become a fully fledged Helm repo client which processes index.yaml. Right now it just combines the version and repoUrl and appends .tgz to try to download a Chart directly, which is incorrect behavior. If we were to keep this behavior, repoUrl should be renamed to chartUrl.
Speed
Shipper should check for an updated index.yaml as soon as it needs to do a rollout. This allows CI/CD pipelines to push a new chart and then immediately deploy it.
Robustness to repo unavailability
Shipper currently caches Charts aggressively. This is in order to prevent rollouts with a previously-deployed Chart from failing due to a broken Chart repository. We want to maintain this property as much as possible: we'd like to avoid going over the wire to contact the chart repo unless absolutely required. As such:

We always try to use a cached Chart tarball when dealing with concrete versions.
If the index.yaml fetch fails when resolving a version range specification, we should try to fall back to a cached index.yaml.

This means that a version range resolution may not return the latest possible version if the Chart repo is down. In this case Shipper should indicate the resolution failure or fallback using a Condition on the Application (or similar).

Release will not support version range constraints: Releases must always have a concrete version. This ensures that aborts and rollbacks always go back to a predictable version. Version range resolution is a feature of the higher level Application interface.

It is worth to mention that in the case of a rollback that the user is responsible for adding a range specification for the next rollout, otherwise the Application's chart will be pinned (resolved to a single version) for subsequent rollouts and this might not be what the user expects.

Regarding helm repo availability, what about supporting having a docker registry and helm repo per cluster by allowing some king of pattern or templating in the manifest? For example having an https://github.com/goharbor/harbor on each application cluster being synced from another one running on the manager cluster?

Closed by #105

release-0.5 exposed a significant flaw in the implementation. In the worst case scenario application releases were re-creating by Shipper uncontrollably causing an extensive resource consumption. The root cause is in the env hashing strategy: in the proposed solution app.spec.template.chart.version stays the original one (read: unresolved), whereas the release.spec.environment.chart.version contains a resolved chart version. On a resync cycle Shipper detected env hash mismatch between the app and the contender and decided to create another release right away. The history repeats until the resource limit is exhausted.
I'm reopening this issue for the sake of connecting it to an upcoming release. Once the development group is convinced on the newly proposed implementation, we can close this issue "for real".

The recent release 0.5.0-alpha.4 is closing this issue (https://github.com/bookingcom/shipper/releases/tag/v0.5.0-alpha.4)


Add nouveau allocator driver

A series of refactoring changes to allow multiple allocator drivers to cohexist
Implementation of an allocator driver based off nouveau
Test enhancements

Exported to https://gitlab.freedesktop.org/allocator/allocator/merge_requests/17


[oz mode] clean up electric indentation test

This follows PR #3490. It ensures reindentation is done only when matching block-closing keywords. (Upper-case letters were erroneously put in the list, case-sensitive check is correct, as for highlighting.)

Thanks! Merged as 0c9a2ff


Clean up orphaned nodes / handle missed deletions

If the master process is not running when a node is deleted, it will miss the event. There will then be orphaned resources, e.g. router ports.
This can be fixed in two ways - either by adding ovn-kube as a finalizer that blocks node deletion until the network resources are cleaned up, or by having a separate reconciliation loop that looks for orphaned northbound rows.
We've been idly chatting for a while about building a full reconciliation loop, so that may be the way to go.

@squeed I agree that the reconciliation loop will be better. This loop will also ensure that the OVN DBs are in sync with the Source of Truth in K8s (aka etcd cluster) and perhaps add any missing OVN logical resources or remove any stale OVN logical resources.

We do that for specific resources like pods, services etc. i.e we look at pods in k8s and then look at logical ports in OVN and delete any that did not exist. Same thing will have to be done for nodes.


RuntimeError: Number of columns in input numeric table is incorrect

Hi,
when predicting using a random forests classifier,  it throw out such an error:
File "/lib/python3.9/site-packages/daal4py/sklearn/ensemble/_forest.py", line 312, in daal_predict_proba
dfc_predictionResult = dfc_algorithm.compute(X, self.daal_model)
File "build/daal4py_cy.pyx", line 17175, in daal4py._daal4py.decision_forest_classification_prediction.compute
File "build/daal4py_cy.pyx", line 246, in daal4py._daal4py._execute_with_context.exec_func
File "build/daal4py_cy.pyx", line 17157, in daal4py._daal4py.decision_forest_classification_prediction._compute
RuntimeError: Number of columns in input numeric table is incorrect
Same dataset has been tested successfully using other algorithms, including svm and logit regression.
Does anyone can provide some hints on this issue? thanks.

@Kange2014, what is the type (numpy.ndarray, pd.DataFrame, etc.) and shape of input data? It's essential to reproduce this issue, and some additional information might be required later.

Hi @Alexsandruss,
Sorry for a late reply. The input data type is pd.DataFrame, and the shape, for X_train: 232 rows x 146 columns, and for X_val: 59 rows x 146 columns. After fitting the RF model using X_train and y_train successfully, it cannot do predict_proba  on X_val correctly.
To help reproduce the error, I upload the model and training/validation set as the attached filenames show (unzip it first):
test_data.zip
And testing codes:
import pandas as pd
import numpy as np
import pickle

from sklearnex import patch_sklearn
patch_sklearn()

from sklearn.ensemble import RandomForestClassifier

X_train = pd.read_csv(f'data_splits/train0.tsv', sep='\t')
X_train = X_train.set_index('sample_id')
X_val = pd.read_csv(f'data_splits/val0.tsv', sep='\t')
X_val = X_val.set_index('sample_id')

f = open(f'data_splits/y_train0.npy', 'rb')
y_train = np.load(f)

f = open('model.pkl','rb')
estimator = pickle.load(f)

estimator.fit(X_train, y_train)
y_probs = estimator.predict_proba(X_val)

And error shows:
File "/lib/python3.9/site-packages/daal4py/sklearn/ensemble/_forest.py", line 312, in daal_predict_proba
dfc_predictionResult = dfc_algorithm.compute(X, self.daal_model)
File "build/daal4py_cy.pyx", line 17175, in daal4py._daal4py.decision_forest_classification_prediction.compute
File "build/daal4py_cy.pyx", line 246, in daal4py._daal4py._execute_with_context.exec_func
File "build/daal4py_cy.pyx", line 17157, in daal4py._daal4py.decision_forest_classification_prediction._compute
RuntimeError: Number of columns in input numeric table is incorrect
The running environment is:
python=3.9.16=h7a1cb2a_1
daal4py==2023.1.1
numpy=1.22.3=py39he7a7128_0
pandas=1.5.2=py39h417a72b_0
scikit-learn=1.0.2=py39h51133e4_1
Thanks...

do we have any updates on this issue?

I run mostly similar code (except loading from 'model.pkl' because it's unsafe to use pickle on externally provided models) and it finished successfully:
import pandas as pd
import numpy as np
import pickle

import logging as lg
lg.getLogger().setLevel(lg.INFO)

from sklearnex import patch_sklearn
patch_sklearn()

from sklearn.ensemble import RandomForestClassifier

X_train = pd.read_csv(f'data_splits/train0.tsv', sep='\t')
X_train = X_train.set_index('sample_id')
X_val = pd.read_csv(f'data_splits/val0.tsv', sep='\t')
X_val = X_val.set_index('sample_id')

y_train = np.load('data_splits/y_train0.npy')

rfc = RandomForestClassifier(n_estimators=100, random_state=42)
rfc.fit(X_train, y_train)
print('training score', rfc.score(X_train, y_train))

with open('model.pkl', 'wb') as mfile:
    pickle.dump(rfc, mfile)

with open('model.pkl', 'rb') as mfile:
    model = pickle.load(mfile)

print(rfc.predict_proba(X_val))
print(model.predict_proba(X_val))

Yes. That's the just strange point. If you build a new model with default parameters, it's ok, as your test show. So here I provide the rfc model, which contains its own custom rfd parameters, as an input.

Yes. That's the just strange point. If you build a new model with default parameters, it's ok, as your test show. So here I provide the rfc model, which contains its own custom rfd parameters, as an input.

Hi @Kange2014, could you provide your custom Random Forest parameters? I'm not able to load provided model due to unsafety of pickle module.

Not reproduced.


test: behaviors-message_on_lock_failure (2024-02-07 23:24:58.664255+00:00)

automatic test cleanup


fix: typing error for context in view plugin

This PR contains fix for typing error in the interfaces when context is added to a view plugin

Closed in favor of https://github.com/datavisyn/visyn_scripts/pull/38


What license is this under?

Is this MIT license or something else? I don't see anything clarifying that.

I added LICENSE to the repo.

Thank you so much. I feel much more comfortable trying this out now. Keep up the great work.


The current Twitter icon on the website appears outdated and needs to be updated

Welcome!

[X] Yes, I've searched similar issues on GitHub and didn't find any.
[X] Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you expect to see?
The Twitter icon located on the website (provide specific location if possible, e.g., header, footer, social media section) is not aligned with the latest design standards. To maintain a cohesive and up-to-date visual identity, it is essential to replace the existing Twitter icon with the latest version provided by Twitter or any updated branding guidelines. Marked in screenshot below.
Steps to Reproduce:
Visit the website [provide URL].
Navigate to the [specific page or section].
Observe the Twitter icon.
Screenshots/Attachments

Expected Behavior:
The Twitter icon should adhere to the latest design standards, ensuring a consistent and polished appearance across the website.
This issue is crucial for maintaining a visually appealing and consistent user experience on the website

Hello @Ayush9026,
Thanks for reaching.
I've shared the issue with the person in charge of the website.
I'll update this issue according to their feedback.

Thanks @nmengin sir.

Hey @Ayush9026,
We've updated the website with the new logo.
I close the issue accordingly.
Thanks again for reaching out.


code blocks should be capitalized

Fixing https://github.com/delta-io/delta-docs/issues/9

This looks good.  FYI @jakebellacera.
Jake's CodeTabs is an open-source lib, so we should probably also get this fix there.  We'll want this functionality in the delta-io/website if we integrate CodeTabs there.


[SPARK-49506][SQL] Optimize ArrayBinarySearch for foldable array

What changes were proposed in this pull request?
The pr aims to optimize ArrayBinarySearch for foldable array.
Why are the changes needed?
The changes improve performance of the array_binary_search() function.

create an instance of foldable{DataType}ArrayData only once at the initialization ( avoid frequent calls to ArrayData.to{DataType}Array() ), and reuse it inside of replacement in the case when the array parameter is foldable.

Does this PR introduce any user-facing change?
No.
How was this patch tested?

Update existed UT.
Pass GA.

Was this patch authored or co-authored using generative AI tooling?
No.

object ArrayBinarySearchBenchmark extends SqlBasedBenchmark {
  private val N = 10000000
  private val M = 100

  private val arrayData = (0 until M).mkString("array(", ",", ")")
  private val exprs = s"array_binary_search($arrayData, value % $M)"
  private val df = spark.range(N).toDF("value")

  private def doBenchmark(): Unit = {
    df.selectExpr(exprs).noop()
  }

  override def runBenchmarkSuite(mainArgs: Array[String]): Unit = {
    runBenchmark("array binary search") {
      val benchmark = new Benchmark("array binary search", N, output = output)
      benchmark.addCase("no foldable optimize", M) { _ =>
        doBenchmark()
      }
      benchmark.run()
    }
  }
}

Before:

After:

Thanks @panbingkun for working on this!
Existing usages (pyspark and ml) both apply binary search with a literal double array, this optimization will improve the performance of them.

@zhengruifeng This is a good idea. I think ArrayBinarySearch should be replaced by invoke_binary_search_function(ToJavaArray(array_expr)), and ConstantFolding should do the optimization automatically. For the new expression ToJavaArray, it can create primitive java array if the element type is primitive type and not nullable.

@zhengruifeng This is a good idea. I think ArrayBinarySearch should be replaced by invoke_binary_search_function(ToJavaArray(array_expr)), and ConstantFolding should do the optimization automatically. For the new expression ToJavaArray, it can create primitive java array if the element type is primitive type and not nullable.

@zhengruifeng @cloud-fan
The latest logic based on ToJavaType has been submitted.
Please help review it when you have free time, thanks!

Before:

Running benchmark: array binary search
  Running case: has foldable optimize
  Stopped after 100 iterations, 371269 ms

OpenJDK 64-Bit Server VM 17.0.10+7-LTS on Mac OS X 14.6.1
Apple M2
array binary search:                      Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
------------------------------------------------------------------------------------------------------------------------
has foldable optimize                              3585           3713         100          2.8         358.5       1.0X

After:

Running benchmark: array binary search
  Running case: has foldable optimize
  Stopped after 100 iterations, 21097 ms

OpenJDK 64-Bit Server VM 17.0.10+7-LTS on Mac OS X 14.6.1
Apple M2
array binary search:                      Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
------------------------------------------------------------------------------------------------------------------------
has foldable optimize                               201            211          23         49.9          20.1       1.0X

cc @cloud-fan

I will update another version today.

The version submitted now has implemented ToJavaArray using Invoke.

If we don't use Invoke to implement ToJavaArray, the benchmark data is as follows (run 3 times):

box as java.lang.Integer

java.lang.Object

Running benchmark: array binary search
  Running case: has foldable optimize
  Stopped after 100 iterations, 23226 ms

OpenJDK 64-Bit Server VM 17.0.10+7-LTS on Mac OS X 15.0
Apple M2
array binary search:                      Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
------------------------------------------------------------------------------------------------------------------------
has foldable optimize                               225            232           7         44.4          22.5       1.0X

Running benchmark: array binary search
  Running case: has foldable optimize
  Stopped after 100 iterations, 23022 ms

OpenJDK 64-Bit Server VM 17.0.10+7-LTS on Mac OS X 15.0
Apple M2
array binary search:                      Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
------------------------------------------------------------------------------------------------------------------------
has foldable optimize                               223            230           8         44.8          22.3       1.0X

Running benchmark: array binary search
  Running case: has foldable optimize
  Stopped after 100 iterations, 24869 ms

OpenJDK 64-Bit Server VM 17.0.10+7-LTS on Mac OS X 15.0
Apple M2
array binary search:                      Best Time(ms)   Avg Time(ms)   Stdev(ms)    Rate(M/s)   Per Row(ns)   Relative
------------------------------------------------------------------------------------------------------------------------
has foldable optimize                               242            249          10         41.4          24.2       1.0X

@zhengruifeng @cloud-fan
I'm very sorry that I broke this PR and couldn't restore it, so I opened a new one
https://github.com/apache/spark/pull/48225

I will close it.


CanvasItem::draw_arc Clamp angle difference so arc won't overlap itself

Ensures that in case of a big angle difference CanvasItem::draw_arc uses all points for drawing at most a single full circle, instead of drawing an arc which overlaps itself.
Improved CanvasItem::draw_arc's docs.
Resolves #64685.

Examples

Angle
Point count
Before
Afer

-90 to 630 degrees
5 + 1

-90 to 630 degrees
17 + 1

0 to 450 degrees
7 + 1

Also changed some writing to vectors so _copy_on_write will be called just once (when obtaining the pointer with ptrw()).

Oh, how will we draw stars and pie dishes from now on‽

Thanks!


Packer, ansible, ssh

A couple of months ago I attempted to use this base image as a starting point for playing around with Packer and provisioning custom images for docker.
I wanted to use Ansible to provision the image over SSH as part of the packer process.  Unfortunately, I was unable to get very far; ran into a multitude of issues regarding ssh keys/ authentication.
I'm looking to try again though, does anyone have any experience using this image in this way?

Unfortunately I cannot help you, I have no experience with Ansible. And it seems nobody else who has looked in this issue knows it either. But I have the feeling that this is more of an Ansible issue than a Docker issue, so maybe you would have more luck on an Ansible support forum.


Migrate to multiple node groups, one per each zone

From the AWS docs here: https://docs.aws.amazon.com/eks/latest/userguide/cluster-autoscaler.html
AWS reccomends:

Scope node groups across more than one Availability Zone
We recommend that you configure multiple node groups, scope each group to a single Availability Zone, and enable the --balance-similar-node-groups feature. If you only create one node group, scope that node group to span over more than one Availability Zone.

We should migrate to multiple node groups, one per AZ

I believe this is already happening when we set the values for the cluster-autoscaler helm chart?
https://github.com/streamnative/terraform-aws-cloud/blob/b9183cf6a1db3e873aba3439ea32a8d8b70d2bae/cluster_autoscaler.tf#L120


[AutoPR securityinsights/resource-manager] chore: jsonfmt securityinsights/

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/7128

This PR has been merged into https://github.com/Azure/azure-sdk-for-go/pull/5703


Allow multiple assignment and clear in AssignTaskCommand

Fixes #181

Codecov Report
Base: 38.01% // Head: 37.90% // Decreases project coverage by -0.11% :warning:

Coverage data is based on head (1596293) compared to base (5086561).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #185      +/-   ##
============================================
- Coverage     38.01%   37.90%   -0.12%
  Complexity      472      472
============================================
  Files           147      147
  Lines          2749     2757       +8
  Branches        371      372       +1
============================================
  Hits           1045     1045
- Misses         1627     1635       +8
  Partials         77       77

Impacted Files
Coverage Δ

...eedu/address/logic/commands/AssignTaskCommand.java
4.76% <0.00%> (-0.96%)
:arrow_down:

...ava/seedu/address/logic/commands/ClearCommand.java
14.28% <ø> (ø)

src/main/java/seedu/address/model/team/Task.java
32.75% <0.00%> (-0.58%)
:arrow_down:

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

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

Superseded by #198


Implement Sync. Event (or similar system, generic/override...) for every (re)connect, before and after.

Description: Implement a system that could be used to lock both, connecting and reconnecting of the client.
Use case: Server cluster running one (or a few) shard(s) per hardware(or virtual) machine (or container)
=)

We already have a system like this in place for DiscordShardedClient, just need to abstract it to support scenarios where shards are in different processes.

This should be in non-sharded client in my opinion, because the use case does not involve running multiple shards in one application. Single shard client should have an event i just started (re)connecting


Ignoring --features with -p parameter when running tests

I try to tell cargo what feature use when testing package package with command like this:
cargo test --features my_feature -p package --lib
but I get result the same if I run:
cargo test -p package --lib
But if I run tests with command:
cargo test --features my_feature --manifest-path package/Cargo.toml --lib
Everything is ok.

Thanks for the report! This is something wehre I think that Cargo can at the very least give better error messages. Right now when you specify --features it does it for the "target package" (the one specified by --manifest-path rather than the -p argument.
Surprising behavior for sure! Tough to fix though :(. We should give a better error message regardless

-p foo --features foo_feat when not in the foo directory should produce an error if foo_feat isn't defined in the local directory.  It should also produce an error in the root of a virtual workspace.
Closing as there are several other issues tracking selection of features in a worskpace, such as #5364, where we'll hopefully get a better story together.


The spec for Redix.transaction_pipeline is not complete

Problem
The spec says the return type for Redix.transaction_pipeline is
          {:ok, [Redix.Protocol.redis_value()]}
          | {:error, atom() | Redix.Error.t() | Redix.ConnectionError.t()}

but it can also return {:ok, Redix.Error.t()}
Steps to reproduce
iex(1)> Redix.start_link(name: :goober)
{:ok, #PID<0.537.0>}
iex(2)> Redix.transaction_pipeline(:goober, [["SET", "foo", "bar"], ["SADD", "bar"], ["GET", "foo"]])
{:ok,
 %Redix.Error{
   message: "EXECABORT Transaction discarded because of previous errors."
 }}

Notes
Some further spelunking, since it calls Redix.pipeline:
iex(3)> Redix.pipeline(:goober, [["MULTI"], ["SET", "foo", "bar"], ["SADD", "bar"], ["GET", "foo"], ["EXEC"]])
{:ok,
 [
   "OK",
   "QUEUED",
   %Redix.Error{message: "ERR wrong number of arguments for 'sadd' command"},
   "QUEUED",
   %Redix.Error{
     message: "EXECABORT Transaction discarded because of previous errors."
   }
 ]}

Not sure what one would like the solution to be instead, but probably at least
{:error,
 %Redix.Error{
   message: "EXECABORT Transaction discarded because of previous errors."
 }}


🎯 Improve Flash Messages 🎨

Proposed Changes 🔥

Redesign Flash Messages 🖌
Rename Flash Message Names to follow convenience accessors ✏
Fixed Logout Button 🔨
Add Remove Button for Flash ❌

Merge Checklist ✅

[x] Add specs that demonstrate bug / test a new feature.
[x] Check if route, query, or mutation authorization looks correct.

Add tests for authorization, if required.

[x] Update docs, where applicable.
[x] Add development seeds for new tables.

Followed by #58 📌 Reported by @peeyush14goyal 📍

Things to be noted:

Use flash[:alert] and flash[:notice] hereafter
Or can also use this method
Have a look at this UI/UX style for Buttons. 27be22aa

📌


Cursor jumps in Feedback textarea

Describe the bug
While typing feedback in the Feedback component, if you click out of the textarea and then click back in, the cursor constantly jumps to the end of the textarea.
To Reproduce
Steps to reproduce the behavior:

Run npm start
Visit /Feedback
Click through to any Feedback category
Enter text into the textarea.
Click anywhere on the page outside the textarea.
Click back into textarea as if you want to edit the start of your text.
The cursor will constantly jump to the end of the text.

Expected behavior
The cursor does not jump.
Screenshots

Additional context
Add any other context about the problem here.

I think this is happening because we're using the prop value for the ControlTextarea:
https://github.com/mapbox/dr-ui/blob/f3d5dc57cae83c25044a9d5f584f213ee2b9f278/src/components/feedback/components/forms.js#L44
When we should be using this component's state.


Fix docker compose deployment

Changes

Remove deprecated deployment steps
Upgrade default image to 0.9.11
New github workflow for testing docker compose deploy

#83


differences between iOS and Android callbacks data

Hi,
I have notice that there're differences between iOS and Android callbacks data, for example:

iOS has 'to' and 'from' attributes in the connectionDidConnect event data instead of 'call_to' and 'call_from'
Android doesn't have the 'call_from' and 'call_to' in the connectionDidConnect event data
Android has a deviceDidReceiveIncoming event and iOS doesn't
iOS has a callRejected event and Android doesn't

is there any reason for those differences or I can add/fix them?
best regards,
Noam
Please include following information for better support
What version of React Native are you running?
0.46.3
What version of react-native-twilio-programmable-voice are you running?
2.8.0
What device are you using? (e.g iOS9 simulator, Android 6 device)?
iPhone 6/ Samsung S8
Is your app running in foreground, background or not running?
foreground
Is there any relevant message in the log?
If using iOS, which pod version are you using?
1.3.1

@noamSoluto you are right!

iOS has 'to' and 'from' attributes in the connectionDidConnect event data instead of 'call_to' and 'call_from'
I can fix this
Android doesn't have the 'call_from' and 'call_to' in the connectionDidConnect event data
they seem to be missing for 1 of the 2 events
Android has a deviceDidReceiveIncoming event and iOS doesn't
because CallKit handles it without sending an event - as far as I know
iOS has a callRejected event and Android doesn't
because CallKit handles it without sending an event - as far as I know

For the first 2 point I will need to open a PR, if you want to try, please be my guest.

@noamSoluto
Errata corrige

Android has a deviceDidReceiveIncoming event and iOS doesn't

also iOS has the event deviceDidReceiveIncoming, I corrected the README

iOS has a callRejected event and Android doesn't

on Android there is a reject() API because the UI is provided by your app, whereas on iOS CallKit handles the UI and the reject button. In this sense the reject event notify your app when the CAllKit screen reject button is pressed.

@noamSoluto I have addressed your first two points in version 3.0.0

iOS has 'to' and 'from' attributes in the connectionDidConnect event data instead of 'call_to' and 'call_from'

Android doesn't have the 'call_from' and 'call_to' in the connectionDidConnect event data

@fabriziomoscon thanks for your help, I will try the latest version


ESLint Actum

Added actum/eslint-config-actum lint configuration for development stack.
Note: Current branch has a few linting errors due to our dev stack being not up-to-style of implemented lint. I have fixed those errors in config-new, so once they overlap, there will be no errors.

I’m unable to run gulp --dev, see attached screenshot. I’m on eslint-actum branch, removed node_modules and did fresh install.

I’ve updated eslint, it fixed the error. There was lot of changes need to do based on new eslint configuration. Also add new rule to avoid errors on Factory function pattern in Alertifier.


failed to vagrant up an aws instance with error Value () for parameter groupId is invalid.

any idea on how to solve this problem?
i try to launch instance using non-vpc mode. find document in
https://github.com/mitchellh/vagrant-aws
security_groups - An array of security groups for the instance. If this instance will be launched in VPC, this must be a list of security group Name. For a nondefault VPC, you must use security group IDs instead (http://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html).
so i set security id env variable like
export BOSH_LITE_SECURITY_GROUP=sg-abcd1234
but get the same error message saying that
InvalidParameterValue => Value () for parameter groupId is invalid. The value cannot be empty

solved by checking security group id that not working with target vpc

I met the same problem when I am running vagrant up --provider=aws
I have set environment for below:
BOSH_AWS_ACCESS_KEY_ID="affsfdfdfd"
BOSH_AWS_SECRET_ACCESS_KEY="sfsfdsdfsdfsfs"
BOSH_LITE_SECURITY_GROUP="sg-c63sdfsfsfsfs"
could you please tell more about "solved by checking security group id that not working with target vpc" ?

@StanleyShen i think he realized that aws_vpc needs to specify a  azs = "${var.availability_zone}"
it is a comma separated list of availability zones, when you are starting with terraform this is often a common pitfall. The caveat is to ensure that you set the AZ the same as the VPC AZ or at least within the set. Otherwise terraform api calls to the aws api will filter the id that you are passing and will ultimately end up being null ``()``` and obviously it is going to fail and will totally confuse you, like it did to me at first :blush:

actually also check the instance ami you are trying to run is for the region AZ you are trying to deploy

Check if your region is ok with your ami and key pair.


Source actions not found

Environment data

Pylance v2023.5.50
macOS 12.5 (21G72)
Python 3.10

Code Snippet
import sys

Repro Steps

Command + shift + P -> Source Action -> UI comment, no available source actions
Use lightbulb -> Quick Fix -> Remove unused import
Cmd Z
Command + shift + P -> Source Action -> See available source action of removing import.

https://github.com/microsoft/pylance-release/assets/66283272/80f02c44-b0bc-4321-a8ea-66996215ee7a
Expected behavior
Expect step 4. above at step 1.
When I roll back my pylance version to v2023.5.20 the expected behaviour occurs.

This issue has been fixed in prerelease version 2023.6.21, which we've just released. You can find the changelog here: CHANGELOG.md


DocsArchive-<IP_ADDRESS>Auto archive content

Auto archive content from https://github.com/OPS-E2E-PPE/docs-archive-test-source

Docs Build status updates of commit ce4e7e1:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error]

Cannot sync git repo to specified commit because branch Archive_master_2019-11-21-08-37-21 has been deleted or has been force pushed: fatal: couldn't find remote ref refs/heads/Archive_master_2019-11-21-08-37-21

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


feat: stardust shimmer network

Summary
Refactors network lib and adds shimmer networks. (this is a dependency for tasks related to setting shimmer profiles)
Type of Change
Please select any type below that is applicable to your changes, and delete those that are not.

[ ] Breaking - any change that would cause existing functionality to not work as expected
[ ] Chore - refactoring, build scripts or anything else that isn't user-facing
[ ] Docs - changes to the documentation
[ ] Fix - a change which fixes an issue
[x] New - a change which implements a new feature
[ ] Update - a change which updates existing functionality

Testing
Platforms
Please select any platforms where your changes have been tested.

Desktop

[ ] MacOS
[x] Linux
[ ] Windows

Mobile

[ ] iOS
[ ] Android

Instructions
Please describe the specific instructions, configurations, and/or test cases necessary to test and verify that your changes work as intended.
Checklist
Please tick all of the following boxes that are relevant to your changes, and delete those that are not.

[ ] I have followed the contribution guidelines for this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have added or modified tests that prove my changes work as intended
[ ] I have verified that new and existing unit tests pass locally with my changes
[ ] I have verified that my latest changes pass CI workflows for testing and linting
[ ] I have made corresponding changes to the documentation

We should add these to the network objects somewhere
"baseToken" : {
   "name": "IOTA",
   "tickerSymbol": "MIOTA",
   "unit": "i",
   "decimals": 0,
   "subunit": null,
   "useMetricPrefix": true
}

"baseToken" : {
   "name": "Shimmer",
   "tickerSymbol": "SMR",
   "unit": "SMR",
   "decimals": 6,
   "subunit": "glow",
   "useMetricPrefix": false
}


[e2e]: delegator-lowperms tag main default slsa3

Repo: https://github.com/slsa-framework/example-package/tree/v47.0.454
Run: https://github.com/slsa-framework/example-package/actions/runs/11279496781
Workflow file: https://github.com/slsa-framework/example-package/tree/main/.github/workflows/e2e.delegator-lowperms.tag.main.default.slsa3.yml
Workflow runs: https://github.com/slsa-framework/example-package/actions/workflows/e2e.delegator-lowperms.tag.main.default.slsa3.yml
Trigger: push
Branch: v47.0.454
Date: Thu Oct 10 18:07:11 UTC 2024

Repo: https://github.com/slsa-framework/example-package/tree/v47.0.455
Run: https://github.com/slsa-framework/example-package/actions/runs/11297127093
Workflow file: https://github.com/slsa-framework/example-package/tree/main/.github/workflows/e2e.delegator-lowperms.tag.main.default.slsa3.yml
Workflow runs: https://github.com/slsa-framework/example-package/actions/workflows/e2e.delegator-lowperms.tag.main.default.slsa3.yml
Trigger: push
Branch: v47.0.455
Date: Fri Oct 11 18:14:49 UTC 2024
Tests are passing now. Closing this issue.


replace dropdown with image buttons

This change is

Review status: 0 of 2 files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Error boxes appear on almost every entity I click on

Right after the update to <IP_ADDRESS> a error boxes started to appear on almost every entity I click on. Here is an example of clicking on a PlayerTriggerBox in SCI_Hub:

I have encountered this on other entity types like PositionMarker, PlatformConstantFloat, TriggerSequence, LogicDelay, ZoneLink, on some composites and way more. The bugged entity selection seems to be random on each level, because when I clicked on the environment composite of HAB_Airport it gave an error and when I did the same thing with SCI_Hub's environment entity the issue doesn't appear. Selecting entities from SCRIPT_STORYMISSION doesn't show any errors for some reason, but I'm not sure if this is 100% true, because I haven't tried it on all the levels' storymissions.
OpenCAGE version: <IP_ADDRESS> (Staging)

That sounds fun :D
Will have a look now.

Thanks for the report - I'm not able to replicate myself. Please could you give me some clearer reproduction steps, and perhaps also send the COMMANDS.PAK you're working with? Thanks!

Nevermind - managed to replicate!
I'll take a dig now :)

Fixed across staging and main :)


Extend DB Schema

Expand db Schema to contain:

SSL Keys associated with each deployed dmon-logstash instance #18, #70

add column to db_nodes that defines the LS instance it is assigned to
- if no instance is assigned assign the first one in DB
- if no instance found in DB return exception

add column to db_escore to fit additional data required for config generation (see dmon-elasticsearch json schema)

add to db_lscore a column to denote the storm/spark endpoint for rest api consumption

Still need to do:

if no instance is assigned assign the first one in DB - if no instance found in DB return exception

If no instance is assigned assign the first one in DB - if no instance found in DB return exception. DONE


Guys I can't build it

Im using make setup and got errors.
First it asked me for setuptools-39.1.0, i then added setuptools-39.1.0 to requirements.txt then theres more errors regarding averaged_perceptron_tagger' not found, then I installed it and more errors...
I tried changing the files in requirements.txt to: flask_script==2.0.3
, spacy==2.0.11
tensorflow==1.9.0
but i now get :
Failed to load nlu model. Maybe path /root/ai-chatbot-framework/model_files doesn't exist
Traceback (most recent call last):
File "manage.py", line 3, in
from app import app
File "/root/ai-chatbot-framework/app/init.py", line 33, in
from app.endpoint.controllers import endpoint
File "/root/ai-chatbot-framework/app/endpoint/controllers.py", line 224, in
update_model(app, "Models updated")
File "/root/ai-chatbot-framework/app/endpoint/controllers.py", line 212, in update_model
app.config["MODELS_DIR"], app.config["USE_WORD_VECTORS"])
File "/root/ai-chatbot-framework/app/nlu/classifiers/starspace_intent_classifier.py", line 588, in load
return EmbeddingIntentClassifier()
File "/root/ai-chatbot-framework/app/nlu/classifiers/starspace_intent_classifier.py", line 113, in init
self.nlp = spacy.load('en')
File "/root/ai-chatbot-framework/venv/local/lib/python2.7/site-packages/spacy/init.py", line 15, in load
return util.load_model(name, **overrides)
File "/root/ai-chatbot-framework/venv/local/lib/python2.7/site-packages/spacy/util.py", line 119, in load_model
raise IOError(Errors.E050.format(name=name))
IOError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.

Hey, same here. Any progress on that ?

You need to install spacy en model. read here

installed spacy en. stil shows errors.
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
WARNING in starspace_intent_classifier [/root/ai-chatbot-framework/app/nlu/classifiers/starspace_intent_classifier.py:587]:
Failed to load nlu model. Maybe path /root/ai-chatbot-framework/model_files doesn't exist

ok i see that it uses mongo db so I installed mongodb server and client(it wasnt listed on the main github requirements).
The results are now:
root@vps193677:~/ai-chatbot-framework# make run_dev
. venv/bin/activate && python run.py
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
WARNING in starspace_intent_classifier [/root/ai-chatbot-framework/app/nlu/classifiers/starspace_intent_classifier.py:587]:
Failed to load nlu model. Maybe path /root/ai-chatbot-framework/model_files doesn't exist

INFO in utils [/root/ai-chatbot-framework/app/endpoint/utils.py:25]:
loaded synonyms {}

INFO in controllers [/root/ai-chatbot-framework/app/endpoint/controllers.py:220]:
Intent Model updated

Running on http://<IP_ADDRESS>:8080/ (Press CTRL+C to quit)
Restarting with stat
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb

WARNING in starspace_intent_classifier [/root/ai-chatbot-framework/app/nlu/classifiers/starspace_intent_classifier.py:587]:
Failed to load nlu model. Maybe path /root/ai-chatbot-framework/model_files doesn't exist

INFO in utils [/root/ai-chatbot-framework/app/endpoint/utils.py:25]:
loaded synonyms {}

INFO in controllers [/root/ai-chatbot-framework/app/endpoint/controllers.py:220]:
Intent Model updated

Debugger is active!
Debugger PIN: xxx-xxx-xxx

It seems like you got it working. So, I'm closing the issue.


Add export policy wiki link to config and remove linkedin prepend from wiki links

Sets up config for wiki link for export policy added by PR https://github.com/linkedin/WhereHows/pull/1351
Removing the linkedin prepend from all the wiki links as these are items used in the UI for "more info" links and should be open source friendly, not LinkedIn specific.

Codecov Report

Merging #1352 into master will decrease coverage by 0.1%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1352      +/-   ##
==========================================
- Coverage   57.49%   57.38%   -0.11%
==========================================
  Files         182      182
  Lines        3785     3785
  Branches      838      838
==========================================
- Hits         2176     2172       -4
- Misses       1609     1613       +4

Impacted Files
Coverage Δ

wherehows-web/app/components/purge-policy.ts
81.48% <0%> (-14.82%)
:arrow_down:

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 05a1b6e...ff270d4. Read the comment docs.

Coverage remained the same at 23.241% when pulling ff270d4813c08619ae98e625053e701e1e7443ed on cptran777:add-export-wiki-link into 05a1b6eb0aefe543590cbb3a11d70ed0efb8ba36 on linkedin:master.


Parkinson flask route

Proposal
I would like to add flask route for Parkinson disease.

Ok @JanhaviSoni go ahead

@kritikaparmar-programmer @shubhigupta991 I have got some error . While running app.py in conda it says tensorflow.keras.models import load_model not found though keras and tensorflow both are installed

@JanhaviSoni Please create the PR by tomorrow.


Remove wildcard in requirements.txt

* is only valid for != or ==.
Reference https://discuss.python.org/t/how-to-pin-a-package-to-a-specific-major-version-or-lower/17077/8

@sunishsheth Feel free to merge this PR because I can't :)


Feature/authentication

Codecov Report

Merging #37 (4275ae8) into master (0eafc81) will decrease coverage by 15.35%.
The diff coverage is 48.14%.

@@              Coverage Diff              @@
##             master      #37       +/-   ##
=============================================
- Coverage     99.56%   84.21%   -15.36%
- Complexity      156      167       +11
=============================================
  Files            21       28        +7
  Lines           462      475       +13
=============================================
- Hits            460      400       -60
- Misses            2       75       +73

Impacted Files
Coverage Δ

src/Auth/AloiaCmsUserProvider.php
0.00% <0.00%> (ø)

src/Auth/User.php
0.00% <0.00%> (ø)

src/Validation/Rules/Unique.php
0.00% <0.00%> (ø)

src/Writer/FolderCreator.php
75.00% <50.00%> (-25.00%)
:arrow_down:

src/Models/Model.php
97.84% <96.29%> (-0.48%)
:arrow_down:

src/AloiaCmsServiceProvider.php
100.00% <100.00%> (ø)

src/Events/ModelRenameFailed.php
100.00% <100.00%> (ø)

src/Events/PostModelDeleted.php
100.00% <100.00%> (ø)

src/Events/PostModelRenamed.php
100.00% <100.00%> (ø)

src/Events/PostModelSaved.php
100.00% <100.00%> (ø)

... and 17 more

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more


Add log support

What does this PR do?

Add log support for both mesos_slave and mesos_master, the log format is the same.
Motivation

Additional Notes

Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] PR title must be written as a CHANGELOG entry (see why)
[ ] Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
[ ] PR must have changelog/ and integration/ labels attached

is it ok for the source value to not match the integration id?

I don't see why we couldn't. Plus we already do that in a few integration (like https://github.com/DataDog/integrations-core/blob/master/azure_active_directory/manifest.json#L32 or https://github.com/DataDog/integrations-core/blob/master/active_directory/manifest.json#L34), so I think we can do it.


Setup native code cmake project for box2d.

Codecov Report

Merging #12 (e4cbe9e) into main (10d898b) will increase coverage by 0.06%.
The diff coverage is 75.00%.

@@           Coverage Diff            @@
##            main     #12      +/-   ##
========================================
+ Coverage   0.00%   0.06%   +0.06%
========================================
  Files         65      66       +1
  Lines       9721    9674      -47
========================================
+ Hits           0       6       +6
+ Misses      9721    9668      -53

Impacted Files
Coverage Δ

src/isles/Game/Move.cs
75.00% <75.00%> (ø)

src/isles/Graphics/Model.cs
0.00% <0.00%> (ø)

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 10d898b...e4cbe9e. Read the comment docs.


Elastic Cloud Authentication

hi there, please help. how do I send a username and password? I've signed up for elasticsearch cloud. help will be appreciated.

Hi @louiscoetzee,
In the host configuration you pass the user name and password
ELASTICSEARCH_HOST=https://username:password@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.eu-central-1.aws.cloud.es.io:9243

i have @ in the password, how do I solve that ?


Add a third parameter to handle selected node

It is weird to always join the node as string (source)
It could be better to provide a third method to convert the node to string. Like this:
gulp.src(['./news/*.xml'])
    .pipe(xpath("/news-items/news/@attr",{"exsl":"http://exslt.org/common"},function(node){ return node.value; }))
    .pipe(concat('git_news.txt'))
    .pipe(gulp.dest('./news'));

Done!

Hi, @donum . Thanks for working on this.
I am sorry that, I have not clearly understand my requirement. With some hack, I find that, besides control on how individual node toString, it could be better to control how the nodes toString. It means, for the custom function, a single node is not enough.
From the code aspect, here is my proposal:
// around line 74
var func = customFunction || defaultFunc;
var output = func(result);
return output;

Then, the defaultFunc could be:
function defaultFunc(nodes) {
    return nodes.map(n => n.toString()).join('');
}

On the custom function, it can be doing JSON stringify and etc.

If you want to be backward compatible (with your current implementation), another options is to provide more parameters to the custom function (currentNode, currentIndex, fullNodeList), just same as the Array.prototype.map method.
BTW, the custom function is actually doing the map thing, map from a XML node to a string.
If you think it is OK, I can make a PR. :smile:

Hi @lijunle,
I think backward compatibility with 1.1.0 is not necessary, because the version is just one day old. I see your requirement.
I don't get the benefit from combining the two functions into one, because the function will be called on each node anyway. What do you do with a full nodelist multiple times?!
Please keep in mind that the separate nodelist function you're describing would be per file in stream. Is that really what you want?
Is there a better way to work with the parameters? Could an object as the second parameter that contains all options and all callbacks be an option like it is often the case in the JQuery world?
I am open to PR, but first I would like to discuss this.
Daniel

OK, let me describe my full scenario.
I have a csproj file (Visual Studio project file), it is just a normal XML file. I want to extract some information from it and generate a JSON file.
I am happy to get the node list with your great plugin, but then, I need to serialize the node list to a JSON object (JSON array). So, I need to prepend the { at first, append } at the end, skip , or the last element (something like this).
I am not do full node list multiple times, my hack just get the full time and handle them as a bundle once.

If the custom function is passed with the full node list. I can handle them as a bundle:
function customFunc(nodes) {
    return JSON.stringify(nodes.map(n => n.value)); // this will be ['a', 'b', 'c']
}

If the custom function is passed as the map function does, I can serialize it to JSON string with a little hack:
function customFunc(node, index, list) {
    var result = '';
    if (index == 0) result += '['; // hack the first character
    result += JSON.stringify(node.value);
    if (index != list.length - 1) result += ','; else result += ']'; // hack the end character
}

I think both are OK. Do you have any idea on it?

@donum Do you have any idea on this?

Hi,
I am currently traveling for two weeks and will change the script after that.
Sent from my mobile.

Am 24.06.2015 um 07:26 schrieb Junle Li<EMAIL_ADDRESS>@donum Do you have any idea on this?
—
Reply to this email directly or view it on GitHub.

Great! :smile:
Actually, I have send a PR #2 to resolve this.

@donum  do you have ideas on the PR?

@donum could you please take some time to look this the PR?


Starting multiple clients can bug out because of loading the same file

Fix is to just make them wait and load it one at a time

Already fixed in v1.1.1


Same Egress IP can be assigned to two Egress resources

Describe the bug

Same Egress IP can be assigned to two egress resources
To Reproduce

Apply following egress configuration
apiVersion: crd.antrea.io/v1beta1
kind: Egress
metadata:
  name: snat-testapp-ip
spec:
  appliedTo:
    podSelector:
      matchLabels:
        app: antrea-test-app  ###Select the Pods to which the SNAT Policy will be applied
  egressIP: <IP_ADDRESS>

apiVersion: crd.antrea.io/v1beta1
kind: Egress
metadata:
  name: snat-testapp-ip2
spec:
  appliedTo:
    podSelector:
      matchLabels:
        app: antrea-test-app  ###Select the Pods to which the SNAT Policy will be applied
  egressIP: <IP_ADDRESS>

Expected

Same ip should not be applied to both egress resources
Actual behavior

kubectl get egress
NAME               EGRESSIP     AGE     NODE
snat-testapp-ip    <IP_ADDRESS>   96d     nodes-worker
snat-testapp-ip2   <IP_ADDRESS>   6s      nodes-worker

Versions:

Additional context

Same Egress IP can be assigned to multiple egress resources. https://github.com/antrea-io/antrea/blob/d75cc536144624236c0c72074a3a7766486077ff/pkg/agent/controller/egress/egress_controller.go#L123

There is no issue with multiple Egress resources sharing the same IP. There is also no possible confusion IMO, as the behavior is what users would expect: the union of workloads selected by the various Egress resources will use the common Egress IP for all outgoing traffic.
The only issue comes when using Egress QoS, and that is already covered by the documentation:

If multiple Egresses use the same IP but configure different bandwidths, the effective bandwidth will be selected randomly from the set of configured bandwidths.


Update example monitoring_ping_hosts

Add more connectivity-oriented domains for the ping hosts in the monitoring config example:

Remove github and apple, make google HTTPS
Add speedtest
Add AWS and Akamai status hosts

Another domain which could be a candidate instead of google is connectivitycheck.gstatic.com. Haven't tried it but is't basically what it works for (in fact, if blocked in pihole the app store on certain android devices stops working)


Symbolization reorganization

What is this PR?
Symbolization
This PR suggests a "new" symbolize API:

symbolize(x, scheme::SymbolizationScheme) → Vector{Int}. This function dispatches on subtypes of SymbolizationScheme, and transforms each element in the input x to an integer based on the given scheme.

There are currently two schemes implemented.

[x] GaussianSymbolization.
[x] OrdinalPattern.
[ ] RectangularBinning should also be a symbolization scheme, because the coarse graining and integer-encoding bins is a form of symbolization too. This will shorten the "Visitation frequency" section of the documentation too, because the info about different types of binnings can be moves to "utilities".

OrdinalPatternreplaces SymbolicPermutation. The reason for this is that SymbolicPermutation is already an probability estimator (explicitly a subtype of ProbabilityEstimator) - it not a symbolization scheme. I argue that OrdinalPattern is a better descriptor of how the symbolization is actually done. The code for SymbolicPermutation has been updated accordingly.
Documentation changes
In anticipation for a potential future paper on this software, I'm keeping the docs, but simplifying the source code.
To see how the documentation changes look, the easiest thing to do is to build the docs locally. Changes are:

Deleted individual estimator pages.
Gathered all estimator docstrings in one "estimators" page (basically copying DynamicalSystems.jl)
Use CairoMakie instead of PyPlot for examples

The DynamicalSystems.jl docs use Makie since a long time now, maybe you want to copy the examples from there here.

Ok, @Datseris, I think I'm happy with this. If you like the approach, I'll refactor the binning too and merge.

symbolize(x, scheme::SymbolizationScheme) → Vector{Int}.

yes, but we also need a way for the user to get the mapping of integer -> symbol, or some way to know what the value "3" means.

OrdinalPatternreplaces SymbolicPermutation

Yes, for sure.

RectangularBinning should also be a symbolization scheme

Yes, although I am not sure if this is an intuitive way to look at it. I'd suggest to leave it as is at the moment, as it works fine; the non0hist function is very good as it is and perhaps trying to add a symbolize method doesn't give a direct benefit. At least, I don't see the direct benefit, because, while it's 100% true that this is also a symbolization form, I've never actually though of it that way and I'd doubt if there is any use to get the "symbols" of the binning. But feel free to correct me if I am wrong!
How much would the source code of the binning stuff and non0hist change if we go with it? Maybe we can do it later. After all, adding things to symbolize is non breaking, but removing them from it is breaking.

yes, but we also need a way for the user to get the mapping of integer -> symbol, or some way to know what the value "3" means.

OrdinalPattern deals with permutation (sorting) indices  1, 2, ... m for embedding dimension m. For, say, OrdinalPattern(m = 4, τ = 1), the integer 0 maps to the pattern 1, 2, 3, 4, while the integer 2 maps to 1, 2, 4, 3, ..., up to the maximum m! = 24 - 1 = 23 -> pattern 4, 3, 2, 1. It is possible to get these back if you know the embedding dimension m, but none of the methods actually use the reverse information for anything. Perhaps it enough to just explain the procedure a bit more step-by-step in the docs?
The docstring for GaussianSymbolization is clear enough, I guess.

How much would the source code of the binning stuff and non0hist change if we go with it? Maybe we can do it later. After all, adding things to symbolize is non breaking, but removing them from it is breaking.

It would require a bit of work. I'm happy with postponing it.

Great, so no change then in binning. For permutation, I still think it is useful to have a convenience function tthat given m::Int, s::Int returns the sth pattern for an m-long embedding.

Great, so no change then in binning

Good.

For permutation, I still think it is useful to have a convenience function tthat given m::Int, s::Int returns the sth pattern for an m-long embedding.

I'm on it.

For permutation, I still think it is useful to have a convenience function that given m::Int, s::Int returns the sth pattern for an m-long embedding.

I've been digging around in the literature for a straight-forward implementation of the inverse operation (getting the permutation from the encoded integer), but haven't found anything useful. It would be a fun exercise to figure out one myself, but given that this is extra functionality that is not critical to any of the methods, I'd rather spend time actually getting the library methods I'm working on in place.
Would you be ok with just having this as an open issue, @Datseris, so we can move forward with refactoring and revisit this later?

yes, sure, of course. But doesn't your encode_motif function know this somehow? But anyways, sure open an issue about it, it is not crucial at all at the moment.

yes, sure, of course. But doesn't your encode_motif function know this somehow? But anyways, sure open an issue about it, it is not crucial at all at the moment.

The information is there implicitly, but it is a matter of computing inverse Lehmer codes, which I haven't done before. Will look into it when I have time, though. I'm adding it as an issue and then merging this, since we seem to agree on the rest.


Unable to Read Spark Parquet Schema DECIMAL()

Library reads the schema def as below and the panics on conversion to schema elements
message spark_schema {
optional int32 event_date (DATE);
optional int96 datetime;
optional fixed_len_byte_array(9) id1 (DECIMAL);
optional fixed_len_byte_array(9) id2 (DECIMAL);
optional fixed_len_byte_array(9) id3 (DECIMAL);
optional binary name (UTF8);
}
panic: line 4: expected (, got ")" instead
Looks like its failing since the decimal precision and scale is not specified in the schema. Spark 2.4 produced this file and has no trouble reading it. I have also used other schema readers and it spits out (DECIMAL(20,0)) as the schema instead. I am not sure if this is some default if you fail to specify? Seems that it is valid not to specify?
I have also been having trouble writing decimal schema for spark to read as it seems to fail to recognize that the field is a decimal and instead interprets the type as just fixed length byte array. For the low level writer what is the correct way write a decimal into a byte array?
Everything else is working for me just cannot seem to read or write decimal types in regard to spark.
Thanks

This will be fixed in the next release. Same issue as #12.

@akrennmair will this also fix the issue with not being able to write decimals with this library? This fixes reading the schema from spark but if I write a file and try to read with spark it fails.

@bluestreek18 what's spark's specific error message? Do you have a way for me to reproduce this?

org.apache.spark.sql.AnalysisException: Illegal Parquet type: FIXED_LEN_BYTE_ARRAY;
If it set metadata to tell spark its a decimal type instead of FIXED_LEN_BYTE_ARRAY I get a new error message but still no luck. I was able to get it to work fine with with the other go parquet lib and I tried using their StrIntToByteArray function with no luck.
`package main
import (
"log"
"os"
goparquet "github.com/fraugster/parquet-go"
"github.com/fraugster/parquet-go/parquet"
"github.com/fraugster/parquet-go/parquetschema"

)
func main() {
f, err := os.OpenFile("output.parquet", os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
if err != nil {
log.Fatalf("Opening output file failed: %v", err)
}
defer f.Close()
schemaDef, err := parquetschema.ParseSchemaDefinition(
	`message spark_schema {
		required binary name (STRING);
		optional fixed_len_byte_array(9) id (DECIMAL(20,0));
		optional double score;
	}`)
if err != nil {
	log.Fatalf("Parsing schema definition failed: %v", err)
}

fw := goparquet.NewFileWriter(f,
	goparquet.WithCompressionCodec(parquet.CompressionCodec_SNAPPY),
	goparquet.WithSchemaDefinition(schemaDef),
	goparquet.WithCreator("write-lowlevel"),
)

inputData := []struct {
	Name  string
	ID    []byte
	Score float64
}{
	{Name: "jimmy", ID: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8}, Score: 284928.83},
	{Name: "jonny", ID: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8}, Score: 98},
	{Name: "jimmyjohns", ID: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8}, Score: 8232.82},
	{Name: "jimjonjonny", ID: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8}, Score: 1329.11},
	{Name: "j", ID: []byte{0, 1, 2, 3, 4, 5, 6, 7, 8}, Score: 4224.11},
}

for _, input := range inputData {
	if err := fw.AddData(map[string]interface{}{
		"name":  []byte(input.Name),
		"id":    input.ID,
		"score": input.Score,
	}); err != nil {
		log.Fatalf("Failed to add input %v to parquet file: %v", input, err)
	}
}

if err := fw.Close(); err != nil {
	log.Fatalf("Closing parquet file writer failed: %v", err)
}

}
`

@bluestreek18 thanks for the example! I tried to reproduce the issue with pyspark, and I got this:
>>> foo = spark.read.parquet("output.parquet")
>>> foo.createOrReplaceTempView("output")
>>> result = spark.sql("SELECT * FROM output")
>>> result.show()
+-----------+-----------------+---------+
|       name|               id|    score|
+-----------+-----------------+---------+
|      jimmy|72623859790382856|284928.83|
|      jonny|72623859790382856|     98.0|
| jimmyjohns|72623859790382856|  8232.82|
|jimjonjonny|72623859790382856|  1329.11|
|          j|72623859790382856|  4224.11|
+-----------+-----------------+---------+

>>>

To me that looks like nothing is obviously wrong. I experimented with just (DECIMAL) as converted type for the id column, either generating a default logical type or not generating a logical type at all, but this either produces parquet files that the Java implementation can't seem to parse, or they work equally well as the example above.

I'm still getting the same error using Spark 2.4.8 - which version of spark did you test with?

I was able to fix this by adding the code below after declaring filewriter. Seems like older implementations of parquet require the converted type to be set for decimal or it will only see the fields underlying type.
for _, v := range fw.Columns() { 		var ct parquet.ConvertedType = 5 		ele := v.Element() 		if ele.Name == "id" { 			log.Println("Setting id converted type to decimal") 			ele.ConvertedType = &ct 		} 	}

@akrennmair is it worth a pr that changes the schema to automatically set converted type for decimals at least for data page v1 which is more likely to require these settings that are deprecated from newer versions of parquet?


Force profile picture

I want to enforce uploading of profile pictures before user can do anything. After sign up, some users don't upload a picture and it makes the site look unserious.

Did you set Settings > Registration > Require photo to be uploaded:  to Yes?

The best you can do currently is:
On the Admin Panel -> General Settings -> Registration there is an option to say Yes / No for Require Members to upload a profile photo during sign up.
However - A user can still upload a cartoon pic, or any other image for that matter. I don't think there is a way to automate the process of forcing a user to upload a genuine face pic. You will have to approach all the users without a profile pic, or an image that is undesirable by your definition individually.
About limiting functionality of the software based on a profile pic - The system cannot do that, and like I said, a user can always change their profile

Hope @Nigrini  and @dimuller answers helped 🎉
An alternative answer could be found here https://github.com/pH7Software/pH7-Social-Dating-CMS/issues/307#issuecomment-423111435


fix: Fix a bug that caused a problem when saving an empty circuit.

fix: Fix a bug that caused a problem when saving an empty circuit. A subtask of issue #2.

Thank you so much for the feedback! I'll work on fixing it and will update the pull request.

Hi mohammedsafwat, any update on this PR. Thanks for working on this.

Hi mohammedsafwat, any update on this PR. Thanks for working on this.

It has been a while, I think we can safely close this PR.

@armudgal @satu0king Sorry for my late reply! I guess we can close this PR for now and in the future, I can create a new one for any new changes. Thank you so much!


release v0.7.1

add new scopes
update release.toml
bump deps
release twitch_oauth2 0.7.1

this needs to be a 0.8


Implement envtool shell read subcommand

What should be done?
It should read the given file and print its content to stdout.
Then use it instead of cat command in the Taskfiles.
Where?

https://github.com/FerretDB/FerretDB/blob/main/Taskfile.yml
https://github.com/FerretDB/FerretDB/tree/main/cmd/envtool

Definition of Done

envtool updated;
Taskfile.yml updated.

I'd like to try this.

@wqhhust 👍

@wqhhust thank you for contributing! So, the command works, and we merged the main PR. There is one more thing we didn't do - we didn't add tests for this new subcommand. Would you mind sending one more PR with some simple tests to check how this new subcommand works? The file with tests is cmd/envtool/envtool_test.go. A similar approach to the other tests in this file should be enough.

@rumyantseva Sure, I'd like to do it. Can we do it in this way： run the command "go run ./cmd/envtool shell read somefile > resultfile" and then compare whether somefile has the same content as resultfile. Or do you have better solution?


build_wheels_linux.yml: Add Python 3.10 release candidate 2

https://www.python.org/downloads/release/python-3100rc2
https://github.com/actions/python-versions/releases --> 3.10.0-rc.2

Like #497


Comment function not working for me

Hey there,
first of all thank you for your great pinterest php api. I used your comment example to comment on a pin, but nothing happens. Is this function buggy?
Thank you so far

Hi @newschooler
I've just checked and everything works to me. Need more info.

Hi @seregazhuk
Thank you for your quick reply.
That's the code I'm using:
`$bot = PinterestBot::create();
// Login
$bot->auth->login($account, $appSecret);

$pins = $bot->pins->search($search)->toArray();

foreach($pins as $pin) {

	// like pin
	$bot->pins->like($pin['id']);

	sleep(rand(5,10));

	if( $i % 2 == 0 && !$in_array_comments ) {// durch 2 teilbar
		$comment = $comments[array_rand($comments)];
		$bot->comments->create($pin['id'], $comment);
		sleep(rand(5,10));
	}

	$i++;
	if($i == 10) {
		break;
	}
}

// Follow User
$peopleToFollow = $bot->pins->search($search)->toArray();
foreach($peopleToFollow as $user) {
	$bot->pinners->follow($user['id']);

	sleep(rand(5,10));

	$j++;
	if( $j == 5 ) {
		break;
	}
}`

I have the same issue.

@ltiwana @newschooler fixed. Please update to version 5.6.7

Thank you very much for your help. I just updated an tried again but it didn't work.  Here is my code:
date_default_timezone_set('America/Toronto');
require __DIR__ . '/vendor/autoload.php';
use seregazhuk\PinterestBot\Factories\PinterestBot;
$bot = PinterestBot::create();
$pins = $bot->pins->search('cats', 100)->toArray();
foreach($pins as $pin) {
      $bot->comments->create($pin['id'], 'Nice');
}

@ltiwana yes, I've finally found the problem. It is with liking. Now fixed with version 5.6.8. But it looks like Pinterest has disabled like/dislike for pins? I cannot find it in the browser. Do you have any idea?

@seregazhuk nice! I will give it another try. Yes, pinterest has removed the like function as they are trying to differentiate from other social media platforms. I don't use that functionality. https://help.pinterest.com/en/feedback-about-removing-likes

I just tried again with new update 5.6.8 but still no luck. Interesting thing is that after every comment $bot->comments->create($pin['id'], 'Nice'); [comment_count]  increasing but when I go the pin on the browser I don't see any comments.

Maybe the issue is with the types? Try this:
var_dump($bot->comments->create('242209286193614751', 'So cute'));

Does it work for you? Very strange, when passing pinId as a number, it returns an error.

I will give this try soon.

by creating a new project my comment posting is working as well now.


Support Istio Ambient Mesh

This is a follow-up from https://github.com/knative-extensions/net-istio/issues/1103
We are interested in Kubeflow to adopt the new Ambient mesh profile of Istio https://github.com/kubeflow/manifests/issues/2676. Knative is one of the indirect dependencies (from KServe).
We'd like to understand the current status of support of Ambient mesh

Hi @kimwnasptd. Related discussion here.

As far as I recall, Kenjiro (who is no longer active in the project) started the work there: https://github.com/knative-extensions/net-istio/tree/main/third_party/istio-latest/istio-kind-ambient. But we had issues with flaky e2e-tests. I don't think so far somebody took the time to look into it and make sure we can officially support ambient mode. So this work would be up for grabs. Not sure when we'd have time for it, as our resources are quite limited nowadays.

what is the current status of this topic?


Fix cuDNN 6 compilation

The problem was changed API for CNN in cuDNN 6.

Tested on zisa with local cuDNN 6 and fatboy (both with USE_CUDNN on and off). @geovedi confirmed it works for him too.


无法使用

Microsoft PowerToys version
0.66.0
Installation method
Microsoft Store
Running as admin
None
Area(s) with issue?
PowerToys Run
Steps to reproduce
PowerToysReport_2023-01-12-00-41-42.zip
该功能无法实现，每次开机都会打开新增功能页面，而且每次打开，我之前的设置都会初始化。
✔ Expected Behavior
No response
❌ Actual Behavior
No response
Other Software
No response

Can you please upgrade to latest 0.73 and verify if the issue still occur?
/needinfo


DVR streams start at the beginning on slow networks

When the network is slow (use e.g. the network link conditioner with the 3G setting), DVR settings very often start at the beginning of the DVR window.
This is a regression introduced with the improved 2.5 position support.
Issue type
Incorrect behavior
Environment information

Library version: 2.5 and above
iOS version: Tested on iOS 12
Device: iPhone X

Reproducibility
Easily reproducible
Steps to reproduce

Enable the network link conditioner and use the 3G setting.
Open the SRG Media Player demo and play a DVR stream with an SRG Media Player based player.
Wait until the stream starts. The stream will likely start at the beginning, otherwise try again.
Do the same with the iOS standard player. Everything works correctly.

Ready for review on the feature/dvr-start-issue branch.

The problem is now properly understood and fixed.
With a slow connection, stream startup is slow. The player takes time loading the first chunk to be played, but already knows the chunk size because it could retrieve the playlist metadata. If the time to load the first chunk to be played is longer than a chunk, the window will be already offset by a chunk (in this example, 10 seconds):
(CMTimeRange) $20 = {
  start = 10000 1000ths of a second {
    value = 10000
    timescale = 1000
    flags = kCMTimeFlags_Valid
    epoch = 0
  }
  duration = 7150000 1000ths of a second {
    value = 7150000
    timescale = 1000
    flags = kCMTimeFlags_Valid
    epoch = 0
  }
}

From this time range, we were then incorrectly fixing the position to the time range, therefore to 10. This is not correct if we want a start position (kCMTimeZero) with no initial segment selected. By adding this exception and fixing the position only in other cases, the bug could be fixed.

Reviewed. Tested. Unit tests passed. Nice investigation.


Add new admin users to CryoCloud hubs

ref: https://2i2c.freshdesk.com/a/tickets/838

Self-merging as this is only adding admin users

Haha, thanks @GeorgianaElena !


Add several apps

This branch adds:

EasyEffects, a GTK4+libadwaita GUI audio effects manager for PipeWire
Headlines, a GTK4+libadwaita Reddit client
Telegrand, a GTK4+libadwaita Telegram client
PDF Slicer, a GTK3 PDF pages editor
GNOME Text Editor, a GTK4+libadwaita text editor by the author of GNOME Builder
Commit, a GTK4+libadwaita Git and Mercurial commit message editor

Thanks! I've actually been testing Telegrand already :)