Preloading critical style-sheets for improved performance 🚤

Describe the problem
This is inspired from Next.js.
Preload critical stylesheets to improve loading speed.
I think headers won't work in SSG mode :(.
Describe the proposed solution
Using link:rel=preload
Alternatives considered
No response
Importance
nice to have
Additional Information
No response

Related PR-: https://github.com/sveltejs/kit/pull/6712

Unless I'm mistaken, this already happens. Can you please clarify?

To add to what Rich said, if this isn't already happening, please provide a sample repository and describe what URL you want to be preloaded that is not

I'm seeing the same thing. When visiting a pre-rendered page, the preload headers aren't sent (and it doesn't fallback to using rel="preload" on the <link> element).
Sample code

Unless I'm mistaken, this already happens. Can you please clarify?

To add to what Rich said, if this isn't already happening, please provide a sample repository and describe what URL you want to be preloaded that is not

I thought this would benefits for SSG generated pages :) and this doesn't have any drawback for SSR pages too 😄
Sorry if I told anything incorrect :(

There's no reason to duplicate <link rel="stylesheet"> as <link rel="preload">. It won't speed anything up — in fact it will slow things down because you're sending extra markup unnecessarily.

The problem isn't with duplication, the issue is that for any page that has export const prerender = true; neither the preload headers (Link) or markup <link rel="preload" href="style.css" as="style" /> exists at all.

See sample code.

There's no reason to duplicate <link rel="stylesheet"> as <link rel="preload">. It won't speed anything up — in fact it will slow things down because you're sending extra markup unnecessarily.

https://web.dev/preload-critical-assets/#preloading-css-files

There is no need to preload the stylesheets on the SvelteKit homepage. The point of preload is to tell the browser about stylesheets that are being lazy-loaded with JS so it can start fetching them before they're needed. The web.dev article you linked only talks about preloading CSS in the context of loading it with JS:

If you are using the critical CSS approach, you split your CSS into two parts. The critical CSS required for rendering the above-the-fold content is inlined in the  of the document and non-critical CSS is usually lazy-loaded with JavaScript. Waiting for JavaScript to execute before loading non-critical CSS can cause delays in rendering when users scroll, so it's a good idea to use  to initiate the download sooner.
https://web.dev/preload-critical-assets/#preloading-css-files

For the SvelteKit homepage, the stylesheets are already being loaded via the head, not with JS, so adding extra link tags with "preload" won't speed anything up. And as Rich mentioned, it increases the sent markup unnecessarily, so it actually slows things down.
<link href="./_app/immutable/assets/_layout-4d3fe515.css" rel="stylesheet">
<link href="./_app/immutable/assets/SkipLink-278549ba.css" rel="stylesheet">
<link href="./_app/immutable/assets/SearchResults-1df3fdcb.css" rel="stylesheet">
<link href="./_app/immutable/assets/_page-134b8b92.css" rel="stylesheet">

If you inspect the network trace, you'll see that the stylesheets are loaded immediately after the HTML document is parsed. Adding rel="preload" won't speed this up.


Adds note about auto-deploys

I was updating Eigen's docs and noticed that these were out of date.

Thank you 🎉 ❤  This kept slipping off my todo-list 😅

:rocket: PR was released in v1.19.7 :rocket:


Beacon RPC bug -- GetEpochInformation can freeze the OS

Reproduce:

Create a EpochInformationRequest.
Set EpochInformationRequest.EpochIndex to very large number (tested 10000000).
Call a Beacon node's GetEpochInformation with the request.

The Beacon node will eat up all RAM and freeze the OS.

We should set a limit on how far ahead to simulate empty blocks (probably around 1-2 epochs). If it requests more than that, we should return that there is no epoch information currently (needs to be synced up with the network).


Folders / Groups?

Is it possible to add support for Folders / Groups in the drop down menu?

I think yes, and this is a great idea. Thank you!
I will try to implement this as soon as possible.

Implemented in the "Folders" (1.2.0) release.


Docker support: Make client hostname configurable for hmr

Description
Current issue:
When starting vite inside a docker container, we need to specify <IP_ADDRESS> as the host for the hmr websocket, so that it connects to the outside network.
{
    server: {
        host: "<IP_ADDRESS>",
        port: 8081,
        hmr: {
            protocol: "ws",
            host: "<IP_ADDRESS>",
            port: 64999,
            clientPort: 64999,
        },
    },
}

Then if we pass the port out, we can now connect with the websocket on localhost:64999. But the same host, that we configured (<IP_ADDRESS>), is used from the frontend to connect to this socket, which obviously fails.
There is already an option for specifying a client port, but it is not yet possible to change the host for the client to connect.
Suggested solution
My suggestion for a simple solution:

add clientHost?: string below here: https://github.com/vitejs/vite/blob/main/packages/vite/src/node/server/hmr.ts#L20
change https://github.com/vitejs/vite/blob/main/packages/vite/src/node/plugins/clientInjections.ts#L22 to const host = hmrConfig?.clientHost || hmrConfig?.host || null

Alternative
No response
Additional context
In the end it is possible to use following configuration to use vite inside a Docker container.
{
    server: {
        host: "<IP_ADDRESS>",
        port: 8081,
        hmr: {
            protocol: "ws",
            host: "<IP_ADDRESS>",
            clientHost: "localhost",
            port: 64999,
            clientPort: 64999,
        },
    },
}

Validations

[x] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

This is a duplicate of #8666.
Would you comment what your setup is?
browser -(http 8081)-> docker -> vite (8081)
browser -(ws 64999)-> docker -> vite (64999)
If it is like above, the config below would work for Vite 3.0.0-beta.
{
    server: {
        host: "<IP_ADDRESS>",
        port: 8081
    },
}


Error loading plugin in MayaLT 2020

This is the error I get every time i try to load the plugin.
// Error: file: /Applications/Autodesk/mayaLT2020/Maya.app/Contents/scripts/others/pluginWin.mel line 317: Plug-in, "/Users/Shared/Autodesk/maya/2020LT/plug-ins/glTFExport.py", was not found on MAYA_PLUG_IN_PATH. //

It should be glTFTranslator.py that goes in the plug-in directory.  In any case, I don't think Maya LT supports custom plugins:
https://knowledge.autodesk.com/support/maya-lt/learn-explore/caas/CloudHelp/cloudhelp/2020/ENU/MayaLT-CustomizingMayaLT/files/GUID-6613719F-FDFD-416A-AD7A-8DFEF6B4DEC8-htm.html


Stop explicitly disabling CGO

Addresses CVE-2023-3089

/hold for CI to pass. It seems Prow is not set to block on this as I just enabled GitHub actions on this repo.

Oops, actually the 1.20 would require more upgrades--I didn't notice this was release-0.2, so upgrading the builder image doesn't make sense unless we're upgrading everything else also.

/unhold since CI is broken from the previous maintainer and this is time sensitive.


Test PR

Pull Request checklist
Please review the below PR requirements:

Build was run locally and any changes were pushed
Ensure that the title clearly describes the changes
Issue to be referenced in the PR description rather than in the commits or PR title
Clean commit history

Can you make a copy of this branch https://github.com/saving-satoshi/saving-satoshi/pull/349 (git checkout -b branch-copy) then make a PR for that?


Comparisons w tolan et al

Great work! I’m an author of the tolan et al paper and am interested in the applications of depth anything and better decoders.
id love to be able to learn from your research to improve our future models, which are also trained on NEON patches. Would you be able to share which of the neon patches you discarded? We used all 5600 of them without regard for their quality.
also, we have smaller versions of the ViT weights if you’re interested

Thanks also for your insightful resource. I am adding the parquet to the repository.
Note: the EarthView repository is quite messy, and my annotations are made on the Arrow files created by HuggingFace when converting the dataset locally. I wonder if they solved the issues with the dataset.
I would be happy to follow future development

The information you are searching for is here in qalign_scores.parquet


The % (Remainder) operator is named incorrectly in the docs

https://github.com/dotnet/docs/blob/master/docs/csharp/language-reference/operators/modulus-operator.md
https://github.com/dotnet/docs/blob/master/docs/csharp/language-reference/operators/index.md
This operator is named incorrectly in the documentation. It should be "Remainder" not "Modulus".
In C#, the functionality of the % operator is the Remainder function. The Remainder function returns a value that is the remainder after standard division. For example, 10 % 3 is 1, and this is true for both Remainder and Modulus.
The difference between these two is with negative numbers.

The standard integer division -10 / 3 is -3 so the Remainder can be found with -10 - (-3)*3 which is -1. Remainder of a and b returns a value on the range (b, b) (both exclusive).

However, the Modulus function of -10 and 3 would return 2. Modulus satisfies a similar formula but with floored division. Floor division of -10 and 3 is -4 instead of -3, and -10 - (-4)*3 is 2. Modulus of a and b returns a value on the range [0, b) (0 inclusive, b exclusive).

C# does not have operators for Modulus or floored division, only Remainder and standard division. The docs should reflect this, so all documentation for % should be renamed to Remainder.

Here's Eric Lippert's thoughts on the issue: https://blogs.msdn.microsoft.com/ericlippert/2011/12/05/whats-the-difference-remainder-vs-modulus/
It's easy to see why this confusion exists, as Remainder and Modulus are equivalent functions for positive numbers. But they are not the same operations. Describing % as Modulus leads to confusion: https://stackoverflow.com/questions/10065080/mod-explanation

@aaronfranke you are right, thank you for reporing the issue.While the operator page itself doesn't mention modulus, the URL address might be misleading (I would rename the filename). The description in the operators table should be fixed. I am willing to update both pages to add clarifications.

I'm not sure the terminology is as clear as you imply:

Eric Lippert is very careful in his article to use the term canonical modulus, which is not the same as just "modulus".
The Wikipedia article about this issue, Modulo operation says "modulus" is a synonym of "modulo", which covers all the options. And it describes the two options as "remainder of truncated division" and "remainder of  Euclidean division".

Do you have a source that actually uses the terminology that you suggest? Otherwise, I think changing the name is not really important and won't solve any confusion. If there is confusion, the description of the operator should be made clearer instead.

It's confusing now, because both names are used in docs. We should select only one.

Regardless of what the mathematical definition is, nearly every programming language defines Remainder and Modulus this way. Plus we don't have to mention the term "Modulus" unless we want to add a clarification like "The Remainder operator is not to be confused with canonical Modulus"

I think both @aaronfranke and @svick are right.
While for mathematicians, modulus is clear and coincides with the canonical modulus term, and they build the whole world of it, in computing, people like to argue about the definition of modulus as the Wiki article referenced by @svick demonstrates. The dangerous part with using modulus term is that some mathematicians might be confident in what % modulus operator does and be just wrong at the same time.
Remainder definition depends on the answer to the question: What kind of division do we talk about? I hope when one sees remainder term, one is more aware about the questions that should appear in one's head.
To summarize, in context of programming languages, both modulus and remainder terms might have various definitions for themselves. That implies:

it's better to use only one term to reduce the amount of confusion
the chosen term should be clarified: what definition is in use by the language.

As for the term to select, I suggest to use remainder as

it's already used in the docs with modulus injections here and where
the last sentence from the referenced article of Eric Lippert is The % operator does not give the canonical modulus, it gives the remainder.

To make definitions more clear, the following should be done:

article on division should have a remark about rounding to zero for the integer arithmetic
article on remainder should reference the division article and have a remark what happens when operands have different signs (not demonstrate that only by the example, as it is now)
overview page should mention only remainder term.

@svick @aaronfranke what do you think? If that sounds like a plan, I'll make the PR for that.

@aaronfranke @pkulikov @svick Cool discussion
I checked the official ECMA spec proposal for C# 5, and the draft C# 6.0 specification. Both use Remainder exclusively.
I propose we adopt the same in docs: remainder is the preferred term.
There are two locations where this could be problematic, or needs further explanation:

The IL operator is Op_modulus (noted in operator overloading): In this instance, we should continue to use Op_modulus as the correct term.
The System.Decimal type contains a method named Remainder and a topic for the Modulus operator. Both perform the same operations. I propose changing the title of the Modulus operator to Remainder operator.

/cc @madsTorgersen for a quick review.
@aaronfranke This would involve changing file names. Whenever we change a file name, we update the .openpublishing.redirection.json file in the root directory to ensure incoming links work and search results redirect correctly. Internal links are all updated to the new file. Let me know if you have any questions.

@pkulikov @BillWagner Consistently using "remainder" sounds good to me.


js-yaml vulnerabilities

Thanks again for the awesome boilerplate. I've learned so much using it!
I noticed today I'm having some dependency issues with js-yaml in the postcss-loader. I tried to fix it by updating on my own, but I'm not sure I can. The code injection vulnerability sounds particularly unfriendly.
Not sure if this is a real issue or not, but definitely curious to learn more about a fix.

Are you having issues besides it just being a vulnerability?
You can't really update deeper dependencies (js-yaml) of the top level dependencies (post-css). Generally just reach out to post-css in an issue and let them know what's going on. They'll either already know and are working on a fix, or working on updating their dependencies without breaking anything. Or may even provide a temp fix.
Npm just says to update js-yaml to 3.13.1, and we're on 3.13.0. But there might be a reason why they haven't yet.
If you look into it more, let me know what you figure out :)

