sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: yt-dlp
Issue: [Site Request]Add support for MOOC www.icourse163.org ?
Labels: site-request

## Checklist
- [x] I'm reporting a new site support request
- [x] I've verified that I'm running yt-dlp version **2021.09.02**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] The provided URLs do not contain any DRM to the best of my knowledge
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

-Single video:  https://www.icourse163.org/learn/USTC-1462062166?tid=1465253471#/learn/content?type=detail&id=1244068605

-Single video: https://www.icourse163.org/live/view/480000002192293.htm
More details for the second URL: this was a live class URL, in which there is a chatroom and students can interact with teacher there. 
After the live class finished, now this URL is playback, pure video without chatroom.

Playlist can be supported afterwards.


## Description

Some videos on this website may be require account credentials, but example URL provided above is free to watch and not require account credentials.
Repository: youtube-dl
Issue: Could we add support for MOOC www.icourse163.org ?
Labels: site-support-request

## Checklist

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2021.06.06**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [ ] I've searched the bugtracker for similar site support requests including closed ones.
- [x] I will provide new example URLs.


## Example URLs

-Single video:  https://www.icourse163.org/learn/USTC-1462062166?tid=1465253471#/learn/content?type=detail&id=1244068605

-Single video: https://www.icourse163.org/live/view/480000002192293.htm
More details for the second URL: this was a live class URL, in which there is a chatroom and students can interact with teacher in the chatroom. 
After the live class finished, now this URL is a playback, pure video without chatroom.

Playlist can be supported afterwards.


## Description
Some videos on this website may be require account credentials, but example URL provided above is free to watch and not require account credentials.
Repository: node
Issue: CTRL-C does not quit readline when in infinte loop
Labels: readline

### Version

v16.9.1

### Platform

Linux cicada 5.14.5-arch1-1 #1 SMP PREEMPT Thu, 16 Sep 2021 11:02:40 +0000 x86_64 GNU/Linux

### Subsystem

readline

### What steps will reproduce the bug?

``` js
const readline = require("readline")

const rl = readline.createInterface({
  input: process.stdin,
  output: process.stdout,
})


rl.on("line", (line) => {
  while (true) {
    // infinte loop
  }
})
```


### How often does it reproduce? Is there a required condition?

always 

### What is the expected behavior?

CTRL-C should quit readline when in infinte loop

### What do you see instead?

CTRL-C does not quit readline when in infinte loop

### Additional information

The same issue of the `repl` code module is fixed: https://github.com/nodejs/node/issues/6612
Repository: godot
Issue: Undefined behavior when running project
Labels: bug,topic:rendering

### Godot version

4.0.dev.custom_build. f2efa6f4f

### System information

Ubuntu 21.04 - Nvidia GTX 970, Gnome shell 3.38 X11

### Issue description

```
drivers/unix/file_access_unix.cpp:268:2: runtime error: null pointer passed as argument 1, which is declared to never be null
```
Looks that this patch fixes error
```
diff --git a/servers/rendering/renderer_rd/shader_rd.cpp b/servers/rendering/renderer_rd/shader_rd.cpp
index 82efa1318c21..616a97d7e204 100644
--- a/servers/rendering/renderer_rd/shader_rd.cpp
+++ b/servers/rendering/renderer_rd/shader_rd.cpp
@@ -450,8 +450,10 @@ void ShaderRD::_save_to_cache(Version *p_version) {
 	f->store_32(variant_count); //variant count
 
 	for (uint32_t i = 0; i < variant_count; i++) {
-		f->store_32(p_version->variant_data[i].size()); //stage count
-		f->store_buffer(p_version->variant_data[i].ptr(), p_version->variant_data[i].size());
+		if (variants_enabled[i]) {
+			f->store_32(p_version->variant_data[i].size()); //stage count
+			f->store_buffer(p_version->variant_data[i].ptr(), p_version->variant_data[i].size());
+		}
 	}
 
 	f->close();
```

### Steps to reproduce

