State.Ready is returned by getPlaybackState instead of State.Playing even though the player is playing (iOS only)

Describe the Bug
A clear and concise description of what the bug is.
When the player is playing an audio file, and I call the seekTo method, then afterwards the TrackPlayer.getPlaybackState() method returns State.Ready, and the Event.PlaybackState listener is called with the State.Ready event, but is never called with State.Playing even though the player resumes playing after seek.
We rely on the  TrackPlayer.getPlaybackState() method to tell us whether or not the player is currently playing, but when it gets stuck on State.Ready even though it is currently playing, how can we determine it is actually currently playing?
Steps To Reproduce
I can get to this later if needed. I mostly want to know is this expected behavior with an alternative solution, or a bug?
Code To Reproduce
I can get to this later if needed.
Replicable on Example App?
I can get to this later if needed.
Environment Info:
System:
    OS: macOS 13.1
    CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
    Memory: 510.98 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.17.1 - ~/.nvm/versions/node/v16.17.1/bin/node
    Yarn: 1.22.18 - ~/.yarn/bin/yarn
    npm: 6.14.17 - ~/Repos/podverse-rn/node_modules/.bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8512546
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.9 - /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1
    react-native: 0.66.5 => 0.66.5
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Paste the exact react-native-track-player version you are using:
3.2.0-480f64932969545fe38a261fb3867f90f514478c
Real device? Or simulator?
Both
What OS are you running?
iOS 16.2
How I can Help
I can try to debug it, but I was hoping to gather information from a core dev or @puckey in case this is a known issue, or an issue with a simple workaround solution.

It seems like the Event.PlaybackState === State.Ready only gets fired on iOS, and when you seekTo a position beyond what is currently buffered. I am inferring this because State.Ready event is not fired every time I seekTo, but it does seem to fire consistently when I start playing a long podcast, and then seekTo near the end of the show.
I guess maybe the issue would like in SwiftAudioEx since Android appears to return the State.Playing event every time I would expect it to...

I was able to reproduce the issue on the iOS example app by adding this track to the beginning of the playlist.json:
  {
    "url": "https://op3.dev/e/mp3s.nashownotes.com/PC20-118-2023-01-20-Final.mp3",
    "title": "Episode 118",
    "artist": "Podcasting 2.0",
    "artwork": "https://noagendaassets.com/enc/1601061118.678_pciavatar.jpg",
    "duration": 1000
  },

Then I start playing the episode...then I seekTo a time near the end of the episode. The ready event fires, but a playing event is not subsequently fired.

While I have been able to reproduce this issue, I haven't been able to find a solution yet.
For some reason (AVPlayer. timeControlStatus)[https://developer.apple.com/documentation/avfoundation/avplayer/1643485-timecontrolstatus] is not changing to (AVPlayer.TimeControlStatus.waitingToPlayAtSpecifiedRate)[https://developer.apple.com/documentation/avfoundation/avplayer/timecontrolstatus/waitingtoplayatspecifiedrate] after the seek to indicate buffering and back to (AVPlayer.TimeControlStatus.playing)[https://developer.apple.com/documentation/avfoundation/avplayer/timecontrolstatus/playing] to indicate the resumption of playing.

I'm storing the playback state in my app, and synchronizing the playback like this as a workaround:
const onPlaybackStateChange = (data) => {
  const { state } = data

  // WORKAROUND: on iOS, playback state goes like playing -> ready, ignore here
  if (
    Platform.OS === 'ios' &&
    someLocalStorage.playbackState === PlayState.Playing &&
    state === PlayState.Ready
  ) {
    return
  }

  someLocalStorage.playbackState = state
}

TrackPlayer.addEventListener(Event.PlaybackState, (data) => {
  onPlaybackStateChange(data)
})

It's ok for me because I'm using redux, I need to sync the state in my redux store to keep UI updated.

My observation is the playback state always goes like Playing -> Ready, so if you don't care about Ready state, you can just sync the playback state in your own local storage(like redux), and ignore the ready state:
const onPlaybackState = (data: PlaybackStateEvent) => {
  if (data.state === PlayState.Ready) {
    return
  }
  someLocalStorage.playbackState = data.state
}

TrackPlayer.addEventListener(Event.PlaybackState, (data) => {
  onPlaybackState(data)
})

@ouabing thanks, that makes sense. We're doing something similar to that. It's a little inconvenient that getPlaybackState doesn't always return State.Playing when it is playing, but you're right we can work around the issue.

A stopgap solution would be to skip setting the state to PlayState.Ready when the state is already PlayState.Playing since it ought to be impossible to go from playing to ready. In which case the play state would just stay at PlayState.Playing

Since it sounds like there are simple workarounds, feel free to close this as wontfix. Thanks for your help!

I would prefer to keep this issue open as it is indeed unexpected behavior

This should be fixed by the following SwiftAudio pr: https://github.com/doublesymmetry/SwiftAudioEx/pull/40

@dcvz @puckey Can we reopen this issue? I'm still seeing State.Ready being set after State.Playing has already occurred. I'm on the latest nightly (3.2.0-bb749e5d286737681ba8907dfd287480eb1cec45) and I'm seeing this on 2 different occasions:

playWhenReady is true and TrackPlayer.load(track) is used. In the following code snippet:

await TrackPlayer.setPlayWhenReady(true);
await TrackPlayer.load(track);

the trackstate occasionally moves from State.Playing to State.Ready. It appears to be a race condition because I only sometimes get it.

State.Paused moves to State.Ready after returning from background: when I leave the app in foreground, load a track and pause it, lock my phone and wait a few minutes, then unlock my phone with the app back in foreground, the state shifts to be State.Ready.

Both appear to happen on iOS at the very least.

@dcvz it is unclear if this pr already made it into nightly.. can you confirm?

@puckey Seems it didn't. I have the latest nightly, but it shows the following:
LOG  {"state": "loading"}  LOG  {"state": "buffering"}  LOG  {"state": "playing"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}  LOG  {"state": "ready"}
There is sound, just the state doesn't update.

@DennisdeWitNL  @jeroenptrs can either of you reproduce this with the RC release?

@puckey Sure, will check later today. It is good to know that I have tested this with a live stream.

@puckey Ok, but I will first need to do some reinstalls on my Mac Studio. I normally develop on my MacBook Pro, but I broke the screen. So it has to be repaired. :-))

@puckey yes I still see at least the second reproduction method (pausing, locking screen for a few minutes and unlocking going back to the app) happening again. I'm trying to reproduce the first but it was with flaky results in the past as well so I'm not confident I'll easily be able to reproduce it

@puckey I'm able to reproduce the following on the example app as well, I unfortunately cannot provide logs because going to lockscreen disables metro transport but the steps are as follows:

Add trackstate to TrackInfo.tsx
Start playing the app, then pause
Lock the screen and wait a bit
Unlock the screen, with the example app now in foreground
Trackstate should now be "ready"

I'm aware this technically doesn't apply to the issue as this is focused on State.Playing, but I'd expand the issue to also include State.Paused

@puckey The RC-version shows 'ready' before 'playing', straight after 'buffering'.
 LOG  {"state": "loading"}
 LOG  {"state": "loading"}
 LOG  {"state": "loading"}
 LOG  {"state": "loading"}
 LOG  {"state": "buffering"}
 LOG  {"state": "ready"}
 LOG  {"state": "playing"}
 LOG  {"state": "playing"}
 LOG  {"state": "stopped"}
 LOG  {"state": "stopped"}
 LOG  {"state": "stopped"}

Okay cool, so this looks to be working as intended.
@jeroenptrs If you want to know whether playback is paused or not you probably want to use the newly introduced TrackPlayer.getPlayWhenReady()
Also check https://github.com/doublesymmetry/react-native-track-player/blob/main/example/src/components/PlayPauseButton.tsx

Okay cool, so this looks to be working as intended.
@jeroenptrs If you want to know whether playback is paused or not you probably want to use the newly introduced TrackPlayer.getPlayWhenReady() / usePlayWhenReady()
Also check https://github.com/doublesymmetry/react-native-track-player/blob/main/example/src/components/PlayPauseButton.tsx

The example doesn't 100% translate to the approach I have but I managed to make it work, I'll be validating this approach tomorrow and will let you know if anything pops up. Thanks for the follow up!


All patches being ignored

In both the CLI and the GUI version, all the URLs I have tried so far result in all patches being ignored because length(patch.shape) is 2 instead of 3.
For example (the first tutorial Ode to Joy):
$ flowkey-dl-cli https://flowkeycdn.com/sheets/diNMKRXEkTZd3fsxZ/150/0.png
/home/.../anaconda3/lib/python3.7/site-packages/PIL/Image.py:952: UserWarning: Palette images with Transparency   expressed in bytes should be converted to RGBA images
  ' expressed in bytes should be converted ' +
loaded patch 0 with shape (292, 1024)
patch 0 looks strange, ignoring: [[0 0 0 ... 0 0 0]
 [0 0 0 ... 0 0 0]
 [0 0 0 ... 0 0 0]
 ...
 [0 0 0 ... 0 0 0]
 [0 0 0 ... 0 0 0]
 [0 0 0 ... 0 0 0]]
shape: (292, 1024)
loaded patch 1 with shape (292, 1024)
patch 1 looks strange, ignoring: [[0 0 0 ... 0 0 0]
 [0 0 0 ... 0 0 0]
 [0 0 0 ... 0 0 0]
 ...
 [0 0 0 ... 0 0 0]
 [0 0 0 ... 0 0 0]
 [0 0 0 ... 0 0 0]]
shape: (292, 1024)
loaded patch 2 with shape (292, 1024)
patch 2 looks strange, ignoring: [[0 0 0 ... 0 0 0]
 [0 0 0 ... 0 0 0]
 [0 0 0 ... 0 0 0]
 ...
 [0 0 0 ... 0 0 0]
 [0 0 0 ... 0 0 0]
 [0 0 0 ... 0 0 0]]
shape: (292, 1024)
loaded patch 3 with shape (292, 409)
patch 3 looks strange, ignoring: [[0 0 0 ... 0 0 0]
 [0 0 0 ... 0 0 0]
 [0 0 0 ... 0 0 0]
 ...
 [0 0 0 ... 0 0 0]
 [0 0 0 ... 0 0 0]
 [0 0 0 ... 0 0 0]]
shape: (292, 409)
downloaded 0 patches form https://flowkeycdn.com/sheets/diNMKRXEkTZd3fsxZ/300/{}.png
Traceback (most recent call last):
  File "/home/.../anaconda3/bin/flowkey-dl-cli", line 11, in <module>
    sys.exit(main())
  File "/home/.../anaconda3/lib/python3.7/site-packages/flowkey_dl/flowkey_dl_cli.py", line 30, in main
    image, _, _ = flowkey_dl(args.baseurl)
  File "/home/.../anaconda3/lib/python3.7/site-packages/flowkey_dl/flowkey_dl.py", line 45, in flowkey_dl
    imgs_comb = np.hstack(imgs)
  File "/home/.../anaconda3/lib/python3.7/site-packages/numpy/core/shape_base.py", line 288, in hstack
    return _nx.concatenate(arrs, 1)
ValueError: need at least one array to concatenate

Did flowkey change their image format resulting in this behavior or is my python setup incorrectly configured?

