Feature Request : Youtube Clickbait Classifier

Problem
I often feel frustrated when I open a YouTube video and discover that it lacks value or is merely clickbait, with no relevance to the title or thumbnail that initially caught my attention.
Solution
To address this issue, the extension could be developed to access YouTube transcripts and compare the video's content with its title. By analyzing the match between the two, the extension could classify whether the video is clickbait or not. It would be useful to only run this on demand, i.e make the analysis fire on a button click.
While I'm not entirely certain about the accuracy of the classification process, I believe it could be achievable with a few-shot prompting approach and would be happy to help in curating the prompt.

Perhaps you can try doing this yourself to test for the accuracy of the classification process:

copy a video's transcript and title
put them in chatgpt with a sensible prompt
ammend the prompt so that chatgpt only outputs a single word like 'FALSE' for clickbait and 'TRUE' for other vids
compare chatGPT's output with your personal opinion of the video (and comeback here perhaps)

psst. I want to clarify that I am not a moderator or developer of the chatGPT extension, but I hope this suggestion helps you test its accuracy. Good luck!


Added timeout and retries parameter to SNMP class

This change makes the timeout and retries attributes of the
UdpTransportTarget class configurable.
Timeout 1 sec and 5 retries are the default in pysnmp/entity/rfc3413/oneliner/target.py

Thanks!


cleanup(tests,virtctl): Add missing headers

What this PR does
Add the header to every file in tests/virtctl that is missing it.
Before this PR:
After this PR:

Fixes #
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Special notes for your reviewer

Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

[ ] Design: A design document was considered and is present (link) or not required
[ ] PR: The PR description is expressive enough and will help future contributors
[ ] Code: Write code that humans can understand and Keep it simple
[ ] Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
[ ] Upgrade: Impact of this change on upgrade flows was considered and addressed if required
[ ] Testing: New code requires new unit tests. New features and bug fixes require at least on e2e test
[ ] Documentation: A user-guide update was considered and is present (link) or not required. You want a user-guide update if it's a user facing feature / API change.
[ ] Community: Announcement to kubevirt-dev was considered

Release note

None

/retest-required


[REQUEST] rev. 3 right half middle layers

Hi,
first off: thanks for making the designs for the cases available!
When I had a look at the rev. 3 middle layers I noticed the cut-outs for the USB and TRRS jacks are not centered, so I can just 3D print the part twice and flip it around.
I would really much appreciate it, if you could make STL files for the right hand halves of the rev. 3 middle layers which have the correct mirrored  jack positions.
Thank you very much.

#23
I mirrored the STL part using tinkercad.


event_id: Discarded invalid value

Package + Version

[ ] @sentry/electron 0.17.1

Description
I'm getting event_id: Discarded invalid value error for all events.
Example event: https://sentry.io/share/issue/74208e9488ae4148a85e457ad4cdc014/
Similar stuff in the on-premise version: Discarded invalid value for parameter 'event_id'

Reproduced the bug:
https://github.com/o2genum/sentry-electron-event-id-bug-demo
@sentry/electron sends event_id: [undefined] for some reason.

Cause found!
When this clone() happens, event happens to have a event_id property with value undefined. After cloning it is transformed into string [undefined]. That value is then untouched and is sent to Sentry.

@HazAT I think I can fix this quickly and make a pull request.
I guess the normalizeEvent() function just should mutate the event, without cloning anything?

@o2genum go ahead, much appreciated! Thanks!

Also experiencing this bug after upgrading to release 0.17.1


Tests: Also test CentOS MariaDB Image

Many Projects are still using the CentOS MariaDB Image, we should run the tests still against that just to be sure that there are no issues with it

we migrated all the clients away from the centos images


Report missing capability information

When I tried setting up docker instance inside LXC container it failed with error message "oci runtime error: operation not permitted". After running containerd under strace and looking at the logs it turned out to be missing SETFCAP capablity dropped in lxc-arch config.
It would be really useful to have information telling which capabilities are missing from the host, or at least that there are missing capabilities and output list of ones that are required.

There is really a no good way to know, that the application can report back.  It would have to perform an operation and then take a guess why that syscall resulted in an EPERM.
We don't have the information at the application level to figure this out.  Its just part of setting up applications in containers and finding the minimal set of caps that each one needs.


Add new review app example pages in preparation for external audit

What
Add new full page examples to the Frontend review app so that external auditors can test our styles, components and patterns in the context of full, functional pages.
Why
We produced lots of new full page examples for our last external audit (https://github.com/alphagov/govuk-frontend/pull/3503), however these remained separated from the main project and are now outdated, and likely incompatible with the architectural and tooling changes made in subsequent versions of Frontend.
This time around we intend to make these examples permanent additions to the review app, so that they can be remain contemporary with Frontend.
We will only be recreating a subset of the examples, based on which ones were flagged for improvement in the last audit [internal document].
Who needs to work on this

Developers

Who needs to review this

Developers
Content writers(?)
Designers(?)
Accessibility specialist(?)

Done when

[ ] Examples from the previous audit have been recreated in the current review app

[ ] 'Visit the UK on a business trip' (step-by-step navigation)[^1]
[x] 'Make a payment' (inputs with prefixes/suffixes and error validation)

[x] Existing examples have been updated

[x] Start page / 'Apply for a UK passport': Add headings to tab panels for mobile
[x] 'Update your account details': Add second password input

[x] An example using the prototype service header component has been created (this will be within the service header PR and provided as a separate URL)

[^1]: We may choose not to re-audit the step-by-step navigation, as this component is owned by the GOV.UK team rather than the Design System.

The service header component example is located here: https://govuk-frontend-pr-4950.herokuapp.com/full-page-examples/manage-company-information


Clarification on CASHIER_PAYMENT_NOTIFICATION

Cashier Version: 10.0.0-beta-2
Laravel Version: 5.8.31
PHP Version: 7.3.6
Database Driver & Version: MySQL 8.0.16

Description:
Per the upgrade guide for version 10... under the section labeled "Payment Notifications", it mentions using a CASHIER_PAYMENT_NOTIFICATION environment variable.
Is it necessary to set / configure this if you're opting to let Stripe "do it all for you", as also highlighted in the upgrade guide:

You can either let Stripe handle everything for you (you may configure this in the Stripe dashboard)

Heya. No you won't need to set the notification them if you use the Stripe billing notifications. I'll send in a PR to the upgrade guide tomorrow to clarify that.

Thanks for testing!


Reapply 'Translate the attributes prefixed with _html to keep the html markup.'

My benchmarks showing that #1024 don't slowing down the rendern since @josevalim switched from t to I18n.t in 6ba68fc42efcdf3290d3fd4bcc2fa3ab769b6e89.
So I think #1024 can be reapplyed.

Could you share the benchmarks? _html only works with t and don't work with I18n.t so if we want to reapply this behavior we will need to change to t what I think will re-add the performance regression.

Ok, I don't have test the functionality of _html with I18n.t only the speed if the key exists.


New Feature Request: Job Board

Job Board
https://techqueria.org/jobs

allows the user to create and edit job posts
users pay to be able to post jobs
users can send jobs to Slack #jobs channel
ability to filter & search certain jobs
automated email newsletter for new jobs added or add to existing newsletter
job type

Full-Time
Contract
Internship
Apprenticeship

job location

integrate through Google Maps API

Example Verbiage

Pursue your next step with companies that want you to be part of their team.
Tech Ladies connects you with the best jobs and opportunities in tech. We connect companies with the best techmakers. Join our community or post to our job board below: Connect with 50,000 Tech Ladies around the world and get access to our exclusive job board. Looking to diversify your team? Our job board reaches 50,000 women in tech.

Slack Bot

Slack bot that integrates with web app
Slack bot allows you to post to #jobs channel with predefined template from web app
people cannot post to jobs automatically; they have to register through website & pay to post jobs there

Gated Content

use Memberful to put pricing for certain job posts
https://memberful.com/pricing/

Inspiration - POC in Tech


Fix some reporter / logging issues. Fixes #392

This is a partial fix for #392, and addresses a few other issues I found along the way.

We were passing a stdio option to child_process.fork. While that is a valid option for many methods in the child_process API, it is ignored for child_process.fork. Instead, we must pass the silent: true option and pipe ps.stderr and ps.stdout to console.

Because we use the silent option, process.stdout.isTTY is now false in the child process. I modified test-worker.js to fake TTY support (but only if the parent process is a tty). I'm not sure that was necessary, however, without it, it might be difficult to test tty based libraries. Comments welcome.

I updated the mini logger to always print it's summary output after whatever output comes from the child process, always keeping it at the bottom of the printout. The algorithm for doing so is described in a comment later in this thread.

I added "visual tests", a suite we can run to verify the behavior across platforms. It's already proven valuable in this thread getting feedback from users. Just testing that the "correct" ansi escape codes are printed is not sufficient, different terminal emulators handle them differently. There's no good way to automate that test, so I've just tried to make it as easy as possible to manually test.

I had to drop log-update to address a bug in Terminal.app. This should probably addressed upstream, but I want to verify this is a good fix before changing ansi-escapes / log-update in ways that will affect lots of other applications.

@sindresorhus @vdemedes - ready for review.

Do we need visual tests? As I understand, those are supposed to be executed and completed manually.

I think it's a good idea. I wouldn't make the part of the build. Just something we can run through before cutting a release to make sure things look right

It's just I'm sure those tests will be forgotten often. Why can't we have automatic tests for comparing output?

It's just I'm sure those tests will be forgotten often

We will remember when we go to cut a release. Even so I don't think that's a big deal, these aren't mission critical tests.

Why can't we have automatic tests for comparing output?

Because what is output to the stream does not reflect what you actually see. Not every terminal emulator obeys the full set of ansi codes in the same way (here is just one example). A set of visual tests let us quickly check things look right locally and on whatever VM's we have available.

This is how mini reporter looks now (lorem ipsum content is being generated as process.stdout.write in child process). Note how the test count always stays below the logged console content.

Terminal.app on OSX is problematic (I'm running Yosemite, there is reason to believe it's fixed on newer versions). I haven't tested on Windows.

I'd appreciate some help figuring out the last of the kinks in this from anyone who knows something about terminal cursor manipulation. I'm not sure where things are going wrong. Here's what works:

Windows: It just works, always. (go figure)
OSX iTerm, and Ubuntu terminal. It works until you end up with process.stdout.write lining up perfectly with the column width. Then you get some extra newlines. You can see this with:

./cli.js test/visual/text-ends-at-terminal-width.js

look at the comments in that test to fully understand what it is doing.

Terminal.app on OSX Yosemite. Very broken. There is reason to believe it works on El Capitan, if someone could verify, that would be great.

To test, use ./cli.js test/visual/<one-of-the-visual-test-fixture-files>.js
The lorem-ipsum and text-ends-at-terminal-width tests are the best ones to look at.
Note lorem-ipsum is a misnomer now, as it prints the Gettysburg Address instead. I needed to be able to tell if characters/lines were missing from the final display and couldn't do that with lorem ipsum because I don't know Latin.
// @Qix- @vdemedes @floatdrop @sindresorhus

Here's lorem-ipsum.js in Terminal.app on El Capitan:

@jamestalmage Why not use log-update?
var logUpdate = require('log-update');
var text = '';
var i = 0;

setInterval(function () {
	text += Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5);
}, 150);

