Uuid support for Sqlite.

Includes the same support for the Hyphenated adapter as the MySQL Uuid support.
I'm pretty new to Rust and based this heavily off #536;  hopefully it is useful!

It appears that the SQLite tests are failing to compile with the following- from CI logs:
error[E0277]: the trait bound `sqlx::types::Uuid: sqlx::Encode<'_, sqlx::Sqlite>` is not satisfied
Error:   |
  = help: the following implementations were found:
            <&'q sqlx::types::Uuid as sqlx::Encode<'q, sqlx::Sqlite>>

error[E0277]: the trait bound `sqlx::types::uuid::adapter::Hyphenated: sqlx::Encode<'_, sqlx::Sqlite>` is not satisfied
Error:   |
  = help: the following implementations were found:
            <&'q sqlx::types::uuid::adapter::Hyphenated as sqlx::Encode<'q, sqlx::Sqlite>>

It appears that the SQLite tests are failing to compile with the following- from CI logs:

That's because Encode is only implemented for &'q Uuid in this PR, and not for Uuid itself. I think it should be implemented for just Uuid?

Fixed and merged locally: 0631384f4d762c36a7d22ff28b9fb2e2175935de
Thank you for getting this going 👍


Copy a new instance of options dict for each child

Closes https://github.com/teemtee/tmt/issues/1977

/packit test

It seems that this code causes the following error in python3.6.
TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases


Features for v 0.4.0

We plan to include following features in v 0.4.0

[ ] Create new API for rendering cells using react components instead of cellRenderers
[ ] Split layout and theme styles #121

Can't wait for this :)

+1

No plans for implementing #49? :(

