Doc: Immutable Data FAQ

Adds a section of questions on using Immutable Data and Immutable.JS to the FAQ in response to the request in #1785 . Note that although I tried to make this as neutral as possible, this is inevitably an opinionated set of questions and answers (particularly the Best Practices section), so please point out any opinions that are too strong or just plain wrong!
Feedback welcomed.

@bundance Hello, Can you explain me why using your toJS hoc give better perf then using Immutable.toJS() in mapDispatchToProps.
As I understand both of the times Immutable.toJS()  produce new objects and dumb component will rerender.
Thank you

Awright, sitting down to take a look at this.

Thanks for the review, @markerikson. I'll get to work on the changes you've requested.

Great, thanks!  Probably won't have time to look at this until next week, but I'll definitely make sure to come back to this.  Appreciate the time and effort you're putting in!

Just did a quick skim of the updated contents.  I definitely like where you're going with this, but I think there's a few bits that need some further clarification and correction.  Let me go through and mark those up.

@markerikson All changes now complete. Sorry for taking so long - as you can see, this has been a substantial update, as I examined the Redux and React-Redux code closely and removed some false assumptions I didn't know I had! (Christmas and New Year also didn't help!)
I'm much happier with the end result, though, even if it's led to a deeper and longer FAQ. As usual, please critique and comment as you see fit, as I want this to be a high quality document and am happy to edit/amend as required.
If you're happy with this, I'll add the references and ensure it's formatted correctly, and then hopefully it can be merged in.

No worries.  Sounds like you've spent a lot of time on this, it's not an urgent need with a deadline, and the holidays are definitely a time for doing other stuff anyway :)
I'll take a look at this over the weekend.  Really appreciate the time you've put into this!

No problem at all. The second-best way to really learn something is to teach it. The first is to write documentation 😃

@markerikson, I've made all the changes asked and rewritten the bit on how shallow checking affects Redux and combineReducers. If you're happy with these changes, I'll add the references and ensure the formatting matches the rest of the FAQ, and then hopefully it can be merged in.

Cool, thanks.  I'll take a look at this over the weekend (again :)  ).

Looks pretty good at this point.

All finished, @markerikson. I've added loads of references throughout, and hopefully ensured the style matches the rest of the documentation. Let me know if I've missed any references you think are particularly salient (or any other problems!).

Not sure if you got my last update, @markerikson - I can imagine you get a ton of them! This PR is now ready for review, with all links and references added. No problem if you're too busy to get round to it - just wanted to make sure you hadn't missed my last update.

@bundance : yeah, sorry - last week's been extremely busy, and this week will be as well.  There's a good chance I won't be able to come back to this until the week of Feb 12.
I definitely appreciate the time and effort you've put into this, and want to get it in, I just need the time to give it the attention it deserves.

No problem at all.

Ooooo-kay.  I didn't completely forget about this, but I did sorta forget about this because I had a whole bunch of other stuff going on the last couple weeks.  Lemme look things over.

Skimmed through the latest diffs, and the current contents.  I'm calling this good to go :)  Let's get it in, and if there's any further changes to be made, we can always make those later.
@bundance , kudos for some excellent info, and thanks for working with me to get that fleshed out.

Now, since we don't have any kind of docs auto-republish step set up, time for me to go re-familiarize myself with the necessary steps and see if I can get this pushed up.

Hmph.  I'm having issues dealing with building and publishing the docs from my box.  I'll have to work with @timdorr to sort this out.
I definitely want to get them republished ASAP, and let people know we've added this section.

It's up! http://redux.js.org/docs/faq/ImmutableData.html


Provide Participant/Pool local Space tool

Use Case: A user wants to make space inside a participant/pool only instead of the diagram.
Solution: Add a custom modifier that applies the space tool to the currently hovered container element only.
Demo

Context
Related but not the same is the flow local space tool, described in https://github.com/camunda/camunda-modeler/issues/876.

Needs to be addressed via https://github.com/bpmn-io/bpmn-js/issues/557.

A modifier would be great to change global space tool impact to current (over) pool.
However, I have a question, shouldn't this be the standard behavior ?
Really need that !
Thanks

Any ideas for the modifier key?

However, I have a question, shouldn't this be the standard behavior ?

One use case is to create space in between participants. Any reason you see creating space on pools only as the standard behavior?

