Add Hrp type

Instead of accepting &str for hrp strings we can add a type Hrp and abstract the checking of the string. This is the "parse don't validate" methodology suggested by @clarkmoody here.
This is an invasive breaking change.

Please note, I'm not happy with the inefficient way this PR converts an Hrp to a lowercase version in encode_to_fmt.

Changes in force push are substantial, Hrp now has an 83 byte long buffer which stores the string as ascii byte values. We provide iterators for getting bytes, chars, lowercase bytes, and lowercase chars.
Please note the logic in split_and_decode is changed, the returned Hrp has not been lowercased like the old string that was returned.

Converted to draft so we do not merge because ./fuzz.sh encode_decode crashes on my machine with the following hex:
045f5f5f5f5f5f5f5f0000000000000000083535
ffa8531a004b3e0000b1f15ab026bd0d4fc2eb72825f7cf1570000000000
0000040000000000
Two interesting things:

I cannot reproduce the failures, this test passes

    #[test]
    fn duplicate_crash() {
        let mut a = Vec::new();
        extend_vec_from_hex("045f5f5f5f5f5f5f5f0000000000000000083535", &mut a);
        super::do_test(&a);

        let mut a = Vec::new();
        extend_vec_from_hex("ffa8531a004b3e0000b1f15ab026bd0d4fc2eb72825f7cf1570000000000", &mut a);
        super::do_test(&a);

        let mut a = Vec::new();
        extend_vec_from_hex("0000040000000000", &mut a);
        super::do_test(&a);
    }

The fuzzer always fails with the same values so it must be starting from the same initial state, this is what we were wondering about @apoelstra.

@tcharding can you reproduce the failures if you test with RUSTFLAGS=--cfg=fuzzing?

2. The fuzzer always fails with the same values so it must be starting from the same initial state, this is what we were wondering about @apoelstra.

This does not sound like a valid inference.

The fuzzer always fails with the same values so it must be starting from the same initial state, this is what we were wondering about @apoelstra.

This does not sound like a valid inference.

So I guessed from your comment that I don't understand how fuzzers work properly. I did some more reading. From my understanding the fuzzer starts with some input, runs the test, measures the coverage, then mutates the input in some interesting way and repeats. I thought that the initial input was random, hence why I was surprised that it failed with the same values on multiple runs.
Where is the hole in my understanding?

@tcharding can you reproduce the failures if you test with RUSTFLAGS=--cfg=fuzzing?

I can't repro. Had a go this morning, left it a while, and had another go but still no dice?

@tcharding try deleting your hfuzz_workspace directory then try again.

Where is the hole in my understanding?

There are many paths to the same state.
But also, in this case, I think you're confused by the hex output from ./travis-fuzz.sh which just looks in the hfuzz_workspace directory for the first crash file ... so if you don't delete that between runs, it'll output the same file. (And if you fix the bug, it may confusingly still be output.)

ooooh, would it be useful to add at the start of the loop (to all the fuzzing scripts):

# Clean up crash file from previous runs.
if [ -f hfuzz_workspace/$FILE/HONGGFUZZ.REPORT.TXT ]; then
        rm hfuzz_workspace/$FILE/HONGGFUZZ.REPORT.TXT
fi

Fixed up a few docs mistakes and removed infrastructure changes to fuzz files. @apoelstra please review carefully the changes in encode_decode - I feel like I'm still not groking fuzzing, I'm unsure if the code I've written is the right way to write fuzzing code.

