[Docs]: Use old API Page until new API is launched

Type
Improvement idea
What do you want to report?
Older API: https://docs.semaphoreci.com/reference/api-v1alpha/
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Fixed on #207


Windows mingw artefacts are not published.

It seems like both build file and the deploy script contain them, so they are intended, but it does not work for some reason.

The publication on Windows and macOS conflicted then Bintray rejected one of the request.

I have uploaded mingw artifacts just now.


bot.abi_migration_branches should be str [ci skip]

Comes from https://github.com/conda-forge/conda-smithy/pull/1756#discussion_r1516567012
This will be a validation error in the future.

oh thnaks. yeah that makes sense, but i am goign to delete the branch from abi migration list!


:green_book: Fix Awkward Highlighted JSON

By claiming as JavaScript.
Before:

After:

Maybe you will like this?

.........How did I break the test..... :confused:

thanks! actually there are no tests! well, technically the tests are in verb and I haven't moved them here yet. On the todo list!


Square shaped Sign In/ Sign Up form with animation

Pull Request template
Please, go through these steps before you submit a PR.
Make sure you have done your changes in a separate branch. Branches MUST have descriptive names that start with either the fix/ or feature/ prefixes. Good examples are: fix/sign in-issue or feature/added-home button.
Describe your changes

Issue #243 and link
Fixes proposed in  issue

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my code
[x] Please ensure that there aren't other open Pull Requests for the same update/change/feature/bugs?
[x] The title  pull request is a short description of the proposed changes.

Screenshots

make pr in pacify repo

ok


lint Markdown files for intentionality

@jhheider this needs to be updated and its also needs to add a file to eslint/prettier ignore

@jhheider this needs to be updated and its also needs to add a file to eslint/prettier ignore

Your wish is my command.


feat: use Mermaid

Solve #213
About this PR:

Add remarkMermaid extension to transform mermaid  block to <pre>
Support render Mermaid in /feed and /writing page with dark & light modes.

Some Problem:

[x] Stump during rendering on writing page (in an acceptable level)

[ ] I haven't deploy it to production env yet.

[ ] When switch dark & light modes, the Mermaid render will raise Sytax Text Error, but after refreshing the page, the error disappers.

https://github.com/user-attachments/assets/c32d31a8-9c31-453f-93be-543c2eb6fc62

Is there anyone willing to test these in production env?


add description and dependents

This makes the list much easier to understand. Great work!
I just noticed that we don't order packages that depend on snazzy correctly -- they're at the bottom. Not your fault, but I noticed because you added the dependents count.

Also, we didn't have travis set up for this repo. Fixed!


OCPBUGS-18330: cancel button in the create policy form

There was no cancel button before

/cherry-pick release-4.14


Metadata scope client

Description
Added the cli client for adding and removing scopes.  Fixed various other issues along the way.
closes: #66

Codecov Report

Merging #82 (e84a640) into main (a094578) will increase coverage by 0.74%.
The diff coverage is 63.02%.

@@            Coverage Diff             @@
##             main      #82      +/-   ##
==========================================
+ Coverage   32.40%   33.15%   +0.74%
==========================================
  Files          87       87
  Lines        5536     5637     +101
==========================================
+ Hits         1794     1869      +75
- Misses       3500     3521      +21
- Partials      242      247       +5

Impacted Files
Coverage Δ

x/metadata/keeper/msg_server.go
1.13% <0.00%> (+0.01%)
:arrow_up:

x/metadata/keeper/scope.go
72.30% <0.00%> (-6.69%)
:arrow_down:

x/metadata/types/msg.go
12.09% <ø> (ø)

x/metadata/types/codec.go
50.00% <50.00%> (ø)

x/metadata/client/cli/query.go
64.81% <79.16%> (+11.48%)
:arrow_up:

x/metadata/client/cli/tx.go
74.32% <83.33%> (+74.32%)
:arrow_up:

Continue to review full report at Codecov.

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


Share the Weights

Hi,
Will it be possible to share the weights of this model over dropbox?

Hi @amartyacodes , sorry for late reply. I recently deleted my dropbox files then realized that I removed model weights too.


Blendshape scores and facial_transformation_matrixes in holistic model

MediaPipe Solution (you are using)
Python version 0.10.11
Programming language
Python
Are you willing to contribute it
None
Describe the feature and the current behaviour/state
I would like to ask you whether the updated holistic model includes blend shape scores and the facial_transformation_matrixes. If not, I would like to ask if you could include these metrics. Thanks a lot! Christian
Will this change the current API? How?
No response
Who will benefit with this feature?
No response
Please specify the use cases for this feature
Research
Any Other info
No response

Hi @ChristianNSchmitz,
If you refer to the HolisticLandmarkerResult API documentation, you will notice that Blendshape is listed as optional, and currently, Facial Transformation matrices are not included. However, we are actively working on updating the documentation, which will be released soon. Unfortunately, we are unable to provide an exact date at this time.
Thank you!!

Dear @kuaashish, thank you very much for your response! For our use case, we would like to project the face back to a normalised space in oder to make it comparable. Would you have a suggestion how to do that without the transformation matrix?

Hi @ChristianNSchmitz,
I apologize for the delayed response. Could you please confirm if this issue has been resolved on your end, or if you still require assistance from us?
Thank you!!

Dear @kuaashish ,
That is no problem at all, thanks for getting back to me!
Unfortunately, due to issue #5461 we've could use the holistic model for the last months. Thus, the issue is still unresolved and we might need some more assistance (but cannot test it currently).
Best
Chris

suggestion how to do that without the transformation matrix or to extract the transformation matrix somewhat differently?

Sorry to bother, I am solving a problem that might similar to yours. So would you please help?
I am using the basic mediapipe model. I currenty have NormalizedLandmark_A(which could be drawn on image once mulplied by image width and image height) and facial_transformation_matrixes_A (a 4x4 ndarray). I need to put this expression onto another reference image using its facial_transformation_matrixes_B. Is there any suggestion for me to do this? Thank you.

Hi @ChristianNSchmitz,
Currently, Facial Transformation matrices are not part of Holistic, as it only returns Blendshape scores. Additionally, there is no straightforward method to obtain Facial Transformation matrices at this time. However, we are marking this as a feature request to keep it on our radar. Depending on future demand, we may implement these matrices.
Thank you!!


Update Installation and Run notes

I've tried to setup the project following the Installation and Run notes, but the thing is, I've encountered some problems regarding ruby and gem parts.

problem with ruby on Linux and Mac devices
Please add at least simple notes how to install ruby and gem on the host operating system using rbenv. For Mac users, the problem is the system version of ruby. Installing dependencies via gem leads to the permission error. The recommendation would be to install rbenv using homebrew and install the particular version via rbenv CLI.

Following the installation steps, with the latest stable ruby version 2.5.1, running yarn pod-install will end up with the failure error. The downgrade to the 2.4.4 (the second stable) version needs to be done.

I can do the pull request, plz just let me know if this issue makes sense.

Hi Martin!
Currently, we support only Mac devices so no need to deal with Linux whatsoever. I honestly don't remember how I installed it but I am pretty sure I didn't use rbenv. Therefore I am not sure if it's a good idea. What about adding it to the Troubleshooting section?
Ad second point - do you know the error? Because I have the latest version and I am using it without bigger problems:
▲ ~ ruby --version
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]

But I agree that it's a lot of work to make this project work. How can we improve it instead of extending our README with even more steps? This may be a good inspiration: https://github.com/artsy/emission#installation
Did you manage to run it after all?

ping @SOULPWRD

Hi Martin :)
Sorry for the late response. I tried to simulate the issue with ruby version 2.5.1, but everything worked suddenly without any problems. 😞
Regarding rbenv, as I mentioned. I had the problem with ruby/gem permissions. When I installed ruby via rbenv the installation process ran smoothly. I agree with your proposal - Troubleshooting section could be a good place to mention this problem/issue.
I think extending the README won't solve the technical and installation issues. I would rather split the individual sections of the README into smaller thematic groups/files which would hold the link references on each other.
Regarding the structure of the installation notes you posted - it looks very clean and transparent. It could be a good inspiration to use it as a template for improving the current README of this project.
Yeah, the project runs without problems. Thank you, good job 👍 🥇

@SOULPWRD So are you suggesting to evolve the structure of our README? The initial idea was to start with single README and then move it into separated files in docs/ for example.

I can do the pull request, plz just let me know if this issue makes sense.

So we will be happy if you'll help us to improve it... :)

Yeah sure, I can help you with the docs. 👍 I will go through the whole documentation and propose the new structure (following the structure you mentioned). This could be a good starting point at least.


Ideally denom can become part of the config slash gotten from the chain registry so we never have to worry about it like this

Ideally denom can become part of the config slash gotten from the chain registry so we never have to worry about it like this
Originally posted by @ebuchman in https://github.com/informalsystems/multisig/pull/5#discussion_r853702594

we can leverage the chain registry but we'd need the config chain name to match the chain registry folder. For example, in the config we have
[[chains]]
name = "cosmos"

