Is there a way to output all the albums with all their respective images?

Hi Graker,
Wanted to know if there is a way to output all the albums with all the photos in it. Currently I can only output list of Albums and one complete album set at a time using its slug (I could add this component multiple times with individuals album slug but this wont scale once you have large number of albums).
Thanks

Hi,
No, there's no such component in the plugin. You can probably go through albums in AlbumList component accessing $album->photos directly. Though photos aren't eager-loaded with albums by default. So you should add a hook like onRun() to where you use a component, and then try to eager-load all photos on albums manually to avoid N+1 queries problem.
Or feel free to PR a new component :)

Closing it for now, please reopen if any further questions.

Hi Graker,
I am not able to crack this,

No, there's no such component in the plugin. You can probably go through albums in AlbumList component accessing $album->photos directly. Though photos aren't eager-loaded with albums by default. So you should add a hook like onRun() to where you use a component, and then try to eager-load all photos on albums manually to avoid N+1 queries problem.

Can you please guide me more. Please. Thanks

@Nvironmental ,
I can take a peek if you elaborate on what exactly you're doing (code samples included) and what exactly doesn't work as expected (error messages/behaviour description included).

Hi Graker attaching snaps of code here

Not getting any errors but not getting any results either.
$album->photos = $album->photos->getThumb(             $this->property('thumbWidth'),             $this->property('thumbHeight'),             ['mode' => $this->property('thumbMode')]           );
Tried this but it gives an error of getThumb doesn't exist.

This:
$album->photos->getThumb( $this->property('thumbWidth')

is wrong: photos is an array (collection, to be exact) so you have to go over it with foreach. Try to remove all your changes and just go over photos right in your template.
If that works, try to insert $albums->load('photos') in onRun() instead of all you have in the first screen.
If that doesn't work, post code samples and we'll look into it.
P.S. If you don't mind, please try to insert code between tripple backticks instead of making screenshots so I could copy it.

Hi Graker, apologies for not being mindful about the backticks for pasting code.
tried the following
==
 function onRun()
{
    $albums->load('photos');

}
==
{% set album = photoAlbum.album  %}

    {% for album in albumList.albums %}

    {% for photo in album.photos %}

            {{ photo.title }}

    {% else %}

Album doesn't have any photos yet

    {% endfor %}

{{ album.title }}

            Created on {{ album.created_at|date('M d, Y') }}
            {{ album.photo_count }} images

    {% else %}

You have not created any albums yet

    {% endfor %}

This does loop over the photos and gives me the titles of my photos(wherever they exist) [attached a reference screenshot]

But fails to load the path/url of the photos
Also tried to use {{album.photos}}
which returns
{"id":67,"user_id":null,"album_id":1,"title":"Raj Mahal Complex","description":"","created_at":"2019-02-11 13:03:39","updated_at":"2019-02-13 05:44:55","sort_order":67,"photo_location":"Tikamgarh, Madhya Pradesh","photo_latitude":"","photo_longitude":""},{"id":66,"user_id":null,"album_id":1,"title":"Mahal Complex","description":"","created_at":"2019-02-11 13:03:39","updated_at":"2019-02-13 05:44:27","sort_order":66,"photo_location":"Tikamgarh, Madhya Pradesh","photo_latitude":"","photo_longitude":""},{"id":65,"user_id":null,"album_id":1,"title":"Raj Mahal & Ruins","description":"","created_at":"2019-02-11 13:03:39","updated_at":"2019-02-13 05:43:54","sort_order":65,"photo_location":"Tikamgarh, Madhya Pradesh","photo_latitude":"","photo_longitude":""},{"id":64,"user_id":null,"album_id":1,"title":"Cenotaphs","description":"","created_at":"2019-02-11 13:03:39","updated_at":"2019-02-13 05:43:06","sort_order":64,"photo_location":"Tikamgarh, Madhya Pradesh","photo_latitude":"","photo_longitude":""},{"id":63,"user_id":null,"album_id":1,"title":"Cenotaphs","description":"","created_at":"2019-02-11 13:03:38","updated_at":"2019-02-13 05:42:28","sort_order":63,"photo_location":"Tikamgarh, Madhya Pradesh","photo_latitude":"","photo_longitude":""},{"id":62,"user_id":null,"album_id":1,"title":"Orchha","description":"","created_at":"2019-02-11 13:03:38","updated_at":"2019-02-12 19:08:07","sort_order":62,"photo_location":"Tikamgarh, Madhya Pradesh","photo_latitude":"","photo_longitude":""}]

So it does loop over photos in the album and fetches the fields set for it except the path or url of the photo

Let me know how to proceed

Yeah, I forgot that image file relation is not loaded automatically when photo model is loaded.
Try to replace
function onRun()
{
    $albums->load('photos');
}

with
function onRun()
{
    $albums->load('photos', 'photos.image');
}

It also could be 'photos.images', try both :)

Hi Graker,
tried
function onRun()
{
    $albums->load('photos', 'photos.image');
}

and
function onRun()
{
    $albums->load('photos', 'photos.images');
}

But no luck, got the same output as before with no file path or url:
{"id":67,"user_id":null,"album_id":1,"title":"Raj Mahal Complex","description":"","created_at":"2019-02-11 13:03:39","updated_at":"2019-02-13 05:44:55","sort_order":67,"photo_location":"Tikamgarh, Madhya Pradesh","photo_latitude":"","photo_longitude":""},{"id":66,"user_id":null,"album_id":1,"title":"Mahal Complex","description":"","created_at":"2019-02-11 13:03:39","updated_at":"2019-02-13 05:44:27","sort_order":66,"photo_location":"Tikamgarh, Madhya Pradesh","photo_latitude":"","photo_longitude":""},{"id":65,"user_id":null,"album_id":1,"title":"Raj Mahal & Ruins","description":"","created_at":"2019-02-11 13:03:39","updated_at":"2019-02-13 05:43:54","sort_order":65,"photo_location":"Tikamgarh, Madhya Pradesh","photo_latitude":"","photo_longitude":""},{"id":64,"user_id":null,"album_id":1,"title":"Cenotaphs","description":"","created_at":"2019-02-11 13:03:39","updated_at":"2019-02-13 05:43:06","sort_order":64,"photo_location":"Tikamgarh, Madhya Pradesh","photo_latitude":"","photo_longitude":""},{"id":63,"user_id":null,"album_id":1,"title":"Cenotaphs","description":"","created_at":"2019-02-11 13:03:38","updated_at":"2019-02-13 05:42:28","sort_order":63,"photo_location":"Tikamgarh, Madhya Pradesh","photo_latitude":"","photo_longitude":""},{"id":62,"user_id":null,"album_id":1,"title":"Orchha","description":"","created_at":"2019-02-11 13:03:38","updated_at":"2019-02-12 19:08:07","sort_order":62,"photo_location":"Tikamgarh, Madhya Pradesh","photo_latitude":"","photo_longitude":""}]

Was wondering since, we are getting id for each photo in the album, could there be a way to fetch it via that method.
Sincere thanks for your time and help on this :)

It's worth also trying just $albums->load('photos.image'); but I was sure one of those two should have worked.
Yes, off course you can fetch images by id, but it would be very ineffective to run a query to fetch each image. Images should be eager-loaded, I just don't see yet why they are not. Maybe because they are related using October attachment and not original hasOne/belongsToOne.
I think it's also worth to try this:
function onRun()
{
    $albums->load(['photos' => function ($query) {
      $query->with('image');
    }]);
}

Also note that even if it works and attached image will be loaded, you shouldn't access thumbs as {{ photo.thumb }} because that thumb is created in the component's prepareAlbums() method and it is't happening for photos you've just loaded. So I believe you should access your image' thumb like this:

Hi Graker,
Thanks for your incredible help and support. I was finally able to crack this using
 {% for album in albumList.albums %}
    {% for photo in album.photos %}

    {% endfor %}
 {% endfor %}

On side note: Even if we do not put onRun() code for eager loading, we still get all the photos for that album
Thanks once again :)

Hi @Nvironmental ,
It does because Laravel lazy-loads each relation when you're accessing it. But it leads to running as much DB queries as there are photos. So if you'd install a debugbar and inspect DB queries made for the request, I believe you'd see N requests to photos table and N requests to images table where N is overall amount of photos. And if I wrote that last sample of eager-loading code correctly, running with it in place would show exactly 1 query to photos and 1 query to images.
So I'd recommend to keep eager-loading code for better performance (that is if it works).

Absolutely! Thanks for your inputs 👍 Cheers 🥂


ref(list-repos): work on a whitelist vs a blacklist

The number of Workflow-related repos that work on the Deis Workflow milestone/issue timeline is
far fewer than the total repositories listed in the deis org. Instead of automatically adding new
repos to the list (like private repos unrelated to Workflow), let's whitelist repos instead.


As a learner, I want a path to go from learning about use cases to experimenting with IBM Quantum

there is currently support for learning paths as well as problems sets. integrating the two such that problem sets are presented after going through a learning path could suffice the requirements for an MVP of this experience
Goal

Learners should be able to see a linear collection of units, and an assessment at the end
Learners should be able to find and start Learning Paths as soon as they land on the platform

Acceptance criteria
No response
Out of scope
No response
Future of feature
No response
Resources
No response
Tasks
No response

This repository is no longer maintained. It has been superseded by IBM Quantum Learning.


Change between 2.2.1 and 2.2.2 on gene abundance estimation with '-e' parameter

Dear stringtie developer,
I noticed a strong change between version 2.2.1 and 2.2.2 when I run stringtie with the -e option. It seems that all lowly expressed genes went to 0.
Here is an example of output with version 2.2.1 on a small dataset:

Here is the output with the same command line but version 2.2.2:

If you need a small dataset, I put a small BAM with reads covering a single gene and the associated gtf in usegalaxy.org.

Thank you for this report and for providing the files to reproduce this issue.
Looking at the two BAM files I see there, it seems only the small_BAM_SR BAM file (data 7) is triggering this issue, but not the  small_BAM_PE file (data 2), correct?

Note to self & @mpertea: it seems this is related to #238 and the last version of the #357 bug, and the new development branch might have the fix for all of them. I'll work on back-porting and testing that possible fix.

