text:
Compiler crash when defining a constant inside a constant

Code
This is how I accidentally discovered an issue. Not a very likely scenario right? It was a typo. I gave a variable a capitol letter which made it a const. :)
FOO = begin
  BAR = 1
end

puts FOO

Here is a more simple example.
A = B = 1

puts A

Output
Nil assertion failed
[4335949203] *raise<String>:NoReturn +163
[4336000352] *Nil#not_nil!<Nil>:NoReturn +16
[4345468781] *Crystal::ASTNode+@Crystal::ASTNode#transform<Crystal::ASTNode+, Crystal::CleanupTransformer>:Crystal::ASTNode+ +18381
[4345455796] *Crystal::ASTNode+@Crystal::ASTNode#transform<Crystal::ASTNode+, Crystal::CleanupTransformer>:Crystal::ASTNode+ +5396
[4345449632] *Crystal::CleanupTransformer#transform<Crystal::CleanupTransformer, Crystal::Expressions>:Crystal::Expressions +112
[4345451313] *Crystal::ASTNode+@Crystal::ASTNode#transform<Crystal::ASTNode+, Crystal::CleanupTransformer>:Crystal::ASTNode+ +913
[4345449632] *Crystal::CleanupTransformer#transform<Crystal::CleanupTransformer, Crystal::Expressions>:Crystal::Expressions +112
[4345448805] *Crystal::Program#cleanup<Crystal::Program, Crystal::Expressions>:Crystal::Expressions +341
[4337356536] *Crystal::Compiler#compile<Crystal::Compiler, Array(Crystal::Compiler::Source), String>:Crystal::Compiler::Result +2552
[4346334439] *Crystal::Command#run_command<Crystal::Command, Bool>:Nil +151
[4336187718] *Crystal::Command#run<Crystal::Command>:(Array(Crystal::ImplementationTrace) | Array(Crystal::Init::View+:Class) | Array(String) | Bool | Crystal::Compiler::Result | Hash(String, String) | IO::FileDescriptor+ | Nil) +18774
[4336047297] main +17521

Error: you've found a bug in the Crystal compiler. Please open an issue, including source code that will allow us to reproduce the bug: https://github.com/crystal-lang/crystal/issues

Version
Crystal 0.18.2 (2016-06-17)

Got this for triage, still reproduces on HEAD.

Yeah, I didn't fix it yet because I don't know if this should be fixed, or if declaring a constant inside another constant should be an error. I don't see a very strong reason to allow that.

We allow a = b = 1, it would only be consistent.

The thing is that constants are only type-checked when you use them. This makes it possible to omit some constants in the final binary. For example if you don't use ARGF then it's never created.
But when you define a constant inside another constant, this constant doesn't exist unless you use the first constant.
Because I don't think defining constants in this way is super useful (in fact I don't know why there would be a reason to have two constants with the same value, defined one after the other), I think I'd prefer this to be a compile-time error.

This makes sense to me. Can this issue be closed?

I'd rather make it a compile error than leaving it as a compiler error. It does no harm to leave it open :).

Could the compiler just transform A = B = 1 into B = 1; A = B. I would presume that's semantically equivalent?
But I figure it could work as a general rule: When encountering a const assignment inside the assignment to a const, pull out the inner assignment and but it before the outer assignment, replacing it with a reference to the constant in its original place.
That should also work for the first example:
BAR = 1
FOO = begin
  BAR
end

puts FOO

I don't see huge use case for that though.
And maybe it's a bit odd to be coherent with the rest of the language syntax?

That would also work for this case as well.
FOO = (BAR = 1)

Here's another issue that I have noticed that I'll spin into another issue, but programs with a constant declaration in an exception handler also cause a crash. This class of errors won't be resolved by the transform step.
FOO = begin
  1
rescue
  BAR = 1
end

puts FOO

I would think the instructions should transform that code into this:
BAR = 1
FOO = begin
  1
rescue
  BAR
end

So it's probably good to just error early in the parser whenever a const assignment is in a place where it doesn't belong.
Maybe a good definition is to say constant assignments are only allowed directly in the scope of a type (including the top-level). Grouping of exceptions with parenthesis or begin; end is allowed, though (because that works currently).
Or in other terms, the parent node of a const assignment must be a ClassDef or ModuleDef, with only zero ore more Expressions allowed in between. I think enum members are already handled separately.

authors: aaronbronow asterite caspiano jhass mverzilli straight-shoota


text:
Nil assertion error in parse_hash_or_tuple_literal

This erroneous code causes a nil assertion in parse_hash_or_tuple_literal:
def foo(t)
  {t.keys[0]: t.values[0]}
end
foo({symbol: "string"})

crystal build bar.cr
Nil assertion failed (NilAssertionError)
  from ../../../../../crystal/src/nil.cr:106:5 in 'not_nil!'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:2365:16 in 'parse_hash_or_tuple_literal'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:926:7 in 'parse_prefix'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:582:5 in 'parse_pow'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:581:5 in 'parse_mul_or_div'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:545:14 in 'parse_add_or_sub'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:540:5 in 'parse_shift'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:539:5 in 'parse_logical_and'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:538:5 in 'parse_logical_or'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:537:5 in 'parse_cmp'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:536:5 in 'parse_equality'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:535:5 in 'parse_and'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:534:5 in 'parse_or'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:475:15 in 'parse_question_colon'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:328:16 in 'parse_op_assign'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:261:7 in 'parse_multi_assign'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:113:13 in 'parse_expressions_internal'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:105:29 in 'parse_def_helper'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:2922:7 in 'parse_def'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:2918:5 in 'parse_atomic_without_location'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:926:7 in 'parse_prefix'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:582:5 in 'parse_pow'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:581:5 in 'parse_mul_or_div'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:545:14 in 'parse_add_or_sub'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:540:5 in 'parse_shift'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:539:5 in 'parse_logical_and'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:538:5 in 'parse_logical_or'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:537:5 in 'parse_cmp'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:536:5 in 'parse_equality'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:535:5 in 'parse_and'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:534:5 in 'parse_or'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:475:15 in 'parse_question_colon'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:328:16 in 'parse_op_assign'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:261:7 in 'parse_multi_assign'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:113:13 in 'parse_expressions_internal'
  from ../../../../../crystal/src/compiler/crystal/syntax/parser.cr:4175:7 in 'parse'
  from ../../../../../crystal/src/compiler/crystal/compiler.cr:170:7 in 'compile'
  from ../../../../../crystal/src/compiler/crystal/command.cr:295:3 in 'run'
  from ../../../../../crystal/src/compiler/crystal.cr:11:1 in '__crystal_main'
  from ../../../../../crystal/src/crystal/main.cr:105:5 in 'main'
  from src/env/__libc_start_main.c:94:2 in 'libc_start_main_stage2'
Error: you've found a bug in the Crystal compiler. Please open an issue, including source code that will allow us to reproduce the bug: https://github.com/crystal-lang/crystal/issues

Reduced:
{a[0]: 1}

source: gharchive/issue

authors: BrucePerens asterite

repo: crystal-lang/crystal

license_type: permissive

license_source: github-api


text:
rename access_token to token

This renames OAuth2::AccessToken#access_token to OAuth2::AccessToken#token.  I also added some depreciation warnings for OAuth2::AccessToken#access_token
fixes https://github.com/crystal-lang/crystal/issues/7910

Ooooh... but the JSON property in the spec is called access_token.
Now I don't think this is needed, sorry. It's just a cosmetic change and it deviates from the OAuth RFC/Spec. Plus it introduces a breaking change. I don't see why we need to do this.
But if others agree this is fine, let's go for it.

@asterite I thought OAuth2::AccessToken#access_token was redundant.  I Think #value might make more sense.

@wontruefree Sorry about getting into this, but now I don't think it's worth introducing a breaking change, less if the names won't match the ones in the RFC.

@asterite no problem I was just trying to help with some low hanging fruit from issues.

source: gharchive/pull-request

authors: asterite wontruefree


text:
pip source plugin

In GitLab by @sstriker on Oct 20, 2017, 15:07
While we have a pip build element, we do not have an element to fetch packages and track them.
A source element that would effectively leverage https://pip.pypa.io/en/latest/reference/pip_download/#overview would be a good counterpart to the build element.  It would allow users to help fetch and track the dependencies of their python code much more conveniently.

In GitLab by @tristanvb on Oct 20, 2017, 17:45
Hmmm, interesting.
I can see the convenience, but I worry this might have similar issues as #10 (dpkg source)
Is it practical or even possible for a pip source plugin to comply to the restraints, which are basically that with the same source configuration, you will always provide exactly the same data ?
Even if it's semantically possible, does PyPI make any guarantee to keep providing every version of every package ever distributed ?
I worry this might be unsafe, and that instead it makes more sense to use a hand full of pip build elements with git sources.

In GitLab by @sstriker on Oct 21, 2017, 19:05
Well, we could store the hash of what was downloaded by pip download as the ref.  Otherwise its following requirements, I'd argue using https://pip.pypa.io/en/stable/reference/pip_install/#requirement-specifiers.
I think even if PyPI doesn't make that guarantee, there are ways to ensure you keep a copy of every package ever used.  Either using a product like Artifactory, or through some other means.

In GitLab by @tristanvb on Oct 22, 2017, 09:39
So this is a bit of a slippery slope so to speak, we're going to see this for JS npm and for Rust's crates.io too.
There is another problem with this, too:

One element decides to use a pip source, because yay, it's easier to provide all the specific python dependencies for that element
Another element decides to use pip source, same reason
Both elements might have common pip source originating dependencies, at different versions

Now we have file overlaps
Now we are no longer certain which version of a pip dependency will be present on the system, and shared by all the elements which depended on it via pip

To be clear, I dont think we should block this; but I think we should consider this as an addition to the external plugins repo that @jonathanmaw is working on. The rationale for this is:

As mentioned, it may require some third party artifactory or such to ensure availability of what we depend on
I think the above mentioned scenario with version uncertainty and overlaps will occur if the pip source is really going to be convenient, and allow a python app author to "get all their dependencies in one go"
We should be encouraging our preferred workflow in the main buildstream repository, which is hopefully a single method to do each thing (providing two user stories for using python dependencies means users dont have a sane default, but instead they have a pesky "choice" getting in the way, which I think is undesirable).

In GitLab by @samthursfield on Oct 23, 2017, 15:34
There are a few tools which can produce a set of PyPI dependencies given a package name and version. What about using an external tool to generate and update the relevant .bst files?
We researched this in Baserock a while back, and while the relevant tool has bitrotted, the approach worked pretty well and could probably be largely reused. It's documented a bit here; basically it worked by running pip install $package in a virtualenv and then running pip freeze to get a list of requirements. This could be slow if some dependency decided to compile lots of C++ code, but it was pretty reliable.
Various distros have something similar, e.g. pypi2nix, guix import, pypi2deb, etc.
I admit this isn't as nice as being able to do bst track, but I feel like importing from package repos has way more edge cases than tracking upstream source repos, and we perhaps shouldn't treat them as interchangable activities.