I checked the link you used, it worked fine on my system. I guess it has to do with the version of imageio but both versions I tried, imageio-2.13.3 as well as imageio-2.19.3 did not replicate the issue. Anyway, I tried to handle the case, assuming that the reader returns a b/w image. Let me know if this resolves the issue.
Also, I used the update to publish the package on PyPI, so you can now install directly from there without cloning the github.

Also, please do not publish any links (not even from the free songs), I do not want to give flowkey any reason to shut this down. Can you please censor them in your text?

Thanks! I've update my post to remove links. Maybe this problem is unique to me or it could be my imageio version (I'm on 2.4.1). I'm also running this on Ubuntu installed via Windows Subsystem for Linux so there are a bunch of unusual things in my situation. I'm unable to try additional things to see how to fix this because my subscription to flowkey just expired yesterday. I'll go ahead and close this issue.


Migrate Release Managers page to https://k8s.dev/

This is a Feature Request

What would you like to be added
The existing contents of https://kubernetes.io/releases/release-managers/ should move to a new page within https://k8s.dev/
and we should make the URL https://kubernetes.io/releases/release-managers/ redirect to the new page.
Why is this needed
Content that relates to developing Kubernetes has its best home within https://k8s.dev/
Comments
Release is of course the transition from development to published code, but a release manager's job is mostly done before release.
/kind cleanup
/sig release

/triage accepted

/assign

This would help with https://github.com/kubernetes/contributor-site/issues/202


ARTEMIS-2352 - Add the ability to reject messages without a validated…

… user set
https://issues.apache.org/jira/browse/ARTEMIS-2352

There is a real failure as part of this. look on the PR check

Let me fix the test


Add D_HardDoubleFloat version identifier

This is for when the target has a floating point coprocessor (D_HardFloat is true), but only supports single precision operations.  So double precision is still handled using software emulation.
D_HardDoubleFloat implies that D_HardFloat is also true.  Conversely, D_SoftFloat implies that D_HardDoubleFloat is false.
The combination of D_HardFloat=true and D_HardDoubleFloat=false can occur on MIPS and RISC-V targets.
For MIPS, this can be tweaked with -mdouble-float.  For RISC-V, including either f or d in the ISA string, e.g: -mabi=lp64d

As the version is quite involved across all targets, I'm open to making it MIPS_DoubleFloat and RISCV_DoubleFloat respectively.  Though I'd rather avoid adding more target-specific version conditions if we can instead use a platform agnostic identifier.

Or maybe HardFloatDouble ?

Any more discussions about the colour of the shed here?

Have been blocked on adding RISC-V ports for over a month now.


Is there failover feature between AZs? and does it support coreOS, CentOS?

Is this a BUG REPORT or FEATURE REQUEST?
FEATURE REQUEST

1
I want to know whether it's possible to implement openebs in multiple AZs like geo-replication of other sds (software defined storage). it's about failover feature between AZs.
2
I read about coreOS support. https://github.com/openebs/openebs/pull/328
Is it possible to run openebs in k8s cluster of coreOS, centOS, not ubuntu. If it's not, do you have plan for coreOS, centOS ?
thanks.

@jm7joo OpenEBS works on CoreOS, but it needs the nodes to have the iscsi service running. Usually what has been observed is that, CoreOS by default does not start the iscsi services, they have to be started manually.

@jm7joo thanks again for your comments.  To clarify - both 1 & 2 are definitely in scope.  1 - Yes, that is a good use case we have heard and are supporting.  How do you foresee the higher level application failing over?  2.  There was a bug in CoreOS support.


Handle InvalidArgument error for hostname

Systemd throws InvalidArgument error for hostname with special characters.
This commit handles InvalidArgument error.
Tested By:
verified by passing hostname with special char
Change-Id: I732ce9705044d45a25c05f0164bfa5e47e03f025

Gerrit commit: https://gerrit.openbmc.org/c/openbmc/phosphor-networkd/+/68795


Scale in 3D and Quat()

Its bug or not, I dont know. When i use Quat() to set rotation and if obj have scale, he reset scale back to oiginal.

This is intended, as Godot uses transforms for 3D internally, the scale/loc/rot are mostly helpers. All this will probably change a little in 3.0 to make more sense though

There's a related issue. I have a testcube, and I scaled it along the x axis by 2. After rotating it along the Y-axis by 90 degrees with
cube.set_transform(cube.get_transform().rotated(Vector3(0,1,0), PI/2))
instead of getting a rotated cube which is elongated along the Z-axis, I'm getting a rotated cube which is still scaled along the X-axis.
Right now, Transform::rotated essentially does basis = basis*R which pre-adds another rotation, and Transform::scaled scales the basis vectors. The transformation matrix M is typically split to translation, rotation and scaling as: M = T.R.S, but rotate actually breaks this since rotating M by R' gives (T.R.S).R' rather than T.(R.R').S. I'll check how this is handled in other engines, but I believe correct behavior requires storing the scaling vector independent from the basis vectors.

Alternatively, Transform::rotate can first orthonormalize the basis vectors, obtain the scaling vector by comparing the orthonormalized vectors against the original basis vectors, apply rotation to the ortonormalized vectors, and then do the scaling. This doesn't require any changes to the data structure.

As I mentioned in #6865, all these work for transformations, that is, matrices which are made of translation, rotation and scaling in the particular ordering  M = T.R.S, and does not apply to 3x3 matrices in general. So in a different PR, I will propose to remove rotate and scale functions from Matrix3 class (both C++ and GDScript, so this is  breaking change which should be done before 3.0), and make use of Transform::rotate_basis and Transform::scale_basis (I believe I will need to add Transform::scale_basis as it doesn't exist at this moment). There should also be GDScript script bindings too.

I have a related question: why does rotate multiply the existing matrix from the right? I think the expected behavior is it should be to multiply from left, such that we add another rotation on top of the current one.

@sezit Can you post the snippet where you "use Quat() to set rotation" that you think is problematic? In particular, what do you mean by setting the rotation?
The only relevant functions which take Quat I see so far are constructors of Matrix3 or Transform, and since they create a matrix from scratch, that's the expected behavior.

@tagcup Ooo....its been a long time ago, i dont even remember how code looks :З

I've gone through the code and I'm not seeing any issues about it. If you're OK with this, I'd then recommend closing this issue.
Also I'm sorry for hijacking this issue with my later comments, but they will be addressed in an upcoming PR.

We can add set_rotation (changes the rotation part, while keeping the scale and translation parts fixed) and set_scale (similar), which would complement get_rotation and get_scale.


Corrected permission for user edit page and blog, links between proje…

…cts/people, project service.

Looks solid to me- I'm going to pull to double check everything runs smooth...

perfect


Add reverseStr and groupBy

I had to put the reverseStr name because there's already a pipe (for arrays) called Reverse, so it may be ambiguous.

Coverage decreased (-0.1%) to 99.893% when pulling cbfc728e7a6fe72c19280ccc44cad6504e5bea9d on rafaelss95:master into 28691e19cafdb8122cd35764f353a939e983aadf on fknop:master.

Thanks,
You're missing a small test to reach 100% coverage. https://coveralls.io/builds/9868294/source?filename=src%2Fstring%2Freverse-str.pipe.ts

I think it's everything fine now.

Coverage remained the same at 100.0% when pulling 034dd9a696d6a78aaaa39f1cdcbeee3fea1ee7e0 on rafaelss95:master into 28691e19cafdb8122cd35764f353a939e983aadf on fknop:master.

Publishing this in a few hours.
Thanks.


Investigate not found intermittent problems

e.g. on http://prc-staging.libero.pub/articles/10.1101/642017
This used to be a 404 coming from DataCite, but schema.org could also be having problems.

Locally I get:
2020-05-20T12:32:56.836Z app:middleware:fetch-reviews-for-article-page Failed to load reviews for article 10.1101/615682: (jsonld.InvalidUrl: Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.)

May be a red-herring or not.

Think it's https://github.com/schemaorg/schemaorg/issues/2578 (Schema.org content negotiation isn't working).

The DataCite JSON-LD usage references the Schema.org context, so has to be requested at runtime (unless it is hard-coded locally).
https://support.datacite.org/docs/datacite-content-resolver suggests text/turtle and application/rdf+xml are supported, but neither does: the former sends you to the real content (wrong, should be a 406 Not Acceptable if it isn't supported), and the latter returns a 422 Unprocessable Entity (also wrong).

So, neither DataCite nor Crossref have particularly usable RDF. Only thing to do now is request their own formats (application/vnd.crossref.unixref+xml and application/vnd.datacite.datacite+xml).

For quick mitigation, looking at hard-coding the Schema.org context locally.

Alternative is to request application/vnd.codemeta.ld+json rather than application/vnd.schemaorg.ld+json, which using a remote context on GitHub. Still just short-term mitigation.


Documentation build fixes

Tried to break this into two pulls but the second patch depends on the first.

(Force push was converting rfc2629.dtd from CRLF to CR, didn't show up in vimdiff)

thanks!

No way to automatically get the list of .txt files? There's no way I/others are going to remember to update that list, and new files do occasionally land there.

Thanks!

I'm releasing this anyway, but this breaks make dist if xml2rfc and xsltproc aren't installed. @XML2RFC@ gets set to 'no' and it tries to run... no. If you have some time to fix in another PR, would be appreciated. At least give a better error than not being able to find the no command :)

this also leaves some files that aren't .gitignored or cleaned up properly:
	doc/protocol-binary-range.full
	doc/protocol-binary.full

unfortunately my buildbots don't test... the release process... I guess..

Out in 1.5.20


Support caching

To support caching, the runner should mount a cache directory into the VMs using --dir

Hello Matthias! Could you please share the steps you've done to get the local cache working?
For me it results in the following issue when I configure builds_dir and cache_dir in ~/.gitlab-runner/config.toml: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/27610.

Hi @edigaryev
I did test is just a few minutes ago, and it is working fine on the python implementation. I did not do anything special other than making sure that the config stage reports the location the cache and builds will be in, which I defined to be /opt/builds/ and /opt/cache Config Command
{
  "builds_dir": "/opt/builds",
  "cache_dir": "/opt/cache"
}

As I implemented a generic Volume Mount Feature I'm using the same mechanism to mount and symlink the directories. The mount points are given to the tart executable via the --dir option
After the VM is up, I'm using the following command to create the symlinks here
sudo mkdir -p $(dirname {volume.dest});
sudo ln -sf '/Volumes/My Shared Files/{volume.name}' {volume.dest}"

The {volume.x} variables are replaced by the actual mount destination and source.
My test job that looks like this works perfectly fine, placing the caches into the defined directory.
run-on-tart:
  image: ventura-xcode-14.3
  tags:
    - tart
  script:
    - echo "This is an artifact" >> artifact.txt
    - mkdir -p vendor/ruby
    - echo "This is an artifact cached" >> vendor/ruby/cache.txt
  cache:
    - key:
        files:
          - artifact.txt
        paths:
          - vendor/ruby
  artifacts:
    paths:
      - artifact.txt