@MelanieL
So, it finally got sorted out! Sometimes you just have to wait.
This is the email I got, and refer to this pull request that automatically fixed it for me.

They got bots that do the dirty work now!

Sweet, thanks!!!


Methods for handling duplicates

Issue: #1
Comment on the PR
First was added the argument parse, with first argument the path and second --duplicates, optional
(default value skip)
The argument duplicates have 4 choices: [skip, over, pref, suff]

skip: skip the duplicated file
over: overwrite the duplicated file
pref:  add a prefix to the duplicated file
suff: add a suffix to the duplicated file

The way this is handled is with a dictionary where the keys  are the 4 choices and the value are the functions that implement that behaviour.
In this way should be easy to change the strings or the expected behaviour.
Improvement
The only part I don't really like is the global variable count_int that is used for adding the right prefix/suffix.
That can be improved

here you are!
I hope everything is fine.


[WIP] [Based on #26] Support reference types (and a pinch of DSTs)

This PR implements Abomonation for most references types, and a few DSTs along the way. It is what I had in mind while opening #27 . The main advantage of implementing Abomonation for these types is that it becomes much easier to serialize types containing Rust references (which are, after all, almost like every other pointer).
This PR raises a few questions that we may want to discuss here:

Do we want to do this?

See #27 for a discussion of pros and cons

Do we also want to fully support DSTs in Abomonation?

Currently, the Abomonation DST impls of this PR are only here 1/as a fun experiment and 2/because they are a more convenient place for deduplicating impls than free functions)
If we want full DST support in Abomonation, then we'll also need to make encode/decode/measure and tests accept T: ?Sized, which from a quick attempt won't be so easy. We may also want ?Sized bounds on some generic Abomonation impls like that of Box<T>
This would answer #18 since DSTs may currently only be passed to functions by reference.

Can we and do we want to also implement Abomonation for dyn Trait and &[mut] dyn Trait where Trait: Abomonation?

For convenience reasons, this PR is based on #22, #24, #25 and #26. Reviewing these PRs first is recommended, but if you want to review this one in isolation, please consider doing so commit-by-commit in order to get a clean diff.
Fixes #27 .

I have pushed a draft of the Abomonation<'bytes> tweak that we discussed in #27 , but it has a bunch of FIXMEs that I hope to improve upon before merging.

Alright, I think this one is now ready to go (though by virtue of being on the top of the PR stack, it will probably go in last).


Support for using own Representation Serializer

I would like to support something similar as discussed in this issue: https://github.com/getsentry/sentry-php/issues/889

Old: Object: App\Entity\SomeEntity
New: Object: App\Entity\SomeEntity(#123)

A solution for this would be this:
use Sentry\Serializer\Serializable;

class ExampleObject implements Serializable
{
    private $id = 123;

    public function toSentry(): array
    {
        return [
            'internal_state' => 'Object: ExampleObject(#' . $this->id . ')' ,
        ];
    }
}

But I would rather have a more re-usable solution, via a custom Serializer:
# sentry.yaml
sentry:
  representation_serializer: App\Sentry\RepresentationSerializer

# App\Sentry\RepresentationSerializer.php

class RepresentationSerializer extends AbstractSerializer implements RepresentationSerializerInterface
{
    public function representationSerialize($value)
    {
        if (\is_object($value)) {
            return 'Object ' . \get_class($value) . '(#' . $value->getId() . ')';
        }
    }
}

For this we need to be able to pass a custom Serializer to this bundle. Would it be possible to support using a custom Serializer with the sentry-symfony bundle?
https://github.com/getsentry/sentry-symfony/blob/master/src/DependencyInjection/SentryExtension.php#L123-L125

IMHO this should be handled using custom class serializers, which is documented in the readme: https://github.com/getsentry/sentry-symfony#custom-serializers
Adding an interface that has getId to intended classes should make the trick.


refactor: args to flags, values to args

Based on #12, and sifting through online conversations like this, this refactor
proposes using the terminology "args" for options that take arguments,
and "flags" for options that are boolean.
Fixes #12

CC: @shadowspawn

Short version: I think it is an improvement. 👍

To expand a little:

I think flags is much better than using args for the boolean options
this PR uses "args" for the "option arguments" which is a justification but a little subtle. Could be optionArgs, but then should it be optionFlags for symmetry? Names are hard! (And I care.)
I was ok with values

I would say that "args" is an umbrella term that includes flags.

Seconding that viewpoint, the routine we are implementing is called parseArgs. 🙂

Of note for consistency, the configuration property for setting up the parsing is called withValue.

so we're leaning towards flags and values? and dropping uses of args?

@iansu @shadowspawn @ljharb take a look.

LGTM
(Changed title to match latest code.)


Wrong theme with loading=lazy

Hi,
I'm using the react component as follows:
function Comments({ className = '' }) {
  const theme = useGiscusTheme()
  return <Giscus
      ...
      theme={theme}
      loading='lazy'
  />
}

If I scroll down and load the comments, then changing the theme works correctly. But if the theme changes before giscus has a chance to load, it won't pick it up and the following error is logged:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://giscus.app') does not match the recipient window's origin ('http://localhost:3002').

Am I doing something wrong?

Could you update to the latest version (v2.2.8) and see if this issue still exists?

v2.2.8 fixed the issue. Thank you @laymonage 👏


Why the parameters of openai api like top_p and temperature is fixed?

The bug
A clear and concise description of what the bug is.
When I use my self-hosted llm model with OpenAI like api, I found guidance always set the temperature as 0. However, because some reasons, my llm model will always return nothing when the temperature is 0.
After checking the source code corresponding to the OpenAI, I found the parameters like top_p and temperature are fixed and can't be passed through argument.
Is there any reason for this design?
The source code about this problem please see https://github.com/guidance-ai/guidance/blob/510200bf9c3756bcc5a49f67bfdbde2b10139ab2/guidance/models/_openai.py#L87-L95
To Reproduce
Give a full working code snippet that can be pasted into a notebook cell or python file. Make sure to include the LLM load step so we know which model you are using.