Many thanks for your quick reply J
As Ctrl is already used a as a modifier, maybe Alt could be a good one.
I usually use the space tool in order to make space between two tasks in
the same pool.
When I have serveral pools, this modify the others pools.
In my opinion, the standard behavior should be to add space (or remove
space) only on the pool currently pointed by the mouse.
For sure, when the mouse is outside a pool, this should move all the pools
De : Nico Rehwaldt<EMAIL_ADDRESS>Envoyé : vendredi 6 janvier 2017 17:44
À : camunda/camunda-modeler<EMAIL_ADDRESS>Cc : r-dumortier<EMAIL_ADDRESS>Comment <
<EMAIL_ADDRESS>Objet : Re: [camunda/camunda-modeler] Provide Participant/Pool local
Space tool (#178)
Any ideas for the modifier key?
However, I have a question, shouldn't this be the standard behavior ?
One use case is to create space in between participants. Any reason you see
creating space on pools only as the standard behavior?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/camunda/camunda-modeler/issues/178#issuecomment-270945719,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATDGcQOqb8o7k7jyJTW11kwB1RhzcWM-ks5rPm9hgaJpZM4HnLsw
.

Good suggestion. May make sense to have the space tool contextually apply:

when inside a pool, apply to the pool only
when outside, apply globally

Really happy that suits you !
J
Thanks, have a nice weekend
Raphael
De : Nico Rehwaldt<EMAIL_ADDRESS>Envoyé : vendredi 6 janvier 2017 17:56
À : camunda/camunda-modeler<EMAIL_ADDRESS>Cc : r-dumortier<EMAIL_ADDRESS>Comment <
<EMAIL_ADDRESS>Objet : Re: [camunda/camunda-modeler] Provide Participant/Pool local
Space tool (#178)
Good suggestion. May make sense to have the space tool contextually apply:

when inside a pool, apply to the pool only
when outside, apply globally

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/camunda/camunda-modeler/issues/178#issuecomment-270948773,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATDGcUZGTPT2bH3nyznRiTqNeThwlGOdks5rPnIygaJpZM4HnLsw
.

Will get addressed via https://github.com/bpmn-io/bpmn-js/issues/557.

The space tool is local first since Camunda Modeler v5.17.0.


Flash and Torch mode not working for Video

Does flash and torch mode work when recording video? It seems like it's not working for specifically only video but it does work for "still" or picture mode. Is this feature supported for video or a bug?
Any help would be much appreciated.
Steps to reproduce

Set flash or torch mode to on
Set camera to video
Flash nor torch is working when shooting video but is working for stills.

Expected behaviour
Flash and torch mode should work when Camera is in video mode
Actual behaviour
Flash and torch mode not working when using Video
Environment

Node.js version: 6.6.0
React Native version: 0.33
React Native platform + platform version: iOS 9.0, Android 5.0, etc : IOS 10

react-native-camera
Version:  master

@lwansbrough Any ideas on this?

bump

Not working for me either with video mode on iOS!

Same here, would love a follow up on this issue.

Until this is fixed setting the torchMode to 0 or 1 should work. torchMode={this.state.flashMode ? 1 : 0}

bumpppp

+1

I found that the issue was caused by using a button which i positions 'absolute' over the camera component. Solved this by setting the camera as absolute and the buttons as regular views, like this:
Hope it helps!
render() {
    return (
      <View style={styles.container}>

        <View style={styles.cameraContainer}>
          <Camera
            torchMode={this.state.torch ? Camera.constants.FlashMode.on : Camera.constants.TorchMode.off}
            ref={(cam) => { this.camera = cam; }}
            // rest
          >
          </Camera>
        </View>

        <View style={styles.buttonContainer}>
          <TouchableOpacity onPress={() => this.onTorchButton()}>
            <View style={styles.button}>
              {this.state.torch ? <Icon color='white' type='material-community' name='flashlight-off' /> :
              <Icon type='material-community' name='flashlight' /> }
            </View>
          </TouchableOpacity>
        </View>

      </View>
    );
  }

const styles = StyleSheet.create({
  container: {
    flex: 1,
  },
  buttonContainer: {
    flex:1,
    padding:15,
    flexDirection: 'row',
    alignItems:'flex-end',
    justifyContent:'center'
  },
  cameraContainer: {
    position: 'absolute',
    width: width,
    height: height,
    top:0,
    left:0
  },
  button: {
    margin:20,
    flex:0,
    borderRadius:25,
    width:50,
    height:50,
    alignItems:'center',
    justifyContent:'center',
    backgroundColor:'red'
  },
});

Still an issue, one year after: https://github.com/react-native-community/react-native-camera/issues/2171


Incorrect year

It says 2014 in the copyright in the footer.
Use this script in place of year and never worry about it again:
<script>document.write(new Date().getFullYear())</script>

Thank you, added ;)


Bugfix/rendering

This PR contains:

[ ] New features
[ ] Changes to dev-tools e.g. CI config / github tooling
[ ] Docs
[x] Bug fixes
[ ] Code refactor

What is the current behavior? (You can also link to an open issue here)
Flashing, laggy scrolling still exists, especially when large numbers of log headers are being loaded.
What is the new behavior?
Improve rendering behavior by properly dealing with dependencies.
Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
Other information:

Will be afk tomorrow from noon est - 6 est.
There is some risk in this PR of 'stale data' appearing in viewer, but it really improves rendering (and avoid excessive renders introduced by the scroll position state saving + inherent in the current design). I'm going to keep tweaking this further. Just want you to be aware in case there is any reason to hold of merging until I'm right in front of keyboard.


Smoking Data

I saw the formula takes into account smoking information, but smoking is not listed in the personal information. How can I get that info to come up in the patient.csv?

There is no easy configuration change to make the smoking data show up in the CSV.
One could alter the CSV exporter to include that as a column, alternatively we could export smoking status as an observation (which would be nice, because it would conform to the ONC CCDS approach).

Fixed with #388


workload: generalize KeyGen::ConflictRate to be a conflict pool

Codecov Report

Merging #173 (2a921fb) into master (d20f302) will decrease coverage by 0.02%.
The diff coverage is 94.24%.

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


<IP_ADDRESS>2 for 1.10.2 Pipes not providing power to AE2

I have tried to give energy to AE2 with pipes and it does not seem to work I know it isn the creative engery block that I used cause EnderIO and no problem providing the power from the block to the cells
(I do have Telsa API)

Did you tried to switch the end of the pipe into input mode? SOmetimes I have hade some problem with the default mode so I use the Configurator to set the pipe either to extract or input mode.
I hope that this will fix your problem.

? The configurator only changes the redstone state

Test the Mekanism Universal Cable into an Ender IO (or another Tesla mod's) Machine/capacitor bank.  I've been having issues with that, but haven't bothered tracking down if it is a Mekanism or Ender IO issue.
This makes it look like Mekanism.
From my general playing (not debugging) experience, the only problem are the Universal Cables and Chargepad.  An Energy Cube or Quantum Entangloporter directly works fine.  Mekanism cables do work fine with Mekanism machines.  If you can duplicate that, then this is almost certainly a Mekanism issue.

I have tried multiple other mods and dont wish to have them in this private pack im making to play myself. EnderIO's energy conduits do work and Mekanism pipes all work fine with its own machines it is just the mekanism energy pipes to other mods (brought this up to the AE2 guys and they said the same cause they are trying to get all mods to work with it) but I can put the machines next to the block and it works fine

This is a good work arround but if AE2 has any API for that then it should be possible to call it but this can maybe a bit complicated.

Issue appears to be Mekanism Universal Cables.  Mek Energy Cubes and Quantum Entangloporters work fine, but the cables are having issues with multiple mods (EnderIO in my case).

Make sure you guys have Tesla API installed cause that also is another reason it wont work but i already have that installed and it isnt working

I'm pretty certain I installed Tesla.  I'm not on that computer atm though.

OKay cause with EnderIO I have no issues at all the eneger conduits work amazing for me but i dont want to have all the other stuff the mod adds so I will probably just be putting the blocks next to each other untill there is a real fix

@VT-14 You may also want to check to see if you have setup the pipes correctly (input and extract not in-to or anything else) for EnderIO if it isnt working

Issue is Mek pipes not outputting to Ender IO machines.  I have tried adjusting the Mek settings.  Ender IO doesn't distinguish in/out on power for most machines (only capacitor banks).
Ender IO conduits are working fine, and cooperating with Mekanism Machines, Energy Cubes, etc.
As I said before, proper bug report later tonight.

As promised, a full bug report.
Minecraft: 1.10.2
Forge: <IP_ADDRESS>7
Mekanism: 1.10.2-<IP_ADDRESS>2 (same for Mek Generators and Tools).
Tesla: 1.10.2-<IP_ADDRESS>
Ender IO: 1.10.2-<IP_ADDRESS>_beta
EnderCore: 1.10.2-<IP_ADDRESS>
RFTools: 1.10-5.55
McJtyLib: 1.10-2.2.0
Issue:

In that image, all power goes from the left to the right.  Green blocks indicate that is row is working as would expect (at the time, see case 7), red indicates a problem.  I configured each block to push/pull correctly.  Ender IO allowed me to see the RF/t in/out directly on its capacitors.  You can't see power transfer on most of the RFTools tests, and their creative power cell does not accept (void) energy, forcing me to use normal blocks.
Based on This Power API Spreadsheet, Ender IO and RFTools can both use Tesla, Energy (Forge), and RF (CoFH).  Mekanism only shares Tesla and RF from that list.  AE2 only supports Tesla at the moment (but I don't have that to test in this pack).
Ender IO - Mekanism:

1: The Ender IO does not accept power from Mekanism Universal Cables.  The cable turned green, so it appeared to accept power from the Mekanism Energy Cube.
2, 3, 4, and 5: The Ender IO Capacitor Bank will push power into Mekanism Universal Cables, regardless of the setting on the cable.  4 (pulling from capacitor) and 5 (no special interaction with capacitor) worked as expected, but that is likely a coincidence considering the clearly incorrect behavior of 2 (no connection to capacitor) and 3 (Pushing into capacitor).
6 works as expected and is a direct connection.
7 initially appeared to work correctly, but in writing this, I noticed that the capacitor is receiving 50,499K RF/t  I believe the capacitor bank has a transfer limit of 500,000 RF/t, so that 50,499,000 RF/t transfer is likely WAY to high.  The Energy Cube is likely bypassing its transfer limit.

RFTools - Mekanism:

8 works as expected.
9 Energy does not leave the Power Cell.  The Power Cell should be pushing, and the Cable is pulling, but power isn't moving.
10 and 11 works as expected and are direction connections (again).  I can't think of a simple way to test for exceeding power limits of the Power Cell (if there are any).

Ender IO - RFTools:

12 Worked as expected.  Only shows 0 RF/t transfer due to the Power Cell being full of energy.
13 Worked as expected.

Logs:
Debug Crash: https://gist.github.com/VT-14/acb1637e19727f7fa862a32086740f1a
FML Log: https://gist.github.com/VT-14/e7f282fa59eb60e4a3412906c0b95974


SPOJ Bug Removed

Wasn't working on SPOJ.

@sam17 : Thanks for this contribution. SPOJ recently changed their front-end which is why, the JS was no longer able to modify the page as intended.
Thanks for this :)

Hi Sam,
Sorry for late reply. I was travelling.
I have tested the code. It works fine.
Just one last thing - You have added another .crx file (chrome-plugin.crx) . Please pack the extension and rename the crx as Chrome.crx. I cannot create a new release with 2 crx.

Okay. I think it is better to discard the whole binary and keep it in release only.
This was not a very nicely written code. I really appreciate your effort to understand the code and make necessary changes. Thanks for this :)


fix cancellation warnings

This fixes what we believe are the last remaining causes of https://github.com/Microsoft/visualfsharp/issues/2100
I've used it for a while and I haven't seen any of the warnings.  I kind of miss them

OK @saul, I think we've nailed it :)

I kind of miss them

😄


Add Legacy Types to Context

Purpose
Add legacy types to context.
Notes
Will result in 404 in prod services until API goes live 9/10/18

Coverage increased (+0.3%) to 25.957% when pulling fb915b179331e06b29ec452251a6dcc8568a8949 on martinmckenna:add-legacy-types-request into c439ec1d51a4dfda194a9b0fa1a9f0dca32ee1b5 on linode:develop.


Selenium2Driver member declaration not compatible with CoreDriver

Affected version: 1.7
PHP Fatal error:  Declaration of Behat\Mink\Driver\Selenium2Driver::visit(string $url) must be compatible with Behat\Mink\Driver\CoreDriver::visit($url) in /vendor/behat/mink-selenium2-driver/src/Selenium2Driver.php on line 401

From what I can tell the declaration is compatible with minkphp/mink:
https://github.com/minkphp/Mink/blob/master/src/Driver/CoreDriver.php#L86
but not with the FriendsOfBehat/Mink fork:
https://github.com/FriendsOfBehat/Mink/blob/master/src/Driver/CoreDriver.php#L73

Given that the FriendsOfBehat is not kept uptodate with the official repo, you should stop using it.

Ah, you're right! The problem is that Sylius uses this fork. Anyway, an issue should be open there and not here! Thanks!

Well, the recommended approach is to use the official Mink packages (which is where maintenance is happening). Another working approach is to use the FriendsOfBehat forks for them for all the Mink packages being used (so that you use the outdated forks for all of them).
Note that the MinkExtension for Behat is not part of those "official Mink packages" I mentioned in the previous packages (this is a Behat extension, where FriendsOfBehat is now the maintained source instead of Behat, not a package that has been migrated to the minkphp github organization)


Add Converter for converting integer types to JSON string and back

Integer types are often used as ids. Since javascript only support floating point numbers, it would be nice if a converter could be specified to automatically convert .NET integer types to javascript strings and back. A culture neutral format should be used.
class MyEntity
{
    [JsonConverter(typeof(StringIntegerConverter))]
    public int Id { get; set; }
}

Someone can make it and put it on NuGet but I don't want it part of the core library to keep it small.

Hi @JamesNK after creating the issue it didn't trouble me much for the small application I was writing. The int I used in c# automagically converted into a string in javascript and when that string went back, Newtonsoft.Json automagically converted the string back into an int.
The problem is a real one. For example, the twitter API includes a string version of the 64-bit id because of the lack of number precision (see https://dev.twitter.com/overview/api/twitter-ids-json-and-snowflake).
I have no feeling for how much weight NewtonSoft.Json would take on by including such a converter. Putting it in a separate NuGet file seems like a lot of overhead. Since I won't implement it soon, I don't mind you closed the issue.


Outside of BC layer

Addressing this bcmaps issue: https://github.com/bcgov/bcmaps/issues/36
Adds the bc_neighbours data which includes bordering jurisdictions as well as the Pacific Ocean

Great new feature @boshek! I would add the licence details directly into the bc_neighbours README.md file so readers don't need to go through the complete terms of use? CC0 Public Domain


[Feature]: Enhance the way proxy URL are managed

Currently the root part of the URL coming from the proxy (aka scheme://host) is retreived from the incoming HTTP request.
This implementation was naive (my bad ! I'm the author).
And it can (must?) be enhanced for use case where:

you are behind a proxy that manage public facing URL for you.
Terraform CLI call https://boring.corp.tld, which is a load balancer that call http://boring.internal.corp.tld (no TLS behind Load Balancer). In this case, the proxy URL will redirect download to http://boring.internal.corp.tld which may be invalid.
you want to use a custom URL (for whatever reason you have)

Therefore i think that we can do 2 more things :

add an CLI argument that allow to define the root URL of proxy URLs
add steps to read http request X-FORWARDED-* headers, and use them to build the root URL of proxy URLs

If the CLI argument is set, it'll be used by default, no matter the X-FORWARDED-* headers.
Else, if X-FORWARDED-* headers are set, they will be used.
Otherwise, we use the current way of building the root URL.

And by the way, i'm in the case of for whatever reason you have
The X-FORWARDED-* headers sent by our LoadBalancer are invalid...

Hi @XREvo :wave:
Thanks for the bug report and providing a solution to the problem!
I think there is potentially another solution to the problem which could also simplify the existing URL handling for the download proxy.
The Provider Registry Protocol and the Module Registry Protocol  support responding with a relative download URL.
Documentation for the download_url of a provider:

download_url (required): a URL from which Terraform can retrieve the provider's zip archive. If this is a relative URL then it will be resolved relative to the URL that returned the containing JSON object.

Documentation for the module download response:

The value of X-Terraform-Get may instead be a relative URL, indicated by beginning with /, ./ or ../, in which case it is resolved relative to the full URL of the download endpoint to produce an HTTP URL module source.

If we respond with a relative URL, we should fix the problems you described, right?

Yes, i guess so
I'll implement it and try it next monday at work. If it works, i'll update my PR in that way

Thanks, let me know if you need any feedback or help otherwise :)

Hi @oliviermichaelis
I've coded it and tested it locally.
Without suprise, it works perfectly and simplifies the code 🥳
My PR is up to date

That was quick!
I wish we had found the solution sooner and that you could have saved yourself some implementation effort.

Indeed, the sooner will be the better, but if you have some things pending and need time to complete them, i'll wait.

And thanks for your feedback. It simplifies a lot the source code 😄

😱
I tested it with a local terraform project but didn't rerun the test
I'm sorry @oliviermichaelis i'll fix that this afternoon

This should be fixed in 0.15.2


Invalid target aggregation and index are accepted in Add Fragment dialog

Fix for #1513.

Changes ComboBox to Select control.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.✅ nikmace❌ github-actions[bot]You have signed the CLA already but the status is still pending? Let us recheck it.

@nikmace Could you please try creating a new PR? Otherwise I fear that we will not be able to submit this PR, because of the failing CLA check.

Functionality moved to #1539


Error when setting up ArgoCD Vault Plugin with Kustomize: "stat /var/run/argocd/argocd-cmp-server: no such file or directory"

Hi guys,
I am hoping someone can help me out with this. Pretty sure I might have done something wrong because I am sure I have searched the whole internet and I couldn't find a duplicate of this problem :(.
I have ArgoCD working perfectly, and I am trying to install the Vault plugin using Kustomize. It continually fails with the following error
Error: failed to create containerd task: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/var/run/argocd/argocd-cmp-server": stat /var/run/argocd/argocd-cmp-server: no such file or directory: unknown
here are my config files
here is my argocd-repo-server.yaml file
apiVersion: apps/v1
kind: Deployment
metadata:
  name: argocd-repo-server
spec:
  template:
    spec:

      # Mount SA token for Kubernets auth
      # Note: In 2.4.0 onward, there is a dedicated SA for repo-server (not default)
      # Note: This is not fully supported for Kubernetes < v1.19
      automountServiceAccountToken: true

      # Each of the embedded YAMLs inside cmp-plugin ConfigMap will be mounted into it's respective plugin sidecar
      volumes:
        - configMap:
            name: cmp-plugin
          name: cmp-plugin
        - name: custom-tools
          emptyDir: {}

      # Download tools
      initContainers:
      - name: download-tools
        image: registry.access.redhat.com/ubi8
        env:
          - name: AVP_VERSION
            value: 1.14.0
        command: [sh, -c]
        args:
          - >-
            curl -L https://github.com/argoproj-labs/argocd-vault-plugin/releases/download/v$(AVP_VERSION)/argocd-vault-plugin_$(AVP_VERSION)_linux_amd64 -o argocd-vault-plugin &&
            chmod +x argocd-vault-plugin &&
            mv argocd-vault-plugin /custom-tools/

        volumeMounts:
          - mountPath: /custom-tools
            name: custom-tools

      # argocd-vault-plugin with Kustomize
      - name: avp-kustomize
        command: [/var/run/argocd/argocd-cmp-server]
        image: quay.io/argoproj/argocd:v2.7.4
        securityContext:
          runAsNonRoot: true
          runAsUser: 999
        volumeMounts:
          - mountPath: /var/run/argocd
            name: var-files
          - mountPath: /home/argocd/cmp-server/plugins
            name: plugins
          - mountPath: /tmp
            name: tmp

          # Register plugins into sidecar
          - mountPath: /home/argocd/cmp-server/config/plugin.yaml
            subPath: avp-kustomize.yaml
            name: cmp-plugin

          # Important: Mount tools into $PATH
          - name: custom-tools
            subPath: argocd-vault-plugin
            mountPath: /usr/local/bin/argocd-vault-plugin

here is my cmp-plugin.yaml file
apiVersion: v1
kind: ConfigMap
metadata:
  name: cmp-plugin
data:
  avp-kustomize.yaml: |
    ---
    apiVersion: argoproj.io/v1alpha1
    kind: ConfigManagementPlugin
    metadata:
      name: argocd-vault-plugin-kustomize
    spec:
      allowConcurrency: true
      discover:
        find:
          command:
            - find
            - "."
            - -name
            - kustomization.yaml
      generate:
        command:
          - sh
          - "-c"
          - "kustomize build . | argocd-vault-plugin generate -"
      lockRepo: false

here is my kustomization.yaml file
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

images:
  - name: quay.io/argoproj/argocd
    newTag: v2.7.4

# Note: Versions below 2.4.0 will not always work if trying to use AVP with Helm
# Fixed in https://github.com/argoproj/argo-cd/pull/9319
resources:
  - https://github.com/argoproj/argo-cd//manifests/cluster-install?ref=v2.7.4
  - cmp-plugin.yaml

patchesStrategicMerge:
  - argocd-cmd-params-cm-patch.yml
  - argocd-repo-server.yaml

namespace: argocd

here is my argocd-cmd-params-cm-patch.yml file
apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-cmd-params-cm
data:
  server.insecure: "true"

I was initially using ArgoCD 2.4.0 as per the docs but upgraded to 2.7.4 hoping that would solve the problem, however I have been having no luck so far. I've read through the documents and I do not think I have missed anything and I've also been through most of the issues on the ArgoCD and ArgoCD Vault Plugin repos, but haven't found anything that gives an indication of what could be wrong.

The issue was, I was missing containers: from my config. I got the config from the manifest file and deleted everything that wasn't kustomize. Which included containers because it was right below the # argocd-vault-plugin with Helm comment. I blame sleep :D

closing


DOC: update release notes for 0.18.0

[ci skip]
Please check and update.
This surely under represents all the things which were going on in scipy.signal, also possibly scipy.sparse.
Some copyediting of my ESL would be appreciated too, if anybody has an eye for it.

Content and second-language phrasing looks fine to me:)
Maybe easier to merge this - I can send a new PR on top of that for signal and a few other things.

Rebased so this is mergeable again. While I was at it, addressed the review comments.

Maybe easier to merge this - I can send a new PR on top of that for signal and a few other things.

That'd be great!

Great, merged.


Could not reach host index.rubygems.org

Hi there,
Weird issue this morning (Dec 1st - 11:24AM - Paris).
When running bundle install, I get the error:
"Could not reach host index.rubygems.org"
If I remove redcarpet on the gemfile, it works just fine.

Never mind. I restarted the terminal and it works fine now.


docs: translate the document of request block plugin to English.

Ⅰ. Describe what this PR did
Translate the document of request block plugin to English.
Ⅱ. Does this pull request fix one issue?
fixes #78
Ⅲ. Why don't you add test cases (unit test/integration test)?
N/A
Ⅳ. Describe how to verify it
N/A
Ⅴ. Special notes for reviews
N/A

Codecov Report

Merging #150 (2658b3a) into main (c8d84a0) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head 2658b3a differs from pull request most recent head a600265. Consider uploading reports for the commit a600265 to get more accurate results

Additional details and impacted files

@@           Coverage Diff           @@
##             main     #150   +/-   ##
=======================================
  Coverage   26.71%   26.71%
=======================================
  Files          28       28
  Lines        4772     4772
=======================================
  Hits         1275     1275
  Misses       3418     3418
  Partials       79       79


Refactor

Major refactor:

javascript code is now ES6
removed all hard-coded pauses (except where CSS animations need it)
cleaned up inefficient code

Looks good to merge


add build-essential and python*-dev to setup_deb.sh

Building Python wheels of dependencies fails on system without gcc and Python header files installed.
https://github.com/AmpereComputingAI/model_zoo_dev/issues/100
To fix the first problem, this PR adds build-essential to the list of installed packages. To fix the second problem the python*-dev package needs to be installed. Installing python3-dev doesn't solve the issue, so we need to detect the installed version of Python and install the appropriate version of the dev package eg. python3.9-dev.

Thanks for taking care of it.


pull request for e2e test at 12/23/2016 23:15:07

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Fix RouterVoter for use with a pattern.

Fixes #329

This fix is invalid, as it tries to fix a non-existent issue. The routes extra is meant to be a list. See my comment in the issue.


fixed undefined random weighted option

This bugfix aims to fix the error

(node:22075) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'value' of undefined
at [...]/index.js:37:16

that occurs when there no available options, for example when using the forbidden key addessing ALL the traits of a Trait group
The readme states:

For every trait in the list, each generated token will get one randomly selected option (value & image) from the options list. Except if the randomly selected option turns out to have a non-existent value, in which case the token won't get anything from that specific trait.

but the above error occurs when this situation occurs

@manuelpires thank you for your so useful work, I'm using regularly your project to generate 2D NFT collections, amazing work


Use apps endpoints

cc https://github.com/mikedeboer/node-github/pull/568 https://github.com/probot/probot/pull/199

Sounds like the old endpoints are going to be deprecated soon, any blockers on landing this?

👍 I can get it merged an released, but note that node-github was updated to use the new app routes for this API in https://github.com/octokit/node-github/pull/568.


llvmPackages_*.lldClang: pass -lunwind if exceptions are enabled

To successfully compile C++ with useLLVM we need an unwinder and
thus to explicitly -lunwind like it has been done for the android
cross targets.

Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

nix-build -A pkgsLLVM.ncurses -A pkgsLLVM.abseil-cpp
/nix/store/dchgh8ql5zx30w80zwynl070lj52wgd9-ncurses-6.2-x86_64-unknown-linux-gnu
/nix/store/656fgp87vyv7nvmk7ng11iw78qlgwya8-abseil-cpp-x86_64-unknown-linux-gnu-20200923.3


dc-host

bash linWinPwn.sh -t <IP_ADDRESS>  -u user -p 'passwd123' --auto

Hey!
You're using an older version of impacket that doesn't have the parameter -dc-host. Try again after updating impacket
Thanks

In the screenshot, the impacket version is v.0.9.24. The latest is v.0.11.0 (https://github.com/fortra/impacket)

I get a similar error with version 11 of impacket. any ideas why ?

The parameter is present on their latest GitHub repo https://github.com/fortra/impacket/blob/master/examples/GetUserSPNs.py#L526
Try installing using pip3 install git+https://github.com/fortra/impacket or
pipx install git+https://github.com/fortra/impacket


Search in all tab

What should be added?
option to ctrl+f for all channels open
Why should it be added?
i want to be able to search either a user or a phrase in all my tabs open
my amazing design https://i.imgur.com/8a7ysPI.jpg :)

What about doing ctrl+shift+f for global search instead.

A default hotkey of Ctrl + Shift + F sounds good to me - the user can change hotkeys as of 2.3.5.
As for implementing this feature, I think passing a list of channels/ChannelViews to the search popup is the easiest solution. If a user has multiple splits of the same channel, only one should be snapshotted but filters from all splits for that channel should be applied.
Pretty keen to implement this, sounds useful.


[rocks] incorrect error message when uploading to incorrect branch

ariels@redqueen:~/dev/lakeFS$ echo branch | AWS_PROFILE=lake aws --endpoint-url=http://s3.local.lakefs.io:8000  s3 cp -  s3://foo/no-such-branch/
upload failed: - to s3://foo/no-such-branch/- An error occurred (NoSuchBucket) when calling the PutObject operation: The specified bucket does not exist

Repo foo exists.
It should be NoSuchBranch, of course.

NOT a bug: putobject.go in the gate way do this.  We have to return an S3 error code, we probably have no better error than this one.

NOT a bug: putobject.go in the gate way do this.  We have to return an S3 error code, we probably have no better error than this one.


Last version throws "Cannot resolve caller postcircumfix:"

[melezhik App-Rak]$ zef install App::Rak
===> Searching for: App::Rak
===> Testing: App::Rak:ver<0.0.12>:auth<zef:lizmat>
===> Testing [OK] for App::Rak:ver<0.0.12>:auth<zef:lizmat>
===> Installing: App::Rak:ver<0.0.12>:auth<zef:lizmat>

1 bin/ script [rak] installed to:
/Users/alekseimelezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin
[melezhik App-Rak]$ rak foo --human
Cannot resolve caller postcircumfix:<{ }>(VMNull, Str:D); none of these signatures matches:
    (\SELF, Mu \key)
    (\SELF, Mu \key, Mu \ASSIGN)
    (\SELF, Mu \key, Mu :$BIND! is raw)
    (\SELF, Mu \key, Bool(Any) :$delete!)
    (\SELF, Mu \key, Bool(Any) :$delete!, *%other)
    (\SELF, Mu \key, Bool(Any) :$exists!)
    (\SELF, Mu \key, Bool(Any) :$exists!, *%other)
    (\SELF, Mu \key, Bool(Any) :$kv!, *%other)
    (\SELF, Mu \key, Bool(Any) :$p!, *%other)
    (\SELF, Mu \key, Bool(Any) :$k!, *%other)
    (\SELF, Mu \key, Bool(Any) :$v!, *%other)
    (\SELF, Iterable \key)
    (\SELF, Iterable \keys, Mu \values)
    (\SELF, Iterable \key, :$BIND! is raw)
    (\SELF, Iterable \key, Bool(Any) :$delete!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$exists!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$kv!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$p!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$k!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$v!, *%other)
    (\SELF, Whatever)
    (\SELF, Whatever, Mu \ASSIGN)
    (\SELF, Whatever, :$BIND!)
    (\SELF, Whatever, Bool(Any) :$delete!, *%other)
    (\SELF, Whatever, Bool(Any) :$exists!, *%other)
    (\SELF, Whatever, Bool(Any) :$kv!, *%other)
    (\SELF, Whatever, Bool(Any) :$p!, *%other)
    (\SELF, Whatever, Bool(Any) :$k!, *%other)
    (\SELF, Whatever, Bool(Any) :$p!, *%other)
    (\SELF, Whatever, Bool(Any) :$v!, *%other)
    (\SELF, :$BIND!)
    (\SELF, Bool(Any) :$delete!, *%other)
    (\SELF, Bool(Any) :$exists!, *%other)
    (\SELF, Bool(Any) :$kv!, *%other)
    (\SELF, Bool(Any) :$p!, *%other)
    (\SELF, Bool(Any) :$k!, *%other)
    (\SELF, Bool(Any) :$p!, *%other)
    (\SELF, Bool(Any) :$v!, *%other)
    (Mu \SELF, *%other)
  in block  at /Users/alekseimelezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/sources/CF0CA45D52CD1D6E64F533B6BF64A8E32E8C331B (App::Rak) line 137
  in sub MAIN at /Users/alekseimelezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/sources/CF0CA45D52CD1D6E64F533B6BF64A8E32E8C331B (App::Rak) line 134
  in block <unit> at /Users/alekseimelezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/resources/A7114D6D7B56D6C6E833071EBD41B3EA96754369 line 3
  in sub MAIN at /Users/alekseimelezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin/rak line 3
  in block <unit> at /Users/alekseimelezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin/rak line 1

[melezhik App-Rak]$ raku -v
Welcome to Rakudo™ v2022.06.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2022.06.

Apparently this one needs some unit or Tommy tests )))

