text:
当存在错误日志的情况下，/tasks/{id}/error-log 仍返回为空

Bug 描述
没有错误信息提示，只有“空结果”错误提示
部分日志信息
2021-01-30 23:25:03 [scrapy.core.engine] INFO: Spider opened
2021-01-30 23:25:03 [scrapy.extensions.logstats] INFO: Crawled 0 pages (at 0 pages/min), scraped 0 items (at 0 items/min)
2021-01-30 23:25:03 [scrapy.extensions.telnet] INFO: Telnet console listening on 127.0.0.1:6023
2021-01-30 23:25:05 [user_basic] ERROR [githubspider.user_basic] : Could not resolve to a node with the global id of ''
2021-01-30 23:25:05 [scrapy.core.engine] INFO: Closing spider (finished)
2021-01-30 23:25:05 [scrapy.statscollectors] INFO: Dumping Scrapy stats:
{'downloader/request_bytes': 1004,
'downloader/request_count': 2,
'downloader/request_method_count/GET': 1,
'downloader/request_method_count/POST': 1,
'downloader/response_bytes': 1878,
'downloader/response_count': 2,
'downloader/response_status_count/200': 2,
'elapsed_time_seconds': 1.450998,
'finish_reason': 'finished',
'finish_time': datetime.datetime(2021, 1, 30, 15, 25, 5, 286471),
'log_count/ERROR': 1,

GET http://localhost:8080/api/tasks/7f081549-28c4-4a7e-80e6-cdb7cf399534/error-log
{"status":"ok","message":"success","data":null,"error":""}

截屏

可能是任务结束太快没来得及写入 error_logs

可能是任务结束太快没来得及写入 error_logs

在输出错误信息之后sleep了一下，有【日志错误】的提示了，但是 API 的返回依然为空😢

在输出错误信息之后sleep了一下，有【日志错误】的提示了，但是 API 的返回依然为空😢

弄个长一点的任务试试

大概有五个报错，每个报错之后sleep(5)，error-log还是返回为空

sys.stdout.flush()

sys.stdout.flush()

还是没有…

那很奇怪，可以贴一下实际的运行代码

import scrapy, json, time, sys
from scrapy.http import JsonRequest

class UBSpider(scrapy.Spider):
    name = 'user_basic'

    '''
    Args:
        <node_ids>
    '''

    def start_requests(self):
        nodeids = self.node_ids.split(',')
        data = {
            "query": "query ($nodeids: [ID!]!) {\
                        nodes(ids: $nodeids) {\
                            ... on User {\
                                databaseId\
                                name\
                        }}}",
            "variables": {"nodeids": nodeids},
        }

        yield JsonRequest('https://api.github.com/graphql', data=data)

    def parse(self, response):
        data = json.loads(response.body)
        if 'data' in data and 'nodes' in data['data']:
            users = data['data']['nodes']
            for user in users:
                if user:
                    yield {
                        'id': user['databaseId'],
                        'name': user['name'],
                    }
        if "errors" in data:
            errors = data['errors']
            for e in errors:
                self.logger.error("".join(('[', self.name, ']', ' : ', e['message'])))
                time.sleep(5)
                sys.stdout.flush()

-a node_ids=MDQ6VXNlcjMxMDE=,MDQ6VXNlcjkzMA==,MDQ6VXNlcjkzMw==,MDQ6VXNlcjkzOA==,MDQ6VXNlcjkwMA==,MDQ6VXNlcjkwMQ==,MDQ6VXNlcjkwMg==,MDQ6VXNlcjkwMw==,MDQ6VXNlcjkwNA==,MDQ6VXNlcjMxMTk=,MDQ6VXNlcjMxMjA=,MDQ6VXNlcjMxMjE=,MDQ6VXNlcjMxMjI=,MDQ6VXNlcjMxMjM=,MDQ6VXNlcjMxMjQ=

不能用logger，需要用print

再看了一下，其实logger和print都可以，只是error-log API 只在运行时有结果，运行后再调用就没有了

authors: YanhuiJessica tikazyq

repo: crawlab-team/crawlab


text:
I Indivisuals Checkbox for Images,Videos, Audios

Problem Description
New frontend page for images,audio and video
Solution Description
when you click any of checkbox at a time
i will call that particular api for data
Alternatives
AFTER IMPROVEMENT IT WILL LOOK LIKE THIS

Additional context

Main Motive of this is that whenever you select the type of checkbox you will get that type of data using  API which is associated with it.

Please post any frontend proposals in the corresponding repository

source: gharchive/issue

repo: creativecommons/cccatalog-api

license: MIT

license_type: permissive

license_source: github-api


text:
Blog on proposal drafting and community bonding and week 1-2

Fixes

Blog on proposal drafting and community bonding and week1-2
Checklist

[x] My pull request has a descriptive title (not a vague title like Update index.md).
[x] My pull request targets the master branch of the repository.
[x] My commit messages follow best practices.
[x] My code follows the established code style of the repository.
[ ] I added tests for the changes I made (if applicable).
[ ] I added or updated documentation (if applicable).
[x] I tried running the project locally and verified that there are no
visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@akmadian please review

source: gharchive/pull-request

authors: AyanChoudhary kgodey


text:
Cant log in to CC wordpress!

Thanks for reporting an issue, to help us file this efficiently we made this template. Feel free to ignore the template if you wish :)
If this is a bug or a problem with one of our websites or page on one of our sites, please put the URL or page address here: https://creativecommons.org:80/wordpress/wp-login.php?redirect_to=https%3A%2F%2Fcreativecommons.org%2Fwordpress%2Fwp-admin%2F&ticket=ST-1467627739r79qpKJA3ldnObVxuiK
Please tell us the steps to reproduce the problem, if needed:

There seem to be an SSL error and I cant log in to the CC WordPress to post about the public discussion. Help you mighty tech gurus! :)
Miss our little hangouts after work! See you in Berlin

