Issue Training on Pascal Voc datasets.

🐛 Bug

I tried to make a training bases on Pascal Voc 2012 Dataset by adapting the provided example for coco.
The example for COCO is:
python tools/train_net.py --config-file "configs/e2e_mask_rcnn_R_50_FPN_1x.yaml" SOLVER.IMS_PER_BATCH 2 TEST.IMS_PER_BATCH 1
This example works.
I adapted the code to:
python tools/train_net.py --config-file "configs/pascal_voc/e2e_mask_rcnn_R_50_FPN_1x_cocostyle.yaml" SOLVER.IMS_PER_BATCH 2 TEST.IMS_PER_BATCH 1
Note I payed attention to set properly the links to Pascal data in the datasets folder.
I applied the test on a version of maskrcnn-benchmark that I downloaded few hours ago.
To Reproduce
Steps to reproduce the behavior:
Simply:
python tools/train_net.py --config-file "configs/pascal_voc/e2e_mask_rcnn_R_50_FPN_1x_cocostyle.yaml" SOLVER.IMS_PER_BATCH 2 TEST.IMS_PER_BATCH 1

RuntimeError: Error(s) in loading state_dict for GeneralizedRCNN:
size mismatch for roi_heads.box.predictor.cls_score.weight: copying a param with shape torch.Size([81, 1024]) from checkpoint, the shape in current model is torch.Size([21, 1024]).
size mismatch for roi_heads.box.predictor.cls_score.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([21]).
size mismatch for roi_heads.box.predictor.bbox_pred.weight: copying a param with shape torch.Size([324, 1024]) from checkpoint, the shape in current model is torch.Size([84, 1024]).
size mismatch for roi_heads.box.predictor.bbox_pred.bias: copying a param with shape torch.Size([324]) from checkpoint, the shape in current model is torch.Size([84]).
size mismatch for roi_heads.mask.predictor.mask_fcn_logits.weight: copying a param with shape torch.Size([81, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([21, 256, 1, 1]).
size mismatch for roi_heads.mask.predictor.mask_fcn_logits.bias: copying a param with shape torch.Size([81]) from checkpoint, the shape in current model is torch.Size([21]).
Expected behavior

Start Training The Network Specified in The Name of The File (Mask-rcnn, Faster-rcnn) using the specified configuration.
Environment
Please copy and paste the output from the
environment collection script from PyTorch
(or fill out the checklist below manually).
PyTorch version: 1.0.0
Is debug build: No
CUDA used to build PyTorch: 10.0.130
OS: Ubuntu 18.04.1 LTS
GCC version: (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
CMake version: version 3.10.2
Python version: 3.6
Is CUDA available: Yes
CUDA runtime version: Could not collect
GPU models and configuration:
GPU 0: TITAN Xp COLLECTORS EDITION
GPU 1: GeForce GTX TITAN X
Nvidia driver version: 415.13
cuDNN version: Probably one of the following:
/usr/local/cuda-10.0/lib64/libcudnn.so.7.3.1
/usr/local/cuda-10.0/lib64/libcudnn_static.a
/usr/local/cuda-9.0/lib64/libcudnn.so
/usr/local/cuda-9.0/lib64/libcudnn.so.7
/usr/local/cuda-9.0/lib64/libcudnn.so.7.0.4
/usr/local/cuda-9.0/lib64/libcudnn_static.a
/usr/local/cuda-9.1/lib64/libcudnn.so
/usr/local/cuda-9.1/lib64/libcudnn.so.7
/usr/local/cuda-9.1/lib64/libcudnn.so.7.0.5
/usr/local/cuda-9.1/lib64/libcudnn_static.a
/usr/local/cuda-9.2/lib64/libcudnn.so
/usr/local/cuda-9.2/lib64/libcudnn.so.7
/usr/local/cuda-9.2/lib64/libcudnn.so.7.1.4
/usr/local/cuda-9.2/lib64/libcudnn.so.7.2.1
/usr/local/cuda-9.2/lib64/libcudnn_static.a
Versions of relevant libraries:
[pip] Could not collect
[conda] blas                      1.0                         mkl
[conda] cuda100                   1.0                           0    pytorch
[conda] cuda91                    1.0                  h4c16780_0    pytorch
[conda] cuda92                    1.0                           0    pytorch
[conda] mkl                       2018.0.3                      1
[conda] mkl-include               2019.0                      118
[conda] mkl-service               1.1.2            py36h17a0993_4
[conda] mkl_fft                   1.0.4            py36h4414c95_1
[conda] mkl_random                1.0.1            py36h4414c95_1
[conda] pytorch                   1.0.0           py3.6_cuda10.0.130_cudnn7.4.1_1  [cuda100]  pytorch
[conda] pytorch-nightly           1.0.0.dev20181103 py3.6_cuda9.2.148_cudnn7.1.4_0  [cuda92]  pytorch
[conda] torch                     0.4.0
[conda] torchfile                 0.1.0
[conda] torchvision               0.2.1                      py_2    pytorch

This error has appeared for each configuration file in config/pascal_voc.

@fmassa Sorry to bother you again.
I  face an I think it has the same root as the one I initially mentioned here.
Here is what I want to do.
I want to train a Mask-Rcnn on a Pascal DataSet using the xml annotations.
In the config folder there is several configuration files (.yaml) two for train Faster-Rcnn and one for the whole Mask-Rcnn but using cocostyle annotations.
In order to realized what I want to do I copied, paste, rename and modify the configuration In order to use pascal annotations rather than coco i.e:
e2e_mask_rcnn_R_50_FPN_1x_cocostyle.yaml:
TRAIN: ("voc_2012_train_cocostyle",)
TEST: ("voc_2012_val_cocostyle",)
e2e_mask_rcnn_R_50_FPN_1x_voc.yaml
TRAIN: ("voc_2007_train",)
TEST: ("voc_2007_test",)
So at the end this is my configuraton file (e2e_mask_rcnn_R_50_FPN_1x_voc.yaml) :
MODEL:
META_ARCHITECTURE: "GeneralizedRCNN"
WEIGHT: "catalog://ImageNetPretrained/MSRA/R-50"
RPN:
PRE_NMS_TOP_N_TEST: 6000
POST_NMS_TOP_N_TEST: 300
ANCHOR_SIZES: (128, 256, 512)
ROI_BOX_HEAD:
NUM_CLASSES: 21
DATASETS:
TRAIN: ("voc_2007_train",)
TEST: ("voc_2007_test",)
SOLVER:
BASE_LR: 0.001
WEIGHT_DECAY: 0.0001
STEPS: (50000, )
MAX_ITER: 70000
IMS_PER_BATCH: 1
TEST:
IMS_PER_BATCH: 1
Now no matter what configuration file I do call non of the two files (e2e_mask_rcnn_R_50_FPN_1x_*) works.
Even the one that use cocostyle annotation that is downloaded with the project.
However it works for Faster-Rcnn.
In short:
this works:
python tools/train_net.py --local_rank 1 --config-file "configs/pascal_voc/e2e_faster_rcnn_R_50_C4_1x_1_gpu_voc.yaml"
But this do not (the configuation file is the default untouch one, not my custom):
python tools/train_net.py --local_rank 1 --config-file "configs/pascal_voc/e2e_mask_rcnn_R_50_FPN_1x_cocostyle.yaml"
the content of pascal_voc/e2e_mask_rcnn_R_50_FPN_1x_cocostyle.yaml is:
MODEL:
META_ARCHITECTURE: "GeneralizedRCNN"
WEIGHT: "catalog://ImageNetPretrained/MSRA/R-50"
BACKBONE:
CONV_BODY: "R-50-FPN"
OUT_CHANNELS: 256
RPN:
USE_FPN: True
ANCHOR_STRIDE: (4, 8, 16, 32, 64)
PRE_NMS_TOP_N_TRAIN: 2000
PRE_NMS_TOP_N_TEST: 1000
POST_NMS_TOP_N_TEST: 1000
FPN_POST_NMS_TOP_N_TEST: 1000
ROI_HEADS:
USE_FPN: True
ROI_BOX_HEAD:
POOLER_RESOLUTION: 7
POOLER_SCALES: (0.25, 0.125, 0.0625, 0.03125)
POOLER_SAMPLING_RATIO: 2
FEATURE_EXTRACTOR: "FPN2MLPFeatureExtractor"
PREDICTOR: "FPNPredictor"
NUM_CLASSES: 21
ROI_MASK_HEAD:
POOLER_SCALES: (0.25, 0.125, 0.0625, 0.03125)
FEATURE_EXTRACTOR: "MaskRCNNFPNFeatureExtractor"
PREDICTOR: "MaskRCNNC4Predictor"
POOLER_RESOLUTION: 14
POOLER_SAMPLING_RATIO: 2
RESOLUTION: 28
SHARE_BOX_FEATURE_EXTRACTOR: False
MASK_ON: True
DATASETS:
TRAIN: ("voc_2012_train_cocostyle",)
TEST: ("voc_2012_val_cocostyle",)
DATALOADER:
SIZE_DIVISIBILITY: 32
SOLVER:
BASE_LR: 0.01
WEIGHT_DECAY: 0.0001
STEPS: (18000,)
MAX_ITER: 24000
The error is that:
RuntimeError: Error(s) in loading state_dict for GeneralizedRCNN:
	size mismatch for rpn.anchor_generator.cell_anchors.0: copying a param with shape torch.Size([9, 4]) from checkpoint, the shape in current model is torch.Size([3, 4]).
	size mismatch for rpn.head.conv.weight: copying a param with shape torch.Size([1024, 1024, 3, 3]) from checkpoint, the shape in current model is torch.Size([256, 256, 3, 3]).
	size mismatch for rpn.head.conv.bias: copying a param with shape torch.Size([1024]) from checkpoint, the shape in current model is torch.Size([256]).
	size mismatch for rpn.head.cls_logits.weight: copying a param with shape torch.Size([9, 1024, 1, 1]) from checkpoint, the shape in current model is torch.Size([3, 256, 1, 1]).
	size mismatch for rpn.head.cls_logits.bias: copying a param with shape torch.Size([9]) from checkpoint, the shape in current model is torch.Size([3]).
	size mismatch for rpn.head.bbox_pred.weight: copying a param with shape torch.Size([36, 1024, 1, 1]) from checkpoint, the shape in current model is torch.Size([12, 256, 1, 1]).
	size mismatch for rpn.head.bbox_pred.bias: copying a param with shape torch.Size([36]) from checkpoint, the shape in current model is torch.Size([12]).
	size mismatch for roi_heads.box.predictor.cls_score.weight: copying a param with shape torch.Size([21, 2048]) from checkpoint, the shape in current model is torch.Size([21, 1024]).
	size mismatch for roi_heads.box.predictor.bbox_pred.weight: copying a param with shape torch.Size([84, 2048]) from checkpoint, the shape in current model is torch.Size([84, 1024]).

I have the same error with if I try to train a using the xml annotation (the non coco style).
Like we discuss before it is definitively a question of model weights trimming.
My question is why does it works with Faster-Rcnn and not with Mask-Rcnn ?
Another question much less significant is where the 4 ratio come from ?
The one before last line of error mention a size of 21 x 1024 while the last report an 84 x 1024.
Thanks in advance for your time.

@JSharp4273 the 4 ratio is probably from the box_regression (which is class-specific).
You probably forgot to trim some of the weights of the model (probably the bbox_regression_weights).

@fmassa I did not trimed the weights however I wanted to check if "your" code does work and it does not with mask-rcnn but it does with faster-rcnn.
My question is why ?

What's your OUTPUT_DIR folder? Is there already a pre-trained model there?
I think you might have trained using a C4 architecture first, and are now launching training on the same folder, and it's picking the state-dict from the pre-trained model.


auto-multiple-choice: use absolute paths instead of "portable" strategy

Currently, auto-multiple-choice from nixpkgs doesn't work on systems with /lib directory. Running auto-multiple-choice there fails with:
Unknown action gui at /nix/store/n3cyw5ngp0v52rny9gr6z35vslh5d4vx-auto-multiple-choice-1.6.0/bin/.auto-multiple-choice-wrapped line 94.

This happens on non-NixOS systems as well as on NixOS with e.g. nix-ld [1] enabled.
The reason is documented in the Nix expression and the problem is reported upstream at https://project.auto-multiple-choice.net/issues/872. However, the problem can be worked around without requiring upstream changes, as shown in this commit. We stop using the "portable distribution", which tries to detect the base directory at run time, and instead hardcode all paths as absolute at build time.
[1] https://github.com/Mic92/nix-ld
Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

BTW. I've just finished a full exam with AMC from this PR and everything worked as I'm used to. I used NixOS for that.
I also did more testing on non-NixOS systems. Without this change, AMC does not run at all. With this PR, it runs (shows GUI). Unfortunately, some operations such as generation of PDFs with questions require AMC to be in $PATH. So running AMC via e.g. nix run github:wentasah/nixpkgs/amc-fix-lib#auto-multiple-choice is not sufficient. One needs to install AMC with nix profile install or similar. And then, there is still risk of mixing AMC from Nix with native distro's AMC. Another "problem" is that AMC from Nix still uses many things from outside of Nix (LaTeX, fonts) so determinism is not fully guaranteed.
Anyway, even thought the PR is not perfect, it makes AMC work definitely better than it was before.

sorry for the delay

Result of nixpkgs-review pr 281217 run on x86_64-linux 1

1 package built:

auto-multiple-choice

I've just tested that the PR still works and can be merged.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-already-reviewed/2617/1765


Is shared subscription supported?

Expected behavior
Actual behavior
Steps to reproduce
Minimal yet complete reproducer code (or URL to code) or complete log file
Moquette MQTT version
JVM version (e.g. java -version)
OS version (e.g. uname -a)

Not yet, shared subscription is part of MQTT v5 specification that Moquette doesn't implment


PowerShell steps for migration using AzMigrate

Is there PowerShell documentation on how to do an agentless migration from on-prem VMware to Azure?

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

ID: 2b83e320-c9a0-204c-dca5-b0ed60ce2470
Version Independent ID: 8862ff67-2c6e-cb8f-3f8c-2c1f51a37f68
Content: Migrate VMware VMs agentless Azure Migrate Server Migration - Azure Migrate
Content Source: articles/migrate/tutorial-migrate-vmware.md
Service: azure-migrate
GitHub Login: @rayne-wiselman
Microsoft Alias: raynew

@Ayanmullick Thanks for the comment. We are looking into this and will get back to you shortly.

@Ayanmullick Currently PowerShell is not supported. This is planned for later this year. However, there is no definite publicly shareable ETA.
Closing this issue for now as no further discussion required. Feel free to reply if you have any additional question in this matter.

For anyone else looking, this is available now:

https://learn.microsoft.com/en-us/azure/migrate/tutorial-migrate-vmware-powershell?source=recommendations


Footer SSR breaks

Detailed description
TypeError: Cannot read property 'querySelectorAll' of undefined
    at altlangs (/Users/sanjitbauli/workspace/urx-nxt/node_modules/@carbon/ibmdotcom-utilities/lib/utilities/altlangs/altlangs.js:28:48)
    at sortList (/Users/sanjitbauli/workspace/urx-nxt/node_modules/@carbon/ibmdotcom-react/lib/components/LocaleModal/LocaleModal.js:157:54)
    at LocaleModal (/Users/sanjitbauli/workspace/urx-nxt/node_modules/@carbon/ibmdotcom-react/lib/components/LocaleModal/LocaleModal.js:216:17)
    at processChild (/Users/sanjitbauli/workspace/urx-nxt/node_modules/react-dom/cjs/react-dom-server.node.development.js:3090:14)

Its a bug
issue?

The problem is with the footer component
The expected behavior is, the footer should render without any errors.

happening in all browsers

What version of the IBM.com Library are you using?

"@carbon/ibmdotcom-react": "^1.2.1",
"@carbon/ibmdotcom-services": "^1.2.1",
"carbon-components": "^10.9.0",
"carbon-components-react": "^7.9.0",

What offering/product do you work on? Any pressing ship or release dates we
URX

When i am using the component only for the Front end, then the dds proxy returns 404

Feel free to correct me, but this looks like it's a translation issue, and not an issue with any of our components?
In the example given it appears as if inen doesn't show up. 404
https://1.www.s81c.com/common/js/dynamicnav/www/countrylist/jsononly/inen-utf8.json
But if you use usen it doesn't give a 404, and works as expected?
https://1.www.s81c.com/common/js/dynamicnav/www/countrylist/jsononly/usen-utf8.json
Am I way off base with that?

@photodow - i explained about two different issues.
The first one is about SSR which shows this error.
TypeError: Cannot read property 'querySelectorAll' of undefined
    at altlangs (/Users/sanjitbauli/workspace/urx-nxt/node_modules/@carbon/ibmdotcom-utilities/lib/utilities/altlangs/altlangs.js:28:48)
    at sortList (/Users/sanjitbauli/workspace/urx-nxt/node_modules/@carbon/ibmdotcom-react/lib/components/LocaleModal/LocaleModal.js:157:54)
    at LocaleModal (/Users/sanjitbauli/workspace/urx-nxt/node_modules/@carbon/ibmdotcom-react/lib/components/LocaleModal/LocaleModal.js:216:17)
    at processChild (/Users/sanjitbauli/workspace/urx-nxt/node_modules/react-dom/cjs/react-dom-server.node.development.js:3090:14)

And if i don't use SSR then also the footer translations trying to load the URL
https://1.www.s81c.com/common/js/dynamicnav/www/countrylist/jsononly/inen-utf8.json
when my url has in-en as locale.
example:
https://wwwstage.ibm.com/account/reg/in-en/signup?formid=urx-19776
Now if you look at my current implementation in the above page, it is loading the
https://www.ibm.com/common/v18/js/data/jsononly/inen.json and it does exist.
Note: https://wwwstage.ibm.com/account/reg/in-en/signup?formid=urx-19776 this URL has an older version of the dotcom package which is 1.1.2
See screenshot.


Request for documentation or source code for AzureAppConfigurationPush@6

There are a lot of beaking changes in AzureAppConfigurationPush@5.
Is source code of AzureAppConfigurationPush extention available ?
The documentation only describes how to use it in the Release pipelines.

Hello @rvriens, currently the source code of the Azure App Configuration Push task is not available yet, but we are working on having it available soon will keep you posted. Thanks

Hi @rvriens, the source code for the Azure App Configuration Push task, which has been renamed to Azure App Configuration Import, is now available. You can access it here


[New Theme Request] Traefik Proxy

Would be great to be able to have Traefik look consistent with the services I run through it!
https://github.com/traefik/traefik

But how will you apply the theme using træfik? 😛. https://github.com/gilbN/theme.park/issues/42

😄
I've actually got plugin-rewritebody working for most containers (I use Stylus for the rest). I haven't run into any issues with traefik/plugin-rewritebody#12 - matching on </head> seems to work fine. traefik/plugin-rewritebody#13 is what's actually causing issues for several of my containers. Happy to share a minimal example in #42 if that'd be useful?

😄
I've actually got plugin-rewritebody working for most containers (I use Stylus for the rest). I haven't run into any issues with traefik/plugin-rewritebody#12 - matching on </head> seems to work fine. traefik/plugin-rewritebody#13 is what's actually causing issues for several of my containers. Happy to share a minimal example in #42 if that'd be useful?

Yeah, that'd be great. I dont use Træfik, but it will definitvely be helpful for others! We can add it to the wiki too.

As I dont use træfik, I'm closing this.


Remove tests/generic.py, not included anymore

It was for autocomplete/generic.py which is now tested in forms.py
like all basic forms.
This is what was probably meant to be removed in 2a8a449.

Changes Unknown when pulling 892e61c997cc2d6e75458488ea258249e40df1de on blueyed:remove-tests-generic into ** on yourlabs:master**.

Cherry-picked into master in 051bcb7 - the commit message was not really correct.


Web: add new book (depends on #147)

User Story
As a user of the application,
I want to be able to add a new book to my reading list,
So that I can keep track of books I plan to read.
Acceptance Criteria

[ ] Implement a feature in the application that allows users to add a new book to their reading list.
[ ] Provide a form or interface where users can enter details such as the title, author, genre, and other relevant information of the new book.
[ ] Ensure that the entered book details are properly validated before being added to the reading list.
[ ] Update the database with the new book entry upon successful submission.
[ ] Display a confirmation message to the user upon successful addition of the new book.
[ ] Test the functionality to add a new book to the reading list to verify accurate data submission and database update.
[ ] Ensure responsiveness and usability of the book addition feature across different devices and screen sizes.
[ ] Document any changes made to the codebase for future reference.

Related Issues

None

Notes

Allowing users to add new books to their reading list enhances the flexibility and customization of their reading experience.
Collaborate with frontend developers to ensure seamless integration of the book addition feature into the application's interface.

Tasks

[ ] Design the form or interface for adding a new book to the reading list.
[ ] Implement validation logic to ensure proper input of book details.
[ ] Update the database schema to accommodate new book entries.
[ ] Implement functionality to submit and process new book entries in the backend.
[ ] Test the functionality to add a new book to the reading list across different devices and screen sizes.
[ ] Ensure proper error handling and validation in the book addition feature.
[ ] Document any changes made to the codebase.

working on this


Fix Order of Operations in Agent.init_oai Method to Ensure Assistant Updates

This PR addresses an issue in the Agent.init_oai method where the _check_parameters method was called after updating the agent's attributes. This caused the parameter check to always return True, preventing the assistant from updating when necessary.
Changes Made:

Moved the _check_parameters method call before updating the agent's attributes.
Ensured that the assistant updates correctly when parameters differ.

These changes ensure that the assistant's configuration is properly updated when its parameters change, maintaining the correct and up-to-date assistant settings.
close #126

Thanks for bringing this up. I adjusted the logic a bit so only undefined parameters are copied from openai. This means that when initializing your assistant from id you can now only specify parameters that you'd like to check for updates. The rest you can simply set to none, and they will be copied from openai


some question about the size of code base

Hello, You work   are  so  amazing. I just want to know the metric of MRR.   In each experiment, the size of codebase can affect the result.   I find in  CodeBert and GraphCodeBert, the size of codebase is different. And can they be compared?
thank you very much if you can reply my question!!

If you perform the same dataset, the result is comparable. Otherwise, it's not.


Find locale filename by language codes

In our build process we're trying to only load the locale we need for the current language to decrease file size.
I managed to do that but, in order to load the correct locale, I need it's name/filename by languagecode.
Currently, I just replace _ with -, put all to lowercase and if country and language are equal, delete the country part.
Examples:

en_GB -> en-gb
de_DE -> de
de_AT -> de-at
en_US -> en-us -> error

And there's the problem. en-us.js is not a filename in locale in moment.js.
So my question is: what is a recommended, reliable way to get the moment.js locale filename by language code, without using moment.js?

Internally, Moment does it by trying en-us-whatever, en-us, en, etc them until one succeeds. The code is a little more complicated than it needs to be for your use case because it accepts a whole array of user-requested locales and does the en-us -> en backoff with lower priority than trying other items in the array. But the principle is the same; there's no way to know whether a locale def will be there until you get the locale def. This makes sense; we have no idea what additional locale defs you might have put on your server or compiled into Moment. So you'd have to do the same.
You could, of course, make a copy of en and name it en-us, but I don't know if your use case also requires you to handle arbitrary codes, like de-DE-bavarian, that Moment can only handle by progressive fallback.
I hope that helps. I'm going to close this, but if you follow-ups, just @ me and I'll continue to respond.

@icambron thanks for the info that sounds reasonable.
TL;DR: Do you know any other momentjs locale filenames where the filename is not part of the language code?
But if en-us falls back to en I still have to get the filename, which is en-gb - as far as i can see, there is no en.js.
So even trial and error style of getting those files won't succeed for en_US because the filename needed is en-gb.js.
I'm ok with making an exception in the code for en_US, as long as I know all exceptions that have to be made.
Do you know any other momentjs locale filenames where the filename is not part of the language code?

Ah, right, I left that part out: en is the default that comes with Moment; moment.locale('en') succeeds always. So you want the progressive fallback, but when you reach en, you no-op the code loading as a special case. So like foren_US:

try to load "en-us.js"
fails
OK, fallback, try to load "en"
special case skips loading the code and just does moment.locale('en')
win

IOW it's "en" you want to special case, not 'en_US. It's worth noting that Moment's en` defaults are US; that's why we don't bother with an 'en-us.js' file.

@icambron ah I understand. I'll try this next week and will update here accordingly. Thanks for the support!

@icambron ok I special cased en_US to fall back to regular en or en-gb - it works but it doesn't seem to be the only special case I need.
The standard language code for japan is ja_JP. The filename in moment is ja.js.
I think my way to convert lang codes to moment filenames isn't the right way. As far as I can see there is no way around a mapping for each language code to the corresponding filename in moment.js :-(

maybe at some point in the future, we could rename the locale filenames to consistently reflect standardized language codes, including en-us, ja-jp or de-de, so we can programmatically find the filename by language code.


[Fix][Arith] Fix canonical simplification of LE

PR #15471 enhances the simplification for LE, while missed a case where the upper bound kPosInf is divisible by a factor. Therefore, prior to this PR, when simplifying x * 1024 + y < z * 7168, it will fails with the error message
InternalError: Check failed: value < 1LL << (dtype.bits() - 1)
(8589934591 vs.<PHONE_NUMBER>) : ValueError: Literal value<PHONE_NUMBER>
exceeds maximum of int32

This is just because the upper bound 7 here divides kPosInf the maximum value of int64, which passes an "if" condition in #15471 unexpectedly.
This PR fixes the issue.

Great fix!


Fix MinifyMarkupFormatter removes quotes when it shouldn't

Fix #860

 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.

Looks good to me!
:+1:


Bot "tournaments" and statistics

DeepMind reports win percentages of various versions of their models against each other and against Pachi, Fuego, etc.
Are there existing GTP controllers to run "tournaments" and get statistics?
Waiting on #52

That might be a useful thing for me to focus on next for my GTP library.

Is your library going to include a controller? I thought you were just making the engine part

@wrongu I plan it to be a general GTP library for both controllers and engines. It won't itself be a full-blown engine as that requires an actual go-playing component but it will be suitable for interfacing with go-playing components to make them GTP engines. The controller side is much easier to do standalone and the "playing two engines against one another" is the classic controller use case which I'll get working on today.

Okay, I have a little GTP controller script that uses my GTP library to play GnuGo against itself. It should work for other GTP engines too so I'm going to try that next.

The GTP controller script is available at https://github.com/jtauber/gtp/blob/master/gnugo_vs_gnugo.py
I plan to refactor out the reusable code and ship it with the library itself.

Just wanted to comment that I trained a SL policy network and wanted to run it against GnuGo. I used the gtp_wrapper.py provided in this project and then used the "ringmaster" program provided by GoMill. Seems like it provides much of the functionality that would be desired.
The AlphaGo paper seemed to rely on running against other Go programs to evaluate and make decisions about where they wanted to go next... so seems very important for anyone wanting to tweak the training pipeline.
I did notice however that GnuGo would resign with the current responses from gtp_wrapper.py. GnuGo will make a pass... then RocAlphaGo will declare it illegal. I believe GnuGo then responds that RocAlphaGo is making an illegal move... and then GnuGo resigns... which means that from gomill's perspective... RocAlphaGo always beans GnuGo!

@robert-waite something clearly went wrong here! At first-glance, gomill appears to use the lowercase string "pass" to denote passing moves. RocAlphago uses jtauber's gtb library under the hood to process commands, which should be able to handle "pass" as an input.
If you're able to pinpoint the bug as something inside RocAlphaGo or the gtp library, please make a separate issue and/or a PR to fix it =)

Will play with it tonight and report back ;)

Since nobody else has mentioned it: the folks at the computer-go mailing list maintain a GTP-enabled go server specifically for playing bots against each other constantly, to get practice, data, and a stable rating. It's called CGOS: http://cgos.boardspace.net/
It's not very hard to plug into, and there's an active community of Go programmers (including, I believe, Aja Huang in the past) who play their bots there all the time. Would be a cool place to drop RocAlphaGo once it's ready.


Disabling preserved line breaks in RedCloth

I was trying out Textile and got annoyed with normal line breaks being preserved in the output, which I then found to be the standard in the Textile specification. I then found an option called fold_lines, which (by setting it to true) should do the desired thing. It turned out the real thing is called hard_breaks (which should be set to false). Anyhow I added the possibility of, in _config.yml, setting:
redcloth:
  hard_breaks: false

with the default value being true. I thought creating a redcloth grouping in _config.yml might be the smartest, because there might be more options that users would like to set in RedCloth.
PLEASE NOTE that hard_breaks is marked as deprecated (from the sources I could find), but it seems it's the only option for ignoring normal line breaks in the output.

That's a good question - it's technically still active, but nothing has happened in a while. I'm gonna merge the main tree into my branch to ensure there are no conflicts and push it again...
Thanks for looking into the hard_breaks deprecation question!

I'm testing this now on top of the latest master and I get a test failure with Ruby 1.8.7 and RedCloth 4.2.8:
  1) Failure:
test: RedCloth with hard_breaks disabled should not generate break tags in HTML output. (TestRedCloth)
    [/Users/tom/dev/mojombo/jekyll/test/test_redcloth.rb:54:in `__bind_1322362864_863941'
     /Users/tom/Developer/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/shoulda-2.11.3/lib/shoulda/context.rb:382:in `call'
     /Users/tom/Developer/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/shoulda-2.11.3/lib/shoulda/context.rb:382:in `test: RedCloth with hard_breaks disabled should not generate break tags in HTML output. ']:
<"
line1\nline2
"> expected but was
<"
line1
\nline2
">.

Do you think you could check this out?

Happy to see this work being done, just found myself wanting 'fold_lines' too.
I think it would be nice to config RedCloth from _config.yml, but I'd also say do the minimal work necessary to get this landed in master.  Then handle the general case [if needed] later.
+1 Nice stuff!

This looks good. I like the current approach you've taken. If we need to change it a bit later on, that shouldn't be a problem.


Add PaddleDetection-based Layout Model

Hi, I have reorganized the file structure of Paddle.
Please review.Thx

Thanks for this PR. Here are some general questions/thoughts:

Please remove the OCR part from this PR.
Please use PEP8 for as the variable naming conventions -- you could use black and pylint for checking.
For the preprocess.py and layoutmodel.py file

I think it contains a lot of unnecessarily complicated design -- can we just simply the functions with minal complexity?
And more fundamentally, why the preprocess function should live within layoutparser rather than paddledetection? I think it's paddledetection's obligation to do the preprocessing for the models.

Also could you add tests for the paddle modules? You could follow the examples in test_model.

Thanks for this PR. Here are some general questions/thoughts:
* Please remove the OCR part from this PR.

* Please use PEP8 for as the variable naming conventions -- you could use `black` and `pylint` for checking.

* For the `preprocess.py` and `layoutmodel.py` file

  1. I think it contains a lot of unnecessarily complicated design -- can we just simply the functions with minal complexity?
  2. And more fundamentally, why the `preprocess` function should live within `layoutparser` rather than `paddledetection`? I think it's `paddledetection`'s obligation to do the preprocessing for the models.

* Also could you add tests for the paddle modules? You could follow the examples in [`test_model`](https://github.com/Layout-Parser/layout-parser/blob/master/tests/test_model.py).

Thanks for your replay, I'll modify it later！

Thanks for this PR. Here are some general questions/thoughts:

Please remove the OCR part from this PR.

Please use PEP8 for as the variable naming conventions -- you could use black and pylint for checking.

For the preprocess.py and layoutmodel.py file

I think it contains a lot of unnecessarily complicated design -- can we just simply the functions with minal complexity?
And more fundamentally, why the preprocess function should live within layoutparser rather than paddledetection? I think it's paddledetection's obligation to do the preprocessing for the models.

Also could you add tests for the paddle modules? You could follow the examples in test_model.

Hi, For the preprocess.py and layoutmodel.py file,

we decouple the preprocess and inference engine because that will be more clear for the code.
we extract the preprocess code to reduce the dependence to paddledetection, or else the users might download the whole repo, which is too heavy.

Hi，I've modied the code, including:

remove the OCR part

use  pylint for checking
For the init.py and catalog.py file，these two files are less modified, so they are not checked

add tests for the paddle modules test_model

Thanks for the updates! The current version is better than the previous one, but I think the code could be further simplified and more structured -- please check the comments for the possible updates.

I've also carefully checked the code, and added some changes. Some key updates:

improve the downloading logic -- it will remove the tar file when downloaded, and check the existence of the untar'ed files.
further simplify the layoutmodel.py, removing unnecessary variables and definitions.

Please note, you mentioned in the previous version that paddle mode may support specifying batch_size during inference, however that variable was never used.
And in the future we might need to move the paddle model to dropbox/aws as the downloading speed is  ~2MB/s in US, taking around 2~3 minutes to download the whole model, which might be suboptimal.
Otherwise I think this PR is ready to be merged - please take a quick look and let me know if the new changes are OK. Thanks for the great work!

I've also carefully checked the code, and added some changes. Some key updates:

improve the downloading logic -- it will remove the tar file when downloaded, and check the existence of the untar'ed files.
further simplify the layoutmodel.py, removing unnecessary variables and definitions.

Please note, you mentioned in the previous version that paddle mode may support specifying batch_size during inference, however that variable was never used.
And in the future we might need to move the paddle model to dropbox/aws as the downloading speed is ~2MB/s in US, taking around 2~3 minutes to download the whole model, which might be suboptimal.
Otherwise I think this PR is ready to be merged - please take a quick look and let me know if the new changes are OK. Thanks for the great work!

Hi, thanks for your new changes, which further simplifies the code.

For the model download source, it is ok to support dropbox/aws, but we hope baidu source is the prior choice since there are also many developers in China.
Batch size is not used in the code, which is just designed for the expansion, thanks for your check.
The changes are ok for me, thanks for your careful review again!

The changes are ok for me，too.
Through the repo and the whole modification process, I also learned a lot. Thank you very much！

I've also carefully checked the code, and added some changes. Some key updates:

improve the downloading logic -- it will remove the tar file when downloaded, and check the existence of the untar'ed files.
further simplify the layoutmodel.py, removing unnecessary variables and definitions.

Please note, you mentioned in the previous version that paddle mode may support specifying batch_size during inference, however that variable was never used.
And in the future we might need to move the paddle model to dropbox/aws as the downloading speed is ~2MB/s in US, taking around 2~3 minutes to download the whole model, which might be suboptimal.
Otherwise I think this PR is ready to be merged - please take a quick look and let me know if the new changes are OK. Thanks for the great work!

Hi, thanks for your new changes, which further simplifies the code.

For the model download source, it is ok to support dropbox/aws, but we hope baidu source is the prior choice since there are also many developers in China.
Batch size is not used in the code, which is just designed for the expansion, thanks for your check.
The changes are ok for me, thanks for your careful review again!

I think ultimately we'll provide better downloading support, e.g., mirrored downloading sites and or something mentioned in  #43 . At that time, ppl from different regions can choose the best downloading methods accordingly.


Upgrade react-pdf and react-fast-pdf

Details

Updated the react-fast-pdf library to v1.0.15 (which also updated react-pdf to v9.1.1) and removed the patches.
Fixed Issues

$ https://github.com/Expensify/App/issues/48124
PROPOSAL: https://github.com/Expensify/App/issues/48124#issuecomment-2350131033
Tests

Upload a PDF
Verify that the PDF preview is shown (it may take a few seconds to appear)

Verify that the PDF opens correctly
Enable throttling in DevTools and verify that no "Worker was terminated" errors appear in the console when closing the preview window while a PDF is still loading (the loading indicator is visible)

Offline tests

N/A
QA Steps

Same as "Tests"
PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
48124 android native.webm

Android: mWeb Chrome
48124 android mweb.webm

iOS: Native
https://github.com/user-attachments/assets/b3ad1d13-23c2-49ca-9ea2-65aab8fcc812

iOS: mWeb Safari
https://github.com/user-attachments/assets/b1f54d08-e0c8-458f-838e-a3bb31c5603a

MacOS: Chrome / Safari
https://github.com/user-attachments/assets/c54c21b8-4aa3-4892-a60f-408de4c40692

MacOS: Desktop
https://github.com/user-attachments/assets/4de8401c-3ac1-42f0-9b64-4c1c3241e152

Reviewer Checklist

[x] I have verified the author checklist is complete (all boxes are checked off).
[x] I verified the correct issue is linked in the ### Fixed Issues section above
[x] I verified testing steps are clear and they cover the changes made in this PR

[x] I verified the steps for local testing are in the Tests section
[x] I verified the steps for Staging and/or Production testing are in the QA steps section
[x] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I checked that screenshots or videos are included for tests on all platforms
[x] I included screenshots or videos for tests on all platforms
[x] I verified tests pass on all platforms & I tested again on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[x] I verified proper code patterns were followed (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I verified that this PR follows the guidelines as stated in the Review Guidelines
[x] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[ ] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native
https://github.com/user-attachments/assets/bd8a4df2-e6b4-440b-b369-020b74ac5bec

Android: mWeb Chrome
https://github.com/user-attachments/assets/360a2c2c-afb0-45cc-b90f-f238d3dfb46a

iOS: Native
https://github.com/user-attachments/assets/c5a4be85-1a76-40cc-bba3-adf0580d50ec

iOS: mWeb Safari
https://github.com/user-attachments/assets/9df5452c-24e0-428f-8297-23df6b76c03e

MacOS: Chrome / Safari
https://github.com/user-attachments/assets/b4cb8215-7f79-476e-aea9-40d906cf4dd4

MacOS: Desktop
https://github.com/user-attachments/assets/db419202-de1c-4538-85cb-545f92860e18

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.


Feature: #73, generate api with model prompt, support html generate

What is the purpose of the change

support text input box generate html
generate api with model prompt

Related issues/PRs
Brief change log
Checklist

[x] I have read the Contributing Guidelines on pull requests.
[x] I have explained the need for this PR and the problem it solves
[x] I have explained the changes or the new features added to this PR
[ ] I have added tests corresponding to this change
[ ] I have updated the documentation to reflect this change
[ ] I have verified that this change is backward compatible
[ ] If this is a code change: I have written unit tests to fully verify the new behavior.

generate html code:

LGTM

LGTM


Interact with the running vscode Language Server

Hi 👋,
Big THANK YOU for maintaining our essential tooling! 🫡
Context:
Although I love and heavily use commands like Find All References, Show Call Hierarchy etc., OFTEN, for documentation purposes I feel the need to EXTRACT those results I see in the references tab in a way that I can do further processing outside vscode: ex. as from - to pairs (function from invokes function to) - so I could build a graph-like document (using graphviz etc.).
My question:
Is there a 'simple' way to access the running vscode server instance attached to my current vscode project and programmatically send it commands/be able to capture some json output - instead of interacting with it from the menu?
By 'simple' I mean for example curl or maybe a short extension.
If there is no simple way, could you please point me to where I should  start digging regarding the normal way 😄 - some examples?
At first glance it seems extensions are focused more on the language server side - I don't want to maintain the server itself - the one I have running does a great job already - I just want to be able to interact with it programmatically.
Hope I made a good job describing my problem and hope this is a good place to pose the question. 🤗
Thank you.

Hi, me again 😄
In the meantime I found a way (not sure if it's the best) using an extension and the following commands from https://code.visualstudio.com/api/references/commands:
vscode.prepareCallHierarchy - Prepare call hierarchy at a position inside a document

uri - Uri of a text document
position - A position in a text document
(returns) - A promise that resolves to an array of CallHierarchyItem-instances

vscode.provideIncomingCalls - Compute incoming calls for an item

item - A call hierarchy item
(returns) - A promise that resolves to an array of CallHierarchyIncomingCall-instances

vscode.provideOutgoingCalls - Compute outgoing calls for an item

item - A call hierarchy item
(returns) - A promise that resolves to an array of CallHierarchyOutgoingCall-instances

A working snippet (maybe it helps others).
import * as vscode from 'vscode';

async function logOutgoingCalls(item: vscode.CallHierarchyItem) {
	const outgoingCalls: vscode.CallHierarchyOutgoingCall[] = await vscode.commands.executeCommand('vscode.provideOutgoingCalls', item);

	// iterate over outgoingCalls
	for (const outgoingCall of outgoingCalls) {
		console.log(item.name, '-[:invokes]->', outgoingCall.to.name);

		// recursively log outgoing calls
		// TODO: handle cycles
		await logOutgoingCalls(outgoingCall.to);
	}
}

async function logIncomingCalls(item: vscode.CallHierarchyItem) {
	const incomingCalls: vscode.CallHierarchyIncomingCall[] = await vscode.commands.executeCommand('vscode.provideIncomingCalls', item);

	// iterate over incomingCalls
	for (const incomingCall of incomingCalls) {
		console.log(incomingCall.from.name, '-[:invokes]->', item.name);

		// recursively log incoming calls
		// TODO: handle cycles
		await logIncomingCalls(incomingCall.from);
	}
}

export function activate(context: vscode.ExtensionContext) {
	console.log('Congratulations, your extension is now active!');

	let disposable = vscode.commands.registerCommand('extension.logCallHierarchy', async () => {
		if (vscode.window.activeTextEditor) {
			const position = vscode.window.activeTextEditor.selection.active;
			const uri = vscode.window.activeTextEditor.document.uri;

			const items: vscode.CallHierarchyItem[] = await vscode.commands.executeCommand('vscode.prepareCallHierarchy', uri, position);
			if (items) {
				for (const item of items) {

					// log incoming calls
					console.log('Incoming calls of ', item.name);
					await logIncomingCalls(item);

					// log outgoing calls
					console.log('Outgoing calls of ', item.name);
					await logOutgoingCalls(item);
				}
			}
		}
	});

	context.subscriptions.push(disposable);

	let statusBarItem = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right, 100);
	statusBarItem.command = 'extension.logCallHierarchy';
	statusBarItem.text = "Log Call Hierarchy";
	statusBarItem.show();
	context.subscriptions.push(statusBarItem);
}

export function deactivate() { }

From my point of view this can be closed - thank you.


Gestures and ... emoji's keyboard

Hi,
(Still very excited after @adamschmalhofer help with hebrew layout. getting back to 8vim :)))
Two issues regarding usage of 8Vim:

The old 8Pen supported gestures. If I recall correctly, making half a circle  beneath the 8vim's letters, from left to right - typed in a smile emoji. very convenient :)  (having the ability to assign the gesture to specific emoji will be even nicer)
The emoji keyboard icon in 8Vim does not switch keyboard to emoji. instead it bring back the old keyboard. The 1st option in the setting on 8Vim is actually "select emoji keyboard" but it shows no emoji keyboard. only the regular ones.
can anyone point me to a keyboard that is "emoji" one? (android) or maybe it misses some additional command so it will launch the selected keyboard in emoji mode?

TNX

Ok, you already noticed that I have been playing around with (1). Now I got around to publishing a prerelease. So you can try it out (and tell me what you think) https://github.com/adamschmalhofer/8VIM/releases/tag/hebrew-3 and https://github.com/adamschmalhofer/8VIM/releases/tag/german-3 (for English and German typeers).


🚧 Gradio Starlette ERROR: Exception in ASGI

Maybe fixed idk yet

pip install Starlette -U
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Requirement already satisfied: Starlette in /usr/local/lib/python3.9/dist-packages (0.23.1)
Collecting Starlette
Downloading starlette-0.26.1-py3-none-any.whl (66 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.9/66.9 KB 3.2 MB/s eta 0:00:00
Requirement already satisfied: anyio<5,>=3.4.0 in /usr/local/lib/python3.9/dist-packages (from Starlette) (3.6.2)
Requirement already satisfied: typing-extensions>=3.10.0 in /usr/local/lib/python3.9/dist-packages (from Starlette) (4.5.0)
Requirement already satisfied: idna>=2.8 in /usr/local/lib/python3.9/dist-packages (from anyio<5,>=3.4.0->Starlette) (2.10)
Requirement already satisfied: sniffio>=1.1 in /usr/local/lib/python3.9/dist-packages (from anyio<5,>=3.4.0->Starlette) (1.3.0)
Installing collected packages: Starlette
Attempting uninstall: Starlette
Found existing installation: starlette 0.23.1
Uninstalling starlette-0.23.1:
Successfully uninstalled starlette-0.23.1
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
fastapi 0.90.1 requires starlette<0.24.0,>=0.22.0, but you have starlette 0.26.1 which is incompatible.
Successfully installed Starlette-0.26.1
Name: starlette Version: 0.23.1 Summary: The little ASGI library that shines. Home-page: Author: Author-email: Tom Christie<EMAIL_ADDRESS>License: Location: /usr/local/lib/python3.9/dist-packages Requires: anyio, typing-extensions Required-by: fastapi

https://github.com/encode/starlette

We aren't coder, what's this?

https://github.com/gradio-app/gradio/blob/226e87cd54a1b4cf0340955eac6bc709b6844c0e/gradio/routes.py#L37

Hi @7108 👋 I am working on it 🚧

https://github.com/search?q=Exception+in+ASGI&type=issues&s=updated&o=desc

https://github.com/camenduru/stable-diffusion-webui-colab/releases/tag/0.0.17

I got the same error message when using another 2 links.

Hi @DonkeyBear 👋 thanks for the info ❤ we are working on it

I can't open webui,becase missing index.js on gradio

Hi @DonkeyBear 👋 thanks for the info ❤ we are working on it

When I open public url,I got white screen.

thanks for the good info @sgoal ❤ those files should not come from gradio server 😐
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.ff9173a1.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.0cc64d4e.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.5a3337db.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.5e9bdb3b.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/Tabs.4607aa1c.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/Column.2d03a686.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.c2499812.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.853cecde.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.a57de80f.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.8e0ac58c.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.d619ae2e.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.3ba14455.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/BlockLabel.677b0876.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.92516eb3.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/File.99c9aa38.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/Upload.660f83a6.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/ModifyUpload.cecce8cd.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/utils.27234e1d.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.9823b33a.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.2c06fbc1.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.2953baa5.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.0a2a3870.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.c55420bb.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.82581d10.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.e7e4d716.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.95a03248.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/Image.8532565d.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.37f98688.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/Webcam.df71ae73.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/Image.6029e16a.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.e85382dc.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.e747f4e7.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.dc9bf9fe.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.12ae7510.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.2fdc9bcc.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/dsv.7fe76a93.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.1848fd6f.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.74401308.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/static/img/api-logo.svg
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/logo.0a070fcf.svg

https://github.com/camenduru/gradio/blob/b1b6841b7ec10a19df0f0d8f4daa797badabe190/ui/packages/app/build_plugins.ts#L20

thanks for the good info @sgoal ❤ those files should not come from gradio server 😐
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.ff9173a1.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.0cc64d4e.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.5a3337db.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.5e9bdb3b.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/Tabs.4607aa1c.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/Column.2d03a686.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.c2499812.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.853cecde.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.a57de80f.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.8e0ac58c.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.d619ae2e.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.3ba14455.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/BlockLabel.677b0876.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.92516eb3.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/File.99c9aa38.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/Upload.660f83a6.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/ModifyUpload.cecce8cd.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/utils.27234e1d.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.9823b33a.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.2c06fbc1.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.2953baa5.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.0a2a3870.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.c55420bb.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.82581d10.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.e7e4d716.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.95a03248.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/Image.8532565d.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.37f98688.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/Webcam.df71ae73.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/Image.6029e16a.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.e85382dc.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.e747f4e7.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.dc9bf9fe.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.12ae7510.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.2fdc9bcc.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/dsv.7fe76a93.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.1848fd6f.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/index.74401308.js
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/static/img/api-logo.svg
https://gradio.s3-us-west-2.amazonaws.com/3.16.2/assets/logo.0a070fcf.svg

index.js is still missing

Hi @sgoal 👋 we are not using gradio cdn, please update your code if you have --share argument please delete

Maybe fixed idk yet

Using remote.moe and cloudflared URL right now, still got the same error.
The colab works, but WebUI will disconnect often, my workaround is stop it and run this again:
!python launch.py --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --multiple

Hi @DonkeyBear 👋 please send the full error message here also please check if you have this line in your code
!sed -i -e 's/fastapi==0.90.1/fastapi==0.89.1/g' /content/stable-diffusion-webui/requirements_versions.txt

I'm sorry for replying so late.
I had never used WebUI colab since that day, until I used it again today, and it worked fine, without any error message.
I think this issue can be closed again.

maybe check this out before closing: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/8902#issuecomment-1483808904

I'm using Anything-v4.5，and it happened again.

Colab I'm using
https://colab.research.google.com/github/camenduru/stable-diffusion-webui-colab/blob/main/stable/anything_4_webui_colab.ipynb

WebUI URL I'm using
trycloudflare

Error message

ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/uvicorn/protocols/websockets/websockets_impl.py", line 254, in run_asgi
    result = await self.app(self.scope, self.asgi_receive, self.asgi_send)
  File "/usr/local/lib/python3.9/dist-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
    return await self.app(scope, receive, send)
  File "/usr/local/lib/python3.9/dist-packages/fastapi/applications.py", line 270, in __call__
    await super().__call__(scope, receive, send)
  File "/usr/local/lib/python3.9/dist-packages/starlette/applications.py", line 124, in __call__
    await self.middleware_stack(scope, receive, send)
  File "/usr/local/lib/python3.9/dist-packages/starlette/middleware/errors.py", line 149, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.9/dist-packages/starlette/middleware/gzip.py", line 26, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.9/dist-packages/starlette/middleware/exceptions.py", line 79, in __call__
    raise exc
  File "/usr/local/lib/python3.9/dist-packages/starlette/middleware/exceptions.py", line 68, in __call__
    await self.app(scope, receive, sender)
  File "/usr/local/lib/python3.9/dist-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
    raise e
  File "/usr/local/lib/python3.9/dist-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.9/dist-packages/starlette/routing.py", line 706, in __call__
    await route.handle(scope, receive, send)
  File "/usr/local/lib/python3.9/dist-packages/starlette/routing.py", line 341, in handle
    await self.app(scope, receive, send)
  File "/usr/local/lib/python3.9/dist-packages/starlette/routing.py", line 82, in app
    await func(session)
  File "/usr/local/lib/python3.9/dist-packages/fastapi/routing.py", line 289, in app
    await dependant.call(**values)
  File "/usr/local/lib/python3.9/dist-packages/gradio/routes.py", line 436, in join_queue
    session_info = await websocket.receive_json()
  File "/usr/local/lib/python3.9/dist-packages/starlette/websockets.py", line 133, in receive_json
    self._raise_on_disconnect(message)
  File "/usr/local/lib/python3.9/dist-packages/starlette/websockets.py", line 105, in _raise_on_disconnect
    raise WebSocketDisconnect(message["code"])
starlette.websockets.WebSocketDisconnect: 1006


File does not exists

Bug Report
Hi I just started working with PDFKit to generate PDFs on the server side from user inputs from a form on a web page. I tried two methods so far.

Upload with node webdav library.
Upload it with custom REST call.

Both methods work in case of an upload of a picture file posted through the web form. With the generated PDF from pdfkit I seem to do something wrong though.
Description of the problem
The PDF gets generated and written to disk as intended. But then node returns a file not found error, though the file does exists. I assume it's pdfkit still processing and generating after doc.end() executes while the upload command is already trying to read the file from disk, since the issue disappears when I put a simple wait timer for a few seconds...
Error uploading application document:  Error: ENOENT: no such file or directory, open '/tmp/A33gRk59TwmVuTf8odXg7t9ujyYGXB0U.pdf'

Code sample
I generate the document like such.
const localApplicationFilePath = `/tmp/${_id}.pdf`

    const doc = new PDFDocument({
      size: 'legal',
      lang: 'de',
      pdfVersion: '1.7ext3',
      userPassword: '12345',
      ownerPassword: '12345678',
      permissions: {
        printing: 'highResolution',
        modifying: false,
        copying: false,
        contentAccessibility: false,
        documentAssembly: false,
      },
      info: {
        Title: `Receite: ${applicant.firstname} ${applicant.firstname}`,
        Author: 'MyCompany',
        Subject:
          'Lorem ipsum dolor ...',
        Keywords:
          'Lorem, Ipsum',
      },
    })

    doc.pipe(createWriteStream(localApplicationFilePath))

    doc.fontSize(25).text('Receit', { align: 'center' })
    doc.fontSize(14).text(`Customer: ${applicant.firstname} ${applicant.name}`, {
      align: 'center',
    })
    // some vector graphics
    doc
      .save()
      .moveTo(100, 150)
      .lineTo(100, 250)
      .lineTo(200, 250)
      .fill('#122a43')

    doc.circle(280, 200, 50).fill('#530f14')

    // an SVG path
    doc
      .scale(0.6)
      .translate(470, 130)
      .path('M 250,75 L 323,301 131,161 369,161 177,301 z')
      .fill('#8e97af', 'even-odd')
      .restore()

    // and some justified text wrapped into columns
    doc
      .text(
        'Man kann neben Bilder wie QR Codes auch SVGs einbauen...😉',
        100,
        300
      )
      .font('Times-Roman', 13)
      .moveDown()
      .text(lorem, {
        width: 412,
        align: 'justify',
        indent: 30,
        columns: 2,
        height: 300,
        ellipsis: true,
      })

    // finalize the PDF and end the stream
    doc.end()

Followed by the lines to upload the file.
(fetcher is merely a simply wrapper around the fetch method)
const fetcherPath = `https://my.nextcloud-domain.com/remote.php/dav/files/web-dav-user-id/upload-dir/receite.pdf`
    const documentFile = readFileSync(localApplicationFilePath)
    await fetcher(
      fetcherPath,
      {
        method: 'PUT',
        body: documentFile,
        headers: {
          Authorization:
            'Basic ***************************',
        },
      }
    )

Your environment

pdfkit version: 0.13.0
Node version: 16
Operating System: docker-compose on Debian

I'm actually also getting this issue, but on Ruby, version 2.6.8

Hi @l4b4r4b4b4 @TravisGM92 did you guys manage to find a fix? I am also facing the same issue.

doc.end() will emit the 'finish' event after generating the pdf. You can subscribe the 'finish' event and do the future works.
@l4b4r4b4b4 @TravisGM92 @safisaleem


Code Outline does not show class methods

VSCode Version: 1.14.2
OS Version: 10.12.6

Steps to Reproduce:

Create a class with methods
Open the Code Outline

Reproduces without extensions: Yes
Environment: React Native with Typescript
File extension: tsx
Typescript Version: 2.4.1
Test file
import React, { Component } from 'react'
import { connect } from 'react-redux'
import redux from 'redux'
import {
  NavigationScreenProps,
  NavigationScreenConfigProps,
} from 'react-navigation'
import { ActionButton } from 'react-native-material-ui'

import { NavButton } from '@components'
import { updateTicket } from '@actions'
import { Store, Ticket } from '@models'
import NoTickets from './components/NoTickets'
import { Content } from './styles'
import TicketList from './components/TicketsList'

interface ConnectedDispatch {
  toggleSidebar(): void
  updateTicket(ticket: Ticket): void
}

interface ConnectedProps {
  tickets: Ticket[]
}

interface State {
  newTicketModalOpen: boolean
}

interface Props
  extends NavigationScreenProps<{}>,
    ConnectedDispatch,
    ConnectedProps {}

class Support extends Component<Props, State> {
  static navigationOptions = ({ navigation }: NavigationScreenConfigProps) => ({
    title: 'Support',
    headerLeft: (
      <NavButton
        iconName="menu"
        onPress={() => navigation.navigate('DrawerOpen')}
      />
    ),
    headerRight: (
      <NavButton
        text="FAQ"
        onPress={() => {})}
      />
    ),
  })

  state = {
    newTicketModalOpen: false,
  }

  toggleNewTicketModal() {

  }

  viewTicket(ticket: Ticket) {
  }

  addNewTicket() {
    this.props.navigation.navigate('NewTicket')
  }

  render() {
    return (
      <Content>
        {this.props.tickets.length === 0
          ? <NoTickets />
          : <TicketList
              tickets={this.props.tickets}
              viewTicket={a => this.viewTicket(a)}
            />}

        <ActionButton icon="add" onPress={() => this.addNewTicket()} />
      </Content>
    )
  }
}

const mapStateToProps = (state: Store) => ({
  tickets: state.tickets,
})

const mapDispatchToProps = (dispatch: redux.Dispatch<Store>) => ({
  updateTicket: (ticket: Ticket) => dispatch(updateTicket(ticket)),
})

export default connect<ConnectedProps, ConnectedDispatch, null>(
  mapStateToProps,
  mapDispatchToProps
)(Support)

Code Outline Output

Only shows static members

I believe there is a syntax error in your code. Inside headerRight, there is a stray ) in onPress={() => {})}
After deleting this, I see the code outline working as expected:

@mjbvz They aren't any stray ) the code and compiles through tsc. I just edit a portion of it to post

Full header right.
  headerRight: (
      <NavButton
        text="FAQ"
        onPress={() => Linking.openURL('https://google.html')}
      />
    ),

@mjbvz Could you reopen this? There's nothing wrong with what i provided. This simple example fails:
static navigationOptions = ({ navigation }) => ({
    headerLeft: (
      <NavButton
        iconName="menu"
        onPress={() => navigation.navigate('DrawerOpen')}
      />
    ),
  })

The code you first pasted up has a syntax error. Using that replacement definition for navigationOptions, here's what our built-in outline shows:

The code outline panel in your screenshots comes from an extension. If it is not displaying results correctly, please try filing an issue against that extension

Thanks. I thought it was a built in section all time. I found the extension. Thanks 👍🏽


replacing existing video

When using
const response = await path == null ? jwApi.videos.update(data) : jwApi.videos.update(data, path)
the first case i.e. updating the title and description of a specific video works fine.
But replacing the video doesn't actually replace it even though everything else gets updated as expected.
Am I calling the update function incorrectly?

Hi @hfllr,
Sorry for the delay in getting back to you. In order to update an existing media, you must set an additional parameter update_file: true.
For example:
jwApi.videos.update({ video_key: 'key_to_update', sourcetype: 'file', update_file: true })

If you provide a download_url, this will perform a fetch upload, whereas without specifying it, the response will contain a link property, which contains data to construct an upload URL.
Please let me know if you have any questions.

Thanks for your answer! @boyntoni
I included all these parameters now but specifying the download_url doesn't work when I assign it with my variable 'path', which is a path to a local file that should replace the old one. Did I get something wrong there?
Also the link property you mentioned generates a new video key. Does that mean the old video object gets deleted and replaced including a new video key?
It's a bit confusing for me how that update process works internally.

Hi @hfllr,
If you are trying to re-upload a local file, you should do something like the code sample below.
They key returned in the link dict will be different, but you should see that response.media.key is the same video key (or Media ID) specified in the update call.
const resolve = require('path').resolve;
const fs = require('fs');
const rp = require('request-promise');

const videoData = { video_key: {YOUR_VIDEO_KEY}, update_file: true, sourcetype: 'file' }

const filePath = './relative_path_to_file.mp4';
jwApi.videos.update(videoData).then(response => {
    const { path, protocol, address } = response.link;
    const uploadUrl = `${protocol}://${address}${path}`;
    return rp({
        method: 'POST',
        uri: uploadUrl,
        json: true,
        formData: {
            file: fs.createReadStream(resolve(filePath)),
        },
        qs: Object.assign({}, response.link.query, {
            api_format: 'json',
        }),
    }).then(resp => console.log(resp));
});

Thanks a lot for the detailed response! It's working now. @boyntoni


[GOBBLIN-1986] Log FileStatus for only the first N inputs in GobblinWorkUnitsInputFormat

Dear Gobblin maintainers,
Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
JIRA

[ ] My PR addresses the following Gobblin JIRA issues and references them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"

https://issues.apache.org/jira/browse/GOBBLIN-1986

Description

[ ] Here are some details about my PR, including screenshots (if applicable):

Naively logging every input holds the potential to go WAY overboard.  w/ 50k+ work units, I found it to actually cripple the UI of my executor.  for reference, I downloaded the executor logs:
$ egrep 'input files at' ~/executor-logs_88066352.log | wc
       1<PHONE_NUMBER>7326

$ cat ~/executor-logs_88066352.log | wc
   42240<PHONE_NUMBER>8831

see: just that one line has 49M of the 56M chars of my (otherwise voluminous!) output.
Tests

[ ] My PR adds the following unit tests OR does not need testing for this extremely good reason:
existing unit tests

Commits

[ ] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":

Subject is separated from body by a blank line
Subject is limited to 50 characters
Subject does not end with a period
Subject uses the imperative mood ("add", not "adding")
Body wraps at 72 characters
Body explains "what" and "why", not "how"

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (913d580) 46.75% compared to head (46d5a4c) 50.21%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3860      +/-   ##
============================================
+ Coverage     46.75%   50.21%   +3.46%
+ Complexity     9666     5885    -3781
============================================
  Files          1877     1072     -805
  Lines         75185    41184   -34001
  Branches       8399     4623    -3776
============================================
- Hits          35153    20681   -14472
+ Misses        36846    18693   -18153
+ Partials       3186     1810    -1376

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


CWE-1047 Modules with Circular Dependencies

Usage Name
Circular dependencies
Reference
https://cwe.mitre.org/data/definitions/1047
Roles

the ModuleDendencyCycles

Detection Patterns

8.2.113 ASCQM Ban Circular Dependencies between Modules

to check for cycles in import/include files, first initialize the tool with
/static/driver/main.py --init --pp_pass='includes-cycles'
Then run
/static/driver/main.py --report -m='includes-cycles' --pp_pass='includes-cycles'
to print the found cycles, if any.


add tomcat content

Proposed Changes
Added analytic content for Tomcat data connector

Hey @spsocprime , We have resolved the issue for PR Validations failure and request you to please update your PR branch with the latest changes from Azure:master so that the PR Validations can be executed.... Thanks!!!

@aprakash13 Please review analytic rules.

There should not be 2 templates with the same ID, but the id 4fa66058-4870-11ec-81d3-0242ac130003 is duplicated, please update it, thanks.

The name 'TomcatEvent' does not refer to any known table, you will have to add it in  CustomTables folder, thankyou.

@aprakash13 Please review analytic rules. Thanks.

Workbook looks good, PR can be merged once the comments for Analytic Rules and Hunting queries are resolved.

@shainw , please approve the requested changes, thanks.

Hey @spsocprime , the branch has conflicts that must be resolved, please resolve, thanks.

Hey @spsocprime , the branch has conflicts that must be resolved, please resolve, thanks.

Conflicts has been resolved

Hey @shainw / @aprakash13 , please approve the changes, thanks.

Generally, the queries looks good and changes were already suggested by Shain. As @shainw suggested in his earlier review casting toint() decreases perf.  Wondering if we can have the connector bring the data in as an INT or simply match on the string. There was some comment about getting errors without toint(). Wondering if we know what these errors were.

Generally, the queries looks good and changes were already suggested by Shain. As @shainw suggested in his earlier review casting toint() decreases perf. Wondering if we can have the connector bring the data in as an INT or simply match on the string. There was some comment about getting errors without toint(). Wondering if we know what these errors were.

Hey @spsocprime , please update the requested changes, thanks.

Generally, the queries looks good and changes were already suggested by Shain. As @shainw suggested in his earlier review casting toint() decreases perf. Wondering if we can have the connector bring the data in as an INT or simply match on the string. There was some comment about getting errors without toint(). Wondering if we know what these errors were.

Hey @spsocprime , please update the requested changes, thanks.

Please clarify what exact changes need to be done to the content. As I've mentioned before:

Casting toint() can't be removed because then checks will not pass (errors are related to using comparison operators (e.g. >=, <= with string type)
We can not change connector to ingest data as INT cause parsing is done by function after ingestion. If we add casting toint() into parser this will also affect perf.

@aprakash13 , please review the changes , thanks.

Hello,
Please move your workbook template one level up above Images. Currently your template sits in your "Images" folder.
Thanks

Workbook is not in Images folder (see screenshot below)

Generally, the queries looks good and changes were already suggested by Shain. As @shainw suggested in his earlier review casting toint() decreases perf. Wondering if we can have the connector bring the data in as an INT or simply match on the string. There was some comment about getting errors without toint(). Wondering if we know what these errors were.

Hey @spsocprime , please update the requested changes, thanks.

Please clarify what exact changes need to be done to the content. As I've mentioned before:

Casting toint() can't be removed because then checks will not pass (errors are related to using comparison operators (e.g. >=, <= with string type)
We can not change connector to ingest data as INT cause parsing is done by function after ingestion. If we add casting toint() into parser this will also affect perf.

Hey @aprakash13 , please check and approve the changes, thanks.

@aprakash13 , Please check and approve the changes, thanks.

@socprime - I commented on the toint() piece, can you confirm?

@shainw  Please check and approve the changes, thanks.

@shainw Please check and approve the changes, thanks.

@shainw Please check and approve the changes, thanks.

@shainw Please check and approve the changes, thanks.

@shainw Please check and approve the changes, thanks.

@shainw Please check and approve the changes, thanks.


add config file processing

add config file processing

Hi! @iiwo. Thanks for your work. Is this PR still actual?

Hi @dsalahutdinov - thanks for reaching out! I PR-ed this prematurely by mistake - this does work but still needs some more work (tests, additional config options, custom file name/location etc.) so will make some updates and push a proper PR later, and also will and push some separate PRs with some small fixes/updates (some split from this one)


RSS feed - inconsistent display of content

I've tested RSS feeds and found them to be inconsistent or problematic in the following manners. I'm using examples from the hub I'm on, but testing has shown it is spread across numerous implementations. I can provide specific channel examples on other hubs, or they can be found easily after viewing several feeds.

Not displaying any entries
http://hub.spaz.org/feed/dbene
Nothing displayed, likely due to only having older posts. At some point in the last month or so, the RSS seems to have reset and all previous entries were lost from the feed. This can be seen in just about all channel feeds I've checked. Maybe this has something to do with the $a replacement, as many feeds do not go beyond March 31. Not sure.
IMO the RSS feed should display all posts regardless of age. If there needs to be a limit it should be numerical, so that eg when 100 posts are on the feed, the oldest start getting bumped. Perhaps there is a method to simply rebuild the feed. I am unaware of it.

Only displaying post titles
https://hub.spaz.org/feed/spaz
The content from the posts is missing, but feed shows whether a user is attending (for events) or has liked the post. Note that this does not relate to the type of post being an event, as the problem also exists for non-event posts.

There are two possible culprits here. Some time ago there was an issue limiting the number of returned posts, and the feeds were presenting all posts ever created on that channel. This caused some serious problems as some channels have several years of content. A short term fix was provided to limit the starting date to a month until the real reason was found. The real reason was found and ultimately fixed but we neglected to remove the short term fix. I will check this in shortly.

It is also possible that the channel owner has restricted permissions on their stream. The public feed returns nothing if the channel does not post publicly by default. This is probably not the case here and is probably the bug mentioned, but I'm mentioning it for completeness. Many folks have private channels and their public feeds are totally empty.

Likes and attendance info are sent as ActivityStreams. The content for these activities is simply the statement that xyz liked something or is attending. The full content is provided in the activity actor, verb, and object/target per the original ActivityStreams spec (Atom version since there are now other versions). Most software does not display this content but internally converts these to the platform "like" or "attend" indications.  However the text statement is provided for generic Atom processors that do not understand ActivityStreams (or do not have special handlers for these particular activities) so these items can be presented by basic feed readers; hence the activity statement is human-readable. Unless I've missed something in your issue description I don't see any bug here.

Sorry I wasn't totally clear on #2, the like / attendance info was meant to be extra data but it was confusing.
The problem is the content of a post is not being displayed. On https://hub.spaz.org/feed/spaz for example, one can see the titles of the posts, but no content from that post is displayed. When you click on the title, you are brought to the HTML version showing all the content. This is a newer development as well, because previously the RSS was displaying the contents of posts with no problem. I believe this also changed around the same time as what seems to be the cutoff for old posts.
This problem is inconsistent, many feeds are fine, many are not. Here is another channel showing what may be the same problem: https://grid.reticu.li/feed/andrewmanning  .. look at the feed, then look at the channel. For this particular channel, there are no post titles, so there is even less idea of how to figure out what you're looking at. The feed is useless as is, there are only dates and whether someone liked something, and it appears somewhat randomly selected. This one might be related to privacy settings, I can't tell.

It appears you're seeing two different issues with #2. We made some changes recently to the way events are formatted in feeds to make them directly compatible with the format used by GNU-social. Besides some other minor changes, GNU-Social also provides a 'summary' field which is set to the event title. Many feed readers look for both 'summary' and 'content' and if 'summary' is present, they ignore 'content'. That appears to be happening in this case with your feed reader (I've duplicated using Firefox pointing at the feed - it ignores 'content' completely for events). This behaviour will vary by feed reader (they can choose which field to display if both are present), but it is quite common for content to be ignored if there's a summary. I can easily comment out the line that generates the 'summary' field, but I'm not certain if this would break GNU-Social event compatibility. GNU-Social events are somewhat new and it's possible they aren't aware that the event content will be ignored by most feed readers. I'll comment it out for now (since we don't need it for anything) and make a note why I did so; because we are in the process of providing stronger protocol integration with GNU-Social - and this decision may need to be revisited and perhaps reversed.
Andrew's feed is a bit more troublesome. The SQL queries we use should always provide a parent post, followed by replies/likes/whatever to that parent post; and the parent post here is completely missing. That is most definitely a bug; but since it seems to somewhat random in nature (my feed seems to work fine), I'll have to poke around and try and duplicate it so as to pinpoint the cause.

