New Performance Trials and Optimizations

This request contains several new performance trials and some very significant optimizations.   I'll discuss the results of the new trials in #60.
Note that my earlier Zipper refactor hurt selection times compared to the very high bar @ncreep had set.  These optimizations bring the performance back to that level and beyond.
Performance Tests:

Added several new trials to measure various Zipper operations as well as overall "select/modify/unselect" times
Added new implementations to selection trials to isolate the effect of the Zipper and of the bloom filter on selection times
Moved Performance into its own package and split it into multiple classes
New command line options to run certain "categories" of trials (load, selection, modify, etc.)

Optimizations:

Put hole information in its own tree structure (ZipperHoleMap) rather than a SortedMap
Defer expensive zipper calculations to unselect
Avoid Int boxing in non-transient path structures (ZipperPath)
Use VectorCase wherever small vectors are likely
Make PathCreator.PathVals traverse selections lazily
Reuse empty Group instances (helps with size and with the bloom filter calculation)

This pull request does contain a large number files, but most of them are in the test directory.   Many of them are the result of splitting out the Performance class.

Some selected performance measurements.   The "select" trials are the same ones we've been using all along.  The "modify" trials measure an entire "select/modify/unselect" cycle.   They use the same selection as the "select" trials and add an attribute to the selected elements.
-- Execution Time --
[shallowSelectSmall]        Shallow selection in a 7 MB tree                   [378832 nodes, 133010 elems, 2772 attrs]
 + anti-xml:                    min:   3 ms, max:   9 ms, average:   4 ms          [Selected 8 nodes]
 + scala.xml:                   min:  47 ms, max:  49 ms, average:  47 ms          [Selected 8 nodes]
 + javax.xml:                   min:  17 ms, max:  18 ms, average:  17 ms          [Selected 8 nodes]

[deepSelectSmall]           Deep selection in a 7 MB tree                      [378832 nodes, 133010 elems, 2772 attrs]
 + anti-xml:                    min:   2 ms, max:   2 ms, average:   2 ms          [Selected 8 nodes]
 + scala.xml:                   min: 262 ms, max: 281 ms, average: 268 ms          [Selected 8 nodes]
 + javax.xml:                   min:  11 ms, max:  13 ms, average:  11 ms          [Selected 8 nodes]

[shallowModifyFewSmall]     shallow modify a few elements of a 7 MB tree       [modify 8 nodes]
 + anti-xml:                    min:   7 ms, max:   8 ms, average:   7 ms          [result has 378832 nodes, 133010 elems, 2780 attrs]
 + scala.xml:                   min:  35 ms, max:  36 ms, average:  35 ms          [result has 378832 nodes, 133010 elems, 2780 attrs]
 + javax.xml:                   min:  57 ms, max:  60 ms, average:  58 ms          [result has 378832 nodes, 133010 elems, 2780 attrs]

[deepModifyFewSmall]        deep modify a few elements of a 7 MB tree          [modify 8 nodes]
 + anti-xml:                    min:   2 ms, max:   3 ms, average:   2 ms          [result has 378832 nodes, 133010 elems, 2780 attrs]
 + scala.xml:                   min:  57 ms, max:  61 ms, average:  58 ms          [result has 378832 nodes, 133010 elems, 2780 attrs]
 + javax.xml:                   min:  65 ms, max:  71 ms, average:  67 ms          [result has 378832 nodes, 133010 elems, 2780 attrs]

Ugh.  I should learn never to send a pull request after 3AM.   The above 3 commits are minor fixes to how update times are affected by various zipper operations.   I've added tests as well.

I've found some easy optimizations having to do with the bloom filter.  Shall I tack them on to this request?  The optimizations are:

Groups that do not have Elems can reuse the same "empty" BloomFilter.  This improves the "cold" select trials by about 30% and should decrease the memory footprint of the filter.

The element-by-name selector can pre-compute its bloom hash and reuse it.   This almost completely eliminates the bloom filter's overhead in the example I discussed in #60.  It also takes the deepSelectSmall trial down to 1ms on my device :-)

Very impressive!
A few notes/questions:

When creating a broken Zipper you use nulls for the irrelevant fields, wouldn't it be more informative to use sys.error?
Is there a good reason to hold separate implementations for flatMap and conditionalFlatMapWithIndex's instead of just lifting functions from flatMap into conditionalFlatMapWithIndex format?
As the whole time thing is becoming more and more complicated, I think it would be a good a idea to define an "official time policy" for the Zipper to be used as guidelines for future updates.
In the comment for the additionalHoles field you note that it may be used for data associated with actual nodes. As far as I can see, it is always implicitly assumed that the additional data is associated with an empty vector.    In any case, I think it may be useful in the future to have additional nodes hidden inside the Zipper.

When creating a broken Zipper you use nulls for the irrelevant fields, wouldn't it be more informative to use sys.error?

Perhaps so, but that would require using "def" and both of our earlier updated implementations had a bug having to do with chained defs.  That's an easy mistake to make, so I made all of the abstract Zipper fields "val"s to ensure it won't happen again.
However, I agree nulls are yucky.  I think the cleanest solution is to put the parent and all of the other fields in a separate "Context" class, and then make Zipper have a single val of type Option[Context].  I'll go ahead and make that change.
Eventually I'd like to get rid of broken zippers altogether.   I've been doing some work along those lines, but I don't have anything ready for prime-time yet.

Is there a good reason to hold separate implementations for flatMap and conditionalFlatMapWithIndex's instead of just lifting functions from flatMap into conditionalFlatMapWithIndex format?

conditionalFlatMapWithIndex  is optimized specifically for building Groups and Zippers whereas flatMap has to work with arbitrary builders.
I forgot to mention conditionalFlatMapWithIndex when I described the changes.  It's probably the ugliest of the optimizations, but it turns out to be a win.  During unselect, we often only need to change a fraction of a Vector's entries, and it is faster to do that using selective updated calls  than to rebuild the whole Vector using map or flatMap.

As the whole time thing is becoming more and more complicated, I think it would be a good a idea to define an "official time policy" for the Zipper to be used as guidelines for future updates.

Are you talking about performance or about the "update time" functionality?  I'm on board with defining both, but I think we're most lacking in the latter case.  Currently, methods like slice, filter and unselect don't yield the intuitive "update time" behavior (nor have they ever).   In this pull request, I fixed slice and took a stab at unselect because the fixes aligned well with my other modifications.  However, at some point we need to formally specify how update times work across the board.
As for performance, hopefully the new trials are a step in the right direction.  I did run all of the new trials against the original DeepZipper to ensure that we haven't lost anything.   This new code outperforms all earlier implementations.  In some cases the improvement is dramatic.
  The basic structure hasn't changed much.  IMO, the ugliest new code is in slice and the new conditionalFlatMapWithIndex.  The former fixes the "update time" problem I mentioned above.  The latter is mainly for performance, but it only affects unselect, and even without that change, the new code's unselect was faster than any of the earlier implementations.

In the comment for the additionalHoles field you note that it may be used for data associated with actual nodes. As far as I can see, it is always implicitly assumed that the additional data is associated with an empty vector.

The entries in "additionalHoles" are just assertions that the Zipper contains a hole with at least a certain update time.  They don't imply anything about the nodes associated with that hole.   If during unselect, we find that an entry in additionalHoles doesn't have any nodes associated with it, then we assume the hole is being replaced with an empty vector.  But if it does have nodes associated with it, we retain those nodes and only increase the update time (if needed).
It's true that I only needed additionalHoles to account for holes being replaced by empty vectors,  but nothing assumes that fact.   By allowing additionalHoles to have "extraneous" entries, I don't have to worry about overlap between metas and additionalHoles when building the Zipper, and can instead resolve any such overlap during unselect.   That yields a net performance gain because most zippers never get unselected.

In any case, I think it may be useful in the future to have additional nodes hidden inside the Zipper.

If I understand it correctly, additionalHoles probably doesn't satisfy the use you have in mind.  But that can be addressed when it becomes necessary.

As discussed, I changed "dead zippers" to no longer use nulls, and moved all of the Zipper's context into a single Option[Context] so now the context is clearly "all or nothing".  I also tried to clarify the "additionalHoles" comments and cleaned-up on some of my self-proclaimed "ugly" code in conditionalFlatMapWithIndex :-)
I also added the bloom filter optimizations I described earlier.   They yield some decent improvements.
@ncreep - Did I address your concerns for this pull?   I figure we can tackle update time specifications and/or performance policies in a separate request.

That definitely addresses my concerns, thanks.
When I mentioned "time" before I meant update times. I guess it would be better to tackle it later.

You guys are awesome!  Merged.
I'm also curious about the chained defs issue.

I'm also curious about the chained defs issue.