@cesarandreu We have solved part of it with 0.3.0 release ( #156 ). You can now mark your columns using allowCellsRecycling prop and this will allow table to get not render cells in these columns when they are outside of viewport.
This doesn't allow table to has any number of columns, but we tested on 1000 columns and it works quite well. There will be additional example coming soon.

Oh cool, I'll try it out, thanks :D.

Any chance to see #129 Keyboard / Screen-Reader Accessibility in this release?

Guys, any news on accessibility? I was wondering if there are any plans to have it in the near future.

Version v0.4.0 has been released with bugfixes and splitting layout and theme styles.

Please see #193 !

Great work! Thanks!


fix: php-errors FP

[Sat Mar 11 15:45:19.636843 2023] [:error] [pid 292128] [client <IP_ADDRESS>:51798] [client <IP_ADDRESS>]
ModSecurity: Warning. Matched phrase "Static function" at RESPONSE_BODY. [file "/etc/modsecurity/
coreruleset/rules/RESPONSE-953-DATA-LEAKAGES-PHP.conf"] [line "44"] [id "953100"] [msg "PHP Information Leakage"] [data "Matched Data: Static function found within RESPONSE_BODY"] [severity "ERROR"] [ver
"OWASP_CRS/4.0.0-rc1"] [tag "application-multi"] [tag "language-php"] [tag "platform-multi"]
[tag "attack-disclosure"] [tag "paranoia-level/1"] [tag "OWASP_CRS"] [tag "capec/1000/118/116"]
[tag "PCI/6.5.6"] [hostname "blog.jitendrapatro.me"] [uri "/wp-admin/post.php"] [unique_id
ZAxUt5um5UuN8ldYD8BbMwAAAAE"], referer: https://blog.jitendrapatro.me/wp-admin/edit.php
@azurit We need to come up with a better solution for this. I write a lot of technical articles in my blog some of which deal with programming and I've to write "code" as example in them. Now, I can't edit the blog post in my wp-admin backend.

I agree. Static function at PL1 is asking for FPs.

@GenialHacker Oh, sorry, i didn't noticed this is a PR and i created my own with the very same chagnes - closed it already.
Can you sort patterns alphabetically?

There are still a lot of common words in php-errors-p12.data. For example, "Empty string" and "Malformed input".

Thank you!
I'm expecting lots of more FP until all settles down.

In my opinion they could be removed totally...

I think there needs to be a better solution for this. I run my server on PL 2(down from PL3 after update to CRS4), and even after applying this fix I've to write my own rules. I think php-errors.data is quite useful and removing is not a solution. Any ideas what could be a better solution?

@GenialHacker You are supposed to write your own exclusion rules on PL2 and up.

I know that. But when you think that I've to write a rule for all the keywords that matches, then you'll know it's a bit too much.

You don't have to. Can you show an example of your exclusion rules?

I thought you said you don't like @rx on response body. I can pull up a regex to or the keywords but won't that be CPU heavy?

You can use @pmFromFile.

Great idea. Actually, that's what the rule in question is doing.

You know I'm starting to love this rule writing stuff. Is there any pre-qualification required to become an official CRS developer?

Probably no, contact @dune73.

@dune73 Sir, sorry for the ping. I wanted to know how can I become an official CRS developer/member.
Also, I've read your blog posts and I think they're awesome. I wish I get to work with someone like you. 🙂

Hi @GenialHacker, thank you very much.
Working on false positives is not the most rewarding job, but it's a good entry point. Glad to see you enjoy this.
We do not have formal requirements, but we usually talk to people who contributed a handful of PRs over the course of a couple of weeks or rather months. Participating into our CRS chats / meetings twice a month is also a good sign for interest to work on the project.
I think I can speak for the project when I say that we have an interest in a long term commitment and more or less regular contributions.

I'd love to participate in chats related to such a popular open source project. Where can I learn about when those chats are taking place? Actually, @dune73 I've been working on Web Security Research for the past two years and also have found a few web related vulns in open source projects.

@GenialHacker Watch for issues like this in coreruleset repo: https://github.com/coreruleset/coreruleset/issues/3159

@azurit Can I get an invitation to join? The OWASP slace only allows people with an email domain of owasp.org and owasp.com

@azurit Got the invite. :)

@GenialHacker You can catch me also there!

Nice @GenialHacker. You do not have to wait until April though. The next of our meetings is tomorrow, Monday, 2030 CET in our slack. Agenda (in the making): https://github.com/coreruleset/coreruleset/issues/3039
Slack invite: https://owasp.org/slack/invite
I realise that you are probably living in a troubling time zone with regards to our meetings. We're aware of the unfriendly timing, but it's literally the best option for now after many, many discussions.

Sir, I'm also aware of the timing. I normally work late into the night, so it won't be a big deal for me. Looking forward to the meeting today.


Avoid missing node errors on genesis ledger creation.

Reviewers: @vinniefalco @scottschurr

From my understanding of the core business logic, this change seems benign. The worst that happens is that it occupies one extra cache slot which expires after no one requests it. @JoelKatz ?

Current coverage is 61.52%

Merging #1508 into develop will decrease coverage by -0.47% as of 98b1bef

@@            develop   #1508   diff @@
=======================================
  Files           888     888
  Stmts         62871   62854    -17
  Branches          0       0
  Methods           0       0
=======================================
- Hit           38979   38668   -311
  Partial           0       0
- Missed        23892   24186   +294

Review entire Coverage Diff as of 98b1bef

Powered by Codecov. Updated on successful CI builds.

Boy, does this change ever quiet down the unit tests.  Nice work.  The change looks like it's probably a good thing, but it's way outside of my comfort zone.  That said, since David gave it the thumbs up, I'm good with it.  :+1:.


Avoid quadratic-time performance for HLG culling

There were two areas that scaled badly with the number of layers:

_toposort_layers walked all the remaining layers after processing each
layer. I've rewritten it using an algorithm that's linear in the total
number of dependencies.

Several of the set operations were written in a way that took time
dependent on the larger set, rather than the smaller. In some cases
this is due to one of the sets actually being a collections.abc.Set
rather than a real Python set, which can cause supposedly in-place
operations like set1 |= set2 to create a new set, requiring time
proportional to the size of the result rather than of set2.

[x] Closes #7402

[x] Tests added / passed

[x] Passes black dask / flake8 dask

I haven't added any tests since it's just an optimisation; the existing tests should all pass, although pytest is giving me some issues locally so I haven't been able to run everything and am waiting for CI to test it for me.

Could you post benchmark times for a relevant code snippet (e.g. the snippet in #7402).

For that snippet:
Before: 16s
After: 3s
(very roughly - I didn't bother trying to take an average over multiple runs). It seems to be more-or-less back to where things were with Dask 2.30.

Also cc @rjzamora

I suspect the CI failures are to do with some change in SQLAlchemy rather than anything I've done?

I suspect the CI failures are to do with some change in SQLAlchemy rather than anything I've done?

Yeah, that's correct -- adding a temporary patch over in https://github.com/dask/dask/pull/7405


[CT-256] [Bug] PostgreSQL - Casting timestamp with time zone to date yield wrong result

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
I have a timestamp with time zone column from which I'd like to extract the date.
with sample as (
    select '2018-11-30T23:41:06Z' as str_timestamp
)
select
    str_timestamp::timestamp with time zone as sample_timestamp,
    (str_timestamp::timestamp with time zone)::date as sample_date
from sample

When I run this model, this is the table I get in the DB, as if the first cast did not happen:

sample_timestamp
sample_date

2018-12-01 00:41:06.000 +0100
2018-11-30

Expected Behavior
When I use a Postgres client (DBeaver/Metabase), the query yield the following result:

sample_timestamp
sample_date

2018-12-01 00:41:06.000 +0100
2018-12-01

Steps To Reproduce

Create a sample.sql file with the query
Run dbt run --select sample

Relevant log output
No response
Environment
- OS: MacOS Monterey Apple M1 Pro (installed with Homebrew)
- Python: Python 3.10.0
- dbt:0.21.1

What database are you using dbt with?
postgres
Additional Context
No response

I ran the same model on another machine to test it, and the same behaviour occurs on Ubuntu 20.04 with dbt==1.0.0.

When I make a SELECT current_setting('TIMEZONE') locally, I get 'UTC', but on both my clients (DBeaver/Metabase), i get 'Europe/Brussels' which may explain the observed results. Is there a way to set the timezone in DBT?

@keurcien
Timezone is not a dbt construct. Nor is Casting values. All of this is happening in your database and the problem is independent from dbt. dbt only serves to precompile SQL templates with Jinja which are ultimately executed by your database. The above example has no Jinja.
I do use Metabase though. Maybe try adjusting localization settings in the admin interface. Also use timestamptz for casting. I haven't seen it done the way above personally.

@keurcien, @z3z1ma is correct this isn't something dbt is really able to configure and is more of a local db configuration, you could try using the above timestamptz mentioned above or something along the lines of SET command in postgres to change their current settings.

Thanks for your answers!
I ended up using at time zone 'Europe/Brussels' to make sure I get the right timezone.
The database server probably use the client timezone when reading "with time zone", and hence the inconsistencies.


Custom Pod Security Standards

We're using EKS v1/.23 and as we all know that Pod Security Policies are getting depreciated. We're planning to adapt Pod Security Admission by enforcing Pod Security Standards. We'd like to know if we can have our own custom pod security standards.
The current restricted pod security standard is creating some issues and we need to add exceptions per our requirements.
Is there a way we can leverage existing kubernetes pod security admission to achieve this?

/transfer kubernetes


fix: fix BlockingDelayQueue.clear()

While using the blocking-delay-queue I encountered a problem with the clear function. If the producer thread waits in the add() function, a call to clear() won't release it and it never returns.
I only changed the clear function, as this fixed my issue and all tests passed. Maybe there are further changes due to this.
Thanks for your work and providing this awesome module.

Hi @marcbull ,
Thanks for your interest in this project and for the provided fix (nice catch btw).
Although the fix looks good to me I would definitely like to see a test covering such scenario as there currently isn't one.
Let me know if you're able to do so.
Thanks

Hi @dejankos,
It's tricky to reproduce this issue in a test, but I managed to add one. The test does not block forever if the clear() doesn't release the add() and hopefully it doesn't fail due to scheduling delays. I tried to keep timeouts to get the thread into add() before the clear() as short as possible. Maybe you have an idea how to improve this test.

@marcbull  I think this is a reasonable approach I've just left a few minor suggestions.
I think the test could be further improved by introducing a queue peek API in the test scope as it would allow waiting on a condition rather than using thread sleep and probably the convar and thread park could be removed as well. (I'll look more into it)
Thanks for the effort!

Hi @dejankos,
I committed the suggestions. Yeah, it would be perfect to avoid the sleeps, condvar and the park.
No problem, it was a pleasure to help you.


Improved: Converted the setPaymentStatus service from XML to groovy DSL. [OFBIZ-11482]

Hello, I merged on trunk this service migration based on your patch @vyasdevanshu  and @dixitdeepak 's remarks


[Feature]: Confidence score for Qwen/Qwen2-VL-7B-Instruct

🚀 The feature, motivation and pitch
I have served a model Qwen/Qwen2-VL-2B-Instruct using vLLM.
I need to decode the confidence score for the model extracted output from the image using logprobs.
Is that is possible for this model. Give me some ideas on this. I got empty list logprobs results so the confidence is 0 for the correct answers also.
Alternatives
Reference from Huggingface
import vllm
import torch
import numpy as np
from vllm import LLM, SamplingParams
sampling_params = SamplingParams(
logprobs=20,
prompt_logprobs=20,
)
llm = LLM(model='/root/huggingface/math-shepherd-mistral-7b-prm', dtype='float32', tensor_parallel_size=1, gpu_memory_utilization=0.9, max_model_len=4096)
question = """Janet\u2019s ducks lay 16 eggs per day. She eats three for breakfast every morning and bakes muffins for her friends every day with four. She sells the remainder at the farmers' market daily for $2 per fresh duck egg. How much in dollars does she make every day at the farmers' market?"""
output1 = """Step 1: Janet's ducks lay 16 eggs per day. ки\nStep 2: She eats three for breakfast every morning, so she has 16 - 3 = 13 eggs left. ки\nStep 3: She bakes muffins for her friends every day with four eggs, so she has 13 - 4 = 9 eggs left. ки\nStep 4: She sells the remainder at the farmers' market daily for $2 per fresh duck egg, so she makes 9 * $2 = $18 every day at the farmers' market. The answer is: 18 ки""" # 18 is right
output2 = """Step 1: Janet's ducks lay 16 eggs per day. ки\nStep 2: She eats three for breakfast every morning, so she has 16 - 3 = 13 eggs left. ки\nStep 3: She bakes muffins for her friends every day with four eggs, so she has 13 - 4 = 9 eggs left. ки\nStep 4: She sells the remainder at the farmers' market daily for $2 per fresh duck egg, so she makes 9 * $2 = $17 every day at the farmers' market. The answer is: 17 ки""" # 17 is wrong
good_token = '+'
bad_token = '-'
step_tag = 'ки'
tokenizer = llm.get_tokenizer()
[good_token_id, bad_token_id, step_tag_id] = tokenizer.encode(f"{good_token} {bad_token} {step_tag}")[1:] # [648, 387]
full_prompt = [f"{question} {output}" for output in [output1, output2]]
response = llm.generate(full_prompt, sampling_params)
for res in response:
prompt_logprobs = res.prompt_logprobs
all_tokens = res.prompt_token_ids
tag_token_index = [i for i, token in enumerate(all_tokens) if token == step_tag_id]
results = []
for token_index in tag_token_index:
logprobs = prompt_logprobs[token_index]
good_score = 0
bad_score = 0
if good_token_id in logprobs:
good_score = logprobs[good_token_id].logprob
if bad_token_id in logprobs:
bad_score = logprobs[bad_token_id].logprob
    normalized_good_score = torch.softmax(torch.tensor([good_score, bad_score]), dim=0)[0].item()
    results.append(normalized_good_score)
print(results)

Additional context
I have attached references
Before submitting a new issue...

[X] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

I suggest you set --task reward and use LLM.encode() to extract the hidden states directly from the model.

Currently the model supports (auto, generate, embedding) only. I am getting an error.

Can you update vLLM? It should be supported in the latest version.

If i am specifying the score has a task, The model can give confidence score for the extracted data or only giving score

You can get the logits for each token (which is the hidden state of the model before passing to LM head).

Thanks a lot sir, I will try it. Once i get the logits i will apply the torch softmax function and decode the score. Is correct?

Yes.  Which task are you using specifically? You can also apply softmax automatically by overriding the pooler config (see --override-pooler-config argument).

Can i set, Override or set the pooling method for pooling models. e.g. {“pooling_type”: “mean”, “normalize”: True}.’
normalize = False or True
pooling_type = "mean"
Correct?

If you want just the last token, you can use last-token pooling (assuming that there's no EOS token). Also, you should enable softmax, but not normalization if you want the score.

You are asking like this or something else?
from vllm import LLM
Sample prompts.
text_1 = "What is the capital of France?"
texts_2 = [
"The capital of Brazil is Brasilia.", "The capital of France is Paris."
]
Create an LLM.
You should pass task="score" for cross-encoder models
model = LLM(
model="BAAI/bge-reranker-v2-m3",
task="score",
enforce_eager=True,
)
Generate scores. The output is a list of ScoringRequestOutputs.
outputs = model.score(text_1, texts_2)
Print the outputs.
for text_2, output in zip(texts_2, outputs):
score = output.outputs.score
print(f"Pair: {[text_1, text_2]!r} | Score: {score}")
Apologise, for the confusion sir.
I am performing extraction from the image. I have given prompt to extract all the key and value pair data. I have list of key and values. How to decode the confidence score for each keys. Because, I have 16Gb t4 machine. Could you share some snippet to help me on this.

Only cross-encoder models support the "score" task. I suggest you use the "classify" task instead.

But, currently there is no easy way to get both the output and confidence score together.
You can try and follow https://github.com/vllm-project/vllm/issues/11397, which keeps the task as "generate" so you can get the text output in addition to the scores.

Yes I am getting multiple errors. Are you integrate score or got logits from the qwen2-vl-7b model

The best solution I have for you is #11397 as mentioned before.


fix: #432 Error when logout in the command-line tool

#432 Error when logout in the command-line tool

@xquanluu Thank you for solving this issue. I'd just recommend removing the grpc-tools version changes as it's not related to the issue.

Hi @efraa
I'm quite insterested in fonoster, do you have any other good first issue to me. Thanks a lot.

Hi @efraa
I'm quite insterested in fonoster, do you have any other good first issue to me. Thanks a lot.

For sure! Be in the look out because we will continue to add more.

@xquanluu thanks a lot for the PR. It helps a lot. Keep them coming 💪


Initial load times with SSL relatively high

The initial loadtimes for new connections/requests are very high, and it seems that connections are not kept open? After every connection the SSL handshake is done, which usually adds between 40 to 100ms per request, even running everything from localhost.
Are there settings that can improve this? Typically a SSL connection is negotiated once, and used for several minutes, drastically cutting down on request times. Is this special behavior that can be added somewhere?

Currently for each client connection we create a new connection to server, and then it is used until client or server terminates the connection.
I think reusing existing connections/preemptively creating connections to server sounds like an idea, but not sure how exactly it should be implemented.

Thanks for your reply. I noticed that when I have one endpoint with a generic certificate set, the initial connection setup happens much faster than with two endpoints and only one root certificate. I will see if I can find why that is. It seems the certificates might not be cached correctly, resulting in new certificate signing every time.

Not to hijack the issue.  This might be relevant.
I currently have 400k plus connection (between 8 instances of titanium proxy) transversing through titanium proxy.  After running for 15 minutes or so all the new https clients receive a tcp reset and the proxy has to be restarted.
The clients are only allowed to connect to a single https website.

@chancity That sounds like a serious problem. Do you see any specific exceptions? Is the memory usage looks okay when this occur?

Also does this occur with less number of connections?

@justcoding121 I haven't tried to debug anything yet.  I created a workaround, but I can set up a test environment this weekend.   Send me a message on skype "chancey.hawbaker".

I will have to re look the code first for issues with TCP connection close, error handling and GC. After that may be it would be easy to debug.

@aricih In case you found any issues specific to memory leaks or connection not closed properly, appreciate your input.

@chancity Would appreciate if you can give a try now on latest release. There was a major bug in connection reuse we just fixed.

@justcoding121 I'll try it out right now

@justcoding121 Memory usage tends to still creep up.  I haven't had any SSL issues yet.  I'll check in again in about 60 minutes.

memory usage is way better on the new stable release.

I noticed that .Net core version of the project is much faster for Ssl negotiation, and further researching I think the PCL version of BouncyCastle made the difference. So I am making it as the default Certification Generation library for .Net 4.5 as well instead of COM interop calls.


HTTPException always returns 200 [QUESTION]

Maybe I am missing something as usual
as i understand
 raise HTTPException(
            status_code=status.HTTP_415_UNSUPPORTED_MEDIA_TYPE,
            detail="File is not excel",
            headers={"X-Error": "There goes my error"},

        )

should return status code of 415, but I just always get 200, if line is changed to
return Response(status_code=status.HTTP_415_UNSUPPORTED_MEDIA_TYPE, content="File is not excel",)
voula I get a 415 response code, so I am a bit lost here. Maybe you can explain me, where is my mistake?

Did you have exception_handler ?

No, I don't, but  I am not using custom exception handlers
https://fastapi.tiangolo.com/tutorial/handling-errors/#use-httpexception

got it, you need to use  exception_handler
so using this example is useless?

Thanks for the help here @Dustyposa ! :clap: :bow:
I imagine you solved your problem, so thanks for closing the issue :+1:

@galvakojis I didn't get how you fixed this issue. I'm having the same issue, and couldn't find anything about  exception_handler in the docs.
@app.get("/ping")
async def pong(request: Request):
    return HTTPException(status_code=400, detail="oops")

curl returns:
> GET /ping HTTP/1.1
> Host: localhost:8002
> User-Agent: curl/7.79.1
> accept: application/json
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< date: Tue, 18 Oct 2022 09:25:19 GMT
< server: uvicorn
< content-length: 50
< content-type: application/json
<
* Connection #0 to host localhost left intact
{"status_code":400,"detail":"oops","headers":null}%

Hello, well I think as 99% it happens to me me, it was user error, Maybe I forgot to import something or imported a wrong module
On Tuesday, October 18, 2022 at 12:29:39 PM GMT+3, Saeed Esmaili @.***> wrote:
@galvakojis I didn't get how you fixed this issue. I'm having the same issue, and couldn't find anything about exception_handler in the docs.
@app.get("/ping")
async def pong(request: Request):
return HTTPException(status_code=400, detail="oops")
curl returns:

GET /ping HTTP/1.1
Host: localhost:8002
User-Agent: curl/7.79.1
accept: application/json

Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< date: Tue, 18 Oct 2022 09:25:19 GMT
< server: uvicorn
< content-length: 50
< content-type: application/json
<
Connection #0 to host localhost left intact
{"status_code":400,"detail":"oops","headers":null}%

—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>


Fragment Encoding

This is another take on #3434. Instead of trying to decode the fragments, which leads to weird double decoding issues, we can just maintain them in the encoded state.
How can we do this? Because it's easy to determine if the fragment has been decoded (either from a browser bug, or from the dev who never encoded it) since we can just check for a decoded character. If we find one, we can assume that the fragment has been run through decodeURI() and just invert it with encodeURI(). Now we can match encoded fragments with encoded routes, and everything works perfectly. Static parts of the route match, because the route is encoded and the fragment is. And params / splats will be mapped through decodeURIComponent(), guaranteeing it'll never throw (cause it's encoded!).
However, we can't do the opposite. Say we check to see if there are any decoded characters. If there are, then we treat it as already decoded, if not, we decodeURI(). The problem is, we don't know if that will leave the fragment in a state that will throw when we later decodeURIComponent(). Thus, we're back at #3434.

Interesting. @braddunbar — any opinion?

This is interesting. Thanks @jridgewell! Here's a couple of initial thoughts.
This is a big breaking change for anyone who depends on Backbone.history.fragment. I know that I have in the past and I suspect others do as well. The fragment used to be kept encoded and we swapped because it made matching much easier, among other things @jashkenas may remember.
Also, I don't see any added benefit over #3434. Decoding everything but %25, while maybe not ideal, does fix #3426 with minimal API change and impact on functionality. I know it breaks PhantomJS but I think a move to testing with real browsers has been met with unanimous approval.
As for whether this is a better approach in general, I'd need to know what benefits we're shooting for and why. That's my 2¢! :smile_cat:

This is a big breaking change for anyone who depends on Backbone.history.fragment.

I suppose we can keep history.fragment decoded. But it's going to be ugly to maintain both an encoded private fragment, and a decoded public one.
These undocumented, public history properties are killing my refactors. :stuck_out_tongue:

Also, I don't see any added benefit over #3434.

I see #3434 as a ugly hack.

Backbone.history.fragment wasn't ever part of the real public API — so if we really think this is an improvement, I think it's okay to change it.

I see #3434 as a ugly hack.

Why is that? It decodes everything that decodeURI would encode except for %25. The functionality and motivation is explained in comments and there's good test coverage. What's hacky about it, objectively?

so if we really think this is an improvement, I think it's okay to change it.

This is my point. I don't understand what this refactor buys us, in terms of user facing API or reduction of complexity.

Actually, #3434 does add one thing this can't: myyjä/foo%20%25%3F%2f%40%25%20bar. If you want to use a encoded component, the entire fragment must be encoded. I still think it's a hack, but it works...


pull request for e2e test at 11/29/2016 12:56:04

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Files crashes on start

Description
Files crashes at the start. I open it and see the window with the icon but after 1 sec it crashes and closes
Steps To Reproduce
Open Files
Crash
Expected behavior
Open files
Manage to use the app
Files Version
1.9.20 - latest beta
Windows Version
Windows 11 -V 10.0.22000 Build 22000
Relevant Assets
No response

Thanks for this report. Please add the debug files to the issue description. Also you can try and see if resetting the app solves this.

@gave92 Where to find the debug file? Also does resetting the application mean reinstalling it?

You can find the debug files (debug.log and debug_fulltrust.log) in %localappdata%\Packages\49306atecsolution.FilesUWP_et10x9a9vyk8t\LocalState
Reinstalling also works but you can also try to right click on Files on the start menu > More > App settings -> Reset

Yep reset worked, thanks @gave92!
Here are the files, anyway hope they help
debug.log
debug_fulltrust.log


failed to write to pager: exec: "PAGER_PATH": executable file not found in $PATH

Thanks for submitting a bug report. Please provide the following information:
A description of the problem
Out of the box, after installing with Homebrew on Mac, I had this error message
❯ cheat zip
failed to write to pager: exec: "PAGER_PATH": executable file not found in $PATH

cheat version info
4.4.0
cheat configuration info
If your bug pertains to how cheatsheets are loaded and/or displayed, please
paste here the following information:

The output of cheat -d

❯ cheat -d
community: /Users/adrien/.config/cheat/cheatsheets/community
personal:  /Users/adrien/.config/cheat/cheatsheets/personal

The contents of your conf.yml file

---
# The editor to use with 'cheat -e <sheet>'. Defaults to $EDITOR or $VISUAL.
editor: EDITOR_PATH

# Should 'cheat' always colorize output?
colorize: false

# Which 'chroma' colorscheme should be applied to the output?
# Options are available here:
#   https://github.com/alecthomas/chroma/tree/master/styles
style: monokai

# Which 'chroma' "formatter" should be applied?
# One of: "terminal", "terminal256", "terminal16m"
formatter: terminal256

# Through which pager should output be piped?
# 'less -FRX' is recommended on Unix systems
# 'more' is recommended on Windows
pager: PAGER_PATH

# Cheatpaths are paths at which cheatsheets are available on your local
# filesystem.
#
# It is useful to sort cheatsheets into different cheatpaths for organizational
# purposes. For example, you might want one cheatpath for community
# cheatsheets, one for personal cheatsheets, one for cheatsheets pertaining to
# your day job, one for code snippets, etc.
#
# Cheatpaths are scoped, such that more "local" cheatpaths take priority over
# more "global" cheatpaths. (The most global cheatpath is listed first in this
# file; the most local is listed last.) For example, if there is a 'tar'
# cheatsheet on both global and local paths, you'll be presented with the local
# one by default. ('cheat -p' can be used to view cheatsheets from alternative
# cheatpaths.)
#
# Cheatpaths can also be tagged as "read only". This instructs cheat not to
# automatically create cheatsheets on a read-only cheatpath. Instead, when you
# would like to edit a read-only cheatsheet using 'cheat -e', cheat will
# perform a copy-on-write of that cheatsheet from a read-only cheatpath to a
# writeable cheatpath.
#
# This is very useful when you would like to maintain, for example, a
# "pristine" repository of community cheatsheets on one cheatpath, and an
# editable personal reponsity of cheatsheets on another cheatpath.
#
# Cheatpaths can be also configured to automatically apply tags to cheatsheets
# on certain paths, which can be useful for querying purposes.
# Example: 'cheat -t work jenkins'.
#
# Community cheatsheets must be installed separately, though you may have
# downloaded them automatically when installing 'cheat'. If not, you may
# download them here:
#
# https://github.com/cheat/cheatsheets
cheatpaths:
  # Cheatpath properties mean the following:
  #   'name': the name of the cheatpath (view with 'cheat -d', filter with 'cheat -p')
  #   'path': the filesystem path of the cheatsheet directory (view with 'cheat -d')
  #   'tags': tags that should be automatically applied to sheets on this path
  #   'readonly': shall user-created ('cheat -e') cheatsheets be saved here?
  - name: community
    path: /Users/adrien/.config/cheat/cheatsheets/community
    tags: [ community ]
    readonly: true

  # If you have personalized cheatsheets, list them last. They will take
  # precedence over the more global cheatsheets.
  - name: personal
    path: /Users/adrien/.config/cheat/cheatsheets/personal
    tags: [ personal ]
    readonly: false

  # While it requires no configuration here, it's also worth noting that
  # cheat will automatically append directories named '.cheat' within the
  # current working directory to the 'cheatpath'. This can be very useful if
  # you'd like to closely associate cheatsheets with, for example, a directory
  # containing source code.
  #
  # Such "directory-scoped" cheatsheets will be treated as the most "local"
  # cheatsheets, and will override less "local" cheatsheets. Similarly,
  # directory-scoped cheatsheets will always be editable ('readonly: false').

I actually found a workaround, which is to edit :
~/.config/cheat/conf.yml
and set a pager: as described in the comment:
# Through which pager should output be piped?
# 'less -FRX' is recommended on Unix systems
# 'more' is recommended on Windows
- pager: PAGER_PATH
+ pager: less -FRX

But thought it would be interesting to report.
Is it just my machine where PAGER_PATH is not defined by default?
Or should cheat have a default value there?

I'm going to close this for now to remove noise from the issue-tracker, but please feel free to re-open it if you think there's more to discuss. Thanks.

I do think I used brew to install, but I don't remember a prompt.
But I did have a conf file, so maybe there was a bug during install that omitted the PAGER_PATH replacement?
Anyway, it's been working well ever since :)

But I did have a conf file, so maybe there was a bug during install that omitted the PAGER_PATH replacement?

It's entirely possible. I vaguely remember having installer issues a while ago.

Anyway, it's been working well ever since :)

Glad to hear! I'll consider this solved for now, but I'll keep an eye open for similar issues in the future.
Thanks!

I just had this happen on macOS (with cheat installed via homebrew some time ago). I did just upgrade to Sonoma, but that may be unrelated. Editing conf.yml manually as described above fixed the issue. Looks like the template literals weren't replaced by the installer or were reinstalled during an update.

@4rc0s, thanks for the input. I've re-opened the issue.


Send all balance

how to send all balance of TRX?
when i want send using balance as amout, that alwalys fail.
balance = client.get_account_balance(address)

You might have to account for bandwidth points. If not bandwidth left, you should let (I think) 0.1 TRX for fees.

You might have to account for bandwidth points. If not bandwidth left, you should let (I think) 0.1 TRX for fees.

Not working, i also test balance-1000000 (1 trx in sun) as amount of send, my balance is 100 when i send 99000000 as amount is working. I want create python script which can read balance and send all automatically

I think if t

You might have to account for bandwidth points. If not bandwidth left, you should let (I think) 0.1 TRX for fees.

I think if tronpy update fiture like tronweb fromSun and toSun is can be worked

Don't know if related, but when you send to an address that has not been activated, you might need to spend 1 extra trx.

Don't know if related, but when you send to an address that has not been activated, you might need to spend 1 extra trx.

Yes i know, but i dont know how to do that in tronpy when i send balance and left 1-5 trx in wallet is not working
This my script
from tronpy import Tron
from tronpy.keys import PrivateKey
client = Tron(network='nile')
priv_key = PrivateKey(bytes.fromhex("x))
address = "TJzXt1sZautjqXnpjQT4xSCBHNSYgBkDr3"
balance = client.get_account_balance(address)
txn = (
client.trx.transfer("TJzXt1sZautjqXnpjQT4xSCBHNSYgBkDr3", "TVjsyZ7fYF3qLF6BQgPmTEZy1xrNNyVAAA", balance-5_000)
.memo("test memo")
.build()
.sign(priv_key)
)
print(txn.txid)
print(txn.broadcast().wait())

Buf if i write spesific balance let says 100 its working perfectly
from tronpy import Tron
from tronpy.keys import PrivateKey
client = Tron(network='nile')
priv_key = PrivateKey(bytes.fromhex("x))
address = "TJzXt1sZautjqXnpjQT4xSCBHNSYgBkDr3"
balance = client.get_account_balance(address)
txn = (
client.trx.transfer("TJzXt1sZautjqXnpjQT4xSCBHNSYgBkDr3", "TVjsyZ7fYF3qLF6BQgPmTEZy1xrNNyVAAA", 10000000)
.memo("test memo")
.build()
.sign(priv_key)
)
print(txn.txid)
print(txn.broadcast().wait())

Here, check this code I use. Modify according to your needs.
This is all inside a class.
def transferBalance(self, receiver: str,                         amount: float,                         contract: Optional[str] = None,                         sender: Optional[str] = TRON_HOT_WALLET_ADDRESS,                         senderpk: Optional[str] = TRON_HOT_WALLET_PK) -> dict:         """         Transfers balance to another address         params:         sender: str -> Sender address         senderpk: str -> Sender Private Key         receiver: str -> Receiver address (send to this address)         amount: float -> amount to send         contract: Optional[str] -> Contract to send, if none assume TRX         """         private_key = PrivateKey(bytes.fromhex(senderpk))         if contract:             contract = self.client.get_contract(contract)             decimals = contract.functions.decimals()             txn = (                     contract.functions.transfer(receiver, int(amount * pow(10, decimals)))                     .with_owner(sender)  # address of the private key                     .fee_limit(10_000_000)                     .build()                     .sign(private_key)                 )             return txn.broadcast()         else:             try:                 txn = (                     self.client.trx.transfer(sender, receiver, int(amount*pow(10, 6)))                         .build()                         .sign(private_key)                 )             except Exception as e:                 coms.error(f"Error sending TRX {e}")                 return False             else:                 return txn.broadcast()

In general sending all balance is a tedious task because it requires to know the fee you will spend with 100% accuracy beforehand
Ideally, you can use BitcartCC for this (only it provides the most reliable fee estimation function), i.e. set up bitcartcc daemon via https://docs.bitcartcc.com/deployment/ or manually:
git clone https://github.com/bitcartcc/bitcart
cd bitcart
pip install -r requirements/base.txt
pip install -r requirements/daemons/trx.txt

TRX_SERVER=https://rpc.ankr.com/http/tron python3 daemons/trx.py
Then using https://github.com/bitcartcc/bitcart-sdk or https://github.com/bitcartcc/bitcart/releases/tag/cli-1.1.0 or any other language, you can do stuff like this:
from bitcart import TRX
from decimal import Decimal

coin = TRX(xpub="yourprivatekey")
request_amount = Decimal(coin.balance()["confirmed"])
estimated_fee = Decimal(coin.server.get_default_fee(coin.server.payto(payout.destination, request_amount, unsigned=True))
request_amount -= estimated_fee
tx_hash = await coin.pay_to("address", request_amount)

https://github.com/bitcartcc/bitcart/blob/11e80ef0aec82a05ceaeca38649b184e46c354d8/daemons/trx.py#L269-L280


GC/QR code scan activity should have an action bar like all other activities

A small feature request for consistent user experience: if possible, the code scan activity should have an action bar like all other c:geo activities. In this case, the action bar should contain the home and help actions.

It's a third-party-app that we open, that's all. ;)

AFAIK c:geo just calls an external activity implementing a 'generic' QR-scanning intent. So we probably have no influence over this and there are actually different ones implementing the functionality.


Add Enroute (Issue #165)

Thank you @mattklein123 Here is the PR.

Thank you @mattklein123 Created PRs. Added the DCO sign-off in subsequent commit. Thanks,

Squashed all three commits to one, DCO Sign-off is now acceptable to the DCO bot. Thanks,


AVS was not able to validate the provided access token.

After several tries I finally received a refresh token for AVS. But when talking to Alexa I only receive the following error message in the log:
transiting to state: busy
{"error":{"code":"com.amazon.alexahttpproxy.exceptions.InvalidAccessTokenException","message":"AVS was not able to validate the provided access token."}}
Any idea what's wrong? I double checked every value provided to your bash scripts. All seems to be correct. This is my config:
{
			module: "MMM-awesome-alexa",
			position: "bottom_right",
			config: {
				wakeWord: "Alexa",
				clientId: "amzn1.application-oa2-client...bf",
				clientSecret: "83...64",
				deviceId: "MM1",
				refreshToken: "Atza|I......E",
				lite: false,
				isSpeechVisualizationEnabled: false
			}
		}

From what I am reading, it sounds like a Security Profile related issue:
https://forums.developer.amazon.com/questions/10848/invalidaccesstokenexceptionavs-was-not-able-to-val.html


_done callback consistent deadlock when accessing RunningCommand arg passed to callback

This consistently deadlocks:
from sh import sleep

def done(cmd, success, exit_code):
    print(cmd, success, exit_code)

sleep('1', _done=done)

This is possibly related to #413 and #518.  This is on version 1.14.1 and Python 3.7 (but I doubt that matters).
Now I suppose one might say "Well, don't do that with cmd and the done callback" ... However, if the argument is passed to the callback it should be safe to use, IMO.  And none of the test cases cover accessing done callback arg 0 at all.
The reason it deadlocks is because of a double wait on _wait_lock: _wait_lock is already held whenever self._process_just_ended() is called (either via self.is_alive() or self.wait()), self._process_just_ended() is what calls the done callback, and then the printing of cmd tries to coerce it to a string using its stdout value, which then also calls self.wait(), which tries to acquire _wait_lock again and deadlocks.
You can see this in the stack trace:
^CTraceback (most recent call last):
  File "y.py", line 6, in <module>
    sleep('1', _done=done)
  File ".../site-packages/sh.py", line 1520, in __call__
    return RunningCommand(cmd, call_args, stdin, stdout, stderr)
  File ".../site-packages/sh.py", line 784, in __init__
    self.wait()
  File ".../site-packages/sh.py", line 831, in wait
    exit_code = self.process.wait()
  File ".../site-packages/sh.py", line 2491, in wait
    self._process_just_ended()
  File ".../site-packages/sh.py", line 2442, in _process_just_ended
    done_callback(success, self.exit_code)
  File "y.py", line 4, in done
    print(cmd, success, exit_code)
  File ".../site-packages/sh.py", line 930, in __str__
    return self.__unicode__()
  File ".../site-packages/sh.py", line 937, in __unicode__
    if self.process and self.stdout:
  File ".../site-packages/sh.py", line 869, in stdout
    self.wait()
  File ".../site-packages/sh.py", line 831, in wait
    exit_code = self.process.wait()
  File ".../site-packages/sh.py", line 2457, in wait
    with self._wait_lock:
KeyboardInterrupt

I believe this can be fixed simply by changing _wait_lock to a threading.RLock() instead of threading.Lock().  (I tried it, and it seemed to work just fine.)
However, I do think a fresh look is needed at what _wait_lock is protecting.  The comments suggest it is only for self.exit_code race prevention, but the lock is being held for much more than that.  I think the acquisition of this lock can be more fine-grained: only when self.exit_code is being written, and since self.exit_code never changes once written you don't need to hold the lock while reading it once you know it's not None.
You can do something like this, I think:
def _do_stuff_when_exit_code_is_already_set():
    pass

if self.exit_code is not None:
    _do_stuff_when_exit_code_is_already_set()
    return

#  it appears that wait lock is None, but now we acquire the lock to be sure
while True:
    with self._wait_lock:
        if self.exit_code is not None:
            break
        # do stuff that will set exit_code
        break
_do_stuff_when_exit_code_is_already_set()

(Also, thanks for this library; I like the interface.)

This is great info @0xkag , thank you for doing the deep dive, I appreciate it. I will follow up on this 👍


devices.cmake: quiet script registration

@mithro it seems that cocoro tests were not run at all here and the CI is green

@kgugala I forced a kokoro-run and it CI went green. I'll proceed with merging.


config.json file missing

Can you tell me how to generate or create Config.json file, which is used within server.py script

Config.json file is missing...


test: trigger automatic training/deployment

/train

/train

/train

/train

/train

/train

/train

/train

/train

/train


ROSA notification for cases when non RH user accessess ETCD

In OHSS-33707, the SplunkNonSREAccessEtcdPods SOP was suggested. But the SOP does not point to a ROSA specific notification. A ROSA specific notification in this case important since the documentation and the Responsibility Matrix are not interchangeable between ROSA and OSD.
This PR adds a ROSA specific notification with the relevant documentation.

/approve

/lgtm


Do not disclose links between contracts and hosts

Currently everybody who knows the contract id can determine the host which holds the files (see below how). This information can be used against the renter and the host. Contract ID (actually, the whole contract behind this ID) is a part of transactions and can be linked with renter's siacoins which can be linked to the renter identity in some cases. Also the contract can be linked to the host which can be linked to the location of the data. In other words with some luck the identity of the renter can be linked to the location of his or her data.
Another problem is that now everybody knows how much money the host makes from its contracts. Many people (including me) do not like when other people look into their wallets. There is also a problem of reusing the same address multiple times, which is considered harmful.
Currently there are 3 ways to link a contract to its host.

Some RPCs take a contract id and return different errors depending of whether they have the contract with this ID or not. Fixed in PR 2304 (in review).

FileContract.ValidProofOutputs and FileContract.ValidProofOutputs.MissedProofOutputs have host unlockhash. A renter takes it directly from the host by making RPCSettings and uses it when it creates the file contract transaction. By the way, in addition to possibility of linking contracts to hosts this results in reusing the same unlockhash in multiple outputs which is considered harmful. Currently hosts return the same unlockhash every time. It can instead generate a new one for each FormContract request and the same one for all RPCSettings. Possible abuse: somebody can send tons of FormContract requests without accepting the contract. It can result in tons of unused addresses in the output of siac wallet addresses of the host. This can be mitigated by putting unused unlockhashes back to the pool and reusing them. Fixes required: on the host side only.

FileContract.UnlockHash is a hash of UnlockConditions involving the host PublicKey. The UnlockHash itself is not enough to infer the host (because it is a hash), but when a contract is revised (e.g. the renter uploads data), the public key of the host is disclosed as a part of FileContractRevision.UnlockConditions. Currently renters take host public key from the HostAnnouncement struct which is announced to the blockchain by hosts. I think that instead the public key can be received from the host when a contract is being formed. This requires changes on both renter and host sides and probably new RPC.

I agree that we should do what we can to make such information private, but keep in mind that Sia was never intended to be a privacy-first blockchain. If privacy features significantly degrade the performance of the network, or if they make it much more difficult to become a host or renter, then we may reject them or make them opt-in.
1 and 2 definitely seem doable. 3 is a little more complicated. The pubkey seen in the host announcement needs to be used to bootstrap any new pubkeys. I'll wait for @DavidVorick to weigh in on this one.

The pubkey seen in the host announcement needs to be used to bootstrap any new pubkeys.

A contract is not tied to the announcement on the blockchain level, if I understand correctly. So the host can make a new pubkey controlling only this particular contract and send a signature of this key to the renter (with crypto.WriteSignedObject). The renter can verify that the new pubkey belongs to the same host using the pubkey from the announcement, but the renter has no incentive to disclose this link to 3d parties.

Recommendation: tag as 'Feature Request'.

Recommendation: tag as 'Privacy'.

Labeling this as 'Protocol Change', as we could not complete this without changing the protocol.
At this point in Sia development, we don't have the resources or attention to manage protocol changes, though it's something we intend to do a lot more of later in 2018.


640 hotspots in one wallet with fake locations.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Hotspot b58 Addresses
Wallet:
13EZUDcWYQ9CfRmTrBE3tBH4sE1Td1tZrwsJbbQ89nsWjqVUKcg
Hotspots:
11ENjbdcjTVPjKuwQDtCZXss35iPhUFNXg1fqViHvPz95o8zfoc
112BPX8REZU4PE8u5yVeBivXVxQaDMm8jDGQLPfTfGnzgMr6myZH
11SZmFytyqgagaFRBN9Ux6NA8a66Cxb2g6U5pGNHBTNTGjMrwix
11AzqF9P7pTrZyh74epqqPCHxp1sKRwt3WAcZs8SEwDdrSKRRKi
11pMpAHZKvDWMYtbBLUE34s3GHMRhSUDG5zGkhFbRnx8NUtuqnG
1128zQ63jEdMLpJuKUvxUnuGoSpRakxeUaG7zWXb82RYwFR9sWbC
Discord Handle
No response
Reason(s)
Farm of Benidorm and Villajoyosa. Wallet with 640 hotspots with false locations and only communicate with each other. They are all the same Cal-Chip model and with a 1.2 dbi serial antenna and connected to the same Wallet. They have false locations in Benidorm and Villajoyosa that harm our correctly made facilities. It would be appreciated if you would review the case. He has been scamming the network for more than 9 months, stealing rewards. Thanks

Same as #2912, #2920, #2949 and #3115.


Define standard: predictions

We need to define an initial standard for predictions the project generates, that resolves:

required / optional attributes of a prediction, including data typing

temporal aspect: previously we've talked about converting the dates for weekly predictions from a 1-53 week identifier to an epoch timestamp (e.g. the first second of the week) to ensure that we build with the capability to handle more than one year

@bpben is this the right place to talk about outputting data on how a prediction is reached?
I think one fundamental aspect of generating predictions that cities would be willing to action is being able to explain how they were reached (e.g contributing factors and their relative weight). What are your thoughts on the best way to output this?
@j-t-t

Ahh, good point.  I think I'd like to standardize the pipeline first.  Then we can see how data is coming in and adjust accordingly.

I do want to take this up, will add to the map - should be part of revamping the model pipeline


Upload package dependencies

Hi!

Add the option CONAN_UPLOAD_DEPENDENCIES
Upload ALL dependencies when CONAN_UPLOAD_DEPENDENCIES == "all"
Upload only specific dependency when CONAN_UPLOAD_DEPENDENCIES == <package_ref>
It does not accept wildcard like "foo/*"
It raises an error when both "all" and <package_ref> are listed. XOR case.

fixes #237

Hi. The check if the dependency has been built is missing. So all dependencies will be uploaded. Is this intentional?

Hi. The check if the dependency has been built is missing. So all dependencies will be uploaded. Is this intentional?

No, thinking again you are right. Since #237 is about build policy missing, so only built package should be uploaded. I gonna update this. Thanks for reviewing.


chore(docs): update proving batch guide

What ❔
Some stuff in the guide was outdated while I was going through it
Why ❔
Up-to-date guides -> happy devs
Checklist

[x] PR title corresponds to the body of PR (we generate changelog entries from PRs).
[ ] Tests for the changes have been added / updated.
[ ] Documentation comments have been added / updated.
[ ] Code has been formatted via zk_supervisor fmt and zk_supervisor lint.

No longer relevant after https://github.com/matter-labs/zksync-era/pull/3003


Active controller badge on invalid node

In /api/clusters/local/stats endpoint activeControllers is an id of a node that is Active controller node. Now green badge is rendered on another node or not even shown sometimes.
Version: master commit de21721

Hi @iliax, can you assign it to me? I want to work on it.

@Ksj14-kumar sure, go ahead

@Ksj14-kumar any updates?

@Ksj14-kumar any updates?

@Haarolean, Can you unassign me this task, I can't  solve it. Sorry for that.

@Ksj14-kumar no worries


improvement: update FA deadline

Types of changes

[ ] Bugfix
[ ] New feature
[ ] Refactoring
[ ] Breaking change (any change that would cause existing functionality to not work as expected)
[ ] Documentation Update
[x] Other (please describe)

Description
Change PyCon Taiwan 2020 FA Deadline from 6/21 to 7/15
More Information
Screenshots

@Lee-W

Codecov Report

Merging #803 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #803   +/-   ##
=======================================
  Coverage   75.55%   75.55%
=======================================
  Files          70       70
  Lines        2684     2684
=======================================
  Hits         2028     2028
  Misses        656      656

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f0f3a9...4e0c2bd. Read the comment docs.


use a single search box for searching WIS Global Discovery Catalogue

use a single search box for searching WIS Global Discovery Catalogue

Addressed in PR#36,


PiHole on custom port

I saw you were troubleshooting a ticket using a custom port instead of port 80. I would like to do the same with my install of pihole. however once i change it on the lighttpd.conf file i loose the custom blocked webpage you setup. If i set it back to port 80, it works as expected.
Is there any additional settings i would need to modify to get the block page to recognize the custom port number being used?

When looking at Issue #7, I had added the code necessary for PHBP to work correctly with different ports. I eventually decided against releasing this, because Pi-hole will only support port 80 due to how the --address directive within dnsmasq works. (I.E: Blacklisted sites will always be redirected back to port 80)
If there's a use case scenario where having the port would make PHBP work correctly (on par with the default block page), and where Pi-hole still works completely as expected, I'd be more than happy to add in the tiny bit of code needed!

It's not critical to me, i have alot of different vm running (pihole being one of them) I've made it my practice to change all default ports to some obscure high numbered port (especially for those application i have access to remotely).
If pi-hole and the block page permitted a different port I would take advantage of that, but it seems like that's not going to be the case.

Ah, that's fair enough! Sorry I couldn't be of more help though.
If someone does discover how to make Pi-hole consistently work (including after a pihole -up update) on a non-standard port, feel free to reply to this ticket and I'll be more than happy to do what's needed to make PHBP work!

If someone does discover how to make Pi-hole consistently work (including after a pihole -up update) on a non-standard port
I managed to have the /admin/ work with https on a non-standard port that works even after an update. I will soon make a pull request on this. I take time because I am also working on creation of a pem certificate during installation or change of https admin port, where the created here pem is of a "very high quality".


[FLINK-14958][table]ProgramTargetDescriptor#jobID possibly can be of type JobID instead of String

What is the purpose of the change
ProgramTargetDescriptor#jobID possibly can be of type JobID instead of String
Brief change log
Replacing ProgramTargetDescriptor#jobID type String with type JobID.
Changing related Tests code.
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
The serializers: (don't know)
The runtime per-record code paths (performance sensitive): (don't know)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (don't know)
The S3 file system connector: (don't know)

Documentation

Does this pull request introduce a new feature? ( no)

LGTM. Merging when travis gives green. @AT-Fieldless please ping me if you notice travis passed.

LGTM. Merging when travis gives green. @AT-Fieldless please ping me if you notice travis passed.

Hi, @TisonKun the travis gives green, I think you can merge the branch

Thanks for your contribution @AT-Fieldless !


Change the MacOS authentication dialogue image in the 1.50 release notes

VSCode Version: 1.50
OS Version: 10.15.7

Steps to Reproduce:

Upgrade to VS Code 1.50 and read the release notes

Does this issue occur when all extensions are disabled?: Yes
A simple one, but I would recommend doing something with that "VSCode wants to use your keychain..." image in the 1.50 release notes. When I first saw it, because it's at 1:1 and has no other indications that it's an image -- and coupled with an actual version of the dialogue opening at the same time, I got confused and clicked on it. Silly thing I know, but it might be worth considering to put some kind of watermark or crop the image in some way for "critical" OS dialogue screenshots so that they aren't at least initially mistaken for real system dialogues.

Hey @mikehdt, this is certainly a reasonable request. Sorry I've slept on it, now that we are about to release 1.51, I don't plan to do this


locale trouble

Hi there,
I can't get locale to work, it is allways "en"
tried:
// app/routes/applicaton.js
import moment from 'moment';
export default Ember.Route.extend({
  beforeModel() {
    moment.locale('hr');
  }
});
also:
// app/routes/applicaton.js
export default Ember.Route.extend({
moment: Ember.inject.service(),
beforeModel() {
this.get('moment').changeLocale('hr');
}
});
in environment I have:
moment: {
outputFormat: 'L',
includeLocales: ['en', 'hr']
}

There is a good chance you have another addon, or your app itself, is importing momentjs.

@jasonmit i had "ember-cli-moment": "0.0.2", I removed it from "package.json" but still no change
If I do:
moment.locale("hr");
console.log(moment.locale()); //output is "en"

If I set locale with complete locale object then it works
moment.locale('hr', {months : ... etc})

@acerov every time this issue pops up it turns out it was another addon app.importing momentjs.  Please check your package.json for other addons that might be doing this and your own ember-cli-build.js file for an app.import on moment.

@jasonmit thank you for your time on this,
I double checked ember-cli-build.js there is no moment
My package.js dependencies is bellow (ember-cli-moment-shim is in):
"devDependencies": {
"broccoli-asset-rev": "^2.1.2",
"broccoli-manifest": "0.0.7",
"broccoli-merge-trees": "^0.2.3",
"broccoli-serviceworker": "0.0.5",
"ember-async-button": "^0.7.0",
"ember-bootstrap-datetimepicker": "1.0.2",
"ember-browserify": "^1.0.5",
"ember-cli": "1.13.8",
"ember-cli-app-version": "1.0.0",
"ember-cli-babel": "^5.1.3",
"ember-cli-chart": "2.0.5",
"ember-cli-content-security-policy": "0.4.0",
"ember-cli-dependency-checker": "^1.0.1",
"ember-cli-deploy": "^0.5.1",
"ember-cli-deploy-build": "0.1.0",
"ember-cli-deploy-chrome-app": "0.1.4",
"ember-cli-filter-by-query": "1.1.3",
"ember-cli-filter-component": "2.0.1",
"ember-cli-form-data": "0.1.1",
"ember-cli-full-calendar": "0.0.9",
"ember-cli-htmlbars": "0.7.9",
"ember-cli-htmlbars-inline-precompile": "^0.2.0",
"ember-cli-ic-ajax": "0.2.1",
"ember-cli-inject-live-reload": "^1.3.1",
"ember-cli-moment-shim": "0.7.1",
"ember-cli-notifications": "2.1.4",
"ember-cli-qunit": "^1.0.0",
"ember-cli-release": "0.2.3",
"ember-cli-simple-auth": "0.8.0",
"ember-cli-simple-auth-token": "^0.7.3",
"ember-cli-spinjs": "1.0.2",
"ember-cli-spinkit": "1.0.0",
"ember-cli-sri": "^1.0.3",
"ember-cli-uglify": "^1.2.0",
"ember-cli-uploader": "^0.3.11",
"ember-data": "1.13.15",
"ember-data-offline": "0.2.0",
"ember-disable-proxy-controllers": "^1.0.0",
"ember-export-application-global": "^1.0.3",
"ember-i18n": "4.1.2",
"ember-infinity": "0.2.0",
"ember-localforage-adapter": "2.2.0",
"ember-models-table": "1.4.1",
"ember-moment": "4.2.1",
"ember-power-select": "0.7.0-beta.6",
"ember-searchable-select": "0.6.3",
"ember-select-2": "1.3.0",
"ember-spinner-button": "0.0.10",
"ember-table": "0.9.2",
"handlebars": "^1.3.0",
"install": "^0.1.8",
"npm": "^3.3.6"
},

ember-cli-full-calendar is likely the problem.
https://github.com/icicletech/ember-cli-full-calendar/blob/97a63ec97cb21889d51b807f767d50780fd93e08/index.js

@stefanpenner do you see anything wrong ember-cli-moment-shim closing over app.import to warn if any other parts of the app attempt to import moment?  This keeps resurfacing and not sure how to prevent it.
If I were able to ensure the addon would be pushed to the furthest edge of the DAG then I guess that would also solve it, but would require buy-in for this to be supported in ember-cli.

@jasonmit :+1: I updated to "ember-cli-full-calendar": "0.0.17" and it works now.
Is that related to https://github.com/icicletech/ember-cli-full-calendar/commit/11475e7c4beec93958f8134416fd7c8f30bfc72e ?


Add getArticleById function

To leverage more example about real-world usecase on using clean arch to get article by id

[ ] Change variable inside BrowseProcessor to have a function with parameter (e.g: articleId)


Milestone 5: Full-Website

In this milestone:-

I add a navbar section
I implement React Router
navigation links for all 3 routes are displayed on each page.

Thank You, I applied your recommendation


How to train cross-encoder teacher models?

It seems that I cannot find the code to train the cross-encoder teacher models, such as
spanbert-base-cased-nq
spanbert-base-cased-sqdnq
spanbert-base-cased-squad

Can you tell me how to train these model If I change the train data?

Hi, we used this script to train the cross encoder models. We are planning to update the code with this file, soon. Thank you.


Investigate best path to store interface implementations

Currently we are storing interface implementations as comments on tables like this:
COMMENT ON VIEW {schema}.visitoractivity IS 'timeseries,funnel,cohort';
This is likely not the ideal mechanism to accomplish this table-to-interface mapping and we should give more thought to it.

What exactly are the goals of having this? Should be clear about what we are trying to accomplish.
Evaluate having this information stored within the schema as opposed to living outside the schema in code.
What's the best technical solution to accomplish the goals defined above?

Interfaces are a hard question that we're struggling with to evaluate dependencies. Storage of this information is the least of the concerns :) This is important, but it needs to be handled structurally as a part of dbt.


Why Mask2former can't resume checkpoint sucessfully again?

Run Bash
   CUDA_VISIBLE_DEVICES="0, 1" python train_net.py --config-file configs/cityscapes/semantic-segmentation/maskformer2_R50_bs16_90k.yaml --num-gpus 2 --dist-url auto --resume

Config
MODEL:
  BACKBONE:
      FREEZE_AT: 0
      NAME: "build_resnet_backbone"
  WEIGHTS: /nfs/jzj/Mask2Former/output/cityscapes_promote/model_0037999.pth

But I find that reload the checkpoint can't work sucessfully. The loss when reload the middle checkpoint will up than before.
eg. before, loss=0.5, resume, loss=0.8

@zhijiejia how you resolved the problem?


Consider using Diplomat

Hi there,
I'm from the team working on ICU4X. Building a Rust library with cross-language bindings was important to us, so we built a rool called Diplomat to automatically generate bindings and documentation and keep them up to date in all supported languages. You can take a look here:
https://github.com/rust-diplomat/diplomat
CC @Manishearth

I'm also happy to help folks understand the tool better to use in integration; the book does document a bunch of stuff but not everything

Thanks for pointing out your code. It does look potentially helpful. The link mentioned to "the book" is not right, so please fix that.
I briefly looked at the documentation. I didn't see any mention of handling "Result"/errors. Is that handled? Other than that, MathCAT's interface tries to use very simple types. But it does heavily rely on returning strings which raises memory handling issues for C users that aren't an issue for Python and JS users since they get hidden behind the current interfaces. Is that an issue for Diplomat? My C interface therefore is a bit different than my Python interface
I've been pretty happy with the pyo3 Python bindings library. Would diplomat be able to create something that is as simple to use?
FYI: the interface MathCAT wants to expose is in src/interface.rs. As hinted at above, it is exposed in slightly different ways in each of the current interfaces in other projects.

link fixed.
We do support result types, they turn into a union in C, a std::variant-wrapper in C++, and an exception in JS
we have a way to return strings that is generic over the requirements of the receiver language
note that we do not have a Python backend but would happily support work to add one if it was desired.

The C, Python, and Java interfaces are currently used by others, so they need to be supported. I also use WASM for a web demo and would like to build the demo on top of a JS interface instead of the current mess being used (web-sys is vast overkill).
Of course, just because I start using Diplomat for one or two languages, doesn't mean it has to work for others (such as Python).
The documentation on Writeable only covers someone passing in a "String", not Rust code returning Strings. That's where there is some ugliness right now dealing with strings in C since users need to call back to Rust to free it up.
It would be really helpful for me to understand how Diplomat would handle Strings/Result if you could show me the code for
pub fn set_mathml(mathml_str: String) -> Result<String> {...}

The current C code is
pub extern "C" fn SetMathML(mathml_str: *const c_char) -> *const c_char {
    return set_string_error(
        set_mathml(safe_string(mathml_str))
    );
}

The current interface returns an empty string to indicate an error and GetError() is called to get the error string. FreeMathCATString() needed to be called to free any string. All pretty ugly. It sounds like Diplomat will simplify this.
With pyo3, there is none of this mess and the calling code acts just as if it were calling a python function.
What does the Rust/Diplomat code look like for set_mathml and what would the calling C code look like?

Returning strings "just works" in backends that support returning allocated strings (i.e. C++ but not C).
https://github.com/rust-diplomat/diplomat/blob/main/example/src/fixed_decimal.rs#L23
        #[diplomat::rust_link(fixed_decimal::FixedDecimal::write_to, FnInStruct)]
        pub fn to_string(&self, to: &mut DiplomatWriteable) -> Result<(), ()> {

generates this C++:
inline diplomat::result<std::string, std::monostate> ICU4XFixedDecimal::to_string() const {

The documentation on Writeable only covers someone passing in a "String", not Rust code returning Strings. That's where there is some ugliness right now dealing with strings in C since users need to call back to Rust to free it up.

No, Writeable is about Rust code returning strings, the Writeable type is about passing in strings (that can then be sent to other languages)

It would be really helpful for me to understand how Diplomat would handle Strings/Result if you could show me the code for

In addition to what Shane said, under the hood that function would use a C API that returns a union, and accepts a writeable object that wraps a sink for writing to a string

So for your API I would write something like this:
#[diplomat::bridge]
mod ffi {
    use diplomat_runtime::DiplomatWriteable;
    use std::fmt::Write;

    #[diplomat::opaque]
    struct Thingy;

    impl Thingy {
        pub fn set_mathml(input: &str, out: &mut DiplomatWriteable) -> Result<(), ()> {
            out.write_str(input).map_err(|_| ())?; // just turn the input into output. you could do something more complex if you want
            Ok(()) // just return Ok
        }
    }
}

In the c2 backend (diplomat-tool c2 outputfolder/, "C2" is the new C backend, prefer this), this generates:
// diplomat_result_void_void.h
typedef struct diplomat_result_void_void {
  bool is_ok;
} diplomat_result_void_void;

// Thingy.h
// ...
diplomat_result_void_void Thingy_set_mathml(const char* input_data, size_t input_len, DiplomatWriteable* writeable);
// ...

DiplomatWriteable is a type that contains callbacks for writing to arbitrary sinks. A simple way of creating one is here:
https://github.com/rust-diplomat/diplomat/blob/54e85c813508acc1608153ffdff8c55e69a1af3a/example/c2/main.c#L16-L17
In C++ (diplomat-tool cpp2 outputfolder/) you get:
// Thingy.hpp (technically Thingy.d.hpp)
// ...
class Thingy {
public:

  inline static diplomat::result<std::string, std::monostate> set_mathml(std::string_view input);
// ...

so it returns a nice string, and accepts a string view.
We do not currently support free functions (we would like to, but nobody has needed it yet), so the stuff still lives on a type.

Thanks for the example, that helps me understand it a little better. Just to make sure I understand the C++ interface correctly:

The input string becomes a `const char*1 and a length
The result string is passed in as an arg of type DiplomatWriteable*
The return type is  diplomat_result_void_void

Presumably for MathCAT, "class Thingy" would be something like "class MathCAT" so that calls look like
char buffer[1000];
DiplomatWriteable result = diplomat_simple_writeable(buffer, 1000);
MathCAT_set_mathml(mathml, strlen(mathml), &result);

with maybe an if wrapped around it to test the return. Is that correct?
I suspect it would be better not to have a fixed size buffer as the input string size is only roughly correlated with the output string size. I didn't see any examples of that in your examples dir. How is that done? If it is really ugly, I'm sure a very large buffer would suffice as no one would want to listen to a math expression that is over 200(?) words long.
Also, how does one get at the error message? The "result" type appears to boil down to be a bool. But errors in Rust have a string/error message associated with them.
At least one of the users needs a C interface -- they are using Delphi as their programming language and make use of the C interface DLL.  What does that interface look like and what would be some sample calling code?

Just to make sure I understand the C++ interface correctly:

C, not C++. C++ is nicer; it takes a std::string_view and returns a result wrapper around a std::string. I showed it above.

I suspect it would be better not to have a fixed size buffer as the input string size is only roughly correlated with the output string size. I didn't see any examples of that in your examples dir. How is that done?

The API we provide by default is diplomat_buffer_writeable_create(). However, you can hook up your own Writeable type, e.g. in C++ we have hooked it up to write to a std::string.

Also, how does one get at the error message? The "result" type appears to boil down to be a bool. But errors in Rust have a string/error message associated with them.

Just use an error type in the Result and give it whatever methods you need.
A real world example is ICU4X's live usage of Diplomat (https://github.com/unicode-org/icu4x/tree/main/ffi/capi), though we do not yet enable the C2 and CPP2 backends[^1].
In ICU4X we return a Result<(), ICU4XError>
where ICU4XError is a giant enum
Over C that turns into diplomat_result_void_ICU4XError which contains a union [^2].
If you end up returning a Result<T, U> you get an enum like diplomat_result_box_ICU4XFixedDecimalFormatter_ICU4XError which has a proper union inside it

At least one of the users needs a C interface -- they are using Delphi as their programming language and make use of the C interface DLL. What does that interface look like and what would be some sample calling code?

You've been looking at the C interface. The C++ interface is nicer since it has generics and stuff, but the stuff you've been asking about here is the C interface.
[^1]: they're slightly different API-wise from C/CPP and we don't want to release ICU4X using them until we're ready with all the new features we want
[^2]: Yes, that union should have a second empty variant; this is a bug in the C backend; C2 doesn't have this problem.

I received some more feedback and I need both the C and C++ interfaces, plus I'd really like to have a JS interface. I think I'll stick with the python interface I have for the moment.
I'm definitely interested in using Diplomat. I know it is asking a lot, but I suspect you could add the interface in less than 10% of the time it would take me. Is that something you would be willing to do? The functions that need an interface are in src/interface.rs and you can see the current C interface by looking at https://github.com/NSoiffer/MathCATForC/blob/main/src/lib.rs. In summary, the number of functions is not that large:
SetRulesDir
SetMathML
GetVersion
GetSpokenText
SetPreference
GetPreference
GetBraille
DoNavigateKeyPress
DoNavigateCommand
GetNavigationMathMLId
GetNavigationMathML

and one function that returns a struct
pub struct NavigationLocation {
    id: *const c_char,
    offset: i32,
}
pub extern "C" fn GetNavigationLocation() -> NavigationLocation

If doing all of them is too big an ask, how about showing the C/C++/JS interfaces for GetPreference and GetNavigationLocation so I see an example of how they are done for different args/return values?
I created a diplomat branch to work in if you are willing to help me use diplomat.
Thanks for any help you can give.

I need both the C and C++ interfaces, plus I'd really like to have a JS interface

Yep, we have all three. The C and C++ ones have been recently redone to be better, the JS one I'm planning on redoing but you can still use the old one.

Is that something you would be willing to do?

This does seem like a relatively small surface area, I can try ... no promises, and this would be low priority for me, and I might just do it partially. I'll keep you posted.

I appreciate whatever you can do. Maybe hold off on the JS version if you are going to redo it. Up to you.

This does seem like a relatively small surface area, I can try ... no promises, and this would be low priority for me, and I might just do it partially. I'll keep you posted.

@Manishearth: any chance this might happen soon?

Pretty busy right now, can't promise anything.
@sffc might be interested in trying?

I have someone who has maybe a week's time, but no Rust experience. I could possibly get him to try it, but I'm worried that he'll spend most of his time trying to understand Rust and would be better off doing a different project. Any idea whether after some initial set up, Rust experience is needed?

Diplomat's API definitions are also a subset of Rust, so while I don't think much Rust experience is required, it may be annoying for them to have to pick it up this way.

Thanks. I won't suggest this to him.