Ok I see. When creating an event there is no option to input a summary and it appears to simply be duplicating the title, making it extraneous (worse, since it actually blocks the content).
Generally speaking, a summary field seems more appropriate for a longer post rather than an event listing. However if the summary field is required for compatibility, perhaps it could be populated by the event description field instead. There could also be an option for summary in event creation, but if left out, again perhaps populated by the description since ultimately there is no purpose in duplicating the title.

In fact we create the post title from the event summary. We call it 'title' on the event form just for consistency - as that is what people are going to see in event postings. There may be no easy solution as the activitystreams spec for events dictates that one use ical/vcal fields wherein summary is required and differs from description which isn't required.
I seem to recall I confronted this 5-6 years ago when I created the ActivityStreams events and didn't follow the spec precisely for this reason; it was very vague and at that time nobody else was providing activitystreams events so there were no clear models of how to do it correctly.  I think what I may need to do is change the namespace for the summary field so it's tagged as a calendar field and not an atom field - and then accept atom_entry:summary if there is no xcal:summary. The end result will be that our feeds should be spec compliant but they may not be GNU-Social compliant; and you should see event content again. Then I'll have to open an issue with GNU-Social to sort the compatibility mess it raises.

Both issues should now be fixed going forward. I haven't yet contacted the GNU-Social folks.