In GitLab by @juergbi on Feb 25, 2018, 18:39
In my opinion, a simple PyPI source plugin that doesn't include dependencies would already be very useful for tracking. This would avoid the file overlap issue.
Dependency handling would be nice, of course, but that might indeed be better done using an external tool. Theoretically, it would also be possible to generate .bst files in a source plugin and use that in a junction. However, given the complexity, an external tool may be a more sensible approach.

In GitLab by @samthursfield on Feb 26, 2018, 10:18
@jmacarthur prototyped such a tool already : https://gitlab.com/jmacarthur/python-to-element

In GitLab by @LaurenceUrhegyi on Jun 1, 2018, 13:42
I think this is dependent on https://gitlab.com/BuildStream/buildstream/issues/381

In GitLab by @knownexus on Oct 8, 2018, 12:46
Is this still an issue? A quick glance at buildstream/plugins/sources suggests we have a pip plugin?

In GitLab by @toscalix on Oct 8, 2018, 12:52
assigned to @sstriker

In GitLab by @toscalix on Oct 8, 2018, 12:52
Assigned to @sstriker to evaluate if this ticket should be closed.

In GitLab by @tristanvb on Jan 17, 2019, 00:19
This is definitely exactly the issue we resolved with the whole SourceTransform discussion which turned into a new feature on the Source class giving sources access to previously staged sources at track time.
@cs-shadow implemented all of this along with precisely a tested pip plugin to demonstrate that the mechanics work.
Closing this rusty old issue :)

In GitLab by @tristanvb on Jan 17, 2019, 00:19
closed

repo: cs-shadow/buildstream


text:
[WIP] test: setup Integration testing architecture and add accounts & trading tests

Closes story #31 .

NOTE: integration testing architecture is set up and trading routes fully tested so far.
We need to do accounts testing and this can merge.
I found a db pool exhaustion bug in the user /api/accounts/register. We didn't release the DB pool client there, which is bad -  sidenote - I wonder if there's a good way to automate this -

^ this is ready to be merged, just need to wait out tests.

@akanksha003  would you mind reviewing?


text:
Add freshman command + Contact Us updated

adding freshmen comand. Command adds freshmen to another addressbook, which will be implemented later. For now, other commands like "list" should not show the freshmen.

PR not accepted. In details:

Codes are not consistent, please ensure the format and structure is same throughout all development
The command you created is literally a refactoring of the current "add' command which is given (applies to Freshmen.java also).

Suggestion is to change the command to another command instead (will update over group chat or meet up). Also please follow the project schematics (model structure).

PR close and rejected as it's updates are the same as the other PRs.

license: MIT


text:
ldap user manager does not fill id, opaque_id and idp

currently lookup of opaque_id and idp in ldap is not possible because it the ldap user provider does not fill them with anything. we at least need to be able to configure the idp. the opaque_id should be configurable by specifying which attrubute from ldap to use. we could split the userPrincipalName or configure two attributes for opaqe_id and idp (which map to sub and iss in openid world).
We should implement an id-strategy so that we can implement different solutions how to look up the id.
warning ... this is only a workaround: there might not be a way to retrieve the oidc sub from ldap.
The correct solution is to implement a new SCIM user manager, because there are idps that support listing users using the SCIM api and there is already a draft OpenID Connect Profile for SCIM Services. Tracked in https://github.com/cs3org/reva/issues/327

@madsi1m will provide a configuration option for the LDAP plugin to setup the Idp

We are dancing around the problem that we need a way to persist a user id but the different systems may know the user under different ids:

The idp generates a sub claim that is unknown to eg ldap
LDAP generates a uuid like attrubute, but the organization might have introduced
a custom / different attribute to uniquely identify users, eg the employeeNumber because that does not change on reimports of a user in the ldap tree.
The storage provider internally might use a numeric uid and gid for file ownership and permissions.

The perfect userid for reva is unique, persistent and non-reassignable. Why?

unique, so we can differentiate between two end users called 'Anna Meyer'
persistent, so we can identify the user on  subsequent logins, even if she marries as 'Anna Müller'
non-reassignable, so we treat a new 'Anna Meyer' joining the organization as a different person than the 'Anna Meyer' that left the organization 10 years ago.

Best we can do is keep track of the history uf userids and provide a migration script.
First step to make this technically possible: https://github.com/cs3org/cs3apis/pull/46
It allows the auth providers to return not only return a userid but also other metadata.

Ultimately, we will always need to be able to update the owner and sharing permissions in an easy way. The idea is to have a cli tool that can replace a user or group id and transfer the ownership and share grantees. Tracked in https://github.com/owncloud/ocis/issues/58
Keeping a history of previous ids can be added later, as it only allows deferring the ownership change.

it does now

@labkode @butonic @madsi1m can we look into this now? For OCM, the same opaque_id can be present across mesh providers, but the combination of idp and opaque_id would be unique. So this needs to be implemented for that to work.

outdated


text:
[DRAFT] SPIKE - Switch from System Config JS Objects to Class