This is the config.toml I use
concurrent = 2
check_interval = 0
shutdown_timeout = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "macmini-m2"
  url = "https://gitlab.com"
  id = XXXXX
  token = "YYYYY"
  token_obtained_at = ZZZZ
  token_expires_at = 0001-01-01T00:00:00Z
  executor = "custom"
  [runners.cache]
    MaxUploadedArchiveSize = 0
  [runners.custom]
    config_exec = "/opt/homebrew/bin/gitlab-runner-tart-driver"
    config_args = ["config"]
    config_exec_timeout = 200

    prepare_exec = "/opt/homebrew/bin/gitlab-runner-tart-driver"
    prepare_args = ["prepare", "-x", "/opt/homebrew/bin/tart", "--concurrency", "2", "--auto-resources", "--cache-dir", "/Users/gitlab/gitlab-runner/cache", "--builds-dir", "/Users/gitlab/gitlab-runner/builds"]
    prepare_exec_timeout = 14400

    run_exec = "/opt/homebrew/bin/gitlab-runner-tart-driver"
    run_args = ["run", "-x", "/opt/homebrew/bin/tart"]

    cleanup_exec = "/opt/homebrew/bin/gitlab-runner-tart-driver"
    cleanup_args = ["cleanup", "-x", "/opt/homebrew/bin/tart"]
    cleanup_exec_timeout = 200

hope this helps.


Configuration file with legacy list of relays and resolvers v2

Simple DNSCrypt creates a dnscrypt-proxy.toml file that contains an outdated list of relays and public resolvers v2.
*** THIS LIST IS FOR OLD DNSCRYPT-PROXY VERSIONS ***
Version 2 of the list is for dnscrypt-proxy <= 2.0.42 users.
If you are running up-to-date software, replace /v2/ with /v3/ in the sources URLs of the dnscrypt-proxy.toml file (relevant lines start with urls = ['https://...'] and are present in the [sources] section).
THIS LIST IS AUTOMATICALLY GENERATED AS A SUBSET OF THE V3 LIST. DO NOT EDIT IT MANUALLY.
If you want to contribute changes to a resolvers list, only edit files from the v3 directory.
--
https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v2/relays.md#-this-list-is-for-old-dnscrypt-proxy-versions-
https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v2/public-resolvers.md#-this-list-is-for-old-dnscrypt-proxy-versions-

@Dola-Shuvi Is it possible to fix this at the level of your unofficial 0.7.2 version?


Add Arcadia & DotOracle For Bridge Stuff

Hola All,
This is not a time sensitive PR (the DotOracle will be kicking off with Torus first)
This PR adds the following domains to the signer's whitelist

Dotoracle.network (the org building a bridge)
arcadia.agency (my company, which is hosting a frontend) and arcadiamgroup.com our other domain.

Let me know what else is needed on our side, as always I'm available here or on Telegram (telegram will get you a response within the hour from 8AM CST to 2:30AM CST on avg barring travel schedules)

Hi @HysMagus! We now handle the whitelisting requests through the Whitelisting Request Form.


Two relativePosition at same position

Hello :)
Nice work here.
Maybe I found a small glitch...
The timeline will not display correctly if at least two relativePosition are the same.
example :
var relPosDate1 = new Date(2015, 02, 04);
var relPosDate2 = new Date(2015, 02, 04);
var relPosDate3 = new Date(2016, 03, 10);
var relPosDate4 = new Date(2016, 06, 10);

Hi!
Thanks & good point, I added it to my Trello :)
I'll have to think a bit on a way to display these items correctly - I'll try to work on that next week.

Did you think about something like following example?

It looks good :)

I reopened the issue as I didn't do the dev yet, it was just a mockup :)

I just pushed & updated the demo page. It's only a quick step into it but you can check and give me your feedback / ideas for the following!
Thx in advance!

when to relativePosition Items have the same label (in my case it's the date), it's better to show it only once.
ex: show "2017-02-01" instead of "2017-02-01 | 2017-02-01".
my work around is making ".timeline-me-label .timeline-me-same-position" hidden.
btw, in my opinion, same position border looks better if "border: 1px solid silver".


Improve grammar in etcd glossary

Summary
Microscopic fix in the etcd glossary entry. The use of the rather than those data makes more sense, as in this context data is a single object.
Thank you!

This is a trivial edit, please look at our policy on trivial edits
https://www.kubernetes.dev/docs/guide/pull-requests/#trivial-edits
If you find one grammatical or spelling error, it is likely there are more in that file, you can really make your Pull Request count by checking the formatting, checking for broken links, and fixing errors and then submitting all the fixes at once to that file.

Some questions to consider:

Can the file be improved further?
Does the trivial edit greatly improve the quality of the content?

Hi @jackcasey-visier thanks for raising this PR! Could you please go through the complete file to make sure no such trivial edit exists?

@jackcasey-visier Hi there, another friendly ping about addressing the above feedback. If you don't have capacity to continue this work, which is totally fine, feel free to close the PR until you're able to return to it. Thanks!

@natalisucks Thank you for following up on this! It's been a hectic few weeks and this fell through the cracks 😓
I've taken another look and don't see any other trivial improvements to be made unfortunately. I know this is a microscopic PR but I can't seem to find much else to add :)
Thanks!

I've taken another look and don't see any other trivial improvements to be made unfortunately.

That is the reassurance we were looking for. Thanks!
It sounds like data is singular in American English, although the debate continues.
/lgtm
/approve


#78 - two similar test cases: TestJsonSyntaxErrorMissingLastClosingBr…

…acket is ok, TestJsonEbnfSyntaxMissingLastClosingBracket throws the exception

your PR is failing is making appveyor CI failed with 1 unit test as you clearly stated. I can't merge as is. You can propose a bugfix if you want, I will hapilly merge it if ok

Of course, the test is failing as I already stated. It was intentionally thought to reproduce the error. Fixing is not so easy for me, because the error seems to be more conceptional kind.
I discovered that the Lexer.Tokenize method delivers 2 Tokens: ACCG and 0 (for end). But GenericLexer.Tokenize gets only ACCG. The generic parser seems to expect an end token, too.
So I tried to insert a default token for recognizing the end in GenericLexer:

public IEnumerable<Token<IN>> Tokenize(string source)
        {
            List<Token<IN>> tokens = new List<Token<IN>>();
            var r = LexerFsm.Run(source, 0);
            while (r.IsSuccess)
            {
                var transcoded = Transcode(r);
                tokens.Add(transcoded);
                r = LexerFsm.Run(source);
                if (r.Result.IsComment)
                {
                    ConsumeComment(r.Result, source);
                }
            }
            tokens.Add(new Token<IN>()); // <-- inserted
            return tokens;
        }

Though that satisfies my test it results in failing a lot of other tests. Do you have another suggestion for the solution?

@terac , your bugfix is ok. Unit tests failing were wrong and need to be corrected according your fix to take account that there is now one more token after tokenization.
I am modifying tests, will commit on your branch and when ok merge on dev.
Maybe later I will rework this to have better error reporting...
Thanks for debugging
Olivier


Additional topics to cover in the default Identity UI doc

Our default templates use IdentityUser as a starting point. There are a few steps you need to take when switching to use a custom user.

Update the DbContext
Update Startup
Update _LoginPartial.cshtml
Add Migration?
Update the DataBase?

Could you take a look into adding a section in the default Identity UI topic that covers the steps required here?

@javiercn  I believe this is all covered in Add, download, and delete custom user data to Identity in an ASP.NET Core project


TransientBuffer bug

When a task buffer is created and never used it crashes task graph.

Fixed in 72b0ea57df73b5948152ba5c8811955ac8a915b1.


Doc  - https://docs.wso2.com/display/AM260/About+this+Release

Under heading  - Gateway Manager profile,
sentence -
Therefore, the Gateway Manager profile (-Dprofile=gateway-manager) has now been deprecated as it is redundant.
should b updated to
'Therefore, the Gateway Manager profile (-Dprofile=gateway-manager) has now been deprecated as it was redundant.'
as the task has already been done and the file 'was' redundant.

The Publisher can now also be the Gateway Manager. The Gateway Manager profile is now deprecated. But it is redundant only from the 2.6.0 release (this release)  onwards. I believe the sentence is worded correctly. Please do re open if you think it should be otherwise.


Add long description as default right pane content

As a user, I want to see a more complete description of the app before I use it, so I can understand its purpose and any possible caveats.

Add long description to README also


"required" field in nested dict

I have a JSON schema like so:
{
    "properties": {
        "_id": {
            "type": "string"
        },
        "animal": {
            "type": "string"
        },
        "c": {
            "properties": {
                "danger": {
                    "type": "boolean"
                },
                "very": {
                    "type": "boolean"
                }
            },
            "required": [
                "danger"
            ],
            "type": "object"
        },
        "zoo": {
            "type": "string"
        }
    },
    "required": [
        "_id",
        "animal"
    ],
    "type": "object"
}

Validation only works at the top level:
from jsonschema import validate
rec = {'_id': '1', 'zoo': 'le', 'animal': 'lion'}
validate(rec, schema)  # success

However, I would expect the validation to fail, because I have no field ['c']['danger']. Am I doing something wrong or does jsonschema not validate nested "required" fields?
Thx a lot!

'c' itself isn't required. That schema just makes 'danger' required when it's present. If you mean for 'c' to be required too, you need to require it as well.

Wow, that was instantaneous :) I did not know this of JSON schema (the spec) and jsonschema (the library) errs out when I specify "c" but not "danger", thanks!


.Net Innecesary kernel verbosity in GetChatMessageContentAsync :)

Describe the bug
When I get the chatService from a kernel, why do I need to specify again the kernel when using it?
IMHO it should use the kernel it is bound to (was generated from it) by default.
To Reproduce
Steps to reproduce the behavior:
Create a new .net console app, add the following code:
using Microsoft.SemanticKernel;
using Microsoft.SemanticKernel.ChatCompletion;
using Microsoft.SemanticKernel.Connectors.OpenAI;

Console.WriteLine("Hello, Semantic Kernel!");

var modelDeploymentName = "gpt-4o";
var azureOpenAIEndpoint = Environment.GetEnvironmentVariable("AZUREOPENAI_ENDPOINT");
var azureOpenAIApiKey = Environment.GetEnvironmentVariable("AZUREOPENAI_APIKEY");

Kernel kernel = Kernel.CreateBuilder()
    .AddAzureOpenAIChatCompletion(
        modelDeploymentName,
        azureOpenAIEndpoint,
        azureOpenAIApiKey)
    .Build();
kernel.ImportPluginFromType<WhatDateIsIt>();

var chatService = kernel.GetRequiredService<IChatCompletionService>();
ChatHistory chatHistory = new();

var executionSettings = new OpenAIPromptExecutionSettings
{
    ToolCallBehavior = ToolCallBehavior.AutoInvokeKernelFunctions
};

bool exitnow = false;
while (exitnow == false)
{
    Console.WriteLine("Enter your question or type 'exit' to quit:");
    var userInput = Console.ReadLine();
    chatHistory.AddUserMessage(userInput);

    var response = await chatService.GetChatMessageContentAsync(
        chatHistory,
        executionSettings);

    Console.WriteLine(response.ToString());
    chatHistory.Add(response);
}

public class WhatDateIsIt
{
    [KernelFunction, Description("Get the current UTC date")]
    public string Date(IFormatProvider? formatProvider = null) =>
        DateTimeOffset.UtcNow.ToString("D", formatProvider);
}

