Adapters for popular libraries

I think it would be great to have examples/blueprints/helpers for popular libraries that can be used with sloth. For example, it would be great to have a simple RequestTransport and Router-Adapter for libraries like http4s and akka-http that covers the basic use-cases.
I have done this in a very opinionated way in https://github.com/cornerman/covenant for akka-http. It covers more than only basic use-cases and enforces a certain paradigm. So a question is how complex and sophisticated our implementations should be. I would like them to follow the same interface so you can still abstract over features they give you. And all implementations should provide more or less the same feature set.
We should also look at other areas than only http or websocket communication. One specific example I have, you can use sloth to abstract over messaging between your javascript website and your serviceworker. This another example I would like to provide.
Should these helper libraries live in this repo or should they be decoupled from it? Is it more of an example or a full-fledged adapter than can handle a lot configurations?

Hi @cornerman!
I was happy to discover your excellent Sloth library and have been working the last few days to make some adoptions/adapters for Play ScalaJS that you can check out from https://github.com/marcgrue/play-scalajs where I have also made a similar adoption using the https://github.com/lihaoyi/autowire library.
As you can see I made a maven-published version of some minimal boilerplate code and then two more projects, one using the dependency and the other including the files. I'm wiring with both Ajax and WebSocket.
I did the most basic and simple implementations I could come up with to make the essential moving parts as clear as possible. I think it would great and helpful if you would consider to make similar implementations for other frameworks as you contemplate in the above comment! For me it was hard to "see through" for instance the Zio mechanics - have never worked with it, and I'm not a FP shark ;-)
I'm really happy to have achieved an end-user simplification by using Sloth compared to using Autowire, like for instance calling the api with foo.incr(1) instead of foo().incr(1).call() but also in the setup.
If you have any comments to my implementations, I would be very happy to hear from you!
All the best and thanks for your efforts creating Sloth!
/ Marc

I've just made an ammonite runnable demo for my co-workers at @deal-engine using Twitter Finagle Mux as transport.
https://twitter.com/oeiuwq/status/1469094434344218628
If anyone is interested, we could try extracting an adapter for finagle mux.
We previously used covenant on Scala.js for consuming an akka-http API. But this time we are creating an internal service where we care about re-using connections as much as possible and fast serialization (without using an IDL since our service will expose large legacy api interfaces - wich Sloth is pretty much happy to generate stubs for)

We have started with a sloth-jsdom-client, sloth-http4s-client and sloth-http4s-server packages in this repository. See readme: https://github.com/cornerman/sloth?tab=readme-ov-file#integrations


feat: migrate to typescript

This is initial Pull Request with the goal of having brand new, simplified API & native TS support. The change contains few main areas:

I've used the code from @partheseas fork as suggested, with some clean up in the structure
I've re-did the build system to fit TS package management - using rollup to build the bundle
Repo structure has been changed - we don't need monorepo for the 2 projects here, and it would only mean pain in the release process, considering the e2e package was private and without dependencies
I've started with some basic e2e test of the current implementation: simple main & render thread stores synced together and the counter component that updates visuals on both render & main
Added typescript types compatibility test agains basic redux usage. We also should consider extending it with applyMiddleware and other usages that might be breaking.
And ofc GH action to build & test it all so far.

Target branch of this PR is v2 - follow up PRs would setup the semantic-release to help with the deployment process and the v2 branch would be considered an alpha version.
The code itself from my look at it is still rough on the edges and needs some work, I've even added some TODO: comments in the most obvious places, but overall I believe the goal should to be to polish it on the v2 branch with incremental refactors/fixes/tests.

:tada: This PR is included in version 2.0.0-alpha.1 :tada:
The release is available on:

