Autoorganize NOT AUTO

When I use this plugin for movie organize, something looks not work correctly, it could not AUTO RUN, such as:

[2020-04-06 02:04:59.167 +00:00] [INF] [27] TaskManager: Executing "Organize new media files"
[2020-04-06 02:04:59.173 +00:00] [INF] [27] App: Sorting file "/media/download/m/饥饿站台.1080p.HD修正中英双字[66影视www.66Ys.Co] .mp4"
[2020-04-06 02:04:59.381 +00:00] [WRN] [27] App: Unable to find movie in library matching name 饥饿站台
[2020-04-06 02:04:59.384 +00:00] [INF] [27] TaskManager: "Organize new media files" Completed after 0 minute(s) and 0 seconds
[2020-04-06 02:04:59.387 +00:00] [INF] [27] TaskManager: ExecuteQueuedTasks
[2020-04-06 02:04:59.442 +00:00] [ERR] [27] Emby.Server.Implementations.HttpServer.HttpListenerHost: Error processing request: "Could not find a part of the path '/jellyfin/jellyfin-web/css/images/throbber.gif'."
[2020-04-06 02:06:11.663 +00:00] [INF] [30] TaskManager: "IntervalTrigger" fired for task: "Organize new media files"
[2020-04-06 02:06:11.664 +00:00] [INF] [30] TaskManager: Queueing task "OrganizerScheduledTask"
[2020-04-06 02:06:11.665 +00:00] [INF] [4] TaskManager: Executing "Organize new media files"
[2020-04-06 02:06:11.670 +00:00] [INF] [4] App: Sorting file "/media/download/m/饥饿站台.1080p.HD修正中英双字[66影视www.66Ys.Co] .mp4"
[2020-04-06 02:06:11.873 +00:00] [WRN] [4] App: Unable to find movie in library matching name 饥饿站台
[2020-04-06 02:06:11.874 +00:00] [INF] [4] TaskManager: "Organize new media files" Completed after 0 minute(s) and 0 seconds

But if I did it manually with search, It can add this file to my movie lib:

[2020-04-06 02:06:11.877 +00:00] [INF] [4] TaskManager: ExecuteQueuedTasks
[2020-04-06 02:06:11.967 +00:00] [ERR] [29] Emby.Server.Implementations.HttpServer.HttpListenerHost: Error processing request: "Could not find a part of the path '/jellyfin/jellyfin-web/css/images/throbber.gif'."
[2020-04-06 02:07:05.789 +00:00] [INF] [30] App: Douban: search name "饥饿站台"
[2020-04-06 02:07:05.790 +00:00] [INF] [30] App: douban id is null
[2020-04-06 02:07:05.791 +00:00] [INF] [30] App: Douban: Trying to search sid by name: "饥饿站台"
[2020-04-06 02:07:06.108 +00:00] [INF] [4] App: Douban: Trying to get douban subject by sid: "34805219"
[2020-04-06 02:07:06.468 +00:00] [INF] [30] App: Douban: Trying to get douban subject by sid: "26995532"
[2020-04-06 02:07:06.867 +00:00] [WRN] [30] Emby.Server.Implementations.HttpServer.HttpListenerHost: HTTP Response 200 to "<IP_ADDRESS>". Time (slow): 0:01:41.9121099. "http://<IP_ADDRESS>:8096/Items/RemoteSearch/Movie"
[2020-04-06 02:07:26.072 +00:00] [INF] [4] AutoOrganize: Sorting file "/media/download/m/饥饿站台.1080p.HD修正中英双字[66影视www.66Ys.Co] .mp4" into movie "/media/movie/饥饿站台 (2019)/饥饿站台.1080p.HD修正中英双字[66影视www.66Ys.Co] .mp4"
[2020-04-06 02:07:26.073 +00:00] [INF] [4] AutoOrganize: Sorting file "/media/download/m/饥饿站台.1080p.HD修正中英双字[66影视www.66Ys.Co] .mp4" to new path "/media/movie/饥饿站台 (2019)/饥饿站台.1080p.HD修正中英双字[66影视www.66Ys.Co] .mp4"
[2020-04-06 02:07:26.085 +00:00] [ERR] [22] Emby.Server.Implementations.HttpServer.HttpListenerHost: Error processing request: "Could not find a part of the path '/jellyfin/jellyfin-web/css/images/throbber.gif'."

So if it's a bug or something wrong for my setting? thanks

By default, the plugin does not automatically organize movies, you have to search for them manually.
To turn on automatic identification and sorting of the movies you need to make sure the following setting is checked. Note that this is a BETA feature that may not work correctly and may cause the movies to be sorted incorrectly.

By default, the plugin does not automatically organize movies, you have to search for them manually.
To turn on automatic identification and sorting of the movies you need to make sure the following setting is checked. Note that this is a BETA feature that may not work correctly and may cause the movies to be sorted incorrectly.

thanks for your quick response,I will try it latter, by the way, How to set "delete left over files", could you pls give me a example? thanks

How to set "delete left over files", could you pls give me a example? thanks

Sure! You have to provide a list of file extensions you want to delete, separated by semicolons (;). For example:
txt;srt;nfo

How to set "delete left over files", could you pls give me a example? thanks

Sure! You have to provide a list of file extensions you want to delete, separated by semicolons (;). For example:
txt;srt;nfo

EDIT: Created a quick PR to fix this description in the UI: #39

o,thanks, do you have a plan to add some more movie pattern for movies names. such as : 1080p and so on.....

o,thanks, do you have a plan to add some more movie pattern for movies names. such as : 1080p and so on.....

There is nothing planned for that as far as I know. If you want you could open up a new issue as a feature request for it


Undefined calling in makeExecutableSchema?

I tried remove this function from:
const executableSchema = makeExecutableSchema({
  typeDefs,
  resolvers,
});

class REST2GraphQLInterface {
  query({ query, variables }) {
    return graphql(
      executableSchema,
      query,
      undefined,
      {
        Config: new Config({ connector: new Power51Connector()})
      },
      variables
    );
  }
}

to
const executableSchema = {};

const serverConnector = new Power51Connector();

class REST2GraphQLInterface {
  query({ query, variables }) {
    return graphql(
      executableSchema,
      query,
      undefined,
      {
        Config: new Config({ connector: new Power51Connector()})
      },
      variables
    );
  }
}

Then the waring will disappear, but it will be useless.

Are there any way to combine typeDefs and resolvers together?
Can I use createNetworkInterface instead, then just pass it into ApolloClient?
But createNetworkInterface seems need a url, while I have wrote all the fetch in the resolvers so I don't need a url.

http://stackoverflow.com/questions/39016025/reactnative-babelhelpers-typeof-is-not-a-function/39016277#39016277

Or remove this typeof resolve it too...
https://github.com/apollostack/graphql-tools/blob/master/src/schemaGenerator.js#L39

This package is not designed to work on the client, but if there are simple changes that will make it work we'll take it. However, there's also a big refactor happening: #137 so it might be good to wait until that is merged since maybe it will fix the problem anyway.

That's fine, I have a temporary workaround by clone it and remove all the "typeof" , putting it locally :P

If there still being problem at react-native side after refactoring, I will make a PR for this.

I guess #255 is related to this, I'm trying to mock on the client for testing without luck


GO-641 Add new sqli endpoint with json struct

Add new endpoint - /sqlInjection/headers/json to handle usage of json struct passed in a credentials header.
Update signature of sqliTemplate to pass page parameters used in the view template instead of routeInfo.
Extracted sqlite db setup and handling safety method for SQL Injection so new functions could be reused at both places - headersHandler and sqlite3Handler.
Testing
Build and run the go-test-bench app. You should see a new section Headers - JSON where you can get the curl request to be executed. A json field is used as a user input instead of header value directly.

Codecov Report

Merging #14 (a708085) into main (d6252ed) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #14   +/-   ##
=======================================
  Coverage   95.23%   95.23%
=======================================
  Files           1        1
  Lines          21       21
=======================================
  Hits           20       20
  Misses          1        1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d6252ed...a708085. Read the comment docs.

Approving on the basis of that it helped me test out my propagation ticket for the go agent. Very easy to trigger vulnerability. Thank you!


The value of sendThreadPoolQueueHeadWaitTimeMills is 0 most of the time

BUG REPORT

Please describe the issue you observed:

When the request of send message resides in the sendThreadPoolQueue too long,  the broker may occur "[TIMEOUT_CLEAN_QUEUE]broker busy, start flow control for a while, code as follow":
                    final long behind = System.currentTimeMillis() - rt.getCreateTimestamp();
                    if (behind >= maxWaitTimeMillsInQueue) {
                        if (blockingQueue.remove(runnable)) {
                            rt.setStopRun(true);
                            rt.returnResponse(RemotingSysResponseCode.SYSTEM_BUSY, String.format("[TIMEOUT_CLEAN_QUEUE]broker busy, start flow control for a while, period in queue: %sms, size of queue: %d", behind, blockingQueue.size()));
                        }
                    }

the default value of maxWaitTimeMillsInQueue is 200ms.
We have set it`s value to 1000ms on the production environment, but, this quesiton still happens occasionally.
We use rocketmq-exporter+prometheus+grafana monitoring the value of sendThreadPoolQueueHeadWaitTimeMills, however the value always is 0(Occasionally a very high value appears).It is not science!
When I debug the broker`s source code, I found that there are two types of data in the sendThreadPoolQueue.

java.util.concurrent.CompletableFuture$UniAccept
org.apache.rocketmq.broker.latency.FutureTaskExt

If the header element of sendThreadPoolQueue is  org.apache.rocketmq.broker.latency.FutureTaskExt, will computer the value of sendThreadPoolQueueHeadWaitTimeMills. Otherwise, it return 0. Look at the source code below:
// BrokerController.java
    public long headSlowTimeMills(BlockingQueue<Runnable> q) {
        long slowTimeMills = 0;
        final Runnable peek = q.peek();
        if (peek != null) {
            RequestTask rt = BrokerFastFailure.castRunnable(peek);
            slowTimeMills = rt == null ? 0 : this.messageStore.now() - rt.getCreateTimestamp();
        }

        if (slowTimeMills < 0) {
            slowTimeMills = 0;
        }

        return slowTimeMills;
    }

Look at this line of  code : BrokerFastFailure.castRunnable(peek);
    public static RequestTask castRunnable(final Runnable runnable) {
        try {
            if (runnable instanceof FutureTaskExt) {
                FutureTaskExt object = (FutureTaskExt) runnable;
                return (RequestTask) object.getRunnable();
            }
        } catch (Throwable e) {
            log.error(String.format("castRunnable exception, %s", runnable.getClass().getName()), e);
        }

        return null;
    }

The data of  java.util.concurrent.CompletableFuture$UniAccept comes from（SendMessageProcessor.java）:
 @Override
    public void asyncProcessRequest(ChannelHandlerContext ctx, RemotingCommand request, RemotingResponseCallback responseCallback) throws Exception {
        asyncProcessRequest(ctx, request).thenAcceptAsync(responseCallback::callback, this.brokerController.getSendMessageExecutor());
    }

They share the sendThreadPoolQueue.  And the header element of sendThreadPoolQueue is java.util.concurrent.CompletableFuture$UniAccept  most of the time.

