Clarification on "state_prep" usage convention

Hi.  I'm working through your tutorial on using Forest (thanks for offering it out): http://pyquil.readthedocs.io/en/latest/getting_started.html#installation-and-getting-started
I wanted to clarify a usage convention.  In the section on the Quantum Fourier Transform, the state is prepared for use with a 3-qubit QFT function.  However, the state is only initialized for qubit-0 before being passed to the execution section:
wavf, _ = qvm.wavefunction(state_prep + qft3(0, 1, 2))
print(wavf.amplitudes)
However, in the section just above this, there is a comment:
"We can verify that this works by computing its wavefunction. However, we need to add some “dummy” qubits, because otherwise wavefunction would return a two-element vector."
I might be misunderstanding the meaning in the documentation, but I'm not too clear on when you are required to pass in the fully defined state-vector (all states defined, even if you need to use dummy identity operators etc.) and when just a single one will work, even though you are applying it to a 3-qubit function for example as in this case.
Thanks for any clarification.  Once again, thanks for open-sourcing out this great set of tools and capabilities.
Thanks.

Hi @td2014, The dummy qubits are required only for visualization of the 3-qubit register.  Without adding the dummy variables the following pyquil program
prog = Program().inst(X(0))
wf, _ = qvm.wavefunction(prog)
print wf

would print 1.0 + 0j|1> instead of 1.0 + 0j|001>.  The reason for this is that the QVM aggressively tries to minimize the number of qubits required to execute a Quil program.   For example, the following code would also return a 1.0 +0j|1>
prog = Program().inst(X(100))
wf, _ = qvm.wavefunction(prog)
print wf

What happened was that QVM relabeled qubit 100 to qubit zero.  QVM will always try to use the minimal resources required to simulate the behavior represented by the Quil program.  For example, running
prog = Program().inst([X(100), X(101)])
wf, _ = qvm.wavefunction(prog)
print wf

returns 1.0 +0j|11>.  By padding the original program with Identity on qubit 2 and 1 we ensure the QVM allocates a wavefunction for 3-qubits.  We only do this to "visualize" the 3-qubit register. Mathematically, X(0) on a 3-qubit register is |001> but the QVM doesn't implicitly know you're operating on a 3-qubit register.


neetcode-trees-easy

[ ] Nix Dev Flakes

[x] Python
[x] C/C++
[x] Rust
[ ] Haskell
[x] Prolog

[x] dataset
[ ] evaluation script

[x] Python
[x] C
[x] C++
[x] Rust
[ ] Haskell
[ ] Prolog

[ ] GA workflow to run testing on CI

[x] Python
[x] C
[x] C++
[x] Rust
[ ] Haskell
[ ] Prolog

[ ] Neetcode roadmap implementations (easy problems)

[x] Python
[x] C
[x] C++
[x] Rust
[ ] Haskell
[ ] Prolog

Haskell To-Do:

[ ] Simple Cabal application project, no tests/ layout needed
[ ] JSON Parser for every Test Case type
[ ] Test Case Generation from parsed input
[ ] Eq implementation for custom Tree datatype ?


[bounty] move search page to store

/bounty 100
as nextjs app, everything should work like before

doing this now


Polynomial, twiddles cuda

Polynomial & twiddle generation cuda diff fuzzer
Description
Add a polynomial cuda fuzzer. Must be merged after #495
Type of change
New test
Checklist

[ ] Linked to Github Issue
[ ] Unit tests added
[ ] This change requires new documentation.

[ ] Documentation has been added/updated.

[ ] This change is an Optimization

[ ] Benchmarks added/run

Codecov Report

Merging #496 (76fcc2f) into fuzzing-workspaces (8d5f830) will not change coverage.
The diff coverage is n/a.

@@                 Coverage Diff                 @@
##           fuzzing-workspaces     #496   +/-   ##
===================================================
  Coverage               94.37%   94.37%
===================================================
  Files                      65       65
  Lines                    8715     8715
===================================================
  Hits                     8225     8225
  Misses                    490      490

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


[Guided Setup Stage 2] Create CompleteGuidedSetup API command (Phase 1)

Part of the "wave-collect – Build Stage 2 of Guided Setup" project
Main issue: https://github.com/Expensify/Expensify/issues/356685
Doc section: https://docs.google.com/document/d/10bhCv6XtzzqEZQ9tzxFwAz4lowgjOhsFqz13BMq6Iu4/edit#heading=h.7xvrot9nsoc5
Project: https://github.com/orgs/Expensify/projects/129
Feature Description
Create a new API command CompleteGuidedSetup that will receive the tasks and associated messages from the client, and save them. It will also update the introSelected NVP.
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01232a523ddcb5e65c
Upwork Job ID:<PHONE_NUMBER>863960064
Last Price Increase: 2024-03-21

This is all backend work and will be taken care of internally, no need for a C+ here.

Looks like this one is done. With all backend PRs, does it need to remain open? CC: @NikkiWines as you might have some context. :)

Oops, sorry @trjExpensify, missed your ping. Yes, the CompleteGuidedSetup command logic has been merged so this can be closed.


Animatediff has a relatively large negative impact on image generation.

The animatediff has a relatively large negative impact on image generation. The first one is with animatediff and the second one is without animatediff.

It feels like Animatediff should find a way to find layers related to motion poses without affecting the style, character.


Clear out pattern matching and error message of executeCodeActionByName

It seems the message had become obsolete, the unique error case is the empty list.
I've added the list ot actions candidates to be run.

The cabal build in ci is failing due to #1309


Wrong suburb

9C5M9MRX+JJ should not have "Northside" in the address - none of this area is the Northside as it is not a suburb or Townland in any of Dublin. The address on the North Road suburb is "Finglas East, Dublin 11".

Closing as duplicate of #381.

Nothing has been done to fix this issue. my address has now been incorrectly copied to every website when i enter my Eircode!! it comes up that i live in "Northside". what are ye lads doing? this is an absolute joke. you have no right to incorrectly put in my personal address on every website possible. why does every other area in dublin have the correct suburb! i will take you to court if you dont fix this today.

Nothing has been done to fix this issue.ive raised this in google maps numerous times and its ignored. my address has now been incorrectly copied to every website when i enter my Eircode!! it comes up that i live in "Northside". what are ye lads doing? this is an absolute joke. you have no right to incorrectly put in my personal address on every website possible. why does every other area in dublin have the correct suburb! i will take you to court if you dont fix this today.

Nothing has been done to fix this issue.ive raised this in google maps numerous times and its ignored. my address has now been incorrectly copied to every website when i enter my Eircode D11Y1E2!! it comes up that i live in "Northside". what are ye lads doing? this is an absolute joke. you have no right to incorrectly put in my personal address on every website possible. why does every other area in dublin have the correct suburb! i will take you to court if you dont fix this today.


The score card should indicate when checks don't support a particular language/ecosystem

The scorecard can be populated for any open source project without any work or interaction from maintainers.

Maintainers must be provided with a mechanism to correct any automated scorecard findings they feel were made in error, provide "hints" for anything we can't detect automatically, and even dispute the applicability of a given scorecard finding for that repository.

There are some checks, like fuzzing, that are very specific to particular languages.
I think any score card should make clear when a particular check doesn't natively support a language or ecosystem.
As someone who is a consumer, and a maintainer, it would be good to know that a project didn't really score zero on something. It's just that the check doesn't support that language/ecosystem vs the maintainer has gone to the effort of somehow flagging that they do something the automated checks can't pick up.

Thanks for the report! I think this is essentially what I was trying to capture with the "Confidence" field in the result - if we can't actually tell or if a check doesn't apply we return a low confidence score. That should be used to indicate the result should not be relied on.
Does that work, or do you think we need more info in the result?

