Crash!

events.js:163
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at exports._errnoException (util.js:1050:11)
at Socket._writeGeneric (net.js:724:26)
at Socket._write (net.js:743:8)
at doWrite (_stream_writable.js:329:12)
at writeOrBuffer (_stream_writable.js:315:5)
at Socket.Writable.write (_stream_writable.js:241:11)
at Socket.write (net.js:670:40)
at PerlLinter.lint (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\PerlLinter.js:22:23)
at validateTextDocument (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:55:12)
at documents.onDidChangeContent.lodash_1.debounce (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:35:5)
[Info  - 10:17:35] Connection to server got closed. Server will restart.
events.js:163
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at exports._errnoException (util.js:1050:11)
at Socket._writeGeneric (net.js:724:26)
at Socket._write (net.js:743:8)
at doWrite (_stream_writable.js:329:12)
at writeOrBuffer (_stream_writable.js:315:5)
at Socket.Writable.write (_stream_writable.js:241:11)
at Socket.write (net.js:670:40)
at PerlLinter.lint (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\PerlLinter.js:22:23)
at validateTextDocument (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:55:12)
at documents.onDidChangeContent.lodash_1.debounce (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:35:5)
[Info  - 10:17:37] Connection to server got closed. Server will restart.
events.js:163
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at exports._errnoException (util.js:1050:11)
at Socket._writeGeneric (net.js:724:26)
at Socket._write (net.js:743:8)
at doWrite (_stream_writable.js:329:12)
at writeOrBuffer (_stream_writable.js:315:5)
at Socket.Writable.write (_stream_writable.js:241:11)
at Socket.write (net.js:670:40)
at PerlLinter.lint (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\PerlLinter.js:22:23)
at validateTextDocument (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:55:12)
at documents.onDidChangeContent.lodash_1.debounce (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:35:5)
[Info  - 10:17:39] Connection to server got closed. Server will restart.
events.js:163
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at exports._errnoException (util.js:1050:11)
at Socket._writeGeneric (net.js:724:26)
at Socket._write (net.js:743:8)
at doWrite (_stream_writable.js:329:12)
at writeOrBuffer (_stream_writable.js:315:5)
at Socket.Writable.write (_stream_writable.js:241:11)
at Socket.write (net.js:670:40)
at PerlLinter.lint (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\PerlLinter.js:22:23)
at validateTextDocument (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:55:12)
at documents.onDidChangeContent.lodash_1.debounce (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:35:5)
[Info  - 10:17:40] Connection to server got closed. Server will restart.
events.js:163
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at exports._errnoException (util.js:1050:11)
at Socket._writeGeneric (net.js:724:26)
at Socket._write (net.js:743:8)
at doWrite (_stream_writable.js:329:12)
at writeOrBuffer (_stream_writable.js:315:5)
at Socket.Writable.write (_stream_writable.js:241:11)
at Socket.write (net.js:670:40)
at PerlLinter.lint (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\PerlLinter.js:22:23)
at validateTextDocument (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:55:12)
at documents.onDidChangeContent.lodash_1.debounce (C:\Users\andre.vscode\extensions\jackkaramanian.perl-syntax-0.0.4\server\server.js:35:5)
[Error - 10:17:44] Connection to server got closed. Server will not be restarted.

VSC: V1.18.0 x64, Windows 10. Perl 5.24.

@Yumash
It looks like you're missing a \ in the executable path.

Ah, now i see. Strange that VS Code didnt show me it with red. Sorry for inconvinience!

I have the same issue on Mac with High Sierra 10.13.2 and standard Perl v5.18.2, VS Code 1.19.1.
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at exports._errnoException (util.js:1050:11)
    at WriteWrap.afterWrite [as oncomplete] (net.js:813:14)
[Info  - 10:43:13 AM] Connection to server got closed. Server will restart.
events.js:163
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at exports._errnoException (util.js:1050:11)
    at WriteWrap.afterWrite [as oncomplete] (net.js:813:14)
[Info  - 10:43:18 AM] Connection to server got closed. Server will restart.
events.js:163
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at exports._errnoException (util.js:1050:11)
    at WriteWrap.afterWrite [as oncomplete] (net.js:813:14)
[Info  - 10:43:20 AM] Connection to server got closed. Server will restart.
events.js:163
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at exports._errnoException (util.js:1050:11)
    at WriteWrap.afterWrite [as oncomplete] (net.js:813:14)
[Info  - 10:43:22 AM] Connection to server got closed. Server will restart.
events.js:163
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at exports._errnoException (util.js:1050:11)
    at WriteWrap.afterWrite [as oncomplete] (net.js:813:14)
[Error - 10:43:24 AM] Connection to server got closed. Server will not be restarted.

I am using standard perlSyntax config that came with the extension (with perl being the executable specified).

@eych,
How long (in lines) is the file?

This should be fixed in the latest version.
It splits the text into parts of 1000 characters, and writes those to the Perl process, instead of the entire string at once.
Let me know if you encounter this again.

Thanks for looking into this!
You are right that this is connected to the size of the file. I've tried it on a really small Perl module and it worked fine. However, I still have the same problem with a file that is 858 lines long using your latest version (0.0.5).

Actually, it works when I specify the include paths for the libs that I use in the extension settings. It's only crashing on that bigger file when I don't specify any include lib and just use the default empty setting for this which came with the extension.

I found the crash to occur when Perl finds too many syntax errors. In this case, Perl exits, and any writes to its stdin fail, causing the extension to crash. This should be fixed in the latest version.


Where with variables instead of hardcoded values

I was trying to do a dynamic page re using your example in which I could type in text fields the strings to search, but I couldn't.
When I try to use variables in the Where clause, I always get 0 results.
You can try it easily by replacing this part:
WhereExample = await manager.Where<Person>(x => x.Name.StartsWith("c", StringComparison.OrdinalIgnoreCase)
|| x.Name.StartsWith("l", StringComparison.OrdinalIgnoreCase)
|| x.Name.StartsWith("j", StringComparison.OrdinalIgnoreCase) && x._Age > 35
).OrderBy(x => x._Id).Skip(1).Execute();

by this:
string cLetter = "c";
string lLetter = "l";
string jLetter = "j";
int age35 = 35;

WhereExample = await manager.Where<Person>(x => x.Name.StartsWith(cLetter, StringComparison.OrdinalIgnoreCase)
|| x.Name.StartsWith(lLetter, StringComparison.OrdinalIgnoreCase)
|| x.Name.StartsWith(jLetter, StringComparison.OrdinalIgnoreCase) && x._Age > age35
).OrderBy(x => x._Id).Skip(1).Execute();

Going deeper, debugging your Where function and inspecting the value of this line:
var asdf = preprocessedPredicate.ToString(); in (IndexDbManager.cs line # 537).
You can see that the expression doesn't get the proper values:
(with the strings hardcoded)
'x => ((x.Name.StartsWith("c", OrdinalIgnoreCase) OrElse x.Name.StartsWith("l", OrdinalIgnoreCase)) OrElse (x.Name.StartsWith("j", OrdinalIgnoreCase) AndAlso (x._Age > 35)))'

(with the variables)
'x => ((x.Name.StartsWith(value(IndexDb.Example.Pages.Index+<>c__DisplayClass24_0).cLetter, OrdinalIgnoreCase) OrElse x.Name.StartsWith(value(IndexDb.Example.Pages.Index+<>c__DisplayClass24_0).lLetter, OrdinalIgnoreCase)) OrElse (x.Name.StartsWith(value(IndexDb.Example.Pages.Index+<>c__DisplayClass24_0).jLetter, OrdinalIgnoreCase) AndAlso (x._Age > value(IndexDb.Example.Pages.Index+<>c__DisplayClass24_0).age35)))'

I hope this info helps or in case I'm missing something, please let me know!

Thanks for the details! You gave me enough that it should hopefully not take me too long to investigate and fix :)

I have faced the same problem as @gabrielca87 ,
When I try to use variables in the Where clause, I always get 0 results.
Is there a Solution For This Issue?

I also have the same problem.  Hard coded strings work fine.  But when you are passing a variable, the predicate parsing just fails.
The predicate shows the following: p => p.NAME.StartsWith(value(Fri.FieldApp.Web.Pages.Projects.SearchProjects).searchString, OrdinalIgnoreCase).
The "searchString" is my variable on the page.

I found a (painful) workaround to this issue.  But it ain't pretty.
You can create your own predicate without using the Lamda expression and it works.
        var param = Expression.Parameter(typeof(PROJECT), "p");
        var member = Expression.Property(param, "NAME");
        var constant = Expression.Constant(searchString);
        var body = Expression.Call(member, "Contains", Type.EmptyTypes, constant);
        var predicate = Expression.Lambda<Func<PROJECT, bool>>(body, param);

        var db = await dbFactory.GetDbManager(DatabaseName);
        var results = await db.Where(predicate).Execute();


feat: add goimports formatter

Checklist (adding a new tool):