but the chain_name for this chain in the registry is cosmoshub
{
    "$schema": "../chain.schema.json",
    "chain_name": "cosmoshub",
    "chain_id": "cosmoshub-4",


Add Configure<TOption, TDep1, TDep2> sugar

For https://github.com/aspnet/Options/issues/236
Making sure the current pattern looks good before adding all of the rest boilderplate (will also add matching PostConfigure versions...
Basic idea will be to enable: (up to 5??)
These register a transient func that just uses GetRequiredService for each Dep, its up to the caller to add the deps themselves with whatever lifetime they want.
services.Configure<TOptions, Dep1, Dep2, Dep3, Dep4, Dep5>("namedOption", o,d1,d2,d3,d4,d5 => o.Something = d1.A + d2.B + d3.C + d4.D + d5.E)

@davidfowl @ajcvickers

Is there a reason you won't just add a metod taking Action<TOptions, IServiceProvider> that gets wrapped in an IConfigureOptions<TOptions> and registered in the container?

Is there a reason you won't just add a metod taking Action<TOptions, IServiceProvider> that gets wrapped in an IConfigureOptions and registered in the container?

We should just do both as part of this PR. May as well bring this back https://github.com/aspnet/Options/pull/152.

Updated PR adding Configure and PostConfigure methods taking 0 to 5 dependencies.  Also added OptionsBuilder<TOptions>  to potentially be the place to hang these overloads... so the builder binds to a specific named instance for chaining purposes.
Examples:
            var default = services.BuildOptions<FakeOptions>()
                   .Configure<SomeService>((o,s) => o.Message = s.Stuff);

            var named = services.BuildOptions<FakeOptions>("named")
                   .Configure<SomeService>((o, s) => o.Message = "named "+s.Stuff);

            // Future framework methods can also expose their options builders
            var xyzOptionsBuilder = services.AddXyz(o => o.Set = "Something")
                    .Configure(o, s => o.Other= s.Compute())

In terms of naming, we could go with services.AddOptions<TOptions> instead of Build since we currently don't use that overload

I do think that the OptionsBuilder is the right place to put all of these extensions. I would keep the original Configure<TOptions> on IServiceCollection, but only for back compatibility, but in theory they could just forward to this. The only ones that don't really fit in this builder are the ConfigureAll extension methods, as these apply to all, and not just to a named option.
BTW, as I mentioned in https://github.com/aspnet/Options/pull/238#discussion_r144434431, I'm not that fond of calling it Builder or use Build in the name (as I originally did), as it is not really building something isolated from IServiceCollection, but instead it's helping configure the collection**. I think OptionsConfigurator is a better name for the class, but haven't decided on the extension method. Maybe AddOptions<T> as you suggested is good. The ideal would be ConfigureOptions<T>, but that's already taken.
** what I mean it's not building in isolation, is that these 2 calls would effectively configure the same options one after the other, and not build 2 different instances of the options, of course:
services.BuildOptions<FakeOptions>().Configure(o => o.Message = "1");
// ...
services.BuildOptions<FakeOptions>().Configure(o => o.Message += "2");

Yeah AddOptions might work better since it behaves like the other AddXyz()'s today where if you call it twice the options manipulations are just run in order:
            var default = services.AddOptions<FakeOptions>()
                   .Configure<SomeService>((o,s) => o.Message = s.Stuff);

            var named = services.AddOptions<FakeOptions>("named")
                   .Configure<SomeService>((o, s) => o.Message = "named "+s.Stuff);

Cool, I'll update my OptionsBuilder PR with the new names:
OptionsBuilder => OptionsConfigurator
BuildOptions<TOptions> extension method => AddOptions<TOptions> extension method

I will also include the PostConfigure method that I left out for my initial PR.

We can leave the class name alone, we already have this pattern every where (MvcBuilder/IdentityBuilder/AuthenticationBuilder), all of them are basically adding sugar methods for manipulating the IServiceCollection

Hah, OK, I'll revert that commit then, I was about to push :)

This should be ready to review now for real, builds on top of the new OptionsBuilder we added via @jdom 's PR:

[Post]Configure<D1...D5> were added to IOptionsBuilder
Test added to ensure IServiceProvider works as a dependency as well

edc21af4166574ecd45d8f8dbd381dfec044f367


Condition

Add condition to fhir transformer

@baiju-grh,
Thanks for your contribution.
To ensure that the project team has proper rights to use your work, please complete the Contribution License Agreement at https://cla.microsoft.com.
It will cover your contributions to all Microsoft-managed open source projects.
Thanks,
Microsoft Pull Request Bot

@baiju-grh, thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request.
Thanks, Microsoft Pull Request Bot

@baiju-grh can you bring this up to date with master?


Can't use sr25519 Error: Member not found: 'sr25519'.

void main() async {
  final polkadart = Provider.fromUri(Uri.parse('wss://tfchain.dev.grid.tf/ws'));
  final keyring = Keyring();
  final mnemonic =
      "secret add bag cluster deposit beach illness letter crouch position rain arctic";
final seed = await SubstrateBip39.sr25519.seedFromUri(mnemonic);
  final address = KeyPair.fromSeed(Uint8List.fromList(seed)).address;
  print(address);
  await polkadart.disconnect();
}

I'm trying to load sr25519 according to this example https://github.com/leonardocustodio/polkadart/tree/main/packages/substrate_bip39 but getting the error :
bin/tfgrid_sdk_dart.dart:16:35: Error: Member not found: 'sr25519'.
final seed = await SubstrateBip39.sr25519.seedFromUri(mnemonic);

Hello, that example should not be there. We don't support sr25519 yet. There is no crypto lib for that algorithm in dart yet and we will have to build it. It will take a bit of time yet so we can support it.

I've changed the readme and deleted that part until we can support it.

Just in case someone finds this issue we now support sr25519.


Problems at quantizing

Hi, there.
I have finished the training part and doing quantizing. But it gives the ERROR TypeError: sequence item 1: expected str instance, NoneType found.
Tracing back here.
Model keys (state_dict): conv1.weight, bn1.weight, bn1.bias, bn1.running_mean, bn1.running_var, bn1.num_batches_tracked, conv2.weight, bn2.weight, bn2.bias, bn2.running_mean, bn2.running_var, bn2.num_batches_tracked, conv3.weight, fc.weight, fc.bias Traceback (most recent call last):   File "quantize.py", line 29, in <module>     main()   File "/home/vapor/code/AIoT/ai8x-synthesis/izer/quantize.py", line 297, in main     convert_checkpoint(args.input, args.output, args)   File "/home/vapor/code/AIoT/ai8x-synthesis/izer/quantize.py", line 158, in convert_checkpoint     bias_name = '.'.join([layer, operation, 'bias']) TypeError: sequence item 1: expected str instance, NoneType found
Bias exists but cannot be joined. Thanks a lot if anyone could help with this!

Hi,
We will gladly try to help you if you could provide us your checkpoint (qat_best.pth.tar) and model files?
I see that you have started a repo for this project. Perhaps you could upload the log directory containing the checkpoint files (best.pth.tar, qat_best.pth.tar) and the .log (day-time.log) file, and we can go from there.

Thanks for checking this! I have just pushed log files in the latest_log_dir in my repo, where I got trapped.

Unfortunately latest_log_dir only contains the shortcut. The checkpoints (*.pth.tar) and the log files are found in the actual log directory, which I don't see in the repo.
Nevertheless, I identified the source of your issue. Your custom models in your repo (such as ai85net-fpr) use torch.nn layers. However for deployment on the device, you would need to use the predefined modules, for the quantization and batchnorm weight fusing operations to work. You may access the full list of modules at ai8x.py.
For example, x = relu(self.bn1(self.conv1(x))) should be replaced by x = self.conv1bn(x) where self.conv1bn = ai8x.FusedConv2dBNReLU(1, 16, 3, stride=1, padding=1, bias=False, batchnorm='Affine').

Got it, perhaps because of not using ai8x functions and not obeying the bias rules of ai8x functions for quantizing. Thanks!


How do sedna conform if is hard sample in incremental_learning？

Sedna provide 3 general algorithms for hard sample mining in the common CV scenario.

more detail :  ('ThresholdFilter', 'CrossEntropyFilter', 'IBTFilter') -> https://support.huaweicloud.com/devg-hilens/hilens_05_0068.html

You can define new algorithms to support more scenarios as you need by follow here.


cmake: allow overriding GME_ZLIB and GME_UNRAR options by user

I am using vendored SDL_mixer in my project and I need zlib support in libgme to load compressed VGMs. Current SDL_mixer CMake config disables it and doesn't allow user to enable it.

Could you please merge it into SDL2 too?

Sure, see f66ffea0 (SDL2) and 33668fa3c2e78afe71493aea09ca1d24d4c3dcfe (2.8.x)


Add configuration

Still working in progress.

@baxang it looks like a very useful gem and PR, are you going to finish it? Adding a configuration would make it much easier to use, eg. mainly by limiting the range of symbols to ones that don't interfere with reading each other, e.g. removing 'l' (small L) or 'O' (large o) to avoid confusion with 1 and 0.


Changes to static functions

Hi There,
Was using this great script in a function and came looking to see if it had been updated - seems quite allot of changes. However the changes to static functions seem to break for my scenario.
I am a hobbyist / old-school php guy - so any guidance or pointers would be greatly appreciated - the old html2text.php file as a standalone effort as brilliant and worked very well.
I am getting the following errors:
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Tag time invalid in Entity, line: 307 in  /----->/src/Html2Text.php on line 40
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: ID makeComment already defined in Entity, line: 391 in  /----->/src/Html2Text.php on line 40
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Tag section invalid in Entity, line: 560 in /----->/src/Html2Text.php on line 40
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Tag header invalid in Entity, line: 560 in /----->/src/Html2Text.php on line 40
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Tag article invalid in Entity, line: 563 in /----->/src/Html2Text.php on line 40
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Tag article invalid in Entity, line: 576 in /----->/src/Html2Text.php on line 40 on line 40
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Tag article invalid in Entity, line: 589 in /----->/src/Html2Text.php on line 40
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Tag article invalid in Entity, line: 601 in /----->/src/Html2Text.php on line 40
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Tag article invalid in Entity, line: 613 in /----->/src/Html2Text.php on line 40

It sounds like it's loading a different DTD (XHTML instead of HTML5 or something) or encoding. Could you post the HTML file you're trying to translate? Perhaps you can try minimise the HTML file to the smallest file that creates these errors?

Thanks for the prompt response - The HTML was from this article: http://www.smh.com.au/digital-life/computers/gadgets-on-the-go/getflix-offers-the-best-of-both-worlds-20150406-1mf3aa.html
What I did encoding wise - and what I did before putting that article into HTML2TEXT - I'll shed light on momentarily for you.

Very sorry for delay in providing proper issue details to you.
I am running the following:
$article_URL = (example provided above) http://www.smh.com.au/digital-life/computers/gadgets-on-the-go/getflix-offers-the-best-of-both-worlds-20150406-1mf3aa.html
$webpage_html_object = new DOMDocument();
$webpage_html_object->loadHTMLFile($article_URL);
$body = $webpage_html_object->getElementsByTagName('body');
if ( $body && 0<$body->length ) {
$body = $body->item(0);
$webpage_body_html_string = $webpage_html_object->savehtml();
}
Then:
$as_plaintext = convert_html_to_text($webpage_body_html_string);
At one time I used, but have since commented out this line in preference of the above:
$webpage_body_html_string = $webpage_html_object->savehtml($body);

It looks like the HTML is invalid, so similar to issue #10. Maybe we can look at adding an option to ignore invalid HTML warnings...
What happens if you parse the HTML directly?
$as_plaintext = convert_html_to_text(file_get_contents("http://www.smh.com.au/digital-life/computers/gadgets-on-the-go/getflix-offers-the-best-of-both-worlds-20150406-1mf3aa.html"));

okay trying that returns more issues:
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ';' in Entity, line: 151 in /home/content/20/10935220/html/engineroom/assets/src/Html2Text.php on line 40
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ';' in Entity, line: 154 in /home/content/20/10935220/html/engineroom/assets/src/Html2Text.php on line 40
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ';' in Entity, line: 157 in /home/content/20/10935220/html/engineroom/assets/src/Html2Text.php on line 40
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ';' in Entity, line: 160 in /home/content/20/10935220/html/engineroom/assets/src/Html2Text.php on line 40
Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ';' in Entity, line: 166 in /home/content/20/10935220/html/engineroom/assets/src/Html2Text.php on line 40

If you have invalid HTML I recommend running it through Tidy first.


list_units function is private

Hi, thanks for making this library! I think it's really useful to have a simple Rust library for working with systemd.
I tried following the "Service enumeration" example in the README, but it fails because list_units() is not public:
error[E0603]: function `list_units` is private
  --> src/main.rs:6:28
   |
6  |     let units = systemctl::list_units(None, None);
   |                            ^^^^^^^^^^ private function

hello @rgwood
sorry for the delayed response.
Indeed, I ran into the same "problem", I just pushed a new release.

Hello, it's still private, the source code says the same. https://github.com/gwbres/systemctl/blob/main/src/lib.rs#L96

Hello @beckend
indeed, probably made a mistake here, I just fixed that


Update README.md - fix grammatrical errors in README.

I have noticed some grammatical mistakes in README inside section "Global Security Database (GSD)"
"Due to these problems we"  should be "Due to these problems, we"
" create their own bespoke"  should be " create its own bespoke"
Screenshot-

Please review my PR.

Is this for hacktoberfest?

No.

for hacksquad .


Update README.md

added comment with cabal required version based on limited testing. As in <IP_ADDRESS> didnt work but <IP_ADDRESS> did.

Thanks, I mentioned it somewhere else as well; never hurts to be clear about this. A lot of distros still ship ancient Haskell packages.


feat(probe): Add probe for Fsso Infos

Hi,
This code adds support for probing Fsso status information.
This metric helps us to detect issue with fsso connectors. For example when "disconnected" state is not expected.
I have not added "ldap_server" and "active_server" because we do not need it at this time.
No need to sum up entries as the "name" should be unique per vdom.

:tada: This PR is included in version 1.13.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Improving Heuristic Speed Performance

After testing the performance of minimax with alpha beta pruning with the heuristics I determined it was still too slow to test. I was able to improve processing time a fair amount by replacing the matrix generation function in addition to swapping in numpy arrays where applicable. This should hopefully give us the ability to run more extensive tests.

Swapped chess.BLACK and chess.WHITE for variables to avoid the library calls.
Replaced the list datatypes where applicable with numpy arrays.
Rewrote the matrix from board class and verified output.
Resisted the temptation to make the boards 1s -1s and zeros to cut more time off of the for loops in the board conversion. Might be something to try later if we decide we need it, but I didn't want to make too many changes.

I've confirmed these changes work in both main and Cordets current branch.

Code was added to Nicoles PR

Code was added to Nicoles PR.


IOS 17 slide stuck bug report,and how to fix it

Check that this is really a bug

[X] I confirm

Reproduction link
https://swiperjs.com
Bug description
Hello, the following line of code will cause the Safari sliding in iOS 17 to become stuck or even unable to slide: “.swiper-ios .swiper-slide” [swiper-bundle.css], comment out this line of code and everything will work fine
Expected Behavior
work fine
Actual Behavior
slide stuck
Swiper version
after 10.0.0
Platform/Target and Browser Versions
ios 17 safari
Validations

[X] Follow our Code of Conduct
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
[X] Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

[ ] I'm willing to open a PR

Your issue is closed because it is not filled correctly. Before you open an issue please review the contributing guideline.
Please fill the issue template correctly and:

Clearly describe the issue including steps to reproduce when it is a bug.
Make sure you fill in the earliest version that you know has the issue.
Provide live link or JSFiddle/Codepen or website with isssue

It will save a lot of time for other contributors to check your issue and fix it.


update duty cycling code

I removed messages when duty cycling is disabled.

@scottleibrand Do you have additional concerns with the code?


docs: use more-clear --add-controller parameter

This PR is separated into three commits:

Demonstrate adding the black hole as a canister using the dfx canister update-settings --add-controller parameter, available in dfx 0.9.2, rather than through multiple occurrences of the --controller parameter.
Describe how to set the black hole as the only canister.  This part intentionally does not include a command that will remove your own access to your own canister just by copy/paste/run.
Fixes a broken link to the dfx developer's guide

The reason for (1) is that the  meaning--controller parameter is unclear, and we have received complaints about this.  We renamed the --controller parameter to --set-controller in dfx 0.12.0 to address this.  The --add-controller parameter has been available since dfx 0.9.2.
The reason for (2) is that in version of the README that this PR changes, it's pretty obvious (assuming you know what --controller means) how to make the black hole the only controller: only pass --controller <black hole>.  Since it's perhaps less obvious how to get there from --add-controller, and the answer differs by version, this part spells it out.
Depending on the intent of this documentation, some combination of the changes in (1) and (2) might be right, or something else.

Thanks!


Argument passed to when() is not a mock

Hi @rbygrave,
when I execute this:
        BootContext bootContext = new BootContext();
        bootContext.withSpy(EmailService.class);
        beanContext = bootContext.load();

        EmailService emailService = beanContext.getBean(EmailService.class);

        System.out.println(emailService.getClass());
	// output--> class de.yaskor.autocontract.service.EmailService

        doNothing().when(emailService).sendEmail(anyString(), anyString(), anyString());

following exception is thrown:
	Argument passed to when() is not a mock!
	Example of correct stubbing:
	doThrow(new RuntimeException()).when(mock).someMethod();

this here works fine:
	BootContext bootContext = new BootContext();
        bootContext.withMock(EmailService.class);
        beanContext = bootContext.load();

        EmailService emailService = beanContext.getBean(EmailService.class);

        System.out.println(emailService.getClass());
	// output--> class de.yaskor.autocontract.service.EmailService$$EnhancerByMockitoWithCGLIB$$72a6db8a

        doNothing().when(emailService).sendEmail(anyString(), anyString(), anyString());

Please have a look at the sout's. The "withSpy" method doesn't replace the bean with the a spy, the "withMock" method works fine.

Can you clone the repo and run the dinject spy tests and compare? ...

These tests here - https://github.com/dinject/dinject/blob/master/src/test/java/org/example/coffee/BootContext_mockitoSpyTest.java

They pass all
Running org.example.coffee.BootContext_mockitoSpyTest
10:30:23.899 [main] DEBUG io.dinject.BootContext - building context with modules [org.example.coffee]
10:30:24.423 [main] DEBUG io.dinject.core.DBuilder - perform field injection in context:org.example.coffee
10:30:24.424 [main] DEBUG io.dinject.core.DBeanContext - firing postConstruct on beans in context:org.example.coffee
firing up the grinding machine !!!
amush:amush bmush:Bmush
making it ...
grinder:mush mush beans
Done
10:30:24.436 [main] DEBUG io.dinject.core.DBeanContext - firing preDestroy on beans in context:org.example.coffee
Chucking the toys
10:30:24.437 [main] DEBUG io.dinject.BootContext - building context with modules [org.example.coffee]
10:30:24.438 [main] DEBUG io.dinject.core.DBuilder - perform field injection in context:org.example.coffee
10:30:24.438 [main] DEBUG io.dinject.core.DBeanContext - firing postConstruct on beans in context:org.example.coffee
firing up the grinding machine !!!
amush:amush bmush:Bmush
making it ...
grinder:mush mush beans
pumping steam, lots of  Steam
Done
10:30:24.492 [main] DEBUG io.dinject.core.DBeanContext - firing preDestroy on beans in context:org.example.coffee
Chucking the toys
10:30:24.493 [main] DEBUG io.dinject.BootContext - building context with modules [org.example.coffee]
10:30:24.494 [main] DEBUG io.dinject.core.DBuilder - perform field injection in context:org.example.coffee
10:30:24.494 [main] DEBUG io.dinject.core.DBeanContext - firing postConstruct on beans in context:org.example.coffee
firing up the grinding machine !!!
amush:amush bmush:Bmush
making it ...
grinder:mush mush beans
pumping water ...
pumping steam, lots of  Steam
Done
10:30:24.496 [main] DEBUG io.dinject.core.DBeanContext - firing preDestroy on beans in context:org.example.coffee
Chucking the toys
10:30:24.498 [main] DEBUG io.dinject.BootContext - building context with modules [org.example.coffee]
10:30:24.532 [main] DEBUG io.dinject.core.DBuilder - perform field injection in context:org.example.coffee
10:30:24.532 [main] DEBUG io.dinject.core.DBeanContext - firing postConstruct on beans in context:org.example.coffee
making it ...
grinder:stub response
Done
10:30:24.533 [main] DEBUG io.dinject.core.DBeanContext - firing preDestroy on beans in context:org.example.coffee
Chucking the toys
10:30:24.534 [main] DEBUG io.dinject.BootContext - building context with modules [org.example.coffee]
10:30:24.535 [main] DEBUG io.dinject.core.DBuilder - perform field injection in context:org.example.coffee
10:30:24.535 [main] DEBUG io.dinject.core.DBeanContext - firing postConstruct on beans in context:org.example.coffee
making it ...
grinder:null
Done
10:30:24.536 [main] DEBUG io.dinject.core.DBeanContext - firing preDestroy on beans in context:org.example.coffee
Chucking the toys
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.794 sec

Results :

Tests run: 5, Failures: 0, Errors: 0, Skipped: 0

I modified one of the tests and added it into my project.
import de.yaskor.autocontract.service.EmailService;
import io.dinject.BeanContext;
import io.dinject.BootContext;
import org.junit.jupiter.api.Test;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.verify;

public class DinjectTest {

    @Test
    public void withMockitoSpy_postLoadSetup_expect_spyUsed() {

        try (BeanContext context = new BootContext()
                .withSpy(EmailService.class)
                .load()) {

            // setup after load()
            EmailService emailService = context.getBean(EmailService.class);
            doNothing().when(emailService).sendEmail(anyString(), anyString(), anyString());

            verify(emailService).sendEmail("a", "b", "c");
        }
    }
}

org.mockito.exceptions.misusing.NotAMockException:
Argument passed to when() is not a mock!
Example of correct stubbing:
    doThrow(new RuntimeException()).when(mock).someMethod();
	at de.yaskor.autocontract.test.service.DinjectTest.withMockitoSpy_postLoadSetup_expect_spyUsed(DinjectTest.java:26)

Right ... maybe it was @Primary or @Secondary ... I have some failing tests.  Creating new tickets for them.

See #25 and #26 ... fixes for use with @Primary, @Secondary ... and spy on concrete class (not interface)

@yaskor  Can you show me the source for EmailService ?

@rbygrave
I've found the problem, its tricky.
I'm using Lombok, if I add @Slf4j Annotation to the Singleton the Test fails.

I've made a test that demonstrates the problem:
https://github.com/yaskor/dinject/commit/7eea3d390c0fb0b98db27edbad6a90e172aa9383

Ah cool - ok looking ...

Reproduced, pushed a fix.  Looking to release as 1.7.


Add long description section for PyPI

ref: https://github.com/chainer/chainer/pull/5345

Thanks.


Threading strategy

This PR introduces ThreadingStrategy that allows one to switch implementations of fciqmc_step! and makes it easier to play with multiple implementations.
It doesn't add anything new, but it makes sure all implementations of fciqmc_step! work and are tested. There was also some minor polishing work done to the implementations - the default threading strategy is now type-stable and foreach is used in place of map in one of the strategies. This does not improve performance.
For reference, here are the timings for the various strategies computing a 10,20 Bose-Hubbard in momentum space with u=1, 1M walkers, 1000 steps, and 8 threads.

Overall coverage increased (+2.2%) to 85.414%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/strategies_and_params/threadingstrategy.jl
77
79
97.47%

Files with Coverage Reduction
New Missed Lines
%

src/lomc.jl
2
89.34%

Totals

Change from base Build<PHONE_NUMBER>:
2.2%

Covered Lines:
2922

Relevant Lines:
3421

💛  - Coveralls

It is indeed frustrating the MPI wins while including compilation time!


Testing and param

mandatory param check for all model is updated.
Testing for 3 main models are also done(I think this will be enough)

Seems all test passed


⚠ Bofrost.be has degraded performance

In 9d6abd2, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 5022 ms

Resolved: Bofrost.be performance has improved in ce058cb after 3 hours, 27 minutes.


Make :formula? the default on Linux

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same change?
[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[ ] Have you written new tests for your changes? Here's an example.
[ ] Have you successfully run brew style with your changes locally?
[ ] Have you successfully run brew typecheck with your changes locally?
[ ] Have you successfully run brew tests with your changes locally?

This is a follow up to https://github.com/Homebrew/brew/pull/13941.
This makes --formula the default whenever defined throughout the codebase on Linux. It also makes --cask illegal for all Linux users including those with HOMEBREW_DEVELOPER set.
The difference between this and the previous PR is that it doesn't leave any outs for developers and makes this change universal. Before it only applied when named args were resolved to formulae/casks.
The reason for doing it now is that it would make it easier to address https://github.com/Homebrew/brew/issues/14183 without adding os checks and would allow us to remove an os check in the install cmd. It also allows us to handle this entirely inside the parser which makes more sense logically.
The potential problems with this approach are that it forces all Linux users into using --formula everywhere. This will affect the results of brew info, brew search and a few developer commands. Seeing as how nobody has complained about the previous change that was merged in 2 months ago I don't expect this to be a problem but it's something to keep in mind.

Review period will end on 2022-12-06 at 03:44:23 UTC.

Only concern is if brew info --cask works currently on Linux and if this breaks things?

Yeah, this makes it act like brew info --formula all the time but passing --cask has caused an error unless HOMEBREW_DEVELOPER is set since the last PR that go merged in two months ago. It is a bit more restrictive though because it never includes casks anymore in the results.

Similarly, if formulae.brew.sh generation relies on this working on Linux.

This shouldn't be a problem since it doesn't use the parser directly. That's one of the advantages of putting all the logic in the parser itself: it shouldn't affect scripts that call cask classes directly. We're just talking about the scripts in this folder, right?

We're just talking about the scripts in this folder, right?

Yup!
Ok, fine with me to 🚢.


working changed File Folder Structure Migrate to Next.js 13 #659

working changed File Folder Structure.. Migrate to Next.js 13 #659

LGTM But the branch has too much and complex conflicts.

I also see it.. I don't know how can I fix it because my resolve conflict option is to disable it..@s2sharpit

The branch seems to have numerous and intricate conflicts that need to be resolved. To address this effectively, let's adopt an incremental approach rather than migrating the entire codebase at once. Instead, we'll create a completely new codebase or project and add parts of the codebase, or the code for each page, one by one as individual steps. This method allows us to better manage conflicts, review changes more efficiently, and ensure a smoother transition. As a first step, Let me create the starting files required for Next.js and tailwindcss on the new branch. As we progress, I kindly request you to create a pull request after completing each step or when a page is fully developed. This way, we can maintain an organized workflow, provide focused feedback, and keep track of the changes more effectively. Let's break it down into manageable parts and create pull requests accordingly. Thank you for your understanding and collaboration!

Actually, that's a great idea but now the merge conflict is resolved...


Taskify : Fix the Search bar of the Dashboard

Fix the search bar of the dashboard page.
Make it fixed on the top position.
Replace the images of the search bar with font awesome icons.
Use the above picture for design reference.

I would like to work on this issue

Assigned to you @Villain45. Best of luck.


In Monorepo with multiple remix projects $path is typed for the last built project

Not sure if this is something you want to put the work into fixing - But we have a monorepo with 2 remix projects, both using remix-routes.
We noticed that the routes on $path reflect the last built project, not matter which project it has been called from. I think it's because the types are generated at the root level. I'll try and get a repo ready after work

I think it's a bug, I didn't take into account having more than one remix project in a monorepo.

Can not find a solution to fix this issue. It seems prisma client has the same issue.

Cheers! It's easily enough worked around at any rate. We just have to run a new build command when switching what project we are working on


p-value of 2.0 and an extra print in linear_regression_estimator

The placebo_treatment_refuter is returning a p-value of 2.0
I believe this is a special case scenario in which the estimate_index is either 0 or equal to the length of the simulations list (lines 186-199 in file dowhy/causal_refuters).
I have scenarios which fall into the else: portion, and give a p-value of 1.0 at line 197 p_value = estimate_index / num_simulations and therefore give a final p-value of 2.0
While using the linear_regression estimator, there is unnecessary printing of arguments due to a print statement (line number 26 in file dowhy/causal_estimators/linear_regression_estimator.py)
25    args_dict.update(kwargs)
26    print(args_dict)
27    super().__init__(*args, **args_dict)

Just mentioning in case it hadn't been noticed.

Hi, thanks for noticing. Regarding the p-value issue. Might it be possible that in your case your list of simulations is (almost) constant. By which I mean, it mostly consists of the same value. And perhaps your estimate is equal to that value too? That's the only scenario now I can image this happening.

On the second topic, there are indeed a few locations where a print is used in the library. I wouldn't mind making one PR changing all of them to logging statements. @amit-sharma what do you think?

That's a good idea @MichaelMarien . Feel free to start a PR on the print statements.
On the p-values, @Jorawar-Singh can you share a minimum working example to bring up the erroneous p-values you are seeing?

Here is the example for the p-value (using a subset [100 values] of the actual dataset):
import dowhy
import pandas as pd

A = [0.002587257,0.002612952,0.002636191,0.00265691,0.002675054,0.002690434,0.002702643,0.002711036,0.002714773,0.002712926,0.002704614,0.002689171,0.002666316,0.00263632,0.002600138,0.002559498,0.002516906,0.002475529,0.002438914,0.002410544,0.00239328,0.002388822,0.002397363,0.002417587,0.002446988,0.002482412,0.002520619,0.002558733,0.002594505,0.002626406,0.002653584,0.002675733,0.002692922,0.002705413,0.00271349,0.002717328,0.002716918,0.00271204,0.002702309,0.002687274,0.002666556,0.002640024,0.002607972,0.002571288,0.002531571,0.002491172,0.002453096,0.002420731,0.002397402,0.002385793,0.002387392,0.002402151,0.002428476,0.002463576,0.002504006,0.002546244,0.002587144,0.002624216,0.00265574,0.002680745,0.002698915,0.002710437,0.002715833,0.002715791,0.00271101,0.002702075,0.002689383,0.002673126,0.00265333,0.002629962,0.002603077,0.002572995,0.002540469,0.002506822,0.002473996,0.002444474,0.002421036,0.002406361,0.002402528,0.002410553,0.002430106,0.002459527,0.002496115,0.002536597,0.002577615,0.002616136,0.002649713,0.002676624,0.002695889,0.002707221,0.002710919,0.002707734,0.002698714,0.002685042,0.002667886,0.002648268,0.00262698,0.002604563,0.002581344]
B = [0.9833098,0.983301,0.983297,0.9832983,0.9833045,0.9833159,0.9833324,0.9833541,0.9833806,0.9834126,0.9834494,0.9834914,0.9835384,0.9835906,0.9836476,0.9837098,0.9837771,0.9838491,0.9839263,0.9840083,0.9840953,0.9841869,0.9842835,0.984385,0.9844911,0.9846018,0.9847172,0.9848373,0.984962,0.9850912,0.985225,0.9853632,0.9855058,0.9856527,0.9858041,0.9859597,0.9861195,0.9862837,0.9864517,0.9866241,0.9868004,0.9869809,0.9871652,0.9873533,0.9875454,0.9877412,0.9879406,0.9881439,0.9883506,0.9885609,0.9887745,0.9889913,0.9892117,0.9894352,0.9896619,0.9898914,0.990124,0.9903595,0.9905978,0.990839,0.9910827,0.9913291,0.9915781,0.9918293,0.9920831,0.9923392,0.9925975,0.9928579,0.9931204,0.993385,0.9936513,0.9939198,0.9941899,0.9944617,0.9947352,0.9950101,0.9952865,0.9955642,0.9958431,0.9961233,0.9964046,0.9966869,0.9969699,0.9972539,0.9975385,0.9978237,0.9981096,0.9983957,0.9986824,0.9989694,0.9992566,0.9995437,0.999831,1.0001183,1.0004053,1.0006922,1.0009789,1.0012652,1.0015508]
C = [5.6,5.6,5.6,5.6,5.9,5.9,5.9,5.9,5.9,5.6,5.6,5.6,5.6,5.2,5.6,5.6,5.9,6.2,6.2,6.6,6.6,6.6,6.6,6.2,6.2,5.9,5.9,5.6,5.2,5.2,5.2,5.2,5.6,5.6,5.9,5.9,5.9,5.9,5.6,5.6,5.6,5.6,5.6,5.6,5.6,5.9,6.2,6.2,6.6,6.6,6.6,6.6,6.6,6.2,5.9,5.9,5.6,5.2,5.2,5.2,5.2,5.2,5.6,5.6,5.9,5.9,5.9,5.6,5.6,5.6,5.6,5.6,5.6,5.6,5.9,6.2,6.2,6.2,6.6,6.6,6.6,6.6,6.2,5.9,5.6,5.6,5.2,4.9,4.9,5.2,5.2,5.6,5.6,5.6,5.6,5.9,5.9,5.9,5.9]
dataset = pd.DataFrame(list(zip(A,B,C)),columns=['A','B','C'])

causal_graph = """digraph {
A;
B;
C;
A->B->C;
A->C;
}"""
model= dowhy.CausalModel(data = dataset, graph=causal_graph.replace("\n", " "),treatment='B',outcome='C')

identified_estimand = model.identify_effect(proceed_when_unidentifiable=True)
estimate = model.estimate_effect(identified_estimand, method_name="backdoor.linear_regression", target_units="ate")

refute2_results=model.refute_estimate(identified_estimand, estimate, method_name="placebo_treatment_refuter")
print(refute2_results)

On my system, I get a p-value of 2.0 with these library and python versions:
dowhy - 0.8+24.geba2c1cc.dirty
pandas - 1.3.2
python - 3.9.6

I'm closing this issue as the original question/comment seems to be addressed. Please re-open if not. Or feel free to open a new issue if this should actually be an enhancement.


fix error with utils.math.dot

fix dot product errors as demonstrated here: https://github.com/creme-ml/creme/issues/127

Hey @Adam-Hoelscher, I left a comment :)

I fixed this myself as @Adam-Hoelscher didn't answer.


Feature request: Add a basic scaffold

Hi!
The Generators chapter is good enough. I believe that a basic but fully operational and reliable scaffold (scaffold-basic) should be added;
NO!

webpack
building
linting
testing
demoing
automating

ONLY

frontend setup (100% reliable!!! install-and-display!) (just mention which web browsers are supported)

upgrade generators and  sub generators are very good tools! I think that a polyfills generator is also required.
Hence, in a hierarchical point of view, the following *-generators exist:

basic
polyfills (just mention which extra web browsers are supported)
linting-*
testing-*
building-*
automating-*
etc

Tia
PS: I know that at https://open-wc.org/developing/#lit-html a basic start-up is given but for some reasons no-simple components are not rendered! It is not install-and-display. (This subjects to change when the problem of rendering will be clarified and/or fixed.)

The repo for those demo's was initially made to make collaboration on them easier since stackblitz doesn't allow collaboration on demo's yet, and were specifically made for usage on Stackblitz. (eg: the import to index.js in the index.html was missing, because stackblitz doesn't need it).
I do agree however that the demos should be able to run without stackblitz. I do know that Stackblitz is implementing a lit-html setup that doesn't do any webpack magic, so when that time comes I'll refactor things to work like that.
As for a minimal setup, if you want the most basic experience, you can follow these instructions:
mkdir my-app
cd my-app
npm init
# click through and enter name etc

npm i -D owc-dev-server
npm i -S lit-html lit-element

touch index.html
touch index.js

To your scripts in package.json, add: "start": "owc-dev-server"
index.html:

		<title>My App</title>

	<my-app></my-app>

index.js:
import { LitElement, html, css } from 'lit-element';

class MyApp extends LitElement {
	render() {
		return html`

Hello world!

		`;
	}
}

customElements.define('my-app', MyApp);

@thepassle Great! Now all components work! The difference between your writing and the web site instructions is as follow:
Your instructions:
npm i -D owc-dev-server
npm i -S lit-html lit-element

Web site instructions:
npm i -D owc-dev-server lit-element
Does this difference play any role to render failure?
Thanks a lot!

There is now a Barebone App in
npm init open-wc

PS: documentation still needs to be updated 🙈 any volunteers 😬

I'll do some work on the docs this weekend


RFC: CLI Changes

The current CLI is getting a little complex, as it has grown organically with implemented features, and could afford some "TLC" to make Topiary easier/more streamlined to invoke. As of writing, we have the following usage:
Usage: topiary [OPTIONS] <--language <LANGUAGE>|--input-files [<INPUT_FILES>...]>

Options:
  -l, --language <LANGUAGE>             Which language to parse and format [possible values: json, nickel, ocaml, ocaml-interface, toml]
  -f, --input-files [<INPUT_FILES>...]  Path to an input file or multiple input files. If omitted, or equal to "-", read from standard input. If multiple files are provided, `in_place` is assumed [default: -]
  -q, --query <QUERY>                   Which query file to use
  -o, --output-file <OUTPUT_FILE>       Path to an output file. If omitted, or equal to "-", write to standard output
  -i, --in-place                        Format the input files in place
  -v, --visualise[=<OUTPUT_FORMAT>]     Visualise the syntax tree, rather than format [possible values: json, dot]
  -s, --skip-idempotence                Do not check that formatting twice gives the same output
      --output-configuration            Output the full configuration to stderr before continuing
  -t, --tolerate-parsing-errors         Format as much as possible even if some of the input causes parsing errors
  -h, --help                            Print help
  -V, --version                         Print version

Here we see:

At least two modes of operation (formatting and visualisation), with [arguably] a handful of pseudo-modes (version, help and configuration output).
The --language argument is a legacy from when Topiary didn't support language detection or multiple files. It still makes sense for formatting stdin, but perhaps shouldn't feature so prominently.
In the past, the distinction was between --language, --query and --input-file, where an implicit prioritisation was in place. --query no longer features in this ordering -- it has been demoted, much like --language probably should be (see previous point) -- which, all the same, remains undocumented outside of the sourcecode.
 There is also scope for filtering (see #561).
It's not clear what happens if you try to visualise multiple input files from this documentation, alone.

I propose the following:

Modes can be separated using subcommands, as is the style of the time. I don't think I'm going out on a limb to say that "formatting" is going to be the predominant mode; therefore, this can be the default if no subcommand is issued.
Topiary's default resource to act upon will be files -- plural -- which are updated in place. As such, these should be positional arguments, rather than specified through a flag. stdin-to-stdout is a special case, that can be assumed in the absence of any file arguments and the appropriate --language/--query argument. (For the niche case of non-in-place formatting, we'd just fallback to the stdin-to-stdout case and expect the user to employ IO redirection.)
Options can be grouped into two camps: global options and subcommand-specific options.

As such, we have (approximately) the following general form:
topiary [GLOBAL OPTIONS] [SUBCOMMAND] [SUBCOMMAND OPTIONS] [FILE...]

:warning: Contingent upon what can be achieved with Clap (or similar).
:question: Should --language and --query be specifiable as a fallback, should language detection fail? My understanding is that the configuration file should preclude this problem, as that specifies the extension-to-language mapping; thus (AFAIK) language detection should be infallible.
Global Options

--tolerate-parsing-errors is the only global option that currently makes sense.

:bulb: There's no need for the global options to appear strictly before the subcommand, etc.
Formatting: fmt
This is the default subcommand, as such it can be omitted:
topiary \
  [GLOBAL OPTIONS] \
  [fmt] \
  [ --skip-idempotence ] \
  ( --language LANGUAGE | --query QUERY | FILE... )

Examples:
$ topiary *.ncl
$ find . -type f -name "*.ml" -exec topiary fmt --skip-idempotence {} \+
$ topiary --language bash </path/to/some.sh >/path/to/formatted.sh

:bulb: File type filtering arguments could be implemented here, for example:
$ topiary --exclude "*.sh" **/*

:question: Could --language be overloaded in the FILE... case to act as a filter, or is this too magical?
Visualisation: vis
topiary \
  [GLOBAL OPTIONS] \
  vis \
  [ --format FORMAT ] \
  ( --language LANGUAGE | --query QUERY | FILE )

--format maps to the current --visualise, with DOT made the default (rather than JSON).
Only a single input can be formatted, which can be specified as a FILE, or via stdin (using the same rules as fmt).
The output is always written to stdout.

Example:
$ topiary vis output.json | dot -Tpdf > output.pdf

Configuration: cfg
:bulb: Current global options don't make sense here. A global option to specify a different configuration source would change that, for example.
topiary [GLOBAL OPTIONS] cfg

Output the current configuration to stdout (analogous to the current --output-configuration).
Version: version
:bulb: Global options don't make sense here.
topiary version

Output the Topiary version to stdout.
Help
Every subcommand and the bare invocation will have a --help. (Note that, on the bare invocation, topiary --help should show top-level help, rather than the help for the fmt subcommand.)
Subcommand Aliases

Subcommand
Aliases

fmt
∅, format

vis
visualise, visualize

cfg
config

(n.b., I've omitted short-options for brevity/clarity; they'd also be included.)


Couldn't cabal-install Reanimate library (2 errors when compiling Reanimate.Svg.Unuse)

Hello, I'm newbie. I couldn't cabal-install Reanimate library: https://prnt.sc/pxyqrs - got two errors when compiling Reanimate.Svg.Unuse.
Is it fixable? If yes, how and what did I do wrong?
Thanks in advance.

Oops, my bad. It should be fixed now. It shouldn't happen again but if it does, you can use 'stack' to make everything magically work.

Thank you!


Add seeds for all schemas

closes #13
Set up seeds for all schemas: Category, Lesson, Review, Tutorial, User. Each schema has its own separate file with seed data in /server/seeds, then everything is processed to actually seed the DB in /server/seeds/seed.js. Each tutorial has 2 categories, 2 reviews, and 4 lessons.

The files themselves look good to me. When I pulled the branch I was able to run the seeds, but I don't think I can test any queries to them without their typeDefs


Not operational with Ubuntu 16.04 with FireFox 57

When icon clicked, no window or tab opens.

Fixed and coming in 1.3.1 version


Move from xUnit to MsTest

xUnit was just doing my head in. Visual studio support is just not working as it should in combination with test discovery.
I've attempted to move the test projects from xUnit to MsTest refactoring all tests to the new framework.
I hope with this we can speed things up a bit. The changes aren't world changing but we should run into less issues by using their own framework.
I've dropped the program.cs files in the test projects they are no longer needed anymore.
I've also updated the test guidelines documentation.
Please rebuild the solution and run the tests to see they are passing. I've only tested it on windows so far and for me everything was green.
To run tests outside visual studio:
dotnet test in a project folder or dotnet test {path to csproj}.

I'll review it

Ah sounds much better I was also battling xunit a lot

Is the content of Stratis.Bitcoin.IntegrationTests/Program.cs not necessary anymore? @Neurosploit

I tried running the tests without it. They passed just fine.

Cool then :-)
I've run the tests on windows but WalletCanReorg fails, as was expected.
I'm going to try on Linux.

there are some spurious failures on Linux
for the unit tests:

for the integration tests, only WalletCanReorg fails.

I'm happy with the results, we can fix the linux tests later.
Thanks @Neurosploit !


esp32 max 1 meter reliable wifi range

This crate is awesome! I thought I'd try it out and it looks very promising. I wish I could dump esp-idf for this with embassy support but I'm having a wifi reliability issue.
esp-idf-hal/esp-idf-svc wifi works without issues with an AP 10 meters away. When I flash the dhcp example of this crate for esp32 on the exact same esp32 unit in the same location, it's almost impossible to get a connection to the AP 10 meters away. I just keep getting error Disconnected. I'm powering the esp32 from usb-c (built in ch340c usb serial chip).
If u use my phone as a hotspot and put the phone right next to the esp32 it does connect and work reliably.
I enabled wifi logs and it looks like that the problem might be related to transmissions never being received by the AP. When I move the phone more than 1m away I start getting lots of log lines about receiving and discarding duplicate packets. I'm thinking that esp32 is probably receiving lots of retransmissions because the AP (phone) is not receiving anything from the esp32. The same behavior is observed with my LAN AP and my phone as AP.  I tried changing wifi_country_t max_tx_power up and down (tested 0 and max legal values) but that seems to have no effect.
Did anyone else experience connectivity issues on esp32?
Any theories what might be causing this or what I could try?
Could it be a power supply issue in connection with a different power draw profile of this vs esp-idf that could make the supply unstable?

I have never experienced this but maybe a few questions

it's the original ESP32, the exact same board works fine with ESP-IDF?
which WiFi channels are the phone and the LAN AP using? If you can test it: does changing to another channel change anything for you?

It's the original esp32 chip, but the board is a cheap $5 one from ebay it's not an original devkit.
I tried channels 1, 6 and 12 and disabled all power saving measures on the router. Same result. esp-idf-svc wifi connects instantly and reliably even far away. This crate works reliably less than a meter away from the AP, any further and it is almost impossible to connect.

If the esp is more than 2m away from the AP, it can't authenticate. Every other time this happens:
INFO - auth timeout INFO - connect status %d -> %d INFO - stop beacon/connect timer INFO - reason: auth expire(%d)
And every other attempt this happens:
INFO - there is only one ap in blacklist now, release it! INFO - clear blacklist

It seems to be a power issue with my board. I borrowed an oscilloscope and measured the supply voltage and it varies a lot. Probably it gets lower while transmitting. Somehow when my board is connected with usb I have this issue but if I connect a stable power supply to +5v all issues go away.
It seems like the issue with varying voltage is less severe when running esp-idf OS somehow but I'm still closing this because it's very likely a hardware issue and all the boards I ordered have the same issue.

Thanks for the update on this!


fix for NUTCH-2027

@asitang did you forget to attach SeedResource?

Hi @asitang, just saw the code and I think the you will need to format the code according to http://svn.apache.org/viewvc/nutch/branches/2.x/eclipse-codeformat.xml


Resolves #1723 - added typings for store.observable method.

I went with the generic Observable and Observer names even though the interfaces are only partially implemented.  You might want more specific names like Subscribable and NextObserver or no names at all with the typings inline for that method.  Let me know.

cc @blesh — do you TypeScript by any chance?

I do. It looks fine except the Symbol.observable method itself. That's tricky because that static property didn't exist on Symbol in TypeScript yet. So you have to add it by defining it on Symbol, I believe.

@blesh - So is the typing for "Symbol.observable" something that the Redux repository should provide?  I would have thought that I would have found that typing extension in the symbol-observable repository but it seems that it only exports the basic symbol.  Let me know if I am understanding this correctly  $$observable ~= Symbol.observable?
I've walked through the symbol-observable, redux-observable and redux repositories trying to understand what it's for.  I also took the typescript example to see what typings it would produce from the code.  It seems that there isn't an explicit typing provided for symbol property access which is a little weird to me.  Do you have any insight?  Is it just not supported?
##file
"use strict";
const getClassNameSymbol = Symbol();

class C {
    [getClassNameSymbol](){
       return "C";
    }
}

let c = new C();
let className = c[getClassNameSymbol]();
console.log(className);

##typings
declare const getClassNameSymbol: symbol;
declare class C {
}
declare let c: C;
declare let className: any;

Honestly, it's probably not terribly important to every day use to provide type information for this right off. TypeScript's handling of interfaces with symbols in them is still pretty primitive

@gaearon - is it cleared?

@babeal I’m confused: how does it work without Symbol?

It's not nearly as pretty but I am able to still use the observable method instead of the subscribe method.  Since I am using RxJs, I can't just use the observable as is, so I still need to create one but it is cleaner than the subscribe function.  Also, I am assuming that the symbol is used for finding the property that exposes the observable, but even if it is missing from the typings, it could be added later.  I guess I read that from @blesh 's comment that,t wasn't important to type the symbol part for the time being but maybe he meant the whole thing.  I figured it would be helpful as the first step;  I'll let you guys decide :-).
Observable.create(observer => {
    store.observable(observer);
});

Let's have this more professionally vetted by TS typings experts...
I summon @mhegazy and @david-driscoll

@mhegazy and @david-driscoll... if you're just arriving, the biggest issue I see here is how to support TS typings for an interface like:
interface Subscription() {
  unsubscribe(): void
}

interface IObserver<T> {
  next(value: T): void;
  error(err: any): void;
  complete(value: any): void;
}

interface IObservable<T> {
  subscribe(observer: IObserver<T>): ISubscription
}

interface Observableable<T> {
  [Symbol.observable]() : IObservable<T>
}

The problem is that Symbol.observable isn't a thing in TS.

the biggest issue I see here is how to support TS typings for an interface like Observableable below:

The complete support for symbol-named properties on interfaces is not there yet. this is tracked by https://github.com/Microsoft/TypeScript/issues/5579.
The part that is supported is "well-known symbols". so if you make observable a well known one (just like you defined it above on the global Symbol object, and always access it on the global Symbol object), then you should be good.
for instance:

// Add the declaration on the global Symbol constructor
interface SymbolConstructor {
    readonly observable: symbol;
}

// Use it to define a property
interface Observableable<T> {
  [Symbol.observable]() : IObservable<T>
}

// Use it to access a property
var o: Observableable<string>;
o[Symbol.observable]().subscribe // works

but aliasing it, importing it, assigning to another value does not work:
import {observable} from "SymbolDefinitions";
o[observable]().subscribe // does not work

I think I was too excited to see an observable method on the store to realize that the observable method isn't exported as a function named observable.  The only way to access this method is through the Symbol.observable.  Some things aren't as easy as they seem.
I gave it a go, and the suggestions for declaring observable on the SymbolConstructor work when added to the global declaration.  But there isn't a way around the typescript-definition-tester that's executing against ES5.  So both the errors, "Cannot find name Symbol and Module augmentation cannot introduce new names in the top level scope. will prevent moving forward.  So, I'm not sure what you want to do here.  Nevertheless, what I really wanted was a true Rx5 observable for state, so I am just going to stick with my wrapper and move forward.  @gaearon if you want to hold off go ahead and close this.  The typings in the pull request aren't correct anyway.

Let’s revisit when there is first class support for this pattern in TS.


Consider replacing NEOWS with astroquery

Ref: https://github.com/astropy/astroquery/pull/1325#issuecomment-452765939
Documentation: https://astroquery.readthedocs.io/en/latest/jplsbdb/jplsbdb.html
If all the examples in the User Guide and the NEOS notebook work, with the SBDB interface, that would be great! Otherwise, there's a case for a certain degree of overlap and duplication in astroquery.

Started working on this, hope to be completed at the end of the day :smile:

This is the algorithm I came with:
def from_astroquery(body_name):
    """Returns Orbit instance after query."""

    # Request to get body
    body = SBDB.query(body_name)
    a = body['orbit']['elements']['a'].to(u.km) * u.km # Working
    ecc = float(body['orbit']['elements']['e']) * u.dimensionless_unscaled # Working
    inc = body['orbit']['elements']['i'].to(u.deg) * u.deg
    raan = body['orbit']['elements']['om'].to(u.deg) * u.deg
    argp = body['orbit']['elements']['w'].to(u.deg) * u.deg
    nu = body['orbit']['elements']['ma'].to(u.deg) * u.deg
    epoch = Time(body['orbit']['epoch'].to(u.d), format='jd')

    return Orbit.from_classical(Sun, a, ecc, inc, raan, argp, nu, epoch=epoch)

Those weird transformations are due to transformation from the default class for each classical value (astropy CompositeUnits) to astropy Quantity.
Should this replace the whole neos.neows module?

Notice that you can use u.one instead of u.dimensionless_unscaled... It's my child :) https://github.com/astropy/astropy/pull/1980
Those transformations are indeed weird, but nothing too serious. I wonder if SBDB.query receives some extra parameters we should allow in from_astroquery, but apart from that this looks good.
Also, are you sure that the plane of these orbits is the Earth Equator and not the Ecliptic?

I think it will be better if we name it from_sbdb ? (We already have from_horizons which is also from astroquery)

Good catch @shreyasbapat. Yes, from_sbdb is better, to avoid confusion.

I agree with you @shreyasbapat, thank you for the suggestion.
Since Astroquery makes the request to JPL database, in principle all orbits are given in the plane heliocentric ecliptic J2000.
I also compared neows and astroquery orbit results and they are the same. However, it is advisable to use the full_precision=True karg to achieve these results. Should be enough to add just **kargs in the function, right?

Should be enough to add just **kargs in the function, right?

Correct!

This has been addressed in #577. To close this issue definitely, I would like to know if there are cases where a SBDB query returns more than one possible orbit (for example Halley's comet) and what does the new Orbit.from_sbdb with it.

@Juanlu001 I think it does return more than one orbit.

@shreyasbapat proof? :)

>>> body1 = SBDB.query("Halley")
>>> body1
OrderedDict([('count', 2), ('signature', OrderedDict([('source', 'NASA/JPL Small-Body Database (SBDB) API'), ('version', '1.1')])), ('moreInfo', 'https://ssd-api.jpl.nasa.gov/doc/sbdb.html'), ('message', 'specified query matched more than one object'), ('code', '300'), ('list', OrderedDict([('pdes', ['2688', '1P']), ('name', ['2688 Halley (1982 HG1)', '1P/Halley'])]))])

What about the new Orbit.from_sbdb method in this particular case then?

It returns a Keyerror.
>>> a = Orbit.from_sbdb('Halley')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/shreyas/Local Forks/poliastro/src/poliastro/twobody/orbit.py", line 472, in from_sbdb
    a = obj["orbit"]["elements"]["a"].to(u.AU) * u.AU
KeyError: 'orbit'

This is because when there are multiple orbits in one search, we will have to do something of this kind. See Cell 5 in http://docs.poliastro.space/en/stable/examples/Using NEOS package.html

It returns a Keyerror.

That's what I suspected. As you say, we'll have to raise an error.

Should I make a PR?

Rather: let's open a new issue, explain what exactly has to be done, and if it's easy enough I'll tag it as "good first issue".

Rather: let's open a new issue, explain what exactly has to be done, and if it's easy enough I'll tag it as "good first issue".

Being further tracked in #609 . This is good to close.

Commented there. I will close this one when we get rid of NEOWS.

I think we have done everything here?

Yes! Closing! :tada:


mask2former_beit_adapter_large_896_80k_cocostuff164k.pth.tar is not a checkpoint file

I want to use these weights as a pretrained model for use with a smaller subset of cocostuff data.
When I change
pretrained = 'pretrained/beit_large_patch16_224_pt22k_ft22k.pth'
to
pretrained = 'pretrained/mask2former_beit_adapter_large_896_80k_cocostuff164k.pth.tar'
I get this error message.
How can I use your pretrained weights in a new model of the same structure with different data?

I want to use these weights as a pretrained model for use with a smaller subset of cocostuff data. When I change
pretrained = 'pretrained/beit_large_patch16_224_pt22k_ft22k.pth'
to
pretrained = 'pretrained/mask2former_beit_adapter_large_896_80k_cocostuff164k.pth.tar'
I get this error message. How can I use your pretrained weights in a new model of the same structure with different data?

Hi, this file mask2former_beit_adapter_large_896_80k_cocostuff164k.pth.tar is the checkpoint of the entire model, including backbone and head. If you want to use this checkpoint as initialization and fine-tune on other dataset, you should use load_from rather than pretrained (used for loading pretrained backbone), like this:
load_from = 'pretrained/mask2former_beit_adapter_large_896_80k_cocostuff164k.pth.tar'

Thanks. Do I still need to define the model if it is loaded by load_from?
If I delete this I get the error
KeyError: 'XCiT is not in the models registry'
model = dict(     type='EncoderDecoderMask2Former',     pretrained=pretrained,     backbone=dict(         type='BEiTAdapter',         img_size=896,         patch_size=16,         embed_dim=1024,         depth=24,         num_heads=16,         mlp_ratio=4,         qkv_bias=True,         use_abs_pos_emb=False,         use_rel_pos_bias=True,         init_values=1e-6,         drop_path_rate=0.3,         conv_inplane=64,         n_points=4,         deform_num_heads=16,         cffn_ratio=0.25,         deform_ratio=0.5,         with_cp=True,  # set with_cp=True to save memory         interaction_indexes=[[0, 5], [6, 11], [12, 17], [18, 23]],     ),     decode_head=dict(         in_channels=[1024, 1024, 1024, 1024],         feat_channels=1024,         out_channels=1024,         num_queries=200,         pixel_decoder=dict(             type='MSDeformAttnPixelDecoder',             num_outs=3,             norm_cfg=dict(type='GN', num_groups=32),             act_cfg=dict(type='ReLU'),             encoder=dict(                 type='DetrTransformerEncoder',                 num_layers=6,                 transformerlayers=dict(                     type='BaseTransformerLayer',                     attn_cfgs=dict(                         type='MultiScaleDeformableAttention',                         embed_dims=1024,                         num_heads=32,                         num_levels=3,                         num_points=4,                         im2col_step=64,                         dropout=0.0,                         batch_first=False,                         norm_cfg=None,                         init_cfg=None),                     ffn_cfgs=dict(                         type='FFN',                         embed_dims=1024,                         feedforward_channels=4096,                         num_fcs=2,                         ffn_drop=0.0,                         with_cp=True,  # set with_cp=True to save memory                         act_cfg=dict(type='ReLU', inplace=True)),                     operation_order=('self_attn', 'norm', 'ffn', 'norm')),                 init_cfg=None),             positional_encoding=dict(                 type='SinePositionalEncoding', num_feats=512, normalize=True),             init_cfg=None),         positional_encoding=dict(             type='SinePositionalEncoding', num_feats=512, normalize=True),         transformer_decoder=dict(             type='DetrTransformerDecoder',             return_intermediate=True,             num_layers=9,             transformerlayers=dict(                 type='DetrTransformerDecoderLayer',                 attn_cfgs=dict(                     type='MultiheadAttention',                     embed_dims=1024,                   load_  num_heads=32,                     attn_drop=0.0,                     proj_drop=0.0,                     dropout_layer=None,                     batch_first=False),                 ffn_cfgs=dict(                     embed_dims=1024,                     feedforward_channels=4096,                     num_fcs=2,                     act_cfg=dict(type='ReLU', inplace=True),                     ffn_drop=0.0,                     dropout_layer=None,                     with_cp=True,  # set with_cp=True to save memory                     add_identity=True),                 feedforward_channels=4096,                 operation_order=('cross_attn', 'norm', 'self_attn', 'norm',                                  'ffn', 'norm')),             init_cfg=None)     ),     test_cfg=dict(mode='slide', crop_size=crop_size, stride=(512, 512)) )


Fixes MolToSmarts python docs

There were two ways to fix this (one to change the docs, the other to change the parameter name). Either has it's downsides, so I'm ok with this one.

I was this close to naming all parameters simply "isomeric" :)


performance testing, what is the fastest way as a client to connect to custom developed redis server e.g. redhub

https://github.com/OpenAtomFoundation/pika
can you provide the fastest way to push outgoing connections? i've developed my own redis server and it's able to outperform official redis server by 100k per cpu core but the rueidis client cannot keep up. how can i do this as below? running multiple client connections.
if possible i would prefer to use 1 outgoing connection only (if it does not seriously affect performance)
i am running codis proxy which will have multiple incoming redis client and the server will have many fd open ports coz i have other services running on it.
is this possible? else how to force "auto pipelining" etc.
p.s. : my multicore enabled customized redis solution is not fully utilizing the capability of rueidis client.
u can try to simulate the problem i'm having, rueidis is unable to fully utilize multiple core.
https://github.com/IceFireDB/redhub
pls provide the fastest way to push the maximum throughput / rps for the client. thx
p.p.s : thx for the -1 pipelinemultiplex code but no matter what i tried the value, i've read on the default 8 but it's not working as well as i hoped for.
package main

import (
        "context"
        "fmt"
        "sync"
        "time"

        "github.com/redis/rueidis"
        "runtime"

        "golang.org/x/sys/unix"
)

const totalRequests = 1000000

func main() {
        runtime.GOMAXPROCS(runtime.NumCPU()) // Ensure all CPUs are used.

        numCores := uint16(runtime.NumCPU())
        requestsPerCore := totalRequests / int(numCores)

        var wg sync.WaitGroup
        start := time.Now()

        client, err := rueidis.NewClient(rueidis.ClientOption{
                InitAddress: []string{"localhost:6379"},
                DisableCache: true, // Disable the internal command cache
                PipelineMultiplex: -1,
        })
        if err != nil {
                panic(fmt.Sprintf("Failed to create Redis client: %v", err))
        }
        defer client.Close()

        for i := uint16(0); i < numCores; i++ {
                wg.Add(1)
                go func(coreID uint16) {
                        runtime.LockOSThread()
                        defer runtime.UnlockOSThread()
                        SetCPUAffinity(coreID + 1)
                        defer wg.Done()
                        ctx := context.Background()
                        for j := 0; j < requestsPerCore; j++ {
                                key := fmt.Sprintf("key%d_%d", coreID, j)
                                value := fmt.Sprintf("value%d_%d", coreID, j)

                                // Set
                                setCmd := client.B().Set().Key(key).Value(value).Build()
                                if err := client.Do(ctx, setCmd).Error(); err != nil {
                                        fmt.Printf("Failed to set key: %v\n", err)
                                        return
                                }

                                // Get
                                _, err := client.Do(ctx, client.B().Get().Key(key).Build()).ToString()
                                if err != nil {
                                        fmt.Printf("Failed to get key: %v\n", err)
                                        return
                                }
                        }
                }(i)
        }

        wg.Wait()
        elapsed := time.Since(start)
        fmt.Printf("Executed %d requests in %s\n", totalRequests, elapsed)
}

func SetCPUAffinity(cpu uint16) error {
        var newMask unix.CPUSet
        newMask.Zero()
        newMask.Set(int(cpu) - 1)
        return unix.SchedSetaffinity(0, &newMask)
}

Hi @ouvaa, please just simply use as many concurrent goroutines as you can and don't use the runtime.LockOSThread()

@rueian i was retesting again and i was wondering which was faster. can you help run this and help us understand what's the problem? both completed in the same time but the one with client declared inside the goroutine is uses more cpu of a 12 core laptop.
(my custom server is running 4x more cpu [the server] but results tps is the same for both)
can u help this?
slower
package main

import (
        "context"
        "fmt"
        "sync"
        "time"

        "github.com/redis/rueidis"
        "runtime"

        "golang.org/x/sys/unix"
)

const totalRequests = 1000000

func main() {
        runtime.GOMAXPROCS(runtime.NumCPU()) // Ensure all CPUs are used.

        numCores := uint16(runtime.NumCPU())
        requestsPerCore := totalRequests / int(numCores)

        var wg sync.WaitGroup
        start := time.Now()

        for i := uint16(0); i < numCores; i++ {
                wg.Add(1)
                go func(coreID uint16) {
                        runtime.LockOSThread()
                        defer runtime.UnlockOSThread()
                        SetCPUAffinity(coreID + 1)
                        defer wg.Done()
                        ctx := context.Background()
                        client, err := rueidis.NewClient(rueidis.ClientOption{
                                InitAddress: []string{"localhost:6379"},
                                DisableCache: true, // Disable the internal command cache
                                PipelineMultiplex: -1,
                        })
                        if err != nil {
                                panic(fmt.Sprintf("Failed to create Redis client: %v", err))
                        }
                        defer client.Close()

                        for j := 0; j < requestsPerCore; j++ {
                                //key := fmt.Sprintf("key%d_%d", coreID, j)
                                //value := fmt.Sprintf("value%d_%d", coreID, j)

                                ///*
                                // Set
                                setCmd := client.B().Set().Key("key").Value("value").Build()
                                if err := client.Do(ctx, setCmd).Error(); err != nil {
                                        fmt.Printf("Failed to set key: %v\n", err)
                                        return
                                }
                                //*/

                                /*
                                // Get
                                _, err := client.Do(ctx, client.B().Get().Key("key").Build()).ToString()
                                if err != nil {
                                        fmt.Printf("Failed to get key: %v\n", err)
                                        return
                                }
                                //*/
                        }

                }(i)
        }

        wg.Wait()
        elapsed := time.Since(start)
        fmt.Printf("Executed %d requests in %s\n", totalRequests, elapsed)
}

