text:
[Feature Request] Prospector Customization

I am trying to put together a modpack with large but rare ore veins and ran into some issues.
The Prospector doesn't play well with modded blocks and air blocks, it will show code names that can be quite useless, like "tile.immersivengineering.name 2".
I am not sure if this can be fixed automatically. If not it would be nice to have an config option to specify names. Something like Display: "tile.immersiveengineering.name 2" = "Lead Ore" (or whatever I'm not a code sorcerer).
Also a blacklist would be handy, with air block activated by default. Maybe even with a reverse to whitelist function, to only show ores or "found nothing".
Thanks for considering these suggestions. Great mod by the way, it deserves more attention.

Yes it should show the translated language name, just like the one that shows on the block in your inventory.

I assume youre using 1.10.2 because you mentioned immersive eng

I think adding a blacklist makes the most sense.  I can default it to air, stone, dirt, and gravel.  Then any pack developers can add other things if desired, such as coal, or modded versions of dirt/stone such as marble or limestone.
Then ill just make sure it sends some sort of "nothing found" message if needed.

Language issue fixed.
next Ill either just do a blacklist, or ill try MAYBE to make it go both ways.  Maybe a flag "isBlacklist: true" but you can switch to false in config to invert.

Uploaded release, check it out once curse approves it
https://minecraft.curseforge.com/projects/cyclic/files/2398276

Thanks for the changes!
I tested it with a bunch of mods and it worked like a charm.
I haven't tried to do a whitelist yet but I'll report back if I run into issues.

authors: PrinceOfAmber ulkunderscore

repo: PrinceOfAmber/Cyclic


text:
Update study submission process

Summary Change Description
Simplify the study submission process by having the researchers add things to Google Drive themselves and simply point us to the Google Drive folder instead of attempting to have them submit the files via the form.
Affected Issue Numbers

Resolves #318

Code Review Notes
Checklist

[x] All issue requirements satisfied (or no linked issues)
[x] Linting passes.
[x] Migrations created & committed (or no model changes)
[x] Tests implemented (or no code changes)
[x] All tests pass

For anyone else wanting to look at the page comparison to get a sense...

That's a good point @hepcat72. The text is more verbose, and perhaps that makes it more intimidating. I'd like to separate the comments on the specifics of the text from the comments on the process as a whole. Both are important, but I want to make sure we agree on the process.
One thing to note, the headers are much larger (not really intentional, just realized now the originals started at h4). Shrinking those would probably help.
Overall, I feel the text in TraceBase is too big, especially in the tables. In fact, I display it by default at 80% just to make it readable, but that's a separate issue.

Forgot to add one comment, I didn't intend to leave anything off about validation of the AccuCor files, I'll push an update to address that shortly. Also, I'm not aware of a "file limit issue" with the validation, but please let me know if there is one. I'm sure there is a practical limit at least, uploading hundreds of files will probably cause issues.

Also, I'm not aware of a "file limit issue" with the validation, but please let me know if there is one. I'm sure there is a practical limit at least, uploading hundreds of files will probably cause issues.

Well, I'm effectively referring to the practical difficulties.  I have some vague recollection of some set limit in Django, but I'm probably mistaken about that.  Suffice it to say, I was thinking of the difficulties in submitting a bunch of files.  Have we even tested a bunch of files to make sure it doesn't time out or something?
Incidentally, I just discovered a bug where if you submit a bunch of gibberish excel files for accucor uploads, there's no status result shown for the sample table file - just a bunch of unchecked messages about the accucor files..

Thanks to feedback from @hepcat72, I used some collapsible elements (and modified some text) to make the page a bit more approachable. Could still be improved I think, but this seems improved to me.

Updated comparison

source: gharchive/pull-request

license: MIT

license_type: permissive

license_source: github-api


text:
[phpdoc] Page crashes when annotation type is too long

Information:

Prism version: 1.17.1 & 1.19.0
Plugins: language-phpdoc
Environment: Browser

Description
When the php annotation @var is referencing a type with a long name, the page crashes (at least Firefox & Chromium in their latest version).
Example
For example this code snippet will fail (See corresponding jsfiddle)…
<!DOCTYPE html>
<meta charset="utf-8">
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.19.0/themes/prism.min.css" rel="stylesheet" />

<?php
class ProjectCreator
{
    /** @var Git_Driver_Gerrit_ProjectCreator_Factory */
    private $factory;
}

… whereas this code snippet will be ok (See corresponding jsfiddle)
<!DOCTYPE html>
<meta charset="utf-8">
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.19.0/themes/prism.min.css" rel="stylesheet" />

<?php
class ProjectCreator
{
    /** @var Git_Driver_Gerrit */
    private $factory;
}

Best regards,
Nicolas

Seems like I messed up and one of the regexes takes exponential time to fail. I'll publish a fix.
Thank you for reporting!

Thanks for the fix! :+1:

source: gharchive/issue

authors: RunDevelopment nterray

repo: PrismJS/prism


text:
Update to prepare for PrismLauncher PR#2292

PR#2292
This should prepare things for the removal of old_* entries in the UI .

I don't think this will run: STATIC_OLD_SNAPSHOTS_FILE is used so I believe the only thing that needs to be done in this PR is the cange on updateMojang.py at line62 .
Also fix the conflicts.

This puts me in a tricky situation, as the entire chain involving the old snapshot json has been changed with the assumption that the file no longer exists.

Let's see if this one works.

repo: PrismLauncher/meta

license: MS-PL


text:
format.js RangeError: Invalid string length

return string.replace(/%(?:(\d+)$)?(s|%)/g, (g0, g1) => {
^
RangeError: Invalid string length
Node.js v18.17.1
my fix code:
module.exports = format
function format (string, _with = []) {
let i = 0
return string.replace(/%(?:(\d+)$)?(s|%)/g, (g0, g1) => {
if (g0 === '%%') {
return '%'
const idx = g1 ? parseInt(g1) - 1 : i++
if (_with[idx] !== undefined && _with[idx].length !== undefined) {
if (_with[idx].length > 5000) return "";
};
if (_with[idx] !== undefined) {
return _with[idx]
} else {
return ''
}
}
})
}
// i hope can add the limit

Dupe #106

Dupe #106

NAH

authors: Yaodeowo extremeheat

repo: PrismarineJS/prismarine-chat


text:
Ability to change control state [Developer Lab on beam]

It would be great to be able to change the state in the Lab for a specific game.
In my feature request, I will go over two scenarios:
Game: SNES Emulator
State 1: Controls retrofitted for Super Mario World
State 2: Controls retrofitted for Super Bomberman
Game: Rocket League
State 1: One player controls
State 2: Two player controls
This would make it easier to have a consistent stream going with constantly changing ROMs.

You wouldn't need to change the state on the lab.
Youplay and Merlin use different files for this. Usually when changing games we drop to a "Changing Game/setup" period whilst we get the new controls sorted.
This is the whole reason we support multiple configuration files. A file per emulator is used.

I understand that I can load different files, like rocket.json to load my
controls for Rocket League - but what if I want to stick with the same
emulator and just change button layout to state different things.
If I load Super Mario World, the button should state Jump.
And then if I load up Secret of Mana, I want the button to state Action.
What would the best way be to approach that? I figured the whole point of
states was for that.
Instead, I have to create a bunch of new games under the Developer Lab.
Of course, if I'm misunderstanding all of this - please let me know; I am
new to all of this. =]
On Wed, Aug 17, 2016 at 1:29 PM, Richard Fox notifications@github.com
wrote:

You wouldn't need to change the state on the lab.
Youplay and Merlin use different files for this. Usually when changing
games we drop to a "Changing Game/setup" period whilst we get the new
controls sorted.
This is the whole reason we support multiple configuration files. A file
per emulator is used.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ProbablePrime/interactive-keyboard/issues/25#issuecomment-240485491,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMt5jSOQUCbUera0BOusIoVDnDyh7Xq_ks5qg0USgaJpZM4Jmrk-
.

States is designed for this sort of thing yes.
States are fully supported by beam but not by this project.
I'll keep it in mind for future development

Sounds good! And of course, thank you for your work on this!
Considering I'm now going to be sticking on Beam [because of this tool],
I'm down to test any updates you send out. =D
Thanks again!
On Wed, Aug 17, 2016 at 1:49 PM, Richard Fox notifications@github.com
wrote:

States is designed for this sort of thing yes.
States are fully supported by beam but not by this project.
I'll keep it in mind for future development
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ProbablePrime/interactive-keyboard/issues/25#issuecomment-240491369,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMt5jVwwtkbOcGMqt9z2W4Mr7K7ZprQzks5qg0m7gaJpZM4Jmrk-
.

authors: ProbablePrime sorryaboutyourcats

repo: ProbablePrime/interactive-keyboard

license: mit

license_source: bigquery


text:
Removes the directory examples/_bak

Resolves #208 the easy and radical way: Complete erasure of the examples/_bak/ directory.

I know @mondracek will come back to this in a month time 😆

authors: mondracek yakutovicha

repo: Probe-Particle/ppafm


text:
Flight Gem inventory issues

Description (Required)

When using a Flight Gem, if I remove it from my inventory and do something like put it in a chest, it doesnt remove my flight ability. I am unsure if this could be due to me being the owner of the server and by default technically having the ability to fly, but it is problematic and can be abused.
(Additionally, it may be beneficial to make a config option or something where the Flight Gem must be in the off-hand to be used, or require more advanced things in the crafting recipe, since atm it can be fairly easy to obtain and is kinda overpowered.)
(And, maybe by shift right-clicking you could manually disable the Flight Gem.)
Steps to reproduce the Issue (Required)

Get Flight Gem, activate it, put it in chest, and continue flying around.
Expected behavior (Required)

I expected my flight ability to be disabled when putting the Flight Gem in the chest.
Server Log / Error Report

There are no errors.
Environment (Required)

Minecraft Version: git-Paper-"60e92c061" (MC: 1.16.5)
CS-CoreLib Version: uhm I am not sure. i have it installed but /sf versions doesnt show it anymore
Slimefun Version: DEV - 826 (git d33dc965)
Plugin Version: vDEV - 69 (git 167758c0)

Shift Right-Clicking does infact disable the flight gem. Will look into this issue.

authors: ProfElements VoltroMC

repo: ProfElements/DynaTech


text:
add a ci job to build dev image

Fixes: https://github.com/Project-HAMi/HAMi/issues/149

Thanks, a dev image is necessary indeed

authors: archlitchi lengrongfu

repo: Project-HAMi/HAMi


text:
New Bundle with Renal Substructures Segmentation Inference with UNEST model

We are going to build a bundle for the kidney substructure segmentation with contrast enhanced CT images.
This will be the first to release a model and an inference pipeline for renal structures segmentation with CTs, the model can be downloaded and used to the public.
Will be the first public inference work on the task.

How can we download the pretrained weights? Thanks

Hi @numanai , you can use: https://github.com/Project-MONAI/MONAI/blob/dev/monai/bundle/scripts.py#L174 to download the bundle you interest.

Thank You!

authors: numanai tangy5 yiheng-wang-nv

repo: Project-MONAI/model-zoo


text:
Compare recent location data to improve True North and Location Accuracy

See "Fixing Heading with Recent Location Data" on the wiki for Current Location Accuracy for more details.
This can be tested in the sample project by enabling map view and debug mode.

Removing this as an Issue

repo: ProjectDent/ARKit-CoreLocation


text:
Alterar os nomes do projeto no Github

Alterar o nome da empresa, do projeto e do repositório.

Alterado os nome do repositório para o nome provisório do jogo "Além das Montanhas".

Alterado os nome do repositório para o nome provisório do jogo "Além das Montanhas".

repo: Projeto-PATO/Alem-das-Montanhas


text:
hello i rewrote the site ok

hello i rewrote the site ok
hello i rewrote the site ok
hello i rewrote the site ok
hello i rewrote the site ok
hello i rewrote the site ok
hello i rewrote the site ok
hello i rewrote the site ok
hello i rewrote the site ok
hello i rewrote the site ok
hello i rewrote the site ok
hello i rewrote the site ok
hello i rewrote the site ok
hello i rewrote the site ok
hello i rewrote the site ok

lmao, wrong branch

authors: ThePywon skiidward


text:
🛑 Service - Downloads Portal is down

In 52591a0, Service - Downloads Portal (https://downloads.proxeuse.nl) was down:

HTTP code: 500
Response time: 829 ms

Resolved: Service - Downloads Portal is back up in 9bb2506 after 12 minutes.

repo: Proxeuse/status


text:
Add config file

Where the user can specify things like neuroscout remote server address.

In deployment for 99% of users it will be hardcoded, so I think its ok to version control this file (sometimes you dont wanna do that w/ config files). But if there are any sensitive info we should probably put that somewhere else (or in env vars)

I'm closing this until I have a specific reason to need it. Probably best to have it all through the api. pyns will have its own config perhaps.

authors: adelavega qmac

repo: PsychoinformaticsLab/neuroscout-cli


text:
add route for update usefulness

👏 解決掉的 issue / Resolved Issues

close #230

📝 相關的 issue / Related Issues

#230
#210

⛏ 變更內容 / Details of Changes

因為 API endpoint 仍使用文章推文，所以沒有新增 route，而是使用原本的 delivery.appendComment
如果 type 是 ↑ 或 ↓，則 text 可以為空
如果是上下箭頭推文則呼叫 usecase.UpdateUsefulness

目前程式直接判斷 appendType == "↑"，有需改成用 unicode 表示嗎？像是 appendType == "\u2191"

Codecov Report

Merging #234 (2376653) into development (84585bf) will increase coverage by 0.44%.
The diff coverage is 91.30%.

@@               Coverage Diff               @@
##           development     #234      +/-   ##
===============================================
+ Coverage        47.67%   48.11%   +0.44%
===============================================
  Files               28       28
  Lines             1422     1436      +14
===============================================
+ Hits               678      691      +13
- Misses             647      648       +1
  Partials            97       97

Impacted Files
Coverage Δ

internal/usecase/article.go
28.20% <0.00%> (-0.75%)
:arrow_down:

internal/usecase/usecase.go
100.00% <ø> (ø)

internal/delivery/http/route_append_comment.go
79.10% <95.45%> (+5.03%)
:arrow_up:

Continue to review full report at Codecov.

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

用 \x 的hex表示可讀性會比較低，也比較可能出錯，未來方向可能有兩種，另外一種是用變數來代表，另一種是寫到設定檔裡

LGTM

authors: PichuChen codecov-commenter wagaru y2468101216

repo: Ptt-official-app/Ptt-backend


text:
Add CodeQL and Dependency Review workflows

fixes #262

Codecov Report
Base: 92.50% // Head: 92.50% // No change to project coverage :thumbsup:

Coverage data is based on head (b447348) compared to base (9547152).
Patch has no changes to coverable lines.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #276   +/-   ##
=======================================
  Coverage   92.50%   92.50%
=======================================
  Files          17       17
  Lines        1160     1160
  Branches      209      209
=======================================
  Hits         1073     1073
  Misses         59       59
  Partials       28       28

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

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

repo: PublicApiGenerator/PublicApiGenerator


text:
Enahancement: list recent errors

Gsd has a nice console where it lists the restarting, ftp errors and other error messages.
it would be nice if that could be implemented into the ADMIN section too. not everyone has the console screen open 24/7.
(maybe even onError send an email to the server "owner" ? )

Thats being implemented with Scales.

authors: DaneEveritt worldmc

repo: PufferPanel/PufferPanel


text:
Add Open Home Foundation

Add entry for the Open Home Foundation, the foundation that runs Home Assistant, ESPHome and runs/funds many other smart home projects.

Thanks for the submission!  One question: can you provide some more detail as to the non-profit regulations or status of the Open Home Foundation?
I'm still trying to understand how to map various kinds of non-US organizations to the typical US IRS categories of 501c3/4/6.  These are all strictly non-profit in US law, and then have various requirements in terms of purpose, charitable restrictions, donation tax advantages, and the like.  My first reading of a Swiss Verein is that it's not necessarily restricted by law to remain non-profit.
In particular, how does the separation of the Verein from the Nabu Casa work?  The direct tie to your "inaugural partner" seems like it might be a different kind of relationship from other typical organizations we list here.  Does Nabu Casa have a unique and exclusive relationship, or is it more like one of (potentially other) major donor/partners who funds the non-profit, like US 501(c)(6) Business Leagues do - similar to the Linux Foundation, which has various major sponsors, but operates itself strictly as non-profit.
Does that make sense?  In any case, definitely nice to see Home Assistant have a formal home focused on users and community first!

We are actually in the process of transitioning from Verein to Stiftung (not publicly announced yet until next week). We are a non-profit with tax-exempt status. We are also in the process of starting a private 501c3 aligned with it (but that's just for American companies to make it easier to donate money, not our main entity).
Nabu Casa is a commercial partner of the Open Home Foundation. There is no limit on the number of commercial partners, and there might be more in the future. A commercial partner can use the Home Assistant brand, but in return needs to commit the majority of their resources to develop Open Home Foundation projects and ecosystem.

Apologies for the delay; sounds like great work.  I'd be curious (separately) to see your trademark policy, to see how you deal with being independent and nonprofit, but also allowing trademark use in specific ways for your core funders.  That's different from many Foundations, but in your case (and lots of cases around hardware of any kind), makes a lot of sense.

authors: ShaneCurcuru balloob

repo: Punderthings/fossfoundation


text:
CSS fixes for the error/notice box

@mmnosek it seems that my code review was a little bit too uncautious. Today I have noticed to problems:

When I put the mouse cursor over the error text, the whole text gets underlined
The notice box is not tappable in the same way as the error box is
The <a> element is used without the href attribute, which is wrong

This PR attempts to fix all these problems.

@mmnosek, it seems that I have broken the tests. I will investigate.

Tests fixed. @mmnosek pls review :)

Merging

repo: PuppetJs/puppet-polymer-client


text:
Rename master branch to main

I keep meaning to do this and keep forgetting...

Done!

repo: PurpleKingdomGames/indigo


text:
Copy code button is not working properly

The copy code button is not working properly, it is aligned to the left instead of the right,
it seems to be missing tailwind styles for some reason.

Adding the missing styles to the tailwind.css file solves the issue:
.right-2 {
  right: 0.5rem;
}

.top-2 {
  top: .5rem;
  }

.bg-gray-700 {
  --tw-bg-opacity: 1;
  background-color: rgb(55 65 81/var(--tw-bg-opacity));
  }

  .text-gray-300 {
    --tw-text-opacity: 1;
    color: rgb(209 213 219/var(--tw-text-opacity));
    }

    .border-green-400 {
      --tw-border-opacity: 1;
      border-color: rgb(74 222 128 / var(--tw-border-opacity));
  }

  .text-green-400 {
    --tw-text-opacity: 1;
    color: rgb(74 222 128 / var(--tw-text-opacity));
}

Not sure if that's the right solution, but it works as a workaround.

Hi! I was aware of the issue, but forgot to fix ^ Now done and fixed, thank you! :)

Fixed

authors: PxlSyl SimplySmartHouse


text:
How Many Vowels?

Before jumping into Pr first comment for assign.
Problem statement : Create a function that takes a string and returns the number (count) of vowels contained within it.
Probelm Link :  https://edabit.com/challenge/jwPaBe2xjE46baPoG
Choose one Cateorgy - Very Easy, Easy, Medium, Hard, Very Hard, Expert
question category :  Easy

Before submitting a PR please Check some details.

[x] fileName formet should be in camelcase
example- returnTheNextNumber.py
[x]  Choose label for Problem , example- "good first issue", "easy"
[x]  In file there should be problem statement and link to problem

/* Problem-Task : This program will add two numbers
 * Problem Link : https://edabit.com/challenge/SFzHtm63XT6EYNHWY
*/
int main() {
    int bla;
    return 0;
}

This repository is vaild for HacktoberFest2020
Read before making PR - How to contribute on Github
Good Luck,

Assign This to me.

please assign this to me.I love to work on it.

Please assign this to me

I would love to work on it ,please assign this to me

@pranavgoel29 sir, I would like to work on this issue.
Can you please assign me this issue.

please assign me this @pranavgoel29

@Gautam-Diwan @Procoder16 @satwik16 @aktgb31 @Awanit512
I am not allowed to assign it to anyone as you have to choose an question and make an issue about it so it can be assigned to you they are assigning it to those who post the issue. So respectively choose a different problem and make an issue about it.

@aayushi-droid Please assign it to me.

repo: Py-Droid/Edabit-Solutions


text:
Using Bit Stream Filters

I am trying to convert an MP4 H264 stream to Annex-B for use in a MPEGTS output container.  I am using the MP4 generated video file located in the docs under numpy for my reproduction example.  I am getting an error saying that the stream is invalid, and needs to be in Annex B using -bsf:v h264_mp4toannexb
Error
H.264 bitstream malformed, no startcode found, use the video bitstream filter 'h264_mp4toannexb' to fix it ('-bsf:v h264_mp4toannexb' option with ffmpeg)

Reproduction code:
import io

import numpy as np
import av

duration = 4
fps = 24
total_frames = duration * fps

mp4 = io.BytesIO()
mp4.name = 'test.mp4'
container = av.open(mp4, mode='w')

stream = container.add_stream('libx264', rate=fps)
stream.width = 480
stream.height = 320
stream.pix_fmt = 'yuv420p'

for frame_i in range(total_frames):

    img = np.empty((480, 320, 3))
    img[:, :, 0] = 0.5 + 0.5 * np.sin(2 * np.pi * (0 / 3 + frame_i / total_frames))
    img[:, :, 1] = 0.5 + 0.5 * np.sin(2 * np.pi * (1 / 3 + frame_i / total_frames))
    img[:, :, 2] = 0.5 + 0.5 * np.sin(2 * np.pi * (2 / 3 + frame_i / total_frames))

    img = np.round(255 * img).astype(np.uint8)
    img = np.clip(img, 0, 255)

    frame = av.VideoFrame.from_ndarray(img, format='rgb24')
    for packet in stream.encode(frame):
        container.mux(packet)

# Flush stream
for packet in stream.encode():
    container.mux(packet)

# Close the file
container.close()

# Convert to mpegts
input_ = av.open(mp4, 'r')
input_stream = input_.streams.video[0]
output_file = io.BytesIO()
output_file.name = 'test.ts'
output = av.open(output_file, 'w', format='mpegts')
output_stream = output.add_stream('h264', input_stream.rate)

for packet in input_.demux(input_stream):
    # We need to skip the "flushing" packets that `demux` generates.
    if packet.dts is None:
        continue

    # We need to assign the packet to the new stream.
    packet.stream = output_stream

    output.mux(packet)

output.close()

Hi Jason!
I had a dig around and it looks we don't currently have any code to deal with bitstream filters.
Unless I'm mistaken the API doesn't look very complicated so it might not be a huge deal to add this. The relevant functions seem to be av_bsf_*:
https://ffmpeg.org/doxygen/4.0/group__lavc__misc.html
Once the filter has been initialized it seems like it's "just" a matter of passing packets in using av_bsf_send_packet and retrieving the output by repeatedly calling av_bsf_receive_packet.

Hey @jlaine - There is a bitstream branch where @mikeboers has already started work on this, but it's created off of something other than develop.  I started looking into this, but abandoned it in favor of going another direction.  I still think it would be a useful feature to add though, so I'll keep the ticket open unless you want to close it.

Yes, let's keep the ticket open, I'll take a look at Mike's branch. It's very handy you provided some self-contained test code, as it can form the base of a unit test.

The single commit on the bitstream branch should be easily cherry-picked onto develop.

I've rebased this as a single commit onto develop.

Hi  @mikeboers  will we merge bitstream filter to develop?

@jlaine @mikeboers - As you might be able to see from the reference above, it looks like I might have a use case for this again. It looks like the branch still exists, but would definitely require a rebase. Is it viable to pick this back up for a future release?

Hi @mikeboers
What are the chances this patch will be merged to master and if it's possible how can I help you with that?
Bitstream filters support turned out to be extremely useful for a project which provides Python bindings to video decoding / encoding accelerated by Nvidia GPUs: https://github.com/NVIDIA/VideoProcessingFramework
It allows to extract Annex.B NAL Units and send them to GPU for HW - accelerated decoding (https://github.com/NVIDIA/VideoProcessingFramework/issues/99#issuecomment-744408969). Having this feature in master branch (and hence available with pip and such) would be great.

+1 for this use-case

+1 for this use-case

What is lacking for this feature to merge bitstream filters with main branch.
I also require the h.264 annex bistream filter for my webrtc doorstation project.
Thus, I am willing to support to get this feature from the library instead of wrapping it on my own.

What is lacking for this feature to be merged to the main branch? really need it.

Let's keep this alive since it has a PR.

I included it last month in my doorstation project, with a manual merge of the . Testcases still work, but I am still not far enough to fully test the functionality.
The patch is especially useful if you get a half encoded x264 stream from raspberry cam and want to stream it to a webrtc solution.

Since the PR #565 was closed, can this issue be opened again?
I also happen to have a usecase where I would need h264_mp4toannexb and hevc_mp4toannexb
@WyattBlue on the PR you said that you support this feature. Will you help me get bitstream filters merged if I try to rewrite the 4 year old code to match the current codebase?
I kind of started that already and it doesn't look too difficult. I'm hoping I'll have something working tomorrow.

authors: brederle hunterjm jlaine mikeboers notedit philipp-schmidt rarzumanyan riaqn skeskinen tsdicloud

repo: PyAV-Org/PyAV


text:
Fix typo in symmetry docstring

Noticed a small typo in the docstring for transform().
This should be merged after #108.

This PR is outdated and unnecessary.

Thanks for pointing it out!

authors: DanHickstein DhrubajyotiDas

repo: PyAbel/PyAbel


text:
ADD: basic configparser using regexes to load args from file.

A new class is added (FileArgumentParser), which:

Allows cmdline args starting with '@' to locate a file used to
load additional commandline args (this is standard ArgumentParser).

Extend the 'convert_arg_line_to_args' method to parse ini-like
lines from said file. It also replaces lines like 'value = true'
with its cmdline equivalent: '--value'

Attempt to load files located at:

docformatterrc
docformatter.ini
docformatter.cfg
tox.ini

With the merge of #101, pyproject.toml, setup.cfg, and tox.ini are supported as configuration files.  At this moment, the community seems to be leaning towards fewer configuration files rather than more.  So I don't see the need to support docformatter-specific configuration files.

authors: pwoolvett weibullguy

repo: PyCQA/docformatter


text:
Pymodaq4.0.8: No installed detectord on start up

I get this error trying to launch pymodaq from a fresh install ( uninstall + install)
Python version: 3.9.16
Sytem: Ubuntu 18
I also deleted the whole etc/.pymodaq folder content to start from a fresh config.
Successfully installed pymodaq-4.0.8
(pymodaq) cs268225@iram-fa-007534:~/Documents/Python/TDC$ dashboard
Traceback (most recent call last):
File "/home/cs268225/anaconda3/envs/pymodaq/bin/dashboard", line 5, in
from pymodaq.dashboard import main
File "/home/cs268225/anaconda3/envs/pymodaq/lib/python3.9/site-packages/pymodaq/dashboard.py", line 32, in
from pymodaq.control_modules.daq_move import DAQ_Move
File "/home/cs268225/anaconda3/envs/pymodaq/lib/python3.9/site-packages/pymodaq/control_modules/daq_move.py", line 22, in
from pymodaq.control_modules.utils import ControlModule
File "/home/cs268225/anaconda3/envs/pymodaq/lib/python3.9/site-packages/pymodaq/control_modules/utils.py", line 64, in
raise DetectorError('No installed Detector')
pymodaq.utils.exceptions.DetectorError: No installed Detector
(pymodaq) cs268225@iram-fa-007534:~/Documents/Python/TDC$ daq_move
Traceback (most recent call last):
File "/home/cs268225/anaconda3/envs/pymodaq/bin/daq_move", line 5, in
from pymodaq.control_modules.daq_move import main
File "/home/cs268225/anaconda3/envs/pymodaq/lib/python3.9/site-packages/pymodaq/control_modules/daq_move.py", line 22, in
from pymodaq.control_modules.utils import ControlModule
File "/home/cs268225/anaconda3/envs/pymodaq/lib/python3.9/site-packages/pymodaq/control_modules/utils.py", line 64, in
raise DetectorError('No installed Detector')
pymodaq.utils.exceptions.DetectorError: No installed Detector
(pymodaq) cs268225@iram-fa-007534:~/Documents/Python/TDC$ daq_viewer
Traceback (most recent call last):
File "/home/cs268225/anaconda3/envs/pymodaq/bin/daq_viewer", line 5, in
from pymodaq.control_modules.daq_viewer import main
File "/home/cs268225/anaconda3/envs/pymodaq/lib/python3.9/site-packages/pymodaq/control_modules/daq_viewer.py", line 24, in
from pymodaq.control_modules.utils import ControlModule
File "/home/cs268225/anaconda3/envs/pymodaq/lib/python3.9/site-packages/pymodaq/control_modules/utils.py", line 64, in
raise DetectorError('No installed Detector')
pymodaq.utils.exceptions.DetectorError: No installed Detector
I believe the problem comes from config_pymodaq.toml on launch, I deleted the file but it does not change the output when the file is created for the first time.
Best,
Constant

Hi,
I had no problem installing with the version 3.8 of python.
OS: Ubuntu 20.04.
Here is my python environment:
environment.md
Best,
David

Config files are stored both in /etc/.pymodaq and in ~home/.pymodaq
But I don't think this is related. It just seems you have missing packages! When installing pymodaq, the package: pymodaq_plugins_mock is in the requirements and should installed the mock actuators and detectors. Check this guy is installed correctly (but I never had the issue).
Let us know of your progress

Nice ;)
Actually I also have this problem of access on the folder /etc/.pymodaq I will try the command with chmod.
It should be possible to automate this in a way at the installation i guess.

Before doing the commands recommanded by @Ashwolaa I had this message at running a dashboard: "Cannot create local config folder at this location: /etc/.pymodaq, try using admin rights. Changing the not permitted path to a user one: /home/dbrestea/.pymodaq."
Now it is solved.
Thanks ;)

This is indeed related to ownership of this folder created during the first run of pymodaq. In some cases, this folder is ok for reading/writing, in other cases it is not...
The function handling this is defined in the pymodaq.utils.config module:
def get_set_path(a_base_path: Path, dir_name: str) -> Path:
    path_to_get = a_base_path.joinpath(dir_name)
    if not path_to_get.is_dir():
        try:
            path_to_get.mkdir()
        except PermissionError as e:
            print(f"Cannot create local config folder at this location: {path_to_get}"
                  f", try using admin rights. "
                  f"Changing the not permitted path to a user one: {Path.home().joinpath(dir_name)}.")
            path_to_get = Path.home().joinpath(dir_name)
            if not path_to_get.is_dir():
                path_to_get.mkdir()
    return path_to_get

This is a poor workaround as the initial goal of this was to have a kind of public folder that all user would use (to store the preset for instance) and one specific to each user. I've read that for linux, it is usually in /etc hence the creation of /etc/.pymodaq . However, in linux, the ownership and rights to read/write is quite tricky...
In pymodaq postinstall one shoud run a small script to create and change rights on this folder. I already do this in the continuous integration:

So either, we try to include it in the postinstall of pymodaq (never done it before, but I've read about that a bit) or make a special chapter in the doc for linux install.
I vote for the second option because we could also put some documentation of packages that are needed to run qt properly on linux:

If we go for that, could you write this part of the documentation?

I can do that, I do not know much for now on the packages needed in Linux though (doesn't pip install pyqt5/Pyside6 does it?).
But I can write the procedure I used in the documentation

there is not always all the right packages that are installed depending on which linux you work on... Thanks for adding the procedure in the doc!

Do you have the list of packages needed?

here is the command I run in continuous integration servers:
sudo apt install libxkbcommon-x11-0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 x11-utils

Ok PR #180 precise the procedure for linux installation in the documentation. Closing the issue

Actually should not we make a choice about a Linux distribution we support "officially"? That would probably prevent such problem.
I would vote for Ubuntu since it is probably the most common one, and we are already two people in the maintainers to use it ;)

Well, the servers where the continuous integration is done are ubuntu which is the default OS for linux tests. I'm also running tests on windows (and we could also include macos...). So maybe we could just state this: I mean that the tests are run on ubuntu and that for other linux distribution the user should know there will not be any supports...

Yes that sounds reasonable ;)

authors: Ashwolaa quantumm seb5g

repo: PyMoDAQ/PyMoDAQ


text:
Update tests & docs with IntoPyDict::into_py_dict(py)

Will close #378

Thank you

authors: konstin milesgranger


text:
Remove myself from the CoC

I'm not active on this project anymore, so I shouldn't be the CoC contact.
@kngwyu @davidhewitt Feel free to add yourself instead.
Thank you for contributing to pyo3!

I'm kind of sad to see this, but @konstin thank you for all your work on PyO3!
I really learned a lot from working with you.

authors: kngwyu konstin


text:
heat pumps at AC bus instead of low voltage

existing urban decentral and rural heat pumps (buld year <2020) draw electricity from the AC bus, newly build ones from the low voltage bus. that's a bug and everything should be connected to low voltage

Fixed by https://github.com/PyPSA/pypsa-eur/pull/948.

repo: PyPSA/pypsa-ariadne


text:
Add broken test for issue 305

Fix for https://github.com/PySport/kloppy/issues/305

@probberechts would you mind having a look at this fix?

Looks great 👍

authors: koenvo probberechts

repo: PySport/kloppy


text:
No module named 'pl_bolts.models.autoencoders'

As what "https://github.com/PyTorchLightning/lightning-bolts/issues/707" said, I removed pytorch lightning bolts module, and I successfully installed lightning bolts, but I kept getting an error below:
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
/tmp/ipykernel_3033447/2816402708.py in <module>
      2 from torch import nn
      3 import torch
----> 4 from pl_bolts.models.autoencoders.components import (
      5     resnet18_decoder,
      6     resnet18_encoder,

ModuleNotFoundError: No module named 'pl_bolts.models.autoencoders'

I am running it on ipynb
Torch 1.9.1
lightning-bolts 0.4.0
How you installed PyTorch (conda, pip, source): pip
Build command you used (if compiling from source):
Python version: 3.8.2

I tried this localy but it works.
Env

Torch - 1.9.1
PyTorch Lightning - 1.4.9
Lightning Bolts - 0.4.0
Python - 3.8.8
Env(pip,conda) - Conda

Thanks for getting back to me. But I faced the similar issues below:

ModuleNotFoundError                       Traceback (most recent call last)
/tmp/ipykernel_4044614/4231511349.py in
1 from torch import nn
2 import torch
----> 3 from pl_bolts.callbacks.ssl_online import SSLOnlineEvaluator
4 from pl_bolts.models.autoencoders.components import (
5     resnet18_decoder,
ModuleNotFoundError: No module named 'pl_bolts.callbacks.ssl_online'
PyTorch Lightning - 1.4.9
Lightning Bolts - 0.4.0
torch  -  1.10.0+cu113

requirements.txt

These are the dependencies I used

Can you try downgrading from 1.4.9

Thanks for sharing the env lists.
Yeah I downgraded to 1.3.8 but still faced the same issue. By the way I am using the jupyter lab on the server.

hi,
Is it different in VSCode and other.

Oh no, I found a problem here.
I upgraded python version to 3.8.8 and now it is working fine.
3.8.2 keeps facing error. Not sure why though...

repo: PyTorchLightning/lightning-bolts


text:
Split text metrics into text and speech metrics.

🚀 Enhancement
Split text metrics into text and speech metrics.
Motivation
Currently, both text and speech metrics are all stored under text metrics. However, I think there are some good reasons why they should/may be split into two categories:

Text and speech are two different modalities
For text metric evaluation, we allow evaluating a hypothesis against multiple references. However, there is always a single reference for speech.
Also I think it might be a bit confusing for newcomers into NLG/speech which metrics are used for which modality.

Pitch
Split text metrics into text and speech metrics. Otherwise, leave everything as it is.
Alternatives
Keep it as it is.
@Borda @SkafteNicki What do you think about it? :]

Text and speech are two different modalities

could you pls elaborate more on the difference as we would also need to make such an explanation in docs...

Is there a difference between speech and audio?

It seems to me that, for now, speech metrics consume text inputs while audio ones consider tensor inputs

speech metrics consume text inputs while audio ones consider tensor inputs

yeah, but if speech has input text, why not keep it as text?

@Borda I also see the difference that text predictions can be naturally compared against multiple references, which is not the case for speech (at least I guess)... However, I have no strong opinion on this for now so we can definitely leave it as it is :]

well, I think that with this we go into too many details and we could also talk about if binary and multi-label classification shall be in a single package... :rabbit: lest put it on hold and reopen later if we have more reasons for such split... :angel:

well, I think that with this we go into too many details and we could also talk about if binary and multi-label classification shall be in a single package... 🐰 lest put it on hold and reopen later if we have more reasons for such split... 👼

yep, agree :]