Keyboard Library in other languages?

Hi Thecakeisgit!
You Dckuino.js is awesome but I have a little problem. My keyboard is not english and this makes mistakes when the script is runing. Do you have another library for a diferent keyboard? In my case is a Spanish keyboard.
Thank you for your work.

Hey man :D, this can't be archived with a library, i got the same issue, because i got a french keyboard.. You need to modify your Arduino source code, the file HID.cpp contains a var named _asciimap.. You can search on the net to find the HID.cpp for your needs :)
Also, you gave me an idea to fix your problem, so i'll don't close the issue now. I'll inform u if i find something ;D

@Pedrinbeep

@Pedrinbeep did u find something ? @d4n5h Any tip ? :D

@Pedrinbeep @Thecakeisgit
It's on my TODO list as well.
I think that the standard Arduino keyboard library is based on ASCII characters.
In order to bring new layouts we need somehow to switch to UTF-8 and add those characters to the compiler's array of keys.
I'll take a look on it later.

@d4n5h If u understand french http://www.zem.fr/utiliser-mouse-keyboard-azerty-arduino-pro-micro-teensy/

@Thecakeisgit Not sure if it will work in this case but a simple workaround could be just to switch the keyboard input language to english with a "SHIFT ALT" combo. But if you have to print characters in other languages it will not work.