func SetCPUAffinity(cpu uint16) error {
        var newMask unix.CPUSet
        newMask.Zero()
        newMask.Set(int(cpu) - 1)
        return unix.SchedSetaffinity(0, &newMask)
}

faster
package main

import (
        "context"
        "fmt"
        "sync"
        "time"

        "github.com/redis/rueidis"
        "runtime"

        "golang.org/x/sys/unix"
)

const totalRequests = 1000000

func main() {
        runtime.GOMAXPROCS(runtime.NumCPU()) // Ensure all CPUs are used.

        numCores := uint16(runtime.NumCPU())
        requestsPerCore := totalRequests / int(numCores)

        var wg sync.WaitGroup
        start := time.Now()

                        client, err := rueidis.NewClient(rueidis.ClientOption{
                                InitAddress: []string{"localhost:6379"},
                                DisableCache: true, // Disable the internal command cache
                                PipelineMultiplex: -1,
                        })
                        if err != nil {
                                panic(fmt.Sprintf("Failed to create Redis client: %v", err))
                        }
                        defer client.Close()

        for i := uint16(0); i < numCores; i++ {
                wg.Add(1)
                go func(coreID uint16) {
                        runtime.LockOSThread()
                        defer runtime.UnlockOSThread()
                        SetCPUAffinity(coreID + 1)
                        defer wg.Done()
                        ctx := context.Background()
                        for j := 0; j < requestsPerCore; j++ {
                                //key := fmt.Sprintf("key%d_%d", coreID, j)
                                //value := fmt.Sprintf("value%d_%d", coreID, j)

                                ///*
                                // Set
                                setCmd := client.B().Set().Key("key").Value("value").Build()
                                if err := client.Do(ctx, setCmd).Error(); err != nil {
                                        fmt.Printf("Failed to set key: %v\n", err)
                                        return
                                }
                                //*/

                                /*
                                // Get
                                _, err := client.Do(ctx, client.B().Get().Key("key").Build()).ToString()
                                if err != nil {
                                        fmt.Printf("Failed to get key: %v\n", err)
                                        return
                                }
                                //*/
                        }

                }(i)
        }

        wg.Wait()
        elapsed := time.Since(start)
        fmt.Printf("Executed %d requests in %s\n", totalRequests, elapsed)
}

