Graph Improvement Ideas

I was playing around with the graph, and I had some ideas on new features to add to it. While it works great in its current state, it doesn't have some of the customizability and flexibility that is seen in other analysis tools such as the DS log viewer. I have a few ideas on new features/improvements:

Ability to "select" a viewing range
One useful feature would be able to easily select a viewing range by just dragging. It can be a bit annoying to zoom in and scroll through a massive log to see a variable over a 10 second window

I think dragging over this part should allow users to select a viewing range

Ability to change line thickness/color
I'm not sure whether or not this exists, but I couldn't find a way of changing the color of a specific variable. Whether or not it already exists, I think there could also be options for viewing it as a set of points instead of a line, different colors/line thicknesses, and maybe even a way of showing it as a bar graph instead of a line.

Ability to show discrete field points only when the value changes/when a boolean value is true
The primary use case of this is seeing when the robot is browned out/if we're connected. It was very useful in the DS log viewer and I would love to be able to use it in AdvantageScope.

I'd also like to add my support to this: I think being able to zoom on the line graph would be a very useful feature.

@cole-wilson To be clear, you can already zoom in on the line graph by hovering the cursor over the graph and scrolling (up/down to zoom and left/right to pan). I believe the suggestion is to allow you to jump to a range directly by dragging on the timeline, which would also be a useful enhancement.

Oh okay, thank you! I hadn't discovered that yet.


Update to nightly-2019-05-22

Moved all the git dependencies we kept in our private repos to SunriseOS/.
Alloc, alloc, alloc

Here's to hoping this broke nothing.


Migrate from .NET 6.0 to 7.0

.NET platform has a new major release. Now supporting .NET 7 is a major release that improves developer quality by improving fundamentals like performance, functionality, and usability.
Migration Article -> Migrate from ASP.NET Core 6.0 to 7.0

Related existing pull requests -> #227, #228, #230, #231


zoomPhotosToFill not display well on the MWPhotoBrowser (2.1.1)

    MWPhotoBrowser *photoBrowser = [[MWPhotoBrowser alloc]initWithDelegate:self];
    photoBrowser.displayActionButton = YES;
    photoBrowser.displayNavArrows = YES;
    photoBrowser.zoomPhotosToFill = YES;
    photoBrowser.enableSwipeToDismiss = YES;
    photoBrowser.hidesBottomBarWhenPushed = YES;
    [photoBrowser setCurrentPhotoIndex:index];
    [self.navigationController pushViewController:photoBrowser animated:NO];

but the photo was still zoom with some padding each side

same problem on iPhone 6 plus

(CGFloat)initialZoomScaleWithMinScale {
CGFloat zoomScale = self.minimumZoomScale;
if (_photoImageView && _photoBrowser.zoomPhotosToFill) {
// Zoom image to fill if the aspect ratios are fairly similar
CGSize boundsSize = self.bounds.size;
CGSize imageSize = _photoImageView.image.size;
CGFloat boundsAR = boundsSize.width / boundsSize.height;
CGFloat imageAR = imageSize.width / imageSize.height;
CGFloat xScale = boundsSize.width / imageSize.width;    // the scale needed to perfectly fit the image width-wise
CGFloat yScale = boundsSize.height / imageSize.height;  // the scale needed to perfectly fit the image height-wise
// Zooms standard portrait images on a 3.5in screen but not on a 4in screen.
if (ABS(boundsAR - imageAR) < 0.17) {
zoomScale = MAX(xScale, yScale);
// Ensure we don't zoom in or out too far, just in case
zoomScale = MIN(MAX(self.minimumZoomScale, zoomScale), self.maximumZoomScale);
}
zoomScale =  MIN(xScale, yScale);
}
return zoomScale;
}

I find the zoomScale was not right on lansacpe picture

@billxie1988   same problem on iPhone 6 plus  Could you tell me how to solve？

if (ABS(boundsAR - imageAR) < 0.17) {
            zoomScale = MAX(xScale, yScale);
            // Ensure we don't zoom in or out too far, just in case
            zoomScale = MIN(MAX(self.minimumZoomScale, zoomScale), self.maximumZoomScale);
        }
      **  zoomScale =  MIN(xScale, yScale);// when the pic is (300 191.5) the zoom shoud be 1.25 screen size is (375 ,667)**

@billxie1988 @Cubaker @RunningYoung
I have the same issue due to the fact on scale is done 4inch screen and more
I find the following fixe which seems work on all iPhone screen size (iPhone 5, 6 & 6 Plus), send feedback if it's also OK in your case
All modification are in file "MWZoomingScrollView.m"
in Method "initialZoomScaleWithMinScale" add the following lines
// Zooms standard portrait images on a 3.5in screen but not on a 4in screen.
        if (ABS(boundsAR - imageAR) < 0.17) {
            zoomScale = MAX(xScale, yScale);
            // Ensure we don't zoom in or out too far, just in case
            zoomScale = MIN(MAX(self.minimumZoomScale, zoomScale), self.maximumZoomScale);
        }
        else // Screen size > 3.5in : Adapt according device orientation
        {
            if(UIInterfaceOrientationIsPortrait([UIApplication sharedApplication].statusBarOrientation))
            {
                zoomScale = xScale; // scale to fit on screen width only in portrait mode
            }
            else
            {
                zoomScale = yScale; // scale to fit on screen height only in landscape mode
            }
        }

And then you must adapt method "setMaxMinZoomScalesForCurrentBounds" which compute 'contentOffSet' and in this case it's crappy but fix by the following lines :
CGFloat boundsAR = boundsSize.width / boundsSize.height;
CGFloat imageAR = imageSize.width / imageSize.height;
// If we're zooming to fill then centralise
if (self.zoomScale != minScale &&  (ABS(boundsAR - imageAR) < 0.17)) {
    // Centralise
    self.contentOffset = CGPointMake((imageSize.width * self.zoomScale - boundsSize.width) / 2.0,
                                     (imageSize.height * self.zoomScale - boundsSize.height) / 2.0);
    // Disable scrolling initially until the first pinch to fix issues with swiping on an initally zoomed in photo
    self.scrollEnabled = NO;
}
else if ( (ABS(boundsAR - imageAR) > 0.17) ) // Screen size > 3.5in : Adapt according device orientation
{
    if(UIInterfaceOrientationIsPortrait([UIApplication sharedApplication].statusBarOrientation))
    {
        // Centralise
        self.contentOffset = CGPointMake((imageSize.width * self.zoomScale - boundsSize.width) / 2.0,
                                         0.0);
    }
    else
    {
        // Centralise
        self.contentOffset = CGPointMake(0.0,
                                         (imageSize.height * self.zoomScale - boundsSize.height) / 2.0);
    }

    // Disable scrolling initially until the first pinch to fix issues with swiping on an initally zoomed in photo
    self.scrollEnabled = NO;
}

same problem on iPhone 6 plus and 5s.

Try this by RunningYoung
// Image is smaller than screen so no zooming!
//  if (xScale >= 1 && yScale >= 1) {
//      minScale = 1.0;
//  }

It‘s great. It's works, I think this should be merged by author! @yanndupuy @billxie1988

This solution not working for video thumbnail. Anyone else facing this issue


Weights updates in custom layers randomly change for constant inputs

Hello
I'm trying to test a custom normalization layer (for Single Shot Detector implementation) but in my tests I'm seeing that after calling model.train_on_batch(x, y) about 1/4th the time I get expected results, but 3/4th of the time I get different values. Maybe someone can point out why is that.
Here's the layer definition:
class Normalize(keras.layers.Layer):

    def __init__(self, scale, **kwargs):

        self.channel_axis = 3
        self.scale = scale
        super(Normalize, self).__init__(**kwargs)

    def build(self, input_shape):

        self.input_spec = [keras.engine.topology.InputSpec(shape=input_shape)]

        # Create scaling gammas, one for each channel
        self.gamma = self.add_weight(
            name='{}_gamma'.format(self.name),
            shape=(input_shape[self.channel_axis],),
            initializer=keras.initializers.Constant(self.scale),
            trainable=True)

        super(Normalize, self).build(input_shape)

    def call(self, x, mask=None):

        # Normalize along channel axis
        output = keras.backend.l2_normalize(x, self.channel_axis)

        # Scale by gamma and return
        return output * self.gamma

And here is my test:
def test_normalize_training_input_has_channels_only():

    keras.backend.clear_session()

    def get_model():

        input = keras.layers.Input(shape=(1, 1, 2))

        x = face.layers.Normalize(scale=1, name='normalization_layer')(input)
        x = keras.layers.Flatten()(x)

        initializer = keras.initializers.Constant(1)
        x = keras.layers.Dense(units=1, kernel_initializer=initializer, name='dense_layer')(x)

        model = keras.models.Model(inputs=input, outputs=x)

        optimizer = keras.optimizers.SGD(lr=1)
        model.compile(optimizer=optimizer, loss='mse')

        return model

    model = get_model()

    # Test initial values of normalization layer scales and dense layer weights
    # are as expected
    normalization_layer = model.layers[1]

    expected_initial_normalization_scales = np.array([1, 1])
    actual_initial_normalization_scales = keras.backend.eval(normalization_layer.scales)

    assert np.all(expected_initial_normalization_scales == actual_initial_normalization_scales)

    dense_layer = model.layers[3]
    expected_initial_weights = np.array([1, 1]).reshape(2, 1)
    actual_initial_weights = keras.backend.eval(dense_layer.kernel)

    assert np.all(expected_initial_weights == actual_initial_weights)

    x = np.array([2, 4]).reshape(1, 1, 1, 2)
    y = np.array([10])

    expected_initial_bias = np.array([0])
    actual_initial_bias = keras.backend.eval(dense_layer.bias)

    assert np.all(expected_initial_bias == actual_initial_bias)

    expected_prediction = np.array(6 / np.sqrt(20))
    actual_prediction = model.predict(x)

    assert np.allclose(expected_prediction, actual_prediction)

    expected_loss = np.array(np.power([10 - (6 / np.sqrt(20))], 2))
    actual_loss = model.train_on_batch(x, y)

    assert np.allclose(expected_loss, actual_loss)

    expected_weights = np.array([8.7442, 16.4885]).reshape(2, 1)
    actual_weights = keras.backend.eval(dense_layer.kernel)

    assert np.allclose(expected_weights, actual_weights, atol=0.01)

    expected_bias = np.array([17.3168])
    actual_bias = keras.backend.eval(dense_layer.bias)

    assert np.allclose(expected_bias, actual_bias)

    expected_scales = np.array([8.7442, 16.4885])
    actual_scales = keras.backend.eval(normalization_layer.scales)

    assert np.allclose(expected_scales, actual_scales, atol=0.01)