Can't reproduce locally :-(

hmm, interesting , looks like a zef/raku related issue on Mac OS ? At least, it reproducible after upgrade from older to newer version ...
[melezhik App-Rak]$ zef uninstall App::Rak
===> Uninstalled from /Users/alekseimelezhik/.rakubrew/versions/moar-2022.06/share/perl6/site
App::Rak:ver<0.0.10>:auth<zef:lizmat>
App::Rak:ver<0.0.1>:auth<zef:lizmat>
App::Rak:ver<0.0.12>:auth<zef:lizmat>
[melezhik App-Rak]$ zef install "App::Rak:ver<0.0.9>"
===> Searching for: App::Rak:ver<0.0.9>
===> Testing: App::Rak:ver<0.0.9>:auth<zef:lizmat>
===> Testing [OK] for App::Rak:ver<0.0.9>:auth<zef:lizmat>
===> Installing: App::Rak:ver<0.0.9>:auth<zef:lizmat>

1 bin/ script [rak] installed to:
/Users/alekseimelezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin
[melezhik App-Rak]$ rak foo --human
foo.txt
 1: foo100

lib/App/Rak.rakumod
 347: $ rak foo      # look for "foo" in current directory recursively
 349: $ rak foo bar  # look for "foo" in directory "bar" recursively
 351: $ rak '/ << foo >> /'    # look for "foo" as word in current directory
 353: $ raku foo --files-only  # look for "foo", only produce filenames
 355: $ raku foo --before=2 --after=2  # also produce 2 lines before and after
 515: $ rak foo --im
 520: $ rak --save=foo
 521: Removed configuration for 'foo'
 567: $ rak foo --im