func SetCPUAffinity(cpu uint16) error {
        var newMask unix.CPUSet
        newMask.Zero()
        newMask.Set(int(cpu) - 1)
        return unix.SchedSetaffinity(0, &newMask)
}

Hi @ouvaa, both two use cases are valid, but usually, there is no need to have multiple rueidis client instances. You can just use one rueidis client instance and fire multiple concurrent Do() and DoMulti() to it.
Again, please don't use runtime.LockOSThread() that will prevent background goroutines from being scheduled and can cause performance degradation.

@rueian thank you for your time in answering these questions. i've been trying to push for performance and if possible, please make a closer look at both the script above as my program needed LockOSThread so naturally rueidis is performing inside that goroutine as a slim down version of the program. i have requirement to run the LockOSThread this way.
having said so, please please take a look at both codes.
my findings:
a) client outside goroutines : faster because something about this client is running in "single-thread" faster and thus processing faster and using lesser cpu, communicating with single thread goroutine.
b) supposingly should be much much faster but because of some "locks" or "variable sharing / contention" of rueidis package that  makes it use more CPU without being faster.
can you help think about the internal architecting of this and maybe consider redesigning this with consideration to this issue, which definitely can speed it up significantly and use more cores appropriately.
i think u have a contention for global variables within this rueidis package. can you pprof and find out what's causing the contention issue? supposingly the slower first version is supposed to run faster in all other packages used except rueidis.
can you please try to look at it? thanks

