text:
Add CMU Graphics Lab Motion Capture dataset

Adding a Dataset

Name: CMU Graphics Lab Motion Capture database
Description: The database contains free motions which you can download and use.
Data: http://mocap.cs.cmu.edu/
Motivation: Nice motion capture dataset

Instructions to add a new dataset can be found here.

This dataset has files in ASF/AMC format. [ The skeleton file is the ASF file (Acclaim Skeleton File). The motion file is the AMC file (Acclaim Motion Capture data). ]
Some questions :

How do we go about representing these features using datasets.Features and generate examples ?
The dataset download link for ASF/AMC files does not have metadata information, for eg : category and subcategory information. We will need to crawl the website for this information. The authors mention "Please don't crawl this database for all motions." Can we mail the authors for this information ?
The dataset structure is as follows :

subjects
	- 01
		- 01_01.amc
		- 01_02.amc
		.
		.
		.
		- 01.asf
	- 02
		- 02_01.amc
		- 02_02.amc
		.
		.
		.
		- 02.asf

There is no metadata regarding the category, sub-category and motion description.
Need your inputs. @mariosasko / @lhoestq
Thank you.

Hi @mariosasko ,

Thanks for this, so we can add the file paths.
Yes, I had already mailed the authors a couple of days back actually, asking for the metadata details[ i.e category, sub-category and motion description] . They are yet to respond though, I will wait for a couple of days and try to follow up with them again. :) Else we can use the workaround solution.

Yes. Supporting all the formats would be helpful.

And additionally, we can add a Data Preprocessing section to the card where we explain how to load/process the files. I can help with that.

Okay. Got it.

authors: dnaveenr osanseviero

repo: huggingface/datasets


text:
Dataset.unique(column: str) -> ArrowNotImplementedError

Describe the bug
I'm trying to use unique() function, but it fails
Steps to reproduce the bug

Get dataset
Call unique
Error

Sample code to reproduce the bug
!pip show datasets

from datasets import load_dataset

dataset = load_dataset('wikiann', 'en')

dataset['train'].column_names
dataset['train'].unique(dataset['train'].column_names[0])

Expected results
It would be nice to actually see unique items
Actual results
Error:
---------------------------------------------------------------------------
ArrowNotImplementedError                  Traceback (most recent call last)
[<ipython-input-10-5e0de07ed42c>](https://s0qyv2vjaji-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20220324-060046-RC00_436956229#) in <module>()
      6
      7 dataset['train'].column_names
----> 8 dataset['train'].unique(dataset['train'].column_names[0])

5 frames
/usr/local/lib/python3.7/dist-packages/pyarrow/error.pxi in pyarrow.lib.check_status()

ArrowNotImplementedError: Function unique has no kernel matching input types (array[list<item: string>])

Environment info

datasets version: 2.0.0
Platform: Google Collab
Python version: 3.7.13
PyArrow version: 6.0.1

As a workaround solution you can use pandas:
from datasets import load_dataset

dataset = load_dataset('wikiann', 'en', split='train')
df = dataset.to_pandas()
unique_df = df[~df.tokens.apply(tuple).duplicated()]  # from https://stackoverflow.com/a/46958336/17517845

Note that pandas loads the dataset in memory (this one is small so it's fine).

@lhoestq thank you! I will fall back to this method for now

source: gharchive/issue

authors: lhoestq orkenstein

license_type: permissive

license_source: github-api


text:
Add pyproject.toml for black

Add pyproject.toml as a config file for the black tool to support VS Code's auto-formatting on save (and to be more consistent with the other HF projects).

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

source: gharchive/pull-request

authors: HuggingFaceDocBuilderDev mariosasko


text:
Feature request: Allow upload_file to upload multiple files

Currently, the upload_file feature allows uploading in memory file like objects, which is a very good feature, allowing users to upload their data directly, without having to save to disk. Though, the API doesn't allow multiple files to be uploaded. Being able of uploading multiple in memory object without having to save to disk would be useful.
Upload folder allows multiple files (all in folder), but it's slower, and would require saving to disk first.
https://github.com/huggingface/huggingface_hub/blob/fb9f63793d69316d0957772e962ac6346da7f167/src/huggingface_hub/hf_api.py#L2094
Looking through the code, it seemed like a rather easy change to make upload_file take a list of input instead of just one. I'm down to opening a PR if the feature is useful to others

Hi @Lime-Cakes , thanks for your feedback.  upload_file is actually only a wrapper around the create_commit API. It's designed to be easy to use without providing all its flexibility. If you want to upload multiple files on the fly (from memory), you can defined several CommitOperationAdd manually. See the guide for more details.

Thanks! I'll use the low level API then

authors: Lime-Cakes Wauplin

license_source: bigquery


text:
Response from generated text includes tokens when using extension

Hey @McPatate -
If you do not mind me asking, if I am not using the text-generation-inference  sserver from huggingface, and instead instead: https://github.com/LucienShui/huggingface-vscode-endpoint-server

Is there something in the extension that was supposed to take the  and automatically clean out the tokens and place in the editor or am I supposed to scrub the response on the server side only?

Yeah, I got stuck on installing the TGI on our severs because of this cargo build issue:
   Compiling unicode_categories v0.1.1
   Compiling rand v0.8.5
   Compiling nom v7.1.3
   Compiling nohash-hasher v0.2.0
   Compiling ordered-float v3.9.1
   Compiling clap_builder v4.4.6
   Compiling hostname v0.3.1
   Compiling crossbeam-deque v0.8.3
   Compiling utoipa-swagger-ui v3.1.5
   Compiling sha2 v0.10.8
   Compiling flume v0.11.0
   Compiling mime_guess v2.0.4
The following warnings were emitted during compilation:
warning: /tmp/ccULKIi9.s: Assembler messages:
warning: /tmp/ccULKIi9.s:13: Error: unknown .loc sub-directive `view'
warning: /tmp/ccULKIi9.s:13: Error: junk at end of line, first unrecognized character is `-'
warning: /tmp/ccULKIi9.s:15: Error: unknown .loc sub-directive `view'
warning: /tmp/ccULKIi9.s:15: Error: unknown pseudo-op: `.lvu1'
warning: /tmp/ccULKIi9.s:16: Error: unknown .loc sub-directive `view'
warning: /tmp/ccULKIi9.s:16: Error: unknown pseudo-op: `.lvu2'

I have no idea how to resolve the cargo build in the https://github.com/huggingface/text-generation-inference
Sorry to bring it up here in this discussion, but would you happen to know how to resolve this?

@McPatate I posted my issue here: https://github.com/huggingface/text-generation-inference/issues/1135
But if you have any words of wisdom with your expertise here, because  I think this is related to rust/cargo -- I would be grateful!
Cheers!

I'd never seen assembler warnings before 😄
I'll reply in the TGI issue and close this one to keep one thread.

authors: McPatate cmosguy

repo: huggingface/llm-ls


text:
Fix the bug of output_type=np or latent.

What does this PR do?

Fixes # (issue)
Before submitting

[ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
[ ] Did you make sure to update the documentation with your changes?
[ ] Did you write any new necessary tests?

@yuanwu2017 Please provide a command or a script to reproduce the bug

Please use the test script
Cuda:
python diffusers_test_output_type.py --device cuda
output:
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:05<00:00,  1.75s/it]
if output_type is np, the output image should be = <class 'numpy.ndarray'>
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00,  4.93it/s]
if output_type is latent, the output image should be = <class 'torch.Tensor'>
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00,  5.22it/s]
if output_type is pil, the output image should be = <class 'list'>
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00,  5.12it/s]
if output_type is pt, the output image should be = <class 'torch.Tensor'>

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