Thanks! No reason, other than we forgot to patch that through. (for local models temperature is controlled in the grammar, for remote endpoints we can't change the temp so easily so we actually care about the default temp set in the constructor)

Thanks! No reason, other than we forgot to patch that through. (for local models temperature is controlled in the grammar, for remote endpoints we can't change the temp so easily so we actually care about the default temp set in the constructor)

Thanks for your reply!
An option to control the temperature parameter is very useful for me, should I pull a request to fix it?

Also need to modify OpenAI generation parameters. I use response_format={"type": "json_object"} in the prompt when calling newer gpt-3.5 models, but guidance does not allow me to add this parameter. It dissuades me from using guidance 0.1 (0.0.65 could do that)😣


[FEATURE] ... Scalping 5m

Hello sir,
Excellent work.. congratulations!
Please, can you share a config for scalping 5 minutes?
This is my actual config but is for intraday and maybe it has a lot of unnecessary options.
https://pastebin.com/4pB5vuXG
Thanks in advanced

Thanks for your gratitude ! I'm sorry but, I don't have this type of configuration. You can ask on the Discord.


Generate random test data that mimic a large OpenMRS HIV  dataset

@kimaina  to calculate these summary statistics to help in the generation of data

For virally suppressed  and unsuppressed patients calculate the average number of encounters per year
Average number of LTFUs per year, days since rtc > 30
Assume all patients are on ARVs

Thanks, @jecihjoy  for documenting this!

Please find attached monthly summary statistics for key metrics in the past 5 years (2015-2020). To improve granularity, I have provided monthly instead of yearly summaries so that when we generate the synthetic can reflect this distribution of encounters.
encounters_monthly_aggregates.xlsx
Here is the SQL query used to generate (FYI this is just a draft and not final):
SELECT
	date_format(encounter_datetime,'%m-%Y') as month_year,
	MONTH(encounter_datetime) as month,
	YEAR(encounter_datetime) as year,
    COUNT(DISTINCT `encounter_id`) AS distinct_encounters,
	COUNT(DISTINCT `visit_id`) AS distinct_visits,
	COUNT(DISTINCT if(prev_clinical_datetime_hiv is null,`person_id`,null)) AS newly_enrolled,
    COUNT(DISTINCT if(encounter_datetime >= arv_start_date,`person_id`,null)) as patients_on_arvs,
    COUNT(DISTINCT if((encounter_datetime < arv_start_date  or arv_start_date is null),`person_id`,null)) as patients_not_on_arvs,
	COUNT(DISTINCT if(vl_1 < 1000, `encounter_id` ,null)) as vl_suppressed_encounters,
    COUNT( DISTINCT if(vl_1 >= 1000, `encounter_id`,null)) as vl_failure_encouunters,
    COUNT( DISTINCT if( timestampdiff(day, if(rtc_date, rtc_date, DATE_ADD(encounter_datetime, INTERVAL 30 DAY)), endDate) > 90,  `person_id`, null)) as LTFU

FROM
    etl.dates
JOIN etl.flat_hiv_summary_v15b  on date(encounter_datetime) <= date(endDate)
WHERE is_clinical_encounter = 1  and (next_clinical_datetime_hiv is null or date(next_clinical_datetime_hiv) > endDate) and
encounter_datetime >= timestamp(date("2015-01-01"))  #and encounter_datetime<= date('2020-03-01')
group by MONTH(encounter_datetime),  YEAR(encounter_datetime)
order by encounter_datetime desc

@kimaina Thanks!
For generating VL values, from what I've understood, AMPATH pretty much consistently has actual VL values reported in the resulting Obs, but this isn't the case for all implementations. See this comment by Mike Seaton and just my general overview of the landscape I reviewed. So the question is: do we want to simulate data where we always have a numeric VL result or should we include some number of these non-numeric results? Opinions?

So the question is: do we want to simulate data where we always have a numeric VL result or should we include some number of these non-numeric results? Opinions?

I think we should simulate both quantitative and qualitative VL results since the majority of implementers have both. From my experience working on this, we normally have 2 different concepts representing either the quantitative value or the VL qualifier (LDL or <300).

I'm surprised but I supposed it's possible that people are recording this
categorically. Does anyone have an example of a ciel concept that people
are using to record this?
On Wed, Nov 11, 2020 at 9:35 AM Allan Kimaina<EMAIL_ADDRESS>wrote:

So the question is: do we want to simulate data where we always have a
numeric VL result or should we include some number of these non-numeric
results? Opinions?
I think we should simulate both quantitative and qualitative VL results
since the majority of implementers have both. From my experience working on
this, we normally have 2 different concepts representing either the
quantitative value or the VL qualifier (LDL or <300).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/GoogleCloudPlatform/openmrs-fhir-analytics/issues/59#issuecomment-725559089,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AABCFHVNIOXXSSV2EWSDNSLSPLDM7ANCNFSM4TQ6GYPQ
.

--
Jonathan Dick, MD
Chief Medical Information Officer, AMPATH
Assistant Professor of Clinical Medicine, IU School of Medicine
Research Scientist, Regenstrief Institute Inc.

@jonathandick CIEL:1305 (qualitative VL) is the base concept for qualitative VLs and at least CIEL:1302 (Not detected) and CIEL:1306 (Beyond detectable limit) are used to record suppressed VLs in KenyaEMR and UgandaEMR respectively. No idea how PIH are representing the "< 300" or "< 500" part. Theoretically, OpenMRS has a ComplexNumeric datatype to handle those, but AFAIK it's never actually been used.

@kimaina Could you get us an estimate of the # encounters and visits / year (or month) for suppressed versus non-suppressed patients? JJ had indicated that VL non-suppressed patients will be seen more regularly and I'd like a way to estimate that, if possible. Thanks!

@kimaina Could you get us an estimate of the # encounters and visits / year (or month) for suppressed versus non-suppressed patients? JJ had indicated that VL non-suppressed patients will be seen more regularly and I'd like a way to estimate that, if possible. Thanks!

I have provided these 2 estimates in the above excel -->  distinct_encounters, distinct_visits, vl_suppressed_encounters and vl_failure_encouunters. I'll rename the above columns to be more readable in the next version

@ibacher  do you prefer monthly estimates or yearly estimates?

@kimaina Ah! I see... then do I have a way of estimating the percent of patients suppressed vs patients unsuppressed?

do you prefer monthly aggregates or yearly aggregates?

Monthly is generally more useful, I just wasn't sure if a single patient was likely to have multiple visits per month or not.

I'll also add-in

the number of unique patients per months
of these patients how many are suppressed
and how many are not

Monthly is generally more useful, I just wasn't sure if a single patient was likely to have multiple visits per month or not.

Monthly is generally more useful, I just wasn't sure if a single patient was likely to have multiple visits per month or not.

We can also do yearly + monthly aggregates

I have updated the query to include  a few more metrics as well as some of @jonathandick  and @ibacher  suggestions e.g :

How likely is it that a patient will remain active in care this month?
How likely is it that a patient will get a viral load test this month if the patient is eligible for a test?
How likely is it that the test will be < 1000?

This is still a draft and I still need to add @ibacher suggestions on

% of patients LTFU who return to care and, ideally, the meantime to return to care.

SELECT
	date_format(endDate,'%m-%Y') as month_year,
    # Visits
    SUM(hmsd.visit_this_month) AS `visit_this_month`,
    SUM(hmsd.scheduled_this_month) AS `scheduled_this_month`,
    SUM(hmsd.unscheduled_this_month) AS `unscheduled_this_month`,
    SUM(hmsd.enrolled_this_month) AS `enrolled_this_month`,

    # LTFU and active in care
    COUNT( DISTINCT `person_id` ) as distinct_patients,
    SUM(hmsd.active_in_care_this_month) AS `active_in_care_this_month`,
    AVG(hmsd.days_since_rtc_date) AS `avg_days_since_rtc_date`,
    COUNT( DISTINCT if( timestampdiff(day, if(rtc_date, rtc_date, DATE_ADD(encounter_date, INTERVAL 30 DAY)), endDate) > 90,  `person_id`, null)) as LTFU_since_2015,
    COUNT( DISTINCT if( timestampdiff(day, if(rtc_date, rtc_date, DATE_ADD(encounter_date, INTERVAL 30 DAY)), endDate) > 90  AND TIMESTAMPDIFF(DAY, encounter_date,`endDate`) <365,  `person_id`, null)) as LTFU_past_year,
    COUNT( DISTINCT if( timestampdiff(day, if(rtc_date, rtc_date, DATE_ADD(encounter_date, INTERVAL 30 DAY)), endDate) > 90  AND TIMESTAMPDIFF(DAY, encounter_date,`endDate`) <365/2,  `person_id`, null)) as LTFU_past_6months,
    COUNT( DISTINCT if( days_since_rtc_date > 90,  `person_id`, null)) as LTFU_this_month,
    COUNT( DISTINCT if(TIMESTAMPDIFF(DAY, death_date,`endDate`) < 30,`person_id`, null)) as deaths_this_month,
    COUNT( DISTINCT if(TIMESTAMPDIFF(DAY, death_date,`endDate`) < 365,`person_id`, null)) as deaths_past_year,
    COUNT( DISTINCT if(TIMESTAMPDIFF(DAY, transfer_out_date,`endDate`) < 30,`person_id`, null)) as transfer_out_this_month,
    COUNT( DISTINCT if(TIMESTAMPDIFF(DAY, transfer_out_date,`endDate`) < 365,`person_id`, null)) as transfer_out_past_year,

	# ART Status
	SUM(hmsd.art_revisit_this_month) AS `art_revisit_this_month`,
        SUM(hmsd.is_pre_art_this_month) AS `pre_art_this_month`,
	SUM(hmsd.on_art_this_month) AS `on_art_this_month`,
         SUM(hmsd.started_art_this_month) AS `started_art_this_month`,
	SUM(had_med_change_this_month) AS `had_med_change_this_month`,

     # ART Line
     SUM(hmsd.on_original_first_line_this_month) AS `on_original_first_line_this_month`,
     SUM(hmsd.on_alt_first_line_this_month) AS `on_alt_first_line_this_month`,
     SUM(hmsd.on_second_line_or_higher_this_month) AS `on_second_line_or_higher_this_month`,

	# Viral Load
    COUNT( DISTINCT if(vl_1 < 1000 AND TIMESTAMPDIFF(DAY, vl_1_date,`endDate`) < 30, `encounter_id`, null)) as vl_suppressed_encounters_this_month,
    COUNT( DISTINCT if(vl_1 >= 1000 AND TIMESTAMPDIFF(DAY, vl_1_date,`endDate`) < 30, `encounter_id`, null)) as vl_unsuppressed_encounters_this_month,
    COUNT( DISTINCT if(vl_1 < 1000 AND TIMESTAMPDIFF(DAY, vl_1_date,`endDate`) < 30, `person_id`, null)) as vl_suppressed_patients_this_month,
    COUNT( DISTINCT if(vl_1 >= 1000 AND TIMESTAMPDIFF(DAY, vl_1_date,`endDate`) < 30, `person_id`, null)) as vl_unsuppressed_patients_this_month,
    COUNT( DISTINCT if(vl_1 < 1000 AND TIMESTAMPDIFF(DAY, vl_1_date,`endDate`) < 365, `person_id`, null)) as vl_suppressed_patients_past_year,
    COUNT( DISTINCT if(vl_1 >= 1000 AND TIMESTAMPDIFF(DAY, vl_1_date,`endDate`) <365, `person_id`, null)) as vl_unsuppressed_patients_past_year,
    COUNT( DISTINCT if(vl_1 < 1000 AND TIMESTAMPDIFF(DAY, vl_1_date,`endDate`) < 365, `encounter_id`, null)) as vl_suppressed_encounters_past_year,
    COUNT( DISTINCT if(vl_1 >= 1000 AND TIMESTAMPDIFF(DAY, vl_1_date,`endDate`) < 365, `encounter_id`, null)) as vl_unsuppressed_encounters_past_year,

	SUM(hmsd.due_for_vl_this_month) AS `due_for_vl_this_month`,
	SUM(hmsd.qualifies_for_follow_up_vl) AS `qualifies_for_follow_up_vl`,
        SUM(hmsd.got_follow_up_vl_this_month) AS `got_follow_up_vl_this_month`,
        SUM(hmsd.follow_up_vl_suppressed_this_month) AS `follow_up_vl_suppressed_this_month`,
        SUM(hmsd.follow_up_vl_unsuppressed_this_month) AS `follow_up_vl_unsuppressed_this_month`,
        SUM(hmsd.follow_up_vl_suppressed_this_month) AS `follow_up_vl_unsuppressed`,
        SUM(hmsd.follow_up_vl_suppressed_this_month) AS `follow_up_vl_suppressed`,
        AVG(hmsd.num_days_to_follow_vl) AS `avg_num_days_to_follow_vl`

FROM
    etl.hiv_monthly_report_dataset_frozen `hmsd`
WHERE
    (endDate >= '2015-01-01')
GROUP BY endDate
order by endDate desc

@kimaina Thanks for the update on this! Just to ensure this is properly documented, I'm creating a little simulator for this data over in this repo: https://github.com/ibacher/hiv-test-data.

hey, @ibacher I have completed generating the necessary data elements for generating the required metrics for the simulation. Quick question, do you prefer proportions or percentages?

I’ve been converting everything into percentages, apart from raw counts, but whatever is easiest!

you mean proportions, right! I'm happy to provide proportions and counts

I have completed creating the query with the recommendations, I'll be running it during off-peak to generate the dataset then get back to you

I have completed creating the query with the recommendations, I'll be running it during off-peak to generate the dataset then get back to you

Hi @ibacher
Please see the PR: https://github.com/ibacher/hiv-test-data/pulls
You will find:

proportions.csv containing key proportions
script.Rmd is the R script used to generate portions
2020_monthly_aggregates_v2.csv raw dataset containing over 55 indicators

Hi @ibacher
Please see the PR: https://github.com/ibacher/hiv-test-data/pulls
You will find:

proportions.csv containing key proportions
script.Rmd is the R script used to generate portions
2020_monthly_aggregates_v2.csv raw dataset containing over 55 indicators

@kimaina Thanks for the PRs and all the data!

@kimaina Thanks for the PRs and all the data!

This is handled in #179.


Get error: 'Gradient function not returning enough gradient'

I update mxnet to the latest version, then run my code which works fine for old versions. It gives me error as Gradient function not returning enough gradient. What is this? I can not find any information about this.

This issue is closed due to lack of activity in the last 90 days. Feel free to ping me to reopen if this is still an active issue. Thanks!
Also, do please check out our forum (and Chinese version) for general "how-to" questions.


[glaze] Update to 2.9.0

[x] Changes comply with the maintainer guide.
[x] SHA512s are updated for each updated download.
[ ] The "supports" clause reflects platforms that may be fixed by this new version.
[ ] Any fixed CI baseline entries are removed from that file.
[ ] Any patches that are no longer applied are deleted from the port's directory.
[x] The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
[x] Only one version is added to each modified port's versions file.

saucer:x86-windows
saucer:x64-windows
saucer:x64-windows-static
saucer:x64-windows-static-md
saucer:arm64-windows

Above triplets failed with below errors:
D:\b\saucer\src\v2.1.0-249e2e083b.clean\include\saucer\serializers\glaze\glaze.inl(70): error C3878: syntax error: unexpected token 'identifier' following 'expression'
D:\b\saucer\src\v2.1.0-249e2e083b.clean\include\saucer\serializers\glaze\glaze.inl(70): note: error recovery skipped: 'identifier'
D:\b\saucer\src\v2.1.0-249e2e083b.clean\include\saucer\serializers\glaze\glaze.inl(74): error C2065: 'error': undeclared identifier
D:\b\saucer\src\v2.1.0-249e2e083b.clean\include\saucer\serializers\glaze\glaze.inl(77): error C2065: 'error': undeclared identifier
D:\b\saucer\src\v2.1.0-249e2e083b.clean\src\serializer.glaze.cpp(41): error C2039: 'parse_error': is not a member of 'glz'
D:\b\saucer\src\v2.1.0-249e2e083b.clean\src\serializer.glaze.cpp(41): error C2065: 'parse_error': undeclared identifier
D:\b\saucer\src\v2.1.0-249e2e083b.clean\src\serializer.glaze.cpp(41): error C2923: 'tl::expected': 'parse_error' is not a valid template type argument for parameter 'E'
D:\b\saucer\src\v2.1.0-249e2e083b.clean\src\serializer.glaze.cpp(41): error C2955: 'tl::expected': use of class template requires template argument list
D:\b\saucer\src\v2.1.0-249e2e083b.clean\src\serializer.glaze.cpp(58): error C2672: 'parse_as': no matching overloaded function found
D:\b\saucer\src\v2.1.0-249e2e083b.clean\src\serializer.glaze.cpp(58): error C3536: 'res': cannot be used before it is initialized
D:\b\saucer\src\v2.1.0-249e2e083b.clean\src\serializer.glaze.cpp(60): error C2672: 'std::make_unique': no matching overloaded function found
D:\b\saucer\src\v2.1.0-249e2e083b.clean\src\serializer.glaze.cpp(63): error C2672: 'parse_as': no matching overloaded function found
D:\b\saucer\src\v2.1.0-249e2e083b.clean\src\serializer.glaze.cpp(63): error C3536: 'res': cannot be used before it is initialized
D:\b\saucer\src\v2.1.0-249e2e083b.clean\src\serializer.glaze.cpp(65): error C2672: 'std::make_unique': no matching overloaded function found
D:\b\saucer\src\v2.1.0-249e2e083b.clean\include\saucer\serializers\glaze\glaze.inl(70): error C3878: syntax error: unexpected token 'identifier' following 'expression'
D:\b\saucer\src\v2.1.0-249e2e083b.clean\include\saucer\serializers\glaze\glaze.inl(70): note: error recovery skipped: 'identifier'
D:\b\saucer\src\v2.1.0-249e2e083b.clean\include\saucer\serializers\glaze\glaze.inl(74): error C2065: 'error': undeclared identifier
D:\b\saucer\src\v2.1.0-249e2e083b.clean\include\saucer\serializers\glaze\glaze.inl(77): error C2065: 'error': undeclared identifier

@jbbjarnason Could you please fix these errors? All of the failure logs at here.

@Cheney-W How can I enable c++23 for the msvc compiler in the pipelines, the following error occurs:
warning STL4038: The contents of <expected> are available only with C++23 or later.

How to enable it?
However, it is quite frustrating to enforce fix on users of the library being updated.

Does the upstream agree with your modification?
If you need to use C++23 in MSVC, you can enable it by adding a compilation option in the CMakeLists.txt of source.

@Cheney-W I will close the PR, it's too time consuming to fix users(saucer) of glaze library which I am not using.


YPFonts (in progress)

Adding YPFonts struct to easily change fonts in the YPImagePicker library!

Added YPFonts struct
Added fonts to YPConfig
Trying to change all fonts in lib to YPConfig.fonts.fontName so we can easily change fonts if we need

@Tripwire999 This is really cool !
This has to be thoroughly tested since it's quite a big change but I think it's a great addition.
This is in line with all the other existing customisation apis so 💯

@s4cha Yeah it is :) I didn't really have time to wrap it up though. Hopefully I'll be able to wrap it up soon.

This already looks good to me, let's have this already and if we need more customisation we'll issue another PR :)