For comparison here's the same code implemented in pure Tensorflow, along with a test that always passes:
input = tf.placeholder(dtype=tf.float32, shape=[1, 2])

normalized = tf.nn.l2_normalize(input, dim=-1)
scales = tf.Variable(np.array([1.0, 1.0]).reshape(1, 2), dtype=tf.float32)

scaled_normalized_output = scales * normalized

weights = tf.Variable(np.array([1, 1]).reshape(2, 1), dtype=tf.float32)
output = tf.matmul(scaled_normalized_output, weights)

true_output = tf.placeholder(dtype=tf.float32, shape=[1])
loss = tf.square(true_output - output)

train_op = tf.train.GradientDescentOptimizer(learning_rate=1.0).minimize(loss)

x = np.array([2, 4]).reshape(1, 2)
y = np.array([10])

with tf.Session() as session:

    session.run(tf.global_variables_initializer())

    feed_dictionary = {input: x}

    expected_scaled_normalized_output = np.array([2 / np.sqrt(20), 4 / np.sqrt(20)]).reshape(1, 2)
    actual_scaled_normalized_output = session.run(scaled_normalized_output, feed_dictionary)
    assert np.allclose(expected_scaled_normalized_output, actual_scaled_normalized_output)

    expected_output = np.array([6 / np.sqrt(20)]).reshape(1, 1)
    actual_output = session.run(output, feed_dictionary)
    assert np.isclose(expected_output, actual_output)

    feed_dictionary = {input: x, true_output: y}

    expected_loss = np.array(np.square(10 - (6 / np.sqrt(20))))
    actual_loss = session.run(loss, feed_dictionary)
    assert np.allclose(expected_loss, actual_loss, atol=0.001)

    _, actual_weights, actual_scales = session.run([train_op, weights, scales], feed_dictionary)

    expected_weights = np.array([8.744, 16.4888]).reshape(2, 1)
    assert np.allclose(expected_weights, actual_weights, atol=0.001)

    expected_scales = np.array([8.744, 16.4888]).reshape(1, 2)
    assert np.allclose(expected_scales, actual_scales, atol=0.001)

For comparison here's the same logic implemented in pure Tensorflow, along with a test that always passes:
input = tf.placeholder(dtype=tf.float32, shape=[1, 2])

normalized = tf.nn.l2_normalize(input, dim=-1)
scales = tf.Variable(np.array([1.0, 1.0]).reshape(1, 2), dtype=tf.float32)

scaled_normalized_output = scales * normalized

weights = tf.Variable(np.array([1, 1]).reshape(2, 1), dtype=tf.float32)
output = tf.matmul(scaled_normalized_output, weights)

true_output = tf.placeholder(dtype=tf.float32, shape=[1])
loss = tf.square(true_output - output)

train_op = tf.train.GradientDescentOptimizer(learning_rate=1.0).minimize(loss)

x = np.array([2, 4]).reshape(1, 2)
y = np.array([10])

with tf.Session() as session:

    session.run(tf.global_variables_initializer())

    feed_dictionary = {input: x}

    expected_scaled_normalized_output = np.array([2 / np.sqrt(20), 4 / np.sqrt(20)]).reshape(1, 2)
    actual_scaled_normalized_output = session.run(scaled_normalized_output, feed_dictionary)
    assert np.allclose(expected_scaled_normalized_output, actual_scaled_normalized_output)

    expected_output = np.array([6 / np.sqrt(20)]).reshape(1, 1)
    actual_output = session.run(output, feed_dictionary)
    assert np.isclose(expected_output, actual_output)

    feed_dictionary = {input: x, true_output: y}

    expected_loss = np.array(np.square(10 - (6 / np.sqrt(20))))
    actual_loss = session.run(loss, feed_dictionary)
    assert np.allclose(expected_loss, actual_loss, atol=0.001)

    _, actual_weights, actual_scales = session.run([train_op, weights, scales], feed_dictionary)

    expected_weights = np.array([8.744, 16.4888]).reshape(2, 1)
    assert np.allclose(expected_weights, actual_weights, atol=0.001)

    expected_scales = np.array([8.744, 16.4888]).reshape(1, 2)
    assert np.allclose(expected_scales, actual_scales, atol=0.001)

There is a bug in the code that's on Keras side and I provided tests to prove that.

Sorry, but the value of self.channel_axis should be 2 (instead 3), shouldn't?
output = keras.backend.l2_normalize(x, self.channel_axis)

@fabriciorsf Why? First axis (index 0) is for batch, second (index 1) for y-dimension, third (index 2) for x-dimension and fourth (index 3) for channel.

Sorry, for a moment I forgot the first axis is for batch.
Do you know if is it valid to metric functions inputs too?

Not sure what do you mean by "metric functions inputs" or how does that relate to this issue.

Something to do with that stack overflow question maybe ?
https://stackoverflow.com/questions/41064802/l2-normalised-output-with-keras
TL;DR tensorflow has an optional argument "epsilon". "If the output of the net contains numbers lower than epsilon (which is set to 1e-12 by default) then it is not normalized correctly"

@rdelassus As you can see in tests, net outputs values between 0.1 and 10 at its different stages.


Getting design documents fails when couchbase is running on docker

Hello,
Running the BucketManager.getDesignDocuments() fails with an InvocationTargetException
The message is java.lang.RuntimeException: java.net.ConnectException: Connection refused: localhost/<IP_ADDRESS>:8091
It seems that the client is still trying to connect to port 8091 somewhere...
I've tried with client versions 2.2.8 and 2.3.6
Here's a JUnit test demonstrating the problem:
package com.couchbase;

import com.couchbase.client.java.Bucket;
import com.couchbase.client.java.CouchbaseCluster;
import com.couchbase.client.java.view.DesignDocument;
import org.junit.Assert;
import org.junit.ClassRule;
import org.junit.Test;

import java.util.List;

public class CouchbaseDesignDocumentsTest {

    @ClassRule
    public static CouchbaseContainer couchbase = new CouchbaseContainer()
        .withBeerSample(true)
        .withFTS(true)
        .withIndex(true)
        .withQuery(true)
        .withKeyValue(true)
        .withClusterUsername("Administrator")
        .withClusterPassword("password");

    @Test
    public void testDesignDocuments() throws Exception {
        CouchbaseCluster cc = couchbase.geCouchbaseCluster();
        Bucket bucket = cc.openBucket("beer-sample");
        List<DesignDocument> designDocuments = bucket.bucketManager().getDesignDocuments();
        Assert.assertNotNull(designDocuments);
    }
}

I don't have issue on the spring data version I worked on today https://github.com/ldoguin/testcontainers-spring-data-couchbase
I'll give it a shot tomorrow.
Out of curiosity have you tried with bucket.bucketManager("Administrator","password") ?

Version 2.3.6 doesn' seem to have that method...

Version 2.3.6 doesn't seem to have that method...
I mixed up things with couchbaseCluster.clusterManager(clusterUser, clusterPassword), sorry.
I also experienced timeout with Spring Data and I am looking into this.

I am having the same problem with the client version 2.7.22. The container is starting with a random port and I am dynamically updating couchbase properties but getting this problem. Here is the test which I am running and getting the "Connection refused: localhost/<IP_ADDRESS>:8091" error.
@Testcontainers
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
@ActiveProfiles(value = "component", resolver = SystemPropertyActiveProfileResolver.class)
class TestContainersDemoTest {
static private final String           couchbaseBucketName        = "XXX";
static private final String           username                   = "XXX";
static private final String           password                   = "YYY";
private static final BucketDefinition bucketDefinition           = new BucketDefinition(couchbaseBucketName);
private static final DockerImageName  COUCHBASE_IMAGE_ENTERPRISE = DockerImageName.parse("couchbase:enterprise")
.asCompatibleSubstituteFor("couchbase/server")
.withTag("6.0.1");
@Container final static CouchbaseContainer couchbaseContainer = new CouchbaseContainer(COUCHBASE_IMAGE_ENTERPRISE)
    .withCredentials(username, password)
    .withBucket(bucketDefinition)
    .withExposedPorts(8091, 11210)
    .withStartupTimeout(Duration.ofSeconds(60));

@DynamicPropertySource
static void bindCouchbaseProperties(DynamicPropertyRegistry registry) {
    registry.add("couchbase.cluster1", couchbaseContainer::getContainerIpAddress);
    registry.add("couchbase.bucket.usersession.name", couchbaseContainer::getUsername);
    registry.add("couchbase.bucket.usersession.password", couchbaseContainer::getPassword);
    registry.add("couchbase.bucket.configuration.name", couchbaseContainer::getUsername);
    registry.add("couchbase.bucket.configuration.password", couchbaseContainer::getPassword);
    registry.add("couchbase.bucket.bucketOpenTimeout", () -> 250000);
    registry.add("couchbase.bucket.operationTimeout", () -> 600000);
    registry.add("couchbase.bucket.observableTimeoutMilliSeconds", () -> 650000);
    registry.add("couchbase.bucket.ioPoolSize", () -> 3);
    registry.add("couchbase.bucket.computationPoolSize", () -> 3);
}

@Test
void contextLoads() {
}

}


Two ideas for improving the program

Hello!
I have two suggestions that could improve the program.
First:
I suggest replacing
                match current_buff['taskId']:
                    case 2:
                        # Full Energy!
                        max_full_energy_times: int = current_buff['task']['max']
                        if current_buff['task']['status'] == 'active':
                                full_energy_times_count += 1

                    case 3:
                        max_turbo_times: int = current_buff['task']['max']

                        if current_buff['task']['status'] == 'active':
                            turbo_times_count += 1

