Use with actions/cache

Hi @blaggacao, @stephank, @rickynils! Thanks a lot for your work!
actions/cache
Because your action makes /nix/store owned by an unpriviliged user, actions/cache can restore and save /nix/store without intermediate stores.
As a PoC, I made the deemp/cache-nix-too action to close https://github.com/DeterminateSystems/magic-nix-cache-action/issues/16.
cache-nix-too is actions/cache, but also caches several Nix directories as suggested by @blaggacao in https://github.com/DeterminateSystems/magic-nix-cache-action/issues/11#issuecomment-1610001962.
README
I suggest you write in the README that nix-quick-install-action can be used together with actions/cache so that people can benefit from your action even more.
nix-cache-too open problems
Directoris
I'm not sure I cache the right directories in deemp/cache-nix-too.

It was suggested to exclude some of them in https://github.com/cachix/install-nix-action/issues/56#issuecomment-1059878362, but I don't know why
I don't know about the implications of restoring the whole /nix/

Cache eviction
I can't find a good policy for cache eviction. Say, I build a docker image in each job run. Next, I cache the whole store. In the next run, I restore the whole store with that old image. If I don't remove that image, it'll be cached and restored indefinitely.
Possible solutions

I tried caching only paths accessed during a run by consulting their atime. I used install-nix-action. However, I observed unstable cache sizes on macOS (issue) runners.
It may be enough to run an installable, nix profile install installable, do other steps, collect garbage, rm -rf /nix/var/nix/profiles, save cache, run a job again.
Start direnv in background.
Use nix-heuristic-gc
Somehow keep inputs (https://github.com/NixOS/nix/issues/4250, https://github.com/NixOS/nix/issues/6895)

New action
I believe you can make a new nix-quick-cache-action action that caches the right directories and has a reasonable paths eviction policy.

I don't know about the implications of restoring the whole /nix/

It may painstaikingly slow down the system on unrelated store entries that need to be compressed, transported and decompressed. Either due to cache growth or due to multiple packages / builds.

It was suggested to exclude some of them in

Looks mostly like runtime nix data.

it'll be cached and restored indefinitely

GH evicts about every 7 days or after ~10GB. But that's no solution to cache growth in a sprint.
Imo, the best design would be a background upload by magic cache and the cache unit would be best individual store paths.
This makes the system as efficient as it can get and using (slow) bandwidth on only the bits and pieces that are needed.

Imo, the best design would be a background upload by magic cache and the cache unit would be best individual store paths.

Well, I ran into rate limit with magic-nix-cache on the second job run (https://github.com/DeterminateSystems/magic-nix-cache-action/issues/16).
With nix-quick-install-action and cache-nix-too, I restored a 1.5 GB /nix in under a minute (see workflow) and got a single entry for each job. I was impressed and decided to share with you.

I ran into rate limit

I wonder if that's something that the NixOS Foundation could touch upon in their sync-up meeting with GH engineers. :shrug:
My bet is that this may eventually happen due to the vested interests of DetSys and their representation across the nixos governance structure.
Btw, we've been using something similar in the past.
But indeed the ~1 - 2 min penalty for cache creation & restore was critical cycle time for us.
It's not 100% related, but here we've taken an approach to evaluate in a persistent "Discovery" host which brought down discovery of buildable targets from 20mins to 40s on IFD-heavy projects.
The building is then offloaded onto nixbuild from the GH worker build matrix, or alternatively the magic cache action.

It looks like https://github.com/nix-community/cache-nix-action is usable with nix-quick-install. I will look into using it inside the workflows for nix-quick-install too.


support npm_config_sharp_dist_base_url

I have commit a pr for https://github.com/lovell/sharp/issues/1418.

谢谢


issue-36: add python3.8 to noxfile (all tests passed)

Test fables under python3.8 in CI. Luckily, everything "just worked".
resolves #36

This now adds both python 3.8.0 and 3.8.1 to the noxfile.py for local testing with nox and for testing in CI.


NPM deprecation warnings when running sf run function start

If I use sf generate function -l typescript -n foo to generate a template TypeScript function, then run the function using sf run function start (with Node.js v18.7.0 installed locally), I get a bunch of deprecation warnings:
$ sf run function start
npm WARN deprecated<EMAIL_ADDRESS>This package has been deprecated in favour of @sinonjs/samsam
npm WARN deprecated<EMAIL_ADDRESS>Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated<EMAIL_ADDRESS>request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated<EMAIL_ADDRESS>this library is no longer supported

Ideally there would be no deprecation warnings shown.
cc @joshwlewis @colincasey

These are all fixed by https://github.com/heroku/sf-functions-core/pull/55 (which includes function template updates including a Node.js bump and dependency bumps).


Clarity on Use Case of Managed Instance

Hi All
I am wanting some clarity on when to use managed instances and when to use elastic pools. It seems very unclear.
For example if I am designing a new system which connects to multiple other systems, I want to have multiple databases on PaaS. Why would I not use managed Instance instead of elastic pools. It seems like more features are within the managed instance route. Some one has mentioned to me that managed instance is really for moving people of on premise to cloud and all new things should be done via elastic. But my view here is that is this not going to be replacing elastic pools?
Thanks

@ljmack00 Thanks for your your comment. Would you please provide me with a link to the document that this comment is referring to? Is there a specific doc that you read and needs more clarity. We use this information to evaluate and improve our docs.

Hi
It is in a couple places: https://docs.microsoft.com/en-us/azure/sql-database/sql-database-paas-vs-sql-server-iaas and in https://docs.microsoft.com/en-us/azure/sql-database/sql-database-managed-instance
There is nothing clear about when to use what. So also I posted as a general query. Do I propose elastic or managed instances to clients.

A couple of extracts from the docs that should help:
"Azure SQL Database Managed Instance is designed for customers looking to migrate a large number of apps from on-premises or IaaS, self-built, or ISV provided environment to fully managed PaaS cloud environment, with as low migration effort as possible."
"SQL Database Elastic Pools
are a simple, cost-effective solution for managing and scaling multiple databases that have varying and unpredictable usage demands."
Going back to the example in your question:
"if I am designing a new system which connects to multiple other systems, I want to have multiple databases on PaaS. Why would I not use managed Instance instead of elastic pools."
Managed Instance is great for migrating existing databases from on premises or from IaaS with minimal changes required but since your system would be new, you might want to just use an Azure SQL Database.
Elastic Pool is a very different tool or service, You will need to determine if it makes sense for your system based on the usage.
For example if you have one database that has a lot of usage a few days of the month, it would be wasting resources for the rest of the month, you could optimize your spending by putting it in a pool along with other databases and they will have access to the unused resources so you do not waste them.
I recommend you to read Choose a Cloud SQL Server Option this doc explains the features of each offering so it should help you to make decisions for any business requirements.
Also watch this Channel 9 video on
Elastic Pools

[!VIDEO https://channel9.msdn.com/Shows/Data-Exposed/Azure-SQL-Database-Elastic-Pools/player]

@ljmack00 We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


Add tests for client/transaction code

While there was pretty good test coverage of the low-level command and response types, there wasn't much test coverage of the EppClient and EppConnection code. Refactor the client to make it generic over the underlying stream type (while retaining a helper method to set up a TlsStream<TcpStream> as before) and add a basic test.

Hi @djc,
Sorry I haven't been active here in the last week. I have merged the other PR. This one needs a rebase and a cargo fmt fix.

Hi @masalachai, no need to apologize! Don't know what this time of year is like in your country/culture, but here lots of people are taking time off -- and we certainly don't have any kind of SLA with you! Thanks for keeping the reviews flowing, I know I've produced quite the volume of changes but hope you can appreciate what I've been trying to do with your project.
BTW, we've managed to pass the OT&E certification with Verisign so that's a pretty good proof point for epp-client, too!

hope you can appreciate what I've been trying to do with your project.

Thanks @djc. The changes are all very good and make the lib more intuitive and great to use.

BTW, we've managed to pass the OT&E certification with Verisign so that's a pretty good proof point for epp-client, too!

That's a great milestone and great news. Thanks for getting it to that point. I will try to make a release soon to crates.io now that the library is that that point.


Question for CutMix

Hi, thanks for the great work!
I have found that you used additional dataloader for the cutmix sources.
Since most of the work will mix by using the image from the same loaded batches, I was wondering what is the intention of using mixing sources from another batch, and will it affect the training result by using the common setting which only using one dataloader and the same batch for mixing? Thanks!

Actually, it is not an intentional practice. We later found that we can simply CutMix an image batch with its shuffled version. The performance will not be affected.

That is great! It will be easier to implement if so!


A11y_OSvisualupdate_MiniControGallery_GenericControls_Screenreader : The expand content is not announced for screen reader users on activating the “DropDownBtn” and “SplitButton” controls.

GitHubTags: #A11y_OSvisualupdate, #A11yMAS, #A11yTCS, #Win32, #DesktopApp, #WindowsUILibrary, #MAS1.3.1, #NVDA, #Narrator
Environment Details:
Application Name: OS visual update
Windows Version: Windows10
Screen Reader: Narrator, NVDA 2019.2
Steps to Reproduce:

Launch Mini Control Gallery App from the installer location.
Screen with all generic controls would appear on left side of the screen.
Verify that all the elements of "MiniControlGallery-Generic Controls" are accessible and MAS Compliant.

Actual:
When the screen reader users navigate to “DropDownBtn” and “SplitButton” controls and activate it an expanded content appears as “Hello World” but it not announced to the screen reader users.
Expected:
The expanded content should be announced to the screen reader users on activating the “DropDownBtn” and “SplitButton” controls.
User Impact:
If proper information is not announced to the screen reader users, then they will get confused and might miss out on the information.
Attachment:

This problem appears to be specific to MiniControlGallery app and doesn't repro in Xaml Controls Gallery. Because MiniColntrolGallery will never ship to customers, we should not fix this.


Clang 16 fixes

This is a speculative attempt to fix Clang 16 compatibility. My understanding of the problem (helped by the folks on the LLVM Discourse) is that Clang 16 represents way more types as ElaboratedType's than before: https://github.com/llvm/llvm-project/commit/15f3cd6bfc670ba6106184a903eb04be059e5977
This PR fixes that by looking at the named type instead in most places. It's probably worth testing this on some bigger projects because I'm not fully confident that it's doing the right thing (it's also a little hideous to normalize the types everywhere :frowning_face: ).
I haven't figured out how to do it yet, but I think what we really want to do is determine whether an ElaboratedType has any elaboration and then desugar it if so. That seems like the 'right' thing to do compared to blindly desugaring for everything but enums.
EDIT: two odd things:

The tests stdout is munged, maybe it's a 1.11 thing?
Now only the documentation tests are failing.

I pushed a similar fix in https://github.com/JuliaInterop/Clang.jl/pull/465/commits/bcab1c79d6fe23bd0ba8520da1eecf47f406d0ff.
The following chunk of code basically reads:

if the leaf type is directly or indirectly reference a tag type, and this tag type is in the dag.tags, then add it as a dependency
if the leaf type is not directly or indirectly reference any tag type but this leaf type is in the dag.ids, then add it as a dependency

https://github.com/JuliaInterop/Clang.jl/blob/e1a96aeeb20ee7e89a14c4376ab2311e7b9b1865/src/generator/resolve_deps.jl#L24-L28
https://github.com/JuliaInterop/Clang.jl/blob/e1a96aeeb20ee7e89a14c4376ab2311e7b9b1865/src/type.jl#L270-L287
so, the old has_elaborated_reference should be has_elaborated_tag_reference. Note we need to recursively check the leaf referenced type is a tag type.

I suspect the documentation failure is related to the following contents. The range of the source code and comments are somehow miss-calculated for elaborated cursors.

This patch could expose a bug in how you get the source range of some
TypeLoc. For some reason, a lot of code is using getLocalSourceRange(),
which only looks at the given TypeLoc node. This patch introduces a new,
and more common TypeLoc node which contains no source locations on itself.
This is not an inovation here, and some other, more rare TypeLoc nodes could
also have this property, but if you use getLocalSourceRange on them, it's not
going to return any valid locations, because it doesn't have any. The right fix
here is to always use getSourceRange() or getBeginLoc/getEndLoc which will dive
into the inner TypeLoc to get the source range if it doesn't find it on the
top level one. You can use getLocalSourceRange if you are really into
micro-optimizations and you have some outside knowledge that the TypeLocs you are
dealing with will always include some source location.

Neat, thanks :heart: I think I figured out the documentation issue too, looks like we're hitting this bug: https://github.com/JuliaLang/julia/issues/52986
Fixed in 08b1ad2. I think both this and #465 can be merged now :crossed_fingers: (I removed my hacky fix)

Sorry. 😓   I did a rebase merge. Could you rebase this onto the master branch?

No worries, will do :)


Simulation with no action

Is there a way to run a simulation without taking any action and get the resulting images, similar to pressing "Simulate" in the demo without taking any action?

It's possible, but it's not part of public API. So if you are building an agent for a published tier, it's better to avoid.
import phyre
import matplotlib.pyplot as plt
task = phyre.loader.load_compiled_task_dict()['00000:000']
_, _, images = phyre.simulator.magic_ponies(task, phyre.simulator.scene_if.UserInput())
plt.imshow(images[0][::-1])

Great, thanks.


Achieve full ESM support

In GraphQL Code Generator achieving full ESM support is not as simple as updating exports maps and using .js on all relative extensions. We also need to update all our plugins and preset to attach the .js extension to all kinds of relative imports.
Tasks:

[x] Exports map and .js extension for relative imports (https://github.com/dotansimha/graphql-code-generator/pull/7978)
[x] #8022
[x] https://github.com/dotansimha/graphql-code-generator/issues/8102

This is now documented here https://www.graphql-code-generator.com/docs/getting-started/esm-typescript-usage


[Improvement][job  instance]start-time and end-time

*For better global communication, please give priority to using English description, thx! *
Please review https://dolphinscheduler.apache.org/en-us/community/development/issue.html when describe an issue.
Describe the question
工作流实例列表中，如果多个工作流存在依赖关系，最后的工作流任务时长是累计时长，还有，这个排序好像只是按照开始时间排序的，希望能做成开始时间一样，按照结束时间再排一下.
What are the current deficiencies and the benefits of improvement

A clear and concise description of the current deficiencies and the benefits of this improvement.

Which version of DolphinScheduler:
-[1.3.6]
Describe alternatives you've considered
A clear and concise description of any alternative improvement solutions you've considered.

I want to try to solve this issue


Error when using --support-pkg pointing to local tarball

I'm trying to run briefcase (android target) using --support-pkg to provide a locally built support package, with the command:
python setup.py android --support-pkg ../voc-dev/voc/dist/Python-3.4-Android-support.b5.tar.gz

I'm getting the following error:
 * Installing support package...
Support package: ../voc-dev/voc/dist/Python-3.4-Android-support.b5.tar.gz
error: Invalid URL '../voc-dev/voc/dist/Python-3.4-Android-support.b5.tar.gz': No schema supplied. Perhaps you meant http://../voc-dev/voc/dist/Python-3.4-Android-support.b5.tar.gz?

I tried providing absolute paths, but the result is the same.

Trying to track the problem a bit further, it seems like an issue with the pip library:
>>> import pip
>>> pip.__version__
'9.0.1'
>>> link = pip.index.Link('../voc-dev/voc/dist/Python-3.4-Android-support.b5.tar.gz')
>>> link
<Link ../voc-dev/voc/dist/Python-3.4-Android-support.b5.tar.gz>
>>> pip.download.unpack_url(link, '/tmp/supportdir', download_dir='/tmp/downloaddir')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/elias/.virtualenvs/sketchapp/lib/python3.5/site-packages/pip/download.py", line 821, in unpack_url
    hashes=hashes
  File "/home/elias/.virtualenvs/sketchapp/lib/python3.5/site-packages/pip/download.py", line 659, in unpack_http_url
    hashes)
  File "/home/elias/.virtualenvs/sketchapp/lib/python3.5/site-packages/pip/download.py", line 853, in _download_http_url
    stream=True,
  File "/home/elias/.virtualenvs/sketchapp/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 488, in get
    return self.request('GET', url, **kwargs)
  File "/home/elias/.virtualenvs/sketchapp/lib/python3.5/site-packages/pip/download.py", line 386, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/home/elias/.virtualenvs/sketchapp/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 461, in request
    prep = self.prepare_request(req)
  File "/home/elias/.virtualenvs/sketchapp/lib/python3.5/site-packages/pip/_vendor/requests/sessions.py", line 394, in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
  File "/home/elias/.virtualenvs/sketchapp/lib/python3.5/site-packages/pip/_vendor/requests/models.py", line 294, in prepare
    self.prepare_url(url, params)
  File "/home/elias/.virtualenvs/sketchapp/lib/python3.5/site-packages/pip/_vendor/requests/models.py", line 354, in prepare_url
    raise MissingSchema(error)
pip._vendor.requests.exceptions.MissingSchema: Invalid URL '../voc-dev/voc/dist/Python-3.4-Android-support.b5.tar.gz': No schema supplied. Perhaps you meant http://../voc-dev/voc/dist/Python-3.4-Android-support.b5.tar.gz?

This has been addressed (and is now tested!) in the 0.3 development version.


More missing spans for async_block

I seem to find all the ways to make things fail :-)
The code in question is at: https://github.com/alex/ct-tools/compare/tokio-async#diff-1802a8ee491d4312703790b7b22f29ceR101
And the error message is:
error[E0507]: cannot move out of captured outer variable in an `FnMut` closure
  --> <proc-macro source code>:1:1
   |