README.md
  12: $ rak foo      # look for "foo" in current directory recursively
  14: $ rak foo bar  # look for "foo" in directory "bar" recursively
  16: $ rak '/ << foo >> /'    # look for "foo" as word in current directory
  18: $ raku foo --files-only  # look for "foo", only produce filenames
  20: $ raku foo --before=2 --after=2  # also produce 2 lines before and after
 152: $ rak foo --im
 157: $ rak --save=foo
 158: Removed configuration for 'foo'
 195: $ rak foo --im

[melezhik App-Rak]$ zef upgrade App::Rak
===> Searching for: App::Rak
The following distributions will be upgraded: App::Rak:ver<0.0.12>:auth<zef:lizmat>
===> Updating: App::Rak:ver<0.0.12>:auth<zef:lizmat>
===> Testing: App::Rak:ver<0.0.12>:auth<zef:lizmat>
===> Testing [OK] for App::Rak:ver<0.0.12>:auth<zef:lizmat>
===> Installing: App::Rak:ver<0.0.12>:auth<zef:lizmat>

1 bin/ script [rak] installed to:
/Users/alekseimelezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin
[melezhik App-Rak]$ tomty --all
[1/4] / [rak-search] .......  2 sec. FAIL
[2/4] / [rak-search-before-after] .......  2 sec. FAIL
[3/4] / [rak-search-dir] .......  1 sec. FAIL
[4/4] / [rak-search-files-only] .......  1 sec. FAIL
=========================================
)=: / [4] tests in 6 sec / (0) tests passed / (4) failed
[melezhik App-Rak]$ rak foo --human
Cannot resolve caller postcircumfix:<{ }>(VMNull, Str:D); none of these signatures matches:
    (\SELF, Mu \key)
    (\SELF, Mu \key, Mu \ASSIGN)
    (\SELF, Mu \key, Mu :$BIND! is raw)
    (\SELF, Mu \key, Bool(Any) :$delete!)
    (\SELF, Mu \key, Bool(Any) :$delete!, *%other)
    (\SELF, Mu \key, Bool(Any) :$exists!)
    (\SELF, Mu \key, Bool(Any) :$exists!, *%other)
    (\SELF, Mu \key, Bool(Any) :$kv!, *%other)
    (\SELF, Mu \key, Bool(Any) :$p!, *%other)
    (\SELF, Mu \key, Bool(Any) :$k!, *%other)
    (\SELF, Mu \key, Bool(Any) :$v!, *%other)
    (\SELF, Iterable \key)
    (\SELF, Iterable \keys, Mu \values)
    (\SELF, Iterable \key, :$BIND! is raw)
    (\SELF, Iterable \key, Bool(Any) :$delete!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$exists!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$kv!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$p!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$k!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$v!, *%other)
    (\SELF, Whatever)
    (\SELF, Whatever, Mu \ASSIGN)
    (\SELF, Whatever, :$BIND!)
    (\SELF, Whatever, Bool(Any) :$delete!, *%other)
    (\SELF, Whatever, Bool(Any) :$exists!, *%other)
    (\SELF, Whatever, Bool(Any) :$kv!, *%other)
    (\SELF, Whatever, Bool(Any) :$p!, *%other)
    (\SELF, Whatever, Bool(Any) :$k!, *%other)
    (\SELF, Whatever, Bool(Any) :$p!, *%other)
    (\SELF, Whatever, Bool(Any) :$v!, *%other)
    (\SELF, :$BIND!)
    (\SELF, Bool(Any) :$delete!, *%other)
    (\SELF, Bool(Any) :$exists!, *%other)
    (\SELF, Bool(Any) :$kv!, *%other)
    (\SELF, Bool(Any) :$p!, *%other)
    (\SELF, Bool(Any) :$k!, *%other)
    (\SELF, Bool(Any) :$p!, *%other)
    (\SELF, Bool(Any) :$v!, *%other)
    (Mu \SELF, *%other)
  in block  at /Users/alekseimelezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/sources/CF0CA45D52CD1D6E64F533B6BF64A8E32E8C331B (App::Rak) line 137
  in sub MAIN at /Users/alekseimelezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/sources/CF0CA45D52CD1D6E64F533B6BF64A8E32E8C331B (App::Rak) line 134
  in block <unit> at /Users/alekseimelezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/resources/A7114D6D7B56D6C6E833071EBD41B3EA96754369 line 3
  in sub MAIN at /Users/alekseimelezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin/rak line 3
  in block <unit> at /Users/alekseimelezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin/rak line 1

Please nevermind my last comment, the issue is just reproducible for the latest version, maybe we hit some bug for this version of Rakudo and this version of Mac OS, that App::Raku revealed ? It's easy to track it down by looking at the changes made at version 0.0.12 :
[melezhik App-Rak]$ raku -v
Welcome to Rakudo™ v2022.06.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2022.06.

[melezhik App-Rak]$ zef uninstall App::Rak
===> Uninstalled from /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site
App::Rak:ver<0.0.9>:auth<zef:lizmat>
App::Rak:ver<0.0.12>:auth<zef:lizmat>
[melezhik App-Rak]$ zef upgrade App::Rak
Can't upgrade identities that aren't installed: App::Rak
[melezhik App-Rak]$ zef install App::Rak
===> Searching for: App::Rak
===> Testing: App::Rak:ver<0.0.12>:auth<zef:lizmat>
===> Testing [OK] for App::Rak:ver<0.0.12>:auth<zef:lizmat>
===> Installing: App::Rak:ver<0.0.12>:auth<zef:lizmat>

1 bin/ script [rak] installed to:
/Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin
[melezhik App-Rak]$ rak fooeee --human
Cannot resolve caller postcircumfix:<{ }>(VMNull, Str:D); none of these signatures matches:
    (\SELF, Mu \key)
    (\SELF, Mu \key, Mu \ASSIGN)
    (\SELF, Mu \key, Mu :$BIND! is raw)
    (\SELF, Mu \key, Bool(Any) :$delete!)
    (\SELF, Mu \key, Bool(Any) :$delete!, *%other)
    (\SELF, Mu \key, Bool(Any) :$exists!)
    (\SELF, Mu \key, Bool(Any) :$exists!, *%other)
    (\SELF, Mu \key, Bool(Any) :$kv!, *%other)
    (\SELF, Mu \key, Bool(Any) :$p!, *%other)
    (\SELF, Mu \key, Bool(Any) :$k!, *%other)
    (\SELF, Mu \key, Bool(Any) :$v!, *%other)
    (\SELF, Iterable \key)
    (\SELF, Iterable \keys, Mu \values)
    (\SELF, Iterable \key, :$BIND! is raw)
    (\SELF, Iterable \key, Bool(Any) :$delete!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$exists!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$kv!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$p!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$k!, *%other)
    (\SELF, Iterable \key, Bool(Any) :$v!, *%other)
    (\SELF, Whatever)
    (\SELF, Whatever, Mu \ASSIGN)
    (\SELF, Whatever, :$BIND!)
    (\SELF, Whatever, Bool(Any) :$delete!, *%other)
    (\SELF, Whatever, Bool(Any) :$exists!, *%other)
    (\SELF, Whatever, Bool(Any) :$kv!, *%other)
    (\SELF, Whatever, Bool(Any) :$p!, *%other)
    (\SELF, Whatever, Bool(Any) :$k!, *%other)
    (\SELF, Whatever, Bool(Any) :$p!, *%other)
    (\SELF, Whatever, Bool(Any) :$v!, *%other)
    (\SELF, :$BIND!)
    (\SELF, Bool(Any) :$delete!, *%other)
    (\SELF, Bool(Any) :$exists!, *%other)
    (\SELF, Bool(Any) :$kv!, *%other)
    (\SELF, Bool(Any) :$p!, *%other)
    (\SELF, Bool(Any) :$k!, *%other)
    (\SELF, Bool(Any) :$p!, *%other)
    (\SELF, Bool(Any) :$v!, *%other)
    (Mu \SELF, *%other)
  in block  at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/sources/CF0CA45D52CD1D6E64F533B6BF64A8E32E8C331B (App::Rak) line 137
  in sub MAIN at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/sources/CF0CA45D52CD1D6E64F533B6BF64A8E32E8C331B (App::Rak) line 134
  in block <unit> at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/resources/A7114D6D7B56D6C6E833071EBD41B3EA96754369 line 3
  in sub MAIN at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin/rak line 3
  in block <unit> at /Users/melezhik/.rakubrew/versions/moar-2022.06/share/perl6/site/bin/rak line 1

