More documentation / UK keyboard with swapped "/@

Hello,
Would it be possible to post a link to documentation?
I'd like to create a UK keyboard that has " and @ swapped. (There are basically two typed of UK keyboards, and they differ in a handful of keys, including " and @).
Using this approach, it would also seem possible to 'intercept' certain control/alt key combinations. Perhaps even search key combinations - but hard for me to figure out without documentation.
Is it possible to remap the 'top row' as well? Of course they can be turned into function keys, but then for some functions keys you would still want brightness up/down, so I wonder whether they have a keycode - thanks!

There already exists a native UK layout with " and @ swapped (from the perspective of the American "qwerty" layout). In fact I'm using it to type this reply.
Open settings on your device, scroll to "Languages and input". Ensure that available languages include "English (United Kingdom)" (add it if it is not listed). Next expand the "Input method" and ensure that "UK keyboard" is selected. This is the basic UK layout (as described on wikipedia as "Windows keyboard": https://en.wikipedia.org/wiki/British_and_American_keyboards).
This set of extensions allows you to enable and use the "UK Extended" layout which provides additional options like letters with diacritical marks.
With regards to intercepting control and alt key combinations, what are you looking to accomplish?
With regards to the top row, there is an option in Chrome OS settings to flip the top row from "media" keys to "function" keys. Is that what you're after? Try searching for "function keys" in the settings window to find the option under "Keyboard"

Hi @bderrly, thank you so much!
Your reply was really helpful - in an unexpected way. I have a physical UK keyboard on the Chromebook, with a UK keyboard layout. However, I'm actually used to the UK-Mac keyboard. The UK-Mac keyboard has the physical shape of the UK keyboard, but (as it turns out) with a layout that's essentially the US keyboard layout. So - I have switch my layout from UK to US, and now essentially have a UK-Mac keyboard. I hadn't thought of this before, and your post triggered this idea - thank you.
This fixes the keyboard layout for me, regarding the location of certain characters like @#:" - excellent.
Maybe to provide a rationale: I've come from OS X and am trying to explore chromeOS as an alternative. When I say from OS X, it's actually mainly using Chrome on OS X with Google Apps, plus very few other things. So I've enabled Linux support to get Linux equivalents of the few apps that I've previously used on Mac (e.g. Zotero). That's all good for far.
But - essentially what I am after is a keyboard layout that will ease the transition from Chrome on Mac to ChromeOS.

With regards to the top row, there is an option in Chrome OS settings to flip the top row from "media" keys to "function" keys. Is that what you're after? Try searching for "function keys" in the settings window to find the option under "Keyboard"

Yes, thanks - I had found that setting.  What I'd like to do is to have about half the keys as special keys (e.g. keep full screen, keep the 'show windows' button, bright ness) but then use some of the other keys as hotkeys for other functions. For example, the Chromebook (HP x360 14) has physical volume buttons on the side. So I don't need the volume buttons on the keyboard, and would like to assign them to something else. For example, I'd quite like a button for 'next tab' and 'prev tab' (as I find the ctrl-tab combination awkward). Also, a dedicated key for voice input would be lovely.
This is to ease the transition: There are certain keyboard combinations that I am used to, but they don't have an equivalent. If I set up a dedicated key, then I can get used to this instead.
But, the following is more important, and what I would actually want to do:

With regards to intercepting control and alt key combinations, what are you looking to accomplish?

I'd like to be able to intercept certain combinations so that they don't do anything (stopping random things happening when my muscle memory kicks in) or assign them as they were in OS X. As I've come from Chrome on Mac there's just a ton of things I have in my muscle memory, that slow me down considerable. Continuing with the theme of changing tabs above, I'm used to (effectively) altgr+shift+[ or ] on Chrome on OS X to change tabs.
So in an ideal world,
(1) I would be able to intercept altgr+shift+[ and make that send a ctrl+shift+tab (and altgr+shift+] to send ctrl+tab). Then my muscle memory would just carry on.
(2) I would also like to get the search key to do a few more things. search+d for voice input is great, but I would like that on another key - and have 'beginning of line', 'end of line', 'forward delete', and 'kill', e.g. as search+a , search+e , search+d , search+k (essentially linux keybindings if you think of search as ctrl). That's so deeply embedded in muscle memory that it's really slowing me down.
I know forward delete is alt-backspace, but I don't have that in muscle memory - is there a keyboard short cut for beginning of line / end of line? RightCtrl+leftarrow seems to work sometimes.
(3) I would also like to mess with the alt-tab vs. ctrl-tab shortcuts, making alt-tab send ctrl-tab and ctrl-tab send alt-tab.
These three items would give me the perfect transition keyboard :) Any ideas what could be done?
Btw. you said you are using a UK keyboard at the moment - this might be of interest: When I switched from UK to US keyboard, it enabled a few hot keys in certain Google apps that weren't working before. E.g. ` in Gmail, as well as ctrl-alt-1234560 in google docs. For some reason those don't work with the UK keyboard, at least not on this model. Nothing to do with this extension, but keyboard related. Do those work for you, with the UK keyboard?

It seems that the IME extensions require focus on an input field to be activated.
I managed to get alt-shift-[ to generate ctrl-tab, and thus alt-shift-[ can be used to change tabs. However, this only works if an input field is activated.
This makes all of the above impossible.
C.f. also https://www.chromium.org/developers/design-documents/extensions/proposed-changes/apis-under-development/input-method-editor
The Search key also seems to be intercepted at a lower level.
I guess one way forward would be to put the whole Chromebook into developer mode, and then create lower level ways of handling the keyboard?

Sorry for dropping this. You're right that this extension in particular only works on input fields inside a window managed by Chrome. To my knowledge (I don't work on the Chrome input team or hardware team), you cannot remap the Search key though maybe it is possible in dev mode (I've never looked).
I do not normally work on a UK keyboard. I was testing it out to when replying to you to see if it worked as expected. Unfortunately it seems that there is not a lot of customization possible with key remapping built into Chrome OS. It may be helpful for you that you can remap the Search key to Control or Escape or a few other options these days.
I am going to close this as there is not much this extension can do for you I think. I wish you well on your journey to keyboard layout nirvana. :)

Many thanks for looking into it! All the best!


Improve error message when a connection to a node is lost

Steps to reproduce

embark demo
cd embark demo
embark blockchain (separate)
embark run, wait for ready
kill embark blockchain, wait for it to show red on the available services panel
in the console type await SimpleStorage.methods.get().call()

result:
Error: Invalid JSON RPC response: ""                                                                                │
│     at Object.InvalidResponse (/Users/iurimatias/Projects/Status/embark/node_modules/web3-core-helpers/src/errors.js:42:16)                                                       │
│     at XMLHttpRequest.request.onreadystatechange (/Users/iurimatias/Projects/Status/embark/node_modules/web3-providers-http/src/index.js:87:32)                                   │
│     at XMLHttpRequestEventTarget.dispatchEvent (/Users/iurimatias/Projects/Status/embark/node_modules/xhr2-cookies/dist/xml-http-request-event-target.js:34:22)
...

expected / better result:
Error: Invalid JSON RPC response, Are you connected to an Ethereum node?

hi @evgeniuz can you please submit work in gitcoin interface so we can payout this bounty? thanks!


Is this project dead?

@andredumas you've done a great job with the project. are you still working on it?

I have a feeling it might be

Hi @chrisabrams
It appears that way, but no, techan is not dead. My day job was incredibly busy the past 9 months or so and unfortunately did not allow time for anything else. This has now freed up and over the next few days I will go through the open issues and will work out where to take techan next.
Will close this on the next commit.
cheers
andre

@andredumas AND he's back!

GREAT NEWS :)


Print and read back

It looks like some of the methods not implemented for Base10/Base2 this lead to problem that it is impossible to print and read back BigFloat/BigDecimal.

BF.toString() - not exist, you should use .toExponential().
BF.BF(string in expoinential form) - gives an error.

Maybe I miss something? Should I use .toFixed() and remove trailing zeros?

The problem is that 0.1 cannot be represented in the used binary structure.
And the spec proposal has no details how to do this. Perhaps, BigFloat.round should accept decimal string and rounding should be applied.
I have decided to skip it so.

Looks like I should switch to BigDecimal because BigFloat constructors is not flexible enough.

What was your reference for implementing this?
I want the same for glsl with two uint32. It seems this implementation can be faster than SoftFloat

May be, BigFloat should be separated into another small libraries where no transendent math is needed and no string conversion methods, as today my implementations arenot perfect.
For BigDecimal they can be simplified a lot as base convertion is not needed

Yea, can be a good idea, but string conversions always needed in any application.
I like the implementation but API can be easier like in wasm/big.js. Right now I am using it with wrapper because of that.

I think you can add it in https://github.com/josdejong/mathjs after that.


Can't use the vanilla attributes.

Hello, I was testing some things of the mod and I found that executing the commands as like, summon-eldritch, summon-elite or summon-ultra you can't use the attributes like {NoAI:1}. When you execute the command,
for example "/summon_ultra minecraft:cat ~ ~ ~ {NoAI:1}" It summons the cat, but an error is shown: commands.summon_ultra.failed. The cat, in this case when It's summoned, is a normal cat, with no new drops or HP multiplier. If is a vanilla minecraft boss, the bossbar is not shown.

Have you added cats to the list of allowed eldritch mobs?

Yep, I tried it. This is how I config that. Instead of a cat, I tried a ender_dragon (that was the idea that I was trying at first). I used the following command: /summon_eldritch minecraft:ender_dragon ~ ~ ~ {DragonPhase:1}. Summons the ender dragon, but without any skill of the eldritch mobs mod.
{
"values": [

  "minecraft:ender_dragon"

]

}


Add style argument which can convert SVG attributes to CSS Style attribute (the opposite of style_to_xml.)

Currently, scour allows the user two options when it comes to SVG Attributes versus CSS Style: They can either convert everything to SVG Attributes or leave all the attributes as they were originally encoded. Obviously, there is a third option, which is currently missing: convert everything to CSS Style.
While SVG Attributes are generally preferred for various CSS overriding reasons, some tools don't handle them well and prefer CSS Style. For example, Inkscape's "Save As HTML 5 Canvas" doesn't support SVG Attributes but does support CSS Style.  For this reason, tools like Illustrator allow the user to choose between "Inline" or "Presentational Attributes" (or a third option, "Internal CSS" which is out of scope for this discussion.) The eventual goal of this change would be to add an option to Inkscape so it behaves somewhat like Illustrator with three options: "Preserve", "Presentational Attributes", "Inline".
This pull request adds the option to convert styling all to CSS Style through --style=inline. The other options are --style=none, --style=attributes, --style=preserve.
The backwards compatibility logic is slightly annoying. If you specify a --style other than "none", then that style will be used. If you specify --style=none (or specify nothing, as none is the default) then --disable-style-to-xml or --style-to-xml will decide the behavior. Perhaps "none" could renamed "default?"

Codecov Report

