[$1000] Back ticks aren't centered vertically

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Send few messages with back ticks

Expected Result:
Back ticks should be centered vertically
Actual Result:
Back ticks aren't centered vertically
Workaround:
unknown
Platform:

Where is this issue occurring?

iOS

Version Number: 1.1.42-2
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:
Issue reported by: @AndrewGable
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1646420349264159
Upwork: https://www.upwork.com/jobs/~01be27e71047382c31
View all open jobs on GitHub

Triggered auto assignment to @stitesExpensify (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

Triggered auto assignment to @mallenexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel (Exported)

Current assignee @stitesExpensify is eligible for the Exported assigner, not assigning anyone new.

Posted https://www.upwork.com/jobs/~012344f1febdbac925

Proposal
in src/styles/styles.js
        code: {
            ...baseCodeTagStyles,
            ...codeStyles.codeTextStyle,
            paddingLeft: 5,
            paddingRight: 5,
            fontFamily: fontFamily.MONOSPACE,
            fontSize: 13,
+           paddingTop:1,

        },

        img: {
            borderColor: themeColors.border,
            borderRadius: variables.componentBorderRadiusNormal,
            borderWidth: 1,
        },

@Phantom-2 , apologies for the delay, @Santhosh-Sellavel can you please review the proposal above?

Sorry I didn’t leave a comment earlier.
This would make some unintended style break in other platforms.

Also, I tried to reproduce this on my end today, it's not occurring for me.
Can you check on the latest staging or production build, is the issue still occurring for you?
@AndrewGable
If reproducible, share me device modal & iOS version, thanks!
cc: @mallenexpensify @stitesExpensify

@mvtglobally - Can you have some testers try to reproduce? If if it's not reproducible, agree let's close.

@mvtglobally was this reproducible?

@mvtglobally  Any update on this?

Pinged @mvtglobally in NewDot to take a look

Looks like I was unsubscribed from this issue alerts. I did not mean this.
Trying this right now, I am not able to use back-ticks on the multiline or paragraphs. If you use straight text, it is looking aligned

Can you test on iOS?

@AndrewGable Same on iOS. Are you able to repro?

Yes, what version are you on?

bug
version

Very interesting @AndrewGable. Can you give me exact text copy you are using to try maybe? https://user-images.githubusercontent.com/43995119/164292982-aff1392b-c20d-4fbd-b375-9edc3aa36190.MOV

I am on iPhone 13 Pro 15.4.1 - Using the same copy it's still misaligned

Asking team to try different devices/OS if anyone can repro

@AndrewGable @mvtglobally
I was able to reproduce this one finally.
While changing system font size the issue occurs
Check the video in the thread here

Ohhh yes - I do have a smaller font size set on my iOS device.

@AndrewGable This could break a lot of other UI in the app.
Ex:

Should look for any related issues, combine them, and handle them. Or maybe we can perform an audit to find issues in these cases.
@AndrewGable

I think we should bring this up in the open source room and decide if it's something we want to full tackle or not.

Started a thread here

Thank you very much @Santhosh-Sellavel!

@Santhosh-Sellavel any update here?

Can you put this on hold, this related to #7541

Put on hold, added Planning label and removed Help Wanted label.
@stitesExpensify , chime in if you disagree

Not overdue, on hold.

Bumped to Monthly since on hold

On hold, not overdue

hold

Still on hold. Posted here for an update

On hold.

Added #7541 to hold in title, checked on it too, PR hasn't been updated for it in two weeks
https://github.com/Expensify/App/issues/7541

@sonialiap Reassigning as I'm heading OOO for a month

on hold

This one can come off hold as #7541 is closed now. The issue is still reproducible, let's open this for proposals.

Off hold!

Waiting for proposals

Let’s make sure to update labels when we take issues off hold. Minimally, we should remove planning and re-add Daily and Help wanted

Hi, I'm Fábio from Callstack and I would like to work in this issue.

📣 @fabioh8010 You have been assigned to this job by @mountiny!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖

The original Upwork post got closed, here's the new one https://www.upwork.com/jobs/~01be27e71047382c31
cc @fabioh8010

PURPOSAL
I will create a view with "100% height" and and give it "justifyContent: 'center' and alignItems: 'center'" and wrap the button in that view to make the back button vertical center.
 button: { height: '100%', width: 50, justifyContent: 'center', alignItems:'center',}

Upwork Proposal
Tthe button can be vertically aligned by passing styling props to the Button components if they are supported, otherwise we can add a parent component as a wrapper, use the flex width and height and adjust the placement of button using flex properties.

@salmanafzal123 @Aaqib925 Thank you so much for your proposals, sorry for the inconvenience, this issue does not have Help Wanted label anymore.
We have almost 20 very old important bugs to solve asap, would you want to check those out? https://expensify.slack.com/archives/C01GTK53T8Q/p1676373347250229

@mountiny I don't have gSuite or guest account to access, can you please assign me one?

@mountiny Please assign me a guest account as well. I am also willing to work in resolving pending bugs

@salmanafzal123 @Aaqib925 Thank you so much for your proposals, sorry for the inconvenience, this issue does not have Help Wanted label anymore.
We have almost 20 very old important bugs to solve asap, would you want to check those out? https://expensify.slack.com/archives/C01GTK53T8Q/p1676373347250229

Can you  please assign me a GSuite account to access.

@Aaqib925 @haris-aqeel @salmanafzal123 Please read over this document carefully and you will find information on how to get access to the Slack channel too https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#slack-channels
Thank you!

Daily update: First proposal is ready and it's being discussed internally.

Proposal
Please re-state the problem that we are trying to solve in this issue.
Inline code blocks are becoming misaligned, cut and not properly scaled in mobile applications, specially when changing the system's font size.

Screenshots - Android
Normal Font

Large Font

Screenshots - iOS
Normal Font

Large Font

What is the root cause of that problem?
The problem is that the font size used in inline code blocks is fixed and not scalable like the other texts. This situation is leading to the problems described above. Also, there are some stylings that are contributing to this misaligning as well.
What changes do you think we should make in order to solve the problem?
I'm going to first change the inline code block's font size to be scalable using getValueUsingPixelRatio() method, and then adjust the stylings to make the blocks more centered vertically.

Screenshots - Android
Normal Font

Large Font

Screenshots - iOS
Normal Font

Large Font

@fabioh8010
Problem statement:
Texts within backticks are not centered properly while using large or smaller font sizes.
Expected alignment for all font sizes

Some screenshots feel off to me!

Currently in the project we have a CodeRenderer component that transforms the HTML <code> tags into a component, and this component will render a InlineCodeBlock component.
For web / desktop is pretty straightforward, we just render a Text component with all the necessary styles, like borders, paddings, colors, etc.
For mobile the same approach is not possible, because some stylings like borders doesn't work when applied to nested Text components like that ones. It also doesn't work correctly when the text breaks like the web does.
So, for mobile we render a custom component called WrappedText. This component will split the <code> text into words/pieces and, for each word/piece, display a View with a Text inside. The purpose of the View is to have the border and other styles that can't be applied to the nested Text, and the Text is for the text-related styles only.
The problem is actually that: render a View inside a Text. This just don't work correctly, the View always become misaligned relative to the outer Text.
I made a example in a separate project so you can see the issue.

In the first example, we have a Text with a nested Text. It works correctly.
<Text style={styles.text}>
  Text with <Text style={styles.nestedText}>nested text</Text>.
</Text>

In the second example, we have a Text with a nested View, which also have a nested Text. This configuration misaligns the entire View and it's quite worse in Android.
<Text style={styles.text}>
  Text with{' '}
  <View>
    <Text style={styles.nestedText}>nested view and text</Text>
  </View>
  .
</Text>

In the third example I applied stylings to the View in order to simulate Expensify's inline code block UI, and in the fourth one I used the same renderer you use with react-native-render-html to show the bug.
Actually this is a known issue in the react-native community: https://github.com/facebook/react-native/issues/31955
So, for now we can try to reduce the misalignment with workarounds (my proposal improve the current workarounds in the project and also makes the inline code text scalable) but it won't be perfect.

Thanks, @fabioh8010. Any thoughts @stitesExpensify?

Chatting here https://expensify.slack.com/archives/C01GTK53T8Q/p1676991093760849

As discussed in Slack, we'll proceed with this workaround as a temporary solution, and meanwhile I'm going to investigate and work in a proper fix to this react-native issue so both us and the community can benefit from it 🚀
I'll do the PR shortly.

@sonialiap, @fabioh8010, @stitesExpensify, @Santhosh-Sellavel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@sonialiap, @fabioh8010, @stitesExpensify, @Santhosh-Sellavel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@sonialiap, @fabioh8010, @stitesExpensify, @Santhosh-Sellavel Huh... This is 4 days overdue. Who can take care of this?

I'm still working on the PR.

Just FYI, I'll be OOO Mar 17-25

@sonialiap, @fabioh8010, @stitesExpensify, @Santhosh-Sellavel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@sonialiap, @fabioh8010, @stitesExpensify, @Santhosh-Sellavel Still overdue 6 days?! Let's take care of this!

I'm waiting for response in the PR, will ask again.

@fabioh8010 Should we put this on HOLD for https://github.com/Expensify/react-native/pull/43 ?

@sonialiap, @fabioh8010, @stitesExpensify, @Santhosh-Sellavel Huh... This is 4 days overdue. Who can take care of this?

@sonialiap, @fabioh8010, @stitesExpensify, @Santhosh-Sellavel Huh... This is 4 days overdue. Who can take care of this?

on hold

@sonialiap, @fabioh8010, @stitesExpensify, @Santhosh-Sellavel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@sonialiap, @fabioh8010, @stitesExpensify, @Santhosh-Sellavel Eep! 4 days overdue now. Issues have feelings too...

@sonialiap, @fabioh8010, @stitesExpensify, @Santhosh-Sellavel 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!

@stitesExpensify Add Hold to title and makes this weekly or monthly

https://github.com/Expensify/react-native/pull/43 is still in process so this one's on hold

@roryabraham https://github.com/Expensify/react-native/pull/43 was closed, did the solution get moved to https://github.com/facebook/react-native/pull/37397? I'm wondering if this issue should still be on hold for one of those PRs

@sonialiap @roryabraham Yes, solution was moved to https://github.com/facebook/react-native/pull/37397. Once that PR get approved and merged we will be able to fix this one. We can take either one of the following paths:

Wait for https://github.com/facebook/react-native/pull/37397 to fix this issue.
Proceed with my PR https://github.com/Expensify/App/pull/15367 which is on HOLD for now. My PR is just a temporary workaround and the fix is not visually perfect, so it may not be the best approach to follow.
Based on this discussion on Slack, simplify the code block styling in a way that won't cause the issue anymore, but it's a design change and needs approval from the design team.
Explore other solutions on native side like the one I suggested, that I ended up stopping the investigation because https://github.com/Expensify/react-native/pull/43 was being worked on.

I think we should still just wait for https://github.com/facebook/react-native/pull/37397. This isn't that big of a deal.

cc @shawnborton in case you feel differently and we should really change this soon. In which case 3 from this comment would be a potential good solution.

I am cool with waiting.

No update on https://github.com/facebook/react-native/pull/37397

No update

No update. I think we should just close this for now. Thoughts?

👋 Can we put the repo/issue we're holding on in the issue title please? Coming here from a dupe and it's easier to follow the dependencies when that's present in the title. Thanks!

@stitesExpensify do we have any way to push the upstream PR forward? If not, is it worth keeping our issue open when the /react-native hasn't been commented on since June?

do we have any way to push the upstream PR forward?

Not really unless we want to divert expert contributor resources to this (which we shouldn't do IMO). I think we should just close this for now and come back to it later.

Looks like we opened a similar issue with this one here: https://github.com/Expensify/App/issues/49935
Do we have plan to fix it?

Not that I know of


Dash Monthly Fund Report

Issue for app: #269
App pull request

[x] This is a new app
[ ] I am improving an existing app (redesigns/code "makeovers")

About

Playground deployment URL (new version): https://dash-playground.plotly.host/dash-monthly-fund-report
Current gallery app URL: (delete this line if inapplicable)

Workflow

[ ] I have created a branch in the appropriate monorepo, and the
elements necessary for successful deployment are in place.
[ ] If the app is a redesigned and/or restyled version of an
existing gallery app, I've summarized the changes requested in the
appropriate Streambed issue and confirm that they have been applied.
[ ] If the app is on the Dash Gallery portal, I have added a link to
the GitHub repository for the source code in the portal description.
[ ] If the app is a reimplementation of a Python gallery app for the
DashR gallery, the app in this PR mimics, as closely as possible,
the style and functionality of the existing app.=
[ ] I have removed all Google Analytics code from the app's
assets/ folder.

The pre-review review
I have addressed all of the following questions:

[ ] Does everything in my code serve some purpose? (I have removed
any dead and/or irrelevant code.)
[ ] Does everything in my code have a clear purpose? (My code is
readable and, where it isn't, it has been commented appropriately.)]
[ ] Am I reinventing the wheel? (I have used appropriate packages to
lessen the volume of code that needs to be maintained.)

v

v

As per https://github.com/plotly/streambed/issues/13854, I am closing this as the new deployment process is in place.
If you need any changes from this branch, please recreate your changes against master and create a new pull request. Let me know if you need help and I am happy to jump in.


Add Elastic (the creators of Elasticsearch) to the adopters list

Codecov Report

Merging #1386 into master will decrease coverage by 0.2%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1386      +/-   ##
==========================================
- Coverage   85.76%   85.55%   -0.21%
==========================================
  Files          73       73
  Lines        2486     2486
  Branches      105      105
==========================================
- Hits         2132     2127       -5
- Misses        354      359       +5

Impacted Files
Coverage Δ

.../core/shared/src/main/scala/io/circe/Decoder.scala
84.98% <0%> (-0.81%)
:arrow_down:

...les/core/shared/src/main/scala/io/circe/Json.scala
76.96% <0%> (-0.61%)
:arrow_down:

...rc/main/scala/io/circe/numbers/BiggerDecimal.scala
84.79% <0%> (-0.59%)
:arrow_down:

...re/shared/src/main/scala/io/circe/JsonNumber.scala
90.36% <0%> (ø)
:arrow_up:

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 8674a63...fe8aed5. Read the comment docs.

Nice, thanks much, @pfcoperez!


Color Props should be added to documentation aswell

Can update the Docs with color props.
< Icon name="uil:github" size="50" color="green" />

No sure to understand, any extra attribute you give to Icon it forwarded to the underlying component.

< Icon name="uil:github" size="50" fill="green" />

I think I understand the meaning of the question. Naturally you would expect something like this to work because it's how you fill a SVG:
< Icon name="uil:github" size="50" fill="green" />

But it does not. The correct way to do it is pass the color attribute, which may not be obvious to everyone, hence the issue.


Changes needed in README.md

In the last line of the current README.md, the url is not properly linked in the markdown. Also there is some more revamping can be done in the README.md file of the current repository.

I would love to take up this issue.

Please find the related PR fixing this issue #31 here
Awaited to actively contribute towards AppSmith! Thank you!

@sohamsshah the URL is linked correctly because we use gitbook for our documentation so the URL is using their markdown for embedding
https://docs.appsmith.com/
Please discuss the issue with a maintainer next time :)


Whitelist and Blacklist support

Decided to implement this as class filter support because that avoids the ambiguity problem between whitelists and blacklists.  Instead, the user just specifies a regular expression that indicates which classes they want and do not want directly.
I also made the restriction that only one class filter can be specified.  Again, this eliminates ambiguity.
Database schema needs to be updated, see #18.
It's easier for everybody this way.

Make sure to specify a --classfilter or else you will get an obscene amount of logging output.


Cannot run mms_infer.py for transcription

❓ Questions and Help
Hello MMS,
When run mms_infer.py, got issue like that:
(base) zhang@local-gpu:~/fairseq$ python examples/mms/asr/infer/mms_infer.py --model ../mms1b_fl102.pt --lang "cmn-script_simplified" --audio ../17_IOS33_000.wav
">>>preparing tmp manifest dir ...
">>>loading model & running inference ...
Traceback (most recent call last):
File "/home/suzha/miniconda3/lib/python3.9/pathlib.py", line 1323, in mkdir
self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/checkpoint/zhang/INFER/None'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/suzha/miniconda3/lib/python3.9/pathlib.py", line 1323, in mkdir
self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/checkpoint/zhang/INFER'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/suzha/miniconda3/lib/python3.9/pathlib.py", line 1323, in mkdir
self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/checkpoint/zhang'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/zhang/fairseq/examples/speech_recognition/new/infer.py", line 499, in
cli_main()
File "/home/zhang/fairseq/examples/speech_recognition/new/infer.py", line 495, in cli_main
hydra_main()  # pylint: disable=no-value-for-parameter
File "/home/suzha/miniconda3/lib/python3.9/site-packages/hydra/main.py", line 32, in decorated_main
_run_hydra(
File "/home/suzha/miniconda3/lib/python3.9/site-packages/hydra/_internal/utils.py", line 354, in _run_hydra
run_and_report(
File "/home/suzha/miniconda3/lib/python3.9/site-packages/hydra/_internal/utils.py", line 201, in run_and_report
raise ex
File "/home/suzha/miniconda3/lib/python3.9/site-packages/hydra/_internal/utils.py", line 198, in run_and_report
return func()
File "/home/suzha/miniconda3/lib/python3.9/site-packages/hydra/_internal/utils.py", line 355, in
lambda: hydra.multirun(
File "/home/suzha/miniconda3/lib/python3.9/site-packages/hydra/_internal/hydra.py", line 136, in multirun
return sweeper.sweep(arguments=task_overrides)
File "/home/suzha/miniconda3/lib/python3.9/site-packages/hydra/_internal/core_plugins/basic_sweeper.py", line 140, in sweep
sweep_dir.mkdir(parents=True, exist_ok=True)
File "/home/suzha/miniconda3/lib/python3.9/pathlib.py", line 1327, in mkdir
self.parent.mkdir(parents=True, exist_ok=True)
File "/home/suzha/miniconda3/lib/python3.9/pathlib.py", line 1327, in mkdir
self.parent.mkdir(parents=True, exist_ok=True)
File "/home/suzha/miniconda3/lib/python3.9/pathlib.py", line 1327, in mkdir
self.parent.mkdir(parents=True, exist_ok=True)
File "/home/suzha/miniconda3/lib/python3.9/pathlib.py", line 1323, in mkdir
self._accessor.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: '/checkpoint'
Traceback (most recent call last):
File "/home/zhang/fairseq/examples/mms/asr/infer/mms_infer.py", line 63, in
process(args)
File "/home/zhang/fairseq/examples/mms/asr/infer/mms_infer.py", line 53, in process
with open(tmpdir/"hypo.word") as fr:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpnf499w7t/hypo.word'
What happened ? Who can tell me how to do next ?

hello @zhhl9101 ,
check this issue: https://github.com/facebookresearch/fairseq/issues/5117. It was already addressed here.

Add open(tmpdir/"hypo.word", 'w').close() before the line 48 in "fairseq\examples\mms\asr\infer\mms_infer.py"

Sorry to bother you here. I am unable to run mms asr transcribe . I am using python3.11 and facing a range of issues from hypo.word not found, AttributeError: 'PosixPath' object has no attribute 'find' and what not.
Going through the issues, there is no landing solutions except lot of comments..
https://github.com/facebookresearch/fairseq/issues/5284 (already tried that solution and lead to my error posted below)
https://github.com/facebookresearch/fairseq/issues/5117 (has no solution)
There are just way too many threads relating to mms asr transcribe issues but no working solutions posted, if there is one set of installation instructions that actually work and are documented somewhere that be great.
Here is my error:

os.environ["TMPDIR"] ='/Users/spanta/Downloads/fairseq-main/temp_dir'

os.environ["PYTHONPATH"] = "."

os.environ["PREFIX"] = "INFER"

os.environ["HYDRA_FULL_ERROR"] = "1"

os.environ["USER"] = "micro"

os.system('python3.11 examples/mms/asr/infer/mms_infer.py --model "/Users/spanta/Downloads/fairseq/models_new/mms1b_fl102.pt" --lang "tel" --audio "/Users/spanta/Documents/test_wav/1.wav"')

preparing tmp manifest dir ...

loading model & running inference ...

/Users/spanta/Downloads/fairseq-main/examples/speech_recognition/new/infer.py:440: UserWarning:
The version_base parameter is not specified.
Please specify a compatability version level, or None.
Will assume defaults for version 1.1
@hydra.main(config_path=config_path, config_name="infer")
Traceback (most recent call last):
File "/Users/spanta/Downloads/fairseq-main/examples/speech_recognition/new/infer.py", line 499, in
cli_main()

File "/Users/spanta/Downloads/fairseq-main/examples/speech_recognition/new/infer.py", line 495, in cli_main
hydra_main()  # pylint: disable=no-value-for-parameter

^^^^^^^^^^^^

File "/opt/homebrew/lib/python3.11/site-packages/hydra/main.py", line 94, in decorated_main
_run_hydra(

File "/opt/homebrew/lib/python3.11/site-packages/hydra/_internal/utils.py", line 355, in _run_hydra
hydra = run_and_report(

        ^^^^^^^^^^^^^^^

File "/opt/homebrew/lib/python3.11/site-packages/hydra/_internal/utils.py", line 223, in run_and_report
raise ex

File "/opt/homebrew/lib/python3.11/site-packages/hydra/_internal/utils.py", line 220, in run_and_report
return func()

       ^^^^^^

File "/opt/homebrew/lib/python3.11/site-packages/hydra/_internal/utils.py", line 356, in
lambda: Hydra.create_main_hydra2(

        ^^^^^^^^^^^^^^^^^^^^^^^^^

File "/opt/homebrew/lib/python3.11/site-packages/hydra/_internal/hydra.py", line 61, in create_main_hydra2
config_loader: ConfigLoader = ConfigLoaderImpl(

                              ^^^^^^^^^^^^^^^^^

File "/opt/homebrew/lib/python3.11/site-packages/hydra/_internal/config_loader_impl.py", line 48, in init
self.repository = ConfigRepository(config_search_path=config_search_path)

                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/opt/homebrew/lib/python3.11/site-packages/hydra/_internal/config_repository.py", line 65, in init
self.initialize_sources(config_search_path)

File "/opt/homebrew/lib/python3.11/site-packages/hydra/_internal/config_repository.py", line 72, in initialize_sources
scheme = self._get_scheme(search_path.path)

         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/opt/homebrew/lib/python3.11/site-packages/hydra/_internal/config_repository.py", line 143, in _get_scheme
idx = path.find("://")

      ^^^^^^^^^

AttributeError: 'PosixPath' object has no attribute 'find'
0


[ACCSEC-19182] Proguard configuration

Jira Ticket

ACCSEC-19182

Description

Add annotation for proguard configuration in sample app.
Show challenge details date in a new line
SDK can be obfuscated, it won't need a proguard configuration

Testing

[ ] Added unit tests
[x] Ran unit tests successfully
[ ] Added documentation for public APIs and/or Wiki

          1 Warning

:warning:
The Pull Request summary does not contain the commit message convention

  Generated by :no_entry_sign: Danger


Sofa\Eloquence\Contracts\Metable not used?

Hey @jarektkaczyk it seems this contract is not used at all. Why is this? Is this correct?
Sofa\Eloquence\Contracts\Metable

Hey Lucas, can't check now, but I guess I just leaned towards simplicity
thus the interface that simply supported a trait might not be in use
anymore.
Jarek Tkaczyk
softonsofa :: development with pleasure
On Nov 2, 2016 01:54, "Lukas Oppermann"<EMAIL_ADDRESS>wrote:
Hey @jarektkaczyk https://github.com/jarektkaczyk it seems this contract
is not used at all. Why is this? Is this correct?
Sofa\Eloquence\Contracts\Metable
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jarektkaczyk/eloquence/issues/133, or mute the thread
https://github.com/notifications/unsubscribe-auth/AGm5src6GZd2fX0Vh0K4WLQK4o59GWJqks5q53y9gaJpZM4KmYUp
.


Document layer.clone()

Coverage decreased (-2.7%) to 79.962% when pulling 83f3465f23aac0f9baf93878df41e642379b3bc7 on x/layer-doc into d47704a72c87b5a64540aa01b8120f24fee3e5b9 on master.


How to get power status of light bulb, Py noob

Hello I would like to know how make a script that checks status of lights before switching strate.
Looking at how the code is made it should be possible but i cannot figure it out as i'm still learning python
DPS_2_STATE = does not end at 24  in this file
my output from print('\nCurrent Status of Bulb: %r' % data) is Current Status of Bulb: {'dps': {'20': True, '21': 'white', '22': 1000, '23': 1000, '24': '000003e803e8', '25': '000e0d0000000000000000c80000', '26': 0}}
Is that why I cant see the power state ?

It looks like you have an RGB light bulb you are wanting to control?  These data points match what is expected for a bulb: https://github.com/jasonacox/tinytuya#version-33---light-type-rgb
Here is an example that gets the status of the light before turning it on and off.
import tinytuya
import time

# Connect to Tuya BulbDevice
print('\nConnecting to Tuya Bulb')
d = tinytuya.BulbDevice(DEVICEID, DEVICEIP, DEVICEKEY)
d.set_version(3.3)

# Show status of device
data = d.status()
print('\nCurrent Status of Bulb: %r' % data)

# Check to see if the bulb is on and get state of device
data = d.state()
print('\nStatus of Bulb: %r and the Bulb is: ' % data)
if (data['is_on']==True):
    print('ON')
else:
    print('OFF')

# Power Control Test
print('\nPower Control Test')
print('    Turn off lamp')
d.turn_off()
time.sleep(2)
print('    Turn on lamp')
d.turn_on()

Also, you may want to look at this example code for RGB lights:  https://github.com/jasonacox/tinytuya/blob/master/examples/bulb.py#L1-L118

It looks like you have an RGB light bulb you are wanting to control?  These data points match what is expected for a bulb: https://github.com/jasonacox/tinytuya#version-33---light-type-rgb
Here is an example that gets the status of the light before turning it on and off.
import tinytuya
import time

# Connect to Tuya BulbDevice
print('\nConnecting to Tuya Bulb')
d = tinytuya.BulbDevice(DEVICEID, DEVICEIP, DEVICEKEY)
d.set_version(3.3)

# Show status of device
data = d.status()
print('\nCurrent Status of Bulb: %r' % data)

# Check to see if the bulb is on and get state of device
data = d.state()
print('\nStatus of Bulb: %r and the Bulb is: ' % data)
if (data['is_on']==True):
    print('ON')
else:
    print('OFF')

# Power Control Test
print('\nPower Control Test')
print('    Turn off lamp')
d.turn_off()
time.sleep(2)
print('    Turn on lamp')
d.turn_on()

Also, you may want to look at this example code for RGB lights:  https://github.com/jasonacox/tinytuya/blob/master/examples/bulb.py#L1-L118

Thanks for the reply but i get Undefined name 'DEVICEID'. as i just pasted that code snippet into my IDE and so is it possible to refer to devid and ip and key just by name that devices.json file contains.
Also how do i create code that controls a group of bulbs at same time by name reffrence?

Thanks for the reply but i get Undefined name 'DEVICEID'. as i just pasted that code snippet into my IDE and so is it possible to refer to devid and ip and key just by name that devices.json file contains.
Also how do i create code that controls a group of bulbs at same time by name reffrence?

I got it working using this
if(data['dps']['20'] == True):
    print("its on Turning off")
    d.turn_off()
elif(data['dps']['20'] == False):
    print("its off Turing on")
    d.turn_on()

Inside the example bulb.py file  with all lines below 44 commented out

I got it working using this
if(data['dps']['20'] == True):
    print("its on Turning off")
    d.turn_off()
elif(data['dps']['20'] == False):
    print("its off Turing on")
    d.turn_on()

Inside the example bulb.py file  with all lines below 44 commented out

Yes, you will need to replace those DEVICE placeholders with the actual values or prefix the code with the device details setting the variables like this:
DEVICEID = "01234567891234567890"
DEVICEIP = "<IP_ADDRESS>"
DEVICEKEY = "0123456789abcdef"

You can indeed pull this data from the generated devices.json for DEVICEID and DEVICEKEY.  Set DEVICEIP = "<IP_ADDRESS>" to have tinytuya scan for the device (warning: autoIP lookup requires scanning the network and is slow and can timeout).
My challenge to you is to use this as a great opportunity to learn Python.  Look up JSON file parsing and see if you can figure out how to look up the device details by name.  Have fun! :-)

Yes, you will need to replace those DEVICE placeholders with the actual values or prefix the code with the device details setting the variables like this:
DEVICEID = "01234567891234567890"
DEVICEIP = "<IP_ADDRESS>"
DEVICEKEY = "0123456789abcdef"

You can indeed pull this data from the generated devices.json for DEVICEID and DEVICEKEY.  Set DEVICEIP = "<IP_ADDRESS>" to have tinytuya scan for the device (warning: autoIP lookup requires scanning the network and is slow and can timeout).
My challenge to you is to use this as a great opportunity to learn Python.  Look up JSON file parsing and see if you can figure out how to look up the device details by name.  Have fun! :-)

Would it not be better to use the snapshot.json file as it contains what is needed?

Would it not be better to use the snapshot.json file as it contains what is needed?

Go for it!  Keep in mind that if you use DHCP on your network, the IP address of the devices can change over time.

Go for it!  Keep in mind that if you use DHCP on your network, the IP address of the devices can change over time.

Hi @jasonacox I managed to get this code but i am getting this error so I have a few questions about the code.
#!/usr/bin/env python3

import json

with open('/home/pi/cloudtuya/snapshot.json') as json_file:
    data_dict = json.load(json_file)
    #data_dict = json.loads(json_file.read())
    print(data_dict)
#    print(data_dict["name"])
    print(data_dict["ip"])
    print(data_dict["id"])
    print(data_dict["key"])

    #for p in data['devices']:
    #    print(['name']['ip']["id"]["key"])

If i want to keep a connection open to  control the lights how do i make that happen?   You should see the monstro code i've made.... I would appreciate your help .

This code is not related to yours but I may help someone doing the same.
#!/usr/bin/env python3
import argparse
import signal
import sys
import time
import logging
import my_room
#import living_room
#import all_rooms
from rpi_rf import RFDevice
rfdevice = None
debounce = 10
# pylint: disable=unused-argument
def exithandler(signal, frame):
    rfdevice.cleanup()
    sys.exit(0)

logging.basicConfig(level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S',
                    format='%(asctime)-15s - [%(levelname)s] %(module)s: %(message)s', )

parser = argparse.ArgumentParser(description='Receives a decimal code via a 433/315MHz GPIO device')
parser.add_argument('-g', dest='gpio', type=int, default=27,
                    help="GPIO pin (Default: 27)")
args = parser.parse_args()

signal.signal(signal.SIGINT, exithandler)
rfdevice = RFDevice(args.gpio)
rfdevice.enable_rx()
timestamp = None
oldtime = time.perf_counter()
oldtime1 = time.perf_counter()
oldtime2 = time.perf_counter()
oldtime3 = time.perf_counter()

#Received code 835186. is L Switch near entrance
#Received code 818562. is L Switch in hall way
#-------
#Received code 3764961. is big button on car remote <---- Living Room
#Received code 3764962. is next button on car remote <----Leo
#Received code 3764964. is next button on car remote <----My room
#Received code 3764968. is small button on car remote <--- all off
while True:
    dt = (time.strftime("%I:%M:%S %p"))
    if rfdevice.rx_code_timestamp != timestamp:
        timestamp = rfdevice.rx_code_timestamp
        now = time.perf_counter()
        if ((str(rfdevice.rx_code) == '3764961')) or  ((str(rfdevice.rx_code) == '818562')) or ((str(rfdevice.rx_code) == '835186')) :
            elapsed = now - oldtime
            if elapsed < debounce:
                #print("Ignoring Duplicate Button Press")
                pass
            else:
                oldtime = now
                print("Front Room Lights Pressed" ,  dt)
                my_room.living()
##--------------------------------------leo-------------------------------------------------------------------------
        elif ((str(rfdevice.rx_code) == '3764962')):
            now1 = time.perf_counter()
            elapsed1 = now1 - oldtime1
            if elapsed1 < debounce:
                #print("Ignoring Duplicate Button Press")
                pass
            else:
                oldtime1 = now1
                print("Leo's Room Lights Pressed" ,  dt)
                my_room.leo()
##--------------------------------My Room-------------------------------------------------------------------------------
        elif ((str(rfdevice.rx_code) == '3764964')):
            now2 = time.perf_counter()
            elapsed2 = now2 - oldtime2
            if elapsed2 < debounce:
                #print("Ignoring Duplicate Button Press")
                pass
            else:
                oldtime2 = now2
                print("My Room Lights Pressed" ,  dt)
                my_room.main()
##--------------------------------------------------------------------------------------------------------
        elif ((str(rfdevice.rx_code) == '3764968')):
            now3 = time.perf_counter()
            elapsed3 = now3 - oldtime3
            if elapsed3 < debounce:
                #print("Ignoring Duplicate Button Press")
                pass
            else:
                oldtime3 = now3
                print("All Room's Lights Off" ,  dt)
                my_room.all_off()
#-----------------------------------------------------------------------------------------------------------

    time.sleep(0.01)
rfdevice.cleanup()

This code listens for the 432mhz from wireless switches so is running all the time n the background. When it picks up the remote press it runs your code se below. I know I've repeated the code lots but couldn't work out how to reuse code and one point i tried to call a function like this my_room.all_off.payload() but apparently 'function' object has no attribute 'payload'
#!/usr/bin/env python3

# TinyTuya Example
# -*- coding: utf-8 -*-
from threading import Thread

import tinytuya
import os

#Leos Light
def lr1():

    DEVICEID = "<Fake_Data>"
    DEVICEIP = "<Fake_Data>"
    DEVICEKEY = "<Fake_Data>"
    DEVICEVERS = "<Fake_Data>"

    # Check for environmental variables and always use those if available
    DEVICEID = os.getenv("DEVICEID", DEVICEID)
    DEVICEIP = os.getenv("DEVICEIP", DEVICEIP)
    DEVICEKEY = os.getenv("DEVICEKEY", DEVICEKEY)
    DEVICEVERS = os.getenv("DEVICEVERS", DEVICEVERS)

    # Connect to Tuya BulbDevice
    d = tinytuya.BulbDevice(DEVICEID, DEVICEIP, DEVICEKEY)
    if(DEVICEVERS == '3.3'):    # IMPORTANT to always set version
        d.set_version(3.3)
    else:
        d.set_version(3.1)
    # Keep socket connection open between commands
    d.set_socketPersistent(True)

    ##print('    Turn off lamp 1')
    data = d.status()
    if(data['dps']['20'] == True):
        #print("its on Turning off")
        d.turn_off()
    elif(data['dps']['20'] == False):
        #print("its off Turing on")
        d.turn_on()

#Smart Light 1
def sm1():

    DEVICEID = "<Fake_Data>"
    DEVICEIP = "<Fake_Data>"
    DEVICEKEY = "<Fake_Data>"
    DEVICEVERS = "<Fake_Data>"

    # Check for environmental variables and always use those if available
    DEVICEID = os.getenv("DEVICEID", DEVICEID)
    DEVICEIP = os.getenv("DEVICEIP", DEVICEIP)
    DEVICEKEY = os.getenv("DEVICEKEY", DEVICEKEY)
    DEVICEVERS = os.getenv("DEVICEVERS", DEVICEVERS)

    # Connect to Tuya BulbDevice
    d = tinytuya.BulbDevice(DEVICEID, DEVICEIP, DEVICEKEY)
    if(DEVICEVERS == '3.3'):    # IMPORTANT to always set version
        d.set_version(3.3)
    else:
        d.set_version(3.1)
    # Keep socket connection open between commands
    d.set_socketPersistent(True)

    ##print('    Turn off lamp 1')
    data = d.status()
    if(data['dps']['20'] == True):
        ##print("its on Turning off")
        d.turn_off()
    elif(data['dps']['20'] == False):
        ##print("its off Turing on")
        d.turn_on()

#Smart Light 2
def sm2():

    DEVICEID = "<Fake_Data>"
    DEVICEIP = "<Fake_Data>"
    DEVICEKEY = "<Fake_Data>"
    DEVICEVERS = "3.3"

    # Check for environmental variables and always use those if available
    DEVICEID = os.getenv("DEVICEID", DEVICEID)
    DEVICEIP = os.getenv("DEVICEIP", DEVICEIP)
    DEVICEKEY = os.getenv("DEVICEKEY", DEVICEKEY)
    DEVICEVERS = os.getenv("DEVICEVERS", DEVICEVERS)

    # Connect to Tuya BulbDevice
    d = tinytuya.BulbDevice(DEVICEID, DEVICEIP, DEVICEKEY)
    if(DEVICEVERS == '3.3'):    # IMPORTANT to always set version
        d.set_version(3.3)
    else:
        d.set_version(3.1)
    # Keep socket connection open between commands
    d.set_socketPersistent(True)

    ##print('    Turn off lamp 2')
    data = d.status()
    if(data['dps']['20'] == True):
        ##print("its on Turning off")
        d.turn_off()
    elif(data['dps']['20'] == False):
        ##print("its off Turing on")
        d.turn_on()

#Smart Light 3
def sm3():
    DEVICEID = <Fake_Data>"
    DEVICEIP = "<Fake_Data>"
    DEVICEKEY = "<Fake_Data>"
    DEVICEVERS = "3.3"

    # Check for environmental variables and always use those if available
    DEVICEID = os.getenv("DEVICEID", DEVICEID)
    DEVICEIP = os.getenv("DEVICEIP", DEVICEIP)
    DEVICEKEY = os.getenv("DEVICEKEY", DEVICEKEY)
    DEVICEVERS = os.getenv("DEVICEVERS", DEVICEVERS)

    # Connect to Tuya BulbDevice
    d = tinytuya.BulbDevice(DEVICEID, DEVICEIP, DEVICEKEY)
    if(DEVICEVERS == '3.3'):    # IMPORTANT to always set version
        d.set_version(3.3)
    else:
        d.set_version(3.1)
    # Keep socket connection open between commands
    d.set_socketPersistent(True)

    ##print('    Turn off lamp 3')
    data = d.status()
    if(data['dps']['20'] == True):
        ##print("its on Turning off")
        d.turn_off()
    elif(data['dps']['20'] == False):
        ##print("its off Turing on")
        d.turn_on()

#My BedRoom Light
def br1():
    DEVICEID = "<Fake_Data>"
    DEVICEIP = "<Fake_Data>"
    DEVICEKEY = "<Fake_Data>"
    DEVICEVERS = ""

    # Check for environmental variables and always use those if available
    DEVICEID = os.getenv("DEVICEID", DEVICEID)
    DEVICEIP = os.getenv("DEVICEIP", DEVICEIP)
    DEVICEKEY = os.getenv("DEVICEKEY", DEVICEKEY)
    DEVICEVERS = os.getenv("DEVICEVERS", DEVICEVERS)

    # Connect to Tuya BulbDevice
    d = tinytuya.BulbDevice(DEVICEID, DEVICEIP, DEVICEKEY)
    if(DEVICEVERS == '3.3'):    # IMPORTANT to always set version
        d.set_version(3.3)
    else:
        d.set_version(3.1)
    # Keep socket connection open between commands
    d.set_socketPersistent(True)

    ##print('    Turn off lamp 3')
    data = d.status()
    if(data['dps']['1'] == True):
        #print("its on Turning off")
        d.turn_off()
    elif(data['dps']['1'] == False):
        #print("its off Turing on")
#    #print(data)
        d.turn_on()
def main():
    Thread(target = br1).start() #My Room
def leo():
    Thread(target = lr1).start() #Leos room
def living():
    Thread(target = sm1).start() #Living Room
    Thread(target = sm2).start() #Living Room
    Thread(target = sm3).start() #Living Room
#---------------------------------------------------------------------------------------all off ctrl---------------------
def all_off():
    #Leos Light
    def lr1():
        DEVICEID = "<Fake_Data>"
        DEVICEIP = "<Fake_Data>"
        DEVICEKEY = "<Fake_Data>"
        DEVICEVERS = "<Fake_Data>"
        # Check for environmental variables and always use those if available
        DEVICEID = os.getenv("DEVICEID", DEVICEID)
        DEVICEIP = os.getenv("DEVICEIP", DEVICEIP)
        DEVICEKEY = os.getenv("DEVICEKEY", DEVICEKEY)
        DEVICEVERS = os.getenv("DEVICEVERS", DEVICEVERS)
        # Connect to Tuya BulbDevice
        d = tinytuya.BulbDevice(DEVICEID, DEVICEIP, DEVICEKEY)
        if(DEVICEVERS == '3.3'):    # IMPORTANT to always set version
            d.set_version(3.3)
        else:
            d.set_version(3.1)
        # Keep socket connection open between commands
        d.set_socketPersistent(True)
        d.turn_off()
    #Smart Light 1
    def sm1():
        DEVICEID = "<Fake_Data>"
        DEVICEIP = "<Fake_Data>"
        DEVICEKEY = "<Fake_Data>"
        DEVICEVERS = "3.3"
        # Check for environmental variables and always use those if available
        DEVICEID = os.getenv("DEVICEID", DEVICEID)
        DEVICEIP = os.getenv("DEVICEIP", DEVICEIP)
        DEVICEKEY = os.getenv("DEVICEKEY", DEVICEKEY)
        DEVICEVERS = os.getenv("DEVICEVERS", DEVICEVERS)
        # Connect to Tuya BulbDevice
        d = tinytuya.BulbDevice(DEVICEID, DEVICEIP, DEVICEKEY)
        if(DEVICEVERS == '3.3'):    # IMPORTANT to always set version
            d.set_version(3.3)
        else:
            d.set_version(3.1)
        # Keep socket connection open between commands
        d.set_socketPersistent(True)
        d.turn_off()
    #Smart Light 2
    def sm2():
        DEVICEID = "<Fake_Data>"
        DEVICEIP = "<Fake_Data>"
        DEVICEKEY = "<Fake_Data>"
        DEVICEVERS = "3.3"
        # Check for environmental variables and always use those if available
        DEVICEID = os.getenv("DEVICEID", DEVICEID)
        DEVICEIP = os.getenv("DEVICEIP", DEVICEIP)
        DEVICEKEY = os.getenv("DEVICEKEY", DEVICEKEY)
        DEVICEVERS = os.getenv("DEVICEVERS", DEVICEVERS)
        # Connect to Tuya BulbDevice
        d = tinytuya.BulbDevice(DEVICEID, DEVICEIP, DEVICEKEY)
        if(DEVICEVERS == '3.3'):    # IMPORTANT to always set version
            d.set_version(3.3)
        else:
            d.set_version(3.1)
        # Keep socket connection open between commands
        d.set_socketPersistent(True)
        d.turn_off()
    #Smart Light 3
    def sm3():
        DEVICEID = "<Fake_Data>"
        DEVICEIP = "<Fake_Data>"
        DEVICEKEY = "<Fake_Data>"
        DEVICEVERS = "3.3"
        # Check for environmental variables and always use those if available
        DEVICEID = os.getenv("DEVICEID", DEVICEID)
        DEVICEIP = os.getenv("DEVICEIP", DEVICEIP)
        DEVICEKEY = os.getenv("DEVICEKEY", DEVICEKEY)
        DEVICEVERS = os.getenv("DEVICEVERS", DEVICEVERS)
        # Connect to Tuya BulbDevice
        d = tinytuya.BulbDevice(DEVICEID, DEVICEIP, DEVICEKEY)
        if(DEVICEVERS == '3.3'):    # IMPORTANT to always set version
            d.set_version(3.3)
        else:
            d.set_version(3.1)
        # Keep socket connection open between commands
        d.set_socketPersistent(True)
        d.turn_off()
    #My BedRoom Light
    def br1():
        DEVICEID = "<Fake_Data>"
        DEVICEIP = "<Fake_Data>"
        DEVICEKEY = "<Fake_Data>"
        DEVICEVERS = ""
        # Check for environmental variables and always use those if available
        DEVICEID = os.getenv("DEVICEID", DEVICEID)
        DEVICEIP = os.getenv("DEVICEIP", DEVICEIP)
        DEVICEKEY = os.getenv("DEVICEKEY", DEVICEKEY)
        DEVICEVERS = os.getenv("DEVICEVERS", DEVICEVERS)
        # Connect to Tuya BulbDevice
        d = tinytuya.BulbDevice(DEVICEID, DEVICEIP, DEVICEKEY)
        if(DEVICEVERS == '3.3'):    # IMPORTANT to always set version
            d.set_version(3.3)
        else:
            d.set_version(3.1)
        # Keep socket connection open between commands
        d.set_socketPersistent(True)
        d.turn_off()
#    def payload():
    Thread(target = lr1).start() #Leos room
    Thread(target = sm1).start() #Living Room
    Thread(target = sm2).start() #Living Room
    Thread(target = sm3).start() #Living Room
    Thread(target = br1).start() #My Room

#---------------------------------------------------------------------------------------------------------------------------

if __name__ == '__main__':
    main()

Would something like this work ?
global ALLOFFVAR
ALLOFFVAR = ""
-------snipped -----------
def all_pof():
    global ALLOFFVAR
    ALLOFFVAR = "1"
    main()
    leo()
    living()
    ALLOFFVAR = "0"

If i put this in each light bulb definition     ```
if (ALLOFFVAR == '1'):
d.turn_off()

First for the JSON reading, you can use something like this to print out everything in the snapshot:
import json

with open('snapshot.json') as json_file:
     data = json.load(json_file)

print("%-25s %-24s %-16s %-17s %-5s" % ("Name","ID", "IP","Key","Version"))
for item in data["devices"]:
    print("%-25.25s %-24s %-16s %-17s %-5s" % (
        item["name"],
        item["id"],
        item["ip"],
        item["key"],
        item["ver"]))

If you wanted to get the status of all the devices listed in snapshot, you would do this:
import tinytuya
import json

with open('snapshot.json') as json_file:
     data = json.load(json_file)

# print status
for item in data["devices"]:
    print("\nDevice: %s" % item["name"])
    d = tinytuya.OutletDevice(item["id"], item["ip"], item["key"])
    d.set_version(float(item["ver"]))
    status = d.status()
    print(status)

You could edit the above to have it turn on everything in that JSON file.  Or you could write a function that turns on/off a light based on the name:
import tinytuya
import json
import time

with open('snapshot.json') as json_file:
     data = json.load(json_file)

# Turn on a device by name
def turn_on(name):
    # find the right item that matches name
    for item in data["devices"]:
        if item["name"] == name:
            break
    print("\nTurning On: %s" % item["name"])
    d = tinytuya.OutletDevice(item["id"], item["ip"], item["key"])
    d.set_version(float(item["ver"]))
    d.set_status(True)

# Turn off a device by name
def turn_off(name):
    # find the right item that matches name
    for item in data["devices"]:
        if item["name"] == name:
            break
    print("\nTurning Off: %s" % item["name"])
    d = tinytuya.OutletDevice(item["id"], item["ip"], item["key"])
    d.set_version(float(item["ver"]))
    d.set_status(False)

# Test it
turn_off('Dining Room')
time.sleep(2)
turn_on('Dining Room')

Ok i tried the above bit of code out and it just spits out this error after a long wait .
./name_ctrl.py

Turning Off: Smart Light 2
Exceeded tinytuya retry limit (5)
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/tinytuya/__init__.py", line 353, in _send_receive
    data = self.socket.recv(1024)  # try again
socket.timeout: timed out
Traceback (most recent call last):
  File "./name_ctrl.py", line 33, in <module>
    turn_off('Smart Light 2')
  File "./name_ctrl.py", line 30, in turn_off
    d.set_status(False)
  File "/home/pi/.local/lib/python3.7/site-packages/tinytuya/__init__.py", line 608, in set_status
    data = self._send_receive(payload)
  File "/home/pi/.local/lib/python3.7/site-packages/tinytuya/__init__.py", line 353, in _send_receive
    data = self.socket.recv(1024)  # try again
socket.timeout: timed out

How do i recreate the .json files just incase i broke them ...

I've just discovered that one of the light bulbs does not have any info for
"ip": 0,
"ver": 0,

You can create snapshot.json:
python -m tinytuya scan

Can you run this script and see if the "Smart Light 2" actually has all the correct values?
import json

with open('snapshot.json') as json_file:
     data = json.load(json_file)

print("%-25s %-24s %-16s %-17s %-5s" % ("Name","ID", "IP","Key","Version"))
for item in data["devices"]:
    print("%-25.25s %-24s %-16s %-17s %-5s" % (
        item["name"],
        item["id"],
        item["ip"],
        item["key"],
        item["ver"]))

I'm not sure but i think the problem it has, Is the ver of that light bulb is different to the rest as the dps is at 1 not 20.
I ran the status  and received this info
Name                      ID                       IP               Key               Version
Smart Light 2             <  fake       data   >   < fake data >    <fake   data   >   3.3
Bedside Light             <  fake       data   >   < fake data >    <fake   data   >
Smart Light 1             <  fake       data   >   < fake data >    <fake   data   >   3.3
Side Light                <  fake       data   >   < fake data >    <fake   data   >   3.3
Smart Light 3             <  fake       data   >   < fake data >    <fake   data   >   3.3

Device: Smart Light 2
{'dps': {'20': True, '21': 'white', '22': 400, '23': 400, '24': '<fake data > ', '25': '<fake data > ', '26': 0}}

Device: Bedside Light
{'devId': '<fake data > ', 'dps': {'1': True, '2': 'white', '3': 25, '4': 255, '5': '<fake data > ', '6': '<fake data > ', '7': '<fake data > ', '8': '<fake data > ', '9': '<fake data > ', '10': '<fake data > '}}

Device: Smart Light 1
{'dps': {'20': True, '21': 'white', '22': 400, '23': 400, '24': '<fake data > ', '25': '<fake data > ', '26': 0}}

Device: Side Light
{'dps': {'20': False, '21': 'white', '22': 500, '23': 500, '24': '<fake data > ', '25': '<fake data > ', '26': 0}}

Device: Smart Light 3
{'dps': {'20': True, '21': 'white', '22': 400, '23': 400, '24': '<fake data > ', '25': '<fake data > ', '26': 0}}

Turning Off: Smart Light 2
Exceeded tinytuya retry limit (5)
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/tinytuya/__init__.py", line 353, in _send_receive
    data = self.socket.recv(1024)  # try again
socket.timeout: timed out
Traceback (most recent call last):
  File "./name_ctrl.py", line 58, in <module>
    turn_off('Smart Light 2')
  File "./name_ctrl.py", line 56, in turn_off
    d.set_status(False)
  File "/home/pi/.local/lib/python3.7/site-packages/tinytuya/__init__.py", line 608, in set_status
    data = self._send_receive(payload)
  File "/home/pi/.local/lib/python3.7/site-packages/tinytuya/__init__.py", line 353, in _send_receive
    data = self.socket.recv(1024)  # try again
socket.timeout: timed out

The strange thing is it runs ok from my code modified from bulb.py as the function br1()

That makes sense!  If these are all bulbs, not switches, update the code to use BulbDevice  instead of OutletDevice as the BulbDevice class add extra handling for smart bulbs:
import tinytuya
import json
import time

with open('snapshot.json') as json_file:
     data = json.load(json_file)

# Turn on a device by name
def turn_on(name):
    # find the right item that matches name
    for item in data["devices"]:
        if item["name"] == name:
            break
    print("\nTurning On: %s" % item["name"])
    d = tinytuya.BulbDevice(item["id"], item["ip"], item["key"])
    d.set_version(float(item["ver"]))
    d.set_status(True)

# Turn off a device by name
def turn_off(name):
    # find the right item that matches name
    for item in data["devices"]:
        if item["name"] == name:
            break
    print("\nTurning Off: %s" % item["name"])
    d = tinytuya.BulbDevice(item["id"], item["ip"], item["key"])
    d.set_version(float(item["ver"]))
    d.set_status(False)

# Test it
turn_off('Dining Room')
time.sleep(2)
turn_on('Dining Room')

Very strange...
It offers me the same error :-(
./name_ctrl.py

Turning Off: Smart Light 2
Exceeded tinytuya retry limit (5)
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/tinytuya/__init__.py", line 353, in _send_receive
    data = self.socket.recv(1024)  # try again
socket.timeout: timed out
Traceback (most recent call last):
  File "./name_ctrl.py", line 31, in <module>
    turn_off('Smart Light 2')
  File "./name_ctrl.py", line 29, in turn_off
    d.set_status(False)
  File "/home/pi/.local/lib/python3.7/site-packages/tinytuya/__init__.py", line 608, in set_status
    data = self._send_receive(payload)
  File "/home/pi/.local/lib/python3.7/site-packages/tinytuya/__init__.py", line 353, in _send_receive
    data = self.socket.recv(1024)  # try again
socket.timeout: timed out

So how do we work out why this is happening ?
Have you got discord? It would be nice to try and work this out in real time.

Oops... I guess I keep hoping you will debug my mistakes! :-)
For BubDevices types, you need to use turn_on() and turn_off() commands.  My script was written for switches, not smart bulbs and I didn't update that bit, so the right answer would be:
import tinytuya
import json
import time

tinytuya.set_debug(True)

with open('snapshot.json') as json_file:
     data = json.load(json_file)

# Turn on a device by name
def turn_on(name):
    # find the right item that matches name
    for item in data["devices"]:
        if item["name"] == name:
            break
    print("\nTurning On: %s" % item["name"])
    d = tinytuya.BulbDevice(item["id"], item["ip"], item["key"])
    d.set_version(float(item["ver"]))
    d.turn_on()

# Turn off a device by name
def turn_off(name):
    # find the right item that matches name
    for item in data["devices"]:
        if item["name"] == name:
            break
    print("\nTurning Off: %s" % item["name"])
    d = tinytuya.BulbDevice(item["id"], item["ip"], item["key"])
    d.set_version(float(item["ver"]))
    d.turn_off()

# Test it
turn_off('SmartBulb')
time.sleep(2)
turn_on('SmartBulb')

Ahh I see, well still have a lot of learning by making silly mistakes like not spotting that.
Thanks.
Now how do i add an *args to make that function behave either as a toggle or a 'turn off only' :-)

I'm not sure but i think i may have done it .. :-) with the following code.
def turn_on(name, *num):
    for item in jdata["devices"]:
        if item["name"] == name:
            break
    d = tinytuya.BulbDevice(item["id"], item["ip"], item["key"])
    d.set_version(float(item["ver"]))
    d.set_socketPersistent(True)
    data = d.status()
    for n in num:
        if n == 2:
            d.turn_off()
        else:
            if(data['dps']['20'] == True):
                ##print("its on Turning off")
                d.turn_off()
            elif(data['dps']['20'] == False):
                ##print("its off Turing on")
                d.turn_on()


unsafe_div op for division by zero

Fix #15706.
Because we have waited for a long time without any response from tensorflowers, we create a PR for further discuss here.
The PR proposes a new private op unsafe_div, which returns 0 (as well as its gradient) when denominator is 0. Please read #15706 for more details.
Please note that we only implement CPU kernel for limited dtypes by now. The PR is still very rudimentary, any feedback/review would be appreciated.

@drpngx @aselle @tatatodd could you take a look? Thanks.

Nagging Assignee @protoget: It has been 21 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @protoget: It has been 37 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @protoget: It has been 51 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @protoget: It has been 66 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @protoget: It has been 82 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

@protoget @martinwicke @aselle @drpngx Hi, could you lend a hand? I think we pend the PR for a quite long time without any response ( ~ 3 months).

Sorry for the long delay and thank you for your patience. Overall, I think it looks good! I will let @aselle or @martinwicke speak on whether we want to expose this in the tf.math API.

@drpngx Many thanks. I have resolved all your comments. By the way, because the op is only necessary for metrics, loss and math_ops modules up till now,  I'd like to hide the op at first and we might expose it later.

Could you take a look?
INFO: Server logs of failing action:
   /home/kbuilder/.cache/bazel/_bazel_kbuilder/f2d52ca1f092ccbe254cc98c3dc90790/bazel-remote-logs/5e685ccc7a022ff0388691de94842464d8b2228c7279fbaae5805f70990b9904/docker_runner
FAIL: //tensorflow/python:math_ops_test (see /home/kbuilder/.cache/bazel/_bazel_kbuilder/f2d52ca1f092ccbe254cc98c3dc90790/execroot/org_tensorflow/bazel-out/k8-opt/testlogs/tensorflow/python/math_ops_test/test.log)
INFO: From Testing //tensorflow/python:math_ops_test:
==================== Test output for //tensorflow/python:math_ops_test:
Traceback (most recent call last):
  File "/b/s/w/ir/run/bazel-out/k8-opt/bin/tensorflow/python/math_ops_test.runfiles/org_tensorflow/tensorflow/python/ops/math_ops_test.py", line 476, in <module>
    @test_util.with_c_api
AttributeError: 'module' object has no attribute 'with_c_api'

@drpngx with_c_api decorator has been removed in the master branch, so I deleted it. Could you retest it?

Thank you, @martinwicke .  Internal CI infrastructure error.

Unrelated failure? ImportError: cannot import name 'gen_collective_ops'

Yeah, unrelated. However, could you run clang-format on the C++ code?
Thanks!

Sure, thank you for reminding me.

This is a summary of discussion in #15706:

op name: div_no_nan
op behavior: return 0 when denominator is zero
designed for float value only: float32, float 64
op kernel: CPU for now (I'd like to add GPU kernel later, is it OK? cc @asimshankar)

@facaiy - a follow up PR for the GPU kernel should be fine.

Wait, I think we pushed this internally.

Already, incl. the changes?

It has been merged in master branch by https://github.com/tensorflow/tensorflow/commit/d2981e0f61f5da46b2ab90a0779842565db43519 about 3 days ago. Hence renaming UnsafeDiv op breaks BackwardsCompatibility test, right?

Looks like we have already merged the first commit internally, and yes it should be harmless. @facaiy, was the first commit a squashed version of a bunch of changes? Do you mind opening another PR for all the new commits added after the merge? Thank you!

Close it because PR #21621 is opened for further discussion.


Allow global caching?

Is it possible to use a globally defined directory .store for the dependency storage instead of the local node_modules/.store?
Otherwise the same package is downloaded again every time which is not very performant.

Sadly, with how node_modules are resolved... no that can't be done, unfortunately! #19


chore: add owner and repository names to errors

Fixes #234
Pull Request

Proposed Changes
Add owner and repository info to error messages
Readiness Checklist
Author/Contributor

[x] If documentation is needed for this change, has that been included in this pull request
[x] run make lint and fix any issues that you have introduced
[x] run make test and ensure you have test coverage for the lines you are introducing

Reviewer

[x] Label as either fix, documentation, enhancement, infrastructure, or breaking

@zkoppert got rid of the duplicate code and went with a dictionary.  Easier to set, access and default to None when key not present.


Bookinfo updated to latest rules model and improved istioctl

Before merging this PR we need to replace the 3 istioctl binaries (demos/istioctl-linux, demos/istioctl-osx, and demos/isitioctl-windows) with the latest version.

This change is

Something very strange happened with commit: https://github.com/istio/istio/pull/32/commits/3490992fb45145b48962d7949a505ac0d16a1141
I pushed those changes myself, but somehow github says it was somebody named "Ian Ferguson". I have no idea who that is - I never even heard of him ?????


Does not scan SSHFS

Doesn't work with filesystems mountet with the SSHFS  extension:
tried with lazy-loading on and off
If the file is once opened, the anchors get registered and listed properly.
Clicking on such an anchor prompts you to save your workspace, closes the workspace and opens a new workspace with the name of the clicked file ( see https://youtu.be/R95u-dMLJBo )

Working fine for me when SSH'd into an Ubuntu VPS, so I assume it's working on the latest version of Comment Anchors. Feel free to report back if the issue persists.


Latest version always returns less specific language

It looks like the library returns the least-specific version of a language after the discussion in #23 and the latest update. Is this expected behavior?
> const acceptLanguage = require('accept-language')
> acceptLanguage.languages(['en', 'en-US'])
> acceptLanguage.get('en-US')
'en'

I was expecting a match on en-US here. Reversing the order of 'en' and 'en-US' produces the correct result. Is this expected behavior and do we thus need to be careful with the ordering of the specific languages?

It does the checking:

en-US == en ?  no
en == end ? yes

And the function returns there. But I think I can agree it should continue the checks here.

Just a question, what do you expect this should return?
> const acceptLanguage = require('accept-language')
> acceptLanguage.languages(['en', 'en-US'])
> acceptLanguage.get('en, en-US')
?

@micky2be maybe have some inputs as well?

@tinganho Thanks for your explanation. For your example, I would expect en because it's the first one on the accept list. I don't know why a browser would report en,en-US in that order though (my own browser reports en-US,en;q=0.8,da;q=0.6,sv;q=0.4), but I also admit that I don't know enough about how the accept languages work in general, nor have I fully read the RFC for this :-)
Basically, my assumption was that if there's a specific match early in the accept string, like en-US in my case, then that would always match first, no matter the order of the languages given to languages([...]).

From the first issue it should return ’en-US’ obviously.
It should match the higher choice first.
Don't remember the code but my guess is that it matches both and return the first in the list.
If you have ’en’ and ’en-US’ in both accepted language and requested language, the priority is used.
If equal priority, the order in the list takes over (closer to index 0 wins)

This issue should be fixed now.


chore(form): remove .pf-m-subsection-title

fix https://github.com/patternfly/patternfly-next/issues/555

Deploy preview for pf-next ready!
Built with commit 84682db48a8cf0fc9e2ec4b0fcb5e005ee9608ad
https://deploy-preview-559--pf-next.netlify.com


Replace the card reveal close icon with SVG or other

http://materializecss.com/cards.html#reveal
Once you reveal the content, a close icon (X) will come up on the top right corner.
However, with icon-fonts kinda becoming obsolete, me (and maybe many of us) would like to replace them with SVGs/whatever else. But once I do that, it of course loses functionality and unable to close the revealed content.
Thank you

However, with icon-fonts kinda becoming obsolete

That would be new to me. And you can also directly use the SVG files of the Material icons. Just insert the SVG and remove the pointer events on it (because an i tag also has no pointer events and the clicked icon should not get the event but the surrounding title):
https://codepen.io/anon/pen/QggjJz
This is not a bug in Materialize.

I don't know how mdl does it, but there they use icons without the cdn or icon font.

@tomscholz they use it, see https://getmdl.io/started/index.html.

Yes, but it does work, even if you are not including the cdn

@tomscholz as far as I can see this is only for combining classnames. I did not see any otger references which really include the font ;-)

@tomscholz I can not reproduce this ;-)

Anyway, the mentioned pointer-events fix should be sufficient.

@tomscholz maybe you've installed the iconfont on your system?
https://github.com/google/material-design-icons/tree/master/iconfont

@DanielRuf ...

\o/ Rick and Morty font =)

@lastnoob I guess you are refering to this line


Adds a second output region to the v3 lab.

Adds an optional second output region to the v3 lab. It renders the same input but with a different mathitem. This is useful for testing against interaction of stateful tools like the explorer.

lgtm


[CARBONDATA-917] Resolved Bug for Select Count(*) not Working In Hive

Resolved Bug For Select count(*) not working in hive
Test manually with hive cli

@chenliang613 i rebased all hive branch prs  for master

@anubhav100  got the below error when verified this pr:
hive> select * from hive_table_2;
OK
Failed with exception java.io.IOException:java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
Time taken: 0.434 seconds

Can one of the admins verify this patch?

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/carbondata-pr-spark-1.6/73/

Build Failed  with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder/2207/

@chenliang613 i rebased this pr you can try it again

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/carbondata-pr-spark-1.6/75/

@chenliang613 i tested t manualy as well can you merged it now here are logs
INSIDE SPARK SHELL
scala> carbon.sql("create table counttest(name string,nickname string) stored by 'carbondata'")
scala> carbon.sql("""load data inpath 'hdfs://localhost:54310/chartypetest.csv' into table counttest""").show
INSIDE HIVE SHELL
hive> CREATE TABLE CounttestHIVE (name string,nickname string);
OK
Time taken: 1.202 seconds
hive> ALTER TABLE COUNTTESTHIVE SET FILEFORMAT
> INPUTFORMAT "org.apache.carbondata.hive.MapredCarbonInputFormat"
> OUTPUTFORMAT "org.apache.carbondata.hive.MapredCarbonOutputFormat"
> SERDE "org.apache.carbondata.hive.CarbonHiveSerDe";
OK
Time taken: 0.445 seconds
hive> ALTER TABLE COUNTTESTHIVE SET LOCATION 'hdfs://localhost:54310/opt/carbonStore/default/counttest' ;
OK
Time taken: 0.502 seconds
hive> set hive.mapred.supports.subdirectories=true;
hive> set mapreduce.input.fileinputformat.input.dir.recursive=true;
hive> select * from counttest;
OK
Time taken: 0.089 seconds
hive> select * from counttesthive;
OK
ANUBHAV	'ANU'
Time taken: 0.101 seconds, Fetched: 1 row(s)
hive> select count(*) from counttesthive;
MapReduce Jobs Launched:
Stage-Stage-1:  HDFS Read: 15760 HDFS Write: 0 SUCCESS
Total MapReduce CPU Time Spent: 0 msec
OK
1
Time taken: 1.463 seconds, Fetched: 1 row(s)

@anubhav100   please change the commit description , " rebased with master ".

@chenliang613 changed you can check

Build Success with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:8080/job/ApacheCarbonPRBuilder/2233/

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/carbondata-pr-spark-1.6/106/

@chenliang613 i changed the commit description you can check


Survey screen

We need a new feature to survey user satisfaction and solicit feedback.
The screen should have a short survey followed by a text box for comments.
The results of survey should be posted to URL that saves the survey data and user information to Firebase.  A Firebase function will need to be created to make this happen.
The survey should included the following questions

How would you rate the Green Up app overall ?   possible answers are 1 to 3 stars
Did This app help you find supplies ? possible answers are yes/no
Micah and Teresa : other questions go here.

From everything I've read, the key to getting feedback is keeping things short & concise.  What if we just include these three questions: 1 star rating, 1 checkbox and 1 text field:

"How was your experience overall?"  If people are seeking out this "Feedback" page, then this probably be a sampling of mostly dissatisfied people.  That's fine, especially if it prevents them from leaving bad reviews on the app store until we can get to the next version.
"Share your thoughts."  Just a simple textarea where people can say whatever they want.
"May we email you with follow-up questions?"  Just a yes/no checkbox.

The way that third question is worded, we can do two things.  We can contact them with specific troubleshooting questions which could be helpful.  But more importantly, our "follow-up questions" could be a link to a short questionnaire with more detailed questions like Johns example, "Did This app help you find supplies?"
If we keep the in-app questions short, but seek permission to send more extensive questions to their email, then I think we're more likely to catch people at a keyboard where their feedback might be a little more informative.


Refactor helm template

What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?:

NONE

Thank you.
/approve


How to change Term codes once created?

@jamesrwelch  - I have added 4 new terms to a newly created coded attribute.
2 are an1 and 2 are an2
I was going to change them to Y, N, Z and 9 but can't see how to change them.
I'm raising this ticket to remind me to go through this with you next week

Codes are often changed during development so we need to understand how to do this.

28/2/22 - James to check if codes can be changed. He thinks it should be possible and could be an oversight.


feat: Image generation api call is missing cfg scale parameter

Is your feature request related to a problem? Please describe.
Integration with automatic1111 and comfy ui is good, but the settings configuration ui is lack of the key parameter "CFG Scale" value, which impacts the image generation result significantly, with the default stable diffusion value being 7, some sdxl lighting models' generation result is barely usable.
Describe the solution you'd like
Add the the "CFG Scale" param in image generation configuration page and take it into API calls properly.
Describe alternatives you've considered
No good way to change the default value in automatic1111 stable diffusion side.
Additional context
Even more customization approaches in image generation UI can be considered in future roadmap, for example, real time input dialogue for this CFG scale value before clicking generation button in chat view.

Being able to set the sampler used as well would be really beneficial for image generation as well!

I'm going to one up this as well. I've got this integrated and I love that I can generate images in line. But I primarily use lightning models which is great because it provides a quick render, but I have no control over the sampler or the cfg setting and so the images tend to look low res and or come out messed up. Is this something that can just be adjusted within the code itself?

Hey one more thing, is there a way to add a switch like /imagine to engage the image generation without having to have a prompt there in the first place?

Related #1958

Related #1714

Related - https://github.com/open-webui/open-webui/pull/5256


Implement CPU and MPS support enhancements for WhisperSpeech

Third time trying to get all commits in one commit for the pull request...
This pull request adds mps and cpu support when running the program.  It chooses the best available device for all models and tensors based on the new "get_compute_device" within utils.py.  A few exceptions are "vocoder" and "encoder" that require certain operations that "mps" doesn't currently support in the pytorch framework, thus, only "cuda" or "cpu" are options.  Otherwise, the pull request uniformly sets the device/tensors to the best compute backend.

Merged, thanks a lot!

hey guys, as per the conversation at CPU + MPS Support, I have successfully applied (manually) and tested the changes to the 80b268b74900b2f7ca7a36a3c789607a3f4cd912 commit.  I'm able to use the Inference example.ipynb without any issue with the understanding that not all of the torch operations are performed on the MPS device due to current torch holes in MPS compatibility.  Therefore many tensors are kept on the CPU with specifics detailed in the above referenced issue thread.
In order to test this PR, I have performed the following steps:

conda create -n WhisperSpeechTest python=3.10.13
conda activate WhisperSpeechTest
conda install pytorch::pytorch torchvision torchaudio -c pytorch
git clone https://github.com/BBC-Esq/WhisperSpeech.git
cd WhisperSpeech
pip install -e .

After that I load the Inference example.ipynb and quickly run into an issue on the cell near the top used to import Pipeline: from whisperspeech.pipeline import Pipeline.   There are several small issues and then more important ones beyond this.
I am updating the current main branch with the required changes.  If it is alright with everyone, I will submit a new PR and credit everyone involved at the top.

hey guys, as per the conversation at CPU + MPS Support, I have successfully applied (manually) and tested the changes to the 80b268b commit. I'm able to use the Inference example.ipynb without any issue with the understanding that not all of the torch operations are performed on the MPS device due to current torch holes in MPS compatibility. Therefore many tensors are kept on the CPU with specifics detailed in the above referenced issue thread.
In order to test this PR, I have performed the following steps:
* conda create -n WhisperSpeechTest python=3.10.13

* conda activate WhisperSpeechTest

* conda install pytorch::pytorch torchvision torchaudio -c pytorch

* git clone https://github.com/BBC-Esq/WhisperSpeech.git

* cd WhisperSpeech

* pip install -e .

After that I load the Inference example.ipynb and quickly run into an issue on the cell near the top used to import Pipeline: from whisperspeech.pipeline import Pipeline. There are several small issues and then more important ones beyond this.
I am updating the current main branch with the required changes. If it is alright with everyone, I will submit a new PR and credit everyone involved at the top.

Go for it, appreciate the shout out, but always a team effort!


Jetty Upgrade: 12.x.x or latest

Search before asking

[X] I searched in the issues and found nothing similar.

Motivation
Team,
The version of jetty being used is somewhere around 9.x.x. This one is vulnerable and getting outdated. We need to migrate closer to 12.x.x. Any plans or approach would be highly appreciated.
Solution
No response
Alternatives
No response
Anything else?
No response
Are you willing to submit a PR?

[X] I'm willing to submit a PR!

I agree that we need to migrate to Jetty 12. There's a dev mailing list thread about this, https://lists.apache.org/thread/d7dqy4w9x1dyrcdrymoypv3v3p7bncxx .
I have already put a lot of time in this, but it's a lot of work to complete the migration. I have everything compiling, but there are some test failures. The WIP branch is here: https://github.com/lhotari/pulsar/pull/190/files .

The version of jetty being used is somewhere around 9.x.x. This one is vulnerable and getting outdated.

We use 9.4.54.v20240208 in Pulsar. I'm not aware of medium or high severity vulnerabilities in this version. The main issue is that it isn't maintained, that's explained in the email thread, https://lists.apache.org/thread/d7dqy4w9x1dyrcdrymoypv3v3p7bncxx.

Thanks for all the context. Let me go through provided information.

Looks like a lot of work has already been accomplished. I will be waiting for the pull request to be merged - https://github.com/lhotari/pulsar/pull/190

Looks like a lot of work has already been accomplished. I will be waiting for the pull request to be merged - https://github.com/lhotari/pulsar/pull/190

It's going to take some time since there are blockers. One of them is with Bookkeeper. We will need to upgrade Jetty in Bookkeeper before Pulsar since Pulsar puts all libraries in the same classpath. Pulsar's distribution also includes Bookkeeper.

Bookkeeper mailing list discussion: https://lists.apache.org/thread/jkgnr9tt947fzshpoojn0r8n2pnr0h3f

PR to upgrade Jetty 12 in Bookkeeper: https://github.com/apache/bookkeeper/pull/4447

Hopefully we could accomplish this before Pulsar 4.0 in October.

The Jetty 12 upgrade is postponed. Due to the lack of support for switching to Java 17 baseline in BookKeeper, https://github.com/apache/bookkeeper/pull/4447 /cc @dlg99. We'll address that later, possibly for Pulsar 4.1 .


Query inspector is not working

Describe the bug
Open the query inspector from a panel (Panel -> Inspect -> Query -> Refresh) or from the Explore menu. Since 7.2.0 it does not show any result from this plugin.
Example
Network data
The query in the background runs succesfully, the response from the Zabbix API is good.
Related change in Grafana
https://github.com/grafana/grafana/commit/a49daf5676bff0ed5651f7a5c419848c807391a1
./public/app/core/services/backend_srv.ts
if (options.hideFromInspector === undefined) {
  // Hide all local non data query calls
  options.hideFromInspector = isLocalUrl(options.url) && !isDataQuery(options.url);
}

In the Zabbix plugin request hideFromInspector is undefined and the result of the condition body is also true, so Grafana hides the query result.
Software versions

Grafana
Zabbix
Grafana-Zabbix Plugin

7.2.0+
-
4.0.2

Good catch, @sirbavo!


Updates to README and CI

Updates to README
Fix deprecated field in GoReleaser

Pull Request Test Coverage Report for Build 570098821

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 79.142%

Totals

Change from base Build 570053677:
0.0%

Covered Lines:
406

Relevant Lines:
513

💛  - Coveralls


Update logging when using user mapping SPO environment

See

Can't use | signs in an MD table + "membership" is wrong

There is a method in the user transformator class that cleans this, but not thought to apply to reporting

Implemented


Error: TASK [radiusdesk : Downloading RadiusDesk CakePHP Source from Subversion (Ubuntu 14+)]

Hello,
I try to install into a Ubuntu 16.04 Server.
I have this error.....
TASK [radiusdesk : Downloading RadiusDesk CakePHP Source from Subversion (Ubuntu 14+)] *********************************************
[WARNING]: Consider using subversion module rather than running svn
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "svn checkout -r 2085 https://svn.code.sf.net/p/radiusdesk/code/trunk/rd_cake /tmp/rd_sources/rd_cake", "delta": "0:00:00.314358", "end": "2018-02-16 01:29:31.176404", "msg": "non-zero return code", "rc": 1, "start": "2018-02-16 01:29:30.862046", "stderr": "svn: E170013: Unable to connect to a repository at URL 'https://svn.code.sf.net/p/radiusdesk/code/trunk/rd_cake'\nsvn: E175002: Unexpected HTTP status 502 'Bad Gateway' on '/p/radiusdesk/code/trunk/rd_cake'", "stderr_lines": ["svn: E170013: Unable to connect to a repository at URL 'https://svn.code.sf.net/p/radiusdesk/code/trunk/rd_cake'", "svn: E175002: Unexpected HTTP status 502 'Bad Gateway' on '/p/radiusdesk/code/trunk/rd_cake'"], "stdout": "", "stdout_lines": []}
to retry, use: --limit @/root/radiusdesk-installer/rd-installer-ansible.retry

Thanks @alternativetel for reporting this. The issue has been fixed in the recent update, kindly give it a try and revert if there are more issues.


fix: throw error if lightning url passed as instance url

@W-15748051@
https://github.com/jsforce/jsforce/issues/1352
validates instanceUrls as non lightning before creating connections with them

QA notes:
✅ setting instanceUrl to a lightning URL makes it throw
✅ only instanceUrl is validated, can still use (login|test).salesforce.com as loginUrl in connection.


Changing menu language

I live in France, but use brouter mainly in English.
I want to introduce French people to brouter, so I would like to be able to have menus etc in French.
I have seen a screenshot of menus in French so I am sure it is possible.
How can I  change the menu language?
Thank you for your help

Brouter-Web selects the language automatically depending on the Browser's locale settings.
It's possible to override this by adding lng=fr to the URL.

Hi,
try this URL: https://brouter.de/brouter-web/?lng=fr#map=6/48.535/8.138/standard


Cancel launched Coroutines onDestroy

from the docs of CoroutineScope

Manual implementation of this interface is not recommended, implementation by delegation should be preferred instead.
By convention, the [context of a scope][CoroutineScope.coroutineContext] should contain an instance of a [job][Job] to enforce structured concurrency.

We can convert
class BrowserActivity : DuckDuckGoActivity(), CoroutineScope
to
class BrowserActivity : DuckDuckGoActivity(), CoroutineScope by MainScope()
get rid of
   override val coroutineContext: CoroutineContext         get() = SupervisorJob() + Dispatchers.Main
because, from the docs of MainScope :
public fun MainScope(): CoroutineScope = ContextScope(SupervisorJob() + Dispatchers.Main)
and finally, getting to the issue (I think), we should cancel all coroutines started in this scope when the activity is destroyed
    override fun onDestroy() {         cancel()         super.onDestroy()     }
I can take care of this and other activities where this might be happening.

Thanks for the suggestion. I agree with you and we already included MainScope in one of our latest features inside our project. But still, we need to experiment a little bit more with this and validate that covers all our scenarios.

Thanks for the suggestion. I agree with you and we already included MainScope in one of our latest features inside our project. But still, we need to experiment a little bit more with this and validate that covers all our scenarios.

Cool, what are your thoughts regarding cancelling all coroutines on destroy ?

We do agree on canceling on those lifecycle methods, and using MainScope will take care of that for us. But we still need to go deeper and understand if we can combine MainScope with custom ExceptionHandler. Happy to see you so proactive on this issue. Thanks for that!

Another option is to use the lifecycleScope that AndroidX already offers to you in any ComponentActivity: those are automatically wired to your lifecycle and will be cancelled when the lifecycle reaches destroy state.
For more details, see here.

Closing this stall issue. This doesn’t apply anymore.


Storage: Support profile updates for VMs

Makes image related operations log consistently using contextual logging and fingerprint label.
Fixes profile update functions so they apply changes to VMs as well as container instances (and cleans up terminology used in those functions).
Updates profile functions to derive the effective project based on the project's features.profile setting using the same approach used for networks and storage pools.
Fixes an issue with a hard coded project.Default when loading a profile for detection of usage.
Splits device CanHotPlug() (bool, []string) function into simplified CanHotPlug() bool and UpdatableFields() []string so that we can differentiate between allowing update of a device's fields vs adding/removing devices from a running instance.
Now the device's Update() function can decide whether to allow the update based on the specific field being updated, whether the instance is running the instance type.
This allows VM disk devices to have their size property modified, even when the VM is running, and allows the storage pool to reject the resize and defer the resize operation using the volatile apply_quota config key.
Also allows certain NICs to live-update fields that only are applied host-side and can be applied while VM is running.
Allow online growth of containers and custom filesystem volumes on LVM/Ceph.

Fixes https://github.com/lxc/lxd/issues/7867

jenkins: test this please

jenkins: test this please

Testsuite passed

Testsuite passed

Testsuite passed

jenkins: test this please

Testsuite passed


Introduce AiAssistant::Message component via Freestyle

@backspace @burieberry I updated this PR per our discussion with @ef4 today.


update k8s dependencies to 1.23.17

The last client-go version contains an important bug fix. See https://github.com/kubernetes/kubernetes/pull/115901 for more info.
Fix missing delete events on informer re-lists to ensure all delete events are correctly emitted and using the latest known object state, so that all event handlers and stores always reflect the actual apiserver state as best as possible

/test-backport-1.11

/test-backport-1.11

praying somebody with a superpower merges this 🙏


See:
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_declaration
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_definition
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_typeDefinition
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_implementation
All of these features will have very similar implementations and will be heavily dependent on #81.

Implemented in #98. Go to declaration won't be implemented for now.


Ability to handle out-of-range date values

Moved from #76
The current behavior when a date value is specified outside of the given min/max date range is to log a warning and force the date back to the current value.  This can yield unexpected results for the user in some use cases.

I found a bug when specifying a maxDate as a value which is in next year than the current selection for example:
<paper-date-picker date="September 09, 2016" min-date="September 09, 2016" max-date="March 12, 2017"></paper-date-picker>
In such case nothing happens when you try to navigate to another year. The problem comes from line number: https://github.com/bendavis78/paper-date-picker/blame/master/paper-calendar.html#L526
The reason is that the if condition in this line is not correct. Adding another or should solve the issue:
if (!this.maxDate || this.currentYear < this.maxDate.getFullYear() || this.currentMonth < this.maxDate.getMonth() + 1) {


remove confusing drop shadow from info body sections

Issue: https://github.com/storybooks/storybook/issues/1877
Drop shadow creates strange look in Info inline mode
What I did
Removed it
How to test
Check Netlify
Is this testable with jest or storyshots?
Y, screenshots may need to be updated
Does this need a new example in the kitchen sink apps?
N
Does this need an update to the documentation?
N
If your answer is yes to any of these, please make sure to include it in your PR.

AFAIU the main problem is the splitting not the shadow

Yes, this only makes the problem a little less bad.
I think the inline info mode needs to be redesigned in general, but that's more of a roadmap thing.

Please update storyshots


syscall.EpollCreate and signal.Notify

General Question
Have you tried using this package along with catching an os.Interrupt signal? poller.EpollWait() will not return when signal.Notify(<>, os.Interrupt) is used. In C, one can create a pair of pipes and add them to epoll_wait(), but go syscall.EpollCtrl() errors with a bad file descriptor for os.Files from os.Pipe(). So this method cannot be used to break out of EpollWait().

Please ignore the above post. os.Pipes() work fine with syscall.EpollWait(). I had a bug in my code.


Layout single views

[X] This pull request has been linted by running npm run lint without errors
[X] This pull request has been tested by running npm run dev and reviewing affected routes
[X] This pull request has been built by running npm run generate without errors
[X] This isn't a duplicate of an existing pull request

Description
To resolve https://github.com/inclusive-design/wecount.inclusivedesign.ca/issues/117.
Style the single "views" page according to the design.
Steps to test

Run "npm run dev" and access the website at "http://localhost:3000";
Go to "Views";
Go to the views article named "Test Post for Views – 11". (This test article has content);
Verify the page style.

Expected behavior:
The style should match what's on the design.

@lliskovoi is the Aside table of contents for the views page supposed to be grey? (as shown in Figma file).

Nope, I missed that. Changed it to the blues it's supposed to be (same as the rest).

All review comments have been addressed and ready for another look. Thanks.

Ready for another review.


Calendar day font isn't affected by font-family overrides

I tried to use the MuiThemeProvider to overrides the global font but the calendar body font isn't affected.
<MuiThemeProvider theme={createMuiTheme({
    typography: {
    fontFamily: 'monospace'
    }
})}>
...
...
</MuiThemeProvider>

Expected behavior
calendar body font should be monospace
Actual behavior
calendar body font isn't monospace

Released in rc.13


[Search] Implement search endpoint for places

Create endpoint that will accept the same search parameters as events and econews (Swagger) and will return JSON with the similar structure.

Done. Note that I changed endpoint "/search/econews" to "/search/eco-news" and some DTO. See Swagger documentation for more details.


Upgrade embedded Kotlin to 1.4.30

This pull request upgrades the embedded Kotlin to 1.4.30.
https://github.com/JetBrains/kotlin/releases/tag/v1.4.30

@bot-gradle test RFN

OK, I've already triggered ReadyForNightly build for you.


Version 5.6.2 in a PCL assembly Xamarin.Android

I try to use RuleSet Validation
In my code I do:

Any reason why ruleSet: name parameter is not available ?
Thanks for your great product :)
André

Do you have a using statement for the FluentValidation namespace? If not, you'll need to add one as that's an extension method.

Thanks that was my problems !!
I only had : using FluentValidation.Results;
Thanks :)


Add LASSO and LP examples.

Adds some examples including:

Random LASSO problem, based on tfocs example
Random LP problem, based on tfocs example
MPS LP problem solver

Based on https://github.com/databricks/spark-tfocs/pull/16

@mengxr Ok, I addressed the review comments.

LGTM


Update zio-schema, zio-schema-derivation, ... to 0.4.10

About this PR
📦 Updates

dev.zio:zio-schema
dev.zio:zio-schema-derivation
dev.zio:zio-schema-zio-test

from 0.4.9 to 0.4.10
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "dev.zio" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "dev.zio" }
}]

labels: library-update, early-semver-minor, semver-spec-patch, commit-count:1

Codecov Report
Patch and project coverage have no change.

Comparison is base (1dd2938) 56.88% compared to head (53dcaa8) 56.88%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #339   +/-   ##
=======================================
  Coverage   56.88%   56.88%
=======================================
  Files          35       35
  Lines        1751     1751
  Branches      221      221
=======================================
  Hits          996      996
  Misses        755      755

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


obey routeId when forwarding a COND

Now, CONDs are forwarded based on current balance, disregarding the routeId. It should primarily route based on routeId, and only check whether balances are high/low enough to make forwarding the COND beneficial, not use that balance information to pick the onward peer.

I actually found some bugs in < vs > balance checks for probe forwarding, fixing those in https://github.com/ledgerloops/ledgerloops/pull/34/files#diff-06c01e4f591c24d112a10f54aac2d3c8R15


Ensure docs branch named "master" is properly handled

When we renamed master to main in the docs repo the branch name master was no longer significant. As a result someone or something can push to the branch named master as they might push to any other branch (e.g. feature/123). Something has been pushing to the master branch.
We should:

Enable branch protection for master
Delete the branch or put in a README.md file that redirects people to main
Determine if there is any affected automation that needs to target a different branch and update it

It is resolved.