Looks like this occurred when there was no ~/.rak-config.json file available.


Provide support for Camel-K Kotlin files

https://trello.com/c/tSJjhJJf/37-completion-for-camel-uri-for-camel-k-kotlin-files
https://github.com/camel-tooling/camel-language-server/issues/163
example file https://github.com/apache/camel-k/blob/master/examples/kotlin-routes.kts
detect Kotlin files when one of them:

filename *.camelk..kts
modeline -like starting with // camel-k: language=kotlin

verified with VS Code 1.37.0 and Language Support for Apache Camel 0.0.16


Ignore .babelrc through .npmignore to fix issue with react-native

Ignore .babelrc through .npmignore to fix issue with react-native packager.
The react-native packager searches through all directories and parses
.babelrc config files if it finds any. This breaks the builds if these
.babelrc files are either for babel 5 or if they contain plugins unknown
to the parent project.
@see: https://github.com/facebook/react-native/issues/4062

Nice catch! Definitely something that needed to be changed!


[BEAM-374] Enable dependency-plugin and failOnWarning at global level.

Spark dependency fix is included in this PR. This is to remove the beam-examples dependency from Spark.
failOnWarning is disabled for Flink for now.
The added dependencies in this PR come from "mvn dependency:analyze"

R: @amitsela for checking the correctness of the spark dependency.
R: @dhalperi for checking IO.
R: @mxm for flink
R: @davorbonaci for the overall PR