Merging #267 (cebd259) into master (7a83e71) will decrease coverage by 0.01%.
The diff coverage is 92.30%.

@@            Coverage Diff             @@
##           master     #267      +/-   ##
==========================================
- Coverage   94.14%   94.13%   -0.02%
==========================================
  Files           5        5
  Lines        2272     2284      +12
==========================================
+ Hits         2139     2150      +11
- Misses        133      134       +1

Impacted Files
Coverage Δ

scour/scour.py
94.61% <92.30%> (-0.02%)
:arrow_down:

Continue to review full report at Codecov.

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

@nthykier Sorry for leaving this pull request open for so long. Real life threw some turbulence at me.

Hi @doom-goober
No worries. I am not a member of the scour project, so my words were only intended as suggestions and nothing more. :)

Copying over my comment from the downstream issue in Inkscape:
It's not that simple, unfortunately, because inline CSS and presentation attributes have not the same specifity (inline CSS: specificity infinity, presentation attributes: specificity 0).
In practice that means: Try adding style="fill:blue;" or fill="blue" to the element in Gitlab op's source.svg. For the former, the element becomes blue, for the second, it doesn't. As soon as there is any stylesheet affecting the element, even a path {} selector, it will take precedence over presentation attributes.
Just changing inline css to presentation attributes or vice versa is not going to cut it (that is also true for the existing code converting CSS to presentation attributes). I wouldn't want my SVG optimizer to change the way the exported image is rendered.


[6.0] Final merge of main to release/6.0

Last merge of main to release/6.0 before we use cherry-picks for the release.

@swift-ci test


[BUG] Datadog agent silently corrupts Visual Studio Code and other JavaScript applications on a server

Describe what happened:
Datadog agent silently hooks itself to JavaScript (and Python) applications on a computer. Because the hooks are invasive, and cause side effects and bugs, this will break applications. One of such applications is Visual Studio Code.
Describe what you expected:
Any decision to use Datadog agent in an application should be opt-in by the user and datadog-agent should not silently modify any JavaScript (or Python, as it seems) applications. This is because there is a high chance that datadog-agent breaks complex applications, and this causes unnecessary issues for the application maintainers.
Steps to reproduce the issue:

Install Datadog agent
Try to use Visual Studio Code - Remote SSH on the server
See Visual Studio Code ticket

Additional environment details (Operating System, Cloud provider, etc):
datadog-agent version
Agent 7.47.1 - Commit: 24dcc70 - Serialization version: v5.0.90 - Go version: go1.20.6

Description:    Ubuntu 22.04.3 LTS

One workaround to this is to delete Datadog and use alternative monitoring solutions where the user has opt-in control to allow a monitoring agent to inject (and potentially break) any application.
apt remove datadog-agent
nano /etc/ld.so.preload   # Remove Datadog system level infector
rm -rf /opt/datadog
# Remove the server from Datadog and make sure it is not part of any recurring subscription

Further noting that running sudo apt-get remove --purge datadog-agent -y does not remedy the problem.

Over the last two weeks I have had two separate Windows machines have their Visual Studio 2022 installations corrupted. Repairing the installation and uninstalling/reinstalling Visual Studio did not resolve the issue. The only thing that got me back into working order was a fresh install of Windows.
Reading through this thread made me realize that on both of these machines the datadog-agent was installed shortly before I started experiencing problems.
This sounded similar enough to the issue creator's problem so I wanted to provide another datapoint.

Further noting that running sudo apt-get remove --purge datadog-agent -y does not remedy the problem.

@gferreri Did you follow all the steps?
    apt remove datadog-agent
    nano /etc/ld.so.preload   # Remove Datadog system level infector
    rm -rf /opt/datadog
    # Remove the server from Datadog and make sure it is not part of any recurring subscription

I can confirm the issue was fixed once I completely removed the DD agent using the steps above.
@yshapiro-57 Any news on this?

I can confirm that removing the Datadog Agent on my remote host also immediately fixed the problems I was having with basic VSCode extensions (e.g. Source Control / Git).
Needless to say, it is very frustrating having to "choose" between running my Datadog agent or having a workable remote development machine. I really hope this one can be sorted out ASAP.

I am having the exact same problem, have spent hours trying to diagnose it before finding this stackoverflow post and finally it all made sense. This is breaking all of my VSCode extensions and stopping me pushing any changes to my github repo as it can't find the repo.
It was working yesterday when I implemented datadog, but then when I reconnected today this all happened.

I was able to workaround this by uninstalling just datadog-apm-library-js, leaving the rest of the agent installed (essentially the opposite of https://docs.datadoghq.com/tracing/trace_collection/library_injection_local/?tab=host#install-only-library-injection)

This happened to us as well. Very disappointing.

Over the last two weeks I have had two separate Windows machines have their Visual Studio 2022 installations corrupted. Repairing the installation and uninstalling/reinstalling Visual Studio did not resolve the issue. The only thing that got me back into working order was a fresh install of Windows.
Reading through this thread made me realize that on both of these machines the datadog-agent was installed shortly before I started experiencing problems.
This sounded similar enough to the issue creator's problem so I wanted to provide another datapoint.

Same here.
My VS 2022 stopped working after installing DD Agent. The only way back was fresh new win install.
At first I though it was only after installing DD agent. Then after a fresh new win install, I first installled DD agent, then right after, VS 2022... and bang! same happened again.
Def smtg up with DD agent.

I couldn't delete Datadog, and since the Datadog Auto inject link above is not wokring, I opted to rename the vscode-server in the home directory to vscode-server-2. After re-installing the extensions everything worked!


Improve Performance Testing Documentation

Go through the performance testing documentation step by step. Make note of improvements and share with Alex before implementing changes.

To be reopened if additional testing is needed.


Cookie doesn't set when deploy in server [Heroku] with Apollo GraphQL

Hello, everyone I have some problem that cookies that i send in token handler is not set when deployed in heroku but it works fine when development which in localhost, I was read many documentation and cant get it.
I'am struggling or am i miss something in configuration? For domain host i have frontend that host in vercel and backend in heroku and I have to auth with email and password and using OAuth Google using passportjs
For example mutation signin :
signin: async (
    _: any,
    { credentials }: SignInArgs,
    { db, res }: Context
  ): Promise<UserPayloadType> => {
    const { email, password } = credentials;

    // compare input form email with data in database avaliable or not
    const user = await db.user.findUnique({
      where: {
        email,
      },
    });

    if (!user) {
      return {
        userErrors: [
          {
            message: "Can't find user with this email",
          },
        ],
      };
    }

    if (user.isVerified === false) {
      return {
        userErrors: [
          {
            message: "Please verified your account first",
          },
        ],
      };
    }

    // compare and force override user.password as string
    const isMatch = await bcrypt.compare(password, user.password as string);

    if (!isMatch) {
      return {
        userErrors: [
          {
            message: "Your password does not match",
          },
        ],
      };
    }

    // create token to cookie
    const authToken = createToken(user.id, user.username);

    // and send it
    sendToken(res, authToken);

    return {
      userErrors: [],
      user: user,
    };
  },

This is my backend server
import { typeDefs } from "./graphql/schema";
import { AllResolvers } from "./services/resolvers/resolvers";
import { createServer } from "http";
import { execute, subscribe } from "graphql";
import { SubscriptionServer } from "subscriptions-transport-ws";
import { makeExecutableSchema } from "@graphql-tools/schema";
import { ApolloServerPluginLandingPageGraphQLPlayground } from "apollo-server-core";
import { ApolloServer } from "apollo-server-express";
import { context } from "./lib/context";
import { pubsub } from "./lib/context";
import { PassportGoogle } from "./lib/passport/config";
import { GoogleAuthenticate } from "./lib/passport/socialMediaAuth";
import express from "express";
import passport from "passport";
import cookieParser from "cookie-parser";
import cors from "cors";
import * as AllTypes from "./services/index";

PassportGoogle();

(async function () {
  const app = express();
  const httpServer = createServer(app);

  const schema = makeExecutableSchema({
    typeDefs,
    resolvers: {
      ...AllResolvers,
      ...AllTypes,
    },
  });

  const corsOptions = {
    origin: true,
    credentials: true,
  };

  app.use(function (req, res, next) {
    res.header("Access-Control-Allow-Origin", "*");
    res.header("Access-Control-Allow-Methods", "GET, PUT, POST");
    res.header(
      "Access-Control-Allow-Headers",
      "Origin, X-Requested-With, Content-Type, Accept"
    );
    next();
  });

  app.set("trust proxy", 1);
  app.use(cors(corsOptions));
  app.use(cookieParser());

  // Google login auth
  app.get(
    "/auth/google",
    passport.authenticate("google", { scope: ["profile", "email"] })
  );

  // Google callback
  app.get(
    process.env.GOOGLE_CALLBACK_ROUTE!,
    passport.authenticate("google", {
      session: false,
      failureRedirect: `${process.env.FRONTEND_URI}/auth/signin`,
    }),
    GoogleAuthenticate
  );

  const subscriptionServer = SubscriptionServer.create(
    {
      schema,
      execute,
      subscribe,
      async onConnect() {
        return { pubsub };
      },
    },
    { server: httpServer, path: "/graphql" }
  );

  const server = new ApolloServer({
    schema,
    plugins: [
      {
        async serverWillStart() {
          return {
            async drainServer() {
              subscriptionServer.close();
            },
          };
        },
      },
      ApolloServerPluginLandingPageGraphQLPlayground(),
    ],
    context,
    introspection: true,
  });
  await server.start();
  server.applyMiddleware({ app, cors: corsOptions });

  const PORT = process.env.PORT || 4000;
  httpServer.listen(PORT, () =>
    console.log(
      `🚀 Server and WS is now running on http://localhost:${PORT}/graphql or ws://localhost:${PORT}/graphql ${process.env.FRONTEND_URI}`
    )
  );
})();

My token handler
// Token Handler
import JWT from "jsonwebtoken";
import { Response } from "express";

const JWT_SECRET = process.env.JWT_SECRET || "secret";

export const createToken = (userId: string, username: string) =>
  JWT.sign({ userId, username }, JWT_SECRET, { expiresIn: "1d" });

export const sendToken = (res: Response, token: string) =>
  res.cookie(process.env.COOKIE_NAME!, token, {
    secure: process.env.NODE_ENV === "development" ? false : true,
    httpOnly: true,
  });

export const verifyToken = (token: string) => {
  try {
    return JWT.verify(token, JWT_SECRET) as {
      userId: string;
      username: string;
      iat: number;
      exp: number;
    } | null;
  } catch (error) {
    return null;
  }
};

my contex
import { AppContext, Context } from "@interface/context";
import { prisma } from "../lib/prisma";
import { PubSub } from "graphql-subscriptions";
import { verifyToken, createToken, sendToken } from "../utility/tokenHandlers";

export const db = prisma;
export const pubsub = new PubSub();

export const context = async ({ res, req }: AppContext): Promise<Context> => {
  // get token from cookie
  const token = req.cookies[`${process.env.COOKIE_NAME!}`];

  if (token) {
    // Verify token
    const decoded = verifyToken(token);

    // if was decoded
    if (decoded) {
      req.userId = decoded.userId;
      req.username = decoded.username;

      // Re generate token if below conditions are met
      if (Date.now() / 1000 - decoded.iat > 6 * 60 * 60) {
        // find it in prisma db
        const findUser = await db.user.findUnique({
          where: {
            id: req.userId,
          },
        });

        if (findUser) {
          const newToken = createToken(findUser.id, findUser.username);

          // send it
          sendToken(res, newToken);
        }
      }
    }
  }

  return {
    db,
    res,
    req,
    pubsub,
  };
};

Please help me... Any suggestion and answer i will appreciate <3
Thanks before.

Just to confirm, is your Heroku server using https and what's the NODE_ENV deployed with? That seems like the likely culprit here since it's the only conditional behavior you have.


Add params argument to _init calls

[x] documentation is added or updated
[x] tests are added or updated

The discussion in https://github.com/openssl/openssl/pull/14383#discussion_r585276188 has me wonder, for whose benefit do we make this change?  For EVP_MAC and EVP_KDF, it's quite clear, we had an intention to give the user (the callers of the EVP_MAC and EVP_KDF functions) some comfort, so they wouldn't need to call a separate set_params function.  That's pretty clear cut.
This change doesn't do anything similar, as it's kept quite internal in libcrypto...  I'm not sure that I can see how this benefits the author of a KEYMGMT implementation, and considering that this is only passing NULL from the libcrypto code, it seems strangely futile.

The OTC wanted the params argument on all _init() calls: https://github.com/openssl/openssl/issues/11007#issuecomment-771531686 plus the comments after.
I'm having second thoughts -- the same ones you are.  The rest is kept quite internal and it would mean a slurry of new APIs to access.  Some things can't even be accessed directly currently and it seems silly to add calls just so they can be.
Hence the suggestion to add the argument to the core_dispatch APIs but to not expose it at the libcrypto level.  This I could support as a future proofing exercise.

The OTC wanted the params argument on all _init() calls: #11007 (comment) plus the comments after.

Yes, and that's primarily about our public API, i.e. user callable functions like EVP_MAC_init(), ...  I didn't necessarily hear that as meaning the libcrypto<->provider interface (although I do see the practicality for OSSL_FUNC_mac_init(), but that's more because of the added key + keylen, so it didn't hurt to throw in the params as well)

It would be a very strange choice to elect that init's in the provider interface don't have OSSL_PARAMs when we have collectively decided that init's have OSSL_PARAMs - I did not see that OTC decision as limited to only public APIs or that anyone would think that we should have a different approach in terms of capabilities in the public and provider APIs - frankly that didn't occur to me that someone would want to split hairs at that level on an OTC decision.

frankly that didn't occur to me that someone would want to split hairs at that level on an OTC decision.

Hmm, I'm pretty sure I have mentioned, more than once, that the public API and the libcrypto<->provider interface aren't necessarily the same thing.  For one thing, different crowds are affected; whatever we decide for the libcrypto<->provider interface primarily concern provider authors, while the public API primarily concern application authors.

That being said, I have nothing per se against adding an OSSL_PARAM argument to the provider side init functions, not at all. However, if the only user of those functions (our libcrypto code) does nothing bu pass NULL, it seems like an exercise in futility.

My rationale is that we can't change the provider API so including the params now prevents problems in the future.
That we can't change the libcrypto API means we need to introduce a new function if we add the argument -- this is something we can do later in a dot release.

That we can't change the libcrypto API means we need to introduce a new function if we add the argument -- this is something we can do later in a dot release.

Okie, that translates into at least an idea of a future intention.  That's what I didn't hear before.  That's good enough for me.

I've exposed the new functionality to the public API, that was easy.  The provider API is horrible now and I've broken a lot of things.  Moreover, I'm even less sure of the benefits -- we don't seem to push parameters into PKEY_CTXs much, rather we just do an operation with one.  Almost all digests get zero benefit from the changes.  For ciphers, it seems like major overkill for little upside.
Apart from MAC and KDF which are parameter heavy, there seems to be little need for this.
It seemed like such a good idea when we discussed it with the OTC....

Time for some reviewing :)