Are you only concerned about fuzzing or can other checks apply to only specific languages ?
Note that fuzzing stuff is expanding to more languages, e.g. C/C++, Rust, Swift, Golang, and Python (coming soonish with https://github.com/google/atheris release)

Not fuzzing specifically. It is just a check I was using as an example.
The confidence metric probably does cover this. I just think it should be obvious that the project got a zero for something because the checks don't support the language vs they do support the language and it failed the check.

Would this issue align with the Policy per Ecosystem work?
If not, this feature may not align with the current project focus. Please advise within the next 7 days to the contrary to determine whether this issue will be closed.

Would this issue align with the Policy per Ecosystem work?

Seems like a good fit to me


Add support for WebIRC (closes #33)

See https://kiwiirc.com/docs/webirc.

Codecov Report

Merging #34 into master will decrease coverage by 0.04%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master      #34      +/-   ##
==========================================
- Coverage   56.05%   56.01%   -0.05%
==========================================
  Files          13       13
  Lines        2335     2337       +2
==========================================
  Hits         1309     1309
- Misses        919      920       +1
- Partials      107      108       +1

Impacted Files
Coverage Δ

client.go
70.81% <ø> (ø)
:arrow_up:

conn.go
58.53% <0%> (-0.48%)
:arrow_down:

Continue to review full report at Codecov.

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


2D Gaussian MLE state 3 problem

Hello, thank you for this awesome tool.
We are running into a problem fitting to a 2D Gaussian with the MLE method in Matlab. The test data you provided runs correctly for 2D Gaussian MLE, and we have been successfully running the code on our own data doing 2D Gaussian fitting with the least-squares method, but whenever we run our own data with 2D Gaussian MLE a problem occurs. What happens is that all of the states outputted are state 3, which as far as I can tell means that the function is reaching a negative value. This is perplexing as we have carefully verified that we are not sending any negative values in the data or the parameters.
If you load the attached .mat file (in the .zip bc of GitHub) and run the following function call it should reproduce this problem. And as suggested earlier, it works correctly for least-squares.
[parameters, states, chi_squares,~,~] = gpufit(dataset, [],model_id, initial_parameters, tolerance, max_n_iterations, params_to_fit, estimator_id, []);
This seems like a bug in the MLE code to me, but it could be that we're doing something wrong. Regardless, I'd greatly appreciate any help you can provide.
Thank you very much,
github_question.zip

This shouldn't happen - we will have a look.

Thank you for the well prepared data for your test case. It was easy for me to reproduce the described behavior. Using the LSE method Gpufit outputs 0 states, but even so, the output parameters show, that the fitting process didn't run correctly. Your data is very noisy, and your initial parameters, especially the initial values for the amplitudes, don't fit to your data. Setting
initial_parameters(1,:) = max(dataset) - min(dataset);
initial_parameters(5,:) = min(dataset);
leads to much better results for both estimators.

Excellent thanks this did indeed solve the problem


Host macros

Hello,
Is there some interface for creating macros on the the host entity? I.e. the macros parameter on the host.create API call.
Best regards,
Micke

Hi,
For creating hostMacros by using api, is necessary the hostId, so you must create at first the host.
I prefer do not implement a method for creating a host with a hostMacro as parameter because it means that the HostService should know the HostMacro entity and the HostService purpose would be changed.
But it is OpenSource, feel free for doing your customizations.
Best regards,
Henrique

Ok, thanks.
A two step process is ok with me. Now I've found the HostMacroService which does that. My problem was that before I found it I didn't have any process at all. I was also looking a bit in the wrong direction since the Zabbix API is called usermacro.
Best regards,
Micke

I have created classes following the zabbix documentation schema, but I think it would be better to separate the classes to be more intelligible, I will do that later.
Best regards,
Henrique


test(carousel): adds test to increase coverage

Closes #6261
This PR adds more test coverage
How did you test and verify your work?
Running local test scripts

@anamikaanu96 Will be adding a few more tests,thanks

@anamikaanu96 I realized that this is the component that I couldn't get the other tests to work. I spoke with @matthewgallo about this issue and i think the code coverage for this component is good enough. So we can merge this PR as is and add the 2% coverage another time. Thanks!


Feat implement generate bitly url python

shorten long url with python cloud function
#https://github.com/appwrite/appwrite/issues/1903
Results

@christyjacob4 please double-check python, you are experienced 😇
I am not sure about printing error 🤔 Will that put it into stderr instead of stdout?

@Meldiron
@PineappleIOnic
Hello guys, i realized this PR did not have a hacktoberfest-accepted label 🥺

hi
@Meldiron
@PineappleIOnic
Hello guys, i realized this PR did not have a hacktoberfest-accepted label


Update comments

@mastermike501 - The dotnet repo is read-only.  It is a projection of the individual product repos that make up the .NET Product.  This is documented in the Readme. This PR will need to be opened up against the dotnet/runtime repo.

@MichaelSimons ah I see!


Add selfhst icons as an icon source

Description
I think it would be nice to also have the option to use the icons from selfhst located here: https://github.com/selfhst/icons?tab=readme-ov-file#selfhst-dashboard-icons
I always like having more options and just wanted to get this on your radar. Very low priority!
Priority
Low (Nice-to-have)

Sorry, just saw another feature request for the same thing. I did a search before I posted, but still failed--whoops! closing.

Just responding here for further reference.
It is already included for homarr V1, a rewrite that is in alpha and available for testing.
Further info about it can be found on our discord server.

Oh cool! Good to know, thanks.


Extra indentations on empty lines

So, I use the extension 'Indent-Rainbow' and to me it reveals that the formatter is generating unnecessary indentations.
I checked against powershell and python and both their formatters seem to scrub empty lines.
Autohotkey:

Format on save:

Powershell:

Thanks feedback, update to version 2.4.16 to fix.


Cline's Code Modification Oversight and Correction

Which API Provider are you using?
Anthropic
Which Model are you using?
Claude 3.5 Sonnet
What happened?
Every time Cline suggests a change in one of the files, instead of retaining the functional part of the code, it adds a comment like // ... (keep all interfaces and constants), or {/* ... (keep the rest of the JSX) */} and removes these sections of code. However, after saving the changes, it then says, "I apologize for the oversight. It seems that we've accidentally removed some important parts of the RegistryEntries component. Let's fix these issues by..."

Steps to reproduce

Relevant API REQUEST output
'use client';

import { useState, useEffect } from 'react';
import { collection, addDoc, updateDoc, deleteDoc, doc, getDocs, getDoc, query, where, orderBy, limit, startAfter } from 'firebase/firestore';
import { ref, uploadBytes, getDownloadURL } from 'firebase/storage';
import { db, storage } from '../lib/firebase';
import { useToast } from './ToastProvider';
import LoadingIndicator from './LoadingIndicator';
import ConfirmDialog from './ConfirmDialog';

// ... (keep all interfaces and constants)

export default function RegistryEntries({ registryId, onError }: RegistryEntriesProps) {
  // ... (keep all state variables)

  useEffect(() => {
    console.log('RegistryEntries mounted');
    console.log('registryId:', registryId);
    fetchRegistry();
    return () => {
      console.log('RegistryEntries unmounted');
    };
  }, [registryId]);

  useEffect(() => {
    if (registry) {
      console.log('Fetching entries...');
      fetchEntries();
    }
  }, [registry, searchTerm, sortField, sortOrder]);

  const fetchRegistry = async () => {
    try {
      console.log('Fetching registry...');
      const registryDoc = await getDoc(doc(db, 'registries', registryId));
      if (registryDoc.exists()) {
        const registryData = registryDoc.data() as Registry;
        console.log('Registry data:', registryData);
        setRegistry(registryData);
      } else {
        console.log('Registry not found');
        showToast("Registry not found", "error");
        onError(new Error("Registry not found"));
      }
    } catch (err) {
      console.error("Error fetching registry:", err);
      showToast("Failed to fetch registry", "error");
      onError(err as Error);
    }
  };

  const fetchEntries = async () => {
    if (!registry) return;
    setLoading(true);
    try {
      console.log('Fetching entries...');
      let entriesQuery = query(collection(db, `registries/${registryId}/entries`), limit(ENTRIES_PER_PAGE));

      if (searchTerm) {
        const searchField = registry.fields[0].id;
        entriesQuery = query(entriesQuery, where(searchField, '>=', searchTerm), where(searchField, '<=', searchTerm + '\uf8ff'));
      }

      if (sortField) {
        entriesQuery = query(entriesQuery, orderBy(sortField, sortOrder));
      }

      const entriesSnapshot = await getDocs(entriesQuery);
      const entriesList = entriesSnapshot.docs.map(doc => ({
        id: doc.id,
        ...doc.data()
      } as Entry));
      console.log('Entries fetched:', entriesList);
      setEntries(entriesList);
      setLastVisible(entriesSnapshot.docs[entriesSnapshot.docs.length - 1]);
    } catch (err) {
      console.error("Error fetching entries:", err);
      showToast("Failed to fetch entries", "error");
      onError(err as Error);
    } finally {
      setLoading(false);
    }
  };

  // ... (keep all other functions)

Additional context
No response

Having this too

I am having this issue, too. It loops itself until the Claude daily limit is met.
It tries to import some functions that don't exist --> Apologize for the oversight --> Remove it --> Apologize for the oversight --> Import those that don't exist again.

I found out the issue is not on cline. The LLDB causes it.


Add initial versions of peep animation objects

This is a supporting PR to https://github.com/OpenRCT2/OpenRCT2/pull/23328. The objects proposed in this PR were dumped using a Python script.
To do:

[x] Order string table by language/key
[x] Correct image table to account for rotations
[x] Add inline image sprite ids
[x] Add legacy positions to animation groups
[x] Remove legacy entertainerCostumes array from scenery groups
[x] Entertainers: drop unused eatFood animation
[x] Deduplicate guest and security animations (inherit from first group?)
[x] Format animation sequence in one line?? -> not supported by our formatter

I'd prefer this PR to be squash merged into one commit.

I noticed that the RCT1 source games were missing from the objects when objects shared between both RCT1 & RCT2 define RCT2 as the primary source game with whatever RCT1 pack they originated in as a second source game. From some research i did these should be the RCT1 source games for all of the peep animation objects.
RCT1
Guest
Handyman
Mechanic
Security Guard
Entertainer Elephant
Entertainer Panda
Entertainer Tiger
RCT1AA
Entertainer Roman
Entertainer Gorilla
RCT1LL
Entertainer Astronaut
Entertainer Knight
Entertainer Snowman
Anything not listed here is RCT2 only (eg: pirate costume).
These should be correct from the research i did, the RCT1 base game only has the base three costumes when i checked the RCT1 demo in a scenario with the roman theming available, the roman & gorilla entertainers are after the standard three in https://github.com/OpenRCT2/OpenRCT2/blob/develop/src/openrct2/rct1/Tables.cpp with the gorilla costume appearing in the RCT1AA DLC scenario PC Player, and the latter ones after it are all from scenery groups that originated in RCT1LL

Good idea. I'll amend my script and redump.

They're in the wrong order as the first entry is for the primary source game, it should be like this:
    "sourceGame": [
        "rct2",
        "rct1ll"
    ],

@ZeeMaji Thanks, I had no idea. I've changed the order to what you suggested.


Only occlusion layer 0 seems to be deleted at TileMap cleanup

Godot version
4.1.3
System information
Linux (Ubuntu 22.04)
Issue description
When using multiple occlusion layers in TileMap, it seems that upon destruction only the occlusion layer 0 is deleted, the others aren't.
Multiple layers for tilemap:

I was not able to find any workaround for fixing this issue. (I'm new in godot or any render-related programming.)
Side-note:
Reason for multiple occlusion layers:
https://ask.godotengine.org/50118/how-do-you-use-multiple-polygons-for-occlusion-with-autotile
I needed multiple occlusion polygons, but because only one polygon is supported per tile per occlusion layer, I decided to create more layers, to have the same effect like multiple polygons.
Steps to reproduce

Create a TileMap with a TileSet with more than one occlusion layers

Instantiate a scene with the TileMap, with some terrains with the multiple occlusion layers
This works fine

Free the previously generated TileMap
Create the scene again - with a different terrain

Minimal reproduction project
tilemap-bug-mwe.zip

With v4.2-rc1 and v4.2-stable this issue is no more reproducible.


Remove bintray

See:
https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/

Done with #1982


Integration of TTS with ElevenLabs

ElevenLabs integration

I would leave the implementation consistent with the other one for now, and mention our opinion in the description.
I believe all the other comments have been addressed, please approve if it is fine


Can we support the upgrade of operating system patches

Can we support the upgrade of operating system patches

/kind future

/kind feature

No OS upgrade support.


feat: support passing in legacy auth tokens and v1 auth tokens

we are adding support for new, programmatically generated auth tokens. These tokens will be base64 encoded json strings of the format
{ "api_key": "string", "endpoint": "string" }

This commit adds logic within our token parser to try and parse these new tokens, and fallback to our older legacy token parsing logic. I have renamed everything jwt to auth, since we are no longer only dealing with jwt's. Since we aren't only dealing with jwt's anymore, decodeAuthToken now returns a set interface, instead of the claims within the jwt. This change should be fully backwards compatible with previous versions of our sdk.
closes https://github.com/momentohq/client-sdk-nodejs/issues/337

@pgautier404 whenever you are back to work would you mind taking a look at this?

Looks great to me apart from the one test description I commented on.


wasm: Add support for environment variables injection

Signed-off-by: Takeshi Yoneda<EMAIL_ADDRESS>Commit Message: wasm: Add support for environment variables injection
Additional Description: wasm: Add support for environment variables injection to Wasm VMs. Envoy looks for specified env keys in the host, and if found, then inject the key-value(s) to the Wasm VMs. This is the counterpart of  https://github.com/proxy-wasm/proxy-wasm-cpp-host/pull/126, and resolves https://github.com/envoyproxy/envoy/issues/14958.
Risk Level: low
Testing: unittest
Release Notes:
[Optional Fixes #Issue] resolves https://github.com/envoyproxy/envoy/issues/14958

@PiotrSikora can you take a pass on this from both design and implementation angle? Thanks.


gen_mmu_x86: remove unused function

Fixes #13096
Signed-off-by: Andrew Boie<EMAIL_ADDRESS>

Codecov Report

Merging #13106 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #13106   +/-   ##
=======================================
  Coverage   48.62%   48.62%
=======================================
  Files         313      313
  Lines       46484    46484
  Branches    10728    10728
=======================================
  Hits        22604    22604
  Misses      19413    19413
  Partials     4467     4467

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 da44946...245e90e. Read the comment docs.


Add stop-words for GTD

Awesome. Thanks for the PR! Any reason by you chose to use .name and then convert it to uppercase? Just take the originalName instead of name and it should be uppercase by default.

compare with uppercase make it work correct, even logseq.app change the originalName's output

Looks good. Just add DOING, etc to the list and we should be good to go.

Hi,
I have similar functionality available in my PR #6
Would you be open to working with that to get the default list correct? I have made it a configuration option, so the user can add their own list of stop words.
The default configuration is found at https://github.com/robotii/logseq-automatic-linker/blob/feature/link-as-tags/index.ts#L50

Thank you for your contribution, I have however chosen to merge @robbotii's implementation as that was a bit more robust and customizable. Thank you nonetheless!


feat: 圈选数据单元格如果选中了表头 复制时带上表头的数据

🖋 Description
用户选中表格数据时，如果也选中了表头，希望表头的数据也被复制下来
🏞 What problem does this feature solve

想问下对于这种没展示全的行头 ，圈选复制，发现复制出来的结果也是带省略号的，这个有办法解决嘛

查看官网 带表头复制 章节
const s2Options = {
  interaction: {
    enableCopy: true,
+   copyWithHeader: true,
  }
}

想问下对于这种没展示全的行头 ，圈选复制，发现复制出来的结果也是带省略号的，这个有办法解决嘛

这是一个 bug, 该PR 已修复.

:tada: This issue has been resolved in version @antv/s2-v1.53.0-alpha.1 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This issue has been resolved in version @antv/s2-react-v1.44.3-alpha.1 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This issue has been resolved in version @antv/s2-v1.52.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This issue has been resolved in version @antv/s2-react-v1.44.3 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Doubt in the deletion.

def delete_example():
first_leaf = Node(True)
first_leaf.keys = [1, 3,4]
second_leaf = Node(True)
second_leaf.keys = [7, 8, 14]

third_leaf = Node(True)
third_leaf.keys = [16, 17, 19]

fourth_leaf = Node(True)
fourth_leaf.keys = [26, 27, 28]

fifth_leaf = Node(True)
fifth_leaf.keys = [30,35]

sixth_leaf = Node(True)
sixth_leaf.keys = [42, 43]

seventh_leaf = Node(True)
seventh_leaf.keys = [51, 52,53]

eighth_leaf = Node(True)
eighth_leaf.keys = [65,67,68]

root_left_child = Node()
root_left_child.keys = [5,15,20]
root_left_child.children.append(first_leaf)
root_left_child.children.append(second_leaf)
root_left_child.children.append(third_leaf)
root_left_child.children.append(fourth_leaf)

root_right_child = Node()
root_right_child.keys = [40, 50,60]
root_right_child.children.append(fifth_leaf)
root_right_child.children.append(sixth_leaf)
root_right_child.children.append(seventh_leaf)
root_right_child.children.append(eighth_leaf)

root = Node()
root.keys = [29]
root.children.append(root_left_child)
root.children.append(root_right_child)

B = BTree(2)
B.root = root
print('\n--- Original B-Tree ---\n')
B.print_tree(B.root)

print('\n--- Case 1: DELETED 29 ---\n')
B.delete(B.root, 29)
B.print_tree(B.root)

if we use this delete example function when i try to delete the root it has none on level 0 and i am confused.
also during the line 142 and 147 , we should have individual calls to the  delete predecessor , we should have a call at index n+1.
also in case in delete predecessor if the n th children doesnt have t keys then we merge but what if the n+1 th child has 2t-1 keys then , i am confused what will happen..
IF you could please help me resolve my doubt...
also  i am confused  if the delete_predecessor call at 145 should be a part of return statement.

class NODE:
def init(self, leaf=False):
self.keys = []
self.children = []
self.leaf = leaf
class BTREE:
def init(self, t):
self.root = NODE(True)
# branching factor
self.t = t
def search(self, key, node=None):
    node = self.root if node is None else node

    it = 0
    # iterate till you find a key greater than the key:
    while it < len(node.keys) and key > node.keys[it]:
        it += 1
    # found the key:
    if it < len(node.keys) and key == node.keys[it]:
        return node, it
    # searched till the leaf node:
    if node.leaf:
        return None
    # call for the children to search:
    else:
        return self.search(key.node.children[it])

def split_child(self, parent_node, child_index):
    t = self.t

    # we know that the i th child of the parent node is full
    child_node = parent_node.children[child_index]

    # create a new node that will now act as a sibling to the current child
    sibling = NODE(child_node.leaf)
    # need to point to this children by the parent node.
    parent_node.children.insert((child_index + 1), sibling)

    # managing the values 0-(t-1) in child and t-(2t-1) in sibling
    # also the children if the child is not leaf , the median value of t will be put in the parent
    parent_node.keys.insert(child_index, child_node.keys[t - 1])
    sibling.keys = child_node.keys[t: ((2 * t) - 1)]
    child_node.keys = child_node.keys[0:t - 1]

    if not child_node.leaf:
        sibling.children = child_node.children[t:((2 * t) - 1)]
        child_node.children = child_node.children[0:t]

def insert_non_full(self, current_node, key):
    t = self.t
    it = len(current_node.keys) - 1

    if current_node.leaf:
        # find the index where we will put the key.
        current_node.append(None)  # this will help in shifting.
        while it >= 0 and key < current_node.keys[it]:
            current_node.keys[it + 1] = current_node.keys[it]
            it -= 1
        current_node.keys[it + 1] = key

    else:
        while it >= 0 and key < current_node.keys[it]:
            it -= 1
        it += 1
        # we need to insert the key in the it+1 child of the current node.

        if len(current_node.children[it].keys) == 2 * t - 1:
            self.split_child(current_node, it)

            # after the split the it index will have the median element from the children
            # thus we need to check if the current value is less than or greater than the key

            if current_node.keys[it] < key:
                it += 1
        self.insert_non_full(current_node.children[it], key)

def insert(self, key):
    t = self.t
    root = self.root

    if len(root.keys) == (2 * t) - 1:
        new_root = NODE()
        self.root = new_root
        new_root.children.insert(0, root)
        self.split_child(new_root, 0)
        self.insert_non_full(new_root, key)
    else:
        self.insert_non_full(root, key)

def delete(self, current_node, key):
    if current_node is None:
        current_node = self.root

    t = self.t
    it = 0

    # case 1: leaf case when leaf has more than t keys.
    while it < len(current_node.keys) and key > current_node.keys[it]:
        it += 1

    if current_node.leaf:
        if it < len(current_node.keys) and current_node.keys[it] == key:
            current_node.keys.pop(it)
        return

    # case 2: if the internal node has the key , here we need to check how the children of this
    # internal node are affected by the changes caused by deletion in the node.
    if it < len(current_node.keys) and current_node.keys[it] == key:
        return self.delete_internal_node(current_node, key, it)
    # case 3: if the children has the key and that child has more than t keys.
    # then you can easily delete recursive from the child.
    elif len(current_node.children[it].keys) >= t:
        self.delete(current_node.children[it], key)

    # case4: when the key is in this child subtree but the child doesn't have more than t keys.
    # here we need to check that this child's children are disturbed and may need balancing.
    # also the case when the leaf where the key may lie has not enough keys.
    else:
        # we make the child eligible for deletion propagation by making it have enough keys.

        self.make_eligible(current_node, it)
        if it != len(current_node.keys):
            self.delete(current_node.children[it], key)
        else:
            self.delete(current_node.children[it - 1], key)

def delete_internal_node(self, current_node, key, it):
    t = self.t

    if current_node.leaf:
        if current_node.keys[it] == key:
            current_node.keys.pop(it)
        return

    if len(current_node.children[it].keys) >= t:  # if this child has enough keys.
        current_node.keys[it] = self.delete_predecessor(current_node.children[it])
        return
    elif len(current_node.children[it + 1].keys) >= t:  # if the next child has enough keys.
        current_node.keys[it] = self.delete_successor(current_node.children[it + 1])
        return
    else:  # the case when both the children don't have enough keys.
        self.delete_merge(current_node, it, it + 1)
        # now propagate the deletion to the merged child.
        self.delete_internal_node(current_node.children[it], key, t - 1)  # t-1 is the index where the key will lie.

def delete_predecessor(self, node):
    if node.leaf:
        return node.keys.pop()  # return the biggest key in the node.

    # now comes the propagation , if this is not a leaf then we need to
    # propagate the predecessor to now children of this node.

    # copy the last key of the leaf of this subtree and call delete for this key to propagate delete.

    current_node = node
    while not current_node.leaf:
        current_node = current_node.children[-1]
    last_key = current_node.keys[-1]
    self.delete(node.children[-1], last_key)
    return last_key

def delete_successor(self, node):

    if node.leaf:
        return node.keys.pop(0)  # return the smallest key in the node.

    # copy the last key of the leaf of this subtree and call delete for this key to propagate delete.

    current_node = node
    while not current_node.leaf:
        current_node = current_node.children[0]
    first_key = current_node.keys[0]
    self.delete(node.children[0], first_key)
    return first_key

def delete_merge(self, current_node, left_child_index, right_child_index):
    # merge the two children and the key at left child index of the parent node
    # to the t-1 th index and copy all the children if the children are non leaf.

    left_child = current_node.children[left_child_index]
    right_child = current_node.children[right_child_index]

    left_child.keys.append(current_node.keys[left_child_index])  # as there are less than t keys in the child
    # thus the next index must be t-1

    for k in range(len(right_child.keys)):
        left_child.keys.append(right_child.keys[k])
        if len(right_child.children) > 0:
            left_child.children.append(right_child.children[k])
    # above lines copy keys and children and the later check if child is left.
    if len(right_child.children) > 0:
        left_child.children.append(right_child.children.pop())

    # pop the node that called merges key and last child.
    current_node.keys.pop(left_child_index)
    current_node.children.pop(right_child_index)

    # if the root wanted merge then we need to acknowledge the change in the root now.
    if current_node == self.root and len(current_node.keys) == 0:
        self.root = left_child

def make_eligible(self, current_node, it):
    # here lie three cases if we can borrow from some sibling.
    # or merge the children to have a bigger node.

    # if the left sibling can give us a borrow.
    if it != 0 and len(current_node.children[it - 1].keys) >= self.t:
        self.borrow_left(current_node, it)

    if it != len(current_node.keys) and len(current_node.children[it + 1].keys) >= self.t:
        self.borrow_right(current_node, it)

    else:
        # if we are at the last child then we need to merge it and its previous child.
        if it == len(current_node.keys):
            self.delete_merge(current_node, it - 1, it)
        # vice versa as above.
        else:
            self.delete_merge(current_node, it, it + 1)

def borrow_left(self, current_node, it):

    receiver = current_node.children[it]
    donor = current_node.children[it + 1]

    # this is like a left rotate of keys from donor to current node to the receiver.
    receiver.keys.insert(0, current_node.keys[it - 1])
    current_node.keys[it - 1] = donor.keys[-1]
    if len(donor.children) > 0:
        receiver.children.insert(0, donor.children[-1])

    donor.keys.pop()
    donor.children.pop()

def borrow_right(self, current_node, it):

    receiver = current_node.children[it]
    donor = current_node.children[it + 1]

    # this is like a left rotate of keys from donor to current node to the receiver.
    receiver.keys.append(current_node.keys[it])
    current_node.keys[it] = donor.keys[0]
    if len(donor.children) > 0:
        receiver.children.append(donor.children[0])

    donor.keys.pop(0)
    donor.children.pop(0)

def print_tree(self, x, level=0):
    print(f'Level {level}', end=": ")

    for i in x.keys:
        print(i, end=" ")

    print()
    level += 1

    if len(x.children) > 0:
        for i in x.children:
            self.print_tree(i, level)

def delete_example():
first_leaf = NODE(True)
first_leaf.keys = [1, 9]
second_leaf = NODE(True)
second_leaf.keys = [17, 19, 21]

third_leaf = NODE(True)
third_leaf.keys = [23, 25, 27]

fourth_leaf = NODE(True)
fourth_leaf.keys = [31, 32, 39]

fifth_leaf = NODE(True)
fifth_leaf.keys = [41, 47, 50]

sixth_leaf = NODE(True)
sixth_leaf.keys = [56, 60]

seventh_leaf = NODE(True)
seventh_leaf.keys = [72, 90]

root_left_child = NODE()
root_left_child.keys = [15, 22, 30]
root_left_child.children.append(first_leaf)
root_left_child.children.append(second_leaf)
root_left_child.children.append(third_leaf)
root_left_child.children.append(fourth_leaf)

root_right_child = NODE()
root_right_child.keys = [55, 63]
root_right_child.children.append(fifth_leaf)
root_right_child.children.append(sixth_leaf)
root_right_child.children.append(seventh_leaf)

root = NODE()
root.keys = [40]
root.children.append(root_left_child)
root.children.append(root_right_child)

B = BTREE(3)
B.root = root
print('\n--- Original B-Tree ---\n')
B.print_tree(B.root)

print('\n--- Case 1: DELETED 40 ---\n')
B.delete(B.root, 40
         )
B.print_tree(B.root)

print('\n--- Case 2a: DELETED 30 ---\n')
B.delete(B.root, 30)
B.print_tree(B.root)

print('\n--- Case 2b: DELETED 27 ---\n')
B.delete(B.root, 27)
B.print_tree(B.root)

print('\n--- Case 2c: DELETED 22 ---\n')
B.delete(B.root, 22)
B.print_tree(B.root)

print('\n--- Case 3b: DELETED 17 ---\n')
B.delete(B.root, 17)
B.print_tree(B.root)

print('\n--- Case 3a: DELETED 9 ---\n')
B.delete(B.root, 9)
B.print_tree(B.root)

def main():
delete_example()
main()
made changes to the code , it works fine now.

@18Abhinav07 Glad you sorted it out 👍🏼 Is there a PR you want to push to the repo? I'm unsure which change you made.

I have made the code i will push it as soon as i can / thank you
On Mon, 1 Jan 2024, 04:25 Michael Sambol, @.***> wrote:

@18Abhinav07 https://github.com/18Abhinav07 Glad you sorted it out 👍🏼
Is there a PR you want to push to the repo? I'm unsure which change you
made.
—
Reply to this email directly, view it on GitHub
https://github.com/msambol/dsa/issues/7#issuecomment-1873050543, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/A6JRTFSHSK3Q7YPOV2PL2GLYMHUNRAVCNFSM6AAAAABAZTG4NSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZTGA2TANJUGM
.
You are receiving this because you were mentioned.Message ID:
@.***>

@18Abhinav07 I'm going to close this issue and point others to your fork: https://github.com/msambol/dsa/pull/8. I want to keep the code as close as possible to the videos. If there is a smaller PR you can make that with a bug fix, happy to merge that. Thanks!


Mismatch between wiki and program functionality in "Feature extraction - storing to file"

The wiki section "Feature extraction - storing to file for a sequence of WAV files stored in a given path"
gives the following command and explains that the output should be in four feature files (2 CSVs and 2 NUMPY), one pair for short-term features and one pair for mid-term features:
python3 audioAnalysis.py featureExtractionDir -i data/ -mw 1.0 -ms 1.0 -sw 0.050 -ss 0.050

The result of the command on my machine is that it produces only two short-term files, not the four, as described in the wiki.
After some digging around, it seems that the command line call is sent to:
-> audioAnalysis.featureExtractionDir -> MidTermFeatures.mid_feature_extraction_file_dir -> MidTermFeatures.mid_feature_extraction_to_file

mid_feature_extraction_to_file executes one of two branches and saves only one pair of files - short or mid-term, depending on the input parameters.
Because the inputs store_short_features=False, store_csv=False, plot=False are hardcoded as (True, True, True) in audioAnalysis.featureExtractionDir the first branch of mid_feature_extraction_to_file which writes the short-term files is always executed. Conversely, the second branch of mid_feature_extraction_to_file, which is supposed to write the mid-term files never executes.
It seems, that during code refactoring, there was intent to change the behavior of the mid_feature_extraction_to_file depending on the input conditions, but the change was carried only halfway.
I am seeing this with the latest master.
Can we have this fixed?

I can help fixing this in the code or help re-writing the wiki, if I knew what was the authors' intention. For me, personally, the wiki description makes more sense and branching the code is unnecessary - just output both short- and mid-term feature files if output is requested in the call to MidTermFeatures.mid_feature_extraction_to_file. Or don't if it isn't...
Can you, please, give some clarification?

fixed in https://github.com/tyiannak/pyAudioAnalysis/commit/fc11a6cad7347502766b9d14e018daaa9327a4cb now all 4 files are written (2 for mid-term and 2 for short-term feature matrices)


Performance test

Hi everyone!
I just tested vibe.d vs nodejs and got pity results...
I wrote (Ctrl+C) two simples apps:
(Vibe.d)
void handleRequest(HttpServerRequest req, HttpServerResponse res)
{	res.writeBody(cast(ubyte[])"Hello, World!", "text/plain");}
static this()
{	setLogLevel(LogLevel.Trace);
auto settings = new HttpServerSettings;
settings.port = 8080;
listenHttp(settings, &handleRequest);}
And nodejs
var sys = require('sys'),
http = require('http');
http.createServer(function(req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.write('Hello World');
res.end();
}).listen(8080);
Test with
ab -r -n 100000 -c 1000 http://<IP_ADDRESS>:8080/
And got results(vibe.d):
Concurrency Level:      1000
Time taken for tests:   515.134 seconds
Complete requests:      100000
Failed requests:        7662
(Connect: 0, Receive: 2554, Length: 2554, Exceptions: 2554)
Write errors:           0
Total transferred:      13155885 bytes
HTML transferred:       1266863 bytes
Requests per second:    194.12 [#/sec] (mean)
Time per request:       5151.341 [ms] (mean)
Time per request:       5.151 [ms] (mean, across all concurrent requests)
Transfer rate:          24.94 [Kbytes/sec] received
Results(nodejs):
Concurrency Level:      1000
Time taken for tests:   16.212 seconds
Complete requests:      100000
Failed requests:        0
Write errors:           0
Total transferred:      8100000 bytes
HTML transferred:       1800000 bytes
Requests per second:    6168.42 [#/sec] (mean)
Time per request:       162.116 [ms] (mean)
Time per request:       0.162 [ms] (mean, across all concurrent requests)
Transfer rate:          487.93 [Kbytes/sec] received
Connection Times (ms)
min  mean[+/-sd] median   max
Connect:        0   97 640.7      0    9028
Processing:     0   23  50.2     20    9831
Waiting:        0   22  50.2     20    9831
Total:          1  120 648.4     21    9831
I understand that vibe is very young project , but my I did something wrong?

Looking at the performance figures here (https://github.com/nanoant/WebFrameworkBenchmark)... I'm beginning to wonder if u you guys made up the figures in your benchmarks
@s-ludwig  @zzzteph  @btko02

Looks like it's running on distribute and avoiding manual memory management. I wonder what the figures would be without that contention

Could someone please make the necessary pulls for the project? They seem to be more serious and consistent and updated compared to Techempower Framework Benchmarks.... I'm just a beginner, so there's little I can contribute to that project

I'm not sure what you mean. Sorry if I'm being superficial, but this project with 13 stars is more serious than Techempower with 2,000 stars?


Make all native transport tests run parallel-per-class

Motivation:
Native transport tests were running with a mix of parallel modes. The epoll tests were running fully concurrently, but it looks like the tests cannot tolerate this. The io_uring tests now also run in parallel, as do the kqueue tests.
Modification:
Move the junit configuration to transport-native-common-tests. Make the junit config for the native transports run the tests in parallel class-wise. In other words, within a class the tests will run one at a time in the same thread, but multiple classes can run in parallel.
Result:
Epoll tests should be more stable now (something related to ssl did not like the tests to run fully concurrently).

This doesn't solve the real problem; just makes it less likely to bite any given PR. We still see these tests fail for the NIO transport, which isn't running anything in parallel.

@gradinac The Java 17 Graal build found something interesting that looks very much like a Graal JIT compiler bug around VarHandles and x86_64 atomics. I'm guessing you know who to tell about this.
The stack trace of interest looks like this:
Caused by: java.lang.IllegalStateException: This object has already been received.
	at io.netty5.buffer.internal.SendFromOwned.gateReception(SendFromOwned.java:54)
	at io.netty5.buffer.internal.SendFromOwned.receive(SendFromOwned.java:46)
	at io.netty5.buffer.BufferInputStream.<init>(BufferInputStream.java:61)
	at io.netty5.handler.ssl.SslContext.getCertificatesFromBuffers(SslContext.java:1247)
	at io.netty5.handler.ssl.SslContext.toX509Certificates(SslContext.java:1232)
	at io.netty5.handler.ssl.SslContextBuilder.keyManager(SslContextBuilder.java:378)
	... 110 more

The exception comes when gateReception fails to flip a volatile boolean field from false to true, via getAndSet through a VarHandle: https://github.com/netty/netty/blob/45ead82fba89238a703ce1afca1730dc64a246f1/buffer/src/main/java/io/netty5/buffer/internal/SendFromOwned.java#L52-L61
The field is local to the SendFromOwned object, and keeps its initial false value until the object is received or closed: https://github.com/netty/netty/blob/45ead82fba89238a703ce1afca1730dc64a246f1/buffer/src/main/java/io/netty5/buffer/internal/SendFromOwned.java#L34
So the happy-path is that the getAndSet will return false, and atomically set the field value to true, preventing any further receives in a thread-safe way. A Send can only be received once.
The thing is, the Buffer, the SendFromOwned, the send() and receive() calls all happen in the same thread, and all objects are local to that thread.
The buffers are allocated in the PemReader.readCertificates() call: https://github.com/netty/netty/blob/main/handler/src/main/java/io/netty5/handler/ssl/SslContext.java#L1228-L1233
Then sent to the BufferInputStream constructor purely as a matter of buffer ownership transfer: https://github.com/netty/netty/blob/main/handler/src/main/java/io/netty5/handler/ssl/SslContext.java#L1242-L1255
And received in the constructor, in the same thread: https://github.com/netty/netty/blob/45ead82fba89238a703ce1afca1730dc64a246f1/buffer/src/main/java/io/netty5/buffer/BufferInputStream.java#L60-L66
The SendFromOwned object was created by the send() call in the getCertificatesFromBuffers() call above. The send() is implemented like this: https://github.com/netty/netty/blob/45ead82fba89238a703ce1afca1730dc64a246f1/buffer/src/main/java/io/netty5/buffer/internal/ResourceSupport.java#L136-L150
As you can see, each send() call creates a new SendFromOwned object. The buffer is also put in a state that prevents more Send objects from being created, though that's not relevant to this issue.
At no point do any of these objects get shared with other threads, and each buffer is only sent once, and each Send is immediately received on the same thread. So there's no way the received could be anything other than false, yet the getAndSet call returns true and the exception is thrown.

@chrisvest Thank you very much for looking into this! :) I've also looked into the gate logs to verify, but just to double check, this happens in the Graal JIT mode, not on native-image?
Could you, if you have the time, open an issue under oracle/graal: https://github.com/oracle/graal/issues/new?assignees=&labels=bug&template=5_issues_other.md&title=
One thing that would really help to debug it would be a standalone reproducer. It would be perfect if we had one, but if that's not possible, the set of commands that would run just the above test should also help. I assume it would be something like:
To setup:
export JAVA_HOME=<path-to-graalvm>
git clone https://github.com/netty/netty.git
cd netty
git fetch origin main
git checkout main
mvn -DskipTests=true install
cd handler

To run just this test:
mvn -Dtest=ParameterizedSslHandlerTest.testCompositeBufSizeEstimationGuaranteesSynchronousWrite test

@gradinac

Could you, if you have the time, open an issue under

Employer says I'm not allowed, so no 🤷
Reproducer instructions looks correct, except the command to run the test needs to look like this:
mvn -Dtest=ParameterizedSslHandlerTest#testCompositeBufSizeEstimationGuaranteesSynchronousWrite test -pl handler


RestEndpoint.extend with no-argument fetch doesn't work with useFetcher

React version 17.0.2
Concurrent mode no
Rest Hooks version 6.1.7
Describe the bug
Returning RestEndpoint.extend results in a type error when trying to use it in useFetcher. It works fine with an object spread. This is an example from the documentation: https://resthooks.io/docs/guides/extending-endpoints#custom-get
To Reproduce
This doesn't work:
export class ProfileResource extends Resource {
  static urlRoot = "profile";

  readonly id!: string;
  readonly email!: string;

  pk() {
    return this.id;
  }

  static current<T extends typeof Resource>(this: T) {
    const endpoint = this.detail();
    return endpoint.extend({
      fetch() {
        return endpoint(this);
      },
      url() {
        return ProfileResource.urlRoot;
      },
    });
  }
}

// Elsewhere in application
const fetchCurrentProfile = useFetcher(ProfileResource.current());

Expected behavior
useFetcher should be able to take in outputs from RestEndpoint.extend
Additional context
Object spread works and doesn't result in a type error:
  static current<T extends typeof Resource>(this: T) {
    const endpoint = this.detail();
    return {
      ...endpoint,
      fetch() {
        return endpoint(this);
      },
      url() {
        return ProfileResource.urlRoot;
      },
    };
  }

Unrelated issue: useFetcher doesn't seem to allow passing in any arguments for custom endpoints:

Workaround is to put an argument in your fetch call and just ignore it. I can losen the types for useFetcher tho. If you're using v6 you should try using controller.fetch from useController().

PS) Due to a weird TypeScript bug you'll also want to Either

Add schema: this
Explicitly type the return value

More info here: https://resthooks.io/docs/guides/rest-types#a-limitation

Fixed in<EMAIL_ADDRESS>


net-mgmt/telegraf

Add OpenTelemetry output
Closes #3772

Looks like this slipped through the cracks. Merging now, thanks!


Done with the Mandatory tasks

in this pr, i was able to work on all the Mandatory tasks however, I never stepped  to the optional ones

Well done man


Allow to set target field

Allow to create all fields from icingabeat as a nested field.
Currently all fields are created under root but some setups want to use nested fields like namespaces so there won't be any collisions between rulesets from different users.
You can use the target field of Logstashes kv filter.
/ref/NC/545319

I moved all Icinga related fields to an icinga group. Since I don't see any use case for a configurable target. Fix is going to be released in 6.5


Sensationalize feature list

Unsure if I like this, just thought I'd put it out there for feedback/opinions.

It sounds less technical that way. That might be a pro.
"What else could you ask for?" made me cringe though.

In case @thelounge/maintainers stop by, I was okay with most of this (and agree with @starquake too).


Archive this repository if it is no longer used

Consider marking this repo as archived in the settings menu if active development is no longer happening. See the screenshot below for how to do this:

This does two things:

Clearly communicates to non-UNICEF staff that active development is no longer happening here
Stops sending known security vulnerability emails about this repo every week

This repo is still in use. Just used it to download all gadm3-8 borderfiles.


Imports in the conf/rexster-cassandra.xml and conf/rexster-cassandra-es.xml are ignored

Test:
gremlin> xx = mgmt.makeEdgeLabel('xx').multiplicity(MANY2ONE).make()
==>javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: MANY2ONE for class: Script2
gremlin> xx = mgmt.makeEdgeLabel('xx').multiplicity(Multiplicity.MANY2ONE).make()
==>javax.script.ScriptException: groovy.lang.MissingPropertyException: No such property: Multiplicity for class: Script1
gremlin> xx = mgmt.makeEdgeLabel('xx').multiplicity(com.thinkaurelius.titan.core.Multiplicity.MANY2ONE).make()
==>xx

This error:
+-com.thinkaurelius.titan:titan-hbase-098:0.5.2
  +-org.apache.hbase:hbase-client:0.98.8-hadoop2
    +-org.apache.hbase:hbase-annotations:0.98.8-hadoop2
      +-jdk.tools:jdk.tools:1.7
and
+-com.thinkaurelius.titan:titan-hbase-098:0.5.2
  +-org.apache.hadoop:hadoop-annotations:2.2.0
    +-jdk.tools:jdk.tools:1.6

[WARNING] Rule 0: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message:
Failed while enforcing releasability the error(s) are [
Dependency convergence error for jdk.tools:jdk.tools:1.7 paths to dependency are:
+-com.thinkaurelius.titan:titan-hbase-098:0.5.2
  +-org.apache.hbase:hbase-client:0.98.8-hadoop2
    +-org.apache.hbase:hbase-annotations:0.98.8-hadoop2
      +-jdk.tools:jdk.tools:1.7
and
+-com.thinkaurelius.titan:titan-hbase-098:0.5.2
  +-org.apache.hadoop:hadoop-annotations:2.2.0
    +-jdk.tools:jdk.tools:1.6

occurs when building titan05 with JDK 8.  titan09 builds with JDK8, but titan05 only builds cleanly with JDK7 at the moment.
This build error is important -- it would be useful for titan05 to compile cleanly to a 1.7 target using JDK8 -- but I think it is orthogonal to the import problems at the root of this particular issue.  I also think those import issues are going to be resolved in the Titan zipfiles and docs shipped with 0.5.3.  More testing is always welcome, but I don't want to waste your time chasing build issues, so I'm closing this for now.   Please feel free to reopen if you want to pursue testing on this further.


leadingZeroHandler FIX

Fix the problem on set "20.00" (or X0.00 : X is the number!) to not remove the "0".
Value (set in value or .val()):
20.00 | 010.00
Before this edit:
2.00   | 1.00
Now:
20.00 | 10.00

@Inkeliz ,
Thx for the fix!! But changes should be made in the src folder.


Fixed bug in create_rethinkdb_conf.py

Before, bind_http_to_localhost was a string, either "True" or "False", and so the line:
    if bind_http_to_localhost:

saw a nonempty string and always evaluated it as True (even if the string was "False").
I fixed it.

@r-marques This is why you weren't able to see the RethinkDB web admin on port 8080, even when you set BIND_HTTP_TO_LOCALHOST=False in the AWS deployment configuration file.

Current coverage is 96.83% (diff: 100%)

Merging #870 into master will not change coverage

@@             master       #870   diff @@
==========================================
  Files            27         27
  Lines          1708       1708
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits           1654       1654
  Misses           54         54
  Partials          0          0

Powered by Codecov. Last update 81cb1f3...785ee4b

Also, thanks to @libscott for helping me figure out this bug.


Withstep progresscolor progress update

Added two new optional props to the <Progress/> component.
progressColor: type of colors, optional, will default to previous value, allows to change the color of the progress bar - not a breaking change
withStep: boolean, optional, allows to toggle the step text - not a breaking change

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Add missing required db folder and fix docker-compose

Why do you want to add <IP_ADDRESS> to DJANGO_HOSTS?

@thomwiggers docker-compose.yml runs the server on runserver <IP_ADDRESS>:8000. Without adding <IP_ADDRESS> to the ALLOWED_HOSTS (which is taken from DJANGO_HOSTS), an error is shown.

@joren485 you should view the website on localhost:8000, <IP_ADDRESS> just means the server will listen on all interfaces

@pingiun Ah of course, my bad.

ALLOWED_HOSTS is indeed unrelated to the listen port (it only relates to HTTP headers).


Fix committing or rollbacking dangling transactions

Description
In the EFS, we came across a problem where there is a dangling transaction that is still pending. It may be neither committed, nor rollbacked, or it may be in the process of committing or rollbacking.
Either way, when the DB.stop() is called, it proceeds to rollback all existing transactions in the transaction reference set.
Ideally, all transactions should be committed or rollbacked before the await db.stop() is called. However if there are dangling transactions there should be rollbacked if their status is neither committed or rollbacked, but if they have a particular status, then the DB.stop should be waiting for those pending statuses to finish.
Here we introduce a lock to be used between DBTransaction.destroy, DBTransaction.commit and DBTransaction.rollback. The basic idea is for destroy to wait on a commit or rollback to finish. This allows one to call await transaction.destroy() while the committing or rollbacking is occurring.
However at the same time, if a transaction is pending to commit, but hasn't started committing. It's possible for the DB.stop() to already start rollbacking. If this occurs, during the resource release, the transaction will attempt to commit, in that case, an exception still occurs because the transaction is already rollbacked. This is a legitimate exception.
Issues Fixed

Related: https://github.com/MatrixAI/js-encryptedfs/pull/74#issuecomment-1220423915

Tasks

[x] 1. Ensure that DB.stop() only performs await transaction.rollback when the transaction is neither committing nor rollbacking. If it is in the middle of comitting or rollbacking then it should just wait for it complete.
[x] 2. Add a test for dangling transactions for tests/DBTransaction.test.ts
[x] 3. Remove await this.destroy() from DBTransaction.commit and DBTransaction.rollback, this is done automatically be the resource release

Final checklist

[x] Domain specific tests
[x] Full tests
[x] Updated inline-comment documentation
[x] Lint fixed
[x] Squash and rebased
[x] Sanity check the final build

@tegefaulkes the exception in EFS may still occur simply because the EFS could stop the database before the committing or rollbacking has even started.
In that case the dangling transaction attempts to release which will either commit or rollback. But this will cause an exception. This is unavoidable UNLESS we were to make is that committ or rollback is a noop if it is already committing or rollbacking.

The DBTransaction.committed and DBTransaction.rollbacked is a bit of a misnomer. These 2 actually mean that it has started committing or rollbacking. So I'm changing these to be committing and rollbacking instead to be more obvious.

In that case the dangling transaction attempts to release which will either commit or rollback. But this will cause an exception. This is unavoidable UNLESS we were to make is that committ or rollback is a noop if it is already committing or rollbacking.

So this change only applies to the case where committing or rollbacking has already started, and in which case those transactions should not result in any problems.
I'm not sure if that will fix the EFS, or we should apply a fix in EFS to ensure that the transaction is in fact committed or rollbacked before you stop the EFS (this is the better solution).

Ok for now the EFS will still need to ensure that they are in fact committing or rollbacking any dangling transactions. But the db.stop() here is now more robust. @tegefaulkes


Could not use cudf or cuml when rapids-runtime = DASK

I am trying to setup a dataproc cluster with GPU attached, to use cuml and cudf, I followed the instruction https://github.com/GoogleCloudDataproc/initialization-actions/blob/master/rapids/README.md
And able to setup the cluster, with nvidia driver successfully installed. But when I try
import cudf

It throws out the error
TypeError: C function cuda.ccudart.cudaStreamSynchronize has wrong signature (expected __pyx_t_4cuda_7ccudart_cudaError_t (__pyx_t_4cuda_7ccudart_cudaStream_t), got cudaError_t (cudaStream_t)

I follow the instruction here: https://docs.rapids.ai/notices/rsn0020/
But after the downgraded version, another error show up when import cudf which is
No module named 'pandas.core.arrays._arrow_utils'

The dask rapids installation version in rapids.sh is 22.04

Thank you for this report!
@nvliyuan do you want to take a look at this?

Actually, nvliyuan has been contributing to the spark runtime.  Not certain who to tap about the dask runtime.  I'll check the commit history shortly and get back to you.

Hi @cjac, since dask script failed since 22.06 version(2022.06), see this comments, so I believe this issue exists for a long time, maybe @mengdong @sameerz could involve some rapids guys?

Hey folks! I work on RAPIDS and Dask. We are currently in the process of documenting and testing deploying RAPIDS on cloud platforms but I expect we will not get to Dataproc until after the holidays. But we will definitely dig into this as part of that work.
Pinging @mroeschke who may have some quick thoughts about the Pandas error. I expect pandas needs upgrading/downgrading.

Thank you Jacob and Matt!
@blis-teng - please let us know if this solves this issue for you so we can mark the issue resolved or otherwise offer an appropriate solution.

@blis-teng - are you able to share the gcloud dataproc clusters create command you're using to spin up your cluster?  I can try to give it a repro and see if I run into the same problems.
If you've got a support contract with GCP, I'd appreciate if you could open a support case and provide me the case #.  By doing this, we can track our work and share case details privately rather than on the permanent record for the initialization-actions repository.  Please do not open development cases as P2 or P1, as those are reserved for production outage situations, and development is by definition not a production environment.
C.J. in Cloud Support, Seattle

I suspect your environment has pandas>=1.5 installed, and cudf was not compatible with that version of pandas until 22.10.
Therefore if you downgrade pandas<1.5 or upgrade cudf>22.10 the error No module named 'pandas.core.arrays._arrow_utils' should go away

I have tried, but it will not work.

If I install pandas 1.3 in rapids.sh, in the dataproc, run "conda list" you can see the version is still 1.5, and the import error changed, but still related to pandas.
If I try to install pandas 1.3 in Jupyter notebook after dataproc is ready, the "manaba install" will block the installation due to some dependencies are not resolved from any of the given channel.

I used the cmd line from the given documentation in https://github.com/GoogleCloudDataproc/initialization-actions/blob/master/rapids/README.md
Minor details may be different, but the key parameters (gpu driver, rapids-runtime) are the same.
export CLUSTER_NAME=<cluster_name>
export GCS_BUCKET=<your bucket for the logs and notebooks>
export REGION=<region>
export NUM_GPUS=1
export NUM_WORKERS=2

gcloud dataproc clusters create $CLUSTER_NAME  \
    --region $REGION \
    --image-version=dp20 \
    --master-machine-type n1-custom-63500 \
    --num-workers $NUM_WORKERS \
    --worker-accelerator type=nvidia-tesla-t4,count=$NUM_GPUS \
    --worker-machine-type n1-standard-8 \
    --num-worker-local-ssds 1 \
    --initialization-actions gs://goog-dataproc-initialization-actions-${REGION}/gpu/install_gpu_driver.sh,gs://goog-dataproc-initialization-actions-${REGION}/rapids/rapids.sh \
    --optional-components=JUPYTER,ZEPPELIN \
    --metadata gpu-driver-provider="NVIDIA",rapids-runtime="DASK" \
    --bucket $GCS_BUCKET \

okay, I'll try to reproduce it now.

With these arguments, it is installing pandas-1.2.5 and libcudf-22.04.00-cuda11.  I think I found a bug in the rapids.sh script.  I'll see if patching it improves the situation.

In order to use 22.10, I need to upgrade these python packages:
"cuspatial=${CUSPATIAL_VERSION}" "rope>=0.9.4" "gdal>3.5.0"
And gdal>3.5.0 is not available in bullseye.  Backports only go up to 3.2, so I'm going to try ubuntu20.

cjac@cluster-1668020639-w-0:~$ apt-cache show libgdal-dev | grep ^Version
Version: 3.0.4+dfsg-1build3
cjac@cluster-1668020639-w-0:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.5 LTS
Release:        20.04
Codename:       focal

so no, it looks like the 22.10 branch is not stable.  I'll try doing the lower numbers.

+ mamba install -y --no-channel-priority -c conda-forge -c nvidia -c rapidsai cudatoolkit=11.5 'pandas<1.5' rapids=22.04

Looking for: ['cudatoolkit=11.5', "pandas[version='<1.5']", 'rapids=22.04']

Pinned packages:
  - python 3.10.*
  - conda 22.9.*
  - python 3.10.*
  - r-base 4.1.*
  - r-recommended 4.1.*

Encountered problems while solving:
  - package rapids-22.04.00-cuda11_py39_ge08d166_149 requires python >=3.9,<3.10.0a0, but none of the providers can be installed

cjac@cluster-1668020639-w-0:~$ which conda
/opt/conda/default/bin/conda
cjac@cluster-1668020639-w-0:~$ /opt/conda/default/bin/python --version
Python 3.10.8

Now it looks like the python interpreter we install with dataproc is too new for the rapids release.  I'll try 22.06 and 22.08 to see if either of those versions work.

Okay, I was able to get this working on 2.0-debian10 with dask-rapids 22.06
I had to specify this mamba command:
mamba install -n 'dask-rapids' -y --no-channel-priority -c 'conda-forge' -c 'nvidia' -c 'rapidsai'
"cudatoolkit=${CUDA_VERSION}" "pandas<1.5" "rapids=${RAPIDS_VERSION}" "python=3.9"
I'm testing the change with dask-rapids 22.08 ; if that works as well, I will submit a PR.

@blis-teng - please try replacing the rapids.sh you link to from your project's initialization-actions checkout with this one.
https://github.com/cjac/initialization-actions/raw/dask-rapids-202212/rapids/rapids.sh
I am working with the product team to review this change.  I should be able to close up PR #1041 pretty quick here.

You may have mentioned that you have not yet read the README.md[1] from the initialization-actions repository.  Can you please review and confirm for me that you understand where you would like to copy rapids.sh[2] from my pre-release branch for testing?
[1] https://github.com/GoogleCloudDataproc/initialization-actions/blob/master/README.md#how-initialization-actions-are-used
[2] https://github.com/cjac/initialization-actions/raw/dask-rapids-202212/rapids/rapids.sh

@blis-teng can you re-try using the latest rapids/rapids.sh from github?

Thank you.  Standing by for confirmation!
20230106T084758 + 7d will be 20230806T084757.
I am presently not able to reproduce your problem.  If there is still a change to be made, I'd like to know that information early in the week, please.

Please remember to read the README I referenced.  You are violating the guidance by using
--initialization-actions gs://goog-dataproc-initialization-actions-${REGION}/gpu/install_gpu_driver.sh,gs://goog-dataproc-initialization-actions-${REGION}/rapids/rapids.sh \

Hi @cjac , could you please update to work with latest dask-rapids v22.12?

Not last I checked.  What versions are you pinning to?

@cjac
root@test-dataproc-rapids-dask-m:/# conda list ^cu
# packages in environment at /opt/conda/miniconda3:
#
# Name                    Version                   Build  Channel
cucim                     22.04.00        cuda_11_py38_g8dfed80_0    rapidsai
cuda-python               11.8.1           py38h241159d_2    conda-forge
cudatoolkit               11.2.72              h2bc3f7f_0    nvidia
cudf                      22.04.00        cuda_11_py38_g8bf0520170_0    rapidsai
cudf_kafka                22.04.00        py38_g8bf0520170_0    rapidsai
cugraph                   22.04.00        cuda11_py38_g58be5b53_0    rapidsai
cuml                      22.04.00        cuda11_py38_g95abbc746_0    rapidsai
cupy                      9.6.0            py38h177b0fd_0    conda-forge
cupy-cuda115              10.6.0                   pypi_0    pypi
curl                      7.86.0               h7bff187_1    conda-forge
cusignal                  22.04.00        py39_g06f58b4_0    rapidsai
cuspatial                 22.04.00        py38_ge8f9f84_0    rapidsai
custreamz                 22.04.00        py38_g8bf0520170_0    rapidsai
cuxfilter                 22.04.00        py38_gf251a67_0    rapidsai

root@test-dataproc-rapids-dask-m:/# conda list ^das
# packages in environment at /opt/conda/miniconda3:
#
# Name                    Version                   Build  Channel
dask                      2022.3.0           pyhd8ed1ab_1    conda-forge
dask-bigquery             2022.5.0           pyhd8ed1ab_0    conda-forge
dask-core                 2022.3.0           pyhd8ed1ab_0    conda-forge
dask-cuda                 22.04.00                 py38_0    rapidsai
dask-cudf                 22.04.00        cuda_11_py38_g8bf0520170_0    rapidsai
dask-glm                  0.2.0                      py_1    conda-forge
dask-ml                   2022.5.27          pyhd8ed1ab_0    conda-forge
dask-sql                  2022.8.0           pyhd8ed1ab_0    conda-forge
dask-yarn                 0.9              py38h578d9bd_2    conda-forge

Hi @cjac , could you please update to work with latest dask-rapids v22.12?

I'm about to go on vacation, and I'm trying to put projects down.  Can you open a new issue or better yet a GCP support case so I don't lose track of the work item, please?
This issue is about the action not working.  I think it's working now, but not patched up to latest release.  A separate issue would be appropriate.


Update built-in function for Python3

Original code has Python 2 had the built-in function execfile, which was removed in Python 3.
This branch contains an update for this function by replace execfile with exec supported in Python 3.

@googlebot I signed it!


Initial baseurl

This template is great, but I think it's worthy to set baseurl be some meaningful one, maybe '<IP_ADDRESS>:4000', or just inform the new users to change that field before really running the jekyll serve command, or they will be confused by clicking the post title and find the weird destination like /2014/04/,,,.

I've added a pull request for this issue


[FLINK-30352] [connectors/elasticsearch] Document missing configuration properties

There is a number of configuration properties which are not documented:

sink.delivery-guarantee
connection.request-timeout
connection.timeout
socket.timeout

@zentol please take a look, closing the gap in Elasticsearch configuration documentation, thank you

@zentol what is the process here? I can only do English, someone will translate?

You can add the snippets in english, and someone may pick up the translation at some point.


⚠ Bofrost.de has degraded performance

In cef3a8d, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1851 ms

Resolved: Bofrost.de performance has improved in ccdc09f after 27 minutes.


Dialog exposing Logger property IBotTelemetryClient

Safeholder checkin
I wanted to get this out here early for review.  This is related to DCR 5177.
This exposes a new property called Logger on the base Dialog class.  The type of Logger is IBotTelemetryClient.  This interface matches the Application Insights Telemetry TelemetryClient class (minus some deprecated methods).  The interface takes no dependencies on any Application Insights assemblies.  This enables people to overload IBotTelemetryClient if other loggers wish to be used (a feature @gabog will take advantage of).  Included is a BotTelemetryClient implementation and NullBotTelemetryClient (the default) which performs no-ops.
This also includes modifications for WaterfallDialog (and DialogContext) to log:

Steps (@gabog, the step names are still of the form dialogId.StepXofY. I'll look to change to dialogId.StepMethodName)
WaterfallDialog Completion (only waterfall dialogs).  (WaterfallConvert is the event name)
WaterfallDialog Cancel (WaterfallCancel is the event name).
This is intentionally trying to reduce the surface area of what we log as much as possible.  The rest, the sample and customer code can log according to their reporting requirements.

Other things: Each custom event will log (within each Application Insight Custom Event):

UserID (I believe shows up as user_id in event) = ChannelID + From.Id
ConversationID (I believe shows up as session_id in event)
and now:
ActivityID activity_id (Added based on feedback from yesterday's review - this will be in the properties portion of the event)

Comments still accepted on the old PR.
Some possibilities for changes in this PR:

We could remove BotConfig from AddBotApplicationInsights() and rely that it's been added as a singleton.
We could remove the appsettings.json InstrumentationKey validation check in UseBotApplicationInsights().  I've just made that mistake too many times and appreciate the check.

If someone with a Bot that wants to use App Insights, it would look like:
// In Startup.cs
public void ConfigureServices(IServiceCollection services)
  ...
   // Add Application Insights Telemetry components so userid/sessionid
   // are in terms of Bot identifiers.
   // Specifically the Application Insights Telemetry Initializer and
   // IBotTelemetryClient.
   services.AddBotApplicationInsights(botConfig);
   ...

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
   ...
   // Add Application Insights Telemetry components so userid/sessionid
   // are in terms of Bot identifiers.
   // Specifically the ASP.Net Middleware component.
   app.UseBotApplicationInsights()
  ...

Will look into the dependency build issue.  It's in the WebAPI..

Pull Request Test Coverage Report for Build 44121

0 of 0   changed or added relevant lines in 0 files are covered.
49 unchanged lines in 6 files lost coverage.
Overall coverage increased (+0.4%) to 54.623%

Files with Coverage Reduction
New Missed Lines
%

/libraries/Microsoft.Bot.Builder.ApplicationInsights/BotTelemetryClient.cs
1
98.85%

/libraries/integration/Microsoft.Bot.Builder.ApplicationInsights.Core/ServiceCollectionExtensions.cs
1
86.67%

/libraries/integration/Microsoft.Bot.Builder.ApplicationInsights.Core/TelemetryBotIdInitializer.cs
2
28.57%

/libraries/Microsoft.Bot.Builder.Dialogs/Dialog.cs
6
45.45%

/libraries/Microsoft.Bot.Builder.Dialogs/WaterfallDialog.cs
13
72.0%

/libraries/Microsoft.Bot.Builder.Dialogs/DialogContext.cs
26
54.24%

Totals

Change from base Build 44095:
0.4%

Covered Lines:
5240

Relevant Lines:
9593

💛  - Coveralls

Ok, @drub0y - came to my senses, changed from Logger to TelemetryClient (in addition to your other suggestions).  I rationalize Loggers don't have things like "LogDependency"..

Late to the party but looks good. In reference to some of the earlier comments, it's really important that we fit into the existing AppInsights events that are logged by the AppInsights AspNet stack as these provide the ability to drill down into conversation from say an exception/request and vice-versa. Appreciate this won't be possible in some scenarios where AspNet isn't being used but the majority of customers are taking this approach and this level of joined-up telemetry is important.


please check html validation of Italian 4.0 licenses

Here are the URLs on staging:
http://cc4-it-legalcode.legal.creativecommons.org/licenses/by-nc-sa/4.0/legalcode.it
http://cc4-it-legalcode.legal.creativecommons.org/licenses/by-sa/4.0/legalcode.it
http://cc4-it-legalcode.legal.creativecommons.org/licenses/by-nc/4.0/legalcode.it
http://cc4-it-legalcode.legal.creativecommons.org/licenses/by/4.0/legalcode.it
http://cc4-it-legalcode.legal.creativecommons.org/licenses/by-nc-nd/4.0/legalcode.it
http://cc4-it-legalcode.legal.creativecommons.org/licenses/by-nd/4.0/legalcode.it
They live here if anything needs to be fixed: https://github.com/creativecommons/creativecommons.org/tree/cc4-it-legalcode/docroot/legalcode
We had hoped to publish these before new year, but we're waiting on the team's final review right now so I'm not sure if that deadline is realistic.

They are all good. Let me know if/when this and the it cc0 need deploying.


[Bug]: domain suffix check does not handle org deletion

A customer reported, that they deleted an organization, which had a domain assigned.
If the later on try to create a user in another org (no suffix enabled) with that domain as suffix of the user they will receive the following error: Domain is already reserved and cannot be used (COMMAND-SFd21) error
At first glance it looks like the removed org event is not treated when checking to which organization the suffix belongs to.
As a workaround the domain can be assigned to the corresponding organization (and even deleted again), which will prevent the error.

Checked the logic, and yes this is the case, the OrgDomainVerifiedWriteModel does only process OrgDomainVerifiedEvent and OrgDomainRemovedEvent.
Problem here is that we only have the domain to query the respective events, it's anyway not really performant as you have to check if the domain of the events is equal and discard a lot of events if there are a lot of events of the combination organizations and domains.
I created a PR with the fix, not quite sure about the performance and the ImprovedPerformance part.


Question: How to use dynamic id's?

So I have a gtm middleware to be able to set dynamic GTM id's on its route, but I can't get it to work as I don't know the proper way to set the dynamic id's. As you can see in the example below I use the init function at the moment but this will result in multiple container script tags to be rendered.
export default function ({ $gtm, route, env }) {
  if (env.ENVIRONMENT === 'development') return;

  if (route.fullPath.includes('/locations/location-1')) $gtm.init('GTM-location-1');
  if (route.fullPath.includes('/locations/location-2')) $gtm.init('GTM-location-2');
}

Can someone please send me in the right direction here?

Yep, good question, anyone has any idea how to solve it?

@losbeekos : What are you trying to differentiate with the different IDs? (i.e. logically/functionally)

@matt-jay I know it's a bit odd but here goes.
This client has multiple locations on their website, these locations are kind of like sub sites in the main site. Each location has it's own marketing company that handles its Google Tag Manager and all things related to that. So what I want to do is register those specific GTM ID's on each location route and de-register when you leave that location off course.

If some one has any solution for this Question, would be helpfull to me too :)

If some one has any solution for this Question, would be helpfull to me too :)

Hi, Any update for this issue ?

Still waiting :)


PEAR-1564 - Cohort Save-As feature

Description
Checklist

[x] Added proper unit tests
[x] Left proper TODO messages for any remaining tasks
[ ] Scanned for web accessibility with aXe, and mitigated or documented
flagged issues

Screenshots/Screen Recordings (if Appropriate)

For the dropdown box (the thing containing save and save as), could you give it a data-testid "dropdown-menu-options"

The save icon has a margin on the right side; please remove it.

Works great! Save button nicer now too. 👍 💾 👍


Add additional links to a term page based on Bioregistry providers

Here's the OLS page for the Cell Ontology's term for osteoblast (CL:0000062).
The Bioregistry has multiple "providers" for the Cell Ontology. This means that it has URL formats that go to third party websites that has some information about them. One such site is Cell Guide, which has the following page for osteoblast: https://cellxgene.cziscience.com/cellguide/CL_0000062
Given the OLS is consuming the Bioregistry's data, you can get the following information for each provider while you parse it:

a provider code cellguide
a human-readable title Cell Guide
a description
a homepage
a URI format string https://cellxgene.cziscience.com/cellguide/CL_$1,

@dosumis asked in https://github.com/biopragmatics/bioregistry/issues/1001 if it would be possible to configure showing a Cell Guide link on the OLS term page for osteoblast (and same for every other CL term page)

This looks very generally useful to me.  I'm keen to take advantage for multiple projects/ontologies.
Open questions:

Should we support configuration of this - ontology providers optionally (?) get to choose which linkouts are used.
Should linkout section have a disclaimer about versions? (linked site may not be using same version as displayed on OLS - this may cause confusion)

@udp you're right, the two solutions are either make the link for everything, or enumerate which ones the link should get made for. Doing this directly in the ontology is one possibility. However, a database cross-reference is not the appropriate way to handle this since dbxrefs should be used to refer to semantic spaces. Maybe a seeAlso property would be good?

I've spent the past few years discouraging full URLs in xrefs as an extra burden on ontology users - who need to distinguish CURIE prefixes from protocol prefixes when parsing. But I'm willing to live with that if we can get a standard for annotating full URLs in xrefs with link text (and ideally also a link to a logo).

Just saw Charlie's comment.  seeAlso is good for me.  The same points around annotating the axioms apply.

I've spent the past few years discouraging full URLs in xrefs as an extra burden on ontology users - who need to distinguish CURIE prefixes from protocol prefixes when parsing. But I'm willing to live with that if we can get a standard for annotating full URLs in xrefs with link text (and ideally also a link to a logo).

Isn’t the datatype of a URL different from that of a string literal (curie) - or am I missing something?


DecimalType support for IfElse and Coalesce

Turned on the DecimalType support for IfElse and Coalesce and added DecimalGen in tests for both ops

build


python311Packages.testcontainers: 4.7.0 -> 4.7.1

Description of changes
Changelog: https://github.com/testcontainers/testcontainers-python/releases/tag/testcontainers-v4.7.1
cc @onny
Things done

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

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

Result of nixpkgs-review pr 324061 run on aarch64-darwin 1

4 packages marked as broken and skipped:

python311Packages.apache-beam
python311Packages.apache-beam.dist
python312Packages.apache-beam
python312Packages.apache-beam.dist

8 packages built:

python311Packages.aio-pika
python311Packages.aio-pika.dist
python311Packages.testcontainers
python311Packages.testcontainers.dist
python312Packages.aio-pika
python312Packages.aio-pika.dist
python312Packages.testcontainers
python312Packages.testcontainers.dist

Result of nixpkgs-review pr 324061 run on x86_64-linux 1

8 packages marked as broken and skipped:

python311Packages.apache-beam
python311Packages.apache-beam.dist
python311Packages.dm-sonnet
python311Packages.dm-sonnet.dist
python311Packages.tensorflow-datasets
python311Packages.tensorflow-datasets.dist
python312Packages.apache-beam
python312Packages.apache-beam.dist

8 packages built:

python311Packages.aio-pika
python311Packages.aio-pika.dist
python311Packages.testcontainers
python311Packages.testcontainers.dist
python312Packages.aio-pika
python312Packages.aio-pika.dist
python312Packages.testcontainers
python312Packages.testcontainers.dist

Result of nixpkgs-review pr 324061 run on x86_64-linux 1

8 packages marked as broken and skipped:

python311Packages.apache-beam
python311Packages.apache-beam.dist
python311Packages.dm-sonnet
python311Packages.dm-sonnet.dist
python311Packages.tensorflow-datasets
python311Packages.tensorflow-datasets.dist
python312Packages.apache-beam
python312Packages.apache-beam.dist

8 packages built:

python311Packages.aio-pika
python311Packages.aio-pika.dist
python311Packages.testcontainers
python311Packages.testcontainers.dist
python312Packages.aio-pika
python312Packages.aio-pika.dist
python312Packages.testcontainers
python312Packages.testcontainers.dist

Thank you!


Exceptions caused by batch_submit may not be handled properly.

When the batch_run is called it calls batch submit and returns a generator object.
Any errors raised while iterating over the generator are not caught by batch_run but are raised in the caller context.
Example:
def getval(x): raise RuntimeError

def gen():
    try:
         return (getval(x) for x in range(3))
     except:
         print('exception handled')

for _ in gen(): pass  # raises RuntimeError

Changing the signature of gen to:
def gen():
    for i in range(3):
         try:
             yield getval(i)
         except:
             print('exception handled')

handles the exceptions

batch_submit runs the jobs immediately end returns an iterable of jobs statuses. Even if the iterable may defer status retrieval, the requirement for batch_run implementations is that it returns after the jobs are started.


Excel related

PR Description
Please describe the changes proposed in the pull request:

Create DataFrame or dictionary of DataFrames from table(s) in xlsx sheet.

This PR resolves #929 .

PR Checklist

Please ensure that you have done the following:

[x] PR in from a fork off your branch. Do not PR from <your_username>:dev, but rather from <your_username>:<feature-branch_name>.

[x] If you're not on the contributors list, add yourself to AUTHORS.rst.

[x] Add a line to CHANGELOG.md under the latest version header (i.e. the one that is "on deck") describing the contribution.

Do use some discretion here; if there are multiple PRs that are related, keep them in a single line.

Automatic checks
There will be automatic checks run on the PR. These include:

Building a preview of the docs on Netlify
Automatically linting the code
Making sure the code is documented
Making sure that all tests are passed
Making sure that code coverage doesn't go down.

Relevant Reviewers

Please tag maintainers to review.

@ericmjl

I'm inclined to ignore the decrease in project test coverage; they're irrelevant to the PR. 100% of the patch diff being hit is good enough.

Btw, @samukweku, I think going forth you can use a branch off the pyjanitor repo, rather than a personal fork. Or otherwise, you can delete the old forks that you have and re-fork. (This is what I do with projects I'm not a maintainer on.) It helps eliminate the need to maintain a fork and keep the dev branch up-to-date.

@samukweku There's a merge conflict in CHANGELOG.md because of the previous PR going through. Could you address this, then I'll approve and merge? Thanks!


e-wrapper - consider renaming commands

Is your feature request related to a problem? Please describe.
When writing command adding full arguments (e.g. components or environments) is annoying.
Describe the solution you'd like
I think those should have some short forms of arguments like env or com. Also having autocompletion in zsh/bash would be amazing.
Describe alternatives you've considered
None.
Additional context
See point 3 here

If autocompletion will be possible (like described in comment in #1560) then we do not need to shorten commands heavily. On the other hand we should rethink naming once again.


Activating Cortana Skill in Bot Framework

When I attempt to add Cortana as a channel in a Bot via Azure, I receive a number of different errors errors.

When I 1st click deploy, I get the incorrect image error.

Once I upload another image for the Bot, I receive an internal server error. Below is a screenshot of it along with what's shown with the api call.

Any thoughts on how to resolve?

Did anyone get a chance to look at this? I am still receiving this error, and I am about to start sprint work for speech.


Error detecting Vivo devices

Running some test.

Coverage remained the same at 99.952% when pulling 394b2d39a0024b5a9f88d96543758fed3eb02c28 on ayumi-cloud:Vivo into 880b9fa797401d14b28956442944c3daa70240ff on WhichBrowser:master.


Data Mappers

Pull out model & relation loading and saving from Record to a Mapper class that works in the same way.
This means the Mapper will access storage, and the Record will access the Mapper; another layer if you will.
This makes Active Record pattern optional, and the Data Mapper pattern what everything hinges on. It separates the concerns and means users won't have to extend Record to make use of relation loading, but if they do extend it then their relations can just be loaded in exactly the same way.
This one might take a bit of working out. Ultimately: class/method extraction yo!
Edit: EntityManager that contains a set of mappers and their relationships. Basically the Data Mapper pattern that Active Record can optionally sit on top of.
Edit edit: EntityManager that holds a Mapper for each Entity (and perhaps an EntityMap). Basically, Analogue but using storage interfaces instead of PDO.

The GenericRepository would actually just be a Mapper to a Storage interface.
Think https://github.com/analogueorm/analogue, but with that extra layer of storage abstraction instead of assuming SQL.

Could start by introducing Mapper, whose constructor takes an Entity class and/or instance and maps basic methods, like ->query().
Then, an EntityMap could be extracted from Entity, and Mapper's constructor would take them both. Mapper's API wouldn't change other than the constructor, and the implementation would change according to the extraction.

An initial layout for this has been implemented, and it looks good!
Fleshing this out involves porting the relationships and having them depend on related entity maps and mappers, rather than entities.
It would also be fab to have a Manager like class so we can do this:
$orm->mapper(MyEntity::class);

And register Mappers like this:
$orm->setDefaultStorage($databaseStorage);
$orm->register(MyEntity::class, MyEntityMap::class);
$orm->register(OtherEntity::class, OtherEntityMap::class, $fileStorage);

And after that, making it possible to skip providing an entity class altogether. A map and a storage is all that's really needed.

Mapper's need their own Query class, that could decorate any Storage\Query, so that methods like ->with() and ->has() can be used to load relationships

Use the strategy pattern to implement different mapping strategies for different kinds of entity objects.
Entities shouldn't be forced to implement an interface.