Fix several compiler errors when trying to reference type

Fixes the following code from typescript language service errors.
// tslint:disable-next-line
/// <reference path="../typings/fuse.d.ts" />

import { Injectable } from '@angular/core';

// Used for fuzzy searching
import Fuse = require('fuse.js');

import { DEMOS } from './demos.data.ts';
import { Demo } from './demo.model.ts';

@Injectable()
export class DemoService {
  private fuse: Fuse<Demo>;
  constructor () {
    this.fuse = new Fuse<Demo>(DEMOS, {
      keys: [ 'name', 'description' ]
    });
  }

  /**
   * Searches demos using a fuse.js attached to the demo name and description.
   */
  searchDemos(term: string): Demo[] {
    return this.fuse.search(term);
  }

  getDemosByName(name: string): Demo[] {
    return DEMOS.filter(demo => demo.name === name);
  }
}

Never mind, I'm now getting different errors as a result of the change with another environment.


Telemetry needs to sanitize the domain of the URL field

Describe the bug
We are sending the URL of the automate server in some telemetry payloads, which we should not be doing. If we need to know the URL we can send a relative URL or replace the domain with a fake domain to keep the format of the URL field the same.
To Reproduce
Steps to reproduce the behavior:

Look at our telemetry data

Expected behavior
It should be sanitized to not include domains.
Screenshots
Available upon request

The Segment has these information:
 "properties": {
    "install_context": "habitat",
    "instanceId": "4e9430f5-fa63-4393-9b4f-a16b17e33222",
    "licenseId": "7625d7b1-8ef9-4841-9859-8bd50b7343bd",
    "name": "/infrastructure/client-runs?name=wjb4stl809",
    "path": "/infrastructure/client-runs",
    "product": "automate",
    "product_version": "20200506172513",
    "referrer": "https://automate.chef.mastercard.int/dex/auth/ldap?req=sq5iqrbyef6dz6pkfcogicqbc",
    "search": "?name=wjb4stl809",
    "title": "Chef Automate",
    "url": "https://automate.chef.mastercard.int/infrastructure/client-runs?name=wjb4stl809"
  },

Since we already have the path and name we can remove url and referrer from this data.

Created PR for this issue - https://github.com/chef/automate/pull/5552


Add class for collectables

[Updated October 30th 2023]
This class will need to support:

In game:

[x] Movement in the game (run away from the player/move on their own)
[x] Animations of some sort
[x] Collision detection with the player (interacting)
[x] making them visible in the levels
[ ] a visible counter for the number of friends you have

In the code:

[ ] An optional "None" statement at the end for the parameters which could be used to add new features (like the none in Text)
[x] pygame rect (maybe polygons) and imported images
[ ] Having connections with Memory (load_levels, all the level.txt's, and statistics as a count)

wait why this is important?

I thought we needed some form of collectable right? Whether it be "friends", fuel packs, or any item we want the player to get throughout the levels. This class would allow the player to "collect" it, but be robust to include any specific things the collectable should be. I hope this clears things up.

This is how it looks so far. To me, it looks too small right? 😆

This is how it looks so far. To me, it looks too small right? 😆. Right now it's size is 10 by 10, the same as the player

LMFAO. I think we should make the size of the stars at least 25x25 and see what happens. I will also re-edit the image pictures of the stars so that they look better.

This is how it looks so far. To me, it looks too small right? 😆. Right now it's size is 10 by 10, the same as the player

LMFAO. I think we should make the size of the stars at least 25x25 and see what happens. I will also re-edit the image pictures of the stars so that they look better.

This is the size of the star at 25 by 25, any larger would make the star look significantly larger than the player. You can see that a lot of detail is lost, especially the black outline. My suggestion is to scale down the actual pixel art to a smaller size.

Interesting, I'll take care of the actual size of the images themselves then. I will submit a bunch of pictures for testing and see which one works best for the program.


while import nets.googlenet, it has an import error. should add init.py in each folder

Thanks for sharing such a nice code :-)
but when I tried to run demo you described, It occurs an importing error.
so it needs to be added that __init__.py in each nets, model, utils, dataflows
after I added it as a null file, It runs well :-)

I added init.py to each directory( nets, model, utils, dataflows), but it still tells me that 'No module named preprocess'. Do you know why?

@VisintZJ
did you exactly add __init__.py file in your each directory??
It should be __init__.py not init.py
sorry, markdown language hid my 2 underbars :-/

@tigerk0430
Sorry. I just noticed your comments and I have added init.py in all the folders.
Thanks for point out!


RuntimeException when filtering on an unnested nested subscript

CrateDB version
4.7.1
CrateDB setup information
does not matter
Steps to Reproduce
CREATE TABLE IF NOT EXISTS "doc"."test" (
   "a" ARRAY(OBJECT(DYNAMIC) AS (
      "b" ARRAY(TEXT)
   ))
)

SELECT _id, r.b FROM
(SELECT _id, UNNEST(a) b
FROM doc.test) r
WHERE 'hello' = r.b;