to
                #match current_buff['taskId']:                                                    #change 1
                    if current_buff['taskId'] == 2:                                                 #change 2
                        # Full Energy!
                        max_full_energy_times: int = current_buff['task']['max']
                        if current_buff['task']['status'] == 'active':
                                full_energy_times_count += 1

                    elif current_buff['taskId'] == 3:                                               #change 3
                        max_turbo_times: int = current_buff['task']['max']

                        if current_buff['task']['status'] == 'active':
                            turbo_times_count += 1

so that the program works on all versions of Python, and not just on new ones.
Second:
Commands for this bot work in all dialogs, not just in the Favorite dialog.
Maybe there is an opportunity to allow users to create a bot in telegram, insert its Token into the program, and then communicate with your program through a dialogue with the created bot?
Thank you very much for the work done!

Hey there! Thanks a lot for opening an issue on GitHub and suggesting an update! I really appreciate it.
I wanted to let you know that the second suggestion is almost complete and I'll be releasing the new version soon


[vcpkg docs] Add the procedure for updating vcpkg to faq

Fixes https://github.com/microsoft/vcpkg/issues/15417
I thinks it's fine to add the information to faq.

@autoantwort @dg0yt, Very appreciate for your review!

depends on #17277

Thanks for your contribution!


Add HTTP01-Challenge routes to the ingress

Changes

:bug: Fix Certificate renewal
Most of the changes in this PR are related to dependencies. I've changed the following:

pkg/reconciler/certificate/certificate.go
pkg/reconciler/certificate/controller.go

I've added Knative serving to access the MakeACMEIngressPaths function. We could also copy-paste and adapt the relevant code if we want to avoid this dependency

/kind bug

Fixes #416

Release Note

fix certificate renewal

Hello @nak3
This is another patch for Certificate renewal.
This is will reconfigure the ingress to add http01 challenge routes and remove them when the certificate will be renewed.
If you are happy with this, I can add some unit tests

/assign @nak3 @dprotaso

Any update on the patch? It will be great to have this merged. A Let'scrypt certificate is valid only for 90 days. Every time it become expired, we have to remove service and reinstall it to get it to work.
This introduces downtime to all published knative services using let's crypt certificate.

Quick scan - we don't want net-certmanager to be programming the Ingress and pulling in these dependencies.
There already exists a mechanism to pass the challenge details via the Certificates Status.HTTP01Challenges and the Serving Route controller will add the ACME Paths to the Ingress.
It just seems the Route controller doesn't handle a cert renewal case when the Cert is already ready.
https://github.com/knative/serving/blob/a4fcb9dcf510f274dcb13e92d39595047e0b8e0a/pkg/reconciler/route/route.go#L242-L246
Let's regroup on the issue #416

/hold

Going to close this out - as we'll handle the renewing logic in the route controller - there's a WIP here: https://github.com/knative/serving/pull/13666


Rows reflow patch

I'm pretty sure you know there's output loss in st when its height is reduced and increased back again. I can see that your build doesn't have that issue. Could you please point me to a patch that does that.

https://github.com/siduck/st/issues/28


ConnectionError: The server blocked access.

I wonder if this issue is coming from the library or opensea itself?
I scanned through discord and saw a comment of this error a couple months ago with some similarity, pasted below.
"does the api require a key? on the docs it says you dont but when i try to use the opensea python api wrapper i get
ConnectionError: The server blocked access."

Indeed, my mistake. Thanks anyways!


fix(modification): hotfix for isValid method crash on modifications w…

…ithout segments.
I just deployed this to prod so I could continue with client work, but it should be reviewed and merged to the dev branch.

Current coverage is 54.53% (diff: 100%)

Merging #240 into dev will increase coverage by 0.01%

@@                dev       #240   diff @@
==========================================
  Files           180        180
  Lines          3802       3803     +1
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits           2073       2074     +1
  Misses         1729       1729
  Partials          0          0

Powered by Codecov. Last update bed301d...90836f1


Dynamic remote page size based on requested loadSize

This prevents remote APPEND from immediately triggering multiple times
to fulfill the prefetchDistance + initialLoadSize. Github has a max page
size of 100, so pageSize was reduced to accomodate this limit to avoid
confusion for those tracking the number of remote loads.
See: b/183335970

Also seems similar to: https://github.com/googlecodelabs/android-paging/pull/138
Although that PR is out of date now and needs a rebase.

@dlam I'll break this up into 2 PRs and tag you on those while I close this. I want to cherry pick:
A commit for private const val NETWORK_PAGE_SIZE = 30 to all requisite branches
Another commit for dynamic page size


Dear teachers who have seen this message, may I ask why the command "conda install pytorch3d - c pytorch3d - y # 0.7.2 recommended" in the Python library provided by the author always fails to find the download package in the channel on the Windows terminal? Is there any way to solve this problem?