repo: huggingface/optimum-habana


text:
Prepare release

As per title.

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

repo: huggingface/optimum-neuron


text:
Update custom_models.md

Hi, in the example of timm models, there is a misuse of MLP( ), which should be model.

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

authors: HuggingFaceDocBuilderDev boyufan

repo: huggingface/peft


text:
Trending topic agent?

Hey guys,
I remember a few years ago, there was some kind of example that triggered when a specific topic/keyword gained momentum/trended. Unfortunately I cannot find anything about that anywhere today.
Do you have any pointers?
Thanks

This might be what you are looking for:
"Know when the world changes-- with Huginn"
https://blog.andrewcantino.com/blog/2014/03/17/know-when-the-world-changes-with-huginn/

Looks good, but I wonder if there's anything similar for google?

That's the only example I could remember. What are you trying to do?

From time to time I am waiting for new products to be released (for example a new line of laptops with that newest cpu and those coolest features).
I would prefer to not F5 google every day (several times a day if I'm bored) but use some kind of logic on google search that informs me when a release happens.
The difficulty is to detect a kind of momentum rather than just count and compare search results, because even if the article in question isn't released, yet, there might be several reviews from some tech-conventions or previews/discussions of other sorts.

Check this out...
https://drwho.virtadpt.net/archive/2017-09-30/building-your-own-google-alerts-with-huginn-and-searx

authors: brianpetro level20peon virtadpt

repo: huginn/huginn

license: mit


text:
How to wait for all events to occur before generating new events

I want to gather the events generated from three agents into one event. If there are less than three events, the following agent will not generate new events
Which agent should I choose?
如何等待所有事件发生后，再产生新的事件
我想将三个agent产生的event汇集到一个event之中，如果不满三个event，就不产生新event
我应该选择哪一个agent呢？

Just like the figure above, I hope that 2 is generated here. Because the above three numbers are 3, 2 and 2 respectively
就如同上面这张图，我希望这里产生的是2，因为上面三个数字分别为3、2、2

https://huginnio.herokuapp.com/agents#DigestAgent

Hey - I think this is a solution to a problem I have.  Thanks!

authors: MokouTyan dreamerc virtadpt


text:
Using-the-Twilio-Agent  improvement

Using-the-Twilio-Agent is hard to read for new users. This page contains long paragraphs without any titled sections or bulleted lists.
Can I take this issue and update this wiki page?

Sure!  You can edit Wiki, and ask for feedback if you need to.

Wiki page has been updated. Let me know if that works! Issue can be closed if approved.

authors: StevenOuk knu


text:
最新版本引入报错

版本号
"react-bmapgl": "^0.1.28"

+1

+1

我这边找到原因了，是因为window.define有值导致百度地图走了 amd加载的方式导致的，我在百度地图加载前把window.define设置为null，就可以了，然后在百度地图加载完成后在把 window.define设置回去。你也可以看看是不是这个原因引起的

repo: huiyan-fe/react-bmapgl

license: MIT


text:
Fix SVGs in Safari

SVG images weren't being displayed correctly in Safari when using HBFileMiddleware. Following a little investigation, it looks like Safari will only treat SVGs as images if they have the 'image/svg+xml' MIME type, whereas both Firefox and Chrome are more than happy to display them with the 'image/svg' MIME type, perhaps explaining why this wasn't seen earlier. Nginx reports SVG images as 'image/svg+xml'.
This change updates the mapping from the '.svg' extension to the 'image/svg+xml' MIME type to bring it in-line with Nginx behaviour (and presumably that of other servers).
I have verified that Safari displays SVG images correctly with this change, and Chrome and Firefox also continue to behave correctly.

Thank you for this

@adam-fowler Thanks for such a quick merge! 🙏🏻

authors: adam-fowler jbmorley

repo: hummingbird-project/hummingbird


text:
Command scrollbar has default browser style

Describe the bug
Hi! I just added the Command component to my project and the scrollbar has the default chrome look. In the shadcn-svelte website, the scrollbar is better-looking but I can't find where the difference comes from. Wouldn't it be better to implement a ScrollArea to get its scrollbar style? Thanks!

Reproduction
Add the command component from the official npx command. No external styles applied.
Logs
No response
System Info
System:
    OS: Linux 6.5 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (16) x64 12th Gen Intel(R) Core(TM) i7-1260P
    Memory: 18.73 GB / 31.05 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.18.0 - ~/.nvm/versions/node/v18.18.0/bin/node
    npm: 10.2.0 - ~/.nvm/versions/node/v18.18.0/bin/npm
    pnpm: 8.8.0 - ~/.nvm/versions/node/v18.18.0/bin/pnpm
  Browsers:
    Chrome: 120.0.6099.109
  npmPackages:
    @sveltejs/kit: ^2.5.4 => 2.5.4
    bits-ui: ^0.19.7 => 0.19.7
    cmdk-sv: ^0.0.15 => 0.0.15
    formsnap: ^0.5.1 => 0.5.1
    mode-watcher: ^0.3.0 => 0.3.0
    svelte: ^4.2.12 => 4.2.12
    sveltekit-superforms: ^2.9.0 => 2.9.0

Severity
annoyance

I just noticed the CSS styles applied in the global css of this repo, and that the original shadcn/ui project keeps the default browser style by default. Therefore I'll close, sorry for opening this issue.

repo: huntabyte/shadcn-svelte


text:
Issue during "make && make install"

I encountered this error while running the 'make && make install' portion of the process:

Not sure how to progress from here.
I appreciate your help.
Thank you!

wget not installed?
Please install the ports/ftp/wget and try again.

I apologize, I thought it would be installed by default. That does seem to be the cause of the issue since it is installing now. Thank you for your help! It is appreciated!

Glad to know it works, thanks for the feedback.

authors: TekPhreak-Git huo-ju

repo: huo-ju/photoprism-freebsd-port


text:
🛑 recipes is down

In 07fcf46, recipes (https://recipes.thekor.eu/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: recipes is back up in 6c49757 after 10 minutes.

repo: hupratt/upptime


text:
🛑 shop is down

In a59fdd4, shop (https://lapetiteportugaise.thekor.eu) was down:

HTTP code: 0
Response time: 0 ms

Resolved: shop is back up in c8841ca after 6 hours, 32 minutes.


text:
Have a way to save credentials when authentication fail

Basically I sometimes get some "authentication failed" error that I don't know the cause of (re-authenticating works just fine).
The issue is more of QOL as I have to re-enter every single field each time (Client ID, client Secret, Username, Password). Could there be a way to save them when authentication failed for retry?

It is difficult to guess what's happening here. Any chance you can open the console and see if there are any helpful logs when you get the authentication failed?

Sure, I'll try to get you that next time it happens (unfortunately it's pretty random so I have no idea when I'll get that info)

Just happened now. Here is the console output (I guess the first time was automatic at launch or something, I only noticed by pressing the sync button manually, getting an error, checked the console at that moment):
Likely the token expired, refreshing it.
plugin:wallabag:339 Token refresh failed. Error: Request failed, status 400
at new t (app.js:1:1925609)
at PU (app.js:1:1925801)
at app.js:1:1926480
at app.js:1:237228
at Object.next (app.js:1:237333)
at a (app.js:1:236051)
plugin:wallabag:341 Uncaught (in promise) Error
at eval (plugin:wallabag:341:17)
at async eval (plugin:wallabag:334:16)
at async SyncArticlesCommand.callback (plugin:wallabag:204:22)
2plugin:wallabag:333 Likely the token expired, refreshing it.
plugin:wallabag:339 Token refresh failed. Error: Request failed, status 400
at new t (app.js:1:1925609)
at PU (app.js:1:1925801)
at app.js:1:1926480
at app.js:1:237228
at Object.next (app.js:1:237333)
at a (app.js:1:236051)
plugin:wallabag:341 Uncaught (in promise) Error
at eval (plugin:wallabag:341:17)
at async eval (plugin:wallabag:334:16)
at async SyncArticlesCommand.callback (plugin:wallabag:204:22)

repo: huseyz/obsidian-wallabag


text:
wordpress5.3.2版本安装后没效果，且不能打开settings

打开settings时报错：
Canvas-nest.js Setting

Fatal error: Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in /www/wwwroot/wordpress/wp-content/plugins/canvas-nestjs/templates/settings.php on line 5 and exactly 2 expected in /www/wwwroot/wordpress/wp-admin/includes/template.php:1667 Stack trace: #0 /www/wwwroot/wordpress/wp-content/plugins/canvas-nestjs/templates/settings.php(5): do_settings_fields('WP_Canvas_Nest-...') #1 /www/wwwroot/wordpress/wp-content/plugins/canvas-nestjs/settings.php(261): include('/www/wwwroot/wo...') #2 /www/wwwroot/wordpress/wp-includes/class-wp-hook.php(288): WP_Canvas_Nest_Settings->plugin_settings_page('') #3 /www/wwwroot/wordpress/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters('', Array) #4 /www/wwwroot/wordpress/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #5 /www/wwwroot/wordpress/wp-admin/admin.php(254): do_action('settings_page_W...') #6 /www/wwwroot/wordpress/wp-admin/options-general.php(10): require_once('/www/wwwroot/wo...') #7 {main} thrown in /www/wwwroot/wordpress/wp-admin/includes/template.php on line 1667

在wp-content/plugins/canvas-nestjs/templates目录下有一个settings.php文件，请将第五行改为，第13行改为即可，这是因为高版本PHP禁止传参数量不匹配导致的，手动赋值即可，反正也用不上


text:
When converting to ONNX, what is the required image size for ONNX

not really sure how to know this

Hi @sarmientoj24, image size is required for exporting models to ONNX. ONNX requires the exact image size (640x640 in SparseInst) to infer the input/output shapes of each layer and create a static graph for fast inference.

repo: hustvl/SparseInst


text:
Feat/dynamic max tokens

References https://github.com/hwchase17/langchain/blob/master/langchain/llms/openai.py#L321 to implement the missing logic described in the comment. Passing -1 will calculate the max tokens dynamically.
Only done for the openai basic LLM. (the new chat one does it for you 😄 )
There may be a problem with strongly typing the model name as a TiktokenModel as it would not let other models to be passed in if the API supports new ones but the type isn't updated. Therefore I cast it.

@evad1n merged this in now, thank you!


text:
Canvas scrolling issue

Embed note in canvas is not scrollable during Reading-mode but not Edit-mode.

Issue resolved with latest update, which also requires Electron v1.1.9 to be installed. (You need to reinstall the latest Obsidian manually from their website)

repo: hydescarf/Obsidian-Theme-Mado-Miniflow


text:
Sodium

i have no idea why that commit from dec30 was added to this pr

woah, we've got a git pro over here

authors: GusCaplan Programmix


text:
default channel doesn't exist anymore

Please describe the changes this PR makes and why it should be merged:
Semantic versioning classification:

[x] This PR changes the library's interface (methods or parameters added)

[x] This PR includes breaking changes (methods removed or renamed, parameters moved or removed)

[ ] This PR only includes non-code changes, like changes to documentation, README, etc.

From what I've read, the default channel is the highest channel you can read.

@KingDGrizzle yes but that is so abstract we aren't going to bother keeping it

authors: KingDGrizzle devsnek


text:
login and password reset broken

I went to log in to hydroshare and got this error message in the link below after I entered my credentials. I thought maybe this was just a bad error message for a wrong password, so I requested a change of password, and when I clicked on the link to reset my password, I arrived at a page with the same error message.
https://www.dropbox.com/s/rpklwlg46tkor8m/Screenshot 2016-04-22 17.35.23.png?dl=0

Closing since it should be working now.

authors: hyi mtpain

repo: hydroshare/hydroshare


text:
[BLOCKED] 4653-Removing Model Instance Resource type

Pull Request Checklist:

[ ] Positive Test Case Written by Dev

[ ] Automated Testing

[ ] Sufficient User and Developer Documentation

[ ] Passing Jenkins Build

[ ] Peer Code review and approval

Positive Test Case

[Enter positive test case here]

METRIC
VALUE

https://sonarqube.cuahsi-workstation.com:9000/dashboard?id=hydroshare-4715

METRIC
VALUE

https://sonarqube.cuahsi-workstation.com:9000/dashboard?id=hydroshare-4715

@sblack-usu Another one in the series for your review.

authors: hydrocheck pkdash


text:
Api is not working

Hello hygieia team,
I am new to this tool.
Hygieia Api is running in port 8080 and i add application.properties file with mongodb connection.
While running http://localhost:8080/api/ping I got whitelabel error. I using latest api with java 11.
It's urgent kindly help me

@NaveenKumarA7 Could you post the api.properties file here

repo: hygieia/hygieia


text:
🛑 Daisy - Minecraft is down

In a24c27f, Daisy - Minecraft (https://mc.hydev.org/dynmap) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Daisy - Minecraft is back up in dc0e323 after 5 minutes.

repo: hykilpikonna/Uptime


text:
UA SessionKeepAlive does not work

Here is my test for the functionality of the ServerConnectionLost event handler (which fails)
    [Test]
    public void UaTestKeepAliveNotifyDisconnect()
    {
      // this client's Status is always NotConnected
      var client = new TestUaClientNotConnected(new Uri(ConfigurationManager.AppSettings["UATestEndpoint"]));
      client.Connect();
      var i = 0;
      // should get hit in the SessionKeepAlive and SessionClosing functions
      client.ServerConnectionLost += (object sender, EventArgs e) =>
      {
        i++;
      };
      // close the connection
      client.SessionExtended.Close();
      // and wait
      Thread.Sleep(200);
      Assert.AreEqual(2, i);
    }
  }

After I close the session, the UaClient should call the SessionClosing function in UaClient which calls the the ServerConnectionLost event handler and it should call the SessionKeepAlive function which should see that the server is no longer running and that the client is not connected and raise the event.
However, the logic is mixed up:
If you look at the code coverage results, you can see that the code saw that the server was disconnected, but then checked if the client was connected to determine whether to call the event handler. Should be a != I believe, I'll roll that out later.

I see what it's trying to do now. It relies on the KeepAlive response to set the server state and uses status so it only calls notify connection lost once. I'll have to change this unit test around or get rid of it because I don't know how to send a false positive on the server's current state

repo: hylasoft-usa/h-opc


text:
Single Domain but with prefix Database

Description
Is it possible to use this package for single domain but with different or prefix database?

Can you explain? You need to run one tenant that uses a different database?

What I mean is that I want to allow users to use one domain (not any subdomain) and in the back-end this package maintains the data in the single database but with prefix with it.
Think of what Quickbooks is doing.
They have one domain which people use to access and the user can see their own concerned data.

That's very much possible. You would need to disable hostname auto-identification though and then create your own logic to switch between the tenants. The code is there though, you would just have to write it; as 3.x is beta there aren't many helpers yet.
For instance you could use the Connection class to manually set the current tenant connection.
Please let me know if you need more information.

Do you mean is it going to be available with helpers in version 3 in future?
One more question, how can we select the tenant in commands? Let's say I have a command to send email after every 10 minutes then how can we execute the command on every tenant. (Considering we have emails table consisting of all the email store in there).

The helpers will make the process of manual implementation easier, that implementation is already possible though.
Commands can have different implementation depending on the goal you try to achieve. You mention a cronjob (automated recurring) command. I'd suggest looping over all tenants to see whether they have mails listed to be send.

Got it.
Well, how can we loop through the tenants? Do we have any helper function within this package to get the list of tenants which can further select and loop through it?

The helpers will make the process of manual implementation easier, that implementation is already possible though.
Would it be possible to help me out to understand, like how this is possible?
I have looked into the Connection, the functions are very tightly bounded with each other. So, bit confused about the context how this make it easier.

There is actually a recent implementation of switching tenants to set their connection. The custom MigrateCommand does it:
        $this->websites
            ->query()
            ->chunk(10, function (Collection $websites) {
                $websites->each(function ($website) {
                    $this->connection->set($website, $this->connection->migrationName());

                    parent::fire();
                });
            });

Got it.
I am still confused for this.
How and when we gonna use this? :)

You'll have to switch database to access the emails table you mentioned earlier. Once you've switched the database connection of the tenant you can retrieve the rows in that table using your Eloquent models and run your email sending logic.
As an example;
        $this->websites
            ->query()
            ->chunk(10, function (Collection $websites) {
                $websites->each(function ($website) {
                    $this->connection->set($website); // sets the tenant connection

                    $email = \App\Email::first();
                    $this->send($email); // custom code to send mails using your Eloquent Email model
                });
            });

now this becomes more clear.
How and when we need to switch the connections too? The reason I wanted to know this because, the package is completely dependent on the connection.

How and when we need to switch the connections too?

That depends on your implementation. I don't know 😄

The package is completely dependent on the connection.

Yes the tenancy package depends on the tenant connection to be set for the Eloquent models to work.

Got it. :)

authors: luceos xyrintech

repo: hyn/multi-tenant


text:
[BUG] Unsupported driver [Hyperf\DB\PgSQL\PgSQLPool] on migrations

Linux service 5.10.47-linuxkit #1 SMP Sat Jul 3 21:51:47 UTC 2021 x86_64 Linux
PHP 7.4.23 (cli) (built: Aug 27 2021 01:57:31) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.23, Copyright (c), by Zend Technologies
hyperf/amqp                        v2.2.8    A amqplib for hyperf.
hyperf/async-queue                 v2.2.8    A async queue component for hyperf.
hyperf/cache                       v2.2.0    A cache component for hyperf.
hyperf/command                     v2.2.0    Command for hyperf
hyperf/config                      v2.2.0    An independent component that provides configuration container.
hyperf/config-apollo               v2.2.7    An apollo adapter for Hyperf config component.
hyperf/config-center               v2.2.5    The abstraction component of config center
hyperf/constants                   v2.2.0    A constants component for hyperf.
hyperf/contract                    v2.2.8    The contracts of Hyperf.
hyperf/database                    v2.2.8    A flexible database library.
hyperf/db                          v2.2.1
hyperf/db-connection               v2.2.0    A hyperf db connection handler for hyperf/database.
hyperf/db-pgsql-incubator          v0.2.0
hyperf/devtool                     v2.2.5    A Devtool for Hyperf.
hyperf/di                          v2.2.8    A DI for Hyperf.
hyperf/dispatcher                  v2.2.0    A HTTP Server for Hyperf.
hyperf/elasticsearch               v2.2.0    Elasticsearch client for hyperf
hyperf/engine                      v1.1.6
hyperf/event                       v2.2.0    an event manager that implements PSR-14.
hyperf/exception-handler           v2.2.0    Exception handler for hyperf
hyperf/framework                   v2.2.0    A coroutine framework that focuses on hyperspeed and flexible, specifically use for build microservices and middlewares.
hyperf/grpc                        v2.2.0    A GRPC basic library for Hyperf.
hyperf/grpc-client                 v2.2.7    A GRPC Client for Hyperf.
hyperf/grpc-server                 v2.2.0    A GRPC Server for Hyperf.
hyperf/guzzle                      v2.2.0    Swoole coroutine handler for guzzle
hyperf/http-message                v2.2.8    microservice framework base on swoole
hyperf/http-server                 v2.2.4    A HTTP Server for Hyperf.
hyperf/ide-helper                  v2.2.5    IDE help files for Hyperf.
hyperf/logger                      v2.2.0    A logger component for hyperf.
hyperf/memory                      v2.2.0    An independent component that use to operate and manage memory.
hyperf/model-cache                 v2.2.0    A model cache component for hyperf.
hyperf/model-listener              v2.2.0    A model listener for Hyperf.
hyperf/pool                        v2.2.0    An independent universal connection pool component.
hyperf/process                     v2.2.3    A process component for hyperf.
hyperf/redis                       v2.2.0    A redis component for hyperf.
hyperf/server                      v2.2.0    A base server library for Hyperf.
hyperf/testing                     v2.2.0    Testing for hyperf
hyperf/tracer                      v2.2.0    A open tracing system implemented for Hyperf or other coroutine framework
hyperf/utils                       v2.2.8    A tools package that could help developer solved the problem quickly.

swoole

Swoole => enabled
Author => Swoole Team <team@swoole.com>
Version => 4.7.1
Built => Aug 27 2021 02:49:12
coroutine => enabled with boost asm context
epoll => enabled
eventfd => enabled
signalfd => enabled
spinlock => enabled
rwlock => enabled
openssl => OpenSSL 1.1.1l  24 Aug 2021
dtls => enabled
http2 => enabled
json => enabled
curl-native => enabled
pcre => enabled
zlib => 1.2.11
mutex_timedlock => enabled
pthread_barrier => enabled
async_redis => enabled

Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => Off => Off
swoole.unixsock_buffer_size => 8388608 => 8388608

Description:
Is hyperf/db-pgsql-incubator supported in migrations?
config/autoload/databases.php:
<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
return [
    'default'  => [
        'driver'    => Hyperf\DB\PgSQL\PgSQLPool::class,
        'host'      => env('DB_HOST', 'localhost'),
        'port'      => env('DB_PORT', 5432),
        'database'  => env('DB_DATABASE', 'hyperf'),
        'username'  => env('DB_USERNAME', 'root'),
        'password'  => env('DB_PASSWORD', ''),
        'charset'   => env('DB_CHARSET', 'utf8mb4'),
        'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
        'prefix'    => env('DB_PREFIX', ''),
        'pool'      => [
            'min_connections' => 1,
            'max_connections' => 10,
            'connect_timeout' => 10.0,
            'wait_timeout'    => 3.0,
            'heartbeat'       => -1,
            'max_idle_time'   => (float)env('DB_MAX_IDLE_TIME', 60),
        ],
        'cache'     => [
            'handler'         => Hyperf\ModelCache\Handler\RedisHandler::class,
            'cache_key'       => '{mc:%s:m:%s}:%s:%s',
            'prefix'          => 'default',
            'ttl'             => 3600 * 24,
            'empty_model_ttl' => 600,
            'load_script'     => true,
        ],
        'commands'  => [
            'gen:model' => [
                'path'          => 'app/Model',
                'force_casts'   => true,
                'inheritance'   => 'Model',
                'uses'          => '',
                'table_mapping' => [],
            ],
        ],
    ],
]

Steps To Reproduce:

composer require hyperf/db-pgsql-incubator

php /opt/www/bin/hyperf.php migrate
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\Config\Listener\RegisterPropertyHandlerListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\ExceptionHandler\Listener\ExceptionHandlerListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\DbConnection\Listener\RegisterConnectionResolverListener listener.
[DEBUG] Event Hyperf\Framework\Event\BootApplication handled by Hyperf\ConfigCenter\Listener\BootApplicationListener listener.
PHP Fatal error:  Uncaught InvalidArgumentException: Unsupported driver [Hyperf\DB\PgSQL\PgSQLPool] in /opt/www/vendor/hyperf/database/src/Connectors/ConnectionFactory.php:263
Stack trace:
#0 /opt/www/vendor/hyperf/database/src/Connectors/ConnectionFactory.php(101): Hyperf\Database\Connectors\ConnectionFactory->createConnection()
#1 /opt/www/vendor/hyperf/database/src/Connectors/ConnectionFactory.php(53): Hyperf\Database\Connectors\ConnectionFactory->createSingleConnection()
#2 /opt/www/vendor/hyperf/db-connection/src/Connection.php(88): Hyperf\Database\Connectors\ConnectionFactory->make()
#3 /opt/www/vendor/hyperf/db-connection/src/Connection.php(63): Hyperf\DbConnection\Connection->reconnect()
#4 /opt/www/vendor/hyperf/db-connection/src/Pool/DbPool.php(53): Hyperf\DbConnection\Connection->__construct()
#5 /opt/www/vendor/hyperf/pool/src/Pool.php(167): Hyperf\DbConnection\Pool\DbPool->createConnection()
#6 /opt/www/vendor/hyperf/pool/src/Pool.php(60): Hyperf\Pool\Pool->getConnection()
#7 /opt/www/vendor/hyperf/db-connection/s in /opt/www/vendor/hyperf/database/src/Connectors/ConnectionFactory.php on line 263

你再看一下文档，这个driver是用在hyperf/db 组件上的

laravel orm 可以支持

MySQL
PostgreSQL
SQLite
SQL Server 2017+

hyperf databases 组件好支持么?

@limingxinleo may I ask you to show an example of PostgreSQL connection config? I have an attempt to use driver as pdo, but I have this error:
Fatal error: Uncaught InvalidArgumentException: Unsupported driver [pdo] in /opt/www/vendor/hyperf/database/src/Connectors/ConnectionFactory.php:263

@limingxinleo
It seems, that https://hyperf.wiki/2.2/#/en/db/db return 404.
But https://hyperf.wiki/2.2/#/zh-cn/db/db return the documentation.
Ok. But I don't see any possibility to use PostgreSQL with the migrations feature. Is it supported or not?

I will write some examples some hours later

@limingxinleo thanks

@mlshvdv You can checkout pgsql branch
And then run docker to test it
docker build . -t test
docker run -e DB_HOST=192.168.0.188 -e DB_PORT=5432 -e DB_PASSWORD=postgres -e DB_USERNAME=postgres -e DB_DATABASE=postgres -p 9501:9501 --name pgsql --rm -d test:latest
curl http://127.0.0.1:9501/

@limingxinleo thanks for the example! But the current issue is about PostgreSQL-based migrations. Are they not supported?

hyperf/db don't support migration, but support pgsql.
hyperf/database support migration but don't support pgsql.

@limingxinleo it's a pain. But thanks for your response.

authors: limingxinleo mlshvdv tw2066

repo: hyperf/hyperf


text:
const assignment of HeaderName::from_static

When using HeaderName::from_static in in order to create aconst(instead of astatic` variable), clippy triggers a warning. Indeed, the following code:
pub const NAME: HeaderName = HeaderName::from_static("test");

Produces the following warning:

warning: a const item should never be interior mutable

Playground
I could just ignore the issue and use static instead of const, but I think that the lint exposes an interesting fact I would like to discuss.
First of all, the reason behind the lint: there is an AtomicPtr deep down. The dependency chain is:
HeaderName -> Repr<Custom> -> Custom -> ByteStr -> Bytes -> AtomicPtr

Now, the issue itself... It is a non-problem, except for one detail: the fact that potentially we have internal mutability in a header string that obviously is meant to never change is unexpected. Don't get me wrong, I understand the reason behind this: we want to be able to reuse memory when receiving headers (thanks to Bytes) and at the same time it is extremely nice to have just one HeaderName abstraction (instead of HeaderName and ConstHeaderName, for instance). However, following the principle of least surprise, probably you would expect a const HeaderName::from_static() function to not have interior mutability.
Now, what should be done? To be honest, I am not sure. I personally don't see a practical problem with the current approach, which is pretty ergonomic. Maybe we could consider adding a note in the documentation of HeaderName::from_static, suggesting to use a static variable instead of a const to avoid being flooded by clippy warnings.
Do you have better ideas?
CC @paolobarbolini
Originally posted by @dodomorandi in https://github.com/hyperium/http/issues/264#issuecomment-1508257859

You are right, HeaderName does not expose any method to let you change the inner value. But I still think that two issues still exist:

Unexpected warning by the user. As a user, you don't have any desire (or possibility) to change the inner value of HeaderName, but if you assign it to a const you get an unexpected warning. I think that we should at least document the behavior.
Unexpected cost. Notice that this point is the original reason behind the clippy lint. If you notice from [this trivial example], it is noticeable that using the const value brings to some memory copying (it uses 4 128 bit instructions in x86_64).

Because of this, I don't thing that clippy is wrong. But, as I said, I also think that this is not a real problem since we inform the user that the warning is expected when assigning a HeaderName to a const.

https://github.com/rust-lang/rust-clippy/issues/9776

With https://github.com/rust-lang/rust-clippy/pull/12691 (using nightly), the error is now a warn:
~/Code/... ❯ cargo +nightly clippy
warning: a `const` item should never be interior mutable
  --> crates/my_http/src/....rs:19:1
   |
19 |   const CROSS_ORIGIN_RESOURCE_POLICY: HeaderName =
   |   ^----
   |   |
   |  _make this a static item (maybe with lazy_static)
   | |
20 | |     HeaderName::from_static("cross-origin-resource-policy");
   | |____________________________________________________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#declare_interior_mutable_const
   = note: `#[warn(clippy::declare_interior_mutable_const)]` on by default

warning: `my_http` (lib) generated 1 warning
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.20s
~/Code/... ❯ cargo +nightly clippy --version
clippy 0.1.79 (c987ad52 2024-05-01)

Is there anything that can be done in hyper/http to smoothe it further, or are we happy closing once this hits stable?

The lint is still wrong. I mean, the idea behind it makes sense. But the header name does not use interior mutability. So it's a false positive.

https://github.com/rust-lang/rust-clippy/pull/12691 hadn't quite reached the 2024-05-01 nightly as Clippy updates are synced with the main repo periodically
This false positive no longer occurs on nightly and the fix will hit stable in a few days when 1.80 releases

authors: Alexendoo dodomorandi punkeel seanmonstar sfackler

repo: hyperium/http


text:
fix(client): Client functions don't need &mut self

Hi,
Is there a reason these client functions require a &mut self? Makes
integrating this to our project much easier if they would be immutable.
Tests seem to pass.

they used to, when Service.call required mutable self, but that changed in #994, and we just forgot to update these. Thanks!

<3

authors: pimeys seanmonstar

repo: hyperium/hyper


text:
Unnecessary expectation from BAF admin to fill in cert information under orderers

Description
I cannot categorize this to be bug, so user story was closely matching available option. This appears to be an unnecessary requirement for an administrator. When composing the deployment file (ex: network.yaml), there is a section for adding orderers and under which there is an expectation to put in orderer URI, orderer cert information/path.
Given that certs are stored in Vault (including any private keys), one can expect the orderer certs to be present in Vault in a pre-configured directory structure. It allows administrator to be free from having to specify a path where they are stored.
    orderers:
      - orderer:
        certificate:  # Path to orderer certificate. For inital network setup, ensure that the directory is present, the file need not be present. For adding a new organization, ensure that the file is the crt file of the orderer of the existing network.
      - orderer:

The filling in of certificate can be done by BAF itself if the Vault path is known or prefixed. Avoids user to manually copy required certificates for each ordering service node in a given directory.
Acceptance Criteria

Remove any dependency on having to specify a path for storing orderer nodes certificate.
Remove any dependency on having to copy any files manually.

I don't think its an unnecessary field.
The logic is, when we add a new org, the orderer tls certs are provided to the operator(who will run the playbook to add the new organization), instead of giving the path of the vault path and vault credentials of where the orderer certs are present.
Vaults are separate for each organization, and any organization (in this case the orderer organization) wont be comfortable in sharing the vault credentials for the same.
Hence a better approach to this to have a  consensus among the orderer hosting organizations (currently only one) to provide their TLS certificates, prior of running the add new org playbook and thus, provide the operator with the specified certificates.

Agree with @jagpreetsinghsasan. The certificate section at the top level is for other orgs who do not have access to Orderer Vault to specify a path for the public key/certificate. In case of hosting (orderer) organization, this path is not needed but is kept for consistency

Orderers wouldn't have to share their Vault, certificate information is shareable (public) information which operator in this case is expected to copy to a folder. Let's say the operator copies it to build folder as in example configuration files. My take on it is to still place it in operator would place it in operator's Vault. Operator has access to operator's organization's Vault, at least for new org addition. BAF would read the that operator's Vault and copy it or use it as necessary in the context.
Please re-read the statement/word unnecessary in the context that it is not required to be kept in network.yaml.
Another reason for considering this change, the current design of BAF would copy both private and public information in Vault. Expecting few of those files like in this example, to a configurable folder would add more to the confusion.
Alternate solution could be, make it optional to be passed via the network.yaml. Let BAF read from operator's Vault and pickup these files and if it's not present then read from network.yaml. Fail only if BAF cannot get this information at all.

That is what this section is doing, it is passing the orderer certs to be stored in the respective orgs Vault. Because Vault is protected and not everyone should have access to Vault, hence it is passed via the local disk path. We wanted to remove the dependency on an operator to connect to the Vault and place the certificates. This enables us to run automated pipelines. Of course, if the operator wants to remove that, they can do it.

authors: arsulegai jagpreetsinghsasan sownak


text:
Support Fabric 2.2.x

can be run on Fabric 2.2.X ?

Sorry, compatible with only 1.3, 14.x

repo: hyperledger-labs/fabric-chaincode-wasm


text:
Check used variables in Load expression and length call

This PR implements the used variable detection for the Load expression and marks arrays as assigned when there is a length call. The latter is necessary to prevent array being removed from the intermediary representation.

Looks good, I agree this is the right thing to do.

authors: LucasSte seanyoung

repo: hyperledger-labs/solang


text:
Array boundary

1-Temporary creating is done in : statements.rs, whenever an AllocDynamic expression is made
2-ArrayLength expressions are replaced in expression.rs, whenever an array subscript or array length is called/
3- pops/pushes are handled in array_boundary.rs, there is a function that is called after every push or pull to modify the temp.

@salaheldinsameh, please squash your commits into a few ones that make sense for your PR. In addition, don't forget to sign your commits.

authors: LucasSte salaheldinsoliman


text:
Allow to select ledger when writing an object to the ledger

Currently the first ledger will always be used when writing an object to the ledger. It would be nice to select the ledger to use when writing objects to the ledger
This could be as simple as passing the pool id to the method, however a better approach would probably be to pass the did to use. This will remove the need for the publicDid property that we currently use (because you always pass it), and we could just require the dids to be did indy formatted dids so we can extract the ledger to write to from it. #965 adds the indyNamespace property to the pool configs. We could then match that against the namespace form the provided did and use that ledger.
E.g. agent.ledger.registerSchema() could take a publisherDid property of value did:indy:sovrin:xxx so we know it needs to be registered on mainnet. The advantage of this approach is that it will also work when we add support for other ledgers with anoncreds. You just pass e.g. did:cheqd:mainnet and we would write it to cheqd mainnet instead

A good addition! 100% in favour of the second method with the proper way. Once full support for did:indy this would be a nice addition as well :).

@TimoGlastra someone seems to already be working on this. How do I proceed?

I don't think so, these messages are unrelated to this issue.
But this reminds me I still need to add some extra info to this issue 😁

authors: TimoGlastra blu3beri rapaktech

repo: hyperledger/aries-framework-javascript


text:
Add accessibility labels

Summary of Changes
Added accessibility label to some UI components for a better, more consistent automated testing experience. Updates include:

Pin-create;
Pin-entry
Terms of Service
Navigation bar

Related Issues
n/a
Pull Request Checklist
This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once; it will save you a few review cycles!
If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.

[x] All commits contain a DCO Signed-off-by line (we use the DCO GitHub app to enforce this).
[x] Updated LICENSE-3RD-PARTY.md for any added dependencies or vendored components.
[x] Run prettier: npm run style-format
[x] Updated documentation for changed code and new or modified features.

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!
PR template adapted from the Python attrs project.

Fixed conflicts. Ready for re-review.


text:
Better error reporting when unable to write to path

Description
When starting besu with a --data-path that it is unable to write to, besu gives an unhelpful error message and exits:
➜  besu git:(heads/main) ✗ build/install/besu/bin/besu --data-path=/not_allowed_to_write_here
2022-03-04 15:56:10.450-08:00 | main | INFO  | Besu | Using LibEthPairings native alt bn128
2022-03-04 15:56:10.451-08:00 | main | INFO  | Besu | Using the native implementation of the signature algorithm
2022-03-04 15:56:10.453-08:00 | main | INFO  | Besu | Starting Besu version: besu/v22.1.2-dev-6f7eeca1/osx-aarch_64/oracle-java-17
2022-03-04 15:56:10.601-08:00 | main | INFO  | Besu | Static Nodes file = /not_allowed_to_write_here/static-nodes.json
2022-03-04 15:56:10.601-08:00 | main | INFO  | StaticNodesParser | StaticNodes file /not_allowed_to_write_here/static-nodes.json does not exist, no static connections will be created.
2022-03-04 15:56:10.601-08:00 | main | INFO  | Besu | Connecting to 0 static nodes.
2022-03-04 15:56:10.602-08:00 | main | INFO  | Besu | Security Module: localfile
2022-03-04 15:56:10.609-08:00 | main | INFO  | RocksDBKeyValueStorageFactory | No existing database detected at /not_allowed_to_write_here. Using version 1
Failed to retrieve the RocksDB database meta version

To display full help:
besu [COMMAND] --help

Acceptance Criteria

Besu should provide a better error when it is unable to create/initialize the data-dir

Steps to Reproduce (Bug)

start besu with a --data-dir that the user is unable to write to

Expected behavior: [What you expect to happen]

Besu provides useful feedback about the problem before exiting

Actual behavior: [What actually happens]

Besu gives a generic error about failing to retrieve the rocksdb meta version, then exits.

Frequency: [What percentage of the time does it occur?] 100%
Versions (Add all that apply)

Software version: 22.1.x

Additional Information

I just ran into this in the wild, I'm glad you posted this issue or I'd have no idea what was happening. Thank you @garyschulte!

The log message now reads:
2022-06-02 22:55:11.294-04:00 | main | INFO  | Besu | Connecting to 0 static nodes.
2022-06-02 22:55:11.301-04:00 | main | INFO  | Besu | Security Module: localfile
2022-06-02 22:55:11.323-04:00 | main | INFO  | RocksDBKeyValueStorageFactory | No existing database detected at /not_allowed_to_write_here. Using version 1
Failed to retrieve the RocksDB database meta version: /not_allowed_to_write_here/DATABASE_METADATA.json (Operation not permitted)

authors: garyschulte jclapis sharad-develop

repo: hyperledger/besu