Expected Result
0 rows
Actual Result
Error
RuntimeException[com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'hello': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false') at [Source: (StringReader); line: 1, column: 6]]

Hello @proddata, can we clarify the Expected Result? I think it could be something like SQLParseException[Cannot cast `'hello'` of type `text` to type `object`], since it is text to object comparison.
Similar to:
cr> create table t12 (b boolean);
CREATE OK, 1 row affected  (0.477 sec)

cr> select * from t12 where b = 'hello';
SQLParseException[Cannot cast `'hello'` of type `text` to type `boolean`]

Oh ... I think I just messed up 🙈
What I meant to write is:
SELECT
    _id,r.b
FROM
    (
        SELECT
            _id,
            UNNEST(a) b
        FROM
            doc.test
    ) r
WHERE
    'hello' = any(r.b ['b'])

which works. I tricked myself with bad naming and nesting

I am uncertain if we need a more detailed error message and would rather close it for now.


Module broken if only passing domain name

Describe the Bug
Just passing the domain_name to request the certificate will end in error:
aws_route53_zone.root: Creating...
aws_route53_zone.root: Still creating... [10s elapsed]
aws_route53_zone.root: Still creating... [20s elapsed]
aws_route53_zone.root: Still creating... [30s elapsed]
aws_route53_zone.root: Still creating... [40s elapsed]
aws_route53_zone.root: Creation complete after 44s [id=Z100510839VMYCIY3X0FZ]
module.acm.data.aws_route53_zone.default["io"]: Reading...
module.acm.data.aws_route53_zone.default["example.io"]: Reading...
module.acm.aws_acm_certificate.default[0]: Creating...
module.acm.data.aws_route53_zone.default["example.io"]: Read complete after 1s [id=Z100510839VMYCIY3X0FZ]
module.acm.aws_acm_certificate.default[0]: Creation complete after 6s [id=arn:aws:acm:us-west-2:976668483278:certificate/5a505039-cec1-4407-a629-a71fd18f227a]
╷
│ Error: no matching Route53Zone found
│
│   with module.acm.data.aws_route53_zone.default["io"],
│   on .terraform/modules/acm/main.tf line 38, in data "aws_route53_zone" "default":
│   38: data "aws_route53_zone" "default" {
│
╵

It seems to be trying to get the hosted zone for both "example.io" and just "io" even if I am just passing "example.io" as domain_name. Because the 2nd hosted zone doesn't exist, the module fails.
This works fine if we pick version 0.16.3 of the module.
Expected Behavior
ACM certificate gets created.
Steps to Reproduce
This small code snippet should do it:
resource "aws_route53_zone" "root" {

  name    = "example.io"
  comment = "DNS zone for the root domain"
}

module "acm" {

  source  = "cloudposse/acm-request-certificate/aws"
  version = "0.17.0"

  enabled = true

  domain_name                       = "example.io"
  process_domain_validation_options = true
  ttl                               = 300
  subject_alternative_names         = [format("*.%s", "example.io")]

  depends_on = [aws_route53_zone.root]
}

Screenshots
No response
Environment

linux_amd64
Module version: 0.0.17
Terraform version: Terraform v1.3.8

Additional Context
No response

@nitrocode

See PR https://github.com/cloudposse/terraform-aws-acm-request-certificate/pull/66


Backup

It wasn't immediately clear to me how can i handle backups and recovery? Is it already in keychain so I don't need to worry? Are there plans to use same token on eg iOS?

@homakov U2F was designed to register unique key-pair on every-single registration. Backups should not be a thing.

New token, new registration. Keys are intended to be irrecoverable.

@homakov FYI: Protocol overview https://habrahabr.ru/post/305508/

Would be nice to default all the crypto to Secure Enclave if such available.

Really? I signed up with this soft app, lost my device, what's next? How to login same account again?

@homakov You have multiple tokens/u2f devices registered. If there is a way to recover your private keys, adversary can easily clone your token and get access to your account.
U2F designed such way that device can not leaked private info about user. Yubico does it with key wrapping, so no actual private key stored on the device, only master key that then used to unwrap Pk from keyhandle. Other vendors use secure enclaves to store keys in SecureDB.
Apple with their TouchID and ApplePay does exactly the same.
No key should be ever leaked.

P.S. Watch this https://www.youtube.com/watch?v=7UNeUT_sRos

So the answer is I'm supposed to register 2+ tokens? And what would be my 2nd token if I only have this app? What if I lose both? How many tokens should I have added to all accounts, like 5 or what?
No worries, I already know how wrapping works as well as protocol spec. I was talking about master key aka device secret.

@homakov Think about U2F as your house keys. You don't have one key, you have backups. Your partner, your stash, etc. So we generally suggest to have at lest two tokens. My friends generally have one token on their keys, and one under their tomatoes in the tin can(i.e. in safe at home).
Another thing is of-course to setup account recovery with recovery OTP or the way that facebook and github does now, with Delegated-Recovery.
Personally I have three tokens in use.

It's a pity this vision of "house keys" is only allowed and "official" approach.  On top of that I always travel, and have no long term "safe place". A lot of my friends live like that too.
Recovery OTP sounds equivalent to master seed since you can replace it with new token. I never noticed it - is it required by protocol to offer them?
Delegated recovery is basically giving access to your account to 3rd party, diminishing very idea of u2f.
If only U2F stopped this "never recover" and "everyone must use hardware" nonsense, it would be such an amazing protocol I could support.

You either have shared secret like password, or backed-up private keys that can compromise you, or you have hardware-backed irrecoverable crypto, that can not compromise you.
All secure authentication inevitably will be hardware backed and so irrecoverable. Credit cards, Apple Pay, Android Pay, RSA Tokens, U2F Tokes, TEE, TPM, SGX all hardware based, and more and more devices have Secure Enclave in them.
The only secret we can't leak is the one we don't know.
If you are arguing case of usability of U2F tokens and wan't something more mobile base, read about WebAuthn http://slides.com/herrjemand/webauthn-isig#/

By hardware I mean one you need to buy, if it goes built in like SEP - that's great.

You either have shared secret like password, or backed-up private keys that can compromise you

Not true. Password derived key can be injected in hardware in write only mode, then cannot be leaked. It's best of both worlds, no?

If you are arguing case of usability of U2F tokens and wan't something more mobile base
everyone wants something more mobile base

everyone wants something more mobile base

We are working hard on it.*)

Not true. Password derived key can be injected in hardware in write only mode, then cannot be leaked. It's best of both worlds, no?

It's still has security level of the password, as you can recover Pk by bruteforcing password.
The only secure Pk, is the one that you don't know
For now U2F is the best 2FA we have(jup, I know I work for FIDO, but it's the fact). U2F Tokens are not that expensive and go as low as few 8$(search amazon).
So: We are working on something more mobile based, and we are very close, but for now U2F is the best 2FA we have, so it's a good thing to get.

It's still has security level of the password, as you can recover Pk by bruteforcing password.

Common mistake, strength depends entirely on derivation scheme and some schemes are too expensive to break (been proven in the wild with bounties up to 20 BTC and 8 char passwords).

The only secure Pk, is the one that you don't know

Security out of touch with usability isn't going far, not using computers at all is even more secure and you can't argue with that.
It might be best, but it's definitely not good enough.

It might be best, but it's definitely not good enough.

We are working to make it better.

Common mistake, strength depends entirely on derivation scheme and some schemes are too expensive to break (been proven in the wild with bounties up to 20 BTC and 8 char passwords).

They are based on Seed encryption. password[seed -> key]. Still easy to break if encrypted see acquired

I was talking about https://keybase.io/warp/warp_1.0.9_SHA256_a2067491ab582bde779f4505055807c2479354633a2216b22cf1e92d1a6e4a87.html - does it sound good?
it's true that encrypted seed is usally easier to brute when acquired. Usually it is <1 sec to decrypt on consumer devices, while warpwallet is anywhere 10-100 seconds ie 100 times stronger. My belief is it's very good tradeoff of usability and strength.
And I see no reason for u2f or anyone to dictate against using it, ie it can be left up to implementation, why not?

U2F does not dictates how you generate keypairs.
However, I would like to point out is that this example takes 10 sec to generate keypair, U2F required to do it under 500ms. Usability clearly fails in the example.

so if someone invests time in pw  approach it still would be compliant? i wish it was explicitely allowed in spec.
it takes 10s once for master seed derivation, after setup it is instant to use.

@homakov Yes, technically you can make password based u2f token. You can use password as user verification method.

@homakov To answer your original question, Soft U2F currently stores key material in the macOS Keychain. I haven't put any effort into figuring out how to export/backup those keys. If you figure it out, a PR to update the README.md would be welcome.


Russian translation of Chapter 9 and the Chapter with course events.

@MKhalusova @lewtun
Good evening, Maria. Full translation of the last part of the course.
Please pay special attention to the file 2.mdx in the course events. Some points were not quite clear to me, I translated as close to the text as possible.
#75

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.


Type Error when calculating shingles

Hi Chris.  Nice article on MinHash!  The code is throwing the type error below (in Python 3.7.3).  Not sure what to do about that as I am new to Python but if you have recommendations or can point me in the right direction it would be appreciated.
$ python runMinHashExample.py
runMinHashExample.py:63: DeprecationWarning: 'U' mode is deprecated
  f = open(truthFile, "rU")
Shingling articles...
runMinHashExample.py:94: DeprecationWarning: 'U' mode is deprecated
  f = open(dataFile, "rU")
Traceback (most recent call last):
  File "runMinHashExample.py", line 127, in <module>
    crc = binascii.crc32(shingle) & 0xffffffff
TypeError: a bytes-like object is required, not 'str'

Never mind.  Simply use:
arc = binascii.crc32(str.encode(shingle)) & 0xffffffff


Error in examples/with-purgecss

Hi Guys,
first of all you rule!!
I'm trying to use purgecss with tailwind and have cloned this repo and changed directories to /with-purgecss then ran the following and get an error. I'd like to get it to work to convince myself the setup works with purgecss and tailwind as I've tried all sorts of things without luck on my actual project.
yarn && yarn dev
yarn install v1.5.1
warning package.json: No license field
warning example-with-purgecss: No license field
[1/4] 🔍  Resolving packages...
success Already up-to-date.
✨  Done in 0.91s.
yarn run v1.5.1
warning package.json: No license field
$ nuxt
/Users/apple/Documents/github/nuxt.js/examples/with-purgecss/nuxt.config.js:1
(function (exports, require, module, __filename, __dirname) { import path from 'path'
                                                              ^^^^^^

SyntaxError: Unexpected token import
    at new Script (vm.js:51:7)
    at createScript (vm.js:136:10)
    at Object.runInThisContext (vm.js:197:10)
    at Module._compile (module.js:626:28)
    at Object.Module._extensions..js (module.js:673:10)
    at Module.load (module.js:575:32)
    at tryModuleLoad (module.js:515:12)
    at Function.Module._load (module.js:507:3)
    at Module.require (module.js:606:17)
    at require (internal/module.js:11:18)
    at exports.loadNuxtConfig.argv (/Users/apple/Documents/github/nuxt.js/examples/with-purgecss/node_modules/nuxt/bin/common/utils.js:18:15)
    at Object.<anonymous> (/Users/apple/Documents/github/nuxt.js/examples/with-purgecss/node_modules/nuxt/bin/nuxt-dev:63:20)
    at Module._compile (module.js:662:30)
    at Object.Module._extensions..js (module.js:673:10)
    at Module.load (module.js:575:32)
    at tryModuleLoad (module.js:515:12)
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c nuxt
Directory: /Users/apple/Documents/github/nuxt.js/examples/with-purgecss
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/Users/apple/Documents/github/nuxt.js/examples/with-purgecss/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Try to replace the import with `const path = require('path')? .

Hi @manniL thanks for your help - yep that has helped highlight my issue and it now works.

sorry forgot to add there is duplicate postCss config in nuxt.config.js and postcss.config.js and i took out the one from nuxt.config.js and it still appeared to purge.


2.1 prefetch metrics

Record prefetch request average latency.
Calculate prefetch average bandwidth.
{
  "buffered_backend_size": 0,
  "data_all_ready": false,
  "entries_count": 0,
  "partial_hits": 2657,
  "prefetch_begin_time_millis": 892,
  "prefetch_begin_time_secs":<PHONE_NUMBER>,
  "prefetch_cumulative_time_millis": 391525,
  "prefetch_data_amount": 350224384,
  "prefetch_end_time_millis": 601,
  "prefetch_end_time_secs":<PHONE_NUMBER>,
  "prefetch_mr_count": 167,
  "prefetch_unmerged_chunks": 0,
  "prefetch_workers": 8,
  "store_path": "/var/lib/containerd-nydus/cache",
  "total": 2682,
  "underlying_files": [
    "18798c2c51ee3c0cb84f4e8dbfa3ac5b9116cfac315e3af08405363ea97a2ef7",
    "d6a08dd25b46d4701c0f3221f20160563fb4b5866b6f4c915a982914adfc00de",
    "3355a6911228a3502a61b1a53ce9265be17fb07934e6511fbcfdb83438e42de9",
    "948f80e95f4ab83ae5a202f987fee81f0c860f2e42d82689a758b57887678601",
    "9957fc0906f7b4b2b1e1fc4a7a6049380bb06d72ac6919e0c06e4134ae70941e",
    "004656def9b233af509fc65aa91b824071a2ed3c2ee7b1361866b9c06a403949"
  ],
  "whole_hits": 0
}

/retest

/retest

/retest

Please also open a PR for master

Please also open a PR for master

Sure. :-)


Cannot completely remove contents

First,  I add some content in the editor, then I press "Command + A" select all contents and delete it. I find the editor content is not clean, there is
 left. I test it lots of times, I found sometime there will left "

".
Is any solutions for this problem?

I'm having the same issue


Option to keep React import at the the top when using Organize Imports

Current Behavior
Organize Imports is great, but it always sorts as it is designed to. This means that React imports within React files get pushed to the their proper sorted position. However, it is a widely accepted convention to keep React as the very first import in most codebases.

Desired Behavior
Ability to specify/whitelist imports by position (perhaps using a priority). You could do it by glob or by language.
{
  "importOrder": [
    {
      "package": "react",
      "order": 0,
      "language": "typescriptreact"
    }
  ]
}

This feature is powered by the TypeScript project. Please file a feature request upstream

Thanks will do!


Some updates for new CDS beta backend API

Closes #84 .
These changes don't yet provide full support for the new API version (in part because the API server is in beta and it's not yet clear whether some of its new behaviours are planned changes or temporary bugs), but with them applied all but one of the unit tests pass. test_open_data_null_variables_list fails because the API server returns a Zip rather than the requested NetCDF.

Require cdsapi >=0.7.0

Add an api_version parameter to ERA5DatasetHandler.init (defaulting to 1).

Support new data_format parameter (replaces old format) in ERA5DatasetHandler

In CDSDataOpener, support both old and new ERA5 time coordinate names (time and valid_time respectively).

The open parameter spatial_res is changed from a required to an optional parameter for ERA5. The default grid size is then returned. This allows to request larger datasets.

I tried to invoke an error, when the dimension do not fit. However, the examples which produced errors last week, work now fine. I even added an example for ERA5, where I used parameters from atmosphere and ocean. The grid resolution of the ocean parameters is coarser by a factor of two. xarray.open_mfdataset() can deal with this, since the coarser grid of the ocean parameter is a subset of the finer grid of the atmospheric parameter. The missing values are filled with nans.
So far, I could not find an example, which gives me an error. I remember that xarray.open_mfdataset() gave an understandable error, when the dimensions do not fit. I will say, it is enough to rely on this, or maybe add a better error message, when an actual example comes up. At the moment I have the feeling the CDS-beta is evolving quickly.

@konstntokas I agree that it's enough if things are working with the current backend state and our current tests and use cases. We'll deal with any new errors or problems as and when they come up. Test suite and notebooks have now finally run to completion and code looks fine, so I'll approve and merge.


issue when using mirror/random mod

when mirror/random mod is active, the app doesn't seem to be able to detect column order change. therefore it keeps playing the notes as if no mod is active. any way to solve this? like finding column order/active mod in memory

Thanks for reporting this, didn't of think of that. I'll look into it.

Okay so the random mod likely won't be supported in the hear future, no clue why it causes action parsing to fail that thoroughly. Mirror mod support seems simple enough, probably won't add in-memory detection (i.e. you'll have to supply a --mirror option or something).

Took me a while to get to it but mirror mod is now supported.
    -m / --mirror-mod          Mirror the keys pressed (i.e.: mirror mod su
                               pport). (default: false, implicit: true)

I'm waiting on some other stuff before I make a new release but you can always download cutting edge builds by heading over to the latest Action run (probably not the latest by the time anyone is reading this, but still) and downloading the "builds" artifact.


Cache charmcraft pack container, skip unstable tests except on schedule

Ported from https://github.com/canonical/mysql-k8s-operator/pull/146

no burden, I'm a master on rebasing. THe history is very linear, so it will be literally 30sec

superseded by #19


Urgent Query

I am confused about the MoE layer in Jamba block. There are many versions of MoE. The paper has not defined in detail the mathematics or diagrams to understand the expert system. Can you please guide or share exact paper which has been followed in jamba?

Upvote & Fund

We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.

@ymmm-4 im just implementing the base moe here


Build error with standard rust toolchain 1.81.0

Hi
Compiling on rust 1.81.0 (rustup) on Linux x86_64  (cargo install macchina)
error[E0308]: mismatched types
  --> /opt/tools/.cargo/registry/src/index.crates.io-6f17d22bba15001f/macchina-6.2.0/src/theme/base.rs:14:24
   |
14 | #[derive(Debug, Clone, Serialize, Deserialize)]
   |                        ^^^^^^^^^
   |                        |
   |                        expected `Color`, found a different `Color`
   |                        arguments to this function are incorrect
   |
   = note: `Color` and `Color` have similar names, but are actually distinct types
note: `Color` is defined in crate `ratatui`
  --> /opt/tools/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.3/src/style/color.rs:66:1
   |
66 | pub enum Color {
   | ^^^^^^^^^^^^^^
note: `Color` is defined in crate `ratatui`
  --> /opt/tools/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.28.1/src/style/color.rs:66:1
   |
66 | pub enum Color {
   | ^^^^^^^^^^^^^^
   = note: perhaps two different versions of crate `ratatui` are being used?
note: function defined here
  --> /opt/tools/.cargo/registry/src/index.crates.io-6f17d22bba15001f/color-to-tui-0.3.0/src/lib.rs:7:8
   |
7  | pub fn serialize<S: Serializer>(color: &Color, serializer: S) -> Result<...
   |        ^^^^^^^^^
   = note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: `?` operator has incompatible types
  --> /opt/tools/.cargo/registry/src/index.crates.io-6f17d22bba15001f/macchina-6.2.0/src/theme/base.rs:14:35
   |
14 | #[derive(Debug, Clone, Serialize, Deserialize)]
   |                                   ^^^^^^^^^^^ expected `Color`, found a different `Color`
   |
   = note: `?` operator cannot convert from `ratatui::style::color::Color` to `ratatui::style::Color`
   = note: `Color` and `Color` have similar names, but are actually distinct types
note: `Color` is defined in crate `ratatui`
  --> /opt/tools/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.28.1/src/style/color.rs:66:1
   |
66 | pub enum Color {
   | ^^^^^^^^^^^^^^
note: `Color` is defined in crate `ratatui`
  --> /opt/tools/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.3/src/style/color.rs:66:1
   |
66 | pub enum Color {
   | ^^^^^^^^^^^^^^
   = note: perhaps two different versions of crate `ratatui` are being used?
   = note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: mismatched types
   --> /opt/tools/.cargo/registry/src/index.crates.io-6f17d22bba15001f/macchina-6.2.0/src/theme/components.rs:116:33
    |
116 | #[derive(Debug, Default, Clone, Serialize, Deserialize)]
    |                                 ^^^^^^^^^
    |                                 |
    |                                 expected `Color`, found a different `Color`
    |                                 arguments to this function are incorrect
    |
    = note: `Color` and `Color` have similar names, but are actually distinct types
note: `Color` is defined in crate `ratatui`
   --> /opt/tools/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.3/src/style/color.rs:66:1
    |
66  | pub enum Color {
    | ^^^^^^^^^^^^^^
note: `Color` is defined in crate `ratatui`
   --> /opt/tools/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.28.1/src/style/color.rs:66:1
    |
66  | pub enum Color {
    | ^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `ratatui` are being used?
note: function defined here
   --> /opt/tools/.cargo/registry/src/index.crates.io-6f17d22bba15001f/color-to-tui-0.3.0/src/optional.rs:4:8
    |
4   | pub fn serialize<S: Serializer>(color: &Option<Color>, serializer: S) -...
    |        ^^^^^^^^^
    = note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0308]: `?` operator has incompatible types
   --> /opt/tools/.cargo/registry/src/index.crates.io-6f17d22bba15001f/macchina-6.2.0/src/theme/components.rs:116:44
    |
116 | #[derive(Debug, Default, Clone, Serialize, Deserialize)]
    |                                            ^^^^^^^^^^^ expected `Color`, found a different `Color`
    |
    = note: `?` operator cannot convert from `std::option::Option<ratatui::style::color::Color>` to `std::option::Option<ratatui::style::Color>`
    = note: `Color` and `Color` have similar names, but are actually distinct types
note: `Color` is defined in crate `ratatui`
   --> /opt/tools/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.28.1/src/style/color.rs:66:1
    |
66  | pub enum Color {
    | ^^^^^^^^^^^^^^
note: `Color` is defined in crate `ratatui`
   --> /opt/tools/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ratatui-0.26.3/src/style/color.rs:66:1
    |
66  | pub enum Color {
    | ^^^^^^^^^^^^^^
    = note: perhaps two different versions of crate `ratatui` are being used?
    = note: this error originates in the derive macro `Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0308`.
error: could not compile `macchina` (bin "macchina") due to 4 previous errors
error: failed to compile `macchina v6.2.0`, intermediate artifacts can be found at `/tmp/cargo-installMbH9Pr`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.

The color-to-tui, ansi-to-tui saga never ends.
I think we should just vendor them at this point.

This issue should be resolved now, I'll make a new patch release.


Files scaffolded by kubebuilder carry the wrong project license

The main project carries an MIT license, but files generated by kubebuilder are carrying the Apache license. I suspect that's not what you intended.
The reason for this is the way that kubebuilder init was run.
If you run kubebuilder init without specifying  --license none then it will assume you want to apply the Apache license to your generated (scaffolded) files.
The fix for this is to...

remove the contents of `hack/boilderplate.go.txt' file (you need to leave the file in place,  but it does not need to have any content
visit each of the generated files and remove the license header

ignore me - raised in error

Reopening as this is an issue. Sorry for the bug-churn (it's been a long day)
Example of issue is this file...
https://github.com/microsoft/azure-databricks-operator/blob/master/api/v1alpha1/dbfsblock_types.go
... which carries Apache license

You may also want to fix the case of microsoft in the copyright notice too

if you want a PR for this, let me know (happy to help)


Expect in a Promise should fail the test.

🐛 Bug Report
This is a contrite example of the problem I am experiencing.
This test passes but it should not:
function codeToBeTested (req, res) {
    new Promise((resolve) => {
        resolve('all is well');
    }).then((result) => {
        res.status(200).json({'status': 'ok', result});
    }).catch((err) => {
        res.status(500).json({'status': 'notOk', err});
    });
}

test('A naughty test', done => {
    expect.hasAssertions();

    const req = {
            body: {},
            headers: {}
        };

    const res = {
        status: jest.fn(function () {return res;}),
        sendStatus: jest.fn(),
        json: jest.fn((result) => {
            // Uncommenting the following line, break the test but there is no mention
            // of the expect that fails on the first call. Debugging what is going on
            // is not trivial in a more complex scenario.

            // expect(res.json).toHaveBeenCalledTimes(1);

            expect(res.sendStatus).not.toBeCalled();
            expect(res.status).toBeCalledWith(500);
            expect(result).toMatchObject({
                "status":"notOk"
            });
            done();
        })
    };

    codeToBeTested(req, res);
});

Expected behavior
The test should fail. The json() function is called twice.
The first time the expect(res.status).toBeCalledWith(500); line fails. But because it is in a Promise, it does not fail the test. The execution is resumed in the .catch and the res.status(500).json({'status': 'notOk', err}); is called. All expects in the second call of res.json are true so the test pass.
In general if an expect fails, the error should be logged and the test needs to fail.

.catch(error){
done(error)
}
solved my should be failed but passed promise case


Enable customization of log field names

CloudNativePG currently has this fixed set of fields that are automatically logged to the standard output channel of each running container, in JSON format.
The are the fields:

level
ts
logger
msg
record
logging_podName

See https://cloudnative-pg.io/documentation/current/logging/
This implementation constraints the range of deployments of both the operator and the Postgres clusters with external tools and platforms for log management, such as GKE Stackdriver. This request came from Mo Firouz in the Sept 7, 2022 developer meeting. See the recording: https://youtu.be/mWXXRzslOXg?t=50
Specifically, their use case is to rename "level" into "severity".
We should provide a way to define a mapping at the operator configuration level that sets the above field names through an existing configmap/secret, and propagate that for instances. See https://cloudnative-pg.io/documentation/current/operator_conf/

We could think of an environment variable at the operator level like the following (default):
LOG_FIELDS=level,ts,logger,msg,record,logging_podName
You can remove some of these fields:
LOG_FIELDS=level,ts,logger,msg,record
You can rename fields:
LOG_FIELDS=level:severity,ts:timestamp,logger,msg,record,logging_podName
We now need to pass this info to the instance managers.
Any ideas?

TBH I don't think it's in scope for the operator, I expect a good log ingestion system to be able to do that later, e.g. as you would do if you had fluentd parsing logs before shipping them. Sounds more like a missing feature in GKE stackdriver, than in our operator.

TBH I don't think it's in scope for the operator, I expect a good log ingestion system to be able to do that later, e.g. as you would do if you had fluentd parsing logs before shipping them. Sounds more like a missing feature in GKE stackdriver, than in our operator.

I get your point of view for a more generic and customizable approach. However, unless you believe this will create issues at runtime and complicate maintenance, I believe this would be a nice thing to have.


Benchmark/Expected time for a N-digits address?

I want to know the average case of getting the desired vanity address on various CPUs, compilers, OS, etc.
I compiled my mkp224o with clang 7 and march=native, in Debian Buster and with 2x Xeon E5-2670
hello:
./mkp224o hello -B -S 5 -j 16 -d keys
>calc/sec:5095952.833017, succ/sec:0.000000, rest/sec:159.888078, elapsed:0.100070sec
hello23twa7k536qggxfeqm4orwohwlca3ln6f43b4splcym57msaxid.onion

hellow:
./mkp224o hellow -B -S 5 -j 16 -d keys
...
>calc/sec:7007205.907981, succ/sec:0.000000, rest/sec:0.000000, elapsed:15.111171sec                           [27/9839]
hellowthsxpoy4pq4vensv2drz6qv562d3sfqg5pk4nwqnik4hii53ad.onion

hellowo:
./mkp224o hellowo -B -S 5 -j 16 -d keys
...
>calc/sec:7318805.372164, succ/sec:0.000000, rest/sec:0.000000, elapsed:155.117082sec
hellowoy3ahurx54upkhdut2ww6kwsmzrrtve6imdul4f5yr4kpsb2id.onion

Should I need more samples so that we can calculate the variance? This is pretty random at best.

Nature of the way it works is, in fact, random.
Single char is 5 bits (base32) so probability of hitting right thing shrinks 2^5=32 times by each added character.
You'd need to run it longer to calculate averange.
I'd recommend first benchmarking differences with lower char count as higher hit rate will demand less total benchmark time to smooth out noise.
Best way to benchmark for purpose of speed improvement (like picking different compilers/processing backends) is looking at calc/sec stat, longer char counts shouldn't affect it.
Properly averanged over longer period of time hit benchmark shouldn't diverge significantly from theorethical prediction of 32 times less hit rate each added character.
Due to probablistic nature of it, there can always be surprises and disappointments, even if you know averange time it can find it sooner or take longer.
Steve Fan<EMAIL_ADDRESS>on Fri, 20 Dec 2019 19:09:30 -0800 in<EMAIL_ADDRESS>wrote:

I want to know the average case of getting the desired vanity address on various CPUs, compilers, OS, etc.
I compiled my mkp224o with clang 7 and march=native, in Debian Buster and with 2x Xeon E5-2670
hello:
./mkp224o hello -B -S 5 -j 16 -d keys
>calc/sec:5095952.833017, succ/sec:0.000000, rest/sec:159.888078, elapsed:0.100070sec
hello23twa7k536qggxfeqm4orwohwlca3ln6f43b4splcym57msaxid.onion

hellow:
./mkp224o hellow -B -S 5 -j 16 -d keys
...
>calc/sec:7007205.907981, succ/sec:0.000000, rest/sec:0.000000, elapsed:15.111171sec                           [27/9839]
hellowthsxpoy4pq4vensv2drz6qv562d3sfqg5pk4nwqnik4hii53ad.onion

hellowo:
./mkp224o hellowo -B -S 5 -j 16 -d keys
...
>calc/sec:7318805.372164, succ/sec:0.000000, rest/sec:0.000000, elapsed:155.117082sec
hellowoy3ahurx54upkhdut2ww6kwsmzrrtve6imdul4f5yr4kpsb2id.onion

Should I need more samples so that we can calculate the variance? This is pretty random at best.

The math (a geometric discrete probability distribution) tells us that, on average, it will take 32^(# of chars) iterations to find a desired address. So take that number and divide by your calcs/sec to get the expected run time until your first match.
For example, my i7-3770 does ~15,400,000 calcs/sec. To find a 7-character prefix, the anticipated run time is
32^7/15400000 = 2231.15 secs = 37 mins

And indeed, it took me 40 minutes to find my first address.

The math (a geometric discrete probability distribution) tells us that, on average, it will take 32^(# of chars) iterations to find a desired address. So take that number and divide by your calcs/sec to get the expected run time until your first match.
For example, my i7-3770 does ~15,400,000 calcs/sec. To find a 7-character prefix, the anticipated run time is
32^7/15400000 = 2231.15 secs = 37 mins

And indeed, it took me 40 minutes to find my first address.
(Note that this compares very favorably with shallot, which quotes "1 day" for a 1.5GHz CPU and a 7-character prefix.)

Did this means it takes for any x in length of digits, it should theoretically take 2^(5x) tries to have at least one match? This is huge 🤔

Correct! But it's just an average. You could get especially lucky or unlucky and find something sooner or later.

(Note that this compares very favorably with shallot, which quotes "1 day" for a 1.5GHz CPU and a 7-character prefix.)

"1.5GHz CPU" isn't very descriptive, though, and that table is quite outdated (history), so I'd say it's just difference of CPU powers, and docs being outdated.
One of the reasons I didn't put any stats in README.txt in the first place.

Did this means it takes for any x in length of digits, it should theoretically take 2^(5x) tries to have at least one match?

No. It means, that on average you should get one match every 2^(5x)=32^x tries. That's a little bit different. You can get very lucky and hit much sooner. Or very unlucky and hit much later. I've seen both happening.
Statistically, yeah, you'll get one match every 32^x tries (if using only one filter of x chars), but for that to show you'll need to average over much more than one hit, so I'm not sure if such expectation formula is very trustworthy when N=1.
This stuff is sorta confusing, but I just don't wanna overpromise such things in readme, especially when most users want only one or few addresses.

I agree with the math that's been presented here so far. If you want to be a bit more conservative, you can calculate the number of trials t it would take to get at least 1 match with n characters and a probability p with the formula t = log(1-p)/log(1-1/32^n). This comes from the distribution X~Binomial(t, 1/32^n) and P(X>=1)=p. Here's a table of what the number of trials looks like for some values common values. The number of digits are on the left and the probability of finding at least one success along the top:

50%
80%
90%
95%
99%

2
710
1648
2357
3067
4714

3
22713
52738
75450
98163
150900

4
726818
1687618
2414435
3141252
4828869

5
23258160
54003775
77261934
100520094
154523868

6
744261118
1728120799
2472381917
3216643035
4944763834

7
23816355775
55299865590
79116221365
102932577139
158232442729

The way to read this is like so: "It is expected that you will find at least one match for a 2 character search after 710 trials 50% of the time." So while yes on average it will take about ~24 billion trials to find a match for a 7 digit prefix, it will take ~158 billion trials to be 99% sure that you will find a match.

This is very cool, I knew something like this was doable but didn't remember exact maths for this.
I almost wanna write small utility to calculate these and print into terminal now.
That'd probably be pretty useful, to get such table with expected times, from input of calc/sec stat.
scribblemaniac<EMAIL_ADDRESS>on Sun, 22 Dec 2019 10:33:24 -0800 in<EMAIL_ADDRESS>wrote:

I agree with the math that's been presented here so far. If you want to be a bit more conservative, you can calculate the number of trials t it would take to get at least 1 match with n characters and a probability p with the formula t = log(1-p)/log(1-1/32^n). This comes from the distribution X~Binomial(t, 1/32^n) and P(X>=1)=p. Here's a table of what the number of trials looks like for some values common values. The number of digits are on the left and the probability of finding at least one success along the top:

50%
80%
90%
95%
99%

2
710
1648
2357
3067
4714

3
22713
52738
75450
98163
150900

4
726818
1687618
2414435
3141252
4828869

5
23258160
54003775
77261934
100520094
154523868

6
744261118
1728120799
2472381917
3216643035
4944763834

7
23816355775
55299865590
79116221365
102932577139
158232442729

The way to read this is like so: "It is expected that you will find at least one match for a 2 character search after 710 trials 50% of the time." So while yes on average it will take about ~24 billion trials to find a match for a 7 digit prefix, it will take ~158 billion trials to be 99% sure that you will find a match.

"1.5GHz CPU" isn't very descriptive, though, and that table is quite outdated (history), so I'd say it's just difference of CPU powers, and docs being outdated.

It also reflects the fact that mkp224o is a lot faster, especially with the batching code enabled. ;)

This stuff is sorta confusing, but I just don't wanna overpromise such things in readme, especially when most users want only one or few addresses.

Right, there is always some uncertainty involved, but as we've seen, there is a way to quantify the exact probabilities. It is possible to be more precise than "some time within the next 30 seconds or next 30 years."

You can calculate the number of trials t it would take to get at least 1 match with n characters and a probability p with the formula t = log(1-p)/log(1-1/32^n).

In C++ (I think in C too) it's a bit faster log(1-p)/log(1-1/32)*pow(32,n-1); rather then log(1-p)/log(1-1/pow(32,n));. This is of course a one time calculation before running the program and requires way less the a ms, so it shouldn't matter too much.


Added an extra line at the end of the readme

I'm learning how to use git

Please learn how to use git with your own GitHub repo. You can create one via the + button in the nav bar at the top of the page.

Okay. Sorry for the inconvenience  :p
On Tue, Apr 11, 2017 at 3:49 AM, Mark Murphy<EMAIL_ADDRESS>wrote:

Closed #29 https://github.com/commonsguy/cw-omnibus/pull/29.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/commonsguy/cw-omnibus/pull/29#event-1037329559, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ATbcqRP3tkmfQTEF48I97DUWE0POSETYks5ruqsOgaJpZM4M5Yzc
.


Seed Assessments on Submitted Applications for CAS2

DO NOT MERGE until we have tested the migration job we are currently testing has passed. this can be merged now as we successfully ran the update_cas2_applications_with_assessments job in all environments and checked that all non-seeded submitted applications have assessments ☺
we previously introduced a function to create an Assessment when an Application is submitted.
This commit ensures our seeded data matches what we would expect to see on real submitted applications.
I've used the @SuppressWarnings("LongParameterList") annotation because I don't see a way of reducing the parameters without making it less readable, any suggestions welcome!

Given the short time I've been on this project - looks good to me!
I can see this job populates the database with assessment records for submitted applications.  Then interrogates the database to ensure that: submitted applications have equivalent records in the assessment table; and in-progress applications do not.

I wondered if we ought to seed some assessments with values but given they're optional from the users point of view I don't think it matters.

@tahb ohh good idea. could be good to add in next time as I want to get this in before I go 🙈


Dockerfile working dir fix

fixes #75
includes documentation update

@seabbs I could see in the history. Don't worry, it's still not copying the code in, just specifying where RUN Rscript -e "devtools::install_dev_deps()" is executed so that it can find the DESCRIPTION file to know what the required modules are to install. I then mount the code when I launch the docker image (as per the readme).
I'm working towards being able to check out a completely fresh copy of the code, build the docker as per the dockerfile / description file and then mount and run the code within it.
The CI tools may also benefit from something I changed when locally building it - shifting the two files (dockerfile and DESCRIPTION) into a separate folder stopped docker build publishing the whole of the checked out git repo structure as the context (28gb or so) and instead just publishes the two files as the context (just a few kb).

Ah sounds great! The folder shift sounds like a good idea though does make it a bit nonstandard as an R code repo so would need a pointer for the DESCRIPTION.

oh yes, leaving DESCRIPTION in the root of the project really! I am doing the shuffling locally - I'll have a look into how we can do it on pipelines (this can't be the first project to not want all the code as docker context)

I have a solution - ticket, branch and fix to follow.


Corrects problem calling show_link with bad value

show_link method assumes its first parameter to be ActiveRecord instance

it calls .id on it.
When show_link method was introduced in
52458a65fa9368b9fdc30a170e5a3fca4c460543
@record.id was used as it was used to generate url for link before.
This patch corrects that. Without it MIQ generates error when user is
trying to view page like /ems_infra/show/1?display=timeline

@petrblaho : Thx for the fix.
Can you, please, provide a simple test here? Just check that for given ID the page renders the partial and sends a 200. Just post/get /ems_infra/show/#{ID}?display=timeline and that's it.
Thx!


augmentation

https://github.com/ArdhenduBehera/cap/blob/cae53050af583c2b3fa38081c0abc227199e7dc1/image_datagenerator.py#L144
Does resize, crop, shift, rotate are the only need for the augmentation.
No brightness augmentation?

Yes, that's right.

Yes, that's right.

thx! :/


Travis CI: Matrix -> jobs and Python 3.6 to 3.8

https://docs.python.org/3/whatsnew/3.8.html#other-language-changes

For integers, the three-argument form of the pow() function now permits the exponent to be negative in the case where the base is relatively prime to the modulus. It then computes a modular inverse to the base when the exponent is -1, and a suitable power of that inverse for other negative exponents.

Hi @cclauss, RustPython is actually targeting Python ~3.6, hence the CPython versions for our tests being at 3.6. We might change the target version in the future, but for now I think we're good at 3.6.

Once we start to target specific python version seriously, fixing a target version will be helpful to step over to goal.
For now, because RustPython is not spending any cost to keep 3.6 compatibility (comparing to 3.7+) at this stage, I think we can just move to later version of CPython if CI doesn't fail. It seems just a preference problem at this stage.

I think we should aim for 3.6 ~ 3.8 ish behavior of python. I agree that as long as CI does not fail, it is okay to move onwards.


CSS: Proposal to add a border utility

Description
Add .border-black.
Motivation & Context
We have .text-black and .text-white. We have .bg-black and .bg-white.
Just felt weird having .border-white and no .border-black. Maybe the .border-white could be removed instead of adding the black one ?
Type of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Refactoring (non-breaking change)
[ ] Breaking change (fix or feature that would change existing functionality)

Checklist

[x] I have read the contributing guidelines
[x] My code follows the code style of the project (using npm run lint)
[x] My change introduces changes to the documentation
[x] I have updated the documentation accordingly
[ ] I have added tests to cover my changes
[ ] All new and existing tests passed

Live previews

https://deploy-preview-37905--twbs-bootstrap.netlify.app/docs/5.3/utilities/borders#color

Related issues
NA

I dig, thanks!


Make track_order True as default if h5py is greater than 3.7.0

Closes: https://github.com/h5netcdf/h5netcdf/issues/143

[x] Tests added
[x] Changes are documented in CHANGELOG.rst

@hmaarrfk Thanks again for taking the lead here. I'm wondering if we should have at least one test which runs with h5py<3.7.0. Currently the whole matrix (beside the h5py2-tests) is running with h5py=3.7.0.

I think that would be reasonable. maybe the 3.7 test? I don't really want to add complexity to the test system, but "one old dependencies" test is generally a good idea. it allows you to monitor things.

Yes, using the Python 3.7 test as "old" dependency test would work good enough. Would you mind adding the needed changes?
Also the "Track Order" section in the README.rst needs update.

It looks like that the provision-with-micromamba-action does have selectors, but not the one we need. We just could add h5py3-version to the matrix and call for ["3.6" , 3.7"]?
The h5netcdf builds are quite fast, maybe we can live with that for now?

Thank you for looking for a good way to do that.
i'm somewhat doing chores now. if you have a good way to do this, feel free to push. i won't force push and we can squash merge.

@hmaarrfk Nice, it turns out that these h5py=3.6 tests should have been there before.
The one good thing is, we found it before release. Those errors have to be fixed before we can get along here. I hope it does not take overly long, so I assume I can fix it by tomorrow.

how did you force push without destroying my commit history with your name?

usually when i rebase, my little github icon appears in people's work, where im just trying to cleanup the history.

@hmaarrfk I've fixed the issue in #188, and dropped my earlier commit adding the h5py-matrix here. This should now work again. The last thing to do would be to add the needed changes to the README.rst "Track Order" section.

how did you force push without destroying my commit history with your name?

I pulled you branch, removed my commit and force-pushed to your branch.

i see, so you didn't rebase.

i see, so you didn't rebase.

Exactly. I didn't want to break your history.

Exactly. I didn't want to break your history.

hmm, no issue.
What is the next version number? 1.1 or 1.0.3?

Depends on if we consider the recent changes more as additions than fixes. From my point of view this track_order would warrant a v1.1. Thoughts?

warrant a v1.1

Agreed.

(fyi, i rebased and force push)

@hmaarrfk Thanks you for your continuing interest and efforts in h5netcdf.


Issue #93: plugin should be able to generate reports in xml format

XML renderers have been added to DependencyUpdateReport and PluginUpdateReport.

Hi. Could anyone take a look?

This change has been merge. I had to change the commit message to get automatically closed the issue. Thanks for your contribution.


Moving node_modules (inside docker container) breaks analyzing other tools' dependencies

We have a react-native mobile project, which is initially setup using NPM. Then both Gradle (Android) and CocoaPods (iOS) reference several modules from the node_modules as their dependencies.
Now, because inside the docker container, the node_modules are move to another location, ORT fails to scan the dependencies for Gradle and CocoaPods.
android/build.gradle (snippet):
allprojects {
    repositories {
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            name "React Native @ Node-Modules"
            url "$rootDir/../node_modules/react-native/android"
        }
        maven {
            // Android JSC is installed from npm
            name "Android JSC @ Node-Modules"
            url "$rootDir/../node_modules/jsc-android/dist"
        }
    }
}

android/app/build.gradle (snippet):
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)

android/settings.gradle:
rootProject.name = 'MAAPP'
include ':react-native-config'
project(':react-native-config').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-config/android')
include ':react-native-default-preference'
project(':react-native-default-preference').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-default-preference/android')
include ':react-native-version-number'
project(':react-native-version-number').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-version-number/android')
include ':react-native-pdf'
project(':react-native-pdf').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-pdf/android')
include ':rn-fetch-blob'
project(':rn-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/rn-fetch-blob/android')
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'

ios/Podfile (snippet):
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

ios/Podfile.lock (snippet):
EXTERNAL SOURCES:
  DoubleConversion:
    :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
  FBLazyVector:
    :path: "../node_modules/react-native/Libraries/FBLazyVector"
  FBReactNativeSpec:
    :path: "../node_modules/react-native/React/FBReactNativeSpec"
  glog:
    :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
  Permission-Camera:
    :path: "../node_modules/react-native-permissions/ios/Camera.podspec"

Ort output:
17:45:26.337 [DefaultDispatcher-worker-4] INFO  org.ossreviewtoolkit.utils.common.DirectoryStash - Temporarily moving directory from '/project/node_modules' to '/project/stash16300321570829416566/node_modules'.
--- SNIP ---
17:45:30.813 [DefaultDispatcher-worker-5] INFO  org.ossreviewtoolkit.utils.common.ProcessCapture - Running 'pod spec which DoubleConversion --version=1.1.6 --allow-root --regex' in '/project/ios'...
17:45:33.434 [DefaultDispatcher-worker-5] ERROR org.ossreviewtoolkit.analyzer.managers.CocoaPods - Resolving CocoaPods dependencies for path 'ios/Podfile' failed with: IOException: Running 'pod spec which DoubleConversion --version=1.1.6 --allow-root --regex' in '/project/ios' failed with exit code 1:
[!] Can't find spec for DoubleConversion.
--- SNIP ---
17:45:48.874 [DefaultDispatcher-worker-6] ERROR org.ossreviewtoolkit.analyzer.managers.Gradle - Resolving Gradle dependencies for path 'android/build.gradle' failed with: BuildException: Could not fetch model of type 'DependencyTreeModel' using connection to Gradle distribution 'http://XXX/distributions/gradle-6.7-all.zip'.
Caused by: LocationAwareException: Settings file '/project/android/settings.gradle' line: 12
A problem occurred evaluating settings 'MAAPP'.
Caused by: GradleScriptException: A problem occurred evaluating settings 'MAAPP'.
Caused by: MissingResourceException: Could not read script<EMAIL_ADDRESS>as it does not exist.
17:45:48.874 [DefaultDispatcher-worker-6] INFO  org.ossreviewtoolkit.analyzer.managers.Gradle - Resolving Gradle dependencies for path 'android/build.gradle' took 23.042516318s.
17:45:48.874 [DefaultDispatcher-worker-6] INFO  org.ossreviewtoolkit.analyzer.managers.Gradle - Resolving Gradle dependencies for path 'android/app/build.gradle'...
17:45:49.033 [DefaultDispatcher-worker-6] ERROR org.ossreviewtoolkit.analyzer.managers.Gradle - Resolving Gradle dependencies for path 'android/app/build.gradle' failed with: BuildException: Could not fetch model of type 'DependencyTreeModel' using connection to Gradle distribution 'http://XXX/distributions/gradle-6.7-all.zip'.
Caused by: LocationAwareException: Settings file '/project/android/settings.gradle' line: 12
A problem occurred evaluating settings 'MAAPP'.
Caused by: GradleScriptException: A problem occurred evaluating settings 'MAAPP'.
Caused by: MissingResourceException: Could not read script<EMAIL_ADDRESS>as it does not exist.
17:45:49.033 [DefaultDispatcher-worker-6] INFO  org.ossreviewtoolkit.analyzer.managers.Gradle - Resolving Gradle dependencies for path 'android/app/build.gradle' took 158.727381ms.

Now I know the error from CocoaPods is a little misleading, as it would also come because CP itself doesn't correctly resolve a file included from the file-system, however the problem would still be that the referenced file doesn't exist (anymore / yet).
I guess the question is if it is really necessary to move the node_modules directory, or if it is maybe possible to 'postpone' analyzing Gradle & CocoaPods while NPM is still running.

I believe there are at least two issues that come into play here:

Definition files for different package managers are actually analyzed in parallel.
In any case, the order in which package managers are requested to analyze their definition files is more or less undefined.

As a simple way to address this, I believe that we cloud change the analyzer's -m / --package-managers option to that, if specified, the order of the given package managers is maintained for running them, plus we could introduce a new option to disable parallel analysis.
Both things together should solve your issue as you could then say ort analyze --no-parallelism --package-managers npm,gradle,cocoapods. What do you think?

That sounds like a good solution!
Does turning off parallelism have much effect on eg speed? In this case, I don't mind parallelism for gradle and cocoapods, the only important thing is that NPM is finished... Then again, that's probably a lot harder to implement, especially if someone comes along with groups of managers that are dependent. I guess all or nothing is the way to go here.

Sorry for the late reply.

Does turning off parallelism have much effect on eg speed?

We assume yes, but it of course depends a bit on whether I/O is the bottleneck on the machine you're running ORT on or not.
The new idea @mnonnenmacher and I came up with is to not disable parallelism completely, but to have a mechanism telling ORT's analyzer which package manager depends on what other package manager (similar to Gradle's mustRunAfter for tasks). But as the CLI syntax would get a bit complex for that, such an option should probably go into ort.conf / .ort.yml.

@malice00 I have added a configuration option in #5465 that makes it possible to configure that one package manager must run after another. Could you give this a try and report back if it fixes your issue if you configure Gradle and CocoaPods to run after NPM?

@mnonnenmacher Works perfectly!

@malice00 Thanks for the feedback!


I love Israel so much I wish I could marry it

I love Israel so much I wish I could marry it

Thanks for your support


Unable to see or list models after saving as "title" is not present in the blueprint

Description
I have a model which doesn't require the "title" field however when I attempt to save a new record I'm getting the error "Undefined array index 0" which seems to be related to DoubleThreeDigital\Runway\Resource:220 where you're trying to fetch a title field. The model does save to the database, however I'm unable to see this model in detail or load the corresponding list page. It seems that a title field is expected but in my case I don't want to or have any requirement to have a title column on my model.
I have tried adding in a title field and making it not visible and not required, but this then attempts to add a title column to the insert query and I get a separate error for a column that doesn't exist.
Steps to reproduce
Model:
class Author extends Model
{
    use HasFactory, HasUuids, HasRunwayResource;

    protected $fillable = [
        'first_name',
        'last_name',
        'email',
    ];
}

Blueprint:
title: Authors
tabs:
  main:
    display: Main
    sections:
      -
        fields:
          # -
          #   handle: title
          #   field:
          #     type: text
          #     required: true
          #     validate:
          #       - required
          -
            handle: first_name
            field:
              input_type: text
              antlers: false
              type: text
              display: 'First Name'
              icon: text
              width: 50
              listable: hidden
              instructions_position: above
              visibility: visible
              duplicate: false
              hide_display: false
              validate:
                - required
          -
            handle: last_name
            field:
              input_type: text
              antlers: false
              type: text
              display: 'Last Name'
              icon: text
              width: 50
              listable: hidden
              instructions_position: above
              visibility: visible
              duplicate: false
              hide_display: false
              validate:
                - required
          -
            handle: email
            field:
              input_type: email
              character_limit: 255
              antlers: false
              type: text
              display: Email
              icon: text
              listable: hidden
              instructions_position: above
              visibility: visible
              duplicate: false
              hide_display: false
              validate:
                - required
                - email
                - 'max:255'

Runway resource config:
'resources' => [
    \App\Models\Author::class => [
        'name' => 'Authors',
        'blueprint' => 'author',
    ],
],

Environment
Environment
Application Name: Example
Laravel Version: 10.10.0
PHP Version: 8.2.5
Composer Version: 2.5.5
Environment: local
Debug Mode: ENABLED
URL: localhost
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 5
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.1.1 PRO

Statamic Addons
doublethreedigital/runway: 5.0.4
studio1902/statamic-peak-browser-appearance: 2.0
studio1902/statamic-peak-commands: 2.1
studio1902/statamic-peak-seo: 2.0
studio1902/statamic-peak-tools: 3.2

Do you still get the error if you make the first_name field listable, eg:
# Instead of this...
listable: hidden

# Have it like this...
listable: true

You need at least one 'listable column' for the listing table & the top of the publish form page as the page title.


Relevant Pages for Julia analysis.

https://github.com/mcreel/Econometrics
https://quantecon.org/quantecon-jl/
https://github.com/azev77/QuantEcon.cheatsheet/blob/master/julia/julia-cheatsheet.pdf
https://www.math.uci.edu/~rvershyn/papers/HDP-book/HDP-book.pdf
https://statisticswithjulia.org/

Video about parameters when creating functions.
https://www.youtube.com/watch?v=JFrzrTYFYbU&t=60s

The Julia Podcast - https://share.fireside.fm/episode/kiiJzqTC+e0c7jTbk

Best deep learning tutorial - https://www.youtube.com/c/3blue1brown/videos

linear algebra with julia - https://web.stanford.edu/~boyd/vmls/vmls-julia-companion.pdf

https://introajulia.org/

Optimizing Julia - https://huijzer.xyz/posts/inference/

be carefull with the if conditions - https://riptutorial.com/julia-lang/example/15211/short-circuit-operators-----and---

Variable scope in Julia - https://discourse.julialang.org/t/variable-scope-in-while-loops/15886


Adding UseFinal Middleware to Ensure Consistent HTTP Response Management

We have a situation where the Before middleware is returning an HTTP response.
Additionally, in the same service, we have an After middleware that we use to manage a metric of HTTP response status codes.
The current design does not support this case because the middleware chain is interrupted since the Before middleware returned an HTTP response, and we could not call ctx.next in this case.
In our implementation, we initially assumed that the after middleware would always be called.
For this case, and many others, we believe it is important to add middleware that will be called just before sending the HTTP response, without relying on what happened in the before, view, or after stages.
We decided not to use the existing middleware interface because it does not make sense for logic that runs at this stage to return an error since we did not want to change the ctx.Response based on these functions.
These functions should have logic that is separate from the existing logic for handling the request.
To solve the issue of HTTP responses being returned by Before middleware, we propose defining a new middleware method called UseFinal.
Any logic added to this middleware will be executed regardless of what happened in the before, view, or after stages, and will be called just before sending the HTTP response.
This approach will allow us to properly manage HTTP response status codes in all scenarios, without relying on the behavior of other middleware in the chain.
We believe this is a clean and effective solution that will improve the maintainability and scalability of our codebase.

LGTM! I think it's a great solution, without break backward-compatibility and keeping the middleware semantics!
Thank you so much!

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

25 of 25 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
770

Relevant Lines:
770

💛  - Coveralls

Can you fix the linter issues, please?

@savsgio Thanks for your fast response!
Happy to hear that you love our solution.
I fixed the linter issues :)
Let me know if it is ok now

Thank you so much! @shakedoron


[nifly] new port

Add port for nifly

Which triplets are supported/not supported? Have you updated the CI baseline?

I have only tested Windows 64 and Linux, but all others should work. I disabled support for UWP as I have no idea if this platform is supported

Does your PR follow the maintainer guide?

Yes

Thanks for the new port!

Sure. Mind explaining why vcpkg_fail_port_install` is not necessary?

Sure. Mind explaining why vcpkg_fail_port_install is not necessary?

The "supports" field now does that:
PS C:\Dev\vcpkg> .\vcpkg.exe install nifly:x64-uwp
Computing installation plan...
Error: nifly[core] is only supported on '!uwp'
PS C:\Dev\vcpkg>


Differentiate task start times

Currently Task start_time is being set when the Task is instantiated from the Server. This can cause unreliable run_time measurements if a Task is currently waiting to be processed on a worker and all workers are occupied with other tasks.
Fix: Have two seperate start_times. One from the server of when the Task was instantiated (server_start_time) and one for when it was started on a worker (worker_start_time) and have run_time calculated from the worker_start_time instead of the server start time.

Duping in favor of #1198


fix: 修复 typescript 中使用找不到声明文件

close CaoMeiYouRen/push-all-in-one#144

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[STORM-3413] Remove JavadocMethod checkstyle rule

Remove JavadocMethod checkstyle rule because it requires tons of Javadocs to be invented on files which have not been touched for years and whose Javadoc can be covered with clean code.

+1, I don't like the useless comments this enforces either.

We can merge this if you create a JIRA issue to track this, and rename the PR and commit message to contain the issue number. We need this so we can track which branches this fix goes to, and so we get this fix in the release notes of the next release.

@srdo Thanks for the hint. Done. Looking forward to do some code cleanup without this.

@krichter722 https://issues.apache.org/jira/browse/STORM-3413 is something else. Maybe there was a mistake copying the issue number?

@srdo Right, I corrected that, thanks.


anonymous procedures/functions in a PL/SQL declare block result in error

Hello,
at the moment I use

Windows 10 Pro version 1703
DBeaver Community Edition version <IP_ADDRESS>903101945
Java version 8 Update 201
DBeaver Office Support

on an

Oracle Database 11g Release <IP_ADDRESS>.0 - 64bit Production
Driver name ojdbc8.jar

having this issue:
Whenever I try to use an anonymous procedure or function in an PL/SQL declare block I get the following error in DBeaver:

Error
occurred during SQL script execution
Ursache:
SQL-Fehler [6550] [65000]: ORA-06550: Zeile 9, Spalte 29:
PLS-00103: Fand das Symbol "end-of-file" als eines der folgenden erwartet wurde:
begin function pragma procedure

My crude translation to English:

Reason:
SQL-Error[6550] [65000]: ORA-06550: row 9, column 29:
PLS-00103: Found the symbol "end-of-file" when expecting one of the following:

When I use the same code with copy&paste in Oracle's sql developer it runs smoothly.
Searching for a solution on the internet I only found issues #445 and #996 and they are listed as related issues now.
They were about the declare block in general and closed, when there was added some support of this block.
So my questions are:

Are anonymous procedures or functions in a declare block supported and I just get it wrong? If not, is it planned to support them in the future?
Is this only working in Enterprise Edition?

Thank you in advance.
best regards
Daniel

Generally PL/SQL blocks parser work. But it some cases it may fail.
Please post an example of non-parseable block.
Workaround: select your SQL code and execute it with ctrl+enter.

Hello serge-rider.
This problem occurs whenever I try to use an anonymous procedure or function. The following code blocks run perfectly well in Oracle's SQL Developer, but raise the given error in DBeaver.
DECLARE
    PROCEDURE my_procedure(message VARCHAR2)
    IS
    BEGIN
        dbms_output.put_line( SYSDATE || ': ' || message);
    END;
BEGIN
    my_procedure('hello world');
END;

DECLARE
    FUNCTION my_function(message VARCHAR2)
    RETURN VARCHAR2
    IS
    BEGIN
        dbms_output.put_line( SYSDATE || ': ' || message);
        RETURN 'done';
    END;
BEGIN
    dbms_output.put_line(my_function('hello world'));
END;

best regards
Daniel

using first example, if I select all code lines, myself then it works,
if I just execute without selecting, it seems, the executed part is only up to the first end; , such as:
DECLARE
PROCEDURE my_procedure(message VARCHAR2)
IS
BEGIN
dbms_output.put_line( SYSDATE || ': ' || message);
END;

Hello neiaberau.
Your idea works well, if there is no issue selecting the lines manually. But I encountered a maybe similar problem with another script, that I use to create some objects.
In the case of an
CREATE TYPE myObj AS OBJECT ...
and afterwards
CREATE TYPE BODY myObj AS ...
I would prefer to run it at once. At the moment I cannot run these CREATEs together, because if I do so, the BODY statement ends up in the object's DECLARATION as well, when I lookup the definition saved to the database. The BODY part is empty: --Empty source. Only selecting and executing them separately does the trick. Control-Enter inside the first statement without selecting always triggers the second one simultaneously. The same happens if I execute the script, even with everything else commented. As if dbeaver is not able to separate the lines correctly.
Again in Oracle's SQL Developer there is no issue, apart from separating the blocks with a '/', but that I had to do with every other script with PL/SQL blocks mixed with create statements as well. I believe someone stated, that were due to the way SQL Developer parses the code.
Of course I do not know, if creating objects might not or even should not be a task you have to do often. Nevertheless do I use these objects for testing purposes only, so I drop them, when the testing is done. Also while debugging I have to run the script multiple times, ...
best regards
Daniel

it is not only SQL developer, most oracle tools use ; for SQL statements as separator, however for code,  an / is needed (procedure, function, package, type)
It seems the parser of dbeaver does not cover this "oracle exception", maybe so far, because:
I see this note in the newest dbeaver version
- PL/SQL blocks parser was improved
I have not checked, what this improved, as I have not installed it yet.

Hello neiaberau.
Thank you again for explaining this to me. In the end it does not matter, if I have to use '/' or can skip it. I am willing to adjust. In general I prefer dbeaver and it's style over SQL Developer. Also the output of queries etc. seems really nice to me. Last but not least, there is much more functionality in dbeaver afaik! (and there is a VIM extension available, even it is more of a punishment for me at the moment. I still have to master most of the basics).
So I would like to switch to dbeaver all the time. Until then I will use both.
The new version might not be a solution since I already use v<IP_ADDRESS>904211926 and dbeaver says, it is the newest.
best regards
Daniel

Would be really good to get full support for PL/SQL block terminators and DECLARE keyword. Can't stand SQLDeveloper's ugly interface, so I gave DBeaver a go. Looks a lot nicer but it's an inconvenience to execute each code block separately.

verified


Add renovate to keep this project up to date 📅 🥦

Might be nice to configure renovate for this project so that we don't have to manually update stuff here :)

This looks awesome 😎 Let's try it out.


Persist chroma db

Description:
I have made changes to the Chroma DB Vector Store Wrapper to accept a persistent directory from client settings.
Issue:
https://github.com/hwchase17/langchain/issues/6938
Dependencies:
None
Tag maintainer: @rlancemartin, @eyurtsev

seems to have combined spacy embeddings as well?

I guess so. my bad. let me correct that.

still has some conflicts...

The conflicts are resolved. Getting linting issues. However, in my space, the checks are passing.  Sorry, am I missing something?

!poetry run black chroma.py spacy_embedding.py --check

All done! ✨ 🍰 ✨

2 files would be left unchanged

Please run "make format"

Thanks . resolved. but there is another blocker. An integration test is failing. But I can see that in _https://github.com/hwchase17/langchain/blob/master/langchain/vectorstores/chroma.py_ the similarity_search_by_vector_with_relevance_scores is indeed available. what else could be causing it?
poetry run mypy .
tests/integration_tests/vectorstores/test_chroma.py:74: error: "Chroma" has no attribute "similarity_search_by_vector_with_relevance_scores"; maybe "_similarity_search_with_relevance_scores"?  [attr-defined]
Found 1 error in 1 file (checked 1288 source files)
make: *** [Makefile:34: lint] Error 1
Error: Process completed with exit code 2.

I also tested it locally , same error.
"""Test Chroma functionality."""
import pytest

from langchain.docstore.document import Document
from langchain.vectorstores import Chroma
from langchain.embeddings import FakeEmbeddings

def test_chroma_with_metadatas_with_scores_using_vector() -> None:
    """Test end to end construction and scored search, using embedding vector."""
    texts = ["foo", "bar", "baz"]
    metadatas = [{"page": str(i)} for i in range(len(texts))]
    embeddings = FakeEmbeddings(size=5)

    docsearch = Chroma.from_texts(
        collection_name="test_collection",
        texts=texts,
        embedding=embeddings,
        metadatas=metadatas,
    )
    embedded_query = embeddings.embed_query("foo")
    output = docsearch.similarity_search_by_vector_with_relevance_scores(
        embedding=embedded_query, k=1
    )
    assert output == [(Document(page_content="foo", metadata={"page": "0"}), 0.0)]

test_chroma_with_metadatas_with_scores_using_vector()

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-12-7062ecfb5130>](https://localhost:8080/#) in <cell line: 1>()
----> 1 test_chroma_with_metadatas_with_scores_using_vector()

[<ipython-input-11-87e2c68a20e2>](https://localhost:8080/#) in test_chroma_with_metadatas_with_scores_using_vector()
     12     )
     13     embedded_query = embeddings.embed_query("foo")
---> 14     output = docsearch.similarity_search_by_vector_with_relevance_scores(
     15         embedding=embedded_query, k=1
     16     )

AttributeError: 'Chroma' object has no attribute 'similarity_search_by_vector_with_relevance_scores'

The conflicts are resolved. Getting linting issues. However, in my space, the checks are passing.  Sorry, am I missing something?

!poetry run black chroma.py spacy_embedding.py --check

All done! ✨ 🍰 ✨

2 files would be left unchanged

Please run "make format"

Thanks . resolved. but there is another blocker. An integration test is failing. But I can see that in _https://github.com/hwchase17/langchain/blob/master/langchain/vectorstores/chroma.py_ the similarity_search_by_vector_with_relevance_scores is indeed available. what else could be causing it?

poetry run mypy .

tests/integration_tests/vectorstores/test_chroma.py:74: error: "Chroma" has no attribute "similarity_search_by_vector_with_relevance_scores"; maybe "_similarity_search_with_relevance_scores"?  [attr-defined]

Found 1 error in 1 file (checked 1288 source files)

make: *** [Makefile:34: lint] Error 1

Error: Process completed with exit code 2.

I also tested it locally , same error.

"""Test Chroma functionality."""

import pytest

from langchain.docstore.document import Document

from langchain.vectorstores import Chroma

from langchain.embeddings import FakeEmbeddings

def test_chroma_with_metadatas_with_scores_using_vector() -> None:

    """Test end to end construction and scored search, using embedding vector."""

    texts = ["foo", "bar", "baz"]

    metadatas = [{"page": str(i)} for i in range(len(texts))]

    embeddings = FakeEmbeddings(size=5)

    docsearch = Chroma.from_texts(

        collection_name="test_collection",

        texts=texts,

        embedding=embeddings,

        metadatas=metadatas,

    )

    embedded_query = embeddings.embed_query("foo")

    output = docsearch.similarity_search_by_vector_with_relevance_scores(

        embedding=embedded_query, k=1

    )

    assert output == [(Document(page_content="foo", metadata={"page": "0"}), 0.0)]

test_chroma_with_metadatas_with_scores_using_vector()

---------------------------------------------------------------------------

AttributeError                            Traceback (most recent call last)

[<ipython-input-12-7062ecfb5130>](https://localhost:8080/#) in <cell line: 1>()

----> 1 test_chroma_with_metadatas_with_scores_using_vector()

[<ipython-input-11-87e2c68a20e2>](https://localhost:8080/#) in test_chroma_with_metadatas_with_scores_using_vector()

     12     )

     13     embedded_query = embeddings.embed_query("foo")

---> 14     output = docsearch.similarity_search_by_vector_with_relevance_scores(

     15         embedding=embedded_query, k=1

     16     )

AttributeError: 'Chroma' object has no attribute 'similarity_search_by_vector_with_relevance_scores'

Did you re-build Langchain?

Can you explain that? I did quite catch that. I used the source code via pip and ran the test module locally to see if it was able to fetch. But weirdly it doesn't seem to.

Can you explain that? I did quite catch it. I used the source code via pip and ran the test module locally to see if it was able to fetch. But weirdly it doesn't seem to.

I'll have a close look today.

@rjarun8 this PR has gotten into a slightly confusing state w/ a large number of commits and apparently unrelated changes that have been pulled in. do you want to simply put up a fresh PR on current master with the precise changes you intent to merge?

@rjarun8 this PR has gotten into a slightly confusing state w/ a large number of commits and apparently unrelated changes that have been pulled in. do you want to simply put up a fresh PR on current master with the precise changes you intent to merge?

Sure @rlancemartin that would be better I guess to evade this confusion created. sorry about that.

@rjarun8 this PR has gotten into a slightly confusing state w/ a large number of commits and apparently unrelated changes that have been pulled in. do you want to simply put up a fresh PR on current master with the precise changes you intent to merge?

Sure @rlancemartin that would be better I guess to evade this confusion created. sorry about that.

Thanks! Np. Sometimes easier just to start fresh :)


Rollbar Changes

What's New?

Late additions that did not make it into the last PR
Log runtime exceptions in the log worker background task.

Coverage remained the same at 91.511% when pulling 5392b5fbc89e82cb4e1554f1719c1dbc046cb01e on RickCarlino:double_send into 984d47762b0c65b23882b469547b5e1c3f3c4746 on FarmBot:staging.


Added new resources.

This PR closes issue #184.
Added new resources for JS and CSS "Hyperplexed"

Sorry for inconvenience!
The code structure has been changed.
Kindly read this:
Important Update


Multi-image correlation modelling inference?

Thank you for the amazing work and releasing such concise code. I had a question about how to do model inference with multi-image inputs. Expanding on your provided inference code, something like this comes to mind:
# We use a human/AI template to organize the context as a multi-turn conversation.
# <image> denotes an image placehold.
prompts = [
'''The following is a conversation between a curious human and AI assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
Human: <image>
Human: <image>
Human: Is the colour of the animal in the first image the same as the second image?
AI: ''']

# The image paths should be placed in the image_list and kept in the same order as in the prompts.
# We support urls, local file paths and base64 string. You can custom the pre-process of images by modifying the mplug_owl.modeling_mplug_owl.ImageProcessor
image_list = ['https://xxx.com/image_1.jpg', 'https://xxx.com/image_2.jpg',]

Could you please confirm if this is the right way to do multi-image inference with the model?
Thanks!

Great, thanks for the response!

Hi, just for noticing that we have corrected the link for downloading the instruction fine-tuned checkpoint.

Thank you for your question. Yes, we do use the same format as yours when testing the cross-image understanding ability of our models. BTW, this is an emergent ability, as we do not use any multi-image data during training. Therefore, we believe that exploring formats that can help models better understand multiple images could be beneficial and worth further investigation. Thank you for your interest in our work.

hi, I want to know if this template can also be modified for in-context learning?


GEOMESA-1221 Docs: fixes for 1.2.3

* Update versions in commons.py.
* Copyediting of some parts of command line tools section.
* Add note about zookeeper timeout.
* Update all tutorials.
* Add note about namespaces to Accumulo quickstart tutorial.
* Add HBase/Avro tutorials.
* Add Kafka 0.9 GeoServer installation instructions.

Signed-off-by: Matthew Zimmerman<EMAIL_ADDRESS>

As usual, we can leave this PR open if there are other small docs issues to be addressed. Before we merge it, however, we would like to put a "freeze" on this PR for about a day before we plan to merge it so that Bob can do a spell-check and read-through.


Calculate hashes

Changes calculaet_roots to return all computed positions along with calculated roots.

Clever design! I guess the Rust builtins for vectors allow for this without much performance hit. I do wonder how the sort & push effects performance but we shouldn't pre-optimize so we can look at that later.

Yeah, I'm testing with a priority queue, so you don't have to sort & push. But I think some basic benchmark is important to make any assertions about performance, so I'm doing that first.
Forced-push 5cceb0c, fixes typo and rebases with main.

Yeah, I'm testing with a priority queue, so you don't have to sort & push. But I think some basic benchmark is important to make any assertions about performance, so I'm doing that first.

You could also just not sort at all by implementing something like what's there in pytreexo.


Redirect Manager Queries

AEM As a Cloud Service: Adobe Experience Manager 2022.10.9398.20221020T071514Z-220900
ACS AEM Commons Version: 5.4.0
We're newly trying to use the Redirect Manager in AEM as a cloud service for some of our existing redirects.
We've found that the redirects work for cases where the "Source Url" is an actual page that exists like "/content/abc/([a-zA-Z]+)/([a-zA-Z]+)/def/ghi"
But in the case of it not being an existing page, the redirect doesn't happen.
Is there a workaround for this? Where we can redirect from a non-existing url to a page?
In addition to the above:

Is there a way to delete multiple redirects at once? It seems like the only way to delete them is by individually going in to edit them and then removing them.
Is there a way to delete a context aware redirect configuration (/conf/example)?

Any help appreciated!

We've found that the redirects work for cases where the "Source Url" is an actual page that exists like "/content/abc/([a-zA-Z]+)/([a-zA-Z]+)/def/ghi"

Redirects are evaluated early and existence of the resource should not matter. I tried your example as is, and it worked for me.
test redirect rule:
/content/abc/([a-zA-Z]+)/([a-zA-Z]+)/def/ghi => /test

curl example:
$ curl -I -u admin:admin "http://localhost:4502/content/abc/ABC/xyz/def/ghi.html?wcmmode=disabled"
HTTP/1.1 302 Found
Location: /test.html?wcmmode=disabled

Note that the source and target paths don't exist on my local instance.

Is there a way to delete multiple redirects at once? It seems like the only way to delete them is by individually going in to edit them and then removing them.

No, if can only delete them one by one in the UI.

Is there a way to delete a context aware redirect configuration (/conf/example)?

You can't do it in the UI, but you can use Sling POST servlet, e.g.
curl -X DELETE -u admin:admin "http://localhost:4502/conf/example/settings/redirects"

Another question - when there are multiple pages of redirects, when a keyword is searched, it filters through only the redirects on the current page. Is there a way to search through all the redirect rules?


Variant listing config is not updated correctly when products are cloned or variants are deleted

Description:
**Environment: **
This bug has been around for a long time. It was partially addressed in this commit: https://github.com/shopware/shopware/commit/c2ed3e9e600bafae63cfe8720820e593226c6f24 However this commit introduced a new bug which resulted in the original products listing config being changed on duplication.
**Steps to reproduce: **
Variant 1:

Configure the storefront presentation to use the main product. Additionally select a variant to preselect on the detail page.
Now delete all variants (likely also works when just deleting the variant selected in the previous step)

Variant 2:

Setup the product like described in variant 1
Now instead of deleting variants, duplicate the entire product

**Expected result: **
Variant 1:
The product should now work like a normal product without variants.
Variant 2:
There should now be a new product with the storefront presentation reset to defaults. It should not affect the original product.
**Actual result: **
Variant 1:
When clicking on the product in the listing, it just shows a 404 page.
This is because the deleted variant is still referenced in the storefront presentation.
Variant 2:
Both the original and the new product have their storefront presentations reset to defaults.

[public] Automated response: This issue is linked to the internal issue https://shopware.atlassian.net/browse/NEXT-37442.
[created from NEXT-37442, comment 484237]


Unknown installer extension

I'm using this action on a self-hosted runner and I'm getting this error
 Checking for cached<EMAIL_ADDRESS>  Found Mambaforge-4.10.3-7-MacOSX-arm64.sh cache at /Users/lilmac/Projects/GH-Runner/actions-runner/_work/_tool/Mambaforge-4.10.3-7-MacOSX-arm64.sh/0.0.0-f5a6f2c854f1c0cd3121b415e839f07755687770b4da85adef0526904c848b83/x64!
Running installer...
Error: Unknown installer extension:

which comes from this bit of code https://github.com/conda-incubator/setup-miniconda/blob/723ab12c1d66bb893c5ac701f8e387f00b24549e/src/installer/index.ts#L79
I'm not sure why the path is getting truncated at the x64 directory, the path in the runner folder is _work/_tool/Mambaforge-4.10.3-7-MacOSX-arm64.sh/0.0.0-f5a6f2c854f1c0cd3121b415e839f07755687770b4da85adef0526904c848b83/x64/Mambaforge-4.10.3-7-MacOSX-arm64.sh
I'm going to test a different arch to see if there is something going on with that, this is on an M1 mac so I had to do some hacks to get the self-hosted runner to work on it.

Quick update, it seems  to be a caching issue, the x86_64 installer worked once, then I got this error: Checking for cached<EMAIL_ADDRESS>  Found Mambaforge-4.10.3-7-MacOSX-x86_64.sh cache at /Users/lilmac/Projects/GH-Runner/actions-runner/_work/_tool/Mambaforge-4.10.3-7-MacOSX-x86_64.sh/0.0.0-0486e0866d6eb6d2e6b5c5aa1ff984405eedf3f82e86caf04b3eaec2d0a85e94/x64!
But if I cleared the cache, then it worked, so it seems like caching the installer is broken for me

I'm having the same issue


Unable to Connect to Azure SQL Server using ODBC Driver 18 for SQL Server with a "@" in my user name

I am encountering an issue when attempting to connect to my Azure SQL Server database using pyodbc and the ODBC Driver 18 for SQL Server on Ubuntu. Below are the details:
Environment
OS: Ubuntu
ODBC Driver: ODBC Driver 18 for SQL Server
pyodbc Version:  5.2.0
Python Version: Python 3.12.3
Connection Details:
Server: martins.database.windows.net
Database: Stage-MartinsPoint
Username: insightin-martinpoint@martins-point
Password: matins123
Issue
I am getting the error message
Connection failed:  ('42000', "[42000] [Microsoft][ODBC Driver 18 for SQL Server][SQL Server]Cannot open server 'martins-point' requested by the login.
I have tried to double cote like "insightin-martinpoint@martins-point" and also "insightin-martinpoint//@martins-point"
is there any way to fix this?

Is this a sql login or a microsoft "entra" account?

This is a SQL login


NEW: Adds repo code of conduct

Please make sure PR titles describe what you're adding/modifying. It makes it much easier to understand the commit history. Thanks!


Fix hooks-faq.md, unnecessary dependency in example?

If I understand correctly the intended API of the useEventCallback custom hook, the dependencies array should contain all the dependencies of the fn callback itself (as in the standard useCallback hook).
Thus, there is no need to additionally specify the fn callback itself in the dependencies of this effect -- you need to update the link to fn in the ref only when something from the dependencies array changes.
Moreover, now, due to the fact that fn is specified in the effect dependencies, this effect is called after every render of the Form -- since fn, as an arrow function literal, is created on every render.

Is there any other action I need to take to move this pull request forward (merge or close)?


Fix tests

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@7e21a22). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master      #14   +/-   ##
=========================================
  Coverage          ?   56.56%
=========================================
  Files             ?        8
  Lines             ?      221
  Branches          ?        0
=========================================
  Hits              ?      125
  Misses            ?       96
  Partials          ?        0

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 7e21a22...95c0b1b. Read the comment docs.


Adds generic block record readers

This resurrects @ianoc's branch that adds generic block record reader, which uses the provided BinaryConverter to deserialize data.
Also moved some common code to a new LzoBlockRecordReader class.
Will create scalding PR to add LzoGenericScheme once this is merged.

Based on offline conversation with @rangadi and @ianoc, dropping the new generic class in favor of moving this logic to the existing LzoBinaryBlockRecordReader. This class now 1) skips null records, 2) deserializes the read ByteString instead of deferring to the underlying BinaryBlockReader.

Thanks Ruban, the patch is much smaller now.
You need to update ThriftConverter and ProtobufConverter for new contract: null implies skip, any decoding errors should result in a exception.
You also need to update B64 reader to comply to new contract.

@rangadi Thanks for the review. Addressed most of your comments.

mostly looks good. added a few more comments. please look into the travis ci failures.

Addressed further comments and some build fixes.

:+1:  LGTM. Thanks Ruban.

Before we merge have you run a sanity job with some data at scale just to make sure it works on hadoop cluster?

@laurentgo addressed most of your comments, thanks.
@ianoc ran a day's worth of client event logs and a couple of other sources including protobuf ones as a sanity check.

@rubanm lgtm


Recursive calls raise errors with @jitclass (but not @jit)

Feature request

Reporting a bug

[*] I am using the latest released version of Numba (most recent is visible in
the change log (https://github.com/numba/numba/blob/master/CHANGE_LOG). numba-0.38.1

[*] I have included below a minimal working reproducer (if you are unsure how
to write one see http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports).

@numba.jit
def x(i):
    if i>0:
        x(i-1)

@numba.jitclass(())
class C(object):
    def __init__(self):
        pass

    def x(self, i):
        if i>0:
            self.x(i-1)
x(6) # OK
C().x(6)  # Fail

Since recursive calls work for @jit functions, I'd think they'd work for @jitclass methods. Instead they raise:
  compiler re-entrant to the same function signature

Wondering if there's any chance for this to be resolved?
 I need this capability and it looks like this issue is not close to resolution.

Bump.

Any updates? This seems like a pretty important feature to not be supported


Not working after install

Hi ive installed your custom node via Manager loaded your workflow, and all i get is the following error when trying to use it:

I tried it on a fresh Comfy install and I see no issues.
It must be something in your environment. Try to:

load default workflow.
remove the node set,
restart comfy and refresh the comfy tab.
install the node set.
restart comfy and refresh the comfy tab.
drop in the example workflow.

If it doesn't help, check if console log for conflicts or any additional hints.

Ok thanks... did a clean Comfy & venv install all ok now....