[x] If it's a linter it was exported in linter/init.lua
[x] The tool was added to the README
[x] I do not wish to write a test, but I can confirm that it works on my machine OR I have written corresponding tests for the tools I added. (don't worry if you didn't write a test, it's just nice to see the green check mark)

nice


In Power BI, filters for Cyrillic Unicode words are not working.

Prerequisites:

Clickhouse on-premises, Ubuntu (project database or sandbox play.clickhouse.com (select * from actors))
Power BI Desktop, Windows
Clickhouse ODBC driver (Unicode)
Clickhouse native driver for Power BI
DirectQuery mode for the Power BI report

Steps to Reproduce:

Open Power BI Desktop
Connect to the Clickhouse database using the native connector
Create a report that calculates a count of rows where the filter parameter is an attribute containing Unicode values (Cyrillic, Chinese, and others).
Apply a filter with a Unicode value
Actual Result: Power BI Desktop throws an error: "OLE DB or ODBC error: [Expression.Error] We couldn't fold the expression to the data source. Please try a simpler expression."

Expected Result: The report successfully calculates the count of rows.
Log Analysis Findings:

The Clickhouse native connector log does not register this error. It seems that the query does not reach the connector.
The Power BI Desktop log shows that the query is generated. In the query, Unicode characters are encoded (example from the log, see the WHERE block): "SELECT [t2].[SEGMENT_RENNA_ID] AS [c52],[t2].[SEGMENT_RENNA_TXT] AS [c53],[t2].[SEGMENT_RENNA_ID] AS [o0]#(lf)FROM [DICT_DIM_SKUMATCH] AS [t2]#(lf))#(lf) AS [t0]#(lf)WHERE #(lf)(#(lf)[c53] = N'\u041C\u0420\u0416'#(lf))#(lf)#(lf)GROUP BY [c52],[o0]#(lf)ORDER BY #(lf)"
ODBC trace logs show that when Unicode values are used, question marks appear, indicating that the ODBC driver cannot correctly interpret Unicode values.

Please help us resolve this issue, as this error essentially blocks the use of Power BI. I would like to remind you that 99% of reports in Power BI are created in Power BI Desktop and subsequently published to the server.
I have attached logs at all levels, screenshots, and a video of the system's behavior.
Some articles suggest checking the same connection to excel, but this is a completely different case, since excel always downloads all the data first, after which the user uses excel to filter the data. In other words, there are no direct requests from excel to the clickhouse database
Microsoft.Mashup.Container.NetFX45.22512.2024-08-15T15-48-23-346359.log
msmdsrv.26716.2024-08-15T15-48-23-324476.log
logs.txt
[SQL.LOG](https://github.com/user-attachments/files/16725307/SQL
Microsoft.Mashup.Container.NetFX45.16788.2024-08-15T15-48-23-399625.log
Microsoft.Mashup.Container.NetFX45.29208.2024-08-15T15-48-23-339172.log
PBIDesktop.26112.2024-08-15T15-48-16-135078.log

A fragment from SQL.LOG :
Microsoft.Mashu 924c-8eec	EXIT  SQLGetData  with return code 0 (SQL_SUCCESS)
HSTMT               0x000001578954C750
UWORD                        1
SWORD                       -8 <SQL_C_WCHAR>
PTR                 0x000001578C172588 [      32] "AS-(101) ???????"
SQLLEN                  2048
SQLLEN *            0x0000002C309FD518 (32)
Pay attention to "?????"


sankey_3twos tests fail on master

As noted in #31, the sankey_3twos tests fail on master since the changes in #32. I tested this locally and also see the failures there.
For now, #31 comments out the associated tests, replacing them with a @test_broken false.

this was fixed in #36


Keyboard layout from jackpal.androidterm

Hi,
I am frequently using jackpal.androidterm, shipping with I.e. CyanogenMod.
There, the hardware volume keys are used for ctrl and also to implement i.e. cursor keys. I found this to be very effective.
Would it be possible to implement this as an alternative key layout when the volume keys are not used for font scaling?
Thanks,
Raoul

The old Vx ConnectBot fork can already remap the hardware volume keys, so maybe if that can be merged back this does not really need an over-arching plan?

@kruton any enhancement possible ?

FYI I started using termux quite some time ago.
This fits my need well enough.

Oh , @raoulbhatia can we attach volume keys to ctrl or tab or anything ?

Volume down is used for CTRL in termux.  So CTRL+C is performed by pressing volume down and C, similar like you would do on a regular keyboard.
Please check https://wiki.termux.com/wiki/Touch_Keyboard for reference.


Close InputStream

https://github.com/reiniergs/polyfill-service/blob/master/api/src/main/java/org/polyfill/api/services/XmlServiceConfigLoaderService.java#L24
try (InputStream is = serviceConfigLocation.getInputStream())

XStream closes I suppose


networking.wireless.environmentFile doesn't accept complicated paths

Describe the bug
The option "networking.wireless.environmentFile" doesn't accept paths with more than one "/".
Steps To Reproduce
Assign ./wireless.env or ../wireless.env to environmentFile (with the files in the correct locations ofc) and rebuild nixos. The rebuild is successful and the environment variables work correctly.
Assign ./secrets/wireless.env or ../../wireless.env to the attribute (from my config: environmentFile = ../secrets/wireless.env;) and rebuild . The rebuild causes a bunch of errors, among them wpa_supplicant.service: Failed to load environment files: No such file or directory.
Expected behavior
The attribute should accept any kind of value with the data type path.
Error Message
restarting the following units: wpa_supplicant.service
Job for wpa_supplicant.service failed because of unavailable resources or another system error.
See "systemctl status wpa_supplicant.service" and "journalctl -xeu wpa_supplicant.service" for details.
warning: the following units failed: wpa_supplicant.service

× wpa_supplicant.service - WPA Supplicant instance
     Loaded: loaded (/etc/systemd/system/wpa_supplicant.service; enabled; preset: enabled)
     Active: failed (Result: resources) since Thu 2024-01-11 22:07:29 CET; 257ms ago
   Duration: 6min 19.172s
         IP: 0B in, 0B out
        CPU: 0

Jan 11 22:07:29 dell-laptop systemd[1]: wpa_supplicant.service: Deactivated successfully.
Jan 11 22:07:29 dell-laptop systemd[1]: Stopped WPA Supplicant instance.
Jan 11 22:07:29 dell-laptop systemd[1]: wpa_supplicant.service: Failed to load environment files: No such file or directory
Jan 11 22:07:29 dell-laptop systemd[1]: wpa_supplicant.service: Failed to run 'start' task: No such file or directory
Jan 11 22:07:29 dell-laptop systemd[1]: wpa_supplicant.service: Failed with result 'resources'.
Jan 11 22:07:29 dell-laptop systemd[1]: Failed to start WPA Supplicant instance.
Jan 11 22:07:29 dell-laptop systemd[1]: wpa_supplicant.service: Failed to load environment files: No such file or directory
Jan 11 22:07:29 dell-laptop systemd[1]: wpa_supplicant.service: Failed to run 'start' task: No such file or directory
Jan 11 22:07:29 dell-laptop systemd[1]: wpa_supplicant.service: Failed with result 'resources'.
Jan 11 22:07:29 dell-laptop systemd[1]: Failed to start WPA Supplicant instance.
warning: error(s) occurred while switching to the new configuration

Side Note
I also noticed, that the documentation falsely says the path should be in quotes: networking.wireless.environmentFile = "/run/secrets/wireless.env";. At least I'm not doing that.
Notify maintainers
@rnhmjoj
Metadata
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.71, NixOS, 23.11 (Tapir), 23.11.20240110.3dc440f`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

I also noticed, that the documentation falsely says the path should be in quotes: networking.wireless.environmentFile = "/run/secrets/wireless.env";. At least I'm not doing that.

Are you aware of what the path type in the Nix language does?

evaluating "${./foo.txt}" will cause foo.txt in the current directory to be
copied into the Nix store and result in the string "/nix/store/-foo.txt".

Generally if you refer to a file as ./wireless.env it will be copied to the Nix store exposing it to everyone, so you wouldn't do that for environmentFiles, which are in fact meant for sideloading secrets.
That said, the networking.wireless module is actually doing toString cfg.environmentFile and passing the resulting string directly to systemd.
toString prevents the unwanted copying and converts the path value to a usual string.

The rebuild causes a bunch of errors, among them wpa_supplicant.service: Failed to load environment files: No such file or directory.

What you did, even if likely a mistake, should technically work. Are you sure you're specifying the right path?
Note that a relative path is interpreted relative to the directory of the Nix expression being evaluated.

Thanks for the help.
The reason why I want to have the wireless.env near my config is because I am planning to back up my wifi passwords in my nixos-config git repo using git crypt (I'm still working on that). I don't really care that my wifi passwords would exposed to everyone with access the the computers.
The reason why I thought that the quotation marks in the documentation were incorrect was because environmentFile = "./wireless.env"; gives this error: error: A definition for option networking.wireless.environmentFile' is not of type null or path'. and the same without the quatation marks works fine.
I just tried environmentFile = "/run/secrets/wireless.env"; and it works fine so maybe I will just use a different way of backing it up.

I am currently doing it with the absolute path and it's working fine. Should I close this issue? It's a bit weird that relative paths with more than one "/" don't work at all but I agree that it's probably a bad idea anyway.

The reason why I thought that the quotation marks in the documentation were incorrect was because environmentFile = "./wireless.env"; gives this error:

That is because the path must be absolute in order for systemd to load it. A relative path would be interpreted relative to the process cwd (so, proably /), not to your configuration.

and the same without the quotation marks works fine.

This works because the toString call is resolving the path value it into a string containg the absolute path.
To be clear, ./wireless.env would be converted to something like "/home/sebastian/my_nixos_config/wireless.env".
This is a prefectly legitimate way to do it, in fact it's what I do with my secrets. There are two things to note though:

The path may not be accessible to the user/service you are intending to configure. This is not an issue with environment files, because they're handled by systemd and it runs as root, however other users won't be able to traverse your home directory and read it. So, be sure the file is accessible.

If the module does not post-process you value with toString you will leak the secret by copying it to the store. So, remember to always use toString to be sure (calling it two times won't cause any issue).

It's a bit weird that relative paths with more than one "/" don't work at all but I agree that it's probably a bad idea anyway.

Yes, I would be interested in figuring this out, but I can't reproduce it. Can you write a minimal example?

Ok, I just tried to recreate the problem, I even rolled my system back to the stable release, but didn't get the error this time. I am pretty sure I tried everything and did everything right when I tried it 3 weeks ago but apparently not. I am really sorry to have wasted your time. If I somehow do get this error again in the future I will let you know.

No problem. I'll just close the issue for now.


RainbowDAO Protocol ink!  Phase 1.md

Project Abstract
RainbowDAO Protocol ink! is a series of smart contracts based on DAO infrastructure authorized and developed by the Rainbowcity Foundation. On the foundation of substrate development ecology, it focuses on the creation of web3 basic kits. These smart contracts are all created by the Ink! Framework. Anyone can create and manage their own DAO through RainbowDAO protocol. RainbowDAO protocol can build not only independent DAOs, but also parent DAOs, child DAOs and alliance DAOs. What's more, it can create management departments within DAOs to achieve multi-level management.
For which grant level are you applying?

[ ] Level 1:  Up to $10,000, 2 approvals
[x] Level 2:  Up to $50,000, 3 approvals
[ ] Level 3:  Unlimited, 5 approvals (for > $100k Web3 Foundation Council approval)

Application Checklist

[x] The application template has been copied, renamed ( project_name.md) and updated.
[x] A BTC or Ethereum (DAI/USDT) address for the payment of the milestones is provided inside the application.
[x] I have read and acknowledged the terms and conditions.
[x] The software delivered for this grant will be released under an open-source license specified in the application.
[x] The initial PR contains only one commit (squash and force-push if needed).
[x] The grant will only be announced once the first milestone has been accepted.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Thank you for the delivery, @RainbowcityKun. We will look into it as soon as possible.

Thank you for the delivery, @RainbowcityKun. We will look into it as soon as possible.

Thank you for the hard work of your web3 team. At present, our team has fully started the development of the protocol.

Thank you for the delivery, @RainbowcityKun. We will look into it as soon as possible.

Hello，semuelle，how was your investigation of our proposal? What content needs to be optimized or modified here? Thank you for your hard work.

I had a quick look at your application, and so far it looks good. I'm afraid it will still take some time before we can provide proper feedback, though. Most of the team is currently out of office. Please ping us again if you don't hear from us next week.

I had a quick look at your application, and so far it looks good. I'm afraid it will still take some time before we can provide proper feedback, though. Most of the team is currently out of office. Please ping us again if you don't hear from us next week.

ok, thank you very much for your feedback, and I will wait patiently. At present, our team has fully started the development of the protocol, and we will make certain additions and adjustments based on your team's feedback in the future.

Thanks for the application. Looks interesting. A few comments: Something in general to be aware of, is that we expect assets, like erc20 to live inside the assets pallet and for multisig most people will probably use the multisig pallet. So, not sure if you need to develop these as ink! smart contracts. Otherwise, I would be interested to hear if you are also thinking about something like a court, similar to the aragon court: https://anj.aragon.org/#/dashboard.

Hello, Noc2, thank you very much for your feedback. Now let me answer your questions:
1.First of all, there are two main reasons why we need to establish an ink contract for the erc20 factory.
The first point, we know that on the public welfare parachain Statemint, anyone can creat their own erc20 tokens through the assets pallet module. They are the underlying assets of the blockchain, not contract-based assets. However, the assets pallet module itself is very powerful, and there are many different options for token management. The operation complexity is relatively high, and certain basic technologies are required. At the same time, the transfer of tokens also requires cross-chain management, and relatively professional management knowledge is required to manage the issuance and destruction of tokens. This is more suitable for some large-scale project parties or project teams with technical foundations.
But our erc20 factory contract positioning here is different. Issuing erc20 contract tokens here does not require any technical foundation. Anyone can issue an erc20 token through a few basic settings, and there is no complicated management authority and is very suitable for ordinary people who do not understand any technology. At the same time, the issued tokens are a fixed number, and there is no need to issue or destroy them, and token management is very simple. This token factory is directly bound to the DAO organization it generates, and can generate corresponding governance DAOs simultaneously.
Anyone can create a DAO through the RainbowDAO protocol. It may be a large DAO, or it may be a small DAO of dozens of people. To create a very small DAO, there is no need to cross-chain the assets pallet module to create erc20 tokens. The erc20 factory contract is enough.
Therefore, the erc20 factory belongs to the basic configuration of a DAO tool product. Similar to Aragon, they also have a matching token factory module when they establish a DAO organization.
https://client.aragon.org/#/
The second point ,it is that we will add some parameters to the erc20 factory contract to record the token circulation information in the block. This helps us to use some of the advanced features of the RainbowDAO protocol. For example, in our voting weight design, there will be different voting rights calculation methods, such as one person one vote, one token one vote, or quadratic voting. At this time, we need to call this parameter to calculate the voting weight. This logic comes from compound's governance logic. However, there is no similar function in the standard assets pallet module, and we cannot ask the parachain governance party to increase the corresponding function. Therefore, an erc20 factory contract is still very necessary.
2.Secondly, regarding the issue of multisig pallet, we also have multiple considerations on this point.
The first point is that the multisig contract is one of the core functions of RainbowDAO protocol and represents our overall governance thought. First of all, through the RainbowDAO protocol, anyone can create an independent DAO organization. This DAO organization is managed by the corresponding governance DAO. However, the governance by all token holders will result in low work efficiency and execution power. Therefore, we have specially created the function of DAO department management. Any DAO organization can create multiple different departments, different departments bear different division of labor, and have a certain amount of special use of funds. Here, department management is no longer managed by the entire token holders, but by different multisig management committees. This is the further decentralization of the DAO's power. The multisig contract is used to manage the departments within the DAO, which improves the efficiency and execution of the DAO's organizational management.
Therefore, the multisig contract is one of the core functions of the RainbowDAO protocol and is essential. The RainbowDAO protocol will be deployed on different parachains in the form of smart contracts in the future to serve various types of DAO organizations on these parachains. However, there may be some parachains that do not carry multisig pallets or carry The multisig pallet cannot meet the needs of our DAO governance. Therefore, our protocol itself must have a multisig contract, so that anyone can quickly and easily deploy multisig contracts and exercise the management authority of the department.
The second point, we have also carefully studied the multisig pallet function provided by polkadot official team. There is still a certain difference between the multisig pallet here and the multisig requirement of our protocol itself. The official multisig pallet pays more attention to the management of multisig funds, and cannot be used for mutual calling of multisig management permissions. In addition, the official multisig pallet function can only be used to establish multisig  accounts between accounts that you own, and cannot use non-self-owned accounts to establish multisig accounts.
With our multisig smart contract, you can choose any wallet address or contract address as one of the multisig signers, and the function is more flexible. At the same time, the multisig contract function we designed not only manages funds, but more importantly, manages various permissions in the governance process. It can also participate in voting for various proposals through multisig signatures, and the functions are more open and combinable.
The vision of the RainboDAO protocol we designed is to realize the function of organizing Lego. Different modules can be combined, disassembled, and called each other, which can truly achieve unlimited upgrades and evolve into a vitality  protocol. The reason why we choose ink contract to build the core function of the protocol is that we value the composability and mutual calling between smart contracts.
At the same time, the multisig smart contract function we designed here is inspired by the Ethereum ecosystem's gnosis-safe, https://gnosis-safe.io/,
gnosis-safe is regarded as one of the most famous asset management protocols in the Ethereum ecosystem. Our product logic is similar to it, and has been optimized and improved on the basis of its existing functions. The multisig smart contract we designed can not only exist as a management contract of the DAO organization, and play a role in the form of a plug-in, it can also become an independent asset management protocol that functions independently of the DAO organization.
In the future, we will participate in the parachain campaign and will build a parachain with the DAO organization as the core. We will choose to design some basic low-level logic into pallet functions, and some application logic into contract functions. When we did not have our own independent parachain, we designed all the logic into an ink smart contract, so that our protocol can be deployed on any parachain without worrying about whether their underlying pallets are suitable for our protocol.
3.Regarding the function of court, https://anj.aragon.org/#/dashboard
This is also a function we have been focusing on. In the overall RainbowDAO protocol we designed, we designed a total of 12 major modules and 60 independent small systems, which will all exist in the form of plug-ins. Among them, the 12th module already contains the court system. In terms of, we also focused on the court function of aragon, and will improve it on the basis of its existing functions.
However, the function of the court was not included in our first proposal. Our first proposal is based on the RainbowDAO protocol basic framework and DAO factory. First, we realize the creation and management of a DAO organization. We will put the function of court in the second proposal. At that time, the function of court will exist in the form of plug-ins. Any DAO organization or community member can resolve disputes in the governance process through court. We will further study the specific product details and functional logic. At that time, we will elaborate on the idea of our court module in our second grant proposal.
The above is a response to some of your questions. Thank you again for your team's hard work.

Thanks for the detailed reply. I have one last question, before I share it with the rest of the team. Would you also be willing to integrate some of the UI into the deliverables? I’m mostly asking because it seems that you are already working on this anyway.

You are welcome, I am very happy to work with you. We don't just take it as the task of the grant, but really hope to make it a great project. In these two milestones, we will integrate the UI into the deliverables. As you said, our UI is already under design and will be delivered together with the smart contract.

Great! Could you integrate this into the deliverables of the milestones and update the PR?

Thanks! I just added the UI to the deliverables and updated the PR.

Thanks for the update. I will share the application with the rest of the team.

OK, thank you very much! Our team is already working hard to develop the protocol, and we will definitely create a great project!

Hi, @semuelle, thank you for your wonderful questions, each question is very representative and constructive::

In the protocol diagram, the factory contract is connected to the protocol, RBD token and governor. Does that mean that my DAO would be subject to, for example, fees that the RBD token holders agree on?

First of all, the DAO I established here is not controlled by the holders of RBD, it is controlled by the holders of our own governance token.
Our protocol is mainly divided into two layers, one is the basic protocol layer, which is controlled by the governance DAO of RBD through voting. This basic protocol layer belongs to the overall infrastructure of the RainbowDAO protocol and consists of six parts.The first is the rainbow core contract, the second is the membership management contract, the third is the revenue management contract, the fourth is the web3 suite tool contract, the fifth is the DCV controller contract, and the sixth is the DAO factory contract.
The DAO factory contract also belongs to the second layer of the RainbowDAO protocol, which is mainly used to control and manage the DAO created by the protocol.
RBD holders can control the parameters of these six modules through the RBD governance DAO, such as changing the protocol revenue parameters, adding various DCV controllers, adding or deleting protocol plug-ins, and so on.
But RBD holders cannot control the independent DAO created by the DAO factory. Each independent DAO establishes its own governance DAO by binding its own governance token, and finally realizes the governance and upgrade through its own governance DAO.

What purpose does the membership management contract serve? Usually, in DAOs, token holders are the members. How does one become a member? What identity information do you plan on storing? What recommendations do you plan on implementing?

In our protocol design, the membership management contract belongs to the basic protocol layer of the RainbowDAO protocol, and we will build an independent identity ID system. It exists independently of each DAO, but each DAO member can use this identity system. Anyone can become a member through the registration function, regardless of whether he is a member of the DAO.
At the beginning, we mainly store two types of information, one is the basic information of members, such as user name, avatar, personal introduction, twitter and other basic information; the second is to store the member recommendation information of the entire protocol.This recommendation system belongs to the plug-in of the entire protocol, and each independent DAO can freely choose whether to use this recommendation system. If it chooses to use this recommendation system, it can also customize the level of recommendation and the ratio of rewards. All can be set flexibly.
In the future, as the protocol continues to upgrade, we will integrate more functions, such as RainbowDAO employee recruitment system, RainbowDAO work reporting system, daily, weekly or monthly reports, and RainbowDAO reputation system and credit system. These systems will be integrated into the RainbowDAO overall protocol in the form of plug-ins in the future. At present, we can only provide the basic framework, and cannot provide detailed information about each function. This needs to be improved step by step as the protocol continues to develop.

You mention the ability to upgrade the protocol. Will the smart contracts be upgradable, i.e. can I swap my treasury management contract after deployment?

Here, our protocol upgrade capability is mainly controlled by the governance DAO of RBD holders, which controls the parameters of each basic protocol layer, and achieves protocol upgrades through the modification of this parameters. At the same time, the governance DAO of RBD holders can also control the routing contract in the Rainbowcore contract. The routing contract can change the contract addresses of some corresponding contracts, so as to replace the deployed contracts and achieve the upgrade of the protocol.
The treasury management contract you mentioned belongs to the created independent DAO treasury management contract. It is not controlled by the holders of the RBD. It is controlled by the governance DAO created by the governance tokens bound to it. When the DAO is deployed, it cannot directly change its treasury contract address, but it can create a new departmental treasury by establishing a new department, and it can transfer funds through voting.

You mention composability. Does that mean that I can deploy a DAO without a governance token, infrastructure contract and proposal management contract, if I wanted to?

Yes, it is absolutely possible. All of our functional modules exist in the form of plug-ins. When I deploy a DAO, I can freely choose each functional module according to my actual needs. I can build a very complex DAO that can accommodate tens of thousands of people, and I can also build a very simple DAO with only a few dozen people. We hope to finally realize the vision of DAO Lego, which can be combined freely or disassembled freely. Everything is based on the actual needs of each DAO, so that we can truly realize the diversified needs of DAO. Any type of DAO can be customized to suit their actual needs through our protocol.

Thanks for the thorough response, @RainbowcityKun. From your description the recommendation system sounds more like an endorsement or _com_mendation system. Is that what you mean? It certainly makes more sense than what I had in mind. Anyway, I'm happy to proceed.

Hi, @semuelle, thank you very much for your patience. Sorry, English is not my native language, so it is not very accurate in terms of using words. In the future, I will try to use more precise words to express my meaning.
Here, the recommendation system is not an endorsement or commendation system. It is an invitation system. The invitation relationship is constructed by generating an invitation code, and then a certain bonus distribution is obtained. This is a basic function.
In future versions, we will build a recruitment system, work reporting system, credit system, reputation system and medal system on the basis of this membership, each of which will be an independent system and be installed on the basic protocol in the form of a plug-in unit. This will involve more complex personnel management. In this way, we can provide more diversified tools for DAO management and governance to adapt to the needs of different DAOs. These are future development plans and are not in this version.

Thanks for the clarification, @RainbowcityKun. I think your application is easy to understand. We just get applications involving recommender systems ("if you like X, you might like Y") occasionally, so it's good to have this clarified.

Thanks for the clarification, @RainbowcityKun. I think your application is easy to understand. We just get applications involving recommender systems ("if you like X, you might like Y") occasionally, so it's good to have this clarified.

Yes, thank you for your recognition. In the description of future product functions and logic, we will also be as accurate as possible.


Drop avatars from attachments

Something I have in mind, but never tracked, I would really see at some point the option to upload avatars as attachments to go away.
Attachments should be just that, not mixture of stuff.
Avatars should just be uploaded to a directory and directly accessible from the outside world.
Of course that would require attention to possible tricky files (re-encoding should be a must... even though that would make animated gif a little hard to deal with unless we can rely on Image Magick), but it would clean up a lot of mess. IMO.

Not just animated GIFs. You'd probably increase the file size of just about any file I'm likely to attach. To quote a bit of my attachment philosophy (but it's equally applicable to avatars).

A screenshot of your comment is 16kB in PNG. Subsequently running pngquant gives a 6.2kB result with no discernible loss in quality. A libjpeg optimized JPEG looks alright at 14-18kB, but it has some relatively minor artifacts. You can easily reach about 6kB with JPEG as well, but the artifacts then become really distracting to the point where it looks more like one of those illegible CAPTCHAs.
These results indicate that the system should check how filesize compares between e.g. carefully crafted PNGs and its own low-quality JPEGs, otherwise it shoots itself in the foot (emphasis added). For that matter, it really shouldn't add another layer of noise to a properly optimized JPEG either. In the past I've uploaded a JPEG to Facebook, which consequently made the file bulkier and uglier.
Above all, however, this blog is not Facebook. Like I indicated before, screenshots are doubtless the primary use case, not photos. I'd say simply reject all images over 200kB, or possibly even as little as 50kB. Give some pointers about how to optimize files, but don't let the system muck about with it. I know, tough love, but I see no added value in shrunk low-quality JPEG images.

 Multiplied, in the worst case, by the number of members of your board. And let's not forget that if the avatar is bigger than the defined size, it is resized (with GD or IM), so it doesn't really change that much, unless you resize all the avatars of your members... are you?
Have avatars in the attachments system is a P.I.T.A. because it forces us to query the database any time we need to know the avatar of a user, having the avatars directly accessible from the outside with a defined naming scheme (e.g. {id_member}_avatar_b.png, {id_member}_avatar_m.png, {id_member}_avatar_s.png for big, medium, small) would give us the option to even forget about the img tag and use instead CSS for avatars as well (no idea if it is worth, just an option).

Oh, there really shouldn't be any special DB queries on a per avatar basis.  ;) The only thing that makes sense is something like a has_avatar column for a little check where avatars are displayed.
On your 150x150px, I'd say that with "HiDPI" monitors being standard now[1] that should really be x2 with e.g. srcset and sizes (and some kind of JS polyfill for browsers that don't support this stuff natively). Generating the "regular" size image is something the server should probably do. My concern with image size is page loading time and (mobile) data waste, not server storage space.
Taking my own avatar with a purposefully reduced color palette (for artsy reasons) on ElkArte.net as an example.

The regular optipng -o7 PNG is 15.8 kiB while the pngquant version is 8.2 kiB. Resaving it with ImageMagick results in 15.8 kiB again. So even if everyone had my minuscule avatar, that might easily approach over 200 kiB extra per forum page, because who goes with the extremely low default of 15 posts per page anyway? =P
$ du -h avatar.png
16K	avatar.png
$ pngquant avatar.png
$ du -h avatar-fs8.png
8.0K	avatar-fs8.png
$ convert avatar-fs8.png avatar-resaved.png
$ du -h avatar-resaved.png
16K	avatar-resaved.png

And since JPEG results in quality loss, imo as a rule of thumb only PNG is acceptable and nothing should be done if the resulting image after processing is of a bigger size than the original. Unfortunately, as far as I'm aware PHP only typically comes with ImageMagick modules and nothing like OptiPNG. pngquant is also unacceptable because that is (or easily can be) lossy, and it's not available anyway.
tl;dr Some people optimize their images and undoing their work Facebook style is like a slap in the face. Even more so because ElkArte, like its relative Wedge, is "like Facebook, but not for dummies" (source).
[1] I might be getting ahead of myself there, but I've had mine for over a year and it's fantastic.

Yeah I really wanted to eliminate the db query stuff in 1.0 but there were bigger problems to fix.
I'd like to see Avatars with a thumbnail (120x120?) and normal (250x250?) sizes, just like attachments.  The thumb is used (and css smaller ones of that thumb) as needed in most places, board index, etc
In some areas, like profile, the thumb links to the larger image, like Github does as well as some other forum packages.
The file-size is an interesting item ... could check to see if the created is > what was uploaded and act accordingly but I can see some issues with that as well.

This was addressed in 2.0


Add License

Just noticed there is currently no license md or a license mentioned in the Cargo.toml. It would be great if you could license this under a permissive license. E.g. MIT or Apachev2.

Good catch! I meant to release this under the Rust-usual MIT/Apache 2 combo. Will add in a second.

Awesome thanks for adding this so quickly


doc: can not find document about type/const/var declare reference rule in the package scope and a function scope.

Please tell me wrong, if this stuff is already appeared in the document, I just do not find it.
I am writing a tool to find all reference source code of a program. I notice that follow program can not compile:
package main

import "fmt"

func main(){
	type t1 struct{
		f1 t2
	}
	type t2 struct{
	}
	fmt.Println(&t1{})
}

you will get an error main.go:7:6: undefined: t2.
But following program can compile:
package main

import "fmt"

func main(){
	fmt.Println(&t1{})
}

type t1 struct{
	f1 t2
}
type t2 struct{
}

So where is the document of type declare order in different scope?Will this behavior change in next golang version?
The best thing I can find is here: https://golang.org/ref/spec#Declarations_and_scope
The scope of a constant or variable identifier declared inside a function begins at the end of the ConstSpec or VarSpec (ShortVarDecl for short variable declarations) and ends at the end of the innermost containing block.
The scope of a type identifier declared inside a function begins at the identifier in the TypeSpec and ends at the end of the innermost containing block.

But it is not same as the type/const/var reference rule in package scope. It does match the behavior in the function scope.

@bronze1man
please try
func main(){
        type t2 struct{
	}

	type t1 struct{
		f1 t2
	}

	fmt.Println(&t1{})
}

please try
Thanks @ztkmkoo , I know it works.
And I never wrote code that reference another type in a type declare in function scope before today. So I come across this problem only after I start write my reference finder tool.
I just want to know whether this behavior will never change in go1.

Sorry, I'm not sure what you are asking.  You cite the exact part of the spec that answers your question.  It says "The scope of an identifier denoting a constant, type, variable, or function (but not method) declared at top level (outside any function) is the package block" and "The scope of a type identifier declared inside a function begins at the identifier in the TypeSpec and ends at the end of the innermost containing block."  It seems like those two sentences exactly answer your question.


add: transcript syncing

feat: add transcript syncing with Sourcegraph Cloud
Added chat transcript syncing with dotCom behind a feature flag.

This adds the ability to sync th chat transcript with Sourcegraph Cloud if the Cody endpoint is on DomCom.
Added a new feature flag 'cody-chat-transcript-sync' controls this behavior.

Test plan

Waiting for @akalia25 's team to confirm where we should log the transcript

replaced by https://github.com/sourcegraph/cody/pull/1976


Prototype Pollution in async

Can you please update the package version used?
https://github.com/advisories/GHSA-fwr7-v2mv-hh25

A vulnerability exists in Async through 3.2.1 for 3.x and through 2.6.3 for 2.x (fixed in 3.2.2 and 2.6.4), which could let a malicious user obtain privileges via the mapValues() method.

Addressed in #288. Released in:

https://www.npmjs.com/package/lightstep-tracer/v/0.33.0
https://www.npmjs.com/package/lightstep-tracer/v/0.33.0-no-protobuf


Add Android Test Project

Runs on the emulator with veldrid-spirv updated with binaries from https://github.com/mellinoe/veldrid-spirv/pull/19.

Emulator fails the following tests:

OpenGLESRenderTests.WriteFragmentDepth (CopyRoundabout InvalidEnum)
OpenGLESTextureTests.FormatCoverage_CopyThenRead

R16_G16_B16_A16_SInt
R16_G16_B16_A16_SNorm
R16_G16_B16_A16_UInt
R16_G16_B16_A16_UNorm
R16_G16_SInt
R16_G16_SNorm
R16_G16_UInt
R16_G16_UNorm
R16_SInt
R16_SNorm
R16_UInt
R16_UNorm

OpenGLESTextureTests.Update_ThenCopySingleMip_Succeeds_R16UNorm
OpenGLESTextureTests.Update_ThenMapRead_SingleMip_Succeeds_R16UNorm

Example FormatCoverage failure

[emuglGLESv2_enc] device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glReadPixels:4831 GL error 0x500 condition [!GLESv2Validation::readPixelsType(type)]

https://android.googlesource.com/device/generic/goldfish-opengl/+/emu-master-qemu-release/system/GLESv2_enc/GL2Encoder.cpp#4076
https://android.googlesource.com/device/generic/goldfish-opengl/+/emu-master-qemu-release/system/GLESv2_enc/GLESv2Validation.cpp#244
It seems like GLES glReadPixels is very strict about accepted types https://www.khronos.org/registry/OpenGL-Refpages/es3.0/html/glReadPixels.xhtml.
 Only two format/type parameter pairs are accepted. For normalized fixed point rendering surfaces, GL_RGBA/GL_UNSIGNED_BYTE is accepted. For signed integer rendering surfaces, GL_RGBA_INTEGER/GL_INT is accepted. For unsigned integer rendering surfaces, GL_RGBA_INTEGER/GL_UNSIGNED_INT is accepted. The other acceptable pair can be discovered by querying GL_IMPLEMENTATION_COLOR_READ_FORMAT and GL_IMPLEMENTATION_COLOR_READ_TYPE. The implementation chosen format may also vary depending on the format of the currently bound rendering surface.

Other engines appear to read GL_RGBA, GL_UNSIGNED_BYTE and then do pixel conversions https://github.com/godotengine/godot/blob/095c72b03ecedde87bf9e4aac0f8576d829dd9ee/drivers/gles3/rasterizer_storage_gles3.cpp#L1033 https://github.com/OGRECave/ogre/blob/65f90ac18cf3b9566b3a8928f1006588899a73fd/RenderSystems/GLES2/src/OgreGLES2HardwarePixelBuffer.cpp#L373.
Also runs on device (Galaxy Note9)

Added test to dump backend info:


Any fix coming soon for the currency tab issue ?

Procurement 1.9.9 has been released, which fixes this issue!
https://github.com/Stickymaddness/Procurement/releases/tag/1.9.9


[WIP] Adding stream listener to stream changes in child nodes

Hi,
This PR's original intent is to add stream listener function to fire a callback function when changes in the database is detected. It is a revival of this https://github.com/firebase/firebase-admin-python/pull/50 1-year-old PR and also based on the code contributed by @rizasif and @Aqsa-K in that PR. This PR is mainly to serve 3 purposes.

Update the old PR with a rebase on master
Clean up, refactor & fix lint errors
Write tests

For now, I have completed the first and second of the above. Please advise me on how to properly write the test in PyTest. I tested the code manually by defining callback and manually modifiying data in my firebase demo project. And it seems to be fired everytime I made changes. I read through the existing test suite and I cannot think of a way to write into it yet.
Changes:

lint.sh : Ignore directive for "protected-access"
firebase_admin/sseclient.py : SSE client module
firebase_admin/db.py : Streaming functionality
New API call: database.reference('/xxx').stream(callbackFunc)

Regards

Please revert the changes to lint.sh. Instead add the directives to the lines in the source files where the lint errors should be ignored.
Rename sseclient.py to _sseclient.py so it will be considered an internal module.
For unit testing, you can mount an adapter on the requests.Session object and have it return some fake events (I think). See how we do something similar in the existing tests:
https://github.com/firebase/firebase-admin-python/blob/70d98173cdb3df6bc494b076717f3970f9029a7e/tests/test_db.py#L128-L132
The MockAdapter used in the above example responds to requests made by the SDK with a fake response. You will probably end up writing a similar adapter that responds with a fake stream of events.

Hi, I have added the test for SSEClient code. I'm not sure if I did it correctly or not. I added MockSSEClientAdapter() which is a subclass of MockAdapter. And I captured the actual event raw response and put it in payload. But somehow when I run the test, the MockSSEClient actually sends out Bytes object which is expected, but inside SSEClient code's response.iter_content returns bytes instead of string. I compared it with the my program to actually communicate with the server, and somehow iter_content returns string. Therefore for now, I added a check for the type in SSEClient, to call decode() if the nextchar from response.iter_content is a bytes object.
                nextchar = next(self.resp_iterator)
                if isinstance(nextchar, bytes):
                    nextchar = nextchar.decode()
                self.buf += nextchar

Python will raise TypeError: Can't convert 'bytes' object to str implicitly if executed the test withouth this check. Is there anyway to modify the MockSSEClientAdapter or the parent class, to make it's response.iter_content return string instead of bytes?
But I'm not sure about this check yet so I haven't committed this change. Please comment.

Hi @the-c0d3r. I think this is due to the way iter_content() is implemented in requests:
http://docs.python-requests.org/en/master/_modules/requests/models/#Response.iter_content
There are couple of things you can try out.

Try setting resp.raw.stream = True before returning from send().
Try setting an encoding on the mock response as it is expected here.

One of these is likely to fix the issue.

Thanks @the-c0d3r. This still needs to go through our internal API review process (which I have already initiated). We might get some feedback from that, which will need to be implemented -- but we can do that in steps, after merging this one. I will also take another closer look at all the code here, and post some feedback.

Hi @hiranya911, I believe I have addressed all of your comments with my latest commits, except the part about the closing of the stream. I wrote a simple python code to just setup stream and close it and record the timing. It returned within 100 ms. But somehow when executing the code line by line manually in python shell, it would take over 10 seconds to close the stream (aka time taken for python to return control to user). It will take me some time to debug this since I don't know much about requests module's internals. If you can shed some light on it, that would be great.

+1

@the-c0d3r the internal review process for this is chugging along. I will have an update for you next week.

Hi @hiranya911 thanks for the update. I have synced the PR with the latest master. If there are any further tasks, please let me know.

@the-c0d3r I have some feedback. Once they are implemented, I can merge this PR:

Rename the stream() method to listen().
Rename the Stream type to ListenerRegistration.
Remove the stream_id parameter from the listen() method.

Let me know if you have any questions.

Hi, I think I have addressed those feedbacks. Please take a look.

Thanks @the-c0d3r. This looks pretty solid. I'll merge it shortly. I'll intend to do a bit of work on top it over the next few days, before release.

Upon taking another look, this might have a problem. I don't see how the credentials are passed into the underlying session.

Ok, managed to fix the issue. I'll send a separate PR with the fix.


IP address/prefix membership queryset filters don't work in RBAC permissions

Environment

Python version: 3.9
Nautobot version: 1.1.3

Steps to Reproduce

In the admin page, create a new permission ( USERS | Permissions | Add )
Enter values:
Name: constrainted_permission
Actions: view, add, change, delete
Object types: ipam > IP address
Constraints:  [{"host__net_host_contained": "<IP_ADDRESS>/24"}]
Save

Expected Behavior
Permission saved with no error.
The permission with this constraint should behave as it did in Netbox (previous to https://github.com/nautobot/nautobot/pull/78# ) with the constraint [{"address__net_contained": "<IP_ADDRESS>/24"}]

Observed Behavior
Saving the permission returns the following error:
Invalid filter for <class 'nautobot.ipam.models.IPAddress'>: Unsupported lookup 'net_host_contained' for VarbinaryIPField or join on the field not permitted.
Also, trying to use the previous queryset filter from Netbox  [{"address__net_contained": "<IP_ADDRESS>/24"}] gives the following error:
Invalid filter for <class 'nautobot.ipam.models.IPAddress'>: Cannot resolve keyword 'address' into field. Choices are: _custom_field_data, assigned_object, assigned_object_id, assigned_object_type, assigned_object_type_id, broadcast, created, description, destination_for_associations, dns_name, host, id, interface, last_updated, nat_inside, nat_inside_id, nat_outside, prefix_length, primary_ip4_for, primary_ip6_for, role, services, source_for_associations, status, status_id, tagged_items, tags, tenant, tenant_id, vminterface, vrf, vrf_id

Implemented by #1007.


Test Data Structures to ensure they are compatible

References #16

[ ] The data structures used for 2d Points and systems of linear equations should be tested for accessibility and easy manipulation
[ ] Ideally, find a C++ function to use within python to test these structures and ensure they work as expected

Python libraries (sciPy numPy) for using linear equations linked and working.
This task is a basic verification and not a thorough test.  Want to verify that the C++ cyPackage files linked from Task #25 are working as expected. Walked through the C++ coded and verified some dependencies. Found the C++ files in /util/cyCodeBase that are actually needed in the sample elimination phase.
Considered removing the unnecessary files in /util/cyCodeBase for simplicity while some files can be kept. Like some graphics files may be useful in plotting and graphing but aren't strictly necessary.  For example the C++ files referencing WebGL and GLSL. These languages are useful for graphics and utilize parallelism on the GPU.  The PointCloud class is also setup for parallelism but it is not currently being utilized.
Could revisit these parallelism possibilities
[t:45]


fix(node): exhaust next buffer parts

allows multiple parts within/across a chunk

Only browser tests are failing


merge nlp+hf notebooks

by "merge" we mean delete the nlp notebook. the HF notebook does the same thing as the nlpnotebook and is now our recommended path to train with HF models.

I think we're good with this. I transferred the tensorboard logging in this pr. The only difference between the two notebooks are that this one uses the huggingfacemodel class.


Wont' need for our work.


merge with alex's repository

fixed a minor bug in function prepare_line_list_pass1
fixed a major bug in project_mask!
updated masks to be 2-column format with sorted wavelengths

Please remove the masks from the PR.  Those are data files for one specific project, rather than part of a general package.

Do you know why these checks failed / what that means? They passed before, and all I did was remove the extra masks and change the Project.toml file which wasn't even using DataStructures...

Do you know why these checks failed / what that means? They passed before, and all I did was remove the extra masks and change the Project.toml file which wasn't even using DataStructures...

Oh, I think I broke something between when you opened the PR and updated it.  I'll look into it.


Transpilation error with a 'let'-declared var in a case statement.

Our parser considers the second child of a case node to be a block, even if there are no {} in the source. So, for this code:
var foo = 0;
switch (foo) {
  case 0:
    let y = 1;
  default:
    console.log(y);
}

Traceur converts it to
var foo = 0;
switch (foo) {
  case 0:
    var y = 1;
  default:
    console.log(y);
}

which I believe is correct, and prints 1, whereas we get an error when trying to transpile:
ERROR - variable y is undeclared
    console.log(y);
                ^

It's fixed by https://github.com/google/closure-compiler/issues/1208
$ java -jar build/compiler.jar --language_in=ES6 --language_out=ES5 test.js
var foo=0;switch(foo){case 0:var y$0=1;default:console.log(y)};


PnP management shell ID doesn't work anymore

Discussion about the issue:
https://old.reddit.com/r/sysadmin/comments/1fe9af9/microsofts_latest_surprise_entra_id_app/
https://github.com/pnp/blog/issues/1909
announcement: https://pnp.github.io/blog/post/changes-pnp-management-shell-registration/

I noticed that it stopped working two days ago but hadn't seen that announcement. Thank you for linking to it!
I think if you create a new Entra ID app and replace the value of the "pnp_management_shell_client_id" variable in teams_chats_export.py with your app id, it should work.
I need to try that myself and if it works, I'll create a more user-friendly way to set that variable.


Barcode support

Is it possible to use barcodes or QR codes? Has anyone already tried that?

I just installed an Code128 barcode font to the linux system and it's working very nice.

I just installed an Code128 barcode font to the linux system and it's working very nice.

Hi, can you explain more detail how you did that?
Because after I added code128 font I can get barcode on document but noone scanner can't read it.
Thank you.

Hi, Carbone Render and Carbon Studio (Entreprise Edition) are actually supporting ean13, code39 and ean8 barcodes. We will add code128 support really soon.


Replace ShouldBind with ShouldBindJSON

ShouldBind not work when user submit from without any data
but if we add ShouldBindJSON it return response with appropriate data

ShouldBind not work when user submit from without any data but if we add ShouldBindJSON it return response with appropriate data

Hi
I checked your solution and it works, but I have one minor point
We have the same logic in file provider/jwt_auth.go, I think we should change it as well
Also, while I was testing your solution I found another, but similar problem
When we are trying to send a request not with an empty body, but with an empty JSON object we also receive a 500 error

if you want i can fix those issues too and send you PR
Md.Atiqul Haque
Senior Software Engineer(BackEnd)
Mobile: +8801710377025
https://www.shohoz.com/ https://www.facebook.com/shohoz
https://www.linkedin.com/company/shohoz/ https://www.youtube.com/shohoz
https://www.instagram.com/insta_shohoz
On Thu, 9 May, 2024 at 11:03 AM, Yaroslav Kovalov @.***>
wrote:

ShouldBind not work when user submit from without any data but if we add
ShouldBindJSON it return response with appropriate data
Hi
I checked your solution and it works, but I have one minor point
We have the same logic in file provider/jwt_auth.go, I think we should
change it as well
Also, while I was testing your solution I found another, but similar
problem
When we are trying to send a request not with an empty body, but with an
empty JSON object we also receive a 500 error
—
Reply to this email directly, view it on GitHub
https://github.com/nix-united/golang-gin-boilerplate/pull/2#issuecomment-2101940041,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOS6UQJS5WIIZLJX725L5LZBL7RLAVCNFSM6AAAAABG2N4HNOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBRHE2DAMBUGE
.
You are receiving this because you authored the thread.Message ID:
@.***>

if you want i can fix those issues too and send you PR Md.Atiqul Haque Senior Software Engineer(BackEnd) Mobile: +8801710377025 https://www.shohoz.com/ https://www.facebook.com/shohoz https://www.linkedin.com/company/shohoz/ https://www.youtube.com/shohoz https://www.instagram.com/insta_shohoz
…
On Thu, 9 May, 2024 at 11:03 AM, Yaroslav Kovalov @.> wrote: ShouldBind not work when user submit from without any data but if we add ShouldBindJSON it return response with appropriate data Hi I checked your solution and it works, but I have one minor point We have the same logic in file provider/jwt_auth.go, I think we should change it as well Also, while I was testing your solution I found another, but similar problem When we are trying to send a request not with an empty body, but with an empty JSON object we also receive a 500 error — Reply to this email directly, view it on GitHub <#2 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOS6UQJS5WIIZLJX725L5LZBL7RLAVCNFSM6AAAAABG2N4HNOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBRHE2DAMBUGE . You are receiving this because you authored the thread.Message ID: @.>

This pull request will be merged If you replace this logic in provider/jwt_auth.go file as well
And of course, you can create another request with some new improvements

This pull request will be merged If you replace this logic in
provider/jwt_auth.go file as well
sure i will do  this  too
Md.Atiqul Haque
Senior Software Engineer(BackEnd)
Mobile: +8801710377025
https://www.shohoz.com/ https://www.facebook.com/shohoz
https://www.linkedin.com/company/shohoz/ https://www.youtube.com/shohoz
https://www.instagram.com/insta_shohoz
On Thu, 9 May, 2024 at 11:12 AM, Yaroslav Kovalov @.***>
wrote:

if you want i can fix those issues too and send you PR Md.Atiqul Haque Senior
Software Engineer(BackEnd) Mobile: +8801710377025 https://www.shohoz.com/
https://www.facebook.com/shohoz https://www.linkedin.com/company/shohoz/
https://www.youtube.com/shohoz https://www.instagram.com/insta_shohoz
… <#m_-4283393339882891086_>
On Thu, 9 May, 2024 at 11:03 AM, Yaroslav Kovalov @.> wrote:
ShouldBind not work when user submit from without any data but if we add
ShouldBindJSON it return response with appropriate data Hi I checked your
solution and it works, but I have one minor point We have the same logic in
file provider/jwt_auth.go, I think we should change it as well Also, while
I was testing your solution I found another, but similar problem When we
are trying to send a request not with an empty body, but with an empty JSON
object we also receive a 500 error — Reply to this email directly, view it
on GitHub <#2 (comment)
https://github.com/nix-united/golang-gin-boilerplate/pull/2#issuecomment-2101940041>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOS6UQJS5WIIZLJX725L5LZBL7RLAVCNFSM6AAAAABG2N4HNOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBRHE2DAMBUGE
https://github.com/notifications/unsubscribe-auth/AAOS6UQJS5WIIZLJX725L5LZBL7RLAVCNFSM6AAAAABG2N4HNOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBRHE2DAMBUGE
. You are receiving this because you authored the thread.Message ID: @.>
This pull request will be merged If you replace this logic in
provider/jwt_auth.go file as well
And of course, you can create another request with some new improvements
—
Reply to this email directly, view it on GitHub
https://github.com/nix-united/golang-gin-boilerplate/pull/2#issuecomment-2101949134,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAOS6USRGM7TODDSBBYEYWDZBMAUDAVCNFSM6AAAAABG2N4HNOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBRHE2DSMJTGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

Fixed, Please check my recent commit
https://www.shohoz.com/ https://www.facebook.com/shohoz
https://www.linkedin.com/company/shohoz/ https://www.youtube.com/shohoz
https://www.instagram.com/insta_shohoz


PROPOSAL: Authorization Scopes MUST be expressed as ZCAPs encoded as GNAP Structured Scopes

Per our conversations in the WG, we are aware that GNAP supports JSON representations for scopes, and that the only requirement is that they contain a type attribute. We are also aware that zcap-ld makes use of JSON can can include a suitable type attribute.
This proposal is to adopt support for both for the data model associated with authorizations, as separate from the invocation / proof of possession mechanism.
We are currently considering HTTP Signatures as one such mechanism.

@dlongley @msporny I would like to formalize the "root" / "default" capability that ends in a did document:
{
  "@context": [
    "https://www.w3.org/ns/did/v1",
    {
      "@base": "did:key:z6MkiVubMsUd4FxeApa1yd8YEigVvE5dmr2KWgUaR6CP5kKK"
    }
  ],
  "id": "did:key:z6MkiVubMsUd4FxeApa1yd8YEigVvE5dmr2KWgUaR6CP5kKK",
  "verificationMethod": [
    {
      "id": "#z6MkiVubMsUd4FxeApa1yd8YEigVvE5dmr2KWgUaR6CP5kKK",
      "type": "JsonWebKey2020",
      "controller": "did:key:z6MkiVubMsUd4FxeApa1yd8YEigVvE5dmr2KWgUaR6CP5kKK",
      "publicKeyJwk": {
        "crv": "Ed25519",
        "x": "PBxdXNPcGKPhXwSj6lLId97-9c1_dgYjDLC0sLCRLVI",
        "kty": "OKP"
      }
    },
    {
      "id": "#z6LSscWjDj3WhzBk23JXTYm4Vmh2kAZ69GKXDVhvzpUm4ghz",
      "type": "JsonWebKey2020",
      "controller": "did:key:z6MkiVubMsUd4FxeApa1yd8YEigVvE5dmr2KWgUaR6CP5kKK",
      "publicKeyJwk": {
        "kty": "OKP",
        "crv": "X25519",
        "x": "7MrJ0voGrqpEhvFDZZILphipoIrUA3D-2nc8gGLscB0"
      }
    }
  ],
  "authentication": [
    "#z6MkiVubMsUd4FxeApa1yd8YEigVvE5dmr2KWgUaR6CP5kKK"
  ],
  "assertionMethod": [
    "#z6MkiVubMsUd4FxeApa1yd8YEigVvE5dmr2KWgUaR6CP5kKK"
  ],
  "capabilityInvocation": [
    "#z6MkiVubMsUd4FxeApa1yd8YEigVvE5dmr2KWgUaR6CP5kKK"
  ],
  "capabilityDelegation": [
    "#z6MkiVubMsUd4FxeApa1yd8YEigVvE5dmr2KWgUaR6CP5kKK"
  ],
  "keyAgreement": [
    "#z6LSscWjDj3WhzBk23JXTYm4Vmh2kAZ69GKXDVhvzpUm4ghz"
  ]
}

Yields something like:
{
    "@context": "https://w3id.org/security/v2",
    "id": "https://example.com/edvs",
    "invocationTarget": "https://example.com/edvs",
    "controller": "did:key:z6MkiVubMsUd4FxeApa1yd8YEigVvE5dmr2KWgUaR6CP5kKK",
    "invoker": "did:key:z6MkiVubMsUd4FxeApa1yd8YEigVvE5dmr2KWgUaR6CP5kKK#z6MkiVubMsUd4FxeApa1yd8YEigVvE5dmr2KWgUaR6CP5kKK",
    "delegator": "did:key:z6MkiVubMsUd4FxeApa1yd8YEigVvE5dmr2KWgUaR6CP5kKK#z6MkiVubMsUd4FxeApa1yd8YEigVvE5dmr2KWgUaR6CP5kKK"
  }

I think we need to add type to this, so that it can be requested using GNAP, and also establish a convention for generating the id.
This first capability should IMO be invoked by folks who are trying to create a new vault.


[Enhancement] Improve UI of Sign in & Sign up Screen.

Improve UI for Sign In & Sign Up Screen

@Vishwajith-Shettigar please assign me this issue under hacktoberfest & gssoc-ext.


can not download the pre-train model.

Hi,
first appreciating for this great work.
When I try to download the pre-train model through the link,
(http://bigvid.fudan.edu.cn/pixel2mesh/eccv2018/checkpoint.zip)
the website must need to log-in to Fudan University account, unfortunately I can't.
May I get the model from other free-space?
Thanks a lot!

@FeiHsiang
https://drive.google.com/file/d/1dJLuHDkhEiFQIClbDw6_qDyyWWe9pGWT/view?usp=sharing

@nywang16
Thanks a lot for your quick reply!
I will try to use it as soon as I can.

Hi,
Do you know how to download the dataset and unzip it from the link below?
https://drive.google.com/open?id=131dH36qXCabym1JjSmEpSQZg4dmZVQid


[RFE] cmd/kubectl-version: Add more information to version command

Current situation
With the new information added to the version command, it is now possible to be sure we are running the same version on the client and server side:
$ ./kubectl-gadget version
Client version: v0.10.0
Server version: v0.10.0

However, during development, we get this:
$ ./kubectl-gadget version
Client version: v0.8.0-55-g4289e7627b24-dirty
Server version: my-branch-name

We cannot be sure we are running the same version with such information.
Ideal future situation
As discussed in https://github.com/inspektor-gadget/inspektor-gadget/pull/977#discussion_r997982715, we could add more information as kubectl does.
The question is, what information can we add to ensure we are using the same version on both sides?

We cannot be sure we are running the same version with such information.

I don't see how we can improve it for development scenarios. In the end it's the developers that knows what they're running. We could include some information about the tag and so on, but IMO if you use a custom image during development it's up to you to be sure you're using the right version. What do you think?

During development, I create the add-new-feature, commit the new feature and build both the client and server. The versions will be something like after deployment:
Client version: v0.24.0-168-g8298c7884008
Server version: add-new-feature

Where 8298c7884008 is the last commit I did. Then, I continue the development and commit another change 4289e7627b24. Re-build everything, deploy it and now I have:
Client version: v0.24.0-168-g4289e7627b24
Server version: add-new-feature

How do I know that the sever side was correct updated and I'm not using 8298c7884008? That's where I think we could help developer and at least include the commit SHA when it is not a tag. WDYT?

Makes sense. I think it's very easy to do once the version package proposed in https://github.com/inspektor-gadget/inspektor-gadget/issues/1795#issuecomment-1924266373 is introduced. Then we won't need to rely on the image tag in https://github.com/inspektor-gadget/inspektor-gadget/blob/fd1702ec3451c044c10ade79eba7916ec3e9b451/cmd/kubectl-gadget/version.go#L59-L60
but print the version that includes the commit


make lint does not check app files

Python application scripts stored in apps do not appear in the list of files that are checked with pep8 and pylint using the make lint command. The reason is that currently only files with the .py extension are considered. This means apps can make it into the repository with unchecked errors.

Fixed https://github.com/BlueBrain/NeuroM/pull/88


[FLINK-2232] StormWordCountLocalITCase fails

increased sleeping time for IT-Cases to make tests more stable
additional bug fix: isRunning was not volatile in AbstractStormSpoutWrapper

IHMO, ready to be merged.

Thanks for the temporal fix, I think the real solution is the one proposed in #750. Will merge this for now.


[BUG] Link to subpage generates error on refresh or direct call.

Environment
Self-Hosted (Docker)
Version
2.1.0
Describe the problem
I use Dashy with subpages for Example
pages:
  - name: Sonstiges
    path: conf.sonstiges.yml
If I open the main window with http://<IP_ADDRESS>:4000/ all works. The page "Sonstiges" are shown. If I click on this link, all works. For Example http://<IP_ADDRESS>:4000/home/sonstiges works if I go this site with the main link. If I go directly to this page or press F5 in the Browser, following Error occurs:
Cannot GET /home/sonstiges
Additional info
I use the Docker container found on docker Hub. Use Material-Dark as Theme.
Please tick the boxes

[X] You are using a supported version of Dashy (check the first two digits of the version number)
[X] You've checked that this issue hasn't already been raised
[X] You've checked the docs and troubleshooting guide
[X] You agree to the code of conduct

Hiya @Zwixx
Under appConfig, set routingMode to hash. Then rebuild, and refresh the page.
See Troubleshooting Guide for more info.
Gonna close, as this is a dup of #670

@Lissy93 - I was stuck as well so I'd to comb through the issues list to learn about this work around. Would be great if we can get this tip added in the docs - https://github.com/Lissy93/dashy/wiki/pages-and-sections#restrictions


[Bug]: Total Balance changed when Transferring Savings > Spending

Describe the bug
I tried the manual transfer flow Savings > Spending.
I set the channel size to 12000 sats and initiated the transfer
Savings 29754
Spending16392
Total 46146
but the initial screenshot showed total 58146 (which was 12000 difference the exact size of the channel I initiated)
I refreshed the balance after 5 min and got a new total balance 38146.
order ID 423a0291-81ce-4dfb-9860-03397bb19fd6
Reproduce

Go to '...'
Click on '....'
Scroll down to '....'
See error

Screenshots / Recording
[bitkit_ldk_logs_1728464765228.zip](https://github.com/user-attachments/files/173

05496/bitkit_ldk_logs_1728464765228.zip)
Operating system
Android
Bitkit version
v137
Log output
No response

same issue happened again when I attempted to manually open a channel to Blocktank0 node

My hunch is a coincidence of the transfer occurring at the same time as a wallet refresh. There is a spend output still being considered for the savings balance that should not be. Or something like that.

Related: https://github.com/synonymdev/bitkit/issues/2297#issuecomment-2451735396

This happened to us multiple times in today's testing session using v1.0.6 (138).
The following is my experience, after CJIT channel open the activity appears but my spending balance is 0. Manual refresh required to see correct balance and the purple READY suggestion.
bitkit_ldk_logs_1730713584831.zip
https://github.com/user-attachments/assets/99d01ce7-f8e0-4cbc-a45c-a8d3adb097a1

Not able to reproduce this so far. If you run into this again please add as much detail as you can.


Use bcast+send instead of distributing SubDataset with just send

In mpi4py objects sent with Comm.send() are always pickled every time;
while SubDataset includes whole dataset as self._dataset when it is
pickled [1]. Thus in scatter_dataset function has been inefficient
that took >30 seconds when distributing ImageNet 2012 dataset, even if
it was just for file names and tags, for example, which is optimized
to finish in <5 seconds in our experimental environment.
This patch changes the repeat of Comm.send() to a combination of
Comm.bcast() of whole dataset and Comm.send() of range of each
scattered dataset. With this change number of picking whole dataset
has been reduced from N to 1, where N denotes number of MPI processes.
Note that this patch includes some drawbacks in error handling,
especially in case OverflowError is raised by mpi4py. Rank 0 node
may handle that error because it knows the error, while other nodes
may or may not know the error and may wait for broadcast message for
ever in busy loop. Those behavior shall depend on MPI implementation,
as it is not defined in MPI specification 3.1 [2] afaik.
In that case operator may have to kill mpirun program when
OverflowError is observed, and in that case
[1] https://github.com/chainer/chainer/blob/v3.1.0/chainer/datasets/sub_dataset.py#L50
[2] http://mpi-forum.org/docs/mpi-3.1/mpi31-report.pdf

I also tried pickling with HIGHEST_PROTOCOL, and pickle+ snappy compression. Pickling indicated some improvement in transfer cost, but it didn't pay for another memory allocation overhead I think, because both pickle.dumps and Bcast do not have any pipelining interface. Also pickle+snappy wasn't that good, even slower than plain bcast as it requires another additional buffer.
Plain comm.bcast(dataset, root=root):
real    0m11.840s
user    0m26.532s
sys     0m19.780s

comm.Bcast(buf, root=root) with pickled with highest protocol
Pickle size: 80315674
0.5626256465911865 seconds for pickling
0.3089406490325928 seconds for pickle.load
0.3087480068206787 seconds for pickle.load
0.3150293827056885 seconds for pickle.load
...
real    0m12.043s
user    0m26.844s
sys     0m18.856s

comm.Bcast(buf, root=root) with pickle + snappy
Pickle size: 80315674
Compressed size: 33543770
0.7733626365661621 seconds for snappy compression
0.33638429641723633 seconds for snappy decompression
...
real    0m12.896s
user    0m32.264s
sys     0m20.508s

The patch is following:
diff --git a/chainermn/datasets/scatter_dataset.py b/chainermn/datasets/scatter_dataset.py
index 2269812..12a2630 100644
--- a/chainermn/datasets/scatter_dataset.py
+++ b/chainermn/datasets/scatter_dataset.py
@@ -3,7 +3,10 @@ import warnings

 import chainer.datasets
 import numpy
+from mpi4py import MPI

+import pickle, snappy
+import time

 class DataSizeError(RuntimeError):
     def __init__(self, ds_size, pickled_size):
@@ -36,7 +39,7 @@ def _parse_overflow_error(err):
 _datasize_error_token = "832932439470324903284302"

-def scatter_dataset(dataset, comm, root=0, shuffle=False, seed=None):
+def scatter_dataset(dataset, comm, root=0, shuffle=False, seed=None, tracer=None):
     """Scatter the given dataset to the workers in the communicator.

     The dataset of worker 0 (i.e., the worker whose ``comm.rank`` is 0) is
@@ -68,56 +71,89 @@ def scatter_dataset(dataset, comm, root=0, shuffle=False, seed=None):
     assert hasattr(comm, 'recv')
     assert 0 <= root and root < comm.size

+    tracer.start("broadcast-dataset")
+    tracer.end()
+
+    order = None
+    if shuffle and dataset is not None:
+        n_total_samples = len(dataset)
+        order = numpy.random.RandomState(seed).permutation(
+            n_total_samples)
+
+    try:
+        tracer.start("broadcast-dataset")
+        ## data = comm.bcast((dataset, order), root=root)
+
+        if comm.rank == root:
+            b = time.time()
+            buf = pickle.dumps( (dataset, order), protocol=pickle.HIGHEST_PROTOCOL)
+            e = time.time()
+            print("Pickle size:", len(buf))
+            print(e - b, "seconds for pickling")
+            b = time.time()
+            buf = snappy.compress(buf)
+            e = time.time()
+            print("Compressed size:", len(buf))
+            print(e - b, "seconds for snappy compression")
+        else:
+            buf = bytearray()
+        data_size = comm.bcast(len(buf), root=root)
+        if comm.rank != root:
+            buf = bytearray(data_size)
+
+        comm.Bcast(buf, root=root)
+
+        if comm.rank == root:
+            data = (dataset, order)
+        else:
+            buf = snappy.decompress(bytes(buf))
+            b = time.time()
+            data = pickle.loads(buf)
+            e = time.time()
+            print(e - b, "seconds for pickle.load")
+
+        tracer.end()
+        assert data is not None
+        dataset, order = data
+
+    except OverflowError as e:
+        pickled_size = _parse_overflow_error(e)
+        ds_err = DataSizeError(len(dataset), pickled_size)
+        # We use a special data to indicate that
+        # an error occured in the root process, so
+        # the receiver processes can handle the error and
+        # call recv() function again (or possibly multiple times)
+        # to receive the whole data.
+        raise ds_err
+
     # We cannot use `mpi_comm.scatter`. This is due to MPI4py's bug.
     # For large datasets, when using `mpi_comm.scatter`, it causes MemoryError.
     if comm.rank == root:
-        try:
-            mine = None
-            n_total_samples = len(dataset)
-            n_sub_samples = (n_total_samples + comm.size - 1) // comm.size
-            order = None
-
-            if shuffle:
-                order = numpy.random.RandomState(seed).permutation(
-                    n_total_samples)
-
-            for i in range(comm.size):
-                b = n_total_samples * i // comm.size
-                e = b + n_sub_samples
-                subds = chainer.datasets.SubDataset(dataset, b, e, order)
-                if i == root:
-                    mine = subds
-                else:
-                    comm.send(subds, dest=i)
-            assert mine is not None
-            return mine
-        except OverflowError as e:
-            pickled_size = _parse_overflow_error(e)
-            ds_err = DataSizeError(len(dataset), pickled_size)
-            # We use a special data to indicate that
-            # an error occured in the root process, so
-            # the receiver processes can handle the error and
-            # call recv() function again (or possibly multiple times)
-            # to receive the whole data.
-            msg = {
-                'token': _datasize_error_token,
-                'pickled_size': ds_err.pickled_size,
-                'dataset_size': ds_err.dataset_size,
-            }
-            for i in range(comm.size):
-                if i != comm.rank:
-                    comm.send(msg, dest=i)
-            raise ds_err
+        mine = None
+        n_total_samples = len(dataset)
+        n_sub_samples = (n_total_samples + comm.size - 1) // comm.size
+
+        tracer.start("send-ranges")
+        for i in range(comm.size):
+            b = n_total_samples * i // comm.size
+            e = b + n_sub_samples
+            if i == root:
+                mine = chainer.datasets.SubDataset(dataset, b, e, order)
+            else:
+                req = comm.send((b, e), dest=i)
+
+        assert mine is not None
+        ## res = MPI.Request.Waitall(requests)
+        tracer.end()
+        return mine

     else:
+        tracer.start("send-ranges")
         data = comm.recv(source=root)
-        if isinstance(data, dict) and (
-                data.get('token') == _datasize_error_token):
-            raise DataSizeError(data['dataset_size'], data['pickled_size'])
-        else:
-            assert data is not None
-            return data
-
+        tracer.end()
+        assert data is not None
+        (b, e) = data
+        return chainer.datasets.SubDataset(dataset, b, e, order)

 def get_n_iterations_for_one_epoch(dataset, local_batch_size, comm):
     """Get the number of iterations for one epoch.
diff --git a/examples/imagenet/compute_mean.py b/examples/imagenet/compute_mean.py
index a8bc27a..b8d43fe 100755
--- a/examples/imagenet/compute_mean.py
+++ b/examples/imagenet/compute_mean.py
@@ -11,8 +11,12 @@ def compute_mean(dataset):
     print('compute mean image')
     sum_image = 0
     N = len(dataset)
-    for i, (image, _) in enumerate(dataset):
-        sum_image += image
+    for i, buts in enumerate(dataset):
+        #print(buts)
+        (image, _) = buts
+        ## print(i, type(image), type(sum_image))
+        print( image.shape)
+        ## sum_image += image
         sys.stderr.write('{} / {}\r'.format(i, N))
         sys.stderr.flush()
     sys.stderr.write('\n')
diff --git a/examples/imagenet/train_imagenet.py b/examples/imagenet/train_imagenet.py
index 667bef7..3da9336 100644
--- a/examples/imagenet/train_imagenet.py
+++ b/examples/imagenet/train_imagenet.py
@@ -3,8 +3,11 @@
 from __future__ import print_function
 import argparse
 import multiprocessing
+import os
 import random
+import socket
 import sys
+import time

 import numpy as np

@@ -59,7 +62,6 @@ class PreprocessedDataset(chainer.dataset.DatasetMixin):
         #     - Random flip
         #     - Scaling to [0, 1] value
         crop_size = self.crop_size
-
         image, label = self.base[i]
         _, h, w = image.shape

@@ -77,6 +79,7 @@ class PreprocessedDataset(chainer.dataset.DatasetMixin):
         right = left + crop_size

         image = image[:, top:bottom, left:right]
+##         print(image.shape, self.mean.shape)
         image -= self.mean[:, top:bottom, left:right]
         image *= (1.0 / 255.0)  # Scale to [0, 1]
         return image, label
@@ -94,6 +97,47 @@ class TestModeEvaluator(extensions.Evaluator):
         return ret

+class EventOverlapError(Exception):
+    def __init__(self, current):
+        super(EventOverlapError, self).__init__("overlap")
+        self.current = current
+
+
+class TimelineTracer(object):
+    def __init__(self, me):
+        self.me = me
+        self.events = []
+        self.current = None
+        self.count = 0
+
+    def start(self, name, description=''):
+        if self.current is not None:
+            raise EventOverlapError(self.current)
+        self.count += 1
+        self.current = {'name':name,
+                        'node':self.me,
+                        'desc':description,
+                        'start':time.time(),
+                        'seq':self.count}
+
+    def end(self):
+        if self.current is None:
+            pass
+
+        self.current['end'] = time.time()
+        self.events.append(self.current)
+        self.current = None
+
+
+
+    def save(self, file):
+        with open(file, 'w') as f:
+            for e in self.events:
+                line = "%s\t%s\t%s\t%s\n" % (e['name'],e['node'],e['start'], e['end'])
+                f.write(line)
+
+        print("saved", len(self.events), "to", file)
+
 def main():
     # Check if GPU is available
     # (ImageNet example does not support CPU execution)
@@ -136,9 +180,13 @@ def main():
     parser.add_argument('--communicator', default='hierarchical')
     parser.set_defaults(test=False)
     args = parser.parse_args()
+    me = "{:s}:{:d}".format(socket.gethostname(), os.getpid())
+    tracer = TimelineTracer(me)

     # Prepare ChainerMN communicator.
+    tracer.start('mpi_init')
     comm = chainermn.create_communicator(args.communicator)
+    tracer.end()
     device = comm.intra_rank

     if comm.mpi_comm.rank == 0:
@@ -148,6 +196,7 @@ def main():
         print('Using {} arch'.format(args.arch))
         print('Num Minibatch-size: {}'.format(args.batchsize))
         print('Num epoch: {}'.format(args.epoch))
+        print('Num loaderjob: {}'.format(args.loaderjob))
         print('==========================================')

     model = archs[args.arch]()
@@ -160,31 +209,46 @@ def main():

     # Split and distribute the dataset. Only worker 0 loads the whole dataset.
     # Datasets of worker 0 are evenly split and distributed to all workers.
-    mean = np.load(args.mean)
     if comm.rank == 0:
+        mean = np.load(args.mean)
+        tracer.start("load-training-dataset")
         train = PreprocessedDataset(args.train, args.root, mean, model.insize)
+        tracer.end()
+        tracer.start('load-eval-dataset')
         val = PreprocessedDataset(
             args.val, args.root, mean, model.insize, False)
+        tracer.end()
     else:
         train = None
         val = None
-    train = chainermn.scatter_dataset(train, comm, shuffle=True)
-    val = chainermn.scatter_dataset(val, comm)
+
+    #tracer.start('dist/recv-training-dataset')
+    train = chainermn.scatter_dataset(train, comm, shuffle=True, tracer=tracer)
+    #tracer.end()
+
+    #tracer.start('dist/recv-eval-dataset')
+    val = chainermn.scatter_dataset(val, comm, tracer=tracer)
+    #tracer.end()

     # We need to change the start method of multiprocessing module if we are
     # using InfiniBand and MultiprocessIterator. This is because processes
     # often crash when calling fork if they are using Infiniband.
     # (c.f., https://www.open-mpi.org/faq/?category=tuning#fork-warning )
-    multiprocessing.set_start_method('forkserver')
+    # multiprocessing.set_start_method('forkserver')
+    tracer.start('start-mp-iterator-train')
     train_iter = chainer.iterators.MultiprocessIterator(
         train, args.batchsize, n_processes=args.loaderjob)
+    tracer.end()
+    tracer.start('start-mp-iterator-eval')
     val_iter = chainer.iterators.MultiprocessIterator(
         val, args.val_batchsize, repeat=False, n_processes=args.loaderjob)
-
+    tracer.end()
     # Create a multi node optimizer from a standard Chainer optimizer.
+    tracer.start('setup-mn-optimizer')
     optimizer = chainermn.create_multi_node_optimizer(
         chainer.optimizers.MomentumSGD(lr=0.01, momentum=0.9), comm)
     optimizer.setup(model)
+    tracer.end()

     # Set up a trainer
     updater = training.StandardUpdater(train_iter, optimizer, device=device)
@@ -194,10 +258,14 @@ def main():
     log_interval = (10, 'iteration') if args.test else (1, 'epoch')

     # Create a multi node evaluator from an evaluator.
+    tracer.start('create-evaluator')
     evaluator = TestModeEvaluator(val_iter, model, device=device)
     evaluator = chainermn.create_multi_node_evaluator(evaluator, comm)
     trainer.extend(evaluator, trigger=val_interval)
-
+    tracer.end()
+    tracer.save('timeline-trace-%d.log' % comm.rank)
+    exit(0)
+
     # Some display and output extensions are necessary only for one worker.
     # (Otherwise, there would just be repeated outputs.)
     if comm.rank == 0:
@@ -213,7 +281,9 @@ def main():
     if args.resume:
         chainer.serializers.load_npz(args.resume, trainer)

+    tracer.start('training')
     trainer.run()
+    tracer.end()

 if __name__ == '__main__':

Superseded by #140.


Bollinger bands example is cut-off at beginning of chart

See example at: https://d3fc.io/components/indicator/bollingerBands.html
Shouldn't the bands stretch across width of the chart?
I've noticed that other examples that feature bollinger bands do not have this issue anymore.

Thanks @oriondean - that's been fixed


Location Parameter (optional)

Current State

The preDeploymentScript.ps1 automatically selects a random location from a list.

Limitation

Using the prescribed method on the README, the user does not have an easy way to feed a location of their choice.

Request

Expose an optional -location parameter for the preDeploymentScript.ps1.
Include logic to cater for scenarios where the user provides no location.

Since transition to the deploy to Azure button method, users have the option to select a specific region.