setInterval(function () {
	logUpdate(text + '\n\n  ' + i++ + ' passed');
}, 50);

@ecowden - darn.  I was really hoping to be able to blame that on an old OS.
The _clear function basically a modified version of logUpdate.
Using logUpdate only works if you can clear the entire text. Right now the algorithm tries to do the following:
A: New status update.

Clear the existing status update.
Write the new status update.
Store the new status update as lastWritten. (existingStatus would have been a better name)

This is basically identical to log-update with the exception of storing the status.
B: New log output

Clear the existing status update.
Append text to the existing log output
Restore the existing status update from lastWritten

A is pretty easy, a solved problem with log-update.
B has proven difficult. Especially if what they write to the console does not end with a line terminator (\n). My current solution is just to store the last logged line, and delete/rewrite that as well.

The latest push looks good on everything I've tried except Terminal.app

Finally figured out the bug. Terminal.app does something weird with cursorLeft. The following code writes a line 20 characters wider than the terminal width, then writes the cursorLeft control character:
var ansiEscapes = require('ansi-escapes');

var str = '';

for(var i = 0; i < process.stdout.columns + 20; i++) {
	str += String(i % 10);
}

process.stdout.write(str + ansiEscapes.cursorLeft);

setTimeout(function() {
	// delay so you can see where the cursor is
}, 10000);

In most terminal emulators the cursor ends up all the way to the left of the current (i.e. second) line:

In Terminal.app, it ends up all the way to the left of the first line. (It moves up a line for no apparent reason).

I think I have found a decent cross platform solution.
I'd like a number of people to pull this down and run:
npm run visual

@jamestalmage Awesome! All the visual tests passed perfectly now on Terminal.app OS X 10.11.2 (El Capitan).

Great research, @jamestalmage!

@vdemedes - updated with lots of code comments and clearer variable names.
also, https://github.com/jamestalmage/ava/commit/328638db98e18e1e957dd86b9d0410565451f898

So, that last commit is maybe unnecessary:
var through2 = require('through2');
var assert = require('assert');

var ct1 = 0;
var ct2 = 0;

var stream = through2(function (chunk, enc, cb) {
	assert.strictEqual(ct1, ct2);
	ct2++;
	cb(null, chunk);
});

stream.pipe(process.stdout)

for (var i = 0; i < 160000; i++) {
	stream.write(String(i % 10));
	ct1++;
}

It seems through2 will always call the callback synchronously (at least when it's used the way I'm using it with last-line-stream). In that case, I just wonder if https://github.com/jamestalmage/ava/commit/328638db98e18e1e957dd86b9d0410565451f898 makes what's happening any clearer. Also, prior to that, I was using stream.push() to bypass the tracker, which is probably not the considered an abuse of the stream API.

All squashed up. What do you guys think, are we good to merge?

Marvelous!

Should we open a new issue about matching console.log output to the relevant test, discussed in https://github.com/sindresorhus/ava/issues/392?

Done => #420


Xamarin forms: Issue with epubreader

I am using epubreader NuGet package for parsing .epub files.
My Code:
string fileName = "SampleEPUB.epub";
var assembly = typeof(MainPage).GetTypeInfo().Assembly;
Stream stream = assembly.GetManifestResourceStream($"{assembly.GetName().Name}.{fileName}");
EpubBook epubBook = EpubReader.ReadBook(stream);
foreach (EpubNavigationItem chapter in epubBook.Navigation)
{
	chapterDetails.Add(new ChapterDetails() { title = chapter.Title, htmlData = chapter.HtmlContentFile?.Content, subChapters = chapter.NestedItems });
}

When parsing the epub file like above, I am getting only one chapter. If I click the chapter there is no data.
When we open that epub files using Adobe Digital Editions 4.5.11, there are lot of chapters and contents. I need to parse all the chapters and TOC in the epub file.  Please help me to find the issue behind this.
I have added a sample project here having .epub files for the reference.

Sorry for a delayed response. You need to use the EpubBook.ReadingOrder property. Please take a look at this example: How to extract the plain text of the whole book and let me know if it works for you.


[Manual backport 2.x] Tenant feature with the removal of tiny amazon links

Description
Manual backport tenant feature with the removal of tiny amazon links since there is not option of rebase for autobot's backporting PRs.
Category
[Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation]
New Feature
Issues Resolved

Relate https://github.com/opensearch-project/security-dashboards-plugin/pull/1403
Relate https://github.com/opensearch-project/security-dashboards-plugin/pull/1421

Check List

[ ] New functionality includes testing
[ ] New functionality has been documented
[x] Commits are signed per the DCO using --signoff

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

Pretty sure we should ignore these codecov failures.


Half starfield at 1440p or higher resolutions

Hi John!
This is a beautiful site! I’m not much of a coder, I just wanted to let you know that at 1440p monitors, the star field only goes 2/3 across the screen. It will only be on half the screen at 4k.

Added a fix for this: https://github.com/johnggli/linktree/pull/11


pod restart story revert

Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[ ] Test A
[ ] Test B

Checklist:

[ ] The title of the PR states what changed and the related issues number (used for the release note).
[ ] Does this PR require documentation updates?
[ ] I've updated documentation as required by this PR.
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas

Changes have been reverted under - https://github.com/devtron-labs/dashboard/pull/596


Support Components with resource types

Now that wit-bindgen supports resource types it would be nice for jco to be able to create bindings for them.
Currently a component generated from a wit file like:
package tools:runtime

interface clients {
  resource placeholder {
    hello-world: func() -> string
  }
}

world runtime {
  export clients
}

implemented with this Rust code:
use exports::tools::runtime::clients::GuestPlaceholder;

wit_bindgen::generate!({
world: "runtime",
exports: {
    "tools:runtime/clients/placeholder": Placeholder,
}});

pub struct Placeholder;

impl GuestPlaceholder for Placeholder {
    fn hello_world(self: &Self) -> wit_bindgen::rt::string::String {
        "Hello World".to_string()
    }
}