Now that we have seen the effect, I think we need to review the OTC decision.

Rebased to fix conflict in libcrypto.num.  No other changes, no need to review again.

24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set.  Please review the updates and set the label manually.

Merged to master.  Thanks for the reviews.


Module not found: Error: Can't resolve 'prop-types' in '/node_modules/.registry.npmjs.org/react-mapbox-gl/1.12.0/node_modules/react-mapbox-gl/lib'

I am using webpack. Why is prop-types listed as a devDep if its used in the prod code?

Should be fixed with version 2.0.3, prop-types is a peerDependencies


Is RocksDB still supported ?

Hey guys,
Sorry for perhaps naive question. Is RocksDB still supported ? I couldn't find answer neither in doc nor in github/dockerhub pages.
The things are unclear to me:

Is RocksDB still sopprted as backend ?
Is Redis one of backends or is it protocol frontend for rocksdb backend ?

Dynomite is a layer on top of non distributed storage engines. Today it understands Redis well and Memcache (has some bugs to be sorted there). So essentially it can talk to storage engine that understands redis apis. It could be a redis server process itself, or some other process that understands redis protocol and writes to say disk using rocksdb, boltdb etc. There are other open source software for example https://github.com/yinqiwen/ardb which understands redis and writes to disk.
I hope this answers.


fix(cloud_firestore): Convert DateTime to UTC before getting the year in tests.

The unix epoch is actually in year 1969 in the US! Converting the time
to UTC makes sure that the test will pass even when the local time zone
is negative.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
[x] All existing and new tests are passing.
[x] I updated/added relevant documentation (doc comments with ///).
[x] The analyzer (flutter analyze) does not report any problems on my PR.
[x] I read and followed the Flutter Style Guide.
[x] I signed the CLA.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
[x] No, this is not a breaking change.

Good spot, thanks :)


fixed version parsing for Windows and EnterpriseDB

Fixes #142

@marcinbudny run "make fmt" instead.

@wrouesnel  That helped, thanks

Looks great! Appreciate the tests - merging.


Update toolchain to nightly-2023-09-05

Description of changes:
Manually updates toolchain to nightly-2023-09-05. The main change is documentation-related, otherwise we get errors from cargo doc.
Testing:

How is this change tested? Existing regression.

Is this a refactor change? No.

Checklist

[x] Each commit message has a non-empty body, explaining why the change was made
[ ] Methods or procedures are documented
[x] Regression or unit tests are included, or existing tests cover the modified code
[ ] My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

Why is the error from cargo doc only showing up now?

Apologies, the errors don't come from cargo doc. Please check the updated description, but it's basically due to this change in rustc.


Recommendations Wiki Page

We need a Wiki page that details recommended methods of solving various problems
e.g. Differences between VR SDKs? Unity XR, Steam VR, Oculus, WebXR, OpenXR?

@BrainonSilicon to put together some text which can be linked from: https://github.com/immersivecognition/unity-experiment-framework/wiki/Get-started


[Discussion] Support for time domain?

Do we want to support data where time is an important parameter? E.g., variable stars, transits, etc. Data from Kepler, TESS, LSST?  One one hand, this adds some complexity, on the other hand, it expands the user base.
I am going to a NYC time-domain working group meeting this Thursday and will try to get some info and potentially recruit a collaborator to provide us with some test data/use cases.

Right now, I think we could ingest lightcurves in the same way that we ingest spectra.

Superceded by #419


Udemy Says : 403 Forbidden You should use cookie base method to authenticate or try again in few minutes

Describe the bug
Hello udemy-dl team. I downloaded the update that was released 10 days ago because when I download it, it sends me the message: Udemy Says: 403 Forbidden You should use cookie base method to authenticate or try again in a few minutes.
To Reproduce
I have followed the guide written by the admin in the league for Google Chrome https://github.com/r0oth3x49/udemy-dl/issues/389 and I have created a file named cookies.txt
I have followed the 2 options available:
$ python udemy-dl.py https://www.udemy.com/course/universidad-python-desde-cero-hasta-experto-django-flask-rest-web/ --info -k cookies.txt
$ python udemy-dl.py -u<EMAIL_ADDRESS>-p password https://www.udemy.com/course/universidad-python-desde-cero-hasta-experto-django-flask-rest-web/ - k cookies.txt
I don't get a successful result :(
Screenshots

Python Environment (please complete the following information):

OS Platform: [e.g. Windows 10, Ubuntu 16.04, macOS Sierra]
Python Version [e.g. 3.x.x]

@almsx did that worked after wait of few minutes? i can't reproduce. udemy servers don't like your ISP i guess

i am getting the same error

yup same issue

Describe the bug
Hello udemy-dl team. I downloaded the update that was released 10 days ago because when I download it, it sends me the message: Udemy Says: 403 Forbidden You should use cookie base method to authenticate or try again in a few minutes.
To Reproduce
I have followed the guide written by the admin in the league for Google Chrome #389 and I have created a file named cookies.txt
I have followed the 2 options available:
$ python udemy-dl.py https://www.udemy.com/course/universidad-python-desde-cero-hasta-experto-django-flask-rest-web/ --info -k cookies.txt
$ python udemy-dl.py -u<EMAIL_ADDRESS>-p password https://www.udemy.com/course/universidad-python-desde-cero-hasta-experto-django-flask-rest-web/ - k cookies.txt
I don't get a successful result :(
Screenshots

Python Environment (please complete the following information):
* OS Platform: [e.g. Windows 10, Ubuntu 16.04, macOS Sierra]

* Python Version [e.g. 3.x.x]

you should be either using cookie based method to login or user/pass based method. If user/pass based method don't work then cookie based method should work.
User/pass based

python udemy-dl.py -u UDEMY_EMAIL -p PASS COURSE_URL

Cookie based

python udemy-dl.py -k FILE_CONTAINING_COOKIES COURSE_URL.

Cookies should contain the access_key in it so before saving cookies to file make sure that cookies has this key otherwise udemy-dl will not be able to authenticate and download course.

how to generate a cookie.txt file?

Facing this exact same issue   . i tried both cookies and user/password method and facing same issues in both . Also i made sure that the cookie.txt file is in proper format as mentioned . Please reopen this issue

Whoever is having issue please drop me a separate email along error
screenshot
On Sat, 18 Jul 2020 at 9:49 AM, xd003<EMAIL_ADDRESS>wrote:

Facing this exact same issue . i tried both cookies and user/password
method and facing same issues in both . Also i made sure that the
cookie.txt file is in proper format as mentioned . Please reopen this issue
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/r0oth3x49/udemy-dl/issues/513#issuecomment-660422164,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AF33XPY22VHSLCLEWRTSJADR4EPEXANCNFSM4NMTLUGQ
.