@ouvaa, there are no "locks" or "variable sharing / contentions" in your second case. If there were, then your first case would be even slower, not faster.
What makes you think the second case should be faster? Do you take IO into account?

Yes, the cost of doing network IO operations should be taken into account. That includes system call costs.

@rueian thank you


Functionality to Upload CSVs is synchronous

Consider creating an asynchronous thunk action which asynchronously calls the actions.

The CSVs are uploaded in a web worker so the UI could be given a loading state when the web worker was created, and a finished state when the worker is completed. However, processing time has been considerably reduced by mapping the samples into a samples array before adding them to Redux's immutable state. Previously, the samples were added to Redux field-by-field, sample-by-sample.


VRage.Game.ModAPI.Ingame.Utilities not found

Hi,
I use VS2022 and i installed everything as instructed in the wiki page for Visual Studio.
Now i can compile Projects and see them in my Game. (in general when commenting the problematic using directive)
But using VRage.Game.ModAPI.Ingame.Utilities i can not compile the scripts as VS can not find the Namespace. More specifically i can not use MyIni.
Is there some troubleshooting steps i can do?

There's no reason why it wouldn't work.
Zip up the project, let me take a look.

Or, you can reach out on Discord https://discord.gg/keenswh, #programmable-block channel for potential real-time troubleshooting - I'm usually there too.