authors: Borda SkafteNicki stancld

repo: PyTorchLightning/metrics


text:
[Feature Request] Simple method to display image batch

🚀 Feature
basically a show_batch feature.
Motivation
I'd like to be able to very quickly visualize how batches of data + annotations look to debug my dataloading pipeline before training.  A lot of problems can be quickly solved just by having the capability to see an augmented batch of training data.
Pitch
I'd like a model or data module objects to have this method.
Alternatives
Maybe an option in the trainer to show part of a training and val batch before validation sanity check?
Adding more boilerplate to get tensorboard image logging for classification/detection/segmentation could be another alternative.
cc @borda

I believe this is available in Flash.
cc @ethanwharris

I use https://marketplace.visualstudio.com/items?itemName=elazarcoh.simply-view-image-for-python-debugging with VS code debugger and breakpoints at the batch assignment stage in the model code to achieve this functionality.
Agree it would be nice to have this included in the code-base.

I think lightning doesn't integrate domain-specific extensions, although they can be easily used with available hooks or 3d-party packages or flash if it's there.

authors: austinmw carmocca deepseek-eoghan rohitgr7

repo: PyTorchLightning/pytorch-lightning


text:
Suppress TracerWarning by pytorch when using example_input_array

🚀 Feature

Suppress TracerWarning by pytorch when using example_input_array.
These warnings won't be raised normally. However, they become very annoying when torch.size()/shape is to be destructed (i.e tensor.size()[0]) in the model.
Motivation