Whoever is having issue please drop me a separate email along error screenshot
…
On Sat, 18 Jul 2020 at 9:49 AM, xd003 @.***> wrote: Facing this exact same issue . i tried both cookies and user/password method and facing same issues in both . Also i made sure that the cookie.txt file is in proper format as mentioned . Please reopen this issue — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#513 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF33XPY22VHSLCLEWRTSJADR4EPEXANCNFSM4NMTLUGQ .

Is there any way where u can share screen to me.
On Sat, 18 Jul 2020 at 10:11 AM, xd003<EMAIL_ADDRESS>wrote:

Whoever is having issue please drop me a separate email along error
screenshot
… <#m_-4424762323697880030_>
On Sat, 18 Jul 2020 at 9:49 AM, xd003 @.***> wrote: Facing this exact
same issue . i tried both cookies and user/password method and facing same
issues in both . Also i made sure that the cookie.txt file is in proper
format as mentioned . Please reopen this issue — You are receiving this
because you are subscribed to this thread. Reply to this email directly,
view it on GitHub <#513 (comment)
https://github.com/r0oth3x49/udemy-dl/issues/513#issuecomment-660422164>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AF33XPY22VHSLCLEWRTSJADR4EPEXANCNFSM4NMTLUGQ
.
[image: Screenshot_2020-07-18_10-08-54]
https://user-images.githubusercontent.com/26503185/87844828-f3650400-c8de-11ea-8d2f-5bb4f61079fa.png
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/r0oth3x49/udemy-dl/issues/513#issuecomment-660424186,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AF33XP7V3IXK3RT7OVFNAJDR4ERXBANCNFSM4NMTLUGQ
.

Just out of curiousity , i also tried this in google colab and getting same error there as well , i dont think its simply my ISP issue

No
On Sat, 18 Jul 2020 at 10:14 AM, xd003<EMAIL_ADDRESS>wrote:

Just out of curiousity , i also tried this in google colab and getting
same error there as well , i dont think its simply my ISP issue
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/r0oth3x49/udemy-dl/issues/513#issuecomment-660424469,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AF33XP6NU642A3JTU2AH3KDR4ESDJANCNFSM4NMTLUGQ
.

@r0oth3x49 bro any clue how do i fix this ?    i am already using the cookies method ( -k ) to authenticate my udemy account and the content of cookie.txt is exactly as you have told in guide , i dont understand why its still happening ...

Can u share ur screen to me
On Sat, 18 Jul 2020 at 8:27 PM, xd003<EMAIL_ADDRESS>wrote:

@r0oth3x49 https://github.com/r0oth3x49 bro any clue how do i fix this
? i am already using the cookies method ( -k ) to authenticate my udemy
account and the content of cookie.txt is exactly as you have told in guide
, i dont understand why its still happening ...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/r0oth3x49/udemy-dl/issues/513#issuecomment-660495256,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AF33XP5TEL57SCONCXC46LTR4GZ35ANCNFSM4NMTLUGQ
.

@kumarnipun thanks for offering to help ,appreciate it , finally got fixed
what i did was logged out of my udemy account , logged back in and pasted the new cookie in the cookie.txt

👍
On Sat, 18 Jul 2020 at 9:12 PM, xd003<EMAIL_ADDRESS>wrote:

@kumarnipun https://github.com/kumarnipun thanks for offering to help
,appreciate it , finally got fixed
what i did was logged out of my udemy account , logged back in and pasted
the new cookie in the cookie.txt
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/r0oth3x49/udemy-dl/issues/513#issuecomment-660500550,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AF33XP6PJL5WAQ5MQZIA7HTR4G7HHANCNFSM4NMTLUGQ
.

Hello,
I'm also facing the same issue. Could you please suggest me which cookie I need to past inside cookie.txt.

@Aaditya46 https://github.com/r0oth3x49/udemy-dl/issues/389#issuecomment-492569372

Hello Udemy-dl team thanks for providing such kind of utility but till today morning it was working fine and i downloaded many courses with it ,now i am getting an error with it when i am trying to download course i have attached the screenshot kindly see it and guide me if i am doing any wrong step and please help me ASAP.

The same issue here.
[*] : Trying to login using cookies ...
[+] : Logged in successfully.
[-] : Udemy Says : 403 Forbidden You should use cookie base method to authenticate or try again in few minutes ...


Test updated githubIssues settings

This issue is for testing updated githubIssues settings added in the .code-workspace file.

Have to include settings which are mentionned in https://github.com/gizmecano/sandbox/pull/3#issuecomment-892476381.


[Snyk] Security upgrade golang from 1.12 to 1.22.7

Snyk has created this PR to fix 4 vulnerabilities in the dockerfile dependencies of this project.
Keeping your Docker base image up-to-date means you’ll benefit from security fixes in the latest version of your chosen image.
Snyk changed the following file(s):

awstesting/sandbox/Dockerfile.test.go1.12

We recommend upgrading to golang:1.22.7, as this image has only 89 known vulnerabilities. To do this, merge this pull request, then verify your application still works as expected.
Vulnerabilities that will be fixed with an upgrade:

Issue
Score

CVE-2023-44487 SNYK-DEBIAN10-NGHTTP2-5953390
  561

Link Following SNYK-DEBIAN10-GIT-1083853
  436

Link Following SNYK-DEBIAN10-GIT-1083853
  436

Improper Validation of Integrity Check Value SNYK-DEBIAN10-OPENSSH-6130526
  395

CVE-2023-26604 SNYK-DEBIAN10-SYSTEMD-3339153
  375

[!IMPORTANT]

Check the changes in this PR to ensure they won't cause issues with your project.
Max score is 1000. Note that the real score may have changed since the PR was raised.
This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.

🎉 Snyk hasn't found any issues so far.
✅ code/snyk check is completed. No issues were found. (View Details)