@Thecakeisgit  Oh, i didn't knew that you have a totally different physical key layout. Weird...
So my "workaround" will not work in this case...

Yep, i know but, it don't work on every computer, for me i uninstalled english locale, so SHIFT ALT just do NOTHING, so that's not acceptable.. But we can create a "LocaleKeyboard" project that we use both.
The idea is to create modules(asciimap_fr, asciimap_es, ...) and to just do Keyboard.init("fr_FR") to set locale..
What do u say about that ? @d4n5h

@Thecakeisgit Good idea! i'm in.

Add me as contributor ;D

@d4n5h

In my repo?

@Thecakeisgit I've added you as a collaborator.

@d4n5h Come :D https://github.com/Thecakeisgit/LocaleKeyboard

@d4n5h https://hack.chat/?LocaleKeyboard

@Pedrinbeep We're working on a port of Keyboard arduino Lib, here -> https://github.com/Thecakeisgit/LocaleKeyboard
Feel free to comment and help :+1:

@Thecakeisgit Great! I´ll try to help ;)

@Thecakeisgit @d4n5h I found this link, you can be helpful?
LINK: https://forums.hak5.org/index.php?/topic/36068-keyboard-layout-modified-spanish-keyboard-layout/

It could be helpful, if the links were not dead :/

@Pedrinbeep

I sent a few PM to this guys, if they response, I will let you know.
@Thecakeisgit

@Thecakeisgit Here is the es.properties file for download:
https://www.dropbox.com/s/4ibsw9l9m1y560r/es.properties?dl=0
I hope could help! ;)

@Pedrinbeep Thanks man, i got the solution, gimme tomorrow and it will be done ;D

Fixed with 7ee4217 & 02fd692.
Now we need to update in LocaleKeyboard.js.