Please tell us a little bit about how you're accessing the site or page, such as which web browser and which version of the browser: Firefox (latest update) and I tried from Chrome as well
(You can also vist https://aboutmybrowser.com/ which will give you a link you can share with us that'll tell us everything we need to know)
You can also attach a screenshot to this issue if you have a visual bug to report. That'll help us figure it out faster. http://www.take-a-screenshot.org/ has instructions on taking screenshots.

Finally, we're going to put someone's name here, so they get alerted to the new issue and can assign it to the right person. @mattl @little-wow

@NaeemaCC you have to remove the :80 from the URL and try again.

@NaeemaCC Once you get to this point, go back to https://creativecommons.org/wordpress/wp-admin/ and you'll be logged in.

Hello there folks... thank you for the feedback I was able to log in based on Matt advise yet it seems I don't have privileges to post content

Kindly advise
N

authors: NaeemaCC little-wow mattl


text:
Unable to Customized the Component styling in theme

Hi All, I have been trying to customized the Button default styling in theme, unfortunately I am unable to customizes some styling like padding properties.
Find the Theme code below:

export const theme = {
    button: {
        defaultProps: {
            fullWidth: true,
        },
        styles: {
                base: {
                    initial: {
                        fontWeight: "font-medium",
                        textTransform: "capitalize",
                        paddingTop: "pt-[8px]",
                        paddingBottom: "pb-[8px]"
                    }
                },
            sizes: {
                sm: {
                    fontSize: "text-[16px]",
                },
                md: {
                    fontSize: "text-[16px]",
                },
                lg: {
                    fontSize: "text-[16px]",
                },
            },
        }
    },
};

Help will be appreciated

@sangayt1997 How was this solved? could you please guide me I am trying to do similar thing?

Hello @Munaf-Divan, I think i didn't solved this one I change my packages to other like shacdn, radix-ui and headless ui

repo: creativetimofficial/material-tailwind


text:
Upgraded privacy and security modules

Upgraded privacy and security modules to support multi-class and be architecture-agnostic.
Comments to address:

Is there a benefit to the SklearnClassifier? Should we use that one when the model is a sklearn classifier?
Assessments need to be updated to show this works now for multiclass classification

Updated _get_model in security module need to be to deal with the multiclass setting.
Updates assessment codes and docs to reflect the new (relaxed) requirements.
For the attacks currently used, SklearnClassifier does not seem to have any advantages over BlackBoxClassifier as they seem to only use predict function of the classifier. But I look deeper into them (needs reviewing ART's source codes).


text:
🛑 MyTrip Connector Tourism Website is down

In d870b58, MyTrip Connector Tourism Website (https://mytripconnector.com/) was down:

HTTP code: 403
Response time: 316 ms

Resolved: MyTrip Connector Tourism Website is back up in bf83ac3.

repo: crefati/monitoring


text:
CAW-34: Update dependencies and tests

Description for 34
This updates all dependencies, includes @testing-library/react and updates tests to use it, adds a "type" generator, and various cleanup items
📋 Acceptance Criteria

Checked off by the PR Assignee(s)

[x] Update deps
[x] Include @testing-library/react
[x] Add generator for types
[x] Cleanup

👩🔬 Test Instructions

Run npm ci
Run generators and confirm they are working as expected

🔎 Reviewer Checklist

Checked off by the PR Reviewers

Required

These always need to be checked

[ ] Merge destination is correct
[ ] Code is correct as understood and conforms to quality standards
[ ] Tests have been added where appropriate (unit, visual, end-to-end)
[ ] Acceptance Criteria have been met

Roles & Responsibilities
👨💻 Assignee

Initiator of this PR (be sure to set in GitHub UI)
Addresses feedback and change requests
Merges PR once approved (usually deletes branch unless develop or release)

👩💻 Reviewer

Invited to review PR by Assignee (via GitHub UI)
Is expected to complete a review and address followup

Codecov Report

Merging #36 into develop will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           develop    #36   +/-   ##
======================================
  Coverage      100%   100%
======================================
  Files            3      2    -1
  Lines            5      3    -2
======================================
- Hits             5      3    -2

Continue to review full report at Codecov.

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

authors: codecov-io roblafeve

repo: cremalab/crema-app-web


text:
Laravel mix doesn't create dist folder

sometimes when I add a new library and npm run watch also is executing it doesn't compile new files and don't create new dist folder in public

I have the same issue. It appears that the publishAssets() function doesn't run. I fixed it by changing the output path from './public/build' to './public' (and commented out lines 38-53). Don't know if that will mess anything up in the future though.

@AndrewMast
I have found out a new thing but I don't know why. look at line 39 and 43.
for the first time that you want run npm run watch dont comment anything but after the first time comment lines 39 and 43
// mix.then(() => {
if (!mix.config.hmr) {
    process.nextTick(() => publishAseets())
  }
// });

it runs and rebuild dist folder. but for me my new changes are not affected.

authors: AndrewMast falahatiali

repo: cretueusebiu/laravel-vue-spa

license: mit

license_source: bigquery


text:
Laravel responded with only jwt token and not socialite token

This block of code previously only used to return the laravel jwt token and not the socialite token.

App\Http\Controllers\Auth\OAuthController

    /**
     * Obtain the user information from the provider.
     *
     * @param  string $driver
     * @return \Illuminate\Http\Response
     */
    public function handleCallback($provider)
    {
        $user = Socialite::driver($provider)->stateless()->user();
        $user = $this->findOrCreateUser($provider, $user);

        $this->guard()->setToken(
            $token = $this->guard()->login($user)
        );

        return view('oauth/callback', [
            'token' => $token,
            'token_type' => 'bearer',
            'expires_in' => $this->guard()->getPayload()->get('exp') - time(),
        ]);
    }

Please find my PR for the same

#301

This should possibly close all socialte issues, the vue can use the oauth_token and oauth_refresh_token to be able to use any further socialite APIs exposed by the provider.


text:
SerperDevTool is missing

Problem:
I did imports search on crewai_tools package and found that 'SerperDevTool' not exists in the crewai_tools package, despite being referenced in the documentation

Expected Behavior
SerperDevTool should be available for import from crewai_tools.
Actual Behavior
SerperDevTool is not listed among the available imports and causes an ImportError when attempting to import.
I'm planning to create a SerperDevTool function to leverage the Serper API and perform its intended function. However, before proceeding, I'd like to understand:

Is SerperDevTool intentionally removed or renamed?
Are there any existing plans to reimplement this tool?
Are there any specific guidelines or best practices I should follow when creating this tool?

Request for Guidance
Can you provide any information or issue references about the original implementation or intended functionality of SerperDevTool?

what version are you on?

I was at 0.0.6, and latest version is 2.xx.xx

authors: ombhojane theCyberTech

repo: crewAIInc/crewAI-tools


text:
Prevent initd and systemd from being scoped when a system is configured to scope everything

...unless they are explicitly allowed in a filter file; or explicitly attached to.
See: https://github.com/criblio/appscope/discussions/1488

Test steps -
on an ubuntu VM:

extract scope to /usr/lib
chmod u+s /usr/lib/libscope.so
echo "libscope.so" >> /etc/ld.so.preload
reboot VM
run a ps -ef | grep -v "{" to verify that some processes on the doNotScopeList are currently running
verify that scope inspect --all | grep -A4 "\"process\":" does not contain any of the processes from 5) above.

As a design, don't actively scope processes on the doNotScopeList, unless explicitly instructed to.  If someone adds the process name to a filter file allow list, or injects into the process, that's taken as "explicitly instructed to".

authors: jrcheli seanvaleo

repo: criblio/appscope


text:
Add TransferHeuristic

Be able to transfer Garmadon heuristics from garmadon db to Dr Elephant one

Add evolutions script to create the temp db

authors: ashangit jpbempel

repo: criteo-forks/dr-elephant


text:
Use maven frontend plugin + fix parent groupId

Use maven frontend plugin to automatically download node+npm.
Fix parent groupId error

Hi @petro-rudenko , thanks for your commit, I'll have a look at it today :)

I tested the updated build config on my machine and it builds fine, I am merging the PR. Thanks!

authors: BenoitHanotte petro-rudenko

repo: criteo/babar


text:
Return value is ignored when 'htparser_run' in case s_body_read ?

https://github.com/criticalstack/libevhtp/blob/fddb411cbe7d3b873b15801501a85655f75ad597/parser.c#L2191-L2210
It seems that the res value of function 'hook_body_run'  may overwrite by the res value of function ‘hook_on_msg_complete_run’ if p->content_len == 0. I'm not sure if this is reasonable.

You know; this showed up in a scan-build, and for whatever reason, I forgot to fix it. Thanks for bringing this up again - will have a fix later this weekend!

Fixed https://github.com/NathanFrench/libevhtp/commit/3fa62bf5ec58cf4fc461ac5558b8464b374bca67

repo: criticalstack/libevhtp


text:
channel: ready::fairness2 test is racy

The test occasionally fails in CI and locally.
Reproduce by running:
$ for (( i=1 ;; i+=1 )); do echo "*** test $i ***"; cargo test --test ready fairness || break; done

To quote @cuviper:

It seems to fail even more frequently with --release, so maybe the test just needs more allowance?

Hmm yeah that definitely looks like a fluke - statistically speaking, the test is bound to fail :)  (but we hope so rarely it never actually fails). I think bumping the threshold should do the trick.

I tried changing the assertion to
assert!(hits.iter().all(|x| x.get() > 0));

And unfortunately even that sometimes fails. I guess we'd have to increase the count?

I opened https://github.com/crossbeam-rs/crossbeam/pull/495 with the updated assertion and an increased COUNT, and that seems to not be racy for me at least.

authors: jonhoo stjepang

repo: crossbeam-rs/crossbeam


text:
Build pixel perfect Home Screen

Implement design on
https://www.figma.com/file/dWyAjkHNo1bzCeFiEkhtxv/CrossKnot?node-id=140%3A754

/assign

authors: glitchpop-frenzy kashvigarg

repo: crossknot-community/secret-dms


text:
add support for per-service endpoints in providerConfig

Signed-off-by: smcavallo smcavallo@hotmail.com
Description of your changes
See - https://github.com/crossplane/provider-aws/pull/869/files
this PR was a breaking change which broke 2 pieces of critical functionality for us:

support for IAM and API gateway in aws gov cloud
FIPS endpoint support
We are unable to use crossplane without this functionality.
The localstack implementation means that we can set the endpoint for ALL services, but our use case is that we want to be able to set endpoints on a per-service basis.
(See examples with implementation which will work in gov cloud and uses FIPS.)

The functionality introduced here is - if there is a service defined in the providerConfig which matches the service a reconciler is attempting to retrieve an awsConfig for, it will use the defined service endpoint.  Otherwise it will fall back to the default resolver.
We like this approach used in the newer endpoint implementation of being able to set endpoints in the providerConfig as opposed to the individual resource level.
Our set up - which I believe mirrors most - is that an operation/IT group manages crossplane and the provider config and individual teams implement crossplane resources.
Being able to set endpoints at the providerConfig level means that we can administratively control the endpoints and the various teams only need to worry about creating resources.
This PR provides much more control of all the endpoints and puts that control in the hands of administrators.
Fixes #
https://github.com/crossplane/provider-aws/issues/596
Replaces #
https://github.com/crossplane/provider-aws/pull/605
https://github.com/crossplane/provider-aws/pull/608
https://github.com/crossplane/provider-aws/pull/623
I have:

[X] Read and followed Crossplane's contribution process.
[X] Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Unit tests
Testing IAMRole in aws-us-gov partition without partition and endpoint - failure
Testing IAMRole in aws-us-gov partition with aws-us-gov partition and iam endpoint set - success
Testing Non-IAMRole in aws-us-gov partition with aws-us-gov partition and iam endpoint set - success

It sounds like what we need here is a way for users to override dynamic calculation of the URL specific to the service. At the same time, we already have an option to override all any calculated URLs by using Static type. Have you thought of having multiple ProviderConfigs for different services? For example, one ProviderConfig for IAM where you use Static to override the URL, one for others that can use Dynamic and separate ones as needed. I'm feeling hesitant to introduce another way of giving a static URL if there is a way we can avoid it.

@muvaf it makes sense what you're are saying and yes it is possible to achieve with multiple ProviderConfig.
In the case of FIPS endpoints it will end up requiring at least 15 ProviderConfig, which is a lot to maintain.
Also - that shifts the burden back to the developers as to which ProviderConfig they need to use when they construct a resource which we would like to avoid.

@smcavallo Are you using Composition and let developers create claims? If so, I think you should be able to put which ProviderConfig you'd like that specific managed resource to use in its template. If you'd like them to have a choice, do you think something like the following could help?
- type: CombineFromComposite
  combine:
    variables:
    - fromFieldPath: spec.claimRef.namespace
    # You can add more "fromFieldPath"s and construct the name
    # of the targeted ProviderConfig as you'd like.
    strategy: string
    string:
      fmt: "iam-config-%s" # fmt base could differ for each managed resource.
  toFieldPath: spec.providerConfigRef.name
  policy:
    fromFieldPath: Required

@smcavallo do we have any update on this MR ? I believe for aws-cn partition and iamrole for serviceaccount combination, we do need a customized way to make crossplane work.
Furthur according to
https://github.com/crossplane/provider-aws/pull/623#issuecomment-830040938
sts domain name in aws-cn parition is incorrect and the correct one may be "sts.amazonaws.com"
(See my MR for terrraform-aws-eks)
I would like to help to test iam and route in aws-cn partition.

closing -
I believe this was partially fixed by https://github.com/crossplane-contrib/provider-aws/pull/1329
and the rest was fixed by the aws-sdk-go v2 upgrade in https://github.com/crossplane-contrib/provider-aws/pull/1020

authors: muvaf smcavallo xchan

repo: crossplane-contrib/provider-aws


text:
Clean up external-name

https://github.com/benagricola/provider-cloudflare/pull/2/files#diff-1c444f5df20db13c18fcbbd6251b28e9264dea24c56e6e84fdcab592e049d4f2L75

Closing: https://www.atlassian.com/migration/assess/journey-to-cloud

Support for Server products ends on Feb. 15, 2024


text:
Add Matt Bush (mbbush) as maintainer

Description of your changes
This PR adds @mbbush as a maintainer on this repository.
Matt has an extensive record of contributing to this repo and helping those in the community.
I have:

[-] Run make reviewable test to ensure this PR is ready for review.

How has this code been tested
n/a

@ulucinar @sergenyalcin @turkenf as current maintainers I'm looking for your explicit approval to add Matt.

repo: crossplane-contrib/provider-upjet-aws


text:
Add S3 Bucket in S3 Bucket v1alpha3 api

Description of your changes
This PR aims to add Tagging feature support for the S3Bucket v1alpha3, this feature should help in terms of add tags for AWS billing purposes. Also the changes might be useful and be propagated into the next version v1beta1 release
Checklist
I have:
[✔] Run make reviewable to ensure this PR is ready for review.
[✔] Ensured this PR contains a neat, self documenting set of commits.
[✔] Updated any relevant documentation, examples, or release notes.
[ ] Updated the dependencies in app.yaml to include any new role permissions

CI failure was a flake, just retriggered 👍

Sorry that i have close and re-open the PR again to trigger the CI as i have no permission in Jenkins for replay the CI tasks

Hi @hasheddan @muvaf ,
Thanks for reviewing, all the checks have passed already, please help to merge this PR as i am not authorized

repo: crossplane/provider-aws


text:
Multiversion CRDs & Conversion Webhooks

Description of your changes

Fixes #
I have:

[ ] Read and followed Upjet's contribution process.
[ ] Run make reviewable to ensure this PR is ready for review.
[ ] Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Tested against https://github.com/ulucinar/upjet-provider-template/tree/multiversion-crds.
TODO:

[ ] Increase unit test coverage

/test-examples="examples/iam/v1beta1/role.yaml"

repo: crossplane/upjet


text:
DEPS.xwalk: Roll chromium-crosswalk (ee335c1..e6fb49d)

e6fb49d Merge pull request #394 from xzhan96/local_master
747ccca Revert "Replace WebAudio MediaCodec usage with FFmpeg" commi

BUG=XWALK-7307

@rakuco please help to review, thanks.

repo: crosswalk-project/crosswalk


text:
Task feed query rewritten

rewrote and reformatted the query to make it clearer, added two indices, fixed bug in calculating submitted tasks, and changed the hard deadline to be computed.
TODO: update min_rating upon completion of the query.

lgtm

authors: aginzberg dmorina

repo: crowdresearch/crowdsource-platform


text:
Add French locale for week granularity

Following release 0.14.6, here the French translations for week/weeks.

Codecov Report

Merging #652 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master   #652   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files           8      8
  Lines        1548   1548
  Branches      237    237
=====================================
  Hits         1548   1548

Impacted Files
Coverage Δ

arrow/locales.py
100% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

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

Codecov Report

Merging #652 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master   #652   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files           8      8
  Lines        1548   1548
  Branches      237    237
=====================================
  Hits         1548   1548

Impacted Files
Coverage Δ

arrow/locales.py
100% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

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

authors: MonsieurV codecov-io

repo: crsmithdev/arrow


text:
Document recommended approach for require statements and project structure

Hi, me again with something seemingly incomprehensible that you will no doubt easily explain away(!)
Silly example: two files, PackUnpackDefs.cr and Pacj.cr (names are intentional)
Pacj.cr content:
class Sorei
  include PackUnpackDefs

  def pack(format_str)
    each_index do |source_idx|
    end
  end
end

Trying to build will yield:
Error in ./src/crystal-pack/Pacj.cr:2: undefined constant PackUnpackDefs
Now, rename Pacj.cr to Pacl.cr, so that its name now comes alphabetically after PackUnPackDefs.cr
I can now build!
Weird limitation?

you probably have a require "./something/*" somewhere, which loads the files in filesystem order, which just happens to appear alphabetical on your system.
Crystal makes no demands on the correlation of filenames and constants they may or may not define whatsoever, there's no autoloading system at all. require reads files and those may define some constants.
So to resolve your issue properly declare the dependency on the file level, Pacl.cr depends on PackUnpackDefs.cr, so it should do a `require "./PackUnpackDefs" at the top.

I see. So, it appears that I should have posted this @ stackoverflow. Sorry about that.
I simply used crystal build  and it generates a top-level file starting with this line:
require "./crystal-pack/*"

So, in effect, a good practice would be for me to either remove this line or put my helpers classes in sub-sub directories and only leave under crystal-pack/ files that do not have same-level dependencies?

Side note: would it be possible to add to the documentation that Crystal does not support forward declarations?

Loading a batch of file isn't a bad practice, it just happens that sometimes one of the loaded file has a dependency on another file that must be loaded before, so its better to specifically require it.

Simply add the explicit requires as needed, don't invent silly folder structures.

Jonne, they are not necessarily silly. In fact, quite often a module can be broken down in files contained in a directory named after that module ( cf. Crystal's source code ;) )
Anyway, I was merely pointing out that the proper approach ought to be exposed in Crystal's documentation. Newbies like me are easily startled!

To be honest we probably didn't really settle on a "proper" approach yet. Personally I don't do any * requires at all in my projects, but merely require what's needed in each file.

I think the solution is: if you get an error about an unknown type, add a require. Is there anything concrete we need to do?

I, of course, learnt that lesson and have since been explicitly including actual file names rather than wildcard.
Nothing more to do other than maybe document that 'gotcha'

To be honest we probably didn't really settle on a "proper" approach yet. Personally I don't do any * requires at all in my projects, but merely require what's needed in each file.

I think I ran into the same issue, when doing crystal init lib foo the foo/src/foor.cr contains
require "./foo/*"

so it may not actually uncommon for new people to run into that issue
I would have definitely appreciated some workflow recommendations more than just how to crystal init, but also how to structure a crystal project so maybe when some "proper" way is defined this will be low hanging fruit
(I am not sure I actually had that exact issue but chances are)

I think StackOverflow and eternal questions and answers on the internet solves this issue. If someone runs into this they will find this and have a solution.
There's simply no way to document everything. For example Ruby has no official documentation of the language :-O
(and if we someday have time to do this, we'll do it)

What I wanted to say is, that the default should probably be changed if it leads to errors easily (the default require with the *)
Some more examples next to the method documentations could maybe be added over time, node has this figured out quite nicely IMO
Stackoverflow will probably be the biggest help in some time when there are more people (beginners) using it, right

authors: Fusion asterite jhass monouser7dig ysbaddaden

repo: crystal-lang/crystal


text:
Incorrect results of Sting#index and String#rindex.

Hi,
It seem the Sting#index and String#rindex return incorrect results, in case that searches an ascii Char in the string that includes multibyte letters.
My environment:

Crystal 0.19.4 (2016-10-21)
macOS sierra 10.12.1

Code:
# the both of the following results should be 3.
p "あいう_えお".index('_')
#=> nil
p "あいう_えお".rindex('_')
#=> nil

When String#index or String#rindex is called with the search argument that is an ascii Char, it delegates the process to #to_slice.
But, index of string is not equal with it of string.to_slice when that string includes multibyte letters.
This causes the incorrect results of File.basename and File.extname.
Those methods are calling String#rindex with '.' or File::SEPARETOR(/ or '\\').
File.basename("日本語/日本語ファイル.txt")
#=> "ル.txt"　(it shoud be "日本語ファイル.txt")

File.extname("日本語/日本語ファイル.txt")
#=> "" (it should be ".txt")

@arcage Thank you, you are totally correct! I applied this optimization recently but it was wrong, I was missing checking that the string is also made of ascii characters.

authors: arcage asterite


text:
Revert "Disallow surrogate halves in string and char literals (#10443)"

This reverts commit 395d0bf5173e51fc18f03d3854e1cd456b195c90.
Ref: https://github.com/crystal-lang/crystal/pull/10443#issuecomment-803044797

Ok, https://github.com/icyleaf/markd/pull/34 makes test-ecosytem happy. It seems there is no need for reverting this after all.

We should add a note about switching to \x escape sequence for invalid/incomplete unicode characters to the changelog and/or release post.

authors: bcardiff straight-shoota


text:
Implement File.tempfile in Crystal

This patch implements tempfile creation natively in Crystal, instead of relying on mkstemp on some platforms.
We already used a custom implementation on Windows, but it lacked reliability in case of a name collision and produced overly long file names. So the new implementation is a complete rewrite.
Resolves #12082

Somewhat related: https://github.com/crystal-lang/crystal/issues/12393. I have a draft PR that also revamps some stuff. I'll have to see if this PR fixes that as well, then could just close that other PR ideally.


text:
Print Stack Trace on undefined

current one is not helpful

Does the paper trail fix this?

^^

repo: cs-discord-at-ucf/lion


text:
revamp wopiserver

remove wopibridge, because it is now part of the wopiserver
revamp wopi server
make securityContext and resources configurable

Contributing a Chart / update to an existing Chart

[x] Run helm lint on the chart dir.
[x] (Update) Bump the Chart.yaml version before merging, to release it as a new version.
[x] (Update) If the PR includes new configurable parameters in the chart's values.yaml. Add documentation in the appropiate README.

Hi @wkloucek, good to see this, though it could have been better to base it over the previous (very old) PR at #28, which was indeed left behind... Anyway you are surely more expert than me with helm charts and configmaps, therefore I'd leave it to you to see if there's anything that could be incorporated (on a first look you did more than was done by my PR).
Concerning the configuration for the app URLs (including CodiMD but also Collabora and any other), that's correct, those URLs are now to be configured in the AppProvider sections in Reva.

Thanks @wkloucek, to me it looks good and already much better than the very outdated charts we had so far.
Therefore I closed the other PR and I'm going to merge this one. We will definitely give this chart a spin in the coming days but I'd ask @dagl to incorporate this in the ongoing TF deployment activities.

authors: glpatcern wkloucek


text:
Reimplement UnlockAndRelock

Following up https://github.com/cs3org/cs3apis/pull/183
Closes #86.

Now it should be properly streamlined: in normal cases either setlock or refreshlock is called, if a race is detected a further refreshlock call may happen. The test suite was also extended to explicitly include the unlockAndRelock case.
@micbar and @javfg please have a look.

Of course with locking things are never so simple, therefore I propose to keep this PR to the minimal implementation in order to move on and not be blocked, and postpone the refactoring/reordering of the setlock and refreshlock calls to a separate PR.
With this in mind, the Microsoft WOPI validator passes all relevant tests with xrootd as backend:

@micbar could you test against CS3 and Reva edge? For now we still don't have a proper support of parent_id in the eosfs storage driver and essentially we can't run wopiserver on top of Reva master and eos.

how do you run the validator in the UI?

how do you run the validator in the UI?

This is actually a feature of the Microsoft Cloud, and it's even their recommended way to run the test suite: you need to configure your backend to open .wopitest and .wopitestx files via Office 365. What we have is two custom mimetypes application/wopi-validator and application/wopi-validator-x mapped to those file extensions, in the storage driver config, and we have associated them to the MS Office 365 app provider, in the app provider config as well as in the gateway, so the frontend knows they can be "opened with MS Office 365".
With that, you touch a test.wopitest empty file in an empty folder and you open it in MS Office 365 to get that UI.

With that, you touch a test.wopitest empty file in an empty folder and you open it in MS Office 365 to get that UI.

ok, thanks. That works on my remote instance, but not locally 😄

@glpatcern I can run the tests sucessfully now after fixing a small bug in the DecomposedFS https://github.com/cs3org/reva/pull/3307
I think we are safe to merge now.
Finding and Question
Test group: PutRelativeFile
  Fail: PutRelativeFile.FileNameLongerThan512Chars
    CheckFileInfo, response code: 200 OK
    PutRelativeFile, response code: 306 Unused
      ExceptionValidator: Exception thrown while executing: (WebException)Timeout: The operation has timed out.
      Incorrect StatusCode. Expected: 200, Actual: 306
      Incorrect StatusCode. Expected: 400, Actual: 306
    DeleteFile, response code: 0 0

Our well-known filesystems have a 255 bytes limit on filenames. How does EOS handle it?

Our well-known filesystems have a 255 bytes limit on filenames. How does EOS handle it?

In fact EOS keeps the namespace in a dedicated metadata store, and there's no such limit. So we seamlessly pass that test :)

authors: glpatcern micbar


text:
write small files in a single request

When uploading a single chunk smaller than chunk_size do this in a single request.  This also makes small files atomic so they can be retried even in streaming mode.
Benchmark this to verify that it's faster

Anecdotally this doesn't seem to affect error rates and makes the logic more complicated

repo: cshesse/blobfile

license: Unlicense


text:
fixes #19 and #8

from Tanishq Srivastava 22BIT0205

Kindly update your forked repo as it has merge conflicts in index.css and index.html. Also put different prs for different issues.

repo: csivitu/vbay


text:
module 'pymixconsole.processors' has no attribute 'Reverb'

Hi Christian, sorry for bothering you again.
I am trying to run the demo of your code on jupyter, however I get this issue:

I have these import lines
import sys import glob import numpy as np import soundfile as sf import pymixconsole as pymc import IPython.display as ipd
Do you think you can help me with this? Thanks a lot, Max

Hey @maxgmrt, sorry about this issue. There were some updates that weren't reflected in the demo. I have gone through and made some changes to fix this, and updated the demo so all elements should be working now. Please have another go and let me know what happens. You will need to get the latest changes from the master branch and then install pymixconsole again.


text:
Device did not appear with the intermediate firmware

Here is my screen output.
pi@raspberrypi:~/tuya-convert $ ./start_flash.sh
Checking for network interface wlan0... Found.
Checking UDP port 53... Occupied by dnsmasq with PID 520.
Port 53 is needed to resolve DNS queries
Do you wish to terminate dnsmasq? [y/N] y
Attempting to stop dnsmasq.service
Checking UDP port 67... Available.
Checking TCP port 80... Available.
Checking TCP port 443... Available.
Checking UDP port 6666... Available.
Checking UDP port 6667... Available.
Checking TCP port 1883... Occupied by mosquitto with PID 507.
Port 1883 is needed to run MQTT
Do you wish to terminate mosquitto? [y/N] y
Attempting to stop mosquitto.service
Checking TCP port 8886... Available.
Detected /etc/modprobe.d/blacklist-rtl8192cu.conf
This has been known to cause kernel panic in hostapd
See https://github.com/ct-Open-Source/tuya-convert/issues/373
Do you wish to remove this file? [y/N] y
Starting AP in a screen...................
Starting web server in a screen
Starting Mosquitto in a screen
Starting PSK frontend in a screen
Starting Tuya Discovery in a screen
======================================================
IMPORTANT

Connect any other device (a smartphone or something) to the WIFI vtrust-flash
This step is IMPORTANT otherwise the smartconfig may not work!
Put your IoT device in autoconfig/smartconfig/pairing mode (LED will blink fast). This is usually done by pressing and holding the primary button of the device
Make sure nothing else is plugged into your IoT device while attempting to flash.
Press ENTER to continue

======================================================
Starting smart config pairing procedure
Waiting for the device to install the intermediate firmware
Put device in EZ config mode (blinking fast)
Sending SSID                  vtrust-flash
Sending wifiPassword
Sending token                 00000000
Sending secret                0101
................
SmartConfig complete.
Resending SmartConfig Packets
.................
SmartConfig complete.
Resending SmartConfig Packets
.................
SmartConfig complete.
Resending SmartConfig Packets
................
SmartConfig complete.
Resending SmartConfig Packets
.................
SmartConfig complete.
Resending SmartConfig Packets
.................
SmartConfig complete.
Resending SmartConfig Packets
................
SmartConfig complete.
Resending SmartConfig Packets
.................
SmartConfig complete.
Resending SmartConfig Packets
.................
SmartConfig complete.
Resending SmartConfig Packets
................
SmartConfig complete.
Resending SmartConfig Packets
..............
Device did not appear with the intermediate firmware
Check the *.log files in the scripts folder
Do you want to try flashing another device? [y/N]
smarthack-mqtt.log
smarthack-psk.log
smarthack-udp.log
smarthack-web.log
smarthack-wifi.log

Unfortunately, this device is not supported as it does not use an ESP82xx.

authors: kandissa kueblc

repo: ct-Open-Source/tuya-convert


text:
Successfully Flashed HUGOAI AWP02L-N

HUGOAI Model AWP02L-N.
https://www.amazon.com/dp/B07D9H9XCD/ref=cm_sw_em_r_mt_dp_U_9QDxCb45FJZYT
I used Tasmota Generic Module with following configuration:
GPIO0:  LED2i
GPIO2:  LED1i
GPIO13: Button1
GPIO15: Relay1
I added to Wiki list of Compatible Devices

Great, thanks a lot for contributing!


text:
Possible Directional Reconstruction Biases.

Hello,
I used ctapipe.reco.HillasReconstructor to reconstruct the directions of incoming showers. It seems to work nicely for gammas. I have the feeling the directional reconstruction for protons is biased however. While we don't really need to reconstruct proton directions correctly I think they should at least be reconstructed uniformly if you will. Look at the plot below for some comparison. It looks fine for gammas as you can see. However I would expect a much more uniform distribution for the protons.
Can anyone reproduce this issue? Maybe I'm doing things wrong.

After a discussion with @TarekHC here is some more detail.

The ctapipe.reco.HillasReconstructor class only takes the Hillas features as an input to reconstruct the direction. So there is no training on gammas or anything like that.

Both plots show the same number of points. It looks like there are less points on the right but they are simply plotted on top of each other.

BTW the x axis is in degrees for both plots

@mackaiver what cleaning did you use before doing Hillas reconstruction?
I suppose you work with prod3b files. In this production, the pointing direction corresponds to the gamma source direction, meaning that the source is right in the center of the field of view.
As a result, even with no cleaning and a random Hillas reconstruction, the average will give you (0,0) and you will believe you have made a good reconstruction. I do not know if that's what happened there but there is clearly a difference in the reconstruction because you are dealing with diffuse vs point source particles (rather than gamma vs protons).
For the direction there is no training, it is a simple geometric reconstruction at play.

Hi @mackaiver @vuillaut

I suppose you work with prod3b files. In this production, the pointing direction corresponds to the gamma source direction, meaning that the source is right in the center of the field of view.

I'm not sure what do you mean with this. Can you explain further? The source position for point gammas should be the center of the FoV while for protons it should be a 10 (? not sure) deg cone. This is what @mackaiver showed in the first left plot, which seems reasonable. The unreasonable part is that the reconstructed direction for protons is completely clustered in the center of the FoV. If the same number of events is shown in left and right, it means that there is no "cut" selecting the proton events falling close to the center of the FoV.
So my guess is that either @mackaiver has a simple bug somewhere (for example, assuming a variable means something while it really means something different), or that the direction reconstruction algorithm is wrong. Is it perhaps assuming that the source position is always in the center of the FoV?

I suppose you work with prod3b files

I do indeed.
I use the default settings for both the calibration and the cleaning.
   calibrator = CameraCalibrator(
       event_source=event_source,
   )
   for event in event_source:
       calibrator.calibrate(event)
       for telescope_id, dl1 in event.dl1.tel.items():
           mask = tailcuts_clean(camera, dl1.image[0], min_number_picture_neighbors=2)
           hillas_params = hillas_parameters(
                     camera[mask],
                     dl1.image[0, mask],
                     container=True
           )

If I remember correctly this used to work fine for prod3 Should I change anything for prod3b? Or did anything change in ctapipe in between?

As a result, even with no cleaning and a random Hillas reconstruction, the average will give you (0,0)

Yes the average will be (0, 0) I agree. However if the hillas parameters are random then the direction should be random to.

@TarekHC

Can you explain further?

Pointing is (70, 0), Source position is (70, 0)
In H.E.S.S. we do not point directly at the source but position slightly off. For example for a source at (70, 0), you would point at (71, 0).

or that the direction reconstruction algorithm is wrong. Is it perhaps assuming that the source position is always in the center of the FoV?

There is no assumption there. The direction reconstruction is done by crossing lines whose direction is given by the ellipse major axis.
@mackaiver

Yes the average will be (0, 0) I agree. However if the hillas parameters are random then the direction should be random to.

Actually not. The relevant Hillas parameter here is the ellipse direction. If directions are random, with several telescopes, you will statistically get (0, 0) as an average reconstruction (see my poor drawing skills), i.e. your pointing direction, and in this case (un)fortunately the source direction.
I learnt that the hard way trying to optimise the cleaning: it turned out the best cleaning was no cleaning at all.

However, let me stress that I do not know if this is the right explanation for your problem there. I am just saying that you might have a bad reconstruction for protons and for gammas but you cannot actually see it in this situation.

I'm not sure I follow this argument

If directions are random, with several telescopes, you will statistically get (0, 0)

While the directions are random from event to event, they are not random when several telescopes look at the same shower from multiple points. So yes, the center of mass of all red points should be at (0,0), but still this argument does not explain why the red points are not scattered much wider, does it?

I use the default settings for both the calibration and the cleaning.

those are almost certainly not correct. You need to have the right cleaning thresholds for the given camera, otherwise you'll get crazy hillas parameters.  Did you check some images to see if they look like they are reasonably clean?
Also note that the reconstruction does not necessarily give the "true" position for protons, except in cases where there are no sub-showers and the shower is very gamma-like. However, your plot does seem very strange.

So for now I assume that I have a bug. It would have come up before I suppose.

I wouldn't assume that!  it could be a bug introduced in the reco code, though I dont' see much that has changed. With limited manpower, this could be something that was overlooked (though I'm sure it did not look so bad in the past).

@dneise

While the directions are random from event to event, they are not random when several telescopes look at the same shower from multiple points. So yes, the centre of mass of all red points should be at (0,0), but still this argument does not explain why the red points are not scattered much wider, does it?

I am not talking about the event direction but about the ellipse direction. If the cleaning is very bad, whatever is the event incoming direction, the ellipses directions will be random. With n ellipses directions taken randomly, the reconstruction gives a reconstructed event direction at (0, 0), no matter the event. Therefore, all your events are reconstructed at (0, 0) - exactly what we see in the first plot from @mackaiver.
NB: (0, 0) here is the position relative to the pointing direction (i.e. centre of the field of view). In absolute in the example above, it is equal to (70, 0).

If the cleaning is very bad,
AH I missed that point entirely. Thanks

@vuillaut and @kosack I think you are correct. The Calibration and cleaning settings seem to be wrong.

Also note that the reconstruction does not necessarily give the "true" position for protons, except in cases where there are no sub-showers and the shower is very gamma-like.

Yes. And I don't need the true position. But I was expecting rather random/uniform one.

those are almost certainly not correct. You need to have the right cleaning thresholds for the given camera, otherwise you'll get crazy hillas parameters

That would certainly explain a lot. I just presumed this calibration factory thingy kind of 'normalizes' the pixel values for all cameras so the cleaning thresholds would all be the same.

Did you check some images to see if they look like they are reasonably clean?

I just checked. The cleaning does not seem to work very well. It just selects all pixels.
So all I would need to know now are the correct settings for the calibration and cleaning methods. And Also how to decide whether to use the low gain or the high gain channel. Are the correct settings  for prod3b known or even written down somewhere?

Are the correct settings for prod3b known or even written down somewhere?

Just grepping through some of the pipeline steering code, I think these are what are use (I may be wrong, but they don't look too far off).  Normally using something like "picture=10, boundary=5" should work for most cameras (other than FlashCam, which we don't yet calibrate correctly) though it may be a bit of a  harsh cut.
              {"ASTRICam": (5, 7),  # (5, 10)?
                 "FlashCam": (12, 15),
                 "LSTCam": (5, 10),  # ?? (3, 6) for Abelardo...
                 # ASWG Zeuthen talk by Abelardo Moralejo:
                 "NectarCam": (4, 8),
                 # "FlashCam": (4, 8),  # there is some scaling missing?
                 "DigiCam": (3, 6),
                 "CHEC": (2, 4),
                 "SCTCam": (1.5, 3)}

Just grepping through some of the pipeline steering code, I think these are what are use (I may be wrong, but they don't look too far off).

Awesome. Thanks for that. 🥇
Turns out I was using the correct cleaning all along. The calibration was wrong.
Things look much better. See below.

I now use r1_product='HESSIOR1Calibrator'  which seems to do the trick. So stupid mistake on my side. But maybe also an unfortunate default setting in the calibrator.
Thanks for your input everybody.

The cleaning values should be valid (not necessarily optimal, but not too
bad) if the integrated pulses are scaled by the calibration factors
provided by sim_telarray, i.e.   event.mc.tel[tel_id].dc_to_pe
Perhaps that factor has been omitted?  As we discussed recently in another
thread, there should be another factor (but close to 1) to convert it to
units of "single p.e. peak", if we decide to use those.
On 6 April 2018 at 16:26, Karl Kosack notifications@github.com wrote:

Are the correct settings for prod3b known or even written down somewhere?
Just grepping through some of the pipeline steering code, I think these
are what are use (I may be wrong, but they don't look too far off).
Normally using something like "picture=10, boundary=5" should work for most
cameras (other than FlashCam, which we don't yet calibrate correctly)
though it may be a bit of a harsh cut.
          {"ASTRICam": (5, 7),  # (5, 10)?
             "FlashCam": (12, 15),
             "LSTCam": (5, 10),  # ?? (3, 6) for Abelardo...
             # ASWG Zeuthen talk by Abelardo Moralejo:
             "NectarCam": (4, 8),
             # "FlashCam": (4, 8),  # there is some scaling missing?
             "DigiCam": (3, 6),
             "CHEC": (2, 4),
             "SCTCam": (1.5, 3)}

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/cta-observatory/ctapipe/issues/697#issuecomment-379269927,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANghOjz1eSKBDUWMKpscu9LGuTJgJbhJks5tl3sYgaJpZM4TJzBq
.

--
Abelardo Moralejo Olaizola
Institut de Física d'Altes Energies
Tel : +34 931641662
Fax: +34 935811938
Avís - Aviso - Legal Notice - (LOPD) - http://legal.ifae.es
--
Avís -
Aviso - Legal Notice - (LOPD) - http://legal.ifae.es
http://legal.ifae.es/

Perhaps that factor has been omitted?

That factor is included in the HESSIOR1Calibrator

Thats very confusing. That functionality is tested for in ctapipe.calib.camera.tests.test_calibrator:
def test_eventsource_r1():
    dataset = get_dataset("gamma_test.simtel.gz")
    eventsource = HESSIOEventSource(input_url=dataset)
    calibrator = CameraCalibrator(eventsource=eventsource)
    assert isinstance(calibrator.r1, HESSIOR1Calibrator)

Ah. Then maybe it is because I'm not using HESSIOEventSource. Here is my code

    event_source = EventSourceFactory.produce(
        input_url=input_file,
    )

    calibrator = CameraCalibrator(
        event_source=event_source,
        r1_product='HESSIOR1Calibrator',
    )

AH! you specified "event_source", is there somewhere else (an example?) with that mistake that you copied from?

is there somewhere else (an example?) with that mistake that you copied from?

Yes. This came from some discussion on the whole 'tools' and 'factory' business. I think there was also an issue somewhere where we discussed this. Can't find it right now. But his PR uses it for example #661. So we could go ahead and blame @MaxNoe for the whole thing if you like :stuck_out_tongue_winking_eye:

AH! you specified "event_source" instead of "eventsource", is there somewhere else (an example?) with that mistake that you copied from?

That's something we should fix... certainly it's a bug if it accepts an incorrect parameter name (or at least it's not expected behavior).

authors: TarekHC dneise kosack mackaiver moralejo vuillaut watsonjj

repo: cta-observatory/ctapipe


text:
Update the computed file size after replace

After doing a search and replace, update the computed file size.

This has been done.

repo: ctc-oss/daffodil-vscode


text:
getUsername does not resolve referenced field's value

We are using KeePass for tracking service account credentials per application in our environment. It is possible, we will have the same user/pass for multiple applications--but our system requires a unique KeePass entry. As a result, we've tried out adding new entries that have the Username and Password fields referenence an existing/master entry. In the KeePass UI, you'll see the value for the stored Username (or Password or whatever field you're adding reference too) is something in the form of {REF:U@I:36F89B594FD7664E89E62E8CE220129A}. Once we started doing that, our automation broke (that is using the OpenKeePass library) because the usernames & passwords returned weren't the linked values but the links themselves, ie: {REF:U@I:36F89B594FD7664E89E62E8CE220129A}.
I've done my best to dig into the code and don't see any support for this concept. Is it possible to add the ability to resolve the value if an Entry has a linked reference?
Example:
Title: Item 1, Username: masterUser, UUID 36F89B594FD7664E89E62E8CE220129A
Title: Item 2, Username: {REF:U@I:36F89B594FD7664E89E62E8CE220129A}
When doing database.getEntryByTitle("Item 2").getUsername(); it would be nice to have masterUser returned.
Thanks!

Interesting! I was not even aware that this feature exists :) I need to look into the concept to see how it should work. Depending on the required effort I will decide if I will support it.

authors: chrisnelson cternes

repo: cternes/openkeepass


text:
关于dubbo在apollo的配置

我发现dubbo的相关配置（例如zookeeper注册中心的地址等）放在apollo配置中心的时候是不行的，他不会做任何事情，但是把配置放在application.properties的时候是可以的，是不是因为apollo的配置的获取时间在dubbo的服务发现和注册之后导致的呢

和dubbo的集成之前不少人用过的，应该是没问题的，建议看一下日志，确定一下是否配置根本就没加载下来。

我也相同碰到这个问题,把apollo的配置放到本地application.properties是没有问题的,但从apollo配置中心去拉取数据,定义的端口数据都正确拿到,但dubbo的相关配置,例如,注册中心的地址,扫描包的路径,都拿不到.看日志只有加载apollo的日志信息,无其它dubbo相关的日志输出.

要不提供个demo项目我们看一下吧。

@nobodyiam 试了几次还是不行,我上传了一个示例,地址:https://github.com/anymijun/springboot-dubbo-demo 麻烦帮忙看看,非常感谢.

@anymijun 看了一下，是因为你使用的这个spring-boot-starter-dubbo在启动阶段就从env中读取配置了，所以你需要使用apollo的bootstrap阶段注入配置功能
简单而言，如果你的配置都是放在application这个namespace下的话，那么只需要在项目中application.properties中增加一行如下配置即可，我本地测试是OK的。
apollo.bootstrap.enabled=true

没回来看这个评论-m-其实后来我调试了一下，在dubbo的服务提供注册和服务消费注册的关键代码打了断点，发现当配置在application.peoperites中时，启动工程的时候注册过程是正常执行的，但是放在apollo之后，注册的关键代码是不执行的。这就意味着dubbo的服务和消费的注册过程是在读取apollo配置之前，但是却在读取application.properties之后（实际上application.properties和apollo配置读取的顺序也是是这样的先后顺序），后来我就用了apollo的bootstrap阶段注入配置功能，就如上面所说，在项目中application.properties加入apollo.bootstrap.enabled=true，也行不通，对了，apollo用的是0.10.0，dubbo是2.8.5（好像也叫dubbox？忘记了）改天再把dubbo部分整理成demo发一下吧-m-正考虑换springcloud了-m-

@nobodyiam 非常感谢,之前采用这种方式配置过,但发现没生效,今天清理了缓存,并重新clean install ,发现可以了.非常感谢...  @ab91963931372 我这边也是采用dubbo的2.8.5版本,目前是正常的了.谢谢

@anymijun @ab91963931372 0.10.0正式release版本是提供了bootstrap阶段注入配置功能的，你们之前可能用的是0.10.0-SNAPSHOT版本吧？

用的0.10.2版本，在application.properties里面增加了apollo.bootstrap.enabled=true dubbo还是无法扫描进来

我用我的方法解决了，参考了spring-cloud-config-client的BootstrapApplicationListener，在ApolloApplicationContextInitializer类上增加了@Order(Ordered.HIGHEST_PRECEDENCE)，把优先级调整到最高，@nobodyiam 希望参考一下spring-cloud-config-client优化一下吧

一样的问题，加了apollo.bootstrap.enabled=true 还是不行。

还是不行呀

@liliang8858  可以参考这个问题，https://github.com/ctripcorp/apollo/issues/1184

@BossYi 你已经解决了？

@liliang8858 建议使用xml配置Dubbo，注入和注册服务用注解，不会有问题

@BossYi 这样配置吗？

@liliang8858 http://dubbo.apache.org/books/dubbo-user-book/configuration/xml.html 参考文档

@liliang8858
spring boot dubbo和apollo结合的使用可以参考 https://github.com/ctripcorp/apollo-use-cases/tree/master/spring-boot-dubbo

#1102 已经解决，原因是使用了非dubbo官方的starter所致。
case先关闭了，如还有问题，可以提供更多信息，或进群交流。

我也出现这个问题了 看日志是dubbo加载配置在apollo拉取配置之前 导致dubbo的配置项都无效 @nobodyiam 帮忙看看呗
[10-22 20:39:34,930] INFO [main] LoggerFactory[?] - using logger: com.alibaba.dubbo.common.logger.slf4j.Slf4jLoggerAdapter
[10-22 20:39:34,936] INFO [main] WelcomeLogoApplicationListener[53] -
:: Dubbo Spring Boot (v0.2.0) : https://github.com/apache/incubator-dubbo-spring-boot-project
:: Dubbo (v2.6.2) : https://github.com/apache/incubator-dubbo
:: Google group : dev@dubbo.incubator.apache.org
[10-22 20:39:34,939] INFO [main] OverrideDubboConfigApplicationListener[68] - Dubbo Config was overridden by externalized configuration {}
:: Spring Boot ::        (v2.0.4.RELEASE)
[10-22 20:39:35,152] INFO [main] DefaultApplicationProvider[85] - App ID is set to 20001 by app.id property from System Property
[10-22 20:39:35,155] INFO [main] DefaultServerProvider[108] - Environment is set to [DEV] by JVM system property 'env'.

authors: BossYi SymonLin ab91963931372 anymijun liliang8858 nobodyiam steveguoshao

repo: ctripcorp/apollo


text:
hot to use redux

can show me some example for redux

how to use it by redux 😂😂😂😂

Hi @ckken
You can definitely add redux.  I have done so on an extended version myself, however, this is still in private development for now.
Looking at the forks of this project there are a couple which have implemented redux.  For example:
https://github.com/varmil/react-universally/tree/redux
I hope this helps.

thanks

authors: ckken ctrlplusb

repo: ctrlplusb/react-universally


text:
Adding native git support (instead of http)

Suggested by Anton (when pulling shared repos):
git@github.com:ctuning/...

Added support for any protocol. Just change current default URL (https://github.com) to any, i.e. git://github.com, using:

ck setup kernel --git

Any protocol can still be used if url is specified directly, i.e.

ck pull repo:ck-autotuning --url=git://github.com/ctuning/ck-autotuning

repo: ctuning/ck


text:
Tedi/onboarding

Overview
This PR onboards the Cornell Data Journal onto the Volume platform. In a coming PR, I plan to onboard The 180, Resolved, Cornell Lunatic, Cornell Creatives, and Cornell Business Review. I am using this PR as a test.(Also waiting on assets from some publications)
Changes Made
-publications.json
Test Coverage
Manual testing to check if articles from CDJ rss feed were being parsed, inserted into db, and returned.
Next Steps

Onboard remaining publications

going to merge into tedi/nsfw first.

repo: cuappdev/volume-backend


text:
Momentum, snap-to and one item at a time

Hi,
In my application, I had to fake the iPad springboard swipe paging behavior. So if I swipe with high momentum, it would swipe to next page (and snap to) and if i scroll to 1/3 of the screen, it would come back to it's initial place (in springboard it's 50%).
So my problem: if i put the momentum ON -> it will swipe on 2-3 page depending of the momentum and then snap-to. And the second problem: it would be nice to set the snapThreshold to a percent of the size of the item to scroll.
I solved the problem by modifying your code:
In the function _end:
I added your momentum calculation ouside the "if (duration < 300 && that.options.momentum) {" bracket
and i changed the snapping verification to add the absolute of the distance in X and Y of the momentum to the distance moved.
So now in my application I can do momentum swipe one item at a time.
Hope you will integrate this feature in your project!
Pierre-Luc

I'd love to see the modified code. Will you please share it?

snap for one page/item at a time!

Could anyone tell me is this feature supported in latest version ?
Thanks so much.

authors: annaocd chenqiushi plchampigny

repo: cubiq/iscroll


text:
Resource sharing performance regression

With the merging of minimize-regs and resource-sharing, resource sharing now takes way longer than it used to.

Can you explain why the generated graphs are much bigger? Or rather, how do they differ from the origin resource-sharing graphs?

authors: rachitnigam sgpthomas

repo: cucapra/calyx


text:
Improve initial setup for FuTIL

There are a lot of tools that need to be installed to get tests running properly. It would be nice to have a script / instructions with a concise list of commands to run to get everything running so that the initial setup process is simpler.

I think this is along the same lines as #376 ?

I think a quick reorganization of the Getting Started steps might be great! There are many options there, and it's not 100% clear from the current structure what you're supposed to do as a "user" of Calyx. For example, you probably do want fud, but you probably don't need the Python library installed unless you are doing something specific.
So we could just list, at the top, a sort of minimal walkthrough to getting basic stuff working (clone repo, cargo build, install deps, install fud). And then the later sections could describe what specific reasons you'd want to install other things.

authors: cgyurgyik sampsyo sgpthomas

repo: cucapra/futil


text:
fix compatibility issues with cucumber 7.3.0

Fixes a runtime issue with the newest version of cucumber-js after some changes to messages.

Thanks @jbpros!

repo: cucumber/cucumber-pretty-formatter


text:
More landing page

Is this an improvement?
Needs some CSS tweaks
I think we should add the menu to the front page.

@mattwynne I fixed the build issue. Suggesting something like this https://deploy-preview-146--cucumber.netlify.com/

Updated the example so it doesn't say 'blah' anymore

@plaindocs Yes, great improvement. We'd need a link to API page though (or remove for now?). Same for Guides.
@tsundberg Thanks for example update.

authors: mlvandijk plaindocs tsundberg


text:
Implement self-updating with --update

🤔 What's changed?
Added --update capability. Fixes #69.
⚡ What's your motivation?
Updating script manually by copying instructions from a read me is annoying. Especially when done often.
♻ Anything particular you want feedback on?
The check_up_to_date and do_update functions share a lot of code. Couldn't figure out how to make it shared.
📋 Checklist:

[x] I agree to respect and uphold the Cucumber Community Code of Conduct
[X] I've changed the behaviour of the code

[X] I have added/updated tests to cover my changes.

[X] My change requires a change to the documentation.

[X] I have updated the documentation accordingly.

[X] Users should know about my change

[X] I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

I wonder, could we redirect the content of $new_script into $current_script and then just delete $new_script, as suggested here?

Weird, I only get one failure on my machine but CI has three.

I'm not delighted with having different code per-platform, but right now I can't see a way around it. Maybe you can @aslakhellesoy?

This looks like an option:
https://superuser.com/questions/170226/standard-way-to-duplicate-a-files-permissions/170257#170257
It's musical chairs.

This works. We can make the code not-platform specific in the future.

authors: mattwynne mpkorstanje

repo: cucumber/polyglot-release


text:
cue/fmt: various formatting issues

There is an extra tab indentation in the following after cue fmt
machine_type: [
		if arch == "amd" {"n2-standard-2"},
		if arch == "arm" {"t2a-standard-2"},
		"unknown arch",
][0]

cue fmt actually turns the expected output into the unexpected (with an extra tab)
exec cue fmt file.cue
cmp file.cue golden.cue

-- file.cue --
arch: string
machine_type: [
	if arch == "amd" {"n2-standard-2"},
	if arch == "arm" {"t2a-standard-2"},
	"unknown arch",
][0]
-- golden.cue --
arch: string
machine_type: [
	if arch == "amd" {"n2-standard-2"},
	if arch == "arm" {"t2a-standard-2"},
	"unknown arch",
][0]

If you remove the [0] from the end, it no longer has the extra tab indentation

Here's another one
exec cue fmt file.cue
cmp file.cue golden.cue

-- file.cue --
_foo: {
	#tool: string
	#arch: string

	// skip_create_image: true
}
-- golden.cue --
_foo: {
	#tool: string
	#arch: string

	// skip_create_image: true
}

What this results in currently is an injected newline
_foo: {
	#tool: string

	#arch: string

	// skip_create_image: true
}

If I put a field at the end, then the newline is not added
_foo: {
	#tool: string
	#arch: string

	// skip_create_image: true
	foo: _
}

cue 0.7 improve some formatting situations, but in some cases it is worse:
nicer:
-	templates: [ for name, tmpl in _template {tmpl}]
+	templates: [for name, tmpl in _template {tmpl}]

not great:
 #XX: {
-	env: [string]:           string | bool | int
+	env: [string]:                                    string | bool | int
 	database: [Name=string]: #DatabaseConfig & {name: Name}

@eonpatapon I believe that bug was resolved in v0.9.0 already, but please say if not - ideally with a new issue, as it's hard to track and resolve issues which concern multiple bugs at once.
@verdverm the first of your bugs should be resolved by the stack up for review at https://review.gerrithub.io/c/cue-lang/cue/+/1196135. The second of your bugs, where definitions get separated by empty lines, appears to be this bit of code in cue/format:
			if hasDocComments(x) {
				switch x := list[i-1].(type) {
				case *ast.Field:
					if internal.IsDefinition(x.Label) {
						f.print(newsection)
					}

				default:
					f.print(newsection)
				}
			}

That is, it seems like the formatter aims to separate definitions if they contain any doc comments. In your particular example the comment should not be considered a doc comment, so I think it's an edge case bug.

authors: eonpatapon mvdan verdverm

repo: cue-lang/cue


text:
Struct upper bound

The behavior  of struct unification specified as

The successful unification of structs a and b is a new struct c which has all fields of both a and b

Cannot define an upper bound for structs. Specifically, CUE cannot help us verify that the resulting expression is limited to allowed fields.
For example, the unification
base: {
  onlyViableField: string | *"myDefault"
}

{
  base & {onlyViableFeild: "nonDefaultValue"}
}

yields
{
  onlyViableField: "myDefault"
  onlyViableFeild: "nonDefaultValue"
}

In kubernetes, the existence of extraneous fields causes failure when kubectl applys the resulting YAML, whereas in other systems the expression above could use silently use the default value erroneously.
When comparing CUE to a typed configuration language (like dhall), this is a qualitative difference in capabilities, since the extraneous field would be found by explicitly typing the result.
Extraneous fields can be hard to find - especially in large, opaque, auto-generated config schemes.

A possibility to mitigate this is the addition of strict structs - witch have the same unification rules as ordinary structs, but without the rule that merges keys - so only concretization merge is allowed.
a: !{ // '!' is the suggested strict syntax
  a1: string
}

b: {
  a1: "thing"
}

c: {
  a1: "other"
  a2: 2
}

a & b             // result: !{ a1 : "thing" }
a & c             // result: _|_
a & b & c         // result: _|_

Note that unification transitivity (a & b) & c = a & ( b & c ) requires the merge of a strict struct and a non-strict one to result in a strict version.

@pebbleKite
Yes, I'm aware of this limitation and have been looking into solutions. There are broadly three different approaches:

a Typescript approach where the maximum is inferred. For instance, the element type of a map or list would limit the allowed elements unless it explicitly allows it.
An explicit limit. This could, in turn, be limited per value, as you suggest, or per field, for instance the Haskell style:

a :: {
   // fully defined struct, anything that unifies with this has cannot add fields.
}

a full-blown usage analysis to see where values end up and flagging any values that will not eventually be used. This solution would come with a "type casting" operation to eliminate fields. For instance, to send something to K8s, one would do something like v1.Service(myService) to cast your type and remove unnecessary fields. Any unused field is flagged.

In my opinion, the first approach is preferred, but it is not entirely clear if it a) is sufficient, and b) won't be too limiting. This won't solve your particular example, for instance. Using Typescript semantics, this would be an error indeed, but there are many cases where one would want to be able to extend a struct. In fact, for the same struct one would sometimes want to add it and sometimes not. In Typescript, the workaround is that unifying two references does not trigger the check, so adding an indirection solves it. But it this would be both unclear and awkward in CUE.
But adding the check for struct and list element types would be reasonable and probably cover a lot of ground. For instance for Kubernetes, something like this:
import "k8s.io/api/core/v1" // generated with cue get go k8s.io/api/core/v1

service <name>: v1.Service

or
services: [...v1.Service]

would only allow known fields for services in that case.
Are there practical cases you can think of where this would not be sufficient?
CUE is strongly typed, btw, this part is just not (yet) covered by the type system. :)

CUE is strongly typed, btw
You're right. A better phrasing might've referred to the separation of types and values.
Are there practical cases you can think of where this would not be sufficient?
Since doing ([myVal] & [...myType])[0] as a "conversion" is functionally equivalent to the #2. (explicit type annotations), I would only comment that it might be surprising that [...x] behaves in a special way rather than the ubiquitous unification. It's a non-default behavior in a nested syntax.

@pebbleKite: thanks for your response.

Since doing ([myVal] & [...myType])[0] as a "conversion" is functionally equivalent to option 2(explicit type annotations), I would only comment that it might be surprising that [...x] behaves in a special way rather than the ubiquitous unification. It's a non-default behavior in a nested syntax.

I think I understand you point. I'm not following the non-default part, but IIUC you are basically saying that !{} would be analogous in behavior to []. That is a fair point.
Related to this: as a last syntax change before guaranteeing backwards compatibility, I'm considering unifying the syntax for map and list:

myMap <_>: string would become myMap [string]: string
server <Name>: { name: Name, ... } -> server [Name=string]: string
myList: [...string] -> myList [int]: string

This allows:

maps of integer to values (useful for supporting TypeScript, Protobuf, etc.)
unified selector notation: myMap.foo and myMay[key], but also myList.0 and myList[num]
this in turn makes selection of the nodes on the LHS more uniform, but also allows for a more natural query notation.
allows for specifying constraints on subsets: myList [>20&<30]: otherType
the name binding is used much less than I expected so this deemphasizes this and gives a better alternative for <_>.
bunch of other benefits.
I could mostly make this a backwards compatible change (with automated rewrite on format)

Anyway, this may open up some other possibilities. For instance, it would allow ditching the ... token in favor of using the same operator to close/open lists and maps. Another possibility would be an operator to explicitly allow new fields elements where they otherwise were not allowed.
Either way, I'm writing an OpenAPI 3 <-> CUE converter now (which is quite eliminating by itself) and will look in to this soon thereafter. These kind of changes are tricky, as one needs to consider carefully that commutativity, associativity and idempotence are preserved, which is not always trivial. A lot of the power of the language is derived from these properties.

CUE is strongly typed, btw

Agree. A better phrasing would refer to the separation of types and values rather than typing

would only allow known fields for services in that case.

So
myField: myValPrev
myField: myVal

would mean
myField :: myValPrev // ...and also...
myField :: myVal

rather than
myField : myValPrev & myVal`

?

The meaning of :: would be along the following lines:
For a given field name, unify all its field declarations marked ::, then unify all fields marked : where the latter are not allowed to introduce new fields.  “Template/Type” values from map and list specs mix in as ::.
In other words, :: usually means “is a”, so in this case it means the rest of this field must conform strictly to this “type”.
Note that this is not very well thought out. More a sketch based on a parallel drawn to Haskell. Not saying that this is my preferred option either, just a possibility.

See https://cue-review.googlesource.com/c/cue/+/2280 for a proposed change to the spec to support this.

Thanks for the pointer, this looks great!
If I may, I'd suggest a mention in the spec the fact that a unification with a closed struct yields a closed struct.
This follows from the definitions, but stating it explicitly might help since unification is so central.

@mpvl I have been reading through your comments on closed structs in that proposal for a spec change, and I'm curious about how we might implement something like the CloudFormation AWS::S3::Bucket type.
{
  "Type" : "AWS::S3::Bucket",
  "Properties" : {
      "AccelerateConfiguration" : AccelerateConfiguration,
      "AccessControl" : String,
      "AnalyticsConfigurations" : [ AnalyticsConfiguration, ... ],
      "BucketEncryption" : BucketEncryption,
      "BucketName" : String,
      "CorsConfiguration" : CorsConfiguration,
      "InventoryConfigurations" : [ InventoryConfiguration, ... ],
      "LifecycleConfiguration" : LifecycleConfiguration,
      "LoggingConfiguration" : LoggingConfiguration,
      "MetricsConfigurations" : [ MetricsConfiguration, ... ],
      "NotificationConfiguration" : NotificationConfiguration,
      "ObjectLockConfiguration" : ObjectLockConfiguration,
      "ObjectLockEnabled" : Boolean,
      "PublicAccessBlockConfiguration" : PublicAccessBlockConfiguration,
      "ReplicationConfiguration" : ReplicationConfiguration,
      "Tags" : [ Tag, ... ],
      "VersioningConfiguration" : VersioningConfiguration,
      "WebsiteConfiguration" : WebsiteConfiguration
    }
}

Every one of those fields is optional, but I'd like to enforce that the user not add fields beyond these fields (because it would fail when submitted to CloudFormation). How would closed/open structs interact with this?

@jlongtine the spec was just updated to explain the mechanism. Closing a struct can be done with the close builtin. In practice, however, one would use a new construct called definitions. In your case, you would write:
Bucket :: {
  "Type" : "AWS::S3::Bucket",
  "Properties" : {
      "AccelerateConfiguration" : AccelerateConfiguration,
      "AccessControl" : String,
      "AnalyticsConfigurations" : [ ....AnalyticsConfiguration ],
      // ...
  }
}

AccelerateConfigurtion :: {
    // ...

Definitions differ from regular fields in two ways; 1) they are not part of the data model, 2) any literal struct defined within the scope of a definition is closed by default. To keep a struct open use a template or ....
The spec provides embedding (similar to Go and other languages) for extending definitions.