Please tell us about your environment:

linux
mac os
rocketmq 4.7.1 release

Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):

How I found these info in the sendThreadPoolQueue.
Print it. Such as the code below:
// BrokerController#headSlowTimeMills(BlockingQueue<Runnable> q)
........
        if (q == this.sendThreadPoolQueue) {
            System.out.println("send queue foreach size: " + q.size());
            q.stream().forEach(r -> {
                long tmpSlowTime = 0l;
                RequestTask rt = BrokerFastFailure.castRunnable(r);
                System.out.println(r.getClass());
                tmpSlowTime = rt == null ? -1 : this.messageStore.now() - rt.getCreateTimestamp();
                System.out.println(tmpSlowTime);
            });
            //System.out.println("Send queue slow time mills: " + slowTimeMills);
        }
.......

this is print info:

send queue foreach size: 4
class java.util.concurrent.CompletableFuture$UniAccept
-1
class org.apache.rocketmq.broker.latency.FutureTaskExt
387
class java.util.concurrent.CompletableFuture$UniAccept
-1
class org.apache.rocketmq.broker.latency.FutureTaskExt
80

And print the stack trace:
        this.sendThreadPoolQueue = new LinkedBlockingQueue<Runnable>(this.brokerConfig.getSendThreadPoolQueueCapacity()) {
            @Override
            public void put(Runnable runnable) throws InterruptedException {
                System.out.println("queue put: " + runnable.getClass());
                super.put(runnable);
            }

            @Override
            public boolean offer(Runnable runnable) {
                System.out.println("queue offer: " + runnable.getClass() + "， current thread: " + Thread.currentThread().getName() + ", thread id: " + Thread.currentThread().getId());
                Throwable throwable = new Throwable();
                StackTraceElement[] stackTraceElements = throwable.getStackTrace();
                if (stackTraceElements != null) {
                    Arrays.stream(stackTraceElements).forEach(stackTraceElement -> {
                        System.out.println(stackTraceElement.getClassName() + "#"
                                + stackTraceElement.getMethodName() + "#" + stackTraceElement.getLineNumber());
                    });
                }
                System.out.println("---------------------------end------------------------------");
                return super.offer(runnable);
            }

            @Override
            public boolean offer(Runnable runnable, long timeout, TimeUnit unit) throws InterruptedException {
                System.out.println("queue timeoutoffer: " + runnable.getClass());
                return super.offer(runnable, timeout, unit);
            }
        };

info as fllow:

queue offer: class java.util.concurrent.CompletableFuture$UniAccept， current thread: SendMessageThread_1, thread id: 81
org.apache.rocketmq.broker.BrokerController$1#offer#205
org.apache.rocketmq.broker.BrokerController$1#offer#195
java.util.concurrent.ThreadPoolExecutor#execute#1371
java.util.concurrent.CompletableFuture$UniCompletion#claim#543
java.util.concurrent.CompletableFuture#uniAccept#667
java.util.concurrent.CompletableFuture$UniAccept#tryFire$$$capture#646
java.util.concurrent.CompletableFuture$UniAccept#tryFire#-1
java.util.concurrent.CompletableFuture#uniAcceptStage#686
java.util.concurrent.CompletableFuture#thenAcceptAsync#2019
org.apache.rocketmq.broker.processor.SendMessageProcessor#asyncProcessRequest#82
org.apache.rocketmq.remoting.netty.NettyRemotingAbstract$1#run#226
org.apache.rocketmq.remoting.netty.RequestTask#run#80
java.util.concurrent.Executors$RunnableAdapter#call#511
java.util.concurrent.FutureTask#run$$$capture#266
java.util.concurrent.FutureTask#run#-1
java.util.concurrent.ThreadPoolExecutor#runWorker#1149
java.util.concurrent.ThreadPoolExecutor$Worker#run#624
java.lang.Thread#run#748

queue offer: class org.apache.rocketmq.broker.latency.FutureTaskExt， current thread: NettyServerCodecThread_5, thread id: 56
org.apache.rocketmq.broker.BrokerController$1#offer#205
org.apache.rocketmq.broker.BrokerController$1#offer#195
java.util.concurrent.ThreadPoolExecutor#execute#1371
java.util.concurrent.AbstractExecutorService#submit#112
org.apache.rocketmq.broker.BrokerController$2#submit#304
org.apache.rocketmq.remoting.netty.NettyRemotingAbstract#processRequestCommand#256
org.apache.rocketmq.remoting.netty.NettyRemotingAbstract#processMessageReceived#158
org.apache.rocketmq.remoting.netty.NettyRemotingServer$NettyServerHandler#channelRead0#420
org.apache.rocketmq.remoting.netty.NettyRemotingServer$NettyServerHandler#channelRead0#415

Good catch! It is indeed a bug, do you have any ideas to fix it ?

Maybe we could replace to a separate thread pool when we use thenAcceptAsync @xxd763795151

Maybe we could replace to a separate thread pool when we use thenAcceptAsync @xxd763795151

Of course, this may be the quickest way, if its scope of influence is small enough.
Think it about another way:  modify the [ public long headSlowTimeMills(BlockingQueue q)]method.
Iterate over the queue and find the first element that meets the conditions (or NULL)to cacluete the time instead of the [peek()] method( think about the impact of concurrency).

Maybe we could replace to a separate thread pool when we use thenAcceptAsync @xxd763795151

Of course, this may be the quickest way, if its scope of influence is small enough.
Think it about another way: modify the [ public long headSlowTimeMills(BlockingQueue q)]method.
Iterate over the queue and find the first element that meets the conditions (or NULL)to calculate the time instead of the [peek()] method( think about the impact of concurrency).

Could you submit a pull request to fix the issue? I will review the code and help you merge.

Maybe we could replace to a separate thread pool when we use thenAcceptAsync @xxd763795151

Of course, this may be the quickest way, if its scope of influence is small enough.
Think it about another way: modify the [ public long headSlowTimeMills(BlockingQueue q)]method.
Iterate over the queue and find the first element that meets the conditions (or NULL)to calculate the time instead of the [peek()] method( think about the impact of concurrency).

Could you submit a pull request to fix the issue? I will review the code and help you merge.

Ok, I will verify the scheme and give you feedback later. @RongtongJin

Great find~ I would like to recommend you use condition iteration instead of creating another pool thread. There are too many blocking queues and executor service now. It's almost chaotic.~
Looking back on the fail-fast mechanism in the broker end what we've done previously is a little rude. I have been thinking about making optimization here. If you have better ideas, welcome to come up with your idea. For example, you could use better algorithms and data structures in Resilience4j...

Merged


update v14 fix

@Nrtyck Thanks a lot for your contribution..
Please check my comments on the changes you made..
And also please explain why you added the v14 files..

@kid1194  Frappe v14 install the app, It don't work in edge browser. The contribution fix and test it.

@Nrtyck Thank you bro..
Have you test the plugin  in other browsers, using your fix?

It is nice,  I am not sure about the frappe v13 Attach Image control code and fileupdata code. So I'll keep the V13 original code

I found that the control code does not work properly in webfrom

@Nrtyck Can you please explain the problem with webform? Maybe I will be able to fix it..

at apps/frappe/frappe/public/js/frappe/web_form/webform_script.js
function setup_fields(web_form_doc, doc_data)
here:
if (["Attach", "Attach Image"].includes(df.fieldtype)) {
if (typeof df.options !== "object") {
df.options = {}; // here options to empty
}
df.options.disable_file_browser = true;
}

@Nrtyck For the web form, I think that is not possible to solve the problem..

@Nrtyck I have updated the plugin. I have made a lot of changes in terms of the code..
I hope that it works without any problem..
Regarding the web form, I couldn't find a solution..


Figure out process for updating URLs

Ideally we should be redirecting URLs when we change them so we do not break the web.
This could be done with something like https://github.com/aymericbeaumet/metalsmith-redirect
I'm not sure how we'd remember to do this, maybe there's an automated way to warn people when they're changing URLs for existing documents...?

Ran into this when looking to remove the cookies page


improve handling of NULL result row element

In function trowf, if an element of a result row (stored in sp[i]) is NULL, it should be clearly indicated on the output (e.g., the cell should be greyed out and/or contain the string "<NULL>")

Note that trowf and sp have now been renamed to format_html_table_row and strings, respectively.

Resolved with commit 73bd08a2a0c27da47c6e61bbe7c922bbb32c327c.  (The cell is greyed out and contains the string "NULL".)


Add packageName as a config option

This PR adds the option packageName to the plugin configuration.
In a non-node project, SEMANTIC_RELEASE_PACKAGE is the only environment variable that needs setting to use this plugin. Adding this option allows a user to configure semantic-release-slack-bot entirely in their semantic-release config file.

Nice! 👍

This is very nice! Good contribution! If you fix the spelling mistake I will merge it 😄

Typo fixed! Thanks for such a quick review!

Thank you for your contribution! 🚀

:tada: This PR is included in version 1.5.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


update new coembedding

proteoembed coembedding fixes, still work in progress

@coleslaw481 @dzoanka ready for review - added new method for coembedding (muse is still default for now)


Config in Cargo.toml: invalid type: map, expected a string for key target.x86_64-unknown-freebsd.image

Checklist

[X] I've looked through the issues and pull requests for similar reports

Describe your issue
Related: https://github.com/cross-rs/cross/issues/657
What target(s) are you cross-compiling for?
x86_64-unknown-freebsd
Which operating system is the host (e.g computer cross is on) running?

[X] macOS
[ ] Windows
[ ] Linux / BSD
[ ] other OS (specify in description)

What architecture is the host?

[ ] x86_64 / AMD64
[ ] arm32
[X] arm64 (including Mac M1)

What container engine is cross using?

[X] docker
[ ] podman
[ ] other container engine (specify in description)

cross version
cross 0.2.4
Example
$ cargo new foo && cd $_
$ cat <<'EOF' >> Cargo.toml
[package.metadata.cross.target.x86_64-unknown-freebsd]
image.name = "ghcr.io/cross-rs/x86_64-unknown-freebsd:local"
image.toolchain = ["linux/arm64/v8=aarch64-unknown-linux-gnu"]
EOF
$ cross build --target x86_64-unknown-freebsd --release

Using cross 0.2.4 from nixpkgs or crates.io, I get:
Error:
   0: invalid type: map, expected a string for key `target.x86_64-unknown-freebsd.image`

Using cross from main, I get a different error:
$ cargo install cross --git https://github.com/cross-rs/cross
$ cross --version
cross 0.2.4 (1d9d310 2023-01-05)
$ cross build --target x86_64-unknown-freebsd --release
Error:
   0: invalid type: string "linux/arm64/v8=aarch64-unknown-linux-gnu", expected a borrowed string for key `target.x86_64-unknown-freebsd.image.toolchain`

Location:
   src/cross_toml.rs:181