Throws this error when attempting to transpile:
$ jco transpile ./runtime_component.wasm -o jsbind
thread '<unnamed>' panicked at 'internal error: entered unreachable code', /Users/gbedford/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wit-component-0.11.0/src/decoding.rs:428:30
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
(jco transpile) RuntimeError: unreachable
    at __rust_start_panic (wasm://wasm/0138d726:wasm-function[3742]:0x22bfe6)
    at rust_panic (wasm://wasm/0138d726:wasm-function[3731]:0x22bbdb)
    at _ZN3std9panicking20rust_panic_with_hook17hd31828a1e0797468E (wasm://wasm/0138d726:wasm-function[3730]:0x22bbb6)
    at _ZN3std9panicking19begin_panic_handler28_$u7b$$u7b$closure$u7d$$u7d$17ha8aff06d904e9661E (wasm://wasm/0138d726:wasm-function[3718]:0x22aee4)
    at _ZN3std10sys_common9backtrace26__rust_end_short_backtrace17h19b363b199c42f90E (wasm://wasm/0138d726:wasm-function[3717]:0x22ae49)
    at rust_begin_unwind (wasm://wasm/0138d726:wasm-function[3725]:0x22b4cc)
    at _ZN4core9panicking9panic_fmt17hae97e7765f924659E (wasm://wasm/0138d726:wasm-function[3888]:0x239bfd)
    at _ZN4core9panicking5panic17h9c5315c5a9c1c997E (wasm://wasm/0138d726:wasm-function[3894]:0x23a249)
    at _ZN13wit_component8decoding17WitPackageDecoder15register_import17heea50728dd5ac9d1E (wasm://wasm/0138d726:wasm-function[559]:0x5a00b)
    at _ZN13wit_component8decoding6decode17h08f74e086a829d6bE (wasm://wasm/0138d726:wasm-function[558]:0x58ba2)

Removing the nesting resource from under interface clients and slightly reworking the Rust code produces a WASM module that jco successfully transpiles.

Resources are already supported. Which version of jco did you test this with? If you can share the exact workflow and tool versions that would help a lot to ensure I've got the exact right versions of things to replicate the issue.

Apologies, thought this was a feature request and not a bug so I didn't put up a repro, will try to get one up and linked here today. In the meantime here are all the relevant dependency versions and the cargo/wasm-tools/jco commands I ran to get to the error above
Versions of relevant tools:
Cargo:
$ cargo --version
cargo 1.70.0 (ec8a8a0ca 2023-04-25)

Node:
$ node --version
v20.3.0

JCO:
$ jco --version
0.9.4

Wasm-tools:
$ wasm-tools --version
wasm-tools 1.0.40

Cargo deps for the Rust code:
[dependencies]
wit-bindgen = "0.11.0"

And the code I ran to build it all:
cargo build --target=wasm32-unknown-unknown

wasm-tools component new ./target/wasm32-unknown-unknown/debug/wasm_runtime.wasm -o runtime_component.wasm

jco transpile ./runtime_component.wasm -o jsbind

Ahh looks like this is my mistake. I ran npm update -g jco, and it seemed to work, but it left it at 0.9.4. I removed and reinstalled to the latest on npm 0.11.2 and it seems to have fixed the issue. Sorry for the bother!


New chunks sometimes don't generate/load on web client (world gaps) - remove browser threading?

They do in the native client, but not web, sometimes. Maybe a symptom of sqlite? https://github.com/satoshinm/NetCraft/issues/2
View from orthographic mode ("f" key):

This does not matter much for my first use case (https://github.com/satoshinm/WebSandboxMC, since it only shows a small section of the world, all sent by the server using "B," commands, not generated on the client), but it is important for playing the game locally, or potentially also using remote Python servers.

Curiously, new chunks generate sometime, but not always (web only - still thinking this is related to some port. Maybe tinycthread?):

There seems to be fewer holes when changing #define WORKERS 4 to 1 in src/main.c, but have not confirmed

Maybe remove tinycthread and generate (client) chunks synchronously for now (shouldn't affect online mode, when the server generates the chunks).

Trying with -s USE_PTHREADS=1 to emcc, rebuilding:
Scanning dependencies of target craft
[  4%] Building C object CMakeFiles/craft.dir/src/item.c.o
[  9%] Linking C executable craft.html
INFO:root:generating system library: libc-mt.bc... (this will be cached in "/Users/admin/.emscripten_cache/asmjs/libc-mt.bc" for subsequent builds)
INFO:root: - ok
INFO:root:generating system library: pthreads.bc... (this will be cached in "/Users/admin/.emscripten_cache/asmjs/pthreads.bc" for subsequent builds)
INFO:root: - ok
INFO:root:generating system library: dlmalloc_threadsafe.bc... (this will be cached in "/Users/admin/.emscripten_cache/asmjs/dlmalloc_threadsafe.bc" for subsequent builds)
INFO:root: - ok
[100%] Built target craft

the client immediately fails with:
no such block found: Cobble
exception thrown: TypeError: Argument 9 ('pixels') to WebGLRenderingContextBase.texImage2D must be an instance of ArrayBufferView,texImage2D@[native code]
_glTexImage2D@file:///Users/admin/games/wasm/NetCraft/build/craft.js:9357:23
_load_png_texture@file:///Users/admin/games/wasm/NetCraft/build/craft.js:30928:15
_load_main_texture@file:///Users/admin/games/wasm/NetCraft/build/craft.js:30945:19
_main@file:///Users/admin/games/wasm/NetCraft/build/craft.js:27093:20
file:///Users/admin/games/wasm/NetCraft/build/craft.js:65743:24
callMain@file:///Users/admin/games/wasm/NetCraft/build/craft.js:66127:30
doRun@file:///Users/admin/games/wasm/NetCraft/build/craft.js:66191:60
file:///Users/admin/games/wasm/NetCraft/build/craft.js:66202:12
TypeError: Argument 9 ('pixels') to WebGLRenderingContextBase.texImage2D must be an instance of ArrayBufferView

This may be obviated at least when online with https://github.com/satoshinm/NetCraft/issues/188, but for completeness ought to still fix offline local mode world holes, probably by removing tinycthread in emscripten

With https://github.com/satoshinm/NetCraft/issues/172 the world holes now have a visible lower layer, due to the bedrock:


Persian translation

Adding translations for Persian (Farsi) language.

Some major changes may happen that need a huge change over the docs unit. I'll put this on hold to see what will happen.


Enhancements to autodoc/embedsignature

Add embedsignature.pure compiler directive to generate pure-Python type annotations compatible with type hinting syntax. This mostly amounts to:

Not emitting C type declarations in signatures.
Preferring explicit argument type annotations over C types.
Mapping C type names to the closest Python type name.

See https://github.com/cython/cython/issues/3150

Note: The changes from this PR are opt-in: code that sets embedsignature.pure = False (or do not set it at all, False is the default value) should not see any differences in the embedded signatures.

It's definitely an opt-in change, given that a lot of type information is lost here.

My main motivation is to emit something that would be valid Python syntax and compatible with type hints, I'm using these pure signatures to generate *.pyi stubs, see here . That means we cannot emit C type names as is. And I think you agree that honoring explicit type annotations is OK. Then what remains is how to map a C type to some syntactically valid Python identifier/expression.
I decided to map C integral/real-floating/complex-floating to Python int/float/complex type names. But we could do things differently. For example, map long double complex to a underscorified identifier like long_double_complex , or whatever rule you like, I'm totally open to suggestions. Would you prefer I do it that way?

I'm using these pure signatures to generate *.pyi stubs, see here .

Cool. It's usually a good idea to begin generated files with a comment like "# This file was generated by …", to avoid accidental manual changes after the fact, and to leave a note how to regenerate the file on changes. (There's an additional debate whether generated files should be under version control, but I doubt that there's a general answer to that question.)

what remains is how to map a C type to some syntactically valid Python identifier/expression.

Not just syntactically valid, also semantically meaningful. Mapping C integer types to Python int is quite restrictive, for example, because we call PyNumber_Index() on conversion internally, so valid input arguments are not just int but any integer-like type. That's probably worth expressing here. The closest is probably SupportsIndex.

Also note that return types are very different from argument types. If the C return type is known, then we can map it to an exact Python type and write that as return type annotation. If a C argument type is given, then the C-API conversion rules apply and the range of Python types that we accept for it may be broader. It would be great to express that in the generated type annotations.
There's also a possible mapping from func(list arg=None) to func(arg: Optional[list] = None). The list of beneficial mappings is probably not that short.

You're essentially working on https://github.com/cython/cython/issues/3150

the "semantically meaningful" part is quite hard in the duck-typing scenario.

Absolutely. And that's the only real issue that I see here. If we settle on a specific kind of output, then users will start relying on it, and it will be difficult to change in the future.
The main problem here are the different audiences. Type annotations are for humans, whereas static types are for compilers. Mostly. Just because Cython can generate code for a type conversion does not mean that it's intended to be used that way.
For correctness, the type annotations that we generate would have to be as broad as possible, meaning: any index instead of int, any number instead of float, etc. Whether that is what users actually want, I don't know. It's what their API accepts, in any case.

My gut feeling is that users who write C int or long probably intend it to accept Python int, really. But on the other side, users who have a Python float value and want to pass it into the API would then have to call int() on it, or their static type checker would complain. Although the API would handle the float input just fine and efficiently. That's what annoys me a bit.
The fact that we allow type kinds of declarations and prefer the Python one is pragmatic, but also bares a risk of confusion and mix of syntaxes. I'm really not sure that I want to encourage that. But it would be good to read a few more opinions.

Remember that "Python type declarations" are actually just annotations.

… unless you use them as the way you declare types for Cython. In that case, they are type declarations, not just annotations. The fact that you can mix both in .pyx files is, well, limited to .pyx files. It doesn't help users who write their Cython code in .py modules to tell them that their life could be so much easier and cooler if they switched to non-Python syntax extensions and renamed their files. We are currently trying to discourage writing new code in Cython syntax and use Python syntax instead, simply because there is much more tooling available for writing Python code than for Cython code.

If you want to reject arguments with both C types and annotations

I didn't suggest to make them invalid syntax, but I also wouldn't want to present mixing both forms of type declarations as the best of both worlds. I don't want Python type annotations to be considered a second class citizen that is only looked at if there is nothing more convincing and can otherwise be happily ignored by the compiler.

def foo(int arg: Annotated[int, MaxValueAllowed(42)]) -> Any:
    ...

Why is this better than the following?
def foo(arg: Annotated[cython.int, MaxValueAllowed(42)]) -> Any:
    ...

I actually think this discussion belongs into #3150. Let's continue it there.

We are dealing with docstrings here!

There's also __text_signature__, which would probably pick this up, wouldn't it?

There's also text_signature, which would probably pick this up, wouldn't it?

That would require implementing the text_signature format. You already made me remove from this PR the bits that would simplify that work. Nonetheless, __text_signature__ does not support annotations. Bether said, inspect.signature() barfs if your __text_signature__  has annotations [link].
So, if we ever implement __text_signature__, we would have to strip all annotations.
PS: As I said before, I think __text_signature__ would only be useful if using #cython: binding=False, which is no longer even the default.

think that int, float, complex are easier human-consume

I agree. Let's do this: we keep it as simple as you wrote it for now, remove the documentation part that talks about mixing syntax, and add a note that the specific output and type mapping is experimental and may change over time.
Basically, we acknowledge that the feature is helpful and guarantee that users will get something reasonable out of it, just not exactly what.

Your reluctance to accept this PR made me think harder. We can do slightly better: have a compiler directive embedsignature.format of type str with values "full" (the current Cython format), "clinic" (the argument clinic format), and "pure" (what this PR implements so far). We document what the pure format does, and add a warning about it being subject to future change.

That sounds very reasonable. I'd call the "pure" version "python", though, and the "full" one "c" (and require lower case and reject everything else). I think that's clearer.

Python 2 does not support __text_signature__. Is there any way to flag a test file as Python 2 only?

using "cython" instead of "c" for the default format

I had also first used cython in my comment, but then changed it to c because it really uses C argument notation. People who learn Cython in Python syntax might be confused about what the difference between cython and python is here. c is a clearer distinction.

c is a clearer distinction.

OK, fair enough. I'll make the change.

Done. I'll wait CI and your approval to merge. Otherwise, click yourself the merge button.

@scoder @da-woods I'm waiting for further comments or your explicit approval.

Thanks. Very nice improvement.


active refresh currentHostMaster

Here's a problem,A master-slave switch occurred during the time of the client network failure,unable to receive subscription message,then currentHostMaster point to the slave.
Added code for active refresh

@HeartSaVioR would know. :)

Sorry it needs to take time to reload the context. Active refresh should help on that scenario, but just curious it is sufficient to only placing it before subscription.

@w775450 Could you please refine the PR's title and also commit message? Thanks in advance.

It's not a question of the reload time.When the network is disconnected for a long time，the socket communication  will be broken and JedisConnectionException will be thrown, in this senario  it can not received the subscription message . so it needs a manually active refresh

Sorry it needs to take time to reload the context.

@w775450 Sorry above statement was my joke. :) I have been out of Jedis for months and just get back so I need some time to warm up myself to play as Jedis collaborator.

@HeartSaVioR :)

LGTM. @marcosnils If you are not familiar with this, I'll just treat it as enough reviewed. Please let me know if it's the case. If not please review.

merged to master and corresponding branches.

See #1910 it seems like adding initPool() call on the MasterListener run() can cause concurrency issues with the Main thread running constructor & then getResource()

The simple solution I see here is to add some critical section on initPool() and make sure no two threads are executing it in parallel.
@marcosnils @HeartSaVioR ?

@w775450 , I'm a little confused, the code you add is just run at the first time of masterlistner. If the network failed after the masterListner, how can these code reinit the pool?

@w775450 , I'm a little confused, the code you add is just run at the first time of masterlistner. If the network failed after the masterListner, how can these code reinit the pool?

because the masterListener while run until be shuntdown
`      running.set(true);
  while (running.get()) {

    j = new Jedis(host, port);

    try {
      // double check that it is not being shutdown
      if (!running.get()) {
        break;
      }

`


Feature/apollo client v3

What was done:

Update imports to reflect @apollo/client v3 paths
Update typing in some places
Prettifying files
Change TsLint to ESLint
Added Prettier for better code formation
Added simplified ESLint rules

Why it was needed:

ApolloClient released new version with breaking changes
TSLint is deprecated since 2019

Side Effects:

Not all rules from tslint.json(old) are reflected in .eslintrc.json(new)

@James-Firth there is package-lock.json on master branch I used both bpm and yarn to update dependencies versions in both package-lock.json and yarn.lock

@krzysztofgrowinski I'm sorry you're right, I must have misread when I gave it a skim. Thanks for the PR!

Sure I can do that.
One thing without these ESlint changes pipelines will fail. Is that ok?

@helfer I opened separate PR feel free to close this one if it wont be needed anymore. I skipped changing TSLint config to ESLint because of lack of time.

I merged your other PR, but as you said there were a bunch of linter errors. I didn't have time to look into all of them, so I'll try merging this one instead.

Just published these changes as 4.0 on npm. 🎉 Thanks a lot @krzysztofgrowinski!


Updated docs with tutorial for Hosting on Bitbucket

Hello @Dundonian,
many thanks for adding this tutorial to the docs. I've merged your additions as 6fb4e0718a7559a9cb7f524f44b93194e91b62c0 (master) and 9e5c44a71bc65b13d291dbd2b790cd869444cd18 (v0.15.docs).
Your changes should be visible within the next minutes.
Cheers,
Digitalcraftsman


Added more units to brainvision.py io

Coverage decreased (-8.9%) to 82.01% when pulling 4a081c1658991d0bf539ae73d13e0bb2bca0fad1 on Pablo-Arias:master into d8da522dbf94fa3fd96cf4c2d47bae7953261e62 on mne-tools:master.

Coverage decreased (-8.9%) to 82.008% when pulling d6ed0d1dc9ab798f55463898ef739380d9f9318e on Pablo-Arias:master into d8da522dbf94fa3fd96cf4c2d47bae7953261e62 on mne-tools:master.

@Pablo-Arias can you share a file so we can complete this work that go deep in the channel meta data?

@agramfort Hi! What kind of file do you need? A .eeg .vmrk and .vhdr?

Yeah if you could put those somewhere, we could fake some data in a unit test to test it the same way. Also, where did you get the list of units? Could you add it in a comment, as well as what at least C and ARU mean.

Hello,
You can download some data from this link  (only active one week):
https://we.tl/B0Igh1FtPo
This data is totally raw just as brainvision gives it. The units are in the .vhdr file.
Check for the AUX channels (128 - 136). Those are the units that are not supported.
I don't know what ARU and C mean. It's just what brainvision gives me... I'll ask brainvision support for more info.

@jaeilepp can you have a look?

@Eric89GXL Hello, I had an answer from Brainvision support team. These units correspond to:
S = Siemens;
V = Volt;
C = celsius
and
ARU is the unity for the breathing data

Since we already have a param for misc channels and set_channel_types can be used for setting the emg channels, I think this is sufficient. I don't think we need new constants for now.
It would be nice to have some actual data to align the scalings properly, but that's for later.
+1 for merge.

so channel with C, S or ARU unit will be set as misc by our reader?

No. Brainvision reader has a 'misc' param that allows setting any channel misc. It's in line with our other readers so I think it's good enough.

so you can end up with an eeg channels of type S or C? that should break or
at least raise a warning

so you can end up with an eeg channels of type S or C? that should break or at least raise a warning

I'm okay with that. Earlier we had a discussion about guessing the channel types and I think the conclusion was that by default the user would have to explicitly set the non-data channels.

sure but I had missed the fact that you have a unit to tell you what to do
:(

Taken over by #3261


AppConfiguration.Options KV Selector Documentation Clarification

On .Net Core 3.1, Include="Microsoft.Azure.AppConfiguration.AspNetCore" Version="3.0.0-preview-010560002-1165"
Need clarification on options.Select that there should be NO space after the comma (leading space) when specifying more than one key.  Perhaps on Intellisense notes?
Also Intellisense should specify a maximum number of 5 keys, and 5 values.
Documentation should state there will be a separate call to Azure for each options.Select(kv-selector)
/kv/?key=DemoKey-dummy-1&label=%00&api-version=1.0
/kv/?key=DemoKey-dummy-2&label=%00&api-version=1.0
/kv/?key=DemoKey-dummy-3&label=%00&api-version=1.0
/kv/?key=DemoKey-dummy-4&label=%00&api-version=1.0
/kv/?key=DemoKey-dummy-5&label=%00&api-version=1.0
/kv/?key=DemoKey&label=%00&api-version=1.0
/kv/?key=DemoKeyNoLabel&label=%00&api-version=1.0

@HashTagDotNet while the information is documented, I understand the discovery of it could be painful.
https://github.com/Azure/AppConfiguration/blob/master/docs/REST/kv.md#filtering
The amount of text may not be a good fit for IntelliSense. Localization is another issue. I am also a little concerned if we duplicate this information in IntelliSense, it may get outdated over time. I'm open to ideas and like to hear thoughts from others.

Finding that information in the doc and then making the assumption the client is aligned with the doc is probably an opportunity for documentation improvement.
As a consumer of your service, I don't want to find the REST documentation (particularly if I'm not using REST), read through it, and compare it with my knowledge of the client, then spend a several hours trying to understand how this all works.  I had to use Postman to grab the requests to better understand how the calls and spent quite a bit of time reading the documentation.
So updated documentation on each of the clients would be very helpful.
As an architect on my team who is considering migrating our settings to this platform, it would be helpful to have a few more details on the client that what is currently in the docs.

@HashTagDotNet I agree with all you said. There is no question about the documentation improvements. This should be made easier.

More information was included in the IntelliSense of the Select API.
https://github.com/Azure/AppConfiguration-DotnetProvider/blob/main/src/Microsoft.Extensions.Configuration.AzureAppConfiguration/AzureAppConfigurationOptions.cs#L112


fix: add warning if redirect_to is used for non-oauth sign-ups / sign-ins

What kind of change does this PR introduce?

redirect_to doesn't work for non-oauth sign-ups / sign-ins because those requests are POST requests. This means that we cannot redirect them without converting them into a GET request which would result in losing the response body.

Are we getting a lot of support requests about this? I personally haven't seen any, so wondering if this is really necessary.

Are we getting a lot of support requests about this? I personally haven't seen any, so wondering if this is really necessary.

yeah i've seen this appear quite a few times on the github discussions / issues - it also seems confusing that the redirect_to param only applies when you use oauth and not other forms of authentication

A document note on it would would be enough IMO.  I've seen it asked several times in Discord and have had to answer "I don't think that does anything"  for email/password, as I never found a clear answer, even in the source.
      if (email && password) {
        return this._handleEmailSignIn(email, password, {
          redirectTo: options.redirectTo,
        })

So you have to go dig thru gotrue to figure out the answer, or try it (which I did, so I could give an educated answer).

thanks for the feedback everyone! i've corrected the typedocs so it's clearer now


FanzyZone zone highlight is still visible through acrylic after window is placed sometimes

Microsoft PowerToys version
"0.37.2"
Running as admin

[X] Yes

Area(s) with issue?
FancyZones
Steps to reproduce

Fresh launch powertoys. It can be either launched automatically by checking "launch upon sign in" in settings, or killing it and launching manually. (This step is not strictly necessarily but I find it easier to reproduce this way)
Launch an app that has host backdrop acrylic brush. E.g Settings, Alarms & Clocks.
Create a zone that is large enough that the acrylic of the app would be shown. For settings etc, it has to be large enough that navigation view expands automatically.
Drag the app window to the zone in (3).
Observe the acrylic has a tint of the zone highlight color.

Notes

My zone highlight color is #4CB6D7.
It is not always reproducible. Please try several times. I find it easier to reproduce with step (1).

Screenshot
Correct

Tinted

Tinted with different zone highlight color #FF0000

✔ Expected Behavior
The acrylic show the host backdrop as-is.
❌ Actual Behavior
The acrylic show the host backdrop with a tint of the zone highlight color, as if the zone highlight, normally shown when the window is being dragged, is still being drawn.
Other Software
No response
Windows Version

Info

Edition
Windows 10 Pro

Version
20H2

Installed on
3/3/2021

OS build
19042.985

Experience
Windows Feature Experience Pack 120.2212.2020.0

@roxk
this is not something fixable in FZ, it's most likely a bug in Windows or more likely in the GPU device driver.
For curiosity, what happens is you resize the window after it has been zoned or if you navigate to different sections of the Settings app?

Since you mention GPU device driver, my GPU is an MSI 6800XT. Driver is 21.4.1. There is a driver update though, I can test again after I had updated the driver.
Navigating to different section in the settings app does nothing. Un-focus then focus on the window again, or resizing the window however do fix the rendering issue. The trick seems to be forcing a re-render.

@roxk
let us know if updating the GPU driver work.
Closing the issue for now since it doesn't seems caused by us.


Provide utilities for blocking methods

Wrap method invokation by executeBlocking.
Might be weird if an user calls context.next() from within the blocking method

Implemented -> test it

Doesn't work because context.next() isn't called in the right context.
Take a look at : https://github.com/vert-x3/vertx-apex/pull/97
This should be straightforward to map the annotation onto this new utility method.

thank you so muche @stephane-bastian :)


cilium: Transparent encryption datapath CI K8sT tests

Adds initial tests to K8sT CI to test datapath with vxlan and IPv4 only modes. There will be some improvements in the future but I think it makes sense to get this base case in now. Next we will add some more introspection options from cilium CLI and use these to verify traffic is being encrypted and alert if unencrypted traffic is seen. We can then verify these from the CI side. However, for now lets get some test coverage.
I verified these are encrypted and setting up transparent traffic by inspecting the VM manually. Also I intentionally broke the datapath encryption side add the test failed as expected.

This change is

test-me-please

test-me-please

dang, needs a small change if its not merged yet marking wip.

using 256bit keys per docs now instead of 128bit keys.

test-me-please

Coverage decreased (-0.04%) to 42.921% when pulling 7c23c31b9280e415cacbeb7b9d306318896ec57a on sockmap-ginkgo into 7e6221d9dcbebfb98be2fb286a3f654cc4f4c2e5 on master.

test-me-please

test-me-please

test-me-please

test-me-please

Last failure was due to CI 5.x failing vagrant/virtualbox preflight checks. Retry again. On 4.9.7 I noticed we hang the e1000e device (kernel watchdog fires) occasionally leading to flakes so retesting on net-next.

test-me-please

test-me-please

test-me-please

test-me-please

superceded
https://github.com/cilium/cilium/pull/7302
https://github.com/cilium/cilium/pull/7303


The value of limit can be zero

The query builder tests if $qb_limit is the default value FALSE. So you can code like below;
// $params->limit = 0;
$this->db->limit($params->limit);

Sure, you technically can have a LIMIT 0 clause. But what's the point?

Currently I cannot query limit(0) because the query builder ignores.
$sql = $this->db->limit(0)->get_compiled_select('posts');
// SELECT * FROM posts

@toonitw The question is why do you need LIMIT 0? Give an example/situation where this is needed.

I am in some legacy project. The project has a batch program that manipulates several db records.
Administrator wants to control batch size the number of db records, on the dashboard. Also he wants to stop batch work by setting this value to zero.
I can do this with if syntax. But I thought it's more concise to use query builder naturally.

Ok, I can imagine this and similar use cases and I'll merge this after the requested changes.
You're still better off with an if check though.

@narfbg Ok, thanks.


fix: some keywords are not iterated for AsyncAPI input

Description
This PR introduces two things.

Added unit test for reflecting schema name based on our parser.
Fixed a bug where properties, dependencies, and definitions were never iterated.

Thanks @magicmatatjahu 👍


Allow game.askForNumber prompt to span screen width

Modify @ChaseMor's commit to allow game.askForNumber prompt to span the width of the screen, rather than restrict it to the width of the number pad.
Before:

After:

Thanks Alex!

Out of curiosity, what does the whenUsed=true annotation do?

whenUsed indicates that it's something that can be dropped if there is nothing directly calling it - basically helping out making the tree shaking's job easier. This is particularly useful for things like particle effects, where it's possible that the tree shaking might not be able to recognize that it can get rid of the factories / etc used by the global constant otherwise. (also minor note, the =true can be dropped as seen in the particle effects example)
I'm not actually certain it will do anything in this context - it seems very possible that the constants would be safely dropped already, but I can't say that for sure without just testing it as I haven't really interacted much with that part of the code. No harm in adding it in this case, though :)


Add environment map

Hi,
This is an attempt to add environment map to appleseed-max plugin:

Texture map plugin that holds appleseed sky map parameters. I tried to follow code style of material plugins.
Turbidity map slot is not translated into appleseed renderer yet.

I've also changed setup_environment function a little:

it creates Hosek sky edf in case of appleseed environment map
If environment map is a bitmap it is translated to appleseed as a file texture.
max's UV offset parameters are translated into LatLongMapEnvironmentEDF's horizontal_shift/vertical_shift parameters

Regards,
Sergo.
Update: Now I realized I only updated projects and solution for 2016 max. Looks like I need to get all three version of sdk-s

Thanks for reviewing!
Sorry for so many fixes. Are you using some kind of tool to check code style?

Don't be sorry!!
We don't have an automatic formatter, unfortunately. We never really invested time in this topic yet, maybe we should. But with a bit of practice formatting becomes a non-issue...

Merged, thanks!


Initial draft NEP Voting and governance

@erikzhang can you add the file extension  .mediawiki, then we can read it easily on Github.

Done.


Add proper changelog

Tray doesn't have root changelog file, but it uses one for debian package. We need to start using root CHANGELOG file and generate changelog in debian format during tray packaging.
You can take CHANGELOG from p2p as an example: https://github.com/subutai-io/p2p/blob/master/CHANGELOG
Changelog converter to debian format is also exists in p2p inside a configure script: https://github.com/subutai-io/p2p/blob/master/configure
Example of proper debian changelog is here: https://github.com/subutai-io/tray/blob/master/deb-packages/deb-packages-internal/debian/changelog

Please add changelog to changelog.md too .
Doxygen uses that file.

Fixed.


Windows XP & RDP - hints

Windows XP is still a useful OS, especially if you have some ancient 32-bit apps that you need to run. However XP is not internet friendly. Explorer is borked and XP is just a virus/malware magnet.
XP SMB is V1 only and so the SAMBA file share option provided with the other Win versions won't work here.
RDP is the answer but unfortunately is not set to work out of the box with the current XP install
Here are the hints:
1.There is a user setup called "administrator" but no "docker" user. Use User Accounts in Control Panel to setup a "docker" user if you want or just use "administrator"
2.If you want to use RDP with no password you need to change a registry key to allow:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa] "LimitBlankPasswordUse"=dword:00000000
Change LimitBlankPasswordUse to 0 (zero) to enable the use of blank passwords, 1 to prevent blank passwords over the network.   [REBOOT XP after this change]
3.The Windows Firewall does not have Remote Desktop setup as an exception. Use Windows Firewall in Control Panel. Go to Exceptions tab and click the Remote Desktop box to allow RDP sessions.
4.If you added the "docker" user you also need to go to System in Control Panel, then the Remote tab, then Select Remote users and add the "docker" user to the list.
5.Make sure you have the RDP ports mapped in the container
6.Seems XP is set to auto login as "administrator" on boot. If you use the "docker" user and get a black screen then go to web/vnc and accept the connection. There might be a reg key to prevent this behavior (??)
7.I had no luck getting Linux rdesktop client to scale properly with XP. Remmina does a better job but you do need to setup a Remmina profile to set the screen size and redirect a host folder to the XP file system.
8.Now you can download old apps on the host system safely and install to XP directly from the folder redirect.
It would be nice to have RDP working on XP out of the box, but maybe there was a good reason for not doing this. Either way it does work with a bit of fiddling....enjoy.

A few things:
1.XP will only allow one RDP session, and for no other users to be logged in locally. This means you have to disable the administrator auto login and I also disable the fast user switching.
2.Don't think you can rename a user, but easy enough to create a new Docker user with CLI commands
3.Think you need OemPreinstall=Yes in the [Unattended] section of your answer file for the $OEM$ folder to get copied over to the target install
So, the CMDLINES.TXT should look something like this:
[COMMANDS]
"regedt32 /s rdp.reg"
"cmd net user Docker /add"
"cmd net localgroup administrators Docker /add"
"cmd logoff"
You will also need the rdp.reg file in the $OEM$ folder:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\GloballyOpenPorts\List]
"3389:TCP"="3389:TCP:*:Enabled:@xpsp2res.dll,-22009"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]
"limitblankpassworduse"=dword:00000000
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"AllowMultipleTSSessions"=dword:00000000
"LogonType"=dword:00000000
I've tested the reg settings and they seem good with a clean install of XP. I've not tested the CMDLINES.TXT piece, so not sure if that will work as I expect.....
If the auto login being disabled is not an option, then the only other route would be to try 3rd party RDP patches...but I've never used them myself......http://www.kood.org/terminal-server-patch/


feature request: baml-cli dev --playground (or something similar)

For folks who don't use VSCode, we need a way to provide them with a decent developer experience.
The most likely path forward for this will be to allow users to spin up a local version of promptfiddle.com, backed by their local filesystem, something like
baml-cli dev --playground [port-number]

This will allow people to not have to download, install, and configure VSCode to edit their BAML code.
We've had a few requests from non-VSCode users about something along these lines: see #932 and #889

Why do I need to spin up something besides LSP server at all? Why can't I rely on LSP server or at least just run some script to generate required files?
For example, when I develop elixir apps, I have an LSP server which I connect to from neovim, which recompiles the files on save. If I don't use LSP, I can run mix compile which generates required files. I would like the same experience.


[SPARK-22263][SQL]Refactor deterministic as lazy value

What changes were proposed in this pull request?
The method deterministic is frequently called in optimizer.
Refactor deterministic as lazy value, in order to avoid redundant computations.
How was this patch tested?
Unit test

Test build #82664 has started for PR 19478 at commit bdeea55.

Test build #82664 has finished for PR 19478 at commit bdeea55.

This patch fails to build.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82664/
Test FAILed.

Test build #82667 has started for PR 19478 at commit 8143ee1.

@gengliangwang do you have any benchmark that shows that this is a performance bottleneck?

Test build #82667 has finished for PR 19478 at commit 8143ee1.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82667/
Test PASSed.

Test build #82698 has started for PR 19478 at commit 03e88b0.

Compare the total optimization time for the TPC-DS queries?

@viirya @hvanhovell @gatorsmile
Thanks, I have attached the performance result in the description in this PR.
Overall I don't see any downside of the code change.
Also it is possible to take much more time to get the deterministic of UDF, while making it lazy value can avoid that.

Test build #82698 has finished for PR 19478 at commit 03e88b0.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/82698/
Test PASSed.

Ok. The performance result looks good. LGTM.

Thanks! Merged to master.


access logger

Hi,
what is the best way to access the logger instance from my handler functions?
Any way to access it via *gin.Context ?
To set as default with  slog.SetDefault(logger) is not sufficient.
Thanks

I'm not sure this is a question related to slog-gin.
Example:
logger := slog.New(slog.NewTextHandler(os.Stdout, nil))

router := gin.New()

router.Use(sloggin.New(logger))
router.Use(gin.Recovery())

router.GET("/ping", func(c *gin.Context) {
    logger.Info("hello world")
    c.String(http.StatusOK, "pong")
})

Indeed this is not restricted to slog-gin. As my handlers are in a dedicated package, there is no access to the logger instance.


Can you explain the discrepancy in reported kNN Top-1 between POA and DINOv2-L?

The first image is your Table 1, and the second is DINOv2's Table 4.

The difference between 82.0% as reported in your paper versus 83.5% in DINOv2's is quite large. It's also apparent that DINOv2-L is a patch-size-14 model, not a 16. Are you accounting for this difference by resizing DINO's patch projector? Or just letting the different models have a different number of patches? Or are you feeding them different image sizes?

Here are two primary reasons for the observed performance difference:

Difference of model configuration: We adjusted the model configuration for a fair comparison with most self-supervised learning methods by setting the patch size to 16. However, it is generally observed that a smaller patch size, such as 14, tends to deliver better performance than 16.
Difference of  pre-training methods and data: The original DINOv2 paper utilized an unreleased dataset, whereas we used the standard ImageNet-1k dataset for our reproduction. Furthermore, the ViT-L model in the original DINOv2 paper was  distilled from a pre-trained ViT-H model, while we trained  ViT-L model from scratch.

Okay, so for your 82.0% result, you trained a new ViT-L/16 DINOv2 from scratch on ImageNet-1k, right?


Introduce SetEditor, Nestable Editors

Tests for nested editors coming. Please review now.
@aboodman
cc @kalman

Title of PR is wrong.


licensing issues with code from Thandy

When TUF was created some Thandy (Tor project udpater) source code was used -- often not directly copied but there are clearly places that are derivative. TUF itself does not seem to have any derivative code left anymore but Securesystemslib clearly does. The cases I found in my review are:

JSON functions in https://github.com/secure-systems-lab/securesystemslib/blob/master/securesystemslib/formats.py#L618 (derivative of https://gitweb.torproject.org/thandy.git/tree/lib/thandy/formats.py)
Many schemas implementations and documentation in https://github.com/secure-systemslab/securesystemslib/blob/master/securesystemslib/schema.py (derivative of https://gitweb.torproject.org/thandy.git/tree/lib/thandy/checkJson.py)

This is an issue because the BSD 3-clause used by Thandy is not quite compatible with the TUF/securesystemslib licenses (and because the copyright notices are not correct). I'm filing this issue in TUF because of the shared git history of TUF/securesystemslib.
I've contacted the original author who was kind enough to work within the Tor project (Thandy copyright owner) on this: they've agreed to do us a favor and relicense Thandy source code to also MIT + Apache 2.0 (as defined in LICENSE and LICENSE-MIT). This should solve any licensing issues with Thandy code   as long as we make sure we make sure the appropriate copyright notices are included.
So plan is:

summon @nmathewson  (original author of the code in question and Tor project contributor) to confirm that they are releasing Thandy source code (as in https://gitweb.torproject.org/thandy.git) under MIT and Apache-2.0 licenses
File an issue in securesystemslib to fix copyright notices to mention The Tor Project, Inc. as a copyright holder (link)

Nick: Again many thanks for your help with this issue. If you can confirm the relicensing here, that would be great!

Hello. I hereby confirm that we at the Tor Project are okay with dual-licensing Thandy under "MIT OR Apache 2.0".  Cheers!

Much obliged to you and the Tor project, thanks @nmathewson !

Fantastic work, thanks everyone 🙏🏽

We've merged a PR to securesystemslib which adds the Tor copyright to the relevant files: https://github.com/secure-systems-lab/securesystemslib/pull/366
Thank you everyone for the resolution here.


Error CSGMesh, Cube mesh

Godot version
Godot_v3.4.4-stable_mono_win64
System information
Windows 10 GLES3
Issue description
I'm trying to create a CSG Mesh and an error occurs.
Steps to reproduce
When I add a CSG Mesh to the walls, then select Cube Mesh, an error happens, but if I take Capsule Mesh everything works.

If I choose Capsule Mesh

After godot restart everything works.

Minimal reproduction project
3D test.zip

You probably want to use a CSGBox3D node instead of CSGMesh.


qemu static executable on non-86

We copy the static Qemu executable into the container images for non-x86 architecture. This seems to be the way people build non-x86 Docker images on x86 hosts. Eg here:

https://blog.hypriot.com/post/setup-simple-ci-pipeline-for-arm-images/
https://sedden.github.io/blog/2016/04/11/automated-builds-for-arm-docker-containers-on-intel-hosts/
http://www.encodeering.de/blog/85-automated-docker-builds-for-armhf

This works, but I don't understand fully why this is needed / what's going on.
So we should a) get to the bottom of this and b) add that to a README or FAQ.

My current theory is:

the qemu static executable needs to be copied into the container (image) iff that image should run on a CPU arch different from the container one and
the base image does not already contain the file


Add support for Greek character set

Summary of the Pull Request
This PR will add the Greek Charset to the Languages.cs file of PowerAccent. I tried to map each Greek letter to what I thought was the most appropriate English Character. I am not sure if this aligns with the current standard. The change has not been tested yet. I am seeking feedback on the current changes, and looking for help regarding the next steps and testing.

PR Checklist

[x] Closes: #24860
[x] Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
[ ] Tests: Added/updated and all pass
[ ] Localization: All end user facing strings can be localized
[ ] Dev docs: Added/updated
[ ] New binaries: Added on the required places

[ ] JSON for signing for new binaries
[ ] WXS for installer for new binaries and localization folder
[ ] YML for CI pipeline for new test projects
[ ] YML for signed pipeline

[x] Documentation updated: If checked, please file a pull request on our docs repo and link it here: https://github.com/MicrosoftDocs/windows-dev-docs/pull/4622

Detailed Description of the Pull Request / Additional comments
Seeking feedback for organizing the Greek characters to align with current PowerAccent standard.

Validation Steps Performed

@damienleroy this is one more case of the known discussion: Is Quick Accent designed to be about accents, or to "translate" between languages?

Thanks for the feedback so far. For the Greek charset would a better direction be to include only the lowercase accented Greek characters, as well as to remove the uppercase Greek characters from the current PR? I am not able to manually compile/test as yet, but I am unclear on the use of the shift key for PowerAccent.

https://github.com/microsoft/PowerToys/assets/58633848/7860dc1c-6c07-460c-850a-e14e7b6b972f
@blakestack When you hold shift while activating Quick Accent all characters will automatically be transformed into uppercase letters, so there is no need to include both.

I am not able to manually compile/test as yet

What problems are you encountering?

@Aaron-Junker
Can you restart policy service pipeline?

@Aaron-Junker
Can you restart policy service pipeline?

I can't or I don't know how

@Aaron-Junker Thanks for clarifying. I do not have my development environment set up correctly, but I committed some changes to the current PR. I removed the uppercase characters and added all the accented characters in the Greek alphabet.

@microsoft-github-policy-service agree

@damienleroy this is one more case of the known discussion: Is Quick Accent designed to be about accents, or to "translate" between languages?

Yes, that was the purpose (the name of the tool speak by himself). Going behind this, will made of this tool an another tool, with not the same kind of issue. Problem will be more complex to manage.

@Jay-o-Way @damienleroy With issue #24860, After reviewing the PR and comparing it to the current implementation, I think that PowerAccent/QuickAccent provides the accented or punctuated characters from each charset. I am not completely sure how that would look for the Greek alphabet as far as including all characters and accented characters, or only the accented characters. How do you recommend assigning each letter/symbol to a key or number as well?

Why don't you link lambda with L ?

@Jay-o-Way I started based on the shape of each character for my initial commit. Using the spelling of each character would be better, the only potential conflicts I can think of would be when assigning the letter O for Omicron or Omega and conflict for Eta/Epsilon.

I committed new changes with the Greek characters assigned to each corresponding letter key. I combined the Greek characters that were overlapping.
Combined:

Epsilon/ Eta
Theta/ Tau
Omicron/ Omega
Pi/ Phi/ Psi

@damienleroy @Aaron-Junker Can I get a review/feedback on the current changes?

Attempted to rename local and remote branches to a new name, and the pr closed

Note: git branch -m "old-name" "new-name" only renames the local branch.


Include missing word in the Flutie description.

I had a hard time comprehending the Flutie gem's description before I realized it must be missing the page_title bit.

Thank you!


Adds activeColor and renderActiveIcon props

If defined, action button background color and/or icon will crossfade to these when the button is activated. Looks nicer than simply using the "active" parameter of renderIcon to change it ;)

If I am not mistaken, the activeColor functionality already exists in this project. The prop for that is called btnOutRange (the name of the prop is horrible, I know)


added private modifier to configuration options where missing

The fields includeRequiredPropertiesConstructor, includeAllPropertiesConstructor, and includeCopyConstructor in the maven plugin cannot be configured in the pom. They are ignored by maven because they are missing the private modifier. This pull request adds this modifier.

Thanks all! :+1:


Finalize varint implementation

Do we want a varint implementation, or variable length byte strings? The latter could be advantageous if we want to have byte string fields that are not numbers.
Should we use a bijective encoding? A bijective encoding makes test vectors more complex.
Should we use something which is more efficient given that we know what the distribution of numbers is likely to be? E.g., encodes zero as less than a single byte, encodes the distribution more efficiently.

👍  for simpler varint, given that in practice there's only a 1/129 chance of saving a byte due to landing in between byte boundaries (if assuming uniform distribution - in practice it'll be much much less).

If anyone knows a good way of encoding a sequence of byte strings, let me know.

I'm considering an encoding where every value is a byte string. Single bytes with values < 224 are encoded as a single byte. Anything else is encoded using (first byte - 223) as the number of byes that follow.

What about we also use FF to denote second byte as number + 32 bytes to follow? Then that way we have future proofing of extending a byte string out to 287 bytes, or if we wanted maximal flexibility, FF denotes following bytes as varint which is number of bytes + 32 to follow as byte string.

That's a possibility, although, given the small payload sizes, I'm not sure it's worth it. The maximum payload size of an OP_RETURN is 80 bytes, and which is just 2.5 32 byte values. Although if the OP_RETURN size restriction were lifted (which might happen if runes get popular, incentivizing miners to lift the limit), then larger payloads might be needed. However, reserving 0xFF is just one value. Instead of a varint, I would do 0xFF = next four bytes are length, 0xFE next 3 bytes are length, etc.


cast_storage (csr->dense) segfault when total number of elements is greater than 2 billion

https://github.com/eric-haibin-lin/mxnet/blob/master/src/operator/nn/cast_storage-inl.h#L234
this not big enough, since the CSR matrix could have billions of rows. We need to test large inputs now..
@reminisce

This was developed before the nnvm TShape dim size change. I will change those ints to size_t later.
BTW, you meant a csr matrix could have billions of columns, rather than rows, right?

oh yes columns. thats a typo. size_t doesn't guarantee 64 bit. better use int64_t

Got it.


Fix Sequence Ontology (so) URL

I'm still in the process of downloading all the files, this URL had to be updated in the registry to resolve.

Did you use the downloader to update this file, or do it by hand?

I checked that it's in version control and thought that meant that we can make modifications to fix issues. What would be a better solution to fix this?

pyobo.registry.registries.get_obofoundry() downloads and structures this file directly from OBO Foundry, though it probably needs a small bit of reorganization with a overwrite keyword.
As we find new things that are missing from OBO foundry, we can add them to src/pyobo/registries/metaregistry.json

This has been solved more generally when externalizing the bioregistry to https://github.com/cthoyt/bioregistry

This has been solved more generally when externalizing the bioregistry to https://github.com/cthoyt/bioregistry


simplify the distribute Return case

This commit shouldn't change the meaning of the code:
lift (Return r) =
 -- by Monad instance of Stream
lift (return r) =
 -- by laws of MonadTrans/lift
return r

However, the result may be more efficient. In the case where t = Stream f, we have:
lift (Return r) =
 -- by definition of lift
(Effect . fmap Return) (Return r) =
 -- by definition of (.)
Effect (fmap Return (Return r)) =
 -- by definition of fmap
Effect (Return (Return r))

But doing return r directly produces just Return r (without the no-op Effect wrapper).

Can I do that from the github web UI?

Never mind; it looks like the new CI is broken. I'll try to look at it all in a bit. Your PR looks very reasonable, and I assume it's correct, but I want to make sure CI doesn't turn up some subtle laziness issue.


Support struct update syntax for json! macro

Would it be possible to support this syntax for merging objects?
let thing = Thing {
    foo: true
};

let one = json!({
    "bar": false,
    ..thing
});

let two = json!({
    "baz": true,
    ..one
});

I think I would prefer not to make this change, but it would be reasonable to support in a more elaborate json! macro outside of the serde_json crate.


Allow exposing variables with a private prefix (_)

What problem does this feature solve?
In a component library I want to expose some refs for use by other internal components, but mark it as private for consumers of the library. The JS convention is to prefix properties like this with _:
setup () {
  const somePrivateProperty = ref()
  return {
    _somePrivateProperty: somePrivateProperty
  }
}

This works, but vue logs
setup() return property "_somePrivateProperty" should not start with "$" or "_" which are reserved prefixes for Vue internals.

Related: #4532, #5038
What does the proposed API look like?
Rename vue's internal properties to __ instead, which is already used in a few places (__hmrId, __asyncLoader, __v_isVNode, __isBuiltIn, __isScriptSetup)

Have you considered using expose()?

expose() isn't type safe.
I wasn't aware expose allowed prefixed keys, is there a reason setup return is treated differently?

simplified: setup returns are exposed as part of "this", where also Vue's  _internal properties live. the objects returned by ?expose() doesn't expose internals (its whole point is only to expose what you told it to).

expose() isn't type safe.

True, would be a better way to fix your issue though if we fix that?

Fair enough, I don't use this anymore so I forgot that was a thing. It doesn't actually appear to use _ though apart from this._ for ComponentInternalInstance, and #4570 only mentions this._ not any value starting with _.
Would changing the check from key[0] === '_' || key[0] === '$' to key === '_' || key[0] === '$' actually break anything?
I don't know if it's possible to make expose() type safe unless you run vue-tsc on every .ts(x) file and convert it into return internally like is done for defineExpose in script setup.


Adding path argument to the props onToggleVisibility function.

The 'path' argument is needed because I am trying to dynamically add the children on that node from the server if they are not already added. My idea is to use a dummy node as a child of every node whose children are not fetched(because I need the expand button) and property on the node(isFetched) telling that the children are not fetched. After clicking on the expand button and seeing that isFetched is false I will make my ajax request. After the success I will change the node using the 'changeNodeAtPath' util function by making isFetched false and substituting the single children with the response data from the server.

I understood that the approach is to use the children property as a function. When that function is invoked the path argument is there but after clicking on the expand button I need to set the children property to that function. That means that I have to change the node so i need the path property again.

+1


feat: setup docusaurus

@pradel 🦖 is there!
With initial setup there came separate yaml file with docusaurus service, I moved that to our yml and just removed the other one. It felt right and it's working, so I am assuming that was a good idea.
Apart from that this PR seems ready to go.

@Akirtovskis really cool!
Can we setup the v2 of the docusaurus website? https://v2.docusaurus.io/
Also as we are using a monorepo I think it make sense to create a website folder where docusaurus will be and add it to the workspaces array :) you can check https://github.com/accounts-js/accounts as we have the same setup

@pradel V2 is setup and also website directory added to workspace array.
V2 is absolute 🔥, looks so good.

Sweet, next step will be to put some real data and connect it to the domain 🚀

Do we want to use vercel or netlify to host the website?

I have never tried Vercel, so this could be a good chance to do it. Will create todo for this.


Run directions please?

Would be nice to see run directions in the readme.
I used:  rosrun bno055_usb_stick bno055_usb_stick_node but got back error message
[ERROR] [1527981048.145777140]: handleWaitResponse: End of file
I have  updated the firmware to the latest: BNO_Firmware_<IP_ADDRESS>.hex.  I also updated the controller firmware to BNOinUSBStick_V1.4.fwu3.
The stick works fine in Development Desktop 2.0.
The stick is at port ttyACM0.

After doing a few things like turning device off and on, rebooting, the node is running.
Thanks for the package.  Looks well written.

good to hear that.


Investigate refactoring of KeyClient API implementation to avoid the inversion of control flow

Rather than a SendRequest method with a callback which both creates and sends the request (generically), have a sequential flow, as follows:
  request = createrequest();
  response = pipeline.Send(request);
  Validate(response.status);
  model = deserialize();
  return model;

This applies to all such APIs:
https://github.com/Azure/azure-sdk-for-cpp/blob/c16ce55b184e24c608e0788096510ea539e6052c/sdk/keyvault/azure-security-keyvault-keys/src/key_client.cpp#L304-L318
cc @JeffreyRichter, @vhvb1989

@vhvb1989 Do you know what problem this design is solving?

@RickWinter this is not to solve any issue.  This would be a way to simplify too much the client implementation so the protocol layer would be directly implemented in the convivence layer. I am against this change :) , since one only template method is easier to maintain than (N times APIs)


add mkdocs material in replace for documentation

One accepted: do this

No reason to do this, documentation is fine as-is.


KeyError 2 - discussion and bugfix

Reason and bugfix ideas for 'KeyError: 2' kernel abortion

Several experts, adopters, users and students recently experienced a problem that appears as follows (or similar):
  File "/git_code/private_parcels/performance/benchmark_perlin.py", line 362, in <module>
    pset.execute(kernels, runtime=delta(days=time_in_days), dt=delta(minutes=dt_minutes), output_file=output_file, recovery={ErrorCode.ErrorOutOfBounds: delete_func}, postIterationCallbacks=postProcessFuncs, callbackdt=delta(hours=12))
  File "/var/scratch/bionic/lib/python3.7/site-packages/parcels-2.1.3.dev81+g86a2147.d20200218-py3.7.egg/parcels/particleset.py", line 550, in execute
    self.kernel.execute(self, endtime=time, dt=dt, recovery=recovery, output_file=output_file)
recovery_kernel = recovery_map[p.state]; KeyError: 2

This error key maps to one of the error codes defined in parcels/tools/error.py and according to line 12, it is ErrorCode.Delete. This code is given to all particles that are deleted - either internally by the main loop when a recovery map deletes out-of-bound particles, or externally by dynamic removed procedures, such as aging, beaching, surfacing, and so forth. Now, the internal quasi-state machine for handling out-of-bound particles and other interpolation errors that are fixed in the provided recovery map of pset.execute() are not the source of this error.
In fact, we were only able to reproduce the error in scenarios where particles are dynamically added and deleted (e.g. releasing continuous particle streams via repeatdt=<some time> and deleting particle by aging).
The reason for the error can be found in Kernel.execute() in parcels/kernel.py (currently: line 314 to 374):
    def execute(self, pset, endtime, dt, recovery=None, output_file=None):
        """Execute this Kernel over a ParticleSet for several timesteps"""

        def remove_deleted(pset):
            """Utility to remove all particles that signalled deletion"""
            indices = [i for i, p in enumerate(pset.particles)
                       if p.state in [ErrorCode.Delete]]
            if len(indices) > 0 and output_file is not None:
                output_file.write(pset[indices], endtime, deleted_only=True)
            pset.remove(indices)

        if recovery is None:
            recovery = {}
        elif ErrorCode.ErrorOutOfBounds in recovery and ErrorCode.ErrorThroughSurface not in recovery:
            recovery[ErrorCode.ErrorThroughSurface] = recovery[ErrorCode.ErrorOutOfBounds]
        recovery_map = recovery_base_map.copy()
        recovery_map.update(recovery)

        # SOME FIELD TREATMENT - UNIMPORTANT

        # EXECUTE KERNEL #
        if self.ptype.uses_jit:
            self.execute_jit(pset, endtime, dt)
        else:
            self.execute_python(pset, endtime, dt)

        # REMOVE DELETED PARTICLES #
        remove_deleted(pset)

        # COLLECT ALL ERROR PARTICLE NOT FLAGGED FOR DELETION #
        error_particles = [p for p in pset.particles
                           if p.state != ErrorCode.Success]

        # WHILE THERE ARE STILL KERNEL ERRORS #
        while len(error_particles) > 0:
            # RECOVER ERROR PARTICLES FOR WHICH A RECOVERY ENTRY EXISTS #
            for p in error_particles:
                if p.state == ErrorCode.Repeat:
                    p.state = ErrorCode.Success
                elif p.state in recovery_map:               # hotfix for #749, #737 and related issues
                    recovery_kernel = recovery_map[p.state]
                    p.state = ErrorCode.Success
                    recovery_kernel(p, self.fieldset, p.time)
                else:
                    logger.warning_once('Deleting particle because of bug in #749 and #737')
                    p.delete()

            # REMOVE DELETED PARTICLES (e.g. where recovery => particle.delete() ) #
            remove_deleted(pset)

            # RE-RUN THE KERNEL WITHOUT ADVANCING endtime #
            if self.ptype.uses_jit:
                self.execute_jit(pset, endtime, dt)
            else:
                self.execute_python(pset, endtime, dt)

            # COLLECT ERROR PARTICLES #
            error_particles = [p for p in pset.particles
                               if p.state != ErrorCode.Success]

Now, the top-outlined kernel algorithm has a disadvantage as follows: if your (accumulated) kernel has an aging function similar as such
def Age(particle, fieldset, time):
    particle.age = particle.age + math.fabs(particle.dt)
    if particle.age > threshold:
        particle.delete()

then, in update cycles where out-of-bound errors and the like occur, the Age function is called multiple times for the same time integration step. Now, because particle uses exact integration, particle.dt is in this case not always what is defined within pset.execute(), but can be smaller integral steps. As a result, in some out-of-bound error runs, the situation may occur where a particles in the original pset.execute_jit() or pset.execute_python() (both cases tested) do not exceed the threshold in the Age function but, because of floating-point accuracy limits, DO exceed the threshold in the recovery re-runs, they are flagged as to-be-deleted even though they (pedantically-speaking) should not, because those recovery runs are not meant to do a time integration. It is a result of floating point limits with particle.dt.
A rather obvious-and-dirty fix is to re-call remove_deleted(pset) at the beginning of every recovery run, I personally do not support this approach because (a) we shouldn't re-run kernels for particle recovery in any case; (b) particle deletion is a costly operation, in terms of memory and time (see the implementation for numpy.delete() form the official repository ) that should not be executed if not needed; (c) finding all deleted particles in a large particle set is an exceedingly time-consuming (meaning: performance-consuming) operation, which should not be done if it can be circumvented.
There is a way the user can fix it. An alternative aging particle and kernel that is error-resilient looks like this:
class AgeParticle_JIT(JITParticle):
    age = Variable('age', dtype=np.float64)
    agetime = Variable('agetime', dtype=np.float64)
    def __init__(self, *args, **kwargs):
        type(self).age.initial=0.
        type(self).agetime.initial=-1.0
        super(AgeParticle_JIT, self).__init__(*args, **kwargs)

def Age(particle, fieldset, time):
    if math.fabs(time-particle.agetime) > math.fabs(1.e10 * particle.dt):
        particle.age = particle.age + math.fabs(particle.dt)
        particle.agetime = time

        if particle.age > (60.0*60.0*24.0*62.0):
            particle.delete()

Here, the important bit is  if math.fabs(time-particle.agetime) > math.fabs(1.e10 * particle.dt), in order to prevent actions in those recovery runs. This is working reliably, but I admit that it's limited to fairly simple kernels and particles.
Ideally, we can (together, as a community - suggestions welcome) find an appropriate fix to prevent the re-execution of kernels on particles that finished their time step integration successfully.

resolved by #762


Send Base64 into Multipart form data

Guys,
I'm wondering if there's a way to send base64 encoded string into Multipart. I think Moya is always converting the Data into binary, isn't it ?
My Code:
 var task: Task {
switch self {
case .upload(let base64String):
let fileData = Data(base64Encoded: base64String)
let data = MultipartFormData(provider: .data(fileData!), name: "files", fileName: "somefile.png", mimeType: "image/png")
 let multipartData = [data]
 return .uploadMultipart(multipartData)
}
}

What I want Is send the data like this:
POST /upload/image/user HTTP/1.1
Host: somehost.com
Accept: application/json;charset=UTF-8
Content-Disposition: form-data; name="filenames"

teste.png

Content-Disposition: form-data; name="files"

iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=
------WebKitFormBoundary7MA4YWxkTrZu0gW--

@orafaelreis Can you enable NetworkLoggerPlugin  in your provider and share how is the image being sent with your code?


sap.ui.base.ManagedObject.getBinding() - Suspected bug

I noticed in a controller I wrote that sap.ui.base.ManagedObject.getBinding() unexpectedly did not return the binding object I was looking for. I checked in the debugger and found that the code is
return this.mBindingInfos[sName] && this.mBindingInfos[sName].binding;

The object in mBindingInfos[sName] has the data I want but mBindingInfos[sName].binding is empty. So I was wondering if the code should not instead be
return this.mBindingInfos[sName] || this.mBindingInfos[sName].binding;

However, I am not sure how this is supposed to work so I brought it up here for discussion.

Hi winterkind,
this is not a bug, this is actually the design.
As long as the binding is not there yet, for example your model is not known, you have already the bindingInfo, but not the real binding.
GetBinding only returns you the binding once it is really available.
Hope this helps you,
Janina

@winterkind the method you are looking for is "getBindingInfo".

Oops, okay, thanks for the quick responses. Next time I'll look closer...


Locate a person by name feature

As a user, I can locate a person by his name, so that I can find more information about that person.

This issue no longer fits the project as the idea of project changed. Closed for ease of distraction.


Add dropdown for language selection

Hard to add it to the original node written in cpp, as it doesnt yet support documentation. Creating a higher level node in GDScript, CaptureStreamToText that receives a reference to SpeechToText and has a dropdown to language selection. Also will handle getting the captureStream and call the conversion every some time.


Make local function declarations eligible for inlining.

The code below attempts to present a micro-benchmark that shows that local function declarations do not appear to be eligible for inlining.
void main() {
  int id(
    final int i,
  ) =>
      i;
  const iterations = 1000000;
  for (int i = 0; i < 20; i++) {
    print("=" * 80);
    measure(
      fn: () {
        int total = 0;
        for (int i = 0; i < iterations; i++) {
          total += i;
        }
        print(" - total: " + total.toString());
      },
      name: "   => id control",
    );
    measure(
      fn: () {
        int total = 0;
        for (int i = 0; i < iterations; i++) {
          total += id(i);
        }
        print(" - total: " + total.toString());
      },
      name: "   => id control via local function call",
    );
    measure(
      fn: () {
        int total = 0;
        for (int i = 0; i < iterations; i++) {
          total += id_fn(i);
        }
        print(" - total: " + total.toString());
      },
      name: "   => id control via function call inlineable",
    );
    measure(
      fn: () {
        int total = 0;
        for (int i = 0; i < iterations; i++) {
          total += id_fn_never_inline(i);
        }
        print(" - total: " + total.toString());
      },
      name: "   => id control via function call uninlineable",
    );
    print("=" * 80);
  }
}

int id_fn(
  final int i,
) =>
    i;

@pragma('vm:never-inline')
int id_fn_never_inline(
  final int i,
) =>
    i;

void measure({
  required final void Function() fn,
  required final String name,
}) {
  final s = Stopwatch();
  s.start();
  fn();
  s.stop();
  print(
    name + " took: " + (s.elapsedMicroseconds / 1000).toString() + "ms",
  );
}

AOT:
 - total:<PHONE_NUMBER>00
   => id control took: 0.472ms
 - total:<PHONE_NUMBER>00
   => id control via local function call took: 3.015ms
 - total:<PHONE_NUMBER>00
   => id control via function call inlineable took: 0.475ms
 - total:<PHONE_NUMBER>00
   => id control via function call uninlineable took: 0.962ms

JIT:
 - total:<PHONE_NUMBER>00
   => id control took: 0.473ms
 - total:<PHONE_NUMBER>00
   => id control via local function call took: 4.651ms
 - total:<PHONE_NUMBER>00
   => id control via function call inlineable took: 0.473ms
 - total:<PHONE_NUMBER>00
   => id control via function call uninlineable took: 3.522ms

The first measurement involves no function call at all.
The second calls a local function.
The third calls a top level function with no annotations.
The fourth calls a top level function annotated with @pragma('vm:never-inline').

Notice how the local function is considerably slower than the top level function. Since local function declarations should be more amenable to intraprocedural optimizations, I would expect the opposite to be the case (i.e. local function declarations are inlined more aggressively, but it appears that they are not).
I personally prefer local function declarations over top level ones (if possible) because they do not "pollute" the top level scope and allow me to keep code closer to where it is being used (which in turn, makes reasoning about code easier because everything is "close together").
Since inlining is key to making many other optimizations work, not inlining local functions appears to have much greater impact on practical performance than the one observed in the benchmark above.

@alexmarkov I just wanted to say thank you!


Add sphinx documentation

All docstrings should also be converted to numpydoc style.

#2 closes this. All the docstring is converted to numpydoc and the documentation is hosted on readthedocs.
It might be useful to add docstring tests later.


Implementation of improvements to the original code

Implementation of a neural network model and the model is trained in real time using the public key as input data and the corresponding prime factors as target output

Thank you for the nn code to the find primes!
It would be great if you could submit it as a separate file, like "find_primes-nn.py", and include yourself as the contributor in the header.
The issue is that I typically use this code to demonstrate the mathematical foundations of cryptography without using any libraries. If the neural network code is in a separate file, I can show both the mathematical approach and how to use neural networks to solve the same problem. This would be an impressive demonstration for the audience.
I have a question - what Python version are you using? I wasn't able to run the code with Python 3.12 or 3.11. It's likely an issue with the TensorFlow version being incompatible with those Python versions.

Hello @eddieoz, how are you? I follow morning crypto every morning
Thanks for the suggestion to implement it separately. I'll do it then as soon as I free up some time here. Yes, the version used was Python 3.6. However, the idea is to improve the code to be compatible with other functions
See you later and have a good day

That's great!! Thank you very much :)

Hi Eddie, how are you?
Sorry for the delay in responding, I'm in a rush finishing my postgraduate work and preparing for my master's degree lol. Add that up and there's almost no time left over for anything.
I found you there at keybase, I'll call you to exchange ideas.


Increase volume with step size (.2) jumps from .4 to .8

Describe the bug
When I am in a video call and increase the volume with FlutterVolumeController.raiseVolume(.2,stream: _currAudioStream) the volume jumps from .4 to .8. When I user FlutterVolumeController.raiseVolume(null,stream: _currAudioStream) it works as expected.
Plugin version
1.3.0
Platform:

OS: Android 12
Device: Samsung Tab A7

Some devices or audio streams may have fewer numbers of volume steps (default is 15). Using fixed volume stepping value may produce a rounded off result. In this case, I suggest to keep using  FlutterVolumeController.raiseVolume(null,stream: _currAudioStream) as it's the default system behavior.

Closed as it's expected behavior.


Import Required in Every File

Not sure if this is intended, however, if your file structure looks like this:
├── main.typ <- imports drafting
└── chapters/
├── chapter1.typ
└── chapter2.typ
The note commands can only be called from chapter1.typ or chapter2.typ if these import drafting too.
I did not find anything in the docs according to modular files.
If the required reimports are intentional, just close this issue, however I think it'd be more convenient to import it just once.

This is an aspect of typst's design in general (imports are scoped to the file that imported them, not all of its children), so indeed it's not something that can be addressed in this package.
My workaround is to specify helper code in a utils.typ file, and then I just need to import utils.typ: * and I have access to the shorthand notation I can use in the child files.


Error Provisioning Account

Hi,
I just signed up for the account and I wanted to rename my device.  I revoked the device so that I can add it back but now I get an error message that says " Cannot add a new device when all existing devices are revoked.  Reset your account on keybase.io"
How can I fix this?
My login is waynekwlee.

OK, I reset your account
On Sun, Jul 9, 2017 at 6:27 PM, waynekwlee<EMAIL_ADDRESS>wrote:

Hi,
I just signed up for the account and I wanted to rename my device. I
revoked the device so that I can add it back but now I get an error message
that says " Cannot add a new device when all existing devices are revoked.
Reset your account on keybase.io"
How can I fix this?
My login is waynekwlee.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/keybase/client/issues/7688, or mute the thread
https://github.com/notifications/unsubscribe-auth/AA05_4BaLTyn4WXsuAJ5_Z2TpmVtIATNks5sMVPGgaJpZM4OSNTM
.

Thanks! I'm all set.


filter apps by projectId

Resolves #955
In the data service, each app is assigned a list of projects for which it is valid. The code changes in this PR use that project array and filter the apps to show only those that are valid for the current project.

Thanks @dmfalke !! This makes a lot of sense!
I made one modification just to check for an empty apps array before returning. There's no reason we should ever have an app that doesn't have any projects defined - that would mean we have a data service issue :) - so not sure if this check is worth losing the const on apps. Let me know!