air: 1.46.0 -> 1.49.0

Diff: https://github.com/cosmtrek/air/compare/v1.46.0...v1.49.0
Description of changes
Update air to latest version.
Things done

Built on platform(s)

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

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

[x] 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

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

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

[x] Fits CONTRIBUTING.md.

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

1 package built:

air


Detect stationary mode

Hi,
Let me start by saying that your plugin is really awesome and thank you so much for all your hard work. I'm also considering if my app goes well to get the premium Android version (since now I'm only using it for iOS).
I was wondering if there is any way to detect whether the device is in STATIONARY mode or not?
I checked the JSON object that is passed to the callback function and I don't see any fields regarding the mode. I thought for a second to use the speed property to determine whether the user is moving or not, but there were times where the mode was MOVING (in the debug messages) but the speed was -1.
Thank you for your help.
Best regards,
Alex

In premium Android version, yes.

STILL
IN_VEHICLE
BICYCLE
RUNNING

There's a few more.
As for ios, I've been investigating implementing accelerometer api.  You
might be able to use core cordova accelerometer api yourself, independent
of my plugin.
On Wednesday, March 11, 2015, MaliciousMustard<EMAIL_ADDRESS>wrote:

Hi,
Let me start by saying that your plugin is really awesome and thank you so
much for all your hard work. I'm also considering if my app goes well to
get the premium Android version (since now I'm only using it for iOS).
I was wondering if there is any way to detect whether the device is in
STATIONARY mode or not?
I checked the JSON object that is passed to the callback function and I
don't see any fields regarding the mode. I thought for a second to use the
speed property to determine whether the user is moving or not, but there
were times where the mode was MOVING (in the debug messages) but the
speed was -1.
Thank you for your help.
Best regards,
Alex
—
Reply to this email directly or view it on GitHub
https://github.com/christocracy/cordova-plugin-background-geolocation/issues/154
.

--
Snet from Gmail Mobile

I think the premium Android performance is better than ios (and I'm really
satisfied with ios performance).
Android is much more responsive at detecting when device is moving,
typically within 10 meters.  It can detect stationary very quickly
(configurable sample-rate; typically 10-30 seconds).
This sort of "activity detection" api is only possible on ios with M7
coprocessor (5s+).
For Android, it works great on my relatively old Nexus 4.
On Wednesday, March 11, 2015, MaliciousMustard<EMAIL_ADDRESS>wrote:

Hi,
Let me start by saying that your plugin is really awesome and thank you so
much for all your hard work. I'm also considering if my app goes well to
get the premium Android version (since now I'm only using it for iOS).
I was wondering if there is any way to detect whether the device is in
STATIONARY mode or not?
I checked the JSON object that is passed to the callback function and I
don't see any fields regarding the mode. I thought for a second to use the
speed property to determine whether the user is moving or not, but there
were times where the mode was MOVING (in the debug messages) but the
speed was -1.
Thank you for your help.
Best regards,
Alex
—
Reply to this email directly or view it on GitHub
https://github.com/christocracy/cordova-plugin-background-geolocation/issues/154
.

--
Snet from Gmail Mobile

Thanks for the quick reply!
Hmm, I think I wasn't very clear on the description of the problem. I'm quite happy with the frequency of the updates for iOS. But what I was asking is if it's possible for a specific location update to also get the mode.
For example, if I enable debug, then I can see notifications like:
Location update: STATIONARY
SPD: -1 | DF: 15 | ACY: 65

or if moving:
Location update: MOVING
SPD: 1 | DF: 15 | ACY: 65

So it looks like the plugin can recognize if it's STATIONARY or MOVING. In the code I have a function like:
var callbackFn = function (location) {
    ....
}

I was wondering whether I can get the mode for a specific location update (if it's another argument I can pass in my callback function or some kind of configuration).

The plugin has 2 modes: stationary & moving.
When stationary, plugin has setup a geofence and goes to sleep.  That's
stationary.  When you break out of geofence, aggressive tracking is engaged
and your app is awakened from suspended-mode, MOVING.
It's just an on/off switch.  The issue then is transmitting that state as
meta-data to callback.  Possible.  I'll have a look.
On Wednesday, March 11, 2015, MaliciousMustard<EMAIL_ADDRESS>wrote:

Thanks for the quick reply!
Hmm, I think I wasn't very clear on the description of the problem. I'm
quite happy with the frequency of the updates for iOS. But what I was
asking is if it's possible for a specific location update to also get the
mode.
For example, if I enable debug, then I can see notifications like:
Location update: STATIONARY
SPD: -1 | DF: 15 | ACY: 65
or if moving:
Location update: MOVING
SPD: 1 | DF: 15 | ACY: 65
So it looks like the plugin can recognize if it's STATIONARY or MOVING.
In the code I have a function like:
var callbackFn = function (location) {
....
}
I was wondering whether I can get the mode for a specific location update
(if it's another argument I can pass in my callback function or some kind
of configuration).
—
Reply to this email directly or view it on GitHub
https://github.com/christocracy/cordova-plugin-background-geolocation/issues/154#issuecomment-78390961
.

--
Snet from Gmail Mobile

Have you tried out my SampleApp?  There's an undocumented, ios-only method
#onStationary, which is executed when the stationary geofence is created.
That might help you.
Search SampleApp for usage
On Wednesday, March 11, 2015, Chris Scott<EMAIL_ADDRESS>wrote:

The plugin has 2 modes: stationary & moving.
When stationary, plugin has setup a geofence and goes to sleep.  That's
stationary.  When you break out of geofence, aggressive tracking is engaged
and your app is awakened from suspended-mode, MOVING.
It's just an on/off switch.  The issue then is transmitting that state as
meta-data to callback.  Possible.  I'll have a look.
On Wednesday, March 11, 2015, MaliciousMustard<EMAIL_ADDRESS><javascript:_e(%7B%7D,'cvml','notifications@github.com');>> wrote:

Thanks for the quick reply!
Hmm, I think I wasn't very clear on the description of the problem. I'm
quite happy with the frequency of the updates for iOS. But what I was
asking is if it's possible for a specific location update to also get the
mode.
For example, if I enable debug, then I can see notifications like:
Location update: STATIONARY
SPD: -1 | DF: 15 | ACY: 65
or if moving:
Location update: MOVING
SPD: 1 | DF: 15 | ACY: 65
So it looks like the plugin can recognize if it's STATIONARY or MOVING.
In the code I have a function like:
var callbackFn = function (location) {
....
}
I was wondering whether I can get the mode for a specific location update
(if it's another argument I can pass in my callback function or some kind
of configuration).
—
Reply to this email directly or view it on GitHub
https://github.com/christocracy/cordova-plugin-background-geolocation/issues/154#issuecomment-78390961
.

--
Snet from Gmail Mobile

--
Snet from Gmail Mobile

Oh you mean this one.
It looks exactly what I was looking for! I'll give it a try and get back to you.
Many thanks for your help. Keep up the great work!

That's the one.
On Wednesday, March 11, 2015, MaliciousMustard<EMAIL_ADDRESS>wrote:

Oh you mean this one
https://github.com/christocracy/cordova-plugin-background-geolocation/blob/master/example/SampleApp/www/js/index.js#L166-L180
.
It looks exactly what I was looking for! I'll give it a try and get back
to you.
Many thanks for your help. Keep up the great work!
—
Reply to this email directly or view it on GitHub
https://github.com/christocracy/cordova-plugin-background-geolocation/issues/154#issuecomment-78397304
.

--
Snet from Gmail Mobile

Just tried it out and it works fine! So I could use the stationary callback to detect when a user entered in stationary mode and the normal success callback for moving. And as for Android, this feature is supported in the premium version.
I'll close this issue.
Thank you again for your help!

Don't wait too long to send $ --  I'm going to double the price ;)
On Wednesday, March 11, 2015, MaliciousMustard<EMAIL_ADDRESS>wrote:

Just tried it out and it works fine! So I could use the stationary
callback to detect when a user entered in stationary mode and the normal
success callback for moving. And as for Android, this feature is supported
in the premium version.
I'll close this issue.
Thank you again for your help!
—
Reply to this email directly or view it on GitHub
https://github.com/christocracy/cordova-plugin-background-geolocation/issues/154#issuecomment-78400146
.

--
Snet from Gmail Mobile


Add docker build trigger after bundle builds

Signed-off-by: Peter Zhu<EMAIL_ADDRESS>Description
Add docker build trigger after bundle builds
Issues Resolved
#908
Check List

[x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #928 (a5d6e59) into main (f927925) will decrease coverage by 0.21%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #928      +/-   ##
==========================================
- Coverage   92.24%   92.02%   -0.22%
==========================================
  Files          88       88
  Lines        2321     2321
==========================================
- Hits         2141     2136       -5
- Misses        180      185       +5

Impacted Files
Coverage Δ

src/system/temporary_directory.py
82.75% <0.00%> (-13.80%)
:arrow_down:

src/system/os.py
92.30% <0.00%> (-7.70%)
: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 f927925...a5d6e59. Read the comment docs.


Power Audio Interface

Description of the new feature / enhancement
This is a functional requirement that aims to describe a tool that can be used to switch sound effects input/output and sound effects between different software using keyboard shortcuts. The purpose of this tool is to facilitate users to quickly adjust sound settings in different scenarios without having to open system settings or other sound control panels
Scenario when this would be used?

You’re watching a video on your computer, but you want a quick switch to your audio output device from speakers to headphones or vice versa.
You’re in a video conference but want to switch your audio input device from the built-in microphone to an external microphone or headset.

Supporting information
No response

Have you seen the new audio mixer? blogs.windows.com/windows-insider/2023/03/02/announcing-windows-11-insider-preview-build-25309
/feedbackhub


Improve min/maxcurrent limit UI

add lower min current options (0.125, 0.25, 0.5). No free form number input, they are messy on mobile. fixes #9595
existing non-integer values (e.g. set via API) will now show correctly in settings modal. fixes #9595
fixed phase-based min/max power estimation based on phasesConfigured and phasesActive fixes #6178

Note: 🧪 Feature remains experimental until we replace yaml config of this value with db persistance.
lower min current options

add existing non-int values

Is this nice features which I was asking for with a hint from evcc that it is available in the nightly version still only available there? (in my stable version 119.5 I cannot see the choice of the currents)


typo in project description: "that using"

The project description should be either:

sqlite3 driver for go that uses database/sql
sqlite3 driver for go using database/sql

Thank you


Bytetrack_visualizer node

Checklist

[X] I've read the contribution guidelines.
[X] I've searched other issues and no duplicate issues were found.
[X] I'm convinced that this is not my fault but a bug.

Description
As the publishers of the topics do not have any QoS profile, the code craches. It is better to make the systemDefaultQos, what do you think?
    image_sub_.subscribe(this, image_topic, conversion_type, rclcpp::SystemDefaultsQoS().get_rmw_qos_profile());
    rect_sub_.subscribe(this, rect_topic, rclcpp::SystemDefaultsQoS().get_rmw_qos_profile());
    uuid_sub_.subscribe(this, uuid_topic, rclcpp::SystemDefaultsQoS().get_rmw_qos_profile());

Expected behavior
Create a Subscriber.
Actual behavior
Can not make a subscriber, and make an error
>>> [rcutils|error_handling.c:108] rcutils_set_error_state()
[bytetrack_visualizer_node_exe-1] This error state is being overwritten:
[bytetrack_visualizer_node_exe-1]
[bytetrack_visualizer_node_exe-1]   'Unknown QoS history policy, at ./src/qos.cpp:61'
[bytetrack_visualizer_node_exe-1]
[bytetrack_visualizer_node_exe-1] with this new error message:
[bytetrack_visualizer_node_exe-1]
[bytetrack_visualizer_node_exe-1]   'create_publisher() failed setting topic QoS, at ./src/subscription.cpp:221'
[bytetrack_visualizer_node_exe-1]
[bytetrack_visualizer_node_exe-1] rcutils_reset_error() should be called after error handling to avoid this.
[bytetrack_visualizer_node_exe-1] <<<
[bytetrack_visualizer_node_exe-1]
[bytetrack_visualizer_node_exe-1] >>> [rcutils|error_handling.c:108] rcutils_set_error_state()
[bytetrack_visualizer_node_exe-1] This error state is being overwritten:
[bytetrack_visualizer_node_exe-1]
[bytetrack_visualizer_node_exe-1]   'create_publisher() failed setting topic QoS, at ./src/subscription.cpp:221, at ./src/rcl/subscription.c:109'
[bytetrack_visualizer_node_exe-1]
[bytetrack_visualizer_node_exe-1] with this new error message:
[bytetrack_visualizer_node_exe-1]
[bytetrack_visualizer_node_exe-1]   'invalid allocator, at ./src/rcl/subscription.c:219'
[bytetrack_visualizer_node_exe-1]
[bytetrack_visualizer_node_exe-1] rcutils_reset_error() should be called after error handling to avoid this.
[bytetrack_visualizer_node_exe-1] <<<
[bytetrack_visualizer_node_exe-1] invalid allocator, at ./src/rcl/subscription.c:219

Steps to reproduce

Run the bytetrack and bytetrack_visualizer
Run a bagfile which the image does not have any profile
the visualizer node will crash

Versions
-OS: ubuntu 22.04
-ROS: humble
Possible causes
No response
Additional context
No response

@ZahraBoroujeni
Thank you for reporting the issue. To investigate this issue further, is it possible to share a rosbag or sample commands/nodes that publish image data without any QoS profile?
In my understanding, every ROS2 topic has a QoS profile (even if it is not specified explicitly, the default one is adopted I guess), so I'd like to know more in detail about the situation that topic does not have a QoS profile.


Can an extension add a new section to the statusline?

environment

vim: neovim
vim-airline: ecff00a559186ad595eedba349a197c8d966e528
OS: ArchLinux
Have you reproduced with a minimal vimrc: does not apply
What is your airline configuration: ???
if you are using terminal:
terminal: xterm
$TERM variable: rxvt-unicode
color configuration (:set t_Co?): Does not apply
if you are using Neovim:
does it happen in Vim: Does not apply

I tried to create an Airline extension for a plugin I'm writing and I wanted to add a section to the very right of the screen. I got this to work using the code below [1].
However, this approach can not work for multiple plugins as I am hard-coding the available sections. So, my next approach was to only add my section and to not tell the core to use my changes (yet) [2]. This way, my section gets added, then the other sections get added in airline#extensions#apply(...) and airline#extensions#default#apply(builder, context). This way, my section will always be the leftmost, so I poked around the airline code to see if I was missing some way of adding my section somewhere else.  Since the add_section function will only add a funcref to a list, I thought that maybe, I could try to get my code to run after the other functions to have my section rendered on the right side, but to no avail.
So here is my question: Is there a way to add a new section at an arbitrary place (meaning "after the n'th section, or after a section with a certain name")  to the statusline?
p.s.> I'm fine with having my section on the left, I have noticed it fits there quite nicely. This question is more about curiosity.
[1]
~/.local/share/nvim/plugged/vim-airline/autoload/airline/extensions/localsearch.vim:
scriptencoding utf-8

let s:enabled = get(g:, 'airline#extensions#localsearch#enabled', 1)
if !get(g:, 'loaded_localsearch', 0) || !s:enabled
	finish
endif
let g:loaded_airline_localsearch = 001

let s:spc = g:airline_symbols.space

"function! airline#extensions#localsearch#get_status()
"	return exists('#starlite#WinEnter') ? s:spc."LS".s:spc : ""
"endfunction

function! airline#extensions#localsearch#load_theme(palette)
	call airline#highlighter#exec('localsearch_dark', [ '#ffffff' , '#000000' , 15  , 1 , ''])
endfunction

function! airline#extensions#localsearch#init(ext)
	"call airline#parts#define('localsearch', {'raw': '%{airline#extensions#localsearch#get_status()}'})
	call a:ext.add_theme_func('airline#extensions#localsearch#load_theme')
	call a:ext.add_statusline_func('airline#extensions#localsearch#apply')
	"call a:ext.add_inactive_statusline_func('airline#extensions#localsearch#apply')
	"let s:ext = a:ext
	"augroup airline_init
	"	autocmd!
	"	"autocmd User AirlineAfterInit call s:ext.add_statusline_func_at('airline#extensions#localsearch#apply', -1)
	"augroup END
endfunction

function! airline#extensions#localsearch#apply(...)
    " first variable is the statusline builder
    let builder = a:1
	let w:airline_section_ls = airline#section#create('LS')
	let w:airline_section_a  = get(w:, 'airline_section_a', g:airline_section_a)
	let w:airline_section_b  = get(w:, 'airline_section_b', g:airline_section_b)
	let w:airline_section_c  = get(w:, 'airline_section_c', g:airline_section_c)
	let w:airline_section_x  = get(w:, 'airline_section_x', g:airline_section_x)
	let w:airline_section_y  = get(w:, 'airline_section_y', g:airline_section_y)
	let w:airline_section_z  = get(w:, 'airline_section_z', g:airline_section_z)

    """"" WARNING: the API for the builder is not finalized and may change
    call builder.add_section('airline_a',                     w:airline_section_a)
    call builder.add_section('airline_b',                     w:airline_section_b)
	if exists('#starlite#WinEnter')
		call builder.add_section('localsearch_dark',              s:spc.w:airline_section_ls.s:spc)
	endif
    call builder.add_section('airline_c',               s:spc.w:airline_section_c)
    call builder.split()
    call builder.add_section('airline_x',                     w:airline_section_x)
    call builder.add_section('airline_y',                     w:airline_section_y)
    call builder.add_section('airline_z',                     w:airline_section_z)
    return 1
endfunction

function! airline#extensions#localsearch#apply(...) second iteration:
function! airline#extensions#localsearch#apply(...)
    let builder = a:1
	let w:airline_section_ls = airline#section#create('LS')

	if exists('#starlite#WinEnter')
		call builder.add_section('localsearch_dark',              s:spc.w:airline_section_ls.s:spc)
	endif
    return 0
endfunction

No, I think this is not currently possible.


(PUP-11841) Fix encoding of empty String

In<PHONE_NUMBER>d3cfc3e33b6eba4c91f43f82f1214c empty string literals where replaced by a call to String.new in preparation for moving to frozen/immutable strings.
However, as stated in the String#new documentation, when no value is passed to #new the returned string has the 'ASCII-8BIT' encoding instead of the default one (which is assumed to be 'UTF-8' by Puppet).
This cause regressions in some areas of the code, for example when using the concat module with exported resource built using epp templates, the incorrect encoding cause the fragment to be misinterpreted and is base64 encoded.  When collected, the base64 representation of the string is used instead of the actual value of the string, as reported here:
https://github.com/voxpupuli/puppet-bacula/issues/189
Replace calls to String.new with ''.dup which use the current encoding.  Do not change the few explicit but redundant occurrences of String.new.force_encoding('ASCII-8BIT') (so that the intent is clearly visible).  Where appropriate, slightly adjust the code for better
readability.

Can one of the admins verify this patch?

Cc @joshcooper for review :wink:

Thanks @smortex! I completely missed the encoding behavior difference. Why would Ruby do that!?

Why would Ruby do that!?

My first reaction was that it should default to the current locale (just like '' magically does), then I though that a function receiving the same values as parameters and not returning the same thing depending on some external factor was not great.  So this might be valid :shrug:.
From my findings, this behavior seems to have been the same since at least since Ruby 2.2.0: https://github.com/ruby/ruby/commit/72194a89dac3eb5dcfe47e23eebf61acdd77d056. Tricky, unexpected, but documented.

Validated this with a puppet-agent run in our inteneral adhoc job. Passed integration testing with all supported platforms on the main branch. This LGTM.

I don't have access to https://puppet.atlassian.net/browse/PUP-11841 for some reason, but while searching for this I found https://puppet.atlassian.net/browse/PUP-10096 which seems similar, or maybe the same thing.

which seems similar, or maybe the same thing.

Yeah Resolv.new.getname(args[0]) is another way for binary ruby strings to "leak" into puppet, which then leads base64 in puppetdb:
$ ruby -rresolv -e "puts Resolv.new.getname('<IP_ADDRESS>').encoding"
ASCII-8BIT

I filed https://perforce.atlassian.net/browse/PUP-11943 (which is unfortunately not public), but it's the issue that we're currently using the track this bug. It will be included in the next puppet 8.3 release.


args in script?

I have a script like this:
	forge script scripts/DeployFromDeployer.s.sol:Deploy --fork-url ${RPC_URL}  --broadcast -vvvv

can I pass --constructor-args in a script? Or any args at all? I couldn't find much about constructor args or passing args to scripts. I can read them from a file, although. But I would like to set them from the command line. Is this achievable?
I know that hardhat has this concept called tasks, which does pretty much what I'm defining: https://hardhat.org/hardhat-runner/docs/advanced/create-task#creating-a-task

I also was looking for a way to do this. As far as I understand, now this can only be done using the --sig option.
-s, --sig <SIG>
        The signature of the function you want to call in the contract, or raw
        calldata

        [default: run()]

By default when you run a script, the run() function in this script is called. But you can specify any function you want using --sig option. To call a function with input parameters you need to use raw calldata.
To make it easier to obtain calldata, you can use another tool that comes with foundry - cast.
For example your deploy script has a function like this:
function run(uint256 arg1, bool arg2) external { ... }

To get calldata to run it, use the command:
cast calldata "run(uint256,bool)" 1 true

Now you can run your script like this:
forge script scripts/DeployFromDeployer.s.sol:Deploy \
    --fork-url ${RPC_URL}  --broadcast -vvvv \
    --sig 0x0a3395f500000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001

Can be combined into oneliner:
forge script scripts/DeployFromDeployer.s.sol:Deploy \
    --fork-url ${RPC_URL}  --broadcast -vvvv \
    --sig $(cast calldata "run(uint256,bool)" 1 true)


Credits in 0.7

What is your question?
How do i add my credits in 0.7? the mods/data/credits.txt doesnt work

Move it to mods/Your-Mod-Name-Here/data/credits.txt

I did the same aswell and it didnt work is this some sort of bug?


Make commit message max header length configurable

Created from discussion in https://github.com/dependabot/feedback/issues/165#issuecomment-571212403
When dependabot creates commit messages, the commit header message is trimmed at a length of 72 characters. This is in line with the default commitlint header-max-length rule. However github adds the pull request number to commit messages when creating pull requests. This can make the commit message exceed the header-max-length of 72.
This is not necessarily a problem of dependabot, but as dependabot creates the commit messages it is the only one that can solve the problem (besides disabling the commitlint rule).
The max commit message header length should be customisable instead of the current hardcoded 72 characters long. If the max length is exceeded the version of the package can be dropped as an automatic strategy.
The following message is 69 character long. If the max length is set to 65 the following message
chore(deps-dev): bump @typescript-eslint/parser from 2.11.0 to 2.14.0

should become
chore(deps-dev): bump @typescript-eslint/parser

Relevant code

+1

I think this is covered by #2445, so I'm going to close this as a duplicate, feel free to add any context you feel is missing from that issue in the comments there.

For unknown reason, the last comment by @jurre brings you to #1666
You want to go to #2445


Update useValue example

I was going through the readme and this looked a bit out of place, looking at the source useValue returns use()[0] i.e. only state value and no setter function? I might be wrong however.

 Nice catch!


Dawn hearing map Page not handling zero values.

If I change the "%d" to "%s", the page does not error when a zero value is evaluated for the channel.  It gives -481.4, but that is a better result.  Otherwise the page renders as expected.
https://github.com/openwrt/luci/blob/27060f34e91ae911e67616dc75685ac2f79864e1/applications/luci-app-dawn/luasrc/model/cbi/dawn/dawn_hearing_map.lua#L45
see also:
https://github.com/openwrt/luci/issues/5963

cc @PolynomialDivision

Please test this. https://github.com/openwrt/luci/pull/5992


SyntaxError: The requested module '/polyfill/node/path.ts' does not provide an export named 'default'

While trying to install dext with the latest deno version by running deno install -r --allow-read --allow-write --allow-env --allow-net --allow-run --unstable -f -n dext<EMAIL_ADDRESS>I get the following errors:
Warning Failed to get compiled source code of "https://cdn.dreg.dev/polyfill/node/path.ts".
Reason: No such file or directory (os error 2)
If the source file provides only type exports, prefer to use "import type" or "export type" syntax instead.
Warning Failed to get compiled source code of "https://cdn.dreg.dev/polyfill/node/process.ts".
Reason: No such file or directory (os error 2)
If the source file provides only type exports, prefer to use "import type" or "export type" syntax instead.
error: Uncaught SyntaxError: The requested module '/polyfill/node/path.ts' does not provide an export named 'default'

Duplicate of #39. Try with --no-check:
deno install --allow-read --allow-write --allow-env --allow-net --allow-run --unstable --no-check -f -n dext<EMAIL_ADDRESS>


Add Testing

Gathering information on the why's and how's for adding testing to SQForm.
Right now our testing is basically us eyeballing components/changes to try to find any possible issues, then if we don't catch them they'll show up in the projects that use this library. Unit and integration tests can help improve confidence that everything is working as intended while we're adding new features and fixing bugs.
I think @testing-library/react would be the best option and Storybook seems to already be set up to work well with it. When writing tests we'll want to avoid testing implementation details whenever possible, so later on if a component needs to be refactored we likely won't need to rewrite the its tests if the end functionality stays the same.
Running the tests can be added to the CI workflow so failing tests will be caught before a PR is merged, and it can likely be added to the commit script to prevent failing components/tests from being committed to begin with.

Scripts
(Need to test these more to make sure I have the args setup correctly)
"scripts": {
  "test": "react-scripts test",
  "test:ci": "CI=true react-scripts test"
  "test:coverage": "npm run test:ci -- --coverage"
},

test run tests in watch mode
test:ci run tests then exit
test:coverage run and create a coverage report, then exit
CI
Example CI.yml jobs section with tests; I think it's as simple as this
jobs:
  ci:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-node@v2-beta
        with:
          node-version: '14'
      - run: npm ci
      - run: npm run lint
      - run: npm run build
      - run: npm run test # <--

Commit hook
Run tests in commit hook - pre-commit or pre-push
"husky": {
  "hooks": {
    "pre-commit": "CI=true npm run test",
  }
}

CI=true will force Jest to run in CI-mode, and tests will only run once instead of launching the watcher.
Filename conventions
According to the CRA docs:

Jest will look for test files with any of the following popular naming conventions:
Files with .js suffix in __tests__ folders.
Files with .test.js suffix.
Files with .spec.js suffix.

My personal preference is to collocate the test files as close as possible to the component that it is testing; something like this:
├── src
│   ├── components
│   │   ├── ComponentA
│   │   │   ├── ComponentA.js
│   │   │   ├── ComponentA.test.js
│   │   ├── ComponentB
│   │   │   ├── ComponentB.js
│   │   │   ├── ComponentB.test.js

But with the current folder structure of SQForm, putting __tests__ folders in src/components/FOLDER_NAME/* might be the easiest structure:
├── src
│   ├── components
│   │   ├── SQForm
│   │   │   ├── __tests__
│   │   │   │   ├── ComponentA.test.js
│   │   │   │   ├── ComponentB.test.js
│   │   │   ├── ComponentA.js
│   │   │   ├── ComponentB.js
│   │   ├── SQFormDialog
│   │   │   ├── __tests__
│   │   │   │   ├── ComponentC.test.js
│   │   │   ├── ComponentC.js

"Best practices"
We can utilize eslint-plugin-testing-library to enforce "best practices" and avoid common errors when writing tests.
At a minimum, we should use the recommended and react configs:
{
  "extends": [
    "plugin:testing-library/recommended",
    "plugin:testing-library/react"
  ]
}

There are a few rules not included in those configs that would be good to add as well:
{
  "rules": {
    "testing-library/no-await-sync-events": "warn",
    "testing-library/no-wait-for-snapshot": "error",
    "testing-library/prefer-explicit-assert": "warn",
    "testing-library/prefer-presence-queries": "error",
    "testing-library/prefer-screen-queries": "error",
    "testing-library/prefer-wait-for": "error"
  }
}

All of this looks solid. How should we start writing tests that will add value? Should we start with integration tests? Some e2e tests of the stories?
I've started with snapshot tests in the past didn't get any value from them.

All of this looks solid. How should we start writing tests that will add value? Should we start with integration tests? Some e2e tests of the stories?

I believe we should try to follow the Testing Trophy ideology, so mostly integration tests.
Something like the "Basic Form" story would be great for an integration test because it would test how the components work in harmony. Then components that have a lot going on internally (or have a lot of props/options), perhaps SQFormAsyncAutocomplete, would be good candidates for unit tests (though you could argue that a test for that component in particular would qualify as an integration test).
Then if we have some hooks that are important and want to be sure that they're always functioning as intended (maybe useForm?) we could test those with react-hooks-testing-library.
I haven't done much e2e testing, but, from what I understand, those may be more useful when testing an actual app, rather than a component library.

I've started with snapshot tests in the past didn't get any value from them.

Yeah, not really a fan of snapshots. I think it's too easy to just create a snapshot without really understanding the component we're testing, and also if/when it fails it's too easy to update the snapshot without checking why it failed.

Awesome! Let's start with an integration test of the SQForm story. Then once you've got a test or two nailed down and vetted. Let's triage issues for others to be able to assist adding tests. This is a skill we all need to build up 🚀

Alright, sounds good
Do you think we should go ahead and set up the CI stuff now or add that later? If now, I'd probably start with a simple unit test to test out the workflow

Alright, sounds good
Do you think we should go ahead and set up the CI stuff now or add that later? If now, I'd probably start with a simple unit test to test out the workflow

Let's hold off on ci until we are comfortable with our testing implementation.

Me watching this thread:


[Win32 Input] Keys are not released when focus leaves the application

Alt+Tab sends an Alt press, but no alt release.
I thought this was the same as #6421, but it also happens with Shift. Hold it down then focus another app.
This also happens if you do Ctrl+Tab to switch tabs. Ctrl is locked from the perspective of the application.
In conhost, applications receive key releases on focus loss.

Nevermind -- I tested this incorrectly.


[WIP] Rebase with target/base branch (GH workflows)

Currently frontend-build.yml workflow only runs either on the PR or on master after the merge/push.
As per this update now PR will get rebased with the target/base (master or release*), then build and other tests will run on that.

As per the pull request event, actions/checkout@v3 is checking out at the merge commit, so this change is not needed.


Deploy Lighthouse images

... now that it's enabled by default (otherwise the Lighthouse pods
never start in a Shipyard-based deployment).
Signed-off-by: Stephen Kitt<EMAIL_ADDRESS>

Actually this doesnt make too much sense.
Projects using lighthouse preload the images, and those that aren't (such as Submariner) need not be concerned with it.
We already discussed it previously and agreed to keep lighthouse logic out of Shipyard.

Yup, I remember that, but the problem now is that make deploy in Shipyard produces a cluster with broken pods — the Lighthouse pods are deployed but can’t pull their images.

Yup, I remember that, but the problem now is that make deploy in Shipyard produces a cluster with broken pods — the Lighthouse pods are deployed but can’t pull their images.

Right, and whats the problem with that specifically?
Also I'm not suite sure why it results in broken pods, if the lighthouse pods point to the original quay.io repo then they should deploy fine as long as the actual image is there.
If you want to deploy stuff with working lighthouse youre not expected to do it from Shipyard anyhow.
I think what we discussed previously with @mangelajo is the actual solution here, allowing specifying overrides of specific images for subctl so only those can be pushed locally and everything else is just taken from Quay (or whatever hub were using).
https://github.com/submariner-io/submariner-operator/pull/726

Yup, I remember that, but the problem now is that make deploy in Shipyard produces a cluster with broken pods — the Lighthouse pods are deployed but can’t pull their images.

Right, and whats the problem with that specifically?

It’s disconcerting for developers using make deploy.

Also I'm not suite sure why it results in broken pods, if the lighthouse pods point to the original quay.io repo then they should deploy fine as long as the actual image is there.

That’s the problem though, the pods point to the local registry.

If you want to deploy stuff with working lighthouse youre not expected to do it from Shipyard anyhow.

I don’t care about Lighthouse when deploying from Shipyard, but I do expect the default deployment to be entirely functional, with no errors from Kubernetes.

I think what we discussed previously with @mangelajo is the actual solution here, allowing specifying overrides of specific images for subctl so only those can be pushed locally and everything else is just taken from Quay (or whatever hub were using).
submariner-io/submariner-operator#726

OK, that is indeed better.

May be we (I mean... I) should finish this instead: https://github.com/submariner-io/submariner-operator/pull/726


Printer support

Myrtille doesn't support printer. In a previous implementation of it, Myrtille had a "print to PDF" feature (using PDFCreator), followed by the download of the generated PDF file.
I removed this feature when I extracted the core because it implied the installation of PDFCreator on the RDP server(s). Currently, nothing is required on them.
If you have another approach, please don't hesitate :)

Hello there,
I know your request is closed, but if I read it correctly, if we want to use it, we can implement it with PDFCreator?  Have you remove the code for doing so?
That is my main concern about using Myrtille is for PDF printing. Do you have any documentation how I can implant it into my version?
Thank you
Philippe

Hi,
The previous implementation I spoke about was a PoC long time ago (2008), using PDFCreator.
I closed this request because I lack some time to implement it and I hoped some help that never came :/
But it's not so hard to do (compared to what I already done), so I may reconsider doing it, with something better (PDFCreator is now outdated and even contains some ads).

Yes, I know about Guacamole and have experienced their print feature.
Indeed, they use ghostscript and c code to handle it (here), and stream it to the web client.
We had a different workflow with the PoC; PDFCreator had a "after print" event and allowed to define an action on it. So we passed the pdf filename to that action, retrieved and streamed it to the web client.
I can get some inspiration from Guacamole, but it's still work (I just lack time).

Well, I will try to get the project in my visual studio and see if I could
understand your code first.
I'm more vb.net than c# but I can code a little in c# ...
I will test out all myrtille if it can really replace our standard rod
connection to be way more compatible and in windows form.
The thing I like about Myrtille is that it can be installed directly on my
server so its easier to manage users and user folders for sharing files.
If you can give me the guideline where to check in myrtille and I will take
a look.
Thank you
Philippe
Le 13 févr. 2018 5:13 PM, "cedrozor"<EMAIL_ADDRESS>a écrit :

Yes, I know about Guacamole and have experienced their print feature.
Indeed, they use ghostscript and c code to handle it (here
https://github.com/glyptodon/guacamole-server/blob/04205a9b979077580f2e2a10746797a6bab4c4e7/src/protocols/rdp/rdp_print_job.c#L41),
and stream it to the web client.
We had a different workflow with the PoC; PDFCreator had a "after print"
event and allowed to define an action on it. So we passed the pdf filename
to that action, retrieved and streamed it to the web client.
I can get some inspiration from Guacamole, but it's still work (I just
lack time).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/cedrozor/myrtille/issues/4#issuecomment-365423102,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABRavhGdQ2m-tcdnFMxS7Bg-ApfQ4OOrks5tUgj-gaJpZM4H-l-w
.

You can follow the guideline here to build and debug myrtille: https://github.com/cedrozor/myrtille/blob/master/DOCUMENTATION.md#build (I used VS2015 but it's the same for VS2017)

I know you do not have this question that does not refer directly to Myrtille. Myrtille is part of a solution I'm selling to a customer. If an integration between Myrtille and PDFCreator is implemented, will I still be able to commit this solution?
Has anyone had any other solution for printing files where I do not have access to the printer in my environment?

You can do it on a fork then make a pull request, but I'd rather use ghostscript directly than relying on a third party. Also, PDFCreatror seems to be (or bring) some kind of adware from what I had read recently.


support reloading broken files with IlmImfFuzzTest

This extends each of the IlmImfFuzzTest tools to accept an EXR file to load.
E.g. ./IlmImfFuzzTest testFuzzScanLines /var/tmp/imf_test_scanline_file_fuzz_broken.exr
This allows quicker debugging where a regular IlmImfFuzzTest run errors
Signed-off-by: Peter Hillman<EMAIL_ADDRESS>

I will add some command-line help to IlmImfFuzzTest and IlmImfTest to explain how to use them and update the PR


BUG: dev.py has distutils usage

Describe your issue.
distutils is removed in Python 3.12. In https://github.com/andyfaff/scipy/pull/53 I'm trying to add scipy CI support for cp312. The test run fails straightaway because distutils is removed in 3.12.
It seems that this was known about in https://github.com/scipy/scipy/pull/16058.
Pinging @AnirudhDagar @rgommers @schettino72.
I would say that this is reasonably urgent to look into, as 3.12 release candidates are going to be released soon.
Reproducing Code Example
python dev.py build --werror

Error message
Run python dev.py build --werror
  python dev.py build --werror
  shell: /usr/bin/bash -e {0}
  env:
    CCACHE_DIR: /home/runner/work/scipy/scipy/.ccache
    INSTALLDIR: build-install
    pythonLocation: /opt/hostedtoolcache/Python/3.12.0-beta.4/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.0-beta.4/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0-beta.4/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0-beta.4/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.0-beta.4/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.0-beta.4/x64/lib
Traceback (most recent call last):
  File "/home/runner/work/scipy/scipy/dev.py", line 119, in <module>
    from distutils import dist
ModuleNotFoundError: No module named 'distutils'

SciPy/NumPy/Python version and system information
python3.12-dev

Thanks for having a look @andyfaff
FYI there is already a discussion here #18689


Refactor: Hide clear cart button and cart count on empty cart

This pr refactors the code to hide 'clear cart' button and cart count when cart is empty.
When cart is empty

When cart contains items

This pr refactors the code to hide 'clear cart' button and cart count when cart is empty.

Looks good brother.


countryToCode key needs to be uppercase

Closes #23

I'm sorry for the long wait! thanks for this contribution!


replace "{TRACK} by {ARTIST}" with "{TRACK} / {ARTIST}"

chat...

will be fixed per 3b3f01a in #2


Recell, Precision,F1 Score and Accuracy Saturation

I am running your library on 100 images again and again and every time the all values are saturated again and again. Do you have any reason why this phenomena happened ?
Precision | Recall | F1 Score | Accuracy
64.27 | 48.98 | 55.59 | 61.04
61.26 | 49.5 | 54.76 | 59.28
61.82 | 51.71 | 56.31 | 60.06

You are passing arrays as inputs to verify function? Could you share your code block?

You are passing arrays as inputs to verify function? Could you share your code block?

I am simply pass the list of images which is stored in json file. Last time, i just changed below part and put list.
cm = confusion_matrix(list(y_test), predictions_classes)

I am simply pass the list of images which is stored in json file. Last time, i just changed below part and put list.
cm = confusion_matrix(list(y_test), predictions_classes)

how did you find the predictions_classes? I need that code block.

how did you find the predictions_classes? I need that code block.

positives = []

for key, values in idendities.items():
    print(key)
    for i in range(0, len(values) - 1):
        for j in range(i + 1, len(values)):
            # print(values[i], " and ", values[j])
            positive = [values[i], values[j]]
            positives.append(positive)

positives = pd.DataFrame(positives, columns=["file_x", "file_y"])
positives["decision"] = "Yes"
print(positives.shape)
# --------------------------
# Negatives

samples_list = list(idendities.values())

negatives = []

for i in range(0, len(idendities) - 1):
    for j in range(i + 1, len(idendities)):
        # print(samples_list[i], " vs ",samples_list[j])
        cross_product = itertools.product(samples_list[i], samples_list[j])
        cross_product = list(cross_product)
        # print(cross_product)

        for cross_sample in cross_product:
            # print(cross_sample[0], " vs ", cross_sample[1])
            negative = []
            negative.append(cross_sample[0])
            negative.append(cross_sample[1])
            negatives.append(negative)

negatives = pd.DataFrame(negatives, columns=["file_x", "file_y"])
negatives["decision"] = "No"

negatives = negatives.sample(positives.shape[0])

print(negatives.shape)
# --------------------------
# Merge positive and negative ones

df = pd.concat([positives, negatives]).reset_index(drop=True)

print(df.decision.value_counts())

df.file_x = "deepface/tests/dataset/" + df.file_x
df.file_y = "deepface/tests/dataset/" + df.file_y
# --------------------------
# DeepFace

from deepface import DeepFace
from deepface.basemodels import VGGFace, OpenFace, Facenet, FbDeepFace

pretrained_models = {}

pretrained_models["VGG-Face"] = VGGFace.loadModel()
print("VGG-Face loaded")
pretrained_models["Facenet"] = Facenet.loadModel()
print("Facenet loaded")
pretrained_models["OpenFace"] = OpenFace.loadModel()
print("OpenFace loaded")
pretrained_models["DeepFace"] = FbDeepFace.loadModel()
print("FbDeepFace loaded")

instances = df[["file_x", "file_y"]].values.tolist()

models = ['VGG-Face']
metrics = ['cosine']

if True:
    for model in models:
        for metric in metrics:

            resp_obj = DeepFace.verify(instances
                                       , model_name=model
                                       , model=pretrained_models[model]
                                       , distance_metric=metric)

            distances = []

            for i in range(0, len(instances)):
                distance = round(resp_obj["pair_%s" % (i + 1)]["distance"], 4)
                distances.append(distance)

            df['%s_%s' % (model, metric)] = distances

    df.to_csv("face-recognition-pivot.csv", index=False)
else:
    df = pd.read_csv("face-recognition-pivot.csv")

df_raw = df.copy()

# --------------------------
# Distribution

#fig = plt.figure(figsize=(15, 15))

#figure_idx = 1
#for model in models:
#    for metric in metrics:
#        feature = '%s_%s' % (model, metric)

#        ax1 = fig.add_subplot(4, 2, figure_idx)

#        df[df.decision == "Yes"][feature].plot(kind='kde', title=feature, label='Yes', legend=True)
#        df[df.decision == "No"][feature].plot(kind='kde', title=feature, label='No', legend=True)

#        figure_idx = figure_idx + 1

# plt.show()
# --------------------------
# Pre-processing for modelling

columns = []
for model in models:
    for metric in metrics:
        feature = '%s_%s' % (model, metric)
        columns.append(feature)

columns.append("decision")

df = df[columns]

df.loc[df[df.decision == 'Yes'].index, 'decision'] = 1
df.loc[df[df.decision == 'No'].index, 'decision'] = 0

print(df.head())
# --------------------------
# Train test split

from sklearn.model_selection import train_test_split

df_train, df_test = train_test_split(df, test_size=0.30, random_state=17)

target_name = "decision"

y_train = df_train[target_name].values
x_train = df_train.drop(columns=[target_name]).values

y_test = df_test[target_name].values
x_test = df_test.drop(columns=[target_name]).values

# --------------------------
# LightGBM

import lightgbm as lgb

features = df.drop(columns=[target_name]).columns.tolist()
lgb_train = lgb.Dataset(x_train, y_train, feature_name=features)
lgb_test = lgb.Dataset(x_test, y_test, feature_name=features)

params = {
    'task': 'train'
    , 'boosting_type': 'gbdt'
    , 'objective': 'multiclass'
    , 'num_class': 2
    , 'metric': 'multi_logloss'
}

gbm = lgb.train(params, lgb_train, num_boost_round=250, early_stopping_rounds=15, valid_sets=lgb_test)

gbm.save_model("face-recognition-ensemble-model.txt")

# --------------------------
# Evaluation

predictions = gbm.predict(x_test)

predictions_classes = []
for i in predictions:
    prediction_class = np.argmax(i)
    predictions_classes.append(prediction_class)

cm = confusion_matrix(list(y_test), predictions_classes)

tn, fp, fn, tp = cm.ravel()

recall = tp / (tp + fn)
precision = tp / (tp + fp)
accuracy = (tp + tn) / (tn + fp + fn + tp)
f1 = 2 * (precision * recall) / (precision + recall)

print("Precision: ", 100 * precision, "%")
print("Recall: ", 100 * recall, "%")
print("F1 score ", 100 * f1, "%")
print("Accuracy: ", 100 * accuracy, "%")

positives = []

for key, values in idendities.items():
    print(key)
    for i in range(0, len(values) - 1):
        for j in range(i + 1, len(values)):
            # print(values[i], " and ", values[j])
            positive = [values[i], values[j]]
            positives.append(positive)

positives = pd.DataFrame(positives, columns=["file_x", "file_y"])
positives["decision"] = "Yes"
print(positives.shape)
# --------------------------
# Negatives

samples_list = list(idendities.values())

negatives = []

for i in range(0, len(idendities) - 1):
    for j in range(i + 1, len(idendities)):
        # print(samples_list[i], " vs ",samples_list[j])
        cross_product = itertools.product(samples_list[i], samples_list[j])
        cross_product = list(cross_product)
        # print(cross_product)

        for cross_sample in cross_product:
            # print(cross_sample[0], " vs ", cross_sample[1])
            negative = []
            negative.append(cross_sample[0])
            negative.append(cross_sample[1])
            negatives.append(negative)

negatives = pd.DataFrame(negatives, columns=["file_x", "file_y"])
negatives["decision"] = "No"

negatives = negatives.sample(positives.shape[0])

print(negatives.shape)
# --------------------------
# Merge positive and negative ones

df = pd.concat([positives, negatives]).reset_index(drop=True)

print(df.decision.value_counts())

df.file_x = "deepface/tests/dataset/" + df.file_x
df.file_y = "deepface/tests/dataset/" + df.file_y
# --------------------------
# DeepFace

from deepface import DeepFace
from deepface.basemodels import VGGFace, OpenFace, Facenet, FbDeepFace

pretrained_models = {}

pretrained_models["VGG-Face"] = VGGFace.loadModel()
print("VGG-Face loaded")
pretrained_models["Facenet"] = Facenet.loadModel()
print("Facenet loaded")
pretrained_models["OpenFace"] = OpenFace.loadModel()
print("OpenFace loaded")
pretrained_models["DeepFace"] = FbDeepFace.loadModel()
print("FbDeepFace loaded")

instances = df[["file_x", "file_y"]].values.tolist()

models = ['VGG-Face']
metrics = ['cosine']

if True:
    for model in models:
        for metric in metrics:

            resp_obj = DeepFace.verify(instances
                                       , model_name=model
                                       , model=pretrained_models[model]
                                       , distance_metric=metric)

            distances = []

            for i in range(0, len(instances)):
                distance = round(resp_obj["pair_%s" % (i + 1)]["distance"], 4)
                distances.append(distance)

            df['%s_%s' % (model, metric)] = distances

    df.to_csv("face-recognition-pivot.csv", index=False)
else:
    df = pd.read_csv("face-recognition-pivot.csv")

df_raw = df.copy()

# --------------------------
# Distribution

#fig = plt.figure(figsize=(15, 15))

#figure_idx = 1
#for model in models:
#    for metric in metrics:
#        feature = '%s_%s' % (model, metric)

#        ax1 = fig.add_subplot(4, 2, figure_idx)

#        df[df.decision == "Yes"][feature].plot(kind='kde', title=feature, label='Yes', legend=True)
#        df[df.decision == "No"][feature].plot(kind='kde', title=feature, label='No', legend=True)

#        figure_idx = figure_idx + 1

# plt.show()
# --------------------------
# Pre-processing for modelling

columns = []
for model in models:
    for metric in metrics:
        feature = '%s_%s' % (model, metric)
        columns.append(feature)

columns.append("decision")

df = df[columns]

df.loc[df[df.decision == 'Yes'].index, 'decision'] = 1
df.loc[df[df.decision == 'No'].index, 'decision'] = 0

print(df.head())
# --------------------------
# Train test split

from sklearn.model_selection import train_test_split

df_train, df_test = train_test_split(df, test_size=0.30, random_state=17)

target_name = "decision"

y_train = df_train[target_name].values
x_train = df_train.drop(columns=[target_name]).values

y_test = df_test[target_name].values
x_test = df_test.drop(columns=[target_name]).values

# --------------------------
# LightGBM

import lightgbm as lgb

features = df.drop(columns=[target_name]).columns.tolist()
lgb_train = lgb.Dataset(x_train, y_train, feature_name=features)
lgb_test = lgb.Dataset(x_test, y_test, feature_name=features)

params = {
    'task': 'train'
    , 'boosting_type': 'gbdt'
    , 'objective': 'multiclass'
    , 'num_class': 2
    , 'metric': 'multi_logloss'
}

gbm = lgb.train(params, lgb_train, num_boost_round=250, early_stopping_rounds=15, valid_sets=lgb_test)

gbm.save_model("face-recognition-ensemble-model.txt")

# --------------------------
# Evaluation

predictions = gbm.predict(x_test)

predictions_classes = []
for i in predictions:
    prediction_class = np.argmax(i)
    predictions_classes.append(prediction_class)

cm = confusion_matrix(list(y_test), predictions_classes)

tn, fp, fn, tp = cm.ravel()

recall = tp / (tp + fn)
precision = tp / (tp + fp)
accuracy = (tp + tn) / (tn + fp + fn + tp)
f1 = 2 * (precision * recall) / (precision + recall)

print("Precision: ", 100 * precision, "%")
print("Recall: ", 100 * recall, "%")
print("F1 score ", 100 * f1, "%")
print("Accuracy: ", 100 * accuracy, "%")

You build a model for just a feature (vggface and cosine pair). Why would you do that?

You build a model for just a feature (vggface and cosine pair). Why would you do that?

I just want to deeply analyze one by one models like vggface and cosine pair and then another one with same format.

I just want to deeply analyze one by one models like vggface and cosine pair and then another one with same format.

one feature is very weak for a gbm algorithm. I think that's the reason.

one feature is very weak for a gbm algorithm. I think that's the reason.

But gbm is used in ensemble learning when we have two models. Am i right? Now we have only one model so i dont think so we need GBM. Am i right?

But gbm is used in ensemble learning when we have two models. Am i right? Now we have only one model so i dont think so we need GBM. Am i right?

in ensemble, we use 4 models: vgg, facenet, openface, deepface; and their 3 metrics: euclidean, cosine, euclidean_l2. So there are 12 features in ensemble. if you just feed one model and one metric, then it would be one feature, and it is not meaningful for gbm.

in ensemble, we use 4 models: vgg, facenet, openface, deepface; and their 3 metrics: euclidean, cosine, euclidean_l2. So there are 12 features in ensemble. if you just feed one model and one metric, then it would be one feature, and it is not meaningful for gbm.