Run minimal project with ubsan

### Minimal reproduction project

https://github.com/qarmin/Qarminer/archive/refs/heads/master.zip
Repository: pytorch
Issue: [JIT] TorchScript not works as expected when ModuleDict has modules with different signatures
Labels: oncall: jit

As shown in the code below， M1 module accepts one parameter as input while M2 accepts two, when I call each module separately through k-v loop with `ModuleDict` the module  cannot be script normally.

```python
    
import torch
from typing import *

class M1(torch.nn.Module):
    def __init__(self):
        super().__init__()

    def forward(self, x: Any):
        print(x)


class M2(torch.nn.Module):
    def __init__(self):
        super().__init__()

    def forward(self, x: Any, y: Any):
        print(x, y)

class M(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.md = torch.nn.ModuleDict(
            {   
                'm1': M1(),
                'm2': M2()
            }
        )
    def forward(self, x:Any):
        for k, m in self.md.items():
            if k=='m1':
                m(1)
            elif k=='m2':
                m(1, 2)

print(M()) # works as expected

torch.jit.script(M()) # exception thrown

```
Exception：
```
forward(__torch__.M1 self, Any x) -> (NoneType):
Expected at most 2 arguments but found 3 positional arguments.
:
  File "<ipython-input-1-1d1e2952dcfb>", line 33
                m(1)
            elif k=='m2':
                m(1, 2)
                ~ <--- HERE
```

An inelegant solution：
```python
import torch
from typing import *
    
class M1(torch.nn.Module):
    def __init__(self):
        super().__init__()

    def forward(self, x: Any, jit_compat_arg:Optional[Any]=None): # <--- diff
        print(x)


class M2(torch.nn.Module):
    def __init__(self):
        super().__init__()

    def forward(self, x: Any, y: Optional[Any]=None): # <--- diff
        print(x, y)

class M(torch.nn.Module):
    def __init__(self):
        super().__init__()
        self.md = torch.nn.ModuleDict(
            {   
                'm1': M1(),
                'm2': M2()
            }
        )
    def forward(self, x:Any):
        for k, m in self.md.items():
            if k == 'm1':
                m(1)
            elif k == 'm2':
                m(1, 2)

torch.jit.script(M())

#######
Out[1]:
RecursiveScriptModule(
  original_name=M
  (md): RecursiveScriptModule(
    original_name=ModuleDict
    (m1): RecursiveScriptModule(original_name=M1)
    (m2): RecursiveScriptModule(original_name=M2)
  )
)

```
Repository: TypeScript
Issue: TypeScript incorrectly infers logical operation result type with empty string
Labels: Bug

### 🔎 Search Terms
`string logical disjunction type inference` `string logical inference type` `infer empty string logical operation type`

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.4.2#code/MYewdgzgLgBNBOAuOV4EswHMYB8YFcwATAUwDMMSiYBeGAcnoCgnRJYoTpaYAKBXHkKkKYKgEoYAMikwA3hBABbEsnpQAFhkz0AvkyA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
const str: string | undefined = ''