Expected behavior
I would like that it does use function calling properly, but it cannot.
For this to happen you have to specify the kernel when the ChatCompletionService is used, when it was created from that same kernel. It's like telling it every single time who his "father" is ;)
For this to work I should use:
    var response = await chatService.GetChatMessageContentAsync(
        chatHistory,
        executionSettings,
        kernel);

Screenshots
N/A
Platform
Anywhere
Additional context
Add any other context about the problem here.

I made a comment too about unnecessary verbosity.

When I get the chatService from a kernel, why do I need to specify again the kernel when using it?
IMHO it should use the kernel it is bound to (was generated from it) by default.

@joslat
Our thinking is that the lifecycle of an AI service and a Kernel instance are typically different. E.g. I may instantiate an AI service to be used for the duration of my application whereas the Kernel instance may live for the duration of a request (with the AI service being injected into it).
We previously had the AI service and Kernel linked and this provided problematic because of the different lifecycles so we changed the behaviour. We find the current pattern works well when using DI.
We may need a Blog post for this, let me chat with the team. Thanks for the feedback.

I always think of it as the HttpClient, due to my experience bias ;) https://learn.microsoft.com/en-us/dotnet/fundamentals/networking/http/httpclient-guidelines
whereas the client is the same I expect each request to hand over a "connection" from the pool to avoid resource exhaustion...
I understand that when you refer to an AI service you mean a connection to it, right? in this case I fully agree, a connection should be made for a single request and then disposed/cleaned and recycled into the connection pool...
When I think on the Kernel I have an abstract idea of having an HttpClient on it with its IHttpClientFactory that can deliver connections, which a new one will be instantiated per request.
Unless a connection instance is bound to the kernel, but this migth be an issue/antipattern IMHO.


Add YouTube upload examples

Nothing too fancy here, but I'm trying to use the YouTube API and I'm basically brute-forcing my way to success. I've got playlist creation down so far, and I can upload a video, but I haven't figured out how to set information about the video (e.g. title, privacy, etc) and it's really frustrating. This would be a lot easier if there were examples to work off of.

@bradorego I'm about to tread down this same path.  Did you ever have any success?