Yeah, that one is worth calling out in the release notes.  Shall I log a separate issue as well?
The problem was that Zipper.updated produced a Zipper whose parent method delegated to the zipper being updated:
new Group(nodes.updated(index, node) with Zipper {
   def parent = self.parent  //"self" refers to the Zipper being updated
   ...
}

This meant that new Zipper implicitly retained a reference to the original;   If you made a chain of 100 such updates, the result would indirectly refer to 100 previous instances, and its parent method would result in 100 nested parent calls.
Only updated has this bug;  The other zipper creation methods eagerly evaluate the parent.
I discovered this when I noticed that Zippers resulting from lots of "updated" calls had very poor unselect performance, due to the nesting of parent calls.


Add pre-commit hook to run lint fix

https://typicode.github.io/husky/#/?id=automatic-recommended

https://github.com/Idea-Pool/evaluation-request-interception/pull/21


Working file picker for Linux

Both current kDialog and Zenity pickers don't work on Linux. They seem to execute a bash command, but fail with the message "cannot execute binary file". It may be due to security/permission reasons.
In any case, I've made a picker using NativeFileDialogs.AutoGen. I put it under the Linux folder, but actually it should also work on Windows.
The library really doesn't look easy to use, because it's the version autogenerated directly from the C code, but at some point later on I'll have a NativeFileDialogs.Net library that nicely wraps around it.

Some images of the file pickers


⚠ Bofrost.de has degraded performance

In 30b8bf0, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1181 ms

Resolved: Bofrost.de performance has improved in ab6418a.


docs: add download links to the latest version of the CLI

I am putting this Pull Request [ON HOLD] until packaging solution has been improved.


Table's (scroll) emits twice on per scroll.

I'm submitting a ...  (check one with "x")
[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here

Current behavior

<ngx-datatable [scrollbarH]="true" (scroll)="onScroll($event)">...</ngx-datatable>

onScroll  gets invoked twice as per scroll event with different argumetns, 1st time with the scroll Event, 2nd time with the value the emitter vomits out { offsetX: 120, offsetY: 0 }.
Expected behavior

the method is invoked once only with this argument: { offsetX: number, offsetY: number, nameThisKey: Event }
This is probably because (scroll) is used by ng2's templating stuff, like (click).
If this is the intended behavior close this, cause its not hard to overcome the issue
onScroll(evt: Event|{offsetX: number, offsetY: number}) {
    if (evt instanceof Event) {
      console.log('mouse');
    } else {
      console.log('ngx-datatable')
    }
  }

Is this still an issue?

Just tested it with 9.3.0 and angular 4.1.3 and it still seems to be happening

Still emit twice. Any news about this?
Current Version
ngx-datatable: ^13.0.1
angular: ^5.2.6

Is this still an issue?

It is.
ngx-datatable: 17.1.0
angular: 9.1.12
year: 2020


Revert the pushed changes in amplify-cli.

Well, the actual scenario is that in amplify->api->"schema.graphql" file in my client app was actually was outdated and there was a modification in the graphql schema at the server via AppSync service, now when I added a new category that is analytics and then pushed this change, the old schema was deployed over the cloud. So, I just wanted to revert the push in amplify cli.
Amplify Cli Version:- 4.22.0
Os: Windows 10

Hi @SurajPandey186, I want to make sure I'm understanding correctly. Was the change to the schema made in the AppSync console?
Also, do you have the schema changes that you want to preserve saved somewhere?

Yes @jhockett, the change was made directly in AppSync console. No, basically the developer who made the changes do not have that changed state of schema that he changed manually in AppSync

Hi @jhockett, I am waiting for your response.

@SurajPandey186 unfortunately, there's nothing that can be done from the CLI to recover the changes made in the Console. In the future, I highly recommend committing schema changes to version control.
The CLI doesn't have knowledge of changes in the backend if you don't use amplify pull first. See: https://docs.amplify.aws/cli/start/workflows#amplify-pull
Also, you may find the docs regarding team workflows useful: https://docs.amplify.aws/cli/teams/overview

Thanks @jhockett  for the response.

Thanks, @jhockett, I have gone through docs earlier, but still, I thought there could anyway.

Closing this issue, but feel free to comment below if you have further questions related to this issue.


Pagination control at the bottom of the page

Duplicate pagination control at the bottom of the page.
If one scrolls long list down there is no control to get next page

Сделано в https://github.com/maii-chgk/rating-ui/pull/37


block: Implement BlockStore

Implement a BlockStore to store erasure coded blocks. Additionally, implement a feature to cache latest X amount of  blocks for easy serve to other Celestia Full Node peers.
Components:

[x] Discuss which DB to use #46
[ ] Block store
[ ] Block get

Sub issue of #25

We decided to use BadgerDB as per #46.
@Wondertan made the point that we have to have some sort of interface to communicate with DB.


ViewBinding migration (replacing kotlin extensions)

Description
We are currently migrating to ViewBinding since Kotlin extensions have been deprecated.
This is a great opportunity for contributors to help our Android team.
We are accepting contributions to remove kotlin extensions usages and replace them by using ViewBinding.
Inside our codebase, we have already migrated a bunch of classes that you can use as a reference:

Fragments: InitialFeedbackFragment, ShareOpenEndedFeedbackFragment, etc.
Dialogs: DaxDialog
RecyclerView.ViewHolder: AppIconsAdapter,SearchSuggestionViewHolder, BookmarkSuggestionViewHolder,
CustomView: TabSwitcherButton

How to work on this issue
But there are still some pending migrations.

Fragments: EmailAutofillTooltipFragment, SavedSiteDialogFragment, DefaultBrowserPage, WelcomePage, BrowserTabFragment, DownloadConfirmationFragment
Dialogs: FireDialog
Adapaters: BookmarksAdapter, FavoritesAdapter, BookmarkFolersAdapter, FavoritesQuickAccessAdapter, etc...
CustomView: TrackerNetworkLeaderboardPillView

Just leave us a comment that you would like to work on the issue and what classes you will migrate. That will avoid conflicts with other contributions migrating the same classes.
Thanks!

I would like to help with all the fragment classes. Let me know!

@cmonfortep okay

Is it safe to say that this issue has been resolved ?

Do you still need help here?

i have started working on classes if someone is already working on something please let me know

You can work on any of the ones we haven't yet migrated (except browserTabFragment which we will refactor internally since it's too complex)

Thanks! i was bit confused about the two approched
Getter property

kotlin delegate

which one is recommended?

I would also also like to work on this issue , please let me know which classes i can work with

We will continue the migration internally. Closing the issue.


<C-Space> mapping for cmp.mapping.complete() not working as expected

FAQ

[X] I have checked the FAQ and it didn't resolve my problem.

Announcement

[X] I have checked Breaking change announcement.

Minimal reproducible full config
if has('vim_starting')
  set encoding=utf-8
endif
scriptencoding utf-8

if &compatible
  set nocompatible
endif

let s:plug_dir = expand('/tmp/plugged/vim-plug')
if !filereadable(s:plug_dir .. '/plug.vim')
  execute printf('!curl -fLo %s/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim', s:plug_dir)
end

execute 'set runtimepath+=' . s:plug_dir
call plug#begin(s:plug_dir)
Plug 'hrsh7th/nvim-cmp'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/vim-vsnip'
Plug 'neovim/nvim-lspconfig'
call plug#end()
PlugInstall | quit

" Setup global configuration. More on configuration below.
lua << EOF
local cmp = require "cmp"
cmp.setup {
  snippet = {
    expand = function(args)
      vim.fn["vsnip#anonymous"](args.body)
    end,
  },

  mapping = {
    ['<CR>'] = cmp.mapping.confirm({ select = true }),
    ["<C-Space>"] = cmp.mapping.complete(),
  },

  sources = cmp.config.sources({
    { name = "nvim_lsp" },
    { name = "buffer" },
  }),
}
EOF

lua << EOF
local capabilities = require('cmp_nvim_lsp').default_capabilities()

require'lspconfig'.cssls.setup {
  capabilities = capabilities,
}
EOF

Description

System: Apple M1 Mac on Sonoma 14.4.1
Terminal: Kitty 0.34.0
nvim version: v0.10.0-dev-3078+g3a8265266-Homebrew

Ive recently decided to rework my configuration, and based it of kickstart-modular.nvim.
Initially the ["<C-Space>"] = cmp.mapping.complete() mapping seemed to be working as expected until one day it seemed to stop working.
After some trail and error i discovered that for the mapping to correctly work I must also hold the fn key as well for it to work.
Steps to reproduce

Open nvim
Navigate to file
Wait for LSP to load
Attempt to open the completion menu manually with <C-Space>

Expected behavior
Completion Menu should open without having to press any other keys besides the ones declared in the config.
Actual behavior
Completion menu requires FN key to be pressed alongside the keymap declared in the config
Additional context
This is actually not the first time its happened and its what led me to rework my configuration, thinking I messed something up along the way.
Although previously I had to hold the shift key alongside the keymap for it to work. During this time I was using Iterm with tmux.
I also though it might be Karabiner-Elements, which i use to remap CapsLock to Ctrl and Esc, but the issue still happened without the software running.
Its also worth noting that this is the only keymap so far that ive encountered (including in my previous config) this issue with. Any other keymap that utilized Ctrl works as expected

I have solved this issue.
For anyone else who runs into this, if you're on MacOS make sure you double check your system shortcuts for any conflicts.
In my case, the action "switch to next audio input" was mapped to ctrl + space. This can be found under System Settings > Keyboard > Shortcuts


Formatted all code with Prettier

Codecov Report

Merging #2905 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #2905   +/-   ##
======================================
  Coverage     100%    100%
======================================
  Files          67      67
  Lines        1410    1501   +91
======================================
+ Hits         1410    1501   +91

Impacted Files
Coverage Δ

src/selectors/isInvalid.js
100% <ø> (ø)
:arrow_up:

src/index.js
100% <ø> (ø)
:arrow_up:

src/structure/immutable/expectations.js
100% <ø> (ø)
:arrow_up:

src/structure/immutable/deepEqual.js
100% <ø> (ø)
:arrow_up:

src/events/getValue.js
100% <ø> (ø)
:arrow_up:

src/handleSubmit.js
100% <ø> (ø)
:arrow_up:

src/structure/plain/keys.js
100% <ø> (ø)
:arrow_up:

src/structure/plain/deleteIn.js
100% <ø> (ø)
:arrow_up:

src/selectors/getFormInitialValues.js
100% <ø> (ø)
:arrow_up:

src/structure/plain/splice.js
100% <ø> (ø)
:arrow_up:

... and 79 more

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 b67edf1...653b33b. Read the comment docs.


Clean up code

I've taken the time to do a few minor changes.
I don't think you need add-px dep, as React adds px by default to width and height so I removed it.
I see you follow a similar convention to suit, and if you do, UserAvatar--inner, means modifier, not subpart. I've modified the class names of subpart and now instead of UserAvatar--inner and UserAvatar--img we have UserAvatar-inner and UserAvatar-img.

Sorry, but unfortunately I can't merge this.
Firstly, the classname breaks an (even if slightly implicit, but I imagine many folks rely on overriding styling) API.
Second, without the 'px', React throws the following:
warning.js:36Warning: a div tag (owner: UserAvatar) was passed a numeric string value for CSS property height (value: 48) which will be treated as a unitless number in a future version of React.
Ultimately I plan to replace the classname api with something more explicit and component-centric like a couple style props.
Thanks for contributing!


How to get OBJ file from params.npz

Hi, I am very excited about your work. I have used your algorithm to reconstruct my scene. I have get the params.npz file. Now I want to use your reconstructed scene model in our project. We need OBJ file format to import the model. We want to import the scene for our robot simulation system. Could you please tell me how to convert the params.npz file to OBJ file? Thanks very much!  It is just the point cloud. How to convert the point cloud to mesh?

Hi, we currently don't have a method to convert the final Splat to an OBJ file. There's recent work on converting Gaussian Splats to High-Fidelity Meshes! They also have code available. I would recommend trying that out (we haven't tried it yet): https://imagine.enpc.fr/~guedona/sugar/
Another option is to run Poisson Surface Reconstruction on the point cloud (centers of the 3D Gaussians).

Hi, I am very excited about your work. I have used your algorithm to reconstruct my scene. I have get the params.npz file. Now I want to use your reconstructed scene model in our project. We need OBJ file format to import the model. We want to import the scene for our robot simulation system. Could you please tell me how to convert the params.npz file to OBJ file? Thanks very much! It is just the point cloud. How to convert the point cloud to mesh?

Hi，have you tried?

Hi, I am very excited about your work. I have used your algorithm to reconstruct my scene. I have get the params.npz file. Now I want to use your reconstructed scene model in our project. We need OBJ file format to import the model. We want to import the scene for our robot simulation system. Could you please tell me how to convert the params.npz file to OBJ file? Thanks very much! It is just the point cloud. How to convert the point cloud to mesh?

@hhcxx2006 Hello, I used D435 camera to create a dataset. But when I run myself dataset, there were many errors.
In this command, "python scripts/splatam.py configs/my_data/splatam.py", I don't know how to modify "splatam.py" file or refer to which dataset's config file(Replica or TUM-RGBD has different config file). So, Could you please give me some suggestions or share your "splatam.py" file?
Thanks a lot.

hi，I found a good repository coming recently, it may helps you to get a .ply file:gaustudio


Fix should use json.Unmarshal instead of gin.BindJSON

This closes #195

@jihuayu @torwig Thanks for your review.


some small color fixes

I wasn't entirely sure where to put this in the source file to submit as a pull request, and probably isn't the most optimal way, but heres a few small coloring fixes I added to my theme.css. It fixes some placeholder text, some overlays like the add friends to conversation, and reaction buttons.
:root {
  --primary-700: var(--bg-0);
  --primary-600: var(--bg-1);
  --primary-330: var(--txt-2);
  --primary-400: var(--acc-2);
  --brand-360: var(--acc-1);
  --primary-630: var(--bg-1);
  --brand-15a: var(--bg-1);
  --brand-200: var(--txt-2);
}

::placeholder {
  color: var(--txt-3)!important;
}

This fixes most of #32

i'm working on a pr (https://github.com/refact0r/system24/pull/33) with a lot of fixes for the issue i opened, i'll add your changes to mine if that's ok? :D

i'm working on a pr (#33) with a lot of fixes for the issue i opened, i'll add your changes to mine if that's ok? :D

yeah please do. theres also --primary-130 which fixes the weird bright white highlight on mic mute button in calls.

@stellophiliac ive left the things i mentioned above out of my PR as to not step on yours.


Travis CI and Codecov setup for Django-REST-Framework-Mongoengine

Hi, mr. Qwiglydee and Umut Bozkurt, many thanks for the work, you're doing, guys!
I created all the necessary files for Travis CI and Codecov configuration for DRF-Mongoengine and made them successfully do their job in my fork: https://github.com/BurkovBA/django-rest-framework-mongoengine (see green badges). The configuration is 99%-rip-off of Django-REST-Framework's with all the necessary modifications. I'll denote the non-trivial changes, I had to introduce:

Had to rename DumbDocument to PatchingDumbDocument in test_patching.py. Reason for this is mongoengine's document registry. When you import a Document, it automatically registers itself in mongoengine's regsitry and will be known by its name there. As you have DumbDocument defined both in tests/models.py and in tests/test_patching.py, they clash in the registry, when pytest autodiscovers them, and get_document() function retrieves the wrong document, failing the tests. Thus, I renamed one of them.
Python2 support: there were some minor incompatibilities with python2 in DRFM: super() can't be invoked without arguments in Python2 and mock module isn't a part of unittest in 2.7. For mock, I added conditional import, just as it is done in Django.
Satisfy linter: there were some unused imports, formatting errors that flake8 cursed about, which I fixed. Also, isort was unhappy about the order of some imports; I've written a .isort.cfg for it. I also replaced isort's --check-only option, which fails the build, if isort is unhappy, with --diff, which complains, but doesn't fail.
I created a separate requirements folder, just as it is done in DRF. It is used by tox.ini to customize build environments.
I prepared the stub for Django1.10 testing and documentation build job. Unfortunately, DRFM documentation is not available in the repo, thus, I can't make it work.

You'll probably want your Travis CI and Codecov badges in README.md refer to your own Travis and Codecov accounts (currently, they refer to mine, as I had no other way to test them). Just ask Umut to regsiter this repo in Travis and Codecov with his github account.
All in all, your test coverage is very good, over 90%. Cheers!

Thanks for your efforts.
I will check and merge ASAP.

Oops, sorry, I mixed my new commits with the Pull request.
Should I use feature branches like in git flow for my pull requests in future? Or just push to master?
These new commits are a test suit for issue #175: https://github.com/umutbozkurt/django-rest-framework-mongoengine/issues/175. Strangely, this test fails: despite the comment, mongoengine won't automagically create EmbeddedDocuments from nested data in Serializer.create: https://github.com/umutbozkurt/django-rest-framework-mongoengine/blob/master/rest_framework_mongoengine/serializers.py#L148. I don't understand, how instance = ModelClass(**validated_data) is supposed to work.

The EmbeddedDocumentSerializer had been designed wrong way - the .validated_data returned instance of EmbeddedDocument (to simplify putting it into parent document).
The right way is to follow general API of normal DocumentSerializer: the validated_data should be a dictionary of (parsed and validated) attributes, and an instance of EmbeddedModel should be created/updated during call to save/create/update.
This way allows to use EmbeddedSerializer separately to implement nested or complicated APIs for embedded list items. (see new test_embedded.py::TestEmbeddedIntegration)
This was the matter of my recent changes.
As for your issue #175 you probably need to take TestCase from test_dumb.py::TestIntegration.
And, keep in mind the difference between serializer.data and serializer.validated_data:
data is dictionary of serialized primitive types, ready to be jsonified;
validated_data is dictionary of parsed attribute values, ready to be passed to Model constructor.
Thus, ModelClass(**validated_data) creates unsaved instance of an object. Saving an instance is skipped for EmbeddedDocs.

@qwiglydee Thanks for the details. So, after sitting in the debugger for quite a while, I came to conclusion that, in fact, the test is correct, but it's DRF-Mongoengine's functioning is wrong - it just relies on DRF's to_internal_value() for DynamicDocumentSerializer and DocumentSerializer: in validated_data the value, corresponding to EmbeddedDocumentSerializer, is an OrderedDict, instead of the expected Mongoengine's EmbeddedDocument.

In recent changes in master the EmbDocSerizlizer should indeed produce OrdeeredDict in validated_data, and an instance in save.
It is tested in TestEmbeddedIntegration and TestEmbeddingIntegration.
But there is no tests on validated_data itself for EmdDocSerializer and to_internal value for EmbDocField and EmbDocListField.
This should go at TestEmbeddedIntegration.test_parse, TestEmbeddingIntegration.test_parse and new TestEmbDocField
I'm going to fix that stuff ASAP (probably tomorrow or at monday). You are welcome with patches if you working on it right now.
Also, DynamicDocument is probably wrong with to_internal_value. And it also need to test_parse.
Also, the master is not intended to be a ready-to-use release, it is indeed just a head of developing.
This is what those badges will show cleanly.
But I'm not sure how those badges work - are they generated separately for each and every commit or only for heads?

@qwiglydee Got it. Besides, so far EmbeddedDocumentSerializer does produce OrderedDict in validated_data. It converts them into a mongoengine object in update(), calling to_instance_value(). So, I take it, redesign is already underway.
As for the badges, they reflect the state of testes for current head. Travis-CI tests all the configurations, specified in .travis.ci job matrix and if any of them is failing, it says that build is failing. I'm not sure about how Codecov works. It gets coverage report from successful travis tasks and analyzes it. If some tasks don't generate the report (such as py27-pylint), badge still generates percentage statistics.

ok


Add dev docs for Localization

Summary of the Pull Request
What is this about?
This PR documents the localization pipeline and all the scripts used. In addition to this, the steps for localizing a new project have been added.
The docs can be viewed at https://github.com/arjunbalgovind/PowerToys/blob/user/arbalgov/locDocs/doc/devdocs/localization.md
PR Checklist

[X] Applies to #7204
[X] CLA signed. If not, go over here and sign the CLA

/azp run

/azp run

/azp run

/azp run

The documentation makes sense - good job!
One thing regarding C++ project - I wonder why do we generate the .rc file and use it as a "main" .rc which contains all other resources by passing them to the resx->rc script, and no the other way around, i.e. having that .rc/header reside in Generated Files\loc\ dir and include them from the "main" .rc? That could simplify adding multiple resource types in C++ projects.

I'm not completely clear, but are you suggesting separate rc files for each language (which are generated) and we include them in a base .rc file (which is not generated)? If so, that is definitely a good option as well, hadn't thought of that at the time when I wrote this code.


getting the issue in api/tasks/{}/annotations/{}  api

Actions before raising this issue

[X] I searched the existing issues and did not find anything similar.
[X] I read/searched the docs

Steps to Reproduce
steps:

login to CVAT.
create new task.
finish the job.
click on 3 dotted menu by jobs section, click on export annotations.
select cvat for images 1.1
click ok.
now in the logs i'm getting the error like

ERROR:    Exception in ASGI application                                                                                Traceback (most recent call last):                                                                                File "/opt/venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi                                                                 result = await app(  # type: ignore[func-returns-value]                                                                                File "/opt/venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in call                                                                       return await self.app(scope, receive, send)                                                                                File "/opt/venv/lib/python3.10/site-packages/django/core/handlers/asgi.py", line 160, in call                                                                             await self.handle(scope, receive, send)                                                                                File "/opt/venv/lib/python3.10/site-packages/django/core/handlers/asgi.py", line 190, in handle                                                                               await self.send_response(response, send)                                                                                File "/opt/venv/lib/python3.10/site-packages/django/core/handlers/asgi.py", line 289, in send_response                                                                        await send(                                                                                File "/opt/venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 577, in send                                                                     raise RuntimeError("Response content shorter than Content-Length")                                                                                RuntimeError: Response content shorter than Content-Length

#7217
signal.py:
try:
_export_annotations(db_instance=db_task,
rq_id="/api/v1/tasks/{}/annotations/{}".format(db_task.id,"CVAT for images 1.1"),
request="Get",
action='',
callback=dm.views.export_task_annotations,
format_name="CVAT for images 1.1",
filename="annotation.zip",
location_conf=location_conf1
)
except Exception as e:
print("Error in download api cvat server")
print("Error: " ,e)
time.sleep(5)
print("after export annotation")
annotation_export_path="/home/django/data/tasks/{}/export_cache/annotations_cvat-for-images-11.ZIP".format(db_task.id)
data= {"file_id":db_task.name,"status" : "completed"}
annotated_files={"annotation_xml":open(annotation_export_path,"rb")}
url= BASE_url+"annotation/update/status/"
r = requests.post(url, data=data,files=annotated_files)
pass
except Exception as e:
print("error in sandbox backend api")
print(e)
_export_annotation():
def _export_annotations(db_instance, rq_id, request, format_name, action, callback,
filename, location_conf):
if action not in {"", "download"}:
raise serializers.ValidationError(
"Unexpected action specified for the request")
format_desc = {f.DISPLAY_NAME: f
    for f in dm.views.get_export_formats()}.get(format_name)
if format_desc is None:
    raise serializers.ValidationError(
        "Unknown format specified for the request")
elif not format_desc.ENABLED:
    return Response(status=status.HTTP_405_METHOD_NOT_ALLOWED)
print("at the time of queue")
queue = django_rq.get_queue(settings.CVAT_QUEUES.EXPORT_DATA.value)
rq_job = queue.fetch_job(rq_id)
print("after getting  queue  : " , rq_job)
if rq_job:
    print("inside rq_job")
    last_instance_update_time = timezone.localtime(db_instance.updated_date)
    if isinstance(db_instance, Project):
        tasks_update = list(map(lambda db_task: timezone.localtime(db_task.updated_date), db_instance.tasks.all()))
        last_instance_update_time = max(tasks_update + [last_instance_update_time])
    rq_request = rq_job.meta.get('request', None)
    request_time = rq_request.get('timestamp', None) if rq_request else None
    if request_time is None or request_time < last_instance_update_time:
        rq_job.cancel()
        rq_job.delete()
    else:
        if rq_job.is_finished:
            print("inside job finished")
            file_path = rq_job.return_value()
            if action == "download" and osp.exists(file_path):
                rq_job.delete()

                timestamp = datetime.strftime(last_instance_update_time,
                    "%Y_%m_%d_%H_%M_%S")
                filename = filename or \
                    "{}_{}-{}-{}{}".format(
                        db_instance.__class__.__name__.lower(),
                        db_instance.name if isinstance(db_instance, (Task, Project)) else db_instance.id,
                        timestamp, format_name, osp.splitext(file_path)[1]
                    ).lower()

                # save annotation to specified location
                print("before get location")
                location = location_conf.get('location')
                if location == Location.LOCAL:
                    return sendfile(request, file_path, attachment=True,
                        attachment_filename=filename)
                elif location == Location.CLOUD_STORAGE:
                    try:
                        storage_id = location_conf['storage_id']
                    except KeyError:
                        print("key Error")
                        return HttpResponseBadRequest(
                            'Cloud storage location was selected as the destination,'
                            ' but cloud storage id was not specified')
                    db_storage = get_cloud_storage_for_import_or_export(
                        storage_id=storage_id, request=request,
                        is_default=location_conf['is_default'])
                    storage = db_storage_to_storage_instance(db_storage)

                    try:
                        print("upload to storage")
                        storage.upload_file(file_path, filename)
                    except (ValidationError, PermissionDenied, NotFound) as ex:
                        msg = str(ex) if not isinstance(ex, ValidationError) else \
                            '\n'.join([str(d) for d in ex.detail])
                        return Response(data=msg, status=ex.status_code)
                    return Response(status=status.HTTP_200_OK)
                else:
                    raise NotImplementedError()
            else:
                if osp.exists(file_path):
                    print("succes with 201")
                    return Response(status=status.HTTP_201_CREATED)
        elif rq_job.is_failed:
            exc_info = rq_job.meta.get('formatted_exception', str(rq_job.exc_info))
            rq_job.delete()
            return Response(exc_info,
                status=status.HTTP_500_INTERNAL_SERVER_ERROR)
        else:
            print("success with 202")
            return Response(status=status.HTTP_202_ACCEPTED)

try:
    if request.scheme:
        server_address = request.scheme + '://'
    server_address += request.get_host()
except Exception:
    print("after rq_job : " ,Exception)
    server_address = None

TTL_CONSTS = {
    'project': dm.views.PROJECT_CACHE_TTL,
    'task': dm.views.TASK_CACHE_TTL,
    'job': dm.views.JOB_CACHE_TTL,
}
ttl = TTL_CONSTS[db_instance.__class__.__name__.lower()].total_seconds()
user_id = request.user.id
print(queue, " : queue", user_id, " : user_id")
with get_rq_lock_by_user(queue, user_id):
    queue.enqueue_call(
        func=callback,
        args=(db_instance.id, format_name, server_address),
        job_id=rq_id,
        meta=get_rq_job_meta(request=request, db_obj=db_instance),
        depends_on=define_dependent_job(queue, user_id),
        result_ttl=ttl,
        failure_ttl=ttl,
    )
print("return succes with 202")
return Response(status=status.HTTP_202_ACCEPTED)

Hello @hemanth1225
Does it affect your experience?

later in the functions i added some code snippet, but due to exception it is exiting from here. it is required to resolve this.
thank you in advance

I'm seeing this issue randomly in 2.9.2 also.  Some projects I can export all of the tasks without issue, others seem to choke after the first few tasks have been exported via the API.
`2023-12-27 14:40:40,362 DEBG 'uvicorn-0' stdout output:
INFO:     <IP_ADDRESS>:0 - "POST /api/auth/login HTTP/1.0" 200 OK
2023-12-27 14:40:40,389 DEBG 'uvicorn-0' stdout output:
INFO:     <IP_ADDRESS>:0 - "GET /api/labels?project_id=12&page_size=100000 HTTP/1.0" 200 OK
2023-12-27 14:40:40,499 DEBG 'uvicorn-0' stdout output:
INFO:     <IP_ADDRESS>:0 - "GET /api/tasks?project_id=12&page_size=100000 HTTP/1.0" 200 OK
2023-12-27 14:40:40,535 DEBG 'uvicorn-1' stdout output:
INFO:     <IP_ADDRESS>:0 - "GET /api/tasks/937/dataset?format=COCO%201.0&filename=5420-142252_1646048460_tray_142252 HTTP/1.0" 202 Accepted
2023-12-27 14:40:40,566 DEBG 'uvicorn-1' stdout output:
INFO:     <IP_ADDRESS>:0 - "GET /api/tasks/937/dataset?format=COCO%201.0&filename=5420-142252_1646048460_tray_142252 HTTP/1.0" 201 Created
2023-12-27 14:40:40,599 DEBG 'uvicorn-1' stdout output:
INFO:     <IP_ADDRESS>:0 - "GET /api/tasks/937/dataset?format=COCO%201.0&filename=5420-142252_1646048460_tray_142252&action=download HTTP/1.0" 200 OK
2023-12-27 14:40:40,599 DEBG 'uvicorn-1' stderr output:
ERROR:    Exception in ASGI application
Traceback (most recent call last):
File "/opt/venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi
result = await app(  # type: ignore[func-returns-value]
File "/opt/venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
File "/opt/venv/lib/python3.10/site-packages/django/core/handlers/asgi.py", line 160, in call
await self.handle(scope, receive, send)
File "/opt/venv/lib/python3.10/site-packages/django/core/handlers/asgi.py", line 190, in handle
await self.send_response(response, send)
File "/opt/venv/lib/python3.10/site-packages/django/core/handlers/asgi.py", line 289, in send_response
await send(
File "/opt/venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 577, in send
raise RuntimeError("Response content shorter than Content-Length")
RuntimeError: Response content shorter than Content-Length
2023-12-27 14:40:40,845 DEBG 'uvicorn-1' stdout output:
INFO:     <IP_ADDRESS>:0 - "GET /api/jobs?task_id=937&page_size=100000 HTTP/1.0" 200 OK
2023-12-27 14:40:40,887 DEBG 'uvicorn-0' stdout output:
INFO:     <IP_ADDRESS>:0 - "GET /api/jobs?task_id=937&page_size=100000 HTTP/1.0" 200 OK
2023-12-27 14:40:40,926 DEBG 'uvicorn-0' stdout output:
INFO:     <IP_ADDRESS>:0 - "GET /api/jobs/28257/data/meta HTTP/1.0" 200 OK
2023-12-27 14:40:41,083 DEBG 'uvicorn-0' stderr output:
[2023-12-27 14:40:41,082] ERROR django.request: Internal Server Error: /api/tasks/936/dataset
Traceback (most recent call last):
File "/opt/venv/lib/python3.10/site-packages/asgiref/sync.py", line 534, in thread_handler
raise exc_info[1]
File "/opt/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 42, in inner
response = await get_response(request)
File "/opt/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 253, in _get_response_async
response = await wrapped_callback(
File "/opt/venv/lib/python3.10/site-packages/asgiref/sync.py", line 479, in call
ret: _R = await loop.run_in_executor(
File "/opt/venv/lib/python3.10/site-packages/asgiref/current_thread_executor.py", line 40, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/venv/lib/python3.10/site-packages/asgiref/sync.py", line 538, in thread_handler
return func(*args, **kwargs)
File "/opt/venv/lib/python3.10/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view
return view_func(*args, **kwargs)
File "/opt/venv/lib/python3.10/site-packages/rest_framework/viewsets.py", line 125, in view
return self.dispatch(request, *args, **kwargs)
File "/opt/venv/lib/python3.10/site-packages/rest_framework/views.py", line 509, in dispatch
response = self.handle_exception(exc)
File "/opt/venv/lib/python3.10/site-packages/rest_framework/views.py", line 469, in handle_exception
self.raise_uncaught_exception(exc)
File "/opt/venv/lib/python3.10/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
raise exc
File "/opt/venv/lib/python3.10/site-packages/rest_framework/views.py", line 506, in dispatch
response = handler(request, *args, **kwargs)
File "/home/django/cvat/apps/engine/views.py", line 1511, in dataset_export
return self.export_annotations(
File "/home/django/cvat/apps/engine/mixins.py", line 405, in export_annotations
return export_func(db_instance=self._object,
File "/home/django/cvat/apps/engine/views.py", line 3010, in _export_annotations
if osp.exists(file_path):
File "/usr/lib/python3.10/genericpath.py", line 19, in exists
os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType
2023-12-27 14:40:41,084 DEBG 'uvicorn-0' stdout output:
INFO:     <IP_ADDRESS>:0 - "GET /api/tasks/936/dataset?format=COCO%201.0&filename=5420-142253_1646050452_tray_142253 HTTP/1.0" 500 Internal Server Error
2023-12-27 14:40:43,622 DEBG 'uvicorn-1' stdout output:
INFO:     <IP_ADDRESS>:0 - "GET /api/auth/rules HTTP/1.0" 304 Not Modified
`

The same tasks also throws an error 500 exporting through the web UI - exporting a different format does not throw an error and works as expected.

switching from v2.9.2 to dev seems to have fixed the issue.

I see the same in logs. Hope this will be resolved

I see the logs in 2.13.0 also. Currently try-catching, but this isn't a great solution on my end.

I see the same in logs 2.15.0

I encountered this situation in v2.19 as well. I was able to export normally in the afternoon, but when I tried to export the configuration file in the evening, it showed that the file did not exist. Checking the logs revealed the following error:
cvat_server                    | 2024-09-24 15:53:17,017 DEBG 'uvicorn-1' stdout output: cvat_server                    | INFO:     <IP_ADDRESS>:0 - "GET /api/auth/rules HTTP/1.0" 200 OK cvat_server                    |  cvat_server                    | 2024-09-24 15:53:26,262 DEBG 'uvicorn-1' stdout output: cvat_server                    | INFO:     <IP_ADDRESS>:0 - "GET /api/tasks/5/annotations?org=Annotation&filename=9.zip&format=CVAT+for+images+1.1&save_images=false&action=download HTTP/1.0" 200 OK cvat_server                    |  cvat_server                    | 2024-09-24 15:53:26,262 DEBG 'uvicorn-1' stderr output: cvat_server                    | ERROR:    Exception in ASGI application cvat_server                    | Traceback (most recent call last): cvat_server                    |   File "/opt/venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 435, in run_asgi cvat_server                    |     result = await app(  # type: ignore[func-returns-value] cvat_server                    |   File "/opt/venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__ cvat_server                    |     return await self.app(scope, receive, send) cvat_server                    |   File "/opt/venv/lib/python3.10/site-packages/django/core/handlers/asgi.py", line 160, in __call__ cvat_server                    |     await self.handle(scope, receive, send) cvat_server                    |   File "/opt/venv/lib/python3.10/site-packages/django/core/handlers/asgi.py", line 190, in handle cvat_server                    |     await self.send_response(response, send) cvat_server                    |   File "/opt/venv/lib/python3.10/site-packages/django/core/handlers/asgi.py", line 289, in send_response cvat_server                    |     await send( cvat_server                    |   File "/opt/venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 577, in send cvat_server                    |     raise RuntimeError("Response content shorter than Content-Length") cvat_server                    | RuntimeError: Response content shorter than Content-Length cvat_server                    |  cvat_server                    | 2024-09-24 15:53:26,635 DEBG 'uvicorn-0' stderr output: cvat_server                    | [2024-09-24 15:53:26,635] WARNING django.request: Bad Request: /api/tasks/5/annotations cvat_server                    |  cvat_server                    | 2024-09-24 15:53:26,635 DEBG 'uvicorn-0' stdout output: cvat_server                    | INFO:     <IP_ADDRESS>:0 - "GET /api/tasks/5/annotations?org=Annotation&filename=9.zip&format=CVAT+for+images+1.1&save_images=false&action=download HTTP/1.0" 400 Bad Request


x/*: review tests skipped on darwin/arm64 after Go 1.17 release

Go 1.16 renamed the iOS port from darwin/arm64 to ios/arm64 anddarwin/arm64 was repurposed for the macOS ARM64 port (see https://golang.org/doc/go1.16#darwin). Thegolang.org/x/* repositories were updated to use the new ios build tag to skip certain tests on IOS, but they also needed to retain the old runtime.GOOS == "darwin" && (runtime.GOARCH == "arm64" || runtime.GOARCH == "arm") checks due to Go 1.15 compatibilty. In some cases this leads to tests being unnecessarily skipped with Go 1.16 on darwin/arm64, see e.g. https://golang.org/cl/312250.
Once Go 1.17 is released and thus Go 1.16 becomes the oldest supported release per https://golang.org/doc/devel/release.html#policy, we might be able to remove some of the old GOOS == "darwin" && (GOARCH == "arm64" || GOARCH === "arm") checks and thus increase the test coverage for the macOS ARM64 port in the golang.org/x/* repos.
Some examples:
https://go.googlesource.com/sys/+/33663a62ff0820461192226283cafe57a83ac6b7/unix/syscall_unix_test.go#169
https://go.googlesource.com/sys/+/33663a62ff0820461192226283cafe57a83ac6b7/unix/syscall_unix_test.go#491
https://go.googlesource.com/net/+/4e50805a0758a198d5c9ea96b2e8dacd7338f2ee/nettest/nettest.go#102
https://go.googlesource.com/term/+/f5beecf764ed751c785fa21705385df593b1852d/terminal_test.go#410

Hi @tklauser, I'll work on it.

@justplesh Thanks. Please note that we can only submit these changes once Go 1.17 is released, otherwise we'd break tests on Go 1.15 which is still supported until then. This issue for now is many here so we don't forget to review these tests once Go 1.17 is out.

@tklauser Okay, sure, got you. How do you think, does it make sense to create the PR with changes now and merge it as soon as Go 1.17 will be released or a lot of changes will be made and it will make more sense to wait until the 1.17 release?

I think it's probably easier to send these changes once 1.17 is released. That way we can make sure all cases are covered and it might safe some trouble with rebases and/or merge conflicts.

Okay, I'll get back as soon, as 1.17 will be released :)

@tklauser so I guess I can start working on it?

@justplesh Yes, feel free to send CLs addressing this.

Some examples:
https://go.googlesource.com/sys/+/33663a62ff0820461192226283cafe57a83ac6b7/unix/syscall_unix_test.go#169 https://go.googlesource.com/sys/+/33663a62ff0820461192226283cafe57a83ac6b7/unix/syscall_unix_test.go#491 https://go.googlesource.com/net/+/4e50805a0758a198d5c9ea96b2e8dacd7338f2ee/nettest/nettest.go#102 https://go.googlesource.com/term/+/f5beecf764ed751c785fa21705385df593b1852d/terminal_test.go#410

These and a few more instances were fixed in the CLs linked by GopherBot. I think this issue can be closed.


Wish History on Linux

If someone needs to get history easily on Linux without manually opening data_2, here's a Bash script
#!/usr/bin/env bash
set -e
GIPATH="."

function get_path_from_pid() {
	# tee eats the status value
	_pid=$(pgrep -f -- "GenshinImpact.exe" | tee)
	if [ -z "$_pid" ]; then
		_pid=$(pgrep -f -- "YuanShen.exe" | tee)
	fi
	[ -z "$_pid" ] && echo "Game process not found" && exit 1
	GIPATH=$(pwdx "$_pid")
	GIPATH=${GIPATH#*\ } # remove leading "pid: "
}

get_path_from_pid

# Get the most recently modified "data_2" file: ISO timestamp + absolute path
CACHEFILE=$(find "$GIPATH" -type f -wholename '*/Cache_Data/data_2' -printf "%T+ %p\n" | sort | tail -n 1)
CACHEFILE=${CACHEFILE#*\ } # remove leading timestamp
echo "Found cache file: $CACHEFILE"
echo "===== Matching links:"

strings "$CACHEFILE" | grep -o "https://.*/e20190909gacha-v2/.*" | tail -n1

Hi, I was just testing this and I think the url has changed from e20190909gacha-v2 to e20190909gacha-v3.

Hi, I was just testing this and I think the url has changed from e20190909gacha-v2 to e20190909gacha-v3.

Yeah, better use this script. https://notabug.org/Krock/dawn/src/master/compat/get_gacha_url.sh
#!/usr/bin/env bash
# DESCRIPTION
#     Extracts the gacha URL from the Chromium Embedded Framework cache.
#     The file paths are detected automatically based on the game process ID
#     and executable path.
#
# NOTES
#     This script currently returns the last URL in the cache file, which
#     usually works but is not entirely reliable.
#
# EXIT STATUS
#     0 on success

set -e
GIPATH="."

function get_path_from_pid() {
	# tee eats the status value
	_pid=$(pgrep -f -- "GenshinImpact.exe" | tee | head -1)
	if [ -z "$_pid" ]; then
		_pid=$(pgrep -f -- "YuanShen.exe" | tee | head -1)
	fi
	[ -z "$_pid" ] && echo "Game process not found" && exit 1
	GIPATH=$(pwdx "$_pid")
	GIPATH=${GIPATH#*\ } # remove leading "pid: "
}

get_path_from_pid

# Get the most recently modified "data_2" file: ISO timestamp + absolute path
CACHEFILE=$(find "$GIPATH" -type f -wholename '*/Cache_Data/data_2' -printf "%T+ %p\n" | sort | tail -n 1)
CACHEFILE=${CACHEFILE#*\ } # remove leading timestamp
echo "Found cache file: $CACHEFILE"
echo "===== Matching links:"

strings "$CACHEFILE" | grep -o "https://.*/e20190909gacha-v3/.*" | tail -n1```

Oh, thx, I'll bookmark that.


Startup performance is poor (v0.2.24)

when loading the app (or reloading) it takes ~8-10 seconds to come up.

i did this comparison of startup times. the two pie charts on the left are V1, the 2 on the right are V2. note the load time.

Very interesting - Thanks Phil!


⚠ Minecraft has degraded performance

In 95c2671, Minecraft (https://www.minecraft.net) experienced degraded performance:

HTTP code: 200
Response time: 1274 ms

Resolved: Minecraft performance has improved in 603984d.


Update main.go

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Files with missing lines
Coverage Δ

main.go
0.00% <ø> (ø)


CMake Error when installing mmperf

I tried to run mmperf on my server. I used git shallow clone to pull down just the latest commits, not the entire repo. Then I executed the following instructions in command line, as showed in the README.md:
python3 -m venv ./mmperf_env
source mmperf_env/bin/activate
pip install -r requirements.txt
pip install -r ./external/llvm-project/mlir/python/requirements.txt
cmake -GNinja     -DCMAKE_CXX_COMPILER=clang++-11     -DCMAKE_C_COMPILER=clang-11     -DUSE_MLIR=ON     -B build .
sudo cmake --build build

But when I executed sudo cmake --build build, I got CMake Error:
CMake Error at docs/cmake_install.cmake:46 (file):
  file INSTALL cannot find
  "/home/cmy/mmperf/build/mlir/docs/ocamldoc/html/.": No such file or
  directory.
Call Stack (most recent call first):
  cmake_install.cmake:85 (include)

Can you try to uninstall the system OCaml ? I think llvm is trying to build with your version of OCaml and is failing.

Thanks for your response! I uninstalled OCaml. Now building is successfully finished.


Consider using mu (µ) character in render method

Since Python 3 fully supports unicode, the mu character, µ, could be used as output in the render method.

https://physics.nist.gov/cuu/Units/prefixes.html

Making:
>>> Rsense = Quantity('1e-4Ω')
>>> print(Rsense)
100 uΩ

>>> Rsense = Quantity('1e-4Ω')
>>> print(Rsense)
100 µΩ

Since Unicode is already required for things like Ohms, this seems reasonable to me, and perhaps should be the default? Or  maybe an opt-in?

Unicode is also already used for temperature:
>>> Tboil = Quantity('212 °F', scale='°C')
>>> print(Tboil)
100 °C

µ is available, its use on output is just not the default. You can use the map_sf preference to get what you want in the current version.
>>> with Quantity.prefs(map_sf=Quantity.map_sf_to_greek):
...     print(Quantity('mu0').render(show_label='f'))
µ₀ = 1.2566 µH/m -- permeability of free space

The reason that using µ is not the default is because one of the original applications of quantiphy is to help in the generation of Verilog-AMS code, which accepts SI scale factors, but only using ASCII characters.  I have recently added the sia form, which is like the si form except that it is constrained to use the original ASCII versions of the scale factors. Now that I have the sia form I could change si to use µ by default. Doing so might cause backward-compatibility issues.  I will spend some time thinking about this.
Be aware the situation is a bit more complicated than it first appears because there are two unicode symbols that could be used: µ and μ. One is the symbol for the Greek character mu and the other is intended to represent micro.  So now the question becomes which should QuantiPhy use. Micro would seem to be the obvious choice, but it is less well supported. Both symbols render identically in most fonts, so it is a non-issue as long as the text is being displayed and both symbols are supported by the font set. However, any program that reads the text must be written accordingly.

That works, thanks!
Is there a way to use the Greek symbols without mutating the global Quantity class?
Thanks also for the background, would not have thought there were two mu's. 😕

I really love this library by the way. Thank you for it! ❤

Thanks! It is software that I have be using and polishing for decades. Started out as C code and there have been several versions in Python. QuantiPhy itself was produced after a lively discussion on the python-ideas mailing list after I proposed adding SI scale factors to the base language.  It always seemed strange to me that SI scale factors have been an international standard  for more than 50 years that is well adopted in both the scientific and engineering communities and is gaining acceptance in popular culture, and yet no general purpose programming languages support them. And its not like it would be very hard.

Is there a way to use the Greek symbols without mutating the global Quantity class?

There are a few things you can do. First, you can use prefs() rather than set_prefs() if you only want the unicode version in a particular place.
>>> with Quantity.prefs(map_sf=Quantity.map_sf_to_greek):
...     print(Quantity('mu0'))
1.2566 µH/m

Or, you can subclass Quantity if you want to have some quantities that use unicode and others that do not:
>>> class Quant(Quantity):
...     pass
>>> Quant.set_prefs(map_sf=Quantity.map_sf_to_greek)
>>> print(Quantity('µ₀'))
1.2566 uH/m
>>> print(Quant('µ₀'))
1.2566 µH/m

In flicker_noise I have a situation where I have to be able to print the same numbers in either ASCII or unicode. To accomplish that I set Quantity to use unicode by default and then use form='sia' when I need ASCII.
>>> Quantity.set_prefs(map_sf=Quantity.map_sf_to_greek)
>>> print(Quantity('µ₀'))
1.2566 µH/m
>>> print(Quantity('µ₀').render(form='sia')
1.2566 uH/m

The context manager form was exactly what I was looking for. Is this mentioned in the docs? Perhaps it could be a good addition (unless I missed it).
Thanks!

It is mentioned in Preferences, near the end of the section.

Ah there it is. I missed it. I will close this issue as the feature already exists.
Thanks for the information!


Weird analyzer error

ERROR: Evaluation of this constant expression throws an exception.

Dart VM version: 1.23.0-edge.affb7865826160978c43a112b3da8c95cd22fb72 (Tue Feb 14 07:37:13 2017) on "linux_x64"

Any idea how to reproduce this?

@bwilkerson actually no.
That's quite a complex project and it shows only in these two files, but there are a lot of similar files.
Also restarting the analysis server didn't change anything
A suspicion is that it might be related to #28780 where dart2js throws because it thinks it's not a valid constant expression.
This file is in the same directory ('lib/model')

It's definitely caused by #28780.
I published the project https://github.com/bwu-dart-playground/dartsdk_issue_28780/blob/master/lib/model/property_metadata.dart#L15

Dart VM version: 1.23.0-edge.bb72892e335f2ab69aeb0ef3dec5d7f150c80953 (Fri Feb 17 16:16:58 2017) on "linux_x64"


Change the icon image displayed next to the webpage title

Hi,
Is there any way to change the icon image displayed next to the webpage title? By default, it shows a  doctoral hat.
A similar question is described in here. But I don't know where to apply these changes in Academic theme.
https://stackoverflow.com/questions/11488960/how-do-i-put-my-websites-logo-to-be-the-icon-image-in-browser-tabs

This feature is documented here: https://sourcethemes.com/academic/docs/customization/#website-icon

After updating & saving icon.png & icon-192.png to static/img/ in root the icon is still a doctoral hat. I have tried updating in the theme root as well as website root & still not updating. I have tried re-loading the hugo site & still not updating. Am I missing something in the sourcethemes documentation?

Try placing the icon.png & icon-192.png in the public/img, where the 'public' folder is the one to be deployed on the server. I got the 'public' folder by executing command 'hugo' at my site root directory. Clear browser when you view the new site.

Don't mean to necro this but I am running into similar issues. I believe I have the correct images (and sizes) in the correct place but it is not updating on Firefox/Chrome/Mobile even after full browser clears. I can't even find the little Hugo-Academic logo anywhere in my folders. Anyone mind taking a look and seeing what might be wrong with my setup?

I had this issue too.  For me the problem was that the documentation says to add files icon-32.png (32x32 pixels), icon-192.png (192x192 pixels), and icon-512.png whereas in reality I needed to add a file named icon.png that was 32x32.
By adding a file named icon.png (32x32) I resolved my issue without ever needing to manually update the public folder.

Same problem here, and none of the above fixes worked. When I ran hugo, it threw an error about the alert  in publications.md also not functioning and I had to comment it out.

Also be sure you actually saved a .png files and not a different type of file named icon-32.png

Logo of Hugo theme is not friendly even i try to create /partial/logo.png does not upload new logo. Dashboard panel is https://app.forestry.io/ is easy to navigate to problem i am stock is changing the logo. Cannot find the right dir.  Need help ? Other tutorials say /static/images/logo.png stil doesn't work at all.

ifiying the line in params.toml where it says sharing_image = "icon-32.png". I did all of this before without the public folder with the name being as I have here stated it, and it didn't work. Somewhere, this apparently makes that part work.

The link to https://sourcethemes.com/academic/docs/customization/#website-icon is dead.


SSL Errors connecting to MariaDB

I'm not sure if this is an issue with this repo, or a problem with the MariaDB C Connector library, but starting with this commit 4a4da20690902232d834be8374dd97ed85ade59b I am receiving errors when trying to connect to a MariaDB server after building with docker.io/blackdex/rust-musl:x86_64-musl-stable-1.82.0.
TLS/SSL error: SSL is required, but the server does not support it
With no code changes, compiled within the previous stable release container (docker.io/blackdex/rust-musl:x86_64-musl-stable-1.81.0) everything works as usual.

@stevenwcarter thanks for reporting.
I reverted back to v3.3.11. images are building as i typ.

Thanks, I've tested with the updated version and it is working again. My gut says this wasn't a problem with your setup, but rather something in the MariaDB C connector library or the Rust connector for it. Looking at the release notes for the C connector I saw a few changes related to SSL handling, but I haven't dug in.
Also, I want to say thank you for creating this builder toolchain. I was banging my head against my desk about a year ago trying to get a musl build working with mysql/mariadb. This has been an absolute lifesaver. I also self-host VaultWarden, so thank you for that too!

It looks like it is a default setting which is changed.
https://jira.mariadb.org/plugins/servlet/mobile#issue/MDEV-31857
I have not yet tested it, but i suspect that is the issue. I'll probably set that to off too be able to use the newer version to keep it compatible.

I tried to use that setting, but it doesn't seem to keep the connection settings the same.
I am required to provide ssl_ca, and then it works. But that wasn't needed before.
So, it's not very upgrade-able friendly.
Will keep at 3.3.11 for now and see if i can figure out why this is the case now when i have more time.


Craeted a new branch for Object 2.svg

According to issue #2 I added file 2.svg file to the requirement.
Hope it resolves the issue this time. Kindly give reviews on it.

Hi @haritmohanta,
This looks good.
I kindly ask you to make a new branch for every new pull request that you make like you did with this one.
You may have seen with master that if you keep pushing on the same branch you will update the pull request that is associated with it, so it's better to keep them separated. Thanks

Hi @haritmohanta,
This looks good.
I kindly ask you to make a new branch for every new pull request that you make like you did with this one.
You may have seen with master that if you keep pushing on the same branch you will update the pull request that is associated with it, so it's better to keep them separated. Thanks

Thanks a lot for the guidance.


Add crate: dfdx

Please add crate to category: Neural Networks
If you're open to multiple categories, I think dfdx could also be added to Reinforcement Learning (I have some examples of a Deep Q Network and Proximal Policy Optimization).
github: https://github.com/coreylowman/dfdx
crates.io: https://crates.io/crates/dfdx
docs.rs: https://docs.rs/dfdx/latest/dfdx/

Resolved by #122


Deprecate Windows .bat scripts

What does this PR do?
Replaces several Windows .bat build scripts with PowerShell and Python invoke
Adds PowerShell helper Invoke-BuildScript that performs the setup that was common to every .bat file, such as moving into the container filesystem, installing go deps, setting PATH, etc. These actions can be controlled by script parameters so, for example, you don't have to wait for inv -deps on every local build...
Only modifies the Agent and Installer build scripts/CI Jobs, other .bat files to be migrated in future PRs.
Removes the libyajl2 patch installation, it doesn't seem to be needed anymore.
Motivation
Reduce time wasted on .bat syntax limitations and idiosyncrasies
Reduce duplicated and complex .bat commands
Describe how you validated your changes

Ensure the Agent and Installer builds still work
Ensure go mod cache is extracted
Ensure change to .go-version is caught
Possible Drawbacks / Trade-offs
Additional Notes

stacked on https://github.com/DataDog/datadog-agent/pull/31466

/merge


Getting a bone ready for the drivable bot

We need some one to setup a bone with two nicks and install the code base.
Also, test to make sure that the app can connected to the bot.
It's kind of important to be able to control the bot.

The bone on the bot has been setup with the niks and the code base as of yesterday.
The motor's and server are yet to be tested.

I have tested the motors and servos for each wheel and taken current measurements, everything seems to be working and now Ahmed is going to test the computer-vision camera


Upgrade to latest Layer0, and Add GitHub Workflow

You should use this workflow for 1-click deploy: https://github.com/layer0-docs/layer0-nextjs-example/blob/master/.github/workflows/layer0.yml . What you currently have will not work because environments aren't setup for the user.

It should work I think given that it deploys to default for the main branch (which is the branch created with a new deployment). Let me fetch you an example.

An example: https://github.com/rishi-raj-jain/test-layer0-gatsby-example
Deployed with App.layer0.deploy: https://github.com/rishi-raj-jain/test-layer0-gatsby-example/runs/4357065166?check_suite_focus=true

You should use this workflow for 1-click deploy: https://github.com/layer0-docs/layer0-nextjs-example/blob/master/.github/workflows/layer0.yml . What you currently have will not work because environments aren't setup for the user.

Thanks for that tip, updated.


Missing word_vector_50 file

Where can i find the file located at
line 190
string n_w_string = "../../../word2vec-41/word_vector_" + ss.str() + ".txt";

I think you need to generate this file by yourself using GloVe or Word2Vec. They didn't provide it in the data.rar.

同问，找了相关链接
http://word2vec.googlecode.com/svn/trunk/，结果显示已失效，可否提供一份数据和代码。


Creation of a separate code of conduct file

The code of conduct in the readme is not that proficient so it's better to add a separate code of conduct.
Let me know.
Do add the swoc'21  and level tags to it

@Sloth-Panda  You can update the code of conduct file.

@Sloth-Panda  You can update the code of conduct file.


Support building with latest .net sdk (2.1.2)

If you only install the latest .net SDK (by itself) you can't build the full node. You either have to go back and install 2.0 or bump the version in global.json to the installed SDK version
You get this error:
"The current .NET SDK does not support targeting .NET Core 2.0. Either target .NET Core 1.1 or lower, or use a version of the .NET SDK that supports .NET Core 2.0"
This has been reported both by @D3m0nKingx  (on linux) and @MithrilMan (on Windows)

I confirm this running in Linux the error reported is:
The specified SDK version [2.0.0] from global.json [/home/ader/coins/StratisBitcoinFullNode/src/global.json] not found; install specified SDK version
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
  http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

I am able to build if i change the versioning in the global.json file to 2.1.3 that I have installed:
ii  dotnet-host                                                 2.0.4-1                                                      amd64        Microsoft .NET Core Host - 2.0.4
ii  dotnet-hostfxr-2.0.4                                        2.0.4-1                                                      amd64        Microsoft .NET Core Host FX Resolver - 2.0.4 2.0.4
ii  dotnet-runtime-2.0.4                                        2.0.4-1                                                      amd64        Microsoft .NET Core Runtime - 2.0.4 Microsoft.NETCore.App 2.0.4
ii  dotnet-sdk-2.1.3

I think we should remove the global.json file and let the default tooling take care of itself. Looking at the history it seems that this was added in order to support VS2015 in side by side installation with VS2017. See this commit back in March https://github.com/stratisproject/StratisBitcoinFullNode/commit/9debb6cd11e4720643f683127ad5d08d28c5b0b8  I have both VS2015 & VS2017 installed so will try removing and see if this is still an issue.


Video stops after 12 seconds

I tried using the new exolist file to run the project for offline videos using offline DRM but faced a few issues.

The video stops after 12 secs. It looks like exoplayer isn't able to fetch the Widevine License Url.(might be the license has expired or is invalid)

I'm also getting this issue,
Caused by: java.io.FileNotFoundException: /storage/emulated/0/exosample/video/tears_h264_main_480p_2000.mp4: open failed: ENOENT (No such file or directory)
Repository doesn't have this file to add in internal mem.

Thanks in advance

Ans1: Yes my drm video stops after 2 or 3 seconds . I presume the Widevine License Url has expired or invalid. so I place my video and manifest.mpd its work fine.
Ans2: The error is saying that he cannot able to find that path in your phone. Make these folder in your phone and place content of  sample folder  at that specific path then this error gone.


CDN down

CDN down
I´m trying to import materialize css by using cdn but I get 404

It seems it is back up now. We also do not control the servers for CDN hosting.

That's why you should host them locally / on your server.


[Feature]: basic web gui

Is your feature request related to a problem? Please elaborate.
I think a functional web gui would help alot.. I am constantly finding myself wanting to update my collections several times a day, and the only way to do that is to manually run the command via a docker console (running on unraid docker). I think a gui with something as simple as a 'Run' button would make my life infinitely easier.
Describe the solution you'd like
Either a basic web gui with a run button and/or the ability to schedule runs every hour, not once a day.
Additional Information
No response

A Web GUI is planned for future release - there are a couple things to be addressed first, but it is definitely in the pipeline.


display: Increase maximum vertical resolution to 720

Finding the maximum non-buggy horizontal resolution turned out to be more complex as it depends on bandwidth usage on real hardware, which is affected by the color depth and anti-aliasing mode used. Therefore I removed the vertical resolution change as more investigation is needed there.

Thanks


Debugging connection was closed. Reason: Render process gone.

Summary
At larger amounts of followings(500+) on Edge and Chrome the tool appears to halt and crash.
System Environment
AMD Ryzen 5950x
RTX 3080
64GB Ram
Edge Version 107.0.1418.52 (Official build) (64-bit)
Screenshot

How to Reproduce

Open Instagram and login to an account following more than 1000-2000 people
Run code from dev terminal
Wait until the amount searched approaches 1000
An error should occur in terminal and the page should crash.

Suggested Fix
The ability to pause the search until root cause is found; so that unfollowers can be removed in chunks rather than in bulk.

Might be a memory leak. Worth checking out.
Need to see how I can test this since I don't follow that many users on my private account.
In the meantime, if anyone else also faced this issue, please comment here and let us know so we can assess the severity of the situation.

This is happening probably because its rendering 1000 user entities. This should be paginated. This same thing happen on the first version in the early dev one year ago. in console mode it was not happening because it was plain text i guess.
1 option could be to paginate 100 users per page. And optionally a search bar.

Oh I didn't know you've had this issue in the past.
But still, seems strange that a browser would struggle rendering a list of ~1k users.
Then again I might be wrong.
I'll try to reproduce somehow and see what I can find.

Was able to easily reproduce by looping through the results.
@davidarroyo1234 You were right, I guess it is too much for the browser.
Need to see how to manage this. Should be refactored with pagination/intersection-observer/tabs/etc..
In the mean time, the older version that outputs to console still works just fine for anyone who needs it.
Here's the link to that version:
https://github.com/davidarroyo1234/InstagramUnfollowers/tree/84a0488a33c01dbb7edff70437b63cdb4d161a3f
Note to self: Add a ref to this version in the readme as well.

@tomleb3  I'll start doing the pagination thing. Did you start something or can i start this whitout issue?

@davidarroyo1234 Nope, you can go ahead. I thought about starting to do it recently, but couldn't find the time.

o it recently, but could

NP, i was asking to not do the work twice.

Summary
At larger amounts of followings(500+) on Edge and Chrome the tool appears to halt and crash.
System Environment
AMD Ryzen 5950x RTX 3080 64GB Ram
Edge Version 107.0.1418.52 (Official build) (64-bit)
Screenshot

How to Reproduce

Open Instagram and login to an account following more than 1000-2000 people
Run code from dev terminal
Wait until the amount searched approaches 1000
An error should occur in terminal and the page should crash.

Suggested Fix
The ability to pause the search until root cause is found; so that unfollowers can be removed in chunks rather than in bulk.

Could you please check it again with the new update?  Now should not crash due the new pagination integration.


Fixed typo in troubleshoot docs

:wave:
I was browsing through the docs and noticed a small typo.
Nothing big, just a 1-character fix.

@SvanBoxel : Thanks for your contribution! The author, @alexkarcher-msft, has been notified to review your proposed change.

Merging typo fix
@SvanBoxel Thanks!


Add context manager for a kernel

Still WIP, opening to get opinions before I sink time into testing/docs.
Adds a context manager (which can be used as a decorator) for running some code with given kernels loaded. This cuts down on boilerplate and makes the resulting user code more pythonic. The original motivation behind this is because I was using this package for a research project and ended up solving this problem myself organically, then thought the community find use for it too!
Imagine a project who stores the kernels in a different location to the code, and who runs in some third location. An example snippet might be:
from os import chdir, dirname, getcwd
import spiceypy as spice

METAKERNEL = r"/path/to/metakernel.txt"

start_dir = getcwd()
chdir(dirname(METAKERNEL))
spice.furnsh(METAKERNEL)
pos, _ = spice.spkpos(name, times, frame, correction, reference)
spice.unload(METAKERNEL)
chdir(start_dir)

With this change, this would be reduced to:
import spiceypy as spice
from spiceypy.context import SpiceKernel

METAKERNEL = r"/path/to/metakernel.txt"

with SpiceKernel(METAKERNEL):
    pos, _ = spice.spkpos(name, times, frame, correction, reference)

On top of the more pythonic code, there are extra advantages - if an error occurs in the first snippet, it must be handled and the kernels manually unloaded, but because python context managers' exit methods run regardless, the second option should always unload the kernels.
I've intentionally put the context manager in a separate namespace to all the SPICE-mirroring function names, to make clear that this is something extra. It's possible for future updates that the context manager object itself could be caught to do things to the current context, e.g.
with SpiceKernel(METAKERNEL) as krnl:
    pos, _ = spice.spkpos(name, times, frame, correction, reference)
    krnl.add(r"/path/to/extra/kernel.txt")
    # Do something with the extra data here.

However I don't intend to add that for this initial implementation.

Hello @GEbb4! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file spiceypy/context.py:

Line 45:10: W292 no newline at end of file

This looks very handy and you can even pass lists of kernels as furnsh and unload can take them. I'm confused why you are changing directory around the kernel loading and unloading. SPICE doesn't require you be next to your kernels while using them.

@GEbb4 thanks for the contribution and I look forward to seeing how this progresses. @jessemapel has a good point about changing directories relative to the metakernel as spice meta kernels can support both relative and absolute paths, (https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/req/kernel.html#Path Symbols in Meta-kernels) so it may not make sense to always change the current working directory, although I forget if spice knows to resolve the absolute paths relative to the meta-kernel on it's own. If spice doesn't resolve the relative paths it could make sense to have two context managers, one with the current functionality, to allow this. As per the contribution guidelines this pr will need tests before it could be merged, and documentation additions in the form of a new short tutorial would also be beneficial.
This change and possibly #410 also starts to broach the issue of what is "in-scope" for spiceypy and what is not. Originally I always envisioned spiceypy as a spice wrapper and nothing else, anything that attempts to expand the functionality beyond the spice api was out of scope. However, I have also broken this policy a bit by the addition of a few simple convenience utilities from users that were sufficiently small. I think that this pr, likely without the directory changing bit, is sufficiently self-contained and simple that it is fine to include in spiceypy, and is more inline with this policy than other changes in fact, but for future contributions I may need to create a spiceypy-contrib project to capture higher level utilities that use spiceypy to give those changes a home.

@jessemapel @AndrewAnnex thanks both for your replies, since you both seem happy I'll continue developing and go ahead with testing, docs, etc., although I have a hectic few months ahead so progress might be a little slow.
@jessemapel the directory changing is because spice doesn't resolve files in the same directory as the metakernel if the metakernel has been given absolutely. Here's a simplified version of the original example which made me write it like that in the first place:
.
+-- spice_files
|   +-- combined.bsp
|   +-- gm_de431.tpc
|   +-- metakernel.txt
|   +-- naif_0012.tls
|   +-- pck00010.tpc
+-- spice_demo.py

With the contents of metakernel.txt being:
\begindata
KERNELS_TO_LOAD=(
'combined.bsp',
'gm_de431.tpc',
'naif0012.tls',
'pck00010.tpc')
\begintext

Then, in spice_demo.py:
import spiceypy as spice

METAKERNEL = r"D:\dev\solarsail\src\solarsail\spice_files\metakernel.txt"

spice.furnsh(METAKERNEL)
pos = spice.str2et("2020-07-10 11:00 AM")
spice.unload(METAKERNEL)

print(pos)

Which, if the code is run in any other directory, leads to an error:
Traceback (most recent call last):
  File "spice_demo.py", line 8, in <module>
    spice.furnsh(METAKERNEL)
  File "D:\virtualenvs\sail\lib\site-packages\spiceypy\spiceypy.py", line 108, in with_errcheck
    check_for_spice_error(f)
  File "D:\virtualenvs\sail\lib\site-packages\spiceypy\spiceypy.py", line 91, in check_for_spice_error
    raise stypes.dynamically_instantiate_spiceyerror(
spiceypy.utils.exceptions.SpiceNOSUCHFILE:
================================================================================

Toolkit version: CSPICE66

SPICE(NOSUCHFILE) --

The first file 'combined.bsp' specified by KERNELS_TO_LOAD in the file D:\dev\solarsail\src\solarsail\spice_files\metakernel.txt could not be located.

furnsh_c --> FURNSH --> ZZLDKER

================================================================================

By changing directory in the context manager, this error will never be thrown and the directory change should be transparent to the user as it only happens when kernels are loaded/unloaded.
@AndrewAnnex you talk of having two separate context managers, one with and one without this functionality. I wonder if just having a kwarg switch for it would be preferable so that there's only ever one object, and making switching directory the default as it gives the least chance of a user seeing an error? Although I'm not sure that there's ever a situation where we don't want to do the directory change, so I'm not sure if there's much merit in having that at all...?

@AndrewAnnex I think this is ready for review/merging now. I've added a kwarg which lets the user entirely disable directory changing if they so wish, as well as a handful of tests.
Your comments about what are in and out of scope have also gotten me thinking. IMO there's quite a big market for higher-level abstractions in spiceypy, because I'd say anyone using Python is happy to take more pythonic code at the expense of complexity etc. - otherwise, if it was really important, they'd likely learn/use C.
For example, another of the things I've found really difficult to do is check for kernels being loaded. You could write a relatively simple utility class which checks all of the currently loaded kernels, which would allow you to do:
if "gm_de431.tpc" in LoadedKernels:

Which is extremely pythonic, but would that be in scope? Probably not, based on the current scope statement. And IMO, you'd be better off having a spiceypy-core library which is just the essentials, and keeping spiceypy containing everything (with the core being a dependency) - because most users will want the extra, more pythonic features. Or, honestly, just keeping everything together - does it really need to be separated? Maybe a new issue to capture full discussion of it would be worthwhile?
In any case, give this PR a review and let me know what you think :-)

@GEbb4 thanks for the changes although @jessemapel 's point still stands regarding changing the directories with meta kernels.
Given your example path and meta kernel, SPICE supports specifying the relative paths using the following path symbol syntax:
\begindata

PATH_VALUES = ( 'D:\dev\solarsail\src\solarsail\spice_files', )

PATH_SYMBOLS = ( 'DIR', )

KERNELS_TO_LOAD=(
'$DIR\combined.bsp',
'$DIR\gm_de431.tpc',
'$DIR\naif0012.tls',
'$DIR\pck00010.tpc')
\begintext

That said, I now think changing directory by default mostly seems safe with respect to spice and spice kernels using the above syntax. If a kernel uses that syntax to define relative or absolute paths, changing directory to that kernel should make no difference. And since the context manager is using a context manger for changing directories it seems to be side-effect free with respect to functions using it as the cwd will return to what is expected at the end of the enter function, at least I believe it will.

@AndrewAnnex yes, the user absolutely should not notice that there's a directory change happening, but it does reduce the number of error cases. Whilst the kernel you show does indeed mitigate the problem, if there's a possible error case that we can solve here I see no reason not to, hence the implementation I've made.
And if there really is a problem being caused, say some security case which is sensitive to which directories are accessed or some obscure set of permissions, then the user can add the allow_change_dir=False flag and the directory changing is entirely disabled. But, since most users won't care about this, it's enabled by default to stop throwing the error case described above.
I'm not certain on next steps etc., do we need input from @jessemapel before proceeding?

No there is no formal review process really unless I have specified it in the contributing docs. I just need to think it over a bit more and do a thorough review of the actual code/docs and I’ll need to enable the CI builds to ensure the coverage doesn’t decrease significantly and that the tests pass. Other opinions of course are welcome but I think overall we have worked through most/all of my concerns. Just give me a few days to find some time to do the above and look out for a code review from me.
-Andrew Annex

On Jul 4, 2021, at 5:05 PM, GEbb4 @.***> wrote:

@AndrewAnnex yes, the user absolutely should not notice that there's a directory change happening, but it does reduce the number of error cases. Whilst the kernel you show does indeed mitigate the problem, if there's a possible error case that we can solve here I see no reason not to, hence the implementation I've made.
And if there really is a problem being caused, say some security case which is sensitive to which directories are accessed or some obscure set of permissions, then the user can add the allow_change_dir=False flag and the directory changing is entirely disabled. But, since most users won't care about this, it's enabled by default to stop throwing the error case described above.
I'm not certain on next steps etc., do we need input from @jessemapel before proceeding?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

@GEbb4 I want to thank you for the effort in this PR. As per the discussion in #417, I think that this contribution is in scope, but there are some code changes/docs that are needed to the PR to get it merged, I won't have the time to do the changes myself for a few months. I'm closing the PR for now but it may be able to reopened at some point or moved to a contrib package for spiceypy.

@AndrewAnnex I realise I just sort of disappeared on this; but I've restarted working on the project which lead to me bringing it up in the first place and now intend to finish it off - if you're still happy for me to go ahead? I can't see any evidence of a second package for abstractions so I presume it's still in-scope?


helm安装kyuubi服务完成后会提示：

helm安装kyuubi服务完成后会提示：
NAME: kyuubi-helm
LAST DEPLOYED: Wed Mar 16 13:14:32 2022
NAMESPACE: kyuubi
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:

Licensed to the Apache Software Foundation (ASF) under one or more
......
so这里给的serviceName是否是错的？

Why are the changes needed?

How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[ ] Add screenshots for manual tests if appropriate

[ ] Run test locally before make a pull request

@HYBG-1126 Thanks for reporting issue and sending PR, could you please make your description format looks better, it's hard to read for reviewers now.
cc @hddong

@HYBG-1126 : You can get correct command after helm install. It is Related to the helm project's name.

In the given example, the project's name is kyuubi-helm and svc is 'node-port' . So we get command with kyuubi-helm-nodeport.

@HYBG-1126 : Sorry, my mistake, you are right, it need to change to kyuubi-svc. Thanks.

抱歉，之前没有提交过pr，所以没有注意到格式问题，后面我会注意一下。

Thanks @HYBG-1126 for contribution and @hddong for verification, merging to master/1.5

@HYBG-1126 Seems you do not set your email in your GitHub profile, thus your contribution could not be counted, would you please update your GitHub profile?
Authored-by: liuzy04<EMAIL_ADDRESS>

yesterday my email is private,now it is public

您好，您把我的内部邮箱暴露出来了，我们公司有相应的审计，麻烦您删除一下，感谢。

The email address comes from your git commit, I'm afraid we can not force push to overwrite the public branch, it will mess all developers local repo.


MSSQL db - datetime null attribute

Node version: >8.x
Sails version (sails): 1.2.3
ORM hook version (sails-hook-orm): 2.1.1
Sockets hook version (sails-hook-sockets): 1.5.5
Organics hook version (sails-hook-organics): not installed
Grunt hook version (sails-hook-grunt): 3.1.1
Uploads hook version (sails-hook-uploads): not installed
DB adapter & version (e.g. sails-mysql@5.55.5<EMAIL_ADDRESS><EMAIL_ADDRESS>Skipper adapter & version (e.g. skipper-s3@5.55.5): 0.9.0-4

I'm having difficulties retrieving a datetime column with null values from MS SQL. The setup in SQL or Sails is quite simple:
SQL: User table with a column MyDate (datetime, null)
SAILS:
model User.js with attribute set as
MyDate:{
 type: 'ref',
 columnType: 'datetime'
}

When I use the blueprint REST call http://localhost:1337/user, I am getting the following results:

Invalid Date when the value is null in the database
The expected value when the value is not null in the database

I have tried below attribute settings in the User model and got the following results:

MyDate:{ type: 'ref', columnType: 'datetime' }: Invalid date when null, expected value when not null
MyDate:{ type: 'json', columnType: 'datetime' }: Invalid date when null, expected value when not null
MyDate:{ type: 'string', columnType: 'datetime' }: Invalid date when null, expected value when not null
MyDate:{ type: 'string', columnType: 'datetime', allowNull: true }: Invalid date when null, expected value when not null
MyDate:{ type: 'string', allowNull: true }: null value when null, datetime value as a JS ISO date when not null, and with the following warning generated in Sails logs:

Warning: After transforming columnNames back to attribute names for model user,
a record in the result has a value with an unexpected data type for property MyDate.
The corresponding attribute declares type: 'string' but instead
of that, the actual value is:
2019-12-01T09:35:05.967Z

Would you know what would be the correct way to get null values a null, datetime values as datetime and not get a SAILS warning ?
thanks!

@donvincenz0 As of Sails 1.0, type: 'datetime' is no longer supported and we recommend using JS timestamps (type: 'number') instead.  Here's the list of attribute types available in v1.  Also more info in a related post: #4575

@johnabrams7, thanks for you reply! I've tried using 'number' but I'm getting the same warning.
Here I am not in control of the db I'm connecting to, it's developed by a third party vendor and so I can't change the SQL datetime column type into using a timestamp integer.
What could be the solution for such cases?

Hey, @donvincenz0!
I wonder if you could do some kind of beforeCreate lifecycle callback to validate the data and prevent null attributes from hitting the database at all. I'm not sure if this solution makes sense for your use case, and I know it's not quite what you're looking for, but it might be an acceptable workaround. For more information on lifecycle callbacks in Sails, check out the docs page.
From what I understand, storing null values with columnType: 'dateTime' is a pretty common problem. I'd love to hear how other users handle this issue in Sails.

Hi @madisonhicks
Thanks for your suggestion, unfortunately I'm only reading the MSSQL db, not writing any data since it belongs to a third party vendor, so I can't avoid null values for datetime columns.
I'd love to hear also how other users are handling this, or if anything's planned to cover this in a future version of Sails waterline.


test.aria.utils.mouse.MouseDragKo failing

Works fine in Chrome with robot-server but not with vbox-robot.


metrics name truncated

We are using opencensus to collect metrics from the application, which uses oc-agent and oc-collector to send to prometheus.
I have noticed that the metrics name gets truncated if the number of chars is greater than 100, after looking at the code, it looks like: https://github.com/orijtech/prometheus-go-metrics-exporter/blob/b321c5297f6069b012947cfae5924a66c593ea60/sanitize.go#L25
is causing the issue.
I just wonder any reason for this restriction? is there anyway that we can make it configurable?

Hello there @yiyijin! Thanks for filing this issue.
If I recall correctly from 2017/2019, this is to protect and high cardinality labels as the limit for label key names by OpenCensus or Stackdriver, but indeed it truncates long names.
Since Prometheus doesn't seem to have a limit, perhaps we can/could remove this limit?

@odeke-em Thanks a lot for the reply! I think it will be good to remove this limitations, or make it configurable at least, I just wonder do we have an estimate for this change? Thanks a lot!

Looks like Christmas came early for you @yiyijin :) I've mailed out PR https://github.com/orijtech/prometheus-go-metrics-exporter/pull/5 which I shall merge in shortly then make a release. I'll then make a PR to the OpenCensus Agent and after that is made, you'll be on your way to using it without truncation.

Thanks a lot!

Cheers! Thanks for the report, and for using this software!
On Mon, Feb 24, 2020 at 4:16 PM yiyijin<EMAIL_ADDRESS>wrote:

Thanks a lot!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/orijtech/prometheus-go-metrics-exporter/issues/4?email_source=notifications&email_token=ABFL3V5RRUB3U2GQYBJKXZTRERPO3A5CNFSM4K2SW3CKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM2BCVQ#issuecomment-590614870,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABFL3V3RJ2NHLDIDZ2RCFRDRERPO3ANCNFSM4K2SW3CA
.