Proposal: Collect sanitized metrics

I had planned on bringing in some metrics for Nudge 1.1.7 but that's no longer happening now as of https://github.com/macadmins/nudge/commit/6fa38af19f4ae0c94e5c04a4abee374352c9ff61
My goal here is the following:

Understand how many devices use Nudge and what version of the software

Use this for internal justification of engineering allocation(s)

Collect the minimal amount of data necessary to accomplish
Ship this data as few times as possible

Currently Nudge's preference file looks like this
{
    deferRunUntil = "2022-05-31 21:08:29 +0000";
    requiredMinimumOSVersion = "12.99.99";
    userDeferrals = 2;
    userQuitDeferrals = 1;
    userSessionDeferrals = 0;
}

What I had proposed was the following
{
    deviceConfiguration =     {
        appVersion = "<IP_ADDRESS>406";
        bundlePath = "/Applications/Utilities/Nudge.app";
        configJSON = 2ee6b587eb1bab8f36bcde35a35e2dcd;
        deviceID = "D63F50B5-AA6D-4B44-BB9B-C83B2C91E72D";
    };
    requiredMinimumOSVersion = "12.99.99";
    userDeferrals = 0;
    userQuitDeferrals = 0;
    userSessionDeferrals = 0;
}

if you had a JSON file it would add configJSON which is a calculated MD5 hash of the device's current config.
{
    deviceConfiguration =     {
        appVersion = "<IP_ADDRESS>406";
        bundlePath = "/Applications/Utilities/Nudge.app";
        configJSON = 2ee6b587eb1bab8f36bcde35a35e2dcd;
        deviceID = "D63F50B5-AA6D-4B44-BB9B-C83B2C91E72D";
    };
    requiredMinimumOSVersion = "12.99.99";
    userDeferrals = 0;
    userQuitDeferrals = 0;
    userSessionDeferrals = 0;
}

if you had a MDM file it would add configProfile which is a calculated MD5 hash of the device's current config.
{
    deviceConfiguration =     {
        appVersion = "<IP_ADDRESS>406";
        bundlePath = "/Applications/Utilities/Nudge.app";
        configProfile= 2ee6b587eb1bab8f36bcde35a35e2dcd;
        deviceID = "D63F50B5-AA6D-4B44-BB9B-C83B2C91E72D";
    };
    requiredMinimumOSVersion = "12.99.99";
    userDeferrals = 0;
    userQuitDeferrals = 0;
    userSessionDeferrals = 0;
}

if you had both a json and mdm profile, both keys would be present
if you had a signed application of Nudge (essentially everyone but local development tests)
{
    deviceConfiguration =     {
        appVersion = "<IP_ADDRESS>406";
        bundlePath = "/Applications/Utilities/Nudge.app";
        configProfile= 2ee6b587eb1bab8f36bcde35a35e2dcd;
        developerCertificate = "Developer ID Application: Clever DevOps Co. (9GQZ7KUFR6)";
        deviceID = "D63F50B5-AA6D-4B44-BB9B-C83B2C91E72D";
    };
    requiredMinimumOSVersion = "12.99.99";
    userDeferrals = 0;
    userQuitDeferrals = 0;
    userSessionDeferrals = 0;
}

so if you had the latest release, a JSON file and a MDM profile it would look like
{
    deviceConfiguration =     {
        appVersion = "<IP_ADDRESS>406";
        bundlePath = "/Applications/Utilities/Nudge.app";
        configJSON = 2ee6b587eb1bab8f36bcde35a35e2dcd;
        configProfile= 2ee6b587eb1bab8f36bcde35a35e2dcd;
        developerCertificate = "Developer ID Application: Clever DevOps Co. (9GQZ7KUFR6)";
        deviceID = "D63F50B5-AA6D-4B44-BB9B-C83B2C91E72D";
    };
    requiredMinimumOSVersion = "12.99.99";
    userDeferrals = 0;
    userQuitDeferrals = 0;
    userSessionDeferrals = 0;
}

Client Behavior
Upon the first run of the new nudge it would submit this information to https://deviceconfiguration.nudgeapp.workers.dev which is a CloudFlare workers serverless instance that looks for the Nudge application to submit data.
After it submits the data successfully, Nudge will not submit new data unless any of the following had changed:

appVersion
configJSON
configProfile
developerCertificate

The following keys do not matter for resubmission

deviceID
bundlePath