npm package (@alpha dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


data format

This is a very innovative and interesting work that has given me a lot of inspiration. I would like to understand the dataset format for the t2i task. Thank you very much for sharing.

Hi!
Thanks for the interest in our work.
The T2I dataset is defined here:
https://github.com/saiboxx/chexray-diffusion/blob/d6d3ffebb07d210be776f9c673743f3f0f2dfd57/cheff/machex.py#L69
A single entry is basically an image and a string.
The text is then tokenized via the BERT tokenizer beforen being passed to the model: https://github.com/saiboxx/chexray-diffusion/blob/d6d3ffebb07d210be776f9c673743f3f0f2dfd57/cheff/ldm/modules/encoders/modules.py#L101
Did that help you or are you looking for something specific?
Cheers,
Tobias


error with dumpscript on a specific model

Hi,
So I'm trying to use dumpscript, but when I use it on a specific app (core), I get the following output:

(venv) ~/managym$ python manage.py dumpscript core > model_dumps/core.py
Processing model: core.models.Company
Processing model: core.models.CompanyOption
Processing model: core.models.Client
Traceback (most recent call last):
File "manage.py", line 21, in
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/home/jean/managym/venv/lib/python3.8/site-packages/django/core/management/init.py", line 401, in execute_from_command_line
utility.execute()
File "/home/jean/managym/venv/lib/python3.8/site-packages/django/core/management/init.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/jean/managym/venv/lib/python3.8/site-packages/django/core/management/base.py", line 330, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/jean/managym/venv/lib/python3.8/site-packages/django/core/management/base.py", line 371, in execute
output = self.handle(*args, **options)
File "/home/jean/managym/venv/lib/python3.8/site-packages/django_extensions/management/utils.py", line 62, in inner
ret = func(self, *args, **kwargs)
File "/home/jean/managym/venv/lib/python3.8/site-packages/django_extensions/management/commands/dumpscript.py", line 117, in handle
self.stdout.write(str(script))
File "/home/jean/managym/venv/lib/python3.8/site-packages/django_extensions/management/commands/dumpscript.py", line 180, in str
return flatten_blocks(self.lines, num_indents=self.indent)
File "/home/jean/managym/venv/lib/python3.8/site-packages/django_extensions/management/commands/dumpscript.py", line 474, in get_lines
code.append(model_class.lines)
File "/home/jean/managym/venv/lib/python3.8/site-packages/django_extensions/management/commands/dumpscript.py", line 222, in get_lines
code += instance.lines
File "/home/jean/managym/venv/lib/python3.8/site-packages/django_extensions/management/commands/dumpscript.py", line 287, in get_lines
code_lines += self.get_waiting_list()
File "/home/jean/managym/venv/lib/python3.8/site-packages/django_extensions/management/commands/dumpscript.py", line 359, in get_waiting_list
value = get_attribute_value(self.instance, field, self.context, force=force, skip_autofield=skip_autofield)
File "/home/jean/managym/venv/lib/python3.8/site-packages/django_extensions/management/commands/dumpscript.py", line 696, in get_attribute_value
item_locator = orm_item_locator(value)
File "/home/jean/managym/venv/lib/python3.8/site-packages/django_extensions/management/commands/dumpscript.py", line 73, in orm_item_locator
v = timezone.make_aware(v)
File "/home/jean/managym/venv/lib/python3.8/site-packages/django/utils/timezone.py", line 234, in make_aware
return timezone.localize(value, is_dst=is_dst)
File "/home/jean/managym/venv/lib/python3.8/site-packages/pytz/tzinfo.py", line 318, in localize
raise ValueError('Not naive datetime (tzinfo is already set)')
ValueError: Not naive datetime (tzinfo is already set)

This appears to be something with my specific "Client" model. If it makes any difference, the model is below:
class Client(models.Model):     """     Client information     """     company = models.ForeignKey(Company, blank=True, null=True, default=1, on_delete=models.SET_NULL)     local_id = models.CharField(max_length=10, blank=True, null=True)     user = models.OneToOneField(User, blank=True, null=True, on_delete=models.SET_NULL)     name = models.CharField(max_length=150, blank=True)     email = models.EmailField(max_length=255, unique=True)     phone_number = models.CharField(max_length=50, blank=True, null=True)     photo = models.ImageField(blank=True, null=True, upload_to=picture_upload_path)     cpf = models.CharField(max_length=20, blank=True, null=True)     gender = models.CharField(max_length=1, choices=GENDER_CHOICES, default=GENDER_CHOICES[0][0], blank=True)     is_active = models.BooleanField(default=True)     is_staff = models.BooleanField(default=False)     date_joined = models.DateField(default=timezone.now)     date_created = models.DateTimeField(auto_now_add=True)     street = models.CharField(_("Street"), max_length=255, blank=True, null=True)     street_number = models.CharField(_("Street Number"), max_length=55, blank=True, null=True)     address2 = models.CharField(_("Address line 2"), max_length=255, blank=True, null=True)     neighborhood = models.CharField(_("Neighborhood"), max_length=60, blank=True, null=True)     city = models.CharField(_("City"), max_length=255, blank=True, null=True)     state = models.CharField(_("State"), max_length=2, blank=True, null=True)     postcode = models.CharField(_("Post/Zip-code"), max_length=64, blank=True, null=True)     country = models.CharField(max_length=3, default='BRA', blank=True, null=True)     parent = models.ForeignKey('self', null=True, blank=True, on_delete=models.SET_NULL)
Any ideas what could be causing this error?

I have the same error and looking at our models i think it may be caused by
models.DateTimeField(auto_now_add=True)

Think we had these kind of issues (or similar) before... (If I remember correctly that had to do with how date/times where formatted as in the dumped script)
Sadly I cannot really work on this at the moment...
If anybody can detail the issue and make a PR for this that would be much appreciated. (or if you work for a company that can sponsor this work, please contact me directly)

Related, but looks not like it would fix this issue, given that make_aware does not raise a ValueError here: https://github.com/django-extensions/django-extensions/pull/1745


StaleElementReferenceError when trying to access ElementCollection item

I'm getting StaleElementReferenceError error when trying to access element of ElementCollection which was changed/reloaded after first call was made. Unfortunately I can't share example to reproduce this issue. As possible solutions I could think of:

need to remove all stale elements at the moment we converting collection to an array
convert stale elements to StaleElement objects (when user trying to access item of Collection)

Firefox version: 50.1.0
Watri version: 6.4.0.rc1
[1] pry> res.kind_of? Watir::ElementCollection
=> true
[2] pry> res
=> #<Watir::HTMLElementCollection:0x00000001b8a8e8
 @elements=[#<Selenium::WebDriver::Element:0x..f8103bdd0046f0a86 id="{0539143b-665c-4111-918a-8f408d5ace87}">],
 @query_scope=#<Watir::Browser:0x2d8d21d20f2bbd8 url="https://example.com" title="Title">,
 @selector={:xpath=>"//uib-tab-heading[starts-with(normalize-space(text()), \"Accounts\") and contains(normalize-space(.), \"(2)\")]"}>
[3] pry> res.to_a
Selenium::WebDriver::Error::StaleElementReferenceError: Element not found in the cache - perhaps the page has changed since it was looked up
from [remote server] resource://fxdriver/modules/web-element-cache.js:9524:in `fxdriver.cache.getElementAt'

Has the number of elements in the collection decreased from initial evaluation?

I tried a few things, but can't replicate this. Please put this in your code before initializing the browser and paste the output:
Selenium::WebDriver.logger.level = :info

Selector is unique, thus number of elements is always 1
Here is the log:
2017-06-30 11:39:07 INFO Selenium -> POST session/33f053ba-2ef8-4078-96da-ac129c38d8a4/url
2017-06-30 11:39:07 INFO Selenium    >>> http://<IP_ADDRESS>:7056/hub/session/33f053ba-2ef8-4078-96da-ac129c38d8a4/url | {"url":"https://example.com"}
2017-06-30 11:27:18 INFO Selenium <- {"name":"get","sessionId":"e58c7c7f-03a7-4927-8e4d-2fed46a9ff09","status":0,"value":""}
2017-06-30 11:27:18 INFO Selenium -> POST session/e58c7c7f-03a7-4927-8e4d-2fed46a9ff09/elements
2017-06-30 11:27:18 INFO Selenium    >>> http://<IP_ADDRESS>:7056/hub/session/e58c7c7f-03a7-4927-8e4d-2fed46a9ff09/elements | {"using":"xpath","value":"//uib-tab-heading[starts-with(normalize-space(text
()), \"Service Accounts\") and contains(normalize-space(.), \"(2)\")]"}
2017-06-30 11:27:18 INFO Selenium <- {"name":"findElements","sessionId":"e58c7c7f-03a7-4927-8e4d-2fed46a9ff09","status":0,"value":[]}
2017-06-30 11:27:19 INFO Selenium -> POST session/e58c7c7f-03a7-4927-8e4d-2fed46a9ff09/elements
2017-06-30 11:27:19 INFO Selenium    >>> http://<IP_ADDRESS>:7056/hub/session/e58c7c7f-03a7-4927-8e4d-2fed46a9ff09/elements | {"using":"xpath","value":"//uib-tab-heading[starts-with(normalize-space(text
()), \"Service Accounts\") and contains(normalize-space(.), \"(2)\")]"}
2017-06-30 11:27:19 INFO Selenium <- {"name":"findElements","sessionId":"e58c7c7f-03a7-4927-8e4d-2fed46a9ff09","status":0,"value":[{"ELEMENT":"{8b4eaf16-f809-4993-a204-ab40becf7c6a}","element-6066-11
e4-a52e-4f735466cecf":"{8b4eaf16-f809-4993-a204-ab40becf7c6a}"}]}
2017-06-30 11:27:19 INFO Selenium -> GET session/e58c7c7f-03a7-4927-8e4d-2fed46a9ff09/element/%7B8b4eaf16-f809-4993-a204-ab40becf7c6a%7D/name
2017-06-30 11:27:20 INFO Selenium <- {"name":"getElementTagName","sessionId":"e58c7c7f-03a7-4927-8e4d-2fed46a9ff09","status":10,"value":{"message":"Element is no longer attached to the DOM","stackTra
ce":[{"methodName":"fxdriver.cache.getElementAt","fileName":"resource://fxdriver/modules/web-element-cache.js","lineNumber":9527,"columnNumber":24},{"methodName":"Utils.getElementAt","fileName":"file
:///tmp/webdriver-profile20170630-8436-dcus5q/extensions/fxdriver@googlecode.com/components/command-processor.js","lineNumber":9057,"columnNumber":10},{"methodName":"WebElement.getElementTagName","fi
leName":"file:///tmp/webdriver-profile20170630-8436-dcus5q/extensions/fxdriver@googlecode.com/components/command-processor.js","lineNumber":12340,"columnNumber":11},{"methodName":"DelayedCommand.prot
otype.executeInternal_/k","fileName":"file:///tmp/webdriver-profile20170630-8436-dcus5q/extensions/fxdriver@googlecode.com/components/command-processor.js","lineNumber":12877,"columnNumber":16},{"met
hodName":"DelayedCommand.prototype.executeInternal_","fileName":"file:///tmp/webdriver-profile20170630-8436-dcus5q/extensions/fxdriver@googlecode.com/components/command-processor.js","lineNumber":128
<EMAIL_ADDRESS>s","lineNumber":12824,"columnNumber":5}]}}

#to_a caches (@to_a ||= ...), so it doesn't get re-evaluated when called.
Oh that's odd... the #find_elements call is returning {"ELEMENT":"{8b4eaf16-f809-4993-a204-ab40becf7c6a}"} which shouldn't include the brackets inside the string. What version of Selenium is this? Was this working for you before? If so, what version Selenium & Watir?

Oh, this is Firefox. Update to the latest version of geckodriver & latest Firefox and see if that helps. Also is this going through a remote selenium server? If so what version?

@maybelinot do you have an update on this?

Hi @titusfortner, sorry for long silence
Unfortunately I wasn't able to check this on the latest(54) version of Firefox, getting this error when I'm trying to open a browser Watir::Browser.new :firefox. I'm running everything locally, no remote selenium servers.

Was this working for you before? If so, what version Selenium & Watir?

The problem appeared after we switched to 'watir' gem from 'watir-webdriver'

Looking deeper into this and some more info from Slack QA, I'm pretty sure this fixes the original issue: dfc9e112cd76ffdd495757d85141e36a76ee26ce. We'll get a release soon.
As for your last post, you should only get that if it was still trying to use the legacy firefox driver, which watir > 6 & selenium > 3.0 shouldn't do by default... Make sure you don't have any vestige of commonwatir, watir-classic, etc; otherwise I'm not sure.


Heroku-24: Implications of the switch to separate Linux users for build vs run images

As part of the initial Heroku-24 PR, we switched to using separate Linux users for the run and build images:
https://github.com/heroku/base-images/pull/245#discussion_r1482159182
This change was made because the spec says:

The image config's User field is set to a user with a DIFFERENT user †UID/‡SID as the build image.

This upstream spec change was made as a result of RFC-85, which proposed the change for security reasons. See also the discussion in https://github.com/buildpacks/rfcs/pull/146 and the working group recording.
The implications of the change is that at runtime the /app (or /workspace) directory and /layers directories are read-only to the default run image user. Meaning that in order to perform writes at run-time, either:

The app must write to /tmp or $HOME instead
The image must instead be run with the user that performed the build (eg docker run --user heroku-build)
A buildpack (or inline buildpack) must chmod specific directories/files as group-writeable during the build (which allows writes, since both the heroku and heroku-build users are in the same group).

This is more secure, but will mean:

Some buildpacks/apps will need changes to either switch to the /tmp and $HOME directories, or to add chmoding. For example:

https://github.com/heroku/buildpacks-nodejs/issues/800
https://github.com/heroku/buildpacks-php/issues/89
https://github.com/heroku/cnb-builder-images/actions/runs/8326016245

When debugging, people will need to explicitly switch to a different user (either locally or on Heroku) or else rebuild their app when making debugging changes.

As such it seems like quite a substantial change to make, given that we don't have control over app code, and that some ecosystems heavily rely upon writing to the app directory (for example Ruby Rails apps writing to <app>/tmp/). We could try things like having the Ruby buildpack chmod <app>/tmp/ if present, however, there is likely a long tail of other cases that will break, and the error messages are not the easiest for customers to figure out.
The spec only says SHOULD, so we could choose not to make this change. (And perhaps consider it for Heroku-26, or else make read-only images at runtime an opt-in platform feature in the future.)
However, some other platforms out there already use separate users at runtime (as seen in https://github.com/heroku/buildpacks-nodejs/issues/800), and so regardless of what we chose for Heroku, if we want our buildpacks to work elsewhere, we’ll need to make sure they do not write to /layer or the app directory. We could always test in CI that this works, even if we chose not to have separate user (and this read-only /layer and app dir) for the Heroku base images themselves.
@heroku/languages Thoughts?

I would like to preserve existing behavior of heroku-22 (same user for build and runtime) as I don't think it's tennable to support Rails apps out of the box unless I chmod the whole app dir. Even then, I would be surprised if there wasn't some edge case that wasn't uncovered.
Ideally: If we want to transition to a more restrictive set of runtime permissions, I would like some exit metrics to see what folders people interact with (though we don't have that capability today).
I'm in favor of adding some smoke tests to our various CNBs so they won't block a compliant app from running on more restrictive infrastructure.
Essentially I support Ed's position here.

I really like the security posture of not being able to write to /app or /layers at runtime. It basically means the build result is untouched by things happening at runtime, which seems correct and more secure for production images.
Not being able to write to /app is a big blocker, though. Folks will certainly be doing that (especially folks transitioning from the current Heroku platform where /app is one of the few writeable locations). It'd be really annoying for (probably a fair number of) developers to move writes to /tmp or $HOME.
If there is anyway we could make /app (and /workspace) group writeable, so runtime users could write to /app, but not /layers, that would be a decent compromise. But I'm not sure we can instruct the CNB platform to do that?
If not, I think I favor one user. I don't see the value in causing a bunch of pain (which may slow the adoption rate of Heroku CNBs) for what I view as an ivory tower security restriction.

If there is anyway we could make /app (and /workspace) group writeable, so runtime users could write to /app, but not /layers, that would be a decent compromise. But I'm not sure we can instruct the CNB platform to do that?

I don't believe there is a way to do this properly currently. It would require discussion/RFCs/spec work upstream (which is perhaps something worth doing, but IMO not something we can achieve before Heroku-24 GA).
The only workaround we could do in the meantime would be to say have Kodon adjust permissions itself, but then we lose Kodon vs Pack parity, which doesn't seem worth it.

What about an inline buildpack that adjusts permissions for /workspace that's placed at the end of all our buildpack groups?  We do something similar with the builder EOL deprecation message. It could also be toggled on/off with an environment variable for those who want that increased security.

Yeah that's mentioned here:

A buildpack (or inline buildpack) must chmod specific directories/files as group-writeable during the build (which allows writes, since both the heroku and heroku-build users are in the same group).

However, until we have system buildpacks it would be kinda clunky (eg when someone adds an unrelated buildpack so switches from the buildpack default to their own list in project.toml, the feature will stop working, unless they know to add this special buildpack to their buildpacks list too).

Oops, I picked up the thread in the middle and missed that (but had remembered you mentioning something along these lines) 😅
Despite the potential clunkiness, I think it would be an acceptable transitional step. Since option 1 (app must write to /tmp or $HOME) forces developers to adopt the increased security posture and option 2 (build and run user are the same) forces developers to adopt the decreased security posture.
Plus, we could reduce that clunkiness with documentation and by helping upstream get system buildpacks implemented.

I agree using a buildpack would be a good way for people to opt-into read-only layers/workspace, as a transitional step.
However, I'm not sure about adding to the builder (and then having it toggled via env var) - IMO it would make more sense (and avoid the footgun mentioned above) if people opted in by adding the buildpack to their buildpacks list in project.toml.
The main question we need to answer now is "what should the default behaviour be for Heroku-24?". If the answer is "same user; keep app source + layers writable for now", then we can figure out how we might offer this as opt-in later :-)

If there is anyway we could make /app (and /workspace) group writeable, so runtime users could write to /app, but not /layers, that would be a decent compromise. But I'm not sure we can instruct the CNB platform to do that?

I looked into this a bit. pack and lifecycle isn't doing anything to /workspace / /app permissions right now. pack just mounts the  local app directory into /workspace as is. So a very simple solution for a user is to run chmod g+w . once in their repo, if they want to enable writes in /workspace at runtime. This seems nice from a security standpoint, the app doesn't modify it's workspace at runtime without the developer explicitly allowing it. And users wouldn't need to run a buildpack to do this for every build.

That won't work, since Git doesn't support full file modes (it would likely get messy), but only the executable bit.

Fair enough. I'll stick with my earlier statement:
I favor one user. I don't see the value in causing a bunch of pain (which may slow the adoption rate of Heroku CNBs) for what I view as an ivory tower security restriction.


feat: add in support for http event v2

Allow more flexibility for those who don't use the build in deploy methods that would like to use API Gateway v2 event or Function URLs.
PS I borrowed the code from @middy/http-router (https://github.com/middyjs/middy/blob/main/packages/http-router/index.js#L88-L97)

Nice! Thx!

Hey, when are these changes getting published?


Handling ECP mirrors

In GitLab by @perarnau on Sep 24, 2019, 16:29
We need to figure out and document our approach to ECP mirrors and external gitlab runners.
Given the current constraints, I would recommend something using

gitlab environments
a set of protected staging/production branches
a separate ecp-ci pipeline that only runs on master and those other protected branches
a way to link external pipeline status into this gitlab instance

See this: https://docs.gitlab.com/ee/workflow/gitlab_flow.html#production-branch-with-gitlab-flow

In GitLab by @perarnau on Oct 1, 2019, 09:33
What I'd like to try:

keep master as the "production" branch. This is the branch that we should point people at if they want an updated version of the library, and updated clean docs.

Introduce a new staging protected branch. This is the branch to target all of the merge requests to. I will also activate this branch in readthedocs, for us to be able to check how the docs are building.

Keep the separate .ecp-ci.yml ECP-CI pipeline, and activate it for all protected branches.

Use gitlab environments to provide a docs environments and a link to ECP-CI pipeline results.

Regularly merge staging into master, once the ECP-CI pipelines are green.

One of the difficulty is that I don't want to end up with a gitflow (like github) process were staging becomes the default branch and we don't merge into master anymore. I can't find a way to automatically trigger a merge request though.
@NicolasDenoyelle, @iskra-anl, @Kerilk: thoughts ?

In GitLab by @NicolasDenoyelle on Oct 9, 2019, 08:08
This process of external pipeline seems to be a significant overhead...
Anyway, here is my opinion:

I agree,
It seems to me that staging branch will produce release tags. Will master only consist in releases?
I am ok with that, though it seems to be an innovative way to use master.
Can't we just run ECP-CI pipeline as a step of our pipeline when making a release/merge in master?
Also, you have to be more specific on what are the protected branches aside from staging. The constraints and implications of ECP-CI pipeline are not clear to me.
I don't know what are docs environment. My suggestion in 3. solves 4. The pipeline would show the result of ECP-CI.
Of course

I would have triggered ECP-CI pipeline on release tags creation from master branch.
I think it solves what you mention here. But as I said, I don't understand implications of ECP-CI pipeline.

In GitLab by @perarnau on Oct 9, 2019, 08:34

I don't intend to change the release/tagging process. No release tags on staging, and we should merge into master on a regular basis to avoid drifts.

we can't run the ecp-ci tests on our infrastructure, or from our gitlab, as the runners are only registered on the mirrors and we don't control them.
we can't run the ecp-ci tests on every branch, they don't want that, it costs too many node hours, and there are some security issues (any contributor on our repo becomes capable of running code on DOE systems).
if we limit the ECP-CI to master then it runs after merges, and master is not green all the time.
I only want to protect master, staging, and the releases

environments are documented here: https://docs.gitlab.com/ee/ci/environments.html it's just a link to an external resource modified by a pipeline

In GitLab by @perarnau on Oct 18, 2019, 11:07
mentioned in merge request !90

In GitLab by @perarnau on Oct 21, 2019, 09:51
Managed to make it work for readthedocs with this: https://xgitlab.cels.anl.gov/argo/aml/environments/3

In GitLab by @perarnau on Oct 25, 2019, 15:43
mentioned in merge request !71

In GitLab by @perarnau on Oct 25, 2019, 15:44
!71 and !72 were merged following this setup. I'm going to experiment with multi-pipelines triggers to see if it can improve something.


Allow passing form controller to broadcast

This allows the broadcasting of show-errors-check-validity to a specific form and not trigger all the validations.

LGTM

LGTM


pip install -r ~/digits/requirements.txt failed

I  use ubuntu 16.04 ;
xiang@xiang-X550JD:~/digits$ sudo pip install -r ~/digits/requirements.txt
The directory '/home/xiang/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/xiang/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: Pillow<=3.1.2,>=2.3.0 in /usr/lib/python2.7/dist-packages (from -r /home/xiang/digits/requirements.txt (line 1))
Requirement already satisfied: numpy<=1.11.0,>=1.8.1 in /usr/lib/python2.7/dist-packages (from -r /home/xiang/digits/requirements.txt (line 2))
Requirement already satisfied: scipy<=0.17.0,>=0.13.3 in /usr/lib/python2.7/dist-packages (from -r /home/xiang/digits/requirements.txt (line 3))
Requirement already satisfied: protobuf<=2.6.1,>=2.5.0 in /usr/lib/python2.7/dist-packages (from -r /home/xiang/digits/requirements.txt (line 4))
Requirement already satisfied: six<=1.10.0,>=1.5.2 in /usr/local/lib/python2.7/dist-packages (from -r /home/xiang/digits/requirements.txt (line 5))
Collecting requests<=2.9.1,>=2.2.1 (from -r /home/xiang/digits/requirements.txt (line 6))
Downloading requests-2.9.1-py2.py3-none-any.whl (501kB)
100% |████████████████████████████████| 501kB 2.3MB/s
Requirement already satisfied: gevent<=1.1.0,>=1.0 in /usr/lib/python2.7/dist-packages (from -r /home/xiang/digits/requirements.txt (line 7))
Collecting gevent-websocket==0.9.3 (from -r /home/xiang/digits/requirements.txt (line 8))
Downloading gevent_websocket-0.9.3-py27-none-any.whl
Requirement already satisfied: Flask==0.10.1 in /usr/lib/python2.7/dist-packages (from -r /home/xiang/digits/requirements.txt (line 9))
Requirement already satisfied: Flask-WTF<=0.12,>=0.11 in /usr/lib/python2.7/dist-packages (from -r /home/xiang/digits/requirements.txt (line 10))
Requirement already satisfied: wtforms<=2.1,>=2.0 in /usr/lib/python2.7/dist-packages (from -r /home/xiang/digits/requirements.txt (line 11))
Collecting Flask-SocketIO==2.6 (from -r /home/xiang/digits/requirements.txt (line 12))
Downloading Flask-SocketIO-2.6.tar.gz
Collecting setuptools<=20.7.0,>=3.3 (from -r /home/xiang/digits/requirements.txt (line 13))
Downloading setuptools-20.7.0-py2.py3-none-any.whl (508kB)
100% |████████████████████████████████| 512kB 2.1MB/s
Collecting lmdb==0.87 (from -r /home/xiang/digits/requirements.txt (line 14))
Downloading lmdb-0.87.tar.gz (143kB)
100% |████████████████████████████████| 153kB 4.1MB/s
Requirement already satisfied: h5py<=2.6.0,>=2.2.1 in /usr/lib/python2.7/dist-packages (from -r /home/xiang/digits/requirements.txt (line 15))
Collecting pydot<=1.0.29,>=1.0.28 (from -r /home/xiang/digits/requirements.txt (line 16))
Downloading pydot-1.0.29.tar.gz
Collecting psutil<=3.4.2,>=1.2.1 (from -r /home/xiang/digits/requirements.txt (line 17))
Downloading psutil-3.4.2.tar.gz (274kB)
100% |████████████████████████████████| 276kB 3.2MB/s
Requirement already satisfied: matplotlib<=1.5.1,>=1.3.1 in /usr/lib/python2.7/dist-packages (from -r /home/xiang/digits/requirements.txt (line 18))
Collecting scikit-fmm>=0.0.9 (from -r /home/xiang/digits/requirements.txt (line 19))
Downloading scikit-fmm-0.0.9.tar.gz (414kB)
100% |████████████████████████████████| 419kB 2.1MB/s
Requirement already satisfied: Werkzeug>=0.7 in /usr/lib/python2.7/dist-packages (from Flask==0.10.1->-r /home/xiang/digits/requirements.txt (line 9))
Requirement already satisfied: Jinja2>=2.4 in /usr/lib/python2.7/dist-packages (from Flask==0.10.1->-r /home/xiang/digits/requirements.txt (line 9))
Requirement already satisfied: itsdangerous>=0.21 in /usr/lib/python2.7/dist-packages (from Flask==0.10.1->-r /home/xiang/digits/requirements.txt (line 9))
Collecting python-socketio>=1.4 (from Flask-SocketIO==2.6->-r /home/xiang/digits/requirements.txt (line 12))
Downloading python-socketio-1.7.1.tar.gz
Collecting python-engineio>=0.9.2 (from Flask-SocketIO==2.6->-r /home/xiang/digits/requirements.txt (line 12))
Downloading python-engineio-1.2.2.tar.gz
Collecting pyparsing==1.5.7 (from pydot<=1.0.29,>=1.0.28->-r /home/xiang/digits/requirements.txt (line 16))
Downloading pyparsing-1.5.7.zip (965kB)
100% |████████████████████████████████| 972kB 1.5MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/setuptools/init.py", line 12, in
import setuptools.version
File "/usr/local/lib/python2.7/dist-packages/setuptools/version.py", line 1, in
import pkg_resources
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 72, in
import packaging.requirements
File "/usr/local/lib/python2.7/dist-packages/packaging/requirements.py", line 59, in
MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: call() takes exactly 2 arguments (1 given)
----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-x_wnAu/pyparsing/
How to fix this problem?

this is my nvidia driver
i not sure whether i install current

I'm having these same issues

I'm having the same issue. Not quite sure what the fix is yet.

Same problem. Very early in the process (first python pip install command, I think), it errors out, claiming you have to install setuptools. So if you then sudo pip install setup tools, everything works after that except for when you get to the final steps, where both final steps will fail on the pyparsing version. The pyparsing version that gets installed with setup tools is newer than what the requirements state. As a test, I tried just deleting that line out of the text file, but it didn't work. As a non-python person, that's as far as I've been able to get. I'm using an AWS instance, Ubuntu 16.04.2, and pretty much nothing installed except this stuff.

Had the same problem.
Found a workaround by reading this:
https://stackoverflow.com/questions/15951748/pydot-and-graphviz-error-couldnt-import-dot-parser-loading-of-dot-files-will
You need to modify the DIGITS/requirements.txt
Replace line:
pydot>=1.0.28,<=1.0.29
with
pydot>=1.0.28,<1.0.29
This installs pydot 1.0.28 instead of 1.0.29 which works fine with pyparsing 1.5.7 and solves the problem for me

Why is this closed? What was the solution @garygh159357

Delete the line networkx>=1.8.1 in $CAFFE_ROOT/python/requirement.txt.
Then sudo pip install -r $CAFFE_ROOT/python/requirements.txt.
Then pip install networkx, without the 'sudo'.
It seems to work for me.


After you enter Chinese characters in Obsidian and export them to a csv file, open the csv file, and all the contents are garbled characters

Describe the bug
After you enter Chinese characters in Obsidian and export them to a csv file, open the csv file, and all the contents are garbled characters
Steps to reproduce
just use Chinese
Expected behavior
Export
Are you using the mobile app?
No
Obsidian debug info
Nothing
Relevant log output
No response

@a6611035 I cannot reproduce this in 8.1.0. Could you give me some text in Chinese to try?

Related to #674

@a6611035 Please try 8.2.2 and see if the issue is resolved


Add some AsyncWrite test utilities

I wrote these as part of https://github.com/rustasync/async-compression/pull/22 to ensure the AsyncWrite wrapper there correctly handled short-writes and Pending while using an in-memory writer in tests.

Nice! LGTM.


inconsistant behavior in angular 6

Can anyone explain inconsistent behavior in Component-B when resizing the outer div?
https://stackblitz.com/edit/css-element-queries-b

You seem to be getting ERROR Error: ResizeSensor is not a constructor

yes, that is another issue which I wanted to create. But at this point focus on the css behaviour.

Just meant that the error might be causing that behaviour. If you make the after view similar to the other component it works

No, the error is not caused by that. You can comment out ResizeSensor part and see the result again...
I checked it. I spent a complete day trying to fix it. And eventually we found a work around by putting element queries in one place accessable globally i.e. style.scss

So, what's the error here? What's expected and what is the actual outcome? A bit more information would be great otherwise nobody will be able to help.

Not being good at explaining things is a problem I am facing since ages, and I guess it will stay till eternity 😉 .
What is expected?
After clicking on component-B button, what should happen is that XS columns should appear as two columns as parent div is greater than 200px. SM, MD and LG should be in rows. as their queries have been set to [min-width~="400px"], [min-width~="600px"] and [min-width~="800px"] respectively. As you try to resize the parent div, you will see that only SM and MD column are responsive while XS and LG columns are not. Although they follow same rules as SM and MD with different values ofcourse.
Here is the corrected version:
https://stackblitz.com/edit/css-element-queries-d
But it does not explain, why former (https://stackblitz.com/edit/css-element-queries-b) should not work.


Using checkers assert for integration-cli/docker_cli_events_test.go

Part of #16756
Using checkers assert for integration-cli/docker_cli_events_test.go
Signed-off-by: Mohammed Aaqib Ansari<EMAIL_ADDRESS>

@maaquib would you mind to fix @cpuguy83 comments? or we can carry your PR for you

@LK4D4 Sorry for the delay
@cpuguy83 Updated

LGTM

LGTM 🐼

Windows failure unrelated :sweat_smile:


chore(libs): update libs (jasmine, jstd, jasmine-jstd adapter)

Eventually, we decided to just update the libs, instead of using git submodules...
Updating:
jstd - 1.3.3c
jasmine - 1.1.0
jstd-jasmine adapter
Build is greeeeeeen like brad...

[angular.js] IgorMinar pushed 1 new commit to master: http://git.io/6tUiLA


Scope fixes

Hi @chebyte,
Thank you for making the gem, it's really easy to use and the code is clean to read.
I needed to be able to find tags according to scopes.
In my example I have Clients that has_many Nodes. I needed to get the Node tag count similar to all_tags method but limited to Nodes that belong to a certain Client.
I've added unit tests to cover existing functionality and added the unit tests for the functionality I added. I'm currently using bundler to pull from this repository but would prefer to use the gem. Could you please check it out and advice whether the changes can go into the gem or not?
I used ruby 1.9.2-p290 from RVM to run the tests. I updated the mongoid dependency version, as earlier versions gave me problems with my version of mongodb.
To run the tests you should be able to cd to the root directory of the project and type the following comands:
bundle install ( to update the mongoid dependencies )
rake test ( to run tests, it should show you that everything passes )
Kind Regards
Hendrik

ey thanks for this!, I just merged your code, if you need something else just tell me
cheers!


Is the rectified_flow implementation correct?

Referring to the official implementation, should vt be ground_truth minus noise?

https://github.com/gnobitab/RectifiedFlow/tree/main

This is just a target of prediction by a model, and predicting x0 - xT and xT - x0 is mathmatically the same.
What we have to keep in mind during implementation is to ensure the correct correspondence between the sign of the prediction and the sign of the values added during inference (sampling).
In this repository, the sampling of Rectified Flow is implemented here, and this corresponds to the definition of prediction target.
https://github.com/yukara-ikemiya/friendly-stable-audio-tools/blob/8bcff7280ad372e99d79b18c5b395a5b6d9c5284/stable_audio_tools/inference/sampling.py#L50

Thank you for your reply.I got it!

I saw that the library uses the discret euler solver, and some use torchdiffeq's odeint. Are there any differences between them?Is there any tensorboard or loss curve for training rectified_flow? @yukara-ikemiya

The torchdiffeq seems to provide a very general framework for ODE solvers.
If the repositories you mentioned use Euler solver in torchdiffeq, it should be equivalent to the implementation in this repository.
https://github.com/rtqichen/torchdiffeq/blob/a88aac53cae738addee44251288ce5be9a018af3/torchdiffeq/_impl/fixed_grid.py#L6

Thank you!


refactor: Migrate project to use viewLifecycleOwner in fragments to observe livedata wherever it makes sense

Fixes #1326
Changes: Change every fragment in the app that uses LiveData in some capacity to use the viewLifecycleOwner property wherever it seems appropriate. To decide where it makes sense to change the Lifecycle owner in a live data subscription, I looked at what actions are being invoked in the observer. If they are purely UI related events, I have changed it to viewLifecycleOwner.

I have tried to make as little changes as possible. Wherever a LiveData object was being observed solely for the purpose of controlling UI events (Snackbars, errors, etc), I have changed the Observer to use the fragment's view lifecycle instead.

I have tested the app after each commit to ensure nothing is being broken because of these changes.

In some places where UI events were being controlled by a live data observable but the subscription was being made in the Fragment's onCreate() method, I have moved the observer to onCreateView().

@iamareebjamal @liveHarshit I have made one commit per fragment in this PR to make it easier to review. It is ready to be squashed into one commit if you want. Please review when you can, and merge if everything looks good.

One commit per view doesn't make it easier to review because we normally see all files changed at one but thanks

Oh. Right. Still new to reviewing PRs, didn't realize that you always see all files at once. Thanks for the quick merge!


Numbers do not work in Z implementation with double-space line delimiters

When eval is called with a new line of input, it splits the input line into several double-space-delimited logical lines which are all passed to the strs argument of exec. However, this creates undesired behavior with zz z numbers; numoflist parses the entire remainder of the strs list without regard to logical-line delimiters. To fix this, I would recommend calling exec only once for each logical line in the input line.

Should be fixed.

I first split the input in a list of logical lines and exec each one of them.


Optimization Suggestion for 'torchaudio.functional.merge_tokens' Function

🚀 The feature
Optimization of the merge_tokens function in 'torchaudio.functional.merge_tokens' to leverage PyTorch's tensor operations for improved efficiency and reduced runtime.
Proposed Implementation:
def merge_tokens_optimized(tokens: torch.Tensor, scores: torch.Tensor, blank: int = 0) -> List[TokenSpan]:
    """Removes repeated tokens and blank tokens from the given CTC token sequence

    Args:
        tokens (torch.Tensor): Alignment tokens (unbatched)
        scores (torch.Tensor): Alignment scores (unbatched)
        blank (int, optional): Blank token. Defaults to 0.

    Returns:
        List[TokenSpan]: list of TokenSpan
    """

    # Compute the differences with a prepended -1
    diff = torch.diff(tokens, prepend=torch.tensor([-1], device=tokens.device))
    # Compute the change points and mask out the points where the new value is blank
    changes_wo_blank = torch.nonzero((diff != 0)).squeeze().tolist()

    tokens = tokens.tolist()
    # Create a TokenSpan for each change point.
    spans = [
        TokenSpan(token=token, start=start, end=end, score=scores[start:end].mean().item())
        for start, end in zip(changes_wo_blank[:-1], changes_wo_blank[1:])
        if (token := tokens[start]) != blank
    ]
    return spans

Motivation, pitch
While working on some CTC token sequence operations, I noticed that the current implementation of the merge_tokens function could benefit from tensor operations, potentially offering significant runtime improvements. Specifically, the current loop-based approach might be streamlined by taking advantage of PyTorch's capabilities. My tests indicate that my proposed optimization runs approximately 7 times faster over 1000 runs while producing equivalent outputs.
Alternatives
Proposed tensor-based optimization: This approach leverages PyTorch's tensor operations, eliminating explicit loops and potentially considerably reducing execution time.
Additional context
To validate the accuracy of the optimized function, a method was crafted to verify the outputs of both the original and proposed functions:
import torchaudio.functional as F
from torchaudio.functional import TokenSpan

def token_span_outputs_equal(span_list_1: List[TokenSpan], span_list_2: List[TokenSpan]) -> bool:
    """Compares two lists of TokenSpan objects for equality."""

    if len(span_list_1) != len(span_list_2):
        return False

    for span_1, span_2 in zip(span_list_1, span_list_2):
        if (
            span_1.token != span_2.token or
            span_1.start != span_2.start or
            span_1.end != span_2.end or
            abs(span_1.score - span_2.score) > 1e-6  # Allowing a small tolerance for floating-point comparisons
        ):
            return False

    return True

output_original = F.merge_tokens(aligned_tokens, alignment_scores)
output_optimized = merge_tokens_optimized(aligned_tokens, alignment_scores)

assert token_span_outputs_equal(output_original, output_optimized), "Outputs are not equivalent!"

Benchmark code:
import timeit

pytorch_time = timeit.timeit(lambda: F.merge_tokens(aligned_tokens, alignment_scores), number=1000)
new_method_time = timeit.timeit(lambda: merge_tokens_optimized(aligned_tokens, alignment_scores), number=1000)

print(f"PyTorch method: {pytorch_time}")
print(f"New method: {new_method_time}")

Output:
Pytorch method: 7.622203521430492
New method: 1.0753349959850311

Integrating this optimization could bring about significant improvements in both performance and maintainability, benefiting a broad spectrum of users.

Hi @eyalcohen308
Thanks for the suggestion. x7 improvement sounds great. Would you like to make a PR? If not I will try to find some time adopting this later.
There are unit tests for this, which you can run as (cd test && pytest torchaudio_unittest/functional/functional_cpu_test.py -k test_merge_repeated_tokens).
https://github.com/pytorch/audio/blob/0ff6d2663777a5c3df51e3ca87f327a1e597f422/test/torchaudio_unittest/functional/functional_impl.py#L1232-L1283

@mthrok I will open a PR, thanks

@eyalcohen308 Thanks it's been merged. Note that we have a release 2.1 scheduled in a couple of weeks, but the library code for release branch is finalized. So this commit will not be part of the 2.1. It will be part of 2.2.

FYI I confirm that the optimization works for CPU and CUDA

Device
CPU
CUDA

old
4.31
16.61

new
1.89
4.49

[seconds]
code
import timeit

import torch
import torchaudio.functional as F

def test(device):
    d = torch.device(device)
    tokens = torch.randint(256, (200, ), dtype=torch.int32, device=d)
    scores = torch.randn((200, ), dtype=torch.float32, device=d)
    elapsed = timeit.timeit(lambda: F.merge_tokens(tokens, scores), number=1000)
    print(f"{device}: {elapsed}")

test("cpu")
test("cuda")


Build fails in ADS when a cross-plat Legacy-style project has a new system db reference added in SSDT

Repro:

Create project in SSDT, close.
Open project in ADS, convert, close.
Open project in SSDT, add reference to master db, close.
Open project in ADS, build.

Expected:
successful build
Reality:
Build error:
File "c:\Users\benjind\.azuredatastudio-rc1\extensions\microsoft.sql-database-projects-1.0.0\BuildDirectory\Extensions\Microsoft\SQLDB\Extensions\SqlServer\160\SqlSchemas\master.dacpac" does not exist.
Already tracked in ADO as Bug 15749
Work-around:
remove and re-add reference to master db in ADS.

fixed in DacFx.Projects and the fix will get brought over when it next gets updated in STS


Validates yaml schemas from engine

uses my workflow https://github.com/PaulRitter/yaml-schema-validator to validate yaml files (so far rga & mapfiles)
as for how the workflow works, the readme on the repo should sufficiently explain it
requires https://github.com/space-wizards/RobustToolbox/pull/3089

based


Refactoring, FWI and other changes

I removed a if-else statement that was putting "1" as unit when the incoming units were "kg kg-1". pint and xclim do not understant "1" but they do understand "kg kg-1". However, there might have been a reason for this. We'll see if something breaks later on.


Update Browse Log Folder

Coverage remained the same at 34.103% when pulling 0ba80e0a5034e41c04901caee71b7548aa3fcefd on AmberMsy:logFolder into da3abef491dbccc791fa5441a5562c39d5518fbb on microsoft:master.

@debuggy Can you help to review this?


Add signed SHA256 checksums

What version of Traefik are you using (traefik version)?
doesn't matter
What is your environment & configuration (arguments, toml...)?
doesn't matter
What did you do?
Go to Releases
What did you expect to see?
file with sha256 checksums and signature file
What did you see instead?
nothing

Hashicorp does it right : https://www.hashicorp.com/security/

One corporate key findable on Keybase, and available on its public domain, with https.
One SHA256SUMS per release, built with the shasum tool
One signature file, SHA256SUMS.sig, using the official gpg key
Great doc with complete copypastable verification process

Since we have announced Traefik version 2, all releases have been included with SHA256 checksums as part of the release assets.
For this reason, I will close this issue.


contact page ready

I have solved the error of navbar where the links to other pages were not opening. Apart from that I have created a contact page for your website.

@bhumika-1127 since there is a change in overall file structure your branch is showing conflicts. Can u resolve it.

i have added the contact us page and also there were some issues with the links of the navbar inside the html-files folder. Also the issue with view menu button is solved.

Thank You @khushi-joshi-05 for merging. Kindly add a label of GSSOC'24.

@bhumika-1127 can u format the footer and make its design similar to other pages.

I have made the required change @khushi-joshi-05. As this branch is merged and the pull request is closed, I have created a new pull request with the updated changes #221 . You can accept the request from here #221 . Don't forget to add GSSOC label to that request too.

@khushi-joshi-05 Kindly add label for levels too, as it will be used for evaluating the score.


Add metrics to count jobs finished.

After some discussion, we decided it would be really neat to have the worker output a metric which counts jobs completed, which could give further insight into how many jobs we process at one time, so that we can observe our overall performance on the platform.
Preferably these would be completed jobs tagged with build images used, build infrastructure used, and "errored"/"failed"/"passed", which could also help us in the future, as we push out new build images, to see how many jobs error or fail when we push out a new build image.
The sum of these would also be useful for determining the overall performance of a build infrastructure -- seeing how quickly we're processing jobs, since we can't really see how quickly we're processing jobs from a queue which is having jobs added to it (which is our queue, in 99% of cases.)

I'm pretty sure this is covered now with #231 and the preexisting per-processor metrics.  WDYT?

This is closely related, yes, but I think that my original request here was more to get a count of overall job throughput, so that we can see if there is a spike in errored builds, or an overall unexpected trend to process fewer builds over time -- more from a job performance perspective.
Seems to me like #231 is more of a measure of per-process reliability.

That's def true regarding #231.  I can see how sending mark-based metrics for FinishState would allow us to alert on things like errored jobs crossing a threshold.

Appears solved in #232, closing.


Adding Links to resources and included

How can one add links to a resource object such as
{
    "data": {
        "type": "leads",
        "id": "29",
        "attributes": {
            "status": 0
        },
        "links": {
            "self": "localhost:4000\/leads\/29",
            "somelink": "link"
        }
    }
}

where "somelink" is the link to be added? Thanks!

https://github.com/neomerx/json-api/wiki/Links

Code example https://github.com/neomerx/json-api/blob/master/tests/Encoder/EncodeIncludedObjectsTest.php#L435
For your case it would look like
...
    'somelink' => new Link('link')
...

Have I answered you question?

Thanks for your reply. I get
Call to undefined method MySchema::linkAddTo()

Oh yeah. Sorry for incorrect example. Tests have it's own special 'development' version of schema. I'll update 'normal' example in a few minutes.

Thanks!

Example
which produces
{
    "data": {
        "type": "sites",
        "id": "1",
        "attributes": {
            "name": "JSON API Samples"
        },
        "relationships": {
            "posts": {
                "data": [
                    {
                        "type": "posts",
                        "id": "321"
                    }
                ],
                "links": {
                    "some-sublink": "http://example.com/sites/1/resource-sublink",
                    "external-link": "www.example.com"
                }
            }
        },
        "links": {
            "self": "http:\/\/example.com\/sites\/1"
        }
    },
    "included": [
        ...
    ]
}

Is good now?

Is it on purpose that links can only be added to the links of a relationship resource object? What i'm looking for is adding a link to the primary resource-objects links object. In your example that would be the links object containing
"self": "http:\/\/example.com\/sites\/1"

But maybe the link objects are not supposed to be used like that? Are they restricted to having only a self link and a related link?

Is it on purpose that links can only be added to the links of a relationship resource object? What I'm looking for is adding a link to the primary resource-objects links object. In your example that would be the links object containing
"self": "http:\/\/example.com\/sites\/1"

But maybe the link objects are not supposed to be used like that? Are they restricted to having only a self link and a related link?

links could be added to the resource as well

@kasperhelweg Does it work for you?

Yes, it works. Thanks. One final question: how would I have the links for a resource appear in included if that resource is included? Is there a way to add links to included object? There is a
protected $isShowSelfInIncluded = true;

that will show self links. But can I add other links to those objects?

Do you mean to show/hide some links depending on whether object is a main resource or included resorce?

If for example I have a resource at that looks like this
"data": {
    "type": "leads",
    "id": "29",
    "attributes": {
        "status": 0
    },
    "relationships": {
         ....
    },
    "links": {
        "self": "localhost:4000\/leads\/29",
        "other-link": "other-link"
    }
}

and I include that with another resoruce
{
    ...,
    "included": [
        "type": "leads",
        "id": "29",
        "attributes": {
            "status": 0
        },
        "relationships": {
            ....
        },
        "links": {
            "self": "localhost:4000\/leads\/29",
            "other-link": "other-link"
        }
    ]
}

But I can only see that I can set
protected $isShowSelfInIncluded = true;

which will include the self link but not other-link

I'm writing big answer. Just wait a 5-10 mins

I haven't thought about such a scenario :smile:
You can do it with a schema that behaves differently depending on main resource encoded
Naive approach
        $encoder  = Encoder::instance([
            Author::class  => AuthorSchema::class,
            Comment::class => CommentSchemaWithoutLinks::class,
        ]);

        echo $encoder->encode($author) . PHP_EOL;

// and with links for comments when main resource

        $encoder  = Encoder::instance([
            Author::class  => AuthorSchema::class,
            Comment::class => CommentSchemaWithLinks::class,
        ]);

        echo $encoder->encode($comment) . PHP_EOL;

Better approach
Schema could be dynamically initialized with Closure. And example of that could be found here
So for your question it might be something like
        $addLinksInComments = true;
        $schemaClosure = function ($factory, $container) use (&$addLinksInComments) {
            $schema = new CommentSchema($factory, $container, $addLinksInComments);
            return $schema;
        };
        $encoder  = Encoder::instance([
            Author::class  => AuthorSchema::class,
            Comment::class => CommentSchemaWithoutLinks::class,
        ]);

        echo $encoder->encode($author) . PHP_EOL;

And CommentSchema should act accord to value in $addLinksInComments

This feature might look as non-trivial. Are you OK with it or need some help?

Well, I'm not sure exactly what the example does :smiley: My problem is that I can't figure out how to define links in a schema in general. For example, when extending SchemaProvider( ) I can overwrite getAttributes( ) and getRelationships which works really well.  I'm looking for something like a getLinks( ) method that I can overwrite. Does it make sense?

I can add links to a top-level object by doing $encoder->encode($resource, $links, $meta) and I can add links to the relationships by overwriting getRelationships( ). But I just can't figure out how to define links for a resource in general.

You can't (maybe yet, I don't think it's difficult to add). Do you want Schema to have top level links that will be added to document on encoding?

Yes, something like that... If it makes sense to have that :smile:

I will create a branch and we can work on your questions. As far as I understand you've got 2 issues

Ability to set some default links that will be added to top level links when resource is encoded as main resource (Enhancement)
A working example with a Schema that could be managed. E.g. $commentSchema->setIncludeLinks(bool) and depending on that value links will be added/hidden

But if the main resource-representation contains a number of links, I guess it would make sense that those links could also be included if that resource is included with another resource? Just like all the relationships can currently be included with an included resource.

That would be cool! Yes, those are my issues :smile:

let's start from the second one

I'll be back with sample in 20 mins or so

@kasperhelweg I've found even easier way to do that. Check out this sample which addresses your second issue.

@kasperhelweg  With default top level links taken from schema there is a problem. What if encoded data is array? Should links be added and if yes which ones, first resource's or from all resources?

I'm afraid the only reasonable way to add these links is pass them to Encoder on encoding. What are your thoughts on that?

Cool. Just to be clear that we are on the same page :smile: , if I do
GET /comments/1
{
    "data": {
        "type": "comments",
        "id": "1",
        "attributes": {
            ....
        },
    "links": {
        "self": "/comments/1",
        "other-link": "other-link"
    }
}

}
would be a primary resource representation. I can easily do this by $encoder->encode($comment, $links) where $links contains the links. Now if I do
GET /posts/1
{
    "data": {
        "type": "posts",
        "id": "1",
        "attributes": {
            ....
        },
        "relationships": {
            "comment": {
                "data": {
                    "type": "comments",
                    "id": "1"
                }
            }
        },
        "links": {
            "self": "/posts/1",
        }
    },
    "included": [
        {
            "type": "comments",
            "id": "1"
            "attributes": {
                ....
            },
            "links": {
                "self": "/comments/1",
                "other-link": "other-link"
            }
        }
    ]
}

I would expect to get the exact same representation in the included section. The problem is that I can't easily do $encoder->encode($post, $links) because the links would be added to the posts object.
What I imagine is that there is simply a getLinks( ) method in SchemaProvider that I can overwrite just like getAttributes( ). Then, there might be a bool protected $isShowLinksInIncluded; that can be set on the Schema and if true, would return links like above.
I would gladly help working on this at some point.

Alternatively, maybe I could pass the links to the encoder but something like
$encoder->encode($post, $links)

where
$links  = [ 'post' => [ Link::SELF => new Link('/posts/1') ], 'comment' => [ .... ] ];
not sure if that makes sense at all...

I think you mess a bit with links. In your first example link will be added to document level but not to comment (very easy to miss).

it will look like this
{
    "links" : {
        "self" : "http://example.com/people/9"
    },
    "data" : {
        "type"       : "people",
        "id"         : "9",
        "attributes" : {
            "first_name" : "Dan",
            "last_name"  : "Gebhardt"
        },
        "links" : {
            "self" : "http://example.com/people/9"
        }
    }
}

Oh, you'r right.

OK, wrap it up.
We have solved issue with dynamic Schema, haven't we?
We found out that document top level links looks as most reasonable solution. Having them in Schema appeared interesting from the first look but it causes issues when resources are arrayed. Agreed?
Anything left unanswered?

Nope, that's all good! Thanks for the effort!!

Super. Don't forget to support the project with :star: :wink:

I will!

I have a somewhat similar situation:
{
  "data": [
    {
      "type": "domain",
      "id": "example.org",
      "attributes": {
        "name": "example.org",
        "ipV4Address": "<IP_ADDRESS>"
      },

    },
    {
      "type": "domain",
      "id": "as.com",
      "attributes": {
        "name": "as.com",
        "ipV4Address": "<IP_ADDRESS>"
      }
    }
  ]
}

and I'd like to include a links object for each resource of type domain. $encoder->withLinks won't work since it will added at the top level, nor I have relationships. Below what I would like to achieve:
{
  "data": [
    {
      "type": "domain",
      "id": "example.org",
      "attributes": {
        "name": "example.org",
        "ipV4Address": "<IP_ADDRESS>"
      },
      "links": {
          "configuration": "/domains/example.org/configuration"
      }
    },
    {
      "type": "domain",
      "id": "as.com",
      "attributes": {
        "name": "as.com",
        "ipV4Address": "<IP_ADDRESS>"
      },
      "links": {
          "configuration": "/domains/as.com/configuration"
      }
    }
  ]
}

NOTE: I just want to know if something like this is easily doable, if not I think it will have to go for a relationships entry for each resource.

Now that I think about it I don't really want to use relationships since I will be forced to resolve DNS records for the given domain and that's just to costly. I would really like to provide a link for an endpoint providing that information, should the client ever need to retrieve it.

@yoanisgil it seems the lib restricts links to 'self' only on resource level. I've looked to the spec and there is no such restriction (likely it was in earlier revisions). It could be an enhancement/bug.
If you still want to add links despite you DNS issues you can use relationships. I don't see any real difference have those links on resource level or relationship level.
Anyways thanks for spotting this issue. I'll create an enhancement for it.

Not a problem. The issue with relationships is that I don't really want to return DNS records because I will be forced to resolve them which is a rather expensive operation. That's why I just want to provide a link to an endpoint providing such information.


CLI does not work on EU residency projects

I tried using the CLI on an EU residency project but always receive the following error

An authorisation issue occurred.

After some investigation I found out that the base url for both the cma & cda client are hardcoded to the standard contentful api urls

cdn.contentful.com &
api.contentful.com

see here

https://github.com/contentful/contentful-merge/blob/86f4a3fca174eb6610ae4d4e837f5fb853199136/src/engine/client/index.ts#L64
https://github.com/contentful/contentful-merge/blob/86f4a3fca174eb6610ae4d4e837f5fb853199136/src/engine/client/index.ts#L78

Therefor it does not work for EU residency projects as these use different urls (cdn.eu.contentful.com & api.eu.contentful.com)
This is not the first time this issue occurs, it seems that many of the tools around contentful are not yet supporting EU residency projects or the configuration of the base / api urls
I tried using the base contentful-cli instead (https://github.com/contentful/contentful-cli) which exposes a "host" parameter inside the config to migrate content.
At first it didnt work with the config file, but after using the login command and updating the .contentfulrc file with the correct values I managed to get it working

This has been added in https://github.com/contentful/contentful-merge/pull/908


Take diacritics into Levenshtein distance calculation

Try out the idea that distance between a/o and å is a fraction (e.g. 0.5), same as between y, j and i (ы й и).
It might give better sorting and help if you make slight mistakes with spelling.

Resolved via search preferences.


Create branch for vaadin 10 support

Instead of a separated branch consider creating three separated projects:

vertx-vaadin-common: vertx related components, common code, vertx-vaadin abstraction
vertx-vaadin8: vaadin 8 adapter
vertx-vaadin10: vaadin 10 adapter

At every release all three artifacts will be produced and deployed with the same version.
Mostly depends on how many changes are required in router configuration for Vaadin 10

Having three libraries is a good idea I think.  I'm not sure about trying to keep the versions the same ... I understand the desire to do that, but the Vaadin 10 branch will change more frequently than the others - so you will be changing the version of vertx-vaadin8 and vertx-vaadin-common when nothing has actually changed in them.  Dependency management (Maven / Gradle) will take care of differing version numbers.

I think you're right; in this case having separated version would be a better choice.
My thought was that having a single version would simplify the automation of deployment process; but for now I think I can do it manually :smile:

@mcollovati Is this still on your TODO list? I'd love to see a vaadin10 support. 😉

@petarov This is definitely on TODO list
I already have a local branch for Vaadin 10, but I had some troubles with the integration, and then I didn't had enough time to dedicate to this project.
I hope to start working again on it in the next months

Super cool! I'll play with it this week and get back to you.

Great, thanks. Here's a link to vaadin sample app running on vertx
https://vertx-vaadin10-example.herokuapp.com/

Stuff for Vaadin flow merged into master


Chrome browser issues - some screen elements are showing up blank

Just started seeing this today - see attached screenshots - to recreate:

Build from source, access localhost:3000
Navigate UI screens - observe blank UI elements
Navigating to the "learn" screen seems to clear this up
Problems are being seen on RHEL7 with Chrome Version 54.0.2840.59 (64-bit)

@mitchharpur @dgutride either of you know what is up here.

@pmuir - the styles appear to be loading too late - I noticed quite a few scss changes coming in shortly, I'd like to wait to debug until those are complete because it could all be related.

I think https://github.com/fabric8io/fabric8-ui/pull/188 may well fix it @dgutride

@ldimaggi can you please check this on current HEAD of master or http://prod-preview.openshift.io as I think this is fixed.

Closing - verified as fixed in master.


API Reference: Remove duplicate devServer

The information for devServer config object is repeated twice in the API Reference docs.
I also would personally would like to see the default port 3000 on the example - helps greatly when searching how to change this setting. Alternative option is to mention something in the line of Change from default port 3000 in a comment line.

Awesome!


Enable compatibility with Numpy 2.0

Before submitting

[x] Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
[ ] Did you read the contributor guideline, Pull Request section? Broken link...
[ ] Did you make sure to update the docs?
[ ] Did you write any new necessary tests?

What does this PR do?
Make litdata work with NumPy 2.0 by changing np.sctypes.values() to a list of dtypes obtained from np.core.sctypes.values(). Also added NPY201 ruff lint rule and remove upper numpy<2.0 pin in requirements.txt.
Fixes #175, specifically this error:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/litdata/__init__.py", line 16, in <module>
    from litdata.processing.functions import map, merge_datasets, optimize, walk
  File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/litdata/processing/functions.py", line 30, in <module>
    from litdata.constants import _INDEX_FILENAME, _IS_IN_STUDIO, _TQDM_AVAILABLE
  File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/litdata/constants.py", line 62, in <module>
    _NUMPY_SCTYPES = [v for values in np.sctypes.values() for v in values]
  File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/numpy/__init__.py", line 397, in __getattr__
    raise AttributeError(
AttributeError: `np.sctypes` was removed in the NumPy 2.0 release. Access dtypes explicitly instead.. Did you mean: 'dtypes'?

PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃

Getting this error on Windows:
___________________ test_assert_no_header_numpy_serializer ____________________

    def test_assert_no_header_numpy_serializer():
        serializer = NoHeaderNumpySerializer()
        t = np.ones((10,))
        assert serializer.can_serialize(t)
        data, name = serializer.serialize(t)
>       assert name == "no_header_numpy:10"
E       AssertionError: assert 'no_header_numpy:11' == 'no_header_numpy:10'
E
E         - no_header_numpy:10
E         ?                  ^
E         + no_header_numpy:11
E         ?                  ^

tests\streaming\test_serializer.py:210: AssertionError
=========================== short test summary info ===========================
FAILED tests/streaming/test_serializer.py::test_assert_no_header_numpy_serializer - AssertionError: assert 'no_header_numpy:11' == 'no_header_numpy:10'

  - no_header_numpy:10
  ?                  ^
  + no_header_numpy:11
  ?                  ^
===== 1 failed, 137 passed, 53 skipped, 11 warnings in 258.70s (0:04:18) ======

Seems like np.sctypes.values() is actually platform dependent?

Hey @weiji14. Thanks for your contribution ;)
Yes, it seems numpy has a different behaviour on Windows. I will look into it.
BTW, I can also see your are contributor to https://zen3geo.readthedocs.io/en/latest/. This is such a beautiful library ;)
Now I am curious, what's your interest in LitData ?
Best,
T.C

Cool, I don't have access to a Windows computer, so this will be tricky to debug on my end. Best I can do is to do lots of pushes and figure things out on GitHub Actions :slightly_smiling_face:
And thanks for the compliment on zen3geo :smile: I've been meaning to update it, and have ideas of expanding some features, but am getting sucked into more low-level data pipeline stuff in Rust recently.
My interest with litdata was when my teammates were looking into it at https://github.com/Clay-foundation/model/issues/169 because we're fans of Lightning, so I packaged it on conda-forge, and now I'm stuck maintaining the package at https://github.com/conda-forge/litdata-feedstock (same with a few other Lightning packages) :laughing: The NumPy 2.0 compat is just something I'd like to get in to clear the backlog of updates at https://github.com/conda-forge/litdata-feedstock/pulls (not a big fan of upper pins).

Thanks for your contribution @weiji14


Website Migration to Typescript

Reason/Context

Why we need this improvement?
With current implementation of website, we are somewhat restricted with the usage of the Next v12 and Node versions. With these configurations, we are not able to harness latest features of the libraries. Also, to properly maintain the project in future, we have to set rules and guidelines on the project to scale and expand it easily and efficiently.

How will this change help?
This change will help the fellow developers, contributors and maintainers to understand and scale the project in the future by incoporating new features in website. Moreover, we may get rid of numerous cypress testing in the website.

Description
All the changes introduced with this migration idea is clearly mentioned in the Notion Doc - https://bit.ly/asyncapi-website-migrate and all the work done on the project will be tracked from the Project Management Tool, embedded in Notion. So do check it out thoroughly and contribute to the idea as per the guidelines and timelines mentioned in the tool.

All the updates related to the migration will be posted on this issue.

@akshatnema Do we have the approval from the website maintainers to work on this migration? I understand this migration will allow us to do more. I'd like to discuss more on this, contribute to the idea and might take this on if we are in agreement to migrate, make the shift and the work planned out. WDYT?

@akshatnema Do we have the approval from the website maintainers to work on this migration?

Yeah, I already discussed this with @anshgoyalevil and @derberg, and the doc has been prepared according to it.

I'd like to discuss more on this, contribute to the idea and might take this on if we are in agreement to migrate, make the shift and the work planned out. WDYT?

Yeah, you can join us and ask any of your doubts in this issue.

🙋

Hey @akshatnema, I want to join and work with the team on this issue.. may I know bit more details .. is the code change stage started or are we still in planning and defining stage that how should process go ?

Hey guys. Any update on the migration work. I can help the team with migration.

Hey @akshatnema, can I also help with some part of this issue?

Hey @akshatnema , can I join the team? I would love to work on this : )

I would also like to work on this epic!

Hello @akshatnema, I am interested in migrating TypeScript to the website. Can you guide how to proceed with this migration?

I am also interested in this Issue.

Hey Everyone, thanks for showing interest in the idea. We are currently going with limited number of contributors to track the idea in better way.
So, the current assignees for this idea are @Shurtu-gal @TRohit20 @vishvamsinh28.
Selections are done on the basis of their previous contributions inside project and organisation. Don't get demotivated here. We may increase the number of contributors working on this issue later on, based on our needs.

@akshatnema, if there is any space for additional contributors on this issue, I am confident that I would be a perfect fit.

hey @akshatnema , i can convert the remaining code to typescript , kindly assign this to me..

@akshatnema I believe this can be closed.

yes closing this issue as completed


Feature Request: Allow for dynamically setting the runDescription in the Simulation

I pass many command line options to my simulation class in order to alter each run with things like environment, number of users, ramp time, etc, but there's no way to take those command line options and use them to add text to the report that makes it clear what was run to generate the report.
It would be nice if we could set the runDescription inside the scala/java code in the simulation class.  I could then take all the command line options (or the defaults if they weren't given) and generate a string that represents the current run.  That would then make it to the report, which be a huge help as you build up lots of reports over time.
The -rd option isn't really an option for me since A) I'm not using gatling.sh and B) it would mean encoding the same information twice (once for the params itself, and once for the description which I'd like to derive from the params).

Hi,
Sorry, but that's not something we will do (nor can).
The runDescription is resolved outside and logged in the simulation.log before the Simulation gets executed.
You'll indeed have to compute it upfront.
Note: Gatling Enterprise automatically logs the Simulation parameters for each run.


someMore  firmware failure reasons

1.firmware is incompatible with existing motherboard bios model.
2.existing bios firmware has been tempered.
3.existing bios firmware has been overclocked
4.entering BIos has been protected by password
5. Battery not charging

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: ef36eff5-f40d-7c67-ede1-479da8b6d54b
Version Independent ID: 3aba5978-2f7b-529c-3598-61310997ea7b
Content: Seamless crisis prevention and recovery - Windows drivers
Content Source: windows-driver-docs-pr/bringup/seamless-crisis-prevention-and-recovery.md
Product: windows-hardware
GitHub Login: @barrygolden
Microsoft Alias: bagold

Thanks for your thoughtful comments @RAJU2529!
You have outlined several additional areas that could impact UEFI updates on a device.


Demo keyboard breaks on iPhone 8

I'm working on moving to KK 4.0 and just noticed this:

This must be fixed before the release.

This was due to space being 50%. This is incorrect. I will fix this as part of 4.0.

This was due to space being 50%. This is incorrect. I will fix this as part of 4.0.


Docs: Update contract with full specification

The current public Functions Framework contract on this GitHub repo is not complete. There are still internal decisions being made by the Google runtimes team before we can update this contract.
Once the decisions are complete, update this spec.

We did this with #9. Closing!


Feature/services

Stories for Volunteer Dashboard and View Calendar - Ref-080 and Ref-079

done another updated pull request


KfConsumer.java:86-87: ConsumerRecords wrapping up we...

The puzzle 289-af1a45bc from #289 has to be resolved:
https://github.com/eo-cqrs/eo-kafka/blob/9279eec8e503156b5b7c1a05caa0f6b231a0bdee/src/main/java/io/github/eocqrs/kafka/consumer/KfConsumer.java#L86-L87
The puzzle was created by @rultor on 08-May-23.
Estimate: 30 minutes,  role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

@0pdd thank you for reporting this. I'll assign someone to take care of it soon.

@0pdd thank you for reporting this. I'll assign someone to take care of it soon.

I see you're talking to me, but I can't reply since I'm not a chat bot.

@l3r8yJ this is your task now, please go ahead. Deadline (when this ticket should be closed) is 2023-05-18T13:32:21.104561.
Estimation here is 60 minutes, that's how much you will be paid.
Remember, you don't have to solve everything in this ticket - you can solve it partially and leave todo markers in the code, which will become future tasks.
If you have any questions don't ask me, I'm not a technical person. Open new tickets instead.
If you don't have time or simply don't want to work on this, you can always resign.

@l3r8yJ Don't forget to close this ticket before the deadline (2023-05-18T13:32:21). You are past the first half of the allowed period.

@l3r8yJ Looks like you've missed the task deadline (2023-05-18T13:32:21). You are now resigned from this task.
Please stop working on it, you will not be paid. I will assign it to someone else soon.

@h1alexbel this is your task now, please go ahead. Deadline (when this ticket should be closed) is 2023-05-28T13:42:30.725648.
Estimation here is 60 minutes, that's how much you will be paid.
Remember, you don't have to solve everything in this ticket - you can solve it partially and leave todo markers in the code, which will become future tasks.
If you have any questions don't ask me, I'm not a technical person. Open new tickets instead.
If you don't have time or simply don't want to work on this, you can always resign.

not planned yet, since the message will be the same as in original Kafka clients api

@h1alexbel thank you for resolving this ticket. I've just added it to your active invoice. You can always check all your invoices and more on the Contributor Dashboard.


Add export for TensorFlow serving

Deploying models without the TensorPack dependency is sometime
useful or even necessary (TensorFlow serving). Example is also
provided.
more details (why and how)

Now build(checkpoint) can only be called once per instance. So this class is essentially one-time-use only.
I don't know if this use case really exists, but if you move the checkpoint argument into export, you can then do the following:
e = Export(model, inputs, outputs)
e.build() # or do it in __init__
e.export(checkpoint1, export1)
# ...
e.export(checkpoint2, export2)

One last thing, could you put the file in tfutils/ instead?

You are wrong. The correct slogan is "One more thing (tm)".

What is "version"? Not used anywhere.

The old API had a versioning. I am pretty confident, they will add this also to the new one.

@PatWie hi ，Can you re-deliver a link for more details (why and how) ?The previous link is no longer accessible.

The link is offline for a good reason: There are many changes in Tensor flow and I do not want to contribute another deprecated guide.
The file
https://github.com/tensorpack/tensorpack/blob/35beb43c4b30f703f885358fd9eb2776b47378ee/examples/basics/export-model.py
Should be pretty self-explanatory. If something changes, I will provide another PR to update this file whenever necessary. The serving part (Serverside) is up-to-date and covered as well under
https://github.com/PatWie/tensorflow-cmake/tree/master/serving


Converted this.log.debug to debug

Changed this.log.debug to debug, and added the debug module to package.json dependancies.  Also I used the Atom editor and it cleaned up the white space.

Thanks for your PR. I've digged a bit into the debug issue. Could you please explain what is the exact problem with the current revision? Fakegato-history right now uses the logging function provided by homebridge.  In order to show debug messages you should call homebridge with the -D parameter. The homebridge log object is already passed to your plugin by homebridge when the constructor is called. The idea is that your plugin points its local log variable to the one passed by homebridge with a this.log = log assignment and then create a new fakegato-history object passing the reference to himself as the second parameter (Accessory). In this way calling this.log.debug within fakegato-history causes a debug message to be sent to the central homebridge logging system. Maybe it is not very clean, but I really prefer this logging system to the debug module.  The homebridge logging system prepends to your message date and time and also the name of the plugin generating the message (which is very useful if you have like me multiple plugins using fakegato, debug module will show all messages under a single fakegato label). It is also possible to use the logger to issue infos and warnings, and not only debug messages. Any suggestions to continue to use the homebridge logging system in a cleaner way?

I was getting this error when attempting to log, and hence the switch to debug
Code/homebridge-dht/node_modules/fakegato-history/fakegato-history.js:252
this.log.debug("First entry " + this.accessoryType + ": " + this.firstEntry.toString(16));
^
TypeError: Cannot read property 'debug' of undefined
at FakeGatoHistoryService.addEntry (/Users/sgracey/Code/homebridge-dht/node_modules/fakegato-history/fakegato-history.js:252:21)
at Object. (/Users/sgracey/Code/homebridge-dht/index.js:108:45)
at ChildProcess.exithandler (child_process.js:189:7)
at emitTwo (events.js:106:13)

Yes, that’s exactly the point and I really prefer the homebridge logger. I saw that in your plugins you got it to work in the present form. If you agree I will close the PR and modidy the readme to clarify that your plugin should pass through the homebrdge logger. In the future I may add an optional parameter to pass your preferred logging system, but right now I would prefer to keep it as is for compatibility and simplicity. That do you think?

Agreed


Solution for no group mark bug

It was a small bug.
https://github.com/asaf-kali/coursist/issues/106

Great, thanks


DRAFT: Add Stratified Segment data splitter

In conjunction with work being done with Innovation Days

Closing because this has been untouched for a while now.


Gitea Oath for Gitea (Multi-Instance Use Case)

Have a use case for more than one Gitea instance:

instance 1 is "inside" users, all users would be created locally on this instance
instance 2 is "inside" + "outside" users where "outside" is accounts I want to make locally on instance 2, but "inside" I want to come from instance 1 via OATH

The idea is that we have one primary organizational instance but we have multiple "outreach" instances that we bring users into so we can interact with them in similar tools (gitea) but they don't have the discoverability of our main organizational instance.

Tagging @techknowlogick as we're talking about this in Discord this evening.

Since goth supports Gitea now. That should be easy to add Gitea auth. See https://github.com/markbates/goth/pull/276 . Thanks @techknowlogick


Allow image thumbnails as well as colors for an event

Feature request: Allow image thumbnails as well as colors for an event
Versions
Angular: 1.5.8
Calendar library: 0.23.0
Browser name and version: (irrelevant)

Colors are supported at this moment. As for thumbnails - I can't really see how they would work (how big, in which view...?). @mattlewis92?
You can try and create such functionality yourself and add it to the library.

I would recommend just using a custom template for this, replacing the event dots with images etc. It's not something I plan on supporting in the core lib though.


Chore: Upgrade to Angular 13.1.0

Checklist
General

[ ] I tested all changes and their related features with all corresponding user types on a test server.
[x] I chose a title conforming to the naming conventions for pull requests.

Motivation and Context

Angular 13.1.0 has been released. We should upgrade to it.
Manual Tests

[ ] Test 1
[ ] Test 2

This is currently blocked by https://github.com/ike18t/ng-mocks/issues/1427


Added "Scroll down progress bar"

Hey @mdazfar2 | closes #608
I have added the "Scroll down progress bar" to the website
Changes I made:

Created progress.js file
Included logic to reset the scroll progress on page navigation using Next.js's usePathname hook.
Added CSS in global.css

This improves navigation efficiency and overall user experience, particularly on lengthy pages.
(Note: if we try to match background theme then the bar leads to blending issue so tried to use closest color as possible)
https://github.com/mdazfar2/HelpOps-Hub/assets/101971980/19f4d4ff-ea9c-4f73-a282-250fec3c99c8
Please review the changes and consider merging this pull request,
Also I request you to add level 2 label if possible, Thank You!!

hey @MastanSayyad it doesn't looks good as usual could you remove these all changes and try to change the color of this one:

its Vertical Scroll-bar @mdazfar2

Look at the top there is progress bar @mdazfar2

@mdazfar2 okay got it, you mean remove the scroll bar and adjust the color of vertical scroll-bar

@mdazfar2 okay got it, you mean remove the progress bar and adjust the color of vertical scroll-bar

yes @MastanSayyad

@mdazfar2 done the changes

https://github.com/mdazfar2/HelpOps-Hub/assets/101971980/badcd8bb-5d31-4e6f-b151-42450de9b919

@MastanSayyad in dark mode it doesn't change

which browser are you using? @mdazfar2

@MastanSayyad
Edge

@mdazfar2 ensure you clear your browser cache , in chrome browser it works fine, still I'll try to customize it for edge compatibilty

@mdazfar2 this should work fine, if not then try chrome browser

@mdazfar2 this should work fine, if not then try chrome browser

@MastanSayyad It is also doesn't work in chrome

In only dark mode right?

@MastanSayyad
yes

okay, got it!

@mdazfar2 this should work fine

@mdazfar2 pls merge this PR

@MastanSayyad kindly resolve your conflict then i can deploy your changes

@mdazfar2 Resolved

@mdazfar2 conflicts are resolved

hey @MastanSayyad I apologize, but I need to close this pull request for now. Please don't be discouraged! We can work together ono another issue if you want :)

It's fine, I can understand! @mdazfar2


Safari support

Description
Early safari support in the utils (browser detect), adapter-core (main switch), and specific shim.
Purpose
Support safari.

Thanks for the contribution!
This is progress, more browsers ;).
One thing though, I'd rather wait submitting this until the shim is usable. Feel free to keep adding commits here and let me know when it's ready.

hi chris,
I had though about that: when is the code "usable":
1 - after I upgrade the browser detection?
2 - after the shim is "complete" ?
3 - after safari driver is added to the selenium / travis-cl / test part ?
#1 is always good, even if you have no corresponding shim.
#2 is intrinsically flawed, since shim are never complete, and can become
incomplete with each new version of a browser, or each added browser, or
each revision of the spec. So here, going step by step is not a problem.
#3 is a bonus, but today, there is a lot more work involved in supporting
safari than chrome or FF for there reasons:

the safari driver is less mature
safari nightly need to be tested, not safari, and the driver does not
seem to make that difference out of the box
travis-cl support of maces and safari is also not mature.
so we should not wait for #3 to commit #1 and #2.

Finally, with fippo pushing commits everyday, rebasing is problematic, the
more we wait, the more likely it is I will have to manually rebase.
I would prefer to commit step by step, especially since I Do not believe
this will break anybody's code ......
On Wed, Mar 23, 2016 at 1:30 AM, Christoffer Jansson <
<EMAIL_ADDRESS>wrote:

Thanks for the contribution!
This is progress, more browsers ;).
One thing though, I'd rather wait submitting this until the shim is
usable. Feel free to keep adding commits here and let me know when it's
ready.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/webrtc/adapter/pull/242#issuecomment-200244597

--
Alex. Gouaillard, PhD, PhD, MBA
Principal Architect - Citrix, San Francisco
President - CoSMo Software Consulting, Singapore
sg.linkedin.com/agouaillard

(3) is not a blocker, Edge is still running without CI coverage. And we have had getUserMedia support for Edge without the rest of it so (2) is not either.
But I have some doubts the code works as-is.

chris, that should be usable now. I ran a full W3C test on all sorts of browsers.
fippo, FYI, I updated the W3C media stream tests. FF already score much better on mediastreamtrack APIs. You might want to take a look. Much more coming this week and next week.

Linting was disabled for most files, I've now added eslint (which we have planned to use for some time) so you will most likely hit some linting issues. So in addition to addressing my comments, please address the lint issues as well (can be run separately by invoking grunt lint). Thanks!

Ping

LGTM


handle case where conditional returns on one branch but not the other

Add support for the Rust idiom,
let x = if { expr } else { return; }

and similarly for match statements (which we internally lower into if-else).
Also: handle code that makes use of blocks implicitly returning units. Not that I expect that to be very common, but the two cases look similarly syntactically, so I wanted to make sure handling one case didn't screw up the other one. The fact that it's hard to tell them apart made some of the corner cases a little weird, but I documented the assumptions in ast_to_sst and wrote tests.

It's possible that it would be cleaner if we just do the control-flow analysis to determine if an expression will definitely not return, and skip generating all VCs after those points.

It might be that expr_to_stm_opt needs a better return type.  Instead of Some(Exp) | None, maybe it needs to return Some(Exp) | Unit | Never.
Here's another (silly) test case:
fn test() -> u32 {
    ensures(|r: u32| r < 3);
    let x: u32 = {return 1; 3};
    let y: u32 = {return 2;};
    x + y
}

This change ended up getting pretty big, as I kept running into miscellaneous bugs or missing things ...

Updated to have ast_to_sst explicitly determine whether an expression is a never-return or an implicit unit.
General clean-up and documentation in ast_to_sst.
Allow the case where a fn returns early and doesn't give a final expression
Implement loop { ... } statements (i know this one seems unrelated, but these are relevant for never-return logic, and they were pretty easy to implement)

Now, what I wanted to do, was move the post-condition emitting from sst_to_air into ast_to_sst, because all the early return statements are handled in ast_to_sst, and I wanted to be consistent. Unfortunately, that revealed a handful of bugs that I didn't want to fold into this diff:

we need to apply the trait_typ_substs to the post-conditions emitted in ast_to_sst
we need to apply the bitvector mode to post-conditions emitted in ast_to_sst

Right now, these are both latent bugs for functions that use early return statements.

Could we ask rustc for this information? I think this may be constructed for MIR, which would be potentially inconvenient for us, but it may be worth a look (e.g. for break, or for returns inside a loop).

I kinda wanted to know about this!


Custom email

Hi,
First thanks for this package.
But how can I add a custom email without change the core?
Thanks!

do not quite understand. can be more?

Sure. Imagine that I want to send a custom email instead the email you prepared. Or instead Laravel default email views.

But why then
php artisan vendor:publish --tag=laravel-notifications
and/or
php artisan vendor:publish --tag=laravel-mail
???
At last You can edit emails as You wish.
:-)

Sure, I can modify this.
But, if for example I want to remove message3 from the email to confirm email?
Would be great to be able to choose a Notification class from an option in the config file.
Do you understand me now? 😄


Update set-default-storage-space.md

corrected note

@nenonix @JohanFreelancer9 Copy editing is needed for this PR. Thanks.

@kaarins  Changes look correct. Could you please review and merge? Thanks!

@kaarins Hi Kaarin, any updates on this issue? it has been copy edited and it is ready for your final review? Thanks.