I had to dig through some old code (as I'm no longer working on this project) but I think this might be helpful?
var uploadVideo = function (file, title, description) {   var d = $q.defer();   youtube.videos.insert({     part: 'snippet,status',     resource: {       snippet: {         title: title,         description: description       },       status: {         privacyStatus: "unlisted"       }     },     media: {       mimeType: file.mimetype,       body: fs.readFileSync(file.path)     }   }, function (err, result, response) {     if (err) {       console.error(err);       return d.reject(err);     }     del.sync([file.path]); /// clean up file after upload success     d.resolve(result);   }); /// end video upload   return d.promise; };

Thank you, sir!  That'll save me a good bit of time reading through the API re: part. :)

Sorry there's no explicit example. I just looked, this library currently supports 4,227 API calls across 155 different Google APIs 😮
Luckily, the API reference documentation is complete for the Youtube API. Here's the relevant bit that details the properties available on the resource object shown in the example above: https://developers.google.com/youtube/v3/docs/videos#resource


need a read only feature

Hello :
Is it possible to have a configure about global read model ?
As below ,the "Permission" has three value :  r(read), w(write),rw
r : the proxy only forward read operation to the backend,and return a message to the client for all write operation.
beta:
listen: <IP_ADDRESS>:22122
hash: fnv1a_64
hash_tag: "{}"
distribution: ketama
auto_eject_hosts: false
timeout: 400
Permission: rw
redis: true
servers:

<IP_ADDRESS>:6380:1 server1
<IP_ADDRESS>:6381:1 server2
<IP_ADDRESS>:6382:1 server3
<IP_ADDRESS>:6383:1 server4

Thanks!

Is it an interesting feature?
I would like to start collaborating and I believe it would be something feasible to me.


warn about impure forceSimulation(nodes) function that can modify its input

https://github.com/d3/d3/blob/main/docs/d3-force/simulation.md#forcesimulationnodes-forcesimulation doesn't specify that it can modify its input parameter if it receives one. I think it should, so that consumers of this function know that it can mutate their data.


TabView change selectedIndex in code can not change tab accordingly in Android

I followed
https://docs.nativescript.org/angular/ui/ng-ui-widgets/tab-view#binding-tab-view-items
to create TabView in which selectedIndex property is two-way binding
HTML code
<TabView [(ngModel)]="tabSelectedIndex" selectedColor="#FF0000" iosIconRenderingMode="alwaysOriginal" sdkExampleTitle sdkToggleNavButton>
    <StackLayout *tabItem="{title: 'Profile', iconSource: 'res://icon'}">
        <StackLayout>

            <Button text="Change Tab via ngModel" (tap)="changeTab()" class="btn btn-primary btn-active"></Button>
        </StackLayout>
    </StackLayout>
    <StackLayout *tabItem="{title: 'Stats'}">
        <StackLayout>

            <Button text="Change Tab via ngModel" (tap)="changeTab()" class="btn btn-primary btn-active"></Button>
        </StackLayout>
    </StackLayout>
    <StackLayout *tabItem="{title: 'Settings'}">
        <StackLayout>

            <Button text="Change Tab via ngModel" (tap)="changeTab()" class="btn btn-primary btn-active"></Button>
        </StackLayout>
    </StackLayout>
</TabView>

TypeScript
public tabSelectedIndex: number;

constructor() {
    this.tabSelectedIndex = 1;
}

changeTab() {
    if (this.tabSelectedIndex === 0) {
        this.tabSelectedIndex = 1;
    } else if (this.tabSelectedIndex === 1) {
        this.tabSelectedIndex = 2;
    } else if (this.tabSelectedIndex === 2) {
        this.tabSelectedIndex = 0;
    }
}

This code only works for iOS, if I tested in Android, when I click "Change Tab via ngModel"  button, only the tabSelectedIndex = n , the numbers changes, but the content, the tab keeps in the index 0 (profile Tab).
I use the latest tns version 4.1.2 and nativescript-angular": "6.0.9", I also tried 6.0.0 version, same behavior

Workaround:
change
[(ngModel)]="tabSelectedIndex"
to
 [selectedIndex]="tabSelectedIndex" (selectedIndexChange)="tabSelectedIndex"

HI @liuwei108,
I tested the sample project on my side, however, I was unable to recreate the issue. For your convenience, I am attaching GIF file.

It will help if you send us sample project, which can be used for debugging.

Figured out, forgot to import NativeScriptFormsModule ...
thanks for prompt reply! you may close this issue.
David


Flight of the first and soar once more

A notification shall be send with the first submissions and the last.
Therefore an additional table in the database shall be store the following information:

Who shall be informed
When shall be informed (period)
Which house shall be considered (gryffindor, ravenclaw, ..., all)

Than an email shall be send to the tracker (email in tracker table) with all submissions in this period.

the period shall be given as day-day. For example for the first seven days "1;7", or the last seven days "-7;end"


Text shows after tooltip is shown

Thanks for the great library. it's really well written and architected. One issue though is that the text is always some milliseconds behind when showing the tooltip. I mean the tooltip background shows first and after that the text appears. the same when dismissing. You can see it in the demo picture on the home page.
Is this intentional or is it a bug ? visually it looks like an issue.. if you got a quick hack to fix it, please help. Thank you

Thanks very much!
I did that intentionally; I thought it looked a bit better (less jarring, and more fluid, maybe?). I'm open to suggestion though. I've just added a new branch (alternate_animation) - check it out and have a look, let me know what you think.

Awesome .. that branch is much more better ! Thanks .. I also think if you can make the popup have a growing animation in (Show) action like the one in (dismiss) action it would be great ! Also, the tooltip arrow should be a bit smaller to make it look like flat UI design. Something similar to this https://github.com/teodorpatras/EasyTipView

I've merged the new animation in now, so I'm closing this issue.


Add francecentral to AKS regions

What kind of request is this (question/bug/enhancement/feature request):
task
Steps to reproduce (least amount of steps as possible):
Add France Central to AKS regions
https://azure.microsoft.com/en-gb/updates/general-availability-azure-kubernetes-service-in-france-central/

Version: Master 2.2 (3/6/19) ImageID: b39d3427146a
Confirmed France Central has been added to the list of Location options (drop-down) upon AKS creation.

Inspect HTTP POST (create cluster) request payload and server response and confirm that in azureKubernetesServiceConfig that location: "francecentral" exists.
Inspect Azure web console and ensure the AKS cluster exists at the France Central location.

Smoke tested and ensured cluster is working correctly.


Need a new terminology to distinguish the directory where outputs from each individual test classes are written into

Derived from the #41
For example, I have a URL of CodeSource,
/User/kazurayam/unittest-helper/preliminary-study/test-output/study/S4WritingFileInTheSubOutputDirectoryTest/testIt/browser.txt

/User/kazurayam/unittest-helper/preliminary-study/ : project directory
test-output/: testOutput directory
study/S4WritingFileInTheSubOutputDirectoryTest/testIt/: ?
browser.txt: file name

I do not have a terminology (name, or word) to call the 3rd element of the path!

How about naming it as "subOutput directory"?

study/S4WritingFileInTheSubOutputDirectoryTest/testIt/: subOutput directory

A subOutput directory could be farther parsed as

study/S4WritingFileInTheSubOutputDirectoryTest/: subOutput directory of class
testIt/: subOutput directory of method


Getting a User By Email

Hi,
I've been looking through the documentation and checking examples in the sample.
I'm trying to figure out how to get a user by their email.
I'm doing something like this once I'm authenticated:
server.use_server_version()
options = TSC.RequestOptions()
options.filter.add(TSC.Filter(TSC.RequestOptions.Field.OwnerEmail,
                              TSC.RequestOptions.Operator.Equals,
<EMAIL_ADDRESS>server.users.get(req_options=options)

This is returning a 400065: Bad Request where the key is not recognized for this api version. I've tried with RequestOptions.Field.Name, but that returns a set with an empty list and pagination object.
([], <tableauserverclient.models.pagination_item.PaginationItem object>)
Is there anyway to get a user through their email?

@mbabatunde could you include here your Tableau Server version and also the version of the TSC library you're using?

I'll closed based on the comment that this is working now.


Deprecated Link to KaTex formatting

My Setup

Operating System: Win 10 Prof.
App Version: 2.9.0
[x] I have tested with the latest version
[x] I can simulate the issue easily

Description
The link of the KaTeX formatting is deprecated. If you click the format in the desktop app, the browser opens the url: https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX
The page states, that one should use the following link with more examples: https://khan.github.io/KaTeX/function-support.html

i am working on it.

This should be fixed in the main repository, please check RocketChat/Rocket.Chat

I have changed the link from https://github.com/Khan/KaTeX/wiki/Function-Support-in-KaTeX
 to https://khan.github.io/KaTeX/function-support.html in Rocket.Chat in my fork(ready for PR).
@gdelavald is it fine to change only link in rocket.chat?


Elasticsearch beta customer communications

Send email communication to cloud.gov customers to announce the new ElasticSearch beta.
Link to draft communication - https://docs.google.com/document/d/1ZCxY9xWBZNeeirTSrFCLqozdHN-ms53EnIq0dFbGo9M/edit
AC

[x] Draft communication
[x] Team review and approval
[x] Send email

@soutenniza @ChrisMcGowan the draft is ready for you to update with the information specific to Elasticsearch.

Draft communication is with @RonWilliams for final review. Planning to send email to customers on 7/27.

Emails sent to EPA, FDIC and FEC.


More ccrf refactoring

Mostly minor tweaks...

In the rerank part, the function comes from Kyle's implementation which simply launches multiple jobs by bash. My implement uses concurrent.futures.multiprocessing launch the parallel tasks by mapping the topics. In practices, we compared the performance: bash version will suffer from some classifiers that are really slow, and concurrent.futures.multiprocessing is faster.

Example:
import concurrent.futures
import math

PRIMES = [
<PHONE_NUMBER>95293,
<PHONE_NUMBER>42171,
<PHONE_NUMBER>95293,
<PHONE_NUMBER>90773,
<PHONE_NUMBER>77099,
<PHONE_NUMBER>285419]

def is_prime(n):
    if n % 2 == 0:
        return False

    sqrt_n = int(math.floor(math.sqrt(n)))
    for i in range(3, sqrt_n + 1, 2):
        if n % i == 0:
            return False
    return True

def main():
    with concurrent.futures.ProcessPoolExecutor() as executor:
        for number, prime in zip(PRIMES, executor.map(is_prime, PRIMES)):
            print('%d is prime: %s' % (number, prime))

@tiddler Where do you suggest we apply this? The experiments are bearable in terms of latency right now... runs in a few minutes... This is good to know but I think not low hanging fruit in terms of immediate needs?

In the rerank part, the function comes from Kyle's implementation which simply launches multiple jobs by bash. My implement uses concurrent.futures.multiprocessing launch the parallel tasks by mapping the topics. In practices, we compared the performance: bash version will suffer from some classifiers that are really slow, and concurrent.futures.multiprocessing is faster.
Example:
import concurrent.futures
import math

PRIMES = [
<PHONE_NUMBER>95293,
<PHONE_NUMBER>42171,
<PHONE_NUMBER>95293,
<PHONE_NUMBER>90773,
<PHONE_NUMBER>77099,
<PHONE_NUMBER>285419]

def is_prime(n):
    if n % 2 == 0:
        return False

    sqrt_n = int(math.floor(math.sqrt(n)))
    for i in range(3, sqrt_n + 1, 2):
        if n % i == 0:
            return False
    return True

def main():
    with concurrent.futures.ProcessPoolExecutor() as executor:
        for number, prime in zip(PRIMES, executor.map(is_prime, PRIMES)):
            print('%d is prime: %s' % (number, prime))

Yes, Ruifan's impl was faster than mine, especially when training svm classifier, which takes much longer time to converge than LR and GB tree. However, I think this is the same question, that whether it is worth changing the code structure to speed up depends on whether we would like to take this as a part of regression. If we just would like to keep it as a runbook, it is fine to just keep it as for now.

@Kytabyte @tiddler Yea, let's punt on this for now...


instaloader returning empty list

username = request.form.get('username')
since_date = request.form.get('since')
until_date = request.form.get('until')
PLATFORM_NAME = request.form.get('plateform')

session_cookiefile = get_cookiefile()
sessionfile = "thescraper12"

import_session(session_cookiefile, sessionfile)  # Import the session cookie

L = instaloader.Instaloader()
L.load_session_from_file(sessionfile)

posts = instaloader.Profile.from_username(L.context, username).get_posts()
SINCE = datetime.strptime(since_date, "%Y-%m-%d")
UNTIL = datetime.strptime(until_date, "%Y-%m-%d")

data = []
for post in takewhile(lambda p: p.date > UNTIL, dropwhile(lambda p: p.date > SINCE, posts)):
    if post.is_video:
        viewVideo = post.video_view_count
    else:
        viewVideo = None

    post_data = {
        "id_post": post.mediaid,
        "Date": post.date.strftime("%Y-%m-%d"),
        "Heure": post.date.strftime("%H:%M:%S"),
        "content": post.caption,
        "username": post.owner_username,
        "likecount": post.likes,
        "viewVideo": viewVideo,
        "comments": post.comments,
        "platformname": PLATFORM_NAME
    }
    data.append(post_data)

df = pd.DataFrame(data, columns=["id_post", "Date", "Heure", "content", "username", "likecount", "viewVideo",
                                 "comments", "platformname"])
csv_path = "C:/Users/HP Probook/OneDrive/Images/Bureau/CsvScraping/instagram.csv"
df.to_csv(csv_path, mode="w", sep=";", encoding='utf-8', index=False)
Infos_json = df.to_json(orient='records', indent=4, force_ascii=False)
clean_insta_json = re.sub(r"[\x00-\x1F\x7F-\x9F]", "",
                          Infos_json)  # Supprimer les caractères de contrôle non valides
response = jsonify(json.loads(clean_insta_json))
response.headers['Content-Type'] = 'application/json'

return response

the code is returning an empty data list while there is informations in the account i am  trying to scrape

I am experiencing a similar issue despite being logged in. It appears to be related to a request limit rather than a ban on my account, such as a 429 or 401 IP ban. To address this, I have implemented a solution by incorporating a proxy and time sleep to avoid appearing like a robot. Additionally, if the list remains empty, logging in again is necessary., logging in again is necessary.


add model voyageai/voyage-multilingual-2

Add benchmark for model /voyageai/voyage-multilingual-2/.
Huggingface modelcard:
https://huggingface.co/voyageai/voyage-multilingual-2
Model info:
https://blog.voyageai.com/2024/06/10/voyage-multilingual-2-multilingual-embedding-model/

Thanks - will make sure to add it to the benchmark!

Let me know if you want me to add it as a contribution to the code.
I looked through the repo and I guess it would be very similar to .../openai_models.py.

@noterat I would be very happy than happy to accept a PR

@noterat I have added the model in #178. Once the models are done running it can be pushed to main and the leaderboard updated.
A bit of extra information:
The implementation follows that of MTEB (see model implementations in mteb here). In the future, it will likely transition to using the MTEB implementation once the updates that we are currently working on for MTEB are finalized.

Thank you for adding the model, it was helpful for me when choosing between voyageai and openai.

Out of curiosity, which one did you end up choosing and why? Just wondering if there is other trade-offs that people consider when selecting which is not in the benchmark yet

I ended up using VoyageAI because it looked like it was the benchmark language identification that lowered the average score. My use case is creating embeddings on Swedish so I guess that benchmark isn't relevant for me. But I haven't read up on that benchmark so it's a guess from my part.
Besides the models capabilities I also had to base my choice on the rate limits. My dataset is about 250 million tokens so I wanted something that is cheap and fast. And honestly this was the main driver. VoyageAI had better rate limits (300 requests/min & 1 M token/min) and the first 50 M tokens are free. Compare that to OpenAI that had 3 M token per day - and that is in batch mode.
So I come from an operational perspective where price and speed are a large part of the puzzle.

Thanks this was exactly what I was hoping for. Good to get some of the other important decisions incorporated.

My use case is creating embeddings on Swedish so I guess that benchmark isn't relevant for me.

The benchmark has a Swedish subsection. I see that the language identification might not be as relevant if you know the target language (might remove that in the future)

Besides the models capabilities I also had to base my choice on the rate limits. My dataset is about 250 million tokens so I wanted something that is cheap and fast. And honestly this was the main driver. VoyageAI had better rate limits (300 requests/min & 1 M token/min) and the first 50 M tokens are free. Compare that to OpenAI that had 3 M token per day - and that is in batch mode.

Yea my intuition is that ease-of-use matters notably more once the embedding quality is adequate. Will try to see if I can find the time to incorporate a table comparing the APIs into the interface as well.


[Improvement] Difficulties other than normal neglected

We've only built stuff around normal, and everything else feels really unbalanced and weird. Should fix this in the future.

2.0 essentially just discards other difficulties. For now, at least, this is no longer an issue.


Questions on Material Properties [Tower Design]

I've been reviewing the "Definition of the IEA Wind 22-Megawatt Offshore Reference Wind Turbine" and have some questions about the material properties mentioned:

The Poisson's ratio for the tower's structural steel is listed as 0.265. Could you provide insight into why this value is used, as it appears somewhat low compared to typical values for structural steel?
Is it possible to access the fatigue curves for this material?

Thank you all for the great work on this project!

Hello,
this is a good catch, thanks for posting this issue.
I can see that the previous reference wind turbines from IEA Wind Task 37 use Poisson's ratio of 0.3. The new value of 0.265 comes from an initial design performed by DTU.

@fzahle @tkbadtu, any reference for those values?
This said, if we use the simple formula
[ \nu = \frac{{E}}{{2G}} - 1 ]
for the steel used in the tower and monopile of the IEA-22, we get 0.261.
I will add that the in our design approach E, G, and [\rho] matter greatly, but [\nu] doesn't
As for fatigue, we have not designed the tower against fatigue and the windIO yaml simply lists a slope of 3
https://github.com/IEAWindTask37/IEA-22-280-RWT/blob/aacbcd7d1ce7ed1f360a3e8d41b66f9d6c6af4d0/windIO/IEA-22-280-RWT.yaml#L1223
If you are looking at fatigue on tower and monopile, please keep us informed on what you find!

Hi,
It was indeed us at DTU doing the initial tower and monopile design and hence also adding the material properties.
As @ptrbortolotti points out, the Poisson ratio is currently not used in the design phase, and following back our toolchain, I can confirm that the current value of 0.265 was computed from the equation that @ptrbortolotti is showing above. I was not able to figure out the source of the number being 0.265 and not 0.261, as one should expect.
I would suggest that the value should be updated and that we preferably add a source that is consistent with the values for E, G, and $\rho$. Any suggestions for a source?

Hello @ptrbortolotti, @kenloen,
Firstly, thank you for your detailed responses and clarification regarding the Poisson's ratio used in the design of the IEA 22-Megawatt Offshore Reference Wind Turbine.
I understand that the Poisson's ratio of 0.265 was derived from an initial design performed by DTU, and using the simple formula, the calculated value would be 0.261.
Regarding the loads used in the design and modal analysis, could you confirm if the forces used were 5.4 MN, 0.09 MN, and −8.9 MN in the x, y, and z directions, respectively, and the moments in the x, y, and z directions were −1.6 MN m, −13.3 MN m, and 10.8 MN m? Also, was the mass of the rotor-nacelle assembly and gravity considered for the design? For the modal analysis, did you only consider the mass of the rotor-nacelle assembly, or did you also include the forces of 5.4 MN, 0.09 MN, and −8.9 MN in the x, y, and z directions, respectively, and the moments of −1.6 MN m, −13.3 MN m, and 10.8 MN m?
Thanks again for all your excellent work on this project!

hello @Joao97ribeiro,
I've just double-checked: those 3 forces and 3 moments are correct and they are the sum of aerodynamic and gravitational loading, applied at tower top and estimated by WISDEM. For the modal analysis, WISDEM uses only gravitational loads. The mass data is:
RNA mass: 1,218,685 kg
Coordinates of the center of gravity of the RNA in tower-top c.s.: -8.658,-0.112, 4.622 (m)
Inertia of the RNA in tower-top c.s.: 7.421e+08, 5.143e+08, 4.911e+08, 9.054e+02, 2.003e+07, 2.900e+05 (kg m2)
I hope this helps.
Regards,
Pietro

hello @Joao97ribeiro, I've just double-checked: those 3 forces and 3 moments are correct and they are the sum of aerodynamic and gravitational loading, applied at tower top and estimated by WISDEM. For the modal analysis, WISDEM uses only gravitational loads. The mass data is: RNA mass: 1,218,685 kg Coordinates of the center of gravity of the RNA in tower-top c.s.: -8.658,-0.112, 4.622 (m) Inertia of the RNA in tower-top c.s.: 7.421e+08, 5.143e+08, 4.911e+08, 9.054e+02, 2.003e+07, 2.900e+05 (kg m2) I hope this helps. Regards, Pietro

Hi @ptrbortolotti,
Thanks for the fast response and for sharing the values; they will be a great help.
I would like to confirm if the three forces and three moments, considering gravitational effects, are only for the RNA mass or if they already include the weight of the tower. Also, do these values exclude wind loads?
One last question regarding buckling: what loads did you consider? Were these three forces and moments included?
Thanks,
João

Those F and M are applied at tower top, and so don't include the effect of tower mass. They also don't include wind loads, which have actually been neglected in the design (I'm sorry, I should have made this point clearer in the report!)
The buckling analysis uses the same tower top loads, but it also uses the distributed forces and moments from gravity, which vary along the tower height

Thanks again, @ptrbortolotti, for the quick response. This makes sense, and I appreciate you letting me know that wind loads were not considered (no need to apologize; the report is well-written and contains great information—this is just a minor detail)
I have compared my results with yours for the modal analysis, but there are no buckling results in the report. Do you have any values for the buckling results that you can share? I'm conducting a FEM simulation and would like to compare these results with my analysis. Thanks!


Bluetooth: Deadlock with TX of ACL data and HCI commands (command blocked by data)

Describe the bug
Performing GATT write commands from a peripheral and a central as fast as possible from the main loop while the peer central is performing security procedure to bond, causes the following assertion fail on both the peripheral and central device
In peripheral:
*** Booting Zephyr OS build v2.3.0-rc1-368-g8fecd4b32d9d  ***
Bluetooth initialized
[00:00:00.007,507] <inf> fs_nvs: 6 Sectors of 4096 bytes
[00:00:00.007,507] <inf> fs_nvs: alloc wra: 0, ff0
[00:00:00.007,507] <inf> fs_nvs: data wra: 0, 0
[00:00:00.008,941] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)
[00:00:00.008,941] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:00.008,941] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 2.3 Build 0
[00:00:00.009,216] <inf> bt_hci_core: No ID address. App must call settings_load()
[00:00:00.031,829] <inf> bt_hci_core: Identity: c1:ab:66:13:11:2e (random)
[00:00:00.031,860] <inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x0000, manufacturer 0x05f1
[00:00:00.031,860] <inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0xffff
Advertising successfully started
Connected: ea:15:23:d0:ac:03 (random)
MTU: 23
Exchange pending...Write: count= 0, len= 0, rate= 0 bps.
MTU exchange successful (247)
ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:370
        k_sem_take failed with err -11
[00:00:27.460,693] <err> os: r0/a1:  0x00000003  r1/a2:  0x00000001  r2/a3:  0x00000001
[00:00:27.460,693] <err> os: r3/a4:  0x00024c28 r12/ip:  0x00000000 r14/lr:  0x00007a01
[00:00:27.460,693] <err> os:  xpsr:  0x61000000
[00:00:27.460,723] <err> os: Faulting instruction address (r15/pc): 0x00007a0c
[00:00:27.460,723] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
[00:00:27.460,723] <err> os: Current thread: 0x200014f0 (unknown)
[00:00:27.807,037] <err> os: Halting system

In central_hr:
*** Booting Zephyr OS build v2.3.0-rc1-368-g8fecd4b32d9d  ***
Bluetooth initialized
Scanning successfully started
[DEVICE]: 22:52:48:f8:a5:91 (random), AD evt type 3, AD data len 31, RSSI -45
[DEVICE]: 63:47:03:75:bc:8f (random), AD evt type 0, AD data len 29, RSSI -41
[AD]: 1 data_len 1
[AD]: 3 data_len 6
Connected: 63:47:03:75:bc:8f (random)
MTU: 23
Exchange pending...[00:00:00.006,042] <inf> bt_hci_core: HW Platform: Nordic Semiconductor (0x0002)MTU exchange successful (247)

[00:00:00.006,042] <inf> bt_hci_core: HW Variant: nRF52x (0x0002)
[00:00:00.006,042] <inf> bt_hci_core: Firmware: Standard Bluetooth controller (0x00) Version 2.3 Build 0
[00:00:00.006,683] <inf> bt_hci_core: Identity: ea:15:23:d0:ac:03 (random)
[00:00:00.006,683] <inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x0000, manufacturer 0x05f1
[00:00:00.006,683] <inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0xffff
[00:00:00.688,507] <err> bt_conn: Unable to allocate TX context
ASSERTION FAIL [err == 0] @ WEST_TOPDIR/zephyr/subsys/bluetooth/host/hci_core.c:370
        k_sem_take failed with err -11
[00:00:11.095,764] <err> os: r0/a1:  0x00000003  r1/a2:  0x00000001  r2/a3:  0x00000001
[00:00:11.095,764] <err> os: r3/a4:  0x0002142a r12/ip:  0x00000000 r14/lr:  0x0000666d
[00:00:11.095,764] <err> os:  xpsr:  0x61000000
[00:00:11.095,764] <err> os: Faulting instruction address (r15/pc): 0x00006678
[00:00:11.095,794] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
[00:00:11.095,794] <err> os: Current thread: 0x2000117c (unknown)
[00:00:11.702,239] <err> os: Halting system

To Reproduce
Use the branch: https://github.com/cvinayak/zephyr/commit/a2289565363a210e33b8956eac46df55e19a790a
Steps to reproduce the behavior:
Build and flash peripheral

mkdir -p build/peripheral; cd build/peripheral
cmake -GNinja -DBOARD=nrf52dk_nrf52832 ../../samples/bluetooth/peripheral
ninja
ninja flash

Build and flash central_hr
5. mkdir -p build/central_hr; cd build/central_hr
6. cmake -GNinja -DBOARD=nrf52dk_nrf52832 ../../samples/bluetooth/central_hr
7. ninja
8. ninja flash

Open two terminals, minicom -D /dev/ttyACMx
Observe both peripheral and central_hr fail after connection

Expected behavior
peripheral and central_hr should connect, transfer write commands, perform SMP pairing, be encrypted and continue to transder write commands.
Impact
showstopper
Environment (please complete the following information):

OS: Linux
Toolchain: Zephyr SDK 0.11.2
Commit SHA or Version used: https://github.com/cvinayak/zephyr/commit/a2289565363a210e33b8956eac46df55e19a790a

Anylsis:
Symmetrical deadlock in both devices in the connection between TX and RX thread.
TX thread has filled up the all the buffers in the controller and has blocked waiting for num complete events.
Controller has filled up all it's receive buffers and the RX thread is delivering ACL packets as fast as it can.
The RX thread receives an HCI event (phy update complete) and blocks on sending an HCI command waiting for the TX thread to send the command.
The TX thread will not be able to proceed until a num complete arrives on both sides.
The RX thread will not be able to proceed until TX thread is unblocked on both sides.
Receive buffer is full on both sides so no new packets can be transmitted, meaning no new completes will happen.

is this fixed?

I ran into this issue and my workaround was to handle the sending from a workqueue with a lower priority.

@xudongzheng Could you elaborate on your workaround? What exactly did you move to the workqueue? Sending of data, or sending of the command?

@joerchan I was occasionally getting the "Unable to allocate TX context" error when calling bt_gatt_notify() from a work running on the system workqueue. However moving my bt_gatt_notify() call to a work running on my custom workqueue (with a lower priority) did not give the same "Unable to allocate TX context" error.

@xudongzheng That behavior is documented here: https://github.com/zephyrproject-rtos/zephyr/blob/main/include/bluetooth/gatt.h#L927L930
That is however not the same as is happening in this case, you haven't encountered this issue.

I'm seeing the same thing when I spam bt_gatt_notify.  This seems like a dangerous bug since there's no way to really know if you'll exceed the threshold for overflow.  Much better would be to simply return an error that could optionally be ignored for non-critical notifications.

The RX thread receives an HCI event (phy update complete) and blocks on sending an HCI command waiting for the TX thread to send the command.

I can't understand this, can you point out the relevant code?

@joerchan Why we hci_le_read_max_data_len  not use bt_hci_cmd_send to avoiding race condition ?

I'm seeing the same thing when I spam bt_gatt_notify. This seems like a dangerous bug since there's no way to really know if you'll exceed the threshold for overflow. Much better would be to simply return an error that could optionally be ignored for non-critical notifications. @galak can you comment on why you feel this is low priority?

I also see this. Whenever I see Unable to allocate TX context the nRF52 I I control over HCI completely freezes. My bt_gatt_notify is now in a workqueue but if I decrease the notification speed to anything below 500ms the system still deadlocks.   It's totally bizarre.

@cvinayak and I could generate the same assertion using the sample in #37577

@joerchan Why we hci_le_read_max_data_len not use bt_hci_cmd_send to avoiding race condition ?

@LingaoM Because the problem would still be there for all the other places where we use bt_hci_cmd_send_sync.
Also you can't simply replace it, because you want to get the output of the command complete, which you wouldn't if you don't use send_sync.

I could reduce the number of assertion failures with increased buffer sizes and counts:
# see https://github.com/zephyrproject-rtos/zephyr/issues/34600
CONFIG_BT_L2CAP_TX_BUF_COUNT=128

# Hoping that this reduces sem_take errors (see: https://github.com/zephyrproject-rtos/zephyr/issues/25917)
CONFIG_BT_BUF_ACL_TX_SIZE=251
CONFIG_BT_BUF_EVT_RX_SIZE=255
CONFIG_BT_BUF_EVT_RX_COUNT=128
CONFIG_BT_BUF_CMD_TX_COUNT=64

Related Nordic Devzone thread: https://devzone.nordicsemi.com/f/nordic-q-a/89888/ncs-nordic-uart-service-bt-rx-hci-timeout

@klapro this is supposed to be fixed. Could you open a new bug report with all the relevant details (how to reproduce etc) ? Maybe it's something different.


Fix README.md errors

Fix README.md errors

Thanks for the PR! Once you sign the CLA we can get it in.

I have read the CLA Document and I hereby sign the CLA

Thank you!


some compiling issues.

Fixing: some compiling issues.

The old opencv headers are conflict with the the new version of opencv.
so i remove the files.

https://github.com/KeySecure/OpenCV-iOS
https://github.com/KeySecure/card.io-iOS-source
|------- https://github.com/KeySecure/card.io-dmz
if we put all the 3 project in the same folder, we can compile the code without any error.

With the old Xcode project settings. We can generate an app can run in iPhone device.
But we can NOT submit it to Apple App Store.

What happens when you try to submit it to the App Store? Please file an issue describing goes wrong. It seems likely that there is a more direct, targeted fix for that problem.

Like this.

I think Seldom person will use the framework file. It's terrible. It's so HUGE.


Messenger channel has stopped working

Bot Info

SDK Platform:  .NET
SDK Version: <IP_ADDRESS>
Active Channels: Messenger, DirectLine
Deployment Environment: Azure Bot Service (S1 tier) , Azure App Service, (Standard 1: Medium)

Issue Description
Since last Friday our Messenger channel has stopped working. We receive messages from Messenger, but when sending the response - any response, even the "IsTyping" message - we receive a 400 error (BadRequest):
Microsoft.Bot.Connector.ErrorResponseException: Operation returned an invalid status code 'BadRequest'

This code has not been changed recently, and the DirectLine and WebChat channels work correctly with the same code.
I've downloaded all the logs from the App Service - Web server logging, Failed request tracing, Application logs - but I can't find any clue in there as to why this is happening. I've checked the Facebook developer console but everything there is 'green'.
Is there any way of finding out why this is happening? Any suggestions on things to try to fix it?

@stuartd can you share a code snippet so we can try to reproduce as you are doing this?

@JasonSowers here's the code that sends the IsTyping response:
// 'activity' is the incoming message
var connector = activity.CreateConnectorClient();
var isTypingReply = activity.CreateReply();
isTypingReply.Type = ActivityTypes.Typing;
await connector.ReplyAsync(isTypingReply);

The stack trace of the error is this:

Microsoft.Bot.Connector.ErrorResponseException: Operation returned an invalid status code 'BadRequest'
at async Task<HttpOperationResponse> Microsoft.Bot.Connector.Conversations.ReplyToActivityWithHttpMessagesAsync(string conversationId, string activityId, Activity activity, Dictionary<string, List> customHeaders, CancellationToken cancellationToken)
at async Task Microsoft.Bot.Connector.ConversationsExtensions.ReplyToActivityAsync(IConversations operations, string conversationId, string activityId, Activity activity, CancellationToken cancellationToken)
at async Task MSBotExtensions.ReplyAsync(ConnectorClient client, Activity reply) in MSBotExtensions.cs:line 23
at async Task Controllers.MessagesController.SendIsTypingResponse(Activity activity, ConnectorClient connector) in MessagesController.cs:line 506
at async Task Controllers.MessagesController.processIncomingMessage(Activity message) in MessagesController.cs:line 331
at async Task Controllers.MessagesController.Post(Activity activity) in MessagesController.cs:line 102

Is the bot still functioning normally, but just this error is coming through as well? I'm not exactly sure what you mean by this in yout original post:

We receive messages from Messenger

Is the bot still functioning normally,

No: we receive messages from Messenger, but whenever we try to respond to the message we get this error.
Other channels work with the same code.

I'm wondering now if the Messenger registration (page access token etc) has somehow expired and needs to be refreshed. Is that a possibility?

It may be, but that is not something I have experienced.  I did get a warning in the facebook dev portal on one of my bots earlier this week regarding something about having to get reapproved by facebook.  I wonder if this might be the cause as well.  I honestly didn't really read it because it is just a test bot, so I do not recall the exact details.

That's this one:

App Review submission required by August 1, 2018 to retain access to Facebook Platform APIs

I'm going to refresh the registration.

Going to open an issue with FB to try and get some visibility into why this is failing.

@stuartd would you mind letting us know what you find as it may help others as well?

@JasonSowers of course..

Using ngrok to debug locally I have determined the underlying issue:
{
  "error": {
    "code": "MissingProperty",
    "message": "The bot referenced by the 'from' field is unrecognized"
  }
}

This is now with Azure support for resolution.

Have you tried deploying a test bot to Facebook to see if the issue occurs in another bot for you? I was just doing some Facebook testing yesterday with no issues still.

Turns out there was an internal misconfiguration. This was the resolution from MS Support:

The Product Group has checked the records and there is a record for the Facebook Channel that does not match the configuration you set up... The Product Group has fixed the record for the Facebook channel and now the bot should be working.

And it is working.


Added docker-compose file

steps: docker-compose pull && docker-compose up
shutdown: docker-compose down

Thanks, @yogeshVU!


How do I convert single .dcm file into a sequence with pydicom

How do I convert single .dcm file into a sequence with pydicom

Hello @jiaomei222,
This is the issue tracker for SimpleITK not pydicom, so you are asking the question in the wrong place.
Having said this, using SimpleITK, you can split a multi-frame DICOM file into the separate frames using a slight change to this example, see code below:
import SimpleITK as sitk

import sys
import time
import os

if len(sys.argv) < 3:
    print(
        "Usage: python "
        + __file__
        + " <DICOM file> <output_directory>"
    )
    sys.exit(1)

file_reader = sitk.ImageFileReader()
file_reader.LoadPrivateTagsOn()
file_reader.SetFileName(sys.argv[1])
image3D = file_reader.Execute()
direction = image3D.GetDirection()

writer = sitk.ImageFileWriter()
# Use the study/series/frame of reference information given in the meta-data
# dictionary and not the automatically generated information from the file IO
writer.KeepOriginalImageUIDOn()

# Copy relevant tags from the original meta-data dictionary (private tags are
# also accessible).
tags_to_copy = [
    "0010|0010",  # Patient Name
    "0010|0020",  # Patient ID
    "0010|0030",  # Patient Birth Date
    "0020|000D",  # Study Instance UID, for machine consumption
    "0020|0010",  # Study ID, for human consumption
    "0008|0020",  # Study Date
    "0008|0030",  # Study Time
    "0008|0050",  # Accession Number
    "0008|0060",  # Modality
    "0008|0031",  # Series Time
    "0008|0021",  # Series Date
    "0008|0008",  # Image Type
    "0020|000e",  # Series Instance UID
    "0008|0012",  # Instance Creation Date
    "0008|0013",  # Instance Creation Time
]

series_tag_values = [
    (k, image3D.GetMetaData(k.lower()))
    for k in tags_to_copy
    if image3D.HasMetaDataKey(k.lower())
] + [
    (
        "0020|0037",
        "\\".join(
            map(
                str,
                (
                    direction[0],
                    direction[3],
                    direction[6],
                    direction[1],
                    direction[4],
                    direction[7],
                ),  # Image Orientation (Patient)
            )
        ),
    ),
    (
        "0008|103e",
        image3D.GetMetaData("0008|103e")
        if image3D.HasMetaDataKey("0008|103e")
        else "",
    ),  # Series Description is an optional tag, so may not exist
]

for i in range(image3D.GetDepth()):
    image_slice = image3D[:, :, i]
    # Tags shared by the series.
    for tag, value in series_tag_values:
        image_slice.SetMetaData(tag, value)
    #   Image Position (Patient)
    image_slice.SetMetaData(
        "0020|0032",
        "\\".join(map(str, image3D.TransformIndexToPhysicalPoint((0, 0, i)))),
    )
    #   Instance Number
    image_slice.SetMetaData("0020|0013", str(i))

    # Write to the output directory and add the extension dcm, to force writing
    # in DICOM format.
    writer.SetFileName(os.path.join(sys.argv[2], str(i) + ".dcm"))
    writer.Execute(image_slice)
sys.exit(0)

Hello @jiaomei222, This is the issue tracker for SimpleITK not pydicom, so you are asking the question in the wrong place.
Having said this, using SimpleITK, you can split a multi-frame DICOM file into the separate frames using a slight change to this example, see code below:
import SimpleITK as sitk

import sys
import time
import os

if len(sys.argv) < 3:
    print(
        "Usage: python "
        + __file__
        + " <DICOM file> <output_directory>"
    )
    sys.exit(1)

file_reader = sitk.ImageFileReader()
file_reader.LoadPrivateTagsOn()
file_reader.SetFileName(sys.argv[1])
image3D = file_reader.Execute()
direction = image3D.GetDirection()

writer = sitk.ImageFileWriter()
# Use the study/series/frame of reference information given in the meta-data
# dictionary and not the automatically generated information from the file IO
writer.KeepOriginalImageUIDOn()

# Copy relevant tags from the original meta-data dictionary (private tags are
# also accessible).
tags_to_copy = [
    "0010|0010",  # Patient Name
    "0010|0020",  # Patient ID
    "0010|0030",  # Patient Birth Date
    "0020|000D",  # Study Instance UID, for machine consumption
    "0020|0010",  # Study ID, for human consumption
    "0008|0020",  # Study Date
    "0008|0030",  # Study Time
    "0008|0050",  # Accession Number
    "0008|0060",  # Modality
    "0008|0031",  # Series Time
    "0008|0021",  # Series Date
    "0008|0008",  # Image Type
    "0020|000e",  # Series Instance UID
    "0008|0012",  # Instance Creation Date
    "0008|0013",  # Instance Creation Time
]

series_tag_values = [
    (k, image3D.GetMetaData(k.lower()))
    for k in tags_to_copy
    if image3D.HasMetaDataKey(k.lower())
] + [
    (
        "0020|0037",
        "\\".join(
            map(
                str,
                (
                    direction[0],
                    direction[3],
                    direction[6],
                    direction[1],
                    direction[4],
                    direction[7],
                ),  # Image Orientation (Patient)
            )
        ),
    ),
    (
        "0008|103e",
        image3D.GetMetaData("0008|103e")
        if image3D.HasMetaDataKey("0008|103e")
        else "",
    ),  # Series Description is an optional tag, so may not exist
]

for i in range(image3D.GetDepth()):
    image_slice = image3D[:, :, i]
    # Tags shared by the series.
    for tag, value in series_tag_values:
        image_slice.SetMetaData(tag, value)
    #   Image Position (Patient)
    image_slice.SetMetaData(
        "0020|0032",
        "\\".join(map(str, image3D.TransformIndexToPhysicalPoint((0, 0, i)))),
    )
    #   Instance Number
    image_slice.SetMetaData("0020|0013", str(i))

    # Write to the output directory and add the extension dcm, to force writing
    # in DICOM format.
    writer.SetFileName(os.path.join(sys.argv[2], str(i) + ".dcm"))
    writer.Execute(image_slice)
sys.exit(0)

Thank you very much for your reply and it works well, I apologize for saying the wrong name.

Hello @jiaomei222,
Closing this issue. Happy to see the code addressed your needs.


Reminder to blink eyes every 20 mins

Script Title - Blink Eyes Reminder
Brief - This script reminds you to blink eyes every 20 minutes - in adherence to the 20-20-20 rule for fixing dry eyes.
Instructions

Create a new folder for your script and file/folder name should be appropriate.
Create a README.md (using this template) in your folder for program Instructions
add requirements.txt if needed

Programming Language

[x] Python

Happy Coding

@pawangeek I've created this issue to contribute a reminder script I use to remind me to blink my eyes every 20 mins. Can you pls assign this issue to me?

Hi @pawangeek , raised this PR : https://github.com/python-geeks/Automation-scripts/pull/925 Can you review?


too much padding in vertical legend and x-axis of bar chart.  is there any way to reduce this?

facing same issue


Pre builded executables

I wanted to use dictu but i see there is no executables to install rather i should manually build it from the source. It will be good if you make pre builded executables for people who do not want to build but want to use the language.

Definitely a good point, and something to look into. I wonder if there's a way to automate the release process a bit more which handles building Dictu on a range of different platforms.

Yeah. Because only people who have cmake can only install and use this language and its a bad idea for those who don't have it. You can still keep custom building from the source code as a option but keeping the binary files in the releases tab will be better i guess.

While not strictly what you asked for (will still look into pre-built executables for releases), there is now an option to pull Dictu from Dockerhub which may be of interest to you!


[FEATURE] allow to set number of funded accounts

Describe the solution you'd like
allow to set number of funded accounts
Additional context
can be used for performance improvements in CI

This is already possible in the config/wallets.

@thepiwo do we want to improve here anything in that regards? currently we have a set of 10 accounts pre-funded with start of devmode, right? can we close this?

we have any number of accounts as specified in the accounts.json


Links

https://dev.to/peholmst/strategic-domain-driven-design-3e87
https://github.com/ddd-by-examples/library

Strategical DDD
Domain
Ubicuos language


Fixed the https://, should be http://

It was broken on chrome and possibly other browsers.

Yeah, the SE meta sites don't support HTTPS for some reason. It's incredibly frustrating.

Thanks for the quick response!


[JAWS V1] jaws deploy --set-gateway

Maybe I've missed it somewhere so pardon me if that's the case, but it would be nice to automatically add an API Endpoint to the AWS API Gateway. I have multiple ways in mind right know:

Use a parameter in lambda.json to determine which resource and endpoint to use as well as which http method to accept e.g.:

  {
      "endpoint": "users/signup"
  }

Use your local directory structure, as it is right know. Problem is I didn't came to a good solution yet how to do that with the new module naming coming in 1.0.0. Would be the more convention over configuration way i think.
Let's pass the endpoint url as parameter after --set-gateway , but thats more an additional option i suppose as it would be unnecessary to do it every time you deploy a function.

Thoughts ? Generally as well as on --set-gateway ?
Of course there would be more to cover AWS Api Gateway.. for example url embed variables for example:
  {
      "endpoint": "users/show/{userId}"
  }

:+1: We're still working on this.  It's critical.  API Gateway is still in its infancy and automating API Gateway operations has been tough.
• There is no aws-sdk support for API Gateway, so we can't use that to create endpoints for people.
• The api-gateway-swagger-import-tool is a standalone java tool that people have to install and build locally before they can use it.
The awsm.json (previously lambda.json) could definitely include API Gateway data.  I just put in the Google document that it should include a swagger snippet, since swagger is a powerful standard.  Perhaps when installing a module, it will fetch the module's swagger and add it to the project's main swagger.json like it does with CloudFormation templates.

I see, so it seems like we have to wait until they get the API Gateway support covered. Only other think as an workaround I can think of would be phantom.js combined with an script which basically controls the web interface itself..BUT thats such a bad solution I wasn't even sure if i should suggest it :D
Regarding the api-gateway-swagger-import-tool I've gone through the source code, roughly, seems portable to js to me but I don't get if it would be enough to have it without the aws-sdk support for API Gateway ? They name AWS-CLI as an requirement,  it's available for Win/OSX/Linux but would be bad ux I guess to have user get that covered on there own.. Maybe we can replace the AWS-CLI requirement in the process of porting api-gateway-swagger-import-tool or maybe I'm missing something.

:+1:  I'd love to rebuild that swagger import tool.  Actually, there's probably better options, like a single API Gateway API route that you could upload it to.  Anyway, I've filed swagger import tool complaint directly with the AWS team and I'm hoping a better solution is coming soon.

There isn't AWS-SDK support for API Gateway, but there seems to be an API for it: https://docs.aws.amazon.com/apigateway/api-reference/

API Gateway auto-deployment is in JAWS V1


Use Unix Domain Socket for the registry

First of all: Thank you for napalm! I've been using naersk since quite a while and I really like not having lots of redundant generated files laying around in the repository :-)
This is an alternative solution to pull request #21, which implements picking a random TCP port for the registry. While I haven't found the exact reason why it has to be randomized, I can only guess that it's to prevent port conflicts in unsandboxed builds.
The implementation also has few ugly workarounds (eg. using lsof to get the port number), but the main issue I see is that even if the port is random, any user/process on the system can still connect to that port.
So instead of picking a random TCP port, let's simply not use IP sockets at all and use ip2unix to force NPM into connecting to the Unix socket.
We're now using a dummy IP address (<IP_ADDRESS>) for the registry URL in order to be able to match the registry URL in the ip2unix rule as a distinct host and at the same time prevent silent failure in case we forgot to transform/wrap sockets at some point.
Fixes: #4
Fixes: #10

@ciderale: I appear to have missed https://github.com/nmattia/napalm/pull/21#issuecomment-697022512! Does this implementation work for you as well?
@aszlig thanks a lot! I didn't know about ip2unix, seems very handy.

I really like not having lots of redundant generated files laying around in the repository :-)

Me too :)

@nmattia Unfortunately, the derivation ip2unix (or its dependencies) seems to not work on MacOS. I just tried to just get the tool in a nix shell and it failed (while building the attr derviation). I'm not sure if the problem is easy resolvable. It would be very unfortunate to exclude MacOS for this helpful tool.
I didn't know the ip2unix tool either. I agree that the lsof is not very pretty, but it has the advantage the registry still works with "traditional" host:port scheme. I find that a benefit.
Do I interpret it correctly, that the host argument for the registry must match the argument to ip2unix? In that case, I think it would be better to make that explicit and not relying on the default value in the registry.

First of all a disclaimer, since everybody seems to be wondering: I'm the author of ip2unix.
@ciderale: Ah, you're correct, I keep forgetting about OS X. There is an issue for that, but since I don't have access to OS X I didn't get around to implement support for OS X.
The reason why I used ip2unix instead of going via a random port is because I have a few dependencies with Git inputs, which I want to redirect/mitm accordingly, so this implementation is just part of some yak shaving.

I didn't know the ip2unix tool either. I agree that the lsof is not very pretty, but it has the advantage the registry still works with "traditional" host:port scheme. I find that a benefit.

As mentioned in the commit message, I could have used localhost, <IP_ADDRESS> or [::1] but I deliberately didn't so that the connection will fail hard if for some reason NPM connects via IP sockets (eg. via rule mismatch).

Mh, this not working on macOS is definitely a problem; we have a few napalm projects that we build on macOS at $WORK. @aszlig do you reckon you'll get to implement support at some point? In the mean time I'll have a look at https://github.com/nmattia/napalm/pull/21. Either way, thanks to both of you for the contributions and ideas!

Had a go at it: https://github.com/nmattia/napalm/pull/24
@aszlig can you let me know if that works for your use case?
@ciderale can you check if npm can connect on your machine?

@nmattia #24 works on my machine and I think writing the port to a file is a good solution.

Closing in favor of https://github.com/nmattia/napalm/pull/24, @aszlig please let me know if that solution works for you!

@nmattia: Ah, of course it doesn't, because for me the port has never been an issue since I run all builds sandboxed. As mentioned, it's not about the port but rather to multiplex all kind of hosts. In any way, I'll implement this as a downstream patch and resubmit here once ip2unix has support for OS X.

Ah yes, of course. Got a lot on my plate ATM, I easily get confused! I guess another possibility is to hide the use of ip2unix behind a flag in the derivation, though that might just make things complicated.

I have a few dependencies with Git inputs, which I want to redirect/mitm accordingly

Can you clarify this bit?

I have a few dependencies with Git inputs, which I want to redirect/mitm accordingly

Can you clarify this bit?

Essentially, my plan is/was to redirect port 443 (in conjunction with fake CA certificates) and 80 via Unix socket to either the registry or another dedicated service, which then will serve Git dependencies to NPM. In hindsight however, I think it's better to just patch NPM instead, which then would also avoid needing such a fake registry in the first place.


Add a Makefile for easy command running

This also changes the command that was shown in the README in two ways:

-a is removed. This makes the build quicker by doing incremental builds.
-W is added. This changes warnings into errors, so they don't
accidentily slip in.

Could also add a watch target:
watch:
	sphinx-autobuild -b html -W -n . _build

As a separate observation -- the makefile is really more of a shell script because it's all "phony" targets (in GNU terminology). it would be nice if the Makefile could capture the dependency between the source and output files to determine when to rebuild things, but I guess the sphinx-build tool itself manages the incremental build.
That said, I hesitate to mark the targets with .PHONY either because it's not conformant with POSIX make.

Done, I also marked them as .PHONY (I always forget doing that). Worst case if it's not supported and nothing bad happens. It seems to be supported by both GNU, OpenBSD and FreeBSD make, so I think it's also a really common extension.

Thank you, this will be more convenient! LGTM


Fix prop_rebalanceSelection wrt #2118

Issue Number
#2118

Wasn't able to write a reliable generator that always triggers this case... might be worth adding a unit test.

Ran 100k tests:
Cardano.Wallet.Primitive.Fee
  prop_rebalanceSelection
    The fee balancing algorithm converges for any coin selection.
      +++ OK, passed 100000 tests; 619923 discarded:
      94.322% reserve > fee
      45.096% fee > delta
      41.094% reserve > 0 && fee > delta
      39.418% reserve > fee && fee > delta

Finished in 229.6284 seconds
1 example, 0 failures

bors r+

bors r+

bors r+

Failures might actually be proper ones — SHELLEY_MIGRATE_01_big_wallet might need to be adjusted if the fee calculation has changed.

I couldn't reproduce the failure locally:
API Specifications
  SHELLEY_MIGRATIONS
[cardano-wallet.integration:Notice:30] [2020-12-02 15:08:43.63 UTC] Configuring cluster in /tmp/test-790360365591b84b
[cardano-wallet.integration:Notice:39] [2020-12-02 15:08:45.85 UTC] Transitioning from Byron to Shelley... Please wait 20s...
[cardano-wallet.integration:Notice:39] [2020-12-02 15:09:07.90 UTC] Setting up faucet...
[cardano-wallet.integration:Notice:39] [2020-12-02 15:09:11.34 UTC] 4 stake pools are being registered on chain... Please wait 60s until active... Can be skipped using NO_POOLS=1.
[cardano-wallet.integration:Notice:588] [2020-12-02 15:10:28.27 UTC] http://<IP_ADDRESS>:45683/
    SHELLEY_MIGRATE_01_big_wallet -  migrate a big wallet requiring more than one tx

Finished in 145.4361 seconds
1 example, 0 failures

I'm suspecting there's some randomness to the values?

bors try

bors try

bors r+

bors r+

bors r+

bors r+

bors r+


Do Lint Better

This addresses all of #999 and incorporates/relies on changes in #997 and #1001 to be approved/integrated.  Things shouldn't be linked together, I know, but it's hard to not do that with the number of changes coming.

Since this is a minor infrastructure change and all tests are passing, I'll merge after one approval.


Extension causes high cpu load

Issue Type: Performance
Extension Name: python
Extension Version: 2019.8.30787
OS Version: Windows_NT x64 10.0.18362
VSCode version: 1.39.0-insider

ms-python.python-unresponsive.cpuprofile.txt
Find more details here: https://github.com/Microsoft/vscode/wiki/Explain:-extension-causes-high-cpu-load

CPU profile states that you had this issue while getting python interpreters.
Can you please inform if you are using a network drive.
If an interpreter is on a network drive, fetching interpreters could be slow because Python process is running somewhere remote.
Also, please copy and paste the Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging).

No, all running off my local HD. At the time it was updating extensions and copy of insider. The internet connection hung a bit but the reconnected so the installation also hung and threw that message. later I restarted everything downloaded installed successfully.
Thank you all


Update request.md

Return echo.HTTPError for correct body in response.

Closing as duplicate of #153