[BugFix] Fix JniScanner crash due to struct null indicator

Why I'm doing:
"appendStruct" method does not update the size of the NULLS indicator. In some cases, there will be problems. For example, when Structs as Array's children, ARRAY will calculate 4096 in a batch, and Structs will be more than 4096. If these None of the null in the struct, the size of the Nulls indicator will never be updated, which will cause the NULLS indicator size to not match the number of rows of columns. When passed to BE, the size of the memory copy will be determined according to the number of rows column. This will cause memory to cross the border and Crash.
What I'm doing:
Add Reserve operation to the OffHeapColumnVector.appendStruct method
What type of PR is this:

[x] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Does this PR entail a change in behavior?

[ ] Yes, this PR will result in a change in behavior.
[x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

[ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
[ ] Parameter changes: default values, similar parameters but with different default values
[ ] Policy changes: use new policy to replace old one, functionality automatically enabled
[ ] Feature removed
[ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

[x] I have added test cases for my bug fix or my new feature
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

[ ] This is a backport pr

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[x] 3.3
[x] 3.2
[x] 3.1
[x] 3.0
[x] 2.5

@miomiocat Can you review it?


info query - root password for containers (nrf, nssf, pcf, udm, ...)

Hi,
not an issue, just info query.
i wanted to install some packages on some pods/containers (mainly tcpdump for traffic inspection). I can instal it on on upf, since i can sudo there. But for rest of pods, it does not allowed me. And i don't know root password on those.
Is there a way to install some packages on those pods (root password ?)
Kudos for great work done !
thanks

I do not recommend you to modify a running container. Containers are not equivalent to VMs.
I would try to use a sidecar container with an image with the tools you need. Sidecar containers share network interfaces with the main containers.
Another option, if your deployment do not have security concerns, you can modify the container security context to make it run as root:  https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
You will find a value in the helm chart to modify the security context:
https://github.com/Gradiant/openverso-charts/blob/4ad6e7b6a24dad4dd213b0070fb5b78b69ca5ceb/charts/open5gs-amf/values.yaml#L252
However we have not test it.


Infer erlang version (when asdf)

We can infer the current version of erlang using asdf current erlang if the env variable ASDF_ERLANG_VERSION is not set.

Looks good to me, thanks!

I'll mention that the rebar3 (Nitrogen 3.0) will pretty soon be merging into the master branch, and which point, these scripts will remain as a rebar2/Nitrogen 2 branch. And ASDF should be better supported out of the box with the new functionality and reliance on rebar3 :)

Thank you! Can't wait to test 3.0!


Review Inheritance Hierarchy of MicrosoftStsAccount

Per earlier conversation, do we want MicrosoftStsAccount to extend AzureActiveDirectoryAccount?

I took at look at this.  I think we should follow the pattern that we've introduced for other shared artifacts.  That is introduce a "MicrosoftAccount" (as possibly confusing as that could be) and have both MicrosoftSTSAccount and AzureActiveDirectoryAccount inherit from that.  Feel free to assign this refactoring to me if you like.

@iambmelt FYI - Added comment.

Done, see #72 @ b345ffe8fa6a4a371294e00b4f45624b040056a4


Fix razor compilation error for mixed event handler content (#1530)

If a event Handler contained a mixture of c# and html content the compilation failed. Now it compiles down to a c# template string.
<button onclick="alert(@(a)b)">...</button>
turns into
$"alert({a}b)"
I also renamed the other test I created in my last PR for consistency.
fixes #1530

@adrian109 Here's the fix I promised in #1577

@SteveSandersonMS Any update or feedback on this?

We should talk a bit more about this scenario before taking any action. We're concerned about the potential for XSS issues if we enable this scenario.

@danroth27 What do you think we should do to combat this issue?

@BickelLukas We might completely disallow using C# expressions in event handler attributes unless you specifically signal that you know you are rendering some raw JavaScript.

@danroth27 Do you have a proposal on how users might me able to do that?

@BickelLukas We might need a new primitive similar to how we support rendering raw HTML in components today: https://blazor.net/docs/components/index.html#raw-html

For now I'm going to close this, because as-is this would introduce XSS vulnerabilities. If @BickelLukas or anyone else would like to propose a newer version that addresses the XSS concern by using MarkupString or similar, it can be posted to https://github.com/aspnet/aspnetcore. Hope that's OK!


Hyphenated CSS properties not read/set

My getPrefixedProp utility is not working properly with hyphenated CSS properties like background-color and border-radius.
The fix should be adjusting the whiteSpace RegEx on line 6 to include hyphens

      camelRegex = /(?:^\w|[A-Z]|\b\w)/g,
-     whiteSpace = /\s+/g;
+     whiteSpace = /[\s-]+/g;

  function camelCase(str) {

Demo

Fixed in v1.3.1


Frontend cannot compile in ARM

Feature Request
Is your feature request related to a problem? Please describe:
In ARM processors the frontend cannot compile.
Describe the feature you'd like:
Support compiling in ARM.
Describe alternatives you've considered:
Teachability, Documentation, Adoption, Migration Strategy:

Seems we need an Apple M1 as a test machine 🤔

@baurine The error happens when executing yarn install, which will result in Node.js segment fault.

This should be an upstream error.
refs: https://github.com/nodejs/TSC/issues/886, https://github.com/nodejs/build/issues/2474,  https://github.com/nodejs/node/pull/35986


(WIP) Add name registration regtests

TODO: Finish adding them.

The "Avoid redundant wallet load operations" and "RPC client: exit code 1 if RPC server returned error" commits are no longer necessary; they were merged upstream and have filtered down to Electrum-NMC master.

The "Avoid redundant wallet load operations" and "RPC client: exit code 1 if RPC server returned error" commits are no longer necessary; they were merged upstream and have filtered down to Electrum-NMC master.

Removed them from this PR.

The "Disable Lightning regtests" commit is no longer necessary, because Electrum-NMC master now passes the Lightning regtests.

The "Disable Lightning regtests" commit is no longer necessary, because Electrum-NMC master now passes the Lightning regtests.

Removed it from this PR.

@domob1812 It looks like broadcasting a name_new transaction with the default fee causes Namecoin Core to error with "insufficient fee" when done on Regtest.  Are there any fee logic/constants in Namecoin Core that behave differently between Mainnet and Regtest?

@domob1812 It looks like broadcasting a name_new transaction with the default fee causes Namecoin Core to error with "insufficient fee" when done on Regtest. Are there any fee logic/constants in Namecoin Core that behave differently between Mainnet and Regtest?

Figured out the issue; I had forgotten that Electrum doesn't add broadcasted transactions to the wallet until a few seconds after broadcast (when the server announces them), so Namecoin Core interpreted my 2nd name_new as a double-spend, i.e. the "insufficient fee" error was in relation to the lack of an RBF fee bump, not the fee itself being too low to relay.

@domob1812 If you happen to have some free time, feel free to glance at this PR.  It tests name_new, name_firstupdate, and name_show, and is loosely based on the first half of the name_registration.py functional tests in Namecoin Core.  It already surfaced a few minor bugs in Electrum-NMC, which are also fixed in this PR.  I plan to merge it in circa 1-2 days, so don't feel obligated to review it -- but I figure you might find it interesting.


Pacing fix

Github Issue (if applicable): --
Trello Link (if applicable): --
Forum Link (if applicable): --
Explanation of Bugfix/Feature/Enhancement:
Updated code to account for YNAB’s sticky credit card payments change, preventing an javascript error which caused the pacing values not to appear.
Recommended Release Notes:
Bugfixes.

Thank you!


livebook: Use mix release to build instead of escript

Description of changes
The current build of livebook does not work with the new Livebook Teams features. The problem can be observed by running the current version of livebook, adding a new team and going to the team page. The process will crash and the team page will show a 500 error.
The base of the problem is that the escript build method is not officially supported. This commit changes the livebook package to use the mix release workflow, which is also the one used to build the official Docker container.
Unfortunately, the binary built with mix release does not support command line arguments like the escript binary does. Instead, users need to pass in most of the configuration as environment variables, as documented here. As a result, this commit also changes the Livebook service to reflect this new way of configuring Livebook.
Finally, the Livebook release configuration specifically excludes the ERTS (Erlang Runtime System), which means that the resulting release cannot run without Erlang installed.
I have tested the results (both of the package and the service) locally.
cc. @NixOS/beam
Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

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

This looks good to me, leaving this open for a bit to give others the chance to have a look.

GitHub ate my comment on the change, so I'll post it here.

I think the separation [between environment and environmentFile] makes sense.

Does it, though?  I think I'd be pretty confused as a user if I saw both of these options.  It would not at all be obvious to me that you're supposed to use both, one for secrets and one for other options.  I'd also be wondering how the two options merge.
How about not having the environment option at all and instead documenting the use of pkgs.writeText to inline the options in the nix file?  We can then add the appropriate warning about storing secrets in the nix store in the docs.

GitHub ate my comment on the change, so I'll post it here.

I think the separation [between environment and environmentFile] makes sense.

Does it, though? I think I'd be pretty confused as a user if I saw both of these options. It would not at all be obvious to me that you're supposed to use both, one for secrets and one for other options. I'd also be wondering how the two options merge.
How about not having the environment option at all and instead documenting the use of pkgs.writeText to inline the options in the nix file? We can then add the appropriate warning about storing secrets in the nix store in the docs.

Perhaps some of that can be alleviated using documentation?
Also, I will note that there is plenty of precedence for this.

Actually, yeah!  Those are  good examples. Compare oci-containers with vaultwarden.
The former looks pretty bad: you've got two very similar sounding options and, if you're a user, it's not at all clear what you should configure where.  The latter documents what the point of environmentFile is.  I'd be fine with expanding the options documentation like this.  We actually have a comment to this extent in the manual, but there's no link from the options to the manual.
So, if we don't want to get rid of environment, I'd say we should at least copy some of the manual text into one of the two options, and also clarify in the warning in the manual that the two options have different security implications.

Great suggestions, I'll do that later today :+1:

Also, I'm trying to run this locally, but I'm seeing errors when pulling in dependencies (i.e. when evaluating a notebook with dependencies that need to be downloaded and compiled):
$ LIVEBOOK_PORT=8082 LIVEBOOK_IFRAME_PORT=8083 result/bin/livebook start

We used to add Elixir to the PATH through wrapProgram and we also added some Rebar3 path.  It looks like we need to add those to the service now.

We used to add Elixir to the PATH through wrapProgram and we also added some Rebar3 path. It looks like we need to add those to the service now.

Hm, that shouldn't be necessary now that I've included the erts, but I'll take a look at it. Thanks for trying it out.

The Livebook dependency mechanism is built on top of Mix.install and that wouldn't be included in erts.

You're right, I can reproduce on my own machine. Will fix.

We used to add Elixir to the PATH through wrapProgram and we also added some Rebar3 path. It looks like we need to add those to the service now.

I don't understand why Rebar3 is needed. Is it just an extra precaution, or is there something I am not aware of?

Works for me too.  I tried some of the Learn notebooks and also a few of my own.
I can't try the Teams feature because I'm not in the beta.

I also need the "Livebook Teams key" that you have.

Alright, the teams stuff works for me too.

are you both satisfied with the module ?
(personally I am, I just want to make sure we are good to go).

No, I still have some documentation fixes to make. Additionally, the original issue that was caused by using escript has actually been fixed, so the teams functionality works even without this PR, at least once there's a new release of Livebook. I am unsure if we'd rather stick to the old way of doing it (accepting that the teams feature does not work until there's a new release), or merge this PR and change how livebook is built.

I don't have a strong preference, but I do like the mix release process from this PR a bit more because it makes some functionality like remote IEx shells available out of the box.

I don't have a strong preference, but I do like the mix release process from this PR a bit more because it makes some functionality like remote IEx shells available out of the box.

I've stuck with the mix release version and updated the documentation now. Please take a look at your convenience :-)

Awesome!  Looks good to me.

@happysalada I think we are ready to merge :champagne:

@Munksgaard can you rebase to fix the conflict?

Thank you both for your efforts on this!


Are .Include/.ThenInclude supposed to work with Select in RC1-final?

Quick question: I can't populate navigation properties (they stay null), even using include (and theninclude) whenever I use select(). I can provide sample code if required. Are they supposed to work in RC1-final?
Sample query:
db.CarParts.Include(cp => cp.Car).ThenInclude(c => c.Drivers).Where(cp => cp.ProductionBatchExternalCode == "PB001" && cp.Car.Drivers.Any(d => d.UserId == 1)).Select(cp => cp.Car)
Thanks!

There is a know issue of Include not working with navigations for some cases. Workaround could be to split your filter into two calls, perform first one on the server a d the second one on the client. This is not ideal, because you will get unnecessary rows to the client, but should work.
db.CarParts.Include(cp => cp.Car).ThenInclude(c => c.Drivers).Where(cp => cp.ProductionBatchExternalCode == "PB001").ToList().Where(cp => cp.Car.Drivers.Any(d => d.UserId == 1)).Select(cp => cp.Car)

I'm having a problem with include as well. Not sure if it's the same problem:
_ctx.UserLogins.Where(l => l.auth_server_id == authServerId && l.login_id == userId)
                    .Select(l => l.Person)
                    .Include(p => p.Person2Roles).ThenInclude(p2r => p2r.Role)
                    .SingleOrDefault();

The generated SQL seems way off:
SELECT TOP(2) [l.Person].[id], [l.Person].[email], [l.Person].[handle], [l.Person].[name]
FROM [com].[user_login] AS [l]
INNER JOIN [com].[person] AS [l.Person] ON [l].[person_id] = [l.Person].[id]
WHERE ([l].[auth_server_id] = @__authServerId_0) AND ([l].[login_id] = @__userId_1)

It doesn't do the sub query and for some strange reason it is doing a TOP(2) ?!?!

Try applying includes first and then filter and projection. Including out of projection makes more query and EF can't handle it currently. Top (2) is due to SingleOrDefault. No need to pull more rows because it will throw if there is more than one anyway.

@maumar Thanks for the advice and explanation of TOP(2). I altered the query as you suggested but the generated SQL is still not grabbing the roles:
SELECT TOP(2) [l.Person].[id], [l.Person].[email], [l.Person].[handle], [l.Person].[name]
      FROM [com].[user_login] AS [l]
      INNER JOIN [com].[person] AS [l.Person] ON [l].[person_id] = [l.Person].[id]
      WHERE ([l].[auth_server_id] = @__authServerId_0) AND ([l].[login_id] = @__userId_1)

In that case try:
_ctx.UserLogins
.Include(l => l.Person)
.ThenInclude(p => p.Person2Roles)
.ThenInclude(p2r => p2r.Role)
.Where(l => l.auth_server_id == authServerId && l.login_id == userId)
.SingleOrDefault().Person;
It seem that EF can't deal with navigation projection in conjunction with include at all. This way, the projection will happen on the client so it should further simplify the query plan.

@maumar Yes, that does work. It produces 2 DbCommands and gets all the needed data. I wouldn't have thought to skip the projection. Thank you.
I wonder if this way of writing the query works out a bit faster w/o the select() even once EF is able to handle it correctly.

The drawback of doing projection on the client is that EF needs to pull entire UserLogin entity to the client, even though you don't necessarily need it for your query. If UserLogin has a big binary column, that could impact performance. In general, the more you can do on the server the better, but the difference should be fairly small for most queries like these

Makes sense. Thanks again!

We discussed in triage and concluded this isn't something we plan to support. Taking the original query as an example, the Include/ThenInclude operators here are saying "when you return CarParts in the query, include the relates Cars and their related Drivers". Because the query is then changed to return Cars rather than CarParts, this is ignored.
db.CarParts
    .Include(cp => cp.Car).ThenInclude(c => c.Drivers)
    .Where(cp => cp.ProductionBatchExternalCode == "PB001" && cp.Car.Drivers.Any(d => d.UserId == 1))
    .Select(cp => cp.Car);

We do eventually want to make the following work, where you can specify includes on the query after you have changed the result type. But this does not work yet.
db.CarParts
    .Where(cp => cp.ProductionBatchExternalCode == "PB001" && cp.Car.Drivers.Any(d => d.UserId == 1))
    .Select(cp => cp.Car)
    .Include(c => c.Drivers);

Until we enable the above scenario, the best option, is to swap the query around to be rooted on the type you intent to return (Car).
db.Cars
    .Include(c => c.Drivers)
    .Where(c => c.Parts.Any(cp => cp.ProductionBatchExternalCode == "PB001") && c.Drivers.Any(d => d.UserId == 1));

Opened https://github.com/aspnet/EntityFramework/issues/5332 to warn when we ignore includes like this

FYI, this issue is worse and cannot be solved nicely AFAICT, if we want to do partial properties selection from an entity, for example: Select(x => new { x.Property1 }
However, it's very important (application-wise) to take just some specific property(ies), because other column(s) will contain binary data/unwanted on the client


Link outs to RNA central

We don't appear to have these, I was sure that we did!
@mah11   can you look into ? Presumably a config file update?

I've had a quick look and it seems to be a database issue - the RNAcentral IDs aren't being stored correctly.  I'll debug and fix it in the morning.

The problem was that the data file from RNAcentral used to look like this:
URS0000D656DF   POMBASE SPNCRNA.1708  4896    sRNA    SPNCRNA.1708
URS0000D656E3   POMBASE SPNCRNA.98    4896    sRNA    SPNCRNA.98
URS0000D656EA   POMBASE SPNCRNA.1710  4896    sRNA    SPNCRNA.1710
URS0000D656EB   POMBASE SPNCRNA.445   4896    snoRNA  SPNCRNA.445

but now looks like this:
URS0000D656DF   POMBASE SPNCRNA.1708.1  4896    sRNA    SPNCRNA.1708
URS0000D656E3   POMBASE SPNCRNA.98.1    4896    sRNA    SPNCRNA.98
URS0000D656EA   POMBASE SPNCRNA.1710.1  4896    sRNA    SPNCRNA.1710
URS0000D656EB   POMBASE SPNCRNA.445.1   4896    snoRNA  SPNCRNA.445

I assumed the column 3 was a gene ID column but it was actually a transcript ID column.  When RNAcentral changed the IDs by adding a ".1" the URS IDs got lost in the database - they were attached to the transcript features rather than the gene features.  It's fixed now by using column 6 instead.
The external links should be on the main site by the morning.

Right! thanks for fixing so quickly.... (I rarely look at RNA pages!). I was looking at this for something to do with japonicus, but I can't remember what now...


Access to sent and received data?

Hi, I really like your VPN service. I am looking to be able to see the actual HTTP request and response. I know this can be done in the main activity, where the request is made, but I want to do it through the VPN service.
As an example, say this was the URL: https://jsonplaceholder.typicode.com/todos/1
I'd like to get from the VPN service that URL as well as its response:
{
  "userId": 1,
  "id": 1,
  "title": "delectus aut autem",
  "completed": false
}

as well as the request and response headers.
Do you know how I might achieve this?

Maybe you can visit this address: https://github.com/huolizhuminh/NetWorkPacketCapture

i dont know~


Add callbacks mechanism to Trainer class

Issue #, if available:
#706
Description of changes:

added Keras/PyTorch Lighting style callbacks
refactored learning rate scheduler and model averaging as callbacks
added WarmStart, TerminateOnNaN, TrainingHistory callbacks
added turtorial on how to use Callbacks and write custom Callbacks

Todo:

add more tests
fix docs
think about removing the deprecation warning

To make sure that the training behaviour did not change I ran this script and made sure that the output is exactly the same as on the master branch:
from gluonts.dataset.repository.datasets import get_dataset
from gluonts.model.simple_feedforward import SimpleFeedForwardEstimator
from gluonts.mx.trainer import Trainer
from gluonts.evaluation.backtest import make_evaluation_predictions
from gluonts.evaluation import Evaluator

import random
import numpy as np
import mxnet as mx
np.random.seed(1)
random.seed(1)
mx.random.seed(1)
dataset = "m4_hourly"
dataset = get_dataset(dataset)
prediction_length = dataset.metadata.prediction_length
freq = dataset.metadata.freq

estimator = SimpleFeedForwardEstimator(prediction_length=prediction_length, freq = freq, trainer=Trainer(epochs=500))

pred = estimator.train(dataset.train, num_workers=None)
forecast_it, ts_it = make_evaluation_predictions(
    dataset=dataset.test,  # test dataset
    predictor=pred,  # predictor
    num_samples=100,  # number of sample paths we want for evaluation
)
forecasts = list(forecast_it)
tss = list(ts_it)

evaluator = Evaluator(quantiles=[0.1, 0.5, 0.9], num_workers=None)
agg_metrics, item_metrics = evaluator(iter(tss), iter(forecasts))
print(agg_metrics)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

I guess we can keep this as is for now and change it later if we think it makes things actually clearer.
From: Oliver Borchert @.>
Reply to: awslabs/gluon-ts @.>
Date: Monday, 3. May 2021 at 23:39
To: awslabs/gluon-ts @.>
Cc: "Zschiegner, Jasper" @.>, Comment @.***>
Subject: Re: [awslabs/gluon-ts] Trainer callbacks (#1168)
@borchero commented on this pull request.

In src/gluonts/mx/trainer/callback.pyhttps://github.com/awslabs/gluon-ts/pull/1168#discussion_r625384259:

   ----------

   epoch_no

       The current epoch (the first epoch has `epoch_no = 0`).

   epoch_loss

       The loss that was recorded in the last epoch.

   training_network

       The network that is being trained.

   trainer

       The trainer which is running the training.

   Returns

   -------

   bool

       A boolean whether the training should continue. Defaults to `True`.

   """

   return True

One downside to that is that, potentially, not all callbacks are called. If the first one throws an exception and the second one logs progress at the end of each batch/epoch, it is not called. It's not too much work to catch and re-raise in the CallbackList though.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/awslabs/gluon-ts/pull/1168#discussion_r625384259, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AABAUZD4UTHYKUVNEPCGCO3TL4JTZANCNFSM4UAYXNJQ.
Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879

how will this work with gluonts.mx.deeparestimator instead of simpleforwardfeedestimator


Adding MLM and Multitask Finetuning Adaptation

@EricHallahan FYSA

I've been working on this PR after talking to Lintang about it!
MLM should now be good to go, pretty much (I tested that loss goes down, but haven't had the GPUs to try training a 125m param model using it yet.) I'm still working on the MTF implementation.
I was wondering if there'd be interest/GPUs available for training some models using the MLM code a la the new OpenAI paper (https://arxiv.org/pdf/2207.14255.pdf) -- InCoder exists and was trained this way, but there's no English LM that has been trained this way + is publicly available.
@StellaAthena lmk if this would be feasible! I could take care of all the training, just don't have the GPUs available.

Merging this into a separate branch for the time being.


Consective 1q param gates

Summary
Two or more Pauli rotation gates (Rx, Ry, Rz) that contain the parameters will be combined together.
Details and comments

That's a great extension! Does this also collect cases where other single qubit gates are in between Pauli rotations, like RY(a) H RY(b)? And can we extend this to cover other parameterized single qubit gates like P (and ideally also U)?

I am wondering if the CommutativeCancellation pass also tries to do something similar?

hi @rafal-pracht are you still working on this?


Licenses of published surface in download

When downloading a surface, the license should be part of the download.
Suggestion: We add a paragraph to the README file with a license statement and a link.

Now we have both: A link in the README.txt file and an explicit LICENSE.txt.
The LICENSE.txt file has CRLF line endings. Last related commit: ab3124b20d63b93732f7618851c0ddf883891f83
Closing.


peerpod-ctrl controller pod crashed

Try to deploy peerpod-ctrl with command make deploy. The controller pod is not running:
confidential-containers-system   peerpod-ctrl-controller-manager-5d64f7bc59-cw6pn         1/2     CrashLoopBackOff   38 (3m39s ago)   172m

Error is as bellow:
failed to create containerd task: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/manager": stat /manager: no such file or directory: unknown

Extract image quay.io/confidential-containers/peerpod-ctrl:latest, and there is no /manager
Check the image push action last week: https://github.com/confidential-containers/cloud-api-adaptor/actions/runs/5998707765/job/16267734278
I doubt it's not built from the correct Dockerfile for peerpod-ctrl?

@bpradipt

I can confirm this. I ran into the same issue, there is some mixup, this containers appears to container binaries from cloud-api-adaptor in /usr/local/bin

I did some investigation.
We set working-directory as "peerpod-ctrl" for jobs.run by default. However, it seems just applied for steps.run according to https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#defaultsrun:
"You can use defaults.run to provide default shell and working-directory options for all run steps in a workflow."
So steps.uses "docker/build-push-action@v3" is not running in directory "peerpod-ctrl", but the directory of "cloud-api-adaptor". As a result, docker build image with the Dockerfile of "cloud-api-adaptor"
I tried a fix to set context as "peerpod-ctrl": https://github.com/confidential-containers/cloud-api-adaptor/pull/1404
Not sure if we still need specify Dockerfile path via file. I don't have the permission to run a workflow to verify the fix.
@snir911 , can you help with it?

Try to run the workflow from a branch (because we don't have a chance to change the files under peerpod-ctrl on main branch): https://github.com/confidential-containers/cloud-api-adaptor/actions/runs/6104713559
New image quay.io/confidential-containers/peerpod-ctrl:latest has been built and pushed.
Verified the peerpod-ctrl-controller-manage pod can be running in my cluster. I'm OK to close this issue.
by the way, @snir911 do we have a plan to create similar workflow for peerpodconfig-ctrl? And currently the image quay.io/confidential-containers/peerpodconfig-ctrl:latest seems not public?

@genjuro214 I think we need one, IDK if there's issue for that, we should have one if not.
cc @jensfr ^


go get tidb version

I'm not sure whether I should file here or in docs. But I follow the document to start using the go client
go get github.com/pingcap/tidb@master
go build

go get downloads<EMAIL_ADDRESS>The during go build, it gives out this error:
/tidb@v2.0.11+incompatible/store/tikv/kv.go:28:2: unknown import path "github.com/pingcap/pd/pd-client": cannot find module providing package github.com/pingcap/pd/pd-client
I fix this problem by reinitialize the project with
go get<EMAIL_ADDRESS>

@photoszzt Thanks for your feedback!
I tried to reproduce this problem but it failed. Can you paste your go.sum related to pd and tidb? And what is your go version?

@rleungx my go version is go version go1.11.5 linux/amd64
The go.sum that relates to pd and tidb are follows:
github.com/pingcap/pd v2.1.0-rc.4+incompatible/go.mod h1:nD3+EoYes4+aNNODO99ES59V83MZSI+dFbhyr667a0E=
github.com/pingcap/tidb v0.0.0-20190222104944-266ff4b6f37e h1:xQs5Ok4Izhg9kyoJDOvZpEUIo/4xawOAM0KErQFIe0A=
github.com/pingcap/tidb v0.0.0-20190222104944-266ff4b6f37e/go.mod h1:TJqjPfIfyYi+n93XFa46sxy1ckox9BZh++b4RPorK3U=
github.com/pingcap/tidb v2.0.11+incompatible h1:Shz+ry1DzQNsPk1QAejnM+5tgjbwZuzPnIER5aCjQ6c=
github.com/pingcap/tidb v2.0.11+incompatible/go.mod h1:I8C6jrPINP2rrVunTRd7C9fRRhQrtR43S1/CL5ix/yQ=

@photoszzt Sorry for the late reply. This indeed a bug when using the transaction API as the documentation says. I am trying to find out why it happens.

@photoszzt Can you try to replace"github.com/pingcap/tidb/terror" with "github.com/pingcap/parser/terror" to check if it can work?

@rleungx Unfortunately, it still not fix it. This time I can compile but the application failed to function. I keep geting this error:
ERRO[0000] batchRecvLoop error when receive: rpc error: code = Unimplemented desc =
INFO[0000] batchRecvLoop re-create streaming success
But with the original terror, there's no such problem.

@photoszzt Which version do you use?  I will try the master version.

@rleungx I try the version on master. It works. I think it's better to match the release version for the client API unless people are expected to compile code from master.

Thanks @photoszzt
Maybe it is better to check all versions at first, we will consider this in tikv/client-go.

I used tikv v3.0.0-beta.1. "batchRecvLoop error" was not output.

@kamijin-fanta Thanks for your feedback!
Can you explain more about your operations? Have you followed the instruction here? I am not very clear about your question.

@rleungx tikv/go-client calls BatchCommands RPC. This was implemented for the first time in TiKV version 3.0.0-beta.1. I launched TiKV with docker, followed the guide and created a client with tikv.NewRawKVClient.
Caller:
https://github.com/tikv/client-go/blob/2130e26d4f3a98347108373827d14c1f5a3c595c/rpc/client.go#L113
Implementation:
https://github.com/tikv/tikv/blob/v3.0.0-beta.1/src/server/service/kv.rs#L848
And I was success to connect to the old version server by executing config.MaxBatchSize = 0.

@kamijin-fanta To make things more clear, you followed the instruction and run the example of the raw client. But it failed with outputting nothing, am I right?

seem if we disable batch message with config.MaxBatchSize = 0, we can connect to the 2.1 version of TiKV.
Please verify it @rleungx

@kamijin-fanta You can try the latest master version. Batch messages disabled by default.

Now we can use v2 version. Closing this issue.


1024x1024 model question

Hi. Do you plan to release 1024x1024 model?
Or it can be done modifying code to cascade all models?
Cause, I think it is better to not downscale images to 128Pixels.
Thank you very much in advance

1024x1024 model
According to the 64 to 512 super-resolution task, it needs a large mount of model parameters to recover adequate images information. I am afraid not to train 1024x1024 super-resolution model since GPU devices limitation in a short time.
cascade all models
For the current pre-trained models, it can not be cascaded directly. You may need to train yourself for new tasks : )

ok.
could you please tell me, how to test your code on 512Px cropped face images without downscale them if possible. Thanks

I did not understand it, which means to upscale a 512x512 images to more higher resolution one?

I already cropped faces with onother project(GFPGAN) to 512Pix. Now, what I want is to try your code on those images without changing resolution. I want enhance faces to be in same resolution (512x512pixels). Then I will pasteback those faces directly from GFPGAN. If it is not possible, please tell me ways I can do it. If output face photo must be upscaled, no problem, I will downscale it with photoshop.

I see. You can directly execute tasks in 512Pixels images, since the model get a super-resolution result from 512Pixels" low-resolution" image. You should change the config  to "mode": "HR", // whether need LR img and commented all code about
LR or lr likelr_img = Metrics.tensor2img(visuals['LR']);  in sr.py.

when I commented that line everything goes OK until
21-09-12 15:40:59.820 - INFO: Begin Model Evaluation.
sampling loop time step: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2000/2000 [05:54<00:00,  5.64it/s]
Traceback (most recent call last):
File "C:\Users\KaMi\SR3\sr.py", line 150, in
hr_img = Metrics.tensor2img(visuals['HR'])  # uint8
TypeError: 'NoneType' object is not subscriptable

Actually we take 512Pixel image as SR and ignore LR, but we also need HR to calculate SSIM in vanilla method. You can commented all code about SR or copy SR image to HR image as ground truth.

I successed it. But with model that correspond 64x512 results are too sharp and not much better from original.
Could you please suggest me which model best suits my case? Or how to upscale photos other than 512 pixels? is that possible?
thanks

I think this has something to do with the unstable pre-trained model. I have some suggestion  about it:

retrain it with adequate model parameters.
sample from SR rather than random noise in validation, which need change the code img = torch.randn(shape, device=device) to img = x in sr3_modules/diffuision.py, Line 191, then adjust the timesteps range.
use more timesteps than 2000 directly.
use other super-resolution model.

Hi,
I tried your implementation and faced the problems of zelenooki87.
As you have experience in the field, can you please recommend other super-resolution model in particular that could work for this task?
Thanks a lot for your awsome code!

So sorry, I didn't know much about other models.
Maybe you can get them by rank in the https://www.paperswithcode.com/ or the SOTA in some papers.

thank you very much for your reply, Janspiry!

Hello, thank you so much for your helpful reply! Very kind of you! Greetings

Hi
Can you please give some advice if you have succeeded with your task? What beta schedule have you used?
I'm trying to train 256->1024, with quite big dataset, loss is reducing but validation result same as after first epoch.

Hi
I could not make it work, sorry...the result was too noisy...I think the model needed much more images than i gave it.
I got good super-resolution results directly with this pretrained model, without training it myself:
https://github.com/yangxy/GPEN


Simple Same-Origin Requests Fail Due to Origin Check

When making a same origin GET request, the Origin header will not be sent by the client. However, because the module checks for the existence of that header, a 401 response is generated.
e.g. a GET request from a SPA at demo1.example.com/orders to an api endpoint at demo1.example.com/api/v1/orders will fail because the Origin header is not set.
Should the origin check be disabled for non-cors requests?

Had the same #24
I ended up tweaking the code to ignore origin checks if header does not exist.
after all, cors is a ua security enforcement so we have to trust the browser logic.

Thanks for pointing this out. We will be providing a new release with a fix in the coming days, once we've done some testing.


Replace references of "HTMLbars" with "Glimmer"

Replaces references of "HTMLbars" with "Glimmer"
Fixes link to license that pointed to LICENSE in tildeio/htmlbars

Unfortunately, ARCHITECTURE.md is largely outdated at this point :P Maybe we should just delete it for now so no one would be confused? We can always get it back from version control and update it when things stabilizes

@chancancode makes sense to me if you think it will be misleading. I just read through it and assumed it was up to date so I was mislead :smile:
I moved the change outside of ARCHITECTURE.md to https://github.com/tildeio/glimmer/pull/18

I put up another PR that removed this doc entirely. The choice is yours :smiley:  https://github.com/tildeio/glimmer/pull/19


Unable to get adb server connected to docker HA

Home Assistant release with the issue:
0.90.2
Last working Home Assistant release (if known):
Unknown
Operating environment (Hass.io/Docker/Windows/etc.):
Home Assistant docker (unraid)
ADB server on ubuntu vm (unraid)
Component/platform:
media_player.androidtv
adb connectivity
Description of problem:
So my setup is above but after setting up the component, connecting the fire sticks to the server and restart hass it says that its failed to connect. I have tested it locally with HA running on that same vm as adb and it works using localhost, but no luck between servers. Below is my setup. The adb path is white listed.
config:
- platform: androidtv
  name: sandra firetv
  host: <IP_ADDRESS>
  adb_server_ip: <IP_ADDRESS>
  adbkey: "/config/firetv/adbkey"

- platform: androidtv
  name: mike firetv
  adb_server_ip: <IP_ADDRESS>
  host: <IP_ADDRESS>
  adbkey: "/config/firetv/adbkey"

(ubuntu vm adb server)
mike@ubuntuvm:~$ adb devices
List of devices attached
<IP_ADDRESS>:5555	device
<IP_ADDRESS>:5555	device

Wed Mar 27 2019 17:58:55 GMT-0400 (Eastern Daylight Time)
Could not connect to mike firetv at <IP_ADDRESS>:5555 using ADB server at <IP_ADDRESS>:5037

I'm seeing something very similar to this. I have an ADB server. The ADB server can manually connect to my Shield. But Home Assistant can't connect through the ADB server.
Could not connect to Shield at <ip>:5555 using ADB server at <ip>:5037
7:44 AM custom_components/androidtv/media_player.py (WARNING)

(The custom component is the media_player.py from this PR. I was wondering if there were improvements in there so I tried to update it just in case it would work)
Config:
media_player:
  - platform: androidtv
    name: Shield
    host: <shield ip>
    adb_server_ip: <adb ip>

What can I do to help?

I believe I read a while back that the pure-python-adb package only worked when the ADB server is on the same machine. It sounds like yours is on a different computer. I assume your reason for this is because you're not using Hass.io and so you can't use the addon. However, you can still run an ADB server. As an example of how to do this, see this post: https://community.home-assistant.io/t/native-support-for-fire-tv/64448/300
Also, you don't need adbkey in your config when using an ADB server. It doesn't hurt anything, it's just unnecessary.

@JeffLIrion Brilliant! That is exactly what is happening. Manually connecting in the ADB container, and then connecting with Home Assistant works. Looks like I just need to add that script to it and it should work on boot.

@JeffLIrion Thats correct as stated in the OP, HA is a docker and then I have adb on a ubuntu server. Same machine but different ips.

Is there any retry logic with this component? Or at a higher level?
My case: if my ADB container drops out, HA disconnects from that media player. I need to reboot HA in order for the connection to be re-established between HA and the ADB server.

@aav7fl so are you saying you got it to work with adb and hass being on different systems? If so mind helping me out?

@mkono87 Yea, I used the script here to connect the ADB server to my device. Then, once the ADB server is connected to the device, restart Home Assistant and it will pick it up on boot this time.
You can test this (before you go through the trouble of adding the script) by

manually running (in the ADB Server VM) adb connect <ip-address>:5555.
rebooting Home Assistant

So it's a bit manual.. but it does work.

@aa755 Just now, I found an adb docker container and it successfully connected to my device. Going to be testing to see if HA sees and connects as well.

Right... in my case, I'm not running Home Assistant or adb in a Docker container. Home Assistant is running on a RPi3+ in a Python venv, and I've fired up adb via "adb start-server" from the command line prior to restarting Home Assistant. Looking at 22485, it doesn't appear to apply to my situation.

@mmotley999, whether you're using Docker or not, the ADB server needs to be connected to your Android/Fire TV before starting HA.

@aav7fl @JeffLIrion forgive me but where does the script get placed?

@JeffLIrion Aha!  That I wasn't aware of.... and that was the ticket!  Seems to be working now.  I'll know more when I get home tonight and can test further.
Now time to put that into systemd.

@aav7fl im already able to connect the server to my devices, its just that HA cannot connect the server. I stated I tried it locally in venv on that same vm and it connects. So its something between server and HA docker causing as issue.

@mkono87 Hmm. I can only guess that there is something splitting the network inside of the VM. Or maybe the docker for HA isn't running on the host network setting.

@aav7fl Ha has been host since day one so not sure. The vm is set to br0

@aav7fl sorry my bad I was able to get it work with and adb container that has alpine as its base. Not sure how to add the script to run at start? Any ideas?

Yea. So I wrote mine like this:
startup.sh
#!/bin/sh

sleep 5

DEVICES="<device ip>"

echo "Connecting to devices."
for device in $DEVICES; do
   adb connect $device
done
echo "Done."

while true; do
  for device in $DEVICES; do
    adb connect $device > /dev/null 2>&1
  done
  sleep 60
done

placed it in /root/.android/startup.sh (because I'm too lazy to put it somewhere else)
and then added this config piece to my docker-compose file.
It overrides the commands of that image, re-issues it, and then runs the script as well connect to the device.
  adb:
    container_name: adb
    restart: always
    image: sorccu/adb
    # privileged: true
    command: sh -c "/root/.android/startup.sh & adb -a -P 5037 server nodaemon"
    volumes:
      - /srv/adb:/root/.android
      # - /dev/bus/usb:/dev/bus/usb
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - 5037:5037

@aav7fl, @mkono87, @mmotley999 I think it would be really helpful to document all of this somewhere.  I think that the Android TV documentation page is already pretty full, so I created a page in the androidtv package documentation.  If you could submit pull requests (to the adb-setup-documentation branch) that document

1b) Docker Container
1c) Linux Service

that would be really helpful!  And then we can link to this page from Home Assistant's Android TV documentation page.
Here is the rendered page: https://androidtv.readthedocs.io/en/adb-setup-documentation/adb_setup.html
And here is the .rst file for editing: https://github.com/JeffLIrion/python-androidtv/blob/adb-setup-documentation/docs/source/adb_setup.rst

I actually made a PR here last night so we wouldn't have to worry about it anymore. So if it fails, it will just go into a retry back off until it's ready. Is the documentation change still requested?
https://github.com/home-assistant/home-assistant/pull/22515

That's certainly an improvement. But I think that instructions on how you setup your Docker container would be really helpful.
If you'd like to submit Docker instructions to the HA documentation page, feel free to do so and I can copy them from there. But as I mentioned, I think there's already a lot of info there and my concern is that adding more would overwhelm users.

@JeffLIrion, I'll be happy to give it a try to update the Linux service piece, as I have a working one. I've never done a PR before, so bear with me if I make a mistake.

https://github.com/fullygit/fullygit

@JeffLIrion, I'll be happy to give it a try to update the Linux service piece, as I have a working one. I've never done a PR before, so bear with me if I make a mistake.

@mmotley999, no worries!  The easiest method is to probably edit the file in your browser.
adb_setup.rst

I dont use docker compose as I usually use the built in community app repo on Unraid. I think il have to figure out how to make my own docker file to add the script into. I think that it my only thing stopping me from the perfect setup. Other than that I would have to move my HA to a venv on another machine and have everything local together.

@mkono87 see the Docker section: https://androidtv.readthedocs.io/en/adb-setup-documentation/adb_setup.html

@JeffLIrion @aav7fl  Great I was able to edit the dockerfile and put the script into and it connects to my devices. Only issue im having is transferring the keys over to the host.  Within the container I can only access it from ~/.android   but I can find the path of ~   Tried echo $PATH but still no luck Any idea?

I had to remove this section from the script:
while true; do
  adb -a server nodaemon > /dev/null 2>&1
  sleep 10
done &

because it was interfering with the startup command of the adb docker container I was using.
So with the modified script, I changed the docker command. My docker-compose.yaml file looks like this:
  adb:
    container_name: adb
    restart: always
    image: sorccu/adb
    command: sh -c "/root/.android/startup.sh & adb -a -P 5037 server nodaemon"
    volumes:
      - /srv/adb:/root/.android
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - 5037:5037

Only then was I able to connect to it from HA.

@aav7fl Was your problem that it wasnt starting? My container runs and connects to the devices. It was just Ha that couldn't connect. I edited the the dockerfile to look like this
FROM sorccu/adb:latest

ADD files/adbscript.sh /usr/bin
CMD ["/usr/bin/adbscript.sh"]

Should I be adding the command lines in there?
script looks like this now.....correct?
#!/bin/sh
sleep 5

DEVICES="<IP_ADDRESS>:5555 <IP_ADDRESS>:5555 <IP_ADDRESS>"

echo "Connecting to devices."
for device in $DEVICES; do
   adb connect $device
done
echo "Done."
#!/bin/sh
sleep 5

DEVICES="<IP_ADDRESS>:5555 <IP_ADDRESS>:5555 <IP_ADDRESS>"

echo "Connecting to devices."
for device in $DEVICES; do
   adb connect $device
done
echo "Done."

So my container did start, but for whatever reason it must've been running as a different user or as a daemon. So even though the log showed that it was connecting, HA could not connect through it.
Try changing the CMD to be ["sh -c "/root/.android/startup.sh & adb -a -P 5037 server nodaemon""]
Although I may have a the quotes wrong in that command^.
My full script is:
#!/bin/sh

sleep 5

DEVICES="<IP_ADDRESS>"

echo "Connecting to devices."
for device in $DEVICES; do
   adb connect $device
done
echo "Done."

while true; do
  for device in $DEVICES; do
    adb connect $device > /dev/null 2>&1
  done
  sleep 60
done

@aav7fl oh i thought you removved that 2nd part of the script though. This will sound silly but that /root/,android....is that on the host or did you create a custom image first?

I gets added through my docker-compose.yaml. In your case, it looks like you should use /usr/bin/adbscript.sh.

Hmm no dice. Container just shuts down after a second.  Console shows Error response from daemon: Container 02dfb11e8f454ed4d3bb906d8af7a6b16267a7ce4ad4458b6ae8c6bd46157144 is not running

@aav7fl okay so I tried the docker-compose way. These are my steps, hopef im doing it correctly. I edited the dockerfile and put the script in and created the image
#!/bin/sh

sleep 5

DEVICES="<IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS>"

echo "Connecting to devices."
for device in $DEVICES; do
   adb connect $device
done
echo "Done."

FROM sorccu/adb:latest

ADD files/adbscript.sh /usr/bin
CMD ["/usr/bin/adbscript.sh"]

Then I created a docker-compose.yaml with your example
  adb:
    container_name: adb
    restart: always
    image: adbserver:latest
    command: sh -c "/usr/bin/adbscript.sh & adb -a -P 5037 server nodaemon"
    volumes:
      - /srv/adb:/root/.android
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - 5037:5037
    net: "bridge"

When I restart HA, It gives me an error that it could not connect but now I have an additional error. Adb says my device is connected to the server.
ADB device is unavailable; encountered an error when searching for device.

I think that might the case where HA is trying to connect to the ADB server before the ADB server connects. Since there is no retry logic yet, it fails unless HA is restarted again with the ADB server already up.
I made a PR to fix that here: #22515

@aav7fl Okay I have restarted HA a few times with no success. I figured it would connect by now as the adb server has been running for a few mins. Everything on my setup looks in check correct? Sorry I dont mean to be such a bother lol

Try dropping the CMD from the docker file. You're already overriding it anyway. I'm also not too confident about the DEVICES="<IP_ADDRESS> <IP_ADDRESS> <IP_ADDRESS>"line in your script.
I'm not sure if listing multiple devices works there. You can always check the logs of the adb container to see what they say. Beyond that, I'm not sure what else I can do to help.

Fair enough.... I know it works as the logs say they are connected. @JeffLIrion posted a link earlier showing what it should be.
Wont lie, getting to a point where im just going to abandon it because its not worth the trouble. It should be much easier to use with HA than this.

Very odd tho   adding the container as is then manually adding the ip works with HA  just adding the script messes it all up

To be fair, this is beyond HA. It's using a debug server to talk to an Android device. It's not exactly the same as just connecting to a device's API directly. Try the Discord or Forums. There might be someone there who can help find issue better than I can.

Yeah your absolutely right. I posted on here thinking maybe it was a bug or something. Eventually il take a crack at it again. If it could work remotely. It would be golden, but it wasnt working when I put it on one of my ubuntu vms

@mkono87 try changing your DEVICES definition and your for loops to look like this:
DEVICES=("<IP_ADDRESS>" "<IP_ADDRESS>")

for device in ${DEVICES[@]}; do
  # something...
done

@JeffLIrion as im still learning   do I actually put #something and thats it?

See with this it connects on startup
`#!/bin/sh
sleep 5
DEVICES="<IP_ADDRESS>"
echo "Connecting to devices."
for device in $DEVICES; do
adb connect $device
done
echo "Done."
while true; do
for device in $DEVICES; do
adb connect $device > /dev/null 2>&1
done
sleep 60
done`
But HA is unable to connect to it. So I cant catch a break.

@JeffLIrion as im still learning do I actually put #something and thats it?

No, just change the way you define DEVICES and change for device in $DEVICES to for device in ${DEVICES[@]}

Nope just shuts down the container right away. The original way was the only way it connected and stayed running @JeffLIrion

I reworked the script to:
#!/bin/sh

echo "Start the server in background mode..."
adb -a -P 5037 server nodaemon &

echo "Sleep 10 seconds for the adb server to start"
sleep 10

DEVICES="<IP_ADDRESS>"
echo "Connecting to devices."
for device in $DEVICES; do
   echo "Connect to device: $device"
   adb connect $device
done
echo "Done."

echo "Foreground the server again..."

wait %1

But why is a separate ADB server needed?

I think it's needed because from that docker image uses /sbin/tini which changes the behavior of the command. Again, I think changing/overriding the entrypoint command also means we're not running it anymore without the script.. but I'm not very confident on these assumptions.


Dockerfile for CP

Dockerfile
from golang:latest
WORKDIR /app
RUN mkdir -p /app/node
RUN git clone https://github.com/swanchain/go-computing-provider.git && cd go-computing-provider
RUN cd go-computing-provider && git checkout releases
RUN cd go-computing-provider &&  make
ENV CP_PATH=/app/node
RUN sed -i 's/sudo //g' /app/go-computing-provider/install.sh
RUN apt update
RUN apt install python3-full python3-pip -y
ENV PIP_BREAK_SYSTEM_PACKAGES=1
RUN cd go-computing-provider &&  bash install.sh
ENV PATH=$PATH:/app/go-computing-provider
RUN apt-get clean
EXPOSE 8085

BUILD :
docker build -t swanchain .
Result :
[mohamed@l0c4lh0st node]$ dockebuild -t swanchain .
[+] Building 0.7s (15/15) FINISHED                                                                                docker:default
 => [internal] load .dockerignore                                                                                0.0s
 => => transferring context: 2B                                                                                0.0s
 => [internal] load build definition from Dockerfile                                                                                0.0s
 => => transferring dockerfile: 639B                                                                                0.0s
 => [internal] load metadata for docker.io/library/golang:latest                                                                                0.5s
 => [ 1/11] FROM docker.io/library/golang:latest@sha256:d5302d40dc5fbbf38ec472d1848a9d2391a13f93293a6a5b0b87c99dc0eaa6ae                         0.0s
 => CACHED [ 2/11] WORKDIR /app                                                                                0.0s
 => CACHED [ 3/11] RUN mkdir -p /app/node                                                                                0.0s
 => CACHED [ 4/11] RUN git clone https://github.com/swanchain/go-computing-provider.git && cd go-computing-provider                              0.0s
 => CACHED [ 5/11] RUN cd go-computing-provider && git checkout releases                                                                         0.0s
 => CACHED [ 6/11] RUN cd go-computing-provider &&  make                                                                                0.0s
 => CACHED [ 7/11] RUN sed -i 's/sudo //g' /app/go-computing-provider/install.sh                                                                 0.0s
 => CACHED [ 8/11] RUN apt update                                                                                0.0s
 => CACHED [ 9/11] RUN apt install python3-full python3-pip -y                                                                                0.0s
 => CACHED [10/11] RUN cd go-computing-provider &&  bash install.sh                                                                              0.0s
 => CACHED [11/11] RUN apt-get clean                                                                                0.0s
 => exporting to image                                                                                0.0s
 => => exporting layers                                                                                0.0s
 => => writing image sha256:9ad4baf186988b8ff6b1b708e17d9cb9d687bcbd6717279d60d03630bab9e1a6                                                     0.0s
 => => naming to docker.io/library/swanchain

usage :
[mohamed@l0c4lh0st node]$ docker run --rm -it swanchain computing-provider
NAME:
   computing-provider - Swanchain decentralized computing network client

USAGE:
   computing-provider [global options] command [command options] [arguments...]

VERSION:
   0.4.5+git.57c9d53

COMMANDS:
   init        Initialize a new cp
   run         Start a cp process
   info        Print computing-provider info
   account     Manage account info of CP
   task        Manage tasks
   wallet      Manage wallets
   collateral  Manage the collateral amount
   ubi         Manage ubi tasks
   help, h     Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --repo value   repo directory for computing-provider client (default: "~/.swan/computing") [$CP_PATH]
   --help, -h     show help
   --version, -v  print the version

mount volume for persistance :
docker run --rm -it -v ./node:/app/node swanchain computing-provider init --multi-address <IP_ADDRESS> --node-name dr4mohamed
docker run --rm -it -v ./node:/app/node swanchain computing-provider wallet new
edit config.toml and add cert and key and your public key and api MCS

@Normalnoise

Any problems have you encountered?

@Normalnoise  no, this pull request

Have you test it?

starting the node ?

@Normalnoise
docker run --rm -it -v ./docker-swan:/app/node -v ./letsencrypt:/etc/letsencrypt -v ./.kube:/root/.kube swanchain computing-provider run

thanks for your contributions, once it is tested, I will add it to our repo @dr4mohamed


Datapack issue in 1.20+

Although the mod loads in 1.20+, playing single-player always fails.
Trying to load an existing world results in the user being greeted by the following screen:

Errors in currently selected data packs prevented the world from loading.
You can either try to load it with only the vanilla data pack ("safe mode"), or go back to the title screen and fix it manually.

To be clear, the selected world need not have any non-vanilla data packs loaded for this to occur.
Trying to create a new world results in a crash.
The game crashed whilst mouseclicked event handler
Error: java.lang.BootstrapMethodError: java.lang.RuntimeException: Mixin transformation of net.minecraft.class_161 failed

Haven't tested multiplayer.

Both mod and datapack definitely need to be updated to 1.20.
Currently pretty busy with rl, but I hope I will get an update out in a week

1.20 is out!


Proposal: Networking v2

This proposal is an alternative to https://github.com/docker/docker/issues/8952.  Networking is tricky thing.  They're multiple ways to skin that cat.  The intention of this proposal is to define how we can rework the internals of Docker with respect to networking.   Before and after the implementation of this proposal, Docker should look and behave the same from a user perspective.  This proposal lays the groundwork for more networking modes, dynamic functionality, and cross server networking.
To quote @shykes, "The Docker API should be used to consume infrastructure - not define it."  Following this principal, the intention is to not expand the API of Docker such that users can supply all the information needed to address all the various networking modes that could exist.  For example, we do not want to dirty up the Docker API by adding bridge, mac address, VLAN ID, etc.  These are infrastructure concepts and should be delegated to a lower layer.  We should instead focus on hooks and plugins that will allow people to extend Docker and control these low level implementation details.
Before we can get into the guts of how I propose we rework the guts of Docker, we must first clearly define the higher level concepts that are defined to the user.
Concepts
Beyond network, links, and ports, no other concepts are exposed to the user to control the network.  This simplicity is by design as we wish to keep the user exposed networking concepts as high level as possible as to allow more flexibility in the lower infrastructure layers.
Network
Currently Docker has the concept of a network mode.     Whether one calls this "network" or "network mode," the implementation is the same, but I prefer to call it network (very minor detail).
The network is specified by a single string.  Currently Docker supports four values: none, host, container:id, or bridge.  One could imagine as we expand the networking of Docker we could support ovs, vxlan, bob, alice, dev, and prod.  The point being is that the value is some logical name that corresponds to a networking environment.  For example, when one is deploying their application they could say -net prod and that would go to a production network, or -net pci-compliant and that goes to a PCI compliant network.  The key idea is that the application owner does not need to have extensive knowledge of the underlying networking infrastructure but instead they can choose "network A" or "network B".  The underlying networking plugins to Docker can then setup the correct values for the user.
Links
Docker currently gives the ability to link two containers together.  This provides a basic yet very powerful form of service discovery.  Linking today is based on ports.  Port based linking is going to be deprecated and going forward the focus will be on IP based linking discovered through DNS (https://github.com/docker/docker/pull/8138).  This means that links will be looked up by name through DNS to resolve to an IP.  That IP should route to the target container.  This change to IP based linking means that the EXPOSE declarations in the Dockerfile are no longer taken into consideration for links (except for legacy compatibility).
Docker should allow for dynamically changing, adding, and deletion of links.
Ports
Ports are used as a way to expose the application ports to the hosts network.  If the port is not exposed it is assumed to be private from outside non-container traffic.
Implementation
Hooks
The expectation is that this change will come after Plugins (https://github.com/docker/docker/pull/8968).  While the below implementation describes interfaces, the same interface can be exposed to a hook through libchan and messages.
libnetwork
The majority of networking functionality should be moved to a new library called libnetwork.  This means code from Docker and libcontainer will move to libnetwork.  Both Docker and libcontainer should treat networking in an opaque fashion.  Docker will know about the user level constructs of network, link, and ports, but the data structures will be largely opaque.  libcontainer will also not be involved in networking except that it will launch a container in a network namespace setup by libnetwork.
Data Structures
NetworkSettings, Port, PortMap and any other supporting data structure in Docker will move to libnetwork.  Docker will depend on libcontainer and libnetwork.  There will be no dependency between libcontainer and libnetwork.  The existing data structures will largely remain as they are today except that a generic Data field of type map[string]interface{} will be added to NetworkSettings and PortMap to allow network drivers to track additional information.  The contents of Data should be ignored by Docker.
Network Driver
The key abstraction in libnetwork will be the NetworkDriver.  Below is the interface as I've currently defined it.  If needed we can decompose the interface to more interfaces if we feel it is too large in scope.
type NetworkDriver interface {
    Create(containerID string, networkSettings *NetworkSettings) error
    Start(containerID string, networkSettings *NetworkSettings) (Namespace, error)
    Stop(containerID string, networkSettings *NetworkSettings) error
    Destroy(containerID string, networkSettings *NetworkSettings) error
    Link(fromContainerID string, fromNetworkSettings *NetworkSettings, toContainerID string, networkSettings *NetworkSettings) error
    Unlink(fromContainerID string, fromNetworkSettings *NetworkSettings, toContainerID string, networkSettings *NetworkSettings) error
    ExposePort(containerID string, networkSettings *NetworkSettings, port Port, binding *PortBinding) error
    UnexposePort(containerID string, networkSettings *NetworkSettings, port Port, binding *PortBinding) error
    Supports(network string) bool
    Initialize() error
}

Network Driver Lookup
The network driver is looked up based off of the value to the -net parameter.  Docker will iterate through all registered NetworkDrivers calling Supports(string).  The first driver that returns true is used.  The implication of this behavior is that Docker can support multiple networking drivers at the same time.
Container IDs
Containers in libnetwork are represented by ID only.  Since libnetwork does not depend on Docker, no Docker data structures are used.  The container ID should be sufficient for tracking as the rest of the fields in Container should be arbitrary to the networking code.
Create()
When the create remote API on Docker is called, the container ID and an empty NetworkSettings object will be passed in to the NetworkDriver that was discovered based on the -net parameter.  The NetworkDriver should populate as many of the fields as applicable.  Some fields, like Bridge may not always be application and can be left empty.  The NetworkDriver should perform at this time any allocation tasks and pre-setup tasks, saving whatever state it needs in the Data field of NetworkSettings.   After the call to Create(), Docker should eventually persist the resulting NetworkSettings into the config.json
Start()
When a container is started Start() is called.  It is not expected that the contents NetworkSettings will be modified at this time, but it is possible that Start() could change the contents of NetworkSettings.  If the contents are changed there is no guarantee that the contents of the change will be persisted to config.json.  Start() should return a reference to the network namespace that should be used.  The technical details of how the reference to the namespace will be passed around through hooks and on to libcontainer are not yet explored.
Stop()
When a container is stopped or found to not exist and cleanup is being performed, Stop() should be called.
Destroy()
When a container is removed as a result of a docker rm, Destroy() should be called.  It is expected the NetworkDriver will release any resources that the container holds at that time.  A network driver is free to release resources on Stop() too as long as it has logic in Start() to acquire new resources.  That is an implementation detail, but it is preferred that deallocation happens soly in the Destroy() method.
Link()
Before Start() on the NetworkDriver is called, Link() should be called to perform whatever logic is needed to link two containers.  Once dynamic links are implemented the Link()  method can be called on a running container.
Unlink()
Right after Stop() is called, Unlink() should be called for all applicable links.  For dynamic links Unlink() can be called on a running container.
ExposePort()
Before Start() on the NetworkDriver is called, ExposePort should be called to perform whatever logic is needed to expose the ports.  Once dynamic ports are implemented the ExposePort()  method can be called on a running container.
UnexposePort()
Right after Stop() is called, UnexposePort() should be called for all applicable ports.  For dynamic ports UnexposePort() can be called on a running container.
Supports()
Supports() is called whenever a NetworkDriver needs to be discovered for a container.  The value of -net is the value that is passed.  As you can infer, there should be at least four NetworkDrivers in Docker by default for "none", "host", "container:id", and "bridge."
Initialize()
When Docker first starts initialize() should be called on each NetworkDriver.
libcontainer
Changes to libcontainer will obviously need to be done.  All of the netlink and network packages should be removed.  Additionally on container start the network namespace to use must be communicated to libcontainer.
nsinit
nsinit is a useful tool in itself.  Since networking is being removed from libcontainer it seems like nsinit should depend on libcontainer and libnetwork.  There could be a NetworkSettings field added to the container.json such that when nsinit loads the container.json it can pick up that information and send it to NetworkDriver.Start() to create the network namespace and then pass that network namespace to libcontainer.
Wrap up...
For sure there are many technical details that are not covered in this write up, but hopefully the general approach seems okay.  The proposed steps forward would be to refactor internally in version 1.X such that no user functionality is changed at all.  In version 1.(X+1) we can then start adding more networking functionality.

There's an official proposal for networking drivers which can be found at https://github.com/docker/docker/issues/9983.
The architecture presented in the proposal would also enable multi-host networking for multiple Docker daemons.
This new proposal implements an architecture which has been discussed quite a bit. Implementing a proof of concept of the network drivers was also part of this effort.
We're not suggesting that the previous proposals had a lower quality or that they've required less effort. However, the design also had to be accepted by everyone and validated with a proof of concept, in addition to being good.
Should you discover something is confusing or missing from the new proposal, please feel free to comment.
If you'd like to continue the discussion, please comment on https://github.com/docker/docker/issues/9983. Please make sure to stay on topic and try to avoid writing long comments (or too many). This would help make it easier for everyone who's following the discussion.
Questions and lengthy discussions are more adequate for the #docker-network channel on freenode. Should you just want to talk about this, that is a better place to have the conversation.
We'd like to thank everyone who's provided input, especially those who've sent proposals. I will close this proposal now.


add systemd-timesyncd to Ubuntu and Debian

There are some reports that the local ntpd configuration is causing delays during install.
This changes Debian and Ubuntu installs to use systemd-timesyncd.
when I apply'd this change: (3x c3.small workers, no ha, facility da11)
null_resource.prep_anthos_cluster: Creation complete after 48s [id=1439661894416930949]
null_resource.kube_vip_install_first_cp: Creation complete after 15m58s [id=5014713027315226937]
null_resource.deploy_anthos_cluster: Creation complete after 17m11s [id=4302241430436461654]

It’s not a great idea to tie up Apt or Yum in user data. It ends up with a race condition when we use apt/yum later.

It’s not a great idea to tie up Apt or Yum in user data. It ends up with a race condition when we use apt/yum later.

Closing this, we can revisit it later or refer to the PR as needed.

Closing this, we can revisit it later or refer to the PR as needed.


Update message on OA URL entered from a user

If a user enters a URL for an OA article and there is an error, update the message to the user:
URL is invalid or is unavailable at this time
We can remove the mention of OA b.c. it confuses users.

This change has been completed and released to production.


Missing license

Would you mind adding a license file to this repo?
ideally something similar to kaldi-gstreamer-server's license (BSD 2-clause "Simplified" License)

Hi,
I've just added a license file.

That's great, thanks!


Databox won't start - missing node package

When running the databox-start script, I get the following:
databox@databox-nuc-1:~/databox$ git pull
Already up-to-date.
databox@databox-nuc-1:~/databox$ ./databox-start
[2018-02-22 09:51:15 databox-start]: testing if Databox is already running ...
[2018-02-22 09:51:15 databox-start]: extracting host interface IP address ...
[2018-02-22 09:51:15 databox-start]: host interface IP address = <IP_ADDRESS>
[2018-02-22 09:51:15 databox-start]: Starting version 0.3.2
[2018-02-22 09:51:15 databox-start]: Creating Certificates
module.js:557
    throw err;
    ^

Error: Cannot find module 'qrcode'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/cwd/src/createCerts.js:5:16)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
[2018-02-22 09:51:16 databox-start]: Starting the Databox swarm
Swarm initialized: current node (xwdmejnwcuenii96z7u72k4u2) is now a manager.

To add a worker to this swarm, run the following command:

    docker swarm join --token SWMTKN-1-542008sfsk9sl2ppueylrwbb9q16znbvpnc5cxou7qzq7y5cu8-4fpppppqrisf7c8je8lnqkxe3 <IP_ADDRESS>:2377

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.

[2018-02-22 09:51:16 databox-start]: Starting Databox
sikgemjr4szbqpk669cx48fp2
WARNING: The Docker Engine you're using is running in swarm mode.

Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.

To deploy your application across the swarm, use `docker stack deploy`.

Creating databox_databox-network_1 ... done
WARNING: The Docker Engine you're using is running in swarm mode.

Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.

To deploy your application across the swarm, use `docker stack deploy`.

WARNING: Found orphan containers (databox_databox-network_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Creating databox_app-server_1 ... done
Creating network databox_databox-cm-app-server-net
open /home/databox/databox/certs/rootCert.crt: no such file or directory
[2018-02-22 09:51:20 databox-start]: ERROR: Problem with docker stack deploy

Try this:
rm -rf ./node_modules

then restart


[improvment] Image properties

Hello
Is it possible to set this properties outside the library (I mean in my code )?
https://github.com/sayyam/carouselview/blob/374b571c584b1a8f263d4460a9ecf4b4a0955905/carouselview/src/main/java/com/synnapps/carouselview/CarouselView.java#L303
Or pass my own ImageView ?

In this method I got ImageView. I think that I can close that.


Extract LinkUserProject from project.py, and add User.project_list

First of all, user.project_list appears as correct/necessary, so that we can always backpopulate the project.user_list attribute - explicitly.
Then, it could in principle have several uses, also in the web client, because knowing a user object would immediately give us their project_list - without an additional GET API call and database query (of course this would not be up-to-date, if some other change took place in the meanwhile).

Closed with #660


Pagination processing

As the number of orders increases to the number of 100 or 1000, the acquisition time cannot be ignored, so pagination processing is necessary. Required for Mypage and Market pages.

IssueHunt Summary

Backers (Total: $5.00)

 kolife01 ($5.00)

Become a backer now!
Or submit a pull request to get the deposits!
Tips

Checkout the Issuehunt explorer to discover more funded issues.
Need some help from other developers? Add your repositories on IssueHunt to raise funds.

IssueHunt has been backed by the following sponsors. Become a sponsor

I just started working on this.

@Wryhder
Thank you for starting. Please let me know if you have any questions.


Document how to invoke mattermost CLI tool in GitLab omnibus

It doesn't look like there's any documentation about how to run the CLI commands in GitLab omnibus.
For instance, running the platform team add {team} {users} command in GitLab omnibus is done with the following command.
sudo -u mattermost /opt/gitlab/embedded/bin/mattermost --config=/var/opt/gitlab/mattermost/config.json team add ourteam thatuser

We'll want to decide whether to add this to GitLab Mattermost docs, Mattermost CLI docs or both.

Resolved by #949


Logo addition

Description

I have added a unique and beautiful logo to all the pages successfully.
Related Issues
 None

Closes #

Type of PR

[X ] (#475)

Screenshots / videos (if applicable)

Checklist

[X ] I have gone through the contributing guide
[ X] I have updated my branch and synced it with project main branch before making this PR
[ X] I have performed a self-review of my code
[X ] I have tested the changes thoroughly before submitting this pull request.
[X ] I have provided relevant issue numbers, screenshots, and videos after making the changes.
[ X] I have commented my code, particularly in hard-to-understand areas.

Additional context:

@Anjaliavv51 pls recheck i was assigned issue #475 thats why i have created this pr


Copy menu item to clipboard does not work in Firefox

Nothing much to add. Would be useful to copy the selected item.
E.g. the color hex code, font name, etc.

This feature is already there: get the value in the clipboard by clicking the item.

not working in Firefox 78

Ok. I’ll take a look.

I used to click the context menu, to have the actual font name then google it etc..
I confirm that this its stopped working in the most recent Firefox updates (i think starting v.76)...
I'm on 78.0.2 (64-bit) ... copy to clipboard is not working at this version.
Thanks @frederfred

I have confirmed the issue and will try to fix it once I’ll find time. I updated the issue title and labeled it as a bug.
The following warning is outputted to the console:
document.execCommand(‘cut’/‘copy’) was denied because it was not called from inside a short running user-generated event handler.
Relevant docs: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard
Thanks for the reports!

No pressure but any idea when you add the fix?
Your link provides the solution. Would be nice if you could change this for Firefox users. Thx.

I would second that! 👍
The extension works well in chrome... but only this feature is missing in firefox... the thing is, I still can't switch to chrome yet! :)

Sorry for all the delay. I have not forgot about this but also had other priorities.
I actually fixed the code in July (now with a PR: https://github.com/frederfred/fontanello/pull/13) but the thing that has stopped me from releasing this is that I don't know what happens to all current installs when I change the permissions, and I have found no good documentation about it. Will do some research!
Glad that you poked me about this one :)

I have now looked into this, and I'm sorry to say that I won't fix this for Firefox.
After some research and some testing, this is my reasoning:

The main reason to not simply add clipboardWrite to the permission list is that I don't want to push an update that will disable this plugin for 20 000+ users in Chrome, that would fix this for "only" 2 000+ Firefox users
According to https://developer.chrome.com/apps/permission_warnings#update_permissions :

Updating an extension with additional permissions may temporarily disable it. The user will have to re-enable it after agreeing to any new warnings.

I don't want to fix this by adding this permission in Firefox alone because I don't want to manage multiple builds.
I thought I would be able to fix this by adding the permission as optional and request it when a user clicked a context menu item, but this trigger Error: permissions.request may only be called from a user input handler. I guess the permissions api is meant to be used in the client script, but the click handler for the context menu is setup in the background script.
I also had an idea that I would add this as an optional permission and that Firefox users would be able to manage it themselves through the settings page of the add on, but things seems to have changed since that article was written because I can't see those toggles when trying it out.

If the plugin is developed further that requires new permissions, then I'll also add the clipboardWrite permission, but for now I don't think it's worth it. Sorry 🙁
If you have any other ideas, or know how to fix 3 or 4 above, please let me know!

Too bad, I understand the pain for an obvious simple fix.
I thought about 3 and how I would "hack" it. On click, create an invisible element with a input field, put the value inside and copy it to the clipboard. Not sure if that is possible - I use it daily when developing websites that offer copy-to-clipboard links

Too bad, I understand the pain for an obvious simple fix.

Yeah, too bad the permissions wasn't setup correctly in the first place :(

I thought about 3 and how I would "hack" it. On click, create an invisible element with a input field, put the value inside and copy it to the clipboard. Not sure if that is possible - I use it daily when developing websites that offer copy-to-clipboard links

That's how it's implemented: https://github.com/frederfred/fontanello/blob/master/src/background.js#L30-L42

Woah, 3 years ago already: https://bugzilla.mozilla.org/show_bug.cgi?id=1397658
And here is something interesting, too:
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Interact_with_the_clipboard
Firefox:
You can write to the clipboard with execCommand in all execution contexts except background pages. In Firefox you can't select text or focus an input field in background pages, so you can't write to the clipboard with execCommand from a background page. The Clipboard Web API doesn't have this limitation.

In Chrome:
You can write to the clipboard like this in all execution contexts - background pages, content scripts, options pages, and popups.

Yeah I also did see that note about document.execCommand not working in background pages, but according to my tests, the copying problem in Firefox was resolved by adding the clipboardWrite permission.
Another thing I noticed is that the Clipboard API does not work in Chrome when used in the background, even if the clipboardWrite permission is added. That raises the error Uncaught (in promise) DOMException: Document is not focused.. Using the Clipboard API works in Firefox though (with permission added in manifest).
I also found that bug report you referenced while is was researching this. Let's hope that it will get fixed some day :)
I'll close this issue now and I might revisit it some day to see if things changed, or if the Firefox extension gets much more traction. Thanks for engaging in it!


perf: mark defineComponent as side-effects-free

Rollup now supports marking a function as sied-effect free:

https://github.com/rollup/rollup/pull/5024

It's a common pitfall in tree-shaking component libraries. For example
export const RouterView = defineComponent(...)

export const RouterLink = defineComponent(...)

import { RouterView } from './my-route.ts

It seems RouterLink should be tree shaken, but in reality, because defineComponent is a bit complex that Rollup can't know whether it contains side-effects, causing it still remain in the bundle even if it's not been used.
A solution to that is to add the __PURE__ comment to mark them as pure. But that requires to do so every single time, which can easily be forgotten.
export const RouterView = /*#__PURE__*/ defineComponent(...)

export const RouterLink = /*#__PURE__*/ defineComponent(...)

So, instead of asking every callee to add __PURE__, we mark the defineComponent function itself to be side-effect-free using __NO_SIDE_EFFECTS__. So they can always be safely tree-shaken.
In this PR, the following functions are marked side-effect free:

defineComponent
defineAsyncComponet
defineCustomElement
defineSSRCustomElement

Side note: because we are using esbuild, which does not preserve comments. We need to use /*! to keep the controlling comment, before esbuild supports __NO_SIDE_EFFECTS__ natively (https://github.com/evanw/esbuild/issues/3149)

Starting from version 0.18.1, esbuild supports the /* @__NO_SIDE_EFFECTS__ */ comment for functions (https://github.com/evanw/esbuild/commit/cf687c94d9458b6286786850babeefd3e77ff9fb). Would it be possible to consider replacing /*! with /* ?


ARROW-2151: [Python] Fix conversion from np.uint64 scalars

Also add tests for ARROW-1345.
Based on PR #1601.

rebased


context lang working on one server but not on another

Hallo,
I'm dealing with a strange problem, and I'm not sure where to begin looking for a solution.
When I run the following code on two different servers, one returns the name field in German (as I would expect), and the other server in English. Both are querying the same Odoo Instance with the same API-key. So I imagine the issue, is some server setting, I've tied using the setlocale in PHP, but that doesn't make any difference. I would be very thankful for any insights/ideas!
$client = new OdooClient($host, $db, $username, $api_key);
$criteria = [['id', '=', 9361]];
$order = '';
$context = ['lang' => 'de_DE'];
$model = 'product.template';
$productIds = $client->search($model, $criteria, 0, 1, $order, $context);
$odooProduct = $client->read($model, $productIds, ['id', 'name', 'name2'], $context);
var_dump($odooProduct);

PHP 8.2
Server1: Apache
Server2: Ngnix

Okay, after some debugging, I found the Problem, the context data was not getting passed on to odoo. So I looked at my composer files and there was a version difference in "tbondois/odoo-ripcord", change the version on the second server, and now I am getting the expected values...
"tbondois/odoo-ripcord": "^1.5"
"tbondois/odoo-ripcord": "^1.7"


fixing issue with locale accessors in Mobility

I realized that we were still getting an error on assignment; the method arguments have to be converted to a hash and double splatted for mobility to accept it.  This makes it compatible with the locale_accessor https://github.com/shioyama/mobility/blob/master/lib/mobility/plugins/locale_accessors.rb

Hello, do you need anything for this pull request to be merged in?


Add missing fields on CommentResponse struct

HasLikedComment is *bool because on your own comment it doesn't exists. Same on DidReportAsSpam
logrus.Info(comment.HasLikedComment) // nil or *true
if comment.HasLikedComment != nil && !*comment.HasLikedComment {
// you didn't liked the comment
}

Fixed here: https://godoc.org/gopkg.in/ahmdrz/goinsta.v2


Add timeouts and retries configuration to metadata service clients (#923)

Fix for #923
The commit also makes the default configuration to be useful. Now it has 5s request timeout and does 4 retries with 1s exponential back-off.

I've updated my commit in-place (and seems it was wrong and I should add a fixing commit instead but now I can't undo it)

@marcomagdy @singku I've updated the PR with using of CoreErrorsMapper::GetErrorForHttpResponseCode and added more tests.

Already merged.


error: invalid linker name in argument '-fuse-ld=lld'

IMPORTANT: Before you create an issue, please take a look at our Issue Reporting Guide.
Briefly summarize your issue:
error: invalid linker name in argument '-fuse-ld=lld'>
What is the expected behavior?
This step should download any required dependencies
What behavior are you observing?
[  0%] Linking CXX shared library ../bin/libAVSCommon.dll
clang++: error: invalid linker name in argument '-fuse-ld=lld'
make[3]: *** [AVSCommon/CMakeFiles/AVSCommon.dir/build.make:1812: bin/libAVSCommon.dll] Error 1
make[2]: *** [CMakeFiles/Makefile2:7559: AVSCommon/CMakeFiles/AVSCommon.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:13587: SampleApp/src/CMakeFiles/SampleApp.dir/rule] Error 2
make: *** [Makefile:3702: SampleApp] Error 2
Provide the steps to reproduce the issue, if applicable:
Exact steps until https://developer.amazon.com/en-US/docs/alexa/avs-device-sdk/windows-64.html#step-5-download-the-sdk-and-dependencies
What version of the AVS Device SDK are you using?
1.25.0
Tell us what hardware you're using:

Laptop

Tell us about your OS (Type & version):

Windows

What was the resolution, please?  I am having the same issue.

Rebuilding after deleting the build directory resolved the issue for me. Also make sure to add absolute paths for all the cmake commands

Thank you.  It worked.  You are very helpful.


[Bug]: Metadata length is not a good proxy for maximum chunk size

Bug Description
I have a Document defined below with a metadata field extra_info that is often quite long.  This is important in my RAG application because the user needs to see some meta info about the source that should not be part of retrieval or synthesis.
Document(text=row['Answer_Response'],
                  ret.append(Document(text=row['Answer_Response'],
                            metadata={"question": row["Question"], "source": "rfpio", "source_uid": row["ID"],
                                      "extra_info": extra_info},
                   excluded_llm_metadata_keys=['extra_info', 'source_uid', 'source'],
                   excluded_embed_metadata_keys=['extra_info', 'source_uid', 'source'],
                   metadata_template="{key}: {value}",
                   text_template="{metadata_str}\n{content}"))

The sentence splitter does not like this document because the metadata is too long for the chunk size. Since this fields is excluded from LLM and EMBED, I don't think it should be counted.
Version
839post1
Steps to Reproduce
Make a document with long metadata, give a smaller chunk size, split the nodes with the sentence splitter (or other meta-data aware splitter).
Relevant Logs/Tracbacks
No response

I agree, been meaning to address this

@aerickson-clt the tricky part is, there's two metadata modes to consider, LLM and Embed
My take is that every embed model either handles truncation fine (i.e. local huggingface models) or has a huge context window (openai is 8196)
So, splitting should mostly concern LLM metadata? Or this could be configurable too I suppose

I think that both the size of node.get_content(metadata_mode=MetadataMode.LLM) and node.get_content(metadata_mode=MetadataMode.EMBED) are quite important when designing a system.  Embedding too much text may dilute some semantic you are trying to capture, while stuffing too much into the context will make your synthesizer do things it wasn't designed to do.  It's all a bit loosey-goosey though, since you can break this with node postprocessing, but starting out with node.get_content behaving in a predictable way is helpful.
Perhaps ideally you would have a maximum chunk size for each of these, but a simpler solution would be to just make sure they are both small enough.  Minimally fixing the code below you could pass node.get_metadata_str(metadata_mode=MetadataMode.LLM and node.get_metadata_str(metadata_mode=MetadataMode.EMBED) (as well as text).  Your effective chunk size is then chunk_size - max(metadata_llm_len, metadata_embed_len).
def split_text_metadata_aware(self, text: str, metadata_str: str) -> List[str]:
    metadata_len = len(self.tokenizer(metadata_str))
    effective_chunk_size = self.chunk_size - metadata_len
    if effective_chunk_size <= 0:
        raise ValueError(
            f"Metadata length ({metadata_len}) is longer than chunk size "
            f"({self.chunk_size}). Consider increasing the chunk size or "
            "decreasing the size of your metadata to avoid this."
        )
    elif effective_chunk_size < 50:
        print(
            f"Metadata length ({metadata_len}) is close to chunk size "
            f"({self.chunk_size}). Resulting chunks are less than 50 tokens. "
            "Consider increasing the chunk size or decreasing the size of "
            "your metadata to avoid this.",
            flush=True,
        )

    return self._split_text(text, chunk_size=effective_chunk_size)

gets called from here
def get_nodes_from_node(
    node: BaseNode,
    text_splitter: SplitterType,
    include_metadata: bool = True,
    include_prev_next_rel: bool = False,
    ref_doc: Optional[BaseNode] = None,
) -> List[TextNode]:
    """Get nodes from document."""
    if include_metadata:
        if isinstance(text_splitter, MetadataAwareTextSplitter):
            text_splits = text_splitter.split_text_metadata_aware(
                text=node.get_content(metadata_mode=MetadataMode.NONE),
                metadata_str=node.get_metadata_str(),
            )

@aerickson-clt great idea. Will try to get that in before lunch 😉


For issue #170

I should have the e-mail address used to commit correct now..
This solves the duplicate row data on the query object.

Heya, can you please rebase and add a quick test?
Cheers

Fixes #170


❓ Full expo support

What feature or enhancement are you suggesting?
First, thank you for this great package!
Would it be possible to have the expo config plugin to change compileSdkVersion to 31?
I had to manually make that change which breaks the idea of the plugin doing all the required config.
For reference, here are the commands I've run:
expo init PixelsValidationApp
expo install<EMAIL_ADDRESS>expo run:android

Note: I'm using version 2.13.0 because of this issue: https://github.com/mrousavy/react-native-vision-camera/issues/957
What Platforms whould this feature/enhancement affect?
Android
Alternatives/Workarounds
Manually edit build.gradle and set compileSdkVersion = 31
Additional information

[X] I agree to follow this project's Code of Conduct
[X] I searched for similar feature requests in this repository and found none.

I think it is not planned since different libraries may want different configuration and user should set it themselves with custom plugin: https://github.com/mrousavy/react-native-vision-camera/pull/717#issuecomment-1088091392

Exactly what @viljark said.


Content-Type value multipart/mixed with boundary gives delimiter error when making request from Guzzle 6

Guzzle version(s) affected: 6
PHP version: 7.3.11
cURL version: 7.64.1 (hint: php -i | grep cURL)
Description
I am using Guzzle 6 as a client to post data to an API.
The API requires that I send a header with Content-Type: multipart/mixed;boundary=batch_somenumbersanddashes.
I am getting an error message: "{"error":{"code":"4003","message":"Missing close delimiter at line '0'."}} "
'headers' => [ 'Content-Type' => 'multipart/mixed;boundary=batch_36522ad7-fc75-4b56-8c71-56071383e77b' ]
I was able to post data to the API with node-fetch and in Postman but when I try with Guzzle I get a response back from the server saying{"error":{"code":"4003","message":"Missing close delimiter at line '0'."}} "
The header I am passing into guzzle is 'headers' => ['Content-Type' => 'multipart/mixed;boundary=batch_36522ad7-fc75-4b56-8c71-56071383e77b'].
Why would the same header work in node-fetch and in Postman, but not guzzle6? Guzzle6 doesn't show an example in the documentation.
How to reproduce
Try to add the header with content type multipart/mixed;boundary=something;
Possible Solution
I'm not sure where the Missing close delimiter line 0 is generated.
Additional context
I am getting a response from the server so I'm not sure it's a Guzzle issue. But, I'm able to get a full response and post when using node-fetch / node and in Postman with same Content-Type in request header.
Maybe give an example of multipart/mixed in Guzzle documentation.
Thank you.

I figured it out. Thanks.


Upgrade of Windows 10 Seems to break VS Code & Git integration

Issue Type: Bug
fatal: Not a git repository (or any of the parent directories): .git
Update to latest Windows 10.
Open VS Code.
Open recent folder.
Notice that Git integration is not working. i.e. doe VS Code does not recognize repo and does not display file changes.

Hi,
GIT output said there was no such repository as ".git". However there was
another windows update 2 days ago and it fixed the problem.
VS Code interface with GIT seems to be working now.
Robin
On Tue, Apr 16, 2019, 4:21 AM João Moreno<EMAIL_ADDRESS>wrote:

What does Git: Show Git Output show?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/72137#issuecomment-483560701,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ab0BlcIt_AatNPXDS0GPirwjP1uUL0vmks5vhYgbgaJpZM4cpsS5
.


change frozendict implementation

@uriva ptal at my changes https://github.com/hyroai/gamla/pull/40/commits/3bb3a9d754adb7de7553783e09ec78cbbc7bdd2e

@uriva ptal at my changes 3bb3a9d

LGTM