Changes in force push, I found a bug while using this in bitcoin. Added a test that catches it and fixed it. (I wasn't using the lowercase iterator when writing to polymod function). Was not being caught because we lowercase in the API functions higher up.

Worked out why I couldn't get duplicate_crash to work - I didn't realise the output from ./fuzz.sh over multiple lines was actually a single line if input, I was treating it as multiple lines of input. (I don't remember right now where we were discussing this @apoelstra.)

Changes in force push:

A bunch of fuzzing fixes including adding a new fuzz target
Iterate over chars as discussed above

Changes in force push:

Used iter::Take<slice::Iter<'b, u8>> for the internal byte iterator so it has the correct length
Improved the rustdocs to be more uniform
Simplified the parsing code a little with no change of logic (removed early return since it is an optimisation and makes the code marginally more difficult to read)

Done reviewing 179868360b76d5d9a8d806dd5721d51d84e84b48. Looking a lot better!

Thanks for your patience with so many review cycles @apoelstra!

@clarkmoody I'm happy with this PR now. ok to merge?

I added default and one usage of it (we cannot call it in the const function).
Can we leave the consts to another PR as we see how the separation between rust-bech32 and rust-bitcoin develops?

We can leave both to a future PR since they're small enough that they'll be quick to review (and not cause any conflicts).


Feature: automatically build clients for all workspaces

Addresses https://github.com/loambuild/loam/issues/75
Note I went with the option of just automatically building them. We could always add an option to toggle this pretty easily if needed. It will still check the names of contracts to ensure there aren't any typos but it uses the package name for the main loop.

Looks like some tests are failing, putting as draft for now.

Nope just forgot to mark ready


Redirect from publications finder to all-content

Adds an endpoint redirect/publications which takes available parameters
from a request to publications, and converts them to suitable
all-content facet parameters.
https://trello.com/c/knEZK7G3/486-handle-redirects-from-the-publications-whitehall-finder-to-the-all-content-finder
It's sort of copied from this other one here! https://github.com/alphagov/finder-frontend/pull/926

Also, can you add the URL to the Trello ticket in the PR's description? That way it also automatically ends up in the ticket! - and it's easier to cross reference in future

Also, can you add the URL to the Trello ticket in the PR's description? That way it also automatically ends up in the ticket! - and it's easier to cross reference in future

Done, it's now in the ticket.

Great work!
It works perfectly: link, the params get transformed OK.
Only comment is on the tests. I reckon we could simplify the tests by having just two it blocks for checking all params in one.
So instead of:
    it 'passes on keywords params' do
      get :announcements, params: { keywords: %w[one two] }
      expect(response).to redirect_to finder_path('news-and-communications', params: { keywords: %w[one two] })
    end
    it 'converts taxons to level_one_taxon and converts array to string' do
      get :announcements, params: { taxons: %w[one] }
      expect(response).to redirect_to finder_path('news-and-communications', params: { level_one_taxon: 'one' })
    end

You could do:
    it 'passes on all params' do
      get :announcements, params: { keywords: %w[one two], taxons: %w[one]  }
      expect(response).to redirect_to finder_path('news-and-communications', params: { keywords: %w[one two], level_one_taxon: 'one' })
    end

@bilbof New commit condenses it so we're down to 3 tests per redirect rather than 10 something!


Can't match files inside a folder after deploying when using globs. Now V2

I'm trying to match files inside a folder using globs.
I can see folder content on the source tab but in runtime, I can't get matched files and my glob always returns an empty array.

For anyone facing the same issue
you need to include the folder files in your now.json build config
"builds": [
    {
      "src": "src/index.ts",
      "use": "@now/node",
      "config": {
        "distDir": "build",
        "includeFiles": "src/templates/**/*.+(js|ts)"
      }
    }
]


dateview setup

I'm not able to see day's numbers, just the day names on top. Am I missing something?
Thanks,

I'm not sure what's happening here. You have set the delegate, otherwise you wouldn't see the weekday labels. What's the gray background and how did you set it? Can you give me some more details about your setup?

yeah, delegate is OK now, the gray view is the whole JBDatePickerView object. Tried in code and on storyboard, getting the same results, not able to see the days.

there is a uilabel behind the datepickerview, looks like it's only loading the top view

datePicker.presentedMonthView?.monthDescription . ----- returning correct month here tho

Can you please check the version of JBDatePicker you installed? It should be 1.1.2.

I can't reproduce the issue without more info about your specific setup. I just tried a new testproject and it just works fine. The only thing I can come up with right now is that you have installed an old version of JBDatePicker. The way it draws it subviews was changed recently. Please run pod update and check if 1.1.2 is installed.


Address Bar Autocompleter Focus

The address bar is a QLineEdit that spawns a new QListWidget for the autocomplete. Various window hints are set on the QListWidget's window, to always display on top, be frameless, and to not accept focus. On Windows these hints are absolutely applied, however on Linux these are mere hints to the Window Manager.
With Window Managers for Linux (I'm testing with AwesomeWM, though I believe this is also true on i3) a NET_WM_WINDOW_TYPE_NORMAL window will appear in window switchers and be able to take focus. We can implement a handler for the WM_TAKE_FOCUS protocol by calling QWidget::FocusPolicy(Qt::NoPolicy), which will reject focus and send it back to the previous window.
Unfortunately, it seems the UrlEdit::focusInEvent(QFocusEvent*) and UrlEdit::focusOutEvent(QFocusEvent*) methods are still called with the autocomplete's focus policy is Qt::NoPolicy. The good news is that this happens fast enough my keystrokes aren't lost anymore. The bad news is the autocomplete is always hidden.
My next thought is to try replacing the autocomplete functionality using QLineEdit's support for using QCompleter. By default, this will give us popups using QListViews, like we're drawing now, though it looks like we can customize this behavior by subclassing QCompleter.

@cretz I tried a bunch of options, such as disabling focus, marking it as a "dropdown" window, marking it as a utility window, setting up a transient parent. In no way was I able to get it to behave like a normal autocomplete.


Design: allow onyo new to accept values in YAML

onyo new can have values passed into it via --template, --keys, or --tsv. However, despite generating a YAML file, there is no way to pass a YAML file into onyo new.
Except one can, by abusing --template. A template does not need to be in .onyo/templates. One could pass a YAML file to --template and proceed from there.
The downside is that one then cannot use a template.
The current two favorite options are:

add a flag (such as --yaml) to accept YAML file(s)
allow multiple templates to be provided, allowing them to layer

Option 1 is more powerful as a batch import (basically alternative TSV).
Option 2 provides interesting new capabilities for templates, to either use them as lego blogs (assembling components) or layers to selectively overwrite or redact values.
These are two very different directions, and I don't think we should pursue both.
Open Questions:

what to do about empty values?

--keys requires both key and value; what if we have a key with a value in the template and the key without a value in the YAML file? Does it retain or overwrite the value with empty?

can multiple YAML files be provided?

can multiple YAML documents be provided inside of one file? (separated by ---)

I agree that option 2 makes most sense.
I reflected on the "multiple templates" idea over the weekend. And I began to wonder if for situations when the user enters 2 templates with conflicting information (i.e. in asset 1 key: value1, and in asset 2 key: value2) if it would be possible to do basically what git does for merge conflicts.
As an example, I imagine this call: onyo new --template yaml1 yaml2 --edit opens the editor with:
type: laptop
make: apple
model: mbp
serial: 1234

<<<<
key: value1
====
key: value2
>>>>

Oof. I am pretty against the merge conflict syntax. That means we generate a document that is invalid YAML. Loads of issues stem from that. And users who are only casually familiar with git will be confused.
I'd prefer a clear behavior of inheritance and that we just follow those rules.

I'd prefer a clear behavior of inheritance and that we just follow those rules.

This makes sense to me, but I instantly see some problems. Even if we have some solution like "overwrite keys by order of yaml files given", I am absolutely sure that during the next weeks/months at least somebody in our group will accidently overwrite something while using two files, and we will not notice.
I do not think this is really possible to solve with informing people and good documentation. I can see you making the case to go that route, but I wanted to share my perspective.
I wonder then about another possibility: We allow via terminal for onyo new to specify for N assets each key/value either 1 or N times. Maybe the best way to allow multiple yaml without overwriting values would be similar. A template is allowed to specify a value, too (i.e. template and yaml file can both say size: 14 without error), but they are not allowed to be different. Empty fields can be overwritten, but two given pieces of information just are not allowed to overwrite each other.
First I thought this idea blocks use cases and would be stressful, but the more I think about it, the less I can find situations were we would actually use a template for one device, and have another file where we want to overwrite values from it. I think it would most of the time be an unintentional user error.
I know you tend to prefer the more powerful options, but I just think overwriting introductes so many problems that will be hard to identify later.

I like option 2. Template layering sounds really good to me.

what to do about empty values?
--keys requires both key and value; what if we have a key with a value in the template and the key without a value in the YAML file? Does it retain or overwrite the value with empty?

If we go for option 2, this seems solved. What's specified via --keys takes precedence over the template(s)

can multiple YAML files be provided?

I think in both - option 1 and 2 - we'd go for allowing the layering. So, yes.

can multiple YAML documents be provided inside of one file? (separated by ---)

I could see that, but I don't see that working with templates. Because it's then ambiguous whether a template with two documents means that the second one is supposed to "update"/override the first one or whether that means that the resulting asset should have two documents. Which is another thing to talk about I suppose. Onyo could only care for the first document in an asset file, but allow more to be in there for now. And have stronger support eventually.
So, the only multi-doc input file I can see right now would be via --yaml where the (total across files?) number of documents needs to match the number of to be created assets. Like the number of same keys one can provide.
I do not quite understand where @TobiasKadelka's thinking goes here, TBH. Templates are overriden. Already. There's no new problem when templates are considered in order. In fact the layering is useful exactly because that's how it would work. Stack templates covering different aspects of assets. Pretty much like deriving classes.

Cool. I think we're on very similar pages then. I like taking the layered template route.
However, I do think there's one bit of ambiguity in layering:
First template:
key: happy

Second template:
key:

key's value could be either happy or empty.
An alternative approach is to expand the vocabulary a bit:
# remove key entirely
key: <unset>
# remove value
key: <empty>
# create the key with an empty value if the key does not yet exist
key: <inherit>

<unset> and <empty> might be a useful differentiation to have for get/set. I don't see any place the <inherit> could be used outside of onyo new. Which might be ok.
This does involve writing those <> values to templates, which makes them a bit different than assets....

If there is agreement on #713 , then I think this issue might be ready to be closed in favor of an implementation issue.
I will wait for others to chime in. Let me know and I'll put it together.

This is/was /almost/ ready, but then #720 and #722 came along and I want to make sure these all work together.
I find the name --template to be intuitive. I also find the idea of multiple --templates to make sense.
I also think --yaml is direct and unambiguous (much like `--tsv).
I propose:

retire --tsv
allow --template to accept multiple templates; keep current behavior where tab completion is only template dir, but can technically accept files from anywhere.
add --yaml: it is the same as template, but tab completes from CWD (can accept templates, assets, files outside of the repo, etc).
--template and --yaml are unified into a single, waterfall list to be applied with --keys etc. --template is first in the list, then --yaml.
both --yaml and --template can accept multi-document files (those with ---). The usual "1 or same-N" rules apply.

That makes a lot of sense to me.
But I think we are now at a point when we need a design issue to discuss which commands can act on multi-document yaml files and which not, and how to act on them, i.e. can onyo set change just the second asset in a multi document file?


Issue with graph_from_bbox on Visual Studio code.

Contributing guidelines

[X] I understand the contributing guidelines

Documentation

[X] My problem is not addressed by the documentation or examples

Existing issues

[X] My problem does not appear in an existing issue

What operating system and Python version are you using?
Windows 11 / Python 3.12
What OSMnx version are you using?
osmx 1.8.1 & latest version 2.0
Environment packages and versions
Azur/databricks and Visual Studio code/jupyter
Both latest version ( 03/06/2024 )

How did you install OSMnx?
Pip
Problem description
First of all, english is not my main language so sorry for poor vocabulary.
Hi everyone,
I'm having some issues and i hope someone can help me. Im coding on 2 environnements ( databricks & visual studio code/jupyter ). I use osmnx to create graph to find the shortest path between 2 points. Everything works well on databricks but i have problems in Visual on this line : graph = ox.graph_from_bbox(north=north, south=south, east=east, west=west, network_type="all"). I have a futur warning, which is not very important for now ( I suppose ), but this warning :
UnboundLocalError: cannot access local variable 'response' where it is not associated with a value
I dont know where it comes from, because everything works well on databricks, i checked the proxy on visual, everything ok.
I made some research and the issue might be an SSL issue, i checked how to solve it but in this case i need to manually Specify Certificate Path but i don't see where i can find the path osmnx.
I'm not sure if my issue is connected to osmx but if you can help me, or just say the problem is not from osmx it will help me a lot !
Thanks.
Futur warning :
Complete minimal reproducible example
( pip osmx )

import osmnx as ox
graph = ox.graph_from_bbox(north=40, south=40.1, east=39.9, west=40.2, network_type="all")

Contributing guidelines

[x]  I understand the contributing guidelines

Documentation

[x]  My problem is not addressed by the documentation or examples

Existing issues

[x]  My problem does not appear in an existing issue

What operating system and Python version are you using?
Windows 11 / Python 3.12
What OSMnx version are you using?
osmx 1.8.1 & latest version 2.0
Environment packages and versions
Azur/databricks and Visual Studio code/jupyter
Both latest version ( 03/06/2024 )

How did you install OSMnx?
Pip
Problem description
First of all, english is not my main language so sorry for poor vocabulary.
Hi everyone,
I'm having some issues and i hope someone can help me. Im coding on 2 environnements ( databricks & visual studio code/jupyter ). I use osmnx to create graph to find the shortest path between 2 points. Everything works well on databricks but i have problems in Visual on this line : graph = ox.graph_from_bbox(north=north, south=south, east=east, west=west, network_type="all"). I have a futur warning, which is not very important for now ( I suppose ), but this warning :
UnboundLocalError: cannot access local variable 'response' where it is not associated with a value
I dont know where it comes from, because everything works well on databricks, i checked the proxy on visual, everything ok. I made some research and the issue might be an SSL issue, i checked how to solve it but in this case i need to manually Specify Certificate Path but i don't see where i can find the path osmnx.
I'm not sure if my issue is connected to osmx but if you can help me, or just say the problem is not from osmx it will help me a lot !
Thanks.
Futur warning :
FutureWarning: The north, south, east, and west parameters are deprecated and will be removed in the v2.0.0 release. Use the bbox parameter instead. See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123
graph = ox.graph_from_bbox(north=40, south=40.1, east=39.9, west=40.2, network_type="all"
Complete minimal reproducible example
( pip osmx )

import osmnx as ox
graph = ox.graph_from_bbox(north=40, south=40.1, east=39.9, west=40.2, network_type="all")

*Futur warning : *
FutureWarning: The north, south, east, and west parameters are deprecated and will be removed in the v2.0.0 release. Use the bbox parameter instead. See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123
graph = ox.graph_from_bbox(north=40, south=40.1, east=39.9, west=40.2, network_type="all"

Please provide your complete error traceback for the UnboundLocalError.

Does the same UnboundLocalError occur on 1.8.1 and 2.0.0b0?

I am unable to reproduce an UnboundLocalError using your code and OSMnx 1.8.1 or 2.0.0 beta.
If you provide the complete error traceback you're getting, I can take a look.

I am unable to reproduce an UnboundLocalError using your code and OSMnx 1.8.1 or 2.0.0 beta.
If you provide the complete error traceback you're getting, I can take a look.

Hi,
First of all, thanks you for your response, i had the error on 1.8.1, so i dowloaded the 2.0 version, same error.
Complete error :
SSLCertVerificationError                  Traceback (most recent call last)
File ~\AppData\Roaming\Python\Python312\site-packages\urllib3\connectionpool.py:467, in HTTPConnectionPool._make_request(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length)
466 try:
--> 467     self._validate_conn(conn)
468 except (SocketTimeout, BaseSSLError) as e:
File ~\AppData\Roaming\Python\Python312\site-packages\urllib3\connectionpool.py:1099, in HTTPSConnectionPool._validate_conn(self, conn)
1098 if conn.is_closed:
-> 1099     conn.connect()
1101 # TODO revise this, see https://github.com/urllib3/urllib3/issues/2791
File ~\AppData\Roaming\Python\Python312\site-packages\urllib3\connection.py:653, in HTTPSConnection.connect(self)
651 server_hostname_rm_dot = server_hostname.rstrip(".")
--> 653 sock_and_verified = _ssl_wrap_socket_and_match_hostname(
654     sock=sock,
655     cert_reqs=self.cert_reqs,
656     ssl_version=self.ssl_version,
657     ssl_minimum_version=self.ssl_minimum_version,
658     ssl_maximum_version=self.ssl_maximum_version,
659     ca_certs=self.ca_certs,
660     ca_cert_dir=self.ca_cert_dir,
661     ca_cert_data=self.ca_cert_data,
662     cert_file=self.cert_file,
663     key_file=self.key_file,
...
142     return default_duration
143 except (AttributeError, IndexError, ValueError):  # pragma: no cover
144     # cannot parse output, log error and return default duration
UnboundLocalError: cannot access local variable 'response' where it is not associated with a value

Two things happening here.

there's a bug where we're accessing the response variable in an except block, but the exception occurred before response was defined. Fixed in #1182

The requests package is giving you an SSL error, likely due to your proxy. See the requests docs for details. You can configure the requests_kwargs setting in OSMnx: https://osmnx.readthedocs.io/en/latest/user-reference.html#module-osmnx.settings


Add another Learning Platform

As this PR has been merged, I will close this issue now. Thank you for your contribution @VIVEK-SUTHAR :)


[wdr] add support for wdrmaus.de content pages as playlists

The wdrmaus.de content pages directly contain multiple video players without linking to a separate page for each video, like the WDR Mediathek pages do. Therefore, we cannot delegate loading the info_dict from a "video URL" (because it does not exist), but instead we have to grab each video separately from their video player  and load the info_dict from the respective JSONP.
On the other hand, Mediathek pages only contain links to the separate video pages, and no JSONP URL, so we still need to support the old way of loading each video page separately when playing the playlist.
This pull-request implements both ways of loading playlists, and also fixes some outdated tests which fail due to HTTP 404 errors.

Overlooked the case where the page is not a playlist, but a single video. Force-pushed.

Tests keep failing in other extractors… Any other feedback on that? :)


DCA disconnects when choosing certain templates

When testing this instance of the DCA https://shinypro.synapse.org/users/rchai/dc/, the app has disconnected a few times when choosing certain templates.
The app disconnects when choosing:

Project: HTAPP, Folder: Clinical Therapy Colon, Template: Clinical Tier1 Therapy
Project: HTAPP, Folder: single_cell_RNA_seq_level_2_colon, Template: scRNA-seq Level 2
Project: HTAPP, Folder: single_cell_RNA_seq_level_3_colon, Template: scRNA-seq Level 3

Not sure if this is related, but in the current app (Sujay's version) the HTAPP/Vanderbilt centers have gotten disconnect errors for the following templates during generation and/or validation:

Vanderbilt single cell levels 1-3 (unable to generate templates)
HTAPP MERFISH all levels (unable to generate or validate templates)
(and all of the tables in this folder- disconnect at submission)

I think that third item's been addressed as well but please let me know if otherwise!

Detailed traceback:
  File "/home/rchai/miniconda3/envs/data_curator_dev_env/lib/python3.7/site-packages/schematic/models/metadata.py", line 306
, in populateModelManifest
    return mg.populate_manifest_spreadsheet(manifestPath, emptyManifestURL)
  File "/home/rchai/miniconda3/envs/data_curator_dev_env/lib/python
3.7/site-packages/schematic/manifest/generator.py", line 994, in populate_manifest_spreadsheet
    manifest_sh = self.set_dataframe_by_url(empty_manifest_url, manifest)
  File "/home/rchai/miniconda3/envs/data_curator_dev_env/lib/python3.7/site-packages/schematic/manifest/generator.py", line 816, in set_dataframe_by_url
    wb.set_data_validation(start = start_col, end = end_col, condition_type = None)
  File "/home/rchai/miniconda3/envs/data_curator_dev_env/lib/python3.7/site-packages/pygsheets/utils.py", line 163, in wrapper
    return func(*args, **kwargs)
  File "/home/rchai/miniconda3/envs/data_curator_dev_env/lib/python3.7/site-pa [... truncated]
  76: <Anonymous>

here is the error raised by those templates mentioned in this ticket for https://shinypro.synapse.org/users/rchai/dc/

Error using schematic:
populateModelManifest(
'HTAN Clinical Tier 1: Therapy',
"/home/rchai/.synapseCache/362/75268362/synapse_storage_manifest.csv",
"Therapy")

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/rchai/miniconda3/envs/data_curator_dev_env/lib/python3.7/site-packages/schematic/models/metadata.py", line 306, in populateModelManifest
    return mg.populate_manifest_spreadsheet(manifestPath, emptyManifestURL)
  File "/home/rchai/miniconda3/envs/data_curator_dev_env/lib/python3.7/site-packages/schematic/manifest/generator.py", line 994, in populate_manifest_spreadsheet
    manifest_sh = self.set_dataframe_by_url(empty_manifest_url, manifest)
  File "/home/rchai/miniconda3/envs/data_curator_dev_env/lib/python3.7/site-packages/schematic/manifest/generator.py", line 816, in set_dataframe_by_url
    wb.set_data_validation(start = start_col, end = end_col, condition_type = None)
  File "/home/rchai/miniconda3/envs/data_curator_dev_env/lib/python3.7/site-packages/pygsheets/utils.py", line 163, in wrapper
    return func(*args, **kwargs)
  File "/home/rchai/miniconda3/envs/data_curator_dev_env/lib/python3.7/site-packages/pygsheets/worksheet.py", line 1624, in set_data_validation
    grange = GridRange(worksheet=self, start=start, end=end)
  File "/home/rchai/miniconda3/envs/data_curator_dev_env/lib/python3.7/site-packages/pygsheets/address.py", line 245, in __init__
    self._apply_index_constraints()
  File "/home/rchai/miniconda3/envs/data_curator_dev_env/lib/python3.7/site-packages/pygsheets/address.py", line 417, in _apply_index_constraints
    assert self._start[1] <= self._end[1]
AssertionError

Update from Clarisse on Thursday 9/16:
I started making my way through the folder of outstanding HTAPP metadata tables, trying to submit them following the recent DCA fixes. I was able to submit a couple, but am still running into disconnect errors for many others.
Would you be able to ask Rong if he can look into these? I'm linking below a few of the tables that failed (and where possible a successful table of the same type if that helps in the debugging process).
Biospecimen

Submitted: PML
Failed after clicking submit: lung
Failed after clicking submit: ovarian

ScRNAseq Level 1

Failed after clicking submit: PML
Failed after clicking submit: sarcoma

Reproduced - fix identified.


Compile examples in CI

Related with this issue https://github.com/ignitionrobotics/ign-physics/issues/109
Signed-off-by: ahcorde<EMAIL_ADDRESS>

Thanks, this solution works, but it doesn't scale well. When new examples are created, we may forget to add them to CI. This is also only running on actions, but not on Jenkins for Mac for exmple.
Did you look into what it would take to do the same as other libraries like ign-math for example?
https://github.com/ignitionrobotics/ign-math/blob/master/test/integration/ExamplesBuild_TEST.cc

@chapulina added a integration test to compile examples https://github.com/ignitionrobotics/ign-physics/pull/133/commits/b0044911a18381842cbc74aade34639c98b829a9

@osrf-jenkins retest this please

friendly ping @chapulina


Updater is broken

Due to the new permission evaluation, updater is broken

I dont understand.

You cannot launch Updater anymore with the new update.
When you launch an upk file, it crashes.
The reason is the new rights evaluation in the package.prm : 4 isn't recognized anymore.

Please re-test it with the last update of NightOS

It still doesn't work

Okay, got it.
You must change rights from Updater to "herit<4"

Nope, it wasn't that.
Core.js attempt to get the first 6 characters of the string.
A number (4) is not a string.

Found a REAL solution.
Every system app (that need system rights) should have "system" in rights.
"system" is a string that have 6 characters, so the condition will not fail.
Then you must add a condition after the faulty condition that replace system by 4

I corrected that. An update will be released in few hours.


[Err occured when test]

File "tools/track.py", line 18, in
from yolox.evaluators import MOTEvaluator
ImportError: cannot import name 'MOTEvaluator' from 'yolox.evaluators'

How did you resolve it please tell

run this command：
'''
pip uninstall yolox
cd tools
ln -s ../yolox
'''


New version: PoreMatMod v0.2.11

Registering package: PoreMatMod
Repository: https://github.com/SimonEnsemble/PoreMatMod.jl
Created by: @eahenle
Version: v0.2.11
Commit: d7b9f2233045e8ed458c4d5b74123454f0e745b6
Git reference: HEAD
Description: a find-and-replace tool for crystal structure models. implements (i) subgraph matching and (ii) point set alignment to search a parent crystal for a query fragment, then align and install a replacement fragment in its place.

block


Standard Linux ttyN and termion example

Describe the bug
When I try to use the example
cargo run --example termion_demo --release -- --tick-rate 200
without using X terminal emulators just inside the login tty, the example does not clear the terminal but overprints tty contents, so traces of those contents can be seen through the program's window.
When I press q, the screen is neither wiped nor shifted upwards (like the top does at the exit) and bash prompt occurs to be at the place of Footer sign.
XTerm or similar X terminal emulators does not have this problem, only native Linux term.
To Reproduce
In Linux, switch to a free tty (Ctrl-Alt-F3, for example, for tty3), log in, type some commands (for example, try ls /usr/bin) and execute the example.
Expected behavior
The screen is completely wiped out when the program starts, so no foreign text is visible -- only program window contents.
At the program termination, behaviour is similar to top -- old contents is shifted and bash prompt is placed below it, not inside.
Screenshots
Only camera shots are available in this mode. Will add if requested.
Desktop (please complete the following information):

OS: Linux
Terminal Emulator: Native TTY
Font: N/A
Crate version: github
Backend: termion

This is a bit more of a question rather than a bug declaration. I wonder if I can control these details like wiping the screen pixel-by-pixel so I can use tui frontend to write applications for native ttys as well as XTerms. If so, I would be glad to know; maybe, the example can be fixed too :)

Any update on this? Same thing seems to be happening on Kitty for me.

Any update on this? Same thing seems to be happening on Kitty for me.

The issue seem to go away by exlicitly calling clear on the Terminal struct


Unclear best-practices advice on (de)normalization

There's a bullet point in https://www.cockroachlabs.com/docs/stable/performance-best-practices-overview.html that seems counterintuitive when I read it:

Increase normalization of the data to place parts of the same records that are modified by different transactions in different tables. Note however that this is a double-edged sword, because denormalization can also increase performance by creating multiple copies of often-referenced data in separate ranges.

Should this say "Decrease normalization" or just "Denormalize the data"?

@rmloveland I think this is in your area but feel free to reroute if not.


[Bot] Docs Build Service Account

I think it's a good addition to add permissions for this bot in the repository. It will make build warnings more obvious by putting a comment (with a big bold "⚠ Validation status: warnings") after the build finishes (See https://github.com/MicrosoftDocs/quantum-docs-pr/pull/1015), it also comments with preview links for the edited files, which can make the PR review process a little bit faster.
The information for this bot should be available in https://review.docs.microsoft.com/en-us/engineering/projects/ops/engdocs/how-to-grant-service-account-permission-in-your-repository?branch=master.
cc: @adegeo @gewarren, this will serve as a good alert for build warnings.

As a team we've decided we don't want these comments in our repo as PRs with a lot of churn become extremely messy with the bot comments and a lot of links the bot provides are internal Microsoft links so the public can't use them and then file issues reporting the links aren't working ;)


[BUG] Invalid use of "referrer" attribute

Detailed description
A few locations within Sage (listed below) include referrer="no-referrer" within links, neither of which is valid. rel="noreferrer" appears to be the intended output here.
However, judging by the use cases here and in kajabi-products, rel="noopener" would seem to be more relevant throughout links with target="_blank", as this still allows referral tracking to take place while keeping the security benefits. Per CX, the link references are helpful for customer support and are tracked in Google Analytics.
Impacted files:

docs/lib/sage_rails/app/views/sage_components/_sage_page_heading.html.erb
packages/sage-react/lib/HelpLink/HelpLink.story.jsx
packages/sage-react/lib/PageHeading/PageHeading.story.jsx
packages/sage-react/lib/Type/Type.story.jsx

Contacted a member of CX Ops to get further details on what their help link tracking looks like. Once we have more details, we may want to follow up with a change throughout the app, swapping noreferrer with noopener.


Reset state between scenarios

@jowers what do you think? Will this do for now?

My head has seen too much code today! I'll take a look through this one tomorrow

I don't think the feature is quite right. Either we should make the variable being defined in the namespace into a namespace variable (e.g. variable g rather than global g) or we should do away with the namespace altogether and just use a global. When I ran a similar scenario as above against the master version, it was also unable to access them.
I'll check in the version with globals as that is closer to the decscription of the feature, and having the namespace doesn't really add anything to the behaviour.

Ok great. I tried using global initially but my tcl-fu was too weak.
Typed with my Thumbs.

On 21 Feb 2015, at 11:06, jowers<EMAIL_ADDRESS>wrote:
I don't think the feature is quite right. Either we should make the variable being defined in the namespace into a namespace variable (e.g. variable g rather than global g) or we should do away with the namespace altogether and just use a global. When I ran a similar scenario as above against the master version, it was also unable to access them.
I'll check in the version with globals as that is closer to the decscription of the feature, and having the namespace doesn't really add anything to the behaviour.
—
Reply to this email directly or view it on GitHub.

Cool. Are you happy for us to merge this one back to main?

Yes. Can you do it with a --squash?

Merged to master


"guessDefaultsFromFile: family not identified" when it should have identified correctly

LocalAI version:
v2.19.1
Environment, CPU architecture, OS, and Version:
Ubuntu 22.04, amd64
Describe the bug
During inference, model is not identified correctly
DBG Model file loaded: Meta-Llama-3-8B-Instruct.Q4_K_M.gguf architecture=llama bosTokenID=128000 eosTokenID=128001 modelName=models
DBG guessDefaultsFromFile: family not identified
...
Prompt (before templating): hi
Prompt (after templating): hi

However, gguf-info works fine to identify the model:
INF Setting logging to info
INF GGUF file loaded: models/Meta-Llama-3-8B-Instruct.Q4_K_M.gguf architecture=llama bosTokenID=128000 eosTokenID=128001 modelName=models
INF Tokenizer tokenizer="{Model:gpt2 TokensLength:128256 MergesLength:280147 AddedTokensLength:0 BOSTokenID:128000 EOSTokenID:128001 UnknownTokenID:-1 SeparatorTokenID:-1 PaddingTokenID:-1 TokensSize:2099493 MergesSize:5204765}"
INF Architecture architecture="{Architecture:llama MaximumContextLength:8192 EmbeddingLength:4096 BlockCount:32 FeedForwardLength:14336 ExpertFeedForwardLength:0 ExpertSharedFeedForwardLength:0 ExpertCount:0 ExpertUsedCount:0 AttentionHeadCount:32 AttentionHeadCountKV:8 AttentionMaxALiBIBias:0 AttentionClampKQV:0 AttentionLayerNormEpsilon:0 AttentionLayerNormRMSEpsilon:1e-05 AttentionKeyLength:128 AttentionValueLength:128 RoPEDimensionCount:128 RoPEFrequencyBase:500000 RoPEScalingType: RoPEScalingFactor:0 RoPEScalingOriginalContextLength:0 RoPEScalingFinetuned:false SSMConvolutionKernel:0 SSMInnerSize:0 SSMStateSize:0 SSMTimeStepRank:0 VocabularyLength:128256 EmbeddingGroup:4 EmbeddingKeyGQA:1024 EmbeddingValueGQA:1024 EmbeddingGQA:1024}"
INF chat_template: {% set loop_messages = messages %}{% for message in loop_messages %}{% set content = '<|start_header_id|>' + message['role'] + '<|end_header_id|>

'+ message['content'] | trim + '<|eot_id|>' %}{% if loop.index0 == 0 %}{% set content = bos_token + content %}{% endif %}{{ content }}{% endfor %}{% if add_generation_prompt %}{{ '<|start_header_id|>assistant<|end_header_id|>

' }}{% endif %}

To Reproduce
wget https://huggingface.co/QuantFactory/Meta-Llama-3-8B-Instruct-GGUF/resolve/main/Meta-Llama-3-8B-Instruct.Q4_K_M.gguf
mv Meta-Llama-3-8B-Instruct.Q4_K_M.gguf ~/models
./localai --debug
curl http://localhost:8080/v1/chat/completions -H "Content-Type: application/json" -d '{
    "model": "Meta-Llama-3-8B-Instruct.Q4_K_M.gguf",
    "messages": [{"role": "user", "content": "hi"}]
  }'

# observe the following in localai logs:
# guessDefaultsFromFile: family not identified
# Prompt (before templating): hi
# Prompt (after templating): hi

# response is text completion, instead of chat

Expected behavior
Family should be correctly identified as llama, and templates should be set correctly
Logs
see above
Additional context

Looks like this was a bug that was fixed in the models https://huggingface.co/meta-llama/Meta-Llama-3.1-8B-Instruct/discussions/22


Question: re-subscribe same name with different arguments

Technically, what happens when one of these reactive sources changes is the following:

The reactive data source invalidates the autorun computation (marks it so that it re-runs in the next Tracker flush cycle).
The subscription detects this, and given that anything is possible in next computation run, marks itself for destruction.
The computation re-runs, with .subscribe() being re-called either with the same or different arguments.
If the subscription is run with the same arguments then the “new” subscription discovers the old “marked for destruction” subscription that’s sitting around, with the same data already ready, and reuses that.
If the subscription is run with different arguments, then a new subscription is created, which connects to the publication on the server.
At the end of the flush cycle (i.e. after the computation is done re-running), the old subscription checks to see if it was re-used, and if not, sends a message to the server to tell the server to shut it down.

Step 4 above is an important detail—that the system cleverly knows not to re-subscribe if the autorun re-runs and subscribes with the exact same arguments. This holds true even if the new subscription is set up somewhere else in the template hierarchy. For example, if a user navigates between two pages that both subscribe to the exact same subscription, the same mechanism will kick in and no unnecessary subscribing will happen.

Does the package implements this mechanism?
When I re-subscribe same name with different arguments which one is better performance? unsubscribe first or just resubscribe?
Thanks

Unfortunately the package does not implement Tracker.
I recommend doing the unsubscribe and resubscribe with the arguments updated so that the previous subscribe doesn't remain active/in memory.

Thank you for reply. I will follow your recommendation.


Error sending notification

I get the following log error about notifications being sent.
The SMTP server is set to mine at mail.vontainment.com but it's complaining that the certificates alt name is invalid.

Now my mail subdomain certificate does have mail.vontainment in the alt name... That's what I don't understand is why it's not working.
[0] [ERROR] Sending Notification Email for vontainment.com Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames: Host: mail.vontainment.com. is not in the cert's altnames: DNS:jupiter.vontainment.com
47
[0]     at Object.checkServerIdentity (node:tls:337:12)
48
[0]     at TLSSocket.onConnectSecure (node:_tls_wrap:1684:27)
49
[0]     at TLSSocket.emit (node:events:518:28)
50
[0]     at TLSSocket._finishInit (node:_tls_wrap:1085:8)
51
[0]     at ssl.onhandshakedone (node:_tls_wrap:871:12) {
52
[0]   code: 'ESOCKET',
53
[0]   reason: "Host: mail.vontainment.com. is not in the cert's altnames: DNS:jupiter.vontainment.com",
54
[0]   host: 'mail.vontainment.com',
55
[0]   cert: {
56
[0]     subject: [Object: null prototype] { CN: 'jupiter.vontainment.com' },
57
[0]     issuer: [Object: null prototype] { C: 'US', O: "Let's Encrypt", CN: 'R10' },
58
[0]     subjectaltname: 'DNS:jupiter.vontainment.com',

@djav1985 Looks like you are using the domain name jupiter.vontainment.com . You will have to insert the IP address of that domain.


Normal derivative on boundary of  NURBS mesh

I am trying to implement weak dirichlet BCs for a laplace problem using DGDiffusionIntegrator.
For NURBS meshes I get the error:

NURBSFECollection::DofForGeometry

I have tried to figure out what is missing, but I am getting lost in the Face/Boundary semantics, particularly related with the element transforms.
Does any body have any ideas at this stage? I will try to formulate  more precise questions in the near future.

To create the issue look    branch weakbc-nurbs-dev in  miniapps/nurbs and run for instance:

./nurbs_ex1 -m square-nurbs.mesh --weak-bc

I think I need modify:
void FiniteElementSpace::GetFaceDofs(int i, Array<int> &dofs) const on fespace line 1742
and add an if ( elem_dof) similar to the GetElementDofs and GetBdrElementDofs routines.
Does FiniteElementSpace::GetFaceDofs provide the full list of all dofs defined on the element attached to a boundary? So would translating the face-id to an element-id and then extract the dofs of that element do the trick?

@mlstowell or @v-dobrev, can you help Ido with this?

Hi, @IdoAkkerman ,
Sorry for the delay.  I was on travel and missed this when it was first raised.
FiniteElementSpace::GetFaceDofs() returns only those degrees of freedom which are shared by any elements which share that face.  Consequently, in a DG context this method should not return any degrees of freedom.
Best wishes,
Mark

Hi @mlstowell,
thank you for your answer. I am struggling a bit with the boundary/face stuff.
I would like to implement a Nitsche BC for a NURBS mesh. For this I need a normal gradient.
In order to get a normal derivative, you would need in principle all functions active at a boundary, not just the non-zero functions. So which call do I need to make to get the correct DOFS?

Hi, @IdoAkkerman ,
I was not familiar with Nitsche BCs but from what I could find they look very similar to what we do for Discontinuous Galerkin methods.  Have a look at the DGDiffusionIntegrator which seems to have three of the four terms you might need.
The basic idea behind these DG integrators is that the BilinearForm or LinearForm loops over the boundary elements and requests a FaceElementTransformations object from the mesh using Mesh::GetBdrFaceTransformations(int bdr_elem_no).  This object contains pointers to the ElementTransformation objects associated with the boundary face and its neighboring volume element (normally there are two neighboring volume elements but at the boundary one of these is NULL).  These transformations are then passed into an integrator such as DGDiffusionIntegrator.  Inside the integrator the ElementTransformation for the boundary face is used to compute the surface integral while the ElementTransformation for the neighboring element is used to compute the basis functions or their derivatives.  The DoFs don't appear inside the integrator itself but they are the DoFs associated with the neighboring element not just the face (this is only true in a DG context).
Best wishes,
Mark

The main issue here is that with NURBS meshes, the face transformation, in general, may depend on dofs that are associated with the interior of elements, and not just adjacent elements but even neighbors of neighbors. That is why we do not have support for DG on NURBS meshes, at least for now.
However, the boundary faces are very similar to the standard case and I think they can be supported with small additions. I'm not sure modifying FiniteElementSpace::GetFaceDofs will be sufficient but it is worth looking into. Maybe the simplest approach is to try to reuse the boundary elements which are defined for the NURBS mesh. To do that we just need to create a map (or just an array) that tells us what boundary index a given face index corresponds to. Another thing to keep in mind is the potential difference in the orientation of the face element and the respective boundary element -- the vertex indices may be permuted between the two. I think they are the same but I'm not 100% sure. This is important when we define the Loc1 transformation in the FaceElementTransformations class -- Loc1 tells us how to transform quadrature points from the reference face to the reference element (for element 1).

@v-dobrev you are right:

the face transformation, in general, may depend on dofs that are associated with the interior of elements, and not just adjacent elements but even neighbors of neighbors.

I did not know how to phrase this. thank you for phrasing it so clearly.
I tried to get it working with quick and dirty hacking, but it did not work. Part because the distinction bnd/face was entirely clear to me. Because when the transformation enter the seen I lose track of what is what. So I tried to ease my way into it.
I think I can devote 50% of my time to get this working form next week on, till end of "lock-down" which is not before April 6.

@IdoAkkerman, sounds good. Let us know if you run into any issues.

I have been looking a bit closer, and have the following idea.
The routines
   virtual void GetElementDofs(int i, Array<int> &dofs) const;
   virtual void GetBdrElementDofs(int i, Array<int> &dofs) const;
   virtual void GetFaceDofs(int i, Array<int> &dofs) const;

in fespace due something analogues. However, in the implementation of the first 2 routines, there is an if-statement at the beginning, using a Table it it is there instead of generate the dof indices on the fly. See below:
   if (elem_dof)
   {
      elem_dof -> GetRow (i, dofs);
   }

and
   if (bdrElem_dof)
   {
     bdrElem_dof->GetRow(i, dofs);
   }

In the case of NURBS the Table is used, as the standard dof association does not work.
So I will need to make a similar diversion for the faces, that is e.g.:
   if (faceElem_dof)
   {
     faceElem_dof->GetRow(i, dofs);
   }

Do you think this should work?

The difference between the fespace functions:
virtual void GetFaceDofs(int i, Array &dofs) const;

I have some issues with understanding the subte difference between
FiniteElementSpace::GetBdrElementDofs() and
FiniteElementSpace::GetFaceDofs()
If I understand correctly, "face" refers to all the boundaries of the interior elements, while a "bdr" refers to a subset of faces that are on the "boundary" of the domain.
But there seems to be a different dof ordering in both routines? Is this correct? Why? What is the purpose/goal?
I tried to implement an alternative FiniteElementSpace::GetBdrElementDofs()  by bootstrapping from FiniteElementSpace::GetFaceDofs()  by adding an alternative means of obtaining the dof indices, namely:
else if (mesh)
   {
     GetFaceDofs(mesh->be2face(i),dofs);
   }

be2face is a hacked-function. This method seems to almost work: when running th unit_test the indices are always correct, but sometimes (10% of time) the ordering is incorrect.
What am I missing ? Why is the ordering different?

I'll start by answering the last question.
The main difference between the boundary and face elements is that the first one is read from the mesh file and the second one is auto-generated. Because of that the ordering of the vertices that describe them may be different. We could rotate the boundary elements to match the auto-generated face elements but this may disrupt certain workflows, so we do not do it.
Because of this, when we generate the dofs for a boundary element, we need to find its orientation w.r.t. the auto-generated face/edge and permute the dofs to match the auto-generated face/edge.
This permutation is applied, for example, here: https://github.com/mfem/mfem/blob/4134e9496a77ebccde0819438e050de20480ffb8/fem/fespace.cpp#L1720-L1736
The local permutation array ind of the dofs is obtained from the FiniteElementCollection, here:
https://github.com/mfem/mfem/blob/4134e9496a77ebccde0819438e050de20480ffb8/fem/fespace.cpp#L1724-L1725
based on the orientation oF obtained from the Mesh, here:
https://github.com/mfem/mfem/blob/4134e9496a77ebccde0819438e050de20480ffb8/fem/fespace.cpp#L1687
This is also the call where we obtain the index iF of the respective face element.
Note that this dof permutation is not necessary in the method GetFaceDofs because the enumeration of the dofs on a face uses the orientation of the auto-generated face element.

Regarding the diversion:
   if (faceElem_dof)
   {
     faceElem_dof->GetRow(i, dofs);
   }

I think this will work for the NURBS case. I believe these diversions for the elements and the boundary were originally added (by you) to support the NURBS case. Now these Tables are generated for all mesh types.
Since you are interested only in face elements that are on the boundary, you only need to generate the rows of faceElem_dof corresponding to those. You can leave the other rows empty, at least for now.
Looking back at the place where you encountered the error, I think the method FiniteElementSpace::GetFaceElement, called here: https://github.com/mfem/mfem/blob/4134e9496a77ebccde0819438e050de20480ffb8/mesh/mesh.cpp#L497
may need to be modified to support the NURBS case too. There is a comment in that method that hints how this may be done (probably left by you 😄):
   // if (NURBSext)
   //    NURBSext->LoadFaceElement(i, fe);

Thanks for the clear answers.
You are right about the LoadFaceElement call. I tried getting this to work 2 months before, but did not get it to work due to subtle issues and trail-and-error gives to many combinatorial options.

I think I have something working!!! Needs mayor cleaning and checking, but good news anyway!

Yes, for the serial implementation everything seems to work.
There are 2 potential "issues" though:

My approach: Instead of defining a face_dof table, I am using the bdrElem_dof table  and a mapping from face to bdr.

I have added some face2bdr routines to the mesh class:

   int GetBdrFace(int i)const;
   void GenerateFaceBdrMap();
   int GetFaceBdr(int i) { return face_to_be[i]; }

Where GetFaceBdr() is the transpose (inverse?) of  GetBdrFace() which is computed in GenerateFaceBdrMap(). This last routine needs to be called before GetBdrFace() makes sense. This makes it important to put GenerateFaceBdrMap() on the right location, and/or add (debug) checks.
I have an other comment/question:
the routine   int GetBdrFace(int i)const; does the same as int GetBdrElementEdgeIndex(int i), but the later has an incorrect/non-descriptive name.  Should I change that?

Perhaps I should use the procedures described above to generate a partial face_dof table.
Conceptually it is the same as above, but it will make the runtime code robust and clean(simple face_dof check and usage if available), and isolates the more (NURBS) specific, potentially fragile, items to the initialization.
I will first work on the parallel stuff and see what is necessary on that front.

Parallel also seems to work with minimal effort.
Going the face_dof route will lead to more "symmetry" in the code. Will work on that tomorrow.

I implemented the face_dof route in the branch nurbs-face-dev  . I already submitted a PR #1414


Safety filter is too strong today

Description of the bug:
Hello, I am using the PaLM API through Python / JS and MakerSuite. I noticed that the safety filter has become unexpectedly strong recently. My very benign inference requests were all responded with {reason: "OTHER"}. Is there a way to change my safety setting to get the result?
Here is an example in MakerSuite (I have already lowered the safety filter thresholds, see screenshot 2):

Actual vs expected behavior:
I expect to get result "comment vas-tu ?" instead of an empty response with OTHER reason. I believe PaLM 2 API used to give me this correct response two days ago.
Any other information you'd like to share?
No response

I used this MakerSuite prompt.

I believe PaLM 2 is designed to support better translation, so it would be great if PaLM 2 API users can use the model for translation tasks. See section 4.2 in the PaLM 2 technical report.

An explicit design choice of PaLM 2 is an improved translation capability.

Hi there; this PaLM API only supports English at the moment (https://developers.generativeai.google/models/language#model_attributes) so translation use cases are not supported.

I see, thank you for the reply. @williamito


makeRequest appends url to current url

So I've tried to do this:
naja.makeRequest('get', '/user/edit');
but this actually loads
http://site.com/currentpage/"user/edit"
naja.makeRequest('get', 'http://site.com/user/edit');
tries to load
http://site.com/currentpage/"http://site.com/user/edit"

Hello, which version is that? Does it do that in any particular browser, or all of them?
Could you prepare a repo which I could checkout and reproduce the behaviour? (Feel free to use my sandbox and try to break it.)

@jiripudil sorry to much work latelly 😆  all ok, I had quotes in code before and plink which added another quotes

No problem, good to hear it's resolved :)


fix: docusaurus internal code formatting

Fix issue described in: https://github.com/FormidableLabs/react-live/issues/403 by swizzling the playground
Reverted most of the changes of a1f64f7fb67dcda40c874a66b5a77377e8fccd85
Added a new React 19 hint to the use hook

It's a shame that Docusaurus doesn't run on the server side, so it can't verify if hooks are working correctly under SSR (Server-Side Rendering).

LGTM💗


0.10.2 fails on a test: global.getSelection().anchorNode undefined

A test with these 3 lines with an error. Removing the last line make it to succeed.
It uses enzyme.
wrapper.find('.public-DraftEditor-content').simulate('beforeInput', { data: '@' });
wrapper.find('.public-DraftEditor-content').simulate('keydown', { which: KEY_ESC });
wrapper.find('.public-DraftEditor-content').simulate('beforeInput', { data: 't' });

So it seems this line anchorNode is undefined, not null.
https://github.com/facebook/draft-js/blob/master/src/component/handlers/edit/editOnBeforeInput.js#L159
TypeError: Cannot read property 'nodeType' of undefined

      at editOnBeforeInput (node_modules/draft-js/lib/editOnBeforeInput.js:112:74)
      at node_modules/draft-js/lib/DraftEditor.react.js:146:19
      at Object.invokeGuardedCallback [as invokeGuardedCallbackWithCatch] (node_modules/react-dom/lib/ReactErrorUtils.js:26:5)
      at executeDispatch (node_modules/react-dom/lib/EventPluginUtils.js:83:21)
      at Object.executeDispatchesInOrder (node_modules/react-dom/lib/EventPluginUtils.js:108:5)
      at executeDispatchesAndRelease (node_modules/react-dom/lib/EventPluginHub.js:43:22)
      at executeDispatchesAndReleaseSimulated (node_modules/react-dom/lib/EventPluginHub.js:51:10)
      at forEachAccumulated (node_modules/react-dom/lib/forEachAccumulated.js:26:8)
      at Object.processEventQueue (node_modules/react-dom/lib/EventPluginHub.js:252:7)
      at node_modules/react-dom/lib/ReactTestUtils.js:351:22
      at ReactDefaultBatchingStrategyTransaction.perform (node_modules/react-dom/lib/Transaction.js:143:20)
      at Object.batchedUpdates (node_modules/react-dom/lib/ReactDefaultBatchingStrategy.js:62:26)
      at Object.batchedUpdates (node_modules/react-dom/lib/ReactUpdates.js:97:27)
      at node_modules/react-dom/lib/ReactTestUtils.js:349:18
      at ReactWrapper.<anonymous> (node_modules/enzyme/build/ReactWrapper.js:776:11)
      at ReactWrapper.single (node_modules/enzyme/build/ReactWrapper.js:1421:25)
      at ReactWrapper.simulate (node_modules/enzyme/build/ReactWrapper.js:769:14)

Hi @tleunen - can you give me more context for this?
At Facebook, we don't usually use Enzyme to simulate events on Draft, so I'm not sure this is something we expect to work. Seeing the whole test would be useful, or knowing why you are writing this test.
Thanks!

There's not much more info to be honest. The test is actually testing something outside of draft, but I need to input data there to make sure the rest behaves properly.
The test is something like:

Press a letter, see that a suggestion box renders, like a mentions box.
Press escape, see the suggestion disappears
Press a new letter, see the suggestions is not rendered again

It worked properly with 0.10.1.. Is the new condition on the nodeType too strict? Because the reason is really that the anchor is undefined, not null.

Ah - I was focused on the test format itself, but I see now the main issue is that the check we added for null isn't catching the undefined value. That's what you meant by

anchorNode is undefined, not null.

I think it would be reasonable to change the line from
 nativeSelection.anchorNode !== null &&

to
// intentionally check for `null` and `undefined`
nativeSelection.anchorNode != null &&

Would you like to submit a PR?

I expect to get this out in a minor release in the next couple of weeks.

Np. Thank you @flarnie

chrome version: 50.0.2661.102
DOMException: Failed to execute 'getRangeAt' on 'Selection': 0 is not a valid index.
Uncaught IndexSizeError: Failed to execute 'getRangeAt' on 'Selection': 0 is not a valid index.

I'm still seeing this (or a very similar error) in v0.10.4, coming from editOnInput. I'll make a PR cause I don't know if my fix is nice or not.

I'm running into the same error as @eldh periodically. Still hunting for a solid repro case...


Injector

Which injector do you use?

anything that undetected.
I recommend this, very basic and easy to use https://github.com/000x0/Rando-Injector


StructuredOutputParser.getFormatInstructions() different from Python Langchain

Hey there! I noticed that the way StructuredOutputParser.getFormatInstructions() creates instructions, is different from the Python version of Langchain. For example, in python:
Answer the user query.
The output should be formatted as a JSON instance that conforms to the JSON schema below.

As an example, for the schema {"properties": {"foo": {"title": "Foo", "description": "a list of strings", "type": "array", "items": {"type": "string"}}}, "required": ["foo"]}}
the object {"foo": ["bar", "baz"]} is a well-formatted instance of the schema. The object {"properties": {"foo": ["bar", "baz"]}} is not well-formatted.

Here is the output schema:
\```
{"properties": {"quotes": {"title": "Quotes", "description": "list of quotes", "type": "array", "items": {"type": "string"}}}, "required": ["quotes"]}
\```
Give me 3 quotes.

And in langchain js:
Answer the user query.
You must format your output as a JSON value that adheres to a given "JSON Schema" instance.

"JSON Schema" is a declarative language that allows you to annotate and validate JSON documents.

For example, the example "JSON Schema" instance {{"properties": {{"foo": {{"description": "a list of test words", "type": "array", "items": {{"type": "string"}}}}}}, "required": ["foo"]}}}}
would match an object with one required property, "foo". The "type" property specifies "foo" must be an "array", and the "description" property semantically describes it as "a list of test words". The items within "foo" must be strings.
Thus, the object {{"foo": ["bar", "baz"]}} is a well-formatted instance of this example "JSON Schema". The object {{"properties": {{"foo": ["bar", "baz"]}}}} is not well-formatted.

Your output will be parsed and type-checked according to the provided schema instance, so make sure all fields in your output match the schema exactly and there are no trailing commas!

Here is the JSON Schema instance your output must adhere to. Include the enclosing markdown codeblock:
\```json
{"type":"object","properties":{"quotes":{"type":"array","items":{"type":"string"},"description":"list of quotes"}},"required":["quotes"],"additionalProperties":false,"$schema":"http://json-schema.org/draft-07/schema#"}
\```

Give me 3 quotes.

Is there a reason why is different? the langchainjs seems less optimized in terms of token with respect to the python version. Is this perhaps not as updated as the python library?
Thank you so much!

The instructions are just defaults - you can put whatever you'd like in the prompt.
I'd generally suggest using the OpenAI functions chain (just an extended LLMChain) for structured output though:
https://js.langchain.com/docs/modules/chains/popular/structured_output


False positive on dropwizard-guice-<IP_ADDRESS>.jar and dropwizard-guice-<IP_ADDRESS>.jar - CVE-2014-0177

The CPE report says, (CVE-2014-0177)
cpe:/a:hub_project:hub:1.12.0 and all previous versions
on:
<dependency>
   <groupId>com.hubspot.dropwizard</groupId>
   <artifactId>dropwizard-guice</artifactId>
   <version>${dropwizard.guice.version}</version>
</dependency>

Where ${dropwizard.guice.version} can be either <IP_ADDRESS> or e.g. the latest <IP_ADDRESS>.

Thanks for the report - I'll try to make a pass through all of the FP reports soon.


[image import] tag UEFI_COMPATIBLE correctly

Tag UEFI_COMPATIBLE correctly for imported image.
This PR will be split to 2 (1. daisy. 2. cli_tools) once it's reviewed due to go-module dependency.
Step 1. Return "<serial-output key:'is-uefi-compatible' value:'true'>" from bootstrap for both windows and linux.
Step 2. Store it in daisy workflow.
Step 3. Provide a hook for daisy steps.
Step 4. Setup the hook in importer.go to update the UEFI_COMPATIBLE tag.
Design preference ref to https://docs.google.com/document/d/1uG9mgiKmTlajESwAyJh4-Smkg1XystZjbLzLW7R0y5I/edit#heading=h.93avqth8c7wc

This breaks the contract we have for run(), daisy has three steps for workflow running, populate, validate, and run. The majority of inline changes happen in populate, then validate pre validates the workflow, then run executes it as is, any changes after validate make validation pointless, workflows are meant to be static at runtime.
What you should instead do is run two workflows, the first can export the required variables and then you can create the second one based on the output.


[Lab 6] Test Case 7 Customer 10

Summary
I am stuck at Test Case 7, where Customer 10 is being served earlier than it should be.
Description:
To implement the rest time, after every Serve event, I updated the server's next available time to be += server.getRestTime(). This approach seems to correctly identify that Customer 3 and Customer 4 should be served by Server 2 instead of Server 1. But for some reason, it fails to identify that Customer 10 should be served only when Server 1 has finished resting.
Screenshots

I think you could try getting restTime after every Done event instead of Serve event, maybe the reason why your customer 10 was served earlier is that restTime is get in wrong order


Gonio will move for raster only under certain conditions

State has to be SA
Control has to be enabled
Sample of selected collection is mounted

Solved issue described in https://jira.nsls2.bnl.gov/browse/SB-283


Create Write Up folder

Create Write Up folder.
Create tech stack/architecture doc.
Create project development plan doc.

Completed


[T4A2][F09-B4] Chua Jun Wen

Ready for Review.

Good job!!

@JunWen991 Some comments added. Please close the PR after reading comments.


fix: Fix pytest plugin declaration so it can be used without requiring using pytest_plugins

:books: Documentation preview :books:: https://meltano-sdk--1940.org.readthedocs.build/en/1940/

This is a breaking change, so I'm moving it to the v1 branch

https://github.com/meltano/sdk/pull/1943


Can you provide the conda environment for kosmos-2?

Thank you for your fantastic work!
Could you provide the conda environment for kosmos-2?
It will be really helpful so that we don't have to figure out the confusing dependencies between deepspeed, xformer, apex, and various cuda libraries.
Thank you so much!

Thank you. I will try to fix it and get back to you.

https://github.com/microsoft/unilm/tree/master/kosmos-2#setup
It's recommended to use docker to set up the environment.

Hello, @runjiali-rl. Sorry for the late response.
Check it in this comment.


Fix markdown rendering of headlines

I noticed that the headline were messed up and thought it would be nice to submit a pull request.
Also when installing I had an issue that add-apt-repository was not found and also added my fix for that to the corresponding code snippet.

So sorry I guess I did this in https://github.com/hzoo/TwitchPlaysX/commit/3fa4b211e3ec43268c832b7ee8d6e7fb1595ab00 and I wasn't watching this repo at all!


[QUESTION]

ERPC forward and backward compatibility

Can someone comment about ERPC backward and forward compatibility scenarios between the client and the server in c++?

1- what if arguments are added/removed from the interfaces signature
2- what if argument types are added/removed
3- what if newer APIs are added, etc
Has backward and forward compatibility being properly thought about in ERPC?

Hi
From what I know:
Client shouldn't call server if their api are different, calling API that not exist in the server will cause server side to 'crash' ithout returning error to the client, calling API that changed most of the time will cause server crash but may lead also to calling the API with wrong parameters.
But if some of the API are equal and some are different (due to API addition or change or whatever) still the equal API can be called, if the enum that representing them have same values in both sides.
In general of course it is good practice not to use client and server from different generation, and if erpcgen executable/erpc code itself are different between server and client it should be checked carefully that none breaking change added to erpc between the versions.

@akpour if this answered you please close the issue


Allow custom ordering of args and subcommands in help message

I'm imagining adding something like a display_order (or whatever it gets called) method which sets the display order. Items with the same order will be listed alphabetically and the default will be something like 999 so the custom orders appear first and have a low probability for being accidentally mixed in with defaults. This would also allow some overlap so that maintenance should be low.
This should help when there are arguments or subcommands you'd like to highlight or that are most frequently used and you don't want to overwrite the entire help message by hand.
Such as something like is discussed in multirust-rs

Implemented by #443


Refactory/review pagarme python

Coverage remained the same at 100.0% when pulling 6b152a1ea96d3fc55a0ae91bd082b03b8985f5fa on Refactory/Review-pagarme-python into a6668b579c0a9a81e4b77e7eec7a1c935aa07834 on V3.


Invalid transition order

     connection manager valid transition order:                        FAIL (8.87s)
      *** Failed! Falsified (after 10 tests and 2 shrinks):
      AbsBearerInfo {abiConnectionDelay = NormalDelay, abiInboundAttenuation = NoAttenuation FastSpeed, abiOutboundAttenuation = NoAttenuation FastSpeed, abiInboundWriteFailure = Nothing, abiOutboundWriteFailure = Nothing, abiAcceptFailure = Just (SmallDelay,AbsIOErrResourceExhausted), abiSDUSize = LargeSDU}
      DiffusionScript SimArgs 1s 10 [(NodeArgs (-3) (Just 224s) [] (Map.fromList []) (TestAddress (IPAddr (read "<IP_ADDRESS>") 9)) [(1,fromList [(RelayAccessAddress "<IP_ADDRESS>" 65531,DoNotAdvertisePeer)])] PeerSelectionTargets {targetNumberOfRootPeers = 2, targetNumberOfKnownPeers = 5, targetNumberOfEstablishedPeers = 4, targetNumberOfActivePeers = 1} (Script (DNSTimeout {getDNSTimeout = 0.397s} :| [DNSTimeout {getDNSTimeout = 0.382s},DNSTimeout {getDNSTimeout = 0.321s},DNSTimeout {getDNSTimeout = 0.143s},DNSTimeout {getDNSTimeout = 0.256s},DNSTimeout {getDNSTimeout = 0.142s},DNSTimeout {getDNSTimeout = 0.341s},DNSTimeout {getDNSTimeout = 0.236s}])) (Script (DNSLookupDelay {getDNSLookupDelay = 0.065s} :| [])),[JoinNetwork 4.166666666666s Nothing,Kill 0.3s,JoinNetwork 1.517857142857s Nothing,Reconfigure 0.245238095238s [],Reconfigure 4.190476190476s []]),(NodeArgs (-5) (Just 269s) [RelayAccessAddress "<IP_ADDRESS>" 9] (Map.fromList []) (TestAddress (IPAddr (read "<IP_ADDRESS>") 65531)) [(1,fromList [(RelayAccessAddress "<IP_ADDRESS>" 9,DoNotAdvertisePeer)])] PeerSelectionTargets {targetNumberOfRootPeers = 4, targetNumberOfKnownPeers = 5, targetNumberOfEstablishedPeers = 3, targetNumberOfActivePeers = 1} (Script (DNSTimeout {getDNSTimeout = 0.281s} :| [DNSTimeout {getDNSTimeout = 0.177s},DNSTimeout {getDNSTimeout = 0.164s},DNSTimeout {getDNSTimeout = 0.373s}])) (Script (DNSLookupDelay {getDNSLookupDelay = 0.133s} :| [DNSLookupDelay {getDNSLookupDelay = 0.128s},DNSLookupDelay {getDNSLookupDelay = 0.049s},DNSLookupDelay {getDNSLookupDelay = 0.058s},DNSLookupDelay {getDNSLookupDelay = 0.042s},DNSLookupDelay {getDNSLookupDelay = 0.117s},DNSLookupDelay {getDNSLookupDelay = 0.064s}])),[JoinNetwork 3.384615384615s Nothing,Reconfigure 3.583333333333s [(1,fromList [(RelayAccessAddress "<IP_ADDRESS>" 9,DoNotAdvertisePeer)])],Kill 15.55555555555s,JoinNetwork 30.53333333333s Nothing,Kill 71.11111111111s])]

      Unexpected transition order!
      Went from: InboundIdleSt Duplex → InboundSt Duplex
      to: UnnegotiatedSt Outbound → TerminatedSt
      Use --quickcheck-replay=391613 to reproduce.
      Use -p '/connection manager valid transition order/' to rerun this test only.

In this CI run.

Use --quickcheck-replay=391613 to reproduce.
Use -p '/connection manager valid transition order/' to rerun this test only.

It turned out that the issue was caused by a bug in the simulator and only reproduced when in simultaneous TCP open one side of the connection crashed.  In this case we removed the connection from the simulation state which caused an invalid transition leading to invalid transition order.  The fix provided in #4265, make the side that did not crush execute a handshake timeout and abort the connection once it eventually fires.

Also see this comment


Ask Accuracy

I have a project that needs a replacement for the AX-12A servo. I would like to ask if the STS3215 has comparable accuracy in feedback and torque, and if it can replace the AX-12A. My project requires relatively good accuracy.
Thank you if you can share your experience with me.

Hi !
Unfortunately no, I would say the STS are slightly less accurate than the AX12.
In terms of position, their only drawback is backlash, which is quite visible (I would say at least 2°, but I never measured it precisely), and I don't recall the AX12 having such backlash. If you can live with it, the encoder has a high resolution (4096 ticks), and the result is quite repeatable: that means that for instance, for a robot arm always working against gravity, because the servo is always on the low-side of the backlash, the results are quite accurate. But if the load changes sign, or if you do very dynamic motion, this could become a problem.
In terms of torque, the measurement is extremely poor - in fact, I haven't even managed to use it for a simple binary information 'am I holding an object or not'. I think this is linked to the design itself, and it may be the same on an AX12 (I don't remember ever testing that when I worked with these servos): there is no torque measurement, only motor current is measured, and these servos have a very high reduction ratio (close to 300 I think). So everything is lost in friction: basically you see torque (current) when the motor is moving and almost no torque when the motor stops - but you can't use it to measure a weight precisely.
Nevertheless, I think the STS3215 (and other Feetech servos) are great for their price - they are after all quite cheap and make a very affordable replacement for the AX12 in my own projects.
I don't think Feetech specifically has 'high accuracy servos', but I could be wrong. I know however that they recently launched a new product which they call 'constant force servo' - the name seems to say they have improved on force sensing, but I don't know what technology really is behind it (I suppose it's still current sensing and not true torque sensing), I haven't tested them: https://www.feetechrc.com/hl恒力系列舵机.html

Thank you very much! The article is very detailed, and I have gained a lot of information about the STS3215.


Docs: Add CLI equivalent for Get-SPOUser

Closes #2485

Awesome! Thank you!

Merged manually. Thank you! 👏


Debugger - skipFiles wildcard does not work

VSCode Version: Version 1.21.1 (1.21.1)
OS Version: MacOS High Sierra 10.13.3 (17D102) (Happens on windows too)

Steps to Reproduce:

Install Chrome debugger
install and init create-react-app: npm install -g create-react-app and create-react-app
3: cd into the new app and eject the app from the create-react-app npm run eject
4: install any custom package (I tried underscore): npm install underscore --save
5: create a new function that will use underscore _.each([1, 2, 3], console.log('i am under');
6:
Add this config:

{
            "name": "Launch localhost",
            "type": "chrome",
            "request": "launch",
            "url": "http://localhost:3000",
            "webRoot": "${workspaceRoot}/src",
            "disableNetworkCache": true,
            "sourceMaps": true,
            "skipFiles": [
                "${workspaceRoot}/**/gica.tsx",
                "${workspaceRoot}/node_modules/underscore/*.js"
            ],
            "sourceMapPathOverrides": {
                "webpack:///./src/*": "${webRoot}/*"
              }
        },

7: run npm start
8: set a breakpoint on the new created function
9: launch the debugger
Now with the config above all works very nice (does not go in the underscore library when I Step Into. I love this feature in vscode a ton!
But, since this app uses tons on node_modules, I would like to be able to skip all the node_modules with a wildcard like so "${workspaceRoot}/node_modules/**/*.js" unfortunately this does not work even if most of the documentation I read says it should. (Wildcard even in a non node_modules folder fails to skip too)
Am I doing something wrong?
I want to mention that I noticed this on a personal project, but thought that this might be because of my project setup so that is why tried with a new create-react-app and it's the same issue.
Thanks a ton!

I added this question on stackoverflow too: https://stackoverflow.com/questions/49468689/visual-studio-code-debug-create-react-app-without-stepping-into-node-modules-o
Recording on the unwanted behaviour: http://recordit.co/3s0eddwZMn

This is a gap in the Chrome debug extension resolving skipFiles... for files without sourcemaps, you will have to set the path relative to the webroot.
"/node_modules/**/*.js" works fine for me. I'll move this to the chrome-debug repo for fixing.

This issue was moved to Microsoft/vscode-chrome-debug#634


Change tfstate resource location (Azure)

I do not know if this is needed in AWS envs, but would be good in an Azure implementation.
A solution might be to add a new variable for the prepare statement:
make prepare env=ENV dir=DIR state=swedencentral

@simongottschlag Good idea?

@madakralc I assume you want to control `RG_LOCATION_{SHORT|LONG}. Can you describe the use case?

@bittrance Correct. Without putting too much thought into it I can identify two quite obvious use cases.

A customer/implementation needs to put all data, information, and configuration in one region only - for example Sweden Central. As of today we would still have to put our remote state in West Europe as that is hard coded.
Quota limitation in hard coded Azure region for remote state
Legal and/or compliance requirements

By the way, who are you Mr. Bittrance? Very mysterious!

@madakralc released: https://github.com/XenitAB/github-actions/releases/tag/2021.10.1


Issue #11: Package is now Shrinkwrapped

Successfully ran npm shrinkwrap

Hi @arpitgogia apologies for taking so long in looking into this. I am hoping to have it reviewed in the next couple of days. Thanks for your help again and talk to you soon!

@arpitgogia apologies for the long delay. I haven't worked on this for a month, but getting back into it now. Thanks for your help!


Can't use custom URL schemes with Photino+React

As with the last issue I opened, I'm trying to fix this myself; I'm just opening this issue to document the problem.
With Photino and plain Javascript, I can register a custom URL scheme and it just works.
With React, something isn't happening. Clicking on a link with the href set to "app://blah/whatever" generates an error stating that the app: scheme isn't registered.
This is happening with the Edge Webview2 - I think. I do have the WebView2 runtime installed. I'm not 100% sure Photino's using it and I'm not sure how to check whether WebView2 is being used.

Hi @stevesobol Photino does use the Evergreen version of Webview2 on Windows. We appreciate your work on this. Photino registers custom schemes prior to loading any content. We're wondering if React is trying to register the same scheme causing confusion? Out of curiosity, have you tried it on Mac or Linux? If you can share the code with us we can try it out as well. We generally do our Photino work on Thursdays btw.

I haven’t tried Linux or Mac yet.
Data point: posting and receiving messages through window.external does work.
On Aug 3, 2023 at 07:37 -0700, Mike Yeager @.***>, wrote:

Hi @stevesobol Photino does use the Evergreen version of Webview2 on Windows. We appreciate your work on this. Photino registers custom schemes prior to loading any content. We're wondering if React is trying to register the same scheme causing confusion? Out of curiosity, have you tried it on Mac or Linux? If you can share the code with us we can try it out as well. We generally do our Photino work on Thursdays btw.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>

Debian Bookworm x64/KDE works. Trying Mac next.
The problem might be Vite (probably isn't, but might be). I'm working on getting a Photino/React project to work with Vite on Windows. In addition to Mac, I'm going to create a new project (by default, Photino/React uses npm) and I'll see if I have problems with it.
One other difference: I'm using Visual Studio on the Windows PC, and VSCodium on Linux (and that's what I'll use on the Mac, too). Probably should also try using VSCodium on Windows.

The difference between my successful attempts and my unsuccessful attempts: the successful attempts used npm and straight Javascript. Creating a new project using the current React template works. With only one modification, I can load scripts using a custom script tag on any platform (I had it working on all three).
But my preferred toolchain includes Vite and TypeScript. And to get things working with my environment:

I had to make sure I was using the TypeScript compiler's default module-resolution scheme. (compilerOptions.moduleResolution)

Once I fixed that problem, the custom URL scheme still wasn't working, and the reason was... CORS! That was fixed by disabling CORS in my vite.config.js:

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

export default defineConfig({
    plugins: [react()],
    build: {
        outDir: './build',
        rollupOptions: {
            input: ['src/index.tsx', 'index.html'],
            external: [/^app:.*/,]
        }
    },
    server: {
        cors: false,
    },
})

Now, everything works!
This is important because create-react-app isn't supported anymore, and Vite will scaffold a simple React app for you. Plus, Vite uses Rollup, which is much faster than Webpack, which IIRC is what CRA used.
https://dev.to/ag2byte/create-react-app-is-officially-dead-h7o
We should develop a Photino.React template that uses Vite instead of CRA.
(Wait. Did I just volunteer...?)
Let's leave this issue open until I can add a link to a gist.

@stevesobol We would love to see a sample!


Setup analytics.usa.gov to see if it is applicable to our use case

https://analytics.usa.gov/
Try out these ready-made solutions. Consider setting up an analytics site and invite other g0v projects if it is easy to use.

website https://github.com/18F/analytics.usa.gov
crawler https://github.com/18F/analytics-reporter

Aggregated data:
https://gist.github.com/MrOrz/0d094a9c324428bab02b8da31acffde7
Aggregations used to collect data:

List of users that has created replyconnections, and their replyconnections count

GET /replyconnections/basic/_search
{
   "aggs": {
      "users": {
          "terms": {"field": "userId",  "size": 500, "min_doc_count": 1}
      }
   },
   "size": 0
}

Number of such users

GET /replyconnections/basic/_search
{
   "aggs": {
      "user_counts": {
          "cardinality": {"field": "userId"}
      }
   },
   "size": 0
}

number of editors & replies per week (editor_replies_per_week.json)

GET /replyconnections/basic/_search
{
   "aggs": {
      "user_counts_over_time": {
          "date_histogram": {
              "field": "createdAt",
              "interval": "week",
              "format" : "yyyy-MM-dd"
          },
          "aggregations": {
              "user_counts": {
                  "cardinality": {"field": "userId"}
              }
          }
      }
   },
   "size": 0
}

Number of replied articles per week (replied_article_per_week.json)

GET /articles/basic/_search
{
   "aggs": {
      "replied_articles": {
         "filter": {
            "script": {
               "script": "doc['replyConnectionIds'].values.length > 0"
            }
         },
         "aggs": {
            "latest_update_over_time": {
               "date_histogram": {
                  "field": "updatedAt",
                  "interval": "week",
                  "format": "yyyy-MM-dd"
               }
            }
         }
      }
   },
   "size": 0
}

Number of new website users per week (new_user_per_week.json)

GET /users/basic/_search
{
   "aggs": {
      "new_users": {
         "date_histogram": {
            "field": "createdAt",
            "interval": "week",
            "format": "yyyy-MM-dd"
         }
      }
   },
   "size": 0
}

As for publishing Google analytics data, we already have Google Data Studio:
https://datastudio.google.com/u/0/reporting/18J8jZYumsoaCPBk9bdRd97GKvi_W5v-r/page/1M/edit
Since Google Data Studio supports importing data, we can connect elasticsearch JSON data into that as well.

We are currently using open data & google data studio for now, thus no need to keep this open.


SipTesterClient Script gives me an error on powershell core 7.1.3

Does the SipTesterClient run on PowerShell Core 7.1.3. I Get this error when executing script
Line |
409 |  â¦ statusResult = Run-SIPTest $EndpointUrl $testBody $CertificateContent
|                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Enqueueing test...FAILED: Unspecified Failure
False

Thank you for submitting feedback.
I think the best way forward is if you open a service ticket in your tenant so this can get resolved ASAP. Based on the outcome let me know if it is something that can be called out in the docs.
Please follow this link to contact support for business products:https://docs.microsoft.com/office365/admin/contact-support-for-business-products
Please keep us posted here on the resolution so we can feed whatever information you discover into the content.


Alignment Issue with header and row columns

I have grid view which has dynamic columns, When number of columns to be shown in gridview are less, the header and rows are not aligned. Header width is lower than the datarow width.
I have kept grid view in panel with width set as document width and gridview width is "100%"
The other issues is when i keep the freezcolumn as true. Then also there is alignment issue with Header Row and DataRow.
Can you please help me on this?
Thanks!

I got the same issue. Headers and columns got misaligned when no scroll is needed, I mean, when the table fits in window.
You can reproduce the problem if you change parent div to  and in options set options.width="100%" and options.height="100%" in your ParentSize.html example.
I attach the modified ParentSize.html for clarity.
`

GridViewScroll


Add link to Device Contexts overview on GetPixel page

(simple change, hope it's right 😁!)

@citelao : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Part 2: Question 2

I'm having troubles getting the right values for the "n" column. My code is below:
dat %>% count (age, hour12= "7 AM")  %>%
group_by(age) %>%
mutate(n.age=sum(n))
The values I  get for "n" are the same that I'm getting for "n.age".

Confused on hour to get "n.hour" as well.

Hello, I'm having a similar issue. I tried to use hour but that yielded completely different numbers.

I've identified that there is an error in the data, where 7 AM does not
actually correspond with the correct time. However the variable hour does
correspond correctly. This is the one you should use for the lab.
On Wed, Feb 9, 2022 at 12:59 PM Cynthia @.***> wrote:

Hello, I'm having a similar issue. I tried to use hour but that yielded
completely different numbers.
[image: image]
https://user-images.githubusercontent.com/97438499/153261476-8aeb5617-565c-4915-ae18-dc27d63c90b1.png
[image: image]
https://user-images.githubusercontent.com/97438499/153260951-f94ec750-522f-4268-9291-7db5582a88d4.png
—
Reply to this email directly, view it on GitHub
https://github.com/Watts-College/cpp-526-spr-2022/issues/35#issuecomment-1034041743,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ATZ5TJZ6IPD6JFMPI2A3DNLU2KTPFANCNFSM5N4OK6ZQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID:
@.***>

--
-Gio Circo

With my code "n.hours" still doesn't equal the sum of n.
dat %>% count (age, hour) %>%
group_by(age) %>%
mutate(n.age=sum(n)) %>%
mutate(n.hour=sum(n)) %>%
mutate(p.age=n / n.age) %>%
mutate(p.hour=n / n.hour) %>%
filter(hour=="07")

Hi Carly, the below explanation was quite helpful for me so sharing it with you:
p = proportion of accidents for each age group at that hour
n.hour = number of accidents for that hour
p.hour = proportion of accidents for that hour
n.hour is actually the total number of accidents that occurred at 7 AM (sum(dat$hour == "07"))
Hope this helps :-)