1  | move
   | ^^ cannot move out of captured outer variable in an `FnMut` closure
   |
  ::: src/ct.rs
   |
97 |     let payload = serde_json::to_vec(&AddChainRequest {
   |         ------- captured outer variable

error: aborting due to previous error

error: Could not compile `ct-tools`.

Hm now so this may be a "bug" in rustc or a place where rustc could improve, unfortunately there's no real span here to use to attach to what we generate.
Otherwise I'm not actually sure how to fix this...

👍 -- is this something you're able to turn into an upstream bug; unfortunately I don't know my way around proc macros nearly well enough to file it coherently unfortunately.

Yeah I'll look into formulating something

Ok turns out I couldn't ever minimize it to a reportable issue, and ended up fixing it regardless!


Clean up does not remove temporary indexes created

I am a huge fan of this gem, thanks for taking the time to create it.
I have come across another issue while using this to migrate a primary key from integer to bigint that I'm not sure is a problem or not.
Finalize finalize_column_type_change :projects, :id  generates an index as follows.
--
-- Name: index_projects_on_((assigned_to ->> 'id_for_type_change'::text)); Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX "index_projects_on_((assigned_to ->> 'id_for_type_change'::text))" ON public.projects USING btree (((assigned_to ->> 'id_for_type_change'::text)));

Subsequently, when the cleanup_column_type_change :projects, :id helper is called, does not remove the above index. Why is this? the id_for_type_change column was removed, so shouldn't this index also be removed?

Woops, it looks like this index was created from an existing: "index_projects_on_assigned_to_id" btree ((assigned_to ->> 'id'::text)). Which was indexing a key in a jsonb data type.
I think what's missing here in the clean up is also looking at these types of indexes that were generated and automatically removing them.

On second thought.. what I actually should think happen is finalize_column_type_change should be ignoring creating the index in the first place because it's completely irrelevant. The id indexed in the jsonb column is completely unrelated to the id of the row.

Thank you for reporting!
What was happened here, is I think you had some id attribute in the jsonb column and an index on it. When migrating a primary key from int to bigint, we copy all the indexes that potentially include the old primary key in them. For regular indexes (where we reference only columns) this is ok and works well without false positives. But for expression indexes we regexp match if the index expression includes the column name. Which it is in this case and produces a false positive.
This looks like an edge case for me and I don't think I can do anything with it. You have to remove that erroneously created index manually 🤷 .


Bootstrap's JS is included twice

In the latest master version, I have seen that Bootstrap's JS gets included twice.
That causes the JS to conflict with each other and makes the drop-downs stop working.
It it included here: https://github.com/idleberg/Bootstrap-Listr/blob/master/src/listr-functions.php#L135-138
and here: https://github.com/idleberg/Bootstrap-Listr/blob/master/src/listr-functions.php#L149-L157

@idleberg The commit that introduced this is dfa18e375351d090a384bc94e3e39db671236aff

Thanks, I already fixed that but never committed the change. Will do now!

Fixed by the merge of 2.3-dev into master


Update AssetBundleLoader.cs

Explanation of changes:

Added using UnityEngine.Networking; to import the required namespace.

Created a bundleName variable to specify the name of the asset bundle you are loading. Adjust it according to your asset bundle's name.

Added Caching.ClearOtherCachedVersions(bundleName, Hash128.Parse("0")); before starting the download. This line clears the cache for previous versions of the asset bundle with the specified name.

thanks! btw. Can you mention which unity version was used for this script?

Yes I used the latest LTS version 2022.
On Mon, 24 Jul 2023 at 12:12 AM, mika @.***> wrote:

thanks! btw. Can you mention which unity version was used for this script?
—
Reply to this email directly, view it on GitHub
https://github.com/UnityCommunity/UnityLibrary/pull/65#issuecomment-1646927978,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AW5Q4XQPYG6Q3NDESYKNJ23XRVWBRANCNFSM6AAAAAA2L6WUF4
.
You are receiving this because you authored the thread.Message ID:
@.***>


[ServiceBus] throw error earlier when timing out

Related: issue #9775, #27010
This PR fixed the following timing issue when trying to establish link for next session but there are none available.
what's happening is

SDK is trying to create a link for next avaiable session (options.source.filter: { com.microsoft:session-filter': undefined })
Because no sessions are available, after one minute, a link is established, but with "source":null,"target":null. The call to create link resolves.
However, the service immediately use that link to ask SDK to close the link, with an error of "com.microsoft:timeout"/The operation did not complete within the allotted timeout of 00:00:59.9130000.
SDK respects the request and start acquiring a lock to close the link
Meanwhile, SDK gets a link, nice! It will continue as the link has been created
SDK gets lock to close link and sets this._link to undefined and start closing receiver and amqp session
SDK null-check the link and throws INTERNAL ERROR

Instead of returning the link in this case, This PR checks whether we got a session id back. If not and there's an error from service, we rethrow the error.  Some of the existing error handling is also moved before returning the link, instead of afterwards.
Are there test cases added in this PR? (If not, why?)
There's one test covers this scenario and verifies two possible errors. https://github.com/Azure/azure-sdk-for-js/blob/28cbcd053daabb7f86816014d8cb8f8004bbc18f/sdk/servicebus/service-bus/test/public/sessionsTests.spec.ts#L81

/azp run js - service-bus - tests

API change check
API changes are not detected in this pull request.

/azp run js - service-bus - tests

/azp run js - service-bus - tests

Browser tests failing in main branch too in nightlies.

/check-enforcer override

After upgrading from 7.9.0 --> 7.9.2, I am getting this error while making an stub for ServiceBusClient
TypeError:"Descriptor for property ServiceBusClient is non-configurable and non-retriable"
I am using mocha

@rohanpatelg could you please log a new issue?  Please share a minimal repro project if possible. Thanks!


pubsub: clean out dead code

Could you give some context for why this code is dead?

Ah sorry. Most of these tests are moved to MessageDispatcherTest. The isStreaming is dead because only tests left here tests streaming, so it's always true.
The special logic in MessageReceiver is dead because no test depends on that logic anymore.

@garrettjonesgoogle Ping

cc @jba


Added EndeavorOS icon

Thanks for making this theme, it looks clean. I've created an EndeavourOS icon by editing the official logo and figured I might as well share it on the off chance anyone uses it in the future.

Thank you for taking the time to add this, I've added it to the mix.


Branch Overview - Truncated details

Just noticed another thing that bothers me - the branch details only seem to use about a third of the page width and then truncate.

did a short test, cannot reproduce the issue
try right clicking -> view source, and save it as html, and do a few adjustments, it is the Canvas element that contains the graph


Nudge incorrectly stating device is no longer capable of receiving updates & needs to be replaced

SSIA. Nudge notification on a supported device with a pending macOS security update incorrectly states the "device is no longer capable of receiving critical security updates" & advises the user to "Please work with your local IT team to obtain a replacement device"
The device is a MacBook Pro currently running 12.7.5 (21H1222)
It is a virtual machine running on a MacBook Pro (13-inch, 2020, Four Thunderbolt 3 ports), but I'm not sure if that could be causing Nudge to incorrectly flag it or something else is amiss.

but I'm not sure if that could be causing Nudge to incorrectly flag it or something else is amiss.

very likely, how did you setup the VM properties?

I create a MacOS vm as normal, but when you get to the stage where it asks to create a user account I power down to add hw.model to the vmx file of the VM and then boot it up and keep going. It enrolls as whatever hardware model I've set it as vs. a mobile device
hw.model = "MacBookPro16,2"
log.debug.txt

The logs are pretty clear
2024-07-30 07:20:20.117883-0700  localhost Nudge[1294]: [com.github.macadmins.Nudge:sofa] Assessed Model IDs: ["Mac-5F9802EFE386AA28", "", "Unknown", ""]
2024-07-30 07:20:20.118527-0700  localhost Nudge[1294]: [com.github.macadmins.Nudge:sofa] Assessed Model ID found in SOFA Entry: false

The model ID logic is not correct here and not available in the sofa feed
2024-07-30 07:20:20.049526-0700  localhost Nudge[1294]: [com.github.macadmins.Nudge:sofa] SOFA Assets: ["J132AP", "J137AP", "J140AAP", "J140KAP", "J152FAP", "J160AP", "J174AP", "J185AP", "J185FAP", "J213AP", "J214KAP", "J215AP", "J223AP", "J230KAP", "J274AP", "J293AP", "J313AP", "J314cAP", "J314sAP", "J316cAP", "J316sAP", "J375cAP", "J375dAP", "J413AP", "J456AP", "J457AP", "J493AP", "J680AP", "J780AP", "Mac-06F11F11946D27C5", "Mac-06F11FD93F0323C5", "Mac-1E7E29AD0135F9BC", "Mac-35C5E08120C7EEAF", "Mac-473D31EABEB93F9B", "Mac-4B682C642B45593E", "Mac-551B86E5744E2388", "Mac-63001698E7A34814", "Mac-65CE76090165799A", "Mac-66E35819EE2D0D05", "Mac-77F17D7DA9285301", "Mac-937A206F2EE63C01", "Mac-937CB26E2E02BB01", "Mac-9AE82516C7C6B903", "Mac-9F18E312C5C2BF0B", "Mac-A369DDC4E67F1C45", "Mac-A5C67F76ED83108C", "Mac-AA95B1DDAB278B95", "Mac-B4831CEBD52A0C4C", "Mac-B809C3757DA9BB8D", "Mac-BE088AF8C5EB4FA2", "Mac-CAD6701F7CEA0921", "Mac-DB15BD556843C820", "Mac-E43C1C25D4880AD6", "Mac-EE2EBD4B90B839A8", "Mac-F60DEB81FF30ACF6", "Mac-FFE5EF870D7BA81A", "VMA2MACOSAP", "VMM-x86_64"]

You can use -simulate-hardware-id "A-VALID-ID-FROM-ABOVE" to work around this.

Thanks. Would it also make sense to have a different handler for an unknown Model ID that doesn't tell the user they need new hardware?

I don't think so. Apple has the list, we should honor the list.


Update gitignore

To ignore OSX-specific file.

Thanks @rpdome - we might also consider adding Windows' pollution here too
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Folder config file
[Dd]esktop.ini


Count Up timer added

Users need to set start timer if  they want time to count in up

hi @wuweijian1997 Please review my PR


indi_pylibcamera crashes and doesn't terminate occasionally

I am running kstars/ekos on a Raspberry Pi-5 w/NVME drive and AstroArch operating system.  The developers of AA are using indi_pylibcamera to drive the Raspberry Pi HQ camera.  This camera previously worked with Stellarmate and RpiOS.
.
When not starting from a fresh boot, we would get crashes from the indi_pylibcamera driver while starting the INDI drivers from ekos.  This is the error message from the log file:
[2024-09-14T14:20:23.713 UTC INFO ][           org.kde.kstars.indi] - Updating "indi_pylibcamera" Location Longitude: 269.XXX Latitude: 35.XXXX Elevation: 82.9
[2024-09-14T14:20:23.714 UTC INFO ][           org.kde.kstars.ekos] - Ekos received a new device:  "indi_pylibcamera"
[2024-09-14T14:20:23.714 UTC INFO ][           org.kde.kstars.indi] - Updating "indi_pylibcamera" Location Longitude: 269.XXX Latitude: 35.XXXX Elevation: 82.9
[2024-09-14T14:20:23.977 UTC INFO ][           org.kde.kstars.ekos] - Connecting to "indi_pylibcamera"
[2024-09-14T14:20:24.029 UTC INFO ][           org.kde.kstars.indi] - indi_pylibcamera :  "[INFO] connecting to camera /base/axi/pcie@120000/rp1/i2c@88000/imx477@1a "
[2024-09-14T14:20:24.029 UTC INFO ][           org.kde.kstars.indi] - indi_pylibcamera :  "[INFO] closing camera "
[2024-09-14T14:20:24.029 UTC INFO ][           org.kde.kstars.indi] - indi_pylibcamera :  "[INFO] opening camera "
[2024-09-14T14:20:24.093 UTC INFO ][           org.kde.kstars.indi] - indi_pylibcamera :  "[ERROR] Uncaught exception!
Traceback (most recent call last):
  File \"/usr/lib/python3.12/site-packages/picamera2/picamera2.py\", line 254, in __init__
    self._open_camera()
  File \"/usr/lib/python3.12/site-packages/picamera2/picamera2.py\", line 465, in _open_camera
    self.camera.acquire()
RuntimeError: Failed to acquire camera: Device or resource busy

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File \"/usr/bin/indi_pylibcamera\", line 33, in <module>
    sys.exit(load_entry_point('indi-pylibcamera==2.6.4', 'console_scripts', 'indi_pylibcamera')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3.12/site-packages/indi_pylibcamera/indi_pylibcamera.py\", line 1372, in main
    device.run()
  File \"/usr/lib/python3.12/site-packages/indi_pylibcamera/indidevice.py\", line 898, in run
    self.message_loop()
  File \"/usr/lib/python3.12/site-packages/indi_pylibcamera/indidevice.py\", line 844, in message_loop
    vector.set_byClient(values)
  File \"/usr/lib/python3.12/site-packages/indi_pylibcamera/indi_pylibcamera.py\", line 126, in set_byClient
    if self.parent.openCamera():
       ^^^^^^^^^^^^^^^^^^^^^^^^
  File \"/usr/lib/python3.12/site-packages/indi_pylibcamera/indi_pylibcamera.py\", line 740, in openCamera
    self.CameraThread.openCamera(CameraIdx)
  File \"/usr/lib/python3.12/site-packages/indi_pylibcamera/CameraControl.py\", line 361, in openCamera
    self.picam2 = Picamera2(idx)
                  ^^^^^^^^^^^^^^
  File \"/usr/lib/python3.12/site-packages/picamera2/picamera2.py\", line 266, in __init__
    raise RuntimeError(\"Camera __init__ sequence did not complete.\")
RuntimeError: Camera __init__ sequence did not complete. "
[2024-09-14T14:20:24.337 UTC CRIT ][           org.kde.kstars.indi] - INDI driver  "indi_pylibcamera"  crashed!
[2024-09-14T14:20:24.341 UTC INFO ][           org.kde.kstars.ekos] - "indi_pylibcamera is offline."

 After checking "htop" from the linux command line, it showed several "indi_pylibcamera" processes still running from the previous run and INDI shutdown.  If I then killed those processes, the inid_pylibcamera driver would start normally from ekos.

 It appears there are two main issues going on.

1) The indi_pylibcamera driver is not properly terminating every time that ekos shuts down the INDI drivers.
2) The indi_pylibcamera driver is not tolerant of a previously running instance of itself.

Hope this helps.  Thank you for making this driver!!

The error message 'Failed to acquire camera: Device or resource busy' indicates that the camera is in use by an other software. You already found that there are more than one instance of 'indi_pylibcamera' running at the same time.
I suppose you have a recent version (>2.1) of the 'indi_pylibcamera' driver. Since that version the driver detects other instances of itself and kills them. For detection it runs 'ps -ax' and searches 'python3' and 'indi_pylibcamera' in the lines. Could you please check:

Is 'ps -ax' available on your system?
In the error situation (previous driver instance still running): please run 'ps -ax' and forward me the output.

Maybe AstroArch has changed the driver name or it starts the driver with 'python' and not with 'python3'. We will see that in the 'ps -ax' output.

Thank you for your reply.  Yes, "ps-ax" is available on AstroArch.  I will try to re-create the issue today now that I know where to look.  I'm running the driver on an Rpi-5, so ekos is the only app using the driver.  I will notify Matt of your reply, this seems like it should fix the problem.

I can also improve the detection of a running instance. But first I would need to know why it is not detected. The ps -ax output would really help.

I have a test Rpi, I will try to recreate and get you the output this afternoon.

pylibcameraerror.txt

I’ve posted the output from ps -ax with the pylibcamera driver still running after ekos shutdown.
-Keith Hoard
@.***
Sent from Proton Mail for iOS
On Thu, Sep 19, 2024 at 08:23, scriptorron @.***(mailto:On Thu, Sep 19, 2024 at 08:23, scriptorron < wrote:

I can also improve the detection of a running instance. But first I would need to know why it is not detected. The ps -ax output would really help.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

I see. In your AstroArch the driver gets started with python and not with python3:
11044 ?        Sl     1:07 /usr/bin/python /usr/bin/indi_pylibcamera

That's the reason why a running instance does not get detected when restarting the driver.
During the transition from Python 2 to Python 3 it was almost standard to start Python 2 with python and Python 3 with python3. Nowadays Python 2 disappears from distributions and it seems that python becomes the new command to start Python 3.
Unfortunately the indi_pylibcamera driver looks for python3. I will fix this in the next version. For the meantime you can:

search for the file indi_pylibcamera.py (it is likely somewhere in  /lib/python*/ and you can search it with the command find /lib/python* -name indi_pylibcamera.py)
open indi_pylibcamera.py with a text editor (for instance nano) and edit line 563:
original:

modified:
replace python3 by python
save the modified file.

That should fix the issue for the current version.

Perfect, thank you so much for your quick response. I will forward this to Matt.
Would it be better to ask Matt to use python3 in future instead of python?

ArchLinux being arch dropped python2 even before the EOL and it's been using python as the default python3 since I remember (I use it since 2017) so adding back such a thing is not likely to happen.
What I can do instead is to patch the file in the proposed way when I package pylibcamera, until the fix will be released officially

I patched this in my upstream changing python3 to python

I released v2.6.5 with the fix. It is on pypi.org now.

appreciate @scriptorron


Make documentation cleaner

See this, and this.
Hightlight issues (from Reshma):

Move Build instructions to the top of the Readme
The Usage section can be restructured to something like this: https://github.com/killbill/killbill-ee/wiki/Support-tools#usage-1.
Is example really required? If not, maybe it can be removed

@reshmabidikar question:

The Usage section can be restructured to something like this: https://github.com/killbill/killbill-ee/wiki/Support-tools#usage-1

But we already have java -jar pojogen.jar --help that show the same thing, although I'm Ok to put it in the README too. Otherwise, I can just mention java -jar pojogen.jar --help in the README. Wdyt?

Fix by this PR: https://github.com/killbill/api-pojos/pull/14


Build fail when selectors is undefined

When a css rule does not have a selector, @media, ember cli builds fail.
relevant code:
function transformCSS(podGuid, parsedCss) {
  var rules = parsedCss.stylesheet.rules;

  rules.forEach(function(rule) {
    rule.selectors = rule.selectors.map(function(selector) { // selectors can be undefined!
      var selfSelectorMatch = HAS_SELF_SELECTOR.exec(selector);

      if (selfSelectorMatch) {
        return selector.replace(selfSelectorMatch[0], '.' + podGuid);
      } else {
        return '.' + podGuid + ' ' + selector;
      }
    });
  });

exception:
version: 1.13.1
Livereload server on http://localhost:35729
Serving on http://localhost:4200/
Cannot read property 'map' of undefined
TypeError: Cannot read property 'map' of undefined
    at <clip>/node_modules/ember-component-css/lib/broc-component-css-preprocessor.js:55:36
    at Array.forEach (native)
    at transformCSS (<clip>/node_modules/ember-component-css/lib/broc-component-css-preprocessor.js:53:9)
    at Object.processors.css (<clip>/node_modules/ember-component-css/lib/broc-component-css-preprocessor.js:22:32)
    at <clip>/node_modules/ember-component-css/lib/broc-component-css-preprocessor.js:106:46
    at lib$rsvp$$internal$$tryCatch (<clip>/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:493:16)
    at lib$rsvp$$internal$$invokeCallback (<clip>/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:505:17)
    at lib$rsvp$$internal$$publish (<clip>/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:476:11)
    at lib$rsvp$asap$$flush (<clip>/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1198:9)
    at process._tickCallback (node.js:355:11)

This is happening to me to. Specifically when I have @media and /* */ comments inside my CSS file.

I'm seeing this too, doesn't like /* */ comments at all. But prefixing comment lines with // instead works...

We have switched to postcss for plain css transformation. This issue should be fixed in the master branch and will probably be included in the next release.
You can try this now using:
$ ember install https://github.com/ebryn/ember-component-css.git


Why put nn.Embedding on CPU?

Hi,
Really amazing work!
As We can see from here, you put it on CPU. Why did you do that?
Another question, where can I download xxx.embeddings.pt

Yes, that's exactly how I generate those files :) It's mostly useful for GPU clusters without access to internet.


typedef variations and marshaling slice of interfaces

The zed lake status command (re-)exposed a bug (we knew about) where arrays of mixed-type values are not handled by zng.Marshal, in particular, MarshalZNGContext.encodeArray() uses the last value of the slice elements as the array type, which does not work for mixed-concrete-type interface values.
The fix is to code mixed-type arrays as an array of unions. Buf if such a slice is typedef'd (as it is with commit.Transaction.Actions) then we need to create a typedef for the array-of-union.  However different instances of such a value can have different mixtures of concrete types as elements resulting in different array-of-union types.  This in turn causes any containing typedef to also be different.
We could just let this happen and rely upon Zed typedef renaming, which is perfectly legal.  However a stronger approach would be to add typedef variations to the Zed data model, which allows a single name to refer to multiple variations, e.g., Transaction.1, Transaction.2, etc.  While the marshaling library will not what to do with .1, .2, etc.,  the runtime should deal with it too, perhaps with operators that handle what is normally a rare condition for non-marshaled lake data.
The zng marshaler context can bookkeep these variations as encountered and take a type-union of the union variations to bound the variations (also, with the union normalization #2145, this should all work out quite well).

NOTE: I worked around this bug in zed lake status by scanning the staging area differently and not sending a commit.Transaction into the mix.  Instead I added an actions.StagedCommit, which looks like a CommitMessage without the info, and scan this the same way the journal is laid out.

Reminder to see TestBug2575() in marshal_test.go for a test case.


Add a MakeFile

This pull request...

[ ] Fixes a bug
[X] Introduces a new feature
[ ] Improves an existing feature
[ ] Boosts code quality or performance

Description
Add a Makefile for building,testing or cleaning.
Purpose
Allows developers to simply run make build or make test to build or test the application. Also allows for make clean to clean the ./target directory.
Relevant Issue(s)
N/A

I have nothing against makefiles (I use them extensively in other non-java projects) but it would be helpful to have more feedback on why adding this would be useful to this project specifically.

The command to build (without testing) is slightly shorter (make build vs mvn install -DskipTests), but the command to test is slightly longer (make test vs mvn test). Generally I'd expect someone who is building locally to be doing so in order to test that their changes work, and mvn install is shorter than make build && make test.
This would make it marginally easier for people who are unfamiliar with maven (and who are familiar with make) to understand the build process, but it doesn't change the requirement to have maven installed, maven isn't very complicated, and the entire project and its ci settings are built around maven
This would require future contributors to learn makefiles if they ever wanted to make changes to the build process, as they'd have to edit the maven files as well as the makefile (I've worked with projects that have had multiple parallel methods for building, and from my experience it leads to inconsistency).
This project in general doesn't need encouragement to build from source, as:

Someone that is working a pull request undoubtedly is using an IDE that supports java, and I'm fairly certain all popular java IDEs support maven
Someone looking for a build to run should use the existing releases, as master is not guaranteed to work, and it's more difficult to debug builds from unknown sources.

I'm open to discussion about the merits of adding this, if you or anyone else would like to weigh in.

My thinking was mostly this: If build instruction aren't going to be provided, it's a good enough way to indicate how to build it.
Personally, I had forgotten how to build Java applications and had added this such that I wouldn't need to remember how to :-)
If not a Makefile, maybe a small section on building and testing could be added to README.md instead?

maybe a small section on building and testing could be added to README.md instead?

I'd rather do this than add a Makefile, although I'm still hesitant to encourage people to build the project themselves, as someone who is capable of making a pull request should already be able to open and build this project in their IDE (without any additional changes/instructions; most Java IDEs support maven), and I don't want to nor have the time to help people who run into issues trying to build it on their own.


[hotfix][javadoc] fix typo in StreamExecutionEnvironment javadoc

What is the purpose of the change
fix typo in StreamExecutionEnvironment javadoc

Good catch, +1 to merge

+1, merging this ..


Added length and (broken) perimeter implementation

I am still getting used to thinking in spherical geometries. The test case I wrote for the perimeter function used a polygon that was rectangular in my head, so I expected its perimeter to be $4\pi / 180°$. However, not only this assumption was wrong (as angular distances between two points with the same latitude at higher latitudes are smaller than those near the equator), but I also did not take into account that all points at the poles are actually coincident, so my result was $3\pi/180°$ which I assumed to be some sort of bug.
Sorry for the confusion, everything was fine from the start!

One question about the API: should we follow BigQuery's API or shapely's API? Or a mix of both?

Any thoughts on this @jorisvandenbossche?

I think I like option 3: we provide a length that can handle both, and then still a perimeter for discoverability for people familiar with other systems like bigquery or postgis (and also perimeter is a more descriptive name in case of polygons).
(we should maybe consider adding a perimeter() in shapely as well)
I am also fine with leaving that for a follow-up, though, either way is fine.

I would be happy to change the PR accordingly if option 3 is the way forward!


ciao-image: Avoid issues when corrupted image upload

In case of failure on image rawDs writting from upload operation,
it will automatically set image status to Killed and will rollback
the image file writting (deletes it from filesystem)
Fixes #663
Signed-off-by: Obed N Munoz<EMAIL_ADDRESS>

Coverage increased (+0.004%) to 64.769% when pulling 9fda7fe920698c1baa8738f9ff669702b8415b21 on obedmr:issue-663 into cd27b8e36a75b4961908a6f591f8e208eaf39dc0 on 01org:master.

Coverage decreased (-0.03%) to 64.737% when pulling 9fda7fe920698c1baa8738f9ff669702b8415b21 on obedmr:issue-663 into cd27b8e36a75b4961908a6f591f8e208eaf39dc0 on 01org:master.

Coverage increased (+0.02%) to 64.786% when pulling 9fda7fe920698c1baa8738f9ff669702b8415b21 on obedmr:issue-663 into cd27b8e36a75b4961908a6f591f8e208eaf39dc0 on 01org:master.

@obedmr This one needs to be rebased.

Coverage increased (+0.05%) to 64.819% when pulling b6cdb697753d7a7347aad4367423bb340a18ad20 on obedmr:issue-663 into f97db51b9de7278ed8ffdb5cfc1dd1e4f0995325 on 01org:master.

@markdryan, it's rebased now.

Maybe we could reword the commit title as well, from
ciao-image: Avoid issues when corrupted image upload
to
ciao-image: Set status to 'Killed' when upload fails.

@obedmr Could you update the commit title as well?

Coverage increased (+0.009%) to 64.78% when pulling 9e87e4084fb7f823b9187fb69ce1715192a3c579 on obedmr:issue-663 into f97db51b9de7278ed8ffdb5cfc1dd1e4f0995325 on 01org:master.

Coverage decreased (-0.02%) to 64.747% when pulling 9e87e4084fb7f823b9187fb69ce1715192a3c579 on obedmr:issue-663 into f97db51b9de7278ed8ffdb5cfc1dd1e4f0995325 on 01org:master.

Coverage decreased (-0.008%) to 64.763% when pulling 9e87e4084fb7f823b9187fb69ce1715192a3c579 on obedmr:issue-663 into f97db51b9de7278ed8ffdb5cfc1dd1e4f0995325 on 01org:master.

Coverage increased (+0.009%) to 64.78% when pulling 9e87e4084fb7f823b9187fb69ce1715192a3c579 on obedmr:issue-663 into f97db51b9de7278ed8ffdb5cfc1dd1e4f0995325 on 01org:master.

@obedmr I think we need one small change here.  We should not try to execute
	err := s.rawDs.Delete(ID)
	if err != nil {
		return err
	}

when deleting an image in the Killed State.  It's currently not possible to delete such an image as the call to err := s.rawDs.Delete(ID) fails as there are no rbd images to delete.  So we could either not call s.rawDs.Delete(ID) when the image state is killed or we could call it an ignore the error, if one occurs, if the image state is killed.

@markdryan, I'm confused, I deleted that line.

@markdryan, agree, I added some changes on Delete function in order to get status from image, it must have an Active Status in order to perform the rawDs.Delete

Coverage decreased (-0.02%) to 65.094% when pulling f2e1255fe5656442a3d23f72527b247006050dbd on obedmr:issue-663 into 0581b78153dbbed64776aab37cc7b708b42653da on 01org:master.

Coverage decreased (-0.05%) to 65.06% when pulling f2e1255fe5656442a3d23f72527b247006050dbd on obedmr:issue-663 into 0581b78153dbbed64776aab37cc7b708b42653da on 01org:master.


TypeScript Support

Before I start, thank you very much for all your hard work on OSS, Tanner! react-charts and react-query are really awesome libs! We really appreciate all the time you spend working on them
As more people are learning & moving to TypeScript it would be really great to see it supported here. There was an issue raised almost three years ago - #26 - but I think that there has been a lot of change in the js/react ecosystem that justifies a new issue. TS has been a prominent tool of 2020/21. Show us TS fans some love 🤓

Due to a massive overhaul and rewrite of React Charts to TypeScript and a massively upgraded public API, this issue is being bulk closed for triage. The latest version can be tested via the react-charts@beta tag. Documentation is in the process of being upgraded, but thankfully, everything is fully typed now, so you can explore the API that way for now.
If, after testing or playing with the v3 beta, you believe your issue is still not addressed or relevant, feel free to open a new issue.


Added support for Carthage dependency manager

Why:
*to allow use of Carthage and let it build a library for you
This change is addressed by:
*New target to coexist with current
*Duplicated compile sources  (minus the AFNetworking categories)
*Duplicated public headers
*new shared target

Works perfectly - thank you.


_validate_compute_parameters does not throw error if cell tensor is zero, resulting in potential = nan

Basically TSIA.  I think we need to throw an error in _validate_compute_parameters if the cell tensor is a zero tensor (which happens if no cell info is present in the .xyz dataset). The calculators return potentials equal to nan in this case

Thanks for the issue!
Yes something like here
https://github.com/lab-cosmo/torch-pme/blob/ffc689c020fedfe2aaf192c8dd38d223f62d910d/src/torchpme/utils/tuning/__init__.py#L132-L136
should fix this. But the test should only be applied if the given potential is range separated. If not we have no fourier space part and the cell can be zero. We usually check this fast with a statement like
if self.potential.smearing is None:
    ...

However the method
https://github.com/lab-cosmo/torch-pme/blob/ffc689c020fedfe2aaf192c8dd38d223f62d910d/src/torchpme/calculators/calculator.py#L181-L188
is static and has no idea about self.potential. To solve this one should make this again a normal method and add a test after the device check of the cell
https://github.com/lab-cosmo/torch-pme/blob/ffc689c020fedfe2aaf192c8dd38d223f62d910d/src/torchpme/calculators/calculator.py#L212-L216

Sure, on it


Better not to use '+' for string concatenation

When concatenating more than 2 strings with '+' is an O(n^2) operation (compared to O(n) for join) and thus becomes inefficient,  the reason being that each concatenation produces a new string
use of either of the below method
''.join((a, b)) or '%s%s' % (a, b).
similar usage of concatenation uisng '+' is there in other places of the code please check all
line details : https://github.com/libuparayil/networking-huawei/blob/master/networking_huawei/plugins/l3/ac/driver.py#L151

ok


Quantum Jitter

Link to suggestion
quantumjitter.com
Targeted section
Real life examples/Websites formats
Describe your suggestion
Quarto R website / blog with a custom theme (adapted from flatly / darkly), day / night landing page and a novel 404.
Checklist

[X] checked if your suggestion is not already listed in Awesome Quarto list.
[X] checked if it can fit in an existed section or suggest a new section and explain why your item does not fit into one and what would be the interest of your new section.
[X] checked when it's a repository if it's maintained (archived repository will be rejected).

Thanks for the suggestion.

Thank you for including this.


feat(sql-execute): supports locating specific issue locations in multiple sqls during sql interception stage and pre-check stage

What type of PR is this?

type-feature
module-sql-execute
What this PR does / why we need it:
Which issue(s) this PR fixes:

Fixes #359
Special notes for your reviewer:

This PR mainly supports locating the specific issue locations in the whole SQL script. The main solution is to record the first character order of each SQL as the offset when splitting SQLs. To achieve this, I use OffsetString and OrderChar to wrap the primitive String and char datatype:

Iterate the original SQLs and map each character to OrderChar to record the original position of each char;
When recognizing a SQL we use the first OrderChar.order of the line as the OffsetString.offset;

For now, we have two sets of logic to split SQLs: SqlCommentProcessor#split and SqlSplitter#split. I change the return type from List<String> to List<OffsetString> to offer the first char position of each split SQL. For scenarios where the offset is not necessary, use SqlUtils#split which will map OffsetString to primitive String for the caller to ensure that most current scenarios of splitting do not need to be modified.
Additional documentation e.g., usage docs, etc.:

Will the current changes affect the performance of SqlSplitter and SqlCommentProcessor respectively?

Will the current changes affect the performance of SqlSplitter and SqlCommentProcessor respectively?
For SqlSplitter, there is no performance penalty as the original implementation also traverses each token.
For SqlCommentProcessor, it will iterate the original SQL once to record the original position of each char. But it will not affect the performance, because the time cost before is much more than O(n), and the additional time cost for now is O(n). There is a SQL consisting of 100,000 characters in the unit test case of SqlCommentProcessor, and the time cost of splitting this SQL is 40ms(before) v.s. 50ms(after).

Will the current changes affect the performance of SqlSplitter and SqlCommentProcessor respectively?

For SqlSplitter, there is no performance penalty as the original implementation also traverses each token.
For SqlCommentProcessor, it will iterate the original SQL once to record the original position of each char. But it will not affect the performance, because the time cost before is much more than O(n), and the additional time cost for now is O(n). There is a SQL consisting of 100,000 characters in the unit test case of SqlCommentProcessor, and the time cost of splitting this SQL is 40ms(before) v.s. 50ms(after).


Update main.wxs to fix bug #223

Fix bug - https://github.com/GyulyVGC/sniffnet/issues/223

Hi @q5sys, the app packaging strategy is undergoing a complete restructure and as a consequence also the main.wxs file.
Thank you very much for your intention to help anyway!


[RESOLVED] High ICMP ping response time

Problem started at 12:36:33 on 2023.05.29
Problem name: High ICMP ping response time
Host: S100-Santiago
Severity: Warning
Operational data: Value: 9ms
Original problem ID: 22918
Event details in Zabbix: http://<IP_ADDRESS>/tr_events.php?triggerid=23518&eventid=22918

Problem has been resolved in 3m 0s at 12:39:33 on 2023.05.29
Problem name: High ICMP ping response time
Host: S100-Santiago
Severity: Warning
Original problem ID: 22918


Dev hl

Hi Team -

Updated default image links in HTML to point to ./assets/images (Dylan - if you are cool with this we can delete the img folder that is in the root folder
Updated CSS for dynamic recipes that display using tailwind classes
Updated comments in JS around dynamic fields
Updated comments in HTML to indicate what the dynamically added elements look like


Add namespace describer

Fixes #9435
$ cluster/kubectl.sh describe namespace default
Name:	default
Labels:	<none>
Status:	Active

Resource Quotas
 Resource		Used	Hard
 ---			---	---
 cpu			400m	20
 memory			0	1Gi
 persistentvolumeclaims	0	10
 pods			2	10
 replicationcontrollers	2	20
 resourcequotas		1	1
 secrets		8	10
 services		2	5

Resource Limits
 Type		Resource	Min	Max	Default
 ----		--------	---	---	---
 Container	cpu		-	-	100m

/cc @bgrant0607 @dchen1107

Post 1.0, I want to explore the idea of a non-enforced quota.  So you can add a quota to a namespace to track usage counts, but ignore enforcing hard limits.  In that way, you would always get nice counts.   Could be a simple flag on the quota document.

@dchen1107 Assigned to you since the linked issue is a v1 candidate.

LGTM thanks for fixing.


Can't interact with maps except zoom in

Hello , I have a problem with my maps
my maps can't be move except zoom in , the problem is appear when i try to use user current location on maps. when i don't use userlocation , i can't interact with maps
here's my componentDidMount and componentWillMount function
componentDidMount() {
        var markerData = require('./../map_data/stores.json');
        let ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1 !== r2});
        this.setState({
            isLoading: false,
            dataSource: ds.cloneWithRows(markerData.features),
            data: markerData.features
        });

        navigator.geolocation.getCurrentPosition(
            position => {
              this.setState({
                region: {
                  latitude: position.coords.latitude,
                  longitude: position.coords.longitude,
                  latitudeDelta: LATITUDE_DELTA,
                  longitudeDelta: LONGITUDE_DELTA,
                }
              }
            );
            },
          (error) => console.log(error.message),
          { enableHighAccuracy: true, timeout: 20000, maximumAge: 1000 },
          );
          this.watchID = navigator.geolocation.watchPosition(
            position => {
              this.setState({
                region: {
                  latitude: position.coords.latitude,
                  longitude: position.coords.longitude,
                  latitudeDelta: LATITUDE_DELTA,
                  longitudeDelta: LONGITUDE_DELTA,
                }
              });
            }
        );

      }

      componentWillUnmount() {
        navigator.geolocation.clearWatch(this.watchId);
      }

here's my render code
<MapView.Animated style={{
                height: window.height/2,
                position: 'absolute',
                top: 0,
                left: 0,
                right: 0,
                bottom: 0,
            }}
            showsMyLocationButton={true}
            provider={PROVIDER_GOOGLE}
            showsUserLocation={ true }
            region={ this.state.region }
            onRegionChange={ region => this.setState({region}) }
            onRegionChangeComplete={ region => this.setState({region}) }
    />

i'm using react-native version 0.47
thank you

You mean the map is really unresponsive? Got the same problem.

@maluramichael
Found the fix ,
don't use
region attribute on MapView
use initialRegion for set the region for the first time :)
honestly my problem now is after i swipe back from map view page , then i open map view page again ,
the map is blank , i don't know why , maybe i must reinitialize the map but how ?

There's a few different types of 'blank map' problems - does the map have the legal insets, or is it just blue?

@heysailor
I'm using google maps
And yes the map just show me blue screen with google logo
But when i tap showMyLocation button , then it back to normal

Heya. It's a current bug - the blue is the sea, you're zoomed right in. See #1617 and #1559. The initialRegion prop was broken and has not yet been fixed up. Am having a look to see if I can figure it out.

Is this specific to iOS? Could you try remove Google as the provider and see if the problem still persists?
There's been quite a few issues around this in the latest releases. I think most have been resolved but now it appears that the recent changes are causing issues with Google maps on iOS.

yes after removing google as provider, it works fine. but delta values are not working as expected when google is used nd it zooms out to whole world.

See this example and forget about this problems https://github.com/react-community/react-native-maps/issues/209#issuecomment-350907665
Delta values correspond to #616

on ios map is unresponsive this is happening to my app also


README in the molecules directory

As we get more molecule test sets, I think it will be important to have better documentation of what each molecule file contains. Especially since names like test_filt1_tripos.mol2 isn't particularly informative. Not a high priority, but I think we should do this before any of the papers related to this repository are getting submitted.

Agreed, yes. (If you still have spare time, feel free...)

spare time isn't something I have a lot of write now, but if I get a chance I'll start one before my next pull request.

I added in pull request #198


JavaScript

Apollo support for Kotlin/JS
:warning: Currently in heavy WIP state, consulting with @martinbonnin on Slack.

@Pitel: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

@martinbonnin
e: /home/pitel/apollo-android/composite/tests/integration-tests-kotlin/build/generated/source/apollo/fullstack/com/apollographql/apollo3/integration/fullstack/BookTripMutation.kt: (22, 3): JavaScript name (id) generated for this declaration clashes with another declaration: fun id(): String
e: /home/pitel/apollo-android/composite/tests/integration-tests-kotlin/build/generated/source/apollo/fullstack/com/apollographql/apollo3/integration/fullstack/BookTripMutation.kt: (24, 3): JavaScript name (id) generated for this declaration clashes with another declaration: val id: String
e: /home/pitel/apollo-android/composite/tests/integration-tests-kotlin/build/generated/source/apollo/fullstack/com/apollographql/apollo3/integration/fullstack/CancelTripMutation.kt: (22, 3): JavaScript name (id) generated for this declaration clashes with another declaration: fun id(): String
e: /home/pitel/apollo-android/composite/tests/integration-tests-kotlin/build/generated/source/apollo/fullstack/com/apollographql/apollo3/integration/fullstack/CancelTripMutation.kt: (24, 3): JavaScript name (id) generated for this declaration clashes with another declaration: val id: String
e: /home/pitel/apollo-android/composite/tests/integration-tests-kotlin/build/generated/source/apollo/fullstack/com/apollographql/apollo3/integration/fullstack/LaunchDetailsQuery.kt: (22, 3): JavaScript name (id) generated for this declaration clashes with another declaration: fun id(): String
e: /home/pitel/apollo-android/composite/tests/integration-tests-kotlin/build/generated/source/apollo/fullstack/com/apollographql/apollo3/integration/fullstack/LaunchDetailsQuery.kt: (24, 3): JavaScript name (id) generated for this declaration clashes with another declaration: val id: String
e: /home/pitel/apollo-android/composite/tests/integration-tests-kotlin/build/generated/source/apollo/normalizer/com/apollographql/apollo3/integration/normalizer/CharacterDetailsQuery.kt: (23, 3): JavaScript name (id) generated for this declaration clashes with another declaration: fun id(): String
e: /home/pitel/apollo-android/composite/tests/integration-tests-kotlin/build/generated/source/apollo/normalizer/com/apollographql/apollo3/integration/normalizer/CharacterDetailsQuery.kt: (25, 3): JavaScript name (id) generated for this declaration clashes with another declaration: val id: String
e: /home/pitel/apollo-android/composite/tests/integration-tests-kotlin/build/generated/source/apollo/normalizer/com/apollographql/apollo3/integration/normalizer/CharacterNameByIdQuery.kt: (21, 3): JavaScript name (id) generated for this declaration clashes with another declaration: fun id(): String
e: /home/pitel/apollo-android/composite/tests/integration-tests-kotlin/build/generated/source/apollo/normalizer/com/apollographql/apollo3/integration/normalizer/CharacterNameByIdQuery.kt: (23, 3): JavaScript name (id) generated for this declaration clashes with another declaration: val id: String
e: /home/pitel/apollo-android/composite/tests/integration-tests-kotlin/build/generated/source/apollo/normalizer/com/apollographql/apollo3/integration/normalizer/CharacterWithBirthDateQuery.kt: (22, 3): JavaScript name (id) generated for this declaration clashes with another declaration: fun id(): String
e: /home/pitel/apollo-android/composite/tests/integration-tests-kotlin/build/generated/source/apollo/normalizer/com/apollographql/apollo3/integration/normalizer/CharacterWithBirthDateQuery.kt: (24, 3): JavaScript name (id) generated for this declaration clashes with another declaration: val id: String
e: /home/pitel/apollo-android/composite/tests/integration-tests-kotlin/build/generated/source/apollo/normalizer/com/apollographql/apollo3/integration/normalizer/StarshipByIdQuery.kt: (22, 3): JavaScript name (id) generated for this declaration clashes with another declaration: fun id(): String
e: /home/pitel/apollo-android/composite/tests/integration-tests-kotlin/build/generated/source/apollo/normalizer/com/apollographql/apollo3/integration/normalizer/StarshipByIdQuery.kt: (24, 3): JavaScript name (id) generated for this declaration clashes with another declaration: val id: String
e: /home/pitel/apollo-android/composite/tests/integration-tests-kotlin/build/generated/source/apollo/normalizer/com/apollographql/apollo3/integration/normalizer/UpdateReviewMutation.kt: (23, 3): JavaScript name (id) generated for this declaration clashes with another declaration: fun id(): String
e: /home/pitel/apollo-android/composite/tests/integration-tests-kotlin/build/generated/source/apollo/normalizer/com/apollographql/apollo3/integration/normalizer/UpdateReviewMutation.kt: (26, 3): JavaScript name (id) generated for this declaration clashes with another declaration: val id: String

It look like you'll have to change someting in generating code, because the id is clashing.

Mmmm I don't think this changed recently but this is going to be a problem nonetheless... The problem can be reduced to:
class MyOperation(val id: String) {
  fun id(): String {
    return ""
  }
}

My understanding is that JS classes cannot have properties with the same name as a function?
If that's the case, we can decrease the occurence of name clashes with @JsName:
class MyOperation(val id: String) {
  @JsName("operationId")
  fun id(): String {
    return ""
  }
}

To 100% remove nameclashes, it would then either be:

using aliases in queries
or escape property names in the codegen

@martinbonnin Do you have some ETA on the fix?

@Pitel pretty hard to tell at the moment but I think you can workaround by changing the name of Operation.id in Js:
  /**
   * An unique identifier for the operation.
   */
  @JsName("operationId")
  fun id(): String

That should do until we find a more robust way to escape name clashes.

@martinbonnin Thanks for the link. I didn't know where to look.
Now it builds, and the tests are failing, as expected.
I'll probably have to modify the existing tests, because there is no runBlocking in JS. So I'll probably do multiplatform runTest method (using runBlocking on JVM and Apple, and Promise on JS), which will have to wrap all tests that were using the runBlocking and remove the runBlocking, because I simply can't do that in JS.

We have runWithMainLoop that is doing some specific stuff for Apple so it might make sense to add Js support there as well (apollo-testing-support module) ?

@martinbonnin Regarding the runWithMainLoop, will you be able to verify that my changes doesn't break Apple tests? Because I don't have a Mac, so I can't check that.

@martinbonnin Regarding the runWithMainLoop, will you be able to verify that my changes doesn't break Apple tests?

I left a comment above. Apple tests really need the runWithMainLoop trick or else they will hang forever

@martinbonnin ./gradlew -p composite :tests:integration-tests-kotlin:jsNodeTest are all passing! :tada:

But WriteToCacheAsynchronouslyTest[jvm] started failing. Other JVM tests seems ok.
The jsNodeTest is hanging at the end. I have to killall node to recover and get test reports from gradle. I must investigate why.
I hope Apple tests are ok.
jsBrowserTest is not working. Obviously, because we can't have server in browser. I'll have to find a way to selectively ignore those tests which requires MockServer when they are run in browser.

Nice 🤩 . I'll take a deeper look later today.
Early thoughts: I think we can remove the jsBrowser integration tests for now. If we find bugs where the node implementation is different from the browser one (that seems unlikely but you never know), we can run a server outside the Gradle process. It'll be a bit more painful but certainly doable if we really need to.

@martinbonnin Hi, sorry for inactivity, I was on family vacation.
Anyways, after merging current dev3.x branch, I noticed there is no longer composite module. Digging through commits, I figured I should now run ./gradlew -p tests jsNodeTest. Is that correct? That would also mean now have to pass even more tests, not just the integration-tests, right?

now run ./gradlew -p tests jsNodeTest. Is that correct?

Yup. Not 100% sure on the jsNodeTest. The CI runs allTests but since we can certainly ignore browserTest, jsNodeTest is certainly enough

That would also mean now have to pass even more tests, not just the integration-tests, right?

It's the same as before really. Only removing one layer of directories. integration-tests are still there as the general cases and other modules are for more specific cases.

@martinbonnin Ok, I've fixed the tests, and there is one I can't make work.
models-response-based > ParseResponseBodyTest > operationJsonWriter.
Problem is with surfaceWater values. It expects integer (40), but it gets float (40.0). Any idea why is that? Maybe another JS quirk?

Problem is with surfaceWater values. It expects integer (40), but it gets float (40.0). Any idea why is that? Maybe another JS quirk?

This is because toString() behaves differently:

JVM: 40.0.toString() -> "40.0"
JS: 40.0.toString() -> "40"


Uber component - can't use !secret with server_token

Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (hass --version):
0.49.0
**Python release (python3 --version):
3.4.2
Component/platform:
Uber
Description of problem:
When using !secret server_token the component no longer loads. No messages in log either.
Expected:
Uber component should load.
Problem-relevant configuration.yaml entries and steps to reproduce:
- platform: uber
  server_token: !secret uber_server_token

Place uber server token in secrets.yaml
setup Uber component in sensors.yaml
reload hass

Additional info:
I suspect this has something to do with the fact that the component requires the token to be in ''. I have tried '!secret uber_server_token' and placing the token in '' in secrets.yaml and with no '' at all.

Although saying this, I've just tried putting my server token back in plain text inside '' in sensors.yaml and it's still not loading

This is no longer working at all. I have the uber sensor defined but it doesn't load and I get no log messages about it either. I've tried creating a new server token and double checked the uber folders are there in deps if that matters.

Also not working after upgrading to 0.49.1

For works me on dev.
uber_api: Wfjtufjntrn764G764Djjgjtj9088tjgZEnhf7JEVe

sensor:
# Melborne
  - platform: uber
    server_token: !secret uber_api
    start_latitude: -37.8136
    start_longitude: 144.9631

At first glance I would say that the session with the wrong token is still active and causes the auth issue.

hmmm, I tried revoking all server tokens, creating a new one and adding it directly into sensors.yaml as below:
- platform: uber
  server_token: 'actualserverkeyherenotinsecrets'

but still no sign at all, not even in the logs. I know my sensors.yaml file is included correctly as other sensors show up fine. This was all working fine on 0.3something but suddenly stopped. Is there anywhere else I can check besides the logs?

Are your inside your venv if you are using one?
You could try to get the details directly with Python. Something like the code below should work.
$ python3
[...]
>>> from uber_rides.session import Session
>>> from uber_rides.client import UberRidesClient
>>> session = Session(server_token='YOUR_SERVER_TOKEN')
>>> client = UberRidesClient(session)
>>> response = client.get_products(37.77, -122.41)
>>> response.json.get('products')

@fabaff I am using one but this is from the Home Assistant front end in the "About" page where you usually see the logs.
I'll try the rest when I'm home, cheers.

@fabaff hmm, looks like it's working (from what I can tell)

I did have to do pip install uber_rides which returned:
Collecting uber_rides
  Using cached uber_rides-0.4.1-py2.py3-none-any.whl
Requirement already satisfied: requests in ./lib/python3.4/site-packages (from uber_rides)
Requirement already satisfied: pyyaml in ./lib/python3.4/site-packages (from uber_rides)
Installing collected packages: uber-rides
Successfully installed uber-rides-0.4.1

@fabaff tried a reboot too after the above and still nothing, still getting bash: hass: command not found in the frontend too.

Ended up uninstalling and clearing up home assistant and then pulling my files from my github repo and all up and running again!


Nano window visibility control

What does it do?

hides window when focus is lost

click on any other app
open "Apps"
open any client config window

context menu to keep nano opened (super useful for debug or advanced use)

Relevant screenshots?

non-blocking: link to open Grid repo does not close nano for me

@dependabot squash and merge


Can't turn on shadows during viewer construction with Cesium OSM Buildings?

Here's a Sandcastle with Cesium OSM Buildings. Click the button to toggle shadows, works fine.
If you enable shadows in the viewer constructor, you get:
An error occurred while rendering.  Rendering has stopped.
DeveloperError: normalized result is not a number
Error
    at new DeveloperError (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:83:13)
    at Function.Cartesian3.normalize (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:2040:13)
    at Ellipsoid.geodeticSurfaceNormal (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:3606:23)
    at Ellipsoid.cartesianToCartographic (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:3699:18)
    at fitShadowMapToScene (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:267333:40)
    at ShadowMap.update (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:267565:9)
    at updateShadowMaps (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:282939:17)
    at updateAndRenderPrimitives (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:282962:5)
    at executeCommandsInViewport (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:282734:7)
    at Scene.updateAndExecuteCommands (https://sandcastle.cesium.com/CesiumUnminified/Cesium.js:282477:7)

FYI, this only happens at certain times of the day (I just tried to reproduce and it didn't work).  Basically you need shadows to actually be cast in the scene.  I edited the original link to have the demo always crash.

This looks like a clear cut "something isn't initialized yet" bug which cascades into NaNs.

I've tracked this to be a bug in this condition https://github.com/CesiumGS/cesium/blob/master/Source/Scene/View.js#L322.
In fact is not very clear for me what the intention is, as the condition is difficult to read. The bug happens when commnadFar has a negative value.
Rewritting this condition to something like the below code fixes the crash:
(!(pass === Pass.GLOBE && commandNear < -100.0 && commandFar > 100.0) && commandFar > 0.0)

I don't feel comfortable changing this code without more knowledge. However I'm inclined to think the condition is not correct as it is, or at least it is difficult to understand what it does. Maybe it could be rewritten in a friendlier way.
Probably @IanLilleyT (sorry for the git blame) could give more insights about it.
cc: @lilleyse

This is more for @lilleyse . I was the last one to modify this file, and may have even introduced a bug in the process (do we know when this bug started happening?), but I'm not familiar enough with the shadow mapping system to know if there are any downsides to your fix

Thanks for investigating this @jtorresfabra. That helped my narrow down the bug fairly quickly. I opened https://github.com/CesiumGS/cesium/pull/9172.


Backend: Support WebSub (and PubSubHubbub v0.4)

The specification formerly known as PubSubHubbub (or PuSH) is now called WebSub and is developed by the W3C.
Newsblur is currently unable to subscribe to WebSub hubs or PubSubHubbub version 0.4 hubs.
The main problem seems to be that verify_token was deprecated in PubSubHubbub version 0.4 and isn’t a part of WebSub either. Newsblur requires subscriptions to have this token, however.
https://github.com/samuelclay/NewsBlur/blob/c4bea0623dcaace02f634447832ae389ea19ad35/apps/push/views.py#L24
You can test your implementation against this automated test tool: https://websub.rocks/subscriber

Can you provide an example of a feed that uses WebSub?

@samuelclay I provided a link to an automated test suite above. It generates test feeds, checks that you can subscribe to them, pushes new items to the feed, and verifies that everything is working as it should.

For what it's worth, I have a friend who switched to Inoreader in the past year because they support WebSub.

This isn't a very high priority ticket, so if you have ideas on how to change the implementation, that would help immensely. And to confirm, all NewsBlur needs is to remove the verification token. Is that right? What is it replaced with?

The hub.verify_token token was an optional parameter. Subscribers, like Newsblur, could optionally include it and would then require the hub to echo it back. However, it was deprecated as it served no purpose not already fulfilled by the existing and required hub.callback and hub.challenge parameters. Just remove it. If you still need the verify_token for some internal routing or logic, just include it as a URL GET parameter in the callback URL.


Bug in training script: TypeError in clean_dataset function

The training script Deepfence_ML_flowmeter.py contains a bug that causes it to fail when executed. The error occurs in the clean_dataset function, specifically with the any method.
Traceback (most recent call last):   File "/home/victor/FlowMeter/assets/Deepfence_ML_flowmeter.py", line 162, in <module>     X, y = clean_dataset(pd_comb_features_cp)   File "/home/victor/FlowMeter/assets/Deepfence_ML_flowmeter.py", line 154, in clean_dataset     indices_to_keep = ~df_X.isin([np.nan, np.inf, -np.inf]).any(1) TypeError: any() takes 1 positional argument but 2 were given
Steps to Reproduce:

Navigate to the FlowMeter directory.
Run the script Deepfence_ML_flowmeter.py using Python 3.9.

Suggested Fix:
The issue is due to incorrect usage of the any method. The any method should be called with the axis parameter explicitly specified. The correct line should be:
indices_to_keep = ~df_X.isin([np.nan, np.inf, -np.inf]).any(axis=1)

Hello @cyberholics , pull request for the fix is welcome

Thanks for getting back to me. I just submitted a pull request to implement the fix.


RFE: Remove dependency on ansible-core

Using molecule in a testing matrix of python interpreters and ansible version is challenging because molecule has a dependency on ansible-core which is > ansible 2.9.
When attempting to test with ansible 2.9, molecule forces an upgrade based on it's own requirements.
I'm not sure exactly where/why ansible-core is needed, but I think we should research this to see if it's possible to allow the user to choose the ansible version desired without conflict.

if it's possible to allow the user to choose the ansible version desired without conflict.

Maybe we can lower the lower bound of ansible-core in ansible-compat

ansible-galaxy is used in code base, but it can be installed separately, which has no impact on packaging molecule.
https://github.com/ansible/molecule/blob/6daea252e28383ab89b9e303491c755ed5c60e56/src/molecule/dependency/ansible_galaxy/base.py#L45
I think we can remove ansible-core dependency in https://github.com/ansible/molecule/blob/6daea252e28383ab89b9e303491c755ed5c60e56/.config/requirements.in#L2
But, ansible-compat also requires ansible-core>=2.12.
https://github.com/ansible/ansible-compat/blob/fece06f4f8afd333946ba58c22dfa257368742c4/pyproject.toml#L40

This is what I was afraid of. For now I dropped the 2.9 tests where I was using molecule.
The other issue here is to test with python 3.8 which is required for 2.9, we're dropping all the way back to molecule 4.0.4.
As the devtools get deeper into the testing of content, IMHO they will need to be a little less agressive dropping python interpreter and core versions.  I'm not sure it's worth going backwards, but 3.9/2.12 should be min bar while supported.

I prefer the users upgrade Python versions in a regular time. It's some boring chore but it can makes the project long live.
If we support many old versions, there would be more redundant code to handle the compatible issue, which would make the maintenance more complicated.

I almost agree 100% almost 100% of the time.......... The only exception being the need to support the at least one version of python supported by the oldest version of ansible/asible-core still supported.  2.9 drops this fall which is great........it's time has passed :)


TS-3966 Allow for pre-origin requests to be denied in header_rewrite

This generalizes the concept of set-status, such that it also works in
remap read-request hooks. I.e.  prior to having a status code from cache
/ origin.  This avoids going to origin before we can reject a request.

lgtm


NextStage logic does not work as stage array not ordered or indexed in GetAllStages

In the promotion_triggerd_event_handler.go on like 212, this logic does not work as when you get the array of stages they are not ordered or indexed therefore if you get the last stage first eg production, and then loop through "test" last there are no new stages so, therefore, it can't find the next stage.
	for i, s := range stages { 		if s.StageName == stage { 			if len(stages) <= (i + 1) { 				err = errors.New(fmt.Sprintf("no stage defined after stage %s", stage)) 				logger.WithField("func", "getNextStage").WithError(err).Errorf("no next stage found for project %s with stage %s", project, stage) 				return nextStage, err 			} 			logger.WithField("func", "getNextStage").Infof("next stage %s found for project %s and stage %s", stages[i+1].StageName, project, stage) 			return stages[i+1].StageName, nil 		} 	}
Example:
I have two stages, test, and production. when the code calls the stages, err := a.api.StagesV1().GetAllStages(project) (line 193)
I get the following, and it will start looping through until it matches the stageName and i (the index) is at the end so it will never find the next stage.
[     {       "services": [         {           "creationDate": "1664279948598231077",           "openApprovals": null,           "serviceName": "podtato-head"         }       ],       "stageName": "production"     },     {       "services": [         {           "creationDate": "1664279947708503073",           "lastEventTypes": {             "sh.keptn.event.catalog.triggered": {               "eventId": "cb0fdb71-649f-48a2-87dc-c4ffd819904d",               "keptnContext": "76c0146e-58e9-441a-a35a-2255032fafb6",               "time": "1664542559990455931"             },             "sh.keptn.event.evaluation.finished": {               "eventId": "276c6e43-5070-44b8-9ffe-1db64c3b1e40",               "keptnContext": "0d09ab65-7cd4-42ac-8788-eaa91cc28d05",               "time": "1664594874588015193"             },             "sh.keptn.event.evaluation.started": {               "eventId": "e3e4e52b-d2d8-456c-a4b2-81365c67aab3",               "keptnContext": "0d09ab65-7cd4-42ac-8788-eaa91cc28d05",               "time": "1664594874583947222"             },             "sh.keptn.event.evaluation.triggered": {               "eventId": "12a89acd-efb1-4f9d-abda-de26dc7cae2e",               "keptnContext": "0d09ab65-7cd4-42ac-8788-eaa91cc28d05",               "time": "1664594869911307171"             },             "sh.keptn.event.git-promotion.finished": {               "eventId": "b1986bb6-355a-4ac2-8d2e-506cf44d4bae",               "keptnContext": "0e4c666e-908e-4b12-ae30-87187e0fe06c",               "time": "1664593785287294550"             },             "sh.keptn.event.git-promotion.started": {               "eventId": "0e2a991f-7e81-4b90-ba50-8aed1795c20d",               "keptnContext": "0d09ab65-7cd4-42ac-8788-eaa91cc28d05",               "time": "1664594874702474896"             },             "sh.keptn.event.git-promotion.triggered": {               "eventId": "9ff0a90e-75d4-477a-b6c0-89ebe3c84d03",               "keptnContext": "0d09ab65-7cd4-42ac-8788-eaa91cc28d05",               "time": "1664594874594860413"             },             "sh.keptn.event.test.finished": {               "eventId": "3f2731cd-7481-4aff-a812-3fd0344e464c",               "keptnContext": "0d09ab65-7cd4-42ac-8788-eaa91cc28d05",               "time": "1664594869901505399"             },             "sh.keptn.event.test.started": {               "eventId": "ea511500-b023-4fd3-92dc-9597e5be8d1e",               "keptnContext": "0d09ab65-7cd4-42ac-8788-eaa91cc28d05",               "time": "1664594834585659503"             },             "sh.keptn.event.test.triggered": {               "eventId": "30f47d96-8f01-4bd7-8f8e-a9a941abb0c0",               "keptnContext": "0d09ab65-7cd4-42ac-8788-eaa91cc28d05",               "time": "1664594833588212197"             }           },           "openApprovals": null,           "serviceName": "podtato-head"         }       ],       "stageName": "test"     }   ]

Reference to code for stageUtils which this project uses: https://github.com/keptn/go-utils/blob/master/pkg/api/utils/stageUtils.go

Confirmed there is no data regarding index or order in stage model https://github.com/keptn/go-utils/blob/master/pkg/api/models/stage.go


Stop reloading entry list after every save

Lexonomy reloads the entry list (on the left hand side of the screen) each time an entry is saved. This is in case the title of the entry has changed as a result of the save and the entry now needs to appear somewhere else in the alphabetical order. It turns that this was not a good idea, for two reasons:

When the entry list is very long it takes very long to reload it and the user can erroneously assume that the entry has not been saved yet.

When the entry has in fact changed and the entry moves somewhere else in the alphabetical list (which may be off-screen) it turns out that users find it confusing.

Thse changes have already been implemented in Screenful, and will appear in Lexonomy automatically once Screenful is unforked (#84).

This has been fixed, yes?


Slow destroy

Fix up .cleanData loop causes by overriding $.ui methods
See: http://craigsworks.com/projects/forums/thread-qtip-slow-on-destroy
Test case: http://jsfiddle.net/wpjUy/2/

I just ran into this issue today, the number of nodes with qtip is around 160

Here is the code that Im using to bind:
var cacheNodes = $('[title!=""]'),
                targetNodes = cacheNodes.filter(function (index) {
                    return typeof $(cacheNodes[index]).attr('title') !== 'undefined';
                });
                window.console.log('targetNodes.length: ' + targetNodes.length);
                $(targetNodes).qtip({
                    position: {
                        viewport: $('body'),
                        adjust: {
                            method: 'flipinvert none'
                        }
                    }
                });

This is in an AngularJS app, and the problem happens when going to another controller.
These are the metrics from Chrome's dev tools' Profiler:
With qTip: ~350ms
Without qTip: ~50ms
(ran 3 tests for each case)


focus problems

value: function focus() {
// Add an empty space to texarea. It is necessary for safari to enable "copy" command from menu bar.
this.mainElement.value = ' ';
this.mainElement.select();
}
In version 4.0.0 they updated this function and it causes this TypeError: this.mainElement.select is not a function when you focus cell which is using this editor.
Any idea how to fix it please?

I am currently not really working on this, but I do accept PRs if you find time to figure this out!

So only problem is that part of code I sent already, when I delete body of it then it doesnt throw error no more but still dont know how to prevent it, because deleting it would be only temporary.

SOLVED! Here is new solution.
ChosenEditor.prototype.createElements = function () {
this.$body = $(document.body);
      this.TEXTAREA = document.createElement('textarea');
      let select = document.createElement('select');
      this.TEXTAREA.appendChild(select);
      //this.TEXTAREA.setAttribute('type', 'text');
      this.$textarea = $(this.TEXTAREA.children[0]);

      Handsontable.dom.addClass(this.TEXTAREA.children[0], 'handsontableInput');

      this.textareaStyle = this.TEXTAREA.children[0].style;
      this.textareaStyle.width = 0;
      this.textareaStyle.height = 0;

      this.TEXTAREA_PARENT = document.createElement('DIV');
      Handsontable.dom.addClass(this.TEXTAREA_PARENT, 'handsontableInputHolder');

      this.textareaParentStyle = this.TEXTAREA_PARENT.style;
      this.textareaParentStyle.top = 0;
      this.textareaParentStyle.left = 0;
      this.textareaParentStyle.display = 'none';
      this.textareaParentStyle.width = "200px";

      this.TEXTAREA_PARENT.appendChild(this.TEXTAREA.children[0]);

      this.instance.rootElement.appendChild(this.TEXTAREA_PARENT);

      var that = this;
      this.instance._registerTimeout(setTimeout(function () {
          that.refreshDimensions();
      }, 0));
  };

@element150 Thanks a lot! You made my day. Could you please add answer to handsontable issue too? I almost miss this solution if i don't open this repo issues =(


Add a hot key to enable and disable

Sometimes you really WANT to change the case but this extension keeps the old case. A hot key to quickly flip this off for a second and change Upper Case to UPPER CASE and then turn it back on again would be ideal.

Hi.
I agree with "Sometimes you really WANT to change the case".
However, I think there is a solution other than Add a hot key to enable and disable.
For example, cancel "preserves selection case" after entering.
example:
hoge
Hoge
HOGE

Enter as usual.
foo
FOO
Foo

Enter any hotkey here.
foo
foo
foo

"preserves selection case" is canceled.

Either way, there is certainly a situation where "Sometimes you really WANT to change the case".
I agree with your opinion.
thank you.

I'd prefer the toggle key for my use cases as I usually know what I prefer for the default behaviour I want (preserve case) and the exception behaviour (change case).
With a toggle key I can meet these needs and someone with the opposite expectations can also have their needs met.
After the edit modifications may be just as simple but I assume it would be considerably more effort and have more edge cases to cause potential errors. I'd prefer the simple implementation over the more complex.
If I select the various "hoge" texts and type "foo" my intent is unclear if I want to force a case  change. The extension would have to store all the changes made separate from undo history in case I decide to change case after the edit.
If I select the various "hoge" texts and invoke the set lower case command and then type "foo" my intent is clear that I intend a case change by separation of the case change from the content change.
Adding the toggle would give me the opportunity to indicate clearly intent to want the case change. It is also is online with the search and replace behaviour in code to paste and preserve case.


Ecto Database Constraint Example is completely wrong

The syntax should be more like this
defmodule BookSearch.Repo.Migrations.ValidateBirthDate do
  use Ecto.Migration

  def change do
    create constraint(:authors, :birth_date, check: "birth_date <= CURRENT_DATE")
  end
end

resolved in #941


Added   python3-osrf-pycommon-pip to python.yaml

Added   python3-osrf-pycommon-pip to python.yaml.

Please add the following dependency to the rosdep database.
Package name:
osrf-pycommon
Package Upstream Source:
pip
Purpose of using this:
Commonly needed Python modules, used by Python software developed at OSRF.
Checks

[x] All packages have a declared license in the package.xml
[x] This repository has a LICENSE file
[x] This package is expected to build on the submitted rosdistro

Yes thats correct. Thanks for the hint. I am closing this now.


How to decode an image picked from a photo library?

Using Xamarin.Essentials I let the user pick a photo and try to decode its bytes like so:
            var selectedPhoto = await MediaPicker.PickPhotoAsync(new MediaPickerOptions()
            {
                Title = "Pick a photo to decode",
            });

            if (selectedPhoto == null)
            {
                return;
            }

            using var photoStream = await selectedPhoto.OpenReadAsync();
            using var ms = new MemoryStream();
            await photoStream.CopyToAsync(ms);

            var photoBytes = ms.ToArray();

            BarcodeReader reader = new BarcodeReader();
            reader.Decode(photoBytes);

But I'm getting a null error when hitting the Decode line.
How would one implement the functionality I'm going for?

Hello @meJevin,
Did you find a way to decode from an image file ?

@SylvainMoingeon, yes.
My solution was the following:

I created an interface to decode an image given a file path
I implemented that interface on iOS and Android

I am now picking a photo and getting its FullPath, which I pass into my aforementioned service.
In iOS and Android implementations it's easy to get pixel data of images when you have a file path. So I just convert the pixel data from the selected photo into a LuminanceSource and decode it using a BarcodeReader

If this can help, here is iOS and Android implementation with latest version (3.1.0-beta2)
Maybe @meJevin has a better implementation to provide ?
On forms project :
var selectedPhoto = await Xamarin.Essentials.MediaPicker.PickPhotoAsync();
if (selectedPhoto == null)
 return;

string decodedText = DependencyService.Get<IZXingService>().Decode(selectedPhoto.FullPath);

IZXingService :
public interface IZXingService
{
    string Decode(string filePath);
}

On iOS :
public string Decode(string filePath)
{
	var reader = new UIImageBarcodeReader();
	var image = UIImage.FromFile(filePath);

	var result = reader.Decode(image);

	if (result != null)
	{
		return result.Text;
	}
	else
	{
		// handle as you want
	}
}

On Android :
public string Decode(string filePath)
{
    Bitmap bitmap = BitmapFactory.DecodeFile(filePath);
    byte[] rgbBytes = GetRgbBytes(bitmap);

    var bin = new HybridBinarizer(new RGBLuminanceSource(rgbBytes, bitmap.Width, bitmap.Height));
    var i = new BinaryBitmap(bin);
    var reader = new MultiFormatReader();
    var result = reader.decode(i);

    if (result != null)
    {
        return result.Text;
    }
    else
    {
        // handle as you want
    }
}

private static byte[] GetRgbBytes(Bitmap image)
{
    var rgbBytes = new List<byte>();
    for (int y = 0; y < image.Height; y++)
    {
        for (int x = 0; x < image.Width; x++)
        {
            var c = new Android.Graphics.Color(image.GetPixel(x, y));
            rgbBytes.AddRange(new[] { c.R, c.G, c.B });
        }
    }
    return rgbBytes.ToArray();
}

@SylvainMoingeon my solution is pretty much the same :)