There's no reason why it wouldn't work.
Zip up the project, let me take a look.

Funny enough i get this issue even when using the straight up unedited template. (Then one when you create a new Project in VS)

Then it is a local issue, I'm afraid

Hang on; on your secondary test did you make sure to build to x64?

yes, i only have x64 available to select

also Debug anr Release do not make a difference.
Also verified my Gamefiles.
Do you by Chance know how the Assembly Lookup works? Like what folder it checks?

The assemblies are directly referenced by one of the added by the templates.

Could you check what the assembly name for the MyIni class is? Maybe its just one of my DLLs that is broken

Oh my. Where to begin....
You are correct this in deed was a local issue and a funny one it seems.
I just guessed the Assembly beeing VRage.Game.dll as thats the only fitting one in the whole gamefiles.
Keen was keen enough to include the XMLs with the Classes in the game files so checking if it exists in there was quick (it did not, not even a single line with that namespace). But the XML looked fine otherwise.
So i checked the DLL with dotPeek and there also is no trace of the namespace.
Now, as i have had my own share of experiences with such issues in another highly moddable game, i deleted the dll and xml and verified my game files AGAIN.
Now it downloaded a NEW DLL, significantly bigger than the old one.
It seems that my DLLs have not been updated since 2018, hence the namespace simply didnt exist at that time....