const test = (str || undefined) && {some: 'thing'}
```

### 🙁 Actual behavior

Inferred type of operation is
```
"" | {
    some: string;
} | undefined
```

### 🙂 Expected behavior

Inferred type of operation is
```
{
    some: string;
} | undefined
```
because `(str || undefined)` prevents empty string to be returned
Repository: angular
Issue: Allow components to provide custom `ErrorHandler`
Labels: area: core,core: error handling,P3

### Which @angular/* package(s) are relevant/releated to the feature request?

common, core

### Description

As an Angular developer I want a better DX and UX for handling errors that occur during change detection and event handlers by intercepting errors at the component level.

Currently I am trying to provide the `ErrorHandler` service like so:

```ts
@Component({
  template: `
    <button (click)="explode()">Explode</button>
  `,
  providers: [{
    provide: ErrorHandler,
    useExisting: MyComponent
  }]
})
export class MyComponent implements ErrorHandler {
  handleError(error) {
    console.error('in component', error)
  }
  explode() {
    throw new Error("Boom!")
  }
}
```

When I click the button I would expect the `handleError` method to be called. Instead it calls the global `ErrorHandler` service provided in the root module. Looking through the source code I noticed that Angular only checks for `ErrorHandler` in the Module injector when an error occurs.

https://github.com/angular/angular/blob/9b8f056604891537e37d6e0231b28b99868bd041/packages/core/src/render3/instructions/shared.ts#L2049

### Proposed solution

When Angular catches an error, it should try injecting the `ErrorHandler` service from the Element injector first. If `ErrorHandler` is not found, fall back to using the Module injector. This should also ideally guard against the error handler itself throwing an error by passing the thrown error to the next `ErrorHandler` up the Element injector tree. Also consider using `ErrorHandler` in place of re-throwing errors in core APIs such as `AsyncPipe`.

### Alternatives considered

- Defensive programming by writing error handling logic in many places, eg. wrapping event handlers in try catch blocks, rxjs catchError operator, etc.
- Manual change detection to catch template errors.
```ts
@Directive()
export class ErrorBoundary implements DoCheck {
  ngDoCheck() {
    try {
      this.cdr.detectChanges()
    }  catch (error) {
      // handle error
    }
  }
}
```
Repository: rust
Issue: Suggest implementing more traits for array type itself instead of using the traits of slice type
Labels: A-diagnostics,T-compiler,A-suggestion-diagnostics

We know that arrays can be automatically borrowed as slices,and it is convenient when we want to use a trait that has already been implemented for slices type.However,sometimes,when we want to use generics and the trait bounds,we will get into trouble.

I tried this code:
```rust
fn collection_len<T:len_trait::Len>(collection:&T) ->usize {
    collection.len()
}
fn main() {
    println!("{}",collection_len(&vec![1,2,3]));
    println!("{}",collection_len(&[1,2,3]));
}
```
I expected to see this happen: 
```
3
3
```
Instead, this happened: 
```
error[E0277]: the trait bound `[{integer}; 3]: Len` is not satisfied
 --> src/main.rs:6:34
  |
6 |     println!("{}",collection_len(&[1,2,3]));
  |                                  ^^^^^^^^ the trait `Len` is not implemented for `[{integer}; 3]`
  |
  = help: the following implementations were found:
            <[T] as Len>
note: required by a bound in `collection_len`
 --> src/main.rs:1:21
  |