Added comments, mainly relating to @dhalperi comment on inheriting versions for root level pom (and some suggestions for additional once for Spark's pom).
BTW, is there an additional benefit here ? besides clarity of course. I'm not familiar with analyze-only.
And how does this relate to removing beam-examples dependencies ? Why do we want to remove this dependency ? I would prefer a dependency to use beam-examples in the runner's tests on duplicating them.

Users should be able to run beam-examples with any runners, and beam-examples will need runtime dependency to runners-spark. I cannot add that runtime dependency when runners-spark depends on beam-examples.
Previously, runners-spark is pull dependency from other module, and runners-spark can be broken by dependency changes in other module (removing, changing version, and even adding). This is another benefits.

Makes sense. Thanks for clarifying that!
LGTM.

@dhalperi PTAL, and merge if it looks good.
Thanks

LGTM.


AxisTicks: custom label tick with default one

ScottPlot Version: 4.1.64
Operating System: Windows
Application Type: Console (.NET 6/ .NET 7)
Question: Hello. Could you please tell if it's possible to render/configurate custom labels with default one? I fully reviewed FAQ and Cookbook page, but didn't find anything related. Thanks.
If I missed an example from CookBook or something, please show me.

Hi @Alexander778, I don't think there is anything built in that can do this exactly, but there's something that's pretty close and you can edit it to achieve this goal if you like.
Check out the labeled axis line. it shows how to place labels in the axis area (outside the plot area):
https://scottplot.net/cookbook/4.1/category/plottable-axis-line-and-span/#position-labels
https://github.com/ScottPlot/ScottPlot/blob/14017d8f7d3f06114bba8e8d864f5eb2734daa37/src/ScottPlot4/ScottPlot/Plottable/AxisLine.cs#L189-L253
There's a lot of logic there because it has code blocks for drawing on all 4 sides of the plot, but your code can be simpler if oyu just intend to draw beneath the plot.
You can create a custom plot type using the code in that file as a reference. I bet you can remove ~80% of the code because that plot type has a lot of features you don't need (e.g., mouse interaction and ability to be dragged)
To create a custom plot type you can follow the guide here: https://scottplot.net/faq/custom-plot-type/
If you end up creating this plot type and it looks good, feel free to share its code here or create a pull request and we can add it to ScottPlot so it's available for others to use too! 🚀


seeking new maintainers/editors

I would like to get some additional people into the maintainer role in this repo, and probably at the same time make them editors of the spec rather than simple contributors. I remain quite interested in this DID method, but I think the implementation experience of others is now surpassing my own, and I may be slowing you down.
So, is anybody interested in becoming a maintainer?
@swcurran @dbluhm @TelegramSam @TimoGlastra

I’m interested, but I’m not sure about the DIF rules that would allow/prevent me from doing so.  I believe BCGov is a member. Is that sufficient?

I'm more of the "get forgiveness, not permission" mindset.


Recorded AAC from ios cannot play on Android

Yes, I know someone may say there is similar problem before.
But I got something different.
I recorded voice on iOS, send to server, then play on Android, FAILED.
I recorded voice on Android , send to server, then play on iOS, Worked.
The only difference I found is that content_type uploaded from iOS is changed to be 'application/octet-stream' while I explicitly set to ‘audio/aac’, I guess this is the reason why Android cannot play that aac from network.
I have no idea how to fix or workaround. Any ideas?

I make a typo, 'acc' instead of 'aac' while creating the voice file from the beginning.
That's the reason why fetch changed the content-type to application/octet-stream.
Problem sovled.


HF_HUB_KEEP_LOCK_FILES to prevent rare concurrency issue

The lock file could be removed when the 2nd process gets the lock.
And then the 3rd process will lock on a different lock file handle.
Although the lock path stays the same.
1st proc gets the lock
2nd proc waits for the lock
1st proc releases the lock
1st proc removes the lock file
2nd proc gets the lock
3rd proc creates a new lock file and gets the lock
Demo code to show the problem:
from filelock import FileLock
import threading
import os
import time

lock_path = "/tmp/test.lock"

def lock1():
   with FileLock(lock_path):
      print("lock acquired in thread1")
      time.sleep(1)

   print("lock released in thread1")
   time.sleep(1)
   os.remove(lock_path)
   print("lock file removed in thread1")

def lock2():
   time.sleep(1)
   with FileLock(lock_path):
      print("lock acquired in thread2")
      time.sleep(10)

   print("lock released in thread2")

def lock3():
   time.sleep(3)
   with FileLock(lock_path):
      print("lock acquired in thread3")
      time.sleep(10)

t1 = threading.Thread(target=lock1)
t2 = threading.Thread(target=lock2)
t3 = threading.Thread(target=lock3)
t1.start()
t2.start()
t3.start()
t1.join()
t2.join()
t3.join()

Add ENV HF_HUB_KEEP_LOCK_FILES to give user option to keep the lock files to prevent concurrency issues.

Hi @beeender thanks for raising the question here. I think the reason why we want to delete the lock file is to avoid polluting the cache system. Filelock has different ways of handling the file lock depending on the platform:

on Windows, it does remove the file
on Unix that does not support fcntl, it does remove the file
on Unix that supports fcntl (most of them?), the file lock is NOT removed by default

What we could do to ensure that the file lock is removed in any case is to use only the WindowsFileLock and SoftFileLock, instead of UnixFileLock (taking the logic from here). Not an expert here so I'd certainly need to double-check the possible side effect.
cc-ing @julien-c who implemented it in https://github.com/huggingface/huggingface_hub/pull/801

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@beeender after thinking about it and some discussions with @julien-c, we ended up with the conclusion:

We want to use filelock with the default Unix and Windows implementations that relies not only on the file existence but also some low-level to check if a process currently owns the lock. Therefore I'd rather not use SoftFileLock by default everywhere. It's a good proxy but it'd be quite easy to end-up in a dead-lock.
By default, filelock doesn't remove the lock files. There have been issues with that in the past (see https://github.com/tox-dev/filelock/issues/31) and there are no satisfying good practices to remove them (see https://github.com/tox-dev/filelock/issues/76).
We still prefer to remove the lock files in order to leave a "clean" cache. Leaving lock files is not wrong but looks messy to users. Also leaving lock might break some downstream tools (at least not scan/delete cache, not snapshot_download but we might be missing something?)
Deleting lock files as we do it now can lead to concurrency issues but very few cases have been reported in 18 months, so hopefully not very problematic for most of our users.

That being said what we can do is to add a new flag (HF_HUB_KEEP_LOCK_FILES?) for power-users like you that have multiple processes downloading a lot of files in parallel. What do you think @beeender ? That would be a bit more work on the PR (both logic-wise and docs-wise) but it seems to me a good compromise between usage and robustness.

That being said what we can do is to add a new flag (HF_HUB_KEEP_LOCK_FILES?)

This sounds good to me! Let me add that in the PR.

Great, thanks!
To do so, I would:

add it to the reference page
add it constants.py
end then use it in file_download.py
add a quick test

And that should be it. Please let me know if you need any help. Thanks in advance!

+    def test_keep_lock_file(self):
+        """Lock files should be kept if HF_HUB_KEEP_LOCK_FILES is True
+        """
+        with SoftTemporaryDirectory() as tmpdir:
+            with patch("huggingface_hub.constants.HF_HUB_KEEP_LOCK_FILES", False):
+                hf_hub_download(DUMMY_MODEL_ID, filename=CONFIG_NAME, cache_dir=tmpdir)
+            for subdir, dirs, files in os.walk(tmpdir):
+                for file in files:
+                    # No lock files should exist
+                    self.assertNotRegex(file, ".*\.lock")
+
+        with SoftTemporaryDirectory() as tmpdir:
+            with patch("huggingface_hub.constants.HF_HUB_KEEP_LOCK_FILES", True):
+                hf_hub_download(DUMMY_MODEL_ID, filename=CONFIG_NAME, cache_dir=tmpdir)
+            lock_file_exist = False
+            for subdir, dirs, files in os.walk(tmpdir):
+                for file in files:
+                    if file.endWith(".lock"):
+                        lock_file_exist = True
+                        break
+            self.assertTrue(lock_file_exist)

@Wauplin My constants mocking doesn't work, do you have any idea?

My constants mocking doesn't work, do you have any idea?

Since you are importing the constant directly in file_download, you should patch the value there:
with patch("huggingface_hub.file_download.HF_HUB_KEEP_LOCK_FILES", True):

and it should work.

My constants mocking doesn't work, do you have any idea?

Since you are importing the constant directly in file_download, you should patch the value there:
with patch("huggingface_hub.file_download.HF_HUB_KEEP_LOCK_FILES", True):

and it should work.

Magic! And tests have been added.

In another thought, shall we just create the lock file in the temp folder, so it does not have to be deleted.
Like:
/tmp/huggingface/<CHECKSUM_FILE_PATH>.lock

This may not work if the cache folder is a sharing folder (nfs/samba) and downloading happens on multiple hosts. But I doubt the flock ever works with nfs/samba.
HF_HUB_KEEP_LOCK_FILES won't be needed then.

I like the idea!
What do you think about leaving the lock files in a separate directory but still in the $HF_HOME folder? This way we ensure that locks on shared drive still works as they do now (even if it's only based on file existence, it's better than nothing). That would give us something like this:
➜  ~ ls -la ~/.cache/huggingface/hub
total 104
drwxrwxr-x 21 wauplin wauplin 16384 sept. 20 08:57 .
drwxrwxr-x  6 wauplin wauplin  4096 sept. 18 16:39 ..
drwxrwxr-x  5 wauplin wauplin  4096 avril  6 17:07 datasets--hf-internal-testing--dummy-flac-single-example
drwxrwxr-x  5 wauplin wauplin  4096 mai   26 10:22 datasets--Narsil--image_dummy
drwxrwxr-x  2 wauplin wauplin  4096 sept. 20 08:50 .locks
drwxrwxr-x  5 wauplin wauplin  4096 avril 25 14:53 models--admruul--anything-v3.0
drwxrwxr-x  5 wauplin wauplin  4096 juil. 10 12:51 models--CompVis--stable-diffusion-v1-4
drwxrwxr-x  5 wauplin wauplin  4096 sept. 11 12:50 models--gpt2
drwxrwxr-x  5 wauplin wauplin  4096 sept. 19 13:43 models--hf-internal-testing--dummy-gated-model
drwxrwxr-x  6 wauplin wauplin  4096 avril 24 10:04 models--hf-internal-testing--tiny-random-bert
(...)

➜  ~ tree -la ~/.cache/huggingface/hub/.locks
/home/wauplin/.cache/huggingface/hub/.locks
└── 46a9d58622b4675b29564da2d9ba73e702241c5fa969f12c387cad4aa984276a.lock

0 directories, 1 file

with lock_path = os.path.join(locks_dir, f"{filename}.lock"). Filename is based on the etag of the file on the Hub. I'll need to double check that etags are unique across repos (I think so but better to check). In any case it should be easy to build a unique lock path per blob file.
That way we still have lock files but not messing around everywhere in the cache. We could have an utility to clean the locks folder (either after snapshot_download or when scanning/deleting the cache huggingface-cli delete-cache). "Cleaning the locks folder" could be "delete all locks older than 12h" for instance. Whatever, this part is not so critical.

yes, great idea!
and a CLI script could take care of deleting .locks from time to time if needed.

I'm making some cleaning on the repo so I renamed this PR accordingly with what we discussed in https://github.com/huggingface/huggingface_hub/pull/1659#issuecomment-1727098559. @beeender are you still interested in implementing it? :)

Yes! I was on vacation for the last week. Will create a PR soon.

@Wauplin PR has been updated. :up:

(fix tests in https://github.com/huggingface/huggingface_hub/pull/1659/commits/e670797604b7b4e6412a1924da4f13aa7fb78730. Scan-cache was failing to scan the .locks folder)


chore: weaken typeclass assumptions MetricSpace → PseudoMetricSpace

Discovered through the linter in #17519 (but in fact not related to it).

!bench

This generalization can go quite a lot further... Let me try pushing some more.

I span off #17526 rather than getting carried away beyond MeasureTheory.

!bench

It looks good and I think we could merge. Do you still want to try and get a working benchmark?

!bench

The speed-center is back up, so let's hopefully just wait a short moment until the benchmarking results are in. If this doesn't work, I'm happy to merge it as-is.

Once more with feeling:

!bench

bors r+


Grouping in SVG links

Hi,
I have several links in an SVG that should display HTML texts in the lightbox.
The display works, but I am not able to build in a grouping for one before <--> back.
The code looks something like this:
...
    <g>
    	<title><?= $more ?></title>
	    <a xlink:href="#text_1" class="colorbox_content xyz" data-cbox="lb1234">
	        <rect x="29.248" y="1311.749" fill="none" width="1014.101" height="282.029"/>
	    </a>
	</g>
    <g>
    	<title><?= $more ?></title>
	    <a xlink:href="#text_2" class="colorbox_content xyz" data-cbox="lb1234">
	        <rect x="29.248" y="1032.723" fill="none" width="774.078" height="279.026"/>
	    </a>
	</g>
...

and jQuery
<script>
$(document).on('click', '.colorbox_content', function(event){
    event.stopPropagation();
    event.preventDefault();
    var xhref = $(this).attr('xlink:href');
    var rel   = $(this).attr('data-cbox')
    $.colorbox({
    	maxWidth: '95%',
        maxHeight: '95%',
        opacity: '0.5',
    	inline: true,
    	rel: rel,
    	href: xhref,
    });
});
</script>

Hi, sorry about the late reply, I've been traveling. You should be able to use the SVG elements like you would any other DOM element. Does this work?
$('.colorbox_content').colorbox({
    	maxWidth: '95%',
        maxHeight: '95%',
        opacity: '0.5',
    	inline: true,
    	rel: function(){ return $(this).attr('xlink:href') },
    	href: function(){ return $(this).attr('xlink:href') },
});

no, unfortunately this does not work :disappointed:


How use multisig to create a transaction and sign it

version: <IP_ADDRESS>
my code, likes wrong.
function createTransaction(Array $inputs,Array $outputs,Array $private_key,$script) {
            // Initialize transaction creator
            $transaction = TransactionFactory::build();

            // Initialize address creator
            $addressCreator = new \BitWasp\Bitcoin\Address\AddressCreator();

            // Initialize script
            $script = ScriptFactory::fromHex($script);

            foreach ($inputs as $input) {
                $transaction->input($input['txid'],$input['vout']);
            }

            foreach ($outputs as $address=>$amount)
                $transaction->payToAddress($amount,$addressCreator->fromString($address));

            // Make transaction
            $transaction = $transaction->get();

            // Sign transaction
            $signer = new \BitWasp\Bitcoin\Transaction\Factory\Signer($transaction);
            $signd = new \BitWasp\Bitcoin\Transaction\Factory\SignData();
            $signd->p2sh($script);

            foreach ($transaction->getOutputs() as $index=>$output)
                foreach ($private_key as $pkey) {
                    $pk = PrivateKeyFactory::fromWif($pkey);
                    $signer->input($index,$output,$signd)->sign($pk);
                }

            // Signing and get output
            $hex = $signer -> get() -> getHex();

            return $hex;
}

create( [ ['txid'=>'000000000','vout'=>0] ] , ['address'=>10,'address2'=>10], ['pkey1','pkey2'], 'multisign wallet script hex code' )

// multisig
// $script = ScriptFactory::scriptPubKey()->multisig(2,[pubkey1,pubkey2,pubkey3],true)->getHex();

Hey, you were pretty close!
You also need to pass the 'UTXO's of the outputs you are trying to spend. If you look at the way you are calling signer->input->sign(), you should spot a logical error - you are looping over outputs which are the destination, not the source.
Also, in bitcoin, when you receive funds on an address technically someone has created an 'output' structure paying you. If you wish to sign something, you need to give the signer that script (for your address) so it can correctly sign the transaction.
            foreach ($transaction->getInputs() as $index=>$input)
                foreach ($private_key as $pkey) {
                    $pk = PrivateKeyFactory::fromWif($pkey);
                    $signer->input($index,$arrayOfPrevOuts[$index],$signd)->sign($pk);
                }

@afk11  How to get the output structure? If I have 2 inputs and 1 output, how do I confirm the structure of the output?
so if multisig wallet address is 1FAoam1xaWqVLVfd3BuY8rJJroz4U9dSWD
the unspent transaction is
https://api.blockcypher.com/v1/btc/main/addrs/1FAoam1xaWqVLVfd3BuY8rJJroz4U9dSWD?unspentOnly=true
{
  "address": "1FAoam1xaWqVLVfd3BuY8rJJroz4U9dSWD",
  "total_received": 100000000,
  "total_sent": 0,
  "balance": 100000000,
  "unconfirmed_balance": 0,
  "final_balance": 100000000,
  "n_tx": 1,
  "unconfirmed_n_tx": 0,
  "final_n_tx": 1,
  "txrefs": [
    {
      "tx_hash": "918b246327ae90d9bf1a6fda6e880b07f5e1efa3c6db7e08be02d8f61c809693",
      "block_height": 523056,
      "tx_input_n": -1,
      "tx_output_n": 0,
      "value": 100000000,  <- TransactionOutput(value)???
      "ref_balance": 100000000,
      "spent": false,
      "confirmations": 1,
      "confirmed": "2018-05-17T02:56:22Z",
      "double_spend": false
    }
  ],
  "tx_url": "https://api.blockcypher.com/v1/btc/main/txs/"
}

and the output amount will be the inputs value (transaction receive admount) ?
output structure will be like this ?
$output = new TransactionOutput('100000000', $script);

$inputs = [
    ['txid'=>'transaction id', 'vout'=>0, 'value' => 'unspent amount of current input value ?']
];
foreach ($transaction->getInputs() as $index=>$input)
            foreach ($private_key as $pkey) {
                $pk = PrivateKeyFactory::fromWif($pkey);
                foreach ($inputs as $_i)
                    $signer->input($index,new TransactionOutput($_i['value'], $script),$signd)->sign($pk);
            }

like this ?

The required 'outputs' in this case are the outputs someone created in order to fund your wallet!
You already have an array with [[txid,vout]], but you also need [[txid,vout,value,scriptPubKey(or just address]]
That data contains two things: the identifier of the output (txid,vout), the value, and then the script(related to the address). You have to use txid/vout to identify what inputs you want to spend, which you've already done.
But you also need to tell give the signer the (value, script) part.  You've got the details already.

Hm, maybe blockcypher has a testnet api you can use, 10000 sats will probably a lot in a few years :P

@afk11  ..  that address is a example 🤣🤣. my generate multisig wallet address function
function generate_multisign(Array $pubkeys) {
    try {
        $keys = [];
        foreach ($pubkeys as $pubkey) {
            $keys[] = PublicKeyFactory::fromHex($pubkey);
        }
        $script = ScriptFactory::scriptPubKey()->multisig(2,$keys,true);
        return [
            'address'=> (new P2shScript($script))->getAddress()->getAddress(),
            'script'=> $script->getBuffer()->getHex(),
            'object'=> $script
        ];
    } catch (Exception $e) {
        return false;
    }
}

have some wrong?
I know. finally I get a real raw transaction hex code and verified it.

why not cache this?

just a test 😊
tks.

@afk11 .. that address is a example roflrofl. my generate multisig wallet address function

Ah yes, sorry!

have some wrong?

nope, looks just fine! One thing to introduce, the P2shScript class caches some stuff since it's known exactly what kind of script it is. It has the same interface as Script, but a little extra. Makes things a little faster too.
        $script = new P2shScript(ScriptFactory::scriptPubKey()->multisig(2,$keys,true)));

I know. finally I get a real raw transaction hex code and verified it.

That's excellent, great news!

just a test blush

hehe, cool :)

@afk11
Can you give me your email address? There are some questions I would like to consult you about blockchain storage.😂😂


add support for camelCase

Hi,
Please, can you add support for camelCase?
I am using CamelCasePlugin with kysely and types are not correct.
Thank you for this great package

Great idea! I will try to implement this in 0.4.1 soon.

Thank you

Implemented in 0.5.0!

Thank you :)

Is this out of the box or do we need to do something to enable it?

Just found this issue when searching as I need it too. I read through the linked commit from 0.5.0 to see you simply pass "--camel-case" arg when you run  'kysely-codegen' (i.e. 'kysely-codegen --camel-case').
I am going to put up a PR to start a section in the doc to expose some of these args that you wouldn't know about unless you went looking for them.


V2, React: Invalid hook call

⚠ IMPORTANT ⚠ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

[X] Read the docs.
[X] Use Vite >=2.0. (1.x is no longer supported)
[X] If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.

Describe the bug
Uncaught Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.