It is very annoying to have the following warnings when I have code like tensor.size()[0] in the model and with example_input_array enabled:
TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record
the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace
might not generalize to other inputs!

Pitch

Those warnings should be gone if they are caused by example_input_array
Alternatives

It should be possible to suppress these warnings if they were raised during the detection of input/output sizes using example_input_array
Additional context

See this notebook:
https://colab.research.google.com/drive/1M_YpU4z7DR_nVvAef_DF7qIC5p8aKn9O?usp=sharing

@awaelchli mind have look? 🌮

@pwwang can you grant me access to the colab link?

Ok, I checked and this is fixed on master by #3092
We don't log graph by default, which is very good. The tracer warning will only show if you log the graph explicitly, but we should not suppress it in my opinion.

authors: Borda awaelchli pwwang


text:
Add an example of how to subclass base DDP to docs

Some cases you want to customize DDP. We need to add that to our docs.

lets wait here till refactoring is done, then we shall also consider adding abstract Backend class

this is duplicate of #3471.

authors: Borda edenlightning


text:
Make sure all kwargs come after args in _load_model_state()

What does this PR do?
Move all the kwargs (in this case strict) after positional arguments. This was causing some trouble for loading certain checkpoints with positional arguments.
Before submitting

N/A Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
[x] Did you read the contributor guideline, Pull Request section?
[x] Did you make sure your PR does only one thing, instead of bundling different changes together? Otherwise, we ask you to create a separate PR for every change.
N/A Did you make sure to update the documentation with your changes?
N/A Did you write any new necessary tests?
[x] Did you verify new and existing tests pass locally with your changes?
N/A If you made a notable change (that affects users), did you update the CHANGELOG?

PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃

@yukw777 can you add a test that fails on master but not in this PR?


text:
limit auto scaling batch size to the size of the training dataset

What does this PR do?

Fixes #3259
and releated to #3266
Before submitting

[ ] Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
[x] Did you read the contributor guideline, Pull Request section?
[x] Did you make sure your PR does only one thing, instead of bundling different changes together? Otherwise, we ask you to create a separate PR for every change.
[x] Did you make sure to update the documentation with your changes?
[x] Did you write any new necessary tests?
[x] Did you verify new and existing tests pass locally with your changes?
[x] If you made a notable change (that affects users), did you update the CHANGELOG?

PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃

@awaelchli maybe I made a mistake in rebase, mind push your local branch before sync and resolve conflicts...

@Borda I had to redo all the changes again because the batch size scaling was all moved to a new place and now there appears to be a tuner class? I hope this bugfix can be merged before any further modifications are made to the tuner.

authors: Borda awaelchli


text:
Updated "Models defined by data"

Updated documentation to correct code-block showing use of DataModule
Fixes #3406

Sorry didn't test with -W flag (treat warnings as errors)

Sorry no i changed that when I was looking for why I was getting the warning. That code block wasn’t documented and I have a feeling it was left in from previously - I did add a comment before it to indicate that it was an alternative. I can revert the change if required?
Sent from my iPhone

On 10 Sep 2020, at 11:31 pm, Jirka Borovec notifications@github.com wrote:

@Borda commented on this pull request.
In docs/source/introduction_guide.rst:

-.. testcode::
+.. code-block:: python
any reason why this?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Sorry no i changed that when I was looking for why I was getting the warning. That code block wasn’t documented and I have a feeling it was left in from previously - I did add a comment before it to indicate that it was an alternative. I can revert the change if required?

I would do it... pls
cc: @awaelchli

authors: Borda david-waterworth


text:
Fix attribute error for _gpus_arg_default loading checkpoint prior to 1.2.8

What does this PR do?
Fixes #7031
I remove a function in #6898 that I should not have removed.
Old checkpoints (<1.2.8) have this pickled, so in order to load the checkpoint back we need to have access to the source code.
Before submitting

[ ] Was this discussed/approved via a GitHub issue? (not for typos and docs)
[ ] Did you read the contributor guideline, Pull Request section?
[ ] Did you make sure your PR does only one thing, instead of bundling different changes together?
[ ] Did you make sure to update the documentation with your changes? (if necessary)
[ ] Did you write any new necessary tests? (not for typos and docs)
[ ] Did you verify new and existing tests pass locally with your changes?
[ ] Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review
Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

[x] Is this pull request ready for review? (if not, please submit in draft mode)
[x] Check that all items from Before submitting are resolved
[x] Make sure the title is self-explanatory and the description concisely explains the PR
[x] Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?
Make sure you had fun coding 🙃

So are we stuck with this function forever? 😢

I'm afraid so, unless we cut off backward compatibility at some version.
Or maybe there are some pickle tricks we don't know about to avoid it.
Also, why did the legacy checkpoint testing not catch this?
Because all legacy checkpoints were generated without hyperparameters in them.
@Borda we may want to regenerate these checkpoints with hyperparams.