If I instead put (what I believe to be) the analogous table into Cross.toml, I get the same error with nixpkgs and crates.io but it works fine from main:
$ cat <<'EOF' > Cross.toml
[target.x86_64-unknown-freebsd]
image.name = "ghcr.io/cross-rs/x86_64-unknown-freebsd:local"
image.toolchain = ["linux/arm64/v8=aarch64-unknown-linux-gnu"]
EOF
$ cross --version
cross 0.2.4 (1d9d310 2023-01-05)
[cross] warning: `cross` does not provide a Docker image for target aarch64-apple-darwin, specify a custom image in `Cross.toml`.
[cross] note: Falling back to `cargo` on the host.
cargo 1.66.0 (d65d197ad 2022-11-15)
$ cross build --target x86_64-unknown-freebsd --release
   Compiling foo v0.1.0 (/private/var/folders/kb/tw_lp_xd2_bbv0hqk4m0bvt80000gn/T/tmp.ililnMNd9D/foo)
    Finished release [optimized] target(s) in 8.52s

Using the current main, as recommended in the README, is it expected that this table works from Cross.toml but not from Cargo.toml?
Thanks for your work on a cool project!
Additional information / notes
No response

This should work in Cargo.toml, the issue is how we're doing the deserialization
https://github.com/cross-rs/cross/blob/main/src/cross_toml.rs#LL177C17-L177C17
and https://github.com/cross-rs/cross/blob/1d9d31080c641d37d5213992f12a557d8e47664e/src/docker/image.rs#LL108C11-L108C11

Alright, that was wrong, it's a bit more "wierd".
When merging, we create a CrossToml from the metadata here:
https://github.com/cross-rs/cross/blob/1d9d31080c641d37d5213992f12a557d8e47664e/src/cross_toml.rs#L213-L213
this works fine in most cases, however, when the serialization does not match the deserialization, this fails do not match (i.e it can be either a toml string or array).
Solution is to serialize https://github.com/cross-rs/cross/blob/1d9d31080c641d37d5213992f12a557d8e47664e/src/docker/image.rs#L109-L117 as a string

Wow, super fast fix. Thank you!
After putting the config back in Cargo.toml it builds
$ cargo install cross --git https://github.com/Emilgardis/cross --branch fix-1182
$ cross --version
cross 0.2.4 (6a57d01 2023-01-06)
[cross] warning: `cross` does not provide a Docker image for target aarch64-apple-darwin, specify a custom image in `Cross.toml`.
[cross] note: Falling back to `cargo` on the host.
cargo 1.66.0 (d65d197ad 2022-11-15)
$ cross build --target x86_64-unknown-freebsd --release
    Finished release [optimized] target(s) in 1.41s
$ file target/x86_64-unknown-freebsd/release/hello-world-pfsense
target/x86_64-unknown-freebsd/release/hello-world-pfsense: ELF 64-bit LSB pie executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 12.4, FreeBSD-style, stripped
$ scp target/x86_64-unknown-freebsd/release/hello-world-pfsense router:/tmp
hello-world-pfsense                                                                                100%  275KB   1.4MB/s   00:00
$ ssh router /tmp/hello-world-pfsense
Hello, world!

I'm not sure about the warning, but it seems to work!

This error is back.
$ tail -n 3 Cargo.toml
[package.metadata.cross.target.x86_64-unknown-freebsd]
image.name = "ghcr.io/cross-rs/x86_64-unknown-freebsd:local"
image.toolchain = ["linux/arm64/v8=aarch64-unknown-linux-gnu"]
$ cross --version
cross 0.2.5
Error:
   0: invalid type: map, expected a string for key `target.x86_64-unknown-freebsd.image`

Based on the docs it looks like image.name and image.toolchain are still supported configuration values.

This error is back.
$ tail -n 3 Cargo.toml
[package.metadata.cross.target.x86_64-unknown-freebsd]
image.name = "ghcr.io/cross-rs/x86_64-unknown-freebsd:local"
image.toolchain = ["linux/arm64/v8=aarch64-unknown-linux-gnu"]
$ cross --version
cross 0.2.5
Error:
   0: invalid type: map, expected a string for key `target.x86_64-unknown-freebsd.image`

Based on the docs it looks like image.name and image.toolchain are still supported configuration values.
EDIT: Only getting this from crates.io, installing from git seems to work.

+1


finetuning on pytorch model

Hi Mandar,
I wonder if the model can be finetuned using the pytorch version of BERT? I saw that there are tf_checkpoint and init_checkpoint in the config file. Is it possible to modify them in order to support pytorch BERT models.

Hi. Just to make sure I understand the question. Do you mean converting a BERT Pytorch checkpoint to TF, and then finetuning with this repo (using TF)? If so, then yes. See
https://github.com/mandarjoshi90/coref/blob/master/independent.py#L60


chore(layers): Update nodeJS & Python layers ARN to latest

According to the recent changes of your nodeJS & python layers:

Update nodeJS ARNs by using NodeJS 18 layers
Update python ARNs by using Python 3.7 layers

@Clebiez thanks for the PR! We actually have automation for this, but the credentials expired and I oversaw the failure notifications. We are fixing it asap ;-)

The automation is restored :-) Thanks again for the PR!


Perf improvements with icepick-style

I've been busy over the last week trying to improve the Maputnik UI performance. Here's where I've got to so far
I've created a new immutable style store for Maputnik which uses icepick called icepick-style
My simple initial performance test is changing a single color in the UI. In particular, the background layer of the osm-liberty. You can read some further details over in https://github.com/maputnik/editor/issues/372#issuecomment-428677612
Here are the results so far in the development build of our app.
Before

After

229.48ms down to 76.04ms for 'react tree reconciliation' on a single run, but results seem consistent.
The app seems to mostly work as it did previously. There are a couple of bugs around updating sprites and sources, which I'll try to fix the next time I work on Maputnik.
It's still pretty slow but a big step in the right direction.

@orangemug this looks promising, but I wonder why before it was 229.48ms because you mentioned in https://github.com/maputnik/editor/issues/372#issuecomment-428677612:

On my fairly fast laptop changing the background layer's color property for the osm-liberty takes about 84ms. This is in chrome which is a fair bit faster than Firefox at rendering our UI.

What has changed since then? Different machine? browser? or did you measure there something different than 'react tree reconciliation'?

What has changed since then? Different machine? browser? or did you measure there something different than 'react tree reconciliation'?

So the two measurements are the same test in different versions of the code with the same browser/laptop

229.48ms was tested in v1.5.0 of Maputnik without the immutable additions
76.04ms is with my latest immutable style changes applied

It's a pretty simple test at the moment, but essentially the use of immutable data structure and  PureComponent means that react doesn't bother calling the render methods for a bunch of the component tree. Which in turn means that there is a lot less work for the 'react tree reconciliation' to do.
Also worth noting that this is just the first step, we should be able to improve this significantly more. Saying that my first priority is getting these current improvements stable and well tested and merged into master

Thanks, I assumed you were using v1.5.0 for https://github.com/maputnik/editor/issues/372#issuecomment-428677612 and achieved 84ms without the immutable additions.

Thanks, I assumed you were using v1.5.0 for #372 (comment) and achieved 84ms without the immutable additions.

Nice spot @pathmapper I'll checkout the earlier versions of Maputnik see if the perf has dropped. It's possible I just measured it incorrectly in https://github.com/maputnik/editor/issues/372#issuecomment-428677612 but I'll do some hunting about and see what I can find out.


ERROR failed to open chat conversation: MDServer Unauthorized (error 2806)

When sending a chat message, I receive the error "- ERROR failed to open chat conversation: MDServer Unauthorized (error 2806)". I removed and re-added the device. What should I do?
my log id: 6dd992baf08665ede3bcf41c

Sorry for the inconvenience.  It looks like this was a folder your friend created for you, before you had a Keybase account.  When you were trying to read it, your friend hadn't yet rekeyed it for you, and so there was an error.  But as of this morning, it looks like the folder is keyed for you now, so you shouldn't have problems anymore.
Usually the UX for this is a bit better, but it seems like something unexpected happened, so we'll be looking into it on the server side of things.  Thanks!

Alright cool, I'll check it out when I get home and I'll report back on any other issues. Thanks for the quick response, I also told my friend that he was the one who broke it. 👍

I have opened a similar issue https://github.com/keybase/client/issues/24602
Could you check it? @strib
Thank you in advance, I will appreciate any help this is generating problem for all my team.
Regards, Ismael


Test HTML inline CSS using external XSLT

xspec.bats (for *nix) and xspec-bat.cmd (for Windows) take different ways to test #135:

xspec.bats: grep
xspec-bat.cmd: Inline XQuery

This pull request uses a common external XSLT file both in xspec.bats and xspec-bat.cmd.
As a result, you no longer have to take care of different command lines on different platforms.
No code change in XSpec core.

This pull request derives from #260. So needs to be handled after that.