add dependencies to optimizeDeps solves the problem, but is it a bug?
Looks like react-hook-form provided esm version, may be that cause the App and the Library refer to different instance of React?
A clear and concise description of what the bug is.
Reproduction
yarn create @vitejs/app vite3 --template react-ts
cd vite3
yarn add react-hook-form

// add the following to App.tsx
import { useForm } from 'react-hook-form';
function App() {
  ...
  const form = useForm();
  ...
}
yarn dev

OR
https://github.com/xiaoyu-tamu/vite-react-hook-form
System Info
  "dependencies": {
    "react": "^17.0.0",
    "react-dom": "^17.0.0",
    "react-hook-form": "^6.14.0"
  },
  "devDependencies": {
    "@types/react": "^17.0.0",
    "@types/react-dom": "^17.0.0",
    "@vitejs/plugin-react-refresh": "^1.1.0",
    "typescript": "^4.1.2",
    "vite": "^2.0.0-beta.7"
  }

vite version:
Operating System: MacOS
Node version: 14
Package manager (npm/yarn/pnpm) and version: yarn

Logs (Optional if provided reproduction)

Run vite or vite build with the --debug flag.
Provide the error log here.

Try adding dedupe: ["react", "react-dom"] to your Vite config.

Try adding dedupe: ["react", "react-dom"] to your Vite config.

Thank you. you saved the day

Thank you. you saved the day

Umm.. It's still not work as expected. It only work if I comment the useForm hook, build, and uncomment it.

Umm.. It's still not work as expected. It only work if I comment the useForm hook, build, and uncomment it.

Tested in beta.10 and it works as expected - I think this has to do with the local dependency browser cache - tick disable cache in your devtools and run it again and it should work.

Tested in beta.10 and it works as expected - I think this has to do with the local dependency browser cache - tick disable cache in your devtools and run it again and it should work.

This does reveal an issue: we currently cache non-optimized dependencies via the version string but they may get rewritten with different imports to optimized deps (with different hashes). So we need to a more precise cache invalidation check here.

This does reveal an issue: we currently cache non-optimized dependencies via the version string but they may get rewritten with different imports to optimized deps (with different hashes). So we need to a more precise cache invalidation check here.

Even disabling the cache and adding dedupe: ["react", "react-dom"] I'm still getting Invalid hook call

Even disabling the cache and adding dedupe: ["react", "react-dom"] I'm still getting Invalid hook call

@thelinuxlich always open new issue with valid repro - commenting on old issues does't get things fixed.

@thelinuxlich always open new issue with valid repro - commenting on old issues does't get things fixed.


Fix some bugs: support micro-batched denoising

Previous version neglected the following case, where sub-prompts are packed into several micro-batches and fed into diffusion-model：
https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8/modules/sd_samplers_kdiffusion.py#L124-L138
        else:
            x_out = torch.zeros_like(x_in)
            batch_size = batch_size*2 if shared.batch_cond_uncond else batch_size
            for batch_offset in range(0, tensor.shape[0], batch_size):
                a = batch_offset
                b = min(a + batch_size, tensor.shape[0])

                if not is_edit_model:
                    c_crossattn = [tensor[a:b]]
                else:
                    c_crossattn = torch.cat([tensor[a:b]], uncond)

                x_out[a:b] = self.inner_model(x_in[a:b], sigma_in[a:b], cond={"c_crossattn": c_crossattn, "c_concat": [image_cond_in[a:b]]})

            x_out[-uncond.shape[0]:] = self.inner_model(x_in[-uncond.shape[0]:], sigma_in[-uncond.shape[0]:], cond={"c_crossattn": [uncond], "c_concat": [image_cond_in[-uncond.shape[0]:]]})

This PR adds support for such case.
By the way, original code may have a bug of processing text-model-encoder: "This code evaluated twice in get_learned_conditioning." should be "This code evaluated X times in get_learned_conditioning, where X is the number of loaded loras":
https://github.com/opparco/stable-diffusion-webui-composable-lora/blob/11fe4cac71090c4069109179befb9a663d7249d9/composable_lora.py#L63-L83
Here is a example showing the effect of this fix:
Generate Info:
masterpiece, best quality, 3girls, outdoors, night, holding hands, looking at another, from side, looking away, eye contact, facing another, faceoff,
AND masterpiece, best quality, 3girls, upper body,  <lora:asoulBella_v10:1>, purple eyes, purple hair, navel, ribbon, holding hands, looking at another, from side, looking away, eye contact, facing another,
AND masterpiece, best quality, 3girls, upper body,  <lora:asoulEileenpicoLORA_v10:1>, blue eyes, white long hair, holding hands, looking at another, from side, looking away, eye contact, facing another,
AND masterpiece, best quality, 3girls, upper body,  <lora:chracterYukino_v10:1>, blue eyes, white long hair, holding hands, looking at another, from side, looking away, eye contact, facing another,
Negative prompt: ugly, huge eyes, worst face, (bad and mutated hands:1.3), (worst quality:2.0), (low quality:2.0), (blurry:2.0), horror, geometry, bad_prompt, (bad hands), (missing fingers), multiple limbs, bad anatomy, (interlocked fingers:1.2), Ugly Fingers, (extra digit and hands and fingers and legs and arms:1.4),(deformed fingers:1.2),(long fingers:1.2), (bad-artist-anime), bad-artist, bad hand,
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 661846343, Size: 768x512, Model hash: 6e430eb514, Denoising strength: 0.5, Clip skip: 2, ENSD: 31337, Latent Couple: "divisions=1:1,1:3,1:3,1:3 positions=0:0,0:0,0:1,0:2 weights=0.2,0.8,0.8,0.8 end at step=20", Hires upscale: 2, Hires steps: 10, Hires upscaler: SwinIR_4x

Before:

After:

@Light-of-Hers
thanks for the report.
I probably already made a fix for the same issue. 92c531406504ac610a3e39699a82eafe12fec745

@Light-of-Hers thanks for the report. I probably already made a fix for the same issue. 92c5314

There's might be still a little problem. When lora_layer_name.endswith("_11_mlp_fc2"), there's text_model_encoder_counter += 1 for every lora in lora.loaded_loras with the same res (each res corresponds to a sub-prompt), then there might be some mismatch between the sub-prompt and the LoRAs applied to it.
https://github.com/opparco/stable-diffusion-webui-composable-lora/blob/5c1ca9c57c8b41b0bb6802c025b90238c909061a/composable_lora.py#L61
https://github.com/opparco/stable-diffusion-webui-composable-lora/blob/5c1ca9c57c8b41b0bb6802c025b90238c909061a/composable_lora.py#L115-L134
For example, with the following generate info:
masterpiece, best quality, 3girls, outdoors, night, holding hands, looking at another, from side, looking away, eye contact, facing another, faceoff,
AND masterpiece, best quality, 3girls, upper body,  <lora:asoulBella_v10:1>, purple eyes, purple hair, navel, ribbon, holding hands, looking at another, from side, looking away, eye contact, facing another,
AND masterpiece, best quality, 3girls, upper body,  <lora:asoulEileenpicoLORA_v10:1>, blue eyes, white long hair, holding hands, looking at another, from side, looking away, eye contact, facing another,
AND masterpiece, best quality, 3girls, upper body,  <lora:chracterYukino_v10:1>, blue eyes, white long hair, holding hands, looking at another, from side, looking away, eye contact, facing another,
Negative prompt: ugly, huge eyes, worst face, (bad and mutated hands:1.3), (worst quality:2.0), (low quality:2.0), (blurry:2.0), horror, geometry, bad_prompt, (bad hands), (missing fingers), multiple limbs, bad anatomy, (interlocked fingers:1.2), Ugly Fingers, (extra digit and hands and fingers and legs and arms:1.4),(deformed fingers:1.2),(long fingers:1.2), (bad-artist-anime), bad-artist, bad hand,
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 661846343, Size: 768x512, Model hash: 6e430eb514, Denoising strength: 0.5, Clip skip: 2, ENSD: 31337, Latent Couple: "divisions=1:1,1:3,1:3,1:3 positions=0:0,0:0,0:1,0:2 weights=0.2,0.8,0.8,0.8 end at step=20", Hires upscale: 2, Hires steps: 10, Hires upscaler: SwinIR_4x

The generated image with 92c5314 is (obviously all the LoRAs are shared among these three girls):

While a more correct version should be:

@Light-of-Hers
your code is correct. it will be merged.

@Light-of-Hers your code is correct. it will be merged.

Thanks. I'm glad to make contribution to your extension, which help me a lot.

incorrect hands, extra limbs, extra fingers, fused fingers, missing facial features, low quality, bad quality, bad anatomy, Missing limbs, missing fingers, scary, ugly


CSS Error in Course Exploration Page

When you go to 'https://pittcs.wiki/courses/', the course exploration page, if the course description is too long, then the class card on the right will overflow off the card. Ex: CS1660, CS1675.
If you add 'overflow: auto' to the css class 'text-xs', this seems to fix the issue.

@Steven-Jarmell awesome! Feel free to contribute to the Wiki and create a PR. Thanks!


[Android] Add test cases for stopLoading().

This patch is to add test cases for stopLoading().
Open an inexistent url, then execute stopLoading(), the load will be
stopped, title is empty.

What is up with this?


Support for MinGW on Windows

Hi!
I think it would be very helpful if you could add MinGW support for Windows, making it possible to compile the library as .a in Windows.
.lib files as it's currently compiling don't have a lot of compatibility with MinGW, making it hard to link libspdm as a static library from projects built with MinGW.

My grain of sand for this: #1162


Feature request: Parent method call inspection improvements

In CakePHP framework there are many framework classes with empty event callback methods for example:
https://github.com/cakephp/cakephp/blob/4.x/src/Controller/Controller.php#L1004-L1056
In CakePHP framework controller inheritance looks like this:
All controllers extend \App\Controller\AppController class, that extends \Cake\Controller\Controller
If i create beforeRender method in my MyExampleController i will get warning from your Senseless call to empty parent method inspection and it will be correct at that time.
Few weeks later i might want to create global beforeRender callback in via adding AppController::beforeRender method.
Since MyExampleControler::beforeRender method had parent call  removed newly added AppController::beforeRender method will be never called in MyExampleController::beforeRender
So i have two suggestions:

In order to complement Senseless call to empty parent method inspection there should be another reverse inspection that checks for missing parent call when non empty parent method exists (to help spot bugs introduced earlier)
Senseless call to empty parent method inspection should have deny list option. Preferably with wild-star support.
In case of CakePHP framework this inspection can introduce bugs on before* and after* methods

Another more generic option would be to limit Senseless call to empty parent method inspection to classes that are direct descendants of class with empty method like AppController but not active in indirect descendants like in MyExampleControler

What you want is to ensure that parent::method() is declared if the parent method is not empty. That's it?
class A { function x() { /** empty */ } }
class B extends A { function x() { parent::a(); } } // Can be dropped.

class A { function x() { /** empty */ } }
class B extends A { function x() { something(); } } // Must be kept.
class C extends B { function x() { /** empty */ } } // Must call parent::x() <-- that?

If so, weirdly I think PhpStorm already does something like this (I will check).
Would it be possible to give a more detailed example of what it is and how you expect it to be?

class A {
    function methodX() {
        /** empty function */
    }
}
class B extends A {}
class C extends B {}
class D extends B {}
class E extends B {}
class F extends B {}
class G extends B {
    function methodX() {
        /** some code GGG */
        return parent::methodX();
    }
}