(Fair warning, my background is pretty heavily in C# so I tend to bring some of those opinions into my JS code)
I decided that I didn't want to stare at my research anymore so I decided to take a break and code up this spike. It's just an idea but it should let you clean up all of these things further if you like any of it. For example, might be able to take some of these attribute calculation and generation stuff and abstract it out to the Attribute class.
I haven't had the opportunity to test it because I don't have my own foundry instance and didn't want to bother my DM about it at nearly midnight but the logic is decent enough though I will admit to not being as confident in my JS abilities as I am other languages.

Thanks for this.  However, I'm struggling to see what the intended purpose is, or what problem it solves.
The existing code had all the attributes defined in a nice set of structures, but the new code abstracts that all out into a bunch of addAttribute calls, that make it much more difficult to see at a glance how each system is configured.

My thought was that you can use this to ensure proper structure when you
get around to implementing a settings page. It also means you can abstract
out the calculations to the Attribute itself. Finally, the real benefit to
me anyway is that you can have each attribute themselves know how to
display themselves.
However, like I said, a lot of my opinions are informed by more statically
typed OO languages so the way I approach problems in them is typically in
that way.
Anyhow this only took me a couple of hours so if you see anything you like
feel free to take it but otherwise it's no big deal.
On Mon, Jul 25, 2022, 8:29 AM Alan Davies @.***> wrote:

Thanks for this. However, I'm struggling to see what the intended purpose
is, or what problem it solves.
The existing code had all the attributes defined in a nice set of
structures, but the new code abstracts that all out into a bunch of
addAttribute calls, that make it much more difficult to see at a glance
how each system is configured.
—
Reply to this email directly, view it on GitHub
https://github.com/cs96and/FoundryVTT-damage-log/pull/22#issuecomment-1193987391,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AH52FUDET66YWTL3A2WUP5TVV2CD7ANCNFSM54QV6XDA
.
You are receiving this because you authored the thread.Message ID:
@.***>


text:
Entities aren't populating

blitz04
jb@uiapi.org test1234
3MVG9Iu66FKeHhIP2gj7Oz2VM5b8m_ZmRV6OVnKuIy1KoKfpbQvAQnZ5xxg5gFGetjuLw3LhCIYroXuyc_T4J
https://localhost:8443/oauth-redirect
Whitelist:
https://*.herokuapp.com
https://localhost

authors: bleyle jbleyleSF

repo: cseymourSF/RecordViewerNative


text:
Simulation method used for the signal datasets?

Dear Charlotte,
Thanks for your intensive work on the evaluation of DE methods. When reading the paper https://www.nature.com/articles/nmeth.4612, we found it unclear on how did you simulate the datasets with signals, which contain 10% DE genes. Could you describe it in details?

I used the powsim package for the simulation, starting from three of the experimental data sets. The exact code I used is here: https://github.com/csoneson/conquer_comparison/blob/master/scripts/simulate_data.R

Do you have any description of that method in the paper?

The approach is described in our Methods section:

three of the data sets (GSE45719, GSE74596 and GSE60749-GPL13112) are used as the basis for simulation of data using a slightly modified version of the powsim R package34. Individual reports generated by countsimQC35 and verifying the similarity between the simulated and real data sets across a range of aspects are provided as Supplementary Data 1. As for the original, experimental data sets, we subsample data set instances with varying number of cells per group, and further generate null data sets by random sampling from one of the simulated groups. In each simulated data set, 10% of the genes are selected to be differentially expressed between the two groups, with fold changes sampled from a Gamma distribution with shape 4 and rate 2. The direction of the DE is randomly determined for each gene, with equal probability of up- and downregulation. Mean and dispersion parameters used as basis for the simulations are estimated from the respective real data sets using edgeR7. For each of the three data sets, the rounded length-scaled TPMs for all genes with at least two nonzero counts are used as input to the simulator, and a data set with the same number of genes is generated.

The code shows exactly which functions we ran, and with which parameters.
The powsim paper describes their simulation model in more detail: https://www.biorxiv.org/content/10.1101/117150v1.full

authors: csoneson kspham ptdtan


text:
Validate data inside array

Is there a way using a validation schema to validate the content of an array?
For example:
$.ajax({     url: '/deleteIds',     type: 'DELETE',     data: JSON.stringify([1, 2, 3]),     contentType: "application/json",     processData: false,     success: function(data){         console.log(data);     } });
Is possible to validate the content of the array ( data ) to be sure that every element has a specific type ( integer in this case ) ?

@Fraccaman
this is not possible out of the box, express-validator use validation methods from https://github.com/chriso/validator.js/, but you can always define your custom validators for something specific https://github.com/ctavan/express-validator#customvalidators

Yeah, thank @srkimir!
I didn't think about it! In the end I solved with this snippet here:
customValidators: {
    isDateArray: function(array) {
      if(array.constructor === Array){
        for (var i = 0; i < array.length; i++) {
          if(!moment(array[i], "YYYY-MM-DDTHH:mm:ss", true).isValid())
            return false;
        }
      }
      return true;
    }

authors: Fraccaman srkimir

repo: ctavan/express-validator

license: mit

license_source: bigquery


text:
login register form

Follow Figma designs
Use React Hook Form: https://react-hook-form.com/advanced-usage#CustomHookwithResolver
Don't worry about backend until auth is merged
closes #50

I think all the issues you guys brought up have been addressed, but let me know if there is still anything left to correct. I replaced the absolute positioning of the logo with flexbox so the main problem should be resolved now.

authors: ctc-devops dgardezi

repo: ctc-uci/find-your-anchor-frontend


text:
[koa2] Doesn't run.

TypeError: middleware must be a function!
at Application.use (/Users/sean/Development/ctrlplusb/react-universally/node_modules/koa/lib/application.js:106:41)
at Object.module.exports.module.exports (/Users/sean/Development/ctrlplusb/react-universally/build/server/webpack:/src/server/index.js:26:5)
at webpack_require (/Users/sean/Development/ctrlplusb/react-universally/build/server/webpack:/webpack/bootstrap ec783651e8f6b9cdb740:19:1)
at Object. (/Users/sean/Development/ctrlplusb/react-universally/build/server/index.js:2142:18)
at webpack_require (/Users/sean/Development/ctrlplusb/react-universally/build/server/webpack:/webpack/bootstrap ec783651e8f6b9cdb740:19:1)
at /Users/sean/Development/ctrlplusb/react-universally/build/server/webpack:/webpack/bootstrap ec783651e8f6b9cdb740:65:1
at Object. (/Users/sean/Development/ctrlplusb/react-universally/build/server/index.js:70:10)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)

Pushing the fix right now.

authors: ctrlplusb strues

repo: ctrlplusb/react-universally


text:
Store and Reuse AccessToken for Silent Login

Once logged in, if a user reloads the SPA either by refreshing the page or navigating via the address bar, the login context is "lost", and the user must trigger another login. At least for my Azure AD provider the subsequent login redirects immediately without the need for interaction.
I wonder if it would it be possible to store the users access_token and expires in SessionStorage? That way when the context is configured, it could first check those stored values and attempt a silent login flow to obtain a new access, refresh, and id token. I believe the Microsoft Graph Toolkit components function in this way to persist the login state across page reloads.
What are your thoughts?

At least for my Azure AD provider the subsequent login redirects immediately without the need for interaction.

And this is how it should be. Access tokens should not be stored. They are actually only active in a single session (tab). Not even shared with other tabs.
There was a discussion on #1 about the same topic, which goes into a bit more detail. Maybe it pin it :grin:
Let me know if this explains it.

authors: BenjiFuse ctron


text:
Mindy/player

update player UI and functionality to match MVP1
closes #156
skip button functionality not yet implemented

Let's make the Podcast title go on multiple lines and not cut off .. also we should add in the Series title

This is an awkward placement of one half line of text. Let's try to decrease image size so we can show at least two full lines of the description text

We should fix this. Make the Episode title to be on two lines not overlappign with play button then with "..." after if it doesnt fit

Let's hide the skip button for now since we don't have a podcast queue implemented

Uh oh! This is probably an issue with the skip forward button as well

Your bookmark button in the share sheet is using the wrong asset (we have an out of date image for bookmark that we should delete) feel free to delete this image and use the real one

I can only recreate the player skip bug like 1/10th of the time, and it seems to only happen when going backwards. I think it was mostly a UI bug.

Oops I forgot to merge it

authors: mindylou natashaarmbrust

repo: cuappdev/podcast-ios


text:
Deprecate direct access to component's go/done interface

Once #300 is merged, the default way to call a component will be the invoke statement. Once that is the case, we can change the ir::Builder so that it doesn't automatically add go/done ports to components (and move that functionality to component-interface pass).
Few things that rely on this interface:

[ ] Systolic array generator (only use for mult_pipe in the default PE. Removable after #331).
[ ] Relay
[ ] Code generated by Dahlia for sqrt and mult_pipe (requires #331).

Actually, I think the stuff above is irrelevant to deprecating accessing to the component go/done signal usage. Once #712 is merged, any group computation performed by a group using the a component's go/done interface can be rewritten using invoke-with.
I don't think there is any harm in keeping access to primitive's go/done ports either. Maybe we should remove this issue in lieu of having explicit go/done ports on all components.

repo: cucapra/calyx


text:
Feature Request: Undefined step, leading to suggested alternative(s) from current glue

Summary
Wouldn't it be nice if Cucumber could suggest step definitions from the current project's glue that are similar to the undefined step that is currently being matched.
Possible Solution
There are fuzzy regex matching libraries available e.g. http://laurikari.net/tre/
Context & Motivation
When a step fails to match an undefined error is thrown and a snippet emitted. Often the failure is due to simple mistyping by the user. It would be nice if Cucumber could suggest step definitions that almost matched.
This could make it much simpler to pick up many categories of error, such as missing spaces and/or misspelt words

That's a lovely idea!

Excellent...!

++

authors: LaAzteca gmk1217 mattwynne sebrose

repo: cucumber/cucumber


text:
Add new Meta message

Summary
A new Meta message with meta information
Details
The first message of a message stream should be a Meta message.
There is also meta information about cucumber implementation, operating system, language runtime etc.
Motivation and Context
The protocol_version field will allow the consumer to determine whether or not the following messages can be processed.
The other meta Product fields can be used for diagnostic and statistical purposes, to understand more about the platform on which Cucumber was run.
We need to update fake-cucumber to emit this message before merging this.

Related PRs in Cucumber-Ruby and Cucumber-JVM:

https://github.com/cucumber/cucumber-ruby/pull/1409
https://github.com/cucumber/cucumber-jvm/pull/1952

Related issue in Cucumber.js:

https://github.com/cucumber/cucumber-js/issues/1310


text:
Add "Rule" keyword to Gherkin documentation

See grammar definition in https://github.com/cucumber/cucumber/blob/master/gherkin/gherkin.berp
Also: https://github.com/cucumber/cucumber/issues/453
Note: should be added when Gherkin 6 is actually used in any/all Cucumber implementations.

@mlvandijk ,
I would like to help with this issue. Is it only about adding the word "Rule" when necessary?

Thanks @TomerPacific, that would be great.
Yes, we should add the "Rule" keyword and relevant information about this keyword (see links).

Opened a PR

You can always wait until the last one us on-board. But that is composition problem that will not scale the more implementations you get.
IMHO a better approach is to document per implementation which Gherkin version it supports. But clarify that with Aslak and/or Matt first.
Ciao,
Jens
Sent from my iPhone

On 18. Dec 2018, at 21:25, Marit van Dijk notifications@github.com wrote:
Looks like Gherkin 6 is not implemented yet in Cucumber-jvm:
the pom.xml mentions <gherkin.version>5.1.0</gherkin.version> and there's an open PR to use Gherkin 6.
Cucumber-js package.json mentions "gherkin": "^5.0.0",
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or mute the thread.

Closed by #271

authors: TomerPacific jenisys mlvandijk


text:
cuelang.org: preprocessor strips author's shell line continuations from script blocks

What page were you looking at?
n/a
What version of the site were you looking at?
https://github.com/cue-lang/cuelang.org/commit/f0e0f0f6f730e827786f3c9f6cd368792fae3625
What did you do?
I placed the following on a test page, and invoked the preprocessor:
{{{with script "en" "test"}}}
echo foo \
  bar \
  baz
{{{end}}}

What did you expect?
That the processed page inside the hugo/ hierarchy would have the line continuations presented on the page, and (possibly) available via the copy-this-command button.
What did you see instead?
```text { title="TERMINAL" type="terminal" codeToCopy="ZWNobyBmb28gYmFyIGJheg==" }
$ echo foo bar baz
foo bar baz
```

With @myitcv we agreed to make the preprocessor print each shell statement as a single line where possible, which is what is causing the collapsing (removal) of escaped newlines. See https://pkg.go.dev/mvdan.cc/sh/v3/syntax#SingleLine, which is used to configure the shell printer.
I honestly cannot remember exactly why we did this. Here is the patch that undoes those options:
diff --git internal/cmd/preprocessor/cmd/rootfile.go internal/cmd/preprocessor/cmd/rootfile.go
index a2a9d179..ef9d7c0e 100644
--- internal/cmd/preprocessor/cmd/rootfile.go
+++ internal/cmd/preprocessor/cmd/rootfile.go
@@ -136,7 +136,7 @@ func (p *page) newRootFile(fn string, lang lang, prefix, ext string) *rootFile {
 		ext:              ext,
 		errorContext:     p.bufferedErrorContext,
 		executionContext: p.executionContext,
-		shellPrinter:     syntax.NewPrinter(syntax.SingleLine(true)),
+		shellPrinter:     syntax.NewPrinter(),
 		rand:             rand.New(rand.NewSource(42)),
 	}
 }
diff --git internal/cmd/preprocessor/cmd/sanitisers.go internal/cmd/preprocessor/cmd/sanitisers.go
index 0c1885f9..1ba5f809 100644
--- internal/cmd/preprocessor/cmd/sanitisers.go
+++ internal/cmd/preprocessor/cmd/sanitisers.go
@@ -139,7 +139,7 @@ func matchArgs[T syntax.Node](m *matchSpec, got, want []T) (bool, error) {
 			return false, nil
 		}
 	}
-	p := syntax.NewPrinter(syntax.SingleLine(true))
+	p := syntax.NewPrinter()
 	for i := range want {
 		var gotS, wantS strings.Builder
 		p.Print(&gotS, got[i])

And here is the result, currently only affecting one page, and indeed restoring the escaped newlines in the source:
diff --git hugo/content/en/docs/draft/cbe-005_gitlab_ci/index.md hugo/content/en/docs/draft/cbe-005_gitlab_ci/index.md
index 14be1b20..9fbbf5fe 100644
--- hugo/content/en/docs/draft/cbe-005_gitlab_ci/index.md
+++ hugo/content/en/docs/draft/cbe-005_gitlab_ci/index.md
@@ -71,8 +71,9 @@ $ cue mod init gitlab.com/flockademic/flockademic
Use cue to import your YAML pipeline file:
 :computer: `terminal`
-```text { title="TERMINAL" type="terminal" codeToCopy="Y3VlIGltcG9ydCAuZ2l0bGFiLWNpLnltbCAtLXdpdGgtY29udGV4dCAtcCBnaXRsYWIgLWYgLWwgcGlwZWxpbmVzOiAtbCAnc3RyaW5ncy5UcmltU3VmZml4KHBhdGguQmFzZShmaWxlbmFtZSkscGF0aC5FeHQoZmlsZW5hbWUpKScgLW8gZ2l0bGFiLWNpLmN1ZQ==" }
-$ cue import .gitlab-ci.yml --with-context -p gitlab -f -l pipelines: -l 'strings.TrimSuffix(path.Base(filename),path.Ext(filename))' -o gitlab-ci.cue
+```text { title="TERMINAL" type="terminal" codeToCopy="Y3VlIGltcG9ydCAuZ2l0bGFiLWNpLnltbCAtLXdpdGgtY29udGV4dCAtcCBnaXRsYWIgLWYgLWwgcGlwZWxpbmVzOiBcCgktbCAnc3RyaW5ncy5UcmltU3VmZml4KHBhdGguQmFzZShmaWxlbmFtZSkscGF0aC5FeHQoZmlsZW5hbWUpKScgLW8gZ2l0bGFiLWNpLmN1ZQ==" }
+$ cue import .gitlab-ci.yml --with-context -p gitlab -f -l pipelines: \
+	-l 'strings.TrimSuffix(path.Base(filename),path.Ext(filename))' -o gitlab-ci.cue
 ```

 If your project uses a different name for your pipeline file then use that name
@@ -157,8 +158,9 @@ process is reproducible.
 Convert the GitLab schema from JSON Schema to CUE:

 :computer: `terminal`
-```text { title="TERMINAL" type="terminal" codeToCopy="Y3VlIGltcG9ydCAtcCBnaXRsYWIgLWwgJyNQaXBlbGluZTonIGludGVybmFsL2NpL2dpdGxhYi9naXRsYWIuY2ljZC5waXBlbGluZS5zY2hlbWEuanNvbg==" }
-$ cue import -p gitlab -l '#Pipeline:' internal/ci/gitlab/gitlab.cicd.pipeline.schema.json
+```text { title="TERMINAL" type="terminal" codeToCopy="Y3VlIGltcG9ydCAtcCBnaXRsYWIgLWwgJyNQaXBlbGluZTonIFwKCWludGVybmFsL2NpL2dpdGxhYi9naXRsYWIuY2ljZC5waXBlbGluZS5zY2hlbWEuanNvbg==" }
+$ cue import -p gitlab -l '#Pipeline:' \
+	internal/ci/gitlab/gitlab.cicd.pipeline.schema.json
 ```

 This command will create the file `internal/ci/gitlab/gitlab.cicd.pipeline.schema.cue`

I'd personally be fine with this change, but I might be forgetting why printing shell statements (commands) as a single line was preferrable or necessary.

authors: jpluscplusm mvdan

repo: cue-lang/cue


text:
🛑 CUETCONNECT(AdmissionSite) is down

In c812f9a, CUETCONNECT(AdmissionSite) (https://admission.cuetconnect.org/) was down:

HTTP code: 502
Response time: 5666 ms

Resolved: CUETCONNECT(AdmissionSite) is back up in 6d48be8.

repo: cuetconnect/statuspage


text:
🛑 Journal is down

In 10e029e, Journal (https://journal.culturecloud.gq) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Journal is back up in fd1c098.

repo: culturecloud/status


text:
Batch Solving in cupy.linalg.eigh

The interface to numpy's hermitian eigenvalue solver numpy.linalg.eigh may accept an (n, m, m) array for batch calculations.  CuSOLVER has the corresponding functions cusolverDnSsyevjBatched, cusolverDnDsyevjBatched, cusolverDnCheevjBatched, and cusolverDnZheevjBatched.  It seems like it would be a good idea to generalize cupy's interface to match what numpy has.  I have never contributed to cupy, but have made similar changes to a julia GPU library.  Is this a good feature to add and would this be a good first time PR for me to make?  I have a need for a function like this and so I have some motivation to get it done.

I would find it useful.
The cuSOLVER functions could be added to the existing ones in cupy/cuda/cusolver.*. There is some precedence for other batched functions there.
It actually looks like we don't currently have the non-batched syevj versions either and are using the syevd solver instead. I had to look up in the NVIDIA docs to remember the difference between syevd and syevj:

"syevj has the same functionality as syevd. The difference is that syevd uses QR algorithm and syevj uses Jacobi method. The parallelism of Jacobi method gives GPU better performance on small and medium size matrices. Moreover the user can configure syevj to perform approximation up to certain accuracy. "

We welcome contribution for this feature.
Steps:

add implementation in cupy.cuda.cusolver
add implementation in cupy.cusolver
use cupy.cusolver in eigh

See https://github.com/cupy/cupy/pull/3247 which would be an example for 1 and 2.
For record: cusolverDnSsyevjBatched, cusolverDnDsyevjBatched, cusolverDnCheevjBatched, and cusolverDnZheevjBatched are first available in CUDA 9.0

Thanks!  I will take a look at it over the weekend.

@electronsandstuff FYI, @dmargala just contributed cusolverDn<t>syevjBatched implementation in #3488.

That should make this addition easy.  I changed the cupy.linalg.eigh unit test to check for batched eignsolving, but I suppose that I will wait until #3488 is merged before moving on.

Hi! I already have a personal code that extends CuPy to calculate eigh with syevjBatched.
@electronsandstuff If you like, I will make a PR to merge my code after #3488 is merged.

Sweet!  If you have some code already written, then it's all yours.

This can be closed.

authors: electronsandstuff grlee77 kmaehashi leofang yoshipon

repo: cupy/cupy


text:
Converting integer to float32 results in error.

Thank you for using and contributing to CuPy!
If your issue is a request for support in using CuPy, please post it on Stack Overflow or Google Groups (en / ja).
Developer team members are monitoring questions on these channels.
If it is a bug report, please include the following information:

Conditions (you can just paste the output of python -c 'import cupy; cupy.show_config()')

CuPy version
OS/Platform
CUDA version
cuDNN/NCCL version (if applicable)

Code to reproduce
Error messages, stack traces, or logs

(base) PS C:\Users\mengh> python -c 'import cupy; cupy.show_config()'
OS                           : Windows-10-10.0.19041-SP0
CuPy Version                 : 8.1.0
NumPy Version                : 1.19.3
SciPy Version                : 1.5.0
CUDA Root                    : C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1
CUDA Build Version           : 10010
CUDA Driver Version          : 11010
CUDA Runtime Version         : 10010
cuBLAS Version               : 10100
cuFFT Version                : 10010
cuRAND Version               : 10010
cuSOLVER Version             : (10, 1, 0)
cuSPARSE Version             : 10010
NVRTC Version                : (10, 1)
Thrust Version               : 100906
CUB Build Version            : 100800
cuDNN Build Version          : None
cuDNN Version                : None
NCCL Build Version           : None
NCCL Runtime Version         : None
cuTENSOR Version             : None
Device 0 Name                : GeForce RTX 2070 SUPER
Device 0 Compute Capability  : 75
(base) PS C:\Users\mengh>
code:
bins.shape, bins[-10:]
bins.cumsum()[-10:]
bins.cumsum().astype(cp.float64).astype(int)[-10:]
bins.cumsum().astype(cp.float32).astype(int)[-10:]
return:
((32400,), array([ 590,  650, 1285,  589,  647, 1299,  598,  641, 1300,  591]))
array([26855200, 26855850, 26857135, 26857724, 26858371, 26859670, 26860268, 26860909, 26862209, 26862800])
array([26855200, 26855850, 26857135, 26857724, 26858371, 26859670, 26860268, 26860909, 26862209, 26862800])
array([26855200, 26855850, 26857136, 26857724, 26858372, 26859670, 26860268, 26860908, 26862208, 26862800])
26862209 -> 26862208

This is not a cupy or numpy problem, but a problem caused by the fact that float32 has only 23-bits for mantissa.
>>> import numpy
>>> a = numpy.array(26862208)
>>> a
array(26862209)
>>> a.astype('float64')
array(26862209.)
>>> a.astype('float32')
array(26862208., dtype=float32)

Thank you. I see


text:
cupyx.scipy.signal.convolve2d yields a JitifyException: Runtime compilation

Description
The following snipet of code produces a Jitify Exception at Runtime compilation:
from cupyx.scipy import signal
from scipy import misc
import cupy as cp

ascent = misc.ascent()
scharr = cp.array([[ -3-3j, 0-10j,  +3 -3j],
                   [-10+0j, 0+ 0j, +10 +0j],
                   [ -3+3j, 0+10j,  +3 +3j]]) # Gx + j*Gy
ascentcp = cp.array(ascent)
grad = signal.convolve2d(ascentcp, scharr, boundary='symm', mode='same')

The error info I have collected follows:
---------------------------------------------------
--- JIT compile log for /tmp/tmpv46hshqr/48d1e6d813e89a765e8f8cac84ee6955_2.cubin.cu ---
---------------------------------------------------
cupy/complex/complex.h(94): warning: __device__ annotation is ignored on a function("complex") that is explicitly defaulted on its first declaration

cupy/complex/complex.h(101): warning: __device__ annotation is ignored on a function("complex") that is explicitly defaulted on its first declaration

type_traits(1): warning: extra text after expected end of preprocessing directive

type_traits(2): warning: white space is required between the macro name "_JITIFY_INCLUDE_GUARD_C" and its replacement text

/tmp/tmpv46hshqr/48d1e6d813e89a765e8f8cac84ee6955_2.cubin.cu(24): error: no suitable conversion function from "W" to "Y" exists
          detected during instantiation of "std::enable_if<<expression>, B>::type cast<B,A>(A) [with B=Y, A=W]"
(81): here

1 error detected in the compilation of "/tmp/tmpv46hshqr/48d1e6d813e89a765e8f8cac84ee6955_2.cubin.cu".

---------------------------------------------------
JITIFY compilation error: Runtime compilation failed
-----
Name: /tmp/tmpv46hshqr/48d1e6d813e89a765e8f8cac84ee6955_2.cubin.cu
Options: --std=c++11 -DCUPY_USE_JITIFY -I/home/admpy/Scripting/anaconda3/lib/python3.8/site-packages/cupy/_core/include -I/home/admpy/Scripting/anaconda3/lib/python3.8/site-packages/cupy/_core/include/cupy/_cuda/cuda-11.2 -I/usr/local/cuda-11.2/include -ftz=true --device-debug --generate-line-info
CUDA source:
01 #include <cupy/complex.cuh>
02 #include <cupy/carray.cuh>
03 #include <cupy/atomics.cuh>
04
05     typedef complex<double> W;
06 typedef long long X;
07 typedef long long Y;
08
09
10 // workaround for HIP: line begins with #include
11 #include <type_traits>  // let Jitify handle this
12 #include <cupy/math_constants.h>
13
14 // Implements a casting function to make it compatible with scipy
15 // Use like cast<to_type>(value)
16 template<> struct std::is_floating_point<float16> : std::true_type {};
17 template<> struct std::is_signed<float16> : std::true_type {};
18 template<class T> struct std::is_signed<complex<T>> : std::is_signed<T> {};
19
20 template <class B, class A>
21 __device__ __forceinline__
22 typename std::enable_if<(!std::is_floating_point<A>::value
23                          || std::is_signed<B>::value), B>::type
24 cast(A a) { return (B)a; }
25
26 template <class B, class A>
27 __device__ __forceinline__
28 typename std::enable_if<(std::is_floating_point<A>::value
29                          && (!std::is_signed<B>::value)), B>::type
30 cast(A a) { return (a >= 0) ? (B)a : -(B)(-a); }
31
32 template <class T>
33 __device__ __forceinline__ bool nonzero(T x) { return x != static_cast<T>(0); }
34
35     extern "C" __global__ void cupyx_scipy_ndimage_correlate_2d_reflect_w3_3(const CArray<long long, 2, 1, 1> x, const CArray<complex<double>, 2, 0, 1> w, CArray<long long, 2, 1, 1> _raw_y, CIndexer<2> _ind) {
36       ;
37       CUPY_FOR(i, _ind.size()) {
38         _ind.set(i);
39         Y &y = _raw_y[_ind.get()];
40
41     int xsize_0=x.shape()[0], ysize_0 = _raw_y.shape()[0], xstride_0=x.strides()[0];
42 int xsize_1=x.shape()[1], ysize_1 = _raw_y.shape()[1], xstride_1=x.strides()[1];
43     int _i = i;
44 int ind_1 = _i % ysize_1 - 1; _i /= ysize_1;
45 int ind_0 = _i - 1;
46     // don't use a CArray for indexing (faster to deal with indexing ourselves)
47     const unsigned char* data = (const unsigned char*)&x[0];
48     int iws = 0;
49     W sum = (W)0;
50
51     for (int iw_0 = 0; iw_0 < 3; iw_0++)
52     {
53         int ix_0 = ind_0 + iw_0;
54
55         if (ix_0 < 0) {
56             ix_0 = - 1 -ix_0;
57         }
58         ix_0 %= xsize_0 * 2;
59         ix_0 = min(ix_0, 2 * xsize_0 - 1 - ix_0);
60         ix_0 *= xstride_0;
61
62
63     for (int iw_1 = 0; iw_1 < 3; iw_1++)
64     {
65         int ix_1 = ind_1 + iw_1;
66
67         if (ix_1 < 0) {
68             ix_1 = - 1 -ix_1;
69         }
70         ix_1 %= xsize_1 * 2;
71         ix_1 = min(ix_1, 2 * xsize_1 - 1 - ix_1);
72         ix_1 *= xstride_1;
73
74         // inner-most loop
75         W wval = w[iws];
76 if (nonzero(wval)) {
77             sum += cast<W>((*(X*)&data[ix_0 + ix_1])) * wval;
78         }
79         iws++;
80     }}
81     y = cast<Y>(sum);
82     ;
83       }
84       ;
85     }
86
-----
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
~/Scripting/anaconda3/lib/python3.8/site-packages/cupy/cuda/compiler.py in _jitify_prep(source, options, cu_path)
    245     try:
--> 246         name, options, headers, include_names = jitify(
    247             source, options, _jitify_header_source_map)

cupy/cuda/jitify.pyx in cupy.cuda.jitify.jitify()

cupy/cuda/jitify.pyx in cupy.cuda.jitify.jitify()

RuntimeError: Runtime compilation failed

During handling of the above exception, another exception occurred:

JitifyException                           Traceback (most recent call last)
<ipython-input-37-0806ad4d1efe> in <module>
----> 1 grad = signal.convolve2d(ascentcp, scharr, boundary='symm', mode='same')

~/Scripting/anaconda3/lib/python3.8/site-packages/cupyx/scipy/signal/signaltools.py in convolve2d(in1, in2, mode, boundary, fillvalue)
    343     .. seealso:: :func:`scipy.signal.convolve2d`
    344     """
--> 345     return _correlate2d(in1, in2, mode, boundary, fillvalue, True)
    346
    347

~/Scripting/anaconda3/lib/python3.8/site-packages/cupyx/scipy/signal/signaltools.py in _correlate2d(in1, in2, mode, boundary, fillvalue, convolution)
    409     if quick_out is not None:
    410         return quick_out
--> 411     return _st_core._direct_correlate(in1, in2, mode, in1.dtype, convolution,
    412                                       boundary, fillvalue, not convolution)
    413

~/Scripting/anaconda3/lib/python3.8/site-packages/cupyx/scipy/signal/_signaltools_core.py in _direct_correlate(in1, in2, mode, output, convolution, boundary, fillvalue, shift)
     73     in2 = _reverse(in2) if convolution else in2.conj()
     74     if not swapped_inputs or convolution:
---> 75         kernel(in1, in2, output)
     76     elif output.dtype.kind != 'c':
     77         # Avoids one array copy

cupy/_core/_kernel.pyx in cupy._core._kernel.ElementwiseKernel.__call__()

cupy/_core/_kernel.pyx in cupy._core._kernel.ElementwiseKernel._get_elementwise_kernel()

cupy/_util.pyx in cupy._util.memoize.decorator.ret()

cupy/_core/_kernel.pyx in cupy._core._kernel._get_elementwise_kernel()

cupy/_core/_kernel.pyx in cupy._core._kernel._get_simple_elementwise_kernel()

cupy/_core/core.pyx in cupy._core.core.compile_with_cache()

~/Scripting/anaconda3/lib/python3.8/site-packages/cupy/cuda/compiler.py in compile_with_cache(source, options, arch, cache_dir, extra_source, backend, enable_cooperative_groups, name_expressions, log_stream, jitify)
    458             name_expressions, log_stream, cache_in_memory)
    459     else:
--> 460         return _compile_with_cache_cuda(
    461             source, options, arch, cache_dir, extra_source, backend,
    462             enable_cooperative_groups, name_expressions, log_stream,

~/Scripting/anaconda3/lib/python3.8/site-packages/cupy/cuda/compiler.py in _compile_with_cache_cuda(source, options, arch, cache_dir, extra_source, backend, enable_cooperative_groups, name_expressions, log_stream, cache_in_memory, jitify)
    536     if backend == 'nvrtc':
    537         cu_name = '' if cache_in_memory else name + '.cu'
--> 538         ptx, mapping = compile_using_nvrtc(
    539             source, options, arch, cu_name, name_expressions,
    540             log_stream, cache_in_memory, jitify)

~/Scripting/anaconda3/lib/python3.8/site-packages/cupy/cuda/compiler.py in compile_using_nvrtc(source, options, arch, filename, name_expressions, log_stream, cache_in_memory, jitify)
    296                 cu_file.write(source)
    297
--> 298             return _compile(source, options, cu_path,
    299                             name_expressions, log_stream, jitify)
    300     else:

~/Scripting/anaconda3/lib/python3.8/site-packages/cupy/cuda/compiler.py in _compile(source, options, cu_path, name_expressions, log_stream, jitify)
    265
    266         if jitify:
--> 267             options, headers, include_names = _jitify_prep(
    268                 source, options, cu_path)
    269         else:

~/Scripting/anaconda3/lib/python3.8/site-packages/cupy/cuda/compiler.py in _jitify_prep(source, options, cu_path)
    252         if dump:
    253             cex.dump(sys.stderr)
--> 254         raise JitifyException(str(cex))
    255     assert name == cu_path
    256

JitifyException: Runtime compilation failed
------------------------------------------------------------------------------------------

To produce this error report I had the following environment variables.  %env in python:
 'CUPY_CUDA_COMPILE_WITH_DEBUG': '1',
 'CUPY_DUMP_CUDA_SOURCE_ON_ERROR': '1',
 'CUPY_CACHE_SAVE_CUDA_SOURCE': '1',

Thank you for reading.
To Reproduce
from cupyx.scipy import signal
from scipy import misc
import cupy as cp

ascent = misc.ascent()
scharr = cp.array([[ -3-3j, 0-10j,  +3 -3j],
                   [-10+0j, 0+ 0j, +10 +0j],
                   [ -3+3j, 0+10j,  +3 +3j]]) # Gx + j*Gy
ascentcp = cp.array(ascent)
grad = signal.convolve2d(ascentcp, scharr, boundary='symm', mode='same')

Installation
Conda-Forge (conda install ...)
Environment
my cupy config settings:
{40}>> cp.show_config()
OS                           : Linux-4.18.0-240.22.1.el8_3.x86_64-x86_64-with-glibc2.10
Python Version               : 3.8.5
CuPy Version                 : 9.5.0
CuPy Platform                : NVIDIA CUDA
NumPy Version                : 1.19.5
SciPy Version                : 1.6.2
Cython Build Version         : 0.29.24
Cython Runtime Version       : 0.29.23
CUDA Root                    : /usr/local/cuda-11.2
nvcc PATH                    : /usr/local/cuda-11.2/bin/nvcc
CUDA Build Version           : 11020
CUDA Driver Version          : 11020
CUDA Runtime Version         : 11020
cuBLAS Version               : (available)
cuFFT Version                : 10400
cuRAND Version               : 10203
cuSOLVER Version             : (11, 0, 2)
cuSPARSE Version             : (available)
NVRTC Version                : (11, 2)
Thrust Version               : 101000
CUB Build Version            : 101000
Jitify Build Version         : <unknown>
cuDNN Build Version          : 8201
cuDNN Version                : 8201
NCCL Build Version           : 21003
NCCL Runtime Version         : 21104
cuTENSOR Version             : 10303
cuSPARSELt Build Version     : 100
Device 0 Name                : GeForce RTX 2060 SUPER
Device 0 Compute Capability  : 75
Device 0 PCI Bus ID          : 0000:01:00.0

Additional Information
To produce this error report I had the following environment variables.  %env in python:
 'CUPY_CUDA_COMPILE_WITH_DEBUG': '1',
 'CUPY_DUMP_CUDA_SOURCE_ON_ERROR': '1',
 'CUPY_CACHE_SAVE_CUDA_SOURCE': '1',

regarding the installation I did it with the following command :
    {43}>> %hist -g conda-forge
...
182/413: !bin/conda install -c nvidia -c rapidsai -c conda-forge cupy cudatoolkit=11.2 cudnn cutensor nccl

I am a newby on CUDA. I have been learning and using Cupy for some time now. I was going through cupyx.scipy modules and functions when I came across this issue. I would love to have enough knowledge to have a go myself at fixing this issue, but I don't even know where to start even though I know Python and a bit of C++. That "Jitify" looks intimidating to me as  I don't know anything about it.
Any guidance / tutorials would be appreciated. This is my 1st issue found and reported.
I hope you find all the information needed.  Thank you for reading.

Thanks for reporting! Issue confirmed. Seems cast between complex128 are not defined.
I could workaround the issue by using ascentcp = cp.array(ascent, dtype=cp.complex128).

I can confirm that the workaround suggested does work.
Using the line
ascentcp = cp.array(ascent, dtype=cp.complex128)
instead. The error does not occur.
Thank you very much!!

Can reproduce it too. I think a proper fix is to add a cupy.can_cast(in1, in2, casting='safe') check somewhere in the call path for signal APIs.

authors: admanero kmaehashi leofang


text:
Improve coverage of cuBLAS L1 functions

This PR improves the coverage of cuBLAS L1 functions, such as cublas<t>nrm2(), cublas<t>dot(), cublas<t>axpy() among others.
This also changes the arguments of the existing thin wrappers for cublasI<t>amax(), cublas<t>asum(), cublas<t>axpy() among others. This change breaks backward-compatibility, but I think this change is important because it allows you to pass a scalar value on the GPU as an argument (as a pointer) or to place the result of reduction operations on the GPU, reducing the synchronization between CPU and GPU.

This is related to https://github.com/cupy/cupy/issues/4200

Attaching the measured results on GV100.
It looks we should use cuBLAS L1 functions in cupy.linalg.norm and cupy.dot specifically when matrix size large.

size
linalg.norm(x, 1)
cublas.asum(x)

10000
0.057 ms
0.027 ms

100000
0.094 ms
0.026 ms

1000000
0.988 ms
0.038 ms

10000000
9.539 ms
0.148 ms

size
linalg.norm(x)
cublas.nrm2(x)

10000
0.062 ms
0.052 ms

100000
0.093 ms
0.051 ms

1000000
0.980 ms
0.064 ms

10000000
9.192 ms
0.171 ms

size
dot(x, y)
cublas.dot(x, y)

10000
0.044 ms
0.025 ms

100000
0.085 ms
0.027 ms

1000000
0.969 ms
0.055 ms

10000000
9.339 ms
0.264 ms

scripts
mport cupy
import cupyx

n_repeat = 10
n_warmup = 1

def get_time(perf):
    cpu_time = perf.cpu_times.mean()
    gpu_time = perf.gpu_times.mean()
    return max(cpu_time, gpu_time) * 1000  # msec

def run_nrm1(x):
    times = []
    perf = cupyx.time.repeat(cupy.linalg.norm, (x, 1),
                             n_repeat=n_repeat, n_warmup=n_warmup)
    times.append(get_time(perf))

    perf = cupyx.time.repeat(cupy.cublas.asum, (x,),
                             n_repeat=n_repeat, n_warmup=n_warmup)
    times.append(get_time(perf))
    return times

def run_nrm2(x):
    times = []
    perf = cupyx.time.repeat(cupy.linalg.norm, (x, 2),
                             n_repeat=n_repeat, n_warmup=n_warmup)
    times.append(get_time(perf))

    perf = cupyx.time.repeat(cupy.cublas.nrm2, (x,),
                             n_repeat=n_repeat, n_warmup=n_warmup)
    times.append(get_time(perf))
    return times

ef run_dot(x, y):
    times = []
    perf = cupyx.time.repeat(cupy.dot, (x, y),
                             n_repeat=n_repeat, n_warmup=n_warmup)
    times.append(get_time(perf))

    perf = cupyx.time.repeat(cupy.cublas.dot, (x, y),
                             n_repeat=n_repeat, n_warmup=n_warmup)
    times.append(get_time(perf))
    return times

ns = (10000, 100000, 1000000, 10000000)

print(' size | linalg.norm(x, 1) | cublas.asum(x)')
print('------|-------------------|---------------')
for n in ns:
    x = cupy.random.random((n,))
    ret = run_nrm1(x)
    print('{} | {:.3f} ms | {:.3f} ms'.format(n, ret[0], ret[1]))

print()
print(' size | linalg.norm(x) | cublas.nrm2(x)')
print('------|----------------|---------------')
for n in ns:
    x = cupy.random.random((n,))
    ret = run_nrm2(x)
    print('{} | {:.3f} ms | {:.3f} ms'.format(n, ret[0], ret[1]))

print()
print(' size | dot(x, y) | cublas.dot(x, y)')
print('------|-----------|-----------------')
for n in ns:
    x = cupy.random.random((n,))
    y = cupy.random.random((n,))
    ret = run_dot(x, y)
    print('{} | {:.3f} ms | {:.3f} ms'.format(n, ret[0], ret[1]))

Can you also run the benchmark with CUB or cuTENSOR enabled? (i.e. setting cupy.core.set_routine_accelerators(['cub']) in the script above). That should reduce the difference, but I suspect these cuBLAS implementations may still be faster.

Thanks, @grlee77 .  I forgot about that ... :sweat:
The attached are the measured results with CUB enabled (cupy.core.set_routine_accelerators(['cub'])).

size
linalg.norm(x, 1)
cublas.asum(x)

10000
0.054 ms
0.026 ms

100000
0.054 ms
0.025 ms

1000000
0.066 ms
0.037 ms

10000000
0.423 ms
0.147 ms

size
linalg.norm(x)
cublas.nrm2(x)

10000
0.074 ms
0.054 ms

100000
0.075 ms
0.053 ms

1000000
0.066 ms
0.065 ms

10000000
0.424 ms
0.177 ms

size
dot(x, y)
cublas.dot(x, y)

10000
0.115 ms
0.024 ms

100000
0.103 ms
0.025 ms

1000000
0.102 ms
0.050 ms

10000000
0.555 ms
0.271 ms

For ROCm/HIP (anaruse#4):
Without CUB:

size
linalg.norm(x, 1)
cublas.asum(x)

10000
0.144 ms
0.080 ms

100000
0.197 ms
0.073 ms

1000000
1.925 ms
0.072 ms

10000000
16.919 ms
0.210 ms

size
linalg.norm(x)
cublas.nrm2(x)

10000
0.073 ms
0.050 ms

100000
0.149 ms
0.048 ms

1000000
1.846 ms
0.062 ms

10000000
16.759 ms
0.208 ms

size
dot(x, y)
cublas.dot(x, y)

10000
0.088 ms
0.052 ms

100000
0.212 ms
0.050 ms

1000000
2.053 ms
0.071 ms

10000000
19.108 ms
0.284 ms

With CUB:

size
linalg.norm(x, 1)
cublas.asum(x)

10000
0.097 ms
0.058 ms

100000
0.072 ms
0.052 ms

1000000
0.103 ms
0.067 ms

10000000
0.389 ms
0.223 ms

size
linalg.norm(x)
cublas.nrm2(x)

10000
0.082 ms
0.054 ms

100000
0.078 ms
0.051 ms

1000000
0.101 ms
0.066 ms

10000000
0.386 ms
0.222 ms

size
dot(x, y)
cublas.dot(x, y)

10000
0.095 ms
0.055 ms

100000
0.097 ms
0.053 ms

1000000
0.130 ms
0.070 ms

10000000
0.480 ms
0.255 ms

/test

pfnCI, test this please.

Jenkins CI test (for commit 531e3c042062fc4f5c598f1baa841999edc4cee9, target branch master) succeeded!

Thanks for your comment, @takagi .
I've update the branch based of your feedback, could you take a look?

Jenkins, test this please

Jenkins CI test (for commit 44c1160699078fde80af627cfc4b46dac3bf9e92, target branch master) succeeded!

LGTM!

authors: anaruse chainer-ci grlee77 leofang takagi


text:
Make install_tests runnable without depending on current path

Currently install_tests expects that the current directory is at cupy/ source root.
Due to this limitation we have to run tests separately, in two step (install_tests and other tests).
https://github.com/chainer/chainer-test/blob/master/test_cupy.sh#L28-L34

Jenkins CI test (for commit 2405452238fe473fd9fad3e32518d5203163a9e3, target branch master) succeeded!

pfnCI, test this please.

Jenkins CI test (for commit 2405452238fe473fd9fad3e32518d5203163a9e3, target branch master) succeeded!

pfnCI, test this please.

Jenkins CI test (for commit 2405452238fe473fd9fad3e32518d5203163a9e3, target branch master) succeeded!

LGTM.

authors: asi1024 chainer-ci kmaehashi


text:
[backport] cuDNN v8.2 on documentation

Backport of #5148

Jenkins CI test (for commit a37d8e2c98626e3961b4bc7ccaf23a2d9ec1e7e3, target branch v9) failed with status FAILURE.


text:
Fix cupy.ndarray document relating to subclass support

This PR fixes cupy.ndarray's documentation that #6716 has broken.

Let me include this change into #6746 as sphinx seem not to identify cupy.ndarray as expected without the renaming to be handled in #6746. It still emits 'alias of...' here.


text:
Improve installation command

I saw several users confusing with cupy-cuda11x and cupy-cuda112...117. This PR adds some more description of the change in CuPy v11.

What's the plan/timeline to mention cupy-wheel? 🙂 I think it'd help resolve further confusion.

authors: kmaehashi leofang


text:
curl convert to json error

Error: found "variable_assignment" AST node, only "command", "pipeline" or "redirected_statement" are supported
curl www.baidu.com/a/b/c?x=1&c=3
^^^

put the url in quotes
curl 'www.baidu.com/a/b/c?x=1&c=3'

it won't work as a command either

authors: Wang-Jun-Chao verhovsky

repo: curlconverter/curlconverter


text:
Put sha in version number

Today the first to digit of a version number is fixed. Were only incrementing the commit count.
I suggest we changed a version number to something like: major.count.sha

Does VSCode support having an alphanumeric last component of the version number? I haven't seen any other extensions do anything similar.

Pokey and I did some quick testing earlier and it seems to work

We did testing with local install. No idea if it will work when publishing

authors: AndreasArvidsson auscompgeek pokey

repo: cursorless-dev/cursorless


text:
Logging too much errors (but data is successfully collected).

Firstly, I would like to thank you for the awesome work done on this repo! Good job :)
I've got your integration up and running on my HA and data is successfully collected since yesterday.
There is only one problem: There are too many errors logged (~1000 for the last 6h from 3 devices).
Is there any way to limit those logs?
Versions:
Home Assistant: 0.114.4
HACS: 1.5.2
Xiaomi passive BLE monitor sensor platform: 0.6.11
Sensors: LYWSD03MMC

Example errors:
2020-08-30 12:00:37 ERROR (SyncWorker_46) [custom_components.mitemp_bt.sensor] Decryption failed: MAC check failed
2020-08-30 12:00:37 ERROR (SyncWorker_46) [custom_components.mitemp_bt.sensor] token: <token value>
2020-08-30 12:00:37 ERROR (SyncWorker_46) [custom_components.mitemp_bt.sensor] nonce: 87aba338c1a45b055d980000
2020-08-30 12:00:37 ERROR (SyncWorker_46) [custom_components.mitemp_bt.sensor] encrypted_payload: 0bbb6d531a9800006d652b96
2020-08-30 12:00:37 ERROR (SyncWorker_46) [custom_components.mitemp_bt.sensor] cipherpayload: 0bbb6d531a
2020-08-30 12:00:37 ERROR (SyncWorker_46) [custom_components.mitemp_bt.sensor] Decryption failed for <mac address>, decrypted payload is None

Please show your configuration. I guess there is an error in your configuration.

sensor:
  - platform: mitemp_bt
    encryptors:
        'A4:C1:38:A3:AB:87': '<encryption key>'
        'A4:C1:38:93:92:77': '<encryption key>'
        'A4:C1:38:EC:F9:67': '<encryption key>'

I think the easiest is to exclude it from the logger by setting the logger level to critical
logger:
  default: warn
  logs:
    custom_components.mitemp_bt: critical


text:
How can I change the default directory of cvat_worker_import?

Actions before raising this issue

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

Is your feature request related to a problem? Please describe.
How can I change the default directory of cvat_worker_import?
I changed the directory of cvat_worker-import in docke-compose.yml:
cvat_worker_import:
container_name: cvat_worker_import
image: cvat/server:${CVAT_VERSION:-dev}
restart: always
depends_on: *backend-deps
environment:
<<: *backend-env
NUMPROCS: 2
command: run worker.import
volumes:
- cvat_data:/home/incar/mdata4/cvat/data
- cvat_keys:/home/incar/mdata4/cvat/keys
- cvat_logs:/home/incar/mdata4/cvat/logs
networks:
- cvat

As a result, when the task is created, an error occurs when uploading the file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/django/data/data/1/raw/1014.jpg'
Obviously the main directory of the container is still /home/django, but it doesn't exist, so an error is reported. So, how can I specify this directory?
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response

Could you be more specific about what you are trying to achieve?
It's not quite clear to me why you need to change the directory inside the containers...
If you just want to change the default location of the cvat presistent data, try doing that for all volumes whose location you want to change. Please note that cvat_data volume must be deleted first for the changes to take effect
volumes:
  cvat_data:
    driver_opts:
      type: none
      device: /home/incar/mdata4/cvat/data
      o: bind

repo: cvat-ai/cvat


text:
Spawn algo player

actually uses fork by child process

needs coverage

includes add-match-author so I didn't have to reseed and rerun migrations

repo: cverna-hackathons/pyski


text:
help me!!!!

When I run the train file, helpers.py file (line 153) gives the error: AttributeError: Can't pickle local object '_FusariumDataset.init. . '

already work,Set the num_worder to 0


text:
KeyError in model

Hi, I trained the model followed train.py and want to get the answers from answer.py, but when I ran it, I got an error like:
Initializing Dynamic LSTM...
Freezing resnet152 ...
Loading model from checkpoint at /home/annie/Dense-CoAttention-Network/VQA/model/DCN1.pt
Traceback (most recent call last):
  File "answer.py", line 156, in <module>
    main(args)
  File "answer.py", line 109, in main
    model.load_state_dict(checkpoint["model"])
  File "/usr/local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 522, in load_state_dict
    .format(name))
KeyError: 'unexpected key "lang_extract.rnn.weight_ih_l1" in state_dict'

Could you tell me what's wrong with it?

@kienduynguyen Thank you for your reply! The problem has been solved.

repo: cvlab-tohoku/Dense-CoAttention-Network


text:
Performance opportunity with BufferManager Pin/UnPin

Test scenario:
create table l_2048m as select l_partkey, l_linenumber, l_extendedprice, l_quantity from lineitem limit 1024000000;
delete from l_2048m where l_partkey = 478373;
PRAGMA threads=8;
select count(*) from l_2048m where l_partkey = 478373;
Linux version 3.10.0-327.ali2011.alios7.x86_64 (admin@ba7ee01966d8) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC) ) #1 SMP Tue Jun 6 14:29:12 CST 2017
Performance with 1,2,4,8 threads shows impact of Lock/Unlock within BufferManager
1 thread    2 thread    4 thread     8 thread   16 threads
2.692         1.642         1.011            0.911       1.307
Pragma threads=8;
select count() from l_2048m where l_partkey = 478373;
Run Time: real 0.911 user 3.949651 sys 2.938208
pragma threads=16;
select count() from l_2048m where l_partkey = 478373;
Run Time: real 1.307 user 3.755393 sys 16.608485
vtune shows significant spin impact:

Simplest use case to demonstrate:
create temporary table d as select mod(range, 100000) g, 42 p from range(1000000000);
D pragma threads=1;
Run Time: real 0.001 user 0.000153 sys 0.000022
D select count(*) from d where g = 50000;
┌─────────┐
│ count() │
├─────────┤
│ 10000   │
└─────────┘
Run Time: real 1.680 user 1.680765 sys 0.000322
D
D
D pragma threads=4;
Run Time: real 0.001 user 0.000517 sys 0.000000
D select count(*) from d where g = 50000;
┌─────────┐
│ count() │
├─────────┤
│ 10000   │
└─────────┘
Run Time: real 1.545 user 3.488256 sys 1.838499
D
D
D pragma threads=16;
Run Time: real 0.001 user 0.001025 sys 0.000015
D select count(*) from d where g = 50000;
┌─────────┐
│ count() │
├─────────┤
│ 10000   │
└─────────┘
Run Time: real 1.734 user 2.866002 sys 24.230703

vtune output for this query:

vtune for tpch Q6 at threads-8:

This should be addressed now, feel free to re-open if there are still problems.

authors: Mytherin jtommaney-alibaba jtommaney1

repo: cwida/duckdb


text:
Pre-filtering data in zonemaps and #1303

Zonemaps checks are also used to filter data during scanning and to enjoy the benefits of the adaptive filters.
In this PR there is also a new rewrite rule that flips a cast from a column_ref to all constant elements from an in clause allowing them to be pushed down to the zonemaps.

Thanks for the fixes, everything looks good now.

Thanks for the fixes, everything looks good now.

authors: Mytherin pdet


text:
insert image size

I have generated file of student images and default icon of same pixel size, but when file is generated student images are so small, but icon images   are showing correct size, before write xlsx gem i used write excel gem in which images where showing correctly of same size

Can you give me source code and image files which causes unexpected result,
please.
cxn03651
2015-04-17 14:04 GMT+09:00 Parminder Singh notifications@github.com:

I have generated file of student images and default icon of same pixel
size, but when file is generated student images are so small, but icon
images are showing correct size, before write xlsx gem i used write excel
gem in which images where showing correctly of same size
—
Reply to this email directly or view it on GitHub
https://github.com/cxn03651/write_xlsx/issues/19.

@cxn03651 I think I have the same issue.
All my images 200x200px, but in generated file they have different sizes
I can provide example and images if it needed.

send me examples, please.

@cxn03651 Sent it to email from your github progile. Thx for fasr reply!

i dont have code now

Here is example of code from my service object, images for test and
screenshots with bug.
Tell me if this info is not enough.
On Mon, Apr 11, 2016 at 7:39 AM, Parminder Singh notifications@github.com
wrote:

i dont have code now
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/cxn03651/write_xlsx/issues/19#issuecomment-208160634

--
Best regards,
Andrey Lizunov

@andrey-lizunov Could you send me the example images as well so that I can see if there is the same issue in Excel::Writer::XLSX.

@jmcnamara Sent it to email from your github profile.

@andrey-lizunov I ran a sample Excel::Writer::XLSX program with your sample images and got the same results as write_xlsx.
However, as far as I can tell (and there are a lot of tests in both modules to confirm this) the results are correct.
They reason that the images appear at different sizes is that they have different resolutions. Specifically in the case of the 3 images you supplied: 100 dpi, 94 dpi and 300 dpi. Excel scales these images based on a default resolution of 96 dpi and as a result the images appear at different sizes even though they are all 200x200 pixels.
This is exactly the same behaviour you would see if you manually inserted the images into Excel. You can try that to confirm.
This behaviour did change over a year ago in Excel::Writer::XLSX (and probably in write_xlsx) since it didn't take into account the DPI of images. However, that was a bug. The module now behaves like Excel.
I hope that helps clear up the reason for the differences even if it will probably make more work for you to handle files with different resolutions. You could probably scale them all to the same 200x200 size if you worked out the resolution of each and scaled it to 96 dpi using the x_scale and y_scale in insert_image().


text:
Bump suite.yml versions for 1.7.2+suite.1 release

Note: still want to include cyberark/conjur-oss-helm-chart - 2.0.0 once it's been released

closing this PR, opening another shortly.

repo: cyberark/conjur-oss-suite-release


text:
[helm] namingPolicies in values.yaml is not reflected in configmap

Describe the bug
NamingPolicy is now supported in #17.
However, namingpolicies in values.yaml is not reflected in configmap.
Because namingpolicies is not described in configmap.yaml.
https://github.com/cybozu-go/accurate/blob/da7508cf549fd7c49668d515e759345d6c6824a6/charts/accurate/templates/configmap.yaml
Environments

Version: 0.3.0
Chart Version: 0.2.2

To Reproduce
Steps to reproduce the behavior:

Prepare a values.yaml containing namingPolicies as below:

controller:
  config:
    namingPolicies:
      - root:  foo
        match: foo_.*

Deploy accurate using Helm with the values.yaml.

helm install --create-namespace --namespace accurate accurate -f values.yaml accurate/accurate

The generated configmap does not contain namingPolicies

Expected behavior
The configmap should contain namingPolicies.

Fixed in #42

repo: cybozu-go/accurate


text:
Club members not displaying at webstorm

Summary
toggle club member seems not working. I've installed this awesome plugin, it works fine except club member doesn't appears. Need help to solve this issue. Thanks in advance!
...
Expected behavior
toggle club member on -> club member appears as shown on preview page
...
Actual behavior
club member not being displayed anyways
...
Steps to reproduce (if needed)

Environment
WebStorm 2018.2
Build #WS-182.3684.70, built on July 20, 2018
Licensed to WebStorm Evaluator
Expiration date: August 18, 2018
JRE: 1.8.0_152-release-1248-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 7 6.1

Hmm, the frame has it's own image, which we see in the screenshot. This frame sits on top (at least on the mac)
Which looks like this

You should be able to see it if you have an editor window open or a tool window open.

Try that out and show me with one of those two opened (with club members being on) :)
This one is for my reference
WebStorm 2018.2
Build #WS-182.3684.70, built on July 20, 2018
JRE: 1.8.0_152-release-1248-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.6

And hello there, thanks for fast reply!
I've tried toggle on/off again, even with opened version control tab as the example. Here goes screenshoot

Is it possible that this is Win7 problem?

It may very well be. I will need to get my hands on a window's seven machine in order to test.
So it may take a bit.
I'll keep you posted.

Yo, it seems to be working now, but the thing is WebStorm thought that this images was on my local machine. After i change local path to URI path on raw.githubusercontent.com all started to work.

So yeah, after i switch club member on/off WebStorm still tried to find images at WebStorm/bin/club_members/ . But in my case this folder does not exists.

Well after all magic manipulations with files, problem was figured out
Webstorm thinks that images are storing in folder bin/club_members, but in fact there were no folder at all. After manually downloading images from your repository /src/main/resources/club_members, and placing it into bin/club_members all seem to work now as intended

Thanks for debugging for me, and kudos to for figuring out the work around!

Anyways, it is still an issue that needs to be address.
As you know, the club members are supposed to be stored locally, but in the case of windows, that is not the case. I may have messed the the image copy step. (I package the images in the jar and extract them to be used from the file system). It may be that webstorm is installed in a directory that requires write permission (admin) or it could be I am bad at writing I/O code.
I will get a fix out for it though (I know what needs to be done).
So you do not have to do that for every other IDE you use as well.
Thanks for the help!

 Club members not displaying at webstorm #50

Thanks a lot for your help in solving this problem!
I like your theme a lot, looking forward to see future improvements.
Cheers

PyCharm 2018.2.1 (Professional Edition)
Build #PY-182.3911.33, built on August 5, 2018
JRE: 1.8.0_152-release-1248-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

I'm using PyCharm and I also cannot see club members.
I copied src/main/resources/club_members to C:\WINDOWS\system32\club_members and I resolved the problem. Thanks for all!

@maxtortime So it it a windows thing! Thanks!
As for the I/O stuff, the Idea core allows you to use images from a URL. That is how the background frame image is used (and why there is a lag time between seeing the image show up as well).
So I  was planning on doing this:

Try to write image to disk.
If that fails, fall back to using the image from a url.

Hey! I will close this issue once it is publicly available.
In the meantime if you want the zip file to install it manually just say so. Imma hook you up!
Thanks again!

authors: Armondel cyclic-reference maxtortime

repo: cyclic-reference/ddlc-jetbrains-theme


text:
Add CRD for template references

To make develoeper experience smoother when creating modules, we added a dropdown when selecting which template you want to use. You can now prepare a templates you will use in the future and just select them in the dropdown instead of writing it each time.
Not to introduce a database to Cyclops, template references were implemented as another CRD which you can apply into the cluster. A single template ref would look like this:
apiVersion: cyclops-ui.com/v1alpha1
kind: TemplateStore
metadata:
  name: demo-template
  namespace: cyclops
spec:
  path: demo
  repo: https://github.com/cyclops-ui/templates
  version: main

kubectl apply -f https://raw.githubusercontent.com/cyclops-ui/cyclops/v0.3.0-rc.2/install/cyclops-install.yaml

repo: cyclops-ui/cyclops


text:
Dynamic collision layer

Is there a good way to append chunks of data to the current collision layer on a scene?
The main reason is to be able to create dynamic "infinite" games and specially to create the level on the run.
I did the following changes on file quintus_2d.js:208`:
load: function(dataAsset) {
  var data;
  if( dataAsset instanceof Array ) {
    data = dataAsset;
  } else {
    var fileParts = dataAsset.split("."),
        fileExt = fileParts[fileParts.length-1].toLowerCase();

    if (fileExt === "json") {
      data = Q._isString(dataAsset) ?  Q.asset(dataAsset) : dataAsset;
    }
    else {
      throw "file type not supported";
    }
  }

So I could keep an array with my level and concat new chunks as the character moves. Here's the demo:
http://murilopolese.com.br/sandbox/fabulous-runner/
I'd love to understand what would be the best way to do that or if this is the way to go.
Cheers,
Murilo

Necroing... @cykod - how do you suggest offsetting? putting an x position on the tileLayer doesn't allow it to render properly.

I'm having a similar problem. I am also trying to stream in chunks of levels. I have also tried setting the x position on the tileLayer, with varying results. I've come to the conclusion that if you change the 'x' of the tileLayer, you move the collision perfectly but then the tiles are rendered at 'x*2'. I can't see a clean way to resolve this as I am unfamilar with the code, but I'll keep digging.

After a tiny bit more digging, I think I found the problem:
https://github.com/cykod/Quintus/blob/master/lib/quintus_2d.js#L395
The 'p.x' and 'p.y' are added here. If I remove this addition by doing:
		tileLayer.drawBlock = function(ctx, blockX, blockY) {
			var p = tileLayer2.p,
				startX = Math.floor(blockX * p.blockW),
				startY = Math.floor(blockY * p.blockH);

			if(!tileLayer2.blocks[blockY] || !tileLayer2.blocks[blockY][blockX]) {
				tileLayer2.prerenderBlock(blockX,blockY);
			}

			if(tileLayer2.blocks[blockY] && tileLayer2.blocks[blockY][blockX]) {
				ctx.drawImage(tileLayer2.blocks[blockY][blockX],startX,startY);
			}
		};

Then everything renders correctly, and the collision appears to work.
I haven't created a push request as I don't know if my changes will affect the code in other ways.

I ended up modifying the collision layer, then calling  .setDimensions(); and ._generateCollisionObjects(); on the layer object. My code is messy and from 6 months ago - so I can try to find the key points for you...

My current solution seems to function okay, but please do post any information you have. It may all blow up in my face! (and you never know who might find this ticket next and want info).
Thanks!

shitty old code below. What this does is news up a map, with a start room, some empty rooms, and then a goal room. A room is merely and X by Y sized section of the tiles/collision layer. There are helper methods that get called at any point to change "rooms" in the map. See changeRoom - you see it create a tilemap from the given map name with var tileLayer = new Q.TileLayer..., then it finds the room offset on the main tilemap and modifies the data at that point (the while loop following the tile layer creation). We then create a new tile layer from the current tile layer's tiles... THIS is the crappy point. You can't just simply tell the tile layer to update and have it work.
The reason we create a new tile layer had to do with 2 things - the cruft left on the old tile layer, attempting to use old data for collisions with no way to reset it AND the stage collision layer not accepting a reset on the collision layer. What we end up doing is cloning the modified tile layer and re-assigning the cloned layer to the stage as the collision layer.
Yes, brainf*ck. Also, could possibly be done better. I put comments on key points in the code below:
  var mapLayer = new Q.TileLayer({ dataAsset: 'Entrance.json', sheet: 'terrain', tileW: tileSize, tileH: tileSize }); // initial map creation
  var empty = new Q.TileLayer({ dataAsset: 'Empty.json', sheet: 'terrain', tileW: tileSize, tileH: tileSize });
  var goal = new Q.TileLayer({ dataAsset: 'Goal.json', sheet: 'terrain', tileW: tileSize, tileH: tileSize });
  stage.collisionLayer(mapLayer); // collision layer assignment

  // helper method to add tiles to the map layer
  var addTiles = function(tileLayer) {
    var len = mapLayer.p.tiles.length;
    while(len--) {
      mapLayer.p.tiles[len] = mapLayer.p.tiles[len].concat(tileLayer.p.tiles[len]); // Modify current tile/collision layer
    }
  };

  // helper method to change portions of the map
  // called at many points in the game when parts of the map are swapped out.
  var changeRoom = function(roomIdx, mapName) {
    if(roomIdx > totalRooms - 2 || roomIdx < 1) throw "NO! ROOM NUMBER NOT IN RANGE [1," + totalRooms - 2 + "]";
    var len = mapLayer.p.tiles.length;
    var roomOffset = roomWidth * roomIdx;
    var tileLayer = new Q.TileLayer({ dataAsset: mapName + '.json', sheet: 'terrain', tileW: tileSize, tileH: tileSize });
    while(len--) {
      var colCounter = roomWidth;
      while(colCounter--) {
        mapLayer.p.tiles[len][colCounter+roomOffset] = tileLayer.p.tiles[len][colCounter]; // Modify current tile/collision layer
      }
    }
    mapLayer = new Q.TileLayer({ tiles: mapLayer.p.tiles, sheet: 'terrain', tileW: tileSize, tileH: tileSize }); // clone the current layer... see replaceCollisionLayer
    replaceCollisionLayer(mapLayer);
  };

  // We replace the current collision layer with a cloned version of the modified original.
  // The modified original could not be reset properly to tell the stage that is has changed.
  // Also, the way the current layer was referenced, I believe it wouldn't allow a re-assign.
  var replaceCollisionLayer = function(newLayer) {
    stage.collisionLayer(newLayer);
    stage._collisionLayers.shift().destroy(); // This is because we ADDED a new collision layer on the line before. This removes the old layer.
  }

  // All the crap below is setup code - but useful to get bearings on the rest of the code.
  var i = totalRooms - 2;
  while(i--) {
    addTiles(empty);
  }

  var i = totalRooms - 2;
  while(i--) {
    changeRoom(i+1, "Empty");
  }
  addTiles(goal);
  mapLayer.setDimensions();
  mapLayer._generateCollisionObjects();

  stage.centerOn(stage.options.startX, stage.options.startY);
  stage.viewport.scale = stage.options.zoom;
  stage.follow(rogue, {x: stage.options.followX, y: stage.options.followY});

authors: JaredSartin R4wizard murilopolese

repo: cykod/Quintus


text:
feat: webp file support

hey, this PR simply adds .webp file support.
Example:

Hey @cyntler, could you do me a favor and release a version of it when you have some free time? Thanks! 🙏

@alantoa It should be available on the latest version: https://github.com/cyntler/react-doc-viewer/releases/tag/v1.15.0

thank you!

authors: alantoa cyntler

repo: cyntler/react-doc-viewer


text:
978MHz vs 1090MHz GDL90 traffic report format

There's a different report that both FF and WingX (probably others also) use to separate out the source of data. I'm assuming that most devices use a GDL90 0x14 "Traffic Report" but there is something that marks the source between the two of them.
Anyone have a FreeFlight device that they could capture output from?

Good Evening,
I am flying Sunday and if there is a updated (not published file) that has
fixes etc over v0.4r4 that needs to be tested, would someone please let me
know and send to me.   Dropbox is fine or something else.
I have the AHRS/GPS unit connected now and appears to be working fine.  I
will broadcast Sunday on periscope (twitter app)  between 14:30-14:45pm to
demo the system LIVE from the Challenger 604 @ 39,000 feet along with
dmurray14 antenna system and a proper dual dongle case murray made for me.
Periscope / Twitter user name is @owenstacey add me before the demo on
Sunday so I can accept your request.
Thanks,
Owen
On Thu, Nov 5, 2015 at 6:02 PM, cyoung notifications@github.com wrote:

There's a different report that both FF and WingX (probably others also)
use to separate out the source of data. I'm assuming that most devices use
a GDL90 0x14 "Traffic Report" but there is something that marks the source
between the two of them.
Anyone have a FreeFlight device that they could capture output from?
—
Reply to this email directly or view it on GitHub
https://github.com/cyoung/stratux/issues/100.

--
Owen Stacey

A friend of mine has one of these and I'll see if I can borrow it from him for a few days to get some packet captures. I'll let you know either way.

Is this issue the reason why the ForeFlight 7.5.1 traffic callout balloon says "978 ADS-B" even though the reason I know about the traffic is that Stratux heard the 1090 ES squit?

@bkwny - yep. Still is.

Known issue with FF. Answer to the original issue is "it doesn't exist".

authors: CL604pilot bkwny cyoung loather

repo: cyoung/stratux


text:
Unable to load library: nvinfer_builder_resource_10.dll

Hello,
First of all, I want to thank you for tensorrt-cpp-api. It is very good.
Made some little changes so that it works on Windows.
This API used to work perfectly a couple of months ago. However, now I am getting errors here and there all the time after updating stuff.
Tested the latest commit with:
CUDA: 12.4
CUDNN: 8.9.7
TensorRT: 10.0.1.6
According to NVIDIA, these versions are perfectly compatible.
But I am getting an error:
[2024-06-13 20:21:01.281] [info] Engine not found, generating. This could take a while...
[2024-06-13 20:21:01.375] [info] [MemUsageChange] Init CUDA: CPU +76, GPU +0, now: CPU 7990, GPU 1166 (MiB)
[2024-06-13 20:21:01.668] [error] 6: [libLoader.cpp::nvinfer1::rt::DynamicLibrary::Impl::Impl::288] Error Code 6: Internal Error (Unable to load library: nvinfer_builder_resource_10.dll)
Any ideas why this is happening?

Please disregard.
Solved it by copying nvinfer_builder_resource_10.dll to where my executable is.

repo: cyrusbehr/tensorrt-cpp-api


text:
Segfault when changing from def to cdef call

See context at http://trac.sagemath.org/sage_trac/ticket/14452
Migrated from http://trac.cython.org/ticket/810

This is an upstream bug: http://bugs.python.org/issue25750

authors: jdemeyer robertwb

repo: cython/cython


text:
[BUG] Tutorial for Numpy uses deprecated (possibly removed?) np.int

Describe the bug
https://cython.readthedocs.io/en/latest/src/tutorial/numpy.html - some of the examples use np.int. This has been deprecated or removed in Numpy (I'm not quite sure which). Either way we should update it to match the current recommendations.
Code to reproduce the behaviour:
No response
Expected behaviour
No response
OS
No response
Python version
No response
Cython version
Both stable and latest documentation
Additional context
No response

I also wonder if we should cimport numpy as cnp to make it clear which bits are coming from the imports and which bits are coming from the pxd. I know it's fine to use the same name for both, but I wonder if it might be less confusing

Not sure how easy it'll be to tear both (cimport/import) apart, but it feels better to do that.
I can't say if that makes it more or less confusing for users, though. It might be easier to just always write np.something and let Cython see for itself whether that something C stuff or Python stuff. But it's definitely not obvious if you do care.

authors: da-woods scoder