we may want to regenerate these checkpoints with hyperparams.

if you wish to update the model we can regenerate all legacy models...


text:
simple request API

Simple Example of Requests Api
Description
A short summary of what is included in your Pull Request.
Fixes #(issue_no)
Replace issue_no in the above line, with the issue related to this PR.
Type of change
Choosing one or more options from the following as per the nature of your Pull request.

NOTE: These boxes can be checked using [X]

[ ] Bug fix (non-breaking change which fixes an issue)

[ ] New feature (non-breaking change which adds functionality)

[ ] Documentation Update

Checklist:
Please tick all the boxes that are fulfilled by your Pull Request.

[x] I have named my files and folder, according to this project's guidelines.
[x] My code follows the style guidelines of this project.
[ ] My Pull Request has a descriptive title. (not a vague title like Update index.md)
[ ] I have commented on my code, particularly in hard-to-understand areas.
[ ] I have created a helpful and easy to understand README.md, according to the given README_TEMPLATE.
[x] I have included a requirements.txt file (if external libraries are required.)
[x] My changes do not produce any warnings.
[ ] I have added a working sample/screenshot of the script.

I guess you meant rest API? @panudet-24mb

yeah it a simple rest api .

@all-contributors please add @panudet-24mb for code


text:
Could future.utils.raise_from set the traceback attribute ?

Hi.
The current implementation of future.utils.raise_from refers to PEP 3134: https://github.com/PythonCharmers/python-future/blob/39a066ed/src/future/utils/init.py#L388
However, it does not set the __traceback__ attribute as the PEP recommends.
This would be very  handy to display chained exceptions tracebacks.
Would you be open to a PR adding this ?

For more context : https://chezsoi.org/lucas/blog/displaying-chained-exceptions-stacktraces-in-python-2.html

repo: PythonCharmers/python-future


text:
Prefer readthedocs.io instead of readthedocs.org for doc links

Read the Docs moved hosting to readthedocs.io instead of readthedocs.org. Fix
all links in the project.
For additional details, see:
https://blog.readthedocs.com/securing-subdomains/

Starting today, Read the Docs will start hosting projects from subdomains on
the domain readthedocs.io, instead of on readthedocs.org. This change
addresses some security concerns around site cookies while hosting user
generated data on the same domain as our dashboard.

LGTM

authors: jdufresne jmadler


text:
Header hover effect

Header without hover effect is very simply. I can give very beautifull hover effect to your header of website.
and i will give the hover effect which will match your design. pls @QAZIMAAZARSHAD assign this work to me.

please @QAZIMAAZARSHAD  merge my pull request

Hey @QAZIMAAZARSHAD
i am interested to work on this project can you assign me this issue ?

Hey @QAZIMAAZARSHAD Can you please assign me to this issue. I am interested in working on this

Hey @QAZIMAAZARSHAD I solved this issue and made a pull request. I hope you like it and would accept it

repo: QAZIMAAZARSHAD/Movie-Streaming-Website


text:
Response:  Failed to authenticate as ****. Synchronize the clock on your host.

Hello Team,
when i am using (knife node list) using powershell under the folder chef-repo am getting the issue as ERROR: Failed to authenticate to https://api.chef.io/organizations/kjnchef**(organization name)** as (user name)kjnbabu with key C:/ChefSer/Aug2019/chef-starter/chef-repo/.chef/kjnbabu.pem(.Pem File where i have download from manage.console.io )
Response:  Failed to authenticate as kjnbabu. Synchronize the clock on your host.
am uploading the image also, can any one help to find out the issue.If you solve the issue thanks in advance

I have changed the timezone also, Restarted the powereshell.But its not working,

Hi Srinivas,
Your .pem key must be present in chef-repo folder

I think its time synchronization error

Sorry I have deleted my admin role for organization in groups on manage.chef.io,i sign up new account and generate new chef-repo. one more thing time zone of my system is wrong. I have changed it It's working..thanks Naresh...

repo: QT-DevOps/DevOpsIssues


text:
Documentation on how to fly

Describe the issue
I think it would be a good idea to have a bit of a guideline on how to set up the quadcopter to be able to fly
Affected File
No response
Affected Line
No response

Should this be closed?

repo: QUB-ASL/bzzz


text:
Ignitions: Lines following contours

Feature Description
When there is topography the ignitors with consider both wind and aspect when putting down lines. As Alex showed in the meeting he has code to build ignitions along contours, but he hasn't automated a way to build the contours. I would like to make a function that builds contour lines from topo.dat. I would like to lines to be numbered from 1-n starting with the lines at a higher elevation.
Getting Started
First work on building and numbering the lines.
Then reach out to Alex to see how it fits into his workflow.
Screenshots
Add any other context or screenshots about the feature request here.

I was messing around with building from a DEM raster today and had some good luck.  I am trying not to use a crazy number of packages to get it to work.  Here are some highlights:

This routine relies on matplotlib and rasterio.
I am relying on rasterio to import a .tif Digital Elevation Model (not a topo.dat... yet)
ct_gap_m is the contour spacing in meters.
I used matplotlib.plot.contour() to return the contour lines,
Then I unpack the contours with a loop.

Here's the code snippet:
`# Episode 1
Working towards seamless rendering of Digital Elevation Model
Also obtaining contours without use of Arc or QGIS products
Copy-and-paste below to run in Python console
exec(open('C:\Users\FireScience\Documents\QUIC-fire\ignPad\dem_read_ep1.py').read())
import os
import numpy as np
import matplotlib.pyplot as plt
import rasterio
from rasterio.plot import show
from rasterio.plot import show_hist
fp = r"C:\Users\FireScience\Documents\QUIC-Fire\ignPad\GISdata\Konza_SHP\DEM_Konza.tif"
raster = rasterio.open(fp)
Vital statistics about raster
print('# of bands = ' + str(raster.count))
print('# of rows = ' + str(raster.height))
print('# of columns = ' + str(raster.width))
print('bbox listed below')
print('-----------------')
print(raster.bounds)
print('LL (Lower Left) corner listed below')
print('-----------------------------------')
print(raster.transform * (raster.width, raster.height))
Matplotlib plotting
fig, axs = plt.subplots(1, 2, figsize=(16, 9))
show(raster.read(1), cmap='Greys_r', transform=raster.transform, ax=axs[0])
#show(raster, ax=axs[0])
Histogram
show_hist(raster, bins=50, lw=0.0, stacked=False, alpha=0.3,
histtype='stepfilled', title="Histogram", ax=axs[1])
plt.show()
Work on developing contours
ct_gap_m = 10.0
matrix = raster.read(1)
#matrix = ((np.floor(matrix + ct_gap_m + 1.0) / ct_gap_m) * ct_gap_m) - ct_gap_m
num_intervals = int((matrix.max() - matrix.min()) / ct_gap_m)
fig, axs = plt.subplots(1, 2, figsize=(16, 9))
ct = axs[0].contour(matrix, np.linspace(matrix.min(), matrix.max(), num_intervals))
contours = []
for cc in ct.collections:
paths = []
for pp in cc.get_paths():
xy = []
for vv in pp.iter_segments():
xy.append(vv[0])
paths.append(np.vstack(xy))
contours.append(paths)
for line in contours:
if line:
line = line[0]
axs[1].plot(line[:, 0], line[:, 1])
print('contour length = {0}'.format(len(line)))
else:
print('found an empty contour!')
plt.show()
`

@mathfire I finally got around to looking at this. This does look promising! I haven't exactly messed around with rasterio yet so some guidance on how to get a .tif file that would be able to run in this code would be appreciated. I'm hoping that tomorrow I can take a look into this code a bit more and see how it can be implemented into the standardized workflow.

@cbonesteel Great! One useful online clearinghouse for DEM data is: https://apps.nationalmap.gov/downloader/  This is the so-called "The National Map" offered by the USGS.  To use it to find those DEMs (.tif and .tiff) involves defining a bounding box/extent, then searching for "Elevation Products (3DEP)" and download.  For my case, I am finding little sections of terrain for the ignitions that Daniel asks me to draw and a list of escaped RX fires of interest.
Otherwise, I realized the code snippet I shared had poor commenting.  So sorry about that!  I like to lead by example so I def fell down there.  Realistically, n lines of code should be at least 2n lines of written work.  Each line with a comment.  Don't know if that is how you practice or were taught, but it makes collaboration so much easier.  Here is a better formatted snippet:
`# Episode 1
Working towards seamless rendering of Digital Elevation Model
Also obtaining contours without use of Arc or QGIS products
Copy-and-paste below to run in Python console
exec(open('/home/aleks/PycharmProjects/pythonProject/dem_read_ep1.py').read())
Supporting libraries and dependencies
import os
import numpy as np
import matplotlib.pyplot as plt
import rasterio
from rasterio.plot import show
from rasterio.plot import show_hist
Create a read file pointer to a DEM (Digital Elevation Model)
fp = r"/home/aleks/PycharmProjects/pythonProject/Konza_SHP/DEM_Konza.tif"
Stream in the raster grid from the file
raster = rasterio.open(fp)
Report to the console some vital statistics about raster
print('# of bands = ' + str(raster.count))      # Number of color bands
print('# of rows = ' + str(raster.height))      # Height (# of rows of raster)
print('# of columns = ' + str(raster.width))    # Width (# of columns of raster)
print('bbox listed below')
print('-----------------')
print(raster.bounds)                            # A header, then the bounding box
print('LL (Lower Left) corner listed below')
print('-----------------------------------')
print(raster.transform * (raster.width, raster.height))     # A header, then the LL corner
Matplotlib plotting
fig, axs = plt.subplots(1, 2, figsize=(16, 9))
Show the raster on the left subplot
show(raster.read(1), cmap='Greys_r', transform=raster.transform, ax=axs[0])
#show(raster, ax=axs[0])        # Alternate command to so the same
Histogram of the colors
show_hist(raster, bins=50, lw=0.0, stacked=False, alpha=0.3,
histtype='stepfilled', title="Histogram", ax=axs[1])
Show current figure
plt.show()
Establish the contour spacing in meters
ct_gap_m = 10.0
Save a copy of the raster
matrix = raster.read(1)
"Integerize" the DEM for evenly spaced level sets
#matrix = ((np.floor(matrix + ct_gap_m + 1.0) / ct_gap_m) * ct_gap_m) - ct_gap_m
Calculate the number of contour intervals
num_intervals = int((matrix.max() - matrix.min()) / ct_gap_m)
Next figure to draw
fig, axs = plt.subplots(1, 2, figsize=(16, 9))
Save to a local variable and draw the contours
ct = axs[0].contour(matrix, np.linspace(matrix.min(), matrix.max(), num_intervals))
Loop to extract individual contour lines
Empty container where the contour line coordinates will be stored
contours = []
Loop through each member object of the ct return from Matplotlib contour
for cc in ct.collections:
# Empty container for paths within the cc member objects
paths = []
# Loop through the paths
for pp in cc.get_paths():
# Initialize space for coordinates
xy = []
# Loop through segments of the paths
for vv in pp.iter_segments():
# Add coordinates to the list
xy.append(vv[0])
# Stack the coordinates and add them to this path
paths.append(np.vstack(xy))
# Add the path (with coordinates) to the contour
contours.append(paths)
For each contour line
for line in contours:
# If there are coordinates
if line:
# Parse the coordinates
line = line[0]
# PLot the coordinates
axs[1].plot(line[:, 0], line[:, 1])
# Report the length of this contour
print('contour length = {0}'.format(len(line)))
# In absence of contours...
else:
# ... report an empty
print('found an empty contour!')
Show current figure
plt.show()
`