Build(deps-dev): Bump @types/react-dom from 18.2.19 to 18.2.25 (#5692)

Pull request opened by the merge tool on behalf of #5692

Merged in 5d4830c7345e8eef956c3096f4530860d2606fe7


What are the default credentials for paperless-ngx?

I installed the paperless-ngx chart and can't login. admin:admin does not work and I don't find any secret with the credentials. What are the default ones?

I found out you can add the environment variables PAPERLESS_ADMIN_USER and PAPERLESS_ADMIN_PASSWORD to set the credentials. This should be created as a secret by the Helm chart. I will crate a feature request.

Hi @rabejens,
My chart does not alter the default credentials at all - it currently only allows to configure the PAPERLESS_SECRET_KEY via the secret: {} values object.
You need to create the initial admin user yourself, see here: https://docs.paperless-ngx.com/setup/#docker_hub @ step 7.
You can also change the default superuser process using environment variables, see here: https://docs.paperless-ngx.com/configuration/#hosting-and-security (PAPERLESS_ADMIN_USER & PAPERLESS_ADMIN_PASSWORD)
Hope this helps you! 😊

For anyone coming across this issue, you have to open a shell in the container and run python3 manage.py createsuperuser.

You need to create the initial admin user yourself, see here: https://docs.paperless-ngx.com/setup/#docker_hub @ step 7.
You can also change the default superuser process using environment variables, see here: https://docs.paperless-ngx.com/configuration/#hosting-and-security (PAPERLESS_ADMIN_USER & PAPERLESS_ADMIN_PASSWORD)

Yep, see my previous comment. There are actually two options for this. 😉


is it possible to build nested Join query?

Hi, Great work by Knexjs team. I am trying out knexjs over ORM with one small example having many to many relationship. The Example is of Authors and Books where auhtors table and book table have many to many relationship through author_books table. I want to get particular book with all the authors. Below is raw query which gives the expected result. But I am not getting how to build this query using Knexjs? Any help would be appreciated.
Note: I am using Knexjs with javascript ES6.
Query:-
SELECT  `book`.`id` ,  `book`.`title` ,  `authors`.`id` AS  `authors.id` ,  `authors`.`name`
AS  `authors.authorname` ,  `authors.author_books`.`book_id`
AS  `authors.author_books.bookId` , `authors.author_books`.`author_id`
AS  `authors.author_books.author_id`
FROM  `books` AS  `book`
LEFT OUTER JOIN (
 `author_books` AS  `authors.author_books`
INNER JOIN  `authors` AS  `authors` ON  `authors`.`id` =  `authors.author_books`.`author_id`
) ON  `book`.`id` =  `authors.author_books`.`book_id`
WHERE  `book`.`id` =1

this is the query I am trying to build using Knexjs.
this.Knex('books as book')
.leftOuterJoin('author_books as authors.author_books', function(){
  // How could I nest INNER JOIN in LEFT OUTER JOIN

  this.on('book.id', 'authors.author_books.book_id')
}).select('book.id', 'book.title', 'authors.id as authors.id'
  , 'authors.name as authors.name', 'authors.author_books.book_id as authors.author_books.book_id'
  , 'authors.author_books.author_id as authors.auhtor_books.author_id')
.where('book.id', id)

Please let me know if I am Wrong somewhere?

The question is how to nest join queries using knexjs? Inner Join nested with Left or Right JOIN using knex, so that knex can build SQL query as shown above in Query: section?

@saurabhghewari did you ever find a solution for this question? I'm trying to do something similar.

I have to say I'm not sure if knex supports nested joins at all... I didn't see any tests or documentation for that case, so I'm pretty sure they are not supported. Please add feature request for this.

I see this issue was closed but I have found the solution. Between this tutorial and ES6 arrow functions, we are able to next 2 levels of joins. To complete the question above, you would want:
this.Knex('books as book')
.leftOuterJoin(function () {
  this.select('*')
  .from('author_books')
  .as('authors.author_books') // this level of nesting requires explicit .as statement
.join('tableName', 'colA', 'colB') // this is the inner join you seek.
},  {'book.id': 'authors.author_books.book_id'}
.select('book.id', 'book.title', 'authors.id as authors.id'
  , 'authors.name as authors.name', 'authors.author_books.book_id as authors.author_books.book_id'
  , 'authors.author_books.author_id as authors.author_books.author_id')
.where('book.id', id)


How to clear the inactive states when a user has logged out?

okay. i got to know that when a parent state if a sticky state got exited.
(and all activated substates) are retained until one of two things happen:
The parent of the sticky state is exited
The parent of the sticky state is directly activated


Update topic model and integrate with Design System NWP-256

What is the context of this PR?
To Update the topic models add the design system and add the child pages indexes
How to review
To be added

Marked this as a draft as we merge the alternative (#50)
Leaving open so we compare notes


Convert PackageImport into a value type

Pull Request Test Coverage Report for Build 185237492

-8 of 15 (46.67%)  changed or added relevant lines in 2 files are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage increased (+1.5%) to 33.026%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

hack/generator/pkg/astmodel/file_definition.go
0
2
0.0%

hack/generator/pkg/astmodel/package_import.go
7
13
53.85%

Files with Coverage Reduction
New Missed Lines
%

hack/generator/pkg/astmodel/package_import.go
2
46.88%

Totals

Change from base Build 185074149:
1.5%

Covered Lines:
930

Relevant Lines:
2816

💛  - Coveralls


[HOLD for E/App #49802] "Release options" modal ( CTRL+D) does not appear when image is open

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 9.0.43-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers<EMAIL_ADDRESS>Issue reported by: Applause - Internal Team
Action Performed:

Navigate to any chat
Open a image from chat history
Press Ctrl+D to open "Release options" modal

Expected Result:
"Release options" modal should appear
Actual Result:
"Release options" modal ( CTRL+D) does not appear when image is open
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/user-attachments/assets/68fc9a78-59f5-4c6d-b955-684c52fc289e
View all open jobs on GitHub

@alexpensify  FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

Same root cause as https://github.com/Expensify/App/issues/49802

@bernhardoj do you think we should close this one or put it on hold for https://github.com/Expensify/App/issues/49802

Let's hold it for https://github.com/Expensify/App/issues/49802

Thanks for the feedback!

Weekly Update: On hold for https://github.com/Expensify/App/issues/49802

Weekly Update: The PR for https://github.com/Expensify/App/issues/49802 is under review

Weekly Update: It looks like the PR is on hold

Weekly Update: The PR for https://github.com/Expensify/App/issues/49802 should go into production by next week

@lanitochka17 - the issue we have been on hold for has gone into production. Can we get a retest here? Thanks!

This issue is not repro anymore
https://github.com/user-attachments/assets/1394b93e-e843-4380-ba8d-dc3d5388a92a

Awesome - closing!


Use the firefunction-v2 model of ChatFireworks for multi-agent, and encountered an error: fireworks.client.error.InternalServerError: {'error': {'object': 'error', 'type': 'internal_server_error', 'message': 'server had an error while processing your request, please retry again after a brief wait'}}

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangGraph/LangChain documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangGraph/LangChain rather than my code.
[X] I am sure this is better as an issue rather than a GitHub discussion, since this is a LangGraph bug and not a design question.

Example Code
import json
from langchain_core.messages import (
    AIMessage,
    BaseMessage,
    ChatMessage,
    FunctionMessage,
    HumanMessage,
)
from langchain.tools.render import format_tool_to_openai_function
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langgraph.graph import END, StateGraph
from langgraph.prebuilt.tool_executor import ToolExecutor, ToolInvocation
from langchain_core.utils.function_calling import convert_to_openai_function
from langchain_core.tools import tool
from langchain_community.tools.tavily_search import TavilySearchResults
from langchain_experimental.utilities import PythonREPL
from typing import Annotated
from typing import Dict
import subprocess

import os
from langchain_fireworks import ChatFireworks
# 设置和初始化
llm = ChatFireworks(
    api_key="UAbZbw6jUOa0PCKm6IXebmLlrpDUfqoMkBLr3hKMnV7aTACm",
    model="accounts/fireworks/models/firefunction-v2",
)

# nmap工具
@tool

def get_mojuan_price(name: str):
    """
    To get the price of the Morimaki brand burger.
    """
    return 66

# 示例调用

# 将工具导入一个列表中
tools = [get_mojuan_price]

# 创建状态
import operator
from typing import Annotated, List, Sequence, Tuple, TypedDict, Union

from langchain.agents import create_openai_functions_agent
from langchain.tools.render import format_tool_to_openai_function
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_openai import ChatOpenAI
from typing_extensions import TypedDict

# 为每个代理和工具创建不同的节点
class AgentState(TypedDict):
    messages: Annotated[Sequence[BaseMessage], operator.add]
    sender: str

tool_executor = ToolExecutor(tools)

def tool_node(state):
    """This runs tools in the graph. It takes in an agent action and calls that tool and returns the result."""
    messages = state["messages"]
    last_message = messages[-1]
    tool_call = last_message.additional_kwargs["tool_calls"][0]
    tool_name = tool_call["function"]["name"]
    tool_input = json.loads(tool_call["function"]["arguments"])
    action = ToolInvocation(
        tool=tool_name,
        tool_input=tool_input,
    )
    response = tool_executor.invoke(action)
    function_message = FunctionMessage(
        content=f"{tool_name} response: {str(response)}", name=action.tool
    )
    return {"messages": [function_message]}

def router(state):
    messages = state["messages"]
    last_message = messages[-1]
    if "tool_calls" in last_message.additional_kwargs:
        if "function" in last_message.additional_kwargs["tool_calls"][0]:
            return "call_tool"
    if "FINAL ANSWER" in last_message.content:
        return "end"
    return "continue"

def create_agent(llm, tools, system_message: str):
    """Create an agent."""
    functions = [convert_to_openai_function(t) for t in tools]
    prompt = ChatPromptTemplate.from_messages(
        [
            (
                "system",
                "You are a helpful AI assistant, collaborating with other assistants."
            ),
            MessagesPlaceholder(variable_name="messages"),
        ]
    )
    prompt = prompt.partial(system_message=system_message)
    prompt = prompt.partial(tool_names=", ".join([tool.name for tool in tools]))
    return prompt | llm.bind_functions(functions)

def agent_node(state, agent, name):
    #state["messages"] = convert_tool_calls_to_function_calls(state["messages"])
    #print(f"这是agent_node:{state["messages"]}")

    result = agent.invoke(state)
    if isinstance(result, FunctionMessage):
        pass
    else:
        result = HumanMessage(**result.dict(exclude={"type", "name"}), name=name)
    return {
        "messages": [result],
        "sender": name,
    }

research_agent = create_agent(
    llm,
    [],
    system_message="You should provide the corresponding precise attack command to use for the attack",
)

nmap_agent = create_agent(
    llm,
    [get_mojuan_price],
    system_message="Users can see any results you scan.",
)

import functools

research_node = functools.partial(agent_node, agent=research_agent, name="Researcher")
chart_node = functools.partial(agent_node, agent=nmap_agent, name="Scan_Generator")

workflow = StateGraph(AgentState)

workflow.add_node("Researcher", research_node)
workflow.add_node("Scan_Generator", chart_node)
workflow.add_node("call_tool", tool_node)

workflow.add_conditional_edges(
    "Researcher",
    router,
    {"continue": "Scan_Generator", "call_tool": "call_tool", "end": END},
)
workflow.add_conditional_edges(
    "Scan_Generator",
    router,
    {"continue": "Researcher", "call_tool": "call_tool", "end": END},
)
workflow.add_conditional_edges(
    "call_tool",
    lambda x: x["sender"],
    {
        "Researcher": "Researcher",
        "Scan_Generator": "Scan_Generator",
    },
)

workflow.set_entry_point("Researcher")
graph = workflow.compile()

for s in graph.stream(
    {
        "messages": [
            HumanMessage(
                content="How much is the Morimaki Beef Burger? "
            )
        ],
    },
    {"recursion_limit": 50},
):
    print(s)
    print("----")

Error Message and Stack Trace (if applicable)
{'Researcher': {'messages': [HumanMessage(content='I need to know the current menu prices to answer this question. Can you please provide the current menu prices?', response_metadata={'token_usage': {'prompt_tokens': 280, 'total_tokens': 303, 'completion_tokens': 23}, 'model_name': 'accounts/fireworks/models/firefunction-v2', 'system_fingerprint': '', 'finish_reason': 'stop', 'logprobs': None}, name='Researcher', id='run-b4df2be4-131e-43eb-bf6a-ee53981f8501-0', tool_calls=[], usage_metadata={'input_tokens': 280, 'output_tokens': 23, 'total_tokens': 303}, invalid_tool_calls=[])], 'sender': 'Researcher'}}
----
{'Scan_Generator': {'messages': [HumanMessage(content='', additional_kwargs={'tool_calls': [{'index': 0, 'id': 'call_w3VH2fJG1Q9LoZYLcr92VicZ', 'type': 'function', 'function': {'name': 'get_mojuan_price', 'arguments': '{"name": "Morimaki Beef Burger"}'}}]}, response_metadata={'token_usage': {'prompt_tokens': 385, 'total_tokens': 411, 'completion_tokens': 26}, 'model_name': 'accounts/fireworks/models/firefunction-v2', 'system_fingerprint': '', 'finish_reason': 'tool_calls', 'logprobs': None}, name='Scan_Generator', id='run-72e5902a-49ec-422d-86e5-855e7a14678a-0', tool_calls=[{'name': 'get_mojuan_price', 'args': {'name': 'Morimaki Beef Burger'}, 'id': 'call_w3VH2fJG1Q9LoZYLcr92VicZ'}], usage_metadata={'input_tokens': 385, 'output_tokens': 26, 'total_tokens': 411}, invalid_tool_calls=[])], 'sender': 'Scan_Generator'}}
----
{'call_tool': {'messages': [FunctionMessage(content='get_mojuan_price response: 66', name='get_mojuan_price')]}}
----
Traceback (most recent call last):
  File "E:\python-test\VulnMapAI-main\test6.py", line 166, in <module>
    for s in graph.stream(
  File "D:\python310\lib\site-packages\langgraph\pregel\__init__.py", line 1073, in stream
    _panic_or_proceed(done, inflight, step)
  File "D:\python310\lib\site-packages\langgraph\pregel\__init__.py", line 1643, in _panic_or_proceed
    raise exc
  File "D:\python310\lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "D:\python310\lib\site-packages\langgraph\pregel\retry.py", line 72, in run_with_retry
    task.proc.invoke(task.input, task.config)
  File "D:\python310\lib\site-packages\langchain_core\runnables\base.py", line 2505, in invoke
    input = step.invoke(input, config, **kwargs)
  File "D:\python310\lib\site-packages\langgraph\utils.py", line 95, in invoke
    ret = context.run(self.func, input, **kwargs)
  File "E:\python-test\VulnMapAI-main\test6.py", line 111, in agent_node
    result = agent.invoke(state)
  File "D:\python310\lib\site-packages\langchain_core\runnables\base.py", line 2507, in invoke
    input = step.invoke(input, config)
  File "D:\python310\lib\site-packages\langchain_core\runnables\base.py", line 4588, in invoke
    return self.bound.invoke(
  File "D:\python310\lib\site-packages\langchain_core\language_models\chat_models.py", line 248, in invoke
    self.generate_prompt(
  File "D:\python310\lib\site-packages\langchain_core\language_models\chat_models.py", line 677, in generate_prompt
    return self.generate(prompt_messages, stop=stop, callbacks=callbacks, **kwargs)
  File "D:\python310\lib\site-packages\langchain_core\language_models\chat_models.py", line 534, in generate
    raise e
  File "D:\python310\lib\site-packages\langchain_core\language_models\chat_models.py", line 524, in generate
    self._generate_with_cache(
  File "D:\python310\lib\site-packages\langchain_core\language_models\chat_models.py", line 749, in _generate_with_cache
    result = self._generate(
  File "D:\python310\lib\site-packages\langchain_fireworks\chat_models.py", line 477, in _generate
    response = self.client.create(messages=message_dicts, **params)
  File "D:\python310\lib\site-packages\fireworks\client\chat_completion.py", line 40, in create
    return super().create(
  File "D:\python310\lib\site-packages\fireworks\client\base_completion.py", line 76, in create
    return cls._create_non_streaming(
  File "D:\python310\lib\site-packages\fireworks\client\base_completion.py", line 158, in _create_non_streaming
    response = client.post_request_non_streaming(
  File "D:\python310\lib\site-packages\fireworks\client\api_client.py", line 131, in post_request_non_streaming
    self._error_handling(response)
  File "D:\python310\lib\site-packages\fireworks\client\api_client.py", line 112, in _error_handling
    self._raise_for_status(resp)
  File "D:\python310\lib\site-packages\fireworks\client\api_client.py", line 94, in _raise_for_status
    raise InternalServerError(get_error_message(resp, "internal_server_error"))
fireworks.client.error.InternalServerError: {'error': {'object': 'error', 'type': 'internal_server_error', 'message': 'server had an error while processing your request, please retry again after a brief wait'}}

Process finished with exit code 1

Description
I want to know how to use other models, or open-source large models in a multi-agent system.
System Info
langchain-community                      0.2.6
langchain-core                           0.2.10
langchain-experimental                   0.0.62
langchain-fireworks                      0.1.4
langchain-groq                           0.1.5
langchain-openai                         0.1.10
langchain-text-splitters                 0.2.0
langchainhub                             0.1.20
langdetect                               1.0.9
langgraph                                0.1.5

@SENVENHUHU could you please confirm that the tool calling is working for you with a minimal example? perhaps just use a simple from langgraph.prebuilt import create_react_agent to test it.
also, we recommend using prebuilt implementation of ToolNode (from langgraph.prebuilt import ToolNode), as well as bind_tools instead of bind_functions

@vbarda
Below is the result I got when I tested using from langgraph.prebuilt import create_react_agent.
================================ Human Message =================================
How much is the Morimaki Beef Burger?
================================== Ai Message ==================================
Tool Calls:
get_mojuan_price (call_J0Vq9xz6rBZD0MhExKmOh4yR)
Call ID: call_J0Vq9xz6rBZD0MhExKmOh4yR
Args:
name: Morimaki Beef Burger
================================= Tool Message =================================
Name: get_mojuan_price
66
================================== Ai Message ==================================
The Morimaki Beef Burger costs 66.
So I think the tool call was successful, however, the problem still hasn't been resolved.
I would like to ask how to replicate the Multi-Agent Collaboration example using other models instead of the GPT  model.

@SENVENHUHU you would likely need to customize the prompts as well as use more powerful models (note that the notebook is using gpt4) -- not all tool calling models will work equally well out of box
going to close, since this is not a langgraph issue, but feel free to open a discussion on this

@SENVENHUHU  can you give me sample code with firefunciton-v2 working with react? i still can't implement it after reading the information


Setting additional WIX options

Is there a way to do more WIX configuration? Specifically, I am trying to set the installer icon. And eventually I want do things like:
http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/configure_arp_appearance.html

Electron wix msi generates a WIX template before compiling it with WIX toolset.
I've been able to override the template generated by  new MSICreator() and store it as a file.
Initial wix .wxs template can be read from the output msiCreator.wixTemplate initially. Then you can update it with new placeholders {{WhatYouWant}} and dynamically set values.
// custom wix template to add another shortcut for readonly mode
msiCreator.wixTemplate = fs.readFileSync(path.join(__dirname, wixTemplatePath), 'utf8');
msiCreator.wixTemplate = msiCreator.wixTemplate.replace(/{{DefaultIcon}}/gi, path.join(__dirname, staticResourcesDir, 'myicon.ico'));

Do you know how to access/change the WIX template from the @electron-forge/maker-wix electron-forge maker plugin?

Apparently, there's already an option to update the WiX template built into the MSICreator class:
const creator = new MSICreator({})
//replace is built-in
creator.wixTemplate.replace('find expression', 'replace expression')

That being said, it's still unclear how this actually works. I'm assuming that electron-wix-msi loads the wix.xml template file from (/node_modules/electron-wix-msi/static/wix.xml) into memory, does the replace, then uses the result as the WiX template.


16-color, 88-color, 256-color, and 24-bit color codes in cells cause an error

If a cell value contains an aixterm (16-color), xterm (88-color or 256-color), or konsole (24-bit color) code, it throws TypeError: Cannot read property 'set' of undefined. Most modern terminals support these codes, so it would be nice to pass them through correctly.
Example:
var ansi256Colors = require('ansi-256-colors');
var colors = require('colors');
var Table = require('cli-table2');
var util = require('util');

function testTableCell(value)
{
    try
    {
        var table = new Table({ head: [util.format('%j', value)] });
        table.push([ value ]);
        console.log(table.toString());
    }
    catch(exc)
    {
        console.error("\nError rendering value %j: %s", value, exc.stack || exc.toString());
    }
}

testTableCell(colors.green('green'));
testTableCell('\x1b[90mgray (aixterm 16-color)\x1b[m');
testTableCell(colors.gray('gray (aixterm 16-color, using "colors")'));
testTableCell('\x1b[38;5;8mgray (xterm-256color)\x1b[m');
testTableCell(ansi256Colors.fg.bright[0] + 'gray (xterm-256color, using "ansi-256-colors")' + ansi256Colors.reset);
testTableCell('\x1b[38;2;255;136;0ma bright orange (konsole 24-bit)\x1b[m');

Output:
$ node test-cli-table2.js
┌─────────────────────────────┐
│ "\u001b[32mgreen\u001b[39m" │
├─────────────────────────────┤
│ green                       │
└─────────────────────────────┘

Error rendering value "\u001b[90mgray (aixterm 16-color)\u001b[m": TypeError: Cannot read property 'set' of undefined
    at updateState (/home/dbronke/test/node_modules/cli-table2/src/utils.js:67:13)
    at readState (/home/dbronke/test/node_modules/cli-table2/src/utils.js:75:5)
    at Object.colorizeLines (/home/dbronke/test/node_modules/cli-table2/src/utils.js:255:13)
    at Cell.mergeTableOptions (/home/dbronke/test/node_modules/cli-table2/src/cell.js:51:24)
    at Table.<anonymous> (/home/dbronke/test/node_modules/cli-table2/src/table.js:29:12)
    at /home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:901:23
    at Function.forEach (/home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:3297:15)
    at Table.<anonymous> (/home/dbronke/test/node_modules/cli-table2/src/table.js:28:7)
    at /home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:901:23
    at Function.forEach (/home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:3297:15)

Error rendering value "\u001b[90mgray (aixterm 16-color, using \"colors\")\u001b[39m": TypeError: Cannot read property 'set' of undefined
    at updateState (/home/dbronke/test/node_modules/cli-table2/src/utils.js:67:13)
    at readState (/home/dbronke/test/node_modules/cli-table2/src/utils.js:75:5)
    at Object.colorizeLines (/home/dbronke/test/node_modules/cli-table2/src/utils.js:255:13)
    at Cell.mergeTableOptions (/home/dbronke/test/node_modules/cli-table2/src/cell.js:51:24)
    at Table.<anonymous> (/home/dbronke/test/node_modules/cli-table2/src/table.js:29:12)
    at /home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:901:23
    at Function.forEach (/home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:3297:15)
    at Table.<anonymous> (/home/dbronke/test/node_modules/cli-table2/src/table.js:28:7)
    at /home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:901:23
    at Function.forEach (/home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:3297:15)

Error rendering value "\u001b[38;5;8mgray (xterm-256color)\u001b[m": TypeError: Cannot read property 'set' of undefined
    at updateState (/home/dbronke/test/node_modules/cli-table2/src/utils.js:67:13)
    at readState (/home/dbronke/test/node_modules/cli-table2/src/utils.js:75:5)
    at Object.colorizeLines (/home/dbronke/test/node_modules/cli-table2/src/utils.js:255:13)
    at Cell.mergeTableOptions (/home/dbronke/test/node_modules/cli-table2/src/cell.js:51:24)
    at Table.<anonymous> (/home/dbronke/test/node_modules/cli-table2/src/table.js:29:12)
    at /home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:901:23
    at Function.forEach (/home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:3297:15)
    at Table.<anonymous> (/home/dbronke/test/node_modules/cli-table2/src/table.js:28:7)
    at /home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:901:23
    at Function.forEach (/home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:3297:15)

Error rendering value "\u001b[38;5;8mgray (xterm-256color, using \"ansi-256-colors\")\u001b[0m": TypeError: Cannot read property 'set' of undefined
    at updateState (/home/dbronke/test/node_modules/cli-table2/src/utils.js:67:13)
    at readState (/home/dbronke/test/node_modules/cli-table2/src/utils.js:75:5)
    at Object.colorizeLines (/home/dbronke/test/node_modules/cli-table2/src/utils.js:255:13)
    at Cell.mergeTableOptions (/home/dbronke/test/node_modules/cli-table2/src/cell.js:51:24)
    at Table.<anonymous> (/home/dbronke/test/node_modules/cli-table2/src/table.js:29:12)
    at /home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:901:23
    at Function.forEach (/home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:3297:15)
    at Table.<anonymous> (/home/dbronke/test/node_modules/cli-table2/src/table.js:28:7)
    at /home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:901:23
    at Function.forEach (/home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:3297:15)

Error rendering value "\u001b[38;2;255;136;0ma bright orange (konsole 24-bit)\u001b[m": TypeError: Cannot read property 'set' of undefined
    at updateState (/home/dbronke/test/node_modules/cli-table2/src/utils.js:67:13)
    at readState (/home/dbronke/test/node_modules/cli-table2/src/utils.js:75:5)
    at Object.colorizeLines (/home/dbronke/test/node_modules/cli-table2/src/utils.js:255:13)
    at Cell.mergeTableOptions (/home/dbronke/test/node_modules/cli-table2/src/cell.js:51:24)
    at Table.<anonymous> (/home/dbronke/test/node_modules/cli-table2/src/table.js:29:12)
    at /home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:901:23
    at Function.forEach (/home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:3297:15)
    at Table.<anonymous> (/home/dbronke/test/node_modules/cli-table2/src/table.js:28:7)
    at /home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:901:23
    at Function.forEach (/home/dbronke/test/node_modules/cli-table2/node_modules/lodash/dist/lodash.js:3297:15)

References:

"ANSI escape code" on Wikipedia
"Functions using CSI, ordered by the final character(s)" from XTerm Control Sequences
README.moreColors from Konsole

Looking at the code that's doing that, it seems like using ansi-state or something similar would be preferable to maintaining your own ANSI escape code parsing logic.

ansi-state looks cool, but it doesn't have a mechanism for getting n characters from a string (where n is printable characters). This is required for correctly implementing word-wrap and truncation.
I will try to address some of those escape codes (at the very least, it shouldn't throw), just not sure ansi-state is going to be the right solution.

I take it that an "empty" escape string is a reset. By empty, I mean nothing between [ and m (\u001b[m or \x1b[m).
Everything I read says it should have a0 (\u001b[0m or \x1b[m).
How sure are you that the "empty" version is actually a reset (with sources if available please)?

From what I can tell, there are two issues here.

I am not addressing the reset code (see #7).
I am not parsing aixterm codes (see #8).

I am closing this issue in favor of #7, #8 - but let's keep the discussion here.

I couldn't remember where I had first seen it, but that behavior is defined in the ECMA-48 spec, section 8.3.117:

SGR - SELECT GRAPHIC RENDITION
Notation: (Ps...)
Representation: CSI Ps... 06/13
Parameter default value: Ps = 0

The way the ECMA-48 spec is worded is a bit awkward to read. (for instance, "06/13" means the character with 6 and 13 (resp. 6 and D in hexadecimal) as the two halves of its representative byte; this equates to the character m)
The XTerm Control Sequences document also shows 0 as the default for SGR:

CSI Pm m  Character Attributes (SGR).
    Ps = 0  -> Normal (default).
[...]

From the ECMA-48 spec.

5.4.2 Parameter string format
...
e) An empty parameter sub-string represents a default value which depends on the control function.
f) In each parameter sub-string, leading bit combinations 03/00 are not significant and may be omitted. If the parameter sub-string consists of bit combinations 03/00 only, at least one of them must be retained to indicate the zero value of the sub-string.

Note: 03/00 is the zero (0) character
While (e) and (f) seem to be in direct conflict, I am going to go ahead and allow for the empty string.

Also, it says leading 0's "may" be omitted (not "must"), so I really should allow for leading zeros to any code.

fix published in 0.1.6

@jamestalmage: Thank you! I made a comment on f92d128, but it's just a minor point about the unit tests.

Fair enough. Added to the issue tracker. I'm busy with other things ATM. If it's really bugging you, feel free to submit a PR.


Setting up e2e tests

Would be great having an e2e test suite to check all the functionalities of capsule-proxy.
With capsule, we're relying on Ginkgo but I think it would be overkill: we don't have CRDs, we just need to check the reverse proxy is working as expected, what we just need is a simple Kubernetes cluster pointing to.
Besides the retrieval of expected and filtered items, we have to check three functions:

the JSON output
the Table output kubectl
each of the above with the --watch/-w flag

Implementing all of them could be challenging, especially the watch one since there are WebSockets involved, but I guess we can hack bash with some timeouts to check the output: this can be postponed if considered too much tricky, the first purpose of this issue is to avoid merging bugs and enforce the reliability of the main branch.
Since it's just a matter of expectation testing, BATS could be really interesting and easy to use.
The e2e test suite should be run against several Kubernetes versions, as well as the Capsule supported one, installing it using the official Helm repository along with the capsule-proxy one.

This' going well, except for the fact we don't have yet a test for the watch (--watch|-w) option: any hint on how testing this would be great.

We can postpone the watch test, we're covering enough cases.
Going to open back when planning the 0.2.0 release.


Support existing hardware from Standalone client

This will allow us to completely remove scan functionality from the DataSplice client apps and keep it centralized in the uniwedge.
Here's a rough priority list for support:

[ ] #26 Koamtac
[ ] #27 Motorola SDK
[ ] #28 Intermec Wedge Spy
[ ] #29 Intermec Scan Engine SDK
[ ] #30 Intel MCA
[ ] #31 DTResearch

@plaxdan @kenfletcher Did Intel MCA ever get added?

Not that I'm aware of. The intermec driver's the only one that's been pushed to this repo.


Add TypeScript definitions

Sorry, it's better to publish them to DefinitelyTyped. Read sindresorhus/ama#439 for more info.

I now accept TypeScript definitions if anyone looking is interested in submitting it here.
See: https://github.com/sindresorhus/ama/issues/439#issuecomment-414212229
Please follow this guide: https://github.com/sindresorhus/typescript-definition-style-guide


Read Azure credentials from environment variable

Proposal
I saw in the documentation that you can obtain AWS credentials from environment varaibles:
# The AWS API keys. If blank, the environment variables `AWS_ACCESS_KEY_ID`
# and `AWS_SECRET_ACCESS_KEY` are used.
[ access_key: <string> ]
[ secret_key: <secret> ]

Any plan to support the same for Azure?
something like this:
# The Azure API keys. If blank, the environment variables `AZURE_SUBSCRIPTION_ID`,
# `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, and `AZURE_CLIENT_SECRET` are used.
[ subscription_id: <string> ]
[ tenant_id: <string> ]
[ client_id: <string> ]
[ client_secret: <secret> ]

We recommend against using environment variables for secrets as they aren't designed for it. We also want to have just one place that configuration comes from. If the client we're using happens to this under the covers that's it's own business though.

@brian-brazil I understand your point but isn't this kind of inconsistent to have it for one type of service discovery and not for another?
Also, I believe the security issues should be left for the user to decide. After all, putting the secret in the prometheus.yml file as plain text is just as bad as keeping it as an environment variable in clear text, no? (or am I missing something?)

Azure does have these official environment variables used for similar use cases:

So why isn't it working out of the box today? Are we using the wrong API?

I just think it’s inconsistent that Prometheus supports this for AWS and not for Azure…

Inconsistency between the official AWS and official Azure libraries is something to take up with Amazon/Microsoft

We've looked at this as part of our bug scrub, and per the above we believe the current behaviour is okay. If there's something we're mis-using from the existing Azure APIs please let us know, but we don't take config from envvars per #2357.


AMBARI-25746: fix the question of dev-support build docker containers

https://issues.apache.org/jira/browse/AMBARI-25746
What changes were proposed in this pull request?
An error is reported when run ./dev-support/docker/centos7/build-containers.sh
as follows：
No package /root/ambari-agent.rpm available. Error: Nothing to do Setting up mariadb-server Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service. ERROR at line 1: Failed to open file '/var/lib/ambari-server/resources/Ambari-DDL-MySQL-CREATE.sql', error: 2 Setting up ambari-server bash: ambari-server: command not found bash: ambari-server: command not found
reason：
I am building in a new server environment, the server does not have mvn installed by default
solve：
Install mvn before compiling
How was this patch tested?
Use Docker cluster environment for tests(scripts are under ./dev-support/docker/centos7/build-containers.sh)

@kevinw66
I have finished the adjustment and tested it locally.

Still have problem when running on my machine
[root@bigdata centos7]# ./build-containers.sh
Compiling ambari
[root@1d5c15c3e947 ambari]#

hi @kevinw66
I modified the compilation process and kill maven  where rebuild.

update build-ambari.sh file
build-ambari.sh can only be executed after build-comtains.sh and already exists ambari-rpm-build container


createHome does not set permissions

Issue description
The documentation of users.users.<user>.createHome states that if the directory already exists the permissions will be modified to match the user however this does not seem to work
Steps to reproduce
# mkdir /home/arian

Now make a user arian:
users.users.arian = {
  isNormalUser = true;
  createHome = true;
};

Now ls -al /home/arian. Owner is root instead of Arian.
Technical details
Clean Nixos 16.09 install

System: 16.09.1021.0cb2838

Reasons why you'd manually create the directory : you set up a btrfs subvolume

I don't see this borne out in the logic: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/config/update-users-groups.pl#L180 (the only reference to createHome). A quick glance at that suggests to me that it won't modify the permissions if the dir exists, though I've not studied the code carefully, so take that with a pinch of salt.

@joachifm Yes, it does not and that is the problem. At least if you count owner and directories as permissions and not the mode, as that is done on creation. Again if the directory does not exist. :smiley:
I've create a PR to fix the problem, with a question: #23623

Thanks! :)

One final note, would it be worth backporting it to 16.09?  Or because 17.03 can be released any time there is no need?

Oh, I also backported it to 16.09. Sorry for not mentioning. ;)

This still doesn't fully work as I would expect with nested directories.
For instance, if I set the home path to /foo/bar and neither of those directories exists, /foo/bar will be created with the correct ownership but /foo will belong to root:root. And since the execute permission on /foo is only set for the owner, the respective user can't even cd into their own home directory!


Rename CDTDocumentRevision's -mutableCopy to -copy

What & Why
CDTDocumentRevision is now mutable, so having a method named -mutableCopy didn't make sense -- the simple -copy method is more appropriate.
How

73315e9

Rename -mutableCopy to -copy and fix method calls to the previous method. Content of method doesn't change.
Also rename the xWrappingY methods to copy to be more consistent.

f90db3d

This caused some tests to fail, so they are ignored -- a future commit on the feature branch will fix.

reviewer @rhyshort

+1

+1


"pickAtRandom" modifier

As discussed in chat this would be a modifier to pick a certain effect/attribute at random out of a selection of two or more. Suggested syntax example
pickAtRandom(
    { summon 1 of "Foo" to 'you' zone 'Battlefield' },
    { summon 1 of "Bar" to 'you' zone 'Battlefield' }
)

related to #233

Now possible with the following syntax:
    pick 2 atRandom {
        summon 1 of 'Cheating shot' to 'owner' zone 'Hand'
    }, {
        summon 1 of 'Cheating Arms' to 'owner' zone 'Hand'
    }, {
        summon 3 of 'Cheating shot' to 'owner' zone 'Deck'
    }

Note that I made it more flexible by using pick X


run core tests

this just adds a runner for the core tests so they get included in the npm test run, and update some of the tests to use the new api format.  One fails, buts that is an existing bug in cls.

One fails, buts that is an existing bug in cls.

What's the bug in CLS? I see a failure in core-asynclistener.simple.js:
% node test/core-asynclistener.simple.js
expected 29
actual   30

assert.js:87
  throw new assert.AssertionError({
        ^
AssertionError: 30 == 29
    at process.<anonymous> (/Users/ogd/Documents/projects/async-listener/test/core-asynclistener.simple.js:49:10)
    at emitOne (events.js:77:13)
    at process.emit (events.js:166:7)

but that test file has always been among the more opaque. I can probably go in and use process._rawDebug to figure out what's broken, but if there's an issue you know about, it would save me time.

Sorry that is a type, the bug is in async-listener.  Give me a minute, I'll try to find the minimal repro

this is the test: https://github.com/othiym23/async-listener/blob/master/test/core/core-asynclistener-error-throw-in-before-inflight.js
The bug is essentially that the list that is passed to asyncWrap is the same object that the set of active listeners in a scope is using, so if listeners are added/removed on the same tick after an async context has already been created, the list of listeners that applies to that async context will also change


Interoperability: Espaloma

@yuanqing-wang has already developed round-trips between espaloma.Graph and openmm.System

https://github.com/choderalab/espaloma/blob/d80d280acd608dc04c93966afe15cc3cb74f65a8/espaloma/graphs/deploy.py#L42
https://github.com/choderalab/espaloma/blob/d80d280acd608dc04c93966afe15cc3cb74f65a8/espaloma/graphs/legacy_force_field.py#L120

These could serve as inspiration for parallel round-trips here.

It might be worth exploring two options (which are not mutually exclusive):

Espaloma or some graph net tool as typing engine, i.e. a SMIRNOFF competitor
Espaloma or some graph net tool as a charge assignment tool, i.e. an AM1BCC competitor

Not implementing with Espaloma in its current state; in the future a different GCNN tool could be used


unify width of right column

references #437LiveURL: https://smartfaq-437-unified-width-of-right-column.surge.sh

I'm curious, @jalbertsr you can't merge?

I merged the MR, but IMHO not it's not finished fully (I left the issue open) - the same width should be applied to login & intro screens

I had not merged it yet because we were talking about whether it was better to do a rebase instead of Merge branch 'master' into 437-unified-width-of-right-column, but we said it was ok, just rebase from now on.
It also feels strange to me this width change, when going form intro page to faq page.

I was also thinking about the discrepancy of those sizes initially, but to me the wider login & intro screen seemed that it has too much unnecessary whitespace.

if you are in doubts regarding the UI, please always ask @mjancik

I had not merged it yet because we were talking about whether it was better to do a rebase instead of Merge branch 'master' into 437-unified-width-of-right-column

huh, ok, I overlook this.

the same width should be applied to login & intro screens

I have discussed this question with @mjancik and he said that the current design is ok, so I think we can close the issue.

superb, thanks, then just close it


[Event] wire up event store and query api, conversion, bug fixes and tests

close loop between event store to query api with various event struct's conversion
update event query apis
update a few things in event store and fix a bug
tests, tests, tests

Good work! overall looks great, just a small comment on an unwrap.
Also do we need docs?

yes we do! Do I just add doc in the code or another place where you can point me to?


Request To Add Source Mainnet

Request to add the Source Network to Mintscan
Source Mainnet went Public October 13, 2023
www.sourceprotocol.io
https://www.coingecko.com/en/coins/source
https://github.com/chainapsis/keplr-chain-registry/blob/main/cosmos/source.json
https://github.com/cosmos/chain-registry/tree/master/source
Current Explorers:
https://ping.pub/source
https://explorer.tcnetwork.io/source/dashboard

Thank you for submitting a PR. Chainlist is a repository used to share the chain information, not to integrate onto the mintscan.


Python integration tests get hung

We should take a look at how the python integration tests behave in the github actions.
In this PR https://github.com/open-metadata/OpenMetadata/pull/1409 the tests ran, but I cancelled them at 20min and 1h 20min.

@akash-jain-10 ^

I'm looking into this one.

The changes in the sample-data.py file for the creation of entity types like database has changed, it takes the service name bigquery_gcp as default and doesn't consider the bigquery from tables.json where our sample-data is stored.
This issue will affect local-docker, metadata docker command, selenium tests.
Raising a PR for it once I am done testing.
CC: @harshach @pmbrull @akash-jain-10

hi @ayush-shah, we updated the lineage JSON sample data here: https://github.com/open-metadata/OpenMetadata/pull/1436/files. The sample data ingestion should work no

Hey @pmbrull,
Yes, the pipeline is workIng, but the recent changes for the methods used to get or create the database service now takes the service name i.e. bigquery_gcp which at first was fetching from tables.json i.e. 'bigquery'.
The Local docker script (run_local_docker.sh), metadata docker command and ingestion docker checks whether the bigquery.shopify.fact_sale is ingested or not, if it has, it proceeds further.

Hey @pmbrull, Yes, the pipeline is workIng, but the recent changes for the methods used to get or create the database service now takes the service name i.e. bigquery_gcp which at first was fetching from tables.json i.e. 'bigquery'. The Local docker script (run_local_docker.sh), metadata docker command and ingestion docker checks whether the bigquery.shopify.fact_sale is ingested or not, if it has, it proceeds further.

Got it, thanks @ayush-shah 🙏


add headers to connection data

Fixed in https://github.com/deepstreamIO/deepstream.io/releases/tag/v2.1.0


Favicon for AdminBro.com

Create a favicon for https://adminbro.com/

if you want to insert a custom favicon in your personal project just go for your branding adminbro config and add a new parameter
branding: {
"favicon":"image_link"
}

https://adminbro.com/AdminBroOptions.html#BrandingOptions

if you want to insert a custom favicon in your personal project just go for your branding adminbro config and add a new parameter
branding: {
"favicon":"image_link"
}

https://adminbro.com/AdminBroOptions.html#BrandingOptions


javascript-lint error severity error introduced in 5.34.0

The change introduced in release 5.34.0 causes an error in my application, because it relies on the fact that an error struct provided by JSHINT.data.errors() will contain a code property. In my case it doesn't an then I get an error:

When I execute JSHINT.data().errors command in the console I get errors struct in this form:

I guess when we rely on the structure got from external module, we shall have more defensive approach?

Which version of JSHint are you using?

Yes. I've been using old jshint version. I have a problem with updating it, as it causes new errors, so I will get back to you when I manage to do that.

I still didn't manage to upgrade my JSHINT version, but I will still work on that and this is codemirror unreletaed issue.
Anyway, wouldn't it be better to provide a backward functionality if there was one previously? E.g. check for a code property if not there make severity 'error' by default?


CUDA so much slower then CPU

CPU run:
time echo "hallo"| /usr/local/bin/piper --model ./piper/de-thorsten-low.onnx --output_file hallo.wav

real	  0m2.257s
user  0m1.969s
sys	  0m0.272s

RTX 2080 Ti run:
time echo "hallo"| /usr/local/bin/piper --cuda --model ./piper/de-thorsten-low.onnx --output_file hallo.wav

real	0m6.213s
user 0m2.559s
sys	0m1.613s

Tesla P40 run:
time echo "hallo"| /usr/local/bin/piper --cuda --model ./piper/de-thorsten-low.onnx --output_file hallo.wav

real	0m14.877s
user 0m2.403s
sys	0m2.282s

So what is happening here?

See. https://github.com/rhasspy/piper/pull/172 I have made a PR solving this. May you try it?

See. #172 I have made a PR solving this. May you try it?

fix for me. thanks.


Corrected the calculation in CGPA Percentage Calculator

Fixes Issue🛠

Closes #819
Description👨💻

I have corrected the formulas in CGPA Percentage Calculator and also updated the readme file for the same.
Type of change📄

[x] Bug fix (non-breaking change which fixes an issue)

How this has been tested✅
I have tested it by giving many inputs in the columns of CGPA and percentage both, and now it is functioning well.

Checklist✅

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have added demonstration in the form of GIF/video file
[x] I am an Open Source Contributor

Screenshots/GIF📷

Congrats on getting your PR merged to the repo under GSSOC 2k24 🎉 @nehashekhawat255


feat(bulk_actions): implemented first draft version

Contributor checklist

[ ] Bug fixes include regression tests
[ ] Features include unit/acceptance tests

Hi @zachdaniel
This is just a draft version on how we could implement bulk_actions for versions. Current tests are passing (at least locally).

LGTM 🥳 Will let this bake a bit before releasing because it's a pretty big change. Have you tested it in your own app?


Problem using mne.decoding.receptivefield

Describe the bug
When I try to run receptivefield.fit(X,Y), I get the following error in my terminal and spyder restarts the kernel
ERROR:traitlets:No such comm target registered: jupyter.widget
I have also tried:
jupyter nbextension install --py widgetsnbextension --user

jupyter nbextension enable --py widgetsnbextension

Steps to reproduce
This is the code that would reproduce the problem. Versions:
Spyder                   5.1.5
MNE                        23.4
jupyter                   1.0.0
jupyter_client            6.1.12
jupyter_console           6.4.0
jupyter_core              4.7.1
jupyterlab_pygments       0.1.2
jupyterlab_widgets        1.0.0

tmin,tmax=0,Y.shape[0]/256
n_delays=int((tmax-tmin)*sfreq)+2
n_splits=3
cv=KFold(n_splits)
n_channels=64
speech=np.random.randn(256,1)
Y=np.random.randn(256,64)
rf=ReceptiveField(tmin,tmax,sfreq,feature_names=['envelope'],estimator=1,scoring='corrcoef')
coefs = np.zeros((n_splits, n_channels, n_delays))
scores = np.zeros((n_splits, n_channels))
for ii, (train, test) in enumerate(cv.split(speech)):
    print('split %s / %s' % (ii + 1, n_splits))
    rf.fit(speech[train], Y[train])
    scores[ii] = rf.score(speech[test], Y[test])
    # coef_ is shape (n_outputs, n_features, n_delays). we only have 1 feature
    coefs[ii] = rf.coef_[:, 0, :]
times = rf.delays_ / float(rf.sfreq)

# Average scores and coefficients across CV splits
mean_coefs = coefs.mean(axis=0)
mean_scores = scores.mean(axis=0)

# Plot mean prediction scores across all channels
fig, ax = plt.subplots()
ix_chs = np.arange(n_channels)
ax.plot(ix_chs, mean_scores)
ax.axhline(0, ls='--', color='r')
ax.set(title="Mean prediction score", xlabel="Channel", ylabel="Score ($r$)")
mne.viz.tight_layout()

Additional information
output of mne.sys_info():
Platform:      macOS-10.16-x86_64-i386-64bit
Python:        3.7.10 | packaged by conda-forge | (default, Sep 13 2021, 19:35:18)  [Clang 11.1.0 ]
Executable:    /Users/jaemoon/opt/anaconda3/envs/phdf/bin/python
CPU:           i386: 12 cores
Memory:        16.0 GB

mne:           0.23.4
numpy:         1.19.5 {blas=NO_ATLAS_INFO, lapack=lapack}
scipy:         1.7.1
matplotlib:    3.4.2 {backend=module://matplotlib_inline.backend_inline}

sklearn:       0.24.2
numba:         0.53.1
nibabel:       3.2.1
nilearn:       0.8.1
dipy:          1.3.0
cupy:          Not found
pandas:        1.3.3
mayavi:        Not found
pyvista:       0.32.1 {pyvistaqt=0.5.0, OpenGL 4.1 ATI-4.6.20 via AMD Radeon Pro 560X OpenGL Engine}
vtk:           9.0.1
PyQt5:         5.12.3

the MNE code has no dependency on jupyter so it's something broken with
your jupyter installation
does it work outside of jupyter in an ipython terminal?

I tried running in the terminal and there is still an error. It says "Segmentation fault: 11"

there is no compiled code in mne so a segfault can only come from

your installation of python and typically numpy.

I would try to change the version of numpy to see if it helps

I downgraded numpy to version 1.20.3 and it did not help.

there are some segfault on mac M1 that have been reported on scikit-learn
issue tracker
honestly I don't know

I am not sure either. When I run the example script here https://mne.tools/stable/auto_examples/decoding/receptive_field_mtrf.html#sphx-glr-auto-examples-decoding-receptive-field-mtrf-py,
the code works fine and I get the result that I expect. But for some reason when it is my own data it doesn't work.

@agramfort
I think the issue might be with the cross validation because if I just do
rf.fit(spech,Y) without using training/testing then the code works just fine. Not sure what the issue is especially since it is working on the example code.

can you share a full script that replicates the issue so we can run it on a
different machine?