@mpvl Sweet! I'm excited. We'll start playing with this soon!

This has been implemented.

This issue has been migrated to https://github.com/cue-lang/cue/issues/40.
For more details about CUE's migration to a new home, please see https://github.com/cue-lang/cue/issues/1078.

authors: cueckoo jlongtine mpvl pblkt pebbleKite

repo: cuelang/cue


text:
🛑 CUETCONNECT(MainSite) is down

In a4d8d7a, CUETCONNECT(MainSite) (https://cuetconnect.org/) was down:

HTTP code: 502
Response time: 1414 ms

Resolved: CUETCONNECT(MainSite) is back up in 0829c22.

repo: cuetconnect/statuspage


text:
搞个歌词哈哈哈

搞个歌词哈哈哈

歌词无法实现暂不考虑~

authors: alibaba-jackma cuifengcn

repo: cuifengcn/TAICHI-flet


text:
Update dependencies 2022 12 21

What

Update dependencies
Updates cached mods

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

repo: cujarrett/destiny-insights-frontend


text:
Default parameters don't work

Apply default parameters for ParamItem.

Fixed in v0.3.0


text:
cupy raw kernel cannot handle view of cupy ndarray

Description
When feeding a view of cupy ndarray into a kernel, for example, a slice of a big ndarray, the result looks like the kernel read the original big ndarray not a slice of it.
To Reproduce
import cupy as cp
x = cp.arange(10, dtype=cp.complex64).reshape(2,5)

show = cp.RawKernel(r'''
#include <cuComplex.h>

extern "C" __global__
void show(const cuFloatComplex* x, const int N){
  int i = blockDim.x * blockIdx.x + threadIdx.x;

  if(i == 0 ){
      printf("%f\n",cuCrealf(x[N]));
  }
}
''', 'show')

When call the kernel:
show((2,), (5,), (x,cp.int32(6)))
cp.cuda.runtime.deviceSynchronize()

It will print:
6.000000

But if feed a slice of x:
x_slice = x[:,:4]
show((2,), (5,), (x_slice,cp.int32(6)))
cp.cuda.runtime.deviceSynchronize()

It also print:
6.000000

which is not as wanted.
However, if a copy is fed:
x_slice = x[:,:4].copy()
show((2,), (5,), (x_slice,cp.int32(6)))
cp.cuda.runtime.deviceSynchronize()

It print:
7.000000

as expected.
Installation
Conda-Forge (conda install ...)
Environment
OS                           : Linux-3.10.0-1127.18.2.el7.x86_64-x86_64-with-glibc2.17
Python Version               : 3.9.13
CuPy Version                 : 11.2.0
CuPy Platform                : NVIDIA CUDA
NumPy Version                : 1.23.4
SciPy Version                : 1.9.3
Cython Build Version         : 0.29.32
Cython Runtime Version       : None
CUDA Root                    : /users/kangl/miniconda3/envs/rapids-22.10
nvcc PATH                    : /users/kangl/miniconda3/envs/rapids-22.10/bin/nvcc
CUDA Build Version           : 11020
CUDA Driver Version          : 11040
CUDA Runtime Version         : 11070
cuBLAS Version               : (available)
cuFFT Version                : 10702
cuRAND Version               : 10301
cuSOLVER Version             : (11, 4, 0)
cuSPARSE Version             : (available)
NVRTC Version                : (11, 7)
Thrust Version               : 101000
CUB Build Version            : 101000
Jitify Build Version         : 343be31
cuDNN Build Version          : None
cuDNN Version                : None
NCCL Build Version           : 21403
NCCL Runtime Version         : 21403
cuTENSOR Version             : None
cuSPARSELt Build Version     : None
Device 0 Name                : Tesla V100-SXM2-32GB
Device 0 Compute Capability  : 70
Device 0 PCI Bus ID          : 0000:15:00.0

Additional Information
No response

This is expected. When you only pass a raw pointer to a kernel, it's assumed that the array is contiguous in memory. If you want to handle views, you should also pass the array shape/strides and distribute the workload to each thread yourself. CuPy has the machinery for doing so, but I am not sure if they are considered public API. If it's simple Elementwise operation, it's better to just use ElementwiseKernel instead.

Thank you @leofang for your comments! I didn't find the public API in cupy document so I will run deep copy before feeding my RawKernel. I want each thread work on a small patch of a big array. I didn't find the way to use ElementwiseKernel. If there are any smart way to achieve, please let me know! I appreciate it!

I want each thread work on a small patch of a big array.

It's unclear to me what you intended to do. If you can show us a version that you expect to work with contiguous arrays, we might be able to suggest alternative approaches.

Thanks for your nice help! I finally find a way to implant it with elementwise kernel with the raw keyword so I don't need to bother you for this question.
I wonder if there is any easier way to index a multidimensional array? For example, the element of the diagonal of a N*N matrix a can be easily indexed by a[i,i], but in the kernel, I have to use a[i*N+i] which is not intuitive. Thanks!

Glad to know it works for you! AFAIK you need to use 1D indexing with ElementwiseKernel. It has to do how the internal machinery is designed to handle array views. Moreover, 1D indexing should be familiar for most C/C++ programmers 🙂

authors: kanglcn leofang

repo: cupy/cupy


text:
[backport] Avoid using Tensor Core with cuDNN deterministic mode in convolution backward

Backport of #2174

[automatic post] Jenkins, test this please.

Jenkins CI test (for commit cf6f2911f3ff952b3d1abfc5987f2b00af216125, target branch v6) succeeded!

LGTM.

authors: asi1024 chainer-ci niboshi


text:
Fix circular imports

Fixes CI failures.
cupyx.signal was removed in the refactor https://github.com/cupy/cupy/pull/3645. I can't fix the import path in cupy.math.misc due to circular imports, so moved some implementations from cupyx.scipy.signal to cupy.math.misc.

Jenkins, test this please.

Jenkins CI test (for commit 7dc604dea34f343b050c49041560d57f22688496, target branch master) failed with status FAILURE.

Jenkins, test this please.

Jenkins, test this please
(Seems that CI got stuck)

Jenkins CI test (for commit 7dc604dea34f343b050c49041560d57f22688496, target branch master) succeeded!

authors: asi1024 chainer-ci emcastillo