authors: cbonesteel mathfire zacharycope0


text:
How to run the code?

Dear authors, I was very interested after reading your work. But I didn't find any description about the startup code. Please forgive me for being a beginner, can you tell me the detailed code startup method, I would be grateful.

@CQUPT-CaiKe Hi, this repo contains the code for our data collection system and the dataset. For training a model, we used ParlAI framework: https://parl.ai/ . If you are familiar with the ParlAI (you might need to spend some time learning the framework if you are not familiar with it), it should be just converting the dataset to the required format and start the training with one simple command. We do not serve the model due to cost issues, however, we provide the train/test split of the dataset.
** Chatting service
So, if you want to run the data collection server, what you need to do are:

create a virtual python env.
install tornado pip install tornado.
enter mtt/chat and run python event_chat.py
on your browser, go tolocalhost:8888?workerId=000

And you should be able to see the instructions and the start matching button. Hit the start matching button and the work with Id=000 will join the match queue.
Do the same thing on a new browser tab and go to localhost:8888?workerId=001 for another instance. After you have more than two workers in the queue, a couple of them will be directed into the chatting room.
Events, progress are loaded from the json files under mtt/chat/data/events. You can customize your own events with the same format.
** Model training
With the data files under mtt/chat/data/gap_chat, you can convert the dialogue data into ParlAI format. You can refer to mtt/data_collection/prepare_data.py for how we treat the events and dialogues. Then you can simply run the training command within ParlAI by loading data from local file. It is possible to play with whatever model that is available in the model zoo. However, if you want to train the RAG model, you might need to create the index first. We follow the steps as described in: https://parl.ai/docs/agent_refs/rag.html and use DPR model. However, the DPR repo has been archived by Meta it might be possible to use some other methods. You may also fine-tune the model on existing MSC models https://parl.ai/docs/zoo.html#msc-models without indexing. However, the performance may not be as good as creating some new index.

Sorry, something maybe wrongs?

@CQUPT-CaiKe This new version is specifically designed for running on AMT. So it requires another couple of arguments.
Can you try accessing localhost:8888?workerId=000&assignmentId=somerandomassignmentId&hitId=somerandomhitId?

Thanks. The other question is that it can not match other workers. I try different wokerID and wait matching, but it does not match. Such as localhost:8888?workerId=000&assignmentId=001&hitId=002, localhost:8888?workerId=006&assignmentId=001&hitId=002, and localhost:8888?workerId=003&assignmentId=002&hitId=004.

Can you share the log data you got on the server side?
Normally, you should be able to see logs like this:
[Log] 001 Joined
[Log] Worker: 000 started matching.
[Log] matching queue: ['000']
[Log] Worker: 001 started matching.
[Log] matching queue: ['000', '001']
[Log] matched, room_info: {'room_id': 0, 'speaker_1': '001', 'speaker_2': '000', 'save_location': 'd:\\project\\MindTheTime\\mtt\\chat\\log\\20241219-115116-0.log'}
[Log] Room 0 is initialed