In situation above B does not have own methodX. It currently inherits empty methodX method from A.
Currently Senseless call to empty parent method inspection will activate on C::methodX and it will suggest removing line
return parent::methodX();

Doing so will not brake code now, it will brake code much time later.
Suppose that 6 months later, due to a completely different ticket, someone makes the following Class B modification:
class B extends A {
    function methodX() {
        /** some code BBB */
    }
}

The some code BBB will be called correctly on classes B,C,D,E and F but due to the removal of the parent call 6 months earlier the some code BBB will not be called on class G
So removing the return parent::methodX(); in class G generated a bug 6 months later because calling methodX should call both some code GGG and some code BBB instead of calling only some code GGG

If so, weirdly I think PhpStorm already does something like this

PHPStorm has inspection that checks existence of parent method but it does not check if that method is empty or not.
This conflicts with your Senseless call to empty parent method inspection because it suggests re-adding the parent call which your inspection just removed
PHPStorm's inspection always suggest adding parent call event if parent method is empty.
And one more thing:
I you plan to implement reverse inspection that checks for missing parent call when non empty parent method exists i would also classify methods consisting of a single line always throwing an exception as empty and not suggest to call them
function someMethod()
{
   throw new \Exception('Not implemented';)
}

Just to make sure I understand: actually you want something like "missing parent call" to be displayed for the method in G, when the method in B or A exists and is other than empty.
class A {
    function methodX() { /** empty */ }
}

class B extends A {
    function methodX() {
        /** method not implemented until v1.0, but implemented at v1.1 */
       doSomething(); // implemented at v1.1
        /** parent call still not required here, as A::methodX() still empty */
    }
}

class G extends B {
    function methodX() {
        parent::methodX(); /** not required until v1.0, but now it is required at v1.1 because B::methodX() is implemented not-empty */
        // ^^^^^^^^^^ warn if it is not declared here at v1.1
        /** something */
    }
}

Just to make sure I understand: actually you want something like "missing parent call" to be displayed for the method in G, when the method in B or A exists and is other than empty.

Yes

I think it would also be useful to display a warning next to B::methodX indicating that there is a method G::methodX that does not parent call B::methodX

Implemented to version 0.20.0: it takes about three days to be published on the market. But if you want, you can download it from Releases.
Notes:
While I understand it's a necessary feature, the inspection won't trigger for parent methods that only return something. Because, in general, the override is intentional (please let me know if I'm wrong, in which case I can create a new option).
Example:
class Parent {
    public function method() {
        return doSomething(); // <-- Just a return.
    }
}

class Child extends Parent {
    public function method() {
        return doAnotherThing(); // <-- Intentional override.
    }
}

As for your second request, I believe it is not interesting at the moment, since PhpStorm can validate the entire project in search of problems. So we would end up having two reports of the same problem: one from the child to the parent and one from the parent to the child.
Additional notes:

Enabled by default;
Support to quick-fix;


Implemented Cullum/Willoughby method for removing spurious eigenvalues.

See attached files for details.
The Lanczos unit tests pass, even with a new, tighter convergence tolerance and use of the percent overshoot option.
spurious_eigenvalues_fix.txt

Can one of the admins verify this patch?

ok to test

OK to test

OK to test

@wdj I will take care of this PR.

Running for 60 eigenvalues (non-deflated mode, multiplicity  1) produces correct eigenvalues but wrong eigenvectors. When looking for 15 or 30 eigenvectors, everything seems to be fine.

Unfortunately, it seems that the new approach also has issues with multiplicity > 1 cases. For example, searching for 20 eigenvectors in a diagonal matrix with multiplicity 2 eigenvalues results in a weird situation where during the second pass of deflation all tridiagonal eigenvalues are declared to be spurious. And, in fact, the eigenvalues of both Lanczos T matrix and the reduced T2 matrix become negative, which is absurd.
failed_10_multiplicity2.txt

Reading more about Cullum, it seems that instead of computing the T2 eigenvalues, it is more efficient to use Sturm's theorem to just find the number of T2's eigenvalues in intervals surrounding T1's eigenvalues. This is a significantly cheaper calculation.

Further checking reveals that for multiplicity > 1 the wrong eigenvectors are coming from the first Lanczos solve. When searching for 10 eigenvalues with a single Lanczos solve for a multiplicity 2 diagonal matrix, the found eigenvalues are correct, but eigenvectors are not.

Running for 60 eigenvalues (non-deflated mode, multiplicity 1) produces correct eigenvalues but wrong eigenvectors. When looking for 15 or 30 eigenvectors, everything seems to be fine.
An example of the wrong eigenvector:
-1.008e+00 3.550e+00 -1.950e-04 -6.619e-06 2.551e-05 ...

which is completely off for a diagonal matrix.
failed_60.txt

There are two problems here.  First there is a bug such that if max iterations is hit, the code does not recover gracefully but gives garbage.  Adding the following line immediately after the lanczos iteration loop fixes this: "it = it < maxit ? it : maxit;".  Second, the convergence tolerance is much smaller than the solver can handle.  I was able to get convergence for these combinations of tolerances and required iterations: 1e-5/703, 1e-6/739, 1e-7/1791, 1e-8/2651.  So 1e-11 is unfortunately far smaller than what can be handled practically.  Not sure immediately whether this is due to the eigenproblem itself, the algorithm, or the implementation.  Hopefully a smaller tolerance will meet the needs for the mfmg algorithm - ?

So using the coarser tolerance, are the eigenvectors correct?

Yes, the test passes (eigenvalues, eigenvectors) --

With the change, if max its is reached without convergence, the best approximate eigenvectors are returned, rather than garbage --

OK very nice! Thanks Wayne. @aprokop can you take a look at this PR

I haven't checked the multiplicity problem yet, this may or may not fix it --

Looking at it right now.

Multiplicity 1 works (I used 1e-4 tolerance). Multiplicity > 1 with deflation breaks down for larger number of eigenvalues (for example, multiplicity 2 works with 40 distinct eigenvalues, but breaks down with 50). The spurious eigenvalues are there, and present an interesting case of having some eigenvalues be correct but with a higher multiplicity than in the original matrix.

One problem with the deflated method is, for some reason it is hard to drive the eigenpair residual norm low enough for a deflation cycle.  I'm having some success with the code below, which picks, from a set of tridiagonal eigenpairs with (artificial) multiplicity, the eigenvalue instance with the lowest residual error estimate.
// Identify repeated eigenvalues.
// A "marked" eigenvalue here is nonrepeated or first of a set of repeated.
std::vector is_repeated(n);
std::vector is_marked(n);
std::vector elt_in_cluster(n);
int i_marked_in_cluster = -1;
double sn_i_marked_in_cluster = 0;
for (int i = 0; i < n; ++i) {
const bool is_lower_repeated = i>0 && evals[i-1] >= evals[i] - tol2;
const bool is_upper_repeated = i<n-1 && evals[i+1] <= evals[i] + tol2;
is_repeated[i] = is_lower_repeated || is_upper_repeated;
const bool is_cluster_start = ! is_lower_repeated;
const bool is_cluster_end = ! is_upper_repeated;
//is_marked[i] = is_cluster_start; // old way

const double sn = std::abs(evecs_aux[n - 1 + n * i]);

if (is_cluster_start) {
  elt_in_cluster[i] = 0;
  is_marked[i] = true;
  i_marked_in_cluster = i;
  sn_i_marked_in_cluster = sn;
} else {
  elt_in_cluster[i] = elt_in_cluster[i-1] + 1;
  if (is_repeated[i] && sn < sn_i_marked_in_cluster) {
    is_marked[i_marked_in_cluster] = false;
    is_marked[i] = true;
    i_marked_in_cluster = i;
    sn_i_marked_in_cluster = sn;
  }
}

if (is_cluster_end) {
  i_marked_in_cluster = -1;
}

} // i

The other problem is that the deflation is not "perfect" -- a zero eigenvalue is being introduced from the projection -- there is some "noise" from iterating on the projected operator that introduces components in the null space.
I have some ideas for solving this.  Can it be assumed that the operator is positive semidefinite (or, even better, positive definite)?

I need to ask, can it be assumed that the operator is positive semidefinite (or, even better, positive definite)?

It is positive semidefinite but zero is a valid eigenvalue.

Got it.  If in Lanczos the original operator is shifted up by 1 (times identity), then in that case the spectrum of the original operator will be clearly distinguished from a zero eigenvalue, then after the solve and removal of spurious zero one can shift down by 1 to correct.  I'm going to experiment with something like that.


Map vSphere static IPs

This patch will get the static IPs configurations from the vSphere provider to each guest and will propogate it to virt-v2v to set it up while converting the VM.

@liranr23 since we have more time for getting this PR in, could you please check where it makes sense to add more tests? this PR indeed adds quite a few lines without tests...

https://github.com/kubev2v/forklift-console-plugin/pull/1138 - UI for save IPs flag

as i talked with Sharon today. i didn't address that currently it's for Windows VMs only.


Reverse mapped types do not preserve numeric index signatures

TypeScript Version:  3.1.0-dev.201xxxxx

Search Terms:
Code
With strict on:
interface A { [x: number]: A }
declare let a: A;
type Deep<T> = { [K in keyof T]: Deep<T[K]> }
declare function foo<T>(deep: Deep<T>): T;
const out = foo(a);
const q1 = out[0];
const q2 = out[0][0];
const q3 = out[0][1][0][2];

Expected behavior:
No errors.
Actual behavior:
Implicit any error on each out[0] as out has no numeric index signature.

out seems to be inferred to unknown, which I think is fine, this amount of recursion sounds hard to infer. This seems like it can be closed.


How can I get proper names for futures symbols?

For example if I want to place an order for BTCUSDT perpetual futures what symbol should I specify?
How can I find that information for other tickers?
So far I have tried:

BTCUSDT
BTCUSDTPERP
BTCUSDT_PERP

All of them didn't work.
My code:
client.futures_coin_create_order(symbol="BTCUSDT", side="SELL", type="MARKET", quantity=0.001)

Turns out I have to use client.futures_create_order.


Need some customization

Hey,
I would like to change some things

Change max connection to unlimited in panel page
Remove chat
User can't see controls only volume
Change logo and color

please include files where i can make changes
Thank you , Appreciate your help

You cannot have unlimited connections, because you need to allocate port for each user. Meaning, theoretical maximum would be 65.535 ports.
Another three points are not releated to neko-rooms but to the neko image itself. You are able to use own customized image for neko-rooms.

Closing this as first point is not posible to do with current technology (would need UDP or TCP mux for single port). And another points are irrelevant for neko-rooms, but to the neko image itself.


Post  #41, supply default for logical_operator

Make and the default. Could also reduce this to just a boolean.

This commit on the API side removes the requirement for logical_operator when the input set only contains one element.
https://github.com/hubmapconsortium/cross_modality_query/commit/c3612cc3687db9d33e08a21f8d1d3d3ea9ac4903
I would also recommend against supplying a default here, because its inclusion in other queries would be considered an extraneous parameter, and result in an error.

This commit on the API side removes the requirement for logical_operator when the input set only contains one element.
https://github.com/hubmapconsortium/cross_modality_query/commit/c3612cc3687db9d33e08a21f8d1d3d3ea9ac4903
I would also recommend against supplying a default here, because its inclusion in other queries would be considered an extraneous parameter, and result in an error.