1 | fn collection_len<T:len_trait::Len>(collection:&T) ->usize {
  |                     ^^^^^^^^^^^^^^ required by this bound in `collection_len`
```
The document:
```Rust
impl<T> Len for [T]
impl Len for str
impl Len for CStr
impl Len for CString
impl Len for OsStr
impl Len for OsString
impl<K: Ord, V> Len for BTreeMap<K, V>
impl<T: Ord> Len for BTreeSet<T>
impl<T: Ord> Len for BinaryHeap<T>
impl<K: Eq + Hash, V> Len for HashMap<K, V>
impl<T: Eq + Hash> Len for HashSet<T>
impl<T> Len for LinkedList<T>
impl Len for String
impl<T> Len for Vec<T>
impl<T> Len for VecDeque<T>
impl Len for BitSet
impl Len for BitVec
impl<T> Len for BList<T>
impl<T: CLike> Len for EnumSet<T>
impl<T: Ord> Len for IntervalHeap<T>
impl<K: Eq, V> Len for LinearMap<K, V>
impl<K: Eq + Hash, V> Len for LinkedHashMap<K, V>
impl<K: Eq + Hash, V> Len for LruCache<K, V>
impl<T> Len for VecMap<T>
```
Maybe we can fix it by implementing more traits for array type. I wonder if we should change the automatical conversion,as the traits of array and those of slices may conflict.
Repository: godot
Issue: `OS.open_midi_inputs` crashes with dummy audio (or when using Movie Maker mode)
Labels: bug,platform:linuxbsd,confirmed,topic:audio,crash

### Godot version

4.0.dev.custom_build. 22b225395cda3b6f27f6017fa860a1b863f09f9f

### System information

Ubuntu 21.04 - Nvidia GTX 970, Gnome shell 3.38 X11

### Issue description

Running project with
```
godot4 --audio-driver Dummy 
```
crashes with this backtrace
```
[1] godot4s(+0x3203960e) [0x564aa9e8a60e] (??:0)
[2] /lib/x86_64-linux-gnu/libc.so.6(+0x41040) [0x7f7843149040] (??:0)
```
when using `OS.open_midi_inputs()`

### Steps to reproduce

Above

### Minimal reproduction project

_No response_
Repository: fastapi
Issue: I hope fastapi can support TypeVar
Labels: feature,reviewed

### First Check

- [X] I added a very descriptive title to this issue.
- [X] I used the GitHub search to find a similar issue and didn't find it.
- [X] I searched the FastAPI documentation, with the integrated search.
- [X] I already searched in Google "How to X in FastAPI" and didn't find any information.
- [X] I already read and followed all the tutorial in the docs and didn't find an answer.
- [x] I already checked if it is not related to FastAPI but to [Pydantic](https://github.com/samuelcolvin/pydantic).
- [x] I already checked if it is not related to FastAPI but to [Swagger UI](https://github.com/swagger-api/swagger-ui).
- [x] I already checked if it is not related to FastAPI but to [ReDoc](https://github.com/Redocly/redoc).

### Commit to Help

- [X] I commit to help with one of those options 👆

### Example Code

```python
from typing import TypeVar, Generic

from fastapi import Depends
from sqlalchemy.orm import Session

from app.core.database_engine.db_core import get_db
from app.core.table_class import HasIdTable, DateCreateTable, DateCreateUpdateTable

T = TypeVar('T', bound=HasIdTable)


class DbAdaptor(Generic[T]):
    def __init__(self, db: Session = Depends(get_db)):
        self.db = db

    def add(self, data_element: T, is_commit: bool = True) -> dict:
        if isinstance(data_element, DateCreateTable):
            data_element.create_stamp()
        self.db.add(data_element)
        if is_commit:
            self.db.commit()
        return data_element.get_dict()

    def read_by_id(self, id: int) -> T:
        rt: T = self.db.query(T).filter_by(id=id).first()
        return rt

@bp.post('/create', description='create data to table')
def create(dba: DbAdaptor[SampleTable] = Depends(), data: str = Body(..., embed=True)):
            """create data into the table"""
            data = SampleTable(data=data,
                               link=str(random.randint(0, 99999)),
                               title=data,
                               content=data)
            return dba.add(data)
```


### Description

I'm sorry, I'm no English user but I want to achieve this function.

This is the code in my project, but guess what happened when I opened swagger.

![スクリーンショット 2021-09-18 22 48 27](https://user-images.githubusercontent.com/36730656/133891074-8ef8e5c2-0a41-4f58-bdbb-4c29c138127f.jpg)

This shouldn't happen.

I just want to simplify the operation of the database.

I just want to make operating the database easier through my code.

Under normal circumstances, I can do this without thinking about more specific details.



### Wanted Solution

I hope it can show a normal swagger.

### Wanted Code

```python
null
```


### Alternatives

do not use the typevar, But it's not fun.

### Operating System

macOS

### Operating System Details

_No response_

### FastAPI Version

fastapi~=0.68.1

### Python Version

python3.8

### Additional Context

_No response_
Repository: godot
Issue: OS.shell_open cannot open folder in macOS
Labels: bug,platform:macos,topic:porting,needs testing

### Godot version

3.3.3 stable

### System information

macOS 10.12 to macOS 11

### Issue description

`OS.shell_open(OS.get_user_data_dir())` will cause a error.

### Steps to reproduce

Just run `OS.shell_open(OS.get_user_data_dir())`

### Minimal reproduction project

_No response_
Repository: neovim
Issue: API: nvim_get_context not parsable with vim.mpack.unpack.
Labels: bug

### Neovim version (nvim -v)

NVIM v0.6.0-dev+276-g685cf3981

### Vim (not Nvim) behaves the same?

doesn't apply

### Operating system/version

Linux, Arch

### Terminal name/version

Alacritty

### $TERM environment variable

xterm-256color

### Installation

build from repo

### How to reproduce the issue

```
nvim -u NONE
```
```lua
vim.mpack.unpack(vim.api.nvim_get_context({types = {"jumps"}}).jumps[1])
```
Produces
```
E5108: Error executing lua [string ":lua"]:1: trailing data in msgpack string
```

I'm not familiar with mpack, but I would imagine this working.

### Expected behavior

Be able to parse with the new msgpack functions like:
```lua
lua vim.fn.msgpackparse(vim.api.nvim_get_context({types = {"jumps"}}).jumps)
```

### Actual behavior

```
E5108: Error executing lua [string ":lua"]:1: trailing data in msgpack string
```
Repository: yt-dlp
Issue: [Site Request] podme.com
Labels: site-request,account-needed

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.06.06. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [X] I'm reporting a new site support request
- [X] I've verified that I'm running yt-dlp version **2021.09.02**
- [X] I've checked that all provided URLs are alive and playable in a browser
- [X] I've checked that none of provided URLs violate any copyrights
- [X] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->

- Single podcast: 320 MP3: https://podme.com/no/papaya/550167
- podcast: https://podme.com/no/papaya


## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

Requires "premium" account, 14 day trial.
Repository: pytorch
Issue: Add support for HF NLP models in torch.package/deploy
Labels: oncall: package/deploy,imported

Add support for saving and loading HuggingFace NLP models in torch.package and torch::deploy. 

Seeing following issues for HuggingFace models:

1. torch::deploy - HuggingFace by default uses [lazy loading](https://github.com/huggingface/transformers/blob/master/src/transformers/__init__.py#L22) for the submodules and dependencies. This had to be turned off for model to load with torch::deploy. This could have performance implications for production scenarios in case extra submodules get loaded that are not needed for a particular model.

2.  torch.package - Unable to package the tokenizers due error for "Module is a C extension package, torch.package supports Python modules only" error for tokenizers.tokenizers
Repository: rust
Issue: Conditionally add stdlib APIs based on edition?
Labels: T-libs-api

Hi,
There's been some discussion on [this thread](https://internals.rust-lang.org/t/add-zero-cost-builder-methods-to-pathbuf) where it seems like the best solution would be adding methods to a stdlib API, but only having them become active in a new rust edition. Is this possible?
Repository: pytorch
Issue: [numpy] Add `iscomplexobj` and `isrealobj`
Labels: feature,triaged,module: complex,module: numpy

Pytorch currently has `torch.is_complex` which takes a Tensor and returns whether the dtype is complex for not. (`np.iscomplexobj` is the corresponding similar function in NumPy)

NumPy has a function `iscomplex` which takes an array and returns a boolean array where value is True is corresponding element is complex.

To avoid confusion for the users coming from NumPy, it would be nice if PyTorch adds `iscomplexobj` (alias to already existing `is_complex`) and also `isrealobj`.

Documentation:
torch.is_complex : https://pytorch.org/docs/stable/generated/torch.is_complex.html
np.iscomplex : https://numpy.org/doc/stable/reference/generated/numpy.iscomplex.html#numpy.iscomplex
np.iscomplexobj : https://numpy.org/doc/stable/reference/generated/numpy.iscomplexobj.html#numpy.iscomplexobj
np.isrealobj : https://numpy.org/doc/stable/reference/generated/numpy.isrealobj.html#numpy.isrealobj

Thanks @AnirudhDagar for pointing towards this!

cc @ezyang @anjali411 @dylanbespalko @mruberry @Lezcano @nikitaved @rgommers @heitorschueroff