... Wow. That's rather incredible. Did you not play ever since? Anyway, I'm glad you were able to resolve the issue.
But yeah. Funny one indeed.

Thats the weirdest part of it all... I am indeed playing RIGHT NOW on a freshly installed (definetly all DLLs from 2024) dedicated server with some friends. Though i had like 1 crash in maybe 5 weeks of playing, which i didnt think was unusual considering some of the mods... But goes to think as to how stable the game is with running .NetFramework 4.6.1 DLLs...
Here the DLL before and after (i think its obvious which one is which)

It doesn't make sense. That's a core DLL. It shouldn't have worked. Are you sure this is the current install direction?

It doesn't make sense. That's a core DLL. It shouldn't have worked.

i am very sure, i am a software dev (C# at that), and im just as baffled. I checked twice.
And just to make sure checked again and yes its the correct folder. The only explanation i have is that the assemblies have the same version so it wont fail there and as long as you dont call any "bad" methods or classes it should work "fine".
I am just gonna accept that, but now there is a git issue for someone having that issue in the future XD

I'm also a professional C# software developer. And I am quite familiar with how SE specifically works.
It shouldn't have worked.

Eeeh you're right though. It is what it is.


SPI transaction speed not meeting the maximum speed

Hi,
I am using SPI module in the library to handle SPI transactions from Raspberry PI CM4 to an onboard SPI device. The maximum speed is set to 5MHz on my script, and when I performed spi.transfer() of 7 bytes, the measurement time was well above the expected time.
I am trying to sample data at 38400SPS which is about 1 / 21us, but due to the delay of SPI transaction, I cannot actually achieve the sampling rate. I was wondering if you have any idea on how to increase the transaction speed of the SPI.
The following is my piece of code
spi = SPI("/dev/spidev6.1", mode = 1, max_speed = 5000000)

def read_data_bytes(spi, adc_type):
    if adc_type == 1:
        values = [RDATA1_OP] + [0xFF]*6
    else:
        values = [RDATA2_OP] + [0xFF]*6
    _logger.info(f'Sending Command = {values}')
    t1_start = perf_counter()
    values = spi.transfer(values)
    t1_stop= perf_counter()
    _logger.info(f'Reading ADC data= {values}, Tx time {t1_stop - t1_start}')
    return values

INFO:__main__:Reading ADC data= b'``\xf35{$b', Tx time 0.00021887299953959882
INFO:__main__:Data in decs = (96, 96, 243, 53, 123, 36, 98)

When scoped the MISO and Clock signal, I found out that the clock signal is not actually 5MHz, it's around 2MHz. And the CS is asserted much longer than it needs.
The following is captured image

The clock signal being slower than the maximum clock speed set in SPI module was due to the RPI core clock divisor. I've resolved the issue by configuring dt-overlay.
I'm still having issue with the CS line being asserted and de-asserted long before and after the transmission. Is there a way to assert the line faster?


feat: add support for suffix parameter in ollama

What does this PR do?
This PR adds support for the suffix parameter in Ollama.
The ollama API does support a suffix parameter for FIM requests/models: https://github.com/ollama/ollama/blob/main/docs/api.md#parameters
Via a function call similar to the prompts we can add the suffix which typically would be lines_after.
usage:
provider_options = {
    suffix = function(lines_after)
        return lines_after
    end,
}

For example codegemma a popular FIM model has the following template:
{{- if .Suffix }}<|fim_prefix|>{{ .Prompt }}<|fim_suffix|>{{ .Suffix }}<|fim_middle|>
{{- else }}{{ .Prompt }}
{{- end }}

this allows us to use the suffix and not change the template
Support was added here: https://github.com/ollama/ollama/pull/5207

@tzachar is that sufficient or do you want something more specific?


Updates package 'Microsoft.Azure.DocumentDB.Core' to version '2.5.1'

@brendankowitz @feordin Any concerns if I approve and complete this PR?

@brendankowitz @feordin Any concerns if I approve and complete this PR?

No, I have tested this version and it seemed to be fine.  It doesn't fix the history batch problem but that is no different from the current version.