This pull request just simplifies the test script. It doesn't touch the XSpec code. None of the existing tests are removed
The modified tests are still able to catch failures. Demonstrated on Travis and AppVeyor using a temporary commit (e3ee8579ed153a401b064c256b5a3522c3c1a510).
This pull request makes it easy to handle some pending pull requests (towards #235 in particular).

So I think this pull request can be merged (after #260) safely without reviewing details, or I'd like to merge this by myself in a few days.


Build number generation v2

Autogenerate file, assembly, and vsix versions from the build number.

The CI build is failing because it doesn't support VS 2017 yet.


AssertionError: Explanations do not sum up to the model's output! Please post as a github issue.

I am trying to get explanations for my LSTM (12 window, 2 features):
import shap
explainer = shap.DeepExplainer(model, features.reshape(48, 2, 12, 1))
shap_values = explainer.shap_values(features.reshape(48, 2, 12, 1))

Following is the complete stack of the error :
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
<ipython-input-12-cb83dc7c0499> in <module>
      2 import pandas as pd
      3 explainer = shap.DeepExplainer(model, features.reshape(48, 2, 12, 1))
----> 4 shap_values = explainer.shap_values(features.reshape(48, 2, 12, 1))

D:\Anaconda\lib\site-packages\shap\explainers\deep\__init__.py in shap_values(self, X, ranked_outputs, output_rank_order)
    117         were chosen as "top".
    118         """
--> 119         return self.explainer.shap_values(X, ranked_outputs, output_rank_order)

D:\Anaconda\lib\site-packages\shap\explainers\deep\deep_tf.py in shap_values(self, X, ranked_outputs, output_rank_order, check_additivity)
    283             for l in range(len(X)):
    284                 diffs = model_output[:, l] - self.expected_value[l] - output_phis[l].sum(axis=tuple(range(1, output_phis[l].ndim)))
--> 285                 assert np.abs(diffs).max() < 1e-4, "Explanations do not sum up to the model's output! Please post as a github issue."
    286         if not self.multi_output:
    287             return output_phis[0]

Just got the same issue here, too.
I am using shap on my CNN model

following is the error message

Update:
shap 0.31 version is able to get no error. however 0.32 version arises this problem.

Thanks for posting. This check is new in 0.32 and is supposed to verify that nothing went wrong. So it might be catching a real problem or it might be just a numerical tolerance issue. Could you check and see if changing the tolerance from 1e-4 to 1e-2 helps? Also do you have really large model output values? Sometimes that can cause numerical precision issues.

Dear Scott,
I tried with the 10^-2 tolerance in version 0.32. It worked for most of my
models.
But sometimes it was still failing even with 10^-2 tolerance.
While same model and feature set worked well with 0.31 version even with
lower (10^-4) tolerance value.
Please let me know if we have a newer update with this fix.
Also I will take this opportunity to thank and congratulate you for this
amazing work on Shap.
I would like to learn more mathematics behind this that what is available
on websites and NIPS paper.
Thanks & Regards
Vipin Siriah
Data Science Engineer
Bengaluru, India
On Thu, Dec 12, 2019, 1:47 AM Scott Lundberg<EMAIL_ADDRESS>wrote:

Thanks for posting. This check is new in 0.32 and is supposed to verify
that nothing went wrong. So it might be catching a real problem or it might
be just a numerical tolerance issue. Could you check and see if changing
the tolerance from 1e-4 to 1e-2 helps? Also do you have really large model
output values? Sometimes that can cause numerical precision issues.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/slundberg/shap/issues/930?email_source=notifications&email_token=AHO3AQ7GXTGLEH5H36NU7JTQYFDF5A5CNFSM4JVYUWFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGUNZMI#issuecomment-564714673,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHO3AQ53ZYVLUEYVHF3ON6LQYFDF5ANCNFSM4JVYUWFA
.

Hmm, interesting. If it is really close then might just be rounding errors and you can set check_additivity=False. I wonder if you have really large model output values? Perhaps huge log-odds numbers?

Dear @slundberg ,
In my case, the error still arise when I set the tolerance to 1e-2 and set check_additivity=False.

Thank you!

@Jimbotsai That error shouldn't be possible when check_additivity=False is passed to shap_values. Perhaps it is a similar looking problem?

My values are scaled between 0 and 1 using min max scaler.
On Fri, Dec 13, 2019, 1:31 AM Scott Lundberg<EMAIL_ADDRESS>wrote:

Hmm, interesting. If it is really close then might just be rounding errors
and you can set check_additivity=False. I wonder if you have really large
model output values? Perhaps huge log-odds numbers?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/slundberg/shap/issues/930?email_source=notifications&email_token=AHO3AQ7XLR6LLLFDWYNCNODQYKKC5A5CNFSM4JVYUWFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGX3IKQ#issuecomment-565163050,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHO3AQ6SEBY2RJH6C6UKNWLQYKKC5ANCNFSM4JVYUWFA
.

@VipinSiriah If you have small self contained example that is shareable let us know. It could just be some rounding, but it seems worth checking.

@slundberg Hi,
The following code:
explainer.shap_values(data, check_additivity=False)

fails with the error:
TypeError:` shap_values() got an unexpected keyword argument 'check_additivity'

Am I passing this parameter in correctly? I have pip installed shap==0.33.0
Thank you!

@nyavramov thanks for catching that! I just pushed a fix for that (you also do explainer.explainer.shap_values(data, check_additivity=False) for now)

Awesome, thank you 😄 !

@slundberg I am still getting the TypeError: shap_values() got an unexpected keyword argument 'check_additivity'` error on 0.34.0. Any fix for it? Went back to 0.31.0 for now.

@slundberg
The following code:

Am I passing the wrong parameter?.
Thank you!

@slundberg In the above-mentioned PR; I also had a look into the problem; however I could only solve some surrounding errors, not the calculation itself. I am assuming that there is a bug / missing custom gradient in some of the implementations.
I modified the _init_between_tensors slightly to give some insights; the following is the output:
Used Types {'Transpose': True, 'TensorListFromTensor': True, 'While': True, 'TensorListStack': True, 'Reshape': True, 'MatMul': True, 'BiasAdd': True, 'StridedSlice': True}
Registered Gradients
Transpose >> custom: <function passthrough at 0x14e0266a8> >> original:  <function _TransposeGrad at 0x1341316a8>
TensorListFromTensor >> custom: <function passthrough at 0x14e0266a8> >> original:  <function _TensorListFromTensorGrad at 0x13246b268>
While >> custom: <function passthrough at 0x14e0266a8> >> original:  <function _WhileGrad at 0x1385ff0d0>
TensorListStack >> custom: <function passthrough at 0x14e0266a8> >> original:  <function _TensorListStackGrad at 0x13246b0d0>
Reshape >> custom: <function linearity_1d.<locals>.handler at 0x14e0267b8> >> original:  <function _ReshapeGrad at 0x134131488>
MatMul >> custom: <function linearity_1d_nonlinearity_2d.<locals>.handler at 0x14e0277b8> >> original:  <function _MatMulGrad at 0x134185e18>
BiasAdd >> custom: <function passthrough at 0x14e0266a8> >> original:  <function _BiasAddGrad at 0x133f0af28>
StridedSlice >> custom: <function passthrough at 0x14e0266a8> >> original:  <function _StridedSliceGrad at 0x134125378>```

On closer inspection, I tried setting different op's custom gradient to passthrough and watched whether the gradients became non-zero. It seems the "Mul" operation currently leads to the zero gradients, i.e. if I set this to passthrough, gradients are non-zero.

If I modify the code as follows, the gradients are not zero; however the additivity still doesn't hold (fully).
On my toy example, I get an error (PRED-SHAP)/PREC of on average 0.16%
def _variable_inputs(self, op):
        """Return which inputs of this operation are variable (i.e. depend on the model inputs)."""
        if op not in self._vinputs:
            print(op.type, "IN", [t.name for t in op.inputs])
            out = np.zeros(len(op.inputs), dtype=np.bool)
            for i, t in enumerate(op.inputs):
                out[i] = t.name in self.between_tensors
                if not out[i]:
                    if "lstm/while/lstm_cell" in t.name:
                        out[i] = True
            self._vinputs[op] = out

        return self._vinputs[op]


Add a self-issued predicate to the Consensus interface

Fixes #2926.

@EncodePanda Would you also review and Approve this? I touched more code than I expected while executing the TODOs we came up with with Edsko (who is unavailable this Friday). The overall direction didn't change, but I'd appreciate another careful eye for any typos etc. Thanks!

@newhoggy This PR is ready to merge, but there's no rush on our end.
Would you do some -node development against it and let me know if it's sufficient for CAD-2371? I'd rather modify this PR than have to follow-up it with another, causing more churn on master. Thanks!

@newhoggy This PR is ready to merge, but there's no rush on our end.
Would you do some -node development against it and let me know if it's sufficient for CAD-2371? I'd rather modify this PR than have to follow-up it with another, causing more churn on master. Thanks!

The additions to the API so far seem quite easy to use.

Update: I'm not going to merge this until input-output-hk/cardano-node#2321 gets full approval from its stakeholders. There's a specific open question regarding which identity we should use. That affects this PR, which is fine as-is only if the cold key identity is appropriate.

Update: I'm not going to merge this until input-output-hk/cardano-node#2321 gets full approval from its stakeholders. There's a specific open question regarding which identity we should use. That affects this PR, which is fine as-is only if the cold key identity is appropriate.

Thanks for the update.  You mentioned we were using the cold keys, but @disassembler says we should be using the vrf keys.

The team cleared it up in Slack: cold key is a sufficient and desirable notion of identity for this purpose, we're already using it for Shelley, and the dynamics only require the verification part, not the cold key itself. So this is good to go.
I just rebased without conflicts. Merging now.

bors r+


Fix indentation in documentdb-dotnet-application.md

Fixes indentation problem that was making the RequestOptions parameter tip display as part of the code sample

Hi @lorenpaulsen, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no contribution license agreement is required at this point. Real humans will now evaluate your PR.

TTYL, AZPRBOT;

@lorenpaulsen
Good catch! Thanks for your contribution.
@mimig1
I'm going to accept this and see whether it fixes the formatting issue.


Meet with CSTE ELR Group

Muktha Natrajan suggested we reach out to<EMAIL_ADDRESS>who is part of CSTE's ELR team to see about getting on the agenda at the next CSTE meeting.

@GilmoreA6 Have you been meeting with the CSTE group? What exactly do we need from them? Do it need to be ticketed?

@LaFreda We did meet with them early on in the process. This ticket can be closed.


Deprecation of docker_entrypoint.sh

The configuration of the execution behavior of Forseti on GKE can and should be done via Kubernetes.  Altering the docker_entrypoint.sh script, thus changing the execution behavior, can inadvertently break the deployment in Kubernetes.  If a breaking change were made here, at the very least, the Helm charts would need to be updated.  This means making changes in two repos.

This is still worth fixing

Keep


[23.05] kicad: 7.0.2 -> 7.0.6

Description of changes
Backport of (multiple) bugfix updates already in master. There's a small leftover diff to master, but those changes seem related to tests - presumably when the derivation is used to build the development version of Kicad.
Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[] 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/)
23.11 Release Notes (or backporting 23.05 Release notes)

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

[x] Fits CONTRIBUTING.md.

Additional note
@evils - you seem to have committed recent minor version bumps on master, could you tag future similar PRs for backporting?

yea, i've been neglectful about backporting
while i prefer people to use the unstable branch to get the latest KiCad
i should at least keep the stable branch up-to-date without crossing major release boundaries...

(you could have just cherry-picked updates and squashed them, or ran update.sh stable)

Right, indeed I manually copypasted the diff to master because I didn't feel like cherry picking multiple commits.
Was unaware the update.sh script also supports updating stable only. Updated the PR to use update.sh output instead.

looks like that reused the strings as the commits didn't change
you can do update.sh clean stable to redo the stable part from scratch

What a mess. Thanks for being so observant, thought I started over clean - apparently did not.
I think it's okay for real now.

@ofborg build kicad


[BUG] Unable to get transparent window background

Describe the bug
I am unable to get a transparent window background  over an existing window. I want to add a small overlay bar over my existing windows with "pills" inside.
I succeed in creating the gtk window, draw a pill on it and reparent it in another window. However I am unable to get rid of
the black background of the window.
In the example I try to use the SetOpacity window but I also commented out a try with a CSS provider.
I don't think it is a bug per se more a misuse on my part but I am out of ideas.
It produces this:

To Reproduce
Retrieve the id of one of your window with xwininfo -all and change the xParentWin argument with the id of the window on wich you want to make the pill appear.
Here is the code:
package main

import (
	"fmt"
	"math"
	"os"

	"github.com/BurntSushi/xgb"
	"github.com/BurntSushi/xgb/xproto"
	"github.com/gotk3/gotk3/cairo"
	"github.com/gotk3/gotk3/gtk"
)

func drawPill(cr *cairo.Context, x float64, y float64, r float64, g float64, b float64, msg string) {
	cr.Save()

	cr.SelectFontFace("Sans", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD)
	cr.SetFontSize(10.0)
	extents := cr.TextExtents(msg)
	height := float64(extents.Height)
	width := float64(extents.Width)
	cr.SetSourceRGB(r, g, b)
	cr.Translate(x, y)
	cr.MoveTo(height, height)
	cr.Arc(height, height, height, math.Pi/2, math.Pi+math.Pi/2)
	cr.ClosePath()
	cr.Fill()

	cr.Rectangle(height, 0, width, height*2)
	cr.ClosePath()
	cr.Fill()
	cr.Arc(height+width, height, height, -math.Pi/2, math.Pi/2)
	cr.ClosePath()
	cr.Fill()

	cr.SetSourceRGB(0, 0, 0)
	cr.MoveTo(height, extents.Height*2-extents.Height/2)
	cr.ShowText(msg)

	cr.Restore()

}
func main() {
	gtk.Init(nil)
	xParentWin := 0x2a000bc
	win, _ := gtk.WindowNew(gtk.WINDOW_TOPLEVEL)
	da, _ := gtk.DrawingAreaNew()
	win.Add(da)

	win.SetTitle("Test")
	win.Connect("destroy", gtk.MainQuit)

	conn, err := xgb.NewConn()
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
	geom, _ := xproto.GetGeometry(conn, xproto.Drawable(xParentWin)).Reply()

	win.SetDefaultSize(int(geom.Width), 50)
	win.SetSizeRequest(int(geom.Width), 50)
	win.SetResizable(false)
	win.SetAppPaintable(true)
	win.SetDecorated(false)

	sc := win.GetScreen()
	vs, _ := sc.GetRGBAVisual()
	win.SetVisual(vs)
	win.SetOpacity(0.8)

	//cssPvr, _ := gtk.CssProviderNew()
	//fmt.Println(cssPvr.LoadFromData("window {background-color:rgba(10,50,10,1);opacity:1}"))
	//ctx, err := win.GetStyleContext()
	//sc, _ := gdk.ScreenGetDefault()
	//ctx.AddProvider(cssPvr, uint(gtk.STYLE_PROVIDER_PRIORITY_USER))
	//gtk.AddProviderForScreen(sc, cssPvr, uint(gtk.STYLE_PROVIDER_PRIORITY_USER))

	da.Connect("draw", func(da *gtk.DrawingArea, cr *cairo.Context) {
		drawPill(cr, 0, 0, 1, 0, 0, "hello")
	})

	win.ShowAll()
	gdkWin, _ := win.GetWindow()
	xproto.ReparentWindowChecked(conn, xproto.Window(gdkWin.GetXID()), xproto.Window(xParentWin), 0, 0).Check()

	gtk.Main()
}

Expected behavior
There is no black bar under the pill or I can set the opacity of it
Error messages
N/A
Environment:
gtk3 version: '3.24'
go version: '1.13.8'
os: 'Archlinux'
other stuff: 'I am using i3 and picom as compositor'

58   geom, _ := xproto.GetGeometry(conn, xproto.Drawable(xParentWin)).Reply()

58   geom, _ := xproto.GetGeometry(conn, xproto.Drawable(xParentWin)).Reply()

Corrected

I don't think this is a bug because when you try to do the same using CSS with a window with rounded corners you get the same result on a black background and not transparent, when I searched for a solution for mine , I haven't found anything that is functional and usable. If you got it, let me know.
package main

import (
	"github.com/gotk3/gotk3/gdk"
	"github.com/gotk3/gotk3/gtk"
)

func main() {
	gtk.Init(nil)

	win, _ := gtk.WindowNew(gtk.WINDOW_TOPLEVEL)

	win.SetTitle("Test")
	win.Connect("destroy", gtk.MainQuit)

	win.SetDecorated(false)
	win.SetSizeRequest(320, 240)
	win.SetOpacity(0.8)

	box, _ := gtk.BoxNew(gtk.ORIENTATION_VERTICAL, 0)
	lbl, _ := gtk.LabelNew("TEst")
	box.Add(lbl)
	win.Add(box)

	cssPvr, _ := gtk.CssProviderNew()
	// NOTE using GTK inspector you can modify on the fly CSS content, try
	// add: "background-color: transparent;"
	// get black screen
	cssPvr.LoadFromData(`
	window {
	border-radius: 10px 30px 10px 30px;
	/*background-color: transparent;*/
	color: red;
	}
	`)

	ctx, _ := win.GetStyleContext()
	sc, _ := gdk.ScreenGetDefault()
	ctx.AddProvider(cssPvr, uint(gtk.STYLE_PROVIDER_PRIORITY_USER))
	gtk.AddProviderForScreen(sc, cssPvr, uint(gtk.STYLE_PROVIDER_PRIORITY_USER))

	win.ShowAll()

	gtk.Main()
}

I got that working setting the window's visual
    screen := win.GetScreen()
    visual, _ := screen.GetRGBAVisual()
    win.SetVisual(visual)
    win.SetDecorated(false)

oh yes ! thank you.
for your issue, the only way i found is reducing width and height of integrated window:
56	os.Exit(1)
57    }
58	// geom, _ := xproto.GetGeometry(conn, xproto.Drawable(xParentWin)).Reply()
59
60	// win.SetDefaultSize(int(geom.Width), 50)
61	win.SetSizeRequest(42, 16)
But it's not really elegant.
There is some discussions on web that say to store background root window surface and mixing it with desired generated cairo display (out of my knowledge) but maybe not yours here

Unfortunately that is not working when reparenting the window:
package main

import (
	"fmt"
	"os"

	"github.com/BurntSushi/xgb"
	"github.com/BurntSushi/xgb/xproto"
	"github.com/gotk3/gotk3/gdk"
	"github.com/gotk3/gotk3/gtk"
)

func main() {
	gtk.Init(nil)

	win, _ := gtk.WindowNew(gtk.WINDOW_TOPLEVEL)

	win.SetTitle("Test")
	win.Connect("destroy", gtk.MainQuit)

	win.SetDecorated(false)
	win.SetSizeRequest(320, 240)

	box, _ := gtk.BoxNew(gtk.ORIENTATION_VERTICAL, 0)
	lbl, _ := gtk.LabelNew("TEst")
	box.Add(lbl)
	win.Add(box)

	cssPvr, _ := gtk.CssProviderNew()
	// NOTE using GTK inspector ([ctrl]+[shift]+[i]), you can modify on the fly CSS content, try
	// add: "background-color: transparent;"
	// get black screen
	cssPvr.LoadFromData(`
	window {
	border-radius: 10px 30px 10px 30px;
	background-color: transparent;
	color: red;
	}
	`)

	ctx, _ := win.GetStyleContext()
	sc, _ := gdk.ScreenGetDefault()
	ctx.AddProvider(cssPvr, uint(gtk.STYLE_PROVIDER_PRIORITY_USER))
	gtk.AddProviderForScreen(sc, cssPvr, uint(gtk.STYLE_PROVIDER_PRIORITY_USER))
	screen := win.GetScreen()
	visual, _ := screen.GetRGBAVisual()
	win.SetVisual(visual)
	win.SetDecorated(false)

	win.ShowAll()

	gdkWin, _ := win.GetWindow()
	conn, err := xgb.NewConn()
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
	xParentWin := 0x2a00003
	xproto.ReparentWindowChecked(conn, xproto.Window(gdkWin.GetXID()), xproto.Window(xParentWin), 0, 0).Check()

	gtk.Main()
}

There is not a lot of literature about dealing with this issue.
Do you think there is another way to solve my usecase ?
My need is to draw gtk widgets over an existing window. maybe I could piggy back on the already existing window and add a DrawingArea widget on it instead of creating a new window ?

This code work, by reducing integrated window that hold your drawing area.
producing a warning:
XGB: conn.go:47: Could not get authority info: EOF
XGB: conn.go:48: Trying connection without authority info...

but during execution, the widget remains at the top left of the targeted window

package main

import (
	"fmt"
	"math"
	"os"

	"github.com/BurntSushi/xgb"
	"github.com/BurntSushi/xgb/xproto"

	"github.com/gotk3/gotk3/gtk"
	"github.com/gotk3~/gotk3/cairo"
)

/*
	Retrieve the id of one of your window with xwininfo -all and change the xParentWin
	argument with the id of the window on wich you want to make the pill appear.
*/

func drawPill(cr *cairo.Context, x float64, y float64, r float64, g float64, b float64, msg string) {
	cr.Save()

	cr.SelectFontFace("Sans", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_BOLD)
	cr.SetFontSize(10.0)
	extents := cr.TextExtents(msg)
	height := float64(extents.Height)
	width := float64(extents.Width)
	cr.SetSourceRGB(r, g, b)
	cr.Translate(x, y)
	cr.MoveTo(height, height)
	cr.Arc(height, height, height, math.Pi/2, math.Pi+math.Pi/2)
	cr.ClosePath()
	cr.Fill()

	cr.Rectangle(height, 0, width, height*2)
	cr.ClosePath()
	cr.Fill()
	cr.Arc(height+width, height, height, -math.Pi/2, math.Pi/2)
	cr.ClosePath()
	cr.Fill()

	cr.SetSourceRGB(0, 0, 0)
	cr.MoveTo(height, extents.Height*2-extents.Height/2)
	cr.ShowText(msg)

	cr.Restore()

}
func main() {
	gtk.Init(nil)
	xParentWin := 0x1add718
	win, _ := gtk.WindowNew(gtk.WINDOW_TOPLEVEL)
	da, _ := gtk.DrawingAreaNew()
	win.Add(da)

	win.SetTitle("Test")
	win.Connect("destroy", gtk.MainQuit)

	conn, err := xgb.NewConn()
	if err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
	geom, _ := xproto.GetGeometry(conn, xproto.Drawable(xParentWin)).Reply()

	win.SetDefaultSize(int(geom.Width), 50)
	win.SetSizeRequest(43, 16)
	win.SetResizable(false)
	win.SetAppPaintable(true)
	win.SetDecorated(false)

	sc := win.GetScreen()
	vs, _ := sc.GetRGBAVisual()
	win.SetVisual(vs)
	win.SetOpacity(0.8)

	da.Connect("draw", func(da *gtk.DrawingArea, cr *cairo.Context) {
		drawPill(cr, 0, 0, 1, 0, 0, "hello")
	})

	win.ShowAll()
	gdkWin, _ := win.GetWindow()
	xproto.ReparentWindowChecked(conn, xproto.Window(gdkWin.GetXID()), xproto.Window(xParentWin), 0, 0).Check()

	gtk.Main()
}

In fact the black background behind the pill is still there. It is less noticeable as it is almost the size of the pill.
Take a look to this screenshot where I compiled the example. I used a white theme to expose the issue more easily

Yes, indeed, this is what I wanted to underline by saying "But it is not really elegant". in a previous com.
Actually, I have no other solution, I'm not familiar with GtkCairo, I have to take some time to figure it out. Your problem made me interested in the functionality of "Cairo". While looking for a solution, I found some documentation using the "C" language which I will explore for my use and to learn more (I want to do rasterized auto text scrolling for an aboutBox). If I find anything that could help you, I will get back to you.

Any news on this? I'm trying to use layer shell to draw desktop icons in Sway. The only thing left to implement is transparency so that user's can have their wallpapers respected.


Startbildschirm (Play, Quit, Credits, Keybinds)

still to do -> credits
other non menu related keybinds

Menu implemented


bug: impl of IntoIterator not automatically found for [T; SIZE] type

Bug Report
Cairo version:
2.9.2

Current behavior:
Working in PR #6944 I encountered a small issue when defining the impls for IntoIter for the [T; SIZE] type:

pub(crate) impl FixedSizeArrayIntoIterator<
    T, const SIZE: usize, -crate::metaprogramming::TypeEqual<[T; SIZE], [T; 0]>, +Drop<T>,
> of crate::iter::IntoIterator<[T; SIZE]> {
    type IntoIter = crate::array::SpanIter<T>;
    fn into_iter(self: [T; SIZE]) -> Self::IntoIter {
        crate::array::FixedSizeArrayToSpan::<T, SIZE>::span(@self).into_iter()
    }
}

pub(crate) impl EmptyFixedSizeArrayIntoIterator<T, +Drop<T>> of crate::iter::IntoIterator<[T; 0]> {
    type IntoIter = crate::array::SpanIter<T>;
    fn into_iter(self: [T; 0]) -> Self::IntoIter {
        crate::array::EmptyFixedSizeArrayImpl::<T>::span(@self).into_iter()
    }
}

If these impls are defined in the array.cairo module, next to the ones for Array and Span, then trying to use into_iter in another module fails with:
Method `into_iter` could not be called on type `[core::integer::u32; 4]`.
Candidate `core::iter::traits::iterator::IntoIterator::into_iter` inference failed with: Trait has no implementation in context: core::iter::traits::iterator::IntoIterator::<[core::integer::u32; 4]>.

Importing use crate::array::{EmptyFixedSizeArrayIntoIterator, FixedSizeArrayIntoIterator}; explicitly solves the issue.
Defining these impls in crate::iter::traits also solves the problem

Expected behavior:
The implementation is found automatically, like for other types.
Steps to reproduce:
checkout PR #6944

Closing as seen in PR


docker commands for creaing images and running containers

docker-commad.md contains docker commands for creating images and running container which makes voting-app. This will help people to start with basics and then progress towards compose, swarm and k8s

This sample is oriented around a Swarm/Compose workflow. This adds additional complexity that might confuse early users.


Support huggingface Textual Inversion embeddings (.bin)

Is your feature request related to a problem? Please describe.
HuggingFace concepts trained using textual inversion are not compatible with the current code unlike .pt files created with the existing textual inversion repos
Describe the solution you'd like
Add support for huggingface .bin embeddings
Describe alternatives you've considered
Possibly a converter?

Perhaps @Oceanswave can help. He wrote the textual inversion implementation.

Are there any libraries (similar to HuggingFace) for .pt files trained? Biggest value add to me is having a library of concepts to draw from

Bringing in @Oceanswave and @nicolai256 into this conversation, as they both worked on the textual inversion implementation. Do either of you know how to load/generate the hugging face .pt files?

It seems like the sd-concepts-library ".bin" embeddings are now usable on AUTOMATIC1111's repo: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/151
Could that solution be implemented here as well?

Support for .bin files is now merged in the development branch.


Reduce API calls when creating,listing and getting details of service…

… keys
Leveraging existing API calls in ServiceInstanceRequirement to find service
instance info by name so that no need to send the same request twice.
[#93578300]
Signed-off-by: Hua Zhang<EMAIL_ADDRESS>

thanks, merged


Running iOS apps on M1 hardware via 'My Mac (Designed for iPad)'

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Use case
I looked around but didn't find a proper way apart from running the app straight from Xcode and attaching to the debug session, but it would be great to have an easier way to run iOS apps on the arm Macs. It speeds up development a lot (at least in our case) as we get the benefit from not using a simulator, wait better performance, making it easy to resize the window as well as iOS APIs.

Proposal
Have flutter devices add an additionnal device on M1s called My Mac (Designed for iPad) which allows to run the app on the mac as an iOS app.

@gaetschwartz
Check this similar issue and see if it helps in your case.

Well attaching works, as stated in the issue, but it requires launching the app via Xcode and then attaching which is not the ideal setup. What would be great is a way to just use something like flutter run -d macos_designed_for_ipad without having to use Xcode.

Thanks for the feedback. Labeling this as a proposal.

While using flutter attach and launch.json, the connected devices show the Mac Designed for iPad, but after choose it, it shows below:
Waiting for a connection from Flutter on Mac Designed for iPad...
The Dart VM Service was not discovered after 30 seconds. This is taking much longer than expected...

Click "Allow" to the prompt asking if you would like to find and connect devices on your local network. If you selected "Don't Allow", you can turn it on in Settings > Your App Name > Local Network. If you don't see your app in the Settings, uninstall the app and rerun to see the prompt again.
                                                                                Waiting for a connection from Flutter on Mac Designed for iPad...

But there is no Local Network permission for macOS.
Are there any reliable solutions? I'm debugging the App with Bluetooth equipment. If this is solved, it will not need a phone for connection.

Created https://github.com/flutter/flutter/issues/141719 to track the subtasks needed for this.

@gaetschwartz how do you attach to debug session?


Configure securityContext by default for implementing Pod Security Standard

In compliant Kubernetes clusters, workloads should run as secure as possible.
Therefore, it would be great if hivemq and the operator can be compliant with the Pod Security Standard restricted profile (if possible).
See https://kubernetes.io/docs/concepts/security/pod-security-standards/

Currently it is possible to set the podSecurityContext but it is not possible to set the containerSecurityContext (e.g. drop all capabilities, allowPrivilegeEscalation to false).

Thanks @avthart - Indeed, that's a valid point to improve the Pod Security Standard of our platform.
That's something we are not directly supporting via our Helm charts. I will work on this to provide support for the Container Security Context as well.
In the meantime, if you need that, you can always override the whole StatefulSet as mentioned in our HiveMQ documentation. Bear in mind, that doing so, you need to align the different service configuration you also may have in your custom chart values with the ones you define in your override StatefulSet.

Thanks. Will look into this!

Fixed by https://github.com/hivemq/helm-charts/pull/361


Need multiple static pages - home, about, contact, prices etc.

I'm building a business website with a blog, but can't see how to easily add more static pages beyond the index.html template.
My question/issue is the same as Ryan's here: http://discuss.gohugo.io/t/creating-static-content-that-uses-partials/265
So I need to be able to use partials too. I feel like having an about.html in the layouts file should exist at site.com/about/ ?
Is there something we're missing?

Hi @lydenyardley,

So that second point you made - that's the thing... I need a separate layout for /about/ and /projects/ etc.

It has been a while, and I am sure you have found the solution already, but in any case, here is my understanding:

/layouts/_default/single.html: Applies to /content/about.md, /content/contact.md, etc. (and anything else that aren't covered by other section templates like /layouts/projects/single.html), appearing as http://example.com/about/ and http://example.com/contact/
/layouts/about/single.html: Applies to /content/about/our-company.md, /content/about/our-products.md, etc., appearing as http://example.com/about/our-products/ etc.
/layouts/projects/single.html: Applies to /content/projects/red-cross.md, /content/projects/unicef.md, etc., appearing as http://example.com/projects/red-cross/ etc.

Hope this helps!

Hi again @lydenyardley,
If you haven't read it yet, the post by Michael Henderson (@quoha) may be helpful: http://discuss.gohugo.io/t/creating-static-content-that-uses-partials/265/9
and likely better than what I have written in my previous post here.  :-)

It has been four months since the last post of the bug reporter. Propose closing this.

Good idea, @alaska!  Let's do that then!  :-)

I would like to have this issue open again because it is not really solved.  And in Germany we have to have sites like "impressum" and "privacy". Both are single page static files like @lydenyardley asked for. I think static pre-defined files (however we should call those static-static files) are a very common use-case. It would at least be nice to write a few words about static pages in the documentation to help everyone or to let the developer know he should search another engine that is capable of solving this problem.
This is definetely a problem which is able to disgust developers when searching a static web engine.

I solved this problem in a very simple way: I just added all "static-static" files to static directory. So hugo copies all static files to public dir. Here you can see an example: http://pravosudie-ufa.ru/attribution.html.

I thought of that too. But as far as the documentation says the static files are static and can not be parsed to extract header, footer and other redundant content.

As there are not so many similar pages you can hard-code header/footer/etc to these pages😃

Very useful page to read: https://gohugo.io/templates/content/
E.g. you can create /layouts/misc/single.html, add custom partials and add type = "misc" in frontmatter of content file.

which seems to me like a very dirty hack because it makes it more difficult to deploy my template to multiple projects which should be easy to edit for someone not beeing a webmaster. And I do not think redudancy is really the option to choose? Just thinking of the menus on those pages...
What I would suggest is an option to parse the static folder or the creation of a new parsed-static folder. That will solve this problem and will also enable an easy workaround for missing css/js preprocessors.
I read that. For myself I have another workaround which enables the possiblilty of different layouts (_index.md) which I think is still confusing for those who will manage the website later on.

You are right, it is possible to solve this issue (workarounds). But they are far from obviously for someone new to hugo. And I think this is the point where this issue is still an issue and is still relevant.

@Fjolnir-Dvorak you are right, and we are in the process of refurbishing the documentation site. But we have a limited set of resources, so we cannot track the issues on this level of detail.

@Fjolnir-Dvorak
Here is the explanation of static in the new docs. That said, please do me a favor and open a new thread on the Hugo forums for further discussion since this conversation is unlikely to get much attention as an addendum to a closed issue. I'd love your feedback and thoughts on how to make this easier for new users. (We can also talk with the community about the multilingual proposition you brought up today on Gitter :smile:).
Thanks much for your support of Hugo!

I found this after quite a bit of google searching ("hugo" and "single" or "standalone html" make for lots of results)  and it solved my problem, but I'd also argue that the description of static in the docs doesn't make it clear that you can have regular .html in the static.  Most things were leading to this page: http://gohugo.io/templates/homepage/
Might be worth making it clear there that dropping .html files in to layout won't render them unless there is .md content attached, and the way to do that would be to put them in static.

Wanted to do the same thing as well, and couldn't find a good solution until I found a hint at https://gohugo.io/content/using-index-md/
In particular, these lines

Here are a couple of examples to make it clearer…
_index.md location	Page affected	Rendered by
/content/post/_index.md	site.com/post/	/layouts/section/post.html

So to get an about page, I placed an empty _index.md in /content/about/_index.md and made the corresponding template in /layouts/section/about.html, which yields example.com/about/ as expected.
Surprisingly, I then tried removing /content/about to see if it would still work (so an empty /content/, and it does! So to get static pages, it seems we'd only need to create the desired x.html in /layouts/section/x.html to get example.com/x/.
The docs should be updated/clarified to reflect this feature (i'll try to do it once free).

@liquiddandruff I am soliciting feedback for the new docs concept. I think everything you mentioned has been detailed on https://hugodocs.info (e.g., lists, section templates, ) more than once. If you can provide feedback, please do so on the forums - https://discuss.gohugo.io - if you wouldn't mind. This type of conversation is much better suited for the forums since any discoveries you make are very unlikely to be discoverable (i.e., beneficial) to the Hugo community within the context of a GH issue. Thanks much for your support of Hugo! :smile:

Wanted to do the same thing as well, and couldn't find a good solution until I found a hint at https://gohugo.io/content/using-index-md/
In particular, these lines

Here are a couple of examples to make it clearer…
_index.md location	Page affected	Rendered by
/content/post/_index.md	site.com/post/	/layouts/section/post.html

So to get an about page, I placed an empty _index.md in /content/about/_index.md and made the corresponding template in /layouts/section/about.html, which yields example.com/about/ as expected.
Surprisingly, I then tried removing /content/about to see if it would still work (so an empty /content/, and it does! So to get static pages, it seems we'd only need to create the desired x.html in /layouts/section/x.html to get example.com/x/.
The docs should be updated/clarified to reflect this feature (i'll try to do it once free).
EDIT: Well, false alarm. Seems the debug server just cached the results; we'd still need to create the corresponding content for hugo to render the sections layouts. Perhaps there could be a flag to enable this this behaviour anyways to get static pages?

The issue with that is, that you create a new section. You may not notice it but if you want to rely on some features that of hugos templating engine, being in a different section can cause issues.
For example if you wanted to use the paginator on the about page to paginate posts from the main section. The paginator will paginate the current section which is the about section without any posts. Things like this.

https://gohugo.io/content-management/organization/#type


Typo in oracle 'oradata' path

Hi @josetesan thanks for the contribution, merged to main (=1.8) and 1.7.


Rename to CONSUL_ADDR

Because of the two hardest problems in coding, cache-busting runs a far distant second to naming things.


Pull changes from kvm-bindings upstream

We released kvm-bindings v0.4.0. The version of the fork should also be updated so that we can use the newest kvm-ioctls version in Firecracker.

Commit that needs to be ported: https://github.com/rust-vmm/kvm-bindings/pull/33/commits/581b3b769ff34ce8a50613c3532a34daf860b121

Done in https://github.com/firecracker-microvm/kvm-bindings/pull/12


Indices of layers

Thank you for this great work.
I have noticed that when doing manipulation, for --layerwise_manipulation, you indicate a specific layer using the index of the layer to perform manipulation such as 6-11 in the example. i am just wondering how did you retrieve the correct index of a particular layer, assuming using a different generator model?
Any insights would be greatly appreciated!

We use the proposed re-scoring technique to conduct a layer-wise analysis. In this way, the layers with the highest response are treated as the most relevant layers.

We use the proposed re-scoring technique to conduct a layer-wise analysis. In this way, the layers with the highest response are treated as the most relevant layers.

Thank you @ShenYujun for your kind explanation. I am just wondering how did you get the list of layer indices in the first place.
By the way, I have trained my own StyleGAN model using the official PyTorch version StyleGAN provided here by facebook search. Could you kindly advise me if I can embed my trained model into your pipeline? I am not sure if their model and yours follow the same mechanism?

The first convolution layer used in the generator is Layer 0, the second is Layer 1, and so on.
I am not sure whether it is the "official" PyTorch implementation of StyleGAN. As far as I know, the authors of StyleGAN only release one official codebase, which is using TensorFlow. Our model exactly aligns with theirs and we also support converting tf weights to pth weights in our codebase ;)

The first convolution layer used in the generator is Layer 0, the second is Layer 1, and so on.
I am not sure whether it is the "official" PyTorch implementation of StyleGAN. As far as I know, the authors of StyleGAN only release one official codebase, which is using TensorFlow. Our model exactly aligns with theirs and we also support converting tf weights to pth weights in our codebase ;)

Hi @ShenYujun , thanks a lot for your instant reply. I have noticed that you also implemented biggan in your pipeline, but seems like you haven't included biggan in this repo? Actually, I opened another issue inquiring this question. I will close this issue then. And it would also be great if you could kindly shift to that issue and share some more information on the biggan implementation.
Thank you!


Node.js projects slow to load when npm dependency tree is large

This is a regression as a result of some project system changes - working on a fix for rc2

Don't know if it's the same bug, but when I add mssql to my node_modules VS becomes really slow, often it hangs when closing or unloading the project.


Swerve Module Drive Motor Encoder and controller defaults

The SwerveModule subsystem needs to set a conversion factor for the drive motor encoders.  Probably it would also be good to start the motor controllers fresh with the factory default so that our code is completely setting the configuration.
Previously we used:
leftLeadMotorController = new CANSparkMax(ValueConstants.kLeftMotor1Port, CANSparkMax.MotorType.kBrushless);
leftLeadMotorController.restoreFactoryDefaults();
leftLeadEncoder = leftLeadMotorController.getEncoder();
leftLeadEncoder.setPositionConversionFactor(18.84 * 2.54 / 8.33 / 100);
https://github.com/Team5830/2023-Charged-Up/blob/main/src/main/java/frc/robot/subsystems/DriveTrain.java
The conversion factor above was to get the distance the wheels traveled in meters:
The drive wheel circumference in inches (previously 18.84, will need to measure it on the new wheels)
X 2.54 (centimeters/Inches)
/ Drive Gear Ratio  (was 8.33, should be 6.55 with our swerve drive)
/ 100 (meters/centimeters)

Fixed in eb3dcc9d491e55b7facd8d16047835c918f5de15 and 7cadc2f4fe1b6b319f883cd9fc24cfa08d8f150d


Implement a 'Remember Me' option

How do you go about implementing a 'Remember Me' option for the login? Or maybe its something you can add in the future?

it's a new feature for sure.


Allow base64 encoding/decoding in templates

Is your feature request related to a problem? Please describe.
Some charts don't allow you to provide a secret name to reference actual secrets (such as NATS)
 config:
        merge:
          no_auth_user: public
          accounts:
            public:
              users:
              - {user: public, permissions: {subscribe: ["user.notifications.*", "public.>"], publish: ["public.>"]}}
            private:
              jetstream: enabled
              users:
              - {user: admin, password: "{{ (index .MgmtResources "NatsSecret").data.token }}", permissions: {subscribe: [">"], publish: [">"]}}

so one can use secret refs to reference the secret in the template. But these values are base64 encoded. Right now this is not an issue since NATS supports bcrypt values that are safe to be put in a configmap as they aren't plaintext.
But it would be great if secrets could be templated like this by allowing base64 encoding and decoding.
1 worker.go:238] "added to result with err template: mgmt-mgmt-nats/nats:11: function "base64" not defined" logger="deployer" worker="9" key="mgmt:::mgmt:::Sveltos:::nats-sveltos-mgmt:::Helm:::false"
Describe the solution you'd like
Allow base64 encoding and decoding of values in templates

Thank you @thecodeassassin
Your feedbacks are helping improving Sveltos. Will look into this after #516

Not sure I got this correctly (apologies in case). I get you want in the template a function to base64 encode and decode.
Sveltos supports Sprig functions. So this should take care of it
Sprig has the following encoding and decoding functions:
b64enc/b64dec: Encode or decode with Base64
b32enc/b32dec: Encode or decode with Base32


Added feature to reopen the comport after every write operation.

This is a workaround for imx_uarts as with these devices the break signal is only working once after opening the com port.
rised version to 1.1.2

Hi, thanks for taking a interest in this project and taking the time to debug this problem on your end.
I am not familiar with imx proceccors myself, but only being able to send one break signal doesn't sound like intended behaviour. However I coun't really find any outside information regarding this issue, so I would be glad if you could link to some resources about this topic.
Since I want this crate to stay relatively simple and generic, I would implement this fix only as a activatable feature if this is a problem among imx processors in general.

Hi,
yes you are right this doesn't seem to be an intended behaviour.
I use the following iot gateway from compulab with an IMX8 processor:  https://www.compulab.com/products/iot-gateways/iot-gate-imx8-industrial-arm-iot-gateway/
After the first telegram is send, the commands set_break and clear_break have no more effect. Further telegrams will be send but without the leading break signal. (I measured this with an oscilloscop)
Also me I didn't find anything regarding this problem in the net, I explained it to myselfe that usually time critical protocol stuff is done by a microcontroller...
I checked the imx reference manual as I wanted to understand if it is complicated to realizze a break signal, but it is nothing else than setting a bit in a control register. The driver code is also "relatively" simple at least the function responsable for the break signal (https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/drivers/tty/serial/imx.c intresting line: 1132)
I implemented this feature as an option which can be activated if needed, please see also the changes in artnet_to_opendmx
But i understand when you say you don't want such workarounds in your code.
regards

Hm, interesting. I've looked at the driver code, but since I am not a expert in this field either, I too can't spot anything obvious. Does the same error occur with a C program? Or have you tried the same thing with one of the linux packages in the recources section of the compulab board. Maybe it has something to do with the config of the uart port
I'm sorry if this is all obvious stuff you've already tried, I'm just throwing ideas out there.
But since this issue orgiginates somewhere further up, I will not merge this fix in the code. What I orignally meant by "feature" is a cargo feature. In this case, if it is not needed it's doesn't even get compiled in the executable and doesn't add any additional runtime overhead.
However I'm glad you took the time to find this fix. Maybe add "imx" somewhere in the name of your fork, so that if anyone is having the same problem, they will find your code.
I'm really excited that this project, which was mostly intended for personal use is also helpful to someone else. I you are working on a product, installation or personal project fell free to share your experience and progress in the discussions.
Cheers


SSLSPLIT doesnt do anything.

Please supply the following with bug reports to allow for diagnostics:

Output of sslsplit -V

SSLsplit 0.5.2 (built 2018-03-31)
Copyright (c) 2009-2018, Daniel Roethlisberger<EMAIL_ADDRESS>https://www.roe.ch/SSLsplit
Build info: V:FILE
Features: -DHAVE_NETFILTER
NAT engines: netfilter* tproxy
netfilter: IP_TRANSPARENT IP6T_SO_ORIGINAL_DST
Local process info support: no
compiled against OpenSSL 1.1.0h  27 Mar 2018 (1010008f)
rtlinked against OpenSSL 1.1.0h  27 Mar 2018 (1010008f)
OpenSSL has support for TLS extensions
TLS Server Name Indication (SNI) supported
OpenSSL is thread-safe with THREADID
Using SSL_MODE_RELEASE_BUFFERS
SSL/TLS protocol availability: tls10 tls11 tls12
SSL/TLS algorithm availability: !SHA0 RSA DSA ECDSA DH ECDH EC
OpenSSL option availability: SSL_OP_NO_COMPRESSION SSL_OP_NO_TICKET SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION SSL_OP_TLS_ROLLBACK_BUG
compiled against libevent 2.1.8-stable
rtlinked against libevent 2.1.8-stable
4 CPU cores detected

Output of uname -a
Linux kali 4.17.0-kali1-amd64 #1 SMP Debian 4.17.8-1kali1 (2018-07-24) x86_64 GNU/Linux
Exact command line arguments used to run sslsplit
V -D -k  ca.key -c ca.crt -P  https <IP_ADDRESS> 8443  https ::1 8443
NAT redirection rules you are using, if applicable

iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 8443
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8443

For build problems, please supply:
So after running sslslip it starts and then waits at line.
Starting main event loop.
I'm opening https websites but nothing is sniffed

It seems like your web traffic is not going through this system, hence SSLsplit. Are you sure SSLsplit is in between your browser and the Web, and there is no other way your browser can reach the web? How do you redirect web traffic to this system?

Also, you redirect both port 80 and port 443 to the same SSLsplit proxyspec using https mode. You'll want to redirect port 80 to a http mode proxyspec.

@sonertari I'm trying it on my browser on the same system.

Yes, that's the issue. Your browser is reaching the web directly. SSLsplit should be running on a router (or a system acting like a router) in between your browser and the web.
Also don't forget to heed @droe's suggestion too.

So i cant sniff my own requests? I must arpspoof someone?

Short answer: You need to change your default route to achieve that.
I use a VM for that (and for other reasons irrelevant here). I run sslsplit on a system running in a VM, which also acts as a DHCP server and a router. The host system obtains an IP from this guest system. Then I set the default route of my host system to the the guest system, so that the guest system goes in between the host system and the Internet.

Oh ok, thanks for help and in-depth explanation :D

Does it work?

Nope, sslsplit does not work.

This is really about routing and netfilter rules, not sslsplit.
Perhaps if you use the following, sslsplit can get the packets: sslsplit -D -k ca.key -c ca.crt -P https <ip of eth0> 8883 http <ip of eth0> 8880
Or perhaps sslsplit -D -k ca.key -c ca.crt -P https <ip of eth0> 443 http <ip of eth0> 80 as I don't think your netfilter (nat) rules are doing what you expect with those arpspoof lines.

Hello,
I tried using both of commands that you suggested. Still sslsplit does nothing.

If you use netcat in verbose mode to open ports 8880 and 8883 locally instead of sslsplit, does netcat receive connections?

What do you mean by open ports with netcat? Is this correct command?
netcat -l 8880
If yes then no I dont receive any data.

OK ive got it to work, sadly many sites use hsts so I get warning but i see traffic flowing in sslsplit :D


Added explanation and examples for dynamic destination data writing to big query (python)

I have found that now it's possible to apply dynamic destination with python when saving in big query tables through IO, and updated the documentation accordingly.
Source: https://beam.apache.org/releases/pydoc/2.19.0/apache_beam.io.gcp.bigquery.html#writing-data-to-bigquery

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

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

See the Contributor Guide for more tips on how to make review process smoother.

GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

@rincon-santi - Are you still working on this PR? Do you need help?

Hi, I'm really busy because of personal life, in two weeks or so I will be
able to continue working on it
El jue., 15 oct. 2020 a las 20:30, Ahmet Altay<EMAIL_ADDRESS>escribió:

@rincon-santi https://github.com/rincon-santi - Are you still working
on this PR? Do you need help?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/beam/pull/12916#issuecomment-709512471, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AH2UKF5OFBG5LQSC7VJJORDSK45UNANCNFSM4RXIXXYA
.

Hi, I'm really busy because of personal life, in two weeks or so I will be able to continue working on it El jue., 15 oct. 2020 a las 20:30, Ahmet Altay<EMAIL_ADDRESS>escribió:
…
@rincon-santi https://github.com/rincon-santi - Are you still working on this PR? Do you need help? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#12916 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH2UKF5OFBG5LQSC7VJJORDSK45UNANCNFSM4RXIXXYA .

Take care. Thank you for the reply.

sorry - any updaTES? : ) : /


records: 500 error when record does not exist

When trying to access a rec_ID that does not exist, one should get a pretty 404 message instead of a 500 error. This is probably due to guess_primary_collection_of_a_record being called before checking whether the record_exists.

FYI, see the PR I just reference. I think it will fix the problem.

See https://github.com/inveniosoftware/invenio/pull/2873/files#r26558445


Cursormode integrated as extension

From https://github.com/vheon/vim-cursormode.

can we have some documentation please?

any update here?


Remove JSON column from ClickHouse backend

Feature Request
When I implemented the ClickHouse backend I used the experimental JSON column type based on feedback from ClickHouse that it would be promoted out of experimental status "soon". We discovered that it had some serious missing functionality and added in the String column version of the JSON data next to it as a workaround. I recently reconnected with ClickHouse on the topic and it seems like they are not prioritizing getting the JSON field fully functional any time soon, so I would like to remove it!
Describe the solution you'd like
I'd like to remove the JSON column and change the existing handful of places in the code that use it to use the String column with JSON string function calls. They are faster, fully functional, and it will reduce the storage for the xAPI statements significantly. We entirely use the String column in Aspects.
Describe alternatives you've considered
Waiting for CH to finish their feature and dropping the String column instead. 😄 Last I heard from them "no one is working on that".
Discovery, Documentation, Adoption, Migration Strategy
This would be a breaking change for any downstream consumers of the Ralph database directly, but since I think everyone using this would already have all of their data in the String column I think the only necessary migration internal to Ralph would be to drop the column. Since Ralph doesn't even manage the schema I hope that would be a small issue.
Do you want to work on it through a Pull Request?
I'd be happy to do this work, I just want to make sure it would be a welcome change and answer any questions you may have before doing the work. I also know there was work happening on the abstracting the backends that may need to land first.

Hi @bmtcril ,
As you mentioned, I don't think of any barrier for this change and it would be welcomed! Happy to assist you with this task, and we can aim for a release in version 4.0.


Support for Ruby 3.0 and deconstruct Hashes as keyword arguments.

We use sidekiq-schedule for a lot of periodically timed jobs. We have our configuration set up with keyword arguments since most of our jobs use keyword method signatures.
This results in our schedule to look like:
init/schedule.rb
schedule = {
  'morning job' => {
    class: 'MorningJob',
    cron: '0 8 * * * America/Los_Angeles',
    args: { foo: 'bar', hello: 'world' }
    persist: true
  }

...
Sidekiq.configure_server do |config|
  config.on(:startup) do
    schedule.each do |(name, schedule_config)|
      Sidekiq.set_schedule(name, schedule_config)
    end
  end
end

The issue is that args: { foo: 'bar', hello: 'world' } is passed along as a Hash, when we intend for it to be deconstructed as keyword arguments. This is a hard requirement for Ruby 3.0 which no longer allows Hashes to be auto-interpolated as keyword arguments.
Suggestion is to modify this method: https://github.com/sidekiq-scheduler/sidekiq-scheduler/blob/master/lib/sidekiq-scheduler/utils.rb#L63-L69 to have a condition for Hash and double splat in that scenario.

Won't this break if someone wants intentionally pass a hash as an argument? Just the first thing that comes to my mind, would have to test to see if it does or not

Yea that's a fair point. Arguably the same goes if someone wants to intentionally pass an Array as an argument too.
Perhaps we could make this more explicit in the config with a keyword_argument: true option.

yeah, I think I would prefer having this as an option in the config, or even at the job level, just so we avoid breaking someone's app that is relying on this behavior

@marcelolx okay added a commit for adding the keyword_argument: true but it makes things less clean. Definitely open to suggestions.
Added a spec as well.
Commit for your suggestion: https://github.com/sidekiq-scheduler/sidekiq-scheduler/pull/440/commits/5c59f047fe5dfc0d311d4e2e7def4ee0a751ace6

@abMatGit I think we can go with it as it is for now, even though it is less clean...


Failed to create kind cluster

Bug Report
When creating a management cluster, the following error pops up:
✘ [0205 22:00:55.35728]: init.go:166] unable to set up management cluster, : unable to create bootstrap cluster: failed to create kind cluster tkg-kind-c7ve93tmk1u6m2g1pk5g: failed to init node with kubeadm: command "docker exec --privileged tkg-kind-c7ve93tmk1u6m2g1pk5g-control-plane kubeadm init --skip-phases=preflight --config=/kind/kubeadm.conf --skip-token-print --v=6" failed with error: exit status 1

I tried it on an Intel and Silicon (M1) Mac and, in both machines, I tried deploying it as Docker and on AWS. The error is always the same.
The kind create cluster command works.
docker version

Client:
 Cloud integration: v1.0.22
 Version:           20.10.11
 API version:       1.41
 Go version:        go1.16.10
 Git commit:        dea9396
 Built:             Thu Nov 18 00:36:09 2021
 OS/Arch:           darwin/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.11
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.9
  Git commit:       847da18
  Built:            Thu Nov 18 00:35:39 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.4.12
  GitCommit:        7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc:
  Version:          1.0.2
  GitCommit:        v1.0.2-0-g52b36a2
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Expected Behavior
Management cluster created
Steps to Reproduce the Bug
Install latest Tanzu community edition CLI on a Mac, execute tanzu management-cluster create --ui and try to create a management cluster.
Screenshots or additional information and context
N/A
Environment Details

Build version (tanzu version):

version: v0.2.1
buildDate: 2021-09-29
sha: ceaa474

Deployment (Managed/Standalone cluster): Managed
Infrastructure Provider (Docker/AWS/Azure/vSphere): Docker and AWS
Operating System (client): macOS

Diagnostics and log bundle

Hi @vfarcic - thanks for reporting this.
ARM is not currently supported, so unfortunately you will not be able to deploy from that machine.
Can you verify you are not using cgroupv2 on the Linux machine? If you run docker info | grep Cgroup that should show the version.

Sorry, I mean on the Intel machine, not Linux. Intel MacOS is supported. We just need to make sure you are running a version of Docker Desktop prior to 4.3 when they switched over to cgroupv2.

I upgraded docker desktop yesterday so it is definitely never than 4.3. Is there an issue associated with the work on the support for cgroupv2 so that I can follow?

OK, downgrading to anything prior to 4.3.0 should get things working for you. 4.2.x still used cgroupv1.
Support in TCE is dependent on changes in tanzu-framework. Those changes appear to have been made, but we need a newer release of TCE that uses a release that includes it. The tracking issue in the community-edition repo can be found here: https://github.com/vmware-tanzu/community-edition/issues/2798

Looks like a resolution was found, feel free to reopen if we missed anything.


NuGet package gone missing

The NuGet package linked in the readme 404s as of right now. Has it been renamed?

Sort of, the develop branch is for VNEXT (e.g. LLVM 10) where the names of packages are all changing. Master branch has the current released code and the nuget links for that shoudl still be good. The default branch is set to develop so that PRs etc.. go to that branch (PRs never go to master - it always reflects only released code) Sorry for the confusion but it's only temporary until there's an official release of support for LLVM 10, which is coming soon. (LLVM10 itself only just released this week)

The 10.0.0-alpha release NUGET package is now available under the new name.


docs: rename Interactive Display

..to Weavescope or to Dashboard? ..or ..?
Dashboard gets the point across better.

Do you propose 'Interactive Dashboard'?

I would propose 'Weave Scope Dashboard' (there's a space in there!)

ok
On Wed, Aug 5, 2020 at 1:20 PM jtagcat<EMAIL_ADDRESS>wrote:

I would propose 'Weave Scope Dashboard' (there's a space in there!)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/overnode-org/overnode/issues/30#issuecomment-668916221,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA6JSVNUKAAQU3TP2Z75Z43R7CXXXANCNFSM4PU27GVA
.


EN-GB localization may be wrong

I don't know if I'm right, but the en-gb localization says that the "L" format is "DD/MM/YYYY". Shouldn't it be "MM/DD/YYYY"?

Sorry to bring up an old issue but this is the closest one related to what I'm experiencing. I am simply needing to format dates by locale.
en-US: MM/DD/YYYY
en-GB: DD/MM/YYYY
I get the locale from the HTTP headers on server-side, it returns to front-end and I use moment.locale('string') to set it. It works great! I modify the languages in Chrome and when I get en-GB it formats like it's supposed to above.
I live in the US and the problem is when I talk to people in London they're telling me it's formatting in the US format for them. They even get en-GB from the server-side so this just boggles my mind. Why would it work for me but not for them?