Thank you for this report and for providing the files to reproduce this issue.
Looking at the two BAM files I see there, it seems only the small_BAM_SR BAM file (data 2) is triggering this issue, but not the small_BAM_PE file (data 7), correct?
[EDIT: fixed the data #s]

On the minimum example yes because I put a single gene where the coverage is below 1 for the small_BAM_SR and above 1 for the small_BAM_PE. So, I suspect this comes from the level of expression.
For the PE without subsetting I get (left is 2.2.1, right is 2.2.2):

If you want, I can share with you the full BAM and gtf.


test: Setup tests

Hello @Haider8! Thanks for opening this PR.

In the file app/tests/api/api_v1/test_users.py:

Line 2:1: F401 'sqlalchemy.orm.Session' imported but unused

Do see the Hitchhiker's guide to code style


(WIP) Implement Mapping Protocol

This revision implements mapping protocol
get_item, set_item, del_item in the TypeProtocol will be improved by using fast-path which is provided by mapping protocol.
With mapping protocol, this new issue can be fixed with PyMapping::check (Not yet pushed)
According to docs and cpython implementation mapping proxy type must created only with mapping type.
>>>>> from types import MappingProxyType
>>>>> MappingProxyType(1) #RustPython
<mappingproxy object at 0x563e680e4470>
>>> MappingProxyType(1) #CPython 3.8
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: mappingproxy() argument must be a mapping, not int

After #3115 merged, PyMapping and PyMappingMethods will be moved to vm/src/protocol/mapping
But current implementation miswork in below codes, which leads to CI fail (WIP..)
import enum
class test(enum.IntFlag):
    ASCII = 256
test.__members__.items() # must print dict_items([('ASCII', <test.ASCII: 256>)]) but empty..

before more proceeding, I want to know that I am going right way.

Documents

https://docs.python.org/3/c-api/mapping.html

could we merge AsMapping and PyMappingMethods

check for update_slot in pytype.rs. it is mandatory for protocols using slots

I feel a little bit confused with using update_slot currently.
with update_slot we can update one slot that have exactly same signature with the given new method defined in python-side.
but as_mapping have three sub-slot(function) and if __getitem__ is defined in python-side, I need to update as_mapping to return PyMapping struct with only subscript field modified. How can I achieve this?..

you need only single function slots::AsMappingFunc. Maybe you will get idea from richcompare.
roughly:
"__getitem__" | "__setitem__" | "__delitem__" => {
    let func: slots::AsMappingFunc = |zelf, vm|  PyMapping {
        get: vm.get_class_attr("__getitem__").unwrap_or(getitem_fallback),
        set: vm....
        del:...
    };
}

fn getitem_fallback(zelf: PyObjectRef, key: PyObjectRef) -> PyResult {
    super().getitem(key)  // something like this
}

Ah! I got it. Thanks 😊

Now update_slot and mappingproxy trait works as normal
>>>>> mappingproxy = type(type.__dict__)
>>>>> mappingproxy({"ASCII": 256})
<mappingproxy object at 0x55bb16b37560>
>>>>> mappingproxy([1,2,3])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: mappingproxy() argument must be a mapping, not list

but update_slot routine for slot which have multiple  sub_slots is somewhat horrible now.
I think there need something like #[pyslotstruct] for a struct which have multiple #[pyslot]
Another slots in current rustpython has only one function that corresponded to its slot.
But mapping protocol, sequence protocol and number protocol have multiple slots..

looks great!
I think mapping protocol has only one slot as_mapping but having multiple python magic methods. (probably you wanted to point this out)
Maybe this is time to check how CPython handle this.


Using IssuedCurrencyAmount to specify amount in Payment transaction fail

I'm having troubles sending issued currencies payment transactions, I'm using "IssuedCurrencyAmount" to specify the amount of my Payment transaction but I receive the following error:
xrpl.models.exceptions.XRPLModelException: amount expected a typing.Union[xrpl.models.amounts.issued_currency_amount.IssuedCurrencyAmount, str], received a <class 'dict'>

I'm not sure what to make of it, when using "IssuedCurrencyAmount" with "TrustSet" to remove a Trustline it's working as expected.
Here is my code (it crashes at the "my_tx_payment_signed" line)
my_tx_payment = Payment(
    account=senderWallet.classic_address,
    amount=IssuedCurrencyAmount(
        currency=currencyCode,
        issuer=issuerAddress,
        value=paymentAmount,
    ),
    destination=receiverWallet
)

my_tx_payment_signed = safe_sign_and_autofill_transaction(my_tx_payment, senderWallet, client)

And here is "my_tx_payment":
Payment(account='senderWallet', transaction_type=<TransactionType.PAYMENT: 'Payment'>, fee=None, sequence=None, account_txn_id=None, flags=0, last_ledger_sequence=None, memos=None, signers=None, source_tag=None, signing_pub_key='', txn_signature=None, amount=IssuedCurrencyAmount(currency='currencyCode', issuer='issuerAddress', value=4.20), destination='receiverWallet', destination_tag=None, invoice_id=None, paths=None, send_max=None, deliver_min=None)

I'm sure I'm missing something but I don't know what?

The only issue I can see with your code is that it should be destination=receiverWallet.classic_address (but that generates a different error message than what you got). I tried running your code locally (after fixing that issue) and it works fine for me.
Can you send the whole stack trace? Also, what version of xrpl-py are you using?

My variable "receiverWallet" represent the receiver wallet address string directly (eg: "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn"), so I guess this should not be the issue right?
Sure, here is the whole stack trace:
  File ".\main.py", line 229, in makePayment
    my_tx_payment_signed = safe_sign_and_autofill_transaction(my_tx_payment, senderWallet, client)
  File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\xrpl\transaction\main.py", line 120, in safe_sign_and_autofill_transaction
    check_fee,
  File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\asyncio\runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 584, in run_until_complete
    return future.result()
  File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\xrpl\asyncio\transaction\main.py", line 114, in safe_sign_and_autofill_transaction
    await _autofill_transaction(transaction, client), wallet, False
  File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\xrpl\asyncio\transaction\main.py", line 196, in _autofill_transaction
    return Transaction.from_dict(transaction_json)
  File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\xrpl\models\transactions\transaction.py", line 356, in from_dict
    return correct_type.from_dict(value)
  File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\xrpl\models\transactions\transaction.py", line 367, in from_dict
    return cast(Transaction, super(Transaction, cls).from_dict(value))
  File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\xrpl\models\base_model.py", line 97, in from_dict
    param, class_types[param], value[param]
  File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\xrpl\models\base_model.py", line 173, in _from_dict_single_param
    raise XRPLModelException(error_message)
  xrpl.models.exceptions.XRPLModelException: amount expected a typing.Union[xrpl.models.amounts.issued_currency_amount.IssuedCurrencyAmount, str], received a <class 'dict'>

Thanks for your help!

I just realized that the latest version is 1.3.0, after updating it is indeed working!
Sorry for the inconvenience, I guess that was the issue.

Glad to hear that! It was probably a bug that we fixed, then.


Code Block copy button not working

Am I alone on this?

rewrote use-copy-clipboard.tsx to this and now it works
Original
import { useState } from "react"

export interface useCopyToClipboardProps {
  timeout?: number
}

export function useCopyToClipboard({
  timeout = 2000
}: useCopyToClipboardProps) {
  const [isCopied, setIsCopied] = useState<Boolean>(false)

  const copyToClipboard = (value: string) => {
    if (typeof window === "undefined" || !navigator.clipboard?.writeText) {
      return
    }

    if (!value) {
      return
    }

    navigator.clipboard.writeText(value).then(() => {
      setIsCopied(true)

      setTimeout(() => {
        setIsCopied(false)
      }, timeout)
    })
  }

  return { isCopied, copyToClipboard }
}

New
import { useState } from "react"

export interface useCopyToClipboardProps {
  timeout?: number
}

export function useCopyToClipboard({
  timeout = 2000
}: useCopyToClipboardProps) {
  const [isCopied, setIsCopied] = useState<Boolean>(false)

  const copyToClipboard = (value: string) => {
    if (!value) {
      console.warn("No value to copy")
      return
    }

    if (typeof window === "undefined") {
      console.warn("Window object not available")
      return
    }

    if (navigator.clipboard?.writeText) {
      navigator.clipboard
        .writeText(value)
        .then(() => {
          setIsCopied(true)
          setTimeout(() => setIsCopied(false), timeout)
        })
        .catch((err) => console.error("Failed to copy to clipboard:", err))
    } else {
      // Fallback to document.execCommand('copy')
      const textarea = document.createElement("textarea")
      textarea.value = value
      document.body.appendChild(textarea)
      textarea.select()
      document.execCommand("copy")
      document.body.removeChild(textarea)
      setIsCopied(true)
      setTimeout(() => setIsCopied(false), timeout)
    }
  }

  return { isCopied, copyToClipboard }
}

@hannesrudolph The Original code works for me.

@thehackergpt what browser are you using?

@hannesrudolph The Original code works for me.

What browser are you using? Also, the code I implemented is the same mechanism to copy as used for the copy button on the post/entry. Not sure why they were different. The only difference is I kept both mechanism on the one I implemented onto the code box.

@hannesrudolph The Original code works for me.

What browser are you using? Also, the code I implemented is the same mechanism to copy as used for the copy button on the post/entry. Not sure why they were different. The only difference is I kept both mechanism on the one I implemented onto the code box.

I tried on Firefox and Safari. Could it be a problem with browser extensions?

extensions?

I use chrome. Let me check if it's an extension. That should have been my first thought. Duhhhh. Yesterday after installing big-agi I also experienced the same problem so that would make sense. I'll report back.

@hannesrudolph The Original code works for me.

What browser are you using? Also, the code I implemented is the same mechanism to copy as used for the copy button on the post/entry. Not sure why they were different. The only difference is I kept both mechanism on the one I implemented onto the code box.

I tried on Firefox and Safari. Could it be a problem with browser extensions?

It appears that Chrome is blocking the clipboard API because the website is not using HTTPS. TBH I have no clue how to get the local site to run https. I think thats my best bet.

Bump

You can enable cut / copy with http if you add the flag  -- unsafely-treat-insecure-origin-as-secure=http://hostname:3000
edge://flags/#
I wasn't able to find documentation for https either.

My site browser would not allow clipboard access on http because of a company profile I am using in google chrome. I just rewrote that snippet. I'm not running edge.

My site browser would not allow clipboard access on http because of a company profile I am using in google chrome. I just rewrote that snippet. I'm not running edge.

Chrome and Edge are the same thing

My site browser would not allow clipboard access on http because of a company profile I am using in google chrome. I just rewrote that snippet. I'm not running edge.

Chrome and Edge are the same thing

? I'm not computer illiterate but I'm clearly behind on things.

My site browser would not allow clipboard access on http because of a company profile I am using in google chrome. I just rewrote that snippet. I'm not running edge.

Chrome and Edge are the same thing

? I'm not computer illiterate but I'm clearly behind on things.

He means you can use the same method on Chrome as you can on Edge because Edge is built on Chromium.
Instead of using edge://flags/# navigate to chrome://flags/#, then you can search for unsafely-treat-insecure-origin-as-secure. Add the address you need to access (ie http://<IP_ADDRESS>:3000) to the associated field, enable the flag, and restart the browser.
This worked for both Edge and Chrome on my Android tablet for me.


ffmpeg not starting

Getting this error whenever I try to open a video file. This only happens when the extension is on.
Failed to prepare video for anki export: ffmpeg didn't start: WebAssembly.Memory(): could not allocate memory
Error: ffmpeg didn't start: WebAssembly.Memory(): could not allocate memory
at FFmpeg.createCore (chrome-extension://ohcbgkombhgcbjcikjlgdmjkpibafppa/bg/js/ffmpeg.js:52:19)
at FFmpeg.load (chrome-extension://ohcbgkombhgcbjcikjlgdmjkpibafppa/bg/js/ffmpeg.js:60:38)
at handleMessage (chrome-extension://ohcbgkombhgcbjcikjlgdmjkpibafppa/bg/js/ffmpeg_worker.js:17:33)
at onmessage (chrome-extension://ohcbgkombhgcbjcikjlgdmjkpibafppa/bg/js/ffmpeg_worker.js:32:5)

Yeah, it's the extension failing, so it'll only prevent you from making flashcards.
This one's puzzling me though, since I can't reproduce it on my machine. Based on the error message, my initial instinct is to ask how much RAM your machine has available, though I'm not sure that would be the issue. It's failing to start the WebAssembly version of ffmpeg (what I use to record flashcards), but that shouldn't be memory intensive at all. It's also failing before it even tries to load your video, so it likely has nothing to do with what video you use.
I'm hoping it's not a chrome flag set wrong (e.g. something to do with WebAssembly), but you could probably test that by trying it out on a clean browser. What browser are you using by the way?

I have 64gb of ram.
Actually I was using the latest 32 bit of chrome.
I changed to the 64 bit version and this is not happening anymore :).
Maybe this is the underlying issue https://v8.dev/blog/4gb-wasm-memory ??

Looks like other people are dealing with this too.
https://github.com/ffmpegwasm/ffmpeg.wasm/issues/228
The default ffmpeg.wasm build specifies INITIAL_MEMORY at 2GB, so I'd say that's too big for 32-bit applications. Also, the project just wants 2GB available to load large videos into memory, so I think it'd be more idiomatic to specify INITIAL_MEMORY small and set ALLOW_MEMORY_GROWTH, MAXIMUM_MEMORY appropriately in the emscripten build so it can grow to 2GB. Since I'm already building my own version of ffmpeg.wasm (https://github.com/animebook/ffmpeg.wasm-core), I can look into changing that.
Regardless, I'm reading videos off disk (not loading them into memory) so I shouldn't need the 2GB anyway.

Updated the ffmpeg memory settings. If you happen to go back to 32-bit Chrome for any reason, let me know if breaks again.


check empty params lists passed

This checks all functions taking an OSSL_PARAM list as to whether missing parameters have a negative impact to their logic.
Fixes #295.

This looks like a great fix. Thanks Michael!


Do not update IOU total when IOU requests are submitted offline and the currency differs from the iouReport currency

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:

Request money from a user in USD, + > Request money
Go offline
Send another money request, but this time set a different currency, e.g. AED
Notice that the IOU preview just sums up the amount in USD and AED, without considering the exchange rate so the USD total displayed is incorrect
Go online and notice that the total is updated to the correct USD amount

https://user-images.githubusercontent.com/22219519/199781387-6e0356c0-7edc-49dc-8392-7a7cb2470403.mov
Expected Result:

Coming from this thread, we decided that the total amount should not be updated if offline requests are submitted in a currency that is different than the currency on the iou report.
Additionally, if the iouReport has requests in different currencies and the user is offline, we should disable the Pay button cc @youssef-lr @sketchydroide since you are working on the Pay IOU flow refactors.

Actual Result:
Amount is summed up without taking the exchange rate into consideration
Workaround:
N/A
Platform:

Where is this issue occurring?

Web
iOS
Android
Desktop App
Mobile Web

Version Number:
Reproducible in staging?:
Reproducible in production?:
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:
Slack conversation:
View all open jobs on GitHub

Looks like the Internal issue doesn't randomly assign yet, so I've added the Engineering label in it's place.

For context, this is a high-value bug in conjunction with API Unchained.

@luacmartins just pushed a fix for this one, I'm curious if I missed anything as it was a relatively simple change.

Nice! I'll review it on monday!

Thanks for the quick work @youssef-lr!

On-going review in the linked PR.

Unassigning myself since looks like @youssef-lr has a fix for this 👋

Waiting for @rushatgabhane's testing.

Nice work! @rushatgabhane now that you're unblocked on testing, will you be able to handle in the coming days?

Thanks @youssef-lr! I need to make time for the regression test, as I think we should add one for this case. I ran out of time today though.

Alright, time to circle back on the testing script. I posted a recommended update for our TestRail IOU test in Slack.

In the meantime, @rushatgabhane it looks like you helped on the linked PR. I went ahead and temporarily added external so that we could get an Upwork job created. Posting is above!

Hired @rushatgabhane via Upwork. I'll circle back tomorrow to confirm he's been able to accept and issue payment.

Nice, paid via Upwork!

Ok the regression test has been added. @youssef-lr please comment in the linked PR in case I missed anything. Everything else is checked off, so I think we're done here! Closing.


Type Hint for bids_dataframe.py

Checklist
GitHub

[x] I've given this PR a concise, self-descriptive, and meaningful title
[x] I've linked relevant issues in the PR body
[x] I've applied the relevant labels to this PR
[x] I've assigned a reviewer

PR contents

[x] I've consulted ivadomed's internal developer documentation to ensure my contribution is in line with any relevant design decisions
[x] I've added relevant tests for my contribution
[x] I've updated the relevant documentation for my changes, including argparse descriptions, docstrings, and ReadTheDocs tutorial pages

Description

type hinting for bids_dataframe.py
Linked issues

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

9 of 9 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 68.853%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
4094

Relevant Lines:
5946

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

For more information on this, see Tracking coverage changes with pull request builds.
To avoid this issue with future PRs, see these Recommended CI Configurations.
For a quick fix, rebase this PR at GitHub. Your next report should be accurate.

Details

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+3.1%) to 71.908%

Totals

Change from base Build<PHONE_NUMBER>:
3.1%

Covered Lines:
4093

Relevant Lines:
5692

💛  - Coveralls


How to change the port used

Describe the bug
When attempting to run "asa gui" I get the following error.
[05:47:23 INF] AttackSurfaceAnalyzer v.2.3.297+8f3ee6911a
Unhandled exception. System.IO.IOException: Failed to bind to address http://localhost:5000.
This is a corporate machine and only specific ports are allowed.
To Reproduce
Steps to reproduce the behavior:

type "asa gui"
Exception occurs due to the port being blocked.

Expected behavior
The tool runs as expected.
System Configuration (please complete the following information):

OS: Windows 10
OS Version:  Windows 10 Pro 21H2 v19044.2846
Application Version:  v.2.3.297+8f3ee6911a
CLI or GUI: GUI

Hi @huntantr,
Thanks for the feedback! This isn't currently possible, but I've added this functionality to enable your scenario in #693. New version should be out later today with this functionality using asa gui --port xxxx

Fixed with #693.

Thanks for the fast turn around.


[c++] Simplify internal API for dataframe-resizer

Issue and/or context: As tracked on issue #2407 / [sc-51048].
Note that the intended Python and R API changes are all agreed on and finalized as described in #2407.
Changes:
While the full-generality upgrade_domain is tasked out on #2407, the foremost use-case for append mode, and tests/testthat/test-write-soma-resume.R for PR #3089, will need a simpller keystroke-saver which is already implemented in C++.
What this existing method does in C++ is resize the soma_joinid dim, if it's a dim, and leave the other dims as-is; if soma_joinid is not a dim, leave it as-is. This exists in C++, it's unit-tested in C++, and it's ready (and it's time) to be plumbed up to Python and R as well.
I realize now that having C++ maybe_resize_joinid take a length-1 vector, and assert that it's length-1, is silly -- it should simply take a single int64_t. This PR does just that. It also removes the confusing prefix maybe_.
Notes for Reviewer:

Thanks @nguyenv !


Type parser on macOS does not use Darwin target

Version and Platform (required):

Binary Ninja Version: Anything that has the new clang type parser
OS: macOS
OS Version: Any
CPU Architecture: Any

Bug Description:
The type parser, on my M1 MacBook, is using a triple that's something like arm64-unknown-mac-unknown-unknown. This is super unfortunate because there are a number of types common to Apple platforms that are not recognized by the type parser since the sys part of the triple isn't darwin. Trying to override this via the GUI or the API by passing your own triple as an option just leads to errors that make it appear this doesn't even make it to the arguments list.
Steps To Reproduce:
Please provide all steps required to reproduce the behavior:

Try to use the type parser to parse a type like typedef ALvoid (*alSourceNotificationProc)(ALuint sid, ALuint  notificationID, ALvoid* __nullable userData); on macOS
Observe that the __nullable is not recognized, leading to an error: expected ')'
Note that in clang's test suite, this requires the darwin system to be specified
Bonus: Attempt to override the triple, observe that it's not possible

Expected Behavior:
I can't imagine a scenario in which having darwin as the default system would be inappropriate if you've got an Apple binary. So, I would heavily advocate for changing the default.
Additional Information:
This is one of the many bugs blocking #2735 from being possible.

There were actually two bugs. Both are now fixed and should be available in builds >= 3.6.4557.


GA4GH invalid /tools/{id} endpoint handling

Bug Report
Expected behaviour
curl -X GET "https://dockstore.org:8443/api/ga4gh/v1/tools/potato" -H  "accept: application/json"
should result in a useful error message
Actual behaviour
Message returned is
{
"code": 500,
"message": "There was an error processing your request. It has been logged (ID fb156a32b3295403)."
}
Steps to reproduce the behaviour
curl -X GET "https://dockstore.org:8443/api/ga4gh/v1/tools/potato" -H  "accept: application/json"

:+1:


[FEATURE] Add an option for donation from visitors

Description
A brief compelling story with a warm nudge to make donation would be really useful for this site
Screenshots
No response
🥦 Browser
Google Chrome
Checklist ✅

[X] I checked and didn't find similar issue
[X] I have read the Contributing Guidelines
[X] I am willing to work on this issue (blank for no)

Hi @Vedant-MAHAjan , can you perhaps explain in Detail what are you trying to implement as we already have a donation system in place?

Notice 🚩
Hi there, unfortunately, I have to close this Issue/PR, as there is no work currently going on for the same. There might be more Issues/PR which are waiting for this to be completed - so it is better to pace things up. I generally spend/wait for 3 weeks before closing.
If you think that this is a mistake, please drop a mail at<EMAIL_ADDRESS>and we will get back to you.
Regards,
Team Milan.


Join the dhall-lang umbrella project

@Gabriel439 suggested that it might be a good idea to have vscode-dhall-lsp-server and dhall-lsp-server under the same roof since they are meant to be used in tandem in any case.
Also, since the VSCode integration is now in a very useable state, it may be time to go official as it were. What are your thought on this, @PanAeon?

I'm totally for it! Just a few things:

we might want to transfer Dhall Language Support (syntax highlighting) plugin as well
"vscode-dhall-lsp-server" name feels a bit boring for me. Maybe we can change it to something shorter. The display name in the marketplace is "Dhall LSP Server".
When I published it I was young and stupid and published it using my own publisher. I think I'll create a new publisher, the only thing is that I'll have to re-publish the extensions which will drop stats for them and users will have to reinstall them. It looks like a publisher can be owned by multiple member, so then I'll add you to its members.

* we might want to transfer Dhall Language Support (syntax highlighting) plugin as well

Good idea!

* "vscode-dhall-lsp-server" name feels a bit boring for me. Maybe we can change it to something shorter. The display name in the marketplace is "Dhall LSP Server".

I second that.

* When I published it I was young and stupid and published it using my own publisher. I think I'll create a new publisher, the only thing is that I'll have to re-publish the extensions which will drop stats for them and users will have to reinstall them. It looks like a publisher can be owned by multiple member, so then I'll add you to its members.

To be honest I've got no idea what the process to publish a VSCode extension looks like... Regarding resetting of statistics etc. I think we can do that once, especially now where the extension isn't all that popular yet.

"vscode-dhall-lsp-server" name feels a bit boring for me. Maybe we can change it to something shorter. The display name in the marketplace is "Dhall LSP Server".

The name might be boring, but it expresses very clearly what the project is about and it's pretty searchable. It could be worse! ;)

On second thought, shouldn't the VSCode plugin be called "Dhall LSP client"?

My advice is to use the same naming convention that other language plugins use (whatever that is, I haven't checked yet)

I think its time to get things moving. From what I see the following is to be done:

Transfer ownership of the repo to the dhall-lang organisation (according to this document this seems to require some kind of permissions inside the organisation?)
Document/script the release process (i.e. publishing the extension to the vscode marketplace)
(optional) Add another user (potentially controlled by @Gabriel439) with publishing rights to @PanAeon's marketplace account.

Step 1 being the most urgent of course. @PanAeon could you try transferring ownership and inform us if github complains about permissions?
Regarding steps 2 and 3, I think 2 would take work off @PanAeon's shoulders (and also be useful long term), while we can postpone 3 for the time being. We can talk about re-publishing the extension under a different 'publisher' later.

@EggBaconAndSpam

Hi, I can't transfer the repository to the dhall-lang project because I don't have permissions to create a public repo there. So Gabriel needs to either give me a temporary permissions or just to push the code to a new repo. We've got like 4 issues open right now I think it's not a problem to manually recreate them.
In pinciple, the process is documented in details here, but I think I'll still create Publishing.md or something where I'll put the exact steps.
I think this step is quite important, in case I'm unavailable we need other people to have ways to update the extension on the marketplace. @EggBaconAndSpam  If you OK with creating an azure account and personal access token as in publishing extensions guide then I'll add you to a new publisher, we'll check that everything is fine and then I'll move the extension to it. What do you think?

@PanAeon: Try now.  I think I gave you permission to transfer a repository to dhall-lang

@Gabriel439 Hi, Github still says "You don’t have the permission to create public repositories on dhall-lang". Btw I'll also transfer syntax highlighting plugin as  well.

@PanAeon: You may need to accept the invite first before you have permission

@Gabriel439 Still the same. Maybe I've got the default read permissions?

@PanAeon: Whoops, my mistake.  I sent a new invite

The transfer appears to be successful! 🎉

Yay!


Code example does not work

I copied and pasted the same code from the examples. It does not compile.
I am lost here.

Hi @xiangsgao , thanks for the report. I've just published an updated version, 0.11.0, which works with Tonic version 0.11.0, so if you update your Cargo.toml, it should work now.

awesome, works like a charm


setStrokeColor() does not work?

I did this:
 button.setFillListener(new HoldToLoadLayout.FillListener() {
        @Override
        public void onFull() {
            button.setStrokeColor(R.color.target_green);
            button.setDuration(1000);
        }

        @Override
        public void onEmpty() {
            button.setStrokeColor(R.color.blue_accent);
            button.setDuration(2000);
        }
    });

The duration changes correctly, while the color does not... Am I doing something wrong?

Hello ! I've been away a little while and couldn't take care of issues for about a month now. Sorry for that, I'll check it out and respond ASAP.

Hello,
First of all sorry for late response, things got quite busy at work, I definetely had no time to take a look :(
Duration is used in animators dynamically therefore updating duration shows It's effect immediately.
On the other hand, setStrokeColor method was intended to set stroke's color up before beginning the draw process. It does not update paint. Therefore, there's no change in stroke color after updating it later on. Since updating the paint won't do any effect on drawn visual and I'm not actually using my own canvas ( or any refs to canvas I'm drawing ), It's not able to draw the progress once more even if you upload the paint.
If I have time, I'll look into adding dynamic updates later on.


Make Main require approval

Make Main require approval or Status Checks Pass
Or relevent rule to avoid accidental merging direct to main while testing new environments.

Noting that I made a number of accidental merges 👎


python string wrapper?

Converting strings from Python is of course really expensive because it involves a lot of copying and not even of contiguous blocks of data.  Once you start getting above a few MB of data converting strings starts to look like a really bad option.  The Py objects can do a lot, but they are not AbstractString so they don't really look like strings on the Julia end until you convert them.
Any interest in creating some kind of PyStr wrapper that provides an AbstractString interface for Py's?

I've just done a quick benchmark with x = "a"^100_000_000 and y = Py(x):

x * "b" takes 17ms
Py(x) takes 33ms
pyconvert(String, y) takes 41ms

So conversion to/from Python strings appears to be within a small factor of optimal.
Is it that you don't want to pay this conversion cost at all, or have limited memory and therefore want a lazy wrapper?
I'm not against adding PyString, but AFAIU Python strings have no defined storage representation so there is no good way to access its codepoints or do fast random access to its characters. I think the best you can do is explicitly encode the string as UTF8 first, which is exactly what conversion to String does.
We could have a PyString wrapper type which simply uses ordinary Python indexing to access substrings and characters, but this will be sloooow.

I think the problem is that it doesn't scale well.  I don't have a MWE but I have observed converting large sets of strings to be much more expensive.  I think the reasons for this are the burden on the garbage collector and that the memory holding the strings is not in general contiguous as in your example with one large string.
I'm aware that PyString would still have enormous disadvantages, but it might be "good enough" in some cases.  For example, I recently had to get $\sim 10^7$ strings from Python but there were only $\sim 100$ distinct strings, and my task was much faster by encoding them with a hash or whatever rather than trying to copy them.  In my case not having a PyString didn't matter much, but sometimes it may... on the other hand maybe in cases where you would really need a PyString it's just not worth it and you should just convert 🤷
I'm not sure it's the right approach, it was just a thought.

The main use for a wrapper is to provide a zero-copy interface to a mutable object. A secondary use is to access only a small portion of a large container. I can't think of more uses than these two. If you don't have either of these uses (i.e. you are only reading, and will read most of the container) then usually you're better off eagerly converting the container instead.
Strings are immutable, which leaves only the second use, i.e. reading a small portion of a large string. But then you may as well just take the relevant substrings on the python side before converting. Maybe that's not always possible (e.g. this is happening inside a function which is acting generically on strings).

That's interesting, if strings ever use UTF-8 internally then we could add a PyString wrapper. Until then I don't think a wrapper would gain much so gonna close this issue for now. Feel free to reopen whenever.


Support for onTextData and onCuePoint

Adds support for onCuePoint and onTextData to http-flv.

Merged, thank you!


Create a new pull request by comparing changes across two branches

[ ] Have you followed the guidelines in our Contributing document?
[ ] Have you checked to ensure there aren't other open Pull Requests for the same change?
[ ] Have you added an explanation of what your changes do and why you'd like us to include them?
[ ] Have you written new tests for your changes? Here's an example.
[ ] Have you successfully run brew style with your changes locally?
[ ] Have you successfully run brew typecheck with your changes locally?
[ ] Have you successfully run brew tests with your changes locally?

Codecov Report

Merging #1053 (fb7d19c) into master (813f751) will decrease coverage by 0.06%.
The diff coverage is 29.85%.

@@            Coverage Diff             @@
##           master    #1053      +/-   ##
==========================================
- Coverage   68.26%   68.20%   -0.06%
==========================================
  Files         482      482
  Lines       28334    28369      +35
==========================================
+ Hits        19341    19349       +8
- Misses       8993     9020      +27

Impacted Files
Coverage Δ

Library/Homebrew/commands.rb
89.74% <0.00%> (ø)

Library/Homebrew/formula_auditor.rb
50.00% <ø> (ø)

Library/Homebrew/resource_auditor.rb
56.16% <0.00%> (ø)

Library/Homebrew/style.rb
62.14% <0.00%> (ø)

Library/Homebrew/tap.rb
91.27% <ø> (ø)

Library/Homebrew/utils/curl.rb
47.76% <12.50%> (ø)

Library/Homebrew/cask/audit.rb
20.23% <20.00%> (-0.05%)
:arrow_down:

Library/Homebrew/dev-cmd/bottle.rb
66.83% <26.67%> (-3.20%)
:arrow_down:

Library/Homebrew/dev-cmd/pr-upload.rb
28.85% <27.27%> (-0.15%)
:arrow_down:

Library/Homebrew/cleanup.rb
72.37% <50.00%> (-0.18%)
:arrow_down:

... and 4 more

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 813f751...fb7d19c. Read the comment docs.


Updated exceptional handling to throw new ArgumentNullException

resolves #5055 Apply ArgumentNullException.ThrowIfNull to NLog source-code
Refactored Argument null exceptions to use the ArgumentNullException.ThrowIfNull Method

#5211 has raced this pull-request. Any objections to closing this pull-request ?

Closing as replaced by #5216


Close G12 recovery process

Trello: https://trello.com/c/mhab9cpq/826-1-as-a-developer-i-can-stop-suppliers-submitting-draft-services-after-the-deadline
Once the deadline arrives, we want to stop suppliers involved in the recovery from being able to edit and submit their draft services.
Make the simplest possible change to implement this - suppliers will now get 404s if they try to do either.
This should be something small and low-risk we can deploy at the deadline. After the deadline, we can tidy up all the other G12 recovery code still lying around.
How to deploy
Merge this to master on the day of the deadline and get it through to staging. Deploy to production when the deadline hits.

@bjgill looks sensible to me, only thought is could we implement this behind config/env var? So it could be deployed now and the value changed at the intended time and we can then re-deploy the app to pick up the new config?

Hmm. That's a good point. I wonder if we can go one better, though, and do it automatically at the right time without a redeploy. I'll see if I can get that to work.

I think I've found a better way of doing this: https://github.com/alphagov/digitalmarketplace-supplier-frontend/pull/1347


Resizing confuses Affix about position

I identified a bug which is observable in all browsers.

That is a screenshot of Chrome, Edge and Firefox.
I'll be posting screenshots of Firefox for now.

Step
Result

Step 1 - Initial viewport

Step 2 - Scroll until affixed

Step 3 - Resize viewport

Step 4 - Scroll up

Step 5 - Reset viewport

It seems this issue goes hand in hand with all other Affix issues, but to me it looks like the 'initialization' of Affix doesn't take into account the current state, but continues where it left off.
I just wanted you to be aware of this. Keep up the good work! :+1:

Duplicate of #15845.


Integration with other tools

How are other people handling integration with other tools, .e.g, vim-go? Running commands like :GoInstallBinaries are fine because they run go and then figure out the GOPATH, but :GoDef expects a GOROOT and fails. Not saying that this is an issue for this tool to resolve, just presumably I'm not the first person to run into this problem.

@iJebus I usually use something like direnv to set env vars for each project. You can even do something like
go env | grep '^\(GOPATH\|GOROOT\)=' | sed -e 's/^/export /' >> .envrc
direnv allow .

if you just want to use the defaults.

Nice one.


Optional persistent menu hint icon

Add setting for persistent menu hint (default False to match current behavior)

Works for me with settings changes enabling/disabling on next view of the homescreen


Activate MPI functionality for sct_run_batch

Currently, sct_run_batch works with OpenMP, not MPI.  In clusters that can accommodate MPI, it would be nice to have that capabilities. In case we will implement it, we could re-use some of the code from an old (now deprecated https://github.com/neuropoly/spinalcordtoolbox/pull/2759) SCT function sct_pipeline.

suggestions from compute canada staff:
  As my colleague mentioned, the Python multiprocessing package only allows you to run in parallel within a single node and its CPU cores (from 32 to 48 cores, depending on the cluster and node). As for whether Niagara is the right cluster for this, perhaps not given that such a job is indifferent to the quality of the network connecting the compute nodes - you might be better running on one of the general purpose clusters like Béluga, Graham and Cedar. If you do wish to be able to use more than one node for your computations, another approach which might be better suited to your workflow is GNU Parallel,
https://docs.computecanada.ca/wiki/GNU_Parallel
or GLOST,
https://docs.computecanada.ca/wiki/GLOST

I was worried that this was the case, but had talked myself out of it. I think in order to get sct_run_batch to be more cluster aware would involve a substantial rewrite. @bcdarwin has worked on a cluster aware pipelining framework called pydpiper for a long time https://github.com/Mouse-Imaging-Centre/pydpiper, although he might suggest using an alternative framework depending on what the needs of the project are. Nipype supports slurm for instance https://nipype.readthedocs.io/en/latest/api/generated/nipype.pipeline.plugins.slurmgraph.html, and refactoring sct_run_batch to use nipype might be the path of least resistance.

@cfhammill i vaguely remember that we used to run sct_pipeline in MPI mode, see here. It doesn't seem like there is a lot of change required in the current code, but maybe i misunderstand the concept of how MPI should be used.

I think the code in sct_pipeline is sufficient to get MPI to run, but as I mentioned in the slack thread I don't think this will be smart enough to avoid starting too many jobs on a single node. We may be able to fix this in the slurm configuration for the job though. I'll work on adapting the current code, it should be relatively simple although there may be some subtleties switching from multiprocessing to futures. Then I can try to figure out the necessary configuration for niagara.
Another alternative I wasn't aware of, very recently @bcdarwin has had some success converting our code to use makeflow, this transparently handles a variety of different parallelization strategies (remote multiprocessing with torque/slurm, local single/multiprocessing with workqueue) this is probably more robust and handles restarting so that the pipeline is aware if steps don't need to be rerun. I think converting sct_run_batch to makeflow would be pretty straight forward, but it does incur an extra depency (although available through pypi). I suspect makeflow wouldn't be trivial to work effectively on niagara (1 slurm job per node, plus local parallelization on the nodes), but it would work like a charm on graham.

PR open adding this functionality, testing on niagara to make sure it works.

I'm having trouble getting time on niagara for an interactive job to test, will try again soon.

After fighting with MPI on niagara for a bit today it looks like the gcc compatible openmpi they have installed has a bug (intel compilers are more completely supported by Compute Canada as far as I can tell). I will report it and wait for an update.

After fighting with MPI on niagara as described in #2827 and determining that it would be a substantial effort, I think we should potentially close this issue for now. @jcohenadad do you agree? Or perhaps we can rename this, improve sct_run_batch cluster awareness, to remain open to alternative solutions to cluster based parallel computing.

@PaulBautin has put together a very useful script to break down a dataset and launch multiple SLURM jobs on a cluster.
@cfhammill i'm thinking we could include that script as part of SCT? or maybe as a separate repository (could be its own package), given the specific usage. What do you think?

I think it could potentially be generalized and be included in SCT. In it's present state it's very specific to a user in your compute canada group running on a SLURM cluster. Earlier we had discussed sct_run_batch being primarily for internal use (hence some of the design choices regarding email), so this may not be a problem.
It would be more satisfying to me if we had cluster awareness baked in to sct_run_batch, so that it could be used under a variety of cluster computing setups, but maybe this covers all of our use cases for now.


Add application for load testing

Add new ArenaLoadTest application under umbrella project to stress-test the Arena backend architecture.

Add new application under our umbrella project.
Add deploy scripts for the ArenaLoadTest app.
Add respective README markdown.
Start this new application when starting the umbrella project.
Add dummy behavior for the mocked clients that join the different games.

Will use bots from the bots application in the future (not developed yet).

Change credo TestFileExtension check due to app named *_test.ex

Solves the following issue #371
Next iterations will do the rest of #361 features.

I'm getting a weird error when i try to run tests with more than 99 client (i didn't tested the exact case where this starts to happen)
[info] Client waiting for game to join
** (IEx.Error) error when printing EXIT message: :undef

Interactive Elixir (1.16.1) - press Ctrl+C to exit (type h() ENTER for help)
*** ERROR: Shell process terminated! (^G to start new job) ***
DEFAULT FORMATTER CRASHED
DEFAULT FORMATTER CRASHED
DEFAULT FORMATTER CRASHED
DEFAULT FORMATTER CRASHED
DEFAULT FORMATTER CRASHED

Also when the tests are running we can see a lot of debug messages, is this intended? if we want to check that they are running maybe we should parse this message to something readable

Nice catch!
About the crash with more than 100 clients, you have to increase the number of file descriptors a process can consume. When you try to open more websockets than FD's your SO allows, it crashes.
You can increase the FD's by running (e.g. 10000 file descriptors):
ulimit -n 10000
I added this to the README file.
And about the second problem, I deleted the debug: :trace flag to avoid flooding the logs.


Format sublime's settings files

Hey @dzhibas
I was wondering if it would be hard to extend the formatter to support sublime text's settings files. They mostly follow json convention, but allow trailing commas and comments in the file. Do you think it is possible?

@niosus not possible with the current simplejson library. Not sure we'd want to move away from that as I don't believe there is a python library that supports jsonc. And when relying on non-python libraries you get slow results.


Scripted policy for bin picking

Finished up @avnishn's scripted policy for bin picking

Do not merge before #161


net: Go's DNS resolver retry AAAA request to next nameserver even A response has records

Go version
go version go1.21.5 linux/amd64
What operating system and processor architecture are you using (go env)?
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/root/.cache/go-build'
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/root/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/root/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.5'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build403659500=/tmp/go-build -gno-record-gcc-switches'

What did you do?
Problem
here is /etc/resolv.conf
nameserver <IP_ADDRESS>
nameserver <IP_ADDRESS>
options timeout:1 attempts:1

we have some private domain, it's only has A records, no AAAA, I use net.Dial("tcp", "domain:80") start a connect, the Go's DNS resolver retry AAAA request to next nameserver even A response has records.

if use cgo, no retry. like go build -tags 'netcgo' same program, the result is:

Reason
we debug find hit the errLameReferral error. but in glibc, it's different.
func checkHeader(p *dnsmessage.Parser, h dnsmessage.Header) error {
    ...
    // libresolv continues to the next server when it receives
    // an invalid referral response. See golang.org/issue/15434.
    if h.RCode == dnsmessage.RCodeSuccess && !h.Authoritative && !h.RecursionAvailable && err == dnsmessage.ErrSectionDone {
        return errLameReferral
    }
    ....
}

func (r *Resolver) tryOneName(ctx context.Context, cfg *dnsConfig, name string, qtype dnsmessage.Type) (dnsmessage.Parser, string, error) {
    ...
    for i := 0; i < cfg.attempts; i++ {
        for j := uint32(0); j < sLen; j++ {
            server := cfg.servers[(serverOffset+j)%sLen]

            p, h, err := r.exchange(ctx, server, q, cfg.timeout, cfg.useTCP, cfg.trustAD)
            ...
            if err := checkHeader(&p, h); err != nil {
                dnsErr := &DNSError{
                    Err:    err.Error(),
                    Name:   name,
                    Server: server,
                }
            ...
            }
    ...
}

in glibc A or AAAA anyone has records, no retry.
next_ns:
    if (recvresp1 || (buf2 != NULL && recvresp2)) {
      *resplen2 = 0;
      return resplen;
    }

...

if (anhp->rcode == NOERROR && anhp->ancount == 0
    && anhp->aa == 0 && anhp->ra == 0 && anhp->arcount == 0) {
    goto next_ns;
}

What did you expect to see?
if domain A type response has records, no AAAA retry, if domain AAAA type response has records, no A retry.
What did you see instead?
if domain A type response has records, AAAA has no record, AAAA request retry to next nameserver.

Does CL 550435 help with this?
Can you share the output of these commands?
dig @<IP_ADDRESS> abtest.bilibili.co A
dig @<IP_ADDRESS> abtest.bilibili.co AAAA
dig @<IP_ADDRESS> abtest.bilibili.co A
dig @<IP_ADDRESS> abtest.bilibili.co AAAA

Does CL 550435 help with this?

 All resolvers in /etc/resolv.conf should be recursive.
I suspect that CL 550435 helps, because the responses have an EDNS(0) resource (arcount != 0), so that the errLameReferral is not returned.

Yes, but there has two problem, CL 550435 only fix one.

What do you mean that there are two problems? What it fixes? What it did not fix?

@ianlancetaylor @neild per owners

Duplicate of #57697


Fixed spelling mistake for Malmo and Malaga

This mistake was pointed out in issue 73

Merged! Thank you so much :D


Cursor is moving to the beginning of the line when we select from the menu list

When we apply some style in contenteditable popup menu opens automatically. How can we prevent or open only when there is a keyboard event?

Regarding the issue with a moving cursor: can you share your code?
Regarding the second issue with menu opening when it shouldn't: this library is just a wrapper that doesn't open/close the menu by itself. I think you should search for a solution in the original library that is used underneath.


Problem with VRCX and steam vr

i am having a problem with VRCX cause when i run stream vr it works for a 1min or so then my headset goes grey then back to normal ect and on the steam vr window it says searching for head set and the icon for it is blinking so idk what to problem is

Not VRCX related.


Reuse empty Optional error message in other situations

When we are comparing Optional's content against something else and Optional turns out to be empty, we get:
Expecting:   <Optional.empty> to contain:   <10> but did not."
I made it reuse already defined error message for the empty Optional case:
Expecting Optional to contain:   <10> but was empty."

@pivovarit thanks for the PR !

:+1:


Add new opengraph image from coderefinery-artwork repository

The image is made in conjunction with a new workshop image.  Size is
pretty startard.
Review: general check, look at the image - and also check the
preview after merging to make sure it looks OK.

Such a great slogan! Thanks.


Remove integration test suite

It didn't do anything interesting that hadn't been incorporated (implicitly, for the most part) in other tests.
HIVE-1654

/assign @abutcher

I can't tell that this is testing anything not already covered.
/lgtm


Understand Fulfillment flow and its API

Name: protocol-server
Title: Understanding dsep-unified-bap-ui discovery flow
Description
The current DSEP unified BAP (Business Application Platform) is UI application for DSEP built with React Native and TypeScript.It connects to the client layer and provides a UI to the end user to interact with the DSEP network and search for courses, jobs, and scholarships.
Goals:
Understand the Fulfillment flow and the APIs being used for select/init/confirm requests and the request and response format.
Expected Outcome:
Understanding of the Fulfillment flow and the APIs used in the fulfillment of services/products and being able to debug and modify the code for select/init/confirm functionality. Understand the mapping of the request and response data with the screen elements.
Project:
Beckn
Organization Name:
Beckn Open Collective
Domain:
DSEP
Tech Skills Needed:

JavaScript
React
TypeScript
next.js
HTML/CSS
Postman

Complexity
Easy
Mentor
@ujjwal502 @vishi24

hi @ujjwal502 ! what exactly is the expected outcome for this issue ?


Enable OPTIONS preflight and a method to enable cros origins

Reasoning

At the moment, no support for OPTIONS request is implemented. This is the preflight request for CORS checks, thus API calls to a serverless function from a web browser is failing.

Changes

Enable preflight response [OPTIONS] with generic cors allow.
Export a function "cors" where you can specify the allowed origins.

tests are failing

@lholmquist I fixed the code, according to the tests and removed formatting differences. Can you take another look? Thanks

@giurgiur99 can you please add a test/tests for this new functionality?

@lholmquist I added tests for preflight and allowed origins


Add extra safe-guard to make sure the Ramp feature can be totatlly is…

…olated when there is no actived Ramp Items

Pull Request Test Coverage Report for Build 5177

0 of 121 (0.0%)  changed or added relevant lines in 1 file are covered.
10 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.01%) to 40.556%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
0
121
0.0%

Files with Coverage Reduction
New Missed Lines
%

azkaban-common/src/main/java/azkaban/jobExecutor/AbstractJob.java
2
37.93%

azkaban-common/src/main/java/azkaban/jobExecutor/AbstractProcessJob.java
3
52.58%

azkaban-exec-server/src/main/java/azkaban/execapp/FlowRampManager.java
5
8.83%

Totals

Change from base Build 5176:
-0.01%

Covered Lines:
12987

Relevant Lines:
32022

💛  - Coveralls


Help - 9470m Monterey

Hi Chris,
I did a clean install of Monterey following your guide.
Everything is working (including HD4000 patch) except Audio and Bluetooth.
when booting in verbose mode I can see some ACPI errors

.
Can you guide me on how to solve this ?
Thanks !

Check in EFI/OC/ACPI
if you have DSDT.aml

Nope..

.

How/where can i grab DSDT.aml ?

DSDT.aml not create
ssdt.aml is not from the program something wrong with this

You have to boot with an Opencore configuration generated by Media HP Laptop OC (no DSDT), then you you can use HP-ProBook-EliteBook-macOS.pkg to generate an EFI folder for your computer.

Thanks !
Just reinstalled everything again and this time all files are in place... don´t know what happened on the previous installation


Fix crash from accessing deleted SubtreeFileReader

This change keeps SubtreeFileReader instance in the loaders future context. Should fix https://github.com/CesiumGS/cesium-native/issues/774

Thanks @pjanetzek! Before we review your code, can you sign a CLA (contributor license agreement) here?

Yes we have a CLA for you, thanks @pjanetzek!


protobuf:x86-windows build failure

Host Environment

OS:  Windows 10
Compiler: revision

To Reproduce
Steps to reproduce the behavior:
./vcpkg install protobuf
Failure logs
$ ./vcpkg.exe install protobuf
The following packages will be built and installed:
protobuf[core]:x86-windows
Starting package 1/1: protobuf:x86-windows
Building package protobuf[core]:x86-windows...
Warning: The following VS instances are excluded because the English language pack is unavailable.
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools
Please install the English language pack.
-- Using cached C:/Users/w.frackowski/vcpkg/downloads/protocolbuffers-protobuf-v3.10.0.tar.gz
-- Using source at C:/Users/w.frackowski/vcpkg/buildtrees/protobuf/src/v3.10.0-3635dcc912
-- Configuring x86-windows
-- Building x86-windows-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:136 (message):
Command failed: C:/Users/w.frackowski/vcpkg/downloads/tools/cmake-3.14.0-windows/cmake-3.14.0-win32-x86/bin/cmake.exe --build . --config Debug --target install -- -v
Working Directory: C:/Users/w.frackowski/vcpkg/buildtrees/protobuf/x86-windows-dbg
See logs for more information:
C:\Users\w.frackowski\vcpkg\buildtrees\protobuf\install-x86-windows-dbg-out.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_build_cmake.cmake:96 (vcpkg_execute_build_process)
scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
ports/protobuf/portfile.cmake:55 (vcpkg_install_cmake)
scripts/ports.cmake:94 (include)
Error: Building package protobuf:x86-windows failed with: BUILD_FAILED

I think you need to verify if you have the English language pack installed, and if not install if for the version of visual studio you are using:
...
Starting package 1/1: protobuf:x86-windows
Building package protobuf[core]:x86-windows...
Warning: The following VS instances are excluded because the English language pack is unavailable.
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools
Please install the English language pack.
-- Using cached C:/Users/w.frackowski/vcpkg/downloads/protocolbuffers-protobuf-v3.10.0.tar.gz
-- Using source at C:/Users/w.frackowski/vcpkg/buildtrees/protobuf/src/v3.10.0-3635dcc912
-- Configuring x86-windows
-- Building x86-windows-dbg
...

Thanks for posting this issue. Please open a new issue if this is still a problem for you.


Unable to use plugin on Windows, project tests also failing

I'm trying to use this in a Metalsmith project I just started, but am getting an error regarding Invalid Paths on Windows.
It's reproducible in this project if I run npm test on my Windows machines. I see these failures:
  metalsmith-webpack
    1) should pack basic
    2) should pack complex

  0 passing (200ms)
  2 failing

  1) metalsmith-webpack should pack basic:
     Uncaught Error: Invalid path '\js\index.js'
      at pathToArray (C:\code\github\metalsmith-webpack\node_modules\memory-fs\lib\MemoryFileSystem.js:23:38)
      at MemoryFileSystem.readFileSync (C:\code\github\metalsmith-webpack\node_modules\memory-fs\lib\MemoryFileSystem.js:71:13)
      at C:\code\github\metalsmith-webpack\lib\index.js:20:34
      at Array.forEach (native)
      at C:\code\github\metalsmith-webpack\lib\index.js:16:48
      at Compiler.<anonymous> (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compiler.js:194:14)
      at Compiler.emitRecords (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compiler.js:282:37)
      at Compiler.<anonymous> (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compiler.js:187:11)
      at C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compiler.js:275:11
      at Compiler.applyPluginsAsync (C:\code\github\metalsmith-webpack\node_modules\tapable\lib\Tapable.js:60:69)
      at Compiler.afterEmit (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compiler.js:272:8)
      at Compiler.<anonymous> (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compiler.js:267:14)
      at C:\code\github\metalsmith-webpack\node_modules\async\lib\async.js:52:16
      at Object.async.forEachOf.async.eachOf (C:\code\github\metalsmith-webpack\node_modules\async\lib\async.js:236:30)
      at Object.async.forEach.async.each (C:\code\github\metalsmith-webpack\node_modules\async\lib\async.js:209:22)
      at Compiler.emitFiles (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compiler.js:235:20)
      at MemoryFileSystem.(anonymous function) [as mkdirp] (C:\code\github\metalsmith-webpack\node_modules\webpack\node_modules\memory-fs\lib\MemoryFileSystem.js:283:10)
      at Compiler.<anonymous> (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compiler.js:229:25)
      at Compiler.applyPluginsAsync (C:\code\github\metalsmith-webpack\node_modules\tapable\lib\Tapable.js:60:69)
      at Compiler.emitAssets (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compiler.js:226:7)
      at Compiler.<anonymous> (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compiler.js:184:10)
      at C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compiler.js:403:12
      at Compiler.next (C:\code\github\metalsmith-webpack\node_modules\tapable\lib\Tapable.js:67:11)
      at Compiler.<anonymous> (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\CachePlugin.js:40:4)
      at Compiler.applyPluginsAsync (C:\code\github\metalsmith-webpack\node_modules\tapable\lib\Tapable.js:71:13)
      at Compiler.<anonymous> (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compiler.js:400:9)
      at Compilation.<anonymous> (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compilation.js:577:13)
      at Compilation.applyPluginsAsync (C:\code\github\metalsmith-webpack\node_modules\tapable\lib\Tapable.js:60:69)
      at Compilation.<anonymous> (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compilation.js:572:10)
      at Compilation.applyPluginsAsync (C:\code\github\metalsmith-webpack\node_modules\tapable\lib\Tapable.js:60:69)
      at Compilation.<anonymous> (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compilation.js:567:9)
      at Compilation.applyPluginsAsync (C:\code\github\metalsmith-webpack\node_modules\tapable\lib\Tapable.js:60:69)
      at Compilation.<anonymous> (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compilation.js:563:8)
      at Compilation.applyPluginsAsync (C:\code\github\metalsmith-webpack\node_modules\tapable\lib\Tapable.js:60:69)
      at Compilation.seal (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compilation.js:525:7)
      at Compiler.<anonymous> (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compiler.js:397:15)
      at C:\code\github\metalsmith-webpack\node_modules\tapable\lib\Tapable.js:103:11
      at Compilation.<anonymous> (C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compilation.js:445:10)
      at C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compilation.js:417:12
      at C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compilation.js:332:10
      at C:\code\github\metalsmith-webpack\node_modules\async\lib\async.js:52:16
      at done (C:\code\github\metalsmith-webpack\node_modules\async\lib\async.js:246:17)
      at C:\code\github\metalsmith-webpack\node_modules\async\lib\async.js:44:16
      at C:\code\github\metalsmith-webpack\node_modules\webpack\lib\Compilation.js:332:10
      at C:\code\github\metalsmith-webpack\node_modules\async\lib\async.js:52:16
      at done (C:\code\github\metalsmith-webpack\node_modules\async\lib\async.js:246:17)
      at C:\code\github\metalsmith-webpack\node_modules\async\lib\async.js:44:16

  2) metalsmith-webpack should pack complex:
     Uncaught Error: ENOENT, no such file or directory 'C:\code\github\metalsmith-webpack\test\fixtures\basic\build'
      at Object.fs.lstatSync (fs.js:679:18)
      at read (C:\code\github\metalsmith-webpack\node_modules\fs-readdir-recursive\index.js:12:10)
      at assertDirEqual (C:\code\github\metalsmith-webpack\node_modules\assert-dir-equal\lib\index.js:24:19)
      at Metalsmith.<anonymous> (C:\code\github\metalsmith-webpack\test\index.js:41:17)
      at Object._onImmediate (C:\code\github\metalsmith-webpack\node_modules\co\index.js:52:14)

Tested on two Windows machines, one with node 0.10.26, one with node 5.1.0. Running on a Mac with node 0.12.7 works fine.
The version of webpack pulled down is 1.12.9. If I run webpack standalone using the same configuration in my project, it works fine.
I'm not super familiar with how the plugin runs, but I'm guessing there was an API change in Webpack for Windows machines that the Metalsmith plugin doesn't handle?

These errors are generated by MemoryFileSystem which is no longer used in v2.

@leviwheatcroft Hi.The only solution is upgrade to webpack2?

v2 branch in this repo uses webpack 2, and has a variety of other improvements.
You can install with npm i --save github://christophercliff/metalsmith-webpack#v2.
It's stable, I'm using it in several production projects. Only reason it's not published on npm yet is because I don't have collaborator (publish) access on npm.


Query related to data iterators for Seq2Seq translation using bert-gpt2

Hi, while trying to use the following snippet:
import texar.torch as tx
from texar.torch.run import *

# (1) Modeling
class BERTGPT2Model(nn.Module):
  """An encoder-decoder model with GPT-2 as the decoder."""
  def __init__(self, vocab_size):
    super().__init__()
    # Use hyperparameter dict for model configuration
    self.tokeniserBERT = tx.data.BERTTokenizer('bert-base-uncased)
    self.tokeniserGPT2 = tx.data.GPT2Tokenizer('gpt2-medium')
    self.encoder = modules.BERTEncoder('bert-base-uncased')
    self.decoder = tx.modules.GPT2Decoder("gpt2-medium")  # With pre-trained weights

  def _get_decoder_output(self, batch, train=True):
    """Perform model inference, i.e., decoding."""
    enc_states,_ = self.encoder(inputs=self.embedder(batch['source_text_ids']),
                              sequence_length=batch['source_length'])
    if train:  # Teacher-forcing decoding at training time
      return self.decoder(
          inputs=batch['target_text_ids'], sequence_length=batch['target_length'] - 1,
          memory=enc_states, memory_sequence_length=batch['source_length'])
    else:      # Beam search decoding at prediction time
      start_tokens = torch.full_like(batch['source_text_ids'][:, 0], BOS)  # which BOS to use?
      return self.decoder(
          beam_width=5, start_tokens=start_tokens,
          memory=enc_states, memory_sequence_length=batch['source_length'])

  def forward(self, batch):
    """Compute training loss."""
    outputs = self._get_decoder_output(batch)
    loss = tx.losses.sequence_sparse_softmax_cross_entropy(  # Sequence loss
        labels=batch['target_text_ids'][:, 1:], logits=outputs.logits,
        sequence_length=batch['target_length'] - 1)  # Automatic masking
    return {"loss": loss}

  def predict(self, batch):
    """Compute model predictions."""
    sequence, _ = self._get_decoder_output(batch, train=False)
    return {"gen_text_ids": sequence}

# (2) Data
# Create dataset splits using built-in data loaders
datasets = {split: tx.data.PairedTextData(hparams=data_hparams[split])
            for split in ["train", "valid", "test"]}

model = BERTGPT2Model(datasets["train"].target_vocab.size)

# (3) Training
# Manage the train-eval loop with the Executor API
executor = Executor(
  model=model, datasets=datasets,
  optimizer={"type": torch.optim.Adam, "kwargs": {"lr": 5e-4}},
  stop_training_on=cond.epoch(20),
  log_every=cond.iteration(100),
  validate_every=cond.epoch(1),
  train_metric=("loss", metric.RunningAverage(10, pred_name="loss")),
  valid_metric=metric.BLEU(pred_name="gen_text_ids", label_name="target_text_ids"),
  save_every=cond.validation(better=True),
  checkpoint_dir="outputs/saved_models/")
executor.train()
executor.test(datasets["test"])

In this example

How should i use data iterators from files
Data config for generating the file from source text to tokeniserBERT.encode_text(src) and  target text tokeniserGPT2.encode_text(tgt) so that it can pass through the batch.
does PairedTextData has an option to pass different processors in above use case.

TIA

PairedTextData directly reads from files. Please take a look at its hparams, where you can set file paths for both the source-side and target-side datasets.

(and 3.) I'm not sure what you want to achieve here. My guess is that you want to use the BERT and GPT2 tokenizers to tokenizer the source and target datasets respectively, is this correct?
PairedTextData has a number of processing options built-in, such as delimiter for tokenization ("delimiter"), maximum sentence length ("max_seq_length"). If you want to do additional processing, you have two options:

Write transformation functions (functions that take as input a list of strings, indicating a sentence, and returning the processed sentence, also as a list of strings) and add then to "other_transformations".
Inherit PairedTextData and override the process function. Only do this if you understand how PairedTextData works.

However, in your case, I think the easier way would be to write the data loader yourself, as tokenizers direct convert untokenized strings to token IDs. @gpengzhi can you help writing an example for this use case?

thanks @huzecong  for the reply,
To make it work i  made separate vocab files for both gpt2 and bert. stored it in text and passed a part of tokeniser as mentioned below:
tokenizer_gpt2 = tx.data.GPT2Tokenizer(
        pretrained_model_name='gpt2-small')
tokenizer_bert = tx.data.BERTTokenizer(
        pretrained_model_name='bert-base-uncased')

def token_transform_bert(arr):
    arr_str = ' '.join(arr)
    ret_arr = tokenizer_bert.map_text_to_token(arr_str)
    return ret_arr

def token_transform_gpt2(arr):
    arr_str = ' '.join(arr)
    ret_arr = tokenizer_gpt2.map_text_to_token(arr_str)
    return ret_arr

data_hparams={
        'train':{
            'source_dataset': {'files': 'exp/train_src.txt','vocab_file':'exp/bert_vocab.txt','max_seq_length': 40,
                               'bos_token':'[CLS]','eos_token':'[SEP]','other_transformations':[token_transform_bert]},
            'target_dataset': {'files': 'exp/train_tgt.txt','vocab_file':'exp/gpt2_vocab.txt','max_seq_length': 40,
                               'bos_token':'<|endoftext|>','eos_token':'<|endoftext|>','other_transformations':[token_transform_gpt2]},
            'batch_size': 40,
            "allow_smaller_final_batch": True,
            "shuffle": True,
            "num_parallel_calls":3
            },
        'test':{
            'source_dataset': {'files': 'exp/test_src.txt','vocab_file':'exp/bert_vocab.txt','max_seq_length': 40,
                               'bos_token':'[CLS]','eos_token':'[SEP]','other_transformations':[token_transform_bert]},
            'target_dataset': {'files': 'exp/test_tgt.txt','vocab_file':'exp/gpt2_vocab.txt','max_seq_length': 40,
                               'bos_token':'<|endoftext|>','eos_token':'<|endoftext|>','other_transformations':[token_transform_gpt2]},
            'batch_size': 12
            },
        'valid':{
            'source_dataset': {'files': 'exp/valid_src.txt','vocab_file':'exp/bert_vocab.txt','max_seq_length': 40,
                               'bos_token':'[CLS]','eos_token':'[SEP]','other_transformations':[token_transform_bert]},
            'target_dataset': {'files': 'exp/valid_tgt.txt','vocab_file':'exp/gpt2_vocab.txt','max_seq_length': 40,
                               'bos_token':'<|endoftext|>','eos_token':'<|endoftext|>','other_transformations':[token_transform_gpt2]},
            'batch_size': 12
            }

        }

After this an exception was raised that these special tokens already exists in vocab. So had to remove that from vocabulary.py class. Also, monkey patched paired_text_data.py  since there was no way to pass pad and unk to PairedTextData
self._src_vocab = Vocab(src_hparams.vocab_file,
                                bos_token=src_hparams.bos_token,
                                eos_token=src_hparams.eos_token,
                                pad_token='[PAD]',
                                unk_token='[UNK]')
self._tgt_vocab = Vocab(tgt_hparams["vocab_file"],
                                bos_token=tgt_bos_token,
                                eos_token=tgt_eos_token,
                                pad_token='<|endoftext|>',
                                unk_token='<|endoftext|>')
I Think:

1. We can have an option to pass these additional tokens in PairedTextData
2. In vocab building class for adding special seq to vocab we can check if special seq is already present and skip that check and use existing id. since the vocab is adding `vocab = [self._pad_token, self._bos_token, self._eos_token, self._unk_token] + vocab` my whole vocab will shift to right giving incorrect results.

Thank you for your feedback! These are all valuable suggestions and I think we could add them. We're actually discussing the possibility to deprecate the Vocab class and switch everything to tokenizer-based, or at least provide interfaces in the data modules to use tokenizers instead of vocab. @gpengzhi Could you try working on this after the holidays?

Yes. I think we should support this feature. Since pre-trained tokenizers already take care of the corresponding vocabulary files and the special tokens, it is unnecessary to require vocabulary file and the special tokens when people use PairedTextData. I will think about this enhancement in our data module.

So, @gpengzhi @huzecong  Ideally will there be a tokeniser builder class which can accept a pretrained tokeniser or a new tokeniser. This new tokeniser for src and tgt be passed to data modules for processing the data?


Fix deprecation warnings in the nightly package list update job

Example: https://github.com/SwiftPackageIndex/PackageList/actions/runs/4942810241

Potentially affects some of our other automated jobs, too.


bazelbuild/rules_nodejs 0.3.1 cannot find npm

This is fixed in 0.4.1 or later.

***********WARNING***********
crisper: npm_install will require a package_lock_json attribute in future versions
*****************************
ERROR: /private/var/tmp/_bazel_bhigh/946bef48ed3737c679e24a61c6da01fb/external/crisper_repo/BUILD.bazel:5:1: no such package '@crisper//': npm_install failed:
><EMAIL_ADDRESS>postinstall /private/var/tmp/_bazel_bhigh/946bef48ed3737c679e24a61c6da01fb/external/crisper/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

 (npm WARN deprecated<EMAIL_ADDRESS>core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN lifecycle npm is using /private/var/tmp/_bazel_bhigh/946bef48ed3737c679e24a61c6da01fb/external/nodejs/bin/node but there is no node binary in the current PATH. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
sh: node: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR<EMAIL_ADDRESS>postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR!      /Users/bhigh/.npm/_logs/2020-07-14T23_49_58_013Z-debug.log
) and referenced by '@crisper_repo//:crisper_bin'
ERROR: Analysis of target '//chrome_ext:options' failed; build aborted: no such package '@crisper//': npm_install failed:
><EMAIL_ADDRESS>postinstall /private/var/tmp/_bazel_bhigh/946bef48ed3737c679e24a61c6da01fb/external/crisper/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"

 (npm WARN deprecated<EMAIL_ADDRESS>core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN lifecycle npm is using /private/var/tmp/_bazel_bhigh/946bef48ed3737c679e24a61c6da01fb/external/nodejs/bin/node but there is no node binary in the current PATH. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
sh: node: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR<EMAIL_ADDRESS>postinstall: `node -e "try{require('./postinstall')}catch(e){}"`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR!      /Users/bhigh/.npm/_logs/2020-07-14T23_49_58_013Z-debug.log
)
INFO: Elapsed time: 6.563s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (213 packages loaded, 4260 targets configured)```

Adding scripts-prepend-node-path=true to $HOME/.npmrc allows it to build.


STAT_VAL_LEN too short cuts settings output when using multiple -l flags

"stats settings" values has 256 bytes limit -defined by STAT_VAL_LEN- and starting memcached with multiple -l flags cuts "inter" in the output, example:
./memcached -m 64 -p 11211 -u nobody
-l <IP_ADDRESS>:11211
-l <IP_ADDRESS>:11212
-l <IP_ADDRESS>:11213
-l <IP_ADDRESS>:11214
-l <IP_ADDRESS>:11215
-l <IP_ADDRESS>:11216
-l <IP_ADDRESS>:11217
-l <IP_ADDRESS>:11218
-l <IP_ADDRESS>:11219
-l <IP_ADDRESS>:11220
-l <IP_ADDRESS>:11221
-l <IP_ADDRESS>:11222
-l <IP_ADDRESS>:11223
-l <IP_ADDRESS>:11224
-l <IP_ADDRESS>:11225
-l <IP_ADDRESS>:11226
-l <IP_ADDRESS>:11227
-l <IP_ADDRESS>:11228
-l <IP_ADDRESS>:11229
-l <IP_ADDRESS>:11230
-l <IP_ADDRESS>:11231
-l <IP_ADDRESS>:11232
-l <IP_ADDRESS>:11233
-l <IP_ADDRESS>:11234
-l <IP_ADDRESS>:11235
-l <IP_ADDRESS>:11236
-l <IP_ADDRESS>:11237
-l <IP_ADDRESS>:11238
-l <IP_ADDRESS>:11239
-l <IP_ADDRESS>:11240
-l <IP_ADDRESS>:11241
-l <IP_ADDRESS>:11242
$ telnet localhost 11211
stats settings
(..)
STAT inter <IP_ADDRESS>:11211,<IP_ADDRESS>:11212,<IP_ADDRESS>:11213,<IP_ADDRESS>:11214,<IP_ADDRESS>:11215,<IP_ADDRESS>:11216,<IP_ADDRESS>:11217,<IP_ADDRESS>:11218,<IP_ADDRESS>:11219,
(..)
The "inter" value is break and doesn't show all listening interfaces.

This change mostly delays the inevitable, though it certainly does a bit longer. I'll think on this for a little, but it seems fine.
Why were you doing that, out of curiosity?

dustin points out that it's silly to delay the inevitable by blowing stack space.
We have two answers for this: 1) we don't really have a need to support printing back the entire -l commandline, especailly if it's huge.
2) if we're going to do it, we're going to actually return the whole thing, which means the stat needs to be split into one stat output per interface. Which is too much work for right now.
If you feel strongly about 2) happening, please open a bug report on the issue tracker. Thanks!


User-defined literal for USB String Descriptors

Channel
C++Weekly
Topics

user-defined literals that require both a template and a non-template arguments
compile-time initializers for embedded devices' code
low-level memory layout to adhere to external specifications
following (or not?) naming conventions defined in reference standards (like the bLength and bDescriptorType from USB standard's text).

Length
Not sure, TBH. I've been trying to unsuccessfully solve this puzzle for a while now. Wouldn't dare claim I'm a guru, but not a novice in C++ either. My best guess is that the episode would be around 7-11 minutes.
Here's what the puzzle is:
USB string descriptors are defined as a "length" byte (total size of the descriptor) followed by a descriptor type's byte (0x03 for String) followed by UTF-16 characters. For example:
enum UsbDescriptorType : uint8_t{
    USB_DESCR_DEVICE        = 1
  , USB_DESCR_CONFIGURATION = 2
  , USB_DESCR_STRING        = 3
 // ... other types
};

struct UsbDescrStd{
    const uint8_t bLength;
    const UsbDescriptorType bDescriptorType;
};

template<size_t N>
struct UsbDescrString: UsbDescrStd{
    char16_t str[N-1]; // [N-1] to allow constructor from C-strings: UsbDescrString(const char(&s)[N])
};

Now... defining those USB strings in code is a bit cumbersome as it requires me to explicitly provide the size as template argument:
constinit const UsbDescrString<6>  usbStrManufacturer {"MyLtd"};
The goal is to provide a user-defined literal that would make that initialization look clean and natural, like this:
constinit const auto  usbStrManufacturer {"MyLtd"_usbstr};
The issue here is that I need to provide both template and non-template arguments into the user-defined literal, which is explicitly prohibited by the standard
YePhIcK (pronounced as "yefik")
P.S. This is, of course, code for an embedded device that adheres to USB device spec. Managing USB descriptors is a real nightmare so I'm trying to automate as much as possible to reduce or completely eliminate room for human mistakes
P.P.S.
My attempt at solving this puzzle with the help of SO community:
https://stackoverflow.com/questions/75051100/string-literals-as-template-arguments-forces-code-duplication-and-verbosity
and the best solution which I ended up NOT implementing because of the verbosity and complexity of the resulting code:
https://godbolt.org/z/nGxKxK4q7
Neither my SO question nor the "solution" do the user-defined string literals, just linking them as "more info" type of thing

here's an approach I came up with, requires C++20: https://godbolt.org/z/7bhqMYs3T
It imposes an upper limit, but since you only have a length byte maybe that's ok.

here's an approach I came up with, requires C++20: https://godbolt.org/z/7bhqMYs3T It imposes an upper limit, but since you only have a length byte maybe that's ok.

I see what you've done here, quite concise. Unfortunately, while this may work for many other scenarios, it fails for this particular one where the actual byte size of the resulting struct MUST be the declared bLength as it is used in USB protocol where that matters.


Custom theme path not correct

node ./node_modules/react-native-design-utility/dist/init.js
i think it should be:
node ./node_modules/react-native-design-utility/dist/commojs/init.js

Perfect yes will change tomorrow thank you :)

Fix in v 1.0.2


logs command

add logs command to fetch logs for a given time window and component from loki

/assign @jfortin-sap

@vlerenc I've unassigned myself due to lack of capacity atm


Would someone please update the podspec for 6.0.1

6.0.1 released on April 9, 2015

Podspec has been updated - current version includes the latest point release (6.0.2).


Fixed typo

Fixes typo in the expansion of PEM.
Motivation:
Correcting the documentation.
Modifications:
Changed the expansion of PEM from "Private Enhanced Mail" to the correct "Privacy Enhanced Mail"
Result:
Documentation text corrected.

@swift-server-bot test this please


F5 shortcut to "Run Query"

I believe this is a bit of a default for things such as this (for example SQL management studio runs a query with F5). Would be nice if the tool supported it. Although I see ctrl+R does the same.

Understandable, presently F5 refreshes database connections and CTRL+R refreshes the query. One possibility would be to swap those keyboard short cuts. If enough people felt the same way (or offered an alternative) I think it'd be feasible, but I wouldn't want to do it without some consensus since people have already probably gotten used to the shortcuts as they are and it might be confusing if they silently changed.

+1

Would also love this feature. Is nobody maintaining this project anymore?


Unable to send commands and messages

After entering the server with the robot, enter the registration command but display "please enable chat" and "chat is disabled in the client". How can I turn it on

Hello,
can you please provide the actual output from my app ?
It looks like it's a problem on the server you are connected to, because my app doesn't have these messages.

您好，您能提供我的应用程序的实际输出吗？这看起来像是你连接到的服务器上的问题，因为我的应用没有这些消息。

Thanks for sending the output.
It is clear that the error message comes from the server, as it is prefixed with CHAT |.
Please make sure, you are using the right command. The server says you should use /register, but you are using /reg only, I know this is a shortcut, but some plugins may not support it. So please try the full /register.
Then, you can try to log in with the same nickname as a normal player and try to register yourself.
If it doesn't help, I am afraid I can not help with it anymore, because as I said, the problem is on the server, not in my app.
Thanks.

感谢您发送输出。
很明显，错误消息来自服务器，因为它的前缀为 。请确保您使用的是正确的命令。服务器说你应该使用，但你只使用，我知道这是一个快捷方式，但有些插件可能不支持它。因此，请尝试完整的.CHAT |``/register``/reg``/register
然后，您可以尝试使用与普通玩家相同的昵称登录，并尝试注册自己。
如果它没有帮助，恐怕我不能再帮助它了，因为正如我所说，问题出在我的服务器上，而不是在我的应用程序中。
谢谢。

Thanks for sending the output.
It is clear that the error message comes from the server, as it is prefixed with CHAT |. Please make sure, you are using the right command. The server says you should use /register, but you are using /reg only, I know this is a shortcut, but some plugins may not support it. So please try the full /register.
Then, you can try to log in with the same nickname as a normal player and try to register yourself.
If it doesn't help, I am afraid I can not help with it anymore, because as I said, the problem is on the server, not in my app.
Thanks.

I'll try again How do I use assigned names and mobile

Thanks for sending the output.
It is clear that the error message comes from the server, as it is prefixed with CHAT |. Please make sure, you are using the right command. The server says you should use /register, but you are using /reg only, I know this is a shortcut, but some plugins may not support it. So please try the full /register.
Then, you can try to log in with the same nickname as a normal player and try to register yourself.
If it doesn't help, I am afraid I can not help with it anymore, because as I said, the problem is on the server, not in my app.
Thanks.

I'll try again,How do I use assigned names and move

Ready to use! But I ended the robot automatically after one minute. How can I keep the robot in the server and mobile position

I don't understand exactly what you are referring to, but if you mean that the bot was kicked from the server after one minute, it is, probably, again something on the server. Probably due to AFK, because the bot is not moving. Or it could be because the bot was stuck in the air and the server kicked it for flying.
I plan to implement optional gravity and bot movement in the future.

oh ok! thank you for your reply I got help


Enhance DatePicker localization guidance for Windows platforms

This commit updates the documentation to provide a more detailed and clarified guidance on how to localize the DatePicker control for Windows applications within .NET MAUI. It includes an explanation on declaring supported languages in the Package.appxmanifest file, ensuring developers have clear instructions on configuring their apps for multiple locales.
The commit is related to https://github.com/dotnet/maui/issues/10805 because there seems to be a lot of confusion in the .NET MAUI windows space about whether or not the date picker is able to display localized dates and strings.

Internal previews

📄 File
🔗 Preview link

docs/user-interface/controls/datepicker.md
DatePicker

How can I fix the linter warning docs/user-interface/controls/datepicker.md:107:90 MD033/no-inline-html Inline HTML [Element: Resources] ?
The given line doesn't have any HTML, but XML Code

Any chance to take a look at my PR @davidbritch ☺?
Thnks

@AndreKraemer Sure, I'll get to it before the week is out - got my head buried in something else right now.