[I 241219 10:55:50 web:2239] 304 GET /?workerId=000&assignmentId=001&hitId=002 (::1) 10.03ms
[I 241219 10:55:50 web:2239] 101 GET /match (::1) 0.00ms
[Log] 000 Joined
[Log] Worker: 000 started matching.
[Log] matching queue: ['000']
[I 241219 10:56:20 web:2239] 304 GET /?workerId=001&assignmentId=001&hitId=002 (::1) 6.29ms
[I 241219 10:56:20 web:2239] 101 GET /match (::1) 0.00ms
[Log] 001 Joined
[Log] Worker: 001 started matching.
[Log] matching queue: ['000', '001']
[E 241219 10:56:22 ioloop:761] Exception in callback functools.partial(<function WebSocketProtocol._run_callback.. at 0x000001A7F82D7E50>, <Task finished name='Task-17' coro=<MatchHandler.on_message() done, defined at event_chat.py:457> exception=FileNotFoundError(2, 'No such file or directory')>)
Traceback (most recent call last):
File "C:\Python\Anaconda3\lib\site-packages\tornado\ioloop.py", line 741, in _run_callback
ret = callback()
File "C:\Python\Anaconda3\lib\site-packages\tornado\websocket.py", line 656, in
self.stream.io_loop.add_future(result, lambda f: f.result())
File "event_chat.py", line 477, in on_message
room_info = await ioloop.IOLoop.current().run_in_executor(
File "C:\Python\Anaconda3\lib\concurrent\futures\thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "event_chat.py", line 308, in match
f = open(save_location, "a")
FileNotFoundError: [Errno 2] No such file or directory: 'log\20241219-105529-0.log'
[E 241219 10:56:22 web:1789] Uncaught exception GET /match (::1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/match', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "C:\Python\Anaconda3\lib\site-packages\tornado\web.py", line 1704, in _execute
result = await result
File "C:\Python\Anaconda3\lib\site-packages\tornado\websocket.py", line 278, in get
await self.ws_connection.accept_connection(self)
File "C:\Python\Anaconda3\lib\site-packages\tornado\websocket.py", line 879, in accept_connection
await self._accept_connection(handler)
File "C:\Python\Anaconda3\lib\site-packages\tornado\websocket.py", line 962, in _accept_connection
await self._receive_frame_loop()
File "C:\Python\Anaconda3\lib\site-packages\tornado\websocket.py", line 1116, in _receive_frame_loop
await self._receive_frame()
File "C:\Python\Anaconda3\lib\site-packages\tornado\websocket.py", line 1207, in _receive_frame
await handled_future
File "C:\Python\Anaconda3\lib\site-packages\tornado\ioloop.py", line 741, in _run_callback
ret = callback()
File "C:\Python\Anaconda3\lib\site-packages\tornado\websocket.py", line 656, in
self.stream.io_loop.add_future(result, lambda f: f.result())
File "event_chat.py", line 477, in on_message
room_info = await ioloop.IOLoop.current().run_in_executor(
File "C:\Python\Anaconda3\lib\concurrent\futures\thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "event_chat.py", line 308, in match
f = open(save_location, "a")
FileNotFoundError: [Errno 2] No such file or directory: 'log\20241219-105529-0.log'

@CQUPT-CaiKe I think it's because the system was not able to create the log folder. We removed this to protect workers privacy.
You could try manually creating a log folder with the following steps:

go to mtt/chat folder
create a new folder log

Then you should be able to do the matching.


text:
希望可以支持markdown文章添加目录

当前不支持[toc]
而对于一些较长的博文目录还是比较必需的，希望大佬能有解决方案~QWQ

当前不支持[toc]
而对于一些较长的博文目录还是比较必需的，希望大佬能有解决方案~QWQ
其实我也有这个想法

repo: QiaoBug/hexo-theme-quiet


text:
Apply gate limits automatically

What is the expected behavior?
For most (every?) gates there is some periodicity involved. The best example are the RLXGate and its cousins. For them it would be great to have automatic modulos applied at some stage, but I am not sure where.

Ideally it would come directly with the gate as anyone implementing the RLXGate would set the limit to 0 - 2*pi or something similiar.
It would also leave the user alone with these limits, when it is not absolutely necessary.

However, I am not sure at which stage the transformation should be applied. In the transpiler ? Become a property of each gate ?

I still do not really see the point why this should be restricted on the Qiskit side at all. This is purely a matter of the backend how it interprets a gate with angles outside of [0, 2Pi] imo. If your backend says that its interpretation is to take a modulo 2Pi, fine, then this can be done on the backend side, no? This is how the standard parametrized gates such as rx work in Qiskit.
Also, depending on the implementations on the backend side, a -Pi/2 rotation might be physically achieved more easily (=shorter or higher fidelity pulse) than an 3*Pi/2 pulse, which, again depends on the backend. Hence I'm not a fan of brute forcing this on the circuit level.

We could achieve this with an optional transpiler pass. I don't think we want to wrap into [0, 2 pi] by default. Some experiments could benefit from wrapping around the BlochSphere more than once.

authors: LaurinFischer eggerdj fretchen

repo: Qiskit-Extensions/qiskit-cold-atom


text:
fix type annotation and docstring for ExperimentData.figure

Summary
Fix the type annotation of ExperimentData.figure. The object returned is FigureData object, not plain bytes.

@wshanks @nkanazawa1989 Can one of you enable the CI workflow?

Sorry, I merged main once before because I thought this was good to merge in but forgot to come back after the CI passed.

authors: eendebakpt wshanks

repo: Qiskit/qiskit-experiments


text:
Aer simulator fails to work with custom parametrized circuits and VQE

Informations

Qiskit Aer version: 0.12.2
Python version: 3.11.3
Operating system: Windows 10

What is the current behavior?
When I try to execute the code below, I get the following error:
Traceback (most recent call last):
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit\extensions\hamiltonian_gate.py", line 90, in __array__
    return scipy.linalg.expm(-1j * self.params[0] * float(self.params[1]))
                                                    ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit\circuit\parameterexpression.py", line 480, in __float__
    raise TypeError(
TypeError: ParameterExpression with unbound parameters ({ParameterVectorElement(angles[0])}) cannot be cast to a float.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit\transpiler\passes\basis\unroll_custom_definitions.py", line 88, in run
    unrolled = getattr(node.op, "definition", None)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit\circuit\instruction.py", line 239, in definition
    self._define()
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit\extensions\hamiltonian_gate.py", line 117, in _define
    qc._append(UnitaryGate(self.to_matrix()), q[:], [])
                           ^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit\circuit\gate.py", line 53, in to_matrix
    return self.__array__(dtype=complex)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit\extensions\hamiltonian_gate.py", line 92, in __array__
    raise TypeError(
TypeError: Unable to generate Unitary matrix for unbound t parameter angles[0]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit_algorithms\minimum_eigensolvers\vqe.py", line 254, in evaluate_energy
    estimator_result = job.result()
                       ^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit\primitives\primitive_job.py", line 55, in result
    return self._future.result()
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\_base.py", line 456, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\_base.py", line 401, in __get_result
    raise self._exception
  File "C:\Users\User\AppData\Local\Programs\Python\Python311\Lib\concurrent\futures\thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit_aer\primitives\estimator.py", line 128, in _call
    return self._compute(circuits, observables, parameter_values, run_options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit_aer\primitives\estimator.py", line 188, in _compute
    self._transpile_circuits(circuits)
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit_aer\primitives\estimator.py", line 481, in _transpile_circuits
    circuit = self._transpile(circuit)
              ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit_aer\primitives\estimator.py", line 468, in _transpile
    return transpile(circuits, self._backend, **self._transpile_options.__dict__)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit\compiler\transpiler.py", line 418, in transpile
    out_circuits = pm.run(circuits, callback=callback)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit\transpiler\passmanager.py", line 537, in run
    return super().run(circuits, output_name, callback)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit\transpiler\passmanager.py", line 233, in run
    return [self._run_single_circuit(circuits[0], output_name, callback)]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit\transpiler\passmanager.py", line 292, in _run_single_circuit
    result = running_passmanager.run(circuit, output_name=output_name, callback=callback)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit\transpiler\runningpassmanager.py", line 125, in run
    dag = self._do_pass(pass_, dag, passset.options)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit\transpiler\runningpassmanager.py", line 173, in _do_pass
    dag = self._run_this_pass(pass_, dag)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit\transpiler\runningpassmanager.py", line 202, in _run_this_pass
    new_dag = pass_.run(dag)
              ^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit\transpiler\passes\basis\unroll_custom_definitions.py", line 90, in run
    raise QiskitError(f"Error decomposing node {node.name}: {err}") from err
qiskit.exceptions.QiskitError: 'Error decomposing node hamiltonian: Unable to generate Unitary matrix for unbound t parameter angles[0]'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\User\Desktop\MA-QAOA\temp\my_test.py", line 29, in <module>
    test_vqe()
  File "C:\Users\User\Desktop\MA-QAOA\temp\my_test.py", line 25, in test_vqe
    result = vqe.compute_minimum_eigenvalue(-hamiltonian)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit_algorithms\minimum_eigensolvers\vqe.py", line 183, in compute_minimum_eigenvalue
    optimizer_result = self.optimizer(
                       ^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\scipy\optimize\_minimize.py", line 710, in minimize
    res = _minimize_lbfgsb(fun, x0, args, jac, bounds,
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\scipy\optimize\_lbfgsb_py.py", line 307, in _minimize_lbfgsb
    sf = _prepare_scalar_function(fun, x0, jac=jac, args=args, epsilon=eps,
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\scipy\optimize\_optimize.py", line 383, in _prepare_scalar_function
    sf = ScalarFunction(fun, x0, args, grad, hess,
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\scipy\optimize\_differentiable_functions.py", line 158, in __init__
    self._update_fun()
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\scipy\optimize\_differentiable_functions.py", line 251, in _update_fun
    self._update_fun_impl()
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\scipy\optimize\_differentiable_functions.py", line 155, in update_fun
    self.f = fun_wrapped(self.x)
             ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\scipy\optimize\_differentiable_functions.py", line 137, in fun_wrapped
    fx = fun(np.copy(x), *args)
         ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\Desktop\python3.11_venv\Lib\site-packages\qiskit_algorithms\minimum_eigensolvers\vqe.py", line 256, in evaluate_energy
    raise AlgorithmError("The primitive job to evaluate the energy failed!") from exc
qiskit_algorithms.exceptions.AlgorithmError: 'The primitive job to evaluate the energy failed!'

Apparently, parametrized Hamiltonian gates fail to convert to unitaries when AerEstimator is used. However, if qiskit.primitives.Estimator is used instead, then everything works as expected. As far as I understand, one should be able to use these estimators interchangeably.
Steps to reproduce the problem
The following code reproduces the problem:
from qiskit import QuantumCircuit
from qiskit.circuit import ParameterVector
from qiskit.primitives import Estimator
from qiskit_aer.primitives import Estimator as AerEstimator
from qiskit.quantum_info import SparsePauliOp, Pauli
from qiskit_algorithms.minimum_eigensolvers import VQE
from scipy import optimize

def get_custom_ansatz(num_qubits: int) -> QuantumCircuit:
    params = ParameterVector('angles', num_qubits)
    circuit = QuantumCircuit(num_qubits)
    for i in range(num_qubits):
        circuit.hamiltonian(Pauli('X'), params[i], [i])
    return circuit

def test_vqe():
    n = 12
    estimator = AerEstimator()  # Estimator() works
    hamiltonian = SparsePauliOp.from_sparse_list([('ZZ', [0, 1], -1)], n)
    ansatz = get_custom_ansatz(n)
    optimizer = optimize.minimize
    vqe = VQE(estimator, ansatz, optimizer)
    result = vqe.compute_minimum_eigenvalue(-hamiltonian)
    return -result.eigenvalue.real

test_vqe()

What is the expected behavior?
I expect no errors.
Suggested solutions

Thanks. As @mtreinish transferred, this is the transpilation issue.
minimal code to reproduce this is
from qiskit import QuantumCircuit, transpile
from qiskit.circuit import ParameterVector
from qiskit_aer import AerSimulator

def get_custom_ansatz(num_qubits: int) -> QuantumCircuit:
    params = ParameterVector('angles', num_qubits)
    circuit = QuantumCircuit(num_qubits)
    for i in range(num_qubits):
        circuit.hamiltonian(Pauli('X'), params[i], [i])
    return circuit

transpile(get_custom_ansatz(n), AerSimulator())

It's actually more of an issue with the implementation of the HamiltonianGate, it is raising errors when there is an unbound parameter when the transpiler is asking for it's definition to unroll it into terms that can be used for basis translation. There isn't a way to transpile it directly with an unbound parameter because it's definition can only be realized with a numeric parameter for time because the definition just returns a unitary gate, and we can't define the matrix without a numerical value for time.

Yeah this only work with the Estimator in Qiskit (Terra) as it binds the parameter values before simulating the circuit.
If you'd like to use operator evolutions with the Aer Estimator, you can use the PauliEvolutionGate instead of the QuantumCircuit.hamiltonian function. The PauliEvolutionGate implements a Trotter expansion, so it is not exact, but this is what we would also have to run on a quantum computer.
I'll go ahead and close this issue, but feel free to re-open if the answers above didn't answer your question.

authors: Cryoris GaidaiIgor ikkoham mtreinish

repo: Qiskit/qiskit-terra


text:
bad type annotation

What should we add?
I don't know what is the correct annotation but this is not a valid annotation
https://github.com/Qiskit/qiskit-terra/blob/b2f0964f2c43b7f6104db9e28191210cc6a71bd4/qiskit/transpiler/passes/calibration/builders.py#L330

ping @taalexander @nkanazawa1989
side note, not sure if relevant: In https://github.com/Qiskit/qiskit-terra/pull/6759 it changed from Union["Schedule", Instruction] to Union["Schedule", PulseInst].


text:
Tweak colors to match new IQX colors

Summary
Match the upcoming changes to IQX circuit composer styling.
Details and comments

Once again, I cannot pass the unit tests using my own reference images.

Yes these visualization tests seem painful. But in #2968 @drholmie is proposing a solution which might alleviate the pain so I think we should give that a try.

The conflicts should be easy to resolve, do you mind having a look?

@nonhermitian what's the status on this?

I have not looked at this in four months when it was working just fine.  Now there are two files and three images with conflicts.  So need to resolve those when time permits.

if the image tests fail are failing i think they should just be disabled until someone can make them work properly. there's no point having them right now.

also while you rebase this can you fix a color regression that was introduced in #3709? it draws cu1 as black. it should be purple

your current branch has the colors right (below) but doesn't draw cu1 as symmetric, which was the bug fixed by PR above

authors: 1ucian0 ajavadia nonhermitian


text:
controlled gate text drawer

On top of PR #2862, so on hold.

does this close #3199?

does this close #3199?

No. At least, not in an initial form. That issue is about instructions overlapping c_if and q_if. I will probably handle that in a coming PR.


text:
Add parallel synthesis interface to default unitary synthesis plugin

Once we have #12004 (and also for #12005 too) implemented we can better leverage available CPU resources better by running synthesis in parallel using a rayon iterator. There is no data dependency between doing unitary synthesis for different unitary matrices, it should be fairly straightforward to have a function that takes in a list of unitary matrices with their target qubits and also dict/hashmap of target qubits to the appropriate decomposer class and then have the function return a list of circuit sequences which is computed using a multithreaded rayon iterator. This can be connected #12006 to have the default synthesis plugin prepare a batch of all the 2 qubit unitary matrices to exploit this function.

I think this might be superseded by the suggestions in #11659. If we build out a new transpiler pass to do efficient 2q peephole unitary resynthesis we should do what this is proposing. The only case where I think this wouldn't be the case is if we ran UnitarySynthesis for basis translation or unrolling >=3q unitaries. So I'll keep this open just in case we want the parallel interface even though the primary utility I envisioned was for peephole optimization.

repo: Qiskit/qiskit


text:
🛑 Qrono API is down

In fa732a5, Qrono API (https://qrono.dev/api/) was down:

HTTP code: 0
Response time: 0 ms

Investigating: We're currently investigating the cause of this outage, it seems to be that AWS and heroku, our primary hosting platforms, are down. We'll update the details here shortly.

repo: Qrono-Labs/uptime


text:
Are there some parts of the program that are not used? Are there any missing parts?

The scripts folder does not contain a train.py file?

Sorry for the confusion. In fact,  "pre_train.py" is "train.py" in this project  :(

Thanx~

I’m very sorry to disturb you again. I’ve been studying contrastive learning recently, and I recalled this paper. I’d like to ask how positive and negative samples are constructed here. From what I see in the code, it seems that ResNet is used to extract feature maps, which are then pooled using attention, and directly compared with text vectors. How are the image-text pairs matched here

authors: QtacierP endlessBBQ

repo: QtacierP/PRIOR


text:
WIP [SDS-284] barrier/wait command and multiple measurements

Added barrier and wait command support where applicable (when backend supports it)
Added p as an alias for u1 to qiskit backend
Implemented V2 of the API
Adjustments for multiple measurements
For Qiskit backend: The V1 result structures return results as usual (in case of multiple measurement the last measurment block. The V2 result structures return the multiple measurement results.
For Project Q backend: The V1 result structures return results as usual (in case of multiple measurement the last measurment block.
Unit tests added

Coverage remained the same at 100.0% when pulling 98797f4fe0412a7f576de080f9cabd412939a205 on feature/SDS-284/barrier_command into e623e4f747846dddbcb7d2e057e80e66ebd2cdd1 on dev.

authors: QFer coveralls

repo: QuTech-Delft/quantuminspire


text:
Deploy helm chart for prometheus and granana and expose to /monitoring

Summary
Monitoring has been a longstanding issue with QHub. Would like a simple deployment and expose at https://<qhub-url>/monitoring
Proposed implementation
Create a grafana/prometheus directory within https://github.com/Quansight/qhub/tree/main/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/modules/kubernetes/services. The grafana/prometheus helm chart should follow a pattern very similar to https://github.com/Quansight/qhub/tree/main/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/modules/kubernetes/services/jupyterhub. The charts should additionally take an external-url variable similar to https://github.com/Quansight/qhub/blob/main/qhub/template/{{ cookiecutter.repo_directory }}/infrastructure/modules/kubernetes/services/clearml/variables.tf#L20 such that an ingress resource is created as following and enabled. The node group selector should be the general node pool. Additionally there should be an integration added to the qhub-config.yaml with. Enabled should be false by default. Ensure to add the new option to qhub/schema.py.
monitoring:
   enabled: true/false

Acceptance Criteria

[ ] grafana is accesible via https:///monitoring and is functional and able to visit and login to keycloak

Tasks to complete

Related to

epic https://github.com/Quansight/qhub-internal/issues/7

Closing since completed https://github.com/Quansight/qhub/pull/733

authors: costrouc tylerpotts

repo: Quansight/qhub


text:
Incorrect broadcasting to dimension size of 0

I think there is a bug in the core broadcasting feature of xtensor that carries over into how a number of different operations work. (At the very least, it is an inconsistency with numpy where I feel numpy is doing the "right thing"). It is a corner case, but as I test rray I want to make sure they are covered (so they don't crash R) and currently I have to work around it.
The crux of the problem can be represented in two questions:

What should the common dimensions of the two shapes (1, 1) and (0, 1) be? xtensor currently treats the common dimension as (1, 1), but numpy would say the common dimension is (0, 1).
What should the common dimensions of the two shapes (2, 1) and (0, 1) be? xtensor would say (2, 1) but numpy would actually say these can't be broadcast together.

So for numpy, if a dimension is 0 and the other is 1, the common dimension is 0. Otherwise, if the dimension is 0 and the other is not 1 or 0, throw an error (these are the standard broadcasting rules actually, just a bit strange with 0 being involved).
This has implications with many operators, here is one example where the common dim should be (0, 2) but is not:
// [[Rcpp::depends(xtensor)]]
// [[Rcpp::plugins(cpp14)]]

#include <xtensor/xarray.hpp>
#include <xtensor/xio.hpp>

// [[Rcpp::export]]
void test_greater() {
  xt::xarray<bool>::shape_type shp = {0, 2};
  xt::xarray<bool> x(shp);

  xt::xarray<bool>::shape_type shp2 = {1, 1};
  xt::xarray<bool> y(shp2);

  auto res = x > y;

  std::cout << "res shape" << std::endl;
  std::cout << res.shape()[0] << std::endl;
  std::cout << res.shape()[1] << std::endl;
}

> test_greater()
res shape
1
2

Critically, If you try and print out res or return it to R, it crashes.
Increasing the first dim of y from 1 to 2, we see the other behavior:
// [[Rcpp::depends(xtensor)]]
// [[Rcpp::plugins(cpp14)]]

#include <xtensor/xarray.hpp>
#include <xtensor/xio.hpp>

// [[Rcpp::export]]
void test_greater() {
  xt::xarray<bool>::shape_type shp = {0, 2};
  xt::xarray<bool> x(shp);

  xt::xarray<bool>::shape_type shp2 = {2, 1};
  xt::xarray<bool> y(shp2);

  auto res = x > y;

  std::cout << "res shape" << std::endl;
  std::cout << res.shape()[0] << std::endl;
  std::cout << res.shape()[1] << std::endl;
}

> test_greater()
res shape
2
2

This is a more convincing argument for what I tried to mention in QuantStack/xtensor-r#112

What should the common dimensions of the two shapes (1, 1) and (0, 1) be? xtensor currently treats the common dimension as (1, 1), but numpy would say the common dimension is (0, 1).

I think numpy is right over xtensor. Arrays of size 0 in any direction means the array is empty, and the output of a broadcasting operation should be empty.
I am marking the issue as a bug.

I do think the case of (2, 1) and (0, 1) should be an error though (which numpy does), not an empty array with shape (0, 1). Again, numpy follows normal broadcasting rules here rather than special casing 0 (2 and 0 are different, and neither is 1, so error).

authors: DavisVaughan SylvainCorlay

repo: QuantStack/xtensor


text:
fix printing of column view

This is my attempt for fixing #43

Congrats on your first merged PR!

authors: SylvainCorlay wolfv


text:
Import PH_KEYS from ASE

Partially addresses #1408.

@tomdemeyere: FYI, you'll need to update ASE if you haven't done so already.
pip install --force-reinstall --no-deps https://gitlab.com/ase/ase/-/archive/master/ase-master.zip

About that, I started to write some reformatting for ASE. This will include keys for most QE binaries and be located in ase.io.espresso_keys.keys. I also created one read and write for arbitrary Fortran namelist. After that quacc should be espresso.io free. I will open the PR as soon as it is ready

Awesome. Thank you so much!

authors: Andrew-S-Rosen tomdemeyere

repo: Quantum-Accelerators/quacc


text:
rails g queue_classic:install generating same migration?

Hi,
Just wonder about the migrations that were generated: UpdateQueueClassic300, and UpdateQueueClassic302
class UpdateQueueClassic300 < ActiveRecord::Migration
  def self.up
    QC::Setup.update_to_3_0_0
  end

  def self.down
    QC::Setup.downgrade_from_3_0_0
  end
end

class UpdateQueueClassic302 < ActiveRecord::Migration
  def self.up
    QC::Setup.update_to_3_0_0
  end

  def self.down
    # This migration is fixing a bug, so we don't want to do anything here.
    # I didn't want to make it irreversible either, as it could prevent
    # rolling back other, unrelated, stuff.
  end
end

Since both of the up methods has the same line QC::Setup.update_to_3_0_0, is one of the migration unnecessary?

This was to fix https://github.com/QueueClassic/queue_classic/issues/233. So if you got to 3.0.0 first, you need this, if not and you installed the latest directly, it should be fine. That said, there is no big deal in having both :)

Closing, feel free to re-open if this is not satisfying or I didn't reply properly to what you needed.

@jipiboily  Thanks, everything went okay

authors: jipiboily vleango


text:
Download github assets

EDIT: I got it figured out. This will download releases' assets.

This also works fine with curl
curl -L \
-H "Authorization: Basic stuff" \
-H "Accept: application/octet-stream"
-o myfile \
https://api.github.com/repos/whwright/{myrepo}/releases/assets/{myasset}

Could you add a flag/parameter so that including assets in releases is optional?
I had started down this road but did not finish, here: https://github.com/QuicketSolutions/python-github-backup/commit/e0c7f8816b5335db7403ffd32dbab9da617420d1

Sure I can do that. Why the differentiation between assets and binaries? IMO the zips of source code are irrelevant here, since the entire git repository is cloned.

Why binaries?
It was a long night, and I was just exploring what I could and couldn't get working.
I agree that the zips are not necessary.

repo: QuicketSolutions/python-github-backup


text:
BUG : app crash on call FlutterContacts.requestPermission();

Hi,
when I call FlutterContacts.requestPermission(); for the first time app crash and error text is:
java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=0, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {my.redant.leaf/my.redant.leaf.MainActivity}: java.lang.NullPointerException
but after first time, it works fine!
tested on both debug and release mode

Thanks for reporting. I will look soon.


text:
Bug Description
标签页的图标被异常拉伸了。
Relevant Screenshot

To Reproduce

新建标签页
随便输入网址，例如 www.baidu.com
看标签页的图标

Obsidian Version
1.0.3
web-browser-only

[X] Did you install only one web browser plugin?

Checklist

[X] I updated to the latest version of the plugin.

无法复现，请查看是否是主题或者其它插件影响

authors: Quorafind Yaozhuwa

repo: Quorafind/Obsidian-Surfing


text:
🛑 Broker is down

In 11d3e4e, Broker (https://broker.autovance.com/health) was down:

HTTP code: 503
Response time: 150 ms

Resolved: Broker is back up in d3b3958.

repo: QuorumDMS/av-uptime


text:
rendering of the islands show them under water

Islands have the color of the see around :-)
ex : https://www.qwant.com/maps/#map=12.70/46.7158465/-2.3533204
https://www.qwant.com/maps/#map=12.04/46.1864095/-1.2993982

Thanks for raising this issue!
It was caused by a broken polygon representing the Bay of Biscay / Golfe de Gascogne in OSM data. It should be fixed now (or in a few hours depending on the tiles being cached on your side).
On a side note, some changes related to this issue were made in OpenMapTiles recently (https://github.com/openmaptiles/openmaptiles/pull/605). So the rendering should be more robust as soon as the latest release of OpenMapTiles is integrated into our tile server deployment.

authors: amatissart zorglubu

repo: QwantResearch/qwantmaps


text:
Rust: Add extended traits

Adds generation for extended traits which receive more meta data.
Use case: Given the folloing manifest.yaml
description: My module
requires:
  example_right:
    interface: example
  example_left:
    interface: example

If the user chooses to implement both traits in one instance, they have no way to tell which interface is called. This proposal adds another trait (with the postfix Ext)
    /// This interface defines an example interface that uses multiple framework features
    pub(crate) trait ExampleServiceSubscriber: Sync + Send {
        /// This command checks if something is stored under a given key
        ///
        /// `key`: Key to check the existence for
        ///
        /// Returns: Returns 'True' if something was stored for this key
        fn uses_something(
            &self,
            publishers: &ModulePublisher,
            key: String,
        ) -> ::everestrs::Result<bool>;
    }

    /// Extended interface of [ExampleServiceSubscriber]
    pub(crate) trait ExampleServiceSubscriberExt: Sync + Send {
        /// This command checks if something is stored under a given key
        ///
        /// `name`: The name of the interface.
        /// `key`: Key to check the existence for
        ///
        /// Returns: Returns 'True' if something was stored for this key
        fn uses_something_named<'a>(
            &self,
            publishers: &ModulePublisher,
            name: &'a str,
            key: String,
        ) -> ::everestrs::Result<bool>;
    }

    impl<S: ExampleServiceSubscriber> ExampleServiceSubscriberExt for S {
        fn uses_something_named<'a>(
            &self,
            publishers: &ModulePublisher,
            name: &'a str,
            key: String,
        ) -> ::everestrs::Result<bool> {
            self.uses_something(publishers, key)
        }
    }

The user may implement either of the traits - but not both. The extended interface has (for now) one additional parameter which would be the name (in this example example_left and example_right). The behaviour for the normal traits does not change and users don't have to do anything since we provide a blanket to the Ext for every struct which implements the "normal" trait

I see the need for having the information about the interface sometimes. The generated code has it always, right? How about instead of adding a new trait we bundle ths information into the ModulePublisher, i.e. make a struct Context { implementation_id: str, publishers: ModulePublishers }? I find the ergonomics of an extended trait a bit burdensom also, it seems that it does not extend well if we find that there is other such information.

Please still fix the MR headline. This is no longer about extended traits.

authors: SirVer dorezyuk

repo: Qwello/everest-framework