If Nudge detected weird serial number formats, it would assume a virtual machine and never submit data.
Server Infrastructure
Nudge Client -> POST -> CloudFlare Worker -> Validation
-> POST/Kafka Producer -> Kafka/UpStash
-> POST -> ElasticSearch/Private Docker -> Kafka Consumer -> Kibana/Grafana visualizations
As mentioned before, the submission endpoint is running on CloudFlare workers within their own security model.
The CloudFlare worker would then take the data, ensure it is in the correct format (and reject it if it isn't) and send it to a kafka topic running on upstart. From there it would be consumed into a private ElasticSearch.
The CloudFlare worker is not open source because of the following reasons:

It has API keys to write to Kafka
It will eventually have API keys to write to ElasticSearch
There is custom code to protect against malicious submissions and I want to make that harder on $bad actors, not easier

Currently, the CloudFlare worker does not ship to ElasticSearch because I am still figuring out the most secure, least cost prohibitive model for this. I also do not want to expose this data to any potential malicious actors.
One thing to note is that I do not get access to the CloudFlare workers raw logs (not do I want them) which has the source IP of the client device. This protects both you and I from exposing data we don't intend to.
The Kafka message queue purges old messages after 7 days which is compliant with GDPR.
deviceConfiguration Dictionary design
I have tried to be thoughtful on what keys I want and why
appVersion
This is straight forward, but this just pulls the current nudge version.
bundlePath
This is also straight forward but is the install path for Nudge. For most people this will be /Applications/Utilities/Nudge.app.
I'm mainly curious to collect this to understand if people are using other application paths as it could impact the preinstall and postinstall scripts.
configJSON
This function would use the new -print-json-config logic and take the resulting string and convert it to a MD5 hash.
By submitting this data, I could put machines into collections, while not exposing what company this collection belongs to.
configProfile
This function would use the new -print-profile-config logic and take the resulting string and convert it to a MD5 hash.
By submitting this data, I could put machines into collections, while not exposing what company this collection belongs to.
developerCertificate
This is also straight forward, but is the signature of the nudge application. For most people this will be Developer ID Application: Clever DevOps Co. (9GQZ7KUFR6).
Given that this data is generally not seen as any measure of security I am collecting it to understand if/when forks are being used. Think jumpcloud patch management
deviceID
This is the key that took the most thought around.
These were the core requirements:

Do not expose PII
Prevent my database from growing with bad data and increasing costs
Persist ID through device wiping or Nudge configuration device wiping (defaults delete ~/Library/Preferences/com.github.macadmins.Nudge

In order to do this I came up with the following idea:

Grab the Hardware UUID of the device and store it in temporary memory
Grab the Serial of the device and store in temporary memory

This data is already stored for the (?) button

Convert Serial to a UUID compliant string
Create a new string of com.github.macadmins.Nudge + Hardware UUID + Serial UUID
Convert that string to a SHA256 hash
Take that resulting hash, take the first 16 digits of it and use that to create a new UUID

By going through all of these steps, I can safely create a method that is  immutable (except for logic board changes). More importantly though, this UUID cannot be used to reverse the serial number or hardware ID.
Opt out method
Initially I do not want to make an opt-out method because I want to achieve the following:

How do resellers of Nudge opt-out, if at all, to this feature?

My current thinking is if they want to opt-out and continue to profit from my work, they can completely fork Nudge and maintain their fork themselves.

What kind of resiliency do I need?

When a bunch of companies deploy a new version of Nudge, what will that look like for the servers?
When new versions of macOS come out, what will that look like for the servers?

Is this data collection cost prohibitive?

If this costs me more than $10/month, I honestly don't want to do it

Potential concerns around data and my views on it
Almost every piece of software, including the software you are using to read this GitHub issue has some metrics being shipped out. If it's Safari, I'm sure Apple is sanitizing it in a beautiful way, but if it's Google, they are getting your hardware uuid, your serial, your IP address and much more information about you that you cannot opt-out.
This small bit of data was thoughtfully designed and greatly helps me continue to support this software for free, now and in the future.

The version, profile and/or JSON are PII and should be considered insider information

While I agree that the raw values could absolutely be used against a company, by converting it to an MD5, I think the risk is less severe.
That said, after thinking about it, I can come up with some situations where perhaps this data could be used to infer things:

When collection "foo" begins a new Nudge event
When collection "foo" begins to upgrade Nudge
When a new collection (company) "bar" starts deploying Nudge for the first time

Because of this, I could see the following key

disableOptionalMetrics

This would essentially give me the absolute bare minimum device collection data and prevent me from understanding those types of events

bundlePath
deviceID
developerCertificate

Moving forward
I'm not sure how much longer I can continue to maintain Nudge by myself. I am no longer a macadmin and I continue to force myself to find time to improve Nudge. If I am to continue maintaining it, I must show my new organization the true impact of what Nudge is doing to help company's secure their devices.
When you deploy something it is very likely your management wants to track and understand the status of the deployment. For two years I have essentially been blind as to how Nudge is operated.
Other projects you may have used or your developers use do similar things:

https://docs.brew.sh/Analytics
https://github.com/salopensource/sal/wiki/Usage-reporting
https://www.mothersruin.com/software/Apparency/faq.html#auto-update
https://www.mothersruin.com/software/SuspiciousPackage/faq.html#auto-update
https://github.com/lindegroup/autopkgr/blob/ee5f1158454e27f87edcaf138befb886c89cd7f3/AutoPkgr/Supporting Files/AutoPkgr-Info.plist#L50
https://github.com/ninxsoft/LowProfile/blob/9002f3acfa6da246c1831e1ea7eb0f3000910979/Low Profile/Extensions/String%2BExtension.swift#L12-L16
https://github.com/ProfileCreator/ProfileCreator/blob/62cea3de2fb32280bae9601f5f5ec78687a7fb11/appcast.xml

Other tools check into APIs

https://github.com/ninxsoft/Mist

https://github.com/ninxsoft/Mist/blob/614f7ad5fe3a968b92fb7d7eb897f3cc1a6016b6/Mist/Extensions/String%2BExtension.swift#L40
https://github.com/ninxsoft/Mist/blob/0c24aee3c0c784cb5765e6a47f6614d0ac1cf18a/Mist/Model/Firmware.swift#L22

I could go on and on and will point you to Facebook, Google, Apple. All of them track you and ship far more information about you than this tool ever will.
https://nordvpn.com/blog/worst-privacy-apps/
I look forward to the discussion and I'm sure it will get heated.

Apparently I made my own version of "uuidv5" without knowing https://stackoverflow.com/questions/48075143/generate-uuid-from-name-space
https://www.terraform.io/language/functions/uuidv5

I will just chime in here from a process perspective. Some Orgs require VSAs (vendor security assessments) for all software you use and deploy, including open source software. There is typically some sort of vetting of the public repos and overall check list of things to the assessment, compliance, and governance teams to look at.  This includes storing data/metrics. While, I personally do not think any secret or valuable data is being collected a bad actor could use, or something that would look horribly bad, I do know that if you store our data we require things like a SOC 2 type 2 report.  In the past I have grabbed SOC type 2 reports from Microsoft when analytics data collection has changed and compliance folks ask for it as an example. Office 365 100% collects usage metrics, so they provide this report, and I doubt anyone is blocking O365 installs at their org due to analytics data being collected.
I am not sure if this would impact adoption of Nudge, and as a new comer to the tool I want to state it is great. I definitely want to support the development of this tool as well.  I am not sure how my Org would feel about analytics data with out some sort of document provided how on it is securely stored, encrypted, what it is used for, and so forth. Even if the data is not valuable to a bad actor, these things are sorta templated into assessing how data is stored by third parties. Some orgs might need these things, others may not. Having an opt out option could really address all of it.  In the end data exposure is a risk everyone wants to avoid, even if the data is benign because it makes headlines.
My personal opinion is I don't see a huge deal in this proposal, but my personal opinion doesn't reflect or change anyone Org's process to vet and onboard new software. Some Orgs may simply not like this change, others may not care. So, I think an opt out feature would address both sides.
Also, curious, but would any of these data points also work?

number of downloads of Nudge itself
repo metrics (number of issues, comments, PRs, etc)
anonymous survey data where folks can submit how many clients they deploy Nudge to
User reviews of impact, like "Nudge helped us deploy the latest OS in n amount of time"

Lastly, thank you for all the work you have done. This is one of the best client side open source tools I have used. It does what it sets out to do out of the box and did not require a lot of effort. All while delivering the right balance of information, options, and of course annoyance to get the users to run software updates.

If the technologies I use are SOCK2 compliant would that work? Maybe neither of us are suited to answer that question, but so far, I am not storing anything on my own infrastructure.

For your question about stats, I don't think so. I initially thought about a simple google form, but I can barely get people to test Nudge, so I imagine I wouldn't get much engagement.

If the technologies I use are SOCK2 compliant would that work? Maybe neither of us are suited to answer that question, but so far, I am not storing anything on my own infrastructure.

I have no idea, I don't really do assessments. I am just bringing up things I have observed is all. SOC 2 certification definitely helps but a compliance report would show exactly how the data is stored and for what uses, which I guess is what the compliance folks want to ensure. Data leakage, even if benign and having no value is still bad press.

At a glance (as a security person), this proposal doesn't sound unreasonable for the most part. The highest sensitivity is arguably the hardware ID/serial number, but the way you hash those two together makes it sufficiently unfeasible for a potential attacker to reverse/brute force. The only parameter I can see companies having an issue with is developerCertificate as this does reveal the company name. If you're aiming to use this to get a feeling for the number of devices using Nudge within a given org, then you may be better off hashing that value too. The bundle path could in theory contain the company name if they deploy Nudge into some special folder, but this is less likely.
There is some argument that by 'calling home', all devices are effectively going to be revealing their source IPs, but as you've mentioned, our devices are already sending this kind of telemetry on a minute-by-minute basis to countless website and application developers, I don't personally see a problem with this, although I would argue that you're better off not storing actual IPs (perhaps only storing the country, which, as you plan on using Cloudflare, is made available in the CF-IPCountry HTTP header).

Regarding an opt-out - I'd prefer to have a toggle somewhere to be able to turn this off entirely.
Could this be a documented setting, but left out of sample JSON config files? So anyone blindly copy/pasting a config file won't immediately see it to turn it off. However in the wiki it could be documented on what it does, what it collects, and why its important to the future of Nudge.
I'd happily leave this enabled if I'm given the option to, rather than being forced to.

developerCertificate: I am collecting it to understand if/when forks are being used

I'm not sure I follow. For example, we're not forking in any meaningful way (fork and patching/changing things), but we are building from an internal copy of the source, and then signing with our own dev cert. This is to avoid trust issues from using pre-compiled binaries, when possible.

If the technologies I use are SOCK2 compliant would that work? Maybe neither of us are suited to answer that question, but so far, I am not storing anything on my own infrastructure.

This depends on the Org's discretion.  So if an Org requires any vendors they work with to be SOC2 compliant then this would rule Nudge out.
That said, it's very rare I've run into any orgs that absolutely 100% require everyone they work with to be SOC2 compliant. There can usually be exceptions made quite easily based on the vendor/tool/data being collected.

Fair enough. It will not be in v1.1.7.

developerCertificate: I am collecting it to understand if/when forks are being used

I'm not sure I follow. For example, we're not forking in any meaningful way (fork and patching/changing things), but we are building from an internal copy of the source, and then signing with our own dev cert. This is to avoid trust issues from using pre-compiled binaries, when possible.

I'd like to know how many devices are used by developer certs outside of the official one. Perhaps I could hash this if it's not the one we expect so as not to expose it, but I still don't think that does much.

Sorry to chime in so late. I know you've stepped away for a bit, but hopefully continuing the discussion is still useful.
First, thank you for Nudge. Apple has dropped the ball on this for years - we used Munki's force_install_after_date key for SUS updates until Apple broke that a few years ago. Like Greg with Munki, you wrote Nudge because it solved a problem in your org. It's incredibly generous of you to share, and it's not fair for you to have to regret that.
Personally, I appreciate that you took extra care to anonymize the data collection. I don't have concerns about that. In my org, the decision would probably not be up to me, but I'd argue strongly in favor of continuing to use Nudge. We stopped using force_install_after_date and retired our Reposado server when we rolled out Catalina, and our Macs ran varying versions of 10.15.x and 11.x until we deployed Nudge alongside Monterey last fall. The difference was dramatic - everyone updated immediately, and continues to update when patches are available. Put simply, without Nudge, our users don't update, and that exposes us to unnecessary risk.
I tried to brainstorm some possible solutions - here's what I came up with:

Given that your workplace relies on Nudge too, is it reasonable to only work on bug fixes and features that are useful to your org?
If charging for Nudge made the most sense, we'd absolutely pay for it. Maybe a custom build with the option to disable data collection, since you'd know how many licenses we have?
Is there an open source license that would prevent Nudge from being integrated into paid products and services? That would free you up to offer a different license to products that want to integrate Nudge, and you could be compensated for your work.
Support should not fall onto you, period. I like keeping up with the development of the project, but it's chaotic that it all happens in a single channel. Plus, each day, there are new members of the channel asking the same questions: "how do I get started with Nudge?", "none of my custom text is showing!", "I have a Jamf-specific question", etc. In nearly all cases, these questions can be answered by checking the wiki, but users don't do that. They don't even scroll up or search the channel. MunkiReport has separate #munkireport and munkireport-dev channels - maybe that'd make things easier? I know @dan-snelson's posinstall channel is now the Jamf support channel, but I guess I'm suggesting further splitting #nudge development work into #nudge-dev, or something similar, and leaving all non-Jamf support in #nudge.

Regardless, if you're looking to collect data, I don't think there should be an 'off' switch (unless you're implementing something like ideas 2 or 3 in the above list, where you're being paid). I don't agree with the logic that anyone would want the option of disabling it, but wouldn't actually use it. Heck, we currently disable telemetry for both Apple and Microsoft products, and we pay for both.

If this is still in works for a future version, here are my thoughts, too:
If there's an opt-in option, I'd be happy to supply any non-identifiable data (the serial might be pushing it, though - but if it's obfuscated in a non-repeatable or guessable format it might be passable) from my users, if an approximate payload size is documented somewhere.
If it's possible to supply the destination IPs of such collectors, that'd be helpful, too.
If this is opt-out, I'll more than likely be impulsed to turn it off, or find ways to block its outgoing transmission, out of principal.
One of the worst things about data collection is the under-handedness of it.
How Debian handles popcorn during install (a concise prompt / explanation during setup) is perfect.  I opt-in every machine I build because it's simple to understand what's collected and why, and I have to opt in to it.

Thanks for the insight. At this moment my involvement in Nudge is paused.
Anyone is welcome to maintain this project and should I have the urge to work on it, I will, but at this time my own needs are no longer being met with this project and it feels very one sided to me.
Almost all features for the past year have had zero use at my organization. If people have ethical or principals that go against data collection, that is fine, but there is a human on this side, not a corporation, that is trying to just understand the impact of his work.
To date every single feature no matter how much time I have spent on it has been met with eagerness and while I understand the nature of this proposal, this is the one feature that would benefit me in the past two years of this project being maintained for free.
I personally think it's a fair ask. But I no longer feel my opinion on this project (nudge) actually matters. All that matters is how it impacts others. This is 100% my view and my view alone. If it's untrue, so be it. But that is my view and why at this time my engagement with nudge is paused.

@erikng Just wanted to add a cent or two on this.
Nudge has saved our organization time and has helped us stay in patching compliance. For that, I thank you!
To continue development, have you thought about offering a paid version or something that would compensate you for your time? It would be unfortunate to have this tool go stale although your reasoning is perfectly understandable.


openssl supports AES-CBC and HMAC-SHA stitching algorithms to improve performance

I' using openssl library for IPSEC, then it occurs me that the performance of  encryption with AES-256-CBC and authentication with HMAC-SHA256 is not good.
Then I found a way to improve performance in https://software.intel.com/en-us/articles/improving-openssl-performance

As is discussed in https://software.intel.com/en-us/articles/improving-openssl-performance, it seems that openssl don't support stitch in normal mode?
Aead mode seems to be used in TLS only,not in IPSEC?
Therefore, I propose this feature to support  stitch in normal mode for IPSEC:encrypt data and calculate the hmac code of cipher text.
Thank you .

the assembler modules used in aes-xxx-cbc-hmac-shaxxx do mac-then-encrypt, but you need
encrypt-then-mac, right?

Yep

the assembler modules used in aes-xxx-cbc-hmac-shaxxx do mac-then-encrypt, but you need
encrypt-then-mac, right?

[we're doing a pass through all issues to categorise them, and occasionally comment]
This sounds like a nice and worthy thing to do, but @openssl/committers already have their hands full, so we would urge someone on the bigger community to step up to make this happen.
A way to handle this could be to generalise the special support for TLS in the algorithms mentioned to be able to handle other uses, such as IPSEC.


allow type params before navigation suffix

In my pursuits running the Kotlin parser on many open-source repos, I've noticed that a very common we cannot parse is expressions of the form Foo<*>::bar. It seems that this is an example of suffixing an expression with type parameters, and then doing a navigation suffix.
Unfortunately, it seems that naively writing the grammar with type parameters after arbitrary expressions is a surefire way to break comparison expressions. I decided to follow the same form as call_suffix, and instead allow type parameters in only a particular suffix, that being navigation suffixes.
Now, it works. Our parse rate went up like a percent as a result.
Test plan: Automated tests.

This is awesome @brandonspark. I sincerely hope that you keep contributing! I thought that this repo was losing traction but it seems I was wrong! Thank you @fwcd and @brandonspark! :)

Thanks for investigating! Please rebase it onto main (as always), so we can run CI.


Add comments after numeric enums

I created a new struct for this case. I think this is the easiest solution.
solves #30

Very smart approach with custom struct! I like it!
However, the generated SQL is invalid :slightly_smiling_face: It should be ARRAY[1/*foo*/, 5/*bar*/] instead of '{1/*foo*/,5/*bar*/}'. The same is true for tuples (composite types), it should be represented as ROW(1/*foo*/,"hello world").
Good news is that this can be easily resolved.
Custom struct should handle a single value, not an array. We already have an implementation for lists and for tuples, which will automatically switch to representation with ARRAY/ROW-constructor if to_string_literal returns nil.

I see you updated the code, but {1,2,3,4}/*one,two,three,four*/ is still invalid SQL, so the comment above is valid

Thank you for your contribution!


Test dataset & training recipe

Dear authors,
Congratulations on your good ranking in the DAC challenge. Thanks for sharing this well-organized codebase.
I'm trying to follow the model training part. Just have two questions here, 1) which test dataset did you use? And 2) which training recipe (options) received good results? (i.e. 70.3% ACC)
Thanks.

You can download the dataset from this link https://byu.app.box.com/s/hdgztcu12j7fij397jmd68h4og6ln1jw. Training options are shown in README.

Hi, I would like to know the test set you used, did you randomly split the training set?

Yes, we sampled 1000 images randomly from the training set as local test set, and DAC SDC evacuated the model on a hidden dataset


[BUG] Cannot open quest log from GM login due to one seemingly corrupted file

Module Version: v0.0.0 (idk but I was up to do as of 5/29/2021 at 8:30 pm)
Describe the bug
I got the screenshotted error when I was on a GM account and I clicked the button in the journal to open the quest log. It started after one of the players had viewed the quest for the first time and maybe did something to it like completed it or something. Player logins do not have the problem.
To Reproduce
Steps to reproduce the behavior:

create the quest from the file shown below (the file data currently seems to be corrupted and I don't have the before-corrupted version of the data)
Mid session with multiple players of varying admin levels have one on TRUSTED modify the quest, maybe mark as completed. I think the player is voice chat said, "What will it let me do with this quest? Can I just complete it?" :shrug:
From the GM account, try to click the button to open the quest log.
Observe that the quest log does not open and observe the console and see the error output screenshotted.

Expected behavior
The GM should be able to open the main quest log UI and not have errors.
Screenshots
here's the error when you click the "open log" button

Browser:
it's a multi-user repro and idk what all browsers everyone was using. I was using Chrome and Foundry native app
Foundry Version:
happened on 0.7.10 and persists into 0.8.6
Game System:
dnd5e
Additional context
Here's the journal entry for the quest that seems to be the problem.
`{"giver":null,"title":"Tuppet's Farm","status":"active","description":"
A strange smell of death has been spreading out from the area around Tuppet's farm and no one has heard from them lately.
","gmnotes":"","personal":false,"image":"actor","giverName":"actor","giverImgPos":"center","splashPos":"center","splash":"","parent":null,"subquests":["EOMoqmx6YuIWd1LV","l6QFTdfkEOVPuFgo","W1geW0weynmu01YY"],"tasks":[{"name":"Find the Briny Cave","completed":true,"failed":false,"hidden":false},{"name":"Deal with whatever creatures might have been drawn to the area","completed":false,"failed":false,"hidden":false},{"name":"Find the cause of the saltwater incursion","completed":false,"failed":false,"hidden":false}],"rewards":[{"type":"Abstract","data":{"name":"1000 Experience Points","img":"icons/svg/mystery-man.svg"},"hidden":false},{"type":"Item","data":{"name":"Ring of Unity","permission":{"default":-1,"3vj6dkkvd3lyWwqi":3},"type":"equipment","data":{"description":{"value":"
\n\t\t\t
Ring, minor tier, rare (requires attunement)
\n\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t\t
\n\t\t
This silver ring's band is fashioned to resemble a chain of tiny humanoid figures, locked arm in arm.
Multiple characters may attune to this ring during a single short rest, but only a single one may wear it.
The ring has 5 charges and regains [[/r 1d4+1]] charges at dawn. If you are wearing the ring and deal damage to a creature, you may expend a charge and deal an extra die of damage to that creature.
The size of the ring's damage die starts at [[/r 1d4]] and increases for every character attuned to it -- having two attuned characters will give the die a [[/r d6]], having three will give it a [[/r d8]], and so on, to a maximum of [[/r d12]].
","chat":"","unidentified":""},"source":"BMR","quantity":1,"weight":0,"price":null,"attuned":true,"attunement":1,"equipped":true,"rarity":"Rare","identified":true,"activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":5,"max":5,"per":null},"consume":{"type":"","target":null,"amount":null},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":null,"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"armor":{"value":null,"type":"","dex":null},"hp":{"value":0,"max":0,"dt":null,"conditions":""},"speed":{"value":null,"conditions":""},"strength":null,"stealth":false,"proficient":true},"folder":"YjQwpMvJ585uGBFX","sort":1100001,"flags":{"srd5e":{"page":"items.html","source":"BMR","hash":"ring%20of%20unity_bmr","data":{"item":{"name":"Ring of Unity","type":"RG","tier":"minor","rarity":"rare","source":"BMR","reqAttune":true,"entries":["This silver ring's band is fashioned to resemble a chain of tiny humanoid figures, locked arm in arm.","Multiple characters may attune to this ring during a single short rest, but only a single one may wear it.","The ring has 5 charges and regains {@dice 1d4+1} charges at dawn. If you are wearing the ring and deal damage to a creature, you may expend a charge and deal an extra die of damage to that creature.","The size of the ring's damage die starts at {@dice 1d4} and increases for every character attuned to it -- having two attuned characters will give the die a {@dice d6}, having three will give it a {@dice d8}, and so on, to a maximum of {@dice d12}."],"charges":5,"recharge":"dawn","uniqueId":"8d42340e68a2b83bb7ee7fe7ab1a507f","_isEnhanced":true,"_category":"Other","_typeListText":["ring"],"_typeHtml":"ring","_attunement":"(requires attunement)","_attunementCategory":"Requires Attunement","_fProperties":[],"_fMisc":["Magic","Charges"],"_fValue":0,"_fTier":["minor"],"_fIsMundane":false,"_fBaseItem":[],"_fBonus":[],"_vType":"Ring"}}}},"img":"modules/plutonium/media/icon/ring.svg","effects":[],"_id":"20GkB1aWpAvmRSVH"},"hidden":false},{"type":"Item","data":{"name":"Kuo Toa Plate","permission":{"default":-1,"3vj6dkkvd3lyWwqi":3},"type":"equipment","data":{"description":{"value":"
\n
Heavy armor (plate armor), rare
\n
\n
1,500 gp, 65 lb.
\n
AC 18
\n
\n
\n
\n
\n
This jagged armor is made of castaway hooks and barbs. While wearing this armor, if you take the Attack action on your turn, you can use a bonus action to try to shove a creature within 5 feet of you (see "Shoving a Creature" in chapter 9 of the D&D Basic Rules). The shoved creature takes [[/r 1d8]] piercing damage, in addition to either being knocked prone or pushed.
\n
If you are hit with an unarmed attack, the attacker takes [[/r 1d8]] piercing damage.
\n
The wearer has disadvantage on Dexterity (Stealth) checks.
\n
If the wearer has a Strength score lower than 15, their speed is reduced by 10 feet.
\n
","chat":"","unidentified":""},"source":"","quantity":1,"weight":65,"price":1500,"attuned":false,"attunement":0,"equipped":true,"rarity":"Rare","identified":true,"activation":{"type":"","cost":0,"condition":""},"duration":{"value":null,"units":""},"target":{"value":null,"width":null,"units":"","type":""},"range":{"value":null,"long":null,"units":""},"uses":{"value":0,"max":0,"per":null},"consume":{"type":"","target":null,"amount":null},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":null,"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"armor":{"value":18,"type":"heavy","dex":0},"hp":{"value":0,"max":0,"dt":null,"conditions":""},"speed":{"value":null,"conditions":""},"strength":15,"stealth":true,"proficient":true},"folder":null,"sort":700001,"flags":{"srd5e":{"page":"items.html","source":"LoRDToB","hash":"dead%20man's%20plate_lordtob","data":{"item":{"name":"Dead Man's Plate","source":"LoRDToB","page":0,"srd":true,"baseItem":"plate armor|PHB","type":"HA","rarity":"rare","weight":65,"value":150000,"ac":18,"strength":"15","stealth":true,"entries":["This jagged armor is made of castaway hooks and barbs. While wearing this armor, if you take the {@action Attack} action on your turn, you can use a bonus action to try to shove a creature within 5 feet of you (see "Shoving a Creature" in chapter 9 of the D&D Basic Rules). The shoved creature takes {@damage 1d8} piercing damage, in addition to either being knocked {@condition prone} or pushed."],"fluff":{"_itemFluff":{"name":"Dead Man's Plate","source":"LoRDToB"}},"uniqueId":"e408f9a6f2ebdd08753669f3f7ca8933","_isEnhanced":true,"_category":"Other","_fullEntries":["This jagged armor is made of castaway hooks and barbs. While wearing this armor, if you take the {@action Attack} action on your turn, you can use a bonus action to try to shove a creature within 5 feet of you (see "Shoving a Creature" in chapter 9 of the D&D Basic Rules). The shoved creature takes {@damage 1d8} piercing damage, in addition to either being knocked {@condition prone} or pushed.","The wearer has disadvantage on Dexterity ({@skill Stealth}) checks.","If the wearer has a Strength score lower than 15, their speed is reduced by 10 feet."],"_typeListText":["heavy armor"],"_typeHtml":"heavy armor (plate armor)","_attunement":null,"_attunementCategory":"No Attunement Required","_fProperties":[],"_fMisc":["SRD","Magic"],"_fValue":1500,"_fTier":["none"],"_fIsMundane":false,"_fBaseItem":["plate armor|phb"],"_fBonus":[],"_vType":"Heavy armor"}}},"magicitems":{"enabled":false,"equipped":false,"attuned":false,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"}},"img":"systems/dnd5e/icons/items/armor/plate.png","effects":[{"_id":"pSvMKK46Iw3iOl9U","flags":{},"changes":[{"key":"data.attributes.ac.value","value":18,"mode":4,"priority":4}],"disabled":false,"duration":{"startTime":null,"seconds":null,"rounds":null,"turns":null,"startRound":null,"startTurn":null},"icon":"systems/dnd5e/icons/items/armor/plate.png","label":"Base AC","tint":"","transfer":true}],"_id":"KtJD2pzYHqTNjAeP"},"hidden":true},{"type":"Item","data":{"name":"Spell Siphon Amulet","permission":{"default":-1,"3vj6dkkvd3lyWwqi":3},"type":"equipment","data":{"description":{"value":"
\n
Wondrous item, rare (requires attunement by a warlock)
\n
\n
\n
\n
\n
\n
\n
\n
This amulet consists of a golden disc set with a brilliant star ruby. It seems to draw in ambient magic and glows in the presence of extremely powerful magical auras.
\n
While wearing this amulet, whenever a single target spell targets you, you can use your reaction to force the caster creature to make a saving throw using their spell casting modifier against your spell save DC.  Make this roll before rolling your saving throw.
\n
","chat":"","unidentified":""},"source":"","quantity":1,"weight":0,"price":null,"attuned":true,"attunement":1,"equipped":true,"rarity":"Rare","identified":true,"activation":{"type":"reaction","cost":1,"condition":"Targeted by a single target spell"},"duration":{"value":null,"units":""},"target":{"value":1,"width":null,"units":"","type":"creature"},"range":{"value":null,"long":null,"units":""},"uses":{"value":0,"max":"0","per":""},"consume":{"type":"","target":"","amount":null},"ability":"","actionType":"","attackBonus":0,"chatFlavor":"","critical":null,"damage":{"parts":[],"versatile":""},"formula":"","save":{"ability":"","dc":null,"scaling":"spell"},"armor":{"value":null,"type":"trinket","dex":null},"hp":{"value":0,"max":0,"dt":null,"conditions":""},"speed":{"value":null,"conditions":""},"strength":null,"stealth":false,"proficient":true},"folder":"YjQwpMvJ585uGBFX","sort":1000001,"flags":{"srd5e":{"page":"items.html","source":"CrazyJarlsDiscountMagicShop","hash":"mage%20siphon%20amulet_crazyjarlsdiscountmagicshop","data":{"item":{"name":"Mage Siphon Amulet","source":"CrazyJarlsDiscountMagicShop","rarity":"rare","reqAttune":"by a sorcerer","wondrous":true,"entries":["This amulet consists of a golden disc set with a brilliant star ruby. It seems to draw in ambient magic and glows in the presence of extremely powerful magical auras.","While wearing this amulet, whenever a spell you cast targets a single hostile creature, that creature must make a Wisdom saving throw against your spell save DC. On a failure, you gain a single sorcery point."],"reqAttuneTags":[{"class":"sorcerer"}],"uniqueId":"1d5bba431af5d68237b81d3b1b840321","_isEnhanced":true,"_category":"Other","_typeListText":["wondrous item"],"_typeHtml":"wondrous item","_attunement":"(requires attunement by a sorcerer)","_attunementCategory":"Requires Attunement By...","_fProperties":[],"_fMisc":["Magic"],"_fValue":0,"_fTier":["none"],"_fIsMundane":false,"_fBaseItem":[],"_fBonus":[],"_vType":"Wondrous item"}}},"magicitems":{"enabled":true,"equipped":true,"attuned":true,"charges":"0","chargeType":"c1","destroy":false,"destroyFlavorText":"reaches 0 charges: it crumbles into ashes and is destroyed.","rechargeable":false,"recharge":"0","rechargeType":"t1","rechargeUnit":"r1","sorting":"l"}},"img":"modules/plutonium/media/icon/crossed-swords.svg","effects":[],"_id":"wYKiuZwOPsJVCGZv"},"hidden":true}]}`

Having a very similar issue myself. Quest entries are simply disappearing, or becoming unresponsive while adding them.

As noted in a comment on #32 the reason is that pasting from the browser contains \n characters (and possibly other problematic characters), which makes the json parsing fail.
Closing this as duplicate of #32


Can't get it to work

Hi
I was trying to run the application and I'm facing this issue. It just shows lets play at /lobby after login.

How do I get it to work?
Thanx

Hello,
Do you see any errors in your runserver terminal or in the browser console? Also, did you clone this repository or are you working on the tutorial in the blog post?

Nope, there are no errors in the runserver.
I've cloned this repository.

I've just tested cloning it fresh and going through the steps I listed and it worked for me. I did forget one step and just added it to the project description, which is to run webpack to build the JS packages. But I would think you would have received a Django template error.
Did you run webpack in your terminal?
Also, are there any errors in your browser console to give us a clue?

yes I did run webpack
Yes, Theres this error in the console http://localhost:8080/current-user/?format=json Failed to load resource: net::ERR_CONNECTION_REFUSED

Are you running the server on port 8080? I believe the React components may be hard-coded to call out on that port in this example project.
If you are on port 8080, what happens when you try to hit the error's URL directly?

Oh.. I wasn't running it on 8080. But when I did now, I'm getting this in the console : XMLHttpRequest cannot load http://localhost:8080/current-user/?format=json. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://<IP_ADDRESS>:8080' is therefore not allowed access.
This is what I get if I directly go to the error URL {"id":null,"username":"","groups":[]}

OK, thanks. I've updated the project instructions to include running on port 8080. The blog post that walks you through the project uses that port, but I just didn't make it dynamic in the example project. I may update that soon so that any port works.
Now, the error you're getting is probably because your browser is using http://<IP_ADDRESS>:8080 and trying to communicate to http://localhost:8080 as the backend. It thinks you're attempting to connect to a different domain. Make sure the browser is also using localhost:8080 and you should be good-to-go.

Yes It worked!!
Thankyou so much! I was struggling on this from past 2 days.
By the way the tutorial is just awesome. Thankyou for that.

Thanks! I appreciate the feedback! Glad you got it working, too.


feat(spanner): add option to return read timestamp

For snapshot read-only transactions, it's possible to get the backend to return the read_timestamp. This PR introduces a TimestampBound.ReturnReadTimestamp property so that users can opt into returning the timestamp.

@jskeet and @olavloite this is ready for another look.

PTAL, I've addressed all the comments.

I will have a look at this when I get the chance, but it may not be before Tuesday (due to vacation and a public holiday). Please shout if there's more urgency than I'm aware of.

@googlebot I consent.

PTAL @olavloite @jskeet
@jskeet I don't understand the "Detect differences" failure. SessionPool.CreateDetachedSession() has an additional parameter but with a default value so it shouldn't affect any existing call sites. What am I missing?

@skuruppu:

I don't understand the "Detect differences" failure. SessionPool.CreateDetachedSession() has an additional parameter but with a default value so it shouldn't affect any existing call sites. What am I missing?

That's still a breaking binary change. Optional parameters provide compile-time compatibility (mostly - not completely, in fact) but it's still a breaking change for previously-compiled code, because the CLR would still look for the method without the extra parameter.
To add a parameter in a compatible way, you need to overload the method instead, making the method with the current signature call the method with the additional parameter. (I would then not make that parameter optional - let the overload do the defaulting, effectively.)
Will look at the rest of the PR later today.

I'm on vacation today - I'll have a last look on Monday, or Amanda can merge if she's happy. (I only had a couple of tiny points last time, if I remember rightly.)

Thanks for your patience in reviewing this everyone. When you're ready, please merge it in. @jskeet if you could also please cut a release after this is merged, that would be fantastic.


[camera] - Question about the elaborate example

What is the purpose of two setState() calls in this method? I get the same result in my modified version of the example after removing the first call.
void onNewCameraSelected(CameraDescription cameraDescription) async {
    if (controller != null) {
      await controller.dispose();
    }
    controller = CameraController(
      cameraDescription,
      ResolutionPreset.high,
      enableAudio: enableAudio,
    );

    // If the controller is updated then update the UI.
    controller.addListener(() {
      if (mounted) setState(() {});
      if (controller.value.hasError) {
        showInSnackBar('Camera error ${controller.value.errorDescription}');
      }
    });

    try {
      await controller.initialize();
    } on CameraException catch (e) {
      _showCameraException(e);
    }
    // I only have this call at the end which works just fine
    if (mounted) {
      setState(() {});
    }
  }

Figured it out, didn't notice that we're adding a anonymous function as listener.


feat: support for OpenAI/Anthropic tools APIs

Rebased and testing #280 by @jrmi

[!IMPORTANT]
Adds support for OpenAI and Anthropic tools APIs with configurable tool parsing methods and updates related tests and dependencies.

Behavior:

Adds tool_format parameter to chat() and step() in chat.py to support different tool parsing methods ('markdown', 'xml', 'tool').
Updates CLI in cli.py to include --tool-format option for specifying tool parsing method.
Modifies reply() in llm/__init__.py to handle tools based on tool_format.

Tools:

Updates ToolSpec and ToolUse in tools/base.py to support new tool_format.
Adds examples() functions in various tool files to generate examples based on tool_format.
Updates tool execution logic in tools/*.py to handle tool_format.

Tests:

Adds tests in test_tool_use.py and test_prompt_tools.py to verify tool output formatting.
Updates existing tests in test_cli.py to cover new --tool-format option.

Misc:

Adds json-repair dependency in pyproject.toml for JSON handling.
Minor refactoring and code cleanup in several files.

This description was created by  for 1647814bbbc5fc3314d94747de338e1b4458723d. It will automatically update as commits are pushed.

:x: 4 Tests Failed:

Tests completed
Failed
Passed
Skipped

108
4
104
0

View the top 3 failed tests by shortest run time

tests.test_cli::test_tool_format_option[tool-expected2-not_expected2-True]

Stack Traces | 2.35s run time

self = <MagicMock name='reply' id='140473635317040'>

    def assert_called_once(self):
        """assert that the mock was called only once.
        """
        if not self.call_count == 1:
            msg = ("Expected '%s' to have been called once. Called %s times.%s"
                   % (self._mock_name or 'mock',
                      self.call_count,
                      self._calls_repr()))
>           raise AssertionError(msg)
E           AssertionError: Expected 'reply' to have been called once. Called 0 times.

.../hostedtoolcache/Python/3.10.15.../x64/lib/python3.10/unittest/mock.py:908: AssertionError

During handling of the above exception, another exception occurred:

args = ['--name', 'test-22949-test_tool_format_option[tool-expected2-not_expected2-True]', '--show-hidden', '--tool-format', 'tool', 'test']
runner = <click.testing.CliRunner object at 0x7fc2912216c0>
tool_format = 'tool', expected = ['{"name": "shell"']
not_expected = ['```shell\nls', '<tool-use>\n<shell>\nls'], use_tools = True

    @pytest.mark.parametrize(
        "tool_format, expected, not_expected, use_tools",
        [
            ("markdown", ["```shell\nls"], ["<tool-use>\n<shell>\nls"], False),
            ("xml", ["<tool-use>\n<shell>\nls"], ["```shell\nls"], False),
            (
                "tool",
                ['{"name": "shell"'],
                ["```shell\nls", "<tool-use>\n<shell>\nls"],
                True,
            ),
        ],
    )
    def test_tool_format_option(
        args: list[str], runner: CliRunner, tool_format, expected, not_expected, use_tools
    ):
        args.append("--show-hidden")
        args.append("--tool-format")
        args.append(tool_format)
        args.append("test")

        with patch("gptme.llm.reply", return_value=[]) as mock_reply:
            result = runner.invoke(gptme.cli.main, args)
            assert result.exit_code == 0

>           mock_reply.assert_called_once()
E           AssertionError: Expected 'reply' to have been called once. Called 0 times.

.../gptme/tests/test_cli.py:385: AssertionError

tests.test_cli::test_tool_format_option[markdown-expected0-not_expected0-False]

Stack Traces | 5.63s run time

self = <MagicMock name='reply' id='140017409633072'>

    def assert_called_once(self):
        """assert that the mock was called only once.
        """
        if not self.call_count == 1:
            msg = ("Expected '%s' to have been called once. Called %s times.%s"
                   % (self._mock_name or 'mock',
                      self.call_count,
                      self._calls_repr()))
>           raise AssertionError(msg)
E           AssertionError: Expected 'reply' to have been called once. Called 0 times.

.../hostedtoolcache/Python/3.10.15.../x64/lib/python3.10/unittest/mock.py:908: AssertionError

During handling of the above exception, another exception occurred:

args = ['--name', 'test-41738-test_tool_format_option[markdown-expected0-not_expected0-False]', '--show-hidden', '--tool-format', 'markdown', 'test']
runner = <click.testing.CliRunner object at 0x7f5857f68d90>
tool_format = 'markdown', expected = ['```shell\nls']
not_expected = ['<tool-use>\n<shell>\nls'], use_tools = False

    @pytest.mark.parametrize(
        "tool_format, expected, not_expected, use_tools",
        [
            ("markdown", ["```shell\nls"], ["<tool-use>\n<shell>\nls"], False),
            ("xml", ["<tool-use>\n<shell>\nls"], ["```shell\nls"], False),
            (
                "tool",
                ['{"name": "shell"'],
                ["```shell\nls", "<tool-use>\n<shell>\nls"],
                True,
            ),
        ],
    )
    def test_tool_format_option(
        args: list[str], runner: CliRunner, tool_format, expected, not_expected, use_tools
    ):
        args.append("--show-hidden")
        args.append("--tool-format")
        args.append(tool_format)
        args.append("test")

        with patch("gptme.llm.reply", return_value=[]) as mock_reply:
            result = runner.invoke(gptme.cli.main, args)
            assert result.exit_code == 0

>           mock_reply.assert_called_once()
E           AssertionError: Expected 'reply' to have been called once. Called 0 times.

.../gptme/tests/test_cli.py:385: AssertionError

tests.test_cli::test_tool_format_option[xml-expected1-not_expected1-False]

Stack Traces | 8.73s run time

self = <MagicMock name='reply' id='140473635321312'>

    def assert_called_once(self):
        """assert that the mock was called only once.
        """
        if not self.call_count == 1:
            msg = ("Expected '%s' to have been called once. Called %s times.%s"
                   % (self._mock_name or 'mock',
                      self.call_count,
                      self._calls_repr()))
>           raise AssertionError(msg)
E           AssertionError: Expected 'reply' to have been called once. Called 0 times.

.../hostedtoolcache/Python/3.10.15.../x64/lib/python3.10/unittest/mock.py:908: AssertionError

During handling of the above exception, another exception occurred:

args = ['--name', 'test-22949-test_tool_format_option[xml-expected1-not_expected1-False]', '--show-hidden', '--tool-format', 'xml', 'test']
runner = <click.testing.CliRunner object at 0x7fc2912231c0>, tool_format = 'xml'
expected = ['<tool-use>\n<shell>\nls'], not_expected = ['```shell\nls']
use_tools = False

    @pytest.mark.parametrize(
        "tool_format, expected, not_expected, use_tools",
        [
            ("markdown", ["```shell\nls"], ["<tool-use>\n<shell>\nls"], False),
            ("xml", ["<tool-use>\n<shell>\nls"], ["```shell\nls"], False),
            (
                "tool",
                ['{"name": "shell"'],
                ["```shell\nls", "<tool-use>\n<shell>\nls"],
                True,
            ),
        ],
    )
    def test_tool_format_option(
        args: list[str], runner: CliRunner, tool_format, expected, not_expected, use_tools
    ):
        args.append("--show-hidden")
        args.append("--tool-format")
        args.append(tool_format)
        args.append("test")

        with patch("gptme.llm.reply", return_value=[]) as mock_reply:
            result = runner.invoke(gptme.cli.main, args)
            assert result.exit_code == 0

>           mock_reply.assert_called_once()
E           AssertionError: Expected 'reply' to have been called once. Called 0 times.

.../gptme/tests/test_cli.py:385: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
:loudspeaker:  Thoughts on this report? Let us know!

This is passing now!
My limited local testing suggests this is good enough to merge. Any surprises will be handled in follow-up PRs.
Thanks a lot for the huge effort @jrmi! 🥇


Fix crash when calculating scroll

Idea Description
Fatal Exception: java.lang.IllegalStateException
Offset is unspecified
androidx.compose.ui.geometry.Offset.getX-impl (Offset.java:28)
io.github.droidkaigi.confsched2022.feature.sessions.ScreenScrollState$scroll$2$1.invokeSuspend (ScreenScrollState.java:31)
kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (BaseContinuationImpl.java:8)
kotlinx.coroutines.DispatchedTask.run (DispatchedTask.java:100)

    suspend fun scroll(
        dragAmount: Offset,
        timeMillis: Long,
        position: Offset,
    ) {
        val nextPossibleX = calculatePossibleScrollX(dragAmount.x)
        val nextPossibleY = calculatePossibleScrollY(dragAmount.y)
        scrollState.scroll(
            Offset(nextPossibleX, nextPossibleY), // ←

value class Offset internal constructor(internal val packedValue: Long) {

    @Stable
    val x: Float
        get() {
            // Explicitly compare against packed values to avoid auto-boxing of Size.Unspecified
            check(this.packedValue != Unspecified.packedValue) {
                "Offset is unspecified" // ←
            }
            return unpackFloat1(packedValue)
        }

Reference images and links

I'd like to work on this issue 🙋🏻

@Tomoyuki-TAKEZAKI I'm looking forward to seeing your PR! Assigned 👍

@Tomoyuki-TAKEZAKI Let me unassign issue 🙏

@takahirom
I was using Flamingo instead of Android Studio Electric Eel, so the build didn't go well and I was late.
I was going to tackle it during the third-day session of DroidKaigi.
Sorry :sad:

I'd like to work on this issue 🙋🏻

Oh, I see that my predecessor has returned, so I will look for another issue myself. 👍

@takahirom
I opened a PR for this issue: https://github.com/DroidKaigi/conference-app-2022/pull/878
Sorry for the late PR. :bow:


yne.fr

Domain name: https://yne.fr
Link to GTMetrix results: https://gtmetrix.com/reports/yne.fr/Z4SJqAHm/
Uncompressed page size: 17.5KB

  17.5 KB
  yne.fr

Not sure where 17.5 KB cam from. It's actually ~165.

Not sure where 17.5 KB cam from. It's actually ~165.

Not sure where 17.5 KB cam from. It's actually ~165.

From the link above :

But chromium network inspector confirm that's it not the uncompressed value :
18.0 kB transferred 160 kB resources

I'll try to improve that ;)

Not sure where 17.5 KB cam from. It's actually ~165.

From the link above :

But chromium network inspector confirm that's it not the uncompressed value :
18.0 kB transferred 160 kB resources

I'll try to improve that ;)

Like it says on the site, I use the GT Metrix waterfall for all tests, so it's the same for everyone:

Like it says on the site, I use the GT Metrix waterfall for all tests, so it's the same for everyone:


New plugin name requirements

Hi @cristianvasquez
Per our developer policies,
please ensure that your plugin's name does not include the word "Obsidian".
In addition, the plugin name should not include the word "Plugin", as that is unecessary duplication.
We have already modified the name of your plugin to "Snippets" in our records.
To maintain compliance, take the following actions:

Modify the manifest.json file in your plugin repository.
Generate a new release for your plugin to ensure users download the updated manifest.

If you have a idea for a different plugin name, you may also submit a pull request to the obsidianmd/obsidian-releases repository.
Thank you for your cooperation.
— the Obsidian team

Hi, please feel free to propose a name or make a pull request!

I already proposed a new name: "Snippets"

Hello @joethei,
The current manifest.json does not include the name obsidian. The ID has been 'snippets' for the last 4 years
{
  "id": "snippets",
  "name": "Snippets plugin",
  "version": "0.0.4",
  "minAppVersion": "0.9.12",
  "description": "Execute simple scripts/snippets from obsidian. This plugin is experimental",
  "author": "Pelao",
  "authorUrl": "https://cristianvasquez.me",
  "isDesktopOnly": false
}

Please make a pull request so I can have a better idea of what is requested

Remove "plugin" from the plugin name, it's unnecessary duplication.
Same rules apply for the description, btw: Don't include "Obsidian" or "Plugin"


Initialize Zarr arrays in TIFF readers as zero-filled

Fixes #82 and https://github.com/mehta-lab/recOrder/issues/327#issuecomment-1479897823.
The converter will now log a warning and fill with zeros instead of throwing an error if certain images are not present in the OME-TIFF series.
Edit: Test that repeated reads return the same values.
In [1]: from iohub.reader import imread

In [2]: reader = imread('/hpc/projects/compmicro/rawdata/other/NIC QLIPP/2022_12_01 PtK cells/FOV1_1')

In [4]: reader.get_zarr(0)[0,-1,:,500,500]
Out[4]:
array([  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
         0,   0,   0,   0,   0,   0,   0, 631,   0,   0,   0,   0,   0,
         0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
         0,   0], dtype=uint16)

In [5]: reader.get_zarr(0)[0,-1,:,500,500]
Out[5]:
array([  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
         0,   0,   0,   0,   0,   0,   0, 631,   0,   0,   0,   0,   0,
         0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
         0,   0], dtype=uint16)

In [6]: reader.get_zarr(0)[0,-1,:,500,500]
Out[6]:
array([  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
         0,   0,   0,   0,   0,   0,   0, 631,   0,   0,   0,   0,   0,
         0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
         0,   0], dtype=uint16)

Nice solution @ziw-liu!

@ieivanov can you review this too?

I haven't run the code, but everything seems reasonable to me. Talon has run the code, and as I understand it, it works well. Approving, we can merge.


No Dashboards Available - Error occurred while getting the user

Hello, WSO2 community.
Description:
I am running WSO2 API manager, in the same node along with the analytics server, and the analytics dashboard.
The analytics server is able to connect to the APIM, as seen in the worker.sh terminal log:
[2019-11-25 05:11:36,052]  INFO {org.wso2.carbon.databridge.core.DataBridge} - user eyeqadmin connected
I log into localhost:9643/analytics-dashboard.
and then get a screen like:

I cannot see any way to see or set up widgets. and when I click in the button, widgets. I get this log in the terminal running dashboard.sh.
[2019-11-25 05:40:24,066] ERROR {org.wso2.analytics.apim.idp.client.ApimIdPClient} - Error occurred while getting the user.
I inspected the jdbc:h2:/home/wso2carbon/wso2am-analytics-3.0.0/wso2/worker/database/WSO2AM_STATS_DB
The API calls are being registered by the analytics-server.

But still no graphs on the dashboard.
Hope you can guide me on how to solve this issue.
Regards,
JP
Suggested Labels:
APIM 3.0.0
Affected Product Version:
WSO2 API Manager 3.0.0, WSO2 Analytics 3.0.0

@JUANPARBELAEZ  This is the same issue addressed in https://github.com/wso2/analytics-apim/issues/781. We have already fixed this issue with https://github.com/wso2/analytics-apim/pull/785.  This fix will be available in our next immediate release which is APIM Analytics 3.1.0 due in late December, 2019. In the meantime, if you need this fix you can download  3.1.0-m1 https://github.com/wso2/analytics-apim/releases/tag/v3.1.0-m1 or build the repo ad get the latest available distribution.


Lookup missing translations

added rake task which can find missing translations (i18n_timezones:lookup_missing_translations)
added some missing timezones to de and ru translations
added fi, no, sv and th locales with timezones native speakers live in
added some dirty hack to nn and nb locales support (in "no.yml")

As far as i see, tests requires me to transalte all AR timezones. At this point it is very difficult, so it seems that this PR should be either delayed or fi no sv and th basic translations should be separated into another PR / probably live forever in fork's branch.
So i can remove all parts of this PR you are not interested in and leave changes in my fork's branch, if you want


Doc pages should link to the relevant page for referenced types

Is your feature request related to a problem? Please describe.
Many function parameters or struct members do not link to their types in the parameter/member description.
Describe the solution you'd like
Ideally all cases where a parameter or member is mentioned there should be a link to its type (if there is a page for that type, basic types not counted).
Describe alternatives you've considered
You can copy-paste the type from the text and input it into the search bar, which works but is quite a clumsy way to navigate especially for when you are following a chain of references.
Additional context
Examples (non-exhaustive) include ID3D12GraphicsCommandList4::EmitRaytracingAccelerationStructurePostbuildInfo which doesn't link to the type of pDesc and D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC which doesn't link to the type of InfoType.

Thanks, @baldurk. I made the changes you mentioned. The more general updates will take longer.


'flights' exiting Geo bounds and causing exception in UWP

System.ArgumentException
HResult=0x80070057
Message=Value does not fall within the expected range.
Source=
StackTrace:

At our recent workshop a couple attendees increased their airspeed and found themselves outside the bounds Geo library in the UWP. In the function we can look for value over/under 180/-180 and remap those to the proper longitude or latitude on the next hemisphere.
In the meantime on the UWP app we added a catch before we set the values in the UI to a random value within the map bounds.
File - MainViewModel > line 326 eg:

var rnd = new Random();
// ...

public async void UpdateFlightInformation(List<NewFlightInfo> infos)
{
  var dispatcher = Windows.ApplicationModel.Core.CoreApplication.MainView.CoreWindow.Dispatcher;

  foreach (var info in infos.Take(100).ToList())
    {
      var activePlane = this.ActivePlanes.FirstOrDefault(w => w.DisplayName.Equals(info.deviceId));

      if( info.latitude > 180 || info.latitude < -180 || info.longitude > 180 || info.longitude < -180){
        info.latitude = rnd.next(-113, -115) ;
        info.longitude = rnd.next(33, 35);
      }

      await dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
      {
      // ...

Further to Tim's comments, it would be great if we could keep everyone's planes contained within a certain radius of Area 51. ie. set up a virtual box around Area 51 and don't allow planes to go outside that region.  The challenge with allowing all planes to fly around the world is that it becomes hard for people to see if their planes have shown up and where they are located. Would be nice to avoid having to zoom out, locate all the planes, scroll around and then have to zoom back in to to see the metadata/names of the planes.


X-Real-IP or X-Forwarded-For headers?

Is it possible to add to listen for the above headers? Just in case if we place docker_auth behind an nginx proxy/ELB ?

makes sense.
plan:

add server.real_ip_header, default - empty
if server.real_ip_header is set, retrieve it from the incoming request, remove spaces, split by commas, take the leftmost entry
try parsing as ipv4 first, then ipv6
if parsed ok, use as client ip, if not, reject request (do not use connection ip, which might be internal).

should be easy enough to do, but as always - no ETA. feel free to send a PR.


Fix typo in X.L.IndependentScreens example code

Closes #111
Description
Trivial typo fix, therefore no tests or updates to CHANGES.md/XMonad.Doc.Extending
Checklist

[x] I've read CONTRIBUTING.md

[ ] I tested my changes with xmonad-testing

[ ] I updated the CHANGES.md file

[ ] I updated the XMonad.Doc.Extending file (if appropriate)

Thanks!


[$500] Reimbursement - Save button loops between Rate and Track distance after refreshing Rate page

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

Version Number: 1.4.46-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:

Go to staging.new.expensify.com
Go to Workspace settings
Select a workspace
Go to Reimbursements > Rate
Click Rate to open rate input page
Refresh the page
Click Save
Click Save again

Expected Result:
RHP will close after clicking Save button
Actual Result:
App returns to rate input page after clicking Save button
Workaround:
Unknown
Platforms:

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

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

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/c6931e5c-0b70-4d9b-bf1c-a7e761ce172e
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01c2728c1eb1d045e0
Upwork Job ID:<PHONE_NUMBER>475485696
Last Price Increase: 2024-03-04

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

We think that this bug might be related to #wave5
CC @dylanexpensify

Proposal
Please re-state the problem that we are trying to solve in this issue.
Reimbursement - Save button loops between Rate and Track distance after refreshing Rate page
What is the root cause of that problem?
Over here :
https://github.com/Expensify/App/blob/e870f17a979d9b516a2393b7fa451ff1406398cf/src/pages/workspace/reimburse/WorkspaceRateAndUnitPage/RatePage.tsx#L49
we are having this - Navigation.navigate(ROUTES.WORKSPACE_RATE_AND_UNIT.getRoute(props.policy?.id ?? ''));
What changes do you think we should make in order to solve the problem?

Instead, we should do this  - Navigation.goBack();
What alternative solutions did you explore? (Optional)
N/A

Hey @apeyada! I think it mostly depends on Reviewers what they want because if read the Expected Result carefully it states exactly this -RHP will close after clicking Save button. So it depends if they want to fully close the RHP or navigate back to initial page after clicking on Save Button.

@dylanexpensify, is this related to wave5? Should this be internal or external?

@aimane-chnaif can you please review the proposal? Thanks!

Hey, @aimane-chnaif, please provide an update. Thanks!

Payment summary:
Both contributors need manual offers in NewDot:
$500 @rayane-djouah requires payment C+ review
$500 @aimane-chnaif requires payment  PR fix

@bondydaa, @aimane-chnaif can you complete the list above? Thanks!

Paid in Upwork.

Payment summary:
$500 @aimane-chnaif requires payment PR fix - requires payment in NewDot. PENDING

Thanks for the heads up, I sent you the offer in Upwork now.


Fix dump-repo git init, fix wrong error type for NullDownloader (#20182)

Backport #20182
The dump-repo sub-command should initialize the git module before calling git commands.
And NullDownloader returned wrong error type, which stops dump-repo command, it's fixed together.

CI failure is related.

CI failure is related.

https://drone.gitea.io/go-gitea/gitea/56933/3/8
I do not think it's related ......

:rocket:


QHO notebook: Narrations

[ ] Record narration video of energy levels
[ ] Edit narration video of energy levels
[ ] Record narration video of wavefunctions
[ ] Edit narration video of wavefunctions
[ ] Record narration video of probability density
[ ] Edit narration video of probability density

Won't be using narrations in the video.


Support mutual TLS authentication

Support enabling and configuration mutual TLS (mTLS), aka client certificate verification
For additional security, particularly in cases where the Infra Server API might be publicly accessible, customers would like to enable mutual TLS on the Infra Server.
Traditionally with SSL/TLS, the client verifies that the certificate used by the server is signed by a trusted Certificate Authority. For web sites the trusted CA is usually a public CA such as DigiCert. For internal servers it is usually a private CA set up by the enterprise. With mutual TLS, the server also verifies that the client's certificate is signed by a trusted CA. If it is not, the client cannot connect to the server at all.
Today the Infra Client supports mutual TLS using the ssl_client_cert and ssl_client_key config.rb settings. The Infra Server does not have support for enabling this feature, it must be done by terminating the SSL connection on another system before it reaches the Infra Server.
The feature proposed is to enable the configuration of mTLS on the Infra Server.
Acceptance Criteria

mTLS can be configured as required on the Infra Server through the configuration file
a CA for mTLS can be specified  on the Infra Server through the configuration file

Implementation
The relevant nginx/openresty configuration settings should be:
   ssl_client_certificate /home/ubuntu/connect_root.pem;
   ssl_verify_client on;
   ssl_verify_depth 10;

These likely get set in this file on a chef server:
/var/opt/opscode/nginx/etc/chef_https_lb.conf

by conditionals configured in this file in the chef-server repository:
omnibus/files/private-chef-cookbooks/private-chef/templates/default/nginx/nginx_chef_api_lb.conf.erb

DONE!


fix: :bug: register entities directly.

Registering entities through async_setup_entry_helper is not correct, the partial setup function is called for each entity defined in the yaml file (zero or many times).
Revert to direct registration in async_setup_entry_helper as it was in 1.0.8.
Fixes #10, fixes #11
Signed-off-by: Philippe Vanhaesendonck<EMAIL_ADDRESS>

Thanks for this @AmedeeBulle !


Add five new books

Pull Request
Added 5 new books

Description

Add MongoDB Notes for Professionals to Database
Add JavaScript for Beginners to JavaScript
Add TypeScript Deep Dive to TypeScript
Add HTML5 Canvas Notes for Professionals to HTML and CSS
Add Python Notes for Professionals and Introduction to Scientifc Programming with Python to Python

Related Issue

No opened issues

@ibrahimraimi please could you resolve the conflicts?

Thank you 💪🏾


Make GENMASK macro definition generic and thus avoid redundancy

The GENMASK macro is currently defined at two places:
himanshu@himanshu-Vostro-3559:~/zephyr$ git grep -w "#define GENMASK"
drivers/dma/dma_stm32f4x.c:#define GENMASK(h, l) (((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h))))
drivers/sensor/adxl372/adxl372.h:#define GENMASK(h, l) (((~0UL) - (1UL << (l)) + 1) & (~0UL >> (31 - (h))))

It would be better to place the macro definition at include/misc/util.h and use it throoughly among the codebase, therefore avoiding any subsequent redundancy when adding a new driver in future.
The only problem I see is defining BITS_PER_LONG for each architecture and where exatcly it should be placed ?

What about
sizeof(long) * 8
?

Cc @ulfalizer @galak
Hmm. I don't know much about Zephyr but here is my opinion:

What if I want to cross-compile for say x86_32(i386) ILP32 by selecting CONFIG_32BIT(don't know if it exists in Zephyr) but my host machine (x86_64) would give 64 bits according to LP64 data model.
https://docs.oracle.com/cd/E19620-01/805-3024/lp64-1/index.html

It would be better to support some option in Kconfig: CONFIG_32/64BIT which can further select BITS_PER_LONG as 32/64 BIT respectively.

One small issue with sizeof(long) is that it can't be tested in the preprocessor.

Exactly! knowing at precessing stage is better than runtime stage.

If we only use GCC, then we could use __CHAR_BIT__ * __SIZEOF_LONG__.
Otherwise, we might have to define BITS_PER_LONG per architecture. Linux has some bitsperlong.h headers that do it.
Looking at tools/include/asm-generic/bitsperlong.h in Linux, it seems to double-check that __CHAR_BIT__ * __SIZEOF_LONG__ matches what the bitsperlong.h headers specify too.

Yes, it double-checks with the userspace macro implementation.

If we need to test the length in CMake or the like, then we might need some helper symbols too. In the meantime, __SIZEOF_LONG__ is probably simplest. Or sizeof(long), if we'd never need to test it in the preprocessor and really need to support non-GCC compilers (clang probably has __SIZEOF_LONG__ too).

himanshu@himanshu-Vostro-3559:~$ clang -dM -E -x c /dev/null | grep __SIZEOF_LONG__
#define __SIZEOF_LONG__ 8

himanshu@himanshu-Vostro-3559:~$ gcc -dM -E -x c /dev/null | grep __SIZEOF_LONG__
#define __SIZEOF_LONG__ 8

So, __CHAR_BIT__ * __SIZEOF_LONG__ seems best choice for now.
I will propose a patch for the same and add the definition at include/misc/util.h.


Update dependency flask to v2.3.3 - 233

[Auto generated]
Number: [#233]

github-webhook-server[PR 233]: Closing issue for PR: Update dependency flask to v2.3.3.
PR was closed.


Adding interface for ST7066U Parallel LCD Driver

Added the ST7066U.hpp to the firmware/library/L1Drivers directory.
Included in the header file are the ST7066UInterface and ST7066U driver classes.

Codecov Report

Merging #106 into master will decrease coverage by 46.56%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master     #106       +/-   ##
===========================================
- Coverage    88.8%   42.24%   -46.57%
===========================================
  Files           6        8        +2
  Lines         268     4481     +4213
===========================================
+ Hits          238     1893     +1655
- Misses         30     2588     +2558

Impacted Files
Coverage Δ

firmware/library/third_party/catch2/catch.hpp
40.48% <0%> (ø)

firmware/library/third_party/fakeit/fakeit.hpp
16.26% <0%> (ø)

Continue to review full report at Codecov.

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

Not sure why but the Codacy/PR Quality Review is not passing because the member variables lineNum and pos in the CursorPosition_t are unused.

Unused variables should be deleted and codacy is correct to fail on you for that.

Removed CrusorPosition_t from interface.
Renamed init() to Initialize().
Renamed toggleDisplay(bool on) to SetDisplayOn(bool on).
Renamed toggleCursor(bool on) to SetCursorHidden(bool hidden).
Added a CursorDirection enum class and changed SetCursorDirection(bool increment) to SetCursorDirection(CursorDirection direction).
Renamed WriteOperationType to WriteOperation and removed the Write suffixes.
Moved WriteOperation and Command enum classes to public.


Errors out installing Monumental Experience mod pack

I am trying to install modpack Monumental Experience-17.0.61.zip
The program errors out with this message:
Linking mods
Extracting texture pack .modcache/STONEBORN Gear-HIGH_EYES-1.16.5 - V2.1.zip
Extracting texture pack .modcache/EmbellishedStone.zip
Extracting texture pack .modcache/STONEBORN - 1.16.5 - V3.1.zip
Extracting texture pack .modcache/Repurposed_Structures-More_Villagers_Forge_v2.zip
Traceback (most recent call last):
  File "/home/<user>/github_public/modpack-installer/install.py", line 244, in <module>
    main(args.zipfile, args.mcdir, args.forge_disable)
  File "/home/<user>/github_public/modpack-installer/install.py", line 208, in main
    for dir in os.listdir(texpack_dir + '/assets'):
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/334827/assets'

Looks like the problem is that the code is assuming the mod zip will have an "assets" dir in it, but this mod does not:

oh this is a data pack, I assume? My code assumes anything marked as a "texture pack" is a resource pack with an assets/ folder. This should be a fairly simple fix, though.

I made a pull request with the fix: https://github.com/cdbbnnyCode/modpack-installer/pull/19

Update - I have made a fix that works for the Repurposed Structures datapacks and should work for other datapacks as well. The issue was that in vanilla MC, there doesn't seem to be a way to install a datapack globally for all new worlds (it has to be installed manually in the 'Create New World' menu). However, it seems like putting the datapacks into '.minecraft/datapacks' does allow them to be picked up automatically, at least in the one modpack I tested.
TLDR: Fixed in 65263b6 and 6fe8c76


Load policy and certificate from bytes

Description
Add a way to load policy.toml and certificate from bytes instead of a file
Motivation and Context
Quick and easy feature, should improve our API surface.
Test plans
Add unit tests.
Additional Information
None.
Checklist

[x] This issue concerns BlindAI Client
[ ] This issue concerns BlindAI Server

Reopening as it seems to me that this problem has not been solved.
The connect() function only supports loading a policy and a certificate from path, see https://github.com/mithril-security/blindai/blob/master/client/blindai/client.py#L394


playback: support serving streams in standard MP4 format

Description
This PR adds the mp4 (standard MP4) output format to the playback server, in additional to the existing fMP4 (fragmented MP4) output format.
Pros of standard MP4 with respect to fragmented MP4

Broader compatibility
Duration is explicit
Frames with negative DTS are hidden by using the "edit list" feature of MP4, instead of voiding their duration, reducing warnings and errors from some players

Cons

Generation is slower

Usage
Add format=mp4 to paths in playback server:
http://localhost:9996/get?path=stream&start=2024-04-07T12%3A57%3A33.808301%2B02%3A00&duration=1147&format=mp4

Nightly binaries
https://github.com/bluenviron/mediamtx/actions/runs/8621626444
TODO

[X] sort samples of different tracks by DTS before writing them
[ ] Tests
[x] Documentation

Hi, a question about the cons:
What do you mean by "generation is slower"? Is a file created that concatenates all the segments? On disk or in RAM? or is it necessary to read all the segments to get the total size without creating a temporary file? Is the slowness proportional to the length of the requested video?
Thanks,
Paolo

What do you mean by "generation is slower"? Is a file created that concatenates all the segments? On disk or in RAM? or is it necessary to read all the segments to get the total size without creating a temporary file? Is the slowness proportional to the length of the requested video?

The slowness is caused by the fact that in standard MP4s there is a single list that contains all samples. Therefore, all segments must be scanned and their samples have to be parsed before the playback file can be served.
Yes, the slowness is proportional to the length of the requested video.
In fragmented MP4 on the other hand there are multiple, small lists of samples, and these are concatenated them together along with the sample content. Therefore, the playback file can be generated as soon as the first segment is scanned.


trying to run npm start, error : Failed to load config "airbnb" to extend from.

I deleted the "airbnb" in the eslintrc and it force it work, probably not the best solution though.

It seems that your packages are not installed properly. Can you try deleting node_modules and installing packages using yarn only?

Close as no activity.


samples: socket: tcp: add tests section

Add tests section to verify building based on the documentation.
Fixes #54991
Signed-off-by: Anas Nashif<EMAIL_ADDRESS>

made part of #55051


Replayer: convert global slots to avoid to hashes in order to support devnet

Changed global_slots_to_avoid to state_hashed_to_avoid array in order to support other networks, like denvet. Before the change, it was not possible to add slots from other network as global slot to avoid on mainnet not necessarily should be skipped in devnet and vice versa

!ci-build-me

!ci-build-me

!ci-build-me

!ci-build-me


Fix Log folder permission.

If folder owner set to root but rsyslog is running as 'syslog' user then it can not write these files and silently fails.

This is related to PR #51 and issue #70 the changes mentioned in them don't seem to have been merged in.

@eherot I have updated the pull request to take into account your comments,
thank you.

:+1:


1685 migrate aiven for mysql remote replica

What changed, and why it matters
Migrated the Intercom Help Article Aiven for MySQL Remote Replica to https://docs.aiven.io
Added the article to Products > MySQL > HowTo > Create MySQL Remote Replica TOC structure

Hi @deanholbrough ,
Thanks for the contribution but the build is failing, can you please check in the Files Changed tab what's wrong?

@deanholbrough , hope you dont mind I've created a new PR (https://github.com/aiven/devportal/pull/1814) for this one - including all your content and with my comments already implemented. Hope this way I can save us some time delivering  this article.


[Release] Stage to Main

#224
#223
#226

Test URLs:

Before: https://main--bacom--adobecom.hlx.live/?martech=off
After: https://stage--bacom--adobecom.hlx.live/?martech=off

Stage: https://business.stage.adobe.com/

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.21%. Comparing base (ce2ec94) to head (143d68e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #227   +/-   ##
=======================================
  Coverage   96.21%   96.21%
=======================================
  Files          11       11
  Lines        1082     1082
=======================================
  Hits         1041     1041
  Misses         41       41

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


change: Change comment syntax (BREAKING CHANGE)

Fixes #676.

Documentation comments use the syntax /// for now.

WTF


Figure out serial representations of Engine Models

I want a way for engine models to be serialized and passed between various programming languages (python -> scala for example) or libraries without having to depend on transpiling (like Jython).
Something like an avro or protobuf representation with client interpreters in each language.
python->python is easy (just libs with pypi), but handicaps the ability to scale beyond python ecosystem later on.

In particular, this is important for job serialization .  Right now things like credentials, table_name, etc are serialized and validated a second time in mason-spark which is not very graceful:  https://github.com/samtecspg/mason-spark/blob/master/src/main/scala/configs/MergeConfig.scala


feat: console colors

What this PR changes/adds
This PR adds colored console output to the ConsoleMonitor. This is achieved by inserting special unicode characters before log lines to access ANSI coloring.
Note that the actual color depends on the color configuration in your terminal.
This behaviour is on by default, and it can be deactivated by passing the --no-color command line argument. This might be useful in certain environments, for example running in clustered environments, where log tools like stern are used, that do coloring on their own.
Also, some docker base images may not print colored output correctly, depending on the shell they use. There are ways to mitigate it, e.g. using the tty: true property in docker-compose, or passing the --it parameter to docker run.
Why it does that
Better readability.
Further notes
I had considered several ways to toggle the coloring:

using a config property: does not work properly, because the default ConsoleMonitor is instantiated before the ServiceExtensionContext, so we'd have a chicken-and-egg-problem
using a dedicated monitor-coloring module that contains a custom monitor. Decided against it, because I wanted to be able to toggle within the same runtime.
passing a command line arg --no-color. Needs to be implemented by the runtime base class, but has the least impact on the code base. Also, central configuration of the monitor in test runtimes was possible.

Linked Issue(s)
Closes # <-- insert Issue number if one exists
Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.

Codecov Report
Attention: Patch coverage is 0% with 27 lines in your changes are missing coverage. Please review.

Project coverage is 4.97%. Comparing base (7f20ba5) to head (efd52b4).
 Consider uploading reports for the commit 275d3e3 to get more accurate results

Files
Patch %
Lines

...va/org/eclipse/edc/spi/monitor/ConsoleMonitor.java
0.00%
21 Missing :warning:

...g/eclipse/edc/boot/system/runtime/BaseRuntime.java
0.00%
3 Missing :warning:

...a/org/eclipse/edc/boot/system/ExtensionLoader.java
0.00%
2 Missing :warning:

...ipse/edc/junit/extensions/EdcRuntimeExtension.java
0.00%
1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #4058       +/-   ##
============================================
- Coverage     71.74%   4.97%   -66.77%
- Complexity        0     277      +277
============================================
  Files           919     989       +70
  Lines         18457   20098     +1641
  Branches       1037    1124       +87
============================================
- Hits          13242    1000    -12242
- Misses         4756   19077    +14321
+ Partials        459      21      -438

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Challenge mounting buttons

I've got the components wired together and have tested that the system works as expected.  I am trying to install it into the 3d printed tower and am stuck getting the buttons installed.
The Feather is screwed down with m2.5 6mm screws.  I have the screen attached with m2.5 4mm screws using the bottom holes.  I assume the speaker will just float inside, but how do I get the buttons to stay when pressed.  I have soldered them into a mini-bread board, but even with 13mm long switches, I'm getting hung up on the wires from the display.  Also, I do not expect hot gluing them in place will stick well to the PLA and last more than a few presses.

The speaker did just float inside the one I built, but I suppose you could tack it in place somewhere with a bit of hot glue.
As I recall, the buttons were glued onto a small backing board and then that was glued into place. I suspect I used a bit of CA glue, along with hot glue to hold it as it dried.
Looking back at the video, there is a shot around 2:39 where it looks like the screen may be mounted with the wires coming out the top. That's probably why I had an easier time mounting the buttons. Either way, I'd recommend getting the buttons in place first before adding the screen if you can.
https://youtu.be/neajD8c7Fl8?si=OO9jSScfOJmQuNyj&t=159
Best of luck with the build! Let me know if you share the final results anywhere I can go check out.

This makes installing the buttons and speaker a lot easier: https://www.printables.com/de/model/807080-mini-dark-tower-mounts


Dockerfile: Move to CentOS8

Update Dockerfile for using centos latest

Coverage remained the same at 36.989% when pulling 4777e8126b2b5ed48e2e6fc48c6dc27613683b28 on move-to-centos8 into 346cffd5a775daa48f36c498ba615ba6d43511b7 on master.


Twitter/OG meta tags

Should we add some basic Twitter & OpenGraph meta tags to the pages to that if a user mistakenly links this site instead of the main one, it will still format nicely on sites like Twitter, Facebook, Slack, Discord etc.?

👋 Gonna get started on this now


Multiple Uploads: Fix bug where I can't send regular files to attribute writter

In reference to https://github.com/lebedev-yury/carrierwave-base64/pull/20.
This fixes this:
class Post
    mount_base64_uploaders :pictures, PictureUploader
end

Post.new pictures: [File.open(...)]
=> TypeError: no implicit conversion of nil into String

... so you can mix regular files and base64 strings. Also I added some tests, although the depend on installing carrierwave from master branch at github.

this looks already much better.
Could you please also remove ruby 1.9.3 from the travis.yml? Seems that the new carrierwave will drop support for it.

I learned the hard way that multiple file uploads are not designed to be
usable through a REST api.
The problem is there is no easy way to add or remove a file to the
attribute but by completely replacing the whole array.
My principal interest in this feature was that I could use it to send files
in base64 in a normal PUT request along side other model attributes, but
this bug (?) kills the purpose.
For the time being I just resorted to use a has_many with a model that has
a single mounted uploader.
El vie., 18 mar. 2016 a las 17:47, Yury Lebedev<EMAIL_ADDRESS>escribió:

Closed #27 https://github.com/lebedev-yury/carrierwave-base64/pull/27.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/lebedev-yury/carrierwave-base64/pull/27#event-595455558

@nicooga hi, sorry for just closing this PR, it was not active for some time.
About multiple files upload through an API, I understand your concern. It's probably not the best idea to upload several files in one batch to the API.
But the support for multifile uploads will still be added to the gem, just because carrierwave supports it.


Add Docker && a default .homebase.yml

Goal: Setup Homebase through Docker.
Summary of changes:

Added a Dockerfile and .dockerignore that assumes production settings, following this article.
Added a default .homebase.yml to be used in the Dockerfile.
Added instructions in README.md.

Notes:

I understand if you don't want to include Docker in order to not complicate things. I was setting things up for myself & documenting the steps anyway.
Not a Docker expert and didn't necessarily setup things in the best way possible.
If one wants to include Prometheus and Grafana, they're on their own. I did make a setup with Docker Compose but got no data in the end. Didn't continue that path. If you want docker-compose setup, I think I may still have it.
Needless to say, feel free to make any edits on anything.

Disclaimer: Perhaps my first serious PR; not sure of the etiquette.
Update: I'm currently having difficulties with homebase: connectivity problems and sudden shutdown. Not sure if the problem is with homebase or docker (probably it's docker). Prefer to keep this PR on hold till I resolve the problem.
Should report back soon.

Reporting back:

Fixed some problems I had in build. Now, it runs without shutting down.
However, dat serving is not stable at all. It's as if it's always working with at most one dat a time.

Is there any chance that multiple dats calling dat.joinNetwork() without providing different ports in opts could cause a problem, or can multiple dat.joinNetwork() work on the same port?
If there's no problem with the line above, I give up on integrating Docker and this PR can be closed.

Update: I left homebase's docker running yesterday with some dats configured but I couldn't clone them. When I came today and tried to clone, it clones successfully from homebase's docker, without changing anything O.o. It's as if it needed to warm-up or something.
I really don't know whether to consider this a problem of homebase & merge the PR anyway, or to consider it a problem of docker.

Is there any chance that multiple dats calling dat.joinNetwork() without providing different ports in opts could cause a problem, or can multiple dat.joinNetwork() work on the same port?

I think there is a chance of that. I need to move hashbase onto https://github.com/beakerbrowser/dat-node

👍 This looks good, merging. Thanks for the PR.


Still getting out of gas with some testrpc examples

Even the stock truffle example as demonstrated in this MetaMask tutorial is hitting out of gas, even after the 1.5x fudge factor was added.
We need to fix the testrpc gas estimating. Like let's just drop everything and pair on it, @kumavis.

Related to this testrpc issue.


Enable merged os_mmap for aot data sections and aot text

Enable merged os_mmap for aot data sections first, and try enabling merged
os_mmap for them and aot text except on platform nuttx and esp-idf.
This fixes the issue that aarch64 AOT module fails to load on android:
https://github.com/bytecodealliance/wasm-micro-runtime/issues/2274
And also refine os_mmap related code.

Merged this PR into branch main from dev/merge_aot_data_text since the related PRs had been reviewed:
https://github.com/bytecodealliance/wasm-micro-runtime/pull/3681, https://github.com/bytecodealliance/wasm-micro-runtime/pull/3711


Task: update d8

The current checked-in d8 is 6.2
Stable Chrome has 6.9
So our benchmarking copy of d8 is over a year out of date.
P1 since I am visiting the V8 team in mid October and I need stable results and time to analyse them before the trip.

@rakudrama Currently, we use 32bit versions of d8, should we continue to do that or switch to 64bit? (for ARM, there seems to be only a 32bit official build, but there are special builds for Android that we could add later).

I think best to match what runs on chrome for that architecture, so on x64, switch to 64-bit to represent desktop use.


docs: release note cleanup

Risk Level: n/a
Testing: n/a
Docs Changes: yep
Release Notes: sorta?

@envoyproxy/maintainers anyone not already swamped with release work able to take a look?
see  https://storage.googleapis.com/envoy-pr/aecce3c/docs/version_history/current.html for a recent docs build (e.g Http::Utility::sendLocalReply()  getting converted to a link, oops)

Check docs?
/wait


Ipython Notebook from neurom demo documentation

Please let me know what else should I include. I believe that the installation part must be removed from the notebook and instead to put how to install notebook and run the kernels.

Current coverage is 100.00%

Merging #135 into master will not affect coverage as of 7fb28ca

@@            master    #135   diff @@
======================================
  Files           30      30
  Stmts          988     988
  Branches         0       0
  Methods
======================================
  Hit            988     988
  Partial          0       0
  Missed           0       0

Review entire Coverage Diff as of 7fb28ca

Powered by Codecov. Updated on successful CI builds.

I think this shouldn't go in the top level. Maybe put it in an ipynb directory?