Hi, we have released the code of GeneFace++ (https://github.com/yerfor/GeneFacePlusPlus). We recommend you turn to this upgraded version for better performance. In the GeneFace++ could, we change the way to install pytorch3d with pip install


Prepare for v1.4.0 release

Release with background audio recording support in preparation for ODK Collect release.

[x] Make sure the version of ODK Validate in the repo is up-to-date
[x] Run all tests through Validate

I fixed a few tests that were easy to address; there are a few that still fail but no new ones

[x] Draft a new GitHub release with the list of merged PRs.
[x] Checkout a release branch from latest upstream master.
[x] Update CHANGES.txt with the text of the draft release.
[x] Update README.rst, setup.py, pyxform/init.py with the new release version number.

Codecov Report

Merging #520 (1abc8e5) into master (6886234) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #520   +/-   ##
=======================================
  Coverage   83.92%   83.92%
=======================================
  Files          25       25
  Lines        3713     3713
  Branches      865      865
=======================================
  Hits         3116     3116
  Misses        452      452
  Partials      145      145

Impacted Files
Coverage Δ

pyxform/__init__.py
100.00% <100.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 6886234...1abc8e5. Read the comment docs.

@lognaturel Can you please file an issue with the tests that fail, or comment them out? It's fine that we are ignoring them, but we should document it.


RTSP streams sometimes don't work on localhost

From our manual testing of the current master (2b1dc02dd4152af3597550f916b89cf24871e1cb):

RTSP streams sometimes don't connect from VLC, GStreamer, or QGC on x86_64 / GStreamer 1.24.0 / localhost

note: It might not be only localhost

Fixed by #426 and #427.


WIP: Remove duplicate count decrement.

LGTM :+1:

Tested this out and all 3 demos now flag "DS: Cannot delete semaphore  which is in use."
Switching to :-1: until errors are fixed.

Yea I found that. It's more complicated than this so I labeled it WIP. Will remove if I think I have something but it might take a bit.

Michael is right -- this is the correct thing to do but only part of it, and it'll be part of MR301 when I get it reworked.  Most of the problems fixed at this point (the right way) except for one cross-queue case.

See pull request #309.


Error running on alpine docker image

When trying to use zstd-jni in a docker container build from openjdk:alpine, I get this error:
Caused by: java.lang.UnsatisfiedLinkError: /tmp/libzstd3471839276809832200.so: Error relocating /tmp/libzstd3471839276809832200.so: __fprintf_chk: symbol not found
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
        at java.lang.Runtime.load0(Runtime.java:809)
        at java.lang.System.load(System.java:1086)
        at com.github.luben.zstd.util.Native.load(Native.java:78)
        at com.github.luben.zstd.ZstdInputStream.<clinit>(ZstdInputStream.java:22)

Problem seems to be that the libzstd.so bundled in the jar links to glibc. Adding one built with musl would allow it to work in a musl environment.

To build such a lib:
$ docker run -v $(pwd):/out -it alpine sh
# apk update
# apk add build-base git
# git clone https://github.com/facebook/zstd
# cd zstd && make
# cp lib/libzstd.so /out/libzstd-musl.so
# exit
$ ldd libzstd-musl.so
	linux-vdso.so.1 (0x00007fff82986000)
	libc.musl-x86_64.so.1 => not found

(The not found is because the host doesn't have a musl library)

try to rebuild the zstd-jni jar in your target environment, it should link to the available libc.

Oh, I hoped I could get a complete solution working both in the container and on the host. The application itself has zstd-jni has part of its maven dependencies. I suppose I could re-build zstd-jni and upload it to a private repository, but it still wouldn't work on both environments.

Yes, but how do you decide which .so to extract and link at runtime?

What about as a fallback to try to load the libzstd-jni from the system libraries path and you provide the libzstd-jni.so in the image's /usr/lib, compiled for your OS?

That could work for me, though it does mean deploying applications to alpine-based containers aren't as straightforward if they depend on zstd-jni. :-/

It will be another library, for example /usr/lib/libzstd-jni.so that will be produced by building this package. The artifact will be in target/classes/linux/amd64/ . As part of your container image you will copy it /usr/lib

Ah right, I forgot the bundled libzstd.so included JNI methods as well.

Hi, the new version (1.2.0-1) is now on Maven. Can you try it?
Regarding building the library without sbt I am using:
gcc -shared -fPIC -O3 -DZSTD_LEGACY_SUPPORT=4 -I/usr/include -I/usr/local/jdk/jre/../include -I/usr/local/jdk/jre/../include/linux -I./native -I./native/common -I./native/legacy -std=c99 -o libzstd-jni.so native/*.c native/legacy/*.c native/common/*.c native/compress/*.c native/decompress/*.c native/dictBuilder/*.c

but you should adjust the path to your JDK headers to match your system, you actually need only jni.h and jni_md.h

@gyscos , any issues with it? Does it help your use case?

I'm not sure what happened, but with the lastest openjdk:alpine and zstd-jni 1.2.0-2, I don't even need to copy the custom libzstd-jni anymore, the bundled one seems to be working...

I compiled it on host with older glibc. Happy that it helps.

I suppose the musl used in the alpine image isn't compatible yet with the latest glibc.
Anyway, thanks for the help!

Thanks for coming back. I will keep compiling the future releases with relatively old libc (from ubuntu trusty I guess)


router check tool: add an option to write test results to a file.


Type of API to use

Hi @yjmantilla
Another important issue that I raised before is the type of API we're going to provide (python, CLI, REST, etc.). Ideally, we should go to something more robust like a python API (with named parameters, data types, etc.), but on the other hand, I wouldn't like to limit the GUIs to python-based ones.
@stebo85 @aswinnarayanan @civier @DavidjWhite33 @TomEmotion Do you have any suggestions for a robust API type that is not limited to a specific programming language? Maybe something that uses XML, YAML, etc. for specifying the parameters, and has implementations for a wide-range of programming languages? It's really not my expertise, so I'm calling for help.
@yjmantilla I would also consult with the Brainlife/Easybidz on what type of API they would like to see? Similarly, I will consult with Marcel from BIDScoin about something that he might like to adopt for his project as well at one point or another.
Best,
Oren

@civier

Another important issue that I raised before is the type of API we're going to provide (python, CLI, REST, etc.). Ideally, we should go to something more robust like a python API (with named parameters, data types, etc.), but on the other hand, I wouldn't like to limit the GUIs to python-based ones.

Thats a good point.
As of now the CLI kind of serves as a way for an end-user to use sovabids in a stand-alone way. So I haven't really though of he CLI being the main API which is the python one.
I don't know much REST API's but from what I read when researching bids-toolbox (see #2 ) it is my understanding that one can do a REST API using python, thus it is actually the same as the python API (? I'm not sure).
If anybody knows about this , the clarification would be appreciated.

I would also consult with the Brainlife/Easybidz on what type of API they would like to see?

Yeap, that was what I kind of  wanted to do from the beginning with them. They were really busy though so they couldn't at that time say how such API should be. I think it may be possible to schedule a meeting with them showing our current API and take suggestions from them.

I would also consult with the Brainlife/Easybidz on what type of API they would like to see? Similarly, I will consult with Marcel from BIDScoin about something that he might like to adopt for his project as well at one point or another.

What Marcel has is pretty well-formed by now. Through the plugin abstraction we are able to interface with bidscoin. Here is comparison of the bidscoin-plugin-api to our api:

bidscoin
sovabids

is_sourcefile(file: Path) -> str
equivalent to filtering by extension, we don’t have an api explicetly for   this though

get_attribute(dataformat:   str, sourcefile: Path,   attribute: str, options: dict) -> str
equivalent to the "preview" option of   apply_rules_to_single_file

bidsmapper_plugin(session: Path, bidsmap_new: dict, bidsmap_old: dict, template: dict, store:   dict) -> None
equivalent to apply_rules (which applies the rules to each file involved   and outputs the mappings for each)

bidscoiner_plugin(session: Path, bidsmap: dict, bidsfolder: Path) -> None
equivalent to "convert"

So as of now we don't really have much to propose. The changes I would do to bidscoin are:

not having a constrain for the input directory structure
having a rescan button which is something that was discussed here https://github.com/Donders-Institute/bidscoin/issues/87
having a way to preview bidsfiles, right now one may do that with attributes in a hacky and ugly way as shown here:

hello @yjmantilla
Still no time to go over the details, but I think I found a really good example online for an API for a conversion tool:
https://cloudconvert.com/api/v2/quickstart
They have implementations for different languages, but I believe the underlying protocol is REST, with JSON being the data format for input and output parameters of the available functions. Maybe you can take a look before we get the feedback from the other mentors?

I don't know much about REST APIs but from what I read when researching bids-toolbox (see #2 ) it is my understanding that one can do a REST API using python, thus it is actually the same as the python API (? I'm not sure).
If anybody knows about this , the clarification would be appreciated.

@yjmantilla
Yes, REST api is a style of api; it doesn't specify any language, you can write one in pretty much anything.
API is just a generic term for any interface that communicates with a backend via specific endpoints.
Your sovabids api design and the bidscoin api are python libraries. which would be the most straight-forward type of api for this case. But a python library would require the client applications (CLI or GUI) be in python, or be able to talk to python.

Do you have any suggestions for a robust API type that is not limited to a specific programming language? Maybe something that uses XML, YAML, etc. for specifying the parameters, and has implementations for a wide-range of programming languages? It's really not my expertise, so I'm calling for help.

Web apis usually communicate via http protocol so should be viable.
REST is typically used for web and CRUD operations, it could be tricky to map to sovabids.
The cloudconvert example could be a good test, since its a converter like sovabids.
If the cloudconvert endpoints easily map out to those of sovabids, it might be a good starting point.
If you wanted a alternative to REST, maybe have a look at RPC (or specifically JSON-RPC) which is more object and action driven.
This article outlines some pros/cons between REST and RPC for certain applications.
But tbh, any web api could be conformed to fit any use-case,
If you're not committed to full-blown web api development at this stage, I could suggest proceeding with development on the python library. And later you could build a web api wrapper around the python api.

@aswinnarayanan @civier thank you for both of your inputs.  I think in conclusion one of the goals of this issue will be this one.

The cloudconvert example could be a good test, since its a converter like sovabids. If the cloudconvert endpoints easily map out to those of sovabids, it might be a good starting point.

If you're not committed to full-blown web api development at this stage, I could suggest proceeding with development on the python library. And later you could build a web api wrapper around the python api.

Gonna delve into the cloud convert example and from that I will decide what to do.

If you wanted a alternative to REST, maybe have a look at RPC (or specifically JSON-RPC) which is more object and action driven, like sovabids. This article outlines some pros/cons between REST and RPC for certain applications.

Took a look at the article, certainly seems like it may be a better approach for the sovabids case. After delving into the cloud convert api and mirroring it for sovabids, im gonna draft how would it be in RPC and decide from that

@aswinnarayanan Thank you very much for the input on the RPC protocols. This is enlightening.
I was looking a bit on the pages of JSON-RPC and didn't see too much activity lately (https://www.jsonrpc.org/; https://json-rpc.info/). Did this protocol actually catch up, or is it a very marginal thing? I'm afraid that we choose something that is good, but unfamiliar to people (like many things in software, often the things that succeed are not the best or optimal ones, but rather, those that were adopted by large companies/bodies).
I also looked at XML-RPC that had a new implementation for javascript in 2019 (http://xmlrpc.com/), but even there, there is not much activity in the github this year.
Shouldn't we better go with REST that is very standard, and just use a very good Python wrapper that will make things almost transparent? (as the wrapper provided by cloudconvert) In any case, for the GSoC I don't think we should deal with anything outside python, so for me the dilemma is between two options:

using a plain python API, or
using a python API that perfectly wraps an underlying cross-language protocol like REST
I would go for the second option if the overhead is not high, and choose REST simply because it's so ubiquitous. I guess we can always switch to a different underlying protocol down the road (if we really decide that REST is not optimal), because the python wrapper for REST is likely to be adopted to other underlying protocols (and not the other way around).

Any thoughts?
@yjmantilla  Can you check what python wrappers are available for REST, and if any of them support multiple underlying protocols? Maybe that would be the best option.

Hi @civier
Those jsonrpc and xmlrpc links look like their original specifications.
A more modern revision would be the OpenRPC spec
Compared to OpenAPI, which is the most popular REST api spec.
Both have had their latest revision in early 2020, so they're pretty comparable.
I understand that REST api is ubiquitous. But most web services are CRUD operations which sovabids isn't.
For instance, for sovabids to run a map on a single file right now, it would call the following function:
apply_rules_to_single_file(file1)
The respective endpoints would look like thing like this
RPC : POST /applyrules {"file": "file1"}
REST: POST /file/1 {"rules": "apply"}
And for rescan
RPC : POST /rescan {"source", "dir1}
REST: POST /sourcedir/1 {"rescan": "true"}
Either way, the choice of api spec is largely work for the sovabids backend developer. For the user or client dev, they're just going to look up the api documenation, and follow whichever syntax is provided., it's not going to affect them except for readability. Either spec can use http transport. Happy for yjmantilla to proceed with whichever way makes sense for the project.
@yjmantilla, if you're looking for python frameworks to develop the web API, fastapi could be a good option. There's plenty of tutorials online for building REST fastapi. And there is one [here] https://github.com/smagafurov/fastapi-jsonrpc) for json-rpc.

So I got a into REST and RPC (mainly through https://www.youtube.com/watch?v=hkXzsB8D_mo and the article @aswinnarayanan mentioned). Now that I kind of understood the semantics I  was able to interpret the cloudconvert API, indeed for me it seems to be RPC instead of REST; which makes sense since it is action-oriented. Here is their endpoint for conversion as an example:

https://cloudconvert.com/api/v2/convert#convert-tasks
As of now I'm playing a bit with fastapi and the jsonrpc version of it. The idea is to replicate the API shown in #25

Update,
I managed to do an early version of the RPC API , along with some tests.
The API is in https://github.com/yjmantilla/sovabids/blob/w7/sovabids/sovarpc.py
The tests are in https://github.com/yjmantilla/sovabids/blob/w7/tests/test_bids.py , whenever mode=='rpc' is used.
Does it work? Yes, at least locally. I was worried that some trouble with the filesystem would arise. Nevertheless the files are written and read accordingly, I guess this is the case because Im running this on a local server.
Example with load_rules action
Request

Response

The file system and an online server
For an online server I would guess the user uploads the root input folder (or the files themselves) and then that files can be read by the server, then the server writes the output to its own filesystem and it is returned to the user as downloads.
@civier @aswinnarayanan @stebo85 Let me know if you have some feedback on this, specially on how would this work online (given that a server does not have access to the local file system)

Looks good to me :) I agree, on a remote server you wouldn't be able to interact with anything on the client side, so you would have to download the converted files.

Closing this for now since I decided to go with the RPC way.


Document /neo/Cryptography/

What current issue(s) does this address?, or what feature is it adding?
A step forward in addressing #63
How did you solve this problem?
write docstrings
How did you make sure your solution works?
run tests.
Did you add any tests?
no
Are there any special changes in the code that we should be aware of?
no

Coverage decreased (-0.01%) to 68.339% when pulling 6cb9401f10b4c5896f884002451cb4b660d72e5b on ixje:document_neo_cryptography into 33b077e51e1286095ddb336b80985ebed612cb85 on CityOfZion:development.

Great Work! Docstrings are really shaping up 👍


Make it possible to include only part of the international transport in the energy system

More detailed background information on this issue can be found on Basecamp.
As international transport is usually not considered to be part of the national energy system, we would like the user to be able to select what percentage of the sector is included through two sliders, looking roughly like this:

@marliekeverweij has (locally) implemented international transport is implemented like this in the graph

From the energy balance we can derive what the demands of the four bunkers_final_demand_for_... nodes (the third column from the left) are.
The demands of these four nodes in the present graph need to be set by the percentage of the corresponding slider times this demand from the energy balance. The difficulty will be that the user can change this percentage again, implying that the present graph needs to be updated.
The default values for both sliders need to be 0%.

Is this doable, @antw and could you give an estimate of the time required to implement this and when you can do it?

The difficulty will be that the user can change this percentage again, implying that the present graph needs to be updated.

Including @ChaelKruip. 😈

From the energy balance we can derive what the demands of the four bunkers_final_demand_for_... nodes (the third column from the left) are.
The demands of these four nodes in the present graph need to be set by the percentage of the corresponding slider times this demand from the energy balance.

You cannot set final demands in ETEngine (unless the nodes to the left are calculated right-to-left, like power plants). One solution to this might be to add an extra "layer" where you split demand for ships and aviation between local (domestic?) and foreign use:

With a slider setting of 0%, the green edge to "foreign" demand would have a share of 1.0. With a slider setting of 50%, the green and purple edges would have shares of 0.5 with 50% of the demand being satisfied by each.
This might be a little tricky in ETSource since you'd need to set demand on the foreign node instead of the final demand nodes...
# Pseudocode
~ demand =
    SUM(
      EB(bunkers_shipping, lng),
      EB(bunkers_shipping, heavy_fuel_oil)
    )

(However, this assumes that there are no losses between final and useful demand nodes).
It might be something like this:

Including @ChaelKruip. 😈

I kinda anticipating this imp to pop up sooner or later 😆
What I think you mean @antw is that we would like to move away from updating the present graph rather than relying on it even more.
At least, that is the direction that ETLocal is moving in: get rid of all inputs and methods that (mis)use ETEngine to manipulate the present graph and do all the initialising before ETEngine comes into the picture.
@jorisberkhout @marliekeverweij what are the main reasons why you moved away from the 'switch' option where the bunkers are either fully included or excluded?

One solution to this might be to add an extra "layer" where you split demand for ships and aviation between local (domestic?) and foreign use

Alternatively to this nice idea we could use GQL to add series to each relevant chart and contributions to each relevant dashboard item of the form:
#Pseudocode
- query =
IF( bunker_switch == TRUE ){
    V(bunkers, demand)
}

or (if you want to use a slider instead of a switch)
#Pseudocode
- query =
    V(slider_setting) * V(bunkers, demand)
}

This is perhaps a bit clunkier than having an ETEngine method to 'zero-out' a whole region but it would not need the present graph to change.

Thank you for your nice ideas!

@jorisberkhout @marliekeverweij what are the main reasons why you moved away from the 'switch' option where the bunkers are either fully included or excluded?

The main reason for this is that the sliders can also fulfil the purpose of the switch. Because when the slider is put on 0% this means that international transportation should not be included in the final demands, so this is the same as toggling the switch to OFF. Also when the slider is given is certain percentage this is similar to toggling the switch to ON.

Also when the slider is given is certain percentage this is similar to toggling the switch to ON.

Only if that certain percentage is 100% 😉
To rephrase my question: what is the use case for setting the sliders to 30% for instance? What insight would a user get by using slider settings different from 0% and 100%?

To rephrase my question: what is the use case for setting the sliders to 30% for instance? What insight would a user get by using slider settings different from 0% and 100%?

Good question. The energy demand of international transportation is a lot and it is questionable whether it should all be allocated to the Netherlands, since for example the bunker fuels are also used for airplanes that transfer here. With the sliders the user could choose to only allocated a part of that energy demand.
Maybe in the description underneath the slider we can give the shares of marine/aviation bunker fuels that are used for what kind of planes/ships (if we can find these numbers). This way the user can make an educated guess.

Update on this issue:
We solved this issue by using update_period = both for the two sliders mentioned above. So the .gql-file of both inputs look like this:

This works fine, EXCEPT there is still one issue left.... When a new scenario is loaded, the final demand for international transportation is not zero, even though the start_value = 0.0. So apparently the slider inputs are not used to update the useful demands in the present and future graph when a new scenario is started.
Today Joris, Chael, Gerard and I had a short meeting about this issue and came up with two probable solutions:

To create an extra node for each useful demand node (bunkers_useful_demand_planes and bunkers_useful_demand_ships) where other part of the share is put into. Actually the idea @antw pitched before:

With a slider setting of 0%, the green edge to "foreign" demand would have a share of 1.0. With a slider setting of 50%, the green and purple edges would have shares of 0.5 with 50% of the demand being satisfied by each.

To put the energy demands of international transportation in the dataset of a specific country and use the slider-setting to update the demand of the useful demand nodes by:

demand = INPUT_VALUE(bunkers_allocated_percentage_aviation) / 100) * AREA(bunkers_useful_demand_planes)
Could you help us out and let us know what you think, @antw?

Both of these options require that we can calculate the useful demand before calculating the graph (basically, as described at the end of my previous post). Is that likely to be possible? If so, I'm guessing either option would work.
The second might prove to be better since it will avoid any possibility of the "foreign" node and demand ever being included in CO2 or primary demand calculations.
An alternative to storing the demand in the area file would be to add a disconnected node for each type of transport which stores the total (100%) demand, and we can instead read the value from there.

... then the input looks something like:
UPDATE(
  V(bunkers_useful_demand_ships),
  preset_demand
  V(bunkers_total_useful_demand_ships) * USER_INPUT()
)

I have no strong preference one way or the other: one pollutes the area with new attributes, the other pollutes the graph with new nodes.

Both of these options require that we can calculate the useful demand before calculating the graph (basically, as described at the end of my previous post). Is that likely to be possible? If so, I'm guessing either option would work.

Yes, that is exactly what we would like to do.
I like your idea @antw since this seems to be the most well-ordered option, where least can go wrong. I am going to implement that and see how it works! If you think of a simpler option, let me know.

I have implemented the new nodes (bunkers_total_useful_demand_ships & bunkers_total_useful_demand_planes) and did not connect them to the rest of the graph like you proposed (so no edges with shares). This is de code of these nodes:

Additionally, I have updated the inputs of the sliders with the code you wrote in the previous message:

However.... ETEngine does not work yet! We have asked Gerard to help out and he used the 'rake debug' to see what goes wrong in the graph. This is what comes out of that:

Apparently the graph does not recognise these 'loose nodes' since they do not show up!
@antw, do you maybe know how to solve this? Or should we try one of the other options we came up with?

@antw, do you maybe know how to solve this?

Have these changes been pushed to GitHub? I can take a look into it.
One thing I'm noticing is that my above query for the input is incorrect. It should be:
UPDATE(
  V(bunkers_useful_demand_ships),
  preset_demand
  V(bunkers_total_useful_demand_ships, preset_demand) * USER_INPUT()
)

Also make sure that the "total_useful_demand" node belongs to the "preset_demand" group, otherwise it won't have a demand attribute that ETEngine can read.
# nodes/.../bunkers_total_useful_demand_ships.ad

- groups = [preset_demand]
...

@jorisberkhout , Is this issue solved and could you close it?

@jorisberkhout , Is this issue solved and could you close it?

Yes and done.


Issue installing on Node 8.12.0

Environment details

OS: Linux
Node.js version: v8.12.0
npm version: 6.4.1
@google-cloud/bigtable version: 2.2.1

Steps to reproduce

Install @google-cloud/bigtable@2
Run a test that imports the library. Error given is:

  Error: @grpc/grpc-js only works on Node ^8.13.0 || >=10.10.0

The breaking change mentioned in the changelog (https://github.com/googleapis/nodejs-bigtable/blob/master/CHANGELOG.md#-breaking-changes) updates the engines field to >= 8.10.0. However, it seems like a subdep here does not support it.

@wyardley sorry about this confusion, I think we should update our engines field accordingly. @grpc/grpc-js is a critical dependency, and it sounds like we should instead indicate that 8.13.0 is our minimum required version of Node.

@bcoe should we kick off a super-PR to update that across the repos?

@bcoe I forget if we had a reason to wait on this. Should we do the super PR?

Status: We are going to check back up on this in early December.

About to drop support for 8 all together, so I guess it kind of took care of itself


GameStop's NFT platform is profiting from stolen games.

Date
2022-7-15
Description
The web game "Galactic Wars" has been shamelessly re-uploaded from itch.io on GameStop's new marketplace, much to the original creator's disdain. NiFTy Arcade, the group behind the theft, are attempting to claim that the game was published under a license that allows commercial use, but various game developers have shown proof that the selected license does not allow this behavior at all. At the time of writing, the stolen game can still be "purchased" for around 70 dollars.
Links
https://nft.gamestop.com/token/0xb3f78f88998325316b3f21cda6ea8889a4923b09/0xb161d940800faaaeb058ec61c0ce5493671ccce56231d3569e55281a8de8c45c?s=09
https://twitter.com/VolcanoBytes/status/1547835784291487749?t=uhqbxExieNIpeYptLP8UAw&s=19
https://twitter.com/VolcanoBytes/status/1547844185163673601?t=ZBGi4gL0R9gv0Iar3_nVWQ&s=19
https://twitter.com/lexaloffle/status/1547957030140674048?t=LqpgHHFtd9u9JQ_PHCOpSQ&s=19
Agreement

[X] I irrevocably agree to release my contribution under the CC-BY 3.0 License

Attribution name
DPS2004
Personal link
DPS2004.itch.io

(I wrote this on my phone, so lmk if the grammar or formatting is off)

UPDATE:
The game has been removed from the marketplace, but is still visible in wallets.
https://twitter.com/NiftyArcade/status/1548131153093095430?t=ryhDVVHzywdmzSMS--aX0A&s=19

UPDATE: https://twitter.com/NiftyArcade/status/1551085388642635776?t=bXNp_re8Xjr8Ew8YVb-gUw&s=19


SUBMARINE-880. Cannot run two experiments with the same name

What is this PR for?
We cannot run two experiments with the same name. Take experimentIT.java as an example, the frontend E2E testcase will create an experiment named "experiment-e2e-test". If we run this testcase twice, the workbench just shows an "experiment-e2e-test" rather than two.
The root cause is that the K8sSubmitter will create two PODs for an "experiment-e2e-test". The names of these two PODs are "experiment-e2e-test-ps-0" and "experiment-e2e-test-worker-0". Hence, when we try to create the second "experiment-e2e-test", K8sSubmitter will throw an exception due to duplicate POD names.
To reproduce the bug:
# Step1: Run workbench on port 8080
# Step2:
cd submarine-cloud-v2

# Step3: Create "experiment-e2e-test" twice
./hack/run_frontend_e2e.sh experimentIT
./hack/run_frontend_e2e.sh experimentIT

# Step4: Check Workbench: only an "experiment-e2e-test" exists => BUG!

My solution: I append ${experimentCounter} (ExperimentManager.java#L58) to the experiment name. With the solution, the first "experiment-e2e-test" will create two PODs:

experiment-e2e-test-0001-ps-0
experiment-e2e-test-0001-worker-0

What type of PR is it?
[Bug Fix]
Todos

Check "_" (Reference: Link)

What is the Jira issue?
https://issues.apache.org/jira/browse/SUBMARINE-880
How should this be tested?
# Step1: Run workbench on port 8080
# Step2:
cd submarine-cloud-v2

# Step3: Create "experiment-e2e-test" twice
./hack/run_frontend_e2e.sh experimentIT
./hack/run_frontend_e2e.sh experimentIT

# Step4: Check Workbench: two"experiment-e2e-test" exists (Correct)

Screenshots (if appropriate)

Questions:

Do the license files need updating? No
Are there breaking changes for older versions? No
Does this need new documentation? No

@jiwq Thank you for your recommendation! In my opinion, data scientists need to run multiple experiments to achieve a single task.
For example, a data scientist wants to train a model with the MNIST dataset. At first, he creates an experiment "mnist-exp" with his minist-ver1.py. Next, because the model accuracy does not satisfy the scientist's expectation, the data scientist makes some modifications to the Python script (mnist-ver1.py) and creates an experiment "mnist-exp" again. The bug will occur seamlessly (That is, the data scientist does not know his experiment will not be created).
To avoid the condition, the data scientist needs to:

Method1:

Delete the first "mnist-exp"
Create "mnist-exp" with the updated mnist-ver1.py.
Cons:

(1) Lose the data about the first "mnist-exp"
(2) Delete "mnist-exp" manually

Method2:

Change the name of the experiment (ex: "mnist-exp-2")
Cons: Data scientists usually need to run many experiments to achieve a single task. Thus, the repeat human effort is very annoying. (For example, "mnist-exp-2", "mnist-exp-3", "mnist-exp-4" ... "mnist-exp-100")

With my personal user experience, I usually use a script to help me create an experiment without entering the information, including experiment name, number of workers, and resource limitations, again and again. However, because of this bug, when I want to run my script to create an experiment again, I need a lot of human effort.

I agree with @kevin85421

Thanks @kevin85421 for a detailed explanation. I agree, but I think we should set the job name as the pod label. So that the user can retrieve his/her experiments easily by name.
In this patch we should set the pod label. I accept add the new api later to retrieve the experiments by the user's experiment name, and we should fill a JIRA to track this feature. Any thoughts?

@jiwq Thank you for your recommendations!
I have some questions:
Q1: Does "job name" mean "experiment name"?
Q2: Does "pod label" mean "pod name"?
The following points assumed that the answers to these two questions are YES. In my opinion, with this patch, users can still retrieve their experiments via experiment names easily because the experiment (with the modified name) will be returned. Hence, people can get the experiment easily from the workbench.
In addition, because the rename rule is appending ${experimentCounter} to the original experiment name, users can still retrieve their experiment with the original experiment name easily.
For example, a user creates an experiment "mnist-exp".
Experiment name: "mnist-exp-0001" (same as the experiment name on the workbench)
POD name: "mnist-exp-0001"
When a user wants to retrieve the experiment, they can use both "mnist-exp-0001" or "mnist-exp".

Q1: Does "job name" mean "experiment name"?

Yes, it is experiment spec name field.
Because we defined the name in experiment spec, so I think we should keep this concept and user should not to know the real pod name.

Q2: Does "pod label" mean "pod name"?

NO. More info see https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
By example, user defined the mnist tensorflow experiment spec in submarine and submit twice, we can found mnist-1 and mnist-2 jobs. If user want to query the minist experiment, he/her only should use the mnist as the query param to retrieve the list of experiments. And if want get more info should use the specific name we can call it instance name, which is mnist-1 or mnist-2 etc.
Simplify, I think we should two tasks to do.

Fill the K8s object labels use experiment name field.
Append the counter after the job(tfjob/pytorch job)'s name which is defined in experiment spec.

@jiwq Got it. It makes sense.
To conclude,
(1) The experiment name on the workbench must be the same as the name specified by users.
(2) The names of the PODs (i.e. instance name) related to the experiment are ${original_exp_name} + "-" + ${experimentCounter}
(3) Users can use ${original_exp_name} to retrieve their experiments.
(4) Set the labels of the PODs to ${original_exp_name}
For instance,
User wants to create an experiment: ${original_exp_name} = "mnist-exp"
The experiment name on the workbench: "mnist-exp" => conclusion (1)
Names of PODs: "mnist-exp-0001" => conclusion (2)
Labels of PODs: "mnist-exp" => conclusion (4)
Do I misunderstand anything? Thanks!

@kevin85421 Perfect :) I'm not sure whether the workbench supports the feature. If not we should develop.

@jiwq I have updated this PR. You can check the sections: "My solution" and "Screenshots".
To elaborate,
an user creates an experiment: ${original_exp_name} = "experiment-e2e-test"
The experiment name on the workbench: "experiment-e2e-test" => conclusion (1)
Names of PODs: "experiment-e2e-test-0001" => conclusion (2)
Name of CR: "experiment-e2e-test-0001"
Labels of CR: "experiment-e2e-test" => conclusion (4)

@kevin85421 How about use the experiment id as the pod name?

@jiwq I have fixed it. Thanks!

@jiwq I am sorry to bother you. Do you have any other recommendations about this patch? Thanks!

Thank @jiwq for your recommendations! I will propose a new design to enable experiments to be grouped by tags.


Horoscope plugin idea

Hello i am interested in implementing a new module that connects to the website https://www.horoscope.com/us/index.aspx
This website is a horoscope website and it could be used so that the user can learn information about their horoscope (daily, monthly, weekly or yearly). Are you interested in me implementing it?

Hi, I noticed that this idea was proposed earlier, but it seems no progress has been made on it. I am very interested in taking over this issue and implementing the suggested feature. While I might explore alternative APIs or approaches to achieve the same functionality, my goal is to ensure the feature aligns with the project's objectives and contributes meaningfully to the user experience.


Update README.md

Documentation Change
Updated Installation terminology to differentiate between AMS for AEM and AMS for Magento and reference the CSE rather than SRE.
Also added a known issue with regards to Cloud Manager compatibility.

Also @jpritchard please rebase your PR for the readme on the latest master branch. The readme was updated in between. We already added the sentence "For AEM AMS customers the CIF Connector is installed like other AEM Feature Packs as it can not be deployed via Cloud Manager, please contact the SRE."


Automatically retry fetches from GISAID and GenBank

Try to recover from transient network/connection failures we sometimes
see.  Most of these are protocol errors or connections unexpected closed
by the remote peer.  The documention is unclear and only mentions
timeouts and HTTP 5xx, but I think curl will treat protocol issues as
transient failures for the purposes of --retry.
This will make up to 10 total requests (1 original + up to 9 retries).
curl's default backoff delay time for retries starts at 1s and doubles
for every subsequent attempt: 1 2 4 8 16 32 64 128 256.  If this proves
to be unsuitable for our purposes, we can further tune retry behaviour
with curl's other --retry-* options.

Ok, so my guess was wrong: curl won't retry with connection closed (and its documentation is precise). I tested this by creating a small HTTP "server" as /tmp/server:
cat <<.
HTTP/1.1 200 Ok
Content-Type: text/plain
Content-Length: 31

.

n=10
while [[ $n -gt 0 ]]; do
    echo $n
    sleep 1
    n=$((n - 1))
done

running it with:
socat tcp4-listen:4444,reuseaddr,fork,crlf exec:"bash /tmp/server"

connecting with curl:
curl -fsSv localhost:4444 --retry 5

and then Ctrl-Cing the socat server to break the connection unexpectedly. curl doesn't retry.
Newer curl versions have a --retry-all-errors option, but the documentation helpfully explains why it's often not a good idea: data that's already been received and output to stdout will be refetched and re-output, so you'll often end up with duplicated or corrupted data.
Instead, I'll implement the retry outside of curl instead.

This is a great idea Tom, and will be really handy on days where we seem to overlap with  GISAID file update (or other temporary problem).

Thanks so much, I'm going to use this in my scripts that fetch from NCBI and COG-UK!  😃


Memory Leak

I noticed this library is leaking RunLoopTask:

and can be reproduced with this trivial macOS example:
class ViewController: NSViewController {
    var task: Task?
    @IBAction func onButtonPress(_ sender: Any) {
        task = Plan.after(Interval(seconds: 2)).do {
            print("Hi")
        }
    }
}

Hi, @ApolloZhu , thanks for your feedback. I just pushed a commit and hope it will fix the problem.

I'm working on 2.x branch now, and hopefully, I will release 2.0 with this today!

This fix requires manually invoke task.cancel(). Is that intended behavior?

...
Yes. I thought you were talking about the memory leak caused by an object reference being caught by a closure.
Yes, if a task is no longer being used, you should call its cancel method to release it. I wrote it here). Sorry, my intention is to make it consistent with the timer experience(timer.invalidate()), but I also realized that it seems a bit misleading to users.
I am doing some refactoring now and may redesign this part of the api.

Thanks for the explanation and sorry for not providing enough context in the previous comment.


downstream peer certificate details in network WASM filter

Is it possible to get downstream peer cert details like SAN etc. in network WASM filter? I have looked at the proxy API https://github.com/proxy-wasm/proxy-wasm-cpp-sdk/blob/master/proxy_wasm_api.h - could not find any thing.
If it is not available currently, Is it acceptable to add it?
We have a use case to build some logic in  network WASM filter based on client identity.

You can use get_property({"connection", "subject_local_certificate"}) and etc in network Wasm filter context.

Cool. Thank you @kyessenov .


The recipient address<EMAIL_ADDRESS>is not a valid RFC-5321 address.

Checklist

[X] I have used the search function to see if someone else has already submitted the same bug report.
[X] I will describe the problem with as much detail as possible.

App version
v6.602
Where did you get the app from?
Google Play
Android version
13
Device model
Moto X40
Steps to reproduce
Edit a mail, input the recipient address end with a /, then send it.
https://github.com/thundernest/k-9/assets/10363352/cbb7a99a-b348-4f88-adc3-3fccc1f4ba29
Expected behavior
We can check the mail address before sending it, toast a message to tell the user that the address is invalid, or show a dialog like Gmail did below:

Actual behavior
Sending it, and showing the failure.
Logs
No response

Hi @Goooler
I'm happy to let you know that the issue with invalid email characters has been fixed and merged into the project. Thanks to @cketti  and the team for their support.
At arissystem, we're always eager to contribute and collaborate on this project. We're looking forward to more opportunities to work together.


error while compling

ERROR in node_modules/angularfire2/firebase.app.module.d.ts(2,42): error TS2305: Module '"/Users/apple/Desktop/FML_firebase_work-master/node_modules/firebase/index"' has no exported member 'functions'.
i had updated my project 5 to 6 this error came

yes i have this error also !

https://github.com/angular/angularfire2/issues/1688

@kenken64 You should probably consider checking the comment thread before commenting that. https://github.com/angular/angularfire2/issues/1688#issuecomment-392205266

@jaswanth1998 hello, I just got that error too, if you update project with<EMAIL_ADDRESS>and firebase^5.0.3 with small fix at here  can help your issue

no
On Fri, Jun 22, 2018 at 1:35 PM hiepxanh<EMAIL_ADDRESS>wrote:

do you still have that problem ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/angular/angularfire2/issues/1718#issuecomment-399358671,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AYrxbIi1SIvV_YErdD5FnY5RRjoUrv_xks5t_KVfgaJpZM4UhV58
.


limoncello app on subfolders usage

i am going to put multiple apps on a single subdomains, i.e api.domain.com;
where each subfolder house corresponding limoncello app like:
api.domain.com/school1/subschool1/...
where api endpoint api.domain.com/school1/subschool1/v1/users... etc...
i did some adjustment on nginx like
server {
        listen 80;
        server_name api.domain.com;

        access_log off;
        error_log off;

        root /srv/www;
        index index.php index.html;

        location / {
                try_files $uri $uri/ /index.php?$args;
        }

        location /school1/subschool {
                root /srv/www/api/school1/subschool1/public/;

                rewrite ^/school1/subschool1/(.*)$ /$1 break;

                try_files $uri $uri/ /index.php?$args;
        }

        location ~ \.php$ {
                try_files $uri $uri/ /index.php?$args = 404;
                set $newurl $request_uri;
                if ($newurl ~ ^/school1/subschool1(.*)$) {
                        set $newurl $1;
                        root /srv/www/api/school1/subschool1/public/;
                }

                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
                fastcgi_param REQUEST_URI $newurl;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_intercept_errors off;
                fastcgi_buffer_size 16k;
                fastcgi_buffers 4 16k;
        }
}

is it a right approach to bring up limoncello app on subfolder usage ?

As far as I understand you said you have a single database for your users. If so why not having a single domain for API as well?

got it. yea. sounds like it was redundant.
btw,
suppose a single database for users exists (that was a  limoncello-php/app)
and application for api (crud operation, that was another limoncello-php/app)

how do the application for api be authenticated? as the application for api do not hold the token information, and;
how do single database for users to authorise application?

they are entirely two (limoncello-php/app)

They both can work with the same database. Both apps can share some tables (e.g. users) and have their own ones. Auth tokens could be issued by any of them or both. As they share users and tokens a token will work for both apps.

how to set up?

noted. let me try it out and namespace the table to differentiate.

this approach was good. but as more applications created. more different namespaced table will be store on same database. will it be a confusion and lack of isolation?

You're asking about a very generic topic of software solutions design. My response was a sample high-level design for your requirement of having monolith solution.

ya. agree :p

could i define two group of database setting in limoncello-app?

I think the easiest way would be adding custom config(s) and create database Connection objects out them.

i see, so would have to add custom setting via class PdoDatabase.

though having subfolder usage on limoncello app was not a good practice.
but i observed there was a trailing "/" slash problem:

http://domain.com/a-app is not accessible to the application view
while http://domain.com/a-app/ can

is there any workaround on it?

adding a trailing slash is a quite common question. Here are a couple of first googled links
https://www.scalescale.com/tips/nginx/add-trailing-slash-nginx/
https://serverfault.com/questions/376162/how-can-i-create-a-location-in-nginx-that-works-with-and-without-a-trailing-slas

I think the easiest way would be adding custom config(s) and create database Connection objects out them.

having tried to create custom config and create database connection,

the container configurator set up properly
A custom class "AnotherConnection" extended the generic DBAL Connection Class

all these steps works found.
but i found the return connection object  still capturing the .env config settings.

reproduce the issue as follow:

created a "services" folder under "server"
autoloaded "Services" namespace in composer.json
"Services\\": "server/services/",
create new class AnotherDoctrineSettings implements SettingsInterface as like as DoctrineSettings in

<?php namespace Services\AnotherDoctrine;

use Limoncello\Contracts\Settings\SettingsInterface;

/**
 * Class AnotherDoctrineSettings
 *
 * @package Services\AnotherDoctrine
 */
class AnotherDoctrineSettings implements SettingsInterface
{
    /**
     * Settings key
     */
    const KEY_USER_NAME = 0;

    /**
     * Settings key
     */
    const KEY_PASSWORD = self::KEY_USER_NAME + 1;

    /**
     * Settings key
     */
    const KEY_DATABASE_NAME = self::KEY_PASSWORD + 1;

    /**
     * Settings key
     */
    const KEY_HOST = self::KEY_DATABASE_NAME + 1;

    /**
     * Settings key
     */
    const KEY_PORT = self::KEY_HOST + 1;

    /**
     * Settings key
     */
    const KEY_CHARSET = self::KEY_PORT + 1;

    /**
     * Settings key
     */
    const KEY_DRIVER = self::KEY_CHARSET + 1;

    /**
     * Settings key
     */
    const KEY_URL = self::KEY_DRIVER + 1;

    /**
     * Settings key
     */
    const KEY_MEMORY = self::KEY_URL + 1;

    /**
     * Settings key
     */
    const KEY_EXTRA = self::KEY_MEMORY + 1;

    /**
     * Settings key
     */
    const KEY_PATH = self::KEY_EXTRA + 1;

    /**
     * Settings key
     */
    protected const KEY_LAST = self::KEY_PATH;

    /**
     * @inheritDoc
     */
    final public function get(array $appConfig): array
    {
        $defaults = $this->getSettings();

        $pathToDbFile = $defaults[ static::KEY_PATH ] ?? null;
        assert(
            ($pathToDbFile === null || file_exists($pathToDbFile) === true),
            "Invalid database file `$pathToDbFile`."
        );

        return $defaults;
    }

    /**
     * @return array
     */
    protected function getSettings(): array
    {
        return [];
    }
}

created new class AnotherDoctrine extends AnotherDoctrineSettings with custom config '.env.another.doctrine'

# Sample configuration for Doctrine (MySQL)
DB_DATABASE_NAME = 'another_doctrine'
DB_USER_NAME     = 'another_doctrine'
DB_USER_PASSWORD = 'secret'
DB_HOST          = '<IP_ADDRESS>'
DB_PORT          = 3306
DB_CHARSET       = 'UTF8'
DB_DRIVER        = 'pdo_mysql'

<?php namespace Settings;

use Dotenv\Dotenv;
use Services\AnotherDoctrine\AnotherDoctrineSettings;

/**
 * Class AnotherDoctrine
 *
 * @package Settings
 */
class AnotherDoctrine extends AnotherDoctrineSettings
{
    /**
     * @inheritDoc
     */
    protected function getSettings(): array
    {
        (new Dotenv(implode(DIRECTORY_SEPARATOR, [__DIR__, '..', '..']), '.env.another.doctrine'))->load();

        $dbFile = getenv('DB_FILE');
        $dbPath = empty($dbFile) === true ? null : implode(DIRECTORY_SEPARATOR, [__DIR__, '..', 'storage', $dbFile]);

        return [
                static::KEY_DATABASE_NAME => getenv('DB_DATABASE_NAME'),
                static::KEY_USER_NAME     => getenv('DB_USER_NAME'),
                static::KEY_PASSWORD      => getenv('DB_USER_PASSWORD'),
                static::KEY_HOST          => getenv('DB_HOST'),
                static::KEY_PORT          => getenv('DB_PORT'),
                static::KEY_CHARSET       => getenv('DB_CHARSET'),
                static::KEY_DRIVER        => getenv('DB_DRIVER'),
                static::KEY_PATH          => $dbPath,
            ] + parent::getSettings();
    }
}

sorry, i found i shall change those 'DB_' suffixed environment variable to another one like 'DB_OAUTH_'... etc..
isnt' it?

I see you're trying to emulate built-in class. Custom classes do need to support all doctrine connection possibilities and are not needed to be extensible as standard settings. So it can be significantly simplified.

Custom second connection

<?php namespace App\Container;

use Doctrine\DBAL\Connection;

/**
 * @package App
 */
class AnotherDoctrineConnection extends Connection
{
}

Settings for it

<?php namespace Settings;

use Dotenv\Dotenv;
use Limoncello\Contracts\Settings\SettingsInterface;

/**
 * @package Settings
 */
class AnotherDoctrine implements SettingsInterface
{
    const KEY_FILE_PATH = 0;

    /**
     * @inheritdoc
     */
    public function get(array $appConfig): array
    {
        (new Dotenv(implode(DIRECTORY_SEPARATOR, [__DIR__, '..', '..'])))->load();

        $dbFile = getenv('DB_FILE');
        $dbPath = realpath(implode(DIRECTORY_SEPARATOR, [__DIR__, '..', 'storage', $dbFile]));

        return [
            self::KEY_FILE_PATH => $dbPath,
        ];
    }
}

Container configurator

<?php namespace App\Container;

use Doctrine\DBAL\DriverManager;
use Limoncello\Contracts\Application\ContainerConfiguratorInterface;
use Limoncello\Contracts\Container\ContainerInterface;
use Limoncello\Contracts\Settings\SettingsProviderInterface;
use Psr\Container\ContainerInterface as PsrContainerInterface;
use Settings\AnotherDoctrine;

/**
 * @package App
 */
class AnotherDoctrineConfigurator implements ContainerConfiguratorInterface
{
    /**
     * @inheritdoc
     */
    public static function configureContainer(ContainerInterface $container): void
    {
        $container[AnotherDoctrineConnection::class] = function (PsrContainerInterface $container) {
            list(AnotherDoctrine::KEY_FILE_PATH => $filePath) =
                $container->get(SettingsProviderInterface::class)->get(AnotherDoctrine::class);

            $connection = DriverManager::getConnection([
                'driver'   => 'pdo_sqlite',
                'user'     => '',
                'password' => '',
                'path'     => $filePath,
                'charset'  => 'UTF8',
            ]);

            return $connection;
        };
    }
}

Now you can create it anywhere from container

        $connection = $container->get(AnotherDoctrineConnection::class);

sorry, i found i shall change those 'DB_' suffixed environment variable to another one like 'DB_OAUTH_'... etc..
isnt' it?

You're free to use any prefixes you like :wink:


Load_in_8bit=True error

===================================BUG REPORT===================================
Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues
binary_path: C:\Users\jalagurajah\Anaconda3\envs\ASR_PEFt\lib\site-packages\bitsandbytes\cuda_setup\libbitsandbytes_cuda116.dll
CUDA SETUP: Loading binary C:\Users\jalagurajah\Anaconda3\envs\ASR_PEFt\lib\site-packages\bitsandbytes\cuda_setup\libbitsandbytes_cuda116.dll...
Loading model...
Error no kernel image is available for execution on the device at line 479 in file D:\ai\tool\bitsandbytes\csrc\ops.cu

Have you solve this problem? I met the same problem

I tried few solutions it seemed worked for me, I am using windows server 2022.
Pip install bitsandbytes-cuda116
if you are using windows pip install bitandbyts-windows
Ensure the correct version of CUDA is installed: Make sure you have installed CUDA 11.6 Toolkit (https://developer.nvidia.com/cuda-toolkit-archive) on your system, and the CUDA paths are set correctly in your environment variables.
I hope this helps

已收到您的信件！

已收到您的信件！

已收到您的信件！

Dear all,
Since the current release (last week, 8th of March) we now have official support for Windows 🎉 (which we did not have before) via
pip install bitsandbytes>=0.43.0

We're closing all old Windows issues and are asking everyone to try installing with this new version as outlined above and validate the install with python -m bitsandbytes which should spit out a bunch of stuff and then SUCCESS. Please let us know if everything worked correctly in this new umbrella / catch-all issue. Thanks 🤗


refactor: let open api more easier to use and development

What's the purpose of this PR
Let open api more easier to use and development.
Just a simple demo, not the final code.
Which issue(s) this PR fixes:
Fixes #3942
Brief changelog
Add interfaces ApolloXXXOpenApi under java package com.ctrip.framework.apollo.openapi.api.
Let controller under java package com.ctrip.framework.apollo.openapi.v1.controller implement each ApolloXXXOpenApi as server.
An interface ApolloOpenApi extends them all, let com.ctrip.framework.apollo.openapi.client.ApolloOpenApiClient implement ApolloOpenApi with compability.
Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Read the Contributing Guide before making this pull request.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Write necessary unit tests to verify the code.
[x] Run mvn clean test to make sure this pull request doesn't break anything.
[x] Update the CHANGES log.

Codecov Report

Merging #3943 (00d06d0) into master (ada6294) will decrease coverage by 0.07%.
The diff coverage is 9.09%.

@@             Coverage Diff              @@
##             master    #3943      +/-   ##
============================================
- Coverage     50.84%   50.76%   -0.08%
+ Complexity     2468     2467       -1
============================================
  Files           475      475
  Lines         14608    14623      +15
  Branches       1523     1523
============================================
- Hits           7427     7423       -4
- Misses         6651     6674      +23
+ Partials        530      526       -4

Impacted Files
Coverage Δ

...ork/apollo/openapi/client/ApolloOpenApiClient.java
40.57% <0.00%> (-6.88%)
:arrow_down:

...pollo/openapi/v1/controller/ClusterController.java
19.04% <0.00%> (-0.96%)
:arrow_down:

...k/apollo/openapi/v1/controller/ItemController.java
7.69% <0.00%> (-0.48%)
:arrow_down:

...llo/openapi/v1/controller/NamespaceController.java
27.02% <0.00%> (-0.76%)
:arrow_down:

...rk/apollo/openapi/v1/controller/AppController.java
48.14% <40.00%> (+3.70%)
:arrow_up:

...mework/apollo/portal/component/PortalSettings.java
57.81% <0.00%> (-7.82%)
:arrow_down:

...framework/apollo/openapi/entity/ConsumerAudit.java
42.42% <0.00%> (-6.07%)
:arrow_down:

...amework/apollo/openapi/util/ConsumerAuditUtil.java
89.18% <0.00%> (-2.71%)
:arrow_down:

...mework/apollo/openapi/service/ConsumerService.java
54.16% <0.00%> (-1.67%)
:arrow_down:

.../framework/apollo/spring/property/SpringValue.java
89.47% <0.00%> (+1.75%)
:arrow_up:

... and 2 more

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 ada6294...00d06d0. Read the comment docs.

Thanks for the contribution! It looks good to me, would you please update the CHANGES.md?

Done


Listening to?

Hello,
I wanted to say that I am really enjoying this plug in so far. I wanted to see if it would be possible to change it from "Playing a Game" to "Listening To" on the Discord side. It appears that it is possible from the documentation I have looked at with Discord, but sadly my programming knowledge is limited to outdated HTML 4 and SQL Query. Thank you in advance! And I hope this is an easy change to make.

"Listening to" only works with Spotify with their special integration with Discord. iirc RPC can't take advantage of this

You might be looking at the documentation for bots though, because you can do this with bots. But as far as I know, rich presence can only be Playing.

I have seen it done with Bots. I wasn't sure if that was something that can be done through utilities like this. It seemed like the Activity Enum would be able to do it. If this is bot only stuff, as I know my instance of Red can do it, then that is fine. Just wanted to see if it was possible. Thanks again! I do love the plugin. It has been awesome.
https://discord.com/developers/docs/game-sdk/activities#data-models-activitytype-enum

I have seen it done with Bots. I wasn't sure if that was something that can be done through utilities like this. It seemed like the Activity Enum would be able to do it. If this is bot only stuff, as I know my instance of Red can do it, then that is fine. Just wanted to see if it was possible. Thanks again! I do love the plugin. It has been awesome.
https://discord.com/developers/docs/game-sdk/activities#data-models-activitytype-enum

Yeah, it's a great plug in. It is bot only, otherwise im sure the Listening to thing would've been implemented already.

Yes, this can be done with bots and even games. As your link suggests, this feature is part of the Discord game SDK. This is a SDK targeted at game developers so that they can better implement things like rich presence, game invites, etc. So technically it is possible for us to implement this by creating a "game" and having the plugin communicate with it, but honestly it seems like a lot of work just to have it say "Listening to" on your profile :)


[BUG] knowledge_storm 0.2.5 doesn't contain TavilySearchRM in rm.py?

Describe the bug
Can't run examples locally using the packaged knowledge_storm as TavilySearchRM is not included in the package.
To Reproduce

Clone repository
pip install  -r requirements.txt`
python ./examples/run_storm_wiki_gpt.py --retriever you --do-research --do-generate-outline --search-top-k 10 --do-generate-article

Traceback (most recent call last):
  File "/mnt/c/Users/UserName/Develop/_external_sources/storm/./examples/run_storm_wiki_gpt.py", line 26, in <module>
    from knowledge_storm.rm import YouRM, BingSearch, BraveRM, SerperRM, DuckDuckGoSearchRM, TavilySearchRM, SearXNG
ImportError: cannot import name 'TavilySearchRM' from 'knowledge_storm.rm' (/home/kaesmad/Envs/storm/lib/python3.11/site-packages/knowledge_storm/rm.py)

Environment:
System Information

OS:  Linux
OS Version:  #1 SMP Fri Mar 29 23:14:13 UTC 2024
Python Version:  3.11.9 (main, Apr  6 2024, 17:59:24) [GCC 11.4.0]

Package Information

langchain_core: 0.3.0
langsmith: 0.1.121
langchain_huggingface: 0.1.0
langchain_qdrant: 0.1.4
langchain_text_splitters: 0.3.0

Optional packages not installed

langgraph
langserve

Other Dependencies

fastembed: Installed. No version info available.
httpx: 0.27.0
huggingface-hub: 0.24.5
jsonpatch: 1.33
orjson: 3.10.6
packaging: 23.2
pydantic: 2.8.2
PyYAML: 6.0.1
qdrant-client: 1.11.2
requests: 2.32.3
sentence-transformers: 3.1.0
tenacity: 8.5.0
tokenizers: 0.19.1
transformers: 4.43.3
typing-extensions: 4.12.2

I get the same error on macos:
(Storm_1) user@machine storm % python examples/run_storm_wiki_gpt.py
--output-dir $OUTPUT_DIR
--retriever you
--do-research
--do-generate-outline
--do-generate-article
--do-polish-article
Traceback (most recent call last):
File "/path/to/run_storm_wiki_gpt.py", line 26, in
from knowledge_storm.rm import YouRM, BingSearch, BraveRM, SerperRM, DuckDuckGoSearchRM, TavilySearchRM, SearXNG
ImportError: cannot import name 'TavilySearchRM' from 'knowledge_storm.rm' (/path/to/knowledge_storm/rm.py)

Thanks for reporting this! I just bumped up the pypi package version. The issue shall be resolved if you run pip install knowledge-storm --upgrade.

Many thanks for your quick support, this works now.